diff --git a/backend/server.js b/backend/server.js index fb0c94c..c41906c 100644 --- a/backend/server.js +++ b/backend/server.js @@ -30,19 +30,57 @@ app.get('/api/config/:tenantId', (req, res) => { res.json(config); }); -// Mock WhatsApp Webhook +// Official Twilio Webhook parsing middleware +app.use(express.urlencoded({ extended: true })); + +// WhatsApp Webhook (Twilio) app.post('/whatsapp/webhook', async (req, res) => { - const { from, body } = req.body; - console.log(`Received message from ${from}: ${body}`); + // Twilio sends urlencoded fields: From, Body + // Or our mock sends json: from, body + const from = req.body.From || req.body.from; + const body = req.body.Body || req.body.body; - const response = await botLogic.handleMessage(from, body); + console.log(`[WhatsApp Webhook] Received message from ${from}: ${body}`); - // In a real app, you'd call Twilio/Meta API here to send the reply - res.json({ - success: true, - reply: response.reply, - buttons: response.buttons || [] - }); + if (!from || !body) { + return res.status(400).send("Missing from or body"); + } + + try { + const temporalClient = await getTemporalClient(); + // Use the phone number as the unique Workflow ID + const workflowId = `booking-${from.replace(/[^a-zA-Z0-9]/g, '')}`; + + let handle; + try { + handle = temporalClient.workflow.getHandle(workflowId); + const desc = await handle.describe(); + if (desc.status.name === 'RUNNING') { + // Ongoing conversation! Send a signal with the new message + console.log(`[WhatsApp Webhook] Signaling existing workflow ${workflowId}`); + await handle.signal('receive_message', body); + + // Twilio expects a valid TwiML response. Empty response means no immediate automated reply. + // Our Temporal worker will asynchronously send a reply back via Twilio API. + res.type('text/xml').send(''); + return; + } + } catch (err) { + // Workflow does not exist. We will start a new one below. + } + + console.log(`[WhatsApp Webhook] Starting new AppointmentBookingWorkflow for ${from}`); + await temporalClient.workflow.start('AppointmentBookingWorkflow', { + args: [body, from], + taskQueue: 'curaflow-tasks', + workflowId: workflowId, + }); + + res.type('text/xml').send(''); + } catch (err) { + console.error('[WhatsApp Webhook] Error processing message:', err); + res.status(500).send('Internal Server Error'); + } }); // AI Scribe Endpoints diff --git a/k8s/app.yaml b/k8s/app.yaml index 6685e84..e609bc1 100644 --- a/k8s/app.yaml +++ b/k8s/app.yaml @@ -24,6 +24,8 @@ spec: env: - name: DATABASE_URL value: "postgres://postgres:curio_secret@curio-db:5432/curio" + - name: TEMPORAL_URL + value: "temporal-frontend.ai-core.svc.cluster.local:7233" livenessProbe: httpGet: path: / diff --git a/mock_whatsapp_client.py b/mock_whatsapp_client.py new file mode 100644 index 0000000..5e6ab78 --- /dev/null +++ b/mock_whatsapp_client.py @@ -0,0 +1,31 @@ +import requests + +PHONE_NUMBER = "whatsapp:+918500176938" +WEBHOOK_URL = "http://localhost:3000/whatsapp/webhook" + +print("========================================") +print("🤖 CuraFlow Autonomous Appointment Agent") +print("========================================") +print("Type your WhatsApp message below to send it to the agent.") +print("The agent will parse your intent and reply directly to your REAL WhatsApp number via Twilio!") +print("Type 'exit' to quit.\n") + +while True: + message = input(f"[{PHONE_NUMBER}] You: ") + if message.lower() == 'exit': + break + + # Simulate Twilio Webhook Payload + data = { + "From": PHONE_NUMBER, + "Body": message + } + + try: + response = requests.post(WEBHOOK_URL, data=data) + if response.status_code == 200: + print("✅ Message sent to Webhook! Check your phone for the agent's reply in a few seconds.") + else: + print(f"❌ Webhook returned {response.status_code}: {response.text}") + except Exception as e: + print(f"❌ Failed to reach webhook: {e}") diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime deleted file mode 100644 index 7751de3..0000000 --- a/node_modules/.bin/mime +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../mime/cli.js" "$@" -else - exec node "$basedir/../mime/cli.js" "$@" -fi diff --git a/node_modules/.bin/mime.cmd b/node_modules/.bin/mime.cmd deleted file mode 100644 index 54491f1..0000000 --- a/node_modules/.bin/mime.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %* diff --git a/node_modules/.bin/mime.ps1 b/node_modules/.bin/mime.ps1 deleted file mode 100644 index 2222f40..0000000 --- a/node_modules/.bin/mime.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../mime/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../mime/cli.js" $args - } else { - & "node$exe" "$basedir/../mime/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/proto-loader-gen-types b/node_modules/.bin/proto-loader-gen-types deleted file mode 100644 index 03c2fcc..0000000 --- a/node_modules/.bin/proto-loader-gen-types +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" "$@" -else - exec node "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" "$@" -fi diff --git a/node_modules/.bin/proto-loader-gen-types.cmd b/node_modules/.bin/proto-loader-gen-types.cmd deleted file mode 100644 index 772529b..0000000 --- a/node_modules/.bin/proto-loader-gen-types.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@grpc\proto-loader\build\bin\proto-loader-gen-types.js" %* diff --git a/node_modules/.bin/proto-loader-gen-types.ps1 b/node_modules/.bin/proto-loader-gen-types.ps1 deleted file mode 100644 index d1db451..0000000 --- a/node_modules/.bin/proto-loader-gen-types.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" $args - } else { - & "$basedir/node$exe" "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" $args - } else { - & "node$exe" "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid deleted file mode 100644 index 26eb018..0000000 --- a/node_modules/.bin/uuid +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../uuid/dist-node/bin/uuid" "$@" -else - exec node "$basedir/../uuid/dist-node/bin/uuid" "$@" -fi diff --git a/node_modules/.bin/uuid.cmd b/node_modules/.bin/uuid.cmd deleted file mode 100644 index 91d932f..0000000 --- a/node_modules/.bin/uuid.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\dist-node\bin\uuid" %* diff --git a/node_modules/.bin/uuid.ps1 b/node_modules/.bin/uuid.ps1 deleted file mode 100644 index 42eab25..0000000 --- a/node_modules/.bin/uuid.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../uuid/dist-node/bin/uuid" $args - } else { - & "$basedir/node$exe" "$basedir/../uuid/dist-node/bin/uuid" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../uuid/dist-node/bin/uuid" $args - } else { - & "node$exe" "$basedir/../uuid/dist-node/bin/uuid" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json deleted file mode 100644 index ab23f9e..0000000 --- a/node_modules/.package-lock.json +++ /dev/null @@ -1,1275 +0,0 @@ -{ - "name": "curaflow-hms", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/@grpc/grpc-js": { - "version": "1.14.4", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.4.tgz", - "integrity": "sha512-k9Dj3DV/itK9D06Y8f190Qgop7/Ui+D0njFV3LHMPwPT75DpXLQohE9Wmz0QElrJnzsjB7KPWiKJbOl7IPDArQ==", - "license": "Apache-2.0", - "dependencies": { - "@grpc/proto-loader": "^0.8.0", - "@js-sdsl/ordered-map": "^4.4.2" - }, - "engines": { - "node": ">=12.10.0" - } - }, - "node_modules/@grpc/proto-loader": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.1.tgz", - "integrity": "sha512-wtF6h+DY6M3YaDBPAmvuuA6jV8Sif9MjtOI5euKFWRgCDl5PeDpPsHR9u2l6St5ceY8AZgoNDww5+HvEsXFsGg==", - "license": "Apache-2.0", - "dependencies": { - "lodash.camelcase": "^4.3.0", - "long": "^5.0.0", - "protobufjs": "^7.5.5", - "yargs": "^17.7.2" - }, - "bin": { - "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@js-sdsl/ordered-map": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", - "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.5.tgz", - "integrity": "sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.1.tgz", - "integrity": "sha512-vW1GmwMZNnL+gMRaovlh9yZX74kc+TTU3FObkkurpMaRtBfLP3ldjS9KQWlwZgraRE0+dheEEoAxdzcJQ8eXZg==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.1.tgz", - "integrity": "sha512-GpptLrs57adMSuHi3VNj0mAF8dwh36LMaYF6XyJ6JMWlVsc+t42tm1HSEDmOs3A8fC9yyeisgLhsTVQokOZ0zw==", - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.2.tgz", - "integrity": "sha512-pa0vFRuws4wkvaXKK1uXZMAwAX4/t8ANaJo45iw/oQHNQ9q5xUzwgFmVJGXiga2BeN+zpX7Vf9vmsiIa2J+MUw==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.1.tgz", - "integrity": "sha512-oOAWABowe8EAbMyWKM0tYDKi8Yaox52D+HWZhAIJqQXbqe0xI/GV7FhLWqlEKreMkfDjshR5FKgi3mnle0h6Eg==", - "license": "BSD-3-Clause" - }, - "node_modules/@temporalio/client": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/@temporalio/client/-/client-1.16.2.tgz", - "integrity": "sha512-SvuFpikonwOSLjedesueh71010h304ub436OA16mHeunQgUfldqtI9ZrHqP9L5jzBxWOxRIKZL52clMjaebSxQ==", - "license": "MIT", - "dependencies": { - "@grpc/grpc-js": "^1.12.4", - "@temporalio/common": "1.16.2", - "@temporalio/proto": "1.16.2", - "abort-controller": "^3.0.0", - "long": "^5.2.3", - "uuid": "^11.1.0" - }, - "engines": { - "node": ">= 20.0.0" - } - }, - "node_modules/@temporalio/client/node_modules/uuid": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz", - "integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/esm/bin/uuid" - } - }, - "node_modules/@temporalio/common": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/@temporalio/common/-/common-1.16.2.tgz", - "integrity": "sha512-Yu62OW85wU3/XDt/xXDxw1lB3bce0xCrrgfd7aJJ5lp7FGzPgIgcC7bu2iIcSZnnCJGF86pnLJb+emo0mwINVg==", - "license": "MIT", - "dependencies": { - "@temporalio/proto": "1.16.2", - "long": "^5.2.3", - "ms": "3.0.0-canary.1", - "nexus-rpc": "^0.0.2", - "proto3-json-serializer": "^2.0.0" - }, - "engines": { - "node": ">= 20.0.0" - } - }, - "node_modules/@temporalio/proto": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/@temporalio/proto/-/proto-1.16.2.tgz", - "integrity": "sha512-KIBlGV38W3HiHsDFSEs33TsXl7I2KcApbuLlBcCKtjHVdl5pzEt1nQpD5szi+y6saIENaXBifmVTELtYh2w7Rw==", - "license": "MIT", - "dependencies": { - "long": "^5.2.3", - "protobufjs": "^7.2.5" - }, - "engines": { - "node": ">= 20.0.0" - } - }, - "node_modules/@types/node": { - "version": "25.9.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.1.tgz", - "integrity": "sha512-xfrlY7UD5rMJk3ZVJP8BNzS28J36YJg+xp+LPXV1TdWxr8uMH5A860QNxYDGQe/ylDSgjxE52Q9VnO7p75tJxg==", - "license": "MIT", - "dependencies": { - "undici-types": ">=7.24.0 <7.24.7" - } - }, - "node_modules/abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "license": "MIT", - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "license": "MIT" - }, - "node_modules/body-parser": { - "version": "1.20.5", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.5.tgz", - "integrity": "sha512-3grm+/2tUOvu2cjJkvsIxrv/wVpfXQW4PsQHYm7yk4vfpu7Ekl6nEsYBoJUL6qDwZUx8wUhQ8tR2qz+ad9c9OA==", - "license": "MIT", - "dependencies": { - "bytes": "~3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "~1.2.0", - "http-errors": "~2.0.1", - "iconv-lite": "~0.4.24", - "on-finished": "~2.4.1", - "qs": "~6.15.1", - "raw-body": "~2.5.3", - "type-is": "~1.6.18", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", - "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", - "license": "MIT" - }, - "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "license": "MIT" - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/encodeurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", - "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", - "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "license": "MIT" - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/express": { - "version": "4.22.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.22.2.tgz", - "integrity": "sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q==", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "~1.20.5", - "content-disposition": "~0.5.4", - "content-type": "~1.0.4", - "cookie": "~0.7.1", - "cookie-signature": "~1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.3.1", - "fresh": "~0.5.2", - "http-errors": "~2.0.0", - "merge-descriptors": "1.0.3", - "methods": "~1.1.2", - "on-finished": "~2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "~0.1.12", - "proxy-addr": "~2.0.7", - "qs": "~6.15.1", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "~0.19.0", - "serve-static": "~1.16.2", - "setprototypeof": "1.2.0", - "statuses": "~2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/finalhandler": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz", - "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "on-finished": "~2.4.1", - "parseurl": "~1.3.3", - "statuses": "~2.0.2", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", - "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/http-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", - "license": "MIT", - "dependencies": { - "depd": "~2.0.0", - "inherits": "~2.0.4", - "setprototypeof": "~1.2.0", - "statuses": "~2.0.2", - "toidentifier": "~1.0.1" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", - "license": "MIT" - }, - "node_modules/long": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", - "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", - "license": "Apache-2.0" - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", - "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/ms": { - "version": "3.0.0-canary.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-3.0.0-canary.1.tgz", - "integrity": "sha512-kh8ARjh8rMN7Du2igDRO9QJnqCb2xYTJxyQYK7vJJS4TvLLmsbyhiKpSW+t+y26gyOyMd0riphX0GeWKU3ky5g==", - "license": "MIT", - "engines": { - "node": ">=12.13" - } - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/nexus-rpc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/nexus-rpc/-/nexus-rpc-0.0.2.tgz", - "integrity": "sha512-IWjIExdVYlmwXuzHdY/Q3lXCv1gbqoAXPazQhy2w4Xgtgha3H0OOujEESVPQcFUFMWm+pAk2gKnb57g8S41JZg==", - "license": "MIT", - "engines": { - "node": ">= 20.0.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/path-to-regexp": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz", - "integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==", - "license": "MIT" - }, - "node_modules/proto3-json-serializer": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-2.0.2.tgz", - "integrity": "sha512-SAzp/O4Yh02jGdRc+uIrGoe87dkN/XtwxfZ4ZyafJHymd79ozp5VG5nyZ7ygqPM5+cpLDjjGnYFUkngonyDPOQ==", - "license": "Apache-2.0", - "dependencies": { - "protobufjs": "^7.2.5" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/protobufjs": { - "version": "7.6.1", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.1.tgz", - "integrity": "sha512-4K0myLaWL5EteuSAro91EGFgcfVgxb64Jx+7oDAY6GOkXD4M69yuSEljNcInGVCA5sOPxmZ/EqDLj2x0Q0+Ygg==", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.5", - "@protobufjs/eventemitter": "^1.1.1", - "@protobufjs/fetch": "^1.1.1", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.2", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.1", - "@types/node": ">=13.7.0", - "long": "^5.3.2" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/qs": { - "version": "6.15.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz", - "integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", - "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", - "license": "MIT", - "dependencies": { - "bytes": "~3.1.2", - "http-errors": "~2.0.1", - "iconv-lite": "~0.4.24", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" - }, - "node_modules/send": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz", - "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "~0.5.2", - "http-errors": "~2.0.1", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "~2.4.1", - "range-parser": "~1.2.1", - "statuses": "~2.0.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/serve-static": { - "version": "1.16.3", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", - "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", - "license": "MIT", - "dependencies": { - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "~0.19.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "license": "ISC" - }, - "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", - "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/statuses": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", - "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/undici-types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", - "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", - "license": "MIT" - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", - "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist-node/bin/uuid" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "license": "ISC", - "engines": { - "node": ">=12" - } - } - } -} diff --git a/node_modules/@grpc/grpc-js/LICENSE b/node_modules/@grpc/grpc-js/LICENSE deleted file mode 100644 index 8dada3e..0000000 --- a/node_modules/@grpc/grpc-js/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/@grpc/grpc-js/README.md b/node_modules/@grpc/grpc-js/README.md deleted file mode 100644 index 7b1ff43..0000000 --- a/node_modules/@grpc/grpc-js/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# Pure JavaScript gRPC Client - -## Installation - -Node 12 is recommended. The exact set of compatible Node versions can be found in the `engines` field of the `package.json` file. - -```sh -npm install @grpc/grpc-js -``` - -## Documentation - -Documentation specifically for the `@grpc/grpc-js` package is currently not available. However, [documentation is available for the `grpc` package](https://grpc.github.io/grpc/node/grpc.html), and the two packages contain mostly the same interface. There are a few notable differences, however, and these differences are noted in the "Migrating from grpc" section below. - -## Features - -- Clients -- Automatic reconnection -- Servers -- Streaming -- Metadata -- Partial compression support: clients can compress and decompress messages, and servers can decompress request messages -- Pick first and round robin load balancing policies -- Client Interceptors -- Connection Keepalives -- HTTP Connect support (proxies) - -If you need a feature from the `grpc` package that is not provided by the `@grpc/grpc-js`, please file a feature request with that information. - -This library does not directly handle `.proto` files. To use `.proto` files with this library we recommend using the `@grpc/proto-loader` package. - -## Migrating from [`grpc`](https://www.npmjs.com/package/grpc) - -`@grpc/grpc-js` is almost a drop-in replacement for `grpc`, but you may need to make a few code changes to use it: - -- If you are currently loading `.proto` files using `grpc.load`, that function is not available in this library. You should instead load your `.proto` files using `@grpc/proto-loader` and load the resulting package definition objects into `@grpc/grpc-js` using `grpc.loadPackageDefinition`. -- If you are currently loading packages generated by `grpc-tools`, you should instead generate your files using the `generate_package_definition` option in `grpc-tools`, then load the object exported by the generated file into `@grpc/grpc-js` using `grpc.loadPackageDefinition`. -- If you have a server and you are using `Server#bind` to bind ports, you will need to use `Server#bindAsync` instead. -- If you are using any channel options supported in `grpc` but not supported in `@grpc/grpc-js`, you may need to adjust your code to handle the different behavior. Refer to [the list of supported options](#supported-channel-options) below. -- Refer to the [detailed package comparison](https://github.com/grpc/grpc-node/blob/master/PACKAGE-COMPARISON.md) for more details on the differences between `grpc` and `@grpc/grpc-js`. - -## Supported Channel Options -Many channel arguments supported in `grpc` are not supported in `@grpc/grpc-js`. The channel arguments supported by `@grpc/grpc-js` are: - - `grpc.ssl_target_name_override` - - `grpc.primary_user_agent` - - `grpc.secondary_user_agent` - - `grpc.default_authority` - - `grpc.keepalive_time_ms` - - `grpc.keepalive_timeout_ms` - - `grpc.keepalive_permit_without_calls` - - `grpc.service_config` - - `grpc.max_concurrent_streams` - - `grpc.initial_reconnect_backoff_ms` - - `grpc.max_reconnect_backoff_ms` - - `grpc.use_local_subchannel_pool` - - `grpc.max_send_message_length` - - `grpc.max_receive_message_length` - - `grpc.enable_http_proxy` - - `grpc.default_compression_algorithm` - - `grpc.enable_channelz` - - `grpc.dns_min_time_between_resolutions_ms` - - `grpc.enable_retries` - - `grpc.max_connection_age_ms` - - `grpc.max_connection_age_grace_ms` - - `grpc.max_connection_idle_ms` - - `grpc.per_rpc_retry_buffer_size` - - `grpc.retry_buffer_size` - - `grpc.service_config_disable_resolution` - - `grpc.client_idle_timeout_ms` - - `grpc-node.max_session_memory` - - `grpc-node.tls_enable_trace` - - `grpc-node.retry_max_attempts_limit` - - `grpc-node.flow_control_window` - - `channelOverride` - - `channelFactoryOverride` - -## Some Notes on API Guarantees - -The public API of this library follows semantic versioning, with some caveats: - -- Some methods are prefixed with an underscore. These methods are internal and should not be considered part of the public API. -- The class `Call` is only exposed due to limitations of TypeScript. It should not be considered part of the public API. -- In general, any API that is exposed by this library but is not exposed by the `grpc` library is likely an error and should not be considered part of the public API. -- The `grpc.experimental` namespace contains APIs that have not stabilized. Any API in that namespace may break in any minor version update. diff --git a/node_modules/@grpc/grpc-js/build/src/admin.d.ts b/node_modules/@grpc/grpc-js/build/src/admin.d.ts deleted file mode 100644 index 92b9bba..0000000 --- a/node_modules/@grpc/grpc-js/build/src/admin.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ServiceDefinition } from './make-client'; -import { Server, UntypedServiceImplementation } from './server'; -interface GetServiceDefinition { - (): ServiceDefinition; -} -interface GetHandlers { - (): UntypedServiceImplementation; -} -export declare function registerAdminService(getServiceDefinition: GetServiceDefinition, getHandlers: GetHandlers): void; -export declare function addAdminServicesToServer(server: Server): void; -export {}; diff --git a/node_modules/@grpc/grpc-js/build/src/admin.js b/node_modules/@grpc/grpc-js/build/src/admin.js deleted file mode 100644 index 6189c52..0000000 --- a/node_modules/@grpc/grpc-js/build/src/admin.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/* - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.registerAdminService = registerAdminService; -exports.addAdminServicesToServer = addAdminServicesToServer; -const registeredAdminServices = []; -function registerAdminService(getServiceDefinition, getHandlers) { - registeredAdminServices.push({ getServiceDefinition, getHandlers }); -} -function addAdminServicesToServer(server) { - for (const { getServiceDefinition, getHandlers } of registeredAdminServices) { - server.addService(getServiceDefinition(), getHandlers()); - } -} -//# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/admin.js.map b/node_modules/@grpc/grpc-js/build/src/admin.js.map deleted file mode 100644 index 44885c5..0000000 --- a/node_modules/@grpc/grpc-js/build/src/admin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/admin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAkBH,oDAKC;AAED,4DAIC;AAhBD,MAAM,uBAAuB,GAGvB,EAAE,CAAC;AAET,SAAgB,oBAAoB,CAClC,oBAA0C,EAC1C,WAAwB;IAExB,uBAAuB,CAAC,IAAI,CAAC,EAAE,oBAAoB,EAAE,WAAW,EAAE,CAAC,CAAC;AACtE,CAAC;AAED,SAAgB,wBAAwB,CAAC,MAAc;IACrD,KAAK,MAAM,EAAE,oBAAoB,EAAE,WAAW,EAAE,IAAI,uBAAuB,EAAE,CAAC;QAC5E,MAAM,CAAC,UAAU,CAAC,oBAAoB,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/auth-context.d.ts b/node_modules/@grpc/grpc-js/build/src/auth-context.d.ts deleted file mode 100644 index f58e923..0000000 --- a/node_modules/@grpc/grpc-js/build/src/auth-context.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { PeerCertificate } from "tls"; -export interface AuthContext { - transportSecurityType?: string; - sslPeerCertificate?: PeerCertificate; -} diff --git a/node_modules/@grpc/grpc-js/build/src/auth-context.js b/node_modules/@grpc/grpc-js/build/src/auth-context.js deleted file mode 100644 index b602f66..0000000 --- a/node_modules/@grpc/grpc-js/build/src/auth-context.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -/* - * Copyright 2025 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=auth-context.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/auth-context.js.map b/node_modules/@grpc/grpc-js/build/src/auth-context.js.map deleted file mode 100644 index 512cbe7..0000000 --- a/node_modules/@grpc/grpc-js/build/src/auth-context.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"auth-context.js","sourceRoot":"","sources":["../../src/auth-context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/backoff-timeout.d.ts b/node_modules/@grpc/grpc-js/build/src/backoff-timeout.d.ts deleted file mode 100644 index 7c41bd7..0000000 --- a/node_modules/@grpc/grpc-js/build/src/backoff-timeout.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -export interface BackoffOptions { - initialDelay?: number; - multiplier?: number; - jitter?: number; - maxDelay?: number; -} -export declare class BackoffTimeout { - private callback; - /** - * The delay time at the start, and after each reset. - */ - private readonly initialDelay; - /** - * The exponential backoff multiplier. - */ - private readonly multiplier; - /** - * The maximum delay time - */ - private readonly maxDelay; - /** - * The maximum fraction by which the delay time can randomly vary after - * applying the multiplier. - */ - private readonly jitter; - /** - * The delay time for the next time the timer runs. - */ - private nextDelay; - /** - * The handle of the underlying timer. If running is false, this value refers - * to an object representing a timer that has ended, but it can still be - * interacted with without error. - */ - private timerId; - /** - * Indicates whether the timer is currently running. - */ - private running; - /** - * Indicates whether the timer should keep the Node process running if no - * other async operation is doing so. - */ - private hasRef; - /** - * The time that the currently running timer was started. Only valid if - * running is true. - */ - private startTime; - /** - * The approximate time that the currently running timer will end. Only valid - * if running is true. - */ - private endTime; - private id; - private static nextId; - constructor(callback: () => void, options?: BackoffOptions); - private static getNextId; - private trace; - private runTimer; - /** - * Call the callback after the current amount of delay time - */ - runOnce(): void; - /** - * Stop the timer. The callback will not be called until `runOnce` is called - * again. - */ - stop(): void; - /** - * Reset the delay time to its initial value. If the timer is still running, - * retroactively apply that reset to the current timer. - */ - reset(): void; - /** - * Check whether the timer is currently running. - */ - isRunning(): boolean; - /** - * Set that while the timer is running, it should keep the Node process - * running. - */ - ref(): void; - /** - * Set that while the timer is running, it should not keep the Node process - * running. - */ - unref(): void; - /** - * Get the approximate timestamp of when the timer will fire. Only valid if - * this.isRunning() is true. - */ - getEndTime(): Date; -} diff --git a/node_modules/@grpc/grpc-js/build/src/backoff-timeout.js b/node_modules/@grpc/grpc-js/build/src/backoff-timeout.js deleted file mode 100644 index b4721f3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/backoff-timeout.js +++ /dev/null @@ -1,191 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BackoffTimeout = void 0; -const constants_1 = require("./constants"); -const logging = require("./logging"); -const TRACER_NAME = 'backoff'; -const INITIAL_BACKOFF_MS = 1000; -const BACKOFF_MULTIPLIER = 1.6; -const MAX_BACKOFF_MS = 120000; -const BACKOFF_JITTER = 0.2; -/** - * Get a number uniformly at random in the range [min, max) - * @param min - * @param max - */ -function uniformRandom(min, max) { - return Math.random() * (max - min) + min; -} -class BackoffTimeout { - constructor(callback, options) { - this.callback = callback; - /** - * The delay time at the start, and after each reset. - */ - this.initialDelay = INITIAL_BACKOFF_MS; - /** - * The exponential backoff multiplier. - */ - this.multiplier = BACKOFF_MULTIPLIER; - /** - * The maximum delay time - */ - this.maxDelay = MAX_BACKOFF_MS; - /** - * The maximum fraction by which the delay time can randomly vary after - * applying the multiplier. - */ - this.jitter = BACKOFF_JITTER; - /** - * Indicates whether the timer is currently running. - */ - this.running = false; - /** - * Indicates whether the timer should keep the Node process running if no - * other async operation is doing so. - */ - this.hasRef = true; - /** - * The time that the currently running timer was started. Only valid if - * running is true. - */ - this.startTime = new Date(); - /** - * The approximate time that the currently running timer will end. Only valid - * if running is true. - */ - this.endTime = new Date(); - this.id = BackoffTimeout.getNextId(); - if (options) { - if (options.initialDelay) { - this.initialDelay = options.initialDelay; - } - if (options.multiplier) { - this.multiplier = options.multiplier; - } - if (options.jitter) { - this.jitter = options.jitter; - } - if (options.maxDelay) { - this.maxDelay = options.maxDelay; - } - } - this.trace('constructed initialDelay=' + this.initialDelay + ' multiplier=' + this.multiplier + ' jitter=' + this.jitter + ' maxDelay=' + this.maxDelay); - this.nextDelay = this.initialDelay; - this.timerId = setTimeout(() => { }, 0); - clearTimeout(this.timerId); - } - static getNextId() { - return this.nextId++; - } - trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, '{' + this.id + '} ' + text); - } - runTimer(delay) { - var _a, _b; - this.trace('runTimer(delay=' + delay + ')'); - this.endTime = this.startTime; - this.endTime.setMilliseconds(this.endTime.getMilliseconds() + delay); - clearTimeout(this.timerId); - this.timerId = setTimeout(() => { - this.trace('timer fired'); - this.running = false; - this.callback(); - }, delay); - if (!this.hasRef) { - (_b = (_a = this.timerId).unref) === null || _b === void 0 ? void 0 : _b.call(_a); - } - } - /** - * Call the callback after the current amount of delay time - */ - runOnce() { - this.trace('runOnce()'); - this.running = true; - this.startTime = new Date(); - this.runTimer(this.nextDelay); - const nextBackoff = Math.min(this.nextDelay * this.multiplier, this.maxDelay); - const jitterMagnitude = nextBackoff * this.jitter; - this.nextDelay = - nextBackoff + uniformRandom(-jitterMagnitude, jitterMagnitude); - } - /** - * Stop the timer. The callback will not be called until `runOnce` is called - * again. - */ - stop() { - this.trace('stop()'); - clearTimeout(this.timerId); - this.running = false; - } - /** - * Reset the delay time to its initial value. If the timer is still running, - * retroactively apply that reset to the current timer. - */ - reset() { - this.trace('reset() running=' + this.running); - this.nextDelay = this.initialDelay; - if (this.running) { - const now = new Date(); - const newEndTime = this.startTime; - newEndTime.setMilliseconds(newEndTime.getMilliseconds() + this.nextDelay); - clearTimeout(this.timerId); - if (now < newEndTime) { - this.runTimer(newEndTime.getTime() - now.getTime()); - } - else { - this.running = false; - } - } - } - /** - * Check whether the timer is currently running. - */ - isRunning() { - return this.running; - } - /** - * Set that while the timer is running, it should keep the Node process - * running. - */ - ref() { - var _a, _b; - this.hasRef = true; - (_b = (_a = this.timerId).ref) === null || _b === void 0 ? void 0 : _b.call(_a); - } - /** - * Set that while the timer is running, it should not keep the Node process - * running. - */ - unref() { - var _a, _b; - this.hasRef = false; - (_b = (_a = this.timerId).unref) === null || _b === void 0 ? void 0 : _b.call(_a); - } - /** - * Get the approximate timestamp of when the timer will fire. Only valid if - * this.isRunning() is true. - */ - getEndTime() { - return this.endTime; - } -} -exports.BackoffTimeout = BackoffTimeout; -BackoffTimeout.nextId = 0; -//# sourceMappingURL=backoff-timeout.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/backoff-timeout.js.map b/node_modules/@grpc/grpc-js/build/src/backoff-timeout.js.map deleted file mode 100644 index a108e38..0000000 --- a/node_modules/@grpc/grpc-js/build/src/backoff-timeout.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"backoff-timeout.js","sourceRoot":"","sources":["../../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AM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;YAClC,UAAU,CAAC,eAAe,CAAC,UAAU,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;YAC1E,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3B,IAAI,GAAG,GAAG,UAAU,EAAE,CAAC;gBACrB,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;YACtD,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACvB,CAAC;QACH,CAAC;IACH,CAAC;IAED;;OAEG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;;OAGG;IACH,GAAG;;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,MAAA,MAAA,IAAI,CAAC,OAAO,EAAC,GAAG,kDAAI,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,KAAK;;QACH,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,MAAA,MAAA,IAAI,CAAC,OAAO,EAAC,KAAK,kDAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;;AAjLH,wCAkLC;AAhIgB,qBAAM,GAAG,CAAC,AAAJ,CAAK"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/call-credentials.d.ts b/node_modules/@grpc/grpc-js/build/src/call-credentials.d.ts deleted file mode 100644 index ecdb3f9..0000000 --- a/node_modules/@grpc/grpc-js/build/src/call-credentials.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Metadata } from './metadata'; -export interface CallMetadataOptions { - method_name: string; - service_url: string; -} -export type CallMetadataGenerator = (options: CallMetadataOptions, cb: (err: Error | null, metadata?: Metadata) => void) => void; -export interface OldOAuth2Client { - getRequestMetadata: (url: string, callback: (err: Error | null, headers?: { - [index: string]: string; - }) => void) => void; -} -export interface CurrentOAuth2Client { - getRequestHeaders: (url?: string) => Promise<{ - [index: string]: string; - }>; -} -export type OAuth2Client = OldOAuth2Client | CurrentOAuth2Client; -/** - * A class that represents a generic method of adding authentication-related - * metadata on a per-request basis. - */ -export declare abstract class CallCredentials { - /** - * Asynchronously generates a new Metadata object. - * @param options Options used in generating the Metadata object. - */ - abstract generateMetadata(options: CallMetadataOptions): Promise; - /** - * Creates a new CallCredentials object from properties of both this and - * another CallCredentials object. This object's metadata generator will be - * called first. - * @param callCredentials The other CallCredentials object. - */ - abstract compose(callCredentials: CallCredentials): CallCredentials; - /** - * Check whether two call credentials objects are equal. Separate - * SingleCallCredentials with identical metadata generator functions are - * equal. - * @param other The other CallCredentials object to compare with. - */ - abstract _equals(other: CallCredentials): boolean; - /** - * Creates a new CallCredentials object from a given function that generates - * Metadata objects. - * @param metadataGenerator A function that accepts a set of options, and - * generates a Metadata object based on these options, which is passed back - * to the caller via a supplied (err, metadata) callback. - */ - static createFromMetadataGenerator(metadataGenerator: CallMetadataGenerator): CallCredentials; - /** - * Create a gRPC credential from a Google credential object. - * @param googleCredentials The authentication client to use. - * @return The resulting CallCredentials object. - */ - static createFromGoogleCredential(googleCredentials: OAuth2Client): CallCredentials; - static createEmpty(): CallCredentials; -} diff --git a/node_modules/@grpc/grpc-js/build/src/call-credentials.js b/node_modules/@grpc/grpc-js/build/src/call-credentials.js deleted file mode 100644 index 67b9266..0000000 --- a/node_modules/@grpc/grpc-js/build/src/call-credentials.js +++ /dev/null @@ -1,153 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CallCredentials = void 0; -const metadata_1 = require("./metadata"); -function isCurrentOauth2Client(client) { - return ('getRequestHeaders' in client && - typeof client.getRequestHeaders === 'function'); -} -/** - * A class that represents a generic method of adding authentication-related - * metadata on a per-request basis. - */ -class CallCredentials { - /** - * Creates a new CallCredentials object from a given function that generates - * Metadata objects. - * @param metadataGenerator A function that accepts a set of options, and - * generates a Metadata object based on these options, which is passed back - * to the caller via a supplied (err, metadata) callback. - */ - static createFromMetadataGenerator(metadataGenerator) { - return new SingleCallCredentials(metadataGenerator); - } - /** - * Create a gRPC credential from a Google credential object. - * @param googleCredentials The authentication client to use. - * @return The resulting CallCredentials object. - */ - static createFromGoogleCredential(googleCredentials) { - return CallCredentials.createFromMetadataGenerator((options, callback) => { - let getHeaders; - if (isCurrentOauth2Client(googleCredentials)) { - getHeaders = googleCredentials.getRequestHeaders(options.service_url); - } - else { - getHeaders = new Promise((resolve, reject) => { - googleCredentials.getRequestMetadata(options.service_url, (err, headers) => { - if (err) { - reject(err); - return; - } - if (!headers) { - reject(new Error('Headers not set by metadata plugin')); - return; - } - resolve(headers); - }); - }); - } - getHeaders.then(headers => { - const metadata = new metadata_1.Metadata(); - for (const key of Object.keys(headers)) { - metadata.add(key, headers[key]); - } - callback(null, metadata); - }, err => { - callback(err); - }); - }); - } - static createEmpty() { - return new EmptyCallCredentials(); - } -} -exports.CallCredentials = CallCredentials; -class ComposedCallCredentials extends CallCredentials { - constructor(creds) { - super(); - this.creds = creds; - } - async generateMetadata(options) { - const base = new metadata_1.Metadata(); - const generated = await Promise.all(this.creds.map(cred => cred.generateMetadata(options))); - for (const gen of generated) { - base.merge(gen); - } - return base; - } - compose(other) { - return new ComposedCallCredentials(this.creds.concat([other])); - } - _equals(other) { - if (this === other) { - return true; - } - if (other instanceof ComposedCallCredentials) { - return this.creds.every((value, index) => value._equals(other.creds[index])); - } - else { - return false; - } - } -} -class SingleCallCredentials extends CallCredentials { - constructor(metadataGenerator) { - super(); - this.metadataGenerator = metadataGenerator; - } - generateMetadata(options) { - return new Promise((resolve, reject) => { - this.metadataGenerator(options, (err, metadata) => { - if (metadata !== undefined) { - resolve(metadata); - } - else { - reject(err); - } - }); - }); - } - compose(other) { - return new ComposedCallCredentials([this, other]); - } - _equals(other) { - if (this === other) { - return true; - } - if (other instanceof SingleCallCredentials) { - return this.metadataGenerator === other.metadataGenerator; - } - else { - return false; - } - } -} -class EmptyCallCredentials extends CallCredentials { - generateMetadata(options) { - return Promise.resolve(new metadata_1.Metadata()); - } - compose(other) { - return other; - } - _equals(other) { - return other instanceof EmptyCallCredentials; - } -} -//# sourceMappingURL=call-credentials.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/call-credentials.js.map b/node_modules/@grpc/grpc-js/build/src/call-credentials.js.map deleted file mode 100644 index 71ad1c3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/call-credentials.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"call-credentials.js","sourceRoot":"","sources":["../../src/call-credentials.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,yCAAsC;AAgCtC,SAAS,qBAAqB,CAC5B,MAAoB;IAEpB,OAAO,CACL,mBAAmB,IAAI,MAAM;QAC7B,OAAO,MAAM,CAAC,iBAAiB,KAAK,UAAU,CAC/C,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAsB,eAAe;IAsBnC;;;;;;OAMG;IACH,MAAM,CAAC,2BAA2B,CAChC,iBAAwC;QAExC,OAAO,IAAI,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;IACtD,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,0BAA0B,CAC/B,iBAA+B;QAE/B,OAAO,eAAe,CAAC,2BAA2B,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE;YACvE,IAAI,UAAgD,CAAC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;YAC/C,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE;gBAChD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;oBAC3B,OAAO,CAAC,QAAQ,CAAC,CAAC;gBACpB,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,GAAG,CAAC,CAAC;gBACd,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,CAAC,KAAsB;QAC5B,OAAO,IAAI,uBAAuB,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,OAAO,CAAC,KAAsB;QAC5B,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,KAAK,YAAY,qBAAqB,EAAE,CAAC;YAC3C,OAAO,IAAI,CAAC,iBAAiB,KAAK,KAAK,CAAC,iBAAiB,CAAC;QAC5D,CAAC;aAAM,CAAC;YACN,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF;AAED,MAAM,oBAAqB,SAAQ,eAAe;IAChD,gBAAgB,CAAC,OAA4B;QAC3C,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,mBAAQ,EAAE,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,CAAC,KAAsB;QAC5B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,CAAC,KAAsB;QAC5B,OAAO,KAAK,YAAY,oBAAoB,CAAC;IAC/C,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/call-interface.d.ts b/node_modules/@grpc/grpc-js/build/src/call-interface.d.ts deleted file mode 100644 index c33a3d7..0000000 --- a/node_modules/@grpc/grpc-js/build/src/call-interface.d.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { AuthContext } from './auth-context'; -import { CallCredentials } from './call-credentials'; -import { Status } from './constants'; -import { Deadline } from './deadline'; -import { Metadata } from './metadata'; -import { ServerSurfaceCall } from './server-call'; -export interface CallStreamOptions { - deadline: Deadline; - flags: number; - host: string; - parentCall: ServerSurfaceCall | null; -} -export type PartialCallStreamOptions = Partial; -export interface StatusObject { - code: Status; - details: string; - metadata: Metadata; -} -export type PartialStatusObject = Pick & { - metadata?: Metadata | null | undefined; -}; -export interface StatusOrOk { - ok: true; - value: T; -} -export interface StatusOrError { - ok: false; - error: StatusObject; -} -export type StatusOr = StatusOrOk | StatusOrError; -export declare function statusOrFromValue(value: T): StatusOr; -export declare function statusOrFromError(error: PartialStatusObject): StatusOr; -export declare const enum WriteFlags { - BufferHint = 1, - NoCompress = 2, - WriteThrough = 4 -} -export interface WriteObject { - message: Buffer; - flags?: number; -} -export interface MetadataListener { - (metadata: Metadata, next: (metadata: Metadata) => void): void; -} -export interface MessageListener { - (message: any, next: (message: any) => void): void; -} -export interface StatusListener { - (status: StatusObject, next: (status: StatusObject) => void): void; -} -export interface FullListener { - onReceiveMetadata: MetadataListener; - onReceiveMessage: MessageListener; - onReceiveStatus: StatusListener; -} -export type Listener = Partial; -/** - * An object with methods for handling the responses to a call. - */ -export interface InterceptingListener { - onReceiveMetadata(metadata: Metadata): void; - onReceiveMessage(message: any): void; - onReceiveStatus(status: StatusObject): void; -} -export declare function isInterceptingListener(listener: Listener | InterceptingListener): listener is InterceptingListener; -export declare class InterceptingListenerImpl implements InterceptingListener { - private listener; - private nextListener; - private processingMetadata; - private hasPendingMessage; - private pendingMessage; - private processingMessage; - private pendingStatus; - constructor(listener: FullListener, nextListener: InterceptingListener); - private processPendingMessage; - private processPendingStatus; - onReceiveMetadata(metadata: Metadata): void; - onReceiveMessage(message: any): void; - onReceiveStatus(status: StatusObject): void; -} -export interface WriteCallback { - (error?: Error | null): void; -} -export interface MessageContext { - callback?: WriteCallback; - flags?: number; -} -export interface Call { - cancelWithStatus(status: Status, details: string): void; - getPeer(): string; - start(metadata: Metadata, listener: InterceptingListener): void; - sendMessageWithContext(context: MessageContext, message: Buffer): void; - startRead(): void; - halfClose(): void; - getCallNumber(): number; - setCredentials(credentials: CallCredentials): void; - getAuthContext(): AuthContext | null; -} -export interface DeadlineInfoProvider { - getDeadlineInfo(): string[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/call-interface.js b/node_modules/@grpc/grpc-js/build/src/call-interface.js deleted file mode 100644 index 88abb51..0000000 --- a/node_modules/@grpc/grpc-js/build/src/call-interface.js +++ /dev/null @@ -1,100 +0,0 @@ -"use strict"; -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InterceptingListenerImpl = void 0; -exports.statusOrFromValue = statusOrFromValue; -exports.statusOrFromError = statusOrFromError; -exports.isInterceptingListener = isInterceptingListener; -const metadata_1 = require("./metadata"); -function statusOrFromValue(value) { - return { - ok: true, - value: value - }; -} -function statusOrFromError(error) { - var _a; - return { - ok: false, - error: Object.assign(Object.assign({}, error), { metadata: (_a = error.metadata) !== null && _a !== void 0 ? _a : new metadata_1.Metadata() }) - }; -} -function isInterceptingListener(listener) { - return (listener.onReceiveMetadata !== undefined && - listener.onReceiveMetadata.length === 1); -} -class InterceptingListenerImpl { - constructor(listener, nextListener) { - this.listener = listener; - this.nextListener = nextListener; - this.processingMetadata = false; - this.hasPendingMessage = false; - this.processingMessage = false; - this.pendingStatus = null; - } - processPendingMessage() { - if (this.hasPendingMessage) { - this.nextListener.onReceiveMessage(this.pendingMessage); - this.pendingMessage = null; - this.hasPendingMessage = false; - } - } - processPendingStatus() { - if (this.pendingStatus) { - this.nextListener.onReceiveStatus(this.pendingStatus); - } - } - onReceiveMetadata(metadata) { - this.processingMetadata = true; - this.listener.onReceiveMetadata(metadata, metadata => { - this.processingMetadata = false; - this.nextListener.onReceiveMetadata(metadata); - this.processPendingMessage(); - this.processPendingStatus(); - }); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onReceiveMessage(message) { - /* If this listener processes messages asynchronously, the last message may - * be reordered with respect to the status */ - this.processingMessage = true; - this.listener.onReceiveMessage(message, msg => { - this.processingMessage = false; - if (this.processingMetadata) { - this.pendingMessage = msg; - this.hasPendingMessage = true; - } - else { - this.nextListener.onReceiveMessage(msg); - this.processPendingStatus(); - } - }); - } - onReceiveStatus(status) { - this.listener.onReceiveStatus(status, processedStatus => { - if (this.processingMetadata || this.processingMessage) { - this.pendingStatus = processedStatus; - } - else { - this.nextListener.onReceiveStatus(processedStatus); - } - }); - } -} -exports.InterceptingListenerImpl = InterceptingListenerImpl; -//# sourceMappingURL=call-interface.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/call-interface.js.map b/node_modules/@grpc/grpc-js/build/src/call-interface.js.map deleted file mode 100644 index ccf8fdd..0000000 --- a/node_modules/@grpc/grpc-js/build/src/call-interface.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"call-interface.js","sourceRoot":"","sources":["../../src/call-interface.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAwCH,8CAKC;AAED,8CAQC;AA4CD,wDAOC;AApGD,yCAAsC;AAkCtC,SAAgB,iBAAiB,CAAI,KAAQ;IAC3C,OAAO;QACL,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,KAAK;KACb,CAAC;AACJ,CAAC;AAED,SAAgB,iBAAiB,CAAI,KAA0B;;IAC7D,OAAO;QACL,EAAE,EAAE,KAAK;QACT,KAAK,kCACA,KAAK,KACR,QAAQ,EAAE,MAAA,KAAK,CAAC,QAAQ,mCAAI,IAAI,mBAAQ,EAAE,GAC3C;KACF,CAAC;AACJ,C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AgB,CAAC,OAAY;QAC3B;qDAC6C;QAC7C,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE;YAC5C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;YAC/B,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBAC5B,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC;gBAC1B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;YAChC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;gBACxC,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IACD,eAAe,CAAC,MAAoB;QAClC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,MAAM,EAAE,eAAe,CAAC,EAAE;YACtD,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACtD,IAAI,CAAC,aAAa,GAAG,eAAe,CAAC;YACvC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;YACrD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA3DD,4DA2DC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/call-number.d.ts b/node_modules/@grpc/grpc-js/build/src/call-number.d.ts deleted file mode 100644 index a679ff6..0000000 --- a/node_modules/@grpc/grpc-js/build/src/call-number.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function getNextCallNumber(): number; diff --git a/node_modules/@grpc/grpc-js/build/src/call-number.js b/node_modules/@grpc/grpc-js/build/src/call-number.js deleted file mode 100644 index ed8bcdf..0000000 --- a/node_modules/@grpc/grpc-js/build/src/call-number.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getNextCallNumber = getNextCallNumber; -let nextCallNumber = 0; -function getNextCallNumber() { - return nextCallNumber++; -} -//# sourceMappingURL=call-number.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/call-number.js.map b/node_modules/@grpc/grpc-js/build/src/call-number.js.map deleted file mode 100644 index 7d3a9ae..0000000 --- a/node_modules/@grpc/grpc-js/build/src/call-number.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"call-number.js","sourceRoot":"","sources":["../../src/call-number.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAIH,8CAEC;AAJD,IAAI,cAAc,GAAG,CAAC,CAAC;AAEvB,SAAgB,iBAAiB;IAC/B,OAAO,cAAc,EAAE,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/call.d.ts b/node_modules/@grpc/grpc-js/build/src/call.d.ts deleted file mode 100644 index 7fac22a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/call.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { EventEmitter } from 'events'; -import { Duplex, Readable, Writable } from 'stream'; -import { StatusObject } from './call-interface'; -import { EmitterAugmentation1 } from './events'; -import { Metadata } from './metadata'; -import { ObjectReadable, ObjectWritable, WriteCallback } from './object-stream'; -import { InterceptingCallInterface } from './client-interceptors'; -import { AuthContext } from './auth-context'; -/** - * A type extending the built-in Error object with additional fields. - */ -export type ServiceError = StatusObject & Error; -/** - * A base type for all user-facing values returned by client-side method calls. - */ -export type SurfaceCall = { - call?: InterceptingCallInterface; - cancel(): void; - getPeer(): string; - getAuthContext(): AuthContext | null; -} & EmitterAugmentation1<'metadata', Metadata> & EmitterAugmentation1<'status', StatusObject> & EventEmitter; -/** - * A type representing the return value of a unary method call. - */ -export type ClientUnaryCall = SurfaceCall; -/** - * A type representing the return value of a server stream method call. - */ -export type ClientReadableStream = { - deserialize: (chunk: Buffer) => ResponseType; -} & SurfaceCall & ObjectReadable; -/** - * A type representing the return value of a client stream method call. - */ -export type ClientWritableStream = { - serialize: (value: RequestType) => Buffer; -} & SurfaceCall & ObjectWritable; -/** - * A type representing the return value of a bidirectional stream method call. - */ -export type ClientDuplexStream = ClientWritableStream & ClientReadableStream; -/** - * Construct a ServiceError from a StatusObject. This function exists primarily - * as an attempt to make the error stack trace clearly communicate that the - * error is not necessarily a problem in gRPC itself. - * @param status - */ -export declare function callErrorFromStatus(status: StatusObject, callerStack: string): ServiceError; -export declare class ClientUnaryCallImpl extends EventEmitter implements ClientUnaryCall { - call?: InterceptingCallInterface; - constructor(); - cancel(): void; - getPeer(): string; - getAuthContext(): AuthContext | null; -} -export declare class ClientReadableStreamImpl extends Readable implements ClientReadableStream { - readonly deserialize: (chunk: Buffer) => ResponseType; - call?: InterceptingCallInterface; - constructor(deserialize: (chunk: Buffer) => ResponseType); - cancel(): void; - getPeer(): string; - getAuthContext(): AuthContext | null; - _read(_size: number): void; -} -export declare class ClientWritableStreamImpl extends Writable implements ClientWritableStream { - readonly serialize: (value: RequestType) => Buffer; - call?: InterceptingCallInterface; - constructor(serialize: (value: RequestType) => Buffer); - cancel(): void; - getPeer(): string; - getAuthContext(): AuthContext | null; - _write(chunk: RequestType, encoding: string, cb: WriteCallback): void; - _final(cb: Function): void; -} -export declare class ClientDuplexStreamImpl extends Duplex implements ClientDuplexStream { - readonly serialize: (value: RequestType) => Buffer; - readonly deserialize: (chunk: Buffer) => ResponseType; - call?: InterceptingCallInterface; - constructor(serialize: (value: RequestType) => Buffer, deserialize: (chunk: Buffer) => ResponseType); - cancel(): void; - getPeer(): string; - getAuthContext(): AuthContext | null; - _read(_size: number): void; - _write(chunk: RequestType, encoding: string, cb: WriteCallback): void; - _final(cb: Function): void; -} diff --git a/node_modules/@grpc/grpc-js/build/src/call.js b/node_modules/@grpc/grpc-js/build/src/call.js deleted file mode 100644 index ff6d179..0000000 --- a/node_modules/@grpc/grpc-js/build/src/call.js +++ /dev/null @@ -1,152 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ClientDuplexStreamImpl = exports.ClientWritableStreamImpl = exports.ClientReadableStreamImpl = exports.ClientUnaryCallImpl = void 0; -exports.callErrorFromStatus = callErrorFromStatus; -const events_1 = require("events"); -const stream_1 = require("stream"); -const constants_1 = require("./constants"); -/** - * Construct a ServiceError from a StatusObject. This function exists primarily - * as an attempt to make the error stack trace clearly communicate that the - * error is not necessarily a problem in gRPC itself. - * @param status - */ -function callErrorFromStatus(status, callerStack) { - const message = `${status.code} ${constants_1.Status[status.code]}: ${status.details}`; - const error = new Error(message); - const stack = `${error.stack}\nfor call at\n${callerStack}`; - return Object.assign(new Error(message), status, { stack }); -} -class ClientUnaryCallImpl extends events_1.EventEmitter { - constructor() { - super(); - } - cancel() { - var _a; - (_a = this.call) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled on client'); - } - getPeer() { - var _a, _b; - return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : 'unknown'; - } - getAuthContext() { - var _a, _b; - return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getAuthContext()) !== null && _b !== void 0 ? _b : null; - } -} -exports.ClientUnaryCallImpl = ClientUnaryCallImpl; -class ClientReadableStreamImpl extends stream_1.Readable { - constructor(deserialize) { - super({ objectMode: true }); - this.deserialize = deserialize; - } - cancel() { - var _a; - (_a = this.call) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled on client'); - } - getPeer() { - var _a, _b; - return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : 'unknown'; - } - getAuthContext() { - var _a, _b; - return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getAuthContext()) !== null && _b !== void 0 ? _b : null; - } - _read(_size) { - var _a; - (_a = this.call) === null || _a === void 0 ? void 0 : _a.startRead(); - } -} -exports.ClientReadableStreamImpl = ClientReadableStreamImpl; -class ClientWritableStreamImpl extends stream_1.Writable { - constructor(serialize) { - super({ objectMode: true }); - this.serialize = serialize; - } - cancel() { - var _a; - (_a = this.call) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled on client'); - } - getPeer() { - var _a, _b; - return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : 'unknown'; - } - getAuthContext() { - var _a, _b; - return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getAuthContext()) !== null && _b !== void 0 ? _b : null; - } - _write(chunk, encoding, cb) { - var _a; - const context = { - callback: cb, - }; - const flags = Number(encoding); - if (!Number.isNaN(flags)) { - context.flags = flags; - } - (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendMessageWithContext(context, chunk); - } - _final(cb) { - var _a; - (_a = this.call) === null || _a === void 0 ? void 0 : _a.halfClose(); - cb(); - } -} -exports.ClientWritableStreamImpl = ClientWritableStreamImpl; -class ClientDuplexStreamImpl extends stream_1.Duplex { - constructor(serialize, deserialize) { - super({ objectMode: true }); - this.serialize = serialize; - this.deserialize = deserialize; - } - cancel() { - var _a; - (_a = this.call) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled on client'); - } - getPeer() { - var _a, _b; - return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : 'unknown'; - } - getAuthContext() { - var _a, _b; - return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getAuthContext()) !== null && _b !== void 0 ? _b : null; - } - _read(_size) { - var _a; - (_a = this.call) === null || _a === void 0 ? void 0 : _a.startRead(); - } - _write(chunk, encoding, cb) { - var _a; - const context = { - callback: cb, - }; - const flags = Number(encoding); - if (!Number.isNaN(flags)) { - context.flags = flags; - } - (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendMessageWithContext(context, chunk); - } - _final(cb) { - var _a; - (_a = this.call) === null || _a === void 0 ? void 0 : _a.halfClose(); - cb(); - } -} -exports.ClientDuplexStreamImpl = ClientDuplexStreamImpl; -//# sourceMappingURL=call.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/call.js.map b/node_modules/@grpc/grpc-js/build/src/call.js.map deleted file mode 100644 index 0b0689d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/call.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"call.js","sourceRoot":"","sources":["../../src/call.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AA+DH,kDAQC;AArED,mCAAsC;AACtC,mCAAoD;AAGpD,2CAAqC;AAmDrC;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,MAAoB,EACpB,WAAmB;IAEnB,MAAM,OAAO,GAAG,GAAG,MAAM,CAAC,IAAI,IAAI,kBAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,OAAO,EAAE,CAAC;IAC3E,MAAM,KAA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AiC;IAGvD,CAAC;IAED,MAAM;;QACJ,MAAA,IAAI,CAAC,IAAI,0CAAE,gBAAgB,CAAC,kBAAM,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;IACvE,CAAC;IAED,OAAO;;QACL,OAAO,MAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,OAAO,EAAE,mCAAI,SAAS,CAAC;IAC3C,CAAC;IAED,cAAc;;QACZ,OAAO,MAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,cAAc,EAAE,mCAAI,IAAI,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,KAAa;;QACjB,MAAA,IAAI,CAAC,IAAI,0CAAE,SAAS,EAAE,CAAC;IACzB,CAAC;IAED,MAAM,CAAC,KAAkB,EAAE,QAAgB,EAAE,EAAiB;;QAC5D,MAAM,OAAO,GAAmB;YAC9B,QAAQ,EAAE,EAAE;SACb,CAAC;QACF,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC/B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;QACxB,CAAC;QACD,MAAA,IAAI,CAAC,IAAI,0CAAE,sBAAsB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CAAC,EAAY;;QACjB,MAAA,IAAI,CAAC,IAAI,0CAAE,SAAS,EAAE,CAAC;QACvB,EAAE,EAAE,CAAC;IACP,CAAC;CACF;AA3CD,wDA2CC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/certificate-provider.d.ts b/node_modules/@grpc/grpc-js/build/src/certificate-provider.d.ts deleted file mode 100644 index d0ddf3e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/certificate-provider.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -export interface CaCertificateUpdate { - caCertificate: Buffer; -} -export interface IdentityCertificateUpdate { - certificate: Buffer; - privateKey: Buffer; -} -export interface CaCertificateUpdateListener { - (update: CaCertificateUpdate | null): void; -} -export interface IdentityCertificateUpdateListener { - (update: IdentityCertificateUpdate | null): void; -} -export interface CertificateProvider { - addCaCertificateListener(listener: CaCertificateUpdateListener): void; - removeCaCertificateListener(listener: CaCertificateUpdateListener): void; - addIdentityCertificateListener(listener: IdentityCertificateUpdateListener): void; - removeIdentityCertificateListener(listener: IdentityCertificateUpdateListener): void; -} -export interface FileWatcherCertificateProviderConfig { - certificateFile?: string | undefined; - privateKeyFile?: string | undefined; - caCertificateFile?: string | undefined; - refreshIntervalMs: number; -} -export declare class FileWatcherCertificateProvider implements CertificateProvider { - private config; - private refreshTimer; - private fileResultPromise; - private latestCaUpdate; - private caListeners; - private latestIdentityUpdate; - private identityListeners; - private lastUpdateTime; - constructor(config: FileWatcherCertificateProviderConfig); - private updateCertificates; - private maybeStartWatchingFiles; - private maybeStopWatchingFiles; - addCaCertificateListener(listener: CaCertificateUpdateListener): void; - removeCaCertificateListener(listener: CaCertificateUpdateListener): void; - addIdentityCertificateListener(listener: IdentityCertificateUpdateListener): void; - removeIdentityCertificateListener(listener: IdentityCertificateUpdateListener): void; -} diff --git a/node_modules/@grpc/grpc-js/build/src/certificate-provider.js b/node_modules/@grpc/grpc-js/build/src/certificate-provider.js deleted file mode 100644 index 75cd0f8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/certificate-provider.js +++ /dev/null @@ -1,141 +0,0 @@ -"use strict"; -/* - * Copyright 2024 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FileWatcherCertificateProvider = void 0; -const fs = require("fs"); -const logging = require("./logging"); -const constants_1 = require("./constants"); -const util_1 = require("util"); -const TRACER_NAME = 'certificate_provider'; -function trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text); -} -const readFilePromise = (0, util_1.promisify)(fs.readFile); -class FileWatcherCertificateProvider { - constructor(config) { - this.config = config; - this.refreshTimer = null; - this.fileResultPromise = null; - this.latestCaUpdate = undefined; - this.caListeners = new Set(); - this.latestIdentityUpdate = undefined; - this.identityListeners = new Set(); - this.lastUpdateTime = null; - if ((config.certificateFile === undefined) !== (config.privateKeyFile === undefined)) { - throw new Error('certificateFile and privateKeyFile must be set or unset together'); - } - if (config.certificateFile === undefined && config.caCertificateFile === undefined) { - throw new Error('At least one of certificateFile and caCertificateFile must be set'); - } - trace('File watcher constructed with config ' + JSON.stringify(config)); - } - updateCertificates() { - if (this.fileResultPromise) { - return; - } - this.fileResultPromise = Promise.allSettled([ - this.config.certificateFile ? readFilePromise(this.config.certificateFile) : Promise.reject(), - this.config.privateKeyFile ? readFilePromise(this.config.privateKeyFile) : Promise.reject(), - this.config.caCertificateFile ? readFilePromise(this.config.caCertificateFile) : Promise.reject() - ]); - this.fileResultPromise.then(([certificateResult, privateKeyResult, caCertificateResult]) => { - if (!this.refreshTimer) { - return; - } - trace('File watcher read certificates certificate ' + certificateResult.status + ', privateKey ' + privateKeyResult.status + ', CA certificate ' + caCertificateResult.status); - this.lastUpdateTime = new Date(); - this.fileResultPromise = null; - if (certificateResult.status === 'fulfilled' && privateKeyResult.status === 'fulfilled') { - this.latestIdentityUpdate = { - certificate: certificateResult.value, - privateKey: privateKeyResult.value - }; - } - else { - this.latestIdentityUpdate = null; - } - if (caCertificateResult.status === 'fulfilled') { - this.latestCaUpdate = { - caCertificate: caCertificateResult.value - }; - } - else { - this.latestCaUpdate = null; - } - for (const listener of this.identityListeners) { - listener(this.latestIdentityUpdate); - } - for (const listener of this.caListeners) { - listener(this.latestCaUpdate); - } - }); - trace('File watcher initiated certificate update'); - } - maybeStartWatchingFiles() { - if (!this.refreshTimer) { - /* Perform the first read immediately, but only if there was not already - * a recent read, to avoid reading from the filesystem significantly more - * frequently than configured if the provider quickly switches between - * used and unused. */ - const timeSinceLastUpdate = this.lastUpdateTime ? (new Date()).getTime() - this.lastUpdateTime.getTime() : Infinity; - if (timeSinceLastUpdate > this.config.refreshIntervalMs) { - this.updateCertificates(); - } - if (timeSinceLastUpdate > this.config.refreshIntervalMs * 2) { - // Clear out old updates if they are definitely stale - this.latestCaUpdate = undefined; - this.latestIdentityUpdate = undefined; - } - this.refreshTimer = setInterval(() => this.updateCertificates(), this.config.refreshIntervalMs); - trace('File watcher started watching'); - } - } - maybeStopWatchingFiles() { - if (this.caListeners.size === 0 && this.identityListeners.size === 0) { - this.fileResultPromise = null; - if (this.refreshTimer) { - clearInterval(this.refreshTimer); - this.refreshTimer = null; - } - } - } - addCaCertificateListener(listener) { - this.caListeners.add(listener); - this.maybeStartWatchingFiles(); - if (this.latestCaUpdate !== undefined) { - process.nextTick(listener, this.latestCaUpdate); - } - } - removeCaCertificateListener(listener) { - this.caListeners.delete(listener); - this.maybeStopWatchingFiles(); - } - addIdentityCertificateListener(listener) { - this.identityListeners.add(listener); - this.maybeStartWatchingFiles(); - if (this.latestIdentityUpdate !== undefined) { - process.nextTick(listener, this.latestIdentityUpdate); - } - } - removeIdentityCertificateListener(listener) { - this.identityListeners.delete(listener); - this.maybeStopWatchingFiles(); - } -} -exports.FileWatcherCertificateProvider = FileWatcherCertificateProvider; -//# sourceMappingURL=certificate-provider.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/certificate-provider.js.map b/node_modules/@grpc/grpc-js/build/src/certificate-provider.js.map deleted file mode 100644 index 390b450..0000000 --- a/node_modules/@grpc/grpc-js/build/src/certificate-provider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"certificate-provider.js","sourceRoot":"","sources":["../../src/certificate-provider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;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AC;CACF;AAlHD,wEAkHC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/channel-credentials.d.ts b/node_modules/@grpc/grpc-js/build/src/channel-credentials.d.ts deleted file mode 100644 index 3935757..0000000 --- a/node_modules/@grpc/grpc-js/build/src/channel-credentials.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { PeerCertificate, SecureContext } from 'tls'; -import { CallCredentials } from './call-credentials'; -import { CertificateProvider } from './certificate-provider'; -import { Socket } from 'net'; -import { ChannelOptions } from './channel-options'; -import { GrpcUri } from './uri-parser'; -/** - * A callback that will receive the expected hostname and presented peer - * certificate as parameters. The callback should return an error to - * indicate that the presented certificate is considered invalid and - * otherwise returned undefined. - */ -export type CheckServerIdentityCallback = (hostname: string, cert: PeerCertificate) => Error | undefined; -/** - * Additional peer verification options that can be set when creating - * SSL credentials. - */ -export interface VerifyOptions { - /** - * If set, this callback will be invoked after the usual hostname verification - * has been performed on the peer certificate. - */ - checkServerIdentity?: CheckServerIdentityCallback; - rejectUnauthorized?: boolean; -} -export interface SecureConnectResult { - socket: Socket; - secure: boolean; -} -export interface SecureConnector { - connect(socket: Socket): Promise; - waitForReady(): Promise; - getCallCredentials(): CallCredentials; - destroy(): void; -} -/** - * A class that contains credentials for communicating over a channel, as well - * as a set of per-call credentials, which are applied to every method call made - * over a channel initialized with an instance of this class. - */ -export declare abstract class ChannelCredentials { - /** - * Returns a copy of this object with the included set of per-call credentials - * expanded to include callCredentials. - * @param callCredentials A CallCredentials object to associate with this - * instance. - */ - compose(callCredentials: CallCredentials): ChannelCredentials; - /** - * Indicates whether this credentials object creates a secure channel. - */ - abstract _isSecure(): boolean; - /** - * Check whether two channel credentials objects are equal. Two secure - * credentials are equal if they were constructed with the same parameters. - * @param other The other ChannelCredentials Object - */ - abstract _equals(other: ChannelCredentials): boolean; - abstract _createSecureConnector(channelTarget: GrpcUri, options: ChannelOptions, callCredentials?: CallCredentials): SecureConnector; - /** - * Return a new ChannelCredentials instance with a given set of credentials. - * The resulting instance can be used to construct a Channel that communicates - * over TLS. - * @param rootCerts The root certificate data. - * @param privateKey The client certificate private key, if available. - * @param certChain The client certificate key chain, if available. - * @param verifyOptions Additional options to modify certificate verification - */ - static createSsl(rootCerts?: Buffer | null, privateKey?: Buffer | null, certChain?: Buffer | null, verifyOptions?: VerifyOptions): ChannelCredentials; - /** - * Return a new ChannelCredentials instance with credentials created using - * the provided secureContext. The resulting instances can be used to - * construct a Channel that communicates over TLS. gRPC will not override - * anything in the provided secureContext, so the environment variables - * GRPC_SSL_CIPHER_SUITES and GRPC_DEFAULT_SSL_ROOTS_FILE_PATH will - * not be applied. - * @param secureContext The return value of tls.createSecureContext() - * @param verifyOptions Additional options to modify certificate verification - */ - static createFromSecureContext(secureContext: SecureContext, verifyOptions?: VerifyOptions): ChannelCredentials; - /** - * Return a new ChannelCredentials instance with no credentials. - */ - static createInsecure(): ChannelCredentials; -} -declare class CertificateProviderChannelCredentialsImpl extends ChannelCredentials { - private caCertificateProvider; - private identityCertificateProvider; - private verifyOptions; - private refcount; - /** - * `undefined` means that the certificates have not yet been loaded. `null` - * means that an attempt to load them has completed, and has failed. - */ - private latestCaUpdate; - /** - * `undefined` means that the certificates have not yet been loaded. `null` - * means that an attempt to load them has completed, and has failed. - */ - private latestIdentityUpdate; - private caCertificateUpdateListener; - private identityCertificateUpdateListener; - private secureContextWatchers; - private static SecureConnectorImpl; - constructor(caCertificateProvider: CertificateProvider, identityCertificateProvider: CertificateProvider | null, verifyOptions: VerifyOptions); - _isSecure(): boolean; - _equals(other: ChannelCredentials): boolean; - private ref; - private unref; - _createSecureConnector(channelTarget: GrpcUri, options: ChannelOptions, callCredentials?: CallCredentials): SecureConnector; - private maybeUpdateWatchers; - private handleCaCertificateUpdate; - private handleIdentityCertitificateUpdate; - private hasReceivedUpdates; - private getSecureContext; - private getLatestSecureContext; -} -export declare function createCertificateProviderChannelCredentials(caCertificateProvider: CertificateProvider, identityCertificateProvider: CertificateProvider | null, verifyOptions?: VerifyOptions): CertificateProviderChannelCredentialsImpl; -export {}; diff --git a/node_modules/@grpc/grpc-js/build/src/channel-credentials.js b/node_modules/@grpc/grpc-js/build/src/channel-credentials.js deleted file mode 100644 index 9be5ea3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/channel-credentials.js +++ /dev/null @@ -1,430 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChannelCredentials = void 0; -exports.createCertificateProviderChannelCredentials = createCertificateProviderChannelCredentials; -const tls_1 = require("tls"); -const call_credentials_1 = require("./call-credentials"); -const tls_helpers_1 = require("./tls-helpers"); -const uri_parser_1 = require("./uri-parser"); -const resolver_1 = require("./resolver"); -const logging_1 = require("./logging"); -const constants_1 = require("./constants"); -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function verifyIsBufferOrNull(obj, friendlyName) { - if (obj && !(obj instanceof Buffer)) { - throw new TypeError(`${friendlyName}, if provided, must be a Buffer.`); - } -} -/** - * A class that contains credentials for communicating over a channel, as well - * as a set of per-call credentials, which are applied to every method call made - * over a channel initialized with an instance of this class. - */ -class ChannelCredentials { - /** - * Returns a copy of this object with the included set of per-call credentials - * expanded to include callCredentials. - * @param callCredentials A CallCredentials object to associate with this - * instance. - */ - compose(callCredentials) { - return new ComposedChannelCredentialsImpl(this, callCredentials); - } - /** - * Return a new ChannelCredentials instance with a given set of credentials. - * The resulting instance can be used to construct a Channel that communicates - * over TLS. - * @param rootCerts The root certificate data. - * @param privateKey The client certificate private key, if available. - * @param certChain The client certificate key chain, if available. - * @param verifyOptions Additional options to modify certificate verification - */ - static createSsl(rootCerts, privateKey, certChain, verifyOptions) { - var _a; - verifyIsBufferOrNull(rootCerts, 'Root certificate'); - verifyIsBufferOrNull(privateKey, 'Private key'); - verifyIsBufferOrNull(certChain, 'Certificate chain'); - if (privateKey && !certChain) { - throw new Error('Private key must be given with accompanying certificate chain'); - } - if (!privateKey && certChain) { - throw new Error('Certificate chain must be given with accompanying private key'); - } - const secureContext = (0, tls_1.createSecureContext)({ - ca: (_a = rootCerts !== null && rootCerts !== void 0 ? rootCerts : (0, tls_helpers_1.getDefaultRootsData)()) !== null && _a !== void 0 ? _a : undefined, - key: privateKey !== null && privateKey !== void 0 ? privateKey : undefined, - cert: certChain !== null && certChain !== void 0 ? certChain : undefined, - ciphers: tls_helpers_1.CIPHER_SUITES, - }); - return new SecureChannelCredentialsImpl(secureContext, verifyOptions !== null && verifyOptions !== void 0 ? verifyOptions : {}); - } - /** - * Return a new ChannelCredentials instance with credentials created using - * the provided secureContext. The resulting instances can be used to - * construct a Channel that communicates over TLS. gRPC will not override - * anything in the provided secureContext, so the environment variables - * GRPC_SSL_CIPHER_SUITES and GRPC_DEFAULT_SSL_ROOTS_FILE_PATH will - * not be applied. - * @param secureContext The return value of tls.createSecureContext() - * @param verifyOptions Additional options to modify certificate verification - */ - static createFromSecureContext(secureContext, verifyOptions) { - return new SecureChannelCredentialsImpl(secureContext, verifyOptions !== null && verifyOptions !== void 0 ? verifyOptions : {}); - } - /** - * Return a new ChannelCredentials instance with no credentials. - */ - static createInsecure() { - return new InsecureChannelCredentialsImpl(); - } -} -exports.ChannelCredentials = ChannelCredentials; -class InsecureChannelCredentialsImpl extends ChannelCredentials { - constructor() { - super(); - } - compose(callCredentials) { - throw new Error('Cannot compose insecure credentials'); - } - _isSecure() { - return false; - } - _equals(other) { - return other instanceof InsecureChannelCredentialsImpl; - } - _createSecureConnector(channelTarget, options, callCredentials) { - return { - connect(socket) { - return Promise.resolve({ - socket, - secure: false - }); - }, - waitForReady: () => { - return Promise.resolve(); - }, - getCallCredentials: () => { - return callCredentials !== null && callCredentials !== void 0 ? callCredentials : call_credentials_1.CallCredentials.createEmpty(); - }, - destroy() { } - }; - } -} -function getConnectionOptions(secureContext, verifyOptions, channelTarget, options) { - var _a, _b; - const connectionOptions = { - secureContext: secureContext - }; - let realTarget = channelTarget; - if ('grpc.http_connect_target' in options) { - const parsedTarget = (0, uri_parser_1.parseUri)(options['grpc.http_connect_target']); - if (parsedTarget) { - realTarget = parsedTarget; - } - } - const targetPath = (0, resolver_1.getDefaultAuthority)(realTarget); - const hostPort = (0, uri_parser_1.splitHostPort)(targetPath); - const remoteHost = (_a = hostPort === null || hostPort === void 0 ? void 0 : hostPort.host) !== null && _a !== void 0 ? _a : targetPath; - connectionOptions.host = remoteHost; - if (verifyOptions.checkServerIdentity) { - connectionOptions.checkServerIdentity = verifyOptions.checkServerIdentity; - } - if (verifyOptions.rejectUnauthorized !== undefined) { - connectionOptions.rejectUnauthorized = verifyOptions.rejectUnauthorized; - } - connectionOptions.ALPNProtocols = ['h2']; - if (options['grpc.ssl_target_name_override']) { - const sslTargetNameOverride = options['grpc.ssl_target_name_override']; - const originalCheckServerIdentity = (_b = connectionOptions.checkServerIdentity) !== null && _b !== void 0 ? _b : tls_1.checkServerIdentity; - connectionOptions.checkServerIdentity = (host, cert) => { - return originalCheckServerIdentity(sslTargetNameOverride, cert); - }; - connectionOptions.servername = sslTargetNameOverride; - } - else { - connectionOptions.servername = remoteHost; - } - if (options['grpc-node.tls_enable_trace']) { - connectionOptions.enableTrace = true; - } - return connectionOptions; -} -class SecureConnectorImpl { - constructor(connectionOptions, callCredentials) { - this.connectionOptions = connectionOptions; - this.callCredentials = callCredentials; - } - connect(socket) { - const tlsConnectOptions = Object.assign({ socket: socket }, this.connectionOptions); - return new Promise((resolve, reject) => { - const tlsSocket = (0, tls_1.connect)(tlsConnectOptions, () => { - var _a; - if (((_a = this.connectionOptions.rejectUnauthorized) !== null && _a !== void 0 ? _a : true) && !tlsSocket.authorized) { - reject(tlsSocket.authorizationError); - return; - } - resolve({ - socket: tlsSocket, - secure: true - }); - }); - tlsSocket.on('error', (error) => { - reject(error); - }); - }); - } - waitForReady() { - return Promise.resolve(); - } - getCallCredentials() { - return this.callCredentials; - } - destroy() { } -} -class SecureChannelCredentialsImpl extends ChannelCredentials { - constructor(secureContext, verifyOptions) { - super(); - this.secureContext = secureContext; - this.verifyOptions = verifyOptions; - } - _isSecure() { - return true; - } - _equals(other) { - if (this === other) { - return true; - } - if (other instanceof SecureChannelCredentialsImpl) { - return (this.secureContext === other.secureContext && - this.verifyOptions.checkServerIdentity === - other.verifyOptions.checkServerIdentity); - } - else { - return false; - } - } - _createSecureConnector(channelTarget, options, callCredentials) { - const connectionOptions = getConnectionOptions(this.secureContext, this.verifyOptions, channelTarget, options); - return new SecureConnectorImpl(connectionOptions, callCredentials !== null && callCredentials !== void 0 ? callCredentials : call_credentials_1.CallCredentials.createEmpty()); - } -} -class CertificateProviderChannelCredentialsImpl extends ChannelCredentials { - constructor(caCertificateProvider, identityCertificateProvider, verifyOptions) { - super(); - this.caCertificateProvider = caCertificateProvider; - this.identityCertificateProvider = identityCertificateProvider; - this.verifyOptions = verifyOptions; - this.refcount = 0; - /** - * `undefined` means that the certificates have not yet been loaded. `null` - * means that an attempt to load them has completed, and has failed. - */ - this.latestCaUpdate = undefined; - /** - * `undefined` means that the certificates have not yet been loaded. `null` - * means that an attempt to load them has completed, and has failed. - */ - this.latestIdentityUpdate = undefined; - this.caCertificateUpdateListener = this.handleCaCertificateUpdate.bind(this); - this.identityCertificateUpdateListener = this.handleIdentityCertitificateUpdate.bind(this); - this.secureContextWatchers = []; - } - _isSecure() { - return true; - } - _equals(other) { - var _a, _b; - if (this === other) { - return true; - } - if (other instanceof CertificateProviderChannelCredentialsImpl) { - return this.caCertificateProvider === other.caCertificateProvider && - this.identityCertificateProvider === other.identityCertificateProvider && - ((_a = this.verifyOptions) === null || _a === void 0 ? void 0 : _a.checkServerIdentity) === ((_b = other.verifyOptions) === null || _b === void 0 ? void 0 : _b.checkServerIdentity); - } - else { - return false; - } - } - ref() { - var _a; - if (this.refcount === 0) { - this.caCertificateProvider.addCaCertificateListener(this.caCertificateUpdateListener); - (_a = this.identityCertificateProvider) === null || _a === void 0 ? void 0 : _a.addIdentityCertificateListener(this.identityCertificateUpdateListener); - } - this.refcount += 1; - } - unref() { - var _a; - this.refcount -= 1; - if (this.refcount === 0) { - this.caCertificateProvider.removeCaCertificateListener(this.caCertificateUpdateListener); - (_a = this.identityCertificateProvider) === null || _a === void 0 ? void 0 : _a.removeIdentityCertificateListener(this.identityCertificateUpdateListener); - } - } - _createSecureConnector(channelTarget, options, callCredentials) { - this.ref(); - return new CertificateProviderChannelCredentialsImpl.SecureConnectorImpl(this, channelTarget, options, callCredentials !== null && callCredentials !== void 0 ? callCredentials : call_credentials_1.CallCredentials.createEmpty()); - } - maybeUpdateWatchers() { - if (this.hasReceivedUpdates()) { - for (const watcher of this.secureContextWatchers) { - watcher(this.getLatestSecureContext()); - } - this.secureContextWatchers = []; - } - } - handleCaCertificateUpdate(update) { - this.latestCaUpdate = update; - this.maybeUpdateWatchers(); - } - handleIdentityCertitificateUpdate(update) { - this.latestIdentityUpdate = update; - this.maybeUpdateWatchers(); - } - hasReceivedUpdates() { - if (this.latestCaUpdate === undefined) { - return false; - } - if (this.identityCertificateProvider && this.latestIdentityUpdate === undefined) { - return false; - } - return true; - } - getSecureContext() { - if (this.hasReceivedUpdates()) { - return Promise.resolve(this.getLatestSecureContext()); - } - else { - return new Promise(resolve => { - this.secureContextWatchers.push(resolve); - }); - } - } - getLatestSecureContext() { - var _a, _b; - if (!this.latestCaUpdate) { - return null; - } - if (this.identityCertificateProvider !== null && !this.latestIdentityUpdate) { - return null; - } - try { - return (0, tls_1.createSecureContext)({ - ca: this.latestCaUpdate.caCertificate, - key: (_a = this.latestIdentityUpdate) === null || _a === void 0 ? void 0 : _a.privateKey, - cert: (_b = this.latestIdentityUpdate) === null || _b === void 0 ? void 0 : _b.certificate, - ciphers: tls_helpers_1.CIPHER_SUITES - }); - } - catch (e) { - (0, logging_1.log)(constants_1.LogVerbosity.ERROR, 'Failed to createSecureContext with error ' + e.message); - return null; - } - } -} -CertificateProviderChannelCredentialsImpl.SecureConnectorImpl = class { - constructor(parent, channelTarget, options, callCredentials) { - this.parent = parent; - this.channelTarget = channelTarget; - this.options = options; - this.callCredentials = callCredentials; - } - connect(socket) { - return new Promise((resolve, reject) => { - const secureContext = this.parent.getLatestSecureContext(); - if (!secureContext) { - reject(new Error('Failed to load credentials')); - return; - } - if (socket.closed) { - reject(new Error('Socket closed while loading credentials')); - } - const connnectionOptions = getConnectionOptions(secureContext, this.parent.verifyOptions, this.channelTarget, this.options); - const tlsConnectOptions = Object.assign({ socket: socket }, connnectionOptions); - const closeCallback = () => { - reject(new Error('Socket closed')); - }; - const errorCallback = (error) => { - reject(error); - }; - const tlsSocket = (0, tls_1.connect)(tlsConnectOptions, () => { - var _a; - tlsSocket.removeListener('close', closeCallback); - tlsSocket.removeListener('error', errorCallback); - if (((_a = this.parent.verifyOptions.rejectUnauthorized) !== null && _a !== void 0 ? _a : true) && !tlsSocket.authorized) { - reject(tlsSocket.authorizationError); - return; - } - resolve({ - socket: tlsSocket, - secure: true - }); - }); - tlsSocket.once('close', closeCallback); - tlsSocket.once('error', errorCallback); - }); - } - async waitForReady() { - await this.parent.getSecureContext(); - } - getCallCredentials() { - return this.callCredentials; - } - destroy() { - this.parent.unref(); - } -}; -function createCertificateProviderChannelCredentials(caCertificateProvider, identityCertificateProvider, verifyOptions) { - return new CertificateProviderChannelCredentialsImpl(caCertificateProvider, identityCertificateProvider, verifyOptions !== null && verifyOptions !== void 0 ? verifyOptions : {}); -} -class ComposedChannelCredentialsImpl extends ChannelCredentials { - constructor(channelCredentials, callCredentials) { - super(); - this.channelCredentials = channelCredentials; - this.callCredentials = callCredentials; - if (!channelCredentials._isSecure()) { - throw new Error('Cannot compose insecure credentials'); - } - } - compose(callCredentials) { - const combinedCallCredentials = this.callCredentials.compose(callCredentials); - return new ComposedChannelCredentialsImpl(this.channelCredentials, combinedCallCredentials); - } - _isSecure() { - return true; - } - _equals(other) { - if (this === other) { - return true; - } - if (other instanceof ComposedChannelCredentialsImpl) { - return (this.channelCredentials._equals(other.channelCredentials) && - this.callCredentials._equals(other.callCredentials)); - } - else { - return false; - } - } - _createSecureConnector(channelTarget, options, callCredentials) { - const combinedCallCredentials = this.callCredentials.compose(callCredentials !== null && callCredentials !== void 0 ? callCredentials : call_credentials_1.CallCredentials.createEmpty()); - return this.channelCredentials._createSecureConnector(channelTarget, options, combinedCallCredentials); - } -} -//# sourceMappingURL=channel-credentials.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/channel-credentials.js.map b/node_modules/@grpc/grpc-js/build/src/channel-credentials.js.map deleted file mode 100644 index af3bce2..0000000 --- a/node_modules/@grpc/grpc-js/build/src/channel-credentials.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"channel-credentials.js","sourceRoot":"","sources":["../../src/channel-credentials.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAidH,kGAEC;AAjdD,6BAOa;AAEb,yDAAqD;AACrD,+CAAmE;AAInE,6CAAgE;AAChE,yCAAiD;AACjD,uCAAgC;AAChC,2CAA2C;AAE3C,8DAA8D;AAC9D,SAAS,oBAAoB,CAAC,GAAQ,EAAE,YAAoB;IAC1D,IAAI,GAAG,IAAI,CAAC,CAAC,GAAG,YAAY,MAAM,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,SAAS,CAAC,GAAG,YAAY,kCAAkC,CAAC,CAAC;IACzE,CAAC;AACH,CAAC;AAsCD;;;;GAIG;AACH,MAAsB,kBAAkB;IACtC;;;;;OAKG;IACH,OAAO,CAAC,eAAgC;QACtC,OAAO,IAAI,8BAA8B,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IACnE,CAAC;IAgBD;;;;;;;;OAQG;IACH,M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a,EAAE,OAAO,EAAE,uBAAuB,CAAC,CAAC;IACzG,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/channel-options.d.ts b/node_modules/@grpc/grpc-js/build/src/channel-options.d.ts deleted file mode 100644 index e3b4584..0000000 --- a/node_modules/@grpc/grpc-js/build/src/channel-options.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { CompressionAlgorithms } from './compression-algorithms'; -/** - * An interface that contains options used when initializing a Channel instance. - */ -export interface ChannelOptions { - 'grpc.ssl_target_name_override'?: string; - 'grpc.primary_user_agent'?: string; - 'grpc.secondary_user_agent'?: string; - 'grpc.default_authority'?: string; - 'grpc.keepalive_time_ms'?: number; - 'grpc.keepalive_timeout_ms'?: number; - 'grpc.keepalive_permit_without_calls'?: number; - 'grpc.service_config'?: string; - 'grpc.max_concurrent_streams'?: number; - 'grpc.initial_reconnect_backoff_ms'?: number; - 'grpc.max_reconnect_backoff_ms'?: number; - 'grpc.use_local_subchannel_pool'?: number; - 'grpc.max_send_message_length'?: number; - 'grpc.max_receive_message_length'?: number; - 'grpc.enable_http_proxy'?: number; - 'grpc.http_connect_target'?: string; - 'grpc.http_connect_creds'?: string; - 'grpc.default_compression_algorithm'?: CompressionAlgorithms; - 'grpc.enable_channelz'?: number; - 'grpc.dns_min_time_between_resolutions_ms'?: number; - 'grpc.enable_retries'?: number; - 'grpc.per_rpc_retry_buffer_size'?: number; - 'grpc.retry_buffer_size'?: number; - 'grpc.max_connection_age_ms'?: number; - 'grpc.max_connection_age_grace_ms'?: number; - 'grpc.max_connection_idle_ms'?: number; - 'grpc-node.max_session_memory'?: number; - 'grpc.service_config_disable_resolution'?: number; - 'grpc.client_idle_timeout_ms'?: number; - /** - * Set the enableTrace option in TLS clients and servers - */ - 'grpc-node.tls_enable_trace'?: number; - 'grpc.lb.ring_hash.ring_size_cap'?: number; - 'grpc-node.retry_max_attempts_limit'?: number; - 'grpc-node.flow_control_window'?: number; - 'grpc.server_call_metric_recording'?: number; - [key: string]: any; -} -/** - * This is for checking provided options at runtime. This is an object for - * easier membership checking. - */ -export declare const recognizedOptions: { - 'grpc.ssl_target_name_override': boolean; - 'grpc.primary_user_agent': boolean; - 'grpc.secondary_user_agent': boolean; - 'grpc.default_authority': boolean; - 'grpc.keepalive_time_ms': boolean; - 'grpc.keepalive_timeout_ms': boolean; - 'grpc.keepalive_permit_without_calls': boolean; - 'grpc.service_config': boolean; - 'grpc.max_concurrent_streams': boolean; - 'grpc.initial_reconnect_backoff_ms': boolean; - 'grpc.max_reconnect_backoff_ms': boolean; - 'grpc.use_local_subchannel_pool': boolean; - 'grpc.max_send_message_length': boolean; - 'grpc.max_receive_message_length': boolean; - 'grpc.enable_http_proxy': boolean; - 'grpc.enable_channelz': boolean; - 'grpc.dns_min_time_between_resolutions_ms': boolean; - 'grpc.enable_retries': boolean; - 'grpc.per_rpc_retry_buffer_size': boolean; - 'grpc.retry_buffer_size': boolean; - 'grpc.max_connection_age_ms': boolean; - 'grpc.max_connection_age_grace_ms': boolean; - 'grpc-node.max_session_memory': boolean; - 'grpc.service_config_disable_resolution': boolean; - 'grpc.client_idle_timeout_ms': boolean; - 'grpc-node.tls_enable_trace': boolean; - 'grpc.lb.ring_hash.ring_size_cap': boolean; - 'grpc-node.retry_max_attempts_limit': boolean; - 'grpc-node.flow_control_window': boolean; - 'grpc.server_call_metric_recording': boolean; -}; -export declare function channelOptionsEqual(options1: ChannelOptions, options2: ChannelOptions): boolean; diff --git a/node_modules/@grpc/grpc-js/build/src/channel-options.js b/node_modules/@grpc/grpc-js/build/src/channel-options.js deleted file mode 100644 index c6aaa95..0000000 --- a/node_modules/@grpc/grpc-js/build/src/channel-options.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.recognizedOptions = void 0; -exports.channelOptionsEqual = channelOptionsEqual; -/** - * This is for checking provided options at runtime. This is an object for - * easier membership checking. - */ -exports.recognizedOptions = { - 'grpc.ssl_target_name_override': true, - 'grpc.primary_user_agent': true, - 'grpc.secondary_user_agent': true, - 'grpc.default_authority': true, - 'grpc.keepalive_time_ms': true, - 'grpc.keepalive_timeout_ms': true, - 'grpc.keepalive_permit_without_calls': true, - 'grpc.service_config': true, - 'grpc.max_concurrent_streams': true, - 'grpc.initial_reconnect_backoff_ms': true, - 'grpc.max_reconnect_backoff_ms': true, - 'grpc.use_local_subchannel_pool': true, - 'grpc.max_send_message_length': true, - 'grpc.max_receive_message_length': true, - 'grpc.enable_http_proxy': true, - 'grpc.enable_channelz': true, - 'grpc.dns_min_time_between_resolutions_ms': true, - 'grpc.enable_retries': true, - 'grpc.per_rpc_retry_buffer_size': true, - 'grpc.retry_buffer_size': true, - 'grpc.max_connection_age_ms': true, - 'grpc.max_connection_age_grace_ms': true, - 'grpc-node.max_session_memory': true, - 'grpc.service_config_disable_resolution': true, - 'grpc.client_idle_timeout_ms': true, - 'grpc-node.tls_enable_trace': true, - 'grpc.lb.ring_hash.ring_size_cap': true, - 'grpc-node.retry_max_attempts_limit': true, - 'grpc-node.flow_control_window': true, - 'grpc.server_call_metric_recording': true -}; -function channelOptionsEqual(options1, options2) { - const keys1 = Object.keys(options1).sort(); - const keys2 = Object.keys(options2).sort(); - if (keys1.length !== keys2.length) { - return false; - } - for (let i = 0; i < keys1.length; i += 1) { - if (keys1[i] !== keys2[i]) { - return false; - } - if (options1[keys1[i]] !== options2[keys2[i]]) { - return false; - } - } - return true; -} -//# sourceMappingURL=channel-options.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/channel-options.js.map b/node_modules/@grpc/grpc-js/build/src/channel-options.js.map deleted file mode 100644 index 26ac269..0000000 --- a/node_modules/@grpc/grpc-js/build/src/channel-options.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"channel-options.js","sourceRoot":"","sources":["../../src/channel-options.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AA8FH,kDAkBC;AAvDD;;;GAGG;AACU,QAAA,iBAAiB,GAAG;IAC/B,+BAA+B,EAAE,IAAI;IACrC,yBAAyB,EAAE,IAAI;IAC/B,2BAA2B,EAAE,IAAI;IACjC,wBAAwB,EAAE,IAAI;IAC9B,wBAAwB,EAAE,IAAI;IAC9B,2BAA2B,EAAE,IAAI;IACjC,qCAAqC,EAAE,IAAI;IAC3C,qBAAqB,EAAE,IAAI;IAC3B,6BAA6B,EAAE,IAAI;IACnC,mCAAmC,EAAE,IAAI;IACzC,+BAA+B,EAAE,IAAI;IACrC,gCAAgC,EAAE,IAAI;IACtC,8BAA8B,EAAE,IAAI;IACpC,iCAAiC,EAAE,IAAI;IACvC,wBAAwB,EAAE,IAAI;IAC9B,sBAAsB,EAAE,IAAI;IAC5B,0CAA0C,EAAE,IAAI;IAChD,qBAAqB,EAAE,IAAI;IAC3B,gCAAgC,EAAE,IAAI;IACtC,wBAAwB,EAAE,IAAI;IAC9B,4BAA4B,EAAE,IAAI;IAClC,kCAAkC,EAAE,IAAI;IACxC,8BAA8B,EAAE,IAAI;IACpC,wCAAwC,EAAE,IAAI;IAC9C,6BAA6B,EAAE,IAAI;IACnC,4BAA4B,EAAE,IAAI;IAClC,iCAAiC,EAAE,IAAI;IACvC,oCAAoC,EAAE,IAAI;IAC1C,+BAA+B,EAAE,IAAI;IACrC,mCAAmC,EAAE,IAAI;CAC1C,CAAC;AAEF,SAAgB,mBAAmB,CACjC,QAAwB,EACxB,QAAwB;IAExB,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3C,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;QAClC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACzC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YAC1B,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9C,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/channel.d.ts b/node_modules/@grpc/grpc-js/build/src/channel.d.ts deleted file mode 100644 index f4d646e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/channel.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { ChannelCredentials } from './channel-credentials'; -import { ChannelOptions } from './channel-options'; -import { ServerSurfaceCall } from './server-call'; -import { ConnectivityState } from './connectivity-state'; -import type { ChannelRef } from './channelz'; -import { Call } from './call-interface'; -import { Deadline } from './deadline'; -/** - * An interface that represents a communication channel to a server specified - * by a given address. - */ -export interface Channel { - /** - * Close the channel. This has the same functionality as the existing - * grpc.Client.prototype.close - */ - close(): void; - /** - * Return the target that this channel connects to - */ - getTarget(): string; - /** - * Get the channel's current connectivity state. This method is here mainly - * because it is in the existing internal Channel class, and there isn't - * another good place to put it. - * @param tryToConnect If true, the channel will start connecting if it is - * idle. Otherwise, idle channels will only start connecting when a - * call starts. - */ - getConnectivityState(tryToConnect: boolean): ConnectivityState; - /** - * Watch for connectivity state changes. This is also here mainly because - * it is in the existing external Channel class. - * @param currentState The state to watch for transitions from. This should - * always be populated by calling getConnectivityState immediately - * before. - * @param deadline A deadline for waiting for a state change - * @param callback Called with no error when a state change, or with an - * error if the deadline passes without a state change. - */ - watchConnectivityState(currentState: ConnectivityState, deadline: Date | number, callback: (error?: Error) => void): void; - /** - * Get the channelz reference object for this channel. A request to the - * channelz service for the id in this object will provide information - * about this channel. - */ - getChannelzRef(): ChannelRef; - /** - * Create a call object. Call is an opaque type that is used by the Client - * class. This function is called by the gRPC library when starting a - * request. Implementers should return an instance of Call that is returned - * from calling createCall on an instance of the provided Channel class. - * @param method The full method string to request. - * @param deadline The call deadline - * @param host A host string override for making the request - * @param parentCall A server call to propagate some information from - * @param propagateFlags A bitwise combination of elements of grpc.propagate - * that indicates what information to propagate from parentCall. - */ - createCall(method: string, deadline: Deadline, host: string | null | undefined, parentCall: ServerSurfaceCall | null, propagateFlags: number | null | undefined): Call; -} -export declare class ChannelImplementation implements Channel { - private internalChannel; - constructor(target: string, credentials: ChannelCredentials, options: ChannelOptions); - close(): void; - getTarget(): string; - getConnectivityState(tryToConnect: boolean): ConnectivityState; - watchConnectivityState(currentState: ConnectivityState, deadline: Date | number, callback: (error?: Error) => void): void; - /** - * Get the channelz reference object for this channel. The returned value is - * garbage if channelz is disabled for this channel. - * @returns - */ - getChannelzRef(): ChannelRef; - createCall(method: string, deadline: Deadline, host: string | null | undefined, parentCall: ServerSurfaceCall | null, propagateFlags: number | null | undefined): Call; -} diff --git a/node_modules/@grpc/grpc-js/build/src/channel.js b/node_modules/@grpc/grpc-js/build/src/channel.js deleted file mode 100644 index 49e8639..0000000 --- a/node_modules/@grpc/grpc-js/build/src/channel.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChannelImplementation = void 0; -const channel_credentials_1 = require("./channel-credentials"); -const internal_channel_1 = require("./internal-channel"); -class ChannelImplementation { - constructor(target, credentials, options) { - if (typeof target !== 'string') { - throw new TypeError('Channel target must be a string'); - } - if (!(credentials instanceof channel_credentials_1.ChannelCredentials)) { - throw new TypeError('Channel credentials must be a ChannelCredentials object'); - } - if (options) { - if (typeof options !== 'object') { - throw new TypeError('Channel options must be an object'); - } - } - this.internalChannel = new internal_channel_1.InternalChannel(target, credentials, options); - } - close() { - this.internalChannel.close(); - } - getTarget() { - return this.internalChannel.getTarget(); - } - getConnectivityState(tryToConnect) { - return this.internalChannel.getConnectivityState(tryToConnect); - } - watchConnectivityState(currentState, deadline, callback) { - this.internalChannel.watchConnectivityState(currentState, deadline, callback); - } - /** - * Get the channelz reference object for this channel. The returned value is - * garbage if channelz is disabled for this channel. - * @returns - */ - getChannelzRef() { - return this.internalChannel.getChannelzRef(); - } - createCall(method, deadline, host, parentCall, propagateFlags) { - if (typeof method !== 'string') { - throw new TypeError('Channel#createCall: method must be a string'); - } - if (!(typeof deadline === 'number' || deadline instanceof Date)) { - throw new TypeError('Channel#createCall: deadline must be a number or Date'); - } - return this.internalChannel.createCall(method, deadline, host, parentCall, propagateFlags); - } -} -exports.ChannelImplementation = ChannelImplementation; -//# sourceMappingURL=channel.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/channel.js.map b/node_modules/@grpc/grpc-js/build/src/channel.js.map deleted file mode 100644 index 8758e84..0000000 --- a/node_modules/@grpc/grpc-js/build/src/channel.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"channel.js","sourceRoot":"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;QAEzC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,MAAM,IAAI,SAAS,CAAC,6CAA6C,CAAC,CAAC;QACrE,CAAC;QACD,IAAI,CAAC,CAAC,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,YAAY,IAAI,CAAC,EAAE,CAAC;YAChE,MAAM,IAAI,SAAS,CACjB,uDAAuD,CACxD,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,eAAe,CAAC,UAAU,CACpC,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,cAAc,CACf,CAAC;IACJ,CAAC;CACF;AAjFD,sDAiFC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/channelz.d.ts b/node_modules/@grpc/grpc-js/build/src/channelz.d.ts deleted file mode 100644 index 831222d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/channelz.d.ts +++ /dev/null @@ -1,158 +0,0 @@ -import { OrderedMap } from '@js-sdsl/ordered-map'; -import { ConnectivityState } from './connectivity-state'; -import { ChannelTrace } from './generated/grpc/channelz/v1/ChannelTrace'; -import { SubchannelAddress } from './subchannel-address'; -import { ChannelzDefinition, ChannelzHandlers } from './generated/grpc/channelz/v1/Channelz'; -export type TraceSeverity = 'CT_UNKNOWN' | 'CT_INFO' | 'CT_WARNING' | 'CT_ERROR'; -interface Ref { - kind: EntityTypes; - id: number; - name: string; -} -export interface ChannelRef extends Ref { - kind: EntityTypes.channel; -} -export interface SubchannelRef extends Ref { - kind: EntityTypes.subchannel; -} -export interface ServerRef extends Ref { - kind: EntityTypes.server; -} -export interface SocketRef extends Ref { - kind: EntityTypes.socket; -} -interface TraceEvent { - description: string; - severity: TraceSeverity; - timestamp: Date; - childChannel?: ChannelRef; - childSubchannel?: SubchannelRef; -} -export declare class ChannelzTraceStub { - readonly events: TraceEvent[]; - readonly creationTimestamp: Date; - readonly eventsLogged = 0; - addTrace(): void; - getTraceMessage(): ChannelTrace; -} -export declare class ChannelzTrace { - events: TraceEvent[]; - creationTimestamp: Date; - eventsLogged: number; - constructor(); - addTrace(severity: TraceSeverity, description: string, child?: ChannelRef | SubchannelRef): void; - getTraceMessage(): ChannelTrace; -} -export declare class ChannelzChildrenTracker { - private channelChildren; - private subchannelChildren; - private socketChildren; - private trackerMap; - refChild(child: ChannelRef | SubchannelRef | SocketRef): void; - unrefChild(child: ChannelRef | SubchannelRef | SocketRef): void; - getChildLists(): ChannelzChildren; -} -export declare class ChannelzChildrenTrackerStub extends ChannelzChildrenTracker { - refChild(): void; - unrefChild(): void; -} -export declare class ChannelzCallTracker { - callsStarted: number; - callsSucceeded: number; - callsFailed: number; - lastCallStartedTimestamp: Date | null; - addCallStarted(): void; - addCallSucceeded(): void; - addCallFailed(): void; -} -export declare class ChannelzCallTrackerStub extends ChannelzCallTracker { - addCallStarted(): void; - addCallSucceeded(): void; - addCallFailed(): void; -} -export interface ChannelzChildren { - channels: OrderedMap; - subchannels: OrderedMap; - sockets: OrderedMap; -} -export interface ChannelInfo { - target: string; - state: ConnectivityState; - trace: ChannelzTrace | ChannelzTraceStub; - callTracker: ChannelzCallTracker | ChannelzCallTrackerStub; - children: ChannelzChildren; -} -export type SubchannelInfo = ChannelInfo; -export interface ServerInfo { - trace: ChannelzTrace; - callTracker: ChannelzCallTracker; - listenerChildren: ChannelzChildren; - sessionChildren: ChannelzChildren; -} -export interface TlsInfo { - cipherSuiteStandardName: string | null; - cipherSuiteOtherName: string | null; - localCertificate: Buffer | null; - remoteCertificate: Buffer | null; -} -export interface SocketInfo { - localAddress: SubchannelAddress | null; - remoteAddress: SubchannelAddress | null; - security: TlsInfo | null; - remoteName: string | null; - streamsStarted: number; - streamsSucceeded: number; - streamsFailed: number; - messagesSent: number; - messagesReceived: number; - keepAlivesSent: number; - lastLocalStreamCreatedTimestamp: Date | null; - lastRemoteStreamCreatedTimestamp: Date | null; - lastMessageSentTimestamp: Date | null; - lastMessageReceivedTimestamp: Date | null; - localFlowControlWindow: number | null; - remoteFlowControlWindow: number | null; -} -interface ChannelEntry { - ref: ChannelRef; - getInfo(): ChannelInfo; -} -interface SubchannelEntry { - ref: SubchannelRef; - getInfo(): SubchannelInfo; -} -interface ServerEntry { - ref: ServerRef; - getInfo(): ServerInfo; -} -interface SocketEntry { - ref: SocketRef; - getInfo(): SocketInfo; -} -export declare const enum EntityTypes { - channel = "channel", - subchannel = "subchannel", - server = "server", - socket = "socket" -} -export type RefByType = T extends EntityTypes.channel ? ChannelRef : T extends EntityTypes.server ? ServerRef : T extends EntityTypes.socket ? SocketRef : T extends EntityTypes.subchannel ? SubchannelRef : never; -export type EntryByType = T extends EntityTypes.channel ? ChannelEntry : T extends EntityTypes.server ? ServerEntry : T extends EntityTypes.socket ? SocketEntry : T extends EntityTypes.subchannel ? SubchannelEntry : never; -export type InfoByType = T extends EntityTypes.channel ? ChannelInfo : T extends EntityTypes.subchannel ? SubchannelInfo : T extends EntityTypes.server ? ServerInfo : T extends EntityTypes.socket ? SocketInfo : never; -export declare const registerChannelzChannel: (name: string, getInfo: () => ChannelInfo, channelzEnabled: boolean) => ChannelRef; -export declare const registerChannelzSubchannel: (name: string, getInfo: () => ChannelInfo, channelzEnabled: boolean) => SubchannelRef; -export declare const registerChannelzServer: (name: string, getInfo: () => ServerInfo, channelzEnabled: boolean) => ServerRef; -export declare const registerChannelzSocket: (name: string, getInfo: () => SocketInfo, channelzEnabled: boolean) => SocketRef; -export declare function unregisterChannelzRef(ref: ChannelRef | SubchannelRef | ServerRef | SocketRef): void; -export declare function getChannelzHandlers(): ChannelzHandlers; -export declare function getChannelzServiceDefinition(): ChannelzDefinition; -export declare function setup(): void; -export {}; diff --git a/node_modules/@grpc/grpc-js/build/src/channelz.js b/node_modules/@grpc/grpc-js/build/src/channelz.js deleted file mode 100644 index 91e9ace..0000000 --- a/node_modules/@grpc/grpc-js/build/src/channelz.js +++ /dev/null @@ -1,598 +0,0 @@ -"use strict"; -/* - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.registerChannelzSocket = exports.registerChannelzServer = exports.registerChannelzSubchannel = exports.registerChannelzChannel = exports.ChannelzCallTrackerStub = exports.ChannelzCallTracker = exports.ChannelzChildrenTrackerStub = exports.ChannelzChildrenTracker = exports.ChannelzTrace = exports.ChannelzTraceStub = void 0; -exports.unregisterChannelzRef = unregisterChannelzRef; -exports.getChannelzHandlers = getChannelzHandlers; -exports.getChannelzServiceDefinition = getChannelzServiceDefinition; -exports.setup = setup; -const net_1 = require("net"); -const ordered_map_1 = require("@js-sdsl/ordered-map"); -const connectivity_state_1 = require("./connectivity-state"); -const constants_1 = require("./constants"); -const subchannel_address_1 = require("./subchannel-address"); -const admin_1 = require("./admin"); -const make_client_1 = require("./make-client"); -function channelRefToMessage(ref) { - return { - channel_id: ref.id, - name: ref.name, - }; -} -function subchannelRefToMessage(ref) { - return { - subchannel_id: ref.id, - name: ref.name, - }; -} -function serverRefToMessage(ref) { - return { - server_id: ref.id, - }; -} -function socketRefToMessage(ref) { - return { - socket_id: ref.id, - name: ref.name, - }; -} -/** - * The loose upper bound on the number of events that should be retained in a - * trace. This may be exceeded by up to a factor of 2. Arbitrarily chosen as a - * number that should be large enough to contain the recent relevant - * information, but small enough to not use excessive memory. - */ -const TARGET_RETAINED_TRACES = 32; -/** - * Default number of sockets/servers/channels/subchannels to return - */ -const DEFAULT_MAX_RESULTS = 100; -class ChannelzTraceStub { - constructor() { - this.events = []; - this.creationTimestamp = new Date(); - this.eventsLogged = 0; - } - addTrace() { } - getTraceMessage() { - return { - creation_timestamp: dateToProtoTimestamp(this.creationTimestamp), - num_events_logged: this.eventsLogged, - events: [], - }; - } -} -exports.ChannelzTraceStub = ChannelzTraceStub; -class ChannelzTrace { - constructor() { - this.events = []; - this.eventsLogged = 0; - this.creationTimestamp = new Date(); - } - addTrace(severity, description, child) { - const timestamp = new Date(); - this.events.push({ - description: description, - severity: severity, - timestamp: timestamp, - childChannel: (child === null || child === void 0 ? void 0 : child.kind) === 'channel' ? child : undefined, - childSubchannel: (child === null || child === void 0 ? void 0 : child.kind) === 'subchannel' ? child : undefined, - }); - // Whenever the trace array gets too large, discard the first half - if (this.events.length >= TARGET_RETAINED_TRACES * 2) { - this.events = this.events.slice(TARGET_RETAINED_TRACES); - } - this.eventsLogged += 1; - } - getTraceMessage() { - return { - creation_timestamp: dateToProtoTimestamp(this.creationTimestamp), - num_events_logged: this.eventsLogged, - events: this.events.map(event => { - return { - description: event.description, - severity: event.severity, - timestamp: dateToProtoTimestamp(event.timestamp), - channel_ref: event.childChannel - ? channelRefToMessage(event.childChannel) - : null, - subchannel_ref: event.childSubchannel - ? subchannelRefToMessage(event.childSubchannel) - : null, - }; - }), - }; - } -} -exports.ChannelzTrace = ChannelzTrace; -class ChannelzChildrenTracker { - constructor() { - this.channelChildren = new ordered_map_1.OrderedMap(); - this.subchannelChildren = new ordered_map_1.OrderedMap(); - this.socketChildren = new ordered_map_1.OrderedMap(); - this.trackerMap = { - ["channel" /* EntityTypes.channel */]: this.channelChildren, - ["subchannel" /* EntityTypes.subchannel */]: this.subchannelChildren, - ["socket" /* EntityTypes.socket */]: this.socketChildren, - }; - } - refChild(child) { - const tracker = this.trackerMap[child.kind]; - const trackedChild = tracker.find(child.id); - if (trackedChild.equals(tracker.end())) { - tracker.setElement(child.id, { - ref: child, - count: 1, - }, trackedChild); - } - else { - trackedChild.pointer[1].count += 1; - } - } - unrefChild(child) { - const tracker = this.trackerMap[child.kind]; - const trackedChild = tracker.getElementByKey(child.id); - if (trackedChild !== undefined) { - trackedChild.count -= 1; - if (trackedChild.count === 0) { - tracker.eraseElementByKey(child.id); - } - } - } - getChildLists() { - return { - channels: this.channelChildren, - subchannels: this.subchannelChildren, - sockets: this.socketChildren, - }; - } -} -exports.ChannelzChildrenTracker = ChannelzChildrenTracker; -class ChannelzChildrenTrackerStub extends ChannelzChildrenTracker { - refChild() { } - unrefChild() { } -} -exports.ChannelzChildrenTrackerStub = ChannelzChildrenTrackerStub; -class ChannelzCallTracker { - constructor() { - this.callsStarted = 0; - this.callsSucceeded = 0; - this.callsFailed = 0; - this.lastCallStartedTimestamp = null; - } - addCallStarted() { - this.callsStarted += 1; - this.lastCallStartedTimestamp = new Date(); - } - addCallSucceeded() { - this.callsSucceeded += 1; - } - addCallFailed() { - this.callsFailed += 1; - } -} -exports.ChannelzCallTracker = ChannelzCallTracker; -class ChannelzCallTrackerStub extends ChannelzCallTracker { - addCallStarted() { } - addCallSucceeded() { } - addCallFailed() { } -} -exports.ChannelzCallTrackerStub = ChannelzCallTrackerStub; -const entityMaps = { - ["channel" /* EntityTypes.channel */]: new ordered_map_1.OrderedMap(), - ["subchannel" /* EntityTypes.subchannel */]: new ordered_map_1.OrderedMap(), - ["server" /* EntityTypes.server */]: new ordered_map_1.OrderedMap(), - ["socket" /* EntityTypes.socket */]: new ordered_map_1.OrderedMap(), -}; -const generateRegisterFn = (kind) => { - let nextId = 1; - function getNextId() { - return nextId++; - } - const entityMap = entityMaps[kind]; - return (name, getInfo, channelzEnabled) => { - const id = getNextId(); - const ref = { id, name, kind }; - if (channelzEnabled) { - entityMap.setElement(id, { ref, getInfo }); - } - return ref; - }; -}; -exports.registerChannelzChannel = generateRegisterFn("channel" /* EntityTypes.channel */); -exports.registerChannelzSubchannel = generateRegisterFn("subchannel" /* EntityTypes.subchannel */); -exports.registerChannelzServer = generateRegisterFn("server" /* EntityTypes.server */); -exports.registerChannelzSocket = generateRegisterFn("socket" /* EntityTypes.socket */); -function unregisterChannelzRef(ref) { - entityMaps[ref.kind].eraseElementByKey(ref.id); -} -/** - * Parse a single section of an IPv6 address as two bytes - * @param addressSection A hexadecimal string of length up to 4 - * @returns The pair of bytes representing this address section - */ -function parseIPv6Section(addressSection) { - const numberValue = Number.parseInt(addressSection, 16); - return [(numberValue / 256) | 0, numberValue % 256]; -} -/** - * Parse a chunk of an IPv6 address string to some number of bytes - * @param addressChunk Some number of segments of up to 4 hexadecimal - * characters each, joined by colons. - * @returns The list of bytes representing this address chunk - */ -function parseIPv6Chunk(addressChunk) { - if (addressChunk === '') { - return []; - } - const bytePairs = addressChunk - .split(':') - .map(section => parseIPv6Section(section)); - const result = []; - return result.concat(...bytePairs); -} -function isIPv6MappedIPv4(ipAddress) { - return (0, net_1.isIPv6)(ipAddress) && ipAddress.toLowerCase().startsWith('::ffff:') && (0, net_1.isIPv4)(ipAddress.substring(7)); -} -/** - * Prerequisite: isIPv4(ipAddress) - * @param ipAddress - * @returns - */ -function ipv4AddressStringToBuffer(ipAddress) { - return Buffer.from(Uint8Array.from(ipAddress.split('.').map(segment => Number.parseInt(segment)))); -} -/** - * Converts an IPv4 or IPv6 address from string representation to binary - * representation - * @param ipAddress an IP address in standard IPv4 or IPv6 text format - * @returns - */ -function ipAddressStringToBuffer(ipAddress) { - if ((0, net_1.isIPv4)(ipAddress)) { - return ipv4AddressStringToBuffer(ipAddress); - } - else if (isIPv6MappedIPv4(ipAddress)) { - return ipv4AddressStringToBuffer(ipAddress.substring(7)); - } - else if ((0, net_1.isIPv6)(ipAddress)) { - let leftSection; - let rightSection; - const doubleColonIndex = ipAddress.indexOf('::'); - if (doubleColonIndex === -1) { - leftSection = ipAddress; - rightSection = ''; - } - else { - leftSection = ipAddress.substring(0, doubleColonIndex); - rightSection = ipAddress.substring(doubleColonIndex + 2); - } - const leftBuffer = Buffer.from(parseIPv6Chunk(leftSection)); - const rightBuffer = Buffer.from(parseIPv6Chunk(rightSection)); - const middleBuffer = Buffer.alloc(16 - leftBuffer.length - rightBuffer.length, 0); - return Buffer.concat([leftBuffer, middleBuffer, rightBuffer]); - } - else { - return null; - } -} -function connectivityStateToMessage(state) { - switch (state) { - case connectivity_state_1.ConnectivityState.CONNECTING: - return { - state: 'CONNECTING', - }; - case connectivity_state_1.ConnectivityState.IDLE: - return { - state: 'IDLE', - }; - case connectivity_state_1.ConnectivityState.READY: - return { - state: 'READY', - }; - case connectivity_state_1.ConnectivityState.SHUTDOWN: - return { - state: 'SHUTDOWN', - }; - case connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE: - return { - state: 'TRANSIENT_FAILURE', - }; - default: - return { - state: 'UNKNOWN', - }; - } -} -function dateToProtoTimestamp(date) { - if (!date) { - return null; - } - const millisSinceEpoch = date.getTime(); - return { - seconds: (millisSinceEpoch / 1000) | 0, - nanos: (millisSinceEpoch % 1000) * 1000000, - }; -} -function getChannelMessage(channelEntry) { - const resolvedInfo = channelEntry.getInfo(); - const channelRef = []; - const subchannelRef = []; - resolvedInfo.children.channels.forEach(el => { - channelRef.push(channelRefToMessage(el[1].ref)); - }); - resolvedInfo.children.subchannels.forEach(el => { - subchannelRef.push(subchannelRefToMessage(el[1].ref)); - }); - return { - ref: channelRefToMessage(channelEntry.ref), - data: { - target: resolvedInfo.target, - state: connectivityStateToMessage(resolvedInfo.state), - calls_started: resolvedInfo.callTracker.callsStarted, - calls_succeeded: resolvedInfo.callTracker.callsSucceeded, - calls_failed: resolvedInfo.callTracker.callsFailed, - last_call_started_timestamp: dateToProtoTimestamp(resolvedInfo.callTracker.lastCallStartedTimestamp), - trace: resolvedInfo.trace.getTraceMessage(), - }, - channel_ref: channelRef, - subchannel_ref: subchannelRef, - }; -} -function GetChannel(call, callback) { - const channelId = parseInt(call.request.channel_id, 10); - const channelEntry = entityMaps["channel" /* EntityTypes.channel */].getElementByKey(channelId); - if (channelEntry === undefined) { - callback({ - code: constants_1.Status.NOT_FOUND, - details: 'No channel data found for id ' + channelId, - }); - return; - } - callback(null, { channel: getChannelMessage(channelEntry) }); -} -function GetTopChannels(call, callback) { - const maxResults = parseInt(call.request.max_results, 10) || DEFAULT_MAX_RESULTS; - const resultList = []; - const startId = parseInt(call.request.start_channel_id, 10); - const channelEntries = entityMaps["channel" /* EntityTypes.channel */]; - let i; - for (i = channelEntries.lowerBound(startId); !i.equals(channelEntries.end()) && resultList.length < maxResults; i = i.next()) { - resultList.push(getChannelMessage(i.pointer[1])); - } - callback(null, { - channel: resultList, - end: i.equals(channelEntries.end()), - }); -} -function getServerMessage(serverEntry) { - const resolvedInfo = serverEntry.getInfo(); - const listenSocket = []; - resolvedInfo.listenerChildren.sockets.forEach(el => { - listenSocket.push(socketRefToMessage(el[1].ref)); - }); - return { - ref: serverRefToMessage(serverEntry.ref), - data: { - calls_started: resolvedInfo.callTracker.callsStarted, - calls_succeeded: resolvedInfo.callTracker.callsSucceeded, - calls_failed: resolvedInfo.callTracker.callsFailed, - last_call_started_timestamp: dateToProtoTimestamp(resolvedInfo.callTracker.lastCallStartedTimestamp), - trace: resolvedInfo.trace.getTraceMessage(), - }, - listen_socket: listenSocket, - }; -} -function GetServer(call, callback) { - const serverId = parseInt(call.request.server_id, 10); - const serverEntries = entityMaps["server" /* EntityTypes.server */]; - const serverEntry = serverEntries.getElementByKey(serverId); - if (serverEntry === undefined) { - callback({ - code: constants_1.Status.NOT_FOUND, - details: 'No server data found for id ' + serverId, - }); - return; - } - callback(null, { server: getServerMessage(serverEntry) }); -} -function GetServers(call, callback) { - const maxResults = parseInt(call.request.max_results, 10) || DEFAULT_MAX_RESULTS; - const startId = parseInt(call.request.start_server_id, 10); - const serverEntries = entityMaps["server" /* EntityTypes.server */]; - const resultList = []; - let i; - for (i = serverEntries.lowerBound(startId); !i.equals(serverEntries.end()) && resultList.length < maxResults; i = i.next()) { - resultList.push(getServerMessage(i.pointer[1])); - } - callback(null, { - server: resultList, - end: i.equals(serverEntries.end()), - }); -} -function GetSubchannel(call, callback) { - const subchannelId = parseInt(call.request.subchannel_id, 10); - const subchannelEntry = entityMaps["subchannel" /* EntityTypes.subchannel */].getElementByKey(subchannelId); - if (subchannelEntry === undefined) { - callback({ - code: constants_1.Status.NOT_FOUND, - details: 'No subchannel data found for id ' + subchannelId, - }); - return; - } - const resolvedInfo = subchannelEntry.getInfo(); - const listenSocket = []; - resolvedInfo.children.sockets.forEach(el => { - listenSocket.push(socketRefToMessage(el[1].ref)); - }); - const subchannelMessage = { - ref: subchannelRefToMessage(subchannelEntry.ref), - data: { - target: resolvedInfo.target, - state: connectivityStateToMessage(resolvedInfo.state), - calls_started: resolvedInfo.callTracker.callsStarted, - calls_succeeded: resolvedInfo.callTracker.callsSucceeded, - calls_failed: resolvedInfo.callTracker.callsFailed, - last_call_started_timestamp: dateToProtoTimestamp(resolvedInfo.callTracker.lastCallStartedTimestamp), - trace: resolvedInfo.trace.getTraceMessage(), - }, - socket_ref: listenSocket, - }; - callback(null, { subchannel: subchannelMessage }); -} -function subchannelAddressToAddressMessage(subchannelAddress) { - var _a; - if ((0, subchannel_address_1.isTcpSubchannelAddress)(subchannelAddress)) { - return { - address: 'tcpip_address', - tcpip_address: { - ip_address: (_a = ipAddressStringToBuffer(subchannelAddress.host)) !== null && _a !== void 0 ? _a : undefined, - port: subchannelAddress.port, - }, - }; - } - else { - return { - address: 'uds_address', - uds_address: { - filename: subchannelAddress.path, - }, - }; - } -} -function GetSocket(call, callback) { - var _a, _b, _c, _d, _e; - const socketId = parseInt(call.request.socket_id, 10); - const socketEntry = entityMaps["socket" /* EntityTypes.socket */].getElementByKey(socketId); - if (socketEntry === undefined) { - callback({ - code: constants_1.Status.NOT_FOUND, - details: 'No socket data found for id ' + socketId, - }); - return; - } - const resolvedInfo = socketEntry.getInfo(); - const securityMessage = resolvedInfo.security - ? { - model: 'tls', - tls: { - cipher_suite: resolvedInfo.security.cipherSuiteStandardName - ? 'standard_name' - : 'other_name', - standard_name: (_a = resolvedInfo.security.cipherSuiteStandardName) !== null && _a !== void 0 ? _a : undefined, - other_name: (_b = resolvedInfo.security.cipherSuiteOtherName) !== null && _b !== void 0 ? _b : undefined, - local_certificate: (_c = resolvedInfo.security.localCertificate) !== null && _c !== void 0 ? _c : undefined, - remote_certificate: (_d = resolvedInfo.security.remoteCertificate) !== null && _d !== void 0 ? _d : undefined, - }, - } - : null; - const socketMessage = { - ref: socketRefToMessage(socketEntry.ref), - local: resolvedInfo.localAddress - ? subchannelAddressToAddressMessage(resolvedInfo.localAddress) - : null, - remote: resolvedInfo.remoteAddress - ? subchannelAddressToAddressMessage(resolvedInfo.remoteAddress) - : null, - remote_name: (_e = resolvedInfo.remoteName) !== null && _e !== void 0 ? _e : undefined, - security: securityMessage, - data: { - keep_alives_sent: resolvedInfo.keepAlivesSent, - streams_started: resolvedInfo.streamsStarted, - streams_succeeded: resolvedInfo.streamsSucceeded, - streams_failed: resolvedInfo.streamsFailed, - last_local_stream_created_timestamp: dateToProtoTimestamp(resolvedInfo.lastLocalStreamCreatedTimestamp), - last_remote_stream_created_timestamp: dateToProtoTimestamp(resolvedInfo.lastRemoteStreamCreatedTimestamp), - messages_received: resolvedInfo.messagesReceived, - messages_sent: resolvedInfo.messagesSent, - last_message_received_timestamp: dateToProtoTimestamp(resolvedInfo.lastMessageReceivedTimestamp), - last_message_sent_timestamp: dateToProtoTimestamp(resolvedInfo.lastMessageSentTimestamp), - local_flow_control_window: resolvedInfo.localFlowControlWindow - ? { value: resolvedInfo.localFlowControlWindow } - : null, - remote_flow_control_window: resolvedInfo.remoteFlowControlWindow - ? { value: resolvedInfo.remoteFlowControlWindow } - : null, - }, - }; - callback(null, { socket: socketMessage }); -} -function GetServerSockets(call, callback) { - const serverId = parseInt(call.request.server_id, 10); - const serverEntry = entityMaps["server" /* EntityTypes.server */].getElementByKey(serverId); - if (serverEntry === undefined) { - callback({ - code: constants_1.Status.NOT_FOUND, - details: 'No server data found for id ' + serverId, - }); - return; - } - const startId = parseInt(call.request.start_socket_id, 10); - const maxResults = parseInt(call.request.max_results, 10) || DEFAULT_MAX_RESULTS; - const resolvedInfo = serverEntry.getInfo(); - // If we wanted to include listener sockets in the result, this line would - // instead say - // const allSockets = resolvedInfo.listenerChildren.sockets.concat(resolvedInfo.sessionChildren.sockets).sort((ref1, ref2) => ref1.id - ref2.id); - const allSockets = resolvedInfo.sessionChildren.sockets; - const resultList = []; - let i; - for (i = allSockets.lowerBound(startId); !i.equals(allSockets.end()) && resultList.length < maxResults; i = i.next()) { - resultList.push(socketRefToMessage(i.pointer[1].ref)); - } - callback(null, { - socket_ref: resultList, - end: i.equals(allSockets.end()), - }); -} -function getChannelzHandlers() { - return { - GetChannel, - GetTopChannels, - GetServer, - GetServers, - GetSubchannel, - GetSocket, - GetServerSockets, - }; -} -let loadedChannelzDefinition = null; -function getChannelzServiceDefinition() { - if (loadedChannelzDefinition) { - return loadedChannelzDefinition; - } - /* The purpose of this complexity is to avoid loading @grpc/proto-loader at - * runtime for users who will not use/enable channelz. */ - const loaderLoadSync = require('@grpc/proto-loader') - .loadSync; - const loadedProto = loaderLoadSync('channelz.proto', { - keepCase: true, - longs: String, - enums: String, - defaults: true, - oneofs: true, - includeDirs: [`${__dirname}/../../proto`], - }); - const channelzGrpcObject = (0, make_client_1.loadPackageDefinition)(loadedProto); - loadedChannelzDefinition = - channelzGrpcObject.grpc.channelz.v1.Channelz.service; - return loadedChannelzDefinition; -} -function setup() { - (0, admin_1.registerAdminService)(getChannelzServiceDefinition, getChannelzHandlers); -} -//# sourceMappingURL=channelz.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/channelz.js.map b/node_modules/@grpc/grpc-js/build/src/channelz.js.map deleted file mode 100644 index 1536e0b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/channelz.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"channelz.js","sourceRoot":"","sources":["../../src/channelz.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AA8ZH,sDAIC;AAmbD,kDAUC;AAID,oEAsBC;AAED,sBAEC;AA33BD,6BAAqC;AACrC,sDAA2E;AAC3E,6DAAyD;AACzD,2CAAqC;AAWrC,6DAG8B;AAy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AU,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACxD,CAAC;IAED,QAAQ,CAAC,IAAI,EAAE;QACb,UAAU,EAAE,UAAU;QACtB,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;KAChC,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,mBAAmB;IACjC,OAAO;QACL,UAAU;QACV,cAAc;QACd,SAAS;QACT,UAAU;QACV,aAAa;QACb,SAAS;QACT,gBAAgB;KACjB,CAAC;AACJ,CAAC;AAED,IAAI,wBAAwB,GAA8B,IAAI,CAAC;AAE/D,SAAgB,4BAA4B;IAC1C,IAAI,wBAAwB,EAAE,CAAC;QAC7B,OAAO,wBAAwB,CAAC;IAClC,CAAC;IACD;6DACyD;IACzD,MAAM,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC;SACjD,QAA2B,CAAC;IAC/B,MAAM,WAAW,GAAG,cAAc,CAAC,gBAAgB,EAAE;QACnD,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,CAAC,GAAG,SAAS,cAAc,CAAC;KAC1C,CAAC,CAAC;IACH,MAAM,kBAAkB,GAAG,IAAA,mCAAqB,EAC9C,WAAW,CACwB,CAAC;IACtC,wBAAwB;QACtB,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;IACvD,OAAO,wBAAwB,CAAC;AAClC,CAAC;AAED,SAAgB,KAAK;IACnB,IAAA,4BAAoB,EAAC,4BAA4B,EAAE,mBAAmB,CAAC,CAAC;AAC1E,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/client-interceptors.d.ts b/node_modules/@grpc/grpc-js/build/src/client-interceptors.d.ts deleted file mode 100644 index 4da2b9c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/client-interceptors.d.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { Metadata } from './metadata'; -import { Listener, MetadataListener, MessageListener, StatusListener, InterceptingListener, MessageContext } from './call-interface'; -import { Status } from './constants'; -import { Channel } from './channel'; -import { CallOptions } from './client'; -import { ClientMethodDefinition } from './make-client'; -import { AuthContext } from './auth-context'; -/** - * Error class associated with passing both interceptors and interceptor - * providers to a client constructor or as call options. - */ -export declare class InterceptorConfigurationError extends Error { - constructor(message: string); -} -export interface MetadataRequester { - (metadata: Metadata, listener: InterceptingListener, next: (metadata: Metadata, listener: InterceptingListener | Listener) => void): void; -} -export interface MessageRequester { - (message: any, next: (message: any) => void): void; -} -export interface CloseRequester { - (next: () => void): void; -} -export interface CancelRequester { - (next: () => void): void; -} -/** - * An object with methods for intercepting and modifying outgoing call operations. - */ -export interface FullRequester { - start: MetadataRequester; - sendMessage: MessageRequester; - halfClose: CloseRequester; - cancel: CancelRequester; -} -export type Requester = Partial; -export declare class ListenerBuilder { - private metadata; - private message; - private status; - withOnReceiveMetadata(onReceiveMetadata: MetadataListener): this; - withOnReceiveMessage(onReceiveMessage: MessageListener): this; - withOnReceiveStatus(onReceiveStatus: StatusListener): this; - build(): Listener; -} -export declare class RequesterBuilder { - private start; - private message; - private halfClose; - private cancel; - withStart(start: MetadataRequester): this; - withSendMessage(sendMessage: MessageRequester): this; - withHalfClose(halfClose: CloseRequester): this; - withCancel(cancel: CancelRequester): this; - build(): Requester; -} -export interface InterceptorOptions extends CallOptions { - method_definition: ClientMethodDefinition; -} -export interface InterceptingCallInterface { - cancelWithStatus(status: Status, details: string): void; - getPeer(): string; - start(metadata: Metadata, listener?: Partial): void; - sendMessageWithContext(context: MessageContext, message: any): void; - sendMessage(message: any): void; - startRead(): void; - halfClose(): void; - getAuthContext(): AuthContext | null; -} -export declare class InterceptingCall implements InterceptingCallInterface { - private nextCall; - /** - * The requester that this InterceptingCall uses to modify outgoing operations - */ - private requester; - /** - * Indicates that metadata has been passed to the requester's start - * method but it has not been passed to the corresponding next callback - */ - private processingMetadata; - /** - * Message context for a pending message that is waiting for - */ - private pendingMessageContext; - private pendingMessage; - /** - * Indicates that a message has been passed to the requester's sendMessage - * method but it has not been passed to the corresponding next callback - */ - private processingMessage; - /** - * Indicates that a status was received but could not be propagated because - * a message was still being processed. - */ - private pendingHalfClose; - constructor(nextCall: InterceptingCallInterface, requester?: Requester); - cancelWithStatus(status: Status, details: string): void; - getPeer(): string; - private processPendingMessage; - private processPendingHalfClose; - start(metadata: Metadata, interceptingListener?: Partial): void; - sendMessageWithContext(context: MessageContext, message: any): void; - sendMessage(message: any): void; - startRead(): void; - halfClose(): void; - getAuthContext(): AuthContext | null; -} -export interface NextCall { - (options: InterceptorOptions): InterceptingCallInterface; -} -export interface Interceptor { - (options: InterceptorOptions, nextCall: NextCall): InterceptingCall; -} -export interface InterceptorProvider { - (methodDefinition: ClientMethodDefinition): Interceptor; -} -export interface InterceptorArguments { - clientInterceptors: Interceptor[]; - clientInterceptorProviders: InterceptorProvider[]; - callInterceptors: Interceptor[]; - callInterceptorProviders: InterceptorProvider[]; -} -export declare function getInterceptingCall(interceptorArgs: InterceptorArguments, methodDefinition: ClientMethodDefinition, options: CallOptions, channel: Channel): InterceptingCallInterface; diff --git a/node_modules/@grpc/grpc-js/build/src/client-interceptors.js b/node_modules/@grpc/grpc-js/build/src/client-interceptors.js deleted file mode 100644 index 51fa979..0000000 --- a/node_modules/@grpc/grpc-js/build/src/client-interceptors.js +++ /dev/null @@ -1,434 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InterceptingCall = exports.RequesterBuilder = exports.ListenerBuilder = exports.InterceptorConfigurationError = void 0; -exports.getInterceptingCall = getInterceptingCall; -const metadata_1 = require("./metadata"); -const call_interface_1 = require("./call-interface"); -const constants_1 = require("./constants"); -const error_1 = require("./error"); -/** - * Error class associated with passing both interceptors and interceptor - * providers to a client constructor or as call options. - */ -class InterceptorConfigurationError extends Error { - constructor(message) { - super(message); - this.name = 'InterceptorConfigurationError'; - Error.captureStackTrace(this, InterceptorConfigurationError); - } -} -exports.InterceptorConfigurationError = InterceptorConfigurationError; -class ListenerBuilder { - constructor() { - this.metadata = undefined; - this.message = undefined; - this.status = undefined; - } - withOnReceiveMetadata(onReceiveMetadata) { - this.metadata = onReceiveMetadata; - return this; - } - withOnReceiveMessage(onReceiveMessage) { - this.message = onReceiveMessage; - return this; - } - withOnReceiveStatus(onReceiveStatus) { - this.status = onReceiveStatus; - return this; - } - build() { - return { - onReceiveMetadata: this.metadata, - onReceiveMessage: this.message, - onReceiveStatus: this.status, - }; - } -} -exports.ListenerBuilder = ListenerBuilder; -class RequesterBuilder { - constructor() { - this.start = undefined; - this.message = undefined; - this.halfClose = undefined; - this.cancel = undefined; - } - withStart(start) { - this.start = start; - return this; - } - withSendMessage(sendMessage) { - this.message = sendMessage; - return this; - } - withHalfClose(halfClose) { - this.halfClose = halfClose; - return this; - } - withCancel(cancel) { - this.cancel = cancel; - return this; - } - build() { - return { - start: this.start, - sendMessage: this.message, - halfClose: this.halfClose, - cancel: this.cancel, - }; - } -} -exports.RequesterBuilder = RequesterBuilder; -/** - * A Listener with a default pass-through implementation of each method. Used - * for filling out Listeners with some methods omitted. - */ -const defaultListener = { - onReceiveMetadata: (metadata, next) => { - next(metadata); - }, - onReceiveMessage: (message, next) => { - next(message); - }, - onReceiveStatus: (status, next) => { - next(status); - }, -}; -/** - * A Requester with a default pass-through implementation of each method. Used - * for filling out Requesters with some methods omitted. - */ -const defaultRequester = { - start: (metadata, listener, next) => { - next(metadata, listener); - }, - sendMessage: (message, next) => { - next(message); - }, - halfClose: next => { - next(); - }, - cancel: next => { - next(); - }, -}; -class InterceptingCall { - constructor(nextCall, requester) { - var _a, _b, _c, _d; - this.nextCall = nextCall; - /** - * Indicates that metadata has been passed to the requester's start - * method but it has not been passed to the corresponding next callback - */ - this.processingMetadata = false; - /** - * Message context for a pending message that is waiting for - */ - this.pendingMessageContext = null; - /** - * Indicates that a message has been passed to the requester's sendMessage - * method but it has not been passed to the corresponding next callback - */ - this.processingMessage = false; - /** - * Indicates that a status was received but could not be propagated because - * a message was still being processed. - */ - this.pendingHalfClose = false; - if (requester) { - this.requester = { - start: (_a = requester.start) !== null && _a !== void 0 ? _a : defaultRequester.start, - sendMessage: (_b = requester.sendMessage) !== null && _b !== void 0 ? _b : defaultRequester.sendMessage, - halfClose: (_c = requester.halfClose) !== null && _c !== void 0 ? _c : defaultRequester.halfClose, - cancel: (_d = requester.cancel) !== null && _d !== void 0 ? _d : defaultRequester.cancel, - }; - } - else { - this.requester = defaultRequester; - } - } - cancelWithStatus(status, details) { - this.requester.cancel(() => { - this.nextCall.cancelWithStatus(status, details); - }); - } - getPeer() { - return this.nextCall.getPeer(); - } - processPendingMessage() { - if (this.pendingMessageContext) { - this.nextCall.sendMessageWithContext(this.pendingMessageContext, this.pendingMessage); - this.pendingMessageContext = null; - this.pendingMessage = null; - } - } - processPendingHalfClose() { - if (this.pendingHalfClose) { - this.nextCall.halfClose(); - } - } - start(metadata, interceptingListener) { - var _a, _b, _c, _d, _e, _f; - const fullInterceptingListener = { - onReceiveMetadata: (_b = (_a = interceptingListener === null || interceptingListener === void 0 ? void 0 : interceptingListener.onReceiveMetadata) === null || _a === void 0 ? void 0 : _a.bind(interceptingListener)) !== null && _b !== void 0 ? _b : (metadata => { }), - onReceiveMessage: (_d = (_c = interceptingListener === null || interceptingListener === void 0 ? void 0 : interceptingListener.onReceiveMessage) === null || _c === void 0 ? void 0 : _c.bind(interceptingListener)) !== null && _d !== void 0 ? _d : (message => { }), - onReceiveStatus: (_f = (_e = interceptingListener === null || interceptingListener === void 0 ? void 0 : interceptingListener.onReceiveStatus) === null || _e === void 0 ? void 0 : _e.bind(interceptingListener)) !== null && _f !== void 0 ? _f : (status => { }), - }; - this.processingMetadata = true; - this.requester.start(metadata, fullInterceptingListener, (md, listener) => { - var _a, _b, _c; - this.processingMetadata = false; - let finalInterceptingListener; - if ((0, call_interface_1.isInterceptingListener)(listener)) { - finalInterceptingListener = listener; - } - else { - const fullListener = { - onReceiveMetadata: (_a = listener.onReceiveMetadata) !== null && _a !== void 0 ? _a : defaultListener.onReceiveMetadata, - onReceiveMessage: (_b = listener.onReceiveMessage) !== null && _b !== void 0 ? _b : defaultListener.onReceiveMessage, - onReceiveStatus: (_c = listener.onReceiveStatus) !== null && _c !== void 0 ? _c : defaultListener.onReceiveStatus, - }; - finalInterceptingListener = new call_interface_1.InterceptingListenerImpl(fullListener, fullInterceptingListener); - } - this.nextCall.start(md, finalInterceptingListener); - this.processPendingMessage(); - this.processPendingHalfClose(); - }); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - sendMessageWithContext(context, message) { - this.processingMessage = true; - this.requester.sendMessage(message, finalMessage => { - this.processingMessage = false; - if (this.processingMetadata) { - this.pendingMessageContext = context; - this.pendingMessage = message; - } - else { - this.nextCall.sendMessageWithContext(context, finalMessage); - this.processPendingHalfClose(); - } - }); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - sendMessage(message) { - this.sendMessageWithContext({}, message); - } - startRead() { - this.nextCall.startRead(); - } - halfClose() { - this.requester.halfClose(() => { - if (this.processingMetadata || this.processingMessage) { - this.pendingHalfClose = true; - } - else { - this.nextCall.halfClose(); - } - }); - } - getAuthContext() { - return this.nextCall.getAuthContext(); - } -} -exports.InterceptingCall = InterceptingCall; -function getCall(channel, path, options) { - var _a, _b; - const deadline = (_a = options.deadline) !== null && _a !== void 0 ? _a : Infinity; - const host = options.host; - const parent = (_b = options.parent) !== null && _b !== void 0 ? _b : null; - const propagateFlags = options.propagate_flags; - const credentials = options.credentials; - const call = channel.createCall(path, deadline, host, parent, propagateFlags); - if (credentials) { - call.setCredentials(credentials); - } - return call; -} -/** - * InterceptingCall implementation that directly owns the underlying Call - * object and handles serialization and deseraizliation. - */ -class BaseInterceptingCall { - constructor(call, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - methodDefinition) { - this.call = call; - this.methodDefinition = methodDefinition; - } - cancelWithStatus(status, details) { - this.call.cancelWithStatus(status, details); - } - getPeer() { - return this.call.getPeer(); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - sendMessageWithContext(context, message) { - let serialized; - try { - serialized = this.methodDefinition.requestSerialize(message); - } - catch (e) { - this.call.cancelWithStatus(constants_1.Status.INTERNAL, `Request message serialization failure: ${(0, error_1.getErrorMessage)(e)}`); - return; - } - this.call.sendMessageWithContext(context, serialized); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - sendMessage(message) { - this.sendMessageWithContext({}, message); - } - start(metadata, interceptingListener) { - let readError = null; - this.call.start(metadata, { - onReceiveMetadata: metadata => { - var _a; - (_a = interceptingListener === null || interceptingListener === void 0 ? void 0 : interceptingListener.onReceiveMetadata) === null || _a === void 0 ? void 0 : _a.call(interceptingListener, metadata); - }, - onReceiveMessage: message => { - var _a; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let deserialized; - try { - deserialized = this.methodDefinition.responseDeserialize(message); - } - catch (e) { - readError = { - code: constants_1.Status.INTERNAL, - details: `Response message parsing error: ${(0, error_1.getErrorMessage)(e)}`, - metadata: new metadata_1.Metadata(), - }; - this.call.cancelWithStatus(readError.code, readError.details); - return; - } - (_a = interceptingListener === null || interceptingListener === void 0 ? void 0 : interceptingListener.onReceiveMessage) === null || _a === void 0 ? void 0 : _a.call(interceptingListener, deserialized); - }, - onReceiveStatus: status => { - var _a, _b; - if (readError) { - (_a = interceptingListener === null || interceptingListener === void 0 ? void 0 : interceptingListener.onReceiveStatus) === null || _a === void 0 ? void 0 : _a.call(interceptingListener, readError); - } - else { - (_b = interceptingListener === null || interceptingListener === void 0 ? void 0 : interceptingListener.onReceiveStatus) === null || _b === void 0 ? void 0 : _b.call(interceptingListener, status); - } - }, - }); - } - startRead() { - this.call.startRead(); - } - halfClose() { - this.call.halfClose(); - } - getAuthContext() { - return this.call.getAuthContext(); - } -} -/** - * BaseInterceptingCall with special-cased behavior for methods with unary - * responses. - */ -class BaseUnaryInterceptingCall extends BaseInterceptingCall { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - constructor(call, methodDefinition) { - super(call, methodDefinition); - } - start(metadata, listener) { - var _a, _b; - let receivedMessage = false; - const wrapperListener = { - onReceiveMetadata: (_b = (_a = listener === null || listener === void 0 ? void 0 : listener.onReceiveMetadata) === null || _a === void 0 ? void 0 : _a.bind(listener)) !== null && _b !== void 0 ? _b : (metadata => { }), - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onReceiveMessage: (message) => { - var _a; - receivedMessage = true; - (_a = listener === null || listener === void 0 ? void 0 : listener.onReceiveMessage) === null || _a === void 0 ? void 0 : _a.call(listener, message); - }, - onReceiveStatus: (status) => { - var _a, _b; - if (!receivedMessage) { - (_a = listener === null || listener === void 0 ? void 0 : listener.onReceiveMessage) === null || _a === void 0 ? void 0 : _a.call(listener, null); - } - (_b = listener === null || listener === void 0 ? void 0 : listener.onReceiveStatus) === null || _b === void 0 ? void 0 : _b.call(listener, status); - }, - }; - super.start(metadata, wrapperListener); - this.call.startRead(); - } -} -/** - * BaseInterceptingCall with special-cased behavior for methods with streaming - * responses. - */ -class BaseStreamingInterceptingCall extends BaseInterceptingCall { -} -function getBottomInterceptingCall(channel, options, -// eslint-disable-next-line @typescript-eslint/no-explicit-any -methodDefinition) { - const call = getCall(channel, methodDefinition.path, options); - if (methodDefinition.responseStream) { - return new BaseStreamingInterceptingCall(call, methodDefinition); - } - else { - return new BaseUnaryInterceptingCall(call, methodDefinition); - } -} -function getInterceptingCall(interceptorArgs, -// eslint-disable-next-line @typescript-eslint/no-explicit-any -methodDefinition, options, channel) { - if (interceptorArgs.clientInterceptors.length > 0 && - interceptorArgs.clientInterceptorProviders.length > 0) { - throw new InterceptorConfigurationError('Both interceptors and interceptor_providers were passed as options ' + - 'to the client constructor. Only one of these is allowed.'); - } - if (interceptorArgs.callInterceptors.length > 0 && - interceptorArgs.callInterceptorProviders.length > 0) { - throw new InterceptorConfigurationError('Both interceptors and interceptor_providers were passed as call ' + - 'options. Only one of these is allowed.'); - } - let interceptors = []; - // Interceptors passed to the call override interceptors passed to the client constructor - if (interceptorArgs.callInterceptors.length > 0 || - interceptorArgs.callInterceptorProviders.length > 0) { - interceptors = [] - .concat(interceptorArgs.callInterceptors, interceptorArgs.callInterceptorProviders.map(provider => provider(methodDefinition))) - .filter(interceptor => interceptor); - // Filter out falsy values when providers return nothing - } - else { - interceptors = [] - .concat(interceptorArgs.clientInterceptors, interceptorArgs.clientInterceptorProviders.map(provider => provider(methodDefinition))) - .filter(interceptor => interceptor); - // Filter out falsy values when providers return nothing - } - const interceptorOptions = Object.assign({}, options, { - method_definition: methodDefinition, - }); - /* For each interceptor in the list, the nextCall function passed to it is - * based on the next interceptor in the list, using a nextCall function - * constructed with the following interceptor in the list, and so on. The - * initialValue, which is effectively at the end of the list, is a nextCall - * function that invokes getBottomInterceptingCall, the result of which - * handles (de)serialization and also gets the underlying call from the - * channel. */ - const getCall = interceptors.reduceRight((nextCall, nextInterceptor) => { - return currentOptions => nextInterceptor(currentOptions, nextCall); - }, (finalOptions) => getBottomInterceptingCall(channel, finalOptions, methodDefinition)); - return getCall(interceptorOptions); -} -//# sourceMappingURL=client-interceptors.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/client-interceptors.js.map b/node_modules/@grpc/grpc-js/build/src/client-interceptors.js.map deleted file mode 100644 index 9a961ea..0000000 --- a/node_modules/@grpc/grpc-js/build/src/client-interceptors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client-interceptors.js","sourceRoot":"","sources":["../../src/client-interceptors.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAofH,kDAqEC;AAvjBD,yCAAsC;AACtC,qDAY0B;AAC1B,2CAAqC;AAIrC,mCAA0C;AAG1C;;;GAGG;AACH,MAAa,6BAA8B,SAAQ,KAAK;IACtD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAC;QAC5C,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,6BAA6B,CAAC,CAAC;IAC/D,CAAC;CACF;AAND,sEAMC;AAsCD,MAAa,eAAe;IAA5B;QACU,aAAQ,GAAiC,SAAS,CAAC;QACnD,YAAO,GAAgC,SAAS,CAAC;QACjD,WAAM,GAA+B,SAAS,CAAC;IAwBzD,CAAC;IAtBC,qBAAqB,CAAC,iBAAmC;QACvD,IAAI,CAAC,QAAQ,GAAG,iBAAiB,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oBAAoB,CAAC,gBAAiC;QACpD,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,mBAAmB,CAAC,eAA+B;QACjD,IAAI,CAAC,MAAM,GAAG,eAAe,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;QACH,OAAO;YACL,iBAAiB,EAAE,IAAI,CAAC,QAAQ;YAChC,gBAAgB,EAAE,IAAI,CAAC,OAAO;YAC9B,eAAe,EAAE,IAAI,CAAC,MAAM;SAC7B,CAAC;IACJ,CAAC;CACF;AA3BD,0CA2BC;AAED,MAAa,gBAAgB;IAA7B;QACU,UAAK,GAAkC,SAAS,CAAC;QACjD,YAAO,GAAiC,SAAS,CAAC;QAClD,cAAS,GAA+B,SAAS,CAAC;QAClD,WA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,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE;QACpD,iBAAiB,EAAE,gBAAgB;KACpC,CAAC,CAAC;IACH;;;;;;kBAMc;IACd,MAAM,OAAO,GAAa,YAAY,CAAC,WAAW,CAChD,CAAC,QAAkB,EAAE,eAA4B,EAAE,EAAE;QACnD,OAAO,cAAc,CAAC,EAAE,CAAC,eAAe,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACrE,CAAC,EACD,CAAC,YAAgC,EAAE,EAAE,CACnC,yBAAyB,CAAC,OAAO,EAAE,YAAY,EAAE,gBAAgB,CAAC,CACrE,CAAC;IACF,OAAO,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/client.d.ts b/node_modules/@grpc/grpc-js/build/src/client.d.ts deleted file mode 100644 index 5c71ae4..0000000 --- a/node_modules/@grpc/grpc-js/build/src/client.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { ClientDuplexStream, ClientReadableStream, ClientUnaryCall, ClientWritableStream, ServiceError, SurfaceCall } from './call'; -import { CallCredentials } from './call-credentials'; -import { Channel } from './channel'; -import { ChannelCredentials } from './channel-credentials'; -import { ChannelOptions } from './channel-options'; -import { Metadata } from './metadata'; -import { ClientMethodDefinition } from './make-client'; -import { Interceptor, InterceptorProvider } from './client-interceptors'; -import { ServerUnaryCall, ServerReadableStream, ServerWritableStream, ServerDuplexStream } from './server-call'; -import { Deadline } from './deadline'; -declare const CHANNEL_SYMBOL: unique symbol; -declare const INTERCEPTOR_SYMBOL: unique symbol; -declare const INTERCEPTOR_PROVIDER_SYMBOL: unique symbol; -declare const CALL_INVOCATION_TRANSFORMER_SYMBOL: unique symbol; -export interface UnaryCallback { - (err: ServiceError | null, value?: ResponseType): void; -} -export interface CallOptions { - deadline?: Deadline; - host?: string; - parent?: ServerUnaryCall | ServerReadableStream | ServerWritableStream | ServerDuplexStream; - propagate_flags?: number; - credentials?: CallCredentials; - interceptors?: Interceptor[]; - interceptor_providers?: InterceptorProvider[]; -} -export interface CallProperties { - argument?: RequestType; - metadata: Metadata; - call: SurfaceCall; - channel: Channel; - methodDefinition: ClientMethodDefinition; - callOptions: CallOptions; - callback?: UnaryCallback; -} -export interface CallInvocationTransformer { - (callProperties: CallProperties): CallProperties; -} -export type ClientOptions = Partial & { - channelOverride?: Channel; - channelFactoryOverride?: (address: string, credentials: ChannelCredentials, options: ClientOptions) => Channel; - interceptors?: Interceptor[]; - interceptor_providers?: InterceptorProvider[]; - callInvocationTransformer?: CallInvocationTransformer; -}; -/** - * A generic gRPC client. Primarily useful as a base class for all generated - * clients. - */ -export declare class Client { - private readonly [CHANNEL_SYMBOL]; - private readonly [INTERCEPTOR_SYMBOL]; - private readonly [INTERCEPTOR_PROVIDER_SYMBOL]; - private readonly [CALL_INVOCATION_TRANSFORMER_SYMBOL]?; - constructor(address: string, credentials: ChannelCredentials, options?: ClientOptions); - close(): void; - getChannel(): Channel; - waitForReady(deadline: Deadline, callback: (error?: Error) => void): void; - private checkOptionalUnaryResponseArguments; - makeUnaryRequest(method: string, serialize: (value: RequestType) => Buffer, deserialize: (value: Buffer) => ResponseType, argument: RequestType, metadata: Metadata, options: CallOptions, callback: UnaryCallback): ClientUnaryCall; - makeUnaryRequest(method: string, serialize: (value: RequestType) => Buffer, deserialize: (value: Buffer) => ResponseType, argument: RequestType, metadata: Metadata, callback: UnaryCallback): ClientUnaryCall; - makeUnaryRequest(method: string, serialize: (value: RequestType) => Buffer, deserialize: (value: Buffer) => ResponseType, argument: RequestType, options: CallOptions, callback: UnaryCallback): ClientUnaryCall; - makeUnaryRequest(method: string, serialize: (value: RequestType) => Buffer, deserialize: (value: Buffer) => ResponseType, argument: RequestType, callback: UnaryCallback): ClientUnaryCall; - makeClientStreamRequest(method: string, serialize: (value: RequestType) => Buffer, deserialize: (value: Buffer) => ResponseType, metadata: Metadata, options: CallOptions, callback: UnaryCallback): ClientWritableStream; - makeClientStreamRequest(method: string, serialize: (value: RequestType) => Buffer, deserialize: (value: Buffer) => ResponseType, metadata: Metadata, callback: UnaryCallback): ClientWritableStream; - makeClientStreamRequest(method: string, serialize: (value: RequestType) => Buffer, deserialize: (value: Buffer) => ResponseType, options: CallOptions, callback: UnaryCallback): ClientWritableStream; - makeClientStreamRequest(method: string, serialize: (value: RequestType) => Buffer, deserialize: (value: Buffer) => ResponseType, callback: UnaryCallback): ClientWritableStream; - private checkMetadataAndOptions; - makeServerStreamRequest(method: string, serialize: (value: RequestType) => Buffer, deserialize: (value: Buffer) => ResponseType, argument: RequestType, metadata: Metadata, options?: CallOptions): ClientReadableStream; - makeServerStreamRequest(method: string, serialize: (value: RequestType) => Buffer, deserialize: (value: Buffer) => ResponseType, argument: RequestType, options?: CallOptions): ClientReadableStream; - makeBidiStreamRequest(method: string, serialize: (value: RequestType) => Buffer, deserialize: (value: Buffer) => ResponseType, metadata: Metadata, options?: CallOptions): ClientDuplexStream; - makeBidiStreamRequest(method: string, serialize: (value: RequestType) => Buffer, deserialize: (value: Buffer) => ResponseType, options?: CallOptions): ClientDuplexStream; -} -export {}; diff --git a/node_modules/@grpc/grpc-js/build/src/client.js b/node_modules/@grpc/grpc-js/build/src/client.js deleted file mode 100644 index 9cd559a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/client.js +++ /dev/null @@ -1,433 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Client = void 0; -const call_1 = require("./call"); -const channel_1 = require("./channel"); -const connectivity_state_1 = require("./connectivity-state"); -const constants_1 = require("./constants"); -const metadata_1 = require("./metadata"); -const client_interceptors_1 = require("./client-interceptors"); -const CHANNEL_SYMBOL = Symbol(); -const INTERCEPTOR_SYMBOL = Symbol(); -const INTERCEPTOR_PROVIDER_SYMBOL = Symbol(); -const CALL_INVOCATION_TRANSFORMER_SYMBOL = Symbol(); -function isFunction(arg) { - return typeof arg === 'function'; -} -function getErrorStackString(error) { - var _a; - return ((_a = error.stack) === null || _a === void 0 ? void 0 : _a.split('\n').slice(1).join('\n')) || 'no stack trace available'; -} -/** - * A generic gRPC client. Primarily useful as a base class for all generated - * clients. - */ -class Client { - constructor(address, credentials, options = {}) { - var _a, _b; - options = Object.assign({}, options); - this[INTERCEPTOR_SYMBOL] = (_a = options.interceptors) !== null && _a !== void 0 ? _a : []; - delete options.interceptors; - this[INTERCEPTOR_PROVIDER_SYMBOL] = (_b = options.interceptor_providers) !== null && _b !== void 0 ? _b : []; - delete options.interceptor_providers; - if (this[INTERCEPTOR_SYMBOL].length > 0 && - this[INTERCEPTOR_PROVIDER_SYMBOL].length > 0) { - throw new Error('Both interceptors and interceptor_providers were passed as options ' + - 'to the client constructor. Only one of these is allowed.'); - } - this[CALL_INVOCATION_TRANSFORMER_SYMBOL] = - options.callInvocationTransformer; - delete options.callInvocationTransformer; - if (options.channelOverride) { - this[CHANNEL_SYMBOL] = options.channelOverride; - } - else if (options.channelFactoryOverride) { - const channelFactoryOverride = options.channelFactoryOverride; - delete options.channelFactoryOverride; - this[CHANNEL_SYMBOL] = channelFactoryOverride(address, credentials, options); - } - else { - this[CHANNEL_SYMBOL] = new channel_1.ChannelImplementation(address, credentials, options); - } - } - close() { - this[CHANNEL_SYMBOL].close(); - } - getChannel() { - return this[CHANNEL_SYMBOL]; - } - waitForReady(deadline, callback) { - const checkState = (err) => { - if (err) { - callback(new Error('Failed to connect before the deadline')); - return; - } - let newState; - try { - newState = this[CHANNEL_SYMBOL].getConnectivityState(true); - } - catch (e) { - callback(new Error('The channel has been closed')); - return; - } - if (newState === connectivity_state_1.ConnectivityState.READY) { - callback(); - } - else { - try { - this[CHANNEL_SYMBOL].watchConnectivityState(newState, deadline, checkState); - } - catch (e) { - callback(new Error('The channel has been closed')); - } - } - }; - setImmediate(checkState); - } - checkOptionalUnaryResponseArguments(arg1, arg2, arg3) { - if (isFunction(arg1)) { - return { metadata: new metadata_1.Metadata(), options: {}, callback: arg1 }; - } - else if (isFunction(arg2)) { - if (arg1 instanceof metadata_1.Metadata) { - return { metadata: arg1, options: {}, callback: arg2 }; - } - else { - return { metadata: new metadata_1.Metadata(), options: arg1, callback: arg2 }; - } - } - else { - if (!(arg1 instanceof metadata_1.Metadata && - arg2 instanceof Object && - isFunction(arg3))) { - throw new Error('Incorrect arguments passed'); - } - return { metadata: arg1, options: arg2, callback: arg3 }; - } - } - makeUnaryRequest(method, serialize, deserialize, argument, metadata, options, callback) { - var _a, _b; - const checkedArguments = this.checkOptionalUnaryResponseArguments(metadata, options, callback); - const methodDefinition = { - path: method, - requestStream: false, - responseStream: false, - requestSerialize: serialize, - responseDeserialize: deserialize, - }; - let callProperties = { - argument: argument, - metadata: checkedArguments.metadata, - call: new call_1.ClientUnaryCallImpl(), - channel: this[CHANNEL_SYMBOL], - methodDefinition: methodDefinition, - callOptions: checkedArguments.options, - callback: checkedArguments.callback, - }; - if (this[CALL_INVOCATION_TRANSFORMER_SYMBOL]) { - callProperties = this[CALL_INVOCATION_TRANSFORMER_SYMBOL](callProperties); - } - const emitter = callProperties.call; - const interceptorArgs = { - clientInterceptors: this[INTERCEPTOR_SYMBOL], - clientInterceptorProviders: this[INTERCEPTOR_PROVIDER_SYMBOL], - callInterceptors: (_a = callProperties.callOptions.interceptors) !== null && _a !== void 0 ? _a : [], - callInterceptorProviders: (_b = callProperties.callOptions.interceptor_providers) !== null && _b !== void 0 ? _b : [], - }; - const call = (0, client_interceptors_1.getInterceptingCall)(interceptorArgs, callProperties.methodDefinition, callProperties.callOptions, callProperties.channel); - /* This needs to happen before the emitter is used. Unfortunately we can't - * enforce this with the type system. We need to construct this emitter - * before calling the CallInvocationTransformer, and we need to create the - * call after that. */ - emitter.call = call; - let responseMessage = null; - let receivedStatus = false; - let callerStackError = new Error(); - call.start(callProperties.metadata, { - onReceiveMetadata: metadata => { - emitter.emit('metadata', metadata); - }, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onReceiveMessage(message) { - if (responseMessage !== null) { - call.cancelWithStatus(constants_1.Status.UNIMPLEMENTED, 'Too many responses received'); - } - responseMessage = message; - }, - onReceiveStatus(status) { - if (receivedStatus) { - return; - } - receivedStatus = true; - if (status.code === constants_1.Status.OK) { - if (responseMessage === null) { - const callerStack = getErrorStackString(callerStackError); - callProperties.callback((0, call_1.callErrorFromStatus)({ - code: constants_1.Status.UNIMPLEMENTED, - details: 'No message received', - metadata: status.metadata, - }, callerStack)); - } - else { - callProperties.callback(null, responseMessage); - } - } - else { - const callerStack = getErrorStackString(callerStackError); - callProperties.callback((0, call_1.callErrorFromStatus)(status, callerStack)); - } - /* Avoid retaining the callerStackError object in the call context of - * the status event handler. */ - callerStackError = null; - emitter.emit('status', status); - }, - }); - call.sendMessage(argument); - call.halfClose(); - return emitter; - } - makeClientStreamRequest(method, serialize, deserialize, metadata, options, callback) { - var _a, _b; - const checkedArguments = this.checkOptionalUnaryResponseArguments(metadata, options, callback); - const methodDefinition = { - path: method, - requestStream: true, - responseStream: false, - requestSerialize: serialize, - responseDeserialize: deserialize, - }; - let callProperties = { - metadata: checkedArguments.metadata, - call: new call_1.ClientWritableStreamImpl(serialize), - channel: this[CHANNEL_SYMBOL], - methodDefinition: methodDefinition, - callOptions: checkedArguments.options, - callback: checkedArguments.callback, - }; - if (this[CALL_INVOCATION_TRANSFORMER_SYMBOL]) { - callProperties = this[CALL_INVOCATION_TRANSFORMER_SYMBOL](callProperties); - } - const emitter = callProperties.call; - const interceptorArgs = { - clientInterceptors: this[INTERCEPTOR_SYMBOL], - clientInterceptorProviders: this[INTERCEPTOR_PROVIDER_SYMBOL], - callInterceptors: (_a = callProperties.callOptions.interceptors) !== null && _a !== void 0 ? _a : [], - callInterceptorProviders: (_b = callProperties.callOptions.interceptor_providers) !== null && _b !== void 0 ? _b : [], - }; - const call = (0, client_interceptors_1.getInterceptingCall)(interceptorArgs, callProperties.methodDefinition, callProperties.callOptions, callProperties.channel); - /* This needs to happen before the emitter is used. Unfortunately we can't - * enforce this with the type system. We need to construct this emitter - * before calling the CallInvocationTransformer, and we need to create the - * call after that. */ - emitter.call = call; - let responseMessage = null; - let receivedStatus = false; - let callerStackError = new Error(); - call.start(callProperties.metadata, { - onReceiveMetadata: metadata => { - emitter.emit('metadata', metadata); - }, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onReceiveMessage(message) { - if (responseMessage !== null) { - call.cancelWithStatus(constants_1.Status.UNIMPLEMENTED, 'Too many responses received'); - } - responseMessage = message; - call.startRead(); - }, - onReceiveStatus(status) { - if (receivedStatus) { - return; - } - receivedStatus = true; - if (status.code === constants_1.Status.OK) { - if (responseMessage === null) { - const callerStack = getErrorStackString(callerStackError); - callProperties.callback((0, call_1.callErrorFromStatus)({ - code: constants_1.Status.UNIMPLEMENTED, - details: 'No message received', - metadata: status.metadata, - }, callerStack)); - } - else { - callProperties.callback(null, responseMessage); - } - } - else { - const callerStack = getErrorStackString(callerStackError); - callProperties.callback((0, call_1.callErrorFromStatus)(status, callerStack)); - } - /* Avoid retaining the callerStackError object in the call context of - * the status event handler. */ - callerStackError = null; - emitter.emit('status', status); - }, - }); - return emitter; - } - checkMetadataAndOptions(arg1, arg2) { - let metadata; - let options; - if (arg1 instanceof metadata_1.Metadata) { - metadata = arg1; - if (arg2) { - options = arg2; - } - else { - options = {}; - } - } - else { - if (arg1) { - options = arg1; - } - else { - options = {}; - } - metadata = new metadata_1.Metadata(); - } - return { metadata, options }; - } - makeServerStreamRequest(method, serialize, deserialize, argument, metadata, options) { - var _a, _b; - const checkedArguments = this.checkMetadataAndOptions(metadata, options); - const methodDefinition = { - path: method, - requestStream: false, - responseStream: true, - requestSerialize: serialize, - responseDeserialize: deserialize, - }; - let callProperties = { - argument: argument, - metadata: checkedArguments.metadata, - call: new call_1.ClientReadableStreamImpl(deserialize), - channel: this[CHANNEL_SYMBOL], - methodDefinition: methodDefinition, - callOptions: checkedArguments.options, - }; - if (this[CALL_INVOCATION_TRANSFORMER_SYMBOL]) { - callProperties = this[CALL_INVOCATION_TRANSFORMER_SYMBOL](callProperties); - } - const stream = callProperties.call; - const interceptorArgs = { - clientInterceptors: this[INTERCEPTOR_SYMBOL], - clientInterceptorProviders: this[INTERCEPTOR_PROVIDER_SYMBOL], - callInterceptors: (_a = callProperties.callOptions.interceptors) !== null && _a !== void 0 ? _a : [], - callInterceptorProviders: (_b = callProperties.callOptions.interceptor_providers) !== null && _b !== void 0 ? _b : [], - }; - const call = (0, client_interceptors_1.getInterceptingCall)(interceptorArgs, callProperties.methodDefinition, callProperties.callOptions, callProperties.channel); - /* This needs to happen before the emitter is used. Unfortunately we can't - * enforce this with the type system. We need to construct this emitter - * before calling the CallInvocationTransformer, and we need to create the - * call after that. */ - stream.call = call; - let receivedStatus = false; - let callerStackError = new Error(); - call.start(callProperties.metadata, { - onReceiveMetadata(metadata) { - stream.emit('metadata', metadata); - }, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onReceiveMessage(message) { - stream.push(message); - }, - onReceiveStatus(status) { - if (receivedStatus) { - return; - } - receivedStatus = true; - stream.push(null); - if (status.code !== constants_1.Status.OK) { - const callerStack = getErrorStackString(callerStackError); - stream.emit('error', (0, call_1.callErrorFromStatus)(status, callerStack)); - } - /* Avoid retaining the callerStackError object in the call context of - * the status event handler. */ - callerStackError = null; - stream.emit('status', status); - }, - }); - call.sendMessage(argument); - call.halfClose(); - return stream; - } - makeBidiStreamRequest(method, serialize, deserialize, metadata, options) { - var _a, _b; - const checkedArguments = this.checkMetadataAndOptions(metadata, options); - const methodDefinition = { - path: method, - requestStream: true, - responseStream: true, - requestSerialize: serialize, - responseDeserialize: deserialize, - }; - let callProperties = { - metadata: checkedArguments.metadata, - call: new call_1.ClientDuplexStreamImpl(serialize, deserialize), - channel: this[CHANNEL_SYMBOL], - methodDefinition: methodDefinition, - callOptions: checkedArguments.options, - }; - if (this[CALL_INVOCATION_TRANSFORMER_SYMBOL]) { - callProperties = this[CALL_INVOCATION_TRANSFORMER_SYMBOL](callProperties); - } - const stream = callProperties.call; - const interceptorArgs = { - clientInterceptors: this[INTERCEPTOR_SYMBOL], - clientInterceptorProviders: this[INTERCEPTOR_PROVIDER_SYMBOL], - callInterceptors: (_a = callProperties.callOptions.interceptors) !== null && _a !== void 0 ? _a : [], - callInterceptorProviders: (_b = callProperties.callOptions.interceptor_providers) !== null && _b !== void 0 ? _b : [], - }; - const call = (0, client_interceptors_1.getInterceptingCall)(interceptorArgs, callProperties.methodDefinition, callProperties.callOptions, callProperties.channel); - /* This needs to happen before the emitter is used. Unfortunately we can't - * enforce this with the type system. We need to construct this emitter - * before calling the CallInvocationTransformer, and we need to create the - * call after that. */ - stream.call = call; - let receivedStatus = false; - let callerStackError = new Error(); - call.start(callProperties.metadata, { - onReceiveMetadata(metadata) { - stream.emit('metadata', metadata); - }, - onReceiveMessage(message) { - stream.push(message); - }, - onReceiveStatus(status) { - if (receivedStatus) { - return; - } - receivedStatus = true; - stream.push(null); - if (status.code !== constants_1.Status.OK) { - const callerStack = getErrorStackString(callerStackError); - stream.emit('error', (0, call_1.callErrorFromStatus)(status, callerStack)); - } - /* Avoid retaining the callerStackError object in the call context of - * the status event handler. */ - callerStackError = null; - stream.emit('status', status); - }, - }); - return stream; - } -} -exports.Client = Client; -//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/client.js.map b/node_modules/@grpc/grpc-js/build/src/client.js.map deleted file mode 100644 index 8b62cc5..0000000 --- a/node_modules/@grpc/grpc-js/build/src/client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":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cAAc,CAAC,QAAQ,EAAE;YAClC,iBAAiB,CAAC,QAAkB;gBAClC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;YACpC,CAAC;YACD,gBAAgB,CAAC,OAAe;gBAC9B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;YACD,eAAe,CAAC,MAAoB;gBAClC,IAAI,cAAc,EAAE,CAAC;oBACnB,OAAO;gBACT,CAAC;gBACD,cAAc,GAAG,IAAI,CAAC;gBACtB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAClB,IAAI,MAAM,CAAC,IAAI,KAAK,kBAAM,CAAC,EAAE,EAAE,CAAC;oBAC9B,MAAM,WAAW,GAAG,mBAAmB,CAAC,gBAAiB,CAAC,CAAC;oBAC3D,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAA,0BAAmB,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;gBACjE,CAAC;gBACD;+CAC+B;gBAC/B,gBAAgB,GAAG,IAAI,CAAC;gBACxB,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAChC,CAAC;SACF,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAplBD,wBAolBC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/compression-algorithms.d.ts b/node_modules/@grpc/grpc-js/build/src/compression-algorithms.d.ts deleted file mode 100644 index 555b222..0000000 --- a/node_modules/@grpc/grpc-js/build/src/compression-algorithms.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum CompressionAlgorithms { - identity = 0, - deflate = 1, - gzip = 2 -} diff --git a/node_modules/@grpc/grpc-js/build/src/compression-algorithms.js b/node_modules/@grpc/grpc-js/build/src/compression-algorithms.js deleted file mode 100644 index 15a4f00..0000000 --- a/node_modules/@grpc/grpc-js/build/src/compression-algorithms.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -/* - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CompressionAlgorithms = void 0; -var CompressionAlgorithms; -(function (CompressionAlgorithms) { - CompressionAlgorithms[CompressionAlgorithms["identity"] = 0] = "identity"; - CompressionAlgorithms[CompressionAlgorithms["deflate"] = 1] = "deflate"; - CompressionAlgorithms[CompressionAlgorithms["gzip"] = 2] = "gzip"; -})(CompressionAlgorithms || (exports.CompressionAlgorithms = CompressionAlgorithms = {})); -//# sourceMappingURL=compression-algorithms.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/compression-algorithms.js.map b/node_modules/@grpc/grpc-js/build/src/compression-algorithms.js.map deleted file mode 100644 index 760772f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/compression-algorithms.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"compression-algorithms.js","sourceRoot":"","sources":["../../src/compression-algorithms.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,yEAAY,CAAA;IACZ,uEAAW,CAAA;IACX,iEAAQ,CAAA;AACV,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/compression-filter.d.ts b/node_modules/@grpc/grpc-js/build/src/compression-filter.d.ts deleted file mode 100644 index d1667c3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/compression-filter.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { WriteObject } from './call-interface'; -import { Channel } from './channel'; -import { ChannelOptions } from './channel-options'; -import { BaseFilter, Filter, FilterFactory } from './filter'; -import { Metadata } from './metadata'; -type SharedCompressionFilterConfig = { - serverSupportedEncodingHeader?: string; -}; -export declare class CompressionFilter extends BaseFilter implements Filter { - private sharedFilterConfig; - private sendCompression; - private receiveCompression; - private currentCompressionAlgorithm; - private maxReceiveMessageLength; - private maxSendMessageLength; - constructor(channelOptions: ChannelOptions, sharedFilterConfig: SharedCompressionFilterConfig); - sendMetadata(metadata: Promise): Promise; - receiveMetadata(metadata: Metadata): Metadata; - sendMessage(message: Promise): Promise; - receiveMessage(message: Promise): Promise>; -} -export declare class CompressionFilterFactory implements FilterFactory { - private readonly options; - private sharedFilterConfig; - constructor(channel: Channel, options: ChannelOptions); - createFilter(): CompressionFilter; -} -export {}; diff --git a/node_modules/@grpc/grpc-js/build/src/compression-filter.js b/node_modules/@grpc/grpc-js/build/src/compression-filter.js deleted file mode 100644 index a3d422a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/compression-filter.js +++ /dev/null @@ -1,307 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CompressionFilterFactory = exports.CompressionFilter = void 0; -const zlib = require("zlib"); -const compression_algorithms_1 = require("./compression-algorithms"); -const constants_1 = require("./constants"); -const filter_1 = require("./filter"); -const logging = require("./logging"); -const isCompressionAlgorithmKey = (key) => { - return (typeof key === 'number' && typeof compression_algorithms_1.CompressionAlgorithms[key] === 'string'); -}; -class CompressionHandler { - /** - * @param message Raw uncompressed message bytes - * @param compress Indicates whether the message should be compressed - * @return Framed message, compressed if applicable - */ - async writeMessage(message, compress) { - let messageBuffer = message; - if (compress) { - messageBuffer = await this.compressMessage(messageBuffer); - } - const output = Buffer.allocUnsafe(messageBuffer.length + 5); - output.writeUInt8(compress ? 1 : 0, 0); - output.writeUInt32BE(messageBuffer.length, 1); - messageBuffer.copy(output, 5); - return output; - } - /** - * @param data Framed message, possibly compressed - * @return Uncompressed message - */ - async readMessage(data) { - const compressed = data.readUInt8(0) === 1; - let messageBuffer = data.slice(5); - if (compressed) { - messageBuffer = await this.decompressMessage(messageBuffer); - } - return messageBuffer; - } -} -class IdentityHandler extends CompressionHandler { - async compressMessage(message) { - return message; - } - async writeMessage(message, compress) { - const output = Buffer.allocUnsafe(message.length + 5); - /* With "identity" compression, messages should always be marked as - * uncompressed */ - output.writeUInt8(0, 0); - output.writeUInt32BE(message.length, 1); - message.copy(output, 5); - return output; - } - decompressMessage(message) { - return Promise.reject(new Error('Received compressed message but "grpc-encoding" header was identity')); - } -} -class DeflateHandler extends CompressionHandler { - constructor(maxRecvMessageLength) { - super(); - this.maxRecvMessageLength = maxRecvMessageLength; - } - compressMessage(message) { - return new Promise((resolve, reject) => { - zlib.deflate(message, (err, output) => { - if (err) { - reject(err); - } - else { - resolve(output); - } - }); - }); - } - decompressMessage(message) { - return new Promise((resolve, reject) => { - let totalLength = 0; - const messageParts = []; - const decompresser = zlib.createInflate(); - decompresser.on('error', (error) => { - reject({ - code: constants_1.Status.INTERNAL, - details: 'Failed to decompress deflate-encoded message' - }); - }); - decompresser.on('data', (chunk) => { - messageParts.push(chunk); - totalLength += chunk.byteLength; - if (this.maxRecvMessageLength !== -1 && totalLength > this.maxRecvMessageLength) { - decompresser.destroy(); - reject({ - code: constants_1.Status.RESOURCE_EXHAUSTED, - details: `Received message that decompresses to a size larger than ${this.maxRecvMessageLength}` - }); - } - }); - decompresser.on('end', () => { - resolve(Buffer.concat(messageParts)); - }); - decompresser.write(message); - decompresser.end(); - }); - } -} -class GzipHandler extends CompressionHandler { - constructor(maxRecvMessageLength) { - super(); - this.maxRecvMessageLength = maxRecvMessageLength; - } - compressMessage(message) { - return new Promise((resolve, reject) => { - zlib.gzip(message, (err, output) => { - if (err) { - reject(err); - } - else { - resolve(output); - } - }); - }); - } - decompressMessage(message) { - return new Promise((resolve, reject) => { - let totalLength = 0; - const messageParts = []; - const decompresser = zlib.createGunzip(); - decompresser.on('error', (error) => { - reject({ - code: constants_1.Status.INTERNAL, - details: 'Failed to decompress gzip-encoded message' - }); - }); - decompresser.on('data', (chunk) => { - messageParts.push(chunk); - totalLength += chunk.byteLength; - if (this.maxRecvMessageLength !== -1 && totalLength > this.maxRecvMessageLength) { - decompresser.destroy(); - reject({ - code: constants_1.Status.RESOURCE_EXHAUSTED, - details: `Received message that decompresses to a size larger than ${this.maxRecvMessageLength}` - }); - } - }); - decompresser.on('end', () => { - resolve(Buffer.concat(messageParts)); - }); - decompresser.write(message); - decompresser.end(); - }); - } -} -class UnknownHandler extends CompressionHandler { - constructor(compressionName) { - super(); - this.compressionName = compressionName; - } - compressMessage(message) { - return Promise.reject(new Error(`Received message compressed with unsupported compression method ${this.compressionName}`)); - } - decompressMessage(message) { - // This should be unreachable - return Promise.reject(new Error(`Compression method not supported: ${this.compressionName}`)); - } -} -function getCompressionHandler(compressionName, maxReceiveMessageSize) { - switch (compressionName) { - case 'identity': - return new IdentityHandler(); - case 'deflate': - return new DeflateHandler(maxReceiveMessageSize); - case 'gzip': - return new GzipHandler(maxReceiveMessageSize); - default: - return new UnknownHandler(compressionName); - } -} -class CompressionFilter extends filter_1.BaseFilter { - constructor(channelOptions, sharedFilterConfig) { - var _a, _b, _c; - super(); - this.sharedFilterConfig = sharedFilterConfig; - this.sendCompression = new IdentityHandler(); - this.receiveCompression = new IdentityHandler(); - this.currentCompressionAlgorithm = 'identity'; - const compressionAlgorithmKey = channelOptions['grpc.default_compression_algorithm']; - this.maxReceiveMessageLength = (_a = channelOptions['grpc.max_receive_message_length']) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH; - this.maxSendMessageLength = (_b = channelOptions['grpc.max_send_message_length']) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_MAX_SEND_MESSAGE_LENGTH; - if (compressionAlgorithmKey !== undefined) { - if (isCompressionAlgorithmKey(compressionAlgorithmKey)) { - const clientSelectedEncoding = compression_algorithms_1.CompressionAlgorithms[compressionAlgorithmKey]; - const serverSupportedEncodings = (_c = sharedFilterConfig.serverSupportedEncodingHeader) === null || _c === void 0 ? void 0 : _c.split(','); - /** - * There are two possible situations here: - * 1) We don't have any info yet from the server about what compression it supports - * In that case we should just use what the client tells us to use - * 2) We've previously received a response from the server including a grpc-accept-encoding header - * In that case we only want to use the encoding chosen by the client if the server supports it - */ - if (!serverSupportedEncodings || - serverSupportedEncodings.includes(clientSelectedEncoding)) { - this.currentCompressionAlgorithm = clientSelectedEncoding; - this.sendCompression = getCompressionHandler(this.currentCompressionAlgorithm, -1); - } - } - else { - logging.log(constants_1.LogVerbosity.ERROR, `Invalid value provided for grpc.default_compression_algorithm option: ${compressionAlgorithmKey}`); - } - } - } - async sendMetadata(metadata) { - const headers = await metadata; - headers.set('grpc-accept-encoding', 'identity,deflate,gzip'); - headers.set('accept-encoding', 'identity'); - // No need to send the header if it's "identity" - behavior is identical; save the bandwidth - if (this.currentCompressionAlgorithm === 'identity') { - headers.remove('grpc-encoding'); - } - else { - headers.set('grpc-encoding', this.currentCompressionAlgorithm); - } - return headers; - } - receiveMetadata(metadata) { - const receiveEncoding = metadata.get('grpc-encoding'); - if (receiveEncoding.length > 0) { - const encoding = receiveEncoding[0]; - if (typeof encoding === 'string') { - this.receiveCompression = getCompressionHandler(encoding, this.maxReceiveMessageLength); - } - } - metadata.remove('grpc-encoding'); - /* Check to see if the compression we're using to send messages is supported by the server - * If not, reset the sendCompression filter and have it use the default IdentityHandler */ - const serverSupportedEncodingsHeader = metadata.get('grpc-accept-encoding')[0]; - if (serverSupportedEncodingsHeader) { - this.sharedFilterConfig.serverSupportedEncodingHeader = - serverSupportedEncodingsHeader; - const serverSupportedEncodings = serverSupportedEncodingsHeader.split(','); - if (!serverSupportedEncodings.includes(this.currentCompressionAlgorithm)) { - this.sendCompression = new IdentityHandler(); - this.currentCompressionAlgorithm = 'identity'; - } - } - metadata.remove('grpc-accept-encoding'); - return metadata; - } - async sendMessage(message) { - var _a; - /* This filter is special. The input message is the bare message bytes, - * and the output is a framed and possibly compressed message. For this - * reason, this filter should be at the bottom of the filter stack */ - const resolvedMessage = await message; - if (this.maxSendMessageLength !== -1 && resolvedMessage.message.length > this.maxSendMessageLength) { - throw { - code: constants_1.Status.RESOURCE_EXHAUSTED, - details: `Attempted to send message with a size larger than ${this.maxSendMessageLength}` - }; - } - let compress; - if (this.sendCompression instanceof IdentityHandler) { - compress = false; - } - else { - compress = (((_a = resolvedMessage.flags) !== null && _a !== void 0 ? _a : 0) & 2 /* WriteFlags.NoCompress */) === 0; - } - return { - message: await this.sendCompression.writeMessage(resolvedMessage.message, compress), - flags: resolvedMessage.flags, - }; - } - async receiveMessage(message) { - /* This filter is also special. The input message is framed and possibly - * compressed, and the output message is deframed and uncompressed. So - * this is another reason that this filter should be at the bottom of the - * filter stack. */ - return this.receiveCompression.readMessage(await message); - } -} -exports.CompressionFilter = CompressionFilter; -class CompressionFilterFactory { - constructor(channel, options) { - this.options = options; - this.sharedFilterConfig = {}; - } - createFilter() { - return new CompressionFilter(this.options, this.sharedFilterConfig); - } -} -exports.CompressionFilterFactory = CompressionFilterFactory; -//# sourceMappingURL=compression-filter.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/compression-filter.js.map b/node_modules/@grpc/grpc-js/build/src/compression-filter.js.map deleted file mode 100644 index a4bce93..0000000 --- a/node_modules/@grpc/grpc-js/build/src/compression-filter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"compression-filter.js","sourceRoot":"","sources":["../../src/compression-filter.ts"],"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AAgB,MAAM,OAAO,CAAC;QACnD,IAAI,IAAI,CAAC,oBAAoB,KAAK,CAAC,CAAC,IAAI,eAAe,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC;YACnG,MAAM;gBACJ,IAAI,EAAE,kBAAM,CAAC,kBAAkB;gBAC/B,OAAO,EAAE,qDAAqD,IAAI,CAAC,oBAAoB,EAAE;aAC1F,CAAC;QACJ,CAAC;QACD,IAAI,QAAiB,CAAC;QACtB,IAAI,IAAI,CAAC,eAAe,YAAY,eAAe,EAAE,CAAC;YACpD,QAAQ,GAAG,KAAK,CAAC;QACnB,CAAC;aAAM,CAAC;YACN,QAAQ,GAAG,CAAC,CAAC,MAAA,eAAe,CAAC,KAAK,mCAAI,CAAC,CAAC,gCAAwB,CAAC,KAAK,CAAC,CAAC;QAC1E,CAAC;QAED,OAAO;YACL,OAAO,EAAE,MAAM,IAAI,CAAC,eAAe,CAAC,YAAY,CAC9C,eAAe,CAAC,OAAO,EACvB,QAAQ,CACT;YACD,KAAK,EAAE,eAAe,CAAC,KAAK;SAC7B,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAAwB;QAC3C;;;2BAGmB;QACnB,OAAO,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,MAAM,OAAO,CAAC,CAAC;IAC5D,CAAC;CACF;AAnID,8CAmIC;AAED,MAAa,wBAAwB;IAInC,YAAY,OAAgB,EAAmB,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;QAD9D,uBAAkB,GAAkC,EAAE,CAAC;IACU,CAAC;IAC1E,YAAY;QACV,OAAO,IAAI,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACtE,CAAC;CACF;AARD,4DAQC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/connectivity-state.d.ts b/node_modules/@grpc/grpc-js/build/src/connectivity-state.d.ts deleted file mode 100644 index 048ea39..0000000 --- a/node_modules/@grpc/grpc-js/build/src/connectivity-state.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum ConnectivityState { - IDLE = 0, - CONNECTING = 1, - READY = 2, - TRANSIENT_FAILURE = 3, - SHUTDOWN = 4 -} diff --git a/node_modules/@grpc/grpc-js/build/src/connectivity-state.js b/node_modules/@grpc/grpc-js/build/src/connectivity-state.js deleted file mode 100644 index c8540b0..0000000 --- a/node_modules/@grpc/grpc-js/build/src/connectivity-state.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -/* - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ConnectivityState = void 0; -var ConnectivityState; -(function (ConnectivityState) { - ConnectivityState[ConnectivityState["IDLE"] = 0] = "IDLE"; - ConnectivityState[ConnectivityState["CONNECTING"] = 1] = "CONNECTING"; - ConnectivityState[ConnectivityState["READY"] = 2] = "READY"; - ConnectivityState[ConnectivityState["TRANSIENT_FAILURE"] = 3] = "TRANSIENT_FAILURE"; - ConnectivityState[ConnectivityState["SHUTDOWN"] = 4] = "SHUTDOWN"; -})(ConnectivityState || (exports.ConnectivityState = ConnectivityState = {})); -//# sourceMappingURL=connectivity-state.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/connectivity-state.js.map b/node_modules/@grpc/grpc-js/build/src/connectivity-state.js.map deleted file mode 100644 index 1afc24d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/connectivity-state.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"connectivity-state.js","sourceRoot":"","sources":["../../src/connectivity-state.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,yDAAI,CAAA;IACJ,qEAAU,CAAA;IACV,2DAAK,CAAA;IACL,mFAAiB,CAAA;IACjB,iEAAQ,CAAA;AACV,CAAC,EANW,iBAAiB,iCAAjB,iBAAiB,QAM5B"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/constants.d.ts b/node_modules/@grpc/grpc-js/build/src/constants.d.ts deleted file mode 100644 index 43ec358..0000000 --- a/node_modules/@grpc/grpc-js/build/src/constants.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -export declare enum Status { - OK = 0, - CANCELLED = 1, - UNKNOWN = 2, - INVALID_ARGUMENT = 3, - DEADLINE_EXCEEDED = 4, - NOT_FOUND = 5, - ALREADY_EXISTS = 6, - PERMISSION_DENIED = 7, - RESOURCE_EXHAUSTED = 8, - FAILED_PRECONDITION = 9, - ABORTED = 10, - OUT_OF_RANGE = 11, - UNIMPLEMENTED = 12, - INTERNAL = 13, - UNAVAILABLE = 14, - DATA_LOSS = 15, - UNAUTHENTICATED = 16 -} -export declare enum LogVerbosity { - DEBUG = 0, - INFO = 1, - ERROR = 2, - NONE = 3 -} -/** - * NOTE: This enum is not currently used in any implemented API in this - * library. It is included only for type parity with the other implementation. - */ -export declare enum Propagate { - DEADLINE = 1, - CENSUS_STATS_CONTEXT = 2, - CENSUS_TRACING_CONTEXT = 4, - CANCELLATION = 8, - DEFAULTS = 65535 -} -export declare const DEFAULT_MAX_SEND_MESSAGE_LENGTH = -1; -export declare const DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH: number; diff --git a/node_modules/@grpc/grpc-js/build/src/constants.js b/node_modules/@grpc/grpc-js/build/src/constants.js deleted file mode 100644 index 6e6b8ed..0000000 --- a/node_modules/@grpc/grpc-js/build/src/constants.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH = exports.DEFAULT_MAX_SEND_MESSAGE_LENGTH = exports.Propagate = exports.LogVerbosity = exports.Status = void 0; -var Status; -(function (Status) { - Status[Status["OK"] = 0] = "OK"; - Status[Status["CANCELLED"] = 1] = "CANCELLED"; - Status[Status["UNKNOWN"] = 2] = "UNKNOWN"; - Status[Status["INVALID_ARGUMENT"] = 3] = "INVALID_ARGUMENT"; - Status[Status["DEADLINE_EXCEEDED"] = 4] = "DEADLINE_EXCEEDED"; - Status[Status["NOT_FOUND"] = 5] = "NOT_FOUND"; - Status[Status["ALREADY_EXISTS"] = 6] = "ALREADY_EXISTS"; - Status[Status["PERMISSION_DENIED"] = 7] = "PERMISSION_DENIED"; - Status[Status["RESOURCE_EXHAUSTED"] = 8] = "RESOURCE_EXHAUSTED"; - Status[Status["FAILED_PRECONDITION"] = 9] = "FAILED_PRECONDITION"; - Status[Status["ABORTED"] = 10] = "ABORTED"; - Status[Status["OUT_OF_RANGE"] = 11] = "OUT_OF_RANGE"; - Status[Status["UNIMPLEMENTED"] = 12] = "UNIMPLEMENTED"; - Status[Status["INTERNAL"] = 13] = "INTERNAL"; - Status[Status["UNAVAILABLE"] = 14] = "UNAVAILABLE"; - Status[Status["DATA_LOSS"] = 15] = "DATA_LOSS"; - Status[Status["UNAUTHENTICATED"] = 16] = "UNAUTHENTICATED"; -})(Status || (exports.Status = Status = {})); -var LogVerbosity; -(function (LogVerbosity) { - LogVerbosity[LogVerbosity["DEBUG"] = 0] = "DEBUG"; - LogVerbosity[LogVerbosity["INFO"] = 1] = "INFO"; - LogVerbosity[LogVerbosity["ERROR"] = 2] = "ERROR"; - LogVerbosity[LogVerbosity["NONE"] = 3] = "NONE"; -})(LogVerbosity || (exports.LogVerbosity = LogVerbosity = {})); -/** - * NOTE: This enum is not currently used in any implemented API in this - * library. It is included only for type parity with the other implementation. - */ -var Propagate; -(function (Propagate) { - Propagate[Propagate["DEADLINE"] = 1] = "DEADLINE"; - Propagate[Propagate["CENSUS_STATS_CONTEXT"] = 2] = "CENSUS_STATS_CONTEXT"; - Propagate[Propagate["CENSUS_TRACING_CONTEXT"] = 4] = "CENSUS_TRACING_CONTEXT"; - Propagate[Propagate["CANCELLATION"] = 8] = "CANCELLATION"; - // https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/propagation_bits.h#L43 - Propagate[Propagate["DEFAULTS"] = 65535] = "DEFAULTS"; -})(Propagate || (exports.Propagate = Propagate = {})); -// -1 means unlimited -exports.DEFAULT_MAX_SEND_MESSAGE_LENGTH = -1; -// 4 MB default -exports.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH = 4 * 1024 * 1024; -//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/constants.js.map b/node_modules/@grpc/grpc-js/build/src/constants.js.map deleted file mode 100644 index a3c5c87..0000000 --- a/node_modules/@grpc/grpc-js/build/src/constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,IAAY,MAkBX;AAlBD,WAAY,MAAM;IAChB,+BAAM,CAAA;IACN,6CAAS,CAAA;IACT,yCAAO,CAAA;IACP,2DAAgB,CAAA;IAChB,6DAAiB,CAAA;IACjB,6CAAS,CAAA;IACT,uDAAc,CAAA;IACd,6DAAiB,CAAA;IACjB,+DAAkB,CAAA;IAClB,iEAAmB,CAAA;IACnB,0CAAO,CAAA;IACP,oDAAY,CAAA;IACZ,sDAAa,CAAA;IACb,4CAAQ,CAAA;IACR,kDAAW,CAAA;IACX,8CAAS,CAAA;IACT,0DAAe,CAAA;AACjB,CAAC,EAlBW,MAAM,sBAAN,MAAM,QAkBjB;AAED,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,iDAAS,CAAA;IACT,+CAAI,CAAA;IACJ,iDAAK,CAAA;IACL,+CAAI,CAAA;AACN,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AAED;;;GAGG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACnB,iDAAY,CAAA;IACZ,yEAAwB,CAAA;IACxB,6EAA0B,CAAA;IAC1B,yDAAgB,CAAA;IAChB,4FAA4F;IAC5F,qDAIwB,CAAA;AAC1B,CAAC,EAXW,SAAS,yBAAT,SAAS,QAWpB;AAED,qBAAqB;AACR,QAAA,+BAA+B,GAAG,CAAC,CAAC,CAAC;AAElD,eAAe;AACF,QAAA,kCAAkC,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/control-plane-status.d.ts b/node_modules/@grpc/grpc-js/build/src/control-plane-status.d.ts deleted file mode 100644 index a137cab..0000000 --- a/node_modules/@grpc/grpc-js/build/src/control-plane-status.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Status } from './constants'; -export declare function restrictControlPlaneStatusCode(code: Status, details: string): { - code: Status; - details: string; -}; diff --git a/node_modules/@grpc/grpc-js/build/src/control-plane-status.js b/node_modules/@grpc/grpc-js/build/src/control-plane-status.js deleted file mode 100644 index 5d55796..0000000 --- a/node_modules/@grpc/grpc-js/build/src/control-plane-status.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.restrictControlPlaneStatusCode = restrictControlPlaneStatusCode; -const constants_1 = require("./constants"); -const INAPPROPRIATE_CONTROL_PLANE_CODES = [ - constants_1.Status.OK, - constants_1.Status.INVALID_ARGUMENT, - constants_1.Status.NOT_FOUND, - constants_1.Status.ALREADY_EXISTS, - constants_1.Status.FAILED_PRECONDITION, - constants_1.Status.ABORTED, - constants_1.Status.OUT_OF_RANGE, - constants_1.Status.DATA_LOSS, -]; -function restrictControlPlaneStatusCode(code, details) { - if (INAPPROPRIATE_CONTROL_PLANE_CODES.includes(code)) { - return { - code: constants_1.Status.INTERNAL, - details: `Invalid status from control plane: ${code} ${constants_1.Status[code]} ${details}`, - }; - } - else { - return { code, details }; - } -} -//# sourceMappingURL=control-plane-status.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/control-plane-status.js.map b/node_modules/@grpc/grpc-js/build/src/control-plane-status.js.map deleted file mode 100644 index b5c0b71..0000000 --- a/node_modules/@grpc/grpc-js/build/src/control-plane-status.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"control-plane-status.js","sourceRoot":"","sources":["../../src/control-plane-status.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAeH,wEAYC;AAzBD,2CAAqC;AAErC,MAAM,iCAAiC,GAAa;IAClD,kBAAM,CAAC,EAAE;IACT,kBAAM,CAAC,gBAAgB;IACvB,kBAAM,CAAC,SAAS;IAChB,kBAAM,CAAC,cAAc;IACrB,kBAAM,CAAC,mBAAmB;IAC1B,kBAAM,CAAC,OAAO;IACd,kBAAM,CAAC,YAAY;IACnB,kBAAM,CAAC,SAAS;CACjB,CAAC;AAEF,SAAgB,8BAA8B,CAC5C,IAAY,EACZ,OAAe;IAEf,IAAI,iCAAiC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACrD,OAAO;YACL,IAAI,EAAE,kBAAM,CAAC,QAAQ;YACrB,OAAO,EAAE,sCAAsC,IAAI,IAAI,kBAAM,CAAC,IAAI,CAAC,IAAI,OAAO,EAAE;SACjF,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAC3B,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/deadline.d.ts b/node_modules/@grpc/grpc-js/build/src/deadline.d.ts deleted file mode 100644 index 63db6af..0000000 --- a/node_modules/@grpc/grpc-js/build/src/deadline.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export type Deadline = Date | number; -export declare function minDeadline(...deadlineList: Deadline[]): Deadline; -export declare function getDeadlineTimeoutString(deadline: Deadline): string; -/** - * Get the timeout value that should be passed to setTimeout now for the timer - * to end at the deadline. For any deadline before now, the timer should end - * immediately, represented by a value of 0. For any deadline more than - * MAX_TIMEOUT_TIME milliseconds in the future, a timer cannot be set that will - * end at that time, so it is treated as infinitely far in the future. - * @param deadline - * @returns - */ -export declare function getRelativeTimeout(deadline: Deadline): number; -export declare function deadlineToString(deadline: Deadline): string; -/** - * Calculate the difference between two dates as a number of seconds and format - * it as a string. - * @param startDate - * @param endDate - * @returns - */ -export declare function formatDateDifference(startDate: Date, endDate: Date): string; diff --git a/node_modules/@grpc/grpc-js/build/src/deadline.js b/node_modules/@grpc/grpc-js/build/src/deadline.js deleted file mode 100644 index 8b4a39e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/deadline.js +++ /dev/null @@ -1,108 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.minDeadline = minDeadline; -exports.getDeadlineTimeoutString = getDeadlineTimeoutString; -exports.getRelativeTimeout = getRelativeTimeout; -exports.deadlineToString = deadlineToString; -exports.formatDateDifference = formatDateDifference; -function minDeadline(...deadlineList) { - let minValue = Infinity; - for (const deadline of deadlineList) { - const deadlineMsecs = deadline instanceof Date ? deadline.getTime() : deadline; - if (deadlineMsecs < minValue) { - minValue = deadlineMsecs; - } - } - return minValue; -} -const units = [ - ['m', 1], - ['S', 1000], - ['M', 60 * 1000], - ['H', 60 * 60 * 1000], -]; -function getDeadlineTimeoutString(deadline) { - const now = new Date().getTime(); - if (deadline instanceof Date) { - deadline = deadline.getTime(); - } - const timeoutMs = Math.max(deadline - now, 0); - for (const [unit, factor] of units) { - const amount = timeoutMs / factor; - if (amount < 1e8) { - return String(Math.ceil(amount)) + unit; - } - } - throw new Error('Deadline is too far in the future'); -} -/** - * See https://nodejs.org/api/timers.html#settimeoutcallback-delay-args - * In particular, "When delay is larger than 2147483647 or less than 1, the - * delay will be set to 1. Non-integer delays are truncated to an integer." - * This number of milliseconds is almost 25 days. - */ -const MAX_TIMEOUT_TIME = 2147483647; -/** - * Get the timeout value that should be passed to setTimeout now for the timer - * to end at the deadline. For any deadline before now, the timer should end - * immediately, represented by a value of 0. For any deadline more than - * MAX_TIMEOUT_TIME milliseconds in the future, a timer cannot be set that will - * end at that time, so it is treated as infinitely far in the future. - * @param deadline - * @returns - */ -function getRelativeTimeout(deadline) { - const deadlineMs = deadline instanceof Date ? deadline.getTime() : deadline; - const now = new Date().getTime(); - const timeout = deadlineMs - now; - if (timeout < 0) { - return 0; - } - else if (timeout > MAX_TIMEOUT_TIME) { - return Infinity; - } - else { - return timeout; - } -} -function deadlineToString(deadline) { - if (deadline instanceof Date) { - return deadline.toISOString(); - } - else { - const dateDeadline = new Date(deadline); - if (Number.isNaN(dateDeadline.getTime())) { - return '' + deadline; - } - else { - return dateDeadline.toISOString(); - } - } -} -/** - * Calculate the difference between two dates as a number of seconds and format - * it as a string. - * @param startDate - * @param endDate - * @returns - */ -function formatDateDifference(startDate, endDate) { - return ((endDate.getTime() - startDate.getTime()) / 1000).toFixed(3) + 's'; -} -//# sourceMappingURL=deadline.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/deadline.js.map b/node_modules/@grpc/grpc-js/build/src/deadline.js.map deleted file mode 100644 index 8176a9c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/deadline.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"deadline.js","sourceRoot":"","sources":["../../src/deadline.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAIH,kCAUC;AASD,4DAaC;AAmBD,gDAWC;AAED,4CAWC;AASD,oDAEC;AAtFD,SAAgB,WAAW,CAAC,GAAG,YAAwB;IACrD,IAAI,QAAQ,GAAG,QAAQ,CAAC;IACxB,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE,CAAC;QACpC,MAAM,aAAa,GACjB,QAAQ,YAAY,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC3D,IAAI,aAAa,GAAG,QAAQ,EAAE,CAAC;YAC7B,QAAQ,GAAG,aAAa,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,KAAK,GAA4B;IACrC,CAAC,GAAG,EAAE,CAAC,CAAC;IACR,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC;IAChB,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;CACtB,CAAC;AAEF,SAAgB,wBA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IAAI,EAAE,CAAC;QAC7B,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;IAChC,CAAC;SAAM,CAAC;QACN,MAAM,YAAY,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;QACxC,IAAI,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;YACzC,OAAO,EAAE,GAAG,QAAQ,CAAC;QACvB,CAAC;aAAM,CAAC;YACN,OAAO,YAAY,CAAC,WAAW,EAAE,CAAC;QACpC,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,SAAe,EAAE,OAAa;IACjE,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AAC7E,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/duration.d.ts b/node_modules/@grpc/grpc-js/build/src/duration.d.ts deleted file mode 100644 index 6d306ed..0000000 --- a/node_modules/@grpc/grpc-js/build/src/duration.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export interface Duration { - seconds: number; - nanos: number; -} -export interface DurationMessage { - seconds: string; - nanos: number; -} -export declare function durationMessageToDuration(message: DurationMessage): Duration; -export declare function msToDuration(millis: number): Duration; -export declare function durationToMs(duration: Duration): number; -export declare function isDuration(value: any): value is Duration; -export declare function isDurationMessage(value: any): value is DurationMessage; -export declare function parseDuration(value: string): Duration | null; -export declare function durationToString(duration: Duration): string; diff --git a/node_modules/@grpc/grpc-js/build/src/duration.js b/node_modules/@grpc/grpc-js/build/src/duration.js deleted file mode 100644 index f48caa5..0000000 --- a/node_modules/@grpc/grpc-js/build/src/duration.js +++ /dev/null @@ -1,74 +0,0 @@ -"use strict"; -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.durationMessageToDuration = durationMessageToDuration; -exports.msToDuration = msToDuration; -exports.durationToMs = durationToMs; -exports.isDuration = isDuration; -exports.isDurationMessage = isDurationMessage; -exports.parseDuration = parseDuration; -exports.durationToString = durationToString; -function durationMessageToDuration(message) { - return { - seconds: Number.parseInt(message.seconds), - nanos: message.nanos - }; -} -function msToDuration(millis) { - return { - seconds: (millis / 1000) | 0, - nanos: ((millis % 1000) * 1000000) | 0, - }; -} -function durationToMs(duration) { - return (duration.seconds * 1000 + duration.nanos / 1000000) | 0; -} -function isDuration(value) { - return typeof value.seconds === 'number' && typeof value.nanos === 'number'; -} -function isDurationMessage(value) { - return typeof value.seconds === 'string' && typeof value.nanos === 'number'; -} -const durationRegex = /^(\d+)(?:\.(\d+))?s$/; -function parseDuration(value) { - const match = value.match(durationRegex); - if (!match) { - return null; - } - return { - seconds: Number.parseInt(match[1], 10), - nanos: match[2] ? Number.parseInt(match[2].padEnd(9, '0'), 10) : 0 - }; -} -function durationToString(duration) { - if (duration.nanos === 0) { - return `${duration.seconds}s`; - } - let scaleFactor; - if (duration.nanos % 1000000 === 0) { - scaleFactor = 1000000; - } - else if (duration.nanos % 1000 === 0) { - scaleFactor = 1000; - } - else { - scaleFactor = 1; - } - return `${duration.seconds}.${duration.nanos / scaleFactor}s`; -} -//# sourceMappingURL=duration.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/duration.js.map b/node_modules/@grpc/grpc-js/build/src/duration.js.map deleted file mode 100644 index 4efe75a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/duration.js.map +++ /dev/null @@ -1 +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L,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACtC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;KACnE,CAAC;AACJ,CAAC;AAED,SAAgB,gBAAgB,CAAC,QAAkB;IACjD,IAAI,QAAQ,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,GAAG,QAAQ,CAAC,OAAO,GAAG,CAAC;IAChC,CAAC;IACD,IAAI,WAAmB,CAAC;IACxB,IAAI,QAAQ,CAAC,KAAK,GAAG,OAAS,KAAK,CAAC,EAAE,CAAC;QACrC,WAAW,GAAG,OAAS,CAAC;IAC1B,CAAC;SAAM,IAAI,QAAQ,CAAC,KAAK,GAAG,IAAK,KAAK,CAAC,EAAE,CAAC;QACxC,WAAW,GAAG,IAAK,CAAC;IACtB,CAAC;SAAM,CAAC;QACN,WAAW,GAAG,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,GAAG,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,KAAK,GAAC,WAAW,GAAG,CAAC;AAC9D,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/environment.d.ts b/node_modules/@grpc/grpc-js/build/src/environment.d.ts deleted file mode 100644 index de68f25..0000000 --- a/node_modules/@grpc/grpc-js/build/src/environment.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const GRPC_NODE_USE_ALTERNATIVE_RESOLVER: boolean; diff --git a/node_modules/@grpc/grpc-js/build/src/environment.js b/node_modules/@grpc/grpc-js/build/src/environment.js deleted file mode 100644 index e8d67c2..0000000 --- a/node_modules/@grpc/grpc-js/build/src/environment.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -/* - * Copyright 2024 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GRPC_NODE_USE_ALTERNATIVE_RESOLVER = void 0; -exports.GRPC_NODE_USE_ALTERNATIVE_RESOLVER = ((_a = process.env.GRPC_NODE_USE_ALTERNATIVE_RESOLVER) !== null && _a !== void 0 ? _a : 'false') === 'true'; -//# sourceMappingURL=environment.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/environment.js.map b/node_modules/@grpc/grpc-js/build/src/environment.js.map deleted file mode 100644 index 84205a5..0000000 --- a/node_modules/@grpc/grpc-js/build/src/environment.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/environment.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;AAEU,QAAA,kCAAkC,GAC7C,CAAC,MAAA,OAAO,CAAC,GAAG,CAAC,kCAAkC,mCAAI,OAAO,CAAC,KAAK,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/error.d.ts b/node_modules/@grpc/grpc-js/build/src/error.d.ts deleted file mode 100644 index fd4cc77..0000000 --- a/node_modules/@grpc/grpc-js/build/src/error.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function getErrorMessage(error: unknown): string; -export declare function getErrorCode(error: unknown): number | null; diff --git a/node_modules/@grpc/grpc-js/build/src/error.js b/node_modules/@grpc/grpc-js/build/src/error.js deleted file mode 100644 index 5cb1539..0000000 --- a/node_modules/@grpc/grpc-js/build/src/error.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getErrorMessage = getErrorMessage; -exports.getErrorCode = getErrorCode; -function getErrorMessage(error) { - if (error instanceof Error) { - return error.message; - } - else { - return String(error); - } -} -function getErrorCode(error) { - if (typeof error === 'object' && - error !== null && - 'code' in error && - typeof error.code === 'number') { - return error.code; - } - else { - return null; - } -} -//# sourceMappingURL=error.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/error.js.map b/node_modules/@grpc/grpc-js/build/src/error.js.map deleted file mode 100644 index ab40258..0000000 --- a/node_modules/@grpc/grpc-js/build/src/error.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH,0CAMC;AAED,oCAWC;AAnBD,SAAgB,eAAe,CAAC,KAAc;IAC5C,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC,OAAO,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,SAAgB,YAAY,CAAC,KAAc;IACzC,IACE,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,MAAM,IAAI,KAAK;QACf,OAAQ,KAAiC,CAAC,IAAI,KAAK,QAAQ,EAC3D,CAAC;QACD,OAAQ,KAAgC,CAAC,IAAI,CAAC;IAChD,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/events.d.ts b/node_modules/@grpc/grpc-js/build/src/events.d.ts deleted file mode 100644 index d1a764e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/events.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface EmitterAugmentation1 { - addListener(event: Name, listener: (arg1: Arg) => void): this; - emit(event: Name, arg1: Arg): boolean; - on(event: Name, listener: (arg1: Arg) => void): this; - once(event: Name, listener: (arg1: Arg) => void): this; - prependListener(event: Name, listener: (arg1: Arg) => void): this; - prependOnceListener(event: Name, listener: (arg1: Arg) => void): this; - removeListener(event: Name, listener: (arg1: Arg) => void): this; -} diff --git a/node_modules/@grpc/grpc-js/build/src/events.js b/node_modules/@grpc/grpc-js/build/src/events.js deleted file mode 100644 index 082ed9b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/events.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=events.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/events.js.map b/node_modules/@grpc/grpc-js/build/src/events.js.map deleted file mode 100644 index ba39b5d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/events.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/events.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/experimental.d.ts b/node_modules/@grpc/grpc-js/build/src/experimental.d.ts deleted file mode 100644 index f636190..0000000 --- a/node_modules/@grpc/grpc-js/build/src/experimental.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export { trace, log } from './logging'; -export { Resolver, ResolverListener, registerResolver, ConfigSelector, createResolver, CHANNEL_ARGS_CONFIG_SELECTOR_KEY, } from './resolver'; -export { GrpcUri, uriToString, splitHostPort, HostPort } from './uri-parser'; -export { Duration, durationToMs, parseDuration } from './duration'; -export { BackoffTimeout } from './backoff-timeout'; -export { LoadBalancer, TypedLoadBalancingConfig, ChannelControlHelper, createChildChannelControlHelper, registerLoadBalancerType, selectLbConfigFromList, parseLoadBalancingConfig, isLoadBalancerNameRegistered, } from './load-balancer'; -export { LeafLoadBalancer } from './load-balancer-pick-first'; -export { SubchannelAddress, subchannelAddressToString, Endpoint, endpointToString, endpointHasAddress, EndpointMap, } from './subchannel-address'; -export { ChildLoadBalancerHandler } from './load-balancer-child-handler'; -export { Picker, UnavailablePicker, QueuePicker, PickResult, PickArgs, PickResultType, } from './picker'; -export { Call as CallStream, StatusOr, statusOrFromValue, statusOrFromError } from './call-interface'; -export { Filter, BaseFilter, FilterFactory } from './filter'; -export { FilterStackFactory } from './filter-stack'; -export { registerAdminService } from './admin'; -export { SubchannelInterface, BaseSubchannelWrapper, ConnectivityStateListener, HealthListener, } from './subchannel-interface'; -export { OutlierDetectionRawConfig, SuccessRateEjectionConfig, FailurePercentageEjectionConfig, } from './load-balancer-outlier-detection'; -export { createServerCredentialsWithInterceptors, createCertificateProviderServerCredentials } from './server-credentials'; -export { CaCertificateUpdate, CaCertificateUpdateListener, IdentityCertificateUpdate, IdentityCertificateUpdateListener, CertificateProvider, FileWatcherCertificateProvider, FileWatcherCertificateProviderConfig } from './certificate-provider'; -export { createCertificateProviderChannelCredentials, SecureConnector, SecureConnectResult } from './channel-credentials'; -export { SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX } from './internal-channel'; diff --git a/node_modules/@grpc/grpc-js/build/src/experimental.js b/node_modules/@grpc/grpc-js/build/src/experimental.js deleted file mode 100644 index 3f2835c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/experimental.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX = exports.createCertificateProviderChannelCredentials = exports.FileWatcherCertificateProvider = exports.createCertificateProviderServerCredentials = exports.createServerCredentialsWithInterceptors = exports.BaseSubchannelWrapper = exports.registerAdminService = exports.FilterStackFactory = exports.BaseFilter = exports.statusOrFromError = exports.statusOrFromValue = exports.PickResultType = exports.QueuePicker = exports.UnavailablePicker = exports.ChildLoadBalancerHandler = exports.EndpointMap = exports.endpointHasAddress = exports.endpointToString = exports.subchannelAddressToString = exports.LeafLoadBalancer = exports.isLoadBalancerNameRegistered = exports.parseLoadBalancingConfig = exports.selectLbConfigFromList = exports.registerLoadBalancerType = exports.createChildChannelControlHelper = exports.BackoffTimeout = exports.parseDuration = exports.durationToMs = exports.splitHostPort = exports.uriToString = exports.CHANNEL_ARGS_CONFIG_SELECTOR_KEY = exports.createResolver = exports.registerResolver = exports.log = exports.trace = void 0; -var logging_1 = require("./logging"); -Object.defineProperty(exports, "trace", { enumerable: true, get: function () { return logging_1.trace; } }); -Object.defineProperty(exports, "log", { enumerable: true, get: function () { return logging_1.log; } }); -var resolver_1 = require("./resolver"); -Object.defineProperty(exports, "registerResolver", { enumerable: true, get: function () { return resolver_1.registerResolver; } }); -Object.defineProperty(exports, "createResolver", { enumerable: true, get: function () { return resolver_1.createResolver; } }); -Object.defineProperty(exports, "CHANNEL_ARGS_CONFIG_SELECTOR_KEY", { enumerable: true, get: function () { return resolver_1.CHANNEL_ARGS_CONFIG_SELECTOR_KEY; } }); -var uri_parser_1 = require("./uri-parser"); -Object.defineProperty(exports, "uriToString", { enumerable: true, get: function () { return uri_parser_1.uriToString; } }); -Object.defineProperty(exports, "splitHostPort", { enumerable: true, get: function () { return uri_parser_1.splitHostPort; } }); -var duration_1 = require("./duration"); -Object.defineProperty(exports, "durationToMs", { enumerable: true, get: function () { return duration_1.durationToMs; } }); -Object.defineProperty(exports, "parseDuration", { enumerable: true, get: function () { return duration_1.parseDuration; } }); -var backoff_timeout_1 = require("./backoff-timeout"); -Object.defineProperty(exports, "BackoffTimeout", { enumerable: true, get: function () { return backoff_timeout_1.BackoffTimeout; } }); -var load_balancer_1 = require("./load-balancer"); -Object.defineProperty(exports, "createChildChannelControlHelper", { enumerable: true, get: function () { return load_balancer_1.createChildChannelControlHelper; } }); -Object.defineProperty(exports, "registerLoadBalancerType", { enumerable: true, get: function () { return load_balancer_1.registerLoadBalancerType; } }); -Object.defineProperty(exports, "selectLbConfigFromList", { enumerable: true, get: function () { return load_balancer_1.selectLbConfigFromList; } }); -Object.defineProperty(exports, "parseLoadBalancingConfig", { enumerable: true, get: function () { return load_balancer_1.parseLoadBalancingConfig; } }); -Object.defineProperty(exports, "isLoadBalancerNameRegistered", { enumerable: true, get: function () { return load_balancer_1.isLoadBalancerNameRegistered; } }); -var load_balancer_pick_first_1 = require("./load-balancer-pick-first"); -Object.defineProperty(exports, "LeafLoadBalancer", { enumerable: true, get: function () { return load_balancer_pick_first_1.LeafLoadBalancer; } }); -var subchannel_address_1 = require("./subchannel-address"); -Object.defineProperty(exports, "subchannelAddressToString", { enumerable: true, get: function () { return subchannel_address_1.subchannelAddressToString; } }); -Object.defineProperty(exports, "endpointToString", { enumerable: true, get: function () { return subchannel_address_1.endpointToString; } }); -Object.defineProperty(exports, "endpointHasAddress", { enumerable: true, get: function () { return subchannel_address_1.endpointHasAddress; } }); -Object.defineProperty(exports, "EndpointMap", { enumerable: true, get: function () { return subchannel_address_1.EndpointMap; } }); -var load_balancer_child_handler_1 = require("./load-balancer-child-handler"); -Object.defineProperty(exports, "ChildLoadBalancerHandler", { enumerable: true, get: function () { return load_balancer_child_handler_1.ChildLoadBalancerHandler; } }); -var picker_1 = require("./picker"); -Object.defineProperty(exports, "UnavailablePicker", { enumerable: true, get: function () { return picker_1.UnavailablePicker; } }); -Object.defineProperty(exports, "QueuePicker", { enumerable: true, get: function () { return picker_1.QueuePicker; } }); -Object.defineProperty(exports, "PickResultType", { enumerable: true, get: function () { return picker_1.PickResultType; } }); -var call_interface_1 = require("./call-interface"); -Object.defineProperty(exports, "statusOrFromValue", { enumerable: true, get: function () { return call_interface_1.statusOrFromValue; } }); -Object.defineProperty(exports, "statusOrFromError", { enumerable: true, get: function () { return call_interface_1.statusOrFromError; } }); -var filter_1 = require("./filter"); -Object.defineProperty(exports, "BaseFilter", { enumerable: true, get: function () { return filter_1.BaseFilter; } }); -var filter_stack_1 = require("./filter-stack"); -Object.defineProperty(exports, "FilterStackFactory", { enumerable: true, get: function () { return filter_stack_1.FilterStackFactory; } }); -var admin_1 = require("./admin"); -Object.defineProperty(exports, "registerAdminService", { enumerable: true, get: function () { return admin_1.registerAdminService; } }); -var subchannel_interface_1 = require("./subchannel-interface"); -Object.defineProperty(exports, "BaseSubchannelWrapper", { enumerable: true, get: function () { return subchannel_interface_1.BaseSubchannelWrapper; } }); -var server_credentials_1 = require("./server-credentials"); -Object.defineProperty(exports, "createServerCredentialsWithInterceptors", { enumerable: true, get: function () { return server_credentials_1.createServerCredentialsWithInterceptors; } }); -Object.defineProperty(exports, "createCertificateProviderServerCredentials", { enumerable: true, get: function () { return server_credentials_1.createCertificateProviderServerCredentials; } }); -var certificate_provider_1 = require("./certificate-provider"); -Object.defineProperty(exports, "FileWatcherCertificateProvider", { enumerable: true, get: function () { return certificate_provider_1.FileWatcherCertificateProvider; } }); -var channel_credentials_1 = require("./channel-credentials"); -Object.defineProperty(exports, "createCertificateProviderChannelCredentials", { enumerable: true, get: function () { return channel_credentials_1.createCertificateProviderChannelCredentials; } }); -var internal_channel_1 = require("./internal-channel"); -Object.defineProperty(exports, "SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX", { enumerable: true, get: function () { return internal_channel_1.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX; } }); -//# sourceMappingURL=experimental.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/experimental.js.map b/node_modules/@grpc/grpc-js/build/src/experimental.js.map deleted file mode 100644 index bbffebf..0000000 --- a/node_modules/@grpc/grpc-js/build/src/experimental.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"experimental.js","sourceRoot":"","sources":["../../src/experimental.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AAA9B,gGAAA,KAAK,OAAA;AAAE,8FAAA,GAAG,OAAA;AACnB,uCAOoB;AAJlB,4GAAA,gBAAgB,OAAA;AAEhB,0GAAA,cAAc,OAAA;AACd,4HAAA,gCAAgC,OAAA;AAElC,2CAA6E;AAA3D,yGAAA,WAAW,OAAA;AAAE,2GAAA,aAAa,OAAA;AAC5C,uCAAmE;AAAhD,wGAAA,YAAY,OAAA;AAAE,yGAAA,aAAa,OAAA;AAC9C,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,iDASyB;AALvB,gIAAA,+BAA+B,OAAA;AAC/B,yHAAA,wBAAwB,OAAA;AACxB,uHAAA,sBAAsB,OAAA;AACtB,yHAAA,wBAAwB,OAAA;AACxB,6HAAA,4BAA4B,OAAA;AAE9B,uEAA8D;AAArD,4HAAA,gBAAgB,OAAA;AACzB,2DAO8B;AAL5B,+HAAA,yBAAyB,OAAA;AAEzB,sHAAA,gBAAgB,OAAA;AAChB,wHAAA,kBAAkB,OAAA;AAClB,iHAAA,WAAW,OAAA;AAEb,6EAAyE;AAAhE,uIAAA,wBAAwB,OAAA;AACjC,mCAOkB;AALhB,2GAAA,iBAAiB,OAAA;AACjB,qGAAA,WAAW,OAAA;AAGX,wGAAA,cAAc,OAAA;AAEhB,mDAK0B;AAFxB,mHAAA,iBAAiB,OAAA;AACjB,mHAAA,iBAAiB,OAAA;AAEnB,mCAA6D;AAA5C,oGAAA,UAAU,OAAA;AAC3B,+CAAoD;AAA3C,kHAAA,kBAAkB,OAAA;AAC3B,iCAA+C;AAAtC,6GAAA,oBAAoB,OAAA;AAC7B,+DAKgC;AAH9B,6HAAA,qBAAqB,OAAA;AAUvB,2DAA2H;AAAlH,6IAAA,uCAAuC,OAAA;AAAE,gJAAA,0CAA0C,OAAA;AAC5F,+DAQgC;AAF9B,sIAAA,8BAA8B,OAAA;AAGhC,6DAA0H;AAAjH,kJAAA,2CAA2C,OAAA;AACpD,uDAAwE;AAA/D,sIAAA,kCAAkC,OAAA"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/filter-stack.d.ts b/node_modules/@grpc/grpc-js/build/src/filter-stack.d.ts deleted file mode 100644 index 1689c2d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/filter-stack.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { StatusObject, WriteObject } from './call-interface'; -import { Filter, FilterFactory } from './filter'; -import { Metadata } from './metadata'; -export declare class FilterStack implements Filter { - private readonly filters; - constructor(filters: Filter[]); - sendMetadata(metadata: Promise): Promise; - receiveMetadata(metadata: Metadata): Metadata; - sendMessage(message: Promise): Promise; - receiveMessage(message: Promise): Promise; - receiveTrailers(status: StatusObject): StatusObject; - push(filters: Filter[]): void; - getFilters(): Filter[]; -} -export declare class FilterStackFactory implements FilterFactory { - private readonly factories; - constructor(factories: Array>); - push(filterFactories: FilterFactory[]): void; - clone(): FilterStackFactory; - createFilter(): FilterStack; -} diff --git a/node_modules/@grpc/grpc-js/build/src/filter-stack.js b/node_modules/@grpc/grpc-js/build/src/filter-stack.js deleted file mode 100644 index 6cf2e1a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/filter-stack.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FilterStackFactory = exports.FilterStack = void 0; -class FilterStack { - constructor(filters) { - this.filters = filters; - } - sendMetadata(metadata) { - let result = metadata; - for (let i = 0; i < this.filters.length; i++) { - result = this.filters[i].sendMetadata(result); - } - return result; - } - receiveMetadata(metadata) { - let result = metadata; - for (let i = this.filters.length - 1; i >= 0; i--) { - result = this.filters[i].receiveMetadata(result); - } - return result; - } - sendMessage(message) { - let result = message; - for (let i = 0; i < this.filters.length; i++) { - result = this.filters[i].sendMessage(result); - } - return result; - } - receiveMessage(message) { - let result = message; - for (let i = this.filters.length - 1; i >= 0; i--) { - result = this.filters[i].receiveMessage(result); - } - return result; - } - receiveTrailers(status) { - let result = status; - for (let i = this.filters.length - 1; i >= 0; i--) { - result = this.filters[i].receiveTrailers(result); - } - return result; - } - push(filters) { - this.filters.unshift(...filters); - } - getFilters() { - return this.filters; - } -} -exports.FilterStack = FilterStack; -class FilterStackFactory { - constructor(factories) { - this.factories = factories; - } - push(filterFactories) { - this.factories.unshift(...filterFactories); - } - clone() { - return new FilterStackFactory([...this.factories]); - } - createFilter() { - return new FilterStack(this.factories.map(factory => factory.createFilter())); - } -} -exports.FilterStackFactory = FilterStackFactory; -//# sourceMappingURL=filter-stack.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/filter-stack.js.map b/node_modules/@grpc/grpc-js/build/src/filter-stack.js.map deleted file mode 100644 index ffbeadf..0000000 --- a/node_modules/@grpc/grpc-js/build/src/filter-stack.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filter-stack.js","sourceRoot":"","sources":["../../src/filter-stack.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAMH,MAAa,WAAW;IACtB,YAA6B,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AO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAClD,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,eAAe,CAAC,MAAoB;QAClC,IAAI,MAAM,GAAiB,MAAM,CAAC;QAElC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAClD,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACnD,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,CAAC,OAAiB;QACpB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AA5DD,kCA4DC;AAED,MAAa,kBAAkB;IAC7B,YAA6B,SAAuC;QAAvC,cAAS,GAAT,SAAS,CAA8B;IAAG,CAAC;IAExE,IAAI,CAAC,eAAwC;QAC3C,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,eAAe,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK;QACH,OAAO,IAAI,kBAAkB,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,YAAY;QACV,OAAO,IAAI,WAAW,CACpB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CACtD,CAAC;IACJ,CAAC;CACF;AAhBD,gDAgBC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/filter.d.ts b/node_modules/@grpc/grpc-js/build/src/filter.d.ts deleted file mode 100644 index e3fe87d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/filter.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { StatusObject, WriteObject } from './call-interface'; -import { Metadata } from './metadata'; -/** - * Filter classes represent related per-call logic and state that is primarily - * used to modify incoming and outgoing data. All async filters can be - * rejected. The rejection error must be a StatusObject, and a rejection will - * cause the call to end with that status. - */ -export interface Filter { - sendMetadata(metadata: Promise): Promise; - receiveMetadata(metadata: Metadata): Metadata; - sendMessage(message: Promise): Promise; - receiveMessage(message: Promise): Promise; - receiveTrailers(status: StatusObject): StatusObject; -} -export declare abstract class BaseFilter implements Filter { - sendMetadata(metadata: Promise): Promise; - receiveMetadata(metadata: Metadata): Metadata; - sendMessage(message: Promise): Promise; - receiveMessage(message: Promise): Promise; - receiveTrailers(status: StatusObject): StatusObject; -} -export interface FilterFactory { - createFilter(): T; -} diff --git a/node_modules/@grpc/grpc-js/build/src/filter.js b/node_modules/@grpc/grpc-js/build/src/filter.js deleted file mode 100644 index d888a82..0000000 --- a/node_modules/@grpc/grpc-js/build/src/filter.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BaseFilter = void 0; -class BaseFilter { - async sendMetadata(metadata) { - return metadata; - } - receiveMetadata(metadata) { - return metadata; - } - async sendMessage(message) { - return message; - } - async receiveMessage(message) { - return message; - } - receiveTrailers(status) { - return status; - } -} -exports.BaseFilter = BaseFilter; -//# sourceMappingURL=filter.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/filter.js.map b/node_modules/@grpc/grpc-js/build/src/filter.js.map deleted file mode 100644 index 1ddf110..0000000 --- a/node_modules/@grpc/grpc-js/build/src/filter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../src/filter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAuBH,MAAsB,UAAU;IAC9B,KAAK,CAAC,YAAY,CAAC,QAA2B;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,eAAe,CAAC,QAAkB;QAChC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,OAA6B;QAC7C,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAAwB;QAC3C,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,eAAe,CAAC,MAAoB;QAClC,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AApBD,gCAoBC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/channelz.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/channelz.d.ts deleted file mode 100644 index 434d8b0..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/channelz.d.ts +++ /dev/null @@ -1,118 +0,0 @@ -import type * as grpc from '../index'; -import type { MessageTypeDefinition } from '@grpc/proto-loader'; -import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from './google/protobuf/Any'; -import type { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from './google/protobuf/BoolValue'; -import type { BytesValue as _google_protobuf_BytesValue, BytesValue__Output as _google_protobuf_BytesValue__Output } from './google/protobuf/BytesValue'; -import type { DoubleValue as _google_protobuf_DoubleValue, DoubleValue__Output as _google_protobuf_DoubleValue__Output } from './google/protobuf/DoubleValue'; -import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from './google/protobuf/Duration'; -import type { FloatValue as _google_protobuf_FloatValue, FloatValue__Output as _google_protobuf_FloatValue__Output } from './google/protobuf/FloatValue'; -import type { Int32Value as _google_protobuf_Int32Value, Int32Value__Output as _google_protobuf_Int32Value__Output } from './google/protobuf/Int32Value'; -import type { Int64Value as _google_protobuf_Int64Value, Int64Value__Output as _google_protobuf_Int64Value__Output } from './google/protobuf/Int64Value'; -import type { StringValue as _google_protobuf_StringValue, StringValue__Output as _google_protobuf_StringValue__Output } from './google/protobuf/StringValue'; -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from './google/protobuf/Timestamp'; -import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from './google/protobuf/UInt32Value'; -import type { UInt64Value as _google_protobuf_UInt64Value, UInt64Value__Output as _google_protobuf_UInt64Value__Output } from './google/protobuf/UInt64Value'; -import type { Address as _grpc_channelz_v1_Address, Address__Output as _grpc_channelz_v1_Address__Output } from './grpc/channelz/v1/Address'; -import type { Channel as _grpc_channelz_v1_Channel, Channel__Output as _grpc_channelz_v1_Channel__Output } from './grpc/channelz/v1/Channel'; -import type { ChannelConnectivityState as _grpc_channelz_v1_ChannelConnectivityState, ChannelConnectivityState__Output as _grpc_channelz_v1_ChannelConnectivityState__Output } from './grpc/channelz/v1/ChannelConnectivityState'; -import type { ChannelData as _grpc_channelz_v1_ChannelData, ChannelData__Output as _grpc_channelz_v1_ChannelData__Output } from './grpc/channelz/v1/ChannelData'; -import type { ChannelRef as _grpc_channelz_v1_ChannelRef, ChannelRef__Output as _grpc_channelz_v1_ChannelRef__Output } from './grpc/channelz/v1/ChannelRef'; -import type { ChannelTrace as _grpc_channelz_v1_ChannelTrace, ChannelTrace__Output as _grpc_channelz_v1_ChannelTrace__Output } from './grpc/channelz/v1/ChannelTrace'; -import type { ChannelTraceEvent as _grpc_channelz_v1_ChannelTraceEvent, ChannelTraceEvent__Output as _grpc_channelz_v1_ChannelTraceEvent__Output } from './grpc/channelz/v1/ChannelTraceEvent'; -import type { ChannelzClient as _grpc_channelz_v1_ChannelzClient, ChannelzDefinition as _grpc_channelz_v1_ChannelzDefinition } from './grpc/channelz/v1/Channelz'; -import type { GetChannelRequest as _grpc_channelz_v1_GetChannelRequest, GetChannelRequest__Output as _grpc_channelz_v1_GetChannelRequest__Output } from './grpc/channelz/v1/GetChannelRequest'; -import type { GetChannelResponse as _grpc_channelz_v1_GetChannelResponse, GetChannelResponse__Output as _grpc_channelz_v1_GetChannelResponse__Output } from './grpc/channelz/v1/GetChannelResponse'; -import type { GetServerRequest as _grpc_channelz_v1_GetServerRequest, GetServerRequest__Output as _grpc_channelz_v1_GetServerRequest__Output } from './grpc/channelz/v1/GetServerRequest'; -import type { GetServerResponse as _grpc_channelz_v1_GetServerResponse, GetServerResponse__Output as _grpc_channelz_v1_GetServerResponse__Output } from './grpc/channelz/v1/GetServerResponse'; -import type { GetServerSocketsRequest as _grpc_channelz_v1_GetServerSocketsRequest, GetServerSocketsRequest__Output as _grpc_channelz_v1_GetServerSocketsRequest__Output } from './grpc/channelz/v1/GetServerSocketsRequest'; -import type { GetServerSocketsResponse as _grpc_channelz_v1_GetServerSocketsResponse, GetServerSocketsResponse__Output as _grpc_channelz_v1_GetServerSocketsResponse__Output } from './grpc/channelz/v1/GetServerSocketsResponse'; -import type { GetServersRequest as _grpc_channelz_v1_GetServersRequest, GetServersRequest__Output as _grpc_channelz_v1_GetServersRequest__Output } from './grpc/channelz/v1/GetServersRequest'; -import type { GetServersResponse as _grpc_channelz_v1_GetServersResponse, GetServersResponse__Output as _grpc_channelz_v1_GetServersResponse__Output } from './grpc/channelz/v1/GetServersResponse'; -import type { GetSocketRequest as _grpc_channelz_v1_GetSocketRequest, GetSocketRequest__Output as _grpc_channelz_v1_GetSocketRequest__Output } from './grpc/channelz/v1/GetSocketRequest'; -import type { GetSocketResponse as _grpc_channelz_v1_GetSocketResponse, GetSocketResponse__Output as _grpc_channelz_v1_GetSocketResponse__Output } from './grpc/channelz/v1/GetSocketResponse'; -import type { GetSubchannelRequest as _grpc_channelz_v1_GetSubchannelRequest, GetSubchannelRequest__Output as _grpc_channelz_v1_GetSubchannelRequest__Output } from './grpc/channelz/v1/GetSubchannelRequest'; -import type { GetSubchannelResponse as _grpc_channelz_v1_GetSubchannelResponse, GetSubchannelResponse__Output as _grpc_channelz_v1_GetSubchannelResponse__Output } from './grpc/channelz/v1/GetSubchannelResponse'; -import type { GetTopChannelsRequest as _grpc_channelz_v1_GetTopChannelsRequest, GetTopChannelsRequest__Output as _grpc_channelz_v1_GetTopChannelsRequest__Output } from './grpc/channelz/v1/GetTopChannelsRequest'; -import type { GetTopChannelsResponse as _grpc_channelz_v1_GetTopChannelsResponse, GetTopChannelsResponse__Output as _grpc_channelz_v1_GetTopChannelsResponse__Output } from './grpc/channelz/v1/GetTopChannelsResponse'; -import type { Security as _grpc_channelz_v1_Security, Security__Output as _grpc_channelz_v1_Security__Output } from './grpc/channelz/v1/Security'; -import type { Server as _grpc_channelz_v1_Server, Server__Output as _grpc_channelz_v1_Server__Output } from './grpc/channelz/v1/Server'; -import type { ServerData as _grpc_channelz_v1_ServerData, ServerData__Output as _grpc_channelz_v1_ServerData__Output } from './grpc/channelz/v1/ServerData'; -import type { ServerRef as _grpc_channelz_v1_ServerRef, ServerRef__Output as _grpc_channelz_v1_ServerRef__Output } from './grpc/channelz/v1/ServerRef'; -import type { Socket as _grpc_channelz_v1_Socket, Socket__Output as _grpc_channelz_v1_Socket__Output } from './grpc/channelz/v1/Socket'; -import type { SocketData as _grpc_channelz_v1_SocketData, SocketData__Output as _grpc_channelz_v1_SocketData__Output } from './grpc/channelz/v1/SocketData'; -import type { SocketOption as _grpc_channelz_v1_SocketOption, SocketOption__Output as _grpc_channelz_v1_SocketOption__Output } from './grpc/channelz/v1/SocketOption'; -import type { SocketOptionLinger as _grpc_channelz_v1_SocketOptionLinger, SocketOptionLinger__Output as _grpc_channelz_v1_SocketOptionLinger__Output } from './grpc/channelz/v1/SocketOptionLinger'; -import type { SocketOptionTcpInfo as _grpc_channelz_v1_SocketOptionTcpInfo, SocketOptionTcpInfo__Output as _grpc_channelz_v1_SocketOptionTcpInfo__Output } from './grpc/channelz/v1/SocketOptionTcpInfo'; -import type { SocketOptionTimeout as _grpc_channelz_v1_SocketOptionTimeout, SocketOptionTimeout__Output as _grpc_channelz_v1_SocketOptionTimeout__Output } from './grpc/channelz/v1/SocketOptionTimeout'; -import type { SocketRef as _grpc_channelz_v1_SocketRef, SocketRef__Output as _grpc_channelz_v1_SocketRef__Output } from './grpc/channelz/v1/SocketRef'; -import type { Subchannel as _grpc_channelz_v1_Subchannel, Subchannel__Output as _grpc_channelz_v1_Subchannel__Output } from './grpc/channelz/v1/Subchannel'; -import type { SubchannelRef as _grpc_channelz_v1_SubchannelRef, SubchannelRef__Output as _grpc_channelz_v1_SubchannelRef__Output } from './grpc/channelz/v1/SubchannelRef'; -type SubtypeConstructor any, Subtype> = { - new (...args: ConstructorParameters): Subtype; -}; -export interface ProtoGrpcType { - google: { - protobuf: { - Any: MessageTypeDefinition<_google_protobuf_Any, _google_protobuf_Any__Output>; - BoolValue: MessageTypeDefinition<_google_protobuf_BoolValue, _google_protobuf_BoolValue__Output>; - BytesValue: MessageTypeDefinition<_google_protobuf_BytesValue, _google_protobuf_BytesValue__Output>; - DoubleValue: MessageTypeDefinition<_google_protobuf_DoubleValue, _google_protobuf_DoubleValue__Output>; - Duration: MessageTypeDefinition<_google_protobuf_Duration, _google_protobuf_Duration__Output>; - FloatValue: MessageTypeDefinition<_google_protobuf_FloatValue, _google_protobuf_FloatValue__Output>; - Int32Value: MessageTypeDefinition<_google_protobuf_Int32Value, _google_protobuf_Int32Value__Output>; - Int64Value: MessageTypeDefinition<_google_protobuf_Int64Value, _google_protobuf_Int64Value__Output>; - StringValue: MessageTypeDefinition<_google_protobuf_StringValue, _google_protobuf_StringValue__Output>; - Timestamp: MessageTypeDefinition<_google_protobuf_Timestamp, _google_protobuf_Timestamp__Output>; - UInt32Value: MessageTypeDefinition<_google_protobuf_UInt32Value, _google_protobuf_UInt32Value__Output>; - UInt64Value: MessageTypeDefinition<_google_protobuf_UInt64Value, _google_protobuf_UInt64Value__Output>; - }; - }; - grpc: { - channelz: { - v1: { - Address: MessageTypeDefinition<_grpc_channelz_v1_Address, _grpc_channelz_v1_Address__Output>; - Channel: MessageTypeDefinition<_grpc_channelz_v1_Channel, _grpc_channelz_v1_Channel__Output>; - ChannelConnectivityState: MessageTypeDefinition<_grpc_channelz_v1_ChannelConnectivityState, _grpc_channelz_v1_ChannelConnectivityState__Output>; - ChannelData: MessageTypeDefinition<_grpc_channelz_v1_ChannelData, _grpc_channelz_v1_ChannelData__Output>; - ChannelRef: MessageTypeDefinition<_grpc_channelz_v1_ChannelRef, _grpc_channelz_v1_ChannelRef__Output>; - ChannelTrace: MessageTypeDefinition<_grpc_channelz_v1_ChannelTrace, _grpc_channelz_v1_ChannelTrace__Output>; - ChannelTraceEvent: MessageTypeDefinition<_grpc_channelz_v1_ChannelTraceEvent, _grpc_channelz_v1_ChannelTraceEvent__Output>; - /** - * Channelz is a service exposed by gRPC servers that provides detailed debug - * information. - */ - Channelz: SubtypeConstructor & { - service: _grpc_channelz_v1_ChannelzDefinition; - }; - GetChannelRequest: MessageTypeDefinition<_grpc_channelz_v1_GetChannelRequest, _grpc_channelz_v1_GetChannelRequest__Output>; - GetChannelResponse: MessageTypeDefinition<_grpc_channelz_v1_GetChannelResponse, _grpc_channelz_v1_GetChannelResponse__Output>; - GetServerRequest: MessageTypeDefinition<_grpc_channelz_v1_GetServerRequest, _grpc_channelz_v1_GetServerRequest__Output>; - GetServerResponse: MessageTypeDefinition<_grpc_channelz_v1_GetServerResponse, _grpc_channelz_v1_GetServerResponse__Output>; - GetServerSocketsRequest: MessageTypeDefinition<_grpc_channelz_v1_GetServerSocketsRequest, _grpc_channelz_v1_GetServerSocketsRequest__Output>; - GetServerSocketsResponse: MessageTypeDefinition<_grpc_channelz_v1_GetServerSocketsResponse, _grpc_channelz_v1_GetServerSocketsResponse__Output>; - GetServersRequest: MessageTypeDefinition<_grpc_channelz_v1_GetServersRequest, _grpc_channelz_v1_GetServersRequest__Output>; - GetServersResponse: MessageTypeDefinition<_grpc_channelz_v1_GetServersResponse, _grpc_channelz_v1_GetServersResponse__Output>; - GetSocketRequest: MessageTypeDefinition<_grpc_channelz_v1_GetSocketRequest, _grpc_channelz_v1_GetSocketRequest__Output>; - GetSocketResponse: MessageTypeDefinition<_grpc_channelz_v1_GetSocketResponse, _grpc_channelz_v1_GetSocketResponse__Output>; - GetSubchannelRequest: MessageTypeDefinition<_grpc_channelz_v1_GetSubchannelRequest, _grpc_channelz_v1_GetSubchannelRequest__Output>; - GetSubchannelResponse: MessageTypeDefinition<_grpc_channelz_v1_GetSubchannelResponse, _grpc_channelz_v1_GetSubchannelResponse__Output>; - GetTopChannelsRequest: MessageTypeDefinition<_grpc_channelz_v1_GetTopChannelsRequest, _grpc_channelz_v1_GetTopChannelsRequest__Output>; - GetTopChannelsResponse: MessageTypeDefinition<_grpc_channelz_v1_GetTopChannelsResponse, _grpc_channelz_v1_GetTopChannelsResponse__Output>; - Security: MessageTypeDefinition<_grpc_channelz_v1_Security, _grpc_channelz_v1_Security__Output>; - Server: MessageTypeDefinition<_grpc_channelz_v1_Server, _grpc_channelz_v1_Server__Output>; - ServerData: MessageTypeDefinition<_grpc_channelz_v1_ServerData, _grpc_channelz_v1_ServerData__Output>; - ServerRef: MessageTypeDefinition<_grpc_channelz_v1_ServerRef, _grpc_channelz_v1_ServerRef__Output>; - Socket: MessageTypeDefinition<_grpc_channelz_v1_Socket, _grpc_channelz_v1_Socket__Output>; - SocketData: MessageTypeDefinition<_grpc_channelz_v1_SocketData, _grpc_channelz_v1_SocketData__Output>; - SocketOption: MessageTypeDefinition<_grpc_channelz_v1_SocketOption, _grpc_channelz_v1_SocketOption__Output>; - SocketOptionLinger: MessageTypeDefinition<_grpc_channelz_v1_SocketOptionLinger, _grpc_channelz_v1_SocketOptionLinger__Output>; - SocketOptionTcpInfo: MessageTypeDefinition<_grpc_channelz_v1_SocketOptionTcpInfo, _grpc_channelz_v1_SocketOptionTcpInfo__Output>; - SocketOptionTimeout: MessageTypeDefinition<_grpc_channelz_v1_SocketOptionTimeout, _grpc_channelz_v1_SocketOptionTimeout__Output>; - SocketRef: MessageTypeDefinition<_grpc_channelz_v1_SocketRef, _grpc_channelz_v1_SocketRef__Output>; - Subchannel: MessageTypeDefinition<_grpc_channelz_v1_Subchannel, _grpc_channelz_v1_Subchannel__Output>; - SubchannelRef: MessageTypeDefinition<_grpc_channelz_v1_SubchannelRef, _grpc_channelz_v1_SubchannelRef__Output>; - }; - }; - }; -} -export {}; diff --git a/node_modules/@grpc/grpc-js/build/src/generated/channelz.js b/node_modules/@grpc/grpc-js/build/src/generated/channelz.js deleted file mode 100644 index 0c2cf67..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/channelz.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=channelz.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/channelz.js.map b/node_modules/@grpc/grpc-js/build/src/generated/channelz.js.map deleted file mode 100644 index af4016b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/channelz.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"channelz.js","sourceRoot":"","sources":["../../../src/generated/channelz.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.d.ts deleted file mode 100644 index 1aa55a4..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { AnyExtension } from '@grpc/proto-loader'; -export type Any = AnyExtension | { - type_url: string; - value: Buffer | Uint8Array | string; -}; -export interface Any__Output { - 'type_url': (string); - 'value': (Buffer); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.js deleted file mode 100644 index f9651f8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Any.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.js.map deleted file mode 100644 index 2e75474..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Any.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/Any.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.d.ts deleted file mode 100644 index b7235a7..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface BoolValue { - 'value'?: (boolean); -} -export interface BoolValue__Output { - 'value': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.js deleted file mode 100644 index f893f74..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=BoolValue.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.js.map deleted file mode 100644 index 3573853..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BoolValue.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/BoolValue.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.d.ts deleted file mode 100644 index ec0dae9..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface BytesValue { - 'value'?: (Buffer | Uint8Array | string); -} -export interface BytesValue__Output { - 'value': (Buffer); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.js deleted file mode 100644 index 4cac93e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=BytesValue.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.js.map deleted file mode 100644 index a589ea5..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BytesValue.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/BytesValue.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.d.ts deleted file mode 100644 index 35e95e1..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { FieldDescriptorProto as _google_protobuf_FieldDescriptorProto, FieldDescriptorProto__Output as _google_protobuf_FieldDescriptorProto__Output } from '../../google/protobuf/FieldDescriptorProto'; -import type { DescriptorProto as _google_protobuf_DescriptorProto, DescriptorProto__Output as _google_protobuf_DescriptorProto__Output } from '../../google/protobuf/DescriptorProto'; -import type { EnumDescriptorProto as _google_protobuf_EnumDescriptorProto, EnumDescriptorProto__Output as _google_protobuf_EnumDescriptorProto__Output } from '../../google/protobuf/EnumDescriptorProto'; -import type { MessageOptions as _google_protobuf_MessageOptions, MessageOptions__Output as _google_protobuf_MessageOptions__Output } from '../../google/protobuf/MessageOptions'; -import type { OneofDescriptorProto as _google_protobuf_OneofDescriptorProto, OneofDescriptorProto__Output as _google_protobuf_OneofDescriptorProto__Output } from '../../google/protobuf/OneofDescriptorProto'; -import type { SymbolVisibility as _google_protobuf_SymbolVisibility, SymbolVisibility__Output as _google_protobuf_SymbolVisibility__Output } from '../../google/protobuf/SymbolVisibility'; -import type { ExtensionRangeOptions as _google_protobuf_ExtensionRangeOptions, ExtensionRangeOptions__Output as _google_protobuf_ExtensionRangeOptions__Output } from '../../google/protobuf/ExtensionRangeOptions'; -export interface _google_protobuf_DescriptorProto_ExtensionRange { - 'start'?: (number); - 'end'?: (number); - 'options'?: (_google_protobuf_ExtensionRangeOptions | null); -} -export interface _google_protobuf_DescriptorProto_ExtensionRange__Output { - 'start': (number); - 'end': (number); - 'options': (_google_protobuf_ExtensionRangeOptions__Output | null); -} -export interface _google_protobuf_DescriptorProto_ReservedRange { - 'start'?: (number); - 'end'?: (number); -} -export interface _google_protobuf_DescriptorProto_ReservedRange__Output { - 'start': (number); - 'end': (number); -} -export interface DescriptorProto { - 'name'?: (string); - 'field'?: (_google_protobuf_FieldDescriptorProto)[]; - 'nestedType'?: (_google_protobuf_DescriptorProto)[]; - 'enumType'?: (_google_protobuf_EnumDescriptorProto)[]; - 'extensionRange'?: (_google_protobuf_DescriptorProto_ExtensionRange)[]; - 'extension'?: (_google_protobuf_FieldDescriptorProto)[]; - 'options'?: (_google_protobuf_MessageOptions | null); - 'oneofDecl'?: (_google_protobuf_OneofDescriptorProto)[]; - 'reservedRange'?: (_google_protobuf_DescriptorProto_ReservedRange)[]; - 'reservedName'?: (string)[]; - 'visibility'?: (_google_protobuf_SymbolVisibility); -} -export interface DescriptorProto__Output { - 'name': (string); - 'field': (_google_protobuf_FieldDescriptorProto__Output)[]; - 'nestedType': (_google_protobuf_DescriptorProto__Output)[]; - 'enumType': (_google_protobuf_EnumDescriptorProto__Output)[]; - 'extensionRange': (_google_protobuf_DescriptorProto_ExtensionRange__Output)[]; - 'extension': (_google_protobuf_FieldDescriptorProto__Output)[]; - 'options': (_google_protobuf_MessageOptions__Output | null); - 'oneofDecl': (_google_protobuf_OneofDescriptorProto__Output)[]; - 'reservedRange': (_google_protobuf_DescriptorProto_ReservedRange__Output)[]; - 'reservedName': (string)[]; - 'visibility': (_google_protobuf_SymbolVisibility__Output); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.js deleted file mode 100644 index ea5f608..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=DescriptorProto.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.js.map deleted file mode 100644 index 0855a90..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DescriptorProto.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/DescriptorProto.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.d.ts deleted file mode 100644 index e4e2204..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface DoubleValue { - 'value'?: (number | string); -} -export interface DoubleValue__Output { - 'value': (number); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.js deleted file mode 100644 index 133e011..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=DoubleValue.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.js.map deleted file mode 100644 index 7f28720..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DoubleValue.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/DoubleValue.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.d.ts deleted file mode 100644 index 7e04ea6..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -export interface Duration { - 'seconds'?: (number | string | Long); - 'nanos'?: (number); -} -export interface Duration__Output { - 'seconds': (string); - 'nanos': (number); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.js deleted file mode 100644 index b071b70..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Duration.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.js.map deleted file mode 100644 index 3fc8fe8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Duration.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/Duration.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.d.ts deleted file mode 100644 index 6ec1032..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export declare const Edition: { - readonly EDITION_UNKNOWN: "EDITION_UNKNOWN"; - readonly EDITION_LEGACY: "EDITION_LEGACY"; - readonly EDITION_PROTO2: "EDITION_PROTO2"; - readonly EDITION_PROTO3: "EDITION_PROTO3"; - readonly EDITION_2023: "EDITION_2023"; - readonly EDITION_2024: "EDITION_2024"; - readonly EDITION_1_TEST_ONLY: "EDITION_1_TEST_ONLY"; - readonly EDITION_2_TEST_ONLY: "EDITION_2_TEST_ONLY"; - readonly EDITION_99997_TEST_ONLY: "EDITION_99997_TEST_ONLY"; - readonly EDITION_99998_TEST_ONLY: "EDITION_99998_TEST_ONLY"; - readonly EDITION_99999_TEST_ONLY: "EDITION_99999_TEST_ONLY"; - readonly EDITION_MAX: "EDITION_MAX"; -}; -export type Edition = 'EDITION_UNKNOWN' | 0 | 'EDITION_LEGACY' | 900 | 'EDITION_PROTO2' | 998 | 'EDITION_PROTO3' | 999 | 'EDITION_2023' | 1000 | 'EDITION_2024' | 1001 | 'EDITION_1_TEST_ONLY' | 1 | 'EDITION_2_TEST_ONLY' | 2 | 'EDITION_99997_TEST_ONLY' | 99997 | 'EDITION_99998_TEST_ONLY' | 99998 | 'EDITION_99999_TEST_ONLY' | 99999 | 'EDITION_MAX' | 2147483647; -export type Edition__Output = typeof Edition[keyof typeof Edition]; diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.js deleted file mode 100644 index e3d848d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Edition = void 0; -exports.Edition = { - EDITION_UNKNOWN: 'EDITION_UNKNOWN', - EDITION_LEGACY: 'EDITION_LEGACY', - EDITION_PROTO2: 'EDITION_PROTO2', - EDITION_PROTO3: 'EDITION_PROTO3', - EDITION_2023: 'EDITION_2023', - EDITION_2024: 'EDITION_2024', - EDITION_1_TEST_ONLY: 'EDITION_1_TEST_ONLY', - EDITION_2_TEST_ONLY: 'EDITION_2_TEST_ONLY', - EDITION_99997_TEST_ONLY: 'EDITION_99997_TEST_ONLY', - EDITION_99998_TEST_ONLY: 'EDITION_99998_TEST_ONLY', - EDITION_99999_TEST_ONLY: 'EDITION_99999_TEST_ONLY', - EDITION_MAX: 'EDITION_MAX', -}; -//# sourceMappingURL=Edition.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.js.map deleted file mode 100644 index ce43ad0..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Edition.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/Edition.ts"],"names":[],"mappings":";AAAA,sBAAsB;;;AAET,QAAA,OAAO,GAAG;IACrB,eAAe,EAAE,iBAAiB;IAClC,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;IAChC,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,cAAc;IAC5B,mBAAmB,EAAE,qBAAqB;IAC1C,mBAAmB,EAAE,qBAAqB;IAC1C,uBAAuB,EAAE,yBAAyB;IAClD,uBAAuB,EAAE,yBAAyB;IAClD,uBAAuB,EAAE,yBAAyB;IAClD,WAAW,EAAE,aAAa;CAClB,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.d.ts deleted file mode 100644 index 943eb31..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { EnumValueDescriptorProto as _google_protobuf_EnumValueDescriptorProto, EnumValueDescriptorProto__Output as _google_protobuf_EnumValueDescriptorProto__Output } from '../../google/protobuf/EnumValueDescriptorProto'; -import type { EnumOptions as _google_protobuf_EnumOptions, EnumOptions__Output as _google_protobuf_EnumOptions__Output } from '../../google/protobuf/EnumOptions'; -import type { SymbolVisibility as _google_protobuf_SymbolVisibility, SymbolVisibility__Output as _google_protobuf_SymbolVisibility__Output } from '../../google/protobuf/SymbolVisibility'; -export interface _google_protobuf_EnumDescriptorProto_EnumReservedRange { - 'start'?: (number); - 'end'?: (number); -} -export interface _google_protobuf_EnumDescriptorProto_EnumReservedRange__Output { - 'start': (number); - 'end': (number); -} -export interface EnumDescriptorProto { - 'name'?: (string); - 'value'?: (_google_protobuf_EnumValueDescriptorProto)[]; - 'options'?: (_google_protobuf_EnumOptions | null); - 'reservedRange'?: (_google_protobuf_EnumDescriptorProto_EnumReservedRange)[]; - 'reservedName'?: (string)[]; - 'visibility'?: (_google_protobuf_SymbolVisibility); -} -export interface EnumDescriptorProto__Output { - 'name': (string); - 'value': (_google_protobuf_EnumValueDescriptorProto__Output)[]; - 'options': (_google_protobuf_EnumOptions__Output | null); - 'reservedRange': (_google_protobuf_EnumDescriptorProto_EnumReservedRange__Output)[]; - 'reservedName': (string)[]; - 'visibility': (_google_protobuf_SymbolVisibility__Output); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.js deleted file mode 100644 index 903ec03..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=EnumDescriptorProto.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.js.map deleted file mode 100644 index 9eef1e6..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EnumDescriptorProto.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/EnumDescriptorProto.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.d.ts deleted file mode 100644 index 690d0dc..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; -export interface EnumOptions { - 'allowAlias'?: (boolean); - 'deprecated'?: (boolean); - /** - * @deprecated - */ - 'deprecatedLegacyJsonFieldConflicts'?: (boolean); - 'features'?: (_google_protobuf_FeatureSet | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; -} -export interface EnumOptions__Output { - 'allowAlias': (boolean); - 'deprecated': (boolean); - /** - * @deprecated - */ - 'deprecatedLegacyJsonFieldConflicts': (boolean); - 'features': (_google_protobuf_FeatureSet__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.js deleted file mode 100644 index 9b8fa44..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=EnumOptions.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.js.map deleted file mode 100644 index 5f1f05a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EnumOptions.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/EnumOptions.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.d.ts deleted file mode 100644 index b0a458b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { EnumValueOptions as _google_protobuf_EnumValueOptions, EnumValueOptions__Output as _google_protobuf_EnumValueOptions__Output } from '../../google/protobuf/EnumValueOptions'; -export interface EnumValueDescriptorProto { - 'name'?: (string); - 'number'?: (number); - 'options'?: (_google_protobuf_EnumValueOptions | null); -} -export interface EnumValueDescriptorProto__Output { - 'name': (string); - 'number': (number); - 'options': (_google_protobuf_EnumValueOptions__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.js deleted file mode 100644 index d19f3db..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=EnumValueDescriptorProto.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.js.map deleted file mode 100644 index 624fe37..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EnumValueDescriptorProto.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/EnumValueDescriptorProto.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.d.ts deleted file mode 100644 index 198dde7..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { _google_protobuf_FieldOptions_FeatureSupport, _google_protobuf_FieldOptions_FeatureSupport__Output } from '../../google/protobuf/FieldOptions'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; -export interface EnumValueOptions { - 'deprecated'?: (boolean); - 'features'?: (_google_protobuf_FeatureSet | null); - 'debugRedact'?: (boolean); - 'featureSupport'?: (_google_protobuf_FieldOptions_FeatureSupport | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; -} -export interface EnumValueOptions__Output { - 'deprecated': (boolean); - 'features': (_google_protobuf_FeatureSet__Output | null); - 'debugRedact': (boolean); - 'featureSupport': (_google_protobuf_FieldOptions_FeatureSupport__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.js deleted file mode 100644 index bfe5888..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=EnumValueOptions.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.js.map deleted file mode 100644 index bc6df35..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EnumValueOptions.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/EnumValueOptions.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.d.ts deleted file mode 100644 index b296f6e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; -export interface _google_protobuf_ExtensionRangeOptions_Declaration { - 'number'?: (number); - 'fullName'?: (string); - 'type'?: (string); - 'reserved'?: (boolean); - 'repeated'?: (boolean); -} -export interface _google_protobuf_ExtensionRangeOptions_Declaration__Output { - 'number': (number); - 'fullName': (string); - 'type': (string); - 'reserved': (boolean); - 'repeated': (boolean); -} -export declare const _google_protobuf_ExtensionRangeOptions_VerificationState: { - readonly DECLARATION: "DECLARATION"; - readonly UNVERIFIED: "UNVERIFIED"; -}; -export type _google_protobuf_ExtensionRangeOptions_VerificationState = 'DECLARATION' | 0 | 'UNVERIFIED' | 1; -export type _google_protobuf_ExtensionRangeOptions_VerificationState__Output = typeof _google_protobuf_ExtensionRangeOptions_VerificationState[keyof typeof _google_protobuf_ExtensionRangeOptions_VerificationState]; -export interface ExtensionRangeOptions { - 'declaration'?: (_google_protobuf_ExtensionRangeOptions_Declaration)[]; - 'verification'?: (_google_protobuf_ExtensionRangeOptions_VerificationState); - 'features'?: (_google_protobuf_FeatureSet | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; -} -export interface ExtensionRangeOptions__Output { - 'declaration': (_google_protobuf_ExtensionRangeOptions_Declaration__Output)[]; - 'verification': (_google_protobuf_ExtensionRangeOptions_VerificationState__Output); - 'features': (_google_protobuf_FeatureSet__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.js deleted file mode 100644 index d210aaf..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -exports._google_protobuf_ExtensionRangeOptions_VerificationState = void 0; -// Original file: null -exports._google_protobuf_ExtensionRangeOptions_VerificationState = { - DECLARATION: 'DECLARATION', - UNVERIFIED: 'UNVERIFIED', -}; -//# sourceMappingURL=ExtensionRangeOptions.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.js.map deleted file mode 100644 index 1c37476..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ExtensionRangeOptions.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/ExtensionRangeOptions.ts"],"names":[],"mappings":";AAAA,sBAAsB;;;AAqBtB,sBAAsB;AAET,QAAA,wDAAwD,GAAG;IACtE,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;CAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.d.ts deleted file mode 100644 index 7d60053..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -export declare const _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility: { - readonly DEFAULT_SYMBOL_VISIBILITY_UNKNOWN: "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"; - readonly EXPORT_ALL: "EXPORT_ALL"; - readonly EXPORT_TOP_LEVEL: "EXPORT_TOP_LEVEL"; - readonly LOCAL_ALL: "LOCAL_ALL"; - readonly STRICT: "STRICT"; -}; -export type _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 'DEFAULT_SYMBOL_VISIBILITY_UNKNOWN' | 0 | 'EXPORT_ALL' | 1 | 'EXPORT_TOP_LEVEL' | 2 | 'LOCAL_ALL' | 3 | 'STRICT' | 4; -export type _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility__Output = typeof _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility[keyof typeof _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility]; -export declare const _google_protobuf_FeatureSet_EnforceNamingStyle: { - readonly ENFORCE_NAMING_STYLE_UNKNOWN: "ENFORCE_NAMING_STYLE_UNKNOWN"; - readonly STYLE2024: "STYLE2024"; - readonly STYLE_LEGACY: "STYLE_LEGACY"; -}; -export type _google_protobuf_FeatureSet_EnforceNamingStyle = 'ENFORCE_NAMING_STYLE_UNKNOWN' | 0 | 'STYLE2024' | 1 | 'STYLE_LEGACY' | 2; -export type _google_protobuf_FeatureSet_EnforceNamingStyle__Output = typeof _google_protobuf_FeatureSet_EnforceNamingStyle[keyof typeof _google_protobuf_FeatureSet_EnforceNamingStyle]; -export declare const _google_protobuf_FeatureSet_EnumType: { - readonly ENUM_TYPE_UNKNOWN: "ENUM_TYPE_UNKNOWN"; - readonly OPEN: "OPEN"; - readonly CLOSED: "CLOSED"; -}; -export type _google_protobuf_FeatureSet_EnumType = 'ENUM_TYPE_UNKNOWN' | 0 | 'OPEN' | 1 | 'CLOSED' | 2; -export type _google_protobuf_FeatureSet_EnumType__Output = typeof _google_protobuf_FeatureSet_EnumType[keyof typeof _google_protobuf_FeatureSet_EnumType]; -export declare const _google_protobuf_FeatureSet_FieldPresence: { - readonly FIELD_PRESENCE_UNKNOWN: "FIELD_PRESENCE_UNKNOWN"; - readonly EXPLICIT: "EXPLICIT"; - readonly IMPLICIT: "IMPLICIT"; - readonly LEGACY_REQUIRED: "LEGACY_REQUIRED"; -}; -export type _google_protobuf_FeatureSet_FieldPresence = 'FIELD_PRESENCE_UNKNOWN' | 0 | 'EXPLICIT' | 1 | 'IMPLICIT' | 2 | 'LEGACY_REQUIRED' | 3; -export type _google_protobuf_FeatureSet_FieldPresence__Output = typeof _google_protobuf_FeatureSet_FieldPresence[keyof typeof _google_protobuf_FeatureSet_FieldPresence]; -export declare const _google_protobuf_FeatureSet_JsonFormat: { - readonly JSON_FORMAT_UNKNOWN: "JSON_FORMAT_UNKNOWN"; - readonly ALLOW: "ALLOW"; - readonly LEGACY_BEST_EFFORT: "LEGACY_BEST_EFFORT"; -}; -export type _google_protobuf_FeatureSet_JsonFormat = 'JSON_FORMAT_UNKNOWN' | 0 | 'ALLOW' | 1 | 'LEGACY_BEST_EFFORT' | 2; -export type _google_protobuf_FeatureSet_JsonFormat__Output = typeof _google_protobuf_FeatureSet_JsonFormat[keyof typeof _google_protobuf_FeatureSet_JsonFormat]; -export declare const _google_protobuf_FeatureSet_MessageEncoding: { - readonly MESSAGE_ENCODING_UNKNOWN: "MESSAGE_ENCODING_UNKNOWN"; - readonly LENGTH_PREFIXED: "LENGTH_PREFIXED"; - readonly DELIMITED: "DELIMITED"; -}; -export type _google_protobuf_FeatureSet_MessageEncoding = 'MESSAGE_ENCODING_UNKNOWN' | 0 | 'LENGTH_PREFIXED' | 1 | 'DELIMITED' | 2; -export type _google_protobuf_FeatureSet_MessageEncoding__Output = typeof _google_protobuf_FeatureSet_MessageEncoding[keyof typeof _google_protobuf_FeatureSet_MessageEncoding]; -export declare const _google_protobuf_FeatureSet_RepeatedFieldEncoding: { - readonly REPEATED_FIELD_ENCODING_UNKNOWN: "REPEATED_FIELD_ENCODING_UNKNOWN"; - readonly PACKED: "PACKED"; - readonly EXPANDED: "EXPANDED"; -}; -export type _google_protobuf_FeatureSet_RepeatedFieldEncoding = 'REPEATED_FIELD_ENCODING_UNKNOWN' | 0 | 'PACKED' | 1 | 'EXPANDED' | 2; -export type _google_protobuf_FeatureSet_RepeatedFieldEncoding__Output = typeof _google_protobuf_FeatureSet_RepeatedFieldEncoding[keyof typeof _google_protobuf_FeatureSet_RepeatedFieldEncoding]; -export declare const _google_protobuf_FeatureSet_Utf8Validation: { - readonly UTF8_VALIDATION_UNKNOWN: "UTF8_VALIDATION_UNKNOWN"; - readonly VERIFY: "VERIFY"; - readonly NONE: "NONE"; -}; -export type _google_protobuf_FeatureSet_Utf8Validation = 'UTF8_VALIDATION_UNKNOWN' | 0 | 'VERIFY' | 2 | 'NONE' | 3; -export type _google_protobuf_FeatureSet_Utf8Validation__Output = typeof _google_protobuf_FeatureSet_Utf8Validation[keyof typeof _google_protobuf_FeatureSet_Utf8Validation]; -export interface _google_protobuf_FeatureSet_VisibilityFeature { -} -export interface _google_protobuf_FeatureSet_VisibilityFeature__Output { -} -export interface FeatureSet { - 'fieldPresence'?: (_google_protobuf_FeatureSet_FieldPresence); - 'enumType'?: (_google_protobuf_FeatureSet_EnumType); - 'repeatedFieldEncoding'?: (_google_protobuf_FeatureSet_RepeatedFieldEncoding); - 'utf8Validation'?: (_google_protobuf_FeatureSet_Utf8Validation); - 'messageEncoding'?: (_google_protobuf_FeatureSet_MessageEncoding); - 'jsonFormat'?: (_google_protobuf_FeatureSet_JsonFormat); - 'enforceNamingStyle'?: (_google_protobuf_FeatureSet_EnforceNamingStyle); - 'defaultSymbolVisibility'?: (_google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility); -} -export interface FeatureSet__Output { - 'fieldPresence': (_google_protobuf_FeatureSet_FieldPresence__Output); - 'enumType': (_google_protobuf_FeatureSet_EnumType__Output); - 'repeatedFieldEncoding': (_google_protobuf_FeatureSet_RepeatedFieldEncoding__Output); - 'utf8Validation': (_google_protobuf_FeatureSet_Utf8Validation__Output); - 'messageEncoding': (_google_protobuf_FeatureSet_MessageEncoding__Output); - 'jsonFormat': (_google_protobuf_FeatureSet_JsonFormat__Output); - 'enforceNamingStyle': (_google_protobuf_FeatureSet_EnforceNamingStyle__Output); - 'defaultSymbolVisibility': (_google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility__Output); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.js deleted file mode 100644 index 2aa1002..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -exports._google_protobuf_FeatureSet_Utf8Validation = exports._google_protobuf_FeatureSet_RepeatedFieldEncoding = exports._google_protobuf_FeatureSet_MessageEncoding = exports._google_protobuf_FeatureSet_JsonFormat = exports._google_protobuf_FeatureSet_FieldPresence = exports._google_protobuf_FeatureSet_EnumType = exports._google_protobuf_FeatureSet_EnforceNamingStyle = exports._google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility = void 0; -// Original file: null -exports._google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility = { - DEFAULT_SYMBOL_VISIBILITY_UNKNOWN: 'DEFAULT_SYMBOL_VISIBILITY_UNKNOWN', - EXPORT_ALL: 'EXPORT_ALL', - EXPORT_TOP_LEVEL: 'EXPORT_TOP_LEVEL', - LOCAL_ALL: 'LOCAL_ALL', - STRICT: 'STRICT', -}; -// Original file: null -exports._google_protobuf_FeatureSet_EnforceNamingStyle = { - ENFORCE_NAMING_STYLE_UNKNOWN: 'ENFORCE_NAMING_STYLE_UNKNOWN', - STYLE2024: 'STYLE2024', - STYLE_LEGACY: 'STYLE_LEGACY', -}; -// Original file: null -exports._google_protobuf_FeatureSet_EnumType = { - ENUM_TYPE_UNKNOWN: 'ENUM_TYPE_UNKNOWN', - OPEN: 'OPEN', - CLOSED: 'CLOSED', -}; -// Original file: null -exports._google_protobuf_FeatureSet_FieldPresence = { - FIELD_PRESENCE_UNKNOWN: 'FIELD_PRESENCE_UNKNOWN', - EXPLICIT: 'EXPLICIT', - IMPLICIT: 'IMPLICIT', - LEGACY_REQUIRED: 'LEGACY_REQUIRED', -}; -// Original file: null -exports._google_protobuf_FeatureSet_JsonFormat = { - JSON_FORMAT_UNKNOWN: 'JSON_FORMAT_UNKNOWN', - ALLOW: 'ALLOW', - LEGACY_BEST_EFFORT: 'LEGACY_BEST_EFFORT', -}; -// Original file: null -exports._google_protobuf_FeatureSet_MessageEncoding = { - MESSAGE_ENCODING_UNKNOWN: 'MESSAGE_ENCODING_UNKNOWN', - LENGTH_PREFIXED: 'LENGTH_PREFIXED', - DELIMITED: 'DELIMITED', -}; -// Original file: null -exports._google_protobuf_FeatureSet_RepeatedFieldEncoding = { - REPEATED_FIELD_ENCODING_UNKNOWN: 'REPEATED_FIELD_ENCODING_UNKNOWN', - PACKED: 'PACKED', - EXPANDED: 'EXPANDED', -}; -// Original file: null -exports._google_protobuf_FeatureSet_Utf8Validation = { - UTF8_VALIDATION_UNKNOWN: 'UTF8_VALIDATION_UNKNOWN', - VERIFY: 'VERIFY', - NONE: 'NONE', -}; -//# sourceMappingURL=FeatureSet.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.js.map deleted file mode 100644 index 86820cb..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FeatureSet.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/FeatureSet.ts"],"names":[],"mappings":";AAAA,sBAAsB;;;AAGtB,sBAAsB;AAET,QAAA,qEAAqE,GAAG;IACnF,iCAAiC,EAAE,mCAAmC;IACtE,UAAU,EAAE,YAAY;IACxB,gBAAgB,EAAE,kBAAkB;IACpC,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;CACR,CAAC;AAgBX,sBAAsB;AAET,QAAA,8CAA8C,GAAG;IAC5D,4BAA4B,EAAE,8BAA8B;IAC5D,SAAS,EAAE,WAAW;IACtB,YAAY,EAAE,cAAc;CACpB,CAAC;AAYX,sBAAsB;AAET,QAAA,oCAAoC,GAAG;IAClD,iBAAiB,EAAE,mBAAmB;IACtC,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;CACR,CAAC;AAYX,sBAAsB;AAET,QAAA,yCAAyC,GAAG;IACvD,sBAAsB,EAAE,wBAAwB;IAChD,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,eAAe,EAAE,iBAAiB;CAC1B,CAAC;AAcX,sBAAsB;AAET,QAAA,sCAAsC,GAAG;IACpD,mBAAmB,EAAE,qBAAqB;IAC1C,KAAK,EAAE,OAAO;IACd,kBAAkB,EAAE,oBAAoB;CAChC,CAAC;AAYX,sBAAsB;AAET,QAAA,2CAA2C,GAAG;IACzD,wBAAwB,EAAE,0BAA0B;IACpD,eAAe,EAAE,iBAAiB;IAClC,SAAS,EAAE,WAAW;CACd,CAAC;AAYX,sBAAsB;AAET,QAAA,iDAAiD,GAAG;IAC/D,+BAA+B,EAAE,iCAAiC;IAClE,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAYX,sBAAsB;AAET,QAAA,0CAA0C,GAAG;IACxD,uBAAuB,EAAE,yBAAyB;IAClD,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.d.ts deleted file mode 100644 index c305486..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { Edition as _google_protobuf_Edition, Edition__Output as _google_protobuf_Edition__Output } from '../../google/protobuf/Edition'; -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -export interface _google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault { - 'edition'?: (_google_protobuf_Edition); - 'overridableFeatures'?: (_google_protobuf_FeatureSet | null); - 'fixedFeatures'?: (_google_protobuf_FeatureSet | null); -} -export interface _google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault__Output { - 'edition': (_google_protobuf_Edition__Output); - 'overridableFeatures': (_google_protobuf_FeatureSet__Output | null); - 'fixedFeatures': (_google_protobuf_FeatureSet__Output | null); -} -export interface FeatureSetDefaults { - 'defaults'?: (_google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault)[]; - 'minimumEdition'?: (_google_protobuf_Edition); - 'maximumEdition'?: (_google_protobuf_Edition); -} -export interface FeatureSetDefaults__Output { - 'defaults': (_google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault__Output)[]; - 'minimumEdition': (_google_protobuf_Edition__Output); - 'maximumEdition': (_google_protobuf_Edition__Output); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.js deleted file mode 100644 index fbf2c8c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=FeatureSetDefaults.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.js.map deleted file mode 100644 index a81eced..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FeatureSetDefaults.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/FeatureSetDefaults.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.d.ts deleted file mode 100644 index b1250f1..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { FieldOptions as _google_protobuf_FieldOptions, FieldOptions__Output as _google_protobuf_FieldOptions__Output } from '../../google/protobuf/FieldOptions'; -export declare const _google_protobuf_FieldDescriptorProto_Label: { - readonly LABEL_OPTIONAL: "LABEL_OPTIONAL"; - readonly LABEL_REPEATED: "LABEL_REPEATED"; - readonly LABEL_REQUIRED: "LABEL_REQUIRED"; -}; -export type _google_protobuf_FieldDescriptorProto_Label = 'LABEL_OPTIONAL' | 1 | 'LABEL_REPEATED' | 3 | 'LABEL_REQUIRED' | 2; -export type _google_protobuf_FieldDescriptorProto_Label__Output = typeof _google_protobuf_FieldDescriptorProto_Label[keyof typeof _google_protobuf_FieldDescriptorProto_Label]; -export declare const _google_protobuf_FieldDescriptorProto_Type: { - readonly TYPE_DOUBLE: "TYPE_DOUBLE"; - readonly TYPE_FLOAT: "TYPE_FLOAT"; - readonly TYPE_INT64: "TYPE_INT64"; - readonly TYPE_UINT64: "TYPE_UINT64"; - readonly TYPE_INT32: "TYPE_INT32"; - readonly TYPE_FIXED64: "TYPE_FIXED64"; - readonly TYPE_FIXED32: "TYPE_FIXED32"; - readonly TYPE_BOOL: "TYPE_BOOL"; - readonly TYPE_STRING: "TYPE_STRING"; - readonly TYPE_GROUP: "TYPE_GROUP"; - readonly TYPE_MESSAGE: "TYPE_MESSAGE"; - readonly TYPE_BYTES: "TYPE_BYTES"; - readonly TYPE_UINT32: "TYPE_UINT32"; - readonly TYPE_ENUM: "TYPE_ENUM"; - readonly TYPE_SFIXED32: "TYPE_SFIXED32"; - readonly TYPE_SFIXED64: "TYPE_SFIXED64"; - readonly TYPE_SINT32: "TYPE_SINT32"; - readonly TYPE_SINT64: "TYPE_SINT64"; -}; -export type _google_protobuf_FieldDescriptorProto_Type = 'TYPE_DOUBLE' | 1 | 'TYPE_FLOAT' | 2 | 'TYPE_INT64' | 3 | 'TYPE_UINT64' | 4 | 'TYPE_INT32' | 5 | 'TYPE_FIXED64' | 6 | 'TYPE_FIXED32' | 7 | 'TYPE_BOOL' | 8 | 'TYPE_STRING' | 9 | 'TYPE_GROUP' | 10 | 'TYPE_MESSAGE' | 11 | 'TYPE_BYTES' | 12 | 'TYPE_UINT32' | 13 | 'TYPE_ENUM' | 14 | 'TYPE_SFIXED32' | 15 | 'TYPE_SFIXED64' | 16 | 'TYPE_SINT32' | 17 | 'TYPE_SINT64' | 18; -export type _google_protobuf_FieldDescriptorProto_Type__Output = typeof _google_protobuf_FieldDescriptorProto_Type[keyof typeof _google_protobuf_FieldDescriptorProto_Type]; -export interface FieldDescriptorProto { - 'name'?: (string); - 'extendee'?: (string); - 'number'?: (number); - 'label'?: (_google_protobuf_FieldDescriptorProto_Label); - 'type'?: (_google_protobuf_FieldDescriptorProto_Type); - 'typeName'?: (string); - 'defaultValue'?: (string); - 'options'?: (_google_protobuf_FieldOptions | null); - 'oneofIndex'?: (number); - 'jsonName'?: (string); - 'proto3Optional'?: (boolean); -} -export interface FieldDescriptorProto__Output { - 'name': (string); - 'extendee': (string); - 'number': (number); - 'label': (_google_protobuf_FieldDescriptorProto_Label__Output); - 'type': (_google_protobuf_FieldDescriptorProto_Type__Output); - 'typeName': (string); - 'defaultValue': (string); - 'options': (_google_protobuf_FieldOptions__Output | null); - 'oneofIndex': (number); - 'jsonName': (string); - 'proto3Optional': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.js deleted file mode 100644 index b47a320..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -exports._google_protobuf_FieldDescriptorProto_Type = exports._google_protobuf_FieldDescriptorProto_Label = void 0; -// Original file: null -exports._google_protobuf_FieldDescriptorProto_Label = { - LABEL_OPTIONAL: 'LABEL_OPTIONAL', - LABEL_REPEATED: 'LABEL_REPEATED', - LABEL_REQUIRED: 'LABEL_REQUIRED', -}; -// Original file: null -exports._google_protobuf_FieldDescriptorProto_Type = { - TYPE_DOUBLE: 'TYPE_DOUBLE', - TYPE_FLOAT: 'TYPE_FLOAT', - TYPE_INT64: 'TYPE_INT64', - TYPE_UINT64: 'TYPE_UINT64', - TYPE_INT32: 'TYPE_INT32', - TYPE_FIXED64: 'TYPE_FIXED64', - TYPE_FIXED32: 'TYPE_FIXED32', - TYPE_BOOL: 'TYPE_BOOL', - TYPE_STRING: 'TYPE_STRING', - TYPE_GROUP: 'TYPE_GROUP', - TYPE_MESSAGE: 'TYPE_MESSAGE', - TYPE_BYTES: 'TYPE_BYTES', - TYPE_UINT32: 'TYPE_UINT32', - TYPE_ENUM: 'TYPE_ENUM', - TYPE_SFIXED32: 'TYPE_SFIXED32', - TYPE_SFIXED64: 'TYPE_SFIXED64', - TYPE_SINT32: 'TYPE_SINT32', - TYPE_SINT64: 'TYPE_SINT64', -}; -//# sourceMappingURL=FieldDescriptorProto.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.js.map deleted file mode 100644 index 95373d0..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FieldDescriptorProto.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/FieldDescriptorProto.ts"],"names":[],"mappings":";AAAA,sBAAsB;;;AAItB,sBAAsB;AAET,QAAA,2CAA2C,GAAG;IACzD,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;CACxB,CAAC;AAYX,sBAAsB;AAET,QAAA,0CAA0C,GAAG;IACxD,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,cAAc;IAC5B,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;IACtB,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;CAClB,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.d.ts deleted file mode 100644 index 7cc46ff..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.d.ts +++ /dev/null @@ -1,99 +0,0 @@ -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; -import type { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from '../../validate/FieldRules'; -import type { Edition as _google_protobuf_Edition, Edition__Output as _google_protobuf_Edition__Output } from '../../google/protobuf/Edition'; -export declare const _google_protobuf_FieldOptions_CType: { - readonly STRING: "STRING"; - readonly CORD: "CORD"; - readonly STRING_PIECE: "STRING_PIECE"; -}; -export type _google_protobuf_FieldOptions_CType = 'STRING' | 0 | 'CORD' | 1 | 'STRING_PIECE' | 2; -export type _google_protobuf_FieldOptions_CType__Output = typeof _google_protobuf_FieldOptions_CType[keyof typeof _google_protobuf_FieldOptions_CType]; -export interface _google_protobuf_FieldOptions_EditionDefault { - 'edition'?: (_google_protobuf_Edition); - 'value'?: (string); -} -export interface _google_protobuf_FieldOptions_EditionDefault__Output { - 'edition': (_google_protobuf_Edition__Output); - 'value': (string); -} -export interface _google_protobuf_FieldOptions_FeatureSupport { - 'editionIntroduced'?: (_google_protobuf_Edition); - 'editionDeprecated'?: (_google_protobuf_Edition); - 'deprecationWarning'?: (string); - 'editionRemoved'?: (_google_protobuf_Edition); -} -export interface _google_protobuf_FieldOptions_FeatureSupport__Output { - 'editionIntroduced': (_google_protobuf_Edition__Output); - 'editionDeprecated': (_google_protobuf_Edition__Output); - 'deprecationWarning': (string); - 'editionRemoved': (_google_protobuf_Edition__Output); -} -export declare const _google_protobuf_FieldOptions_JSType: { - readonly JS_NORMAL: "JS_NORMAL"; - readonly JS_STRING: "JS_STRING"; - readonly JS_NUMBER: "JS_NUMBER"; -}; -export type _google_protobuf_FieldOptions_JSType = 'JS_NORMAL' | 0 | 'JS_STRING' | 1 | 'JS_NUMBER' | 2; -export type _google_protobuf_FieldOptions_JSType__Output = typeof _google_protobuf_FieldOptions_JSType[keyof typeof _google_protobuf_FieldOptions_JSType]; -export declare const _google_protobuf_FieldOptions_OptionRetention: { - readonly RETENTION_UNKNOWN: "RETENTION_UNKNOWN"; - readonly RETENTION_RUNTIME: "RETENTION_RUNTIME"; - readonly RETENTION_SOURCE: "RETENTION_SOURCE"; -}; -export type _google_protobuf_FieldOptions_OptionRetention = 'RETENTION_UNKNOWN' | 0 | 'RETENTION_RUNTIME' | 1 | 'RETENTION_SOURCE' | 2; -export type _google_protobuf_FieldOptions_OptionRetention__Output = typeof _google_protobuf_FieldOptions_OptionRetention[keyof typeof _google_protobuf_FieldOptions_OptionRetention]; -export declare const _google_protobuf_FieldOptions_OptionTargetType: { - readonly TARGET_TYPE_UNKNOWN: "TARGET_TYPE_UNKNOWN"; - readonly TARGET_TYPE_FILE: "TARGET_TYPE_FILE"; - readonly TARGET_TYPE_EXTENSION_RANGE: "TARGET_TYPE_EXTENSION_RANGE"; - readonly TARGET_TYPE_MESSAGE: "TARGET_TYPE_MESSAGE"; - readonly TARGET_TYPE_FIELD: "TARGET_TYPE_FIELD"; - readonly TARGET_TYPE_ONEOF: "TARGET_TYPE_ONEOF"; - readonly TARGET_TYPE_ENUM: "TARGET_TYPE_ENUM"; - readonly TARGET_TYPE_ENUM_ENTRY: "TARGET_TYPE_ENUM_ENTRY"; - readonly TARGET_TYPE_SERVICE: "TARGET_TYPE_SERVICE"; - readonly TARGET_TYPE_METHOD: "TARGET_TYPE_METHOD"; -}; -export type _google_protobuf_FieldOptions_OptionTargetType = 'TARGET_TYPE_UNKNOWN' | 0 | 'TARGET_TYPE_FILE' | 1 | 'TARGET_TYPE_EXTENSION_RANGE' | 2 | 'TARGET_TYPE_MESSAGE' | 3 | 'TARGET_TYPE_FIELD' | 4 | 'TARGET_TYPE_ONEOF' | 5 | 'TARGET_TYPE_ENUM' | 6 | 'TARGET_TYPE_ENUM_ENTRY' | 7 | 'TARGET_TYPE_SERVICE' | 8 | 'TARGET_TYPE_METHOD' | 9; -export type _google_protobuf_FieldOptions_OptionTargetType__Output = typeof _google_protobuf_FieldOptions_OptionTargetType[keyof typeof _google_protobuf_FieldOptions_OptionTargetType]; -export interface FieldOptions { - 'ctype'?: (_google_protobuf_FieldOptions_CType); - 'packed'?: (boolean); - 'deprecated'?: (boolean); - 'lazy'?: (boolean); - 'jstype'?: (_google_protobuf_FieldOptions_JSType); - /** - * @deprecated - */ - 'weak'?: (boolean); - 'unverifiedLazy'?: (boolean); - 'debugRedact'?: (boolean); - 'retention'?: (_google_protobuf_FieldOptions_OptionRetention); - 'targets'?: (_google_protobuf_FieldOptions_OptionTargetType)[]; - 'editionDefaults'?: (_google_protobuf_FieldOptions_EditionDefault)[]; - 'features'?: (_google_protobuf_FeatureSet | null); - 'featureSupport'?: (_google_protobuf_FieldOptions_FeatureSupport | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; - '.validate.rules'?: (_validate_FieldRules | null); -} -export interface FieldOptions__Output { - 'ctype': (_google_protobuf_FieldOptions_CType__Output); - 'packed': (boolean); - 'deprecated': (boolean); - 'lazy': (boolean); - 'jstype': (_google_protobuf_FieldOptions_JSType__Output); - /** - * @deprecated - */ - 'weak': (boolean); - 'unverifiedLazy': (boolean); - 'debugRedact': (boolean); - 'retention': (_google_protobuf_FieldOptions_OptionRetention__Output); - 'targets': (_google_protobuf_FieldOptions_OptionTargetType__Output)[]; - 'editionDefaults': (_google_protobuf_FieldOptions_EditionDefault__Output)[]; - 'features': (_google_protobuf_FeatureSet__Output | null); - 'featureSupport': (_google_protobuf_FieldOptions_FeatureSupport__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; - '.validate.rules': (_validate_FieldRules__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.js deleted file mode 100644 index d0cca00..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -exports._google_protobuf_FieldOptions_OptionTargetType = exports._google_protobuf_FieldOptions_OptionRetention = exports._google_protobuf_FieldOptions_JSType = exports._google_protobuf_FieldOptions_CType = void 0; -// Original file: null -exports._google_protobuf_FieldOptions_CType = { - STRING: 'STRING', - CORD: 'CORD', - STRING_PIECE: 'STRING_PIECE', -}; -// Original file: null -exports._google_protobuf_FieldOptions_JSType = { - JS_NORMAL: 'JS_NORMAL', - JS_STRING: 'JS_STRING', - JS_NUMBER: 'JS_NUMBER', -}; -// Original file: null -exports._google_protobuf_FieldOptions_OptionRetention = { - RETENTION_UNKNOWN: 'RETENTION_UNKNOWN', - RETENTION_RUNTIME: 'RETENTION_RUNTIME', - RETENTION_SOURCE: 'RETENTION_SOURCE', -}; -// Original file: null -exports._google_protobuf_FieldOptions_OptionTargetType = { - TARGET_TYPE_UNKNOWN: 'TARGET_TYPE_UNKNOWN', - TARGET_TYPE_FILE: 'TARGET_TYPE_FILE', - TARGET_TYPE_EXTENSION_RANGE: 'TARGET_TYPE_EXTENSION_RANGE', - TARGET_TYPE_MESSAGE: 'TARGET_TYPE_MESSAGE', - TARGET_TYPE_FIELD: 'TARGET_TYPE_FIELD', - TARGET_TYPE_ONEOF: 'TARGET_TYPE_ONEOF', - TARGET_TYPE_ENUM: 'TARGET_TYPE_ENUM', - TARGET_TYPE_ENUM_ENTRY: 'TARGET_TYPE_ENUM_ENTRY', - TARGET_TYPE_SERVICE: 'TARGET_TYPE_SERVICE', - TARGET_TYPE_METHOD: 'TARGET_TYPE_METHOD', -}; -//# sourceMappingURL=FieldOptions.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.js.map deleted file mode 100644 index ddf7116..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FieldOptions.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/FieldOptions.ts"],"names":[],"mappings":";AAAA,sBAAsB;;;AAOtB,sBAAsB;AAET,QAAA,mCAAmC,GAAG;IACjD,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,cAAc;CACpB,CAAC;AAoCX,sBAAsB;AAET,QAAA,oCAAoC,GAAG;IAClD,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;CACd,CAAC;AAYX,sBAAsB;AAET,QAAA,6CAA6C,GAAG;IAC3D,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,gBAAgB,EAAE,kBAAkB;CAC5B,CAAC;AAYX,sBAAsB;AAET,QAAA,8CAA8C,GAAG;IAC5D,mBAAmB,EAAE,qBAAqB;IAC1C,gBAAgB,EAAE,kBAAkB;IACpC,2BAA2B,EAAE,6BAA6B;IAC1D,mBAAmB,EAAE,qBAAqB;IAC1C,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,gBAAgB,EAAE,kBAAkB;IACpC,sBAAsB,EAAE,wBAAwB;IAChD,mBAAmB,EAAE,qBAAqB;IAC1C,kBAAkB,EAAE,oBAAoB;CAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.d.ts deleted file mode 100644 index 6e71048..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { DescriptorProto as _google_protobuf_DescriptorProto, DescriptorProto__Output as _google_protobuf_DescriptorProto__Output } from '../../google/protobuf/DescriptorProto'; -import type { EnumDescriptorProto as _google_protobuf_EnumDescriptorProto, EnumDescriptorProto__Output as _google_protobuf_EnumDescriptorProto__Output } from '../../google/protobuf/EnumDescriptorProto'; -import type { ServiceDescriptorProto as _google_protobuf_ServiceDescriptorProto, ServiceDescriptorProto__Output as _google_protobuf_ServiceDescriptorProto__Output } from '../../google/protobuf/ServiceDescriptorProto'; -import type { FieldDescriptorProto as _google_protobuf_FieldDescriptorProto, FieldDescriptorProto__Output as _google_protobuf_FieldDescriptorProto__Output } from '../../google/protobuf/FieldDescriptorProto'; -import type { FileOptions as _google_protobuf_FileOptions, FileOptions__Output as _google_protobuf_FileOptions__Output } from '../../google/protobuf/FileOptions'; -import type { SourceCodeInfo as _google_protobuf_SourceCodeInfo, SourceCodeInfo__Output as _google_protobuf_SourceCodeInfo__Output } from '../../google/protobuf/SourceCodeInfo'; -import type { Edition as _google_protobuf_Edition, Edition__Output as _google_protobuf_Edition__Output } from '../../google/protobuf/Edition'; -export interface FileDescriptorProto { - 'name'?: (string); - 'package'?: (string); - 'dependency'?: (string)[]; - 'messageType'?: (_google_protobuf_DescriptorProto)[]; - 'enumType'?: (_google_protobuf_EnumDescriptorProto)[]; - 'service'?: (_google_protobuf_ServiceDescriptorProto)[]; - 'extension'?: (_google_protobuf_FieldDescriptorProto)[]; - 'options'?: (_google_protobuf_FileOptions | null); - 'sourceCodeInfo'?: (_google_protobuf_SourceCodeInfo | null); - 'publicDependency'?: (number)[]; - 'weakDependency'?: (number)[]; - 'syntax'?: (string); - 'edition'?: (_google_protobuf_Edition); - 'optionDependency'?: (string)[]; -} -export interface FileDescriptorProto__Output { - 'name': (string); - 'package': (string); - 'dependency': (string)[]; - 'messageType': (_google_protobuf_DescriptorProto__Output)[]; - 'enumType': (_google_protobuf_EnumDescriptorProto__Output)[]; - 'service': (_google_protobuf_ServiceDescriptorProto__Output)[]; - 'extension': (_google_protobuf_FieldDescriptorProto__Output)[]; - 'options': (_google_protobuf_FileOptions__Output | null); - 'sourceCodeInfo': (_google_protobuf_SourceCodeInfo__Output | null); - 'publicDependency': (number)[]; - 'weakDependency': (number)[]; - 'syntax': (string); - 'edition': (_google_protobuf_Edition__Output); - 'optionDependency': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.js deleted file mode 100644 index 9eb665d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=FileDescriptorProto.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.js.map deleted file mode 100644 index cb1e0ce..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FileDescriptorProto.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/FileDescriptorProto.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.d.ts deleted file mode 100644 index 18931c1..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { FileDescriptorProto as _google_protobuf_FileDescriptorProto, FileDescriptorProto__Output as _google_protobuf_FileDescriptorProto__Output } from '../../google/protobuf/FileDescriptorProto'; -export interface FileDescriptorSet { - 'file'?: (_google_protobuf_FileDescriptorProto)[]; -} -export interface FileDescriptorSet__Output { - 'file': (_google_protobuf_FileDescriptorProto__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.js deleted file mode 100644 index fcbe86a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=FileDescriptorSet.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.js.map deleted file mode 100644 index a911e6f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FileDescriptorSet.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/FileDescriptorSet.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.d.ts deleted file mode 100644 index e5bfa52..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; -export declare const _google_protobuf_FileOptions_OptimizeMode: { - readonly SPEED: "SPEED"; - readonly CODE_SIZE: "CODE_SIZE"; - readonly LITE_RUNTIME: "LITE_RUNTIME"; -}; -export type _google_protobuf_FileOptions_OptimizeMode = 'SPEED' | 1 | 'CODE_SIZE' | 2 | 'LITE_RUNTIME' | 3; -export type _google_protobuf_FileOptions_OptimizeMode__Output = typeof _google_protobuf_FileOptions_OptimizeMode[keyof typeof _google_protobuf_FileOptions_OptimizeMode]; -export interface FileOptions { - 'javaPackage'?: (string); - 'javaOuterClassname'?: (string); - 'optimizeFor'?: (_google_protobuf_FileOptions_OptimizeMode); - 'javaMultipleFiles'?: (boolean); - 'goPackage'?: (string); - 'ccGenericServices'?: (boolean); - 'javaGenericServices'?: (boolean); - 'pyGenericServices'?: (boolean); - /** - * @deprecated - */ - 'javaGenerateEqualsAndHash'?: (boolean); - 'deprecated'?: (boolean); - 'javaStringCheckUtf8'?: (boolean); - 'ccEnableArenas'?: (boolean); - 'objcClassPrefix'?: (string); - 'csharpNamespace'?: (string); - 'swiftPrefix'?: (string); - 'phpClassPrefix'?: (string); - 'phpNamespace'?: (string); - 'phpMetadataNamespace'?: (string); - 'rubyPackage'?: (string); - 'features'?: (_google_protobuf_FeatureSet | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; -} -export interface FileOptions__Output { - 'javaPackage': (string); - 'javaOuterClassname': (string); - 'optimizeFor': (_google_protobuf_FileOptions_OptimizeMode__Output); - 'javaMultipleFiles': (boolean); - 'goPackage': (string); - 'ccGenericServices': (boolean); - 'javaGenericServices': (boolean); - 'pyGenericServices': (boolean); - /** - * @deprecated - */ - 'javaGenerateEqualsAndHash': (boolean); - 'deprecated': (boolean); - 'javaStringCheckUtf8': (boolean); - 'ccEnableArenas': (boolean); - 'objcClassPrefix': (string); - 'csharpNamespace': (string); - 'swiftPrefix': (string); - 'phpClassPrefix': (string); - 'phpNamespace': (string); - 'phpMetadataNamespace': (string); - 'rubyPackage': (string); - 'features': (_google_protobuf_FeatureSet__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.js deleted file mode 100644 index abf630e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -exports._google_protobuf_FileOptions_OptimizeMode = void 0; -// Original file: null -exports._google_protobuf_FileOptions_OptimizeMode = { - SPEED: 'SPEED', - CODE_SIZE: 'CODE_SIZE', - LITE_RUNTIME: 'LITE_RUNTIME', -}; -//# sourceMappingURL=FileOptions.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.js.map deleted file mode 100644 index 3b2bc9e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FileOptions.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/FileOptions.ts"],"names":[],"mappings":";AAAA,sBAAsB;;;AAKtB,sBAAsB;AAET,QAAA,yCAAyC,GAAG;IACvD,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,WAAW;IACtB,YAAY,EAAE,cAAc;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.d.ts deleted file mode 100644 index 33bd60b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface FloatValue { - 'value'?: (number | string); -} -export interface FloatValue__Output { - 'value': (number); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.js deleted file mode 100644 index 17290a2..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=FloatValue.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.js.map deleted file mode 100644 index bf27b78..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FloatValue.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/FloatValue.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.d.ts deleted file mode 100644 index 586daa7..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -export interface _google_protobuf_GeneratedCodeInfo_Annotation { - 'path'?: (number)[]; - 'sourceFile'?: (string); - 'begin'?: (number); - 'end'?: (number); - 'semantic'?: (_google_protobuf_GeneratedCodeInfo_Annotation_Semantic); -} -export interface _google_protobuf_GeneratedCodeInfo_Annotation__Output { - 'path': (number)[]; - 'sourceFile': (string); - 'begin': (number); - 'end': (number); - 'semantic': (_google_protobuf_GeneratedCodeInfo_Annotation_Semantic__Output); -} -export declare const _google_protobuf_GeneratedCodeInfo_Annotation_Semantic: { - readonly NONE: "NONE"; - readonly SET: "SET"; - readonly ALIAS: "ALIAS"; -}; -export type _google_protobuf_GeneratedCodeInfo_Annotation_Semantic = 'NONE' | 0 | 'SET' | 1 | 'ALIAS' | 2; -export type _google_protobuf_GeneratedCodeInfo_Annotation_Semantic__Output = typeof _google_protobuf_GeneratedCodeInfo_Annotation_Semantic[keyof typeof _google_protobuf_GeneratedCodeInfo_Annotation_Semantic]; -export interface GeneratedCodeInfo { - 'annotation'?: (_google_protobuf_GeneratedCodeInfo_Annotation)[]; -} -export interface GeneratedCodeInfo__Output { - 'annotation': (_google_protobuf_GeneratedCodeInfo_Annotation__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.js deleted file mode 100644 index b63e564..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -exports._google_protobuf_GeneratedCodeInfo_Annotation_Semantic = void 0; -// Original file: null -exports._google_protobuf_GeneratedCodeInfo_Annotation_Semantic = { - NONE: 'NONE', - SET: 'SET', - ALIAS: 'ALIAS', -}; -//# sourceMappingURL=GeneratedCodeInfo.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.js.map deleted file mode 100644 index c26b200..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GeneratedCodeInfo.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/GeneratedCodeInfo.ts"],"names":[],"mappings":";AAAA,sBAAsB;;;AAmBtB,sBAAsB;AAET,QAAA,sDAAsD,GAAG;IACpE,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,OAAO;CACN,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.d.ts deleted file mode 100644 index 895fb9d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface Int32Value { - 'value'?: (number); -} -export interface Int32Value__Output { - 'value': (number); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.js deleted file mode 100644 index dc46343..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Int32Value.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.js.map deleted file mode 100644 index 157e73a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Int32Value.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/Int32Value.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.d.ts deleted file mode 100644 index 00bd119..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -export interface Int64Value { - 'value'?: (number | string | Long); -} -export interface Int64Value__Output { - 'value': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.js deleted file mode 100644 index a77bc96..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Int64Value.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.js.map deleted file mode 100644 index b8894b1..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Int64Value.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/Int64Value.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.d.ts deleted file mode 100644 index 3369f96..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; -export interface MessageOptions { - 'messageSetWireFormat'?: (boolean); - 'noStandardDescriptorAccessor'?: (boolean); - 'deprecated'?: (boolean); - 'mapEntry'?: (boolean); - /** - * @deprecated - */ - 'deprecatedLegacyJsonFieldConflicts'?: (boolean); - 'features'?: (_google_protobuf_FeatureSet | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; - '.validate.disabled'?: (boolean); -} -export interface MessageOptions__Output { - 'messageSetWireFormat': (boolean); - 'noStandardDescriptorAccessor': (boolean); - 'deprecated': (boolean); - 'mapEntry': (boolean); - /** - * @deprecated - */ - 'deprecatedLegacyJsonFieldConflicts': (boolean); - 'features': (_google_protobuf_FeatureSet__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; - '.validate.disabled': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.js deleted file mode 100644 index aff6546..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=MessageOptions.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.js.map deleted file mode 100644 index 0f78196..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MessageOptions.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/MessageOptions.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.d.ts deleted file mode 100644 index 7b39b72..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { MethodOptions as _google_protobuf_MethodOptions, MethodOptions__Output as _google_protobuf_MethodOptions__Output } from '../../google/protobuf/MethodOptions'; -export interface MethodDescriptorProto { - 'name'?: (string); - 'inputType'?: (string); - 'outputType'?: (string); - 'options'?: (_google_protobuf_MethodOptions | null); - 'clientStreaming'?: (boolean); - 'serverStreaming'?: (boolean); -} -export interface MethodDescriptorProto__Output { - 'name': (string); - 'inputType': (string); - 'outputType': (string); - 'options': (_google_protobuf_MethodOptions__Output | null); - 'clientStreaming': (boolean); - 'serverStreaming': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.js deleted file mode 100644 index 939d4e2..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=MethodDescriptorProto.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.js.map deleted file mode 100644 index 6b6f373..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MethodDescriptorProto.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/MethodDescriptorProto.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.d.ts deleted file mode 100644 index 389f621..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; -export declare const _google_protobuf_MethodOptions_IdempotencyLevel: { - readonly IDEMPOTENCY_UNKNOWN: "IDEMPOTENCY_UNKNOWN"; - readonly NO_SIDE_EFFECTS: "NO_SIDE_EFFECTS"; - readonly IDEMPOTENT: "IDEMPOTENT"; -}; -export type _google_protobuf_MethodOptions_IdempotencyLevel = 'IDEMPOTENCY_UNKNOWN' | 0 | 'NO_SIDE_EFFECTS' | 1 | 'IDEMPOTENT' | 2; -export type _google_protobuf_MethodOptions_IdempotencyLevel__Output = typeof _google_protobuf_MethodOptions_IdempotencyLevel[keyof typeof _google_protobuf_MethodOptions_IdempotencyLevel]; -export interface MethodOptions { - 'deprecated'?: (boolean); - 'idempotencyLevel'?: (_google_protobuf_MethodOptions_IdempotencyLevel); - 'features'?: (_google_protobuf_FeatureSet | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; -} -export interface MethodOptions__Output { - 'deprecated': (boolean); - 'idempotencyLevel': (_google_protobuf_MethodOptions_IdempotencyLevel__Output); - 'features': (_google_protobuf_FeatureSet__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.js deleted file mode 100644 index c82ee01..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -exports._google_protobuf_MethodOptions_IdempotencyLevel = void 0; -// Original file: null -exports._google_protobuf_MethodOptions_IdempotencyLevel = { - IDEMPOTENCY_UNKNOWN: 'IDEMPOTENCY_UNKNOWN', - NO_SIDE_EFFECTS: 'NO_SIDE_EFFECTS', - IDEMPOTENT: 'IDEMPOTENT', -}; -//# sourceMappingURL=MethodOptions.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.js.map deleted file mode 100644 index 4c2d1a3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MethodOptions.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/MethodOptions.ts"],"names":[],"mappings":";AAAA,sBAAsB;;;AAKtB,sBAAsB;AAET,QAAA,+CAA+C,GAAG;IAC7D,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,iBAAiB;IAClC,UAAU,EAAE,YAAY;CAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.d.ts deleted file mode 100644 index 4dc1e13..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { OneofOptions as _google_protobuf_OneofOptions, OneofOptions__Output as _google_protobuf_OneofOptions__Output } from '../../google/protobuf/OneofOptions'; -export interface OneofDescriptorProto { - 'name'?: (string); - 'options'?: (_google_protobuf_OneofOptions | null); -} -export interface OneofDescriptorProto__Output { - 'name': (string); - 'options': (_google_protobuf_OneofOptions__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.js deleted file mode 100644 index 80102f4..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=OneofDescriptorProto.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.js.map deleted file mode 100644 index b6d3568..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OneofDescriptorProto.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/OneofDescriptorProto.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.d.ts deleted file mode 100644 index 072d3e2..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; -export interface OneofOptions { - 'features'?: (_google_protobuf_FeatureSet | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; - '.validate.required'?: (boolean); -} -export interface OneofOptions__Output { - 'features': (_google_protobuf_FeatureSet__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; - '.validate.required': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.js deleted file mode 100644 index 5060198..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=OneofOptions.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.js.map deleted file mode 100644 index 207e815..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OneofOptions.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/OneofOptions.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.d.ts deleted file mode 100644 index 96b5517..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { MethodDescriptorProto as _google_protobuf_MethodDescriptorProto, MethodDescriptorProto__Output as _google_protobuf_MethodDescriptorProto__Output } from '../../google/protobuf/MethodDescriptorProto'; -import type { ServiceOptions as _google_protobuf_ServiceOptions, ServiceOptions__Output as _google_protobuf_ServiceOptions__Output } from '../../google/protobuf/ServiceOptions'; -export interface ServiceDescriptorProto { - 'name'?: (string); - 'method'?: (_google_protobuf_MethodDescriptorProto)[]; - 'options'?: (_google_protobuf_ServiceOptions | null); -} -export interface ServiceDescriptorProto__Output { - 'name': (string); - 'method': (_google_protobuf_MethodDescriptorProto__Output)[]; - 'options': (_google_protobuf_ServiceOptions__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.js deleted file mode 100644 index 727eeb4..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ServiceDescriptorProto.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.js.map deleted file mode 100644 index 92e01ad..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServiceDescriptorProto.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/ServiceDescriptorProto.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.d.ts deleted file mode 100644 index cf0d0ad..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; -export interface ServiceOptions { - 'deprecated'?: (boolean); - 'features'?: (_google_protobuf_FeatureSet | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; -} -export interface ServiceOptions__Output { - 'deprecated': (boolean); - 'features': (_google_protobuf_FeatureSet__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.js deleted file mode 100644 index f8ad6b7..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ServiceOptions.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.js.map deleted file mode 100644 index 10443df..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServiceOptions.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/ServiceOptions.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.d.ts deleted file mode 100644 index 165dbfa..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export interface _google_protobuf_SourceCodeInfo_Location { - 'path'?: (number)[]; - 'span'?: (number)[]; - 'leadingComments'?: (string); - 'trailingComments'?: (string); - 'leadingDetachedComments'?: (string)[]; -} -export interface _google_protobuf_SourceCodeInfo_Location__Output { - 'path': (number)[]; - 'span': (number)[]; - 'leadingComments': (string); - 'trailingComments': (string); - 'leadingDetachedComments': (string)[]; -} -export interface SourceCodeInfo { - 'location'?: (_google_protobuf_SourceCodeInfo_Location)[]; -} -export interface SourceCodeInfo__Output { - 'location': (_google_protobuf_SourceCodeInfo_Location__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.js deleted file mode 100644 index 065992b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=SourceCodeInfo.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.js.map deleted file mode 100644 index 13b7406..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SourceCodeInfo.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/SourceCodeInfo.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.d.ts deleted file mode 100644 index 74230c9..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface StringValue { - 'value'?: (string); -} -export interface StringValue__Output { - 'value': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.js deleted file mode 100644 index 0836e97..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=StringValue.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.js.map deleted file mode 100644 index bc05ddc..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StringValue.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/StringValue.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.d.ts deleted file mode 100644 index 7327d0a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare const SymbolVisibility: { - readonly VISIBILITY_UNSET: "VISIBILITY_UNSET"; - readonly VISIBILITY_LOCAL: "VISIBILITY_LOCAL"; - readonly VISIBILITY_EXPORT: "VISIBILITY_EXPORT"; -}; -export type SymbolVisibility = 'VISIBILITY_UNSET' | 0 | 'VISIBILITY_LOCAL' | 1 | 'VISIBILITY_EXPORT' | 2; -export type SymbolVisibility__Output = typeof SymbolVisibility[keyof typeof SymbolVisibility]; diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.js deleted file mode 100644 index 4119671..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SymbolVisibility = void 0; -exports.SymbolVisibility = { - VISIBILITY_UNSET: 'VISIBILITY_UNSET', - VISIBILITY_LOCAL: 'VISIBILITY_LOCAL', - VISIBILITY_EXPORT: 'VISIBILITY_EXPORT', -}; -//# sourceMappingURL=SymbolVisibility.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.js.map deleted file mode 100644 index f69c165..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SymbolVisibility.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/SymbolVisibility.ts"],"names":[],"mappings":";AAAA,sBAAsB;;;AAET,QAAA,gBAAgB,GAAG;IAC9B,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,iBAAiB,EAAE,mBAAmB;CAC9B,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.d.ts deleted file mode 100644 index 900ff5a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -export interface Timestamp { - 'seconds'?: (number | string | Long); - 'nanos'?: (number); -} -export interface Timestamp__Output { - 'seconds': (string); - 'nanos': (number); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.js deleted file mode 100644 index dcca213..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Timestamp.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.js.map deleted file mode 100644 index e90342e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Timestamp.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/Timestamp.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.d.ts deleted file mode 100644 index d7e185f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface UInt32Value { - 'value'?: (number); -} -export interface UInt32Value__Output { - 'value': (number); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.js deleted file mode 100644 index 889cd2e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=UInt32Value.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.js.map deleted file mode 100644 index 2a0420f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UInt32Value.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/UInt32Value.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.d.ts deleted file mode 100644 index fe94d29..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -export interface UInt64Value { - 'value'?: (number | string | Long); -} -export interface UInt64Value__Output { - 'value': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.js deleted file mode 100644 index 2a06a69..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=UInt64Value.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.js.map deleted file mode 100644 index 4ea43ca..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UInt64Value.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/UInt64Value.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.d.ts deleted file mode 100644 index 9bc5adc..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -export interface _google_protobuf_UninterpretedOption_NamePart { - 'namePart'?: (string); - 'isExtension'?: (boolean); -} -export interface _google_protobuf_UninterpretedOption_NamePart__Output { - 'namePart': (string); - 'isExtension': (boolean); -} -export interface UninterpretedOption { - 'name'?: (_google_protobuf_UninterpretedOption_NamePart)[]; - 'identifierValue'?: (string); - 'positiveIntValue'?: (number | string | Long); - 'negativeIntValue'?: (number | string | Long); - 'doubleValue'?: (number | string); - 'stringValue'?: (Buffer | Uint8Array | string); - 'aggregateValue'?: (string); -} -export interface UninterpretedOption__Output { - 'name': (_google_protobuf_UninterpretedOption_NamePart__Output)[]; - 'identifierValue': (string); - 'positiveIntValue': (string); - 'negativeIntValue': (string); - 'doubleValue': (number); - 'stringValue': (Buffer); - 'aggregateValue': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.js b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.js deleted file mode 100644 index b3ebb69..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: null -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=UninterpretedOption.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.js.map b/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.js.map deleted file mode 100644 index 607583a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UninterpretedOption.js","sourceRoot":"","sources":["../../../../../src/generated/google/protobuf/UninterpretedOption.ts"],"names":[],"mappings":";AAAA,sBAAsB"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.d.ts deleted file mode 100644 index dbf0fa8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; -/** - * An address type not included above. - */ -export interface _grpc_channelz_v1_Address_OtherAddress { - /** - * The human readable version of the value. This value should be set. - */ - 'name'?: (string); - /** - * The actual address message. - */ - 'value'?: (_google_protobuf_Any | null); -} -/** - * An address type not included above. - */ -export interface _grpc_channelz_v1_Address_OtherAddress__Output { - /** - * The human readable version of the value. This value should be set. - */ - 'name': (string); - /** - * The actual address message. - */ - 'value': (_google_protobuf_Any__Output | null); -} -export interface _grpc_channelz_v1_Address_TcpIpAddress { - /** - * Either the IPv4 or IPv6 address in bytes. Will be either 4 bytes or 16 - * bytes in length. - */ - 'ip_address'?: (Buffer | Uint8Array | string); - /** - * 0-64k, or -1 if not appropriate. - */ - 'port'?: (number); -} -export interface _grpc_channelz_v1_Address_TcpIpAddress__Output { - /** - * Either the IPv4 or IPv6 address in bytes. Will be either 4 bytes or 16 - * bytes in length. - */ - 'ip_address': (Buffer); - /** - * 0-64k, or -1 if not appropriate. - */ - 'port': (number); -} -/** - * A Unix Domain Socket address. - */ -export interface _grpc_channelz_v1_Address_UdsAddress { - 'filename'?: (string); -} -/** - * A Unix Domain Socket address. - */ -export interface _grpc_channelz_v1_Address_UdsAddress__Output { - 'filename': (string); -} -/** - * Address represents the address used to create the socket. - */ -export interface Address { - 'tcpip_address'?: (_grpc_channelz_v1_Address_TcpIpAddress | null); - 'uds_address'?: (_grpc_channelz_v1_Address_UdsAddress | null); - 'other_address'?: (_grpc_channelz_v1_Address_OtherAddress | null); - 'address'?: "tcpip_address" | "uds_address" | "other_address"; -} -/** - * Address represents the address used to create the socket. - */ -export interface Address__Output { - 'tcpip_address'?: (_grpc_channelz_v1_Address_TcpIpAddress__Output | null); - 'uds_address'?: (_grpc_channelz_v1_Address_UdsAddress__Output | null); - 'other_address'?: (_grpc_channelz_v1_Address_OtherAddress__Output | null); - 'address'?: "tcpip_address" | "uds_address" | "other_address"; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.js deleted file mode 100644 index 6f15b91..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Address.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.js.map deleted file mode 100644 index 554d6da..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Address.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/Address.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.d.ts deleted file mode 100644 index 3bd11ca..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -import type { ChannelRef as _grpc_channelz_v1_ChannelRef, ChannelRef__Output as _grpc_channelz_v1_ChannelRef__Output } from '../../../grpc/channelz/v1/ChannelRef'; -import type { ChannelData as _grpc_channelz_v1_ChannelData, ChannelData__Output as _grpc_channelz_v1_ChannelData__Output } from '../../../grpc/channelz/v1/ChannelData'; -import type { SubchannelRef as _grpc_channelz_v1_SubchannelRef, SubchannelRef__Output as _grpc_channelz_v1_SubchannelRef__Output } from '../../../grpc/channelz/v1/SubchannelRef'; -import type { SocketRef as _grpc_channelz_v1_SocketRef, SocketRef__Output as _grpc_channelz_v1_SocketRef__Output } from '../../../grpc/channelz/v1/SocketRef'; -/** - * Channel is a logical grouping of channels, subchannels, and sockets. - */ -export interface Channel { - /** - * The identifier for this channel. This should bet set. - */ - 'ref'?: (_grpc_channelz_v1_ChannelRef | null); - /** - * Data specific to this channel. - */ - 'data'?: (_grpc_channelz_v1_ChannelData | null); - /** - * There are no ordering guarantees on the order of channel refs. - * There may not be cycles in the ref graph. - * A channel ref may be present in more than one channel or subchannel. - */ - 'channel_ref'?: (_grpc_channelz_v1_ChannelRef)[]; - /** - * At most one of 'channel_ref+subchannel_ref' and 'socket' is set. - * There are no ordering guarantees on the order of subchannel refs. - * There may not be cycles in the ref graph. - * A sub channel ref may be present in more than one channel or subchannel. - */ - 'subchannel_ref'?: (_grpc_channelz_v1_SubchannelRef)[]; - /** - * There are no ordering guarantees on the order of sockets. - */ - 'socket_ref'?: (_grpc_channelz_v1_SocketRef)[]; -} -/** - * Channel is a logical grouping of channels, subchannels, and sockets. - */ -export interface Channel__Output { - /** - * The identifier for this channel. This should bet set. - */ - 'ref': (_grpc_channelz_v1_ChannelRef__Output | null); - /** - * Data specific to this channel. - */ - 'data': (_grpc_channelz_v1_ChannelData__Output | null); - /** - * There are no ordering guarantees on the order of channel refs. - * There may not be cycles in the ref graph. - * A channel ref may be present in more than one channel or subchannel. - */ - 'channel_ref': (_grpc_channelz_v1_ChannelRef__Output)[]; - /** - * At most one of 'channel_ref+subchannel_ref' and 'socket' is set. - * There are no ordering guarantees on the order of subchannel refs. - * There may not be cycles in the ref graph. - * A sub channel ref may be present in more than one channel or subchannel. - */ - 'subchannel_ref': (_grpc_channelz_v1_SubchannelRef__Output)[]; - /** - * There are no ordering guarantees on the order of sockets. - */ - 'socket_ref': (_grpc_channelz_v1_SocketRef__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.js deleted file mode 100644 index d9bc55a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Channel.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.js.map deleted file mode 100644 index 5dd6b69..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Channel.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/Channel.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.d.ts deleted file mode 100644 index 2ea3833..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export declare const _grpc_channelz_v1_ChannelConnectivityState_State: { - readonly UNKNOWN: "UNKNOWN"; - readonly IDLE: "IDLE"; - readonly CONNECTING: "CONNECTING"; - readonly READY: "READY"; - readonly TRANSIENT_FAILURE: "TRANSIENT_FAILURE"; - readonly SHUTDOWN: "SHUTDOWN"; -}; -export type _grpc_channelz_v1_ChannelConnectivityState_State = 'UNKNOWN' | 0 | 'IDLE' | 1 | 'CONNECTING' | 2 | 'READY' | 3 | 'TRANSIENT_FAILURE' | 4 | 'SHUTDOWN' | 5; -export type _grpc_channelz_v1_ChannelConnectivityState_State__Output = typeof _grpc_channelz_v1_ChannelConnectivityState_State[keyof typeof _grpc_channelz_v1_ChannelConnectivityState_State]; -/** - * These come from the specified states in this document: - * https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md - */ -export interface ChannelConnectivityState { - 'state'?: (_grpc_channelz_v1_ChannelConnectivityState_State); -} -/** - * These come from the specified states in this document: - * https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md - */ -export interface ChannelConnectivityState__Output { - 'state': (_grpc_channelz_v1_ChannelConnectivityState_State__Output); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.js deleted file mode 100644 index 2a783d9..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -exports._grpc_channelz_v1_ChannelConnectivityState_State = void 0; -// Original file: proto/channelz.proto -exports._grpc_channelz_v1_ChannelConnectivityState_State = { - UNKNOWN: 'UNKNOWN', - IDLE: 'IDLE', - CONNECTING: 'CONNECTING', - READY: 'READY', - TRANSIENT_FAILURE: 'TRANSIENT_FAILURE', - SHUTDOWN: 'SHUTDOWN', -}; -//# sourceMappingURL=ChannelConnectivityState.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.js.map deleted file mode 100644 index d4b2567..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChannelConnectivityState.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/ChannelConnectivityState.ts"],"names":[],"mappings":";AAAA,sCAAsC;;;AAGtC,sCAAsC;AAEzB,QAAA,gDAAgD,GAAG;IAC9D,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,YAAY;IACxB,KAAK,EAAE,OAAO;IACd,iBAAiB,EAAE,mBAAmB;IACtC,QAAQ,EAAE,UAAU;CACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.d.ts deleted file mode 100644 index 3d9716a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -import type { ChannelConnectivityState as _grpc_channelz_v1_ChannelConnectivityState, ChannelConnectivityState__Output as _grpc_channelz_v1_ChannelConnectivityState__Output } from '../../../grpc/channelz/v1/ChannelConnectivityState'; -import type { ChannelTrace as _grpc_channelz_v1_ChannelTrace, ChannelTrace__Output as _grpc_channelz_v1_ChannelTrace__Output } from '../../../grpc/channelz/v1/ChannelTrace'; -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; -import type { Long } from '@grpc/proto-loader'; -/** - * Channel data is data related to a specific Channel or Subchannel. - */ -export interface ChannelData { - /** - * The connectivity state of the channel or subchannel. Implementations - * should always set this. - */ - 'state'?: (_grpc_channelz_v1_ChannelConnectivityState | null); - /** - * The target this channel originally tried to connect to. May be absent - */ - 'target'?: (string); - /** - * A trace of recent events on the channel. May be absent. - */ - 'trace'?: (_grpc_channelz_v1_ChannelTrace | null); - /** - * The number of calls started on the channel - */ - 'calls_started'?: (number | string | Long); - /** - * The number of calls that have completed with an OK status - */ - 'calls_succeeded'?: (number | string | Long); - /** - * The number of calls that have completed with a non-OK status - */ - 'calls_failed'?: (number | string | Long); - /** - * The last time a call was started on the channel. - */ - 'last_call_started_timestamp'?: (_google_protobuf_Timestamp | null); -} -/** - * Channel data is data related to a specific Channel or Subchannel. - */ -export interface ChannelData__Output { - /** - * The connectivity state of the channel or subchannel. Implementations - * should always set this. - */ - 'state': (_grpc_channelz_v1_ChannelConnectivityState__Output | null); - /** - * The target this channel originally tried to connect to. May be absent - */ - 'target': (string); - /** - * A trace of recent events on the channel. May be absent. - */ - 'trace': (_grpc_channelz_v1_ChannelTrace__Output | null); - /** - * The number of calls started on the channel - */ - 'calls_started': (string); - /** - * The number of calls that have completed with an OK status - */ - 'calls_succeeded': (string); - /** - * The number of calls that have completed with a non-OK status - */ - 'calls_failed': (string); - /** - * The last time a call was started on the channel. - */ - 'last_call_started_timestamp': (_google_protobuf_Timestamp__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.js deleted file mode 100644 index dffbd45..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ChannelData.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.js.map deleted file mode 100644 index bb2b4c4..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChannelData.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/ChannelData.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.d.ts deleted file mode 100644 index 29deef9..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -/** - * ChannelRef is a reference to a Channel. - */ -export interface ChannelRef { - /** - * The globally unique id for this channel. Must be a positive number. - */ - 'channel_id'?: (number | string | Long); - /** - * An optional name associated with the channel. - */ - 'name'?: (string); -} -/** - * ChannelRef is a reference to a Channel. - */ -export interface ChannelRef__Output { - /** - * The globally unique id for this channel. Must be a positive number. - */ - 'channel_id': (string); - /** - * An optional name associated with the channel. - */ - 'name': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.js deleted file mode 100644 index d239819..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ChannelRef.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.js.map deleted file mode 100644 index 1030ded..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChannelRef.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/ChannelRef.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.d.ts deleted file mode 100644 index 5b6170a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; -import type { ChannelTraceEvent as _grpc_channelz_v1_ChannelTraceEvent, ChannelTraceEvent__Output as _grpc_channelz_v1_ChannelTraceEvent__Output } from '../../../grpc/channelz/v1/ChannelTraceEvent'; -import type { Long } from '@grpc/proto-loader'; -/** - * ChannelTrace represents the recent events that have occurred on the channel. - */ -export interface ChannelTrace { - /** - * Number of events ever logged in this tracing object. This can differ from - * events.size() because events can be overwritten or garbage collected by - * implementations. - */ - 'num_events_logged'?: (number | string | Long); - /** - * Time that this channel was created. - */ - 'creation_timestamp'?: (_google_protobuf_Timestamp | null); - /** - * List of events that have occurred on this channel. - */ - 'events'?: (_grpc_channelz_v1_ChannelTraceEvent)[]; -} -/** - * ChannelTrace represents the recent events that have occurred on the channel. - */ -export interface ChannelTrace__Output { - /** - * Number of events ever logged in this tracing object. This can differ from - * events.size() because events can be overwritten or garbage collected by - * implementations. - */ - 'num_events_logged': (string); - /** - * Time that this channel was created. - */ - 'creation_timestamp': (_google_protobuf_Timestamp__Output | null); - /** - * List of events that have occurred on this channel. - */ - 'events': (_grpc_channelz_v1_ChannelTraceEvent__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.js deleted file mode 100644 index 112069c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ChannelTrace.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.js.map deleted file mode 100644 index 2f665dc..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChannelTrace.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/ChannelTrace.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.d.ts deleted file mode 100644 index 7cb594d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; -import type { ChannelRef as _grpc_channelz_v1_ChannelRef, ChannelRef__Output as _grpc_channelz_v1_ChannelRef__Output } from '../../../grpc/channelz/v1/ChannelRef'; -import type { SubchannelRef as _grpc_channelz_v1_SubchannelRef, SubchannelRef__Output as _grpc_channelz_v1_SubchannelRef__Output } from '../../../grpc/channelz/v1/SubchannelRef'; -/** - * The supported severity levels of trace events. - */ -export declare const _grpc_channelz_v1_ChannelTraceEvent_Severity: { - readonly CT_UNKNOWN: "CT_UNKNOWN"; - readonly CT_INFO: "CT_INFO"; - readonly CT_WARNING: "CT_WARNING"; - readonly CT_ERROR: "CT_ERROR"; -}; -/** - * The supported severity levels of trace events. - */ -export type _grpc_channelz_v1_ChannelTraceEvent_Severity = 'CT_UNKNOWN' | 0 | 'CT_INFO' | 1 | 'CT_WARNING' | 2 | 'CT_ERROR' | 3; -/** - * The supported severity levels of trace events. - */ -export type _grpc_channelz_v1_ChannelTraceEvent_Severity__Output = typeof _grpc_channelz_v1_ChannelTraceEvent_Severity[keyof typeof _grpc_channelz_v1_ChannelTraceEvent_Severity]; -/** - * A trace event is an interesting thing that happened to a channel or - * subchannel, such as creation, address resolution, subchannel creation, etc. - */ -export interface ChannelTraceEvent { - /** - * High level description of the event. - */ - 'description'?: (string); - /** - * the severity of the trace event - */ - 'severity'?: (_grpc_channelz_v1_ChannelTraceEvent_Severity); - /** - * When this event occurred. - */ - 'timestamp'?: (_google_protobuf_Timestamp | null); - 'channel_ref'?: (_grpc_channelz_v1_ChannelRef | null); - 'subchannel_ref'?: (_grpc_channelz_v1_SubchannelRef | null); - /** - * ref of referenced channel or subchannel. - * Optional, only present if this event refers to a child object. For example, - * this field would be filled if this trace event was for a subchannel being - * created. - */ - 'child_ref'?: "channel_ref" | "subchannel_ref"; -} -/** - * A trace event is an interesting thing that happened to a channel or - * subchannel, such as creation, address resolution, subchannel creation, etc. - */ -export interface ChannelTraceEvent__Output { - /** - * High level description of the event. - */ - 'description': (string); - /** - * the severity of the trace event - */ - 'severity': (_grpc_channelz_v1_ChannelTraceEvent_Severity__Output); - /** - * When this event occurred. - */ - 'timestamp': (_google_protobuf_Timestamp__Output | null); - 'channel_ref'?: (_grpc_channelz_v1_ChannelRef__Output | null); - 'subchannel_ref'?: (_grpc_channelz_v1_SubchannelRef__Output | null); - /** - * ref of referenced channel or subchannel. - * Optional, only present if this event refers to a child object. For example, - * this field would be filled if this trace event was for a subchannel being - * created. - */ - 'child_ref'?: "channel_ref" | "subchannel_ref"; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.js deleted file mode 100644 index ae9981b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -exports._grpc_channelz_v1_ChannelTraceEvent_Severity = void 0; -// Original file: proto/channelz.proto -/** - * The supported severity levels of trace events. - */ -exports._grpc_channelz_v1_ChannelTraceEvent_Severity = { - CT_UNKNOWN: 'CT_UNKNOWN', - CT_INFO: 'CT_INFO', - CT_WARNING: 'CT_WARNING', - CT_ERROR: 'CT_ERROR', -}; -//# sourceMappingURL=ChannelTraceEvent.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.js.map deleted file mode 100644 index 2ed003c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChannelTraceEvent.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/ChannelTraceEvent.ts"],"names":[],"mappings":";AAAA,sCAAsC;;;AAMtC,sCAAsC;AAEtC;;GAEG;AACU,QAAA,4CAA4C,GAAG;IAC1D,UAAU,EAAE,YAAY;IACxB,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;CACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.d.ts deleted file mode 100644 index 3e9eb98..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.d.ts +++ /dev/null @@ -1,159 +0,0 @@ -import type * as grpc from '../../../../index'; -import type { MethodDefinition } from '@grpc/proto-loader'; -import type { GetChannelRequest as _grpc_channelz_v1_GetChannelRequest, GetChannelRequest__Output as _grpc_channelz_v1_GetChannelRequest__Output } from '../../../grpc/channelz/v1/GetChannelRequest'; -import type { GetChannelResponse as _grpc_channelz_v1_GetChannelResponse, GetChannelResponse__Output as _grpc_channelz_v1_GetChannelResponse__Output } from '../../../grpc/channelz/v1/GetChannelResponse'; -import type { GetServerRequest as _grpc_channelz_v1_GetServerRequest, GetServerRequest__Output as _grpc_channelz_v1_GetServerRequest__Output } from '../../../grpc/channelz/v1/GetServerRequest'; -import type { GetServerResponse as _grpc_channelz_v1_GetServerResponse, GetServerResponse__Output as _grpc_channelz_v1_GetServerResponse__Output } from '../../../grpc/channelz/v1/GetServerResponse'; -import type { GetServerSocketsRequest as _grpc_channelz_v1_GetServerSocketsRequest, GetServerSocketsRequest__Output as _grpc_channelz_v1_GetServerSocketsRequest__Output } from '../../../grpc/channelz/v1/GetServerSocketsRequest'; -import type { GetServerSocketsResponse as _grpc_channelz_v1_GetServerSocketsResponse, GetServerSocketsResponse__Output as _grpc_channelz_v1_GetServerSocketsResponse__Output } from '../../../grpc/channelz/v1/GetServerSocketsResponse'; -import type { GetServersRequest as _grpc_channelz_v1_GetServersRequest, GetServersRequest__Output as _grpc_channelz_v1_GetServersRequest__Output } from '../../../grpc/channelz/v1/GetServersRequest'; -import type { GetServersResponse as _grpc_channelz_v1_GetServersResponse, GetServersResponse__Output as _grpc_channelz_v1_GetServersResponse__Output } from '../../../grpc/channelz/v1/GetServersResponse'; -import type { GetSocketRequest as _grpc_channelz_v1_GetSocketRequest, GetSocketRequest__Output as _grpc_channelz_v1_GetSocketRequest__Output } from '../../../grpc/channelz/v1/GetSocketRequest'; -import type { GetSocketResponse as _grpc_channelz_v1_GetSocketResponse, GetSocketResponse__Output as _grpc_channelz_v1_GetSocketResponse__Output } from '../../../grpc/channelz/v1/GetSocketResponse'; -import type { GetSubchannelRequest as _grpc_channelz_v1_GetSubchannelRequest, GetSubchannelRequest__Output as _grpc_channelz_v1_GetSubchannelRequest__Output } from '../../../grpc/channelz/v1/GetSubchannelRequest'; -import type { GetSubchannelResponse as _grpc_channelz_v1_GetSubchannelResponse, GetSubchannelResponse__Output as _grpc_channelz_v1_GetSubchannelResponse__Output } from '../../../grpc/channelz/v1/GetSubchannelResponse'; -import type { GetTopChannelsRequest as _grpc_channelz_v1_GetTopChannelsRequest, GetTopChannelsRequest__Output as _grpc_channelz_v1_GetTopChannelsRequest__Output } from '../../../grpc/channelz/v1/GetTopChannelsRequest'; -import type { GetTopChannelsResponse as _grpc_channelz_v1_GetTopChannelsResponse, GetTopChannelsResponse__Output as _grpc_channelz_v1_GetTopChannelsResponse__Output } from '../../../grpc/channelz/v1/GetTopChannelsResponse'; -/** - * Channelz is a service exposed by gRPC servers that provides detailed debug - * information. - */ -export interface ChannelzClient extends grpc.Client { - /** - * Returns a single Channel, or else a NOT_FOUND code. - */ - GetChannel(argument: _grpc_channelz_v1_GetChannelRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetChannelResponse__Output>): grpc.ClientUnaryCall; - GetChannel(argument: _grpc_channelz_v1_GetChannelRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetChannelResponse__Output>): grpc.ClientUnaryCall; - GetChannel(argument: _grpc_channelz_v1_GetChannelRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetChannelResponse__Output>): grpc.ClientUnaryCall; - GetChannel(argument: _grpc_channelz_v1_GetChannelRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetChannelResponse__Output>): grpc.ClientUnaryCall; - /** - * Returns a single Server, or else a NOT_FOUND code. - */ - GetServer(argument: _grpc_channelz_v1_GetServerRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - GetServer(argument: _grpc_channelz_v1_GetServerRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - GetServer(argument: _grpc_channelz_v1_GetServerRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - GetServer(argument: _grpc_channelz_v1_GetServerRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - /** - * Returns a single Server, or else a NOT_FOUND code. - */ - getServer(argument: _grpc_channelz_v1_GetServerRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - getServer(argument: _grpc_channelz_v1_GetServerRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - getServer(argument: _grpc_channelz_v1_GetServerRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - getServer(argument: _grpc_channelz_v1_GetServerRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - /** - * Gets all server sockets that exist in the process. - */ - GetServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - GetServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - GetServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - GetServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - /** - * Gets all server sockets that exist in the process. - */ - getServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - getServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - getServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - getServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - /** - * Gets all servers that exist in the process. - */ - GetServers(argument: _grpc_channelz_v1_GetServersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - GetServers(argument: _grpc_channelz_v1_GetServersRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - GetServers(argument: _grpc_channelz_v1_GetServersRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - GetServers(argument: _grpc_channelz_v1_GetServersRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - /** - * Gets all servers that exist in the process. - */ - getServers(argument: _grpc_channelz_v1_GetServersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - getServers(argument: _grpc_channelz_v1_GetServersRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - getServers(argument: _grpc_channelz_v1_GetServersRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - getServers(argument: _grpc_channelz_v1_GetServersRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - /** - * Returns a single Socket or else a NOT_FOUND code. - */ - GetSocket(argument: _grpc_channelz_v1_GetSocketRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - GetSocket(argument: _grpc_channelz_v1_GetSocketRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - GetSocket(argument: _grpc_channelz_v1_GetSocketRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - GetSocket(argument: _grpc_channelz_v1_GetSocketRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - /** - * Returns a single Socket or else a NOT_FOUND code. - */ - getSocket(argument: _grpc_channelz_v1_GetSocketRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - getSocket(argument: _grpc_channelz_v1_GetSocketRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - getSocket(argument: _grpc_channelz_v1_GetSocketRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - getSocket(argument: _grpc_channelz_v1_GetSocketRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - /** - * Returns a single Subchannel, or else a NOT_FOUND code. - */ - GetSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - GetSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - GetSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - GetSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - /** - * Returns a single Subchannel, or else a NOT_FOUND code. - */ - getSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - getSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - getSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - getSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - /** - * Gets all root channels (i.e. channels the application has directly - * created). This does not include subchannels nor non-top level channels. - */ - GetTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - GetTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - GetTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - GetTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - /** - * Gets all root channels (i.e. channels the application has directly - * created). This does not include subchannels nor non-top level channels. - */ - getTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - getTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - getTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - getTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; -} -/** - * Channelz is a service exposed by gRPC servers that provides detailed debug - * information. - */ -export interface ChannelzHandlers extends grpc.UntypedServiceImplementation { - /** - * Returns a single Channel, or else a NOT_FOUND code. - */ - GetChannel: grpc.handleUnaryCall<_grpc_channelz_v1_GetChannelRequest__Output, _grpc_channelz_v1_GetChannelResponse>; - /** - * Returns a single Server, or else a NOT_FOUND code. - */ - GetServer: grpc.handleUnaryCall<_grpc_channelz_v1_GetServerRequest__Output, _grpc_channelz_v1_GetServerResponse>; - /** - * Gets all server sockets that exist in the process. - */ - GetServerSockets: grpc.handleUnaryCall<_grpc_channelz_v1_GetServerSocketsRequest__Output, _grpc_channelz_v1_GetServerSocketsResponse>; - /** - * Gets all servers that exist in the process. - */ - GetServers: grpc.handleUnaryCall<_grpc_channelz_v1_GetServersRequest__Output, _grpc_channelz_v1_GetServersResponse>; - /** - * Returns a single Socket or else a NOT_FOUND code. - */ - GetSocket: grpc.handleUnaryCall<_grpc_channelz_v1_GetSocketRequest__Output, _grpc_channelz_v1_GetSocketResponse>; - /** - * Returns a single Subchannel, or else a NOT_FOUND code. - */ - GetSubchannel: grpc.handleUnaryCall<_grpc_channelz_v1_GetSubchannelRequest__Output, _grpc_channelz_v1_GetSubchannelResponse>; - /** - * Gets all root channels (i.e. channels the application has directly - * created). This does not include subchannels nor non-top level channels. - */ - GetTopChannels: grpc.handleUnaryCall<_grpc_channelz_v1_GetTopChannelsRequest__Output, _grpc_channelz_v1_GetTopChannelsResponse>; -} -export interface ChannelzDefinition extends grpc.ServiceDefinition { - GetChannel: MethodDefinition<_grpc_channelz_v1_GetChannelRequest, _grpc_channelz_v1_GetChannelResponse, _grpc_channelz_v1_GetChannelRequest__Output, _grpc_channelz_v1_GetChannelResponse__Output>; - GetServer: MethodDefinition<_grpc_channelz_v1_GetServerRequest, _grpc_channelz_v1_GetServerResponse, _grpc_channelz_v1_GetServerRequest__Output, _grpc_channelz_v1_GetServerResponse__Output>; - GetServerSockets: MethodDefinition<_grpc_channelz_v1_GetServerSocketsRequest, _grpc_channelz_v1_GetServerSocketsResponse, _grpc_channelz_v1_GetServerSocketsRequest__Output, _grpc_channelz_v1_GetServerSocketsResponse__Output>; - GetServers: MethodDefinition<_grpc_channelz_v1_GetServersRequest, _grpc_channelz_v1_GetServersResponse, _grpc_channelz_v1_GetServersRequest__Output, _grpc_channelz_v1_GetServersResponse__Output>; - GetSocket: MethodDefinition<_grpc_channelz_v1_GetSocketRequest, _grpc_channelz_v1_GetSocketResponse, _grpc_channelz_v1_GetSocketRequest__Output, _grpc_channelz_v1_GetSocketResponse__Output>; - GetSubchannel: MethodDefinition<_grpc_channelz_v1_GetSubchannelRequest, _grpc_channelz_v1_GetSubchannelResponse, _grpc_channelz_v1_GetSubchannelRequest__Output, _grpc_channelz_v1_GetSubchannelResponse__Output>; - GetTopChannels: MethodDefinition<_grpc_channelz_v1_GetTopChannelsRequest, _grpc_channelz_v1_GetTopChannelsResponse, _grpc_channelz_v1_GetTopChannelsRequest__Output, _grpc_channelz_v1_GetTopChannelsResponse__Output>; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.js deleted file mode 100644 index 9fdf9fc..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Channelz.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.js.map deleted file mode 100644 index 86fafec..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Channelz.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/Channelz.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.d.ts deleted file mode 100644 index 4956cfa..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -export interface GetChannelRequest { - /** - * channel_id is the identifier of the specific channel to get. - */ - 'channel_id'?: (number | string | Long); -} -export interface GetChannelRequest__Output { - /** - * channel_id is the identifier of the specific channel to get. - */ - 'channel_id': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.js deleted file mode 100644 index 10948d4..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetChannelRequest.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.js.map deleted file mode 100644 index 0ae3f26..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetChannelRequest.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/GetChannelRequest.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.d.ts deleted file mode 100644 index 2fbab92..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { Channel as _grpc_channelz_v1_Channel, Channel__Output as _grpc_channelz_v1_Channel__Output } from '../../../grpc/channelz/v1/Channel'; -export interface GetChannelResponse { - /** - * The Channel that corresponds to the requested channel_id. This field - * should be set. - */ - 'channel'?: (_grpc_channelz_v1_Channel | null); -} -export interface GetChannelResponse__Output { - /** - * The Channel that corresponds to the requested channel_id. This field - * should be set. - */ - 'channel': (_grpc_channelz_v1_Channel__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.js deleted file mode 100644 index 02a4426..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetChannelResponse.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.js.map deleted file mode 100644 index a3cfefb..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetChannelResponse.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/GetChannelResponse.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.d.ts deleted file mode 100644 index 1df8503..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -export interface GetServerRequest { - /** - * server_id is the identifier of the specific server to get. - */ - 'server_id'?: (number | string | Long); -} -export interface GetServerRequest__Output { - /** - * server_id is the identifier of the specific server to get. - */ - 'server_id': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.js deleted file mode 100644 index 77717b4..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetServerRequest.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.js.map deleted file mode 100644 index 86fbba6..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetServerRequest.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/GetServerRequest.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.d.ts deleted file mode 100644 index 2da13dd..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { Server as _grpc_channelz_v1_Server, Server__Output as _grpc_channelz_v1_Server__Output } from '../../../grpc/channelz/v1/Server'; -export interface GetServerResponse { - /** - * The Server that corresponds to the requested server_id. This field - * should be set. - */ - 'server'?: (_grpc_channelz_v1_Server | null); -} -export interface GetServerResponse__Output { - /** - * The Server that corresponds to the requested server_id. This field - * should be set. - */ - 'server': (_grpc_channelz_v1_Server__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.js deleted file mode 100644 index 130eb1b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetServerResponse.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.js.map deleted file mode 100644 index f4b16ff..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetServerResponse.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/GetServerResponse.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.d.ts deleted file mode 100644 index d810b92..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -export interface GetServerSocketsRequest { - 'server_id'?: (number | string | Long); - /** - * start_socket_id indicates that only sockets at or above this id should be - * included in the results. - * To request the first page, this must be set to 0. To request - * subsequent pages, the client generates this value by adding 1 to - * the highest seen result ID. - */ - 'start_socket_id'?: (number | string | Long); - /** - * If non-zero, the server will return a page of results containing - * at most this many items. If zero, the server will choose a - * reasonable page size. Must never be negative. - */ - 'max_results'?: (number | string | Long); -} -export interface GetServerSocketsRequest__Output { - 'server_id': (string); - /** - * start_socket_id indicates that only sockets at or above this id should be - * included in the results. - * To request the first page, this must be set to 0. To request - * subsequent pages, the client generates this value by adding 1 to - * the highest seen result ID. - */ - 'start_socket_id': (string); - /** - * If non-zero, the server will return a page of results containing - * at most this many items. If zero, the server will choose a - * reasonable page size. Must never be negative. - */ - 'max_results': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.js deleted file mode 100644 index 1a15183..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetServerSocketsRequest.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.js.map deleted file mode 100644 index 458dd98..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetServerSocketsRequest.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/GetServerSocketsRequest.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.d.ts deleted file mode 100644 index 4c329ae..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { SocketRef as _grpc_channelz_v1_SocketRef, SocketRef__Output as _grpc_channelz_v1_SocketRef__Output } from '../../../grpc/channelz/v1/SocketRef'; -export interface GetServerSocketsResponse { - /** - * list of socket refs that the connection detail service knows about. Sorted in - * ascending socket_id order. - * Must contain at least 1 result, otherwise 'end' must be true. - */ - 'socket_ref'?: (_grpc_channelz_v1_SocketRef)[]; - /** - * If set, indicates that the list of sockets is the final list. Requesting - * more sockets will only return more if they are created after this RPC - * completes. - */ - 'end'?: (boolean); -} -export interface GetServerSocketsResponse__Output { - /** - * list of socket refs that the connection detail service knows about. Sorted in - * ascending socket_id order. - * Must contain at least 1 result, otherwise 'end' must be true. - */ - 'socket_ref': (_grpc_channelz_v1_SocketRef__Output)[]; - /** - * If set, indicates that the list of sockets is the final list. Requesting - * more sockets will only return more if they are created after this RPC - * completes. - */ - 'end': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.js deleted file mode 100644 index 29e424f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetServerSocketsResponse.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.js.map deleted file mode 100644 index dc99923..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetServerSocketsResponse.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/GetServerSocketsResponse.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.d.ts deleted file mode 100644 index 64ace6e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -export interface GetServersRequest { - /** - * start_server_id indicates that only servers at or above this id should be - * included in the results. - * To request the first page, this must be set to 0. To request - * subsequent pages, the client generates this value by adding 1 to - * the highest seen result ID. - */ - 'start_server_id'?: (number | string | Long); - /** - * If non-zero, the server will return a page of results containing - * at most this many items. If zero, the server will choose a - * reasonable page size. Must never be negative. - */ - 'max_results'?: (number | string | Long); -} -export interface GetServersRequest__Output { - /** - * start_server_id indicates that only servers at or above this id should be - * included in the results. - * To request the first page, this must be set to 0. To request - * subsequent pages, the client generates this value by adding 1 to - * the highest seen result ID. - */ - 'start_server_id': (string); - /** - * If non-zero, the server will return a page of results containing - * at most this many items. If zero, the server will choose a - * reasonable page size. Must never be negative. - */ - 'max_results': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.js deleted file mode 100644 index 7371813..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetServersRequest.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.js.map deleted file mode 100644 index db7c710..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetServersRequest.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/GetServersRequest.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.d.ts deleted file mode 100644 index d3840cd..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { Server as _grpc_channelz_v1_Server, Server__Output as _grpc_channelz_v1_Server__Output } from '../../../grpc/channelz/v1/Server'; -export interface GetServersResponse { - /** - * list of servers that the connection detail service knows about. Sorted in - * ascending server_id order. - * Must contain at least 1 result, otherwise 'end' must be true. - */ - 'server'?: (_grpc_channelz_v1_Server)[]; - /** - * If set, indicates that the list of servers is the final list. Requesting - * more servers will only return more if they are created after this RPC - * completes. - */ - 'end'?: (boolean); -} -export interface GetServersResponse__Output { - /** - * list of servers that the connection detail service knows about. Sorted in - * ascending server_id order. - * Must contain at least 1 result, otherwise 'end' must be true. - */ - 'server': (_grpc_channelz_v1_Server__Output)[]; - /** - * If set, indicates that the list of servers is the final list. Requesting - * more servers will only return more if they are created after this RPC - * completes. - */ - 'end': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.js deleted file mode 100644 index 5124298..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetServersResponse.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.js.map deleted file mode 100644 index 74e4bba..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetServersResponse.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/GetServersResponse.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.d.ts deleted file mode 100644 index f80615c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -export interface GetSocketRequest { - /** - * socket_id is the identifier of the specific socket to get. - */ - 'socket_id'?: (number | string | Long); - /** - * If true, the response will contain only high level information - * that is inexpensive to obtain. Fields thay may be omitted are - * documented. - */ - 'summary'?: (boolean); -} -export interface GetSocketRequest__Output { - /** - * socket_id is the identifier of the specific socket to get. - */ - 'socket_id': (string); - /** - * If true, the response will contain only high level information - * that is inexpensive to obtain. Fields thay may be omitted are - * documented. - */ - 'summary': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.js deleted file mode 100644 index 40ad25b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetSocketRequest.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.js.map deleted file mode 100644 index 3b4c180..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetSocketRequest.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/GetSocketRequest.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.d.ts deleted file mode 100644 index a9795d3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { Socket as _grpc_channelz_v1_Socket, Socket__Output as _grpc_channelz_v1_Socket__Output } from '../../../grpc/channelz/v1/Socket'; -export interface GetSocketResponse { - /** - * The Socket that corresponds to the requested socket_id. This field - * should be set. - */ - 'socket'?: (_grpc_channelz_v1_Socket | null); -} -export interface GetSocketResponse__Output { - /** - * The Socket that corresponds to the requested socket_id. This field - * should be set. - */ - 'socket': (_grpc_channelz_v1_Socket__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.js deleted file mode 100644 index ace0ef2..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetSocketResponse.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.js.map deleted file mode 100644 index 90fada3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetSocketResponse.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/GetSocketResponse.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.d.ts deleted file mode 100644 index 114a91f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -export interface GetSubchannelRequest { - /** - * subchannel_id is the identifier of the specific subchannel to get. - */ - 'subchannel_id'?: (number | string | Long); -} -export interface GetSubchannelRequest__Output { - /** - * subchannel_id is the identifier of the specific subchannel to get. - */ - 'subchannel_id': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.js deleted file mode 100644 index 90f45ea..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetSubchannelRequest.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.js.map deleted file mode 100644 index b8f8f62..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetSubchannelRequest.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/GetSubchannelRequest.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.d.ts deleted file mode 100644 index 455639f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { Subchannel as _grpc_channelz_v1_Subchannel, Subchannel__Output as _grpc_channelz_v1_Subchannel__Output } from '../../../grpc/channelz/v1/Subchannel'; -export interface GetSubchannelResponse { - /** - * The Subchannel that corresponds to the requested subchannel_id. This - * field should be set. - */ - 'subchannel'?: (_grpc_channelz_v1_Subchannel | null); -} -export interface GetSubchannelResponse__Output { - /** - * The Subchannel that corresponds to the requested subchannel_id. This - * field should be set. - */ - 'subchannel': (_grpc_channelz_v1_Subchannel__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.js deleted file mode 100644 index 52d4111..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetSubchannelResponse.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.js.map deleted file mode 100644 index b39861f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetSubchannelResponse.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/GetSubchannelResponse.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.d.ts deleted file mode 100644 index 43049af..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -export interface GetTopChannelsRequest { - /** - * start_channel_id indicates that only channels at or above this id should be - * included in the results. - * To request the first page, this should be set to 0. To request - * subsequent pages, the client generates this value by adding 1 to - * the highest seen result ID. - */ - 'start_channel_id'?: (number | string | Long); - /** - * If non-zero, the server will return a page of results containing - * at most this many items. If zero, the server will choose a - * reasonable page size. Must never be negative. - */ - 'max_results'?: (number | string | Long); -} -export interface GetTopChannelsRequest__Output { - /** - * start_channel_id indicates that only channels at or above this id should be - * included in the results. - * To request the first page, this should be set to 0. To request - * subsequent pages, the client generates this value by adding 1 to - * the highest seen result ID. - */ - 'start_channel_id': (string); - /** - * If non-zero, the server will return a page of results containing - * at most this many items. If zero, the server will choose a - * reasonable page size. Must never be negative. - */ - 'max_results': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.js deleted file mode 100644 index 8b3e023..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetTopChannelsRequest.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.js.map deleted file mode 100644 index c4ffc68..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetTopChannelsRequest.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/GetTopChannelsRequest.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.d.ts deleted file mode 100644 index 03f282f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { Channel as _grpc_channelz_v1_Channel, Channel__Output as _grpc_channelz_v1_Channel__Output } from '../../../grpc/channelz/v1/Channel'; -export interface GetTopChannelsResponse { - /** - * list of channels that the connection detail service knows about. Sorted in - * ascending channel_id order. - * Must contain at least 1 result, otherwise 'end' must be true. - */ - 'channel'?: (_grpc_channelz_v1_Channel)[]; - /** - * If set, indicates that the list of channels is the final list. Requesting - * more channels can only return more if they are created after this RPC - * completes. - */ - 'end'?: (boolean); -} -export interface GetTopChannelsResponse__Output { - /** - * list of channels that the connection detail service knows about. Sorted in - * ascending channel_id order. - * Must contain at least 1 result, otherwise 'end' must be true. - */ - 'channel': (_grpc_channelz_v1_Channel__Output)[]; - /** - * If set, indicates that the list of channels is the final list. Requesting - * more channels can only return more if they are created after this RPC - * completes. - */ - 'end': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.js deleted file mode 100644 index 44f1c91..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetTopChannelsResponse.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.js.map deleted file mode 100644 index b691e5e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetTopChannelsResponse.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/GetTopChannelsResponse.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.d.ts deleted file mode 100644 index a30090a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; -export interface _grpc_channelz_v1_Security_OtherSecurity { - /** - * The human readable version of the value. - */ - 'name'?: (string); - /** - * The actual security details message. - */ - 'value'?: (_google_protobuf_Any | null); -} -export interface _grpc_channelz_v1_Security_OtherSecurity__Output { - /** - * The human readable version of the value. - */ - 'name': (string); - /** - * The actual security details message. - */ - 'value': (_google_protobuf_Any__Output | null); -} -export interface _grpc_channelz_v1_Security_Tls { - /** - * The cipher suite name in the RFC 4346 format: - * https://tools.ietf.org/html/rfc4346#appendix-C - */ - 'standard_name'?: (string); - /** - * Some other way to describe the cipher suite if - * the RFC 4346 name is not available. - */ - 'other_name'?: (string); - /** - * the certificate used by this endpoint. - */ - 'local_certificate'?: (Buffer | Uint8Array | string); - /** - * the certificate used by the remote endpoint. - */ - 'remote_certificate'?: (Buffer | Uint8Array | string); - 'cipher_suite'?: "standard_name" | "other_name"; -} -export interface _grpc_channelz_v1_Security_Tls__Output { - /** - * The cipher suite name in the RFC 4346 format: - * https://tools.ietf.org/html/rfc4346#appendix-C - */ - 'standard_name'?: (string); - /** - * Some other way to describe the cipher suite if - * the RFC 4346 name is not available. - */ - 'other_name'?: (string); - /** - * the certificate used by this endpoint. - */ - 'local_certificate': (Buffer); - /** - * the certificate used by the remote endpoint. - */ - 'remote_certificate': (Buffer); - 'cipher_suite'?: "standard_name" | "other_name"; -} -/** - * Security represents details about how secure the socket is. - */ -export interface Security { - 'tls'?: (_grpc_channelz_v1_Security_Tls | null); - 'other'?: (_grpc_channelz_v1_Security_OtherSecurity | null); - 'model'?: "tls" | "other"; -} -/** - * Security represents details about how secure the socket is. - */ -export interface Security__Output { - 'tls'?: (_grpc_channelz_v1_Security_Tls__Output | null); - 'other'?: (_grpc_channelz_v1_Security_OtherSecurity__Output | null); - 'model'?: "tls" | "other"; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.js deleted file mode 100644 index 022b367..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Security.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.js.map deleted file mode 100644 index 3243c97..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Security.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/Security.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.d.ts deleted file mode 100644 index 8d984af..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { ServerRef as _grpc_channelz_v1_ServerRef, ServerRef__Output as _grpc_channelz_v1_ServerRef__Output } from '../../../grpc/channelz/v1/ServerRef'; -import type { ServerData as _grpc_channelz_v1_ServerData, ServerData__Output as _grpc_channelz_v1_ServerData__Output } from '../../../grpc/channelz/v1/ServerData'; -import type { SocketRef as _grpc_channelz_v1_SocketRef, SocketRef__Output as _grpc_channelz_v1_SocketRef__Output } from '../../../grpc/channelz/v1/SocketRef'; -/** - * Server represents a single server. There may be multiple servers in a single - * program. - */ -export interface Server { - /** - * The identifier for a Server. This should be set. - */ - 'ref'?: (_grpc_channelz_v1_ServerRef | null); - /** - * The associated data of the Server. - */ - 'data'?: (_grpc_channelz_v1_ServerData | null); - /** - * The sockets that the server is listening on. There are no ordering - * guarantees. This may be absent. - */ - 'listen_socket'?: (_grpc_channelz_v1_SocketRef)[]; -} -/** - * Server represents a single server. There may be multiple servers in a single - * program. - */ -export interface Server__Output { - /** - * The identifier for a Server. This should be set. - */ - 'ref': (_grpc_channelz_v1_ServerRef__Output | null); - /** - * The associated data of the Server. - */ - 'data': (_grpc_channelz_v1_ServerData__Output | null); - /** - * The sockets that the server is listening on. There are no ordering - * guarantees. This may be absent. - */ - 'listen_socket': (_grpc_channelz_v1_SocketRef__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.js deleted file mode 100644 index b230e4d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Server.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.js.map deleted file mode 100644 index 522934d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Server.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/Server.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.d.ts deleted file mode 100644 index 7a2de0f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import type { ChannelTrace as _grpc_channelz_v1_ChannelTrace, ChannelTrace__Output as _grpc_channelz_v1_ChannelTrace__Output } from '../../../grpc/channelz/v1/ChannelTrace'; -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; -import type { Long } from '@grpc/proto-loader'; -/** - * ServerData is data for a specific Server. - */ -export interface ServerData { - /** - * A trace of recent events on the server. May be absent. - */ - 'trace'?: (_grpc_channelz_v1_ChannelTrace | null); - /** - * The number of incoming calls started on the server - */ - 'calls_started'?: (number | string | Long); - /** - * The number of incoming calls that have completed with an OK status - */ - 'calls_succeeded'?: (number | string | Long); - /** - * The number of incoming calls that have a completed with a non-OK status - */ - 'calls_failed'?: (number | string | Long); - /** - * The last time a call was started on the server. - */ - 'last_call_started_timestamp'?: (_google_protobuf_Timestamp | null); -} -/** - * ServerData is data for a specific Server. - */ -export interface ServerData__Output { - /** - * A trace of recent events on the server. May be absent. - */ - 'trace': (_grpc_channelz_v1_ChannelTrace__Output | null); - /** - * The number of incoming calls started on the server - */ - 'calls_started': (string); - /** - * The number of incoming calls that have completed with an OK status - */ - 'calls_succeeded': (string); - /** - * The number of incoming calls that have a completed with a non-OK status - */ - 'calls_failed': (string); - /** - * The last time a call was started on the server. - */ - 'last_call_started_timestamp': (_google_protobuf_Timestamp__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.js deleted file mode 100644 index 53d92a6..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ServerData.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.js.map deleted file mode 100644 index b78c5b4..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerData.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/ServerData.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.d.ts deleted file mode 100644 index 778b87d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -/** - * ServerRef is a reference to a Server. - */ -export interface ServerRef { - /** - * A globally unique identifier for this server. Must be a positive number. - */ - 'server_id'?: (number | string | Long); - /** - * An optional name associated with the server. - */ - 'name'?: (string); -} -/** - * ServerRef is a reference to a Server. - */ -export interface ServerRef__Output { - /** - * A globally unique identifier for this server. Must be a positive number. - */ - 'server_id': (string); - /** - * An optional name associated with the server. - */ - 'name': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.js deleted file mode 100644 index 9a623c7..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ServerRef.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.js.map deleted file mode 100644 index 75f5aad..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerRef.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/ServerRef.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.d.ts deleted file mode 100644 index 91d4ad8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { SocketRef as _grpc_channelz_v1_SocketRef, SocketRef__Output as _grpc_channelz_v1_SocketRef__Output } from '../../../grpc/channelz/v1/SocketRef'; -import type { SocketData as _grpc_channelz_v1_SocketData, SocketData__Output as _grpc_channelz_v1_SocketData__Output } from '../../../grpc/channelz/v1/SocketData'; -import type { Address as _grpc_channelz_v1_Address, Address__Output as _grpc_channelz_v1_Address__Output } from '../../../grpc/channelz/v1/Address'; -import type { Security as _grpc_channelz_v1_Security, Security__Output as _grpc_channelz_v1_Security__Output } from '../../../grpc/channelz/v1/Security'; -/** - * Information about an actual connection. Pronounced "sock-ay". - */ -export interface Socket { - /** - * The identifier for the Socket. - */ - 'ref'?: (_grpc_channelz_v1_SocketRef | null); - /** - * Data specific to this Socket. - */ - 'data'?: (_grpc_channelz_v1_SocketData | null); - /** - * The locally bound address. - */ - 'local'?: (_grpc_channelz_v1_Address | null); - /** - * The remote bound address. May be absent. - */ - 'remote'?: (_grpc_channelz_v1_Address | null); - /** - * Security details for this socket. May be absent if not available, or - * there is no security on the socket. - */ - 'security'?: (_grpc_channelz_v1_Security | null); - /** - * Optional, represents the name of the remote endpoint, if different than - * the original target name. - */ - 'remote_name'?: (string); -} -/** - * Information about an actual connection. Pronounced "sock-ay". - */ -export interface Socket__Output { - /** - * The identifier for the Socket. - */ - 'ref': (_grpc_channelz_v1_SocketRef__Output | null); - /** - * Data specific to this Socket. - */ - 'data': (_grpc_channelz_v1_SocketData__Output | null); - /** - * The locally bound address. - */ - 'local': (_grpc_channelz_v1_Address__Output | null); - /** - * The remote bound address. May be absent. - */ - 'remote': (_grpc_channelz_v1_Address__Output | null); - /** - * Security details for this socket. May be absent if not available, or - * there is no security on the socket. - */ - 'security': (_grpc_channelz_v1_Security__Output | null); - /** - * Optional, represents the name of the remote endpoint, if different than - * the original target name. - */ - 'remote_name': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.js deleted file mode 100644 index c1e5004..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Socket.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.js.map deleted file mode 100644 index d49d9df..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Socket.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/Socket.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.d.ts deleted file mode 100644 index 5553cb2..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.d.ts +++ /dev/null @@ -1,146 +0,0 @@ -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; -import type { Int64Value as _google_protobuf_Int64Value, Int64Value__Output as _google_protobuf_Int64Value__Output } from '../../../google/protobuf/Int64Value'; -import type { SocketOption as _grpc_channelz_v1_SocketOption, SocketOption__Output as _grpc_channelz_v1_SocketOption__Output } from '../../../grpc/channelz/v1/SocketOption'; -import type { Long } from '@grpc/proto-loader'; -/** - * SocketData is data associated for a specific Socket. The fields present - * are specific to the implementation, so there may be minor differences in - * the semantics. (e.g. flow control windows) - */ -export interface SocketData { - /** - * The number of streams that have been started. - */ - 'streams_started'?: (number | string | Long); - /** - * The number of streams that have ended successfully: - * On client side, received frame with eos bit set; - * On server side, sent frame with eos bit set. - */ - 'streams_succeeded'?: (number | string | Long); - /** - * The number of streams that have ended unsuccessfully: - * On client side, ended without receiving frame with eos bit set; - * On server side, ended without sending frame with eos bit set. - */ - 'streams_failed'?: (number | string | Long); - /** - * The number of grpc messages successfully sent on this socket. - */ - 'messages_sent'?: (number | string | Long); - /** - * The number of grpc messages received on this socket. - */ - 'messages_received'?: (number | string | Long); - /** - * The number of keep alives sent. This is typically implemented with HTTP/2 - * ping messages. - */ - 'keep_alives_sent'?: (number | string | Long); - /** - * The last time a stream was created by this endpoint. Usually unset for - * servers. - */ - 'last_local_stream_created_timestamp'?: (_google_protobuf_Timestamp | null); - /** - * The last time a stream was created by the remote endpoint. Usually unset - * for clients. - */ - 'last_remote_stream_created_timestamp'?: (_google_protobuf_Timestamp | null); - /** - * The last time a message was sent by this endpoint. - */ - 'last_message_sent_timestamp'?: (_google_protobuf_Timestamp | null); - /** - * The last time a message was received by this endpoint. - */ - 'last_message_received_timestamp'?: (_google_protobuf_Timestamp | null); - /** - * The amount of window, granted to the local endpoint by the remote endpoint. - * This may be slightly out of date due to network latency. This does NOT - * include stream level or TCP level flow control info. - */ - 'local_flow_control_window'?: (_google_protobuf_Int64Value | null); - /** - * The amount of window, granted to the remote endpoint by the local endpoint. - * This may be slightly out of date due to network latency. This does NOT - * include stream level or TCP level flow control info. - */ - 'remote_flow_control_window'?: (_google_protobuf_Int64Value | null); - /** - * Socket options set on this socket. May be absent if 'summary' is set - * on GetSocketRequest. - */ - 'option'?: (_grpc_channelz_v1_SocketOption)[]; -} -/** - * SocketData is data associated for a specific Socket. The fields present - * are specific to the implementation, so there may be minor differences in - * the semantics. (e.g. flow control windows) - */ -export interface SocketData__Output { - /** - * The number of streams that have been started. - */ - 'streams_started': (string); - /** - * The number of streams that have ended successfully: - * On client side, received frame with eos bit set; - * On server side, sent frame with eos bit set. - */ - 'streams_succeeded': (string); - /** - * The number of streams that have ended unsuccessfully: - * On client side, ended without receiving frame with eos bit set; - * On server side, ended without sending frame with eos bit set. - */ - 'streams_failed': (string); - /** - * The number of grpc messages successfully sent on this socket. - */ - 'messages_sent': (string); - /** - * The number of grpc messages received on this socket. - */ - 'messages_received': (string); - /** - * The number of keep alives sent. This is typically implemented with HTTP/2 - * ping messages. - */ - 'keep_alives_sent': (string); - /** - * The last time a stream was created by this endpoint. Usually unset for - * servers. - */ - 'last_local_stream_created_timestamp': (_google_protobuf_Timestamp__Output | null); - /** - * The last time a stream was created by the remote endpoint. Usually unset - * for clients. - */ - 'last_remote_stream_created_timestamp': (_google_protobuf_Timestamp__Output | null); - /** - * The last time a message was sent by this endpoint. - */ - 'last_message_sent_timestamp': (_google_protobuf_Timestamp__Output | null); - /** - * The last time a message was received by this endpoint. - */ - 'last_message_received_timestamp': (_google_protobuf_Timestamp__Output | null); - /** - * The amount of window, granted to the local endpoint by the remote endpoint. - * This may be slightly out of date due to network latency. This does NOT - * include stream level or TCP level flow control info. - */ - 'local_flow_control_window': (_google_protobuf_Int64Value__Output | null); - /** - * The amount of window, granted to the remote endpoint by the local endpoint. - * This may be slightly out of date due to network latency. This does NOT - * include stream level or TCP level flow control info. - */ - 'remote_flow_control_window': (_google_protobuf_Int64Value__Output | null); - /** - * Socket options set on this socket. May be absent if 'summary' is set - * on GetSocketRequest. - */ - 'option': (_grpc_channelz_v1_SocketOption__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.js deleted file mode 100644 index 40638de..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=SocketData.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.js.map deleted file mode 100644 index c17becd..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SocketData.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/SocketData.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.d.ts deleted file mode 100644 index 53c23a2..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; -/** - * SocketOption represents socket options for a socket. Specifically, these - * are the options returned by getsockopt(). - */ -export interface SocketOption { - /** - * The full name of the socket option. Typically this will be the upper case - * name, such as "SO_REUSEPORT". - */ - 'name'?: (string); - /** - * The human readable value of this socket option. At least one of value or - * additional will be set. - */ - 'value'?: (string); - /** - * Additional data associated with the socket option. At least one of value - * or additional will be set. - */ - 'additional'?: (_google_protobuf_Any | null); -} -/** - * SocketOption represents socket options for a socket. Specifically, these - * are the options returned by getsockopt(). - */ -export interface SocketOption__Output { - /** - * The full name of the socket option. Typically this will be the upper case - * name, such as "SO_REUSEPORT". - */ - 'name': (string); - /** - * The human readable value of this socket option. At least one of value or - * additional will be set. - */ - 'value': (string); - /** - * Additional data associated with the socket option. At least one of value - * or additional will be set. - */ - 'additional': (_google_protobuf_Any__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.js deleted file mode 100644 index c459962..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=SocketOption.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.js.map deleted file mode 100644 index 6b8bf59..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SocketOption.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/SocketOption.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.d.ts deleted file mode 100644 index d0fd4b0..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../google/protobuf/Duration'; -/** - * For use with SocketOption's additional field. This is primarily used for - * SO_LINGER. - */ -export interface SocketOptionLinger { - /** - * active maps to `struct linger.l_onoff` - */ - 'active'?: (boolean); - /** - * duration maps to `struct linger.l_linger` - */ - 'duration'?: (_google_protobuf_Duration | null); -} -/** - * For use with SocketOption's additional field. This is primarily used for - * SO_LINGER. - */ -export interface SocketOptionLinger__Output { - /** - * active maps to `struct linger.l_onoff` - */ - 'active': (boolean); - /** - * duration maps to `struct linger.l_linger` - */ - 'duration': (_google_protobuf_Duration__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.js deleted file mode 100644 index 01028c8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=SocketOptionLinger.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.js.map deleted file mode 100644 index a5283ab..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SocketOptionLinger.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/SocketOptionLinger.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.d.ts deleted file mode 100644 index d2457e1..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * For use with SocketOption's additional field. Tcp info for - * SOL_TCP and TCP_INFO. - */ -export interface SocketOptionTcpInfo { - 'tcpi_state'?: (number); - 'tcpi_ca_state'?: (number); - 'tcpi_retransmits'?: (number); - 'tcpi_probes'?: (number); - 'tcpi_backoff'?: (number); - 'tcpi_options'?: (number); - 'tcpi_snd_wscale'?: (number); - 'tcpi_rcv_wscale'?: (number); - 'tcpi_rto'?: (number); - 'tcpi_ato'?: (number); - 'tcpi_snd_mss'?: (number); - 'tcpi_rcv_mss'?: (number); - 'tcpi_unacked'?: (number); - 'tcpi_sacked'?: (number); - 'tcpi_lost'?: (number); - 'tcpi_retrans'?: (number); - 'tcpi_fackets'?: (number); - 'tcpi_last_data_sent'?: (number); - 'tcpi_last_ack_sent'?: (number); - 'tcpi_last_data_recv'?: (number); - 'tcpi_last_ack_recv'?: (number); - 'tcpi_pmtu'?: (number); - 'tcpi_rcv_ssthresh'?: (number); - 'tcpi_rtt'?: (number); - 'tcpi_rttvar'?: (number); - 'tcpi_snd_ssthresh'?: (number); - 'tcpi_snd_cwnd'?: (number); - 'tcpi_advmss'?: (number); - 'tcpi_reordering'?: (number); -} -/** - * For use with SocketOption's additional field. Tcp info for - * SOL_TCP and TCP_INFO. - */ -export interface SocketOptionTcpInfo__Output { - 'tcpi_state': (number); - 'tcpi_ca_state': (number); - 'tcpi_retransmits': (number); - 'tcpi_probes': (number); - 'tcpi_backoff': (number); - 'tcpi_options': (number); - 'tcpi_snd_wscale': (number); - 'tcpi_rcv_wscale': (number); - 'tcpi_rto': (number); - 'tcpi_ato': (number); - 'tcpi_snd_mss': (number); - 'tcpi_rcv_mss': (number); - 'tcpi_unacked': (number); - 'tcpi_sacked': (number); - 'tcpi_lost': (number); - 'tcpi_retrans': (number); - 'tcpi_fackets': (number); - 'tcpi_last_data_sent': (number); - 'tcpi_last_ack_sent': (number); - 'tcpi_last_data_recv': (number); - 'tcpi_last_ack_recv': (number); - 'tcpi_pmtu': (number); - 'tcpi_rcv_ssthresh': (number); - 'tcpi_rtt': (number); - 'tcpi_rttvar': (number); - 'tcpi_snd_ssthresh': (number); - 'tcpi_snd_cwnd': (number); - 'tcpi_advmss': (number); - 'tcpi_reordering': (number); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.js deleted file mode 100644 index b663a2e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=SocketOptionTcpInfo.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.js.map deleted file mode 100644 index cb68a32..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SocketOptionTcpInfo.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/SocketOptionTcpInfo.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.d.ts deleted file mode 100644 index b102a34..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../google/protobuf/Duration'; -/** - * For use with SocketOption's additional field. This is primarily used for - * SO_RCVTIMEO and SO_SNDTIMEO - */ -export interface SocketOptionTimeout { - 'duration'?: (_google_protobuf_Duration | null); -} -/** - * For use with SocketOption's additional field. This is primarily used for - * SO_RCVTIMEO and SO_SNDTIMEO - */ -export interface SocketOptionTimeout__Output { - 'duration': (_google_protobuf_Duration__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.js deleted file mode 100644 index bcef7f5..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=SocketOptionTimeout.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.js.map deleted file mode 100644 index 73c8085..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SocketOptionTimeout.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/SocketOptionTimeout.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.d.ts deleted file mode 100644 index 2f34d65..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -/** - * SocketRef is a reference to a Socket. - */ -export interface SocketRef { - /** - * The globally unique id for this socket. Must be a positive number. - */ - 'socket_id'?: (number | string | Long); - /** - * An optional name associated with the socket. - */ - 'name'?: (string); -} -/** - * SocketRef is a reference to a Socket. - */ -export interface SocketRef__Output { - /** - * The globally unique id for this socket. Must be a positive number. - */ - 'socket_id': (string); - /** - * An optional name associated with the socket. - */ - 'name': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.js deleted file mode 100644 index a73587f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=SocketRef.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.js.map deleted file mode 100644 index d970f9c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SocketRef.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/SocketRef.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.d.ts deleted file mode 100644 index 1222cb5..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { SubchannelRef as _grpc_channelz_v1_SubchannelRef, SubchannelRef__Output as _grpc_channelz_v1_SubchannelRef__Output } from '../../../grpc/channelz/v1/SubchannelRef'; -import type { ChannelData as _grpc_channelz_v1_ChannelData, ChannelData__Output as _grpc_channelz_v1_ChannelData__Output } from '../../../grpc/channelz/v1/ChannelData'; -import type { ChannelRef as _grpc_channelz_v1_ChannelRef, ChannelRef__Output as _grpc_channelz_v1_ChannelRef__Output } from '../../../grpc/channelz/v1/ChannelRef'; -import type { SocketRef as _grpc_channelz_v1_SocketRef, SocketRef__Output as _grpc_channelz_v1_SocketRef__Output } from '../../../grpc/channelz/v1/SocketRef'; -/** - * Subchannel is a logical grouping of channels, subchannels, and sockets. - * A subchannel is load balanced over by it's ancestor - */ -export interface Subchannel { - /** - * The identifier for this channel. - */ - 'ref'?: (_grpc_channelz_v1_SubchannelRef | null); - /** - * Data specific to this channel. - */ - 'data'?: (_grpc_channelz_v1_ChannelData | null); - /** - * There are no ordering guarantees on the order of channel refs. - * There may not be cycles in the ref graph. - * A channel ref may be present in more than one channel or subchannel. - */ - 'channel_ref'?: (_grpc_channelz_v1_ChannelRef)[]; - /** - * At most one of 'channel_ref+subchannel_ref' and 'socket' is set. - * There are no ordering guarantees on the order of subchannel refs. - * There may not be cycles in the ref graph. - * A sub channel ref may be present in more than one channel or subchannel. - */ - 'subchannel_ref'?: (_grpc_channelz_v1_SubchannelRef)[]; - /** - * There are no ordering guarantees on the order of sockets. - */ - 'socket_ref'?: (_grpc_channelz_v1_SocketRef)[]; -} -/** - * Subchannel is a logical grouping of channels, subchannels, and sockets. - * A subchannel is load balanced over by it's ancestor - */ -export interface Subchannel__Output { - /** - * The identifier for this channel. - */ - 'ref': (_grpc_channelz_v1_SubchannelRef__Output | null); - /** - * Data specific to this channel. - */ - 'data': (_grpc_channelz_v1_ChannelData__Output | null); - /** - * There are no ordering guarantees on the order of channel refs. - * There may not be cycles in the ref graph. - * A channel ref may be present in more than one channel or subchannel. - */ - 'channel_ref': (_grpc_channelz_v1_ChannelRef__Output)[]; - /** - * At most one of 'channel_ref+subchannel_ref' and 'socket' is set. - * There are no ordering guarantees on the order of subchannel refs. - * There may not be cycles in the ref graph. - * A sub channel ref may be present in more than one channel or subchannel. - */ - 'subchannel_ref': (_grpc_channelz_v1_SubchannelRef__Output)[]; - /** - * There are no ordering guarantees on the order of sockets. - */ - 'socket_ref': (_grpc_channelz_v1_SocketRef__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.js deleted file mode 100644 index 6a5e543..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Subchannel.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.js.map deleted file mode 100644 index 6441346..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Subchannel.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/Subchannel.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.d.ts deleted file mode 100644 index 290fc85..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -/** - * SubchannelRef is a reference to a Subchannel. - */ -export interface SubchannelRef { - /** - * The globally unique id for this subchannel. Must be a positive number. - */ - 'subchannel_id'?: (number | string | Long); - /** - * An optional name associated with the subchannel. - */ - 'name'?: (string); -} -/** - * SubchannelRef is a reference to a Subchannel. - */ -export interface SubchannelRef__Output { - /** - * The globally unique id for this subchannel. Must be a positive number. - */ - 'subchannel_id': (string); - /** - * An optional name associated with the subchannel. - */ - 'name': (string); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.js b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.js deleted file mode 100644 index 68520f9..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/channelz.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=SubchannelRef.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.js.map b/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.js.map deleted file mode 100644 index 1e4b009..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SubchannelRef.js","sourceRoot":"","sources":["../../../../../../src/generated/grpc/channelz/v1/SubchannelRef.ts"],"names":[],"mappings":";AAAA,sCAAsC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/orca.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/orca.d.ts deleted file mode 100644 index c1d2b01..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/orca.d.ts +++ /dev/null @@ -1,145 +0,0 @@ -import type * as grpc from '../index'; -import type { EnumTypeDefinition, MessageTypeDefinition } from '@grpc/proto-loader'; -import type { DescriptorProto as _google_protobuf_DescriptorProto, DescriptorProto__Output as _google_protobuf_DescriptorProto__Output } from './google/protobuf/DescriptorProto'; -import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from './google/protobuf/Duration'; -import type { EnumDescriptorProto as _google_protobuf_EnumDescriptorProto, EnumDescriptorProto__Output as _google_protobuf_EnumDescriptorProto__Output } from './google/protobuf/EnumDescriptorProto'; -import type { EnumOptions as _google_protobuf_EnumOptions, EnumOptions__Output as _google_protobuf_EnumOptions__Output } from './google/protobuf/EnumOptions'; -import type { EnumValueDescriptorProto as _google_protobuf_EnumValueDescriptorProto, EnumValueDescriptorProto__Output as _google_protobuf_EnumValueDescriptorProto__Output } from './google/protobuf/EnumValueDescriptorProto'; -import type { EnumValueOptions as _google_protobuf_EnumValueOptions, EnumValueOptions__Output as _google_protobuf_EnumValueOptions__Output } from './google/protobuf/EnumValueOptions'; -import type { ExtensionRangeOptions as _google_protobuf_ExtensionRangeOptions, ExtensionRangeOptions__Output as _google_protobuf_ExtensionRangeOptions__Output } from './google/protobuf/ExtensionRangeOptions'; -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from './google/protobuf/FeatureSet'; -import type { FeatureSetDefaults as _google_protobuf_FeatureSetDefaults, FeatureSetDefaults__Output as _google_protobuf_FeatureSetDefaults__Output } from './google/protobuf/FeatureSetDefaults'; -import type { FieldDescriptorProto as _google_protobuf_FieldDescriptorProto, FieldDescriptorProto__Output as _google_protobuf_FieldDescriptorProto__Output } from './google/protobuf/FieldDescriptorProto'; -import type { FieldOptions as _google_protobuf_FieldOptions, FieldOptions__Output as _google_protobuf_FieldOptions__Output } from './google/protobuf/FieldOptions'; -import type { FileDescriptorProto as _google_protobuf_FileDescriptorProto, FileDescriptorProto__Output as _google_protobuf_FileDescriptorProto__Output } from './google/protobuf/FileDescriptorProto'; -import type { FileDescriptorSet as _google_protobuf_FileDescriptorSet, FileDescriptorSet__Output as _google_protobuf_FileDescriptorSet__Output } from './google/protobuf/FileDescriptorSet'; -import type { FileOptions as _google_protobuf_FileOptions, FileOptions__Output as _google_protobuf_FileOptions__Output } from './google/protobuf/FileOptions'; -import type { GeneratedCodeInfo as _google_protobuf_GeneratedCodeInfo, GeneratedCodeInfo__Output as _google_protobuf_GeneratedCodeInfo__Output } from './google/protobuf/GeneratedCodeInfo'; -import type { MessageOptions as _google_protobuf_MessageOptions, MessageOptions__Output as _google_protobuf_MessageOptions__Output } from './google/protobuf/MessageOptions'; -import type { MethodDescriptorProto as _google_protobuf_MethodDescriptorProto, MethodDescriptorProto__Output as _google_protobuf_MethodDescriptorProto__Output } from './google/protobuf/MethodDescriptorProto'; -import type { MethodOptions as _google_protobuf_MethodOptions, MethodOptions__Output as _google_protobuf_MethodOptions__Output } from './google/protobuf/MethodOptions'; -import type { OneofDescriptorProto as _google_protobuf_OneofDescriptorProto, OneofDescriptorProto__Output as _google_protobuf_OneofDescriptorProto__Output } from './google/protobuf/OneofDescriptorProto'; -import type { OneofOptions as _google_protobuf_OneofOptions, OneofOptions__Output as _google_protobuf_OneofOptions__Output } from './google/protobuf/OneofOptions'; -import type { ServiceDescriptorProto as _google_protobuf_ServiceDescriptorProto, ServiceDescriptorProto__Output as _google_protobuf_ServiceDescriptorProto__Output } from './google/protobuf/ServiceDescriptorProto'; -import type { ServiceOptions as _google_protobuf_ServiceOptions, ServiceOptions__Output as _google_protobuf_ServiceOptions__Output } from './google/protobuf/ServiceOptions'; -import type { SourceCodeInfo as _google_protobuf_SourceCodeInfo, SourceCodeInfo__Output as _google_protobuf_SourceCodeInfo__Output } from './google/protobuf/SourceCodeInfo'; -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from './google/protobuf/Timestamp'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from './google/protobuf/UninterpretedOption'; -import type { AnyRules as _validate_AnyRules, AnyRules__Output as _validate_AnyRules__Output } from './validate/AnyRules'; -import type { BoolRules as _validate_BoolRules, BoolRules__Output as _validate_BoolRules__Output } from './validate/BoolRules'; -import type { BytesRules as _validate_BytesRules, BytesRules__Output as _validate_BytesRules__Output } from './validate/BytesRules'; -import type { DoubleRules as _validate_DoubleRules, DoubleRules__Output as _validate_DoubleRules__Output } from './validate/DoubleRules'; -import type { DurationRules as _validate_DurationRules, DurationRules__Output as _validate_DurationRules__Output } from './validate/DurationRules'; -import type { EnumRules as _validate_EnumRules, EnumRules__Output as _validate_EnumRules__Output } from './validate/EnumRules'; -import type { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from './validate/FieldRules'; -import type { Fixed32Rules as _validate_Fixed32Rules, Fixed32Rules__Output as _validate_Fixed32Rules__Output } from './validate/Fixed32Rules'; -import type { Fixed64Rules as _validate_Fixed64Rules, Fixed64Rules__Output as _validate_Fixed64Rules__Output } from './validate/Fixed64Rules'; -import type { FloatRules as _validate_FloatRules, FloatRules__Output as _validate_FloatRules__Output } from './validate/FloatRules'; -import type { Int32Rules as _validate_Int32Rules, Int32Rules__Output as _validate_Int32Rules__Output } from './validate/Int32Rules'; -import type { Int64Rules as _validate_Int64Rules, Int64Rules__Output as _validate_Int64Rules__Output } from './validate/Int64Rules'; -import type { MapRules as _validate_MapRules, MapRules__Output as _validate_MapRules__Output } from './validate/MapRules'; -import type { MessageRules as _validate_MessageRules, MessageRules__Output as _validate_MessageRules__Output } from './validate/MessageRules'; -import type { RepeatedRules as _validate_RepeatedRules, RepeatedRules__Output as _validate_RepeatedRules__Output } from './validate/RepeatedRules'; -import type { SFixed32Rules as _validate_SFixed32Rules, SFixed32Rules__Output as _validate_SFixed32Rules__Output } from './validate/SFixed32Rules'; -import type { SFixed64Rules as _validate_SFixed64Rules, SFixed64Rules__Output as _validate_SFixed64Rules__Output } from './validate/SFixed64Rules'; -import type { SInt32Rules as _validate_SInt32Rules, SInt32Rules__Output as _validate_SInt32Rules__Output } from './validate/SInt32Rules'; -import type { SInt64Rules as _validate_SInt64Rules, SInt64Rules__Output as _validate_SInt64Rules__Output } from './validate/SInt64Rules'; -import type { StringRules as _validate_StringRules, StringRules__Output as _validate_StringRules__Output } from './validate/StringRules'; -import type { TimestampRules as _validate_TimestampRules, TimestampRules__Output as _validate_TimestampRules__Output } from './validate/TimestampRules'; -import type { UInt32Rules as _validate_UInt32Rules, UInt32Rules__Output as _validate_UInt32Rules__Output } from './validate/UInt32Rules'; -import type { UInt64Rules as _validate_UInt64Rules, UInt64Rules__Output as _validate_UInt64Rules__Output } from './validate/UInt64Rules'; -import type { OrcaLoadReport as _xds_data_orca_v3_OrcaLoadReport, OrcaLoadReport__Output as _xds_data_orca_v3_OrcaLoadReport__Output } from './xds/data/orca/v3/OrcaLoadReport'; -import type { OpenRcaServiceClient as _xds_service_orca_v3_OpenRcaServiceClient, OpenRcaServiceDefinition as _xds_service_orca_v3_OpenRcaServiceDefinition } from './xds/service/orca/v3/OpenRcaService'; -import type { OrcaLoadReportRequest as _xds_service_orca_v3_OrcaLoadReportRequest, OrcaLoadReportRequest__Output as _xds_service_orca_v3_OrcaLoadReportRequest__Output } from './xds/service/orca/v3/OrcaLoadReportRequest'; -type SubtypeConstructor any, Subtype> = { - new (...args: ConstructorParameters): Subtype; -}; -export interface ProtoGrpcType { - google: { - protobuf: { - DescriptorProto: MessageTypeDefinition<_google_protobuf_DescriptorProto, _google_protobuf_DescriptorProto__Output>; - Duration: MessageTypeDefinition<_google_protobuf_Duration, _google_protobuf_Duration__Output>; - Edition: EnumTypeDefinition; - EnumDescriptorProto: MessageTypeDefinition<_google_protobuf_EnumDescriptorProto, _google_protobuf_EnumDescriptorProto__Output>; - EnumOptions: MessageTypeDefinition<_google_protobuf_EnumOptions, _google_protobuf_EnumOptions__Output>; - EnumValueDescriptorProto: MessageTypeDefinition<_google_protobuf_EnumValueDescriptorProto, _google_protobuf_EnumValueDescriptorProto__Output>; - EnumValueOptions: MessageTypeDefinition<_google_protobuf_EnumValueOptions, _google_protobuf_EnumValueOptions__Output>; - ExtensionRangeOptions: MessageTypeDefinition<_google_protobuf_ExtensionRangeOptions, _google_protobuf_ExtensionRangeOptions__Output>; - FeatureSet: MessageTypeDefinition<_google_protobuf_FeatureSet, _google_protobuf_FeatureSet__Output>; - FeatureSetDefaults: MessageTypeDefinition<_google_protobuf_FeatureSetDefaults, _google_protobuf_FeatureSetDefaults__Output>; - FieldDescriptorProto: MessageTypeDefinition<_google_protobuf_FieldDescriptorProto, _google_protobuf_FieldDescriptorProto__Output>; - FieldOptions: MessageTypeDefinition<_google_protobuf_FieldOptions, _google_protobuf_FieldOptions__Output>; - FileDescriptorProto: MessageTypeDefinition<_google_protobuf_FileDescriptorProto, _google_protobuf_FileDescriptorProto__Output>; - FileDescriptorSet: MessageTypeDefinition<_google_protobuf_FileDescriptorSet, _google_protobuf_FileDescriptorSet__Output>; - FileOptions: MessageTypeDefinition<_google_protobuf_FileOptions, _google_protobuf_FileOptions__Output>; - GeneratedCodeInfo: MessageTypeDefinition<_google_protobuf_GeneratedCodeInfo, _google_protobuf_GeneratedCodeInfo__Output>; - MessageOptions: MessageTypeDefinition<_google_protobuf_MessageOptions, _google_protobuf_MessageOptions__Output>; - MethodDescriptorProto: MessageTypeDefinition<_google_protobuf_MethodDescriptorProto, _google_protobuf_MethodDescriptorProto__Output>; - MethodOptions: MessageTypeDefinition<_google_protobuf_MethodOptions, _google_protobuf_MethodOptions__Output>; - OneofDescriptorProto: MessageTypeDefinition<_google_protobuf_OneofDescriptorProto, _google_protobuf_OneofDescriptorProto__Output>; - OneofOptions: MessageTypeDefinition<_google_protobuf_OneofOptions, _google_protobuf_OneofOptions__Output>; - ServiceDescriptorProto: MessageTypeDefinition<_google_protobuf_ServiceDescriptorProto, _google_protobuf_ServiceDescriptorProto__Output>; - ServiceOptions: MessageTypeDefinition<_google_protobuf_ServiceOptions, _google_protobuf_ServiceOptions__Output>; - SourceCodeInfo: MessageTypeDefinition<_google_protobuf_SourceCodeInfo, _google_protobuf_SourceCodeInfo__Output>; - SymbolVisibility: EnumTypeDefinition; - Timestamp: MessageTypeDefinition<_google_protobuf_Timestamp, _google_protobuf_Timestamp__Output>; - UninterpretedOption: MessageTypeDefinition<_google_protobuf_UninterpretedOption, _google_protobuf_UninterpretedOption__Output>; - }; - }; - validate: { - AnyRules: MessageTypeDefinition<_validate_AnyRules, _validate_AnyRules__Output>; - BoolRules: MessageTypeDefinition<_validate_BoolRules, _validate_BoolRules__Output>; - BytesRules: MessageTypeDefinition<_validate_BytesRules, _validate_BytesRules__Output>; - DoubleRules: MessageTypeDefinition<_validate_DoubleRules, _validate_DoubleRules__Output>; - DurationRules: MessageTypeDefinition<_validate_DurationRules, _validate_DurationRules__Output>; - EnumRules: MessageTypeDefinition<_validate_EnumRules, _validate_EnumRules__Output>; - FieldRules: MessageTypeDefinition<_validate_FieldRules, _validate_FieldRules__Output>; - Fixed32Rules: MessageTypeDefinition<_validate_Fixed32Rules, _validate_Fixed32Rules__Output>; - Fixed64Rules: MessageTypeDefinition<_validate_Fixed64Rules, _validate_Fixed64Rules__Output>; - FloatRules: MessageTypeDefinition<_validate_FloatRules, _validate_FloatRules__Output>; - Int32Rules: MessageTypeDefinition<_validate_Int32Rules, _validate_Int32Rules__Output>; - Int64Rules: MessageTypeDefinition<_validate_Int64Rules, _validate_Int64Rules__Output>; - KnownRegex: EnumTypeDefinition; - MapRules: MessageTypeDefinition<_validate_MapRules, _validate_MapRules__Output>; - MessageRules: MessageTypeDefinition<_validate_MessageRules, _validate_MessageRules__Output>; - RepeatedRules: MessageTypeDefinition<_validate_RepeatedRules, _validate_RepeatedRules__Output>; - SFixed32Rules: MessageTypeDefinition<_validate_SFixed32Rules, _validate_SFixed32Rules__Output>; - SFixed64Rules: MessageTypeDefinition<_validate_SFixed64Rules, _validate_SFixed64Rules__Output>; - SInt32Rules: MessageTypeDefinition<_validate_SInt32Rules, _validate_SInt32Rules__Output>; - SInt64Rules: MessageTypeDefinition<_validate_SInt64Rules, _validate_SInt64Rules__Output>; - StringRules: MessageTypeDefinition<_validate_StringRules, _validate_StringRules__Output>; - TimestampRules: MessageTypeDefinition<_validate_TimestampRules, _validate_TimestampRules__Output>; - UInt32Rules: MessageTypeDefinition<_validate_UInt32Rules, _validate_UInt32Rules__Output>; - UInt64Rules: MessageTypeDefinition<_validate_UInt64Rules, _validate_UInt64Rules__Output>; - }; - xds: { - data: { - orca: { - v3: { - OrcaLoadReport: MessageTypeDefinition<_xds_data_orca_v3_OrcaLoadReport, _xds_data_orca_v3_OrcaLoadReport__Output>; - }; - }; - }; - service: { - orca: { - v3: { - /** - * Out-of-band (OOB) load reporting service for the additional load reporting - * agent that does not sit in the request path. Reports are periodically sampled - * with sufficient frequency to provide temporal association with requests. - * OOB reporting compensates the limitation of in-band reporting in revealing - * costs for backends that do not provide a steady stream of telemetry such as - * long running stream operations and zero QPS services. This is a server - * streaming service, client needs to terminate current RPC and initiate - * a new call to change backend reporting frequency. - */ - OpenRcaService: SubtypeConstructor & { - service: _xds_service_orca_v3_OpenRcaServiceDefinition; - }; - OrcaLoadReportRequest: MessageTypeDefinition<_xds_service_orca_v3_OrcaLoadReportRequest, _xds_service_orca_v3_OrcaLoadReportRequest__Output>; - }; - }; - }; - }; -} -export {}; diff --git a/node_modules/@grpc/grpc-js/build/src/generated/orca.js b/node_modules/@grpc/grpc-js/build/src/generated/orca.js deleted file mode 100644 index fd23d4e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/orca.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=orca.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/orca.js.map b/node_modules/@grpc/grpc-js/build/src/generated/orca.js.map deleted file mode 100644 index 5451d45..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/orca.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"orca.js","sourceRoot":"","sources":["../../../src/generated/orca.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.d.ts deleted file mode 100644 index 7d7ff8d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * AnyRules describe constraints applied exclusively to the - * `google.protobuf.Any` well-known type - */ -export interface AnyRules { - /** - * Required specifies that this field must be set - */ - 'required'?: (boolean); - /** - * In specifies that this field's `type_url` must be equal to one of the - * specified values. - */ - 'in'?: (string)[]; - /** - * NotIn specifies that this field's `type_url` must not be equal to any of - * the specified values. - */ - 'not_in'?: (string)[]; -} -/** - * AnyRules describe constraints applied exclusively to the - * `google.protobuf.Any` well-known type - */ -export interface AnyRules__Output { - /** - * Required specifies that this field must be set - */ - 'required': (boolean); - /** - * In specifies that this field's `type_url` must be equal to one of the - * specified values. - */ - 'in': (string)[]; - /** - * NotIn specifies that this field's `type_url` must not be equal to any of - * the specified values. - */ - 'not_in': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.js deleted file mode 100644 index 2d1e6ca..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=AnyRules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.js.map deleted file mode 100644 index 23bf70f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnyRules.js","sourceRoot":"","sources":["../../../../src/generated/validate/AnyRules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.d.ts deleted file mode 100644 index 3fed392..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * BoolRules describes the constraints applied to `bool` values - */ -export interface BoolRules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (boolean); -} -/** - * BoolRules describes the constraints applied to `bool` values - */ -export interface BoolRules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.js deleted file mode 100644 index 16b1b53..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=BoolRules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.js.map deleted file mode 100644 index 3222bae..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BoolRules.js","sourceRoot":"","sources":["../../../../src/generated/validate/BoolRules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.d.ts deleted file mode 100644 index b542026..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.d.ts +++ /dev/null @@ -1,149 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -/** - * BytesRules describe the constraints applied to `bytes` values - */ -export interface BytesRules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (Buffer | Uint8Array | string); - /** - * MinLen specifies that this field must be the specified number of bytes - * at a minimum - */ - 'min_len'?: (number | string | Long); - /** - * MaxLen specifies that this field must be the specified number of bytes - * at a maximum - */ - 'max_len'?: (number | string | Long); - /** - * Pattern specifes that this field must match against the specified - * regular expression (RE2 syntax). The included expression should elide - * any delimiters. - */ - 'pattern'?: (string); - /** - * Prefix specifies that this field must have the specified bytes at the - * beginning of the string. - */ - 'prefix'?: (Buffer | Uint8Array | string); - /** - * Suffix specifies that this field must have the specified bytes at the - * end of the string. - */ - 'suffix'?: (Buffer | Uint8Array | string); - /** - * Contains specifies that this field must have the specified bytes - * anywhere in the string. - */ - 'contains'?: (Buffer | Uint8Array | string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (Buffer | Uint8Array | string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (Buffer | Uint8Array | string)[]; - /** - * Ip specifies that the field must be a valid IP (v4 or v6) address in - * byte format - */ - 'ip'?: (boolean); - /** - * Ipv4 specifies that the field must be a valid IPv4 address in byte - * format - */ - 'ipv4'?: (boolean); - /** - * Ipv6 specifies that the field must be a valid IPv6 address in byte - * format - */ - 'ipv6'?: (boolean); - /** - * Len specifies that this field must be the specified number of bytes - */ - 'len'?: (number | string | Long); - /** - * WellKnown rules provide advanced constraints against common byte - * patterns - */ - 'well_known'?: "ip" | "ipv4" | "ipv6"; -} -/** - * BytesRules describe the constraints applied to `bytes` values - */ -export interface BytesRules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (Buffer); - /** - * MinLen specifies that this field must be the specified number of bytes - * at a minimum - */ - 'min_len': (string); - /** - * MaxLen specifies that this field must be the specified number of bytes - * at a maximum - */ - 'max_len': (string); - /** - * Pattern specifes that this field must match against the specified - * regular expression (RE2 syntax). The included expression should elide - * any delimiters. - */ - 'pattern': (string); - /** - * Prefix specifies that this field must have the specified bytes at the - * beginning of the string. - */ - 'prefix': (Buffer); - /** - * Suffix specifies that this field must have the specified bytes at the - * end of the string. - */ - 'suffix': (Buffer); - /** - * Contains specifies that this field must have the specified bytes - * anywhere in the string. - */ - 'contains': (Buffer); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (Buffer)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (Buffer)[]; - /** - * Ip specifies that the field must be a valid IP (v4 or v6) address in - * byte format - */ - 'ip'?: (boolean); - /** - * Ipv4 specifies that the field must be a valid IPv4 address in byte - * format - */ - 'ipv4'?: (boolean); - /** - * Ipv6 specifies that the field must be a valid IPv6 address in byte - * format - */ - 'ipv6'?: (boolean); - /** - * Len specifies that this field must be the specified number of bytes - */ - 'len': (string); - /** - * WellKnown rules provide advanced constraints against common byte - * patterns - */ - 'well_known'?: "ip" | "ipv4" | "ipv6"; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.js deleted file mode 100644 index a33075c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=BytesRules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.js.map deleted file mode 100644 index 40114fb..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BytesRules.js","sourceRoot":"","sources":["../../../../src/generated/validate/BytesRules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.d.ts deleted file mode 100644 index 973aa44..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * DoubleRules describes the constraints applied to `double` values - */ -export interface DoubleRules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number | string); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number | string); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number | string); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number | string); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number | string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number | string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number | string)[]; -} -/** - * DoubleRules describes the constraints applied to `double` values - */ -export interface DoubleRules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.js deleted file mode 100644 index 1e104ae..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=DoubleRules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.js.map deleted file mode 100644 index 1734270..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DoubleRules.js","sourceRoot":"","sources":["../../../../src/generated/validate/DoubleRules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.d.ts deleted file mode 100644 index c6b9351..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../google/protobuf/Duration'; -/** - * DurationRules describe the constraints applied exclusively to the - * `google.protobuf.Duration` well-known type - */ -export interface DurationRules { - /** - * Required specifies that this field must be set - */ - 'required'?: (boolean); - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (_google_protobuf_Duration | null); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (_google_protobuf_Duration | null); - /** - * Lt specifies that this field must be less than the specified value, - * inclusive - */ - 'lte'?: (_google_protobuf_Duration | null); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive - */ - 'gt'?: (_google_protobuf_Duration | null); - /** - * Gte specifies that this field must be greater than the specified value, - * inclusive - */ - 'gte'?: (_google_protobuf_Duration | null); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (_google_protobuf_Duration)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (_google_protobuf_Duration)[]; -} -/** - * DurationRules describe the constraints applied exclusively to the - * `google.protobuf.Duration` well-known type - */ -export interface DurationRules__Output { - /** - * Required specifies that this field must be set - */ - 'required': (boolean); - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (_google_protobuf_Duration__Output | null); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (_google_protobuf_Duration__Output | null); - /** - * Lt specifies that this field must be less than the specified value, - * inclusive - */ - 'lte': (_google_protobuf_Duration__Output | null); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive - */ - 'gt': (_google_protobuf_Duration__Output | null); - /** - * Gte specifies that this field must be greater than the specified value, - * inclusive - */ - 'gte': (_google_protobuf_Duration__Output | null); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (_google_protobuf_Duration__Output)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (_google_protobuf_Duration__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.js deleted file mode 100644 index afd338e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=DurationRules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.js.map deleted file mode 100644 index 7d18655..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DurationRules.js","sourceRoot":"","sources":["../../../../src/generated/validate/DurationRules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.d.ts deleted file mode 100644 index e6750d5..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * EnumRules describe the constraints applied to enum values - */ -export interface EnumRules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number); - /** - * DefinedOnly specifies that this field must be only one of the defined - * values for this enum, failing on any undefined value. - */ - 'defined_only'?: (boolean); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number)[]; -} -/** - * EnumRules describe the constraints applied to enum values - */ -export interface EnumRules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * DefinedOnly specifies that this field must be only one of the defined - * values for this enum, failing on any undefined value. - */ - 'defined_only': (boolean); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.js deleted file mode 100644 index 7532c8e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=EnumRules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.js.map deleted file mode 100644 index 4af04d4..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EnumRules.js","sourceRoot":"","sources":["../../../../src/generated/validate/EnumRules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.d.ts deleted file mode 100644 index 26faab8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -import type { FloatRules as _validate_FloatRules, FloatRules__Output as _validate_FloatRules__Output } from '../validate/FloatRules'; -import type { DoubleRules as _validate_DoubleRules, DoubleRules__Output as _validate_DoubleRules__Output } from '../validate/DoubleRules'; -import type { Int32Rules as _validate_Int32Rules, Int32Rules__Output as _validate_Int32Rules__Output } from '../validate/Int32Rules'; -import type { Int64Rules as _validate_Int64Rules, Int64Rules__Output as _validate_Int64Rules__Output } from '../validate/Int64Rules'; -import type { UInt32Rules as _validate_UInt32Rules, UInt32Rules__Output as _validate_UInt32Rules__Output } from '../validate/UInt32Rules'; -import type { UInt64Rules as _validate_UInt64Rules, UInt64Rules__Output as _validate_UInt64Rules__Output } from '../validate/UInt64Rules'; -import type { SInt32Rules as _validate_SInt32Rules, SInt32Rules__Output as _validate_SInt32Rules__Output } from '../validate/SInt32Rules'; -import type { SInt64Rules as _validate_SInt64Rules, SInt64Rules__Output as _validate_SInt64Rules__Output } from '../validate/SInt64Rules'; -import type { Fixed32Rules as _validate_Fixed32Rules, Fixed32Rules__Output as _validate_Fixed32Rules__Output } from '../validate/Fixed32Rules'; -import type { Fixed64Rules as _validate_Fixed64Rules, Fixed64Rules__Output as _validate_Fixed64Rules__Output } from '../validate/Fixed64Rules'; -import type { SFixed32Rules as _validate_SFixed32Rules, SFixed32Rules__Output as _validate_SFixed32Rules__Output } from '../validate/SFixed32Rules'; -import type { SFixed64Rules as _validate_SFixed64Rules, SFixed64Rules__Output as _validate_SFixed64Rules__Output } from '../validate/SFixed64Rules'; -import type { BoolRules as _validate_BoolRules, BoolRules__Output as _validate_BoolRules__Output } from '../validate/BoolRules'; -import type { StringRules as _validate_StringRules, StringRules__Output as _validate_StringRules__Output } from '../validate/StringRules'; -import type { BytesRules as _validate_BytesRules, BytesRules__Output as _validate_BytesRules__Output } from '../validate/BytesRules'; -import type { EnumRules as _validate_EnumRules, EnumRules__Output as _validate_EnumRules__Output } from '../validate/EnumRules'; -import type { MessageRules as _validate_MessageRules, MessageRules__Output as _validate_MessageRules__Output } from '../validate/MessageRules'; -import type { RepeatedRules as _validate_RepeatedRules, RepeatedRules__Output as _validate_RepeatedRules__Output } from '../validate/RepeatedRules'; -import type { MapRules as _validate_MapRules, MapRules__Output as _validate_MapRules__Output } from '../validate/MapRules'; -import type { AnyRules as _validate_AnyRules, AnyRules__Output as _validate_AnyRules__Output } from '../validate/AnyRules'; -import type { DurationRules as _validate_DurationRules, DurationRules__Output as _validate_DurationRules__Output } from '../validate/DurationRules'; -import type { TimestampRules as _validate_TimestampRules, TimestampRules__Output as _validate_TimestampRules__Output } from '../validate/TimestampRules'; -/** - * FieldRules encapsulates the rules for each type of field. Depending on the - * field, the correct set should be used to ensure proper validations. - */ -export interface FieldRules { - /** - * Scalar Field Types - */ - 'float'?: (_validate_FloatRules | null); - 'double'?: (_validate_DoubleRules | null); - 'int32'?: (_validate_Int32Rules | null); - 'int64'?: (_validate_Int64Rules | null); - 'uint32'?: (_validate_UInt32Rules | null); - 'uint64'?: (_validate_UInt64Rules | null); - 'sint32'?: (_validate_SInt32Rules | null); - 'sint64'?: (_validate_SInt64Rules | null); - 'fixed32'?: (_validate_Fixed32Rules | null); - 'fixed64'?: (_validate_Fixed64Rules | null); - 'sfixed32'?: (_validate_SFixed32Rules | null); - 'sfixed64'?: (_validate_SFixed64Rules | null); - 'bool'?: (_validate_BoolRules | null); - 'string'?: (_validate_StringRules | null); - 'bytes'?: (_validate_BytesRules | null); - /** - * Complex Field Types - */ - 'enum'?: (_validate_EnumRules | null); - 'message'?: (_validate_MessageRules | null); - 'repeated'?: (_validate_RepeatedRules | null); - 'map'?: (_validate_MapRules | null); - /** - * Well-Known Field Types - */ - 'any'?: (_validate_AnyRules | null); - 'duration'?: (_validate_DurationRules | null); - 'timestamp'?: (_validate_TimestampRules | null); - 'type'?: "float" | "double" | "int32" | "int64" | "uint32" | "uint64" | "sint32" | "sint64" | "fixed32" | "fixed64" | "sfixed32" | "sfixed64" | "bool" | "string" | "bytes" | "enum" | "repeated" | "map" | "any" | "duration" | "timestamp"; -} -/** - * FieldRules encapsulates the rules for each type of field. Depending on the - * field, the correct set should be used to ensure proper validations. - */ -export interface FieldRules__Output { - /** - * Scalar Field Types - */ - 'float'?: (_validate_FloatRules__Output | null); - 'double'?: (_validate_DoubleRules__Output | null); - 'int32'?: (_validate_Int32Rules__Output | null); - 'int64'?: (_validate_Int64Rules__Output | null); - 'uint32'?: (_validate_UInt32Rules__Output | null); - 'uint64'?: (_validate_UInt64Rules__Output | null); - 'sint32'?: (_validate_SInt32Rules__Output | null); - 'sint64'?: (_validate_SInt64Rules__Output | null); - 'fixed32'?: (_validate_Fixed32Rules__Output | null); - 'fixed64'?: (_validate_Fixed64Rules__Output | null); - 'sfixed32'?: (_validate_SFixed32Rules__Output | null); - 'sfixed64'?: (_validate_SFixed64Rules__Output | null); - 'bool'?: (_validate_BoolRules__Output | null); - 'string'?: (_validate_StringRules__Output | null); - 'bytes'?: (_validate_BytesRules__Output | null); - /** - * Complex Field Types - */ - 'enum'?: (_validate_EnumRules__Output | null); - 'message': (_validate_MessageRules__Output | null); - 'repeated'?: (_validate_RepeatedRules__Output | null); - 'map'?: (_validate_MapRules__Output | null); - /** - * Well-Known Field Types - */ - 'any'?: (_validate_AnyRules__Output | null); - 'duration'?: (_validate_DurationRules__Output | null); - 'timestamp'?: (_validate_TimestampRules__Output | null); - 'type'?: "float" | "double" | "int32" | "int64" | "uint32" | "uint64" | "sint32" | "sint64" | "fixed32" | "fixed64" | "sfixed32" | "sfixed64" | "bool" | "string" | "bytes" | "enum" | "repeated" | "map" | "any" | "duration" | "timestamp"; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.js deleted file mode 100644 index e6c39ec..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=FieldRules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.js.map deleted file mode 100644 index 8ed4b19..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FieldRules.js","sourceRoot":"","sources":["../../../../src/generated/validate/FieldRules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.d.ts deleted file mode 100644 index 688e2dd..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Fixed32Rules describes the constraints applied to `fixed32` values - */ -export interface Fixed32Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number)[]; -} -/** - * Fixed32Rules describes the constraints applied to `fixed32` values - */ -export interface Fixed32Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.js deleted file mode 100644 index da4f301..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Fixed32Rules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.js.map deleted file mode 100644 index b2f3a5c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Fixed32Rules.js","sourceRoot":"","sources":["../../../../src/generated/validate/Fixed32Rules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.d.ts deleted file mode 100644 index 6c84a9e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -/** - * Fixed64Rules describes the constraints applied to `fixed64` values - */ -export interface Fixed64Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number | string | Long); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number | string | Long); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number | string | Long); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number | string | Long); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number | string | Long); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number | string | Long)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number | string | Long)[]; -} -/** - * Fixed64Rules describes the constraints applied to `fixed64` values - */ -export interface Fixed64Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (string); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (string); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (string); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (string); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.js deleted file mode 100644 index 1b22d0c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Fixed64Rules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.js.map deleted file mode 100644 index 7f93808..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Fixed64Rules.js","sourceRoot":"","sources":["../../../../src/generated/validate/Fixed64Rules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.d.ts deleted file mode 100644 index c1cdaaf..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * FloatRules describes the constraints applied to `float` values - */ -export interface FloatRules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number | string); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number | string); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number | string); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number | string); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number | string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number | string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number | string)[]; -} -/** - * FloatRules describes the constraints applied to `float` values - */ -export interface FloatRules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.js deleted file mode 100644 index 6402268..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=FloatRules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.js.map deleted file mode 100644 index ac4ae7e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FloatRules.js","sourceRoot":"","sources":["../../../../src/generated/validate/FloatRules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.d.ts deleted file mode 100644 index e1010fc..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Int32Rules describes the constraints applied to `int32` values - */ -export interface Int32Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number)[]; -} -/** - * Int32Rules describes the constraints applied to `int32` values - */ -export interface Int32Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.js deleted file mode 100644 index 69a8264..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Int32Rules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.js.map deleted file mode 100644 index 83e7e94..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Int32Rules.js","sourceRoot":"","sources":["../../../../src/generated/validate/Int32Rules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.d.ts deleted file mode 100644 index 423c229..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -/** - * Int64Rules describes the constraints applied to `int64` values - */ -export interface Int64Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number | string | Long); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number | string | Long); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number | string | Long); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number | string | Long); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number | string | Long); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number | string | Long)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number | string | Long)[]; -} -/** - * Int64Rules describes the constraints applied to `int64` values - */ -export interface Int64Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (string); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (string); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (string); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (string); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.js deleted file mode 100644 index 93797e9..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Int64Rules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.js.map deleted file mode 100644 index 5d632a3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Int64Rules.js","sourceRoot":"","sources":["../../../../src/generated/validate/Int64Rules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.d.ts deleted file mode 100644 index 8af850b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * WellKnownRegex contain some well-known patterns. - */ -export declare const KnownRegex: { - readonly UNKNOWN: "UNKNOWN"; - /** - * HTTP header name as defined by RFC 7230. - */ - readonly HTTP_HEADER_NAME: "HTTP_HEADER_NAME"; - /** - * HTTP header value as defined by RFC 7230. - */ - readonly HTTP_HEADER_VALUE: "HTTP_HEADER_VALUE"; -}; -/** - * WellKnownRegex contain some well-known patterns. - */ -export type KnownRegex = 'UNKNOWN' | 0 -/** - * HTTP header name as defined by RFC 7230. - */ - | 'HTTP_HEADER_NAME' | 1 -/** - * HTTP header value as defined by RFC 7230. - */ - | 'HTTP_HEADER_VALUE' | 2; -/** - * WellKnownRegex contain some well-known patterns. - */ -export type KnownRegex__Output = typeof KnownRegex[keyof typeof KnownRegex]; diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.js deleted file mode 100644 index 5431991..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -exports.KnownRegex = void 0; -/** - * WellKnownRegex contain some well-known patterns. - */ -exports.KnownRegex = { - UNKNOWN: 'UNKNOWN', - /** - * HTTP header name as defined by RFC 7230. - */ - HTTP_HEADER_NAME: 'HTTP_HEADER_NAME', - /** - * HTTP header value as defined by RFC 7230. - */ - HTTP_HEADER_VALUE: 'HTTP_HEADER_VALUE', -}; -//# sourceMappingURL=KnownRegex.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.js.map deleted file mode 100644 index b00a48f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"KnownRegex.js","sourceRoot":"","sources":["../../../../src/generated/validate/KnownRegex.ts"],"names":[],"mappings":";AAAA,mEAAmE;;;AAEnE;;GAEG;AACU,QAAA,UAAU,GAAG;IACxB,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;IACpC;;OAEG;IACH,iBAAiB,EAAE,mBAAmB;CAC9B,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.d.ts deleted file mode 100644 index d5afb2e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -import type { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from '../validate/FieldRules'; -import type { Long } from '@grpc/proto-loader'; -/** - * MapRules describe the constraints applied to `map` values - */ -export interface MapRules { - /** - * MinPairs specifies that this field must have the specified number of - * KVs at a minimum - */ - 'min_pairs'?: (number | string | Long); - /** - * MaxPairs specifies that this field must have the specified number of - * KVs at a maximum - */ - 'max_pairs'?: (number | string | Long); - /** - * NoSparse specifies values in this field cannot be unset. This only - * applies to map's with message value types. - */ - 'no_sparse'?: (boolean); - /** - * Keys specifies the constraints to be applied to each key in the field. - */ - 'keys'?: (_validate_FieldRules | null); - /** - * Values specifies the constraints to be applied to the value of each key - * in the field. Message values will still have their validations evaluated - * unless skip is specified here. - */ - 'values'?: (_validate_FieldRules | null); -} -/** - * MapRules describe the constraints applied to `map` values - */ -export interface MapRules__Output { - /** - * MinPairs specifies that this field must have the specified number of - * KVs at a minimum - */ - 'min_pairs': (string); - /** - * MaxPairs specifies that this field must have the specified number of - * KVs at a maximum - */ - 'max_pairs': (string); - /** - * NoSparse specifies values in this field cannot be unset. This only - * applies to map's with message value types. - */ - 'no_sparse': (boolean); - /** - * Keys specifies the constraints to be applied to each key in the field. - */ - 'keys': (_validate_FieldRules__Output | null); - /** - * Values specifies the constraints to be applied to the value of each key - * in the field. Message values will still have their validations evaluated - * unless skip is specified here. - */ - 'values': (_validate_FieldRules__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.js deleted file mode 100644 index cf32fd8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=MapRules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.js.map deleted file mode 100644 index 12d3ae7..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MapRules.js","sourceRoot":"","sources":["../../../../src/generated/validate/MapRules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.d.ts deleted file mode 100644 index a8b48b9..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * MessageRules describe the constraints applied to embedded message values. - * For message-type fields, validation is performed recursively. - */ -export interface MessageRules { - /** - * Skip specifies that the validation rules of this field should not be - * evaluated - */ - 'skip'?: (boolean); - /** - * Required specifies that this field must be set - */ - 'required'?: (boolean); -} -/** - * MessageRules describe the constraints applied to embedded message values. - * For message-type fields, validation is performed recursively. - */ -export interface MessageRules__Output { - /** - * Skip specifies that the validation rules of this field should not be - * evaluated - */ - 'skip': (boolean); - /** - * Required specifies that this field must be set - */ - 'required': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.js deleted file mode 100644 index f54cd2f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=MessageRules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.js.map deleted file mode 100644 index 1e7bdba..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MessageRules.js","sourceRoot":"","sources":["../../../../src/generated/validate/MessageRules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.d.ts deleted file mode 100644 index d7e7f37..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from '../validate/FieldRules'; -import type { Long } from '@grpc/proto-loader'; -/** - * RepeatedRules describe the constraints applied to `repeated` values - */ -export interface RepeatedRules { - /** - * MinItems specifies that this field must have the specified number of - * items at a minimum - */ - 'min_items'?: (number | string | Long); - /** - * MaxItems specifies that this field must have the specified number of - * items at a maximum - */ - 'max_items'?: (number | string | Long); - /** - * Unique specifies that all elements in this field must be unique. This - * contraint is only applicable to scalar and enum types (messages are not - * supported). - */ - 'unique'?: (boolean); - /** - * Items specifies the contraints to be applied to each item in the field. - * Repeated message fields will still execute validation against each item - * unless skip is specified here. - */ - 'items'?: (_validate_FieldRules | null); -} -/** - * RepeatedRules describe the constraints applied to `repeated` values - */ -export interface RepeatedRules__Output { - /** - * MinItems specifies that this field must have the specified number of - * items at a minimum - */ - 'min_items': (string); - /** - * MaxItems specifies that this field must have the specified number of - * items at a maximum - */ - 'max_items': (string); - /** - * Unique specifies that all elements in this field must be unique. This - * contraint is only applicable to scalar and enum types (messages are not - * supported). - */ - 'unique': (boolean); - /** - * Items specifies the contraints to be applied to each item in the field. - * Repeated message fields will still execute validation against each item - * unless skip is specified here. - */ - 'items': (_validate_FieldRules__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.js deleted file mode 100644 index 1a9bf34..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=RepeatedRules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.js.map deleted file mode 100644 index 74fbaa1..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RepeatedRules.js","sourceRoot":"","sources":["../../../../src/generated/validate/RepeatedRules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.d.ts deleted file mode 100644 index d2014d3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * SFixed32Rules describes the constraints applied to `sfixed32` values - */ -export interface SFixed32Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number)[]; -} -/** - * SFixed32Rules describes the constraints applied to `sfixed32` values - */ -export interface SFixed32Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.js deleted file mode 100644 index a07d027..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=SFixed32Rules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.js.map deleted file mode 100644 index df8f6d0..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SFixed32Rules.js","sourceRoot":"","sources":["../../../../src/generated/validate/SFixed32Rules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.d.ts deleted file mode 100644 index fbbce08..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -/** - * SFixed64Rules describes the constraints applied to `sfixed64` values - */ -export interface SFixed64Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number | string | Long); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number | string | Long); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number | string | Long); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number | string | Long); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number | string | Long); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number | string | Long)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number | string | Long)[]; -} -/** - * SFixed64Rules describes the constraints applied to `sfixed64` values - */ -export interface SFixed64Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (string); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (string); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (string); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (string); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.js deleted file mode 100644 index ef129da..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=SFixed64Rules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.js.map deleted file mode 100644 index 8c118fd..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SFixed64Rules.js","sourceRoot":"","sources":["../../../../src/generated/validate/SFixed64Rules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.d.ts deleted file mode 100644 index 12db298..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * SInt32Rules describes the constraints applied to `sint32` values - */ -export interface SInt32Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number)[]; -} -/** - * SInt32Rules describes the constraints applied to `sint32` values - */ -export interface SInt32Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.js deleted file mode 100644 index 76f2858..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=SInt32Rules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.js.map deleted file mode 100644 index b81fc7f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SInt32Rules.js","sourceRoot":"","sources":["../../../../src/generated/validate/SInt32Rules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.d.ts deleted file mode 100644 index 90203d9..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -/** - * SInt64Rules describes the constraints applied to `sint64` values - */ -export interface SInt64Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number | string | Long); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number | string | Long); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number | string | Long); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number | string | Long); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number | string | Long); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number | string | Long)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number | string | Long)[]; -} -/** - * SInt64Rules describes the constraints applied to `sint64` values - */ -export interface SInt64Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (string); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (string); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (string); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (string); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.js deleted file mode 100644 index 0c5c333..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=SInt64Rules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.js.map deleted file mode 100644 index 9641f9e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SInt64Rules.js","sourceRoot":"","sources":["../../../../src/generated/validate/SInt64Rules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.d.ts deleted file mode 100644 index cef14ce..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.d.ts +++ /dev/null @@ -1,284 +0,0 @@ -import type { KnownRegex as _validate_KnownRegex, KnownRegex__Output as _validate_KnownRegex__Output } from '../validate/KnownRegex'; -import type { Long } from '@grpc/proto-loader'; -/** - * StringRules describe the constraints applied to `string` values - */ -export interface StringRules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (string); - /** - * MinLen specifies that this field must be the specified number of - * characters (Unicode code points) at a minimum. Note that the number of - * characters may differ from the number of bytes in the string. - */ - 'min_len'?: (number | string | Long); - /** - * MaxLen specifies that this field must be the specified number of - * characters (Unicode code points) at a maximum. Note that the number of - * characters may differ from the number of bytes in the string. - */ - 'max_len'?: (number | string | Long); - /** - * MinBytes specifies that this field must be the specified number of bytes - * at a minimum - */ - 'min_bytes'?: (number | string | Long); - /** - * MaxBytes specifies that this field must be the specified number of bytes - * at a maximum - */ - 'max_bytes'?: (number | string | Long); - /** - * Pattern specifes that this field must match against the specified - * regular expression (RE2 syntax). The included expression should elide - * any delimiters. - */ - 'pattern'?: (string); - /** - * Prefix specifies that this field must have the specified substring at - * the beginning of the string. - */ - 'prefix'?: (string); - /** - * Suffix specifies that this field must have the specified substring at - * the end of the string. - */ - 'suffix'?: (string); - /** - * Contains specifies that this field must have the specified substring - * anywhere in the string. - */ - 'contains'?: (string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (string)[]; - /** - * Email specifies that the field must be a valid email address as - * defined by RFC 5322 - */ - 'email'?: (boolean); - /** - * Hostname specifies that the field must be a valid hostname as - * defined by RFC 1034. This constraint does not support - * internationalized domain names (IDNs). - */ - 'hostname'?: (boolean); - /** - * Ip specifies that the field must be a valid IP (v4 or v6) address. - * Valid IPv6 addresses should not include surrounding square brackets. - */ - 'ip'?: (boolean); - /** - * Ipv4 specifies that the field must be a valid IPv4 address. - */ - 'ipv4'?: (boolean); - /** - * Ipv6 specifies that the field must be a valid IPv6 address. Valid - * IPv6 addresses should not include surrounding square brackets. - */ - 'ipv6'?: (boolean); - /** - * Uri specifies that the field must be a valid, absolute URI as defined - * by RFC 3986 - */ - 'uri'?: (boolean); - /** - * UriRef specifies that the field must be a valid URI as defined by RFC - * 3986 and may be relative or absolute. - */ - 'uri_ref'?: (boolean); - /** - * Len specifies that this field must be the specified number of - * characters (Unicode code points). Note that the number of - * characters may differ from the number of bytes in the string. - */ - 'len'?: (number | string | Long); - /** - * LenBytes specifies that this field must be the specified number of bytes - * at a minimum - */ - 'len_bytes'?: (number | string | Long); - /** - * Address specifies that the field must be either a valid hostname as - * defined by RFC 1034 (which does not support internationalized domain - * names or IDNs), or it can be a valid IP (v4 or v6). - */ - 'address'?: (boolean); - /** - * Uuid specifies that the field must be a valid UUID as defined by - * RFC 4122 - */ - 'uuid'?: (boolean); - /** - * NotContains specifies that this field cannot have the specified substring - * anywhere in the string. - */ - 'not_contains'?: (string); - /** - * WellKnownRegex specifies a common well known pattern defined as a regex. - */ - 'well_known_regex'?: (_validate_KnownRegex); - /** - * This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable - * strict header validation. - * By default, this is true, and HTTP header validations are RFC-compliant. - * Setting to false will enable a looser validations that only disallows - * \r\n\0 characters, which can be used to bypass header matching rules. - */ - 'strict'?: (boolean); - /** - * WellKnown rules provide advanced constraints against common string - * patterns - */ - 'well_known'?: "email" | "hostname" | "ip" | "ipv4" | "ipv6" | "uri" | "uri_ref" | "address" | "uuid" | "well_known_regex"; -} -/** - * StringRules describe the constraints applied to `string` values - */ -export interface StringRules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (string); - /** - * MinLen specifies that this field must be the specified number of - * characters (Unicode code points) at a minimum. Note that the number of - * characters may differ from the number of bytes in the string. - */ - 'min_len': (string); - /** - * MaxLen specifies that this field must be the specified number of - * characters (Unicode code points) at a maximum. Note that the number of - * characters may differ from the number of bytes in the string. - */ - 'max_len': (string); - /** - * MinBytes specifies that this field must be the specified number of bytes - * at a minimum - */ - 'min_bytes': (string); - /** - * MaxBytes specifies that this field must be the specified number of bytes - * at a maximum - */ - 'max_bytes': (string); - /** - * Pattern specifes that this field must match against the specified - * regular expression (RE2 syntax). The included expression should elide - * any delimiters. - */ - 'pattern': (string); - /** - * Prefix specifies that this field must have the specified substring at - * the beginning of the string. - */ - 'prefix': (string); - /** - * Suffix specifies that this field must have the specified substring at - * the end of the string. - */ - 'suffix': (string); - /** - * Contains specifies that this field must have the specified substring - * anywhere in the string. - */ - 'contains': (string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (string)[]; - /** - * Email specifies that the field must be a valid email address as - * defined by RFC 5322 - */ - 'email'?: (boolean); - /** - * Hostname specifies that the field must be a valid hostname as - * defined by RFC 1034. This constraint does not support - * internationalized domain names (IDNs). - */ - 'hostname'?: (boolean); - /** - * Ip specifies that the field must be a valid IP (v4 or v6) address. - * Valid IPv6 addresses should not include surrounding square brackets. - */ - 'ip'?: (boolean); - /** - * Ipv4 specifies that the field must be a valid IPv4 address. - */ - 'ipv4'?: (boolean); - /** - * Ipv6 specifies that the field must be a valid IPv6 address. Valid - * IPv6 addresses should not include surrounding square brackets. - */ - 'ipv6'?: (boolean); - /** - * Uri specifies that the field must be a valid, absolute URI as defined - * by RFC 3986 - */ - 'uri'?: (boolean); - /** - * UriRef specifies that the field must be a valid URI as defined by RFC - * 3986 and may be relative or absolute. - */ - 'uri_ref'?: (boolean); - /** - * Len specifies that this field must be the specified number of - * characters (Unicode code points). Note that the number of - * characters may differ from the number of bytes in the string. - */ - 'len': (string); - /** - * LenBytes specifies that this field must be the specified number of bytes - * at a minimum - */ - 'len_bytes': (string); - /** - * Address specifies that the field must be either a valid hostname as - * defined by RFC 1034 (which does not support internationalized domain - * names or IDNs), or it can be a valid IP (v4 or v6). - */ - 'address'?: (boolean); - /** - * Uuid specifies that the field must be a valid UUID as defined by - * RFC 4122 - */ - 'uuid'?: (boolean); - /** - * NotContains specifies that this field cannot have the specified substring - * anywhere in the string. - */ - 'not_contains': (string); - /** - * WellKnownRegex specifies a common well known pattern defined as a regex. - */ - 'well_known_regex'?: (_validate_KnownRegex__Output); - /** - * This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable - * strict header validation. - * By default, this is true, and HTTP header validations are RFC-compliant. - * Setting to false will enable a looser validations that only disallows - * \r\n\0 characters, which can be used to bypass header matching rules. - */ - 'strict': (boolean); - /** - * WellKnown rules provide advanced constraints against common string - * patterns - */ - 'well_known'?: "email" | "hostname" | "ip" | "ipv4" | "ipv6" | "uri" | "uri_ref" | "address" | "uuid" | "well_known_regex"; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.js deleted file mode 100644 index 0a64d7b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=StringRules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.js.map deleted file mode 100644 index 5d1e033..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StringRules.js","sourceRoot":"","sources":["../../../../src/generated/validate/StringRules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.d.ts deleted file mode 100644 index 6919a4a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../google/protobuf/Timestamp'; -import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../google/protobuf/Duration'; -/** - * TimestampRules describe the constraints applied exclusively to the - * `google.protobuf.Timestamp` well-known type - */ -export interface TimestampRules { - /** - * Required specifies that this field must be set - */ - 'required'?: (boolean); - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (_google_protobuf_Timestamp | null); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (_google_protobuf_Timestamp | null); - /** - * Lte specifies that this field must be less than the specified value, - * inclusive - */ - 'lte'?: (_google_protobuf_Timestamp | null); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive - */ - 'gt'?: (_google_protobuf_Timestamp | null); - /** - * Gte specifies that this field must be greater than the specified value, - * inclusive - */ - 'gte'?: (_google_protobuf_Timestamp | null); - /** - * LtNow specifies that this must be less than the current time. LtNow - * can only be used with the Within rule. - */ - 'lt_now'?: (boolean); - /** - * GtNow specifies that this must be greater than the current time. GtNow - * can only be used with the Within rule. - */ - 'gt_now'?: (boolean); - /** - * Within specifies that this field must be within this duration of the - * current time. This constraint can be used alone or with the LtNow and - * GtNow rules. - */ - 'within'?: (_google_protobuf_Duration | null); -} -/** - * TimestampRules describe the constraints applied exclusively to the - * `google.protobuf.Timestamp` well-known type - */ -export interface TimestampRules__Output { - /** - * Required specifies that this field must be set - */ - 'required': (boolean); - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (_google_protobuf_Timestamp__Output | null); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (_google_protobuf_Timestamp__Output | null); - /** - * Lte specifies that this field must be less than the specified value, - * inclusive - */ - 'lte': (_google_protobuf_Timestamp__Output | null); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive - */ - 'gt': (_google_protobuf_Timestamp__Output | null); - /** - * Gte specifies that this field must be greater than the specified value, - * inclusive - */ - 'gte': (_google_protobuf_Timestamp__Output | null); - /** - * LtNow specifies that this must be less than the current time. LtNow - * can only be used with the Within rule. - */ - 'lt_now': (boolean); - /** - * GtNow specifies that this must be greater than the current time. GtNow - * can only be used with the Within rule. - */ - 'gt_now': (boolean); - /** - * Within specifies that this field must be within this duration of the - * current time. This constraint can be used alone or with the LtNow and - * GtNow rules. - */ - 'within': (_google_protobuf_Duration__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.js deleted file mode 100644 index 4668d53..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=TimestampRules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.js.map deleted file mode 100644 index f06278f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TimestampRules.js","sourceRoot":"","sources":["../../../../src/generated/validate/TimestampRules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.d.ts deleted file mode 100644 index 68d6d77..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * UInt32Rules describes the constraints applied to `uint32` values - */ -export interface UInt32Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number)[]; -} -/** - * UInt32Rules describes the constraints applied to `uint32` values - */ -export interface UInt32Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.js deleted file mode 100644 index a447f24..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=UInt32Rules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.js.map deleted file mode 100644 index 5bbb825..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UInt32Rules.js","sourceRoot":"","sources":["../../../../src/generated/validate/UInt32Rules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.d.ts deleted file mode 100644 index c0da066..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -/** - * UInt64Rules describes the constraints applied to `uint64` values - */ -export interface UInt64Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number | string | Long); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number | string | Long); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number | string | Long); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number | string | Long); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number | string | Long); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number | string | Long)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number | string | Long)[]; -} -/** - * UInt64Rules describes the constraints applied to `uint64` values - */ -export interface UInt64Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (string); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (string); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (string); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (string); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.js b/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.js deleted file mode 100644 index 381e3e1..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/protoc-gen-validate/validate/validate.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=UInt64Rules.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.js.map b/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.js.map deleted file mode 100644 index ee77fc4..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UInt64Rules.js","sourceRoot":"","sources":["../../../../src/generated/validate/UInt64Rules.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.d.ts deleted file mode 100644 index 758a270..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.d.ts +++ /dev/null @@ -1,121 +0,0 @@ -import type { Long } from '@grpc/proto-loader'; -export interface OrcaLoadReport { - /** - * CPU utilization expressed as a fraction of available CPU resources. This - * should be derived from the latest sample or measurement. The value may be - * larger than 1.0 when the usage exceeds the reporter dependent notion of - * soft limits. - */ - 'cpu_utilization'?: (number | string); - /** - * Memory utilization expressed as a fraction of available memory - * resources. This should be derived from the latest sample or measurement. - */ - 'mem_utilization'?: (number | string); - /** - * Total RPS being served by an endpoint. This should cover all services that an endpoint is - * responsible for. - * Deprecated -- use ``rps_fractional`` field instead. - * @deprecated - */ - 'rps'?: (number | string | Long); - /** - * Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of - * storage) associated with the request. - */ - 'request_cost'?: ({ - [key: string]: number | string; - }); - /** - * Resource utilization values. Each value is expressed as a fraction of total resources - * available, derived from the latest sample or measurement. - */ - 'utilization'?: ({ - [key: string]: number | string; - }); - /** - * Total RPS being served by an endpoint. This should cover all services that an endpoint is - * responsible for. - */ - 'rps_fractional'?: (number | string); - /** - * Total EPS (errors/second) being served by an endpoint. This should cover - * all services that an endpoint is responsible for. - */ - 'eps'?: (number | string); - /** - * Application specific opaque metrics. - */ - 'named_metrics'?: ({ - [key: string]: number | string; - }); - /** - * Application specific utilization expressed as a fraction of available - * resources. For example, an application may report the max of CPU and memory - * utilization for better load balancing if it is both CPU and memory bound. - * This should be derived from the latest sample or measurement. - * The value may be larger than 1.0 when the usage exceeds the reporter - * dependent notion of soft limits. - */ - 'application_utilization'?: (number | string); -} -export interface OrcaLoadReport__Output { - /** - * CPU utilization expressed as a fraction of available CPU resources. This - * should be derived from the latest sample or measurement. The value may be - * larger than 1.0 when the usage exceeds the reporter dependent notion of - * soft limits. - */ - 'cpu_utilization': (number); - /** - * Memory utilization expressed as a fraction of available memory - * resources. This should be derived from the latest sample or measurement. - */ - 'mem_utilization': (number); - /** - * Total RPS being served by an endpoint. This should cover all services that an endpoint is - * responsible for. - * Deprecated -- use ``rps_fractional`` field instead. - * @deprecated - */ - 'rps': (string); - /** - * Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of - * storage) associated with the request. - */ - 'request_cost': ({ - [key: string]: number; - }); - /** - * Resource utilization values. Each value is expressed as a fraction of total resources - * available, derived from the latest sample or measurement. - */ - 'utilization': ({ - [key: string]: number; - }); - /** - * Total RPS being served by an endpoint. This should cover all services that an endpoint is - * responsible for. - */ - 'rps_fractional': (number); - /** - * Total EPS (errors/second) being served by an endpoint. This should cover - * all services that an endpoint is responsible for. - */ - 'eps': (number); - /** - * Application specific opaque metrics. - */ - 'named_metrics': ({ - [key: string]: number; - }); - /** - * Application specific utilization expressed as a fraction of available - * resources. For example, an application may report the max of CPU and memory - * utilization for better load balancing if it is both CPU and memory bound. - * This should be derived from the latest sample or measurement. - * The value may be larger than 1.0 when the usage exceeds the reporter - * dependent notion of soft limits. - */ - 'application_utilization': (number); -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.js b/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.js deleted file mode 100644 index ca275f3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/xds/xds/data/orca/v3/orca_load_report.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=OrcaLoadReport.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.js.map b/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.js.map deleted file mode 100644 index 619fad8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrcaLoadReport.js","sourceRoot":"","sources":["../../../../../../../src/generated/xds/data/orca/v3/OrcaLoadReport.ts"],"names":[],"mappings":";AAAA,mEAAmE"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.d.ts deleted file mode 100644 index 0d3fd0b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type * as grpc from '../../../../../index'; -import type { MethodDefinition } from '@grpc/proto-loader'; -import type { OrcaLoadReport as _xds_data_orca_v3_OrcaLoadReport, OrcaLoadReport__Output as _xds_data_orca_v3_OrcaLoadReport__Output } from '../../../../xds/data/orca/v3/OrcaLoadReport'; -import type { OrcaLoadReportRequest as _xds_service_orca_v3_OrcaLoadReportRequest, OrcaLoadReportRequest__Output as _xds_service_orca_v3_OrcaLoadReportRequest__Output } from '../../../../xds/service/orca/v3/OrcaLoadReportRequest'; -/** - * Out-of-band (OOB) load reporting service for the additional load reporting - * agent that does not sit in the request path. Reports are periodically sampled - * with sufficient frequency to provide temporal association with requests. - * OOB reporting compensates the limitation of in-band reporting in revealing - * costs for backends that do not provide a steady stream of telemetry such as - * long running stream operations and zero QPS services. This is a server - * streaming service, client needs to terminate current RPC and initiate - * a new call to change backend reporting frequency. - */ -export interface OpenRcaServiceClient extends grpc.Client { - StreamCoreMetrics(argument: _xds_service_orca_v3_OrcaLoadReportRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_xds_data_orca_v3_OrcaLoadReport__Output>; - StreamCoreMetrics(argument: _xds_service_orca_v3_OrcaLoadReportRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<_xds_data_orca_v3_OrcaLoadReport__Output>; - streamCoreMetrics(argument: _xds_service_orca_v3_OrcaLoadReportRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_xds_data_orca_v3_OrcaLoadReport__Output>; - streamCoreMetrics(argument: _xds_service_orca_v3_OrcaLoadReportRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<_xds_data_orca_v3_OrcaLoadReport__Output>; -} -/** - * Out-of-band (OOB) load reporting service for the additional load reporting - * agent that does not sit in the request path. Reports are periodically sampled - * with sufficient frequency to provide temporal association with requests. - * OOB reporting compensates the limitation of in-band reporting in revealing - * costs for backends that do not provide a steady stream of telemetry such as - * long running stream operations and zero QPS services. This is a server - * streaming service, client needs to terminate current RPC and initiate - * a new call to change backend reporting frequency. - */ -export interface OpenRcaServiceHandlers extends grpc.UntypedServiceImplementation { - StreamCoreMetrics: grpc.handleServerStreamingCall<_xds_service_orca_v3_OrcaLoadReportRequest__Output, _xds_data_orca_v3_OrcaLoadReport>; -} -export interface OpenRcaServiceDefinition extends grpc.ServiceDefinition { - StreamCoreMetrics: MethodDefinition<_xds_service_orca_v3_OrcaLoadReportRequest, _xds_data_orca_v3_OrcaLoadReport, _xds_service_orca_v3_OrcaLoadReportRequest__Output, _xds_data_orca_v3_OrcaLoadReport__Output>; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.js b/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.js deleted file mode 100644 index fea4f9e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/xds/xds/service/orca/v3/orca.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=OpenRcaService.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.js.map b/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.js.map deleted file mode 100644 index d5c32c8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OpenRcaService.js","sourceRoot":"","sources":["../../../../../../../src/generated/xds/service/orca/v3/OpenRcaService.ts"],"names":[],"mappings":";AAAA,0DAA0D"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.d.ts b/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.d.ts deleted file mode 100644 index 2c83eff..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; -export interface OrcaLoadReportRequest { - /** - * Interval for generating Open RCA core metric responses. - */ - 'report_interval'?: (_google_protobuf_Duration | null); - /** - * Request costs to collect. If this is empty, all known requests costs tracked by - * the load reporting agent will be returned. This provides an opportunity for - * the client to selectively obtain a subset of tracked costs. - */ - 'request_cost_names'?: (string)[]; -} -export interface OrcaLoadReportRequest__Output { - /** - * Interval for generating Open RCA core metric responses. - */ - 'report_interval': (_google_protobuf_Duration__Output | null); - /** - * Request costs to collect. If this is empty, all known requests costs tracked by - * the load reporting agent will be returned. This provides an opportunity for - * the client to selectively obtain a subset of tracked costs. - */ - 'request_cost_names': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.js b/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.js deleted file mode 100644 index bd89fd0..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -// Original file: proto/xds/xds/service/orca/v3/orca.proto -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=OrcaLoadReportRequest.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.js.map b/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.js.map deleted file mode 100644 index b7b7862..0000000 --- a/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrcaLoadReportRequest.js","sourceRoot":"","sources":["../../../../../../../src/generated/xds/service/orca/v3/OrcaLoadReportRequest.ts"],"names":[],"mappings":";AAAA,0DAA0D"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/http_proxy.d.ts b/node_modules/@grpc/grpc-js/build/src/http_proxy.d.ts deleted file mode 100644 index 29a97a4..0000000 --- a/node_modules/@grpc/grpc-js/build/src/http_proxy.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Socket } from 'net'; -import { SubchannelAddress } from './subchannel-address'; -import { ChannelOptions } from './channel-options'; -import { GrpcUri } from './uri-parser'; -interface CIDRNotation { - ip: number; - prefixLength: number; -} -export declare function parseCIDR(cidrString: string): CIDRNotation | null; -export interface ProxyMapResult { - target: GrpcUri; - extraOptions: ChannelOptions; -} -export declare function mapProxyName(target: GrpcUri, options: ChannelOptions): ProxyMapResult; -export declare function getProxiedConnection(address: SubchannelAddress, channelOptions: ChannelOptions): Promise; -export {}; diff --git a/node_modules/@grpc/grpc-js/build/src/http_proxy.js b/node_modules/@grpc/grpc-js/build/src/http_proxy.js deleted file mode 100644 index 114017c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/http_proxy.js +++ /dev/null @@ -1,274 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseCIDR = parseCIDR; -exports.mapProxyName = mapProxyName; -exports.getProxiedConnection = getProxiedConnection; -const logging_1 = require("./logging"); -const constants_1 = require("./constants"); -const net_1 = require("net"); -const http = require("http"); -const logging = require("./logging"); -const subchannel_address_1 = require("./subchannel-address"); -const uri_parser_1 = require("./uri-parser"); -const url_1 = require("url"); -const resolver_dns_1 = require("./resolver-dns"); -const TRACER_NAME = 'proxy'; -function trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text); -} -function getProxyInfo() { - let proxyEnv = ''; - let envVar = ''; - /* Prefer using 'grpc_proxy'. Fallback on 'http_proxy' if it is not set. - * Also prefer using 'https_proxy' with fallback on 'http_proxy'. The - * fallback behavior can be removed if there's a demand for it. - */ - if (process.env.grpc_proxy) { - envVar = 'grpc_proxy'; - proxyEnv = process.env.grpc_proxy; - } - else if (process.env.https_proxy) { - envVar = 'https_proxy'; - proxyEnv = process.env.https_proxy; - } - else if (process.env.http_proxy) { - envVar = 'http_proxy'; - proxyEnv = process.env.http_proxy; - } - else { - return {}; - } - let proxyUrl; - try { - proxyUrl = new url_1.URL(proxyEnv); - } - catch (e) { - (0, logging_1.log)(constants_1.LogVerbosity.ERROR, `cannot parse value of "${envVar}" env var`); - return {}; - } - if (proxyUrl.protocol !== 'http:') { - (0, logging_1.log)(constants_1.LogVerbosity.ERROR, `"${proxyUrl.protocol}" scheme not supported in proxy URI`); - return {}; - } - let userCred = null; - if (proxyUrl.username) { - if (proxyUrl.password) { - (0, logging_1.log)(constants_1.LogVerbosity.INFO, 'userinfo found in proxy URI'); - userCred = decodeURIComponent(`${proxyUrl.username}:${proxyUrl.password}`); - } - else { - userCred = proxyUrl.username; - } - } - const hostname = proxyUrl.hostname; - let port = proxyUrl.port; - /* The proxy URL uses the scheme "http:", which has a default port number of - * 80. We need to set that explicitly here if it is omitted because otherwise - * it will use gRPC's default port 443. */ - if (port === '') { - port = '80'; - } - const result = { - address: `${hostname}:${port}`, - }; - if (userCred) { - result.creds = userCred; - } - trace('Proxy server ' + result.address + ' set by environment variable ' + envVar); - return result; -} -function getNoProxyHostList() { - /* Prefer using 'no_grpc_proxy'. Fallback on 'no_proxy' if it is not set. */ - let noProxyStr = process.env.no_grpc_proxy; - let envVar = 'no_grpc_proxy'; - if (!noProxyStr) { - noProxyStr = process.env.no_proxy; - envVar = 'no_proxy'; - } - if (noProxyStr) { - trace('No proxy server list set by environment variable ' + envVar); - return noProxyStr.split(','); - } - else { - return []; - } -} -/* - * The groups correspond to CIDR parts as follows: - * 1. ip - * 2. prefixLength - */ -function parseCIDR(cidrString) { - const splitRange = cidrString.split('/'); - if (splitRange.length !== 2) { - return null; - } - const prefixLength = parseInt(splitRange[1], 10); - if (!(0, net_1.isIPv4)(splitRange[0]) || Number.isNaN(prefixLength) || prefixLength < 0 || prefixLength > 32) { - return null; - } - return { - ip: ipToInt(splitRange[0]), - prefixLength: prefixLength - }; -} -function ipToInt(ip) { - return ip.split(".").reduce((acc, octet) => (acc << 8) + parseInt(octet, 10), 0); -} -function isIpInCIDR(cidr, serverHost) { - const ip = cidr.ip; - const mask = -1 << (32 - cidr.prefixLength); - const hostIP = ipToInt(serverHost); - return (hostIP & mask) === (ip & mask); -} -function hostMatchesNoProxyList(serverHost) { - for (const host of getNoProxyHostList()) { - const parsedCIDR = parseCIDR(host); - // host is a CIDR and serverHost is an IP address - if ((0, net_1.isIPv4)(serverHost) && parsedCIDR && isIpInCIDR(parsedCIDR, serverHost)) { - return true; - } - else if (serverHost.endsWith(host)) { - // host is a single IP or a domain name suffix - return true; - } - } - return false; -} -function mapProxyName(target, options) { - var _a; - const noProxyResult = { - target: target, - extraOptions: {}, - }; - if (((_a = options['grpc.enable_http_proxy']) !== null && _a !== void 0 ? _a : 1) === 0) { - return noProxyResult; - } - if (target.scheme === 'unix') { - return noProxyResult; - } - const proxyInfo = getProxyInfo(); - if (!proxyInfo.address) { - return noProxyResult; - } - const hostPort = (0, uri_parser_1.splitHostPort)(target.path); - if (!hostPort) { - return noProxyResult; - } - const serverHost = hostPort.host; - if (hostMatchesNoProxyList(serverHost)) { - trace('Not using proxy for target in no_proxy list: ' + (0, uri_parser_1.uriToString)(target)); - return noProxyResult; - } - const extraOptions = { - 'grpc.http_connect_target': (0, uri_parser_1.uriToString)(target), - }; - if (proxyInfo.creds) { - extraOptions['grpc.http_connect_creds'] = proxyInfo.creds; - } - return { - target: { - scheme: 'dns', - path: proxyInfo.address, - }, - extraOptions: extraOptions, - }; -} -function getProxiedConnection(address, channelOptions) { - var _a; - if (!('grpc.http_connect_target' in channelOptions)) { - return Promise.resolve(null); - } - const realTarget = channelOptions['grpc.http_connect_target']; - const parsedTarget = (0, uri_parser_1.parseUri)(realTarget); - if (parsedTarget === null) { - return Promise.resolve(null); - } - const splitHostPost = (0, uri_parser_1.splitHostPort)(parsedTarget.path); - if (splitHostPost === null) { - return Promise.resolve(null); - } - const hostPort = `${splitHostPost.host}:${(_a = splitHostPost.port) !== null && _a !== void 0 ? _a : resolver_dns_1.DEFAULT_PORT}`; - const options = { - method: 'CONNECT', - path: hostPort, - }; - const headers = { - Host: hostPort, - }; - // Connect to the subchannel address as a proxy - if ((0, subchannel_address_1.isTcpSubchannelAddress)(address)) { - options.host = address.host; - options.port = address.port; - } - else { - options.socketPath = address.path; - } - if ('grpc.http_connect_creds' in channelOptions) { - headers['Proxy-Authorization'] = - 'Basic ' + - Buffer.from(channelOptions['grpc.http_connect_creds']).toString('base64'); - } - options.headers = headers; - const proxyAddressString = (0, subchannel_address_1.subchannelAddressToString)(address); - trace('Using proxy ' + proxyAddressString + ' to connect to ' + options.path); - return new Promise((resolve, reject) => { - const request = http.request(options); - request.once('connect', (res, socket, head) => { - request.removeAllListeners(); - socket.removeAllListeners(); - if (res.statusCode === 200) { - trace('Successfully connected to ' + - options.path + - ' through proxy ' + - proxyAddressString); - // The HTTP client may have already read a few bytes of the proxied - // connection. If that's the case, put them back into the socket. - // See https://github.com/grpc/grpc-node/issues/2744. - if (head.length > 0) { - socket.unshift(head); - } - trace('Successfully established a plaintext connection to ' + - options.path + - ' through proxy ' + - proxyAddressString); - resolve(socket); - } - else { - (0, logging_1.log)(constants_1.LogVerbosity.ERROR, 'Failed to connect to ' + - options.path + - ' through proxy ' + - proxyAddressString + - ' with status ' + - res.statusCode); - reject(); - } - }); - request.once('error', err => { - request.removeAllListeners(); - (0, logging_1.log)(constants_1.LogVerbosity.ERROR, 'Failed to connect to proxy ' + - proxyAddressString + - ' with error ' + - err.message); - reject(); - }); - request.end(); - }); -} -//# sourceMappingURL=http_proxy.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/http_proxy.js.map b/node_modules/@grpc/grpc-js/build/src/http_proxy.js.map deleted file mode 100644 index 85e768c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/http_proxy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"http_proxy.js","sourceRoot":"","sources":["../../src/http_proxy.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAqHH,8BAaC;AA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AAI,GAAG,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;gBAC3B,KAAK,CACH,4BAA4B;oBAC1B,OAAO,CAAC,IAAI;oBACZ,iBAAiB;oBACjB,kBAAkB,CACrB,CAAC;gBACF,mEAAmE;gBACnE,iEAAiE;gBACjE,qDAAqD;gBACrD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACpB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACvB,CAAC;gBACD,KAAK,CACH,qDAAqD;oBACnD,OAAO,CAAC,IAAI;oBACZ,iBAAiB;oBACjB,kBAAkB,CACrB,CAAC;gBACF,OAAO,CAAC,MAAM,CAAC,CAAC;YAClB,CAAC;iBAAM,CAAC;gBACN,IAAA,aAAG,EACD,wBAAY,CAAC,KAAK,EAClB,uBAAuB;oBACrB,OAAO,CAAC,IAAI;oBACZ,iBAAiB;oBACjB,kBAAkB;oBAClB,eAAe;oBACf,GAAG,CAAC,UAAU,CACjB,CAAC;gBACF,MAAM,EAAE,CAAC;YACX,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE;YAC1B,OAAO,CAAC,kBAAkB,EAAE,CAAC;YAC7B,IAAA,aAAG,EACD,wBAAY,CAAC,KAAK,EAClB,6BAA6B;gBAC3B,kBAAkB;gBAClB,cAAc;gBACd,GAAG,CAAC,OAAO,CACd,CAAC;YACF,MAAM,EAAE,CAAC;QACX,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,EAAE,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/index.d.ts b/node_modules/@grpc/grpc-js/build/src/index.d.ts deleted file mode 100644 index 5e959ef..0000000 --- a/node_modules/@grpc/grpc-js/build/src/index.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { ClientDuplexStream, ClientReadableStream, ClientUnaryCall, ClientWritableStream, ServiceError } from './call'; -import { CallCredentials, OAuth2Client } from './call-credentials'; -import { StatusObject } from './call-interface'; -import { Channel, ChannelImplementation } from './channel'; -import { CompressionAlgorithms } from './compression-algorithms'; -import { ConnectivityState } from './connectivity-state'; -import { ChannelCredentials, VerifyOptions } from './channel-credentials'; -import { CallOptions, Client, ClientOptions, CallInvocationTransformer, CallProperties, UnaryCallback } from './client'; -import { LogVerbosity, Status, Propagate } from './constants'; -import { Deserialize, loadPackageDefinition, makeClientConstructor, MethodDefinition, Serialize, ServerMethodDefinition, ServiceDefinition } from './make-client'; -import { Metadata, MetadataOptions, MetadataValue } from './metadata'; -import { ConnectionInjector, Server, ServerOptions, UntypedHandleCall, UntypedServiceImplementation } from './server'; -import { KeyCertPair, ServerCredentials } from './server-credentials'; -import { StatusBuilder } from './status-builder'; -import { handleBidiStreamingCall, handleServerStreamingCall, handleClientStreamingCall, handleUnaryCall, sendUnaryData, ServerUnaryCall, ServerReadableStream, ServerWritableStream, ServerDuplexStream, ServerErrorResponse } from './server-call'; -export { OAuth2Client }; -/**** Client Credentials ****/ -export declare const credentials: { - /** - * Combine a ChannelCredentials with any number of CallCredentials into a - * single ChannelCredentials object. - * @param channelCredentials The ChannelCredentials object. - * @param callCredentials Any number of CallCredentials objects. - * @return The resulting ChannelCredentials object. - */ - combineChannelCredentials: (channelCredentials: ChannelCredentials, ...callCredentials: CallCredentials[]) => ChannelCredentials; - /** - * Combine any number of CallCredentials into a single CallCredentials - * object. - * @param first The first CallCredentials object. - * @param additional Any number of additional CallCredentials objects. - * @return The resulting CallCredentials object. - */ - combineCallCredentials: (first: CallCredentials, ...additional: CallCredentials[]) => CallCredentials; - createInsecure: typeof ChannelCredentials.createInsecure; - createSsl: typeof ChannelCredentials.createSsl; - createFromSecureContext: typeof ChannelCredentials.createFromSecureContext; - createFromMetadataGenerator: typeof CallCredentials.createFromMetadataGenerator; - createFromGoogleCredential: typeof CallCredentials.createFromGoogleCredential; - createEmpty: typeof CallCredentials.createEmpty; -}; -/**** Metadata ****/ -export { Metadata, MetadataOptions, MetadataValue }; -/**** Constants ****/ -export { LogVerbosity as logVerbosity, Status as status, ConnectivityState as connectivityState, Propagate as propagate, CompressionAlgorithms as compressionAlgorithms, }; -/**** Client ****/ -export { Client, ClientOptions, loadPackageDefinition, makeClientConstructor, makeClientConstructor as makeGenericClientConstructor, CallProperties, CallInvocationTransformer, ChannelImplementation as Channel, Channel as ChannelInterface, UnaryCallback as requestCallback, }; -/** - * Close a Client object. - * @param client The client to close. - */ -export declare const closeClient: (client: Client) => void; -export declare const waitForClientReady: (client: Client, deadline: Date | number, callback: (error?: Error) => void) => void; -export { sendUnaryData, ChannelCredentials, CallCredentials, Deadline, Serialize as serialize, Deserialize as deserialize, ClientUnaryCall, ClientReadableStream, ClientWritableStream, ClientDuplexStream, CallOptions, MethodDefinition, StatusObject, ServiceError, ServerUnaryCall, ServerReadableStream, ServerWritableStream, ServerDuplexStream, ServerErrorResponse, ServerMethodDefinition, ServiceDefinition, UntypedHandleCall, UntypedServiceImplementation, VerifyOptions, }; -/**** Server ****/ -export { handleBidiStreamingCall, handleServerStreamingCall, handleUnaryCall, handleClientStreamingCall, }; -export type Call = ClientUnaryCall | ClientReadableStream | ClientWritableStream | ClientDuplexStream; -/**** Unimplemented function stubs ****/ -export declare const loadObject: (value: any, options: any) => never; -export declare const load: (filename: any, format: any, options: any) => never; -export declare const setLogger: (logger: Partial) => void; -export declare const setLogVerbosity: (verbosity: LogVerbosity) => void; -export { ConnectionInjector, Server, ServerOptions }; -export { ServerCredentials }; -export { KeyCertPair }; -export declare const getClientChannel: (client: Client) => Channel; -export { StatusBuilder }; -export { Listener, InterceptingListener } from './call-interface'; -export { Requester, ListenerBuilder, RequesterBuilder, Interceptor, InterceptorOptions, InterceptorProvider, InterceptingCall, InterceptorConfigurationError, NextCall, } from './client-interceptors'; -export { GrpcObject, ServiceClientConstructor, ProtobufTypeDefinition, } from './make-client'; -export { ChannelOptions } from './channel-options'; -export { getChannelzServiceDefinition, getChannelzHandlers } from './channelz'; -export { addAdminServicesToServer } from './admin'; -export { ServiceConfig, LoadBalancingConfig, MethodConfig, RetryPolicy, } from './service-config'; -export { ServerListener, FullServerListener, ServerListenerBuilder, Responder, FullResponder, ResponderBuilder, ServerInterceptingCallInterface, ServerInterceptingCall, ServerInterceptor, } from './server-interceptors'; -export { ServerMetricRecorder } from './orca'; -import * as experimental from './experimental'; -export { experimental }; -import { Deadline } from './deadline'; diff --git a/node_modules/@grpc/grpc-js/build/src/index.js b/node_modules/@grpc/grpc-js/build/src/index.js deleted file mode 100644 index 0c5c58a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/index.js +++ /dev/null @@ -1,148 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.experimental = exports.ServerMetricRecorder = exports.ServerInterceptingCall = exports.ResponderBuilder = exports.ServerListenerBuilder = exports.addAdminServicesToServer = exports.getChannelzHandlers = exports.getChannelzServiceDefinition = exports.InterceptorConfigurationError = exports.InterceptingCall = exports.RequesterBuilder = exports.ListenerBuilder = exports.StatusBuilder = exports.getClientChannel = exports.ServerCredentials = exports.Server = exports.setLogVerbosity = exports.setLogger = exports.load = exports.loadObject = exports.CallCredentials = exports.ChannelCredentials = exports.waitForClientReady = exports.closeClient = exports.Channel = exports.makeGenericClientConstructor = exports.makeClientConstructor = exports.loadPackageDefinition = exports.Client = exports.compressionAlgorithms = exports.propagate = exports.connectivityState = exports.status = exports.logVerbosity = exports.Metadata = exports.credentials = void 0; -const call_credentials_1 = require("./call-credentials"); -Object.defineProperty(exports, "CallCredentials", { enumerable: true, get: function () { return call_credentials_1.CallCredentials; } }); -const channel_1 = require("./channel"); -Object.defineProperty(exports, "Channel", { enumerable: true, get: function () { return channel_1.ChannelImplementation; } }); -const compression_algorithms_1 = require("./compression-algorithms"); -Object.defineProperty(exports, "compressionAlgorithms", { enumerable: true, get: function () { return compression_algorithms_1.CompressionAlgorithms; } }); -const connectivity_state_1 = require("./connectivity-state"); -Object.defineProperty(exports, "connectivityState", { enumerable: true, get: function () { return connectivity_state_1.ConnectivityState; } }); -const channel_credentials_1 = require("./channel-credentials"); -Object.defineProperty(exports, "ChannelCredentials", { enumerable: true, get: function () { return channel_credentials_1.ChannelCredentials; } }); -const client_1 = require("./client"); -Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return client_1.Client; } }); -const constants_1 = require("./constants"); -Object.defineProperty(exports, "logVerbosity", { enumerable: true, get: function () { return constants_1.LogVerbosity; } }); -Object.defineProperty(exports, "status", { enumerable: true, get: function () { return constants_1.Status; } }); -Object.defineProperty(exports, "propagate", { enumerable: true, get: function () { return constants_1.Propagate; } }); -const logging = require("./logging"); -const make_client_1 = require("./make-client"); -Object.defineProperty(exports, "loadPackageDefinition", { enumerable: true, get: function () { return make_client_1.loadPackageDefinition; } }); -Object.defineProperty(exports, "makeClientConstructor", { enumerable: true, get: function () { return make_client_1.makeClientConstructor; } }); -Object.defineProperty(exports, "makeGenericClientConstructor", { enumerable: true, get: function () { return make_client_1.makeClientConstructor; } }); -const metadata_1 = require("./metadata"); -Object.defineProperty(exports, "Metadata", { enumerable: true, get: function () { return metadata_1.Metadata; } }); -const server_1 = require("./server"); -Object.defineProperty(exports, "Server", { enumerable: true, get: function () { return server_1.Server; } }); -const server_credentials_1 = require("./server-credentials"); -Object.defineProperty(exports, "ServerCredentials", { enumerable: true, get: function () { return server_credentials_1.ServerCredentials; } }); -const status_builder_1 = require("./status-builder"); -Object.defineProperty(exports, "StatusBuilder", { enumerable: true, get: function () { return status_builder_1.StatusBuilder; } }); -/**** Client Credentials ****/ -// Using assign only copies enumerable properties, which is what we want -exports.credentials = { - /** - * Combine a ChannelCredentials with any number of CallCredentials into a - * single ChannelCredentials object. - * @param channelCredentials The ChannelCredentials object. - * @param callCredentials Any number of CallCredentials objects. - * @return The resulting ChannelCredentials object. - */ - combineChannelCredentials: (channelCredentials, ...callCredentials) => { - return callCredentials.reduce((acc, other) => acc.compose(other), channelCredentials); - }, - /** - * Combine any number of CallCredentials into a single CallCredentials - * object. - * @param first The first CallCredentials object. - * @param additional Any number of additional CallCredentials objects. - * @return The resulting CallCredentials object. - */ - combineCallCredentials: (first, ...additional) => { - return additional.reduce((acc, other) => acc.compose(other), first); - }, - // from channel-credentials.ts - createInsecure: channel_credentials_1.ChannelCredentials.createInsecure, - createSsl: channel_credentials_1.ChannelCredentials.createSsl, - createFromSecureContext: channel_credentials_1.ChannelCredentials.createFromSecureContext, - // from call-credentials.ts - createFromMetadataGenerator: call_credentials_1.CallCredentials.createFromMetadataGenerator, - createFromGoogleCredential: call_credentials_1.CallCredentials.createFromGoogleCredential, - createEmpty: call_credentials_1.CallCredentials.createEmpty, -}; -/** - * Close a Client object. - * @param client The client to close. - */ -const closeClient = (client) => client.close(); -exports.closeClient = closeClient; -const waitForClientReady = (client, deadline, callback) => client.waitForReady(deadline, callback); -exports.waitForClientReady = waitForClientReady; -/* eslint-enable @typescript-eslint/no-explicit-any */ -/**** Unimplemented function stubs ****/ -/* eslint-disable @typescript-eslint/no-explicit-any */ -const loadObject = (value, options) => { - throw new Error('Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead'); -}; -exports.loadObject = loadObject; -const load = (filename, format, options) => { - throw new Error('Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead'); -}; -exports.load = load; -const setLogger = (logger) => { - logging.setLogger(logger); -}; -exports.setLogger = setLogger; -const setLogVerbosity = (verbosity) => { - logging.setLoggerVerbosity(verbosity); -}; -exports.setLogVerbosity = setLogVerbosity; -const getClientChannel = (client) => { - return client_1.Client.prototype.getChannel.call(client); -}; -exports.getClientChannel = getClientChannel; -var client_interceptors_1 = require("./client-interceptors"); -Object.defineProperty(exports, "ListenerBuilder", { enumerable: true, get: function () { return client_interceptors_1.ListenerBuilder; } }); -Object.defineProperty(exports, "RequesterBuilder", { enumerable: true, get: function () { return client_interceptors_1.RequesterBuilder; } }); -Object.defineProperty(exports, "InterceptingCall", { enumerable: true, get: function () { return client_interceptors_1.InterceptingCall; } }); -Object.defineProperty(exports, "InterceptorConfigurationError", { enumerable: true, get: function () { return client_interceptors_1.InterceptorConfigurationError; } }); -var channelz_1 = require("./channelz"); -Object.defineProperty(exports, "getChannelzServiceDefinition", { enumerable: true, get: function () { return channelz_1.getChannelzServiceDefinition; } }); -Object.defineProperty(exports, "getChannelzHandlers", { enumerable: true, get: function () { return channelz_1.getChannelzHandlers; } }); -var admin_1 = require("./admin"); -Object.defineProperty(exports, "addAdminServicesToServer", { enumerable: true, get: function () { return admin_1.addAdminServicesToServer; } }); -var server_interceptors_1 = require("./server-interceptors"); -Object.defineProperty(exports, "ServerListenerBuilder", { enumerable: true, get: function () { return server_interceptors_1.ServerListenerBuilder; } }); -Object.defineProperty(exports, "ResponderBuilder", { enumerable: true, get: function () { return server_interceptors_1.ResponderBuilder; } }); -Object.defineProperty(exports, "ServerInterceptingCall", { enumerable: true, get: function () { return server_interceptors_1.ServerInterceptingCall; } }); -var orca_1 = require("./orca"); -Object.defineProperty(exports, "ServerMetricRecorder", { enumerable: true, get: function () { return orca_1.ServerMetricRecorder; } }); -const experimental = require("./experimental"); -exports.experimental = experimental; -const resolver_dns = require("./resolver-dns"); -const resolver_uds = require("./resolver-uds"); -const resolver_ip = require("./resolver-ip"); -const load_balancer_pick_first = require("./load-balancer-pick-first"); -const load_balancer_round_robin = require("./load-balancer-round-robin"); -const load_balancer_outlier_detection = require("./load-balancer-outlier-detection"); -const load_balancer_weighted_round_robin = require("./load-balancer-weighted-round-robin"); -const channelz = require("./channelz"); -(() => { - resolver_dns.setup(); - resolver_uds.setup(); - resolver_ip.setup(); - load_balancer_pick_first.setup(); - load_balancer_round_robin.setup(); - load_balancer_outlier_detection.setup(); - load_balancer_weighted_round_robin.setup(); - channelz.setup(); -})(); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/index.js.map b/node_modules/@grpc/grpc-js/build/src/index.js.map deleted file mode 100644 index 4555836..0000000 --- a/node_modules/@grpc/grpc-js/build/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AASH,yDAAmE;AA+IjE,gGA/IO,kCAAe,OA+IP;AA7IjB,uCAA2D;AAuHhC,wFAvHT,+BAAqB,OAuHL;AAtHlC,qEAAiE;AAwGtC,sGAxGlB,8CAAqB,OAwGkB;AAvGhD,6DAAyD;AAqGlC,kGArGd,sCAAiB,OAqGc;AApGxC,+DAA0E;AAyIxE,mGAzIO,wCAAkB,OAyIP;AAxIpB,qCAOkB;AAqGhB,uFA1GA,eAAM,OA0GA;AApGR,2CAA8D;AAyF5C,6FAzFT,wBAAY,OAyFS;AAClB,uFA1FW,kBAAM,OA0FX;AAEH,0FA5FgB,qBAAS,OA4FhB;AA3FxB,qCAAqC;AACrC,+CAQuB;AA4FrB,sGAlGA,mCAAqB,OAkGA;AACrB,sGAlGA,mCAAqB,OAkGA;AACI,6GAnGzB,mCAAqB,OAmGgC;AA7FvD,yCAAsE;AAyE7D,yFAzEA,mBAAQ,OAyEA;AAxEjB,qCAMkB;AAgLW,uFApL3B,eAAM,OAoL2B;AA/KnC,6DAAsE;AAgL7D,kGAhLa,sCAAiB,OAgLb;AA/K1B,qDAAiD;AAsLxC,8FAtLA,8BAAa,OAsLA;AAtKtB,8BAA8B;AAE9B,wEAAwE;AAC3D,QAAA,WAAW,GAAG;IACzB;;;;;;OAMG;IACH,yBAAyB,EA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K,EAAE,CAAC;IACrB,WAAW,CAAC,KAAK,EAAE,CAAC;IACpB,wBAAwB,CAAC,KAAK,EAAE,CAAC;IACjC,yBAAyB,CAAC,KAAK,EAAE,CAAC;IAClC,+BAA+B,CAAC,KAAK,EAAE,CAAC;IACxC,kCAAkC,CAAC,KAAK,EAAE,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,CAAC;AACnB,CAAC,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/internal-channel.d.ts b/node_modules/@grpc/grpc-js/build/src/internal-channel.d.ts deleted file mode 100644 index 9568a92..0000000 --- a/node_modules/@grpc/grpc-js/build/src/internal-channel.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { ChannelCredentials } from './channel-credentials'; -import { ChannelOptions } from './channel-options'; -import { PickResult } from './picker'; -import { Metadata } from './metadata'; -import { CallConfig } from './resolver'; -import { ServerSurfaceCall } from './server-call'; -import { ConnectivityState } from './connectivity-state'; -import { ChannelRef } from './channelz'; -import { LoadBalancingCall } from './load-balancing-call'; -import { CallCredentials } from './call-credentials'; -import { Call, StatusObject } from './call-interface'; -import { Deadline } from './deadline'; -import { ResolvingCall } from './resolving-call'; -import { RetryingCall } from './retrying-call'; -import { BaseSubchannelWrapper, SubchannelInterface } from './subchannel-interface'; -interface NoneConfigResult { - type: 'NONE'; -} -interface SuccessConfigResult { - type: 'SUCCESS'; - config: CallConfig; -} -interface ErrorConfigResult { - type: 'ERROR'; - error: StatusObject; -} -type GetConfigResult = NoneConfigResult | SuccessConfigResult | ErrorConfigResult; -declare class ChannelSubchannelWrapper extends BaseSubchannelWrapper implements SubchannelInterface { - private channel; - private refCount; - private subchannelStateListener; - constructor(childSubchannel: SubchannelInterface, channel: InternalChannel); - ref(): void; - unref(): void; -} -export declare const SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX = "grpc.internal.no_subchannel"; -export declare class InternalChannel { - private readonly credentials; - private readonly options; - private readonly resolvingLoadBalancer; - private readonly subchannelPool; - private connectivityState; - private currentPicker; - /** - * Calls queued up to get a call config. Should only be populated before the - * first time the resolver returns a result, which includes the ConfigSelector. - */ - private configSelectionQueue; - private pickQueue; - private connectivityStateWatchers; - private readonly defaultAuthority; - private readonly filterStackFactory; - private readonly target; - /** - * This timer does not do anything on its own. Its purpose is to hold the - * event loop open while there are any pending calls for the channel that - * have not yet been assigned to specific subchannels. In other words, - * the invariant is that callRefTimer is reffed if and only if pickQueue - * is non-empty. In addition, the timer is null while the state is IDLE or - * SHUTDOWN and there are no pending calls. - */ - private callRefTimer; - private configSelector; - /** - * This is the error from the name resolver if it failed most recently. It - * is only used to end calls that start while there is no config selector - * and the name resolver is in backoff, so it should be nulled if - * configSelector becomes set or the channel state becomes anything other - * than TRANSIENT_FAILURE. - */ - private currentResolutionError; - private readonly retryBufferTracker; - private keepaliveTime; - private readonly wrappedSubchannels; - private callCount; - private idleTimer; - private readonly idleTimeoutMs; - private lastActivityTimestamp; - private readonly channelzEnabled; - private readonly channelzRef; - private readonly channelzInfoTracker; - /** - * Randomly generated ID to be passed to the config selector, for use by - * ring_hash in xDS. An integer distributed approximately uniformly between - * 0 and MAX_SAFE_INTEGER. - */ - private readonly randomChannelId; - constructor(target: string, credentials: ChannelCredentials, options: ChannelOptions); - private trace; - private callRefTimerRef; - private callRefTimerUnref; - private removeConnectivityStateWatcher; - private updateState; - throttleKeepalive(newKeepaliveTime: number): void; - addWrappedSubchannel(wrappedSubchannel: ChannelSubchannelWrapper): void; - removeWrappedSubchannel(wrappedSubchannel: ChannelSubchannelWrapper): void; - doPick(metadata: Metadata, extraPickInfo: { - [key: string]: string; - }): PickResult; - queueCallForPick(call: LoadBalancingCall): void; - getConfig(method: string, metadata: Metadata): GetConfigResult; - queueCallForConfig(call: ResolvingCall): void; - private enterIdle; - private startIdleTimeout; - private maybeStartIdleTimer; - private onCallStart; - private onCallEnd; - createLoadBalancingCall(callConfig: CallConfig, method: string, host: string, credentials: CallCredentials, deadline: Deadline): LoadBalancingCall; - createRetryingCall(callConfig: CallConfig, method: string, host: string, credentials: CallCredentials, deadline: Deadline): RetryingCall; - createResolvingCall(method: string, deadline: Deadline, host: string | null | undefined, parentCall: ServerSurfaceCall | null, propagateFlags: number | null | undefined): ResolvingCall; - close(): void; - getTarget(): string; - getConnectivityState(tryToConnect: boolean): ConnectivityState; - watchConnectivityState(currentState: ConnectivityState, deadline: Date | number, callback: (error?: Error) => void): void; - /** - * Get the channelz reference object for this channel. The returned value is - * garbage if channelz is disabled for this channel. - * @returns - */ - getChannelzRef(): ChannelRef; - createCall(method: string, deadline: Deadline, host: string | null | undefined, parentCall: ServerSurfaceCall | null, propagateFlags: number | null | undefined): Call; - getOptions(): ChannelOptions; -} -export {}; diff --git a/node_modules/@grpc/grpc-js/build/src/internal-channel.js b/node_modules/@grpc/grpc-js/build/src/internal-channel.js deleted file mode 100644 index e52f881..0000000 --- a/node_modules/@grpc/grpc-js/build/src/internal-channel.js +++ /dev/null @@ -1,605 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InternalChannel = exports.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX = void 0; -const channel_credentials_1 = require("./channel-credentials"); -const resolving_load_balancer_1 = require("./resolving-load-balancer"); -const subchannel_pool_1 = require("./subchannel-pool"); -const picker_1 = require("./picker"); -const metadata_1 = require("./metadata"); -const constants_1 = require("./constants"); -const filter_stack_1 = require("./filter-stack"); -const compression_filter_1 = require("./compression-filter"); -const resolver_1 = require("./resolver"); -const logging_1 = require("./logging"); -const http_proxy_1 = require("./http_proxy"); -const uri_parser_1 = require("./uri-parser"); -const connectivity_state_1 = require("./connectivity-state"); -const channelz_1 = require("./channelz"); -const load_balancing_call_1 = require("./load-balancing-call"); -const deadline_1 = require("./deadline"); -const resolving_call_1 = require("./resolving-call"); -const call_number_1 = require("./call-number"); -const control_plane_status_1 = require("./control-plane-status"); -const retrying_call_1 = require("./retrying-call"); -const subchannel_interface_1 = require("./subchannel-interface"); -/** - * See https://nodejs.org/api/timers.html#timers_setinterval_callback_delay_args - */ -const MAX_TIMEOUT_TIME = 2147483647; -const MIN_IDLE_TIMEOUT_MS = 1000; -// 30 minutes -const DEFAULT_IDLE_TIMEOUT_MS = 30 * 60 * 1000; -const RETRY_THROTTLER_MAP = new Map(); -const DEFAULT_RETRY_BUFFER_SIZE_BYTES = 1 << 24; // 16 MB -const DEFAULT_PER_RPC_RETRY_BUFFER_SIZE_BYTES = 1 << 20; // 1 MB -class ChannelSubchannelWrapper extends subchannel_interface_1.BaseSubchannelWrapper { - constructor(childSubchannel, channel) { - super(childSubchannel); - this.channel = channel; - this.refCount = 0; - this.subchannelStateListener = (subchannel, previousState, newState, keepaliveTime) => { - channel.throttleKeepalive(keepaliveTime); - }; - } - ref() { - if (this.refCount === 0) { - this.child.addConnectivityStateListener(this.subchannelStateListener); - this.channel.addWrappedSubchannel(this); - } - this.child.ref(); - this.refCount += 1; - } - unref() { - this.child.unref(); - this.refCount -= 1; - if (this.refCount <= 0) { - this.child.removeConnectivityStateListener(this.subchannelStateListener); - this.channel.removeWrappedSubchannel(this); - } - } -} -class ShutdownPicker { - pick(pickArgs) { - return { - pickResultType: picker_1.PickResultType.DROP, - status: { - code: constants_1.Status.UNAVAILABLE, - details: 'Channel closed before call started', - metadata: new metadata_1.Metadata() - }, - subchannel: null, - onCallStarted: null, - onCallEnded: null - }; - } -} -exports.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX = 'grpc.internal.no_subchannel'; -class ChannelzInfoTracker { - constructor(target) { - this.target = target; - this.trace = new channelz_1.ChannelzTrace(); - this.callTracker = new channelz_1.ChannelzCallTracker(); - this.childrenTracker = new channelz_1.ChannelzChildrenTracker(); - this.state = connectivity_state_1.ConnectivityState.IDLE; - } - getChannelzInfoCallback() { - return () => { - return { - target: this.target, - state: this.state, - trace: this.trace, - callTracker: this.callTracker, - children: this.childrenTracker.getChildLists() - }; - }; - } -} -class InternalChannel { - constructor(target, credentials, options) { - var _a, _b, _c, _d, _e, _f; - this.credentials = credentials; - this.options = options; - this.connectivityState = connectivity_state_1.ConnectivityState.IDLE; - this.currentPicker = new picker_1.UnavailablePicker(); - /** - * Calls queued up to get a call config. Should only be populated before the - * first time the resolver returns a result, which includes the ConfigSelector. - */ - this.configSelectionQueue = []; - this.pickQueue = []; - this.connectivityStateWatchers = []; - /** - * This timer does not do anything on its own. Its purpose is to hold the - * event loop open while there are any pending calls for the channel that - * have not yet been assigned to specific subchannels. In other words, - * the invariant is that callRefTimer is reffed if and only if pickQueue - * is non-empty. In addition, the timer is null while the state is IDLE or - * SHUTDOWN and there are no pending calls. - */ - this.callRefTimer = null; - this.configSelector = null; - /** - * This is the error from the name resolver if it failed most recently. It - * is only used to end calls that start while there is no config selector - * and the name resolver is in backoff, so it should be nulled if - * configSelector becomes set or the channel state becomes anything other - * than TRANSIENT_FAILURE. - */ - this.currentResolutionError = null; - this.wrappedSubchannels = new Set(); - this.callCount = 0; - this.idleTimer = null; - // Channelz info - this.channelzEnabled = true; - /** - * Randomly generated ID to be passed to the config selector, for use by - * ring_hash in xDS. An integer distributed approximately uniformly between - * 0 and MAX_SAFE_INTEGER. - */ - this.randomChannelId = Math.floor(Math.random() * Number.MAX_SAFE_INTEGER); - if (typeof target !== 'string') { - throw new TypeError('Channel target must be a string'); - } - if (!(credentials instanceof channel_credentials_1.ChannelCredentials)) { - throw new TypeError('Channel credentials must be a ChannelCredentials object'); - } - if (options) { - if (typeof options !== 'object') { - throw new TypeError('Channel options must be an object'); - } - } - this.channelzInfoTracker = new ChannelzInfoTracker(target); - const originalTargetUri = (0, uri_parser_1.parseUri)(target); - if (originalTargetUri === null) { - throw new Error(`Could not parse target name "${target}"`); - } - /* This ensures that the target has a scheme that is registered with the - * resolver */ - const defaultSchemeMapResult = (0, resolver_1.mapUriDefaultScheme)(originalTargetUri); - if (defaultSchemeMapResult === null) { - throw new Error(`Could not find a default scheme for target name "${target}"`); - } - if (this.options['grpc.enable_channelz'] === 0) { - this.channelzEnabled = false; - } - this.channelzRef = (0, channelz_1.registerChannelzChannel)(target, this.channelzInfoTracker.getChannelzInfoCallback(), this.channelzEnabled); - if (this.channelzEnabled) { - this.channelzInfoTracker.trace.addTrace('CT_INFO', 'Channel created'); - } - if (this.options['grpc.default_authority']) { - this.defaultAuthority = this.options['grpc.default_authority']; - } - else { - this.defaultAuthority = (0, resolver_1.getDefaultAuthority)(defaultSchemeMapResult); - } - const proxyMapResult = (0, http_proxy_1.mapProxyName)(defaultSchemeMapResult, options); - this.target = proxyMapResult.target; - this.options = Object.assign({}, this.options, proxyMapResult.extraOptions); - /* The global boolean parameter to getSubchannelPool has the inverse meaning to what - * the grpc.use_local_subchannel_pool channel option means. */ - this.subchannelPool = (0, subchannel_pool_1.getSubchannelPool)(((_a = this.options['grpc.use_local_subchannel_pool']) !== null && _a !== void 0 ? _a : 0) === 0); - this.retryBufferTracker = new retrying_call_1.MessageBufferTracker((_b = this.options['grpc.retry_buffer_size']) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_BUFFER_SIZE_BYTES, (_c = this.options['grpc.per_rpc_retry_buffer_size']) !== null && _c !== void 0 ? _c : DEFAULT_PER_RPC_RETRY_BUFFER_SIZE_BYTES); - this.keepaliveTime = (_d = this.options['grpc.keepalive_time_ms']) !== null && _d !== void 0 ? _d : -1; - this.idleTimeoutMs = Math.max((_e = this.options['grpc.client_idle_timeout_ms']) !== null && _e !== void 0 ? _e : DEFAULT_IDLE_TIMEOUT_MS, MIN_IDLE_TIMEOUT_MS); - const channelControlHelper = { - createSubchannel: (subchannelAddress, subchannelArgs) => { - const finalSubchannelArgs = {}; - for (const [key, value] of Object.entries(subchannelArgs)) { - if (!key.startsWith(exports.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX)) { - finalSubchannelArgs[key] = value; - } - } - const subchannel = this.subchannelPool.getOrCreateSubchannel(this.target, subchannelAddress, finalSubchannelArgs, this.credentials); - subchannel.throttleKeepalive(this.keepaliveTime); - if (this.channelzEnabled) { - this.channelzInfoTracker.trace.addTrace('CT_INFO', 'Created subchannel or used existing subchannel', subchannel.getChannelzRef()); - } - const wrappedSubchannel = new ChannelSubchannelWrapper(subchannel, this); - return wrappedSubchannel; - }, - updateState: (connectivityState, picker) => { - this.currentPicker = picker; - const queueCopy = this.pickQueue.slice(); - this.pickQueue = []; - if (queueCopy.length > 0) { - this.callRefTimerUnref(); - } - for (const call of queueCopy) { - call.doPick(); - } - this.updateState(connectivityState); - }, - requestReresolution: () => { - // This should never be called. - throw new Error('Resolving load balancer should never call requestReresolution'); - }, - addChannelzChild: (child) => { - if (this.channelzEnabled) { - this.channelzInfoTracker.childrenTracker.refChild(child); - } - }, - removeChannelzChild: (child) => { - if (this.channelzEnabled) { - this.channelzInfoTracker.childrenTracker.unrefChild(child); - } - }, - }; - this.resolvingLoadBalancer = new resolving_load_balancer_1.ResolvingLoadBalancer(this.target, channelControlHelper, this.options, (serviceConfig, configSelector) => { - var _a; - if (serviceConfig.retryThrottling) { - RETRY_THROTTLER_MAP.set(this.getTarget(), new retrying_call_1.RetryThrottler(serviceConfig.retryThrottling.maxTokens, serviceConfig.retryThrottling.tokenRatio, RETRY_THROTTLER_MAP.get(this.getTarget()))); - } - else { - RETRY_THROTTLER_MAP.delete(this.getTarget()); - } - if (this.channelzEnabled) { - this.channelzInfoTracker.trace.addTrace('CT_INFO', 'Address resolution succeeded'); - } - (_a = this.configSelector) === null || _a === void 0 ? void 0 : _a.unref(); - this.configSelector = configSelector; - this.currentResolutionError = null; - /* We process the queue asynchronously to ensure that the corresponding - * load balancer update has completed. */ - process.nextTick(() => { - const localQueue = this.configSelectionQueue; - this.configSelectionQueue = []; - if (localQueue.length > 0) { - this.callRefTimerUnref(); - } - for (const call of localQueue) { - call.getConfig(); - } - }); - }, status => { - if (this.channelzEnabled) { - this.channelzInfoTracker.trace.addTrace('CT_WARNING', 'Address resolution failed with code ' + - status.code + - ' and details "' + - status.details + - '"'); - } - if (this.configSelectionQueue.length > 0) { - this.trace('Name resolution failed with calls queued for config selection'); - } - if (this.configSelector === null) { - this.currentResolutionError = Object.assign(Object.assign({}, (0, control_plane_status_1.restrictControlPlaneStatusCode)(status.code, status.details)), { metadata: status.metadata }); - } - const localQueue = this.configSelectionQueue; - this.configSelectionQueue = []; - if (localQueue.length > 0) { - this.callRefTimerUnref(); - } - for (const call of localQueue) { - call.reportResolverError(status); - } - }); - this.filterStackFactory = new filter_stack_1.FilterStackFactory([ - new compression_filter_1.CompressionFilterFactory(this, this.options), - ]); - this.trace('Channel constructed with options ' + - JSON.stringify(options, undefined, 2)); - const error = new Error(); - if ((0, logging_1.isTracerEnabled)('channel_stacktrace')) { - (0, logging_1.trace)(constants_1.LogVerbosity.DEBUG, 'channel_stacktrace', '(' + - this.channelzRef.id + - ') ' + - 'Channel constructed \n' + - ((_f = error.stack) === null || _f === void 0 ? void 0 : _f.substring(error.stack.indexOf('\n') + 1))); - } - this.lastActivityTimestamp = new Date(); - } - trace(text, verbosityOverride) { - (0, logging_1.trace)(verbosityOverride !== null && verbosityOverride !== void 0 ? verbosityOverride : constants_1.LogVerbosity.DEBUG, 'channel', '(' + this.channelzRef.id + ') ' + (0, uri_parser_1.uriToString)(this.target) + ' ' + text); - } - callRefTimerRef() { - var _a, _b, _c, _d; - if (!this.callRefTimer) { - this.callRefTimer = setInterval(() => { }, MAX_TIMEOUT_TIME); - } - // If the hasRef function does not exist, always run the code - if (!((_b = (_a = this.callRefTimer).hasRef) === null || _b === void 0 ? void 0 : _b.call(_a))) { - this.trace('callRefTimer.ref | configSelectionQueue.length=' + - this.configSelectionQueue.length + - ' pickQueue.length=' + - this.pickQueue.length); - (_d = (_c = this.callRefTimer).ref) === null || _d === void 0 ? void 0 : _d.call(_c); - } - } - callRefTimerUnref() { - var _a, _b, _c; - // If the timer or the hasRef function does not exist, always run the code - if (!((_a = this.callRefTimer) === null || _a === void 0 ? void 0 : _a.hasRef) || this.callRefTimer.hasRef()) { - this.trace('callRefTimer.unref | configSelectionQueue.length=' + - this.configSelectionQueue.length + - ' pickQueue.length=' + - this.pickQueue.length); - (_c = (_b = this.callRefTimer) === null || _b === void 0 ? void 0 : _b.unref) === null || _c === void 0 ? void 0 : _c.call(_b); - } - } - removeConnectivityStateWatcher(watcherObject) { - const watcherIndex = this.connectivityStateWatchers.findIndex(value => value === watcherObject); - if (watcherIndex >= 0) { - this.connectivityStateWatchers.splice(watcherIndex, 1); - } - } - updateState(newState) { - (0, logging_1.trace)(constants_1.LogVerbosity.DEBUG, 'connectivity_state', '(' + - this.channelzRef.id + - ') ' + - (0, uri_parser_1.uriToString)(this.target) + - ' ' + - connectivity_state_1.ConnectivityState[this.connectivityState] + - ' -> ' + - connectivity_state_1.ConnectivityState[newState]); - if (this.channelzEnabled) { - this.channelzInfoTracker.trace.addTrace('CT_INFO', 'Connectivity state change to ' + connectivity_state_1.ConnectivityState[newState]); - } - this.connectivityState = newState; - this.channelzInfoTracker.state = newState; - const watchersCopy = this.connectivityStateWatchers.slice(); - for (const watcherObject of watchersCopy) { - if (newState !== watcherObject.currentState) { - if (watcherObject.timer) { - clearTimeout(watcherObject.timer); - } - this.removeConnectivityStateWatcher(watcherObject); - watcherObject.callback(); - } - } - if (newState !== connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE) { - this.currentResolutionError = null; - } - } - throttleKeepalive(newKeepaliveTime) { - if (newKeepaliveTime > this.keepaliveTime) { - this.keepaliveTime = newKeepaliveTime; - for (const wrappedSubchannel of this.wrappedSubchannels) { - wrappedSubchannel.throttleKeepalive(newKeepaliveTime); - } - } - } - addWrappedSubchannel(wrappedSubchannel) { - this.wrappedSubchannels.add(wrappedSubchannel); - } - removeWrappedSubchannel(wrappedSubchannel) { - this.wrappedSubchannels.delete(wrappedSubchannel); - } - doPick(metadata, extraPickInfo) { - return this.currentPicker.pick({ - metadata: metadata, - extraPickInfo: extraPickInfo, - }); - } - queueCallForPick(call) { - this.pickQueue.push(call); - this.callRefTimerRef(); - } - getConfig(method, metadata) { - if (this.connectivityState !== connectivity_state_1.ConnectivityState.SHUTDOWN) { - this.resolvingLoadBalancer.exitIdle(); - } - if (this.configSelector) { - return { - type: 'SUCCESS', - config: this.configSelector.invoke(method, metadata, this.randomChannelId), - }; - } - else { - if (this.currentResolutionError) { - return { - type: 'ERROR', - error: this.currentResolutionError, - }; - } - else { - return { - type: 'NONE', - }; - } - } - } - queueCallForConfig(call) { - this.configSelectionQueue.push(call); - this.callRefTimerRef(); - } - enterIdle() { - this.resolvingLoadBalancer.destroy(); - this.updateState(connectivity_state_1.ConnectivityState.IDLE); - this.currentPicker = new picker_1.QueuePicker(this.resolvingLoadBalancer); - if (this.idleTimer) { - clearTimeout(this.idleTimer); - this.idleTimer = null; - } - if (this.callRefTimer) { - clearInterval(this.callRefTimer); - this.callRefTimer = null; - } - } - startIdleTimeout(timeoutMs) { - var _a, _b; - this.idleTimer = setTimeout(() => { - if (this.callCount > 0) { - /* If there is currently a call, the channel will not go idle for a - * period of at least idleTimeoutMs, so check again after that time. - */ - this.startIdleTimeout(this.idleTimeoutMs); - return; - } - const now = new Date(); - const timeSinceLastActivity = now.valueOf() - this.lastActivityTimestamp.valueOf(); - if (timeSinceLastActivity >= this.idleTimeoutMs) { - this.trace('Idle timer triggered after ' + - this.idleTimeoutMs + - 'ms of inactivity'); - this.enterIdle(); - } - else { - /* Whenever the timer fires with the latest activity being too recent, - * set the timer again for the time when the time since the last - * activity is equal to the timeout. This should result in the timer - * firing no more than once every idleTimeoutMs/2 on average. */ - this.startIdleTimeout(this.idleTimeoutMs - timeSinceLastActivity); - } - }, timeoutMs); - (_b = (_a = this.idleTimer).unref) === null || _b === void 0 ? void 0 : _b.call(_a); - } - maybeStartIdleTimer() { - if (this.connectivityState !== connectivity_state_1.ConnectivityState.SHUTDOWN && - !this.idleTimer) { - this.startIdleTimeout(this.idleTimeoutMs); - } - } - onCallStart() { - if (this.channelzEnabled) { - this.channelzInfoTracker.callTracker.addCallStarted(); - } - this.callCount += 1; - } - onCallEnd(status) { - if (this.channelzEnabled) { - if (status.code === constants_1.Status.OK) { - this.channelzInfoTracker.callTracker.addCallSucceeded(); - } - else { - this.channelzInfoTracker.callTracker.addCallFailed(); - } - } - this.callCount -= 1; - this.lastActivityTimestamp = new Date(); - this.maybeStartIdleTimer(); - } - createLoadBalancingCall(callConfig, method, host, credentials, deadline) { - const callNumber = (0, call_number_1.getNextCallNumber)(); - this.trace('createLoadBalancingCall [' + callNumber + '] method="' + method + '"'); - return new load_balancing_call_1.LoadBalancingCall(this, callConfig, method, host, credentials, deadline, callNumber); - } - createRetryingCall(callConfig, method, host, credentials, deadline) { - const callNumber = (0, call_number_1.getNextCallNumber)(); - this.trace('createRetryingCall [' + callNumber + '] method="' + method + '"'); - return new retrying_call_1.RetryingCall(this, callConfig, method, host, credentials, deadline, callNumber, this.retryBufferTracker, RETRY_THROTTLER_MAP.get(this.getTarget())); - } - createResolvingCall(method, deadline, host, parentCall, propagateFlags) { - const callNumber = (0, call_number_1.getNextCallNumber)(); - this.trace('createResolvingCall [' + - callNumber + - '] method="' + - method + - '", deadline=' + - (0, deadline_1.deadlineToString)(deadline)); - const finalOptions = { - deadline: deadline, - flags: propagateFlags !== null && propagateFlags !== void 0 ? propagateFlags : constants_1.Propagate.DEFAULTS, - host: host !== null && host !== void 0 ? host : this.defaultAuthority, - parentCall: parentCall, - }; - const call = new resolving_call_1.ResolvingCall(this, method, finalOptions, this.filterStackFactory.clone(), callNumber); - this.onCallStart(); - call.addStatusWatcher(status => { - this.onCallEnd(status); - }); - return call; - } - close() { - var _a; - this.resolvingLoadBalancer.destroy(); - this.updateState(connectivity_state_1.ConnectivityState.SHUTDOWN); - this.currentPicker = new ShutdownPicker(); - for (const call of this.configSelectionQueue) { - call.cancelWithStatus(constants_1.Status.UNAVAILABLE, 'Channel closed before call started'); - } - this.configSelectionQueue = []; - for (const call of this.pickQueue) { - call.cancelWithStatus(constants_1.Status.UNAVAILABLE, 'Channel closed before call started'); - } - this.pickQueue = []; - if (this.callRefTimer) { - clearInterval(this.callRefTimer); - } - if (this.idleTimer) { - clearTimeout(this.idleTimer); - } - if (this.channelzEnabled) { - (0, channelz_1.unregisterChannelzRef)(this.channelzRef); - } - this.subchannelPool.unrefUnusedSubchannels(); - (_a = this.configSelector) === null || _a === void 0 ? void 0 : _a.unref(); - this.configSelector = null; - } - getTarget() { - return (0, uri_parser_1.uriToString)(this.target); - } - getConnectivityState(tryToConnect) { - const connectivityState = this.connectivityState; - if (tryToConnect) { - this.resolvingLoadBalancer.exitIdle(); - this.lastActivityTimestamp = new Date(); - this.maybeStartIdleTimer(); - } - return connectivityState; - } - watchConnectivityState(currentState, deadline, callback) { - if (this.connectivityState === connectivity_state_1.ConnectivityState.SHUTDOWN) { - throw new Error('Channel has been shut down'); - } - let timer = null; - if (deadline !== Infinity) { - const deadlineDate = deadline instanceof Date ? deadline : new Date(deadline); - const now = new Date(); - if (deadline === -Infinity || deadlineDate <= now) { - process.nextTick(callback, new Error('Deadline passed without connectivity state change')); - return; - } - timer = setTimeout(() => { - this.removeConnectivityStateWatcher(watcherObject); - callback(new Error('Deadline passed without connectivity state change')); - }, deadlineDate.getTime() - now.getTime()); - } - const watcherObject = { - currentState, - callback, - timer, - }; - this.connectivityStateWatchers.push(watcherObject); - } - /** - * Get the channelz reference object for this channel. The returned value is - * garbage if channelz is disabled for this channel. - * @returns - */ - getChannelzRef() { - return this.channelzRef; - } - createCall(method, deadline, host, parentCall, propagateFlags) { - if (typeof method !== 'string') { - throw new TypeError('Channel#createCall: method must be a string'); - } - if (!(typeof deadline === 'number' || deadline instanceof Date)) { - throw new TypeError('Channel#createCall: deadline must be a number or Date'); - } - if (this.connectivityState === connectivity_state_1.ConnectivityState.SHUTDOWN) { - throw new Error('Channel has been shut down'); - } - return this.createResolvingCall(method, deadline, host, parentCall, propagateFlags); - } - getOptions() { - return this.options; - } -} -exports.InternalChannel = InternalChannel; -//# sourceMappingURL=internal-channel.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/internal-channel.js.map b/node_modules/@grpc/grpc-js/build/src/internal-channel.js.map deleted file mode 100644 index 70174ab..0000000 --- a/node_modules/@grpc/grpc-js/build/src/internal-channel.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"internal-channel.js","sourceRoot":"","sources":["../../src/internal-channel.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,+DAA2D;AAE3D,uEAAkE;AAClE,uDAAsE;AAEtE,qCAAwG;AACxG,yCAAsC;AACtC,2CAA8D;AAC9D,iDAAoD;AACpD,6DAAgE;AAChE,yCAKoB;AACpB,uCAAmD;AAEnD,6CAA4C;AAC5C,6CAA8D;AAG9D,6DAAyD;AACzD,yCASoB;AACpB,+DAA0D;AAG1D,yCAAwD;AACxD,qDAAiD;AACjD,+CAAkD;AAClD,iEAAwE;AACxE,mDAIyB;AACzB,iEAIgC;AAEhC;;GAEG;AACH,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAEpC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAEjC,aAAa;AACb,MAAM,uBAAuB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AA2B/C,MAAM,mBAAmB,GAAgC,IAAI,GAAG,EAAE,CAAC;AAEnE,MAAM,+BAA+B,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ;AACzD,MAAM,uCAAuC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO;AAEhE,MAAM,wBACJ,SAAQ,4CAAqB;IAK7B,YACE,eAAoC,EAC5B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AAC,GAAG,EAAE;gBACtB,IAAI,CAAC,8BAA8B,CAAC,aAAa,CAAC,CAAC;gBACnD,QAAQ,CACN,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAC/D,CAAC;YACJ,CAAC,EAAE,YAAY,CAAC,OAAO,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QAC7C,CAAC;QACD,MAAM,aAAa,GAAG;YACpB,YAAY;YACZ,QAAQ;YACR,KAAK;SACN,CAAC;QACF,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACrD,CAAC;IAED;;;;OAIG;IACH,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,UAAU,CACR,MAAc,EACd,QAAkB,EAClB,IAA+B,EAC/B,UAAoC,EACpC,cAAyC;QAEzC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,MAAM,IAAI,SAAS,CAAC,6CAA6C,CAAC,CAAC;QACrE,CAAC;QACD,IAAI,CAAC,CAAC,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,YAAY,IAAI,CAAC,EAAE,CAAC;YAChE,MAAM,IAAI,SAAS,CACjB,uDAAuD,CACxD,CAAC;QACJ,CAAC;QACD,IAAI,IAAI,CAAC,iBAAiB,KAAK,sCAAiB,CAAC,QAAQ,EAAE,CAAC;YAC1D,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,IAAI,CAAC,mBAAmB,CAC7B,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,cAAc,CACf,CAAC;IACJ,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AAprBD,0CAorBC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.d.ts b/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.d.ts deleted file mode 100644 index c3d571f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ChannelControlHelper, TypedLoadBalancingConfig } from './load-balancer'; -import { Endpoint } from './subchannel-address'; -import { ChannelOptions } from './channel-options'; -import { StatusOr } from './call-interface'; -export declare class ChildLoadBalancerHandler { - private readonly channelControlHelper; - private currentChild; - private pendingChild; - private latestConfig; - private ChildPolicyHelper; - constructor(channelControlHelper: ChannelControlHelper); - protected configUpdateRequiresNewPolicyInstance(oldConfig: TypedLoadBalancingConfig, newConfig: TypedLoadBalancingConfig): boolean; - /** - * Prerequisites: lbConfig !== null and lbConfig.name is registered - * @param endpointList - * @param lbConfig - * @param attributes - */ - updateAddressList(endpointList: StatusOr, lbConfig: TypedLoadBalancingConfig, options: ChannelOptions, resolutionNote: string): boolean; - exitIdle(): void; - resetBackoff(): void; - destroy(): void; - getTypeName(): string; -} diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js b/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js deleted file mode 100644 index d8c37a9..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js +++ /dev/null @@ -1,151 +0,0 @@ -"use strict"; -/* - * Copyright 2020 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChildLoadBalancerHandler = void 0; -const load_balancer_1 = require("./load-balancer"); -const connectivity_state_1 = require("./connectivity-state"); -const TYPE_NAME = 'child_load_balancer_helper'; -class ChildLoadBalancerHandler { - constructor(channelControlHelper) { - this.channelControlHelper = channelControlHelper; - this.currentChild = null; - this.pendingChild = null; - this.latestConfig = null; - this.ChildPolicyHelper = class { - constructor(parent) { - this.parent = parent; - this.child = null; - } - createSubchannel(subchannelAddress, subchannelArgs) { - return this.parent.channelControlHelper.createSubchannel(subchannelAddress, subchannelArgs); - } - updateState(connectivityState, picker, errorMessage) { - var _a; - if (this.calledByPendingChild()) { - if (connectivityState === connectivity_state_1.ConnectivityState.CONNECTING) { - return; - } - (_a = this.parent.currentChild) === null || _a === void 0 ? void 0 : _a.destroy(); - this.parent.currentChild = this.parent.pendingChild; - this.parent.pendingChild = null; - } - else if (!this.calledByCurrentChild()) { - return; - } - this.parent.channelControlHelper.updateState(connectivityState, picker, errorMessage); - } - requestReresolution() { - var _a; - const latestChild = (_a = this.parent.pendingChild) !== null && _a !== void 0 ? _a : this.parent.currentChild; - if (this.child === latestChild) { - this.parent.channelControlHelper.requestReresolution(); - } - } - setChild(newChild) { - this.child = newChild; - } - addChannelzChild(child) { - this.parent.channelControlHelper.addChannelzChild(child); - } - removeChannelzChild(child) { - this.parent.channelControlHelper.removeChannelzChild(child); - } - calledByPendingChild() { - return this.child === this.parent.pendingChild; - } - calledByCurrentChild() { - return this.child === this.parent.currentChild; - } - }; - } - configUpdateRequiresNewPolicyInstance(oldConfig, newConfig) { - return oldConfig.getLoadBalancerName() !== newConfig.getLoadBalancerName(); - } - /** - * Prerequisites: lbConfig !== null and lbConfig.name is registered - * @param endpointList - * @param lbConfig - * @param attributes - */ - updateAddressList(endpointList, lbConfig, options, resolutionNote) { - let childToUpdate; - if (this.currentChild === null || - this.latestConfig === null || - this.configUpdateRequiresNewPolicyInstance(this.latestConfig, lbConfig)) { - const newHelper = new this.ChildPolicyHelper(this); - const newChild = (0, load_balancer_1.createLoadBalancer)(lbConfig, newHelper); - newHelper.setChild(newChild); - if (this.currentChild === null) { - this.currentChild = newChild; - childToUpdate = this.currentChild; - } - else { - if (this.pendingChild) { - this.pendingChild.destroy(); - } - this.pendingChild = newChild; - childToUpdate = this.pendingChild; - } - } - else { - if (this.pendingChild === null) { - childToUpdate = this.currentChild; - } - else { - childToUpdate = this.pendingChild; - } - } - this.latestConfig = lbConfig; - return childToUpdate.updateAddressList(endpointList, lbConfig, options, resolutionNote); - } - exitIdle() { - if (this.currentChild) { - this.currentChild.exitIdle(); - if (this.pendingChild) { - this.pendingChild.exitIdle(); - } - } - } - resetBackoff() { - if (this.currentChild) { - this.currentChild.resetBackoff(); - if (this.pendingChild) { - this.pendingChild.resetBackoff(); - } - } - } - destroy() { - /* Note: state updates are only propagated from the child balancer if that - * object is equal to this.currentChild or this.pendingChild. Since this - * function sets both of those to null, no further state updates will - * occur after this function returns. */ - if (this.currentChild) { - this.currentChild.destroy(); - this.currentChild = null; - } - if (this.pendingChild) { - this.pendingChild.destroy(); - this.pendingChild = null; - } - } - getTypeName() { - return TYPE_NAME; - } -} -exports.ChildLoadBalancerHandler = ChildLoadBalancerHandler; -//# sourceMappingURL=load-balancer-child-handler.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js.map b/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js.map deleted file mode 100644 index 26f16dc..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load-balancer-child-handler.js","sourceRoot":"","sources":["../../src/load-balancer-child-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,mDAKyB;AAGzB,6DAAyD;AAMzD,MAAM,SAAS,GAAG,4BAA4B,CAAC;AAE/C,MAAa,wBAAwB;IAsDnC,YACmB,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;QAtDrD,iBAAY,GAAwB,IAAI,CAAC;QACzC,iBAAY,GAAwB,IAAI,CAAC;QACzC,iBAAY,GAAoC,IAAI,CAAC;QAErD,sBAAiB,GAAG;YAE1B,YAAoB,MAAgC;gBAAhC,WAAM,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I,CAAC,YAAY,GAAG,IAAI,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,WAAW;QACT,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AA3ID,4DA2IC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.d.ts b/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.d.ts deleted file mode 100644 index afcee90..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { ChannelOptions } from './channel-options'; -import { Duration } from './duration'; -import { ChannelControlHelper } from './experimental'; -import { LoadBalancer, TypedLoadBalancingConfig } from './load-balancer'; -import { Endpoint } from './subchannel-address'; -import { LoadBalancingConfig } from './service-config'; -import { StatusOr } from './call-interface'; -export interface SuccessRateEjectionConfig { - readonly stdev_factor: number; - readonly enforcement_percentage: number; - readonly minimum_hosts: number; - readonly request_volume: number; -} -export interface FailurePercentageEjectionConfig { - readonly threshold: number; - readonly enforcement_percentage: number; - readonly minimum_hosts: number; - readonly request_volume: number; -} -export interface OutlierDetectionRawConfig { - interval?: Duration; - base_ejection_time?: Duration; - max_ejection_time?: Duration; - max_ejection_percent?: number; - success_rate_ejection?: Partial; - failure_percentage_ejection?: Partial; - child_policy: LoadBalancingConfig[]; -} -export declare class OutlierDetectionLoadBalancingConfig implements TypedLoadBalancingConfig { - private readonly childPolicy; - private readonly intervalMs; - private readonly baseEjectionTimeMs; - private readonly maxEjectionTimeMs; - private readonly maxEjectionPercent; - private readonly successRateEjection; - private readonly failurePercentageEjection; - constructor(intervalMs: number | null, baseEjectionTimeMs: number | null, maxEjectionTimeMs: number | null, maxEjectionPercent: number | null, successRateEjection: Partial | null, failurePercentageEjection: Partial | null, childPolicy: TypedLoadBalancingConfig); - getLoadBalancerName(): string; - toJsonObject(): object; - getIntervalMs(): number; - getBaseEjectionTimeMs(): number; - getMaxEjectionTimeMs(): number; - getMaxEjectionPercent(): number; - getSuccessRateEjectionConfig(): SuccessRateEjectionConfig | null; - getFailurePercentageEjectionConfig(): FailurePercentageEjectionConfig | null; - getChildPolicy(): TypedLoadBalancingConfig; - static createFromJson(obj: any): OutlierDetectionLoadBalancingConfig; -} -export declare class OutlierDetectionLoadBalancer implements LoadBalancer { - private childBalancer; - private entryMap; - private latestConfig; - private ejectionTimer; - private timerStartTime; - constructor(channelControlHelper: ChannelControlHelper); - private isCountingEnabled; - private getCurrentEjectionPercent; - private runSuccessRateCheck; - private runFailurePercentageCheck; - private eject; - private uneject; - private switchAllBuckets; - private startTimer; - private runChecks; - updateAddressList(endpointList: StatusOr, lbConfig: TypedLoadBalancingConfig, options: ChannelOptions, resolutionNote: string): boolean; - exitIdle(): void; - resetBackoff(): void; - destroy(): void; - getTypeName(): string; -} -export declare function setup(): void; diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.js b/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.js deleted file mode 100644 index ee32bf3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.js +++ /dev/null @@ -1,571 +0,0 @@ -"use strict"; -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OutlierDetectionLoadBalancer = exports.OutlierDetectionLoadBalancingConfig = void 0; -exports.setup = setup; -const connectivity_state_1 = require("./connectivity-state"); -const constants_1 = require("./constants"); -const duration_1 = require("./duration"); -const experimental_1 = require("./experimental"); -const load_balancer_1 = require("./load-balancer"); -const load_balancer_child_handler_1 = require("./load-balancer-child-handler"); -const picker_1 = require("./picker"); -const subchannel_address_1 = require("./subchannel-address"); -const subchannel_interface_1 = require("./subchannel-interface"); -const logging = require("./logging"); -const TRACER_NAME = 'outlier_detection'; -function trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text); -} -const TYPE_NAME = 'outlier_detection'; -const OUTLIER_DETECTION_ENABLED = ((_a = process.env.GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION) !== null && _a !== void 0 ? _a : 'true') === 'true'; -const defaultSuccessRateEjectionConfig = { - stdev_factor: 1900, - enforcement_percentage: 100, - minimum_hosts: 5, - request_volume: 100, -}; -const defaultFailurePercentageEjectionConfig = { - threshold: 85, - enforcement_percentage: 100, - minimum_hosts: 5, - request_volume: 50, -}; -function validateFieldType(obj, fieldName, expectedType, objectName) { - if (fieldName in obj && - obj[fieldName] !== undefined && - typeof obj[fieldName] !== expectedType) { - const fullFieldName = objectName ? `${objectName}.${fieldName}` : fieldName; - throw new Error(`outlier detection config ${fullFieldName} parse error: expected ${expectedType}, got ${typeof obj[fieldName]}`); - } -} -function validatePositiveDuration(obj, fieldName, objectName) { - const fullFieldName = objectName ? `${objectName}.${fieldName}` : fieldName; - if (fieldName in obj && obj[fieldName] !== undefined) { - if (!(0, duration_1.isDuration)(obj[fieldName])) { - throw new Error(`outlier detection config ${fullFieldName} parse error: expected Duration, got ${typeof obj[fieldName]}`); - } - if (!(obj[fieldName].seconds >= 0 && - obj[fieldName].seconds <= 315576000000 && - obj[fieldName].nanos >= 0 && - obj[fieldName].nanos <= 999999999)) { - throw new Error(`outlier detection config ${fullFieldName} parse error: values out of range for non-negative Duaration`); - } - } -} -function validatePercentage(obj, fieldName, objectName) { - const fullFieldName = objectName ? `${objectName}.${fieldName}` : fieldName; - validateFieldType(obj, fieldName, 'number', objectName); - if (fieldName in obj && - obj[fieldName] !== undefined && - !(obj[fieldName] >= 0 && obj[fieldName] <= 100)) { - throw new Error(`outlier detection config ${fullFieldName} parse error: value out of range for percentage (0-100)`); - } -} -class OutlierDetectionLoadBalancingConfig { - constructor(intervalMs, baseEjectionTimeMs, maxEjectionTimeMs, maxEjectionPercent, successRateEjection, failurePercentageEjection, childPolicy) { - this.childPolicy = childPolicy; - if (childPolicy.getLoadBalancerName() === 'pick_first') { - throw new Error('outlier_detection LB policy cannot have a pick_first child policy'); - } - this.intervalMs = intervalMs !== null && intervalMs !== void 0 ? intervalMs : 10000; - this.baseEjectionTimeMs = baseEjectionTimeMs !== null && baseEjectionTimeMs !== void 0 ? baseEjectionTimeMs : 30000; - this.maxEjectionTimeMs = maxEjectionTimeMs !== null && maxEjectionTimeMs !== void 0 ? maxEjectionTimeMs : 300000; - this.maxEjectionPercent = maxEjectionPercent !== null && maxEjectionPercent !== void 0 ? maxEjectionPercent : 10; - this.successRateEjection = successRateEjection - ? Object.assign(Object.assign({}, defaultSuccessRateEjectionConfig), successRateEjection) : null; - this.failurePercentageEjection = failurePercentageEjection - ? Object.assign(Object.assign({}, defaultFailurePercentageEjectionConfig), failurePercentageEjection) : null; - } - getLoadBalancerName() { - return TYPE_NAME; - } - toJsonObject() { - var _a, _b; - return { - outlier_detection: { - interval: (0, duration_1.msToDuration)(this.intervalMs), - base_ejection_time: (0, duration_1.msToDuration)(this.baseEjectionTimeMs), - max_ejection_time: (0, duration_1.msToDuration)(this.maxEjectionTimeMs), - max_ejection_percent: this.maxEjectionPercent, - success_rate_ejection: (_a = this.successRateEjection) !== null && _a !== void 0 ? _a : undefined, - failure_percentage_ejection: (_b = this.failurePercentageEjection) !== null && _b !== void 0 ? _b : undefined, - child_policy: [this.childPolicy.toJsonObject()], - }, - }; - } - getIntervalMs() { - return this.intervalMs; - } - getBaseEjectionTimeMs() { - return this.baseEjectionTimeMs; - } - getMaxEjectionTimeMs() { - return this.maxEjectionTimeMs; - } - getMaxEjectionPercent() { - return this.maxEjectionPercent; - } - getSuccessRateEjectionConfig() { - return this.successRateEjection; - } - getFailurePercentageEjectionConfig() { - return this.failurePercentageEjection; - } - getChildPolicy() { - return this.childPolicy; - } - static createFromJson(obj) { - var _a; - validatePositiveDuration(obj, 'interval'); - validatePositiveDuration(obj, 'base_ejection_time'); - validatePositiveDuration(obj, 'max_ejection_time'); - validatePercentage(obj, 'max_ejection_percent'); - if ('success_rate_ejection' in obj && - obj.success_rate_ejection !== undefined) { - if (typeof obj.success_rate_ejection !== 'object') { - throw new Error('outlier detection config success_rate_ejection must be an object'); - } - validateFieldType(obj.success_rate_ejection, 'stdev_factor', 'number', 'success_rate_ejection'); - validatePercentage(obj.success_rate_ejection, 'enforcement_percentage', 'success_rate_ejection'); - validateFieldType(obj.success_rate_ejection, 'minimum_hosts', 'number', 'success_rate_ejection'); - validateFieldType(obj.success_rate_ejection, 'request_volume', 'number', 'success_rate_ejection'); - } - if ('failure_percentage_ejection' in obj && - obj.failure_percentage_ejection !== undefined) { - if (typeof obj.failure_percentage_ejection !== 'object') { - throw new Error('outlier detection config failure_percentage_ejection must be an object'); - } - validatePercentage(obj.failure_percentage_ejection, 'threshold', 'failure_percentage_ejection'); - validatePercentage(obj.failure_percentage_ejection, 'enforcement_percentage', 'failure_percentage_ejection'); - validateFieldType(obj.failure_percentage_ejection, 'minimum_hosts', 'number', 'failure_percentage_ejection'); - validateFieldType(obj.failure_percentage_ejection, 'request_volume', 'number', 'failure_percentage_ejection'); - } - if (!('child_policy' in obj) || !Array.isArray(obj.child_policy)) { - throw new Error('outlier detection config child_policy must be an array'); - } - const childPolicy = (0, load_balancer_1.selectLbConfigFromList)(obj.child_policy); - if (!childPolicy) { - throw new Error('outlier detection config child_policy: no valid recognized policy found'); - } - return new OutlierDetectionLoadBalancingConfig(obj.interval ? (0, duration_1.durationToMs)(obj.interval) : null, obj.base_ejection_time ? (0, duration_1.durationToMs)(obj.base_ejection_time) : null, obj.max_ejection_time ? (0, duration_1.durationToMs)(obj.max_ejection_time) : null, (_a = obj.max_ejection_percent) !== null && _a !== void 0 ? _a : null, obj.success_rate_ejection, obj.failure_percentage_ejection, childPolicy); - } -} -exports.OutlierDetectionLoadBalancingConfig = OutlierDetectionLoadBalancingConfig; -class OutlierDetectionSubchannelWrapper extends subchannel_interface_1.BaseSubchannelWrapper { - constructor(childSubchannel, mapEntry) { - super(childSubchannel); - this.mapEntry = mapEntry; - this.refCount = 0; - } - ref() { - this.child.ref(); - this.refCount += 1; - } - unref() { - this.child.unref(); - this.refCount -= 1; - if (this.refCount <= 0) { - if (this.mapEntry) { - const index = this.mapEntry.subchannelWrappers.indexOf(this); - if (index >= 0) { - this.mapEntry.subchannelWrappers.splice(index, 1); - } - } - } - } - eject() { - this.setHealthy(false); - } - uneject() { - this.setHealthy(true); - } - getMapEntry() { - return this.mapEntry; - } - getWrappedSubchannel() { - return this.child; - } -} -function createEmptyBucket() { - return { - success: 0, - failure: 0, - }; -} -class CallCounter { - constructor() { - this.activeBucket = createEmptyBucket(); - this.inactiveBucket = createEmptyBucket(); - } - addSuccess() { - this.activeBucket.success += 1; - } - addFailure() { - this.activeBucket.failure += 1; - } - switchBuckets() { - this.inactiveBucket = this.activeBucket; - this.activeBucket = createEmptyBucket(); - } - getLastSuccesses() { - return this.inactiveBucket.success; - } - getLastFailures() { - return this.inactiveBucket.failure; - } -} -class OutlierDetectionPicker { - constructor(wrappedPicker, countCalls) { - this.wrappedPicker = wrappedPicker; - this.countCalls = countCalls; - } - pick(pickArgs) { - const wrappedPick = this.wrappedPicker.pick(pickArgs); - if (wrappedPick.pickResultType === picker_1.PickResultType.COMPLETE) { - const subchannelWrapper = wrappedPick.subchannel; - const mapEntry = subchannelWrapper.getMapEntry(); - if (mapEntry) { - let onCallEnded = wrappedPick.onCallEnded; - if (this.countCalls) { - onCallEnded = (statusCode, details, metadata) => { - var _a; - if (statusCode === constants_1.Status.OK) { - mapEntry.counter.addSuccess(); - } - else { - mapEntry.counter.addFailure(); - } - (_a = wrappedPick.onCallEnded) === null || _a === void 0 ? void 0 : _a.call(wrappedPick, statusCode, details, metadata); - }; - } - return Object.assign(Object.assign({}, wrappedPick), { subchannel: subchannelWrapper.getWrappedSubchannel(), onCallEnded: onCallEnded }); - } - else { - return Object.assign(Object.assign({}, wrappedPick), { subchannel: subchannelWrapper.getWrappedSubchannel() }); - } - } - else { - return wrappedPick; - } - } -} -class OutlierDetectionLoadBalancer { - constructor(channelControlHelper) { - this.entryMap = new subchannel_address_1.EndpointMap(); - this.latestConfig = null; - this.timerStartTime = null; - this.childBalancer = new load_balancer_child_handler_1.ChildLoadBalancerHandler((0, experimental_1.createChildChannelControlHelper)(channelControlHelper, { - createSubchannel: (subchannelAddress, subchannelArgs) => { - const originalSubchannel = channelControlHelper.createSubchannel(subchannelAddress, subchannelArgs); - const mapEntry = this.entryMap.getForSubchannelAddress(subchannelAddress); - const subchannelWrapper = new OutlierDetectionSubchannelWrapper(originalSubchannel, mapEntry); - if ((mapEntry === null || mapEntry === void 0 ? void 0 : mapEntry.currentEjectionTimestamp) !== null) { - // If the address is ejected, propagate that to the new subchannel wrapper - subchannelWrapper.eject(); - } - mapEntry === null || mapEntry === void 0 ? void 0 : mapEntry.subchannelWrappers.push(subchannelWrapper); - return subchannelWrapper; - }, - updateState: (connectivityState, picker, errorMessage) => { - if (connectivityState === connectivity_state_1.ConnectivityState.READY) { - channelControlHelper.updateState(connectivityState, new OutlierDetectionPicker(picker, this.isCountingEnabled()), errorMessage); - } - else { - channelControlHelper.updateState(connectivityState, picker, errorMessage); - } - }, - })); - this.ejectionTimer = setInterval(() => { }, 0); - clearInterval(this.ejectionTimer); - } - isCountingEnabled() { - return (this.latestConfig !== null && - (this.latestConfig.getSuccessRateEjectionConfig() !== null || - this.latestConfig.getFailurePercentageEjectionConfig() !== null)); - } - getCurrentEjectionPercent() { - let ejectionCount = 0; - for (const mapEntry of this.entryMap.values()) { - if (mapEntry.currentEjectionTimestamp !== null) { - ejectionCount += 1; - } - } - return (ejectionCount * 100) / this.entryMap.size; - } - runSuccessRateCheck(ejectionTimestamp) { - if (!this.latestConfig) { - return; - } - const successRateConfig = this.latestConfig.getSuccessRateEjectionConfig(); - if (!successRateConfig) { - return; - } - trace('Running success rate check'); - // Step 1 - const targetRequestVolume = successRateConfig.request_volume; - let addresesWithTargetVolume = 0; - const successRates = []; - for (const [endpoint, mapEntry] of this.entryMap.entries()) { - const successes = mapEntry.counter.getLastSuccesses(); - const failures = mapEntry.counter.getLastFailures(); - trace('Stats for ' + - (0, subchannel_address_1.endpointToString)(endpoint) + - ': successes=' + - successes + - ' failures=' + - failures + - ' targetRequestVolume=' + - targetRequestVolume); - if (successes + failures >= targetRequestVolume) { - addresesWithTargetVolume += 1; - successRates.push(successes / (successes + failures)); - } - } - trace('Found ' + - addresesWithTargetVolume + - ' success rate candidates; currentEjectionPercent=' + - this.getCurrentEjectionPercent() + - ' successRates=[' + - successRates + - ']'); - if (addresesWithTargetVolume < successRateConfig.minimum_hosts) { - return; - } - // Step 2 - const successRateMean = successRates.reduce((a, b) => a + b) / successRates.length; - let successRateDeviationSum = 0; - for (const rate of successRates) { - const deviation = rate - successRateMean; - successRateDeviationSum += deviation * deviation; - } - const successRateVariance = successRateDeviationSum / successRates.length; - const successRateStdev = Math.sqrt(successRateVariance); - const ejectionThreshold = successRateMean - - successRateStdev * (successRateConfig.stdev_factor / 1000); - trace('stdev=' + successRateStdev + ' ejectionThreshold=' + ejectionThreshold); - // Step 3 - for (const [address, mapEntry] of this.entryMap.entries()) { - // Step 3.i - if (this.getCurrentEjectionPercent() >= - this.latestConfig.getMaxEjectionPercent()) { - break; - } - // Step 3.ii - const successes = mapEntry.counter.getLastSuccesses(); - const failures = mapEntry.counter.getLastFailures(); - if (successes + failures < targetRequestVolume) { - continue; - } - // Step 3.iii - const successRate = successes / (successes + failures); - trace('Checking candidate ' + address + ' successRate=' + successRate); - if (successRate < ejectionThreshold) { - const randomNumber = Math.random() * 100; - trace('Candidate ' + - address + - ' randomNumber=' + - randomNumber + - ' enforcement_percentage=' + - successRateConfig.enforcement_percentage); - if (randomNumber < successRateConfig.enforcement_percentage) { - trace('Ejecting candidate ' + address); - this.eject(mapEntry, ejectionTimestamp); - } - } - } - } - runFailurePercentageCheck(ejectionTimestamp) { - if (!this.latestConfig) { - return; - } - const failurePercentageConfig = this.latestConfig.getFailurePercentageEjectionConfig(); - if (!failurePercentageConfig) { - return; - } - trace('Running failure percentage check. threshold=' + - failurePercentageConfig.threshold + - ' request volume threshold=' + - failurePercentageConfig.request_volume); - // Step 1 - let addressesWithTargetVolume = 0; - for (const mapEntry of this.entryMap.values()) { - const successes = mapEntry.counter.getLastSuccesses(); - const failures = mapEntry.counter.getLastFailures(); - if (successes + failures >= failurePercentageConfig.request_volume) { - addressesWithTargetVolume += 1; - } - } - if (addressesWithTargetVolume < failurePercentageConfig.minimum_hosts) { - return; - } - // Step 2 - for (const [address, mapEntry] of this.entryMap.entries()) { - // Step 2.i - if (this.getCurrentEjectionPercent() >= - this.latestConfig.getMaxEjectionPercent()) { - break; - } - // Step 2.ii - const successes = mapEntry.counter.getLastSuccesses(); - const failures = mapEntry.counter.getLastFailures(); - trace('Candidate successes=' + successes + ' failures=' + failures); - if (successes + failures < failurePercentageConfig.request_volume) { - continue; - } - // Step 2.iii - const failurePercentage = (failures * 100) / (failures + successes); - if (failurePercentage > failurePercentageConfig.threshold) { - const randomNumber = Math.random() * 100; - trace('Candidate ' + - address + - ' randomNumber=' + - randomNumber + - ' enforcement_percentage=' + - failurePercentageConfig.enforcement_percentage); - if (randomNumber < failurePercentageConfig.enforcement_percentage) { - trace('Ejecting candidate ' + address); - this.eject(mapEntry, ejectionTimestamp); - } - } - } - } - eject(mapEntry, ejectionTimestamp) { - mapEntry.currentEjectionTimestamp = new Date(); - mapEntry.ejectionTimeMultiplier += 1; - for (const subchannelWrapper of mapEntry.subchannelWrappers) { - subchannelWrapper.eject(); - } - } - uneject(mapEntry) { - mapEntry.currentEjectionTimestamp = null; - for (const subchannelWrapper of mapEntry.subchannelWrappers) { - subchannelWrapper.uneject(); - } - } - switchAllBuckets() { - for (const mapEntry of this.entryMap.values()) { - mapEntry.counter.switchBuckets(); - } - } - startTimer(delayMs) { - var _a, _b; - this.ejectionTimer = setTimeout(() => this.runChecks(), delayMs); - (_b = (_a = this.ejectionTimer).unref) === null || _b === void 0 ? void 0 : _b.call(_a); - } - runChecks() { - const ejectionTimestamp = new Date(); - trace('Ejection timer running'); - this.switchAllBuckets(); - if (!this.latestConfig) { - return; - } - this.timerStartTime = ejectionTimestamp; - this.startTimer(this.latestConfig.getIntervalMs()); - this.runSuccessRateCheck(ejectionTimestamp); - this.runFailurePercentageCheck(ejectionTimestamp); - for (const [address, mapEntry] of this.entryMap.entries()) { - if (mapEntry.currentEjectionTimestamp === null) { - if (mapEntry.ejectionTimeMultiplier > 0) { - mapEntry.ejectionTimeMultiplier -= 1; - } - } - else { - const baseEjectionTimeMs = this.latestConfig.getBaseEjectionTimeMs(); - const maxEjectionTimeMs = this.latestConfig.getMaxEjectionTimeMs(); - const returnTime = new Date(mapEntry.currentEjectionTimestamp.getTime()); - returnTime.setMilliseconds(returnTime.getMilliseconds() + - Math.min(baseEjectionTimeMs * mapEntry.ejectionTimeMultiplier, Math.max(baseEjectionTimeMs, maxEjectionTimeMs))); - if (returnTime < new Date()) { - trace('Unejecting ' + address); - this.uneject(mapEntry); - } - } - } - } - updateAddressList(endpointList, lbConfig, options, resolutionNote) { - if (!(lbConfig instanceof OutlierDetectionLoadBalancingConfig)) { - return false; - } - trace('Received update with config: ' + JSON.stringify(lbConfig.toJsonObject(), undefined, 2)); - if (endpointList.ok) { - for (const endpoint of endpointList.value) { - if (!this.entryMap.has(endpoint)) { - trace('Adding map entry for ' + (0, subchannel_address_1.endpointToString)(endpoint)); - this.entryMap.set(endpoint, { - counter: new CallCounter(), - currentEjectionTimestamp: null, - ejectionTimeMultiplier: 0, - subchannelWrappers: [], - }); - } - } - this.entryMap.deleteMissing(endpointList.value); - } - const childPolicy = lbConfig.getChildPolicy(); - this.childBalancer.updateAddressList(endpointList, childPolicy, options, resolutionNote); - if (lbConfig.getSuccessRateEjectionConfig() || - lbConfig.getFailurePercentageEjectionConfig()) { - if (this.timerStartTime) { - trace('Previous timer existed. Replacing timer'); - clearTimeout(this.ejectionTimer); - const remainingDelay = lbConfig.getIntervalMs() - - (new Date().getTime() - this.timerStartTime.getTime()); - this.startTimer(remainingDelay); - } - else { - trace('Starting new timer'); - this.timerStartTime = new Date(); - this.startTimer(lbConfig.getIntervalMs()); - this.switchAllBuckets(); - } - } - else { - trace('Counting disabled. Cancelling timer.'); - this.timerStartTime = null; - clearTimeout(this.ejectionTimer); - for (const mapEntry of this.entryMap.values()) { - this.uneject(mapEntry); - mapEntry.ejectionTimeMultiplier = 0; - } - } - this.latestConfig = lbConfig; - return true; - } - exitIdle() { - this.childBalancer.exitIdle(); - } - resetBackoff() { - this.childBalancer.resetBackoff(); - } - destroy() { - clearTimeout(this.ejectionTimer); - this.childBalancer.destroy(); - } - getTypeName() { - return TYPE_NAME; - } -} -exports.OutlierDetectionLoadBalancer = OutlierDetectionLoadBalancer; -function setup() { - if (OUTLIER_DETECTION_ENABLED) { - (0, experimental_1.registerLoadBalancerType)(TYPE_NAME, OutlierDetectionLoadBalancer, OutlierDetectionLoadBalancingConfig); - } -} -//# sourceMappingURL=load-balancer-outlier-detection.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.js.map b/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.js.map deleted file mode 100644 index eebff2e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load-balancer-outlier-detection.js","sourceRoot":"","sources":["../../src/load-balancer-outlier-detection.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;AAgzBH,sBAQC;AArzBD,6DAAyD;AACzD,2CAAmD;AACnD,yCAA8E;AAC9E,iDAIwB;AACxB,mDAIyB;AACzB,+EAAyE;AACzE,qCAAwE;AACxE,6DAK8B;AAC9B,iEAGgC;AAChC,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,CAAC;CACF;AA9WD,oEA8WC;AAED,SAAgB,KAAK;IACnB,IAAI,yBAAyB,EAAE,CAAC;QAC9B,IAAA,uCAAwB,EACtB,SAAS,EACT,4BAA4B,EAC5B,mCAAmC,CACpC,CAAC;IACJ,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.d.ts b/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.d.ts deleted file mode 100644 index d49e02b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { LoadBalancer, ChannelControlHelper, TypedLoadBalancingConfig } from './load-balancer'; -import { ConnectivityState } from './connectivity-state'; -import { Picker } from './picker'; -import { Endpoint } from './subchannel-address'; -import { ChannelOptions } from './channel-options'; -import { StatusOr } from './call-interface'; -export declare class PickFirstLoadBalancingConfig implements TypedLoadBalancingConfig { - private readonly shuffleAddressList; - constructor(shuffleAddressList: boolean); - getLoadBalancerName(): string; - toJsonObject(): object; - getShuffleAddressList(): boolean; - static createFromJson(obj: any): PickFirstLoadBalancingConfig; -} -/** - * Return a new array with the elements of the input array in a random order - * @param list The input array - * @returns A shuffled array of the elements of list - */ -export declare function shuffled(list: T[]): T[]; -export declare class PickFirstLoadBalancer implements LoadBalancer { - private readonly channelControlHelper; - /** - * The list of subchannels this load balancer is currently attempting to - * connect to. - */ - private children; - /** - * The current connectivity state of the load balancer. - */ - private currentState; - /** - * The index within the `subchannels` array of the subchannel with the most - * recently started connection attempt. - */ - private currentSubchannelIndex; - /** - * The currently picked subchannel used for making calls. Populated if - * and only if the load balancer's current state is READY. In that case, - * the subchannel's current state is also READY. - */ - private currentPick; - /** - * Listener callback attached to each subchannel in the `subchannels` list - * while establishing a connection. - */ - private subchannelStateListener; - private pickedSubchannelHealthListener; - /** - * Timer reference for the timer tracking when to start - */ - private connectionDelayTimeout; - /** - * The LB policy enters sticky TRANSIENT_FAILURE mode when all - * subchannels have failed to connect at least once, and it stays in that - * mode until a connection attempt is successful. While in sticky TF mode, - * the LB policy continuously attempts to connect to all of its subchannels. - */ - private stickyTransientFailureMode; - private reportHealthStatus; - /** - * The most recent error reported by any subchannel as it transitioned to - * TRANSIENT_FAILURE. - */ - private lastError; - private latestAddressList; - private latestOptions; - private latestResolutionNote; - /** - * Load balancer that attempts to connect to each backend in the address list - * in order, and picks the first one that connects, using it for every - * request. - * @param channelControlHelper `ChannelControlHelper` instance provided by - * this load balancer's owner. - */ - constructor(channelControlHelper: ChannelControlHelper); - private allChildrenHaveReportedTF; - private resetChildrenReportedTF; - private calculateAndReportNewState; - private requestReresolution; - private maybeEnterStickyTransientFailureMode; - private removeCurrentPick; - private onSubchannelStateUpdate; - private startNextSubchannelConnecting; - /** - * Have a single subchannel in the `subchannels` list start connecting. - * @param subchannelIndex The index into the `subchannels` list. - */ - private startConnecting; - /** - * Declare that the specified subchannel should be used to make requests. - * This functions the same independent of whether subchannel is a member of - * this.children and whether it is equal to this.currentPick. - * Prerequisite: subchannel.getConnectivityState() === READY. - * @param subchannel - */ - private pickSubchannel; - private updateState; - private resetSubchannelList; - private connectToAddressList; - updateAddressList(maybeEndpointList: StatusOr, lbConfig: TypedLoadBalancingConfig, options: ChannelOptions, resolutionNote: string): boolean; - exitIdle(): void; - resetBackoff(): void; - destroy(): void; - getTypeName(): string; -} -/** - * This class handles the leaf load balancing operations for a single endpoint. - * It is a thin wrapper around a PickFirstLoadBalancer with a different API - * that more closely reflects how it will be used as a leaf balancer. - */ -export declare class LeafLoadBalancer { - private endpoint; - private options; - private resolutionNote; - private pickFirstBalancer; - private latestState; - private latestPicker; - constructor(endpoint: Endpoint, channelControlHelper: ChannelControlHelper, options: ChannelOptions, resolutionNote: string); - startConnecting(): void; - /** - * Update the endpoint associated with this LeafLoadBalancer to a new - * endpoint. Does not trigger connection establishment if a connection - * attempt is not already in progress. - * @param newEndpoint - */ - updateEndpoint(newEndpoint: Endpoint, newOptions: ChannelOptions): void; - getConnectivityState(): ConnectivityState; - getPicker(): Picker; - getEndpoint(): Endpoint; - exitIdle(): void; - destroy(): void; -} -export declare function setup(): void; diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js b/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js deleted file mode 100644 index c68ef12..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js +++ /dev/null @@ -1,514 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LeafLoadBalancer = exports.PickFirstLoadBalancer = exports.PickFirstLoadBalancingConfig = void 0; -exports.shuffled = shuffled; -exports.setup = setup; -const load_balancer_1 = require("./load-balancer"); -const connectivity_state_1 = require("./connectivity-state"); -const picker_1 = require("./picker"); -const subchannel_address_1 = require("./subchannel-address"); -const logging = require("./logging"); -const constants_1 = require("./constants"); -const subchannel_address_2 = require("./subchannel-address"); -const net_1 = require("net"); -const call_interface_1 = require("./call-interface"); -const TRACER_NAME = 'pick_first'; -function trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text); -} -const TYPE_NAME = 'pick_first'; -/** - * Delay after starting a connection on a subchannel before starting a - * connection on the next subchannel in the list, for Happy Eyeballs algorithm. - */ -const CONNECTION_DELAY_INTERVAL_MS = 250; -class PickFirstLoadBalancingConfig { - constructor(shuffleAddressList) { - this.shuffleAddressList = shuffleAddressList; - } - getLoadBalancerName() { - return TYPE_NAME; - } - toJsonObject() { - return { - [TYPE_NAME]: { - shuffleAddressList: this.shuffleAddressList, - }, - }; - } - getShuffleAddressList() { - return this.shuffleAddressList; - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - static createFromJson(obj) { - if ('shuffleAddressList' in obj && - !(typeof obj.shuffleAddressList === 'boolean')) { - throw new Error('pick_first config field shuffleAddressList must be a boolean if provided'); - } - return new PickFirstLoadBalancingConfig(obj.shuffleAddressList === true); - } -} -exports.PickFirstLoadBalancingConfig = PickFirstLoadBalancingConfig; -/** - * Picker for a `PickFirstLoadBalancer` in the READY state. Always returns the - * picked subchannel. - */ -class PickFirstPicker { - constructor(subchannel) { - this.subchannel = subchannel; - } - pick(pickArgs) { - return { - pickResultType: picker_1.PickResultType.COMPLETE, - subchannel: this.subchannel, - status: null, - onCallStarted: null, - onCallEnded: null, - }; - } -} -/** - * Return a new array with the elements of the input array in a random order - * @param list The input array - * @returns A shuffled array of the elements of list - */ -function shuffled(list) { - const result = list.slice(); - for (let i = result.length - 1; i > 1; i--) { - const j = Math.floor(Math.random() * (i + 1)); - const temp = result[i]; - result[i] = result[j]; - result[j] = temp; - } - return result; -} -/** - * Interleave addresses in addressList by family in accordance with RFC-8304 section 4 - * @param addressList - * @returns - */ -function interleaveAddressFamilies(addressList) { - if (addressList.length === 0) { - return []; - } - const result = []; - const ipv6Addresses = []; - const ipv4Addresses = []; - const ipv6First = (0, subchannel_address_2.isTcpSubchannelAddress)(addressList[0]) && (0, net_1.isIPv6)(addressList[0].host); - for (const address of addressList) { - if ((0, subchannel_address_2.isTcpSubchannelAddress)(address) && (0, net_1.isIPv6)(address.host)) { - ipv6Addresses.push(address); - } - else { - ipv4Addresses.push(address); - } - } - const firstList = ipv6First ? ipv6Addresses : ipv4Addresses; - const secondList = ipv6First ? ipv4Addresses : ipv6Addresses; - for (let i = 0; i < Math.max(firstList.length, secondList.length); i++) { - if (i < firstList.length) { - result.push(firstList[i]); - } - if (i < secondList.length) { - result.push(secondList[i]); - } - } - return result; -} -const REPORT_HEALTH_STATUS_OPTION_NAME = 'grpc-node.internal.pick-first.report_health_status'; -class PickFirstLoadBalancer { - /** - * Load balancer that attempts to connect to each backend in the address list - * in order, and picks the first one that connects, using it for every - * request. - * @param channelControlHelper `ChannelControlHelper` instance provided by - * this load balancer's owner. - */ - constructor(channelControlHelper) { - this.channelControlHelper = channelControlHelper; - /** - * The list of subchannels this load balancer is currently attempting to - * connect to. - */ - this.children = []; - /** - * The current connectivity state of the load balancer. - */ - this.currentState = connectivity_state_1.ConnectivityState.IDLE; - /** - * The index within the `subchannels` array of the subchannel with the most - * recently started connection attempt. - */ - this.currentSubchannelIndex = 0; - /** - * The currently picked subchannel used for making calls. Populated if - * and only if the load balancer's current state is READY. In that case, - * the subchannel's current state is also READY. - */ - this.currentPick = null; - /** - * Listener callback attached to each subchannel in the `subchannels` list - * while establishing a connection. - */ - this.subchannelStateListener = (subchannel, previousState, newState, keepaliveTime, errorMessage) => { - this.onSubchannelStateUpdate(subchannel, previousState, newState, errorMessage); - }; - this.pickedSubchannelHealthListener = () => this.calculateAndReportNewState(); - /** - * The LB policy enters sticky TRANSIENT_FAILURE mode when all - * subchannels have failed to connect at least once, and it stays in that - * mode until a connection attempt is successful. While in sticky TF mode, - * the LB policy continuously attempts to connect to all of its subchannels. - */ - this.stickyTransientFailureMode = false; - this.reportHealthStatus = false; - /** - * The most recent error reported by any subchannel as it transitioned to - * TRANSIENT_FAILURE. - */ - this.lastError = null; - this.latestAddressList = null; - this.latestOptions = {}; - this.latestResolutionNote = ''; - this.connectionDelayTimeout = setTimeout(() => { }, 0); - clearTimeout(this.connectionDelayTimeout); - } - allChildrenHaveReportedTF() { - return this.children.every(child => child.hasReportedTransientFailure); - } - resetChildrenReportedTF() { - this.children.every(child => child.hasReportedTransientFailure = false); - } - calculateAndReportNewState() { - var _a; - if (this.currentPick) { - if (this.reportHealthStatus && !this.currentPick.isHealthy()) { - const errorMessage = `Picked subchannel ${this.currentPick.getAddress()} is unhealthy`; - this.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker({ - details: errorMessage, - }), errorMessage); - } - else { - this.updateState(connectivity_state_1.ConnectivityState.READY, new PickFirstPicker(this.currentPick), null); - } - } - else if (((_a = this.latestAddressList) === null || _a === void 0 ? void 0 : _a.length) === 0) { - const errorMessage = `No connection established. Last error: ${this.lastError}. Resolution note: ${this.latestResolutionNote}`; - this.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker({ - details: errorMessage, - }), errorMessage); - } - else if (this.children.length === 0) { - this.updateState(connectivity_state_1.ConnectivityState.IDLE, new picker_1.QueuePicker(this), null); - } - else { - if (this.stickyTransientFailureMode) { - const errorMessage = `No connection established. Last error: ${this.lastError}. Resolution note: ${this.latestResolutionNote}`; - this.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker({ - details: errorMessage, - }), errorMessage); - } - else { - this.updateState(connectivity_state_1.ConnectivityState.CONNECTING, new picker_1.QueuePicker(this), null); - } - } - } - requestReresolution() { - this.channelControlHelper.requestReresolution(); - } - maybeEnterStickyTransientFailureMode() { - if (!this.allChildrenHaveReportedTF()) { - return; - } - this.requestReresolution(); - this.resetChildrenReportedTF(); - if (this.stickyTransientFailureMode) { - this.calculateAndReportNewState(); - return; - } - this.stickyTransientFailureMode = true; - for (const { subchannel } of this.children) { - subchannel.startConnecting(); - } - this.calculateAndReportNewState(); - } - removeCurrentPick() { - if (this.currentPick !== null) { - this.currentPick.removeConnectivityStateListener(this.subchannelStateListener); - this.channelControlHelper.removeChannelzChild(this.currentPick.getChannelzRef()); - this.currentPick.removeHealthStateWatcher(this.pickedSubchannelHealthListener); - // Unref last, to avoid triggering listeners - this.currentPick.unref(); - this.currentPick = null; - } - } - onSubchannelStateUpdate(subchannel, previousState, newState, errorMessage) { - var _a; - if ((_a = this.currentPick) === null || _a === void 0 ? void 0 : _a.realSubchannelEquals(subchannel)) { - if (newState !== connectivity_state_1.ConnectivityState.READY) { - this.removeCurrentPick(); - this.calculateAndReportNewState(); - } - return; - } - for (const [index, child] of this.children.entries()) { - if (subchannel.realSubchannelEquals(child.subchannel)) { - if (newState === connectivity_state_1.ConnectivityState.READY) { - this.pickSubchannel(child.subchannel); - } - if (newState === connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE) { - child.hasReportedTransientFailure = true; - if (errorMessage) { - this.lastError = errorMessage; - } - this.maybeEnterStickyTransientFailureMode(); - if (index === this.currentSubchannelIndex) { - this.startNextSubchannelConnecting(index + 1); - } - } - child.subchannel.startConnecting(); - return; - } - } - } - startNextSubchannelConnecting(startIndex) { - clearTimeout(this.connectionDelayTimeout); - for (const [index, child] of this.children.entries()) { - if (index >= startIndex) { - const subchannelState = child.subchannel.getConnectivityState(); - if (subchannelState === connectivity_state_1.ConnectivityState.IDLE || - subchannelState === connectivity_state_1.ConnectivityState.CONNECTING) { - this.startConnecting(index); - return; - } - } - } - this.maybeEnterStickyTransientFailureMode(); - } - /** - * Have a single subchannel in the `subchannels` list start connecting. - * @param subchannelIndex The index into the `subchannels` list. - */ - startConnecting(subchannelIndex) { - var _a, _b; - clearTimeout(this.connectionDelayTimeout); - this.currentSubchannelIndex = subchannelIndex; - if (this.children[subchannelIndex].subchannel.getConnectivityState() === - connectivity_state_1.ConnectivityState.IDLE) { - trace('Start connecting to subchannel with address ' + - this.children[subchannelIndex].subchannel.getAddress()); - process.nextTick(() => { - var _a; - (_a = this.children[subchannelIndex]) === null || _a === void 0 ? void 0 : _a.subchannel.startConnecting(); - }); - } - this.connectionDelayTimeout = setTimeout(() => { - this.startNextSubchannelConnecting(subchannelIndex + 1); - }, CONNECTION_DELAY_INTERVAL_MS); - (_b = (_a = this.connectionDelayTimeout).unref) === null || _b === void 0 ? void 0 : _b.call(_a); - } - /** - * Declare that the specified subchannel should be used to make requests. - * This functions the same independent of whether subchannel is a member of - * this.children and whether it is equal to this.currentPick. - * Prerequisite: subchannel.getConnectivityState() === READY. - * @param subchannel - */ - pickSubchannel(subchannel) { - trace('Pick subchannel with address ' + subchannel.getAddress()); - this.stickyTransientFailureMode = false; - /* Ref before removeCurrentPick and resetSubchannelList to avoid the - * refcount dropping to 0 during this process. */ - subchannel.ref(); - this.channelControlHelper.addChannelzChild(subchannel.getChannelzRef()); - this.removeCurrentPick(); - this.resetSubchannelList(); - subchannel.addConnectivityStateListener(this.subchannelStateListener); - subchannel.addHealthStateWatcher(this.pickedSubchannelHealthListener); - this.currentPick = subchannel; - clearTimeout(this.connectionDelayTimeout); - this.calculateAndReportNewState(); - } - updateState(newState, picker, errorMessage) { - trace(connectivity_state_1.ConnectivityState[this.currentState] + - ' -> ' + - connectivity_state_1.ConnectivityState[newState]); - this.currentState = newState; - this.channelControlHelper.updateState(newState, picker, errorMessage); - } - resetSubchannelList() { - for (const child of this.children) { - /* Always remoev the connectivity state listener. If the subchannel is - getting picked, it will be re-added then. */ - child.subchannel.removeConnectivityStateListener(this.subchannelStateListener); - /* Refs are counted independently for the children list and the - * currentPick, so we call unref whether or not the child is the - * currentPick. Channelz child references are also refcounted, so - * removeChannelzChild can be handled the same way. */ - child.subchannel.unref(); - this.channelControlHelper.removeChannelzChild(child.subchannel.getChannelzRef()); - } - this.currentSubchannelIndex = 0; - this.children = []; - } - connectToAddressList(addressList, options) { - trace('connectToAddressList([' + addressList.map(address => (0, subchannel_address_1.subchannelAddressToString)(address)) + '])'); - const newChildrenList = addressList.map(address => ({ - subchannel: this.channelControlHelper.createSubchannel(address, options), - hasReportedTransientFailure: false, - })); - for (const { subchannel } of newChildrenList) { - if (subchannel.getConnectivityState() === connectivity_state_1.ConnectivityState.READY) { - this.pickSubchannel(subchannel); - return; - } - } - /* Ref each subchannel before resetting the list, to ensure that - * subchannels shared between the list don't drop to 0 refs during the - * transition. */ - for (const { subchannel } of newChildrenList) { - subchannel.ref(); - this.channelControlHelper.addChannelzChild(subchannel.getChannelzRef()); - } - this.resetSubchannelList(); - this.children = newChildrenList; - for (const { subchannel } of this.children) { - subchannel.addConnectivityStateListener(this.subchannelStateListener); - } - for (const child of this.children) { - if (child.subchannel.getConnectivityState() === - connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE) { - child.hasReportedTransientFailure = true; - } - } - this.startNextSubchannelConnecting(0); - this.calculateAndReportNewState(); - } - updateAddressList(maybeEndpointList, lbConfig, options, resolutionNote) { - if (!(lbConfig instanceof PickFirstLoadBalancingConfig)) { - return false; - } - if (!maybeEndpointList.ok) { - if (this.children.length === 0 && this.currentPick === null) { - this.channelControlHelper.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker(maybeEndpointList.error), maybeEndpointList.error.details); - } - return true; - } - let endpointList = maybeEndpointList.value; - this.reportHealthStatus = options[REPORT_HEALTH_STATUS_OPTION_NAME]; - /* Previously, an update would be discarded if it was identical to the - * previous update, to minimize churn. Now the DNS resolver is - * rate-limited, so that is less of a concern. */ - if (lbConfig.getShuffleAddressList()) { - endpointList = shuffled(endpointList); - } - const rawAddressList = [].concat(...endpointList.map(endpoint => endpoint.addresses)); - trace('updateAddressList([' + rawAddressList.map(address => (0, subchannel_address_1.subchannelAddressToString)(address)) + '])'); - const addressList = interleaveAddressFamilies(rawAddressList); - this.latestAddressList = addressList; - this.latestOptions = options; - this.connectToAddressList(addressList, options); - this.latestResolutionNote = resolutionNote; - if (rawAddressList.length > 0) { - return true; - } - else { - this.lastError = 'No addresses resolved'; - return false; - } - } - exitIdle() { - if (this.currentState === connectivity_state_1.ConnectivityState.IDLE && - this.latestAddressList) { - this.connectToAddressList(this.latestAddressList, this.latestOptions); - } - } - resetBackoff() { - /* The pick first load balancer does not have a connection backoff, so this - * does nothing */ - } - destroy() { - this.resetSubchannelList(); - this.removeCurrentPick(); - } - getTypeName() { - return TYPE_NAME; - } -} -exports.PickFirstLoadBalancer = PickFirstLoadBalancer; -const LEAF_CONFIG = new PickFirstLoadBalancingConfig(false); -/** - * This class handles the leaf load balancing operations for a single endpoint. - * It is a thin wrapper around a PickFirstLoadBalancer with a different API - * that more closely reflects how it will be used as a leaf balancer. - */ -class LeafLoadBalancer { - constructor(endpoint, channelControlHelper, options, resolutionNote) { - this.endpoint = endpoint; - this.options = options; - this.resolutionNote = resolutionNote; - this.latestState = connectivity_state_1.ConnectivityState.IDLE; - const childChannelControlHelper = (0, load_balancer_1.createChildChannelControlHelper)(channelControlHelper, { - updateState: (connectivityState, picker, errorMessage) => { - this.latestState = connectivityState; - this.latestPicker = picker; - channelControlHelper.updateState(connectivityState, picker, errorMessage); - }, - }); - this.pickFirstBalancer = new PickFirstLoadBalancer(childChannelControlHelper); - this.latestPicker = new picker_1.QueuePicker(this.pickFirstBalancer); - } - startConnecting() { - this.pickFirstBalancer.updateAddressList((0, call_interface_1.statusOrFromValue)([this.endpoint]), LEAF_CONFIG, Object.assign(Object.assign({}, this.options), { [REPORT_HEALTH_STATUS_OPTION_NAME]: true }), this.resolutionNote); - } - /** - * Update the endpoint associated with this LeafLoadBalancer to a new - * endpoint. Does not trigger connection establishment if a connection - * attempt is not already in progress. - * @param newEndpoint - */ - updateEndpoint(newEndpoint, newOptions) { - this.options = newOptions; - this.endpoint = newEndpoint; - if (this.latestState !== connectivity_state_1.ConnectivityState.IDLE) { - this.startConnecting(); - } - } - getConnectivityState() { - return this.latestState; - } - getPicker() { - return this.latestPicker; - } - getEndpoint() { - return this.endpoint; - } - exitIdle() { - this.pickFirstBalancer.exitIdle(); - } - destroy() { - this.pickFirstBalancer.destroy(); - } -} -exports.LeafLoadBalancer = LeafLoadBalancer; -function setup() { - (0, load_balancer_1.registerLoadBalancerType)(TYPE_NAME, PickFirstLoadBalancer, PickFirstLoadBalancingConfig); - (0, load_balancer_1.registerDefaultLoadBalancerType)(TYPE_NAME); -} -//# sourceMappingURL=load-balancer-pick-first.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js.map b/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js.map deleted file mode 100644 index 2735cd3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load-balancer-pick-first.js","sourceRoot":"","sources":["../../src/load-balancer-pick-first.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AA2GH,4BASC;AA2gBD,sBAOC;AApoBD,mDAOyB;AACzB,6DAAyD;AACzD,qCAOkB;AAClB,6DAA8F;AAC9F,qCAAqC;AACrC,2CAA2C;AAM3C,6DAA8D;AAC9D,6BAA6B;AAE7B,qDAA+D;AAE/D,MAAM,WAAW,GAAG,YAAY,CAAC;AAEjC,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO,CAAC,KAAK,CAAC,wBAAY,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,SAAS,GAAG,YAAY,CAAC;AAE/B;;;GAGG;AACH,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAEzC,MAAa,4BAA4B;IACvC,YAA6B,kBAA2B;QAA3B,uBAAkB,GAAlB,kBAAkB,CAAS;IAAG,CAAC;IAE5D,mBAAmB;QACjB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,YAAY;QACV,OAAO;YACL,CAAC,SAAS,CAAC,EAAE;gBACX,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;aAC5C;SACF,CAAC;IACJ,CAAC;IAED,qBAAqB;QACnB,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAED,8DAA8D;IAC9D,MAAM,CAAC,cAAc,CAAC,GAAQ;QAC5B,IACE,oBAAoB,IAAI,GAAG;YAC3B,CAAC,CAAC,OAAO,GAAG,CAAC,kBAAkB,KAAK,SAAS,CAAC,EAC9C,CAAC;YACD,MAAM,IAAI,KAAK,CACb,0EAA0E,CAC3E,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,4BAA4B,CAAC,GAAG,CAAC,kBAAkB,KAAK,IAAI,CAAC,CAAC;IAC3E,CAAC;CACF;AA/BD,oEA+B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ED,4CAoEC;AAED,SAAgB,KAAK;IACnB,IAAA,wCAAwB,EACtB,SAAS,EACT,qBAAqB,EACrB,4BAA4B,CAC7B,CAAC;IACF,IAAA,+CAA+B,EAAC,SAAS,CAAC,CAAC;AAC7C,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.d.ts b/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.d.ts deleted file mode 100644 index a7e747f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { LoadBalancer, ChannelControlHelper, TypedLoadBalancingConfig } from './load-balancer'; -import { Endpoint } from './subchannel-address'; -import { ChannelOptions } from './channel-options'; -import { StatusOr } from './call-interface'; -export declare class RoundRobinLoadBalancer implements LoadBalancer { - private readonly channelControlHelper; - private children; - private currentState; - private currentReadyPicker; - private updatesPaused; - private childChannelControlHelper; - private lastError; - constructor(channelControlHelper: ChannelControlHelper); - private countChildrenWithState; - private calculateAndUpdateState; - private updateState; - private resetSubchannelList; - updateAddressList(maybeEndpointList: StatusOr, lbConfig: TypedLoadBalancingConfig, options: ChannelOptions, resolutionNote: string): boolean; - exitIdle(): void; - resetBackoff(): void; - destroy(): void; - getTypeName(): string; -} -export declare function setup(): void; diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js b/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js deleted file mode 100644 index a49d0e0..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js +++ /dev/null @@ -1,204 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RoundRobinLoadBalancer = void 0; -exports.setup = setup; -const load_balancer_1 = require("./load-balancer"); -const connectivity_state_1 = require("./connectivity-state"); -const picker_1 = require("./picker"); -const logging = require("./logging"); -const constants_1 = require("./constants"); -const subchannel_address_1 = require("./subchannel-address"); -const load_balancer_pick_first_1 = require("./load-balancer-pick-first"); -const TRACER_NAME = 'round_robin'; -function trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text); -} -const TYPE_NAME = 'round_robin'; -class RoundRobinLoadBalancingConfig { - getLoadBalancerName() { - return TYPE_NAME; - } - constructor() { } - toJsonObject() { - return { - [TYPE_NAME]: {}, - }; - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - static createFromJson(obj) { - return new RoundRobinLoadBalancingConfig(); - } -} -class RoundRobinPicker { - constructor(children, nextIndex = 0) { - this.children = children; - this.nextIndex = nextIndex; - } - pick(pickArgs) { - const childPicker = this.children[this.nextIndex].picker; - this.nextIndex = (this.nextIndex + 1) % this.children.length; - return childPicker.pick(pickArgs); - } - /** - * Check what the next subchannel returned would be. Used by the load - * balancer implementation to preserve this part of the picker state if - * possible when a subchannel connects or disconnects. - */ - peekNextEndpoint() { - return this.children[this.nextIndex].endpoint; - } -} -function rotateArray(list, startIndex) { - return [...list.slice(startIndex), ...list.slice(0, startIndex)]; -} -class RoundRobinLoadBalancer { - constructor(channelControlHelper) { - this.channelControlHelper = channelControlHelper; - this.children = []; - this.currentState = connectivity_state_1.ConnectivityState.IDLE; - this.currentReadyPicker = null; - this.updatesPaused = false; - this.lastError = null; - this.childChannelControlHelper = (0, load_balancer_1.createChildChannelControlHelper)(channelControlHelper, { - updateState: (connectivityState, picker, errorMessage) => { - /* Ensure that name resolution is requested again after active - * connections are dropped. This is more aggressive than necessary to - * accomplish that, so we are counting on resolvers to have - * reasonable rate limits. */ - if (this.currentState === connectivity_state_1.ConnectivityState.READY && connectivityState !== connectivity_state_1.ConnectivityState.READY) { - this.channelControlHelper.requestReresolution(); - } - if (errorMessage) { - this.lastError = errorMessage; - } - this.calculateAndUpdateState(); - }, - }); - } - countChildrenWithState(state) { - return this.children.filter(child => child.getConnectivityState() === state) - .length; - } - calculateAndUpdateState() { - if (this.updatesPaused) { - return; - } - if (this.countChildrenWithState(connectivity_state_1.ConnectivityState.READY) > 0) { - const readyChildren = this.children.filter(child => child.getConnectivityState() === connectivity_state_1.ConnectivityState.READY); - let index = 0; - if (this.currentReadyPicker !== null) { - const nextPickedEndpoint = this.currentReadyPicker.peekNextEndpoint(); - index = readyChildren.findIndex(child => (0, subchannel_address_1.endpointEqual)(child.getEndpoint(), nextPickedEndpoint)); - if (index < 0) { - index = 0; - } - } - this.updateState(connectivity_state_1.ConnectivityState.READY, new RoundRobinPicker(readyChildren.map(child => ({ - endpoint: child.getEndpoint(), - picker: child.getPicker(), - })), index), null); - } - else if (this.countChildrenWithState(connectivity_state_1.ConnectivityState.CONNECTING) > 0) { - this.updateState(connectivity_state_1.ConnectivityState.CONNECTING, new picker_1.QueuePicker(this), null); - } - else if (this.countChildrenWithState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE) > 0) { - const errorMessage = `round_robin: No connection established. Last error: ${this.lastError}`; - this.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker({ - details: errorMessage, - }), errorMessage); - } - else { - this.updateState(connectivity_state_1.ConnectivityState.IDLE, new picker_1.QueuePicker(this), null); - } - /* round_robin should keep all children connected, this is how we do that. - * We can't do this more efficiently in the individual child's updateState - * callback because that doesn't have a reference to which child the state - * change is associated with. */ - for (const child of this.children) { - if (child.getConnectivityState() === connectivity_state_1.ConnectivityState.IDLE) { - child.exitIdle(); - } - } - } - updateState(newState, picker, errorMessage) { - trace(connectivity_state_1.ConnectivityState[this.currentState] + - ' -> ' + - connectivity_state_1.ConnectivityState[newState]); - if (newState === connectivity_state_1.ConnectivityState.READY) { - this.currentReadyPicker = picker; - } - else { - this.currentReadyPicker = null; - } - this.currentState = newState; - this.channelControlHelper.updateState(newState, picker, errorMessage); - } - resetSubchannelList() { - for (const child of this.children) { - child.destroy(); - } - this.children = []; - } - updateAddressList(maybeEndpointList, lbConfig, options, resolutionNote) { - if (!(lbConfig instanceof RoundRobinLoadBalancingConfig)) { - return false; - } - if (!maybeEndpointList.ok) { - if (this.children.length === 0) { - this.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker(maybeEndpointList.error), maybeEndpointList.error.details); - } - return true; - } - const startIndex = (Math.random() * maybeEndpointList.value.length) | 0; - const endpointList = rotateArray(maybeEndpointList.value, startIndex); - this.resetSubchannelList(); - if (endpointList.length === 0) { - const errorMessage = `No addresses resolved. Resolution note: ${resolutionNote}`; - this.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker({ details: errorMessage }), errorMessage); - } - trace('Connect to endpoint list ' + endpointList.map(subchannel_address_1.endpointToString)); - this.updatesPaused = true; - this.children = endpointList.map(endpoint => new load_balancer_pick_first_1.LeafLoadBalancer(endpoint, this.childChannelControlHelper, options, resolutionNote)); - for (const child of this.children) { - child.startConnecting(); - } - this.updatesPaused = false; - this.calculateAndUpdateState(); - return true; - } - exitIdle() { - /* The round_robin LB policy is only in the IDLE state if it has no - * addresses to try to connect to and it has no picked subchannel. - * In that case, there is no meaningful action that can be taken here. */ - } - resetBackoff() { - // This LB policy has no backoff to reset - } - destroy() { - this.resetSubchannelList(); - } - getTypeName() { - return TYPE_NAME; - } -} -exports.RoundRobinLoadBalancer = RoundRobinLoadBalancer; -function setup() { - (0, load_balancer_1.registerLoadBalancerType)(TYPE_NAME, RoundRobinLoadBalancer, RoundRobinLoadBalancingConfig); -} -//# sourceMappingURL=load-balancer-round-robin.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js.map b/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js.map deleted file mode 100644 index 8e5ad1c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load-balancer-round-robin.js","sourceRoot":"","sources":["../../src/load-balancer-round-robin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAyQH,sBAMC;AA7QD,mDAMyB;AACzB,6DAAyD;AACzD,qCAMkB;AAClB,qCAAqC;AACrC,2CAA2C;AAC3C,6DAI8B;AAC9B,yEAA8D;AAI9D,MAAM,WAAW,GAAG,aAAa,CAAC;AAElC,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO,CAAC,KAAK,CAAC,wBAAY,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,SAAS,GAAG,aAAa,CAAC;AAEhC,MAAM,6BAA6B;IACjC,mBAAmB;QACjB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,gBAAe,CAAC;IAEhB,YAAY;QACV,OAAO;YACL,CAAC,SAAS,CAAC,EAAE,EAAE;SAChB,CAAC;IACJ,CAAC;IAED,8DAA8D;IAC9D,MAAM,CAAC,cAAc,CAAC,GAAQ;QAC5B,OAAO,IAAI,6BAA6B,EAAE,CAAC;IAC7C,CAAC;CACF;AAED,MAAM,gBAAgB;IACpB,YACmB,QAAkD,EAC3D,YAAY,CAAC;QADJ,aAAQ,GAAR,QAAQ,CAA0C;QAC3D,cAAS,GAAT,SAAS,CAAI;IACpB,CAAC;IAEJ,IAAI,CAAC,QAAkB;QACrB,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC;QACzD,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC7D,OAAO,WAAW,CA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AAa,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,YAAY,CAAC,GAAG,CAC9B,QAAQ,CAAC,EAAE,CACT,IAAI,2CAAgB,CAClB,QAAQ,EACR,IAAI,CAAC,yBAAyB,EAC9B,OAAO,EACP,cAAc,CACf,CACJ,CAAC;QACF,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClC,KAAK,CAAC,eAAe,EAAE,CAAC;QAC1B,CAAC;QACD,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ;QACN;;iFAEyE;IAC3E,CAAC;IACD,YAAY;QACV,yCAAyC;IAC3C,CAAC;IACD,OAAO;QACL,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC7B,CAAC;IACD,WAAW;QACT,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAtLD,wDAsLC;AAED,SAAgB,KAAK;IACnB,IAAA,wCAAwB,EACtB,SAAS,EACT,sBAAsB,EACtB,6BAA6B,CAC9B,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.d.ts b/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.d.ts deleted file mode 100644 index f6838c8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { TypedLoadBalancingConfig } from './load-balancer'; -export declare class WeightedRoundRobinLoadBalancingConfig implements TypedLoadBalancingConfig { - private readonly enableOobLoadReport; - private readonly oobLoadReportingPeriodMs; - private readonly blackoutPeriodMs; - private readonly weightExpirationPeriodMs; - private readonly weightUpdatePeriodMs; - private readonly errorUtilizationPenalty; - constructor(enableOobLoadReport: boolean | null, oobLoadReportingPeriodMs: number | null, blackoutPeriodMs: number | null, weightExpirationPeriodMs: number | null, weightUpdatePeriodMs: number | null, errorUtilizationPenalty: number | null); - getLoadBalancerName(): string; - toJsonObject(): object; - static createFromJson(obj: any): WeightedRoundRobinLoadBalancingConfig; - getEnableOobLoadReport(): boolean; - getOobLoadReportingPeriodMs(): number; - getBlackoutPeriodMs(): number; - getWeightExpirationPeriodMs(): number; - getWeightUpdatePeriodMs(): number; - getErrorUtilizationPenalty(): number; -} -export declare function setup(): void; diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.js b/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.js deleted file mode 100644 index 919c36a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.js +++ /dev/null @@ -1,392 +0,0 @@ -"use strict"; -/* - * Copyright 2025 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.WeightedRoundRobinLoadBalancingConfig = void 0; -exports.setup = setup; -const connectivity_state_1 = require("./connectivity-state"); -const constants_1 = require("./constants"); -const duration_1 = require("./duration"); -const load_balancer_1 = require("./load-balancer"); -const load_balancer_pick_first_1 = require("./load-balancer-pick-first"); -const logging = require("./logging"); -const orca_1 = require("./orca"); -const picker_1 = require("./picker"); -const priority_queue_1 = require("./priority-queue"); -const subchannel_address_1 = require("./subchannel-address"); -const TRACER_NAME = 'weighted_round_robin'; -function trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text); -} -const TYPE_NAME = 'weighted_round_robin'; -const DEFAULT_OOB_REPORTING_PERIOD_MS = 10000; -const DEFAULT_BLACKOUT_PERIOD_MS = 10000; -const DEFAULT_WEIGHT_EXPIRATION_PERIOD_MS = 3 * 60000; -const DEFAULT_WEIGHT_UPDATE_PERIOD_MS = 1000; -const DEFAULT_ERROR_UTILIZATION_PENALTY = 1; -function validateFieldType(obj, fieldName, expectedType) { - if (fieldName in obj && - obj[fieldName] !== undefined && - typeof obj[fieldName] !== expectedType) { - throw new Error(`weighted round robin config ${fieldName} parse error: expected ${expectedType}, got ${typeof obj[fieldName]}`); - } -} -function parseDurationField(obj, fieldName) { - if (fieldName in obj && obj[fieldName] !== undefined && obj[fieldName] !== null) { - let durationObject; - if ((0, duration_1.isDuration)(obj[fieldName])) { - durationObject = obj[fieldName]; - } - else if ((0, duration_1.isDurationMessage)(obj[fieldName])) { - durationObject = (0, duration_1.durationMessageToDuration)(obj[fieldName]); - } - else if (typeof obj[fieldName] === 'string') { - const parsedDuration = (0, duration_1.parseDuration)(obj[fieldName]); - if (!parsedDuration) { - throw new Error(`weighted round robin config ${fieldName}: failed to parse duration string ${obj[fieldName]}`); - } - durationObject = parsedDuration; - } - else { - throw new Error(`weighted round robin config ${fieldName}: expected duration, got ${typeof obj[fieldName]}`); - } - return (0, duration_1.durationToMs)(durationObject); - } - return null; -} -class WeightedRoundRobinLoadBalancingConfig { - constructor(enableOobLoadReport, oobLoadReportingPeriodMs, blackoutPeriodMs, weightExpirationPeriodMs, weightUpdatePeriodMs, errorUtilizationPenalty) { - this.enableOobLoadReport = enableOobLoadReport !== null && enableOobLoadReport !== void 0 ? enableOobLoadReport : false; - this.oobLoadReportingPeriodMs = oobLoadReportingPeriodMs !== null && oobLoadReportingPeriodMs !== void 0 ? oobLoadReportingPeriodMs : DEFAULT_OOB_REPORTING_PERIOD_MS; - this.blackoutPeriodMs = blackoutPeriodMs !== null && blackoutPeriodMs !== void 0 ? blackoutPeriodMs : DEFAULT_BLACKOUT_PERIOD_MS; - this.weightExpirationPeriodMs = weightExpirationPeriodMs !== null && weightExpirationPeriodMs !== void 0 ? weightExpirationPeriodMs : DEFAULT_WEIGHT_EXPIRATION_PERIOD_MS; - this.weightUpdatePeriodMs = Math.max(weightUpdatePeriodMs !== null && weightUpdatePeriodMs !== void 0 ? weightUpdatePeriodMs : DEFAULT_WEIGHT_UPDATE_PERIOD_MS, 100); - this.errorUtilizationPenalty = errorUtilizationPenalty !== null && errorUtilizationPenalty !== void 0 ? errorUtilizationPenalty : DEFAULT_ERROR_UTILIZATION_PENALTY; - } - getLoadBalancerName() { - return TYPE_NAME; - } - toJsonObject() { - return { - enable_oob_load_report: this.enableOobLoadReport, - oob_load_reporting_period: (0, duration_1.durationToString)((0, duration_1.msToDuration)(this.oobLoadReportingPeriodMs)), - blackout_period: (0, duration_1.durationToString)((0, duration_1.msToDuration)(this.blackoutPeriodMs)), - weight_expiration_period: (0, duration_1.durationToString)((0, duration_1.msToDuration)(this.weightExpirationPeriodMs)), - weight_update_period: (0, duration_1.durationToString)((0, duration_1.msToDuration)(this.weightUpdatePeriodMs)), - error_utilization_penalty: this.errorUtilizationPenalty - }; - } - static createFromJson(obj) { - validateFieldType(obj, 'enable_oob_load_report', 'boolean'); - validateFieldType(obj, 'error_utilization_penalty', 'number'); - if (obj.error_utilization_penalty < 0) { - throw new Error('weighted round robin config error_utilization_penalty < 0'); - } - return new WeightedRoundRobinLoadBalancingConfig(obj.enable_oob_load_report, parseDurationField(obj, 'oob_load_reporting_period'), parseDurationField(obj, 'blackout_period'), parseDurationField(obj, 'weight_expiration_period'), parseDurationField(obj, 'weight_update_period'), obj.error_utilization_penalty); - } - getEnableOobLoadReport() { - return this.enableOobLoadReport; - } - getOobLoadReportingPeriodMs() { - return this.oobLoadReportingPeriodMs; - } - getBlackoutPeriodMs() { - return this.blackoutPeriodMs; - } - getWeightExpirationPeriodMs() { - return this.weightExpirationPeriodMs; - } - getWeightUpdatePeriodMs() { - return this.weightUpdatePeriodMs; - } - getErrorUtilizationPenalty() { - return this.errorUtilizationPenalty; - } -} -exports.WeightedRoundRobinLoadBalancingConfig = WeightedRoundRobinLoadBalancingConfig; -class WeightedRoundRobinPicker { - constructor(children, metricsHandler) { - this.metricsHandler = metricsHandler; - this.queue = new priority_queue_1.PriorityQueue((a, b) => a.deadline < b.deadline); - const positiveWeight = children.filter(picker => picker.weight > 0); - let averageWeight; - if (positiveWeight.length < 2) { - averageWeight = 1; - } - else { - let weightSum = 0; - for (const { weight } of positiveWeight) { - weightSum += weight; - } - averageWeight = weightSum / positiveWeight.length; - } - for (const child of children) { - const period = child.weight > 0 ? 1 / child.weight : averageWeight; - this.queue.push({ - endpointName: child.endpointName, - picker: child.picker, - period: period, - deadline: Math.random() * period - }); - } - } - pick(pickArgs) { - const entry = this.queue.pop(); - this.queue.push(Object.assign(Object.assign({}, entry), { deadline: entry.deadline + entry.period })); - const childPick = entry.picker.pick(pickArgs); - if (childPick.pickResultType === picker_1.PickResultType.COMPLETE) { - if (this.metricsHandler) { - return Object.assign(Object.assign({}, childPick), { onCallEnded: (0, orca_1.createMetricsReader)(loadReport => this.metricsHandler(loadReport, entry.endpointName), childPick.onCallEnded) }); - } - else { - const subchannelWrapper = childPick.subchannel; - return Object.assign(Object.assign({}, childPick), { subchannel: subchannelWrapper.getWrappedSubchannel() }); - } - } - else { - return childPick; - } - } -} -class WeightedRoundRobinLoadBalancer { - constructor(channelControlHelper) { - this.channelControlHelper = channelControlHelper; - this.latestConfig = null; - this.children = new Map(); - this.currentState = connectivity_state_1.ConnectivityState.IDLE; - this.updatesPaused = false; - this.lastError = null; - this.weightUpdateTimer = null; - } - countChildrenWithState(state) { - let count = 0; - for (const entry of this.children.values()) { - if (entry.child.getConnectivityState() === state) { - count += 1; - } - } - return count; - } - updateWeight(entry, loadReport) { - var _a, _b; - const qps = loadReport.rps_fractional; - let utilization = loadReport.application_utilization; - if (utilization > 0 && qps > 0) { - utilization += (loadReport.eps / qps) * ((_b = (_a = this.latestConfig) === null || _a === void 0 ? void 0 : _a.getErrorUtilizationPenalty()) !== null && _b !== void 0 ? _b : 0); - } - const newWeight = utilization === 0 ? 0 : qps / utilization; - if (newWeight === 0) { - return; - } - const now = new Date(); - if (entry.nonEmptySince === null) { - entry.nonEmptySince = now; - } - entry.lastUpdated = now; - entry.weight = newWeight; - } - getWeight(entry) { - if (!this.latestConfig) { - return 0; - } - const now = new Date().getTime(); - if (now - entry.lastUpdated.getTime() >= this.latestConfig.getWeightExpirationPeriodMs()) { - entry.nonEmptySince = null; - return 0; - } - const blackoutPeriod = this.latestConfig.getBlackoutPeriodMs(); - if (blackoutPeriod > 0 && (entry.nonEmptySince === null || now - entry.nonEmptySince.getTime() < blackoutPeriod)) { - return 0; - } - return entry.weight; - } - calculateAndUpdateState() { - if (this.updatesPaused || !this.latestConfig) { - return; - } - if (this.countChildrenWithState(connectivity_state_1.ConnectivityState.READY) > 0) { - const weightedPickers = []; - for (const [endpoint, entry] of this.children) { - if (entry.child.getConnectivityState() !== connectivity_state_1.ConnectivityState.READY) { - continue; - } - weightedPickers.push({ - endpointName: endpoint, - picker: entry.child.getPicker(), - weight: this.getWeight(entry) - }); - } - trace('Created picker with weights: ' + weightedPickers.map(entry => entry.endpointName + ':' + entry.weight).join(',')); - let metricsHandler; - if (!this.latestConfig.getEnableOobLoadReport()) { - metricsHandler = (loadReport, endpointName) => { - const childEntry = this.children.get(endpointName); - if (childEntry) { - this.updateWeight(childEntry, loadReport); - } - }; - } - else { - metricsHandler = null; - } - this.updateState(connectivity_state_1.ConnectivityState.READY, new WeightedRoundRobinPicker(weightedPickers, metricsHandler), null); - } - else if (this.countChildrenWithState(connectivity_state_1.ConnectivityState.CONNECTING) > 0) { - this.updateState(connectivity_state_1.ConnectivityState.CONNECTING, new picker_1.QueuePicker(this), null); - } - else if (this.countChildrenWithState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE) > 0) { - const errorMessage = `weighted_round_robin: No connection established. Last error: ${this.lastError}`; - this.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker({ - details: errorMessage, - }), errorMessage); - } - else { - this.updateState(connectivity_state_1.ConnectivityState.IDLE, new picker_1.QueuePicker(this), null); - } - /* round_robin should keep all children connected, this is how we do that. - * We can't do this more efficiently in the individual child's updateState - * callback because that doesn't have a reference to which child the state - * change is associated with. */ - for (const { child } of this.children.values()) { - if (child.getConnectivityState() === connectivity_state_1.ConnectivityState.IDLE) { - child.exitIdle(); - } - } - } - updateState(newState, picker, errorMessage) { - trace(connectivity_state_1.ConnectivityState[this.currentState] + - ' -> ' + - connectivity_state_1.ConnectivityState[newState]); - this.currentState = newState; - this.channelControlHelper.updateState(newState, picker, errorMessage); - } - updateAddressList(maybeEndpointList, lbConfig, options, resolutionNote) { - var _a, _b; - if (!(lbConfig instanceof WeightedRoundRobinLoadBalancingConfig)) { - return false; - } - if (!maybeEndpointList.ok) { - if (this.children.size === 0) { - this.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker(maybeEndpointList.error), maybeEndpointList.error.details); - } - return true; - } - if (maybeEndpointList.value.length === 0) { - const errorMessage = `No addresses resolved. Resolution note: ${resolutionNote}`; - this.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker({ details: errorMessage }), errorMessage); - return false; - } - trace('Connect to endpoint list ' + maybeEndpointList.value.map(subchannel_address_1.endpointToString)); - const now = new Date(); - const seenEndpointNames = new Set(); - this.updatesPaused = true; - this.latestConfig = lbConfig; - for (const endpoint of maybeEndpointList.value) { - const name = (0, subchannel_address_1.endpointToString)(endpoint); - seenEndpointNames.add(name); - let entry = this.children.get(name); - if (!entry) { - entry = { - child: new load_balancer_pick_first_1.LeafLoadBalancer(endpoint, (0, load_balancer_1.createChildChannelControlHelper)(this.channelControlHelper, { - updateState: (connectivityState, picker, errorMessage) => { - /* Ensure that name resolution is requested again after active - * connections are dropped. This is more aggressive than necessary to - * accomplish that, so we are counting on resolvers to have - * reasonable rate limits. */ - if (this.currentState === connectivity_state_1.ConnectivityState.READY && connectivityState !== connectivity_state_1.ConnectivityState.READY) { - this.channelControlHelper.requestReresolution(); - } - if (connectivityState === connectivity_state_1.ConnectivityState.READY) { - entry.nonEmptySince = null; - } - if (errorMessage) { - this.lastError = errorMessage; - } - this.calculateAndUpdateState(); - }, - createSubchannel: (subchannelAddress, subchannelArgs) => { - const subchannel = this.channelControlHelper.createSubchannel(subchannelAddress, subchannelArgs); - if (entry === null || entry === void 0 ? void 0 : entry.oobMetricsListener) { - return new orca_1.OrcaOobMetricsSubchannelWrapper(subchannel, entry.oobMetricsListener, this.latestConfig.getOobLoadReportingPeriodMs()); - } - else { - return subchannel; - } - } - }), options, resolutionNote), - lastUpdated: now, - nonEmptySince: null, - weight: 0, - oobMetricsListener: null - }; - this.children.set(name, entry); - } - if (lbConfig.getEnableOobLoadReport()) { - entry.oobMetricsListener = loadReport => { - this.updateWeight(entry, loadReport); - }; - } - else { - entry.oobMetricsListener = null; - } - } - for (const [endpointName, entry] of this.children) { - if (seenEndpointNames.has(endpointName)) { - entry.child.startConnecting(); - } - else { - entry.child.destroy(); - this.children.delete(endpointName); - } - } - this.updatesPaused = false; - this.calculateAndUpdateState(); - if (this.weightUpdateTimer) { - clearInterval(this.weightUpdateTimer); - } - this.weightUpdateTimer = (_b = (_a = setInterval(() => { - if (this.currentState === connectivity_state_1.ConnectivityState.READY) { - this.calculateAndUpdateState(); - } - }, lbConfig.getWeightUpdatePeriodMs())).unref) === null || _b === void 0 ? void 0 : _b.call(_a); - return true; - } - exitIdle() { - /* The weighted_round_robin LB policy is only in the IDLE state if it has - * no addresses to try to connect to and it has no picked subchannel. - * In that case, there is no meaningful action that can be taken here. */ - } - resetBackoff() { - // This LB policy has no backoff to reset - } - destroy() { - for (const entry of this.children.values()) { - entry.child.destroy(); - } - this.children.clear(); - if (this.weightUpdateTimer) { - clearInterval(this.weightUpdateTimer); - } - } - getTypeName() { - return TYPE_NAME; - } -} -function setup() { - (0, load_balancer_1.registerLoadBalancerType)(TYPE_NAME, WeightedRoundRobinLoadBalancer, WeightedRoundRobinLoadBalancingConfig); -} -//# sourceMappingURL=load-balancer-weighted-round-robin.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.js.map b/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.js.map deleted file mode 100644 index 3bc2b03..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load-balancer-weighted-round-robin.js","sourceRoot":"","sources":["../../src/load-balancer-weighted-round-robin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAwdH,sBAMC;AA1dD,6DAAyD;AACzD,2CAA2C;AAC3C,yCAA6J;AAE7J,mDAA0J;AAC1J,yEAA8D;AAC9D,qCAAqC;AACrC,iCAA+F;AAC/F,qCAAwG;AACxG,qDAAiD;AACjD,6DAAkE;AAElE,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAE3C,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO,CAAC,KAAK,CAAC,wBAAY,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,SAAS,GAAG,sBAAsB,CAAC;AAEzC,MAAM,+BAA+B,GAAG,KAAM,CAAC;AAC/C,MAAM,0BAA0B,GAAG,KAAM,CAAC;AAC1C,MAAM,mCAAmC,GAAG,CAAC,GAAG,KAAM,CAAC;AACvD,MAAM,+BAA+B,GAAG,IAAK,CAAC;AAC9C,MAAM,iCAAiC,GAAG,CAAC,CAAC;AAU5C,SAAS,iBAAiB,CACxB,GAAQ,EACR,SAAiB,EACjB,YAA0B;IAE1B,IACE,SAAS,IAAI,GAAG;QAChB,GAAG,CAAC,SAAS,CAAC,KAAK,SAAS;QAC5B,OAAO,GAAG,CAAC,SAAS,CAAC,KAAK,YAAY,EACtC,CAAC;QACD,MAAM,IAAI,KAAK,CACb,+BAA+B,SAAS,0BAA0B,YAAY,SA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I,IAAI,CAAC,YAAY,KAAK,sCAAiB,CAAC,KAAK,EAAE,CAAC;gBAClD,IAAI,CAAC,uBAAuB,EAAE,CAAC;YACjC,CAAC;QACH,CAAC,EAAE,QAAQ,CAAC,uBAAuB,EAAE,CAAC,EAAC,KAAK,kDAAI,CAAC;QACjD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,QAAQ;QACN;;iFAEyE;IAC3E,CAAC;IACD,YAAY;QACV,yCAAyC;IAC3C,CAAC;IACD,OAAO;QACL,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC;YAC3C,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACxB,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3B,aAAa,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;IACD,WAAW;QACT,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAED,SAAgB,KAAK;IACnB,IAAA,wCAAwB,EACtB,SAAS,EACT,8BAA8B,EAC9B,qCAAqC,CACtC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer.d.ts b/node_modules/@grpc/grpc-js/build/src/load-balancer.d.ts deleted file mode 100644 index 2f18461..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer.d.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { ChannelOptions } from './channel-options'; -import { Endpoint, SubchannelAddress } from './subchannel-address'; -import { ConnectivityState } from './connectivity-state'; -import { Picker } from './picker'; -import type { ChannelRef, SubchannelRef } from './channelz'; -import { SubchannelInterface } from './subchannel-interface'; -import { LoadBalancingConfig } from './service-config'; -import { StatusOr } from './call-interface'; -/** - * A collection of functions associated with a channel that a load balancer - * can call as necessary. - */ -export interface ChannelControlHelper { - /** - * Returns a subchannel connected to the specified address. - * @param subchannelAddress The address to connect to - * @param subchannelArgs Channel arguments to use to construct the subchannel - */ - createSubchannel(subchannelAddress: SubchannelAddress, subchannelArgs: ChannelOptions): SubchannelInterface; - /** - * Passes a new subchannel picker up to the channel. This is called if either - * the connectivity state changes or if a different picker is needed for any - * other reason. - * @param connectivityState New connectivity state - * @param picker New picker - */ - updateState(connectivityState: ConnectivityState, picker: Picker, errorMessage: string | null): void; - /** - * Request new data from the resolver. - */ - requestReresolution(): void; - addChannelzChild(child: ChannelRef | SubchannelRef): void; - removeChannelzChild(child: ChannelRef | SubchannelRef): void; -} -/** - * Create a child ChannelControlHelper that overrides some methods of the - * parent while letting others pass through to the parent unmodified. This - * allows other code to create these children without needing to know about - * all of the methods to be passed through. - * @param parent - * @param overrides - */ -export declare function createChildChannelControlHelper(parent: ChannelControlHelper, overrides: Partial): ChannelControlHelper; -/** - * Tracks one or more connected subchannels and determines which subchannel - * each request should use. - */ -export interface LoadBalancer { - /** - * Gives the load balancer a new list of addresses to start connecting to. - * The load balancer will start establishing connections with the new list, - * but will continue using any existing connections until the new connections - * are established - * @param endpointList The new list of addresses to connect to - * @param lbConfig The load balancing config object from the service config, - * if one was provided - * @param channelOptions Channel options from the channel, plus resolver - * attributes - * @param resolutionNote A not from the resolver to include in errors - */ - updateAddressList(endpointList: StatusOr, lbConfig: TypedLoadBalancingConfig, channelOptions: ChannelOptions, resolutionNote: string): boolean; - /** - * If the load balancer is currently in the IDLE state, start connecting. - */ - exitIdle(): void; - /** - * If the load balancer is currently in the CONNECTING or TRANSIENT_FAILURE - * state, reset the current connection backoff timeout to its base value and - * transition to CONNECTING if in TRANSIENT_FAILURE. - */ - resetBackoff(): void; - /** - * The load balancer unrefs all of its subchannels and stops calling methods - * of its channel control helper. - */ - destroy(): void; - /** - * Get the type name for this load balancer type. Must be constant across an - * entire load balancer implementation class and must match the name that the - * balancer implementation class was registered with. - */ - getTypeName(): string; -} -export interface LoadBalancerConstructor { - new (channelControlHelper: ChannelControlHelper): LoadBalancer; -} -export interface TypedLoadBalancingConfig { - getLoadBalancerName(): string; - toJsonObject(): object; -} -export interface TypedLoadBalancingConfigConstructor { - new (...args: any): TypedLoadBalancingConfig; - createFromJson(obj: any): TypedLoadBalancingConfig; -} -export declare function registerLoadBalancerType(typeName: string, loadBalancerType: LoadBalancerConstructor, loadBalancingConfigType: TypedLoadBalancingConfigConstructor): void; -export declare function registerDefaultLoadBalancerType(typeName: string): void; -export declare function createLoadBalancer(config: TypedLoadBalancingConfig, channelControlHelper: ChannelControlHelper): LoadBalancer | null; -export declare function isLoadBalancerNameRegistered(typeName: string): boolean; -export declare function parseLoadBalancingConfig(rawConfig: LoadBalancingConfig): TypedLoadBalancingConfig; -export declare function getDefaultConfig(): TypedLoadBalancingConfig; -export declare function selectLbConfigFromList(configs: LoadBalancingConfig[], fallbackTodefault?: boolean): TypedLoadBalancingConfig | null; diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer.js b/node_modules/@grpc/grpc-js/build/src/load-balancer.js deleted file mode 100644 index adda9c6..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer.js +++ /dev/null @@ -1,116 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createChildChannelControlHelper = createChildChannelControlHelper; -exports.registerLoadBalancerType = registerLoadBalancerType; -exports.registerDefaultLoadBalancerType = registerDefaultLoadBalancerType; -exports.createLoadBalancer = createLoadBalancer; -exports.isLoadBalancerNameRegistered = isLoadBalancerNameRegistered; -exports.parseLoadBalancingConfig = parseLoadBalancingConfig; -exports.getDefaultConfig = getDefaultConfig; -exports.selectLbConfigFromList = selectLbConfigFromList; -const logging_1 = require("./logging"); -const constants_1 = require("./constants"); -/** - * Create a child ChannelControlHelper that overrides some methods of the - * parent while letting others pass through to the parent unmodified. This - * allows other code to create these children without needing to know about - * all of the methods to be passed through. - * @param parent - * @param overrides - */ -function createChildChannelControlHelper(parent, overrides) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; - return { - createSubchannel: (_b = (_a = overrides.createSubchannel) === null || _a === void 0 ? void 0 : _a.bind(overrides)) !== null && _b !== void 0 ? _b : parent.createSubchannel.bind(parent), - updateState: (_d = (_c = overrides.updateState) === null || _c === void 0 ? void 0 : _c.bind(overrides)) !== null && _d !== void 0 ? _d : parent.updateState.bind(parent), - requestReresolution: (_f = (_e = overrides.requestReresolution) === null || _e === void 0 ? void 0 : _e.bind(overrides)) !== null && _f !== void 0 ? _f : parent.requestReresolution.bind(parent), - addChannelzChild: (_h = (_g = overrides.addChannelzChild) === null || _g === void 0 ? void 0 : _g.bind(overrides)) !== null && _h !== void 0 ? _h : parent.addChannelzChild.bind(parent), - removeChannelzChild: (_k = (_j = overrides.removeChannelzChild) === null || _j === void 0 ? void 0 : _j.bind(overrides)) !== null && _k !== void 0 ? _k : parent.removeChannelzChild.bind(parent), - }; -} -const registeredLoadBalancerTypes = {}; -let defaultLoadBalancerType = null; -function registerLoadBalancerType(typeName, loadBalancerType, loadBalancingConfigType) { - registeredLoadBalancerTypes[typeName] = { - LoadBalancer: loadBalancerType, - LoadBalancingConfig: loadBalancingConfigType, - }; -} -function registerDefaultLoadBalancerType(typeName) { - defaultLoadBalancerType = typeName; -} -function createLoadBalancer(config, channelControlHelper) { - const typeName = config.getLoadBalancerName(); - if (typeName in registeredLoadBalancerTypes) { - return new registeredLoadBalancerTypes[typeName].LoadBalancer(channelControlHelper); - } - else { - return null; - } -} -function isLoadBalancerNameRegistered(typeName) { - return typeName in registeredLoadBalancerTypes; -} -function parseLoadBalancingConfig(rawConfig) { - const keys = Object.keys(rawConfig); - if (keys.length !== 1) { - throw new Error('Provided load balancing config has multiple conflicting entries'); - } - const typeName = keys[0]; - if (typeName in registeredLoadBalancerTypes) { - try { - return registeredLoadBalancerTypes[typeName].LoadBalancingConfig.createFromJson(rawConfig[typeName]); - } - catch (e) { - throw new Error(`${typeName}: ${e.message}`); - } - } - else { - throw new Error(`Unrecognized load balancing config name ${typeName}`); - } -} -function getDefaultConfig() { - if (!defaultLoadBalancerType) { - throw new Error('No default load balancer type registered'); - } - return new registeredLoadBalancerTypes[defaultLoadBalancerType].LoadBalancingConfig(); -} -function selectLbConfigFromList(configs, fallbackTodefault = false) { - for (const config of configs) { - try { - return parseLoadBalancingConfig(config); - } - catch (e) { - (0, logging_1.log)(constants_1.LogVerbosity.DEBUG, 'Config parsing failed with error', e.message); - continue; - } - } - if (fallbackTodefault) { - if (defaultLoadBalancerType) { - return new registeredLoadBalancerTypes[defaultLoadBalancerType].LoadBalancingConfig(); - } - else { - return null; - } - } - else { - return null; - } -} -//# sourceMappingURL=load-balancer.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancer.js.map b/node_modules/@grpc/grpc-js/build/src/load-balancer.js.map deleted file mode 100644 index 2eec632..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load-balancer.js","sourceRoot":"","sources":["../../src/load-balancer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAuDH,0EAoBC;AA2ED,4DASC;AAED,0EAEC;AAED,gDAYC;AAED,oEAEC;AAED,4DAqBC;AAED,4CAOC;AAED,wDA2BC;AAzOD,uCAAgC;AAChC,2CAA2C;AAqC3C;;;;;;;GAOG;AACH,SAAgB,+BAA+B,CAC7C,MAA4B,EAC5B,SAAwC;;IAExC,OAAO;QACL,gBAAgB,EACd,MAAA,MAAA,SAAS,CAAC,gBAAgB,0CAAE,IAAI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C,MAAM,CAAC,CAAC;QAC1C,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAA,aAAG,EACD,wBAAY,CAAC,KAAK,EAClB,kCAAkC,EACjC,CAAW,CAAC,OAAO,CACrB,CAAC;YACF,SAAS;QACX,CAAC;IACH,CAAC;IACD,IAAI,iBAAiB,EAAE,CAAC;QACtB,IAAI,uBAAuB,EAAE,CAAC;YAC5B,OAAO,IAAI,2BAA2B,CACpC,uBAAuB,CACvB,CAAC,mBAAmB,EAAE,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancing-call.d.ts b/node_modules/@grpc/grpc-js/build/src/load-balancing-call.d.ts deleted file mode 100644 index 983049b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancing-call.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { CallCredentials } from './call-credentials'; -import { Call, DeadlineInfoProvider, InterceptingListener, MessageContext, StatusObject } from './call-interface'; -import { Status } from './constants'; -import { Deadline } from './deadline'; -import { InternalChannel } from './internal-channel'; -import { Metadata } from './metadata'; -import { CallConfig } from './resolver'; -import { AuthContext } from './auth-context'; -export type RpcProgress = 'NOT_STARTED' | 'DROP' | 'REFUSED' | 'PROCESSED'; -export interface StatusObjectWithProgress extends StatusObject { - progress: RpcProgress; -} -export interface LoadBalancingCallInterceptingListener extends InterceptingListener { - onReceiveStatus(status: StatusObjectWithProgress): void; -} -export declare class LoadBalancingCall implements Call, DeadlineInfoProvider { - private readonly channel; - private readonly callConfig; - private readonly methodName; - private readonly host; - private readonly credentials; - private readonly deadline; - private readonly callNumber; - private child; - private readPending; - private pendingMessage; - private pendingHalfClose; - private ended; - private serviceUrl; - private metadata; - private listener; - private onCallEnded; - private startTime; - private childStartTime; - constructor(channel: InternalChannel, callConfig: CallConfig, methodName: string, host: string, credentials: CallCredentials, deadline: Deadline, callNumber: number); - getDeadlineInfo(): string[]; - private trace; - private outputStatus; - doPick(): void; - cancelWithStatus(status: Status, details: string): void; - getPeer(): string; - start(metadata: Metadata, listener: LoadBalancingCallInterceptingListener): void; - sendMessageWithContext(context: MessageContext, message: Buffer): void; - startRead(): void; - halfClose(): void; - setCredentials(credentials: CallCredentials): void; - getCallNumber(): number; - getAuthContext(): AuthContext | null; -} diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancing-call.js b/node_modules/@grpc/grpc-js/build/src/load-balancing-call.js deleted file mode 100644 index 44edbd0..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancing-call.js +++ /dev/null @@ -1,302 +0,0 @@ -"use strict"; -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LoadBalancingCall = void 0; -const connectivity_state_1 = require("./connectivity-state"); -const constants_1 = require("./constants"); -const deadline_1 = require("./deadline"); -const metadata_1 = require("./metadata"); -const picker_1 = require("./picker"); -const uri_parser_1 = require("./uri-parser"); -const logging = require("./logging"); -const control_plane_status_1 = require("./control-plane-status"); -const http2 = require("http2"); -const TRACER_NAME = 'load_balancing_call'; -class LoadBalancingCall { - constructor(channel, callConfig, methodName, host, credentials, deadline, callNumber) { - var _a, _b; - this.channel = channel; - this.callConfig = callConfig; - this.methodName = methodName; - this.host = host; - this.credentials = credentials; - this.deadline = deadline; - this.callNumber = callNumber; - this.child = null; - this.readPending = false; - this.pendingMessage = null; - this.pendingHalfClose = false; - this.ended = false; - this.metadata = null; - this.listener = null; - this.onCallEnded = null; - this.childStartTime = null; - const splitPath = this.methodName.split('/'); - let serviceName = ''; - /* The standard path format is "/{serviceName}/{methodName}", so if we split - * by '/', the first item should be empty and the second should be the - * service name */ - if (splitPath.length >= 2) { - serviceName = splitPath[1]; - } - const hostname = (_b = (_a = (0, uri_parser_1.splitHostPort)(this.host)) === null || _a === void 0 ? void 0 : _a.host) !== null && _b !== void 0 ? _b : 'localhost'; - /* Currently, call credentials are only allowed on HTTPS connections, so we - * can assume that the scheme is "https" */ - this.serviceUrl = `https://${hostname}/${serviceName}`; - this.startTime = new Date(); - } - getDeadlineInfo() { - var _a, _b; - const deadlineInfo = []; - if (this.childStartTime) { - if (this.childStartTime > this.startTime) { - if ((_a = this.metadata) === null || _a === void 0 ? void 0 : _a.getOptions().waitForReady) { - deadlineInfo.push('wait_for_ready'); - } - deadlineInfo.push(`LB pick: ${(0, deadline_1.formatDateDifference)(this.startTime, this.childStartTime)}`); - } - deadlineInfo.push(...this.child.getDeadlineInfo()); - return deadlineInfo; - } - else { - if ((_b = this.metadata) === null || _b === void 0 ? void 0 : _b.getOptions().waitForReady) { - deadlineInfo.push('wait_for_ready'); - } - deadlineInfo.push('Waiting for LB pick'); - } - return deadlineInfo; - } - trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, '[' + this.callNumber + '] ' + text); - } - outputStatus(status, progress) { - var _a, _b; - if (!this.ended) { - this.ended = true; - this.trace('ended with status: code=' + - status.code + - ' details="' + - status.details + - '" start time=' + - this.startTime.toISOString()); - const finalStatus = Object.assign(Object.assign({}, status), { progress }); - (_a = this.listener) === null || _a === void 0 ? void 0 : _a.onReceiveStatus(finalStatus); - (_b = this.onCallEnded) === null || _b === void 0 ? void 0 : _b.call(this, finalStatus.code, finalStatus.details, finalStatus.metadata); - } - } - doPick() { - var _a, _b; - if (this.ended) { - return; - } - if (!this.metadata) { - throw new Error('doPick called before start'); - } - this.trace('Pick called'); - const finalMetadata = this.metadata.clone(); - const pickResult = this.channel.doPick(finalMetadata, this.callConfig.pickInformation); - const subchannelString = pickResult.subchannel - ? '(' + - pickResult.subchannel.getChannelzRef().id + - ') ' + - pickResult.subchannel.getAddress() - : '' + pickResult.subchannel; - this.trace('Pick result: ' + - picker_1.PickResultType[pickResult.pickResultType] + - ' subchannel: ' + - subchannelString + - ' status: ' + - ((_a = pickResult.status) === null || _a === void 0 ? void 0 : _a.code) + - ' ' + - ((_b = pickResult.status) === null || _b === void 0 ? void 0 : _b.details)); - switch (pickResult.pickResultType) { - case picker_1.PickResultType.COMPLETE: - const combinedCallCredentials = this.credentials.compose(pickResult.subchannel.getCallCredentials()); - combinedCallCredentials - .generateMetadata({ method_name: this.methodName, service_url: this.serviceUrl }) - .then(credsMetadata => { - var _a; - /* If this call was cancelled (e.g. by the deadline) before - * metadata generation finished, we shouldn't do anything with - * it. */ - if (this.ended) { - this.trace('Credentials metadata generation finished after call ended'); - return; - } - finalMetadata.merge(credsMetadata); - if (finalMetadata.get('authorization').length > 1) { - this.outputStatus({ - code: constants_1.Status.INTERNAL, - details: '"authorization" metadata cannot have multiple values', - metadata: new metadata_1.Metadata(), - }, 'PROCESSED'); - } - if (pickResult.subchannel.getConnectivityState() !== - connectivity_state_1.ConnectivityState.READY) { - this.trace('Picked subchannel ' + - subchannelString + - ' has state ' + - connectivity_state_1.ConnectivityState[pickResult.subchannel.getConnectivityState()] + - ' after getting credentials metadata. Retrying pick'); - this.doPick(); - return; - } - if (this.deadline !== Infinity) { - finalMetadata.set('grpc-timeout', (0, deadline_1.getDeadlineTimeoutString)(this.deadline)); - } - try { - this.child = pickResult - .subchannel.getRealSubchannel() - .createCall(finalMetadata, this.host, this.methodName, { - onReceiveMetadata: metadata => { - this.trace('Received metadata'); - this.listener.onReceiveMetadata(metadata); - }, - onReceiveMessage: message => { - this.trace('Received message'); - this.listener.onReceiveMessage(message); - }, - onReceiveStatus: status => { - this.trace('Received status'); - if (status.rstCode === - http2.constants.NGHTTP2_REFUSED_STREAM) { - this.outputStatus(status, 'REFUSED'); - } - else { - this.outputStatus(status, 'PROCESSED'); - } - }, - }); - this.childStartTime = new Date(); - } - catch (error) { - this.trace('Failed to start call on picked subchannel ' + - subchannelString + - ' with error ' + - error.message); - this.outputStatus({ - code: constants_1.Status.INTERNAL, - details: 'Failed to start HTTP/2 stream with error ' + - error.message, - metadata: new metadata_1.Metadata(), - }, 'NOT_STARTED'); - return; - } - (_a = pickResult.onCallStarted) === null || _a === void 0 ? void 0 : _a.call(pickResult); - this.onCallEnded = pickResult.onCallEnded; - this.trace('Created child call [' + this.child.getCallNumber() + ']'); - if (this.readPending) { - this.child.startRead(); - } - if (this.pendingMessage) { - this.child.sendMessageWithContext(this.pendingMessage.context, this.pendingMessage.message); - } - if (this.pendingHalfClose) { - this.child.halfClose(); - } - }, (error) => { - // We assume the error code isn't 0 (Status.OK) - const { code, details } = (0, control_plane_status_1.restrictControlPlaneStatusCode)(typeof error.code === 'number' ? error.code : constants_1.Status.UNKNOWN, `Getting metadata from plugin failed with error: ${error.message}`); - this.outputStatus({ - code: code, - details: details, - metadata: new metadata_1.Metadata(), - }, 'PROCESSED'); - }); - break; - case picker_1.PickResultType.DROP: - const { code, details } = (0, control_plane_status_1.restrictControlPlaneStatusCode)(pickResult.status.code, pickResult.status.details); - setImmediate(() => { - this.outputStatus({ code, details, metadata: pickResult.status.metadata }, 'DROP'); - }); - break; - case picker_1.PickResultType.TRANSIENT_FAILURE: - if (this.metadata.getOptions().waitForReady) { - this.channel.queueCallForPick(this); - } - else { - const { code, details } = (0, control_plane_status_1.restrictControlPlaneStatusCode)(pickResult.status.code, pickResult.status.details); - setImmediate(() => { - this.outputStatus({ code, details, metadata: pickResult.status.metadata }, 'PROCESSED'); - }); - } - break; - case picker_1.PickResultType.QUEUE: - this.channel.queueCallForPick(this); - } - } - cancelWithStatus(status, details) { - var _a; - this.trace('cancelWithStatus code: ' + status + ' details: "' + details + '"'); - (_a = this.child) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(status, details); - this.outputStatus({ code: status, details: details, metadata: new metadata_1.Metadata() }, 'PROCESSED'); - } - getPeer() { - var _a, _b; - return (_b = (_a = this.child) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : this.channel.getTarget(); - } - start(metadata, listener) { - this.trace('start called'); - this.listener = listener; - this.metadata = metadata; - this.doPick(); - } - sendMessageWithContext(context, message) { - this.trace('write() called with message of length ' + message.length); - if (this.child) { - this.child.sendMessageWithContext(context, message); - } - else { - this.pendingMessage = { context, message }; - } - } - startRead() { - this.trace('startRead called'); - if (this.child) { - this.child.startRead(); - } - else { - this.readPending = true; - } - } - halfClose() { - this.trace('halfClose called'); - if (this.child) { - this.child.halfClose(); - } - else { - this.pendingHalfClose = true; - } - } - setCredentials(credentials) { - throw new Error('Method not implemented.'); - } - getCallNumber() { - return this.callNumber; - } - getAuthContext() { - if (this.child) { - return this.child.getAuthContext(); - } - else { - return null; - } - } -} -exports.LoadBalancingCall = LoadBalancingCall; -//# sourceMappingURL=load-balancing-call.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/load-balancing-call.js.map b/node_modules/@grpc/grpc-js/build/src/load-balancing-call.js.map deleted file mode 100644 index 34701f5..0000000 --- a/node_modules/@grpc/grpc-js/build/src/load-balancing-call.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load-balancing-call.js","sourceRoot":"","sources":["../../src/load-balancing-call.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAWH,6DAAyD;AACzD,2CAAmD;AACnD,yCAAsF;AAEtF,yCAAsC;AACtC,qCAAuD;AAEvD,6CAA6C;AAC7C,qCAAqC;AACrC,iEAAwE;AACxE,+BAA+B;AAG/B,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAa1C,MAAa,iBAAiB;IAa5B,YACmB,OAAwB,EACxB,UAAsB,EACtB,UAAkB,EAClB,IAAY,EACZ,WAA4B,EAC5B,QAAkB,EA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AC;IAED,cAAc;QACZ,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF;AA9UD,8CA8UC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/logging.d.ts b/node_modules/@grpc/grpc-js/build/src/logging.d.ts deleted file mode 100644 index f89da44..0000000 --- a/node_modules/@grpc/grpc-js/build/src/logging.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { LogVerbosity } from './constants'; -export declare const getLogger: () => Partial; -export declare const setLogger: (logger: Partial) => void; -export declare const setLoggerVerbosity: (verbosity: LogVerbosity) => void; -export declare const log: (severity: LogVerbosity, ...args: any[]) => void; -export declare function trace(severity: LogVerbosity, tracer: string, text: string): void; -export declare function isTracerEnabled(tracer: string): boolean; diff --git a/node_modules/@grpc/grpc-js/build/src/logging.js b/node_modules/@grpc/grpc-js/build/src/logging.js deleted file mode 100644 index af7a8c8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/logging.js +++ /dev/null @@ -1,122 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -var _a, _b, _c, _d; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.log = exports.setLoggerVerbosity = exports.setLogger = exports.getLogger = void 0; -exports.trace = trace; -exports.isTracerEnabled = isTracerEnabled; -const constants_1 = require("./constants"); -const process_1 = require("process"); -const clientVersion = require('../../package.json').version; -const DEFAULT_LOGGER = { - error: (message, ...optionalParams) => { - console.error('E ' + message, ...optionalParams); - }, - info: (message, ...optionalParams) => { - console.error('I ' + message, ...optionalParams); - }, - debug: (message, ...optionalParams) => { - console.error('D ' + message, ...optionalParams); - }, -}; -let _logger = DEFAULT_LOGGER; -let _logVerbosity = constants_1.LogVerbosity.ERROR; -const verbosityString = (_b = (_a = process.env.GRPC_NODE_VERBOSITY) !== null && _a !== void 0 ? _a : process.env.GRPC_VERBOSITY) !== null && _b !== void 0 ? _b : ''; -switch (verbosityString.toUpperCase()) { - case 'DEBUG': - _logVerbosity = constants_1.LogVerbosity.DEBUG; - break; - case 'INFO': - _logVerbosity = constants_1.LogVerbosity.INFO; - break; - case 'ERROR': - _logVerbosity = constants_1.LogVerbosity.ERROR; - break; - case 'NONE': - _logVerbosity = constants_1.LogVerbosity.NONE; - break; - default: - // Ignore any other values -} -const getLogger = () => { - return _logger; -}; -exports.getLogger = getLogger; -const setLogger = (logger) => { - _logger = logger; -}; -exports.setLogger = setLogger; -const setLoggerVerbosity = (verbosity) => { - _logVerbosity = verbosity; -}; -exports.setLoggerVerbosity = setLoggerVerbosity; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const log = (severity, ...args) => { - let logFunction; - if (severity >= _logVerbosity) { - switch (severity) { - case constants_1.LogVerbosity.DEBUG: - logFunction = _logger.debug; - break; - case constants_1.LogVerbosity.INFO: - logFunction = _logger.info; - break; - case constants_1.LogVerbosity.ERROR: - logFunction = _logger.error; - break; - } - /* Fall back to _logger.error when other methods are not available for - * compatiblity with older behavior that always logged to _logger.error */ - if (!logFunction) { - logFunction = _logger.error; - } - if (logFunction) { - logFunction.bind(_logger)(...args); - } - } -}; -exports.log = log; -const tracersString = (_d = (_c = process.env.GRPC_NODE_TRACE) !== null && _c !== void 0 ? _c : process.env.GRPC_TRACE) !== null && _d !== void 0 ? _d : ''; -const enabledTracers = new Set(); -const disabledTracers = new Set(); -for (const tracerName of tracersString.split(',')) { - if (tracerName.startsWith('-')) { - disabledTracers.add(tracerName.substring(1)); - } - else { - enabledTracers.add(tracerName); - } -} -const allEnabled = enabledTracers.has('all'); -function trace(severity, tracer, text) { - if (isTracerEnabled(tracer)) { - (0, exports.log)(severity, new Date().toISOString() + - ' | v' + - clientVersion + - ' ' + - process_1.pid + - ' | ' + - tracer + - ' | ' + - text); - } -} -function isTracerEnabled(tracer) { - return (!disabledTracers.has(tracer) && (allEnabled || enabledTracers.has(tracer))); -} -//# sourceMappingURL=logging.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/logging.js.map b/node_modules/@grpc/grpc-js/build/src/logging.js.map deleted file mode 100644 index 9fdc293..0000000 --- a/node_modules/@grpc/grpc-js/build/src/logging.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logging.js","sourceRoot":"","sources":["../../src/logging.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;AA6FH,sBAmBC;AAED,0CAIC;AApHD,2CAA2C;AAC3C,qCAA8B;AAE9B,MAAM,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;AAE5D,MAAM,cAAc,GAAqB;IACvC,KAAK,EAAE,CAAC,OAAa,EAAE,GAAG,cAAqB,EAAE,EAAE;QACjD,OAAO,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,EAAE,GAAG,cAAc,CAAC,CAAC;IACnD,CAAC;IACD,IAAI,EAAE,CAAC,OAAa,EAAE,GAAG,cAAqB,EAAE,EAAE;QAChD,OAAO,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,EAAE,GAAG,cAAc,CAAC,CAAC;IACnD,CAAC;IACD,KAAK,EAAE,CAAC,OAAa,EAAE,GAAG,cAAqB,EAAE,EAAE;QACjD,OAAO,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,EAAE,GAAG,cAAc,CAAC,CAAC;IACnD,CAAC;CACF,CAAC;AAEF,IAAI,OAAO,GAAqB,cAAc,CAAC;AAC/C,IAAI,aAAa,GAAiB,w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YACN,KAAK;YACL,IAAI,CACP,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAgB,eAAe,CAAC,MAAc;IAC5C,OAAO,CACL,CAAC,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,IAAI,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAC3E,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/make-client.d.ts b/node_modules/@grpc/grpc-js/build/src/make-client.d.ts deleted file mode 100644 index e095e6e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/make-client.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { ChannelCredentials } from './channel-credentials'; -import { ChannelOptions } from './channel-options'; -import { Client } from './client'; -import { UntypedServiceImplementation } from './server'; -export interface Serialize { - (value: T): Buffer; -} -export interface Deserialize { - (bytes: Buffer): T; -} -export interface ClientMethodDefinition { - path: string; - requestStream: boolean; - responseStream: boolean; - requestSerialize: Serialize; - responseDeserialize: Deserialize; - originalName?: string; -} -export interface ServerMethodDefinition { - path: string; - requestStream: boolean; - responseStream: boolean; - responseSerialize: Serialize; - requestDeserialize: Deserialize; - originalName?: string; -} -export interface MethodDefinition extends ClientMethodDefinition, ServerMethodDefinition { -} -export type ServiceDefinition = { - readonly [index in keyof ImplementationType]: MethodDefinition; -}; -export interface ProtobufTypeDefinition { - format: string; - type: object; - fileDescriptorProtos: Buffer[]; -} -export interface PackageDefinition { - [index: string]: ServiceDefinition | ProtobufTypeDefinition; -} -export interface ServiceClient extends Client { - [methodName: string]: Function; -} -export interface ServiceClientConstructor { - new (address: string, credentials: ChannelCredentials, options?: Partial): ServiceClient; - service: ServiceDefinition; - serviceName: string; -} -/** - * Creates a constructor for a client with the given methods, as specified in - * the methods argument. The resulting class will have an instance method for - * each method in the service, which is a partial application of one of the - * [Client]{@link grpc.Client} request methods, depending on `requestSerialize` - * and `responseSerialize`, with the `method`, `serialize`, and `deserialize` - * arguments predefined. - * @param methods An object mapping method names to - * method attributes - * @param serviceName The fully qualified name of the service - * @param classOptions An options object. - * @return New client constructor, which is a subclass of - * {@link grpc.Client}, and has the same arguments as that constructor. - */ -export declare function makeClientConstructor(methods: ServiceDefinition, serviceName: string, classOptions?: {}): ServiceClientConstructor; -export interface GrpcObject { - [index: string]: GrpcObject | ServiceClientConstructor | ProtobufTypeDefinition; -} -/** - * Load a gRPC package definition as a gRPC object hierarchy. - * @param packageDef The package definition object. - * @return The resulting gRPC object. - */ -export declare function loadPackageDefinition(packageDef: PackageDefinition): GrpcObject; diff --git a/node_modules/@grpc/grpc-js/build/src/make-client.js b/node_modules/@grpc/grpc-js/build/src/make-client.js deleted file mode 100644 index c7d9958..0000000 --- a/node_modules/@grpc/grpc-js/build/src/make-client.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.makeClientConstructor = makeClientConstructor; -exports.loadPackageDefinition = loadPackageDefinition; -const client_1 = require("./client"); -/** - * Map with short names for each of the requester maker functions. Used in - * makeClientConstructor - * @private - */ -const requesterFuncs = { - unary: client_1.Client.prototype.makeUnaryRequest, - server_stream: client_1.Client.prototype.makeServerStreamRequest, - client_stream: client_1.Client.prototype.makeClientStreamRequest, - bidi: client_1.Client.prototype.makeBidiStreamRequest, -}; -/** - * Returns true, if given key is included in the blacklisted - * keys. - * @param key key for check, string. - */ -function isPrototypePolluted(key) { - return ['__proto__', 'prototype', 'constructor'].includes(key); -} -/** - * Creates a constructor for a client with the given methods, as specified in - * the methods argument. The resulting class will have an instance method for - * each method in the service, which is a partial application of one of the - * [Client]{@link grpc.Client} request methods, depending on `requestSerialize` - * and `responseSerialize`, with the `method`, `serialize`, and `deserialize` - * arguments predefined. - * @param methods An object mapping method names to - * method attributes - * @param serviceName The fully qualified name of the service - * @param classOptions An options object. - * @return New client constructor, which is a subclass of - * {@link grpc.Client}, and has the same arguments as that constructor. - */ -function makeClientConstructor(methods, serviceName, classOptions) { - if (!classOptions) { - classOptions = {}; - } - class ServiceClientImpl extends client_1.Client { - } - Object.keys(methods).forEach(name => { - if (isPrototypePolluted(name)) { - return; - } - const attrs = methods[name]; - let methodType; - // TODO(murgatroid99): Verify that we don't need this anymore - if (typeof name === 'string' && name.charAt(0) === '$') { - throw new Error('Method names cannot start with $'); - } - if (attrs.requestStream) { - if (attrs.responseStream) { - methodType = 'bidi'; - } - else { - methodType = 'client_stream'; - } - } - else { - if (attrs.responseStream) { - methodType = 'server_stream'; - } - else { - methodType = 'unary'; - } - } - const serialize = attrs.requestSerialize; - const deserialize = attrs.responseDeserialize; - const methodFunc = partial(requesterFuncs[methodType], attrs.path, serialize, deserialize); - ServiceClientImpl.prototype[name] = methodFunc; - // Associate all provided attributes with the method - Object.assign(ServiceClientImpl.prototype[name], attrs); - if (attrs.originalName && !isPrototypePolluted(attrs.originalName)) { - ServiceClientImpl.prototype[attrs.originalName] = - ServiceClientImpl.prototype[name]; - } - }); - ServiceClientImpl.service = methods; - ServiceClientImpl.serviceName = serviceName; - return ServiceClientImpl; -} -function partial(fn, path, serialize, deserialize) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return function (...args) { - return fn.call(this, path, serialize, deserialize, ...args); - }; -} -function isProtobufTypeDefinition(obj) { - return 'format' in obj; -} -/** - * Load a gRPC package definition as a gRPC object hierarchy. - * @param packageDef The package definition object. - * @return The resulting gRPC object. - */ -function loadPackageDefinition(packageDef) { - const result = {}; - for (const serviceFqn in packageDef) { - if (Object.prototype.hasOwnProperty.call(packageDef, serviceFqn)) { - const service = packageDef[serviceFqn]; - const nameComponents = serviceFqn.split('.'); - if (nameComponents.some((comp) => isPrototypePolluted(comp))) { - continue; - } - const serviceName = nameComponents[nameComponents.length - 1]; - let current = result; - for (const packageName of nameComponents.slice(0, -1)) { - if (!current[packageName]) { - current[packageName] = {}; - } - current = current[packageName]; - } - if (isProtobufTypeDefinition(service)) { - current[serviceName] = service; - } - else { - current[serviceName] = makeClientConstructor(service, serviceName, {}); - } - } - } - return result; -} -//# sourceMappingURL=make-client.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/make-client.js.map b/node_modules/@grpc/grpc-js/build/src/make-client.js.map deleted file mode 100644 index 6e6b476..0000000 --- a/node_modules/@grpc/grpc-js/build/src/make-client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"make-client.js","sourceRoot":"","sources":["../../src/make-client.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAwGH,sDA2DC;AAgCD,sDA2BC;AA1ND,qCAAkC;AAmDlC;;;;GAIG;AACH,MAAM,cAAc,GAAG;IACrB,KAAK,EAAE,eAAM,CAAC,SAAS,CAAC,gBAAgB;IACxC,aAAa,EAAE,eAAM,CAAC,SAAS,CAAC,uBAAuB;IACvD,aAAa,EAAE,eAAM,CAAC,SAAS,CAAC,uBAAuB;IACvD,IAAI,EAAE,eAAM,CAAC,SAAS,CAAC,qBAAqB;CAC7C,CAAC;AAgBF;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,GAAW;IACtC,OAAO,CAAC,WAAW,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACjE,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAgB,qBAAqB,CACnC,OAA0B,EAC1B,WAAmB,EACnB,YAAiB;IAEjB,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,YAAY,GAAG,EAAE,CAAC;IACpB,CAAC;IAED,MAAM,iBAAkB,SAAQ,eA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,MAAM,CAAC;YACrB,KAAK,MAAM,WAAW,IAAI,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACtD,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;oBAC1B,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;gBAC5B,CAAC;gBACD,OAAO,GAAG,OAAO,CAAC,WAAW,CAAe,CAAC;YAC/C,CAAC;YACD,IAAI,wBAAwB,CAAC,OAAO,CAAC,EAAE,CAAC;gBACtC,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,WAAW,CAAC,GAAG,qBAAqB,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC;YACzE,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/metadata.d.ts b/node_modules/@grpc/grpc-js/build/src/metadata.d.ts deleted file mode 100644 index 7ee8191..0000000 --- a/node_modules/@grpc/grpc-js/build/src/metadata.d.ts +++ /dev/null @@ -1,100 +0,0 @@ -import * as http2 from 'http2'; -export type MetadataValue = string | Buffer; -export type MetadataObject = Map; -export interface MetadataOptions { - idempotentRequest?: boolean; - waitForReady?: boolean; - cacheableRequest?: boolean; - corked?: boolean; -} -/** - * A class for storing metadata. Keys are normalized to lowercase ASCII. - */ -export declare class Metadata { - protected internalRepr: MetadataObject; - private options; - private opaqueData; - constructor(options?: MetadataOptions); - /** - * Sets the given value for the given key by replacing any other values - * associated with that key. Normalizes the key. - * @param key The key to whose value should be set. - * @param value The value to set. Must be a buffer if and only - * if the normalized key ends with '-bin'. - */ - set(key: string, value: MetadataValue): void; - /** - * Adds the given value for the given key by appending to a list of previous - * values associated with that key. Normalizes the key. - * @param key The key for which a new value should be appended. - * @param value The value to add. Must be a buffer if and only - * if the normalized key ends with '-bin'. - */ - add(key: string, value: MetadataValue): void; - /** - * Removes the given key and any associated values. Normalizes the key. - * @param key The key whose values should be removed. - */ - remove(key: string): void; - /** - * Gets a list of all values associated with the key. Normalizes the key. - * @param key The key whose value should be retrieved. - * @return A list of values associated with the given key. - */ - get(key: string): MetadataValue[]; - /** - * Gets a plain object mapping each key to the first value associated with it. - * This reflects the most common way that people will want to see metadata. - * @return A key/value mapping of the metadata. - */ - getMap(): { - [key: string]: MetadataValue; - }; - /** - * Clones the metadata object. - * @return The newly cloned object. - */ - clone(): Metadata; - /** - * Merges all key-value pairs from a given Metadata object into this one. - * If both this object and the given object have values in the same key, - * values from the other Metadata object will be appended to this object's - * values. - * @param other A Metadata object. - */ - merge(other: Metadata): void; - setOptions(options: MetadataOptions): void; - getOptions(): MetadataOptions; - /** - * Creates an OutgoingHttpHeaders object that can be used with the http2 API. - */ - toHttp2Headers(): http2.OutgoingHttpHeaders; - /** - * This modifies the behavior of JSON.stringify to show an object - * representation of the metadata map. - */ - toJSON(): { - [key: string]: MetadataValue[]; - }; - /** - * Attach additional data of any type to the metadata object, which will not - * be included when sending headers. The data can later be retrieved with - * `getOpaque`. Keys with the prefix `grpc` are reserved for use by this - * library. - * @param key - * @param value - */ - setOpaque(key: string, value: unknown): void; - /** - * Retrieve data previously added with `setOpaque`. - * @param key - * @returns - */ - getOpaque(key: string): unknown; - /** - * Returns a new Metadata object based fields in a given IncomingHttpHeaders - * object. - * @param headers An IncomingHttpHeaders object. - */ - static fromHttp2Headers(headers: http2.IncomingHttpHeaders): Metadata; -} diff --git a/node_modules/@grpc/grpc-js/build/src/metadata.js b/node_modules/@grpc/grpc-js/build/src/metadata.js deleted file mode 100644 index d4773d4..0000000 --- a/node_modules/@grpc/grpc-js/build/src/metadata.js +++ /dev/null @@ -1,272 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Metadata = void 0; -const logging_1 = require("./logging"); -const constants_1 = require("./constants"); -const error_1 = require("./error"); -const LEGAL_KEY_REGEX = /^[:0-9a-z_.-]+$/; -const LEGAL_NON_BINARY_VALUE_REGEX = /^[ -~]*$/; -function isLegalKey(key) { - return LEGAL_KEY_REGEX.test(key); -} -function isLegalNonBinaryValue(value) { - return LEGAL_NON_BINARY_VALUE_REGEX.test(value); -} -function isBinaryKey(key) { - return key.endsWith('-bin'); -} -function isCustomMetadata(key) { - return !key.startsWith('grpc-'); -} -function normalizeKey(key) { - return key.toLowerCase(); -} -function validate(key, value) { - if (!isLegalKey(key)) { - throw new Error('Metadata key "' + key + '" contains illegal characters'); - } - if (value !== null && value !== undefined) { - if (isBinaryKey(key)) { - if (!Buffer.isBuffer(value)) { - throw new Error("keys that end with '-bin' must have Buffer values"); - } - } - else { - if (Buffer.isBuffer(value)) { - throw new Error("keys that don't end with '-bin' must have String values"); - } - if (!isLegalNonBinaryValue(value)) { - throw new Error('Metadata string value "' + value + '" contains illegal characters'); - } - } - } -} -/** - * A class for storing metadata. Keys are normalized to lowercase ASCII. - */ -class Metadata { - constructor(options = {}) { - this.internalRepr = new Map(); - this.opaqueData = new Map(); - this.options = options; - } - /** - * Sets the given value for the given key by replacing any other values - * associated with that key. Normalizes the key. - * @param key The key to whose value should be set. - * @param value The value to set. Must be a buffer if and only - * if the normalized key ends with '-bin'. - */ - set(key, value) { - key = normalizeKey(key); - validate(key, value); - this.internalRepr.set(key, [value]); - } - /** - * Adds the given value for the given key by appending to a list of previous - * values associated with that key. Normalizes the key. - * @param key The key for which a new value should be appended. - * @param value The value to add. Must be a buffer if and only - * if the normalized key ends with '-bin'. - */ - add(key, value) { - key = normalizeKey(key); - validate(key, value); - const existingValue = this.internalRepr.get(key); - if (existingValue === undefined) { - this.internalRepr.set(key, [value]); - } - else { - existingValue.push(value); - } - } - /** - * Removes the given key and any associated values. Normalizes the key. - * @param key The key whose values should be removed. - */ - remove(key) { - key = normalizeKey(key); - // validate(key); - this.internalRepr.delete(key); - } - /** - * Gets a list of all values associated with the key. Normalizes the key. - * @param key The key whose value should be retrieved. - * @return A list of values associated with the given key. - */ - get(key) { - key = normalizeKey(key); - // validate(key); - return this.internalRepr.get(key) || []; - } - /** - * Gets a plain object mapping each key to the first value associated with it. - * This reflects the most common way that people will want to see metadata. - * @return A key/value mapping of the metadata. - */ - getMap() { - const result = {}; - for (const [key, values] of this.internalRepr) { - if (values.length > 0) { - const v = values[0]; - result[key] = Buffer.isBuffer(v) ? Buffer.from(v) : v; - } - } - return result; - } - /** - * Clones the metadata object. - * @return The newly cloned object. - */ - clone() { - const newMetadata = new Metadata(this.options); - const newInternalRepr = newMetadata.internalRepr; - for (const [key, value] of this.internalRepr) { - const clonedValue = value.map(v => { - if (Buffer.isBuffer(v)) { - return Buffer.from(v); - } - else { - return v; - } - }); - newInternalRepr.set(key, clonedValue); - } - return newMetadata; - } - /** - * Merges all key-value pairs from a given Metadata object into this one. - * If both this object and the given object have values in the same key, - * values from the other Metadata object will be appended to this object's - * values. - * @param other A Metadata object. - */ - merge(other) { - for (const [key, values] of other.internalRepr) { - const mergedValue = (this.internalRepr.get(key) || []).concat(values); - this.internalRepr.set(key, mergedValue); - } - } - setOptions(options) { - this.options = options; - } - getOptions() { - return this.options; - } - /** - * Creates an OutgoingHttpHeaders object that can be used with the http2 API. - */ - toHttp2Headers() { - // NOTE: Node <8.9 formats http2 headers incorrectly. - const result = {}; - for (const [key, values] of this.internalRepr) { - if (key.startsWith(':')) { - continue; - } - // We assume that the user's interaction with this object is limited to - // through its public API (i.e. keys and values are already validated). - result[key] = values.map(bufToString); - } - return result; - } - /** - * This modifies the behavior of JSON.stringify to show an object - * representation of the metadata map. - */ - toJSON() { - const result = {}; - for (const [key, values] of this.internalRepr) { - result[key] = values; - } - return result; - } - /** - * Attach additional data of any type to the metadata object, which will not - * be included when sending headers. The data can later be retrieved with - * `getOpaque`. Keys with the prefix `grpc` are reserved for use by this - * library. - * @param key - * @param value - */ - setOpaque(key, value) { - this.opaqueData.set(key, value); - } - /** - * Retrieve data previously added with `setOpaque`. - * @param key - * @returns - */ - getOpaque(key) { - return this.opaqueData.get(key); - } - /** - * Returns a new Metadata object based fields in a given IncomingHttpHeaders - * object. - * @param headers An IncomingHttpHeaders object. - */ - static fromHttp2Headers(headers) { - const result = new Metadata(); - for (const key of Object.keys(headers)) { - // Reserved headers (beginning with `:`) are not valid keys. - if (key.charAt(0) === ':') { - continue; - } - const values = headers[key]; - try { - if (isBinaryKey(key)) { - if (Array.isArray(values)) { - values.forEach(value => { - result.add(key, Buffer.from(value, 'base64')); - }); - } - else if (values !== undefined) { - if (isCustomMetadata(key)) { - values.split(',').forEach(v => { - result.add(key, Buffer.from(v.trim(), 'base64')); - }); - } - else { - result.add(key, Buffer.from(values, 'base64')); - } - } - } - else { - if (Array.isArray(values)) { - values.forEach(value => { - result.add(key, value); - }); - } - else if (values !== undefined) { - result.add(key, values); - } - } - } - catch (error) { - const message = `Failed to add metadata entry ${key}: ${values}. ${(0, error_1.getErrorMessage)(error)}. For more information see https://github.com/grpc/grpc-node/issues/1173`; - (0, logging_1.log)(constants_1.LogVerbosity.ERROR, message); - } - } - return result; - } -} -exports.Metadata = Metadata; -const bufToString = (val) => { - return Buffer.isBuffer(val) ? val.toString('base64') : val; -}; -//# sourceMappingURL=metadata.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/metadata.js.map b/node_modules/@grpc/grpc-js/build/src/metadata.js.map deleted file mode 100644 index ebf0111..0000000 --- a/node_modules/@grpc/grpc-js/build/src/metadata.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"metadata.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AC,CAAC,CAAC;wBACL,CAAC;6BAAM,CAAC;4BACN,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;wBACjD,CAAC;oBACH,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;wBAC1B,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;4BACrB,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;wBACzB,CAAC,CAAC,CAAC;oBACL,CAAC;yBAAM,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;wBAChC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;oBAC1B,CAAC;gBACH,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,OAAO,GAAG,gCAAgC,GAAG,KAAK,MAAM,KAAK,IAAA,uBAAe,EAChF,KAAK,CACN,0EAA0E,CAAC;gBAC5E,IAAA,aAAG,EAAC,wBAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAtOD,4BAsOC;AAED,MAAM,WAAW,GAAG,CAAC,GAAoB,EAAU,EAAE;IACnD,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AAC7D,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/object-stream.d.ts b/node_modules/@grpc/grpc-js/build/src/object-stream.d.ts deleted file mode 100644 index 309fd03..0000000 --- a/node_modules/@grpc/grpc-js/build/src/object-stream.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Readable, Writable } from 'stream'; -import { EmitterAugmentation1 } from './events'; -export type WriteCallback = (error: Error | null | undefined) => void; -export interface IntermediateObjectReadable extends Readable { - read(size?: number): any & T; -} -export type ObjectReadable = { - read(size?: number): T; -} & EmitterAugmentation1<'data', T> & IntermediateObjectReadable; -export interface IntermediateObjectWritable extends Writable { - _write(chunk: any & T, encoding: string, callback: Function): void; - write(chunk: any & T, cb?: WriteCallback): boolean; - write(chunk: any & T, encoding?: any, cb?: WriteCallback): boolean; - setDefaultEncoding(encoding: string): this; - end(): ReturnType extends Writable ? this : void; - end(chunk: any & T, cb?: Function): ReturnType extends Writable ? this : void; - end(chunk: any & T, encoding?: any, cb?: Function): ReturnType extends Writable ? this : void; -} -export interface ObjectWritable extends IntermediateObjectWritable { - _write(chunk: T, encoding: string, callback: Function): void; - write(chunk: T, cb?: Function): boolean; - write(chunk: T, encoding?: any, cb?: Function): boolean; - setDefaultEncoding(encoding: string): this; - end(): ReturnType extends Writable ? this : void; - end(chunk: T, cb?: Function): ReturnType extends Writable ? this : void; - end(chunk: T, encoding?: any, cb?: Function): ReturnType extends Writable ? this : void; -} diff --git a/node_modules/@grpc/grpc-js/build/src/object-stream.js b/node_modules/@grpc/grpc-js/build/src/object-stream.js deleted file mode 100644 index b947656..0000000 --- a/node_modules/@grpc/grpc-js/build/src/object-stream.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=object-stream.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/object-stream.js.map b/node_modules/@grpc/grpc-js/build/src/object-stream.js.map deleted file mode 100644 index fe8b624..0000000 --- a/node_modules/@grpc/grpc-js/build/src/object-stream.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"object-stream.js","sourceRoot":"","sources":["../../src/object-stream.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/orca.d.ts b/node_modules/@grpc/grpc-js/build/src/orca.d.ts deleted file mode 100644 index f15ea60..0000000 --- a/node_modules/@grpc/grpc-js/build/src/orca.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { OrcaLoadReport__Output } from "./generated/xds/data/orca/v3/OrcaLoadReport"; -import { OpenRcaServiceClient } from "./generated/xds/service/orca/v3/OpenRcaService"; -import { Server } from "./server"; -import { Channel } from "./channel"; -import { OnCallEnded } from "./picker"; -import { BaseSubchannelWrapper, SubchannelInterface } from "./subchannel-interface"; -/** - * ORCA metrics recorder for a single request - */ -export declare class PerRequestMetricRecorder { - private message; - /** - * Records a request cost metric measurement for the call. - * @param name - * @param value - */ - recordRequestCostMetric(name: string, value: number): void; - /** - * Records a request cost metric measurement for the call. - * @param name - * @param value - */ - recordUtilizationMetric(name: string, value: number): void; - /** - * Records an opaque named metric measurement for the call. - * @param name - * @param value - */ - recordNamedMetric(name: string, value: number): void; - /** - * Records the CPU utilization metric measurement for the call. - * @param value - */ - recordCPUUtilizationMetric(value: number): void; - /** - * Records the memory utilization metric measurement for the call. - * @param value - */ - recordMemoryUtilizationMetric(value: number): void; - /** - * Records the memory utilization metric measurement for the call. - * @param value - */ - recordApplicationUtilizationMetric(value: number): void; - /** - * Records the queries per second measurement. - * @param value - */ - recordQpsMetric(value: number): void; - /** - * Records the errors per second measurement. - * @param value - */ - recordEpsMetric(value: number): void; - serialize(): Buffer; -} -export declare class ServerMetricRecorder { - private message; - private serviceImplementation; - putUtilizationMetric(name: string, value: number): void; - setAllUtilizationMetrics(metrics: { - [name: string]: number; - }): void; - deleteUtilizationMetric(name: string): void; - setCpuUtilizationMetric(value: number): void; - deleteCpuUtilizationMetric(): void; - setApplicationUtilizationMetric(value: number): void; - deleteApplicationUtilizationMetric(): void; - setQpsMetric(value: number): void; - deleteQpsMetric(): void; - setEpsMetric(value: number): void; - deleteEpsMetric(): void; - addToServer(server: Server): void; -} -export declare function createOrcaClient(channel: Channel): OpenRcaServiceClient; -export type MetricsListener = (loadReport: OrcaLoadReport__Output) => void; -export declare const GRPC_METRICS_HEADER = "endpoint-load-metrics-bin"; -/** - * Create an onCallEnded callback for use in a picker. - * @param listener The listener to handle metrics, whenever they are provided. - * @param previousOnCallEnded The previous onCallEnded callback to propagate - * to, if applicable. - * @returns - */ -export declare function createMetricsReader(listener: MetricsListener, previousOnCallEnded: OnCallEnded | null): OnCallEnded; -export declare class OrcaOobMetricsSubchannelWrapper extends BaseSubchannelWrapper { - constructor(child: SubchannelInterface, metricsListener: MetricsListener, intervalMs: number); - getWrappedSubchannel(): SubchannelInterface; -} diff --git a/node_modules/@grpc/grpc-js/build/src/orca.js b/node_modules/@grpc/grpc-js/build/src/orca.js deleted file mode 100644 index 5bcd57e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/orca.js +++ /dev/null @@ -1,323 +0,0 @@ -"use strict"; -/* - * Copyright 2025 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrcaOobMetricsSubchannelWrapper = exports.GRPC_METRICS_HEADER = exports.ServerMetricRecorder = exports.PerRequestMetricRecorder = void 0; -exports.createOrcaClient = createOrcaClient; -exports.createMetricsReader = createMetricsReader; -const make_client_1 = require("./make-client"); -const duration_1 = require("./duration"); -const channel_credentials_1 = require("./channel-credentials"); -const subchannel_interface_1 = require("./subchannel-interface"); -const constants_1 = require("./constants"); -const backoff_timeout_1 = require("./backoff-timeout"); -const connectivity_state_1 = require("./connectivity-state"); -const loadedOrcaProto = null; -function loadOrcaProto() { - if (loadedOrcaProto) { - return loadedOrcaProto; - } - /* The purpose of this complexity is to avoid loading @grpc/proto-loader at - * runtime for users who will not use/enable ORCA. */ - const loaderLoadSync = require('@grpc/proto-loader') - .loadSync; - const loadedProto = loaderLoadSync('xds/service/orca/v3/orca.proto', { - keepCase: true, - longs: String, - enums: String, - defaults: true, - oneofs: true, - includeDirs: [ - `${__dirname}/../../proto/xds`, - `${__dirname}/../../proto/protoc-gen-validate` - ], - }); - return (0, make_client_1.loadPackageDefinition)(loadedProto); -} -/** - * ORCA metrics recorder for a single request - */ -class PerRequestMetricRecorder { - constructor() { - this.message = {}; - } - /** - * Records a request cost metric measurement for the call. - * @param name - * @param value - */ - recordRequestCostMetric(name, value) { - if (!this.message.request_cost) { - this.message.request_cost = {}; - } - this.message.request_cost[name] = value; - } - /** - * Records a request cost metric measurement for the call. - * @param name - * @param value - */ - recordUtilizationMetric(name, value) { - if (!this.message.utilization) { - this.message.utilization = {}; - } - this.message.utilization[name] = value; - } - /** - * Records an opaque named metric measurement for the call. - * @param name - * @param value - */ - recordNamedMetric(name, value) { - if (!this.message.named_metrics) { - this.message.named_metrics = {}; - } - this.message.named_metrics[name] = value; - } - /** - * Records the CPU utilization metric measurement for the call. - * @param value - */ - recordCPUUtilizationMetric(value) { - this.message.cpu_utilization = value; - } - /** - * Records the memory utilization metric measurement for the call. - * @param value - */ - recordMemoryUtilizationMetric(value) { - this.message.mem_utilization = value; - } - /** - * Records the memory utilization metric measurement for the call. - * @param value - */ - recordApplicationUtilizationMetric(value) { - this.message.application_utilization = value; - } - /** - * Records the queries per second measurement. - * @param value - */ - recordQpsMetric(value) { - this.message.rps_fractional = value; - } - /** - * Records the errors per second measurement. - * @param value - */ - recordEpsMetric(value) { - this.message.eps = value; - } - serialize() { - const orcaProto = loadOrcaProto(); - return orcaProto.xds.data.orca.v3.OrcaLoadReport.serialize(this.message); - } -} -exports.PerRequestMetricRecorder = PerRequestMetricRecorder; -const DEFAULT_REPORT_INTERVAL_MS = 30000; -class ServerMetricRecorder { - constructor() { - this.message = {}; - this.serviceImplementation = { - StreamCoreMetrics: call => { - const reportInterval = call.request.report_interval ? - (0, duration_1.durationToMs)((0, duration_1.durationMessageToDuration)(call.request.report_interval)) : - DEFAULT_REPORT_INTERVAL_MS; - const reportTimer = setInterval(() => { - call.write(this.message); - }, reportInterval); - call.on('cancelled', () => { - clearInterval(reportTimer); - }); - } - }; - } - putUtilizationMetric(name, value) { - if (!this.message.utilization) { - this.message.utilization = {}; - } - this.message.utilization[name] = value; - } - setAllUtilizationMetrics(metrics) { - this.message.utilization = Object.assign({}, metrics); - } - deleteUtilizationMetric(name) { - var _a; - (_a = this.message.utilization) === null || _a === void 0 ? true : delete _a[name]; - } - setCpuUtilizationMetric(value) { - this.message.cpu_utilization = value; - } - deleteCpuUtilizationMetric() { - delete this.message.cpu_utilization; - } - setApplicationUtilizationMetric(value) { - this.message.application_utilization = value; - } - deleteApplicationUtilizationMetric() { - delete this.message.application_utilization; - } - setQpsMetric(value) { - this.message.rps_fractional = value; - } - deleteQpsMetric() { - delete this.message.rps_fractional; - } - setEpsMetric(value) { - this.message.eps = value; - } - deleteEpsMetric() { - delete this.message.eps; - } - addToServer(server) { - const serviceDefinition = loadOrcaProto().xds.service.orca.v3.OpenRcaService.service; - server.addService(serviceDefinition, this.serviceImplementation); - } -} -exports.ServerMetricRecorder = ServerMetricRecorder; -function createOrcaClient(channel) { - const ClientClass = loadOrcaProto().xds.service.orca.v3.OpenRcaService; - return new ClientClass('unused', channel_credentials_1.ChannelCredentials.createInsecure(), { channelOverride: channel }); -} -exports.GRPC_METRICS_HEADER = 'endpoint-load-metrics-bin'; -const PARSED_LOAD_REPORT_KEY = 'grpc_orca_load_report'; -/** - * Create an onCallEnded callback for use in a picker. - * @param listener The listener to handle metrics, whenever they are provided. - * @param previousOnCallEnded The previous onCallEnded callback to propagate - * to, if applicable. - * @returns - */ -function createMetricsReader(listener, previousOnCallEnded) { - return (code, details, metadata) => { - let parsedLoadReport = metadata.getOpaque(PARSED_LOAD_REPORT_KEY); - if (parsedLoadReport) { - listener(parsedLoadReport); - } - else { - const serializedLoadReport = metadata.get(exports.GRPC_METRICS_HEADER); - if (serializedLoadReport.length > 0) { - const orcaProto = loadOrcaProto(); - parsedLoadReport = orcaProto.xds.data.orca.v3.OrcaLoadReport.deserialize(serializedLoadReport[0]); - listener(parsedLoadReport); - metadata.setOpaque(PARSED_LOAD_REPORT_KEY, parsedLoadReport); - } - } - if (previousOnCallEnded) { - previousOnCallEnded(code, details, metadata); - } - }; -} -const DATA_PRODUCER_KEY = 'orca_oob_metrics'; -class OobMetricsDataWatcher { - constructor(metricsListener, intervalMs) { - this.metricsListener = metricsListener; - this.intervalMs = intervalMs; - this.dataProducer = null; - } - setSubchannel(subchannel) { - const producer = subchannel.getOrCreateDataProducer(DATA_PRODUCER_KEY, createOobMetricsDataProducer); - this.dataProducer = producer; - producer.addDataWatcher(this); - } - destroy() { - var _a; - (_a = this.dataProducer) === null || _a === void 0 ? void 0 : _a.removeDataWatcher(this); - } - getInterval() { - return this.intervalMs; - } - onMetricsUpdate(metrics) { - this.metricsListener(metrics); - } -} -class OobMetricsDataProducer { - constructor(subchannel) { - this.subchannel = subchannel; - this.dataWatchers = new Set(); - this.orcaSupported = true; - this.metricsCall = null; - this.currentInterval = Infinity; - this.backoffTimer = new backoff_timeout_1.BackoffTimeout(() => this.updateMetricsSubscription()); - this.subchannelStateListener = () => this.updateMetricsSubscription(); - const channel = subchannel.getChannel(); - this.client = createOrcaClient(channel); - subchannel.addConnectivityStateListener(this.subchannelStateListener); - } - addDataWatcher(dataWatcher) { - this.dataWatchers.add(dataWatcher); - this.updateMetricsSubscription(); - } - removeDataWatcher(dataWatcher) { - var _a; - this.dataWatchers.delete(dataWatcher); - if (this.dataWatchers.size === 0) { - this.subchannel.removeDataProducer(DATA_PRODUCER_KEY); - (_a = this.metricsCall) === null || _a === void 0 ? void 0 : _a.cancel(); - this.metricsCall = null; - this.client.close(); - this.subchannel.removeConnectivityStateListener(this.subchannelStateListener); - } - else { - this.updateMetricsSubscription(); - } - } - updateMetricsSubscription() { - var _a; - if (this.dataWatchers.size === 0 || !this.orcaSupported || this.subchannel.getConnectivityState() !== connectivity_state_1.ConnectivityState.READY) { - return; - } - const newInterval = Math.min(...Array.from(this.dataWatchers).map(watcher => watcher.getInterval())); - if (!this.metricsCall || newInterval !== this.currentInterval) { - (_a = this.metricsCall) === null || _a === void 0 ? void 0 : _a.cancel(); - this.currentInterval = newInterval; - const metricsCall = this.client.streamCoreMetrics({ report_interval: (0, duration_1.msToDuration)(newInterval) }); - this.metricsCall = metricsCall; - metricsCall.on('data', (report) => { - this.dataWatchers.forEach(watcher => { - watcher.onMetricsUpdate(report); - }); - }); - metricsCall.on('error', (error) => { - this.metricsCall = null; - if (error.code === constants_1.Status.UNIMPLEMENTED) { - this.orcaSupported = false; - return; - } - if (error.code === constants_1.Status.CANCELLED) { - return; - } - this.backoffTimer.runOnce(); - }); - } - } -} -class OrcaOobMetricsSubchannelWrapper extends subchannel_interface_1.BaseSubchannelWrapper { - constructor(child, metricsListener, intervalMs) { - super(child); - this.addDataWatcher(new OobMetricsDataWatcher(metricsListener, intervalMs)); - } - getWrappedSubchannel() { - return this.child; - } -} -exports.OrcaOobMetricsSubchannelWrapper = OrcaOobMetricsSubchannelWrapper; -function createOobMetricsDataProducer(subchannel) { - return new OobMetricsDataProducer(subchannel); -} -//# sourceMappingURL=orca.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/orca.js.map b/node_modules/@grpc/grpc-js/build/src/orca.js.map deleted file mode 100644 index 5c6736f..0000000 --- a/node_modules/@grpc/grpc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AC9C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAM,CAAC,aAAa,EAAE,CAAC;oBACxC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;oBAC3B,OAAO;gBACT,CAAC;gBACD,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAM,CAAC,SAAS,EAAE,CAAC;oBACpC,OAAO;gBACT,CAAC;gBACD,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;YAC9B,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF;AAED,MAAa,+BAAgC,SAAQ,4CAAqB;IACxE,YAAY,KAA0B,EAAE,eAAgC,EAAE,UAAkB;QAC1F,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,cAAc,CAAC,IAAI,qBAAqB,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AATD,0EASC;AAED,SAAS,4BAA4B,CAAC,UAAsB;IAC1D,OAAO,IAAI,sBAAsB,CAAC,UAAU,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/picker.d.ts b/node_modules/@grpc/grpc-js/build/src/picker.d.ts deleted file mode 100644 index 8a9a915..0000000 --- a/node_modules/@grpc/grpc-js/build/src/picker.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { StatusObject } from './call-interface'; -import { Metadata } from './metadata'; -import { Status } from './constants'; -import { LoadBalancer } from './load-balancer'; -import { SubchannelInterface } from './subchannel-interface'; -export declare enum PickResultType { - COMPLETE = 0, - QUEUE = 1, - TRANSIENT_FAILURE = 2, - DROP = 3 -} -export type OnCallEnded = (statusCode: Status, details: string, metadata: Metadata) => void; -export interface PickResult { - pickResultType: PickResultType; - /** - * The subchannel to use as the transport for the call. Only meaningful if - * `pickResultType` is COMPLETE. If null, indicates that the call should be - * dropped. - */ - subchannel: SubchannelInterface | null; - /** - * The status object to end the call with. Populated if and only if - * `pickResultType` is TRANSIENT_FAILURE. - */ - status: StatusObject | null; - onCallStarted: (() => void) | null; - onCallEnded: OnCallEnded | null; -} -export interface CompletePickResult extends PickResult { - pickResultType: PickResultType.COMPLETE; - subchannel: SubchannelInterface | null; - status: null; - onCallStarted: (() => void) | null; - onCallEnded: OnCallEnded | null; -} -export interface QueuePickResult extends PickResult { - pickResultType: PickResultType.QUEUE; - subchannel: null; - status: null; - onCallStarted: null; - onCallEnded: null; -} -export interface TransientFailurePickResult extends PickResult { - pickResultType: PickResultType.TRANSIENT_FAILURE; - subchannel: null; - status: StatusObject; - onCallStarted: null; - onCallEnded: null; -} -export interface DropCallPickResult extends PickResult { - pickResultType: PickResultType.DROP; - subchannel: null; - status: StatusObject; - onCallStarted: null; - onCallEnded: null; -} -export interface PickArgs { - metadata: Metadata; - extraPickInfo: { - [key: string]: string; - }; -} -/** - * A proxy object representing the momentary state of a load balancer. Picks - * subchannels or returns other information based on that state. Should be - * replaced every time the load balancer changes state. - */ -export interface Picker { - pick(pickArgs: PickArgs): PickResult; -} -/** - * A standard picker representing a load balancer in the TRANSIENT_FAILURE - * state. Always responds to every pick request with an UNAVAILABLE status. - */ -export declare class UnavailablePicker implements Picker { - private status; - constructor(status?: Partial); - pick(pickArgs: PickArgs): TransientFailurePickResult; -} -/** - * A standard picker representing a load balancer in the IDLE or CONNECTING - * state. Always responds to every pick request with a QUEUE pick result - * indicating that the pick should be tried again with the next `Picker`. Also - * reports back to the load balancer that a connection should be established - * once any pick is attempted. - * If the childPicker is provided, delegate to it instead of returning the - * hardcoded QUEUE pick result, but still calls exitIdle. - */ -export declare class QueuePicker { - private loadBalancer; - private childPicker?; - private calledExitIdle; - constructor(loadBalancer: LoadBalancer, childPicker?: Picker | undefined); - pick(pickArgs: PickArgs): PickResult; -} diff --git a/node_modules/@grpc/grpc-js/build/src/picker.js b/node_modules/@grpc/grpc-js/build/src/picker.js deleted file mode 100644 index e796f09..0000000 --- a/node_modules/@grpc/grpc-js/build/src/picker.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.QueuePicker = exports.UnavailablePicker = exports.PickResultType = void 0; -const metadata_1 = require("./metadata"); -const constants_1 = require("./constants"); -var PickResultType; -(function (PickResultType) { - PickResultType[PickResultType["COMPLETE"] = 0] = "COMPLETE"; - PickResultType[PickResultType["QUEUE"] = 1] = "QUEUE"; - PickResultType[PickResultType["TRANSIENT_FAILURE"] = 2] = "TRANSIENT_FAILURE"; - PickResultType[PickResultType["DROP"] = 3] = "DROP"; -})(PickResultType || (exports.PickResultType = PickResultType = {})); -/** - * A standard picker representing a load balancer in the TRANSIENT_FAILURE - * state. Always responds to every pick request with an UNAVAILABLE status. - */ -class UnavailablePicker { - constructor(status) { - this.status = Object.assign({ code: constants_1.Status.UNAVAILABLE, details: 'No connection established', metadata: new metadata_1.Metadata() }, status); - } - pick(pickArgs) { - return { - pickResultType: PickResultType.TRANSIENT_FAILURE, - subchannel: null, - status: this.status, - onCallStarted: null, - onCallEnded: null, - }; - } -} -exports.UnavailablePicker = UnavailablePicker; -/** - * A standard picker representing a load balancer in the IDLE or CONNECTING - * state. Always responds to every pick request with a QUEUE pick result - * indicating that the pick should be tried again with the next `Picker`. Also - * reports back to the load balancer that a connection should be established - * once any pick is attempted. - * If the childPicker is provided, delegate to it instead of returning the - * hardcoded QUEUE pick result, but still calls exitIdle. - */ -class QueuePicker { - // Constructed with a load balancer. Calls exitIdle on it the first time pick is called - constructor(loadBalancer, childPicker) { - this.loadBalancer = loadBalancer; - this.childPicker = childPicker; - this.calledExitIdle = false; - } - pick(pickArgs) { - if (!this.calledExitIdle) { - process.nextTick(() => { - this.loadBalancer.exitIdle(); - }); - this.calledExitIdle = true; - } - if (this.childPicker) { - return this.childPicker.pick(pickArgs); - } - else { - return { - pickResultType: PickResultType.QUEUE, - subchannel: null, - status: null, - onCallStarted: null, - onCallEnded: null, - }; - } - } -} -exports.QueuePicker = QueuePicker; -//# sourceMappingURL=picker.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/picker.js.map b/node_modules/@grpc/grpc-js/build/src/picker.js.map deleted file mode 100644 index 5853180..0000000 --- a/node_modules/@grpc/grpc-js/build/src/picker.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"picker.js","sourceRoot":"","sources":["../../src/picker.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAGH,yCAAsC;AACtC,2CAAqC;AAIrC,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,2DAAQ,CAAA;IACR,qDAAK,CAAA;IACL,6EAAiB,CAAA;IACjB,mDAAI,CAAA;AACN,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB;AAmED;;;GAGG;AACH,MAAa,iBAAiB;IAE5B,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,mBACT,IAAI,EAAE,kBAAM,CAAC,WAAW,EACxB,OAAO,EAAE,2BAA2B,EACpC,QAAQ,EAAE,IAAI,mBAAQ,EAAE,IACrB,MAAM,CACV,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,QAAkB;QACrB,OAAO;YACL,cAAc,EAAE,cAAc,CAAC,iBAAiB;YAChD,UAAU,EAAE,IAAI;YAChB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,aAAa,EAAE,IAAI;YACnB,WAAW,EAAE,IAAI;SAClB,CAAC;IACJ,CAAC;CACF;AAnBD,8CAmBC;AAED;;;;;;;;GAQG;AACH,MAAa,WAAW;IAEtB,uFAAuF;IACvF,YACU,YAA0B,EAC1B,WAAoB;QADpB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,gBAAW,GAAX,WAAW,CAAS;QAJtB,mBAAc,GAAG,KAAK,CAAC;IAK5B,CAAC;IAEJ,IAAI,CAAC,QAAkB;QACrB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YACzB,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE;gBACpB,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;YAC/B,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC7B,CAAC;QACD,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,OAAO;gBACL,cAAc,EAAE,cAAc,CAAC,KAAK;gBACpC,UAAU,EAAE,IAAI;gBAChB,MAAM,EAAE,IAAI;gBACZ,aAAa,EAAE,IAAI;gBACnB,WAAW,EAAE,IAAI;aAClB,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AA3BD,kCA2BC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/priority-queue.d.ts b/node_modules/@grpc/grpc-js/build/src/priority-queue.d.ts deleted file mode 100644 index 6ce3c7a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/priority-queue.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * A generic priority queue implemented as an array-based binary heap. - * Adapted from https://stackoverflow.com/a/42919752/159388 - */ -export declare class PriorityQueue { - private readonly comparator; - private readonly heap; - /** - * - * @param comparator Returns true if the first argument should precede the - * second in the queue. Defaults to `(a, b) => a > b` - */ - constructor(comparator?: (a: T, b: T) => boolean); - /** - * @returns The number of items currently in the queue - */ - size(): number; - /** - * @returns True if there are no items in the queue, false otherwise - */ - isEmpty(): boolean; - /** - * Look at the front item that would be popped, without modifying the contents - * of the queue - * @returns The front item in the queue, or undefined if the queue is empty - */ - peek(): T | undefined; - /** - * Add the items to the queue - * @param values The items to add - * @returns The new size of the queue after adding the items - */ - push(...values: T[]): number; - /** - * Remove the front item in the queue and return it - * @returns The front item in the queue, or undefined if the queue is empty - */ - pop(): T | undefined; - /** - * Simultaneously remove the front item in the queue and add the provided - * item. - * @param value The item to add - * @returns The front item in the queue, or undefined if the queue is empty - */ - replace(value: T): T | undefined; - private greater; - private swap; - private siftUp; - private siftDown; -} diff --git a/node_modules/@grpc/grpc-js/build/src/priority-queue.js b/node_modules/@grpc/grpc-js/build/src/priority-queue.js deleted file mode 100644 index 8628b56..0000000 --- a/node_modules/@grpc/grpc-js/build/src/priority-queue.js +++ /dev/null @@ -1,120 +0,0 @@ -"use strict"; -/* - * Copyright 2025 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PriorityQueue = void 0; -const top = 0; -const parent = (i) => Math.floor(i / 2); -const left = (i) => i * 2 + 1; -const right = (i) => i * 2 + 2; -/** - * A generic priority queue implemented as an array-based binary heap. - * Adapted from https://stackoverflow.com/a/42919752/159388 - */ -class PriorityQueue { - /** - * - * @param comparator Returns true if the first argument should precede the - * second in the queue. Defaults to `(a, b) => a > b` - */ - constructor(comparator = (a, b) => a > b) { - this.comparator = comparator; - this.heap = []; - } - /** - * @returns The number of items currently in the queue - */ - size() { - return this.heap.length; - } - /** - * @returns True if there are no items in the queue, false otherwise - */ - isEmpty() { - return this.size() == 0; - } - /** - * Look at the front item that would be popped, without modifying the contents - * of the queue - * @returns The front item in the queue, or undefined if the queue is empty - */ - peek() { - return this.heap[top]; - } - /** - * Add the items to the queue - * @param values The items to add - * @returns The new size of the queue after adding the items - */ - push(...values) { - values.forEach(value => { - this.heap.push(value); - this.siftUp(); - }); - return this.size(); - } - /** - * Remove the front item in the queue and return it - * @returns The front item in the queue, or undefined if the queue is empty - */ - pop() { - const poppedValue = this.peek(); - const bottom = this.size() - 1; - if (bottom > top) { - this.swap(top, bottom); - } - this.heap.pop(); - this.siftDown(); - return poppedValue; - } - /** - * Simultaneously remove the front item in the queue and add the provided - * item. - * @param value The item to add - * @returns The front item in the queue, or undefined if the queue is empty - */ - replace(value) { - const replacedValue = this.peek(); - this.heap[top] = value; - this.siftDown(); - return replacedValue; - } - greater(i, j) { - return this.comparator(this.heap[i], this.heap[j]); - } - swap(i, j) { - [this.heap[i], this.heap[j]] = [this.heap[j], this.heap[i]]; - } - siftUp() { - let node = this.size() - 1; - while (node > top && this.greater(node, parent(node))) { - this.swap(node, parent(node)); - node = parent(node); - } - } - siftDown() { - let node = top; - while ((left(node) < this.size() && this.greater(left(node), node)) || - (right(node) < this.size() && this.greater(right(node), node))) { - let maxChild = (right(node) < this.size() && this.greater(right(node), left(node))) ? right(node) : left(node); - this.swap(node, maxChild); - node = maxChild; - } - } -} -exports.PriorityQueue = PriorityQueue; -//# sourceMappingURL=priority-queue.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/priority-queue.js.map b/node_modules/@grpc/grpc-js/build/src/priority-queue.js.map deleted file mode 100644 index 06fd2ee..0000000 --- a/node_modules/@grpc/grpc-js/build/src/priority-queue.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"priority-queue.js","sourceRoot":"","sources":["../../src/priority-queue.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,MAAM,GAAG,GAAG,CAAC,CAAC;AACd,MAAM,MAAM,GAAG,CAAC,CAAS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AI,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;YAC5D,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,EAC9D,CAAC;YACD,IAAI,QAAQ,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC/G,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAC1B,IAAI,GAAG,QAAQ,CAAC;QAClB,CAAC;IACH,CAAC;CACF;AA3FD,sCA2FC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/resolver-dns.d.ts b/node_modules/@grpc/grpc-js/build/src/resolver-dns.d.ts deleted file mode 100644 index 138f7f1..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolver-dns.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * The default TCP port to connect to if not explicitly specified in the target. - */ -export declare const DEFAULT_PORT = 443; -/** - * Set up the DNS resolver class by registering it as the handler for the - * "dns:" prefix and as the default resolver. - */ -export declare function setup(): void; -export interface DnsUrl { - host: string; - port?: string; -} diff --git a/node_modules/@grpc/grpc-js/build/src/resolver-dns.js b/node_modules/@grpc/grpc-js/build/src/resolver-dns.js deleted file mode 100644 index 1221464..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolver-dns.js +++ /dev/null @@ -1,363 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DEFAULT_PORT = void 0; -exports.setup = setup; -const resolver_1 = require("./resolver"); -const dns_1 = require("dns"); -const service_config_1 = require("./service-config"); -const constants_1 = require("./constants"); -const call_interface_1 = require("./call-interface"); -const metadata_1 = require("./metadata"); -const logging = require("./logging"); -const constants_2 = require("./constants"); -const uri_parser_1 = require("./uri-parser"); -const net_1 = require("net"); -const backoff_timeout_1 = require("./backoff-timeout"); -const environment_1 = require("./environment"); -const TRACER_NAME = 'dns_resolver'; -function trace(text) { - logging.trace(constants_2.LogVerbosity.DEBUG, TRACER_NAME, text); -} -/** - * The default TCP port to connect to if not explicitly specified in the target. - */ -exports.DEFAULT_PORT = 443; -const DEFAULT_MIN_TIME_BETWEEN_RESOLUTIONS_MS = 30000; -/** - * Resolver implementation that handles DNS names and IP addresses. - */ -class DnsResolver { - constructor(target, listener, channelOptions) { - var _a, _b, _c; - this.target = target; - this.listener = listener; - this.pendingLookupPromise = null; - this.pendingTxtPromise = null; - this.latestLookupResult = null; - this.latestServiceConfigResult = null; - this.continueResolving = false; - this.isNextResolutionTimerRunning = false; - this.isServiceConfigEnabled = true; - this.returnedIpResult = false; - this.alternativeResolver = new dns_1.promises.Resolver(); - trace('Resolver constructed for target ' + (0, uri_parser_1.uriToString)(target)); - if (target.authority) { - this.alternativeResolver.setServers([target.authority]); - } - const hostPort = (0, uri_parser_1.splitHostPort)(target.path); - if (hostPort === null) { - this.ipResult = null; - this.dnsHostname = null; - this.port = null; - } - else { - if ((0, net_1.isIPv4)(hostPort.host) || (0, net_1.isIPv6)(hostPort.host)) { - this.ipResult = [ - { - addresses: [ - { - host: hostPort.host, - port: (_a = hostPort.port) !== null && _a !== void 0 ? _a : exports.DEFAULT_PORT, - }, - ], - }, - ]; - this.dnsHostname = null; - this.port = null; - } - else { - this.ipResult = null; - this.dnsHostname = hostPort.host; - this.port = (_b = hostPort.port) !== null && _b !== void 0 ? _b : exports.DEFAULT_PORT; - } - } - this.percentage = Math.random() * 100; - if (channelOptions['grpc.service_config_disable_resolution'] === 1) { - this.isServiceConfigEnabled = false; - } - this.defaultResolutionError = { - code: constants_1.Status.UNAVAILABLE, - details: `Name resolution failed for target ${(0, uri_parser_1.uriToString)(this.target)}`, - metadata: new metadata_1.Metadata(), - }; - const backoffOptions = { - initialDelay: channelOptions['grpc.initial_reconnect_backoff_ms'], - maxDelay: channelOptions['grpc.max_reconnect_backoff_ms'], - }; - this.backoff = new backoff_timeout_1.BackoffTimeout(() => { - if (this.continueResolving) { - this.startResolutionWithBackoff(); - } - }, backoffOptions); - this.backoff.unref(); - this.minTimeBetweenResolutionsMs = - (_c = channelOptions['grpc.dns_min_time_between_resolutions_ms']) !== null && _c !== void 0 ? _c : DEFAULT_MIN_TIME_BETWEEN_RESOLUTIONS_MS; - this.nextResolutionTimer = setTimeout(() => { }, 0); - clearTimeout(this.nextResolutionTimer); - } - /** - * If the target is an IP address, just provide that address as a result. - * Otherwise, initiate A, AAAA, and TXT lookups - */ - startResolution() { - if (this.ipResult !== null) { - if (!this.returnedIpResult) { - trace('Returning IP address for target ' + (0, uri_parser_1.uriToString)(this.target)); - setImmediate(() => { - this.listener((0, call_interface_1.statusOrFromValue)(this.ipResult), {}, null, ''); - }); - this.returnedIpResult = true; - } - this.backoff.stop(); - this.backoff.reset(); - this.stopNextResolutionTimer(); - return; - } - if (this.dnsHostname === null) { - trace('Failed to parse DNS address ' + (0, uri_parser_1.uriToString)(this.target)); - setImmediate(() => { - this.listener((0, call_interface_1.statusOrFromError)({ - code: constants_1.Status.UNAVAILABLE, - details: `Failed to parse DNS address ${(0, uri_parser_1.uriToString)(this.target)}` - }), {}, null, ''); - }); - this.stopNextResolutionTimer(); - } - else { - if (this.pendingLookupPromise !== null) { - return; - } - trace('Looking up DNS hostname ' + this.dnsHostname); - /* We clear out latestLookupResult here to ensure that it contains the - * latest result since the last time we started resolving. That way, the - * TXT resolution handler can use it, but only if it finishes second. We - * don't clear out any previous service config results because it's - * better to use a service config that's slightly out of date than to - * revert to an effectively blank one. */ - this.latestLookupResult = null; - const hostname = this.dnsHostname; - this.pendingLookupPromise = this.lookup(hostname); - this.pendingLookupPromise.then(addressList => { - if (this.pendingLookupPromise === null) { - return; - } - this.pendingLookupPromise = null; - this.latestLookupResult = (0, call_interface_1.statusOrFromValue)(addressList.map(address => ({ - addresses: [address], - }))); - const allAddressesString = '[' + - addressList.map(addr => addr.host + ':' + addr.port).join(',') + - ']'; - trace('Resolved addresses for target ' + - (0, uri_parser_1.uriToString)(this.target) + - ': ' + - allAddressesString); - /* If the TXT lookup has not yet finished, both of the last two - * arguments will be null, which is the equivalent of getting an - * empty TXT response. When the TXT lookup does finish, its handler - * can update the service config by using the same address list */ - const healthStatus = this.listener(this.latestLookupResult, {}, this.latestServiceConfigResult, ''); - this.handleHealthStatus(healthStatus); - }, err => { - if (this.pendingLookupPromise === null) { - return; - } - trace('Resolution error for target ' + - (0, uri_parser_1.uriToString)(this.target) + - ': ' + - err.message); - this.pendingLookupPromise = null; - this.stopNextResolutionTimer(); - this.listener((0, call_interface_1.statusOrFromError)(this.defaultResolutionError), {}, this.latestServiceConfigResult, ''); - }); - /* If there already is a still-pending TXT resolution, we can just use - * that result when it comes in */ - if (this.isServiceConfigEnabled && this.pendingTxtPromise === null) { - /* We handle the TXT query promise differently than the others because - * the name resolution attempt as a whole is a success even if the TXT - * lookup fails */ - this.pendingTxtPromise = this.resolveTxt(hostname); - this.pendingTxtPromise.then(txtRecord => { - if (this.pendingTxtPromise === null) { - return; - } - this.pendingTxtPromise = null; - let serviceConfig; - try { - serviceConfig = (0, service_config_1.extractAndSelectServiceConfig)(txtRecord, this.percentage); - if (serviceConfig) { - this.latestServiceConfigResult = (0, call_interface_1.statusOrFromValue)(serviceConfig); - } - else { - this.latestServiceConfigResult = null; - } - } - catch (err) { - this.latestServiceConfigResult = (0, call_interface_1.statusOrFromError)({ - code: constants_1.Status.UNAVAILABLE, - details: `Parsing service config failed with error ${err.message}` - }); - } - if (this.latestLookupResult !== null) { - /* We rely here on the assumption that calling this function with - * identical parameters will be essentialy idempotent, and calling - * it with the same address list and a different service config - * should result in a fast and seamless switchover. */ - this.listener(this.latestLookupResult, {}, this.latestServiceConfigResult, ''); - } - }, err => { - /* If TXT lookup fails we should do nothing, which means that we - * continue to use the result of the most recent successful lookup, - * or the default null config object if there has never been a - * successful lookup. We do not set the latestServiceConfigError - * here because that is specifically used for response validation - * errors. We still need to handle this error so that it does not - * bubble up as an unhandled promise rejection. */ - }); - } - } - } - /** - * The ResolverListener returns a boolean indicating whether the LB policy - * accepted the resolution result. A false result on an otherwise successful - * resolution should be treated as a resolution failure. - * @param healthStatus - */ - handleHealthStatus(healthStatus) { - if (healthStatus) { - this.backoff.stop(); - this.backoff.reset(); - } - else { - this.continueResolving = true; - } - } - async lookup(hostname) { - if (environment_1.GRPC_NODE_USE_ALTERNATIVE_RESOLVER) { - trace('Using alternative DNS resolver.'); - const records = await Promise.allSettled([ - this.alternativeResolver.resolve4(hostname), - this.alternativeResolver.resolve6(hostname), - ]); - if (records.every(result => result.status === 'rejected')) { - throw new Error(records[0].reason); - } - return records - .reduce((acc, result) => { - return result.status === 'fulfilled' - ? [...acc, ...result.value] - : acc; - }, []) - .map(addr => ({ - host: addr, - port: +this.port, - })); - } - /* We lookup both address families here and then split them up later - * because when looking up a single family, dns.lookup outputs an error - * if the name exists but there are no records for that family, and that - * error is indistinguishable from other kinds of errors */ - const addressList = await dns_1.promises.lookup(hostname, { all: true }); - return addressList.map(addr => ({ host: addr.address, port: +this.port })); - } - async resolveTxt(hostname) { - if (environment_1.GRPC_NODE_USE_ALTERNATIVE_RESOLVER) { - trace('Using alternative DNS resolver.'); - return this.alternativeResolver.resolveTxt(hostname); - } - return dns_1.promises.resolveTxt(hostname); - } - startNextResolutionTimer() { - var _a, _b; - clearTimeout(this.nextResolutionTimer); - this.nextResolutionTimer = setTimeout(() => { - this.stopNextResolutionTimer(); - if (this.continueResolving) { - this.startResolutionWithBackoff(); - } - }, this.minTimeBetweenResolutionsMs); - (_b = (_a = this.nextResolutionTimer).unref) === null || _b === void 0 ? void 0 : _b.call(_a); - this.isNextResolutionTimerRunning = true; - } - stopNextResolutionTimer() { - clearTimeout(this.nextResolutionTimer); - this.isNextResolutionTimerRunning = false; - } - startResolutionWithBackoff() { - if (this.pendingLookupPromise === null) { - this.continueResolving = false; - this.backoff.runOnce(); - this.startNextResolutionTimer(); - this.startResolution(); - } - } - updateResolution() { - /* If there is a pending lookup, just let it finish. Otherwise, if the - * nextResolutionTimer or backoff timer is running, set the - * continueResolving flag to resolve when whichever of those timers - * fires. Otherwise, start resolving immediately. */ - if (this.pendingLookupPromise === null) { - if (this.isNextResolutionTimerRunning || this.backoff.isRunning()) { - if (this.isNextResolutionTimerRunning) { - trace('resolution update delayed by "min time between resolutions" rate limit'); - } - else { - trace('resolution update delayed by backoff timer until ' + - this.backoff.getEndTime().toISOString()); - } - this.continueResolving = true; - } - else { - this.startResolutionWithBackoff(); - } - } - } - /** - * Reset the resolver to the same state it had when it was created. In-flight - * DNS requests cannot be cancelled, but they are discarded and their results - * will be ignored. - */ - destroy() { - this.continueResolving = false; - this.backoff.reset(); - this.backoff.stop(); - this.stopNextResolutionTimer(); - this.pendingLookupPromise = null; - this.pendingTxtPromise = null; - this.latestLookupResult = null; - this.latestServiceConfigResult = null; - this.returnedIpResult = false; - } - /** - * Get the default authority for the given target. For IP targets, that is - * the IP address. For DNS targets, it is the hostname. - * @param target - */ - static getDefaultAuthority(target) { - return target.path; - } -} -/** - * Set up the DNS resolver class by registering it as the handler for the - * "dns:" prefix and as the default resolver. - */ -function setup() { - (0, resolver_1.registerResolver)('dns', DnsResolver); - (0, resolver_1.registerDefaultScheme)('dns'); -} -//# sourceMappingURL=resolver-dns.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/resolver-dns.js.map b/node_modules/@grpc/grpc-js/build/src/resolver-dns.js.map deleted file mode 100644 index c7a950f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolver-dns.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolver-dns.js","sourceRoot":"","sources":["../../src/resolver-dns.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AA0aH,sBAGC;AA3aD,yCAKoB;AACpB,6BAAsC;AACtC,qDAAgF;AAChF,2CAAqC;AACrC,qDAAgG;AAChG,yCAAsC;AACtC,qCAAqC;AACrC,2CAA2C;AAE3C,6CAAmE;AACnE,6BAAqC;AAErC,uDAAmE;AACnE,+CAAmE;AAEnE,MAAM,WAAW,GAAG,cAAc,CAAC;AAEnC,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO,CAAC,KAAK,CAAC,wBAAY,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;AACvD,CAAC;AAED;;GAEG;AACU,QAAA,YAAY,GAAG,GAAG,CAAC;AAEhC,MAAM,uCAAuC,GAAG,KAAM,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW;IAwBf,YACU,MAAe,EACf,QAA0B,EAClC,cAA8B;;QAFtB,WAAM,GAAN,MAAM,CAAS;QACf,aAAQ,GAAR,QAAQ,CAAkB;QAhB5B,yBAAoB,GAA2C,IAAI,CAAC;QACpE,sBAAiB,GAA+B,IAAI,CAAC;QACrD,uBAAkB,GAAgC,IAAI,CAAC;QACvD,8BAAyB,GAAmC,IAAI,CAAC;QAIjE,sBAAiB,GAAG,KAAK,CAAC;QAE1B,iCAA4B,GAAG,KAAK,CAAC;QACrC,2BAAsB,GAAG,IAAI,CAAC;QAC9B,qBAAgB,GAAG,KAAK,CAAC;QACzB,wBAAm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AA,2BAAgB,EAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IACrC,IAAA,gCAAqB,EAAC,KAAK,CAAC,CAAC;AAC/B,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/resolver-ip.d.ts b/node_modules/@grpc/grpc-js/build/src/resolver-ip.d.ts deleted file mode 100644 index 2bec678..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolver-ip.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function setup(): void; diff --git a/node_modules/@grpc/grpc-js/build/src/resolver-ip.js b/node_modules/@grpc/grpc-js/build/src/resolver-ip.js deleted file mode 100644 index 411d64c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolver-ip.js +++ /dev/null @@ -1,106 +0,0 @@ -"use strict"; -/* - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.setup = setup; -const net_1 = require("net"); -const call_interface_1 = require("./call-interface"); -const constants_1 = require("./constants"); -const metadata_1 = require("./metadata"); -const resolver_1 = require("./resolver"); -const subchannel_address_1 = require("./subchannel-address"); -const uri_parser_1 = require("./uri-parser"); -const logging = require("./logging"); -const TRACER_NAME = 'ip_resolver'; -function trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text); -} -const IPV4_SCHEME = 'ipv4'; -const IPV6_SCHEME = 'ipv6'; -/** - * The default TCP port to connect to if not explicitly specified in the target. - */ -const DEFAULT_PORT = 443; -class IpResolver { - constructor(target, listener, channelOptions) { - var _a; - this.listener = listener; - this.endpoints = []; - this.error = null; - this.hasReturnedResult = false; - trace('Resolver constructed for target ' + (0, uri_parser_1.uriToString)(target)); - const addresses = []; - if (!(target.scheme === IPV4_SCHEME || target.scheme === IPV6_SCHEME)) { - this.error = { - code: constants_1.Status.UNAVAILABLE, - details: `Unrecognized scheme ${target.scheme} in IP resolver`, - metadata: new metadata_1.Metadata(), - }; - return; - } - const pathList = target.path.split(','); - for (const path of pathList) { - const hostPort = (0, uri_parser_1.splitHostPort)(path); - if (hostPort === null) { - this.error = { - code: constants_1.Status.UNAVAILABLE, - details: `Failed to parse ${target.scheme} address ${path}`, - metadata: new metadata_1.Metadata(), - }; - return; - } - if ((target.scheme === IPV4_SCHEME && !(0, net_1.isIPv4)(hostPort.host)) || - (target.scheme === IPV6_SCHEME && !(0, net_1.isIPv6)(hostPort.host))) { - this.error = { - code: constants_1.Status.UNAVAILABLE, - details: `Failed to parse ${target.scheme} address ${path}`, - metadata: new metadata_1.Metadata(), - }; - return; - } - addresses.push({ - host: hostPort.host, - port: (_a = hostPort.port) !== null && _a !== void 0 ? _a : DEFAULT_PORT, - }); - } - this.endpoints = addresses.map(address => ({ addresses: [address] })); - trace('Parsed ' + target.scheme + ' address list ' + addresses.map(subchannel_address_1.subchannelAddressToString)); - } - updateResolution() { - if (!this.hasReturnedResult) { - this.hasReturnedResult = true; - process.nextTick(() => { - if (this.error) { - this.listener((0, call_interface_1.statusOrFromError)(this.error), {}, null, ''); - } - else { - this.listener((0, call_interface_1.statusOrFromValue)(this.endpoints), {}, null, ''); - } - }); - } - } - destroy() { - this.hasReturnedResult = false; - } - static getDefaultAuthority(target) { - return target.path.split(',')[0]; - } -} -function setup() { - (0, resolver_1.registerResolver)(IPV4_SCHEME, IpResolver); - (0, resolver_1.registerResolver)(IPV6_SCHEME, IpResolver); -} -//# sourceMappingURL=resolver-ip.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/resolver-ip.js.map b/node_modules/@grpc/grpc-js/build/src/resolver-ip.js.map deleted file mode 100644 index 7bfdbf8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolver-ip.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolver-ip.js","sourceRoot":"","sources":["../../src/resolver-ip.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AA0GH,sBAGC;AA3GD,6BAAqC;AACrC,qDAAsF;AAEtF,2CAAmD;AACnD,yCAAsC;AACtC,yCAA0E;AAC1E,6DAA8F;AAC9F,6CAAmE;AACnE,qCAAqC;AAErC,MAAM,WAAW,GAAG,aAAa,CAAC;AAElC,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO,CAAC,KAAK,CAAC,wBAAY,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,WAAW,GAAG,MAAM,CAAC;AAC3B,MAAM,WAAW,GAAG,MAAM,CAAC;AAE3B;;GAEG;AACH,MAAM,YAAY,GAAG,GAAG,CAAC;AAEzB,MAAM,UAAU;IAId,YACE,MAAe,EACP,QAA0B,EAClC,cAA8B;;QADtB,aAAQ,GAAR,QAAQ,CAAkB;QAL5B,cAAS,GAAe,EAAE,CAAC;QAC3B,UAAK,GAAwB,IAAI,CAAC;QAClC,sBAAiB,GAAG,KAAK,CAAC;QAMhC,KAAK,CAAC,kCAAkC,GAAG,IAAA,wBAAW,EAAC,MAAM,CAAC,CAAC,CAAC;QAChE,MAAM,SAAS,GAAwB,EAAE,CAAC;QAC1C,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,CAAC,EAAE,CAAC;YACtE,IAAI,CAAC,KAAK,GAAG;gBACX,IAAI,EAAE,kBAAM,CAAC,WAAW;gBACxB,OAAO,EAAE,uBAAuB,MAAM,CAAC,MAAM,iBAAiB;gBAC9D,QAAQ,EAAE,IAAI,mBAAQ,EAAE;aACzB,CAAC;YACF,OAAO;QACT,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,CAAC,I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AAyB,CAAC,CAAC,CAAC;IACjG,CAAC;IACD,gBAAgB;QACd,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC5B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;YAC9B,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE;gBACpB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;oBACf,IAAI,CAAC,QAAQ,CACX,IAAA,kCAAiB,EAAC,IAAI,CAAC,KAAK,CAAC,EAC7B,EAAE,EACF,IAAI,EACJ,EAAE,CACH,CAAC;gBACJ,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,QAAQ,CACX,IAAA,kCAAiB,EAAC,IAAI,CAAC,SAAS,CAAC,EACjC,EAAE,EACF,IAAI,EACJ,EAAE,CACH,CAAC;gBACJ,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO;QACL,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,mBAAmB,CAAC,MAAe;QACxC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;CACF;AAED,SAAgB,KAAK;IACnB,IAAA,2BAAgB,EAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IAC1C,IAAA,2BAAgB,EAAC,WAAW,EAAE,UAAU,CAAC,CAAC;AAC5C,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/resolver-uds.d.ts b/node_modules/@grpc/grpc-js/build/src/resolver-uds.d.ts deleted file mode 100644 index 2bec678..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolver-uds.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function setup(): void; diff --git a/node_modules/@grpc/grpc-js/build/src/resolver-uds.js b/node_modules/@grpc/grpc-js/build/src/resolver-uds.js deleted file mode 100644 index 79290d4..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolver-uds.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.setup = setup; -const resolver_1 = require("./resolver"); -const call_interface_1 = require("./call-interface"); -class UdsResolver { - constructor(target, listener, channelOptions) { - this.listener = listener; - this.hasReturnedResult = false; - this.endpoints = []; - let path; - if (target.authority === '') { - path = '/' + target.path; - } - else { - path = target.path; - } - this.endpoints = [{ addresses: [{ path }] }]; - } - updateResolution() { - if (!this.hasReturnedResult) { - this.hasReturnedResult = true; - process.nextTick(this.listener, (0, call_interface_1.statusOrFromValue)(this.endpoints), {}, null, ''); - } - } - destroy() { - this.hasReturnedResult = false; - } - static getDefaultAuthority(target) { - return 'localhost'; - } -} -function setup() { - (0, resolver_1.registerResolver)('unix', UdsResolver); -} -//# sourceMappingURL=resolver-uds.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/resolver-uds.js.map b/node_modules/@grpc/grpc-js/build/src/resolver-uds.js.map deleted file mode 100644 index fdecd59..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolver-uds.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolver-uds.js","sourceRoot":"","sources":["../../src/resolver-uds.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AA8CH,sBAEC;AA9CD,yCAA0E;AAI1E,qDAAqD;AAErD,MAAM,WAAW;IAGf,YACE,MAAe,EACP,QAA0B,EAClC,cAA8B;QADtB,aAAQ,GAAR,QAAQ,CAAkB;QAJ5B,sBAAiB,GAAG,KAAK,CAAC;QAC1B,cAAS,GAAe,EAAE,CAAC;QAMjC,IAAI,IAAY,CAAC;QACjB,IAAI,MAAM,CAAC,SAAS,KAAK,EAAE,EAAE,CAAC;YAC5B,IAAI,GAAG,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;QACD,IAAI,CAAC,SAAS,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC;IACD,gBAAgB;QACd,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC5B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;YAC9B,OAAO,CAAC,QAAQ,CACd,IAAI,CAAC,QAAQ,EACb,IAAA,kCAAiB,EAAC,IAAI,CAAC,SAAS,CAAC,EACjC,EAAE,EACF,IAAI,EACJ,EAAE,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO;QACL,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,mBAAmB,CAAC,MAAe;QACxC,OAAO,WAAW,CAAC;IACrB,CAAC;CACF;AAED,SAAgB,KAAK;IACnB,IAAA,2BAAgB,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/resolver.d.ts b/node_modules/@grpc/grpc-js/build/src/resolver.d.ts deleted file mode 100644 index a3610a9..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolver.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { MethodConfig, ServiceConfig } from './service-config'; -import { StatusOr } from './call-interface'; -import { Endpoint } from './subchannel-address'; -import { GrpcUri } from './uri-parser'; -import { ChannelOptions } from './channel-options'; -import { Metadata } from './metadata'; -import { Status } from './constants'; -import { Filter, FilterFactory } from './filter'; -export declare const CHANNEL_ARGS_CONFIG_SELECTOR_KEY = "grpc.internal.config_selector"; -export interface CallConfig { - methodConfig: MethodConfig; - onCommitted?: () => void; - pickInformation: { - [key: string]: string; - }; - status: Status; - dynamicFilterFactories: FilterFactory[]; -} -/** - * Selects a configuration for a method given the name and metadata. Defined in - * https://github.com/grpc/proposal/blob/master/A31-xds-timeout-support-and-config-selector.md#new-functionality-in-grpc - */ -export interface ConfigSelector { - invoke(methodName: string, metadata: Metadata, channelId: number): CallConfig; - unref(): void; -} -export interface ResolverListener { - /** - * Called whenever the resolver has new name resolution results or an error to - * report. - * @param endpointList The list of endpoints, or an error if resolution failed - * @param attributes Arbitrary key/value pairs to pass along to load balancing - * policies - * @param serviceConfig The service service config for the endpoint list, or an - * error if the retrieved service config is invalid, or null if there is no - * service config - * @param resolutionNote Provides additional context to RPC failure status - * messages generated by the load balancing policy. - * @returns Whether or not the load balancing policy accepted the result. - */ - (endpointList: StatusOr, attributes: { - [key: string]: unknown; - }, serviceConfig: StatusOr | null, resolutionNote: string): boolean; -} -/** - * A resolver class that handles one or more of the name syntax schemes defined - * in the [gRPC Name Resolution document](https://github.com/grpc/grpc/blob/master/doc/naming.md) - */ -export interface Resolver { - /** - * Indicates that the caller wants new name resolution data. Calling this - * function may eventually result in calling one of the `ResolverListener` - * functions, but that is not guaranteed. Those functions will never be - * called synchronously with the constructor or updateResolution. - */ - updateResolution(): void; - /** - * Discard all resources owned by the resolver. A later call to - * `updateResolution` should reinitialize those resources. No - * `ResolverListener` callbacks should be called after `destroy` is called - * until `updateResolution` is called again. - */ - destroy(): void; -} -export interface ResolverConstructor { - new (target: GrpcUri, listener: ResolverListener, channelOptions: ChannelOptions): Resolver; - /** - * Get the default authority for a target. This loosely corresponds to that - * target's hostname. Throws an error if this resolver class cannot parse the - * `target`. - * @param target - */ - getDefaultAuthority(target: GrpcUri): string; -} -/** - * Register a resolver class to handle target names prefixed with the `prefix` - * string. This prefix should correspond to a URI scheme name listed in the - * [gRPC Name Resolution document](https://github.com/grpc/grpc/blob/master/doc/naming.md) - * @param prefix - * @param resolverClass - */ -export declare function registerResolver(scheme: string, resolverClass: ResolverConstructor): void; -/** - * Register a default resolver to handle target names that do not start with - * any registered prefix. - * @param resolverClass - */ -export declare function registerDefaultScheme(scheme: string): void; -/** - * Create a name resolver for the specified target, if possible. Throws an - * error if no such name resolver can be created. - * @param target - * @param listener - */ -export declare function createResolver(target: GrpcUri, listener: ResolverListener, options: ChannelOptions): Resolver; -/** - * Get the default authority for the specified target, if possible. Throws an - * error if no registered name resolver can parse that target string. - * @param target - */ -export declare function getDefaultAuthority(target: GrpcUri): string; -export declare function mapUriDefaultScheme(target: GrpcUri): GrpcUri | null; diff --git a/node_modules/@grpc/grpc-js/build/src/resolver.js b/node_modules/@grpc/grpc-js/build/src/resolver.js deleted file mode 100644 index 6b1a7c9..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolver.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CHANNEL_ARGS_CONFIG_SELECTOR_KEY = void 0; -exports.registerResolver = registerResolver; -exports.registerDefaultScheme = registerDefaultScheme; -exports.createResolver = createResolver; -exports.getDefaultAuthority = getDefaultAuthority; -exports.mapUriDefaultScheme = mapUriDefaultScheme; -const uri_parser_1 = require("./uri-parser"); -exports.CHANNEL_ARGS_CONFIG_SELECTOR_KEY = 'grpc.internal.config_selector'; -const registeredResolvers = {}; -let defaultScheme = null; -/** - * Register a resolver class to handle target names prefixed with the `prefix` - * string. This prefix should correspond to a URI scheme name listed in the - * [gRPC Name Resolution document](https://github.com/grpc/grpc/blob/master/doc/naming.md) - * @param prefix - * @param resolverClass - */ -function registerResolver(scheme, resolverClass) { - registeredResolvers[scheme] = resolverClass; -} -/** - * Register a default resolver to handle target names that do not start with - * any registered prefix. - * @param resolverClass - */ -function registerDefaultScheme(scheme) { - defaultScheme = scheme; -} -/** - * Create a name resolver for the specified target, if possible. Throws an - * error if no such name resolver can be created. - * @param target - * @param listener - */ -function createResolver(target, listener, options) { - if (target.scheme !== undefined && target.scheme in registeredResolvers) { - return new registeredResolvers[target.scheme](target, listener, options); - } - else { - throw new Error(`No resolver could be created for target ${(0, uri_parser_1.uriToString)(target)}`); - } -} -/** - * Get the default authority for the specified target, if possible. Throws an - * error if no registered name resolver can parse that target string. - * @param target - */ -function getDefaultAuthority(target) { - if (target.scheme !== undefined && target.scheme in registeredResolvers) { - return registeredResolvers[target.scheme].getDefaultAuthority(target); - } - else { - throw new Error(`Invalid target ${(0, uri_parser_1.uriToString)(target)}`); - } -} -function mapUriDefaultScheme(target) { - if (target.scheme === undefined || !(target.scheme in registeredResolvers)) { - if (defaultScheme !== null) { - return { - scheme: defaultScheme, - authority: undefined, - path: (0, uri_parser_1.uriToString)(target), - }; - } - else { - return null; - } - } - return target; -} -//# sourceMappingURL=resolver.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/resolver.js.map b/node_modules/@grpc/grpc-js/build/src/resolver.js.map deleted file mode 100644 index 7b6c268..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolver.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../src/resolver.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAkGH,4CAKC;AAOD,sDAEC;AAQD,wCAYC;AAOD,kDAMC;AAED,kDAaC;AA3JD,6CAAoD;AAMvC,QAAA,gCAAgC,GAAG,+BAA+B,CAAC;A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K,IAAI,EAAE,CAAC;YAC3B,OAAO;gBACL,MAAM,EAAE,aAAa;gBACrB,SAAS,EAAE,SAAS;gBACpB,IAAI,EAAE,IAAA,wBAAW,EAAC,MAAM,CAAC;aAC1B,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/resolving-call.d.ts b/node_modules/@grpc/grpc-js/build/src/resolving-call.d.ts deleted file mode 100644 index c94288b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolving-call.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { CallCredentials } from './call-credentials'; -import { Call, CallStreamOptions, InterceptingListener, MessageContext, StatusObject } from './call-interface'; -import { Status } from './constants'; -import { FilterStackFactory } from './filter-stack'; -import { InternalChannel } from './internal-channel'; -import { Metadata } from './metadata'; -import { AuthContext } from './auth-context'; -export declare class ResolvingCall implements Call { - private readonly channel; - private readonly method; - private readonly filterStackFactory; - private callNumber; - private child; - private readPending; - private pendingMessage; - private pendingHalfClose; - private ended; - private readFilterPending; - private writeFilterPending; - private pendingChildStatus; - private metadata; - private listener; - private deadline; - private host; - private statusWatchers; - private deadlineTimer; - private filterStack; - private deadlineStartTime; - private configReceivedTime; - private childStartTime; - /** - * Credentials configured for this specific call. Does not include - * call credentials associated with the channel credentials used to create - * the channel. - */ - private credentials; - constructor(channel: InternalChannel, method: string, options: CallStreamOptions, filterStackFactory: FilterStackFactory, callNumber: number); - private trace; - private runDeadlineTimer; - private outputStatus; - private sendMessageOnChild; - getConfig(): void; - reportResolverError(status: StatusObject): void; - cancelWithStatus(status: Status, details: string): void; - getPeer(): string; - start(metadata: Metadata, listener: InterceptingListener): void; - sendMessageWithContext(context: MessageContext, message: Buffer): void; - startRead(): void; - halfClose(): void; - setCredentials(credentials: CallCredentials): void; - addStatusWatcher(watcher: (status: StatusObject) => void): void; - getCallNumber(): number; - getAuthContext(): AuthContext | null; -} diff --git a/node_modules/@grpc/grpc-js/build/src/resolving-call.js b/node_modules/@grpc/grpc-js/build/src/resolving-call.js deleted file mode 100644 index 8a47166..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolving-call.js +++ /dev/null @@ -1,319 +0,0 @@ -"use strict"; -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ResolvingCall = void 0; -const call_credentials_1 = require("./call-credentials"); -const constants_1 = require("./constants"); -const deadline_1 = require("./deadline"); -const metadata_1 = require("./metadata"); -const logging = require("./logging"); -const control_plane_status_1 = require("./control-plane-status"); -const TRACER_NAME = 'resolving_call'; -class ResolvingCall { - constructor(channel, method, options, filterStackFactory, callNumber) { - this.channel = channel; - this.method = method; - this.filterStackFactory = filterStackFactory; - this.callNumber = callNumber; - this.child = null; - this.readPending = false; - this.pendingMessage = null; - this.pendingHalfClose = false; - this.ended = false; - this.readFilterPending = false; - this.writeFilterPending = false; - this.pendingChildStatus = null; - this.metadata = null; - this.listener = null; - this.statusWatchers = []; - this.deadlineTimer = setTimeout(() => { }, 0); - this.filterStack = null; - this.deadlineStartTime = null; - this.configReceivedTime = null; - this.childStartTime = null; - /** - * Credentials configured for this specific call. Does not include - * call credentials associated with the channel credentials used to create - * the channel. - */ - this.credentials = call_credentials_1.CallCredentials.createEmpty(); - this.deadline = options.deadline; - this.host = options.host; - if (options.parentCall) { - if (options.flags & constants_1.Propagate.CANCELLATION) { - options.parentCall.on('cancelled', () => { - this.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled by parent call'); - }); - } - if (options.flags & constants_1.Propagate.DEADLINE) { - this.trace('Propagating deadline from parent: ' + - options.parentCall.getDeadline()); - this.deadline = (0, deadline_1.minDeadline)(this.deadline, options.parentCall.getDeadline()); - } - } - this.trace('Created'); - this.runDeadlineTimer(); - } - trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, '[' + this.callNumber + '] ' + text); - } - runDeadlineTimer() { - clearTimeout(this.deadlineTimer); - this.deadlineStartTime = new Date(); - this.trace('Deadline: ' + (0, deadline_1.deadlineToString)(this.deadline)); - const timeout = (0, deadline_1.getRelativeTimeout)(this.deadline); - if (timeout !== Infinity) { - this.trace('Deadline will be reached in ' + timeout + 'ms'); - const handleDeadline = () => { - if (!this.deadlineStartTime) { - this.cancelWithStatus(constants_1.Status.DEADLINE_EXCEEDED, 'Deadline exceeded'); - return; - } - const deadlineInfo = []; - const deadlineEndTime = new Date(); - deadlineInfo.push(`Deadline exceeded after ${(0, deadline_1.formatDateDifference)(this.deadlineStartTime, deadlineEndTime)}`); - if (this.configReceivedTime) { - if (this.configReceivedTime > this.deadlineStartTime) { - deadlineInfo.push(`name resolution: ${(0, deadline_1.formatDateDifference)(this.deadlineStartTime, this.configReceivedTime)}`); - } - if (this.childStartTime) { - if (this.childStartTime > this.configReceivedTime) { - deadlineInfo.push(`metadata filters: ${(0, deadline_1.formatDateDifference)(this.configReceivedTime, this.childStartTime)}`); - } - } - else { - deadlineInfo.push('waiting for metadata filters'); - } - } - else { - deadlineInfo.push('waiting for name resolution'); - } - if (this.child) { - deadlineInfo.push(...this.child.getDeadlineInfo()); - } - this.cancelWithStatus(constants_1.Status.DEADLINE_EXCEEDED, deadlineInfo.join(',')); - }; - if (timeout <= 0) { - process.nextTick(handleDeadline); - } - else { - this.deadlineTimer = setTimeout(handleDeadline, timeout); - } - } - } - outputStatus(status) { - if (!this.ended) { - this.ended = true; - if (!this.filterStack) { - this.filterStack = this.filterStackFactory.createFilter(); - } - clearTimeout(this.deadlineTimer); - const filteredStatus = this.filterStack.receiveTrailers(status); - this.trace('ended with status: code=' + - filteredStatus.code + - ' details="' + - filteredStatus.details + - '"'); - this.statusWatchers.forEach(watcher => watcher(filteredStatus)); - process.nextTick(() => { - var _a; - (_a = this.listener) === null || _a === void 0 ? void 0 : _a.onReceiveStatus(filteredStatus); - }); - } - } - sendMessageOnChild(context, message) { - if (!this.child) { - throw new Error('sendMessageonChild called with child not populated'); - } - const child = this.child; - this.writeFilterPending = true; - this.filterStack.sendMessage(Promise.resolve({ message: message, flags: context.flags })).then(filteredMessage => { - this.writeFilterPending = false; - child.sendMessageWithContext(context, filteredMessage.message); - if (this.pendingHalfClose) { - child.halfClose(); - } - }, (status) => { - this.cancelWithStatus(status.code, status.details); - }); - } - getConfig() { - if (this.ended) { - return; - } - if (!this.metadata || !this.listener) { - throw new Error('getConfig called before start'); - } - const configResult = this.channel.getConfig(this.method, this.metadata); - if (configResult.type === 'NONE') { - this.channel.queueCallForConfig(this); - return; - } - else if (configResult.type === 'ERROR') { - if (this.metadata.getOptions().waitForReady) { - this.channel.queueCallForConfig(this); - } - else { - this.outputStatus(configResult.error); - } - return; - } - // configResult.type === 'SUCCESS' - this.configReceivedTime = new Date(); - const config = configResult.config; - if (config.status !== constants_1.Status.OK) { - const { code, details } = (0, control_plane_status_1.restrictControlPlaneStatusCode)(config.status, 'Failed to route call to method ' + this.method); - this.outputStatus({ - code: code, - details: details, - metadata: new metadata_1.Metadata(), - }); - return; - } - if (config.methodConfig.timeout) { - const configDeadline = new Date(); - configDeadline.setSeconds(configDeadline.getSeconds() + config.methodConfig.timeout.seconds); - configDeadline.setMilliseconds(configDeadline.getMilliseconds() + - config.methodConfig.timeout.nanos / 1000000); - this.deadline = (0, deadline_1.minDeadline)(this.deadline, configDeadline); - this.runDeadlineTimer(); - } - this.filterStackFactory.push(config.dynamicFilterFactories); - this.filterStack = this.filterStackFactory.createFilter(); - this.filterStack.sendMetadata(Promise.resolve(this.metadata)).then(filteredMetadata => { - this.child = this.channel.createRetryingCall(config, this.method, this.host, this.credentials, this.deadline); - this.trace('Created child [' + this.child.getCallNumber() + ']'); - this.childStartTime = new Date(); - this.child.start(filteredMetadata, { - onReceiveMetadata: metadata => { - this.trace('Received metadata'); - this.listener.onReceiveMetadata(this.filterStack.receiveMetadata(metadata)); - }, - onReceiveMessage: message => { - this.trace('Received message'); - this.readFilterPending = true; - this.filterStack.receiveMessage(message).then(filteredMesssage => { - this.trace('Finished filtering received message'); - this.readFilterPending = false; - this.listener.onReceiveMessage(filteredMesssage); - if (this.pendingChildStatus) { - this.outputStatus(this.pendingChildStatus); - } - }, (status) => { - this.cancelWithStatus(status.code, status.details); - }); - }, - onReceiveStatus: status => { - this.trace('Received status'); - if (this.readFilterPending) { - this.pendingChildStatus = status; - } - else { - this.outputStatus(status); - } - }, - }); - if (this.readPending) { - this.child.startRead(); - } - if (this.pendingMessage) { - this.sendMessageOnChild(this.pendingMessage.context, this.pendingMessage.message); - } - else if (this.pendingHalfClose) { - this.child.halfClose(); - } - }, (status) => { - this.outputStatus(status); - }); - } - reportResolverError(status) { - var _a; - if ((_a = this.metadata) === null || _a === void 0 ? void 0 : _a.getOptions().waitForReady) { - this.channel.queueCallForConfig(this); - } - else { - this.outputStatus(status); - } - } - cancelWithStatus(status, details) { - var _a; - this.trace('cancelWithStatus code: ' + status + ' details: "' + details + '"'); - (_a = this.child) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(status, details); - this.outputStatus({ - code: status, - details: details, - metadata: new metadata_1.Metadata(), - }); - } - getPeer() { - var _a, _b; - return (_b = (_a = this.child) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : this.channel.getTarget(); - } - start(metadata, listener) { - this.trace('start called'); - this.metadata = metadata.clone(); - this.listener = listener; - this.getConfig(); - } - sendMessageWithContext(context, message) { - this.trace('write() called with message of length ' + message.length); - if (this.child) { - this.sendMessageOnChild(context, message); - } - else { - this.pendingMessage = { context, message }; - } - } - startRead() { - this.trace('startRead called'); - if (this.child) { - this.child.startRead(); - } - else { - this.readPending = true; - } - } - halfClose() { - this.trace('halfClose called'); - if (this.child && !this.writeFilterPending) { - this.child.halfClose(); - } - else { - this.pendingHalfClose = true; - } - } - setCredentials(credentials) { - this.credentials = credentials; - } - addStatusWatcher(watcher) { - this.statusWatchers.push(watcher); - } - getCallNumber() { - return this.callNumber; - } - getAuthContext() { - if (this.child) { - return this.child.getAuthContext(); - } - else { - return null; - } - } -} -exports.ResolvingCall = ResolvingCall; -//# sourceMappingURL=resolving-call.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/resolving-call.js.map b/node_modules/@grpc/grpc-js/build/src/resolving-call.js.map deleted file mode 100644 index 62bda26..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolving-call.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolving-call.js","sourceRoot":"","sources":["../../src/resolving-call.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,yDAAqD;AASrD,2CAA8D;AAC9D,yCAMoB;AAGpB,yCAAsC;AACtC,qCAAqC;AACrC,iEAAwE;AAGxE,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC,MAAa,aAAa;IA6BxB,YACmB,OAAwB,EACxB,MAAc,EAC/B,OAA0B,EACT,kBAAsC,EAC/C,UAAkB;QAJT,YAAO,GAAP,OAAO,CAAiB;QACxB,WAAM,GAAN,MAAM,CAAQ;QAEd,uBAAkB,GAAlB,kBAAkB,CAAoB;QAC/C,eAAU,GAAV,UAAU,CAAQ;QAjCpB,UAAK,GAAyC,IAAI,CAAC;QACnD,gBAAW,GAAG,KAAK,CAAC;QACpB,mBAAc,GACpB,IAAI,CAAC;QACC,qBAAgB,GAAG,KAAK,CAAC;QACzB,UAAK,GAAG,KAAK,CAAC;QACd,sBAAiB,GAAG,KAAK,CAAC;QAC1B,uBAAkB,GAAG,KAAK,CAAC;QAC3B,uBAAkB,GAAwB,IAA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AC,CAAC;IACpC,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,cAAc;QACZ,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF;AA/UD,sCA+UC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.d.ts b/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.d.ts deleted file mode 100644 index bd6e2e8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { ChannelControlHelper, LoadBalancer, TypedLoadBalancingConfig } from './load-balancer'; -import { ServiceConfig } from './service-config'; -import { ConfigSelector } from './resolver'; -import { StatusObject, StatusOr } from './call-interface'; -import { Endpoint } from './subchannel-address'; -import { GrpcUri } from './uri-parser'; -import { ChannelOptions } from './channel-options'; -export interface ResolutionCallback { - (serviceConfig: ServiceConfig, configSelector: ConfigSelector): void; -} -export interface ResolutionFailureCallback { - (status: StatusObject): void; -} -export declare class ResolvingLoadBalancer implements LoadBalancer { - private readonly target; - private readonly channelControlHelper; - private readonly channelOptions; - private readonly onSuccessfulResolution; - private readonly onFailedResolution; - /** - * The resolver class constructed for the target address. - */ - private readonly innerResolver; - private readonly childLoadBalancer; - private latestChildState; - private latestChildPicker; - private latestChildErrorMessage; - /** - * This resolving load balancer's current connectivity state. - */ - private currentState; - private readonly defaultServiceConfig; - /** - * The service config object from the last successful resolution, if - * available. A value of null indicates that we have not yet received a valid - * service config from the resolver. - */ - private previousServiceConfig; - /** - * The backoff timer for handling name resolution failures. - */ - private readonly backoffTimeout; - /** - * Indicates whether we should attempt to resolve again after the backoff - * timer runs out. - */ - private continueResolving; - /** - * Wrapper class that behaves like a `LoadBalancer` and also handles name - * resolution internally. - * @param target The address of the backend to connect to. - * @param channelControlHelper `ChannelControlHelper` instance provided by - * this load balancer's owner. - * @param defaultServiceConfig The default service configuration to be used - * if none is provided by the name resolver. A `null` value indicates - * that the default behavior should be the default unconfigured behavior. - * In practice, that means using the "pick first" load balancer - * implmentation - */ - constructor(target: GrpcUri, channelControlHelper: ChannelControlHelper, channelOptions: ChannelOptions, onSuccessfulResolution: ResolutionCallback, onFailedResolution: ResolutionFailureCallback); - private handleResolverResult; - private updateResolution; - private updateState; - private handleResolutionFailure; - exitIdle(): void; - updateAddressList(endpointList: StatusOr, lbConfig: TypedLoadBalancingConfig | null): never; - resetBackoff(): void; - destroy(): void; - getTypeName(): string; -} diff --git a/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js b/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js deleted file mode 100644 index ca61474..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js +++ /dev/null @@ -1,304 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ResolvingLoadBalancer = void 0; -const load_balancer_1 = require("./load-balancer"); -const service_config_1 = require("./service-config"); -const connectivity_state_1 = require("./connectivity-state"); -const resolver_1 = require("./resolver"); -const picker_1 = require("./picker"); -const backoff_timeout_1 = require("./backoff-timeout"); -const constants_1 = require("./constants"); -const metadata_1 = require("./metadata"); -const logging = require("./logging"); -const constants_2 = require("./constants"); -const uri_parser_1 = require("./uri-parser"); -const load_balancer_child_handler_1 = require("./load-balancer-child-handler"); -const TRACER_NAME = 'resolving_load_balancer'; -function trace(text) { - logging.trace(constants_2.LogVerbosity.DEBUG, TRACER_NAME, text); -} -/** - * Name match levels in order from most to least specific. This is the order in - * which searches will be performed. - */ -const NAME_MATCH_LEVEL_ORDER = [ - 'SERVICE_AND_METHOD', - 'SERVICE', - 'EMPTY', -]; -function hasMatchingName(service, method, methodConfig, matchLevel) { - for (const name of methodConfig.name) { - switch (matchLevel) { - case 'EMPTY': - if (!name.service && !name.method) { - return true; - } - break; - case 'SERVICE': - if (name.service === service && !name.method) { - return true; - } - break; - case 'SERVICE_AND_METHOD': - if (name.service === service && name.method === method) { - return true; - } - } - } - return false; -} -function findMatchingConfig(service, method, methodConfigs, matchLevel) { - for (const config of methodConfigs) { - if (hasMatchingName(service, method, config, matchLevel)) { - return config; - } - } - return null; -} -function getDefaultConfigSelector(serviceConfig) { - return { - invoke(methodName, metadata) { - var _a, _b; - const splitName = methodName.split('/').filter(x => x.length > 0); - const service = (_a = splitName[0]) !== null && _a !== void 0 ? _a : ''; - const method = (_b = splitName[1]) !== null && _b !== void 0 ? _b : ''; - if (serviceConfig && serviceConfig.methodConfig) { - /* Check for the following in order, and return the first method - * config that matches: - * 1. A name that exactly matches the service and method - * 2. A name with no method set that matches the service - * 3. An empty name - */ - for (const matchLevel of NAME_MATCH_LEVEL_ORDER) { - const matchingConfig = findMatchingConfig(service, method, serviceConfig.methodConfig, matchLevel); - if (matchingConfig) { - return { - methodConfig: matchingConfig, - pickInformation: {}, - status: constants_1.Status.OK, - dynamicFilterFactories: [], - }; - } - } - } - return { - methodConfig: { name: [] }, - pickInformation: {}, - status: constants_1.Status.OK, - dynamicFilterFactories: [], - }; - }, - unref() { } - }; -} -class ResolvingLoadBalancer { - /** - * Wrapper class that behaves like a `LoadBalancer` and also handles name - * resolution internally. - * @param target The address of the backend to connect to. - * @param channelControlHelper `ChannelControlHelper` instance provided by - * this load balancer's owner. - * @param defaultServiceConfig The default service configuration to be used - * if none is provided by the name resolver. A `null` value indicates - * that the default behavior should be the default unconfigured behavior. - * In practice, that means using the "pick first" load balancer - * implmentation - */ - constructor(target, channelControlHelper, channelOptions, onSuccessfulResolution, onFailedResolution) { - this.target = target; - this.channelControlHelper = channelControlHelper; - this.channelOptions = channelOptions; - this.onSuccessfulResolution = onSuccessfulResolution; - this.onFailedResolution = onFailedResolution; - this.latestChildState = connectivity_state_1.ConnectivityState.IDLE; - this.latestChildPicker = new picker_1.QueuePicker(this); - this.latestChildErrorMessage = null; - /** - * This resolving load balancer's current connectivity state. - */ - this.currentState = connectivity_state_1.ConnectivityState.IDLE; - /** - * The service config object from the last successful resolution, if - * available. A value of null indicates that we have not yet received a valid - * service config from the resolver. - */ - this.previousServiceConfig = null; - /** - * Indicates whether we should attempt to resolve again after the backoff - * timer runs out. - */ - this.continueResolving = false; - if (channelOptions['grpc.service_config']) { - this.defaultServiceConfig = (0, service_config_1.validateServiceConfig)(JSON.parse(channelOptions['grpc.service_config'])); - } - else { - this.defaultServiceConfig = { - loadBalancingConfig: [], - methodConfig: [], - }; - } - this.updateState(connectivity_state_1.ConnectivityState.IDLE, new picker_1.QueuePicker(this), null); - this.childLoadBalancer = new load_balancer_child_handler_1.ChildLoadBalancerHandler({ - createSubchannel: channelControlHelper.createSubchannel.bind(channelControlHelper), - requestReresolution: () => { - /* If the backoffTimeout is running, we're still backing off from - * making resolve requests, so we shouldn't make another one here. - * In that case, the backoff timer callback will call - * updateResolution */ - if (this.backoffTimeout.isRunning()) { - trace('requestReresolution delayed by backoff timer until ' + - this.backoffTimeout.getEndTime().toISOString()); - this.continueResolving = true; - } - else { - this.updateResolution(); - } - }, - updateState: (newState, picker, errorMessage) => { - this.latestChildState = newState; - this.latestChildPicker = picker; - this.latestChildErrorMessage = errorMessage; - this.updateState(newState, picker, errorMessage); - }, - addChannelzChild: channelControlHelper.addChannelzChild.bind(channelControlHelper), - removeChannelzChild: channelControlHelper.removeChannelzChild.bind(channelControlHelper), - }); - this.innerResolver = (0, resolver_1.createResolver)(target, this.handleResolverResult.bind(this), channelOptions); - const backoffOptions = { - initialDelay: channelOptions['grpc.initial_reconnect_backoff_ms'], - maxDelay: channelOptions['grpc.max_reconnect_backoff_ms'], - }; - this.backoffTimeout = new backoff_timeout_1.BackoffTimeout(() => { - if (this.continueResolving) { - this.updateResolution(); - this.continueResolving = false; - } - else { - this.updateState(this.latestChildState, this.latestChildPicker, this.latestChildErrorMessage); - } - }, backoffOptions); - this.backoffTimeout.unref(); - } - handleResolverResult(endpointList, attributes, serviceConfig, resolutionNote) { - var _a, _b; - this.backoffTimeout.stop(); - this.backoffTimeout.reset(); - let resultAccepted = true; - let workingServiceConfig = null; - if (serviceConfig === null) { - workingServiceConfig = this.defaultServiceConfig; - } - else if (serviceConfig.ok) { - workingServiceConfig = serviceConfig.value; - } - else { - if (this.previousServiceConfig !== null) { - workingServiceConfig = this.previousServiceConfig; - } - else { - resultAccepted = false; - this.handleResolutionFailure(serviceConfig.error); - } - } - if (workingServiceConfig !== null) { - const workingConfigList = (_a = workingServiceConfig === null || workingServiceConfig === void 0 ? void 0 : workingServiceConfig.loadBalancingConfig) !== null && _a !== void 0 ? _a : []; - const loadBalancingConfig = (0, load_balancer_1.selectLbConfigFromList)(workingConfigList, true); - if (loadBalancingConfig === null) { - resultAccepted = false; - this.handleResolutionFailure({ - code: constants_1.Status.UNAVAILABLE, - details: 'All load balancer options in service config are not compatible', - metadata: new metadata_1.Metadata(), - }); - } - else { - resultAccepted = this.childLoadBalancer.updateAddressList(endpointList, loadBalancingConfig, Object.assign(Object.assign({}, this.channelOptions), attributes), resolutionNote); - } - } - if (resultAccepted) { - this.onSuccessfulResolution(workingServiceConfig, (_b = attributes[resolver_1.CHANNEL_ARGS_CONFIG_SELECTOR_KEY]) !== null && _b !== void 0 ? _b : getDefaultConfigSelector(workingServiceConfig)); - } - return resultAccepted; - } - updateResolution() { - this.innerResolver.updateResolution(); - if (this.currentState === connectivity_state_1.ConnectivityState.IDLE) { - /* this.latestChildPicker is initialized as new QueuePicker(this), which - * is an appropriate value here if the child LB policy is unset. - * Otherwise, we want to delegate to the child here, in case that - * triggers something. */ - this.updateState(connectivity_state_1.ConnectivityState.CONNECTING, this.latestChildPicker, this.latestChildErrorMessage); - } - this.backoffTimeout.runOnce(); - } - updateState(connectivityState, picker, errorMessage) { - trace((0, uri_parser_1.uriToString)(this.target) + - ' ' + - connectivity_state_1.ConnectivityState[this.currentState] + - ' -> ' + - connectivity_state_1.ConnectivityState[connectivityState]); - // Ensure that this.exitIdle() is called by the picker - if (connectivityState === connectivity_state_1.ConnectivityState.IDLE) { - picker = new picker_1.QueuePicker(this, picker); - } - this.currentState = connectivityState; - this.channelControlHelper.updateState(connectivityState, picker, errorMessage); - } - handleResolutionFailure(error) { - if (this.latestChildState === connectivity_state_1.ConnectivityState.IDLE) { - this.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker(error), error.details); - this.onFailedResolution(error); - } - } - exitIdle() { - if (this.currentState === connectivity_state_1.ConnectivityState.IDLE || - this.currentState === connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE) { - if (this.backoffTimeout.isRunning()) { - this.continueResolving = true; - } - else { - this.updateResolution(); - } - } - this.childLoadBalancer.exitIdle(); - } - updateAddressList(endpointList, lbConfig) { - throw new Error('updateAddressList not supported on ResolvingLoadBalancer'); - } - resetBackoff() { - this.backoffTimeout.reset(); - this.childLoadBalancer.resetBackoff(); - } - destroy() { - this.childLoadBalancer.destroy(); - this.innerResolver.destroy(); - this.backoffTimeout.reset(); - this.backoffTimeout.stop(); - this.latestChildState = connectivity_state_1.ConnectivityState.IDLE; - this.latestChildPicker = new picker_1.QueuePicker(this); - this.currentState = connectivity_state_1.ConnectivityState.IDLE; - this.previousServiceConfig = null; - this.continueResolving = false; - } - getTypeName() { - return 'resolving_load_balancer'; - } -} -exports.ResolvingLoadBalancer = ResolvingLoadBalancer; -//# sourceMappingURL=resolving-load-balancer.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js.map b/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js.map deleted file mode 100644 index 79b48eb..0000000 --- a/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolving-load-balancer.js","sourceRoot":"","sources":["../../src/resolving-load-balancer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,mDAKyB;AACzB,qDAI0B;AAC1B,6DAAyD;AACzD,yCAAwG;AACxG,qCAAkE;AAClE,uDAAmE;AACnE,2CAAqC;AAErC,yCAAsC;AACtC,qCAAqC;AACrC,2CAA2C;AAE3C,6CAAoD;AACpD,+EAAyE;AAGzE,MAAM,WAAW,GAAG,yBAAyB,CAAC;AAE9C,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO,CAAC,KAAK,CAAC,wBAAY,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;AACvD,CAAC;AAID;;;GAGG;AACH,MAAM,sBAAsB,GAAqB;IAC/C,oBAAoB;IACpB,SAAS;IACT,OAAO;CACR,CAAC;AAEF,SAAS,eAAe,CACtB,OAAe,EACf,MAAc,EACd,YAA0B,EAC1B,UAA0B;IAE1B,KAAK,MAAM,IAAI,IAAI,YAAY,CAAC,IAAI,EAAE,CAAC;QACrC,QAAQ,UAAU,EAAE,CAAC;YACnB,KAAK,OAAO;gBACV,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;oBAClC,OAAO,IAAI,CAAC;gBACd,CAAC;gBACD,MAAM;YACR,KAAK,SAAS;gBACZ,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;oBAC7C,OAAO,IAAI,CAAC;gBACd,CAAC;gBACD,MAAM;YACR,KAAK,oBAAoB;gBACvB,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO,IAAI,IAA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,CAAC,YAAY,EAAE,CAAC;IACxC,CAAC;IAED,OAAO;QACL,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAC;QACjC,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;QAC7B,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;QAC5B,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;QAC3B,IAAI,CAAC,gBAAgB,GAAG,sCAAiB,CAAC,IAAI,CAAC;QAC/C,IAAI,CAAC,iBAAiB,GAAG,IAAI,oBAAW,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,YAAY,GAAG,sCAAiB,CAAC,IAAI,CAAC;QAC3C,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;QAClC,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACjC,CAAC;IAED,WAAW;QACT,OAAO,yBAAyB,CAAC;IACnC,CAAC;CACF;AA3PD,sDA2PC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/retrying-call.d.ts b/node_modules/@grpc/grpc-js/build/src/retrying-call.d.ts deleted file mode 100644 index 560e876..0000000 --- a/node_modules/@grpc/grpc-js/build/src/retrying-call.d.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { CallCredentials } from './call-credentials'; -import { Status } from './constants'; -import { Deadline } from './deadline'; -import { Metadata } from './metadata'; -import { CallConfig } from './resolver'; -import { Call, DeadlineInfoProvider, InterceptingListener, MessageContext } from './call-interface'; -import { InternalChannel } from './internal-channel'; -import { AuthContext } from './auth-context'; -export declare class RetryThrottler { - private readonly maxTokens; - private readonly tokenRatio; - private tokens; - constructor(maxTokens: number, tokenRatio: number, previousRetryThrottler?: RetryThrottler); - addCallSucceeded(): void; - addCallFailed(): void; - canRetryCall(): boolean; -} -export declare class MessageBufferTracker { - private totalLimit; - private limitPerCall; - private totalAllocated; - private allocatedPerCall; - constructor(totalLimit: number, limitPerCall: number); - allocate(size: number, callId: number): boolean; - free(size: number, callId: number): void; - freeAll(callId: number): void; -} -export declare class RetryingCall implements Call, DeadlineInfoProvider { - private readonly channel; - private readonly callConfig; - private readonly methodName; - private readonly host; - private readonly credentials; - private readonly deadline; - private readonly callNumber; - private readonly bufferTracker; - private readonly retryThrottler?; - private state; - private listener; - private initialMetadata; - private underlyingCalls; - private writeBuffer; - /** - * The offset of message indices in the writeBuffer. For example, if - * writeBufferOffset is 10, message 10 is in writeBuffer[0] and message 15 - * is in writeBuffer[5]. - */ - private writeBufferOffset; - /** - * Tracks whether a read has been started, so that we know whether to start - * reads on new child calls. This only matters for the first read, because - * once a message comes in the child call becomes committed and there will - * be no new child calls. - */ - private readStarted; - private transparentRetryUsed; - /** - * Number of attempts so far - */ - private attempts; - private hedgingTimer; - private committedCallIndex; - private initialRetryBackoffSec; - private nextRetryBackoffSec; - private startTime; - private maxAttempts; - constructor(channel: InternalChannel, callConfig: CallConfig, methodName: string, host: string, credentials: CallCredentials, deadline: Deadline, callNumber: number, bufferTracker: MessageBufferTracker, retryThrottler?: RetryThrottler | undefined); - getDeadlineInfo(): string[]; - getCallNumber(): number; - private trace; - private reportStatus; - cancelWithStatus(status: Status, details: string): void; - getPeer(): string; - private getBufferEntry; - private getNextBufferIndex; - private clearSentMessages; - private commitCall; - private commitCallWithMostMessages; - private isStatusCodeInList; - private getNextRetryJitter; - private getNextRetryBackoffMs; - private maybeRetryCall; - private countActiveCalls; - private handleProcessedStatus; - private getPushback; - private handleChildStatus; - private maybeStartHedgingAttempt; - private maybeStartHedgingTimer; - private startNewAttempt; - start(metadata: Metadata, listener: InterceptingListener): void; - private handleChildWriteCompleted; - private sendNextChildMessage; - sendMessageWithContext(context: MessageContext, message: Buffer): void; - startRead(): void; - halfClose(): void; - setCredentials(newCredentials: CallCredentials): void; - getMethod(): string; - getHost(): string; - getAuthContext(): AuthContext | null; -} diff --git a/node_modules/@grpc/grpc-js/build/src/retrying-call.js b/node_modules/@grpc/grpc-js/build/src/retrying-call.js deleted file mode 100644 index e5935ec..0000000 --- a/node_modules/@grpc/grpc-js/build/src/retrying-call.js +++ /dev/null @@ -1,724 +0,0 @@ -"use strict"; -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RetryingCall = exports.MessageBufferTracker = exports.RetryThrottler = void 0; -const constants_1 = require("./constants"); -const deadline_1 = require("./deadline"); -const metadata_1 = require("./metadata"); -const logging = require("./logging"); -const TRACER_NAME = 'retrying_call'; -class RetryThrottler { - constructor(maxTokens, tokenRatio, previousRetryThrottler) { - this.maxTokens = maxTokens; - this.tokenRatio = tokenRatio; - if (previousRetryThrottler) { - /* When carrying over tokens from a previous config, rescale them to the - * new max value */ - this.tokens = - previousRetryThrottler.tokens * - (maxTokens / previousRetryThrottler.maxTokens); - } - else { - this.tokens = maxTokens; - } - } - addCallSucceeded() { - this.tokens = Math.min(this.tokens + this.tokenRatio, this.maxTokens); - } - addCallFailed() { - this.tokens = Math.max(this.tokens - 1, 0); - } - canRetryCall() { - return this.tokens > (this.maxTokens / 2); - } -} -exports.RetryThrottler = RetryThrottler; -class MessageBufferTracker { - constructor(totalLimit, limitPerCall) { - this.totalLimit = totalLimit; - this.limitPerCall = limitPerCall; - this.totalAllocated = 0; - this.allocatedPerCall = new Map(); - } - allocate(size, callId) { - var _a; - const currentPerCall = (_a = this.allocatedPerCall.get(callId)) !== null && _a !== void 0 ? _a : 0; - if (this.limitPerCall - currentPerCall < size || - this.totalLimit - this.totalAllocated < size) { - return false; - } - this.allocatedPerCall.set(callId, currentPerCall + size); - this.totalAllocated += size; - return true; - } - free(size, callId) { - var _a; - if (this.totalAllocated < size) { - throw new Error(`Invalid buffer allocation state: call ${callId} freed ${size} > total allocated ${this.totalAllocated}`); - } - this.totalAllocated -= size; - const currentPerCall = (_a = this.allocatedPerCall.get(callId)) !== null && _a !== void 0 ? _a : 0; - if (currentPerCall < size) { - throw new Error(`Invalid buffer allocation state: call ${callId} freed ${size} > allocated for call ${currentPerCall}`); - } - this.allocatedPerCall.set(callId, currentPerCall - size); - } - freeAll(callId) { - var _a; - const currentPerCall = (_a = this.allocatedPerCall.get(callId)) !== null && _a !== void 0 ? _a : 0; - if (this.totalAllocated < currentPerCall) { - throw new Error(`Invalid buffer allocation state: call ${callId} allocated ${currentPerCall} > total allocated ${this.totalAllocated}`); - } - this.totalAllocated -= currentPerCall; - this.allocatedPerCall.delete(callId); - } -} -exports.MessageBufferTracker = MessageBufferTracker; -const PREVIONS_RPC_ATTEMPTS_METADATA_KEY = 'grpc-previous-rpc-attempts'; -const DEFAULT_MAX_ATTEMPTS_LIMIT = 5; -class RetryingCall { - constructor(channel, callConfig, methodName, host, credentials, deadline, callNumber, bufferTracker, retryThrottler) { - var _a; - this.channel = channel; - this.callConfig = callConfig; - this.methodName = methodName; - this.host = host; - this.credentials = credentials; - this.deadline = deadline; - this.callNumber = callNumber; - this.bufferTracker = bufferTracker; - this.retryThrottler = retryThrottler; - this.listener = null; - this.initialMetadata = null; - this.underlyingCalls = []; - this.writeBuffer = []; - /** - * The offset of message indices in the writeBuffer. For example, if - * writeBufferOffset is 10, message 10 is in writeBuffer[0] and message 15 - * is in writeBuffer[5]. - */ - this.writeBufferOffset = 0; - /** - * Tracks whether a read has been started, so that we know whether to start - * reads on new child calls. This only matters for the first read, because - * once a message comes in the child call becomes committed and there will - * be no new child calls. - */ - this.readStarted = false; - this.transparentRetryUsed = false; - /** - * Number of attempts so far - */ - this.attempts = 0; - this.hedgingTimer = null; - this.committedCallIndex = null; - this.initialRetryBackoffSec = 0; - this.nextRetryBackoffSec = 0; - const maxAttemptsLimit = (_a = channel.getOptions()['grpc-node.retry_max_attempts_limit']) !== null && _a !== void 0 ? _a : DEFAULT_MAX_ATTEMPTS_LIMIT; - if (channel.getOptions()['grpc.enable_retries'] === 0) { - this.state = 'NO_RETRY'; - this.maxAttempts = 1; - } - else if (callConfig.methodConfig.retryPolicy) { - this.state = 'RETRY'; - const retryPolicy = callConfig.methodConfig.retryPolicy; - this.nextRetryBackoffSec = this.initialRetryBackoffSec = Number(retryPolicy.initialBackoff.substring(0, retryPolicy.initialBackoff.length - 1)); - this.maxAttempts = Math.min(retryPolicy.maxAttempts, maxAttemptsLimit); - } - else if (callConfig.methodConfig.hedgingPolicy) { - this.state = 'HEDGING'; - this.maxAttempts = Math.min(callConfig.methodConfig.hedgingPolicy.maxAttempts, maxAttemptsLimit); - } - else { - this.state = 'TRANSPARENT_ONLY'; - this.maxAttempts = 1; - } - this.startTime = new Date(); - } - getDeadlineInfo() { - if (this.underlyingCalls.length === 0) { - return []; - } - const deadlineInfo = []; - const latestCall = this.underlyingCalls[this.underlyingCalls.length - 1]; - if (this.underlyingCalls.length > 1) { - deadlineInfo.push(`previous attempts: ${this.underlyingCalls.length - 1}`); - } - if (latestCall.startTime > this.startTime) { - deadlineInfo.push(`time to current attempt start: ${(0, deadline_1.formatDateDifference)(this.startTime, latestCall.startTime)}`); - } - deadlineInfo.push(...latestCall.call.getDeadlineInfo()); - return deadlineInfo; - } - getCallNumber() { - return this.callNumber; - } - trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, '[' + this.callNumber + '] ' + text); - } - reportStatus(statusObject) { - this.trace('ended with status: code=' + - statusObject.code + - ' details="' + - statusObject.details + - '" start time=' + - this.startTime.toISOString()); - this.bufferTracker.freeAll(this.callNumber); - this.writeBufferOffset = this.writeBufferOffset + this.writeBuffer.length; - this.writeBuffer = []; - process.nextTick(() => { - var _a; - // Explicitly construct status object to remove progress field - (_a = this.listener) === null || _a === void 0 ? void 0 : _a.onReceiveStatus({ - code: statusObject.code, - details: statusObject.details, - metadata: statusObject.metadata, - }); - }); - } - cancelWithStatus(status, details) { - this.trace('cancelWithStatus code: ' + status + ' details: "' + details + '"'); - this.reportStatus({ code: status, details, metadata: new metadata_1.Metadata() }); - for (const { call } of this.underlyingCalls) { - call.cancelWithStatus(status, details); - } - } - getPeer() { - if (this.committedCallIndex !== null) { - return this.underlyingCalls[this.committedCallIndex].call.getPeer(); - } - else { - return 'unknown'; - } - } - getBufferEntry(messageIndex) { - var _a; - return ((_a = this.writeBuffer[messageIndex - this.writeBufferOffset]) !== null && _a !== void 0 ? _a : { - entryType: 'FREED', - allocated: false, - }); - } - getNextBufferIndex() { - return this.writeBufferOffset + this.writeBuffer.length; - } - clearSentMessages() { - if (this.state !== 'COMMITTED') { - return; - } - let earliestNeededMessageIndex; - if (this.underlyingCalls[this.committedCallIndex].state === 'COMPLETED') { - /* If the committed call is completed, clear all messages, even if some - * have not been sent. */ - earliestNeededMessageIndex = this.getNextBufferIndex(); - } - else { - earliestNeededMessageIndex = - this.underlyingCalls[this.committedCallIndex].nextMessageToSend; - } - for (let messageIndex = this.writeBufferOffset; messageIndex < earliestNeededMessageIndex; messageIndex++) { - const bufferEntry = this.getBufferEntry(messageIndex); - if (bufferEntry.allocated) { - this.bufferTracker.free(bufferEntry.message.message.length, this.callNumber); - } - } - this.writeBuffer = this.writeBuffer.slice(earliestNeededMessageIndex - this.writeBufferOffset); - this.writeBufferOffset = earliestNeededMessageIndex; - } - commitCall(index) { - var _a, _b; - if (this.state === 'COMMITTED') { - return; - } - this.trace('Committing call [' + - this.underlyingCalls[index].call.getCallNumber() + - '] at index ' + - index); - this.state = 'COMMITTED'; - (_b = (_a = this.callConfig).onCommitted) === null || _b === void 0 ? void 0 : _b.call(_a); - this.committedCallIndex = index; - for (let i = 0; i < this.underlyingCalls.length; i++) { - if (i === index) { - continue; - } - if (this.underlyingCalls[i].state === 'COMPLETED') { - continue; - } - this.underlyingCalls[i].state = 'COMPLETED'; - this.underlyingCalls[i].call.cancelWithStatus(constants_1.Status.CANCELLED, 'Discarded in favor of other hedged attempt'); - } - this.clearSentMessages(); - } - commitCallWithMostMessages() { - if (this.state === 'COMMITTED') { - return; - } - let mostMessages = -1; - let callWithMostMessages = -1; - for (const [index, childCall] of this.underlyingCalls.entries()) { - if (childCall.state === 'ACTIVE' && - childCall.nextMessageToSend > mostMessages) { - mostMessages = childCall.nextMessageToSend; - callWithMostMessages = index; - } - } - if (callWithMostMessages === -1) { - /* There are no active calls, disable retries to force the next call that - * is started to be committed. */ - this.state = 'TRANSPARENT_ONLY'; - } - else { - this.commitCall(callWithMostMessages); - } - } - isStatusCodeInList(list, code) { - return list.some(value => { - var _a; - return value === code || - value.toString().toLowerCase() === ((_a = constants_1.Status[code]) === null || _a === void 0 ? void 0 : _a.toLowerCase()); - }); - } - getNextRetryJitter() { - /* Jitter of +-20% is applied: https://github.com/grpc/proposal/blob/master/A6-client-retries.md#exponential-backoff */ - return Math.random() * (1.2 - 0.8) + 0.8; - } - getNextRetryBackoffMs() { - var _a; - const retryPolicy = (_a = this.callConfig) === null || _a === void 0 ? void 0 : _a.methodConfig.retryPolicy; - if (!retryPolicy) { - return 0; - } - const jitter = this.getNextRetryJitter(); - const nextBackoffMs = jitter * this.nextRetryBackoffSec * 1000; - const maxBackoffSec = Number(retryPolicy.maxBackoff.substring(0, retryPolicy.maxBackoff.length - 1)); - this.nextRetryBackoffSec = Math.min(this.nextRetryBackoffSec * retryPolicy.backoffMultiplier, maxBackoffSec); - return nextBackoffMs; - } - maybeRetryCall(pushback, callback) { - if (this.state !== 'RETRY') { - callback(false); - return; - } - if (this.attempts >= this.maxAttempts) { - callback(false); - return; - } - let retryDelayMs; - if (pushback === null) { - retryDelayMs = this.getNextRetryBackoffMs(); - } - else if (pushback < 0) { - this.state = 'TRANSPARENT_ONLY'; - callback(false); - return; - } - else { - retryDelayMs = pushback; - this.nextRetryBackoffSec = this.initialRetryBackoffSec; - } - setTimeout(() => { - var _a, _b; - if (this.state !== 'RETRY') { - callback(false); - return; - } - if ((_b = (_a = this.retryThrottler) === null || _a === void 0 ? void 0 : _a.canRetryCall()) !== null && _b !== void 0 ? _b : true) { - callback(true); - this.attempts += 1; - this.startNewAttempt(); - } - else { - this.trace('Retry attempt denied by throttling policy'); - callback(false); - } - }, retryDelayMs); - } - countActiveCalls() { - let count = 0; - for (const call of this.underlyingCalls) { - if ((call === null || call === void 0 ? void 0 : call.state) === 'ACTIVE') { - count += 1; - } - } - return count; - } - handleProcessedStatus(status, callIndex, pushback) { - var _a, _b, _c; - switch (this.state) { - case 'COMMITTED': - case 'NO_RETRY': - case 'TRANSPARENT_ONLY': - this.commitCall(callIndex); - this.reportStatus(status); - break; - case 'HEDGING': - if (this.isStatusCodeInList((_a = this.callConfig.methodConfig.hedgingPolicy.nonFatalStatusCodes) !== null && _a !== void 0 ? _a : [], status.code)) { - (_b = this.retryThrottler) === null || _b === void 0 ? void 0 : _b.addCallFailed(); - let delayMs; - if (pushback === null) { - delayMs = 0; - } - else if (pushback < 0) { - this.state = 'TRANSPARENT_ONLY'; - this.commitCall(callIndex); - this.reportStatus(status); - return; - } - else { - delayMs = pushback; - } - setTimeout(() => { - this.maybeStartHedgingAttempt(); - // If after trying to start a call there are no active calls, this was the last one - if (this.countActiveCalls() === 0) { - this.commitCall(callIndex); - this.reportStatus(status); - } - }, delayMs); - } - else { - this.commitCall(callIndex); - this.reportStatus(status); - } - break; - case 'RETRY': - if (this.isStatusCodeInList(this.callConfig.methodConfig.retryPolicy.retryableStatusCodes, status.code)) { - (_c = this.retryThrottler) === null || _c === void 0 ? void 0 : _c.addCallFailed(); - this.maybeRetryCall(pushback, retried => { - if (!retried) { - this.commitCall(callIndex); - this.reportStatus(status); - } - }); - } - else { - this.commitCall(callIndex); - this.reportStatus(status); - } - break; - } - } - getPushback(metadata) { - const mdValue = metadata.get('grpc-retry-pushback-ms'); - if (mdValue.length === 0) { - return null; - } - try { - return parseInt(mdValue[0]); - } - catch (e) { - return -1; - } - } - handleChildStatus(status, callIndex) { - var _a; - if (this.underlyingCalls[callIndex].state === 'COMPLETED') { - return; - } - this.trace('state=' + - this.state + - ' handling status with progress ' + - status.progress + - ' from child [' + - this.underlyingCalls[callIndex].call.getCallNumber() + - '] in state ' + - this.underlyingCalls[callIndex].state); - this.underlyingCalls[callIndex].state = 'COMPLETED'; - if (status.code === constants_1.Status.OK) { - (_a = this.retryThrottler) === null || _a === void 0 ? void 0 : _a.addCallSucceeded(); - this.commitCall(callIndex); - this.reportStatus(status); - return; - } - if (this.state === 'NO_RETRY') { - this.commitCall(callIndex); - this.reportStatus(status); - return; - } - if (this.state === 'COMMITTED') { - this.reportStatus(status); - return; - } - const pushback = this.getPushback(status.metadata); - switch (status.progress) { - case 'NOT_STARTED': - // RPC never leaves the client, always safe to retry - this.startNewAttempt(); - break; - case 'REFUSED': - // RPC reaches the server library, but not the server application logic - if (this.transparentRetryUsed) { - this.handleProcessedStatus(status, callIndex, pushback); - } - else { - this.transparentRetryUsed = true; - this.startNewAttempt(); - } - break; - case 'DROP': - this.commitCall(callIndex); - this.reportStatus(status); - break; - case 'PROCESSED': - this.handleProcessedStatus(status, callIndex, pushback); - break; - } - } - maybeStartHedgingAttempt() { - if (this.state !== 'HEDGING') { - return; - } - if (!this.callConfig.methodConfig.hedgingPolicy) { - return; - } - if (this.attempts >= this.maxAttempts) { - return; - } - this.attempts += 1; - this.startNewAttempt(); - this.maybeStartHedgingTimer(); - } - maybeStartHedgingTimer() { - var _a, _b, _c; - if (this.hedgingTimer) { - clearTimeout(this.hedgingTimer); - } - if (this.state !== 'HEDGING') { - return; - } - if (!this.callConfig.methodConfig.hedgingPolicy) { - return; - } - const hedgingPolicy = this.callConfig.methodConfig.hedgingPolicy; - if (this.attempts >= this.maxAttempts) { - return; - } - const hedgingDelayString = (_a = hedgingPolicy.hedgingDelay) !== null && _a !== void 0 ? _a : '0s'; - const hedgingDelaySec = Number(hedgingDelayString.substring(0, hedgingDelayString.length - 1)); - this.hedgingTimer = setTimeout(() => { - this.maybeStartHedgingAttempt(); - }, hedgingDelaySec * 1000); - (_c = (_b = this.hedgingTimer).unref) === null || _c === void 0 ? void 0 : _c.call(_b); - } - startNewAttempt() { - const child = this.channel.createLoadBalancingCall(this.callConfig, this.methodName, this.host, this.credentials, this.deadline); - this.trace('Created child call [' + - child.getCallNumber() + - '] for attempt ' + - this.attempts); - const index = this.underlyingCalls.length; - this.underlyingCalls.push({ - state: 'ACTIVE', - call: child, - nextMessageToSend: 0, - startTime: new Date(), - }); - const previousAttempts = this.attempts - 1; - const initialMetadata = this.initialMetadata.clone(); - if (previousAttempts > 0) { - initialMetadata.set(PREVIONS_RPC_ATTEMPTS_METADATA_KEY, `${previousAttempts}`); - } - let receivedMetadata = false; - child.start(initialMetadata, { - onReceiveMetadata: metadata => { - this.trace('Received metadata from child [' + child.getCallNumber() + ']'); - this.commitCall(index); - receivedMetadata = true; - if (previousAttempts > 0) { - metadata.set(PREVIONS_RPC_ATTEMPTS_METADATA_KEY, `${previousAttempts}`); - } - if (this.underlyingCalls[index].state === 'ACTIVE') { - this.listener.onReceiveMetadata(metadata); - } - }, - onReceiveMessage: message => { - this.trace('Received message from child [' + child.getCallNumber() + ']'); - this.commitCall(index); - if (this.underlyingCalls[index].state === 'ACTIVE') { - this.listener.onReceiveMessage(message); - } - }, - onReceiveStatus: status => { - this.trace('Received status from child [' + child.getCallNumber() + ']'); - if (!receivedMetadata && previousAttempts > 0) { - status.metadata.set(PREVIONS_RPC_ATTEMPTS_METADATA_KEY, `${previousAttempts}`); - } - this.handleChildStatus(status, index); - }, - }); - this.sendNextChildMessage(index); - if (this.readStarted) { - child.startRead(); - } - } - start(metadata, listener) { - this.trace('start called'); - this.listener = listener; - this.initialMetadata = metadata; - this.attempts += 1; - this.startNewAttempt(); - this.maybeStartHedgingTimer(); - } - handleChildWriteCompleted(childIndex, messageIndex) { - var _a, _b; - (_b = (_a = this.getBufferEntry(messageIndex)).callback) === null || _b === void 0 ? void 0 : _b.call(_a); - this.clearSentMessages(); - const childCall = this.underlyingCalls[childIndex]; - childCall.nextMessageToSend += 1; - this.sendNextChildMessage(childIndex); - } - sendNextChildMessage(childIndex) { - const childCall = this.underlyingCalls[childIndex]; - if (childCall.state === 'COMPLETED') { - return; - } - const messageIndex = childCall.nextMessageToSend; - if (this.getBufferEntry(messageIndex)) { - const bufferEntry = this.getBufferEntry(messageIndex); - switch (bufferEntry.entryType) { - case 'MESSAGE': - childCall.call.sendMessageWithContext({ - callback: error => { - // Ignore error - this.handleChildWriteCompleted(childIndex, messageIndex); - }, - }, bufferEntry.message.message); - // Optimization: if the next entry is HALF_CLOSE, send it immediately - // without waiting for the message callback. This is safe because the message - // has already been passed to the underlying transport. - const nextEntry = this.getBufferEntry(messageIndex + 1); - if (nextEntry.entryType === 'HALF_CLOSE') { - this.trace('Sending halfClose immediately after message to child [' + - childCall.call.getCallNumber() + - '] - optimizing for unary/final message'); - childCall.nextMessageToSend += 1; - childCall.call.halfClose(); - } - break; - case 'HALF_CLOSE': - childCall.nextMessageToSend += 1; - childCall.call.halfClose(); - break; - case 'FREED': - // Should not be possible - break; - } - } - } - sendMessageWithContext(context, message) { - this.trace('write() called with message of length ' + message.length); - const writeObj = { - message, - flags: context.flags, - }; - const messageIndex = this.getNextBufferIndex(); - const bufferEntry = { - entryType: 'MESSAGE', - message: writeObj, - allocated: this.bufferTracker.allocate(message.length, this.callNumber), - }; - this.writeBuffer.push(bufferEntry); - if (bufferEntry.allocated) { - // Run this in next tick to avoid suspending the current execution context - // otherwise it might cause half closing the call before sending message - process.nextTick(() => { - var _a; - (_a = context.callback) === null || _a === void 0 ? void 0 : _a.call(context); - }); - for (const [callIndex, call] of this.underlyingCalls.entries()) { - if (call.state === 'ACTIVE' && - call.nextMessageToSend === messageIndex) { - call.call.sendMessageWithContext({ - callback: error => { - // Ignore error - this.handleChildWriteCompleted(callIndex, messageIndex); - }, - }, message); - } - } - } - else { - this.commitCallWithMostMessages(); - // commitCallWithMostMessages can fail if we are between ping attempts - if (this.committedCallIndex === null) { - return; - } - const call = this.underlyingCalls[this.committedCallIndex]; - bufferEntry.callback = context.callback; - if (call.state === 'ACTIVE' && call.nextMessageToSend === messageIndex) { - call.call.sendMessageWithContext({ - callback: error => { - // Ignore error - this.handleChildWriteCompleted(this.committedCallIndex, messageIndex); - }, - }, message); - } - } - } - startRead() { - this.trace('startRead called'); - this.readStarted = true; - for (const underlyingCall of this.underlyingCalls) { - if ((underlyingCall === null || underlyingCall === void 0 ? void 0 : underlyingCall.state) === 'ACTIVE') { - underlyingCall.call.startRead(); - } - } - } - halfClose() { - this.trace('halfClose called'); - const halfCloseIndex = this.getNextBufferIndex(); - this.writeBuffer.push({ - entryType: 'HALF_CLOSE', - allocated: false, - }); - for (const call of this.underlyingCalls) { - if ((call === null || call === void 0 ? void 0 : call.state) === 'ACTIVE') { - // Send halfClose to call when either: - // - nextMessageToSend === halfCloseIndex - 1: last message sent, callback pending (optimization) - // - nextMessageToSend === halfCloseIndex: all messages sent and acknowledged - if (call.nextMessageToSend === halfCloseIndex - || call.nextMessageToSend === halfCloseIndex - 1) { - this.trace('Sending halfClose immediately to child [' + - call.call.getCallNumber() + - '] - all messages already sent'); - call.nextMessageToSend += 1; - call.call.halfClose(); - } - // Otherwise, halfClose will be sent by sendNextChildMessage when message callbacks complete - } - } - } - setCredentials(newCredentials) { - throw new Error('Method not implemented.'); - } - getMethod() { - return this.methodName; - } - getHost() { - return this.host; - } - getAuthContext() { - if (this.committedCallIndex !== null) { - return this.underlyingCalls[this.committedCallIndex].call.getAuthContext(); - } - else { - return null; - } - } -} -exports.RetryingCall = RetryingCall; -//# sourceMappingURL=retrying-call.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/retrying-call.js.map b/node_modules/@grpc/grpc-js/build/src/retrying-call.js.map deleted file mode 100644 index 13a5042..0000000 --- a/node_modules/@grpc/grpc-js/build/src/retrying-call.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retrying-call.js","sour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C;wBACxC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;wBACzB,+BAA+B,CAClC,CAAC;oBACF,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;oBAC5B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;gBACxB,CAAC;gBACD,4FAA4F;YAC9F,CAAC;QACH,CAAC;IACH,CAAC;IACD,cAAc,CAAC,cAA+B;QAC5C,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,SAAS;QACP,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IACD,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IACD,cAAc;QACZ,IAAI,IAAI,CAAC,kBAAkB,KAAK,IAAI,EAAE,CAAC;YACrC,OAAO,IAAI,CAAC,eAAe,CACzB,IAAI,CAAC,kBAAkB,CACxB,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF;AApuBD,oCAouBC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/server-call.d.ts b/node_modules/@grpc/grpc-js/build/src/server-call.d.ts deleted file mode 100644 index 0f3d779..0000000 --- a/node_modules/@grpc/grpc-js/build/src/server-call.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { EventEmitter } from 'events'; -import { Duplex, Readable, Writable } from 'stream'; -import type { Deserialize, Serialize } from './make-client'; -import { Metadata } from './metadata'; -import type { ObjectReadable, ObjectWritable } from './object-stream'; -import type { StatusObject, PartialStatusObject } from './call-interface'; -import type { Deadline } from './deadline'; -import type { ServerInterceptingCallInterface } from './server-interceptors'; -import { AuthContext } from './auth-context'; -import { PerRequestMetricRecorder } from './orca'; -export type ServerStatusResponse = Partial; -export type ServerErrorResponse = ServerStatusResponse & Error; -export type ServerSurfaceCall = { - cancelled: boolean; - readonly metadata: Metadata; - getPeer(): string; - sendMetadata(responseMetadata: Metadata): void; - getDeadline(): Deadline; - getPath(): string; - getHost(): string; - getAuthContext(): AuthContext; - getMetricsRecorder(): PerRequestMetricRecorder; -} & EventEmitter; -export type ServerUnaryCall = ServerSurfaceCall & { - request: RequestType; -}; -export type ServerReadableStream = ServerSurfaceCall & ObjectReadable; -export type ServerWritableStream = ServerSurfaceCall & ObjectWritable & { - request: RequestType; - end: (metadata?: Metadata) => void; -}; -export type ServerDuplexStream = ServerSurfaceCall & ObjectReadable & ObjectWritable & { - end: (metadata?: Metadata) => void; -}; -export declare function serverErrorToStatus(error: ServerErrorResponse | ServerStatusResponse, overrideTrailers?: Metadata | undefined): PartialStatusObject; -export declare class ServerUnaryCallImpl extends EventEmitter implements ServerUnaryCall { - private path; - private call; - metadata: Metadata; - request: RequestType; - cancelled: boolean; - constructor(path: string, call: ServerInterceptingCallInterface, metadata: Metadata, request: RequestType); - getPeer(): string; - sendMetadata(responseMetadata: Metadata): void; - getDeadline(): Deadline; - getPath(): string; - getHost(): string; - getAuthContext(): AuthContext; - getMetricsRecorder(): PerRequestMetricRecorder; -} -export declare class ServerReadableStreamImpl extends Readable implements ServerReadableStream { - private path; - private call; - metadata: Metadata; - cancelled: boolean; - constructor(path: string, call: ServerInterceptingCallInterface, metadata: Metadata); - _read(size: number): void; - getPeer(): string; - sendMetadata(responseMetadata: Metadata): void; - getDeadline(): Deadline; - getPath(): string; - getHost(): string; - getAuthContext(): AuthContext; - getMetricsRecorder(): PerRequestMetricRecorder; -} -export declare class ServerWritableStreamImpl extends Writable implements ServerWritableStream { - private path; - private call; - metadata: Metadata; - request: RequestType; - cancelled: boolean; - private trailingMetadata; - private pendingStatus; - constructor(path: string, call: ServerInterceptingCallInterface, metadata: Metadata, request: RequestType); - getPeer(): string; - sendMetadata(responseMetadata: Metadata): void; - getDeadline(): Deadline; - getPath(): string; - getHost(): string; - getAuthContext(): AuthContext; - getMetricsRecorder(): PerRequestMetricRecorder; - _write(chunk: ResponseType, encoding: string, callback: (...args: any[]) => void): void; - _final(callback: Function): void; - end(metadata?: any): this; -} -export declare class ServerDuplexStreamImpl extends Duplex implements ServerDuplexStream { - private path; - private call; - metadata: Metadata; - cancelled: boolean; - private trailingMetadata; - private pendingStatus; - constructor(path: string, call: ServerInterceptingCallInterface, metadata: Metadata); - getPeer(): string; - sendMetadata(responseMetadata: Metadata): void; - getDeadline(): Deadline; - getPath(): string; - getHost(): string; - getAuthContext(): AuthContext; - getMetricsRecorder(): PerRequestMetricRecorder; - _read(size: number): void; - _write(chunk: ResponseType, encoding: string, callback: (...args: any[]) => void): void; - _final(callback: Function): void; - end(metadata?: any): this; -} -export type sendUnaryData = (error: ServerErrorResponse | ServerStatusResponse | null, value?: ResponseType | null, trailer?: Metadata, flags?: number) => void; -export type handleUnaryCall = (call: ServerUnaryCall, callback: sendUnaryData) => void; -export type handleClientStreamingCall = (call: ServerReadableStream, callback: sendUnaryData) => void; -export type handleServerStreamingCall = (call: ServerWritableStream) => void; -export type handleBidiStreamingCall = (call: ServerDuplexStream) => void; -export type HandleCall = handleUnaryCall | handleClientStreamingCall | handleServerStreamingCall | handleBidiStreamingCall; -export interface UnaryHandler { - func: handleUnaryCall; - serialize: Serialize; - deserialize: Deserialize; - type: 'unary'; - path: string; -} -export interface ClientStreamingHandler { - func: handleClientStreamingCall; - serialize: Serialize; - deserialize: Deserialize; - type: 'clientStream'; - path: string; -} -export interface ServerStreamingHandler { - func: handleServerStreamingCall; - serialize: Serialize; - deserialize: Deserialize; - type: 'serverStream'; - path: string; -} -export interface BidiStreamingHandler { - func: handleBidiStreamingCall; - serialize: Serialize; - deserialize: Deserialize; - type: 'bidi'; - path: string; -} -export type Handler = UnaryHandler | ClientStreamingHandler | ServerStreamingHandler | BidiStreamingHandler; -export type HandlerType = 'bidi' | 'clientStream' | 'serverStream' | 'unary'; diff --git a/node_modules/@grpc/grpc-js/build/src/server-call.js b/node_modules/@grpc/grpc-js/build/src/server-call.js deleted file mode 100644 index 521f4d3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/server-call.js +++ /dev/null @@ -1,226 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ServerDuplexStreamImpl = exports.ServerWritableStreamImpl = exports.ServerReadableStreamImpl = exports.ServerUnaryCallImpl = void 0; -exports.serverErrorToStatus = serverErrorToStatus; -const events_1 = require("events"); -const stream_1 = require("stream"); -const constants_1 = require("./constants"); -const metadata_1 = require("./metadata"); -function serverErrorToStatus(error, overrideTrailers) { - var _a; - const status = { - code: constants_1.Status.UNKNOWN, - details: 'message' in error ? error.message : 'Unknown Error', - metadata: (_a = overrideTrailers !== null && overrideTrailers !== void 0 ? overrideTrailers : error.metadata) !== null && _a !== void 0 ? _a : null, - }; - if ('code' in error && - typeof error.code === 'number' && - Number.isInteger(error.code)) { - status.code = error.code; - if ('details' in error && typeof error.details === 'string') { - status.details = error.details; - } - } - return status; -} -class ServerUnaryCallImpl extends events_1.EventEmitter { - constructor(path, call, metadata, request) { - super(); - this.path = path; - this.call = call; - this.metadata = metadata; - this.request = request; - this.cancelled = false; - } - getPeer() { - return this.call.getPeer(); - } - sendMetadata(responseMetadata) { - this.call.sendMetadata(responseMetadata); - } - getDeadline() { - return this.call.getDeadline(); - } - getPath() { - return this.path; - } - getHost() { - return this.call.getHost(); - } - getAuthContext() { - return this.call.getAuthContext(); - } - getMetricsRecorder() { - return this.call.getMetricsRecorder(); - } -} -exports.ServerUnaryCallImpl = ServerUnaryCallImpl; -class ServerReadableStreamImpl extends stream_1.Readable { - constructor(path, call, metadata) { - super({ objectMode: true }); - this.path = path; - this.call = call; - this.metadata = metadata; - this.cancelled = false; - } - _read(size) { - this.call.startRead(); - } - getPeer() { - return this.call.getPeer(); - } - sendMetadata(responseMetadata) { - this.call.sendMetadata(responseMetadata); - } - getDeadline() { - return this.call.getDeadline(); - } - getPath() { - return this.path; - } - getHost() { - return this.call.getHost(); - } - getAuthContext() { - return this.call.getAuthContext(); - } - getMetricsRecorder() { - return this.call.getMetricsRecorder(); - } -} -exports.ServerReadableStreamImpl = ServerReadableStreamImpl; -class ServerWritableStreamImpl extends stream_1.Writable { - constructor(path, call, metadata, request) { - super({ objectMode: true }); - this.path = path; - this.call = call; - this.metadata = metadata; - this.request = request; - this.pendingStatus = { - code: constants_1.Status.OK, - details: 'OK', - }; - this.cancelled = false; - this.trailingMetadata = new metadata_1.Metadata(); - this.on('error', err => { - this.pendingStatus = serverErrorToStatus(err); - this.end(); - }); - } - getPeer() { - return this.call.getPeer(); - } - sendMetadata(responseMetadata) { - this.call.sendMetadata(responseMetadata); - } - getDeadline() { - return this.call.getDeadline(); - } - getPath() { - return this.path; - } - getHost() { - return this.call.getHost(); - } - getAuthContext() { - return this.call.getAuthContext(); - } - getMetricsRecorder() { - return this.call.getMetricsRecorder(); - } - _write(chunk, encoding, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - callback) { - this.call.sendMessage(chunk, callback); - } - _final(callback) { - var _a; - callback(null); - this.call.sendStatus(Object.assign(Object.assign({}, this.pendingStatus), { metadata: (_a = this.pendingStatus.metadata) !== null && _a !== void 0 ? _a : this.trailingMetadata })); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - end(metadata) { - if (metadata) { - this.trailingMetadata = metadata; - } - return super.end(); - } -} -exports.ServerWritableStreamImpl = ServerWritableStreamImpl; -class ServerDuplexStreamImpl extends stream_1.Duplex { - constructor(path, call, metadata) { - super({ objectMode: true }); - this.path = path; - this.call = call; - this.metadata = metadata; - this.pendingStatus = { - code: constants_1.Status.OK, - details: 'OK', - }; - this.cancelled = false; - this.trailingMetadata = new metadata_1.Metadata(); - this.on('error', err => { - this.pendingStatus = serverErrorToStatus(err); - this.end(); - }); - } - getPeer() { - return this.call.getPeer(); - } - sendMetadata(responseMetadata) { - this.call.sendMetadata(responseMetadata); - } - getDeadline() { - return this.call.getDeadline(); - } - getPath() { - return this.path; - } - getHost() { - return this.call.getHost(); - } - getAuthContext() { - return this.call.getAuthContext(); - } - getMetricsRecorder() { - return this.call.getMetricsRecorder(); - } - _read(size) { - this.call.startRead(); - } - _write(chunk, encoding, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - callback) { - this.call.sendMessage(chunk, callback); - } - _final(callback) { - var _a; - callback(null); - this.call.sendStatus(Object.assign(Object.assign({}, this.pendingStatus), { metadata: (_a = this.pendingStatus.metadata) !== null && _a !== void 0 ? _a : this.trailingMetadata })); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - end(metadata) { - if (metadata) { - this.trailingMetadata = metadata; - } - return super.end(); - } -} -exports.ServerDuplexStreamImpl = ServerDuplexStreamImpl; -//# sourceMappingURL=server-call.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/server-call.js.map b/node_modules/@grpc/grpc-js/build/src/server-call.js.map deleted file mode 100644 index 51c2053..0000000 --- a/node_modules/@grpc/grpc-js/build/src/server-call.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"server-call.js","sourceRoot":"","sources":["../../src/server-call.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AA8CH,kDAsBC;AAlED,mCAAsC;AACtC,mCAAoD;AAEpD,2CAAqC;AAErC,yCAAsC;AAuCtC,SAAgB,mBAAmB,CACjC,KAAiD,EACjD,gBAAuC;;IAEvC,MAAM,MAAM,GAAwB;QAClC,IAAI,EAAE,kBAAM,CAAC,OAAO;QACpB,OAAO,EAAE,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC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W;QACT,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IACjC,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;IACpC,CAAC;IAED,kBAAkB;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,IAAY;QAChB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;IACxB,CAAC;IAED,MAAM,CACJ,KAAmB,EACnB,QAAgB;IAChB,8DAA8D;IAC9D,QAAkC;QAElC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,CAAC,QAAkB;;QACvB,QAAQ,CAAC,IAAI,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,CAAC,UAAU,iCACf,IAAI,CAAC,aAAa,KACrB,QAAQ,EAAE,MAAA,IAAI,CAAC,aAAa,CAAC,QAAQ,mCAAI,IAAI,CAAC,gBAAgB,IAC9D,CAAC;IACL,CAAC;IAED,8DAA8D;IAC9D,GAAG,CAAC,QAAc;QAChB,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC;QACnC,CAAC;QAED,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;IACrB,CAAC;CACF;AAnFD,wDAmFC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/server-credentials.d.ts b/node_modules/@grpc/grpc-js/build/src/server-credentials.d.ts deleted file mode 100644 index 2d4fe0c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/server-credentials.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { SecureServerOptions } from 'http2'; -import { SecureContextOptions } from 'tls'; -import { ServerInterceptor } from '.'; -import { CertificateProvider } from './certificate-provider'; -export interface KeyCertPair { - private_key: Buffer; - cert_chain: Buffer; -} -export interface SecureContextWatcher { - (context: SecureContextOptions | null): void; -} -export declare abstract class ServerCredentials { - private serverConstructorOptions; - private watchers; - private latestContextOptions; - constructor(serverConstructorOptions: SecureServerOptions | null, contextOptions?: SecureContextOptions); - _addWatcher(watcher: SecureContextWatcher): void; - _removeWatcher(watcher: SecureContextWatcher): void; - protected getWatcherCount(): number; - protected updateSecureContextOptions(options: SecureContextOptions | null): void; - _isSecure(): boolean; - _getSecureContextOptions(): SecureContextOptions | null; - _getConstructorOptions(): SecureServerOptions | null; - _getInterceptors(): ServerInterceptor[]; - abstract _equals(other: ServerCredentials): boolean; - static createInsecure(): ServerCredentials; - static createSsl(rootCerts: Buffer | null, keyCertPairs: KeyCertPair[], checkClientCertificate?: boolean): ServerCredentials; -} -declare class CertificateProviderServerCredentials extends ServerCredentials { - private identityCertificateProvider; - private caCertificateProvider; - private requireClientCertificate; - private latestCaUpdate; - private latestIdentityUpdate; - private caCertificateUpdateListener; - private identityCertificateUpdateListener; - constructor(identityCertificateProvider: CertificateProvider, caCertificateProvider: CertificateProvider | null, requireClientCertificate: boolean); - _addWatcher(watcher: SecureContextWatcher): void; - _removeWatcher(watcher: SecureContextWatcher): void; - _equals(other: ServerCredentials): boolean; - private calculateSecureContextOptions; - private finalizeUpdate; - private handleCaCertificateUpdate; - private handleIdentityCertitificateUpdate; -} -export declare function createCertificateProviderServerCredentials(caCertificateProvider: CertificateProvider, identityCertificateProvider: CertificateProvider | null, requireClientCertificate: boolean): CertificateProviderServerCredentials; -export declare function createServerCredentialsWithInterceptors(credentials: ServerCredentials, interceptors: ServerInterceptor[]): ServerCredentials; -export {}; diff --git a/node_modules/@grpc/grpc-js/build/src/server-credentials.js b/node_modules/@grpc/grpc-js/build/src/server-credentials.js deleted file mode 100644 index f8800f8..0000000 --- a/node_modules/@grpc/grpc-js/build/src/server-credentials.js +++ /dev/null @@ -1,314 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ServerCredentials = void 0; -exports.createCertificateProviderServerCredentials = createCertificateProviderServerCredentials; -exports.createServerCredentialsWithInterceptors = createServerCredentialsWithInterceptors; -const tls_helpers_1 = require("./tls-helpers"); -class ServerCredentials { - constructor(serverConstructorOptions, contextOptions) { - this.serverConstructorOptions = serverConstructorOptions; - this.watchers = new Set(); - this.latestContextOptions = null; - this.latestContextOptions = contextOptions !== null && contextOptions !== void 0 ? contextOptions : null; - } - _addWatcher(watcher) { - this.watchers.add(watcher); - } - _removeWatcher(watcher) { - this.watchers.delete(watcher); - } - getWatcherCount() { - return this.watchers.size; - } - updateSecureContextOptions(options) { - this.latestContextOptions = options; - for (const watcher of this.watchers) { - watcher(this.latestContextOptions); - } - } - _isSecure() { - return this.serverConstructorOptions !== null; - } - _getSecureContextOptions() { - return this.latestContextOptions; - } - _getConstructorOptions() { - return this.serverConstructorOptions; - } - _getInterceptors() { - return []; - } - static createInsecure() { - return new InsecureServerCredentials(); - } - static createSsl(rootCerts, keyCertPairs, checkClientCertificate = false) { - var _a; - if (rootCerts !== null && !Buffer.isBuffer(rootCerts)) { - throw new TypeError('rootCerts must be null or a Buffer'); - } - if (!Array.isArray(keyCertPairs)) { - throw new TypeError('keyCertPairs must be an array'); - } - if (typeof checkClientCertificate !== 'boolean') { - throw new TypeError('checkClientCertificate must be a boolean'); - } - const cert = []; - const key = []; - for (let i = 0; i < keyCertPairs.length; i++) { - const pair = keyCertPairs[i]; - if (pair === null || typeof pair !== 'object') { - throw new TypeError(`keyCertPair[${i}] must be an object`); - } - if (!Buffer.isBuffer(pair.private_key)) { - throw new TypeError(`keyCertPair[${i}].private_key must be a Buffer`); - } - if (!Buffer.isBuffer(pair.cert_chain)) { - throw new TypeError(`keyCertPair[${i}].cert_chain must be a Buffer`); - } - cert.push(pair.cert_chain); - key.push(pair.private_key); - } - return new SecureServerCredentials({ - requestCert: checkClientCertificate, - ciphers: tls_helpers_1.CIPHER_SUITES, - }, { - ca: (_a = rootCerts !== null && rootCerts !== void 0 ? rootCerts : (0, tls_helpers_1.getDefaultRootsData)()) !== null && _a !== void 0 ? _a : undefined, - cert, - key, - }); - } -} -exports.ServerCredentials = ServerCredentials; -class InsecureServerCredentials extends ServerCredentials { - constructor() { - super(null); - } - _getSettings() { - return null; - } - _equals(other) { - return other instanceof InsecureServerCredentials; - } -} -class SecureServerCredentials extends ServerCredentials { - constructor(constructorOptions, contextOptions) { - super(constructorOptions, contextOptions); - this.options = Object.assign(Object.assign({}, constructorOptions), contextOptions); - } - /** - * Checks equality by checking the options that are actually set by - * createSsl. - * @param other - * @returns - */ - _equals(other) { - if (this === other) { - return true; - } - if (!(other instanceof SecureServerCredentials)) { - return false; - } - // options.ca equality check - if (Buffer.isBuffer(this.options.ca) && Buffer.isBuffer(other.options.ca)) { - if (!this.options.ca.equals(other.options.ca)) { - return false; - } - } - else { - if (this.options.ca !== other.options.ca) { - return false; - } - } - // options.cert equality check - if (Array.isArray(this.options.cert) && Array.isArray(other.options.cert)) { - if (this.options.cert.length !== other.options.cert.length) { - return false; - } - for (let i = 0; i < this.options.cert.length; i++) { - const thisCert = this.options.cert[i]; - const otherCert = other.options.cert[i]; - if (Buffer.isBuffer(thisCert) && Buffer.isBuffer(otherCert)) { - if (!thisCert.equals(otherCert)) { - return false; - } - } - else { - if (thisCert !== otherCert) { - return false; - } - } - } - } - else { - if (this.options.cert !== other.options.cert) { - return false; - } - } - // options.key equality check - if (Array.isArray(this.options.key) && Array.isArray(other.options.key)) { - if (this.options.key.length !== other.options.key.length) { - return false; - } - for (let i = 0; i < this.options.key.length; i++) { - const thisKey = this.options.key[i]; - const otherKey = other.options.key[i]; - if (Buffer.isBuffer(thisKey) && Buffer.isBuffer(otherKey)) { - if (!thisKey.equals(otherKey)) { - return false; - } - } - else { - if (thisKey !== otherKey) { - return false; - } - } - } - } - else { - if (this.options.key !== other.options.key) { - return false; - } - } - // options.requestCert equality check - if (this.options.requestCert !== other.options.requestCert) { - return false; - } - /* ciphers is derived from a value that is constant for the process, so no - * equality check is needed. */ - return true; - } -} -class CertificateProviderServerCredentials extends ServerCredentials { - constructor(identityCertificateProvider, caCertificateProvider, requireClientCertificate) { - super({ - requestCert: caCertificateProvider !== null, - rejectUnauthorized: requireClientCertificate, - ciphers: tls_helpers_1.CIPHER_SUITES - }); - this.identityCertificateProvider = identityCertificateProvider; - this.caCertificateProvider = caCertificateProvider; - this.requireClientCertificate = requireClientCertificate; - this.latestCaUpdate = null; - this.latestIdentityUpdate = null; - this.caCertificateUpdateListener = this.handleCaCertificateUpdate.bind(this); - this.identityCertificateUpdateListener = this.handleIdentityCertitificateUpdate.bind(this); - } - _addWatcher(watcher) { - var _a; - if (this.getWatcherCount() === 0) { - (_a = this.caCertificateProvider) === null || _a === void 0 ? void 0 : _a.addCaCertificateListener(this.caCertificateUpdateListener); - this.identityCertificateProvider.addIdentityCertificateListener(this.identityCertificateUpdateListener); - } - super._addWatcher(watcher); - } - _removeWatcher(watcher) { - var _a; - super._removeWatcher(watcher); - if (this.getWatcherCount() === 0) { - (_a = this.caCertificateProvider) === null || _a === void 0 ? void 0 : _a.removeCaCertificateListener(this.caCertificateUpdateListener); - this.identityCertificateProvider.removeIdentityCertificateListener(this.identityCertificateUpdateListener); - } - } - _equals(other) { - if (this === other) { - return true; - } - if (!(other instanceof CertificateProviderServerCredentials)) { - return false; - } - return (this.caCertificateProvider === other.caCertificateProvider && - this.identityCertificateProvider === other.identityCertificateProvider && - this.requireClientCertificate === other.requireClientCertificate); - } - calculateSecureContextOptions() { - var _a; - if (this.latestIdentityUpdate === null) { - return null; - } - if (this.caCertificateProvider !== null && this.latestCaUpdate === null) { - return null; - } - return { - ca: (_a = this.latestCaUpdate) === null || _a === void 0 ? void 0 : _a.caCertificate, - cert: [this.latestIdentityUpdate.certificate], - key: [this.latestIdentityUpdate.privateKey], - }; - } - finalizeUpdate() { - const secureContextOptions = this.calculateSecureContextOptions(); - this.updateSecureContextOptions(secureContextOptions); - } - handleCaCertificateUpdate(update) { - this.latestCaUpdate = update; - this.finalizeUpdate(); - } - handleIdentityCertitificateUpdate(update) { - this.latestIdentityUpdate = update; - this.finalizeUpdate(); - } -} -function createCertificateProviderServerCredentials(caCertificateProvider, identityCertificateProvider, requireClientCertificate) { - return new CertificateProviderServerCredentials(caCertificateProvider, identityCertificateProvider, requireClientCertificate); -} -class InterceptorServerCredentials extends ServerCredentials { - constructor(childCredentials, interceptors) { - super({}); - this.childCredentials = childCredentials; - this.interceptors = interceptors; - } - _isSecure() { - return this.childCredentials._isSecure(); - } - _equals(other) { - if (!(other instanceof InterceptorServerCredentials)) { - return false; - } - if (!(this.childCredentials._equals(other.childCredentials))) { - return false; - } - if (this.interceptors.length !== other.interceptors.length) { - return false; - } - for (let i = 0; i < this.interceptors.length; i++) { - if (this.interceptors[i] !== other.interceptors[i]) { - return false; - } - } - return true; - } - _getInterceptors() { - return this.interceptors; - } - _addWatcher(watcher) { - this.childCredentials._addWatcher(watcher); - } - _removeWatcher(watcher) { - this.childCredentials._removeWatcher(watcher); - } - _getConstructorOptions() { - return this.childCredentials._getConstructorOptions(); - } - _getSecureContextOptions() { - return this.childCredentials._getSecureContextOptions(); - } -} -function createServerCredentialsWithInterceptors(credentials, interceptors) { - return new InterceptorServerCredentials(credentials, interceptors); -} -//# sourceMappingURL=server-credentials.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/server-credentials.js.map b/node_modules/@grpc/grpc-js/build/src/server-credentials.js.map deleted file mode 100644 index 02658e0..0000000 --- a/node_modules/@grpc/grpc-js/build/src/server-credentials.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"server-credentials.js","sourceRoot":"","sources":["../../src/server-credentials.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AA0RH,gGASC;AA2CD,0FAEC;AA7UD,+CAAmE;AAcnE,MAAsB,iBAAiB;IAGrC,YAAoB,wBAAoD,EAAE,cAAqC;QAA3F,6BAAwB,GAAxB,wBAAwB,CAA4B;QAFhE,aAAQ,GAA8B,IAAI,GAAG,EAAE,CAAC;QAChD,yBAAoB,GAAgC,IAAI,CAAC;QAE/D,IAAI,CAAC,oBAAoB,GAAG,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,IAAI,CAAC;IACrD,CAAC;IAED,WAAW,CAAC,OAA6B;QACvC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IACD,cAAc,CAAC,OAA6B;QAC1C,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IACS,eAAe;QACvB,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC5B,CAAC;IACS,0BAA0B,CAAC,OAAoC;QACvE,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC;QACpC,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpC,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IACD,SAAS;QACP,OAAO,IAAI,CAAC,wBAAwB,KAAK,IAAI,CAAC;IAChD,CAAC;IACD,wBAAwB;QACtB,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACnC,CAAC;IACD,sBAAsB;QACpB,OAAO,IAAI,CAAC,wBAAwB,CAAC;IACvC,CAAC;IACD,gBAAgB;QACd,OAA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CAAC,CAAC,EAAE,CAAC;gBACnD,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACQ,gBAAgB;QACvB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IACQ,WAAW,CAAC,OAA6B;QAChD,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IACQ,cAAc,CAAC,OAA6B;QACnD,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;IACQ,sBAAsB;QAC7B,OAAO,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,EAAE,CAAC;IACxD,CAAC;IACQ,wBAAwB;QAC/B,OAAO,IAAI,CAAC,gBAAgB,CAAC,wBAAwB,EAAE,CAAC;IAC1D,CAAC;CACF;AAED,SAAgB,uCAAuC,CAAC,WAA8B,EAAE,YAAiC;IACvH,OAAO,IAAI,4BAA4B,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;AACrE,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/server-interceptors.d.ts b/node_modules/@grpc/grpc-js/build/src/server-interceptors.d.ts deleted file mode 100644 index ab05b76..0000000 --- a/node_modules/@grpc/grpc-js/build/src/server-interceptors.d.ts +++ /dev/null @@ -1,216 +0,0 @@ -import { PartialStatusObject } from './call-interface'; -import { ServerMethodDefinition } from './make-client'; -import { Metadata } from './metadata'; -import { ChannelOptions } from './channel-options'; -import { Handler } from './server-call'; -import { Deadline } from './deadline'; -import * as http2 from 'http2'; -import { CallEventTracker } from './transport'; -import { AuthContext } from './auth-context'; -import { PerRequestMetricRecorder } from './orca'; -export interface ServerMetadataListener { - (metadata: Metadata, next: (metadata: Metadata) => void): void; -} -export interface ServerMessageListener { - (message: any, next: (message: any) => void): void; -} -export interface ServerHalfCloseListener { - (next: () => void): void; -} -export interface ServerCancelListener { - (): void; -} -export interface FullServerListener { - onReceiveMetadata: ServerMetadataListener; - onReceiveMessage: ServerMessageListener; - onReceiveHalfClose: ServerHalfCloseListener; - onCancel: ServerCancelListener; -} -export type ServerListener = Partial; -export declare class ServerListenerBuilder { - private metadata; - private message; - private halfClose; - private cancel; - withOnReceiveMetadata(onReceiveMetadata: ServerMetadataListener): this; - withOnReceiveMessage(onReceiveMessage: ServerMessageListener): this; - withOnReceiveHalfClose(onReceiveHalfClose: ServerHalfCloseListener): this; - withOnCancel(onCancel: ServerCancelListener): this; - build(): ServerListener; -} -export interface InterceptingServerListener { - onReceiveMetadata(metadata: Metadata): void; - onReceiveMessage(message: any): void; - onReceiveHalfClose(): void; - onCancel(): void; -} -export declare function isInterceptingServerListener(listener: ServerListener | InterceptingServerListener): listener is InterceptingServerListener; -export interface StartResponder { - (next: (listener?: ServerListener) => void): void; -} -export interface MetadataResponder { - (metadata: Metadata, next: (metadata: Metadata) => void): void; -} -export interface MessageResponder { - (message: any, next: (message: any) => void): void; -} -export interface StatusResponder { - (status: PartialStatusObject, next: (status: PartialStatusObject) => void): void; -} -export interface FullResponder { - start: StartResponder; - sendMetadata: MetadataResponder; - sendMessage: MessageResponder; - sendStatus: StatusResponder; -} -export type Responder = Partial; -export declare class ResponderBuilder { - private start; - private metadata; - private message; - private status; - withStart(start: StartResponder): this; - withSendMetadata(sendMetadata: MetadataResponder): this; - withSendMessage(sendMessage: MessageResponder): this; - withSendStatus(sendStatus: StatusResponder): this; - build(): Responder; -} -export interface ConnectionInfo { - localAddress?: string | undefined; - localPort?: number | undefined; - remoteAddress?: string | undefined; - remotePort?: number | undefined; -} -export interface ServerInterceptingCallInterface { - /** - * Register the listener to handle inbound events. - */ - start(listener: InterceptingServerListener): void; - /** - * Send response metadata. - */ - sendMetadata(metadata: Metadata): void; - /** - * Send a response message. - */ - sendMessage(message: any, callback: () => void): void; - /** - * End the call by sending this status. - */ - sendStatus(status: PartialStatusObject): void; - /** - * Start a single read, eventually triggering either listener.onReceiveMessage or listener.onReceiveHalfClose. - */ - startRead(): void; - /** - * Return the peer address of the client making the request, if known, or "unknown" otherwise - */ - getPeer(): string; - /** - * Return the call deadline set by the client. The value is Infinity if there is no deadline. - */ - getDeadline(): Deadline; - /** - * Return the host requested by the client in the ":authority" header. - */ - getHost(): string; - /** - * Return the auth context of the connection the call is associated with. - */ - getAuthContext(): AuthContext; - /** - * Return information about the connection used to make the call. - */ - getConnectionInfo(): ConnectionInfo; - /** - * Get the metrics recorder for this call. Metrics will not be sent unless - * the server was constructed with the `grpc.server_call_metric_recording` - * option. - */ - getMetricsRecorder(): PerRequestMetricRecorder; -} -export declare class ServerInterceptingCall implements ServerInterceptingCallInterface { - private nextCall; - private responder; - private processingMetadata; - private sentMetadata; - private processingMessage; - private pendingMessage; - private pendingMessageCallback; - private pendingStatus; - constructor(nextCall: ServerInterceptingCallInterface, responder?: Responder); - private processPendingMessage; - private processPendingStatus; - start(listener: InterceptingServerListener): void; - sendMetadata(metadata: Metadata): void; - sendMessage(message: any, callback: () => void): void; - sendStatus(status: PartialStatusObject): void; - startRead(): void; - getPeer(): string; - getDeadline(): Deadline; - getHost(): string; - getAuthContext(): AuthContext; - getConnectionInfo(): ConnectionInfo; - getMetricsRecorder(): PerRequestMetricRecorder; -} -export interface ServerInterceptor { - (methodDescriptor: ServerMethodDefinition, call: ServerInterceptingCallInterface): ServerInterceptingCall; -} -export declare class BaseServerInterceptingCall implements ServerInterceptingCallInterface { - private readonly stream; - private readonly callEventTracker; - private readonly handler; - private listener; - private metadata; - private deadlineTimer; - private deadline; - private maxSendMessageSize; - private maxReceiveMessageSize; - private cancelled; - private metadataSent; - private wantTrailers; - private cancelNotified; - private incomingEncoding; - private decoder; - private readQueue; - private isReadPending; - private receivedHalfClose; - private streamEnded; - private host; - private connectionInfo; - private metricsRecorder; - private shouldSendMetrics; - constructor(stream: http2.ServerHttp2Stream, headers: http2.IncomingHttpHeaders, callEventTracker: CallEventTracker | null, handler: Handler, options: ChannelOptions); - private handleTimeoutHeader; - private checkCancelled; - private notifyOnCancel; - /** - * A server handler can start sending messages without explicitly sending - * metadata. In that case, we need to send headers before sending any - * messages. This function does that if necessary. - */ - private maybeSendMetadata; - /** - * Serialize a message to a length-delimited byte string. - * @param value - * @returns - */ - private serializeMessage; - private decompressMessage; - private decompressAndMaybePush; - private maybePushNextMessage; - private handleDataFrame; - private handleEndEvent; - start(listener: InterceptingServerListener): void; - sendMetadata(metadata: Metadata): void; - sendMessage(message: any, callback: () => void): void; - sendStatus(status: PartialStatusObject): void; - startRead(): void; - getPeer(): string; - getDeadline(): Deadline; - getHost(): string; - getAuthContext(): AuthContext; - getConnectionInfo(): ConnectionInfo; - getMetricsRecorder(): PerRequestMetricRecorder; -} -export declare function getServerInterceptingCall(interceptors: ServerInterceptor[], stream: http2.ServerHttp2Stream, headers: http2.IncomingHttpHeaders, callEventTracker: CallEventTracker | null, handler: Handler, options: ChannelOptions): ServerInterceptingCallInterface; diff --git a/node_modules/@grpc/grpc-js/build/src/server-interceptors.js b/node_modules/@grpc/grpc-js/build/src/server-interceptors.js deleted file mode 100644 index 4eded8c..0000000 --- a/node_modules/@grpc/grpc-js/build/src/server-interceptors.js +++ /dev/null @@ -1,816 +0,0 @@ -"use strict"; -/* - * Copyright 2024 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BaseServerInterceptingCall = exports.ServerInterceptingCall = exports.ResponderBuilder = exports.ServerListenerBuilder = void 0; -exports.isInterceptingServerListener = isInterceptingServerListener; -exports.getServerInterceptingCall = getServerInterceptingCall; -const metadata_1 = require("./metadata"); -const constants_1 = require("./constants"); -const http2 = require("http2"); -const error_1 = require("./error"); -const zlib = require("zlib"); -const stream_decoder_1 = require("./stream-decoder"); -const logging = require("./logging"); -const tls_1 = require("tls"); -const orca_1 = require("./orca"); -const TRACER_NAME = 'server_call'; -function trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text); -} -class ServerListenerBuilder { - constructor() { - this.metadata = undefined; - this.message = undefined; - this.halfClose = undefined; - this.cancel = undefined; - } - withOnReceiveMetadata(onReceiveMetadata) { - this.metadata = onReceiveMetadata; - return this; - } - withOnReceiveMessage(onReceiveMessage) { - this.message = onReceiveMessage; - return this; - } - withOnReceiveHalfClose(onReceiveHalfClose) { - this.halfClose = onReceiveHalfClose; - return this; - } - withOnCancel(onCancel) { - this.cancel = onCancel; - return this; - } - build() { - return { - onReceiveMetadata: this.metadata, - onReceiveMessage: this.message, - onReceiveHalfClose: this.halfClose, - onCancel: this.cancel, - }; - } -} -exports.ServerListenerBuilder = ServerListenerBuilder; -function isInterceptingServerListener(listener) { - return (listener.onReceiveMetadata !== undefined && - listener.onReceiveMetadata.length === 1); -} -class InterceptingServerListenerImpl { - constructor(listener, nextListener) { - this.listener = listener; - this.nextListener = nextListener; - /** - * Once the call is cancelled, ignore all other events. - */ - this.cancelled = false; - this.processingMetadata = false; - this.hasPendingMessage = false; - this.pendingMessage = null; - this.processingMessage = false; - this.hasPendingHalfClose = false; - } - processPendingMessage() { - if (this.hasPendingMessage) { - this.nextListener.onReceiveMessage(this.pendingMessage); - this.pendingMessage = null; - this.hasPendingMessage = false; - } - } - processPendingHalfClose() { - if (this.hasPendingHalfClose) { - this.nextListener.onReceiveHalfClose(); - this.hasPendingHalfClose = false; - } - } - onReceiveMetadata(metadata) { - if (this.cancelled) { - return; - } - this.processingMetadata = true; - this.listener.onReceiveMetadata(metadata, interceptedMetadata => { - this.processingMetadata = false; - if (this.cancelled) { - return; - } - this.nextListener.onReceiveMetadata(interceptedMetadata); - this.processPendingMessage(); - this.processPendingHalfClose(); - }); - } - onReceiveMessage(message) { - if (this.cancelled) { - return; - } - this.processingMessage = true; - this.listener.onReceiveMessage(message, msg => { - this.processingMessage = false; - if (this.cancelled) { - return; - } - if (this.processingMetadata) { - this.pendingMessage = msg; - this.hasPendingMessage = true; - } - else { - this.nextListener.onReceiveMessage(msg); - this.processPendingHalfClose(); - } - }); - } - onReceiveHalfClose() { - if (this.cancelled) { - return; - } - this.listener.onReceiveHalfClose(() => { - if (this.cancelled) { - return; - } - if (this.processingMetadata || this.processingMessage) { - this.hasPendingHalfClose = true; - } - else { - this.nextListener.onReceiveHalfClose(); - } - }); - } - onCancel() { - this.cancelled = true; - this.listener.onCancel(); - this.nextListener.onCancel(); - } -} -class ResponderBuilder { - constructor() { - this.start = undefined; - this.metadata = undefined; - this.message = undefined; - this.status = undefined; - } - withStart(start) { - this.start = start; - return this; - } - withSendMetadata(sendMetadata) { - this.metadata = sendMetadata; - return this; - } - withSendMessage(sendMessage) { - this.message = sendMessage; - return this; - } - withSendStatus(sendStatus) { - this.status = sendStatus; - return this; - } - build() { - return { - start: this.start, - sendMetadata: this.metadata, - sendMessage: this.message, - sendStatus: this.status, - }; - } -} -exports.ResponderBuilder = ResponderBuilder; -const defaultServerListener = { - onReceiveMetadata: (metadata, next) => { - next(metadata); - }, - onReceiveMessage: (message, next) => { - next(message); - }, - onReceiveHalfClose: next => { - next(); - }, - onCancel: () => { }, -}; -const defaultResponder = { - start: next => { - next(); - }, - sendMetadata: (metadata, next) => { - next(metadata); - }, - sendMessage: (message, next) => { - next(message); - }, - sendStatus: (status, next) => { - next(status); - }, -}; -class ServerInterceptingCall { - constructor(nextCall, responder) { - var _a, _b, _c, _d; - this.nextCall = nextCall; - this.processingMetadata = false; - this.sentMetadata = false; - this.processingMessage = false; - this.pendingMessage = null; - this.pendingMessageCallback = null; - this.pendingStatus = null; - this.responder = { - start: (_a = responder === null || responder === void 0 ? void 0 : responder.start) !== null && _a !== void 0 ? _a : defaultResponder.start, - sendMetadata: (_b = responder === null || responder === void 0 ? void 0 : responder.sendMetadata) !== null && _b !== void 0 ? _b : defaultResponder.sendMetadata, - sendMessage: (_c = responder === null || responder === void 0 ? void 0 : responder.sendMessage) !== null && _c !== void 0 ? _c : defaultResponder.sendMessage, - sendStatus: (_d = responder === null || responder === void 0 ? void 0 : responder.sendStatus) !== null && _d !== void 0 ? _d : defaultResponder.sendStatus, - }; - } - processPendingMessage() { - if (this.pendingMessageCallback) { - this.nextCall.sendMessage(this.pendingMessage, this.pendingMessageCallback); - this.pendingMessage = null; - this.pendingMessageCallback = null; - } - } - processPendingStatus() { - if (this.pendingStatus) { - this.nextCall.sendStatus(this.pendingStatus); - this.pendingStatus = null; - } - } - start(listener) { - this.responder.start(interceptedListener => { - var _a, _b, _c, _d; - const fullInterceptedListener = { - onReceiveMetadata: (_a = interceptedListener === null || interceptedListener === void 0 ? void 0 : interceptedListener.onReceiveMetadata) !== null && _a !== void 0 ? _a : defaultServerListener.onReceiveMetadata, - onReceiveMessage: (_b = interceptedListener === null || interceptedListener === void 0 ? void 0 : interceptedListener.onReceiveMessage) !== null && _b !== void 0 ? _b : defaultServerListener.onReceiveMessage, - onReceiveHalfClose: (_c = interceptedListener === null || interceptedListener === void 0 ? void 0 : interceptedListener.onReceiveHalfClose) !== null && _c !== void 0 ? _c : defaultServerListener.onReceiveHalfClose, - onCancel: (_d = interceptedListener === null || interceptedListener === void 0 ? void 0 : interceptedListener.onCancel) !== null && _d !== void 0 ? _d : defaultServerListener.onCancel, - }; - const finalInterceptingListener = new InterceptingServerListenerImpl(fullInterceptedListener, listener); - this.nextCall.start(finalInterceptingListener); - }); - } - sendMetadata(metadata) { - this.processingMetadata = true; - this.sentMetadata = true; - this.responder.sendMetadata(metadata, interceptedMetadata => { - this.processingMetadata = false; - this.nextCall.sendMetadata(interceptedMetadata); - this.processPendingMessage(); - this.processPendingStatus(); - }); - } - sendMessage(message, callback) { - this.processingMessage = true; - if (!this.sentMetadata) { - this.sendMetadata(new metadata_1.Metadata()); - } - this.responder.sendMessage(message, interceptedMessage => { - this.processingMessage = false; - if (this.processingMetadata) { - this.pendingMessage = interceptedMessage; - this.pendingMessageCallback = callback; - } - else { - this.nextCall.sendMessage(interceptedMessage, callback); - } - }); - } - sendStatus(status) { - this.responder.sendStatus(status, interceptedStatus => { - if (this.processingMetadata || this.processingMessage) { - this.pendingStatus = interceptedStatus; - } - else { - this.nextCall.sendStatus(interceptedStatus); - } - }); - } - startRead() { - this.nextCall.startRead(); - } - getPeer() { - return this.nextCall.getPeer(); - } - getDeadline() { - return this.nextCall.getDeadline(); - } - getHost() { - return this.nextCall.getHost(); - } - getAuthContext() { - return this.nextCall.getAuthContext(); - } - getConnectionInfo() { - return this.nextCall.getConnectionInfo(); - } - getMetricsRecorder() { - return this.nextCall.getMetricsRecorder(); - } -} -exports.ServerInterceptingCall = ServerInterceptingCall; -const GRPC_ACCEPT_ENCODING_HEADER = 'grpc-accept-encoding'; -const GRPC_ENCODING_HEADER = 'grpc-encoding'; -const GRPC_MESSAGE_HEADER = 'grpc-message'; -const GRPC_STATUS_HEADER = 'grpc-status'; -const GRPC_TIMEOUT_HEADER = 'grpc-timeout'; -const DEADLINE_REGEX = /(\d{1,8})\s*([HMSmun])/; -const deadlineUnitsToMs = { - H: 3600000, - M: 60000, - S: 1000, - m: 1, - u: 0.001, - n: 0.000001, -}; -const defaultCompressionHeaders = { - // TODO(cjihrig): Remove these encoding headers from the default response - // once compression is integrated. - [GRPC_ACCEPT_ENCODING_HEADER]: 'identity,deflate,gzip', - [GRPC_ENCODING_HEADER]: 'identity', -}; -const defaultResponseHeaders = { - [http2.constants.HTTP2_HEADER_STATUS]: http2.constants.HTTP_STATUS_OK, - [http2.constants.HTTP2_HEADER_CONTENT_TYPE]: 'application/grpc+proto', -}; -const defaultResponseOptions = { - waitForTrailers: true, -}; -class BaseServerInterceptingCall { - constructor(stream, headers, callEventTracker, handler, options) { - var _a, _b; - this.stream = stream; - this.callEventTracker = callEventTracker; - this.handler = handler; - this.listener = null; - this.deadlineTimer = null; - this.deadline = Infinity; - this.maxSendMessageSize = constants_1.DEFAULT_MAX_SEND_MESSAGE_LENGTH; - this.maxReceiveMessageSize = constants_1.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH; - this.cancelled = false; - this.metadataSent = false; - this.wantTrailers = false; - this.cancelNotified = false; - this.incomingEncoding = 'identity'; - this.readQueue = []; - this.isReadPending = false; - this.receivedHalfClose = false; - this.streamEnded = false; - this.metricsRecorder = new orca_1.PerRequestMetricRecorder(); - this.stream.once('close', () => { - var _a; - trace('Request to method ' + - ((_a = this.handler) === null || _a === void 0 ? void 0 : _a.path) + - ' stream closed with rstCode ' + - this.stream.rstCode); - if (this.callEventTracker && !this.streamEnded) { - this.streamEnded = true; - this.callEventTracker.onStreamEnd(false); - this.callEventTracker.onCallEnd({ - code: constants_1.Status.CANCELLED, - details: 'Stream closed before sending status', - metadata: null, - }); - } - this.notifyOnCancel(); - }); - this.stream.on('data', (data) => { - this.handleDataFrame(data); - }); - this.stream.pause(); - this.stream.on('end', () => { - this.handleEndEvent(); - }); - if ('grpc.max_send_message_length' in options) { - this.maxSendMessageSize = options['grpc.max_send_message_length']; - } - if ('grpc.max_receive_message_length' in options) { - this.maxReceiveMessageSize = options['grpc.max_receive_message_length']; - } - this.host = (_a = headers[':authority']) !== null && _a !== void 0 ? _a : headers.host; - this.decoder = new stream_decoder_1.StreamDecoder(this.maxReceiveMessageSize); - const metadata = metadata_1.Metadata.fromHttp2Headers(headers); - if (logging.isTracerEnabled(TRACER_NAME)) { - trace('Request to ' + - this.handler.path + - ' received headers ' + - JSON.stringify(metadata.toJSON())); - } - const timeoutHeader = metadata.get(GRPC_TIMEOUT_HEADER); - if (timeoutHeader.length > 0) { - this.handleTimeoutHeader(timeoutHeader[0]); - } - const encodingHeader = metadata.get(GRPC_ENCODING_HEADER); - if (encodingHeader.length > 0) { - this.incomingEncoding = encodingHeader[0]; - } - // Remove several headers that should not be propagated to the application - metadata.remove(GRPC_TIMEOUT_HEADER); - metadata.remove(GRPC_ENCODING_HEADER); - metadata.remove(GRPC_ACCEPT_ENCODING_HEADER); - metadata.remove(http2.constants.HTTP2_HEADER_ACCEPT_ENCODING); - metadata.remove(http2.constants.HTTP2_HEADER_TE); - metadata.remove(http2.constants.HTTP2_HEADER_CONTENT_TYPE); - this.metadata = metadata; - const socket = (_b = stream.session) === null || _b === void 0 ? void 0 : _b.socket; - this.connectionInfo = { - localAddress: socket === null || socket === void 0 ? void 0 : socket.localAddress, - localPort: socket === null || socket === void 0 ? void 0 : socket.localPort, - remoteAddress: socket === null || socket === void 0 ? void 0 : socket.remoteAddress, - remotePort: socket === null || socket === void 0 ? void 0 : socket.remotePort - }; - this.shouldSendMetrics = !!options['grpc.server_call_metric_recording']; - } - handleTimeoutHeader(timeoutHeader) { - const match = timeoutHeader.toString().match(DEADLINE_REGEX); - if (match === null) { - const status = { - code: constants_1.Status.INTERNAL, - details: `Invalid ${GRPC_TIMEOUT_HEADER} value "${timeoutHeader}"`, - metadata: null, - }; - // Wait for the constructor to complete before sending the error. - process.nextTick(() => { - this.sendStatus(status); - }); - return; - } - const timeout = (+match[1] * deadlineUnitsToMs[match[2]]) | 0; - const now = new Date(); - this.deadline = now.setMilliseconds(now.getMilliseconds() + timeout); - this.deadlineTimer = setTimeout(() => { - const status = { - code: constants_1.Status.DEADLINE_EXCEEDED, - details: 'Deadline exceeded', - metadata: null, - }; - this.sendStatus(status); - }, timeout); - } - checkCancelled() { - /* In some cases the stream can become destroyed before the close event - * fires. That creates a race condition that this check works around */ - if (!this.cancelled && (this.stream.destroyed || this.stream.closed)) { - this.notifyOnCancel(); - this.cancelled = true; - } - return this.cancelled; - } - notifyOnCancel() { - if (this.cancelNotified) { - return; - } - this.cancelNotified = true; - this.cancelled = true; - process.nextTick(() => { - var _a; - (_a = this.listener) === null || _a === void 0 ? void 0 : _a.onCancel(); - }); - if (this.deadlineTimer) { - clearTimeout(this.deadlineTimer); - } - // Flush incoming data frames - this.stream.resume(); - } - /** - * A server handler can start sending messages without explicitly sending - * metadata. In that case, we need to send headers before sending any - * messages. This function does that if necessary. - */ - maybeSendMetadata() { - if (!this.metadataSent) { - this.sendMetadata(new metadata_1.Metadata()); - } - } - /** - * Serialize a message to a length-delimited byte string. - * @param value - * @returns - */ - serializeMessage(value) { - const messageBuffer = this.handler.serialize(value); - const byteLength = messageBuffer.byteLength; - const output = Buffer.allocUnsafe(byteLength + 5); - /* Note: response compression is currently not supported, so this - * compressed bit is always 0. */ - output.writeUInt8(0, 0); - output.writeUInt32BE(byteLength, 1); - messageBuffer.copy(output, 5); - return output; - } - decompressMessage(message, encoding) { - const messageContents = message.subarray(5); - if (encoding === 'identity') { - return messageContents; - } - else if (encoding === 'deflate' || encoding === 'gzip') { - let decompresser; - if (encoding === 'deflate') { - decompresser = zlib.createInflate(); - } - else { - decompresser = zlib.createGunzip(); - } - return new Promise((resolve, reject) => { - let totalLength = 0; - const messageParts = []; - decompresser.on('error', (error) => { - reject({ - code: constants_1.Status.INTERNAL, - details: 'Failed to decompress message' - }); - }); - decompresser.on('data', (chunk) => { - messageParts.push(chunk); - totalLength += chunk.byteLength; - if (this.maxReceiveMessageSize !== -1 && totalLength > this.maxReceiveMessageSize) { - decompresser.destroy(); - reject({ - code: constants_1.Status.RESOURCE_EXHAUSTED, - details: `Received message that decompresses to a size larger than ${this.maxReceiveMessageSize}` - }); - } - }); - decompresser.on('end', () => { - resolve(Buffer.concat(messageParts)); - }); - decompresser.write(messageContents); - decompresser.end(); - }); - } - else { - return Promise.reject({ - code: constants_1.Status.UNIMPLEMENTED, - details: `Received message compressed with unsupported encoding "${encoding}"`, - }); - } - } - async decompressAndMaybePush(queueEntry) { - if (queueEntry.type !== 'COMPRESSED') { - throw new Error(`Invalid queue entry type: ${queueEntry.type}`); - } - const compressed = queueEntry.compressedMessage.readUInt8(0) === 1; - const compressedMessageEncoding = compressed - ? this.incomingEncoding - : 'identity'; - let decompressedMessage; - try { - decompressedMessage = await this.decompressMessage(queueEntry.compressedMessage, compressedMessageEncoding); - } - catch (err) { - this.sendStatus(err); - return; - } - try { - queueEntry.parsedMessage = this.handler.deserialize(decompressedMessage); - } - catch (err) { - this.sendStatus({ - code: constants_1.Status.INTERNAL, - details: `Error deserializing request: ${err.message}`, - }); - return; - } - queueEntry.type = 'READABLE'; - this.maybePushNextMessage(); - } - maybePushNextMessage() { - if (this.listener && - this.isReadPending && - this.readQueue.length > 0 && - this.readQueue[0].type !== 'COMPRESSED') { - this.isReadPending = false; - const nextQueueEntry = this.readQueue.shift(); - if (nextQueueEntry.type === 'READABLE') { - this.listener.onReceiveMessage(nextQueueEntry.parsedMessage); - } - else { - // nextQueueEntry.type === 'HALF_CLOSE' - this.listener.onReceiveHalfClose(); - } - } - } - handleDataFrame(data) { - var _a; - if (this.checkCancelled()) { - return; - } - trace('Request to ' + - this.handler.path + - ' received data frame of size ' + - data.length); - let rawMessages; - try { - rawMessages = this.decoder.write(data); - } - catch (e) { - this.sendStatus({ code: constants_1.Status.RESOURCE_EXHAUSTED, details: e.message }); - return; - } - for (const messageBytes of rawMessages) { - this.stream.pause(); - const queueEntry = { - type: 'COMPRESSED', - compressedMessage: messageBytes, - parsedMessage: null, - }; - this.readQueue.push(queueEntry); - this.decompressAndMaybePush(queueEntry); - (_a = this.callEventTracker) === null || _a === void 0 ? void 0 : _a.addMessageReceived(); - } - } - handleEndEvent() { - this.readQueue.push({ - type: 'HALF_CLOSE', - compressedMessage: null, - parsedMessage: null, - }); - this.receivedHalfClose = true; - this.maybePushNextMessage(); - } - start(listener) { - trace('Request to ' + this.handler.path + ' start called'); - if (this.checkCancelled()) { - return; - } - this.listener = listener; - listener.onReceiveMetadata(this.metadata); - } - sendMetadata(metadata) { - if (this.checkCancelled()) { - return; - } - if (this.metadataSent) { - return; - } - this.metadataSent = true; - const custom = metadata ? metadata.toHttp2Headers() : null; - const headers = Object.assign(Object.assign(Object.assign({}, defaultResponseHeaders), defaultCompressionHeaders), custom); - this.stream.respond(headers, defaultResponseOptions); - } - sendMessage(message, callback) { - if (this.checkCancelled()) { - return; - } - let response; - try { - response = this.serializeMessage(message); - } - catch (e) { - this.sendStatus({ - code: constants_1.Status.INTERNAL, - details: `Error serializing response: ${(0, error_1.getErrorMessage)(e)}`, - metadata: null, - }); - return; - } - if (this.maxSendMessageSize !== -1 && - response.length - 5 > this.maxSendMessageSize) { - this.sendStatus({ - code: constants_1.Status.RESOURCE_EXHAUSTED, - details: `Sent message larger than max (${response.length} vs. ${this.maxSendMessageSize})`, - metadata: null, - }); - return; - } - this.maybeSendMetadata(); - trace('Request to ' + - this.handler.path + - ' sent data frame of size ' + - response.length); - this.stream.write(response, error => { - var _a; - if (error) { - this.sendStatus({ - code: constants_1.Status.INTERNAL, - details: `Error writing message: ${(0, error_1.getErrorMessage)(error)}`, - metadata: null, - }); - return; - } - (_a = this.callEventTracker) === null || _a === void 0 ? void 0 : _a.addMessageSent(); - callback(); - }); - } - sendStatus(status) { - var _a, _b, _c; - if (this.checkCancelled()) { - return; - } - trace('Request to method ' + - ((_a = this.handler) === null || _a === void 0 ? void 0 : _a.path) + - ' ended with status code: ' + - constants_1.Status[status.code] + - ' details: ' + - status.details); - const statusMetadata = (_c = (_b = status.metadata) === null || _b === void 0 ? void 0 : _b.clone()) !== null && _c !== void 0 ? _c : new metadata_1.Metadata(); - if (this.shouldSendMetrics) { - statusMetadata.set(orca_1.GRPC_METRICS_HEADER, this.metricsRecorder.serialize()); - } - if (this.metadataSent) { - if (!this.wantTrailers) { - this.wantTrailers = true; - this.stream.once('wantTrailers', () => { - if (this.callEventTracker && !this.streamEnded) { - this.streamEnded = true; - this.callEventTracker.onStreamEnd(true); - this.callEventTracker.onCallEnd(status); - } - const trailersToSend = Object.assign({ [GRPC_STATUS_HEADER]: status.code, [GRPC_MESSAGE_HEADER]: encodeURI(status.details) }, statusMetadata.toHttp2Headers()); - this.stream.sendTrailers(trailersToSend); - this.notifyOnCancel(); - }); - this.stream.end(); - } - else { - this.notifyOnCancel(); - } - } - else { - if (this.callEventTracker && !this.streamEnded) { - this.streamEnded = true; - this.callEventTracker.onStreamEnd(true); - this.callEventTracker.onCallEnd(status); - } - // Trailers-only response - const trailersToSend = Object.assign(Object.assign({ [GRPC_STATUS_HEADER]: status.code, [GRPC_MESSAGE_HEADER]: encodeURI(status.details) }, defaultResponseHeaders), statusMetadata.toHttp2Headers()); - this.stream.respond(trailersToSend, { endStream: true }); - this.notifyOnCancel(); - } - } - startRead() { - trace('Request to ' + this.handler.path + ' startRead called'); - if (this.checkCancelled()) { - return; - } - this.isReadPending = true; - if (this.readQueue.length === 0) { - if (!this.receivedHalfClose) { - this.stream.resume(); - } - } - else { - this.maybePushNextMessage(); - } - } - getPeer() { - var _a; - const socket = (_a = this.stream.session) === null || _a === void 0 ? void 0 : _a.socket; - if (socket === null || socket === void 0 ? void 0 : socket.remoteAddress) { - if (socket.remotePort) { - return `${socket.remoteAddress}:${socket.remotePort}`; - } - else { - return socket.remoteAddress; - } - } - else { - return 'unknown'; - } - } - getDeadline() { - return this.deadline; - } - getHost() { - return this.host; - } - getAuthContext() { - var _a; - if (((_a = this.stream.session) === null || _a === void 0 ? void 0 : _a.socket) instanceof tls_1.TLSSocket) { - const peerCertificate = this.stream.session.socket.getPeerCertificate(); - return { - transportSecurityType: 'ssl', - sslPeerCertificate: peerCertificate.raw ? peerCertificate : undefined - }; - } - else { - return {}; - } - } - getConnectionInfo() { - return this.connectionInfo; - } - getMetricsRecorder() { - return this.metricsRecorder; - } -} -exports.BaseServerInterceptingCall = BaseServerInterceptingCall; -function getServerInterceptingCall(interceptors, stream, headers, callEventTracker, handler, options) { - const methodDefinition = { - path: handler.path, - requestStream: handler.type === 'clientStream' || handler.type === 'bidi', - responseStream: handler.type === 'serverStream' || handler.type === 'bidi', - requestDeserialize: handler.deserialize, - responseSerialize: handler.serialize, - }; - const baseCall = new BaseServerInterceptingCall(stream, headers, callEventTracker, handler, options); - return interceptors.reduce((call, interceptor) => { - return interceptor(methodDefinition, call); - }, baseCall); -} -//# sourceMappingURL=server-interceptors.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/server-interceptors.js.map b/node_modules/@grpc/grpc-js/build/src/server-interceptors.js.map deleted file mode 100644 index c0bee72..0000000 --- a/node_modules/@grpc/grpc-js/build/src/server-interceptors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"server-interceptors.js","sourceRoot":"","sources":["../../src/server-interceptors.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAoGH,oEAOC;AAs5BD,8DA4BC;AAzhCD,yCAAsC;AAItC,2CAKqB;AACrB,+BAA+B;AAC/B,mCAA0C;AAC1C,6BAA6B;AAC7B,qDAAiD;AAEjD,qCAAqC;AAErC,6BAAgC;AAChC,iCAAuE;AAEvE,MAAM,WAAW,GAAG,aAAa,CAAC;AAElC,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO,CAAC,KAAK,CAAC,wBAAY,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;AACvD,CAAC;AA4BD,MAAa,qBAAqB;IAAlC;QACU,aAAQ,GAAuC,SAAS,CAAC;QACzD,YAAO,GAAsC,SAAS,CAAC;QACvD,cAAS,GAAwC,SAAS,CAAC;QAC3D,WAAM,GAAqC,SAAS,CAAC;IA8B/D,CAAC;IA5BC,qBAAqB,CAAC,iBAAyC;QAC7D,IAAI,CAAC,QAAQ,GAAG,iBAAiB,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oBAAoB,CAAC,gBAAuC;QAC1D,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,sBAAsB,CAAC,kBAA2C;QAChE,IAAI,CAAC,SAAS,GAAG,kBAAkB,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,YAAY,CAAC,QAA8B;QACzC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;QACvB,OAAO,IAA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AAO,CAAC,WAAW;QACvC,iBAAiB,EAAE,OAAO,CAAC,SAAS;KACrC,CAAC;IACF,MAAM,QAAQ,GAAG,IAAI,0BAA0B,CAC7C,MAAM,EACN,OAAO,EACP,gBAAgB,EAChB,OAAO,EACP,OAAO,CACR,CAAC;IACF,OAAO,YAAY,CAAC,MAAM,CACxB,CAAC,IAAqC,EAAE,WAA8B,EAAE,EAAE;QACxE,OAAO,WAAW,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IAC7C,CAAC,EACD,QAAQ,CACT,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/server.d.ts b/node_modules/@grpc/grpc-js/build/src/server.d.ts deleted file mode 100644 index a1f821e..0000000 --- a/node_modules/@grpc/grpc-js/build/src/server.d.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { Deserialize, Serialize, ServiceDefinition } from './make-client'; -import { HandleCall } from './server-call'; -import { ServerCredentials } from './server-credentials'; -import { ChannelOptions } from './channel-options'; -import { SubchannelAddress } from './subchannel-address'; -import { ServerRef, SocketRef } from './channelz'; -import { ServerInterceptor } from './server-interceptors'; -import { Duplex } from 'stream'; -export type UntypedHandleCall = HandleCall; -export interface UntypedServiceImplementation { - [name: string]: UntypedHandleCall; -} -export interface ServerOptions extends ChannelOptions { - interceptors?: ServerInterceptor[]; -} -export interface ConnectionInjector { - injectConnection(connection: Duplex): void; - drain(graceTimeMs: number): void; - destroy(): void; -} -export declare class Server { - private boundPorts; - private http2Servers; - private sessionIdleTimeouts; - private handlers; - private sessions; - /** - * This field only exists to ensure that the start method throws an error if - * it is called twice, as it did previously. - */ - private started; - private shutdown; - private options; - private serverAddressString; - private readonly channelzEnabled; - private channelzRef; - private channelzTrace; - private callTracker; - private listenerChildrenTracker; - private sessionChildrenTracker; - private readonly maxConnectionAgeMs; - private readonly maxConnectionAgeGraceMs; - private readonly keepaliveTimeMs; - private readonly keepaliveTimeoutMs; - private readonly sessionIdleTimeout; - private readonly interceptors; - /** - * Options that will be used to construct all Http2Server instances for this - * Server. - */ - private commonServerOptions; - constructor(options?: ServerOptions); - private getChannelzInfo; - private getChannelzSessionInfo; - private trace; - private keepaliveTrace; - addProtoService(): never; - addService(service: ServiceDefinition, implementation: UntypedServiceImplementation): void; - removeService(service: ServiceDefinition): void; - bind(port: string, creds: ServerCredentials): never; - /** - * This API is experimental, so API stability is not guaranteed across minor versions. - * @param boundAddress - * @returns - */ - protected experimentalRegisterListenerToChannelz(boundAddress: SubchannelAddress): SocketRef; - protected experimentalUnregisterListenerFromChannelz(channelzRef: SocketRef): void; - private createHttp2Server; - private bindOneAddress; - private bindManyPorts; - private bindAddressList; - private resolvePort; - private bindPort; - private normalizePort; - bindAsync(port: string, creds: ServerCredentials, callback: (error: Error | null, port: number) => void): void; - private registerInjectorToChannelz; - /** - * This API is experimental, so API stability is not guaranteed across minor versions. - * @param credentials - * @param channelzRef - * @returns - */ - protected experimentalCreateConnectionInjectorWithChannelzRef(credentials: ServerCredentials, channelzRef: SocketRef, ownsChannelzRef?: boolean): { - injectConnection: (connection: Duplex) => void; - drain: (graceTimeMs: number) => void; - destroy: () => void; - }; - createConnectionInjector(credentials: ServerCredentials): ConnectionInjector; - private closeServer; - private closeSession; - private completeUnbind; - /** - * Unbind a previously bound port, or cancel an in-progress bindAsync - * operation. If port 0 was bound, only the actual bound port can be - * unbound. For example, if bindAsync was called with "localhost:0" and the - * bound port result was 54321, it can be unbound as "localhost:54321". - * @param port - */ - unbind(port: string): void; - /** - * Gracefully close all connections associated with a previously bound port. - * After the grace time, forcefully close all remaining open connections. - * - * If port 0 was bound, only the actual bound port can be - * drained. For example, if bindAsync was called with "localhost:0" and the - * bound port result was 54321, it can be drained as "localhost:54321". - * @param port - * @param graceTimeMs - * @returns - */ - drain(port: string, graceTimeMs: number): void; - forceShutdown(): void; - register(name: string, handler: HandleCall, serialize: Serialize, deserialize: Deserialize, type: string): boolean; - unregister(name: string): boolean; - /** - * @deprecated No longer needed as of version 1.10.x - */ - start(): void; - tryShutdown(callback: (error?: Error) => void): void; - addHttp2Port(): never; - /** - * Get the channelz reference object for this server. The returned value is - * garbage if channelz is disabled for this server. - * @returns - */ - getChannelzRef(): ServerRef; - private _verifyContentType; - private _retrieveHandler; - private _respondWithError; - private _channelzHandler; - private _streamHandler; - private _runHandlerForCall; - private _setupHandlers; - private _sessionHandler; - private _channelzSessionHandler; - private enableIdleTimeout; - private onIdleTimeout; - private onStreamOpened; - private onStreamClose; -} diff --git a/node_modules/@grpc/grpc-js/build/src/server.js b/node_modules/@grpc/grpc-js/build/src/server.js deleted file mode 100644 index 813dcfa..0000000 --- a/node_modules/@grpc/grpc-js/build/src/server.js +++ /dev/null @@ -1,1622 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -}; -var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Server = void 0; -const http2 = require("http2"); -const util = require("util"); -const constants_1 = require("./constants"); -const server_call_1 = require("./server-call"); -const server_credentials_1 = require("./server-credentials"); -const resolver_1 = require("./resolver"); -const logging = require("./logging"); -const subchannel_address_1 = require("./subchannel-address"); -const uri_parser_1 = require("./uri-parser"); -const channelz_1 = require("./channelz"); -const server_interceptors_1 = require("./server-interceptors"); -const UNLIMITED_CONNECTION_AGE_MS = ~(1 << 31); -const KEEPALIVE_MAX_TIME_MS = ~(1 << 31); -const KEEPALIVE_TIMEOUT_MS = 20000; -const MAX_CONNECTION_IDLE_MS = ~(1 << 31); -const { HTTP2_HEADER_PATH } = http2.constants; -const TRACER_NAME = 'server'; -const kMaxAge = Buffer.from('max_age'); -function serverCallTrace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, 'server_call', text); -} -function noop() { } -/** - * Decorator to wrap a class method with util.deprecate - * @param message The message to output if the deprecated method is called - * @returns - */ -function deprecate(message) { - return function (target, context) { - return util.deprecate(target, message); - }; -} -function getUnimplementedStatusResponse(methodName) { - return { - code: constants_1.Status.UNIMPLEMENTED, - details: `The server does not implement the method ${methodName}`, - }; -} -function getDefaultHandler(handlerType, methodName) { - const unimplementedStatusResponse = getUnimplementedStatusResponse(methodName); - switch (handlerType) { - case 'unary': - return (call, callback) => { - callback(unimplementedStatusResponse, null); - }; - case 'clientStream': - return (call, callback) => { - callback(unimplementedStatusResponse, null); - }; - case 'serverStream': - return (call) => { - call.emit('error', unimplementedStatusResponse); - }; - case 'bidi': - return (call) => { - call.emit('error', unimplementedStatusResponse); - }; - default: - throw new Error(`Invalid handlerType ${handlerType}`); - } -} -let Server = (() => { - var _a; - let _instanceExtraInitializers = []; - let _start_decorators; - return _a = class Server { - constructor(options) { - var _b, _c, _d, _e, _f, _g; - this.boundPorts = (__runInitializers(this, _instanceExtraInitializers), new Map()); - this.http2Servers = new Map(); - this.sessionIdleTimeouts = new Map(); - this.handlers = new Map(); - this.sessions = new Map(); - /** - * This field only exists to ensure that the start method throws an error if - * it is called twice, as it did previously. - */ - this.started = false; - this.shutdown = false; - this.serverAddressString = 'null'; - // Channelz Info - this.channelzEnabled = true; - this.options = options !== null && options !== void 0 ? options : {}; - if (this.options['grpc.enable_channelz'] === 0) { - this.channelzEnabled = false; - this.channelzTrace = new channelz_1.ChannelzTraceStub(); - this.callTracker = new channelz_1.ChannelzCallTrackerStub(); - this.listenerChildrenTracker = new channelz_1.ChannelzChildrenTrackerStub(); - this.sessionChildrenTracker = new channelz_1.ChannelzChildrenTrackerStub(); - } - else { - this.channelzTrace = new channelz_1.ChannelzTrace(); - this.callTracker = new channelz_1.ChannelzCallTracker(); - this.listenerChildrenTracker = new channelz_1.ChannelzChildrenTracker(); - this.sessionChildrenTracker = new channelz_1.ChannelzChildrenTracker(); - } - this.channelzRef = (0, channelz_1.registerChannelzServer)('server', () => this.getChannelzInfo(), this.channelzEnabled); - this.channelzTrace.addTrace('CT_INFO', 'Server created'); - this.maxConnectionAgeMs = - (_b = this.options['grpc.max_connection_age_ms']) !== null && _b !== void 0 ? _b : UNLIMITED_CONNECTION_AGE_MS; - this.maxConnectionAgeGraceMs = - (_c = this.options['grpc.max_connection_age_grace_ms']) !== null && _c !== void 0 ? _c : UNLIMITED_CONNECTION_AGE_MS; - this.keepaliveTimeMs = - (_d = this.options['grpc.keepalive_time_ms']) !== null && _d !== void 0 ? _d : KEEPALIVE_MAX_TIME_MS; - this.keepaliveTimeoutMs = - (_e = this.options['grpc.keepalive_timeout_ms']) !== null && _e !== void 0 ? _e : KEEPALIVE_TIMEOUT_MS; - this.sessionIdleTimeout = - (_f = this.options['grpc.max_connection_idle_ms']) !== null && _f !== void 0 ? _f : MAX_CONNECTION_IDLE_MS; - this.commonServerOptions = { - maxSendHeaderBlockLength: Number.MAX_SAFE_INTEGER, - }; - if ('grpc-node.max_session_memory' in this.options) { - this.commonServerOptions.maxSessionMemory = - this.options['grpc-node.max_session_memory']; - } - else { - /* By default, set a very large max session memory limit, to effectively - * disable enforcement of the limit. Some testing indicates that Node's - * behavior degrades badly when this limit is reached, so we solve that - * by disabling the check entirely. */ - this.commonServerOptions.maxSessionMemory = Number.MAX_SAFE_INTEGER; - } - if ('grpc.max_concurrent_streams' in this.options) { - this.commonServerOptions.settings = { - maxConcurrentStreams: this.options['grpc.max_concurrent_streams'], - }; - } - this.interceptors = (_g = this.options.interceptors) !== null && _g !== void 0 ? _g : []; - this.trace('Server constructed'); - } - getChannelzInfo() { - return { - trace: this.channelzTrace, - callTracker: this.callTracker, - listenerChildren: this.listenerChildrenTracker.getChildLists(), - sessionChildren: this.sessionChildrenTracker.getChildLists(), - }; - } - getChannelzSessionInfo(session) { - var _b, _c, _d; - const sessionInfo = this.sessions.get(session); - const sessionSocket = session.socket; - const remoteAddress = sessionSocket.remoteAddress - ? (0, subchannel_address_1.stringToSubchannelAddress)(sessionSocket.remoteAddress, sessionSocket.remotePort) - : null; - const localAddress = sessionSocket.localAddress - ? (0, subchannel_address_1.stringToSubchannelAddress)(sessionSocket.localAddress, sessionSocket.localPort) - : null; - let tlsInfo; - if (session.encrypted) { - const tlsSocket = sessionSocket; - const cipherInfo = tlsSocket.getCipher(); - const certificate = tlsSocket.getCertificate(); - const peerCertificate = tlsSocket.getPeerCertificate(); - tlsInfo = { - cipherSuiteStandardName: (_b = cipherInfo.standardName) !== null && _b !== void 0 ? _b : null, - cipherSuiteOtherName: cipherInfo.standardName ? null : cipherInfo.name, - localCertificate: certificate && 'raw' in certificate ? certificate.raw : null, - remoteCertificate: peerCertificate && 'raw' in peerCertificate - ? peerCertificate.raw - : null, - }; - } - else { - tlsInfo = null; - } - const socketInfo = { - remoteAddress: remoteAddress, - localAddress: localAddress, - security: tlsInfo, - remoteName: null, - streamsStarted: sessionInfo.streamTracker.callsStarted, - streamsSucceeded: sessionInfo.streamTracker.callsSucceeded, - streamsFailed: sessionInfo.streamTracker.callsFailed, - messagesSent: sessionInfo.messagesSent, - messagesReceived: sessionInfo.messagesReceived, - keepAlivesSent: sessionInfo.keepAlivesSent, - lastLocalStreamCreatedTimestamp: null, - lastRemoteStreamCreatedTimestamp: sessionInfo.streamTracker.lastCallStartedTimestamp, - lastMessageSentTimestamp: sessionInfo.lastMessageSentTimestamp, - lastMessageReceivedTimestamp: sessionInfo.lastMessageReceivedTimestamp, - localFlowControlWindow: (_c = session.state.localWindowSize) !== null && _c !== void 0 ? _c : null, - remoteFlowControlWindow: (_d = session.state.remoteWindowSize) !== null && _d !== void 0 ? _d : null, - }; - return socketInfo; - } - trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, '(' + this.channelzRef.id + ') ' + text); - } - keepaliveTrace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, 'keepalive', '(' + this.channelzRef.id + ') ' + text); - } - addProtoService() { - throw new Error('Not implemented. Use addService() instead'); - } - addService(service, implementation) { - if (service === null || - typeof service !== 'object' || - implementation === null || - typeof implementation !== 'object') { - throw new Error('addService() requires two objects as arguments'); - } - const serviceKeys = Object.keys(service); - if (serviceKeys.length === 0) { - throw new Error('Cannot add an empty service to a server'); - } - serviceKeys.forEach(name => { - const attrs = service[name]; - let methodType; - if (attrs.requestStream) { - if (attrs.responseStream) { - methodType = 'bidi'; - } - else { - methodType = 'clientStream'; - } - } - else { - if (attrs.responseStream) { - methodType = 'serverStream'; - } - else { - methodType = 'unary'; - } - } - let implFn = implementation[name]; - let impl; - if (implFn === undefined && typeof attrs.originalName === 'string') { - implFn = implementation[attrs.originalName]; - } - if (implFn !== undefined) { - impl = implFn.bind(implementation); - } - else { - impl = getDefaultHandler(methodType, name); - } - const success = this.register(attrs.path, impl, attrs.responseSerialize, attrs.requestDeserialize, methodType); - if (success === false) { - throw new Error(`Method handler for ${attrs.path} already provided.`); - } - }); - } - removeService(service) { - if (service === null || typeof service !== 'object') { - throw new Error('removeService() requires object as argument'); - } - const serviceKeys = Object.keys(service); - serviceKeys.forEach(name => { - const attrs = service[name]; - this.unregister(attrs.path); - }); - } - bind(port, creds) { - throw new Error('Not implemented. Use bindAsync() instead'); - } - /** - * This API is experimental, so API stability is not guaranteed across minor versions. - * @param boundAddress - * @returns - */ - experimentalRegisterListenerToChannelz(boundAddress) { - return (0, channelz_1.registerChannelzSocket)((0, subchannel_address_1.subchannelAddressToString)(boundAddress), () => { - return { - localAddress: boundAddress, - remoteAddress: null, - security: null, - remoteName: null, - streamsStarted: 0, - streamsSucceeded: 0, - streamsFailed: 0, - messagesSent: 0, - messagesReceived: 0, - keepAlivesSent: 0, - lastLocalStreamCreatedTimestamp: null, - lastRemoteStreamCreatedTimestamp: null, - lastMessageSentTimestamp: null, - lastMessageReceivedTimestamp: null, - localFlowControlWindow: null, - remoteFlowControlWindow: null, - }; - }, this.channelzEnabled); - } - experimentalUnregisterListenerFromChannelz(channelzRef) { - (0, channelz_1.unregisterChannelzRef)(channelzRef); - } - createHttp2Server(credentials) { - let http2Server; - if (credentials._isSecure()) { - const constructorOptions = credentials._getConstructorOptions(); - const contextOptions = credentials._getSecureContextOptions(); - const secureServerOptions = Object.assign(Object.assign(Object.assign(Object.assign({}, this.commonServerOptions), constructorOptions), contextOptions), { enableTrace: this.options['grpc-node.tls_enable_trace'] === 1 }); - let areCredentialsValid = contextOptions !== null; - this.trace('Initial credentials valid: ' + areCredentialsValid); - http2Server = http2.createSecureServer(secureServerOptions); - http2Server.prependListener('connection', (socket) => { - if (!areCredentialsValid) { - this.trace('Dropped connection from ' + JSON.stringify(socket.address()) + ' due to unloaded credentials'); - socket.destroy(); - } - }); - http2Server.on('secureConnection', (socket) => { - /* These errors need to be handled by the user of Http2SecureServer, - * according to https://github.com/nodejs/node/issues/35824 */ - socket.on('error', (e) => { - this.trace('An incoming TLS connection closed with error: ' + e.message); - }); - }); - const credsWatcher = options => { - if (options) { - const secureServer = http2Server; - try { - secureServer.setSecureContext(options); - } - catch (e) { - logging.log(constants_1.LogVerbosity.ERROR, 'Failed to set secure context with error ' + e.message); - options = null; - } - } - areCredentialsValid = options !== null; - this.trace('Post-update credentials valid: ' + areCredentialsValid); - }; - credentials._addWatcher(credsWatcher); - http2Server.on('close', () => { - credentials._removeWatcher(credsWatcher); - }); - } - else { - http2Server = http2.createServer(this.commonServerOptions); - } - http2Server.setTimeout(0, noop); - this._setupHandlers(http2Server, credentials._getInterceptors()); - return http2Server; - } - bindOneAddress(address, boundPortObject) { - this.trace('Attempting to bind ' + (0, subchannel_address_1.subchannelAddressToString)(address)); - const http2Server = this.createHttp2Server(boundPortObject.credentials); - return new Promise((resolve, reject) => { - const onError = (err) => { - this.trace('Failed to bind ' + - (0, subchannel_address_1.subchannelAddressToString)(address) + - ' with error ' + - err.message); - resolve({ - port: 'port' in address ? address.port : 1, - error: err.message, - }); - }; - http2Server.once('error', onError); - http2Server.listen(address, () => { - const boundAddress = http2Server.address(); - let boundSubchannelAddress; - if (typeof boundAddress === 'string') { - boundSubchannelAddress = { - path: boundAddress, - }; - } - else { - boundSubchannelAddress = { - host: boundAddress.address, - port: boundAddress.port, - }; - } - const channelzRef = this.experimentalRegisterListenerToChannelz(boundSubchannelAddress); - this.listenerChildrenTracker.refChild(channelzRef); - this.http2Servers.set(http2Server, { - channelzRef: channelzRef, - sessions: new Set(), - ownsChannelzRef: true - }); - boundPortObject.listeningServers.add(http2Server); - this.trace('Successfully bound ' + - (0, subchannel_address_1.subchannelAddressToString)(boundSubchannelAddress)); - resolve({ - port: 'port' in boundSubchannelAddress ? boundSubchannelAddress.port : 1, - }); - http2Server.removeListener('error', onError); - }); - }); - } - async bindManyPorts(addressList, boundPortObject) { - if (addressList.length === 0) { - return { - count: 0, - port: 0, - errors: [], - }; - } - if ((0, subchannel_address_1.isTcpSubchannelAddress)(addressList[0]) && addressList[0].port === 0) { - /* If binding to port 0, first try to bind the first address, then bind - * the rest of the address list to the specific port that it binds. */ - const firstAddressResult = await this.bindOneAddress(addressList[0], boundPortObject); - if (firstAddressResult.error) { - /* If the first address fails to bind, try the same operation starting - * from the second item in the list. */ - const restAddressResult = await this.bindManyPorts(addressList.slice(1), boundPortObject); - return Object.assign(Object.assign({}, restAddressResult), { errors: [firstAddressResult.error, ...restAddressResult.errors] }); - } - else { - const restAddresses = addressList - .slice(1) - .map(address => (0, subchannel_address_1.isTcpSubchannelAddress)(address) - ? { host: address.host, port: firstAddressResult.port } - : address); - const restAddressResult = await Promise.all(restAddresses.map(address => this.bindOneAddress(address, boundPortObject))); - const allResults = [firstAddressResult, ...restAddressResult]; - return { - count: allResults.filter(result => result.error === undefined).length, - port: firstAddressResult.port, - errors: allResults - .filter(result => result.error) - .map(result => result.error), - }; - } - } - else { - const allResults = await Promise.all(addressList.map(address => this.bindOneAddress(address, boundPortObject))); - return { - count: allResults.filter(result => result.error === undefined).length, - port: allResults[0].port, - errors: allResults - .filter(result => result.error) - .map(result => result.error), - }; - } - } - async bindAddressList(addressList, boundPortObject) { - const bindResult = await this.bindManyPorts(addressList, boundPortObject); - if (bindResult.count > 0) { - if (bindResult.count < addressList.length) { - logging.log(constants_1.LogVerbosity.INFO, `WARNING Only ${bindResult.count} addresses added out of total ${addressList.length} resolved`); - } - return bindResult.port; - } - else { - const errorString = `No address added out of total ${addressList.length} resolved`; - logging.log(constants_1.LogVerbosity.ERROR, errorString); - throw new Error(`${errorString} errors: [${bindResult.errors.join(',')}]`); - } - } - resolvePort(port) { - return new Promise((resolve, reject) => { - let seenResolution = false; - const resolverListener = (endpointList, attributes, serviceConfig, resolutionNote) => { - if (seenResolution) { - return true; - } - seenResolution = true; - if (!endpointList.ok) { - reject(new Error(endpointList.error.details)); - return true; - } - const addressList = [].concat(...endpointList.value.map(endpoint => endpoint.addresses)); - if (addressList.length === 0) { - reject(new Error(`No addresses resolved for port ${port}`)); - return true; - } - resolve(addressList); - return true; - }; - const resolver = (0, resolver_1.createResolver)(port, resolverListener, this.options); - resolver.updateResolution(); - }); - } - async bindPort(port, boundPortObject) { - const addressList = await this.resolvePort(port); - if (boundPortObject.cancelled) { - this.completeUnbind(boundPortObject); - throw new Error('bindAsync operation cancelled by unbind call'); - } - const portNumber = await this.bindAddressList(addressList, boundPortObject); - if (boundPortObject.cancelled) { - this.completeUnbind(boundPortObject); - throw new Error('bindAsync operation cancelled by unbind call'); - } - return portNumber; - } - normalizePort(port) { - const initialPortUri = (0, uri_parser_1.parseUri)(port); - if (initialPortUri === null) { - throw new Error(`Could not parse port "${port}"`); - } - const portUri = (0, resolver_1.mapUriDefaultScheme)(initialPortUri); - if (portUri === null) { - throw new Error(`Could not get a default scheme for port "${port}"`); - } - return portUri; - } - bindAsync(port, creds, callback) { - if (this.shutdown) { - throw new Error('bindAsync called after shutdown'); - } - if (typeof port !== 'string') { - throw new TypeError('port must be a string'); - } - if (creds === null || !(creds instanceof server_credentials_1.ServerCredentials)) { - throw new TypeError('creds must be a ServerCredentials object'); - } - if (typeof callback !== 'function') { - throw new TypeError('callback must be a function'); - } - this.trace('bindAsync port=' + port); - const portUri = this.normalizePort(port); - const deferredCallback = (error, port) => { - process.nextTick(() => callback(error, port)); - }; - /* First, if this port is already bound or that bind operation is in - * progress, use that result. */ - let boundPortObject = this.boundPorts.get((0, uri_parser_1.uriToString)(portUri)); - if (boundPortObject) { - if (!creds._equals(boundPortObject.credentials)) { - deferredCallback(new Error(`${port} already bound with incompatible credentials`), 0); - return; - } - /* If that operation has previously been cancelled by an unbind call, - * uncancel it. */ - boundPortObject.cancelled = false; - if (boundPortObject.completionPromise) { - boundPortObject.completionPromise.then(portNum => callback(null, portNum), error => callback(error, 0)); - } - else { - deferredCallback(null, boundPortObject.portNumber); - } - return; - } - boundPortObject = { - mapKey: (0, uri_parser_1.uriToString)(portUri), - originalUri: portUri, - completionPromise: null, - cancelled: false, - portNumber: 0, - credentials: creds, - listeningServers: new Set(), - }; - const splitPort = (0, uri_parser_1.splitHostPort)(portUri.path); - const completionPromise = this.bindPort(portUri, boundPortObject); - boundPortObject.completionPromise = completionPromise; - /* If the port number is 0, defer populating the map entry until after the - * bind operation completes and we have a specific port number. Otherwise, - * populate it immediately. */ - if ((splitPort === null || splitPort === void 0 ? void 0 : splitPort.port) === 0) { - completionPromise.then(portNum => { - const finalUri = { - scheme: portUri.scheme, - authority: portUri.authority, - path: (0, uri_parser_1.combineHostPort)({ host: splitPort.host, port: portNum }), - }; - boundPortObject.mapKey = (0, uri_parser_1.uriToString)(finalUri); - boundPortObject.completionPromise = null; - boundPortObject.portNumber = portNum; - this.boundPorts.set(boundPortObject.mapKey, boundPortObject); - callback(null, portNum); - }, error => { - callback(error, 0); - }); - } - else { - this.boundPorts.set(boundPortObject.mapKey, boundPortObject); - completionPromise.then(portNum => { - boundPortObject.completionPromise = null; - boundPortObject.portNumber = portNum; - callback(null, portNum); - }, error => { - callback(error, 0); - }); - } - } - registerInjectorToChannelz() { - return (0, channelz_1.registerChannelzSocket)('injector', () => { - return { - localAddress: null, - remoteAddress: null, - security: null, - remoteName: null, - streamsStarted: 0, - streamsSucceeded: 0, - streamsFailed: 0, - messagesSent: 0, - messagesReceived: 0, - keepAlivesSent: 0, - lastLocalStreamCreatedTimestamp: null, - lastRemoteStreamCreatedTimestamp: null, - lastMessageSentTimestamp: null, - lastMessageReceivedTimestamp: null, - localFlowControlWindow: null, - remoteFlowControlWindow: null, - }; - }, this.channelzEnabled); - } - /** - * This API is experimental, so API stability is not guaranteed across minor versions. - * @param credentials - * @param channelzRef - * @returns - */ - experimentalCreateConnectionInjectorWithChannelzRef(credentials, channelzRef, ownsChannelzRef = false) { - if (credentials === null || !(credentials instanceof server_credentials_1.ServerCredentials)) { - throw new TypeError('creds must be a ServerCredentials object'); - } - if (this.channelzEnabled) { - this.listenerChildrenTracker.refChild(channelzRef); - } - const server = this.createHttp2Server(credentials); - const sessionsSet = new Set(); - this.http2Servers.set(server, { - channelzRef: channelzRef, - sessions: sessionsSet, - ownsChannelzRef - }); - return { - injectConnection: (connection) => { - server.emit('connection', connection); - }, - drain: (graceTimeMs) => { - var _b, _c; - for (const session of sessionsSet) { - this.closeSession(session); - } - (_c = (_b = setTimeout(() => { - for (const session of sessionsSet) { - session.destroy(http2.constants.NGHTTP2_CANCEL); - } - }, graceTimeMs)).unref) === null || _c === void 0 ? void 0 : _c.call(_b); - }, - destroy: () => { - this.closeServer(server); - for (const session of sessionsSet) { - this.closeSession(session); - } - } - }; - } - createConnectionInjector(credentials) { - if (credentials === null || !(credentials instanceof server_credentials_1.ServerCredentials)) { - throw new TypeError('creds must be a ServerCredentials object'); - } - const channelzRef = this.registerInjectorToChannelz(); - return this.experimentalCreateConnectionInjectorWithChannelzRef(credentials, channelzRef, true); - } - closeServer(server, callback) { - this.trace('Closing server with address ' + JSON.stringify(server.address())); - const serverInfo = this.http2Servers.get(server); - server.close(() => { - if (serverInfo && serverInfo.ownsChannelzRef) { - this.listenerChildrenTracker.unrefChild(serverInfo.channelzRef); - (0, channelz_1.unregisterChannelzRef)(serverInfo.channelzRef); - } - this.http2Servers.delete(server); - callback === null || callback === void 0 ? void 0 : callback(); - }); - } - closeSession(session, callback) { - var _b; - this.trace('Closing session initiated by ' + ((_b = session.socket) === null || _b === void 0 ? void 0 : _b.remoteAddress)); - const sessionInfo = this.sessions.get(session); - const closeCallback = () => { - if (sessionInfo) { - this.sessionChildrenTracker.unrefChild(sessionInfo.ref); - (0, channelz_1.unregisterChannelzRef)(sessionInfo.ref); - } - callback === null || callback === void 0 ? void 0 : callback(); - }; - if (session.closed) { - queueMicrotask(closeCallback); - } - else { - session.close(closeCallback); - } - } - completeUnbind(boundPortObject) { - for (const server of boundPortObject.listeningServers) { - const serverInfo = this.http2Servers.get(server); - this.closeServer(server, () => { - boundPortObject.listeningServers.delete(server); - }); - if (serverInfo) { - for (const session of serverInfo.sessions) { - this.closeSession(session); - } - } - } - this.boundPorts.delete(boundPortObject.mapKey); - } - /** - * Unbind a previously bound port, or cancel an in-progress bindAsync - * operation. If port 0 was bound, only the actual bound port can be - * unbound. For example, if bindAsync was called with "localhost:0" and the - * bound port result was 54321, it can be unbound as "localhost:54321". - * @param port - */ - unbind(port) { - this.trace('unbind port=' + port); - const portUri = this.normalizePort(port); - const splitPort = (0, uri_parser_1.splitHostPort)(portUri.path); - if ((splitPort === null || splitPort === void 0 ? void 0 : splitPort.port) === 0) { - throw new Error('Cannot unbind port 0'); - } - const boundPortObject = this.boundPorts.get((0, uri_parser_1.uriToString)(portUri)); - if (boundPortObject) { - this.trace('unbinding ' + - boundPortObject.mapKey + - ' originally bound as ' + - (0, uri_parser_1.uriToString)(boundPortObject.originalUri)); - /* If the bind operation is pending, the cancelled flag will trigger - * the unbind operation later. */ - if (boundPortObject.completionPromise) { - boundPortObject.cancelled = true; - } - else { - this.completeUnbind(boundPortObject); - } - } - } - /** - * Gracefully close all connections associated with a previously bound port. - * After the grace time, forcefully close all remaining open connections. - * - * If port 0 was bound, only the actual bound port can be - * drained. For example, if bindAsync was called with "localhost:0" and the - * bound port result was 54321, it can be drained as "localhost:54321". - * @param port - * @param graceTimeMs - * @returns - */ - drain(port, graceTimeMs) { - var _b, _c; - this.trace('drain port=' + port + ' graceTimeMs=' + graceTimeMs); - const portUri = this.normalizePort(port); - const splitPort = (0, uri_parser_1.splitHostPort)(portUri.path); - if ((splitPort === null || splitPort === void 0 ? void 0 : splitPort.port) === 0) { - throw new Error('Cannot drain port 0'); - } - const boundPortObject = this.boundPorts.get((0, uri_parser_1.uriToString)(portUri)); - if (!boundPortObject) { - return; - } - const allSessions = new Set(); - for (const http2Server of boundPortObject.listeningServers) { - const serverEntry = this.http2Servers.get(http2Server); - if (serverEntry) { - for (const session of serverEntry.sessions) { - allSessions.add(session); - this.closeSession(session, () => { - allSessions.delete(session); - }); - } - } - } - /* After the grace time ends, send another goaway to all remaining sessions - * with the CANCEL code. */ - (_c = (_b = setTimeout(() => { - for (const session of allSessions) { - session.destroy(http2.constants.NGHTTP2_CANCEL); - } - }, graceTimeMs)).unref) === null || _c === void 0 ? void 0 : _c.call(_b); - } - forceShutdown() { - for (const boundPortObject of this.boundPorts.values()) { - boundPortObject.cancelled = true; - } - this.boundPorts.clear(); - // Close the server if it is still running. - for (const server of this.http2Servers.keys()) { - this.closeServer(server); - } - // Always destroy any available sessions. It's possible that one or more - // tryShutdown() calls are in progress. Don't wait on them to finish. - this.sessions.forEach((channelzInfo, session) => { - this.closeSession(session); - // Cast NGHTTP2_CANCEL to any because TypeScript doesn't seem to - // recognize destroy(code) as a valid signature. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - session.destroy(http2.constants.NGHTTP2_CANCEL); - }); - this.sessions.clear(); - (0, channelz_1.unregisterChannelzRef)(this.channelzRef); - this.shutdown = true; - } - register(name, handler, serialize, deserialize, type) { - if (this.handlers.has(name)) { - return false; - } - this.handlers.set(name, { - func: handler, - serialize, - deserialize, - type, - path: name, - }); - return true; - } - unregister(name) { - return this.handlers.delete(name); - } - /** - * @deprecated No longer needed as of version 1.10.x - */ - start() { - if (this.http2Servers.size === 0 || - [...this.http2Servers.keys()].every(server => !server.listening)) { - throw new Error('server must be bound in order to start'); - } - if (this.started === true) { - throw new Error('server is already started'); - } - this.started = true; - } - tryShutdown(callback) { - var _b; - const wrappedCallback = (error) => { - (0, channelz_1.unregisterChannelzRef)(this.channelzRef); - callback(error); - }; - let pendingChecks = 0; - function maybeCallback() { - pendingChecks--; - if (pendingChecks === 0) { - wrappedCallback(); - } - } - this.shutdown = true; - for (const [serverKey, server] of this.http2Servers.entries()) { - pendingChecks++; - const serverString = server.channelzRef.name; - this.trace('Waiting for server ' + serverString + ' to close'); - this.closeServer(serverKey, () => { - this.trace('Server ' + serverString + ' finished closing'); - maybeCallback(); - }); - for (const session of server.sessions.keys()) { - pendingChecks++; - const sessionString = (_b = session.socket) === null || _b === void 0 ? void 0 : _b.remoteAddress; - this.trace('Waiting for session ' + sessionString + ' to close'); - this.closeSession(session, () => { - this.trace('Session ' + sessionString + ' finished closing'); - maybeCallback(); - }); - } - } - if (pendingChecks === 0) { - wrappedCallback(); - } - } - addHttp2Port() { - throw new Error('Not yet implemented'); - } - /** - * Get the channelz reference object for this server. The returned value is - * garbage if channelz is disabled for this server. - * @returns - */ - getChannelzRef() { - return this.channelzRef; - } - _verifyContentType(stream, headers) { - const contentType = headers[http2.constants.HTTP2_HEADER_CONTENT_TYPE]; - if (typeof contentType !== 'string' || - !contentType.startsWith('application/grpc')) { - stream.respond({ - [http2.constants.HTTP2_HEADER_STATUS]: http2.constants.HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - }, { endStream: true }); - return false; - } - return true; - } - _retrieveHandler(path) { - serverCallTrace('Received call to method ' + - path + - ' at address ' + - this.serverAddressString); - const handler = this.handlers.get(path); - if (handler === undefined) { - serverCallTrace('No handler registered for method ' + - path + - '. Sending UNIMPLEMENTED status.'); - return null; - } - return handler; - } - _respondWithError(err, stream, channelzSessionInfo = null) { - var _b, _c; - const trailersToSend = Object.assign({ 'grpc-status': (_b = err.code) !== null && _b !== void 0 ? _b : constants_1.Status.INTERNAL, 'grpc-message': err.details, [http2.constants.HTTP2_HEADER_STATUS]: http2.constants.HTTP_STATUS_OK, [http2.constants.HTTP2_HEADER_CONTENT_TYPE]: 'application/grpc+proto' }, (_c = err.metadata) === null || _c === void 0 ? void 0 : _c.toHttp2Headers()); - stream.respond(trailersToSend, { endStream: true }); - this.callTracker.addCallFailed(); - channelzSessionInfo === null || channelzSessionInfo === void 0 ? void 0 : channelzSessionInfo.streamTracker.addCallFailed(); - } - _channelzHandler(extraInterceptors, stream, headers) { - stream.once('error', (err) => { - /* We need an error handler to avoid uncaught error event exceptions, but - * there is nothing we can reasonably do here. Any error event should - * have a corresponding close event, which handles emitting the cancelled - * event. And the stream is now in a bad state, so we can't reasonably - * expect to be able to send an error over it. */ - }); - // for handling idle timeout - this.onStreamOpened(stream); - const channelzSessionInfo = this.sessions.get(stream.session); - this.callTracker.addCallStarted(); - channelzSessionInfo === null || channelzSessionInfo === void 0 ? void 0 : channelzSessionInfo.streamTracker.addCallStarted(); - if (!this._verifyContentType(stream, headers)) { - this.callTracker.addCallFailed(); - channelzSessionInfo === null || channelzSessionInfo === void 0 ? void 0 : channelzSessionInfo.streamTracker.addCallFailed(); - return; - } - const path = headers[HTTP2_HEADER_PATH]; - const handler = this._retrieveHandler(path); - if (!handler) { - this._respondWithError(getUnimplementedStatusResponse(path), stream, channelzSessionInfo); - return; - } - const callEventTracker = { - addMessageSent: () => { - if (channelzSessionInfo) { - channelzSessionInfo.messagesSent += 1; - channelzSessionInfo.lastMessageSentTimestamp = new Date(); - } - }, - addMessageReceived: () => { - if (channelzSessionInfo) { - channelzSessionInfo.messagesReceived += 1; - channelzSessionInfo.lastMessageReceivedTimestamp = new Date(); - } - }, - onCallEnd: status => { - if (status.code === constants_1.Status.OK) { - this.callTracker.addCallSucceeded(); - } - else { - this.callTracker.addCallFailed(); - } - }, - onStreamEnd: success => { - if (channelzSessionInfo) { - if (success) { - channelzSessionInfo.streamTracker.addCallSucceeded(); - } - else { - channelzSessionInfo.streamTracker.addCallFailed(); - } - } - }, - }; - const call = (0, server_interceptors_1.getServerInterceptingCall)([...extraInterceptors, ...this.interceptors], stream, headers, callEventTracker, handler, this.options); - if (!this._runHandlerForCall(call, handler)) { - this.callTracker.addCallFailed(); - channelzSessionInfo === null || channelzSessionInfo === void 0 ? void 0 : channelzSessionInfo.streamTracker.addCallFailed(); - call.sendStatus({ - code: constants_1.Status.INTERNAL, - details: `Unknown handler type: ${handler.type}`, - }); - } - } - _streamHandler(extraInterceptors, stream, headers) { - stream.once('error', (err) => { - /* We need an error handler to avoid uncaught error event exceptions, but - * there is nothing we can reasonably do here. Any error event should - * have a corresponding close event, which handles emitting the cancelled - * event. And the stream is now in a bad state, so we can't reasonably - * expect to be able to send an error over it. */ - }); - // for handling idle timeout - this.onStreamOpened(stream); - if (this._verifyContentType(stream, headers) !== true) { - return; - } - const path = headers[HTTP2_HEADER_PATH]; - const handler = this._retrieveHandler(path); - if (!handler) { - this._respondWithError(getUnimplementedStatusResponse(path), stream, null); - return; - } - const call = (0, server_interceptors_1.getServerInterceptingCall)([...extraInterceptors, ...this.interceptors], stream, headers, null, handler, this.options); - if (!this._runHandlerForCall(call, handler)) { - call.sendStatus({ - code: constants_1.Status.INTERNAL, - details: `Unknown handler type: ${handler.type}`, - }); - } - } - _runHandlerForCall(call, handler) { - const { type } = handler; - if (type === 'unary') { - handleUnary(call, handler); - } - else if (type === 'clientStream') { - handleClientStreaming(call, handler); - } - else if (type === 'serverStream') { - handleServerStreaming(call, handler); - } - else if (type === 'bidi') { - handleBidiStreaming(call, handler); - } - else { - return false; - } - return true; - } - _setupHandlers(http2Server, extraInterceptors) { - if (http2Server === null) { - return; - } - const serverAddress = http2Server.address(); - let serverAddressString = 'null'; - if (serverAddress) { - if (typeof serverAddress === 'string') { - serverAddressString = serverAddress; - } - else { - serverAddressString = serverAddress.address + ':' + serverAddress.port; - } - } - this.serverAddressString = serverAddressString; - const handler = this.channelzEnabled - ? this._channelzHandler - : this._streamHandler; - const sessionHandler = this.channelzEnabled - ? this._channelzSessionHandler(http2Server) - : this._sessionHandler(http2Server); - http2Server.on('stream', handler.bind(this, extraInterceptors)); - http2Server.on('session', sessionHandler); - } - _sessionHandler(http2Server) { - return (session) => { - var _b, _c; - (_b = this.http2Servers.get(http2Server)) === null || _b === void 0 ? void 0 : _b.sessions.add(session); - let connectionAgeTimer = null; - let connectionAgeGraceTimer = null; - let keepaliveTimer = null; - let sessionClosedByServer = false; - const idleTimeoutObj = this.enableIdleTimeout(session); - if (this.maxConnectionAgeMs !== UNLIMITED_CONNECTION_AGE_MS) { - // Apply a random jitter within a +/-10% range - const jitterMagnitude = this.maxConnectionAgeMs / 10; - const jitter = Math.random() * jitterMagnitude * 2 - jitterMagnitude; - connectionAgeTimer = setTimeout(() => { - var _b, _c; - sessionClosedByServer = true; - this.trace('Connection dropped by max connection age: ' + - ((_b = session.socket) === null || _b === void 0 ? void 0 : _b.remoteAddress)); - try { - session.goaway(http2.constants.NGHTTP2_NO_ERROR, ~(1 << 31), kMaxAge); - } - catch (e) { - // The goaway can't be sent because the session is already closed - session.destroy(); - return; - } - session.close(); - /* Allow a grace period after sending the GOAWAY before forcibly - * closing the connection. */ - if (this.maxConnectionAgeGraceMs !== UNLIMITED_CONNECTION_AGE_MS) { - connectionAgeGraceTimer = setTimeout(() => { - session.destroy(); - }, this.maxConnectionAgeGraceMs); - (_c = connectionAgeGraceTimer.unref) === null || _c === void 0 ? void 0 : _c.call(connectionAgeGraceTimer); - } - }, this.maxConnectionAgeMs + jitter); - (_c = connectionAgeTimer.unref) === null || _c === void 0 ? void 0 : _c.call(connectionAgeTimer); - } - const clearKeepaliveTimeout = () => { - if (keepaliveTimer) { - clearTimeout(keepaliveTimer); - keepaliveTimer = null; - } - }; - const canSendPing = () => { - return (!session.destroyed && - this.keepaliveTimeMs < KEEPALIVE_MAX_TIME_MS && - this.keepaliveTimeMs > 0); - }; - /* eslint-disable-next-line prefer-const */ - let sendPing; // hoisted for use in maybeStartKeepalivePingTimer - const maybeStartKeepalivePingTimer = () => { - var _b; - if (!canSendPing()) { - return; - } - this.keepaliveTrace('Starting keepalive timer for ' + this.keepaliveTimeMs + 'ms'); - keepaliveTimer = setTimeout(() => { - clearKeepaliveTimeout(); - sendPing(); - }, this.keepaliveTimeMs); - (_b = keepaliveTimer.unref) === null || _b === void 0 ? void 0 : _b.call(keepaliveTimer); - }; - sendPing = () => { - var _b; - if (!canSendPing()) { - return; - } - this.keepaliveTrace('Sending ping with timeout ' + this.keepaliveTimeoutMs + 'ms'); - let pingSendError = ''; - try { - const pingSentSuccessfully = session.ping((err, duration, payload) => { - clearKeepaliveTimeout(); - if (err) { - this.keepaliveTrace('Ping failed with error: ' + err.message); - sessionClosedByServer = true; - session.destroy(); - } - else { - this.keepaliveTrace('Received ping response'); - maybeStartKeepalivePingTimer(); - } - }); - if (!pingSentSuccessfully) { - pingSendError = 'Ping returned false'; - } - } - catch (e) { - // grpc/grpc-node#2139 - pingSendError = - (e instanceof Error ? e.message : '') || 'Unknown error'; - } - if (pingSendError) { - this.keepaliveTrace('Ping send failed: ' + pingSendError); - this.trace('Connection dropped due to ping send error: ' + pingSendError); - sessionClosedByServer = true; - session.destroy(); - return; - } - keepaliveTimer = setTimeout(() => { - clearKeepaliveTimeout(); - this.keepaliveTrace('Ping timeout passed without response'); - this.trace('Connection dropped by keepalive timeout'); - sessionClosedByServer = true; - session.destroy(); - }, this.keepaliveTimeoutMs); - (_b = keepaliveTimer.unref) === null || _b === void 0 ? void 0 : _b.call(keepaliveTimer); - }; - maybeStartKeepalivePingTimer(); - session.on('close', () => { - var _b, _c; - if (!sessionClosedByServer) { - this.trace(`Connection dropped by client ${(_b = session.socket) === null || _b === void 0 ? void 0 : _b.remoteAddress}`); - } - if (connectionAgeTimer) { - clearTimeout(connectionAgeTimer); - } - if (connectionAgeGraceTimer) { - clearTimeout(connectionAgeGraceTimer); - } - clearKeepaliveTimeout(); - if (idleTimeoutObj !== null) { - clearTimeout(idleTimeoutObj.timeout); - this.sessionIdleTimeouts.delete(session); - } - (_c = this.http2Servers.get(http2Server)) === null || _c === void 0 ? void 0 : _c.sessions.delete(session); - }); - }; - } - _channelzSessionHandler(http2Server) { - return (session) => { - var _b, _c, _d, _e; - const channelzRef = (0, channelz_1.registerChannelzSocket)((_c = (_b = session.socket) === null || _b === void 0 ? void 0 : _b.remoteAddress) !== null && _c !== void 0 ? _c : 'unknown', this.getChannelzSessionInfo.bind(this, session), this.channelzEnabled); - const channelzSessionInfo = { - ref: channelzRef, - streamTracker: new channelz_1.ChannelzCallTracker(), - messagesSent: 0, - messagesReceived: 0, - keepAlivesSent: 0, - lastMessageSentTimestamp: null, - lastMessageReceivedTimestamp: null, - }; - (_d = this.http2Servers.get(http2Server)) === null || _d === void 0 ? void 0 : _d.sessions.add(session); - this.sessions.set(session, channelzSessionInfo); - const clientAddress = `${session.socket.remoteAddress}:${session.socket.remotePort}`; - this.channelzTrace.addTrace('CT_INFO', 'Connection established by client ' + clientAddress); - this.trace('Connection established by client ' + clientAddress); - this.sessionChildrenTracker.refChild(channelzRef); - let connectionAgeTimer = null; - let connectionAgeGraceTimer = null; - let keepaliveTimeout = null; - let sessionClosedByServer = false; - const idleTimeoutObj = this.enableIdleTimeout(session); - if (this.maxConnectionAgeMs !== UNLIMITED_CONNECTION_AGE_MS) { - // Apply a random jitter within a +/-10% range - const jitterMagnitude = this.maxConnectionAgeMs / 10; - const jitter = Math.random() * jitterMagnitude * 2 - jitterMagnitude; - connectionAgeTimer = setTimeout(() => { - var _b; - sessionClosedByServer = true; - this.channelzTrace.addTrace('CT_INFO', 'Connection dropped by max connection age from ' + clientAddress); - try { - session.goaway(http2.constants.NGHTTP2_NO_ERROR, ~(1 << 31), kMaxAge); - } - catch (e) { - // The goaway can't be sent because the session is already closed - session.destroy(); - return; - } - session.close(); - /* Allow a grace period after sending the GOAWAY before forcibly - * closing the connection. */ - if (this.maxConnectionAgeGraceMs !== UNLIMITED_CONNECTION_AGE_MS) { - connectionAgeGraceTimer = setTimeout(() => { - session.destroy(); - }, this.maxConnectionAgeGraceMs); - (_b = connectionAgeGraceTimer.unref) === null || _b === void 0 ? void 0 : _b.call(connectionAgeGraceTimer); - } - }, this.maxConnectionAgeMs + jitter); - (_e = connectionAgeTimer.unref) === null || _e === void 0 ? void 0 : _e.call(connectionAgeTimer); - } - const clearKeepaliveTimeout = () => { - if (keepaliveTimeout) { - clearTimeout(keepaliveTimeout); - keepaliveTimeout = null; - } - }; - const canSendPing = () => { - return (!session.destroyed && - this.keepaliveTimeMs < KEEPALIVE_MAX_TIME_MS && - this.keepaliveTimeMs > 0); - }; - /* eslint-disable-next-line prefer-const */ - let sendPing; // hoisted for use in maybeStartKeepalivePingTimer - const maybeStartKeepalivePingTimer = () => { - var _b; - if (!canSendPing()) { - return; - } - this.keepaliveTrace('Starting keepalive timer for ' + this.keepaliveTimeMs + 'ms'); - keepaliveTimeout = setTimeout(() => { - clearKeepaliveTimeout(); - sendPing(); - }, this.keepaliveTimeMs); - (_b = keepaliveTimeout.unref) === null || _b === void 0 ? void 0 : _b.call(keepaliveTimeout); - }; - sendPing = () => { - var _b; - if (!canSendPing()) { - return; - } - this.keepaliveTrace('Sending ping with timeout ' + this.keepaliveTimeoutMs + 'ms'); - let pingSendError = ''; - try { - const pingSentSuccessfully = session.ping((err, duration, payload) => { - clearKeepaliveTimeout(); - if (err) { - this.keepaliveTrace('Ping failed with error: ' + err.message); - this.channelzTrace.addTrace('CT_INFO', 'Connection dropped due to error of a ping frame ' + - err.message + - ' return in ' + - duration); - sessionClosedByServer = true; - session.destroy(); - } - else { - this.keepaliveTrace('Received ping response'); - maybeStartKeepalivePingTimer(); - } - }); - if (!pingSentSuccessfully) { - pingSendError = 'Ping returned false'; - } - } - catch (e) { - // grpc/grpc-node#2139 - pingSendError = - (e instanceof Error ? e.message : '') || 'Unknown error'; - } - if (pingSendError) { - this.keepaliveTrace('Ping send failed: ' + pingSendError); - this.channelzTrace.addTrace('CT_INFO', 'Connection dropped due to ping send error: ' + pingSendError); - sessionClosedByServer = true; - session.destroy(); - return; - } - channelzSessionInfo.keepAlivesSent += 1; - keepaliveTimeout = setTimeout(() => { - clearKeepaliveTimeout(); - this.keepaliveTrace('Ping timeout passed without response'); - this.channelzTrace.addTrace('CT_INFO', 'Connection dropped by keepalive timeout from ' + clientAddress); - sessionClosedByServer = true; - session.destroy(); - }, this.keepaliveTimeoutMs); - (_b = keepaliveTimeout.unref) === null || _b === void 0 ? void 0 : _b.call(keepaliveTimeout); - }; - maybeStartKeepalivePingTimer(); - session.on('close', () => { - var _b; - if (!sessionClosedByServer) { - this.channelzTrace.addTrace('CT_INFO', 'Connection dropped by client ' + clientAddress); - } - this.sessionChildrenTracker.unrefChild(channelzRef); - (0, channelz_1.unregisterChannelzRef)(channelzRef); - if (connectionAgeTimer) { - clearTimeout(connectionAgeTimer); - } - if (connectionAgeGraceTimer) { - clearTimeout(connectionAgeGraceTimer); - } - clearKeepaliveTimeout(); - if (idleTimeoutObj !== null) { - clearTimeout(idleTimeoutObj.timeout); - this.sessionIdleTimeouts.delete(session); - } - (_b = this.http2Servers.get(http2Server)) === null || _b === void 0 ? void 0 : _b.sessions.delete(session); - this.sessions.delete(session); - }); - }; - } - enableIdleTimeout(session) { - var _b, _c; - if (this.sessionIdleTimeout >= MAX_CONNECTION_IDLE_MS) { - return null; - } - const idleTimeoutObj = { - activeStreams: 0, - lastIdle: Date.now(), - onClose: this.onStreamClose.bind(this, session), - timeout: setTimeout(this.onIdleTimeout, this.sessionIdleTimeout, this, session), - }; - (_c = (_b = idleTimeoutObj.timeout).unref) === null || _c === void 0 ? void 0 : _c.call(_b); - this.sessionIdleTimeouts.set(session, idleTimeoutObj); - const { socket } = session; - this.trace('Enable idle timeout for ' + - socket.remoteAddress + - ':' + - socket.remotePort); - return idleTimeoutObj; - } - onIdleTimeout(ctx, session) { - const { socket } = session; - const sessionInfo = ctx.sessionIdleTimeouts.get(session); - // if it is called while we have activeStreams - timer will not be rescheduled - // until last active stream is closed, then it will call .refresh() on the timer - // important part is to not clearTimeout(timer) or it becomes unusable - // for future refreshes - if (sessionInfo !== undefined && - sessionInfo.activeStreams === 0) { - if (Date.now() - sessionInfo.lastIdle >= ctx.sessionIdleTimeout) { - ctx.trace('Session idle timeout triggered for ' + - (socket === null || socket === void 0 ? void 0 : socket.remoteAddress) + - ':' + - (socket === null || socket === void 0 ? void 0 : socket.remotePort) + - ' last idle at ' + - sessionInfo.lastIdle); - ctx.closeSession(session); - } - else { - sessionInfo.timeout.refresh(); - } - } - } - onStreamOpened(stream) { - const session = stream.session; - const idleTimeoutObj = this.sessionIdleTimeouts.get(session); - if (idleTimeoutObj) { - idleTimeoutObj.activeStreams += 1; - stream.once('close', idleTimeoutObj.onClose); - } - } - onStreamClose(session) { - var _b, _c; - const idleTimeoutObj = this.sessionIdleTimeouts.get(session); - if (idleTimeoutObj) { - idleTimeoutObj.activeStreams -= 1; - if (idleTimeoutObj.activeStreams === 0) { - idleTimeoutObj.lastIdle = Date.now(); - idleTimeoutObj.timeout.refresh(); - this.trace('Session onStreamClose' + - ((_b = session.socket) === null || _b === void 0 ? void 0 : _b.remoteAddress) + - ':' + - ((_c = session.socket) === null || _c === void 0 ? void 0 : _c.remotePort) + - ' at ' + - idleTimeoutObj.lastIdle); - } - } - } - }, - (() => { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; - _start_decorators = [deprecate('Calling start() is no longer necessary. It can be safely omitted.')]; - __esDecorate(_a, null, _start_decorators, { kind: "method", name: "start", static: false, private: false, access: { has: obj => "start" in obj, get: obj => obj.start }, metadata: _metadata }, null, _instanceExtraInitializers); - if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); - })(), - _a; -})(); -exports.Server = Server; -async function handleUnary(call, handler) { - let stream; - function respond(err, value, trailer, flags) { - if (err) { - call.sendStatus((0, server_call_1.serverErrorToStatus)(err, trailer)); - return; - } - call.sendMessage(value, () => { - call.sendStatus({ - code: constants_1.Status.OK, - details: 'OK', - metadata: trailer !== null && trailer !== void 0 ? trailer : null, - }); - }); - } - let requestMetadata; - let requestMessage = null; - call.start({ - onReceiveMetadata(metadata) { - requestMetadata = metadata; - call.startRead(); - }, - onReceiveMessage(message) { - if (requestMessage) { - call.sendStatus({ - code: constants_1.Status.UNIMPLEMENTED, - details: `Received a second request message for server streaming method ${handler.path}`, - metadata: null, - }); - return; - } - requestMessage = message; - call.startRead(); - }, - onReceiveHalfClose() { - if (!requestMessage) { - call.sendStatus({ - code: constants_1.Status.UNIMPLEMENTED, - details: `Received no request message for server streaming method ${handler.path}`, - metadata: null, - }); - return; - } - stream = new server_call_1.ServerWritableStreamImpl(handler.path, call, requestMetadata, requestMessage); - try { - handler.func(stream, respond); - } - catch (err) { - call.sendStatus({ - code: constants_1.Status.UNKNOWN, - details: `Server method handler threw error ${err.message}`, - metadata: null, - }); - } - }, - onCancel() { - if (stream) { - stream.cancelled = true; - stream.emit('cancelled', 'cancelled'); - } - }, - }); -} -function handleClientStreaming(call, handler) { - let stream; - function respond(err, value, trailer, flags) { - if (err) { - call.sendStatus((0, server_call_1.serverErrorToStatus)(err, trailer)); - return; - } - call.sendMessage(value, () => { - call.sendStatus({ - code: constants_1.Status.OK, - details: 'OK', - metadata: trailer !== null && trailer !== void 0 ? trailer : null, - }); - }); - } - call.start({ - onReceiveMetadata(metadata) { - stream = new server_call_1.ServerDuplexStreamImpl(handler.path, call, metadata); - try { - handler.func(stream, respond); - } - catch (err) { - call.sendStatus({ - code: constants_1.Status.UNKNOWN, - details: `Server method handler threw error ${err.message}`, - metadata: null, - }); - } - }, - onReceiveMessage(message) { - stream.push(message); - }, - onReceiveHalfClose() { - stream.push(null); - }, - onCancel() { - if (stream) { - stream.cancelled = true; - stream.emit('cancelled', 'cancelled'); - stream.destroy(); - } - }, - }); -} -function handleServerStreaming(call, handler) { - let stream; - let requestMetadata; - let requestMessage = null; - call.start({ - onReceiveMetadata(metadata) { - requestMetadata = metadata; - call.startRead(); - }, - onReceiveMessage(message) { - if (requestMessage) { - call.sendStatus({ - code: constants_1.Status.UNIMPLEMENTED, - details: `Received a second request message for server streaming method ${handler.path}`, - metadata: null, - }); - return; - } - requestMessage = message; - call.startRead(); - }, - onReceiveHalfClose() { - if (!requestMessage) { - call.sendStatus({ - code: constants_1.Status.UNIMPLEMENTED, - details: `Received no request message for server streaming method ${handler.path}`, - metadata: null, - }); - return; - } - stream = new server_call_1.ServerWritableStreamImpl(handler.path, call, requestMetadata, requestMessage); - try { - handler.func(stream); - } - catch (err) { - call.sendStatus({ - code: constants_1.Status.UNKNOWN, - details: `Server method handler threw error ${err.message}`, - metadata: null, - }); - } - }, - onCancel() { - if (stream) { - stream.cancelled = true; - stream.emit('cancelled', 'cancelled'); - stream.destroy(); - } - }, - }); -} -function handleBidiStreaming(call, handler) { - let stream; - call.start({ - onReceiveMetadata(metadata) { - stream = new server_call_1.ServerDuplexStreamImpl(handler.path, call, metadata); - try { - handler.func(stream); - } - catch (err) { - call.sendStatus({ - code: constants_1.Status.UNKNOWN, - details: `Server method handler threw error ${err.message}`, - metadata: null, - }); - } - }, - onReceiveMessage(message) { - stream.push(message); - }, - onReceiveHalfClose() { - stream.push(null); - }, - onCancel() { - if (stream) { - stream.cancelled = true; - stream.emit('cancelled', 'cancelled'); - stream.destroy(); - } - }, - }); -} -//# sourceMappingURL=server.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/server.js.map b/node_modules/@grpc/grpc-js/build/src/server.js.map deleted file mode 100644 index 84f6e78..0000000 --- a/node_modules/@grpc/grpc-js/build/src/server.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+BAA+B;AAC/B,6BAA6B;AAG7B,2CAAmD;AAGnD,+CAkBuB;AACvB,6DAA+E;AAE/E,yCAIoB;AACpB,qCAAqC;AACrC,6DAK8B;AAC9B,6CAMsB;AACtB,yCAeoB;AAEpB,+DAI+B;AAM/B,MAAM,2BAA2B,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAC/C,MAAM,qBAAqB,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AACzC,MAAM,oB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MAAqD,CAAC;IAE1D,IAAI,CAAC,KAAK,CAAC;QACT,iBAAiB,CAAC,QAAQ;YACxB,MAAM,GAAG,IAAI,oCAAsB,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;YAClE,IAAI,CAAC;gBACH,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACvB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,CAAC,UAAU,CAAC;oBACd,IAAI,EAAE,kBAAM,CAAC,OAAO;oBACpB,OAAO,EAAE,qCACN,GAAa,CAAC,OACjB,EAAE;oBACF,QAAQ,EAAE,IAAI;iBACf,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QACD,gBAAgB,CAAC,OAAO;YACtB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;QACD,kBAAkB;YAChB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;QACD,QAAQ;YACN,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;gBACxB,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;gBACtC,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/service-config.d.ts b/node_modules/@grpc/grpc-js/build/src/service-config.d.ts deleted file mode 100644 index c638f4f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/service-config.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Status } from './constants'; -import { Duration } from './duration'; -export interface MethodConfigName { - service?: string; - method?: string; -} -export interface RetryPolicy { - maxAttempts: number; - initialBackoff: string; - maxBackoff: string; - backoffMultiplier: number; - retryableStatusCodes: (Status | string)[]; -} -export interface HedgingPolicy { - maxAttempts: number; - hedgingDelay?: string; - nonFatalStatusCodes?: (Status | string)[]; -} -export interface MethodConfig { - name: MethodConfigName[]; - waitForReady?: boolean; - timeout?: Duration; - maxRequestBytes?: number; - maxResponseBytes?: number; - retryPolicy?: RetryPolicy; - hedgingPolicy?: HedgingPolicy; -} -export interface RetryThrottling { - maxTokens: number; - tokenRatio: number; -} -export interface LoadBalancingConfig { - [key: string]: object; -} -export interface ServiceConfig { - loadBalancingPolicy?: string; - loadBalancingConfig: LoadBalancingConfig[]; - methodConfig: MethodConfig[]; - retryThrottling?: RetryThrottling; -} -export interface ServiceConfigCanaryConfig { - clientLanguage?: string[]; - percentage?: number; - clientHostname?: string[]; - serviceConfig: ServiceConfig; -} -export declare function validateRetryThrottling(obj: any): RetryThrottling; -export declare function validateServiceConfig(obj: any): ServiceConfig; -/** - * Find the "grpc_config" record among the TXT records, parse its value as JSON, validate its contents, - * and select a service config with selection fields that all match this client. Most of these steps - * can fail with an error; the caller must handle any errors thrown this way. - * @param txtRecord The TXT record array that is output from a successful call to dns.resolveTxt - * @param percentage A number chosen from the range [0, 100) that is used to select which config to use - * @return The service configuration to use, given the percentage value, or null if the service config - * data has a valid format but none of the options match the current client. - */ -export declare function extractAndSelectServiceConfig(txtRecord: string[][], percentage: number): ServiceConfig | null; diff --git a/node_modules/@grpc/grpc-js/build/src/service-config.js b/node_modules/@grpc/grpc-js/build/src/service-config.js deleted file mode 100644 index d7accd3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/service-config.js +++ /dev/null @@ -1,430 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateRetryThrottling = validateRetryThrottling; -exports.validateServiceConfig = validateServiceConfig; -exports.extractAndSelectServiceConfig = extractAndSelectServiceConfig; -/* This file implements gRFC A2 and the service config spec: - * https://github.com/grpc/proposal/blob/master/A2-service-configs-in-dns.md - * https://github.com/grpc/grpc/blob/master/doc/service_config.md. Each - * function here takes an object with unknown structure and returns its - * specific object type if the input has the right structure, and throws an - * error otherwise. */ -/* The any type is purposely used here. All functions validate their input at - * runtime */ -/* eslint-disable @typescript-eslint/no-explicit-any */ -const os = require("os"); -const constants_1 = require("./constants"); -/** - * Recognizes a number with up to 9 digits after the decimal point, followed by - * an "s", representing a number of seconds. - */ -const DURATION_REGEX = /^\d+(\.\d{1,9})?s$/; -/** - * Client language name used for determining whether this client matches a - * `ServiceConfigCanaryConfig`'s `clientLanguage` list. - */ -const CLIENT_LANGUAGE_STRING = 'node'; -function validateName(obj) { - // In this context, and unset field and '' are considered the same - if ('service' in obj && obj.service !== '') { - if (typeof obj.service !== 'string') { - throw new Error(`Invalid method config name: invalid service: expected type string, got ${typeof obj.service}`); - } - if ('method' in obj && obj.method !== '') { - if (typeof obj.method !== 'string') { - throw new Error(`Invalid method config name: invalid method: expected type string, got ${typeof obj.service}`); - } - return { - service: obj.service, - method: obj.method, - }; - } - else { - return { - service: obj.service, - }; - } - } - else { - if ('method' in obj && obj.method !== undefined) { - throw new Error(`Invalid method config name: method set with empty or unset service`); - } - return {}; - } -} -function validateRetryPolicy(obj) { - if (!('maxAttempts' in obj) || - !Number.isInteger(obj.maxAttempts) || - obj.maxAttempts < 2) { - throw new Error('Invalid method config retry policy: maxAttempts must be an integer at least 2'); - } - if (!('initialBackoff' in obj) || - typeof obj.initialBackoff !== 'string' || - !DURATION_REGEX.test(obj.initialBackoff)) { - throw new Error('Invalid method config retry policy: initialBackoff must be a string consisting of a positive integer or decimal followed by s'); - } - if (!('maxBackoff' in obj) || - typeof obj.maxBackoff !== 'string' || - !DURATION_REGEX.test(obj.maxBackoff)) { - throw new Error('Invalid method config retry policy: maxBackoff must be a string consisting of a positive integer or decimal followed by s'); - } - if (!('backoffMultiplier' in obj) || - typeof obj.backoffMultiplier !== 'number' || - obj.backoffMultiplier <= 0) { - throw new Error('Invalid method config retry policy: backoffMultiplier must be a number greater than 0'); - } - if (!('retryableStatusCodes' in obj && Array.isArray(obj.retryableStatusCodes))) { - throw new Error('Invalid method config retry policy: retryableStatusCodes is required'); - } - if (obj.retryableStatusCodes.length === 0) { - throw new Error('Invalid method config retry policy: retryableStatusCodes must be non-empty'); - } - for (const value of obj.retryableStatusCodes) { - if (typeof value === 'number') { - if (!Object.values(constants_1.Status).includes(value)) { - throw new Error('Invalid method config retry policy: retryableStatusCodes value not in status code range'); - } - } - else if (typeof value === 'string') { - if (!Object.values(constants_1.Status).includes(value.toUpperCase())) { - throw new Error('Invalid method config retry policy: retryableStatusCodes value not a status code name'); - } - } - else { - throw new Error('Invalid method config retry policy: retryableStatusCodes value must be a string or number'); - } - } - return { - maxAttempts: obj.maxAttempts, - initialBackoff: obj.initialBackoff, - maxBackoff: obj.maxBackoff, - backoffMultiplier: obj.backoffMultiplier, - retryableStatusCodes: obj.retryableStatusCodes, - }; -} -function validateHedgingPolicy(obj) { - if (!('maxAttempts' in obj) || - !Number.isInteger(obj.maxAttempts) || - obj.maxAttempts < 2) { - throw new Error('Invalid method config hedging policy: maxAttempts must be an integer at least 2'); - } - if ('hedgingDelay' in obj && - (typeof obj.hedgingDelay !== 'string' || - !DURATION_REGEX.test(obj.hedgingDelay))) { - throw new Error('Invalid method config hedging policy: hedgingDelay must be a string consisting of a positive integer followed by s'); - } - if ('nonFatalStatusCodes' in obj && Array.isArray(obj.nonFatalStatusCodes)) { - for (const value of obj.nonFatalStatusCodes) { - if (typeof value === 'number') { - if (!Object.values(constants_1.Status).includes(value)) { - throw new Error('Invalid method config hedging policy: nonFatalStatusCodes value not in status code range'); - } - } - else if (typeof value === 'string') { - if (!Object.values(constants_1.Status).includes(value.toUpperCase())) { - throw new Error('Invalid method config hedging policy: nonFatalStatusCodes value not a status code name'); - } - } - else { - throw new Error('Invalid method config hedging policy: nonFatalStatusCodes value must be a string or number'); - } - } - } - const result = { - maxAttempts: obj.maxAttempts, - }; - if (obj.hedgingDelay) { - result.hedgingDelay = obj.hedgingDelay; - } - if (obj.nonFatalStatusCodes) { - result.nonFatalStatusCodes = obj.nonFatalStatusCodes; - } - return result; -} -function validateMethodConfig(obj) { - var _a; - const result = { - name: [], - }; - if (!('name' in obj) || !Array.isArray(obj.name)) { - throw new Error('Invalid method config: invalid name array'); - } - for (const name of obj.name) { - result.name.push(validateName(name)); - } - if ('waitForReady' in obj) { - if (typeof obj.waitForReady !== 'boolean') { - throw new Error('Invalid method config: invalid waitForReady'); - } - result.waitForReady = obj.waitForReady; - } - if ('timeout' in obj) { - if (typeof obj.timeout === 'object') { - if (!('seconds' in obj.timeout) || - !(typeof obj.timeout.seconds === 'number')) { - throw new Error('Invalid method config: invalid timeout.seconds'); - } - if (!('nanos' in obj.timeout) || - !(typeof obj.timeout.nanos === 'number')) { - throw new Error('Invalid method config: invalid timeout.nanos'); - } - result.timeout = obj.timeout; - } - else if (typeof obj.timeout === 'string' && - DURATION_REGEX.test(obj.timeout)) { - const timeoutParts = obj.timeout - .substring(0, obj.timeout.length - 1) - .split('.'); - result.timeout = { - seconds: timeoutParts[0] | 0, - nanos: ((_a = timeoutParts[1]) !== null && _a !== void 0 ? _a : 0) | 0, - }; - } - else { - throw new Error('Invalid method config: invalid timeout'); - } - } - if ('maxRequestBytes' in obj) { - if (typeof obj.maxRequestBytes !== 'number') { - throw new Error('Invalid method config: invalid maxRequestBytes'); - } - result.maxRequestBytes = obj.maxRequestBytes; - } - if ('maxResponseBytes' in obj) { - if (typeof obj.maxResponseBytes !== 'number') { - throw new Error('Invalid method config: invalid maxRequestBytes'); - } - result.maxResponseBytes = obj.maxResponseBytes; - } - if ('retryPolicy' in obj) { - if ('hedgingPolicy' in obj) { - throw new Error('Invalid method config: retryPolicy and hedgingPolicy cannot both be specified'); - } - else { - result.retryPolicy = validateRetryPolicy(obj.retryPolicy); - } - } - else if ('hedgingPolicy' in obj) { - result.hedgingPolicy = validateHedgingPolicy(obj.hedgingPolicy); - } - return result; -} -function validateRetryThrottling(obj) { - if (!('maxTokens' in obj) || - typeof obj.maxTokens !== 'number' || - obj.maxTokens <= 0 || - obj.maxTokens > 1000) { - throw new Error('Invalid retryThrottling: maxTokens must be a number in (0, 1000]'); - } - if (!('tokenRatio' in obj) || - typeof obj.tokenRatio !== 'number' || - obj.tokenRatio <= 0) { - throw new Error('Invalid retryThrottling: tokenRatio must be a number greater than 0'); - } - return { - maxTokens: +obj.maxTokens.toFixed(3), - tokenRatio: +obj.tokenRatio.toFixed(3), - }; -} -function validateLoadBalancingConfig(obj) { - if (!(typeof obj === 'object' && obj !== null)) { - throw new Error(`Invalid loadBalancingConfig: unexpected type ${typeof obj}`); - } - const keys = Object.keys(obj); - if (keys.length > 1) { - throw new Error(`Invalid loadBalancingConfig: unexpected multiple keys ${keys}`); - } - if (keys.length === 0) { - throw new Error('Invalid loadBalancingConfig: load balancing policy name required'); - } - return { - [keys[0]]: obj[keys[0]], - }; -} -function validateServiceConfig(obj) { - const result = { - loadBalancingConfig: [], - methodConfig: [], - }; - if ('loadBalancingPolicy' in obj) { - if (typeof obj.loadBalancingPolicy === 'string') { - result.loadBalancingPolicy = obj.loadBalancingPolicy; - } - else { - throw new Error('Invalid service config: invalid loadBalancingPolicy'); - } - } - if ('loadBalancingConfig' in obj) { - if (Array.isArray(obj.loadBalancingConfig)) { - for (const config of obj.loadBalancingConfig) { - result.loadBalancingConfig.push(validateLoadBalancingConfig(config)); - } - } - else { - throw new Error('Invalid service config: invalid loadBalancingConfig'); - } - } - if ('methodConfig' in obj) { - if (Array.isArray(obj.methodConfig)) { - for (const methodConfig of obj.methodConfig) { - result.methodConfig.push(validateMethodConfig(methodConfig)); - } - } - } - if ('retryThrottling' in obj) { - result.retryThrottling = validateRetryThrottling(obj.retryThrottling); - } - // Validate method name uniqueness - const seenMethodNames = []; - for (const methodConfig of result.methodConfig) { - for (const name of methodConfig.name) { - for (const seenName of seenMethodNames) { - if (name.service === seenName.service && - name.method === seenName.method) { - throw new Error(`Invalid service config: duplicate name ${name.service}/${name.method}`); - } - } - seenMethodNames.push(name); - } - } - return result; -} -function validateCanaryConfig(obj) { - if (!('serviceConfig' in obj)) { - throw new Error('Invalid service config choice: missing service config'); - } - const result = { - serviceConfig: validateServiceConfig(obj.serviceConfig), - }; - if ('clientLanguage' in obj) { - if (Array.isArray(obj.clientLanguage)) { - result.clientLanguage = []; - for (const lang of obj.clientLanguage) { - if (typeof lang === 'string') { - result.clientLanguage.push(lang); - } - else { - throw new Error('Invalid service config choice: invalid clientLanguage'); - } - } - } - else { - throw new Error('Invalid service config choice: invalid clientLanguage'); - } - } - if ('clientHostname' in obj) { - if (Array.isArray(obj.clientHostname)) { - result.clientHostname = []; - for (const lang of obj.clientHostname) { - if (typeof lang === 'string') { - result.clientHostname.push(lang); - } - else { - throw new Error('Invalid service config choice: invalid clientHostname'); - } - } - } - else { - throw new Error('Invalid service config choice: invalid clientHostname'); - } - } - if ('percentage' in obj) { - if (typeof obj.percentage === 'number' && - 0 <= obj.percentage && - obj.percentage <= 100) { - result.percentage = obj.percentage; - } - else { - throw new Error('Invalid service config choice: invalid percentage'); - } - } - // Validate that no unexpected fields are present - const allowedFields = [ - 'clientLanguage', - 'percentage', - 'clientHostname', - 'serviceConfig', - ]; - for (const field in obj) { - if (!allowedFields.includes(field)) { - throw new Error(`Invalid service config choice: unexpected field ${field}`); - } - } - return result; -} -function validateAndSelectCanaryConfig(obj, percentage) { - if (!Array.isArray(obj)) { - throw new Error('Invalid service config list'); - } - for (const config of obj) { - const validatedConfig = validateCanaryConfig(config); - /* For each field, we check if it is present, then only discard the - * config if the field value does not match the current client */ - if (typeof validatedConfig.percentage === 'number' && - percentage > validatedConfig.percentage) { - continue; - } - if (Array.isArray(validatedConfig.clientHostname)) { - let hostnameMatched = false; - for (const hostname of validatedConfig.clientHostname) { - if (hostname === os.hostname()) { - hostnameMatched = true; - } - } - if (!hostnameMatched) { - continue; - } - } - if (Array.isArray(validatedConfig.clientLanguage)) { - let languageMatched = false; - for (const language of validatedConfig.clientLanguage) { - if (language === CLIENT_LANGUAGE_STRING) { - languageMatched = true; - } - } - if (!languageMatched) { - continue; - } - } - return validatedConfig.serviceConfig; - } - throw new Error('No matching service config found'); -} -/** - * Find the "grpc_config" record among the TXT records, parse its value as JSON, validate its contents, - * and select a service config with selection fields that all match this client. Most of these steps - * can fail with an error; the caller must handle any errors thrown this way. - * @param txtRecord The TXT record array that is output from a successful call to dns.resolveTxt - * @param percentage A number chosen from the range [0, 100) that is used to select which config to use - * @return The service configuration to use, given the percentage value, or null if the service config - * data has a valid format but none of the options match the current client. - */ -function extractAndSelectServiceConfig(txtRecord, percentage) { - for (const record of txtRecord) { - if (record.length > 0 && record[0].startsWith('grpc_config=')) { - /* Treat the list of strings in this record as a single string and remove - * "grpc_config=" from the beginning. The rest should be a JSON string */ - const recordString = record.join('').substring('grpc_config='.length); - const recordJson = JSON.parse(recordString); - return validateAndSelectCanaryConfig(recordJson, percentage); - } - } - return null; -} -//# sourceMappingURL=service-config.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/service-config.js.map b/node_modules/@grpc/grpc-js/build/src/service-config.js.map deleted file mode 100644 index 1aa51f4..0000000 --- a/node_modules/@grpc/grpc-js/build/src/service-config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"service-config.js","sourceRoot":"","sources":["../../src/service-config.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AA2TH,0DAwBC;AAwBD,sDAiDC;AA0HD,sEAcC;AAliBD;;;;;sBAKsB;AAEtB;aACa;AACb,uDAAuD;AAEvD,yBAAyB;AACzB,2CAAqC;AAuDrC;;;GAGG;AACH,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;GAGG;AACH,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AAE,CAAC;QAC/B,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;YAC9D;qFACyE;YACzE,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YACtE,MAAM,UAAU,GAAQ,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;YACjD,OAAO,6BAA6B,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.d.ts b/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.d.ts deleted file mode 100644 index a9a412f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Call } from "./call-interface"; -import { Channel } from "./channel"; -import { ChannelOptions } from "./channel-options"; -import { ChannelRef } from "./channelz"; -import { ConnectivityState } from "./connectivity-state"; -import { Deadline } from "./deadline"; -import { Subchannel } from "./subchannel"; -import { GrpcUri } from "./uri-parser"; -export declare class SingleSubchannelChannel implements Channel { - private subchannel; - private target; - private channelzRef; - private channelzEnabled; - private channelzTrace; - private callTracker; - private childrenTracker; - private filterStackFactory; - constructor(subchannel: Subchannel, target: GrpcUri, options: ChannelOptions); - close(): void; - getTarget(): string; - getConnectivityState(tryToConnect: boolean): ConnectivityState; - watchConnectivityState(currentState: ConnectivityState, deadline: Date | number, callback: (error?: Error) => void): void; - getChannelzRef(): ChannelRef; - createCall(method: string, deadline: Deadline): Call; -} diff --git a/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.js b/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.js deleted file mode 100644 index 72343f5..0000000 --- a/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.js +++ /dev/null @@ -1,245 +0,0 @@ -"use strict"; -/* - * Copyright 2025 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SingleSubchannelChannel = void 0; -const call_number_1 = require("./call-number"); -const channelz_1 = require("./channelz"); -const compression_filter_1 = require("./compression-filter"); -const connectivity_state_1 = require("./connectivity-state"); -const constants_1 = require("./constants"); -const control_plane_status_1 = require("./control-plane-status"); -const deadline_1 = require("./deadline"); -const filter_stack_1 = require("./filter-stack"); -const metadata_1 = require("./metadata"); -const resolver_1 = require("./resolver"); -const uri_parser_1 = require("./uri-parser"); -class SubchannelCallWrapper { - constructor(subchannel, method, filterStackFactory, options, callNumber) { - var _a, _b; - this.subchannel = subchannel; - this.method = method; - this.options = options; - this.callNumber = callNumber; - this.childCall = null; - this.pendingMessage = null; - this.readPending = false; - this.halfClosePending = false; - this.pendingStatus = null; - this.readFilterPending = false; - this.writeFilterPending = false; - const splitPath = this.method.split('/'); - let serviceName = ''; - /* The standard path format is "/{serviceName}/{methodName}", so if we split - * by '/', the first item should be empty and the second should be the - * service name */ - if (splitPath.length >= 2) { - serviceName = splitPath[1]; - } - const hostname = (_b = (_a = (0, uri_parser_1.splitHostPort)(this.options.host)) === null || _a === void 0 ? void 0 : _a.host) !== null && _b !== void 0 ? _b : 'localhost'; - /* Currently, call credentials are only allowed on HTTPS connections, so we - * can assume that the scheme is "https" */ - this.serviceUrl = `https://${hostname}/${serviceName}`; - const timeout = (0, deadline_1.getRelativeTimeout)(options.deadline); - if (timeout !== Infinity) { - if (timeout <= 0) { - this.cancelWithStatus(constants_1.Status.DEADLINE_EXCEEDED, 'Deadline exceeded'); - } - else { - setTimeout(() => { - this.cancelWithStatus(constants_1.Status.DEADLINE_EXCEEDED, 'Deadline exceeded'); - }, timeout); - } - } - this.filterStack = filterStackFactory.createFilter(); - } - cancelWithStatus(status, details) { - if (this.childCall) { - this.childCall.cancelWithStatus(status, details); - } - else { - this.pendingStatus = { - code: status, - details: details, - metadata: new metadata_1.Metadata() - }; - } - } - getPeer() { - var _a, _b; - return (_b = (_a = this.childCall) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : this.subchannel.getAddress(); - } - async start(metadata, listener) { - if (this.pendingStatus) { - listener.onReceiveStatus(this.pendingStatus); - return; - } - if (this.subchannel.getConnectivityState() !== connectivity_state_1.ConnectivityState.READY) { - listener.onReceiveStatus({ - code: constants_1.Status.UNAVAILABLE, - details: 'Subchannel not ready', - metadata: new metadata_1.Metadata() - }); - return; - } - const filteredMetadata = await this.filterStack.sendMetadata(Promise.resolve(metadata)); - let credsMetadata; - try { - credsMetadata = await this.subchannel.getCallCredentials() - .generateMetadata({ method_name: this.method, service_url: this.serviceUrl }); - } - catch (e) { - const error = e; - const { code, details } = (0, control_plane_status_1.restrictControlPlaneStatusCode)(typeof error.code === 'number' ? error.code : constants_1.Status.UNKNOWN, `Getting metadata from plugin failed with error: ${error.message}`); - listener.onReceiveStatus({ - code: code, - details: details, - metadata: new metadata_1.Metadata(), - }); - return; - } - credsMetadata.merge(filteredMetadata); - const childListener = { - onReceiveMetadata: async (metadata) => { - listener.onReceiveMetadata(await this.filterStack.receiveMetadata(metadata)); - }, - onReceiveMessage: async (message) => { - this.readFilterPending = true; - const filteredMessage = await this.filterStack.receiveMessage(message); - this.readFilterPending = false; - listener.onReceiveMessage(filteredMessage); - if (this.pendingStatus) { - listener.onReceiveStatus(this.pendingStatus); - } - }, - onReceiveStatus: async (status) => { - const filteredStatus = await this.filterStack.receiveTrailers(status); - if (this.readFilterPending) { - this.pendingStatus = filteredStatus; - } - else { - listener.onReceiveStatus(filteredStatus); - } - } - }; - this.childCall = this.subchannel.createCall(credsMetadata, this.options.host, this.method, childListener); - if (this.readPending) { - this.childCall.startRead(); - } - if (this.pendingMessage) { - this.childCall.sendMessageWithContext(this.pendingMessage.context, this.pendingMessage.message); - } - if (this.halfClosePending && !this.writeFilterPending) { - this.childCall.halfClose(); - } - } - async sendMessageWithContext(context, message) { - this.writeFilterPending = true; - const filteredMessage = await this.filterStack.sendMessage(Promise.resolve({ message: message, flags: context.flags })); - this.writeFilterPending = false; - if (this.childCall) { - this.childCall.sendMessageWithContext(context, filteredMessage.message); - if (this.halfClosePending) { - this.childCall.halfClose(); - } - } - else { - this.pendingMessage = { context, message: filteredMessage.message }; - } - } - startRead() { - if (this.childCall) { - this.childCall.startRead(); - } - else { - this.readPending = true; - } - } - halfClose() { - if (this.childCall && !this.writeFilterPending) { - this.childCall.halfClose(); - } - else { - this.halfClosePending = true; - } - } - getCallNumber() { - return this.callNumber; - } - setCredentials(credentials) { - throw new Error("Method not implemented."); - } - getAuthContext() { - if (this.childCall) { - return this.childCall.getAuthContext(); - } - else { - return null; - } - } -} -class SingleSubchannelChannel { - constructor(subchannel, target, options) { - this.subchannel = subchannel; - this.target = target; - this.channelzEnabled = false; - this.channelzTrace = new channelz_1.ChannelzTrace(); - this.callTracker = new channelz_1.ChannelzCallTracker(); - this.childrenTracker = new channelz_1.ChannelzChildrenTracker(); - this.channelzEnabled = options['grpc.enable_channelz'] !== 0; - this.channelzRef = (0, channelz_1.registerChannelzChannel)((0, uri_parser_1.uriToString)(target), () => ({ - target: `${(0, uri_parser_1.uriToString)(target)} (${subchannel.getAddress()})`, - state: this.subchannel.getConnectivityState(), - trace: this.channelzTrace, - callTracker: this.callTracker, - children: this.childrenTracker.getChildLists() - }), this.channelzEnabled); - if (this.channelzEnabled) { - this.childrenTracker.refChild(subchannel.getChannelzRef()); - } - this.filterStackFactory = new filter_stack_1.FilterStackFactory([new compression_filter_1.CompressionFilterFactory(this, options)]); - } - close() { - if (this.channelzEnabled) { - this.childrenTracker.unrefChild(this.subchannel.getChannelzRef()); - } - (0, channelz_1.unregisterChannelzRef)(this.channelzRef); - } - getTarget() { - return (0, uri_parser_1.uriToString)(this.target); - } - getConnectivityState(tryToConnect) { - throw new Error("Method not implemented."); - } - watchConnectivityState(currentState, deadline, callback) { - throw new Error("Method not implemented."); - } - getChannelzRef() { - return this.channelzRef; - } - createCall(method, deadline) { - const callOptions = { - deadline: deadline, - host: (0, resolver_1.getDefaultAuthority)(this.target), - flags: constants_1.Propagate.DEFAULTS, - parentCall: null - }; - return new SubchannelCallWrapper(this.subchannel, method, this.filterStackFactory, callOptions, (0, call_number_1.getNextCallNumber)()); - } -} -exports.SingleSubchannelChannel = SingleSubchannelChannel; -//# sourceMappingURL=single-subchannel-channel.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.js.map b/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.js.map deleted file mode 100644 index 8b39287..0000000 --- a/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"single-subchannel-channel.js","sourceRoot":"","sources":["../../src/single-subchannel-channel.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAKH,+CAAkD;AAGlD,yCAAqJ;AACrJ,6DAAgE;AAChE,6DAAyD;AACzD,2CAAgD;AAChD,iEAAwE;AACxE,yCAA0D;AAC1D,iDAAiE;AACjE,yCAAsC;AACtC,yCAAiD;AAGjD,6CAAmE;AAEnE,MAAM,qBAAqB;IAWzB,YAAoB,UAAsB,EAAU,MAAc,EAAE,kBAAsC,EAAU,OAA0B,EAAU,UAAkB;;QAAtJ,eAAU,GAAV,UAAU,CAAY;QAAU,WAAM,GAAN,MAAM,CAAQ;QAAkD,YAAO,GAAP,OAAO,CAAmB;QAAU,eAAU,GAAV,UAAU,CAAQ;QAVlK,cA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sB,CAAC,YAA+B,EAAE,QAAuB,EAAE,QAAiC;QAChH,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IACD,UAAU,CAAC,MAAc,EAAE,QAAkB;QAC3C,MAAM,WAAW,GAAsB;YACrC,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,IAAA,8BAAmB,EAAC,IAAI,CAAC,MAAM,CAAC;YACtC,KAAK,EAAE,qBAAS,CAAC,QAAQ;YACzB,UAAU,EAAE,IAAI;SACjB,CAAC;QACF,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,EAAE,IAAA,+BAAiB,GAAE,CAAC,CAAC;IACvH,CAAC;CACF;AAlDD,0DAkDC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/status-builder.d.ts b/node_modules/@grpc/grpc-js/build/src/status-builder.d.ts deleted file mode 100644 index 5628226..0000000 --- a/node_modules/@grpc/grpc-js/build/src/status-builder.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { StatusObject } from './call-interface'; -import { Status } from './constants'; -import { Metadata } from './metadata'; -/** - * A builder for gRPC status objects. - */ -export declare class StatusBuilder { - private code; - private details; - private metadata; - constructor(); - /** - * Adds a status code to the builder. - */ - withCode(code: Status): this; - /** - * Adds details to the builder. - */ - withDetails(details: string): this; - /** - * Adds metadata to the builder. - */ - withMetadata(metadata: Metadata): this; - /** - * Builds the status object. - */ - build(): Partial; -} diff --git a/node_modules/@grpc/grpc-js/build/src/status-builder.js b/node_modules/@grpc/grpc-js/build/src/status-builder.js deleted file mode 100644 index 7426e54..0000000 --- a/node_modules/@grpc/grpc-js/build/src/status-builder.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.StatusBuilder = void 0; -/** - * A builder for gRPC status objects. - */ -class StatusBuilder { - constructor() { - this.code = null; - this.details = null; - this.metadata = null; - } - /** - * Adds a status code to the builder. - */ - withCode(code) { - this.code = code; - return this; - } - /** - * Adds details to the builder. - */ - withDetails(details) { - this.details = details; - return this; - } - /** - * Adds metadata to the builder. - */ - withMetadata(metadata) { - this.metadata = metadata; - return this; - } - /** - * Builds the status object. - */ - build() { - const status = {}; - if (this.code !== null) { - status.code = this.code; - } - if (this.details !== null) { - status.details = this.details; - } - if (this.metadata !== null) { - status.metadata = this.metadata; - } - return status; - } -} -exports.StatusBuilder = StatusBuilder; -//# sourceMappingURL=status-builder.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/status-builder.js.map b/node_modules/@grpc/grpc-js/build/src/status-builder.js.map deleted file mode 100644 index 33277b2..0000000 --- a/node_modules/@grpc/grpc-js/build/src/status-builder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"status-builder.js","sourceRoot":"","sources":["../../src/status-builder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAMH;;GAEG;AACH,MAAa,aAAa;IAKxB;QACE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,IAAY;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,OAAe;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,QAAkB;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,KAAK;QACH,MAAM,MAAM,GAA0B,EAAE,CAAC;QAEzC,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YACvB,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAC1B,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;YAC1B,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAChC,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;YAC3B,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAClC,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAvDD,sCAuDC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/stream-decoder.d.ts b/node_modules/@grpc/grpc-js/build/src/stream-decoder.d.ts deleted file mode 100644 index 7ff04f3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/stream-decoder.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export declare class StreamDecoder { - private maxReadMessageLength; - private readState; - private readCompressFlag; - private readPartialSize; - private readSizeRemaining; - private readMessageSize; - private readPartialMessage; - private readMessageRemaining; - constructor(maxReadMessageLength: number); - write(data: Buffer): Buffer[]; -} diff --git a/node_modules/@grpc/grpc-js/build/src/stream-decoder.js b/node_modules/@grpc/grpc-js/build/src/stream-decoder.js deleted file mode 100644 index b3857c0..0000000 --- a/node_modules/@grpc/grpc-js/build/src/stream-decoder.js +++ /dev/null @@ -1,100 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.StreamDecoder = void 0; -var ReadState; -(function (ReadState) { - ReadState[ReadState["NO_DATA"] = 0] = "NO_DATA"; - ReadState[ReadState["READING_SIZE"] = 1] = "READING_SIZE"; - ReadState[ReadState["READING_MESSAGE"] = 2] = "READING_MESSAGE"; -})(ReadState || (ReadState = {})); -class StreamDecoder { - constructor(maxReadMessageLength) { - this.maxReadMessageLength = maxReadMessageLength; - this.readState = ReadState.NO_DATA; - this.readCompressFlag = Buffer.alloc(1); - this.readPartialSize = Buffer.alloc(4); - this.readSizeRemaining = 4; - this.readMessageSize = 0; - this.readPartialMessage = []; - this.readMessageRemaining = 0; - } - write(data) { - let readHead = 0; - let toRead; - const result = []; - while (readHead < data.length) { - switch (this.readState) { - case ReadState.NO_DATA: - this.readCompressFlag = data.slice(readHead, readHead + 1); - readHead += 1; - this.readState = ReadState.READING_SIZE; - this.readPartialSize.fill(0); - this.readSizeRemaining = 4; - this.readMessageSize = 0; - this.readMessageRemaining = 0; - this.readPartialMessage = []; - break; - case ReadState.READING_SIZE: - toRead = Math.min(data.length - readHead, this.readSizeRemaining); - data.copy(this.readPartialSize, 4 - this.readSizeRemaining, readHead, readHead + toRead); - this.readSizeRemaining -= toRead; - readHead += toRead; - // readSizeRemaining >=0 here - if (this.readSizeRemaining === 0) { - this.readMessageSize = this.readPartialSize.readUInt32BE(0); - if (this.maxReadMessageLength !== -1 && this.readMessageSize > this.maxReadMessageLength) { - throw new Error(`Received message larger than max (${this.readMessageSize} vs ${this.maxReadMessageLength})`); - } - this.readMessageRemaining = this.readMessageSize; - if (this.readMessageRemaining > 0) { - this.readState = ReadState.READING_MESSAGE; - } - else { - const message = Buffer.concat([this.readCompressFlag, this.readPartialSize], 5); - this.readState = ReadState.NO_DATA; - result.push(message); - } - } - break; - case ReadState.READING_MESSAGE: - toRead = Math.min(data.length - readHead, this.readMessageRemaining); - this.readPartialMessage.push(data.slice(readHead, readHead + toRead)); - this.readMessageRemaining -= toRead; - readHead += toRead; - // readMessageRemaining >=0 here - if (this.readMessageRemaining === 0) { - // At this point, we have read a full message - const framedMessageBuffers = [ - this.readCompressFlag, - this.readPartialSize, - ].concat(this.readPartialMessage); - const framedMessage = Buffer.concat(framedMessageBuffers, this.readMessageSize + 5); - this.readState = ReadState.NO_DATA; - result.push(framedMessage); - } - break; - default: - throw new Error('Unexpected read state'); - } - } - return result; - } -} -exports.StreamDecoder = StreamDecoder; -//# sourceMappingURL=stream-decoder.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/stream-decoder.js.map b/node_modules/@grpc/grpc-js/build/src/stream-decoder.js.map deleted file mode 100644 index fc6498a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/stream-decoder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stream-decoder.js","sourceRoot":"","sources":["../../src/stream-decoder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,IAAK,SAIJ;AAJD,WAAK,SAAS;IACZ,+CAAO,CAAA;IACP,yDAAY,CAAA;IACZ,+DAAe,CAAA;AACjB,CAAC,EAJI,SAAS,KAAT,SAAS,QAIb;AAED,MAAa,aAAa;IASxB,YAAoB,oBAA4B;QAA5B,yBAAoB,GAApB,oBAAoB,CAAQ;QARxC,cAAS,GAAc,SAAS,CAAC,OAAO,CAAC;QACzC,qBAAgB,GAAW,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3C,oBAAe,GAAW,MAAM,CAAC,KAAK,CAAC,CAAC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BAAoB,KAAK,CAAC,EAAE,CAAC;wBACpC,6CAA6C;wBAC7C,MAAM,oBAAoB,GAAG;4BAC3B,IAAI,CAAC,gBAAgB;4BACrB,IAAI,CAAC,eAAe;yBACrB,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;wBAClC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CACjC,oBAAoB,EACpB,IAAI,CAAC,eAAe,GAAG,CAAC,CACzB,CAAC;wBAEF,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC;wBACnC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;oBAC7B,CAAC;oBACD,MAAM;gBACR;oBACE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAtFD,sCAsFC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel-address.d.ts b/node_modules/@grpc/grpc-js/build/src/subchannel-address.d.ts deleted file mode 100644 index f403563..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel-address.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -export interface TcpSubchannelAddress { - port: number; - host: string; -} -export interface IpcSubchannelAddress { - path: string; -} -/** - * This represents a single backend address to connect to. This interface is a - * subset of net.SocketConnectOpts, i.e. the options described at - * https://nodejs.org/api/net.html#net_socket_connect_options_connectlistener. - * Those are in turn a subset of the options that can be passed to http2.connect. - */ -export type SubchannelAddress = TcpSubchannelAddress | IpcSubchannelAddress; -export declare function isTcpSubchannelAddress(address: SubchannelAddress): address is TcpSubchannelAddress; -export declare function subchannelAddressEqual(address1?: SubchannelAddress, address2?: SubchannelAddress): boolean; -export declare function subchannelAddressToString(address: SubchannelAddress): string; -export declare function stringToSubchannelAddress(addressString: string, port?: number): SubchannelAddress; -export interface Endpoint { - addresses: SubchannelAddress[]; -} -export declare function endpointEqual(endpoint1: Endpoint, endpoint2: Endpoint): boolean; -export declare function endpointToString(endpoint: Endpoint): string; -export declare function endpointHasAddress(endpoint: Endpoint, expectedAddress: SubchannelAddress): boolean; -export declare class EndpointMap { - private map; - get size(): number; - getForSubchannelAddress(address: SubchannelAddress): ValueType | undefined; - /** - * Delete any entries in this map with keys that are not in endpoints - * @param endpoints - */ - deleteMissing(endpoints: Endpoint[]): ValueType[]; - get(endpoint: Endpoint): ValueType | undefined; - set(endpoint: Endpoint, mapEntry: ValueType): void; - delete(endpoint: Endpoint): void; - has(endpoint: Endpoint): boolean; - clear(): void; - keys(): IterableIterator; - values(): IterableIterator; - entries(): IterableIterator<[Endpoint, ValueType]>; -} diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel-address.js b/node_modules/@grpc/grpc-js/build/src/subchannel-address.js deleted file mode 100644 index d48d0c2..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel-address.js +++ /dev/null @@ -1,202 +0,0 @@ -"use strict"; -/* - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EndpointMap = void 0; -exports.isTcpSubchannelAddress = isTcpSubchannelAddress; -exports.subchannelAddressEqual = subchannelAddressEqual; -exports.subchannelAddressToString = subchannelAddressToString; -exports.stringToSubchannelAddress = stringToSubchannelAddress; -exports.endpointEqual = endpointEqual; -exports.endpointToString = endpointToString; -exports.endpointHasAddress = endpointHasAddress; -const net_1 = require("net"); -function isTcpSubchannelAddress(address) { - return 'port' in address; -} -function subchannelAddressEqual(address1, address2) { - if (!address1 && !address2) { - return true; - } - if (!address1 || !address2) { - return false; - } - if (isTcpSubchannelAddress(address1)) { - return (isTcpSubchannelAddress(address2) && - address1.host === address2.host && - address1.port === address2.port); - } - else { - return !isTcpSubchannelAddress(address2) && address1.path === address2.path; - } -} -function subchannelAddressToString(address) { - if (isTcpSubchannelAddress(address)) { - if ((0, net_1.isIPv6)(address.host)) { - return '[' + address.host + ']:' + address.port; - } - else { - return address.host + ':' + address.port; - } - } - else { - return address.path; - } -} -const DEFAULT_PORT = 443; -function stringToSubchannelAddress(addressString, port) { - if ((0, net_1.isIP)(addressString)) { - return { - host: addressString, - port: port !== null && port !== void 0 ? port : DEFAULT_PORT, - }; - } - else { - return { - path: addressString, - }; - } -} -function endpointEqual(endpoint1, endpoint2) { - if (endpoint1.addresses.length !== endpoint2.addresses.length) { - return false; - } - for (let i = 0; i < endpoint1.addresses.length; i++) { - if (!subchannelAddressEqual(endpoint1.addresses[i], endpoint2.addresses[i])) { - return false; - } - } - return true; -} -function endpointToString(endpoint) { - return ('[' + endpoint.addresses.map(subchannelAddressToString).join(', ') + ']'); -} -function endpointHasAddress(endpoint, expectedAddress) { - for (const address of endpoint.addresses) { - if (subchannelAddressEqual(address, expectedAddress)) { - return true; - } - } - return false; -} -function endpointEqualUnordered(endpoint1, endpoint2) { - if (endpoint1.addresses.length !== endpoint2.addresses.length) { - return false; - } - for (const address1 of endpoint1.addresses) { - let matchFound = false; - for (const address2 of endpoint2.addresses) { - if (subchannelAddressEqual(address1, address2)) { - matchFound = true; - break; - } - } - if (!matchFound) { - return false; - } - } - return true; -} -class EndpointMap { - constructor() { - this.map = new Set(); - } - get size() { - return this.map.size; - } - getForSubchannelAddress(address) { - for (const entry of this.map) { - if (endpointHasAddress(entry.key, address)) { - return entry.value; - } - } - return undefined; - } - /** - * Delete any entries in this map with keys that are not in endpoints - * @param endpoints - */ - deleteMissing(endpoints) { - const removedValues = []; - for (const entry of this.map) { - let foundEntry = false; - for (const endpoint of endpoints) { - if (endpointEqualUnordered(endpoint, entry.key)) { - foundEntry = true; - } - } - if (!foundEntry) { - removedValues.push(entry.value); - this.map.delete(entry); - } - } - return removedValues; - } - get(endpoint) { - for (const entry of this.map) { - if (endpointEqualUnordered(endpoint, entry.key)) { - return entry.value; - } - } - return undefined; - } - set(endpoint, mapEntry) { - for (const entry of this.map) { - if (endpointEqualUnordered(endpoint, entry.key)) { - entry.value = mapEntry; - return; - } - } - this.map.add({ key: endpoint, value: mapEntry }); - } - delete(endpoint) { - for (const entry of this.map) { - if (endpointEqualUnordered(endpoint, entry.key)) { - this.map.delete(entry); - return; - } - } - } - has(endpoint) { - for (const entry of this.map) { - if (endpointEqualUnordered(endpoint, entry.key)) { - return true; - } - } - return false; - } - clear() { - this.map.clear(); - } - *keys() { - for (const entry of this.map) { - yield entry.key; - } - } - *values() { - for (const entry of this.map) { - yield entry.value; - } - } - *entries() { - for (const entry of this.map) { - yield [entry.key, entry.value]; - } - } -} -exports.EndpointMap = EndpointMap; -//# sourceMappingURL=subchannel-address.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel-address.js.map b/node_modules/@grpc/grpc-js/build/src/subchannel-address.js.map deleted file mode 100644 index 8dd5aed..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel-address.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subchannel-address.js","sourceRoot":"","sources":["../../src/subchannel-address.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAqBH,wDAIC;AAED,wDAmBC;AAED,8DAUC;AAID,8DAcC;AAMD,sCAYC;AAED,4CAIC;AAED,gDAUC;AA9GD,6BAAmC;AAmBnC,SAAgB,sBAAsB,CACpC,OAA0B;IAE1B,OAAO,MAAM,IAAI,OAAO,CAAC;AAC3B,CAAC;AAED,SAAgB,sBAAsB,CACpC,QAA4B,EAC5B,QAA4B;IAE5B,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,C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AK,MAAM,KAAK,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YAC7B,MAAM,KAAK,CAAC,GAAG,CAAC;QAClB,CAAC;IACH,CAAC;IAED,CAAC,MAAM;QACL,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YAC7B,MAAM,KAAK,CAAC,KAAK,CAAC;QACpB,CAAC;IACH,CAAC;IAED,CAAC,OAAO;QACN,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YAC7B,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;CACF;AA/FD,kCA+FC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel-call.d.ts b/node_modules/@grpc/grpc-js/build/src/subchannel-call.d.ts deleted file mode 100644 index 3f534c9..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel-call.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import * as http2 from 'http2'; -import { Status } from './constants'; -import { InterceptingListener, MessageContext, StatusObject } from './call-interface'; -import { CallEventTracker, Transport } from './transport'; -import { AuthContext } from './auth-context'; -export interface SubchannelCall { - cancelWithStatus(status: Status, details: string): void; - getPeer(): string; - sendMessageWithContext(context: MessageContext, message: Buffer): void; - startRead(): void; - halfClose(): void; - getCallNumber(): number; - getDeadlineInfo(): string[]; - getAuthContext(): AuthContext; -} -export interface StatusObjectWithRstCode extends StatusObject { - rstCode?: number; -} -export interface SubchannelCallInterceptingListener extends InterceptingListener { - onReceiveStatus(status: StatusObjectWithRstCode): void; -} -export declare class Http2SubchannelCall implements SubchannelCall { - private readonly http2Stream; - private readonly callEventTracker; - private readonly listener; - private readonly transport; - private readonly callId; - private decoder; - private isReadFilterPending; - private isPushPending; - private canPush; - /** - * Indicates that an 'end' event has come from the http2 stream, so there - * will be no more data events. - */ - private readsClosed; - private statusOutput; - private unpushedReadMessages; - private httpStatusCode; - private finalStatus; - private internalError; - private serverEndedCall; - private connectionDropped; - constructor(http2Stream: http2.ClientHttp2Stream, callEventTracker: CallEventTracker, listener: SubchannelCallInterceptingListener, transport: Transport, callId: number); - getDeadlineInfo(): string[]; - onDisconnect(): void; - private outputStatus; - private trace; - /** - * On first call, emits a 'status' event with the given StatusObject. - * Subsequent calls are no-ops. - * @param status The status of the call. - */ - private endCall; - private maybeOutputStatus; - private push; - private tryPush; - private handleTrailers; - private destroyHttp2Stream; - cancelWithStatus(status: Status, details: string): void; - getStatus(): StatusObject | null; - getPeer(): string; - getCallNumber(): number; - getAuthContext(): AuthContext; - startRead(): void; - sendMessageWithContext(context: MessageContext, message: Buffer): void; - halfClose(): void; -} diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel-call.js b/node_modules/@grpc/grpc-js/build/src/subchannel-call.js deleted file mode 100644 index e448ad3..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel-call.js +++ /dev/null @@ -1,545 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Http2SubchannelCall = void 0; -const http2 = require("http2"); -const os = require("os"); -const constants_1 = require("./constants"); -const metadata_1 = require("./metadata"); -const stream_decoder_1 = require("./stream-decoder"); -const logging = require("./logging"); -const constants_2 = require("./constants"); -const TRACER_NAME = 'subchannel_call'; -/** - * Should do approximately the same thing as util.getSystemErrorName but the - * TypeScript types don't have that function for some reason so I just made my - * own. - * @param errno - */ -function getSystemErrorName(errno) { - for (const [name, num] of Object.entries(os.constants.errno)) { - if (num === errno) { - return name; - } - } - return 'Unknown system error ' + errno; -} -function mapHttpStatusCode(code) { - const details = `Received HTTP status code ${code}`; - let mappedStatusCode; - switch (code) { - // TODO(murgatroid99): handle 100 and 101 - case 400: - mappedStatusCode = constants_1.Status.INTERNAL; - break; - case 401: - mappedStatusCode = constants_1.Status.UNAUTHENTICATED; - break; - case 403: - mappedStatusCode = constants_1.Status.PERMISSION_DENIED; - break; - case 404: - mappedStatusCode = constants_1.Status.UNIMPLEMENTED; - break; - case 429: - case 502: - case 503: - case 504: - mappedStatusCode = constants_1.Status.UNAVAILABLE; - break; - default: - mappedStatusCode = constants_1.Status.UNKNOWN; - } - return { - code: mappedStatusCode, - details: details, - metadata: new metadata_1.Metadata() - }; -} -class Http2SubchannelCall { - constructor(http2Stream, callEventTracker, listener, transport, callId) { - var _a; - this.http2Stream = http2Stream; - this.callEventTracker = callEventTracker; - this.listener = listener; - this.transport = transport; - this.callId = callId; - this.isReadFilterPending = false; - this.isPushPending = false; - this.canPush = false; - /** - * Indicates that an 'end' event has come from the http2 stream, so there - * will be no more data events. - */ - this.readsClosed = false; - this.statusOutput = false; - this.unpushedReadMessages = []; - // This is populated (non-null) if and only if the call has ended - this.finalStatus = null; - this.internalError = null; - this.serverEndedCall = false; - this.connectionDropped = false; - const maxReceiveMessageLength = (_a = transport.getOptions()['grpc.max_receive_message_length']) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH; - this.decoder = new stream_decoder_1.StreamDecoder(maxReceiveMessageLength); - http2Stream.on('response', (headers, flags) => { - let headersString = ''; - for (const header of Object.keys(headers)) { - headersString += '\t\t' + header + ': ' + headers[header] + '\n'; - } - this.trace('Received server headers:\n' + headersString); - this.httpStatusCode = headers[':status']; - if (flags & http2.constants.NGHTTP2_FLAG_END_STREAM) { - this.handleTrailers(headers); - } - else { - let metadata; - try { - metadata = metadata_1.Metadata.fromHttp2Headers(headers); - } - catch (error) { - this.endCall({ - code: constants_1.Status.UNKNOWN, - details: error.message, - metadata: new metadata_1.Metadata(), - }); - return; - } - this.listener.onReceiveMetadata(metadata); - } - }); - http2Stream.on('trailers', (headers) => { - this.handleTrailers(headers); - }); - http2Stream.on('data', (data) => { - /* If the status has already been output, allow the http2 stream to - * drain without processing the data. */ - if (this.statusOutput) { - return; - } - this.trace('receive HTTP/2 data frame of length ' + data.length); - let messages; - try { - messages = this.decoder.write(data); - } - catch (e) { - /* Some servers send HTML error pages along with HTTP status codes. - * When the client attempts to parse this as a length-delimited - * message, the parsed message size is greater than the default limit, - * resulting in a message decoding error. In that situation, the HTTP - * error code information is more useful to the user than the - * RESOURCE_EXHAUSTED error is, so we report that instead. Normally, - * we delay processing the HTTP status until after the stream ends, to - * prioritize reporting the gRPC status from trailers if it is present, - * but when there is a message parsing error we end the stream early - * before processing trailers. */ - if (this.httpStatusCode !== undefined && this.httpStatusCode !== 200) { - const mappedStatus = mapHttpStatusCode(this.httpStatusCode); - this.cancelWithStatus(mappedStatus.code, mappedStatus.details); - } - else { - this.cancelWithStatus(constants_1.Status.RESOURCE_EXHAUSTED, e.message); - } - return; - } - for (const message of messages) { - this.trace('parsed message of length ' + message.length); - this.callEventTracker.addMessageReceived(); - this.tryPush(message); - } - }); - http2Stream.on('end', () => { - this.readsClosed = true; - this.maybeOutputStatus(); - }); - http2Stream.on('close', () => { - this.serverEndedCall = true; - /* Use process.next tick to ensure that this code happens after any - * "error" event that may be emitted at about the same time, so that - * we can bubble up the error message from that event. */ - process.nextTick(() => { - var _a; - this.trace('HTTP/2 stream closed with code ' + http2Stream.rstCode); - /* If we have a final status with an OK status code, that means that - * we have received all of the messages and we have processed the - * trailers and the call completed successfully, so it doesn't matter - * how the stream ends after that */ - if (((_a = this.finalStatus) === null || _a === void 0 ? void 0 : _a.code) === constants_1.Status.OK) { - return; - } - let code; - let details = ''; - switch (http2Stream.rstCode) { - case http2.constants.NGHTTP2_NO_ERROR: - /* If we get a NO_ERROR code and we already have a status, the - * stream completed properly and we just haven't fully processed - * it yet */ - if (this.finalStatus !== null) { - return; - } - if (this.httpStatusCode && this.httpStatusCode !== 200) { - const mappedStatus = mapHttpStatusCode(this.httpStatusCode); - code = mappedStatus.code; - details = mappedStatus.details; - } - else { - code = constants_1.Status.INTERNAL; - details = `Received RST_STREAM with code ${http2Stream.rstCode} (Call ended without gRPC status)`; - } - break; - case http2.constants.NGHTTP2_REFUSED_STREAM: - code = constants_1.Status.UNAVAILABLE; - details = 'Stream refused by server'; - break; - case http2.constants.NGHTTP2_CANCEL: - /* Bug reports indicate that Node synthesizes a NGHTTP2_CANCEL - * code from connection drops. We want to prioritize reporting - * an unavailable status when that happens. */ - if (this.connectionDropped) { - code = constants_1.Status.UNAVAILABLE; - details = 'Connection dropped'; - } - else { - code = constants_1.Status.CANCELLED; - details = 'Call cancelled'; - } - break; - case http2.constants.NGHTTP2_ENHANCE_YOUR_CALM: - code = constants_1.Status.RESOURCE_EXHAUSTED; - details = 'Bandwidth exhausted or memory limit exceeded'; - break; - case http2.constants.NGHTTP2_INADEQUATE_SECURITY: - code = constants_1.Status.PERMISSION_DENIED; - details = 'Protocol not secure enough'; - break; - case http2.constants.NGHTTP2_INTERNAL_ERROR: - code = constants_1.Status.INTERNAL; - if (this.internalError === null) { - /* This error code was previously handled in the default case, and - * there are several instances of it online, so I wanted to - * preserve the original error message so that people find existing - * information in searches, but also include the more recognizable - * "Internal server error" message. */ - details = `Received RST_STREAM with code ${http2Stream.rstCode} (Internal server error)`; - } - else { - if (this.internalError.code === 'ECONNRESET' || - this.internalError.code === 'ETIMEDOUT') { - code = constants_1.Status.UNAVAILABLE; - details = this.internalError.message; - } - else { - /* The "Received RST_STREAM with code ..." error is preserved - * here for continuity with errors reported online, but the - * error message at the end will probably be more relevant in - * most cases. */ - details = `Received RST_STREAM with code ${http2Stream.rstCode} triggered by internal client error: ${this.internalError.message}`; - } - } - break; - default: - code = constants_1.Status.INTERNAL; - details = `Received RST_STREAM with code ${http2Stream.rstCode}`; - } - // This is a no-op if trailers were received at all. - // This is OK, because status codes emitted here correspond to more - // catastrophic issues that prevent us from receiving trailers in the - // first place. - this.endCall({ - code, - details, - metadata: new metadata_1.Metadata(), - rstCode: http2Stream.rstCode, - }); - }); - }); - http2Stream.on('error', (err) => { - /* We need an error handler here to stop "Uncaught Error" exceptions - * from bubbling up. However, errors here should all correspond to - * "close" events, where we will handle the error more granularly */ - /* Specifically looking for stream errors that were *not* constructed - * from a RST_STREAM response here: - * https://github.com/nodejs/node/blob/8b8620d580314050175983402dfddf2674e8e22a/lib/internal/http2/core.js#L2267 - */ - if (err.code !== 'ERR_HTTP2_STREAM_ERROR') { - this.trace('Node error event: message=' + - err.message + - ' code=' + - err.code + - ' errno=' + - getSystemErrorName(err.errno) + - ' syscall=' + - err.syscall); - this.internalError = err; - } - this.callEventTracker.onStreamEnd(false); - }); - } - getDeadlineInfo() { - return [`remote_addr=${this.getPeer()}`]; - } - onDisconnect() { - this.connectionDropped = true; - /* Give the call an event loop cycle to finish naturally before reporting - * the disconnection as an error. */ - setImmediate(() => { - this.endCall({ - code: constants_1.Status.UNAVAILABLE, - details: 'Connection dropped', - metadata: new metadata_1.Metadata(), - }); - }); - } - outputStatus() { - /* Precondition: this.finalStatus !== null */ - if (!this.statusOutput) { - this.statusOutput = true; - this.trace('ended with status: code=' + - this.finalStatus.code + - ' details="' + - this.finalStatus.details + - '"'); - this.callEventTracker.onCallEnd(this.finalStatus); - /* We delay the actual action of bubbling up the status to insulate the - * cleanup code in this class from any errors that may be thrown in the - * upper layers as a result of bubbling up the status. In particular, - * if the status is not OK, the "error" event may be emitted - * synchronously at the top level, which will result in a thrown error if - * the user does not handle that event. */ - process.nextTick(() => { - this.listener.onReceiveStatus(this.finalStatus); - }); - /* Leave the http2 stream in flowing state to drain incoming messages, to - * ensure that the stream closure completes. The call stream already does - * not push more messages after the status is output, so the messages go - * nowhere either way. */ - this.http2Stream.resume(); - } - } - trace(text) { - logging.trace(constants_2.LogVerbosity.DEBUG, TRACER_NAME, '[' + this.callId + '] ' + text); - } - /** - * On first call, emits a 'status' event with the given StatusObject. - * Subsequent calls are no-ops. - * @param status The status of the call. - */ - endCall(status) { - /* If the status is OK and a new status comes in (e.g. from a - * deserialization failure), that new status takes priority */ - if (this.finalStatus === null || this.finalStatus.code === constants_1.Status.OK) { - this.finalStatus = status; - this.maybeOutputStatus(); - } - this.destroyHttp2Stream(); - } - maybeOutputStatus() { - if (this.finalStatus !== null) { - /* The combination check of readsClosed and that the two message buffer - * arrays are empty checks that there all incoming data has been fully - * processed */ - if (this.finalStatus.code !== constants_1.Status.OK || - (this.readsClosed && - this.unpushedReadMessages.length === 0 && - !this.isReadFilterPending && - !this.isPushPending)) { - this.outputStatus(); - } - } - } - push(message) { - this.trace('pushing to reader message of length ' + - (message instanceof Buffer ? message.length : null)); - this.canPush = false; - this.isPushPending = true; - process.nextTick(() => { - this.isPushPending = false; - /* If we have already output the status any later messages should be - * ignored, and can cause out-of-order operation errors higher up in the - * stack. Checking as late as possible here to avoid any race conditions. - */ - if (this.statusOutput) { - return; - } - this.listener.onReceiveMessage(message); - this.maybeOutputStatus(); - }); - } - tryPush(messageBytes) { - if (this.canPush) { - this.http2Stream.pause(); - this.push(messageBytes); - } - else { - this.trace('unpushedReadMessages.push message of length ' + messageBytes.length); - this.unpushedReadMessages.push(messageBytes); - } - } - handleTrailers(headers) { - this.serverEndedCall = true; - this.callEventTracker.onStreamEnd(true); - let headersString = ''; - for (const header of Object.keys(headers)) { - headersString += '\t\t' + header + ': ' + headers[header] + '\n'; - } - this.trace('Received server trailers:\n' + headersString); - let metadata; - try { - metadata = metadata_1.Metadata.fromHttp2Headers(headers); - } - catch (e) { - metadata = new metadata_1.Metadata(); - } - const metadataMap = metadata.getMap(); - let status; - if (typeof metadataMap['grpc-status'] === 'string') { - const receivedStatus = Number(metadataMap['grpc-status']); - this.trace('received status code ' + receivedStatus + ' from server'); - metadata.remove('grpc-status'); - let details = ''; - if (typeof metadataMap['grpc-message'] === 'string') { - try { - details = decodeURI(metadataMap['grpc-message']); - } - catch (e) { - details = metadataMap['grpc-message']; - } - metadata.remove('grpc-message'); - this.trace('received status details string "' + details + '" from server'); - } - status = { - code: receivedStatus, - details: details, - metadata: metadata - }; - } - else if (this.httpStatusCode) { - status = mapHttpStatusCode(this.httpStatusCode); - status.metadata = metadata; - } - else { - status = { - code: constants_1.Status.UNKNOWN, - details: 'No status information received', - metadata: metadata - }; - } - // This is a no-op if the call was already ended when handling headers. - this.endCall(status); - } - destroyHttp2Stream() { - var _a; - // The http2 stream could already have been destroyed if cancelWithStatus - // is called in response to an internal http2 error. - if (this.http2Stream.destroyed) { - return; - } - /* If the server ended the call, sending an RST_STREAM is redundant, so we - * just half close on the client side instead to finish closing the stream. - */ - if (this.serverEndedCall) { - this.http2Stream.end(); - } - else { - /* If the call has ended with an OK status, communicate that when closing - * the stream, partly to avoid a situation in which we detect an error - * RST_STREAM as a result after we have the status */ - let code; - if (((_a = this.finalStatus) === null || _a === void 0 ? void 0 : _a.code) === constants_1.Status.OK) { - code = http2.constants.NGHTTP2_NO_ERROR; - } - else { - code = http2.constants.NGHTTP2_CANCEL; - } - this.trace('close http2 stream with code ' + code); - this.http2Stream.close(code); - } - } - cancelWithStatus(status, details) { - this.trace('cancelWithStatus code: ' + status + ' details: "' + details + '"'); - this.endCall({ code: status, details, metadata: new metadata_1.Metadata() }); - } - getStatus() { - return this.finalStatus; - } - getPeer() { - return this.transport.getPeerName(); - } - getCallNumber() { - return this.callId; - } - getAuthContext() { - return this.transport.getAuthContext(); - } - startRead() { - /* If the stream has ended with an error, we should not emit any more - * messages and we should communicate that the stream has ended */ - if (this.finalStatus !== null && this.finalStatus.code !== constants_1.Status.OK) { - this.readsClosed = true; - this.maybeOutputStatus(); - return; - } - this.canPush = true; - if (this.unpushedReadMessages.length > 0) { - const nextMessage = this.unpushedReadMessages.shift(); - this.push(nextMessage); - return; - } - /* Only resume reading from the http2Stream if we don't have any pending - * messages to emit */ - this.http2Stream.resume(); - } - sendMessageWithContext(context, message) { - this.trace('write() called with message of length ' + message.length); - const cb = (error) => { - /* nextTick here ensures that no stream action can be taken in the call - * stack of the write callback, in order to hopefully work around - * https://github.com/nodejs/node/issues/49147 */ - process.nextTick(() => { - var _a; - let code = constants_1.Status.UNAVAILABLE; - if ((error === null || error === void 0 ? void 0 : error.code) === - 'ERR_STREAM_WRITE_AFTER_END') { - code = constants_1.Status.INTERNAL; - } - if (error) { - this.cancelWithStatus(code, `Write error: ${error.message}`); - } - (_a = context.callback) === null || _a === void 0 ? void 0 : _a.call(context); - }); - }; - this.trace('sending data chunk of length ' + message.length); - this.callEventTracker.addMessageSent(); - try { - this.http2Stream.write(message, cb); - } - catch (error) { - this.endCall({ - code: constants_1.Status.UNAVAILABLE, - details: `Write failed with error ${error.message}`, - metadata: new metadata_1.Metadata(), - }); - } - } - halfClose() { - this.trace('end() called'); - this.trace('calling end() on HTTP/2 stream'); - this.http2Stream.end(); - } -} -exports.Http2SubchannelCall = Http2SubchannelCall; -//# sourceMappingURL=subchannel-call.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel-call.js.map b/node_modules/@grpc/grpc-js/build/src/subchannel-call.js.map deleted file mode 100644 index 2c2e09f..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel-call.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subchannel-call.js","sourceRoot":"","sources":["../../src/subchannel-call.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,+BAA+B;AAC/B,yBAAyB;AAEzB,2CAAyE;AACzE,yCAAsC;AACtC,qDAAiD;AACjD,qCAAqC;AACrC,2CAA2C;AAU3C,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAiBtC;;;;;GAKG;AACH,SAAS,kBAAkB,CAAC,KAAa;IACvC,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EA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OAAO,EAAE,2BAA4B,KAAe,CAAC,OAAO,EAAE;gBAC9D,QAAQ,EAAE,IAAI,mBAAQ,EAAE;aACzB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,SAAS;QACP,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAC7C,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;IACzB,CAAC;CACF;AAtfD,kDAsfC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel-interface.d.ts b/node_modules/@grpc/grpc-js/build/src/subchannel-interface.d.ts deleted file mode 100644 index 7b1eb81..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel-interface.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { CallCredentials } from './call-credentials'; -import { Channel } from './channel'; -import type { SubchannelRef } from './channelz'; -import { ConnectivityState } from './connectivity-state'; -import { Subchannel } from './subchannel'; -export type ConnectivityStateListener = (subchannel: SubchannelInterface, previousState: ConnectivityState, newState: ConnectivityState, keepaliveTime: number, errorMessage?: string) => void; -export type HealthListener = (healthy: boolean) => void; -export interface DataWatcher { - setSubchannel(subchannel: Subchannel): void; - destroy(): void; -} -/** - * This is an interface for load balancing policies to use to interact with - * subchannels. This allows load balancing policies to wrap and unwrap - * subchannels. - * - * Any load balancing policy that wraps subchannels must unwrap the subchannel - * in the picker, so that other load balancing policies consistently have - * access to their own wrapper objects. - */ -export interface SubchannelInterface { - getConnectivityState(): ConnectivityState; - addConnectivityStateListener(listener: ConnectivityStateListener): void; - removeConnectivityStateListener(listener: ConnectivityStateListener): void; - startConnecting(): void; - getAddress(): string; - throttleKeepalive(newKeepaliveTime: number): void; - ref(): void; - unref(): void; - getChannelzRef(): SubchannelRef; - isHealthy(): boolean; - addHealthStateWatcher(listener: HealthListener): void; - removeHealthStateWatcher(listener: HealthListener): void; - addDataWatcher(dataWatcher: DataWatcher): void; - /** - * If this is a wrapper, return the wrapped subchannel, otherwise return this - */ - getRealSubchannel(): Subchannel; - /** - * Returns true if this and other both proxy the same underlying subchannel. - * Can be used instead of directly accessing getRealSubchannel to allow mocks - * to avoid implementing getRealSubchannel - */ - realSubchannelEquals(other: SubchannelInterface): boolean; - /** - * Get the call credentials associated with the channel credentials for this - * subchannel. - */ - getCallCredentials(): CallCredentials; - /** - * Get a channel that can be used to make requests with just this - */ - getChannel(): Channel; -} -export declare abstract class BaseSubchannelWrapper implements SubchannelInterface { - protected child: SubchannelInterface; - private healthy; - private healthListeners; - private refcount; - private dataWatchers; - constructor(child: SubchannelInterface); - private updateHealthListeners; - getConnectivityState(): ConnectivityState; - addConnectivityStateListener(listener: ConnectivityStateListener): void; - removeConnectivityStateListener(listener: ConnectivityStateListener): void; - startConnecting(): void; - getAddress(): string; - throttleKeepalive(newKeepaliveTime: number): void; - ref(): void; - unref(): void; - protected destroy(): void; - getChannelzRef(): SubchannelRef; - isHealthy(): boolean; - addHealthStateWatcher(listener: HealthListener): void; - removeHealthStateWatcher(listener: HealthListener): void; - addDataWatcher(dataWatcher: DataWatcher): void; - protected setHealthy(healthy: boolean): void; - getRealSubchannel(): Subchannel; - realSubchannelEquals(other: SubchannelInterface): boolean; - getCallCredentials(): CallCredentials; - getChannel(): Channel; -} diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel-interface.js b/node_modules/@grpc/grpc-js/build/src/subchannel-interface.js deleted file mode 100644 index 6faf71a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel-interface.js +++ /dev/null @@ -1,114 +0,0 @@ -"use strict"; -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BaseSubchannelWrapper = void 0; -class BaseSubchannelWrapper { - constructor(child) { - this.child = child; - this.healthy = true; - this.healthListeners = new Set(); - this.refcount = 0; - this.dataWatchers = new Set(); - child.addHealthStateWatcher(childHealthy => { - /* A change to the child health state only affects this wrapper's overall - * health state if this wrapper is reporting healthy. */ - if (this.healthy) { - this.updateHealthListeners(); - } - }); - } - updateHealthListeners() { - for (const listener of this.healthListeners) { - listener(this.isHealthy()); - } - } - getConnectivityState() { - return this.child.getConnectivityState(); - } - addConnectivityStateListener(listener) { - this.child.addConnectivityStateListener(listener); - } - removeConnectivityStateListener(listener) { - this.child.removeConnectivityStateListener(listener); - } - startConnecting() { - this.child.startConnecting(); - } - getAddress() { - return this.child.getAddress(); - } - throttleKeepalive(newKeepaliveTime) { - this.child.throttleKeepalive(newKeepaliveTime); - } - ref() { - this.child.ref(); - this.refcount += 1; - } - unref() { - this.child.unref(); - this.refcount -= 1; - if (this.refcount === 0) { - this.destroy(); - } - } - destroy() { - for (const watcher of this.dataWatchers) { - watcher.destroy(); - } - } - getChannelzRef() { - return this.child.getChannelzRef(); - } - isHealthy() { - return this.healthy && this.child.isHealthy(); - } - addHealthStateWatcher(listener) { - this.healthListeners.add(listener); - } - removeHealthStateWatcher(listener) { - this.healthListeners.delete(listener); - } - addDataWatcher(dataWatcher) { - dataWatcher.setSubchannel(this.getRealSubchannel()); - this.dataWatchers.add(dataWatcher); - } - setHealthy(healthy) { - if (healthy !== this.healthy) { - this.healthy = healthy; - /* A change to this wrapper's health state only affects the overall - * reported health state if the child is healthy. */ - if (this.child.isHealthy()) { - this.updateHealthListeners(); - } - } - } - getRealSubchannel() { - return this.child.getRealSubchannel(); - } - realSubchannelEquals(other) { - return this.getRealSubchannel() === other.getRealSubchannel(); - } - getCallCredentials() { - return this.child.getCallCredentials(); - } - getChannel() { - return this.child.getChannel(); - } -} -exports.BaseSubchannelWrapper = BaseSubchannelWrapper; -//# sourceMappingURL=subchannel-interface.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel-interface.js.map b/node_modules/@grpc/grpc-js/build/src/subchannel-interface.js.map deleted file mode 100644 index d298ea0..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel-interface.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subchannel-interface.js","sourceRoot":"","sources":["../../src/subchannel-interface.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAmEH,MAAsB,qBAAqB;IAKzC,YAAsB,KAA0B;QAA1B,UAAK,GAAL,KAAK,CAAqB;QAJxC,YAAO,GAAG,IAAI,CAAC;QACf,oBAAe,GAAwB,IAAI,GAAG,EAAE,CAAC;QACjD,aAAQ,GAAG,CAAC,CAAC;QACb,iBAAY,GAAqB,IAAI,GAAG,EAAE,CAAC;QAEjD,KAAK,CAAC,qBAAqB,CAAC,YAAY,CAAC,EAAE;YACzC;oEACwD;YACxD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBACjB,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC/B,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,qBAAqB;QAC3B,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YAC5C,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC,oBAAoB,EAAE,CAAC;IAC3C,CAAC;IACD,4BAA4B,CAAC,QAAmC;QAC9D,IAAI,CAAC,KAAK,CAAC,4BAA4B,CAAC,QAAQ,CAAC,CAAC;IACpD,CAAC;IACD,+BAA+B,CAAC,QAAmC;QACjE,IAAI,CAAC,KAAK,CAAC,+BAA+B,CAAC,QAAQ,CAAC,CAAC;IACvD,CAAC;IACD,eAAe;QACb,IAAI,CAAC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AAU,CAAC,OAAgB;QACnC,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;YAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB;gEACoD;YACpD,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,CAAC;gBAC3B,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC/B,CAAC;QACH,CAAC;IACH,CAAC;IACD,iBAAiB;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC;IACxC,CAAC;IACD,oBAAoB,CAAC,KAA0B;QAC7C,OAAO,IAAI,CAAC,iBAAiB,EAAE,KAAK,KAAK,CAAC,iBAAiB,EAAE,CAAC;IAChE,CAAC;IACD,kBAAkB;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,CAAC;IACzC,CAAC;IACD,UAAU;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IACnC,CAAC;CACF;AA7FD,sDA6FC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel-pool.d.ts b/node_modules/@grpc/grpc-js/build/src/subchannel-pool.d.ts deleted file mode 100644 index 9c00300..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel-pool.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { ChannelOptions } from './channel-options'; -import { Subchannel } from './subchannel'; -import { SubchannelAddress } from './subchannel-address'; -import { ChannelCredentials } from './channel-credentials'; -import { GrpcUri } from './uri-parser'; -export declare class SubchannelPool { - private pool; - /** - * A timer of a task performing a periodic subchannel cleanup. - */ - private cleanupTimer; - /** - * A pool of subchannels use for making connections. Subchannels with the - * exact same parameters will be reused. - */ - constructor(); - /** - * Unrefs all unused subchannels and cancels the cleanup task if all - * subchannels have been unrefed. - */ - unrefUnusedSubchannels(): void; - /** - * Ensures that the cleanup task is spawned. - */ - ensureCleanupTask(): void; - /** - * Get a subchannel if one already exists with exactly matching parameters. - * Otherwise, create and save a subchannel with those parameters. - * @param channelTarget - * @param subchannelTarget - * @param channelArguments - * @param channelCredentials - */ - getOrCreateSubchannel(channelTargetUri: GrpcUri, subchannelTarget: SubchannelAddress, channelArguments: ChannelOptions, channelCredentials: ChannelCredentials): Subchannel; -} -/** - * Get either the global subchannel pool, or a new subchannel pool. - * @param global - */ -export declare function getSubchannelPool(global: boolean): SubchannelPool; diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel-pool.js b/node_modules/@grpc/grpc-js/build/src/subchannel-pool.js deleted file mode 100644 index e10d66d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel-pool.js +++ /dev/null @@ -1,137 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SubchannelPool = void 0; -exports.getSubchannelPool = getSubchannelPool; -const channel_options_1 = require("./channel-options"); -const subchannel_1 = require("./subchannel"); -const subchannel_address_1 = require("./subchannel-address"); -const uri_parser_1 = require("./uri-parser"); -const transport_1 = require("./transport"); -// 10 seconds in milliseconds. This value is arbitrary. -/** - * The amount of time in between checks for dropping subchannels that have no - * other references - */ -const REF_CHECK_INTERVAL = 10000; -class SubchannelPool { - /** - * A pool of subchannels use for making connections. Subchannels with the - * exact same parameters will be reused. - */ - constructor() { - this.pool = Object.create(null); - /** - * A timer of a task performing a periodic subchannel cleanup. - */ - this.cleanupTimer = null; - } - /** - * Unrefs all unused subchannels and cancels the cleanup task if all - * subchannels have been unrefed. - */ - unrefUnusedSubchannels() { - let allSubchannelsUnrefed = true; - /* These objects are created with Object.create(null), so they do not - * have a prototype, which means that for (... in ...) loops over them - * do not need to be filtered */ - // eslint-disable-disable-next-line:forin - for (const channelTarget in this.pool) { - const subchannelObjArray = this.pool[channelTarget]; - const refedSubchannels = subchannelObjArray.filter(value => !value.subchannel.unrefIfOneRef()); - if (refedSubchannels.length > 0) { - allSubchannelsUnrefed = false; - } - /* For each subchannel in the pool, try to unref it if it has - * exactly one ref (which is the ref from the pool itself). If that - * does happen, remove the subchannel from the pool */ - this.pool[channelTarget] = refedSubchannels; - } - /* Currently we do not delete keys with empty values. If that results - * in significant memory usage we should change it. */ - // Cancel the cleanup task if all subchannels have been unrefed. - if (allSubchannelsUnrefed && this.cleanupTimer !== null) { - clearInterval(this.cleanupTimer); - this.cleanupTimer = null; - } - } - /** - * Ensures that the cleanup task is spawned. - */ - ensureCleanupTask() { - var _a, _b; - if (this.cleanupTimer === null) { - this.cleanupTimer = setInterval(() => { - this.unrefUnusedSubchannels(); - }, REF_CHECK_INTERVAL); - // Unref because this timer should not keep the event loop running. - // Call unref only if it exists to address electron/electron#21162 - (_b = (_a = this.cleanupTimer).unref) === null || _b === void 0 ? void 0 : _b.call(_a); - } - } - /** - * Get a subchannel if one already exists with exactly matching parameters. - * Otherwise, create and save a subchannel with those parameters. - * @param channelTarget - * @param subchannelTarget - * @param channelArguments - * @param channelCredentials - */ - getOrCreateSubchannel(channelTargetUri, subchannelTarget, channelArguments, channelCredentials) { - this.ensureCleanupTask(); - const channelTarget = (0, uri_parser_1.uriToString)(channelTargetUri); - if (channelTarget in this.pool) { - const subchannelObjArray = this.pool[channelTarget]; - for (const subchannelObj of subchannelObjArray) { - if ((0, subchannel_address_1.subchannelAddressEqual)(subchannelTarget, subchannelObj.subchannelAddress) && - (0, channel_options_1.channelOptionsEqual)(channelArguments, subchannelObj.channelArguments) && - channelCredentials._equals(subchannelObj.channelCredentials)) { - return subchannelObj.subchannel; - } - } - } - // If we get here, no matching subchannel was found - const subchannel = new subchannel_1.Subchannel(channelTargetUri, subchannelTarget, channelArguments, channelCredentials, new transport_1.Http2SubchannelConnector(channelTargetUri)); - if (!(channelTarget in this.pool)) { - this.pool[channelTarget] = []; - } - this.pool[channelTarget].push({ - subchannelAddress: subchannelTarget, - channelArguments, - channelCredentials, - subchannel, - }); - subchannel.ref(); - return subchannel; - } -} -exports.SubchannelPool = SubchannelPool; -const globalSubchannelPool = new SubchannelPool(); -/** - * Get either the global subchannel pool, or a new subchannel pool. - * @param global - */ -function getSubchannelPool(global) { - if (global) { - return globalSubchannelPool; - } - else { - return new SubchannelPool(); - } -} -//# sourceMappingURL=subchannel-pool.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel-pool.js.map b/node_modules/@grpc/grpc-js/build/src/subchannel-pool.js.map deleted file mode 100644 index d1b988a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel-pool.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subchannel-pool.js","sourceRoot":"","sources":["../../src/subchannel-pool.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AA0JH,8CAMC;AA9JD,uDAAwE;AACxE,6CAA0C;AAC1C,6DAG8B;AAE9B,6CAAoD;AACpD,2CAAuD;AAEvD,uDAAuD;AACvD;;;GAGG;AACH,MAAM,kBAAkB,GAAG,KAAM,CAAC;AAElC,MAAa,cAAc;IAezB;;;OAGG;IACH;QAlBQ,SAAI,GAOR,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAExB;;WAEG;QACK,iBAAY,GAA0B,IAAI,CAAC;IAMpC,CAAC;IAEhB;;;OAGG;IACH,sBAAsB;QACpB,IAAI,qBAAqB,GAAG,IAAI,CAAC;QAEjC;;wCAEgC;QAChC,yCAAyC;QACzC,KAAK,MAAM,aAAa,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACtC,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAEpD,MAAM,gBAAg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2CAAsB,EACpB,gBAAgB,EAChB,aAAa,CAAC,iBAAiB,CAChC;oBACD,IAAA,qCAAmB,EACjB,gBAAgB,EAChB,aAAa,CAAC,gBAAgB,CAC/B;oBACD,kBAAkB,CAAC,OAAO,CAAC,aAAa,CAAC,kBAAkB,CAAC,EAC5D,CAAC;oBACD,OAAO,aAAa,CAAC,UAAU,CAAC;gBAClC,CAAC;YACH,CAAC;QACH,CAAC;QACD,mDAAmD;QACnD,MAAM,UAAU,GAAG,IAAI,uBAAU,CAC/B,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,IAAI,oCAAwB,CAAC,gBAAgB,CAAC,CAC/C,CAAC;QACF,IAAI,CAAC,CAAC,aAAa,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YAClC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC;QAChC,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC;YAC5B,iBAAiB,EAAE,gBAAgB;YACnC,gBAAgB;YAChB,kBAAkB;YAClB,UAAU;SACX,CAAC,CAAC;QACH,UAAU,CAAC,GAAG,EAAE,CAAC;QACjB,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AA/HD,wCA+HC;AAED,MAAM,oBAAoB,GAAG,IAAI,cAAc,EAAE,CAAC;AAElD;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,MAAe;IAC/C,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,oBAAoB,CAAC;IAC9B,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,cAAc,EAAE,CAAC;IAC9B,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel.d.ts b/node_modules/@grpc/grpc-js/build/src/subchannel.d.ts deleted file mode 100644 index 1a1689b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel.d.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { ChannelCredentials } from './channel-credentials'; -import { Metadata } from './metadata'; -import { ChannelOptions } from './channel-options'; -import { ConnectivityState } from './connectivity-state'; -import { GrpcUri } from './uri-parser'; -import { SubchannelAddress } from './subchannel-address'; -import { SubchannelRef } from './channelz'; -import { ConnectivityStateListener, DataWatcher, SubchannelInterface } from './subchannel-interface'; -import { SubchannelCallInterceptingListener } from './subchannel-call'; -import { SubchannelCall } from './subchannel-call'; -import { SubchannelConnector } from './transport'; -import { CallCredentials } from './call-credentials'; -import { Channel } from './channel'; -export interface DataProducer { - addDataWatcher(dataWatcher: DataWatcher): void; - removeDataWatcher(dataWatcher: DataWatcher): void; -} -export declare class Subchannel implements SubchannelInterface { - private channelTarget; - private subchannelAddress; - private options; - private connector; - /** - * The subchannel's current connectivity state. Invariant: `session` === `null` - * if and only if `connectivityState` is IDLE or TRANSIENT_FAILURE. - */ - private connectivityState; - /** - * The underlying http2 session used to make requests. - */ - private transport; - /** - * Indicates that the subchannel should transition from TRANSIENT_FAILURE to - * CONNECTING instead of IDLE when the backoff timeout ends. - */ - private continueConnecting; - /** - * A list of listener functions that will be called whenever the connectivity - * state changes. Will be modified by `addConnectivityStateListener` and - * `removeConnectivityStateListener` - */ - private stateListeners; - private backoffTimeout; - private keepaliveTime; - /** - * Tracks channels and subchannel pools with references to this subchannel - */ - private refcount; - /** - * A string representation of the subchannel address, for logging/tracing - */ - private subchannelAddressString; - private readonly channelzEnabled; - private channelzRef; - private channelzTrace; - private callTracker; - private childrenTracker; - private streamTracker; - private secureConnector; - private dataProducers; - private subchannelChannel; - /** - * A class representing a connection to a single backend. - * @param channelTarget The target string for the channel as a whole - * @param subchannelAddress The address for the backend that this subchannel - * will connect to - * @param options The channel options, plus any specific subchannel options - * for this subchannel - * @param credentials The channel credentials used to establish this - * connection - */ - constructor(channelTarget: GrpcUri, subchannelAddress: SubchannelAddress, options: ChannelOptions, credentials: ChannelCredentials, connector: SubchannelConnector); - private getChannelzInfo; - private trace; - private refTrace; - private handleBackoffTimer; - /** - * Start a backoff timer with the current nextBackoff timeout - */ - private startBackoff; - private stopBackoff; - private startConnectingInternal; - /** - * Initiate a state transition from any element of oldStates to the new - * state. If the current connectivityState is not in oldStates, do nothing. - * @param oldStates The set of states to transition from - * @param newState The state to transition to - * @returns True if the state changed, false otherwise - */ - private transitionToState; - ref(): void; - unref(): void; - unrefIfOneRef(): boolean; - createCall(metadata: Metadata, host: string, method: string, listener: SubchannelCallInterceptingListener): SubchannelCall; - /** - * If the subchannel is currently IDLE, start connecting and switch to the - * CONNECTING state. If the subchannel is current in TRANSIENT_FAILURE, - * the next time it would transition to IDLE, start connecting again instead. - * Otherwise, do nothing. - */ - startConnecting(): void; - /** - * Get the subchannel's current connectivity state. - */ - getConnectivityState(): ConnectivityState; - /** - * Add a listener function to be called whenever the subchannel's - * connectivity state changes. - * @param listener - */ - addConnectivityStateListener(listener: ConnectivityStateListener): void; - /** - * Remove a listener previously added with `addConnectivityStateListener` - * @param listener A reference to a function previously passed to - * `addConnectivityStateListener` - */ - removeConnectivityStateListener(listener: ConnectivityStateListener): void; - /** - * Reset the backoff timeout, and immediately start connecting if in backoff. - */ - resetBackoff(): void; - getAddress(): string; - getChannelzRef(): SubchannelRef; - isHealthy(): boolean; - addHealthStateWatcher(listener: (healthy: boolean) => void): void; - removeHealthStateWatcher(listener: (healthy: boolean) => void): void; - getRealSubchannel(): this; - realSubchannelEquals(other: SubchannelInterface): boolean; - throttleKeepalive(newKeepaliveTime: number): void; - getCallCredentials(): CallCredentials; - getChannel(): Channel; - addDataWatcher(dataWatcher: DataWatcher): void; - getOrCreateDataProducer(name: string, createDataProducer: (subchannel: Subchannel) => DataProducer): DataProducer; - removeDataProducer(name: string): void; -} diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel.js b/node_modules/@grpc/grpc-js/build/src/subchannel.js deleted file mode 100644 index abdb420..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel.js +++ /dev/null @@ -1,397 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Subchannel = void 0; -const connectivity_state_1 = require("./connectivity-state"); -const backoff_timeout_1 = require("./backoff-timeout"); -const logging = require("./logging"); -const constants_1 = require("./constants"); -const uri_parser_1 = require("./uri-parser"); -const subchannel_address_1 = require("./subchannel-address"); -const channelz_1 = require("./channelz"); -const single_subchannel_channel_1 = require("./single-subchannel-channel"); -const TRACER_NAME = 'subchannel'; -/* setInterval and setTimeout only accept signed 32 bit integers. JS doesn't - * have a constant for the max signed 32 bit integer, so this is a simple way - * to calculate it */ -const KEEPALIVE_MAX_TIME_MS = ~(1 << 31); -class Subchannel { - /** - * A class representing a connection to a single backend. - * @param channelTarget The target string for the channel as a whole - * @param subchannelAddress The address for the backend that this subchannel - * will connect to - * @param options The channel options, plus any specific subchannel options - * for this subchannel - * @param credentials The channel credentials used to establish this - * connection - */ - constructor(channelTarget, subchannelAddress, options, credentials, connector) { - var _a; - this.channelTarget = channelTarget; - this.subchannelAddress = subchannelAddress; - this.options = options; - this.connector = connector; - /** - * The subchannel's current connectivity state. Invariant: `session` === `null` - * if and only if `connectivityState` is IDLE or TRANSIENT_FAILURE. - */ - this.connectivityState = connectivity_state_1.ConnectivityState.IDLE; - /** - * The underlying http2 session used to make requests. - */ - this.transport = null; - /** - * Indicates that the subchannel should transition from TRANSIENT_FAILURE to - * CONNECTING instead of IDLE when the backoff timeout ends. - */ - this.continueConnecting = false; - /** - * A list of listener functions that will be called whenever the connectivity - * state changes. Will be modified by `addConnectivityStateListener` and - * `removeConnectivityStateListener` - */ - this.stateListeners = new Set(); - /** - * Tracks channels and subchannel pools with references to this subchannel - */ - this.refcount = 0; - // Channelz info - this.channelzEnabled = true; - this.dataProducers = new Map(); - this.subchannelChannel = null; - const backoffOptions = { - initialDelay: options['grpc.initial_reconnect_backoff_ms'], - maxDelay: options['grpc.max_reconnect_backoff_ms'], - }; - this.backoffTimeout = new backoff_timeout_1.BackoffTimeout(() => { - this.handleBackoffTimer(); - }, backoffOptions); - this.backoffTimeout.unref(); - this.subchannelAddressString = (0, subchannel_address_1.subchannelAddressToString)(subchannelAddress); - this.keepaliveTime = (_a = options['grpc.keepalive_time_ms']) !== null && _a !== void 0 ? _a : -1; - if (options['grpc.enable_channelz'] === 0) { - this.channelzEnabled = false; - this.channelzTrace = new channelz_1.ChannelzTraceStub(); - this.callTracker = new channelz_1.ChannelzCallTrackerStub(); - this.childrenTracker = new channelz_1.ChannelzChildrenTrackerStub(); - this.streamTracker = new channelz_1.ChannelzCallTrackerStub(); - } - else { - this.channelzTrace = new channelz_1.ChannelzTrace(); - this.callTracker = new channelz_1.ChannelzCallTracker(); - this.childrenTracker = new channelz_1.ChannelzChildrenTracker(); - this.streamTracker = new channelz_1.ChannelzCallTracker(); - } - this.channelzRef = (0, channelz_1.registerChannelzSubchannel)(this.subchannelAddressString, () => this.getChannelzInfo(), this.channelzEnabled); - this.channelzTrace.addTrace('CT_INFO', 'Subchannel created'); - this.trace('Subchannel constructed with options ' + - JSON.stringify(options, undefined, 2)); - this.secureConnector = credentials._createSecureConnector(channelTarget, options); - } - getChannelzInfo() { - return { - state: this.connectivityState, - trace: this.channelzTrace, - callTracker: this.callTracker, - children: this.childrenTracker.getChildLists(), - target: this.subchannelAddressString, - }; - } - trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, '(' + - this.channelzRef.id + - ') ' + - this.subchannelAddressString + - ' ' + - text); - } - refTrace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, 'subchannel_refcount', '(' + - this.channelzRef.id + - ') ' + - this.subchannelAddressString + - ' ' + - text); - } - handleBackoffTimer() { - if (this.continueConnecting) { - this.transitionToState([connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE], connectivity_state_1.ConnectivityState.CONNECTING); - } - else { - this.transitionToState([connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE], connectivity_state_1.ConnectivityState.IDLE); - } - } - /** - * Start a backoff timer with the current nextBackoff timeout - */ - startBackoff() { - this.backoffTimeout.runOnce(); - } - stopBackoff() { - this.backoffTimeout.stop(); - this.backoffTimeout.reset(); - } - startConnectingInternal() { - let options = this.options; - if (options['grpc.keepalive_time_ms']) { - const adjustedKeepaliveTime = Math.min(this.keepaliveTime, KEEPALIVE_MAX_TIME_MS); - options = Object.assign(Object.assign({}, options), { 'grpc.keepalive_time_ms': adjustedKeepaliveTime }); - } - this.connector - .connect(this.subchannelAddress, this.secureConnector, options) - .then(transport => { - if (this.transitionToState([connectivity_state_1.ConnectivityState.CONNECTING], connectivity_state_1.ConnectivityState.READY)) { - this.transport = transport; - if (this.channelzEnabled) { - this.childrenTracker.refChild(transport.getChannelzRef()); - } - transport.addDisconnectListener(tooManyPings => { - this.transitionToState([connectivity_state_1.ConnectivityState.READY], connectivity_state_1.ConnectivityState.IDLE); - if (tooManyPings && this.keepaliveTime > 0) { - this.keepaliveTime *= 2; - logging.log(constants_1.LogVerbosity.ERROR, `Connection to ${(0, uri_parser_1.uriToString)(this.channelTarget)} at ${this.subchannelAddressString} rejected by server because of excess pings. Increasing ping interval to ${this.keepaliveTime} ms`); - } - }); - } - else { - /* If we can't transition from CONNECTING to READY here, we will - * not be using this transport, so release its resources. */ - transport.shutdown(); - } - }, error => { - this.transitionToState([connectivity_state_1.ConnectivityState.CONNECTING], connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, `${error}`); - }); - } - /** - * Initiate a state transition from any element of oldStates to the new - * state. If the current connectivityState is not in oldStates, do nothing. - * @param oldStates The set of states to transition from - * @param newState The state to transition to - * @returns True if the state changed, false otherwise - */ - transitionToState(oldStates, newState, errorMessage) { - var _a, _b; - if (oldStates.indexOf(this.connectivityState) === -1) { - return false; - } - if (errorMessage) { - this.trace(connectivity_state_1.ConnectivityState[this.connectivityState] + - ' -> ' + - connectivity_state_1.ConnectivityState[newState] + - ' with error "' + errorMessage + '"'); - } - else { - this.trace(connectivity_state_1.ConnectivityState[this.connectivityState] + - ' -> ' + - connectivity_state_1.ConnectivityState[newState]); - } - if (this.channelzEnabled) { - this.channelzTrace.addTrace('CT_INFO', 'Connectivity state change to ' + connectivity_state_1.ConnectivityState[newState]); - } - const previousState = this.connectivityState; - this.connectivityState = newState; - switch (newState) { - case connectivity_state_1.ConnectivityState.READY: - this.stopBackoff(); - break; - case connectivity_state_1.ConnectivityState.CONNECTING: - this.startBackoff(); - this.startConnectingInternal(); - this.continueConnecting = false; - break; - case connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE: - if (this.channelzEnabled && this.transport) { - this.childrenTracker.unrefChild(this.transport.getChannelzRef()); - } - (_a = this.transport) === null || _a === void 0 ? void 0 : _a.shutdown(); - this.transport = null; - /* If the backoff timer has already ended by the time we get to the - * TRANSIENT_FAILURE state, we want to immediately transition out of - * TRANSIENT_FAILURE as though the backoff timer is ending right now */ - if (!this.backoffTimeout.isRunning()) { - process.nextTick(() => { - this.handleBackoffTimer(); - }); - } - break; - case connectivity_state_1.ConnectivityState.IDLE: - if (this.channelzEnabled && this.transport) { - this.childrenTracker.unrefChild(this.transport.getChannelzRef()); - } - (_b = this.transport) === null || _b === void 0 ? void 0 : _b.shutdown(); - this.transport = null; - break; - default: - throw new Error(`Invalid state: unknown ConnectivityState ${newState}`); - } - for (const listener of this.stateListeners) { - listener(this, previousState, newState, this.keepaliveTime, errorMessage); - } - return true; - } - ref() { - this.refTrace('refcount ' + this.refcount + ' -> ' + (this.refcount + 1)); - this.refcount += 1; - } - unref() { - this.refTrace('refcount ' + this.refcount + ' -> ' + (this.refcount - 1)); - this.refcount -= 1; - if (this.refcount === 0) { - this.channelzTrace.addTrace('CT_INFO', 'Shutting down'); - (0, channelz_1.unregisterChannelzRef)(this.channelzRef); - this.secureConnector.destroy(); - process.nextTick(() => { - this.transitionToState([connectivity_state_1.ConnectivityState.CONNECTING, connectivity_state_1.ConnectivityState.READY], connectivity_state_1.ConnectivityState.IDLE); - }); - } - } - unrefIfOneRef() { - if (this.refcount === 1) { - this.unref(); - return true; - } - return false; - } - createCall(metadata, host, method, listener) { - if (!this.transport) { - throw new Error('Cannot create call, subchannel not READY'); - } - let statsTracker; - if (this.channelzEnabled) { - this.callTracker.addCallStarted(); - this.streamTracker.addCallStarted(); - statsTracker = { - onCallEnd: status => { - if (status.code === constants_1.Status.OK) { - this.callTracker.addCallSucceeded(); - } - else { - this.callTracker.addCallFailed(); - } - }, - }; - } - else { - statsTracker = {}; - } - return this.transport.createCall(metadata, host, method, listener, statsTracker); - } - /** - * If the subchannel is currently IDLE, start connecting and switch to the - * CONNECTING state. If the subchannel is current in TRANSIENT_FAILURE, - * the next time it would transition to IDLE, start connecting again instead. - * Otherwise, do nothing. - */ - startConnecting() { - process.nextTick(() => { - /* First, try to transition from IDLE to connecting. If that doesn't happen - * because the state is not currently IDLE, check if it is - * TRANSIENT_FAILURE, and if so indicate that it should go back to - * connecting after the backoff timer ends. Otherwise do nothing */ - if (!this.transitionToState([connectivity_state_1.ConnectivityState.IDLE], connectivity_state_1.ConnectivityState.CONNECTING)) { - if (this.connectivityState === connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE) { - this.continueConnecting = true; - } - } - }); - } - /** - * Get the subchannel's current connectivity state. - */ - getConnectivityState() { - return this.connectivityState; - } - /** - * Add a listener function to be called whenever the subchannel's - * connectivity state changes. - * @param listener - */ - addConnectivityStateListener(listener) { - this.stateListeners.add(listener); - } - /** - * Remove a listener previously added with `addConnectivityStateListener` - * @param listener A reference to a function previously passed to - * `addConnectivityStateListener` - */ - removeConnectivityStateListener(listener) { - this.stateListeners.delete(listener); - } - /** - * Reset the backoff timeout, and immediately start connecting if in backoff. - */ - resetBackoff() { - process.nextTick(() => { - this.backoffTimeout.reset(); - this.transitionToState([connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE], connectivity_state_1.ConnectivityState.CONNECTING); - }); - } - getAddress() { - return this.subchannelAddressString; - } - getChannelzRef() { - return this.channelzRef; - } - isHealthy() { - return true; - } - addHealthStateWatcher(listener) { - // Do nothing with the listener - } - removeHealthStateWatcher(listener) { - // Do nothing with the listener - } - getRealSubchannel() { - return this; - } - realSubchannelEquals(other) { - return other.getRealSubchannel() === this; - } - throttleKeepalive(newKeepaliveTime) { - if (newKeepaliveTime > this.keepaliveTime) { - this.keepaliveTime = newKeepaliveTime; - } - } - getCallCredentials() { - return this.secureConnector.getCallCredentials(); - } - getChannel() { - if (!this.subchannelChannel) { - this.subchannelChannel = new single_subchannel_channel_1.SingleSubchannelChannel(this, this.channelTarget, this.options); - } - return this.subchannelChannel; - } - addDataWatcher(dataWatcher) { - throw new Error('Not implemented'); - } - getOrCreateDataProducer(name, createDataProducer) { - const existingProducer = this.dataProducers.get(name); - if (existingProducer) { - return existingProducer; - } - const newProducer = createDataProducer(this); - this.dataProducers.set(name, newProducer); - return newProducer; - } - removeDataProducer(name) { - this.dataProducers.delete(name); - } -} -exports.Subchannel = Subchannel; -//# sourceMappingURL=subchannel.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/subchannel.js.map b/node_modules/@grpc/grpc-js/build/src/subchannel.js.map deleted file mode 100644 index f3feb8b..0000000 --- a/node_modules/@grpc/grpc-js/build/src/subchannel.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subchannel.js","sourceRoot":"","sources":["../../src/subchannel.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAKH,6DAAyD;AACzD,uDAAmE;AACnE,qCAAqC;AACrC,2CAAmD;AACnD,6CAAoD;AACpD,6DAG8B;AAC9B,yCAWoB;AAUpB,2EAAsE;AAGtE,MAAM,WAA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gBAAgB,EAAC,CAAC;YACpB,OAAO,gBAAgB,CAAC;QAC1B,CAAC;QACD,MAAM,WAAW,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAC1C,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,kBAAkB,CAAC,IAAY;QAC7B,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AA7eD,gCA6eC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/tls-helpers.d.ts b/node_modules/@grpc/grpc-js/build/src/tls-helpers.d.ts deleted file mode 100644 index c1e2ff2..0000000 --- a/node_modules/@grpc/grpc-js/build/src/tls-helpers.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const CIPHER_SUITES: string | undefined; -export declare function getDefaultRootsData(): Buffer | null; diff --git a/node_modules/@grpc/grpc-js/build/src/tls-helpers.js b/node_modules/@grpc/grpc-js/build/src/tls-helpers.js deleted file mode 100644 index 14c521d..0000000 --- a/node_modules/@grpc/grpc-js/build/src/tls-helpers.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CIPHER_SUITES = void 0; -exports.getDefaultRootsData = getDefaultRootsData; -const fs = require("fs"); -exports.CIPHER_SUITES = process.env.GRPC_SSL_CIPHER_SUITES; -const DEFAULT_ROOTS_FILE_PATH = process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH; -let defaultRootsData = null; -function getDefaultRootsData() { - if (DEFAULT_ROOTS_FILE_PATH) { - if (defaultRootsData === null) { - defaultRootsData = fs.readFileSync(DEFAULT_ROOTS_FILE_PATH); - } - return defaultRootsData; - } - return null; -} -//# sourceMappingURL=tls-helpers.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/tls-helpers.js.map b/node_modules/@grpc/grpc-js/build/src/tls-helpers.js.map deleted file mode 100644 index 07294da..0000000 --- a/node_modules/@grpc/grpc-js/build/src/tls-helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tls-helpers.js","sourceRoot":"","sources":["../../src/tls-helpers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAWH,kDAQC;AAjBD,yBAAyB;AAEZ,QAAA,aAAa,GACxB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;AAErC,MAAM,uBAAuB,GAAG,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;AAE7E,IAAI,gBAAgB,GAAkB,IAAI,CAAC;AAE3C,SAAgB,mBAAmB;IACjC,IAAI,uBAAuB,EAAE,CAAC;QAC5B,IAAI,gBAAgB,KAAK,IAAI,EAAE,CAAC;YAC9B,gBAAgB,GAAG,EAAE,CAAC,YAAY,CAAC,uBAAuB,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/transport.d.ts b/node_modules/@grpc/grpc-js/build/src/transport.d.ts deleted file mode 100644 index 179c2fe..0000000 --- a/node_modules/@grpc/grpc-js/build/src/transport.d.ts +++ /dev/null @@ -1,135 +0,0 @@ -import * as http2 from 'http2'; -import { PartialStatusObject } from './call-interface'; -import { SecureConnector } from './channel-credentials'; -import { ChannelOptions } from './channel-options'; -import { SocketRef } from './channelz'; -import { SubchannelAddress } from './subchannel-address'; -import { GrpcUri } from './uri-parser'; -import { Http2SubchannelCall, SubchannelCall, SubchannelCallInterceptingListener } from './subchannel-call'; -import { Metadata } from './metadata'; -import { AuthContext } from './auth-context'; -export interface CallEventTracker { - addMessageSent(): void; - addMessageReceived(): void; - onCallEnd(status: PartialStatusObject): void; - onStreamEnd(success: boolean): void; -} -export interface TransportDisconnectListener { - (tooManyPings: boolean): void; -} -export interface Transport { - getChannelzRef(): SocketRef; - getPeerName(): string; - getOptions(): ChannelOptions; - getAuthContext(): AuthContext; - createCall(metadata: Metadata, host: string, method: string, listener: SubchannelCallInterceptingListener, subchannelCallStatsTracker: Partial): SubchannelCall; - addDisconnectListener(listener: TransportDisconnectListener): void; - shutdown(): void; -} -declare class Http2Transport implements Transport { - private session; - private options; - /** - * Name of the remote server, if it is not the same as the subchannel - * address, i.e. if connecting through an HTTP CONNECT proxy. - */ - private remoteName; - /** - * The amount of time in between sending pings - */ - private readonly keepaliveTimeMs; - /** - * The amount of time to wait for an acknowledgement after sending a ping - */ - private readonly keepaliveTimeoutMs; - /** - * Indicates whether keepalive pings should be sent without any active calls - */ - private readonly keepaliveWithoutCalls; - /** - * Timer reference indicating when to send the next ping or when the most recent ping will be considered lost. - */ - private keepaliveTimer; - /** - * Indicates that the keepalive timer ran out while there were no active - * calls, and a ping should be sent the next time a call starts. - */ - private pendingSendKeepalivePing; - private userAgent; - private activeCalls; - private subchannelAddressString; - private disconnectListeners; - private disconnectHandled; - private authContext; - private channelzRef; - private readonly channelzEnabled; - private streamTracker; - private keepalivesSent; - private messagesSent; - private messagesReceived; - private lastMessageSentTimestamp; - private lastMessageReceivedTimestamp; - constructor(session: http2.ClientHttp2Session, subchannelAddress: SubchannelAddress, options: ChannelOptions, - /** - * Name of the remote server, if it is not the same as the subchannel - * address, i.e. if connecting through an HTTP CONNECT proxy. - */ - remoteName: string | null); - private getChannelzInfo; - private trace; - private keepaliveTrace; - private flowControlTrace; - private internalsTrace; - /** - * Indicate to the owner of this object that this transport should no longer - * be used. That happens if the connection drops, or if the server sends a - * GOAWAY. - * @param tooManyPings If true, this was triggered by a GOAWAY with data - * indicating that the session was closed becaues the client sent too many - * pings. - * @returns - */ - private reportDisconnectToOwner; - /** - * Handle connection drops, but not GOAWAYs. - */ - private handleDisconnect; - addDisconnectListener(listener: TransportDisconnectListener): void; - private canSendPing; - private maybeSendPing; - /** - * Starts the keepalive ping timer if appropriate. If the timer already ran - * out while there were no active requests, instead send a ping immediately. - * If the ping timer is already running or a ping is currently in flight, - * instead do nothing and wait for them to resolve. - */ - private maybeStartKeepalivePingTimer; - /** - * Clears whichever keepalive timeout is currently active, if any. - */ - private clearKeepaliveTimeout; - private removeActiveCall; - private addActiveCall; - createCall(metadata: Metadata, host: string, method: string, listener: SubchannelCallInterceptingListener, subchannelCallStatsTracker: Partial): Http2SubchannelCall; - getChannelzRef(): SocketRef; - getPeerName(): string; - getOptions(): ChannelOptions; - getAuthContext(): AuthContext; - shutdown(): void; -} -export interface SubchannelConnector { - connect(address: SubchannelAddress, secureConnector: SecureConnector, options: ChannelOptions): Promise; - shutdown(): void; -} -export declare class Http2SubchannelConnector implements SubchannelConnector { - private channelTarget; - private session; - private isShutdown; - constructor(channelTarget: GrpcUri); - private trace; - private createSession; - private tcpConnect; - connect(address: SubchannelAddress, secureConnector: SecureConnector, options: ChannelOptions): Promise; - shutdown(): void; -} -export {}; diff --git a/node_modules/@grpc/grpc-js/build/src/transport.js b/node_modules/@grpc/grpc-js/build/src/transport.js deleted file mode 100644 index 9cd187a..0000000 --- a/node_modules/@grpc/grpc-js/build/src/transport.js +++ /dev/null @@ -1,640 +0,0 @@ -"use strict"; -/* - * Copyright 2023 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Http2SubchannelConnector = void 0; -const http2 = require("http2"); -const tls_1 = require("tls"); -const channelz_1 = require("./channelz"); -const constants_1 = require("./constants"); -const http_proxy_1 = require("./http_proxy"); -const logging = require("./logging"); -const resolver_1 = require("./resolver"); -const subchannel_address_1 = require("./subchannel-address"); -const uri_parser_1 = require("./uri-parser"); -const net = require("net"); -const subchannel_call_1 = require("./subchannel-call"); -const call_number_1 = require("./call-number"); -const TRACER_NAME = 'transport'; -const FLOW_CONTROL_TRACER_NAME = 'transport_flowctrl'; -const clientVersion = require('../../package.json').version; -const { HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_CONTENT_TYPE, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_TE, HTTP2_HEADER_USER_AGENT, } = http2.constants; -const KEEPALIVE_TIMEOUT_MS = 20000; -const tooManyPingsData = Buffer.from('too_many_pings', 'ascii'); -class Http2Transport { - constructor(session, subchannelAddress, options, - /** - * Name of the remote server, if it is not the same as the subchannel - * address, i.e. if connecting through an HTTP CONNECT proxy. - */ - remoteName) { - this.session = session; - this.options = options; - this.remoteName = remoteName; - /** - * Timer reference indicating when to send the next ping or when the most recent ping will be considered lost. - */ - this.keepaliveTimer = null; - /** - * Indicates that the keepalive timer ran out while there were no active - * calls, and a ping should be sent the next time a call starts. - */ - this.pendingSendKeepalivePing = false; - this.activeCalls = new Set(); - this.disconnectListeners = []; - this.disconnectHandled = false; - this.channelzEnabled = true; - this.keepalivesSent = 0; - this.messagesSent = 0; - this.messagesReceived = 0; - this.lastMessageSentTimestamp = null; - this.lastMessageReceivedTimestamp = null; - /* Populate subchannelAddressString and channelzRef before doing anything - * else, because they are used in the trace methods. */ - this.subchannelAddressString = (0, subchannel_address_1.subchannelAddressToString)(subchannelAddress); - if (options['grpc.enable_channelz'] === 0) { - this.channelzEnabled = false; - this.streamTracker = new channelz_1.ChannelzCallTrackerStub(); - } - else { - this.streamTracker = new channelz_1.ChannelzCallTracker(); - } - this.channelzRef = (0, channelz_1.registerChannelzSocket)(this.subchannelAddressString, () => this.getChannelzInfo(), this.channelzEnabled); - // Build user-agent string. - this.userAgent = [ - options['grpc.primary_user_agent'], - `grpc-node-js/${clientVersion}`, - options['grpc.secondary_user_agent'], - ] - .filter(e => e) - .join(' '); // remove falsey values first - if ('grpc.keepalive_time_ms' in options) { - this.keepaliveTimeMs = options['grpc.keepalive_time_ms']; - } - else { - this.keepaliveTimeMs = -1; - } - if ('grpc.keepalive_timeout_ms' in options) { - this.keepaliveTimeoutMs = options['grpc.keepalive_timeout_ms']; - } - else { - this.keepaliveTimeoutMs = KEEPALIVE_TIMEOUT_MS; - } - if ('grpc.keepalive_permit_without_calls' in options) { - this.keepaliveWithoutCalls = - options['grpc.keepalive_permit_without_calls'] === 1; - } - else { - this.keepaliveWithoutCalls = false; - } - session.once('close', () => { - this.trace('session closed'); - this.handleDisconnect(); - }); - session.once('goaway', (errorCode, lastStreamID, opaqueData) => { - let tooManyPings = false; - /* See the last paragraph of - * https://github.com/grpc/proposal/blob/master/A8-client-side-keepalive.md#basic-keepalive */ - if (errorCode === http2.constants.NGHTTP2_ENHANCE_YOUR_CALM && - opaqueData && - opaqueData.equals(tooManyPingsData)) { - tooManyPings = true; - } - this.trace('connection closed by GOAWAY with code ' + - errorCode + - ' and data ' + - (opaqueData === null || opaqueData === void 0 ? void 0 : opaqueData.toString())); - this.reportDisconnectToOwner(tooManyPings); - }); - session.once('error', error => { - this.trace('connection closed with error ' + error.message); - this.handleDisconnect(); - }); - session.socket.once('close', (hadError) => { - this.trace('connection closed. hadError=' + hadError); - this.handleDisconnect(); - }); - if (logging.isTracerEnabled(TRACER_NAME)) { - session.on('remoteSettings', (settings) => { - this.trace('new settings received' + - (this.session !== session ? ' on the old connection' : '') + - ': ' + - JSON.stringify(settings)); - }); - session.on('localSettings', (settings) => { - this.trace('local settings acknowledged by remote' + - (this.session !== session ? ' on the old connection' : '') + - ': ' + - JSON.stringify(settings)); - }); - } - /* Start the keepalive timer last, because this can trigger trace logs, - * which should only happen after everything else is set up. */ - if (this.keepaliveWithoutCalls) { - this.maybeStartKeepalivePingTimer(); - } - if (session.socket instanceof tls_1.TLSSocket) { - this.authContext = { - transportSecurityType: 'ssl', - sslPeerCertificate: session.socket.getPeerCertificate() - }; - } - else { - this.authContext = {}; - } - } - getChannelzInfo() { - var _a, _b, _c; - const sessionSocket = this.session.socket; - const remoteAddress = sessionSocket.remoteAddress - ? (0, subchannel_address_1.stringToSubchannelAddress)(sessionSocket.remoteAddress, sessionSocket.remotePort) - : null; - const localAddress = sessionSocket.localAddress - ? (0, subchannel_address_1.stringToSubchannelAddress)(sessionSocket.localAddress, sessionSocket.localPort) - : null; - let tlsInfo; - if (this.session.encrypted) { - const tlsSocket = sessionSocket; - const cipherInfo = tlsSocket.getCipher(); - const certificate = tlsSocket.getCertificate(); - const peerCertificate = tlsSocket.getPeerCertificate(); - tlsInfo = { - cipherSuiteStandardName: (_a = cipherInfo.standardName) !== null && _a !== void 0 ? _a : null, - cipherSuiteOtherName: cipherInfo.standardName ? null : cipherInfo.name, - localCertificate: certificate && 'raw' in certificate ? certificate.raw : null, - remoteCertificate: peerCertificate && 'raw' in peerCertificate - ? peerCertificate.raw - : null, - }; - } - else { - tlsInfo = null; - } - const socketInfo = { - remoteAddress: remoteAddress, - localAddress: localAddress, - security: tlsInfo, - remoteName: this.remoteName, - streamsStarted: this.streamTracker.callsStarted, - streamsSucceeded: this.streamTracker.callsSucceeded, - streamsFailed: this.streamTracker.callsFailed, - messagesSent: this.messagesSent, - messagesReceived: this.messagesReceived, - keepAlivesSent: this.keepalivesSent, - lastLocalStreamCreatedTimestamp: this.streamTracker.lastCallStartedTimestamp, - lastRemoteStreamCreatedTimestamp: null, - lastMessageSentTimestamp: this.lastMessageSentTimestamp, - lastMessageReceivedTimestamp: this.lastMessageReceivedTimestamp, - localFlowControlWindow: (_b = this.session.state.localWindowSize) !== null && _b !== void 0 ? _b : null, - remoteFlowControlWindow: (_c = this.session.state.remoteWindowSize) !== null && _c !== void 0 ? _c : null, - }; - return socketInfo; - } - trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, '(' + - this.channelzRef.id + - ') ' + - this.subchannelAddressString + - ' ' + - text); - } - keepaliveTrace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, 'keepalive', '(' + - this.channelzRef.id + - ') ' + - this.subchannelAddressString + - ' ' + - text); - } - flowControlTrace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, FLOW_CONTROL_TRACER_NAME, '(' + - this.channelzRef.id + - ') ' + - this.subchannelAddressString + - ' ' + - text); - } - internalsTrace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, 'transport_internals', '(' + - this.channelzRef.id + - ') ' + - this.subchannelAddressString + - ' ' + - text); - } - /** - * Indicate to the owner of this object that this transport should no longer - * be used. That happens if the connection drops, or if the server sends a - * GOAWAY. - * @param tooManyPings If true, this was triggered by a GOAWAY with data - * indicating that the session was closed becaues the client sent too many - * pings. - * @returns - */ - reportDisconnectToOwner(tooManyPings) { - if (this.disconnectHandled) { - return; - } - this.disconnectHandled = true; - this.disconnectListeners.forEach(listener => listener(tooManyPings)); - } - /** - * Handle connection drops, but not GOAWAYs. - */ - handleDisconnect() { - this.clearKeepaliveTimeout(); - this.reportDisconnectToOwner(false); - for (const call of this.activeCalls) { - call.onDisconnect(); - } - // Wait an event loop cycle before destroying the connection - setImmediate(() => { - this.session.destroy(); - }); - } - addDisconnectListener(listener) { - this.disconnectListeners.push(listener); - } - canSendPing() { - return (!this.session.destroyed && - this.keepaliveTimeMs > 0 && - (this.keepaliveWithoutCalls || this.activeCalls.size > 0)); - } - maybeSendPing() { - var _a, _b; - if (!this.canSendPing()) { - this.pendingSendKeepalivePing = true; - return; - } - if (this.keepaliveTimer) { - console.error('keepaliveTimeout is not null'); - return; - } - if (this.channelzEnabled) { - this.keepalivesSent += 1; - } - this.keepaliveTrace('Sending ping with timeout ' + this.keepaliveTimeoutMs + 'ms'); - this.keepaliveTimer = setTimeout(() => { - this.keepaliveTimer = null; - this.keepaliveTrace('Ping timeout passed without response'); - this.handleDisconnect(); - }, this.keepaliveTimeoutMs); - (_b = (_a = this.keepaliveTimer).unref) === null || _b === void 0 ? void 0 : _b.call(_a); - let pingSendError = ''; - try { - const pingSentSuccessfully = this.session.ping((err, duration, payload) => { - this.clearKeepaliveTimeout(); - if (err) { - this.keepaliveTrace('Ping failed with error ' + err.message); - this.handleDisconnect(); - } - else { - this.keepaliveTrace('Received ping response'); - this.maybeStartKeepalivePingTimer(); - } - }); - if (!pingSentSuccessfully) { - pingSendError = 'Ping returned false'; - } - } - catch (e) { - // grpc/grpc-node#2139 - pingSendError = (e instanceof Error ? e.message : '') || 'Unknown error'; - } - if (pingSendError) { - this.keepaliveTrace('Ping send failed: ' + pingSendError); - this.handleDisconnect(); - } - } - /** - * Starts the keepalive ping timer if appropriate. If the timer already ran - * out while there were no active requests, instead send a ping immediately. - * If the ping timer is already running or a ping is currently in flight, - * instead do nothing and wait for them to resolve. - */ - maybeStartKeepalivePingTimer() { - var _a, _b; - if (!this.canSendPing()) { - return; - } - if (this.pendingSendKeepalivePing) { - this.pendingSendKeepalivePing = false; - this.maybeSendPing(); - } - else if (!this.keepaliveTimer) { - this.keepaliveTrace('Starting keepalive timer for ' + this.keepaliveTimeMs + 'ms'); - this.keepaliveTimer = setTimeout(() => { - this.keepaliveTimer = null; - this.maybeSendPing(); - }, this.keepaliveTimeMs); - (_b = (_a = this.keepaliveTimer).unref) === null || _b === void 0 ? void 0 : _b.call(_a); - } - /* Otherwise, there is already either a keepalive timer or a ping pending, - * wait for those to resolve. */ - } - /** - * Clears whichever keepalive timeout is currently active, if any. - */ - clearKeepaliveTimeout() { - if (this.keepaliveTimer) { - clearTimeout(this.keepaliveTimer); - this.keepaliveTimer = null; - } - } - removeActiveCall(call) { - this.activeCalls.delete(call); - if (this.activeCalls.size === 0) { - this.session.unref(); - } - } - addActiveCall(call) { - this.activeCalls.add(call); - if (this.activeCalls.size === 1) { - this.session.ref(); - if (!this.keepaliveWithoutCalls) { - this.maybeStartKeepalivePingTimer(); - } - } - } - createCall(metadata, host, method, listener, subchannelCallStatsTracker) { - const headers = metadata.toHttp2Headers(); - headers[HTTP2_HEADER_AUTHORITY] = host; - headers[HTTP2_HEADER_USER_AGENT] = this.userAgent; - headers[HTTP2_HEADER_CONTENT_TYPE] = 'application/grpc'; - headers[HTTP2_HEADER_METHOD] = 'POST'; - headers[HTTP2_HEADER_PATH] = method; - headers[HTTP2_HEADER_TE] = 'trailers'; - let http2Stream; - /* In theory, if an error is thrown by session.request because session has - * become unusable (e.g. because it has received a goaway), this subchannel - * should soon see the corresponding close or goaway event anyway and leave - * READY. But we have seen reports that this does not happen - * (https://github.com/googleapis/nodejs-firestore/issues/1023#issuecomment-653204096) - * so for defense in depth, we just discard the session when we see an - * error here. - */ - try { - http2Stream = this.session.request(headers); - } - catch (e) { - this.handleDisconnect(); - throw e; - } - this.flowControlTrace('local window size: ' + - this.session.state.localWindowSize + - ' remote window size: ' + - this.session.state.remoteWindowSize); - this.internalsTrace('session.closed=' + - this.session.closed + - ' session.destroyed=' + - this.session.destroyed + - ' session.socket.destroyed=' + - this.session.socket.destroyed); - let eventTracker; - // eslint-disable-next-line prefer-const - let call; - if (this.channelzEnabled) { - this.streamTracker.addCallStarted(); - eventTracker = { - addMessageSent: () => { - var _a; - this.messagesSent += 1; - this.lastMessageSentTimestamp = new Date(); - (_a = subchannelCallStatsTracker.addMessageSent) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker); - }, - addMessageReceived: () => { - var _a; - this.messagesReceived += 1; - this.lastMessageReceivedTimestamp = new Date(); - (_a = subchannelCallStatsTracker.addMessageReceived) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker); - }, - onCallEnd: status => { - var _a; - (_a = subchannelCallStatsTracker.onCallEnd) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker, status); - this.removeActiveCall(call); - }, - onStreamEnd: success => { - var _a; - if (success) { - this.streamTracker.addCallSucceeded(); - } - else { - this.streamTracker.addCallFailed(); - } - (_a = subchannelCallStatsTracker.onStreamEnd) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker, success); - }, - }; - } - else { - eventTracker = { - addMessageSent: () => { - var _a; - (_a = subchannelCallStatsTracker.addMessageSent) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker); - }, - addMessageReceived: () => { - var _a; - (_a = subchannelCallStatsTracker.addMessageReceived) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker); - }, - onCallEnd: status => { - var _a; - (_a = subchannelCallStatsTracker.onCallEnd) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker, status); - this.removeActiveCall(call); - }, - onStreamEnd: success => { - var _a; - (_a = subchannelCallStatsTracker.onStreamEnd) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker, success); - }, - }; - } - call = new subchannel_call_1.Http2SubchannelCall(http2Stream, eventTracker, listener, this, (0, call_number_1.getNextCallNumber)()); - this.addActiveCall(call); - return call; - } - getChannelzRef() { - return this.channelzRef; - } - getPeerName() { - return this.subchannelAddressString; - } - getOptions() { - return this.options; - } - getAuthContext() { - return this.authContext; - } - shutdown() { - this.session.close(); - (0, channelz_1.unregisterChannelzRef)(this.channelzRef); - } -} -class Http2SubchannelConnector { - constructor(channelTarget) { - this.channelTarget = channelTarget; - this.session = null; - this.isShutdown = false; - } - trace(text) { - logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, (0, uri_parser_1.uriToString)(this.channelTarget) + ' ' + text); - } - createSession(secureConnectResult, address, options) { - if (this.isShutdown) { - return Promise.reject(); - } - if (secureConnectResult.socket.closed) { - return Promise.reject('Connection closed before starting HTTP/2 handshake'); - } - return new Promise((resolve, reject) => { - var _a, _b, _c, _d, _e, _f, _g, _h; - let remoteName = null; - let realTarget = this.channelTarget; - if ('grpc.http_connect_target' in options) { - const parsedTarget = (0, uri_parser_1.parseUri)(options['grpc.http_connect_target']); - if (parsedTarget) { - realTarget = parsedTarget; - remoteName = (0, uri_parser_1.uriToString)(parsedTarget); - } - } - const scheme = secureConnectResult.secure ? 'https' : 'http'; - const targetPath = (0, resolver_1.getDefaultAuthority)(realTarget); - const closeHandler = () => { - var _a; - (_a = this.session) === null || _a === void 0 ? void 0 : _a.destroy(); - this.session = null; - // Leave time for error event to happen before rejecting - setImmediate(() => { - if (!reportedError) { - reportedError = true; - reject(`${errorMessage.trim()} (${new Date().toISOString()})`); - } - }); - }; - const errorHandler = (error) => { - var _a; - (_a = this.session) === null || _a === void 0 ? void 0 : _a.destroy(); - errorMessage = error.message; - this.trace('connection failed with error ' + errorMessage); - if (!reportedError) { - reportedError = true; - reject(`${errorMessage} (${new Date().toISOString()})`); - } - }; - const sessionOptions = { - createConnection: (authority, option) => { - return secureConnectResult.socket; - }, - settings: { - initialWindowSize: (_d = (_a = options['grpc-node.flow_control_window']) !== null && _a !== void 0 ? _a : (_c = (_b = http2.getDefaultSettings) === null || _b === void 0 ? void 0 : _b.call(http2)) === null || _c === void 0 ? void 0 : _c.initialWindowSize) !== null && _d !== void 0 ? _d : 65535, - }, - maxSendHeaderBlockLength: Number.MAX_SAFE_INTEGER, - /* By default, set a very large max session memory limit, to effectively - * disable enforcement of the limit. Some testing indicates that Node's - * behavior degrades badly when this limit is reached, so we solve that - * by disabling the check entirely. */ - maxSessionMemory: (_e = options['grpc-node.max_session_memory']) !== null && _e !== void 0 ? _e : Number.MAX_SAFE_INTEGER - }; - const session = http2.connect(`${scheme}://${targetPath}`, sessionOptions); - // Prepare window size configuration for remoteSettings handler - const defaultWin = (_h = (_g = (_f = http2.getDefaultSettings) === null || _f === void 0 ? void 0 : _f.call(http2)) === null || _g === void 0 ? void 0 : _g.initialWindowSize) !== null && _h !== void 0 ? _h : 65535; // 65 535 B - const connWin = options['grpc-node.flow_control_window']; - this.session = session; - let errorMessage = 'Failed to connect'; - let reportedError = false; - session.unref(); - session.once('remoteSettings', () => { - var _a; - // Send WINDOW_UPDATE now to avoid 65 KB start-window stall. - if (connWin && connWin > defaultWin) { - try { - // Node ≥ 14.18 - session.setLocalWindowSize(connWin); - } - catch (_b) { - // Older Node: bump by the delta - const delta = connWin - ((_a = session.state.localWindowSize) !== null && _a !== void 0 ? _a : defaultWin); - if (delta > 0) - session.incrementWindowSize(delta); - } - } - session.removeAllListeners(); - secureConnectResult.socket.removeListener('close', closeHandler); - secureConnectResult.socket.removeListener('error', errorHandler); - resolve(new Http2Transport(session, address, options, remoteName)); - this.session = null; - }); - session.once('close', closeHandler); - session.once('error', errorHandler); - secureConnectResult.socket.once('close', closeHandler); - secureConnectResult.socket.once('error', errorHandler); - }); - } - tcpConnect(address, options) { - return (0, http_proxy_1.getProxiedConnection)(address, options).then(proxiedSocket => { - if (proxiedSocket) { - return proxiedSocket; - } - else { - return new Promise((resolve, reject) => { - const closeCallback = () => { - reject(new Error('Socket closed')); - }; - const errorCallback = (error) => { - reject(error); - }; - const socket = net.connect(address, () => { - socket.removeListener('close', closeCallback); - socket.removeListener('error', errorCallback); - resolve(socket); - }); - socket.once('close', closeCallback); - socket.once('error', errorCallback); - }); - } - }); - } - async connect(address, secureConnector, options) { - if (this.isShutdown) { - return Promise.reject(); - } - let tcpConnection = null; - let secureConnectResult = null; - const addressString = (0, subchannel_address_1.subchannelAddressToString)(address); - try { - this.trace(addressString + ' Waiting for secureConnector to be ready'); - await secureConnector.waitForReady(); - this.trace(addressString + ' secureConnector is ready'); - tcpConnection = await this.tcpConnect(address, options); - tcpConnection.setNoDelay(); - this.trace(addressString + ' Established TCP connection'); - secureConnectResult = await secureConnector.connect(tcpConnection); - this.trace(addressString + ' Established secure connection'); - return this.createSession(secureConnectResult, address, options); - } - catch (e) { - tcpConnection === null || tcpConnection === void 0 ? void 0 : tcpConnection.destroy(); - secureConnectResult === null || secureConnectResult === void 0 ? void 0 : secureConnectResult.socket.destroy(); - throw e; - } - } - shutdown() { - var _a; - this.isShutdown = true; - (_a = this.session) === null || _a === void 0 ? void 0 : _a.close(); - this.session = null; - } -} -exports.Http2SubchannelConnector = Http2SubchannelConnector; -//# sourceMappingURL=transport.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/transport.js.map b/node_modules/@grpc/grpc-js/build/src/transport.js.map deleted file mode 100644 index 06e7fcd..0000000 --- a/node_modules/@grpc/grpc-js/build/src/transport.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,+BAA+B;AAC/B,6BAGa;AAIb,yCAQoB;AACpB,2CAA2C;AAC3C,6CAAoD;AACpD,qCAAqC;AACrC,yCAAiD;AACjD,6DAI8B;AAC9B,6CAA8D;AAC9D,2BAA2B;AAC3B,uDAI2B;AAE3B,+CAAkD;AAIlD,MAAM,WAAW,GAAG,WAAW,CAAC;AAChC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAEtD,MAAM,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;AAE5D,MAAM,EACJ,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,uBAAuB,GACxB,GAAG,KAAK,CAAC,SAAS,CAAC;AAEpB,MAAM,oBAAoB,GAAG,KAAK,CAAC;AA6BnC,MAAM,gBAAgB,GAAW,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAExE,MAAM,cAAc;IA6ClB,YACU,OAAiC,EACzC,iBAAoC,EAC5B,OAAuB;IAC/B;;;OAGG;IACK,UAAyB;QAPzB,YAAO,GAAP,OAAO,CAA0B;QAEjC,YAAO,GAAP,OAAO,CAAgB;QAKvB,eAAU,GAAV,UAAU,CAAe;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AAa,CAAC,mBAAmB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACnE,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,EAAE,CAAC;YACzB,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,MAAM,CAAC,OAAO,EAAE,CAAC;YACtC,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC;IAED,QAAQ;;QACN,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,MAAA,IAAI,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;CACF;AAxKD,4DAwKC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/uri-parser.d.ts b/node_modules/@grpc/grpc-js/build/src/uri-parser.d.ts deleted file mode 100644 index 26db9c6..0000000 --- a/node_modules/@grpc/grpc-js/build/src/uri-parser.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface GrpcUri { - scheme?: string; - authority?: string; - path: string; -} -export declare function parseUri(uriString: string): GrpcUri | null; -export interface HostPort { - host: string; - port?: number; -} -export declare function splitHostPort(path: string): HostPort | null; -export declare function combineHostPort(hostPort: HostPort): string; -export declare function uriToString(uri: GrpcUri): string; diff --git a/node_modules/@grpc/grpc-js/build/src/uri-parser.js b/node_modules/@grpc/grpc-js/build/src/uri-parser.js deleted file mode 100644 index 5b4e6d5..0000000 --- a/node_modules/@grpc/grpc-js/build/src/uri-parser.js +++ /dev/null @@ -1,125 +0,0 @@ -"use strict"; -/* - * Copyright 2020 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseUri = parseUri; -exports.splitHostPort = splitHostPort; -exports.combineHostPort = combineHostPort; -exports.uriToString = uriToString; -/* - * The groups correspond to URI parts as follows: - * 1. scheme - * 2. authority - * 3. path - */ -const URI_REGEX = /^(?:([A-Za-z0-9+.-]+):)?(?:\/\/([^/]*)\/)?(.+)$/; -function parseUri(uriString) { - const parsedUri = URI_REGEX.exec(uriString); - if (parsedUri === null) { - return null; - } - return { - scheme: parsedUri[1], - authority: parsedUri[2], - path: parsedUri[3], - }; -} -const NUMBER_REGEX = /^\d+$/; -function splitHostPort(path) { - if (path.startsWith('[')) { - const hostEnd = path.indexOf(']'); - if (hostEnd === -1) { - return null; - } - const host = path.substring(1, hostEnd); - /* Only an IPv6 address should be in bracketed notation, and an IPv6 - * address should have at least one colon */ - if (host.indexOf(':') === -1) { - return null; - } - if (path.length > hostEnd + 1) { - if (path[hostEnd + 1] === ':') { - const portString = path.substring(hostEnd + 2); - if (NUMBER_REGEX.test(portString)) { - return { - host: host, - port: +portString, - }; - } - else { - return null; - } - } - else { - return null; - } - } - else { - return { - host, - }; - } - } - else { - const splitPath = path.split(':'); - /* Exactly one colon means that this is host:port. Zero colons means that - * there is no port. And multiple colons means that this is a bare IPv6 - * address with no port */ - if (splitPath.length === 2) { - if (NUMBER_REGEX.test(splitPath[1])) { - return { - host: splitPath[0], - port: +splitPath[1], - }; - } - else { - return null; - } - } - else { - return { - host: path, - }; - } - } -} -function combineHostPort(hostPort) { - if (hostPort.port === undefined) { - return hostPort.host; - } - else { - // Only an IPv6 host should include a colon - if (hostPort.host.includes(':')) { - return `[${hostPort.host}]:${hostPort.port}`; - } - else { - return `${hostPort.host}:${hostPort.port}`; - } - } -} -function uriToString(uri) { - let result = ''; - if (uri.scheme !== undefined) { - result += uri.scheme + ':'; - } - if (uri.authority !== undefined) { - result += '//' + uri.authority + '/'; - } - result += uri.path; - return result; -} -//# sourceMappingURL=uri-parser.js.map \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/build/src/uri-parser.js.map b/node_modules/@grpc/grpc-js/build/src/uri-parser.js.map deleted file mode 100644 index 878db02..0000000 --- a/node_modules/@grpc/grpc-js/build/src/uri-parser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"uri-parser.js","sourceRoot":"","sources":["../../src/uri-parser.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAgBH,4BAUC;AASD,sCAmDC;AAED,0CAWC;AAED,kCAUC;AAvGD;;;;;GAKG;AACH,MAAM,SAAS,GAAG,iDAAiD,CAAC;AAEpE,SAAgB,QAAQ,CAAC,SAAiB;IACxC,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC5C,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO;QACL,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;QACpB,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;QACvB,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;KACnB,CAAC;AACJ,CAAC;AAOD,MAAM,YAAY,GAAG,OAAO,CAAC;AAE7B,SAAgB,aAAa,CAAC,IAAY;IACxC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;QACxC;oDAC4C;QAC5C,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YAC7B,OAAO,IAA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CAAC;QACN,2CAA2C;QAC3C,IAAI,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,OAAO,IAAI,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC/C,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC7C,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAgB,WAAW,CAAC,GAAY;IACtC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC;IAC7B,CAAC;IACD,IAAI,GAAG,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QAChC,MAAM,IAAI,IAAI,GAAG,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC;IACvC,CAAC;IACD,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC;IACnB,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/package.json b/node_modules/@grpc/grpc-js/package.json deleted file mode 100644 index 4cf0a28..0000000 --- a/node_modules/@grpc/grpc-js/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "name": "@grpc/grpc-js", - "version": "1.14.4", - "description": "gRPC Library for Node - pure JS implementation", - "homepage": "https://grpc.io/", - "repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js", - "main": "build/src/index.js", - "engines": { - "node": ">=12.10.0" - }, - "keywords": [], - "author": { - "name": "Google Inc." - }, - "types": "build/src/index.d.ts", - "license": "Apache-2.0", - "devDependencies": { - "@grpc/proto-loader": "file:../proto-loader", - "@types/gulp": "^4.0.17", - "@types/gulp-mocha": "0.0.37", - "@types/lodash": "^4.14.202", - "@types/mocha": "^10.0.6", - "@types/ncp": "^2.0.8", - "@types/node": ">=20.11.20", - "@types/pify": "^5.0.4", - "@types/semver": "^7.5.8", - "@typescript-eslint/eslint-plugin": "^7.1.0", - "@typescript-eslint/parser": "^7.1.0", - "@typescript-eslint/typescript-estree": "^7.1.0", - "clang-format": "^1.8.0", - "eslint": "^8.42.0", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^4.2.1", - "execa": "^2.0.3", - "gulp": "^4.0.2", - "gulp-mocha": "^6.0.0", - "lodash": "^4.17.21", - "madge": "^5.0.1", - "mocha-jenkins-reporter": "^0.4.1", - "ncp": "^2.0.0", - "pify": "^4.0.1", - "prettier": "^2.8.8", - "rimraf": "^3.0.2", - "semver": "^7.6.0", - "ts-node": "^10.9.2", - "typescript": "^5.3.3" - }, - "contributors": [ - { - "name": "Google Inc." - } - ], - "scripts": { - "build": "npm run compile", - "clean": "rimraf ./build", - "compile": "tsc -p .", - "format": "clang-format -i -style=\"{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}\" src/*.ts test/*.ts", - "lint": "eslint src/*.ts test/*.ts", - "prepare": "npm run copy-protos && npm run generate-types && npm run generate-test-types && npm run compile", - "test": "gulp test", - "check": "npm run lint", - "fix": "eslint --fix src/*.ts test/*.ts", - "pretest": "npm run generate-types && npm run generate-test-types && npm run compile", - "posttest": "npm run check && madge -c ./build/src", - "generate-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs proto/ --include-dirs proto/ proto/xds/ proto/protoc-gen-validate/ -O src/generated/ --grpcLib ../index channelz.proto xds/service/orca/v3/orca.proto", - "generate-test-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --include-dirs test/fixtures/ -O test/generated/ --grpcLib ../../src/index test_service.proto echo_service.proto", - "copy-protos": "node ./copy-protos" - }, - "dependencies": { - "@grpc/proto-loader": "^0.8.0", - "@js-sdsl/ordered-map": "^4.4.2" - }, - "files": [ - "src/**/*.ts", - "build/src/**/*.{js,d.ts,js.map}", - "proto/**/*.proto", - "proto/**/LICENSE", - "LICENSE", - "deps/envoy-api/envoy/api/v2/**/*.proto", - "deps/envoy-api/envoy/config/**/*.proto", - "deps/envoy-api/envoy/service/**/*.proto", - "deps/envoy-api/envoy/type/**/*.proto", - "deps/udpa/udpa/**/*.proto", - "deps/googleapis/google/api/*.proto", - "deps/googleapis/google/rpc/*.proto", - "deps/protoc-gen-validate/validate/**/*.proto" - ] -} diff --git a/node_modules/@grpc/grpc-js/proto/channelz.proto b/node_modules/@grpc/grpc-js/proto/channelz.proto deleted file mode 100644 index 446e979..0000000 --- a/node_modules/@grpc/grpc-js/proto/channelz.proto +++ /dev/null @@ -1,564 +0,0 @@ -// Copyright 2018 The gRPC Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file defines an interface for exporting monitoring information -// out of gRPC servers. See the full design at -// https://github.com/grpc/proposal/blob/master/A14-channelz.md -// -// The canonical version of this proto can be found at -// https://github.com/grpc/grpc-proto/blob/master/grpc/channelz/v1/channelz.proto - -syntax = "proto3"; - -package grpc.channelz.v1; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -option go_package = "google.golang.org/grpc/channelz/grpc_channelz_v1"; -option java_multiple_files = true; -option java_package = "io.grpc.channelz.v1"; -option java_outer_classname = "ChannelzProto"; - -// Channel is a logical grouping of channels, subchannels, and sockets. -message Channel { - // The identifier for this channel. This should bet set. - ChannelRef ref = 1; - // Data specific to this channel. - ChannelData data = 2; - // At most one of 'channel_ref+subchannel_ref' and 'socket' is set. - - // There are no ordering guarantees on the order of channel refs. - // There may not be cycles in the ref graph. - // A channel ref may be present in more than one channel or subchannel. - repeated ChannelRef channel_ref = 3; - - // At most one of 'channel_ref+subchannel_ref' and 'socket' is set. - // There are no ordering guarantees on the order of subchannel refs. - // There may not be cycles in the ref graph. - // A sub channel ref may be present in more than one channel or subchannel. - repeated SubchannelRef subchannel_ref = 4; - - // There are no ordering guarantees on the order of sockets. - repeated SocketRef socket_ref = 5; -} - -// Subchannel is a logical grouping of channels, subchannels, and sockets. -// A subchannel is load balanced over by it's ancestor -message Subchannel { - // The identifier for this channel. - SubchannelRef ref = 1; - // Data specific to this channel. - ChannelData data = 2; - // At most one of 'channel_ref+subchannel_ref' and 'socket' is set. - - // There are no ordering guarantees on the order of channel refs. - // There may not be cycles in the ref graph. - // A channel ref may be present in more than one channel or subchannel. - repeated ChannelRef channel_ref = 3; - - // At most one of 'channel_ref+subchannel_ref' and 'socket' is set. - // There are no ordering guarantees on the order of subchannel refs. - // There may not be cycles in the ref graph. - // A sub channel ref may be present in more than one channel or subchannel. - repeated SubchannelRef subchannel_ref = 4; - - // There are no ordering guarantees on the order of sockets. - repeated SocketRef socket_ref = 5; -} - -// These come from the specified states in this document: -// https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md -message ChannelConnectivityState { - enum State { - UNKNOWN = 0; - IDLE = 1; - CONNECTING = 2; - READY = 3; - TRANSIENT_FAILURE = 4; - SHUTDOWN = 5; - } - State state = 1; -} - -// Channel data is data related to a specific Channel or Subchannel. -message ChannelData { - // The connectivity state of the channel or subchannel. Implementations - // should always set this. - ChannelConnectivityState state = 1; - - // The target this channel originally tried to connect to. May be absent - string target = 2; - - // A trace of recent events on the channel. May be absent. - ChannelTrace trace = 3; - - // The number of calls started on the channel - int64 calls_started = 4; - // The number of calls that have completed with an OK status - int64 calls_succeeded = 5; - // The number of calls that have completed with a non-OK status - int64 calls_failed = 6; - - // The last time a call was started on the channel. - google.protobuf.Timestamp last_call_started_timestamp = 7; -} - -// A trace event is an interesting thing that happened to a channel or -// subchannel, such as creation, address resolution, subchannel creation, etc. -message ChannelTraceEvent { - // High level description of the event. - string description = 1; - // The supported severity levels of trace events. - enum Severity { - CT_UNKNOWN = 0; - CT_INFO = 1; - CT_WARNING = 2; - CT_ERROR = 3; - } - // the severity of the trace event - Severity severity = 2; - // When this event occurred. - google.protobuf.Timestamp timestamp = 3; - // ref of referenced channel or subchannel. - // Optional, only present if this event refers to a child object. For example, - // this field would be filled if this trace event was for a subchannel being - // created. - oneof child_ref { - ChannelRef channel_ref = 4; - SubchannelRef subchannel_ref = 5; - } -} - -// ChannelTrace represents the recent events that have occurred on the channel. -message ChannelTrace { - // Number of events ever logged in this tracing object. This can differ from - // events.size() because events can be overwritten or garbage collected by - // implementations. - int64 num_events_logged = 1; - // Time that this channel was created. - google.protobuf.Timestamp creation_timestamp = 2; - // List of events that have occurred on this channel. - repeated ChannelTraceEvent events = 3; -} - -// ChannelRef is a reference to a Channel. -message ChannelRef { - // The globally unique id for this channel. Must be a positive number. - int64 channel_id = 1; - // An optional name associated with the channel. - string name = 2; - // Intentionally don't use field numbers from other refs. - reserved 3, 4, 5, 6, 7, 8; -} - -// SubchannelRef is a reference to a Subchannel. -message SubchannelRef { - // The globally unique id for this subchannel. Must be a positive number. - int64 subchannel_id = 7; - // An optional name associated with the subchannel. - string name = 8; - // Intentionally don't use field numbers from other refs. - reserved 1, 2, 3, 4, 5, 6; -} - -// SocketRef is a reference to a Socket. -message SocketRef { - // The globally unique id for this socket. Must be a positive number. - int64 socket_id = 3; - // An optional name associated with the socket. - string name = 4; - // Intentionally don't use field numbers from other refs. - reserved 1, 2, 5, 6, 7, 8; -} - -// ServerRef is a reference to a Server. -message ServerRef { - // A globally unique identifier for this server. Must be a positive number. - int64 server_id = 5; - // An optional name associated with the server. - string name = 6; - // Intentionally don't use field numbers from other refs. - reserved 1, 2, 3, 4, 7, 8; -} - -// Server represents a single server. There may be multiple servers in a single -// program. -message Server { - // The identifier for a Server. This should be set. - ServerRef ref = 1; - // The associated data of the Server. - ServerData data = 2; - - // The sockets that the server is listening on. There are no ordering - // guarantees. This may be absent. - repeated SocketRef listen_socket = 3; -} - -// ServerData is data for a specific Server. -message ServerData { - // A trace of recent events on the server. May be absent. - ChannelTrace trace = 1; - - // The number of incoming calls started on the server - int64 calls_started = 2; - // The number of incoming calls that have completed with an OK status - int64 calls_succeeded = 3; - // The number of incoming calls that have a completed with a non-OK status - int64 calls_failed = 4; - - // The last time a call was started on the server. - google.protobuf.Timestamp last_call_started_timestamp = 5; -} - -// Information about an actual connection. Pronounced "sock-ay". -message Socket { - // The identifier for the Socket. - SocketRef ref = 1; - - // Data specific to this Socket. - SocketData data = 2; - // The locally bound address. - Address local = 3; - // The remote bound address. May be absent. - Address remote = 4; - // Security details for this socket. May be absent if not available, or - // there is no security on the socket. - Security security = 5; - - // Optional, represents the name of the remote endpoint, if different than - // the original target name. - string remote_name = 6; -} - -// SocketData is data associated for a specific Socket. The fields present -// are specific to the implementation, so there may be minor differences in -// the semantics. (e.g. flow control windows) -message SocketData { - // The number of streams that have been started. - int64 streams_started = 1; - // The number of streams that have ended successfully: - // On client side, received frame with eos bit set; - // On server side, sent frame with eos bit set. - int64 streams_succeeded = 2; - // The number of streams that have ended unsuccessfully: - // On client side, ended without receiving frame with eos bit set; - // On server side, ended without sending frame with eos bit set. - int64 streams_failed = 3; - // The number of grpc messages successfully sent on this socket. - int64 messages_sent = 4; - // The number of grpc messages received on this socket. - int64 messages_received = 5; - - // The number of keep alives sent. This is typically implemented with HTTP/2 - // ping messages. - int64 keep_alives_sent = 6; - - // The last time a stream was created by this endpoint. Usually unset for - // servers. - google.protobuf.Timestamp last_local_stream_created_timestamp = 7; - // The last time a stream was created by the remote endpoint. Usually unset - // for clients. - google.protobuf.Timestamp last_remote_stream_created_timestamp = 8; - - // The last time a message was sent by this endpoint. - google.protobuf.Timestamp last_message_sent_timestamp = 9; - // The last time a message was received by this endpoint. - google.protobuf.Timestamp last_message_received_timestamp = 10; - - // The amount of window, granted to the local endpoint by the remote endpoint. - // This may be slightly out of date due to network latency. This does NOT - // include stream level or TCP level flow control info. - google.protobuf.Int64Value local_flow_control_window = 11; - - // The amount of window, granted to the remote endpoint by the local endpoint. - // This may be slightly out of date due to network latency. This does NOT - // include stream level or TCP level flow control info. - google.protobuf.Int64Value remote_flow_control_window = 12; - - // Socket options set on this socket. May be absent if 'summary' is set - // on GetSocketRequest. - repeated SocketOption option = 13; -} - -// Address represents the address used to create the socket. -message Address { - message TcpIpAddress { - // Either the IPv4 or IPv6 address in bytes. Will be either 4 bytes or 16 - // bytes in length. - bytes ip_address = 1; - // 0-64k, or -1 if not appropriate. - int32 port = 2; - } - // A Unix Domain Socket address. - message UdsAddress { - string filename = 1; - } - // An address type not included above. - message OtherAddress { - // The human readable version of the value. This value should be set. - string name = 1; - // The actual address message. - google.protobuf.Any value = 2; - } - - oneof address { - TcpIpAddress tcpip_address = 1; - UdsAddress uds_address = 2; - OtherAddress other_address = 3; - } -} - -// Security represents details about how secure the socket is. -message Security { - message Tls { - oneof cipher_suite { - // The cipher suite name in the RFC 4346 format: - // https://tools.ietf.org/html/rfc4346#appendix-C - string standard_name = 1; - // Some other way to describe the cipher suite if - // the RFC 4346 name is not available. - string other_name = 2; - } - // the certificate used by this endpoint. - bytes local_certificate = 3; - // the certificate used by the remote endpoint. - bytes remote_certificate = 4; - } - message OtherSecurity { - // The human readable version of the value. - string name = 1; - // The actual security details message. - google.protobuf.Any value = 2; - } - oneof model { - Tls tls = 1; - OtherSecurity other = 2; - } -} - -// SocketOption represents socket options for a socket. Specifically, these -// are the options returned by getsockopt(). -message SocketOption { - // The full name of the socket option. Typically this will be the upper case - // name, such as "SO_REUSEPORT". - string name = 1; - // The human readable value of this socket option. At least one of value or - // additional will be set. - string value = 2; - // Additional data associated with the socket option. At least one of value - // or additional will be set. - google.protobuf.Any additional = 3; -} - -// For use with SocketOption's additional field. This is primarily used for -// SO_RCVTIMEO and SO_SNDTIMEO -message SocketOptionTimeout { - google.protobuf.Duration duration = 1; -} - -// For use with SocketOption's additional field. This is primarily used for -// SO_LINGER. -message SocketOptionLinger { - // active maps to `struct linger.l_onoff` - bool active = 1; - // duration maps to `struct linger.l_linger` - google.protobuf.Duration duration = 2; -} - -// For use with SocketOption's additional field. Tcp info for -// SOL_TCP and TCP_INFO. -message SocketOptionTcpInfo { - uint32 tcpi_state = 1; - - uint32 tcpi_ca_state = 2; - uint32 tcpi_retransmits = 3; - uint32 tcpi_probes = 4; - uint32 tcpi_backoff = 5; - uint32 tcpi_options = 6; - uint32 tcpi_snd_wscale = 7; - uint32 tcpi_rcv_wscale = 8; - - uint32 tcpi_rto = 9; - uint32 tcpi_ato = 10; - uint32 tcpi_snd_mss = 11; - uint32 tcpi_rcv_mss = 12; - - uint32 tcpi_unacked = 13; - uint32 tcpi_sacked = 14; - uint32 tcpi_lost = 15; - uint32 tcpi_retrans = 16; - uint32 tcpi_fackets = 17; - - uint32 tcpi_last_data_sent = 18; - uint32 tcpi_last_ack_sent = 19; - uint32 tcpi_last_data_recv = 20; - uint32 tcpi_last_ack_recv = 21; - - uint32 tcpi_pmtu = 22; - uint32 tcpi_rcv_ssthresh = 23; - uint32 tcpi_rtt = 24; - uint32 tcpi_rttvar = 25; - uint32 tcpi_snd_ssthresh = 26; - uint32 tcpi_snd_cwnd = 27; - uint32 tcpi_advmss = 28; - uint32 tcpi_reordering = 29; -} - -// Channelz is a service exposed by gRPC servers that provides detailed debug -// information. -service Channelz { - // Gets all root channels (i.e. channels the application has directly - // created). This does not include subchannels nor non-top level channels. - rpc GetTopChannels(GetTopChannelsRequest) returns (GetTopChannelsResponse); - // Gets all servers that exist in the process. - rpc GetServers(GetServersRequest) returns (GetServersResponse); - // Returns a single Server, or else a NOT_FOUND code. - rpc GetServer(GetServerRequest) returns (GetServerResponse); - // Gets all server sockets that exist in the process. - rpc GetServerSockets(GetServerSocketsRequest) returns (GetServerSocketsResponse); - // Returns a single Channel, or else a NOT_FOUND code. - rpc GetChannel(GetChannelRequest) returns (GetChannelResponse); - // Returns a single Subchannel, or else a NOT_FOUND code. - rpc GetSubchannel(GetSubchannelRequest) returns (GetSubchannelResponse); - // Returns a single Socket or else a NOT_FOUND code. - rpc GetSocket(GetSocketRequest) returns (GetSocketResponse); -} - -message GetTopChannelsRequest { - // start_channel_id indicates that only channels at or above this id should be - // included in the results. - // To request the first page, this should be set to 0. To request - // subsequent pages, the client generates this value by adding 1 to - // the highest seen result ID. - int64 start_channel_id = 1; - - // If non-zero, the server will return a page of results containing - // at most this many items. If zero, the server will choose a - // reasonable page size. Must never be negative. - int64 max_results = 2; -} - -message GetTopChannelsResponse { - // list of channels that the connection detail service knows about. Sorted in - // ascending channel_id order. - // Must contain at least 1 result, otherwise 'end' must be true. - repeated Channel channel = 1; - // If set, indicates that the list of channels is the final list. Requesting - // more channels can only return more if they are created after this RPC - // completes. - bool end = 2; -} - -message GetServersRequest { - // start_server_id indicates that only servers at or above this id should be - // included in the results. - // To request the first page, this must be set to 0. To request - // subsequent pages, the client generates this value by adding 1 to - // the highest seen result ID. - int64 start_server_id = 1; - - // If non-zero, the server will return a page of results containing - // at most this many items. If zero, the server will choose a - // reasonable page size. Must never be negative. - int64 max_results = 2; -} - -message GetServersResponse { - // list of servers that the connection detail service knows about. Sorted in - // ascending server_id order. - // Must contain at least 1 result, otherwise 'end' must be true. - repeated Server server = 1; - // If set, indicates that the list of servers is the final list. Requesting - // more servers will only return more if they are created after this RPC - // completes. - bool end = 2; -} - -message GetServerRequest { - // server_id is the identifier of the specific server to get. - int64 server_id = 1; -} - -message GetServerResponse { - // The Server that corresponds to the requested server_id. This field - // should be set. - Server server = 1; -} - -message GetServerSocketsRequest { - int64 server_id = 1; - // start_socket_id indicates that only sockets at or above this id should be - // included in the results. - // To request the first page, this must be set to 0. To request - // subsequent pages, the client generates this value by adding 1 to - // the highest seen result ID. - int64 start_socket_id = 2; - - // If non-zero, the server will return a page of results containing - // at most this many items. If zero, the server will choose a - // reasonable page size. Must never be negative. - int64 max_results = 3; -} - -message GetServerSocketsResponse { - // list of socket refs that the connection detail service knows about. Sorted in - // ascending socket_id order. - // Must contain at least 1 result, otherwise 'end' must be true. - repeated SocketRef socket_ref = 1; - // If set, indicates that the list of sockets is the final list. Requesting - // more sockets will only return more if they are created after this RPC - // completes. - bool end = 2; -} - -message GetChannelRequest { - // channel_id is the identifier of the specific channel to get. - int64 channel_id = 1; -} - -message GetChannelResponse { - // The Channel that corresponds to the requested channel_id. This field - // should be set. - Channel channel = 1; -} - -message GetSubchannelRequest { - // subchannel_id is the identifier of the specific subchannel to get. - int64 subchannel_id = 1; -} - -message GetSubchannelResponse { - // The Subchannel that corresponds to the requested subchannel_id. This - // field should be set. - Subchannel subchannel = 1; -} - -message GetSocketRequest { - // socket_id is the identifier of the specific socket to get. - int64 socket_id = 1; - - // If true, the response will contain only high level information - // that is inexpensive to obtain. Fields thay may be omitted are - // documented. - bool summary = 2; -} - -message GetSocketResponse { - // The Socket that corresponds to the requested socket_id. This field - // should be set. - Socket socket = 1; -} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/proto/protoc-gen-validate/LICENSE b/node_modules/@grpc/grpc-js/proto/protoc-gen-validate/LICENSE deleted file mode 100644 index d645695..0000000 --- a/node_modules/@grpc/grpc-js/proto/protoc-gen-validate/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/@grpc/grpc-js/proto/protoc-gen-validate/validate/validate.proto b/node_modules/@grpc/grpc-js/proto/protoc-gen-validate/validate/validate.proto deleted file mode 100644 index 7767f0a..0000000 --- a/node_modules/@grpc/grpc-js/proto/protoc-gen-validate/validate/validate.proto +++ /dev/null @@ -1,797 +0,0 @@ -syntax = "proto2"; -package validate; - -option go_package = "github.com/envoyproxy/protoc-gen-validate/validate"; -option java_package = "io.envoyproxy.pgv.validate"; - -import "google/protobuf/descriptor.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -// Validation rules applied at the message level -extend google.protobuf.MessageOptions { - // Disabled nullifies any validation rules for this message, including any - // message fields associated with it that do support validation. - optional bool disabled = 1071; -} - -// Validation rules applied at the oneof level -extend google.protobuf.OneofOptions { - // Required ensures that exactly one the field options in a oneof is set; - // validation fails if no fields in the oneof are set. - optional bool required = 1071; -} - -// Validation rules applied at the field level -extend google.protobuf.FieldOptions { - // Rules specify the validations to be performed on this field. By default, - // no validation is performed against a field. - optional FieldRules rules = 1071; -} - -// FieldRules encapsulates the rules for each type of field. Depending on the -// field, the correct set should be used to ensure proper validations. -message FieldRules { - optional MessageRules message = 17; - oneof type { - // Scalar Field Types - FloatRules float = 1; - DoubleRules double = 2; - Int32Rules int32 = 3; - Int64Rules int64 = 4; - UInt32Rules uint32 = 5; - UInt64Rules uint64 = 6; - SInt32Rules sint32 = 7; - SInt64Rules sint64 = 8; - Fixed32Rules fixed32 = 9; - Fixed64Rules fixed64 = 10; - SFixed32Rules sfixed32 = 11; - SFixed64Rules sfixed64 = 12; - BoolRules bool = 13; - StringRules string = 14; - BytesRules bytes = 15; - - // Complex Field Types - EnumRules enum = 16; - RepeatedRules repeated = 18; - MapRules map = 19; - - // Well-Known Field Types - AnyRules any = 20; - DurationRules duration = 21; - TimestampRules timestamp = 22; - } -} - -// FloatRules describes the constraints applied to `float` values -message FloatRules { - // Const specifies that this field must be exactly the specified value - optional float const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional float lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional float lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional float gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional float gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated float in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated float not_in = 7; -} - -// DoubleRules describes the constraints applied to `double` values -message DoubleRules { - // Const specifies that this field must be exactly the specified value - optional double const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional double lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional double lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional double gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional double gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated double in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated double not_in = 7; -} - -// Int32Rules describes the constraints applied to `int32` values -message Int32Rules { - // Const specifies that this field must be exactly the specified value - optional int32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional int32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional int32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional int32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional int32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated int32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated int32 not_in = 7; -} - -// Int64Rules describes the constraints applied to `int64` values -message Int64Rules { - // Const specifies that this field must be exactly the specified value - optional int64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional int64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional int64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional int64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional int64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated int64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated int64 not_in = 7; -} - -// UInt32Rules describes the constraints applied to `uint32` values -message UInt32Rules { - // Const specifies that this field must be exactly the specified value - optional uint32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional uint32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional uint32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional uint32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional uint32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated uint32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated uint32 not_in = 7; -} - -// UInt64Rules describes the constraints applied to `uint64` values -message UInt64Rules { - // Const specifies that this field must be exactly the specified value - optional uint64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional uint64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional uint64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional uint64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional uint64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated uint64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated uint64 not_in = 7; -} - -// SInt32Rules describes the constraints applied to `sint32` values -message SInt32Rules { - // Const specifies that this field must be exactly the specified value - optional sint32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sint32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sint32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sint32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sint32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sint32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sint32 not_in = 7; -} - -// SInt64Rules describes the constraints applied to `sint64` values -message SInt64Rules { - // Const specifies that this field must be exactly the specified value - optional sint64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sint64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sint64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sint64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sint64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sint64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sint64 not_in = 7; -} - -// Fixed32Rules describes the constraints applied to `fixed32` values -message Fixed32Rules { - // Const specifies that this field must be exactly the specified value - optional fixed32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional fixed32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional fixed32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional fixed32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional fixed32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated fixed32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated fixed32 not_in = 7; -} - -// Fixed64Rules describes the constraints applied to `fixed64` values -message Fixed64Rules { - // Const specifies that this field must be exactly the specified value - optional fixed64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional fixed64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional fixed64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional fixed64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional fixed64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated fixed64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated fixed64 not_in = 7; -} - -// SFixed32Rules describes the constraints applied to `sfixed32` values -message SFixed32Rules { - // Const specifies that this field must be exactly the specified value - optional sfixed32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sfixed32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sfixed32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sfixed32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sfixed32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sfixed32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sfixed32 not_in = 7; -} - -// SFixed64Rules describes the constraints applied to `sfixed64` values -message SFixed64Rules { - // Const specifies that this field must be exactly the specified value - optional sfixed64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sfixed64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sfixed64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sfixed64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sfixed64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sfixed64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sfixed64 not_in = 7; -} - -// BoolRules describes the constraints applied to `bool` values -message BoolRules { - // Const specifies that this field must be exactly the specified value - optional bool const = 1; -} - -// StringRules describe the constraints applied to `string` values -message StringRules { - // Const specifies that this field must be exactly the specified value - optional string const = 1; - - // Len specifies that this field must be the specified number of - // characters (Unicode code points). Note that the number of - // characters may differ from the number of bytes in the string. - optional uint64 len = 19; - - // MinLen specifies that this field must be the specified number of - // characters (Unicode code points) at a minimum. Note that the number of - // characters may differ from the number of bytes in the string. - optional uint64 min_len = 2; - - // MaxLen specifies that this field must be the specified number of - // characters (Unicode code points) at a maximum. Note that the number of - // characters may differ from the number of bytes in the string. - optional uint64 max_len = 3; - - // LenBytes specifies that this field must be the specified number of bytes - // at a minimum - optional uint64 len_bytes = 20; - - // MinBytes specifies that this field must be the specified number of bytes - // at a minimum - optional uint64 min_bytes = 4; - - // MaxBytes specifies that this field must be the specified number of bytes - // at a maximum - optional uint64 max_bytes = 5; - - // Pattern specifes that this field must match against the specified - // regular expression (RE2 syntax). The included expression should elide - // any delimiters. - optional string pattern = 6; - - // Prefix specifies that this field must have the specified substring at - // the beginning of the string. - optional string prefix = 7; - - // Suffix specifies that this field must have the specified substring at - // the end of the string. - optional string suffix = 8; - - // Contains specifies that this field must have the specified substring - // anywhere in the string. - optional string contains = 9; - - // NotContains specifies that this field cannot have the specified substring - // anywhere in the string. - optional string not_contains = 23; - - // In specifies that this field must be equal to one of the specified - // values - repeated string in = 10; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated string not_in = 11; - - // WellKnown rules provide advanced constraints against common string - // patterns - oneof well_known { - // Email specifies that the field must be a valid email address as - // defined by RFC 5322 - bool email = 12; - - // Hostname specifies that the field must be a valid hostname as - // defined by RFC 1034. This constraint does not support - // internationalized domain names (IDNs). - bool hostname = 13; - - // Ip specifies that the field must be a valid IP (v4 or v6) address. - // Valid IPv6 addresses should not include surrounding square brackets. - bool ip = 14; - - // Ipv4 specifies that the field must be a valid IPv4 address. - bool ipv4 = 15; - - // Ipv6 specifies that the field must be a valid IPv6 address. Valid - // IPv6 addresses should not include surrounding square brackets. - bool ipv6 = 16; - - // Uri specifies that the field must be a valid, absolute URI as defined - // by RFC 3986 - bool uri = 17; - - // UriRef specifies that the field must be a valid URI as defined by RFC - // 3986 and may be relative or absolute. - bool uri_ref = 18; - - // Address specifies that the field must be either a valid hostname as - // defined by RFC 1034 (which does not support internationalized domain - // names or IDNs), or it can be a valid IP (v4 or v6). - bool address = 21; - - // Uuid specifies that the field must be a valid UUID as defined by - // RFC 4122 - bool uuid = 22; - - // WellKnownRegex specifies a common well known pattern defined as a regex. - KnownRegex well_known_regex = 24; - } - - // This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable - // strict header validation. - // By default, this is true, and HTTP header validations are RFC-compliant. - // Setting to false will enable a looser validations that only disallows - // \r\n\0 characters, which can be used to bypass header matching rules. - optional bool strict = 25 [default = true]; -} - -// WellKnownRegex contain some well-known patterns. -enum KnownRegex { - UNKNOWN = 0; - - // HTTP header name as defined by RFC 7230. - HTTP_HEADER_NAME = 1; - - // HTTP header value as defined by RFC 7230. - HTTP_HEADER_VALUE = 2; -} - -// BytesRules describe the constraints applied to `bytes` values -message BytesRules { - // Const specifies that this field must be exactly the specified value - optional bytes const = 1; - - // Len specifies that this field must be the specified number of bytes - optional uint64 len = 13; - - // MinLen specifies that this field must be the specified number of bytes - // at a minimum - optional uint64 min_len = 2; - - // MaxLen specifies that this field must be the specified number of bytes - // at a maximum - optional uint64 max_len = 3; - - // Pattern specifes that this field must match against the specified - // regular expression (RE2 syntax). The included expression should elide - // any delimiters. - optional string pattern = 4; - - // Prefix specifies that this field must have the specified bytes at the - // beginning of the string. - optional bytes prefix = 5; - - // Suffix specifies that this field must have the specified bytes at the - // end of the string. - optional bytes suffix = 6; - - // Contains specifies that this field must have the specified bytes - // anywhere in the string. - optional bytes contains = 7; - - // In specifies that this field must be equal to one of the specified - // values - repeated bytes in = 8; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated bytes not_in = 9; - - // WellKnown rules provide advanced constraints against common byte - // patterns - oneof well_known { - // Ip specifies that the field must be a valid IP (v4 or v6) address in - // byte format - bool ip = 10; - - // Ipv4 specifies that the field must be a valid IPv4 address in byte - // format - bool ipv4 = 11; - - // Ipv6 specifies that the field must be a valid IPv6 address in byte - // format - bool ipv6 = 12; - } -} - -// EnumRules describe the constraints applied to enum values -message EnumRules { - // Const specifies that this field must be exactly the specified value - optional int32 const = 1; - - // DefinedOnly specifies that this field must be only one of the defined - // values for this enum, failing on any undefined value. - optional bool defined_only = 2; - - // In specifies that this field must be equal to one of the specified - // values - repeated int32 in = 3; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated int32 not_in = 4; -} - -// MessageRules describe the constraints applied to embedded message values. -// For message-type fields, validation is performed recursively. -message MessageRules { - // Skip specifies that the validation rules of this field should not be - // evaluated - optional bool skip = 1; - - // Required specifies that this field must be set - optional bool required = 2; -} - -// RepeatedRules describe the constraints applied to `repeated` values -message RepeatedRules { - // MinItems specifies that this field must have the specified number of - // items at a minimum - optional uint64 min_items = 1; - - // MaxItems specifies that this field must have the specified number of - // items at a maximum - optional uint64 max_items = 2; - - // Unique specifies that all elements in this field must be unique. This - // contraint is only applicable to scalar and enum types (messages are not - // supported). - optional bool unique = 3; - - // Items specifies the contraints to be applied to each item in the field. - // Repeated message fields will still execute validation against each item - // unless skip is specified here. - optional FieldRules items = 4; -} - -// MapRules describe the constraints applied to `map` values -message MapRules { - // MinPairs specifies that this field must have the specified number of - // KVs at a minimum - optional uint64 min_pairs = 1; - - // MaxPairs specifies that this field must have the specified number of - // KVs at a maximum - optional uint64 max_pairs = 2; - - // NoSparse specifies values in this field cannot be unset. This only - // applies to map's with message value types. - optional bool no_sparse = 3; - - // Keys specifies the constraints to be applied to each key in the field. - optional FieldRules keys = 4; - - // Values specifies the constraints to be applied to the value of each key - // in the field. Message values will still have their validations evaluated - // unless skip is specified here. - optional FieldRules values = 5; -} - -// AnyRules describe constraints applied exclusively to the -// `google.protobuf.Any` well-known type -message AnyRules { - // Required specifies that this field must be set - optional bool required = 1; - - // In specifies that this field's `type_url` must be equal to one of the - // specified values. - repeated string in = 2; - - // NotIn specifies that this field's `type_url` must not be equal to any of - // the specified values. - repeated string not_in = 3; -} - -// DurationRules describe the constraints applied exclusively to the -// `google.protobuf.Duration` well-known type -message DurationRules { - // Required specifies that this field must be set - optional bool required = 1; - - // Const specifies that this field must be exactly the specified value - optional google.protobuf.Duration const = 2; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional google.protobuf.Duration lt = 3; - - // Lt specifies that this field must be less than the specified value, - // inclusive - optional google.protobuf.Duration lte = 4; - - // Gt specifies that this field must be greater than the specified value, - // exclusive - optional google.protobuf.Duration gt = 5; - - // Gte specifies that this field must be greater than the specified value, - // inclusive - optional google.protobuf.Duration gte = 6; - - // In specifies that this field must be equal to one of the specified - // values - repeated google.protobuf.Duration in = 7; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated google.protobuf.Duration not_in = 8; -} - -// TimestampRules describe the constraints applied exclusively to the -// `google.protobuf.Timestamp` well-known type -message TimestampRules { - // Required specifies that this field must be set - optional bool required = 1; - - // Const specifies that this field must be exactly the specified value - optional google.protobuf.Timestamp const = 2; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional google.protobuf.Timestamp lt = 3; - - // Lte specifies that this field must be less than the specified value, - // inclusive - optional google.protobuf.Timestamp lte = 4; - - // Gt specifies that this field must be greater than the specified value, - // exclusive - optional google.protobuf.Timestamp gt = 5; - - // Gte specifies that this field must be greater than the specified value, - // inclusive - optional google.protobuf.Timestamp gte = 6; - - // LtNow specifies that this must be less than the current time. LtNow - // can only be used with the Within rule. - optional bool lt_now = 7; - - // GtNow specifies that this must be greater than the current time. GtNow - // can only be used with the Within rule. - optional bool gt_now = 8; - - // Within specifies that this field must be within this duration of the - // current time. This constraint can be used alone or with the LtNow and - // GtNow rules. - optional google.protobuf.Duration within = 9; -} diff --git a/node_modules/@grpc/grpc-js/proto/xds/LICENSE b/node_modules/@grpc/grpc-js/proto/xds/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/node_modules/@grpc/grpc-js/proto/xds/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/@grpc/grpc-js/proto/xds/xds/data/orca/v3/orca_load_report.proto b/node_modules/@grpc/grpc-js/proto/xds/xds/data/orca/v3/orca_load_report.proto deleted file mode 100644 index 53da75f..0000000 --- a/node_modules/@grpc/grpc-js/proto/xds/xds/data/orca/v3/orca_load_report.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; - -package xds.data.orca.v3; - -option java_outer_classname = "OrcaLoadReportProto"; -option java_multiple_files = true; -option java_package = "com.github.xds.data.orca.v3"; -option go_package = "github.com/cncf/xds/go/xds/data/orca/v3"; - -import "validate/validate.proto"; - -// See section `ORCA load report format` of the design document in -// :ref:`https://github.com/envoyproxy/envoy/issues/6614`. - -message OrcaLoadReport { - // CPU utilization expressed as a fraction of available CPU resources. This - // should be derived from the latest sample or measurement. The value may be - // larger than 1.0 when the usage exceeds the reporter dependent notion of - // soft limits. - double cpu_utilization = 1 [(validate.rules).double.gte = 0]; - - // Memory utilization expressed as a fraction of available memory - // resources. This should be derived from the latest sample or measurement. - double mem_utilization = 2 [(validate.rules).double.gte = 0, (validate.rules).double.lte = 1]; - - // Total RPS being served by an endpoint. This should cover all services that an endpoint is - // responsible for. - // Deprecated -- use ``rps_fractional`` field instead. - uint64 rps = 3 [deprecated = true]; - - // Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of - // storage) associated with the request. - map request_cost = 4; - - // Resource utilization values. Each value is expressed as a fraction of total resources - // available, derived from the latest sample or measurement. - map utilization = 5 - [(validate.rules).map.values.double.gte = 0, (validate.rules).map.values.double.lte = 1]; - - // Total RPS being served by an endpoint. This should cover all services that an endpoint is - // responsible for. - double rps_fractional = 6 [(validate.rules).double.gte = 0]; - - // Total EPS (errors/second) being served by an endpoint. This should cover - // all services that an endpoint is responsible for. - double eps = 7 [(validate.rules).double.gte = 0]; - - // Application specific opaque metrics. - map named_metrics = 8; - - // Application specific utilization expressed as a fraction of available - // resources. For example, an application may report the max of CPU and memory - // utilization for better load balancing if it is both CPU and memory bound. - // This should be derived from the latest sample or measurement. - // The value may be larger than 1.0 when the usage exceeds the reporter - // dependent notion of soft limits. - double application_utilization = 9 [(validate.rules).double.gte = 0]; -} diff --git a/node_modules/@grpc/grpc-js/proto/xds/xds/service/orca/v3/orca.proto b/node_modules/@grpc/grpc-js/proto/xds/xds/service/orca/v3/orca.proto deleted file mode 100644 index 03126cd..0000000 --- a/node_modules/@grpc/grpc-js/proto/xds/xds/service/orca/v3/orca.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package xds.service.orca.v3; - -option java_outer_classname = "OrcaProto"; -option java_multiple_files = true; -option java_package = "com.github.xds.service.orca.v3"; -option go_package = "github.com/cncf/xds/go/xds/service/orca/v3"; - -import "xds/data/orca/v3/orca_load_report.proto"; - -import "google/protobuf/duration.proto"; - -// See section `Out-of-band (OOB) reporting` of the design document in -// :ref:`https://github.com/envoyproxy/envoy/issues/6614`. - -// Out-of-band (OOB) load reporting service for the additional load reporting -// agent that does not sit in the request path. Reports are periodically sampled -// with sufficient frequency to provide temporal association with requests. -// OOB reporting compensates the limitation of in-band reporting in revealing -// costs for backends that do not provide a steady stream of telemetry such as -// long running stream operations and zero QPS services. This is a server -// streaming service, client needs to terminate current RPC and initiate -// a new call to change backend reporting frequency. -service OpenRcaService { - rpc StreamCoreMetrics(OrcaLoadReportRequest) returns (stream xds.data.orca.v3.OrcaLoadReport); -} - -message OrcaLoadReportRequest { - // Interval for generating Open RCA core metric responses. - google.protobuf.Duration report_interval = 1; - // Request costs to collect. If this is empty, all known requests costs tracked by - // the load reporting agent will be returned. This provides an opportunity for - // the client to selectively obtain a subset of tracked costs. - repeated string request_cost_names = 2; -} diff --git a/node_modules/@grpc/grpc-js/src/admin.ts b/node_modules/@grpc/grpc-js/src/admin.ts deleted file mode 100644 index 4d26b89..0000000 --- a/node_modules/@grpc/grpc-js/src/admin.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { ServiceDefinition } from './make-client'; -import { Server, UntypedServiceImplementation } from './server'; - -interface GetServiceDefinition { - (): ServiceDefinition; -} - -interface GetHandlers { - (): UntypedServiceImplementation; -} - -const registeredAdminServices: { - getServiceDefinition: GetServiceDefinition; - getHandlers: GetHandlers; -}[] = []; - -export function registerAdminService( - getServiceDefinition: GetServiceDefinition, - getHandlers: GetHandlers -) { - registeredAdminServices.push({ getServiceDefinition, getHandlers }); -} - -export function addAdminServicesToServer(server: Server): void { - for (const { getServiceDefinition, getHandlers } of registeredAdminServices) { - server.addService(getServiceDefinition(), getHandlers()); - } -} diff --git a/node_modules/@grpc/grpc-js/src/auth-context.ts b/node_modules/@grpc/grpc-js/src/auth-context.ts deleted file mode 100644 index 4fc110d..0000000 --- a/node_modules/@grpc/grpc-js/src/auth-context.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2025 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { PeerCertificate } from "tls"; - -export interface AuthContext { - transportSecurityType?: string; - sslPeerCertificate?: PeerCertificate; -} diff --git a/node_modules/@grpc/grpc-js/src/backoff-timeout.ts b/node_modules/@grpc/grpc-js/src/backoff-timeout.ts deleted file mode 100644 index 8be560d..0000000 --- a/node_modules/@grpc/grpc-js/src/backoff-timeout.ts +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { LogVerbosity } from './constants'; -import * as logging from './logging'; - -const TRACER_NAME = 'backoff'; - -const INITIAL_BACKOFF_MS = 1000; -const BACKOFF_MULTIPLIER = 1.6; -const MAX_BACKOFF_MS = 120000; -const BACKOFF_JITTER = 0.2; - -/** - * Get a number uniformly at random in the range [min, max) - * @param min - * @param max - */ -function uniformRandom(min: number, max: number) { - return Math.random() * (max - min) + min; -} - -export interface BackoffOptions { - initialDelay?: number; - multiplier?: number; - jitter?: number; - maxDelay?: number; -} - -export class BackoffTimeout { - /** - * The delay time at the start, and after each reset. - */ - private readonly initialDelay: number = INITIAL_BACKOFF_MS; - /** - * The exponential backoff multiplier. - */ - private readonly multiplier: number = BACKOFF_MULTIPLIER; - /** - * The maximum delay time - */ - private readonly maxDelay: number = MAX_BACKOFF_MS; - /** - * The maximum fraction by which the delay time can randomly vary after - * applying the multiplier. - */ - private readonly jitter: number = BACKOFF_JITTER; - /** - * The delay time for the next time the timer runs. - */ - private nextDelay: number; - /** - * The handle of the underlying timer. If running is false, this value refers - * to an object representing a timer that has ended, but it can still be - * interacted with without error. - */ - private timerId: NodeJS.Timeout; - /** - * Indicates whether the timer is currently running. - */ - private running = false; - /** - * Indicates whether the timer should keep the Node process running if no - * other async operation is doing so. - */ - private hasRef = true; - /** - * The time that the currently running timer was started. Only valid if - * running is true. - */ - private startTime: Date = new Date(); - /** - * The approximate time that the currently running timer will end. Only valid - * if running is true. - */ - private endTime: Date = new Date(); - - private id: number; - - private static nextId = 0; - - constructor(private callback: () => void, options?: BackoffOptions) { - this.id = BackoffTimeout.getNextId(); - if (options) { - if (options.initialDelay) { - this.initialDelay = options.initialDelay; - } - if (options.multiplier) { - this.multiplier = options.multiplier; - } - if (options.jitter) { - this.jitter = options.jitter; - } - if (options.maxDelay) { - this.maxDelay = options.maxDelay; - } - } - this.trace('constructed initialDelay=' + this.initialDelay + ' multiplier=' + this.multiplier + ' jitter=' + this.jitter + ' maxDelay=' + this.maxDelay); - this.nextDelay = this.initialDelay; - this.timerId = setTimeout(() => {}, 0); - clearTimeout(this.timerId); - } - - private static getNextId() { - return this.nextId++; - } - - private trace(text: string) { - logging.trace(LogVerbosity.DEBUG, TRACER_NAME, '{' + this.id + '} ' + text); - } - - private runTimer(delay: number) { - this.trace('runTimer(delay=' + delay + ')'); - this.endTime = this.startTime; - this.endTime.setMilliseconds( - this.endTime.getMilliseconds() + delay - ); - clearTimeout(this.timerId); - this.timerId = setTimeout(() => { - this.trace('timer fired'); - this.running = false; - this.callback(); - }, delay); - if (!this.hasRef) { - this.timerId.unref?.(); - } - } - - /** - * Call the callback after the current amount of delay time - */ - runOnce() { - this.trace('runOnce()'); - this.running = true; - this.startTime = new Date(); - this.runTimer(this.nextDelay); - const nextBackoff = Math.min( - this.nextDelay * this.multiplier, - this.maxDelay - ); - const jitterMagnitude = nextBackoff * this.jitter; - this.nextDelay = - nextBackoff + uniformRandom(-jitterMagnitude, jitterMagnitude); - } - - /** - * Stop the timer. The callback will not be called until `runOnce` is called - * again. - */ - stop() { - this.trace('stop()'); - clearTimeout(this.timerId); - this.running = false; - } - - /** - * Reset the delay time to its initial value. If the timer is still running, - * retroactively apply that reset to the current timer. - */ - reset() { - this.trace('reset() running=' + this.running); - this.nextDelay = this.initialDelay; - if (this.running) { - const now = new Date(); - const newEndTime = this.startTime; - newEndTime.setMilliseconds(newEndTime.getMilliseconds() + this.nextDelay); - clearTimeout(this.timerId); - if (now < newEndTime) { - this.runTimer(newEndTime.getTime() - now.getTime()); - } else { - this.running = false; - } - } - } - - /** - * Check whether the timer is currently running. - */ - isRunning() { - return this.running; - } - - /** - * Set that while the timer is running, it should keep the Node process - * running. - */ - ref() { - this.hasRef = true; - this.timerId.ref?.(); - } - - /** - * Set that while the timer is running, it should not keep the Node process - * running. - */ - unref() { - this.hasRef = false; - this.timerId.unref?.(); - } - - /** - * Get the approximate timestamp of when the timer will fire. Only valid if - * this.isRunning() is true. - */ - getEndTime() { - return this.endTime; - } -} diff --git a/node_modules/@grpc/grpc-js/src/call-credentials.ts b/node_modules/@grpc/grpc-js/src/call-credentials.ts deleted file mode 100644 index a9afe4a..0000000 --- a/node_modules/@grpc/grpc-js/src/call-credentials.ts +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { Metadata } from './metadata'; - -export interface CallMetadataOptions { - method_name: string; - service_url: string; -} - -export type CallMetadataGenerator = ( - options: CallMetadataOptions, - cb: (err: Error | null, metadata?: Metadata) => void -) => void; - -// google-auth-library pre-v2.0.0 does not have getRequestHeaders -// but has getRequestMetadata, which is deprecated in v2.0.0 -export interface OldOAuth2Client { - getRequestMetadata: ( - url: string, - callback: ( - err: Error | null, - headers?: { - [index: string]: string; - } - ) => void - ) => void; -} - -export interface CurrentOAuth2Client { - getRequestHeaders: (url?: string) => Promise<{ [index: string]: string }>; -} - -export type OAuth2Client = OldOAuth2Client | CurrentOAuth2Client; - -function isCurrentOauth2Client( - client: OAuth2Client -): client is CurrentOAuth2Client { - return ( - 'getRequestHeaders' in client && - typeof client.getRequestHeaders === 'function' - ); -} - -/** - * A class that represents a generic method of adding authentication-related - * metadata on a per-request basis. - */ -export abstract class CallCredentials { - /** - * Asynchronously generates a new Metadata object. - * @param options Options used in generating the Metadata object. - */ - abstract generateMetadata(options: CallMetadataOptions): Promise; - /** - * Creates a new CallCredentials object from properties of both this and - * another CallCredentials object. This object's metadata generator will be - * called first. - * @param callCredentials The other CallCredentials object. - */ - abstract compose(callCredentials: CallCredentials): CallCredentials; - - /** - * Check whether two call credentials objects are equal. Separate - * SingleCallCredentials with identical metadata generator functions are - * equal. - * @param other The other CallCredentials object to compare with. - */ - abstract _equals(other: CallCredentials): boolean; - - /** - * Creates a new CallCredentials object from a given function that generates - * Metadata objects. - * @param metadataGenerator A function that accepts a set of options, and - * generates a Metadata object based on these options, which is passed back - * to the caller via a supplied (err, metadata) callback. - */ - static createFromMetadataGenerator( - metadataGenerator: CallMetadataGenerator - ): CallCredentials { - return new SingleCallCredentials(metadataGenerator); - } - - /** - * Create a gRPC credential from a Google credential object. - * @param googleCredentials The authentication client to use. - * @return The resulting CallCredentials object. - */ - static createFromGoogleCredential( - googleCredentials: OAuth2Client - ): CallCredentials { - return CallCredentials.createFromMetadataGenerator((options, callback) => { - let getHeaders: Promise<{ [index: string]: string }>; - if (isCurrentOauth2Client(googleCredentials)) { - getHeaders = googleCredentials.getRequestHeaders(options.service_url); - } else { - getHeaders = new Promise((resolve, reject) => { - googleCredentials.getRequestMetadata( - options.service_url, - (err, headers) => { - if (err) { - reject(err); - return; - } - if (!headers) { - reject(new Error('Headers not set by metadata plugin')); - return; - } - resolve(headers); - } - ); - }); - } - getHeaders.then( - headers => { - const metadata = new Metadata(); - for (const key of Object.keys(headers)) { - metadata.add(key, headers[key]); - } - callback(null, metadata); - }, - err => { - callback(err); - } - ); - }); - } - - static createEmpty(): CallCredentials { - return new EmptyCallCredentials(); - } -} - -class ComposedCallCredentials extends CallCredentials { - constructor(private creds: CallCredentials[]) { - super(); - } - - async generateMetadata(options: CallMetadataOptions): Promise { - const base: Metadata = new Metadata(); - const generated: Metadata[] = await Promise.all( - this.creds.map(cred => cred.generateMetadata(options)) - ); - for (const gen of generated) { - base.merge(gen); - } - return base; - } - - compose(other: CallCredentials): CallCredentials { - return new ComposedCallCredentials(this.creds.concat([other])); - } - - _equals(other: CallCredentials): boolean { - if (this === other) { - return true; - } - if (other instanceof ComposedCallCredentials) { - return this.creds.every((value, index) => - value._equals(other.creds[index]) - ); - } else { - return false; - } - } -} - -class SingleCallCredentials extends CallCredentials { - constructor(private metadataGenerator: CallMetadataGenerator) { - super(); - } - - generateMetadata(options: CallMetadataOptions): Promise { - return new Promise((resolve, reject) => { - this.metadataGenerator(options, (err, metadata) => { - if (metadata !== undefined) { - resolve(metadata); - } else { - reject(err); - } - }); - }); - } - - compose(other: CallCredentials): CallCredentials { - return new ComposedCallCredentials([this, other]); - } - - _equals(other: CallCredentials): boolean { - if (this === other) { - return true; - } - if (other instanceof SingleCallCredentials) { - return this.metadataGenerator === other.metadataGenerator; - } else { - return false; - } - } -} - -class EmptyCallCredentials extends CallCredentials { - generateMetadata(options: CallMetadataOptions): Promise { - return Promise.resolve(new Metadata()); - } - - compose(other: CallCredentials): CallCredentials { - return other; - } - - _equals(other: CallCredentials): boolean { - return other instanceof EmptyCallCredentials; - } -} diff --git a/node_modules/@grpc/grpc-js/src/call-interface.ts b/node_modules/@grpc/grpc-js/src/call-interface.ts deleted file mode 100644 index 637228c..0000000 --- a/node_modules/@grpc/grpc-js/src/call-interface.ts +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { AuthContext } from './auth-context'; -import { CallCredentials } from './call-credentials'; -import { Status } from './constants'; -import { Deadline } from './deadline'; -import { Metadata } from './metadata'; -import { ServerSurfaceCall } from './server-call'; - -export interface CallStreamOptions { - deadline: Deadline; - flags: number; - host: string; - parentCall: ServerSurfaceCall | null; -} - -export type PartialCallStreamOptions = Partial; - -export interface StatusObject { - code: Status; - details: string; - metadata: Metadata; -} - -export type PartialStatusObject = Pick & { - metadata?: Metadata | null | undefined; -}; - -export interface StatusOrOk { - ok: true; - value: T; -} - -export interface StatusOrError { - ok: false; - error: StatusObject; -} - -export type StatusOr = StatusOrOk | StatusOrError; - -export function statusOrFromValue(value: T): StatusOr { - return { - ok: true, - value: value - }; -} - -export function statusOrFromError(error: PartialStatusObject): StatusOr { - return { - ok: false, - error: { - ...error, - metadata: error.metadata ?? new Metadata() - } - }; -} - -export const enum WriteFlags { - BufferHint = 1, - NoCompress = 2, - WriteThrough = 4, -} - -export interface WriteObject { - message: Buffer; - flags?: number; -} - -export interface MetadataListener { - (metadata: Metadata, next: (metadata: Metadata) => void): void; -} - -export interface MessageListener { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (message: any, next: (message: any) => void): void; -} - -export interface StatusListener { - (status: StatusObject, next: (status: StatusObject) => void): void; -} - -export interface FullListener { - onReceiveMetadata: MetadataListener; - onReceiveMessage: MessageListener; - onReceiveStatus: StatusListener; -} - -export type Listener = Partial; - -/** - * An object with methods for handling the responses to a call. - */ -export interface InterceptingListener { - onReceiveMetadata(metadata: Metadata): void; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onReceiveMessage(message: any): void; - onReceiveStatus(status: StatusObject): void; -} - -export function isInterceptingListener( - listener: Listener | InterceptingListener -): listener is InterceptingListener { - return ( - listener.onReceiveMetadata !== undefined && - listener.onReceiveMetadata.length === 1 - ); -} - -export class InterceptingListenerImpl implements InterceptingListener { - private processingMetadata = false; - private hasPendingMessage = false; - private pendingMessage: any; - private processingMessage = false; - private pendingStatus: StatusObject | null = null; - constructor( - private listener: FullListener, - private nextListener: InterceptingListener - ) {} - - private processPendingMessage() { - if (this.hasPendingMessage) { - this.nextListener.onReceiveMessage(this.pendingMessage); - this.pendingMessage = null; - this.hasPendingMessage = false; - } - } - - private processPendingStatus() { - if (this.pendingStatus) { - this.nextListener.onReceiveStatus(this.pendingStatus); - } - } - - onReceiveMetadata(metadata: Metadata): void { - this.processingMetadata = true; - this.listener.onReceiveMetadata(metadata, metadata => { - this.processingMetadata = false; - this.nextListener.onReceiveMetadata(metadata); - this.processPendingMessage(); - this.processPendingStatus(); - }); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onReceiveMessage(message: any): void { - /* If this listener processes messages asynchronously, the last message may - * be reordered with respect to the status */ - this.processingMessage = true; - this.listener.onReceiveMessage(message, msg => { - this.processingMessage = false; - if (this.processingMetadata) { - this.pendingMessage = msg; - this.hasPendingMessage = true; - } else { - this.nextListener.onReceiveMessage(msg); - this.processPendingStatus(); - } - }); - } - onReceiveStatus(status: StatusObject): void { - this.listener.onReceiveStatus(status, processedStatus => { - if (this.processingMetadata || this.processingMessage) { - this.pendingStatus = processedStatus; - } else { - this.nextListener.onReceiveStatus(processedStatus); - } - }); - } -} - -export interface WriteCallback { - (error?: Error | null): void; -} - -export interface MessageContext { - callback?: WriteCallback; - flags?: number; -} - -export interface Call { - cancelWithStatus(status: Status, details: string): void; - getPeer(): string; - start(metadata: Metadata, listener: InterceptingListener): void; - sendMessageWithContext(context: MessageContext, message: Buffer): void; - startRead(): void; - halfClose(): void; - getCallNumber(): number; - setCredentials(credentials: CallCredentials): void; - getAuthContext(): AuthContext | null; -} - -export interface DeadlineInfoProvider { - getDeadlineInfo(): string[]; -} diff --git a/node_modules/@grpc/grpc-js/src/call-number.ts b/node_modules/@grpc/grpc-js/src/call-number.ts deleted file mode 100644 index 8c37d3f..0000000 --- a/node_modules/@grpc/grpc-js/src/call-number.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -let nextCallNumber = 0; - -export function getNextCallNumber() { - return nextCallNumber++; -} diff --git a/node_modules/@grpc/grpc-js/src/call.ts b/node_modules/@grpc/grpc-js/src/call.ts deleted file mode 100644 index 426deb6..0000000 --- a/node_modules/@grpc/grpc-js/src/call.ts +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { EventEmitter } from 'events'; -import { Duplex, Readable, Writable } from 'stream'; - -import { StatusObject, MessageContext } from './call-interface'; -import { Status } from './constants'; -import { EmitterAugmentation1 } from './events'; -import { Metadata } from './metadata'; -import { ObjectReadable, ObjectWritable, WriteCallback } from './object-stream'; -import { InterceptingCallInterface } from './client-interceptors'; -import { AuthContext } from './auth-context'; - -/** - * A type extending the built-in Error object with additional fields. - */ -export type ServiceError = StatusObject & Error; - -/** - * A base type for all user-facing values returned by client-side method calls. - */ -export type SurfaceCall = { - call?: InterceptingCallInterface; - cancel(): void; - getPeer(): string; - getAuthContext(): AuthContext | null; -} & EmitterAugmentation1<'metadata', Metadata> & - EmitterAugmentation1<'status', StatusObject> & - EventEmitter; - -/** - * A type representing the return value of a unary method call. - */ -export type ClientUnaryCall = SurfaceCall; - -/** - * A type representing the return value of a server stream method call. - */ -export type ClientReadableStream = { - deserialize: (chunk: Buffer) => ResponseType; -} & SurfaceCall & - ObjectReadable; - -/** - * A type representing the return value of a client stream method call. - */ -export type ClientWritableStream = { - serialize: (value: RequestType) => Buffer; -} & SurfaceCall & - ObjectWritable; - -/** - * A type representing the return value of a bidirectional stream method call. - */ -export type ClientDuplexStream = - ClientWritableStream & ClientReadableStream; - -/** - * Construct a ServiceError from a StatusObject. This function exists primarily - * as an attempt to make the error stack trace clearly communicate that the - * error is not necessarily a problem in gRPC itself. - * @param status - */ -export function callErrorFromStatus( - status: StatusObject, - callerStack: string -): ServiceError { - const message = `${status.code} ${Status[status.code]}: ${status.details}`; - const error = new Error(message); - const stack = `${error.stack}\nfor call at\n${callerStack}`; - return Object.assign(new Error(message), status, { stack }); -} - -export class ClientUnaryCallImpl - extends EventEmitter - implements ClientUnaryCall -{ - public call?: InterceptingCallInterface; - constructor() { - super(); - } - - cancel(): void { - this.call?.cancelWithStatus(Status.CANCELLED, 'Cancelled on client'); - } - - getPeer(): string { - return this.call?.getPeer() ?? 'unknown'; - } - - getAuthContext(): AuthContext | null { - return this.call?.getAuthContext() ?? null; - } -} - -export class ClientReadableStreamImpl - extends Readable - implements ClientReadableStream -{ - public call?: InterceptingCallInterface; - constructor(readonly deserialize: (chunk: Buffer) => ResponseType) { - super({ objectMode: true }); - } - - cancel(): void { - this.call?.cancelWithStatus(Status.CANCELLED, 'Cancelled on client'); - } - - getPeer(): string { - return this.call?.getPeer() ?? 'unknown'; - } - - getAuthContext(): AuthContext | null { - return this.call?.getAuthContext() ?? null; - } - - _read(_size: number): void { - this.call?.startRead(); - } -} - -export class ClientWritableStreamImpl - extends Writable - implements ClientWritableStream -{ - public call?: InterceptingCallInterface; - constructor(readonly serialize: (value: RequestType) => Buffer) { - super({ objectMode: true }); - } - - cancel(): void { - this.call?.cancelWithStatus(Status.CANCELLED, 'Cancelled on client'); - } - - getPeer(): string { - return this.call?.getPeer() ?? 'unknown'; - } - - getAuthContext(): AuthContext | null { - return this.call?.getAuthContext() ?? null; - } - - _write(chunk: RequestType, encoding: string, cb: WriteCallback) { - const context: MessageContext = { - callback: cb, - }; - const flags = Number(encoding); - if (!Number.isNaN(flags)) { - context.flags = flags; - } - this.call?.sendMessageWithContext(context, chunk); - } - - _final(cb: Function) { - this.call?.halfClose(); - cb(); - } -} - -export class ClientDuplexStreamImpl - extends Duplex - implements ClientDuplexStream -{ - public call?: InterceptingCallInterface; - constructor( - readonly serialize: (value: RequestType) => Buffer, - readonly deserialize: (chunk: Buffer) => ResponseType - ) { - super({ objectMode: true }); - } - - cancel(): void { - this.call?.cancelWithStatus(Status.CANCELLED, 'Cancelled on client'); - } - - getPeer(): string { - return this.call?.getPeer() ?? 'unknown'; - } - - getAuthContext(): AuthContext | null { - return this.call?.getAuthContext() ?? null; - } - - _read(_size: number): void { - this.call?.startRead(); - } - - _write(chunk: RequestType, encoding: string, cb: WriteCallback) { - const context: MessageContext = { - callback: cb, - }; - const flags = Number(encoding); - if (!Number.isNaN(flags)) { - context.flags = flags; - } - this.call?.sendMessageWithContext(context, chunk); - } - - _final(cb: Function) { - this.call?.halfClose(); - cb(); - } -} diff --git a/node_modules/@grpc/grpc-js/src/certificate-provider.ts b/node_modules/@grpc/grpc-js/src/certificate-provider.ts deleted file mode 100644 index 27a2e7d..0000000 --- a/node_modules/@grpc/grpc-js/src/certificate-provider.ts +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright 2024 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import * as fs from 'fs'; -import * as logging from './logging'; -import { LogVerbosity } from './constants'; -import { promisify } from 'util'; - -const TRACER_NAME = 'certificate_provider'; - -function trace(text: string) { - logging.trace(LogVerbosity.DEBUG, TRACER_NAME, text); -} - -export interface CaCertificateUpdate { - caCertificate: Buffer; -} - -export interface IdentityCertificateUpdate { - certificate: Buffer; - privateKey: Buffer; -} - -export interface CaCertificateUpdateListener { - (update: CaCertificateUpdate | null): void; -} - -export interface IdentityCertificateUpdateListener { - (update: IdentityCertificateUpdate | null) : void; -} - -export interface CertificateProvider { - addCaCertificateListener(listener: CaCertificateUpdateListener): void; - removeCaCertificateListener(listener: CaCertificateUpdateListener): void; - addIdentityCertificateListener(listener: IdentityCertificateUpdateListener): void; - removeIdentityCertificateListener(listener: IdentityCertificateUpdateListener): void; -} - -export interface FileWatcherCertificateProviderConfig { - certificateFile?: string | undefined; - privateKeyFile?: string | undefined; - caCertificateFile?: string | undefined; - refreshIntervalMs: number; -} - -const readFilePromise = promisify(fs.readFile); - -export class FileWatcherCertificateProvider implements CertificateProvider { - private refreshTimer: NodeJS.Timeout | null = null; - private fileResultPromise: Promise<[PromiseSettledResult, PromiseSettledResult, PromiseSettledResult]> | null = null; - private latestCaUpdate: CaCertificateUpdate | null | undefined = undefined; - private caListeners: Set = new Set(); - private latestIdentityUpdate: IdentityCertificateUpdate | null | undefined = undefined; - private identityListeners: Set = new Set(); - private lastUpdateTime: Date | null = null; - - constructor( - private config: FileWatcherCertificateProviderConfig - ) { - if ((config.certificateFile === undefined) !== (config.privateKeyFile === undefined)) { - throw new Error('certificateFile and privateKeyFile must be set or unset together'); - } - if (config.certificateFile === undefined && config.caCertificateFile === undefined) { - throw new Error('At least one of certificateFile and caCertificateFile must be set'); - } - trace('File watcher constructed with config ' + JSON.stringify(config)); - } - - private updateCertificates() { - if (this.fileResultPromise) { - return; - } - this.fileResultPromise = Promise.allSettled([ - this.config.certificateFile ? readFilePromise(this.config.certificateFile) : Promise.reject(), - this.config.privateKeyFile ? readFilePromise(this.config.privateKeyFile) : Promise.reject(), - this.config.caCertificateFile ? readFilePromise(this.config.caCertificateFile) : Promise.reject() - ]); - this.fileResultPromise.then(([certificateResult, privateKeyResult, caCertificateResult]) => { - if (!this.refreshTimer) { - return; - } - trace('File watcher read certificates certificate ' + certificateResult.status + ', privateKey ' + privateKeyResult.status + ', CA certificate ' + caCertificateResult.status); - this.lastUpdateTime = new Date(); - this.fileResultPromise = null; - if (certificateResult.status === 'fulfilled' && privateKeyResult.status === 'fulfilled') { - this.latestIdentityUpdate = { - certificate: certificateResult.value, - privateKey: privateKeyResult.value - }; - } else { - this.latestIdentityUpdate = null; - } - if (caCertificateResult.status === 'fulfilled') { - this.latestCaUpdate = { - caCertificate: caCertificateResult.value - }; - } else { - this.latestCaUpdate = null; - } - for (const listener of this.identityListeners) { - listener(this.latestIdentityUpdate); - } - for (const listener of this.caListeners) { - listener(this.latestCaUpdate); - } - }); - trace('File watcher initiated certificate update'); - } - - private maybeStartWatchingFiles() { - if (!this.refreshTimer) { - /* Perform the first read immediately, but only if there was not already - * a recent read, to avoid reading from the filesystem significantly more - * frequently than configured if the provider quickly switches between - * used and unused. */ - const timeSinceLastUpdate = this.lastUpdateTime ? (new Date()).getTime() - this.lastUpdateTime.getTime() : Infinity; - if (timeSinceLastUpdate > this.config.refreshIntervalMs) { - this.updateCertificates(); - } - if (timeSinceLastUpdate > this.config.refreshIntervalMs * 2) { - // Clear out old updates if they are definitely stale - this.latestCaUpdate = undefined; - this.latestIdentityUpdate = undefined; - } - this.refreshTimer = setInterval(() => this.updateCertificates(), this.config.refreshIntervalMs); - trace('File watcher started watching'); - } - } - - private maybeStopWatchingFiles() { - if (this.caListeners.size === 0 && this.identityListeners.size === 0) { - this.fileResultPromise = null; - if (this.refreshTimer) { - clearInterval(this.refreshTimer); - this.refreshTimer = null; - } - } - } - - addCaCertificateListener(listener: CaCertificateUpdateListener): void { - this.caListeners.add(listener); - this.maybeStartWatchingFiles(); - if (this.latestCaUpdate !== undefined) { - process.nextTick(listener, this.latestCaUpdate); - } - } - removeCaCertificateListener(listener: CaCertificateUpdateListener): void { - this.caListeners.delete(listener); - this.maybeStopWatchingFiles(); - } - addIdentityCertificateListener(listener: IdentityCertificateUpdateListener): void { - this.identityListeners.add(listener); - this.maybeStartWatchingFiles(); - if (this.latestIdentityUpdate !== undefined) { - process.nextTick(listener, this.latestIdentityUpdate); - } - } - removeIdentityCertificateListener(listener: IdentityCertificateUpdateListener): void { - this.identityListeners.delete(listener); - this.maybeStopWatchingFiles(); - } -} diff --git a/node_modules/@grpc/grpc-js/src/channel-credentials.ts b/node_modules/@grpc/grpc-js/src/channel-credentials.ts deleted file mode 100644 index a6ded81..0000000 --- a/node_modules/@grpc/grpc-js/src/channel-credentials.ts +++ /dev/null @@ -1,523 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { - ConnectionOptions, - createSecureContext, - PeerCertificate, - SecureContext, - checkServerIdentity, - connect as tlsConnect -} from 'tls'; - -import { CallCredentials } from './call-credentials'; -import { CIPHER_SUITES, getDefaultRootsData } from './tls-helpers'; -import { CaCertificateUpdate, CaCertificateUpdateListener, CertificateProvider, IdentityCertificateUpdate, IdentityCertificateUpdateListener } from './certificate-provider'; -import { Socket } from 'net'; -import { ChannelOptions } from './channel-options'; -import { GrpcUri, parseUri, splitHostPort } from './uri-parser'; -import { getDefaultAuthority } from './resolver'; -import { log } from './logging'; -import { LogVerbosity } from './constants'; - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function verifyIsBufferOrNull(obj: any, friendlyName: string): void { - if (obj && !(obj instanceof Buffer)) { - throw new TypeError(`${friendlyName}, if provided, must be a Buffer.`); - } -} - -/** - * A callback that will receive the expected hostname and presented peer - * certificate as parameters. The callback should return an error to - * indicate that the presented certificate is considered invalid and - * otherwise returned undefined. - */ -export type CheckServerIdentityCallback = ( - hostname: string, - cert: PeerCertificate -) => Error | undefined; - -/** - * Additional peer verification options that can be set when creating - * SSL credentials. - */ -export interface VerifyOptions { - /** - * If set, this callback will be invoked after the usual hostname verification - * has been performed on the peer certificate. - */ - checkServerIdentity?: CheckServerIdentityCallback; - rejectUnauthorized?: boolean; -} - -export interface SecureConnectResult { - socket: Socket; - secure: boolean; -} - -export interface SecureConnector { - connect(socket: Socket): Promise; - waitForReady(): Promise; - getCallCredentials(): CallCredentials; - destroy(): void; -} - -/** - * A class that contains credentials for communicating over a channel, as well - * as a set of per-call credentials, which are applied to every method call made - * over a channel initialized with an instance of this class. - */ -export abstract class ChannelCredentials { - /** - * Returns a copy of this object with the included set of per-call credentials - * expanded to include callCredentials. - * @param callCredentials A CallCredentials object to associate with this - * instance. - */ - compose(callCredentials: CallCredentials): ChannelCredentials { - return new ComposedChannelCredentialsImpl(this, callCredentials); - } - - /** - * Indicates whether this credentials object creates a secure channel. - */ - abstract _isSecure(): boolean; - - /** - * Check whether two channel credentials objects are equal. Two secure - * credentials are equal if they were constructed with the same parameters. - * @param other The other ChannelCredentials Object - */ - abstract _equals(other: ChannelCredentials): boolean; - - abstract _createSecureConnector(channelTarget: GrpcUri, options: ChannelOptions, callCredentials?: CallCredentials): SecureConnector; - - /** - * Return a new ChannelCredentials instance with a given set of credentials. - * The resulting instance can be used to construct a Channel that communicates - * over TLS. - * @param rootCerts The root certificate data. - * @param privateKey The client certificate private key, if available. - * @param certChain The client certificate key chain, if available. - * @param verifyOptions Additional options to modify certificate verification - */ - static createSsl( - rootCerts?: Buffer | null, - privateKey?: Buffer | null, - certChain?: Buffer | null, - verifyOptions?: VerifyOptions - ): ChannelCredentials { - verifyIsBufferOrNull(rootCerts, 'Root certificate'); - verifyIsBufferOrNull(privateKey, 'Private key'); - verifyIsBufferOrNull(certChain, 'Certificate chain'); - if (privateKey && !certChain) { - throw new Error( - 'Private key must be given with accompanying certificate chain' - ); - } - if (!privateKey && certChain) { - throw new Error( - 'Certificate chain must be given with accompanying private key' - ); - } - const secureContext = createSecureContext({ - ca: rootCerts ?? getDefaultRootsData() ?? undefined, - key: privateKey ?? undefined, - cert: certChain ?? undefined, - ciphers: CIPHER_SUITES, - }); - return new SecureChannelCredentialsImpl(secureContext, verifyOptions ?? {}); - } - - /** - * Return a new ChannelCredentials instance with credentials created using - * the provided secureContext. The resulting instances can be used to - * construct a Channel that communicates over TLS. gRPC will not override - * anything in the provided secureContext, so the environment variables - * GRPC_SSL_CIPHER_SUITES and GRPC_DEFAULT_SSL_ROOTS_FILE_PATH will - * not be applied. - * @param secureContext The return value of tls.createSecureContext() - * @param verifyOptions Additional options to modify certificate verification - */ - static createFromSecureContext( - secureContext: SecureContext, - verifyOptions?: VerifyOptions - ): ChannelCredentials { - return new SecureChannelCredentialsImpl(secureContext, verifyOptions ?? {}); - } - - /** - * Return a new ChannelCredentials instance with no credentials. - */ - static createInsecure(): ChannelCredentials { - return new InsecureChannelCredentialsImpl(); - } -} - -class InsecureChannelCredentialsImpl extends ChannelCredentials { - constructor() { - super(); - } - - override compose(callCredentials: CallCredentials): never { - throw new Error('Cannot compose insecure credentials'); - } - _isSecure(): boolean { - return false; - } - _equals(other: ChannelCredentials): boolean { - return other instanceof InsecureChannelCredentialsImpl; - } - _createSecureConnector(channelTarget: GrpcUri, options: ChannelOptions, callCredentials?: CallCredentials): SecureConnector { - return { - connect(socket) { - return Promise.resolve({ - socket, - secure: false - }); - }, - waitForReady: () => { - return Promise.resolve(); - }, - getCallCredentials: () => { - return callCredentials ?? CallCredentials.createEmpty(); - }, - destroy() {} - } - } -} - -function getConnectionOptions(secureContext: SecureContext, verifyOptions: VerifyOptions, channelTarget: GrpcUri, options: ChannelOptions): ConnectionOptions { - const connectionOptions: ConnectionOptions = { - secureContext: secureContext - }; - let realTarget: GrpcUri = channelTarget; - if ('grpc.http_connect_target' in options) { - const parsedTarget = parseUri(options['grpc.http_connect_target']!); - if (parsedTarget) { - realTarget = parsedTarget; - } - } - const targetPath = getDefaultAuthority(realTarget); - const hostPort = splitHostPort(targetPath); - const remoteHost = hostPort?.host ?? targetPath; - connectionOptions.host = remoteHost; - - if (verifyOptions.checkServerIdentity) { - connectionOptions.checkServerIdentity = verifyOptions.checkServerIdentity; - } - if (verifyOptions.rejectUnauthorized !== undefined) { - connectionOptions.rejectUnauthorized = verifyOptions.rejectUnauthorized; - } - connectionOptions.ALPNProtocols = ['h2']; - if (options['grpc.ssl_target_name_override']) { - const sslTargetNameOverride = options['grpc.ssl_target_name_override']!; - const originalCheckServerIdentity = - connectionOptions.checkServerIdentity ?? checkServerIdentity; - connectionOptions.checkServerIdentity = ( - host: string, - cert: PeerCertificate - ): Error | undefined => { - return originalCheckServerIdentity(sslTargetNameOverride, cert); - }; - connectionOptions.servername = sslTargetNameOverride; - } else { - connectionOptions.servername = remoteHost; - } - if (options['grpc-node.tls_enable_trace']) { - connectionOptions.enableTrace = true; - } - return connectionOptions; -} - -class SecureConnectorImpl implements SecureConnector { - constructor(private connectionOptions: ConnectionOptions, private callCredentials: CallCredentials) { - } - connect(socket: Socket): Promise { - const tlsConnectOptions: ConnectionOptions = { - socket: socket, - ...this.connectionOptions - }; - return new Promise((resolve, reject) => { - const tlsSocket = tlsConnect(tlsConnectOptions, () => { - if ((this.connectionOptions.rejectUnauthorized ?? true) && !tlsSocket.authorized) { - reject(tlsSocket.authorizationError); - return; - } - resolve({ - socket: tlsSocket, - secure: true - }) - }); - tlsSocket.on('error', (error: Error) => { - reject(error); - }); - }); - } - waitForReady(): Promise { - return Promise.resolve(); - } - getCallCredentials(): CallCredentials { - return this.callCredentials; - } - destroy() {} -} - -class SecureChannelCredentialsImpl extends ChannelCredentials { - constructor( - private secureContext: SecureContext, - private verifyOptions: VerifyOptions - ) { - super(); - } - - _isSecure(): boolean { - return true; - } - _equals(other: ChannelCredentials): boolean { - if (this === other) { - return true; - } - if (other instanceof SecureChannelCredentialsImpl) { - return ( - this.secureContext === other.secureContext && - this.verifyOptions.checkServerIdentity === - other.verifyOptions.checkServerIdentity - ); - } else { - return false; - } - } - _createSecureConnector(channelTarget: GrpcUri, options: ChannelOptions, callCredentials?: CallCredentials): SecureConnector { - const connectionOptions = getConnectionOptions(this.secureContext, this.verifyOptions, channelTarget, options); - return new SecureConnectorImpl(connectionOptions, callCredentials ?? CallCredentials.createEmpty()); - } -} - -class CertificateProviderChannelCredentialsImpl extends ChannelCredentials { - private refcount: number = 0; - /** - * `undefined` means that the certificates have not yet been loaded. `null` - * means that an attempt to load them has completed, and has failed. - */ - private latestCaUpdate: CaCertificateUpdate | null | undefined = undefined; - /** - * `undefined` means that the certificates have not yet been loaded. `null` - * means that an attempt to load them has completed, and has failed. - */ - private latestIdentityUpdate: IdentityCertificateUpdate | null | undefined = undefined; - private caCertificateUpdateListener: CaCertificateUpdateListener = this.handleCaCertificateUpdate.bind(this); - private identityCertificateUpdateListener: IdentityCertificateUpdateListener = this.handleIdentityCertitificateUpdate.bind(this); - private secureContextWatchers: ((context: SecureContext | null) => void)[] = []; - private static SecureConnectorImpl = class implements SecureConnector { - constructor(private parent: CertificateProviderChannelCredentialsImpl, private channelTarget: GrpcUri, private options: ChannelOptions, private callCredentials: CallCredentials) {} - - connect(socket: Socket): Promise { - return new Promise((resolve, reject) => { - const secureContext = this.parent.getLatestSecureContext(); - if (!secureContext) { - reject(new Error('Failed to load credentials')); - return; - } - if (socket.closed) { - reject(new Error('Socket closed while loading credentials')); - } - const connnectionOptions = getConnectionOptions(secureContext, this.parent.verifyOptions, this.channelTarget, this.options); - const tlsConnectOptions: ConnectionOptions = { - socket: socket, - ...connnectionOptions - } - const closeCallback = () => { - reject(new Error('Socket closed')); - }; - const errorCallback = (error: Error) => { - reject(error); - } - const tlsSocket = tlsConnect(tlsConnectOptions, () => { - tlsSocket.removeListener('close', closeCallback); - tlsSocket.removeListener('error', errorCallback); - if ((this.parent.verifyOptions.rejectUnauthorized ?? true) && !tlsSocket.authorized) { - reject(tlsSocket.authorizationError); - return; - } - resolve({ - socket: tlsSocket, - secure: true - }); - }); - tlsSocket.once('close', closeCallback); - tlsSocket.once('error', errorCallback); - }); - } - - async waitForReady(): Promise { - await this.parent.getSecureContext(); - } - - getCallCredentials(): CallCredentials { - return this.callCredentials; - } - - destroy() { - this.parent.unref(); - } - } - constructor( - private caCertificateProvider: CertificateProvider, - private identityCertificateProvider: CertificateProvider | null, - private verifyOptions: VerifyOptions - ) { - super(); - } - _isSecure(): boolean { - return true; - } - _equals(other: ChannelCredentials): boolean { - if (this === other) { - return true; - } - if (other instanceof CertificateProviderChannelCredentialsImpl) { - return this.caCertificateProvider === other.caCertificateProvider && - this.identityCertificateProvider === other.identityCertificateProvider && - this.verifyOptions?.checkServerIdentity === other.verifyOptions?.checkServerIdentity; - } else { - return false; - } - } - private ref(): void { - if (this.refcount === 0) { - this.caCertificateProvider.addCaCertificateListener(this.caCertificateUpdateListener); - this.identityCertificateProvider?.addIdentityCertificateListener(this.identityCertificateUpdateListener); - } - this.refcount += 1; - } - private unref(): void { - this.refcount -= 1; - if (this.refcount === 0) { - this.caCertificateProvider.removeCaCertificateListener(this.caCertificateUpdateListener); - this.identityCertificateProvider?.removeIdentityCertificateListener(this.identityCertificateUpdateListener); - } - } - _createSecureConnector(channelTarget: GrpcUri, options: ChannelOptions, callCredentials?: CallCredentials): SecureConnector { - this.ref(); - return new CertificateProviderChannelCredentialsImpl.SecureConnectorImpl(this, channelTarget, options, callCredentials ?? CallCredentials.createEmpty()); - } - - private maybeUpdateWatchers() { - if (this.hasReceivedUpdates()) { - for (const watcher of this.secureContextWatchers) { - watcher(this.getLatestSecureContext()); - } - this.secureContextWatchers = []; - } - } - - private handleCaCertificateUpdate(update: CaCertificateUpdate | null) { - this.latestCaUpdate = update; - this.maybeUpdateWatchers(); - } - - private handleIdentityCertitificateUpdate(update: IdentityCertificateUpdate | null) { - this.latestIdentityUpdate = update; - this.maybeUpdateWatchers(); - } - - private hasReceivedUpdates(): boolean { - if (this.latestCaUpdate === undefined) { - return false; - } - if (this.identityCertificateProvider && this.latestIdentityUpdate === undefined) { - return false; - } - return true; - } - - private getSecureContext(): Promise { - if (this.hasReceivedUpdates()) { - return Promise.resolve(this.getLatestSecureContext()); - } else { - return new Promise(resolve => { - this.secureContextWatchers.push(resolve); - }); - } - } - - private getLatestSecureContext(): SecureContext | null { - if (!this.latestCaUpdate) { - return null; - } - if (this.identityCertificateProvider !== null && !this.latestIdentityUpdate) { - return null; - } - try { - return createSecureContext({ - ca: this.latestCaUpdate.caCertificate, - key: this.latestIdentityUpdate?.privateKey, - cert: this.latestIdentityUpdate?.certificate, - ciphers: CIPHER_SUITES - }); - } catch (e) { - log(LogVerbosity.ERROR, 'Failed to createSecureContext with error ' + (e as Error).message); - return null; - } - } -} - -export function createCertificateProviderChannelCredentials(caCertificateProvider: CertificateProvider, identityCertificateProvider: CertificateProvider | null, verifyOptions?: VerifyOptions) { - return new CertificateProviderChannelCredentialsImpl(caCertificateProvider, identityCertificateProvider, verifyOptions ?? {}); -} - -class ComposedChannelCredentialsImpl extends ChannelCredentials { - constructor( - private channelCredentials: ChannelCredentials, - private callCredentials: CallCredentials - ) { - super(); - if (!channelCredentials._isSecure()) { - throw new Error('Cannot compose insecure credentials'); - } - } - compose(callCredentials: CallCredentials) { - const combinedCallCredentials = - this.callCredentials.compose(callCredentials); - return new ComposedChannelCredentialsImpl( - this.channelCredentials, - combinedCallCredentials - ); - } - _isSecure(): boolean { - return true; - } - _equals(other: ChannelCredentials): boolean { - if (this === other) { - return true; - } - if (other instanceof ComposedChannelCredentialsImpl) { - return ( - this.channelCredentials._equals(other.channelCredentials) && - this.callCredentials._equals(other.callCredentials) - ); - } else { - return false; - } - } - _createSecureConnector(channelTarget: GrpcUri, options: ChannelOptions, callCredentials?: CallCredentials): SecureConnector { - const combinedCallCredentials = this.callCredentials.compose(callCredentials ?? CallCredentials.createEmpty()); - return this.channelCredentials._createSecureConnector(channelTarget, options, combinedCallCredentials); - } -} diff --git a/node_modules/@grpc/grpc-js/src/channel-options.ts b/node_modules/@grpc/grpc-js/src/channel-options.ts deleted file mode 100644 index 41bd26d..0000000 --- a/node_modules/@grpc/grpc-js/src/channel-options.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { CompressionAlgorithms } from './compression-algorithms'; - -/** - * An interface that contains options used when initializing a Channel instance. - */ -export interface ChannelOptions { - 'grpc.ssl_target_name_override'?: string; - 'grpc.primary_user_agent'?: string; - 'grpc.secondary_user_agent'?: string; - 'grpc.default_authority'?: string; - 'grpc.keepalive_time_ms'?: number; - 'grpc.keepalive_timeout_ms'?: number; - 'grpc.keepalive_permit_without_calls'?: number; - 'grpc.service_config'?: string; - 'grpc.max_concurrent_streams'?: number; - 'grpc.initial_reconnect_backoff_ms'?: number; - 'grpc.max_reconnect_backoff_ms'?: number; - 'grpc.use_local_subchannel_pool'?: number; - 'grpc.max_send_message_length'?: number; - 'grpc.max_receive_message_length'?: number; - 'grpc.enable_http_proxy'?: number; - /* http_connect_target and http_connect_creds are used for passing data - * around internally, and should not be documented as public-facing options - */ - 'grpc.http_connect_target'?: string; - 'grpc.http_connect_creds'?: string; - 'grpc.default_compression_algorithm'?: CompressionAlgorithms; - 'grpc.enable_channelz'?: number; - 'grpc.dns_min_time_between_resolutions_ms'?: number; - 'grpc.enable_retries'?: number; - 'grpc.per_rpc_retry_buffer_size'?: number; - /* This option is pattered like a core option, but the core does not have - * this option. It is closely related to the option - * grpc.per_rpc_retry_buffer_size, which is in the core. The core will likely - * implement this functionality using the ResourceQuota mechanism, so there - * will probably not be any collision or other inconsistency. */ - 'grpc.retry_buffer_size'?: number; - 'grpc.max_connection_age_ms'?: number; - 'grpc.max_connection_age_grace_ms'?: number; - 'grpc.max_connection_idle_ms'?: number; - 'grpc-node.max_session_memory'?: number; - 'grpc.service_config_disable_resolution'?: number; - 'grpc.client_idle_timeout_ms'?: number; - /** - * Set the enableTrace option in TLS clients and servers - */ - 'grpc-node.tls_enable_trace'?: number; - 'grpc.lb.ring_hash.ring_size_cap'?: number; - 'grpc-node.retry_max_attempts_limit'?: number; - 'grpc-node.flow_control_window'?: number; - 'grpc.server_call_metric_recording'?: number; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [key: string]: any; -} - -/** - * This is for checking provided options at runtime. This is an object for - * easier membership checking. - */ -export const recognizedOptions = { - 'grpc.ssl_target_name_override': true, - 'grpc.primary_user_agent': true, - 'grpc.secondary_user_agent': true, - 'grpc.default_authority': true, - 'grpc.keepalive_time_ms': true, - 'grpc.keepalive_timeout_ms': true, - 'grpc.keepalive_permit_without_calls': true, - 'grpc.service_config': true, - 'grpc.max_concurrent_streams': true, - 'grpc.initial_reconnect_backoff_ms': true, - 'grpc.max_reconnect_backoff_ms': true, - 'grpc.use_local_subchannel_pool': true, - 'grpc.max_send_message_length': true, - 'grpc.max_receive_message_length': true, - 'grpc.enable_http_proxy': true, - 'grpc.enable_channelz': true, - 'grpc.dns_min_time_between_resolutions_ms': true, - 'grpc.enable_retries': true, - 'grpc.per_rpc_retry_buffer_size': true, - 'grpc.retry_buffer_size': true, - 'grpc.max_connection_age_ms': true, - 'grpc.max_connection_age_grace_ms': true, - 'grpc-node.max_session_memory': true, - 'grpc.service_config_disable_resolution': true, - 'grpc.client_idle_timeout_ms': true, - 'grpc-node.tls_enable_trace': true, - 'grpc.lb.ring_hash.ring_size_cap': true, - 'grpc-node.retry_max_attempts_limit': true, - 'grpc-node.flow_control_window': true, - 'grpc.server_call_metric_recording': true -}; - -export function channelOptionsEqual( - options1: ChannelOptions, - options2: ChannelOptions -) { - const keys1 = Object.keys(options1).sort(); - const keys2 = Object.keys(options2).sort(); - if (keys1.length !== keys2.length) { - return false; - } - for (let i = 0; i < keys1.length; i += 1) { - if (keys1[i] !== keys2[i]) { - return false; - } - if (options1[keys1[i]] !== options2[keys2[i]]) { - return false; - } - } - return true; -} diff --git a/node_modules/@grpc/grpc-js/src/channel.ts b/node_modules/@grpc/grpc-js/src/channel.ts deleted file mode 100644 index 514920c..0000000 --- a/node_modules/@grpc/grpc-js/src/channel.ts +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { ChannelCredentials } from './channel-credentials'; -import { ChannelOptions } from './channel-options'; -import { ServerSurfaceCall } from './server-call'; - -import { ConnectivityState } from './connectivity-state'; -import type { ChannelRef } from './channelz'; -import { Call } from './call-interface'; -import { InternalChannel } from './internal-channel'; -import { Deadline } from './deadline'; - -/** - * An interface that represents a communication channel to a server specified - * by a given address. - */ -export interface Channel { - /** - * Close the channel. This has the same functionality as the existing - * grpc.Client.prototype.close - */ - close(): void; - /** - * Return the target that this channel connects to - */ - getTarget(): string; - /** - * Get the channel's current connectivity state. This method is here mainly - * because it is in the existing internal Channel class, and there isn't - * another good place to put it. - * @param tryToConnect If true, the channel will start connecting if it is - * idle. Otherwise, idle channels will only start connecting when a - * call starts. - */ - getConnectivityState(tryToConnect: boolean): ConnectivityState; - /** - * Watch for connectivity state changes. This is also here mainly because - * it is in the existing external Channel class. - * @param currentState The state to watch for transitions from. This should - * always be populated by calling getConnectivityState immediately - * before. - * @param deadline A deadline for waiting for a state change - * @param callback Called with no error when a state change, or with an - * error if the deadline passes without a state change. - */ - watchConnectivityState( - currentState: ConnectivityState, - deadline: Date | number, - callback: (error?: Error) => void - ): void; - /** - * Get the channelz reference object for this channel. A request to the - * channelz service for the id in this object will provide information - * about this channel. - */ - getChannelzRef(): ChannelRef; - /** - * Create a call object. Call is an opaque type that is used by the Client - * class. This function is called by the gRPC library when starting a - * request. Implementers should return an instance of Call that is returned - * from calling createCall on an instance of the provided Channel class. - * @param method The full method string to request. - * @param deadline The call deadline - * @param host A host string override for making the request - * @param parentCall A server call to propagate some information from - * @param propagateFlags A bitwise combination of elements of grpc.propagate - * that indicates what information to propagate from parentCall. - */ - createCall( - method: string, - deadline: Deadline, - host: string | null | undefined, - parentCall: ServerSurfaceCall | null, - propagateFlags: number | null | undefined - ): Call; -} - -export class ChannelImplementation implements Channel { - private internalChannel: InternalChannel; - - constructor( - target: string, - credentials: ChannelCredentials, - options: ChannelOptions - ) { - if (typeof target !== 'string') { - throw new TypeError('Channel target must be a string'); - } - if (!(credentials instanceof ChannelCredentials)) { - throw new TypeError( - 'Channel credentials must be a ChannelCredentials object' - ); - } - if (options) { - if (typeof options !== 'object') { - throw new TypeError('Channel options must be an object'); - } - } - - this.internalChannel = new InternalChannel(target, credentials, options); - } - - close() { - this.internalChannel.close(); - } - - getTarget() { - return this.internalChannel.getTarget(); - } - - getConnectivityState(tryToConnect: boolean) { - return this.internalChannel.getConnectivityState(tryToConnect); - } - - watchConnectivityState( - currentState: ConnectivityState, - deadline: Date | number, - callback: (error?: Error) => void - ): void { - this.internalChannel.watchConnectivityState( - currentState, - deadline, - callback - ); - } - - /** - * Get the channelz reference object for this channel. The returned value is - * garbage if channelz is disabled for this channel. - * @returns - */ - getChannelzRef() { - return this.internalChannel.getChannelzRef(); - } - - createCall( - method: string, - deadline: Deadline, - host: string | null | undefined, - parentCall: ServerSurfaceCall | null, - propagateFlags: number | null | undefined - ): Call { - if (typeof method !== 'string') { - throw new TypeError('Channel#createCall: method must be a string'); - } - if (!(typeof deadline === 'number' || deadline instanceof Date)) { - throw new TypeError( - 'Channel#createCall: deadline must be a number or Date' - ); - } - return this.internalChannel.createCall( - method, - deadline, - host, - parentCall, - propagateFlags - ); - } -} diff --git a/node_modules/@grpc/grpc-js/src/channelz.ts b/node_modules/@grpc/grpc-js/src/channelz.ts deleted file mode 100644 index 7242d71..0000000 --- a/node_modules/@grpc/grpc-js/src/channelz.ts +++ /dev/null @@ -1,909 +0,0 @@ -/* - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { isIPv4, isIPv6 } from 'net'; -import { OrderedMap, type OrderedMapIterator } from '@js-sdsl/ordered-map'; -import { ConnectivityState } from './connectivity-state'; -import { Status } from './constants'; -import { Timestamp } from './generated/google/protobuf/Timestamp'; -import { Channel as ChannelMessage } from './generated/grpc/channelz/v1/Channel'; -import { ChannelConnectivityState__Output } from './generated/grpc/channelz/v1/ChannelConnectivityState'; -import { ChannelRef as ChannelRefMessage } from './generated/grpc/channelz/v1/ChannelRef'; -import { ChannelTrace } from './generated/grpc/channelz/v1/ChannelTrace'; -import { GetChannelRequest__Output } from './generated/grpc/channelz/v1/GetChannelRequest'; -import { GetChannelResponse } from './generated/grpc/channelz/v1/GetChannelResponse'; -import { sendUnaryData, ServerUnaryCall } from './server-call'; -import { ServerRef as ServerRefMessage } from './generated/grpc/channelz/v1/ServerRef'; -import { SocketRef as SocketRefMessage } from './generated/grpc/channelz/v1/SocketRef'; -import { - isTcpSubchannelAddress, - SubchannelAddress, -} from './subchannel-address'; -import { SubchannelRef as SubchannelRefMessage } from './generated/grpc/channelz/v1/SubchannelRef'; -import { GetServerRequest__Output } from './generated/grpc/channelz/v1/GetServerRequest'; -import { GetServerResponse } from './generated/grpc/channelz/v1/GetServerResponse'; -import { Server as ServerMessage } from './generated/grpc/channelz/v1/Server'; -import { GetServersRequest__Output } from './generated/grpc/channelz/v1/GetServersRequest'; -import { GetServersResponse } from './generated/grpc/channelz/v1/GetServersResponse'; -import { GetTopChannelsRequest__Output } from './generated/grpc/channelz/v1/GetTopChannelsRequest'; -import { GetTopChannelsResponse } from './generated/grpc/channelz/v1/GetTopChannelsResponse'; -import { GetSubchannelRequest__Output } from './generated/grpc/channelz/v1/GetSubchannelRequest'; -import { GetSubchannelResponse } from './generated/grpc/channelz/v1/GetSubchannelResponse'; -import { Subchannel as SubchannelMessage } from './generated/grpc/channelz/v1/Subchannel'; -import { GetSocketRequest__Output } from './generated/grpc/channelz/v1/GetSocketRequest'; -import { GetSocketResponse } from './generated/grpc/channelz/v1/GetSocketResponse'; -import { Socket as SocketMessage } from './generated/grpc/channelz/v1/Socket'; -import { Address } from './generated/grpc/channelz/v1/Address'; -import { Security } from './generated/grpc/channelz/v1/Security'; -import { GetServerSocketsRequest__Output } from './generated/grpc/channelz/v1/GetServerSocketsRequest'; -import { GetServerSocketsResponse } from './generated/grpc/channelz/v1/GetServerSocketsResponse'; -import { - ChannelzDefinition, - ChannelzHandlers, -} from './generated/grpc/channelz/v1/Channelz'; -import { ProtoGrpcType as ChannelzProtoGrpcType } from './generated/channelz'; -import type { loadSync } from '@grpc/proto-loader'; -import { registerAdminService } from './admin'; -import { loadPackageDefinition } from './make-client'; - -export type TraceSeverity = - | 'CT_UNKNOWN' - | 'CT_INFO' - | 'CT_WARNING' - | 'CT_ERROR'; - -interface Ref { - kind: EntityTypes; - id: number; - name: string; -} - -export interface ChannelRef extends Ref { - kind: EntityTypes.channel; -} - -export interface SubchannelRef extends Ref { - kind: EntityTypes.subchannel; -} - -export interface ServerRef extends Ref { - kind: EntityTypes.server; -} - -export interface SocketRef extends Ref { - kind: EntityTypes.socket; -} - -function channelRefToMessage(ref: ChannelRef): ChannelRefMessage { - return { - channel_id: ref.id, - name: ref.name, - }; -} - -function subchannelRefToMessage(ref: SubchannelRef): SubchannelRefMessage { - return { - subchannel_id: ref.id, - name: ref.name, - }; -} - -function serverRefToMessage(ref: ServerRef): ServerRefMessage { - return { - server_id: ref.id, - }; -} - -function socketRefToMessage(ref: SocketRef): SocketRefMessage { - return { - socket_id: ref.id, - name: ref.name, - }; -} - -interface TraceEvent { - description: string; - severity: TraceSeverity; - timestamp: Date; - childChannel?: ChannelRef; - childSubchannel?: SubchannelRef; -} - -/** - * The loose upper bound on the number of events that should be retained in a - * trace. This may be exceeded by up to a factor of 2. Arbitrarily chosen as a - * number that should be large enough to contain the recent relevant - * information, but small enough to not use excessive memory. - */ -const TARGET_RETAINED_TRACES = 32; - -/** - * Default number of sockets/servers/channels/subchannels to return - */ -const DEFAULT_MAX_RESULTS = 100; - -export class ChannelzTraceStub { - readonly events: TraceEvent[] = []; - readonly creationTimestamp: Date = new Date(); - readonly eventsLogged = 0; - - addTrace(): void {} - getTraceMessage(): ChannelTrace { - return { - creation_timestamp: dateToProtoTimestamp(this.creationTimestamp), - num_events_logged: this.eventsLogged, - events: [], - }; - } -} - -export class ChannelzTrace { - events: TraceEvent[] = []; - creationTimestamp: Date; - eventsLogged = 0; - - constructor() { - this.creationTimestamp = new Date(); - } - - addTrace( - severity: TraceSeverity, - description: string, - child?: ChannelRef | SubchannelRef - ) { - const timestamp = new Date(); - this.events.push({ - description: description, - severity: severity, - timestamp: timestamp, - childChannel: child?.kind === 'channel' ? child : undefined, - childSubchannel: child?.kind === 'subchannel' ? child : undefined, - }); - // Whenever the trace array gets too large, discard the first half - if (this.events.length >= TARGET_RETAINED_TRACES * 2) { - this.events = this.events.slice(TARGET_RETAINED_TRACES); - } - this.eventsLogged += 1; - } - - getTraceMessage(): ChannelTrace { - return { - creation_timestamp: dateToProtoTimestamp(this.creationTimestamp), - num_events_logged: this.eventsLogged, - events: this.events.map(event => { - return { - description: event.description, - severity: event.severity, - timestamp: dateToProtoTimestamp(event.timestamp), - channel_ref: event.childChannel - ? channelRefToMessage(event.childChannel) - : null, - subchannel_ref: event.childSubchannel - ? subchannelRefToMessage(event.childSubchannel) - : null, - }; - }), - }; - } -} - -type RefOrderedMap = OrderedMap< - number, - { ref: { id: number; kind: EntityTypes; name: string }; count: number } ->; - -export class ChannelzChildrenTracker { - private channelChildren: RefOrderedMap = new OrderedMap(); - private subchannelChildren: RefOrderedMap = new OrderedMap(); - private socketChildren: RefOrderedMap = new OrderedMap(); - private trackerMap = { - [EntityTypes.channel]: this.channelChildren, - [EntityTypes.subchannel]: this.subchannelChildren, - [EntityTypes.socket]: this.socketChildren, - } as const; - - refChild(child: ChannelRef | SubchannelRef | SocketRef) { - const tracker = this.trackerMap[child.kind]; - const trackedChild = tracker.find(child.id); - - if (trackedChild.equals(tracker.end())) { - tracker.setElement( - child.id, - { - ref: child, - count: 1, - }, - trackedChild - ); - } else { - trackedChild.pointer[1].count += 1; - } - } - - unrefChild(child: ChannelRef | SubchannelRef | SocketRef) { - const tracker = this.trackerMap[child.kind]; - const trackedChild = tracker.getElementByKey(child.id); - if (trackedChild !== undefined) { - trackedChild.count -= 1; - if (trackedChild.count === 0) { - tracker.eraseElementByKey(child.id); - } - } - } - - getChildLists(): ChannelzChildren { - return { - channels: this.channelChildren as ChannelzChildren['channels'], - subchannels: this.subchannelChildren as ChannelzChildren['subchannels'], - sockets: this.socketChildren as ChannelzChildren['sockets'], - }; - } -} - -export class ChannelzChildrenTrackerStub extends ChannelzChildrenTracker { - override refChild(): void {} - override unrefChild(): void {} -} - -export class ChannelzCallTracker { - callsStarted = 0; - callsSucceeded = 0; - callsFailed = 0; - lastCallStartedTimestamp: Date | null = null; - - addCallStarted() { - this.callsStarted += 1; - this.lastCallStartedTimestamp = new Date(); - } - addCallSucceeded() { - this.callsSucceeded += 1; - } - addCallFailed() { - this.callsFailed += 1; - } -} - -export class ChannelzCallTrackerStub extends ChannelzCallTracker { - override addCallStarted() {} - override addCallSucceeded() {} - override addCallFailed() {} -} - -export interface ChannelzChildren { - channels: OrderedMap; - subchannels: OrderedMap; - sockets: OrderedMap; -} - -export interface ChannelInfo { - target: string; - state: ConnectivityState; - trace: ChannelzTrace | ChannelzTraceStub; - callTracker: ChannelzCallTracker | ChannelzCallTrackerStub; - children: ChannelzChildren; -} - -export type SubchannelInfo = ChannelInfo; - -export interface ServerInfo { - trace: ChannelzTrace; - callTracker: ChannelzCallTracker; - listenerChildren: ChannelzChildren; - sessionChildren: ChannelzChildren; -} - -export interface TlsInfo { - cipherSuiteStandardName: string | null; - cipherSuiteOtherName: string | null; - localCertificate: Buffer | null; - remoteCertificate: Buffer | null; -} - -export interface SocketInfo { - localAddress: SubchannelAddress | null; - remoteAddress: SubchannelAddress | null; - security: TlsInfo | null; - remoteName: string | null; - streamsStarted: number; - streamsSucceeded: number; - streamsFailed: number; - messagesSent: number; - messagesReceived: number; - keepAlivesSent: number; - lastLocalStreamCreatedTimestamp: Date | null; - lastRemoteStreamCreatedTimestamp: Date | null; - lastMessageSentTimestamp: Date | null; - lastMessageReceivedTimestamp: Date | null; - localFlowControlWindow: number | null; - remoteFlowControlWindow: number | null; -} - -interface ChannelEntry { - ref: ChannelRef; - getInfo(): ChannelInfo; -} - -interface SubchannelEntry { - ref: SubchannelRef; - getInfo(): SubchannelInfo; -} - -interface ServerEntry { - ref: ServerRef; - getInfo(): ServerInfo; -} - -interface SocketEntry { - ref: SocketRef; - getInfo(): SocketInfo; -} - -export const enum EntityTypes { - channel = 'channel', - subchannel = 'subchannel', - server = 'server', - socket = 'socket', -} - -type EntryOrderedMap = OrderedMap any }>; - -const entityMaps = { - [EntityTypes.channel]: new OrderedMap(), - [EntityTypes.subchannel]: new OrderedMap(), - [EntityTypes.server]: new OrderedMap(), - [EntityTypes.socket]: new OrderedMap(), -} as const; - -export type RefByType = T extends EntityTypes.channel - ? ChannelRef - : T extends EntityTypes.server - ? ServerRef - : T extends EntityTypes.socket - ? SocketRef - : T extends EntityTypes.subchannel - ? SubchannelRef - : never; - -export type EntryByType = T extends EntityTypes.channel - ? ChannelEntry - : T extends EntityTypes.server - ? ServerEntry - : T extends EntityTypes.socket - ? SocketEntry - : T extends EntityTypes.subchannel - ? SubchannelEntry - : never; - -export type InfoByType = T extends EntityTypes.channel - ? ChannelInfo - : T extends EntityTypes.subchannel - ? SubchannelInfo - : T extends EntityTypes.server - ? ServerInfo - : T extends EntityTypes.socket - ? SocketInfo - : never; - -const generateRegisterFn = (kind: R) => { - let nextId = 1; - function getNextId(): number { - return nextId++; - } - - const entityMap: EntryOrderedMap = entityMaps[kind]; - - return ( - name: string, - getInfo: () => InfoByType, - channelzEnabled: boolean - ): RefByType => { - const id = getNextId(); - const ref = { id, name, kind } as RefByType; - if (channelzEnabled) { - entityMap.setElement(id, { ref, getInfo }); - } - return ref; - }; -}; - -export const registerChannelzChannel = generateRegisterFn(EntityTypes.channel); -export const registerChannelzSubchannel = generateRegisterFn( - EntityTypes.subchannel -); -export const registerChannelzServer = generateRegisterFn(EntityTypes.server); -export const registerChannelzSocket = generateRegisterFn(EntityTypes.socket); - -export function unregisterChannelzRef( - ref: ChannelRef | SubchannelRef | ServerRef | SocketRef -) { - entityMaps[ref.kind].eraseElementByKey(ref.id); -} - -/** - * Parse a single section of an IPv6 address as two bytes - * @param addressSection A hexadecimal string of length up to 4 - * @returns The pair of bytes representing this address section - */ -function parseIPv6Section(addressSection: string): [number, number] { - const numberValue = Number.parseInt(addressSection, 16); - return [(numberValue / 256) | 0, numberValue % 256]; -} - -/** - * Parse a chunk of an IPv6 address string to some number of bytes - * @param addressChunk Some number of segments of up to 4 hexadecimal - * characters each, joined by colons. - * @returns The list of bytes representing this address chunk - */ -function parseIPv6Chunk(addressChunk: string): number[] { - if (addressChunk === '') { - return []; - } - const bytePairs = addressChunk - .split(':') - .map(section => parseIPv6Section(section)); - const result: number[] = []; - return result.concat(...bytePairs); -} - -function isIPv6MappedIPv4(ipAddress: string) { - return isIPv6(ipAddress) && ipAddress.toLowerCase().startsWith('::ffff:') && isIPv4(ipAddress.substring(7)); -} - -/** - * Prerequisite: isIPv4(ipAddress) - * @param ipAddress - * @returns - */ -function ipv4AddressStringToBuffer(ipAddress: string): Buffer { - return Buffer.from( - Uint8Array.from( - ipAddress.split('.').map(segment => Number.parseInt(segment)) - ) - ); -} - -/** - * Converts an IPv4 or IPv6 address from string representation to binary - * representation - * @param ipAddress an IP address in standard IPv4 or IPv6 text format - * @returns - */ -function ipAddressStringToBuffer(ipAddress: string): Buffer | null { - if (isIPv4(ipAddress)) { - return ipv4AddressStringToBuffer(ipAddress); - } else if (isIPv6MappedIPv4(ipAddress)) { - return ipv4AddressStringToBuffer(ipAddress.substring(7)); - } else if (isIPv6(ipAddress)) { - let leftSection: string; - let rightSection: string; - const doubleColonIndex = ipAddress.indexOf('::'); - if (doubleColonIndex === -1) { - leftSection = ipAddress; - rightSection = ''; - } else { - leftSection = ipAddress.substring(0, doubleColonIndex); - rightSection = ipAddress.substring(doubleColonIndex + 2); - } - const leftBuffer = Buffer.from(parseIPv6Chunk(leftSection)); - const rightBuffer = Buffer.from(parseIPv6Chunk(rightSection)); - const middleBuffer = Buffer.alloc( - 16 - leftBuffer.length - rightBuffer.length, - 0 - ); - return Buffer.concat([leftBuffer, middleBuffer, rightBuffer]); - } else { - return null; - } -} - -function connectivityStateToMessage( - state: ConnectivityState -): ChannelConnectivityState__Output { - switch (state) { - case ConnectivityState.CONNECTING: - return { - state: 'CONNECTING', - }; - case ConnectivityState.IDLE: - return { - state: 'IDLE', - }; - case ConnectivityState.READY: - return { - state: 'READY', - }; - case ConnectivityState.SHUTDOWN: - return { - state: 'SHUTDOWN', - }; - case ConnectivityState.TRANSIENT_FAILURE: - return { - state: 'TRANSIENT_FAILURE', - }; - default: - return { - state: 'UNKNOWN', - }; - } -} - -function dateToProtoTimestamp(date?: Date | null): Timestamp | null { - if (!date) { - return null; - } - const millisSinceEpoch = date.getTime(); - return { - seconds: (millisSinceEpoch / 1000) | 0, - nanos: (millisSinceEpoch % 1000) * 1_000_000, - }; -} - -function getChannelMessage(channelEntry: ChannelEntry): ChannelMessage { - const resolvedInfo = channelEntry.getInfo(); - const channelRef: ChannelRefMessage[] = []; - const subchannelRef: SubchannelRefMessage[] = []; - - resolvedInfo.children.channels.forEach(el => { - channelRef.push(channelRefToMessage(el[1].ref)); - }); - - resolvedInfo.children.subchannels.forEach(el => { - subchannelRef.push(subchannelRefToMessage(el[1].ref)); - }); - - return { - ref: channelRefToMessage(channelEntry.ref), - data: { - target: resolvedInfo.target, - state: connectivityStateToMessage(resolvedInfo.state), - calls_started: resolvedInfo.callTracker.callsStarted, - calls_succeeded: resolvedInfo.callTracker.callsSucceeded, - calls_failed: resolvedInfo.callTracker.callsFailed, - last_call_started_timestamp: dateToProtoTimestamp( - resolvedInfo.callTracker.lastCallStartedTimestamp - ), - trace: resolvedInfo.trace.getTraceMessage(), - }, - channel_ref: channelRef, - subchannel_ref: subchannelRef, - }; -} - -function GetChannel( - call: ServerUnaryCall, - callback: sendUnaryData -): void { - const channelId = parseInt(call.request.channel_id, 10); - const channelEntry = - entityMaps[EntityTypes.channel].getElementByKey(channelId); - if (channelEntry === undefined) { - callback({ - code: Status.NOT_FOUND, - details: 'No channel data found for id ' + channelId, - }); - return; - } - callback(null, { channel: getChannelMessage(channelEntry) }); -} - -function GetTopChannels( - call: ServerUnaryCall, - callback: sendUnaryData -): void { - const maxResults = - parseInt(call.request.max_results, 10) || DEFAULT_MAX_RESULTS; - const resultList: ChannelMessage[] = []; - const startId = parseInt(call.request.start_channel_id, 10); - const channelEntries = entityMaps[EntityTypes.channel]; - - let i: OrderedMapIterator; - for ( - i = channelEntries.lowerBound(startId); - !i.equals(channelEntries.end()) && resultList.length < maxResults; - i = i.next() - ) { - resultList.push(getChannelMessage(i.pointer[1])); - } - - callback(null, { - channel: resultList, - end: i.equals(channelEntries.end()), - }); -} - -function getServerMessage(serverEntry: ServerEntry): ServerMessage { - const resolvedInfo = serverEntry.getInfo(); - const listenSocket: SocketRefMessage[] = []; - - resolvedInfo.listenerChildren.sockets.forEach(el => { - listenSocket.push(socketRefToMessage(el[1].ref)); - }); - - return { - ref: serverRefToMessage(serverEntry.ref), - data: { - calls_started: resolvedInfo.callTracker.callsStarted, - calls_succeeded: resolvedInfo.callTracker.callsSucceeded, - calls_failed: resolvedInfo.callTracker.callsFailed, - last_call_started_timestamp: dateToProtoTimestamp( - resolvedInfo.callTracker.lastCallStartedTimestamp - ), - trace: resolvedInfo.trace.getTraceMessage(), - }, - listen_socket: listenSocket, - }; -} - -function GetServer( - call: ServerUnaryCall, - callback: sendUnaryData -): void { - const serverId = parseInt(call.request.server_id, 10); - const serverEntries = entityMaps[EntityTypes.server]; - const serverEntry = serverEntries.getElementByKey(serverId); - if (serverEntry === undefined) { - callback({ - code: Status.NOT_FOUND, - details: 'No server data found for id ' + serverId, - }); - return; - } - callback(null, { server: getServerMessage(serverEntry) }); -} - -function GetServers( - call: ServerUnaryCall, - callback: sendUnaryData -): void { - const maxResults = - parseInt(call.request.max_results, 10) || DEFAULT_MAX_RESULTS; - const startId = parseInt(call.request.start_server_id, 10); - const serverEntries = entityMaps[EntityTypes.server]; - const resultList: ServerMessage[] = []; - - let i: OrderedMapIterator; - for ( - i = serverEntries.lowerBound(startId); - !i.equals(serverEntries.end()) && resultList.length < maxResults; - i = i.next() - ) { - resultList.push(getServerMessage(i.pointer[1])); - } - - callback(null, { - server: resultList, - end: i.equals(serverEntries.end()), - }); -} - -function GetSubchannel( - call: ServerUnaryCall, - callback: sendUnaryData -): void { - const subchannelId = parseInt(call.request.subchannel_id, 10); - const subchannelEntry = - entityMaps[EntityTypes.subchannel].getElementByKey(subchannelId); - if (subchannelEntry === undefined) { - callback({ - code: Status.NOT_FOUND, - details: 'No subchannel data found for id ' + subchannelId, - }); - return; - } - const resolvedInfo = subchannelEntry.getInfo(); - const listenSocket: SocketRefMessage[] = []; - - resolvedInfo.children.sockets.forEach(el => { - listenSocket.push(socketRefToMessage(el[1].ref)); - }); - - const subchannelMessage: SubchannelMessage = { - ref: subchannelRefToMessage(subchannelEntry.ref), - data: { - target: resolvedInfo.target, - state: connectivityStateToMessage(resolvedInfo.state), - calls_started: resolvedInfo.callTracker.callsStarted, - calls_succeeded: resolvedInfo.callTracker.callsSucceeded, - calls_failed: resolvedInfo.callTracker.callsFailed, - last_call_started_timestamp: dateToProtoTimestamp( - resolvedInfo.callTracker.lastCallStartedTimestamp - ), - trace: resolvedInfo.trace.getTraceMessage(), - }, - socket_ref: listenSocket, - }; - callback(null, { subchannel: subchannelMessage }); -} - -function subchannelAddressToAddressMessage( - subchannelAddress: SubchannelAddress -): Address { - if (isTcpSubchannelAddress(subchannelAddress)) { - return { - address: 'tcpip_address', - tcpip_address: { - ip_address: - ipAddressStringToBuffer(subchannelAddress.host) ?? undefined, - port: subchannelAddress.port, - }, - }; - } else { - return { - address: 'uds_address', - uds_address: { - filename: subchannelAddress.path, - }, - }; - } -} - -function GetSocket( - call: ServerUnaryCall, - callback: sendUnaryData -): void { - const socketId = parseInt(call.request.socket_id, 10); - const socketEntry = entityMaps[EntityTypes.socket].getElementByKey(socketId); - if (socketEntry === undefined) { - callback({ - code: Status.NOT_FOUND, - details: 'No socket data found for id ' + socketId, - }); - return; - } - const resolvedInfo = socketEntry.getInfo(); - const securityMessage: Security | null = resolvedInfo.security - ? { - model: 'tls', - tls: { - cipher_suite: resolvedInfo.security.cipherSuiteStandardName - ? 'standard_name' - : 'other_name', - standard_name: - resolvedInfo.security.cipherSuiteStandardName ?? undefined, - other_name: resolvedInfo.security.cipherSuiteOtherName ?? undefined, - local_certificate: - resolvedInfo.security.localCertificate ?? undefined, - remote_certificate: - resolvedInfo.security.remoteCertificate ?? undefined, - }, - } - : null; - const socketMessage: SocketMessage = { - ref: socketRefToMessage(socketEntry.ref), - local: resolvedInfo.localAddress - ? subchannelAddressToAddressMessage(resolvedInfo.localAddress) - : null, - remote: resolvedInfo.remoteAddress - ? subchannelAddressToAddressMessage(resolvedInfo.remoteAddress) - : null, - remote_name: resolvedInfo.remoteName ?? undefined, - security: securityMessage, - data: { - keep_alives_sent: resolvedInfo.keepAlivesSent, - streams_started: resolvedInfo.streamsStarted, - streams_succeeded: resolvedInfo.streamsSucceeded, - streams_failed: resolvedInfo.streamsFailed, - last_local_stream_created_timestamp: dateToProtoTimestamp( - resolvedInfo.lastLocalStreamCreatedTimestamp - ), - last_remote_stream_created_timestamp: dateToProtoTimestamp( - resolvedInfo.lastRemoteStreamCreatedTimestamp - ), - messages_received: resolvedInfo.messagesReceived, - messages_sent: resolvedInfo.messagesSent, - last_message_received_timestamp: dateToProtoTimestamp( - resolvedInfo.lastMessageReceivedTimestamp - ), - last_message_sent_timestamp: dateToProtoTimestamp( - resolvedInfo.lastMessageSentTimestamp - ), - local_flow_control_window: resolvedInfo.localFlowControlWindow - ? { value: resolvedInfo.localFlowControlWindow } - : null, - remote_flow_control_window: resolvedInfo.remoteFlowControlWindow - ? { value: resolvedInfo.remoteFlowControlWindow } - : null, - }, - }; - callback(null, { socket: socketMessage }); -} - -function GetServerSockets( - call: ServerUnaryCall< - GetServerSocketsRequest__Output, - GetServerSocketsResponse - >, - callback: sendUnaryData -): void { - const serverId = parseInt(call.request.server_id, 10); - const serverEntry = entityMaps[EntityTypes.server].getElementByKey(serverId); - - if (serverEntry === undefined) { - callback({ - code: Status.NOT_FOUND, - details: 'No server data found for id ' + serverId, - }); - return; - } - - const startId = parseInt(call.request.start_socket_id, 10); - const maxResults = - parseInt(call.request.max_results, 10) || DEFAULT_MAX_RESULTS; - const resolvedInfo = serverEntry.getInfo(); - // If we wanted to include listener sockets in the result, this line would - // instead say - // const allSockets = resolvedInfo.listenerChildren.sockets.concat(resolvedInfo.sessionChildren.sockets).sort((ref1, ref2) => ref1.id - ref2.id); - const allSockets = resolvedInfo.sessionChildren.sockets; - const resultList: SocketRefMessage[] = []; - - let i: OrderedMapIterator; - for ( - i = allSockets.lowerBound(startId); - !i.equals(allSockets.end()) && resultList.length < maxResults; - i = i.next() - ) { - resultList.push(socketRefToMessage(i.pointer[1].ref)); - } - - callback(null, { - socket_ref: resultList, - end: i.equals(allSockets.end()), - }); -} - -export function getChannelzHandlers(): ChannelzHandlers { - return { - GetChannel, - GetTopChannels, - GetServer, - GetServers, - GetSubchannel, - GetSocket, - GetServerSockets, - }; -} - -let loadedChannelzDefinition: ChannelzDefinition | null = null; - -export function getChannelzServiceDefinition(): ChannelzDefinition { - if (loadedChannelzDefinition) { - return loadedChannelzDefinition; - } - /* The purpose of this complexity is to avoid loading @grpc/proto-loader at - * runtime for users who will not use/enable channelz. */ - const loaderLoadSync = require('@grpc/proto-loader') - .loadSync as typeof loadSync; - const loadedProto = loaderLoadSync('channelz.proto', { - keepCase: true, - longs: String, - enums: String, - defaults: true, - oneofs: true, - includeDirs: [`${__dirname}/../../proto`], - }); - const channelzGrpcObject = loadPackageDefinition( - loadedProto - ) as unknown as ChannelzProtoGrpcType; - loadedChannelzDefinition = - channelzGrpcObject.grpc.channelz.v1.Channelz.service; - return loadedChannelzDefinition; -} - -export function setup() { - registerAdminService(getChannelzServiceDefinition, getChannelzHandlers); -} diff --git a/node_modules/@grpc/grpc-js/src/client-interceptors.ts b/node_modules/@grpc/grpc-js/src/client-interceptors.ts deleted file mode 100644 index 90c850e..0000000 --- a/node_modules/@grpc/grpc-js/src/client-interceptors.ts +++ /dev/null @@ -1,585 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { Metadata } from './metadata'; -import { - StatusObject, - Listener, - MetadataListener, - MessageListener, - StatusListener, - FullListener, - InterceptingListener, - InterceptingListenerImpl, - isInterceptingListener, - MessageContext, - Call, -} from './call-interface'; -import { Status } from './constants'; -import { Channel } from './channel'; -import { CallOptions } from './client'; -import { ClientMethodDefinition } from './make-client'; -import { getErrorMessage } from './error'; -import { AuthContext } from './auth-context'; - -/** - * Error class associated with passing both interceptors and interceptor - * providers to a client constructor or as call options. - */ -export class InterceptorConfigurationError extends Error { - constructor(message: string) { - super(message); - this.name = 'InterceptorConfigurationError'; - Error.captureStackTrace(this, InterceptorConfigurationError); - } -} - -export interface MetadataRequester { - ( - metadata: Metadata, - listener: InterceptingListener, - next: ( - metadata: Metadata, - listener: InterceptingListener | Listener - ) => void - ): void; -} - -export interface MessageRequester { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (message: any, next: (message: any) => void): void; -} - -export interface CloseRequester { - (next: () => void): void; -} - -export interface CancelRequester { - (next: () => void): void; -} - -/** - * An object with methods for intercepting and modifying outgoing call operations. - */ -export interface FullRequester { - start: MetadataRequester; - sendMessage: MessageRequester; - halfClose: CloseRequester; - cancel: CancelRequester; -} - -export type Requester = Partial; - -export class ListenerBuilder { - private metadata: MetadataListener | undefined = undefined; - private message: MessageListener | undefined = undefined; - private status: StatusListener | undefined = undefined; - - withOnReceiveMetadata(onReceiveMetadata: MetadataListener): this { - this.metadata = onReceiveMetadata; - return this; - } - - withOnReceiveMessage(onReceiveMessage: MessageListener): this { - this.message = onReceiveMessage; - return this; - } - - withOnReceiveStatus(onReceiveStatus: StatusListener): this { - this.status = onReceiveStatus; - return this; - } - - build(): Listener { - return { - onReceiveMetadata: this.metadata, - onReceiveMessage: this.message, - onReceiveStatus: this.status, - }; - } -} - -export class RequesterBuilder { - private start: MetadataRequester | undefined = undefined; - private message: MessageRequester | undefined = undefined; - private halfClose: CloseRequester | undefined = undefined; - private cancel: CancelRequester | undefined = undefined; - - withStart(start: MetadataRequester): this { - this.start = start; - return this; - } - - withSendMessage(sendMessage: MessageRequester): this { - this.message = sendMessage; - return this; - } - - withHalfClose(halfClose: CloseRequester): this { - this.halfClose = halfClose; - return this; - } - - withCancel(cancel: CancelRequester): this { - this.cancel = cancel; - return this; - } - - build(): Requester { - return { - start: this.start, - sendMessage: this.message, - halfClose: this.halfClose, - cancel: this.cancel, - }; - } -} - -/** - * A Listener with a default pass-through implementation of each method. Used - * for filling out Listeners with some methods omitted. - */ -const defaultListener: FullListener = { - onReceiveMetadata: (metadata, next) => { - next(metadata); - }, - onReceiveMessage: (message, next) => { - next(message); - }, - onReceiveStatus: (status, next) => { - next(status); - }, -}; - -/** - * A Requester with a default pass-through implementation of each method. Used - * for filling out Requesters with some methods omitted. - */ -const defaultRequester: FullRequester = { - start: (metadata, listener, next) => { - next(metadata, listener); - }, - sendMessage: (message, next) => { - next(message); - }, - halfClose: next => { - next(); - }, - cancel: next => { - next(); - }, -}; - -export interface InterceptorOptions extends CallOptions { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - method_definition: ClientMethodDefinition; -} - -export interface InterceptingCallInterface { - cancelWithStatus(status: Status, details: string): void; - getPeer(): string; - start(metadata: Metadata, listener?: Partial): void; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - sendMessageWithContext(context: MessageContext, message: any): void; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - sendMessage(message: any): void; - startRead(): void; - halfClose(): void; - getAuthContext(): AuthContext | null; -} - -export class InterceptingCall implements InterceptingCallInterface { - /** - * The requester that this InterceptingCall uses to modify outgoing operations - */ - private requester: FullRequester; - /** - * Indicates that metadata has been passed to the requester's start - * method but it has not been passed to the corresponding next callback - */ - private processingMetadata = false; - /** - * Message context for a pending message that is waiting for - */ - private pendingMessageContext: MessageContext | null = null; - private pendingMessage: any; - /** - * Indicates that a message has been passed to the requester's sendMessage - * method but it has not been passed to the corresponding next callback - */ - private processingMessage = false; - /** - * Indicates that a status was received but could not be propagated because - * a message was still being processed. - */ - private pendingHalfClose = false; - constructor( - private nextCall: InterceptingCallInterface, - requester?: Requester - ) { - if (requester) { - this.requester = { - start: requester.start ?? defaultRequester.start, - sendMessage: requester.sendMessage ?? defaultRequester.sendMessage, - halfClose: requester.halfClose ?? defaultRequester.halfClose, - cancel: requester.cancel ?? defaultRequester.cancel, - }; - } else { - this.requester = defaultRequester; - } - } - - cancelWithStatus(status: Status, details: string) { - this.requester.cancel(() => { - this.nextCall.cancelWithStatus(status, details); - }); - } - - getPeer() { - return this.nextCall.getPeer(); - } - - private processPendingMessage() { - if (this.pendingMessageContext) { - this.nextCall.sendMessageWithContext( - this.pendingMessageContext, - this.pendingMessage - ); - this.pendingMessageContext = null; - this.pendingMessage = null; - } - } - - private processPendingHalfClose() { - if (this.pendingHalfClose) { - this.nextCall.halfClose(); - } - } - - start( - metadata: Metadata, - interceptingListener?: Partial - ): void { - const fullInterceptingListener: InterceptingListener = { - onReceiveMetadata: - interceptingListener?.onReceiveMetadata?.bind(interceptingListener) ?? - (metadata => {}), - onReceiveMessage: - interceptingListener?.onReceiveMessage?.bind(interceptingListener) ?? - (message => {}), - onReceiveStatus: - interceptingListener?.onReceiveStatus?.bind(interceptingListener) ?? - (status => {}), - }; - this.processingMetadata = true; - this.requester.start(metadata, fullInterceptingListener, (md, listener) => { - this.processingMetadata = false; - let finalInterceptingListener: InterceptingListener; - if (isInterceptingListener(listener)) { - finalInterceptingListener = listener; - } else { - const fullListener: FullListener = { - onReceiveMetadata: - listener.onReceiveMetadata ?? defaultListener.onReceiveMetadata, - onReceiveMessage: - listener.onReceiveMessage ?? defaultListener.onReceiveMessage, - onReceiveStatus: - listener.onReceiveStatus ?? defaultListener.onReceiveStatus, - }; - finalInterceptingListener = new InterceptingListenerImpl( - fullListener, - fullInterceptingListener - ); - } - this.nextCall.start(md, finalInterceptingListener); - this.processPendingMessage(); - this.processPendingHalfClose(); - }); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - sendMessageWithContext(context: MessageContext, message: any): void { - this.processingMessage = true; - this.requester.sendMessage(message, finalMessage => { - this.processingMessage = false; - if (this.processingMetadata) { - this.pendingMessageContext = context; - this.pendingMessage = message; - } else { - this.nextCall.sendMessageWithContext(context, finalMessage); - this.processPendingHalfClose(); - } - }); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - sendMessage(message: any): void { - this.sendMessageWithContext({}, message); - } - startRead(): void { - this.nextCall.startRead(); - } - halfClose(): void { - this.requester.halfClose(() => { - if (this.processingMetadata || this.processingMessage) { - this.pendingHalfClose = true; - } else { - this.nextCall.halfClose(); - } - }); - } - getAuthContext(): AuthContext | null { - return this.nextCall.getAuthContext(); - } -} - -function getCall(channel: Channel, path: string, options: CallOptions): Call { - const deadline = options.deadline ?? Infinity; - const host = options.host; - const parent = options.parent ?? null; - const propagateFlags = options.propagate_flags; - const credentials = options.credentials; - const call = channel.createCall(path, deadline, host, parent, propagateFlags); - if (credentials) { - call.setCredentials(credentials); - } - return call; -} - -/** - * InterceptingCall implementation that directly owns the underlying Call - * object and handles serialization and deseraizliation. - */ -class BaseInterceptingCall implements InterceptingCallInterface { - constructor( - protected call: Call, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - protected methodDefinition: ClientMethodDefinition - ) {} - cancelWithStatus(status: Status, details: string): void { - this.call.cancelWithStatus(status, details); - } - getPeer(): string { - return this.call.getPeer(); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - sendMessageWithContext(context: MessageContext, message: any): void { - let serialized: Buffer; - try { - serialized = this.methodDefinition.requestSerialize(message); - } catch (e) { - this.call.cancelWithStatus( - Status.INTERNAL, - `Request message serialization failure: ${getErrorMessage(e)}` - ); - return; - } - this.call.sendMessageWithContext(context, serialized); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - sendMessage(message: any) { - this.sendMessageWithContext({}, message); - } - start( - metadata: Metadata, - interceptingListener?: Partial - ): void { - let readError: StatusObject | null = null; - this.call.start(metadata, { - onReceiveMetadata: metadata => { - interceptingListener?.onReceiveMetadata?.(metadata); - }, - onReceiveMessage: message => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let deserialized: any; - try { - deserialized = this.methodDefinition.responseDeserialize(message); - } catch (e) { - readError = { - code: Status.INTERNAL, - details: `Response message parsing error: ${getErrorMessage(e)}`, - metadata: new Metadata(), - }; - this.call.cancelWithStatus(readError.code, readError.details); - return; - } - interceptingListener?.onReceiveMessage?.(deserialized); - }, - onReceiveStatus: status => { - if (readError) { - interceptingListener?.onReceiveStatus?.(readError); - } else { - interceptingListener?.onReceiveStatus?.(status); - } - }, - }); - } - startRead() { - this.call.startRead(); - } - halfClose(): void { - this.call.halfClose(); - } - getAuthContext(): AuthContext | null { - return this.call.getAuthContext(); - } -} - -/** - * BaseInterceptingCall with special-cased behavior for methods with unary - * responses. - */ -class BaseUnaryInterceptingCall - extends BaseInterceptingCall - implements InterceptingCallInterface -{ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - constructor(call: Call, methodDefinition: ClientMethodDefinition) { - super(call, methodDefinition); - } - start(metadata: Metadata, listener?: Partial): void { - let receivedMessage = false; - const wrapperListener: InterceptingListener = { - onReceiveMetadata: - listener?.onReceiveMetadata?.bind(listener) ?? (metadata => {}), - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onReceiveMessage: (message: any) => { - receivedMessage = true; - listener?.onReceiveMessage?.(message); - }, - onReceiveStatus: (status: StatusObject) => { - if (!receivedMessage) { - listener?.onReceiveMessage?.(null); - } - listener?.onReceiveStatus?.(status); - }, - }; - super.start(metadata, wrapperListener); - this.call.startRead(); - } -} - -/** - * BaseInterceptingCall with special-cased behavior for methods with streaming - * responses. - */ -class BaseStreamingInterceptingCall - extends BaseInterceptingCall - implements InterceptingCallInterface {} - -function getBottomInterceptingCall( - channel: Channel, - options: InterceptorOptions, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - methodDefinition: ClientMethodDefinition -) { - const call = getCall(channel, methodDefinition.path, options); - if (methodDefinition.responseStream) { - return new BaseStreamingInterceptingCall(call, methodDefinition); - } else { - return new BaseUnaryInterceptingCall(call, methodDefinition); - } -} - -export interface NextCall { - (options: InterceptorOptions): InterceptingCallInterface; -} - -export interface Interceptor { - (options: InterceptorOptions, nextCall: NextCall): InterceptingCall; -} - -export interface InterceptorProvider { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (methodDefinition: ClientMethodDefinition): Interceptor; -} - -export interface InterceptorArguments { - clientInterceptors: Interceptor[]; - clientInterceptorProviders: InterceptorProvider[]; - callInterceptors: Interceptor[]; - callInterceptorProviders: InterceptorProvider[]; -} - -export function getInterceptingCall( - interceptorArgs: InterceptorArguments, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - methodDefinition: ClientMethodDefinition, - options: CallOptions, - channel: Channel -): InterceptingCallInterface { - if ( - interceptorArgs.clientInterceptors.length > 0 && - interceptorArgs.clientInterceptorProviders.length > 0 - ) { - throw new InterceptorConfigurationError( - 'Both interceptors and interceptor_providers were passed as options ' + - 'to the client constructor. Only one of these is allowed.' - ); - } - if ( - interceptorArgs.callInterceptors.length > 0 && - interceptorArgs.callInterceptorProviders.length > 0 - ) { - throw new InterceptorConfigurationError( - 'Both interceptors and interceptor_providers were passed as call ' + - 'options. Only one of these is allowed.' - ); - } - let interceptors: Interceptor[] = []; - // Interceptors passed to the call override interceptors passed to the client constructor - if ( - interceptorArgs.callInterceptors.length > 0 || - interceptorArgs.callInterceptorProviders.length > 0 - ) { - interceptors = ([] as Interceptor[]) - .concat( - interceptorArgs.callInterceptors, - interceptorArgs.callInterceptorProviders.map(provider => - provider(methodDefinition) - ) - ) - .filter(interceptor => interceptor); - // Filter out falsy values when providers return nothing - } else { - interceptors = ([] as Interceptor[]) - .concat( - interceptorArgs.clientInterceptors, - interceptorArgs.clientInterceptorProviders.map(provider => - provider(methodDefinition) - ) - ) - .filter(interceptor => interceptor); - // Filter out falsy values when providers return nothing - } - const interceptorOptions = Object.assign({}, options, { - method_definition: methodDefinition, - }); - /* For each interceptor in the list, the nextCall function passed to it is - * based on the next interceptor in the list, using a nextCall function - * constructed with the following interceptor in the list, and so on. The - * initialValue, which is effectively at the end of the list, is a nextCall - * function that invokes getBottomInterceptingCall, the result of which - * handles (de)serialization and also gets the underlying call from the - * channel. */ - const getCall: NextCall = interceptors.reduceRight( - (nextCall: NextCall, nextInterceptor: Interceptor) => { - return currentOptions => nextInterceptor(currentOptions, nextCall); - }, - (finalOptions: InterceptorOptions) => - getBottomInterceptingCall(channel, finalOptions, methodDefinition) - ); - return getCall(interceptorOptions); -} diff --git a/node_modules/@grpc/grpc-js/src/client.ts b/node_modules/@grpc/grpc-js/src/client.ts deleted file mode 100644 index dc75ac4..0000000 --- a/node_modules/@grpc/grpc-js/src/client.ts +++ /dev/null @@ -1,716 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { - ClientDuplexStream, - ClientDuplexStreamImpl, - ClientReadableStream, - ClientReadableStreamImpl, - ClientUnaryCall, - ClientUnaryCallImpl, - ClientWritableStream, - ClientWritableStreamImpl, - ServiceError, - callErrorFromStatus, - SurfaceCall, -} from './call'; -import { CallCredentials } from './call-credentials'; -import { StatusObject } from './call-interface'; -import { Channel, ChannelImplementation } from './channel'; -import { ConnectivityState } from './connectivity-state'; -import { ChannelCredentials } from './channel-credentials'; -import { ChannelOptions } from './channel-options'; -import { Status } from './constants'; -import { Metadata } from './metadata'; -import { ClientMethodDefinition } from './make-client'; -import { - getInterceptingCall, - Interceptor, - InterceptorProvider, - InterceptorArguments, - InterceptingCallInterface, -} from './client-interceptors'; -import { - ServerUnaryCall, - ServerReadableStream, - ServerWritableStream, - ServerDuplexStream, -} from './server-call'; -import { Deadline } from './deadline'; - -const CHANNEL_SYMBOL = Symbol(); -const INTERCEPTOR_SYMBOL = Symbol(); -const INTERCEPTOR_PROVIDER_SYMBOL = Symbol(); -const CALL_INVOCATION_TRANSFORMER_SYMBOL = Symbol(); - -function isFunction( - arg: Metadata | CallOptions | UnaryCallback | undefined -): arg is UnaryCallback { - return typeof arg === 'function'; -} - -export interface UnaryCallback { - (err: ServiceError | null, value?: ResponseType): void; -} - -/* eslint-disable @typescript-eslint/no-explicit-any */ -export interface CallOptions { - deadline?: Deadline; - host?: string; - parent?: - | ServerUnaryCall - | ServerReadableStream - | ServerWritableStream - | ServerDuplexStream; - propagate_flags?: number; - credentials?: CallCredentials; - interceptors?: Interceptor[]; - interceptor_providers?: InterceptorProvider[]; -} -/* eslint-enable @typescript-eslint/no-explicit-any */ - -export interface CallProperties { - argument?: RequestType; - metadata: Metadata; - call: SurfaceCall; - channel: Channel; - methodDefinition: ClientMethodDefinition; - callOptions: CallOptions; - callback?: UnaryCallback; -} - -export interface CallInvocationTransformer { - (callProperties: CallProperties): CallProperties; // eslint-disable-line @typescript-eslint/no-explicit-any -} - -export type ClientOptions = Partial & { - channelOverride?: Channel; - channelFactoryOverride?: ( - address: string, - credentials: ChannelCredentials, - options: ClientOptions - ) => Channel; - interceptors?: Interceptor[]; - interceptor_providers?: InterceptorProvider[]; - callInvocationTransformer?: CallInvocationTransformer; -}; - -function getErrorStackString(error: Error): string { - return error.stack?.split('\n').slice(1).join('\n') || 'no stack trace available'; -} - -/** - * A generic gRPC client. Primarily useful as a base class for all generated - * clients. - */ -export class Client { - private readonly [CHANNEL_SYMBOL]: Channel; - private readonly [INTERCEPTOR_SYMBOL]: Interceptor[]; - private readonly [INTERCEPTOR_PROVIDER_SYMBOL]: InterceptorProvider[]; - private readonly [CALL_INVOCATION_TRANSFORMER_SYMBOL]?: CallInvocationTransformer; - constructor( - address: string, - credentials: ChannelCredentials, - options: ClientOptions = {} - ) { - options = Object.assign({}, options); - this[INTERCEPTOR_SYMBOL] = options.interceptors ?? []; - delete options.interceptors; - this[INTERCEPTOR_PROVIDER_SYMBOL] = options.interceptor_providers ?? []; - delete options.interceptor_providers; - if ( - this[INTERCEPTOR_SYMBOL].length > 0 && - this[INTERCEPTOR_PROVIDER_SYMBOL].length > 0 - ) { - throw new Error( - 'Both interceptors and interceptor_providers were passed as options ' + - 'to the client constructor. Only one of these is allowed.' - ); - } - this[CALL_INVOCATION_TRANSFORMER_SYMBOL] = - options.callInvocationTransformer; - delete options.callInvocationTransformer; - if (options.channelOverride) { - this[CHANNEL_SYMBOL] = options.channelOverride; - } else if (options.channelFactoryOverride) { - const channelFactoryOverride = options.channelFactoryOverride; - delete options.channelFactoryOverride; - this[CHANNEL_SYMBOL] = channelFactoryOverride( - address, - credentials, - options - ); - } else { - this[CHANNEL_SYMBOL] = new ChannelImplementation( - address, - credentials, - options - ); - } - } - - close(): void { - this[CHANNEL_SYMBOL].close(); - } - - getChannel(): Channel { - return this[CHANNEL_SYMBOL]; - } - - waitForReady(deadline: Deadline, callback: (error?: Error) => void): void { - const checkState = (err?: Error) => { - if (err) { - callback(new Error('Failed to connect before the deadline')); - return; - } - let newState; - try { - newState = this[CHANNEL_SYMBOL].getConnectivityState(true); - } catch (e) { - callback(new Error('The channel has been closed')); - return; - } - if (newState === ConnectivityState.READY) { - callback(); - } else { - try { - this[CHANNEL_SYMBOL].watchConnectivityState( - newState, - deadline, - checkState - ); - } catch (e) { - callback(new Error('The channel has been closed')); - } - } - }; - setImmediate(checkState); - } - - private checkOptionalUnaryResponseArguments( - arg1: Metadata | CallOptions | UnaryCallback, - arg2?: CallOptions | UnaryCallback, - arg3?: UnaryCallback - ): { - metadata: Metadata; - options: CallOptions; - callback: UnaryCallback; - } { - if (isFunction(arg1)) { - return { metadata: new Metadata(), options: {}, callback: arg1 }; - } else if (isFunction(arg2)) { - if (arg1 instanceof Metadata) { - return { metadata: arg1, options: {}, callback: arg2 }; - } else { - return { metadata: new Metadata(), options: arg1, callback: arg2 }; - } - } else { - if ( - !( - arg1 instanceof Metadata && - arg2 instanceof Object && - isFunction(arg3) - ) - ) { - throw new Error('Incorrect arguments passed'); - } - return { metadata: arg1, options: arg2, callback: arg3 }; - } - } - - makeUnaryRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - argument: RequestType, - metadata: Metadata, - options: CallOptions, - callback: UnaryCallback - ): ClientUnaryCall; - makeUnaryRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - argument: RequestType, - metadata: Metadata, - callback: UnaryCallback - ): ClientUnaryCall; - makeUnaryRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - argument: RequestType, - options: CallOptions, - callback: UnaryCallback - ): ClientUnaryCall; - makeUnaryRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - argument: RequestType, - callback: UnaryCallback - ): ClientUnaryCall; - makeUnaryRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - argument: RequestType, - metadata: Metadata | CallOptions | UnaryCallback, - options?: CallOptions | UnaryCallback, - callback?: UnaryCallback - ): ClientUnaryCall { - const checkedArguments = - this.checkOptionalUnaryResponseArguments( - metadata, - options, - callback - ); - const methodDefinition: ClientMethodDefinition = - { - path: method, - requestStream: false, - responseStream: false, - requestSerialize: serialize, - responseDeserialize: deserialize, - }; - let callProperties: CallProperties = { - argument: argument, - metadata: checkedArguments.metadata, - call: new ClientUnaryCallImpl(), - channel: this[CHANNEL_SYMBOL], - methodDefinition: methodDefinition, - callOptions: checkedArguments.options, - callback: checkedArguments.callback, - }; - if (this[CALL_INVOCATION_TRANSFORMER_SYMBOL]) { - callProperties = this[CALL_INVOCATION_TRANSFORMER_SYMBOL]!( - callProperties - ) as CallProperties; - } - const emitter: ClientUnaryCall = callProperties.call; - const interceptorArgs: InterceptorArguments = { - clientInterceptors: this[INTERCEPTOR_SYMBOL], - clientInterceptorProviders: this[INTERCEPTOR_PROVIDER_SYMBOL], - callInterceptors: callProperties.callOptions.interceptors ?? [], - callInterceptorProviders: - callProperties.callOptions.interceptor_providers ?? [], - }; - const call: InterceptingCallInterface = getInterceptingCall( - interceptorArgs, - callProperties.methodDefinition, - callProperties.callOptions, - callProperties.channel - ); - /* This needs to happen before the emitter is used. Unfortunately we can't - * enforce this with the type system. We need to construct this emitter - * before calling the CallInvocationTransformer, and we need to create the - * call after that. */ - emitter.call = call; - let responseMessage: ResponseType | null = null; - let receivedStatus = false; - let callerStackError: Error | null = new Error(); - call.start(callProperties.metadata, { - onReceiveMetadata: metadata => { - emitter.emit('metadata', metadata); - }, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onReceiveMessage(message: any) { - if (responseMessage !== null) { - call.cancelWithStatus(Status.UNIMPLEMENTED, 'Too many responses received'); - } - responseMessage = message; - }, - onReceiveStatus(status: StatusObject) { - if (receivedStatus) { - return; - } - receivedStatus = true; - if (status.code === Status.OK) { - if (responseMessage === null) { - const callerStack = getErrorStackString(callerStackError!); - callProperties.callback!( - callErrorFromStatus( - { - code: Status.UNIMPLEMENTED, - details: 'No message received', - metadata: status.metadata, - }, - callerStack - ) - ); - } else { - callProperties.callback!(null, responseMessage); - } - } else { - const callerStack = getErrorStackString(callerStackError!); - callProperties.callback!(callErrorFromStatus(status, callerStack)); - } - /* Avoid retaining the callerStackError object in the call context of - * the status event handler. */ - callerStackError = null; - emitter.emit('status', status); - }, - }); - call.sendMessage(argument); - call.halfClose(); - return emitter; - } - - makeClientStreamRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - metadata: Metadata, - options: CallOptions, - callback: UnaryCallback - ): ClientWritableStream; - makeClientStreamRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - metadata: Metadata, - callback: UnaryCallback - ): ClientWritableStream; - makeClientStreamRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - options: CallOptions, - callback: UnaryCallback - ): ClientWritableStream; - makeClientStreamRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - callback: UnaryCallback - ): ClientWritableStream; - makeClientStreamRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - metadata: Metadata | CallOptions | UnaryCallback, - options?: CallOptions | UnaryCallback, - callback?: UnaryCallback - ): ClientWritableStream { - const checkedArguments = - this.checkOptionalUnaryResponseArguments( - metadata, - options, - callback - ); - const methodDefinition: ClientMethodDefinition = - { - path: method, - requestStream: true, - responseStream: false, - requestSerialize: serialize, - responseDeserialize: deserialize, - }; - let callProperties: CallProperties = { - metadata: checkedArguments.metadata, - call: new ClientWritableStreamImpl(serialize), - channel: this[CHANNEL_SYMBOL], - methodDefinition: methodDefinition, - callOptions: checkedArguments.options, - callback: checkedArguments.callback, - }; - if (this[CALL_INVOCATION_TRANSFORMER_SYMBOL]) { - callProperties = this[CALL_INVOCATION_TRANSFORMER_SYMBOL]!( - callProperties - ) as CallProperties; - } - const emitter: ClientWritableStream = - callProperties.call as ClientWritableStream; - const interceptorArgs: InterceptorArguments = { - clientInterceptors: this[INTERCEPTOR_SYMBOL], - clientInterceptorProviders: this[INTERCEPTOR_PROVIDER_SYMBOL], - callInterceptors: callProperties.callOptions.interceptors ?? [], - callInterceptorProviders: - callProperties.callOptions.interceptor_providers ?? [], - }; - const call: InterceptingCallInterface = getInterceptingCall( - interceptorArgs, - callProperties.methodDefinition, - callProperties.callOptions, - callProperties.channel - ); - /* This needs to happen before the emitter is used. Unfortunately we can't - * enforce this with the type system. We need to construct this emitter - * before calling the CallInvocationTransformer, and we need to create the - * call after that. */ - emitter.call = call; - let responseMessage: ResponseType | null = null; - let receivedStatus = false; - let callerStackError: Error | null = new Error(); - call.start(callProperties.metadata, { - onReceiveMetadata: metadata => { - emitter.emit('metadata', metadata); - }, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onReceiveMessage(message: any) { - if (responseMessage !== null) { - call.cancelWithStatus(Status.UNIMPLEMENTED, 'Too many responses received'); - } - responseMessage = message; - call.startRead(); - }, - onReceiveStatus(status: StatusObject) { - if (receivedStatus) { - return; - } - receivedStatus = true; - if (status.code === Status.OK) { - if (responseMessage === null) { - const callerStack = getErrorStackString(callerStackError!); - callProperties.callback!( - callErrorFromStatus( - { - code: Status.UNIMPLEMENTED, - details: 'No message received', - metadata: status.metadata, - }, - callerStack - ) - ); - } else { - callProperties.callback!(null, responseMessage); - } - } else { - const callerStack = getErrorStackString(callerStackError!); - callProperties.callback!(callErrorFromStatus(status, callerStack)); - } - /* Avoid retaining the callerStackError object in the call context of - * the status event handler. */ - callerStackError = null; - emitter.emit('status', status); - }, - }); - return emitter; - } - - private checkMetadataAndOptions( - arg1?: Metadata | CallOptions, - arg2?: CallOptions - ): { metadata: Metadata; options: CallOptions } { - let metadata: Metadata; - let options: CallOptions; - if (arg1 instanceof Metadata) { - metadata = arg1; - if (arg2) { - options = arg2; - } else { - options = {}; - } - } else { - if (arg1) { - options = arg1; - } else { - options = {}; - } - metadata = new Metadata(); - } - return { metadata, options }; - } - - makeServerStreamRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - argument: RequestType, - metadata: Metadata, - options?: CallOptions - ): ClientReadableStream; - makeServerStreamRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - argument: RequestType, - options?: CallOptions - ): ClientReadableStream; - makeServerStreamRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - argument: RequestType, - metadata?: Metadata | CallOptions, - options?: CallOptions - ): ClientReadableStream { - const checkedArguments = this.checkMetadataAndOptions(metadata, options); - const methodDefinition: ClientMethodDefinition = - { - path: method, - requestStream: false, - responseStream: true, - requestSerialize: serialize, - responseDeserialize: deserialize, - }; - let callProperties: CallProperties = { - argument: argument, - metadata: checkedArguments.metadata, - call: new ClientReadableStreamImpl(deserialize), - channel: this[CHANNEL_SYMBOL], - methodDefinition: methodDefinition, - callOptions: checkedArguments.options, - }; - if (this[CALL_INVOCATION_TRANSFORMER_SYMBOL]) { - callProperties = this[CALL_INVOCATION_TRANSFORMER_SYMBOL]!( - callProperties - ) as CallProperties; - } - const stream: ClientReadableStream = - callProperties.call as ClientReadableStream; - const interceptorArgs: InterceptorArguments = { - clientInterceptors: this[INTERCEPTOR_SYMBOL], - clientInterceptorProviders: this[INTERCEPTOR_PROVIDER_SYMBOL], - callInterceptors: callProperties.callOptions.interceptors ?? [], - callInterceptorProviders: - callProperties.callOptions.interceptor_providers ?? [], - }; - const call: InterceptingCallInterface = getInterceptingCall( - interceptorArgs, - callProperties.methodDefinition, - callProperties.callOptions, - callProperties.channel - ); - /* This needs to happen before the emitter is used. Unfortunately we can't - * enforce this with the type system. We need to construct this emitter - * before calling the CallInvocationTransformer, and we need to create the - * call after that. */ - stream.call = call; - let receivedStatus = false; - let callerStackError: Error | null = new Error(); - call.start(callProperties.metadata, { - onReceiveMetadata(metadata: Metadata) { - stream.emit('metadata', metadata); - }, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onReceiveMessage(message: any) { - stream.push(message); - }, - onReceiveStatus(status: StatusObject) { - if (receivedStatus) { - return; - } - receivedStatus = true; - stream.push(null); - if (status.code !== Status.OK) { - const callerStack = getErrorStackString(callerStackError!); - stream.emit('error', callErrorFromStatus(status, callerStack)); - } - /* Avoid retaining the callerStackError object in the call context of - * the status event handler. */ - callerStackError = null; - stream.emit('status', status); - }, - }); - call.sendMessage(argument); - call.halfClose(); - return stream; - } - - makeBidiStreamRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - metadata: Metadata, - options?: CallOptions - ): ClientDuplexStream; - makeBidiStreamRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - options?: CallOptions - ): ClientDuplexStream; - makeBidiStreamRequest( - method: string, - serialize: (value: RequestType) => Buffer, - deserialize: (value: Buffer) => ResponseType, - metadata?: Metadata | CallOptions, - options?: CallOptions - ): ClientDuplexStream { - const checkedArguments = this.checkMetadataAndOptions(metadata, options); - const methodDefinition: ClientMethodDefinition = - { - path: method, - requestStream: true, - responseStream: true, - requestSerialize: serialize, - responseDeserialize: deserialize, - }; - let callProperties: CallProperties = { - metadata: checkedArguments.metadata, - call: new ClientDuplexStreamImpl( - serialize, - deserialize - ), - channel: this[CHANNEL_SYMBOL], - methodDefinition: methodDefinition, - callOptions: checkedArguments.options, - }; - if (this[CALL_INVOCATION_TRANSFORMER_SYMBOL]) { - callProperties = this[CALL_INVOCATION_TRANSFORMER_SYMBOL]!( - callProperties - ) as CallProperties; - } - const stream: ClientDuplexStream = - callProperties.call as ClientDuplexStream; - const interceptorArgs: InterceptorArguments = { - clientInterceptors: this[INTERCEPTOR_SYMBOL], - clientInterceptorProviders: this[INTERCEPTOR_PROVIDER_SYMBOL], - callInterceptors: callProperties.callOptions.interceptors ?? [], - callInterceptorProviders: - callProperties.callOptions.interceptor_providers ?? [], - }; - const call: InterceptingCallInterface = getInterceptingCall( - interceptorArgs, - callProperties.methodDefinition, - callProperties.callOptions, - callProperties.channel - ); - /* This needs to happen before the emitter is used. Unfortunately we can't - * enforce this with the type system. We need to construct this emitter - * before calling the CallInvocationTransformer, and we need to create the - * call after that. */ - stream.call = call; - let receivedStatus = false; - let callerStackError: Error | null = new Error(); - call.start(callProperties.metadata, { - onReceiveMetadata(metadata: Metadata) { - stream.emit('metadata', metadata); - }, - onReceiveMessage(message: Buffer) { - stream.push(message); - }, - onReceiveStatus(status: StatusObject) { - if (receivedStatus) { - return; - } - receivedStatus = true; - stream.push(null); - if (status.code !== Status.OK) { - const callerStack = getErrorStackString(callerStackError!); - stream.emit('error', callErrorFromStatus(status, callerStack)); - } - /* Avoid retaining the callerStackError object in the call context of - * the status event handler. */ - callerStackError = null; - stream.emit('status', status); - }, - }); - return stream; - } -} diff --git a/node_modules/@grpc/grpc-js/src/compression-algorithms.ts b/node_modules/@grpc/grpc-js/src/compression-algorithms.ts deleted file mode 100644 index 67fdcf1..0000000 --- a/node_modules/@grpc/grpc-js/src/compression-algorithms.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -export enum CompressionAlgorithms { - identity = 0, - deflate = 1, - gzip = 2, -} diff --git a/node_modules/@grpc/grpc-js/src/compression-filter.ts b/node_modules/@grpc/grpc-js/src/compression-filter.ts deleted file mode 100644 index 5277d8c..0000000 --- a/node_modules/@grpc/grpc-js/src/compression-filter.ts +++ /dev/null @@ -1,370 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import * as zlib from 'zlib'; - -import { WriteObject, WriteFlags } from './call-interface'; -import { Channel } from './channel'; -import { ChannelOptions } from './channel-options'; -import { CompressionAlgorithms } from './compression-algorithms'; -import { DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH, DEFAULT_MAX_SEND_MESSAGE_LENGTH, LogVerbosity, Status } from './constants'; -import { BaseFilter, Filter, FilterFactory } from './filter'; -import * as logging from './logging'; -import { Metadata, MetadataValue } from './metadata'; - -const isCompressionAlgorithmKey = ( - key: number -): key is CompressionAlgorithms => { - return ( - typeof key === 'number' && typeof CompressionAlgorithms[key] === 'string' - ); -}; - -type CompressionAlgorithm = keyof typeof CompressionAlgorithms; - -type SharedCompressionFilterConfig = { - serverSupportedEncodingHeader?: string; -}; - -abstract class CompressionHandler { - protected abstract compressMessage(message: Buffer): Promise; - protected abstract decompressMessage(data: Buffer): Promise; - /** - * @param message Raw uncompressed message bytes - * @param compress Indicates whether the message should be compressed - * @return Framed message, compressed if applicable - */ - async writeMessage(message: Buffer, compress: boolean): Promise { - let messageBuffer = message; - if (compress) { - messageBuffer = await this.compressMessage(messageBuffer); - } - const output = Buffer.allocUnsafe(messageBuffer.length + 5); - output.writeUInt8(compress ? 1 : 0, 0); - output.writeUInt32BE(messageBuffer.length, 1); - messageBuffer.copy(output, 5); - return output; - } - /** - * @param data Framed message, possibly compressed - * @return Uncompressed message - */ - async readMessage(data: Buffer): Promise { - const compressed = data.readUInt8(0) === 1; - let messageBuffer: Buffer = data.slice(5); - if (compressed) { - messageBuffer = await this.decompressMessage(messageBuffer); - } - return messageBuffer; - } -} - -class IdentityHandler extends CompressionHandler { - async compressMessage(message: Buffer) { - return message; - } - - async writeMessage(message: Buffer, compress: boolean): Promise { - const output = Buffer.allocUnsafe(message.length + 5); - /* With "identity" compression, messages should always be marked as - * uncompressed */ - output.writeUInt8(0, 0); - output.writeUInt32BE(message.length, 1); - message.copy(output, 5); - return output; - } - - decompressMessage(message: Buffer): Promise { - return Promise.reject( - new Error( - 'Received compressed message but "grpc-encoding" header was identity' - ) - ); - } -} - -class DeflateHandler extends CompressionHandler { - constructor(private maxRecvMessageLength: number) { - super(); - } - - compressMessage(message: Buffer) { - return new Promise((resolve, reject) => { - zlib.deflate(message, (err, output) => { - if (err) { - reject(err); - } else { - resolve(output); - } - }); - }); - } - - decompressMessage(message: Buffer) { - return new Promise((resolve, reject) => { - let totalLength = 0; - const messageParts: Buffer[] = []; - const decompresser = zlib.createInflate(); - decompresser.on('error', (error: Error) => { - reject({ - code: Status.INTERNAL, - details: 'Failed to decompress deflate-encoded message' - }); - }); - decompresser.on('data', (chunk: Buffer) => { - messageParts.push(chunk); - totalLength += chunk.byteLength; - if (this.maxRecvMessageLength !== -1 && totalLength > this.maxRecvMessageLength) { - decompresser.destroy(); - reject({ - code: Status.RESOURCE_EXHAUSTED, - details: `Received message that decompresses to a size larger than ${this.maxRecvMessageLength}` - }); - } - }); - decompresser.on('end', () => { - resolve(Buffer.concat(messageParts)); - }); - decompresser.write(message); - decompresser.end(); - }); - } -} - -class GzipHandler extends CompressionHandler { - constructor(private maxRecvMessageLength: number) { - super(); - } - - compressMessage(message: Buffer) { - return new Promise((resolve, reject) => { - zlib.gzip(message, (err, output) => { - if (err) { - reject(err); - } else { - resolve(output); - } - }); - }); - } - - decompressMessage(message: Buffer) { - return new Promise((resolve, reject) => { - let totalLength = 0; - const messageParts: Buffer[] = []; - const decompresser = zlib.createGunzip(); - decompresser.on('error', (error: Error) => { - reject({ - code: Status.INTERNAL, - details: 'Failed to decompress gzip-encoded message' - }); - }); - decompresser.on('data', (chunk: Buffer) => { - messageParts.push(chunk); - totalLength += chunk.byteLength; - if (this.maxRecvMessageLength !== -1 && totalLength > this.maxRecvMessageLength) { - decompresser.destroy(); - reject({ - code: Status.RESOURCE_EXHAUSTED, - details: `Received message that decompresses to a size larger than ${this.maxRecvMessageLength}` - }); - } - }); - decompresser.on('end', () => { - resolve(Buffer.concat(messageParts)); - }); - decompresser.write(message); - decompresser.end(); - }); - } -} - -class UnknownHandler extends CompressionHandler { - constructor(private readonly compressionName: string) { - super(); - } - compressMessage(message: Buffer): Promise { - return Promise.reject( - new Error( - `Received message compressed with unsupported compression method ${this.compressionName}` - ) - ); - } - - decompressMessage(message: Buffer): Promise { - // This should be unreachable - return Promise.reject( - new Error(`Compression method not supported: ${this.compressionName}`) - ); - } -} - -function getCompressionHandler(compressionName: string, maxReceiveMessageSize: number): CompressionHandler { - switch (compressionName) { - case 'identity': - return new IdentityHandler(); - case 'deflate': - return new DeflateHandler(maxReceiveMessageSize); - case 'gzip': - return new GzipHandler(maxReceiveMessageSize); - default: - return new UnknownHandler(compressionName); - } -} - -export class CompressionFilter extends BaseFilter implements Filter { - private sendCompression: CompressionHandler = new IdentityHandler(); - private receiveCompression: CompressionHandler = new IdentityHandler(); - private currentCompressionAlgorithm: CompressionAlgorithm = 'identity'; - private maxReceiveMessageLength: number; - private maxSendMessageLength: number; - - constructor( - channelOptions: ChannelOptions, - private sharedFilterConfig: SharedCompressionFilterConfig - ) { - super(); - - const compressionAlgorithmKey = - channelOptions['grpc.default_compression_algorithm']; - this.maxReceiveMessageLength = channelOptions['grpc.max_receive_message_length'] ?? DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH; - this.maxSendMessageLength = channelOptions['grpc.max_send_message_length'] ?? DEFAULT_MAX_SEND_MESSAGE_LENGTH; - if (compressionAlgorithmKey !== undefined) { - if (isCompressionAlgorithmKey(compressionAlgorithmKey)) { - const clientSelectedEncoding = CompressionAlgorithms[ - compressionAlgorithmKey - ] as CompressionAlgorithm; - const serverSupportedEncodings = - sharedFilterConfig.serverSupportedEncodingHeader?.split(','); - /** - * There are two possible situations here: - * 1) We don't have any info yet from the server about what compression it supports - * In that case we should just use what the client tells us to use - * 2) We've previously received a response from the server including a grpc-accept-encoding header - * In that case we only want to use the encoding chosen by the client if the server supports it - */ - if ( - !serverSupportedEncodings || - serverSupportedEncodings.includes(clientSelectedEncoding) - ) { - this.currentCompressionAlgorithm = clientSelectedEncoding; - this.sendCompression = getCompressionHandler( - this.currentCompressionAlgorithm, - -1 - ); - } - } else { - logging.log( - LogVerbosity.ERROR, - `Invalid value provided for grpc.default_compression_algorithm option: ${compressionAlgorithmKey}` - ); - } - } - } - - async sendMetadata(metadata: Promise): Promise { - const headers: Metadata = await metadata; - headers.set('grpc-accept-encoding', 'identity,deflate,gzip'); - headers.set('accept-encoding', 'identity'); - - // No need to send the header if it's "identity" - behavior is identical; save the bandwidth - if (this.currentCompressionAlgorithm === 'identity') { - headers.remove('grpc-encoding'); - } else { - headers.set('grpc-encoding', this.currentCompressionAlgorithm); - } - - return headers; - } - - receiveMetadata(metadata: Metadata): Metadata { - const receiveEncoding: MetadataValue[] = metadata.get('grpc-encoding'); - if (receiveEncoding.length > 0) { - const encoding: MetadataValue = receiveEncoding[0]; - if (typeof encoding === 'string') { - this.receiveCompression = getCompressionHandler(encoding, this.maxReceiveMessageLength); - } - } - metadata.remove('grpc-encoding'); - - /* Check to see if the compression we're using to send messages is supported by the server - * If not, reset the sendCompression filter and have it use the default IdentityHandler */ - const serverSupportedEncodingsHeader = metadata.get( - 'grpc-accept-encoding' - )[0] as string | undefined; - if (serverSupportedEncodingsHeader) { - this.sharedFilterConfig.serverSupportedEncodingHeader = - serverSupportedEncodingsHeader; - const serverSupportedEncodings = - serverSupportedEncodingsHeader.split(','); - - if ( - !serverSupportedEncodings.includes(this.currentCompressionAlgorithm) - ) { - this.sendCompression = new IdentityHandler(); - this.currentCompressionAlgorithm = 'identity'; - } - } - metadata.remove('grpc-accept-encoding'); - return metadata; - } - - async sendMessage(message: Promise): Promise { - /* This filter is special. The input message is the bare message bytes, - * and the output is a framed and possibly compressed message. For this - * reason, this filter should be at the bottom of the filter stack */ - const resolvedMessage: WriteObject = await message; - if (this.maxSendMessageLength !== -1 && resolvedMessage.message.length > this.maxSendMessageLength) { - throw { - code: Status.RESOURCE_EXHAUSTED, - details: `Attempted to send message with a size larger than ${this.maxSendMessageLength}` - }; - } - let compress: boolean; - if (this.sendCompression instanceof IdentityHandler) { - compress = false; - } else { - compress = ((resolvedMessage.flags ?? 0) & WriteFlags.NoCompress) === 0; - } - - return { - message: await this.sendCompression.writeMessage( - resolvedMessage.message, - compress - ), - flags: resolvedMessage.flags, - }; - } - - async receiveMessage(message: Promise) { - /* This filter is also special. The input message is framed and possibly - * compressed, and the output message is deframed and uncompressed. So - * this is another reason that this filter should be at the bottom of the - * filter stack. */ - return this.receiveCompression.readMessage(await message); - } -} - -export class CompressionFilterFactory - implements FilterFactory -{ - private sharedFilterConfig: SharedCompressionFilterConfig = {}; - constructor(channel: Channel, private readonly options: ChannelOptions) {} - createFilter(): CompressionFilter { - return new CompressionFilter(this.options, this.sharedFilterConfig); - } -} diff --git a/node_modules/@grpc/grpc-js/src/connectivity-state.ts b/node_modules/@grpc/grpc-js/src/connectivity-state.ts deleted file mode 100644 index 560ab9c..0000000 --- a/node_modules/@grpc/grpc-js/src/connectivity-state.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -export enum ConnectivityState { - IDLE, - CONNECTING, - READY, - TRANSIENT_FAILURE, - SHUTDOWN, -} diff --git a/node_modules/@grpc/grpc-js/src/constants.ts b/node_modules/@grpc/grpc-js/src/constants.ts deleted file mode 100644 index 865b24c..0000000 --- a/node_modules/@grpc/grpc-js/src/constants.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -export enum Status { - OK = 0, - CANCELLED, - UNKNOWN, - INVALID_ARGUMENT, - DEADLINE_EXCEEDED, - NOT_FOUND, - ALREADY_EXISTS, - PERMISSION_DENIED, - RESOURCE_EXHAUSTED, - FAILED_PRECONDITION, - ABORTED, - OUT_OF_RANGE, - UNIMPLEMENTED, - INTERNAL, - UNAVAILABLE, - DATA_LOSS, - UNAUTHENTICATED, -} - -export enum LogVerbosity { - DEBUG = 0, - INFO, - ERROR, - NONE, -} - -/** - * NOTE: This enum is not currently used in any implemented API in this - * library. It is included only for type parity with the other implementation. - */ -export enum Propagate { - DEADLINE = 1, - CENSUS_STATS_CONTEXT = 2, - CENSUS_TRACING_CONTEXT = 4, - CANCELLATION = 8, - // https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/propagation_bits.h#L43 - DEFAULTS = 0xffff | - Propagate.DEADLINE | - Propagate.CENSUS_STATS_CONTEXT | - Propagate.CENSUS_TRACING_CONTEXT | - Propagate.CANCELLATION, -} - -// -1 means unlimited -export const DEFAULT_MAX_SEND_MESSAGE_LENGTH = -1; - -// 4 MB default -export const DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH = 4 * 1024 * 1024; diff --git a/node_modules/@grpc/grpc-js/src/control-plane-status.ts b/node_modules/@grpc/grpc-js/src/control-plane-status.ts deleted file mode 100644 index 1d10cb3..0000000 --- a/node_modules/@grpc/grpc-js/src/control-plane-status.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { Status } from './constants'; - -const INAPPROPRIATE_CONTROL_PLANE_CODES: Status[] = [ - Status.OK, - Status.INVALID_ARGUMENT, - Status.NOT_FOUND, - Status.ALREADY_EXISTS, - Status.FAILED_PRECONDITION, - Status.ABORTED, - Status.OUT_OF_RANGE, - Status.DATA_LOSS, -]; - -export function restrictControlPlaneStatusCode( - code: Status, - details: string -): { code: Status; details: string } { - if (INAPPROPRIATE_CONTROL_PLANE_CODES.includes(code)) { - return { - code: Status.INTERNAL, - details: `Invalid status from control plane: ${code} ${Status[code]} ${details}`, - }; - } else { - return { code, details }; - } -} diff --git a/node_modules/@grpc/grpc-js/src/deadline.ts b/node_modules/@grpc/grpc-js/src/deadline.ts deleted file mode 100644 index de05e38..0000000 --- a/node_modules/@grpc/grpc-js/src/deadline.ts +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -export type Deadline = Date | number; - -export function minDeadline(...deadlineList: Deadline[]): Deadline { - let minValue = Infinity; - for (const deadline of deadlineList) { - const deadlineMsecs = - deadline instanceof Date ? deadline.getTime() : deadline; - if (deadlineMsecs < minValue) { - minValue = deadlineMsecs; - } - } - return minValue; -} - -const units: Array<[string, number]> = [ - ['m', 1], - ['S', 1000], - ['M', 60 * 1000], - ['H', 60 * 60 * 1000], -]; - -export function getDeadlineTimeoutString(deadline: Deadline) { - const now = new Date().getTime(); - if (deadline instanceof Date) { - deadline = deadline.getTime(); - } - const timeoutMs = Math.max(deadline - now, 0); - for (const [unit, factor] of units) { - const amount = timeoutMs / factor; - if (amount < 1e8) { - return String(Math.ceil(amount)) + unit; - } - } - throw new Error('Deadline is too far in the future'); -} - -/** - * See https://nodejs.org/api/timers.html#settimeoutcallback-delay-args - * In particular, "When delay is larger than 2147483647 or less than 1, the - * delay will be set to 1. Non-integer delays are truncated to an integer." - * This number of milliseconds is almost 25 days. - */ -const MAX_TIMEOUT_TIME = 2147483647; - -/** - * Get the timeout value that should be passed to setTimeout now for the timer - * to end at the deadline. For any deadline before now, the timer should end - * immediately, represented by a value of 0. For any deadline more than - * MAX_TIMEOUT_TIME milliseconds in the future, a timer cannot be set that will - * end at that time, so it is treated as infinitely far in the future. - * @param deadline - * @returns - */ -export function getRelativeTimeout(deadline: Deadline) { - const deadlineMs = deadline instanceof Date ? deadline.getTime() : deadline; - const now = new Date().getTime(); - const timeout = deadlineMs - now; - if (timeout < 0) { - return 0; - } else if (timeout > MAX_TIMEOUT_TIME) { - return Infinity; - } else { - return timeout; - } -} - -export function deadlineToString(deadline: Deadline): string { - if (deadline instanceof Date) { - return deadline.toISOString(); - } else { - const dateDeadline = new Date(deadline); - if (Number.isNaN(dateDeadline.getTime())) { - return '' + deadline; - } else { - return dateDeadline.toISOString(); - } - } -} - -/** - * Calculate the difference between two dates as a number of seconds and format - * it as a string. - * @param startDate - * @param endDate - * @returns - */ -export function formatDateDifference(startDate: Date, endDate: Date): string { - return ((endDate.getTime() - startDate.getTime()) / 1000).toFixed(3) + 's'; -} diff --git a/node_modules/@grpc/grpc-js/src/duration.ts b/node_modules/@grpc/grpc-js/src/duration.ts deleted file mode 100644 index 05a43da..0000000 --- a/node_modules/@grpc/grpc-js/src/duration.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -export interface Duration { - seconds: number; - nanos: number; -} - -export interface DurationMessage { - seconds: string; - nanos: number; -} - -export function durationMessageToDuration(message: DurationMessage): Duration { - return { - seconds: Number.parseInt(message.seconds), - nanos: message.nanos - }; -} - -export function msToDuration(millis: number): Duration { - return { - seconds: (millis / 1000) | 0, - nanos: ((millis % 1000) * 1_000_000) | 0, - }; -} - -export function durationToMs(duration: Duration): number { - return (duration.seconds * 1000 + duration.nanos / 1_000_000) | 0; -} - -export function isDuration(value: any): value is Duration { - return typeof value.seconds === 'number' && typeof value.nanos === 'number'; -} - -export function isDurationMessage(value: any): value is DurationMessage { - return typeof value.seconds === 'string' && typeof value.nanos === 'number'; -} - -const durationRegex = /^(\d+)(?:\.(\d+))?s$/; -export function parseDuration(value: string): Duration | null { - const match = value.match(durationRegex); - if (!match) { - return null; - } - return { - seconds: Number.parseInt(match[1], 10), - nanos: match[2] ? Number.parseInt(match[2].padEnd(9, '0'), 10) : 0 - }; -} - -export function durationToString(duration: Duration): string { - if (duration.nanos === 0) { - return `${duration.seconds}s`; - } - let scaleFactor: number; - if (duration.nanos % 1_000_000 === 0) { - scaleFactor = 1_000_000; - } else if (duration.nanos % 1_000 === 0) { - scaleFactor = 1_000; - } else { - scaleFactor = 1; - } - return `${duration.seconds}.${duration.nanos/scaleFactor}s`; -} diff --git a/node_modules/@grpc/grpc-js/src/environment.ts b/node_modules/@grpc/grpc-js/src/environment.ts deleted file mode 100644 index d2927a3..0000000 --- a/node_modules/@grpc/grpc-js/src/environment.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2024 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -export const GRPC_NODE_USE_ALTERNATIVE_RESOLVER = - (process.env.GRPC_NODE_USE_ALTERNATIVE_RESOLVER ?? 'false') === 'true'; diff --git a/node_modules/@grpc/grpc-js/src/error.ts b/node_modules/@grpc/grpc-js/src/error.ts deleted file mode 100644 index 105a3ee..0000000 --- a/node_modules/@grpc/grpc-js/src/error.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -export function getErrorMessage(error: unknown): string { - if (error instanceof Error) { - return error.message; - } else { - return String(error); - } -} - -export function getErrorCode(error: unknown): number | null { - if ( - typeof error === 'object' && - error !== null && - 'code' in error && - typeof (error as Record).code === 'number' - ) { - return (error as Record).code; - } else { - return null; - } -} diff --git a/node_modules/@grpc/grpc-js/src/events.ts b/node_modules/@grpc/grpc-js/src/events.ts deleted file mode 100644 index 7718746..0000000 --- a/node_modules/@grpc/grpc-js/src/events.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -export interface EmitterAugmentation1 { - addListener(event: Name, listener: (arg1: Arg) => void): this; - emit(event: Name, arg1: Arg): boolean; - on(event: Name, listener: (arg1: Arg) => void): this; - once(event: Name, listener: (arg1: Arg) => void): this; - prependListener(event: Name, listener: (arg1: Arg) => void): this; - prependOnceListener(event: Name, listener: (arg1: Arg) => void): this; - removeListener(event: Name, listener: (arg1: Arg) => void): this; -} diff --git a/node_modules/@grpc/grpc-js/src/experimental.ts b/node_modules/@grpc/grpc-js/src/experimental.ts deleted file mode 100644 index b8f7766..0000000 --- a/node_modules/@grpc/grpc-js/src/experimental.ts +++ /dev/null @@ -1,73 +0,0 @@ -export { trace, log } from './logging'; -export { - Resolver, - ResolverListener, - registerResolver, - ConfigSelector, - createResolver, - CHANNEL_ARGS_CONFIG_SELECTOR_KEY, -} from './resolver'; -export { GrpcUri, uriToString, splitHostPort, HostPort } from './uri-parser'; -export { Duration, durationToMs, parseDuration } from './duration'; -export { BackoffTimeout } from './backoff-timeout'; -export { - LoadBalancer, - TypedLoadBalancingConfig, - ChannelControlHelper, - createChildChannelControlHelper, - registerLoadBalancerType, - selectLbConfigFromList, - parseLoadBalancingConfig, - isLoadBalancerNameRegistered, -} from './load-balancer'; -export { LeafLoadBalancer } from './load-balancer-pick-first'; -export { - SubchannelAddress, - subchannelAddressToString, - Endpoint, - endpointToString, - endpointHasAddress, - EndpointMap, -} from './subchannel-address'; -export { ChildLoadBalancerHandler } from './load-balancer-child-handler'; -export { - Picker, - UnavailablePicker, - QueuePicker, - PickResult, - PickArgs, - PickResultType, -} from './picker'; -export { - Call as CallStream, - StatusOr, - statusOrFromValue, - statusOrFromError -} from './call-interface'; -export { Filter, BaseFilter, FilterFactory } from './filter'; -export { FilterStackFactory } from './filter-stack'; -export { registerAdminService } from './admin'; -export { - SubchannelInterface, - BaseSubchannelWrapper, - ConnectivityStateListener, - HealthListener, -} from './subchannel-interface'; -export { - OutlierDetectionRawConfig, - SuccessRateEjectionConfig, - FailurePercentageEjectionConfig, -} from './load-balancer-outlier-detection'; - -export { createServerCredentialsWithInterceptors, createCertificateProviderServerCredentials } from './server-credentials'; -export { - CaCertificateUpdate, - CaCertificateUpdateListener, - IdentityCertificateUpdate, - IdentityCertificateUpdateListener, - CertificateProvider, - FileWatcherCertificateProvider, - FileWatcherCertificateProviderConfig -} from './certificate-provider'; -export { createCertificateProviderChannelCredentials, SecureConnector, SecureConnectResult } from './channel-credentials'; -export { SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX } from './internal-channel'; diff --git a/node_modules/@grpc/grpc-js/src/filter-stack.ts b/node_modules/@grpc/grpc-js/src/filter-stack.ts deleted file mode 100644 index 910f5aa..0000000 --- a/node_modules/@grpc/grpc-js/src/filter-stack.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { StatusObject, WriteObject } from './call-interface'; -import { Filter, FilterFactory } from './filter'; -import { Metadata } from './metadata'; - -export class FilterStack implements Filter { - constructor(private readonly filters: Filter[]) {} - - sendMetadata(metadata: Promise): Promise { - let result: Promise = metadata; - - for (let i = 0; i < this.filters.length; i++) { - result = this.filters[i].sendMetadata(result); - } - - return result; - } - - receiveMetadata(metadata: Metadata) { - let result: Metadata = metadata; - - for (let i = this.filters.length - 1; i >= 0; i--) { - result = this.filters[i].receiveMetadata(result); - } - - return result; - } - - sendMessage(message: Promise): Promise { - let result: Promise = message; - - for (let i = 0; i < this.filters.length; i++) { - result = this.filters[i].sendMessage(result); - } - - return result; - } - - receiveMessage(message: Promise): Promise { - let result: Promise = message; - - for (let i = this.filters.length - 1; i >= 0; i--) { - result = this.filters[i].receiveMessage(result); - } - - return result; - } - - receiveTrailers(status: StatusObject): StatusObject { - let result: StatusObject = status; - - for (let i = this.filters.length - 1; i >= 0; i--) { - result = this.filters[i].receiveTrailers(result); - } - - return result; - } - - push(filters: Filter[]) { - this.filters.unshift(...filters); - } - - getFilters(): Filter[] { - return this.filters; - } -} - -export class FilterStackFactory implements FilterFactory { - constructor(private readonly factories: Array>) {} - - push(filterFactories: FilterFactory[]) { - this.factories.unshift(...filterFactories); - } - - clone(): FilterStackFactory { - return new FilterStackFactory([...this.factories]); - } - - createFilter(): FilterStack { - return new FilterStack( - this.factories.map(factory => factory.createFilter()) - ); - } -} diff --git a/node_modules/@grpc/grpc-js/src/filter.ts b/node_modules/@grpc/grpc-js/src/filter.ts deleted file mode 100644 index 5313f91..0000000 --- a/node_modules/@grpc/grpc-js/src/filter.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { StatusObject, WriteObject } from './call-interface'; -import { Metadata } from './metadata'; - -/** - * Filter classes represent related per-call logic and state that is primarily - * used to modify incoming and outgoing data. All async filters can be - * rejected. The rejection error must be a StatusObject, and a rejection will - * cause the call to end with that status. - */ -export interface Filter { - sendMetadata(metadata: Promise): Promise; - - receiveMetadata(metadata: Metadata): Metadata; - - sendMessage(message: Promise): Promise; - - receiveMessage(message: Promise): Promise; - - receiveTrailers(status: StatusObject): StatusObject; -} - -export abstract class BaseFilter implements Filter { - async sendMetadata(metadata: Promise): Promise { - return metadata; - } - - receiveMetadata(metadata: Metadata): Metadata { - return metadata; - } - - async sendMessage(message: Promise): Promise { - return message; - } - - async receiveMessage(message: Promise): Promise { - return message; - } - - receiveTrailers(status: StatusObject): StatusObject { - return status; - } -} - -export interface FilterFactory { - createFilter(): T; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/channelz.ts b/node_modules/@grpc/grpc-js/src/generated/channelz.ts deleted file mode 100644 index fcfab4b..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/channelz.ts +++ /dev/null @@ -1,119 +0,0 @@ -import type * as grpc from '../index'; -import type { MessageTypeDefinition } from '@grpc/proto-loader'; - -import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from './google/protobuf/Any'; -import type { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from './google/protobuf/BoolValue'; -import type { BytesValue as _google_protobuf_BytesValue, BytesValue__Output as _google_protobuf_BytesValue__Output } from './google/protobuf/BytesValue'; -import type { DoubleValue as _google_protobuf_DoubleValue, DoubleValue__Output as _google_protobuf_DoubleValue__Output } from './google/protobuf/DoubleValue'; -import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from './google/protobuf/Duration'; -import type { FloatValue as _google_protobuf_FloatValue, FloatValue__Output as _google_protobuf_FloatValue__Output } from './google/protobuf/FloatValue'; -import type { Int32Value as _google_protobuf_Int32Value, Int32Value__Output as _google_protobuf_Int32Value__Output } from './google/protobuf/Int32Value'; -import type { Int64Value as _google_protobuf_Int64Value, Int64Value__Output as _google_protobuf_Int64Value__Output } from './google/protobuf/Int64Value'; -import type { StringValue as _google_protobuf_StringValue, StringValue__Output as _google_protobuf_StringValue__Output } from './google/protobuf/StringValue'; -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from './google/protobuf/Timestamp'; -import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from './google/protobuf/UInt32Value'; -import type { UInt64Value as _google_protobuf_UInt64Value, UInt64Value__Output as _google_protobuf_UInt64Value__Output } from './google/protobuf/UInt64Value'; -import type { Address as _grpc_channelz_v1_Address, Address__Output as _grpc_channelz_v1_Address__Output } from './grpc/channelz/v1/Address'; -import type { Channel as _grpc_channelz_v1_Channel, Channel__Output as _grpc_channelz_v1_Channel__Output } from './grpc/channelz/v1/Channel'; -import type { ChannelConnectivityState as _grpc_channelz_v1_ChannelConnectivityState, ChannelConnectivityState__Output as _grpc_channelz_v1_ChannelConnectivityState__Output } from './grpc/channelz/v1/ChannelConnectivityState'; -import type { ChannelData as _grpc_channelz_v1_ChannelData, ChannelData__Output as _grpc_channelz_v1_ChannelData__Output } from './grpc/channelz/v1/ChannelData'; -import type { ChannelRef as _grpc_channelz_v1_ChannelRef, ChannelRef__Output as _grpc_channelz_v1_ChannelRef__Output } from './grpc/channelz/v1/ChannelRef'; -import type { ChannelTrace as _grpc_channelz_v1_ChannelTrace, ChannelTrace__Output as _grpc_channelz_v1_ChannelTrace__Output } from './grpc/channelz/v1/ChannelTrace'; -import type { ChannelTraceEvent as _grpc_channelz_v1_ChannelTraceEvent, ChannelTraceEvent__Output as _grpc_channelz_v1_ChannelTraceEvent__Output } from './grpc/channelz/v1/ChannelTraceEvent'; -import type { ChannelzClient as _grpc_channelz_v1_ChannelzClient, ChannelzDefinition as _grpc_channelz_v1_ChannelzDefinition } from './grpc/channelz/v1/Channelz'; -import type { GetChannelRequest as _grpc_channelz_v1_GetChannelRequest, GetChannelRequest__Output as _grpc_channelz_v1_GetChannelRequest__Output } from './grpc/channelz/v1/GetChannelRequest'; -import type { GetChannelResponse as _grpc_channelz_v1_GetChannelResponse, GetChannelResponse__Output as _grpc_channelz_v1_GetChannelResponse__Output } from './grpc/channelz/v1/GetChannelResponse'; -import type { GetServerRequest as _grpc_channelz_v1_GetServerRequest, GetServerRequest__Output as _grpc_channelz_v1_GetServerRequest__Output } from './grpc/channelz/v1/GetServerRequest'; -import type { GetServerResponse as _grpc_channelz_v1_GetServerResponse, GetServerResponse__Output as _grpc_channelz_v1_GetServerResponse__Output } from './grpc/channelz/v1/GetServerResponse'; -import type { GetServerSocketsRequest as _grpc_channelz_v1_GetServerSocketsRequest, GetServerSocketsRequest__Output as _grpc_channelz_v1_GetServerSocketsRequest__Output } from './grpc/channelz/v1/GetServerSocketsRequest'; -import type { GetServerSocketsResponse as _grpc_channelz_v1_GetServerSocketsResponse, GetServerSocketsResponse__Output as _grpc_channelz_v1_GetServerSocketsResponse__Output } from './grpc/channelz/v1/GetServerSocketsResponse'; -import type { GetServersRequest as _grpc_channelz_v1_GetServersRequest, GetServersRequest__Output as _grpc_channelz_v1_GetServersRequest__Output } from './grpc/channelz/v1/GetServersRequest'; -import type { GetServersResponse as _grpc_channelz_v1_GetServersResponse, GetServersResponse__Output as _grpc_channelz_v1_GetServersResponse__Output } from './grpc/channelz/v1/GetServersResponse'; -import type { GetSocketRequest as _grpc_channelz_v1_GetSocketRequest, GetSocketRequest__Output as _grpc_channelz_v1_GetSocketRequest__Output } from './grpc/channelz/v1/GetSocketRequest'; -import type { GetSocketResponse as _grpc_channelz_v1_GetSocketResponse, GetSocketResponse__Output as _grpc_channelz_v1_GetSocketResponse__Output } from './grpc/channelz/v1/GetSocketResponse'; -import type { GetSubchannelRequest as _grpc_channelz_v1_GetSubchannelRequest, GetSubchannelRequest__Output as _grpc_channelz_v1_GetSubchannelRequest__Output } from './grpc/channelz/v1/GetSubchannelRequest'; -import type { GetSubchannelResponse as _grpc_channelz_v1_GetSubchannelResponse, GetSubchannelResponse__Output as _grpc_channelz_v1_GetSubchannelResponse__Output } from './grpc/channelz/v1/GetSubchannelResponse'; -import type { GetTopChannelsRequest as _grpc_channelz_v1_GetTopChannelsRequest, GetTopChannelsRequest__Output as _grpc_channelz_v1_GetTopChannelsRequest__Output } from './grpc/channelz/v1/GetTopChannelsRequest'; -import type { GetTopChannelsResponse as _grpc_channelz_v1_GetTopChannelsResponse, GetTopChannelsResponse__Output as _grpc_channelz_v1_GetTopChannelsResponse__Output } from './grpc/channelz/v1/GetTopChannelsResponse'; -import type { Security as _grpc_channelz_v1_Security, Security__Output as _grpc_channelz_v1_Security__Output } from './grpc/channelz/v1/Security'; -import type { Server as _grpc_channelz_v1_Server, Server__Output as _grpc_channelz_v1_Server__Output } from './grpc/channelz/v1/Server'; -import type { ServerData as _grpc_channelz_v1_ServerData, ServerData__Output as _grpc_channelz_v1_ServerData__Output } from './grpc/channelz/v1/ServerData'; -import type { ServerRef as _grpc_channelz_v1_ServerRef, ServerRef__Output as _grpc_channelz_v1_ServerRef__Output } from './grpc/channelz/v1/ServerRef'; -import type { Socket as _grpc_channelz_v1_Socket, Socket__Output as _grpc_channelz_v1_Socket__Output } from './grpc/channelz/v1/Socket'; -import type { SocketData as _grpc_channelz_v1_SocketData, SocketData__Output as _grpc_channelz_v1_SocketData__Output } from './grpc/channelz/v1/SocketData'; -import type { SocketOption as _grpc_channelz_v1_SocketOption, SocketOption__Output as _grpc_channelz_v1_SocketOption__Output } from './grpc/channelz/v1/SocketOption'; -import type { SocketOptionLinger as _grpc_channelz_v1_SocketOptionLinger, SocketOptionLinger__Output as _grpc_channelz_v1_SocketOptionLinger__Output } from './grpc/channelz/v1/SocketOptionLinger'; -import type { SocketOptionTcpInfo as _grpc_channelz_v1_SocketOptionTcpInfo, SocketOptionTcpInfo__Output as _grpc_channelz_v1_SocketOptionTcpInfo__Output } from './grpc/channelz/v1/SocketOptionTcpInfo'; -import type { SocketOptionTimeout as _grpc_channelz_v1_SocketOptionTimeout, SocketOptionTimeout__Output as _grpc_channelz_v1_SocketOptionTimeout__Output } from './grpc/channelz/v1/SocketOptionTimeout'; -import type { SocketRef as _grpc_channelz_v1_SocketRef, SocketRef__Output as _grpc_channelz_v1_SocketRef__Output } from './grpc/channelz/v1/SocketRef'; -import type { Subchannel as _grpc_channelz_v1_Subchannel, Subchannel__Output as _grpc_channelz_v1_Subchannel__Output } from './grpc/channelz/v1/Subchannel'; -import type { SubchannelRef as _grpc_channelz_v1_SubchannelRef, SubchannelRef__Output as _grpc_channelz_v1_SubchannelRef__Output } from './grpc/channelz/v1/SubchannelRef'; - -type SubtypeConstructor any, Subtype> = { - new(...args: ConstructorParameters): Subtype; -}; - -export interface ProtoGrpcType { - google: { - protobuf: { - Any: MessageTypeDefinition<_google_protobuf_Any, _google_protobuf_Any__Output> - BoolValue: MessageTypeDefinition<_google_protobuf_BoolValue, _google_protobuf_BoolValue__Output> - BytesValue: MessageTypeDefinition<_google_protobuf_BytesValue, _google_protobuf_BytesValue__Output> - DoubleValue: MessageTypeDefinition<_google_protobuf_DoubleValue, _google_protobuf_DoubleValue__Output> - Duration: MessageTypeDefinition<_google_protobuf_Duration, _google_protobuf_Duration__Output> - FloatValue: MessageTypeDefinition<_google_protobuf_FloatValue, _google_protobuf_FloatValue__Output> - Int32Value: MessageTypeDefinition<_google_protobuf_Int32Value, _google_protobuf_Int32Value__Output> - Int64Value: MessageTypeDefinition<_google_protobuf_Int64Value, _google_protobuf_Int64Value__Output> - StringValue: MessageTypeDefinition<_google_protobuf_StringValue, _google_protobuf_StringValue__Output> - Timestamp: MessageTypeDefinition<_google_protobuf_Timestamp, _google_protobuf_Timestamp__Output> - UInt32Value: MessageTypeDefinition<_google_protobuf_UInt32Value, _google_protobuf_UInt32Value__Output> - UInt64Value: MessageTypeDefinition<_google_protobuf_UInt64Value, _google_protobuf_UInt64Value__Output> - } - } - grpc: { - channelz: { - v1: { - Address: MessageTypeDefinition<_grpc_channelz_v1_Address, _grpc_channelz_v1_Address__Output> - Channel: MessageTypeDefinition<_grpc_channelz_v1_Channel, _grpc_channelz_v1_Channel__Output> - ChannelConnectivityState: MessageTypeDefinition<_grpc_channelz_v1_ChannelConnectivityState, _grpc_channelz_v1_ChannelConnectivityState__Output> - ChannelData: MessageTypeDefinition<_grpc_channelz_v1_ChannelData, _grpc_channelz_v1_ChannelData__Output> - ChannelRef: MessageTypeDefinition<_grpc_channelz_v1_ChannelRef, _grpc_channelz_v1_ChannelRef__Output> - ChannelTrace: MessageTypeDefinition<_grpc_channelz_v1_ChannelTrace, _grpc_channelz_v1_ChannelTrace__Output> - ChannelTraceEvent: MessageTypeDefinition<_grpc_channelz_v1_ChannelTraceEvent, _grpc_channelz_v1_ChannelTraceEvent__Output> - /** - * Channelz is a service exposed by gRPC servers that provides detailed debug - * information. - */ - Channelz: SubtypeConstructor & { service: _grpc_channelz_v1_ChannelzDefinition } - GetChannelRequest: MessageTypeDefinition<_grpc_channelz_v1_GetChannelRequest, _grpc_channelz_v1_GetChannelRequest__Output> - GetChannelResponse: MessageTypeDefinition<_grpc_channelz_v1_GetChannelResponse, _grpc_channelz_v1_GetChannelResponse__Output> - GetServerRequest: MessageTypeDefinition<_grpc_channelz_v1_GetServerRequest, _grpc_channelz_v1_GetServerRequest__Output> - GetServerResponse: MessageTypeDefinition<_grpc_channelz_v1_GetServerResponse, _grpc_channelz_v1_GetServerResponse__Output> - GetServerSocketsRequest: MessageTypeDefinition<_grpc_channelz_v1_GetServerSocketsRequest, _grpc_channelz_v1_GetServerSocketsRequest__Output> - GetServerSocketsResponse: MessageTypeDefinition<_grpc_channelz_v1_GetServerSocketsResponse, _grpc_channelz_v1_GetServerSocketsResponse__Output> - GetServersRequest: MessageTypeDefinition<_grpc_channelz_v1_GetServersRequest, _grpc_channelz_v1_GetServersRequest__Output> - GetServersResponse: MessageTypeDefinition<_grpc_channelz_v1_GetServersResponse, _grpc_channelz_v1_GetServersResponse__Output> - GetSocketRequest: MessageTypeDefinition<_grpc_channelz_v1_GetSocketRequest, _grpc_channelz_v1_GetSocketRequest__Output> - GetSocketResponse: MessageTypeDefinition<_grpc_channelz_v1_GetSocketResponse, _grpc_channelz_v1_GetSocketResponse__Output> - GetSubchannelRequest: MessageTypeDefinition<_grpc_channelz_v1_GetSubchannelRequest, _grpc_channelz_v1_GetSubchannelRequest__Output> - GetSubchannelResponse: MessageTypeDefinition<_grpc_channelz_v1_GetSubchannelResponse, _grpc_channelz_v1_GetSubchannelResponse__Output> - GetTopChannelsRequest: MessageTypeDefinition<_grpc_channelz_v1_GetTopChannelsRequest, _grpc_channelz_v1_GetTopChannelsRequest__Output> - GetTopChannelsResponse: MessageTypeDefinition<_grpc_channelz_v1_GetTopChannelsResponse, _grpc_channelz_v1_GetTopChannelsResponse__Output> - Security: MessageTypeDefinition<_grpc_channelz_v1_Security, _grpc_channelz_v1_Security__Output> - Server: MessageTypeDefinition<_grpc_channelz_v1_Server, _grpc_channelz_v1_Server__Output> - ServerData: MessageTypeDefinition<_grpc_channelz_v1_ServerData, _grpc_channelz_v1_ServerData__Output> - ServerRef: MessageTypeDefinition<_grpc_channelz_v1_ServerRef, _grpc_channelz_v1_ServerRef__Output> - Socket: MessageTypeDefinition<_grpc_channelz_v1_Socket, _grpc_channelz_v1_Socket__Output> - SocketData: MessageTypeDefinition<_grpc_channelz_v1_SocketData, _grpc_channelz_v1_SocketData__Output> - SocketOption: MessageTypeDefinition<_grpc_channelz_v1_SocketOption, _grpc_channelz_v1_SocketOption__Output> - SocketOptionLinger: MessageTypeDefinition<_grpc_channelz_v1_SocketOptionLinger, _grpc_channelz_v1_SocketOptionLinger__Output> - SocketOptionTcpInfo: MessageTypeDefinition<_grpc_channelz_v1_SocketOptionTcpInfo, _grpc_channelz_v1_SocketOptionTcpInfo__Output> - SocketOptionTimeout: MessageTypeDefinition<_grpc_channelz_v1_SocketOptionTimeout, _grpc_channelz_v1_SocketOptionTimeout__Output> - SocketRef: MessageTypeDefinition<_grpc_channelz_v1_SocketRef, _grpc_channelz_v1_SocketRef__Output> - Subchannel: MessageTypeDefinition<_grpc_channelz_v1_Subchannel, _grpc_channelz_v1_Subchannel__Output> - SubchannelRef: MessageTypeDefinition<_grpc_channelz_v1_SubchannelRef, _grpc_channelz_v1_SubchannelRef__Output> - } - } - } -} - diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Any.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Any.ts deleted file mode 100644 index fcaa672..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Any.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Original file: null - -import type { AnyExtension } from '@grpc/proto-loader'; - -export type Any = AnyExtension | { - type_url: string; - value: Buffer | Uint8Array | string; -} - -export interface Any__Output { - 'type_url': (string); - 'value': (Buffer); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/BoolValue.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/BoolValue.ts deleted file mode 100644 index 86507ea..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/BoolValue.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Original file: null - - -export interface BoolValue { - 'value'?: (boolean); -} - -export interface BoolValue__Output { - 'value': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/BytesValue.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/BytesValue.ts deleted file mode 100644 index 9cec76f..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/BytesValue.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Original file: null - - -export interface BytesValue { - 'value'?: (Buffer | Uint8Array | string); -} - -export interface BytesValue__Output { - 'value': (Buffer); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/DescriptorProto.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/DescriptorProto.ts deleted file mode 100644 index b316f8e..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/DescriptorProto.ts +++ /dev/null @@ -1,59 +0,0 @@ -// Original file: null - -import type { FieldDescriptorProto as _google_protobuf_FieldDescriptorProto, FieldDescriptorProto__Output as _google_protobuf_FieldDescriptorProto__Output } from '../../google/protobuf/FieldDescriptorProto'; -import type { DescriptorProto as _google_protobuf_DescriptorProto, DescriptorProto__Output as _google_protobuf_DescriptorProto__Output } from '../../google/protobuf/DescriptorProto'; -import type { EnumDescriptorProto as _google_protobuf_EnumDescriptorProto, EnumDescriptorProto__Output as _google_protobuf_EnumDescriptorProto__Output } from '../../google/protobuf/EnumDescriptorProto'; -import type { MessageOptions as _google_protobuf_MessageOptions, MessageOptions__Output as _google_protobuf_MessageOptions__Output } from '../../google/protobuf/MessageOptions'; -import type { OneofDescriptorProto as _google_protobuf_OneofDescriptorProto, OneofDescriptorProto__Output as _google_protobuf_OneofDescriptorProto__Output } from '../../google/protobuf/OneofDescriptorProto'; -import type { SymbolVisibility as _google_protobuf_SymbolVisibility, SymbolVisibility__Output as _google_protobuf_SymbolVisibility__Output } from '../../google/protobuf/SymbolVisibility'; -import type { ExtensionRangeOptions as _google_protobuf_ExtensionRangeOptions, ExtensionRangeOptions__Output as _google_protobuf_ExtensionRangeOptions__Output } from '../../google/protobuf/ExtensionRangeOptions'; - -export interface _google_protobuf_DescriptorProto_ExtensionRange { - 'start'?: (number); - 'end'?: (number); - 'options'?: (_google_protobuf_ExtensionRangeOptions | null); -} - -export interface _google_protobuf_DescriptorProto_ExtensionRange__Output { - 'start': (number); - 'end': (number); - 'options': (_google_protobuf_ExtensionRangeOptions__Output | null); -} - -export interface _google_protobuf_DescriptorProto_ReservedRange { - 'start'?: (number); - 'end'?: (number); -} - -export interface _google_protobuf_DescriptorProto_ReservedRange__Output { - 'start': (number); - 'end': (number); -} - -export interface DescriptorProto { - 'name'?: (string); - 'field'?: (_google_protobuf_FieldDescriptorProto)[]; - 'nestedType'?: (_google_protobuf_DescriptorProto)[]; - 'enumType'?: (_google_protobuf_EnumDescriptorProto)[]; - 'extensionRange'?: (_google_protobuf_DescriptorProto_ExtensionRange)[]; - 'extension'?: (_google_protobuf_FieldDescriptorProto)[]; - 'options'?: (_google_protobuf_MessageOptions | null); - 'oneofDecl'?: (_google_protobuf_OneofDescriptorProto)[]; - 'reservedRange'?: (_google_protobuf_DescriptorProto_ReservedRange)[]; - 'reservedName'?: (string)[]; - 'visibility'?: (_google_protobuf_SymbolVisibility); -} - -export interface DescriptorProto__Output { - 'name': (string); - 'field': (_google_protobuf_FieldDescriptorProto__Output)[]; - 'nestedType': (_google_protobuf_DescriptorProto__Output)[]; - 'enumType': (_google_protobuf_EnumDescriptorProto__Output)[]; - 'extensionRange': (_google_protobuf_DescriptorProto_ExtensionRange__Output)[]; - 'extension': (_google_protobuf_FieldDescriptorProto__Output)[]; - 'options': (_google_protobuf_MessageOptions__Output | null); - 'oneofDecl': (_google_protobuf_OneofDescriptorProto__Output)[]; - 'reservedRange': (_google_protobuf_DescriptorProto_ReservedRange__Output)[]; - 'reservedName': (string)[]; - 'visibility': (_google_protobuf_SymbolVisibility__Output); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/DoubleValue.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/DoubleValue.ts deleted file mode 100644 index d70b303..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/DoubleValue.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Original file: null - - -export interface DoubleValue { - 'value'?: (number | string); -} - -export interface DoubleValue__Output { - 'value': (number); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Duration.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Duration.ts deleted file mode 100644 index 8595377..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Duration.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Original file: null - -import type { Long } from '@grpc/proto-loader'; - -export interface Duration { - 'seconds'?: (number | string | Long); - 'nanos'?: (number); -} - -export interface Duration__Output { - 'seconds': (string); - 'nanos': (number); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Edition.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Edition.ts deleted file mode 100644 index 26c71d6..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Edition.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Original file: null - -export const Edition = { - EDITION_UNKNOWN: 'EDITION_UNKNOWN', - EDITION_LEGACY: 'EDITION_LEGACY', - EDITION_PROTO2: 'EDITION_PROTO2', - EDITION_PROTO3: 'EDITION_PROTO3', - EDITION_2023: 'EDITION_2023', - EDITION_2024: 'EDITION_2024', - EDITION_1_TEST_ONLY: 'EDITION_1_TEST_ONLY', - EDITION_2_TEST_ONLY: 'EDITION_2_TEST_ONLY', - EDITION_99997_TEST_ONLY: 'EDITION_99997_TEST_ONLY', - EDITION_99998_TEST_ONLY: 'EDITION_99998_TEST_ONLY', - EDITION_99999_TEST_ONLY: 'EDITION_99999_TEST_ONLY', - EDITION_MAX: 'EDITION_MAX', -} as const; - -export type Edition = - | 'EDITION_UNKNOWN' - | 0 - | 'EDITION_LEGACY' - | 900 - | 'EDITION_PROTO2' - | 998 - | 'EDITION_PROTO3' - | 999 - | 'EDITION_2023' - | 1000 - | 'EDITION_2024' - | 1001 - | 'EDITION_1_TEST_ONLY' - | 1 - | 'EDITION_2_TEST_ONLY' - | 2 - | 'EDITION_99997_TEST_ONLY' - | 99997 - | 'EDITION_99998_TEST_ONLY' - | 99998 - | 'EDITION_99999_TEST_ONLY' - | 99999 - | 'EDITION_MAX' - | 2147483647 - -export type Edition__Output = typeof Edition[keyof typeof Edition] diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumDescriptorProto.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumDescriptorProto.ts deleted file mode 100644 index 6ec1a2e..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumDescriptorProto.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Original file: null - -import type { EnumValueDescriptorProto as _google_protobuf_EnumValueDescriptorProto, EnumValueDescriptorProto__Output as _google_protobuf_EnumValueDescriptorProto__Output } from '../../google/protobuf/EnumValueDescriptorProto'; -import type { EnumOptions as _google_protobuf_EnumOptions, EnumOptions__Output as _google_protobuf_EnumOptions__Output } from '../../google/protobuf/EnumOptions'; -import type { SymbolVisibility as _google_protobuf_SymbolVisibility, SymbolVisibility__Output as _google_protobuf_SymbolVisibility__Output } from '../../google/protobuf/SymbolVisibility'; - -export interface _google_protobuf_EnumDescriptorProto_EnumReservedRange { - 'start'?: (number); - 'end'?: (number); -} - -export interface _google_protobuf_EnumDescriptorProto_EnumReservedRange__Output { - 'start': (number); - 'end': (number); -} - -export interface EnumDescriptorProto { - 'name'?: (string); - 'value'?: (_google_protobuf_EnumValueDescriptorProto)[]; - 'options'?: (_google_protobuf_EnumOptions | null); - 'reservedRange'?: (_google_protobuf_EnumDescriptorProto_EnumReservedRange)[]; - 'reservedName'?: (string)[]; - 'visibility'?: (_google_protobuf_SymbolVisibility); -} - -export interface EnumDescriptorProto__Output { - 'name': (string); - 'value': (_google_protobuf_EnumValueDescriptorProto__Output)[]; - 'options': (_google_protobuf_EnumOptions__Output | null); - 'reservedRange': (_google_protobuf_EnumDescriptorProto_EnumReservedRange__Output)[]; - 'reservedName': (string)[]; - 'visibility': (_google_protobuf_SymbolVisibility__Output); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumOptions.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumOptions.ts deleted file mode 100644 index b8361ba..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumOptions.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Original file: null - -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; - -export interface EnumOptions { - 'allowAlias'?: (boolean); - 'deprecated'?: (boolean); - /** - * @deprecated - */ - 'deprecatedLegacyJsonFieldConflicts'?: (boolean); - 'features'?: (_google_protobuf_FeatureSet | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; -} - -export interface EnumOptions__Output { - 'allowAlias': (boolean); - 'deprecated': (boolean); - /** - * @deprecated - */ - 'deprecatedLegacyJsonFieldConflicts': (boolean); - 'features': (_google_protobuf_FeatureSet__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumValueDescriptorProto.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumValueDescriptorProto.ts deleted file mode 100644 index 7f8e57e..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumValueDescriptorProto.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Original file: null - -import type { EnumValueOptions as _google_protobuf_EnumValueOptions, EnumValueOptions__Output as _google_protobuf_EnumValueOptions__Output } from '../../google/protobuf/EnumValueOptions'; - -export interface EnumValueDescriptorProto { - 'name'?: (string); - 'number'?: (number); - 'options'?: (_google_protobuf_EnumValueOptions | null); -} - -export interface EnumValueDescriptorProto__Output { - 'name': (string); - 'number': (number); - 'options': (_google_protobuf_EnumValueOptions__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumValueOptions.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumValueOptions.ts deleted file mode 100644 index d9290c5..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumValueOptions.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Original file: null - -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { _google_protobuf_FieldOptions_FeatureSupport, _google_protobuf_FieldOptions_FeatureSupport__Output } from '../../google/protobuf/FieldOptions'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; - -export interface EnumValueOptions { - 'deprecated'?: (boolean); - 'features'?: (_google_protobuf_FeatureSet | null); - 'debugRedact'?: (boolean); - 'featureSupport'?: (_google_protobuf_FieldOptions_FeatureSupport | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; -} - -export interface EnumValueOptions__Output { - 'deprecated': (boolean); - 'features': (_google_protobuf_FeatureSet__Output | null); - 'debugRedact': (boolean); - 'featureSupport': (_google_protobuf_FieldOptions_FeatureSupport__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ExtensionRangeOptions.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ExtensionRangeOptions.ts deleted file mode 100644 index 4ca4c20..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ExtensionRangeOptions.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Original file: null - -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; - -export interface _google_protobuf_ExtensionRangeOptions_Declaration { - 'number'?: (number); - 'fullName'?: (string); - 'type'?: (string); - 'reserved'?: (boolean); - 'repeated'?: (boolean); -} - -export interface _google_protobuf_ExtensionRangeOptions_Declaration__Output { - 'number': (number); - 'fullName': (string); - 'type': (string); - 'reserved': (boolean); - 'repeated': (boolean); -} - -// Original file: null - -export const _google_protobuf_ExtensionRangeOptions_VerificationState = { - DECLARATION: 'DECLARATION', - UNVERIFIED: 'UNVERIFIED', -} as const; - -export type _google_protobuf_ExtensionRangeOptions_VerificationState = - | 'DECLARATION' - | 0 - | 'UNVERIFIED' - | 1 - -export type _google_protobuf_ExtensionRangeOptions_VerificationState__Output = typeof _google_protobuf_ExtensionRangeOptions_VerificationState[keyof typeof _google_protobuf_ExtensionRangeOptions_VerificationState] - -export interface ExtensionRangeOptions { - 'declaration'?: (_google_protobuf_ExtensionRangeOptions_Declaration)[]; - 'verification'?: (_google_protobuf_ExtensionRangeOptions_VerificationState); - 'features'?: (_google_protobuf_FeatureSet | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; -} - -export interface ExtensionRangeOptions__Output { - 'declaration': (_google_protobuf_ExtensionRangeOptions_Declaration__Output)[]; - 'verification': (_google_protobuf_ExtensionRangeOptions_VerificationState__Output); - 'features': (_google_protobuf_FeatureSet__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FeatureSet.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FeatureSet.ts deleted file mode 100644 index 41ba7b1..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FeatureSet.ts +++ /dev/null @@ -1,183 +0,0 @@ -// Original file: null - - -// Original file: null - -export const _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility = { - DEFAULT_SYMBOL_VISIBILITY_UNKNOWN: 'DEFAULT_SYMBOL_VISIBILITY_UNKNOWN', - EXPORT_ALL: 'EXPORT_ALL', - EXPORT_TOP_LEVEL: 'EXPORT_TOP_LEVEL', - LOCAL_ALL: 'LOCAL_ALL', - STRICT: 'STRICT', -} as const; - -export type _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility = - | 'DEFAULT_SYMBOL_VISIBILITY_UNKNOWN' - | 0 - | 'EXPORT_ALL' - | 1 - | 'EXPORT_TOP_LEVEL' - | 2 - | 'LOCAL_ALL' - | 3 - | 'STRICT' - | 4 - -export type _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility__Output = typeof _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility[keyof typeof _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility] - -// Original file: null - -export const _google_protobuf_FeatureSet_EnforceNamingStyle = { - ENFORCE_NAMING_STYLE_UNKNOWN: 'ENFORCE_NAMING_STYLE_UNKNOWN', - STYLE2024: 'STYLE2024', - STYLE_LEGACY: 'STYLE_LEGACY', -} as const; - -export type _google_protobuf_FeatureSet_EnforceNamingStyle = - | 'ENFORCE_NAMING_STYLE_UNKNOWN' - | 0 - | 'STYLE2024' - | 1 - | 'STYLE_LEGACY' - | 2 - -export type _google_protobuf_FeatureSet_EnforceNamingStyle__Output = typeof _google_protobuf_FeatureSet_EnforceNamingStyle[keyof typeof _google_protobuf_FeatureSet_EnforceNamingStyle] - -// Original file: null - -export const _google_protobuf_FeatureSet_EnumType = { - ENUM_TYPE_UNKNOWN: 'ENUM_TYPE_UNKNOWN', - OPEN: 'OPEN', - CLOSED: 'CLOSED', -} as const; - -export type _google_protobuf_FeatureSet_EnumType = - | 'ENUM_TYPE_UNKNOWN' - | 0 - | 'OPEN' - | 1 - | 'CLOSED' - | 2 - -export type _google_protobuf_FeatureSet_EnumType__Output = typeof _google_protobuf_FeatureSet_EnumType[keyof typeof _google_protobuf_FeatureSet_EnumType] - -// Original file: null - -export const _google_protobuf_FeatureSet_FieldPresence = { - FIELD_PRESENCE_UNKNOWN: 'FIELD_PRESENCE_UNKNOWN', - EXPLICIT: 'EXPLICIT', - IMPLICIT: 'IMPLICIT', - LEGACY_REQUIRED: 'LEGACY_REQUIRED', -} as const; - -export type _google_protobuf_FeatureSet_FieldPresence = - | 'FIELD_PRESENCE_UNKNOWN' - | 0 - | 'EXPLICIT' - | 1 - | 'IMPLICIT' - | 2 - | 'LEGACY_REQUIRED' - | 3 - -export type _google_protobuf_FeatureSet_FieldPresence__Output = typeof _google_protobuf_FeatureSet_FieldPresence[keyof typeof _google_protobuf_FeatureSet_FieldPresence] - -// Original file: null - -export const _google_protobuf_FeatureSet_JsonFormat = { - JSON_FORMAT_UNKNOWN: 'JSON_FORMAT_UNKNOWN', - ALLOW: 'ALLOW', - LEGACY_BEST_EFFORT: 'LEGACY_BEST_EFFORT', -} as const; - -export type _google_protobuf_FeatureSet_JsonFormat = - | 'JSON_FORMAT_UNKNOWN' - | 0 - | 'ALLOW' - | 1 - | 'LEGACY_BEST_EFFORT' - | 2 - -export type _google_protobuf_FeatureSet_JsonFormat__Output = typeof _google_protobuf_FeatureSet_JsonFormat[keyof typeof _google_protobuf_FeatureSet_JsonFormat] - -// Original file: null - -export const _google_protobuf_FeatureSet_MessageEncoding = { - MESSAGE_ENCODING_UNKNOWN: 'MESSAGE_ENCODING_UNKNOWN', - LENGTH_PREFIXED: 'LENGTH_PREFIXED', - DELIMITED: 'DELIMITED', -} as const; - -export type _google_protobuf_FeatureSet_MessageEncoding = - | 'MESSAGE_ENCODING_UNKNOWN' - | 0 - | 'LENGTH_PREFIXED' - | 1 - | 'DELIMITED' - | 2 - -export type _google_protobuf_FeatureSet_MessageEncoding__Output = typeof _google_protobuf_FeatureSet_MessageEncoding[keyof typeof _google_protobuf_FeatureSet_MessageEncoding] - -// Original file: null - -export const _google_protobuf_FeatureSet_RepeatedFieldEncoding = { - REPEATED_FIELD_ENCODING_UNKNOWN: 'REPEATED_FIELD_ENCODING_UNKNOWN', - PACKED: 'PACKED', - EXPANDED: 'EXPANDED', -} as const; - -export type _google_protobuf_FeatureSet_RepeatedFieldEncoding = - | 'REPEATED_FIELD_ENCODING_UNKNOWN' - | 0 - | 'PACKED' - | 1 - | 'EXPANDED' - | 2 - -export type _google_protobuf_FeatureSet_RepeatedFieldEncoding__Output = typeof _google_protobuf_FeatureSet_RepeatedFieldEncoding[keyof typeof _google_protobuf_FeatureSet_RepeatedFieldEncoding] - -// Original file: null - -export const _google_protobuf_FeatureSet_Utf8Validation = { - UTF8_VALIDATION_UNKNOWN: 'UTF8_VALIDATION_UNKNOWN', - VERIFY: 'VERIFY', - NONE: 'NONE', -} as const; - -export type _google_protobuf_FeatureSet_Utf8Validation = - | 'UTF8_VALIDATION_UNKNOWN' - | 0 - | 'VERIFY' - | 2 - | 'NONE' - | 3 - -export type _google_protobuf_FeatureSet_Utf8Validation__Output = typeof _google_protobuf_FeatureSet_Utf8Validation[keyof typeof _google_protobuf_FeatureSet_Utf8Validation] - -export interface _google_protobuf_FeatureSet_VisibilityFeature { -} - -export interface _google_protobuf_FeatureSet_VisibilityFeature__Output { -} - -export interface FeatureSet { - 'fieldPresence'?: (_google_protobuf_FeatureSet_FieldPresence); - 'enumType'?: (_google_protobuf_FeatureSet_EnumType); - 'repeatedFieldEncoding'?: (_google_protobuf_FeatureSet_RepeatedFieldEncoding); - 'utf8Validation'?: (_google_protobuf_FeatureSet_Utf8Validation); - 'messageEncoding'?: (_google_protobuf_FeatureSet_MessageEncoding); - 'jsonFormat'?: (_google_protobuf_FeatureSet_JsonFormat); - 'enforceNamingStyle'?: (_google_protobuf_FeatureSet_EnforceNamingStyle); - 'defaultSymbolVisibility'?: (_google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility); -} - -export interface FeatureSet__Output { - 'fieldPresence': (_google_protobuf_FeatureSet_FieldPresence__Output); - 'enumType': (_google_protobuf_FeatureSet_EnumType__Output); - 'repeatedFieldEncoding': (_google_protobuf_FeatureSet_RepeatedFieldEncoding__Output); - 'utf8Validation': (_google_protobuf_FeatureSet_Utf8Validation__Output); - 'messageEncoding': (_google_protobuf_FeatureSet_MessageEncoding__Output); - 'jsonFormat': (_google_protobuf_FeatureSet_JsonFormat__Output); - 'enforceNamingStyle': (_google_protobuf_FeatureSet_EnforceNamingStyle__Output); - 'defaultSymbolVisibility': (_google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility__Output); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FeatureSetDefaults.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FeatureSetDefaults.ts deleted file mode 100644 index 64c55bf..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FeatureSetDefaults.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Original file: null - -import type { Edition as _google_protobuf_Edition, Edition__Output as _google_protobuf_Edition__Output } from '../../google/protobuf/Edition'; -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; - -export interface _google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault { - 'edition'?: (_google_protobuf_Edition); - 'overridableFeatures'?: (_google_protobuf_FeatureSet | null); - 'fixedFeatures'?: (_google_protobuf_FeatureSet | null); -} - -export interface _google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault__Output { - 'edition': (_google_protobuf_Edition__Output); - 'overridableFeatures': (_google_protobuf_FeatureSet__Output | null); - 'fixedFeatures': (_google_protobuf_FeatureSet__Output | null); -} - -export interface FeatureSetDefaults { - 'defaults'?: (_google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault)[]; - 'minimumEdition'?: (_google_protobuf_Edition); - 'maximumEdition'?: (_google_protobuf_Edition); -} - -export interface FeatureSetDefaults__Output { - 'defaults': (_google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault__Output)[]; - 'minimumEdition': (_google_protobuf_Edition__Output); - 'maximumEdition': (_google_protobuf_Edition__Output); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FieldDescriptorProto.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FieldDescriptorProto.ts deleted file mode 100644 index 5a5687c..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FieldDescriptorProto.ts +++ /dev/null @@ -1,112 +0,0 @@ -// Original file: null - -import type { FieldOptions as _google_protobuf_FieldOptions, FieldOptions__Output as _google_protobuf_FieldOptions__Output } from '../../google/protobuf/FieldOptions'; - -// Original file: null - -export const _google_protobuf_FieldDescriptorProto_Label = { - LABEL_OPTIONAL: 'LABEL_OPTIONAL', - LABEL_REPEATED: 'LABEL_REPEATED', - LABEL_REQUIRED: 'LABEL_REQUIRED', -} as const; - -export type _google_protobuf_FieldDescriptorProto_Label = - | 'LABEL_OPTIONAL' - | 1 - | 'LABEL_REPEATED' - | 3 - | 'LABEL_REQUIRED' - | 2 - -export type _google_protobuf_FieldDescriptorProto_Label__Output = typeof _google_protobuf_FieldDescriptorProto_Label[keyof typeof _google_protobuf_FieldDescriptorProto_Label] - -// Original file: null - -export const _google_protobuf_FieldDescriptorProto_Type = { - TYPE_DOUBLE: 'TYPE_DOUBLE', - TYPE_FLOAT: 'TYPE_FLOAT', - TYPE_INT64: 'TYPE_INT64', - TYPE_UINT64: 'TYPE_UINT64', - TYPE_INT32: 'TYPE_INT32', - TYPE_FIXED64: 'TYPE_FIXED64', - TYPE_FIXED32: 'TYPE_FIXED32', - TYPE_BOOL: 'TYPE_BOOL', - TYPE_STRING: 'TYPE_STRING', - TYPE_GROUP: 'TYPE_GROUP', - TYPE_MESSAGE: 'TYPE_MESSAGE', - TYPE_BYTES: 'TYPE_BYTES', - TYPE_UINT32: 'TYPE_UINT32', - TYPE_ENUM: 'TYPE_ENUM', - TYPE_SFIXED32: 'TYPE_SFIXED32', - TYPE_SFIXED64: 'TYPE_SFIXED64', - TYPE_SINT32: 'TYPE_SINT32', - TYPE_SINT64: 'TYPE_SINT64', -} as const; - -export type _google_protobuf_FieldDescriptorProto_Type = - | 'TYPE_DOUBLE' - | 1 - | 'TYPE_FLOAT' - | 2 - | 'TYPE_INT64' - | 3 - | 'TYPE_UINT64' - | 4 - | 'TYPE_INT32' - | 5 - | 'TYPE_FIXED64' - | 6 - | 'TYPE_FIXED32' - | 7 - | 'TYPE_BOOL' - | 8 - | 'TYPE_STRING' - | 9 - | 'TYPE_GROUP' - | 10 - | 'TYPE_MESSAGE' - | 11 - | 'TYPE_BYTES' - | 12 - | 'TYPE_UINT32' - | 13 - | 'TYPE_ENUM' - | 14 - | 'TYPE_SFIXED32' - | 15 - | 'TYPE_SFIXED64' - | 16 - | 'TYPE_SINT32' - | 17 - | 'TYPE_SINT64' - | 18 - -export type _google_protobuf_FieldDescriptorProto_Type__Output = typeof _google_protobuf_FieldDescriptorProto_Type[keyof typeof _google_protobuf_FieldDescriptorProto_Type] - -export interface FieldDescriptorProto { - 'name'?: (string); - 'extendee'?: (string); - 'number'?: (number); - 'label'?: (_google_protobuf_FieldDescriptorProto_Label); - 'type'?: (_google_protobuf_FieldDescriptorProto_Type); - 'typeName'?: (string); - 'defaultValue'?: (string); - 'options'?: (_google_protobuf_FieldOptions | null); - 'oneofIndex'?: (number); - 'jsonName'?: (string); - 'proto3Optional'?: (boolean); -} - -export interface FieldDescriptorProto__Output { - 'name': (string); - 'extendee': (string); - 'number': (number); - 'label': (_google_protobuf_FieldDescriptorProto_Label__Output); - 'type': (_google_protobuf_FieldDescriptorProto_Type__Output); - 'typeName': (string); - 'defaultValue': (string); - 'options': (_google_protobuf_FieldOptions__Output | null); - 'oneofIndex': (number); - 'jsonName': (string); - 'proto3Optional': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FieldOptions.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FieldOptions.ts deleted file mode 100644 index dc5d85c..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FieldOptions.ts +++ /dev/null @@ -1,165 +0,0 @@ -// Original file: null - -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; -import type { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from '../../validate/FieldRules'; -import type { Edition as _google_protobuf_Edition, Edition__Output as _google_protobuf_Edition__Output } from '../../google/protobuf/Edition'; - -// Original file: null - -export const _google_protobuf_FieldOptions_CType = { - STRING: 'STRING', - CORD: 'CORD', - STRING_PIECE: 'STRING_PIECE', -} as const; - -export type _google_protobuf_FieldOptions_CType = - | 'STRING' - | 0 - | 'CORD' - | 1 - | 'STRING_PIECE' - | 2 - -export type _google_protobuf_FieldOptions_CType__Output = typeof _google_protobuf_FieldOptions_CType[keyof typeof _google_protobuf_FieldOptions_CType] - -export interface _google_protobuf_FieldOptions_EditionDefault { - 'edition'?: (_google_protobuf_Edition); - 'value'?: (string); -} - -export interface _google_protobuf_FieldOptions_EditionDefault__Output { - 'edition': (_google_protobuf_Edition__Output); - 'value': (string); -} - -export interface _google_protobuf_FieldOptions_FeatureSupport { - 'editionIntroduced'?: (_google_protobuf_Edition); - 'editionDeprecated'?: (_google_protobuf_Edition); - 'deprecationWarning'?: (string); - 'editionRemoved'?: (_google_protobuf_Edition); -} - -export interface _google_protobuf_FieldOptions_FeatureSupport__Output { - 'editionIntroduced': (_google_protobuf_Edition__Output); - 'editionDeprecated': (_google_protobuf_Edition__Output); - 'deprecationWarning': (string); - 'editionRemoved': (_google_protobuf_Edition__Output); -} - -// Original file: null - -export const _google_protobuf_FieldOptions_JSType = { - JS_NORMAL: 'JS_NORMAL', - JS_STRING: 'JS_STRING', - JS_NUMBER: 'JS_NUMBER', -} as const; - -export type _google_protobuf_FieldOptions_JSType = - | 'JS_NORMAL' - | 0 - | 'JS_STRING' - | 1 - | 'JS_NUMBER' - | 2 - -export type _google_protobuf_FieldOptions_JSType__Output = typeof _google_protobuf_FieldOptions_JSType[keyof typeof _google_protobuf_FieldOptions_JSType] - -// Original file: null - -export const _google_protobuf_FieldOptions_OptionRetention = { - RETENTION_UNKNOWN: 'RETENTION_UNKNOWN', - RETENTION_RUNTIME: 'RETENTION_RUNTIME', - RETENTION_SOURCE: 'RETENTION_SOURCE', -} as const; - -export type _google_protobuf_FieldOptions_OptionRetention = - | 'RETENTION_UNKNOWN' - | 0 - | 'RETENTION_RUNTIME' - | 1 - | 'RETENTION_SOURCE' - | 2 - -export type _google_protobuf_FieldOptions_OptionRetention__Output = typeof _google_protobuf_FieldOptions_OptionRetention[keyof typeof _google_protobuf_FieldOptions_OptionRetention] - -// Original file: null - -export const _google_protobuf_FieldOptions_OptionTargetType = { - TARGET_TYPE_UNKNOWN: 'TARGET_TYPE_UNKNOWN', - TARGET_TYPE_FILE: 'TARGET_TYPE_FILE', - TARGET_TYPE_EXTENSION_RANGE: 'TARGET_TYPE_EXTENSION_RANGE', - TARGET_TYPE_MESSAGE: 'TARGET_TYPE_MESSAGE', - TARGET_TYPE_FIELD: 'TARGET_TYPE_FIELD', - TARGET_TYPE_ONEOF: 'TARGET_TYPE_ONEOF', - TARGET_TYPE_ENUM: 'TARGET_TYPE_ENUM', - TARGET_TYPE_ENUM_ENTRY: 'TARGET_TYPE_ENUM_ENTRY', - TARGET_TYPE_SERVICE: 'TARGET_TYPE_SERVICE', - TARGET_TYPE_METHOD: 'TARGET_TYPE_METHOD', -} as const; - -export type _google_protobuf_FieldOptions_OptionTargetType = - | 'TARGET_TYPE_UNKNOWN' - | 0 - | 'TARGET_TYPE_FILE' - | 1 - | 'TARGET_TYPE_EXTENSION_RANGE' - | 2 - | 'TARGET_TYPE_MESSAGE' - | 3 - | 'TARGET_TYPE_FIELD' - | 4 - | 'TARGET_TYPE_ONEOF' - | 5 - | 'TARGET_TYPE_ENUM' - | 6 - | 'TARGET_TYPE_ENUM_ENTRY' - | 7 - | 'TARGET_TYPE_SERVICE' - | 8 - | 'TARGET_TYPE_METHOD' - | 9 - -export type _google_protobuf_FieldOptions_OptionTargetType__Output = typeof _google_protobuf_FieldOptions_OptionTargetType[keyof typeof _google_protobuf_FieldOptions_OptionTargetType] - -export interface FieldOptions { - 'ctype'?: (_google_protobuf_FieldOptions_CType); - 'packed'?: (boolean); - 'deprecated'?: (boolean); - 'lazy'?: (boolean); - 'jstype'?: (_google_protobuf_FieldOptions_JSType); - /** - * @deprecated - */ - 'weak'?: (boolean); - 'unverifiedLazy'?: (boolean); - 'debugRedact'?: (boolean); - 'retention'?: (_google_protobuf_FieldOptions_OptionRetention); - 'targets'?: (_google_protobuf_FieldOptions_OptionTargetType)[]; - 'editionDefaults'?: (_google_protobuf_FieldOptions_EditionDefault)[]; - 'features'?: (_google_protobuf_FeatureSet | null); - 'featureSupport'?: (_google_protobuf_FieldOptions_FeatureSupport | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; - '.validate.rules'?: (_validate_FieldRules | null); -} - -export interface FieldOptions__Output { - 'ctype': (_google_protobuf_FieldOptions_CType__Output); - 'packed': (boolean); - 'deprecated': (boolean); - 'lazy': (boolean); - 'jstype': (_google_protobuf_FieldOptions_JSType__Output); - /** - * @deprecated - */ - 'weak': (boolean); - 'unverifiedLazy': (boolean); - 'debugRedact': (boolean); - 'retention': (_google_protobuf_FieldOptions_OptionRetention__Output); - 'targets': (_google_protobuf_FieldOptions_OptionTargetType__Output)[]; - 'editionDefaults': (_google_protobuf_FieldOptions_EditionDefault__Output)[]; - 'features': (_google_protobuf_FeatureSet__Output | null); - 'featureSupport': (_google_protobuf_FieldOptions_FeatureSupport__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; - '.validate.rules': (_validate_FieldRules__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileDescriptorProto.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileDescriptorProto.ts deleted file mode 100644 index ef4c8ca..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileDescriptorProto.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Original file: null - -import type { DescriptorProto as _google_protobuf_DescriptorProto, DescriptorProto__Output as _google_protobuf_DescriptorProto__Output } from '../../google/protobuf/DescriptorProto'; -import type { EnumDescriptorProto as _google_protobuf_EnumDescriptorProto, EnumDescriptorProto__Output as _google_protobuf_EnumDescriptorProto__Output } from '../../google/protobuf/EnumDescriptorProto'; -import type { ServiceDescriptorProto as _google_protobuf_ServiceDescriptorProto, ServiceDescriptorProto__Output as _google_protobuf_ServiceDescriptorProto__Output } from '../../google/protobuf/ServiceDescriptorProto'; -import type { FieldDescriptorProto as _google_protobuf_FieldDescriptorProto, FieldDescriptorProto__Output as _google_protobuf_FieldDescriptorProto__Output } from '../../google/protobuf/FieldDescriptorProto'; -import type { FileOptions as _google_protobuf_FileOptions, FileOptions__Output as _google_protobuf_FileOptions__Output } from '../../google/protobuf/FileOptions'; -import type { SourceCodeInfo as _google_protobuf_SourceCodeInfo, SourceCodeInfo__Output as _google_protobuf_SourceCodeInfo__Output } from '../../google/protobuf/SourceCodeInfo'; -import type { Edition as _google_protobuf_Edition, Edition__Output as _google_protobuf_Edition__Output } from '../../google/protobuf/Edition'; - -export interface FileDescriptorProto { - 'name'?: (string); - 'package'?: (string); - 'dependency'?: (string)[]; - 'messageType'?: (_google_protobuf_DescriptorProto)[]; - 'enumType'?: (_google_protobuf_EnumDescriptorProto)[]; - 'service'?: (_google_protobuf_ServiceDescriptorProto)[]; - 'extension'?: (_google_protobuf_FieldDescriptorProto)[]; - 'options'?: (_google_protobuf_FileOptions | null); - 'sourceCodeInfo'?: (_google_protobuf_SourceCodeInfo | null); - 'publicDependency'?: (number)[]; - 'weakDependency'?: (number)[]; - 'syntax'?: (string); - 'edition'?: (_google_protobuf_Edition); - 'optionDependency'?: (string)[]; -} - -export interface FileDescriptorProto__Output { - 'name': (string); - 'package': (string); - 'dependency': (string)[]; - 'messageType': (_google_protobuf_DescriptorProto__Output)[]; - 'enumType': (_google_protobuf_EnumDescriptorProto__Output)[]; - 'service': (_google_protobuf_ServiceDescriptorProto__Output)[]; - 'extension': (_google_protobuf_FieldDescriptorProto__Output)[]; - 'options': (_google_protobuf_FileOptions__Output | null); - 'sourceCodeInfo': (_google_protobuf_SourceCodeInfo__Output | null); - 'publicDependency': (number)[]; - 'weakDependency': (number)[]; - 'syntax': (string); - 'edition': (_google_protobuf_Edition__Output); - 'optionDependency': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileDescriptorSet.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileDescriptorSet.ts deleted file mode 100644 index 74ded24..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileDescriptorSet.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Original file: null - -import type { FileDescriptorProto as _google_protobuf_FileDescriptorProto, FileDescriptorProto__Output as _google_protobuf_FileDescriptorProto__Output } from '../../google/protobuf/FileDescriptorProto'; - -export interface FileDescriptorSet { - 'file'?: (_google_protobuf_FileDescriptorProto)[]; -} - -export interface FileDescriptorSet__Output { - 'file': (_google_protobuf_FileDescriptorProto__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileOptions.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileOptions.ts deleted file mode 100644 index f240757..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileOptions.ts +++ /dev/null @@ -1,76 +0,0 @@ -// Original file: null - -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; - -// Original file: null - -export const _google_protobuf_FileOptions_OptimizeMode = { - SPEED: 'SPEED', - CODE_SIZE: 'CODE_SIZE', - LITE_RUNTIME: 'LITE_RUNTIME', -} as const; - -export type _google_protobuf_FileOptions_OptimizeMode = - | 'SPEED' - | 1 - | 'CODE_SIZE' - | 2 - | 'LITE_RUNTIME' - | 3 - -export type _google_protobuf_FileOptions_OptimizeMode__Output = typeof _google_protobuf_FileOptions_OptimizeMode[keyof typeof _google_protobuf_FileOptions_OptimizeMode] - -export interface FileOptions { - 'javaPackage'?: (string); - 'javaOuterClassname'?: (string); - 'optimizeFor'?: (_google_protobuf_FileOptions_OptimizeMode); - 'javaMultipleFiles'?: (boolean); - 'goPackage'?: (string); - 'ccGenericServices'?: (boolean); - 'javaGenericServices'?: (boolean); - 'pyGenericServices'?: (boolean); - /** - * @deprecated - */ - 'javaGenerateEqualsAndHash'?: (boolean); - 'deprecated'?: (boolean); - 'javaStringCheckUtf8'?: (boolean); - 'ccEnableArenas'?: (boolean); - 'objcClassPrefix'?: (string); - 'csharpNamespace'?: (string); - 'swiftPrefix'?: (string); - 'phpClassPrefix'?: (string); - 'phpNamespace'?: (string); - 'phpMetadataNamespace'?: (string); - 'rubyPackage'?: (string); - 'features'?: (_google_protobuf_FeatureSet | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; -} - -export interface FileOptions__Output { - 'javaPackage': (string); - 'javaOuterClassname': (string); - 'optimizeFor': (_google_protobuf_FileOptions_OptimizeMode__Output); - 'javaMultipleFiles': (boolean); - 'goPackage': (string); - 'ccGenericServices': (boolean); - 'javaGenericServices': (boolean); - 'pyGenericServices': (boolean); - /** - * @deprecated - */ - 'javaGenerateEqualsAndHash': (boolean); - 'deprecated': (boolean); - 'javaStringCheckUtf8': (boolean); - 'ccEnableArenas': (boolean); - 'objcClassPrefix': (string); - 'csharpNamespace': (string); - 'swiftPrefix': (string); - 'phpClassPrefix': (string); - 'phpNamespace': (string); - 'phpMetadataNamespace': (string); - 'rubyPackage': (string); - 'features': (_google_protobuf_FeatureSet__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FloatValue.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FloatValue.ts deleted file mode 100644 index 54a655f..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FloatValue.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Original file: null - - -export interface FloatValue { - 'value'?: (number | string); -} - -export interface FloatValue__Output { - 'value': (number); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/GeneratedCodeInfo.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/GeneratedCodeInfo.ts deleted file mode 100644 index 55d506f..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/GeneratedCodeInfo.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Original file: null - - -export interface _google_protobuf_GeneratedCodeInfo_Annotation { - 'path'?: (number)[]; - 'sourceFile'?: (string); - 'begin'?: (number); - 'end'?: (number); - 'semantic'?: (_google_protobuf_GeneratedCodeInfo_Annotation_Semantic); -} - -export interface _google_protobuf_GeneratedCodeInfo_Annotation__Output { - 'path': (number)[]; - 'sourceFile': (string); - 'begin': (number); - 'end': (number); - 'semantic': (_google_protobuf_GeneratedCodeInfo_Annotation_Semantic__Output); -} - -// Original file: null - -export const _google_protobuf_GeneratedCodeInfo_Annotation_Semantic = { - NONE: 'NONE', - SET: 'SET', - ALIAS: 'ALIAS', -} as const; - -export type _google_protobuf_GeneratedCodeInfo_Annotation_Semantic = - | 'NONE' - | 0 - | 'SET' - | 1 - | 'ALIAS' - | 2 - -export type _google_protobuf_GeneratedCodeInfo_Annotation_Semantic__Output = typeof _google_protobuf_GeneratedCodeInfo_Annotation_Semantic[keyof typeof _google_protobuf_GeneratedCodeInfo_Annotation_Semantic] - -export interface GeneratedCodeInfo { - 'annotation'?: (_google_protobuf_GeneratedCodeInfo_Annotation)[]; -} - -export interface GeneratedCodeInfo__Output { - 'annotation': (_google_protobuf_GeneratedCodeInfo_Annotation__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Int32Value.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Int32Value.ts deleted file mode 100644 index ec4eeb7..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Int32Value.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Original file: null - - -export interface Int32Value { - 'value'?: (number); -} - -export interface Int32Value__Output { - 'value': (number); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Int64Value.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Int64Value.ts deleted file mode 100644 index f737519..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Int64Value.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Original file: null - -import type { Long } from '@grpc/proto-loader'; - -export interface Int64Value { - 'value'?: (number | string | Long); -} - -export interface Int64Value__Output { - 'value': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MessageOptions.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MessageOptions.ts deleted file mode 100644 index 6d6d459..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MessageOptions.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Original file: null - -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; - -export interface MessageOptions { - 'messageSetWireFormat'?: (boolean); - 'noStandardDescriptorAccessor'?: (boolean); - 'deprecated'?: (boolean); - 'mapEntry'?: (boolean); - /** - * @deprecated - */ - 'deprecatedLegacyJsonFieldConflicts'?: (boolean); - 'features'?: (_google_protobuf_FeatureSet | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; - '.validate.disabled'?: (boolean); -} - -export interface MessageOptions__Output { - 'messageSetWireFormat': (boolean); - 'noStandardDescriptorAccessor': (boolean); - 'deprecated': (boolean); - 'mapEntry': (boolean); - /** - * @deprecated - */ - 'deprecatedLegacyJsonFieldConflicts': (boolean); - 'features': (_google_protobuf_FeatureSet__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; - '.validate.disabled': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MethodDescriptorProto.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MethodDescriptorProto.ts deleted file mode 100644 index c76c0ea..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MethodDescriptorProto.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Original file: null - -import type { MethodOptions as _google_protobuf_MethodOptions, MethodOptions__Output as _google_protobuf_MethodOptions__Output } from '../../google/protobuf/MethodOptions'; - -export interface MethodDescriptorProto { - 'name'?: (string); - 'inputType'?: (string); - 'outputType'?: (string); - 'options'?: (_google_protobuf_MethodOptions | null); - 'clientStreaming'?: (boolean); - 'serverStreaming'?: (boolean); -} - -export interface MethodDescriptorProto__Output { - 'name': (string); - 'inputType': (string); - 'outputType': (string); - 'options': (_google_protobuf_MethodOptions__Output | null); - 'clientStreaming': (boolean); - 'serverStreaming': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MethodOptions.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MethodOptions.ts deleted file mode 100644 index 5e5bf2f..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MethodOptions.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Original file: null - -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; - -// Original file: null - -export const _google_protobuf_MethodOptions_IdempotencyLevel = { - IDEMPOTENCY_UNKNOWN: 'IDEMPOTENCY_UNKNOWN', - NO_SIDE_EFFECTS: 'NO_SIDE_EFFECTS', - IDEMPOTENT: 'IDEMPOTENT', -} as const; - -export type _google_protobuf_MethodOptions_IdempotencyLevel = - | 'IDEMPOTENCY_UNKNOWN' - | 0 - | 'NO_SIDE_EFFECTS' - | 1 - | 'IDEMPOTENT' - | 2 - -export type _google_protobuf_MethodOptions_IdempotencyLevel__Output = typeof _google_protobuf_MethodOptions_IdempotencyLevel[keyof typeof _google_protobuf_MethodOptions_IdempotencyLevel] - -export interface MethodOptions { - 'deprecated'?: (boolean); - 'idempotencyLevel'?: (_google_protobuf_MethodOptions_IdempotencyLevel); - 'features'?: (_google_protobuf_FeatureSet | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; -} - -export interface MethodOptions__Output { - 'deprecated': (boolean); - 'idempotencyLevel': (_google_protobuf_MethodOptions_IdempotencyLevel__Output); - 'features': (_google_protobuf_FeatureSet__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/OneofDescriptorProto.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/OneofDescriptorProto.ts deleted file mode 100644 index 636f13e..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/OneofDescriptorProto.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Original file: null - -import type { OneofOptions as _google_protobuf_OneofOptions, OneofOptions__Output as _google_protobuf_OneofOptions__Output } from '../../google/protobuf/OneofOptions'; - -export interface OneofDescriptorProto { - 'name'?: (string); - 'options'?: (_google_protobuf_OneofOptions | null); -} - -export interface OneofDescriptorProto__Output { - 'name': (string); - 'options': (_google_protobuf_OneofOptions__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/OneofOptions.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/OneofOptions.ts deleted file mode 100644 index a5cc624..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/OneofOptions.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Original file: null - -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; - -export interface OneofOptions { - 'features'?: (_google_protobuf_FeatureSet | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; - '.validate.required'?: (boolean); -} - -export interface OneofOptions__Output { - 'features': (_google_protobuf_FeatureSet__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; - '.validate.required': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ServiceDescriptorProto.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ServiceDescriptorProto.ts deleted file mode 100644 index 40c9263..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ServiceDescriptorProto.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Original file: null - -import type { MethodDescriptorProto as _google_protobuf_MethodDescriptorProto, MethodDescriptorProto__Output as _google_protobuf_MethodDescriptorProto__Output } from '../../google/protobuf/MethodDescriptorProto'; -import type { ServiceOptions as _google_protobuf_ServiceOptions, ServiceOptions__Output as _google_protobuf_ServiceOptions__Output } from '../../google/protobuf/ServiceOptions'; - -export interface ServiceDescriptorProto { - 'name'?: (string); - 'method'?: (_google_protobuf_MethodDescriptorProto)[]; - 'options'?: (_google_protobuf_ServiceOptions | null); -} - -export interface ServiceDescriptorProto__Output { - 'name': (string); - 'method': (_google_protobuf_MethodDescriptorProto__Output)[]; - 'options': (_google_protobuf_ServiceOptions__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ServiceOptions.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ServiceOptions.ts deleted file mode 100644 index 5e99f2b..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ServiceOptions.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Original file: null - -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; - -export interface ServiceOptions { - 'deprecated'?: (boolean); - 'features'?: (_google_protobuf_FeatureSet | null); - 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; -} - -export interface ServiceOptions__Output { - 'deprecated': (boolean); - 'features': (_google_protobuf_FeatureSet__Output | null); - 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/SourceCodeInfo.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/SourceCodeInfo.ts deleted file mode 100644 index d30e59b..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/SourceCodeInfo.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Original file: null - - -export interface _google_protobuf_SourceCodeInfo_Location { - 'path'?: (number)[]; - 'span'?: (number)[]; - 'leadingComments'?: (string); - 'trailingComments'?: (string); - 'leadingDetachedComments'?: (string)[]; -} - -export interface _google_protobuf_SourceCodeInfo_Location__Output { - 'path': (number)[]; - 'span': (number)[]; - 'leadingComments': (string); - 'trailingComments': (string); - 'leadingDetachedComments': (string)[]; -} - -export interface SourceCodeInfo { - 'location'?: (_google_protobuf_SourceCodeInfo_Location)[]; -} - -export interface SourceCodeInfo__Output { - 'location': (_google_protobuf_SourceCodeInfo_Location__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/StringValue.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/StringValue.ts deleted file mode 100644 index 673090e..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/StringValue.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Original file: null - - -export interface StringValue { - 'value'?: (string); -} - -export interface StringValue__Output { - 'value': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/SymbolVisibility.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/SymbolVisibility.ts deleted file mode 100644 index 9ece164..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/SymbolVisibility.ts +++ /dev/null @@ -1,17 +0,0 @@ -// Original file: null - -export const SymbolVisibility = { - VISIBILITY_UNSET: 'VISIBILITY_UNSET', - VISIBILITY_LOCAL: 'VISIBILITY_LOCAL', - VISIBILITY_EXPORT: 'VISIBILITY_EXPORT', -} as const; - -export type SymbolVisibility = - | 'VISIBILITY_UNSET' - | 0 - | 'VISIBILITY_LOCAL' - | 1 - | 'VISIBILITY_EXPORT' - | 2 - -export type SymbolVisibility__Output = typeof SymbolVisibility[keyof typeof SymbolVisibility] diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Timestamp.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Timestamp.ts deleted file mode 100644 index ceaa32b..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Timestamp.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Original file: null - -import type { Long } from '@grpc/proto-loader'; - -export interface Timestamp { - 'seconds'?: (number | string | Long); - 'nanos'?: (number); -} - -export interface Timestamp__Output { - 'seconds': (string); - 'nanos': (number); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UInt32Value.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UInt32Value.ts deleted file mode 100644 index 973ab34..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UInt32Value.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Original file: null - - -export interface UInt32Value { - 'value'?: (number); -} - -export interface UInt32Value__Output { - 'value': (number); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UInt64Value.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UInt64Value.ts deleted file mode 100644 index 7a85c39..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UInt64Value.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Original file: null - -import type { Long } from '@grpc/proto-loader'; - -export interface UInt64Value { - 'value'?: (number | string | Long); -} - -export interface UInt64Value__Output { - 'value': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UninterpretedOption.ts b/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UninterpretedOption.ts deleted file mode 100644 index 6e9fc27..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UninterpretedOption.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Original file: null - -import type { Long } from '@grpc/proto-loader'; - -export interface _google_protobuf_UninterpretedOption_NamePart { - 'namePart'?: (string); - 'isExtension'?: (boolean); -} - -export interface _google_protobuf_UninterpretedOption_NamePart__Output { - 'namePart': (string); - 'isExtension': (boolean); -} - -export interface UninterpretedOption { - 'name'?: (_google_protobuf_UninterpretedOption_NamePart)[]; - 'identifierValue'?: (string); - 'positiveIntValue'?: (number | string | Long); - 'negativeIntValue'?: (number | string | Long); - 'doubleValue'?: (number | string); - 'stringValue'?: (Buffer | Uint8Array | string); - 'aggregateValue'?: (string); -} - -export interface UninterpretedOption__Output { - 'name': (_google_protobuf_UninterpretedOption_NamePart__Output)[]; - 'identifierValue': (string); - 'positiveIntValue': (string); - 'negativeIntValue': (string); - 'doubleValue': (number); - 'stringValue': (Buffer); - 'aggregateValue': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Address.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Address.ts deleted file mode 100644 index 01cf32b..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Address.ts +++ /dev/null @@ -1,89 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; - -/** - * An address type not included above. - */ -export interface _grpc_channelz_v1_Address_OtherAddress { - /** - * The human readable version of the value. This value should be set. - */ - 'name'?: (string); - /** - * The actual address message. - */ - 'value'?: (_google_protobuf_Any | null); -} - -/** - * An address type not included above. - */ -export interface _grpc_channelz_v1_Address_OtherAddress__Output { - /** - * The human readable version of the value. This value should be set. - */ - 'name': (string); - /** - * The actual address message. - */ - 'value': (_google_protobuf_Any__Output | null); -} - -export interface _grpc_channelz_v1_Address_TcpIpAddress { - /** - * Either the IPv4 or IPv6 address in bytes. Will be either 4 bytes or 16 - * bytes in length. - */ - 'ip_address'?: (Buffer | Uint8Array | string); - /** - * 0-64k, or -1 if not appropriate. - */ - 'port'?: (number); -} - -export interface _grpc_channelz_v1_Address_TcpIpAddress__Output { - /** - * Either the IPv4 or IPv6 address in bytes. Will be either 4 bytes or 16 - * bytes in length. - */ - 'ip_address': (Buffer); - /** - * 0-64k, or -1 if not appropriate. - */ - 'port': (number); -} - -/** - * A Unix Domain Socket address. - */ -export interface _grpc_channelz_v1_Address_UdsAddress { - 'filename'?: (string); -} - -/** - * A Unix Domain Socket address. - */ -export interface _grpc_channelz_v1_Address_UdsAddress__Output { - 'filename': (string); -} - -/** - * Address represents the address used to create the socket. - */ -export interface Address { - 'tcpip_address'?: (_grpc_channelz_v1_Address_TcpIpAddress | null); - 'uds_address'?: (_grpc_channelz_v1_Address_UdsAddress | null); - 'other_address'?: (_grpc_channelz_v1_Address_OtherAddress | null); - 'address'?: "tcpip_address"|"uds_address"|"other_address"; -} - -/** - * Address represents the address used to create the socket. - */ -export interface Address__Output { - 'tcpip_address'?: (_grpc_channelz_v1_Address_TcpIpAddress__Output | null); - 'uds_address'?: (_grpc_channelz_v1_Address_UdsAddress__Output | null); - 'other_address'?: (_grpc_channelz_v1_Address_OtherAddress__Output | null); - 'address'?: "tcpip_address"|"uds_address"|"other_address"; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Channel.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Channel.ts deleted file mode 100644 index 93b4a26..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Channel.ts +++ /dev/null @@ -1,68 +0,0 @@ -// Original file: proto/channelz.proto - -import type { ChannelRef as _grpc_channelz_v1_ChannelRef, ChannelRef__Output as _grpc_channelz_v1_ChannelRef__Output } from '../../../grpc/channelz/v1/ChannelRef'; -import type { ChannelData as _grpc_channelz_v1_ChannelData, ChannelData__Output as _grpc_channelz_v1_ChannelData__Output } from '../../../grpc/channelz/v1/ChannelData'; -import type { SubchannelRef as _grpc_channelz_v1_SubchannelRef, SubchannelRef__Output as _grpc_channelz_v1_SubchannelRef__Output } from '../../../grpc/channelz/v1/SubchannelRef'; -import type { SocketRef as _grpc_channelz_v1_SocketRef, SocketRef__Output as _grpc_channelz_v1_SocketRef__Output } from '../../../grpc/channelz/v1/SocketRef'; - -/** - * Channel is a logical grouping of channels, subchannels, and sockets. - */ -export interface Channel { - /** - * The identifier for this channel. This should bet set. - */ - 'ref'?: (_grpc_channelz_v1_ChannelRef | null); - /** - * Data specific to this channel. - */ - 'data'?: (_grpc_channelz_v1_ChannelData | null); - /** - * There are no ordering guarantees on the order of channel refs. - * There may not be cycles in the ref graph. - * A channel ref may be present in more than one channel or subchannel. - */ - 'channel_ref'?: (_grpc_channelz_v1_ChannelRef)[]; - /** - * At most one of 'channel_ref+subchannel_ref' and 'socket' is set. - * There are no ordering guarantees on the order of subchannel refs. - * There may not be cycles in the ref graph. - * A sub channel ref may be present in more than one channel or subchannel. - */ - 'subchannel_ref'?: (_grpc_channelz_v1_SubchannelRef)[]; - /** - * There are no ordering guarantees on the order of sockets. - */ - 'socket_ref'?: (_grpc_channelz_v1_SocketRef)[]; -} - -/** - * Channel is a logical grouping of channels, subchannels, and sockets. - */ -export interface Channel__Output { - /** - * The identifier for this channel. This should bet set. - */ - 'ref': (_grpc_channelz_v1_ChannelRef__Output | null); - /** - * Data specific to this channel. - */ - 'data': (_grpc_channelz_v1_ChannelData__Output | null); - /** - * There are no ordering guarantees on the order of channel refs. - * There may not be cycles in the ref graph. - * A channel ref may be present in more than one channel or subchannel. - */ - 'channel_ref': (_grpc_channelz_v1_ChannelRef__Output)[]; - /** - * At most one of 'channel_ref+subchannel_ref' and 'socket' is set. - * There are no ordering guarantees on the order of subchannel refs. - * There may not be cycles in the ref graph. - * A sub channel ref may be present in more than one channel or subchannel. - */ - 'subchannel_ref': (_grpc_channelz_v1_SubchannelRef__Output)[]; - /** - * There are no ordering guarantees on the order of sockets. - */ - 'socket_ref': (_grpc_channelz_v1_SocketRef__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelConnectivityState.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelConnectivityState.ts deleted file mode 100644 index 78fb069..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelConnectivityState.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Original file: proto/channelz.proto - - -// Original file: proto/channelz.proto - -export const _grpc_channelz_v1_ChannelConnectivityState_State = { - UNKNOWN: 'UNKNOWN', - IDLE: 'IDLE', - CONNECTING: 'CONNECTING', - READY: 'READY', - TRANSIENT_FAILURE: 'TRANSIENT_FAILURE', - SHUTDOWN: 'SHUTDOWN', -} as const; - -export type _grpc_channelz_v1_ChannelConnectivityState_State = - | 'UNKNOWN' - | 0 - | 'IDLE' - | 1 - | 'CONNECTING' - | 2 - | 'READY' - | 3 - | 'TRANSIENT_FAILURE' - | 4 - | 'SHUTDOWN' - | 5 - -export type _grpc_channelz_v1_ChannelConnectivityState_State__Output = typeof _grpc_channelz_v1_ChannelConnectivityState_State[keyof typeof _grpc_channelz_v1_ChannelConnectivityState_State] - -/** - * These come from the specified states in this document: - * https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md - */ -export interface ChannelConnectivityState { - 'state'?: (_grpc_channelz_v1_ChannelConnectivityState_State); -} - -/** - * These come from the specified states in this document: - * https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md - */ -export interface ChannelConnectivityState__Output { - 'state': (_grpc_channelz_v1_ChannelConnectivityState_State__Output); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelData.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelData.ts deleted file mode 100644 index 6d6824a..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelData.ts +++ /dev/null @@ -1,76 +0,0 @@ -// Original file: proto/channelz.proto - -import type { ChannelConnectivityState as _grpc_channelz_v1_ChannelConnectivityState, ChannelConnectivityState__Output as _grpc_channelz_v1_ChannelConnectivityState__Output } from '../../../grpc/channelz/v1/ChannelConnectivityState'; -import type { ChannelTrace as _grpc_channelz_v1_ChannelTrace, ChannelTrace__Output as _grpc_channelz_v1_ChannelTrace__Output } from '../../../grpc/channelz/v1/ChannelTrace'; -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; -import type { Long } from '@grpc/proto-loader'; - -/** - * Channel data is data related to a specific Channel or Subchannel. - */ -export interface ChannelData { - /** - * The connectivity state of the channel or subchannel. Implementations - * should always set this. - */ - 'state'?: (_grpc_channelz_v1_ChannelConnectivityState | null); - /** - * The target this channel originally tried to connect to. May be absent - */ - 'target'?: (string); - /** - * A trace of recent events on the channel. May be absent. - */ - 'trace'?: (_grpc_channelz_v1_ChannelTrace | null); - /** - * The number of calls started on the channel - */ - 'calls_started'?: (number | string | Long); - /** - * The number of calls that have completed with an OK status - */ - 'calls_succeeded'?: (number | string | Long); - /** - * The number of calls that have completed with a non-OK status - */ - 'calls_failed'?: (number | string | Long); - /** - * The last time a call was started on the channel. - */ - 'last_call_started_timestamp'?: (_google_protobuf_Timestamp | null); -} - -/** - * Channel data is data related to a specific Channel or Subchannel. - */ -export interface ChannelData__Output { - /** - * The connectivity state of the channel or subchannel. Implementations - * should always set this. - */ - 'state': (_grpc_channelz_v1_ChannelConnectivityState__Output | null); - /** - * The target this channel originally tried to connect to. May be absent - */ - 'target': (string); - /** - * A trace of recent events on the channel. May be absent. - */ - 'trace': (_grpc_channelz_v1_ChannelTrace__Output | null); - /** - * The number of calls started on the channel - */ - 'calls_started': (string); - /** - * The number of calls that have completed with an OK status - */ - 'calls_succeeded': (string); - /** - * The number of calls that have completed with a non-OK status - */ - 'calls_failed': (string); - /** - * The last time a call was started on the channel. - */ - 'last_call_started_timestamp': (_google_protobuf_Timestamp__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelRef.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelRef.ts deleted file mode 100644 index 231d008..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelRef.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Long } from '@grpc/proto-loader'; - -/** - * ChannelRef is a reference to a Channel. - */ -export interface ChannelRef { - /** - * The globally unique id for this channel. Must be a positive number. - */ - 'channel_id'?: (number | string | Long); - /** - * An optional name associated with the channel. - */ - 'name'?: (string); -} - -/** - * ChannelRef is a reference to a Channel. - */ -export interface ChannelRef__Output { - /** - * The globally unique id for this channel. Must be a positive number. - */ - 'channel_id': (string); - /** - * An optional name associated with the channel. - */ - 'name': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelTrace.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelTrace.ts deleted file mode 100644 index 7dbc8d9..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelTrace.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; -import type { ChannelTraceEvent as _grpc_channelz_v1_ChannelTraceEvent, ChannelTraceEvent__Output as _grpc_channelz_v1_ChannelTraceEvent__Output } from '../../../grpc/channelz/v1/ChannelTraceEvent'; -import type { Long } from '@grpc/proto-loader'; - -/** - * ChannelTrace represents the recent events that have occurred on the channel. - */ -export interface ChannelTrace { - /** - * Number of events ever logged in this tracing object. This can differ from - * events.size() because events can be overwritten or garbage collected by - * implementations. - */ - 'num_events_logged'?: (number | string | Long); - /** - * Time that this channel was created. - */ - 'creation_timestamp'?: (_google_protobuf_Timestamp | null); - /** - * List of events that have occurred on this channel. - */ - 'events'?: (_grpc_channelz_v1_ChannelTraceEvent)[]; -} - -/** - * ChannelTrace represents the recent events that have occurred on the channel. - */ -export interface ChannelTrace__Output { - /** - * Number of events ever logged in this tracing object. This can differ from - * events.size() because events can be overwritten or garbage collected by - * implementations. - */ - 'num_events_logged': (string); - /** - * Time that this channel was created. - */ - 'creation_timestamp': (_google_protobuf_Timestamp__Output | null); - /** - * List of events that have occurred on this channel. - */ - 'events': (_grpc_channelz_v1_ChannelTraceEvent__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelTraceEvent.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelTraceEvent.ts deleted file mode 100644 index e1af289..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelTraceEvent.ts +++ /dev/null @@ -1,91 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; -import type { ChannelRef as _grpc_channelz_v1_ChannelRef, ChannelRef__Output as _grpc_channelz_v1_ChannelRef__Output } from '../../../grpc/channelz/v1/ChannelRef'; -import type { SubchannelRef as _grpc_channelz_v1_SubchannelRef, SubchannelRef__Output as _grpc_channelz_v1_SubchannelRef__Output } from '../../../grpc/channelz/v1/SubchannelRef'; - -// Original file: proto/channelz.proto - -/** - * The supported severity levels of trace events. - */ -export const _grpc_channelz_v1_ChannelTraceEvent_Severity = { - CT_UNKNOWN: 'CT_UNKNOWN', - CT_INFO: 'CT_INFO', - CT_WARNING: 'CT_WARNING', - CT_ERROR: 'CT_ERROR', -} as const; - -/** - * The supported severity levels of trace events. - */ -export type _grpc_channelz_v1_ChannelTraceEvent_Severity = - | 'CT_UNKNOWN' - | 0 - | 'CT_INFO' - | 1 - | 'CT_WARNING' - | 2 - | 'CT_ERROR' - | 3 - -/** - * The supported severity levels of trace events. - */ -export type _grpc_channelz_v1_ChannelTraceEvent_Severity__Output = typeof _grpc_channelz_v1_ChannelTraceEvent_Severity[keyof typeof _grpc_channelz_v1_ChannelTraceEvent_Severity] - -/** - * A trace event is an interesting thing that happened to a channel or - * subchannel, such as creation, address resolution, subchannel creation, etc. - */ -export interface ChannelTraceEvent { - /** - * High level description of the event. - */ - 'description'?: (string); - /** - * the severity of the trace event - */ - 'severity'?: (_grpc_channelz_v1_ChannelTraceEvent_Severity); - /** - * When this event occurred. - */ - 'timestamp'?: (_google_protobuf_Timestamp | null); - 'channel_ref'?: (_grpc_channelz_v1_ChannelRef | null); - 'subchannel_ref'?: (_grpc_channelz_v1_SubchannelRef | null); - /** - * ref of referenced channel or subchannel. - * Optional, only present if this event refers to a child object. For example, - * this field would be filled if this trace event was for a subchannel being - * created. - */ - 'child_ref'?: "channel_ref"|"subchannel_ref"; -} - -/** - * A trace event is an interesting thing that happened to a channel or - * subchannel, such as creation, address resolution, subchannel creation, etc. - */ -export interface ChannelTraceEvent__Output { - /** - * High level description of the event. - */ - 'description': (string); - /** - * the severity of the trace event - */ - 'severity': (_grpc_channelz_v1_ChannelTraceEvent_Severity__Output); - /** - * When this event occurred. - */ - 'timestamp': (_google_protobuf_Timestamp__Output | null); - 'channel_ref'?: (_grpc_channelz_v1_ChannelRef__Output | null); - 'subchannel_ref'?: (_grpc_channelz_v1_SubchannelRef__Output | null); - /** - * ref of referenced channel or subchannel. - * Optional, only present if this event refers to a child object. For example, - * this field would be filled if this trace event was for a subchannel being - * created. - */ - 'child_ref'?: "channel_ref"|"subchannel_ref"; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Channelz.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Channelz.ts deleted file mode 100644 index 4c8c18a..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Channelz.ts +++ /dev/null @@ -1,178 +0,0 @@ -// Original file: proto/channelz.proto - -import type * as grpc from '../../../../index' -import type { MethodDefinition } from '@grpc/proto-loader' -import type { GetChannelRequest as _grpc_channelz_v1_GetChannelRequest, GetChannelRequest__Output as _grpc_channelz_v1_GetChannelRequest__Output } from '../../../grpc/channelz/v1/GetChannelRequest'; -import type { GetChannelResponse as _grpc_channelz_v1_GetChannelResponse, GetChannelResponse__Output as _grpc_channelz_v1_GetChannelResponse__Output } from '../../../grpc/channelz/v1/GetChannelResponse'; -import type { GetServerRequest as _grpc_channelz_v1_GetServerRequest, GetServerRequest__Output as _grpc_channelz_v1_GetServerRequest__Output } from '../../../grpc/channelz/v1/GetServerRequest'; -import type { GetServerResponse as _grpc_channelz_v1_GetServerResponse, GetServerResponse__Output as _grpc_channelz_v1_GetServerResponse__Output } from '../../../grpc/channelz/v1/GetServerResponse'; -import type { GetServerSocketsRequest as _grpc_channelz_v1_GetServerSocketsRequest, GetServerSocketsRequest__Output as _grpc_channelz_v1_GetServerSocketsRequest__Output } from '../../../grpc/channelz/v1/GetServerSocketsRequest'; -import type { GetServerSocketsResponse as _grpc_channelz_v1_GetServerSocketsResponse, GetServerSocketsResponse__Output as _grpc_channelz_v1_GetServerSocketsResponse__Output } from '../../../grpc/channelz/v1/GetServerSocketsResponse'; -import type { GetServersRequest as _grpc_channelz_v1_GetServersRequest, GetServersRequest__Output as _grpc_channelz_v1_GetServersRequest__Output } from '../../../grpc/channelz/v1/GetServersRequest'; -import type { GetServersResponse as _grpc_channelz_v1_GetServersResponse, GetServersResponse__Output as _grpc_channelz_v1_GetServersResponse__Output } from '../../../grpc/channelz/v1/GetServersResponse'; -import type { GetSocketRequest as _grpc_channelz_v1_GetSocketRequest, GetSocketRequest__Output as _grpc_channelz_v1_GetSocketRequest__Output } from '../../../grpc/channelz/v1/GetSocketRequest'; -import type { GetSocketResponse as _grpc_channelz_v1_GetSocketResponse, GetSocketResponse__Output as _grpc_channelz_v1_GetSocketResponse__Output } from '../../../grpc/channelz/v1/GetSocketResponse'; -import type { GetSubchannelRequest as _grpc_channelz_v1_GetSubchannelRequest, GetSubchannelRequest__Output as _grpc_channelz_v1_GetSubchannelRequest__Output } from '../../../grpc/channelz/v1/GetSubchannelRequest'; -import type { GetSubchannelResponse as _grpc_channelz_v1_GetSubchannelResponse, GetSubchannelResponse__Output as _grpc_channelz_v1_GetSubchannelResponse__Output } from '../../../grpc/channelz/v1/GetSubchannelResponse'; -import type { GetTopChannelsRequest as _grpc_channelz_v1_GetTopChannelsRequest, GetTopChannelsRequest__Output as _grpc_channelz_v1_GetTopChannelsRequest__Output } from '../../../grpc/channelz/v1/GetTopChannelsRequest'; -import type { GetTopChannelsResponse as _grpc_channelz_v1_GetTopChannelsResponse, GetTopChannelsResponse__Output as _grpc_channelz_v1_GetTopChannelsResponse__Output } from '../../../grpc/channelz/v1/GetTopChannelsResponse'; - -/** - * Channelz is a service exposed by gRPC servers that provides detailed debug - * information. - */ -export interface ChannelzClient extends grpc.Client { - /** - * Returns a single Channel, or else a NOT_FOUND code. - */ - GetChannel(argument: _grpc_channelz_v1_GetChannelRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetChannelResponse__Output>): grpc.ClientUnaryCall; - GetChannel(argument: _grpc_channelz_v1_GetChannelRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetChannelResponse__Output>): grpc.ClientUnaryCall; - GetChannel(argument: _grpc_channelz_v1_GetChannelRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetChannelResponse__Output>): grpc.ClientUnaryCall; - GetChannel(argument: _grpc_channelz_v1_GetChannelRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetChannelResponse__Output>): grpc.ClientUnaryCall; - - /** - * Returns a single Server, or else a NOT_FOUND code. - */ - GetServer(argument: _grpc_channelz_v1_GetServerRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - GetServer(argument: _grpc_channelz_v1_GetServerRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - GetServer(argument: _grpc_channelz_v1_GetServerRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - GetServer(argument: _grpc_channelz_v1_GetServerRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - /** - * Returns a single Server, or else a NOT_FOUND code. - */ - getServer(argument: _grpc_channelz_v1_GetServerRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - getServer(argument: _grpc_channelz_v1_GetServerRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - getServer(argument: _grpc_channelz_v1_GetServerRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - getServer(argument: _grpc_channelz_v1_GetServerRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerResponse__Output>): grpc.ClientUnaryCall; - - /** - * Gets all server sockets that exist in the process. - */ - GetServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - GetServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - GetServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - GetServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - /** - * Gets all server sockets that exist in the process. - */ - getServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - getServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - getServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - getServerSockets(argument: _grpc_channelz_v1_GetServerSocketsRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetServerSocketsResponse__Output>): grpc.ClientUnaryCall; - - /** - * Gets all servers that exist in the process. - */ - GetServers(argument: _grpc_channelz_v1_GetServersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - GetServers(argument: _grpc_channelz_v1_GetServersRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - GetServers(argument: _grpc_channelz_v1_GetServersRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - GetServers(argument: _grpc_channelz_v1_GetServersRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - /** - * Gets all servers that exist in the process. - */ - getServers(argument: _grpc_channelz_v1_GetServersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - getServers(argument: _grpc_channelz_v1_GetServersRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - getServers(argument: _grpc_channelz_v1_GetServersRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - getServers(argument: _grpc_channelz_v1_GetServersRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetServersResponse__Output>): grpc.ClientUnaryCall; - - /** - * Returns a single Socket or else a NOT_FOUND code. - */ - GetSocket(argument: _grpc_channelz_v1_GetSocketRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - GetSocket(argument: _grpc_channelz_v1_GetSocketRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - GetSocket(argument: _grpc_channelz_v1_GetSocketRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - GetSocket(argument: _grpc_channelz_v1_GetSocketRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - /** - * Returns a single Socket or else a NOT_FOUND code. - */ - getSocket(argument: _grpc_channelz_v1_GetSocketRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - getSocket(argument: _grpc_channelz_v1_GetSocketRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - getSocket(argument: _grpc_channelz_v1_GetSocketRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - getSocket(argument: _grpc_channelz_v1_GetSocketRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetSocketResponse__Output>): grpc.ClientUnaryCall; - - /** - * Returns a single Subchannel, or else a NOT_FOUND code. - */ - GetSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - GetSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - GetSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - GetSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - /** - * Returns a single Subchannel, or else a NOT_FOUND code. - */ - getSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - getSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - getSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - getSubchannel(argument: _grpc_channelz_v1_GetSubchannelRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetSubchannelResponse__Output>): grpc.ClientUnaryCall; - - /** - * Gets all root channels (i.e. channels the application has directly - * created). This does not include subchannels nor non-top level channels. - */ - GetTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - GetTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - GetTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - GetTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - /** - * Gets all root channels (i.e. channels the application has directly - * created). This does not include subchannels nor non-top level channels. - */ - getTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - getTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - getTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - getTopChannels(argument: _grpc_channelz_v1_GetTopChannelsRequest, callback: grpc.requestCallback<_grpc_channelz_v1_GetTopChannelsResponse__Output>): grpc.ClientUnaryCall; - -} - -/** - * Channelz is a service exposed by gRPC servers that provides detailed debug - * information. - */ -export interface ChannelzHandlers extends grpc.UntypedServiceImplementation { - /** - * Returns a single Channel, or else a NOT_FOUND code. - */ - GetChannel: grpc.handleUnaryCall<_grpc_channelz_v1_GetChannelRequest__Output, _grpc_channelz_v1_GetChannelResponse>; - - /** - * Returns a single Server, or else a NOT_FOUND code. - */ - GetServer: grpc.handleUnaryCall<_grpc_channelz_v1_GetServerRequest__Output, _grpc_channelz_v1_GetServerResponse>; - - /** - * Gets all server sockets that exist in the process. - */ - GetServerSockets: grpc.handleUnaryCall<_grpc_channelz_v1_GetServerSocketsRequest__Output, _grpc_channelz_v1_GetServerSocketsResponse>; - - /** - * Gets all servers that exist in the process. - */ - GetServers: grpc.handleUnaryCall<_grpc_channelz_v1_GetServersRequest__Output, _grpc_channelz_v1_GetServersResponse>; - - /** - * Returns a single Socket or else a NOT_FOUND code. - */ - GetSocket: grpc.handleUnaryCall<_grpc_channelz_v1_GetSocketRequest__Output, _grpc_channelz_v1_GetSocketResponse>; - - /** - * Returns a single Subchannel, or else a NOT_FOUND code. - */ - GetSubchannel: grpc.handleUnaryCall<_grpc_channelz_v1_GetSubchannelRequest__Output, _grpc_channelz_v1_GetSubchannelResponse>; - - /** - * Gets all root channels (i.e. channels the application has directly - * created). This does not include subchannels nor non-top level channels. - */ - GetTopChannels: grpc.handleUnaryCall<_grpc_channelz_v1_GetTopChannelsRequest__Output, _grpc_channelz_v1_GetTopChannelsResponse>; - -} - -export interface ChannelzDefinition extends grpc.ServiceDefinition { - GetChannel: MethodDefinition<_grpc_channelz_v1_GetChannelRequest, _grpc_channelz_v1_GetChannelResponse, _grpc_channelz_v1_GetChannelRequest__Output, _grpc_channelz_v1_GetChannelResponse__Output> - GetServer: MethodDefinition<_grpc_channelz_v1_GetServerRequest, _grpc_channelz_v1_GetServerResponse, _grpc_channelz_v1_GetServerRequest__Output, _grpc_channelz_v1_GetServerResponse__Output> - GetServerSockets: MethodDefinition<_grpc_channelz_v1_GetServerSocketsRequest, _grpc_channelz_v1_GetServerSocketsResponse, _grpc_channelz_v1_GetServerSocketsRequest__Output, _grpc_channelz_v1_GetServerSocketsResponse__Output> - GetServers: MethodDefinition<_grpc_channelz_v1_GetServersRequest, _grpc_channelz_v1_GetServersResponse, _grpc_channelz_v1_GetServersRequest__Output, _grpc_channelz_v1_GetServersResponse__Output> - GetSocket: MethodDefinition<_grpc_channelz_v1_GetSocketRequest, _grpc_channelz_v1_GetSocketResponse, _grpc_channelz_v1_GetSocketRequest__Output, _grpc_channelz_v1_GetSocketResponse__Output> - GetSubchannel: MethodDefinition<_grpc_channelz_v1_GetSubchannelRequest, _grpc_channelz_v1_GetSubchannelResponse, _grpc_channelz_v1_GetSubchannelRequest__Output, _grpc_channelz_v1_GetSubchannelResponse__Output> - GetTopChannels: MethodDefinition<_grpc_channelz_v1_GetTopChannelsRequest, _grpc_channelz_v1_GetTopChannelsResponse, _grpc_channelz_v1_GetTopChannelsRequest__Output, _grpc_channelz_v1_GetTopChannelsResponse__Output> -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetChannelRequest.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetChannelRequest.ts deleted file mode 100644 index 437e2d6..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetChannelRequest.ts +++ /dev/null @@ -1,17 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Long } from '@grpc/proto-loader'; - -export interface GetChannelRequest { - /** - * channel_id is the identifier of the specific channel to get. - */ - 'channel_id'?: (number | string | Long); -} - -export interface GetChannelRequest__Output { - /** - * channel_id is the identifier of the specific channel to get. - */ - 'channel_id': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetChannelResponse.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetChannelResponse.ts deleted file mode 100644 index 2e967a4..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetChannelResponse.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Channel as _grpc_channelz_v1_Channel, Channel__Output as _grpc_channelz_v1_Channel__Output } from '../../../grpc/channelz/v1/Channel'; - -export interface GetChannelResponse { - /** - * The Channel that corresponds to the requested channel_id. This field - * should be set. - */ - 'channel'?: (_grpc_channelz_v1_Channel | null); -} - -export interface GetChannelResponse__Output { - /** - * The Channel that corresponds to the requested channel_id. This field - * should be set. - */ - 'channel': (_grpc_channelz_v1_Channel__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerRequest.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerRequest.ts deleted file mode 100644 index f5d4a29..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerRequest.ts +++ /dev/null @@ -1,17 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Long } from '@grpc/proto-loader'; - -export interface GetServerRequest { - /** - * server_id is the identifier of the specific server to get. - */ - 'server_id'?: (number | string | Long); -} - -export interface GetServerRequest__Output { - /** - * server_id is the identifier of the specific server to get. - */ - 'server_id': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerResponse.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerResponse.ts deleted file mode 100644 index fe00782..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerResponse.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Server as _grpc_channelz_v1_Server, Server__Output as _grpc_channelz_v1_Server__Output } from '../../../grpc/channelz/v1/Server'; - -export interface GetServerResponse { - /** - * The Server that corresponds to the requested server_id. This field - * should be set. - */ - 'server'?: (_grpc_channelz_v1_Server | null); -} - -export interface GetServerResponse__Output { - /** - * The Server that corresponds to the requested server_id. This field - * should be set. - */ - 'server': (_grpc_channelz_v1_Server__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerSocketsRequest.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerSocketsRequest.ts deleted file mode 100644 index c33056e..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerSocketsRequest.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Long } from '@grpc/proto-loader'; - -export interface GetServerSocketsRequest { - 'server_id'?: (number | string | Long); - /** - * start_socket_id indicates that only sockets at or above this id should be - * included in the results. - * To request the first page, this must be set to 0. To request - * subsequent pages, the client generates this value by adding 1 to - * the highest seen result ID. - */ - 'start_socket_id'?: (number | string | Long); - /** - * If non-zero, the server will return a page of results containing - * at most this many items. If zero, the server will choose a - * reasonable page size. Must never be negative. - */ - 'max_results'?: (number | string | Long); -} - -export interface GetServerSocketsRequest__Output { - 'server_id': (string); - /** - * start_socket_id indicates that only sockets at or above this id should be - * included in the results. - * To request the first page, this must be set to 0. To request - * subsequent pages, the client generates this value by adding 1 to - * the highest seen result ID. - */ - 'start_socket_id': (string); - /** - * If non-zero, the server will return a page of results containing - * at most this many items. If zero, the server will choose a - * reasonable page size. Must never be negative. - */ - 'max_results': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerSocketsResponse.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerSocketsResponse.ts deleted file mode 100644 index 112f277..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerSocketsResponse.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Original file: proto/channelz.proto - -import type { SocketRef as _grpc_channelz_v1_SocketRef, SocketRef__Output as _grpc_channelz_v1_SocketRef__Output } from '../../../grpc/channelz/v1/SocketRef'; - -export interface GetServerSocketsResponse { - /** - * list of socket refs that the connection detail service knows about. Sorted in - * ascending socket_id order. - * Must contain at least 1 result, otherwise 'end' must be true. - */ - 'socket_ref'?: (_grpc_channelz_v1_SocketRef)[]; - /** - * If set, indicates that the list of sockets is the final list. Requesting - * more sockets will only return more if they are created after this RPC - * completes. - */ - 'end'?: (boolean); -} - -export interface GetServerSocketsResponse__Output { - /** - * list of socket refs that the connection detail service knows about. Sorted in - * ascending socket_id order. - * Must contain at least 1 result, otherwise 'end' must be true. - */ - 'socket_ref': (_grpc_channelz_v1_SocketRef__Output)[]; - /** - * If set, indicates that the list of sockets is the final list. Requesting - * more sockets will only return more if they are created after this RPC - * completes. - */ - 'end': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServersRequest.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServersRequest.ts deleted file mode 100644 index 2defea6..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServersRequest.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Long } from '@grpc/proto-loader'; - -export interface GetServersRequest { - /** - * start_server_id indicates that only servers at or above this id should be - * included in the results. - * To request the first page, this must be set to 0. To request - * subsequent pages, the client generates this value by adding 1 to - * the highest seen result ID. - */ - 'start_server_id'?: (number | string | Long); - /** - * If non-zero, the server will return a page of results containing - * at most this many items. If zero, the server will choose a - * reasonable page size. Must never be negative. - */ - 'max_results'?: (number | string | Long); -} - -export interface GetServersRequest__Output { - /** - * start_server_id indicates that only servers at or above this id should be - * included in the results. - * To request the first page, this must be set to 0. To request - * subsequent pages, the client generates this value by adding 1 to - * the highest seen result ID. - */ - 'start_server_id': (string); - /** - * If non-zero, the server will return a page of results containing - * at most this many items. If zero, the server will choose a - * reasonable page size. Must never be negative. - */ - 'max_results': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServersResponse.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServersResponse.ts deleted file mode 100644 index b07893b..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServersResponse.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Server as _grpc_channelz_v1_Server, Server__Output as _grpc_channelz_v1_Server__Output } from '../../../grpc/channelz/v1/Server'; - -export interface GetServersResponse { - /** - * list of servers that the connection detail service knows about. Sorted in - * ascending server_id order. - * Must contain at least 1 result, otherwise 'end' must be true. - */ - 'server'?: (_grpc_channelz_v1_Server)[]; - /** - * If set, indicates that the list of servers is the final list. Requesting - * more servers will only return more if they are created after this RPC - * completes. - */ - 'end'?: (boolean); -} - -export interface GetServersResponse__Output { - /** - * list of servers that the connection detail service knows about. Sorted in - * ascending server_id order. - * Must contain at least 1 result, otherwise 'end' must be true. - */ - 'server': (_grpc_channelz_v1_Server__Output)[]; - /** - * If set, indicates that the list of servers is the final list. Requesting - * more servers will only return more if they are created after this RPC - * completes. - */ - 'end': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSocketRequest.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSocketRequest.ts deleted file mode 100644 index b3dc160..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSocketRequest.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Long } from '@grpc/proto-loader'; - -export interface GetSocketRequest { - /** - * socket_id is the identifier of the specific socket to get. - */ - 'socket_id'?: (number | string | Long); - /** - * If true, the response will contain only high level information - * that is inexpensive to obtain. Fields thay may be omitted are - * documented. - */ - 'summary'?: (boolean); -} - -export interface GetSocketRequest__Output { - /** - * socket_id is the identifier of the specific socket to get. - */ - 'socket_id': (string); - /** - * If true, the response will contain only high level information - * that is inexpensive to obtain. Fields thay may be omitted are - * documented. - */ - 'summary': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSocketResponse.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSocketResponse.ts deleted file mode 100644 index b6304b7..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSocketResponse.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Socket as _grpc_channelz_v1_Socket, Socket__Output as _grpc_channelz_v1_Socket__Output } from '../../../grpc/channelz/v1/Socket'; - -export interface GetSocketResponse { - /** - * The Socket that corresponds to the requested socket_id. This field - * should be set. - */ - 'socket'?: (_grpc_channelz_v1_Socket | null); -} - -export interface GetSocketResponse__Output { - /** - * The Socket that corresponds to the requested socket_id. This field - * should be set. - */ - 'socket': (_grpc_channelz_v1_Socket__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSubchannelRequest.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSubchannelRequest.ts deleted file mode 100644 index f481a81..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSubchannelRequest.ts +++ /dev/null @@ -1,17 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Long } from '@grpc/proto-loader'; - -export interface GetSubchannelRequest { - /** - * subchannel_id is the identifier of the specific subchannel to get. - */ - 'subchannel_id'?: (number | string | Long); -} - -export interface GetSubchannelRequest__Output { - /** - * subchannel_id is the identifier of the specific subchannel to get. - */ - 'subchannel_id': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSubchannelResponse.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSubchannelResponse.ts deleted file mode 100644 index 57d2bf2..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSubchannelResponse.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Subchannel as _grpc_channelz_v1_Subchannel, Subchannel__Output as _grpc_channelz_v1_Subchannel__Output } from '../../../grpc/channelz/v1/Subchannel'; - -export interface GetSubchannelResponse { - /** - * The Subchannel that corresponds to the requested subchannel_id. This - * field should be set. - */ - 'subchannel'?: (_grpc_channelz_v1_Subchannel | null); -} - -export interface GetSubchannelResponse__Output { - /** - * The Subchannel that corresponds to the requested subchannel_id. This - * field should be set. - */ - 'subchannel': (_grpc_channelz_v1_Subchannel__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetTopChannelsRequest.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetTopChannelsRequest.ts deleted file mode 100644 index a122d7a..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetTopChannelsRequest.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Long } from '@grpc/proto-loader'; - -export interface GetTopChannelsRequest { - /** - * start_channel_id indicates that only channels at or above this id should be - * included in the results. - * To request the first page, this should be set to 0. To request - * subsequent pages, the client generates this value by adding 1 to - * the highest seen result ID. - */ - 'start_channel_id'?: (number | string | Long); - /** - * If non-zero, the server will return a page of results containing - * at most this many items. If zero, the server will choose a - * reasonable page size. Must never be negative. - */ - 'max_results'?: (number | string | Long); -} - -export interface GetTopChannelsRequest__Output { - /** - * start_channel_id indicates that only channels at or above this id should be - * included in the results. - * To request the first page, this should be set to 0. To request - * subsequent pages, the client generates this value by adding 1 to - * the highest seen result ID. - */ - 'start_channel_id': (string); - /** - * If non-zero, the server will return a page of results containing - * at most this many items. If zero, the server will choose a - * reasonable page size. Must never be negative. - */ - 'max_results': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetTopChannelsResponse.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetTopChannelsResponse.ts deleted file mode 100644 index d96e636..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetTopChannelsResponse.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Channel as _grpc_channelz_v1_Channel, Channel__Output as _grpc_channelz_v1_Channel__Output } from '../../../grpc/channelz/v1/Channel'; - -export interface GetTopChannelsResponse { - /** - * list of channels that the connection detail service knows about. Sorted in - * ascending channel_id order. - * Must contain at least 1 result, otherwise 'end' must be true. - */ - 'channel'?: (_grpc_channelz_v1_Channel)[]; - /** - * If set, indicates that the list of channels is the final list. Requesting - * more channels can only return more if they are created after this RPC - * completes. - */ - 'end'?: (boolean); -} - -export interface GetTopChannelsResponse__Output { - /** - * list of channels that the connection detail service knows about. Sorted in - * ascending channel_id order. - * Must contain at least 1 result, otherwise 'end' must be true. - */ - 'channel': (_grpc_channelz_v1_Channel__Output)[]; - /** - * If set, indicates that the list of channels is the final list. Requesting - * more channels can only return more if they are created after this RPC - * completes. - */ - 'end': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Security.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Security.ts deleted file mode 100644 index 55b2594..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Security.ts +++ /dev/null @@ -1,87 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; - -export interface _grpc_channelz_v1_Security_OtherSecurity { - /** - * The human readable version of the value. - */ - 'name'?: (string); - /** - * The actual security details message. - */ - 'value'?: (_google_protobuf_Any | null); -} - -export interface _grpc_channelz_v1_Security_OtherSecurity__Output { - /** - * The human readable version of the value. - */ - 'name': (string); - /** - * The actual security details message. - */ - 'value': (_google_protobuf_Any__Output | null); -} - -export interface _grpc_channelz_v1_Security_Tls { - /** - * The cipher suite name in the RFC 4346 format: - * https://tools.ietf.org/html/rfc4346#appendix-C - */ - 'standard_name'?: (string); - /** - * Some other way to describe the cipher suite if - * the RFC 4346 name is not available. - */ - 'other_name'?: (string); - /** - * the certificate used by this endpoint. - */ - 'local_certificate'?: (Buffer | Uint8Array | string); - /** - * the certificate used by the remote endpoint. - */ - 'remote_certificate'?: (Buffer | Uint8Array | string); - 'cipher_suite'?: "standard_name"|"other_name"; -} - -export interface _grpc_channelz_v1_Security_Tls__Output { - /** - * The cipher suite name in the RFC 4346 format: - * https://tools.ietf.org/html/rfc4346#appendix-C - */ - 'standard_name'?: (string); - /** - * Some other way to describe the cipher suite if - * the RFC 4346 name is not available. - */ - 'other_name'?: (string); - /** - * the certificate used by this endpoint. - */ - 'local_certificate': (Buffer); - /** - * the certificate used by the remote endpoint. - */ - 'remote_certificate': (Buffer); - 'cipher_suite'?: "standard_name"|"other_name"; -} - -/** - * Security represents details about how secure the socket is. - */ -export interface Security { - 'tls'?: (_grpc_channelz_v1_Security_Tls | null); - 'other'?: (_grpc_channelz_v1_Security_OtherSecurity | null); - 'model'?: "tls"|"other"; -} - -/** - * Security represents details about how secure the socket is. - */ -export interface Security__Output { - 'tls'?: (_grpc_channelz_v1_Security_Tls__Output | null); - 'other'?: (_grpc_channelz_v1_Security_OtherSecurity__Output | null); - 'model'?: "tls"|"other"; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Server.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Server.ts deleted file mode 100644 index 9583433..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Server.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Original file: proto/channelz.proto - -import type { ServerRef as _grpc_channelz_v1_ServerRef, ServerRef__Output as _grpc_channelz_v1_ServerRef__Output } from '../../../grpc/channelz/v1/ServerRef'; -import type { ServerData as _grpc_channelz_v1_ServerData, ServerData__Output as _grpc_channelz_v1_ServerData__Output } from '../../../grpc/channelz/v1/ServerData'; -import type { SocketRef as _grpc_channelz_v1_SocketRef, SocketRef__Output as _grpc_channelz_v1_SocketRef__Output } from '../../../grpc/channelz/v1/SocketRef'; - -/** - * Server represents a single server. There may be multiple servers in a single - * program. - */ -export interface Server { - /** - * The identifier for a Server. This should be set. - */ - 'ref'?: (_grpc_channelz_v1_ServerRef | null); - /** - * The associated data of the Server. - */ - 'data'?: (_grpc_channelz_v1_ServerData | null); - /** - * The sockets that the server is listening on. There are no ordering - * guarantees. This may be absent. - */ - 'listen_socket'?: (_grpc_channelz_v1_SocketRef)[]; -} - -/** - * Server represents a single server. There may be multiple servers in a single - * program. - */ -export interface Server__Output { - /** - * The identifier for a Server. This should be set. - */ - 'ref': (_grpc_channelz_v1_ServerRef__Output | null); - /** - * The associated data of the Server. - */ - 'data': (_grpc_channelz_v1_ServerData__Output | null); - /** - * The sockets that the server is listening on. There are no ordering - * guarantees. This may be absent. - */ - 'listen_socket': (_grpc_channelz_v1_SocketRef__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ServerData.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ServerData.ts deleted file mode 100644 index ce48e36..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ServerData.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Original file: proto/channelz.proto - -import type { ChannelTrace as _grpc_channelz_v1_ChannelTrace, ChannelTrace__Output as _grpc_channelz_v1_ChannelTrace__Output } from '../../../grpc/channelz/v1/ChannelTrace'; -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; -import type { Long } from '@grpc/proto-loader'; - -/** - * ServerData is data for a specific Server. - */ -export interface ServerData { - /** - * A trace of recent events on the server. May be absent. - */ - 'trace'?: (_grpc_channelz_v1_ChannelTrace | null); - /** - * The number of incoming calls started on the server - */ - 'calls_started'?: (number | string | Long); - /** - * The number of incoming calls that have completed with an OK status - */ - 'calls_succeeded'?: (number | string | Long); - /** - * The number of incoming calls that have a completed with a non-OK status - */ - 'calls_failed'?: (number | string | Long); - /** - * The last time a call was started on the server. - */ - 'last_call_started_timestamp'?: (_google_protobuf_Timestamp | null); -} - -/** - * ServerData is data for a specific Server. - */ -export interface ServerData__Output { - /** - * A trace of recent events on the server. May be absent. - */ - 'trace': (_grpc_channelz_v1_ChannelTrace__Output | null); - /** - * The number of incoming calls started on the server - */ - 'calls_started': (string); - /** - * The number of incoming calls that have completed with an OK status - */ - 'calls_succeeded': (string); - /** - * The number of incoming calls that have a completed with a non-OK status - */ - 'calls_failed': (string); - /** - * The last time a call was started on the server. - */ - 'last_call_started_timestamp': (_google_protobuf_Timestamp__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ServerRef.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ServerRef.ts deleted file mode 100644 index 389183b..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ServerRef.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Long } from '@grpc/proto-loader'; - -/** - * ServerRef is a reference to a Server. - */ -export interface ServerRef { - /** - * A globally unique identifier for this server. Must be a positive number. - */ - 'server_id'?: (number | string | Long); - /** - * An optional name associated with the server. - */ - 'name'?: (string); -} - -/** - * ServerRef is a reference to a Server. - */ -export interface ServerRef__Output { - /** - * A globally unique identifier for this server. Must be a positive number. - */ - 'server_id': (string); - /** - * An optional name associated with the server. - */ - 'name': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Socket.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Socket.ts deleted file mode 100644 index 5829afe..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Socket.ts +++ /dev/null @@ -1,70 +0,0 @@ -// Original file: proto/channelz.proto - -import type { SocketRef as _grpc_channelz_v1_SocketRef, SocketRef__Output as _grpc_channelz_v1_SocketRef__Output } from '../../../grpc/channelz/v1/SocketRef'; -import type { SocketData as _grpc_channelz_v1_SocketData, SocketData__Output as _grpc_channelz_v1_SocketData__Output } from '../../../grpc/channelz/v1/SocketData'; -import type { Address as _grpc_channelz_v1_Address, Address__Output as _grpc_channelz_v1_Address__Output } from '../../../grpc/channelz/v1/Address'; -import type { Security as _grpc_channelz_v1_Security, Security__Output as _grpc_channelz_v1_Security__Output } from '../../../grpc/channelz/v1/Security'; - -/** - * Information about an actual connection. Pronounced "sock-ay". - */ -export interface Socket { - /** - * The identifier for the Socket. - */ - 'ref'?: (_grpc_channelz_v1_SocketRef | null); - /** - * Data specific to this Socket. - */ - 'data'?: (_grpc_channelz_v1_SocketData | null); - /** - * The locally bound address. - */ - 'local'?: (_grpc_channelz_v1_Address | null); - /** - * The remote bound address. May be absent. - */ - 'remote'?: (_grpc_channelz_v1_Address | null); - /** - * Security details for this socket. May be absent if not available, or - * there is no security on the socket. - */ - 'security'?: (_grpc_channelz_v1_Security | null); - /** - * Optional, represents the name of the remote endpoint, if different than - * the original target name. - */ - 'remote_name'?: (string); -} - -/** - * Information about an actual connection. Pronounced "sock-ay". - */ -export interface Socket__Output { - /** - * The identifier for the Socket. - */ - 'ref': (_grpc_channelz_v1_SocketRef__Output | null); - /** - * Data specific to this Socket. - */ - 'data': (_grpc_channelz_v1_SocketData__Output | null); - /** - * The locally bound address. - */ - 'local': (_grpc_channelz_v1_Address__Output | null); - /** - * The remote bound address. May be absent. - */ - 'remote': (_grpc_channelz_v1_Address__Output | null); - /** - * Security details for this socket. May be absent if not available, or - * there is no security on the socket. - */ - 'security': (_grpc_channelz_v1_Security__Output | null); - /** - * Optional, represents the name of the remote endpoint, if different than - * the original target name. - */ - 'remote_name': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketData.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketData.ts deleted file mode 100644 index c62d4d1..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketData.ts +++ /dev/null @@ -1,150 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; -import type { Int64Value as _google_protobuf_Int64Value, Int64Value__Output as _google_protobuf_Int64Value__Output } from '../../../google/protobuf/Int64Value'; -import type { SocketOption as _grpc_channelz_v1_SocketOption, SocketOption__Output as _grpc_channelz_v1_SocketOption__Output } from '../../../grpc/channelz/v1/SocketOption'; -import type { Long } from '@grpc/proto-loader'; - -/** - * SocketData is data associated for a specific Socket. The fields present - * are specific to the implementation, so there may be minor differences in - * the semantics. (e.g. flow control windows) - */ -export interface SocketData { - /** - * The number of streams that have been started. - */ - 'streams_started'?: (number | string | Long); - /** - * The number of streams that have ended successfully: - * On client side, received frame with eos bit set; - * On server side, sent frame with eos bit set. - */ - 'streams_succeeded'?: (number | string | Long); - /** - * The number of streams that have ended unsuccessfully: - * On client side, ended without receiving frame with eos bit set; - * On server side, ended without sending frame with eos bit set. - */ - 'streams_failed'?: (number | string | Long); - /** - * The number of grpc messages successfully sent on this socket. - */ - 'messages_sent'?: (number | string | Long); - /** - * The number of grpc messages received on this socket. - */ - 'messages_received'?: (number | string | Long); - /** - * The number of keep alives sent. This is typically implemented with HTTP/2 - * ping messages. - */ - 'keep_alives_sent'?: (number | string | Long); - /** - * The last time a stream was created by this endpoint. Usually unset for - * servers. - */ - 'last_local_stream_created_timestamp'?: (_google_protobuf_Timestamp | null); - /** - * The last time a stream was created by the remote endpoint. Usually unset - * for clients. - */ - 'last_remote_stream_created_timestamp'?: (_google_protobuf_Timestamp | null); - /** - * The last time a message was sent by this endpoint. - */ - 'last_message_sent_timestamp'?: (_google_protobuf_Timestamp | null); - /** - * The last time a message was received by this endpoint. - */ - 'last_message_received_timestamp'?: (_google_protobuf_Timestamp | null); - /** - * The amount of window, granted to the local endpoint by the remote endpoint. - * This may be slightly out of date due to network latency. This does NOT - * include stream level or TCP level flow control info. - */ - 'local_flow_control_window'?: (_google_protobuf_Int64Value | null); - /** - * The amount of window, granted to the remote endpoint by the local endpoint. - * This may be slightly out of date due to network latency. This does NOT - * include stream level or TCP level flow control info. - */ - 'remote_flow_control_window'?: (_google_protobuf_Int64Value | null); - /** - * Socket options set on this socket. May be absent if 'summary' is set - * on GetSocketRequest. - */ - 'option'?: (_grpc_channelz_v1_SocketOption)[]; -} - -/** - * SocketData is data associated for a specific Socket. The fields present - * are specific to the implementation, so there may be minor differences in - * the semantics. (e.g. flow control windows) - */ -export interface SocketData__Output { - /** - * The number of streams that have been started. - */ - 'streams_started': (string); - /** - * The number of streams that have ended successfully: - * On client side, received frame with eos bit set; - * On server side, sent frame with eos bit set. - */ - 'streams_succeeded': (string); - /** - * The number of streams that have ended unsuccessfully: - * On client side, ended without receiving frame with eos bit set; - * On server side, ended without sending frame with eos bit set. - */ - 'streams_failed': (string); - /** - * The number of grpc messages successfully sent on this socket. - */ - 'messages_sent': (string); - /** - * The number of grpc messages received on this socket. - */ - 'messages_received': (string); - /** - * The number of keep alives sent. This is typically implemented with HTTP/2 - * ping messages. - */ - 'keep_alives_sent': (string); - /** - * The last time a stream was created by this endpoint. Usually unset for - * servers. - */ - 'last_local_stream_created_timestamp': (_google_protobuf_Timestamp__Output | null); - /** - * The last time a stream was created by the remote endpoint. Usually unset - * for clients. - */ - 'last_remote_stream_created_timestamp': (_google_protobuf_Timestamp__Output | null); - /** - * The last time a message was sent by this endpoint. - */ - 'last_message_sent_timestamp': (_google_protobuf_Timestamp__Output | null); - /** - * The last time a message was received by this endpoint. - */ - 'last_message_received_timestamp': (_google_protobuf_Timestamp__Output | null); - /** - * The amount of window, granted to the local endpoint by the remote endpoint. - * This may be slightly out of date due to network latency. This does NOT - * include stream level or TCP level flow control info. - */ - 'local_flow_control_window': (_google_protobuf_Int64Value__Output | null); - /** - * The amount of window, granted to the remote endpoint by the local endpoint. - * This may be slightly out of date due to network latency. This does NOT - * include stream level or TCP level flow control info. - */ - 'remote_flow_control_window': (_google_protobuf_Int64Value__Output | null); - /** - * Socket options set on this socket. May be absent if 'summary' is set - * on GetSocketRequest. - */ - 'option': (_grpc_channelz_v1_SocketOption__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOption.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOption.ts deleted file mode 100644 index 115b36a..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOption.ts +++ /dev/null @@ -1,47 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; - -/** - * SocketOption represents socket options for a socket. Specifically, these - * are the options returned by getsockopt(). - */ -export interface SocketOption { - /** - * The full name of the socket option. Typically this will be the upper case - * name, such as "SO_REUSEPORT". - */ - 'name'?: (string); - /** - * The human readable value of this socket option. At least one of value or - * additional will be set. - */ - 'value'?: (string); - /** - * Additional data associated with the socket option. At least one of value - * or additional will be set. - */ - 'additional'?: (_google_protobuf_Any | null); -} - -/** - * SocketOption represents socket options for a socket. Specifically, these - * are the options returned by getsockopt(). - */ -export interface SocketOption__Output { - /** - * The full name of the socket option. Typically this will be the upper case - * name, such as "SO_REUSEPORT". - */ - 'name': (string); - /** - * The human readable value of this socket option. At least one of value or - * additional will be set. - */ - 'value': (string); - /** - * Additional data associated with the socket option. At least one of value - * or additional will be set. - */ - 'additional': (_google_protobuf_Any__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionLinger.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionLinger.ts deleted file mode 100644 index d83fa32..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionLinger.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../google/protobuf/Duration'; - -/** - * For use with SocketOption's additional field. This is primarily used for - * SO_LINGER. - */ -export interface SocketOptionLinger { - /** - * active maps to `struct linger.l_onoff` - */ - 'active'?: (boolean); - /** - * duration maps to `struct linger.l_linger` - */ - 'duration'?: (_google_protobuf_Duration | null); -} - -/** - * For use with SocketOption's additional field. This is primarily used for - * SO_LINGER. - */ -export interface SocketOptionLinger__Output { - /** - * active maps to `struct linger.l_onoff` - */ - 'active': (boolean); - /** - * duration maps to `struct linger.l_linger` - */ - 'duration': (_google_protobuf_Duration__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.ts deleted file mode 100644 index 2f8affe..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.ts +++ /dev/null @@ -1,74 +0,0 @@ -// Original file: proto/channelz.proto - - -/** - * For use with SocketOption's additional field. Tcp info for - * SOL_TCP and TCP_INFO. - */ -export interface SocketOptionTcpInfo { - 'tcpi_state'?: (number); - 'tcpi_ca_state'?: (number); - 'tcpi_retransmits'?: (number); - 'tcpi_probes'?: (number); - 'tcpi_backoff'?: (number); - 'tcpi_options'?: (number); - 'tcpi_snd_wscale'?: (number); - 'tcpi_rcv_wscale'?: (number); - 'tcpi_rto'?: (number); - 'tcpi_ato'?: (number); - 'tcpi_snd_mss'?: (number); - 'tcpi_rcv_mss'?: (number); - 'tcpi_unacked'?: (number); - 'tcpi_sacked'?: (number); - 'tcpi_lost'?: (number); - 'tcpi_retrans'?: (number); - 'tcpi_fackets'?: (number); - 'tcpi_last_data_sent'?: (number); - 'tcpi_last_ack_sent'?: (number); - 'tcpi_last_data_recv'?: (number); - 'tcpi_last_ack_recv'?: (number); - 'tcpi_pmtu'?: (number); - 'tcpi_rcv_ssthresh'?: (number); - 'tcpi_rtt'?: (number); - 'tcpi_rttvar'?: (number); - 'tcpi_snd_ssthresh'?: (number); - 'tcpi_snd_cwnd'?: (number); - 'tcpi_advmss'?: (number); - 'tcpi_reordering'?: (number); -} - -/** - * For use with SocketOption's additional field. Tcp info for - * SOL_TCP and TCP_INFO. - */ -export interface SocketOptionTcpInfo__Output { - 'tcpi_state': (number); - 'tcpi_ca_state': (number); - 'tcpi_retransmits': (number); - 'tcpi_probes': (number); - 'tcpi_backoff': (number); - 'tcpi_options': (number); - 'tcpi_snd_wscale': (number); - 'tcpi_rcv_wscale': (number); - 'tcpi_rto': (number); - 'tcpi_ato': (number); - 'tcpi_snd_mss': (number); - 'tcpi_rcv_mss': (number); - 'tcpi_unacked': (number); - 'tcpi_sacked': (number); - 'tcpi_lost': (number); - 'tcpi_retrans': (number); - 'tcpi_fackets': (number); - 'tcpi_last_data_sent': (number); - 'tcpi_last_ack_sent': (number); - 'tcpi_last_data_recv': (number); - 'tcpi_last_ack_recv': (number); - 'tcpi_pmtu': (number); - 'tcpi_rcv_ssthresh': (number); - 'tcpi_rtt': (number); - 'tcpi_rttvar': (number); - 'tcpi_snd_ssthresh': (number); - 'tcpi_snd_cwnd': (number); - 'tcpi_advmss': (number); - 'tcpi_reordering': (number); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionTimeout.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionTimeout.ts deleted file mode 100644 index 185839b..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionTimeout.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../google/protobuf/Duration'; - -/** - * For use with SocketOption's additional field. This is primarily used for - * SO_RCVTIMEO and SO_SNDTIMEO - */ -export interface SocketOptionTimeout { - 'duration'?: (_google_protobuf_Duration | null); -} - -/** - * For use with SocketOption's additional field. This is primarily used for - * SO_RCVTIMEO and SO_SNDTIMEO - */ -export interface SocketOptionTimeout__Output { - 'duration': (_google_protobuf_Duration__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketRef.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketRef.ts deleted file mode 100644 index 52fdb2b..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketRef.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Long } from '@grpc/proto-loader'; - -/** - * SocketRef is a reference to a Socket. - */ -export interface SocketRef { - /** - * The globally unique id for this socket. Must be a positive number. - */ - 'socket_id'?: (number | string | Long); - /** - * An optional name associated with the socket. - */ - 'name'?: (string); -} - -/** - * SocketRef is a reference to a Socket. - */ -export interface SocketRef__Output { - /** - * The globally unique id for this socket. Must be a positive number. - */ - 'socket_id': (string); - /** - * An optional name associated with the socket. - */ - 'name': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Subchannel.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Subchannel.ts deleted file mode 100644 index 7122fac..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Subchannel.ts +++ /dev/null @@ -1,70 +0,0 @@ -// Original file: proto/channelz.proto - -import type { SubchannelRef as _grpc_channelz_v1_SubchannelRef, SubchannelRef__Output as _grpc_channelz_v1_SubchannelRef__Output } from '../../../grpc/channelz/v1/SubchannelRef'; -import type { ChannelData as _grpc_channelz_v1_ChannelData, ChannelData__Output as _grpc_channelz_v1_ChannelData__Output } from '../../../grpc/channelz/v1/ChannelData'; -import type { ChannelRef as _grpc_channelz_v1_ChannelRef, ChannelRef__Output as _grpc_channelz_v1_ChannelRef__Output } from '../../../grpc/channelz/v1/ChannelRef'; -import type { SocketRef as _grpc_channelz_v1_SocketRef, SocketRef__Output as _grpc_channelz_v1_SocketRef__Output } from '../../../grpc/channelz/v1/SocketRef'; - -/** - * Subchannel is a logical grouping of channels, subchannels, and sockets. - * A subchannel is load balanced over by it's ancestor - */ -export interface Subchannel { - /** - * The identifier for this channel. - */ - 'ref'?: (_grpc_channelz_v1_SubchannelRef | null); - /** - * Data specific to this channel. - */ - 'data'?: (_grpc_channelz_v1_ChannelData | null); - /** - * There are no ordering guarantees on the order of channel refs. - * There may not be cycles in the ref graph. - * A channel ref may be present in more than one channel or subchannel. - */ - 'channel_ref'?: (_grpc_channelz_v1_ChannelRef)[]; - /** - * At most one of 'channel_ref+subchannel_ref' and 'socket' is set. - * There are no ordering guarantees on the order of subchannel refs. - * There may not be cycles in the ref graph. - * A sub channel ref may be present in more than one channel or subchannel. - */ - 'subchannel_ref'?: (_grpc_channelz_v1_SubchannelRef)[]; - /** - * There are no ordering guarantees on the order of sockets. - */ - 'socket_ref'?: (_grpc_channelz_v1_SocketRef)[]; -} - -/** - * Subchannel is a logical grouping of channels, subchannels, and sockets. - * A subchannel is load balanced over by it's ancestor - */ -export interface Subchannel__Output { - /** - * The identifier for this channel. - */ - 'ref': (_grpc_channelz_v1_SubchannelRef__Output | null); - /** - * Data specific to this channel. - */ - 'data': (_grpc_channelz_v1_ChannelData__Output | null); - /** - * There are no ordering guarantees on the order of channel refs. - * There may not be cycles in the ref graph. - * A channel ref may be present in more than one channel or subchannel. - */ - 'channel_ref': (_grpc_channelz_v1_ChannelRef__Output)[]; - /** - * At most one of 'channel_ref+subchannel_ref' and 'socket' is set. - * There are no ordering guarantees on the order of subchannel refs. - * There may not be cycles in the ref graph. - * A sub channel ref may be present in more than one channel or subchannel. - */ - 'subchannel_ref': (_grpc_channelz_v1_SubchannelRef__Output)[]; - /** - * There are no ordering guarantees on the order of sockets. - */ - 'socket_ref': (_grpc_channelz_v1_SocketRef__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SubchannelRef.ts b/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SubchannelRef.ts deleted file mode 100644 index b6911c7..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SubchannelRef.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Original file: proto/channelz.proto - -import type { Long } from '@grpc/proto-loader'; - -/** - * SubchannelRef is a reference to a Subchannel. - */ -export interface SubchannelRef { - /** - * The globally unique id for this subchannel. Must be a positive number. - */ - 'subchannel_id'?: (number | string | Long); - /** - * An optional name associated with the subchannel. - */ - 'name'?: (string); -} - -/** - * SubchannelRef is a reference to a Subchannel. - */ -export interface SubchannelRef__Output { - /** - * The globally unique id for this subchannel. Must be a positive number. - */ - 'subchannel_id': (string); - /** - * An optional name associated with the subchannel. - */ - 'name': (string); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/orca.ts b/node_modules/@grpc/grpc-js/src/generated/orca.ts deleted file mode 100644 index d57dc75..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/orca.ts +++ /dev/null @@ -1,146 +0,0 @@ -import type * as grpc from '../index'; -import type { EnumTypeDefinition, MessageTypeDefinition } from '@grpc/proto-loader'; - -import type { DescriptorProto as _google_protobuf_DescriptorProto, DescriptorProto__Output as _google_protobuf_DescriptorProto__Output } from './google/protobuf/DescriptorProto'; -import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from './google/protobuf/Duration'; -import type { EnumDescriptorProto as _google_protobuf_EnumDescriptorProto, EnumDescriptorProto__Output as _google_protobuf_EnumDescriptorProto__Output } from './google/protobuf/EnumDescriptorProto'; -import type { EnumOptions as _google_protobuf_EnumOptions, EnumOptions__Output as _google_protobuf_EnumOptions__Output } from './google/protobuf/EnumOptions'; -import type { EnumValueDescriptorProto as _google_protobuf_EnumValueDescriptorProto, EnumValueDescriptorProto__Output as _google_protobuf_EnumValueDescriptorProto__Output } from './google/protobuf/EnumValueDescriptorProto'; -import type { EnumValueOptions as _google_protobuf_EnumValueOptions, EnumValueOptions__Output as _google_protobuf_EnumValueOptions__Output } from './google/protobuf/EnumValueOptions'; -import type { ExtensionRangeOptions as _google_protobuf_ExtensionRangeOptions, ExtensionRangeOptions__Output as _google_protobuf_ExtensionRangeOptions__Output } from './google/protobuf/ExtensionRangeOptions'; -import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from './google/protobuf/FeatureSet'; -import type { FeatureSetDefaults as _google_protobuf_FeatureSetDefaults, FeatureSetDefaults__Output as _google_protobuf_FeatureSetDefaults__Output } from './google/protobuf/FeatureSetDefaults'; -import type { FieldDescriptorProto as _google_protobuf_FieldDescriptorProto, FieldDescriptorProto__Output as _google_protobuf_FieldDescriptorProto__Output } from './google/protobuf/FieldDescriptorProto'; -import type { FieldOptions as _google_protobuf_FieldOptions, FieldOptions__Output as _google_protobuf_FieldOptions__Output } from './google/protobuf/FieldOptions'; -import type { FileDescriptorProto as _google_protobuf_FileDescriptorProto, FileDescriptorProto__Output as _google_protobuf_FileDescriptorProto__Output } from './google/protobuf/FileDescriptorProto'; -import type { FileDescriptorSet as _google_protobuf_FileDescriptorSet, FileDescriptorSet__Output as _google_protobuf_FileDescriptorSet__Output } from './google/protobuf/FileDescriptorSet'; -import type { FileOptions as _google_protobuf_FileOptions, FileOptions__Output as _google_protobuf_FileOptions__Output } from './google/protobuf/FileOptions'; -import type { GeneratedCodeInfo as _google_protobuf_GeneratedCodeInfo, GeneratedCodeInfo__Output as _google_protobuf_GeneratedCodeInfo__Output } from './google/protobuf/GeneratedCodeInfo'; -import type { MessageOptions as _google_protobuf_MessageOptions, MessageOptions__Output as _google_protobuf_MessageOptions__Output } from './google/protobuf/MessageOptions'; -import type { MethodDescriptorProto as _google_protobuf_MethodDescriptorProto, MethodDescriptorProto__Output as _google_protobuf_MethodDescriptorProto__Output } from './google/protobuf/MethodDescriptorProto'; -import type { MethodOptions as _google_protobuf_MethodOptions, MethodOptions__Output as _google_protobuf_MethodOptions__Output } from './google/protobuf/MethodOptions'; -import type { OneofDescriptorProto as _google_protobuf_OneofDescriptorProto, OneofDescriptorProto__Output as _google_protobuf_OneofDescriptorProto__Output } from './google/protobuf/OneofDescriptorProto'; -import type { OneofOptions as _google_protobuf_OneofOptions, OneofOptions__Output as _google_protobuf_OneofOptions__Output } from './google/protobuf/OneofOptions'; -import type { ServiceDescriptorProto as _google_protobuf_ServiceDescriptorProto, ServiceDescriptorProto__Output as _google_protobuf_ServiceDescriptorProto__Output } from './google/protobuf/ServiceDescriptorProto'; -import type { ServiceOptions as _google_protobuf_ServiceOptions, ServiceOptions__Output as _google_protobuf_ServiceOptions__Output } from './google/protobuf/ServiceOptions'; -import type { SourceCodeInfo as _google_protobuf_SourceCodeInfo, SourceCodeInfo__Output as _google_protobuf_SourceCodeInfo__Output } from './google/protobuf/SourceCodeInfo'; -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from './google/protobuf/Timestamp'; -import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from './google/protobuf/UninterpretedOption'; -import type { AnyRules as _validate_AnyRules, AnyRules__Output as _validate_AnyRules__Output } from './validate/AnyRules'; -import type { BoolRules as _validate_BoolRules, BoolRules__Output as _validate_BoolRules__Output } from './validate/BoolRules'; -import type { BytesRules as _validate_BytesRules, BytesRules__Output as _validate_BytesRules__Output } from './validate/BytesRules'; -import type { DoubleRules as _validate_DoubleRules, DoubleRules__Output as _validate_DoubleRules__Output } from './validate/DoubleRules'; -import type { DurationRules as _validate_DurationRules, DurationRules__Output as _validate_DurationRules__Output } from './validate/DurationRules'; -import type { EnumRules as _validate_EnumRules, EnumRules__Output as _validate_EnumRules__Output } from './validate/EnumRules'; -import type { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from './validate/FieldRules'; -import type { Fixed32Rules as _validate_Fixed32Rules, Fixed32Rules__Output as _validate_Fixed32Rules__Output } from './validate/Fixed32Rules'; -import type { Fixed64Rules as _validate_Fixed64Rules, Fixed64Rules__Output as _validate_Fixed64Rules__Output } from './validate/Fixed64Rules'; -import type { FloatRules as _validate_FloatRules, FloatRules__Output as _validate_FloatRules__Output } from './validate/FloatRules'; -import type { Int32Rules as _validate_Int32Rules, Int32Rules__Output as _validate_Int32Rules__Output } from './validate/Int32Rules'; -import type { Int64Rules as _validate_Int64Rules, Int64Rules__Output as _validate_Int64Rules__Output } from './validate/Int64Rules'; -import type { MapRules as _validate_MapRules, MapRules__Output as _validate_MapRules__Output } from './validate/MapRules'; -import type { MessageRules as _validate_MessageRules, MessageRules__Output as _validate_MessageRules__Output } from './validate/MessageRules'; -import type { RepeatedRules as _validate_RepeatedRules, RepeatedRules__Output as _validate_RepeatedRules__Output } from './validate/RepeatedRules'; -import type { SFixed32Rules as _validate_SFixed32Rules, SFixed32Rules__Output as _validate_SFixed32Rules__Output } from './validate/SFixed32Rules'; -import type { SFixed64Rules as _validate_SFixed64Rules, SFixed64Rules__Output as _validate_SFixed64Rules__Output } from './validate/SFixed64Rules'; -import type { SInt32Rules as _validate_SInt32Rules, SInt32Rules__Output as _validate_SInt32Rules__Output } from './validate/SInt32Rules'; -import type { SInt64Rules as _validate_SInt64Rules, SInt64Rules__Output as _validate_SInt64Rules__Output } from './validate/SInt64Rules'; -import type { StringRules as _validate_StringRules, StringRules__Output as _validate_StringRules__Output } from './validate/StringRules'; -import type { TimestampRules as _validate_TimestampRules, TimestampRules__Output as _validate_TimestampRules__Output } from './validate/TimestampRules'; -import type { UInt32Rules as _validate_UInt32Rules, UInt32Rules__Output as _validate_UInt32Rules__Output } from './validate/UInt32Rules'; -import type { UInt64Rules as _validate_UInt64Rules, UInt64Rules__Output as _validate_UInt64Rules__Output } from './validate/UInt64Rules'; -import type { OrcaLoadReport as _xds_data_orca_v3_OrcaLoadReport, OrcaLoadReport__Output as _xds_data_orca_v3_OrcaLoadReport__Output } from './xds/data/orca/v3/OrcaLoadReport'; -import type { OpenRcaServiceClient as _xds_service_orca_v3_OpenRcaServiceClient, OpenRcaServiceDefinition as _xds_service_orca_v3_OpenRcaServiceDefinition } from './xds/service/orca/v3/OpenRcaService'; -import type { OrcaLoadReportRequest as _xds_service_orca_v3_OrcaLoadReportRequest, OrcaLoadReportRequest__Output as _xds_service_orca_v3_OrcaLoadReportRequest__Output } from './xds/service/orca/v3/OrcaLoadReportRequest'; - -type SubtypeConstructor any, Subtype> = { - new(...args: ConstructorParameters): Subtype; -}; - -export interface ProtoGrpcType { - google: { - protobuf: { - DescriptorProto: MessageTypeDefinition<_google_protobuf_DescriptorProto, _google_protobuf_DescriptorProto__Output> - Duration: MessageTypeDefinition<_google_protobuf_Duration, _google_protobuf_Duration__Output> - Edition: EnumTypeDefinition - EnumDescriptorProto: MessageTypeDefinition<_google_protobuf_EnumDescriptorProto, _google_protobuf_EnumDescriptorProto__Output> - EnumOptions: MessageTypeDefinition<_google_protobuf_EnumOptions, _google_protobuf_EnumOptions__Output> - EnumValueDescriptorProto: MessageTypeDefinition<_google_protobuf_EnumValueDescriptorProto, _google_protobuf_EnumValueDescriptorProto__Output> - EnumValueOptions: MessageTypeDefinition<_google_protobuf_EnumValueOptions, _google_protobuf_EnumValueOptions__Output> - ExtensionRangeOptions: MessageTypeDefinition<_google_protobuf_ExtensionRangeOptions, _google_protobuf_ExtensionRangeOptions__Output> - FeatureSet: MessageTypeDefinition<_google_protobuf_FeatureSet, _google_protobuf_FeatureSet__Output> - FeatureSetDefaults: MessageTypeDefinition<_google_protobuf_FeatureSetDefaults, _google_protobuf_FeatureSetDefaults__Output> - FieldDescriptorProto: MessageTypeDefinition<_google_protobuf_FieldDescriptorProto, _google_protobuf_FieldDescriptorProto__Output> - FieldOptions: MessageTypeDefinition<_google_protobuf_FieldOptions, _google_protobuf_FieldOptions__Output> - FileDescriptorProto: MessageTypeDefinition<_google_protobuf_FileDescriptorProto, _google_protobuf_FileDescriptorProto__Output> - FileDescriptorSet: MessageTypeDefinition<_google_protobuf_FileDescriptorSet, _google_protobuf_FileDescriptorSet__Output> - FileOptions: MessageTypeDefinition<_google_protobuf_FileOptions, _google_protobuf_FileOptions__Output> - GeneratedCodeInfo: MessageTypeDefinition<_google_protobuf_GeneratedCodeInfo, _google_protobuf_GeneratedCodeInfo__Output> - MessageOptions: MessageTypeDefinition<_google_protobuf_MessageOptions, _google_protobuf_MessageOptions__Output> - MethodDescriptorProto: MessageTypeDefinition<_google_protobuf_MethodDescriptorProto, _google_protobuf_MethodDescriptorProto__Output> - MethodOptions: MessageTypeDefinition<_google_protobuf_MethodOptions, _google_protobuf_MethodOptions__Output> - OneofDescriptorProto: MessageTypeDefinition<_google_protobuf_OneofDescriptorProto, _google_protobuf_OneofDescriptorProto__Output> - OneofOptions: MessageTypeDefinition<_google_protobuf_OneofOptions, _google_protobuf_OneofOptions__Output> - ServiceDescriptorProto: MessageTypeDefinition<_google_protobuf_ServiceDescriptorProto, _google_protobuf_ServiceDescriptorProto__Output> - ServiceOptions: MessageTypeDefinition<_google_protobuf_ServiceOptions, _google_protobuf_ServiceOptions__Output> - SourceCodeInfo: MessageTypeDefinition<_google_protobuf_SourceCodeInfo, _google_protobuf_SourceCodeInfo__Output> - SymbolVisibility: EnumTypeDefinition - Timestamp: MessageTypeDefinition<_google_protobuf_Timestamp, _google_protobuf_Timestamp__Output> - UninterpretedOption: MessageTypeDefinition<_google_protobuf_UninterpretedOption, _google_protobuf_UninterpretedOption__Output> - } - } - validate: { - AnyRules: MessageTypeDefinition<_validate_AnyRules, _validate_AnyRules__Output> - BoolRules: MessageTypeDefinition<_validate_BoolRules, _validate_BoolRules__Output> - BytesRules: MessageTypeDefinition<_validate_BytesRules, _validate_BytesRules__Output> - DoubleRules: MessageTypeDefinition<_validate_DoubleRules, _validate_DoubleRules__Output> - DurationRules: MessageTypeDefinition<_validate_DurationRules, _validate_DurationRules__Output> - EnumRules: MessageTypeDefinition<_validate_EnumRules, _validate_EnumRules__Output> - FieldRules: MessageTypeDefinition<_validate_FieldRules, _validate_FieldRules__Output> - Fixed32Rules: MessageTypeDefinition<_validate_Fixed32Rules, _validate_Fixed32Rules__Output> - Fixed64Rules: MessageTypeDefinition<_validate_Fixed64Rules, _validate_Fixed64Rules__Output> - FloatRules: MessageTypeDefinition<_validate_FloatRules, _validate_FloatRules__Output> - Int32Rules: MessageTypeDefinition<_validate_Int32Rules, _validate_Int32Rules__Output> - Int64Rules: MessageTypeDefinition<_validate_Int64Rules, _validate_Int64Rules__Output> - KnownRegex: EnumTypeDefinition - MapRules: MessageTypeDefinition<_validate_MapRules, _validate_MapRules__Output> - MessageRules: MessageTypeDefinition<_validate_MessageRules, _validate_MessageRules__Output> - RepeatedRules: MessageTypeDefinition<_validate_RepeatedRules, _validate_RepeatedRules__Output> - SFixed32Rules: MessageTypeDefinition<_validate_SFixed32Rules, _validate_SFixed32Rules__Output> - SFixed64Rules: MessageTypeDefinition<_validate_SFixed64Rules, _validate_SFixed64Rules__Output> - SInt32Rules: MessageTypeDefinition<_validate_SInt32Rules, _validate_SInt32Rules__Output> - SInt64Rules: MessageTypeDefinition<_validate_SInt64Rules, _validate_SInt64Rules__Output> - StringRules: MessageTypeDefinition<_validate_StringRules, _validate_StringRules__Output> - TimestampRules: MessageTypeDefinition<_validate_TimestampRules, _validate_TimestampRules__Output> - UInt32Rules: MessageTypeDefinition<_validate_UInt32Rules, _validate_UInt32Rules__Output> - UInt64Rules: MessageTypeDefinition<_validate_UInt64Rules, _validate_UInt64Rules__Output> - } - xds: { - data: { - orca: { - v3: { - OrcaLoadReport: MessageTypeDefinition<_xds_data_orca_v3_OrcaLoadReport, _xds_data_orca_v3_OrcaLoadReport__Output> - } - } - } - service: { - orca: { - v3: { - /** - * Out-of-band (OOB) load reporting service for the additional load reporting - * agent that does not sit in the request path. Reports are periodically sampled - * with sufficient frequency to provide temporal association with requests. - * OOB reporting compensates the limitation of in-band reporting in revealing - * costs for backends that do not provide a steady stream of telemetry such as - * long running stream operations and zero QPS services. This is a server - * streaming service, client needs to terminate current RPC and initiate - * a new call to change backend reporting frequency. - */ - OpenRcaService: SubtypeConstructor & { service: _xds_service_orca_v3_OpenRcaServiceDefinition } - OrcaLoadReportRequest: MessageTypeDefinition<_xds_service_orca_v3_OrcaLoadReportRequest, _xds_service_orca_v3_OrcaLoadReportRequest__Output> - } - } - } - } -} - diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/AnyRules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/AnyRules.ts deleted file mode 100644 index f7b34d8..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/AnyRules.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - - -/** - * AnyRules describe constraints applied exclusively to the - * `google.protobuf.Any` well-known type - */ -export interface AnyRules { - /** - * Required specifies that this field must be set - */ - 'required'?: (boolean); - /** - * In specifies that this field's `type_url` must be equal to one of the - * specified values. - */ - 'in'?: (string)[]; - /** - * NotIn specifies that this field's `type_url` must not be equal to any of - * the specified values. - */ - 'not_in'?: (string)[]; -} - -/** - * AnyRules describe constraints applied exclusively to the - * `google.protobuf.Any` well-known type - */ -export interface AnyRules__Output { - /** - * Required specifies that this field must be set - */ - 'required': (boolean); - /** - * In specifies that this field's `type_url` must be equal to one of the - * specified values. - */ - 'in': (string)[]; - /** - * NotIn specifies that this field's `type_url` must not be equal to any of - * the specified values. - */ - 'not_in': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/BoolRules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/BoolRules.ts deleted file mode 100644 index 2174f4a..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/BoolRules.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - - -/** - * BoolRules describes the constraints applied to `bool` values - */ -export interface BoolRules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (boolean); -} - -/** - * BoolRules describes the constraints applied to `bool` values - */ -export interface BoolRules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/BytesRules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/BytesRules.ts deleted file mode 100644 index ebfabd3..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/BytesRules.ts +++ /dev/null @@ -1,153 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - -import type { Long } from '@grpc/proto-loader'; - -/** - * BytesRules describe the constraints applied to `bytes` values - */ -export interface BytesRules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (Buffer | Uint8Array | string); - /** - * MinLen specifies that this field must be the specified number of bytes - * at a minimum - */ - 'min_len'?: (number | string | Long); - /** - * MaxLen specifies that this field must be the specified number of bytes - * at a maximum - */ - 'max_len'?: (number | string | Long); - /** - * Pattern specifes that this field must match against the specified - * regular expression (RE2 syntax). The included expression should elide - * any delimiters. - */ - 'pattern'?: (string); - /** - * Prefix specifies that this field must have the specified bytes at the - * beginning of the string. - */ - 'prefix'?: (Buffer | Uint8Array | string); - /** - * Suffix specifies that this field must have the specified bytes at the - * end of the string. - */ - 'suffix'?: (Buffer | Uint8Array | string); - /** - * Contains specifies that this field must have the specified bytes - * anywhere in the string. - */ - 'contains'?: (Buffer | Uint8Array | string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (Buffer | Uint8Array | string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (Buffer | Uint8Array | string)[]; - /** - * Ip specifies that the field must be a valid IP (v4 or v6) address in - * byte format - */ - 'ip'?: (boolean); - /** - * Ipv4 specifies that the field must be a valid IPv4 address in byte - * format - */ - 'ipv4'?: (boolean); - /** - * Ipv6 specifies that the field must be a valid IPv6 address in byte - * format - */ - 'ipv6'?: (boolean); - /** - * Len specifies that this field must be the specified number of bytes - */ - 'len'?: (number | string | Long); - /** - * WellKnown rules provide advanced constraints against common byte - * patterns - */ - 'well_known'?: "ip"|"ipv4"|"ipv6"; -} - -/** - * BytesRules describe the constraints applied to `bytes` values - */ -export interface BytesRules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (Buffer); - /** - * MinLen specifies that this field must be the specified number of bytes - * at a minimum - */ - 'min_len': (string); - /** - * MaxLen specifies that this field must be the specified number of bytes - * at a maximum - */ - 'max_len': (string); - /** - * Pattern specifes that this field must match against the specified - * regular expression (RE2 syntax). The included expression should elide - * any delimiters. - */ - 'pattern': (string); - /** - * Prefix specifies that this field must have the specified bytes at the - * beginning of the string. - */ - 'prefix': (Buffer); - /** - * Suffix specifies that this field must have the specified bytes at the - * end of the string. - */ - 'suffix': (Buffer); - /** - * Contains specifies that this field must have the specified bytes - * anywhere in the string. - */ - 'contains': (Buffer); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (Buffer)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (Buffer)[]; - /** - * Ip specifies that the field must be a valid IP (v4 or v6) address in - * byte format - */ - 'ip'?: (boolean); - /** - * Ipv4 specifies that the field must be a valid IPv4 address in byte - * format - */ - 'ipv4'?: (boolean); - /** - * Ipv6 specifies that the field must be a valid IPv6 address in byte - * format - */ - 'ipv6'?: (boolean); - /** - * Len specifies that this field must be the specified number of bytes - */ - 'len': (string); - /** - * WellKnown rules provide advanced constraints against common byte - * patterns - */ - 'well_known'?: "ip"|"ipv4"|"ipv6"; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/DoubleRules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/DoubleRules.ts deleted file mode 100644 index fbf4181..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/DoubleRules.ts +++ /dev/null @@ -1,86 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - - -/** - * DoubleRules describes the constraints applied to `double` values - */ -export interface DoubleRules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number | string); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number | string); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number | string); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number | string); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number | string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number | string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number | string)[]; -} - -/** - * DoubleRules describes the constraints applied to `double` values - */ -export interface DoubleRules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/DurationRules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/DurationRules.ts deleted file mode 100644 index c73d71d..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/DurationRules.ts +++ /dev/null @@ -1,93 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - -import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../google/protobuf/Duration'; - -/** - * DurationRules describe the constraints applied exclusively to the - * `google.protobuf.Duration` well-known type - */ -export interface DurationRules { - /** - * Required specifies that this field must be set - */ - 'required'?: (boolean); - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (_google_protobuf_Duration | null); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (_google_protobuf_Duration | null); - /** - * Lt specifies that this field must be less than the specified value, - * inclusive - */ - 'lte'?: (_google_protobuf_Duration | null); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive - */ - 'gt'?: (_google_protobuf_Duration | null); - /** - * Gte specifies that this field must be greater than the specified value, - * inclusive - */ - 'gte'?: (_google_protobuf_Duration | null); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (_google_protobuf_Duration)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (_google_protobuf_Duration)[]; -} - -/** - * DurationRules describe the constraints applied exclusively to the - * `google.protobuf.Duration` well-known type - */ -export interface DurationRules__Output { - /** - * Required specifies that this field must be set - */ - 'required': (boolean); - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (_google_protobuf_Duration__Output | null); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (_google_protobuf_Duration__Output | null); - /** - * Lt specifies that this field must be less than the specified value, - * inclusive - */ - 'lte': (_google_protobuf_Duration__Output | null); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive - */ - 'gt': (_google_protobuf_Duration__Output | null); - /** - * Gte specifies that this field must be greater than the specified value, - * inclusive - */ - 'gte': (_google_protobuf_Duration__Output | null); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (_google_protobuf_Duration__Output)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (_google_protobuf_Duration__Output)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/EnumRules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/EnumRules.ts deleted file mode 100644 index 9d996c7..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/EnumRules.ts +++ /dev/null @@ -1,52 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - - -/** - * EnumRules describe the constraints applied to enum values - */ -export interface EnumRules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number); - /** - * DefinedOnly specifies that this field must be only one of the defined - * values for this enum, failing on any undefined value. - */ - 'defined_only'?: (boolean); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number)[]; -} - -/** - * EnumRules describe the constraints applied to enum values - */ -export interface EnumRules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * DefinedOnly specifies that this field must be only one of the defined - * values for this enum, failing on any undefined value. - */ - 'defined_only': (boolean); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/FieldRules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/FieldRules.ts deleted file mode 100644 index c1ab3c8..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/FieldRules.ts +++ /dev/null @@ -1,102 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - -import type { FloatRules as _validate_FloatRules, FloatRules__Output as _validate_FloatRules__Output } from '../validate/FloatRules'; -import type { DoubleRules as _validate_DoubleRules, DoubleRules__Output as _validate_DoubleRules__Output } from '../validate/DoubleRules'; -import type { Int32Rules as _validate_Int32Rules, Int32Rules__Output as _validate_Int32Rules__Output } from '../validate/Int32Rules'; -import type { Int64Rules as _validate_Int64Rules, Int64Rules__Output as _validate_Int64Rules__Output } from '../validate/Int64Rules'; -import type { UInt32Rules as _validate_UInt32Rules, UInt32Rules__Output as _validate_UInt32Rules__Output } from '../validate/UInt32Rules'; -import type { UInt64Rules as _validate_UInt64Rules, UInt64Rules__Output as _validate_UInt64Rules__Output } from '../validate/UInt64Rules'; -import type { SInt32Rules as _validate_SInt32Rules, SInt32Rules__Output as _validate_SInt32Rules__Output } from '../validate/SInt32Rules'; -import type { SInt64Rules as _validate_SInt64Rules, SInt64Rules__Output as _validate_SInt64Rules__Output } from '../validate/SInt64Rules'; -import type { Fixed32Rules as _validate_Fixed32Rules, Fixed32Rules__Output as _validate_Fixed32Rules__Output } from '../validate/Fixed32Rules'; -import type { Fixed64Rules as _validate_Fixed64Rules, Fixed64Rules__Output as _validate_Fixed64Rules__Output } from '../validate/Fixed64Rules'; -import type { SFixed32Rules as _validate_SFixed32Rules, SFixed32Rules__Output as _validate_SFixed32Rules__Output } from '../validate/SFixed32Rules'; -import type { SFixed64Rules as _validate_SFixed64Rules, SFixed64Rules__Output as _validate_SFixed64Rules__Output } from '../validate/SFixed64Rules'; -import type { BoolRules as _validate_BoolRules, BoolRules__Output as _validate_BoolRules__Output } from '../validate/BoolRules'; -import type { StringRules as _validate_StringRules, StringRules__Output as _validate_StringRules__Output } from '../validate/StringRules'; -import type { BytesRules as _validate_BytesRules, BytesRules__Output as _validate_BytesRules__Output } from '../validate/BytesRules'; -import type { EnumRules as _validate_EnumRules, EnumRules__Output as _validate_EnumRules__Output } from '../validate/EnumRules'; -import type { MessageRules as _validate_MessageRules, MessageRules__Output as _validate_MessageRules__Output } from '../validate/MessageRules'; -import type { RepeatedRules as _validate_RepeatedRules, RepeatedRules__Output as _validate_RepeatedRules__Output } from '../validate/RepeatedRules'; -import type { MapRules as _validate_MapRules, MapRules__Output as _validate_MapRules__Output } from '../validate/MapRules'; -import type { AnyRules as _validate_AnyRules, AnyRules__Output as _validate_AnyRules__Output } from '../validate/AnyRules'; -import type { DurationRules as _validate_DurationRules, DurationRules__Output as _validate_DurationRules__Output } from '../validate/DurationRules'; -import type { TimestampRules as _validate_TimestampRules, TimestampRules__Output as _validate_TimestampRules__Output } from '../validate/TimestampRules'; - -/** - * FieldRules encapsulates the rules for each type of field. Depending on the - * field, the correct set should be used to ensure proper validations. - */ -export interface FieldRules { - /** - * Scalar Field Types - */ - 'float'?: (_validate_FloatRules | null); - 'double'?: (_validate_DoubleRules | null); - 'int32'?: (_validate_Int32Rules | null); - 'int64'?: (_validate_Int64Rules | null); - 'uint32'?: (_validate_UInt32Rules | null); - 'uint64'?: (_validate_UInt64Rules | null); - 'sint32'?: (_validate_SInt32Rules | null); - 'sint64'?: (_validate_SInt64Rules | null); - 'fixed32'?: (_validate_Fixed32Rules | null); - 'fixed64'?: (_validate_Fixed64Rules | null); - 'sfixed32'?: (_validate_SFixed32Rules | null); - 'sfixed64'?: (_validate_SFixed64Rules | null); - 'bool'?: (_validate_BoolRules | null); - 'string'?: (_validate_StringRules | null); - 'bytes'?: (_validate_BytesRules | null); - /** - * Complex Field Types - */ - 'enum'?: (_validate_EnumRules | null); - 'message'?: (_validate_MessageRules | null); - 'repeated'?: (_validate_RepeatedRules | null); - 'map'?: (_validate_MapRules | null); - /** - * Well-Known Field Types - */ - 'any'?: (_validate_AnyRules | null); - 'duration'?: (_validate_DurationRules | null); - 'timestamp'?: (_validate_TimestampRules | null); - 'type'?: "float"|"double"|"int32"|"int64"|"uint32"|"uint64"|"sint32"|"sint64"|"fixed32"|"fixed64"|"sfixed32"|"sfixed64"|"bool"|"string"|"bytes"|"enum"|"repeated"|"map"|"any"|"duration"|"timestamp"; -} - -/** - * FieldRules encapsulates the rules for each type of field. Depending on the - * field, the correct set should be used to ensure proper validations. - */ -export interface FieldRules__Output { - /** - * Scalar Field Types - */ - 'float'?: (_validate_FloatRules__Output | null); - 'double'?: (_validate_DoubleRules__Output | null); - 'int32'?: (_validate_Int32Rules__Output | null); - 'int64'?: (_validate_Int64Rules__Output | null); - 'uint32'?: (_validate_UInt32Rules__Output | null); - 'uint64'?: (_validate_UInt64Rules__Output | null); - 'sint32'?: (_validate_SInt32Rules__Output | null); - 'sint64'?: (_validate_SInt64Rules__Output | null); - 'fixed32'?: (_validate_Fixed32Rules__Output | null); - 'fixed64'?: (_validate_Fixed64Rules__Output | null); - 'sfixed32'?: (_validate_SFixed32Rules__Output | null); - 'sfixed64'?: (_validate_SFixed64Rules__Output | null); - 'bool'?: (_validate_BoolRules__Output | null); - 'string'?: (_validate_StringRules__Output | null); - 'bytes'?: (_validate_BytesRules__Output | null); - /** - * Complex Field Types - */ - 'enum'?: (_validate_EnumRules__Output | null); - 'message': (_validate_MessageRules__Output | null); - 'repeated'?: (_validate_RepeatedRules__Output | null); - 'map'?: (_validate_MapRules__Output | null); - /** - * Well-Known Field Types - */ - 'any'?: (_validate_AnyRules__Output | null); - 'duration'?: (_validate_DurationRules__Output | null); - 'timestamp'?: (_validate_TimestampRules__Output | null); - 'type'?: "float"|"double"|"int32"|"int64"|"uint32"|"uint64"|"sint32"|"sint64"|"fixed32"|"fixed64"|"sfixed32"|"sfixed64"|"bool"|"string"|"bytes"|"enum"|"repeated"|"map"|"any"|"duration"|"timestamp"; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/Fixed32Rules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/Fixed32Rules.ts deleted file mode 100644 index 070e6cf..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/Fixed32Rules.ts +++ /dev/null @@ -1,86 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - - -/** - * Fixed32Rules describes the constraints applied to `fixed32` values - */ -export interface Fixed32Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number)[]; -} - -/** - * Fixed32Rules describes the constraints applied to `fixed32` values - */ -export interface Fixed32Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/Fixed64Rules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/Fixed64Rules.ts deleted file mode 100644 index 43717ab..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/Fixed64Rules.ts +++ /dev/null @@ -1,87 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - -import type { Long } from '@grpc/proto-loader'; - -/** - * Fixed64Rules describes the constraints applied to `fixed64` values - */ -export interface Fixed64Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number | string | Long); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number | string | Long); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number | string | Long); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number | string | Long); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number | string | Long); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number | string | Long)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number | string | Long)[]; -} - -/** - * Fixed64Rules describes the constraints applied to `fixed64` values - */ -export interface Fixed64Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (string); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (string); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (string); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (string); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/FloatRules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/FloatRules.ts deleted file mode 100644 index 35038f0..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/FloatRules.ts +++ /dev/null @@ -1,86 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - - -/** - * FloatRules describes the constraints applied to `float` values - */ -export interface FloatRules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number | string); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number | string); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number | string); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number | string); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number | string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number | string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number | string)[]; -} - -/** - * FloatRules describes the constraints applied to `float` values - */ -export interface FloatRules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/Int32Rules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/Int32Rules.ts deleted file mode 100644 index dfe10ea..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/Int32Rules.ts +++ /dev/null @@ -1,86 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - - -/** - * Int32Rules describes the constraints applied to `int32` values - */ -export interface Int32Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number)[]; -} - -/** - * Int32Rules describes the constraints applied to `int32` values - */ -export interface Int32Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/Int64Rules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/Int64Rules.ts deleted file mode 100644 index edfecd5..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/Int64Rules.ts +++ /dev/null @@ -1,87 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - -import type { Long } from '@grpc/proto-loader'; - -/** - * Int64Rules describes the constraints applied to `int64` values - */ -export interface Int64Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number | string | Long); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number | string | Long); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number | string | Long); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number | string | Long); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number | string | Long); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number | string | Long)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number | string | Long)[]; -} - -/** - * Int64Rules describes the constraints applied to `int64` values - */ -export interface Int64Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (string); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (string); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (string); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (string); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/KnownRegex.ts b/node_modules/@grpc/grpc-js/src/generated/validate/KnownRegex.ts deleted file mode 100644 index b33d1bb..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/KnownRegex.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - -/** - * WellKnownRegex contain some well-known patterns. - */ -export const KnownRegex = { - UNKNOWN: 'UNKNOWN', - /** - * HTTP header name as defined by RFC 7230. - */ - HTTP_HEADER_NAME: 'HTTP_HEADER_NAME', - /** - * HTTP header value as defined by RFC 7230. - */ - HTTP_HEADER_VALUE: 'HTTP_HEADER_VALUE', -} as const; - -/** - * WellKnownRegex contain some well-known patterns. - */ -export type KnownRegex = - | 'UNKNOWN' - | 0 - /** - * HTTP header name as defined by RFC 7230. - */ - | 'HTTP_HEADER_NAME' - | 1 - /** - * HTTP header value as defined by RFC 7230. - */ - | 'HTTP_HEADER_VALUE' - | 2 - -/** - * WellKnownRegex contain some well-known patterns. - */ -export type KnownRegex__Output = typeof KnownRegex[keyof typeof KnownRegex] diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/MapRules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/MapRules.ts deleted file mode 100644 index d7c7766..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/MapRules.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - -import type { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from '../validate/FieldRules'; -import type { Long } from '@grpc/proto-loader'; - -/** - * MapRules describe the constraints applied to `map` values - */ -export interface MapRules { - /** - * MinPairs specifies that this field must have the specified number of - * KVs at a minimum - */ - 'min_pairs'?: (number | string | Long); - /** - * MaxPairs specifies that this field must have the specified number of - * KVs at a maximum - */ - 'max_pairs'?: (number | string | Long); - /** - * NoSparse specifies values in this field cannot be unset. This only - * applies to map's with message value types. - */ - 'no_sparse'?: (boolean); - /** - * Keys specifies the constraints to be applied to each key in the field. - */ - 'keys'?: (_validate_FieldRules | null); - /** - * Values specifies the constraints to be applied to the value of each key - * in the field. Message values will still have their validations evaluated - * unless skip is specified here. - */ - 'values'?: (_validate_FieldRules | null); -} - -/** - * MapRules describe the constraints applied to `map` values - */ -export interface MapRules__Output { - /** - * MinPairs specifies that this field must have the specified number of - * KVs at a minimum - */ - 'min_pairs': (string); - /** - * MaxPairs specifies that this field must have the specified number of - * KVs at a maximum - */ - 'max_pairs': (string); - /** - * NoSparse specifies values in this field cannot be unset. This only - * applies to map's with message value types. - */ - 'no_sparse': (boolean); - /** - * Keys specifies the constraints to be applied to each key in the field. - */ - 'keys': (_validate_FieldRules__Output | null); - /** - * Values specifies the constraints to be applied to the value of each key - * in the field. Message values will still have their validations evaluated - * unless skip is specified here. - */ - 'values': (_validate_FieldRules__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/MessageRules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/MessageRules.ts deleted file mode 100644 index 6a56ef1..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/MessageRules.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - - -/** - * MessageRules describe the constraints applied to embedded message values. - * For message-type fields, validation is performed recursively. - */ -export interface MessageRules { - /** - * Skip specifies that the validation rules of this field should not be - * evaluated - */ - 'skip'?: (boolean); - /** - * Required specifies that this field must be set - */ - 'required'?: (boolean); -} - -/** - * MessageRules describe the constraints applied to embedded message values. - * For message-type fields, validation is performed recursively. - */ -export interface MessageRules__Output { - /** - * Skip specifies that the validation rules of this field should not be - * evaluated - */ - 'skip': (boolean); - /** - * Required specifies that this field must be set - */ - 'required': (boolean); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/RepeatedRules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/RepeatedRules.ts deleted file mode 100644 index d045fa8..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/RepeatedRules.ts +++ /dev/null @@ -1,60 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - -import type { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from '../validate/FieldRules'; -import type { Long } from '@grpc/proto-loader'; - -/** - * RepeatedRules describe the constraints applied to `repeated` values - */ -export interface RepeatedRules { - /** - * MinItems specifies that this field must have the specified number of - * items at a minimum - */ - 'min_items'?: (number | string | Long); - /** - * MaxItems specifies that this field must have the specified number of - * items at a maximum - */ - 'max_items'?: (number | string | Long); - /** - * Unique specifies that all elements in this field must be unique. This - * contraint is only applicable to scalar and enum types (messages are not - * supported). - */ - 'unique'?: (boolean); - /** - * Items specifies the contraints to be applied to each item in the field. - * Repeated message fields will still execute validation against each item - * unless skip is specified here. - */ - 'items'?: (_validate_FieldRules | null); -} - -/** - * RepeatedRules describe the constraints applied to `repeated` values - */ -export interface RepeatedRules__Output { - /** - * MinItems specifies that this field must have the specified number of - * items at a minimum - */ - 'min_items': (string); - /** - * MaxItems specifies that this field must have the specified number of - * items at a maximum - */ - 'max_items': (string); - /** - * Unique specifies that all elements in this field must be unique. This - * contraint is only applicable to scalar and enum types (messages are not - * supported). - */ - 'unique': (boolean); - /** - * Items specifies the contraints to be applied to each item in the field. - * Repeated message fields will still execute validation against each item - * unless skip is specified here. - */ - 'items': (_validate_FieldRules__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/SFixed32Rules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/SFixed32Rules.ts deleted file mode 100644 index cbed6f2..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/SFixed32Rules.ts +++ /dev/null @@ -1,86 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - - -/** - * SFixed32Rules describes the constraints applied to `sfixed32` values - */ -export interface SFixed32Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number)[]; -} - -/** - * SFixed32Rules describes the constraints applied to `sfixed32` values - */ -export interface SFixed32Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/SFixed64Rules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/SFixed64Rules.ts deleted file mode 100644 index 7d0bbf1..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/SFixed64Rules.ts +++ /dev/null @@ -1,87 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - -import type { Long } from '@grpc/proto-loader'; - -/** - * SFixed64Rules describes the constraints applied to `sfixed64` values - */ -export interface SFixed64Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number | string | Long); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number | string | Long); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number | string | Long); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number | string | Long); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number | string | Long); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number | string | Long)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number | string | Long)[]; -} - -/** - * SFixed64Rules describes the constraints applied to `sfixed64` values - */ -export interface SFixed64Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (string); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (string); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (string); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (string); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/SInt32Rules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/SInt32Rules.ts deleted file mode 100644 index f35ed41..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/SInt32Rules.ts +++ /dev/null @@ -1,86 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - - -/** - * SInt32Rules describes the constraints applied to `sint32` values - */ -export interface SInt32Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number)[]; -} - -/** - * SInt32Rules describes the constraints applied to `sint32` values - */ -export interface SInt32Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/SInt64Rules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/SInt64Rules.ts deleted file mode 100644 index 68b7ea6..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/SInt64Rules.ts +++ /dev/null @@ -1,87 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - -import type { Long } from '@grpc/proto-loader'; - -/** - * SInt64Rules describes the constraints applied to `sint64` values - */ -export interface SInt64Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number | string | Long); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number | string | Long); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number | string | Long); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number | string | Long); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number | string | Long); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number | string | Long)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number | string | Long)[]; -} - -/** - * SInt64Rules describes the constraints applied to `sint64` values - */ -export interface SInt64Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (string); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (string); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (string); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (string); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/StringRules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/StringRules.ts deleted file mode 100644 index 2989d6f..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/StringRules.ts +++ /dev/null @@ -1,288 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - -import type { KnownRegex as _validate_KnownRegex, KnownRegex__Output as _validate_KnownRegex__Output } from '../validate/KnownRegex'; -import type { Long } from '@grpc/proto-loader'; - -/** - * StringRules describe the constraints applied to `string` values - */ -export interface StringRules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (string); - /** - * MinLen specifies that this field must be the specified number of - * characters (Unicode code points) at a minimum. Note that the number of - * characters may differ from the number of bytes in the string. - */ - 'min_len'?: (number | string | Long); - /** - * MaxLen specifies that this field must be the specified number of - * characters (Unicode code points) at a maximum. Note that the number of - * characters may differ from the number of bytes in the string. - */ - 'max_len'?: (number | string | Long); - /** - * MinBytes specifies that this field must be the specified number of bytes - * at a minimum - */ - 'min_bytes'?: (number | string | Long); - /** - * MaxBytes specifies that this field must be the specified number of bytes - * at a maximum - */ - 'max_bytes'?: (number | string | Long); - /** - * Pattern specifes that this field must match against the specified - * regular expression (RE2 syntax). The included expression should elide - * any delimiters. - */ - 'pattern'?: (string); - /** - * Prefix specifies that this field must have the specified substring at - * the beginning of the string. - */ - 'prefix'?: (string); - /** - * Suffix specifies that this field must have the specified substring at - * the end of the string. - */ - 'suffix'?: (string); - /** - * Contains specifies that this field must have the specified substring - * anywhere in the string. - */ - 'contains'?: (string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (string)[]; - /** - * Email specifies that the field must be a valid email address as - * defined by RFC 5322 - */ - 'email'?: (boolean); - /** - * Hostname specifies that the field must be a valid hostname as - * defined by RFC 1034. This constraint does not support - * internationalized domain names (IDNs). - */ - 'hostname'?: (boolean); - /** - * Ip specifies that the field must be a valid IP (v4 or v6) address. - * Valid IPv6 addresses should not include surrounding square brackets. - */ - 'ip'?: (boolean); - /** - * Ipv4 specifies that the field must be a valid IPv4 address. - */ - 'ipv4'?: (boolean); - /** - * Ipv6 specifies that the field must be a valid IPv6 address. Valid - * IPv6 addresses should not include surrounding square brackets. - */ - 'ipv6'?: (boolean); - /** - * Uri specifies that the field must be a valid, absolute URI as defined - * by RFC 3986 - */ - 'uri'?: (boolean); - /** - * UriRef specifies that the field must be a valid URI as defined by RFC - * 3986 and may be relative or absolute. - */ - 'uri_ref'?: (boolean); - /** - * Len specifies that this field must be the specified number of - * characters (Unicode code points). Note that the number of - * characters may differ from the number of bytes in the string. - */ - 'len'?: (number | string | Long); - /** - * LenBytes specifies that this field must be the specified number of bytes - * at a minimum - */ - 'len_bytes'?: (number | string | Long); - /** - * Address specifies that the field must be either a valid hostname as - * defined by RFC 1034 (which does not support internationalized domain - * names or IDNs), or it can be a valid IP (v4 or v6). - */ - 'address'?: (boolean); - /** - * Uuid specifies that the field must be a valid UUID as defined by - * RFC 4122 - */ - 'uuid'?: (boolean); - /** - * NotContains specifies that this field cannot have the specified substring - * anywhere in the string. - */ - 'not_contains'?: (string); - /** - * WellKnownRegex specifies a common well known pattern defined as a regex. - */ - 'well_known_regex'?: (_validate_KnownRegex); - /** - * This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable - * strict header validation. - * By default, this is true, and HTTP header validations are RFC-compliant. - * Setting to false will enable a looser validations that only disallows - * \r\n\0 characters, which can be used to bypass header matching rules. - */ - 'strict'?: (boolean); - /** - * WellKnown rules provide advanced constraints against common string - * patterns - */ - 'well_known'?: "email"|"hostname"|"ip"|"ipv4"|"ipv6"|"uri"|"uri_ref"|"address"|"uuid"|"well_known_regex"; -} - -/** - * StringRules describe the constraints applied to `string` values - */ -export interface StringRules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (string); - /** - * MinLen specifies that this field must be the specified number of - * characters (Unicode code points) at a minimum. Note that the number of - * characters may differ from the number of bytes in the string. - */ - 'min_len': (string); - /** - * MaxLen specifies that this field must be the specified number of - * characters (Unicode code points) at a maximum. Note that the number of - * characters may differ from the number of bytes in the string. - */ - 'max_len': (string); - /** - * MinBytes specifies that this field must be the specified number of bytes - * at a minimum - */ - 'min_bytes': (string); - /** - * MaxBytes specifies that this field must be the specified number of bytes - * at a maximum - */ - 'max_bytes': (string); - /** - * Pattern specifes that this field must match against the specified - * regular expression (RE2 syntax). The included expression should elide - * any delimiters. - */ - 'pattern': (string); - /** - * Prefix specifies that this field must have the specified substring at - * the beginning of the string. - */ - 'prefix': (string); - /** - * Suffix specifies that this field must have the specified substring at - * the end of the string. - */ - 'suffix': (string); - /** - * Contains specifies that this field must have the specified substring - * anywhere in the string. - */ - 'contains': (string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (string)[]; - /** - * Email specifies that the field must be a valid email address as - * defined by RFC 5322 - */ - 'email'?: (boolean); - /** - * Hostname specifies that the field must be a valid hostname as - * defined by RFC 1034. This constraint does not support - * internationalized domain names (IDNs). - */ - 'hostname'?: (boolean); - /** - * Ip specifies that the field must be a valid IP (v4 or v6) address. - * Valid IPv6 addresses should not include surrounding square brackets. - */ - 'ip'?: (boolean); - /** - * Ipv4 specifies that the field must be a valid IPv4 address. - */ - 'ipv4'?: (boolean); - /** - * Ipv6 specifies that the field must be a valid IPv6 address. Valid - * IPv6 addresses should not include surrounding square brackets. - */ - 'ipv6'?: (boolean); - /** - * Uri specifies that the field must be a valid, absolute URI as defined - * by RFC 3986 - */ - 'uri'?: (boolean); - /** - * UriRef specifies that the field must be a valid URI as defined by RFC - * 3986 and may be relative or absolute. - */ - 'uri_ref'?: (boolean); - /** - * Len specifies that this field must be the specified number of - * characters (Unicode code points). Note that the number of - * characters may differ from the number of bytes in the string. - */ - 'len': (string); - /** - * LenBytes specifies that this field must be the specified number of bytes - * at a minimum - */ - 'len_bytes': (string); - /** - * Address specifies that the field must be either a valid hostname as - * defined by RFC 1034 (which does not support internationalized domain - * names or IDNs), or it can be a valid IP (v4 or v6). - */ - 'address'?: (boolean); - /** - * Uuid specifies that the field must be a valid UUID as defined by - * RFC 4122 - */ - 'uuid'?: (boolean); - /** - * NotContains specifies that this field cannot have the specified substring - * anywhere in the string. - */ - 'not_contains': (string); - /** - * WellKnownRegex specifies a common well known pattern defined as a regex. - */ - 'well_known_regex'?: (_validate_KnownRegex__Output); - /** - * This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable - * strict header validation. - * By default, this is true, and HTTP header validations are RFC-compliant. - * Setting to false will enable a looser validations that only disallows - * \r\n\0 characters, which can be used to bypass header matching rules. - */ - 'strict': (boolean); - /** - * WellKnown rules provide advanced constraints against common string - * patterns - */ - 'well_known'?: "email"|"hostname"|"ip"|"ipv4"|"ipv6"|"uri"|"uri_ref"|"address"|"uuid"|"well_known_regex"; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/TimestampRules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/TimestampRules.ts deleted file mode 100644 index 098da41..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/TimestampRules.ts +++ /dev/null @@ -1,106 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - -import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../google/protobuf/Timestamp'; -import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../google/protobuf/Duration'; - -/** - * TimestampRules describe the constraints applied exclusively to the - * `google.protobuf.Timestamp` well-known type - */ -export interface TimestampRules { - /** - * Required specifies that this field must be set - */ - 'required'?: (boolean); - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (_google_protobuf_Timestamp | null); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (_google_protobuf_Timestamp | null); - /** - * Lte specifies that this field must be less than the specified value, - * inclusive - */ - 'lte'?: (_google_protobuf_Timestamp | null); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive - */ - 'gt'?: (_google_protobuf_Timestamp | null); - /** - * Gte specifies that this field must be greater than the specified value, - * inclusive - */ - 'gte'?: (_google_protobuf_Timestamp | null); - /** - * LtNow specifies that this must be less than the current time. LtNow - * can only be used with the Within rule. - */ - 'lt_now'?: (boolean); - /** - * GtNow specifies that this must be greater than the current time. GtNow - * can only be used with the Within rule. - */ - 'gt_now'?: (boolean); - /** - * Within specifies that this field must be within this duration of the - * current time. This constraint can be used alone or with the LtNow and - * GtNow rules. - */ - 'within'?: (_google_protobuf_Duration | null); -} - -/** - * TimestampRules describe the constraints applied exclusively to the - * `google.protobuf.Timestamp` well-known type - */ -export interface TimestampRules__Output { - /** - * Required specifies that this field must be set - */ - 'required': (boolean); - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (_google_protobuf_Timestamp__Output | null); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (_google_protobuf_Timestamp__Output | null); - /** - * Lte specifies that this field must be less than the specified value, - * inclusive - */ - 'lte': (_google_protobuf_Timestamp__Output | null); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive - */ - 'gt': (_google_protobuf_Timestamp__Output | null); - /** - * Gte specifies that this field must be greater than the specified value, - * inclusive - */ - 'gte': (_google_protobuf_Timestamp__Output | null); - /** - * LtNow specifies that this must be less than the current time. LtNow - * can only be used with the Within rule. - */ - 'lt_now': (boolean); - /** - * GtNow specifies that this must be greater than the current time. GtNow - * can only be used with the Within rule. - */ - 'gt_now': (boolean); - /** - * Within specifies that this field must be within this duration of the - * current time. This constraint can be used alone or with the LtNow and - * GtNow rules. - */ - 'within': (_google_protobuf_Duration__Output | null); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/UInt32Rules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/UInt32Rules.ts deleted file mode 100644 index e095c55..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/UInt32Rules.ts +++ /dev/null @@ -1,86 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - - -/** - * UInt32Rules describes the constraints applied to `uint32` values - */ -export interface UInt32Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number)[]; -} - -/** - * UInt32Rules describes the constraints applied to `uint32` values - */ -export interface UInt32Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (number); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (number); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (number); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (number); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (number); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (number)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (number)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/validate/UInt64Rules.ts b/node_modules/@grpc/grpc-js/src/generated/validate/UInt64Rules.ts deleted file mode 100644 index 95fa783..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/validate/UInt64Rules.ts +++ /dev/null @@ -1,87 +0,0 @@ -// Original file: proto/protoc-gen-validate/validate/validate.proto - -import type { Long } from '@grpc/proto-loader'; - -/** - * UInt64Rules describes the constraints applied to `uint64` values - */ -export interface UInt64Rules { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const'?: (number | string | Long); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt'?: (number | string | Long); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte'?: (number | string | Long); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt'?: (number | string | Long); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte'?: (number | string | Long); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in'?: (number | string | Long)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in'?: (number | string | Long)[]; -} - -/** - * UInt64Rules describes the constraints applied to `uint64` values - */ -export interface UInt64Rules__Output { - /** - * Const specifies that this field must be exactly the specified value - */ - 'const': (string); - /** - * Lt specifies that this field must be less than the specified value, - * exclusive - */ - 'lt': (string); - /** - * Lte specifies that this field must be less than or equal to the - * specified value, inclusive - */ - 'lte': (string); - /** - * Gt specifies that this field must be greater than the specified value, - * exclusive. If the value of Gt is larger than a specified Lt or Lte, the - * range is reversed. - */ - 'gt': (string); - /** - * Gte specifies that this field must be greater than or equal to the - * specified value, inclusive. If the value of Gte is larger than a - * specified Lt or Lte, the range is reversed. - */ - 'gte': (string); - /** - * In specifies that this field must be equal to one of the specified - * values - */ - 'in': (string)[]; - /** - * NotIn specifies that this field cannot be equal to one of the specified - * values - */ - 'not_in': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/generated/xds/data/orca/v3/OrcaLoadReport.ts b/node_modules/@grpc/grpc-js/src/generated/xds/data/orca/v3/OrcaLoadReport.ts deleted file mode 100644 index 155da79..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/xds/data/orca/v3/OrcaLoadReport.ts +++ /dev/null @@ -1,113 +0,0 @@ -// Original file: proto/xds/xds/data/orca/v3/orca_load_report.proto - -import type { Long } from '@grpc/proto-loader'; - -export interface OrcaLoadReport { - /** - * CPU utilization expressed as a fraction of available CPU resources. This - * should be derived from the latest sample or measurement. The value may be - * larger than 1.0 when the usage exceeds the reporter dependent notion of - * soft limits. - */ - 'cpu_utilization'?: (number | string); - /** - * Memory utilization expressed as a fraction of available memory - * resources. This should be derived from the latest sample or measurement. - */ - 'mem_utilization'?: (number | string); - /** - * Total RPS being served by an endpoint. This should cover all services that an endpoint is - * responsible for. - * Deprecated -- use ``rps_fractional`` field instead. - * @deprecated - */ - 'rps'?: (number | string | Long); - /** - * Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of - * storage) associated with the request. - */ - 'request_cost'?: ({[key: string]: number | string}); - /** - * Resource utilization values. Each value is expressed as a fraction of total resources - * available, derived from the latest sample or measurement. - */ - 'utilization'?: ({[key: string]: number | string}); - /** - * Total RPS being served by an endpoint. This should cover all services that an endpoint is - * responsible for. - */ - 'rps_fractional'?: (number | string); - /** - * Total EPS (errors/second) being served by an endpoint. This should cover - * all services that an endpoint is responsible for. - */ - 'eps'?: (number | string); - /** - * Application specific opaque metrics. - */ - 'named_metrics'?: ({[key: string]: number | string}); - /** - * Application specific utilization expressed as a fraction of available - * resources. For example, an application may report the max of CPU and memory - * utilization for better load balancing if it is both CPU and memory bound. - * This should be derived from the latest sample or measurement. - * The value may be larger than 1.0 when the usage exceeds the reporter - * dependent notion of soft limits. - */ - 'application_utilization'?: (number | string); -} - -export interface OrcaLoadReport__Output { - /** - * CPU utilization expressed as a fraction of available CPU resources. This - * should be derived from the latest sample or measurement. The value may be - * larger than 1.0 when the usage exceeds the reporter dependent notion of - * soft limits. - */ - 'cpu_utilization': (number); - /** - * Memory utilization expressed as a fraction of available memory - * resources. This should be derived from the latest sample or measurement. - */ - 'mem_utilization': (number); - /** - * Total RPS being served by an endpoint. This should cover all services that an endpoint is - * responsible for. - * Deprecated -- use ``rps_fractional`` field instead. - * @deprecated - */ - 'rps': (string); - /** - * Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of - * storage) associated with the request. - */ - 'request_cost': ({[key: string]: number}); - /** - * Resource utilization values. Each value is expressed as a fraction of total resources - * available, derived from the latest sample or measurement. - */ - 'utilization': ({[key: string]: number}); - /** - * Total RPS being served by an endpoint. This should cover all services that an endpoint is - * responsible for. - */ - 'rps_fractional': (number); - /** - * Total EPS (errors/second) being served by an endpoint. This should cover - * all services that an endpoint is responsible for. - */ - 'eps': (number); - /** - * Application specific opaque metrics. - */ - 'named_metrics': ({[key: string]: number}); - /** - * Application specific utilization expressed as a fraction of available - * resources. For example, an application may report the max of CPU and memory - * utilization for better load balancing if it is both CPU and memory bound. - * This should be derived from the latest sample or measurement. - * The value may be larger than 1.0 when the usage exceeds the reporter - * dependent notion of soft limits. - */ - 'application_utilization': (number); -} diff --git a/node_modules/@grpc/grpc-js/src/generated/xds/service/orca/v3/OpenRcaService.ts b/node_modules/@grpc/grpc-js/src/generated/xds/service/orca/v3/OpenRcaService.ts deleted file mode 100644 index f111da8..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/xds/service/orca/v3/OpenRcaService.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Original file: proto/xds/xds/service/orca/v3/orca.proto - -import type * as grpc from '../../../../../index' -import type { MethodDefinition } from '@grpc/proto-loader' -import type { OrcaLoadReport as _xds_data_orca_v3_OrcaLoadReport, OrcaLoadReport__Output as _xds_data_orca_v3_OrcaLoadReport__Output } from '../../../../xds/data/orca/v3/OrcaLoadReport'; -import type { OrcaLoadReportRequest as _xds_service_orca_v3_OrcaLoadReportRequest, OrcaLoadReportRequest__Output as _xds_service_orca_v3_OrcaLoadReportRequest__Output } from '../../../../xds/service/orca/v3/OrcaLoadReportRequest'; - -/** - * Out-of-band (OOB) load reporting service for the additional load reporting - * agent that does not sit in the request path. Reports are periodically sampled - * with sufficient frequency to provide temporal association with requests. - * OOB reporting compensates the limitation of in-band reporting in revealing - * costs for backends that do not provide a steady stream of telemetry such as - * long running stream operations and zero QPS services. This is a server - * streaming service, client needs to terminate current RPC and initiate - * a new call to change backend reporting frequency. - */ -export interface OpenRcaServiceClient extends grpc.Client { - StreamCoreMetrics(argument: _xds_service_orca_v3_OrcaLoadReportRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_xds_data_orca_v3_OrcaLoadReport__Output>; - StreamCoreMetrics(argument: _xds_service_orca_v3_OrcaLoadReportRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<_xds_data_orca_v3_OrcaLoadReport__Output>; - streamCoreMetrics(argument: _xds_service_orca_v3_OrcaLoadReportRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_xds_data_orca_v3_OrcaLoadReport__Output>; - streamCoreMetrics(argument: _xds_service_orca_v3_OrcaLoadReportRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<_xds_data_orca_v3_OrcaLoadReport__Output>; - -} - -/** - * Out-of-band (OOB) load reporting service for the additional load reporting - * agent that does not sit in the request path. Reports are periodically sampled - * with sufficient frequency to provide temporal association with requests. - * OOB reporting compensates the limitation of in-band reporting in revealing - * costs for backends that do not provide a steady stream of telemetry such as - * long running stream operations and zero QPS services. This is a server - * streaming service, client needs to terminate current RPC and initiate - * a new call to change backend reporting frequency. - */ -export interface OpenRcaServiceHandlers extends grpc.UntypedServiceImplementation { - StreamCoreMetrics: grpc.handleServerStreamingCall<_xds_service_orca_v3_OrcaLoadReportRequest__Output, _xds_data_orca_v3_OrcaLoadReport>; - -} - -export interface OpenRcaServiceDefinition extends grpc.ServiceDefinition { - StreamCoreMetrics: MethodDefinition<_xds_service_orca_v3_OrcaLoadReportRequest, _xds_data_orca_v3_OrcaLoadReport, _xds_service_orca_v3_OrcaLoadReportRequest__Output, _xds_data_orca_v3_OrcaLoadReport__Output> -} diff --git a/node_modules/@grpc/grpc-js/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.ts b/node_modules/@grpc/grpc-js/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.ts deleted file mode 100644 index f1fb3c2..0000000 --- a/node_modules/@grpc/grpc-js/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Original file: proto/xds/xds/service/orca/v3/orca.proto - -import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; - -export interface OrcaLoadReportRequest { - /** - * Interval for generating Open RCA core metric responses. - */ - 'report_interval'?: (_google_protobuf_Duration | null); - /** - * Request costs to collect. If this is empty, all known requests costs tracked by - * the load reporting agent will be returned. This provides an opportunity for - * the client to selectively obtain a subset of tracked costs. - */ - 'request_cost_names'?: (string)[]; -} - -export interface OrcaLoadReportRequest__Output { - /** - * Interval for generating Open RCA core metric responses. - */ - 'report_interval': (_google_protobuf_Duration__Output | null); - /** - * Request costs to collect. If this is empty, all known requests costs tracked by - * the load reporting agent will be returned. This provides an opportunity for - * the client to selectively obtain a subset of tracked costs. - */ - 'request_cost_names': (string)[]; -} diff --git a/node_modules/@grpc/grpc-js/src/http_proxy.ts b/node_modules/@grpc/grpc-js/src/http_proxy.ts deleted file mode 100644 index c40d207..0000000 --- a/node_modules/@grpc/grpc-js/src/http_proxy.ts +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { log } from './logging'; -import { LogVerbosity } from './constants'; -import { isIPv4, Socket } from 'net'; -import * as http from 'http'; -import * as logging from './logging'; -import { - SubchannelAddress, - isTcpSubchannelAddress, - subchannelAddressToString, -} from './subchannel-address'; -import { ChannelOptions } from './channel-options'; -import { GrpcUri, parseUri, splitHostPort, uriToString } from './uri-parser'; -import { URL } from 'url'; -import { DEFAULT_PORT } from './resolver-dns'; - -const TRACER_NAME = 'proxy'; - -function trace(text: string): void { - logging.trace(LogVerbosity.DEBUG, TRACER_NAME, text); -} - -interface ProxyInfo { - address?: string; - creds?: string; -} - -function getProxyInfo(): ProxyInfo { - let proxyEnv = ''; - let envVar = ''; - /* Prefer using 'grpc_proxy'. Fallback on 'http_proxy' if it is not set. - * Also prefer using 'https_proxy' with fallback on 'http_proxy'. The - * fallback behavior can be removed if there's a demand for it. - */ - if (process.env.grpc_proxy) { - envVar = 'grpc_proxy'; - proxyEnv = process.env.grpc_proxy; - } else if (process.env.https_proxy) { - envVar = 'https_proxy'; - proxyEnv = process.env.https_proxy; - } else if (process.env.http_proxy) { - envVar = 'http_proxy'; - proxyEnv = process.env.http_proxy; - } else { - return {}; - } - let proxyUrl: URL; - try { - proxyUrl = new URL(proxyEnv); - } catch (e) { - log(LogVerbosity.ERROR, `cannot parse value of "${envVar}" env var`); - return {}; - } - if (proxyUrl.protocol !== 'http:') { - log( - LogVerbosity.ERROR, - `"${proxyUrl.protocol}" scheme not supported in proxy URI` - ); - return {}; - } - let userCred: string | null = null; - if (proxyUrl.username) { - if (proxyUrl.password) { - log(LogVerbosity.INFO, 'userinfo found in proxy URI'); - userCred = decodeURIComponent(`${proxyUrl.username}:${proxyUrl.password}`); - } else { - userCred = proxyUrl.username; - } - } - const hostname = proxyUrl.hostname; - let port = proxyUrl.port; - /* The proxy URL uses the scheme "http:", which has a default port number of - * 80. We need to set that explicitly here if it is omitted because otherwise - * it will use gRPC's default port 443. */ - if (port === '') { - port = '80'; - } - const result: ProxyInfo = { - address: `${hostname}:${port}`, - }; - if (userCred) { - result.creds = userCred; - } - trace( - 'Proxy server ' + result.address + ' set by environment variable ' + envVar - ); - return result; -} - -function getNoProxyHostList(): string[] { - /* Prefer using 'no_grpc_proxy'. Fallback on 'no_proxy' if it is not set. */ - let noProxyStr: string | undefined = process.env.no_grpc_proxy; - let envVar = 'no_grpc_proxy'; - if (!noProxyStr) { - noProxyStr = process.env.no_proxy; - envVar = 'no_proxy'; - } - if (noProxyStr) { - trace('No proxy server list set by environment variable ' + envVar); - return noProxyStr.split(','); - } else { - return []; - } -} - -interface CIDRNotation { - ip: number; - prefixLength: number; -} - -/* - * The groups correspond to CIDR parts as follows: - * 1. ip - * 2. prefixLength - */ - -export function parseCIDR(cidrString: string): CIDRNotation | null { - const splitRange = cidrString.split('/'); - if (splitRange.length !== 2) { - return null; - } - const prefixLength = parseInt(splitRange[1], 10); - if (!isIPv4(splitRange[0]) || Number.isNaN(prefixLength) || prefixLength < 0 || prefixLength > 32) { - return null; - } - return { - ip: ipToInt(splitRange[0]), - prefixLength: prefixLength - }; -} - -function ipToInt(ip: string) { - return ip.split(".").reduce((acc, octet) => (acc << 8) + parseInt(octet, 10), 0); -} - -function isIpInCIDR(cidr: CIDRNotation, serverHost: string) { - const ip = cidr.ip; - const mask = -1 << (32 - cidr.prefixLength); - const hostIP = ipToInt(serverHost); - - return (hostIP & mask) === (ip & mask); -} - -function hostMatchesNoProxyList(serverHost: string): boolean { - for (const host of getNoProxyHostList()) { - const parsedCIDR = parseCIDR(host); - // host is a CIDR and serverHost is an IP address - if (isIPv4(serverHost) && parsedCIDR && isIpInCIDR(parsedCIDR, serverHost)) { - return true; - } else if (serverHost.endsWith(host)) { - // host is a single IP or a domain name suffix - return true; - } - } - return false; -} - -export interface ProxyMapResult { - target: GrpcUri; - extraOptions: ChannelOptions; -} - -export function mapProxyName( - target: GrpcUri, - options: ChannelOptions -): ProxyMapResult { - const noProxyResult: ProxyMapResult = { - target: target, - extraOptions: {}, - }; - if ((options['grpc.enable_http_proxy'] ?? 1) === 0) { - return noProxyResult; - } - if (target.scheme === 'unix') { - return noProxyResult; - } - const proxyInfo = getProxyInfo(); - if (!proxyInfo.address) { - return noProxyResult; - } - const hostPort = splitHostPort(target.path); - if (!hostPort) { - return noProxyResult; - } - const serverHost = hostPort.host; - if (hostMatchesNoProxyList(serverHost)) { - trace('Not using proxy for target in no_proxy list: ' + uriToString(target)); - return noProxyResult; - } - const extraOptions: ChannelOptions = { - 'grpc.http_connect_target': uriToString(target), - }; - if (proxyInfo.creds) { - extraOptions['grpc.http_connect_creds'] = proxyInfo.creds; - } - return { - target: { - scheme: 'dns', - path: proxyInfo.address, - }, - extraOptions: extraOptions, - }; -} - -export function getProxiedConnection( - address: SubchannelAddress, - channelOptions: ChannelOptions -): Promise { - if (!('grpc.http_connect_target' in channelOptions)) { - return Promise.resolve(null); - } - const realTarget = channelOptions['grpc.http_connect_target'] as string; - const parsedTarget = parseUri(realTarget); - if (parsedTarget === null) { - return Promise.resolve(null); - } - const splitHostPost = splitHostPort(parsedTarget.path); - if (splitHostPost === null) { - return Promise.resolve(null); - } - const hostPort = `${splitHostPost.host}:${ - splitHostPost.port ?? DEFAULT_PORT - }`; - const options: http.RequestOptions = { - method: 'CONNECT', - path: hostPort, - }; - const headers: http.OutgoingHttpHeaders = { - Host: hostPort, - }; - // Connect to the subchannel address as a proxy - if (isTcpSubchannelAddress(address)) { - options.host = address.host; - options.port = address.port; - } else { - options.socketPath = address.path; - } - if ('grpc.http_connect_creds' in channelOptions) { - headers['Proxy-Authorization'] = - 'Basic ' + - Buffer.from(channelOptions['grpc.http_connect_creds'] as string).toString( - 'base64' - ); - } - options.headers = headers; - const proxyAddressString = subchannelAddressToString(address); - trace('Using proxy ' + proxyAddressString + ' to connect to ' + options.path); - return new Promise((resolve, reject) => { - const request = http.request(options); - request.once('connect', (res, socket, head) => { - request.removeAllListeners(); - socket.removeAllListeners(); - if (res.statusCode === 200) { - trace( - 'Successfully connected to ' + - options.path + - ' through proxy ' + - proxyAddressString - ); - // The HTTP client may have already read a few bytes of the proxied - // connection. If that's the case, put them back into the socket. - // See https://github.com/grpc/grpc-node/issues/2744. - if (head.length > 0) { - socket.unshift(head); - } - trace( - 'Successfully established a plaintext connection to ' + - options.path + - ' through proxy ' + - proxyAddressString - ); - resolve(socket); - } else { - log( - LogVerbosity.ERROR, - 'Failed to connect to ' + - options.path + - ' through proxy ' + - proxyAddressString + - ' with status ' + - res.statusCode - ); - reject(); - } - }); - request.once('error', err => { - request.removeAllListeners(); - log( - LogVerbosity.ERROR, - 'Failed to connect to proxy ' + - proxyAddressString + - ' with error ' + - err.message - ); - reject(); - }); - request.end(); - }); -} diff --git a/node_modules/@grpc/grpc-js/src/index.ts b/node_modules/@grpc/grpc-js/src/index.ts deleted file mode 100644 index f26f65a..0000000 --- a/node_modules/@grpc/grpc-js/src/index.ts +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { - ClientDuplexStream, - ClientReadableStream, - ClientUnaryCall, - ClientWritableStream, - ServiceError, -} from './call'; -import { CallCredentials, OAuth2Client } from './call-credentials'; -import { StatusObject } from './call-interface'; -import { Channel, ChannelImplementation } from './channel'; -import { CompressionAlgorithms } from './compression-algorithms'; -import { ConnectivityState } from './connectivity-state'; -import { ChannelCredentials, VerifyOptions } from './channel-credentials'; -import { - CallOptions, - Client, - ClientOptions, - CallInvocationTransformer, - CallProperties, - UnaryCallback, -} from './client'; -import { LogVerbosity, Status, Propagate } from './constants'; -import * as logging from './logging'; -import { - Deserialize, - loadPackageDefinition, - makeClientConstructor, - MethodDefinition, - Serialize, - ServerMethodDefinition, - ServiceDefinition, -} from './make-client'; -import { Metadata, MetadataOptions, MetadataValue } from './metadata'; -import { - ConnectionInjector, - Server, - ServerOptions, - UntypedHandleCall, - UntypedServiceImplementation, -} from './server'; -import { KeyCertPair, ServerCredentials } from './server-credentials'; -import { StatusBuilder } from './status-builder'; -import { - handleBidiStreamingCall, - handleServerStreamingCall, - handleClientStreamingCall, - handleUnaryCall, - sendUnaryData, - ServerUnaryCall, - ServerReadableStream, - ServerWritableStream, - ServerDuplexStream, - ServerErrorResponse, -} from './server-call'; - -export { OAuth2Client }; - -/**** Client Credentials ****/ - -// Using assign only copies enumerable properties, which is what we want -export const credentials = { - /** - * Combine a ChannelCredentials with any number of CallCredentials into a - * single ChannelCredentials object. - * @param channelCredentials The ChannelCredentials object. - * @param callCredentials Any number of CallCredentials objects. - * @return The resulting ChannelCredentials object. - */ - combineChannelCredentials: ( - channelCredentials: ChannelCredentials, - ...callCredentials: CallCredentials[] - ): ChannelCredentials => { - return callCredentials.reduce( - (acc, other) => acc.compose(other), - channelCredentials - ); - }, - - /** - * Combine any number of CallCredentials into a single CallCredentials - * object. - * @param first The first CallCredentials object. - * @param additional Any number of additional CallCredentials objects. - * @return The resulting CallCredentials object. - */ - combineCallCredentials: ( - first: CallCredentials, - ...additional: CallCredentials[] - ): CallCredentials => { - return additional.reduce((acc, other) => acc.compose(other), first); - }, - - // from channel-credentials.ts - createInsecure: ChannelCredentials.createInsecure, - createSsl: ChannelCredentials.createSsl, - createFromSecureContext: ChannelCredentials.createFromSecureContext, - - // from call-credentials.ts - createFromMetadataGenerator: CallCredentials.createFromMetadataGenerator, - createFromGoogleCredential: CallCredentials.createFromGoogleCredential, - createEmpty: CallCredentials.createEmpty, -}; - -/**** Metadata ****/ - -export { Metadata, MetadataOptions, MetadataValue }; - -/**** Constants ****/ - -export { - LogVerbosity as logVerbosity, - Status as status, - ConnectivityState as connectivityState, - Propagate as propagate, - CompressionAlgorithms as compressionAlgorithms, - // TODO: Other constants as well -}; - -/**** Client ****/ - -export { - Client, - ClientOptions, - loadPackageDefinition, - makeClientConstructor, - makeClientConstructor as makeGenericClientConstructor, - CallProperties, - CallInvocationTransformer, - ChannelImplementation as Channel, - Channel as ChannelInterface, - UnaryCallback as requestCallback, -}; - -/** - * Close a Client object. - * @param client The client to close. - */ -export const closeClient = (client: Client) => client.close(); - -export const waitForClientReady = ( - client: Client, - deadline: Date | number, - callback: (error?: Error) => void -) => client.waitForReady(deadline, callback); - -/* Interfaces */ - -export { - sendUnaryData, - ChannelCredentials, - CallCredentials, - Deadline, - Serialize as serialize, - Deserialize as deserialize, - ClientUnaryCall, - ClientReadableStream, - ClientWritableStream, - ClientDuplexStream, - CallOptions, - MethodDefinition, - StatusObject, - ServiceError, - ServerUnaryCall, - ServerReadableStream, - ServerWritableStream, - ServerDuplexStream, - ServerErrorResponse, - ServerMethodDefinition, - ServiceDefinition, - UntypedHandleCall, - UntypedServiceImplementation, - VerifyOptions, -}; - -/**** Server ****/ - -export { - handleBidiStreamingCall, - handleServerStreamingCall, - handleUnaryCall, - handleClientStreamingCall, -}; - -/* eslint-disable @typescript-eslint/no-explicit-any */ -export type Call = - | ClientUnaryCall - | ClientReadableStream - | ClientWritableStream - | ClientDuplexStream; -/* eslint-enable @typescript-eslint/no-explicit-any */ - -/**** Unimplemented function stubs ****/ - -/* eslint-disable @typescript-eslint/no-explicit-any */ - -export const loadObject = (value: any, options: any): never => { - throw new Error( - 'Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead' - ); -}; - -export const load = (filename: any, format: any, options: any): never => { - throw new Error( - 'Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead' - ); -}; - -export const setLogger = (logger: Partial): void => { - logging.setLogger(logger); -}; - -export const setLogVerbosity = (verbosity: LogVerbosity): void => { - logging.setLoggerVerbosity(verbosity); -}; - -export { ConnectionInjector, Server, ServerOptions }; -export { ServerCredentials }; -export { KeyCertPair }; - -export const getClientChannel = (client: Client) => { - return Client.prototype.getChannel.call(client); -}; - -export { StatusBuilder }; - -export { Listener, InterceptingListener } from './call-interface'; - -export { - Requester, - ListenerBuilder, - RequesterBuilder, - Interceptor, - InterceptorOptions, - InterceptorProvider, - InterceptingCall, - InterceptorConfigurationError, - NextCall, -} from './client-interceptors'; - -export { - GrpcObject, - ServiceClientConstructor, - ProtobufTypeDefinition, -} from './make-client'; - -export { ChannelOptions } from './channel-options'; - -export { getChannelzServiceDefinition, getChannelzHandlers } from './channelz'; - -export { addAdminServicesToServer } from './admin'; - -export { - ServiceConfig, - LoadBalancingConfig, - MethodConfig, - RetryPolicy, -} from './service-config'; - -export { - ServerListener, - FullServerListener, - ServerListenerBuilder, - Responder, - FullResponder, - ResponderBuilder, - ServerInterceptingCallInterface, - ServerInterceptingCall, - ServerInterceptor, -} from './server-interceptors'; - -export { ServerMetricRecorder } from './orca'; - -import * as experimental from './experimental'; -export { experimental }; - -import * as resolver_dns from './resolver-dns'; -import * as resolver_uds from './resolver-uds'; -import * as resolver_ip from './resolver-ip'; -import * as load_balancer_pick_first from './load-balancer-pick-first'; -import * as load_balancer_round_robin from './load-balancer-round-robin'; -import * as load_balancer_outlier_detection from './load-balancer-outlier-detection'; -import * as load_balancer_weighted_round_robin from './load-balancer-weighted-round-robin'; -import * as channelz from './channelz'; -import { Deadline } from './deadline'; - -(() => { - resolver_dns.setup(); - resolver_uds.setup(); - resolver_ip.setup(); - load_balancer_pick_first.setup(); - load_balancer_round_robin.setup(); - load_balancer_outlier_detection.setup(); - load_balancer_weighted_round_robin.setup(); - channelz.setup(); -})(); diff --git a/node_modules/@grpc/grpc-js/src/internal-channel.ts b/node_modules/@grpc/grpc-js/src/internal-channel.ts deleted file mode 100644 index db3827f..0000000 --- a/node_modules/@grpc/grpc-js/src/internal-channel.ts +++ /dev/null @@ -1,878 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { ChannelCredentials } from './channel-credentials'; -import { ChannelOptions } from './channel-options'; -import { ResolvingLoadBalancer } from './resolving-load-balancer'; -import { SubchannelPool, getSubchannelPool } from './subchannel-pool'; -import { ChannelControlHelper } from './load-balancer'; -import { UnavailablePicker, Picker, QueuePicker, PickArgs, PickResult, PickResultType } from './picker'; -import { Metadata } from './metadata'; -import { Status, LogVerbosity, Propagate } from './constants'; -import { FilterStackFactory } from './filter-stack'; -import { CompressionFilterFactory } from './compression-filter'; -import { - CallConfig, - ConfigSelector, - getDefaultAuthority, - mapUriDefaultScheme, -} from './resolver'; -import { trace, isTracerEnabled } from './logging'; -import { SubchannelAddress } from './subchannel-address'; -import { mapProxyName } from './http_proxy'; -import { GrpcUri, parseUri, uriToString } from './uri-parser'; -import { ServerSurfaceCall } from './server-call'; - -import { ConnectivityState } from './connectivity-state'; -import { - ChannelInfo, - ChannelRef, - ChannelzCallTracker, - ChannelzChildrenTracker, - ChannelzTrace, - registerChannelzChannel, - SubchannelRef, - unregisterChannelzRef, -} from './channelz'; -import { LoadBalancingCall } from './load-balancing-call'; -import { CallCredentials } from './call-credentials'; -import { Call, CallStreamOptions, StatusObject } from './call-interface'; -import { Deadline, deadlineToString } from './deadline'; -import { ResolvingCall } from './resolving-call'; -import { getNextCallNumber } from './call-number'; -import { restrictControlPlaneStatusCode } from './control-plane-status'; -import { - MessageBufferTracker, - RetryingCall, - RetryThrottler, -} from './retrying-call'; -import { - BaseSubchannelWrapper, - ConnectivityStateListener, - SubchannelInterface, -} from './subchannel-interface'; - -/** - * See https://nodejs.org/api/timers.html#timers_setinterval_callback_delay_args - */ -const MAX_TIMEOUT_TIME = 2147483647; - -const MIN_IDLE_TIMEOUT_MS = 1000; - -// 30 minutes -const DEFAULT_IDLE_TIMEOUT_MS = 30 * 60 * 1000; - -interface ConnectivityStateWatcher { - currentState: ConnectivityState; - timer: NodeJS.Timeout | null; - callback: (error?: Error) => void; -} - -interface NoneConfigResult { - type: 'NONE'; -} - -interface SuccessConfigResult { - type: 'SUCCESS'; - config: CallConfig; -} - -interface ErrorConfigResult { - type: 'ERROR'; - error: StatusObject; -} - -type GetConfigResult = - | NoneConfigResult - | SuccessConfigResult - | ErrorConfigResult; - -const RETRY_THROTTLER_MAP: Map = new Map(); - -const DEFAULT_RETRY_BUFFER_SIZE_BYTES = 1 << 24; // 16 MB -const DEFAULT_PER_RPC_RETRY_BUFFER_SIZE_BYTES = 1 << 20; // 1 MB - -class ChannelSubchannelWrapper - extends BaseSubchannelWrapper - implements SubchannelInterface -{ - private refCount = 0; - private subchannelStateListener: ConnectivityStateListener; - constructor( - childSubchannel: SubchannelInterface, - private channel: InternalChannel - ) { - super(childSubchannel); - this.subchannelStateListener = ( - subchannel, - previousState, - newState, - keepaliveTime - ) => { - channel.throttleKeepalive(keepaliveTime); - }; - } - - ref(): void { - if (this.refCount === 0) { - this.child.addConnectivityStateListener(this.subchannelStateListener); - this.channel.addWrappedSubchannel(this); - } - this.child.ref(); - this.refCount += 1; - } - - unref(): void { - this.child.unref(); - this.refCount -= 1; - if (this.refCount <= 0) { - this.child.removeConnectivityStateListener(this.subchannelStateListener); - this.channel.removeWrappedSubchannel(this); - } - } -} - -class ShutdownPicker implements Picker { - pick(pickArgs: PickArgs): PickResult { - return { - pickResultType: PickResultType.DROP, - status: { - code: Status.UNAVAILABLE, - details: 'Channel closed before call started', - metadata: new Metadata() - }, - subchannel: null, - onCallStarted: null, - onCallEnded: null - } - } -} - -export const SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX = 'grpc.internal.no_subchannel'; -class ChannelzInfoTracker { - readonly trace = new ChannelzTrace(); - readonly callTracker = new ChannelzCallTracker(); - readonly childrenTracker = new ChannelzChildrenTracker(); - state: ConnectivityState = ConnectivityState.IDLE; - constructor(private target: string) {} - - getChannelzInfoCallback(): () => ChannelInfo { - return () => { - return { - target: this.target, - state: this.state, - trace: this.trace, - callTracker: this.callTracker, - children: this.childrenTracker.getChildLists() - }; - }; - } -} - -export class InternalChannel { - private readonly resolvingLoadBalancer: ResolvingLoadBalancer; - private readonly subchannelPool: SubchannelPool; - private connectivityState: ConnectivityState = ConnectivityState.IDLE; - private currentPicker: Picker = new UnavailablePicker(); - /** - * Calls queued up to get a call config. Should only be populated before the - * first time the resolver returns a result, which includes the ConfigSelector. - */ - private configSelectionQueue: ResolvingCall[] = []; - private pickQueue: LoadBalancingCall[] = []; - private connectivityStateWatchers: ConnectivityStateWatcher[] = []; - private readonly defaultAuthority: string; - private readonly filterStackFactory: FilterStackFactory; - private readonly target: GrpcUri; - /** - * This timer does not do anything on its own. Its purpose is to hold the - * event loop open while there are any pending calls for the channel that - * have not yet been assigned to specific subchannels. In other words, - * the invariant is that callRefTimer is reffed if and only if pickQueue - * is non-empty. In addition, the timer is null while the state is IDLE or - * SHUTDOWN and there are no pending calls. - */ - private callRefTimer: NodeJS.Timeout | null = null; - private configSelector: ConfigSelector | null = null; - /** - * This is the error from the name resolver if it failed most recently. It - * is only used to end calls that start while there is no config selector - * and the name resolver is in backoff, so it should be nulled if - * configSelector becomes set or the channel state becomes anything other - * than TRANSIENT_FAILURE. - */ - private currentResolutionError: StatusObject | null = null; - private readonly retryBufferTracker: MessageBufferTracker; - private keepaliveTime: number; - private readonly wrappedSubchannels: Set = - new Set(); - - private callCount = 0; - private idleTimer: NodeJS.Timeout | null = null; - private readonly idleTimeoutMs: number; - private lastActivityTimestamp: Date; - - // Channelz info - private readonly channelzEnabled: boolean = true; - private readonly channelzRef: ChannelRef; - private readonly channelzInfoTracker: ChannelzInfoTracker; - - /** - * Randomly generated ID to be passed to the config selector, for use by - * ring_hash in xDS. An integer distributed approximately uniformly between - * 0 and MAX_SAFE_INTEGER. - */ - private readonly randomChannelId = Math.floor( - Math.random() * Number.MAX_SAFE_INTEGER - ); - - constructor( - target: string, - private readonly credentials: ChannelCredentials, - private readonly options: ChannelOptions - ) { - if (typeof target !== 'string') { - throw new TypeError('Channel target must be a string'); - } - if (!(credentials instanceof ChannelCredentials)) { - throw new TypeError( - 'Channel credentials must be a ChannelCredentials object' - ); - } - if (options) { - if (typeof options !== 'object') { - throw new TypeError('Channel options must be an object'); - } - } - this.channelzInfoTracker = new ChannelzInfoTracker(target); - const originalTargetUri = parseUri(target); - if (originalTargetUri === null) { - throw new Error(`Could not parse target name "${target}"`); - } - /* This ensures that the target has a scheme that is registered with the - * resolver */ - const defaultSchemeMapResult = mapUriDefaultScheme(originalTargetUri); - if (defaultSchemeMapResult === null) { - throw new Error( - `Could not find a default scheme for target name "${target}"` - ); - } - - if (this.options['grpc.enable_channelz'] === 0) { - this.channelzEnabled = false; - } - - this.channelzRef = registerChannelzChannel( - target, - this.channelzInfoTracker.getChannelzInfoCallback(), - this.channelzEnabled - ); - if (this.channelzEnabled) { - this.channelzInfoTracker.trace.addTrace('CT_INFO', 'Channel created'); - } - - if (this.options['grpc.default_authority']) { - this.defaultAuthority = this.options['grpc.default_authority'] as string; - } else { - this.defaultAuthority = getDefaultAuthority(defaultSchemeMapResult); - } - const proxyMapResult = mapProxyName(defaultSchemeMapResult, options); - this.target = proxyMapResult.target; - this.options = Object.assign({}, this.options, proxyMapResult.extraOptions); - - /* The global boolean parameter to getSubchannelPool has the inverse meaning to what - * the grpc.use_local_subchannel_pool channel option means. */ - this.subchannelPool = getSubchannelPool( - (this.options['grpc.use_local_subchannel_pool'] ?? 0) === 0 - ); - this.retryBufferTracker = new MessageBufferTracker( - this.options['grpc.retry_buffer_size'] ?? DEFAULT_RETRY_BUFFER_SIZE_BYTES, - this.options['grpc.per_rpc_retry_buffer_size'] ?? - DEFAULT_PER_RPC_RETRY_BUFFER_SIZE_BYTES - ); - this.keepaliveTime = this.options['grpc.keepalive_time_ms'] ?? -1; - this.idleTimeoutMs = Math.max( - this.options['grpc.client_idle_timeout_ms'] ?? DEFAULT_IDLE_TIMEOUT_MS, - MIN_IDLE_TIMEOUT_MS - ); - const channelControlHelper: ChannelControlHelper = { - createSubchannel: ( - subchannelAddress: SubchannelAddress, - subchannelArgs: ChannelOptions - ) => { - const finalSubchannelArgs: ChannelOptions = {}; - for (const [key, value] of Object.entries(subchannelArgs)) { - if (!key.startsWith(SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX)) { - finalSubchannelArgs[key] = value; - } - } - const subchannel = this.subchannelPool.getOrCreateSubchannel( - this.target, - subchannelAddress, - finalSubchannelArgs, - this.credentials - ); - subchannel.throttleKeepalive(this.keepaliveTime); - if (this.channelzEnabled) { - this.channelzInfoTracker.trace.addTrace( - 'CT_INFO', - 'Created subchannel or used existing subchannel', - subchannel.getChannelzRef() - ); - } - const wrappedSubchannel = new ChannelSubchannelWrapper( - subchannel, - this - ); - return wrappedSubchannel; - }, - updateState: (connectivityState: ConnectivityState, picker: Picker) => { - this.currentPicker = picker; - const queueCopy = this.pickQueue.slice(); - this.pickQueue = []; - if (queueCopy.length > 0) { - this.callRefTimerUnref(); - } - for (const call of queueCopy) { - call.doPick(); - } - this.updateState(connectivityState); - }, - requestReresolution: () => { - // This should never be called. - throw new Error( - 'Resolving load balancer should never call requestReresolution' - ); - }, - addChannelzChild: (child: ChannelRef | SubchannelRef) => { - if (this.channelzEnabled) { - this.channelzInfoTracker.childrenTracker.refChild(child); - } - }, - removeChannelzChild: (child: ChannelRef | SubchannelRef) => { - if (this.channelzEnabled) { - this.channelzInfoTracker.childrenTracker.unrefChild(child); - } - }, - }; - this.resolvingLoadBalancer = new ResolvingLoadBalancer( - this.target, - channelControlHelper, - this.options, - (serviceConfig, configSelector) => { - if (serviceConfig.retryThrottling) { - RETRY_THROTTLER_MAP.set( - this.getTarget(), - new RetryThrottler( - serviceConfig.retryThrottling.maxTokens, - serviceConfig.retryThrottling.tokenRatio, - RETRY_THROTTLER_MAP.get(this.getTarget()) - ) - ); - } else { - RETRY_THROTTLER_MAP.delete(this.getTarget()); - } - if (this.channelzEnabled) { - this.channelzInfoTracker.trace.addTrace( - 'CT_INFO', - 'Address resolution succeeded' - ); - } - this.configSelector?.unref(); - this.configSelector = configSelector; - this.currentResolutionError = null; - /* We process the queue asynchronously to ensure that the corresponding - * load balancer update has completed. */ - process.nextTick(() => { - const localQueue = this.configSelectionQueue; - this.configSelectionQueue = []; - if (localQueue.length > 0) { - this.callRefTimerUnref(); - } - for (const call of localQueue) { - call.getConfig(); - } - }); - }, - status => { - if (this.channelzEnabled) { - this.channelzInfoTracker.trace.addTrace( - 'CT_WARNING', - 'Address resolution failed with code ' + - status.code + - ' and details "' + - status.details + - '"' - ); - } - if (this.configSelectionQueue.length > 0) { - this.trace( - 'Name resolution failed with calls queued for config selection' - ); - } - if (this.configSelector === null) { - this.currentResolutionError = { - ...restrictControlPlaneStatusCode(status.code, status.details), - metadata: status.metadata, - }; - } - const localQueue = this.configSelectionQueue; - this.configSelectionQueue = []; - if (localQueue.length > 0) { - this.callRefTimerUnref(); - } - for (const call of localQueue) { - call.reportResolverError(status); - } - } - ); - this.filterStackFactory = new FilterStackFactory([ - new CompressionFilterFactory(this, this.options), - ]); - this.trace( - 'Channel constructed with options ' + - JSON.stringify(options, undefined, 2) - ); - const error = new Error(); - if (isTracerEnabled('channel_stacktrace')){ - trace( - LogVerbosity.DEBUG, - 'channel_stacktrace', - '(' + - this.channelzRef.id + - ') ' + - 'Channel constructed \n' + - error.stack?.substring(error.stack.indexOf('\n') + 1) - ); - } - this.lastActivityTimestamp = new Date(); - } - - private trace(text: string, verbosityOverride?: LogVerbosity) { - trace( - verbosityOverride ?? LogVerbosity.DEBUG, - 'channel', - '(' + this.channelzRef.id + ') ' + uriToString(this.target) + ' ' + text - ); - } - - private callRefTimerRef() { - if (!this.callRefTimer) { - this.callRefTimer = setInterval(() => {}, MAX_TIMEOUT_TIME) - } - // If the hasRef function does not exist, always run the code - if (!this.callRefTimer.hasRef?.()) { - this.trace( - 'callRefTimer.ref | configSelectionQueue.length=' + - this.configSelectionQueue.length + - ' pickQueue.length=' + - this.pickQueue.length - ); - this.callRefTimer.ref?.(); - } - } - - private callRefTimerUnref() { - // If the timer or the hasRef function does not exist, always run the code - if (!this.callRefTimer?.hasRef || this.callRefTimer.hasRef()) { - this.trace( - 'callRefTimer.unref | configSelectionQueue.length=' + - this.configSelectionQueue.length + - ' pickQueue.length=' + - this.pickQueue.length - ); - this.callRefTimer?.unref?.(); - } - } - - private removeConnectivityStateWatcher( - watcherObject: ConnectivityStateWatcher - ) { - const watcherIndex = this.connectivityStateWatchers.findIndex( - value => value === watcherObject - ); - if (watcherIndex >= 0) { - this.connectivityStateWatchers.splice(watcherIndex, 1); - } - } - - private updateState(newState: ConnectivityState): void { - trace( - LogVerbosity.DEBUG, - 'connectivity_state', - '(' + - this.channelzRef.id + - ') ' + - uriToString(this.target) + - ' ' + - ConnectivityState[this.connectivityState] + - ' -> ' + - ConnectivityState[newState] - ); - if (this.channelzEnabled) { - this.channelzInfoTracker.trace.addTrace( - 'CT_INFO', - 'Connectivity state change to ' + ConnectivityState[newState] - ); - } - this.connectivityState = newState; - this.channelzInfoTracker.state = newState; - const watchersCopy = this.connectivityStateWatchers.slice(); - for (const watcherObject of watchersCopy) { - if (newState !== watcherObject.currentState) { - if (watcherObject.timer) { - clearTimeout(watcherObject.timer); - } - this.removeConnectivityStateWatcher(watcherObject); - watcherObject.callback(); - } - } - if (newState !== ConnectivityState.TRANSIENT_FAILURE) { - this.currentResolutionError = null; - } - } - - throttleKeepalive(newKeepaliveTime: number) { - if (newKeepaliveTime > this.keepaliveTime) { - this.keepaliveTime = newKeepaliveTime; - for (const wrappedSubchannel of this.wrappedSubchannels) { - wrappedSubchannel.throttleKeepalive(newKeepaliveTime); - } - } - } - - addWrappedSubchannel(wrappedSubchannel: ChannelSubchannelWrapper) { - this.wrappedSubchannels.add(wrappedSubchannel); - } - - removeWrappedSubchannel(wrappedSubchannel: ChannelSubchannelWrapper) { - this.wrappedSubchannels.delete(wrappedSubchannel); - } - - doPick(metadata: Metadata, extraPickInfo: { [key: string]: string }) { - return this.currentPicker.pick({ - metadata: metadata, - extraPickInfo: extraPickInfo, - }); - } - - queueCallForPick(call: LoadBalancingCall) { - this.pickQueue.push(call); - this.callRefTimerRef(); - } - - getConfig(method: string, metadata: Metadata): GetConfigResult { - if (this.connectivityState !== ConnectivityState.SHUTDOWN) { - this.resolvingLoadBalancer.exitIdle(); - } - if (this.configSelector) { - return { - type: 'SUCCESS', - config: this.configSelector.invoke(method, metadata, this.randomChannelId), - }; - } else { - if (this.currentResolutionError) { - return { - type: 'ERROR', - error: this.currentResolutionError, - }; - } else { - return { - type: 'NONE', - }; - } - } - } - - queueCallForConfig(call: ResolvingCall) { - this.configSelectionQueue.push(call); - this.callRefTimerRef(); - } - - private enterIdle() { - this.resolvingLoadBalancer.destroy(); - this.updateState(ConnectivityState.IDLE); - this.currentPicker = new QueuePicker(this.resolvingLoadBalancer); - if (this.idleTimer) { - clearTimeout(this.idleTimer); - this.idleTimer = null; - } - if (this.callRefTimer) { - clearInterval(this.callRefTimer); - this.callRefTimer = null; - } - } - - private startIdleTimeout(timeoutMs: number) { - this.idleTimer = setTimeout(() => { - if (this.callCount > 0) { - /* If there is currently a call, the channel will not go idle for a - * period of at least idleTimeoutMs, so check again after that time. - */ - this.startIdleTimeout(this.idleTimeoutMs); - return; - } - const now = new Date(); - const timeSinceLastActivity = - now.valueOf() - this.lastActivityTimestamp.valueOf(); - if (timeSinceLastActivity >= this.idleTimeoutMs) { - this.trace( - 'Idle timer triggered after ' + - this.idleTimeoutMs + - 'ms of inactivity' - ); - this.enterIdle(); - } else { - /* Whenever the timer fires with the latest activity being too recent, - * set the timer again for the time when the time since the last - * activity is equal to the timeout. This should result in the timer - * firing no more than once every idleTimeoutMs/2 on average. */ - this.startIdleTimeout(this.idleTimeoutMs - timeSinceLastActivity); - } - }, timeoutMs); - this.idleTimer.unref?.(); - } - - private maybeStartIdleTimer() { - if ( - this.connectivityState !== ConnectivityState.SHUTDOWN && - !this.idleTimer - ) { - this.startIdleTimeout(this.idleTimeoutMs); - } - } - - private onCallStart() { - if (this.channelzEnabled) { - this.channelzInfoTracker.callTracker.addCallStarted(); - } - this.callCount += 1; - } - - private onCallEnd(status: StatusObject) { - if (this.channelzEnabled) { - if (status.code === Status.OK) { - this.channelzInfoTracker.callTracker.addCallSucceeded(); - } else { - this.channelzInfoTracker.callTracker.addCallFailed(); - } - } - this.callCount -= 1; - this.lastActivityTimestamp = new Date(); - this.maybeStartIdleTimer(); - } - - createLoadBalancingCall( - callConfig: CallConfig, - method: string, - host: string, - credentials: CallCredentials, - deadline: Deadline - ): LoadBalancingCall { - const callNumber = getNextCallNumber(); - this.trace( - 'createLoadBalancingCall [' + callNumber + '] method="' + method + '"' - ); - return new LoadBalancingCall( - this, - callConfig, - method, - host, - credentials, - deadline, - callNumber - ); - } - - createRetryingCall( - callConfig: CallConfig, - method: string, - host: string, - credentials: CallCredentials, - deadline: Deadline - ): RetryingCall { - const callNumber = getNextCallNumber(); - this.trace( - 'createRetryingCall [' + callNumber + '] method="' + method + '"' - ); - return new RetryingCall( - this, - callConfig, - method, - host, - credentials, - deadline, - callNumber, - this.retryBufferTracker, - RETRY_THROTTLER_MAP.get(this.getTarget()) - ); - } - - createResolvingCall( - method: string, - deadline: Deadline, - host: string | null | undefined, - parentCall: ServerSurfaceCall | null, - propagateFlags: number | null | undefined - ): ResolvingCall { - const callNumber = getNextCallNumber(); - this.trace( - 'createResolvingCall [' + - callNumber + - '] method="' + - method + - '", deadline=' + - deadlineToString(deadline) - ); - const finalOptions: CallStreamOptions = { - deadline: deadline, - flags: propagateFlags ?? Propagate.DEFAULTS, - host: host ?? this.defaultAuthority, - parentCall: parentCall, - }; - - const call = new ResolvingCall( - this, - method, - finalOptions, - this.filterStackFactory.clone(), - callNumber - ); - - this.onCallStart(); - call.addStatusWatcher(status => { - this.onCallEnd(status); - }); - return call; - } - - close() { - this.resolvingLoadBalancer.destroy(); - this.updateState(ConnectivityState.SHUTDOWN); - this.currentPicker = new ShutdownPicker(); - for (const call of this.configSelectionQueue) { - call.cancelWithStatus(Status.UNAVAILABLE, 'Channel closed before call started'); - } - this.configSelectionQueue = []; - for (const call of this.pickQueue) { - call.cancelWithStatus(Status.UNAVAILABLE, 'Channel closed before call started'); - } - this.pickQueue = []; - if (this.callRefTimer) { - clearInterval(this.callRefTimer); - } - if (this.idleTimer) { - clearTimeout(this.idleTimer); - } - if (this.channelzEnabled) { - unregisterChannelzRef(this.channelzRef); - } - - this.subchannelPool.unrefUnusedSubchannels(); - this.configSelector?.unref(); - this.configSelector = null; - } - - getTarget() { - return uriToString(this.target); - } - - getConnectivityState(tryToConnect: boolean) { - const connectivityState = this.connectivityState; - if (tryToConnect) { - this.resolvingLoadBalancer.exitIdle(); - this.lastActivityTimestamp = new Date(); - this.maybeStartIdleTimer(); - } - return connectivityState; - } - - watchConnectivityState( - currentState: ConnectivityState, - deadline: Date | number, - callback: (error?: Error) => void - ): void { - if (this.connectivityState === ConnectivityState.SHUTDOWN) { - throw new Error('Channel has been shut down'); - } - let timer = null; - if (deadline !== Infinity) { - const deadlineDate: Date = - deadline instanceof Date ? deadline : new Date(deadline); - const now = new Date(); - if (deadline === -Infinity || deadlineDate <= now) { - process.nextTick( - callback, - new Error('Deadline passed without connectivity state change') - ); - return; - } - timer = setTimeout(() => { - this.removeConnectivityStateWatcher(watcherObject); - callback( - new Error('Deadline passed without connectivity state change') - ); - }, deadlineDate.getTime() - now.getTime()); - } - const watcherObject = { - currentState, - callback, - timer, - }; - this.connectivityStateWatchers.push(watcherObject); - } - - /** - * Get the channelz reference object for this channel. The returned value is - * garbage if channelz is disabled for this channel. - * @returns - */ - getChannelzRef() { - return this.channelzRef; - } - - createCall( - method: string, - deadline: Deadline, - host: string | null | undefined, - parentCall: ServerSurfaceCall | null, - propagateFlags: number | null | undefined - ): Call { - if (typeof method !== 'string') { - throw new TypeError('Channel#createCall: method must be a string'); - } - if (!(typeof deadline === 'number' || deadline instanceof Date)) { - throw new TypeError( - 'Channel#createCall: deadline must be a number or Date' - ); - } - if (this.connectivityState === ConnectivityState.SHUTDOWN) { - throw new Error('Channel has been shut down'); - } - return this.createResolvingCall( - method, - deadline, - host, - parentCall, - propagateFlags - ); - } - - getOptions() { - return this.options; - } -} diff --git a/node_modules/@grpc/grpc-js/src/load-balancer-child-handler.ts b/node_modules/@grpc/grpc-js/src/load-balancer-child-handler.ts deleted file mode 100644 index 0257808..0000000 --- a/node_modules/@grpc/grpc-js/src/load-balancer-child-handler.ts +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright 2020 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { - LoadBalancer, - ChannelControlHelper, - TypedLoadBalancingConfig, - createLoadBalancer, -} from './load-balancer'; -import { Endpoint, SubchannelAddress } from './subchannel-address'; -import { ChannelOptions } from './channel-options'; -import { ConnectivityState } from './connectivity-state'; -import { Picker } from './picker'; -import type { ChannelRef, SubchannelRef } from './channelz'; -import { SubchannelInterface } from './subchannel-interface'; -import { StatusOr } from './call-interface'; - -const TYPE_NAME = 'child_load_balancer_helper'; - -export class ChildLoadBalancerHandler { - private currentChild: LoadBalancer | null = null; - private pendingChild: LoadBalancer | null = null; - private latestConfig: TypedLoadBalancingConfig | null = null; - - private ChildPolicyHelper = class { - private child: LoadBalancer | null = null; - constructor(private parent: ChildLoadBalancerHandler) {} - createSubchannel( - subchannelAddress: SubchannelAddress, - subchannelArgs: ChannelOptions - ): SubchannelInterface { - return this.parent.channelControlHelper.createSubchannel( - subchannelAddress, - subchannelArgs - ); - } - updateState(connectivityState: ConnectivityState, picker: Picker, errorMessage: string | null): void { - if (this.calledByPendingChild()) { - if (connectivityState === ConnectivityState.CONNECTING) { - return; - } - this.parent.currentChild?.destroy(); - this.parent.currentChild = this.parent.pendingChild; - this.parent.pendingChild = null; - } else if (!this.calledByCurrentChild()) { - return; - } - this.parent.channelControlHelper.updateState(connectivityState, picker, errorMessage); - } - requestReresolution(): void { - const latestChild = this.parent.pendingChild ?? this.parent.currentChild; - if (this.child === latestChild) { - this.parent.channelControlHelper.requestReresolution(); - } - } - setChild(newChild: LoadBalancer) { - this.child = newChild; - } - addChannelzChild(child: ChannelRef | SubchannelRef) { - this.parent.channelControlHelper.addChannelzChild(child); - } - removeChannelzChild(child: ChannelRef | SubchannelRef) { - this.parent.channelControlHelper.removeChannelzChild(child); - } - - private calledByPendingChild(): boolean { - return this.child === this.parent.pendingChild; - } - private calledByCurrentChild(): boolean { - return this.child === this.parent.currentChild; - } - }; - - constructor( - private readonly channelControlHelper: ChannelControlHelper - ) {} - - protected configUpdateRequiresNewPolicyInstance( - oldConfig: TypedLoadBalancingConfig, - newConfig: TypedLoadBalancingConfig - ): boolean { - return oldConfig.getLoadBalancerName() !== newConfig.getLoadBalancerName(); - } - - /** - * Prerequisites: lbConfig !== null and lbConfig.name is registered - * @param endpointList - * @param lbConfig - * @param attributes - */ - updateAddressList( - endpointList: StatusOr, - lbConfig: TypedLoadBalancingConfig, - options: ChannelOptions, - resolutionNote: string - ): boolean { - let childToUpdate: LoadBalancer; - if ( - this.currentChild === null || - this.latestConfig === null || - this.configUpdateRequiresNewPolicyInstance(this.latestConfig, lbConfig) - ) { - const newHelper = new this.ChildPolicyHelper(this); - const newChild = createLoadBalancer(lbConfig, newHelper)!; - newHelper.setChild(newChild); - if (this.currentChild === null) { - this.currentChild = newChild; - childToUpdate = this.currentChild; - } else { - if (this.pendingChild) { - this.pendingChild.destroy(); - } - this.pendingChild = newChild; - childToUpdate = this.pendingChild; - } - } else { - if (this.pendingChild === null) { - childToUpdate = this.currentChild; - } else { - childToUpdate = this.pendingChild; - } - } - this.latestConfig = lbConfig; - return childToUpdate.updateAddressList(endpointList, lbConfig, options, resolutionNote); - } - exitIdle(): void { - if (this.currentChild) { - this.currentChild.exitIdle(); - if (this.pendingChild) { - this.pendingChild.exitIdle(); - } - } - } - resetBackoff(): void { - if (this.currentChild) { - this.currentChild.resetBackoff(); - if (this.pendingChild) { - this.pendingChild.resetBackoff(); - } - } - } - destroy(): void { - /* Note: state updates are only propagated from the child balancer if that - * object is equal to this.currentChild or this.pendingChild. Since this - * function sets both of those to null, no further state updates will - * occur after this function returns. */ - if (this.currentChild) { - this.currentChild.destroy(); - this.currentChild = null; - } - if (this.pendingChild) { - this.pendingChild.destroy(); - this.pendingChild = null; - } - } - getTypeName(): string { - return TYPE_NAME; - } -} diff --git a/node_modules/@grpc/grpc-js/src/load-balancer-outlier-detection.ts b/node_modules/@grpc/grpc-js/src/load-balancer-outlier-detection.ts deleted file mode 100644 index 4fa4b42..0000000 --- a/node_modules/@grpc/grpc-js/src/load-balancer-outlier-detection.ts +++ /dev/null @@ -1,840 +0,0 @@ -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { ChannelOptions } from './channel-options'; -import { ConnectivityState } from './connectivity-state'; -import { LogVerbosity, Status } from './constants'; -import { Duration, durationToMs, isDuration, msToDuration } from './duration'; -import { - ChannelControlHelper, - createChildChannelControlHelper, - registerLoadBalancerType, -} from './experimental'; -import { - selectLbConfigFromList, - LoadBalancer, - TypedLoadBalancingConfig, -} from './load-balancer'; -import { ChildLoadBalancerHandler } from './load-balancer-child-handler'; -import { PickArgs, Picker, PickResult, PickResultType } from './picker'; -import { - Endpoint, - EndpointMap, - SubchannelAddress, - endpointToString, -} from './subchannel-address'; -import { - BaseSubchannelWrapper, - SubchannelInterface, -} from './subchannel-interface'; -import * as logging from './logging'; -import { LoadBalancingConfig } from './service-config'; -import { StatusOr } from './call-interface'; - -const TRACER_NAME = 'outlier_detection'; - -function trace(text: string): void { - logging.trace(LogVerbosity.DEBUG, TRACER_NAME, text); -} - -const TYPE_NAME = 'outlier_detection'; - -const OUTLIER_DETECTION_ENABLED = - (process.env.GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION ?? 'true') === 'true'; - -export interface SuccessRateEjectionConfig { - readonly stdev_factor: number; - readonly enforcement_percentage: number; - readonly minimum_hosts: number; - readonly request_volume: number; -} - -export interface FailurePercentageEjectionConfig { - readonly threshold: number; - readonly enforcement_percentage: number; - readonly minimum_hosts: number; - readonly request_volume: number; -} - -export interface OutlierDetectionRawConfig { - interval?: Duration; - base_ejection_time?: Duration; - max_ejection_time?: Duration; - max_ejection_percent?: number; - success_rate_ejection?: Partial; - failure_percentage_ejection?: Partial; - child_policy: LoadBalancingConfig[]; -} - -const defaultSuccessRateEjectionConfig: SuccessRateEjectionConfig = { - stdev_factor: 1900, - enforcement_percentage: 100, - minimum_hosts: 5, - request_volume: 100, -}; - -const defaultFailurePercentageEjectionConfig: FailurePercentageEjectionConfig = - { - threshold: 85, - enforcement_percentage: 100, - minimum_hosts: 5, - request_volume: 50, - }; - -type TypeofValues = - | 'object' - | 'boolean' - | 'function' - | 'number' - | 'string' - | 'undefined'; - -function validateFieldType( - obj: any, - fieldName: string, - expectedType: TypeofValues, - objectName?: string -) { - if ( - fieldName in obj && - obj[fieldName] !== undefined && - typeof obj[fieldName] !== expectedType - ) { - const fullFieldName = objectName ? `${objectName}.${fieldName}` : fieldName; - throw new Error( - `outlier detection config ${fullFieldName} parse error: expected ${expectedType}, got ${typeof obj[ - fieldName - ]}` - ); - } -} - -function validatePositiveDuration( - obj: any, - fieldName: string, - objectName?: string -) { - const fullFieldName = objectName ? `${objectName}.${fieldName}` : fieldName; - if (fieldName in obj && obj[fieldName] !== undefined) { - if (!isDuration(obj[fieldName])) { - throw new Error( - `outlier detection config ${fullFieldName} parse error: expected Duration, got ${typeof obj[ - fieldName - ]}` - ); - } - if ( - !( - obj[fieldName].seconds >= 0 && - obj[fieldName].seconds <= 315_576_000_000 && - obj[fieldName].nanos >= 0 && - obj[fieldName].nanos <= 999_999_999 - ) - ) { - throw new Error( - `outlier detection config ${fullFieldName} parse error: values out of range for non-negative Duaration` - ); - } - } -} - -function validatePercentage(obj: any, fieldName: string, objectName?: string) { - const fullFieldName = objectName ? `${objectName}.${fieldName}` : fieldName; - validateFieldType(obj, fieldName, 'number', objectName); - if ( - fieldName in obj && - obj[fieldName] !== undefined && - !(obj[fieldName] >= 0 && obj[fieldName] <= 100) - ) { - throw new Error( - `outlier detection config ${fullFieldName} parse error: value out of range for percentage (0-100)` - ); - } -} - -export class OutlierDetectionLoadBalancingConfig - implements TypedLoadBalancingConfig -{ - private readonly intervalMs: number; - private readonly baseEjectionTimeMs: number; - private readonly maxEjectionTimeMs: number; - private readonly maxEjectionPercent: number; - private readonly successRateEjection: SuccessRateEjectionConfig | null; - private readonly failurePercentageEjection: FailurePercentageEjectionConfig | null; - - constructor( - intervalMs: number | null, - baseEjectionTimeMs: number | null, - maxEjectionTimeMs: number | null, - maxEjectionPercent: number | null, - successRateEjection: Partial | null, - failurePercentageEjection: Partial | null, - private readonly childPolicy: TypedLoadBalancingConfig - ) { - if (childPolicy.getLoadBalancerName() === 'pick_first') { - throw new Error( - 'outlier_detection LB policy cannot have a pick_first child policy' - ); - } - this.intervalMs = intervalMs ?? 10_000; - this.baseEjectionTimeMs = baseEjectionTimeMs ?? 30_000; - this.maxEjectionTimeMs = maxEjectionTimeMs ?? 300_000; - this.maxEjectionPercent = maxEjectionPercent ?? 10; - this.successRateEjection = successRateEjection - ? { ...defaultSuccessRateEjectionConfig, ...successRateEjection } - : null; - this.failurePercentageEjection = failurePercentageEjection - ? { - ...defaultFailurePercentageEjectionConfig, - ...failurePercentageEjection, - } - : null; - } - getLoadBalancerName(): string { - return TYPE_NAME; - } - toJsonObject(): object { - return { - outlier_detection: { - interval: msToDuration(this.intervalMs), - base_ejection_time: msToDuration(this.baseEjectionTimeMs), - max_ejection_time: msToDuration(this.maxEjectionTimeMs), - max_ejection_percent: this.maxEjectionPercent, - success_rate_ejection: this.successRateEjection ?? undefined, - failure_percentage_ejection: - this.failurePercentageEjection ?? undefined, - child_policy: [this.childPolicy.toJsonObject()], - }, - }; - } - - getIntervalMs(): number { - return this.intervalMs; - } - getBaseEjectionTimeMs(): number { - return this.baseEjectionTimeMs; - } - getMaxEjectionTimeMs(): number { - return this.maxEjectionTimeMs; - } - getMaxEjectionPercent(): number { - return this.maxEjectionPercent; - } - getSuccessRateEjectionConfig(): SuccessRateEjectionConfig | null { - return this.successRateEjection; - } - getFailurePercentageEjectionConfig(): FailurePercentageEjectionConfig | null { - return this.failurePercentageEjection; - } - getChildPolicy(): TypedLoadBalancingConfig { - return this.childPolicy; - } - - static createFromJson(obj: any): OutlierDetectionLoadBalancingConfig { - validatePositiveDuration(obj, 'interval'); - validatePositiveDuration(obj, 'base_ejection_time'); - validatePositiveDuration(obj, 'max_ejection_time'); - validatePercentage(obj, 'max_ejection_percent'); - if ( - 'success_rate_ejection' in obj && - obj.success_rate_ejection !== undefined - ) { - if (typeof obj.success_rate_ejection !== 'object') { - throw new Error( - 'outlier detection config success_rate_ejection must be an object' - ); - } - validateFieldType( - obj.success_rate_ejection, - 'stdev_factor', - 'number', - 'success_rate_ejection' - ); - validatePercentage( - obj.success_rate_ejection, - 'enforcement_percentage', - 'success_rate_ejection' - ); - validateFieldType( - obj.success_rate_ejection, - 'minimum_hosts', - 'number', - 'success_rate_ejection' - ); - validateFieldType( - obj.success_rate_ejection, - 'request_volume', - 'number', - 'success_rate_ejection' - ); - } - if ( - 'failure_percentage_ejection' in obj && - obj.failure_percentage_ejection !== undefined - ) { - if (typeof obj.failure_percentage_ejection !== 'object') { - throw new Error( - 'outlier detection config failure_percentage_ejection must be an object' - ); - } - validatePercentage( - obj.failure_percentage_ejection, - 'threshold', - 'failure_percentage_ejection' - ); - validatePercentage( - obj.failure_percentage_ejection, - 'enforcement_percentage', - 'failure_percentage_ejection' - ); - validateFieldType( - obj.failure_percentage_ejection, - 'minimum_hosts', - 'number', - 'failure_percentage_ejection' - ); - validateFieldType( - obj.failure_percentage_ejection, - 'request_volume', - 'number', - 'failure_percentage_ejection' - ); - } - - if (!('child_policy' in obj) || !Array.isArray(obj.child_policy)) { - throw new Error('outlier detection config child_policy must be an array'); - } - const childPolicy = selectLbConfigFromList(obj.child_policy); - if (!childPolicy) { - throw new Error( - 'outlier detection config child_policy: no valid recognized policy found' - ); - } - - return new OutlierDetectionLoadBalancingConfig( - obj.interval ? durationToMs(obj.interval) : null, - obj.base_ejection_time ? durationToMs(obj.base_ejection_time) : null, - obj.max_ejection_time ? durationToMs(obj.max_ejection_time) : null, - obj.max_ejection_percent ?? null, - obj.success_rate_ejection, - obj.failure_percentage_ejection, - childPolicy - ); - } -} - -class OutlierDetectionSubchannelWrapper - extends BaseSubchannelWrapper - implements SubchannelInterface -{ - private refCount = 0; - constructor( - childSubchannel: SubchannelInterface, - private mapEntry?: MapEntry - ) { - super(childSubchannel); - } - - ref() { - this.child.ref(); - this.refCount += 1; - } - - unref() { - this.child.unref(); - this.refCount -= 1; - if (this.refCount <= 0) { - if (this.mapEntry) { - const index = this.mapEntry.subchannelWrappers.indexOf(this); - if (index >= 0) { - this.mapEntry.subchannelWrappers.splice(index, 1); - } - } - } - } - - eject() { - this.setHealthy(false); - } - - uneject() { - this.setHealthy(true); - } - - getMapEntry(): MapEntry | undefined { - return this.mapEntry; - } - - getWrappedSubchannel(): SubchannelInterface { - return this.child; - } -} - -interface CallCountBucket { - success: number; - failure: number; -} - -function createEmptyBucket(): CallCountBucket { - return { - success: 0, - failure: 0, - }; -} - -class CallCounter { - private activeBucket: CallCountBucket = createEmptyBucket(); - private inactiveBucket: CallCountBucket = createEmptyBucket(); - addSuccess() { - this.activeBucket.success += 1; - } - addFailure() { - this.activeBucket.failure += 1; - } - switchBuckets() { - this.inactiveBucket = this.activeBucket; - this.activeBucket = createEmptyBucket(); - } - getLastSuccesses() { - return this.inactiveBucket.success; - } - getLastFailures() { - return this.inactiveBucket.failure; - } -} - -class OutlierDetectionPicker implements Picker { - constructor(private wrappedPicker: Picker, private countCalls: boolean) {} - pick(pickArgs: PickArgs): PickResult { - const wrappedPick = this.wrappedPicker.pick(pickArgs); - if (wrappedPick.pickResultType === PickResultType.COMPLETE) { - const subchannelWrapper = - wrappedPick.subchannel as OutlierDetectionSubchannelWrapper; - const mapEntry = subchannelWrapper.getMapEntry(); - if (mapEntry) { - let onCallEnded = wrappedPick.onCallEnded; - if (this.countCalls) { - onCallEnded = (statusCode, details, metadata) => { - if (statusCode === Status.OK) { - mapEntry.counter.addSuccess(); - } else { - mapEntry.counter.addFailure(); - } - wrappedPick.onCallEnded?.(statusCode, details, metadata); - }; - } - return { - ...wrappedPick, - subchannel: subchannelWrapper.getWrappedSubchannel(), - onCallEnded: onCallEnded, - }; - } else { - return { - ...wrappedPick, - subchannel: subchannelWrapper.getWrappedSubchannel(), - }; - } - } else { - return wrappedPick; - } - } -} - -interface MapEntry { - counter: CallCounter; - currentEjectionTimestamp: Date | null; - ejectionTimeMultiplier: number; - subchannelWrappers: OutlierDetectionSubchannelWrapper[]; -} - -export class OutlierDetectionLoadBalancer implements LoadBalancer { - private childBalancer: ChildLoadBalancerHandler; - private entryMap = new EndpointMap(); - private latestConfig: OutlierDetectionLoadBalancingConfig | null = null; - private ejectionTimer: NodeJS.Timeout; - private timerStartTime: Date | null = null; - - constructor( - channelControlHelper: ChannelControlHelper - ) { - this.childBalancer = new ChildLoadBalancerHandler( - createChildChannelControlHelper(channelControlHelper, { - createSubchannel: ( - subchannelAddress: SubchannelAddress, - subchannelArgs: ChannelOptions - ) => { - const originalSubchannel = channelControlHelper.createSubchannel( - subchannelAddress, - subchannelArgs - ); - const mapEntry = - this.entryMap.getForSubchannelAddress(subchannelAddress); - const subchannelWrapper = new OutlierDetectionSubchannelWrapper( - originalSubchannel, - mapEntry - ); - if (mapEntry?.currentEjectionTimestamp !== null) { - // If the address is ejected, propagate that to the new subchannel wrapper - subchannelWrapper.eject(); - } - mapEntry?.subchannelWrappers.push(subchannelWrapper); - return subchannelWrapper; - }, - updateState: (connectivityState: ConnectivityState, picker: Picker, errorMessage: string) => { - if (connectivityState === ConnectivityState.READY) { - channelControlHelper.updateState( - connectivityState, - new OutlierDetectionPicker(picker, this.isCountingEnabled()), - errorMessage - ); - } else { - channelControlHelper.updateState(connectivityState, picker, errorMessage); - } - }, - }) - ); - this.ejectionTimer = setInterval(() => {}, 0); - clearInterval(this.ejectionTimer); - } - - private isCountingEnabled(): boolean { - return ( - this.latestConfig !== null && - (this.latestConfig.getSuccessRateEjectionConfig() !== null || - this.latestConfig.getFailurePercentageEjectionConfig() !== null) - ); - } - - private getCurrentEjectionPercent() { - let ejectionCount = 0; - for (const mapEntry of this.entryMap.values()) { - if (mapEntry.currentEjectionTimestamp !== null) { - ejectionCount += 1; - } - } - return (ejectionCount * 100) / this.entryMap.size; - } - - private runSuccessRateCheck(ejectionTimestamp: Date) { - if (!this.latestConfig) { - return; - } - const successRateConfig = this.latestConfig.getSuccessRateEjectionConfig(); - if (!successRateConfig) { - return; - } - trace('Running success rate check'); - // Step 1 - const targetRequestVolume = successRateConfig.request_volume; - let addresesWithTargetVolume = 0; - const successRates: number[] = []; - for (const [endpoint, mapEntry] of this.entryMap.entries()) { - const successes = mapEntry.counter.getLastSuccesses(); - const failures = mapEntry.counter.getLastFailures(); - trace( - 'Stats for ' + - endpointToString(endpoint) + - ': successes=' + - successes + - ' failures=' + - failures + - ' targetRequestVolume=' + - targetRequestVolume - ); - if (successes + failures >= targetRequestVolume) { - addresesWithTargetVolume += 1; - successRates.push(successes / (successes + failures)); - } - } - trace( - 'Found ' + - addresesWithTargetVolume + - ' success rate candidates; currentEjectionPercent=' + - this.getCurrentEjectionPercent() + - ' successRates=[' + - successRates + - ']' - ); - if (addresesWithTargetVolume < successRateConfig.minimum_hosts) { - return; - } - - // Step 2 - const successRateMean = - successRates.reduce((a, b) => a + b) / successRates.length; - let successRateDeviationSum = 0; - for (const rate of successRates) { - const deviation = rate - successRateMean; - successRateDeviationSum += deviation * deviation; - } - const successRateVariance = successRateDeviationSum / successRates.length; - const successRateStdev = Math.sqrt(successRateVariance); - const ejectionThreshold = - successRateMean - - successRateStdev * (successRateConfig.stdev_factor / 1000); - trace( - 'stdev=' + successRateStdev + ' ejectionThreshold=' + ejectionThreshold - ); - - // Step 3 - for (const [address, mapEntry] of this.entryMap.entries()) { - // Step 3.i - if ( - this.getCurrentEjectionPercent() >= - this.latestConfig.getMaxEjectionPercent() - ) { - break; - } - // Step 3.ii - const successes = mapEntry.counter.getLastSuccesses(); - const failures = mapEntry.counter.getLastFailures(); - if (successes + failures < targetRequestVolume) { - continue; - } - // Step 3.iii - const successRate = successes / (successes + failures); - trace('Checking candidate ' + address + ' successRate=' + successRate); - if (successRate < ejectionThreshold) { - const randomNumber = Math.random() * 100; - trace( - 'Candidate ' + - address + - ' randomNumber=' + - randomNumber + - ' enforcement_percentage=' + - successRateConfig.enforcement_percentage - ); - if (randomNumber < successRateConfig.enforcement_percentage) { - trace('Ejecting candidate ' + address); - this.eject(mapEntry, ejectionTimestamp); - } - } - } - } - - private runFailurePercentageCheck(ejectionTimestamp: Date) { - if (!this.latestConfig) { - return; - } - const failurePercentageConfig = - this.latestConfig.getFailurePercentageEjectionConfig(); - if (!failurePercentageConfig) { - return; - } - trace( - 'Running failure percentage check. threshold=' + - failurePercentageConfig.threshold + - ' request volume threshold=' + - failurePercentageConfig.request_volume - ); - // Step 1 - let addressesWithTargetVolume = 0; - for (const mapEntry of this.entryMap.values()) { - const successes = mapEntry.counter.getLastSuccesses(); - const failures = mapEntry.counter.getLastFailures(); - if (successes + failures >= failurePercentageConfig.request_volume) { - addressesWithTargetVolume += 1; - } - } - if (addressesWithTargetVolume < failurePercentageConfig.minimum_hosts) { - return; - } - - // Step 2 - for (const [address, mapEntry] of this.entryMap.entries()) { - // Step 2.i - if ( - this.getCurrentEjectionPercent() >= - this.latestConfig.getMaxEjectionPercent() - ) { - break; - } - // Step 2.ii - const successes = mapEntry.counter.getLastSuccesses(); - const failures = mapEntry.counter.getLastFailures(); - trace('Candidate successes=' + successes + ' failures=' + failures); - if (successes + failures < failurePercentageConfig.request_volume) { - continue; - } - // Step 2.iii - const failurePercentage = (failures * 100) / (failures + successes); - if (failurePercentage > failurePercentageConfig.threshold) { - const randomNumber = Math.random() * 100; - trace( - 'Candidate ' + - address + - ' randomNumber=' + - randomNumber + - ' enforcement_percentage=' + - failurePercentageConfig.enforcement_percentage - ); - if (randomNumber < failurePercentageConfig.enforcement_percentage) { - trace('Ejecting candidate ' + address); - this.eject(mapEntry, ejectionTimestamp); - } - } - } - } - - private eject(mapEntry: MapEntry, ejectionTimestamp: Date) { - mapEntry.currentEjectionTimestamp = new Date(); - mapEntry.ejectionTimeMultiplier += 1; - for (const subchannelWrapper of mapEntry.subchannelWrappers) { - subchannelWrapper.eject(); - } - } - - private uneject(mapEntry: MapEntry) { - mapEntry.currentEjectionTimestamp = null; - for (const subchannelWrapper of mapEntry.subchannelWrappers) { - subchannelWrapper.uneject(); - } - } - - private switchAllBuckets() { - for (const mapEntry of this.entryMap.values()) { - mapEntry.counter.switchBuckets(); - } - } - - private startTimer(delayMs: number) { - this.ejectionTimer = setTimeout(() => this.runChecks(), delayMs); - this.ejectionTimer.unref?.(); - } - - private runChecks() { - const ejectionTimestamp = new Date(); - trace('Ejection timer running'); - - this.switchAllBuckets(); - - if (!this.latestConfig) { - return; - } - this.timerStartTime = ejectionTimestamp; - this.startTimer(this.latestConfig.getIntervalMs()); - - this.runSuccessRateCheck(ejectionTimestamp); - this.runFailurePercentageCheck(ejectionTimestamp); - - for (const [address, mapEntry] of this.entryMap.entries()) { - if (mapEntry.currentEjectionTimestamp === null) { - if (mapEntry.ejectionTimeMultiplier > 0) { - mapEntry.ejectionTimeMultiplier -= 1; - } - } else { - const baseEjectionTimeMs = this.latestConfig.getBaseEjectionTimeMs(); - const maxEjectionTimeMs = this.latestConfig.getMaxEjectionTimeMs(); - const returnTime = new Date( - mapEntry.currentEjectionTimestamp.getTime() - ); - returnTime.setMilliseconds( - returnTime.getMilliseconds() + - Math.min( - baseEjectionTimeMs * mapEntry.ejectionTimeMultiplier, - Math.max(baseEjectionTimeMs, maxEjectionTimeMs) - ) - ); - if (returnTime < new Date()) { - trace('Unejecting ' + address); - this.uneject(mapEntry); - } - } - } - } - - updateAddressList( - endpointList: StatusOr, - lbConfig: TypedLoadBalancingConfig, - options: ChannelOptions, - resolutionNote: string - ): boolean { - if (!(lbConfig instanceof OutlierDetectionLoadBalancingConfig)) { - return false; - } - trace('Received update with config: ' + JSON.stringify(lbConfig.toJsonObject(), undefined, 2)); - if (endpointList.ok) { - for (const endpoint of endpointList.value) { - if (!this.entryMap.has(endpoint)) { - trace('Adding map entry for ' + endpointToString(endpoint)); - this.entryMap.set(endpoint, { - counter: new CallCounter(), - currentEjectionTimestamp: null, - ejectionTimeMultiplier: 0, - subchannelWrappers: [], - }); - } - } - this.entryMap.deleteMissing(endpointList.value); - } - const childPolicy = lbConfig.getChildPolicy(); - this.childBalancer.updateAddressList(endpointList, childPolicy, options, resolutionNote); - - if ( - lbConfig.getSuccessRateEjectionConfig() || - lbConfig.getFailurePercentageEjectionConfig() - ) { - if (this.timerStartTime) { - trace('Previous timer existed. Replacing timer'); - clearTimeout(this.ejectionTimer); - const remainingDelay = - lbConfig.getIntervalMs() - - (new Date().getTime() - this.timerStartTime.getTime()); - this.startTimer(remainingDelay); - } else { - trace('Starting new timer'); - this.timerStartTime = new Date(); - this.startTimer(lbConfig.getIntervalMs()); - this.switchAllBuckets(); - } - } else { - trace('Counting disabled. Cancelling timer.'); - this.timerStartTime = null; - clearTimeout(this.ejectionTimer); - for (const mapEntry of this.entryMap.values()) { - this.uneject(mapEntry); - mapEntry.ejectionTimeMultiplier = 0; - } - } - - this.latestConfig = lbConfig; - return true; - } - exitIdle(): void { - this.childBalancer.exitIdle(); - } - resetBackoff(): void { - this.childBalancer.resetBackoff(); - } - destroy(): void { - clearTimeout(this.ejectionTimer); - this.childBalancer.destroy(); - } - getTypeName(): string { - return TYPE_NAME; - } -} - -export function setup() { - if (OUTLIER_DETECTION_ENABLED) { - registerLoadBalancerType( - TYPE_NAME, - OutlierDetectionLoadBalancer, - OutlierDetectionLoadBalancingConfig - ); - } -} diff --git a/node_modules/@grpc/grpc-js/src/load-balancer-pick-first.ts b/node_modules/@grpc/grpc-js/src/load-balancer-pick-first.ts deleted file mode 100644 index f0df79d..0000000 --- a/node_modules/@grpc/grpc-js/src/load-balancer-pick-first.ts +++ /dev/null @@ -1,662 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { - LoadBalancer, - ChannelControlHelper, - TypedLoadBalancingConfig, - registerDefaultLoadBalancerType, - registerLoadBalancerType, - createChildChannelControlHelper, -} from './load-balancer'; -import { ConnectivityState } from './connectivity-state'; -import { - QueuePicker, - Picker, - PickArgs, - CompletePickResult, - PickResultType, - UnavailablePicker, -} from './picker'; -import { Endpoint, SubchannelAddress, subchannelAddressToString } from './subchannel-address'; -import * as logging from './logging'; -import { LogVerbosity } from './constants'; -import { - SubchannelInterface, - ConnectivityStateListener, - HealthListener, -} from './subchannel-interface'; -import { isTcpSubchannelAddress } from './subchannel-address'; -import { isIPv6 } from 'net'; -import { ChannelOptions } from './channel-options'; -import { StatusOr, statusOrFromValue } from './call-interface'; - -const TRACER_NAME = 'pick_first'; - -function trace(text: string): void { - logging.trace(LogVerbosity.DEBUG, TRACER_NAME, text); -} - -const TYPE_NAME = 'pick_first'; - -/** - * Delay after starting a connection on a subchannel before starting a - * connection on the next subchannel in the list, for Happy Eyeballs algorithm. - */ -const CONNECTION_DELAY_INTERVAL_MS = 250; - -export class PickFirstLoadBalancingConfig implements TypedLoadBalancingConfig { - constructor(private readonly shuffleAddressList: boolean) {} - - getLoadBalancerName(): string { - return TYPE_NAME; - } - - toJsonObject(): object { - return { - [TYPE_NAME]: { - shuffleAddressList: this.shuffleAddressList, - }, - }; - } - - getShuffleAddressList() { - return this.shuffleAddressList; - } - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - static createFromJson(obj: any) { - if ( - 'shuffleAddressList' in obj && - !(typeof obj.shuffleAddressList === 'boolean') - ) { - throw new Error( - 'pick_first config field shuffleAddressList must be a boolean if provided' - ); - } - return new PickFirstLoadBalancingConfig(obj.shuffleAddressList === true); - } -} - -/** - * Picker for a `PickFirstLoadBalancer` in the READY state. Always returns the - * picked subchannel. - */ -class PickFirstPicker implements Picker { - constructor(private subchannel: SubchannelInterface) {} - - pick(pickArgs: PickArgs): CompletePickResult { - return { - pickResultType: PickResultType.COMPLETE, - subchannel: this.subchannel, - status: null, - onCallStarted: null, - onCallEnded: null, - }; - } -} - -interface SubchannelChild { - subchannel: SubchannelInterface; - hasReportedTransientFailure: boolean; -} - -/** - * Return a new array with the elements of the input array in a random order - * @param list The input array - * @returns A shuffled array of the elements of list - */ -export function shuffled(list: T[]): T[] { - const result = list.slice(); - for (let i = result.length - 1; i > 1; i--) { - const j = Math.floor(Math.random() * (i + 1)); - const temp = result[i]; - result[i] = result[j]; - result[j] = temp; - } - return result; -} - -/** - * Interleave addresses in addressList by family in accordance with RFC-8304 section 4 - * @param addressList - * @returns - */ -function interleaveAddressFamilies( - addressList: SubchannelAddress[] -): SubchannelAddress[] { - if (addressList.length === 0) { - return []; - } - const result: SubchannelAddress[] = []; - const ipv6Addresses: SubchannelAddress[] = []; - const ipv4Addresses: SubchannelAddress[] = []; - const ipv6First = - isTcpSubchannelAddress(addressList[0]) && isIPv6(addressList[0].host); - for (const address of addressList) { - if (isTcpSubchannelAddress(address) && isIPv6(address.host)) { - ipv6Addresses.push(address); - } else { - ipv4Addresses.push(address); - } - } - const firstList = ipv6First ? ipv6Addresses : ipv4Addresses; - const secondList = ipv6First ? ipv4Addresses : ipv6Addresses; - for (let i = 0; i < Math.max(firstList.length, secondList.length); i++) { - if (i < firstList.length) { - result.push(firstList[i]); - } - if (i < secondList.length) { - result.push(secondList[i]); - } - } - return result; -} - -const REPORT_HEALTH_STATUS_OPTION_NAME = - 'grpc-node.internal.pick-first.report_health_status'; - -export class PickFirstLoadBalancer implements LoadBalancer { - /** - * The list of subchannels this load balancer is currently attempting to - * connect to. - */ - private children: SubchannelChild[] = []; - /** - * The current connectivity state of the load balancer. - */ - private currentState: ConnectivityState = ConnectivityState.IDLE; - /** - * The index within the `subchannels` array of the subchannel with the most - * recently started connection attempt. - */ - private currentSubchannelIndex = 0; - /** - * The currently picked subchannel used for making calls. Populated if - * and only if the load balancer's current state is READY. In that case, - * the subchannel's current state is also READY. - */ - private currentPick: SubchannelInterface | null = null; - /** - * Listener callback attached to each subchannel in the `subchannels` list - * while establishing a connection. - */ - private subchannelStateListener: ConnectivityStateListener = ( - subchannel, - previousState, - newState, - keepaliveTime, - errorMessage - ) => { - this.onSubchannelStateUpdate( - subchannel, - previousState, - newState, - errorMessage - ); - }; - - private pickedSubchannelHealthListener: HealthListener = () => - this.calculateAndReportNewState(); - /** - * Timer reference for the timer tracking when to start - */ - private connectionDelayTimeout: NodeJS.Timeout; - - /** - * The LB policy enters sticky TRANSIENT_FAILURE mode when all - * subchannels have failed to connect at least once, and it stays in that - * mode until a connection attempt is successful. While in sticky TF mode, - * the LB policy continuously attempts to connect to all of its subchannels. - */ - private stickyTransientFailureMode = false; - - private reportHealthStatus: boolean = false; - - /** - * The most recent error reported by any subchannel as it transitioned to - * TRANSIENT_FAILURE. - */ - private lastError: string | null = null; - - private latestAddressList: SubchannelAddress[] | null = null; - - private latestOptions: ChannelOptions = {}; - - private latestResolutionNote: string = ''; - - /** - * Load balancer that attempts to connect to each backend in the address list - * in order, and picks the first one that connects, using it for every - * request. - * @param channelControlHelper `ChannelControlHelper` instance provided by - * this load balancer's owner. - */ - constructor( - private readonly channelControlHelper: ChannelControlHelper - ) { - this.connectionDelayTimeout = setTimeout(() => {}, 0); - clearTimeout(this.connectionDelayTimeout); - } - - private allChildrenHaveReportedTF(): boolean { - return this.children.every(child => child.hasReportedTransientFailure); - } - - private resetChildrenReportedTF() { - this.children.every(child => child.hasReportedTransientFailure = false); - } - - private calculateAndReportNewState() { - if (this.currentPick) { - if (this.reportHealthStatus && !this.currentPick.isHealthy()) { - const errorMessage = `Picked subchannel ${this.currentPick.getAddress()} is unhealthy`; - this.updateState( - ConnectivityState.TRANSIENT_FAILURE, - new UnavailablePicker({ - details: errorMessage, - }), - errorMessage - ); - } else { - this.updateState( - ConnectivityState.READY, - new PickFirstPicker(this.currentPick), - null - ); - } - } else if (this.latestAddressList?.length === 0) { - const errorMessage = `No connection established. Last error: ${this.lastError}. Resolution note: ${this.latestResolutionNote}`; - this.updateState( - ConnectivityState.TRANSIENT_FAILURE, - new UnavailablePicker({ - details: errorMessage, - }), - errorMessage - ); - } else if (this.children.length === 0) { - this.updateState(ConnectivityState.IDLE, new QueuePicker(this), null); - } else { - if (this.stickyTransientFailureMode) { - const errorMessage = `No connection established. Last error: ${this.lastError}. Resolution note: ${this.latestResolutionNote}`; - this.updateState( - ConnectivityState.TRANSIENT_FAILURE, - new UnavailablePicker({ - details: errorMessage, - }), - errorMessage - ); - } else { - this.updateState(ConnectivityState.CONNECTING, new QueuePicker(this), null); - } - } - } - - private requestReresolution() { - this.channelControlHelper.requestReresolution(); - } - - private maybeEnterStickyTransientFailureMode() { - if (!this.allChildrenHaveReportedTF()) { - return; - } - this.requestReresolution(); - this.resetChildrenReportedTF(); - if (this.stickyTransientFailureMode) { - this.calculateAndReportNewState(); - return; - } - this.stickyTransientFailureMode = true; - for (const { subchannel } of this.children) { - subchannel.startConnecting(); - } - this.calculateAndReportNewState(); - } - - private removeCurrentPick() { - if (this.currentPick !== null) { - this.currentPick.removeConnectivityStateListener(this.subchannelStateListener); - this.channelControlHelper.removeChannelzChild( - this.currentPick.getChannelzRef() - ); - this.currentPick.removeHealthStateWatcher( - this.pickedSubchannelHealthListener - ); - // Unref last, to avoid triggering listeners - this.currentPick.unref(); - this.currentPick = null; - } - } - - private onSubchannelStateUpdate( - subchannel: SubchannelInterface, - previousState: ConnectivityState, - newState: ConnectivityState, - errorMessage?: string - ) { - if (this.currentPick?.realSubchannelEquals(subchannel)) { - if (newState !== ConnectivityState.READY) { - this.removeCurrentPick(); - this.calculateAndReportNewState(); - } - return; - } - for (const [index, child] of this.children.entries()) { - if (subchannel.realSubchannelEquals(child.subchannel)) { - if (newState === ConnectivityState.READY) { - this.pickSubchannel(child.subchannel); - } - if (newState === ConnectivityState.TRANSIENT_FAILURE) { - child.hasReportedTransientFailure = true; - if (errorMessage) { - this.lastError = errorMessage; - } - this.maybeEnterStickyTransientFailureMode(); - if (index === this.currentSubchannelIndex) { - this.startNextSubchannelConnecting(index + 1); - } - } - child.subchannel.startConnecting(); - return; - } - } - } - - private startNextSubchannelConnecting(startIndex: number) { - clearTimeout(this.connectionDelayTimeout); - for (const [index, child] of this.children.entries()) { - if (index >= startIndex) { - const subchannelState = child.subchannel.getConnectivityState(); - if ( - subchannelState === ConnectivityState.IDLE || - subchannelState === ConnectivityState.CONNECTING - ) { - this.startConnecting(index); - return; - } - } - } - this.maybeEnterStickyTransientFailureMode(); - } - - /** - * Have a single subchannel in the `subchannels` list start connecting. - * @param subchannelIndex The index into the `subchannels` list. - */ - private startConnecting(subchannelIndex: number) { - clearTimeout(this.connectionDelayTimeout); - this.currentSubchannelIndex = subchannelIndex; - if ( - this.children[subchannelIndex].subchannel.getConnectivityState() === - ConnectivityState.IDLE - ) { - trace( - 'Start connecting to subchannel with address ' + - this.children[subchannelIndex].subchannel.getAddress() - ); - process.nextTick(() => { - this.children[subchannelIndex]?.subchannel.startConnecting(); - }); - } - this.connectionDelayTimeout = setTimeout(() => { - this.startNextSubchannelConnecting(subchannelIndex + 1); - }, CONNECTION_DELAY_INTERVAL_MS); - this.connectionDelayTimeout.unref?.(); - } - - /** - * Declare that the specified subchannel should be used to make requests. - * This functions the same independent of whether subchannel is a member of - * this.children and whether it is equal to this.currentPick. - * Prerequisite: subchannel.getConnectivityState() === READY. - * @param subchannel - */ - private pickSubchannel(subchannel: SubchannelInterface) { - trace('Pick subchannel with address ' + subchannel.getAddress()); - this.stickyTransientFailureMode = false; - /* Ref before removeCurrentPick and resetSubchannelList to avoid the - * refcount dropping to 0 during this process. */ - subchannel.ref(); - this.channelControlHelper.addChannelzChild(subchannel.getChannelzRef()); - this.removeCurrentPick(); - this.resetSubchannelList(); - subchannel.addConnectivityStateListener(this.subchannelStateListener); - subchannel.addHealthStateWatcher(this.pickedSubchannelHealthListener); - this.currentPick = subchannel; - clearTimeout(this.connectionDelayTimeout); - this.calculateAndReportNewState(); - } - - private updateState(newState: ConnectivityState, picker: Picker, errorMessage: string | null) { - trace( - ConnectivityState[this.currentState] + - ' -> ' + - ConnectivityState[newState] - ); - this.currentState = newState; - this.channelControlHelper.updateState(newState, picker, errorMessage); - } - - private resetSubchannelList() { - for (const child of this.children) { - /* Always remoev the connectivity state listener. If the subchannel is - getting picked, it will be re-added then. */ - child.subchannel.removeConnectivityStateListener( - this.subchannelStateListener - ); - /* Refs are counted independently for the children list and the - * currentPick, so we call unref whether or not the child is the - * currentPick. Channelz child references are also refcounted, so - * removeChannelzChild can be handled the same way. */ - child.subchannel.unref(); - this.channelControlHelper.removeChannelzChild( - child.subchannel.getChannelzRef() - ); - } - this.currentSubchannelIndex = 0; - this.children = []; - } - - private connectToAddressList(addressList: SubchannelAddress[], options: ChannelOptions) { - trace('connectToAddressList([' + addressList.map(address => subchannelAddressToString(address)) + '])'); - const newChildrenList = addressList.map(address => ({ - subchannel: this.channelControlHelper.createSubchannel(address, options), - hasReportedTransientFailure: false, - })); - for (const { subchannel } of newChildrenList) { - if (subchannel.getConnectivityState() === ConnectivityState.READY) { - this.pickSubchannel(subchannel); - return; - } - } - /* Ref each subchannel before resetting the list, to ensure that - * subchannels shared between the list don't drop to 0 refs during the - * transition. */ - for (const { subchannel } of newChildrenList) { - subchannel.ref(); - this.channelControlHelper.addChannelzChild(subchannel.getChannelzRef()); - } - this.resetSubchannelList(); - this.children = newChildrenList; - for (const { subchannel } of this.children) { - subchannel.addConnectivityStateListener(this.subchannelStateListener); - } - for (const child of this.children) { - if ( - child.subchannel.getConnectivityState() === - ConnectivityState.TRANSIENT_FAILURE - ) { - child.hasReportedTransientFailure = true; - } - } - this.startNextSubchannelConnecting(0); - this.calculateAndReportNewState(); - } - - updateAddressList( - maybeEndpointList: StatusOr, - lbConfig: TypedLoadBalancingConfig, - options: ChannelOptions, - resolutionNote: string - ): boolean { - if (!(lbConfig instanceof PickFirstLoadBalancingConfig)) { - return false; - } - if (!maybeEndpointList.ok) { - if (this.children.length === 0 && this.currentPick === null) { - this.channelControlHelper.updateState( - ConnectivityState.TRANSIENT_FAILURE, - new UnavailablePicker(maybeEndpointList.error), - maybeEndpointList.error.details - ); - } - return true; - } - let endpointList = maybeEndpointList.value; - this.reportHealthStatus = options[REPORT_HEALTH_STATUS_OPTION_NAME]; - /* Previously, an update would be discarded if it was identical to the - * previous update, to minimize churn. Now the DNS resolver is - * rate-limited, so that is less of a concern. */ - if (lbConfig.getShuffleAddressList()) { - endpointList = shuffled(endpointList); - } - const rawAddressList = ([] as SubchannelAddress[]).concat( - ...endpointList.map(endpoint => endpoint.addresses) - ); - trace('updateAddressList([' + rawAddressList.map(address => subchannelAddressToString(address)) + '])'); - const addressList = interleaveAddressFamilies(rawAddressList); - this.latestAddressList = addressList; - this.latestOptions = options; - this.connectToAddressList(addressList, options); - this.latestResolutionNote = resolutionNote; - if (rawAddressList.length > 0) { - return true; - } else { - this.lastError = 'No addresses resolved'; - return false; - } - } - - exitIdle() { - if ( - this.currentState === ConnectivityState.IDLE && - this.latestAddressList - ) { - this.connectToAddressList(this.latestAddressList, this.latestOptions); - } - } - - resetBackoff() { - /* The pick first load balancer does not have a connection backoff, so this - * does nothing */ - } - - destroy() { - this.resetSubchannelList(); - this.removeCurrentPick(); - } - - getTypeName(): string { - return TYPE_NAME; - } -} - -const LEAF_CONFIG = new PickFirstLoadBalancingConfig(false); - -/** - * This class handles the leaf load balancing operations for a single endpoint. - * It is a thin wrapper around a PickFirstLoadBalancer with a different API - * that more closely reflects how it will be used as a leaf balancer. - */ -export class LeafLoadBalancer { - private pickFirstBalancer: PickFirstLoadBalancer; - private latestState: ConnectivityState = ConnectivityState.IDLE; - private latestPicker: Picker; - constructor( - private endpoint: Endpoint, - channelControlHelper: ChannelControlHelper, - private options: ChannelOptions, - private resolutionNote: string - ) { - const childChannelControlHelper = createChildChannelControlHelper( - channelControlHelper, - { - updateState: (connectivityState, picker, errorMessage) => { - this.latestState = connectivityState; - this.latestPicker = picker; - channelControlHelper.updateState(connectivityState, picker, errorMessage); - }, - } - ); - this.pickFirstBalancer = new PickFirstLoadBalancer( - childChannelControlHelper - ); - this.latestPicker = new QueuePicker(this.pickFirstBalancer); - } - - startConnecting() { - this.pickFirstBalancer.updateAddressList( - statusOrFromValue([this.endpoint]), - LEAF_CONFIG, - { ...this.options, [REPORT_HEALTH_STATUS_OPTION_NAME]: true }, - this.resolutionNote - ); - } - - /** - * Update the endpoint associated with this LeafLoadBalancer to a new - * endpoint. Does not trigger connection establishment if a connection - * attempt is not already in progress. - * @param newEndpoint - */ - updateEndpoint(newEndpoint: Endpoint, newOptions: ChannelOptions) { - this.options = newOptions; - this.endpoint = newEndpoint; - if (this.latestState !== ConnectivityState.IDLE) { - this.startConnecting(); - } - } - - getConnectivityState() { - return this.latestState; - } - - getPicker() { - return this.latestPicker; - } - - getEndpoint() { - return this.endpoint; - } - - exitIdle() { - this.pickFirstBalancer.exitIdle(); - } - - destroy() { - this.pickFirstBalancer.destroy(); - } -} - -export function setup(): void { - registerLoadBalancerType( - TYPE_NAME, - PickFirstLoadBalancer, - PickFirstLoadBalancingConfig - ); - registerDefaultLoadBalancerType(TYPE_NAME); -} diff --git a/node_modules/@grpc/grpc-js/src/load-balancer-round-robin.ts b/node_modules/@grpc/grpc-js/src/load-balancer-round-robin.ts deleted file mode 100644 index 17756b4..0000000 --- a/node_modules/@grpc/grpc-js/src/load-balancer-round-robin.ts +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { - LoadBalancer, - ChannelControlHelper, - TypedLoadBalancingConfig, - registerLoadBalancerType, - createChildChannelControlHelper, -} from './load-balancer'; -import { ConnectivityState } from './connectivity-state'; -import { - QueuePicker, - Picker, - PickArgs, - UnavailablePicker, - PickResult, -} from './picker'; -import * as logging from './logging'; -import { LogVerbosity } from './constants'; -import { - Endpoint, - endpointEqual, - endpointToString, -} from './subchannel-address'; -import { LeafLoadBalancer } from './load-balancer-pick-first'; -import { ChannelOptions } from './channel-options'; -import { StatusOr } from './call-interface'; - -const TRACER_NAME = 'round_robin'; - -function trace(text: string): void { - logging.trace(LogVerbosity.DEBUG, TRACER_NAME, text); -} - -const TYPE_NAME = 'round_robin'; - -class RoundRobinLoadBalancingConfig implements TypedLoadBalancingConfig { - getLoadBalancerName(): string { - return TYPE_NAME; - } - - constructor() {} - - toJsonObject(): object { - return { - [TYPE_NAME]: {}, - }; - } - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - static createFromJson(obj: any) { - return new RoundRobinLoadBalancingConfig(); - } -} - -class RoundRobinPicker implements Picker { - constructor( - private readonly children: { endpoint: Endpoint; picker: Picker }[], - private nextIndex = 0 - ) {} - - pick(pickArgs: PickArgs): PickResult { - const childPicker = this.children[this.nextIndex].picker; - this.nextIndex = (this.nextIndex + 1) % this.children.length; - return childPicker.pick(pickArgs); - } - - /** - * Check what the next subchannel returned would be. Used by the load - * balancer implementation to preserve this part of the picker state if - * possible when a subchannel connects or disconnects. - */ - peekNextEndpoint(): Endpoint { - return this.children[this.nextIndex].endpoint; - } -} - -function rotateArray(list: T[], startIndex: number) { - return [...list.slice(startIndex), ...list.slice(0, startIndex)]; -} - -export class RoundRobinLoadBalancer implements LoadBalancer { - private children: LeafLoadBalancer[] = []; - - private currentState: ConnectivityState = ConnectivityState.IDLE; - - private currentReadyPicker: RoundRobinPicker | null = null; - - private updatesPaused = false; - - private childChannelControlHelper: ChannelControlHelper; - - private lastError: string | null = null; - - constructor( - private readonly channelControlHelper: ChannelControlHelper - ) { - this.childChannelControlHelper = createChildChannelControlHelper( - channelControlHelper, - { - updateState: (connectivityState, picker, errorMessage) => { - /* Ensure that name resolution is requested again after active - * connections are dropped. This is more aggressive than necessary to - * accomplish that, so we are counting on resolvers to have - * reasonable rate limits. */ - if (this.currentState === ConnectivityState.READY && connectivityState !== ConnectivityState.READY) { - this.channelControlHelper.requestReresolution(); - } - if (errorMessage) { - this.lastError = errorMessage; - } - this.calculateAndUpdateState(); - }, - } - ); - } - - private countChildrenWithState(state: ConnectivityState) { - return this.children.filter(child => child.getConnectivityState() === state) - .length; - } - - private calculateAndUpdateState() { - if (this.updatesPaused) { - return; - } - if (this.countChildrenWithState(ConnectivityState.READY) > 0) { - const readyChildren = this.children.filter( - child => child.getConnectivityState() === ConnectivityState.READY - ); - let index = 0; - if (this.currentReadyPicker !== null) { - const nextPickedEndpoint = this.currentReadyPicker.peekNextEndpoint(); - index = readyChildren.findIndex(child => - endpointEqual(child.getEndpoint(), nextPickedEndpoint) - ); - if (index < 0) { - index = 0; - } - } - this.updateState( - ConnectivityState.READY, - new RoundRobinPicker( - readyChildren.map(child => ({ - endpoint: child.getEndpoint(), - picker: child.getPicker(), - })), - index - ), - null - ); - } else if (this.countChildrenWithState(ConnectivityState.CONNECTING) > 0) { - this.updateState(ConnectivityState.CONNECTING, new QueuePicker(this), null); - } else if ( - this.countChildrenWithState(ConnectivityState.TRANSIENT_FAILURE) > 0 - ) { - const errorMessage = `round_robin: No connection established. Last error: ${this.lastError}`; - this.updateState( - ConnectivityState.TRANSIENT_FAILURE, - new UnavailablePicker({ - details: errorMessage, - }), - errorMessage - ); - } else { - this.updateState(ConnectivityState.IDLE, new QueuePicker(this), null); - } - /* round_robin should keep all children connected, this is how we do that. - * We can't do this more efficiently in the individual child's updateState - * callback because that doesn't have a reference to which child the state - * change is associated with. */ - for (const child of this.children) { - if (child.getConnectivityState() === ConnectivityState.IDLE) { - child.exitIdle(); - } - } - } - - private updateState(newState: ConnectivityState, picker: Picker, errorMessage: string | null) { - trace( - ConnectivityState[this.currentState] + - ' -> ' + - ConnectivityState[newState] - ); - if (newState === ConnectivityState.READY) { - this.currentReadyPicker = picker as RoundRobinPicker; - } else { - this.currentReadyPicker = null; - } - this.currentState = newState; - this.channelControlHelper.updateState(newState, picker, errorMessage); - } - - private resetSubchannelList() { - for (const child of this.children) { - child.destroy(); - } - this.children = []; - } - - updateAddressList( - maybeEndpointList: StatusOr, - lbConfig: TypedLoadBalancingConfig, - options: ChannelOptions, - resolutionNote: string - ): boolean { - if (!(lbConfig instanceof RoundRobinLoadBalancingConfig)) { - return false; - } - if (!maybeEndpointList.ok) { - if (this.children.length === 0) { - this.updateState( - ConnectivityState.TRANSIENT_FAILURE, - new UnavailablePicker(maybeEndpointList.error), - maybeEndpointList.error.details - ); - } - return true; - } - const startIndex = (Math.random() * maybeEndpointList.value.length) | 0; - const endpointList = rotateArray(maybeEndpointList.value, startIndex); - this.resetSubchannelList(); - if (endpointList.length === 0) { - const errorMessage = `No addresses resolved. Resolution note: ${resolutionNote}`; - this.updateState( - ConnectivityState.TRANSIENT_FAILURE, - new UnavailablePicker({details: errorMessage}), - errorMessage - ); - } - trace('Connect to endpoint list ' + endpointList.map(endpointToString)); - this.updatesPaused = true; - this.children = endpointList.map( - endpoint => - new LeafLoadBalancer( - endpoint, - this.childChannelControlHelper, - options, - resolutionNote - ) - ); - for (const child of this.children) { - child.startConnecting(); - } - this.updatesPaused = false; - this.calculateAndUpdateState(); - return true; - } - - exitIdle(): void { - /* The round_robin LB policy is only in the IDLE state if it has no - * addresses to try to connect to and it has no picked subchannel. - * In that case, there is no meaningful action that can be taken here. */ - } - resetBackoff(): void { - // This LB policy has no backoff to reset - } - destroy(): void { - this.resetSubchannelList(); - } - getTypeName(): string { - return TYPE_NAME; - } -} - -export function setup() { - registerLoadBalancerType( - TYPE_NAME, - RoundRobinLoadBalancer, - RoundRobinLoadBalancingConfig - ); -} diff --git a/node_modules/@grpc/grpc-js/src/load-balancer-weighted-round-robin.ts b/node_modules/@grpc/grpc-js/src/load-balancer-weighted-round-robin.ts deleted file mode 100644 index cdeabc3..0000000 --- a/node_modules/@grpc/grpc-js/src/load-balancer-weighted-round-robin.ts +++ /dev/null @@ -1,494 +0,0 @@ -/* - * Copyright 2025 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { StatusOr } from './call-interface'; -import { ChannelOptions } from './channel-options'; -import { ConnectivityState } from './connectivity-state'; -import { LogVerbosity } from './constants'; -import { Duration, durationMessageToDuration, durationToMs, durationToString, isDuration, isDurationMessage, msToDuration, parseDuration } from './duration'; -import { OrcaLoadReport__Output } from './generated/xds/data/orca/v3/OrcaLoadReport'; -import { ChannelControlHelper, createChildChannelControlHelper, LoadBalancer, registerLoadBalancerType, TypedLoadBalancingConfig } from './load-balancer'; -import { LeafLoadBalancer } from './load-balancer-pick-first'; -import * as logging from './logging'; -import { createMetricsReader, MetricsListener, OrcaOobMetricsSubchannelWrapper } from './orca'; -import { PickArgs, Picker, PickResult, PickResultType, QueuePicker, UnavailablePicker } from './picker'; -import { PriorityQueue } from './priority-queue'; -import { Endpoint, endpointToString } from './subchannel-address'; - -const TRACER_NAME = 'weighted_round_robin'; - -function trace(text: string): void { - logging.trace(LogVerbosity.DEBUG, TRACER_NAME, text); -} - -const TYPE_NAME = 'weighted_round_robin'; - -const DEFAULT_OOB_REPORTING_PERIOD_MS = 10_000; -const DEFAULT_BLACKOUT_PERIOD_MS = 10_000; -const DEFAULT_WEIGHT_EXPIRATION_PERIOD_MS = 3 * 60_000; -const DEFAULT_WEIGHT_UPDATE_PERIOD_MS = 1_000; -const DEFAULT_ERROR_UTILIZATION_PENALTY = 1; - -type TypeofValues = - | 'object' - | 'boolean' - | 'function' - | 'number' - | 'string' - | 'undefined'; - -function validateFieldType( - obj: any, - fieldName: string, - expectedType: TypeofValues -) { - if ( - fieldName in obj && - obj[fieldName] !== undefined && - typeof obj[fieldName] !== expectedType - ) { - throw new Error( - `weighted round robin config ${fieldName} parse error: expected ${expectedType}, got ${typeof obj[ - fieldName - ]}` - ); - } -} - -function parseDurationField(obj: any, fieldName: string): number | null { - if (fieldName in obj && obj[fieldName] !== undefined && obj[fieldName] !== null) { - let durationObject: Duration; - if (isDuration(obj[fieldName])) { - durationObject = obj[fieldName]; - } else if (isDurationMessage(obj[fieldName])) { - durationObject = durationMessageToDuration(obj[fieldName]); - } else if (typeof obj[fieldName] === 'string') { - const parsedDuration = parseDuration(obj[fieldName]); - if (!parsedDuration) { - throw new Error(`weighted round robin config ${fieldName}: failed to parse duration string ${obj[fieldName]}`); - } - durationObject = parsedDuration; - } else { - throw new Error(`weighted round robin config ${fieldName}: expected duration, got ${typeof obj[fieldName]}`); - } - return durationToMs(durationObject); - } - return null; -} - -export class WeightedRoundRobinLoadBalancingConfig implements TypedLoadBalancingConfig { - private readonly enableOobLoadReport: boolean; - private readonly oobLoadReportingPeriodMs: number; - private readonly blackoutPeriodMs: number; - private readonly weightExpirationPeriodMs: number; - private readonly weightUpdatePeriodMs: number; - private readonly errorUtilizationPenalty: number; - - constructor( - enableOobLoadReport: boolean | null, - oobLoadReportingPeriodMs: number | null, - blackoutPeriodMs: number | null, - weightExpirationPeriodMs: number | null, - weightUpdatePeriodMs: number | null, - errorUtilizationPenalty: number | null - ) { - this.enableOobLoadReport = enableOobLoadReport ?? false; - this.oobLoadReportingPeriodMs = oobLoadReportingPeriodMs ?? DEFAULT_OOB_REPORTING_PERIOD_MS; - this.blackoutPeriodMs = blackoutPeriodMs ?? DEFAULT_BLACKOUT_PERIOD_MS; - this.weightExpirationPeriodMs = weightExpirationPeriodMs ?? DEFAULT_WEIGHT_EXPIRATION_PERIOD_MS; - this.weightUpdatePeriodMs = Math.max(weightUpdatePeriodMs ?? DEFAULT_WEIGHT_UPDATE_PERIOD_MS, 100); - this.errorUtilizationPenalty = errorUtilizationPenalty ?? DEFAULT_ERROR_UTILIZATION_PENALTY; - } - - getLoadBalancerName(): string { - return TYPE_NAME; - } - toJsonObject(): object { - return { - enable_oob_load_report: this.enableOobLoadReport, - oob_load_reporting_period: durationToString(msToDuration(this.oobLoadReportingPeriodMs)), - blackout_period: durationToString(msToDuration(this.blackoutPeriodMs)), - weight_expiration_period: durationToString(msToDuration(this.weightExpirationPeriodMs)), - weight_update_period: durationToString(msToDuration(this.weightUpdatePeriodMs)), - error_utilization_penalty: this.errorUtilizationPenalty - }; - } - static createFromJson(obj: any): WeightedRoundRobinLoadBalancingConfig { - validateFieldType(obj, 'enable_oob_load_report', 'boolean'); - validateFieldType(obj, 'error_utilization_penalty', 'number'); - if (obj.error_utilization_penalty < 0) { - throw new Error('weighted round robin config error_utilization_penalty < 0'); - } - return new WeightedRoundRobinLoadBalancingConfig( - obj.enable_oob_load_report, - parseDurationField(obj, 'oob_load_reporting_period'), - parseDurationField(obj, 'blackout_period'), - parseDurationField(obj, 'weight_expiration_period'), - parseDurationField(obj, 'weight_update_period'), - obj.error_utilization_penalty - ) - } - - getEnableOobLoadReport() { - return this.enableOobLoadReport; - } - getOobLoadReportingPeriodMs() { - return this.oobLoadReportingPeriodMs; - } - getBlackoutPeriodMs() { - return this.blackoutPeriodMs; - } - getWeightExpirationPeriodMs() { - return this.weightExpirationPeriodMs; - } - getWeightUpdatePeriodMs() { - return this.weightUpdatePeriodMs; - } - getErrorUtilizationPenalty() { - return this.errorUtilizationPenalty; - } -} - -interface WeightedPicker { - endpointName: string; - picker: Picker; - weight: number; -} - -interface QueueEntry { - endpointName: string; - picker: Picker; - period: number; - deadline: number; -} - -type MetricsHandler = (loadReport: OrcaLoadReport__Output, endpointName: string) => void; - -class WeightedRoundRobinPicker implements Picker { - private queue: PriorityQueue = new PriorityQueue((a, b) => a.deadline < b.deadline); - constructor(children: WeightedPicker[], private readonly metricsHandler: MetricsHandler | null) { - const positiveWeight = children.filter(picker => picker.weight > 0); - let averageWeight: number; - if (positiveWeight.length < 2) { - averageWeight = 1; - } else { - let weightSum: number = 0; - for (const { weight } of positiveWeight) { - weightSum += weight; - } - averageWeight = weightSum / positiveWeight.length; - } - for (const child of children) { - const period = child.weight > 0 ? 1 / child.weight : averageWeight; - this.queue.push({ - endpointName: child.endpointName, - picker: child.picker, - period: period, - deadline: Math.random() * period - }); - } - } - pick(pickArgs: PickArgs): PickResult { - const entry = this.queue.pop()!; - this.queue.push({ - ...entry, - deadline: entry.deadline + entry.period - }) - const childPick = entry.picker.pick(pickArgs); - if (childPick.pickResultType === PickResultType.COMPLETE) { - if (this.metricsHandler) { - return { - ...childPick, - onCallEnded: createMetricsReader(loadReport => this.metricsHandler!(loadReport, entry.endpointName), childPick.onCallEnded) - }; - } else { - const subchannelWrapper = childPick.subchannel as OrcaOobMetricsSubchannelWrapper; - return { - ...childPick, - subchannel: subchannelWrapper.getWrappedSubchannel() - } - } - } else { - return childPick; - } - } -} - -interface ChildEntry { - child: LeafLoadBalancer; - lastUpdated: Date; - nonEmptySince: Date | null; - weight: number; - oobMetricsListener: MetricsListener | null; -} - -class WeightedRoundRobinLoadBalancer implements LoadBalancer { - private latestConfig: WeightedRoundRobinLoadBalancingConfig | null = null; - - private children: Map = new Map(); - - private currentState: ConnectivityState = ConnectivityState.IDLE; - - private updatesPaused = false; - - private lastError: string | null = null; - - private weightUpdateTimer: NodeJS.Timeout | null = null; - - constructor(private readonly channelControlHelper: ChannelControlHelper) {} - - private countChildrenWithState(state: ConnectivityState) { - let count = 0; - for (const entry of this.children.values()) { - if (entry.child.getConnectivityState() === state) { - count += 1; - } - } - return count; - } - - updateWeight(entry: ChildEntry, loadReport: OrcaLoadReport__Output): void { - const qps = loadReport.rps_fractional; - let utilization = loadReport.application_utilization; - if (utilization > 0 && qps > 0) { - utilization += (loadReport.eps / qps) * (this.latestConfig?.getErrorUtilizationPenalty() ?? 0); - } - const newWeight = utilization === 0 ? 0 : qps / utilization; - if (newWeight === 0) { - return; - } - const now = new Date(); - if (entry.nonEmptySince === null) { - entry.nonEmptySince = now; - } - entry.lastUpdated = now; - entry.weight = newWeight; - } - - getWeight(entry: ChildEntry): number { - if (!this.latestConfig) { - return 0; - } - const now = new Date().getTime(); - if (now - entry.lastUpdated.getTime() >= this.latestConfig.getWeightExpirationPeriodMs()) { - entry.nonEmptySince = null; - return 0; - } - const blackoutPeriod = this.latestConfig.getBlackoutPeriodMs(); - if (blackoutPeriod > 0 && (entry.nonEmptySince === null || now - entry.nonEmptySince.getTime() < blackoutPeriod)) { - return 0; - } - return entry.weight; - } - - private calculateAndUpdateState() { - if (this.updatesPaused || !this.latestConfig) { - return; - } - if (this.countChildrenWithState(ConnectivityState.READY) > 0) { - const weightedPickers: WeightedPicker[] = []; - for (const [endpoint, entry] of this.children) { - if (entry.child.getConnectivityState() !== ConnectivityState.READY) { - continue; - } - weightedPickers.push({ - endpointName: endpoint, - picker: entry.child.getPicker(), - weight: this.getWeight(entry) - }); - } - trace('Created picker with weights: ' + weightedPickers.map(entry => entry.endpointName + ':' + entry.weight).join(',')); - let metricsHandler: MetricsHandler | null; - if (!this.latestConfig.getEnableOobLoadReport()) { - metricsHandler = (loadReport, endpointName) => { - const childEntry = this.children.get(endpointName); - if (childEntry) { - this.updateWeight(childEntry, loadReport); - } - }; - } else { - metricsHandler = null; - } - this.updateState( - ConnectivityState.READY, - new WeightedRoundRobinPicker( - weightedPickers, - metricsHandler - ), - null - ); - } else if (this.countChildrenWithState(ConnectivityState.CONNECTING) > 0) { - this.updateState(ConnectivityState.CONNECTING, new QueuePicker(this), null); - } else if ( - this.countChildrenWithState(ConnectivityState.TRANSIENT_FAILURE) > 0 - ) { - const errorMessage = `weighted_round_robin: No connection established. Last error: ${this.lastError}`; - this.updateState( - ConnectivityState.TRANSIENT_FAILURE, - new UnavailablePicker({ - details: errorMessage, - }), - errorMessage - ); - } else { - this.updateState(ConnectivityState.IDLE, new QueuePicker(this), null); - } - /* round_robin should keep all children connected, this is how we do that. - * We can't do this more efficiently in the individual child's updateState - * callback because that doesn't have a reference to which child the state - * change is associated with. */ - for (const {child} of this.children.values()) { - if (child.getConnectivityState() === ConnectivityState.IDLE) { - child.exitIdle(); - } - } - } - - private updateState(newState: ConnectivityState, picker: Picker, errorMessage: string | null) { - trace( - ConnectivityState[this.currentState] + - ' -> ' + - ConnectivityState[newState] - ); - this.currentState = newState; - this.channelControlHelper.updateState(newState, picker, errorMessage); - } - - updateAddressList(maybeEndpointList: StatusOr, lbConfig: TypedLoadBalancingConfig, options: ChannelOptions, resolutionNote: string): boolean { - if (!(lbConfig instanceof WeightedRoundRobinLoadBalancingConfig)) { - return false; - } - if (!maybeEndpointList.ok) { - if (this.children.size === 0) { - this.updateState( - ConnectivityState.TRANSIENT_FAILURE, - new UnavailablePicker(maybeEndpointList.error), - maybeEndpointList.error.details - ); - } - return true; - } - if (maybeEndpointList.value.length === 0) { - const errorMessage = `No addresses resolved. Resolution note: ${resolutionNote}`; - this.updateState( - ConnectivityState.TRANSIENT_FAILURE, - new UnavailablePicker({details: errorMessage}), - errorMessage - ); - return false; - } - trace('Connect to endpoint list ' + maybeEndpointList.value.map(endpointToString)); - const now = new Date(); - const seenEndpointNames = new Set(); - this.updatesPaused = true; - this.latestConfig = lbConfig; - for (const endpoint of maybeEndpointList.value) { - const name = endpointToString(endpoint); - seenEndpointNames.add(name); - let entry = this.children.get(name); - if (!entry) { - entry = { - child: new LeafLoadBalancer(endpoint, createChildChannelControlHelper(this.channelControlHelper, { - updateState: (connectivityState, picker, errorMessage) => { - /* Ensure that name resolution is requested again after active - * connections are dropped. This is more aggressive than necessary to - * accomplish that, so we are counting on resolvers to have - * reasonable rate limits. */ - if (this.currentState === ConnectivityState.READY && connectivityState !== ConnectivityState.READY) { - this.channelControlHelper.requestReresolution(); - } - if (connectivityState === ConnectivityState.READY) { - entry!.nonEmptySince = null; - } - if (errorMessage) { - this.lastError = errorMessage; - } - this.calculateAndUpdateState(); - }, - createSubchannel: (subchannelAddress, subchannelArgs) => { - const subchannel = this.channelControlHelper.createSubchannel(subchannelAddress, subchannelArgs); - if (entry?.oobMetricsListener) { - return new OrcaOobMetricsSubchannelWrapper(subchannel, entry.oobMetricsListener, this.latestConfig!.getOobLoadReportingPeriodMs()); - } else { - return subchannel; - } - } - }), options, resolutionNote), - lastUpdated: now, - nonEmptySince: null, - weight: 0, - oobMetricsListener: null - }; - this.children.set(name, entry); - } - if (lbConfig.getEnableOobLoadReport()) { - entry.oobMetricsListener = loadReport => { - this.updateWeight(entry!, loadReport); - }; - } else { - entry.oobMetricsListener = null; - } - } - for (const [endpointName, entry] of this.children) { - if (seenEndpointNames.has(endpointName)) { - entry.child.startConnecting(); - } else { - entry.child.destroy(); - this.children.delete(endpointName); - } - } - this.updatesPaused = false; - this.calculateAndUpdateState(); - if (this.weightUpdateTimer) { - clearInterval(this.weightUpdateTimer); - } - this.weightUpdateTimer = setInterval(() => { - if (this.currentState === ConnectivityState.READY) { - this.calculateAndUpdateState(); - } - }, lbConfig.getWeightUpdatePeriodMs()).unref?.(); - return true; - } - exitIdle(): void { - /* The weighted_round_robin LB policy is only in the IDLE state if it has - * no addresses to try to connect to and it has no picked subchannel. - * In that case, there is no meaningful action that can be taken here. */ - } - resetBackoff(): void { - // This LB policy has no backoff to reset - } - destroy(): void { - for (const entry of this.children.values()) { - entry.child.destroy(); - } - this.children.clear(); - if (this.weightUpdateTimer) { - clearInterval(this.weightUpdateTimer); - } - } - getTypeName(): string { - return TYPE_NAME; - } -} - -export function setup() { - registerLoadBalancerType( - TYPE_NAME, - WeightedRoundRobinLoadBalancer, - WeightedRoundRobinLoadBalancingConfig - ); -} diff --git a/node_modules/@grpc/grpc-js/src/load-balancer.ts b/node_modules/@grpc/grpc-js/src/load-balancer.ts deleted file mode 100644 index 18f762e..0000000 --- a/node_modules/@grpc/grpc-js/src/load-balancer.ts +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { ChannelOptions } from './channel-options'; -import { Endpoint, SubchannelAddress } from './subchannel-address'; -import { ConnectivityState } from './connectivity-state'; -import { Picker } from './picker'; -import type { ChannelRef, SubchannelRef } from './channelz'; -import { SubchannelInterface } from './subchannel-interface'; -import { LoadBalancingConfig } from './service-config'; -import { log } from './logging'; -import { LogVerbosity } from './constants'; -import { StatusOr } from './call-interface'; - -/** - * A collection of functions associated with a channel that a load balancer - * can call as necessary. - */ -export interface ChannelControlHelper { - /** - * Returns a subchannel connected to the specified address. - * @param subchannelAddress The address to connect to - * @param subchannelArgs Channel arguments to use to construct the subchannel - */ - createSubchannel( - subchannelAddress: SubchannelAddress, - subchannelArgs: ChannelOptions - ): SubchannelInterface; - /** - * Passes a new subchannel picker up to the channel. This is called if either - * the connectivity state changes or if a different picker is needed for any - * other reason. - * @param connectivityState New connectivity state - * @param picker New picker - */ - updateState( - connectivityState: ConnectivityState, - picker: Picker, - errorMessage: string | null - ): void; - /** - * Request new data from the resolver. - */ - requestReresolution(): void; - addChannelzChild(child: ChannelRef | SubchannelRef): void; - removeChannelzChild(child: ChannelRef | SubchannelRef): void; -} - -/** - * Create a child ChannelControlHelper that overrides some methods of the - * parent while letting others pass through to the parent unmodified. This - * allows other code to create these children without needing to know about - * all of the methods to be passed through. - * @param parent - * @param overrides - */ -export function createChildChannelControlHelper( - parent: ChannelControlHelper, - overrides: Partial -): ChannelControlHelper { - return { - createSubchannel: - overrides.createSubchannel?.bind(overrides) ?? - parent.createSubchannel.bind(parent), - updateState: - overrides.updateState?.bind(overrides) ?? parent.updateState.bind(parent), - requestReresolution: - overrides.requestReresolution?.bind(overrides) ?? - parent.requestReresolution.bind(parent), - addChannelzChild: - overrides.addChannelzChild?.bind(overrides) ?? - parent.addChannelzChild.bind(parent), - removeChannelzChild: - overrides.removeChannelzChild?.bind(overrides) ?? - parent.removeChannelzChild.bind(parent), - }; -} - -/** - * Tracks one or more connected subchannels and determines which subchannel - * each request should use. - */ -export interface LoadBalancer { - /** - * Gives the load balancer a new list of addresses to start connecting to. - * The load balancer will start establishing connections with the new list, - * but will continue using any existing connections until the new connections - * are established - * @param endpointList The new list of addresses to connect to - * @param lbConfig The load balancing config object from the service config, - * if one was provided - * @param channelOptions Channel options from the channel, plus resolver - * attributes - * @param resolutionNote A not from the resolver to include in errors - */ - updateAddressList( - endpointList: StatusOr, - lbConfig: TypedLoadBalancingConfig, - channelOptions: ChannelOptions, - resolutionNote: string - ): boolean; - /** - * If the load balancer is currently in the IDLE state, start connecting. - */ - exitIdle(): void; - /** - * If the load balancer is currently in the CONNECTING or TRANSIENT_FAILURE - * state, reset the current connection backoff timeout to its base value and - * transition to CONNECTING if in TRANSIENT_FAILURE. - */ - resetBackoff(): void; - /** - * The load balancer unrefs all of its subchannels and stops calling methods - * of its channel control helper. - */ - destroy(): void; - /** - * Get the type name for this load balancer type. Must be constant across an - * entire load balancer implementation class and must match the name that the - * balancer implementation class was registered with. - */ - getTypeName(): string; -} - -export interface LoadBalancerConstructor { - new ( - channelControlHelper: ChannelControlHelper - ): LoadBalancer; -} - -export interface TypedLoadBalancingConfig { - getLoadBalancerName(): string; - toJsonObject(): object; -} - -export interface TypedLoadBalancingConfigConstructor { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - new (...args: any): TypedLoadBalancingConfig; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - createFromJson(obj: any): TypedLoadBalancingConfig; -} - -const registeredLoadBalancerTypes: { - [name: string]: { - LoadBalancer: LoadBalancerConstructor; - LoadBalancingConfig: TypedLoadBalancingConfigConstructor; - }; -} = {}; - -let defaultLoadBalancerType: string | null = null; - -export function registerLoadBalancerType( - typeName: string, - loadBalancerType: LoadBalancerConstructor, - loadBalancingConfigType: TypedLoadBalancingConfigConstructor -) { - registeredLoadBalancerTypes[typeName] = { - LoadBalancer: loadBalancerType, - LoadBalancingConfig: loadBalancingConfigType, - }; -} - -export function registerDefaultLoadBalancerType(typeName: string) { - defaultLoadBalancerType = typeName; -} - -export function createLoadBalancer( - config: TypedLoadBalancingConfig, - channelControlHelper: ChannelControlHelper -): LoadBalancer | null { - const typeName = config.getLoadBalancerName(); - if (typeName in registeredLoadBalancerTypes) { - return new registeredLoadBalancerTypes[typeName].LoadBalancer( - channelControlHelper - ); - } else { - return null; - } -} - -export function isLoadBalancerNameRegistered(typeName: string): boolean { - return typeName in registeredLoadBalancerTypes; -} - -export function parseLoadBalancingConfig( - rawConfig: LoadBalancingConfig -): TypedLoadBalancingConfig { - const keys = Object.keys(rawConfig); - if (keys.length !== 1) { - throw new Error( - 'Provided load balancing config has multiple conflicting entries' - ); - } - const typeName = keys[0]; - if (typeName in registeredLoadBalancerTypes) { - try { - return registeredLoadBalancerTypes[ - typeName - ].LoadBalancingConfig.createFromJson(rawConfig[typeName]); - } catch (e) { - throw new Error(`${typeName}: ${(e as Error).message}`); - } - } else { - throw new Error(`Unrecognized load balancing config name ${typeName}`); - } -} - -export function getDefaultConfig() { - if (!defaultLoadBalancerType) { - throw new Error('No default load balancer type registered'); - } - return new registeredLoadBalancerTypes[ - defaultLoadBalancerType - ]!.LoadBalancingConfig(); -} - -export function selectLbConfigFromList( - configs: LoadBalancingConfig[], - fallbackTodefault = false -): TypedLoadBalancingConfig | null { - for (const config of configs) { - try { - return parseLoadBalancingConfig(config); - } catch (e) { - log( - LogVerbosity.DEBUG, - 'Config parsing failed with error', - (e as Error).message - ); - continue; - } - } - if (fallbackTodefault) { - if (defaultLoadBalancerType) { - return new registeredLoadBalancerTypes[ - defaultLoadBalancerType - ]!.LoadBalancingConfig(); - } else { - return null; - } - } else { - return null; - } -} diff --git a/node_modules/@grpc/grpc-js/src/load-balancing-call.ts b/node_modules/@grpc/grpc-js/src/load-balancing-call.ts deleted file mode 100644 index 3ff7289..0000000 --- a/node_modules/@grpc/grpc-js/src/load-balancing-call.ts +++ /dev/null @@ -1,387 +0,0 @@ -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { CallCredentials } from './call-credentials'; -import { - Call, - DeadlineInfoProvider, - InterceptingListener, - MessageContext, - StatusObject, -} from './call-interface'; -import { SubchannelCall } from './subchannel-call'; -import { ConnectivityState } from './connectivity-state'; -import { LogVerbosity, Status } from './constants'; -import { Deadline, formatDateDifference, getDeadlineTimeoutString } from './deadline'; -import { InternalChannel } from './internal-channel'; -import { Metadata } from './metadata'; -import { OnCallEnded, PickResultType } from './picker'; -import { CallConfig } from './resolver'; -import { splitHostPort } from './uri-parser'; -import * as logging from './logging'; -import { restrictControlPlaneStatusCode } from './control-plane-status'; -import * as http2 from 'http2'; -import { AuthContext } from './auth-context'; - -const TRACER_NAME = 'load_balancing_call'; - -export type RpcProgress = 'NOT_STARTED' | 'DROP' | 'REFUSED' | 'PROCESSED'; - -export interface StatusObjectWithProgress extends StatusObject { - progress: RpcProgress; -} - -export interface LoadBalancingCallInterceptingListener - extends InterceptingListener { - onReceiveStatus(status: StatusObjectWithProgress): void; -} - -export class LoadBalancingCall implements Call, DeadlineInfoProvider { - private child: SubchannelCall | null = null; - private readPending = false; - private pendingMessage: { context: MessageContext; message: Buffer } | null = - null; - private pendingHalfClose = false; - private ended = false; - private serviceUrl: string; - private metadata: Metadata | null = null; - private listener: InterceptingListener | null = null; - private onCallEnded: OnCallEnded | null = null; - private startTime: Date; - private childStartTime: Date | null = null; - constructor( - private readonly channel: InternalChannel, - private readonly callConfig: CallConfig, - private readonly methodName: string, - private readonly host: string, - private readonly credentials: CallCredentials, - private readonly deadline: Deadline, - private readonly callNumber: number - ) { - const splitPath: string[] = this.methodName.split('/'); - let serviceName = ''; - /* The standard path format is "/{serviceName}/{methodName}", so if we split - * by '/', the first item should be empty and the second should be the - * service name */ - if (splitPath.length >= 2) { - serviceName = splitPath[1]; - } - const hostname = splitHostPort(this.host)?.host ?? 'localhost'; - /* Currently, call credentials are only allowed on HTTPS connections, so we - * can assume that the scheme is "https" */ - this.serviceUrl = `https://${hostname}/${serviceName}`; - this.startTime = new Date(); - } - getDeadlineInfo(): string[] { - const deadlineInfo: string[] = []; - if (this.childStartTime) { - if (this.childStartTime > this.startTime) { - if (this.metadata?.getOptions().waitForReady) { - deadlineInfo.push('wait_for_ready'); - } - deadlineInfo.push(`LB pick: ${formatDateDifference(this.startTime, this.childStartTime)}`); - } - deadlineInfo.push(...this.child!.getDeadlineInfo()); - return deadlineInfo; - } else { - if (this.metadata?.getOptions().waitForReady) { - deadlineInfo.push('wait_for_ready'); - } - deadlineInfo.push('Waiting for LB pick'); - } - return deadlineInfo; - } - - private trace(text: string): void { - logging.trace( - LogVerbosity.DEBUG, - TRACER_NAME, - '[' + this.callNumber + '] ' + text - ); - } - - private outputStatus(status: StatusObject, progress: RpcProgress) { - if (!this.ended) { - this.ended = true; - this.trace( - 'ended with status: code=' + - status.code + - ' details="' + - status.details + - '" start time=' + - this.startTime.toISOString() - ); - const finalStatus = { ...status, progress }; - this.listener?.onReceiveStatus(finalStatus); - this.onCallEnded?.(finalStatus.code, finalStatus.details, finalStatus.metadata); - } - } - - doPick() { - if (this.ended) { - return; - } - if (!this.metadata) { - throw new Error('doPick called before start'); - } - this.trace('Pick called'); - const finalMetadata = this.metadata.clone(); - const pickResult = this.channel.doPick( - finalMetadata, - this.callConfig.pickInformation - ); - const subchannelString = pickResult.subchannel - ? '(' + - pickResult.subchannel.getChannelzRef().id + - ') ' + - pickResult.subchannel.getAddress() - : '' + pickResult.subchannel; - this.trace( - 'Pick result: ' + - PickResultType[pickResult.pickResultType] + - ' subchannel: ' + - subchannelString + - ' status: ' + - pickResult.status?.code + - ' ' + - pickResult.status?.details - ); - switch (pickResult.pickResultType) { - case PickResultType.COMPLETE: - const combinedCallCredentials = this.credentials.compose(pickResult.subchannel!.getCallCredentials()); - combinedCallCredentials - .generateMetadata({ method_name: this.methodName, service_url: this.serviceUrl }) - .then( - credsMetadata => { - /* If this call was cancelled (e.g. by the deadline) before - * metadata generation finished, we shouldn't do anything with - * it. */ - if (this.ended) { - this.trace( - 'Credentials metadata generation finished after call ended' - ); - return; - } - finalMetadata.merge(credsMetadata); - if (finalMetadata.get('authorization').length > 1) { - this.outputStatus( - { - code: Status.INTERNAL, - details: - '"authorization" metadata cannot have multiple values', - metadata: new Metadata(), - }, - 'PROCESSED' - ); - } - if ( - pickResult.subchannel!.getConnectivityState() !== - ConnectivityState.READY - ) { - this.trace( - 'Picked subchannel ' + - subchannelString + - ' has state ' + - ConnectivityState[ - pickResult.subchannel!.getConnectivityState() - ] + - ' after getting credentials metadata. Retrying pick' - ); - this.doPick(); - return; - } - - if (this.deadline !== Infinity) { - finalMetadata.set( - 'grpc-timeout', - getDeadlineTimeoutString(this.deadline) - ); - } - try { - this.child = pickResult - .subchannel!.getRealSubchannel() - .createCall(finalMetadata, this.host, this.methodName, { - onReceiveMetadata: metadata => { - this.trace('Received metadata'); - this.listener!.onReceiveMetadata(metadata); - }, - onReceiveMessage: message => { - this.trace('Received message'); - this.listener!.onReceiveMessage(message); - }, - onReceiveStatus: status => { - this.trace('Received status'); - if ( - status.rstCode === - http2.constants.NGHTTP2_REFUSED_STREAM - ) { - this.outputStatus(status, 'REFUSED'); - } else { - this.outputStatus(status, 'PROCESSED'); - } - }, - }); - this.childStartTime = new Date(); - } catch (error) { - this.trace( - 'Failed to start call on picked subchannel ' + - subchannelString + - ' with error ' + - (error as Error).message - ); - this.outputStatus( - { - code: Status.INTERNAL, - details: - 'Failed to start HTTP/2 stream with error ' + - (error as Error).message, - metadata: new Metadata(), - }, - 'NOT_STARTED' - ); - return; - } - pickResult.onCallStarted?.(); - this.onCallEnded = pickResult.onCallEnded; - this.trace( - 'Created child call [' + this.child.getCallNumber() + ']' - ); - if (this.readPending) { - this.child.startRead(); - } - if (this.pendingMessage) { - this.child.sendMessageWithContext( - this.pendingMessage.context, - this.pendingMessage.message - ); - } - if (this.pendingHalfClose) { - this.child.halfClose(); - } - }, - (error: Error & { code: number }) => { - // We assume the error code isn't 0 (Status.OK) - const { code, details } = restrictControlPlaneStatusCode( - typeof error.code === 'number' ? error.code : Status.UNKNOWN, - `Getting metadata from plugin failed with error: ${error.message}` - ); - this.outputStatus( - { - code: code, - details: details, - metadata: new Metadata(), - }, - 'PROCESSED' - ); - } - ); - break; - case PickResultType.DROP: - const { code, details } = restrictControlPlaneStatusCode( - pickResult.status!.code, - pickResult.status!.details - ); - setImmediate(() => { - this.outputStatus( - { code, details, metadata: pickResult.status!.metadata }, - 'DROP' - ); - }); - break; - case PickResultType.TRANSIENT_FAILURE: - if (this.metadata.getOptions().waitForReady) { - this.channel.queueCallForPick(this); - } else { - const { code, details } = restrictControlPlaneStatusCode( - pickResult.status!.code, - pickResult.status!.details - ); - setImmediate(() => { - this.outputStatus( - { code, details, metadata: pickResult.status!.metadata }, - 'PROCESSED' - ); - }); - } - break; - case PickResultType.QUEUE: - this.channel.queueCallForPick(this); - } - } - - cancelWithStatus(status: Status, details: string): void { - this.trace( - 'cancelWithStatus code: ' + status + ' details: "' + details + '"' - ); - this.child?.cancelWithStatus(status, details); - this.outputStatus( - { code: status, details: details, metadata: new Metadata() }, - 'PROCESSED' - ); - } - getPeer(): string { - return this.child?.getPeer() ?? this.channel.getTarget(); - } - start( - metadata: Metadata, - listener: LoadBalancingCallInterceptingListener - ): void { - this.trace('start called'); - this.listener = listener; - this.metadata = metadata; - this.doPick(); - } - sendMessageWithContext(context: MessageContext, message: Buffer): void { - this.trace('write() called with message of length ' + message.length); - if (this.child) { - this.child.sendMessageWithContext(context, message); - } else { - this.pendingMessage = { context, message }; - } - } - startRead(): void { - this.trace('startRead called'); - if (this.child) { - this.child.startRead(); - } else { - this.readPending = true; - } - } - halfClose(): void { - this.trace('halfClose called'); - if (this.child) { - this.child.halfClose(); - } else { - this.pendingHalfClose = true; - } - } - setCredentials(credentials: CallCredentials): void { - throw new Error('Method not implemented.'); - } - - getCallNumber(): number { - return this.callNumber; - } - - getAuthContext(): AuthContext | null { - if (this.child) { - return this.child.getAuthContext(); - } else { - return null; - } - } -} diff --git a/node_modules/@grpc/grpc-js/src/logging.ts b/node_modules/@grpc/grpc-js/src/logging.ts deleted file mode 100644 index 2279d3b..0000000 --- a/node_modules/@grpc/grpc-js/src/logging.ts +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { LogVerbosity } from './constants'; -import { pid } from 'process'; - -const clientVersion = require('../../package.json').version; - -const DEFAULT_LOGGER: Partial = { - error: (message?: any, ...optionalParams: any[]) => { - console.error('E ' + message, ...optionalParams); - }, - info: (message?: any, ...optionalParams: any[]) => { - console.error('I ' + message, ...optionalParams); - }, - debug: (message?: any, ...optionalParams: any[]) => { - console.error('D ' + message, ...optionalParams); - }, -}; - -let _logger: Partial = DEFAULT_LOGGER; -let _logVerbosity: LogVerbosity = LogVerbosity.ERROR; - -const verbosityString = - process.env.GRPC_NODE_VERBOSITY ?? process.env.GRPC_VERBOSITY ?? ''; - -switch (verbosityString.toUpperCase()) { - case 'DEBUG': - _logVerbosity = LogVerbosity.DEBUG; - break; - case 'INFO': - _logVerbosity = LogVerbosity.INFO; - break; - case 'ERROR': - _logVerbosity = LogVerbosity.ERROR; - break; - case 'NONE': - _logVerbosity = LogVerbosity.NONE; - break; - default: - // Ignore any other values -} - -export const getLogger = (): Partial => { - return _logger; -}; - -export const setLogger = (logger: Partial): void => { - _logger = logger; -}; - -export const setLoggerVerbosity = (verbosity: LogVerbosity): void => { - _logVerbosity = verbosity; -}; - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export const log = (severity: LogVerbosity, ...args: any[]): void => { - let logFunction: typeof DEFAULT_LOGGER.error; - if (severity >= _logVerbosity) { - switch (severity) { - case LogVerbosity.DEBUG: - logFunction = _logger.debug; - break; - case LogVerbosity.INFO: - logFunction = _logger.info; - break; - case LogVerbosity.ERROR: - logFunction = _logger.error; - break; - } - /* Fall back to _logger.error when other methods are not available for - * compatiblity with older behavior that always logged to _logger.error */ - if (!logFunction) { - logFunction = _logger.error; - } - if (logFunction) { - logFunction.bind(_logger)(...args); - } - } -}; - -const tracersString = - process.env.GRPC_NODE_TRACE ?? process.env.GRPC_TRACE ?? ''; -const enabledTracers = new Set(); -const disabledTracers = new Set(); -for (const tracerName of tracersString.split(',')) { - if (tracerName.startsWith('-')) { - disabledTracers.add(tracerName.substring(1)); - } else { - enabledTracers.add(tracerName); - } -} -const allEnabled = enabledTracers.has('all'); - -export function trace( - severity: LogVerbosity, - tracer: string, - text: string -): void { - if (isTracerEnabled(tracer)) { - log( - severity, - new Date().toISOString() + - ' | v' + - clientVersion + - ' ' + - pid + - ' | ' + - tracer + - ' | ' + - text - ); - } -} - -export function isTracerEnabled(tracer: string): boolean { - return ( - !disabledTracers.has(tracer) && (allEnabled || enabledTracers.has(tracer)) - ); -} diff --git a/node_modules/@grpc/grpc-js/src/make-client.ts b/node_modules/@grpc/grpc-js/src/make-client.ts deleted file mode 100644 index 10d1e95..0000000 --- a/node_modules/@grpc/grpc-js/src/make-client.ts +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { ChannelCredentials } from './channel-credentials'; -import { ChannelOptions } from './channel-options'; -import { Client } from './client'; -import { UntypedServiceImplementation } from './server'; - -export interface Serialize { - (value: T): Buffer; -} - -export interface Deserialize { - (bytes: Buffer): T; -} - -export interface ClientMethodDefinition { - path: string; - requestStream: boolean; - responseStream: boolean; - requestSerialize: Serialize; - responseDeserialize: Deserialize; - originalName?: string; -} - -export interface ServerMethodDefinition { - path: string; - requestStream: boolean; - responseStream: boolean; - responseSerialize: Serialize; - requestDeserialize: Deserialize; - originalName?: string; -} - -export interface MethodDefinition - extends ClientMethodDefinition, - ServerMethodDefinition {} - -/* eslint-disable @typescript-eslint/no-explicit-any */ -export type ServiceDefinition< - ImplementationType = UntypedServiceImplementation -> = { - readonly [index in keyof ImplementationType]: MethodDefinition; -}; -/* eslint-enable @typescript-eslint/no-explicit-any */ - -export interface ProtobufTypeDefinition { - format: string; - type: object; - fileDescriptorProtos: Buffer[]; -} - -export interface PackageDefinition { - [index: string]: ServiceDefinition | ProtobufTypeDefinition; -} - -/** - * Map with short names for each of the requester maker functions. Used in - * makeClientConstructor - * @private - */ -const requesterFuncs = { - unary: Client.prototype.makeUnaryRequest, - server_stream: Client.prototype.makeServerStreamRequest, - client_stream: Client.prototype.makeClientStreamRequest, - bidi: Client.prototype.makeBidiStreamRequest, -}; - -export interface ServiceClient extends Client { - [methodName: string]: Function; -} - -export interface ServiceClientConstructor { - new ( - address: string, - credentials: ChannelCredentials, - options?: Partial - ): ServiceClient; - service: ServiceDefinition; - serviceName: string; -} - -/** - * Returns true, if given key is included in the blacklisted - * keys. - * @param key key for check, string. - */ -function isPrototypePolluted(key: string): boolean { - return ['__proto__', 'prototype', 'constructor'].includes(key); -} - -/** - * Creates a constructor for a client with the given methods, as specified in - * the methods argument. The resulting class will have an instance method for - * each method in the service, which is a partial application of one of the - * [Client]{@link grpc.Client} request methods, depending on `requestSerialize` - * and `responseSerialize`, with the `method`, `serialize`, and `deserialize` - * arguments predefined. - * @param methods An object mapping method names to - * method attributes - * @param serviceName The fully qualified name of the service - * @param classOptions An options object. - * @return New client constructor, which is a subclass of - * {@link grpc.Client}, and has the same arguments as that constructor. - */ -export function makeClientConstructor( - methods: ServiceDefinition, - serviceName: string, - classOptions?: {} -): ServiceClientConstructor { - if (!classOptions) { - classOptions = {}; - } - - class ServiceClientImpl extends Client implements ServiceClient { - static service: ServiceDefinition; - static serviceName: string; - [methodName: string]: Function; - } - - Object.keys(methods).forEach(name => { - if (isPrototypePolluted(name)) { - return; - } - const attrs = methods[name]; - let methodType: keyof typeof requesterFuncs; - // TODO(murgatroid99): Verify that we don't need this anymore - if (typeof name === 'string' && name.charAt(0) === '$') { - throw new Error('Method names cannot start with $'); - } - if (attrs.requestStream) { - if (attrs.responseStream) { - methodType = 'bidi'; - } else { - methodType = 'client_stream'; - } - } else { - if (attrs.responseStream) { - methodType = 'server_stream'; - } else { - methodType = 'unary'; - } - } - const serialize = attrs.requestSerialize; - const deserialize = attrs.responseDeserialize; - const methodFunc = partial( - requesterFuncs[methodType], - attrs.path, - serialize, - deserialize - ); - ServiceClientImpl.prototype[name] = methodFunc; - // Associate all provided attributes with the method - Object.assign(ServiceClientImpl.prototype[name], attrs); - if (attrs.originalName && !isPrototypePolluted(attrs.originalName)) { - ServiceClientImpl.prototype[attrs.originalName] = - ServiceClientImpl.prototype[name]; - } - }); - - ServiceClientImpl.service = methods; - ServiceClientImpl.serviceName = serviceName; - - return ServiceClientImpl; -} - -function partial( - fn: Function, - path: string, - serialize: Function, - deserialize: Function -): Function { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return function (this: any, ...args: any[]) { - return fn.call(this, path, serialize, deserialize, ...args); - }; -} - -export interface GrpcObject { - [index: string]: - | GrpcObject - | ServiceClientConstructor - | ProtobufTypeDefinition; -} - -function isProtobufTypeDefinition( - obj: ServiceDefinition | ProtobufTypeDefinition -): obj is ProtobufTypeDefinition { - return 'format' in obj; -} - -/** - * Load a gRPC package definition as a gRPC object hierarchy. - * @param packageDef The package definition object. - * @return The resulting gRPC object. - */ -export function loadPackageDefinition( - packageDef: PackageDefinition -): GrpcObject { - const result: GrpcObject = {}; - for (const serviceFqn in packageDef) { - if (Object.prototype.hasOwnProperty.call(packageDef, serviceFqn)) { - const service = packageDef[serviceFqn]; - const nameComponents = serviceFqn.split('.'); - if (nameComponents.some((comp: string) => isPrototypePolluted(comp))) { - continue; - } - const serviceName = nameComponents[nameComponents.length - 1]; - let current = result; - for (const packageName of nameComponents.slice(0, -1)) { - if (!current[packageName]) { - current[packageName] = {}; - } - current = current[packageName] as GrpcObject; - } - if (isProtobufTypeDefinition(service)) { - current[serviceName] = service; - } else { - current[serviceName] = makeClientConstructor(service, serviceName, {}); - } - } - } - return result; -} diff --git a/node_modules/@grpc/grpc-js/src/metadata.ts b/node_modules/@grpc/grpc-js/src/metadata.ts deleted file mode 100644 index 7ae68ba..0000000 --- a/node_modules/@grpc/grpc-js/src/metadata.ts +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import * as http2 from 'http2'; -import { log } from './logging'; -import { LogVerbosity } from './constants'; -import { getErrorMessage } from './error'; -const LEGAL_KEY_REGEX = /^[:0-9a-z_.-]+$/; -const LEGAL_NON_BINARY_VALUE_REGEX = /^[ -~]*$/; - -export type MetadataValue = string | Buffer; -export type MetadataObject = Map; - -function isLegalKey(key: string): boolean { - return LEGAL_KEY_REGEX.test(key); -} - -function isLegalNonBinaryValue(value: string): boolean { - return LEGAL_NON_BINARY_VALUE_REGEX.test(value); -} - -function isBinaryKey(key: string): boolean { - return key.endsWith('-bin'); -} - -function isCustomMetadata(key: string): boolean { - return !key.startsWith('grpc-'); -} - -function normalizeKey(key: string): string { - return key.toLowerCase(); -} - -function validate(key: string, value?: MetadataValue): void { - if (!isLegalKey(key)) { - throw new Error('Metadata key "' + key + '" contains illegal characters'); - } - - if (value !== null && value !== undefined) { - if (isBinaryKey(key)) { - if (!Buffer.isBuffer(value)) { - throw new Error("keys that end with '-bin' must have Buffer values"); - } - } else { - if (Buffer.isBuffer(value)) { - throw new Error( - "keys that don't end with '-bin' must have String values" - ); - } - if (!isLegalNonBinaryValue(value)) { - throw new Error( - 'Metadata string value "' + value + '" contains illegal characters' - ); - } - } - } -} - -export interface MetadataOptions { - /* Signal that the request is idempotent. Defaults to false */ - idempotentRequest?: boolean; - /* Signal that the call should not return UNAVAILABLE before it has - * started. Defaults to false. */ - waitForReady?: boolean; - /* Signal that the call is cacheable. GRPC is free to use GET verb. - * Defaults to false */ - cacheableRequest?: boolean; - /* Signal that the initial metadata should be corked. Defaults to false. */ - corked?: boolean; -} - -/** - * A class for storing metadata. Keys are normalized to lowercase ASCII. - */ -export class Metadata { - protected internalRepr: MetadataObject = new Map(); - private options: MetadataOptions; - private opaqueData: Map = new Map(); - - constructor(options: MetadataOptions = {}) { - this.options = options; - } - - /** - * Sets the given value for the given key by replacing any other values - * associated with that key. Normalizes the key. - * @param key The key to whose value should be set. - * @param value The value to set. Must be a buffer if and only - * if the normalized key ends with '-bin'. - */ - set(key: string, value: MetadataValue): void { - key = normalizeKey(key); - validate(key, value); - this.internalRepr.set(key, [value]); - } - - /** - * Adds the given value for the given key by appending to a list of previous - * values associated with that key. Normalizes the key. - * @param key The key for which a new value should be appended. - * @param value The value to add. Must be a buffer if and only - * if the normalized key ends with '-bin'. - */ - add(key: string, value: MetadataValue): void { - key = normalizeKey(key); - validate(key, value); - - const existingValue: MetadataValue[] | undefined = - this.internalRepr.get(key); - - if (existingValue === undefined) { - this.internalRepr.set(key, [value]); - } else { - existingValue.push(value); - } - } - - /** - * Removes the given key and any associated values. Normalizes the key. - * @param key The key whose values should be removed. - */ - remove(key: string): void { - key = normalizeKey(key); - // validate(key); - this.internalRepr.delete(key); - } - - /** - * Gets a list of all values associated with the key. Normalizes the key. - * @param key The key whose value should be retrieved. - * @return A list of values associated with the given key. - */ - get(key: string): MetadataValue[] { - key = normalizeKey(key); - // validate(key); - return this.internalRepr.get(key) || []; - } - - /** - * Gets a plain object mapping each key to the first value associated with it. - * This reflects the most common way that people will want to see metadata. - * @return A key/value mapping of the metadata. - */ - getMap(): { [key: string]: MetadataValue } { - const result: { [key: string]: MetadataValue } = {}; - - for (const [key, values] of this.internalRepr) { - if (values.length > 0) { - const v = values[0]; - result[key] = Buffer.isBuffer(v) ? Buffer.from(v) : v; - } - } - return result; - } - - /** - * Clones the metadata object. - * @return The newly cloned object. - */ - clone(): Metadata { - const newMetadata = new Metadata(this.options); - const newInternalRepr = newMetadata.internalRepr; - - for (const [key, value] of this.internalRepr) { - const clonedValue: MetadataValue[] = value.map(v => { - if (Buffer.isBuffer(v)) { - return Buffer.from(v); - } else { - return v; - } - }); - - newInternalRepr.set(key, clonedValue); - } - - return newMetadata; - } - - /** - * Merges all key-value pairs from a given Metadata object into this one. - * If both this object and the given object have values in the same key, - * values from the other Metadata object will be appended to this object's - * values. - * @param other A Metadata object. - */ - merge(other: Metadata): void { - for (const [key, values] of other.internalRepr) { - const mergedValue: MetadataValue[] = ( - this.internalRepr.get(key) || [] - ).concat(values); - - this.internalRepr.set(key, mergedValue); - } - } - - setOptions(options: MetadataOptions) { - this.options = options; - } - - getOptions(): MetadataOptions { - return this.options; - } - - /** - * Creates an OutgoingHttpHeaders object that can be used with the http2 API. - */ - toHttp2Headers(): http2.OutgoingHttpHeaders { - // NOTE: Node <8.9 formats http2 headers incorrectly. - const result: http2.OutgoingHttpHeaders = {}; - - for (const [key, values] of this.internalRepr) { - if (key.startsWith(':')) { - continue; - } - // We assume that the user's interaction with this object is limited to - // through its public API (i.e. keys and values are already validated). - result[key] = values.map(bufToString); - } - - return result; - } - - /** - * This modifies the behavior of JSON.stringify to show an object - * representation of the metadata map. - */ - toJSON() { - const result: { [key: string]: MetadataValue[] } = {}; - for (const [key, values] of this.internalRepr) { - result[key] = values; - } - return result; - } - - /** - * Attach additional data of any type to the metadata object, which will not - * be included when sending headers. The data can later be retrieved with - * `getOpaque`. Keys with the prefix `grpc` are reserved for use by this - * library. - * @param key - * @param value - */ - setOpaque(key: string, value: unknown) { - this.opaqueData.set(key, value); - } - - /** - * Retrieve data previously added with `setOpaque`. - * @param key - * @returns - */ - getOpaque(key: string) { - return this.opaqueData.get(key); - } - - /** - * Returns a new Metadata object based fields in a given IncomingHttpHeaders - * object. - * @param headers An IncomingHttpHeaders object. - */ - static fromHttp2Headers(headers: http2.IncomingHttpHeaders): Metadata { - const result = new Metadata(); - for (const key of Object.keys(headers)) { - // Reserved headers (beginning with `:`) are not valid keys. - if (key.charAt(0) === ':') { - continue; - } - - const values = headers[key]; - - try { - if (isBinaryKey(key)) { - if (Array.isArray(values)) { - values.forEach(value => { - result.add(key, Buffer.from(value, 'base64')); - }); - } else if (values !== undefined) { - if (isCustomMetadata(key)) { - values.split(',').forEach(v => { - result.add(key, Buffer.from(v.trim(), 'base64')); - }); - } else { - result.add(key, Buffer.from(values, 'base64')); - } - } - } else { - if (Array.isArray(values)) { - values.forEach(value => { - result.add(key, value); - }); - } else if (values !== undefined) { - result.add(key, values); - } - } - } catch (error) { - const message = `Failed to add metadata entry ${key}: ${values}. ${getErrorMessage( - error - )}. For more information see https://github.com/grpc/grpc-node/issues/1173`; - log(LogVerbosity.ERROR, message); - } - } - - return result; - } -} - -const bufToString = (val: string | Buffer): string => { - return Buffer.isBuffer(val) ? val.toString('base64') : val; -}; diff --git a/node_modules/@grpc/grpc-js/src/object-stream.ts b/node_modules/@grpc/grpc-js/src/object-stream.ts deleted file mode 100644 index 49ef1f3..0000000 --- a/node_modules/@grpc/grpc-js/src/object-stream.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { Readable, Writable } from 'stream'; -import { EmitterAugmentation1 } from './events'; - -/* eslint-disable @typescript-eslint/no-explicit-any */ - -export type WriteCallback = (error: Error | null | undefined) => void; - -export interface IntermediateObjectReadable extends Readable { - read(size?: number): any & T; -} - -export type ObjectReadable = { - read(size?: number): T; -} & EmitterAugmentation1<'data', T> & - IntermediateObjectReadable; - -export interface IntermediateObjectWritable extends Writable { - _write(chunk: any & T, encoding: string, callback: Function): void; - write(chunk: any & T, cb?: WriteCallback): boolean; - write(chunk: any & T, encoding?: any, cb?: WriteCallback): boolean; - setDefaultEncoding(encoding: string): this; - end(): ReturnType extends Writable ? this : void; - end( - chunk: any & T, - cb?: Function - ): ReturnType extends Writable ? this : void; - end( - chunk: any & T, - encoding?: any, - cb?: Function - ): ReturnType extends Writable ? this : void; -} - -export interface ObjectWritable extends IntermediateObjectWritable { - _write(chunk: T, encoding: string, callback: Function): void; - write(chunk: T, cb?: Function): boolean; - write(chunk: T, encoding?: any, cb?: Function): boolean; - setDefaultEncoding(encoding: string): this; - end(): ReturnType extends Writable ? this : void; - end( - chunk: T, - cb?: Function - ): ReturnType extends Writable ? this : void; - end( - chunk: T, - encoding?: any, - cb?: Function - ): ReturnType extends Writable ? this : void; -} diff --git a/node_modules/@grpc/grpc-js/src/orca.ts b/node_modules/@grpc/grpc-js/src/orca.ts deleted file mode 100644 index 2349073..0000000 --- a/node_modules/@grpc/grpc-js/src/orca.ts +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Copyright 2025 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { OrcaLoadReport, OrcaLoadReport__Output } from "./generated/xds/data/orca/v3/OrcaLoadReport"; - -import type { loadSync } from '@grpc/proto-loader'; -import { ProtoGrpcType as OrcaProtoGrpcType } from "./generated/orca"; -import { loadPackageDefinition } from "./make-client"; -import { OpenRcaServiceClient, OpenRcaServiceHandlers } from "./generated/xds/service/orca/v3/OpenRcaService"; -import { durationMessageToDuration, durationToMs, msToDuration } from "./duration"; -import { Server } from "./server"; -import { ChannelCredentials } from "./channel-credentials"; -import { Channel } from "./channel"; -import { OnCallEnded } from "./picker"; -import { DataProducer, Subchannel } from "./subchannel"; -import { BaseSubchannelWrapper, DataWatcher, SubchannelInterface } from "./subchannel-interface"; -import { ClientReadableStream, ServiceError } from "./call"; -import { Status } from "./constants"; -import { BackoffTimeout } from "./backoff-timeout"; -import { ConnectivityState } from "./connectivity-state"; - -const loadedOrcaProto: OrcaProtoGrpcType | null = null; -function loadOrcaProto(): OrcaProtoGrpcType { - if (loadedOrcaProto) { - return loadedOrcaProto; - } - /* The purpose of this complexity is to avoid loading @grpc/proto-loader at - * runtime for users who will not use/enable ORCA. */ - const loaderLoadSync = require('@grpc/proto-loader') - .loadSync as typeof loadSync; - const loadedProto = loaderLoadSync('xds/service/orca/v3/orca.proto', { - keepCase: true, - longs: String, - enums: String, - defaults: true, - oneofs: true, - includeDirs: [ - `${__dirname}/../../proto/xds`, - `${__dirname}/../../proto/protoc-gen-validate` - ], - }); - return loadPackageDefinition(loadedProto) as unknown as OrcaProtoGrpcType; -} - -/** - * ORCA metrics recorder for a single request - */ -export class PerRequestMetricRecorder { - private message: OrcaLoadReport = {}; - - /** - * Records a request cost metric measurement for the call. - * @param name - * @param value - */ - recordRequestCostMetric(name: string, value: number) { - if (!this.message.request_cost) { - this.message.request_cost = {}; - } - this.message.request_cost[name] = value; - } - - /** - * Records a request cost metric measurement for the call. - * @param name - * @param value - */ - recordUtilizationMetric(name: string, value: number) { - if (!this.message.utilization) { - this.message.utilization = {}; - } - this.message.utilization[name] = value; - } - - /** - * Records an opaque named metric measurement for the call. - * @param name - * @param value - */ - recordNamedMetric(name: string, value: number) { - if (!this.message.named_metrics) { - this.message.named_metrics = {}; - } - this.message.named_metrics[name] = value; - } - - /** - * Records the CPU utilization metric measurement for the call. - * @param value - */ - recordCPUUtilizationMetric(value: number) { - this.message.cpu_utilization = value; - } - - /** - * Records the memory utilization metric measurement for the call. - * @param value - */ - recordMemoryUtilizationMetric(value: number) { - this.message.mem_utilization = value; - } - - /** - * Records the memory utilization metric measurement for the call. - * @param value - */ - recordApplicationUtilizationMetric(value: number) { - this.message.application_utilization = value; - } - - /** - * Records the queries per second measurement. - * @param value - */ - recordQpsMetric(value: number) { - this.message.rps_fractional = value; - } - - /** - * Records the errors per second measurement. - * @param value - */ - recordEpsMetric(value: number) { - this.message.eps = value; - } - - serialize(): Buffer { - const orcaProto = loadOrcaProto(); - return orcaProto.xds.data.orca.v3.OrcaLoadReport.serialize(this.message); - } -} - -const DEFAULT_REPORT_INTERVAL_MS = 30_000; - -export class ServerMetricRecorder { - private message: OrcaLoadReport = {}; - - private serviceImplementation: OpenRcaServiceHandlers = { - StreamCoreMetrics: call => { - const reportInterval = call.request.report_interval ? - durationToMs(durationMessageToDuration(call.request.report_interval)) : - DEFAULT_REPORT_INTERVAL_MS; - const reportTimer = setInterval(() => { - call.write(this.message); - }, reportInterval); - call.on('cancelled', () => { - clearInterval(reportTimer); - }) - } - } - - putUtilizationMetric(name: string, value: number) { - if (!this.message.utilization) { - this.message.utilization = {}; - } - this.message.utilization[name] = value; - } - - setAllUtilizationMetrics(metrics: {[name: string]: number}) { - this.message.utilization = {...metrics}; - } - - deleteUtilizationMetric(name: string) { - delete this.message.utilization?.[name]; - } - - setCpuUtilizationMetric(value: number) { - this.message.cpu_utilization = value; - } - - deleteCpuUtilizationMetric() { - delete this.message.cpu_utilization; - } - - setApplicationUtilizationMetric(value: number) { - this.message.application_utilization = value; - } - - deleteApplicationUtilizationMetric() { - delete this.message.application_utilization; - } - - setQpsMetric(value: number) { - this.message.rps_fractional = value; - } - - deleteQpsMetric() { - delete this.message.rps_fractional; - } - - setEpsMetric(value: number) { - this.message.eps = value; - } - - deleteEpsMetric() { - delete this.message.eps; - } - - addToServer(server: Server) { - const serviceDefinition = loadOrcaProto().xds.service.orca.v3.OpenRcaService.service; - server.addService(serviceDefinition, this.serviceImplementation); - } -} - -export function createOrcaClient(channel: Channel): OpenRcaServiceClient { - const ClientClass = loadOrcaProto().xds.service.orca.v3.OpenRcaService; - return new ClientClass('unused', ChannelCredentials.createInsecure(), {channelOverride: channel}); -} - -export type MetricsListener = (loadReport: OrcaLoadReport__Output) => void; - -export const GRPC_METRICS_HEADER = 'endpoint-load-metrics-bin'; -const PARSED_LOAD_REPORT_KEY = 'grpc_orca_load_report'; - -/** - * Create an onCallEnded callback for use in a picker. - * @param listener The listener to handle metrics, whenever they are provided. - * @param previousOnCallEnded The previous onCallEnded callback to propagate - * to, if applicable. - * @returns - */ -export function createMetricsReader(listener: MetricsListener, previousOnCallEnded: OnCallEnded | null): OnCallEnded { - return (code, details, metadata) => { - let parsedLoadReport = metadata.getOpaque(PARSED_LOAD_REPORT_KEY) as (OrcaLoadReport__Output | undefined); - if (parsedLoadReport) { - listener(parsedLoadReport); - } else { - const serializedLoadReport = metadata.get(GRPC_METRICS_HEADER); - if (serializedLoadReport.length > 0) { - const orcaProto = loadOrcaProto(); - parsedLoadReport = orcaProto.xds.data.orca.v3.OrcaLoadReport.deserialize(serializedLoadReport[0] as Buffer); - listener(parsedLoadReport); - metadata.setOpaque(PARSED_LOAD_REPORT_KEY, parsedLoadReport); - } - } - if (previousOnCallEnded) { - previousOnCallEnded(code, details, metadata); - } - } -} - -const DATA_PRODUCER_KEY = 'orca_oob_metrics'; - -class OobMetricsDataWatcher implements DataWatcher { - private dataProducer: DataProducer | null = null; - constructor(private metricsListener: MetricsListener, private intervalMs: number) {} - setSubchannel(subchannel: Subchannel): void { - const producer = subchannel.getOrCreateDataProducer(DATA_PRODUCER_KEY, createOobMetricsDataProducer); - this.dataProducer = producer; - producer.addDataWatcher(this); - } - destroy(): void { - this.dataProducer?.removeDataWatcher(this); - } - getInterval(): number { - return this.intervalMs; - } - onMetricsUpdate(metrics: OrcaLoadReport__Output) { - this.metricsListener(metrics); - } -} - -class OobMetricsDataProducer implements DataProducer { - private dataWatchers: Set = new Set(); - private orcaSupported = true; - private client: OpenRcaServiceClient; - private metricsCall: ClientReadableStream | null = null; - private currentInterval = Infinity; - private backoffTimer = new BackoffTimeout(() => this.updateMetricsSubscription()); - private subchannelStateListener = () => this.updateMetricsSubscription(); - constructor(private subchannel: Subchannel) { - const channel = subchannel.getChannel(); - this.client = createOrcaClient(channel); - subchannel.addConnectivityStateListener(this.subchannelStateListener); - } - addDataWatcher(dataWatcher: OobMetricsDataWatcher): void { - this.dataWatchers.add(dataWatcher); - this.updateMetricsSubscription(); - } - removeDataWatcher(dataWatcher: OobMetricsDataWatcher): void { - this.dataWatchers.delete(dataWatcher); - if (this.dataWatchers.size === 0) { - this.subchannel.removeDataProducer(DATA_PRODUCER_KEY); - this.metricsCall?.cancel(); - this.metricsCall = null; - this.client.close(); - this.subchannel.removeConnectivityStateListener(this.subchannelStateListener); - } else { - this.updateMetricsSubscription(); - } - } - private updateMetricsSubscription() { - if (this.dataWatchers.size === 0 || !this.orcaSupported || this.subchannel.getConnectivityState() !== ConnectivityState.READY) { - return; - } - const newInterval = Math.min(...Array.from(this.dataWatchers).map(watcher => watcher.getInterval())); - if (!this.metricsCall || newInterval !== this.currentInterval) { - this.metricsCall?.cancel(); - this.currentInterval = newInterval; - const metricsCall = this.client.streamCoreMetrics({report_interval: msToDuration(newInterval)}); - this.metricsCall = metricsCall; - metricsCall.on('data', (report: OrcaLoadReport__Output) => { - this.dataWatchers.forEach(watcher => { - watcher.onMetricsUpdate(report); - }); - }); - metricsCall.on('error', (error: ServiceError) => { - this.metricsCall = null; - if (error.code === Status.UNIMPLEMENTED) { - this.orcaSupported = false; - return; - } - if (error.code === Status.CANCELLED) { - return; - } - this.backoffTimer.runOnce(); - }); - } - } -} - -export class OrcaOobMetricsSubchannelWrapper extends BaseSubchannelWrapper { - constructor(child: SubchannelInterface, metricsListener: MetricsListener, intervalMs: number) { - super(child); - this.addDataWatcher(new OobMetricsDataWatcher(metricsListener, intervalMs)); - } - - getWrappedSubchannel(): SubchannelInterface { - return this.child; - } -} - -function createOobMetricsDataProducer(subchannel: Subchannel) { - return new OobMetricsDataProducer(subchannel); -} diff --git a/node_modules/@grpc/grpc-js/src/picker.ts b/node_modules/@grpc/grpc-js/src/picker.ts deleted file mode 100644 index fdf42fc..0000000 --- a/node_modules/@grpc/grpc-js/src/picker.ts +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { StatusObject } from './call-interface'; -import { Metadata } from './metadata'; -import { Status } from './constants'; -import { LoadBalancer } from './load-balancer'; -import { SubchannelInterface } from './subchannel-interface'; - -export enum PickResultType { - COMPLETE, - QUEUE, - TRANSIENT_FAILURE, - DROP, -} - -export type OnCallEnded = (statusCode: Status, details: string, metadata: Metadata) => void; - -export interface PickResult { - pickResultType: PickResultType; - /** - * The subchannel to use as the transport for the call. Only meaningful if - * `pickResultType` is COMPLETE. If null, indicates that the call should be - * dropped. - */ - subchannel: SubchannelInterface | null; - /** - * The status object to end the call with. Populated if and only if - * `pickResultType` is TRANSIENT_FAILURE. - */ - status: StatusObject | null; - onCallStarted: (() => void) | null; - onCallEnded: OnCallEnded | null; -} - -export interface CompletePickResult extends PickResult { - pickResultType: PickResultType.COMPLETE; - subchannel: SubchannelInterface | null; - status: null; - onCallStarted: (() => void) | null; - onCallEnded: OnCallEnded | null; -} - -export interface QueuePickResult extends PickResult { - pickResultType: PickResultType.QUEUE; - subchannel: null; - status: null; - onCallStarted: null; - onCallEnded: null; -} - -export interface TransientFailurePickResult extends PickResult { - pickResultType: PickResultType.TRANSIENT_FAILURE; - subchannel: null; - status: StatusObject; - onCallStarted: null; - onCallEnded: null; -} - -export interface DropCallPickResult extends PickResult { - pickResultType: PickResultType.DROP; - subchannel: null; - status: StatusObject; - onCallStarted: null; - onCallEnded: null; -} - -export interface PickArgs { - metadata: Metadata; - extraPickInfo: { [key: string]: string }; -} - -/** - * A proxy object representing the momentary state of a load balancer. Picks - * subchannels or returns other information based on that state. Should be - * replaced every time the load balancer changes state. - */ -export interface Picker { - pick(pickArgs: PickArgs): PickResult; -} - -/** - * A standard picker representing a load balancer in the TRANSIENT_FAILURE - * state. Always responds to every pick request with an UNAVAILABLE status. - */ -export class UnavailablePicker implements Picker { - private status: StatusObject; - constructor(status?: Partial) { - this.status = { - code: Status.UNAVAILABLE, - details: 'No connection established', - metadata: new Metadata(), - ...status, - }; - } - pick(pickArgs: PickArgs): TransientFailurePickResult { - return { - pickResultType: PickResultType.TRANSIENT_FAILURE, - subchannel: null, - status: this.status, - onCallStarted: null, - onCallEnded: null, - }; - } -} - -/** - * A standard picker representing a load balancer in the IDLE or CONNECTING - * state. Always responds to every pick request with a QUEUE pick result - * indicating that the pick should be tried again with the next `Picker`. Also - * reports back to the load balancer that a connection should be established - * once any pick is attempted. - * If the childPicker is provided, delegate to it instead of returning the - * hardcoded QUEUE pick result, but still calls exitIdle. - */ -export class QueuePicker { - private calledExitIdle = false; - // Constructed with a load balancer. Calls exitIdle on it the first time pick is called - constructor( - private loadBalancer: LoadBalancer, - private childPicker?: Picker - ) {} - - pick(pickArgs: PickArgs): PickResult { - if (!this.calledExitIdle) { - process.nextTick(() => { - this.loadBalancer.exitIdle(); - }); - this.calledExitIdle = true; - } - if (this.childPicker) { - return this.childPicker.pick(pickArgs); - } else { - return { - pickResultType: PickResultType.QUEUE, - subchannel: null, - status: null, - onCallStarted: null, - onCallEnded: null, - }; - } - } -} diff --git a/node_modules/@grpc/grpc-js/src/priority-queue.ts b/node_modules/@grpc/grpc-js/src/priority-queue.ts deleted file mode 100644 index 3ddf8f8..0000000 --- a/node_modules/@grpc/grpc-js/src/priority-queue.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2025 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -const top = 0; -const parent = (i: number) => Math.floor(i / 2); -const left = (i: number) => i * 2 + 1; -const right = (i: number) => i * 2 + 2; - -/** - * A generic priority queue implemented as an array-based binary heap. - * Adapted from https://stackoverflow.com/a/42919752/159388 - */ -export class PriorityQueue { - private readonly heap: T[] = []; - /** - * - * @param comparator Returns true if the first argument should precede the - * second in the queue. Defaults to `(a, b) => a > b` - */ - constructor(private readonly comparator = (a: T, b: T) => a > b) {} - - /** - * @returns The number of items currently in the queue - */ - size(): number { - return this.heap.length; - } - /** - * @returns True if there are no items in the queue, false otherwise - */ - isEmpty(): boolean { - return this.size() == 0; - } - /** - * Look at the front item that would be popped, without modifying the contents - * of the queue - * @returns The front item in the queue, or undefined if the queue is empty - */ - peek(): T | undefined { - return this.heap[top]; - } - /** - * Add the items to the queue - * @param values The items to add - * @returns The new size of the queue after adding the items - */ - push(...values: T[]): number { - values.forEach(value => { - this.heap.push(value); - this.siftUp(); - }); - return this.size(); - } - /** - * Remove the front item in the queue and return it - * @returns The front item in the queue, or undefined if the queue is empty - */ - pop(): T | undefined { - const poppedValue = this.peek(); - const bottom = this.size() - 1; - if (bottom > top) { - this.swap(top, bottom); - } - this.heap.pop(); - this.siftDown(); - return poppedValue; - } - /** - * Simultaneously remove the front item in the queue and add the provided - * item. - * @param value The item to add - * @returns The front item in the queue, or undefined if the queue is empty - */ - replace(value: T): T | undefined { - const replacedValue = this.peek(); - this.heap[top] = value; - this.siftDown(); - return replacedValue; - } - private greater(i: number, j: number): boolean { - return this.comparator(this.heap[i], this.heap[j]); - } - private swap(i: number, j: number): void { - [this.heap[i], this.heap[j]] = [this.heap[j], this.heap[i]]; - } - private siftUp(): void { - let node = this.size() - 1; - while (node > top && this.greater(node, parent(node))) { - this.swap(node, parent(node)); - node = parent(node); - } - } - private siftDown(): void { - let node = top; - while ( - (left(node) < this.size() && this.greater(left(node), node)) || - (right(node) < this.size() && this.greater(right(node), node)) - ) { - let maxChild = (right(node) < this.size() && this.greater(right(node), left(node))) ? right(node) : left(node); - this.swap(node, maxChild); - node = maxChild; - } - } -} diff --git a/node_modules/@grpc/grpc-js/src/resolver-dns.ts b/node_modules/@grpc/grpc-js/src/resolver-dns.ts deleted file mode 100644 index 5245fe1..0000000 --- a/node_modules/@grpc/grpc-js/src/resolver-dns.ts +++ /dev/null @@ -1,449 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { - Resolver, - ResolverListener, - registerResolver, - registerDefaultScheme, -} from './resolver'; -import { promises as dns } from 'dns'; -import { extractAndSelectServiceConfig, ServiceConfig } from './service-config'; -import { Status } from './constants'; -import { StatusObject, StatusOr, statusOrFromError, statusOrFromValue } from './call-interface'; -import { Metadata } from './metadata'; -import * as logging from './logging'; -import { LogVerbosity } from './constants'; -import { Endpoint, TcpSubchannelAddress } from './subchannel-address'; -import { GrpcUri, uriToString, splitHostPort } from './uri-parser'; -import { isIPv6, isIPv4 } from 'net'; -import { ChannelOptions } from './channel-options'; -import { BackoffOptions, BackoffTimeout } from './backoff-timeout'; -import { GRPC_NODE_USE_ALTERNATIVE_RESOLVER } from './environment'; - -const TRACER_NAME = 'dns_resolver'; - -function trace(text: string): void { - logging.trace(LogVerbosity.DEBUG, TRACER_NAME, text); -} - -/** - * The default TCP port to connect to if not explicitly specified in the target. - */ -export const DEFAULT_PORT = 443; - -const DEFAULT_MIN_TIME_BETWEEN_RESOLUTIONS_MS = 30_000; - -/** - * Resolver implementation that handles DNS names and IP addresses. - */ -class DnsResolver implements Resolver { - private readonly ipResult: Endpoint[] | null; - private readonly dnsHostname: string | null; - private readonly port: number | null; - /** - * Minimum time between resolutions, measured as the time between starting - * successive resolution requests. Only applies to successful resolutions. - * Failures are handled by the backoff timer. - */ - private readonly minTimeBetweenResolutionsMs: number; - private pendingLookupPromise: Promise | null = null; - private pendingTxtPromise: Promise | null = null; - private latestLookupResult: StatusOr | null = null; - private latestServiceConfigResult: StatusOr | null = null; - private percentage: number; - private defaultResolutionError: StatusObject; - private backoff: BackoffTimeout; - private continueResolving = false; - private nextResolutionTimer: NodeJS.Timeout; - private isNextResolutionTimerRunning = false; - private isServiceConfigEnabled = true; - private returnedIpResult = false; - private alternativeResolver = new dns.Resolver(); - - constructor( - private target: GrpcUri, - private listener: ResolverListener, - channelOptions: ChannelOptions - ) { - trace('Resolver constructed for target ' + uriToString(target)); - if (target.authority) { - this.alternativeResolver.setServers([target.authority]); - } - const hostPort = splitHostPort(target.path); - if (hostPort === null) { - this.ipResult = null; - this.dnsHostname = null; - this.port = null; - } else { - if (isIPv4(hostPort.host) || isIPv6(hostPort.host)) { - this.ipResult = [ - { - addresses: [ - { - host: hostPort.host, - port: hostPort.port ?? DEFAULT_PORT, - }, - ], - }, - ]; - this.dnsHostname = null; - this.port = null; - } else { - this.ipResult = null; - this.dnsHostname = hostPort.host; - this.port = hostPort.port ?? DEFAULT_PORT; - } - } - this.percentage = Math.random() * 100; - - if (channelOptions['grpc.service_config_disable_resolution'] === 1) { - this.isServiceConfigEnabled = false; - } - - this.defaultResolutionError = { - code: Status.UNAVAILABLE, - details: `Name resolution failed for target ${uriToString(this.target)}`, - metadata: new Metadata(), - }; - - const backoffOptions: BackoffOptions = { - initialDelay: channelOptions['grpc.initial_reconnect_backoff_ms'], - maxDelay: channelOptions['grpc.max_reconnect_backoff_ms'], - }; - - this.backoff = new BackoffTimeout(() => { - if (this.continueResolving) { - this.startResolutionWithBackoff(); - } - }, backoffOptions); - this.backoff.unref(); - - this.minTimeBetweenResolutionsMs = - channelOptions['grpc.dns_min_time_between_resolutions_ms'] ?? - DEFAULT_MIN_TIME_BETWEEN_RESOLUTIONS_MS; - this.nextResolutionTimer = setTimeout(() => {}, 0); - clearTimeout(this.nextResolutionTimer); - } - - /** - * If the target is an IP address, just provide that address as a result. - * Otherwise, initiate A, AAAA, and TXT lookups - */ - private startResolution() { - if (this.ipResult !== null) { - if (!this.returnedIpResult) { - trace('Returning IP address for target ' + uriToString(this.target)); - setImmediate(() => { - this.listener( - statusOrFromValue(this.ipResult!), - {}, - null, - '' - ) - }); - this.returnedIpResult = true; - } - this.backoff.stop(); - this.backoff.reset(); - this.stopNextResolutionTimer(); - return; - } - if (this.dnsHostname === null) { - trace('Failed to parse DNS address ' + uriToString(this.target)); - setImmediate(() => { - this.listener( - statusOrFromError({ - code: Status.UNAVAILABLE, - details: `Failed to parse DNS address ${uriToString(this.target)}` - }), - {}, - null, - '' - ); - }); - this.stopNextResolutionTimer(); - } else { - if (this.pendingLookupPromise !== null) { - return; - } - trace('Looking up DNS hostname ' + this.dnsHostname); - /* We clear out latestLookupResult here to ensure that it contains the - * latest result since the last time we started resolving. That way, the - * TXT resolution handler can use it, but only if it finishes second. We - * don't clear out any previous service config results because it's - * better to use a service config that's slightly out of date than to - * revert to an effectively blank one. */ - this.latestLookupResult = null; - const hostname: string = this.dnsHostname; - this.pendingLookupPromise = this.lookup(hostname); - this.pendingLookupPromise.then( - addressList => { - if (this.pendingLookupPromise === null) { - return; - } - this.pendingLookupPromise = null; - this.latestLookupResult = statusOrFromValue(addressList.map(address => ({ - addresses: [address], - }))); - const allAddressesString: string = - '[' + - addressList.map(addr => addr.host + ':' + addr.port).join(',') + - ']'; - trace( - 'Resolved addresses for target ' + - uriToString(this.target) + - ': ' + - allAddressesString - ); - /* If the TXT lookup has not yet finished, both of the last two - * arguments will be null, which is the equivalent of getting an - * empty TXT response. When the TXT lookup does finish, its handler - * can update the service config by using the same address list */ - const healthStatus = this.listener( - this.latestLookupResult, - {}, - this.latestServiceConfigResult, - '' - ); - this.handleHealthStatus(healthStatus); - }, - err => { - if (this.pendingLookupPromise === null) { - return; - } - trace( - 'Resolution error for target ' + - uriToString(this.target) + - ': ' + - (err as Error).message - ); - this.pendingLookupPromise = null; - this.stopNextResolutionTimer(); - this.listener( - statusOrFromError(this.defaultResolutionError), - {}, - this.latestServiceConfigResult, - '' - ) - } - ); - /* If there already is a still-pending TXT resolution, we can just use - * that result when it comes in */ - if (this.isServiceConfigEnabled && this.pendingTxtPromise === null) { - /* We handle the TXT query promise differently than the others because - * the name resolution attempt as a whole is a success even if the TXT - * lookup fails */ - this.pendingTxtPromise = this.resolveTxt(hostname); - this.pendingTxtPromise.then( - txtRecord => { - if (this.pendingTxtPromise === null) { - return; - } - this.pendingTxtPromise = null; - let serviceConfig: ServiceConfig | null; - try { - serviceConfig = extractAndSelectServiceConfig( - txtRecord, - this.percentage - ); - if (serviceConfig) { - this.latestServiceConfigResult = statusOrFromValue(serviceConfig); - } else { - this.latestServiceConfigResult = null; - } - } catch (err) { - this.latestServiceConfigResult = statusOrFromError({ - code: Status.UNAVAILABLE, - details: `Parsing service config failed with error ${ - (err as Error).message - }` - }); - } - if (this.latestLookupResult !== null) { - /* We rely here on the assumption that calling this function with - * identical parameters will be essentialy idempotent, and calling - * it with the same address list and a different service config - * should result in a fast and seamless switchover. */ - this.listener( - this.latestLookupResult, - {}, - this.latestServiceConfigResult, - '' - ); - } - }, - err => { - /* If TXT lookup fails we should do nothing, which means that we - * continue to use the result of the most recent successful lookup, - * or the default null config object if there has never been a - * successful lookup. We do not set the latestServiceConfigError - * here because that is specifically used for response validation - * errors. We still need to handle this error so that it does not - * bubble up as an unhandled promise rejection. */ - } - ); - } - } - } - - /** - * The ResolverListener returns a boolean indicating whether the LB policy - * accepted the resolution result. A false result on an otherwise successful - * resolution should be treated as a resolution failure. - * @param healthStatus - */ - private handleHealthStatus(healthStatus: boolean) { - if (healthStatus) { - this.backoff.stop(); - this.backoff.reset(); - } else { - this.continueResolving = true; - } - } - - private async lookup(hostname: string): Promise { - if (GRPC_NODE_USE_ALTERNATIVE_RESOLVER) { - trace('Using alternative DNS resolver.'); - - const records = await Promise.allSettled([ - this.alternativeResolver.resolve4(hostname), - this.alternativeResolver.resolve6(hostname), - ]); - - if (records.every(result => result.status === 'rejected')) { - throw new Error((records[0] as PromiseRejectedResult).reason); - } - - return records - .reduce((acc, result) => { - return result.status === 'fulfilled' - ? [...acc, ...result.value] - : acc; - }, []) - .map(addr => ({ - host: addr, - port: +this.port!, - })); - } - - /* We lookup both address families here and then split them up later - * because when looking up a single family, dns.lookup outputs an error - * if the name exists but there are no records for that family, and that - * error is indistinguishable from other kinds of errors */ - const addressList = await dns.lookup(hostname, { all: true }); - return addressList.map(addr => ({ host: addr.address, port: +this.port! })); - } - - private async resolveTxt(hostname: string): Promise { - if (GRPC_NODE_USE_ALTERNATIVE_RESOLVER) { - trace('Using alternative DNS resolver.'); - return this.alternativeResolver.resolveTxt(hostname); - } - - return dns.resolveTxt(hostname); - } - - private startNextResolutionTimer() { - clearTimeout(this.nextResolutionTimer); - this.nextResolutionTimer = setTimeout(() => { - this.stopNextResolutionTimer(); - if (this.continueResolving) { - this.startResolutionWithBackoff(); - } - }, this.minTimeBetweenResolutionsMs); - this.nextResolutionTimer.unref?.(); - this.isNextResolutionTimerRunning = true; - } - - private stopNextResolutionTimer() { - clearTimeout(this.nextResolutionTimer); - this.isNextResolutionTimerRunning = false; - } - - private startResolutionWithBackoff() { - if (this.pendingLookupPromise === null) { - this.continueResolving = false; - this.backoff.runOnce(); - this.startNextResolutionTimer(); - this.startResolution(); - } - } - - updateResolution() { - /* If there is a pending lookup, just let it finish. Otherwise, if the - * nextResolutionTimer or backoff timer is running, set the - * continueResolving flag to resolve when whichever of those timers - * fires. Otherwise, start resolving immediately. */ - if (this.pendingLookupPromise === null) { - if (this.isNextResolutionTimerRunning || this.backoff.isRunning()) { - if (this.isNextResolutionTimerRunning) { - trace( - 'resolution update delayed by "min time between resolutions" rate limit' - ); - } else { - trace( - 'resolution update delayed by backoff timer until ' + - this.backoff.getEndTime().toISOString() - ); - } - this.continueResolving = true; - } else { - this.startResolutionWithBackoff(); - } - } - } - - /** - * Reset the resolver to the same state it had when it was created. In-flight - * DNS requests cannot be cancelled, but they are discarded and their results - * will be ignored. - */ - destroy() { - this.continueResolving = false; - this.backoff.reset(); - this.backoff.stop(); - this.stopNextResolutionTimer(); - this.pendingLookupPromise = null; - this.pendingTxtPromise = null; - this.latestLookupResult = null; - this.latestServiceConfigResult = null; - this.returnedIpResult = false; - } - - /** - * Get the default authority for the given target. For IP targets, that is - * the IP address. For DNS targets, it is the hostname. - * @param target - */ - static getDefaultAuthority(target: GrpcUri): string { - return target.path; - } -} - -/** - * Set up the DNS resolver class by registering it as the handler for the - * "dns:" prefix and as the default resolver. - */ -export function setup(): void { - registerResolver('dns', DnsResolver); - registerDefaultScheme('dns'); -} - -export interface DnsUrl { - host: string; - port?: string; -} diff --git a/node_modules/@grpc/grpc-js/src/resolver-ip.ts b/node_modules/@grpc/grpc-js/src/resolver-ip.ts deleted file mode 100644 index 76e13e3..0000000 --- a/node_modules/@grpc/grpc-js/src/resolver-ip.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { isIPv4, isIPv6 } from 'net'; -import { StatusObject, statusOrFromError, statusOrFromValue } from './call-interface'; -import { ChannelOptions } from './channel-options'; -import { LogVerbosity, Status } from './constants'; -import { Metadata } from './metadata'; -import { registerResolver, Resolver, ResolverListener } from './resolver'; -import { Endpoint, SubchannelAddress, subchannelAddressToString } from './subchannel-address'; -import { GrpcUri, splitHostPort, uriToString } from './uri-parser'; -import * as logging from './logging'; - -const TRACER_NAME = 'ip_resolver'; - -function trace(text: string): void { - logging.trace(LogVerbosity.DEBUG, TRACER_NAME, text); -} - -const IPV4_SCHEME = 'ipv4'; -const IPV6_SCHEME = 'ipv6'; - -/** - * The default TCP port to connect to if not explicitly specified in the target. - */ -const DEFAULT_PORT = 443; - -class IpResolver implements Resolver { - private endpoints: Endpoint[] = []; - private error: StatusObject | null = null; - private hasReturnedResult = false; - constructor( - target: GrpcUri, - private listener: ResolverListener, - channelOptions: ChannelOptions - ) { - trace('Resolver constructed for target ' + uriToString(target)); - const addresses: SubchannelAddress[] = []; - if (!(target.scheme === IPV4_SCHEME || target.scheme === IPV6_SCHEME)) { - this.error = { - code: Status.UNAVAILABLE, - details: `Unrecognized scheme ${target.scheme} in IP resolver`, - metadata: new Metadata(), - }; - return; - } - const pathList = target.path.split(','); - for (const path of pathList) { - const hostPort = splitHostPort(path); - if (hostPort === null) { - this.error = { - code: Status.UNAVAILABLE, - details: `Failed to parse ${target.scheme} address ${path}`, - metadata: new Metadata(), - }; - return; - } - if ( - (target.scheme === IPV4_SCHEME && !isIPv4(hostPort.host)) || - (target.scheme === IPV6_SCHEME && !isIPv6(hostPort.host)) - ) { - this.error = { - code: Status.UNAVAILABLE, - details: `Failed to parse ${target.scheme} address ${path}`, - metadata: new Metadata(), - }; - return; - } - addresses.push({ - host: hostPort.host, - port: hostPort.port ?? DEFAULT_PORT, - }); - } - this.endpoints = addresses.map(address => ({ addresses: [address] })); - trace('Parsed ' + target.scheme + ' address list ' + addresses.map(subchannelAddressToString)); - } - updateResolution(): void { - if (!this.hasReturnedResult) { - this.hasReturnedResult = true; - process.nextTick(() => { - if (this.error) { - this.listener( - statusOrFromError(this.error), - {}, - null, - '' - ); - } else { - this.listener( - statusOrFromValue(this.endpoints), - {}, - null, - '' - ); - } - }); - } - } - destroy(): void { - this.hasReturnedResult = false; - } - - static getDefaultAuthority(target: GrpcUri): string { - return target.path.split(',')[0]; - } -} - -export function setup() { - registerResolver(IPV4_SCHEME, IpResolver); - registerResolver(IPV6_SCHEME, IpResolver); -} diff --git a/node_modules/@grpc/grpc-js/src/resolver-uds.ts b/node_modules/@grpc/grpc-js/src/resolver-uds.ts deleted file mode 100644 index 5ef8c07..0000000 --- a/node_modules/@grpc/grpc-js/src/resolver-uds.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Resolver, ResolverListener, registerResolver } from './resolver'; -import { Endpoint } from './subchannel-address'; -import { GrpcUri } from './uri-parser'; -import { ChannelOptions } from './channel-options'; -import { statusOrFromValue } from './call-interface'; - -class UdsResolver implements Resolver { - private hasReturnedResult = false; - private endpoints: Endpoint[] = []; - constructor( - target: GrpcUri, - private listener: ResolverListener, - channelOptions: ChannelOptions - ) { - let path: string; - if (target.authority === '') { - path = '/' + target.path; - } else { - path = target.path; - } - this.endpoints = [{ addresses: [{ path }] }]; - } - updateResolution(): void { - if (!this.hasReturnedResult) { - this.hasReturnedResult = true; - process.nextTick( - this.listener, - statusOrFromValue(this.endpoints), - {}, - null, - '' - ); - } - } - - destroy() { - this.hasReturnedResult = false; - } - - static getDefaultAuthority(target: GrpcUri): string { - return 'localhost'; - } -} - -export function setup() { - registerResolver('unix', UdsResolver); -} diff --git a/node_modules/@grpc/grpc-js/src/resolver.ts b/node_modules/@grpc/grpc-js/src/resolver.ts deleted file mode 100644 index 28cc987..0000000 --- a/node_modules/@grpc/grpc-js/src/resolver.ts +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { MethodConfig, ServiceConfig } from './service-config'; -import { StatusOr } from './call-interface'; -import { Endpoint } from './subchannel-address'; -import { GrpcUri, uriToString } from './uri-parser'; -import { ChannelOptions } from './channel-options'; -import { Metadata } from './metadata'; -import { Status } from './constants'; -import { Filter, FilterFactory } from './filter'; - -export const CHANNEL_ARGS_CONFIG_SELECTOR_KEY = 'grpc.internal.config_selector'; - -export interface CallConfig { - methodConfig: MethodConfig; - onCommitted?: () => void; - pickInformation: { [key: string]: string }; - status: Status; - dynamicFilterFactories: FilterFactory[]; -} - -/** - * Selects a configuration for a method given the name and metadata. Defined in - * https://github.com/grpc/proposal/blob/master/A31-xds-timeout-support-and-config-selector.md#new-functionality-in-grpc - */ -export interface ConfigSelector { - invoke(methodName: string, metadata: Metadata, channelId: number): CallConfig; - unref(): void; -} - -export interface ResolverListener { - /** - * Called whenever the resolver has new name resolution results or an error to - * report. - * @param endpointList The list of endpoints, or an error if resolution failed - * @param attributes Arbitrary key/value pairs to pass along to load balancing - * policies - * @param serviceConfig The service service config for the endpoint list, or an - * error if the retrieved service config is invalid, or null if there is no - * service config - * @param resolutionNote Provides additional context to RPC failure status - * messages generated by the load balancing policy. - * @returns Whether or not the load balancing policy accepted the result. - */ - ( - endpointList: StatusOr, - attributes: { [key: string]: unknown }, - serviceConfig: StatusOr | null, - resolutionNote: string - ): boolean; -} -/** - * A resolver class that handles one or more of the name syntax schemes defined - * in the [gRPC Name Resolution document](https://github.com/grpc/grpc/blob/master/doc/naming.md) - */ -export interface Resolver { - /** - * Indicates that the caller wants new name resolution data. Calling this - * function may eventually result in calling one of the `ResolverListener` - * functions, but that is not guaranteed. Those functions will never be - * called synchronously with the constructor or updateResolution. - */ - updateResolution(): void; - - /** - * Discard all resources owned by the resolver. A later call to - * `updateResolution` should reinitialize those resources. No - * `ResolverListener` callbacks should be called after `destroy` is called - * until `updateResolution` is called again. - */ - destroy(): void; -} - -export interface ResolverConstructor { - new ( - target: GrpcUri, - listener: ResolverListener, - channelOptions: ChannelOptions - ): Resolver; - /** - * Get the default authority for a target. This loosely corresponds to that - * target's hostname. Throws an error if this resolver class cannot parse the - * `target`. - * @param target - */ - getDefaultAuthority(target: GrpcUri): string; -} - -const registeredResolvers: { [scheme: string]: ResolverConstructor } = {}; -let defaultScheme: string | null = null; - -/** - * Register a resolver class to handle target names prefixed with the `prefix` - * string. This prefix should correspond to a URI scheme name listed in the - * [gRPC Name Resolution document](https://github.com/grpc/grpc/blob/master/doc/naming.md) - * @param prefix - * @param resolverClass - */ -export function registerResolver( - scheme: string, - resolverClass: ResolverConstructor -) { - registeredResolvers[scheme] = resolverClass; -} - -/** - * Register a default resolver to handle target names that do not start with - * any registered prefix. - * @param resolverClass - */ -export function registerDefaultScheme(scheme: string) { - defaultScheme = scheme; -} - -/** - * Create a name resolver for the specified target, if possible. Throws an - * error if no such name resolver can be created. - * @param target - * @param listener - */ -export function createResolver( - target: GrpcUri, - listener: ResolverListener, - options: ChannelOptions -): Resolver { - if (target.scheme !== undefined && target.scheme in registeredResolvers) { - return new registeredResolvers[target.scheme](target, listener, options); - } else { - throw new Error( - `No resolver could be created for target ${uriToString(target)}` - ); - } -} - -/** - * Get the default authority for the specified target, if possible. Throws an - * error if no registered name resolver can parse that target string. - * @param target - */ -export function getDefaultAuthority(target: GrpcUri): string { - if (target.scheme !== undefined && target.scheme in registeredResolvers) { - return registeredResolvers[target.scheme].getDefaultAuthority(target); - } else { - throw new Error(`Invalid target ${uriToString(target)}`); - } -} - -export function mapUriDefaultScheme(target: GrpcUri): GrpcUri | null { - if (target.scheme === undefined || !(target.scheme in registeredResolvers)) { - if (defaultScheme !== null) { - return { - scheme: defaultScheme, - authority: undefined, - path: uriToString(target), - }; - } else { - return null; - } - } - return target; -} diff --git a/node_modules/@grpc/grpc-js/src/resolving-call.ts b/node_modules/@grpc/grpc-js/src/resolving-call.ts deleted file mode 100644 index d328978..0000000 --- a/node_modules/@grpc/grpc-js/src/resolving-call.ts +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { CallCredentials } from './call-credentials'; -import { - Call, - CallStreamOptions, - DeadlineInfoProvider, - InterceptingListener, - MessageContext, - StatusObject, -} from './call-interface'; -import { LogVerbosity, Propagate, Status } from './constants'; -import { - Deadline, - deadlineToString, - formatDateDifference, - getRelativeTimeout, - minDeadline, -} from './deadline'; -import { FilterStack, FilterStackFactory } from './filter-stack'; -import { InternalChannel } from './internal-channel'; -import { Metadata } from './metadata'; -import * as logging from './logging'; -import { restrictControlPlaneStatusCode } from './control-plane-status'; -import { AuthContext } from './auth-context'; - -const TRACER_NAME = 'resolving_call'; - -export class ResolvingCall implements Call { - private child: (Call & DeadlineInfoProvider) | null = null; - private readPending = false; - private pendingMessage: { context: MessageContext; message: Buffer } | null = - null; - private pendingHalfClose = false; - private ended = false; - private readFilterPending = false; - private writeFilterPending = false; - private pendingChildStatus: StatusObject | null = null; - private metadata: Metadata | null = null; - private listener: InterceptingListener | null = null; - private deadline: Deadline; - private host: string; - private statusWatchers: ((status: StatusObject) => void)[] = []; - private deadlineTimer: NodeJS.Timeout = setTimeout(() => {}, 0); - private filterStack: FilterStack | null = null; - - private deadlineStartTime: Date | null = null; - private configReceivedTime: Date | null = null; - private childStartTime: Date | null = null; - - /** - * Credentials configured for this specific call. Does not include - * call credentials associated with the channel credentials used to create - * the channel. - */ - private credentials: CallCredentials = CallCredentials.createEmpty(); - - constructor( - private readonly channel: InternalChannel, - private readonly method: string, - options: CallStreamOptions, - private readonly filterStackFactory: FilterStackFactory, - private callNumber: number - ) { - this.deadline = options.deadline; - this.host = options.host; - if (options.parentCall) { - if (options.flags & Propagate.CANCELLATION) { - options.parentCall.on('cancelled', () => { - this.cancelWithStatus(Status.CANCELLED, 'Cancelled by parent call'); - }); - } - if (options.flags & Propagate.DEADLINE) { - this.trace( - 'Propagating deadline from parent: ' + - options.parentCall.getDeadline() - ); - this.deadline = minDeadline( - this.deadline, - options.parentCall.getDeadline() - ); - } - } - this.trace('Created'); - this.runDeadlineTimer(); - } - - private trace(text: string): void { - logging.trace( - LogVerbosity.DEBUG, - TRACER_NAME, - '[' + this.callNumber + '] ' + text - ); - } - - private runDeadlineTimer() { - clearTimeout(this.deadlineTimer); - this.deadlineStartTime = new Date(); - this.trace('Deadline: ' + deadlineToString(this.deadline)); - const timeout = getRelativeTimeout(this.deadline); - if (timeout !== Infinity) { - this.trace('Deadline will be reached in ' + timeout + 'ms'); - const handleDeadline = () => { - if (!this.deadlineStartTime) { - this.cancelWithStatus(Status.DEADLINE_EXCEEDED, 'Deadline exceeded'); - return; - } - const deadlineInfo: string[] = []; - const deadlineEndTime = new Date(); - deadlineInfo.push(`Deadline exceeded after ${formatDateDifference(this.deadlineStartTime, deadlineEndTime)}`); - if (this.configReceivedTime) { - if (this.configReceivedTime > this.deadlineStartTime) { - deadlineInfo.push(`name resolution: ${formatDateDifference(this.deadlineStartTime, this.configReceivedTime)}`); - } - if (this.childStartTime) { - if (this.childStartTime > this.configReceivedTime) { - deadlineInfo.push(`metadata filters: ${formatDateDifference(this.configReceivedTime, this.childStartTime)}`); - } - } else { - deadlineInfo.push('waiting for metadata filters'); - } - } else { - deadlineInfo.push('waiting for name resolution'); - } - if (this.child) { - deadlineInfo.push(...this.child.getDeadlineInfo()); - } - this.cancelWithStatus(Status.DEADLINE_EXCEEDED, deadlineInfo.join(',')); - }; - if (timeout <= 0) { - process.nextTick(handleDeadline); - } else { - this.deadlineTimer = setTimeout(handleDeadline, timeout); - } - } - } - - private outputStatus(status: StatusObject) { - if (!this.ended) { - this.ended = true; - if (!this.filterStack) { - this.filterStack = this.filterStackFactory.createFilter(); - } - clearTimeout(this.deadlineTimer); - const filteredStatus = this.filterStack.receiveTrailers(status); - this.trace( - 'ended with status: code=' + - filteredStatus.code + - ' details="' + - filteredStatus.details + - '"' - ); - this.statusWatchers.forEach(watcher => watcher(filteredStatus)); - process.nextTick(() => { - this.listener?.onReceiveStatus(filteredStatus); - }); - } - } - - private sendMessageOnChild(context: MessageContext, message: Buffer): void { - if (!this.child) { - throw new Error('sendMessageonChild called with child not populated'); - } - const child = this.child; - this.writeFilterPending = true; - this.filterStack!.sendMessage( - Promise.resolve({ message: message, flags: context.flags }) - ).then( - filteredMessage => { - this.writeFilterPending = false; - child.sendMessageWithContext(context, filteredMessage.message); - if (this.pendingHalfClose) { - child.halfClose(); - } - }, - (status: StatusObject) => { - this.cancelWithStatus(status.code, status.details); - } - ); - } - - getConfig(): void { - if (this.ended) { - return; - } - if (!this.metadata || !this.listener) { - throw new Error('getConfig called before start'); - } - const configResult = this.channel.getConfig(this.method, this.metadata); - if (configResult.type === 'NONE') { - this.channel.queueCallForConfig(this); - return; - } else if (configResult.type === 'ERROR') { - if (this.metadata.getOptions().waitForReady) { - this.channel.queueCallForConfig(this); - } else { - this.outputStatus(configResult.error); - } - return; - } - // configResult.type === 'SUCCESS' - this.configReceivedTime = new Date(); - const config = configResult.config; - if (config.status !== Status.OK) { - const { code, details } = restrictControlPlaneStatusCode( - config.status, - 'Failed to route call to method ' + this.method - ); - this.outputStatus({ - code: code, - details: details, - metadata: new Metadata(), - }); - return; - } - - if (config.methodConfig.timeout) { - const configDeadline = new Date(); - configDeadline.setSeconds( - configDeadline.getSeconds() + config.methodConfig.timeout.seconds - ); - configDeadline.setMilliseconds( - configDeadline.getMilliseconds() + - config.methodConfig.timeout.nanos / 1_000_000 - ); - this.deadline = minDeadline(this.deadline, configDeadline); - this.runDeadlineTimer(); - } - - this.filterStackFactory.push(config.dynamicFilterFactories); - this.filterStack = this.filterStackFactory.createFilter(); - this.filterStack.sendMetadata(Promise.resolve(this.metadata)).then( - filteredMetadata => { - this.child = this.channel.createRetryingCall( - config, - this.method, - this.host, - this.credentials, - this.deadline - ); - this.trace('Created child [' + this.child.getCallNumber() + ']'); - this.childStartTime = new Date(); - this.child.start(filteredMetadata, { - onReceiveMetadata: metadata => { - this.trace('Received metadata'); - this.listener!.onReceiveMetadata( - this.filterStack!.receiveMetadata(metadata) - ); - }, - onReceiveMessage: message => { - this.trace('Received message'); - this.readFilterPending = true; - this.filterStack!.receiveMessage(message).then( - filteredMesssage => { - this.trace('Finished filtering received message'); - this.readFilterPending = false; - this.listener!.onReceiveMessage(filteredMesssage); - if (this.pendingChildStatus) { - this.outputStatus(this.pendingChildStatus); - } - }, - (status: StatusObject) => { - this.cancelWithStatus(status.code, status.details); - } - ); - }, - onReceiveStatus: status => { - this.trace('Received status'); - if (this.readFilterPending) { - this.pendingChildStatus = status; - } else { - this.outputStatus(status); - } - }, - }); - if (this.readPending) { - this.child.startRead(); - } - if (this.pendingMessage) { - this.sendMessageOnChild( - this.pendingMessage.context, - this.pendingMessage.message - ); - } else if (this.pendingHalfClose) { - this.child.halfClose(); - } - }, - (status: StatusObject) => { - this.outputStatus(status); - } - ); - } - - reportResolverError(status: StatusObject) { - if (this.metadata?.getOptions().waitForReady) { - this.channel.queueCallForConfig(this); - } else { - this.outputStatus(status); - } - } - cancelWithStatus(status: Status, details: string): void { - this.trace( - 'cancelWithStatus code: ' + status + ' details: "' + details + '"' - ); - this.child?.cancelWithStatus(status, details); - this.outputStatus({ - code: status, - details: details, - metadata: new Metadata(), - }); - } - getPeer(): string { - return this.child?.getPeer() ?? this.channel.getTarget(); - } - start(metadata: Metadata, listener: InterceptingListener): void { - this.trace('start called'); - this.metadata = metadata.clone(); - this.listener = listener; - this.getConfig(); - } - sendMessageWithContext(context: MessageContext, message: Buffer): void { - this.trace('write() called with message of length ' + message.length); - if (this.child) { - this.sendMessageOnChild(context, message); - } else { - this.pendingMessage = { context, message }; - } - } - startRead(): void { - this.trace('startRead called'); - if (this.child) { - this.child.startRead(); - } else { - this.readPending = true; - } - } - halfClose(): void { - this.trace('halfClose called'); - if (this.child && !this.writeFilterPending) { - this.child.halfClose(); - } else { - this.pendingHalfClose = true; - } - } - setCredentials(credentials: CallCredentials): void { - this.credentials = credentials; - } - - addStatusWatcher(watcher: (status: StatusObject) => void) { - this.statusWatchers.push(watcher); - } - - getCallNumber(): number { - return this.callNumber; - } - - getAuthContext(): AuthContext | null { - if (this.child) { - return this.child.getAuthContext(); - } else { - return null; - } - } -} diff --git a/node_modules/@grpc/grpc-js/src/resolving-load-balancer.ts b/node_modules/@grpc/grpc-js/src/resolving-load-balancer.ts deleted file mode 100644 index c117e94..0000000 --- a/node_modules/@grpc/grpc-js/src/resolving-load-balancer.ts +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { - ChannelControlHelper, - LoadBalancer, - TypedLoadBalancingConfig, - selectLbConfigFromList, -} from './load-balancer'; -import { - MethodConfig, - ServiceConfig, - validateServiceConfig, -} from './service-config'; -import { ConnectivityState } from './connectivity-state'; -import { CHANNEL_ARGS_CONFIG_SELECTOR_KEY, ConfigSelector, createResolver, Resolver } from './resolver'; -import { Picker, UnavailablePicker, QueuePicker } from './picker'; -import { BackoffOptions, BackoffTimeout } from './backoff-timeout'; -import { Status } from './constants'; -import { StatusObject, StatusOr } from './call-interface'; -import { Metadata } from './metadata'; -import * as logging from './logging'; -import { LogVerbosity } from './constants'; -import { Endpoint } from './subchannel-address'; -import { GrpcUri, uriToString } from './uri-parser'; -import { ChildLoadBalancerHandler } from './load-balancer-child-handler'; -import { ChannelOptions } from './channel-options'; - -const TRACER_NAME = 'resolving_load_balancer'; - -function trace(text: string): void { - logging.trace(LogVerbosity.DEBUG, TRACER_NAME, text); -} - -type NameMatchLevel = 'EMPTY' | 'SERVICE' | 'SERVICE_AND_METHOD'; - -/** - * Name match levels in order from most to least specific. This is the order in - * which searches will be performed. - */ -const NAME_MATCH_LEVEL_ORDER: NameMatchLevel[] = [ - 'SERVICE_AND_METHOD', - 'SERVICE', - 'EMPTY', -]; - -function hasMatchingName( - service: string, - method: string, - methodConfig: MethodConfig, - matchLevel: NameMatchLevel -): boolean { - for (const name of methodConfig.name) { - switch (matchLevel) { - case 'EMPTY': - if (!name.service && !name.method) { - return true; - } - break; - case 'SERVICE': - if (name.service === service && !name.method) { - return true; - } - break; - case 'SERVICE_AND_METHOD': - if (name.service === service && name.method === method) { - return true; - } - } - } - return false; -} - -function findMatchingConfig( - service: string, - method: string, - methodConfigs: MethodConfig[], - matchLevel: NameMatchLevel -): MethodConfig | null { - for (const config of methodConfigs) { - if (hasMatchingName(service, method, config, matchLevel)) { - return config; - } - } - return null; -} - -function getDefaultConfigSelector( - serviceConfig: ServiceConfig | null -): ConfigSelector { - return { - invoke( - methodName: string, - metadata: Metadata - ) { - const splitName = methodName.split('/').filter(x => x.length > 0); - const service = splitName[0] ?? ''; - const method = splitName[1] ?? ''; - if (serviceConfig && serviceConfig.methodConfig) { - /* Check for the following in order, and return the first method - * config that matches: - * 1. A name that exactly matches the service and method - * 2. A name with no method set that matches the service - * 3. An empty name - */ - for (const matchLevel of NAME_MATCH_LEVEL_ORDER) { - const matchingConfig = findMatchingConfig( - service, - method, - serviceConfig.methodConfig, - matchLevel - ); - if (matchingConfig) { - return { - methodConfig: matchingConfig, - pickInformation: {}, - status: Status.OK, - dynamicFilterFactories: [], - }; - } - } - } - return { - methodConfig: { name: [] }, - pickInformation: {}, - status: Status.OK, - dynamicFilterFactories: [], - }; - }, - unref() {} - }; -} - -export interface ResolutionCallback { - (serviceConfig: ServiceConfig, configSelector: ConfigSelector): void; -} - -export interface ResolutionFailureCallback { - (status: StatusObject): void; -} - -export class ResolvingLoadBalancer implements LoadBalancer { - /** - * The resolver class constructed for the target address. - */ - private readonly innerResolver: Resolver; - - private readonly childLoadBalancer: ChildLoadBalancerHandler; - private latestChildState: ConnectivityState = ConnectivityState.IDLE; - private latestChildPicker: Picker = new QueuePicker(this); - private latestChildErrorMessage: string | null = null; - /** - * This resolving load balancer's current connectivity state. - */ - private currentState: ConnectivityState = ConnectivityState.IDLE; - private readonly defaultServiceConfig: ServiceConfig; - /** - * The service config object from the last successful resolution, if - * available. A value of null indicates that we have not yet received a valid - * service config from the resolver. - */ - private previousServiceConfig: ServiceConfig | null = null; - - /** - * The backoff timer for handling name resolution failures. - */ - private readonly backoffTimeout: BackoffTimeout; - - /** - * Indicates whether we should attempt to resolve again after the backoff - * timer runs out. - */ - private continueResolving = false; - - /** - * Wrapper class that behaves like a `LoadBalancer` and also handles name - * resolution internally. - * @param target The address of the backend to connect to. - * @param channelControlHelper `ChannelControlHelper` instance provided by - * this load balancer's owner. - * @param defaultServiceConfig The default service configuration to be used - * if none is provided by the name resolver. A `null` value indicates - * that the default behavior should be the default unconfigured behavior. - * In practice, that means using the "pick first" load balancer - * implmentation - */ - constructor( - private readonly target: GrpcUri, - private readonly channelControlHelper: ChannelControlHelper, - private readonly channelOptions: ChannelOptions, - private readonly onSuccessfulResolution: ResolutionCallback, - private readonly onFailedResolution: ResolutionFailureCallback - ) { - if (channelOptions['grpc.service_config']) { - this.defaultServiceConfig = validateServiceConfig( - JSON.parse(channelOptions['grpc.service_config']!) - ); - } else { - this.defaultServiceConfig = { - loadBalancingConfig: [], - methodConfig: [], - }; - } - - this.updateState(ConnectivityState.IDLE, new QueuePicker(this), null); - this.childLoadBalancer = new ChildLoadBalancerHandler( - { - createSubchannel: - channelControlHelper.createSubchannel.bind(channelControlHelper), - requestReresolution: () => { - /* If the backoffTimeout is running, we're still backing off from - * making resolve requests, so we shouldn't make another one here. - * In that case, the backoff timer callback will call - * updateResolution */ - if (this.backoffTimeout.isRunning()) { - trace( - 'requestReresolution delayed by backoff timer until ' + - this.backoffTimeout.getEndTime().toISOString() - ); - this.continueResolving = true; - } else { - this.updateResolution(); - } - }, - updateState: (newState: ConnectivityState, picker: Picker, errorMessage: string | null) => { - this.latestChildState = newState; - this.latestChildPicker = picker; - this.latestChildErrorMessage = errorMessage; - this.updateState(newState, picker, errorMessage); - }, - addChannelzChild: - channelControlHelper.addChannelzChild.bind(channelControlHelper), - removeChannelzChild: - channelControlHelper.removeChannelzChild.bind(channelControlHelper), - } - ); - this.innerResolver = createResolver( - target, - this.handleResolverResult.bind(this), - channelOptions - ); - const backoffOptions: BackoffOptions = { - initialDelay: channelOptions['grpc.initial_reconnect_backoff_ms'], - maxDelay: channelOptions['grpc.max_reconnect_backoff_ms'], - }; - this.backoffTimeout = new BackoffTimeout(() => { - if (this.continueResolving) { - this.updateResolution(); - this.continueResolving = false; - } else { - this.updateState(this.latestChildState, this.latestChildPicker, this.latestChildErrorMessage); - } - }, backoffOptions); - this.backoffTimeout.unref(); - } - - private handleResolverResult( - endpointList: StatusOr, - attributes: { [key: string]: unknown }, - serviceConfig: StatusOr | null, - resolutionNote: string - ): boolean { - this.backoffTimeout.stop(); - this.backoffTimeout.reset(); - let resultAccepted = true; - let workingServiceConfig: ServiceConfig | null = null; - if (serviceConfig === null) { - workingServiceConfig = this.defaultServiceConfig; - } else if (serviceConfig.ok) { - workingServiceConfig = serviceConfig.value; - } else { - if (this.previousServiceConfig !== null) { - workingServiceConfig = this.previousServiceConfig; - } else { - resultAccepted = false; - this.handleResolutionFailure(serviceConfig.error); - } - } - - if (workingServiceConfig !== null) { - const workingConfigList = - workingServiceConfig?.loadBalancingConfig ?? []; - const loadBalancingConfig = selectLbConfigFromList( - workingConfigList, - true - ); - if (loadBalancingConfig === null) { - resultAccepted = false; - this.handleResolutionFailure({ - code: Status.UNAVAILABLE, - details: - 'All load balancer options in service config are not compatible', - metadata: new Metadata(), - }); - } else { - resultAccepted = this.childLoadBalancer.updateAddressList( - endpointList, - loadBalancingConfig, - {...this.channelOptions, ...attributes}, - resolutionNote - ); - } - } - if (resultAccepted) { - this.onSuccessfulResolution( - workingServiceConfig!, - attributes[CHANNEL_ARGS_CONFIG_SELECTOR_KEY] as ConfigSelector ?? getDefaultConfigSelector(workingServiceConfig!) - ); - } - return resultAccepted; - } - - private updateResolution() { - this.innerResolver.updateResolution(); - if (this.currentState === ConnectivityState.IDLE) { - /* this.latestChildPicker is initialized as new QueuePicker(this), which - * is an appropriate value here if the child LB policy is unset. - * Otherwise, we want to delegate to the child here, in case that - * triggers something. */ - this.updateState(ConnectivityState.CONNECTING, this.latestChildPicker, this.latestChildErrorMessage); - } - this.backoffTimeout.runOnce(); - } - - private updateState(connectivityState: ConnectivityState, picker: Picker, errorMessage: string | null) { - trace( - uriToString(this.target) + - ' ' + - ConnectivityState[this.currentState] + - ' -> ' + - ConnectivityState[connectivityState] - ); - // Ensure that this.exitIdle() is called by the picker - if (connectivityState === ConnectivityState.IDLE) { - picker = new QueuePicker(this, picker); - } - this.currentState = connectivityState; - this.channelControlHelper.updateState(connectivityState, picker, errorMessage); - } - - private handleResolutionFailure(error: StatusObject) { - if (this.latestChildState === ConnectivityState.IDLE) { - this.updateState( - ConnectivityState.TRANSIENT_FAILURE, - new UnavailablePicker(error), - error.details - ); - this.onFailedResolution(error); - } - } - - exitIdle() { - if ( - this.currentState === ConnectivityState.IDLE || - this.currentState === ConnectivityState.TRANSIENT_FAILURE - ) { - if (this.backoffTimeout.isRunning()) { - this.continueResolving = true; - } else { - this.updateResolution(); - } - } - this.childLoadBalancer.exitIdle(); - } - - updateAddressList( - endpointList: StatusOr, - lbConfig: TypedLoadBalancingConfig | null - ): never { - throw new Error('updateAddressList not supported on ResolvingLoadBalancer'); - } - - resetBackoff() { - this.backoffTimeout.reset(); - this.childLoadBalancer.resetBackoff(); - } - - destroy() { - this.childLoadBalancer.destroy(); - this.innerResolver.destroy(); - this.backoffTimeout.reset(); - this.backoffTimeout.stop(); - this.latestChildState = ConnectivityState.IDLE; - this.latestChildPicker = new QueuePicker(this); - this.currentState = ConnectivityState.IDLE; - this.previousServiceConfig = null; - this.continueResolving = false; - } - - getTypeName() { - return 'resolving_load_balancer'; - } -} diff --git a/node_modules/@grpc/grpc-js/src/retrying-call.ts b/node_modules/@grpc/grpc-js/src/retrying-call.ts deleted file mode 100644 index 61ff58f..0000000 --- a/node_modules/@grpc/grpc-js/src/retrying-call.ts +++ /dev/null @@ -1,924 +0,0 @@ -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { CallCredentials } from './call-credentials'; -import { LogVerbosity, Status } from './constants'; -import { Deadline, formatDateDifference } from './deadline'; -import { Metadata } from './metadata'; -import { CallConfig } from './resolver'; -import * as logging from './logging'; -import { - Call, - DeadlineInfoProvider, - InterceptingListener, - MessageContext, - StatusObject, - WriteCallback, - WriteObject, -} from './call-interface'; -import { - LoadBalancingCall, - StatusObjectWithProgress, -} from './load-balancing-call'; -import { InternalChannel } from './internal-channel'; -import { AuthContext } from './auth-context'; - -const TRACER_NAME = 'retrying_call'; - -export class RetryThrottler { - private tokens: number; - constructor( - private readonly maxTokens: number, - private readonly tokenRatio: number, - previousRetryThrottler?: RetryThrottler - ) { - if (previousRetryThrottler) { - /* When carrying over tokens from a previous config, rescale them to the - * new max value */ - this.tokens = - previousRetryThrottler.tokens * - (maxTokens / previousRetryThrottler.maxTokens); - } else { - this.tokens = maxTokens; - } - } - - addCallSucceeded() { - this.tokens = Math.min(this.tokens + this.tokenRatio, this.maxTokens); - } - - addCallFailed() { - this.tokens = Math.max(this.tokens - 1, 0); - } - - canRetryCall() { - return this.tokens > (this.maxTokens / 2); - } -} - -export class MessageBufferTracker { - private totalAllocated = 0; - private allocatedPerCall: Map = new Map(); - - constructor(private totalLimit: number, private limitPerCall: number) {} - - allocate(size: number, callId: number): boolean { - const currentPerCall = this.allocatedPerCall.get(callId) ?? 0; - if ( - this.limitPerCall - currentPerCall < size || - this.totalLimit - this.totalAllocated < size - ) { - return false; - } - this.allocatedPerCall.set(callId, currentPerCall + size); - this.totalAllocated += size; - return true; - } - - free(size: number, callId: number) { - if (this.totalAllocated < size) { - throw new Error( - `Invalid buffer allocation state: call ${callId} freed ${size} > total allocated ${this.totalAllocated}` - ); - } - this.totalAllocated -= size; - const currentPerCall = this.allocatedPerCall.get(callId) ?? 0; - if (currentPerCall < size) { - throw new Error( - `Invalid buffer allocation state: call ${callId} freed ${size} > allocated for call ${currentPerCall}` - ); - } - this.allocatedPerCall.set(callId, currentPerCall - size); - } - - freeAll(callId: number) { - const currentPerCall = this.allocatedPerCall.get(callId) ?? 0; - if (this.totalAllocated < currentPerCall) { - throw new Error( - `Invalid buffer allocation state: call ${callId} allocated ${currentPerCall} > total allocated ${this.totalAllocated}` - ); - } - this.totalAllocated -= currentPerCall; - this.allocatedPerCall.delete(callId); - } -} - -type UnderlyingCallState = 'ACTIVE' | 'COMPLETED'; - -interface UnderlyingCall { - state: UnderlyingCallState; - call: LoadBalancingCall; - nextMessageToSend: number; - startTime: Date; -} - -/** - * A retrying call can be in one of these states: - * RETRY: Retries are configured and new attempts may be sent - * HEDGING: Hedging is configured and new attempts may be sent - * TRANSPARENT_ONLY: Neither retries nor hedging are configured, and - * transparent retry attempts may still be sent - * COMMITTED: One attempt is committed, and no new attempts will be - * sent - * NO_RETRY: Retries are disabled. Exists to track the transition to COMMITTED - */ -type RetryingCallState = - | 'RETRY' - | 'HEDGING' - | 'TRANSPARENT_ONLY' - | 'COMMITTED' - | 'NO_RETRY'; - -/** - * The different types of objects that can be stored in the write buffer, with - * the following meanings: - * MESSAGE: This is a message to be sent. - * HALF_CLOSE: When this entry is reached, the calls should send a half-close. - * FREED: This slot previously contained a message that has been sent on all - * child calls and is no longer needed. - */ -type WriteBufferEntryType = 'MESSAGE' | 'HALF_CLOSE' | 'FREED'; - -/** - * Entry in the buffer of messages to send to the remote end. - */ -interface WriteBufferEntry { - entryType: WriteBufferEntryType; - /** - * Message to send. - * Only populated if entryType is MESSAGE. - */ - message?: WriteObject; - /** - * Callback to call after sending the message. - * Only populated if entryType is MESSAGE and the call is in the COMMITTED - * state. - */ - callback?: WriteCallback; - /** - * Indicates whether the message is allocated in the buffer tracker. Ignored - * if entryType is not MESSAGE. Should be the return value of - * bufferTracker.allocate. - */ - allocated: boolean; -} - -const PREVIONS_RPC_ATTEMPTS_METADATA_KEY = 'grpc-previous-rpc-attempts'; - -const DEFAULT_MAX_ATTEMPTS_LIMIT = 5; - -export class RetryingCall implements Call, DeadlineInfoProvider { - private state: RetryingCallState; - private listener: InterceptingListener | null = null; - private initialMetadata: Metadata | null = null; - private underlyingCalls: UnderlyingCall[] = []; - private writeBuffer: WriteBufferEntry[] = []; - /** - * The offset of message indices in the writeBuffer. For example, if - * writeBufferOffset is 10, message 10 is in writeBuffer[0] and message 15 - * is in writeBuffer[5]. - */ - private writeBufferOffset = 0; - /** - * Tracks whether a read has been started, so that we know whether to start - * reads on new child calls. This only matters for the first read, because - * once a message comes in the child call becomes committed and there will - * be no new child calls. - */ - private readStarted = false; - private transparentRetryUsed = false; - /** - * Number of attempts so far - */ - private attempts = 0; - private hedgingTimer: NodeJS.Timeout | null = null; - private committedCallIndex: number | null = null; - private initialRetryBackoffSec = 0; - private nextRetryBackoffSec = 0; - private startTime: Date; - private maxAttempts: number; - constructor( - private readonly channel: InternalChannel, - private readonly callConfig: CallConfig, - private readonly methodName: string, - private readonly host: string, - private readonly credentials: CallCredentials, - private readonly deadline: Deadline, - private readonly callNumber: number, - private readonly bufferTracker: MessageBufferTracker, - private readonly retryThrottler?: RetryThrottler - ) { - const maxAttemptsLimit = - channel.getOptions()['grpc-node.retry_max_attempts_limit'] ?? - DEFAULT_MAX_ATTEMPTS_LIMIT; - if (channel.getOptions()['grpc.enable_retries'] === 0) { - this.state = 'NO_RETRY'; - this.maxAttempts = 1; - } else if (callConfig.methodConfig.retryPolicy) { - this.state = 'RETRY'; - const retryPolicy = callConfig.methodConfig.retryPolicy; - this.nextRetryBackoffSec = this.initialRetryBackoffSec = Number( - retryPolicy.initialBackoff.substring( - 0, - retryPolicy.initialBackoff.length - 1 - ) - ); - this.maxAttempts = Math.min(retryPolicy.maxAttempts, maxAttemptsLimit); - } else if (callConfig.methodConfig.hedgingPolicy) { - this.state = 'HEDGING'; - this.maxAttempts = Math.min( - callConfig.methodConfig.hedgingPolicy.maxAttempts, - maxAttemptsLimit - ); - } else { - this.state = 'TRANSPARENT_ONLY'; - this.maxAttempts = 1; - } - this.startTime = new Date(); - } - getDeadlineInfo(): string[] { - if (this.underlyingCalls.length === 0) { - return []; - } - const deadlineInfo: string[] = []; - const latestCall = this.underlyingCalls[this.underlyingCalls.length - 1]; - if (this.underlyingCalls.length > 1) { - deadlineInfo.push( - `previous attempts: ${this.underlyingCalls.length - 1}` - ); - } - if (latestCall.startTime > this.startTime) { - deadlineInfo.push( - `time to current attempt start: ${formatDateDifference( - this.startTime, - latestCall.startTime - )}` - ); - } - deadlineInfo.push(...latestCall.call.getDeadlineInfo()); - return deadlineInfo; - } - getCallNumber(): number { - return this.callNumber; - } - - private trace(text: string): void { - logging.trace( - LogVerbosity.DEBUG, - TRACER_NAME, - '[' + this.callNumber + '] ' + text - ); - } - - private reportStatus(statusObject: StatusObject) { - this.trace( - 'ended with status: code=' + - statusObject.code + - ' details="' + - statusObject.details + - '" start time=' + - this.startTime.toISOString() - ); - this.bufferTracker.freeAll(this.callNumber); - this.writeBufferOffset = this.writeBufferOffset + this.writeBuffer.length; - this.writeBuffer = []; - process.nextTick(() => { - // Explicitly construct status object to remove progress field - this.listener?.onReceiveStatus({ - code: statusObject.code, - details: statusObject.details, - metadata: statusObject.metadata, - }); - }); - } - - cancelWithStatus(status: Status, details: string): void { - this.trace( - 'cancelWithStatus code: ' + status + ' details: "' + details + '"' - ); - this.reportStatus({ code: status, details, metadata: new Metadata() }); - for (const { call } of this.underlyingCalls) { - call.cancelWithStatus(status, details); - } - } - getPeer(): string { - if (this.committedCallIndex !== null) { - return this.underlyingCalls[this.committedCallIndex].call.getPeer(); - } else { - return 'unknown'; - } - } - - private getBufferEntry(messageIndex: number): WriteBufferEntry { - return ( - this.writeBuffer[messageIndex - this.writeBufferOffset] ?? { - entryType: 'FREED', - allocated: false, - } - ); - } - - private getNextBufferIndex() { - return this.writeBufferOffset + this.writeBuffer.length; - } - - private clearSentMessages() { - if (this.state !== 'COMMITTED') { - return; - } - let earliestNeededMessageIndex: number; - if (this.underlyingCalls[this.committedCallIndex!].state === 'COMPLETED') { - /* If the committed call is completed, clear all messages, even if some - * have not been sent. */ - earliestNeededMessageIndex = this.getNextBufferIndex(); - } else { - earliestNeededMessageIndex = - this.underlyingCalls[this.committedCallIndex!].nextMessageToSend; - } - for ( - let messageIndex = this.writeBufferOffset; - messageIndex < earliestNeededMessageIndex; - messageIndex++ - ) { - const bufferEntry = this.getBufferEntry(messageIndex); - if (bufferEntry.allocated) { - this.bufferTracker.free( - bufferEntry.message!.message.length, - this.callNumber - ); - } - } - this.writeBuffer = this.writeBuffer.slice( - earliestNeededMessageIndex - this.writeBufferOffset - ); - this.writeBufferOffset = earliestNeededMessageIndex; - } - - private commitCall(index: number) { - if (this.state === 'COMMITTED') { - return; - } - this.trace( - 'Committing call [' + - this.underlyingCalls[index].call.getCallNumber() + - '] at index ' + - index - ); - this.state = 'COMMITTED'; - this.callConfig.onCommitted?.(); - this.committedCallIndex = index; - for (let i = 0; i < this.underlyingCalls.length; i++) { - if (i === index) { - continue; - } - if (this.underlyingCalls[i].state === 'COMPLETED') { - continue; - } - this.underlyingCalls[i].state = 'COMPLETED'; - this.underlyingCalls[i].call.cancelWithStatus( - Status.CANCELLED, - 'Discarded in favor of other hedged attempt' - ); - } - this.clearSentMessages(); - } - - private commitCallWithMostMessages() { - if (this.state === 'COMMITTED') { - return; - } - let mostMessages = -1; - let callWithMostMessages = -1; - for (const [index, childCall] of this.underlyingCalls.entries()) { - if ( - childCall.state === 'ACTIVE' && - childCall.nextMessageToSend > mostMessages - ) { - mostMessages = childCall.nextMessageToSend; - callWithMostMessages = index; - } - } - if (callWithMostMessages === -1) { - /* There are no active calls, disable retries to force the next call that - * is started to be committed. */ - this.state = 'TRANSPARENT_ONLY'; - } else { - this.commitCall(callWithMostMessages); - } - } - - private isStatusCodeInList(list: (Status | string)[], code: Status) { - return list.some( - value => - value === code || - value.toString().toLowerCase() === Status[code]?.toLowerCase() - ); - } - - private getNextRetryJitter() { - /* Jitter of +-20% is applied: https://github.com/grpc/proposal/blob/master/A6-client-retries.md#exponential-backoff */ - return Math.random() * (1.2 - 0.8) + 0.8; - } - - private getNextRetryBackoffMs() { - const retryPolicy = this.callConfig?.methodConfig.retryPolicy; - if (!retryPolicy) { - return 0; - } - const jitter = this.getNextRetryJitter(); - const nextBackoffMs = jitter * this.nextRetryBackoffSec * 1000; - const maxBackoffSec = Number( - retryPolicy.maxBackoff.substring(0, retryPolicy.maxBackoff.length - 1) - ); - this.nextRetryBackoffSec = Math.min( - this.nextRetryBackoffSec * retryPolicy.backoffMultiplier, - maxBackoffSec - ); - return nextBackoffMs; - } - - private maybeRetryCall( - pushback: number | null, - callback: (retried: boolean) => void - ) { - if (this.state !== 'RETRY') { - callback(false); - return; - } - if (this.attempts >= this.maxAttempts) { - callback(false); - return; - } - let retryDelayMs: number; - if (pushback === null) { - retryDelayMs = this.getNextRetryBackoffMs(); - } else if (pushback < 0) { - this.state = 'TRANSPARENT_ONLY'; - callback(false); - return; - } else { - retryDelayMs = pushback; - this.nextRetryBackoffSec = this.initialRetryBackoffSec; - } - setTimeout(() => { - if (this.state !== 'RETRY') { - callback(false); - return; - } - if (this.retryThrottler?.canRetryCall() ?? true) { - callback(true); - this.attempts += 1; - this.startNewAttempt(); - } else { - this.trace('Retry attempt denied by throttling policy'); - callback(false); - } - }, retryDelayMs); - } - - private countActiveCalls(): number { - let count = 0; - for (const call of this.underlyingCalls) { - if (call?.state === 'ACTIVE') { - count += 1; - } - } - return count; - } - - private handleProcessedStatus( - status: StatusObject, - callIndex: number, - pushback: number | null - ) { - switch (this.state) { - case 'COMMITTED': - case 'NO_RETRY': - case 'TRANSPARENT_ONLY': - this.commitCall(callIndex); - this.reportStatus(status); - break; - case 'HEDGING': - if ( - this.isStatusCodeInList( - this.callConfig!.methodConfig.hedgingPolicy!.nonFatalStatusCodes ?? - [], - status.code - ) - ) { - this.retryThrottler?.addCallFailed(); - let delayMs: number; - if (pushback === null) { - delayMs = 0; - } else if (pushback < 0) { - this.state = 'TRANSPARENT_ONLY'; - this.commitCall(callIndex); - this.reportStatus(status); - return; - } else { - delayMs = pushback; - } - setTimeout(() => { - this.maybeStartHedgingAttempt(); - // If after trying to start a call there are no active calls, this was the last one - if (this.countActiveCalls() === 0) { - this.commitCall(callIndex); - this.reportStatus(status); - } - }, delayMs); - } else { - this.commitCall(callIndex); - this.reportStatus(status); - } - break; - case 'RETRY': - if ( - this.isStatusCodeInList( - this.callConfig!.methodConfig.retryPolicy!.retryableStatusCodes, - status.code - ) - ) { - this.retryThrottler?.addCallFailed(); - this.maybeRetryCall(pushback, retried => { - if (!retried) { - this.commitCall(callIndex); - this.reportStatus(status); - } - }); - } else { - this.commitCall(callIndex); - this.reportStatus(status); - } - break; - } - } - - private getPushback(metadata: Metadata): number | null { - const mdValue = metadata.get('grpc-retry-pushback-ms'); - if (mdValue.length === 0) { - return null; - } - try { - return parseInt(mdValue[0] as string); - } catch (e) { - return -1; - } - } - - private handleChildStatus( - status: StatusObjectWithProgress, - callIndex: number - ) { - if (this.underlyingCalls[callIndex].state === 'COMPLETED') { - return; - } - this.trace( - 'state=' + - this.state + - ' handling status with progress ' + - status.progress + - ' from child [' + - this.underlyingCalls[callIndex].call.getCallNumber() + - '] in state ' + - this.underlyingCalls[callIndex].state - ); - this.underlyingCalls[callIndex].state = 'COMPLETED'; - if (status.code === Status.OK) { - this.retryThrottler?.addCallSucceeded(); - this.commitCall(callIndex); - this.reportStatus(status); - return; - } - if (this.state === 'NO_RETRY') { - this.commitCall(callIndex); - this.reportStatus(status); - return; - } - if (this.state === 'COMMITTED') { - this.reportStatus(status); - return; - } - const pushback = this.getPushback(status.metadata); - switch (status.progress) { - case 'NOT_STARTED': - // RPC never leaves the client, always safe to retry - this.startNewAttempt(); - break; - case 'REFUSED': - // RPC reaches the server library, but not the server application logic - if (this.transparentRetryUsed) { - this.handleProcessedStatus(status, callIndex, pushback); - } else { - this.transparentRetryUsed = true; - this.startNewAttempt(); - } - break; - case 'DROP': - this.commitCall(callIndex); - this.reportStatus(status); - break; - case 'PROCESSED': - this.handleProcessedStatus(status, callIndex, pushback); - break; - } - } - - private maybeStartHedgingAttempt() { - if (this.state !== 'HEDGING') { - return; - } - if (!this.callConfig.methodConfig.hedgingPolicy) { - return; - } - if (this.attempts >= this.maxAttempts) { - return; - } - this.attempts += 1; - this.startNewAttempt(); - this.maybeStartHedgingTimer(); - } - - private maybeStartHedgingTimer() { - if (this.hedgingTimer) { - clearTimeout(this.hedgingTimer); - } - if (this.state !== 'HEDGING') { - return; - } - if (!this.callConfig.methodConfig.hedgingPolicy) { - return; - } - const hedgingPolicy = this.callConfig.methodConfig.hedgingPolicy; - if (this.attempts >= this.maxAttempts) { - return; - } - const hedgingDelayString = hedgingPolicy.hedgingDelay ?? '0s'; - const hedgingDelaySec = Number( - hedgingDelayString.substring(0, hedgingDelayString.length - 1) - ); - this.hedgingTimer = setTimeout(() => { - this.maybeStartHedgingAttempt(); - }, hedgingDelaySec * 1000); - this.hedgingTimer.unref?.(); - } - - private startNewAttempt() { - const child = this.channel.createLoadBalancingCall( - this.callConfig, - this.methodName, - this.host, - this.credentials, - this.deadline - ); - this.trace( - 'Created child call [' + - child.getCallNumber() + - '] for attempt ' + - this.attempts - ); - const index = this.underlyingCalls.length; - this.underlyingCalls.push({ - state: 'ACTIVE', - call: child, - nextMessageToSend: 0, - startTime: new Date(), - }); - const previousAttempts = this.attempts - 1; - const initialMetadata = this.initialMetadata!.clone(); - if (previousAttempts > 0) { - initialMetadata.set( - PREVIONS_RPC_ATTEMPTS_METADATA_KEY, - `${previousAttempts}` - ); - } - let receivedMetadata = false; - child.start(initialMetadata, { - onReceiveMetadata: metadata => { - this.trace( - 'Received metadata from child [' + child.getCallNumber() + ']' - ); - this.commitCall(index); - receivedMetadata = true; - if (previousAttempts > 0) { - metadata.set( - PREVIONS_RPC_ATTEMPTS_METADATA_KEY, - `${previousAttempts}` - ); - } - if (this.underlyingCalls[index].state === 'ACTIVE') { - this.listener!.onReceiveMetadata(metadata); - } - }, - onReceiveMessage: message => { - this.trace( - 'Received message from child [' + child.getCallNumber() + ']' - ); - this.commitCall(index); - if (this.underlyingCalls[index].state === 'ACTIVE') { - this.listener!.onReceiveMessage(message); - } - }, - onReceiveStatus: status => { - this.trace( - 'Received status from child [' + child.getCallNumber() + ']' - ); - if (!receivedMetadata && previousAttempts > 0) { - status.metadata.set( - PREVIONS_RPC_ATTEMPTS_METADATA_KEY, - `${previousAttempts}` - ); - } - this.handleChildStatus(status, index); - }, - }); - this.sendNextChildMessage(index); - if (this.readStarted) { - child.startRead(); - } - } - - start(metadata: Metadata, listener: InterceptingListener): void { - this.trace('start called'); - this.listener = listener; - this.initialMetadata = metadata; - this.attempts += 1; - this.startNewAttempt(); - this.maybeStartHedgingTimer(); - } - - private handleChildWriteCompleted(childIndex: number, messageIndex: number) { - this.getBufferEntry(messageIndex).callback?.(); - this.clearSentMessages(); - const childCall = this.underlyingCalls[childIndex]; - childCall.nextMessageToSend += 1; - this.sendNextChildMessage(childIndex); - } - - private sendNextChildMessage(childIndex: number) { - const childCall = this.underlyingCalls[childIndex]; - if (childCall.state === 'COMPLETED') { - return; - } - const messageIndex = childCall.nextMessageToSend; - if (this.getBufferEntry(messageIndex)) { - const bufferEntry = this.getBufferEntry(messageIndex); - switch (bufferEntry.entryType) { - case 'MESSAGE': - childCall.call.sendMessageWithContext( - { - callback: error => { - // Ignore error - this.handleChildWriteCompleted(childIndex, messageIndex); - }, - }, - bufferEntry.message!.message - ); - // Optimization: if the next entry is HALF_CLOSE, send it immediately - // without waiting for the message callback. This is safe because the message - // has already been passed to the underlying transport. - const nextEntry = this.getBufferEntry(messageIndex + 1); - if (nextEntry.entryType === 'HALF_CLOSE') { - this.trace( - 'Sending halfClose immediately after message to child [' + - childCall.call.getCallNumber() + - '] - optimizing for unary/final message' - ); - childCall.nextMessageToSend += 1; - childCall.call.halfClose(); - } - break; - case 'HALF_CLOSE': - childCall.nextMessageToSend += 1; - childCall.call.halfClose(); - break; - case 'FREED': - // Should not be possible - break; - } - } - } - - sendMessageWithContext(context: MessageContext, message: Buffer): void { - this.trace('write() called with message of length ' + message.length); - const writeObj: WriteObject = { - message, - flags: context.flags, - }; - const messageIndex = this.getNextBufferIndex(); - const bufferEntry: WriteBufferEntry = { - entryType: 'MESSAGE', - message: writeObj, - allocated: this.bufferTracker.allocate(message.length, this.callNumber), - }; - this.writeBuffer.push(bufferEntry); - if (bufferEntry.allocated) { - // Run this in next tick to avoid suspending the current execution context - // otherwise it might cause half closing the call before sending message - process.nextTick(() => { - context.callback?.(); - }); - for (const [callIndex, call] of this.underlyingCalls.entries()) { - if ( - call.state === 'ACTIVE' && - call.nextMessageToSend === messageIndex - ) { - call.call.sendMessageWithContext( - { - callback: error => { - // Ignore error - this.handleChildWriteCompleted(callIndex, messageIndex); - }, - }, - message - ); - } - } - } else { - this.commitCallWithMostMessages(); - // commitCallWithMostMessages can fail if we are between ping attempts - if (this.committedCallIndex === null) { - return; - } - const call = this.underlyingCalls[this.committedCallIndex]; - bufferEntry.callback = context.callback; - if (call.state === 'ACTIVE' && call.nextMessageToSend === messageIndex) { - call.call.sendMessageWithContext( - { - callback: error => { - // Ignore error - this.handleChildWriteCompleted(this.committedCallIndex!, messageIndex); - }, - }, - message - ); - } - } - } - startRead(): void { - this.trace('startRead called'); - this.readStarted = true; - for (const underlyingCall of this.underlyingCalls) { - if (underlyingCall?.state === 'ACTIVE') { - underlyingCall.call.startRead(); - } - } - } - halfClose(): void { - this.trace('halfClose called'); - const halfCloseIndex = this.getNextBufferIndex(); - this.writeBuffer.push({ - entryType: 'HALF_CLOSE', - allocated: false, - }); - for (const call of this.underlyingCalls) { - if (call?.state === 'ACTIVE') { - // Send halfClose to call when either: - // - nextMessageToSend === halfCloseIndex - 1: last message sent, callback pending (optimization) - // - nextMessageToSend === halfCloseIndex: all messages sent and acknowledged - if (call.nextMessageToSend === halfCloseIndex - || call.nextMessageToSend === halfCloseIndex - 1) { - this.trace( - 'Sending halfClose immediately to child [' + - call.call.getCallNumber() + - '] - all messages already sent' - ); - call.nextMessageToSend += 1; - call.call.halfClose(); - } - // Otherwise, halfClose will be sent by sendNextChildMessage when message callbacks complete - } - } - } - setCredentials(newCredentials: CallCredentials): void { - throw new Error('Method not implemented.'); - } - getMethod(): string { - return this.methodName; - } - getHost(): string { - return this.host; - } - getAuthContext(): AuthContext | null { - if (this.committedCallIndex !== null) { - return this.underlyingCalls[ - this.committedCallIndex - ].call.getAuthContext(); - } else { - return null; - } - } -} \ No newline at end of file diff --git a/node_modules/@grpc/grpc-js/src/server-call.ts b/node_modules/@grpc/grpc-js/src/server-call.ts deleted file mode 100644 index 670cf62..0000000 --- a/node_modules/@grpc/grpc-js/src/server-call.ts +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { EventEmitter } from 'events'; -import { Duplex, Readable, Writable } from 'stream'; - -import { Status } from './constants'; -import type { Deserialize, Serialize } from './make-client'; -import { Metadata } from './metadata'; -import type { ObjectReadable, ObjectWritable } from './object-stream'; -import type { StatusObject, PartialStatusObject } from './call-interface'; -import type { Deadline } from './deadline'; -import type { ServerInterceptingCallInterface } from './server-interceptors'; -import { AuthContext } from './auth-context'; -import { PerRequestMetricRecorder } from './orca'; - -export type ServerStatusResponse = Partial; - -export type ServerErrorResponse = ServerStatusResponse & Error; - -export type ServerSurfaceCall = { - cancelled: boolean; - readonly metadata: Metadata; - getPeer(): string; - sendMetadata(responseMetadata: Metadata): void; - getDeadline(): Deadline; - getPath(): string; - getHost(): string; - getAuthContext(): AuthContext; - getMetricsRecorder(): PerRequestMetricRecorder; -} & EventEmitter; - -export type ServerUnaryCall = ServerSurfaceCall & { - request: RequestType; -}; -export type ServerReadableStream = - ServerSurfaceCall & ObjectReadable; -export type ServerWritableStream = - ServerSurfaceCall & - ObjectWritable & { - request: RequestType; - end: (metadata?: Metadata) => void; - }; -export type ServerDuplexStream = ServerSurfaceCall & - ObjectReadable & - ObjectWritable & { end: (metadata?: Metadata) => void }; - -export function serverErrorToStatus( - error: ServerErrorResponse | ServerStatusResponse, - overrideTrailers?: Metadata | undefined -): PartialStatusObject { - const status: PartialStatusObject = { - code: Status.UNKNOWN, - details: 'message' in error ? error.message : 'Unknown Error', - metadata: overrideTrailers ?? error.metadata ?? null, - }; - - if ( - 'code' in error && - typeof error.code === 'number' && - Number.isInteger(error.code) - ) { - status.code = error.code; - - if ('details' in error && typeof error.details === 'string') { - status.details = error.details!; - } - } - return status; -} - -export class ServerUnaryCallImpl - extends EventEmitter - implements ServerUnaryCall -{ - cancelled: boolean; - - constructor( - private path: string, - private call: ServerInterceptingCallInterface, - public metadata: Metadata, - public request: RequestType - ) { - super(); - this.cancelled = false; - } - - getPeer(): string { - return this.call.getPeer(); - } - - sendMetadata(responseMetadata: Metadata): void { - this.call.sendMetadata(responseMetadata); - } - - getDeadline(): Deadline { - return this.call.getDeadline(); - } - - getPath(): string { - return this.path; - } - - getHost(): string { - return this.call.getHost(); - } - - getAuthContext(): AuthContext { - return this.call.getAuthContext(); - } - - getMetricsRecorder(): PerRequestMetricRecorder { - return this.call.getMetricsRecorder(); - } -} - -export class ServerReadableStreamImpl - extends Readable - implements ServerReadableStream -{ - cancelled: boolean; - - constructor( - private path: string, - private call: ServerInterceptingCallInterface, - public metadata: Metadata - ) { - super({ objectMode: true }); - this.cancelled = false; - } - - _read(size: number) { - this.call.startRead(); - } - - getPeer(): string { - return this.call.getPeer(); - } - - sendMetadata(responseMetadata: Metadata): void { - this.call.sendMetadata(responseMetadata); - } - - getDeadline(): Deadline { - return this.call.getDeadline(); - } - - getPath(): string { - return this.path; - } - - getHost(): string { - return this.call.getHost(); - } - - getAuthContext(): AuthContext { - return this.call.getAuthContext(); - } - - getMetricsRecorder(): PerRequestMetricRecorder { - return this.call.getMetricsRecorder(); - } -} - -export class ServerWritableStreamImpl - extends Writable - implements ServerWritableStream -{ - cancelled: boolean; - private trailingMetadata: Metadata; - private pendingStatus: PartialStatusObject = { - code: Status.OK, - details: 'OK', - }; - - constructor( - private path: string, - private call: ServerInterceptingCallInterface, - public metadata: Metadata, - public request: RequestType - ) { - super({ objectMode: true }); - this.cancelled = false; - this.trailingMetadata = new Metadata(); - - this.on('error', err => { - this.pendingStatus = serverErrorToStatus(err); - this.end(); - }); - } - - getPeer(): string { - return this.call.getPeer(); - } - - sendMetadata(responseMetadata: Metadata): void { - this.call.sendMetadata(responseMetadata); - } - - getDeadline(): Deadline { - return this.call.getDeadline(); - } - - getPath(): string { - return this.path; - } - - getHost(): string { - return this.call.getHost(); - } - - getAuthContext(): AuthContext { - return this.call.getAuthContext(); - } - - getMetricsRecorder(): PerRequestMetricRecorder { - return this.call.getMetricsRecorder(); - } - - _write( - chunk: ResponseType, - encoding: string, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - callback: (...args: any[]) => void - ) { - this.call.sendMessage(chunk, callback); - } - - _final(callback: Function): void { - callback(null); - this.call.sendStatus({ - ...this.pendingStatus, - metadata: this.pendingStatus.metadata ?? this.trailingMetadata, - }); - } - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - end(metadata?: any) { - if (metadata) { - this.trailingMetadata = metadata; - } - - return super.end(); - } -} - -export class ServerDuplexStreamImpl - extends Duplex - implements ServerDuplexStream -{ - cancelled: boolean; - private trailingMetadata: Metadata; - private pendingStatus: PartialStatusObject = { - code: Status.OK, - details: 'OK', - }; - - constructor( - private path: string, - private call: ServerInterceptingCallInterface, - public metadata: Metadata - ) { - super({ objectMode: true }); - this.cancelled = false; - this.trailingMetadata = new Metadata(); - - this.on('error', err => { - this.pendingStatus = serverErrorToStatus(err); - this.end(); - }); - } - - getPeer(): string { - return this.call.getPeer(); - } - - sendMetadata(responseMetadata: Metadata): void { - this.call.sendMetadata(responseMetadata); - } - - getDeadline(): Deadline { - return this.call.getDeadline(); - } - - getPath(): string { - return this.path; - } - - getHost(): string { - return this.call.getHost(); - } - - getAuthContext(): AuthContext { - return this.call.getAuthContext(); - } - - getMetricsRecorder(): PerRequestMetricRecorder { - return this.call.getMetricsRecorder(); - } - - _read(size: number) { - this.call.startRead(); - } - - _write( - chunk: ResponseType, - encoding: string, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - callback: (...args: any[]) => void - ) { - this.call.sendMessage(chunk, callback); - } - - _final(callback: Function): void { - callback(null); - this.call.sendStatus({ - ...this.pendingStatus, - metadata: this.pendingStatus.metadata ?? this.trailingMetadata, - }); - } - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - end(metadata?: any) { - if (metadata) { - this.trailingMetadata = metadata; - } - - return super.end(); - } -} - -// Unary response callback signature. -export type sendUnaryData = ( - error: ServerErrorResponse | ServerStatusResponse | null, - value?: ResponseType | null, - trailer?: Metadata, - flags?: number -) => void; - -// User provided handler for unary calls. -export type handleUnaryCall = ( - call: ServerUnaryCall, - callback: sendUnaryData -) => void; - -// User provided handler for client streaming calls. -export type handleClientStreamingCall = ( - call: ServerReadableStream, - callback: sendUnaryData -) => void; - -// User provided handler for server streaming calls. -export type handleServerStreamingCall = ( - call: ServerWritableStream -) => void; - -// User provided handler for bidirectional streaming calls. -export type handleBidiStreamingCall = ( - call: ServerDuplexStream -) => void; - -export type HandleCall = - | handleUnaryCall - | handleClientStreamingCall - | handleServerStreamingCall - | handleBidiStreamingCall; - -export interface UnaryHandler { - func: handleUnaryCall; - serialize: Serialize; - deserialize: Deserialize; - type: 'unary'; - path: string; -} - -export interface ClientStreamingHandler { - func: handleClientStreamingCall; - serialize: Serialize; - deserialize: Deserialize; - type: 'clientStream'; - path: string; -} - -export interface ServerStreamingHandler { - func: handleServerStreamingCall; - serialize: Serialize; - deserialize: Deserialize; - type: 'serverStream'; - path: string; -} - -export interface BidiStreamingHandler { - func: handleBidiStreamingCall; - serialize: Serialize; - deserialize: Deserialize; - type: 'bidi'; - path: string; -} - -export type Handler = - | UnaryHandler - | ClientStreamingHandler - | ServerStreamingHandler - | BidiStreamingHandler; - -export type HandlerType = 'bidi' | 'clientStream' | 'serverStream' | 'unary'; diff --git a/node_modules/@grpc/grpc-js/src/server-credentials.ts b/node_modules/@grpc/grpc-js/src/server-credentials.ts deleted file mode 100644 index 5a61add..0000000 --- a/node_modules/@grpc/grpc-js/src/server-credentials.ts +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { SecureServerOptions } from 'http2'; -import { CIPHER_SUITES, getDefaultRootsData } from './tls-helpers'; -import { SecureContextOptions } from 'tls'; -import { ServerInterceptor } from '.'; -import { CaCertificateUpdate, CaCertificateUpdateListener, CertificateProvider, IdentityCertificateUpdate, IdentityCertificateUpdateListener } from './certificate-provider'; - -export interface KeyCertPair { - private_key: Buffer; - cert_chain: Buffer; -} - -export interface SecureContextWatcher { - (context: SecureContextOptions | null): void; -} - -export abstract class ServerCredentials { - private watchers: Set = new Set(); - private latestContextOptions: SecureContextOptions | null = null; - constructor(private serverConstructorOptions: SecureServerOptions | null, contextOptions?: SecureContextOptions) { - this.latestContextOptions = contextOptions ?? null; - } - - _addWatcher(watcher: SecureContextWatcher) { - this.watchers.add(watcher); - } - _removeWatcher(watcher: SecureContextWatcher) { - this.watchers.delete(watcher); - } - protected getWatcherCount() { - return this.watchers.size; - } - protected updateSecureContextOptions(options: SecureContextOptions | null) { - this.latestContextOptions = options; - for (const watcher of this.watchers) { - watcher(this.latestContextOptions); - } - } - _isSecure(): boolean { - return this.serverConstructorOptions !== null; - } - _getSecureContextOptions(): SecureContextOptions | null { - return this.latestContextOptions; - } - _getConstructorOptions(): SecureServerOptions | null { - return this.serverConstructorOptions; - } - _getInterceptors(): ServerInterceptor[] { - return []; - } - abstract _equals(other: ServerCredentials): boolean; - - static createInsecure(): ServerCredentials { - return new InsecureServerCredentials(); - } - - static createSsl( - rootCerts: Buffer | null, - keyCertPairs: KeyCertPair[], - checkClientCertificate = false - ): ServerCredentials { - if (rootCerts !== null && !Buffer.isBuffer(rootCerts)) { - throw new TypeError('rootCerts must be null or a Buffer'); - } - - if (!Array.isArray(keyCertPairs)) { - throw new TypeError('keyCertPairs must be an array'); - } - - if (typeof checkClientCertificate !== 'boolean') { - throw new TypeError('checkClientCertificate must be a boolean'); - } - - const cert: Buffer[] = []; - const key: Buffer[] = []; - - for (let i = 0; i < keyCertPairs.length; i++) { - const pair = keyCertPairs[i]; - - if (pair === null || typeof pair !== 'object') { - throw new TypeError(`keyCertPair[${i}] must be an object`); - } - - if (!Buffer.isBuffer(pair.private_key)) { - throw new TypeError(`keyCertPair[${i}].private_key must be a Buffer`); - } - - if (!Buffer.isBuffer(pair.cert_chain)) { - throw new TypeError(`keyCertPair[${i}].cert_chain must be a Buffer`); - } - - cert.push(pair.cert_chain); - key.push(pair.private_key); - } - - return new SecureServerCredentials({ - requestCert: checkClientCertificate, - ciphers: CIPHER_SUITES, - }, { - ca: rootCerts ?? getDefaultRootsData() ?? undefined, - cert, - key, - }); - } -} - -class InsecureServerCredentials extends ServerCredentials { - constructor() { - super(null); - } - - _getSettings(): null { - return null; - } - - _equals(other: ServerCredentials): boolean { - return other instanceof InsecureServerCredentials; - } -} - -class SecureServerCredentials extends ServerCredentials { - private options: SecureServerOptions; - - constructor(constructorOptions: SecureServerOptions, contextOptions: SecureContextOptions) { - super(constructorOptions, contextOptions); - this.options = {...constructorOptions, ...contextOptions}; - } - - /** - * Checks equality by checking the options that are actually set by - * createSsl. - * @param other - * @returns - */ - _equals(other: ServerCredentials): boolean { - if (this === other) { - return true; - } - if (!(other instanceof SecureServerCredentials)) { - return false; - } - // options.ca equality check - if (Buffer.isBuffer(this.options.ca) && Buffer.isBuffer(other.options.ca)) { - if (!this.options.ca.equals(other.options.ca)) { - return false; - } - } else { - if (this.options.ca !== other.options.ca) { - return false; - } - } - // options.cert equality check - if (Array.isArray(this.options.cert) && Array.isArray(other.options.cert)) { - if (this.options.cert.length !== other.options.cert.length) { - return false; - } - for (let i = 0; i < this.options.cert.length; i++) { - const thisCert = this.options.cert[i]; - const otherCert = other.options.cert[i]; - if (Buffer.isBuffer(thisCert) && Buffer.isBuffer(otherCert)) { - if (!thisCert.equals(otherCert)) { - return false; - } - } else { - if (thisCert !== otherCert) { - return false; - } - } - } - } else { - if (this.options.cert !== other.options.cert) { - return false; - } - } - // options.key equality check - if (Array.isArray(this.options.key) && Array.isArray(other.options.key)) { - if (this.options.key.length !== other.options.key.length) { - return false; - } - for (let i = 0; i < this.options.key.length; i++) { - const thisKey = this.options.key[i]; - const otherKey = other.options.key[i]; - if (Buffer.isBuffer(thisKey) && Buffer.isBuffer(otherKey)) { - if (!thisKey.equals(otherKey)) { - return false; - } - } else { - if (thisKey !== otherKey) { - return false; - } - } - } - } else { - if (this.options.key !== other.options.key) { - return false; - } - } - // options.requestCert equality check - if (this.options.requestCert !== other.options.requestCert) { - return false; - } - /* ciphers is derived from a value that is constant for the process, so no - * equality check is needed. */ - return true; - } -} - -class CertificateProviderServerCredentials extends ServerCredentials { - private latestCaUpdate: CaCertificateUpdate | null = null; - private latestIdentityUpdate: IdentityCertificateUpdate | null = null; - private caCertificateUpdateListener: CaCertificateUpdateListener = this.handleCaCertificateUpdate.bind(this); - private identityCertificateUpdateListener: IdentityCertificateUpdateListener = this.handleIdentityCertitificateUpdate.bind(this); - constructor( - private identityCertificateProvider: CertificateProvider, - private caCertificateProvider: CertificateProvider | null, - private requireClientCertificate: boolean - ) { - super({ - requestCert: caCertificateProvider !== null, - rejectUnauthorized: requireClientCertificate, - ciphers: CIPHER_SUITES - }); - } - _addWatcher(watcher: SecureContextWatcher): void { - if (this.getWatcherCount() === 0) { - this.caCertificateProvider?.addCaCertificateListener(this.caCertificateUpdateListener); - this.identityCertificateProvider.addIdentityCertificateListener(this.identityCertificateUpdateListener); - } - super._addWatcher(watcher); - } - _removeWatcher(watcher: SecureContextWatcher): void { - super._removeWatcher(watcher); - if (this.getWatcherCount() === 0) { - this.caCertificateProvider?.removeCaCertificateListener(this.caCertificateUpdateListener); - this.identityCertificateProvider.removeIdentityCertificateListener(this.identityCertificateUpdateListener); - } - } - _equals(other: ServerCredentials): boolean { - if (this === other) { - return true; - } - if (!(other instanceof CertificateProviderServerCredentials)) { - return false; - } - return ( - this.caCertificateProvider === other.caCertificateProvider && - this.identityCertificateProvider === other.identityCertificateProvider && - this.requireClientCertificate === other.requireClientCertificate - ) - } - - private calculateSecureContextOptions(): SecureContextOptions | null { - if (this.latestIdentityUpdate === null) { - return null; - } - if (this.caCertificateProvider !== null && this.latestCaUpdate === null) { - return null; - } - return { - ca: this.latestCaUpdate?.caCertificate, - cert: [this.latestIdentityUpdate.certificate], - key: [this.latestIdentityUpdate.privateKey], - }; - } - - private finalizeUpdate() { - const secureContextOptions = this.calculateSecureContextOptions(); - this.updateSecureContextOptions(secureContextOptions); - } - - private handleCaCertificateUpdate(update: CaCertificateUpdate | null) { - this.latestCaUpdate = update; - this.finalizeUpdate(); - } - - private handleIdentityCertitificateUpdate(update: IdentityCertificateUpdate | null) { - this.latestIdentityUpdate = update; - this.finalizeUpdate(); - } -} - -export function createCertificateProviderServerCredentials( - caCertificateProvider: CertificateProvider, - identityCertificateProvider: CertificateProvider | null, - requireClientCertificate: boolean -) { - return new CertificateProviderServerCredentials( - caCertificateProvider, - identityCertificateProvider, - requireClientCertificate); -} - -class InterceptorServerCredentials extends ServerCredentials { - constructor(private readonly childCredentials: ServerCredentials, private readonly interceptors: ServerInterceptor[]) { - super({}); - } - _isSecure(): boolean { - return this.childCredentials._isSecure(); - } - _equals(other: ServerCredentials): boolean { - if (!(other instanceof InterceptorServerCredentials)) { - return false; - } - if (!(this.childCredentials._equals(other.childCredentials))) { - return false; - } - if (this.interceptors.length !== other.interceptors.length) { - return false; - } - for (let i = 0; i < this.interceptors.length; i++) { - if (this.interceptors[i] !== other.interceptors[i]) { - return false; - } - } - return true; - } - override _getInterceptors(): ServerInterceptor[] { - return this.interceptors; - } - override _addWatcher(watcher: SecureContextWatcher): void { - this.childCredentials._addWatcher(watcher); - } - override _removeWatcher(watcher: SecureContextWatcher): void { - this.childCredentials._removeWatcher(watcher); - } - override _getConstructorOptions(): SecureServerOptions | null { - return this.childCredentials._getConstructorOptions(); - } - override _getSecureContextOptions(): SecureContextOptions | null { - return this.childCredentials._getSecureContextOptions(); - } -} - -export function createServerCredentialsWithInterceptors(credentials: ServerCredentials, interceptors: ServerInterceptor[]): ServerCredentials { - return new InterceptorServerCredentials(credentials, interceptors); -} diff --git a/node_modules/@grpc/grpc-js/src/server-interceptors.ts b/node_modules/@grpc/grpc-js/src/server-interceptors.ts deleted file mode 100644 index 9daa787..0000000 --- a/node_modules/@grpc/grpc-js/src/server-interceptors.ts +++ /dev/null @@ -1,1069 +0,0 @@ -/* - * Copyright 2024 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { PartialStatusObject } from './call-interface'; -import { ServerMethodDefinition } from './make-client'; -import { Metadata } from './metadata'; -import { ChannelOptions } from './channel-options'; -import { Handler } from './server-call'; -import { Deadline } from './deadline'; -import { - DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH, - DEFAULT_MAX_SEND_MESSAGE_LENGTH, - LogVerbosity, - Status, -} from './constants'; -import * as http2 from 'http2'; -import { getErrorMessage } from './error'; -import * as zlib from 'zlib'; -import { StreamDecoder } from './stream-decoder'; -import { CallEventTracker } from './transport'; -import * as logging from './logging'; -import { AuthContext } from './auth-context'; -import { TLSSocket } from 'tls'; -import { GRPC_METRICS_HEADER, PerRequestMetricRecorder } from './orca'; - -const TRACER_NAME = 'server_call'; - -function trace(text: string) { - logging.trace(LogVerbosity.DEBUG, TRACER_NAME, text); -} - -export interface ServerMetadataListener { - (metadata: Metadata, next: (metadata: Metadata) => void): void; -} - -export interface ServerMessageListener { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (message: any, next: (message: any) => void): void; -} - -export interface ServerHalfCloseListener { - (next: () => void): void; -} - -export interface ServerCancelListener { - (): void; -} - -export interface FullServerListener { - onReceiveMetadata: ServerMetadataListener; - onReceiveMessage: ServerMessageListener; - onReceiveHalfClose: ServerHalfCloseListener; - onCancel: ServerCancelListener; -} - -export type ServerListener = Partial; - -export class ServerListenerBuilder { - private metadata: ServerMetadataListener | undefined = undefined; - private message: ServerMessageListener | undefined = undefined; - private halfClose: ServerHalfCloseListener | undefined = undefined; - private cancel: ServerCancelListener | undefined = undefined; - - withOnReceiveMetadata(onReceiveMetadata: ServerMetadataListener): this { - this.metadata = onReceiveMetadata; - return this; - } - - withOnReceiveMessage(onReceiveMessage: ServerMessageListener): this { - this.message = onReceiveMessage; - return this; - } - - withOnReceiveHalfClose(onReceiveHalfClose: ServerHalfCloseListener): this { - this.halfClose = onReceiveHalfClose; - return this; - } - - withOnCancel(onCancel: ServerCancelListener): this { - this.cancel = onCancel; - return this; - } - - build(): ServerListener { - return { - onReceiveMetadata: this.metadata, - onReceiveMessage: this.message, - onReceiveHalfClose: this.halfClose, - onCancel: this.cancel, - }; - } -} - -export interface InterceptingServerListener { - onReceiveMetadata(metadata: Metadata): void; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onReceiveMessage(message: any): void; - onReceiveHalfClose(): void; - onCancel(): void; -} - -export function isInterceptingServerListener( - listener: ServerListener | InterceptingServerListener -): listener is InterceptingServerListener { - return ( - listener.onReceiveMetadata !== undefined && - listener.onReceiveMetadata.length === 1 - ); -} - -class InterceptingServerListenerImpl implements InterceptingServerListener { - /** - * Once the call is cancelled, ignore all other events. - */ - private cancelled = false; - private processingMetadata = false; - private hasPendingMessage = false; - private pendingMessage: any = null; - private processingMessage = false; - private hasPendingHalfClose = false; - - constructor( - private listener: FullServerListener, - private nextListener: InterceptingServerListener - ) {} - - private processPendingMessage() { - if (this.hasPendingMessage) { - this.nextListener.onReceiveMessage(this.pendingMessage); - this.pendingMessage = null; - this.hasPendingMessage = false; - } - } - - private processPendingHalfClose() { - if (this.hasPendingHalfClose) { - this.nextListener.onReceiveHalfClose(); - this.hasPendingHalfClose = false; - } - } - - onReceiveMetadata(metadata: Metadata): void { - if (this.cancelled) { - return; - } - this.processingMetadata = true; - this.listener.onReceiveMetadata(metadata, interceptedMetadata => { - this.processingMetadata = false; - if (this.cancelled) { - return; - } - this.nextListener.onReceiveMetadata(interceptedMetadata); - this.processPendingMessage(); - this.processPendingHalfClose(); - }); - } - onReceiveMessage(message: any): void { - if (this.cancelled) { - return; - } - this.processingMessage = true; - this.listener.onReceiveMessage(message, msg => { - this.processingMessage = false; - if (this.cancelled) { - return; - } - if (this.processingMetadata) { - this.pendingMessage = msg; - this.hasPendingMessage = true; - } else { - this.nextListener.onReceiveMessage(msg); - this.processPendingHalfClose(); - } - }); - } - onReceiveHalfClose(): void { - if (this.cancelled) { - return; - } - this.listener.onReceiveHalfClose(() => { - if (this.cancelled) { - return; - } - if (this.processingMetadata || this.processingMessage) { - this.hasPendingHalfClose = true; - } else { - this.nextListener.onReceiveHalfClose(); - } - }); - } - onCancel(): void { - this.cancelled = true; - this.listener.onCancel(); - this.nextListener.onCancel(); - } -} - -export interface StartResponder { - (next: (listener?: ServerListener) => void): void; -} - -export interface MetadataResponder { - (metadata: Metadata, next: (metadata: Metadata) => void): void; -} - -export interface MessageResponder { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (message: any, next: (message: any) => void): void; -} - -export interface StatusResponder { - ( - status: PartialStatusObject, - next: (status: PartialStatusObject) => void - ): void; -} - -export interface FullResponder { - start: StartResponder; - sendMetadata: MetadataResponder; - sendMessage: MessageResponder; - sendStatus: StatusResponder; -} - -export type Responder = Partial; - -export class ResponderBuilder { - private start: StartResponder | undefined = undefined; - private metadata: MetadataResponder | undefined = undefined; - private message: MessageResponder | undefined = undefined; - private status: StatusResponder | undefined = undefined; - - withStart(start: StartResponder): this { - this.start = start; - return this; - } - - withSendMetadata(sendMetadata: MetadataResponder): this { - this.metadata = sendMetadata; - return this; - } - - withSendMessage(sendMessage: MessageResponder): this { - this.message = sendMessage; - return this; - } - - withSendStatus(sendStatus: StatusResponder): this { - this.status = sendStatus; - return this; - } - - build(): Responder { - return { - start: this.start, - sendMetadata: this.metadata, - sendMessage: this.message, - sendStatus: this.status, - }; - } -} - -const defaultServerListener: FullServerListener = { - onReceiveMetadata: (metadata, next) => { - next(metadata); - }, - onReceiveMessage: (message, next) => { - next(message); - }, - onReceiveHalfClose: next => { - next(); - }, - onCancel: () => {}, -}; - -const defaultResponder: FullResponder = { - start: next => { - next(); - }, - sendMetadata: (metadata, next) => { - next(metadata); - }, - sendMessage: (message, next) => { - next(message); - }, - sendStatus: (status, next) => { - next(status); - }, -}; - -export interface ConnectionInfo { - localAddress?: string | undefined; - localPort?: number | undefined; - remoteAddress?: string | undefined; - remotePort?: number | undefined; -} - -export interface ServerInterceptingCallInterface { - /** - * Register the listener to handle inbound events. - */ - start(listener: InterceptingServerListener): void; - /** - * Send response metadata. - */ - sendMetadata(metadata: Metadata): void; - /** - * Send a response message. - */ - sendMessage(message: any, callback: () => void): void; - /** - * End the call by sending this status. - */ - sendStatus(status: PartialStatusObject): void; - /** - * Start a single read, eventually triggering either listener.onReceiveMessage or listener.onReceiveHalfClose. - */ - startRead(): void; - /** - * Return the peer address of the client making the request, if known, or "unknown" otherwise - */ - getPeer(): string; - /** - * Return the call deadline set by the client. The value is Infinity if there is no deadline. - */ - getDeadline(): Deadline; - /** - * Return the host requested by the client in the ":authority" header. - */ - getHost(): string; - /** - * Return the auth context of the connection the call is associated with. - */ - getAuthContext(): AuthContext; - /** - * Return information about the connection used to make the call. - */ - getConnectionInfo(): ConnectionInfo; - /** - * Get the metrics recorder for this call. Metrics will not be sent unless - * the server was constructed with the `grpc.server_call_metric_recording` - * option. - */ - getMetricsRecorder(): PerRequestMetricRecorder; -} - -export class ServerInterceptingCall implements ServerInterceptingCallInterface { - private responder: FullResponder; - private processingMetadata = false; - private sentMetadata = false; - private processingMessage = false; - private pendingMessage: any = null; - private pendingMessageCallback: (() => void) | null = null; - private pendingStatus: PartialStatusObject | null = null; - constructor( - private nextCall: ServerInterceptingCallInterface, - responder?: Responder - ) { - this.responder = { - start: responder?.start ?? defaultResponder.start, - sendMetadata: responder?.sendMetadata ?? defaultResponder.sendMetadata, - sendMessage: responder?.sendMessage ?? defaultResponder.sendMessage, - sendStatus: responder?.sendStatus ?? defaultResponder.sendStatus, - }; - } - - private processPendingMessage() { - if (this.pendingMessageCallback) { - this.nextCall.sendMessage( - this.pendingMessage, - this.pendingMessageCallback - ); - this.pendingMessage = null; - this.pendingMessageCallback = null; - } - } - - private processPendingStatus() { - if (this.pendingStatus) { - this.nextCall.sendStatus(this.pendingStatus); - this.pendingStatus = null; - } - } - - start(listener: InterceptingServerListener): void { - this.responder.start(interceptedListener => { - const fullInterceptedListener: FullServerListener = { - onReceiveMetadata: - interceptedListener?.onReceiveMetadata ?? - defaultServerListener.onReceiveMetadata, - onReceiveMessage: - interceptedListener?.onReceiveMessage ?? - defaultServerListener.onReceiveMessage, - onReceiveHalfClose: - interceptedListener?.onReceiveHalfClose ?? - defaultServerListener.onReceiveHalfClose, - onCancel: - interceptedListener?.onCancel ?? defaultServerListener.onCancel, - }; - const finalInterceptingListener = new InterceptingServerListenerImpl( - fullInterceptedListener, - listener - ); - this.nextCall.start(finalInterceptingListener); - }); - } - sendMetadata(metadata: Metadata): void { - this.processingMetadata = true; - this.sentMetadata = true; - this.responder.sendMetadata(metadata, interceptedMetadata => { - this.processingMetadata = false; - this.nextCall.sendMetadata(interceptedMetadata); - this.processPendingMessage(); - this.processPendingStatus(); - }); - } - sendMessage(message: any, callback: () => void): void { - this.processingMessage = true; - if (!this.sentMetadata) { - this.sendMetadata(new Metadata()); - } - this.responder.sendMessage(message, interceptedMessage => { - this.processingMessage = false; - if (this.processingMetadata) { - this.pendingMessage = interceptedMessage; - this.pendingMessageCallback = callback; - } else { - this.nextCall.sendMessage(interceptedMessage, callback); - } - }); - } - sendStatus(status: PartialStatusObject): void { - this.responder.sendStatus(status, interceptedStatus => { - if (this.processingMetadata || this.processingMessage) { - this.pendingStatus = interceptedStatus; - } else { - this.nextCall.sendStatus(interceptedStatus); - } - }); - } - startRead(): void { - this.nextCall.startRead(); - } - getPeer(): string { - return this.nextCall.getPeer(); - } - getDeadline(): Deadline { - return this.nextCall.getDeadline(); - } - getHost(): string { - return this.nextCall.getHost(); - } - getAuthContext(): AuthContext { - return this.nextCall.getAuthContext(); - } - getConnectionInfo(): ConnectionInfo { - return this.nextCall.getConnectionInfo(); - } - getMetricsRecorder(): PerRequestMetricRecorder { - return this.nextCall.getMetricsRecorder(); - } -} - -export interface ServerInterceptor { - ( - methodDescriptor: ServerMethodDefinition, - call: ServerInterceptingCallInterface - ): ServerInterceptingCall; -} - -interface DeadlineUnitIndexSignature { - [name: string]: number; -} - -const GRPC_ACCEPT_ENCODING_HEADER = 'grpc-accept-encoding'; -const GRPC_ENCODING_HEADER = 'grpc-encoding'; -const GRPC_MESSAGE_HEADER = 'grpc-message'; -const GRPC_STATUS_HEADER = 'grpc-status'; -const GRPC_TIMEOUT_HEADER = 'grpc-timeout'; -const DEADLINE_REGEX = /(\d{1,8})\s*([HMSmun])/; -const deadlineUnitsToMs: DeadlineUnitIndexSignature = { - H: 3600000, - M: 60000, - S: 1000, - m: 1, - u: 0.001, - n: 0.000001, -}; - -const defaultCompressionHeaders = { - // TODO(cjihrig): Remove these encoding headers from the default response - // once compression is integrated. - [GRPC_ACCEPT_ENCODING_HEADER]: 'identity,deflate,gzip', - [GRPC_ENCODING_HEADER]: 'identity', -}; -const defaultResponseHeaders = { - [http2.constants.HTTP2_HEADER_STATUS]: http2.constants.HTTP_STATUS_OK, - [http2.constants.HTTP2_HEADER_CONTENT_TYPE]: 'application/grpc+proto', -}; -const defaultResponseOptions = { - waitForTrailers: true, -} as http2.ServerStreamResponseOptions; - -type ReadQueueEntryType = 'COMPRESSED' | 'READABLE' | 'HALF_CLOSE'; - -interface ReadQueueEntry { - type: ReadQueueEntryType; - compressedMessage: Buffer | null; - parsedMessage: any; -} - -export class BaseServerInterceptingCall - implements ServerInterceptingCallInterface -{ - private listener: InterceptingServerListener | null = null; - private metadata: Metadata; - private deadlineTimer: NodeJS.Timeout | null = null; - private deadline: Deadline = Infinity; - private maxSendMessageSize: number = DEFAULT_MAX_SEND_MESSAGE_LENGTH; - private maxReceiveMessageSize: number = DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH; - private cancelled = false; - private metadataSent = false; - private wantTrailers = false; - private cancelNotified = false; - private incomingEncoding = 'identity'; - private decoder: StreamDecoder; - private readQueue: ReadQueueEntry[] = []; - private isReadPending = false; - private receivedHalfClose = false; - private streamEnded = false; - private host: string; - private connectionInfo: ConnectionInfo; - private metricsRecorder = new PerRequestMetricRecorder(); - private shouldSendMetrics: boolean; - - constructor( - private readonly stream: http2.ServerHttp2Stream, - headers: http2.IncomingHttpHeaders, - private readonly callEventTracker: CallEventTracker | null, - private readonly handler: Handler, - options: ChannelOptions - ) { - this.stream.once('close', () => { - trace( - 'Request to method ' + - this.handler?.path + - ' stream closed with rstCode ' + - this.stream.rstCode - ); - - if (this.callEventTracker && !this.streamEnded) { - this.streamEnded = true; - this.callEventTracker.onStreamEnd(false); - this.callEventTracker.onCallEnd({ - code: Status.CANCELLED, - details: 'Stream closed before sending status', - metadata: null, - }); - } - - this.notifyOnCancel(); - }); - - this.stream.on('data', (data: Buffer) => { - this.handleDataFrame(data); - }); - this.stream.pause(); - - this.stream.on('end', () => { - this.handleEndEvent(); - }); - - if ('grpc.max_send_message_length' in options) { - this.maxSendMessageSize = options['grpc.max_send_message_length']!; - } - if ('grpc.max_receive_message_length' in options) { - this.maxReceiveMessageSize = options['grpc.max_receive_message_length']!; - } - - this.host = headers[':authority'] ?? headers.host!; - this.decoder = new StreamDecoder(this.maxReceiveMessageSize); - - const metadata = Metadata.fromHttp2Headers(headers); - - if (logging.isTracerEnabled(TRACER_NAME)) { - trace( - 'Request to ' + - this.handler.path + - ' received headers ' + - JSON.stringify(metadata.toJSON()) - ); - } - - const timeoutHeader = metadata.get(GRPC_TIMEOUT_HEADER); - - if (timeoutHeader.length > 0) { - this.handleTimeoutHeader(timeoutHeader[0] as string); - } - - const encodingHeader = metadata.get(GRPC_ENCODING_HEADER); - - if (encodingHeader.length > 0) { - this.incomingEncoding = encodingHeader[0] as string; - } - - // Remove several headers that should not be propagated to the application - metadata.remove(GRPC_TIMEOUT_HEADER); - metadata.remove(GRPC_ENCODING_HEADER); - metadata.remove(GRPC_ACCEPT_ENCODING_HEADER); - metadata.remove(http2.constants.HTTP2_HEADER_ACCEPT_ENCODING); - metadata.remove(http2.constants.HTTP2_HEADER_TE); - metadata.remove(http2.constants.HTTP2_HEADER_CONTENT_TYPE); - this.metadata = metadata; - - const socket = stream.session?.socket; - this.connectionInfo = { - localAddress: socket?.localAddress, - localPort: socket?.localPort, - remoteAddress: socket?.remoteAddress, - remotePort: socket?.remotePort - }; - this.shouldSendMetrics = !!options['grpc.server_call_metric_recording']; - } - - private handleTimeoutHeader(timeoutHeader: string) { - const match = timeoutHeader.toString().match(DEADLINE_REGEX); - - if (match === null) { - const status: PartialStatusObject = { - code: Status.INTERNAL, - details: `Invalid ${GRPC_TIMEOUT_HEADER} value "${timeoutHeader}"`, - metadata: null, - }; - // Wait for the constructor to complete before sending the error. - process.nextTick(() => { - this.sendStatus(status); - }); - return; - } - - const timeout = (+match[1] * deadlineUnitsToMs[match[2]]) | 0; - - const now = new Date(); - this.deadline = now.setMilliseconds(now.getMilliseconds() + timeout); - this.deadlineTimer = setTimeout(() => { - const status: PartialStatusObject = { - code: Status.DEADLINE_EXCEEDED, - details: 'Deadline exceeded', - metadata: null, - }; - this.sendStatus(status); - }, timeout); - } - - private checkCancelled(): boolean { - /* In some cases the stream can become destroyed before the close event - * fires. That creates a race condition that this check works around */ - if (!this.cancelled && (this.stream.destroyed || this.stream.closed)) { - this.notifyOnCancel(); - this.cancelled = true; - } - return this.cancelled; - } - private notifyOnCancel() { - if (this.cancelNotified) { - return; - } - this.cancelNotified = true; - this.cancelled = true; - process.nextTick(() => { - this.listener?.onCancel(); - }); - if (this.deadlineTimer) { - clearTimeout(this.deadlineTimer); - } - // Flush incoming data frames - this.stream.resume(); - } - - /** - * A server handler can start sending messages without explicitly sending - * metadata. In that case, we need to send headers before sending any - * messages. This function does that if necessary. - */ - private maybeSendMetadata() { - if (!this.metadataSent) { - this.sendMetadata(new Metadata()); - } - } - - /** - * Serialize a message to a length-delimited byte string. - * @param value - * @returns - */ - private serializeMessage(value: any) { - const messageBuffer = this.handler.serialize(value); - const byteLength = messageBuffer.byteLength; - const output = Buffer.allocUnsafe(byteLength + 5); - /* Note: response compression is currently not supported, so this - * compressed bit is always 0. */ - output.writeUInt8(0, 0); - output.writeUInt32BE(byteLength, 1); - messageBuffer.copy(output, 5); - return output; - } - - private decompressMessage( - message: Buffer, - encoding: string - ): Buffer | Promise { - const messageContents = message.subarray(5); - if (encoding === 'identity') { - return messageContents; - } else if (encoding === 'deflate' || encoding === 'gzip') { - let decompresser: zlib.Gunzip | zlib.Deflate; - if (encoding === 'deflate') { - decompresser = zlib.createInflate(); - } else { - decompresser = zlib.createGunzip(); - } - return new Promise((resolve, reject) => { - let totalLength = 0 - const messageParts: Buffer[] = []; - decompresser.on('error', (error: Error) => { - reject({ - code: Status.INTERNAL, - details: 'Failed to decompress message' - }); - }); - decompresser.on('data', (chunk: Buffer) => { - messageParts.push(chunk); - totalLength += chunk.byteLength; - if (this.maxReceiveMessageSize !== -1 && totalLength > this.maxReceiveMessageSize) { - decompresser.destroy(); - reject({ - code: Status.RESOURCE_EXHAUSTED, - details: `Received message that decompresses to a size larger than ${this.maxReceiveMessageSize}` - }); - } - }); - decompresser.on('end', () => { - resolve(Buffer.concat(messageParts)); - }); - decompresser.write(messageContents); - decompresser.end(); - }); - } else { - return Promise.reject({ - code: Status.UNIMPLEMENTED, - details: `Received message compressed with unsupported encoding "${encoding}"`, - }); - } - } - - private async decompressAndMaybePush(queueEntry: ReadQueueEntry) { - if (queueEntry.type !== 'COMPRESSED') { - throw new Error(`Invalid queue entry type: ${queueEntry.type}`); - } - - const compressed = queueEntry.compressedMessage!.readUInt8(0) === 1; - const compressedMessageEncoding = compressed - ? this.incomingEncoding - : 'identity'; - let decompressedMessage: Buffer; - try { - decompressedMessage = await this.decompressMessage( - queueEntry.compressedMessage!, - compressedMessageEncoding - ); - } catch (err) { - this.sendStatus(err as PartialStatusObject); - return; - } - try { - queueEntry.parsedMessage = this.handler.deserialize(decompressedMessage); - } catch (err) { - this.sendStatus({ - code: Status.INTERNAL, - details: `Error deserializing request: ${(err as Error).message}`, - }); - return; - } - queueEntry.type = 'READABLE'; - this.maybePushNextMessage(); - } - - private maybePushNextMessage() { - if ( - this.listener && - this.isReadPending && - this.readQueue.length > 0 && - this.readQueue[0].type !== 'COMPRESSED' - ) { - this.isReadPending = false; - const nextQueueEntry = this.readQueue.shift()!; - if (nextQueueEntry.type === 'READABLE') { - this.listener.onReceiveMessage(nextQueueEntry.parsedMessage); - } else { - // nextQueueEntry.type === 'HALF_CLOSE' - this.listener.onReceiveHalfClose(); - } - } - } - - private handleDataFrame(data: Buffer) { - if (this.checkCancelled()) { - return; - } - trace( - 'Request to ' + - this.handler.path + - ' received data frame of size ' + - data.length - ); - let rawMessages: Buffer[]; - try { - rawMessages = this.decoder.write(data); - } catch (e) { - this.sendStatus({ code: Status.RESOURCE_EXHAUSTED, details: (e as Error).message }); - return; - } - - for (const messageBytes of rawMessages) { - this.stream.pause(); - const queueEntry: ReadQueueEntry = { - type: 'COMPRESSED', - compressedMessage: messageBytes, - parsedMessage: null, - }; - this.readQueue.push(queueEntry); - this.decompressAndMaybePush(queueEntry); - this.callEventTracker?.addMessageReceived(); - } - } - private handleEndEvent() { - this.readQueue.push({ - type: 'HALF_CLOSE', - compressedMessage: null, - parsedMessage: null, - }); - this.receivedHalfClose = true; - this.maybePushNextMessage(); - } - start(listener: InterceptingServerListener): void { - trace('Request to ' + this.handler.path + ' start called'); - if (this.checkCancelled()) { - return; - } - this.listener = listener; - listener.onReceiveMetadata(this.metadata); - } - sendMetadata(metadata: Metadata): void { - if (this.checkCancelled()) { - return; - } - - if (this.metadataSent) { - return; - } - - this.metadataSent = true; - const custom = metadata ? metadata.toHttp2Headers() : null; - const headers = { - ...defaultResponseHeaders, - ...defaultCompressionHeaders, - ...custom, - }; - this.stream.respond(headers, defaultResponseOptions); - } - sendMessage(message: any, callback: () => void): void { - if (this.checkCancelled()) { - return; - } - let response: Buffer; - try { - response = this.serializeMessage(message); - } catch (e) { - this.sendStatus({ - code: Status.INTERNAL, - details: `Error serializing response: ${getErrorMessage(e)}`, - metadata: null, - }); - return; - } - - if ( - this.maxSendMessageSize !== -1 && - response.length - 5 > this.maxSendMessageSize - ) { - this.sendStatus({ - code: Status.RESOURCE_EXHAUSTED, - details: `Sent message larger than max (${response.length} vs. ${this.maxSendMessageSize})`, - metadata: null, - }); - return; - } - this.maybeSendMetadata(); - trace( - 'Request to ' + - this.handler.path + - ' sent data frame of size ' + - response.length - ); - this.stream.write(response, error => { - if (error) { - this.sendStatus({ - code: Status.INTERNAL, - details: `Error writing message: ${getErrorMessage(error)}`, - metadata: null, - }); - return; - } - this.callEventTracker?.addMessageSent(); - callback(); - }); - } - sendStatus(status: PartialStatusObject): void { - if (this.checkCancelled()) { - return; - } - - trace( - 'Request to method ' + - this.handler?.path + - ' ended with status code: ' + - Status[status.code] + - ' details: ' + - status.details - ); - - const statusMetadata = status.metadata?.clone() ?? new Metadata(); - if (this.shouldSendMetrics) { - statusMetadata.set(GRPC_METRICS_HEADER, this.metricsRecorder.serialize()); - } - - if (this.metadataSent) { - if (!this.wantTrailers) { - this.wantTrailers = true; - this.stream.once('wantTrailers', () => { - if (this.callEventTracker && !this.streamEnded) { - this.streamEnded = true; - this.callEventTracker.onStreamEnd(true); - this.callEventTracker.onCallEnd(status); - } - const trailersToSend: http2.OutgoingHttpHeaders = { - [GRPC_STATUS_HEADER]: status.code, - [GRPC_MESSAGE_HEADER]: encodeURI(status.details), - ...statusMetadata.toHttp2Headers(), - }; - - this.stream.sendTrailers(trailersToSend); - this.notifyOnCancel(); - }); - this.stream.end(); - } else { - this.notifyOnCancel(); - } - } else { - if (this.callEventTracker && !this.streamEnded) { - this.streamEnded = true; - this.callEventTracker.onStreamEnd(true); - this.callEventTracker.onCallEnd(status); - } - // Trailers-only response - const trailersToSend: http2.OutgoingHttpHeaders = { - [GRPC_STATUS_HEADER]: status.code, - [GRPC_MESSAGE_HEADER]: encodeURI(status.details), - ...defaultResponseHeaders, - ...statusMetadata.toHttp2Headers(), - }; - this.stream.respond(trailersToSend, { endStream: true }); - this.notifyOnCancel(); - } - } - startRead(): void { - trace('Request to ' + this.handler.path + ' startRead called'); - if (this.checkCancelled()) { - return; - } - this.isReadPending = true; - if (this.readQueue.length === 0) { - if (!this.receivedHalfClose) { - this.stream.resume(); - } - } else { - this.maybePushNextMessage(); - } - } - getPeer(): string { - const socket = this.stream.session?.socket; - if (socket?.remoteAddress) { - if (socket.remotePort) { - return `${socket.remoteAddress}:${socket.remotePort}`; - } else { - return socket.remoteAddress; - } - } else { - return 'unknown'; - } - } - getDeadline(): Deadline { - return this.deadline; - } - getHost(): string { - return this.host; - } - getAuthContext(): AuthContext { - if (this.stream.session?.socket instanceof TLSSocket) { - const peerCertificate = this.stream.session.socket.getPeerCertificate(); - return { - transportSecurityType: 'ssl', - sslPeerCertificate: peerCertificate.raw ? peerCertificate : undefined - } - } else { - return {}; - } - } - getConnectionInfo(): ConnectionInfo { - return this.connectionInfo; - } - getMetricsRecorder(): PerRequestMetricRecorder { - return this.metricsRecorder; - } -} - -export function getServerInterceptingCall( - interceptors: ServerInterceptor[], - stream: http2.ServerHttp2Stream, - headers: http2.IncomingHttpHeaders, - callEventTracker: CallEventTracker | null, - handler: Handler, - options: ChannelOptions -) { - const methodDefinition: ServerMethodDefinition = { - path: handler.path, - requestStream: handler.type === 'clientStream' || handler.type === 'bidi', - responseStream: handler.type === 'serverStream' || handler.type === 'bidi', - requestDeserialize: handler.deserialize, - responseSerialize: handler.serialize, - }; - const baseCall = new BaseServerInterceptingCall( - stream, - headers, - callEventTracker, - handler, - options - ); - return interceptors.reduce( - (call: ServerInterceptingCallInterface, interceptor: ServerInterceptor) => { - return interceptor(methodDefinition, call); - }, - baseCall - ); -} diff --git a/node_modules/@grpc/grpc-js/src/server.ts b/node_modules/@grpc/grpc-js/src/server.ts deleted file mode 100644 index 205832d..0000000 --- a/node_modules/@grpc/grpc-js/src/server.ts +++ /dev/null @@ -1,2226 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import * as http2 from 'http2'; -import * as util from 'util'; - -import { ServiceError } from './call'; -import { Status, LogVerbosity } from './constants'; -import { Deserialize, Serialize, ServiceDefinition } from './make-client'; -import { Metadata } from './metadata'; -import { - BidiStreamingHandler, - ClientStreamingHandler, - HandleCall, - Handler, - HandlerType, - sendUnaryData, - ServerDuplexStream, - ServerDuplexStreamImpl, - ServerReadableStream, - ServerStreamingHandler, - ServerUnaryCall, - ServerWritableStream, - ServerWritableStreamImpl, - UnaryHandler, - ServerErrorResponse, - ServerStatusResponse, - serverErrorToStatus, -} from './server-call'; -import { SecureContextWatcher, ServerCredentials } from './server-credentials'; -import { ChannelOptions } from './channel-options'; -import { - createResolver, - ResolverListener, - mapUriDefaultScheme, -} from './resolver'; -import * as logging from './logging'; -import { - SubchannelAddress, - isTcpSubchannelAddress, - subchannelAddressToString, - stringToSubchannelAddress, -} from './subchannel-address'; -import { - GrpcUri, - combineHostPort, - parseUri, - splitHostPort, - uriToString, -} from './uri-parser'; -import { - ChannelzCallTracker, - ChannelzCallTrackerStub, - ChannelzChildrenTracker, - ChannelzChildrenTrackerStub, - ChannelzTrace, - ChannelzTraceStub, - registerChannelzServer, - registerChannelzSocket, - ServerInfo, - ServerRef, - SocketInfo, - SocketRef, - TlsInfo, - unregisterChannelzRef, -} from './channelz'; -import { CipherNameAndProtocol, TLSSocket } from 'tls'; -import { - ServerInterceptingCallInterface, - ServerInterceptor, - getServerInterceptingCall, -} from './server-interceptors'; -import { PartialStatusObject } from './call-interface'; -import { CallEventTracker } from './transport'; -import { Socket } from 'net'; -import { Duplex } from 'stream'; - -const UNLIMITED_CONNECTION_AGE_MS = ~(1 << 31); -const KEEPALIVE_MAX_TIME_MS = ~(1 << 31); -const KEEPALIVE_TIMEOUT_MS = 20000; -const MAX_CONNECTION_IDLE_MS = ~(1 << 31); - -const { HTTP2_HEADER_PATH } = http2.constants; - -const TRACER_NAME = 'server'; -const kMaxAge = Buffer.from('max_age'); - -function serverCallTrace(text: string) { - logging.trace(LogVerbosity.DEBUG, 'server_call', text); -} - -type AnyHttp2Server = http2.Http2Server | http2.Http2SecureServer; - -interface BindResult { - port: number; - count: number; - errors: string[]; -} - -interface SingleAddressBindResult { - port: number; - error?: string; -} - -function noop(): void {} - -/** - * Decorator to wrap a class method with util.deprecate - * @param message The message to output if the deprecated method is called - * @returns - */ -function deprecate(message: string) { - return function ( - target: (this: This, ...args: Args) => Return, - context: ClassMethodDecoratorContext< - This, - (this: This, ...args: Args) => Return - > - ) { - return util.deprecate(target, message); - }; -} - -function getUnimplementedStatusResponse( - methodName: string -): PartialStatusObject { - return { - code: Status.UNIMPLEMENTED, - details: `The server does not implement the method ${methodName}`, - }; -} - -/* eslint-disable @typescript-eslint/no-explicit-any */ -type UntypedUnaryHandler = UnaryHandler; -type UntypedClientStreamingHandler = ClientStreamingHandler; -type UntypedServerStreamingHandler = ServerStreamingHandler; -type UntypedBidiStreamingHandler = BidiStreamingHandler; -export type UntypedHandleCall = HandleCall; -type UntypedHandler = Handler; -export interface UntypedServiceImplementation { - [name: string]: UntypedHandleCall; -} - -function getDefaultHandler(handlerType: HandlerType, methodName: string) { - const unimplementedStatusResponse = - getUnimplementedStatusResponse(methodName); - switch (handlerType) { - case 'unary': - return ( - call: ServerUnaryCall, - callback: sendUnaryData - ) => { - callback(unimplementedStatusResponse as ServiceError, null); - }; - case 'clientStream': - return ( - call: ServerReadableStream, - callback: sendUnaryData - ) => { - callback(unimplementedStatusResponse as ServiceError, null); - }; - case 'serverStream': - return (call: ServerWritableStream) => { - call.emit('error', unimplementedStatusResponse); - }; - case 'bidi': - return (call: ServerDuplexStream) => { - call.emit('error', unimplementedStatusResponse); - }; - default: - throw new Error(`Invalid handlerType ${handlerType}`); - } -} - -interface ChannelzSessionInfo { - ref: SocketRef; - streamTracker: ChannelzCallTracker | ChannelzCallTrackerStub; - messagesSent: number; - messagesReceived: number; - keepAlivesSent: number; - lastMessageSentTimestamp: Date | null; - lastMessageReceivedTimestamp: Date | null; -} - -/** - * Information related to a single invocation of bindAsync. This should be - * tracked in a map keyed by target string, normalized with a pass through - * parseUri -> mapUriDefaultScheme -> uriToString. If the target has a port - * number and the port number is 0, the target string is modified with the - * concrete bound port. - */ -interface BoundPort { - /** - * The key used to refer to this object in the boundPorts map. - */ - mapKey: string; - /** - * The target string, passed through parseUri -> mapUriDefaultScheme. Used - * to determine the final key when the port number is 0. - */ - originalUri: GrpcUri; - /** - * If there is a pending bindAsync operation, this is a promise that resolves - * with the port number when that operation succeeds. If there is no such - * operation pending, this is null. - */ - completionPromise: Promise | null; - /** - * The port number that was actually bound. Populated only after - * completionPromise resolves. - */ - portNumber: number; - /** - * Set by unbind if called while pending is true. - */ - cancelled: boolean; - /** - * The credentials object passed to the original bindAsync call. - */ - credentials: ServerCredentials; - /** - * The set of servers associated with this listening port. A target string - * that expands to multiple addresses will result in multiple listening - * servers. - */ - listeningServers: Set; -} - -/** - * Should be in a map keyed by AnyHttp2Server. - */ -interface Http2ServerInfo { - channelzRef: SocketRef; - sessions: Set; - ownsChannelzRef: boolean; -} - -interface SessionIdleTimeoutTracker { - activeStreams: number; - lastIdle: number; - timeout: NodeJS.Timeout; - onClose: (session: http2.ServerHttp2Session) => void | null; -} - -export interface ServerOptions extends ChannelOptions { - interceptors?: ServerInterceptor[]; -} - -export interface ConnectionInjector { - injectConnection(connection: Duplex): void; - drain(graceTimeMs: number): void; - destroy(): void; -} - -export class Server { - private boundPorts: Map = new Map(); - private http2Servers: Map = new Map(); - private sessionIdleTimeouts = new Map< - http2.ServerHttp2Session, - SessionIdleTimeoutTracker - >(); - - private handlers: Map = new Map< - string, - UntypedHandler - >(); - private sessions = new Map(); - /** - * This field only exists to ensure that the start method throws an error if - * it is called twice, as it did previously. - */ - private started = false; - private shutdown = false; - private options: ServerOptions; - private serverAddressString = 'null'; - - // Channelz Info - private readonly channelzEnabled: boolean = true; - private channelzRef: ServerRef; - private channelzTrace: ChannelzTrace | ChannelzTraceStub; - private callTracker: ChannelzCallTracker | ChannelzCallTrackerStub; - private listenerChildrenTracker: - | ChannelzChildrenTracker - | ChannelzChildrenTrackerStub; - private sessionChildrenTracker: - | ChannelzChildrenTracker - | ChannelzChildrenTrackerStub; - - private readonly maxConnectionAgeMs: number; - private readonly maxConnectionAgeGraceMs: number; - - private readonly keepaliveTimeMs: number; - private readonly keepaliveTimeoutMs: number; - - private readonly sessionIdleTimeout: number; - - private readonly interceptors: ServerInterceptor[]; - - /** - * Options that will be used to construct all Http2Server instances for this - * Server. - */ - private commonServerOptions: http2.ServerOptions; - - constructor(options?: ServerOptions) { - this.options = options ?? {}; - if (this.options['grpc.enable_channelz'] === 0) { - this.channelzEnabled = false; - this.channelzTrace = new ChannelzTraceStub(); - this.callTracker = new ChannelzCallTrackerStub(); - this.listenerChildrenTracker = new ChannelzChildrenTrackerStub(); - this.sessionChildrenTracker = new ChannelzChildrenTrackerStub(); - } else { - this.channelzTrace = new ChannelzTrace(); - this.callTracker = new ChannelzCallTracker(); - this.listenerChildrenTracker = new ChannelzChildrenTracker(); - this.sessionChildrenTracker = new ChannelzChildrenTracker(); - } - - this.channelzRef = registerChannelzServer( - 'server', - () => this.getChannelzInfo(), - this.channelzEnabled - ); - - this.channelzTrace.addTrace('CT_INFO', 'Server created'); - this.maxConnectionAgeMs = - this.options['grpc.max_connection_age_ms'] ?? UNLIMITED_CONNECTION_AGE_MS; - this.maxConnectionAgeGraceMs = - this.options['grpc.max_connection_age_grace_ms'] ?? - UNLIMITED_CONNECTION_AGE_MS; - this.keepaliveTimeMs = - this.options['grpc.keepalive_time_ms'] ?? KEEPALIVE_MAX_TIME_MS; - this.keepaliveTimeoutMs = - this.options['grpc.keepalive_timeout_ms'] ?? KEEPALIVE_TIMEOUT_MS; - this.sessionIdleTimeout = - this.options['grpc.max_connection_idle_ms'] ?? MAX_CONNECTION_IDLE_MS; - - this.commonServerOptions = { - maxSendHeaderBlockLength: Number.MAX_SAFE_INTEGER, - }; - if ('grpc-node.max_session_memory' in this.options) { - this.commonServerOptions.maxSessionMemory = - this.options['grpc-node.max_session_memory']; - } else { - /* By default, set a very large max session memory limit, to effectively - * disable enforcement of the limit. Some testing indicates that Node's - * behavior degrades badly when this limit is reached, so we solve that - * by disabling the check entirely. */ - this.commonServerOptions.maxSessionMemory = Number.MAX_SAFE_INTEGER; - } - if ('grpc.max_concurrent_streams' in this.options) { - this.commonServerOptions.settings = { - maxConcurrentStreams: this.options['grpc.max_concurrent_streams'], - }; - } - this.interceptors = this.options.interceptors ?? []; - this.trace('Server constructed'); - } - - private getChannelzInfo(): ServerInfo { - return { - trace: this.channelzTrace, - callTracker: this.callTracker, - listenerChildren: this.listenerChildrenTracker.getChildLists(), - sessionChildren: this.sessionChildrenTracker.getChildLists(), - }; - } - - private getChannelzSessionInfo( - session: http2.ServerHttp2Session - ): SocketInfo { - const sessionInfo = this.sessions.get(session)!; - const sessionSocket = session.socket; - const remoteAddress = sessionSocket.remoteAddress - ? stringToSubchannelAddress( - sessionSocket.remoteAddress, - sessionSocket.remotePort - ) - : null; - const localAddress = sessionSocket.localAddress - ? stringToSubchannelAddress( - sessionSocket.localAddress!, - sessionSocket.localPort - ) - : null; - let tlsInfo: TlsInfo | null; - if (session.encrypted) { - const tlsSocket: TLSSocket = sessionSocket as TLSSocket; - const cipherInfo: CipherNameAndProtocol & { standardName?: string } = - tlsSocket.getCipher(); - const certificate = tlsSocket.getCertificate(); - const peerCertificate = tlsSocket.getPeerCertificate(); - tlsInfo = { - cipherSuiteStandardName: cipherInfo.standardName ?? null, - cipherSuiteOtherName: cipherInfo.standardName ? null : cipherInfo.name, - localCertificate: - certificate && 'raw' in certificate ? certificate.raw : null, - remoteCertificate: - peerCertificate && 'raw' in peerCertificate - ? peerCertificate.raw - : null, - }; - } else { - tlsInfo = null; - } - const socketInfo: SocketInfo = { - remoteAddress: remoteAddress, - localAddress: localAddress, - security: tlsInfo, - remoteName: null, - streamsStarted: sessionInfo.streamTracker.callsStarted, - streamsSucceeded: sessionInfo.streamTracker.callsSucceeded, - streamsFailed: sessionInfo.streamTracker.callsFailed, - messagesSent: sessionInfo.messagesSent, - messagesReceived: sessionInfo.messagesReceived, - keepAlivesSent: sessionInfo.keepAlivesSent, - lastLocalStreamCreatedTimestamp: null, - lastRemoteStreamCreatedTimestamp: - sessionInfo.streamTracker.lastCallStartedTimestamp, - lastMessageSentTimestamp: sessionInfo.lastMessageSentTimestamp, - lastMessageReceivedTimestamp: sessionInfo.lastMessageReceivedTimestamp, - localFlowControlWindow: session.state.localWindowSize ?? null, - remoteFlowControlWindow: session.state.remoteWindowSize ?? null, - }; - return socketInfo; - } - - private trace(text: string): void { - logging.trace( - LogVerbosity.DEBUG, - TRACER_NAME, - '(' + this.channelzRef.id + ') ' + text - ); - } - - private keepaliveTrace(text: string): void { - logging.trace( - LogVerbosity.DEBUG, - 'keepalive', - '(' + this.channelzRef.id + ') ' + text - ); - } - - addProtoService(): never { - throw new Error('Not implemented. Use addService() instead'); - } - - addService( - service: ServiceDefinition, - implementation: UntypedServiceImplementation - ): void { - if ( - service === null || - typeof service !== 'object' || - implementation === null || - typeof implementation !== 'object' - ) { - throw new Error('addService() requires two objects as arguments'); - } - - const serviceKeys = Object.keys(service); - - if (serviceKeys.length === 0) { - throw new Error('Cannot add an empty service to a server'); - } - - serviceKeys.forEach(name => { - const attrs = service[name]; - let methodType: HandlerType; - - if (attrs.requestStream) { - if (attrs.responseStream) { - methodType = 'bidi'; - } else { - methodType = 'clientStream'; - } - } else { - if (attrs.responseStream) { - methodType = 'serverStream'; - } else { - methodType = 'unary'; - } - } - - let implFn = implementation[name]; - let impl; - - if (implFn === undefined && typeof attrs.originalName === 'string') { - implFn = implementation[attrs.originalName]; - } - - if (implFn !== undefined) { - impl = implFn.bind(implementation); - } else { - impl = getDefaultHandler(methodType, name); - } - - const success = this.register( - attrs.path, - impl as UntypedHandleCall, - attrs.responseSerialize, - attrs.requestDeserialize, - methodType - ); - - if (success === false) { - throw new Error(`Method handler for ${attrs.path} already provided.`); - } - }); - } - - removeService(service: ServiceDefinition): void { - if (service === null || typeof service !== 'object') { - throw new Error('removeService() requires object as argument'); - } - - const serviceKeys = Object.keys(service); - serviceKeys.forEach(name => { - const attrs = service[name]; - this.unregister(attrs.path); - }); - } - - bind(port: string, creds: ServerCredentials): never { - throw new Error('Not implemented. Use bindAsync() instead'); - } - - /** - * This API is experimental, so API stability is not guaranteed across minor versions. - * @param boundAddress - * @returns - */ - protected experimentalRegisterListenerToChannelz(boundAddress: SubchannelAddress) { - return registerChannelzSocket( - subchannelAddressToString(boundAddress), - () => { - return { - localAddress: boundAddress, - remoteAddress: null, - security: null, - remoteName: null, - streamsStarted: 0, - streamsSucceeded: 0, - streamsFailed: 0, - messagesSent: 0, - messagesReceived: 0, - keepAlivesSent: 0, - lastLocalStreamCreatedTimestamp: null, - lastRemoteStreamCreatedTimestamp: null, - lastMessageSentTimestamp: null, - lastMessageReceivedTimestamp: null, - localFlowControlWindow: null, - remoteFlowControlWindow: null, - }; - }, - this.channelzEnabled - ); - } - - protected experimentalUnregisterListenerFromChannelz(channelzRef: SocketRef) { - unregisterChannelzRef(channelzRef); - } - - private createHttp2Server(credentials: ServerCredentials) { - let http2Server: http2.Http2Server | http2.Http2SecureServer; - if (credentials._isSecure()) { - const constructorOptions = credentials._getConstructorOptions(); - const contextOptions = credentials._getSecureContextOptions(); - const secureServerOptions: http2.SecureServerOptions = { - ...this.commonServerOptions, - ...constructorOptions, - ...contextOptions, - enableTrace: this.options['grpc-node.tls_enable_trace'] === 1 - }; - let areCredentialsValid = contextOptions !== null; - this.trace('Initial credentials valid: ' + areCredentialsValid); - http2Server = http2.createSecureServer(secureServerOptions); - http2Server.prependListener('connection', (socket: Socket) => { - if (!areCredentialsValid) { - this.trace('Dropped connection from ' + JSON.stringify(socket.address()) + ' due to unloaded credentials'); - socket.destroy(); - } - }); - http2Server.on('secureConnection', (socket: TLSSocket) => { - /* These errors need to be handled by the user of Http2SecureServer, - * according to https://github.com/nodejs/node/issues/35824 */ - socket.on('error', (e: Error) => { - this.trace( - 'An incoming TLS connection closed with error: ' + e.message - ); - }); - }); - const credsWatcher: SecureContextWatcher = options => { - if (options) { - const secureServer = http2Server as http2.Http2SecureServer; - try { - secureServer.setSecureContext(options); - } catch (e) { - logging.log(LogVerbosity.ERROR, 'Failed to set secure context with error ' + (e as Error).message); - options = null; - } - } - areCredentialsValid = options !== null; - this.trace('Post-update credentials valid: ' + areCredentialsValid); - } - credentials._addWatcher(credsWatcher); - http2Server.on('close', () => { - credentials._removeWatcher(credsWatcher); - }); - } else { - http2Server = http2.createServer(this.commonServerOptions); - } - - http2Server.setTimeout(0, noop); - this._setupHandlers(http2Server, credentials._getInterceptors()); - return http2Server; - } - - private bindOneAddress( - address: SubchannelAddress, - boundPortObject: BoundPort - ): Promise { - this.trace('Attempting to bind ' + subchannelAddressToString(address)); - const http2Server = this.createHttp2Server(boundPortObject.credentials); - return new Promise((resolve, reject) => { - const onError = (err: Error) => { - this.trace( - 'Failed to bind ' + - subchannelAddressToString(address) + - ' with error ' + - err.message - ); - resolve({ - port: 'port' in address ? address.port : 1, - error: err.message, - }); - }; - - http2Server.once('error', onError); - - http2Server.listen(address, () => { - const boundAddress = http2Server.address()!; - let boundSubchannelAddress: SubchannelAddress; - if (typeof boundAddress === 'string') { - boundSubchannelAddress = { - path: boundAddress, - }; - } else { - boundSubchannelAddress = { - host: boundAddress.address, - port: boundAddress.port, - }; - } - - const channelzRef = this.experimentalRegisterListenerToChannelz( - boundSubchannelAddress - ); - this.listenerChildrenTracker.refChild(channelzRef); - - this.http2Servers.set(http2Server, { - channelzRef: channelzRef, - sessions: new Set(), - ownsChannelzRef: true - }); - boundPortObject.listeningServers.add(http2Server); - this.trace( - 'Successfully bound ' + - subchannelAddressToString(boundSubchannelAddress) - ); - resolve({ - port: - 'port' in boundSubchannelAddress ? boundSubchannelAddress.port : 1, - }); - http2Server.removeListener('error', onError); - }); - }); - } - - private async bindManyPorts( - addressList: SubchannelAddress[], - boundPortObject: BoundPort - ): Promise { - if (addressList.length === 0) { - return { - count: 0, - port: 0, - errors: [], - }; - } - if (isTcpSubchannelAddress(addressList[0]) && addressList[0].port === 0) { - /* If binding to port 0, first try to bind the first address, then bind - * the rest of the address list to the specific port that it binds. */ - const firstAddressResult = await this.bindOneAddress( - addressList[0], - boundPortObject - ); - if (firstAddressResult.error) { - /* If the first address fails to bind, try the same operation starting - * from the second item in the list. */ - const restAddressResult = await this.bindManyPorts( - addressList.slice(1), - boundPortObject - ); - return { - ...restAddressResult, - errors: [firstAddressResult.error, ...restAddressResult.errors], - }; - } else { - const restAddresses = addressList - .slice(1) - .map(address => - isTcpSubchannelAddress(address) - ? { host: address.host, port: firstAddressResult.port } - : address - ); - const restAddressResult = await Promise.all( - restAddresses.map(address => - this.bindOneAddress(address, boundPortObject) - ) - ); - const allResults = [firstAddressResult, ...restAddressResult]; - return { - count: allResults.filter(result => result.error === undefined).length, - port: firstAddressResult.port, - errors: allResults - .filter(result => result.error) - .map(result => result.error!), - }; - } - } else { - const allResults = await Promise.all( - addressList.map(address => - this.bindOneAddress(address, boundPortObject) - ) - ); - return { - count: allResults.filter(result => result.error === undefined).length, - port: allResults[0].port, - errors: allResults - .filter(result => result.error) - .map(result => result.error!), - }; - } - } - - private async bindAddressList( - addressList: SubchannelAddress[], - boundPortObject: BoundPort - ): Promise { - const bindResult = await this.bindManyPorts(addressList, boundPortObject); - if (bindResult.count > 0) { - if (bindResult.count < addressList.length) { - logging.log( - LogVerbosity.INFO, - `WARNING Only ${bindResult.count} addresses added out of total ${addressList.length} resolved` - ); - } - return bindResult.port; - } else { - const errorString = `No address added out of total ${addressList.length} resolved`; - logging.log(LogVerbosity.ERROR, errorString); - throw new Error( - `${errorString} errors: [${bindResult.errors.join(',')}]` - ); - } - } - - private resolvePort(port: GrpcUri): Promise { - return new Promise((resolve, reject) => { - let seenResolution = false; - const resolverListener: ResolverListener = ( - endpointList, - attributes, - serviceConfig, - resolutionNote - ) => { - if (seenResolution) { - return true; - } - seenResolution = true; - if (!endpointList.ok) { - reject(new Error(endpointList.error.details)); - return true; - } - const addressList = ([] as SubchannelAddress[]).concat( - ...endpointList.value.map(endpoint => endpoint.addresses) - ); - if (addressList.length === 0) { - reject(new Error(`No addresses resolved for port ${port}`)); - return true; - } - resolve(addressList); - return true; - } - const resolver = createResolver(port, resolverListener, this.options); - resolver.updateResolution(); - }); - } - - private async bindPort( - port: GrpcUri, - boundPortObject: BoundPort - ): Promise { - const addressList = await this.resolvePort(port); - if (boundPortObject.cancelled) { - this.completeUnbind(boundPortObject); - throw new Error('bindAsync operation cancelled by unbind call'); - } - const portNumber = await this.bindAddressList(addressList, boundPortObject); - if (boundPortObject.cancelled) { - this.completeUnbind(boundPortObject); - throw new Error('bindAsync operation cancelled by unbind call'); - } - return portNumber; - } - - private normalizePort(port: string): GrpcUri { - const initialPortUri = parseUri(port); - if (initialPortUri === null) { - throw new Error(`Could not parse port "${port}"`); - } - const portUri = mapUriDefaultScheme(initialPortUri); - if (portUri === null) { - throw new Error(`Could not get a default scheme for port "${port}"`); - } - return portUri; - } - - bindAsync( - port: string, - creds: ServerCredentials, - callback: (error: Error | null, port: number) => void - ): void { - if (this.shutdown) { - throw new Error('bindAsync called after shutdown'); - } - if (typeof port !== 'string') { - throw new TypeError('port must be a string'); - } - - if (creds === null || !(creds instanceof ServerCredentials)) { - throw new TypeError('creds must be a ServerCredentials object'); - } - - if (typeof callback !== 'function') { - throw new TypeError('callback must be a function'); - } - - this.trace('bindAsync port=' + port); - - const portUri = this.normalizePort(port); - - const deferredCallback = (error: Error | null, port: number) => { - process.nextTick(() => callback(error, port)); - }; - - /* First, if this port is already bound or that bind operation is in - * progress, use that result. */ - let boundPortObject = this.boundPorts.get(uriToString(portUri)); - if (boundPortObject) { - if (!creds._equals(boundPortObject.credentials)) { - deferredCallback( - new Error(`${port} already bound with incompatible credentials`), - 0 - ); - return; - } - /* If that operation has previously been cancelled by an unbind call, - * uncancel it. */ - boundPortObject.cancelled = false; - if (boundPortObject.completionPromise) { - boundPortObject.completionPromise.then( - portNum => callback(null, portNum), - error => callback(error as Error, 0) - ); - } else { - deferredCallback(null, boundPortObject.portNumber); - } - return; - } - boundPortObject = { - mapKey: uriToString(portUri), - originalUri: portUri, - completionPromise: null, - cancelled: false, - portNumber: 0, - credentials: creds, - listeningServers: new Set(), - }; - const splitPort = splitHostPort(portUri.path); - const completionPromise = this.bindPort(portUri, boundPortObject); - boundPortObject.completionPromise = completionPromise; - /* If the port number is 0, defer populating the map entry until after the - * bind operation completes and we have a specific port number. Otherwise, - * populate it immediately. */ - if (splitPort?.port === 0) { - completionPromise.then( - portNum => { - const finalUri: GrpcUri = { - scheme: portUri.scheme, - authority: portUri.authority, - path: combineHostPort({ host: splitPort.host, port: portNum }), - }; - boundPortObject!.mapKey = uriToString(finalUri); - boundPortObject!.completionPromise = null; - boundPortObject!.portNumber = portNum; - this.boundPorts.set(boundPortObject!.mapKey, boundPortObject!); - callback(null, portNum); - }, - error => { - callback(error, 0); - } - ); - } else { - this.boundPorts.set(boundPortObject.mapKey, boundPortObject); - completionPromise.then( - portNum => { - boundPortObject!.completionPromise = null; - boundPortObject!.portNumber = portNum; - callback(null, portNum); - }, - error => { - callback(error, 0); - } - ); - } - } - - private registerInjectorToChannelz() { - return registerChannelzSocket( - 'injector', - () => { - return { - localAddress: null, - remoteAddress: null, - security: null, - remoteName: null, - streamsStarted: 0, - streamsSucceeded: 0, - streamsFailed: 0, - messagesSent: 0, - messagesReceived: 0, - keepAlivesSent: 0, - lastLocalStreamCreatedTimestamp: null, - lastRemoteStreamCreatedTimestamp: null, - lastMessageSentTimestamp: null, - lastMessageReceivedTimestamp: null, - localFlowControlWindow: null, - remoteFlowControlWindow: null, - }; - }, - this.channelzEnabled - ); - } - - /** - * This API is experimental, so API stability is not guaranteed across minor versions. - * @param credentials - * @param channelzRef - * @returns - */ - protected experimentalCreateConnectionInjectorWithChannelzRef(credentials: ServerCredentials, channelzRef: SocketRef, ownsChannelzRef=false) { - if (credentials === null || !(credentials instanceof ServerCredentials)) { - throw new TypeError('creds must be a ServerCredentials object'); - } - if (this.channelzEnabled) { - this.listenerChildrenTracker.refChild(channelzRef); - } - const server = this.createHttp2Server(credentials); - const sessionsSet: Set = new Set(); - this.http2Servers.set(server, { - channelzRef: channelzRef, - sessions: sessionsSet, - ownsChannelzRef - }); - return { - injectConnection: (connection: Duplex) => { - server.emit('connection', connection); - }, - drain: (graceTimeMs: number) => { - for (const session of sessionsSet) { - this.closeSession(session); - } - setTimeout(() => { - for (const session of sessionsSet) { - session.destroy(http2.constants.NGHTTP2_CANCEL as any); - } - }, graceTimeMs).unref?.(); - }, - destroy: () => { - this.closeServer(server) - for (const session of sessionsSet) { - this.closeSession(session); - } - } - }; - } - - createConnectionInjector(credentials: ServerCredentials): ConnectionInjector { - if (credentials === null || !(credentials instanceof ServerCredentials)) { - throw new TypeError('creds must be a ServerCredentials object'); - } - const channelzRef = this.registerInjectorToChannelz(); - return this.experimentalCreateConnectionInjectorWithChannelzRef(credentials, channelzRef, true); - } - - private closeServer(server: AnyHttp2Server, callback?: () => void) { - this.trace( - 'Closing server with address ' + JSON.stringify(server.address()) - ); - const serverInfo = this.http2Servers.get(server); - server.close(() => { - if (serverInfo && serverInfo.ownsChannelzRef) { - this.listenerChildrenTracker.unrefChild(serverInfo.channelzRef); - unregisterChannelzRef(serverInfo.channelzRef); - } - this.http2Servers.delete(server); - callback?.(); - }); - } - - private closeSession( - session: http2.ServerHttp2Session, - callback?: () => void - ) { - this.trace('Closing session initiated by ' + session.socket?.remoteAddress); - const sessionInfo = this.sessions.get(session); - const closeCallback = () => { - if (sessionInfo) { - this.sessionChildrenTracker.unrefChild(sessionInfo.ref); - unregisterChannelzRef(sessionInfo.ref); - } - callback?.(); - }; - if (session.closed) { - queueMicrotask(closeCallback); - } else { - session.close(closeCallback); - } - } - - private completeUnbind(boundPortObject: BoundPort) { - for (const server of boundPortObject.listeningServers) { - const serverInfo = this.http2Servers.get(server); - this.closeServer(server, () => { - boundPortObject.listeningServers.delete(server); - }); - if (serverInfo) { - for (const session of serverInfo.sessions) { - this.closeSession(session); - } - } - } - this.boundPorts.delete(boundPortObject.mapKey); - } - - /** - * Unbind a previously bound port, or cancel an in-progress bindAsync - * operation. If port 0 was bound, only the actual bound port can be - * unbound. For example, if bindAsync was called with "localhost:0" and the - * bound port result was 54321, it can be unbound as "localhost:54321". - * @param port - */ - unbind(port: string): void { - this.trace('unbind port=' + port); - const portUri = this.normalizePort(port); - const splitPort = splitHostPort(portUri.path); - if (splitPort?.port === 0) { - throw new Error('Cannot unbind port 0'); - } - const boundPortObject = this.boundPorts.get(uriToString(portUri)); - if (boundPortObject) { - this.trace( - 'unbinding ' + - boundPortObject.mapKey + - ' originally bound as ' + - uriToString(boundPortObject.originalUri) - ); - /* If the bind operation is pending, the cancelled flag will trigger - * the unbind operation later. */ - if (boundPortObject.completionPromise) { - boundPortObject.cancelled = true; - } else { - this.completeUnbind(boundPortObject); - } - } - } - - /** - * Gracefully close all connections associated with a previously bound port. - * After the grace time, forcefully close all remaining open connections. - * - * If port 0 was bound, only the actual bound port can be - * drained. For example, if bindAsync was called with "localhost:0" and the - * bound port result was 54321, it can be drained as "localhost:54321". - * @param port - * @param graceTimeMs - * @returns - */ - drain(port: string, graceTimeMs: number): void { - this.trace('drain port=' + port + ' graceTimeMs=' + graceTimeMs); - const portUri = this.normalizePort(port); - const splitPort = splitHostPort(portUri.path); - if (splitPort?.port === 0) { - throw new Error('Cannot drain port 0'); - } - const boundPortObject = this.boundPorts.get(uriToString(portUri)); - if (!boundPortObject) { - return; - } - const allSessions: Set = new Set(); - for (const http2Server of boundPortObject.listeningServers) { - const serverEntry = this.http2Servers.get(http2Server); - if (serverEntry) { - for (const session of serverEntry.sessions) { - allSessions.add(session); - this.closeSession(session, () => { - allSessions.delete(session); - }); - } - } - } - /* After the grace time ends, send another goaway to all remaining sessions - * with the CANCEL code. */ - setTimeout(() => { - for (const session of allSessions) { - session.destroy(http2.constants.NGHTTP2_CANCEL as any); - } - }, graceTimeMs).unref?.(); - } - - forceShutdown(): void { - for (const boundPortObject of this.boundPorts.values()) { - boundPortObject.cancelled = true; - } - this.boundPorts.clear(); - // Close the server if it is still running. - for (const server of this.http2Servers.keys()) { - this.closeServer(server); - } - - // Always destroy any available sessions. It's possible that one or more - // tryShutdown() calls are in progress. Don't wait on them to finish. - this.sessions.forEach((channelzInfo, session) => { - this.closeSession(session); - // Cast NGHTTP2_CANCEL to any because TypeScript doesn't seem to - // recognize destroy(code) as a valid signature. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - session.destroy(http2.constants.NGHTTP2_CANCEL as any); - }); - this.sessions.clear(); - unregisterChannelzRef(this.channelzRef); - - this.shutdown = true; - } - - register( - name: string, - handler: HandleCall, - serialize: Serialize, - deserialize: Deserialize, - type: string - ): boolean { - if (this.handlers.has(name)) { - return false; - } - - this.handlers.set(name, { - func: handler, - serialize, - deserialize, - type, - path: name, - } as UntypedHandler); - return true; - } - - unregister(name: string): boolean { - return this.handlers.delete(name); - } - - /** - * @deprecated No longer needed as of version 1.10.x - */ - @deprecate( - 'Calling start() is no longer necessary. It can be safely omitted.' - ) - start(): void { - if ( - this.http2Servers.size === 0 || - [...this.http2Servers.keys()].every(server => !server.listening) - ) { - throw new Error('server must be bound in order to start'); - } - - if (this.started === true) { - throw new Error('server is already started'); - } - this.started = true; - } - - tryShutdown(callback: (error?: Error) => void): void { - const wrappedCallback = (error?: Error) => { - unregisterChannelzRef(this.channelzRef); - callback(error); - }; - let pendingChecks = 0; - - function maybeCallback(): void { - pendingChecks--; - - if (pendingChecks === 0) { - wrappedCallback(); - } - } - this.shutdown = true; - - for (const [serverKey, server] of this.http2Servers.entries()) { - pendingChecks++; - const serverString = server.channelzRef.name; - this.trace('Waiting for server ' + serverString + ' to close'); - this.closeServer(serverKey, () => { - this.trace('Server ' + serverString + ' finished closing'); - maybeCallback(); - }); - - for (const session of server.sessions.keys()) { - pendingChecks++; - const sessionString = session.socket?.remoteAddress; - this.trace('Waiting for session ' + sessionString + ' to close'); - this.closeSession(session, () => { - this.trace('Session ' + sessionString + ' finished closing'); - maybeCallback(); - }); - } - } - - if (pendingChecks === 0) { - wrappedCallback(); - } - } - - addHttp2Port(): never { - throw new Error('Not yet implemented'); - } - - /** - * Get the channelz reference object for this server. The returned value is - * garbage if channelz is disabled for this server. - * @returns - */ - getChannelzRef() { - return this.channelzRef; - } - - private _verifyContentType( - stream: http2.ServerHttp2Stream, - headers: http2.IncomingHttpHeaders - ): boolean { - const contentType = headers[http2.constants.HTTP2_HEADER_CONTENT_TYPE]; - - if ( - typeof contentType !== 'string' || - !contentType.startsWith('application/grpc') - ) { - stream.respond( - { - [http2.constants.HTTP2_HEADER_STATUS]: - http2.constants.HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - }, - { endStream: true } - ); - return false; - } - - return true; - } - - private _retrieveHandler(path: string): Handler | null { - serverCallTrace( - 'Received call to method ' + - path + - ' at address ' + - this.serverAddressString - ); - - const handler = this.handlers.get(path); - - if (handler === undefined) { - serverCallTrace( - 'No handler registered for method ' + - path + - '. Sending UNIMPLEMENTED status.' - ); - return null; - } - - return handler; - } - - private _respondWithError( - err: PartialStatusObject, - stream: http2.ServerHttp2Stream, - channelzSessionInfo: ChannelzSessionInfo | null = null - ) { - const trailersToSend = { - 'grpc-status': err.code ?? Status.INTERNAL, - 'grpc-message': err.details, - [http2.constants.HTTP2_HEADER_STATUS]: http2.constants.HTTP_STATUS_OK, - [http2.constants.HTTP2_HEADER_CONTENT_TYPE]: 'application/grpc+proto', - ...err.metadata?.toHttp2Headers(), - }; - stream.respond(trailersToSend, { endStream: true }); - - this.callTracker.addCallFailed(); - channelzSessionInfo?.streamTracker.addCallFailed(); - } - - private _channelzHandler( - extraInterceptors: ServerInterceptor[], - stream: http2.ServerHttp2Stream, - headers: http2.IncomingHttpHeaders - ) { - stream.once('error', (err: ServerErrorResponse) => { - /* We need an error handler to avoid uncaught error event exceptions, but - * there is nothing we can reasonably do here. Any error event should - * have a corresponding close event, which handles emitting the cancelled - * event. And the stream is now in a bad state, so we can't reasonably - * expect to be able to send an error over it. */ - }); - // for handling idle timeout - this.onStreamOpened(stream); - - const channelzSessionInfo = this.sessions.get( - stream.session as http2.ServerHttp2Session - ); - - this.callTracker.addCallStarted(); - channelzSessionInfo?.streamTracker.addCallStarted(); - - if (!this._verifyContentType(stream, headers)) { - this.callTracker.addCallFailed(); - channelzSessionInfo?.streamTracker.addCallFailed(); - return; - } - - const path = headers[HTTP2_HEADER_PATH] as string; - - const handler = this._retrieveHandler(path); - if (!handler) { - this._respondWithError( - getUnimplementedStatusResponse(path), - stream, - channelzSessionInfo - ); - return; - } - - const callEventTracker: CallEventTracker = { - addMessageSent: () => { - if (channelzSessionInfo) { - channelzSessionInfo.messagesSent += 1; - channelzSessionInfo.lastMessageSentTimestamp = new Date(); - } - }, - addMessageReceived: () => { - if (channelzSessionInfo) { - channelzSessionInfo.messagesReceived += 1; - channelzSessionInfo.lastMessageReceivedTimestamp = new Date(); - } - }, - onCallEnd: status => { - if (status.code === Status.OK) { - this.callTracker.addCallSucceeded(); - } else { - this.callTracker.addCallFailed(); - } - }, - onStreamEnd: success => { - if (channelzSessionInfo) { - if (success) { - channelzSessionInfo.streamTracker.addCallSucceeded(); - } else { - channelzSessionInfo.streamTracker.addCallFailed(); - } - } - }, - }; - - const call = getServerInterceptingCall( - [...extraInterceptors, ...this.interceptors], - stream, - headers, - callEventTracker, - handler, - this.options - ); - - if (!this._runHandlerForCall(call, handler)) { - this.callTracker.addCallFailed(); - channelzSessionInfo?.streamTracker.addCallFailed(); - - call.sendStatus({ - code: Status.INTERNAL, - details: `Unknown handler type: ${handler.type}`, - }); - } - } - - private _streamHandler( - extraInterceptors: ServerInterceptor[], - stream: http2.ServerHttp2Stream, - headers: http2.IncomingHttpHeaders - ) { - stream.once('error', (err: ServerErrorResponse) => { - /* We need an error handler to avoid uncaught error event exceptions, but - * there is nothing we can reasonably do here. Any error event should - * have a corresponding close event, which handles emitting the cancelled - * event. And the stream is now in a bad state, so we can't reasonably - * expect to be able to send an error over it. */ - }); - // for handling idle timeout - this.onStreamOpened(stream); - - if (this._verifyContentType(stream, headers) !== true) { - return; - } - - const path = headers[HTTP2_HEADER_PATH] as string; - - const handler = this._retrieveHandler(path); - if (!handler) { - this._respondWithError( - getUnimplementedStatusResponse(path), - stream, - null - ); - return; - } - - const call = getServerInterceptingCall( - [...extraInterceptors, ...this.interceptors], - stream, - headers, - null, - handler, - this.options - ); - - if (!this._runHandlerForCall(call, handler)) { - call.sendStatus({ - code: Status.INTERNAL, - details: `Unknown handler type: ${handler.type}`, - }); - } - } - - private _runHandlerForCall( - call: ServerInterceptingCallInterface, - handler: - | UntypedUnaryHandler - | UntypedClientStreamingHandler - | UntypedServerStreamingHandler - | UntypedBidiStreamingHandler - ): boolean { - const { type } = handler; - if (type === 'unary') { - handleUnary(call, handler); - } else if (type === 'clientStream') { - handleClientStreaming(call, handler); - } else if (type === 'serverStream') { - handleServerStreaming(call, handler); - } else if (type === 'bidi') { - handleBidiStreaming(call, handler); - } else { - return false; - } - - return true; - } - - private _setupHandlers( - http2Server: http2.Http2Server | http2.Http2SecureServer, - extraInterceptors: ServerInterceptor[] - ): void { - if (http2Server === null) { - return; - } - - const serverAddress = http2Server.address(); - let serverAddressString = 'null'; - if (serverAddress) { - if (typeof serverAddress === 'string') { - serverAddressString = serverAddress; - } else { - serverAddressString = serverAddress.address + ':' + serverAddress.port; - } - } - this.serverAddressString = serverAddressString; - - const handler = this.channelzEnabled - ? this._channelzHandler - : this._streamHandler; - - const sessionHandler = this.channelzEnabled - ? this._channelzSessionHandler(http2Server) - : this._sessionHandler(http2Server); - - http2Server.on('stream', handler.bind(this, extraInterceptors)); - http2Server.on('session', sessionHandler); - } - - private _sessionHandler( - http2Server: http2.Http2Server | http2.Http2SecureServer - ) { - return (session: http2.ServerHttp2Session) => { - this.http2Servers.get(http2Server)?.sessions.add(session); - - let connectionAgeTimer: NodeJS.Timeout | null = null; - let connectionAgeGraceTimer: NodeJS.Timeout | null = null; - let keepaliveTimer: NodeJS.Timeout | null = null; - let sessionClosedByServer = false; - - const idleTimeoutObj = this.enableIdleTimeout(session); - - if (this.maxConnectionAgeMs !== UNLIMITED_CONNECTION_AGE_MS) { - // Apply a random jitter within a +/-10% range - const jitterMagnitude = this.maxConnectionAgeMs / 10; - const jitter = Math.random() * jitterMagnitude * 2 - jitterMagnitude; - - connectionAgeTimer = setTimeout(() => { - sessionClosedByServer = true; - - this.trace( - 'Connection dropped by max connection age: ' + - session.socket?.remoteAddress - ); - - try { - session.goaway( - http2.constants.NGHTTP2_NO_ERROR, - ~(1 << 31), - kMaxAge - ); - } catch (e) { - // The goaway can't be sent because the session is already closed - session.destroy(); - return; - } - session.close(); - - /* Allow a grace period after sending the GOAWAY before forcibly - * closing the connection. */ - if (this.maxConnectionAgeGraceMs !== UNLIMITED_CONNECTION_AGE_MS) { - connectionAgeGraceTimer = setTimeout(() => { - session.destroy(); - }, this.maxConnectionAgeGraceMs); - connectionAgeGraceTimer.unref?.(); - } - }, this.maxConnectionAgeMs + jitter); - connectionAgeTimer.unref?.(); - } - - const clearKeepaliveTimeout = () => { - if (keepaliveTimer) { - clearTimeout(keepaliveTimer); - keepaliveTimer = null; - } - }; - - const canSendPing = () => { - return ( - !session.destroyed && - this.keepaliveTimeMs < KEEPALIVE_MAX_TIME_MS && - this.keepaliveTimeMs > 0 - ); - }; - - /* eslint-disable-next-line prefer-const */ - let sendPing: () => void; // hoisted for use in maybeStartKeepalivePingTimer - - const maybeStartKeepalivePingTimer = () => { - if (!canSendPing()) { - return; - } - this.keepaliveTrace( - 'Starting keepalive timer for ' + this.keepaliveTimeMs + 'ms' - ); - keepaliveTimer = setTimeout(() => { - clearKeepaliveTimeout(); - sendPing(); - }, this.keepaliveTimeMs); - keepaliveTimer.unref?.(); - }; - - sendPing = () => { - if (!canSendPing()) { - return; - } - this.keepaliveTrace( - 'Sending ping with timeout ' + this.keepaliveTimeoutMs + 'ms' - ); - let pingSendError = ''; - try { - const pingSentSuccessfully = session.ping( - (err: Error | null, duration: number, payload: Buffer) => { - clearKeepaliveTimeout(); - if (err) { - this.keepaliveTrace('Ping failed with error: ' + err.message); - sessionClosedByServer = true; - session.destroy(); - } else { - this.keepaliveTrace('Received ping response'); - maybeStartKeepalivePingTimer(); - } - } - ); - if (!pingSentSuccessfully) { - pingSendError = 'Ping returned false'; - } - } catch (e) { - // grpc/grpc-node#2139 - pingSendError = - (e instanceof Error ? e.message : '') || 'Unknown error'; - } - - if (pingSendError) { - this.keepaliveTrace('Ping send failed: ' + pingSendError); - this.trace( - 'Connection dropped due to ping send error: ' + pingSendError - ); - sessionClosedByServer = true; - session.destroy(); - return; - } - - keepaliveTimer = setTimeout(() => { - clearKeepaliveTimeout(); - this.keepaliveTrace('Ping timeout passed without response'); - this.trace('Connection dropped by keepalive timeout'); - sessionClosedByServer = true; - session.destroy(); - }, this.keepaliveTimeoutMs); - keepaliveTimer.unref?.(); - }; - - maybeStartKeepalivePingTimer(); - - session.on('close', () => { - if (!sessionClosedByServer) { - this.trace( - `Connection dropped by client ${session.socket?.remoteAddress}` - ); - } - - if (connectionAgeTimer) { - clearTimeout(connectionAgeTimer); - } - - if (connectionAgeGraceTimer) { - clearTimeout(connectionAgeGraceTimer); - } - - clearKeepaliveTimeout(); - - if (idleTimeoutObj !== null) { - clearTimeout(idleTimeoutObj.timeout); - this.sessionIdleTimeouts.delete(session); - } - - this.http2Servers.get(http2Server)?.sessions.delete(session); - }); - }; - } - - private _channelzSessionHandler( - http2Server: http2.Http2Server | http2.Http2SecureServer - ) { - return (session: http2.ServerHttp2Session) => { - const channelzRef = registerChannelzSocket( - session.socket?.remoteAddress ?? 'unknown', - this.getChannelzSessionInfo.bind(this, session), - this.channelzEnabled - ); - - const channelzSessionInfo: ChannelzSessionInfo = { - ref: channelzRef, - streamTracker: new ChannelzCallTracker(), - messagesSent: 0, - messagesReceived: 0, - keepAlivesSent: 0, - lastMessageSentTimestamp: null, - lastMessageReceivedTimestamp: null, - }; - - this.http2Servers.get(http2Server)?.sessions.add(session); - this.sessions.set(session, channelzSessionInfo); - const clientAddress = `${session.socket.remoteAddress}:${session.socket.remotePort}`; - - this.channelzTrace.addTrace( - 'CT_INFO', - 'Connection established by client ' + clientAddress - ); - this.trace('Connection established by client ' + clientAddress); - this.sessionChildrenTracker.refChild(channelzRef); - - let connectionAgeTimer: NodeJS.Timeout | null = null; - let connectionAgeGraceTimer: NodeJS.Timeout | null = null; - let keepaliveTimeout: NodeJS.Timeout | null = null; - let sessionClosedByServer = false; - - const idleTimeoutObj = this.enableIdleTimeout(session); - - if (this.maxConnectionAgeMs !== UNLIMITED_CONNECTION_AGE_MS) { - // Apply a random jitter within a +/-10% range - const jitterMagnitude = this.maxConnectionAgeMs / 10; - const jitter = Math.random() * jitterMagnitude * 2 - jitterMagnitude; - - connectionAgeTimer = setTimeout(() => { - sessionClosedByServer = true; - this.channelzTrace.addTrace( - 'CT_INFO', - 'Connection dropped by max connection age from ' + clientAddress - ); - - try { - session.goaway( - http2.constants.NGHTTP2_NO_ERROR, - ~(1 << 31), - kMaxAge - ); - } catch (e) { - // The goaway can't be sent because the session is already closed - session.destroy(); - return; - } - session.close(); - - /* Allow a grace period after sending the GOAWAY before forcibly - * closing the connection. */ - if (this.maxConnectionAgeGraceMs !== UNLIMITED_CONNECTION_AGE_MS) { - connectionAgeGraceTimer = setTimeout(() => { - session.destroy(); - }, this.maxConnectionAgeGraceMs); - connectionAgeGraceTimer.unref?.(); - } - }, this.maxConnectionAgeMs + jitter); - connectionAgeTimer.unref?.(); - } - - const clearKeepaliveTimeout = () => { - if (keepaliveTimeout) { - clearTimeout(keepaliveTimeout); - keepaliveTimeout = null; - } - }; - - const canSendPing = () => { - return ( - !session.destroyed && - this.keepaliveTimeMs < KEEPALIVE_MAX_TIME_MS && - this.keepaliveTimeMs > 0 - ); - }; - - /* eslint-disable-next-line prefer-const */ - let sendPing: () => void; // hoisted for use in maybeStartKeepalivePingTimer - - const maybeStartKeepalivePingTimer = () => { - if (!canSendPing()) { - return; - } - this.keepaliveTrace( - 'Starting keepalive timer for ' + this.keepaliveTimeMs + 'ms' - ); - keepaliveTimeout = setTimeout(() => { - clearKeepaliveTimeout(); - sendPing(); - }, this.keepaliveTimeMs); - keepaliveTimeout.unref?.(); - }; - - sendPing = () => { - if (!canSendPing()) { - return; - } - this.keepaliveTrace( - 'Sending ping with timeout ' + this.keepaliveTimeoutMs + 'ms' - ); - let pingSendError = ''; - try { - const pingSentSuccessfully = session.ping( - (err: Error | null, duration: number, payload: Buffer) => { - clearKeepaliveTimeout(); - if (err) { - this.keepaliveTrace('Ping failed with error: ' + err.message); - this.channelzTrace.addTrace( - 'CT_INFO', - 'Connection dropped due to error of a ping frame ' + - err.message + - ' return in ' + - duration - ); - sessionClosedByServer = true; - session.destroy(); - } else { - this.keepaliveTrace('Received ping response'); - maybeStartKeepalivePingTimer(); - } - } - ); - if (!pingSentSuccessfully) { - pingSendError = 'Ping returned false'; - } - } catch (e) { - // grpc/grpc-node#2139 - pingSendError = - (e instanceof Error ? e.message : '') || 'Unknown error'; - } - - if (pingSendError) { - this.keepaliveTrace('Ping send failed: ' + pingSendError); - this.channelzTrace.addTrace( - 'CT_INFO', - 'Connection dropped due to ping send error: ' + pingSendError - ); - sessionClosedByServer = true; - session.destroy(); - return; - } - - channelzSessionInfo.keepAlivesSent += 1; - - keepaliveTimeout = setTimeout(() => { - clearKeepaliveTimeout(); - this.keepaliveTrace('Ping timeout passed without response'); - this.channelzTrace.addTrace( - 'CT_INFO', - 'Connection dropped by keepalive timeout from ' + clientAddress - ); - sessionClosedByServer = true; - session.destroy(); - }, this.keepaliveTimeoutMs); - keepaliveTimeout.unref?.(); - }; - - maybeStartKeepalivePingTimer(); - - session.on('close', () => { - if (!sessionClosedByServer) { - this.channelzTrace.addTrace( - 'CT_INFO', - 'Connection dropped by client ' + clientAddress - ); - } - - this.sessionChildrenTracker.unrefChild(channelzRef); - unregisterChannelzRef(channelzRef); - - if (connectionAgeTimer) { - clearTimeout(connectionAgeTimer); - } - - if (connectionAgeGraceTimer) { - clearTimeout(connectionAgeGraceTimer); - } - - clearKeepaliveTimeout(); - - if (idleTimeoutObj !== null) { - clearTimeout(idleTimeoutObj.timeout); - this.sessionIdleTimeouts.delete(session); - } - - this.http2Servers.get(http2Server)?.sessions.delete(session); - this.sessions.delete(session); - }); - }; - } - - private enableIdleTimeout( - session: http2.ServerHttp2Session - ): SessionIdleTimeoutTracker | null { - if (this.sessionIdleTimeout >= MAX_CONNECTION_IDLE_MS) { - return null; - } - - const idleTimeoutObj: SessionIdleTimeoutTracker = { - activeStreams: 0, - lastIdle: Date.now(), - onClose: this.onStreamClose.bind(this, session), - timeout: setTimeout( - this.onIdleTimeout, - this.sessionIdleTimeout, - this, - session - ), - }; - idleTimeoutObj.timeout.unref?.(); - this.sessionIdleTimeouts.set(session, idleTimeoutObj); - - const { socket } = session; - this.trace( - 'Enable idle timeout for ' + - socket.remoteAddress + - ':' + - socket.remotePort - ); - - return idleTimeoutObj; - } - - private onIdleTimeout( - this: undefined, - ctx: Server, - session: http2.ServerHttp2Session - ) { - const { socket } = session; - const sessionInfo = ctx.sessionIdleTimeouts.get(session); - - // if it is called while we have activeStreams - timer will not be rescheduled - // until last active stream is closed, then it will call .refresh() on the timer - // important part is to not clearTimeout(timer) or it becomes unusable - // for future refreshes - if ( - sessionInfo !== undefined && - sessionInfo.activeStreams === 0 - ) { - if (Date.now() - sessionInfo.lastIdle >= ctx.sessionIdleTimeout) { - ctx.trace( - 'Session idle timeout triggered for ' + - socket?.remoteAddress + - ':' + - socket?.remotePort + - ' last idle at ' + - sessionInfo.lastIdle - ); - - ctx.closeSession(session); - } else { - sessionInfo.timeout.refresh(); - } - } - } - - private onStreamOpened(stream: http2.ServerHttp2Stream) { - const session = stream.session as http2.ServerHttp2Session; - - const idleTimeoutObj = this.sessionIdleTimeouts.get(session); - if (idleTimeoutObj) { - idleTimeoutObj.activeStreams += 1; - stream.once('close', idleTimeoutObj.onClose); - } - } - - private onStreamClose(session: http2.ServerHttp2Session) { - const idleTimeoutObj = this.sessionIdleTimeouts.get(session); - - if (idleTimeoutObj) { - idleTimeoutObj.activeStreams -= 1; - if (idleTimeoutObj.activeStreams === 0) { - idleTimeoutObj.lastIdle = Date.now(); - idleTimeoutObj.timeout.refresh(); - - this.trace( - 'Session onStreamClose' + - session.socket?.remoteAddress + - ':' + - session.socket?.remotePort + - ' at ' + - idleTimeoutObj.lastIdle - ); - } - } - } -} - -async function handleUnary( - call: ServerInterceptingCallInterface, - handler: UnaryHandler -): Promise { - let stream: ServerUnaryCall; - - function respond( - err: ServerErrorResponse | ServerStatusResponse | null, - value?: ResponseType | null, - trailer?: Metadata, - flags?: number - ) { - if (err) { - call.sendStatus(serverErrorToStatus(err, trailer)); - return; - } - call.sendMessage(value, () => { - call.sendStatus({ - code: Status.OK, - details: 'OK', - metadata: trailer ?? null, - }); - }); - } - - let requestMetadata: Metadata; - let requestMessage: RequestType | null = null; - call.start({ - onReceiveMetadata(metadata) { - requestMetadata = metadata; - call.startRead(); - }, - onReceiveMessage(message) { - if (requestMessage) { - call.sendStatus({ - code: Status.UNIMPLEMENTED, - details: `Received a second request message for server streaming method ${handler.path}`, - metadata: null, - }); - return; - } - requestMessage = message; - call.startRead(); - }, - onReceiveHalfClose() { - if (!requestMessage) { - call.sendStatus({ - code: Status.UNIMPLEMENTED, - details: `Received no request message for server streaming method ${handler.path}`, - metadata: null, - }); - return; - } - stream = new ServerWritableStreamImpl( - handler.path, - call, - requestMetadata, - requestMessage - ); - try { - handler.func(stream, respond); - } catch (err) { - call.sendStatus({ - code: Status.UNKNOWN, - details: `Server method handler threw error ${ - (err as Error).message - }`, - metadata: null, - }); - } - }, - onCancel() { - if (stream) { - stream.cancelled = true; - stream.emit('cancelled', 'cancelled'); - } - }, - }); -} - -function handleClientStreaming( - call: ServerInterceptingCallInterface, - handler: ClientStreamingHandler -): void { - let stream: ServerReadableStream; - - function respond( - err: ServerErrorResponse | ServerStatusResponse | null, - value?: ResponseType | null, - trailer?: Metadata, - flags?: number - ) { - if (err) { - call.sendStatus(serverErrorToStatus(err, trailer)); - return; - } - call.sendMessage(value, () => { - call.sendStatus({ - code: Status.OK, - details: 'OK', - metadata: trailer ?? null, - }); - }); - } - - call.start({ - onReceiveMetadata(metadata) { - stream = new ServerDuplexStreamImpl(handler.path, call, metadata); - try { - handler.func(stream, respond); - } catch (err) { - call.sendStatus({ - code: Status.UNKNOWN, - details: `Server method handler threw error ${ - (err as Error).message - }`, - metadata: null, - }); - } - }, - onReceiveMessage(message) { - stream.push(message); - }, - onReceiveHalfClose() { - stream.push(null); - }, - onCancel() { - if (stream) { - stream.cancelled = true; - stream.emit('cancelled', 'cancelled'); - stream.destroy(); - } - }, - }); -} - -function handleServerStreaming( - call: ServerInterceptingCallInterface, - handler: ServerStreamingHandler -): void { - let stream: ServerWritableStream; - - let requestMetadata: Metadata; - let requestMessage: RequestType | null = null; - call.start({ - onReceiveMetadata(metadata) { - requestMetadata = metadata; - call.startRead(); - }, - onReceiveMessage(message) { - if (requestMessage) { - call.sendStatus({ - code: Status.UNIMPLEMENTED, - details: `Received a second request message for server streaming method ${handler.path}`, - metadata: null, - }); - return; - } - requestMessage = message; - call.startRead(); - }, - onReceiveHalfClose() { - if (!requestMessage) { - call.sendStatus({ - code: Status.UNIMPLEMENTED, - details: `Received no request message for server streaming method ${handler.path}`, - metadata: null, - }); - return; - } - stream = new ServerWritableStreamImpl( - handler.path, - call, - requestMetadata, - requestMessage - ); - try { - handler.func(stream); - } catch (err) { - call.sendStatus({ - code: Status.UNKNOWN, - details: `Server method handler threw error ${ - (err as Error).message - }`, - metadata: null, - }); - } - }, - onCancel() { - if (stream) { - stream.cancelled = true; - stream.emit('cancelled', 'cancelled'); - stream.destroy(); - } - }, - }); -} - -function handleBidiStreaming( - call: ServerInterceptingCallInterface, - handler: BidiStreamingHandler -): void { - let stream: ServerDuplexStream; - - call.start({ - onReceiveMetadata(metadata) { - stream = new ServerDuplexStreamImpl(handler.path, call, metadata); - try { - handler.func(stream); - } catch (err) { - call.sendStatus({ - code: Status.UNKNOWN, - details: `Server method handler threw error ${ - (err as Error).message - }`, - metadata: null, - }); - } - }, - onReceiveMessage(message) { - stream.push(message); - }, - onReceiveHalfClose() { - stream.push(null); - }, - onCancel() { - if (stream) { - stream.cancelled = true; - stream.emit('cancelled', 'cancelled'); - stream.destroy(); - } - }, - }); -} diff --git a/node_modules/@grpc/grpc-js/src/service-config.ts b/node_modules/@grpc/grpc-js/src/service-config.ts deleted file mode 100644 index db1e30e..0000000 --- a/node_modules/@grpc/grpc-js/src/service-config.ts +++ /dev/null @@ -1,564 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/* This file implements gRFC A2 and the service config spec: - * https://github.com/grpc/proposal/blob/master/A2-service-configs-in-dns.md - * https://github.com/grpc/grpc/blob/master/doc/service_config.md. Each - * function here takes an object with unknown structure and returns its - * specific object type if the input has the right structure, and throws an - * error otherwise. */ - -/* The any type is purposely used here. All functions validate their input at - * runtime */ -/* eslint-disable @typescript-eslint/no-explicit-any */ - -import * as os from 'os'; -import { Status } from './constants'; -import { Duration } from './duration'; - -export interface MethodConfigName { - service?: string; - method?: string; -} - -export interface RetryPolicy { - maxAttempts: number; - initialBackoff: string; - maxBackoff: string; - backoffMultiplier: number; - retryableStatusCodes: (Status | string)[]; -} - -export interface HedgingPolicy { - maxAttempts: number; - hedgingDelay?: string; - nonFatalStatusCodes?: (Status | string)[]; -} - -export interface MethodConfig { - name: MethodConfigName[]; - waitForReady?: boolean; - timeout?: Duration; - maxRequestBytes?: number; - maxResponseBytes?: number; - retryPolicy?: RetryPolicy; - hedgingPolicy?: HedgingPolicy; -} - -export interface RetryThrottling { - maxTokens: number; - tokenRatio: number; -} - -export interface LoadBalancingConfig { - [key: string]: object; -} - -export interface ServiceConfig { - loadBalancingPolicy?: string; - loadBalancingConfig: LoadBalancingConfig[]; - methodConfig: MethodConfig[]; - retryThrottling?: RetryThrottling; -} - -export interface ServiceConfigCanaryConfig { - clientLanguage?: string[]; - percentage?: number; - clientHostname?: string[]; - serviceConfig: ServiceConfig; -} - -/** - * Recognizes a number with up to 9 digits after the decimal point, followed by - * an "s", representing a number of seconds. - */ -const DURATION_REGEX = /^\d+(\.\d{1,9})?s$/; - -/** - * Client language name used for determining whether this client matches a - * `ServiceConfigCanaryConfig`'s `clientLanguage` list. - */ -const CLIENT_LANGUAGE_STRING = 'node'; - -function validateName(obj: any): MethodConfigName { - // In this context, and unset field and '' are considered the same - if ('service' in obj && obj.service !== '') { - if (typeof obj.service !== 'string') { - throw new Error( - `Invalid method config name: invalid service: expected type string, got ${typeof obj.service}` - ); - } - if ('method' in obj && obj.method !== '') { - if (typeof obj.method !== 'string') { - throw new Error( - `Invalid method config name: invalid method: expected type string, got ${typeof obj.service}` - ); - } - return { - service: obj.service, - method: obj.method, - }; - } else { - return { - service: obj.service, - }; - } - } else { - if ('method' in obj && obj.method !== undefined) { - throw new Error( - `Invalid method config name: method set with empty or unset service` - ); - } - return {}; - } -} - -function validateRetryPolicy(obj: any): RetryPolicy { - if ( - !('maxAttempts' in obj) || - !Number.isInteger(obj.maxAttempts) || - obj.maxAttempts < 2 - ) { - throw new Error( - 'Invalid method config retry policy: maxAttempts must be an integer at least 2' - ); - } - if ( - !('initialBackoff' in obj) || - typeof obj.initialBackoff !== 'string' || - !DURATION_REGEX.test(obj.initialBackoff) - ) { - throw new Error( - 'Invalid method config retry policy: initialBackoff must be a string consisting of a positive integer or decimal followed by s' - ); - } - if ( - !('maxBackoff' in obj) || - typeof obj.maxBackoff !== 'string' || - !DURATION_REGEX.test(obj.maxBackoff) - ) { - throw new Error( - 'Invalid method config retry policy: maxBackoff must be a string consisting of a positive integer or decimal followed by s' - ); - } - if ( - !('backoffMultiplier' in obj) || - typeof obj.backoffMultiplier !== 'number' || - obj.backoffMultiplier <= 0 - ) { - throw new Error( - 'Invalid method config retry policy: backoffMultiplier must be a number greater than 0' - ); - } - if ( - !('retryableStatusCodes' in obj && Array.isArray(obj.retryableStatusCodes)) - ) { - throw new Error( - 'Invalid method config retry policy: retryableStatusCodes is required' - ); - } - if (obj.retryableStatusCodes.length === 0) { - throw new Error( - 'Invalid method config retry policy: retryableStatusCodes must be non-empty' - ); - } - for (const value of obj.retryableStatusCodes) { - if (typeof value === 'number') { - if (!Object.values(Status).includes(value)) { - throw new Error( - 'Invalid method config retry policy: retryableStatusCodes value not in status code range' - ); - } - } else if (typeof value === 'string') { - if (!Object.values(Status).includes(value.toUpperCase())) { - throw new Error( - 'Invalid method config retry policy: retryableStatusCodes value not a status code name' - ); - } - } else { - throw new Error( - 'Invalid method config retry policy: retryableStatusCodes value must be a string or number' - ); - } - } - return { - maxAttempts: obj.maxAttempts, - initialBackoff: obj.initialBackoff, - maxBackoff: obj.maxBackoff, - backoffMultiplier: obj.backoffMultiplier, - retryableStatusCodes: obj.retryableStatusCodes, - }; -} - -function validateHedgingPolicy(obj: any): HedgingPolicy { - if ( - !('maxAttempts' in obj) || - !Number.isInteger(obj.maxAttempts) || - obj.maxAttempts < 2 - ) { - throw new Error( - 'Invalid method config hedging policy: maxAttempts must be an integer at least 2' - ); - } - if ( - 'hedgingDelay' in obj && - (typeof obj.hedgingDelay !== 'string' || - !DURATION_REGEX.test(obj.hedgingDelay)) - ) { - throw new Error( - 'Invalid method config hedging policy: hedgingDelay must be a string consisting of a positive integer followed by s' - ); - } - if ('nonFatalStatusCodes' in obj && Array.isArray(obj.nonFatalStatusCodes)) { - for (const value of obj.nonFatalStatusCodes) { - if (typeof value === 'number') { - if (!Object.values(Status).includes(value)) { - throw new Error( - 'Invalid method config hedging policy: nonFatalStatusCodes value not in status code range' - ); - } - } else if (typeof value === 'string') { - if (!Object.values(Status).includes(value.toUpperCase())) { - throw new Error( - 'Invalid method config hedging policy: nonFatalStatusCodes value not a status code name' - ); - } - } else { - throw new Error( - 'Invalid method config hedging policy: nonFatalStatusCodes value must be a string or number' - ); - } - } - } - const result: HedgingPolicy = { - maxAttempts: obj.maxAttempts, - }; - if (obj.hedgingDelay) { - result.hedgingDelay = obj.hedgingDelay; - } - if (obj.nonFatalStatusCodes) { - result.nonFatalStatusCodes = obj.nonFatalStatusCodes; - } - return result; -} - -function validateMethodConfig(obj: any): MethodConfig { - const result: MethodConfig = { - name: [], - }; - if (!('name' in obj) || !Array.isArray(obj.name)) { - throw new Error('Invalid method config: invalid name array'); - } - for (const name of obj.name) { - result.name.push(validateName(name)); - } - if ('waitForReady' in obj) { - if (typeof obj.waitForReady !== 'boolean') { - throw new Error('Invalid method config: invalid waitForReady'); - } - result.waitForReady = obj.waitForReady; - } - if ('timeout' in obj) { - if (typeof obj.timeout === 'object') { - if ( - !('seconds' in obj.timeout) || - !(typeof obj.timeout.seconds === 'number') - ) { - throw new Error('Invalid method config: invalid timeout.seconds'); - } - if ( - !('nanos' in obj.timeout) || - !(typeof obj.timeout.nanos === 'number') - ) { - throw new Error('Invalid method config: invalid timeout.nanos'); - } - result.timeout = obj.timeout; - } else if ( - typeof obj.timeout === 'string' && - DURATION_REGEX.test(obj.timeout) - ) { - const timeoutParts = obj.timeout - .substring(0, obj.timeout.length - 1) - .split('.'); - result.timeout = { - seconds: timeoutParts[0] | 0, - nanos: (timeoutParts[1] ?? 0) | 0, - }; - } else { - throw new Error('Invalid method config: invalid timeout'); - } - } - if ('maxRequestBytes' in obj) { - if (typeof obj.maxRequestBytes !== 'number') { - throw new Error('Invalid method config: invalid maxRequestBytes'); - } - result.maxRequestBytes = obj.maxRequestBytes; - } - if ('maxResponseBytes' in obj) { - if (typeof obj.maxResponseBytes !== 'number') { - throw new Error('Invalid method config: invalid maxRequestBytes'); - } - result.maxResponseBytes = obj.maxResponseBytes; - } - if ('retryPolicy' in obj) { - if ('hedgingPolicy' in obj) { - throw new Error( - 'Invalid method config: retryPolicy and hedgingPolicy cannot both be specified' - ); - } else { - result.retryPolicy = validateRetryPolicy(obj.retryPolicy); - } - } else if ('hedgingPolicy' in obj) { - result.hedgingPolicy = validateHedgingPolicy(obj.hedgingPolicy); - } - return result; -} - -export function validateRetryThrottling(obj: any): RetryThrottling { - if ( - !('maxTokens' in obj) || - typeof obj.maxTokens !== 'number' || - obj.maxTokens <= 0 || - obj.maxTokens > 1000 - ) { - throw new Error( - 'Invalid retryThrottling: maxTokens must be a number in (0, 1000]' - ); - } - if ( - !('tokenRatio' in obj) || - typeof obj.tokenRatio !== 'number' || - obj.tokenRatio <= 0 - ) { - throw new Error( - 'Invalid retryThrottling: tokenRatio must be a number greater than 0' - ); - } - return { - maxTokens: +(obj.maxTokens as number).toFixed(3), - tokenRatio: +(obj.tokenRatio as number).toFixed(3), - }; -} - -function validateLoadBalancingConfig(obj: any): LoadBalancingConfig { - if (!(typeof obj === 'object' && obj !== null)) { - throw new Error( - `Invalid loadBalancingConfig: unexpected type ${typeof obj}` - ); - } - const keys = Object.keys(obj); - if (keys.length > 1) { - throw new Error( - `Invalid loadBalancingConfig: unexpected multiple keys ${keys}` - ); - } - if (keys.length === 0) { - throw new Error( - 'Invalid loadBalancingConfig: load balancing policy name required' - ); - } - return { - [keys[0]]: obj[keys[0]], - }; -} - -export function validateServiceConfig(obj: any): ServiceConfig { - const result: ServiceConfig = { - loadBalancingConfig: [], - methodConfig: [], - }; - if ('loadBalancingPolicy' in obj) { - if (typeof obj.loadBalancingPolicy === 'string') { - result.loadBalancingPolicy = obj.loadBalancingPolicy; - } else { - throw new Error('Invalid service config: invalid loadBalancingPolicy'); - } - } - if ('loadBalancingConfig' in obj) { - if (Array.isArray(obj.loadBalancingConfig)) { - for (const config of obj.loadBalancingConfig) { - result.loadBalancingConfig.push(validateLoadBalancingConfig(config)); - } - } else { - throw new Error('Invalid service config: invalid loadBalancingConfig'); - } - } - if ('methodConfig' in obj) { - if (Array.isArray(obj.methodConfig)) { - for (const methodConfig of obj.methodConfig) { - result.methodConfig.push(validateMethodConfig(methodConfig)); - } - } - } - if ('retryThrottling' in obj) { - result.retryThrottling = validateRetryThrottling(obj.retryThrottling); - } - // Validate method name uniqueness - const seenMethodNames: MethodConfigName[] = []; - for (const methodConfig of result.methodConfig) { - for (const name of methodConfig.name) { - for (const seenName of seenMethodNames) { - if ( - name.service === seenName.service && - name.method === seenName.method - ) { - throw new Error( - `Invalid service config: duplicate name ${name.service}/${name.method}` - ); - } - } - seenMethodNames.push(name); - } - } - return result; -} - -function validateCanaryConfig(obj: any): ServiceConfigCanaryConfig { - if (!('serviceConfig' in obj)) { - throw new Error('Invalid service config choice: missing service config'); - } - const result: ServiceConfigCanaryConfig = { - serviceConfig: validateServiceConfig(obj.serviceConfig), - }; - if ('clientLanguage' in obj) { - if (Array.isArray(obj.clientLanguage)) { - result.clientLanguage = []; - for (const lang of obj.clientLanguage) { - if (typeof lang === 'string') { - result.clientLanguage.push(lang); - } else { - throw new Error( - 'Invalid service config choice: invalid clientLanguage' - ); - } - } - } else { - throw new Error('Invalid service config choice: invalid clientLanguage'); - } - } - if ('clientHostname' in obj) { - if (Array.isArray(obj.clientHostname)) { - result.clientHostname = []; - for (const lang of obj.clientHostname) { - if (typeof lang === 'string') { - result.clientHostname.push(lang); - } else { - throw new Error( - 'Invalid service config choice: invalid clientHostname' - ); - } - } - } else { - throw new Error('Invalid service config choice: invalid clientHostname'); - } - } - if ('percentage' in obj) { - if ( - typeof obj.percentage === 'number' && - 0 <= obj.percentage && - obj.percentage <= 100 - ) { - result.percentage = obj.percentage; - } else { - throw new Error('Invalid service config choice: invalid percentage'); - } - } - // Validate that no unexpected fields are present - const allowedFields = [ - 'clientLanguage', - 'percentage', - 'clientHostname', - 'serviceConfig', - ]; - for (const field in obj) { - if (!allowedFields.includes(field)) { - throw new Error( - `Invalid service config choice: unexpected field ${field}` - ); - } - } - return result; -} - -function validateAndSelectCanaryConfig( - obj: any, - percentage: number -): ServiceConfig { - if (!Array.isArray(obj)) { - throw new Error('Invalid service config list'); - } - for (const config of obj) { - const validatedConfig = validateCanaryConfig(config); - /* For each field, we check if it is present, then only discard the - * config if the field value does not match the current client */ - if ( - typeof validatedConfig.percentage === 'number' && - percentage > validatedConfig.percentage - ) { - continue; - } - if (Array.isArray(validatedConfig.clientHostname)) { - let hostnameMatched = false; - for (const hostname of validatedConfig.clientHostname) { - if (hostname === os.hostname()) { - hostnameMatched = true; - } - } - if (!hostnameMatched) { - continue; - } - } - if (Array.isArray(validatedConfig.clientLanguage)) { - let languageMatched = false; - for (const language of validatedConfig.clientLanguage) { - if (language === CLIENT_LANGUAGE_STRING) { - languageMatched = true; - } - } - if (!languageMatched) { - continue; - } - } - return validatedConfig.serviceConfig; - } - throw new Error('No matching service config found'); -} - -/** - * Find the "grpc_config" record among the TXT records, parse its value as JSON, validate its contents, - * and select a service config with selection fields that all match this client. Most of these steps - * can fail with an error; the caller must handle any errors thrown this way. - * @param txtRecord The TXT record array that is output from a successful call to dns.resolveTxt - * @param percentage A number chosen from the range [0, 100) that is used to select which config to use - * @return The service configuration to use, given the percentage value, or null if the service config - * data has a valid format but none of the options match the current client. - */ -export function extractAndSelectServiceConfig( - txtRecord: string[][], - percentage: number -): ServiceConfig | null { - for (const record of txtRecord) { - if (record.length > 0 && record[0].startsWith('grpc_config=')) { - /* Treat the list of strings in this record as a single string and remove - * "grpc_config=" from the beginning. The rest should be a JSON string */ - const recordString = record.join('').substring('grpc_config='.length); - const recordJson: any = JSON.parse(recordString); - return validateAndSelectCanaryConfig(recordJson, percentage); - } - } - return null; -} diff --git a/node_modules/@grpc/grpc-js/src/single-subchannel-channel.ts b/node_modules/@grpc/grpc-js/src/single-subchannel-channel.ts deleted file mode 100644 index c1a1fd1..0000000 --- a/node_modules/@grpc/grpc-js/src/single-subchannel-channel.ts +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Copyright 2025 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { AuthContext } from "./auth-context"; -import { CallCredentials } from "./call-credentials"; -import { Call, CallStreamOptions, InterceptingListener, MessageContext, StatusObject } from "./call-interface"; -import { getNextCallNumber } from "./call-number"; -import { Channel } from "./channel"; -import { ChannelOptions } from "./channel-options"; -import { ChannelRef, ChannelzCallTracker, ChannelzChildrenTracker, ChannelzTrace, registerChannelzChannel, unregisterChannelzRef } from "./channelz"; -import { CompressionFilterFactory } from "./compression-filter"; -import { ConnectivityState } from "./connectivity-state"; -import { Propagate, Status } from "./constants"; -import { restrictControlPlaneStatusCode } from "./control-plane-status"; -import { Deadline, getRelativeTimeout } from "./deadline"; -import { FilterStack, FilterStackFactory } from "./filter-stack"; -import { Metadata } from "./metadata"; -import { getDefaultAuthority } from "./resolver"; -import { Subchannel } from "./subchannel"; -import { SubchannelCall } from "./subchannel-call"; -import { GrpcUri, splitHostPort, uriToString } from "./uri-parser"; - -class SubchannelCallWrapper implements Call { - private childCall: SubchannelCall | null = null; - private pendingMessage: { context: MessageContext; message: Buffer } | null = - null; - private readPending = false; - private halfClosePending = false; - private pendingStatus: StatusObject | null = null; - private serviceUrl: string; - private filterStack: FilterStack; - private readFilterPending = false; - private writeFilterPending = false; - constructor(private subchannel: Subchannel, private method: string, filterStackFactory: FilterStackFactory, private options: CallStreamOptions, private callNumber: number) { - const splitPath: string[] = this.method.split('/'); - let serviceName = ''; - /* The standard path format is "/{serviceName}/{methodName}", so if we split - * by '/', the first item should be empty and the second should be the - * service name */ - if (splitPath.length >= 2) { - serviceName = splitPath[1]; - } - const hostname = splitHostPort(this.options.host)?.host ?? 'localhost'; - /* Currently, call credentials are only allowed on HTTPS connections, so we - * can assume that the scheme is "https" */ - this.serviceUrl = `https://${hostname}/${serviceName}`; - const timeout = getRelativeTimeout(options.deadline); - if (timeout !== Infinity) { - if (timeout <= 0) { - this.cancelWithStatus(Status.DEADLINE_EXCEEDED, 'Deadline exceeded'); - } else { - setTimeout(() => { - this.cancelWithStatus(Status.DEADLINE_EXCEEDED, 'Deadline exceeded'); - }, timeout); - } - } - this.filterStack = filterStackFactory.createFilter(); - } - - cancelWithStatus(status: Status, details: string): void { - if (this.childCall) { - this.childCall.cancelWithStatus(status, details); - } else { - this.pendingStatus = { - code: status, - details: details, - metadata: new Metadata() - }; - } - - } - getPeer(): string { - return this.childCall?.getPeer() ?? this.subchannel.getAddress(); - } - async start(metadata: Metadata, listener: InterceptingListener): Promise { - if (this.pendingStatus) { - listener.onReceiveStatus(this.pendingStatus); - return; - } - if (this.subchannel.getConnectivityState() !== ConnectivityState.READY) { - listener.onReceiveStatus({ - code: Status.UNAVAILABLE, - details: 'Subchannel not ready', - metadata: new Metadata() - }); - return; - } - const filteredMetadata = await this.filterStack.sendMetadata(Promise.resolve(metadata)); - let credsMetadata: Metadata; - try { - credsMetadata = await this.subchannel.getCallCredentials() - .generateMetadata({method_name: this.method, service_url: this.serviceUrl}); - } catch (e) { - const error = e as (Error & { code: number }); - const { code, details } = restrictControlPlaneStatusCode( - typeof error.code === 'number' ? error.code : Status.UNKNOWN, - `Getting metadata from plugin failed with error: ${error.message}` - ); - listener.onReceiveStatus( - { - code: code, - details: details, - metadata: new Metadata(), - } - ); - return; - } - credsMetadata.merge(filteredMetadata); - const childListener: InterceptingListener = { - onReceiveMetadata: async metadata => { - listener.onReceiveMetadata(await this.filterStack.receiveMetadata(metadata)); - }, - onReceiveMessage: async message => { - this.readFilterPending = true; - const filteredMessage = await this.filterStack.receiveMessage(message); - this.readFilterPending = false; - listener.onReceiveMessage(filteredMessage); - if (this.pendingStatus) { - listener.onReceiveStatus(this.pendingStatus); - } - }, - onReceiveStatus: async status => { - const filteredStatus = await this.filterStack.receiveTrailers(status); - if (this.readFilterPending) { - this.pendingStatus = filteredStatus; - } else { - listener.onReceiveStatus(filteredStatus); - } - } - } - this.childCall = this.subchannel.createCall(credsMetadata, this.options.host, this.method, childListener); - if (this.readPending) { - this.childCall.startRead(); - } - if (this.pendingMessage) { - this.childCall.sendMessageWithContext(this.pendingMessage.context, this.pendingMessage.message); - } - if (this.halfClosePending && !this.writeFilterPending) { - this.childCall.halfClose(); - } - } - async sendMessageWithContext(context: MessageContext, message: Buffer): Promise { - this.writeFilterPending = true; - const filteredMessage = await this.filterStack.sendMessage(Promise.resolve({message: message, flags: context.flags})); - this.writeFilterPending = false; - if (this.childCall) { - this.childCall.sendMessageWithContext(context, filteredMessage.message); - if (this.halfClosePending) { - this.childCall.halfClose(); - } - } else { - this.pendingMessage = { context, message: filteredMessage.message }; - } - } - startRead(): void { - if (this.childCall) { - this.childCall.startRead(); - } else { - this.readPending = true; - } - } - halfClose(): void { - if (this.childCall && !this.writeFilterPending) { - this.childCall.halfClose(); - } else { - this.halfClosePending = true; - } - } - getCallNumber(): number { - return this.callNumber; - } - setCredentials(credentials: CallCredentials): void { - throw new Error("Method not implemented."); - } - getAuthContext(): AuthContext | null { - if (this.childCall) { - return this.childCall.getAuthContext(); - } else { - return null; - } - } -} - -export class SingleSubchannelChannel implements Channel { - private channelzRef: ChannelRef; - private channelzEnabled = false; - private channelzTrace = new ChannelzTrace(); - private callTracker = new ChannelzCallTracker(); - private childrenTracker = new ChannelzChildrenTracker(); - private filterStackFactory: FilterStackFactory; - constructor(private subchannel: Subchannel, private target: GrpcUri, options: ChannelOptions) { - this.channelzEnabled = options['grpc.enable_channelz'] !== 0; - this.channelzRef = registerChannelzChannel(uriToString(target), () => ({ - target: `${uriToString(target)} (${subchannel.getAddress()})`, - state: this.subchannel.getConnectivityState(), - trace: this.channelzTrace, - callTracker: this.callTracker, - children: this.childrenTracker.getChildLists() - }), this.channelzEnabled); - if (this.channelzEnabled) { - this.childrenTracker.refChild(subchannel.getChannelzRef()); - } - this.filterStackFactory = new FilterStackFactory([new CompressionFilterFactory(this, options)]); - } - - close(): void { - if (this.channelzEnabled) { - this.childrenTracker.unrefChild(this.subchannel.getChannelzRef()); - } - unregisterChannelzRef(this.channelzRef); - } - - getTarget(): string { - return uriToString(this.target); - } - getConnectivityState(tryToConnect: boolean): ConnectivityState { - throw new Error("Method not implemented."); - } - watchConnectivityState(currentState: ConnectivityState, deadline: Date | number, callback: (error?: Error) => void): void { - throw new Error("Method not implemented."); - } - getChannelzRef(): ChannelRef { - return this.channelzRef; - } - createCall(method: string, deadline: Deadline): Call { - const callOptions: CallStreamOptions = { - deadline: deadline, - host: getDefaultAuthority(this.target), - flags: Propagate.DEFAULTS, - parentCall: null - }; - return new SubchannelCallWrapper(this.subchannel, method, this.filterStackFactory, callOptions, getNextCallNumber()); - } -} diff --git a/node_modules/@grpc/grpc-js/src/status-builder.ts b/node_modules/@grpc/grpc-js/src/status-builder.ts deleted file mode 100644 index 78e2ea3..0000000 --- a/node_modules/@grpc/grpc-js/src/status-builder.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { StatusObject } from './call-interface'; -import { Status } from './constants'; -import { Metadata } from './metadata'; - -/** - * A builder for gRPC status objects. - */ -export class StatusBuilder { - private code: Status | null; - private details: string | null; - private metadata: Metadata | null; - - constructor() { - this.code = null; - this.details = null; - this.metadata = null; - } - - /** - * Adds a status code to the builder. - */ - withCode(code: Status): this { - this.code = code; - return this; - } - - /** - * Adds details to the builder. - */ - withDetails(details: string): this { - this.details = details; - return this; - } - - /** - * Adds metadata to the builder. - */ - withMetadata(metadata: Metadata): this { - this.metadata = metadata; - return this; - } - - /** - * Builds the status object. - */ - build(): Partial { - const status: Partial = {}; - - if (this.code !== null) { - status.code = this.code; - } - - if (this.details !== null) { - status.details = this.details; - } - - if (this.metadata !== null) { - status.metadata = this.metadata; - } - - return status; - } -} diff --git a/node_modules/@grpc/grpc-js/src/stream-decoder.ts b/node_modules/@grpc/grpc-js/src/stream-decoder.ts deleted file mode 100644 index ea669d1..0000000 --- a/node_modules/@grpc/grpc-js/src/stream-decoder.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -enum ReadState { - NO_DATA, - READING_SIZE, - READING_MESSAGE, -} - -export class StreamDecoder { - private readState: ReadState = ReadState.NO_DATA; - private readCompressFlag: Buffer = Buffer.alloc(1); - private readPartialSize: Buffer = Buffer.alloc(4); - private readSizeRemaining = 4; - private readMessageSize = 0; - private readPartialMessage: Buffer[] = []; - private readMessageRemaining = 0; - - constructor(private maxReadMessageLength: number) {} - - write(data: Buffer): Buffer[] { - let readHead = 0; - let toRead: number; - const result: Buffer[] = []; - - while (readHead < data.length) { - switch (this.readState) { - case ReadState.NO_DATA: - this.readCompressFlag = data.slice(readHead, readHead + 1); - readHead += 1; - this.readState = ReadState.READING_SIZE; - this.readPartialSize.fill(0); - this.readSizeRemaining = 4; - this.readMessageSize = 0; - this.readMessageRemaining = 0; - this.readPartialMessage = []; - break; - case ReadState.READING_SIZE: - toRead = Math.min(data.length - readHead, this.readSizeRemaining); - data.copy( - this.readPartialSize, - 4 - this.readSizeRemaining, - readHead, - readHead + toRead - ); - this.readSizeRemaining -= toRead; - readHead += toRead; - // readSizeRemaining >=0 here - if (this.readSizeRemaining === 0) { - this.readMessageSize = this.readPartialSize.readUInt32BE(0); - if (this.maxReadMessageLength !== -1 && this.readMessageSize > this.maxReadMessageLength) { - throw new Error(`Received message larger than max (${this.readMessageSize} vs ${this.maxReadMessageLength})`); - } - this.readMessageRemaining = this.readMessageSize; - if (this.readMessageRemaining > 0) { - this.readState = ReadState.READING_MESSAGE; - } else { - const message = Buffer.concat( - [this.readCompressFlag, this.readPartialSize], - 5 - ); - - this.readState = ReadState.NO_DATA; - result.push(message); - } - } - break; - case ReadState.READING_MESSAGE: - toRead = Math.min(data.length - readHead, this.readMessageRemaining); - this.readPartialMessage.push(data.slice(readHead, readHead + toRead)); - this.readMessageRemaining -= toRead; - readHead += toRead; - // readMessageRemaining >=0 here - if (this.readMessageRemaining === 0) { - // At this point, we have read a full message - const framedMessageBuffers = [ - this.readCompressFlag, - this.readPartialSize, - ].concat(this.readPartialMessage); - const framedMessage = Buffer.concat( - framedMessageBuffers, - this.readMessageSize + 5 - ); - - this.readState = ReadState.NO_DATA; - result.push(framedMessage); - } - break; - default: - throw new Error('Unexpected read state'); - } - } - - return result; - } -} diff --git a/node_modules/@grpc/grpc-js/src/subchannel-address.ts b/node_modules/@grpc/grpc-js/src/subchannel-address.ts deleted file mode 100644 index 7e4f3e4..0000000 --- a/node_modules/@grpc/grpc-js/src/subchannel-address.ts +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { isIP, isIPv6 } from 'net'; - -export interface TcpSubchannelAddress { - port: number; - host: string; -} - -export interface IpcSubchannelAddress { - path: string; -} -/** - * This represents a single backend address to connect to. This interface is a - * subset of net.SocketConnectOpts, i.e. the options described at - * https://nodejs.org/api/net.html#net_socket_connect_options_connectlistener. - * Those are in turn a subset of the options that can be passed to http2.connect. - */ - -export type SubchannelAddress = TcpSubchannelAddress | IpcSubchannelAddress; - -export function isTcpSubchannelAddress( - address: SubchannelAddress -): address is TcpSubchannelAddress { - return 'port' in address; -} - -export function subchannelAddressEqual( - address1?: SubchannelAddress, - address2?: SubchannelAddress -): boolean { - if (!address1 && !address2) { - return true; - } - if (!address1 || !address2) { - return false; - } - if (isTcpSubchannelAddress(address1)) { - return ( - isTcpSubchannelAddress(address2) && - address1.host === address2.host && - address1.port === address2.port - ); - } else { - return !isTcpSubchannelAddress(address2) && address1.path === address2.path; - } -} - -export function subchannelAddressToString(address: SubchannelAddress): string { - if (isTcpSubchannelAddress(address)) { - if (isIPv6(address.host)) { - return '[' + address.host + ']:' + address.port; - } else { - return address.host + ':' + address.port; - } - } else { - return address.path; - } -} - -const DEFAULT_PORT = 443; - -export function stringToSubchannelAddress( - addressString: string, - port?: number -): SubchannelAddress { - if (isIP(addressString)) { - return { - host: addressString, - port: port ?? DEFAULT_PORT, - }; - } else { - return { - path: addressString, - }; - } -} - -export interface Endpoint { - addresses: SubchannelAddress[]; -} - -export function endpointEqual(endpoint1: Endpoint, endpoint2: Endpoint) { - if (endpoint1.addresses.length !== endpoint2.addresses.length) { - return false; - } - for (let i = 0; i < endpoint1.addresses.length; i++) { - if ( - !subchannelAddressEqual(endpoint1.addresses[i], endpoint2.addresses[i]) - ) { - return false; - } - } - return true; -} - -export function endpointToString(endpoint: Endpoint): string { - return ( - '[' + endpoint.addresses.map(subchannelAddressToString).join(', ') + ']' - ); -} - -export function endpointHasAddress( - endpoint: Endpoint, - expectedAddress: SubchannelAddress -): boolean { - for (const address of endpoint.addresses) { - if (subchannelAddressEqual(address, expectedAddress)) { - return true; - } - } - return false; -} - -interface EndpointMapEntry { - key: Endpoint; - value: ValueType; -} - -function endpointEqualUnordered( - endpoint1: Endpoint, - endpoint2: Endpoint -): boolean { - if (endpoint1.addresses.length !== endpoint2.addresses.length) { - return false; - } - for (const address1 of endpoint1.addresses) { - let matchFound = false; - for (const address2 of endpoint2.addresses) { - if (subchannelAddressEqual(address1, address2)) { - matchFound = true; - break; - } - } - if (!matchFound) { - return false; - } - } - return true; -} - -export class EndpointMap { - private map: Set> = new Set(); - - get size() { - return this.map.size; - } - - getForSubchannelAddress(address: SubchannelAddress): ValueType | undefined { - for (const entry of this.map) { - if (endpointHasAddress(entry.key, address)) { - return entry.value; - } - } - return undefined; - } - - /** - * Delete any entries in this map with keys that are not in endpoints - * @param endpoints - */ - deleteMissing(endpoints: Endpoint[]): ValueType[] { - const removedValues: ValueType[] = []; - for (const entry of this.map) { - let foundEntry = false; - for (const endpoint of endpoints) { - if (endpointEqualUnordered(endpoint, entry.key)) { - foundEntry = true; - } - } - if (!foundEntry) { - removedValues.push(entry.value); - this.map.delete(entry); - } - } - return removedValues; - } - - get(endpoint: Endpoint): ValueType | undefined { - for (const entry of this.map) { - if (endpointEqualUnordered(endpoint, entry.key)) { - return entry.value; - } - } - return undefined; - } - - set(endpoint: Endpoint, mapEntry: ValueType) { - for (const entry of this.map) { - if (endpointEqualUnordered(endpoint, entry.key)) { - entry.value = mapEntry; - return; - } - } - this.map.add({ key: endpoint, value: mapEntry }); - } - - delete(endpoint: Endpoint) { - for (const entry of this.map) { - if (endpointEqualUnordered(endpoint, entry.key)) { - this.map.delete(entry); - return; - } - } - } - - has(endpoint: Endpoint): boolean { - for (const entry of this.map) { - if (endpointEqualUnordered(endpoint, entry.key)) { - return true; - } - } - return false; - } - - clear() { - this.map.clear(); - } - - *keys(): IterableIterator { - for (const entry of this.map) { - yield entry.key; - } - } - - *values(): IterableIterator { - for (const entry of this.map) { - yield entry.value; - } - } - - *entries(): IterableIterator<[Endpoint, ValueType]> { - for (const entry of this.map) { - yield [entry.key, entry.value]; - } - } -} diff --git a/node_modules/@grpc/grpc-js/src/subchannel-call.ts b/node_modules/@grpc/grpc-js/src/subchannel-call.ts deleted file mode 100644 index 207b781..0000000 --- a/node_modules/@grpc/grpc-js/src/subchannel-call.ts +++ /dev/null @@ -1,622 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import * as http2 from 'http2'; -import * as os from 'os'; - -import { DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH, Status } from './constants'; -import { Metadata } from './metadata'; -import { StreamDecoder } from './stream-decoder'; -import * as logging from './logging'; -import { LogVerbosity } from './constants'; -import { - InterceptingListener, - MessageContext, - StatusObject, - WriteCallback, -} from './call-interface'; -import { CallEventTracker, Transport } from './transport'; -import { AuthContext } from './auth-context'; - -const TRACER_NAME = 'subchannel_call'; - -/** - * https://nodejs.org/api/errors.html#errors_class_systemerror - */ -interface SystemError extends Error { - address?: string; - code: string; - dest?: string; - errno: number; - info?: object; - message: string; - path?: string; - port?: number; - syscall: string; -} - -/** - * Should do approximately the same thing as util.getSystemErrorName but the - * TypeScript types don't have that function for some reason so I just made my - * own. - * @param errno - */ -function getSystemErrorName(errno: number): string { - for (const [name, num] of Object.entries(os.constants.errno)) { - if (num === errno) { - return name; - } - } - return 'Unknown system error ' + errno; -} - -export interface SubchannelCall { - cancelWithStatus(status: Status, details: string): void; - getPeer(): string; - sendMessageWithContext(context: MessageContext, message: Buffer): void; - startRead(): void; - halfClose(): void; - getCallNumber(): number; - getDeadlineInfo(): string[]; - getAuthContext(): AuthContext; -} - -export interface StatusObjectWithRstCode extends StatusObject { - rstCode?: number; -} - -export interface SubchannelCallInterceptingListener - extends InterceptingListener { - onReceiveStatus(status: StatusObjectWithRstCode): void; -} - -function mapHttpStatusCode(code: number): StatusObject { - const details = `Received HTTP status code ${code}`; - let mappedStatusCode: number; - switch (code) { - // TODO(murgatroid99): handle 100 and 101 - case 400: - mappedStatusCode = Status.INTERNAL; - break; - case 401: - mappedStatusCode = Status.UNAUTHENTICATED; - break; - case 403: - mappedStatusCode = Status.PERMISSION_DENIED; - break; - case 404: - mappedStatusCode = Status.UNIMPLEMENTED; - break; - case 429: - case 502: - case 503: - case 504: - mappedStatusCode = Status.UNAVAILABLE; - break; - default: - mappedStatusCode = Status.UNKNOWN; - } - return { - code: mappedStatusCode, - details: details, - metadata: new Metadata() - }; -} - -export class Http2SubchannelCall implements SubchannelCall { - private decoder: StreamDecoder; - - private isReadFilterPending = false; - private isPushPending = false; - private canPush = false; - /** - * Indicates that an 'end' event has come from the http2 stream, so there - * will be no more data events. - */ - private readsClosed = false; - - private statusOutput = false; - - private unpushedReadMessages: Buffer[] = []; - - private httpStatusCode: number | undefined; - - // This is populated (non-null) if and only if the call has ended - private finalStatus: StatusObject | null = null; - - private internalError: SystemError | null = null; - - private serverEndedCall = false; - - private connectionDropped = false; - - constructor( - private readonly http2Stream: http2.ClientHttp2Stream, - private readonly callEventTracker: CallEventTracker, - private readonly listener: SubchannelCallInterceptingListener, - private readonly transport: Transport, - private readonly callId: number - ) { - const maxReceiveMessageLength = transport.getOptions()['grpc.max_receive_message_length'] ?? DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH; - this.decoder = new StreamDecoder(maxReceiveMessageLength); - http2Stream.on('response', (headers, flags) => { - let headersString = ''; - for (const header of Object.keys(headers)) { - headersString += '\t\t' + header + ': ' + headers[header] + '\n'; - } - this.trace('Received server headers:\n' + headersString); - this.httpStatusCode = headers[':status']; - - if (flags & http2.constants.NGHTTP2_FLAG_END_STREAM) { - this.handleTrailers(headers); - } else { - let metadata: Metadata; - try { - metadata = Metadata.fromHttp2Headers(headers); - } catch (error) { - this.endCall({ - code: Status.UNKNOWN, - details: (error as Error).message, - metadata: new Metadata(), - }); - return; - } - this.listener.onReceiveMetadata(metadata); - } - }); - http2Stream.on('trailers', (headers: http2.IncomingHttpHeaders) => { - this.handleTrailers(headers); - }); - http2Stream.on('data', (data: Buffer) => { - /* If the status has already been output, allow the http2 stream to - * drain without processing the data. */ - if (this.statusOutput) { - return; - } - this.trace('receive HTTP/2 data frame of length ' + data.length); - let messages: Buffer[]; - try { - messages = this.decoder.write(data); - } catch (e) { - /* Some servers send HTML error pages along with HTTP status codes. - * When the client attempts to parse this as a length-delimited - * message, the parsed message size is greater than the default limit, - * resulting in a message decoding error. In that situation, the HTTP - * error code information is more useful to the user than the - * RESOURCE_EXHAUSTED error is, so we report that instead. Normally, - * we delay processing the HTTP status until after the stream ends, to - * prioritize reporting the gRPC status from trailers if it is present, - * but when there is a message parsing error we end the stream early - * before processing trailers. */ - if (this.httpStatusCode !== undefined && this.httpStatusCode !== 200) { - const mappedStatus = mapHttpStatusCode(this.httpStatusCode); - this.cancelWithStatus(mappedStatus.code, mappedStatus.details); - } else { - this.cancelWithStatus(Status.RESOURCE_EXHAUSTED, (e as Error).message); - } - return; - } - - for (const message of messages) { - this.trace('parsed message of length ' + message.length); - this.callEventTracker!.addMessageReceived(); - this.tryPush(message); - } - }); - http2Stream.on('end', () => { - this.readsClosed = true; - this.maybeOutputStatus(); - }); - http2Stream.on('close', () => { - this.serverEndedCall = true; - /* Use process.next tick to ensure that this code happens after any - * "error" event that may be emitted at about the same time, so that - * we can bubble up the error message from that event. */ - process.nextTick(() => { - this.trace('HTTP/2 stream closed with code ' + http2Stream.rstCode); - /* If we have a final status with an OK status code, that means that - * we have received all of the messages and we have processed the - * trailers and the call completed successfully, so it doesn't matter - * how the stream ends after that */ - if (this.finalStatus?.code === Status.OK) { - return; - } - let code: Status; - let details = ''; - switch (http2Stream.rstCode) { - case http2.constants.NGHTTP2_NO_ERROR: - /* If we get a NO_ERROR code and we already have a status, the - * stream completed properly and we just haven't fully processed - * it yet */ - if (this.finalStatus !== null) { - return; - } - if (this.httpStatusCode && this.httpStatusCode !== 200) { - const mappedStatus = mapHttpStatusCode(this.httpStatusCode); - code = mappedStatus.code; - details = mappedStatus.details; - } else { - code = Status.INTERNAL; - details = `Received RST_STREAM with code ${http2Stream.rstCode} (Call ended without gRPC status)`; - } - break; - case http2.constants.NGHTTP2_REFUSED_STREAM: - code = Status.UNAVAILABLE; - details = 'Stream refused by server'; - break; - case http2.constants.NGHTTP2_CANCEL: - /* Bug reports indicate that Node synthesizes a NGHTTP2_CANCEL - * code from connection drops. We want to prioritize reporting - * an unavailable status when that happens. */ - if (this.connectionDropped) { - code = Status.UNAVAILABLE; - details = 'Connection dropped'; - } else { - code = Status.CANCELLED; - details = 'Call cancelled'; - } - break; - case http2.constants.NGHTTP2_ENHANCE_YOUR_CALM: - code = Status.RESOURCE_EXHAUSTED; - details = 'Bandwidth exhausted or memory limit exceeded'; - break; - case http2.constants.NGHTTP2_INADEQUATE_SECURITY: - code = Status.PERMISSION_DENIED; - details = 'Protocol not secure enough'; - break; - case http2.constants.NGHTTP2_INTERNAL_ERROR: - code = Status.INTERNAL; - if (this.internalError === null) { - /* This error code was previously handled in the default case, and - * there are several instances of it online, so I wanted to - * preserve the original error message so that people find existing - * information in searches, but also include the more recognizable - * "Internal server error" message. */ - details = `Received RST_STREAM with code ${http2Stream.rstCode} (Internal server error)`; - } else { - if ( - this.internalError.code === 'ECONNRESET' || - this.internalError.code === 'ETIMEDOUT' - ) { - code = Status.UNAVAILABLE; - details = this.internalError.message; - } else { - /* The "Received RST_STREAM with code ..." error is preserved - * here for continuity with errors reported online, but the - * error message at the end will probably be more relevant in - * most cases. */ - details = `Received RST_STREAM with code ${http2Stream.rstCode} triggered by internal client error: ${this.internalError.message}`; - } - } - break; - default: - code = Status.INTERNAL; - details = `Received RST_STREAM with code ${http2Stream.rstCode}`; - } - // This is a no-op if trailers were received at all. - // This is OK, because status codes emitted here correspond to more - // catastrophic issues that prevent us from receiving trailers in the - // first place. - this.endCall({ - code, - details, - metadata: new Metadata(), - rstCode: http2Stream.rstCode, - }); - }); - }); - http2Stream.on('error', (err: SystemError) => { - /* We need an error handler here to stop "Uncaught Error" exceptions - * from bubbling up. However, errors here should all correspond to - * "close" events, where we will handle the error more granularly */ - /* Specifically looking for stream errors that were *not* constructed - * from a RST_STREAM response here: - * https://github.com/nodejs/node/blob/8b8620d580314050175983402dfddf2674e8e22a/lib/internal/http2/core.js#L2267 - */ - if (err.code !== 'ERR_HTTP2_STREAM_ERROR') { - this.trace( - 'Node error event: message=' + - err.message + - ' code=' + - err.code + - ' errno=' + - getSystemErrorName(err.errno) + - ' syscall=' + - err.syscall - ); - this.internalError = err; - } - this.callEventTracker.onStreamEnd(false); - }); - } - getDeadlineInfo(): string[] { - return [`remote_addr=${this.getPeer()}`]; - } - - public onDisconnect() { - this.connectionDropped = true; - /* Give the call an event loop cycle to finish naturally before reporting - * the disconnection as an error. */ - setImmediate(() => { - this.endCall({ - code: Status.UNAVAILABLE, - details: 'Connection dropped', - metadata: new Metadata(), - }); - }); - } - - private outputStatus() { - /* Precondition: this.finalStatus !== null */ - if (!this.statusOutput) { - this.statusOutput = true; - this.trace( - 'ended with status: code=' + - this.finalStatus!.code + - ' details="' + - this.finalStatus!.details + - '"' - ); - this.callEventTracker.onCallEnd(this.finalStatus!); - /* We delay the actual action of bubbling up the status to insulate the - * cleanup code in this class from any errors that may be thrown in the - * upper layers as a result of bubbling up the status. In particular, - * if the status is not OK, the "error" event may be emitted - * synchronously at the top level, which will result in a thrown error if - * the user does not handle that event. */ - process.nextTick(() => { - this.listener.onReceiveStatus(this.finalStatus!); - }); - /* Leave the http2 stream in flowing state to drain incoming messages, to - * ensure that the stream closure completes. The call stream already does - * not push more messages after the status is output, so the messages go - * nowhere either way. */ - this.http2Stream.resume(); - } - } - - private trace(text: string): void { - logging.trace( - LogVerbosity.DEBUG, - TRACER_NAME, - '[' + this.callId + '] ' + text - ); - } - - /** - * On first call, emits a 'status' event with the given StatusObject. - * Subsequent calls are no-ops. - * @param status The status of the call. - */ - private endCall(status: StatusObjectWithRstCode): void { - /* If the status is OK and a new status comes in (e.g. from a - * deserialization failure), that new status takes priority */ - if (this.finalStatus === null || this.finalStatus.code === Status.OK) { - this.finalStatus = status; - this.maybeOutputStatus(); - } - this.destroyHttp2Stream(); - } - - private maybeOutputStatus() { - if (this.finalStatus !== null) { - /* The combination check of readsClosed and that the two message buffer - * arrays are empty checks that there all incoming data has been fully - * processed */ - if ( - this.finalStatus.code !== Status.OK || - (this.readsClosed && - this.unpushedReadMessages.length === 0 && - !this.isReadFilterPending && - !this.isPushPending) - ) { - this.outputStatus(); - } - } - } - - private push(message: Buffer): void { - this.trace( - 'pushing to reader message of length ' + - (message instanceof Buffer ? message.length : null) - ); - this.canPush = false; - this.isPushPending = true; - process.nextTick(() => { - this.isPushPending = false; - /* If we have already output the status any later messages should be - * ignored, and can cause out-of-order operation errors higher up in the - * stack. Checking as late as possible here to avoid any race conditions. - */ - if (this.statusOutput) { - return; - } - this.listener.onReceiveMessage(message); - this.maybeOutputStatus(); - }); - } - - private tryPush(messageBytes: Buffer): void { - if (this.canPush) { - this.http2Stream!.pause(); - this.push(messageBytes); - } else { - this.trace( - 'unpushedReadMessages.push message of length ' + messageBytes.length - ); - this.unpushedReadMessages.push(messageBytes); - } - } - - private handleTrailers(headers: http2.IncomingHttpHeaders) { - this.serverEndedCall = true; - this.callEventTracker.onStreamEnd(true); - let headersString = ''; - for (const header of Object.keys(headers)) { - headersString += '\t\t' + header + ': ' + headers[header] + '\n'; - } - this.trace('Received server trailers:\n' + headersString); - let metadata: Metadata; - try { - metadata = Metadata.fromHttp2Headers(headers); - } catch (e) { - metadata = new Metadata(); - } - const metadataMap = metadata.getMap(); - let status: StatusObject; - if (typeof metadataMap['grpc-status'] === 'string') { - const receivedStatus: Status = Number(metadataMap['grpc-status']); - this.trace('received status code ' + receivedStatus + ' from server'); - metadata.remove('grpc-status'); - let details = ''; - if (typeof metadataMap['grpc-message'] === 'string') { - try { - details = decodeURI(metadataMap['grpc-message']); - } catch (e) { - details = metadataMap['grpc-message']; - } - metadata.remove('grpc-message'); - this.trace( - 'received status details string "' + details + '" from server' - ); - } - status = { - code: receivedStatus, - details: details, - metadata: metadata - }; - } else if (this.httpStatusCode) { - status = mapHttpStatusCode(this.httpStatusCode); - status.metadata = metadata; - } else { - status = { - code: Status.UNKNOWN, - details: 'No status information received', - metadata: metadata - }; - } - // This is a no-op if the call was already ended when handling headers. - this.endCall(status); - } - - private destroyHttp2Stream() { - // The http2 stream could already have been destroyed if cancelWithStatus - // is called in response to an internal http2 error. - if (this.http2Stream.destroyed) { - return; - } - /* If the server ended the call, sending an RST_STREAM is redundant, so we - * just half close on the client side instead to finish closing the stream. - */ - if (this.serverEndedCall) { - this.http2Stream.end(); - } else { - /* If the call has ended with an OK status, communicate that when closing - * the stream, partly to avoid a situation in which we detect an error - * RST_STREAM as a result after we have the status */ - let code: number; - if (this.finalStatus?.code === Status.OK) { - code = http2.constants.NGHTTP2_NO_ERROR; - } else { - code = http2.constants.NGHTTP2_CANCEL; - } - this.trace('close http2 stream with code ' + code); - this.http2Stream.close(code); - } - } - - cancelWithStatus(status: Status, details: string): void { - this.trace( - 'cancelWithStatus code: ' + status + ' details: "' + details + '"' - ); - this.endCall({ code: status, details, metadata: new Metadata() }); - } - - getStatus(): StatusObject | null { - return this.finalStatus; - } - - getPeer(): string { - return this.transport.getPeerName(); - } - - getCallNumber(): number { - return this.callId; - } - - getAuthContext(): AuthContext { - return this.transport.getAuthContext(); - } - - startRead() { - /* If the stream has ended with an error, we should not emit any more - * messages and we should communicate that the stream has ended */ - if (this.finalStatus !== null && this.finalStatus.code !== Status.OK) { - this.readsClosed = true; - this.maybeOutputStatus(); - return; - } - this.canPush = true; - if (this.unpushedReadMessages.length > 0) { - const nextMessage: Buffer = this.unpushedReadMessages.shift()!; - this.push(nextMessage); - return; - } - /* Only resume reading from the http2Stream if we don't have any pending - * messages to emit */ - this.http2Stream.resume(); - } - - sendMessageWithContext(context: MessageContext, message: Buffer) { - this.trace('write() called with message of length ' + message.length); - const cb: WriteCallback = (error?: Error | null) => { - /* nextTick here ensures that no stream action can be taken in the call - * stack of the write callback, in order to hopefully work around - * https://github.com/nodejs/node/issues/49147 */ - process.nextTick(() => { - let code: Status = Status.UNAVAILABLE; - if ( - (error as NodeJS.ErrnoException)?.code === - 'ERR_STREAM_WRITE_AFTER_END' - ) { - code = Status.INTERNAL; - } - if (error) { - this.cancelWithStatus(code, `Write error: ${error.message}`); - } - context.callback?.(); - }); - }; - this.trace('sending data chunk of length ' + message.length); - this.callEventTracker.addMessageSent(); - try { - this.http2Stream!.write(message, cb); - } catch (error) { - this.endCall({ - code: Status.UNAVAILABLE, - details: `Write failed with error ${(error as Error).message}`, - metadata: new Metadata(), - }); - } - } - - halfClose() { - this.trace('end() called'); - this.trace('calling end() on HTTP/2 stream'); - this.http2Stream.end(); - } -} diff --git a/node_modules/@grpc/grpc-js/src/subchannel-interface.ts b/node_modules/@grpc/grpc-js/src/subchannel-interface.ts deleted file mode 100644 index d25e91c..0000000 --- a/node_modules/@grpc/grpc-js/src/subchannel-interface.ts +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { CallCredentials } from './call-credentials'; -import { Channel } from './channel'; -import type { SubchannelRef } from './channelz'; -import { ConnectivityState } from './connectivity-state'; -import { Subchannel } from './subchannel'; - -export type ConnectivityStateListener = ( - subchannel: SubchannelInterface, - previousState: ConnectivityState, - newState: ConnectivityState, - keepaliveTime: number, - errorMessage?: string -) => void; - -export type HealthListener = (healthy: boolean) => void; - -export interface DataWatcher { - setSubchannel(subchannel: Subchannel): void; - destroy(): void; -} - -/** - * This is an interface for load balancing policies to use to interact with - * subchannels. This allows load balancing policies to wrap and unwrap - * subchannels. - * - * Any load balancing policy that wraps subchannels must unwrap the subchannel - * in the picker, so that other load balancing policies consistently have - * access to their own wrapper objects. - */ -export interface SubchannelInterface { - getConnectivityState(): ConnectivityState; - addConnectivityStateListener(listener: ConnectivityStateListener): void; - removeConnectivityStateListener(listener: ConnectivityStateListener): void; - startConnecting(): void; - getAddress(): string; - throttleKeepalive(newKeepaliveTime: number): void; - ref(): void; - unref(): void; - getChannelzRef(): SubchannelRef; - isHealthy(): boolean; - addHealthStateWatcher(listener: HealthListener): void; - removeHealthStateWatcher(listener: HealthListener): void; - addDataWatcher(dataWatcher: DataWatcher): void; - /** - * If this is a wrapper, return the wrapped subchannel, otherwise return this - */ - getRealSubchannel(): Subchannel; - /** - * Returns true if this and other both proxy the same underlying subchannel. - * Can be used instead of directly accessing getRealSubchannel to allow mocks - * to avoid implementing getRealSubchannel - */ - realSubchannelEquals(other: SubchannelInterface): boolean; - /** - * Get the call credentials associated with the channel credentials for this - * subchannel. - */ - getCallCredentials(): CallCredentials; - /** - * Get a channel that can be used to make requests with just this - */ - getChannel(): Channel; -} - -export abstract class BaseSubchannelWrapper implements SubchannelInterface { - private healthy = true; - private healthListeners: Set = new Set(); - private refcount = 0; - private dataWatchers: Set = new Set(); - constructor(protected child: SubchannelInterface) { - child.addHealthStateWatcher(childHealthy => { - /* A change to the child health state only affects this wrapper's overall - * health state if this wrapper is reporting healthy. */ - if (this.healthy) { - this.updateHealthListeners(); - } - }); - } - - private updateHealthListeners(): void { - for (const listener of this.healthListeners) { - listener(this.isHealthy()); - } - } - - getConnectivityState(): ConnectivityState { - return this.child.getConnectivityState(); - } - addConnectivityStateListener(listener: ConnectivityStateListener): void { - this.child.addConnectivityStateListener(listener); - } - removeConnectivityStateListener(listener: ConnectivityStateListener): void { - this.child.removeConnectivityStateListener(listener); - } - startConnecting(): void { - this.child.startConnecting(); - } - getAddress(): string { - return this.child.getAddress(); - } - throttleKeepalive(newKeepaliveTime: number): void { - this.child.throttleKeepalive(newKeepaliveTime); - } - ref(): void { - this.child.ref(); - this.refcount += 1; - } - unref(): void { - this.child.unref(); - this.refcount -= 1; - if (this.refcount === 0) { - this.destroy(); - } - } - protected destroy() { - for (const watcher of this.dataWatchers) { - watcher.destroy(); - } - } - getChannelzRef(): SubchannelRef { - return this.child.getChannelzRef(); - } - isHealthy(): boolean { - return this.healthy && this.child.isHealthy(); - } - addHealthStateWatcher(listener: HealthListener): void { - this.healthListeners.add(listener); - } - removeHealthStateWatcher(listener: HealthListener): void { - this.healthListeners.delete(listener); - } - addDataWatcher(dataWatcher: DataWatcher): void { - dataWatcher.setSubchannel(this.getRealSubchannel()); - this.dataWatchers.add(dataWatcher); - } - protected setHealthy(healthy: boolean): void { - if (healthy !== this.healthy) { - this.healthy = healthy; - /* A change to this wrapper's health state only affects the overall - * reported health state if the child is healthy. */ - if (this.child.isHealthy()) { - this.updateHealthListeners(); - } - } - } - getRealSubchannel(): Subchannel { - return this.child.getRealSubchannel(); - } - realSubchannelEquals(other: SubchannelInterface): boolean { - return this.getRealSubchannel() === other.getRealSubchannel(); - } - getCallCredentials(): CallCredentials { - return this.child.getCallCredentials(); - } - getChannel(): Channel { - return this.child.getChannel(); - } -} diff --git a/node_modules/@grpc/grpc-js/src/subchannel-pool.ts b/node_modules/@grpc/grpc-js/src/subchannel-pool.ts deleted file mode 100644 index a5dec72..0000000 --- a/node_modules/@grpc/grpc-js/src/subchannel-pool.ts +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { ChannelOptions, channelOptionsEqual } from './channel-options'; -import { Subchannel } from './subchannel'; -import { - SubchannelAddress, - subchannelAddressEqual, -} from './subchannel-address'; -import { ChannelCredentials } from './channel-credentials'; -import { GrpcUri, uriToString } from './uri-parser'; -import { Http2SubchannelConnector } from './transport'; - -// 10 seconds in milliseconds. This value is arbitrary. -/** - * The amount of time in between checks for dropping subchannels that have no - * other references - */ -const REF_CHECK_INTERVAL = 10_000; - -export class SubchannelPool { - private pool: { - [channelTarget: string]: Array<{ - subchannelAddress: SubchannelAddress; - channelArguments: ChannelOptions; - channelCredentials: ChannelCredentials; - subchannel: Subchannel; - }>; - } = Object.create(null); - - /** - * A timer of a task performing a periodic subchannel cleanup. - */ - private cleanupTimer: NodeJS.Timeout | null = null; - - /** - * A pool of subchannels use for making connections. Subchannels with the - * exact same parameters will be reused. - */ - constructor() {} - - /** - * Unrefs all unused subchannels and cancels the cleanup task if all - * subchannels have been unrefed. - */ - unrefUnusedSubchannels(): void { - let allSubchannelsUnrefed = true; - - /* These objects are created with Object.create(null), so they do not - * have a prototype, which means that for (... in ...) loops over them - * do not need to be filtered */ - // eslint-disable-disable-next-line:forin - for (const channelTarget in this.pool) { - const subchannelObjArray = this.pool[channelTarget]; - - const refedSubchannels = subchannelObjArray.filter( - value => !value.subchannel.unrefIfOneRef() - ); - - if (refedSubchannels.length > 0) { - allSubchannelsUnrefed = false; - } - - /* For each subchannel in the pool, try to unref it if it has - * exactly one ref (which is the ref from the pool itself). If that - * does happen, remove the subchannel from the pool */ - this.pool[channelTarget] = refedSubchannels; - } - /* Currently we do not delete keys with empty values. If that results - * in significant memory usage we should change it. */ - - // Cancel the cleanup task if all subchannels have been unrefed. - if (allSubchannelsUnrefed && this.cleanupTimer !== null) { - clearInterval(this.cleanupTimer); - this.cleanupTimer = null; - } - } - - /** - * Ensures that the cleanup task is spawned. - */ - ensureCleanupTask(): void { - if (this.cleanupTimer === null) { - this.cleanupTimer = setInterval(() => { - this.unrefUnusedSubchannels(); - }, REF_CHECK_INTERVAL); - - // Unref because this timer should not keep the event loop running. - // Call unref only if it exists to address electron/electron#21162 - this.cleanupTimer.unref?.(); - } - } - - /** - * Get a subchannel if one already exists with exactly matching parameters. - * Otherwise, create and save a subchannel with those parameters. - * @param channelTarget - * @param subchannelTarget - * @param channelArguments - * @param channelCredentials - */ - getOrCreateSubchannel( - channelTargetUri: GrpcUri, - subchannelTarget: SubchannelAddress, - channelArguments: ChannelOptions, - channelCredentials: ChannelCredentials - ): Subchannel { - this.ensureCleanupTask(); - const channelTarget = uriToString(channelTargetUri); - if (channelTarget in this.pool) { - const subchannelObjArray = this.pool[channelTarget]; - for (const subchannelObj of subchannelObjArray) { - if ( - subchannelAddressEqual( - subchannelTarget, - subchannelObj.subchannelAddress - ) && - channelOptionsEqual( - channelArguments, - subchannelObj.channelArguments - ) && - channelCredentials._equals(subchannelObj.channelCredentials) - ) { - return subchannelObj.subchannel; - } - } - } - // If we get here, no matching subchannel was found - const subchannel = new Subchannel( - channelTargetUri, - subchannelTarget, - channelArguments, - channelCredentials, - new Http2SubchannelConnector(channelTargetUri) - ); - if (!(channelTarget in this.pool)) { - this.pool[channelTarget] = []; - } - this.pool[channelTarget].push({ - subchannelAddress: subchannelTarget, - channelArguments, - channelCredentials, - subchannel, - }); - subchannel.ref(); - return subchannel; - } -} - -const globalSubchannelPool = new SubchannelPool(); - -/** - * Get either the global subchannel pool, or a new subchannel pool. - * @param global - */ -export function getSubchannelPool(global: boolean): SubchannelPool { - if (global) { - return globalSubchannelPool; - } else { - return new SubchannelPool(); - } -} diff --git a/node_modules/@grpc/grpc-js/src/subchannel.ts b/node_modules/@grpc/grpc-js/src/subchannel.ts deleted file mode 100644 index 1156a0c..0000000 --- a/node_modules/@grpc/grpc-js/src/subchannel.ts +++ /dev/null @@ -1,559 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { ChannelCredentials, SecureConnector } from './channel-credentials'; -import { Metadata } from './metadata'; -import { ChannelOptions } from './channel-options'; -import { ConnectivityState } from './connectivity-state'; -import { BackoffTimeout, BackoffOptions } from './backoff-timeout'; -import * as logging from './logging'; -import { LogVerbosity, Status } from './constants'; -import { GrpcUri, uriToString } from './uri-parser'; -import { - SubchannelAddress, - subchannelAddressToString, -} from './subchannel-address'; -import { - SubchannelRef, - ChannelzTrace, - ChannelzChildrenTracker, - ChannelzChildrenTrackerStub, - SubchannelInfo, - registerChannelzSubchannel, - ChannelzCallTracker, - ChannelzCallTrackerStub, - unregisterChannelzRef, - ChannelzTraceStub, -} from './channelz'; -import { - ConnectivityStateListener, - DataWatcher, - SubchannelInterface, -} from './subchannel-interface'; -import { SubchannelCallInterceptingListener } from './subchannel-call'; -import { SubchannelCall } from './subchannel-call'; -import { CallEventTracker, SubchannelConnector, Transport } from './transport'; -import { CallCredentials } from './call-credentials'; -import { SingleSubchannelChannel } from './single-subchannel-channel'; -import { Channel } from './channel'; - -const TRACER_NAME = 'subchannel'; - -/* setInterval and setTimeout only accept signed 32 bit integers. JS doesn't - * have a constant for the max signed 32 bit integer, so this is a simple way - * to calculate it */ -const KEEPALIVE_MAX_TIME_MS = ~(1 << 31); - -export interface DataProducer { - addDataWatcher(dataWatcher: DataWatcher): void; - removeDataWatcher(dataWatcher: DataWatcher): void; -} - -export class Subchannel implements SubchannelInterface { - /** - * The subchannel's current connectivity state. Invariant: `session` === `null` - * if and only if `connectivityState` is IDLE or TRANSIENT_FAILURE. - */ - private connectivityState: ConnectivityState = ConnectivityState.IDLE; - /** - * The underlying http2 session used to make requests. - */ - private transport: Transport | null = null; - /** - * Indicates that the subchannel should transition from TRANSIENT_FAILURE to - * CONNECTING instead of IDLE when the backoff timeout ends. - */ - private continueConnecting = false; - /** - * A list of listener functions that will be called whenever the connectivity - * state changes. Will be modified by `addConnectivityStateListener` and - * `removeConnectivityStateListener` - */ - private stateListeners: Set = new Set(); - - private backoffTimeout: BackoffTimeout; - - private keepaliveTime: number; - /** - * Tracks channels and subchannel pools with references to this subchannel - */ - private refcount = 0; - - /** - * A string representation of the subchannel address, for logging/tracing - */ - private subchannelAddressString: string; - - // Channelz info - private readonly channelzEnabled: boolean = true; - private channelzRef: SubchannelRef; - - private channelzTrace: ChannelzTrace | ChannelzTraceStub; - private callTracker: ChannelzCallTracker | ChannelzCallTrackerStub; - private childrenTracker: - | ChannelzChildrenTracker - | ChannelzChildrenTrackerStub; - - // Channelz socket info - private streamTracker: ChannelzCallTracker | ChannelzCallTrackerStub; - - private secureConnector: SecureConnector; - - private dataProducers: Map = new Map(); - - private subchannelChannel: Channel | null = null; - - /** - * A class representing a connection to a single backend. - * @param channelTarget The target string for the channel as a whole - * @param subchannelAddress The address for the backend that this subchannel - * will connect to - * @param options The channel options, plus any specific subchannel options - * for this subchannel - * @param credentials The channel credentials used to establish this - * connection - */ - constructor( - private channelTarget: GrpcUri, - private subchannelAddress: SubchannelAddress, - private options: ChannelOptions, - credentials: ChannelCredentials, - private connector: SubchannelConnector - ) { - const backoffOptions: BackoffOptions = { - initialDelay: options['grpc.initial_reconnect_backoff_ms'], - maxDelay: options['grpc.max_reconnect_backoff_ms'], - }; - this.backoffTimeout = new BackoffTimeout(() => { - this.handleBackoffTimer(); - }, backoffOptions); - this.backoffTimeout.unref(); - this.subchannelAddressString = subchannelAddressToString(subchannelAddress); - - this.keepaliveTime = options['grpc.keepalive_time_ms'] ?? -1; - - if (options['grpc.enable_channelz'] === 0) { - this.channelzEnabled = false; - this.channelzTrace = new ChannelzTraceStub(); - this.callTracker = new ChannelzCallTrackerStub(); - this.childrenTracker = new ChannelzChildrenTrackerStub(); - this.streamTracker = new ChannelzCallTrackerStub(); - } else { - this.channelzTrace = new ChannelzTrace(); - this.callTracker = new ChannelzCallTracker(); - this.childrenTracker = new ChannelzChildrenTracker(); - this.streamTracker = new ChannelzCallTracker(); - } - - this.channelzRef = registerChannelzSubchannel( - this.subchannelAddressString, - () => this.getChannelzInfo(), - this.channelzEnabled - ); - - this.channelzTrace.addTrace('CT_INFO', 'Subchannel created'); - this.trace( - 'Subchannel constructed with options ' + - JSON.stringify(options, undefined, 2) - ); - this.secureConnector = credentials._createSecureConnector(channelTarget, options); - } - - private getChannelzInfo(): SubchannelInfo { - return { - state: this.connectivityState, - trace: this.channelzTrace, - callTracker: this.callTracker, - children: this.childrenTracker.getChildLists(), - target: this.subchannelAddressString, - }; - } - - private trace(text: string): void { - logging.trace( - LogVerbosity.DEBUG, - TRACER_NAME, - '(' + - this.channelzRef.id + - ') ' + - this.subchannelAddressString + - ' ' + - text - ); - } - - private refTrace(text: string): void { - logging.trace( - LogVerbosity.DEBUG, - 'subchannel_refcount', - '(' + - this.channelzRef.id + - ') ' + - this.subchannelAddressString + - ' ' + - text - ); - } - - private handleBackoffTimer() { - if (this.continueConnecting) { - this.transitionToState( - [ConnectivityState.TRANSIENT_FAILURE], - ConnectivityState.CONNECTING - ); - } else { - this.transitionToState( - [ConnectivityState.TRANSIENT_FAILURE], - ConnectivityState.IDLE - ); - } - } - - /** - * Start a backoff timer with the current nextBackoff timeout - */ - private startBackoff() { - this.backoffTimeout.runOnce(); - } - - private stopBackoff() { - this.backoffTimeout.stop(); - this.backoffTimeout.reset(); - } - - private startConnectingInternal() { - let options = this.options; - if (options['grpc.keepalive_time_ms']) { - const adjustedKeepaliveTime = Math.min( - this.keepaliveTime, - KEEPALIVE_MAX_TIME_MS - ); - options = { ...options, 'grpc.keepalive_time_ms': adjustedKeepaliveTime }; - } - this.connector - .connect(this.subchannelAddress, this.secureConnector, options) - .then( - transport => { - if ( - this.transitionToState( - [ConnectivityState.CONNECTING], - ConnectivityState.READY - ) - ) { - this.transport = transport; - if (this.channelzEnabled) { - this.childrenTracker.refChild(transport.getChannelzRef()); - } - transport.addDisconnectListener(tooManyPings => { - this.transitionToState( - [ConnectivityState.READY], - ConnectivityState.IDLE - ); - if (tooManyPings && this.keepaliveTime > 0) { - this.keepaliveTime *= 2; - logging.log( - LogVerbosity.ERROR, - `Connection to ${uriToString(this.channelTarget)} at ${ - this.subchannelAddressString - } rejected by server because of excess pings. Increasing ping interval to ${ - this.keepaliveTime - } ms` - ); - } - }); - } else { - /* If we can't transition from CONNECTING to READY here, we will - * not be using this transport, so release its resources. */ - transport.shutdown(); - } - }, - error => { - this.transitionToState( - [ConnectivityState.CONNECTING], - ConnectivityState.TRANSIENT_FAILURE, - `${error}` - ); - } - ); - } - - /** - * Initiate a state transition from any element of oldStates to the new - * state. If the current connectivityState is not in oldStates, do nothing. - * @param oldStates The set of states to transition from - * @param newState The state to transition to - * @returns True if the state changed, false otherwise - */ - private transitionToState( - oldStates: ConnectivityState[], - newState: ConnectivityState, - errorMessage?: string - ): boolean { - if (oldStates.indexOf(this.connectivityState) === -1) { - return false; - } - if (errorMessage) { - this.trace( - ConnectivityState[this.connectivityState] + - ' -> ' + - ConnectivityState[newState] + - ' with error "' + errorMessage + '"' - ); - - } else { - this.trace( - ConnectivityState[this.connectivityState] + - ' -> ' + - ConnectivityState[newState] - ); - } - if (this.channelzEnabled) { - this.channelzTrace.addTrace( - 'CT_INFO', - 'Connectivity state change to ' + ConnectivityState[newState] - ); - } - const previousState = this.connectivityState; - this.connectivityState = newState; - switch (newState) { - case ConnectivityState.READY: - this.stopBackoff(); - break; - case ConnectivityState.CONNECTING: - this.startBackoff(); - this.startConnectingInternal(); - this.continueConnecting = false; - break; - case ConnectivityState.TRANSIENT_FAILURE: - if (this.channelzEnabled && this.transport) { - this.childrenTracker.unrefChild(this.transport.getChannelzRef()); - } - this.transport?.shutdown(); - this.transport = null; - /* If the backoff timer has already ended by the time we get to the - * TRANSIENT_FAILURE state, we want to immediately transition out of - * TRANSIENT_FAILURE as though the backoff timer is ending right now */ - if (!this.backoffTimeout.isRunning()) { - process.nextTick(() => { - this.handleBackoffTimer(); - }); - } - break; - case ConnectivityState.IDLE: - if (this.channelzEnabled && this.transport) { - this.childrenTracker.unrefChild(this.transport.getChannelzRef()); - } - this.transport?.shutdown(); - this.transport = null; - break; - default: - throw new Error(`Invalid state: unknown ConnectivityState ${newState}`); - } - for (const listener of this.stateListeners) { - listener(this, previousState, newState, this.keepaliveTime, errorMessage); - } - return true; - } - - ref() { - this.refTrace('refcount ' + this.refcount + ' -> ' + (this.refcount + 1)); - this.refcount += 1; - } - - unref() { - this.refTrace('refcount ' + this.refcount + ' -> ' + (this.refcount - 1)); - this.refcount -= 1; - if (this.refcount === 0) { - this.channelzTrace.addTrace('CT_INFO', 'Shutting down'); - unregisterChannelzRef(this.channelzRef); - this.secureConnector.destroy(); - process.nextTick(() => { - this.transitionToState( - [ConnectivityState.CONNECTING, ConnectivityState.READY], - ConnectivityState.IDLE - ); - }); - } - } - - unrefIfOneRef(): boolean { - if (this.refcount === 1) { - this.unref(); - return true; - } - return false; - } - - createCall( - metadata: Metadata, - host: string, - method: string, - listener: SubchannelCallInterceptingListener - ): SubchannelCall { - if (!this.transport) { - throw new Error('Cannot create call, subchannel not READY'); - } - let statsTracker: Partial; - if (this.channelzEnabled) { - this.callTracker.addCallStarted(); - this.streamTracker.addCallStarted(); - statsTracker = { - onCallEnd: status => { - if (status.code === Status.OK) { - this.callTracker.addCallSucceeded(); - } else { - this.callTracker.addCallFailed(); - } - }, - }; - } else { - statsTracker = {}; - } - return this.transport.createCall( - metadata, - host, - method, - listener, - statsTracker - ); - } - - /** - * If the subchannel is currently IDLE, start connecting and switch to the - * CONNECTING state. If the subchannel is current in TRANSIENT_FAILURE, - * the next time it would transition to IDLE, start connecting again instead. - * Otherwise, do nothing. - */ - startConnecting() { - process.nextTick(() => { - /* First, try to transition from IDLE to connecting. If that doesn't happen - * because the state is not currently IDLE, check if it is - * TRANSIENT_FAILURE, and if so indicate that it should go back to - * connecting after the backoff timer ends. Otherwise do nothing */ - if ( - !this.transitionToState( - [ConnectivityState.IDLE], - ConnectivityState.CONNECTING - ) - ) { - if (this.connectivityState === ConnectivityState.TRANSIENT_FAILURE) { - this.continueConnecting = true; - } - } - }); - } - - /** - * Get the subchannel's current connectivity state. - */ - getConnectivityState() { - return this.connectivityState; - } - - /** - * Add a listener function to be called whenever the subchannel's - * connectivity state changes. - * @param listener - */ - addConnectivityStateListener(listener: ConnectivityStateListener) { - this.stateListeners.add(listener); - } - - /** - * Remove a listener previously added with `addConnectivityStateListener` - * @param listener A reference to a function previously passed to - * `addConnectivityStateListener` - */ - removeConnectivityStateListener(listener: ConnectivityStateListener) { - this.stateListeners.delete(listener); - } - - /** - * Reset the backoff timeout, and immediately start connecting if in backoff. - */ - resetBackoff() { - process.nextTick(() => { - this.backoffTimeout.reset(); - this.transitionToState( - [ConnectivityState.TRANSIENT_FAILURE], - ConnectivityState.CONNECTING - ); - }); - } - - getAddress(): string { - return this.subchannelAddressString; - } - - getChannelzRef(): SubchannelRef { - return this.channelzRef; - } - - isHealthy(): boolean { - return true; - } - - addHealthStateWatcher(listener: (healthy: boolean) => void): void { - // Do nothing with the listener - } - - removeHealthStateWatcher(listener: (healthy: boolean) => void): void { - // Do nothing with the listener - } - - getRealSubchannel(): this { - return this; - } - - realSubchannelEquals(other: SubchannelInterface): boolean { - return other.getRealSubchannel() === this; - } - - throttleKeepalive(newKeepaliveTime: number) { - if (newKeepaliveTime > this.keepaliveTime) { - this.keepaliveTime = newKeepaliveTime; - } - } - getCallCredentials(): CallCredentials { - return this.secureConnector.getCallCredentials(); - } - - getChannel(): Channel { - if (!this.subchannelChannel) { - this.subchannelChannel = new SingleSubchannelChannel(this, this.channelTarget, this.options); - } - return this.subchannelChannel; - } - - addDataWatcher(dataWatcher: DataWatcher): void { - throw new Error('Not implemented'); - } - - getOrCreateDataProducer(name: string, createDataProducer: (subchannel: Subchannel) => DataProducer): DataProducer { - const existingProducer = this.dataProducers.get(name); - if (existingProducer){ - return existingProducer; - } - const newProducer = createDataProducer(this); - this.dataProducers.set(name, newProducer); - return newProducer; - } - - removeDataProducer(name: string) { - this.dataProducers.delete(name); - } -} diff --git a/node_modules/@grpc/grpc-js/src/tls-helpers.ts b/node_modules/@grpc/grpc-js/src/tls-helpers.ts deleted file mode 100644 index 3f7a62e..0000000 --- a/node_modules/@grpc/grpc-js/src/tls-helpers.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import * as fs from 'fs'; - -export const CIPHER_SUITES: string | undefined = - process.env.GRPC_SSL_CIPHER_SUITES; - -const DEFAULT_ROOTS_FILE_PATH = process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH; - -let defaultRootsData: Buffer | null = null; - -export function getDefaultRootsData(): Buffer | null { - if (DEFAULT_ROOTS_FILE_PATH) { - if (defaultRootsData === null) { - defaultRootsData = fs.readFileSync(DEFAULT_ROOTS_FILE_PATH); - } - return defaultRootsData; - } - return null; -} diff --git a/node_modules/@grpc/grpc-js/src/transport.ts b/node_modules/@grpc/grpc-js/src/transport.ts deleted file mode 100644 index a1cca59..0000000 --- a/node_modules/@grpc/grpc-js/src/transport.ts +++ /dev/null @@ -1,825 +0,0 @@ -/* - * Copyright 2023 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import * as http2 from 'http2'; -import { - CipherNameAndProtocol, - TLSSocket, -} from 'tls'; -import { PartialStatusObject } from './call-interface'; -import { SecureConnector, SecureConnectResult } from './channel-credentials'; -import { ChannelOptions } from './channel-options'; -import { - ChannelzCallTracker, - ChannelzCallTrackerStub, - registerChannelzSocket, - SocketInfo, - SocketRef, - TlsInfo, - unregisterChannelzRef, -} from './channelz'; -import { LogVerbosity } from './constants'; -import { getProxiedConnection } from './http_proxy'; -import * as logging from './logging'; -import { getDefaultAuthority } from './resolver'; -import { - stringToSubchannelAddress, - SubchannelAddress, - subchannelAddressToString, -} from './subchannel-address'; -import { GrpcUri, parseUri, uriToString } from './uri-parser'; -import * as net from 'net'; -import { - Http2SubchannelCall, - SubchannelCall, - SubchannelCallInterceptingListener, -} from './subchannel-call'; -import { Metadata } from './metadata'; -import { getNextCallNumber } from './call-number'; -import { Socket } from 'net'; -import { AuthContext } from './auth-context'; - -const TRACER_NAME = 'transport'; -const FLOW_CONTROL_TRACER_NAME = 'transport_flowctrl'; - -const clientVersion = require('../../package.json').version; - -const { - HTTP2_HEADER_AUTHORITY, - HTTP2_HEADER_CONTENT_TYPE, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_HEADER_TE, - HTTP2_HEADER_USER_AGENT, -} = http2.constants; - -const KEEPALIVE_TIMEOUT_MS = 20000; - -export interface CallEventTracker { - addMessageSent(): void; - addMessageReceived(): void; - onCallEnd(status: PartialStatusObject): void; - onStreamEnd(success: boolean): void; -} - -export interface TransportDisconnectListener { - (tooManyPings: boolean): void; -} - -export interface Transport { - getChannelzRef(): SocketRef; - getPeerName(): string; - getOptions(): ChannelOptions; - getAuthContext(): AuthContext; - createCall( - metadata: Metadata, - host: string, - method: string, - listener: SubchannelCallInterceptingListener, - subchannelCallStatsTracker: Partial - ): SubchannelCall; - addDisconnectListener(listener: TransportDisconnectListener): void; - shutdown(): void; -} - -const tooManyPingsData: Buffer = Buffer.from('too_many_pings', 'ascii'); - -class Http2Transport implements Transport { - /** - * The amount of time in between sending pings - */ - private readonly keepaliveTimeMs: number; - /** - * The amount of time to wait for an acknowledgement after sending a ping - */ - private readonly keepaliveTimeoutMs: number; - /** - * Indicates whether keepalive pings should be sent without any active calls - */ - private readonly keepaliveWithoutCalls: boolean; - /** - * Timer reference indicating when to send the next ping or when the most recent ping will be considered lost. - */ - private keepaliveTimer: NodeJS.Timeout | null = null; - /** - * Indicates that the keepalive timer ran out while there were no active - * calls, and a ping should be sent the next time a call starts. - */ - private pendingSendKeepalivePing = false; - - private userAgent: string; - - private activeCalls: Set = new Set(); - - private subchannelAddressString: string; - - private disconnectListeners: TransportDisconnectListener[] = []; - - private disconnectHandled = false; - - private authContext: AuthContext; - - // Channelz info - private channelzRef: SocketRef; - private readonly channelzEnabled: boolean = true; - private streamTracker: ChannelzCallTracker | ChannelzCallTrackerStub; - private keepalivesSent = 0; - private messagesSent = 0; - private messagesReceived = 0; - private lastMessageSentTimestamp: Date | null = null; - private lastMessageReceivedTimestamp: Date | null = null; - - constructor( - private session: http2.ClientHttp2Session, - subchannelAddress: SubchannelAddress, - private options: ChannelOptions, - /** - * Name of the remote server, if it is not the same as the subchannel - * address, i.e. if connecting through an HTTP CONNECT proxy. - */ - private remoteName: string | null - ) { - /* Populate subchannelAddressString and channelzRef before doing anything - * else, because they are used in the trace methods. */ - this.subchannelAddressString = subchannelAddressToString(subchannelAddress); - - if (options['grpc.enable_channelz'] === 0) { - this.channelzEnabled = false; - this.streamTracker = new ChannelzCallTrackerStub(); - } else { - this.streamTracker = new ChannelzCallTracker(); - } - - this.channelzRef = registerChannelzSocket( - this.subchannelAddressString, - () => this.getChannelzInfo(), - this.channelzEnabled - ); - - // Build user-agent string. - this.userAgent = [ - options['grpc.primary_user_agent'], - `grpc-node-js/${clientVersion}`, - options['grpc.secondary_user_agent'], - ] - .filter(e => e) - .join(' '); // remove falsey values first - - if ('grpc.keepalive_time_ms' in options) { - this.keepaliveTimeMs = options['grpc.keepalive_time_ms']!; - } else { - this.keepaliveTimeMs = -1; - } - if ('grpc.keepalive_timeout_ms' in options) { - this.keepaliveTimeoutMs = options['grpc.keepalive_timeout_ms']!; - } else { - this.keepaliveTimeoutMs = KEEPALIVE_TIMEOUT_MS; - } - if ('grpc.keepalive_permit_without_calls' in options) { - this.keepaliveWithoutCalls = - options['grpc.keepalive_permit_without_calls'] === 1; - } else { - this.keepaliveWithoutCalls = false; - } - - session.once('close', () => { - this.trace('session closed'); - this.handleDisconnect(); - }); - - session.once( - 'goaway', - (errorCode: number, lastStreamID: number, opaqueData?: Buffer) => { - let tooManyPings = false; - /* See the last paragraph of - * https://github.com/grpc/proposal/blob/master/A8-client-side-keepalive.md#basic-keepalive */ - if ( - errorCode === http2.constants.NGHTTP2_ENHANCE_YOUR_CALM && - opaqueData && - opaqueData.equals(tooManyPingsData) - ) { - tooManyPings = true; - } - this.trace( - 'connection closed by GOAWAY with code ' + - errorCode + - ' and data ' + - opaqueData?.toString() - ); - this.reportDisconnectToOwner(tooManyPings); - } - ); - - session.once('error', error => { - this.trace('connection closed with error ' + (error as Error).message); - this.handleDisconnect(); - }); - - session.socket.once('close', (hadError) => { - this.trace('connection closed. hadError=' + hadError); - this.handleDisconnect(); - }); - - if (logging.isTracerEnabled(TRACER_NAME)) { - session.on('remoteSettings', (settings: http2.Settings) => { - this.trace( - 'new settings received' + - (this.session !== session ? ' on the old connection' : '') + - ': ' + - JSON.stringify(settings) - ); - }); - session.on('localSettings', (settings: http2.Settings) => { - this.trace( - 'local settings acknowledged by remote' + - (this.session !== session ? ' on the old connection' : '') + - ': ' + - JSON.stringify(settings) - ); - }); - } - - /* Start the keepalive timer last, because this can trigger trace logs, - * which should only happen after everything else is set up. */ - if (this.keepaliveWithoutCalls) { - this.maybeStartKeepalivePingTimer(); - } - - if (session.socket instanceof TLSSocket) { - this.authContext = { - transportSecurityType: 'ssl', - sslPeerCertificate: session.socket.getPeerCertificate() - }; - } else { - this.authContext = {}; - } - } - - private getChannelzInfo(): SocketInfo { - const sessionSocket = this.session.socket; - const remoteAddress = sessionSocket.remoteAddress - ? stringToSubchannelAddress( - sessionSocket.remoteAddress, - sessionSocket.remotePort - ) - : null; - const localAddress = sessionSocket.localAddress - ? stringToSubchannelAddress( - sessionSocket.localAddress, - sessionSocket.localPort - ) - : null; - let tlsInfo: TlsInfo | null; - if (this.session.encrypted) { - const tlsSocket: TLSSocket = sessionSocket as TLSSocket; - const cipherInfo: CipherNameAndProtocol & { standardName?: string } = - tlsSocket.getCipher(); - const certificate = tlsSocket.getCertificate(); - const peerCertificate = tlsSocket.getPeerCertificate(); - tlsInfo = { - cipherSuiteStandardName: cipherInfo.standardName ?? null, - cipherSuiteOtherName: cipherInfo.standardName ? null : cipherInfo.name, - localCertificate: - certificate && 'raw' in certificate ? certificate.raw : null, - remoteCertificate: - peerCertificate && 'raw' in peerCertificate - ? peerCertificate.raw - : null, - }; - } else { - tlsInfo = null; - } - const socketInfo: SocketInfo = { - remoteAddress: remoteAddress, - localAddress: localAddress, - security: tlsInfo, - remoteName: this.remoteName, - streamsStarted: this.streamTracker.callsStarted, - streamsSucceeded: this.streamTracker.callsSucceeded, - streamsFailed: this.streamTracker.callsFailed, - messagesSent: this.messagesSent, - messagesReceived: this.messagesReceived, - keepAlivesSent: this.keepalivesSent, - lastLocalStreamCreatedTimestamp: - this.streamTracker.lastCallStartedTimestamp, - lastRemoteStreamCreatedTimestamp: null, - lastMessageSentTimestamp: this.lastMessageSentTimestamp, - lastMessageReceivedTimestamp: this.lastMessageReceivedTimestamp, - localFlowControlWindow: this.session.state.localWindowSize ?? null, - remoteFlowControlWindow: this.session.state.remoteWindowSize ?? null, - }; - return socketInfo; - } - - private trace(text: string): void { - logging.trace( - LogVerbosity.DEBUG, - TRACER_NAME, - '(' + - this.channelzRef.id + - ') ' + - this.subchannelAddressString + - ' ' + - text - ); - } - - private keepaliveTrace(text: string): void { - logging.trace( - LogVerbosity.DEBUG, - 'keepalive', - '(' + - this.channelzRef.id + - ') ' + - this.subchannelAddressString + - ' ' + - text - ); - } - - private flowControlTrace(text: string): void { - logging.trace( - LogVerbosity.DEBUG, - FLOW_CONTROL_TRACER_NAME, - '(' + - this.channelzRef.id + - ') ' + - this.subchannelAddressString + - ' ' + - text - ); - } - - private internalsTrace(text: string): void { - logging.trace( - LogVerbosity.DEBUG, - 'transport_internals', - '(' + - this.channelzRef.id + - ') ' + - this.subchannelAddressString + - ' ' + - text - ); - } - - /** - * Indicate to the owner of this object that this transport should no longer - * be used. That happens if the connection drops, or if the server sends a - * GOAWAY. - * @param tooManyPings If true, this was triggered by a GOAWAY with data - * indicating that the session was closed becaues the client sent too many - * pings. - * @returns - */ - private reportDisconnectToOwner(tooManyPings: boolean) { - if (this.disconnectHandled) { - return; - } - this.disconnectHandled = true; - this.disconnectListeners.forEach(listener => listener(tooManyPings)); - } - - /** - * Handle connection drops, but not GOAWAYs. - */ - private handleDisconnect() { - this.clearKeepaliveTimeout(); - this.reportDisconnectToOwner(false); - for (const call of this.activeCalls) { - call.onDisconnect(); - } - // Wait an event loop cycle before destroying the connection - setImmediate(() => { - this.session.destroy(); - }); - } - - addDisconnectListener(listener: TransportDisconnectListener): void { - this.disconnectListeners.push(listener); - } - - private canSendPing() { - return ( - !this.session.destroyed && - this.keepaliveTimeMs > 0 && - (this.keepaliveWithoutCalls || this.activeCalls.size > 0) - ); - } - - private maybeSendPing() { - if (!this.canSendPing()) { - this.pendingSendKeepalivePing = true; - return; - } - if (this.keepaliveTimer) { - console.error('keepaliveTimeout is not null'); - return; - } - if (this.channelzEnabled) { - this.keepalivesSent += 1; - } - this.keepaliveTrace( - 'Sending ping with timeout ' + this.keepaliveTimeoutMs + 'ms' - ); - this.keepaliveTimer = setTimeout(() => { - this.keepaliveTimer = null; - this.keepaliveTrace('Ping timeout passed without response'); - this.handleDisconnect(); - }, this.keepaliveTimeoutMs); - this.keepaliveTimer.unref?.(); - let pingSendError = ''; - try { - const pingSentSuccessfully = this.session.ping( - (err: Error | null, duration: number, payload: Buffer) => { - this.clearKeepaliveTimeout(); - if (err) { - this.keepaliveTrace('Ping failed with error ' + err.message); - this.handleDisconnect(); - } else { - this.keepaliveTrace('Received ping response'); - this.maybeStartKeepalivePingTimer(); - } - } - ); - if (!pingSentSuccessfully) { - pingSendError = 'Ping returned false'; - } - } catch (e) { - // grpc/grpc-node#2139 - pingSendError = (e instanceof Error ? e.message : '') || 'Unknown error'; - } - if (pingSendError) { - this.keepaliveTrace('Ping send failed: ' + pingSendError); - this.handleDisconnect(); - } - } - - /** - * Starts the keepalive ping timer if appropriate. If the timer already ran - * out while there were no active requests, instead send a ping immediately. - * If the ping timer is already running or a ping is currently in flight, - * instead do nothing and wait for them to resolve. - */ - private maybeStartKeepalivePingTimer() { - if (!this.canSendPing()) { - return; - } - if (this.pendingSendKeepalivePing) { - this.pendingSendKeepalivePing = false; - this.maybeSendPing(); - } else if (!this.keepaliveTimer) { - this.keepaliveTrace( - 'Starting keepalive timer for ' + this.keepaliveTimeMs + 'ms' - ); - this.keepaliveTimer = setTimeout(() => { - this.keepaliveTimer = null; - this.maybeSendPing(); - }, this.keepaliveTimeMs); - this.keepaliveTimer.unref?.(); - } - /* Otherwise, there is already either a keepalive timer or a ping pending, - * wait for those to resolve. */ - } - - /** - * Clears whichever keepalive timeout is currently active, if any. - */ - private clearKeepaliveTimeout() { - if (this.keepaliveTimer) { - clearTimeout(this.keepaliveTimer); - this.keepaliveTimer = null; - } - } - - private removeActiveCall(call: Http2SubchannelCall) { - this.activeCalls.delete(call); - if (this.activeCalls.size === 0) { - this.session.unref(); - } - } - - private addActiveCall(call: Http2SubchannelCall) { - this.activeCalls.add(call); - if (this.activeCalls.size === 1) { - this.session.ref(); - if (!this.keepaliveWithoutCalls) { - this.maybeStartKeepalivePingTimer(); - } - } - } - - createCall( - metadata: Metadata, - host: string, - method: string, - listener: SubchannelCallInterceptingListener, - subchannelCallStatsTracker: Partial - ): Http2SubchannelCall { - const headers = metadata.toHttp2Headers(); - headers[HTTP2_HEADER_AUTHORITY] = host; - headers[HTTP2_HEADER_USER_AGENT] = this.userAgent; - headers[HTTP2_HEADER_CONTENT_TYPE] = 'application/grpc'; - headers[HTTP2_HEADER_METHOD] = 'POST'; - headers[HTTP2_HEADER_PATH] = method; - headers[HTTP2_HEADER_TE] = 'trailers'; - let http2Stream: http2.ClientHttp2Stream; - /* In theory, if an error is thrown by session.request because session has - * become unusable (e.g. because it has received a goaway), this subchannel - * should soon see the corresponding close or goaway event anyway and leave - * READY. But we have seen reports that this does not happen - * (https://github.com/googleapis/nodejs-firestore/issues/1023#issuecomment-653204096) - * so for defense in depth, we just discard the session when we see an - * error here. - */ - try { - http2Stream = this.session.request(headers); - } catch (e) { - this.handleDisconnect(); - throw e; - } - this.flowControlTrace( - 'local window size: ' + - this.session.state.localWindowSize + - ' remote window size: ' + - this.session.state.remoteWindowSize - ); - this.internalsTrace( - 'session.closed=' + - this.session.closed + - ' session.destroyed=' + - this.session.destroyed + - ' session.socket.destroyed=' + - this.session.socket.destroyed - ); - let eventTracker: CallEventTracker; - // eslint-disable-next-line prefer-const - let call: Http2SubchannelCall; - if (this.channelzEnabled) { - this.streamTracker.addCallStarted(); - eventTracker = { - addMessageSent: () => { - this.messagesSent += 1; - this.lastMessageSentTimestamp = new Date(); - subchannelCallStatsTracker.addMessageSent?.(); - }, - addMessageReceived: () => { - this.messagesReceived += 1; - this.lastMessageReceivedTimestamp = new Date(); - subchannelCallStatsTracker.addMessageReceived?.(); - }, - onCallEnd: status => { - subchannelCallStatsTracker.onCallEnd?.(status); - this.removeActiveCall(call); - }, - onStreamEnd: success => { - if (success) { - this.streamTracker.addCallSucceeded(); - } else { - this.streamTracker.addCallFailed(); - } - subchannelCallStatsTracker.onStreamEnd?.(success); - }, - }; - } else { - eventTracker = { - addMessageSent: () => { - subchannelCallStatsTracker.addMessageSent?.(); - }, - addMessageReceived: () => { - subchannelCallStatsTracker.addMessageReceived?.(); - }, - onCallEnd: status => { - subchannelCallStatsTracker.onCallEnd?.(status); - this.removeActiveCall(call); - }, - onStreamEnd: success => { - subchannelCallStatsTracker.onStreamEnd?.(success); - }, - }; - } - call = new Http2SubchannelCall( - http2Stream, - eventTracker, - listener, - this, - getNextCallNumber() - ); - this.addActiveCall(call); - return call; - } - - getChannelzRef(): SocketRef { - return this.channelzRef; - } - - getPeerName() { - return this.subchannelAddressString; - } - - getOptions() { - return this.options; - } - - getAuthContext(): AuthContext { - return this.authContext; - } - - shutdown() { - this.session.close(); - unregisterChannelzRef(this.channelzRef); - } -} - -export interface SubchannelConnector { - connect( - address: SubchannelAddress, - secureConnector: SecureConnector, - options: ChannelOptions - ): Promise; - shutdown(): void; -} - -export class Http2SubchannelConnector implements SubchannelConnector { - private session: http2.ClientHttp2Session | null = null; - private isShutdown = false; - constructor(private channelTarget: GrpcUri) {} - - private trace(text: string) { - logging.trace( - LogVerbosity.DEBUG, - TRACER_NAME, - uriToString(this.channelTarget) + ' ' + text - ); - } - - private createSession( - secureConnectResult: SecureConnectResult, - address: SubchannelAddress, - options: ChannelOptions - ): Promise { - if (this.isShutdown) { - return Promise.reject(); - } - - if (secureConnectResult.socket.closed) { - return Promise.reject('Connection closed before starting HTTP/2 handshake'); - } - - return new Promise((resolve, reject) => { - let remoteName: string | null = null; - let realTarget: GrpcUri = this.channelTarget; - if ('grpc.http_connect_target' in options) { - const parsedTarget = parseUri(options['grpc.http_connect_target']!); - if (parsedTarget) { - realTarget = parsedTarget; - remoteName = uriToString(parsedTarget); - } - } - const scheme = secureConnectResult.secure ? 'https' : 'http'; - const targetPath = getDefaultAuthority(realTarget); - const closeHandler = () => { - this.session?.destroy(); - this.session = null; - // Leave time for error event to happen before rejecting - setImmediate(() => { - if (!reportedError) { - reportedError = true; - reject(`${errorMessage.trim()} (${new Date().toISOString()})`); - } - }); - }; - const errorHandler = (error: Error) => { - this.session?.destroy(); - errorMessage = (error as Error).message; - this.trace('connection failed with error ' + errorMessage); - if (!reportedError) { - reportedError = true; - reject(`${errorMessage} (${new Date().toISOString()})`); - } - }; - const sessionOptions: http2.ClientSessionOptions = { - createConnection: (authority, option) => { - return secureConnectResult.socket; - }, - settings: { - initialWindowSize: - options['grpc-node.flow_control_window'] ?? - http2.getDefaultSettings?.()?.initialWindowSize ?? 65535, - }, - maxSendHeaderBlockLength: Number.MAX_SAFE_INTEGER, - /* By default, set a very large max session memory limit, to effectively - * disable enforcement of the limit. Some testing indicates that Node's - * behavior degrades badly when this limit is reached, so we solve that - * by disabling the check entirely. */ - maxSessionMemory: options['grpc-node.max_session_memory'] ?? Number.MAX_SAFE_INTEGER - }; - const session = http2.connect(`${scheme}://${targetPath}`, sessionOptions); - // Prepare window size configuration for remoteSettings handler - const defaultWin = http2.getDefaultSettings?.()?.initialWindowSize ?? 65535; // 65 535 B - const connWin = options[ - 'grpc-node.flow_control_window' - ] as number | undefined; - - this.session = session; - let errorMessage = 'Failed to connect'; - let reportedError = false; - session.unref(); - session.once('remoteSettings', () => { - // Send WINDOW_UPDATE now to avoid 65 KB start-window stall. - if (connWin && connWin > defaultWin) { - try { - // Node ≥ 14.18 - (session as any).setLocalWindowSize(connWin); - } catch { - // Older Node: bump by the delta - const delta = connWin - (session.state.localWindowSize ?? defaultWin); - if (delta > 0) (session as any).incrementWindowSize(delta); - } - } - - session.removeAllListeners(); - secureConnectResult.socket.removeListener('close', closeHandler); - secureConnectResult.socket.removeListener('error', errorHandler); - resolve(new Http2Transport(session, address, options, remoteName)); - this.session = null; - }); - session.once('close', closeHandler); - session.once('error', errorHandler); - secureConnectResult.socket.once('close', closeHandler); - secureConnectResult.socket.once('error', errorHandler); - }); - } - - private tcpConnect(address: SubchannelAddress, options: ChannelOptions): Promise { - return getProxiedConnection(address, options).then(proxiedSocket => { - if (proxiedSocket) { - return proxiedSocket; - } else { - return new Promise((resolve, reject) => { - const closeCallback = () => { - reject(new Error('Socket closed')); - }; - const errorCallback = (error: Error) => { - reject(error); - } - const socket = net.connect(address, () => { - socket.removeListener('close', closeCallback); - socket.removeListener('error', errorCallback); - resolve(socket); - }); - socket.once('close', closeCallback); - socket.once('error', errorCallback); - }); - } - }); - } - - async connect( - address: SubchannelAddress, - secureConnector: SecureConnector, - options: ChannelOptions - ): Promise { - if (this.isShutdown) { - return Promise.reject(); - } - let tcpConnection: net.Socket | null = null; - let secureConnectResult: SecureConnectResult | null = null; - const addressString = subchannelAddressToString(address); - try { - this.trace(addressString + ' Waiting for secureConnector to be ready'); - await secureConnector.waitForReady(); - this.trace(addressString + ' secureConnector is ready'); - tcpConnection = await this.tcpConnect(address, options); - tcpConnection.setNoDelay(); - this.trace(addressString + ' Established TCP connection'); - secureConnectResult = await secureConnector.connect(tcpConnection); - this.trace(addressString + ' Established secure connection'); - return this.createSession(secureConnectResult, address, options); - } catch (e) { - tcpConnection?.destroy(); - secureConnectResult?.socket.destroy(); - throw e; - } - } - - shutdown(): void { - this.isShutdown = true; - this.session?.close(); - this.session = null; - } -} diff --git a/node_modules/@grpc/grpc-js/src/uri-parser.ts b/node_modules/@grpc/grpc-js/src/uri-parser.ts deleted file mode 100644 index 2b2efec..0000000 --- a/node_modules/@grpc/grpc-js/src/uri-parser.ts +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2020 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -export interface GrpcUri { - scheme?: string; - authority?: string; - path: string; -} - -/* - * The groups correspond to URI parts as follows: - * 1. scheme - * 2. authority - * 3. path - */ -const URI_REGEX = /^(?:([A-Za-z0-9+.-]+):)?(?:\/\/([^/]*)\/)?(.+)$/; - -export function parseUri(uriString: string): GrpcUri | null { - const parsedUri = URI_REGEX.exec(uriString); - if (parsedUri === null) { - return null; - } - return { - scheme: parsedUri[1], - authority: parsedUri[2], - path: parsedUri[3], - }; -} - -export interface HostPort { - host: string; - port?: number; -} - -const NUMBER_REGEX = /^\d+$/; - -export function splitHostPort(path: string): HostPort | null { - if (path.startsWith('[')) { - const hostEnd = path.indexOf(']'); - if (hostEnd === -1) { - return null; - } - const host = path.substring(1, hostEnd); - /* Only an IPv6 address should be in bracketed notation, and an IPv6 - * address should have at least one colon */ - if (host.indexOf(':') === -1) { - return null; - } - if (path.length > hostEnd + 1) { - if (path[hostEnd + 1] === ':') { - const portString = path.substring(hostEnd + 2); - if (NUMBER_REGEX.test(portString)) { - return { - host: host, - port: +portString, - }; - } else { - return null; - } - } else { - return null; - } - } else { - return { - host, - }; - } - } else { - const splitPath = path.split(':'); - /* Exactly one colon means that this is host:port. Zero colons means that - * there is no port. And multiple colons means that this is a bare IPv6 - * address with no port */ - if (splitPath.length === 2) { - if (NUMBER_REGEX.test(splitPath[1])) { - return { - host: splitPath[0], - port: +splitPath[1], - }; - } else { - return null; - } - } else { - return { - host: path, - }; - } - } -} - -export function combineHostPort(hostPort: HostPort): string { - if (hostPort.port === undefined) { - return hostPort.host; - } else { - // Only an IPv6 host should include a colon - if (hostPort.host.includes(':')) { - return `[${hostPort.host}]:${hostPort.port}`; - } else { - return `${hostPort.host}:${hostPort.port}`; - } - } -} - -export function uriToString(uri: GrpcUri): string { - let result = ''; - if (uri.scheme !== undefined) { - result += uri.scheme + ':'; - } - if (uri.authority !== undefined) { - result += '//' + uri.authority + '/'; - } - result += uri.path; - return result; -} diff --git a/node_modules/@grpc/proto-loader/LICENSE b/node_modules/@grpc/proto-loader/LICENSE deleted file mode 100644 index 8dada3e..0000000 --- a/node_modules/@grpc/proto-loader/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/@grpc/proto-loader/README.md b/node_modules/@grpc/proto-loader/README.md deleted file mode 100644 index 935c100..0000000 --- a/node_modules/@grpc/proto-loader/README.md +++ /dev/null @@ -1,140 +0,0 @@ -# gRPC Protobuf Loader - -A utility package for loading `.proto` files for use with gRPC, using the latest Protobuf.js package. -Please refer to [protobuf.js' documentation](https://github.com/dcodeIO/protobuf.js/blob/master/README.md) -to understands its features and limitations. - -## Installation - -```sh -npm install @grpc/proto-loader -``` - -## Usage - -```js -const protoLoader = require('@grpc/proto-loader'); -const grpcLibrary = require('grpc'); -// OR -const grpcLibrary = require('@grpc/grpc-js'); - -protoLoader.load(protoFileName, options).then(packageDefinition => { - const packageObject = grpcLibrary.loadPackageDefinition(packageDefinition); -}); -// OR -const packageDefinition = protoLoader.loadSync(protoFileName, options); -const packageObject = grpcLibrary.loadPackageDefinition(packageDefinition); -``` - -The options parameter is an object that can have the following optional properties: - -| Field name | Valid values | Description -|------------|--------------|------------ -| `keepCase` | `true` or `false` | Preserve field names. The default is to change them to camel case. -| `longs` | `String` or `Number` | The type to use to represent `long` values. Defaults to a `Long` object type. -| `enums` | `String` | The type to use to represent `enum` values. Defaults to the numeric value. -| `bytes` | `Array` or `String` | The type to use to represent `bytes` values. Defaults to `Buffer`. -| `defaults` | `true` or `false` | Set default values on output objects. Defaults to `false`. -| `arrays` | `true` or `false` | Set empty arrays for missing array values even if `defaults` is `false` Defaults to `false`. -| `objects` | `true` or `false` | Set empty objects for missing object values even if `defaults` is `false` Defaults to `false`. -| `oneofs` | `true` or `false` | Set virtual oneof properties to the present field's name. Defaults to `false`. -| `json` | `true` or `false` | Represent `Infinity` and `NaN` as strings in `float` fields, and automatically decode `google.protobuf.Any` values. Defaults to `false` -| `includeDirs` | An array of strings | A list of search paths for imported `.proto` files. - -The following options object closely approximates the existing behavior of `grpc.load`: - -```js -const options = { - keepCase: true, - longs: String, - enums: String, - defaults: true, - oneofs: true -} -``` - -## Generating TypeScript types - -The `proto-loader-gen-types` script distributed with this package can be used to generate TypeScript type information for the objects loaded at runtime. More information about how to use it can be found in [the *@grpc/proto-loader TypeScript Type Generator CLI Tool* proposal document](https://github.com/grpc/proposal/blob/master/L70-node-proto-loader-type-generator.md). The arguments mostly match the `load` function's options; the full usage information is as follows: - -```console -proto-loader-gen-types.js [options] filenames... - -Options: - --help Show help [boolean] - --version Show version number [boolean] - --keepCase Preserve the case of field names - [boolean] [default: false] - --longs The type that should be used to output 64 bit - integer values. Can be String, Number - [string] [default: "Long"] - --enums The type that should be used to output enum fields. - Can be String [string] [default: "number"] - --bytes The type that should be used to output bytes - fields. Can be String, Array - [string] [default: "Buffer"] - --defaults Output default values for omitted fields - [boolean] [default: false] - --arrays Output default values for omitted repeated fields - even if --defaults is not set - [boolean] [default: false] - --objects Output default values for omitted message fields - even if --defaults is not set - [boolean] [default: false] - --oneofs Output virtual oneof fields set to the present - field's name [boolean] [default: false] - --json Represent Infinity and NaN as strings in float - fields. Also decode google.protobuf.Any - automatically [boolean] [default: false] - --includeComments Generate doc comments from comments in the original - files [boolean] [default: false] - -I, --includeDirs Directories to search for included files [array] - -O, --outDir Directory in which to output files - [string] [required] - --grpcLib The gRPC implementation library that these types - will be used with. If not provided, some types will - not be generated [string] - --inputTemplate Template for mapping input or "permissive" type - names [string] [default: "%s"] - --outputTemplate Template for mapping output or "restricted" type - names [string] [default: "%s__Output"] - --inputBranded Output property for branded type for "permissive" - types with fullName of the Message as its value - [boolean] [default: false] - --outputBranded Output property for branded type for "restricted" - types with fullName of the Message as its value - [boolean] [default: false] - --targetFileExtension File extension for generated files. - [string] [default: ".ts"] - --importFileExtension File extension for import specifiers in generated - code. [string] [default: ""] -``` - -### Example Usage - -Generate the types: - -```sh -$(npm bin)/proto-loader-gen-types --longs=String --enums=String --defaults --oneofs --grpcLib=@grpc/grpc-js --outDir=proto/ proto/*.proto -``` - -Consume the types: - -```ts -import * as grpc from '@grpc/grpc-js'; -import * as protoLoader from '@grpc/proto-loader'; -import type { ProtoGrpcType } from './proto/example.ts'; -import type { ExampleHandlers } from './proto/example_package/Example.ts'; - -const exampleServer: ExampleHandlers = { - // server handlers implementation... -}; - -const packageDefinition = protoLoader.loadSync('./proto/example.proto'); -const proto = (grpc.loadPackageDefinition( - packageDefinition -) as unknown) as ProtoGrpcType; - -const server = new grpc.Server(); -server.addService(proto.example_package.Example.service, exampleServer); -``` diff --git a/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js b/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js deleted file mode 100644 index f00071e..0000000 --- a/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js +++ /dev/null @@ -1,915 +0,0 @@ -#!/usr/bin/env node -"use strict"; -/** - * @license - * Copyright 2020 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = require("fs"); -const path = require("path"); -const Protobuf = require("protobufjs"); -const yargs = require("yargs"); -const camelCase = require("lodash.camelcase"); -const util_1 = require("../src/util"); -const templateStr = "%s"; -const useNameFmter = ({ outputTemplate, inputTemplate }) => { - if (outputTemplate === inputTemplate) { - throw new Error('inputTemplate and outputTemplate must differ'); - } - return { - outputName: (n) => outputTemplate.replace(templateStr, n), - inputName: (n) => inputTemplate.replace(templateStr, n) - }; -}; -class TextFormatter { - constructor() { - this.indentText = ' '; - this.indentValue = 0; - this.textParts = []; - } - indent() { - this.indentValue += 1; - } - unindent() { - this.indentValue -= 1; - } - writeLine(line) { - for (let i = 0; i < this.indentValue; i += 1) { - this.textParts.push(this.indentText); - } - this.textParts.push(line); - this.textParts.push('\n'); - } - getFullText() { - return this.textParts.join(''); - } -} -// GENERATOR UTILITY FUNCTIONS -function compareName(x, y) { - if (x.name < y.name) { - return -1; - } - else if (x.name > y.name) { - return 1; - } - else { - return 0; - } -} -function isNamespaceBase(obj) { - return Array.isArray(obj.nestedArray); -} -function stripLeadingPeriod(name) { - return name.startsWith('.') ? name.substring(1) : name; -} -function getImportPath(to) { - /* If the thing we are importing is defined in a message, it is generated in - * the same file as that message. */ - if (to.parent instanceof Protobuf.Type) { - return getImportPath(to.parent); - } - return stripLeadingPeriod(to.fullName).replace(/\./g, '/'); -} -function getPath(to, options) { - return stripLeadingPeriod(to.fullName).replace(/\./g, '/') + options.targetFileExtension; -} -function getPathToRoot(from) { - const depth = stripLeadingPeriod(from.fullName).split('.').length - 1; - if (depth === 0) { - return './'; - } - let path = ''; - for (let i = 0; i < depth; i++) { - path += '../'; - } - return path; -} -function getRelativeImportPath(from, to) { - return getPathToRoot(from) + getImportPath(to); -} -function getTypeInterfaceName(type) { - return type.fullName.replace(/\./g, '_'); -} -function getImportLine(dependency, from, options) { - const filePath = from === undefined ? './' + getImportPath(dependency) : getRelativeImportPath(from, dependency); - const { outputName, inputName } = useNameFmter(options); - const typeInterfaceName = getTypeInterfaceName(dependency); - let importedTypes; - /* If the dependency is defined within a message, it will be generated in that - * message's file and exported using its typeInterfaceName. */ - if (dependency.parent instanceof Protobuf.Type) { - if (dependency instanceof Protobuf.Type || dependency instanceof Protobuf.Enum) { - importedTypes = `${inputName(typeInterfaceName)}, ${outputName(typeInterfaceName)}`; - } - else if (dependency instanceof Protobuf.Service) { - importedTypes = `${typeInterfaceName}Client, ${typeInterfaceName}Definition`; - } - else { - throw new Error('Invalid object passed to getImportLine'); - } - } - else { - if (dependency instanceof Protobuf.Type || dependency instanceof Protobuf.Enum) { - importedTypes = `${inputName(dependency.name)} as ${inputName(typeInterfaceName)}, ${outputName(dependency.name)} as ${outputName(typeInterfaceName)}`; - } - else if (dependency instanceof Protobuf.Service) { - importedTypes = `${dependency.name}Client as ${typeInterfaceName}Client, ${dependency.name}Definition as ${typeInterfaceName}Definition`; - } - else { - throw new Error('Invalid object passed to getImportLine'); - } - } - return `import type { ${importedTypes} } from '${filePath}${options.importFileExtension}';`; -} -function getChildMessagesAndEnums(namespace) { - const messageList = []; - for (const nested of namespace.nestedArray) { - if (nested instanceof Protobuf.Type || nested instanceof Protobuf.Enum) { - messageList.push(nested); - } - if (isNamespaceBase(nested)) { - messageList.push(...getChildMessagesAndEnums(nested)); - } - } - return messageList; -} -function formatComment(formatter, comment, options) { - if (!comment && !(options === null || options === void 0 ? void 0 : options.deprecated)) { - return; - } - formatter.writeLine('/**'); - if (comment) { - for (const line of comment.split('\n')) { - formatter.writeLine(` * ${line.replace(/\*\//g, '* /')}`); - } - } - if (options === null || options === void 0 ? void 0 : options.deprecated) { - formatter.writeLine(' * @deprecated'); - } - formatter.writeLine(' */'); -} -const typeBrandHint = `This field is a type brand and is not populated at runtime. Instances of this type should be created using type assertions. -https://github.com/grpc/grpc-node/pull/2281`; -function formatTypeBrand(formatter, messageType) { - formatComment(formatter, typeBrandHint); - formatter.writeLine(`__type: '${messageType.fullName}'`); -} -// GENERATOR FUNCTIONS -function getTypeNamePermissive(fieldType, resolvedType, repeated, map, options) { - const { inputName } = useNameFmter(options); - switch (fieldType) { - case 'double': - case 'float': - return 'number | string'; - case 'int32': - case 'uint32': - case 'sint32': - case 'fixed32': - case 'sfixed32': - return 'number'; - case 'int64': - case 'uint64': - case 'sint64': - case 'fixed64': - case 'sfixed64': - return 'number | string | Long'; - case 'bool': - return 'boolean'; - case 'string': - return 'string'; - case 'bytes': - return 'Buffer | Uint8Array | string'; - default: - if (resolvedType === null) { - throw new Error('Found field with no usable type'); - } - const typeInterfaceName = getTypeInterfaceName(resolvedType); - if (resolvedType instanceof Protobuf.Type) { - if (repeated || map) { - return inputName(typeInterfaceName); - } - else { - return `${inputName(typeInterfaceName)} | null`; - } - } - else { - // Enum - return inputName(typeInterfaceName); - } - } -} -function getFieldTypePermissive(field, options) { - const valueType = getTypeNamePermissive(field.type, field.resolvedType, field.repeated, field.map, options); - if (field instanceof Protobuf.MapField) { - const keyType = field.keyType === 'string' ? 'string' : 'number'; - return `{[key: ${keyType}]: ${valueType}}`; - } - else { - return valueType; - } -} -function generatePermissiveMessageInterface(formatter, messageType, options, nameOverride) { - const { inputName } = useNameFmter(options); - if (options.includeComments) { - formatComment(formatter, messageType.comment, messageType.options); - } - if (messageType.fullName === '.google.protobuf.Any') { - /* This describes the behavior of the Protobuf.js Any wrapper fromObject - * replacement function */ - formatter.writeLine(`export type ${inputName('Any')} = AnyExtension | {`); - formatter.writeLine(' type_url: string;'); - formatter.writeLine(' value: Buffer | Uint8Array | string;'); - formatter.writeLine('}'); - return; - } - formatter.writeLine(`export interface ${inputName(nameOverride !== null && nameOverride !== void 0 ? nameOverride : messageType.name)} {`); - formatter.indent(); - for (const field of messageType.fieldsArray) { - const repeatedString = field.repeated ? '[]' : ''; - const type = getFieldTypePermissive(field, options); - if (options.includeComments) { - formatComment(formatter, field.comment, field.options); - } - formatter.writeLine(`'${field.name}'?: (${type})${repeatedString};`); - } - for (const oneof of messageType.oneofsArray) { - const typeString = oneof.fieldsArray.map(field => `"${field.name}"`).join('|'); - if (options.includeComments) { - formatComment(formatter, oneof.comment, oneof.options); - } - formatter.writeLine(`'${oneof.name}'?: ${typeString};`); - } - if (options.inputBranded) { - formatTypeBrand(formatter, messageType); - } - formatter.unindent(); - formatter.writeLine('}'); -} -function getTypeNameRestricted(fieldType, resolvedType, repeated, map, options) { - const { outputName } = useNameFmter(options); - switch (fieldType) { - case 'double': - case 'float': - if (options.json) { - return 'number | string'; - } - else { - return 'number'; - } - case 'int32': - case 'uint32': - case 'sint32': - case 'fixed32': - case 'sfixed32': - return 'number'; - case 'int64': - case 'uint64': - case 'sint64': - case 'fixed64': - case 'sfixed64': - if (options.longs === Number) { - return 'number'; - } - else if (options.longs === String) { - return 'string'; - } - else { - return 'Long'; - } - case 'bool': - return 'boolean'; - case 'string': - return 'string'; - case 'bytes': - if (options.bytes === Array) { - return 'Uint8Array'; - } - else if (options.bytes === String) { - return 'string'; - } - else { - return 'Buffer'; - } - default: - if (resolvedType === null) { - throw new Error('Found field with no usable type'); - } - const typeInterfaceName = getTypeInterfaceName(resolvedType); - if (resolvedType instanceof Protobuf.Type) { - /* null is only used to represent absent message values if the defaults - * option is set, and only for non-repeated, non-map fields. */ - if (options.defaults && !repeated && !map) { - return `${outputName(typeInterfaceName)} | null`; - } - else { - return `${outputName(typeInterfaceName)}`; - } - } - else { - // Enum - return outputName(typeInterfaceName); - } - } -} -function getFieldTypeRestricted(field, options) { - const valueType = getTypeNameRestricted(field.type, field.resolvedType, field.repeated, field.map, options); - if (field instanceof Protobuf.MapField) { - const keyType = field.keyType === 'string' ? 'string' : 'number'; - return `{[key: ${keyType}]: ${valueType}}`; - } - else { - return valueType; - } -} -function generateRestrictedMessageInterface(formatter, messageType, options, nameOverride) { - var _a, _b, _c; - const { outputName } = useNameFmter(options); - if (options.includeComments) { - formatComment(formatter, messageType.comment, messageType.options); - } - if (messageType.fullName === '.google.protobuf.Any' && options.json) { - /* This describes the behavior of the Protobuf.js Any wrapper toObject - * replacement function */ - let optionalString = options.defaults ? '' : '?'; - formatter.writeLine(`export type ${outputName('Any')} = AnyExtension | {`); - formatter.writeLine(` type_url${optionalString}: string;`); - formatter.writeLine(` value${optionalString}: ${getTypeNameRestricted('bytes', null, false, false, options)};`); - formatter.writeLine('}'); - return; - } - formatter.writeLine(`export interface ${outputName(nameOverride !== null && nameOverride !== void 0 ? nameOverride : messageType.name)} {`); - formatter.indent(); - for (const field of messageType.fieldsArray) { - let fieldGuaranteed; - if (field.partOf) { - // The field is not guaranteed populated if it is part of a oneof - fieldGuaranteed = false; - } - else if (field.repeated) { - fieldGuaranteed = (_a = (options.defaults || options.arrays)) !== null && _a !== void 0 ? _a : false; - } - else if (field.map) { - fieldGuaranteed = (_b = (options.defaults || options.objects)) !== null && _b !== void 0 ? _b : false; - } - else { - fieldGuaranteed = (_c = options.defaults) !== null && _c !== void 0 ? _c : false; - } - const optionalString = fieldGuaranteed ? '' : '?'; - const repeatedString = field.repeated ? '[]' : ''; - const type = getFieldTypeRestricted(field, options); - if (options.includeComments) { - formatComment(formatter, field.comment, field.options); - } - formatter.writeLine(`'${field.name}'${optionalString}: (${type})${repeatedString};`); - } - if (options.oneofs) { - for (const oneof of messageType.oneofsArray) { - const typeString = oneof.fieldsArray.map(field => `"${field.name}"`).join('|'); - if (options.includeComments) { - formatComment(formatter, oneof.comment, oneof.options); - } - formatter.writeLine(`'${oneof.name}'?: ${typeString};`); - } - } - if (options.outputBranded) { - formatTypeBrand(formatter, messageType); - } - formatter.unindent(); - formatter.writeLine('}'); -} -function generateMessageInterfaces(formatter, messageType, options) { - var _a, _b; - let usesLong = false; - let seenDeps = new Set(); - const childTypes = getChildMessagesAndEnums(messageType); - formatter.writeLine(`// Original file: ${(_b = ((_a = messageType.filename) !== null && _a !== void 0 ? _a : 'null')) === null || _b === void 0 ? void 0 : _b.replace(/\\/g, '/')}`); - formatter.writeLine(''); - const isLongField = (field) => ['int64', 'uint64', 'sint64', 'fixed64', 'sfixed64'].includes(field.type); - messageType.fieldsArray.sort((fieldA, fieldB) => fieldA.id - fieldB.id); - for (const field of messageType.fieldsArray) { - if (field.resolvedType && childTypes.indexOf(field.resolvedType) < 0) { - const dependency = field.resolvedType; - if (seenDeps.has(dependency.fullName)) { - continue; - } - seenDeps.add(dependency.fullName); - formatter.writeLine(getImportLine(dependency, messageType, options)); - } - if (isLongField(field)) { - usesLong = true; - } - } - for (const childType of childTypes) { - if (childType instanceof Protobuf.Type) { - for (const field of childType.fieldsArray) { - if (field.resolvedType && childTypes.indexOf(field.resolvedType) < 0) { - const dependency = field.resolvedType; - if (seenDeps.has(dependency.fullName)) { - continue; - } - seenDeps.add(dependency.fullName); - formatter.writeLine(getImportLine(dependency, messageType, options)); - } - if (isLongField(field)) { - usesLong = true; - } - } - } - } - if (usesLong) { - formatter.writeLine("import type { Long } from '@grpc/proto-loader';"); - } - if (messageType.fullName === '.google.protobuf.Any') { - formatter.writeLine("import type { AnyExtension } from '@grpc/proto-loader';"); - } - formatter.writeLine(''); - for (const childType of childTypes.sort(compareName)) { - const nameOverride = getTypeInterfaceName(childType); - if (childType instanceof Protobuf.Type) { - generatePermissiveMessageInterface(formatter, childType, options, nameOverride); - formatter.writeLine(''); - generateRestrictedMessageInterface(formatter, childType, options, nameOverride); - } - else { - generateEnumInterface(formatter, childType, options, nameOverride); - } - formatter.writeLine(''); - } - generatePermissiveMessageInterface(formatter, messageType, options); - formatter.writeLine(''); - generateRestrictedMessageInterface(formatter, messageType, options); -} -function generateEnumInterface(formatter, enumType, options, nameOverride) { - var _a, _b, _c; - const { inputName, outputName } = useNameFmter(options); - const name = nameOverride !== null && nameOverride !== void 0 ? nameOverride : enumType.name; - formatter.writeLine(`// Original file: ${(_b = ((_a = enumType.filename) !== null && _a !== void 0 ? _a : 'null')) === null || _b === void 0 ? void 0 : _b.replace(/\\/g, '/')}`); - formatter.writeLine(''); - if (options.includeComments) { - formatComment(formatter, enumType.comment, enumType.options); - } - formatter.writeLine(`export const ${name} = {`); - formatter.indent(); - for (const key of Object.keys(enumType.values)) { - if (options.includeComments) { - formatComment(formatter, enumType.comments[key], ((_c = enumType.valuesOptions) !== null && _c !== void 0 ? _c : {})[key]); - } - formatter.writeLine(`${key}: ${options.enums == String ? `'${key}'` : enumType.values[key]},`); - } - formatter.unindent(); - formatter.writeLine('} as const;'); - // Permissive Type - formatter.writeLine(''); - if (options.includeComments) { - formatComment(formatter, enumType.comment, enumType.options); - } - formatter.writeLine(`export type ${inputName(name)} =`); - formatter.indent(); - for (const key of Object.keys(enumType.values)) { - if (options.includeComments) { - formatComment(formatter, enumType.comments[key]); - } - formatter.writeLine(`| '${key}'`); - formatter.writeLine(`| ${enumType.values[key]}`); - } - formatter.unindent(); - // Restrictive Type - formatter.writeLine(''); - if (options.includeComments) { - formatComment(formatter, enumType.comment, enumType.options); - } - formatter.writeLine(`export type ${outputName(name)} = typeof ${name}[keyof typeof ${name}]`); -} -/** - * This is a list of methods that are exist in the generic Client class in the - * gRPC libraries. TypeScript has a problem with methods in subclasses with the - * same names as methods in the superclass, but with mismatched APIs. So, we - * avoid generating methods with these names in the service client interfaces. - * We always generate two service client methods per service method: one camel - * cased, and one with the original casing. So we will still generate one - * service client method for any conflicting name. - * - * Technically, at runtime conflicting name in the service client method - * actually shadows the original method, but TypeScript does not have a good - * way to represent that. So this change is not 100% accurate, but it gets the - * generated code to compile. - * - * This is just a list of the methods in the Client class definitions in - * grpc@1.24.11 and @grpc/grpc-js@1.4.0. - */ -const CLIENT_RESERVED_METHOD_NAMES = new Set([ - 'close', - 'getChannel', - 'waitForReady', - 'makeUnaryRequest', - 'makeClientStreamRequest', - 'makeServerStreamRequest', - 'makeBidiStreamRequest', - 'resolveCallInterceptors', - /* These methods are private, but TypeScript is not happy with overriding even - * private methods with mismatched APIs. */ - 'checkOptionalUnaryResponseArguments', - 'checkMetadataAndOptions' -]); -function generateServiceClientInterface(formatter, serviceType, options) { - const { outputName, inputName } = useNameFmter(options); - if (options.includeComments) { - formatComment(formatter, serviceType.comment, serviceType.options); - } - formatter.writeLine(`export interface ${serviceType.name}Client extends grpc.Client {`); - formatter.indent(); - for (const methodName of Object.keys(serviceType.methods).sort()) { - const method = serviceType.methods[methodName]; - for (const name of new Set([methodName, camelCase(methodName)])) { - if (CLIENT_RESERVED_METHOD_NAMES.has(name)) { - continue; - } - if (options.includeComments) { - formatComment(formatter, method.comment, method.options); - } - const requestType = inputName(getTypeInterfaceName(method.resolvedRequestType)); - const responseType = outputName(getTypeInterfaceName(method.resolvedResponseType)); - const callbackType = `grpc.requestCallback<${responseType}>`; - if (method.requestStream) { - if (method.responseStream) { - // Bidi streaming - const callType = `grpc.ClientDuplexStream<${requestType}, ${responseType}>`; - formatter.writeLine(`${name}(metadata: grpc.Metadata, options?: grpc.CallOptions): ${callType};`); - formatter.writeLine(`${name}(options?: grpc.CallOptions): ${callType};`); - } - else { - // Client streaming - const callType = `grpc.ClientWritableStream<${requestType}>`; - formatter.writeLine(`${name}(metadata: grpc.Metadata, options: grpc.CallOptions, callback: ${callbackType}): ${callType};`); - formatter.writeLine(`${name}(metadata: grpc.Metadata, callback: ${callbackType}): ${callType};`); - formatter.writeLine(`${name}(options: grpc.CallOptions, callback: ${callbackType}): ${callType};`); - formatter.writeLine(`${name}(callback: ${callbackType}): ${callType};`); - } - } - else { - if (method.responseStream) { - // Server streaming - const callType = `grpc.ClientReadableStream<${responseType}>`; - formatter.writeLine(`${name}(argument: ${requestType}, metadata: grpc.Metadata, options?: grpc.CallOptions): ${callType};`); - formatter.writeLine(`${name}(argument: ${requestType}, options?: grpc.CallOptions): ${callType};`); - } - else { - // Unary - const callType = 'grpc.ClientUnaryCall'; - formatter.writeLine(`${name}(argument: ${requestType}, metadata: grpc.Metadata, options: grpc.CallOptions, callback: ${callbackType}): ${callType};`); - formatter.writeLine(`${name}(argument: ${requestType}, metadata: grpc.Metadata, callback: ${callbackType}): ${callType};`); - formatter.writeLine(`${name}(argument: ${requestType}, options: grpc.CallOptions, callback: ${callbackType}): ${callType};`); - formatter.writeLine(`${name}(argument: ${requestType}, callback: ${callbackType}): ${callType};`); - } - } - } - formatter.writeLine(''); - } - formatter.unindent(); - formatter.writeLine('}'); -} -function generateServiceHandlerInterface(formatter, serviceType, options) { - const { inputName, outputName } = useNameFmter(options); - if (options.includeComments) { - formatComment(formatter, serviceType.comment, serviceType.options); - } - formatter.writeLine(`export interface ${serviceType.name}Handlers extends grpc.UntypedServiceImplementation {`); - formatter.indent(); - for (const methodName of Object.keys(serviceType.methods).sort()) { - const method = serviceType.methods[methodName]; - if (options.includeComments) { - formatComment(formatter, method.comment, serviceType.options); - } - const requestType = outputName(getTypeInterfaceName(method.resolvedRequestType)); - const responseType = inputName(getTypeInterfaceName(method.resolvedResponseType)); - if (method.requestStream) { - if (method.responseStream) { - // Bidi streaming - formatter.writeLine(`${methodName}: grpc.handleBidiStreamingCall<${requestType}, ${responseType}>;`); - } - else { - // Client streaming - formatter.writeLine(`${methodName}: grpc.handleClientStreamingCall<${requestType}, ${responseType}>;`); - } - } - else { - if (method.responseStream) { - // Server streaming - formatter.writeLine(`${methodName}: grpc.handleServerStreamingCall<${requestType}, ${responseType}>;`); - } - else { - // Unary - formatter.writeLine(`${methodName}: grpc.handleUnaryCall<${requestType}, ${responseType}>;`); - } - } - formatter.writeLine(''); - } - formatter.unindent(); - formatter.writeLine('}'); -} -function generateServiceDefinitionInterface(formatter, serviceType, options) { - const { inputName, outputName } = useNameFmter(options); - if (options.grpcLib) { - formatter.writeLine(`export interface ${serviceType.name}Definition extends grpc.ServiceDefinition {`); - } - else { - formatter.writeLine(`export interface ${serviceType.name}Definition {`); - } - formatter.indent(); - for (const methodName of Object.keys(serviceType.methods).sort()) { - const method = serviceType.methods[methodName]; - const requestType = getTypeInterfaceName(method.resolvedRequestType); - const responseType = getTypeInterfaceName(method.resolvedResponseType); - formatter.writeLine(`${methodName}: MethodDefinition<${inputName(requestType)}, ${inputName(responseType)}, ${outputName(requestType)}, ${outputName(responseType)}>`); - } - formatter.unindent(); - formatter.writeLine('}'); -} -function generateServiceInterfaces(formatter, serviceType, options) { - var _a, _b; - formatter.writeLine(`// Original file: ${(_b = ((_a = serviceType.filename) !== null && _a !== void 0 ? _a : 'null')) === null || _b === void 0 ? void 0 : _b.replace(/\\/g, '/')}`); - formatter.writeLine(''); - if (options.grpcLib) { - const grpcImportPath = options.grpcLib.startsWith('.') ? getPathToRoot(serviceType) + options.grpcLib : options.grpcLib; - formatter.writeLine(`import type * as grpc from '${grpcImportPath}'`); - } - formatter.writeLine(`import type { MethodDefinition } from '@grpc/proto-loader'`); - const dependencies = new Set(); - for (const method of serviceType.methodsArray) { - dependencies.add(method.resolvedRequestType); - dependencies.add(method.resolvedResponseType); - } - for (const dep of Array.from(dependencies.values()).sort(compareName)) { - formatter.writeLine(getImportLine(dep, serviceType, options)); - } - formatter.writeLine(''); - if (options.grpcLib) { - generateServiceClientInterface(formatter, serviceType, options); - formatter.writeLine(''); - generateServiceHandlerInterface(formatter, serviceType, options); - formatter.writeLine(''); - } - generateServiceDefinitionInterface(formatter, serviceType, options); -} -function containsDefinition(definitionType, namespace) { - for (const nested of namespace.nestedArray.sort(compareName)) { - if (nested instanceof definitionType) { - return true; - } - else if (isNamespaceBase(nested) && !(nested instanceof Protobuf.Type) && !(nested instanceof Protobuf.Enum) && containsDefinition(definitionType, nested)) { - return true; - } - } - return false; -} -function generateDefinitionImports(formatter, namespace, options) { - const imports = []; - if (containsDefinition(Protobuf.Enum, namespace)) { - imports.push('EnumTypeDefinition'); - } - if (containsDefinition(Protobuf.Type, namespace)) { - imports.push('MessageTypeDefinition'); - } - if (imports.length) { - formatter.writeLine(`import type { ${imports.join(', ')} } from '@grpc/proto-loader';`); - } -} -function generateDynamicImports(formatter, namespace, options) { - for (const nested of namespace.nestedArray.sort(compareName)) { - if (nested instanceof Protobuf.Service || nested instanceof Protobuf.Type) { - formatter.writeLine(getImportLine(nested, undefined, options)); - } - else if (isNamespaceBase(nested) && !(nested instanceof Protobuf.Enum)) { - generateDynamicImports(formatter, nested, options); - } - } -} -function generateSingleLoadedDefinitionType(formatter, nested, options) { - if (nested instanceof Protobuf.Service) { - if (options.includeComments) { - formatComment(formatter, nested.comment, nested.options); - } - const typeInterfaceName = getTypeInterfaceName(nested); - formatter.writeLine(`${nested.name}: SubtypeConstructor & { service: ${typeInterfaceName}Definition }`); - } - else if (nested instanceof Protobuf.Enum) { - formatter.writeLine(`${nested.name}: EnumTypeDefinition`); - } - else if (nested instanceof Protobuf.Type) { - const typeInterfaceName = getTypeInterfaceName(nested); - const { inputName, outputName } = useNameFmter(options); - formatter.writeLine(`${nested.name}: MessageTypeDefinition<${inputName(typeInterfaceName)}, ${outputName(typeInterfaceName)}>`); - } - else if (isNamespaceBase(nested)) { - generateLoadedDefinitionTypes(formatter, nested, options); - } -} -function generateLoadedDefinitionTypes(formatter, namespace, options) { - formatter.writeLine(`${namespace.name}: {`); - formatter.indent(); - for (const nested of namespace.nestedArray.sort(compareName)) { - generateSingleLoadedDefinitionType(formatter, nested, options); - } - formatter.unindent(); - formatter.writeLine('}'); -} -function generateRootFile(formatter, root, options) { - if (!options.grpcLib) { - return; - } - formatter.writeLine(`import type * as grpc from '${options.grpcLib}';`); - generateDefinitionImports(formatter, root, options); - formatter.writeLine(''); - generateDynamicImports(formatter, root, options); - formatter.writeLine(''); - formatter.writeLine('type SubtypeConstructor any, Subtype> = {'); - formatter.writeLine(' new(...args: ConstructorParameters): Subtype;'); - formatter.writeLine('};'); - formatter.writeLine(''); - formatter.writeLine('export interface ProtoGrpcType {'); - formatter.indent(); - for (const nested of root.nestedArray) { - generateSingleLoadedDefinitionType(formatter, nested, options); - } - formatter.unindent(); - formatter.writeLine('}'); - formatter.writeLine(''); -} -async function writeFile(filename, contents) { - await fs.promises.mkdir(path.dirname(filename), { recursive: true }); - return fs.promises.writeFile(filename, contents); -} -function generateFilesForNamespace(namespace, options) { - const filePromises = []; - for (const nested of namespace.nestedArray) { - const fileFormatter = new TextFormatter(); - if (nested instanceof Protobuf.Type) { - generateMessageInterfaces(fileFormatter, nested, options); - if (options.verbose) { - console.log(`Writing ${options.outDir}/${getPath(nested, options)} from file ${nested.filename}`); - } - filePromises.push(writeFile(`${options.outDir}/${getPath(nested, options)}`, fileFormatter.getFullText())); - } - else if (nested instanceof Protobuf.Enum) { - generateEnumInterface(fileFormatter, nested, options); - if (options.verbose) { - console.log(`Writing ${options.outDir}/${getPath(nested, options)} from file ${nested.filename}`); - } - filePromises.push(writeFile(`${options.outDir}/${getPath(nested, options)}`, fileFormatter.getFullText())); - } - else if (nested instanceof Protobuf.Service) { - generateServiceInterfaces(fileFormatter, nested, options); - if (options.verbose) { - console.log(`Writing ${options.outDir}/${getPath(nested, options)} from file ${nested.filename}`); - } - filePromises.push(writeFile(`${options.outDir}/${getPath(nested, options)}`, fileFormatter.getFullText())); - } - else if (isNamespaceBase(nested)) { - filePromises.push(...generateFilesForNamespace(nested, options)); - } - } - return filePromises; -} -function writeFilesForRoot(root, masterFileName, options) { - const filePromises = []; - const masterFileFormatter = new TextFormatter(); - if (options.grpcLib) { - generateRootFile(masterFileFormatter, root, options); - if (options.verbose) { - console.log(`Writing ${options.outDir}/${masterFileName}`); - } - filePromises.push(writeFile(`${options.outDir}/${masterFileName}`, masterFileFormatter.getFullText())); - } - filePromises.push(...generateFilesForNamespace(root, options)); - return filePromises; -} -async function writeAllFiles(protoFiles, options) { - await fs.promises.mkdir(options.outDir, { recursive: true }); - const basenameMap = new Map(); - for (const filename of protoFiles) { - const basename = path.basename(filename).replace(/\.proto$/, options.targetFileExtension); - if (basenameMap.has(basename)) { - basenameMap.get(basename).push(filename); - } - else { - basenameMap.set(basename, [filename]); - } - } - for (const [basename, filenames] of basenameMap.entries()) { - const loadedRoot = await (0, util_1.loadProtosWithOptions)(filenames, options); - writeFilesForRoot(loadedRoot, basename, options); - } -} -async function runScript() { - const boolDefaultFalseOption = { - boolean: true, - default: false, - }; - const argv = await yargs - .parserConfiguration({ - 'parse-positional-numbers': false - }) - .option('keepCase', boolDefaultFalseOption) - .option('longs', { string: true, default: 'Long' }) - .option('enums', { string: true, default: 'number' }) - .option('bytes', { string: true, default: 'Buffer' }) - .option('defaults', boolDefaultFalseOption) - .option('arrays', boolDefaultFalseOption) - .option('objects', boolDefaultFalseOption) - .option('oneofs', boolDefaultFalseOption) - .option('json', boolDefaultFalseOption) - .boolean('verbose') - .option('includeComments', boolDefaultFalseOption) - .option('includeDirs', { - normalize: true, - array: true, - alias: 'I' - }) - .option('outDir', { - alias: 'O', - normalize: true, - }) - .option('grpcLib', { string: true }) - .option('inputTemplate', { string: true, default: `${templateStr}` }) - .option('outputTemplate', { string: true, default: `${templateStr}__Output` }) - .option('inputBranded', boolDefaultFalseOption) - .option('outputBranded', boolDefaultFalseOption) - .option('targetFileExtension', { string: true, default: '.ts' }) - .option('importFileExtension', { string: true, default: '' }) - .coerce('longs', value => { - switch (value) { - case 'String': return String; - case 'Number': return Number; - default: return undefined; - } - }).coerce('enums', value => { - if (value === 'String') { - return String; - } - else { - return undefined; - } - }).coerce('bytes', value => { - switch (value) { - case 'Array': return Array; - case 'String': return String; - default: return undefined; - } - }) - .alias({ - verbose: 'v' - }).describe({ - keepCase: 'Preserve the case of field names', - longs: 'The type that should be used to output 64 bit integer values. Can be String, Number', - enums: 'The type that should be used to output enum fields. Can be String', - bytes: 'The type that should be used to output bytes fields. Can be String, Array', - defaults: 'Output default values for omitted fields', - arrays: 'Output default values for omitted repeated fields even if --defaults is not set', - objects: 'Output default values for omitted message fields even if --defaults is not set', - oneofs: 'Output virtual oneof fields set to the present field\'s name', - json: 'Represent Infinity and NaN as strings in float fields. Also decode google.protobuf.Any automatically', - includeComments: 'Generate doc comments from comments in the original files', - includeDirs: 'Directories to search for included files', - outDir: 'Directory in which to output files', - grpcLib: 'The gRPC implementation library that these types will be used with. If not provided, some types will not be generated', - inputTemplate: 'Template for mapping input or "permissive" type names', - outputTemplate: 'Template for mapping output or "restricted" type names', - inputBranded: 'Output property for branded type for "permissive" types with fullName of the Message as its value', - outputBranded: 'Output property for branded type for "restricted" types with fullName of the Message as its value', - targetFileExtension: 'File extension for generated files.', - importFileExtension: 'File extension for import specifiers in generated code.' - }).demandOption(['outDir']) - .demand(1) - .usage('$0 [options] filenames...') - .epilogue('WARNING: This tool is in alpha. The CLI and generated code are subject to change') - .argv; - if (argv.verbose) { - console.log('Parsed arguments:', argv); - } - (0, util_1.addCommonProtos)(); - writeAllFiles(argv._, Object.assign(Object.assign({}, argv), { alternateCommentMode: true })).then(() => { - if (argv.verbose) { - console.log('Success'); - } - }, (error) => { - console.error(error); - process.exit(1); - }); -} -if (require.main === module) { - runScript(); -} -//# sourceMappingURL=proto-loader-gen-types.js.map \ No newline at end of file diff --git a/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js.map b/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js.map deleted file mode 100644 index 8a260e4..0000000 --- a/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"proto-loader-gen-types.js","sourceRoot":"","sources":["../../bin/proto-loader-gen-types.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;;;;;;GAgBG;;AAEH,yBAAyB;AACzB,6BAA6B;AAE7B,uCAAuC;AACvC,+BAA+B;AAE/B,8CAA+C;AAC/C,sCAAqE;AAErE,MAAM,WAAW,GAAG,IAAI,CAAC;AACzB,MAAM,YAAY,GAAG,CAAC,EAAC,cAAc,EAAE,aAAa,EAAmB,EAAE,EAAE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xE,YAAY,EAAE,oGAAoG;QAClH,aAAa,EAAE,oGAAoG;QACnH,mBAAmB,EAAE,qCAAqC;QAC1D,mBAAmB,EAAE,yDAAyD;KAC/E,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CAAC;SAC1B,MAAM,CAAC,CAAC,CAAC;SACT,KAAK,CAAC,2BAA2B,CAAC;SAClC,QAAQ,CAAC,kFAAkF,CAAC;SAC5F,IAAI,CAAC;IACR,IAAI,IAAI,CAAC,OAAO,EAAE;QAChB,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;KACxC;IACD,IAAA,sBAAe,GAAE,CAAC;IAClB,aAAa,CAAC,IAAI,CAAC,CAAa,kCAAM,IAAI,KAAE,oBAAoB,EAAE,IAAI,IAAE,CAAC,IAAI,CAAC,GAAG,EAAE;QACjF,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;SACxB;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE;QACX,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE;IAC3B,SAAS,EAAE,CAAC;CACb"} \ No newline at end of file diff --git a/node_modules/@grpc/proto-loader/build/src/index.d.ts b/node_modules/@grpc/proto-loader/build/src/index.d.ts deleted file mode 100644 index 34b8fa4..0000000 --- a/node_modules/@grpc/proto-loader/build/src/index.d.ts +++ /dev/null @@ -1,162 +0,0 @@ -/** - * @license - * Copyright 2018 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -/// -import * as Protobuf from 'protobufjs'; -import * as descriptor from 'protobufjs/ext/descriptor'; -import { Options } from './util'; -import Long = require('long'); -export { Options, Long }; -/** - * This type exists for use with code generated by the proto-loader-gen-types - * tool. This type should be used with another interface, e.g. - * MessageType & AnyExtension for an object that is converted to or from a - * google.protobuf.Any message. - * For example, when processing an Any message: - * - * ```ts - * if (isAnyExtension(message)) { - * switch (message['@type']) { - * case TYPE1_URL: - * handleType1(message as AnyExtension & Type1); - * break; - * case TYPE2_URL: - * handleType2(message as AnyExtension & Type2); - * break; - * // ... - * } - * } - * ``` - */ -export interface AnyExtension { - /** - * The fully qualified name of the message type that this object represents, - * possibly including a URL prefix. - */ - '@type': string; -} -export declare function isAnyExtension(obj: object): obj is AnyExtension; -declare module 'protobufjs' { - interface Type { - toDescriptor(protoVersion: string): Protobuf.Message & descriptor.IDescriptorProto; - } - interface RootConstructor { - new (options?: Options): Root; - fromDescriptor(descriptorSet: descriptor.IFileDescriptorSet | Protobuf.Reader | Uint8Array): Root; - fromJSON(json: Protobuf.INamespace, root?: Root): Root; - } - interface Root { - toDescriptor(protoVersion: string): Protobuf.Message & descriptor.IFileDescriptorSet; - } - interface Enum { - toDescriptor(protoVersion: string): Protobuf.Message & descriptor.IEnumDescriptorProto; - } -} -export interface Serialize { - (value: T): Buffer; -} -export interface Deserialize { - (bytes: Buffer): T; -} -export interface ProtobufTypeDefinition { - format: string; - type: object; - fileDescriptorProtos: Buffer[]; -} -export interface MessageTypeDefinition extends ProtobufTypeDefinition { - format: 'Protocol Buffer 3 DescriptorProto'; - serialize: Serialize; - deserialize: Deserialize; -} -export interface EnumTypeDefinition extends ProtobufTypeDefinition { - format: 'Protocol Buffer 3 EnumDescriptorProto'; -} -export declare enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = "IDEMPOTENCY_UNKNOWN", - NO_SIDE_EFFECTS = "NO_SIDE_EFFECTS", - IDEMPOTENT = "IDEMPOTENT" -} -export interface NamePart { - name_part: string; - is_extension: boolean; -} -export interface UninterpretedOption { - name?: NamePart[]; - identifier_value?: string; - positive_int_value?: number; - negative_int_value?: number; - double_value?: number; - string_value?: string; - aggregate_value?: string; -} -export interface MethodOptions { - deprecated: boolean; - idempotency_level: IdempotencyLevel; - uninterpreted_option: UninterpretedOption[]; - [k: string]: unknown; -} -export interface MethodDefinition { - path: string; - requestStream: boolean; - responseStream: boolean; - requestSerialize: Serialize; - responseSerialize: Serialize; - requestDeserialize: Deserialize; - responseDeserialize: Deserialize; - originalName?: string; - requestType: MessageTypeDefinition; - responseType: MessageTypeDefinition; - options: MethodOptions; -} -export interface ServiceDefinition { - [index: string]: MethodDefinition; -} -export declare type AnyDefinition = ServiceDefinition | MessageTypeDefinition | EnumTypeDefinition; -export interface PackageDefinition { - [index: string]: AnyDefinition; -} -/** - * Load a .proto file with the specified options. - * @param filename One or multiple file paths to load. Can be an absolute path - * or relative to an include path. - * @param options.keepCase Preserve field names. The default is to change them - * to camel case. - * @param options.longs The type that should be used to represent `long` values. - * Valid options are `Number` and `String`. Defaults to a `Long` object type - * from a library. - * @param options.enums The type that should be used to represent `enum` values. - * The only valid option is `String`. Defaults to the numeric value. - * @param options.bytes The type that should be used to represent `bytes` - * values. Valid options are `Array` and `String`. The default is to use - * `Buffer`. - * @param options.defaults Set default values on output objects. Defaults to - * `false`. - * @param options.arrays Set empty arrays for missing array values even if - * `defaults` is `false`. Defaults to `false`. - * @param options.objects Set empty objects for missing object values even if - * `defaults` is `false`. Defaults to `false`. - * @param options.oneofs Set virtual oneof properties to the present field's - * name - * @param options.json Represent Infinity and NaN as strings in float fields, - * and automatically decode google.protobuf.Any values. - * @param options.includeDirs Paths to search for imported `.proto` files. - */ -export declare function load(filename: string | string[], options?: Options): Promise; -export declare function loadSync(filename: string | string[], options?: Options): PackageDefinition; -export declare function fromJSON(json: Protobuf.INamespace, options?: Options): PackageDefinition; -export declare function loadFileDescriptorSetFromBuffer(descriptorSet: Buffer, options?: Options): PackageDefinition; -export declare function loadFileDescriptorSetFromObject(descriptorSet: Parameters[0], options?: Options): PackageDefinition; diff --git a/node_modules/@grpc/proto-loader/build/src/index.js b/node_modules/@grpc/proto-loader/build/src/index.js deleted file mode 100644 index 69b4431..0000000 --- a/node_modules/@grpc/proto-loader/build/src/index.js +++ /dev/null @@ -1,246 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.loadFileDescriptorSetFromObject = exports.loadFileDescriptorSetFromBuffer = exports.fromJSON = exports.loadSync = exports.load = exports.IdempotencyLevel = exports.isAnyExtension = exports.Long = void 0; -const camelCase = require("lodash.camelcase"); -const Protobuf = require("protobufjs"); -const descriptor = require("protobufjs/ext/descriptor"); -const util_1 = require("./util"); -const Long = require("long"); -exports.Long = Long; -function isAnyExtension(obj) { - return ('@type' in obj) && (typeof obj['@type'] === 'string'); -} -exports.isAnyExtension = isAnyExtension; -var IdempotencyLevel; -(function (IdempotencyLevel) { - IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = "IDEMPOTENCY_UNKNOWN"; - IdempotencyLevel["NO_SIDE_EFFECTS"] = "NO_SIDE_EFFECTS"; - IdempotencyLevel["IDEMPOTENT"] = "IDEMPOTENT"; -})(IdempotencyLevel = exports.IdempotencyLevel || (exports.IdempotencyLevel = {})); -const descriptorOptions = { - longs: String, - enums: String, - bytes: String, - defaults: true, - oneofs: true, - json: true, -}; -function joinName(baseName, name) { - if (baseName === '') { - return name; - } - else { - return baseName + '.' + name; - } -} -function isHandledReflectionObject(obj) { - return (obj instanceof Protobuf.Service || - obj instanceof Protobuf.Type || - obj instanceof Protobuf.Enum); -} -function isNamespaceBase(obj) { - return obj instanceof Protobuf.Namespace || obj instanceof Protobuf.Root; -} -function getAllHandledReflectionObjects(obj, parentName) { - const objName = joinName(parentName, obj.name); - if (isHandledReflectionObject(obj)) { - return [[objName, obj]]; - } - else { - if (isNamespaceBase(obj) && typeof obj.nested !== 'undefined') { - return Object.keys(obj.nested) - .map(name => { - return getAllHandledReflectionObjects(obj.nested[name], objName); - }) - .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []); - } - } - return []; -} -function createDeserializer(cls, options) { - return function deserialize(argBuf) { - return cls.toObject(cls.decode(argBuf), options); - }; -} -function createSerializer(cls) { - return function serialize(arg) { - if (Array.isArray(arg)) { - throw new Error(`Failed to serialize message: expected object with ${cls.name} structure, got array instead`); - } - const message = cls.fromObject(arg); - return cls.encode(message).finish(); - }; -} -function mapMethodOptions(options) { - return (options || []).reduce((obj, item) => { - for (const [key, value] of Object.entries(item)) { - switch (key) { - case 'uninterpreted_option': - obj.uninterpreted_option.push(item.uninterpreted_option); - break; - default: - obj[key] = value; - } - } - return obj; - }, { - deprecated: false, - idempotency_level: IdempotencyLevel.IDEMPOTENCY_UNKNOWN, - uninterpreted_option: [], - }); -} -function createMethodDefinition(method, serviceName, options, fileDescriptors) { - /* This is only ever called after the corresponding root.resolveAll(), so we - * can assume that the resolved request and response types are non-null */ - const requestType = method.resolvedRequestType; - const responseType = method.resolvedResponseType; - return { - path: '/' + serviceName + '/' + method.name, - requestStream: !!method.requestStream, - responseStream: !!method.responseStream, - requestSerialize: createSerializer(requestType), - requestDeserialize: createDeserializer(requestType, options), - responseSerialize: createSerializer(responseType), - responseDeserialize: createDeserializer(responseType, options), - // TODO(murgatroid99): Find a better way to handle this - originalName: camelCase(method.name), - requestType: createMessageDefinition(requestType, options, fileDescriptors), - responseType: createMessageDefinition(responseType, options, fileDescriptors), - options: mapMethodOptions(method.parsedOptions), - }; -} -function createServiceDefinition(service, name, options, fileDescriptors) { - const def = {}; - for (const method of service.methodsArray) { - def[method.name] = createMethodDefinition(method, name, options, fileDescriptors); - } - return def; -} -function createMessageDefinition(message, options, fileDescriptors) { - const messageDescriptor = message.toDescriptor('proto3'); - return { - format: 'Protocol Buffer 3 DescriptorProto', - type: messageDescriptor.$type.toObject(messageDescriptor, descriptorOptions), - fileDescriptorProtos: fileDescriptors, - serialize: createSerializer(message), - deserialize: createDeserializer(message, options) - }; -} -function createEnumDefinition(enumType, fileDescriptors) { - const enumDescriptor = enumType.toDescriptor('proto3'); - return { - format: 'Protocol Buffer 3 EnumDescriptorProto', - type: enumDescriptor.$type.toObject(enumDescriptor, descriptorOptions), - fileDescriptorProtos: fileDescriptors, - }; -} -/** - * function createDefinition(obj: Protobuf.Service, name: string, options: - * Options): ServiceDefinition; function createDefinition(obj: Protobuf.Type, - * name: string, options: Options): MessageTypeDefinition; function - * createDefinition(obj: Protobuf.Enum, name: string, options: Options): - * EnumTypeDefinition; - */ -function createDefinition(obj, name, options, fileDescriptors) { - if (obj instanceof Protobuf.Service) { - return createServiceDefinition(obj, name, options, fileDescriptors); - } - else if (obj instanceof Protobuf.Type) { - return createMessageDefinition(obj, options, fileDescriptors); - } - else if (obj instanceof Protobuf.Enum) { - return createEnumDefinition(obj, fileDescriptors); - } - else { - throw new Error('Type mismatch in reflection object handling'); - } -} -function createPackageDefinition(root, options) { - const def = {}; - root.resolveAll(); - const descriptorList = root.toDescriptor('proto3').file; - const bufferList = descriptorList.map(value => Buffer.from(descriptor.FileDescriptorProto.encode(value).finish())); - for (const [name, obj] of getAllHandledReflectionObjects(root, '')) { - def[name] = createDefinition(obj, name, options, bufferList); - } - return def; -} -function createPackageDefinitionFromDescriptorSet(decodedDescriptorSet, options) { - options = options || {}; - const root = Protobuf.Root.fromDescriptor(decodedDescriptorSet); - root.resolveAll(); - return createPackageDefinition(root, options); -} -/** - * Load a .proto file with the specified options. - * @param filename One or multiple file paths to load. Can be an absolute path - * or relative to an include path. - * @param options.keepCase Preserve field names. The default is to change them - * to camel case. - * @param options.longs The type that should be used to represent `long` values. - * Valid options are `Number` and `String`. Defaults to a `Long` object type - * from a library. - * @param options.enums The type that should be used to represent `enum` values. - * The only valid option is `String`. Defaults to the numeric value. - * @param options.bytes The type that should be used to represent `bytes` - * values. Valid options are `Array` and `String`. The default is to use - * `Buffer`. - * @param options.defaults Set default values on output objects. Defaults to - * `false`. - * @param options.arrays Set empty arrays for missing array values even if - * `defaults` is `false`. Defaults to `false`. - * @param options.objects Set empty objects for missing object values even if - * `defaults` is `false`. Defaults to `false`. - * @param options.oneofs Set virtual oneof properties to the present field's - * name - * @param options.json Represent Infinity and NaN as strings in float fields, - * and automatically decode google.protobuf.Any values. - * @param options.includeDirs Paths to search for imported `.proto` files. - */ -function load(filename, options) { - return (0, util_1.loadProtosWithOptions)(filename, options).then(loadedRoot => { - return createPackageDefinition(loadedRoot, options); - }); -} -exports.load = load; -function loadSync(filename, options) { - const loadedRoot = (0, util_1.loadProtosWithOptionsSync)(filename, options); - return createPackageDefinition(loadedRoot, options); -} -exports.loadSync = loadSync; -function fromJSON(json, options) { - options = options || {}; - const loadedRoot = Protobuf.Root.fromJSON(json); - loadedRoot.resolveAll(); - return createPackageDefinition(loadedRoot, options); -} -exports.fromJSON = fromJSON; -function loadFileDescriptorSetFromBuffer(descriptorSet, options) { - const decodedDescriptorSet = descriptor.FileDescriptorSet.decode(descriptorSet); - return createPackageDefinitionFromDescriptorSet(decodedDescriptorSet, options); -} -exports.loadFileDescriptorSetFromBuffer = loadFileDescriptorSetFromBuffer; -function loadFileDescriptorSetFromObject(descriptorSet, options) { - const decodedDescriptorSet = descriptor.FileDescriptorSet.fromObject(descriptorSet); - return createPackageDefinitionFromDescriptorSet(decodedDescriptorSet, options); -} -exports.loadFileDescriptorSetFromObject = loadFileDescriptorSetFromObject; -(0, util_1.addCommonProtos)(); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@grpc/proto-loader/build/src/index.js.map b/node_modules/@grpc/proto-loader/build/src/index.js.map deleted file mode 100644 index ce3c911..0000000 --- a/node_modules/@grpc/proto-loader/build/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,8CAA+C;AAC/C,uCAAuC;AACvC,wDAAwD;AAExD,iCAAoG;AAEpG,6BAA8B;AAEZ,oBAAI;AA+BtB,SAAgB,cAAc,CAAC,GAAW;IACxC,OAAO,CAAC,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,OAAQ,GAAoB,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC;AAClF,CAAC;AAFD,wCAEC;AA4DD,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,+DAA2C,CAAA;IAC3C,uDAAmC,CAAA;IACnC,6CAAyB,CAAA;AAC3B,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAsDD,MAAM,iBAAiB,GAAgC;IACrD,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI;CACX,CAAC;AAEF,SAAS,QAAQ,CAAC,QAAgB,EAAE,IAAY;IAC9C,IAAI,QAAQ,KAAK,EAAE,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;SAAM;QACL,OAAO,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC;KAC9B;AACH,CAAC;AAID,SAAS,yBAAyB,CAChC,GAA8B;IAE9B,OAAO,CACL,GAAG,YAAY,QAAQ,CAAC,OAAO;QAC/B,GAAG,YAAY,QAAQ,CAAC,IAAI;QAC5B,GAAG,YAAY,QAAQ,CAAC,IAAI,C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+B,CAC7C,aAAqB,EACrB,OAAiB;IAEjB,MAAM,oBAAoB,GAAG,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAC9D,aAAa,CACU,CAAC;IAE1B,OAAO,wCAAwC,CAC7C,oBAAoB,EACpB,OAAO,CACR,CAAC;AACJ,CAAC;AAZD,0EAYC;AAED,SAAgB,+BAA+B,CAC7C,aAA4E,EAC5E,OAAiB;IAEjB,MAAM,oBAAoB,GAAG,UAAU,CAAC,iBAAiB,CAAC,UAAU,CAClE,aAAa,CACU,CAAC;IAE1B,OAAO,wCAAwC,CAC7C,oBAAoB,EACpB,OAAO,CACR,CAAC;AACJ,CAAC;AAZD,0EAYC;AAED,IAAA,sBAAe,GAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@grpc/proto-loader/build/src/util.d.ts b/node_modules/@grpc/proto-loader/build/src/util.d.ts deleted file mode 100644 index d0b13d9..0000000 --- a/node_modules/@grpc/proto-loader/build/src/util.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @license - * Copyright 2018 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -import * as Protobuf from 'protobufjs'; -export declare type Options = Protobuf.IParseOptions & Protobuf.IConversionOptions & { - includeDirs?: string[]; -}; -export declare function loadProtosWithOptions(filename: string | string[], options?: Options): Promise; -export declare function loadProtosWithOptionsSync(filename: string | string[], options?: Options): Protobuf.Root; -/** - * Load Google's well-known proto files that aren't exposed by Protobuf.js. - */ -export declare function addCommonProtos(): void; diff --git a/node_modules/@grpc/proto-loader/build/src/util.js b/node_modules/@grpc/proto-loader/build/src/util.js deleted file mode 100644 index 7ade36b..0000000 --- a/node_modules/@grpc/proto-loader/build/src/util.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.addCommonProtos = exports.loadProtosWithOptionsSync = exports.loadProtosWithOptions = void 0; -const fs = require("fs"); -const path = require("path"); -const Protobuf = require("protobufjs"); -function addIncludePathResolver(root, includePaths) { - const originalResolvePath = root.resolvePath; - root.resolvePath = (origin, target) => { - if (path.isAbsolute(target)) { - return target; - } - for (const directory of includePaths) { - const fullPath = path.join(directory, target); - try { - fs.accessSync(fullPath, fs.constants.R_OK); - return fullPath; - } - catch (err) { - continue; - } - } - process.emitWarning(`${target} not found in any of the include paths ${includePaths}`); - return originalResolvePath(origin, target); - }; -} -async function loadProtosWithOptions(filename, options) { - const root = new Protobuf.Root(); - options = options || {}; - if (!!options.includeDirs) { - if (!Array.isArray(options.includeDirs)) { - return Promise.reject(new Error('The includeDirs option must be an array')); - } - addIncludePathResolver(root, options.includeDirs); - } - const loadedRoot = await root.load(filename, options); - loadedRoot.resolveAll(); - return loadedRoot; -} -exports.loadProtosWithOptions = loadProtosWithOptions; -function loadProtosWithOptionsSync(filename, options) { - const root = new Protobuf.Root(); - options = options || {}; - if (!!options.includeDirs) { - if (!Array.isArray(options.includeDirs)) { - throw new Error('The includeDirs option must be an array'); - } - addIncludePathResolver(root, options.includeDirs); - } - const loadedRoot = root.loadSync(filename, options); - loadedRoot.resolveAll(); - return loadedRoot; -} -exports.loadProtosWithOptionsSync = loadProtosWithOptionsSync; -/** - * Load Google's well-known proto files that aren't exposed by Protobuf.js. - */ -function addCommonProtos() { - // Protobuf.js exposes: any, duration, empty, field_mask, struct, timestamp, - // and wrappers. compiler/plugin is excluded in Protobuf.js and here. - // Using constant strings for compatibility with tools like Webpack - const apiDescriptor = require('protobufjs/google/protobuf/api.json'); - const descriptorDescriptor = require('protobufjs/google/protobuf/descriptor.json'); - const sourceContextDescriptor = require('protobufjs/google/protobuf/source_context.json'); - const typeDescriptor = require('protobufjs/google/protobuf/type.json'); - Protobuf.common('api', apiDescriptor.nested.google.nested.protobuf.nested); - Protobuf.common('descriptor', descriptorDescriptor.nested.google.nested.protobuf.nested); - Protobuf.common('source_context', sourceContextDescriptor.nested.google.nested.protobuf.nested); - Protobuf.common('type', typeDescriptor.nested.google.nested.protobuf.nested); -} -exports.addCommonProtos = addCommonProtos; -//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/node_modules/@grpc/proto-loader/build/src/util.js.map b/node_modules/@grpc/proto-loader/build/src/util.js.map deleted file mode 100644 index bb517f7..0000000 --- a/node_modules/@grpc/proto-loader/build/src/util.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,yBAAyB;AACzB,6BAA6B;AAC7B,uCAAuC;AAEvC,SAAS,sBAAsB,CAAC,IAAmB,EAAE,YAAsB;IACzE,MAAM,mBAAmB,GAAG,IAAI,CAAC,WAAW,CAAC;IAC7C,IAAI,CAAC,WAAW,GAAG,CAAC,MAAc,EAAE,MAAc,EAAE,EAAE;QACpD,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YAC3B,OAAO,MAAM,CAAC;SACf;QACD,KAAK,MAAM,SAAS,IAAI,YAAY,EAAE;YACpC,MAAM,QAAQ,GAAW,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YACtD,IAAI;gBACF,EAAE,CAAC,UAAU,CAAC,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C5D;QACD,sBAAsB,CAAC,IAAI,EAAE,OAAO,CAAC,WAAuB,CAAC,CAAC;KAC/D;IACD,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACpD,UAAU,CAAC,UAAU,EAAE,CAAC;IACxB,OAAO,UAAU,CAAC;AACpB,CAAC;AAfD,8DAeC;AAED;;GAEG;AACH,SAAgB,eAAe;IAC7B,4EAA4E;IAC5E,qEAAqE;IAErE,mEAAmE;IACnE,MAAM,aAAa,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;IACrE,MAAM,oBAAoB,GAAG,OAAO,CAAC,4CAA4C,CAAC,CAAC;IACnF,MAAM,uBAAuB,GAAG,OAAO,CAAC,gDAAgD,CAAC,CAAC;IAC1F,MAAM,cAAc,GAAG,OAAO,CAAC,sCAAsC,CAAC,CAAC;IAEvE,QAAQ,CAAC,MAAM,CACb,KAAK,EACL,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CACnD,CAAC;IACF,QAAQ,CAAC,MAAM,CACb,YAAY,EACZ,oBAAoB,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAC1D,CAAC;IACF,QAAQ,CAAC,MAAM,CACb,gBAAgB,EAChB,uBAAuB,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAC7D,CAAC;IACF,QAAQ,CAAC,MAAM,CACb,MAAM,EACN,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CACpD,CAAC;AACJ,CAAC;AA1BD,0CA0BC"} \ No newline at end of file diff --git a/node_modules/@grpc/proto-loader/package.json b/node_modules/@grpc/proto-loader/package.json deleted file mode 100644 index 7b748e1..0000000 --- a/node_modules/@grpc/proto-loader/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "@grpc/proto-loader", - "version": "0.8.1", - "author": "Google Inc.", - "contributors": [ - { - "name": "Michael Lumish", - "email": "mlumish@google.com" - } - ], - "description": "gRPC utility library for loading .proto files", - "homepage": "https://grpc.io/", - "main": "build/src/index.js", - "typings": "build/src/index.d.ts", - "scripts": { - "build": "npm run compile", - "clean": "rimraf ./build", - "compile": "tsc -p .", - "format": "clang-format -i -style=\"{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}\" src/*.ts test/*.ts", - "lint": "tslint -c node_modules/google-ts-style/tslint.json -p . -t codeFrame --type-check", - "prepare": "npm run compile", - "test": "gulp test", - "check": "gts check", - "fix": "gts fix", - "pretest": "npm run compile", - "posttest": "npm run check", - "generate-golden": "node ./build/bin/proto-loader-gen-types.js --keepCase --longs=String --enums=String --defaults --oneofs --json --includeComments --inputTemplate=I%s --outputTemplate=O%s -I deps/gapic-showcase/schema/ deps/googleapis/ -O ./golden-generated --grpcLib @grpc/grpc-js google/showcase/v1beta1/echo.proto", - "validate-golden": "rm -rf ./golden-generated-old && mv ./golden-generated/ ./golden-generated-old && npm run generate-golden && diff -rb ./golden-generated ./golden-generated-old" - }, - "repository": { - "type": "git", - "url": "https://github.com/grpc/grpc-node.git" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/grpc/grpc-node/issues" - }, - "files": [ - "LICENSE", - "build/src/*.d.ts", - "build/src/*.{js,js.map}", - "build/bin/*.{js,js.map}" - ], - "bin": { - "proto-loader-gen-types": "./build/bin/proto-loader-gen-types.js" - }, - "dependencies": { - "lodash.camelcase": "^4.3.0", - "long": "^5.0.0", - "protobufjs": "^7.5.5", - "yargs": "^17.7.2" - }, - "devDependencies": { - "@types/lodash.camelcase": "^4.3.4", - "@types/mkdirp": "^1.0.1", - "@types/mocha": "^5.2.7", - "@types/node": "^10.17.26", - "@types/yargs": "^17.0.24", - "clang-format": "^1.2.2", - "google-proto-files": "^3.0.2", - "gts": "^3.1.0", - "rimraf": "^3.0.2", - "ts-node": "^10.9.2", - "typescript": "~4.7.4" - }, - "engines": { - "node": ">=6" - } -} diff --git a/node_modules/@js-sdsl/ordered-map/CHANGELOG.md b/node_modules/@js-sdsl/ordered-map/CHANGELOG.md deleted file mode 100644 index 4bd804b..0000000 --- a/node_modules/@js-sdsl/ordered-map/CHANGELOG.md +++ /dev/null @@ -1,237 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. - -The format is based on Keep a Changelog and this project adheres to Semantic Versioning. - -## [4.4.2] - 2023.07.21 - -### Fixed - -- The pointer of Adapter container's iterator cannot as array to be deconstructed. - -### Added - -- Add `isAccessible` function to iterators for iterable containers. - -## [4.4.1] - 2023.06.05 - -### Fixed - -- Tree container with less than 3 items reverse iteration infinite loop - -## [4.4.0] - 2023.03.17 - -### Changed - -- Optimized inOrder travel function for tree container. -- Optimized `Symbol.iterator` function. -- Optimized `TreeContainer` `erase` function. -- Optimized some details of deque. -- Change `reverse` and `sort` returned value to `this`. - -## [4.3.0] - 2023.01.20 - -### Added - -- Add public member `container` to `Iterator` which means the container that the iterator pointed to. - -### Changed - -- Reimplement `Queue`, separate `Queue` from `Deque`. - -## [4.2.0] - 2022.11.20 - -### Changed - -- Optimized the structure of class `TreeNodeEnableIndex`. -- Change the `iterator access denied` error message to reduce the packing size. -- Change the internal storage of the hash container to the form of a linked list, traversing in insertion order. -- Standardize hash container. Make it extends from `Container` and add general functions. -- Refactor `LinkList` to do optimization. - -### Added - -- Add public `length` property to all the container. -- Add returned value to `pop` function including `popBack` and `popFront` to all the container which has such function. -- Add returned value to `eraseElementByKey` which means whether erase successfully. -- Add returned value to `push` or `insert` function which means the size of the container. - -### Fixed - -- Fixed wrong error type when `updateKeyByIterator`. -- Fixed wrong iterator was returned when erase tree reverse iterator. - -## [4.2.0-beta.1] - 2022.11.06 - -### Changed - -- Remove all the arrow function to optimize. -- Modify `HashContainer` implementation to optimize. - -## [4.2.0-beta.0] - 2022.10.30 - -### Added - -- Add `ts` sourcemap for debug mode. -- Add `this` param for `forEach` function. -- Support single package umd build. - -### Changed - -- Changed the packaging method of isolation packages release and the method of the member export. - -## [4.1.5] - 2022.09.30 - -### Added - -- Add `find`, `remove`, `updateItem` and `toArray` functions to `PriorityQueue`. -- Support single package release (use scope @js-sdsl). - -## [4.1.5-beta.1] - 2022.09.23 - -### Fixed - -- Get wrong tree index when size is 0. - -## [4.1.5-beta.0] - 2022.09.23 - -### Added - -- Add `index` property to tree iterator which represents the sequential index of the iterator in the tree. - -### Changed - -- Minimal optimization with private properties mangling, macro inlining and const enum. -- Private properties are now mangled. -- Remove `checkWithinAccessParams` function. -- Constants of `HashContainer` are moved to `HashContainerConst` const enum. -- The iteratorType parameter in the constructor now changed from `boolean` type to `IteratorType` const enum type. -- The type of `TreeNode.color` is now changed from `boolean` to `TreeNodeColor` const enum. -- Turn some member exports into export-only types. - -### Fixed - -- Fixed wrong iterator error message. - -## [4.1.4] - 2022.09.07 - -### Added - -- Add some notes. - -### Changed - -- Optimize hash container. -- Abstracting out the hash container. - -### Fixed - -- Fixed tree get height function return one larger than the real height. -- Tree-shaking not work in ES module. -- `Queue` and `Deque` should return `undefined` when container is empty. - -## [4.1.4-beta.0] - 2022.08.31 - -### Added - -- Add function update key by iterator. -- Add iterator copy function to get a copy of itself. -- Add insert by iterator hint function in tree container. - -### Changed - -- Changed OrderedMap's iterator pointer get from `Object.defineProperty'` to `Proxy`. -- Improve iterator performance by remove some judgment. -- Change iterator type description from `normal` and `reverse` to boolean. - -## [4.1.2-beta.0] - 2022.08.27 - -### Added - -- Make `SequentialContainer` and `TreeBaseContainer` export in the index. - -### Changed - -- Change rbTree binary search from recursive to loop implementation (don't effect using). -- Reduce memory waste during deque initialization. - -### Fixed - -- Fixed priority queue not dereference on pop. - -## [4.1.1] - 2022.08.23 - -### Fixed - -- Forgot to reset root node on rotation in red-black tree delete operation. -- Fix iterator invalidation after tree container removes iterator. - -## [4.1.0] - 2022.08.21 - -### Changed - -- Change some functions from recursive to loop implementation (don't effect using). -- Change some iterator function parameter type. -- Change commonjs target to `es6`. -- Change `Deque` from sequential queue to circular queue. -- Optimize so many places (don't affect using). - -### Fixed - -- Fix `Vector` length bugs. - -## [4.0.3] - 2022-08-13 - -### Changed - -- Change `if (this.empty())` to `if (!this.length)`. -- Change some unit test. -- Change class type and optimized type design. - -### Fixed - -- Fix can push undefined to deque. - -## [4.0.0] - 2022-07-30 - -### Changed - -- Remove InternalError error as much as possible (don't affect using). -- Change `HashSet` api `eraseElementByValue`'s name to `eraseElementByKey`. -- Change some unit tests to improve coverage (don't affect using). - -## [4.0.0-beta.0] - 2022-07-24 - -### Added - -- Complete test examples (don't effect using). -- The error thrown is standardized, you can catch it according to the error type. - -### Changed - -- Refactor all container from function to class (don't affect using). -- Abstracting tree containers and hash containers, change `Set`'s and `Map`'s name to `OrderedSet` and `OrderedMap` to distinguish it from the official container. -- Change `OrderedSet` api `eraseElementByValue`'s name to `eraseElementByKey`. - -### Fixed - -- Fixed so many bugs. - -## [3.0.0-beta.0] - 2022-04-29 - -### Added - -- Bidirectional iterator is provided for all containers except Stack, Queue, HashSet and HashMap. -- Added begin, end, rBegin and rEnd functions to some containers for using iterator. -- Added `eraseElementByIterator` function. - -### Changed - -- Changed Pair type `T, K` to `K, V` (don't affect using). -- Changed `find`, `lowerBound`, `upperBound`, `reverseLowerBound` and `reverseUpperBound` function's returned value to `Iterator`. - -### Fixed - -- Fixed an error when the insert value was 0. -- Fixed the problem that the lower version browser does not recognize symbol Compilation error caused by iterator. diff --git a/node_modules/@js-sdsl/ordered-map/LICENSE b/node_modules/@js-sdsl/ordered-map/LICENSE deleted file mode 100644 index d46bd7e..0000000 --- a/node_modules/@js-sdsl/ordered-map/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2021 Zilong Yao - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@js-sdsl/ordered-map/README.md b/node_modules/@js-sdsl/ordered-map/README.md deleted file mode 100644 index 5b68d20..0000000 --- a/node_modules/@js-sdsl/ordered-map/README.md +++ /dev/null @@ -1,270 +0,0 @@ -

- - js-sdsl logo - -

- -

A javascript standard data structure library which benchmark against C++ STL

- -

- NPM Version - Build Status - Coverage Status - GITHUB Star - NPM Downloads - Gzip Size - Rate this package - MIT-license - GITHUB-language -

- -

English | 简体中文

- -## ✨ Included data structures - -- **Stack** - first in last out stack. -- **Queue** - first in first out queue. -- **PriorityQueue** - heap-implemented priority queue. -- **Vector** - protected array, cannot to operate properties like `length` directly. -- **LinkList** - linked list of non-contiguous memory addresses. -- **Deque** - double-ended-queue, O(1) time complexity to `unshift` or getting elements by index. -- **OrderedSet** - sorted set which implemented by red black tree. -- **OrderedMap** - sorted map which implemented by red black tree. -- **HashSet** - refer to the [polyfill of ES6 Set](https://github.com/rousan/collections-es6). -- **HashMap** - refer to the [polyfill of ES6 Map](https://github.com/rousan/collections-es6). - -## ⚔️ Benchmark - -We are benchmarking against other popular data structure libraries. In some ways we're better than the best library. See [benchmark](https://js-sdsl.org/#/test/benchmark-analyze). - -## 🖥 Supported platforms - -| ![][Edge-Icon]
IE / Edge | ![][Firefox-Icon]
Firefox | ![][Chrome-Icon]
Chrome | ![][Safari-Icon]
Safari | ![][Opera-Icon]
Opera | ![][NodeJs-Icon]
NodeJs | -|:----------------------------:|:-----------------------------:|:---------------------------:|:---------------------------:|:-------------------------:|:---------------------------:| -| Edge 12 | 36 | 49 | 10 | 36 | 10 | - -## 📦 Download - -Download directly by cdn: - -- [js-sdsl.js](https://unpkg.com/js-sdsl/dist/umd/js-sdsl.js) (for development) -- [js-sdsl.min.js](https://unpkg.com/js-sdsl/dist/umd/js-sdsl.min.js) (for production) - -Or install js-sdsl using npm: - -```bash -npm install js-sdsl -``` - -Or you can download the isolation packages containing only the containers you want: - -| package | npm | size | docs | -|---------------------------------------------------|-----------------------------------------------------------------------|------------------------------------------------------------------|-----------------------------| -| [@js-sdsl/stack][stack-package] | [![NPM Package][stack-npm-version]][stack-npm-link] | [![GZIP Size][stack-umd-size]][stack-umd-link] | [link][stack-docs] | -| [@js-sdsl/queue][queue-package] | [![NPM Package][queue-npm-version]][queue-npm-link] | [![GZIP Size][queue-umd-size]][queue-umd-link] | [link][queue-docs] | -| [@js-sdsl/priority-queue][priority-queue-package] | [![NPM Package][priority-queue-npm-version]][priority-queue-npm-link] | [![GZIP Size][priority-queue-umd-size]][priority-queue-umd-link] | [link][priority-queue-docs] | -| [@js-sdsl/vector][vector-package] | [![NPM Package][vector-npm-version]][vector-npm-link] | [![GZIP Size][vector-umd-size]][vector-umd-link] | [link][vector-docs] | -| [@js-sdsl/link-list][link-list-package] | [![NPM Package][link-list-npm-version]][link-list-npm-link] | [![GZIP Size][link-list-umd-size]][link-list-umd-link] | [link][link-list-docs] | -| [@js-sdsl/deque][deque-package] | [![NPM Package][deque-npm-version]][deque-npm-link] | [![GZIP Size][deque-umd-size]][deque-umd-link] | [link][deque-docs] | -| [@js-sdsl/ordered-set][ordered-set-package] | [![NPM Package][ordered-set-npm-version]][ordered-set-npm-link] | [![GZIP Size][ordered-set-umd-size]][ordered-set-umd-link] | [link][ordered-set-docs] | -| [@js-sdsl/ordered-map][ordered-map-package] | [![NPM Package][ordered-map-npm-version]][ordered-map-npm-link] | [![GZIP Size][ordered-map-umd-size]][ordered-map-umd-link] | [link][ordered-map-docs] | -| [@js-sdsl/hash-set][hash-set-package] | [![NPM Package][hash-set-npm-version]][hash-set-npm-link] | [![GZIP Size][hash-set-umd-size]][hash-set-umd-link] | [link][hash-set-docs] | -| [@js-sdsl/hash-map][hash-map-package] | [![NPM Package][hash-map-npm-version]][hash-map-npm-link] | [![GZIP Size][hash-map-umd-size]][hash-map-umd-link] | [link][hash-map-docs] | - -## 🪒 Usage - -You can visit our [official website](https://js-sdsl.org/) to get more information. - -To help you have a better use, we also provide this [API document](https://js-sdsl.org/js-sdsl/index.html). - -For previous versions of the documentation, please visit: - -`https://js-sdsl.org/js-sdsl/previous/v${version}/index.html` - -E.g. - -[https://js-sdsl.org/js-sdsl/previous/v4.1.5/index.html](https://js-sdsl.org/js-sdsl/previous/v4.1.5/index.html) - -### For browser - -```html - - -``` - -### For npm - -```javascript -// esModule -import { OrderedMap } from 'js-sdsl'; -// commonJs -const { OrderedMap } = require('js-sdsl'); -const myOrderedMap = new OrderedMap(); -myOrderedMap.setElement(1, 2); -console.log(myOrderedMap.getElementByKey(1)); // 2 -``` - -## 🛠 Test - -### Unit test - -We use [karma](https://karma-runner.github.io/) and [mocha](https://mochajs.org/) frame to do unit tests and synchronize to [coveralls](https://coveralls.io/github/js-sdsl/js-sdsl). You can run `yarn test:unit` command to reproduce it. - -### For performance - -We tested most of the functions for efficiency. You can go to [`gh-pages/performance.md`](https://github.com/js-sdsl/js-sdsl/blob/gh-pages/performance.md) to see our running results or reproduce it with `yarn test:performance` command. - -You can also visit [here](https://js-sdsl.org/#/test/performance-test) to get the result. - -## ⌨️ Development - -Use Gitpod, a free online dev environment for GitHub. - -[![Open in Gippod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/js-sdsl/js-sdsl) - -Or clone locally: - -```bash -$ git clone https://github.com/js-sdsl/js-sdsl.git -$ cd js-sdsl -$ npm install -$ npm run dev # development mode -``` - -Then you can see the output in `dist/cjs` folder. - -## 🤝 Contributing - -Feel free to dive in! Open an issue or submit PRs. It may be helpful to read the [Contributor Guide](https://github.com/js-sdsl/js-sdsl/blob/main/.github/CONTRIBUTING.md). - -### Contributors - -Thanks goes to these wonderful people: - - - - - - - - - - - -

Takatoshi Kondo

💻 ⚠️

noname

💻
- - - - - - -This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! - -## ❤️ Sponsors and Backers - -The special thanks to these sponsors or backers because they provided support at a very early stage: - -eslint logo - -Thanks also give to these sponsors or backers: - -[![sponsors](https://opencollective.com/js-sdsl/tiers/sponsors.svg?avatarHeight=36)](https://opencollective.com/js-sdsl#support) - -[![backers](https://opencollective.com/js-sdsl/tiers/backers.svg?avatarHeight=36)](https://opencollective.com/js-sdsl#support) - -## 🪪 License - -[MIT](https://github.com/js-sdsl/js-sdsl/blob/main/LICENSE) © [ZLY201](https://github.com/zly201) - -[Edge-Icon]: https://js-sdsl.org/assets/image/platform/edge.png -[Firefox-Icon]: https://js-sdsl.org/assets/image/platform/firefox.png -[Chrome-Icon]: https://js-sdsl.org/assets/image/platform/chrome.png -[Safari-Icon]: https://js-sdsl.org/assets/image/platform/safari.png -[Opera-Icon]: https://js-sdsl.org/assets/image/platform/opera.png -[NodeJs-Icon]: https://js-sdsl.org/assets/image/platform/nodejs.png - -[stack-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/OtherContainer/Stack.ts -[stack-npm-version]: https://img.shields.io/npm/v/@js-sdsl/stack -[stack-npm-link]: https://www.npmjs.com/package/@js-sdsl/stack -[stack-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/stack/dist/umd/stack.min.js?compression=gzip&style=flat-square/ -[stack-umd-link]: https://unpkg.com/@js-sdsl/stack/dist/umd/stack.min.js -[stack-docs]: https://js-sdsl.org/js-sdsl/classes/Stack.html - -[queue-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/OtherContainer/Queue.ts -[queue-npm-version]: https://img.shields.io/npm/v/@js-sdsl/queue -[queue-npm-link]: https://www.npmjs.com/package/@js-sdsl/queue -[queue-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/queue/dist/umd/queue.min.js?compression=gzip&style=flat-square/ -[queue-umd-link]: https://unpkg.com/@js-sdsl/queue/dist/umd/queue.min.js -[queue-docs]: https://js-sdsl.org/js-sdsl/classes/Queue.html - -[priority-queue-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/OtherContainer/PriorityQueue.ts -[priority-queue-npm-version]: https://img.shields.io/npm/v/@js-sdsl/priority-queue -[priority-queue-npm-link]: https://www.npmjs.com/package/@js-sdsl/priority-queue -[priority-queue-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/priority-queue/dist/umd/priority-queue.min.js?compression=gzip&style=flat-square/ -[priority-queue-umd-link]: https://unpkg.com/@js-sdsl/priority-queue/dist/umd/priority-queue.min.js -[priority-queue-docs]: https://js-sdsl.org/js-sdsl/classes/PriorityQueue.html - -[vector-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/SequentialContainer/Vector.ts -[vector-npm-version]: https://img.shields.io/npm/v/@js-sdsl/vector -[vector-npm-link]: https://www.npmjs.com/package/@js-sdsl/vector -[vector-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/vector/dist/umd/vector.min.js?compression=gzip&style=flat-square/ -[vector-umd-link]: https://unpkg.com/@js-sdsl/vector/dist/umd/vector.min.js -[vector-docs]: https://js-sdsl.org/js-sdsl/classes/Vector.html - -[link-list-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/SequentialContainer/LinkList.ts -[link-list-npm-version]: https://img.shields.io/npm/v/@js-sdsl/link-list -[link-list-npm-link]: https://www.npmjs.com/package/@js-sdsl/link-list -[link-list-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/link-list/dist/umd/link-list.min.js?compression=gzip&style=flat-square/ -[link-list-umd-link]: https://unpkg.com/@js-sdsl/link-list/dist/umd/link-list.min.js -[link-list-docs]: https://js-sdsl.org/js-sdsl/classes/LinkList.html - -[deque-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/SequentialContainer/Deque.ts -[deque-npm-version]: https://img.shields.io/npm/v/@js-sdsl/deque -[deque-npm-link]: https://www.npmjs.com/package/@js-sdsl/deque -[deque-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/deque/dist/umd/deque.min.js?compression=gzip&style=flat-square/ -[deque-umd-link]: https://unpkg.com/@js-sdsl/deque/dist/umd/deque.min.js -[deque-docs]: https://js-sdsl.org/js-sdsl/classes/Deque.html - -[ordered-set-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/TreeContainer/OrderedSet.ts -[ordered-set-npm-version]: https://img.shields.io/npm/v/@js-sdsl/ordered-set -[ordered-set-npm-link]: https://www.npmjs.com/package/@js-sdsl/ordered-set -[ordered-set-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/ordered-set/dist/umd/ordered-set.min.js?compression=gzip&style=flat-square/ -[ordered-set-umd-link]: https://unpkg.com/@js-sdsl/ordered-set/dist/umd/ordered-set.min.js -[ordered-set-docs]: https://js-sdsl.org/js-sdsl/classes/OrderedSet.html - -[ordered-map-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/TreeContainer/OrderedMap.ts -[ordered-map-npm-version]: https://img.shields.io/npm/v/@js-sdsl/ordered-map -[ordered-map-npm-link]: https://www.npmjs.com/package/@js-sdsl/ordered-map -[ordered-map-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/ordered-map/dist/umd/ordered-map.min.js?compression=gzip&style=flat-square/ -[ordered-map-umd-link]: https://unpkg.com/@js-sdsl/ordered-map/dist/umd/ordered-map.min.js -[ordered-map-docs]: https://js-sdsl.org/js-sdsl/classes/OrderedMap.html - -[hash-set-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/HashContainer/HashSet.ts -[hash-set-npm-version]: https://img.shields.io/npm/v/@js-sdsl/hash-set -[hash-set-npm-link]: https://www.npmjs.com/package/@js-sdsl/hash-set -[hash-set-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/hash-set/dist/umd/hash-set.min.js?compression=gzip&style=flat-square/ -[hash-set-umd-link]: https://unpkg.com/@js-sdsl/hash-set/dist/umd/hash-set.min.js -[hash-set-docs]: https://js-sdsl.org/js-sdsl/classes/HashSet.html - -[hash-map-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/HashContainer/HashMap.ts -[hash-map-npm-version]: https://img.shields.io/npm/v/@js-sdsl/hash-map -[hash-map-npm-link]: https://www.npmjs.com/package/@js-sdsl/hash-map -[hash-map-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/hash-map/dist/umd/hash-map.min.js?compression=gzip&style=flat-square/ -[hash-map-umd-link]: https://unpkg.com/@js-sdsl/hash-map/dist/umd/hash-map.min.js -[hash-map-docs]: https://js-sdsl.org/js-sdsl/classes/HashMap.html diff --git a/node_modules/@js-sdsl/ordered-map/README.zh-CN.md b/node_modules/@js-sdsl/ordered-map/README.zh-CN.md deleted file mode 100644 index a10ef17..0000000 --- a/node_modules/@js-sdsl/ordered-map/README.zh-CN.md +++ /dev/null @@ -1,272 +0,0 @@ -

- - js-sdsl logo - -

- -

一款参考 C++ STL 实现的 JavaScript 标准数据结构库

- -

- NPM Version - Build Status - Coverage Status - GITHUB Star - NPM Downloads - Gzip Size - Rate this package - MIT-license - GITHUB-language -

- -

English | 简体中文

- -## ✨ 包含的数据结构 - -- **Stack** - 先进后出的堆栈 -- **Queue** - 先进先出的队列 -- **PriorityQueue** - 堆实现的优先级队列 -- **Vector** - 受保护的数组,不能直接操作像 `length` 这样的属性 -- **LinkList** - 非连续内存地址的链表 -- **Deque** - 双端队列,向前和向后插入元素或按索引获取元素的时间复杂度为 O(1) -- **OrderedSet** - 由红黑树实现的排序集合 -- **OrderedMap** - 由红黑树实现的排序字典 -- **HashSet** - 参考 [ES6 Set polyfill](https://github.com/rousan/collections-es6) 实现的哈希集合 -- **HashMap** - 参考 [ES6 Set polyfill](https://github.com/rousan/collections-es6) 实现的哈希字典 - -## ⚔️ 基准测试 - -我们和其他数据结构库进行了基准测试,在某些场景我们甚至超过了当前最流行的库 - -查看 [benchmark](https://js-sdsl.org/#/zh-cn/test/benchmark-analyze) 以获取更多信息 - -## 🖥 支持的平台 - -| ![][Edge-Icon]
IE / Edge | ![][Firefox-Icon]
Firefox | ![][Chrome-Icon]
Chrome | ![][Safari-Icon]
Safari | ![][Opera-Icon]
Opera | ![][NodeJs-Icon]
NodeJs | -|:----------------------------:|:-----------------------------:|:---------------------------:|:---------------------------:|:-------------------------:|:---------------------------:| -| Edge 12 | 36 | 49 | 10 | 36 | 10 | - -## 📦 下载 - -使用 cdn 直接引入 - -- [js-sdsl.js](https://unpkg.com/js-sdsl/dist/umd/js-sdsl.js) (for development) -- [js-sdsl.min.js](https://unpkg.com/js-sdsl/dist/umd/js-sdsl.min.js) (for production) - -使用 npm 下载 - -```bash -npm install js-sdsl -``` - -或者根据需要安装以下任意单个包 - -| package | npm | size | docs | -|---------------------------------------------------|-----------------------------------------------------------------------|------------------------------------------------------------------|-----------------------------| -| [@js-sdsl/stack][stack-package] | [![NPM Package][stack-npm-version]][stack-npm-link] | [![GZIP Size][stack-umd-size]][stack-umd-link] | [link][stack-docs] | -| [@js-sdsl/queue][queue-package] | [![NPM Package][queue-npm-version]][queue-npm-link] | [![GZIP Size][queue-umd-size]][queue-umd-link] | [link][queue-docs] | -| [@js-sdsl/priority-queue][priority-queue-package] | [![NPM Package][priority-queue-npm-version]][priority-queue-npm-link] | [![GZIP Size][priority-queue-umd-size]][priority-queue-umd-link] | [link][priority-queue-docs] | -| [@js-sdsl/vector][vector-package] | [![NPM Package][vector-npm-version]][vector-npm-link] | [![GZIP Size][vector-umd-size]][vector-umd-link] | [link][vector-docs] | -| [@js-sdsl/link-list][link-list-package] | [![NPM Package][link-list-npm-version]][link-list-npm-link] | [![GZIP Size][link-list-umd-size]][link-list-umd-link] | [link][link-list-docs] | -| [@js-sdsl/deque][deque-package] | [![NPM Package][deque-npm-version]][deque-npm-link] | [![GZIP Size][deque-umd-size]][deque-umd-link] | [link][deque-docs] | -| [@js-sdsl/ordered-set][ordered-set-package] | [![NPM Package][ordered-set-npm-version]][ordered-set-npm-link] | [![GZIP Size][ordered-set-umd-size]][ordered-set-umd-link] | [link][ordered-set-docs] | -| [@js-sdsl/ordered-map][ordered-map-package] | [![NPM Package][ordered-map-npm-version]][ordered-map-npm-link] | [![GZIP Size][ordered-map-umd-size]][ordered-map-umd-link] | [link][ordered-map-docs] | -| [@js-sdsl/hash-set][hash-set-package] | [![NPM Package][hash-set-npm-version]][hash-set-npm-link] | [![GZIP Size][hash-set-umd-size]][hash-set-umd-link] | [link][hash-set-docs] | -| [@js-sdsl/hash-map][hash-map-package] | [![NPM Package][hash-map-npm-version]][hash-map-npm-link] | [![GZIP Size][hash-map-umd-size]][hash-map-umd-link] | [link][hash-map-docs] | - -## 🪒 使用说明 - -您可以[访问我们的主页](https://js-sdsl.org/)获取更多信息 - -并且我们提供了完整的 [API 文档](https://js-sdsl.org/js-sdsl/index.html)供您参考 - -想要查看从前版本的文档,请访问: - -`https://js-sdsl.org/js-sdsl/previous/v${version}/index.html` - -例如: - -[https://js-sdsl.org/js-sdsl/previous/v4.1.5/index.html](https://js-sdsl.org/js-sdsl/previous/v4.1.5/index.html) - -### 在浏览器中使用 - -```html - - -``` - -### npm 引入 - -```javascript -// esModule -import { OrderedMap } from 'js-sdsl'; -// commonJs -const { OrderedMap } = require('js-sdsl'); -const myOrderedMap = new OrderedMap(); -myOrderedMap.setElement(1, 2); -console.log(myOrderedMap.getElementByKey(1)); // 2 -``` - -## 🛠 测试 - -### 单元测试 - -我们使用 [karma](https://karma-runner.github.io/) 和 [mocha](https://mochajs.org/) 框架进行单元测试,并同步到 [coveralls](https://coveralls.io/github/js-sdsl/js-sdsl) 上,你可以使用 `yarn test:unit` 命令来重建它 - -### 对于性能的校验 - -我们对于编写的所有 API 进行了性能测试,并将结果同步到了 [`gh-pages/performance.md`](https://github.com/js-sdsl/js-sdsl/blob/gh-pages/performance.md) 中,你可以通过 `yarn test:performance` 命令来重现它 - -您也可以访问[我们的网站](https://js-sdsl.org/#/zh-cn/test/performance-test)来获取结果 - -## ⌨️ 开发 - -可以使用 Gitpod 进行在线编辑: - -[![Open in Gippod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/js-sdsl/js-sdsl) - -或者在本地使用以下命令获取源码进行开发: - -```bash -$ git clone https://github.com/js-sdsl/js-sdsl.git -$ cd js-sdsl -$ npm install -$ npm run dev # development mode -``` - -之后您在 `dist/cjs` 文件夹中可以看到在 `dev` 模式下打包生成的产物 - -## 🤝 贡献 - -我们欢迎所有的开发人员提交 issue 或 pull request,阅读[贡献者指南](https://github.com/js-sdsl/js-sdsl/blob/main/.github/CONTRIBUTING.md)可能会有所帮助 - -### 贡献者 - -感谢对本项目做出贡献的开发者们: - - - - - - - - - - - -

Takatoshi Kondo

💻 ⚠️

noname

💻
- - - - - - -本项目遵循 [all-contributors](https://github.com/all-contributors/all-contributors) 规范。 欢迎任何形式的贡献! - -## ❤️ 赞助者 - -特别鸣谢下列赞助商和支持者们,他们在非常早期的时候为我们提供了支持: - -eslint logo - -同样感谢这些赞助商和支持者们: - -[![sponsors](https://opencollective.com/js-sdsl/tiers/sponsors.svg?avatarHeight=36)](https://opencollective.com/js-sdsl#support) - -[![backers](https://opencollective.com/js-sdsl/tiers/backers.svg?avatarHeight=36)](https://opencollective.com/js-sdsl#support) - -## 🪪 许可证 - -[MIT](https://github.com/js-sdsl/js-sdsl/blob/main/LICENSE) © [ZLY201](https://github.com/zly201) - -[Edge-Icon]: https://js-sdsl.org/assets/image/platform/edge.png -[Firefox-Icon]: https://js-sdsl.org/assets/image/platform/firefox.png -[Chrome-Icon]: https://js-sdsl.org/assets/image/platform/chrome.png -[Safari-Icon]: https://js-sdsl.org/assets/image/platform/safari.png -[Opera-Icon]: https://js-sdsl.org/assets/image/platform/opera.png -[NodeJs-Icon]: https://js-sdsl.org/assets/image/platform/nodejs.png - -[stack-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/OtherContainer/Stack.ts -[stack-npm-version]: https://img.shields.io/npm/v/@js-sdsl/stack -[stack-npm-link]: https://www.npmjs.com/package/@js-sdsl/stack -[stack-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/stack/dist/umd/stack.min.js?compression=gzip&style=flat-square/ -[stack-umd-link]: https://unpkg.com/@js-sdsl/stack/dist/umd/stack.min.js -[stack-docs]: https://js-sdsl.org/js-sdsl/classes/Stack.html - -[queue-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/OtherContainer/Queue.ts -[queue-npm-version]: https://img.shields.io/npm/v/@js-sdsl/queue -[queue-npm-link]: https://www.npmjs.com/package/@js-sdsl/queue -[queue-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/queue/dist/umd/queue.min.js?compression=gzip&style=flat-square/ -[queue-umd-link]: https://unpkg.com/@js-sdsl/queue/dist/umd/queue.min.js -[queue-docs]: https://js-sdsl.org/js-sdsl/classes/Queue.html - -[priority-queue-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/OtherContainer/PriorityQueue.ts -[priority-queue-npm-version]: https://img.shields.io/npm/v/@js-sdsl/priority-queue -[priority-queue-npm-link]: https://www.npmjs.com/package/@js-sdsl/priority-queue -[priority-queue-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/priority-queue/dist/umd/priority-queue.min.js?compression=gzip&style=flat-square/ -[priority-queue-umd-link]: https://unpkg.com/@js-sdsl/priority-queue/dist/umd/priority-queue.min.js -[priority-queue-docs]: https://js-sdsl.org/js-sdsl/classes/PriorityQueue.html - -[vector-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/SequentialContainer/Vector.ts -[vector-npm-version]: https://img.shields.io/npm/v/@js-sdsl/vector -[vector-npm-link]: https://www.npmjs.com/package/@js-sdsl/vector -[vector-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/vector/dist/umd/vector.min.js?compression=gzip&style=flat-square/ -[vector-umd-link]: https://unpkg.com/@js-sdsl/vector/dist/umd/vector.min.js -[vector-docs]: https://js-sdsl.org/js-sdsl/classes/Vector.html - -[link-list-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/SequentialContainer/LinkList.ts -[link-list-npm-version]: https://img.shields.io/npm/v/@js-sdsl/link-list -[link-list-npm-link]: https://www.npmjs.com/package/@js-sdsl/link-list -[link-list-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/link-list/dist/umd/link-list.min.js?compression=gzip&style=flat-square/ -[link-list-umd-link]: https://unpkg.com/@js-sdsl/link-list/dist/umd/link-list.min.js -[link-list-docs]: https://js-sdsl.org/js-sdsl/classes/LinkList.html - -[deque-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/SequentialContainer/Deque.ts -[deque-npm-version]: https://img.shields.io/npm/v/@js-sdsl/deque -[deque-npm-link]: https://www.npmjs.com/package/@js-sdsl/deque -[deque-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/deque/dist/umd/deque.min.js?compression=gzip&style=flat-square/ -[deque-umd-link]: https://unpkg.com/@js-sdsl/deque/dist/umd/deque.min.js -[deque-docs]: https://js-sdsl.org/js-sdsl/classes/Deque.html - -[ordered-set-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/TreeContainer/OrderedSet.ts -[ordered-set-npm-version]: https://img.shields.io/npm/v/@js-sdsl/ordered-set -[ordered-set-npm-link]: https://www.npmjs.com/package/@js-sdsl/ordered-set -[ordered-set-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/ordered-set/dist/umd/ordered-set.min.js?compression=gzip&style=flat-square/ -[ordered-set-umd-link]: https://unpkg.com/@js-sdsl/ordered-set/dist/umd/ordered-set.min.js -[ordered-set-docs]: https://js-sdsl.org/js-sdsl/classes/OrderedSet.html - -[ordered-map-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/TreeContainer/OrderedMap.ts -[ordered-map-npm-version]: https://img.shields.io/npm/v/@js-sdsl/ordered-map -[ordered-map-npm-link]: https://www.npmjs.com/package/@js-sdsl/ordered-map -[ordered-map-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/ordered-map/dist/umd/ordered-map.min.js?compression=gzip&style=flat-square/ -[ordered-map-umd-link]: https://unpkg.com/@js-sdsl/ordered-map/dist/umd/ordered-map.min.js -[ordered-map-docs]: https://js-sdsl.org/js-sdsl/classes/OrderedMap.html - -[hash-set-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/HashContainer/HashSet.ts -[hash-set-npm-version]: https://img.shields.io/npm/v/@js-sdsl/hash-set -[hash-set-npm-link]: https://www.npmjs.com/package/@js-sdsl/hash-set -[hash-set-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/hash-set/dist/umd/hash-set.min.js?compression=gzip&style=flat-square/ -[hash-set-umd-link]: https://unpkg.com/@js-sdsl/hash-set/dist/umd/hash-set.min.js -[hash-set-docs]: https://js-sdsl.org/js-sdsl/classes/HashSet.html - -[hash-map-package]: https://github.com/js-sdsl/js-sdsl/blob/main/src/container/HashContainer/HashMap.ts -[hash-map-npm-version]: https://img.shields.io/npm/v/@js-sdsl/hash-map -[hash-map-npm-link]: https://www.npmjs.com/package/@js-sdsl/hash-map -[hash-map-umd-size]: https://img.badgesize.io/https://unpkg.com/@js-sdsl/hash-map/dist/umd/hash-map.min.js?compression=gzip&style=flat-square/ -[hash-map-umd-link]: https://unpkg.com/@js-sdsl/hash-map/dist/umd/hash-map.min.js -[hash-map-docs]: https://js-sdsl.org/js-sdsl/classes/HashMap.html diff --git a/node_modules/@js-sdsl/ordered-map/dist/cjs/index.d.ts b/node_modules/@js-sdsl/ordered-map/dist/cjs/index.d.ts deleted file mode 100644 index 8615f37..0000000 --- a/node_modules/@js-sdsl/ordered-map/dist/cjs/index.d.ts +++ /dev/null @@ -1,402 +0,0 @@ -/** - * @description The iterator type including `NORMAL` and `REVERSE`. - */ -declare const enum IteratorType { - NORMAL = 0, - REVERSE = 1 -} -declare abstract class ContainerIterator { - /** - * @description The container pointed to by the iterator. - */ - abstract readonly container: Container; - /** - * @description Iterator's type. - * @example - * console.log(container.end().iteratorType === IteratorType.NORMAL); // true - */ - readonly iteratorType: IteratorType; - /** - * @param iter - The other iterator you want to compare. - * @returns Whether this equals to obj. - * @example - * container.find(1).equals(container.end()); - */ - equals(iter: ContainerIterator): boolean; - /** - * @description Pointers to element. - * @returns The value of the pointer's element. - * @example - * const val = container.begin().pointer; - */ - abstract get pointer(): T; - /** - * @description Set pointer's value (some containers are unavailable). - * @param newValue - The new value you want to set. - * @example - * (>container).begin().pointer = 1; - */ - abstract set pointer(newValue: T); - /** - * @description Move `this` iterator to pre. - * @returns The iterator's self. - * @example - * const iter = container.find(1); // container = [0, 1] - * const pre = iter.pre(); - * console.log(pre === iter); // true - * console.log(pre.equals(iter)); // true - * console.log(pre.pointer, iter.pointer); // 0, 0 - */ - abstract pre(): this; - /** - * @description Move `this` iterator to next. - * @returns The iterator's self. - * @example - * const iter = container.find(1); // container = [1, 2] - * const next = iter.next(); - * console.log(next === iter); // true - * console.log(next.equals(iter)); // true - * console.log(next.pointer, iter.pointer); // 2, 2 - */ - abstract next(): this; - /** - * @description Get a copy of itself. - * @returns The copy of self. - * @example - * const iter = container.find(1); // container = [1, 2] - * const next = iter.copy().next(); - * console.log(next === iter); // false - * console.log(next.equals(iter)); // false - * console.log(next.pointer, iter.pointer); // 2, 1 - */ - abstract copy(): ContainerIterator; - abstract isAccessible(): boolean; -} -declare abstract class Base { - /** - * @returns The size of the container. - * @example - * const container = new Vector([1, 2]); - * console.log(container.length); // 2 - */ - get length(): number; - /** - * @returns The size of the container. - * @example - * const container = new Vector([1, 2]); - * console.log(container.size()); // 2 - */ - size(): number; - /** - * @returns Whether the container is empty. - * @example - * container.clear(); - * console.log(container.empty()); // true - */ - empty(): boolean; - /** - * @description Clear the container. - * @example - * container.clear(); - * console.log(container.empty()); // true - */ - abstract clear(): void; -} -declare abstract class Container extends Base { - /** - * @returns Iterator pointing to the beginning element. - * @example - * const begin = container.begin(); - * const end = container.end(); - * for (const it = begin; !it.equals(end); it.next()) { - * doSomething(it.pointer); - * } - */ - abstract begin(): ContainerIterator; - /** - * @returns Iterator pointing to the super end like c++. - * @example - * const begin = container.begin(); - * const end = container.end(); - * for (const it = begin; !it.equals(end); it.next()) { - * doSomething(it.pointer); - * } - */ - abstract end(): ContainerIterator; - /** - * @returns Iterator pointing to the end element. - * @example - * const rBegin = container.rBegin(); - * const rEnd = container.rEnd(); - * for (const it = rBegin; !it.equals(rEnd); it.next()) { - * doSomething(it.pointer); - * } - */ - abstract rBegin(): ContainerIterator; - /** - * @returns Iterator pointing to the super begin like c++. - * @example - * const rBegin = container.rBegin(); - * const rEnd = container.rEnd(); - * for (const it = rBegin; !it.equals(rEnd); it.next()) { - * doSomething(it.pointer); - * } - */ - abstract rEnd(): ContainerIterator; - /** - * @returns The first element of the container. - */ - abstract front(): T | undefined; - /** - * @returns The last element of the container. - */ - abstract back(): T | undefined; - /** - * @param element - The element you want to find. - * @returns An iterator pointing to the element if found, or super end if not found. - * @example - * container.find(1).equals(container.end()); - */ - abstract find(element: T): ContainerIterator; - /** - * @description Iterate over all elements in the container. - * @param callback - Callback function like Array.forEach. - * @example - * container.forEach((element, index) => console.log(element, index)); - */ - abstract forEach(callback: (element: T, index: number, container: Container) => void): void; - /** - * @description Gets the value of the element at the specified position. - * @example - * const val = container.getElementByPos(-1); // throw a RangeError - */ - abstract getElementByPos(pos: number): T; - /** - * @description Removes the element at the specified position. - * @param pos - The element's position you want to remove. - * @returns The container length after erasing. - * @example - * container.eraseElementByPos(-1); // throw a RangeError - */ - abstract eraseElementByPos(pos: number): number; - /** - * @description Removes element by iterator and move `iter` to next. - * @param iter - The iterator you want to erase. - * @returns The next iterator. - * @example - * container.eraseElementByIterator(container.begin()); - * container.eraseElementByIterator(container.end()); // throw a RangeError - */ - abstract eraseElementByIterator(iter: ContainerIterator): ContainerIterator; - /** - * @description Using for `for...of` syntax like Array. - * @example - * for (const element of container) { - * console.log(element); - * } - */ - abstract [Symbol.iterator](): Generator; -} -/** - * @description The initial data type passed in when initializing the container. - */ -type initContainer = { - size?: number | (() => number); - length?: number; - forEach: (callback: (el: T) => void) => void; -}; -declare abstract class TreeIterator extends ContainerIterator { - abstract readonly container: TreeContainer; - /** - * @description Get the sequential index of the iterator in the tree container.
- * Note: - * This function only takes effect when the specified tree container `enableIndex = true`. - * @returns The index subscript of the node in the tree. - * @example - * const st = new OrderedSet([1, 2, 3], true); - * console.log(st.begin().next().index); // 1 - */ - get index(): number; - isAccessible(): boolean; - // @ts-ignore - pre(): this; - // @ts-ignore - next(): this; -} -declare const enum TreeNodeColor { - RED = 1, - BLACK = 0 -} -declare class TreeNode { - _color: TreeNodeColor; - _key: K | undefined; - _value: V | undefined; - _left: TreeNode | undefined; - _right: TreeNode | undefined; - _parent: TreeNode | undefined; - constructor(key?: K, value?: V, color?: TreeNodeColor); - /** - * @description Get the pre node. - * @returns TreeNode about the pre node. - */ - _pre(): TreeNode; - /** - * @description Get the next node. - * @returns TreeNode about the next node. - */ - _next(): TreeNode; - /** - * @description Rotate left. - * @returns TreeNode about moved to original position after rotation. - */ - _rotateLeft(): TreeNode; - /** - * @description Rotate right. - * @returns TreeNode about moved to original position after rotation. - */ - _rotateRight(): TreeNode; -} -declare abstract class TreeContainer extends Container { - enableIndex: boolean; - protected _inOrderTraversal(): TreeNode[]; - protected _inOrderTraversal(pos: number): TreeNode; - protected _inOrderTraversal(callback: (node: TreeNode, index: number, map: this) => void): TreeNode; - clear(): void; - /** - * @description Update node's key by iterator. - * @param iter - The iterator you want to change. - * @param key - The key you want to update. - * @returns Whether the modification is successful. - * @example - * const st = new orderedSet([1, 2, 5]); - * const iter = st.find(2); - * st.updateKeyByIterator(iter, 3); // then st will become [1, 3, 5] - */ - updateKeyByIterator(iter: TreeIterator, key: K): boolean; - eraseElementByPos(pos: number): number; - /** - * @description Remove the element of the specified key. - * @param key - The key you want to remove. - * @returns Whether erase successfully. - */ - eraseElementByKey(key: K): boolean; - eraseElementByIterator(iter: TreeIterator): TreeIterator; - /** - * @description Get the height of the tree. - * @returns Number about the height of the RB-tree. - */ - getHeight(): number; - /** - * @param key - The given key you want to compare. - * @returns An iterator to the first element less than the given key. - */ - abstract reverseUpperBound(key: K): TreeIterator; - /** - * @description Union the other tree to self. - * @param other - The other tree container you want to merge. - * @returns The size of the tree after union. - */ - abstract union(other: TreeContainer): number; - /** - * @param key - The given key you want to compare. - * @returns An iterator to the first element not greater than the given key. - */ - abstract reverseLowerBound(key: K): TreeIterator; - /** - * @param key - The given key you want to compare. - * @returns An iterator to the first element not less than the given key. - */ - abstract lowerBound(key: K): TreeIterator; - /** - * @param key - The given key you want to compare. - * @returns An iterator to the first element greater than the given key. - */ - abstract upperBound(key: K): TreeIterator; -} -declare class OrderedMapIterator extends TreeIterator { - container: OrderedMap; - constructor(node: TreeNode, header: TreeNode, container: OrderedMap, iteratorType?: IteratorType); - get pointer(): [ - K, - V - ]; - copy(): OrderedMapIterator; - // @ts-ignore - equals(iter: OrderedMapIterator): boolean; -} -declare class OrderedMap extends TreeContainer { - /** - * @param container - The initialization container. - * @param cmp - The compare function. - * @param enableIndex - Whether to enable iterator indexing function. - * @example - * new OrderedMap(); - * new OrderedMap([[0, 1], [2, 1]]); - * new OrderedMap([[0, 1], [2, 1]], (x, y) => x - y); - * new OrderedMap([[0, 1], [2, 1]], (x, y) => x - y, true); - */ - constructor(container?: initContainer<[ - K, - V - ]>, cmp?: (x: K, y: K) => number, enableIndex?: boolean); - begin(): OrderedMapIterator; - end(): OrderedMapIterator; - rBegin(): OrderedMapIterator; - rEnd(): OrderedMapIterator; - front(): [ - K, - V - ] | undefined; - back(): [ - K, - V - ] | undefined; - lowerBound(key: K): OrderedMapIterator; - upperBound(key: K): OrderedMapIterator; - reverseLowerBound(key: K): OrderedMapIterator; - reverseUpperBound(key: K): OrderedMapIterator; - forEach(callback: (element: [ - K, - V - ], index: number, map: OrderedMap) => void): void; - /** - * @description Insert a key-value pair or set value by the given key. - * @param key - The key want to insert. - * @param value - The value want to set. - * @param hint - You can give an iterator hint to improve insertion efficiency. - * @return The size of container after setting. - * @example - * const mp = new OrderedMap([[2, 0], [4, 0], [5, 0]]); - * const iter = mp.begin(); - * mp.setElement(1, 0); - * mp.setElement(3, 0, iter); // give a hint will be faster. - */ - setElement(key: K, value: V, hint?: OrderedMapIterator): number; - getElementByPos(pos: number): [ - K, - V - ]; - find(key: K): OrderedMapIterator; - /** - * @description Get the value of the element of the specified key. - * @param key - The specified key you want to get. - * @example - * const val = container.getElementByKey(1); - */ - getElementByKey(key: K): V | undefined; - union(other: OrderedMap): number; - [Symbol.iterator](): Generator<[ - K, - V - ], void, unknown>; - // @ts-ignore - eraseElementByIterator(iter: OrderedMapIterator): OrderedMapIterator; -} -export { OrderedMap }; -export type { OrderedMapIterator, IteratorType, Container, ContainerIterator, TreeContainer }; diff --git a/node_modules/@js-sdsl/ordered-map/dist/cjs/index.js b/node_modules/@js-sdsl/ordered-map/dist/cjs/index.js deleted file mode 100644 index 575a7fa..0000000 --- a/node_modules/@js-sdsl/ordered-map/dist/cjs/index.js +++ /dev/null @@ -1,795 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "t", { - value: true -}); - -class TreeNode { - constructor(t, e, s = 1) { - this.i = undefined; - this.h = undefined; - this.o = undefined; - this.u = t; - this.l = e; - this.p = s; - } - I() { - let t = this; - const e = t.o.o === t; - if (e && t.p === 1) { - t = t.h; - } else if (t.i) { - t = t.i; - while (t.h) { - t = t.h; - } - } else { - if (e) { - return t.o; - } - let s = t.o; - while (s.i === t) { - t = s; - s = t.o; - } - t = s; - } - return t; - } - B() { - let t = this; - if (t.h) { - t = t.h; - while (t.i) { - t = t.i; - } - return t; - } else { - let e = t.o; - while (e.h === t) { - t = e; - e = t.o; - } - if (t.h !== e) { - return e; - } else return t; - } - } - _() { - const t = this.o; - const e = this.h; - const s = e.i; - if (t.o === this) t.o = e; else if (t.i === this) t.i = e; else t.h = e; - e.o = t; - e.i = this; - this.o = e; - this.h = s; - if (s) s.o = this; - return e; - } - g() { - const t = this.o; - const e = this.i; - const s = e.h; - if (t.o === this) t.o = e; else if (t.i === this) t.i = e; else t.h = e; - e.o = t; - e.h = this; - this.o = e; - this.i = s; - if (s) s.o = this; - return e; - } -} - -class TreeNodeEnableIndex extends TreeNode { - constructor() { - super(...arguments); - this.M = 1; - } - _() { - const t = super._(); - this.O(); - t.O(); - return t; - } - g() { - const t = super.g(); - this.O(); - t.O(); - return t; - } - O() { - this.M = 1; - if (this.i) { - this.M += this.i.M; - } - if (this.h) { - this.M += this.h.M; - } - } -} - -class ContainerIterator { - constructor(t = 0) { - this.iteratorType = t; - } - equals(t) { - return this.T === t.T; - } -} - -class Base { - constructor() { - this.m = 0; - } - get length() { - return this.m; - } - size() { - return this.m; - } - empty() { - return this.m === 0; - } -} - -class Container extends Base {} - -function throwIteratorAccessError() { - throw new RangeError("Iterator access denied!"); -} - -class TreeContainer extends Container { - constructor(t = function(t, e) { - if (t < e) return -1; - if (t > e) return 1; - return 0; - }, e = false) { - super(); - this.v = undefined; - this.A = t; - this.enableIndex = e; - this.N = e ? TreeNodeEnableIndex : TreeNode; - this.C = new this.N; - } - R(t, e) { - let s = this.C; - while (t) { - const i = this.A(t.u, e); - if (i < 0) { - t = t.h; - } else if (i > 0) { - s = t; - t = t.i; - } else return t; - } - return s; - } - K(t, e) { - let s = this.C; - while (t) { - const i = this.A(t.u, e); - if (i <= 0) { - t = t.h; - } else { - s = t; - t = t.i; - } - } - return s; - } - L(t, e) { - let s = this.C; - while (t) { - const i = this.A(t.u, e); - if (i < 0) { - s = t; - t = t.h; - } else if (i > 0) { - t = t.i; - } else return t; - } - return s; - } - k(t, e) { - let s = this.C; - while (t) { - const i = this.A(t.u, e); - if (i < 0) { - s = t; - t = t.h; - } else { - t = t.i; - } - } - return s; - } - P(t) { - while (true) { - const e = t.o; - if (e === this.C) return; - if (t.p === 1) { - t.p = 0; - return; - } - if (t === e.i) { - const s = e.h; - if (s.p === 1) { - s.p = 0; - e.p = 1; - if (e === this.v) { - this.v = e._(); - } else e._(); - } else { - if (s.h && s.h.p === 1) { - s.p = e.p; - e.p = 0; - s.h.p = 0; - if (e === this.v) { - this.v = e._(); - } else e._(); - return; - } else if (s.i && s.i.p === 1) { - s.p = 1; - s.i.p = 0; - s.g(); - } else { - s.p = 1; - t = e; - } - } - } else { - const s = e.i; - if (s.p === 1) { - s.p = 0; - e.p = 1; - if (e === this.v) { - this.v = e.g(); - } else e.g(); - } else { - if (s.i && s.i.p === 1) { - s.p = e.p; - e.p = 0; - s.i.p = 0; - if (e === this.v) { - this.v = e.g(); - } else e.g(); - return; - } else if (s.h && s.h.p === 1) { - s.p = 1; - s.h.p = 0; - s._(); - } else { - s.p = 1; - t = e; - } - } - } - } - } - S(t) { - if (this.m === 1) { - this.clear(); - return; - } - let e = t; - while (e.i || e.h) { - if (e.h) { - e = e.h; - while (e.i) e = e.i; - } else { - e = e.i; - } - const s = t.u; - t.u = e.u; - e.u = s; - const i = t.l; - t.l = e.l; - e.l = i; - t = e; - } - if (this.C.i === e) { - this.C.i = e.o; - } else if (this.C.h === e) { - this.C.h = e.o; - } - this.P(e); - let s = e.o; - if (e === s.i) { - s.i = undefined; - } else s.h = undefined; - this.m -= 1; - this.v.p = 0; - if (this.enableIndex) { - while (s !== this.C) { - s.M -= 1; - s = s.o; - } - } - } - U(t) { - const e = typeof t === "number" ? t : undefined; - const s = typeof t === "function" ? t : undefined; - const i = typeof t === "undefined" ? [] : undefined; - let r = 0; - let n = this.v; - const h = []; - while (h.length || n) { - if (n) { - h.push(n); - n = n.i; - } else { - n = h.pop(); - if (r === e) return n; - i && i.push(n); - s && s(n, r, this); - r += 1; - n = n.h; - } - } - return i; - } - j(t) { - while (true) { - const e = t.o; - if (e.p === 0) return; - const s = e.o; - if (e === s.i) { - const i = s.h; - if (i && i.p === 1) { - i.p = e.p = 0; - if (s === this.v) return; - s.p = 1; - t = s; - continue; - } else if (t === e.h) { - t.p = 0; - if (t.i) { - t.i.o = e; - } - if (t.h) { - t.h.o = s; - } - e.h = t.i; - s.i = t.h; - t.i = e; - t.h = s; - if (s === this.v) { - this.v = t; - this.C.o = t; - } else { - const e = s.o; - if (e.i === s) { - e.i = t; - } else e.h = t; - } - t.o = s.o; - e.o = t; - s.o = t; - s.p = 1; - } else { - e.p = 0; - if (s === this.v) { - this.v = s.g(); - } else s.g(); - s.p = 1; - return; - } - } else { - const i = s.i; - if (i && i.p === 1) { - i.p = e.p = 0; - if (s === this.v) return; - s.p = 1; - t = s; - continue; - } else if (t === e.i) { - t.p = 0; - if (t.i) { - t.i.o = s; - } - if (t.h) { - t.h.o = e; - } - s.h = t.i; - e.i = t.h; - t.i = s; - t.h = e; - if (s === this.v) { - this.v = t; - this.C.o = t; - } else { - const e = s.o; - if (e.i === s) { - e.i = t; - } else e.h = t; - } - t.o = s.o; - e.o = t; - s.o = t; - s.p = 1; - } else { - e.p = 0; - if (s === this.v) { - this.v = s._(); - } else s._(); - s.p = 1; - return; - } - } - if (this.enableIndex) { - e.O(); - s.O(); - t.O(); - } - return; - } - } - q(t, e, s) { - if (this.v === undefined) { - this.m += 1; - this.v = new this.N(t, e, 0); - this.v.o = this.C; - this.C.o = this.C.i = this.C.h = this.v; - return this.m; - } - let i; - const r = this.C.i; - const n = this.A(r.u, t); - if (n === 0) { - r.l = e; - return this.m; - } else if (n > 0) { - r.i = new this.N(t, e); - r.i.o = r; - i = r.i; - this.C.i = i; - } else { - const r = this.C.h; - const n = this.A(r.u, t); - if (n === 0) { - r.l = e; - return this.m; - } else if (n < 0) { - r.h = new this.N(t, e); - r.h.o = r; - i = r.h; - this.C.h = i; - } else { - if (s !== undefined) { - const r = s.T; - if (r !== this.C) { - const s = this.A(r.u, t); - if (s === 0) { - r.l = e; - return this.m; - } else if (s > 0) { - const s = r.I(); - const n = this.A(s.u, t); - if (n === 0) { - s.l = e; - return this.m; - } else if (n < 0) { - i = new this.N(t, e); - if (s.h === undefined) { - s.h = i; - i.o = s; - } else { - r.i = i; - i.o = r; - } - } - } - } - } - if (i === undefined) { - i = this.v; - while (true) { - const s = this.A(i.u, t); - if (s > 0) { - if (i.i === undefined) { - i.i = new this.N(t, e); - i.i.o = i; - i = i.i; - break; - } - i = i.i; - } else if (s < 0) { - if (i.h === undefined) { - i.h = new this.N(t, e); - i.h.o = i; - i = i.h; - break; - } - i = i.h; - } else { - i.l = e; - return this.m; - } - } - } - } - } - if (this.enableIndex) { - let t = i.o; - while (t !== this.C) { - t.M += 1; - t = t.o; - } - } - this.j(i); - this.m += 1; - return this.m; - } - H(t, e) { - while (t) { - const s = this.A(t.u, e); - if (s < 0) { - t = t.h; - } else if (s > 0) { - t = t.i; - } else return t; - } - return t || this.C; - } - clear() { - this.m = 0; - this.v = undefined; - this.C.o = undefined; - this.C.i = this.C.h = undefined; - } - updateKeyByIterator(t, e) { - const s = t.T; - if (s === this.C) { - throwIteratorAccessError(); - } - if (this.m === 1) { - s.u = e; - return true; - } - const i = s.B().u; - if (s === this.C.i) { - if (this.A(i, e) > 0) { - s.u = e; - return true; - } - return false; - } - const r = s.I().u; - if (s === this.C.h) { - if (this.A(r, e) < 0) { - s.u = e; - return true; - } - return false; - } - if (this.A(r, e) >= 0 || this.A(i, e) <= 0) return false; - s.u = e; - return true; - } - eraseElementByPos(t) { - if (t < 0 || t > this.m - 1) { - throw new RangeError; - } - const e = this.U(t); - this.S(e); - return this.m; - } - eraseElementByKey(t) { - if (this.m === 0) return false; - const e = this.H(this.v, t); - if (e === this.C) return false; - this.S(e); - return true; - } - eraseElementByIterator(t) { - const e = t.T; - if (e === this.C) { - throwIteratorAccessError(); - } - const s = e.h === undefined; - const i = t.iteratorType === 0; - if (i) { - if (s) t.next(); - } else { - if (!s || e.i === undefined) t.next(); - } - this.S(e); - return t; - } - getHeight() { - if (this.m === 0) return 0; - function traversal(t) { - if (!t) return 0; - return Math.max(traversal(t.i), traversal(t.h)) + 1; - } - return traversal(this.v); - } -} - -class TreeIterator extends ContainerIterator { - constructor(t, e, s) { - super(s); - this.T = t; - this.C = e; - if (this.iteratorType === 0) { - this.pre = function() { - if (this.T === this.C.i) { - throwIteratorAccessError(); - } - this.T = this.T.I(); - return this; - }; - this.next = function() { - if (this.T === this.C) { - throwIteratorAccessError(); - } - this.T = this.T.B(); - return this; - }; - } else { - this.pre = function() { - if (this.T === this.C.h) { - throwIteratorAccessError(); - } - this.T = this.T.B(); - return this; - }; - this.next = function() { - if (this.T === this.C) { - throwIteratorAccessError(); - } - this.T = this.T.I(); - return this; - }; - } - } - get index() { - let t = this.T; - const e = this.C.o; - if (t === this.C) { - if (e) { - return e.M - 1; - } - return 0; - } - let s = 0; - if (t.i) { - s += t.i.M; - } - while (t !== e) { - const e = t.o; - if (t === e.h) { - s += 1; - if (e.i) { - s += e.i.M; - } - } - t = e; - } - return s; - } - isAccessible() { - return this.T !== this.C; - } -} - -class OrderedMapIterator extends TreeIterator { - constructor(t, e, s, i) { - super(t, e, i); - this.container = s; - } - get pointer() { - if (this.T === this.C) { - throwIteratorAccessError(); - } - const t = this; - return new Proxy([], { - get(e, s) { - if (s === "0") return t.T.u; else if (s === "1") return t.T.l; - e[0] = t.T.u; - e[1] = t.T.l; - return e[s]; - }, - set(e, s, i) { - if (s !== "1") { - throw new TypeError("prop must be 1"); - } - t.T.l = i; - return true; - } - }); - } - copy() { - return new OrderedMapIterator(this.T, this.C, this.container, this.iteratorType); - } -} - -class OrderedMap extends TreeContainer { - constructor(t = [], e, s) { - super(e, s); - const i = this; - t.forEach((function(t) { - i.setElement(t[0], t[1]); - })); - } - begin() { - return new OrderedMapIterator(this.C.i || this.C, this.C, this); - } - end() { - return new OrderedMapIterator(this.C, this.C, this); - } - rBegin() { - return new OrderedMapIterator(this.C.h || this.C, this.C, this, 1); - } - rEnd() { - return new OrderedMapIterator(this.C, this.C, this, 1); - } - front() { - if (this.m === 0) return; - const t = this.C.i; - return [ t.u, t.l ]; - } - back() { - if (this.m === 0) return; - const t = this.C.h; - return [ t.u, t.l ]; - } - lowerBound(t) { - const e = this.R(this.v, t); - return new OrderedMapIterator(e, this.C, this); - } - upperBound(t) { - const e = this.K(this.v, t); - return new OrderedMapIterator(e, this.C, this); - } - reverseLowerBound(t) { - const e = this.L(this.v, t); - return new OrderedMapIterator(e, this.C, this); - } - reverseUpperBound(t) { - const e = this.k(this.v, t); - return new OrderedMapIterator(e, this.C, this); - } - forEach(t) { - this.U((function(e, s, i) { - t([ e.u, e.l ], s, i); - })); - } - setElement(t, e, s) { - return this.q(t, e, s); - } - getElementByPos(t) { - if (t < 0 || t > this.m - 1) { - throw new RangeError; - } - const e = this.U(t); - return [ e.u, e.l ]; - } - find(t) { - const e = this.H(this.v, t); - return new OrderedMapIterator(e, this.C, this); - } - getElementByKey(t) { - const e = this.H(this.v, t); - return e.l; - } - union(t) { - const e = this; - t.forEach((function(t) { - e.setElement(t[0], t[1]); - })); - return this.m; - } - * [Symbol.iterator]() { - const t = this.m; - const e = this.U(); - for (let s = 0; s < t; ++s) { - const t = e[s]; - yield [ t.u, t.l ]; - } - } -} - -exports.OrderedMap = OrderedMap; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@js-sdsl/ordered-map/dist/cjs/index.js.map b/node_modules/@js-sdsl/ordered-map/dist/cjs/index.js.map deleted file mode 100644 index 36400a9..0000000 --- a/node_modules/@js-sdsl/ordered-map/dist/cjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["index.js","../../../.build-data/copied-source/src/container/TreeContainer/Base/TreeNode.ts","../../../.build-data/copied-source/src/container/ContainerBase/index.ts","../../../.build-data/copied-source/src/utils/throwError.ts","../../../.build-data/copied-source/src/container/TreeContainer/Base/index.ts","../../../.build-data/copied-source/src/container/TreeContainer/Base/TreeIterator.ts","../../../.build-data/copied-source/src/container/TreeContainer/OrderedMap.ts"],"names":["Object","defineProperty","exports","value","TreeNode","constructor","key","color","this","_left","undefined","_right","_parent","_key","_value","_color","_pre","preNode","isRootOrHeader","pre","_next","nextNode","_rotateLeft","PP","V","R","_rotateRight","F","K","TreeNodeEnableIndex","super","arguments","_subTreeSize","parent","_recount","ContainerIterator","iteratorType","equals","iter","_node","Base","_length","length","size","empty","Container","throwIteratorAccessError","RangeError","TreeContainer","cmp","x","y","enableIndex","_root","_cmp","_TreeNodeClass","_header","_lowerBound","curNode","resNode","cmpResult","_upperBound","_reverseLowerBound","_reverseUpperBound","_eraseNodeSelfBalance","parentNode","brother","_eraseNode","clear","swapNode","_inOrderTraversal","param","pos","callback","nodeList","index","stack","push","pop","_insertNodeSelfBalance","grandParent","uncle","GP","_set","hint","minNode","compareToMin","maxNode","compareToMax","iterNode","iterCmpRes","preCmpRes","_getTreeNodeByKey","updateKeyByIterator","node","nextKey","preKey","eraseElementByPos","eraseElementByKey","eraseElementByIterator","hasNoRight","isNormal","next","getHeight","traversal","Math","max","TreeIterator","header","root","isAccessible","OrderedMapIterator","container","pointer","self","Proxy","get","target","prop","set","_","newValue","TypeError","copy","OrderedMap","forEach","el","setElement","begin","end","rBegin","rEnd","front","back","lowerBound","upperBound","reverseLowerBound","reverseUpperBound","map","getElementByPos","find","getElementByKey","union","other","Symbol","iterator","i"],"mappings":"AAAA;;AAEAA,OAAOC,eAAeC,SAAS,KAAc;IAAEC,OAAO;;;AAEtD,MCCaC;IAOXC,WAAAA,CACEC,GACAH,GACAI,IAAwC;QAN1CC,KAAKC,IAA+BC;QACpCF,KAAMG,IAA+BD;QACrCF,KAAOI,IAA+BF;QAMpCF,KAAKK,IAAOP;QACZE,KAAKM,IAASX;QACdK,KAAKO,IAASR;AACf;IAKDS,CAAAA;QACE,IAAIC,IAA0BT;QAC9B,MAAMU,IAAiBD,EA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C;YACtBZ,EAAKa,WAAWD,EAAG,IAAIA,EAAG;AAC3B;QACD,OAAOtH,KAAKiC;AACb;IACD,GAAGuG,OAAOC;QACR,MAAMvG,IAASlC,KAAKiC;QACpB,MAAMiC,IAAWlE,KAAK8D;QACtB,KAAK,IAAI4E,IAAI,GAAGA,IAAIxG,KAAUwG,GAAG;YAC/B,MAAMpD,IAAOpB,EAASwE;kBACR,EAACpD,EAAKjF,GAAMiF,EAAKhF;AAChC;AACF;;;ANwwBHZ,QAAQ0H,aAAaA","file":"index.js","sourcesContent":["'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nclass TreeNode {\n constructor(key, value, color = 1 /* TreeNodeColor.RED */) {\n this._left = undefined;\n this._right = undefined;\n this._parent = undefined;\n this._key = key;\n this._value = value;\n this._color = color;\n }\n /**\n * @description Get the pre node.\n * @returns TreeNode about the pre node.\n */\n _pre() {\n let preNode = this;\n const isRootOrHeader = preNode._parent._parent === preNode;\n if (isRootOrHeader && preNode._color === 1 /* TreeNodeColor.RED */) {\n preNode = preNode._right;\n } else if (preNode._left) {\n preNode = preNode._left;\n while (preNode._right) {\n preNode = preNode._right;\n }\n } else {\n // Must be root and left is null\n if (isRootOrHeader) {\n return preNode._parent;\n }\n let pre = preNode._parent;\n while (pre._left === preNode) {\n preNode = pre;\n pre = preNode._parent;\n }\n preNode = pre;\n }\n return preNode;\n }\n /**\n * @description Get the next node.\n * @returns TreeNode about the next node.\n */\n _next() {\n let nextNode = this;\n if (nextNode._right) {\n nextNode = nextNode._right;\n while (nextNode._left) {\n nextNode = nextNode._left;\n }\n return nextNode;\n } else {\n let pre = nextNode._parent;\n while (pre._right === nextNode) {\n nextNode = pre;\n pre = nextNode._parent;\n }\n if (nextNode._right !== pre) {\n return pre;\n } else return nextNode;\n }\n }\n /**\n * @description Rotate left.\n * @returns TreeNode about moved to original position after rotation.\n */\n _rotateLeft() {\n const PP = this._parent;\n const V = this._right;\n const R = V._left;\n if (PP._parent === this) PP._parent = V;else if (PP._left === this) PP._left = V;else PP._right = V;\n V._parent = PP;\n V._left = this;\n this._parent = V;\n this._right = R;\n if (R) R._parent = this;\n return V;\n }\n /**\n * @description Rotate right.\n * @returns TreeNode about moved to original position after rotation.\n */\n _rotateRight() {\n const PP = this._parent;\n const F = this._left;\n const K = F._right;\n if (PP._parent === this) PP._parent = F;else if (PP._left === this) PP._left = F;else PP._right = F;\n F._parent = PP;\n F._right = this;\n this._parent = F;\n this._left = K;\n if (K) K._parent = this;\n return F;\n }\n}\nclass TreeNodeEnableIndex extends TreeNode {\n constructor() {\n super(...arguments);\n this._subTreeSize = 1;\n }\n /**\n * @description Rotate left and do recount.\n * @returns TreeNode about moved to original position after rotation.\n */\n _rotateLeft() {\n const parent = super._rotateLeft();\n this._recount();\n parent._recount();\n return parent;\n }\n /**\n * @description Rotate right and do recount.\n * @returns TreeNode about moved to original position after rotation.\n */\n _rotateRight() {\n const parent = super._rotateRight();\n this._recount();\n parent._recount();\n return parent;\n }\n _recount() {\n this._subTreeSize = 1;\n if (this._left) {\n this._subTreeSize += this._left._subTreeSize;\n }\n if (this._right) {\n this._subTreeSize += this._right._subTreeSize;\n }\n }\n}\n\nclass ContainerIterator {\n /**\n * @internal\n */\n constructor(iteratorType = 0 /* IteratorType.NORMAL */) {\n this.iteratorType = iteratorType;\n }\n /**\n * @param iter - The other iterator you want to compare.\n * @returns Whether this equals to obj.\n * @example\n * container.find(1).equals(container.end());\n */\n equals(iter) {\n return this._node === iter._node;\n }\n}\nclass Base {\n constructor() {\n /**\n * @description Container's size.\n * @internal\n */\n this._length = 0;\n }\n /**\n * @returns The size of the container.\n * @example\n * const container = new Vector([1, 2]);\n * console.log(container.length); // 2\n */\n get length() {\n return this._length;\n }\n /**\n * @returns The size of the container.\n * @example\n * const container = new Vector([1, 2]);\n * console.log(container.size()); // 2\n */\n size() {\n return this._length;\n }\n /**\n * @returns Whether the container is empty.\n * @example\n * container.clear();\n * console.log(container.empty()); // true\n */\n empty() {\n return this._length === 0;\n }\n}\nclass Container extends Base {}\n\n/**\n * @description Throw an iterator access error.\n * @internal\n */\nfunction throwIteratorAccessError() {\n throw new RangeError('Iterator access denied!');\n}\n\nclass TreeContainer extends Container {\n /**\n * @internal\n */\n constructor(cmp = function (x, y) {\n if (x < y) return -1;\n if (x > y) return 1;\n return 0;\n }, enableIndex = false) {\n super();\n /**\n * @internal\n */\n this._root = undefined;\n this._cmp = cmp;\n this.enableIndex = enableIndex;\n this._TreeNodeClass = enableIndex ? TreeNodeEnableIndex : TreeNode;\n this._header = new this._TreeNodeClass();\n }\n /**\n * @internal\n */\n _lowerBound(curNode, key) {\n let resNode = this._header;\n while (curNode) {\n const cmpResult = this._cmp(curNode._key, key);\n if (cmpResult < 0) {\n curNode = curNode._right;\n } else if (cmpResult > 0) {\n resNode = curNode;\n curNode = curNode._left;\n } else return curNode;\n }\n return resNode;\n }\n /**\n * @internal\n */\n _upperBound(curNode, key) {\n let resNode = this._header;\n while (curNode) {\n const cmpResult = this._cmp(curNode._key, key);\n if (cmpResult <= 0) {\n curNode = curNode._right;\n } else {\n resNode = curNode;\n curNode = curNode._left;\n }\n }\n return resNode;\n }\n /**\n * @internal\n */\n _reverseLowerBound(curNode, key) {\n let resNode = this._header;\n while (curNode) {\n const cmpResult = this._cmp(curNode._key, key);\n if (cmpResult < 0) {\n resNode = curNode;\n curNode = curNode._right;\n } else if (cmpResult > 0) {\n curNode = curNode._left;\n } else return curNode;\n }\n return resNode;\n }\n /**\n * @internal\n */\n _reverseUpperBound(curNode, key) {\n let resNode = this._header;\n while (curNode) {\n const cmpResult = this._cmp(curNode._key, key);\n if (cmpResult < 0) {\n resNode = curNode;\n curNode = curNode._right;\n } else {\n curNode = curNode._left;\n }\n }\n return resNode;\n }\n /**\n * @internal\n */\n _eraseNodeSelfBalance(curNode) {\n while (true) {\n const parentNode = curNode._parent;\n if (parentNode === this._header) return;\n if (curNode._color === 1 /* TreeNodeColor.RED */) {\n curNode._color = 0 /* TreeNodeColor.BLACK */;\n return;\n }\n if (curNode === parentNode._left) {\n const brother = parentNode._right;\n if (brother._color === 1 /* TreeNodeColor.RED */) {\n brother._color = 0 /* TreeNodeColor.BLACK */;\n parentNode._color = 1 /* TreeNodeColor.RED */;\n if (parentNode === this._root) {\n this._root = parentNode._rotateLeft();\n } else parentNode._rotateLeft();\n } else {\n if (brother._right && brother._right._color === 1 /* TreeNodeColor.RED */) {\n brother._color = parentNode._color;\n parentNode._color = 0 /* TreeNodeColor.BLACK */;\n brother._right._color = 0 /* TreeNodeColor.BLACK */;\n if (parentNode === this._root) {\n this._root = parentNode._rotateLeft();\n } else parentNode._rotateLeft();\n return;\n } else if (brother._left && brother._left._color === 1 /* TreeNodeColor.RED */) {\n brother._color = 1 /* TreeNodeColor.RED */;\n brother._left._color = 0 /* TreeNodeColor.BLACK */;\n brother._rotateRight();\n } else {\n brother._color = 1 /* TreeNodeColor.RED */;\n curNode = parentNode;\n }\n }\n } else {\n const brother = parentNode._left;\n if (brother._color === 1 /* TreeNodeColor.RED */) {\n brother._color = 0 /* TreeNodeColor.BLACK */;\n parentNode._color = 1 /* TreeNodeColor.RED */;\n if (parentNode === this._root) {\n this._root = parentNode._rotateRight();\n } else parentNode._rotateRight();\n } else {\n if (brother._left && brother._left._color === 1 /* TreeNodeColor.RED */) {\n brother._color = parentNode._color;\n parentNode._color = 0 /* TreeNodeColor.BLACK */;\n brother._left._color = 0 /* TreeNodeColor.BLACK */;\n if (parentNode === this._root) {\n this._root = parentNode._rotateRight();\n } else parentNode._rotateRight();\n return;\n } else if (brother._right && brother._right._color === 1 /* TreeNodeColor.RED */) {\n brother._color = 1 /* TreeNodeColor.RED */;\n brother._right._color = 0 /* TreeNodeColor.BLACK */;\n brother._rotateLeft();\n } else {\n brother._color = 1 /* TreeNodeColor.RED */;\n curNode = parentNode;\n }\n }\n }\n }\n }\n /**\n * @internal\n */\n _eraseNode(curNode) {\n if (this._length === 1) {\n this.clear();\n return;\n }\n let swapNode = curNode;\n while (swapNode._left || swapNode._right) {\n if (swapNode._right) {\n swapNode = swapNode._right;\n while (swapNode._left) swapNode = swapNode._left;\n } else {\n swapNode = swapNode._left;\n }\n const key = curNode._key;\n curNode._key = swapNode._key;\n swapNode._key = key;\n const value = curNode._value;\n curNode._value = swapNode._value;\n swapNode._value = value;\n curNode = swapNode;\n }\n if (this._header._left === swapNode) {\n this._header._left = swapNode._parent;\n } else if (this._header._right === swapNode) {\n this._header._right = swapNode._parent;\n }\n this._eraseNodeSelfBalance(swapNode);\n let _parent = swapNode._parent;\n if (swapNode === _parent._left) {\n _parent._left = undefined;\n } else _parent._right = undefined;\n this._length -= 1;\n this._root._color = 0 /* TreeNodeColor.BLACK */;\n if (this.enableIndex) {\n while (_parent !== this._header) {\n _parent._subTreeSize -= 1;\n _parent = _parent._parent;\n }\n }\n }\n /**\n * @internal\n */\n _inOrderTraversal(param) {\n const pos = typeof param === 'number' ? param : undefined;\n const callback = typeof param === 'function' ? param : undefined;\n const nodeList = typeof param === 'undefined' ? [] : undefined;\n let index = 0;\n let curNode = this._root;\n const stack = [];\n while (stack.length || curNode) {\n if (curNode) {\n stack.push(curNode);\n curNode = curNode._left;\n } else {\n curNode = stack.pop();\n if (index === pos) return curNode;\n nodeList && nodeList.push(curNode);\n callback && callback(curNode, index, this);\n index += 1;\n curNode = curNode._right;\n }\n }\n return nodeList;\n }\n /**\n * @internal\n */\n _insertNodeSelfBalance(curNode) {\n while (true) {\n const parentNode = curNode._parent;\n if (parentNode._color === 0 /* TreeNodeColor.BLACK */) return;\n const grandParent = parentNode._parent;\n if (parentNode === grandParent._left) {\n const uncle = grandParent._right;\n if (uncle && uncle._color === 1 /* TreeNodeColor.RED */) {\n uncle._color = parentNode._color = 0 /* TreeNodeColor.BLACK */;\n if (grandParent === this._root) return;\n grandParent._color = 1 /* TreeNodeColor.RED */;\n curNode = grandParent;\n continue;\n } else if (curNode === parentNode._right) {\n curNode._color = 0 /* TreeNodeColor.BLACK */;\n if (curNode._left) {\n curNode._left._parent = parentNode;\n }\n if (curNode._right) {\n curNode._right._parent = grandParent;\n }\n parentNode._right = curNode._left;\n grandParent._left = curNode._right;\n curNode._left = parentNode;\n curNode._right = grandParent;\n if (grandParent === this._root) {\n this._root = curNode;\n this._header._parent = curNode;\n } else {\n const GP = grandParent._parent;\n if (GP._left === grandParent) {\n GP._left = curNode;\n } else GP._right = curNode;\n }\n curNode._parent = grandParent._parent;\n parentNode._parent = curNode;\n grandParent._parent = curNode;\n grandParent._color = 1 /* TreeNodeColor.RED */;\n } else {\n parentNode._color = 0 /* TreeNodeColor.BLACK */;\n if (grandParent === this._root) {\n this._root = grandParent._rotateRight();\n } else grandParent._rotateRight();\n grandParent._color = 1 /* TreeNodeColor.RED */;\n return;\n }\n } else {\n const uncle = grandParent._left;\n if (uncle && uncle._color === 1 /* TreeNodeColor.RED */) {\n uncle._color = parentNode._color = 0 /* TreeNodeColor.BLACK */;\n if (grandParent === this._root) return;\n grandParent._color = 1 /* TreeNodeColor.RED */;\n curNode = grandParent;\n continue;\n } else if (curNode === parentNode._left) {\n curNode._color = 0 /* TreeNodeColor.BLACK */;\n if (curNode._left) {\n curNode._left._parent = grandParent;\n }\n if (curNode._right) {\n curNode._right._parent = parentNode;\n }\n grandParent._right = curNode._left;\n parentNode._left = curNode._right;\n curNode._left = grandParent;\n curNode._right = parentNode;\n if (grandParent === this._root) {\n this._root = curNode;\n this._header._parent = curNode;\n } else {\n const GP = grandParent._parent;\n if (GP._left === grandParent) {\n GP._left = curNode;\n } else GP._right = curNode;\n }\n curNode._parent = grandParent._parent;\n parentNode._parent = curNode;\n grandParent._parent = curNode;\n grandParent._color = 1 /* TreeNodeColor.RED */;\n } else {\n parentNode._color = 0 /* TreeNodeColor.BLACK */;\n if (grandParent === this._root) {\n this._root = grandParent._rotateLeft();\n } else grandParent._rotateLeft();\n grandParent._color = 1 /* TreeNodeColor.RED */;\n return;\n }\n }\n if (this.enableIndex) {\n parentNode._recount();\n grandParent._recount();\n curNode._recount();\n }\n return;\n }\n }\n /**\n * @internal\n */\n _set(key, value, hint) {\n if (this._root === undefined) {\n this._length += 1;\n this._root = new this._TreeNodeClass(key, value, 0 /* TreeNodeColor.BLACK */);\n this._root._parent = this._header;\n this._header._parent = this._header._left = this._header._right = this._root;\n return this._length;\n }\n let curNode;\n const minNode = this._header._left;\n const compareToMin = this._cmp(minNode._key, key);\n if (compareToMin === 0) {\n minNode._value = value;\n return this._length;\n } else if (compareToMin > 0) {\n minNode._left = new this._TreeNodeClass(key, value);\n minNode._left._parent = minNode;\n curNode = minNode._left;\n this._header._left = curNode;\n } else {\n const maxNode = this._header._right;\n const compareToMax = this._cmp(maxNode._key, key);\n if (compareToMax === 0) {\n maxNode._value = value;\n return this._length;\n } else if (compareToMax < 0) {\n maxNode._right = new this._TreeNodeClass(key, value);\n maxNode._right._parent = maxNode;\n curNode = maxNode._right;\n this._header._right = curNode;\n } else {\n if (hint !== undefined) {\n const iterNode = hint._node;\n if (iterNode !== this._header) {\n const iterCmpRes = this._cmp(iterNode._key, key);\n if (iterCmpRes === 0) {\n iterNode._value = value;\n return this._length;\n } else /* istanbul ignore else */if (iterCmpRes > 0) {\n const preNode = iterNode._pre();\n const preCmpRes = this._cmp(preNode._key, key);\n if (preCmpRes === 0) {\n preNode._value = value;\n return this._length;\n } else if (preCmpRes < 0) {\n curNode = new this._TreeNodeClass(key, value);\n if (preNode._right === undefined) {\n preNode._right = curNode;\n curNode._parent = preNode;\n } else {\n iterNode._left = curNode;\n curNode._parent = iterNode;\n }\n }\n }\n }\n }\n if (curNode === undefined) {\n curNode = this._root;\n while (true) {\n const cmpResult = this._cmp(curNode._key, key);\n if (cmpResult > 0) {\n if (curNode._left === undefined) {\n curNode._left = new this._TreeNodeClass(key, value);\n curNode._left._parent = curNode;\n curNode = curNode._left;\n break;\n }\n curNode = curNode._left;\n } else if (cmpResult < 0) {\n if (curNode._right === undefined) {\n curNode._right = new this._TreeNodeClass(key, value);\n curNode._right._parent = curNode;\n curNode = curNode._right;\n break;\n }\n curNode = curNode._right;\n } else {\n curNode._value = value;\n return this._length;\n }\n }\n }\n }\n }\n if (this.enableIndex) {\n let parent = curNode._parent;\n while (parent !== this._header) {\n parent._subTreeSize += 1;\n parent = parent._parent;\n }\n }\n this._insertNodeSelfBalance(curNode);\n this._length += 1;\n return this._length;\n }\n /**\n * @internal\n */\n _getTreeNodeByKey(curNode, key) {\n while (curNode) {\n const cmpResult = this._cmp(curNode._key, key);\n if (cmpResult < 0) {\n curNode = curNode._right;\n } else if (cmpResult > 0) {\n curNode = curNode._left;\n } else return curNode;\n }\n return curNode || this._header;\n }\n clear() {\n this._length = 0;\n this._root = undefined;\n this._header._parent = undefined;\n this._header._left = this._header._right = undefined;\n }\n /**\n * @description Update node's key by iterator.\n * @param iter - The iterator you want to change.\n * @param key - The key you want to update.\n * @returns Whether the modification is successful.\n * @example\n * const st = new orderedSet([1, 2, 5]);\n * const iter = st.find(2);\n * st.updateKeyByIterator(iter, 3); // then st will become [1, 3, 5]\n */\n updateKeyByIterator(iter, key) {\n const node = iter._node;\n if (node === this._header) {\n throwIteratorAccessError();\n }\n if (this._length === 1) {\n node._key = key;\n return true;\n }\n const nextKey = node._next()._key;\n if (node === this._header._left) {\n if (this._cmp(nextKey, key) > 0) {\n node._key = key;\n return true;\n }\n return false;\n }\n const preKey = node._pre()._key;\n if (node === this._header._right) {\n if (this._cmp(preKey, key) < 0) {\n node._key = key;\n return true;\n }\n return false;\n }\n if (this._cmp(preKey, key) >= 0 || this._cmp(nextKey, key) <= 0) return false;\n node._key = key;\n return true;\n }\n eraseElementByPos(pos) {\n if (pos < 0 || pos > this._length - 1) {\n throw new RangeError();\n }\n const node = this._inOrderTraversal(pos);\n this._eraseNode(node);\n return this._length;\n }\n /**\n * @description Remove the element of the specified key.\n * @param key - The key you want to remove.\n * @returns Whether erase successfully.\n */\n eraseElementByKey(key) {\n if (this._length === 0) return false;\n const curNode = this._getTreeNodeByKey(this._root, key);\n if (curNode === this._header) return false;\n this._eraseNode(curNode);\n return true;\n }\n eraseElementByIterator(iter) {\n const node = iter._node;\n if (node === this._header) {\n throwIteratorAccessError();\n }\n const hasNoRight = node._right === undefined;\n const isNormal = iter.iteratorType === 0 /* IteratorType.NORMAL */;\n // For the normal iterator, the `next` node will be swapped to `this` node when has right.\n if (isNormal) {\n // So we should move it to next when it's right is null.\n if (hasNoRight) iter.next();\n } else {\n // For the reverse iterator, only when it doesn't have right and has left the `next` node will be swapped.\n // So when it has right, or it is a leaf node we should move it to `next`.\n if (!hasNoRight || node._left === undefined) iter.next();\n }\n this._eraseNode(node);\n return iter;\n }\n /**\n * @description Get the height of the tree.\n * @returns Number about the height of the RB-tree.\n */\n getHeight() {\n if (this._length === 0) return 0;\n function traversal(curNode) {\n if (!curNode) return 0;\n return Math.max(traversal(curNode._left), traversal(curNode._right)) + 1;\n }\n return traversal(this._root);\n }\n}\n\nclass TreeIterator extends ContainerIterator {\n /**\n * @internal\n */\n constructor(node, header, iteratorType) {\n super(iteratorType);\n this._node = node;\n this._header = header;\n if (this.iteratorType === 0 /* IteratorType.NORMAL */) {\n this.pre = function () {\n if (this._node === this._header._left) {\n throwIteratorAccessError();\n }\n this._node = this._node._pre();\n return this;\n };\n this.next = function () {\n if (this._node === this._header) {\n throwIteratorAccessError();\n }\n this._node = this._node._next();\n return this;\n };\n } else {\n this.pre = function () {\n if (this._node === this._header._right) {\n throwIteratorAccessError();\n }\n this._node = this._node._next();\n return this;\n };\n this.next = function () {\n if (this._node === this._header) {\n throwIteratorAccessError();\n }\n this._node = this._node._pre();\n return this;\n };\n }\n }\n /**\n * @description Get the sequential index of the iterator in the tree container.
\n * Note:\n * This function only takes effect when the specified tree container `enableIndex = true`.\n * @returns The index subscript of the node in the tree.\n * @example\n * const st = new OrderedSet([1, 2, 3], true);\n * console.log(st.begin().next().index); // 1\n */\n get index() {\n let _node = this._node;\n const root = this._header._parent;\n if (_node === this._header) {\n if (root) {\n return root._subTreeSize - 1;\n }\n return 0;\n }\n let index = 0;\n if (_node._left) {\n index += _node._left._subTreeSize;\n }\n while (_node !== root) {\n const _parent = _node._parent;\n if (_node === _parent._right) {\n index += 1;\n if (_parent._left) {\n index += _parent._left._subTreeSize;\n }\n }\n _node = _parent;\n }\n return index;\n }\n isAccessible() {\n return this._node !== this._header;\n }\n}\n\nclass OrderedMapIterator extends TreeIterator {\n constructor(node, header, container, iteratorType) {\n super(node, header, iteratorType);\n this.container = container;\n }\n get pointer() {\n if (this._node === this._header) {\n throwIteratorAccessError();\n }\n const self = this;\n return new Proxy([], {\n get(target, prop) {\n if (prop === '0') return self._node._key;else if (prop === '1') return self._node._value;\n target[0] = self._node._key;\n target[1] = self._node._value;\n return target[prop];\n },\n set(_, prop, newValue) {\n if (prop !== '1') {\n throw new TypeError('prop must be 1');\n }\n self._node._value = newValue;\n return true;\n }\n });\n }\n copy() {\n return new OrderedMapIterator(this._node, this._header, this.container, this.iteratorType);\n }\n}\nclass OrderedMap extends TreeContainer {\n /**\n * @param container - The initialization container.\n * @param cmp - The compare function.\n * @param enableIndex - Whether to enable iterator indexing function.\n * @example\n * new OrderedMap();\n * new OrderedMap([[0, 1], [2, 1]]);\n * new OrderedMap([[0, 1], [2, 1]], (x, y) => x - y);\n * new OrderedMap([[0, 1], [2, 1]], (x, y) => x - y, true);\n */\n constructor(container = [], cmp, enableIndex) {\n super(cmp, enableIndex);\n const self = this;\n container.forEach(function (el) {\n self.setElement(el[0], el[1]);\n });\n }\n begin() {\n return new OrderedMapIterator(this._header._left || this._header, this._header, this);\n }\n end() {\n return new OrderedMapIterator(this._header, this._header, this);\n }\n rBegin() {\n return new OrderedMapIterator(this._header._right || this._header, this._header, this, 1 /* IteratorType.REVERSE */);\n }\n\n rEnd() {\n return new OrderedMapIterator(this._header, this._header, this, 1 /* IteratorType.REVERSE */);\n }\n\n front() {\n if (this._length === 0) return;\n const minNode = this._header._left;\n return [minNode._key, minNode._value];\n }\n back() {\n if (this._length === 0) return;\n const maxNode = this._header._right;\n return [maxNode._key, maxNode._value];\n }\n lowerBound(key) {\n const resNode = this._lowerBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n }\n upperBound(key) {\n const resNode = this._upperBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n }\n reverseLowerBound(key) {\n const resNode = this._reverseLowerBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n }\n reverseUpperBound(key) {\n const resNode = this._reverseUpperBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n }\n forEach(callback) {\n this._inOrderTraversal(function (node, index, map) {\n callback([node._key, node._value], index, map);\n });\n }\n /**\n * @description Insert a key-value pair or set value by the given key.\n * @param key - The key want to insert.\n * @param value - The value want to set.\n * @param hint - You can give an iterator hint to improve insertion efficiency.\n * @return The size of container after setting.\n * @example\n * const mp = new OrderedMap([[2, 0], [4, 0], [5, 0]]);\n * const iter = mp.begin();\n * mp.setElement(1, 0);\n * mp.setElement(3, 0, iter); // give a hint will be faster.\n */\n setElement(key, value, hint) {\n return this._set(key, value, hint);\n }\n getElementByPos(pos) {\n if (pos < 0 || pos > this._length - 1) {\n throw new RangeError();\n }\n const node = this._inOrderTraversal(pos);\n return [node._key, node._value];\n }\n find(key) {\n const curNode = this._getTreeNodeByKey(this._root, key);\n return new OrderedMapIterator(curNode, this._header, this);\n }\n /**\n * @description Get the value of the element of the specified key.\n * @param key - The specified key you want to get.\n * @example\n * const val = container.getElementByKey(1);\n */\n getElementByKey(key) {\n const curNode = this._getTreeNodeByKey(this._root, key);\n return curNode._value;\n }\n union(other) {\n const self = this;\n other.forEach(function (el) {\n self.setElement(el[0], el[1]);\n });\n return this._length;\n }\n *[Symbol.iterator]() {\n const length = this._length;\n const nodeList = this._inOrderTraversal();\n for (let i = 0; i < length; ++i) {\n const node = nodeList[i];\n yield [node._key, node._value];\n }\n }\n}\n\nexports.OrderedMap = OrderedMap;\n//# sourceMappingURL=index.js.map\n","export const enum TreeNodeColor {\n RED = 1,\n BLACK = 0\n}\n\nexport class TreeNode {\n _color: TreeNodeColor;\n _key: K | undefined;\n _value: V | undefined;\n _left: TreeNode | undefined = undefined;\n _right: TreeNode | undefined = undefined;\n _parent: TreeNode | undefined = undefined;\n constructor(\n key?: K,\n value?: V,\n color: TreeNodeColor = TreeNodeColor.RED\n ) {\n this._key = key;\n this._value = value;\n this._color = color;\n }\n /**\n * @description Get the pre node.\n * @returns TreeNode about the pre node.\n */\n _pre() {\n let preNode: TreeNode = this;\n const isRootOrHeader = preNode._parent!._parent === preNode;\n if (isRootOrHeader && preNode._color === TreeNodeColor.RED) {\n preNode = preNode._right!;\n } else if (preNode._left) {\n preNode = preNode._left;\n while (preNode._right) {\n preNode = preNode._right;\n }\n } else {\n // Must be root and left is null\n if (isRootOrHeader) {\n return preNode._parent!;\n }\n let pre = preNode._parent!;\n while (pre._left === preNode) {\n preNode = pre;\n pre = preNode._parent!;\n }\n preNode = pre;\n }\n return preNode;\n }\n /**\n * @description Get the next node.\n * @returns TreeNode about the next node.\n */\n _next() {\n let nextNode: TreeNode = this;\n if (nextNode._right) {\n nextNode = nextNode._right;\n while (nextNode._left) {\n nextNode = nextNode._left;\n }\n return nextNode;\n } else {\n let pre = nextNode._parent!;\n while (pre._right === nextNode) {\n nextNode = pre;\n pre = nextNode._parent!;\n }\n if (nextNode._right !== pre) {\n return pre;\n } else return nextNode;\n }\n }\n /**\n * @description Rotate left.\n * @returns TreeNode about moved to original position after rotation.\n */\n _rotateLeft() {\n const PP = this._parent!;\n const V = this._right!;\n const R = V._left;\n\n if (PP._parent === this) PP._parent = V;\n else if (PP._left === this) PP._left = V;\n else PP._right = V;\n\n V._parent = PP;\n V._left = this;\n\n this._parent = V;\n this._right = R;\n\n if (R) R._parent = this;\n\n return V;\n }\n /**\n * @description Rotate right.\n * @returns TreeNode about moved to original position after rotation.\n */\n _rotateRight() {\n const PP = this._parent!;\n const F = this._left!;\n const K = F._right;\n\n if (PP._parent === this) PP._parent = F;\n else if (PP._left === this) PP._left = F;\n else PP._right = F;\n\n F._parent = PP;\n F._right = this;\n\n this._parent = F;\n this._left = K;\n\n if (K) K._parent = this;\n\n return F;\n }\n}\n\nexport class TreeNodeEnableIndex extends TreeNode {\n _subTreeSize = 1;\n /**\n * @description Rotate left and do recount.\n * @returns TreeNode about moved to original position after rotation.\n */\n _rotateLeft() {\n const parent = super._rotateLeft() as TreeNodeEnableIndex;\n this._recount();\n parent._recount();\n return parent;\n }\n /**\n * @description Rotate right and do recount.\n * @returns TreeNode about moved to original position after rotation.\n */\n _rotateRight() {\n const parent = super._rotateRight() as TreeNodeEnableIndex;\n this._recount();\n parent._recount();\n return parent;\n }\n _recount() {\n this._subTreeSize = 1;\n if (this._left) {\n this._subTreeSize += (this._left as TreeNodeEnableIndex)._subTreeSize;\n }\n if (this._right) {\n this._subTreeSize += (this._right as TreeNodeEnableIndex)._subTreeSize;\n }\n }\n}\n","/**\n * @description The iterator type including `NORMAL` and `REVERSE`.\n */\nexport const enum IteratorType {\n NORMAL = 0,\n REVERSE = 1\n}\n\nexport abstract class ContainerIterator {\n /**\n * @description The container pointed to by the iterator.\n */\n abstract readonly container: Container;\n /**\n * @internal\n */\n abstract _node: unknown;\n /**\n * @description Iterator's type.\n * @example\n * console.log(container.end().iteratorType === IteratorType.NORMAL); // true\n */\n readonly iteratorType: IteratorType;\n /**\n * @internal\n */\n protected constructor(iteratorType = IteratorType.NORMAL) {\n this.iteratorType = iteratorType;\n }\n /**\n * @param iter - The other iterator you want to compare.\n * @returns Whether this equals to obj.\n * @example\n * container.find(1).equals(container.end());\n */\n equals(iter: ContainerIterator) {\n return this._node === iter._node;\n }\n /**\n * @description Pointers to element.\n * @returns The value of the pointer's element.\n * @example\n * const val = container.begin().pointer;\n */\n abstract get pointer(): T;\n /**\n * @description Set pointer's value (some containers are unavailable).\n * @param newValue - The new value you want to set.\n * @example\n * (>container).begin().pointer = 1;\n */\n abstract set pointer(newValue: T);\n /**\n * @description Move `this` iterator to pre.\n * @returns The iterator's self.\n * @example\n * const iter = container.find(1); // container = [0, 1]\n * const pre = iter.pre();\n * console.log(pre === iter); // true\n * console.log(pre.equals(iter)); // true\n * console.log(pre.pointer, iter.pointer); // 0, 0\n */\n abstract pre(): this;\n /**\n * @description Move `this` iterator to next.\n * @returns The iterator's self.\n * @example\n * const iter = container.find(1); // container = [1, 2]\n * const next = iter.next();\n * console.log(next === iter); // true\n * console.log(next.equals(iter)); // true\n * console.log(next.pointer, iter.pointer); // 2, 2\n */\n abstract next(): this;\n /**\n * @description Get a copy of itself.\n * @returns The copy of self.\n * @example\n * const iter = container.find(1); // container = [1, 2]\n * const next = iter.copy().next();\n * console.log(next === iter); // false\n * console.log(next.equals(iter)); // false\n * console.log(next.pointer, iter.pointer); // 2, 1\n */\n abstract copy(): ContainerIterator;\n abstract isAccessible(): boolean;\n}\n\nexport abstract class Base {\n /**\n * @description Container's size.\n * @internal\n */\n protected _length = 0;\n /**\n * @returns The size of the container.\n * @example\n * const container = new Vector([1, 2]);\n * console.log(container.length); // 2\n */\n get length() {\n return this._length;\n }\n /**\n * @returns The size of the container.\n * @example\n * const container = new Vector([1, 2]);\n * console.log(container.size()); // 2\n */\n size() {\n return this._length;\n }\n /**\n * @returns Whether the container is empty.\n * @example\n * container.clear();\n * console.log(container.empty()); // true\n */\n empty() {\n return this._length === 0;\n }\n /**\n * @description Clear the container.\n * @example\n * container.clear();\n * console.log(container.empty()); // true\n */\n abstract clear(): void;\n}\n\nexport abstract class Container extends Base {\n /**\n * @returns Iterator pointing to the beginning element.\n * @example\n * const begin = container.begin();\n * const end = container.end();\n * for (const it = begin; !it.equals(end); it.next()) {\n * doSomething(it.pointer);\n * }\n */\n abstract begin(): ContainerIterator;\n /**\n * @returns Iterator pointing to the super end like c++.\n * @example\n * const begin = container.begin();\n * const end = container.end();\n * for (const it = begin; !it.equals(end); it.next()) {\n * doSomething(it.pointer);\n * }\n */\n abstract end(): ContainerIterator;\n /**\n * @returns Iterator pointing to the end element.\n * @example\n * const rBegin = container.rBegin();\n * const rEnd = container.rEnd();\n * for (const it = rBegin; !it.equals(rEnd); it.next()) {\n * doSomething(it.pointer);\n * }\n */\n abstract rBegin(): ContainerIterator;\n /**\n * @returns Iterator pointing to the super begin like c++.\n * @example\n * const rBegin = container.rBegin();\n * const rEnd = container.rEnd();\n * for (const it = rBegin; !it.equals(rEnd); it.next()) {\n * doSomething(it.pointer);\n * }\n */\n abstract rEnd(): ContainerIterator;\n /**\n * @returns The first element of the container.\n */\n abstract front(): T | undefined;\n /**\n * @returns The last element of the container.\n */\n abstract back(): T | undefined;\n /**\n * @param element - The element you want to find.\n * @returns An iterator pointing to the element if found, or super end if not found.\n * @example\n * container.find(1).equals(container.end());\n */\n abstract find(element: T): ContainerIterator;\n /**\n * @description Iterate over all elements in the container.\n * @param callback - Callback function like Array.forEach.\n * @example\n * container.forEach((element, index) => console.log(element, index));\n */\n abstract forEach(callback: (element: T, index: number, container: Container) => void): void;\n /**\n * @description Gets the value of the element at the specified position.\n * @example\n * const val = container.getElementByPos(-1); // throw a RangeError\n */\n abstract getElementByPos(pos: number): T;\n /**\n * @description Removes the element at the specified position.\n * @param pos - The element's position you want to remove.\n * @returns The container length after erasing.\n * @example\n * container.eraseElementByPos(-1); // throw a RangeError\n */\n abstract eraseElementByPos(pos: number): number;\n /**\n * @description Removes element by iterator and move `iter` to next.\n * @param iter - The iterator you want to erase.\n * @returns The next iterator.\n * @example\n * container.eraseElementByIterator(container.begin());\n * container.eraseElementByIterator(container.end()); // throw a RangeError\n */\n abstract eraseElementByIterator(\n iter: ContainerIterator\n ): ContainerIterator;\n /**\n * @description Using for `for...of` syntax like Array.\n * @example\n * for (const element of container) {\n * console.log(element);\n * }\n */\n abstract [Symbol.iterator](): Generator;\n}\n\n/**\n * @description The initial data type passed in when initializing the container.\n */\nexport type initContainer = {\n size?: number | (() => number);\n length?: number;\n forEach: (callback: (el: T) => void) => void;\n}\n","/**\n * @description Throw an iterator access error.\n * @internal\n */\nexport function throwIteratorAccessError() {\n throw new RangeError('Iterator access denied!');\n}\n","import type TreeIterator from './TreeIterator';\nimport { TreeNode, TreeNodeColor, TreeNodeEnableIndex } from './TreeNode';\nimport { Container, IteratorType } from '@/container/ContainerBase';\nimport $checkWithinAccessParams from '@/utils/checkParams.macro';\nimport { throwIteratorAccessError } from '@/utils/throwError';\n\nabstract class TreeContainer extends Container {\n enableIndex: boolean;\n /**\n * @internal\n */\n protected _header: TreeNode;\n /**\n * @internal\n */\n protected _root: TreeNode | undefined = undefined;\n /**\n * @internal\n */\n protected readonly _cmp: (x: K, y: K) => number;\n /**\n * @internal\n */\n protected readonly _TreeNodeClass: typeof TreeNode | typeof TreeNodeEnableIndex;\n /**\n * @internal\n */\n protected constructor(\n cmp: (x: K, y: K) => number =\n function (x: K, y: K) {\n if (x < y) return -1;\n if (x > y) return 1;\n return 0;\n },\n enableIndex = false\n ) {\n super();\n this._cmp = cmp;\n this.enableIndex = enableIndex;\n this._TreeNodeClass = enableIndex ? TreeNodeEnableIndex : TreeNode;\n this._header = new this._TreeNodeClass();\n }\n /**\n * @internal\n */\n protected _lowerBound(curNode: TreeNode | undefined, key: K) {\n let resNode = this._header;\n while (curNode) {\n const cmpResult = this._cmp(curNode._key!, key);\n if (cmpResult < 0) {\n curNode = curNode._right;\n } else if (cmpResult > 0) {\n resNode = curNode;\n curNode = curNode._left;\n } else return curNode;\n }\n return resNode;\n }\n /**\n * @internal\n */\n protected _upperBound(curNode: TreeNode | undefined, key: K) {\n let resNode = this._header;\n while (curNode) {\n const cmpResult = this._cmp(curNode._key!, key);\n if (cmpResult <= 0) {\n curNode = curNode._right;\n } else {\n resNode = curNode;\n curNode = curNode._left;\n }\n }\n return resNode;\n }\n /**\n * @internal\n */\n protected _reverseLowerBound(curNode: TreeNode | undefined, key: K) {\n let resNode = this._header;\n while (curNode) {\n const cmpResult = this._cmp(curNode._key!, key);\n if (cmpResult < 0) {\n resNode = curNode;\n curNode = curNode._right;\n } else if (cmpResult > 0) {\n curNode = curNode._left;\n } else return curNode;\n }\n return resNode;\n }\n /**\n * @internal\n */\n protected _reverseUpperBound(curNode: TreeNode | undefined, key: K) {\n let resNode = this._header;\n while (curNode) {\n const cmpResult = this._cmp(curNode._key!, key);\n if (cmpResult < 0) {\n resNode = curNode;\n curNode = curNode._right;\n } else {\n curNode = curNode._left;\n }\n }\n return resNode;\n }\n /**\n * @internal\n */\n protected _eraseNodeSelfBalance(curNode: TreeNode) {\n while (true) {\n const parentNode = curNode._parent!;\n if (parentNode === this._header) return;\n if (curNode._color === TreeNodeColor.RED) {\n curNode._color = TreeNodeColor.BLACK;\n return;\n }\n if (curNode === parentNode._left) {\n const brother = parentNode._right!;\n if (brother._color === TreeNodeColor.RED) {\n brother._color = TreeNodeColor.BLACK;\n parentNode._color = TreeNodeColor.RED;\n if (parentNode === this._root) {\n this._root = parentNode._rotateLeft();\n } else parentNode._rotateLeft();\n } else {\n if (brother._right && brother._right._color === TreeNodeColor.RED) {\n brother._color = parentNode._color;\n parentNode._color = TreeNodeColor.BLACK;\n brother._right._color = TreeNodeColor.BLACK;\n if (parentNode === this._root) {\n this._root = parentNode._rotateLeft();\n } else parentNode._rotateLeft();\n return;\n } else if (brother._left && brother._left._color === TreeNodeColor.RED) {\n brother._color = TreeNodeColor.RED;\n brother._left._color = TreeNodeColor.BLACK;\n brother._rotateRight();\n } else {\n brother._color = TreeNodeColor.RED;\n curNode = parentNode;\n }\n }\n } else {\n const brother = parentNode._left!;\n if (brother._color === TreeNodeColor.RED) {\n brother._color = TreeNodeColor.BLACK;\n parentNode._color = TreeNodeColor.RED;\n if (parentNode === this._root) {\n this._root = parentNode._rotateRight();\n } else parentNode._rotateRight();\n } else {\n if (brother._left && brother._left._color === TreeNodeColor.RED) {\n brother._color = parentNode._color;\n parentNode._color = TreeNodeColor.BLACK;\n brother._left._color = TreeNodeColor.BLACK;\n if (parentNode === this._root) {\n this._root = parentNode._rotateRight();\n } else parentNode._rotateRight();\n return;\n } else if (brother._right && brother._right._color === TreeNodeColor.RED) {\n brother._color = TreeNodeColor.RED;\n brother._right._color = TreeNodeColor.BLACK;\n brother._rotateLeft();\n } else {\n brother._color = TreeNodeColor.RED;\n curNode = parentNode;\n }\n }\n }\n }\n }\n /**\n * @internal\n */\n protected _eraseNode(curNode: TreeNode) {\n if (this._length === 1) {\n this.clear();\n return;\n }\n let swapNode = curNode;\n while (swapNode._left || swapNode._right) {\n if (swapNode._right) {\n swapNode = swapNode._right;\n while (swapNode._left) swapNode = swapNode._left;\n } else {\n swapNode = swapNode._left!;\n }\n const key = curNode._key;\n curNode._key = swapNode._key;\n swapNode._key = key;\n const value = curNode._value;\n curNode._value = swapNode._value;\n swapNode._value = value;\n curNode = swapNode;\n }\n if (this._header._left === swapNode) {\n this._header._left = swapNode._parent;\n } else if (this._header._right === swapNode) {\n this._header._right = swapNode._parent;\n }\n this._eraseNodeSelfBalance(swapNode);\n let _parent = swapNode._parent as TreeNodeEnableIndex;\n if (swapNode === _parent._left) {\n _parent._left = undefined;\n } else _parent._right = undefined;\n this._length -= 1;\n this._root!._color = TreeNodeColor.BLACK;\n if (this.enableIndex) {\n while (_parent !== this._header) {\n _parent._subTreeSize -= 1;\n _parent = _parent._parent as TreeNodeEnableIndex;\n }\n }\n }\n protected _inOrderTraversal(): TreeNode[];\n protected _inOrderTraversal(pos: number): TreeNode;\n protected _inOrderTraversal(\n callback: (node: TreeNode, index: number, map: this) => void\n ): TreeNode;\n /**\n * @internal\n */\n protected _inOrderTraversal(\n param?: number | ((node: TreeNode, index: number, map: this) => void)\n ) {\n const pos = typeof param === 'number' ? param : undefined;\n const callback = typeof param === 'function' ? param : undefined;\n const nodeList = typeof param === 'undefined' ? []>[] : undefined;\n let index = 0;\n let curNode = this._root;\n const stack: TreeNode[] = [];\n while (stack.length || curNode) {\n if (curNode) {\n stack.push(curNode);\n curNode = curNode._left;\n } else {\n curNode = stack.pop()!;\n if (index === pos) return curNode;\n nodeList && nodeList.push(curNode);\n callback && callback(curNode, index, this);\n index += 1;\n curNode = curNode._right;\n }\n }\n return nodeList;\n }\n /**\n * @internal\n */\n protected _insertNodeSelfBalance(curNode: TreeNode) {\n while (true) {\n const parentNode = curNode._parent!;\n if (parentNode._color === TreeNodeColor.BLACK) return;\n const grandParent = parentNode._parent!;\n if (parentNode === grandParent._left) {\n const uncle = grandParent._right;\n if (uncle && uncle._color === TreeNodeColor.RED) {\n uncle._color = parentNode._color = TreeNodeColor.BLACK;\n if (grandParent === this._root) return;\n grandParent._color = TreeNodeColor.RED;\n curNode = grandParent;\n continue;\n } else if (curNode === parentNode._right) {\n curNode._color = TreeNodeColor.BLACK;\n if (curNode._left) {\n curNode._left._parent = parentNode;\n }\n if (curNode._right) {\n curNode._right._parent = grandParent;\n }\n parentNode._right = curNode._left;\n grandParent._left = curNode._right;\n curNode._left = parentNode;\n curNode._right = grandParent;\n if (grandParent === this._root) {\n this._root = curNode;\n this._header._parent = curNode;\n } else {\n const GP = grandParent._parent!;\n if (GP._left === grandParent) {\n GP._left = curNode;\n } else GP._right = curNode;\n }\n curNode._parent = grandParent._parent;\n parentNode._parent = curNode;\n grandParent._parent = curNode;\n grandParent._color = TreeNodeColor.RED;\n } else {\n parentNode._color = TreeNodeColor.BLACK;\n if (grandParent === this._root) {\n this._root = grandParent._rotateRight();\n } else grandParent._rotateRight();\n grandParent._color = TreeNodeColor.RED;\n return;\n }\n } else {\n const uncle = grandParent._left;\n if (uncle && uncle._color === TreeNodeColor.RED) {\n uncle._color = parentNode._color = TreeNodeColor.BLACK;\n if (grandParent === this._root) return;\n grandParent._color = TreeNodeColor.RED;\n curNode = grandParent;\n continue;\n } else if (curNode === parentNode._left) {\n curNode._color = TreeNodeColor.BLACK;\n if (curNode._left) {\n curNode._left._parent = grandParent;\n }\n if (curNode._right) {\n curNode._right._parent = parentNode;\n }\n grandParent._right = curNode._left;\n parentNode._left = curNode._right;\n curNode._left = grandParent;\n curNode._right = parentNode;\n if (grandParent === this._root) {\n this._root = curNode;\n this._header._parent = curNode;\n } else {\n const GP = grandParent._parent!;\n if (GP._left === grandParent) {\n GP._left = curNode;\n } else GP._right = curNode;\n }\n curNode._parent = grandParent._parent;\n parentNode._parent = curNode;\n grandParent._parent = curNode;\n grandParent._color = TreeNodeColor.RED;\n } else {\n parentNode._color = TreeNodeColor.BLACK;\n if (grandParent === this._root) {\n this._root = grandParent._rotateLeft();\n } else grandParent._rotateLeft();\n grandParent._color = TreeNodeColor.RED;\n return;\n }\n }\n if (this.enableIndex) {\n (>parentNode)._recount();\n (>grandParent)._recount();\n (>curNode)._recount();\n }\n return;\n }\n }\n /**\n * @internal\n */\n protected _set(key: K, value?: V, hint?: TreeIterator) {\n if (this._root === undefined) {\n this._length += 1;\n this._root = new this._TreeNodeClass(key, value, TreeNodeColor.BLACK);\n this._root._parent = this._header;\n this._header._parent = this._header._left = this._header._right = this._root;\n return this._length;\n }\n let curNode;\n const minNode = this._header._left!;\n const compareToMin = this._cmp(minNode._key!, key);\n if (compareToMin === 0) {\n minNode._value = value;\n return this._length;\n } else if (compareToMin > 0) {\n minNode._left = new this._TreeNodeClass(key, value);\n minNode._left._parent = minNode;\n curNode = minNode._left;\n this._header._left = curNode;\n } else {\n const maxNode = this._header._right!;\n const compareToMax = this._cmp(maxNode._key!, key);\n if (compareToMax === 0) {\n maxNode._value = value;\n return this._length;\n } else if (compareToMax < 0) {\n maxNode._right = new this._TreeNodeClass(key, value);\n maxNode._right._parent = maxNode;\n curNode = maxNode._right;\n this._header._right = curNode;\n } else {\n if (hint !== undefined) {\n const iterNode = hint._node;\n if (iterNode !== this._header) {\n const iterCmpRes = this._cmp(iterNode._key!, key);\n if (iterCmpRes === 0) {\n iterNode._value = value;\n return this._length;\n } else /* istanbul ignore else */ if (iterCmpRes > 0) {\n const preNode = iterNode._pre();\n const preCmpRes = this._cmp(preNode._key!, key);\n if (preCmpRes === 0) {\n preNode._value = value;\n return this._length;\n } else if (preCmpRes < 0) {\n curNode = new this._TreeNodeClass(key, value);\n if (preNode._right === undefined) {\n preNode._right = curNode;\n curNode._parent = preNode;\n } else {\n iterNode._left = curNode;\n curNode._parent = iterNode;\n }\n }\n }\n }\n }\n if (curNode === undefined) {\n curNode = this._root;\n while (true) {\n const cmpResult = this._cmp(curNode._key!, key);\n if (cmpResult > 0) {\n if (curNode._left === undefined) {\n curNode._left = new this._TreeNodeClass(key, value);\n curNode._left._parent = curNode;\n curNode = curNode._left;\n break;\n }\n curNode = curNode._left;\n } else if (cmpResult < 0) {\n if (curNode._right === undefined) {\n curNode._right = new this._TreeNodeClass(key, value);\n curNode._right._parent = curNode;\n curNode = curNode._right;\n break;\n }\n curNode = curNode._right;\n } else {\n curNode._value = value;\n return this._length;\n }\n }\n }\n }\n }\n if (this.enableIndex) {\n let parent = curNode._parent as TreeNodeEnableIndex;\n while (parent !== this._header) {\n parent._subTreeSize += 1;\n parent = parent._parent as TreeNodeEnableIndex;\n }\n }\n this._insertNodeSelfBalance(curNode);\n this._length += 1;\n return this._length;\n }\n /**\n * @internal\n */\n protected _getTreeNodeByKey(curNode: TreeNode | undefined, key: K) {\n while (curNode) {\n const cmpResult = this._cmp(curNode._key!, key);\n if (cmpResult < 0) {\n curNode = curNode._right;\n } else if (cmpResult > 0) {\n curNode = curNode._left;\n } else return curNode;\n }\n return curNode || this._header;\n }\n clear() {\n this._length = 0;\n this._root = undefined;\n this._header._parent = undefined;\n this._header._left = this._header._right = undefined;\n }\n /**\n * @description Update node's key by iterator.\n * @param iter - The iterator you want to change.\n * @param key - The key you want to update.\n * @returns Whether the modification is successful.\n * @example\n * const st = new orderedSet([1, 2, 5]);\n * const iter = st.find(2);\n * st.updateKeyByIterator(iter, 3); // then st will become [1, 3, 5]\n */\n updateKeyByIterator(iter: TreeIterator, key: K): boolean {\n const node = iter._node;\n if (node === this._header) {\n throwIteratorAccessError();\n }\n if (this._length === 1) {\n node._key = key;\n return true;\n }\n const nextKey = node._next()._key!;\n if (node === this._header._left) {\n if (this._cmp(nextKey, key) > 0) {\n node._key = key;\n return true;\n }\n return false;\n }\n const preKey = node._pre()._key!;\n if (node === this._header._right) {\n if (this._cmp(preKey, key) < 0) {\n node._key = key;\n return true;\n }\n return false;\n }\n if (\n this._cmp(preKey, key) >= 0 ||\n this._cmp(nextKey, key) <= 0\n ) return false;\n node._key = key;\n return true;\n }\n eraseElementByPos(pos: number) {\n $checkWithinAccessParams!(pos, 0, this._length - 1);\n const node = this._inOrderTraversal(pos);\n this._eraseNode(node);\n return this._length;\n }\n /**\n * @description Remove the element of the specified key.\n * @param key - The key you want to remove.\n * @returns Whether erase successfully.\n */\n eraseElementByKey(key: K) {\n if (this._length === 0) return false;\n const curNode = this._getTreeNodeByKey(this._root, key);\n if (curNode === this._header) return false;\n this._eraseNode(curNode);\n return true;\n }\n eraseElementByIterator(iter: TreeIterator) {\n const node = iter._node;\n if (node === this._header) {\n throwIteratorAccessError();\n }\n const hasNoRight = node._right === undefined;\n const isNormal = iter.iteratorType === IteratorType.NORMAL;\n // For the normal iterator, the `next` node will be swapped to `this` node when has right.\n if (isNormal) {\n // So we should move it to next when it's right is null.\n if (hasNoRight) iter.next();\n } else {\n // For the reverse iterator, only when it doesn't have right and has left the `next` node will be swapped.\n // So when it has right, or it is a leaf node we should move it to `next`.\n if (!hasNoRight || node._left === undefined) iter.next();\n }\n this._eraseNode(node);\n return iter;\n }\n /**\n * @description Get the height of the tree.\n * @returns Number about the height of the RB-tree.\n */\n getHeight() {\n if (this._length === 0) return 0;\n function traversal(curNode: TreeNode | undefined): number {\n if (!curNode) return 0;\n return Math.max(traversal(curNode._left), traversal(curNode._right)) + 1;\n }\n return traversal(this._root);\n }\n /**\n * @param key - The given key you want to compare.\n * @returns An iterator to the first element less than the given key.\n */\n abstract reverseUpperBound(key: K): TreeIterator;\n /**\n * @description Union the other tree to self.\n * @param other - The other tree container you want to merge.\n * @returns The size of the tree after union.\n */\n abstract union(other: TreeContainer): number;\n /**\n * @param key - The given key you want to compare.\n * @returns An iterator to the first element not greater than the given key.\n */\n abstract reverseLowerBound(key: K): TreeIterator;\n /**\n * @param key - The given key you want to compare.\n * @returns An iterator to the first element not less than the given key.\n */\n abstract lowerBound(key: K): TreeIterator;\n /**\n * @param key - The given key you want to compare.\n * @returns An iterator to the first element greater than the given key.\n */\n abstract upperBound(key: K): TreeIterator;\n}\n\nexport default TreeContainer;\n","import { TreeNode } from './TreeNode';\nimport type { TreeNodeEnableIndex } from './TreeNode';\nimport { ContainerIterator, IteratorType } from '@/container/ContainerBase';\nimport TreeContainer from '@/container/TreeContainer/Base/index';\nimport { throwIteratorAccessError } from '@/utils/throwError';\n\nabstract class TreeIterator extends ContainerIterator {\n abstract readonly container: TreeContainer;\n /**\n * @internal\n */\n _node: TreeNode;\n /**\n * @internal\n */\n protected _header: TreeNode;\n /**\n * @internal\n */\n protected constructor(\n node: TreeNode,\n header: TreeNode,\n iteratorType?: IteratorType\n ) {\n super(iteratorType);\n this._node = node;\n this._header = header;\n if (this.iteratorType === IteratorType.NORMAL) {\n this.pre = function () {\n if (this._node === this._header._left) {\n throwIteratorAccessError();\n }\n this._node = this._node._pre();\n return this;\n };\n\n this.next = function () {\n if (this._node === this._header) {\n throwIteratorAccessError();\n }\n this._node = this._node._next();\n return this;\n };\n } else {\n this.pre = function () {\n if (this._node === this._header._right) {\n throwIteratorAccessError();\n }\n this._node = this._node._next();\n return this;\n };\n\n this.next = function () {\n if (this._node === this._header) {\n throwIteratorAccessError();\n }\n this._node = this._node._pre();\n return this;\n };\n }\n }\n /**\n * @description Get the sequential index of the iterator in the tree container.
\n * Note:\n * This function only takes effect when the specified tree container `enableIndex = true`.\n * @returns The index subscript of the node in the tree.\n * @example\n * const st = new OrderedSet([1, 2, 3], true);\n * console.log(st.begin().next().index); // 1\n */\n get index() {\n let _node = this._node as TreeNodeEnableIndex;\n const root = this._header._parent as TreeNodeEnableIndex;\n if (_node === this._header) {\n if (root) {\n return root._subTreeSize - 1;\n }\n return 0;\n }\n let index = 0;\n if (_node._left) {\n index += (_node._left as TreeNodeEnableIndex)._subTreeSize;\n }\n while (_node !== root) {\n const _parent = _node._parent as TreeNodeEnableIndex;\n if (_node === _parent._right) {\n index += 1;\n if (_parent._left) {\n index += (_parent._left as TreeNodeEnableIndex)._subTreeSize;\n }\n }\n _node = _parent;\n }\n return index;\n }\n isAccessible() {\n return this._node !== this._header;\n }\n // @ts-ignore\n pre(): this;\n // @ts-ignore\n next(): this;\n}\n\nexport default TreeIterator;\n","import TreeContainer from './Base';\nimport TreeIterator from './Base/TreeIterator';\nimport { TreeNode } from './Base/TreeNode';\nimport { initContainer, IteratorType } from '@/container/ContainerBase';\nimport $checkWithinAccessParams from '@/utils/checkParams.macro';\nimport { throwIteratorAccessError } from '@/utils/throwError';\n\nclass OrderedMapIterator extends TreeIterator {\n container: OrderedMap;\n constructor(\n node: TreeNode,\n header: TreeNode,\n container: OrderedMap,\n iteratorType?: IteratorType\n ) {\n super(node, header, iteratorType);\n this.container = container;\n }\n get pointer() {\n if (this._node === this._header) {\n throwIteratorAccessError();\n }\n const self = this;\n return new Proxy(<[K, V]>[], {\n get(target, prop: '0' | '1') {\n if (prop === '0') return self._node._key!;\n else if (prop === '1') return self._node._value!;\n target[0] = self._node._key!;\n target[1] = self._node._value!;\n return target[prop];\n },\n set(_, prop: '1', newValue: V) {\n if (prop !== '1') {\n throw new TypeError('prop must be 1');\n }\n self._node._value = newValue;\n return true;\n }\n });\n }\n copy() {\n return new OrderedMapIterator(\n this._node,\n this._header,\n this.container,\n this.iteratorType\n );\n }\n // @ts-ignore\n equals(iter: OrderedMapIterator): boolean;\n}\n\nexport type { OrderedMapIterator };\n\nclass OrderedMap extends TreeContainer {\n /**\n * @param container - The initialization container.\n * @param cmp - The compare function.\n * @param enableIndex - Whether to enable iterator indexing function.\n * @example\n * new OrderedMap();\n * new OrderedMap([[0, 1], [2, 1]]);\n * new OrderedMap([[0, 1], [2, 1]], (x, y) => x - y);\n * new OrderedMap([[0, 1], [2, 1]], (x, y) => x - y, true);\n */\n constructor(\n container: initContainer<[K, V]> = [],\n cmp?: (x: K, y: K) => number,\n enableIndex?: boolean\n ) {\n super(cmp, enableIndex);\n const self = this;\n container.forEach(function (el) {\n self.setElement(el[0], el[1]);\n });\n }\n begin() {\n return new OrderedMapIterator(this._header._left || this._header, this._header, this);\n }\n end() {\n return new OrderedMapIterator(this._header, this._header, this);\n }\n rBegin() {\n return new OrderedMapIterator(\n this._header._right || this._header,\n this._header,\n this,\n IteratorType.REVERSE\n );\n }\n rEnd() {\n return new OrderedMapIterator(this._header, this._header, this, IteratorType.REVERSE);\n }\n front() {\n if (this._length === 0) return;\n const minNode = this._header._left!;\n return <[K, V]>[minNode._key, minNode._value];\n }\n back() {\n if (this._length === 0) return;\n const maxNode = this._header._right!;\n return <[K, V]>[maxNode._key, maxNode._value];\n }\n lowerBound(key: K) {\n const resNode = this._lowerBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n }\n upperBound(key: K) {\n const resNode = this._upperBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n }\n reverseLowerBound(key: K) {\n const resNode = this._reverseLowerBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n }\n reverseUpperBound(key: K) {\n const resNode = this._reverseUpperBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n }\n forEach(callback: (element: [K, V], index: number, map: OrderedMap) => void) {\n this._inOrderTraversal(function (node, index, map) {\n callback(<[K, V]>[node._key, node._value], index, map);\n });\n }\n /**\n * @description Insert a key-value pair or set value by the given key.\n * @param key - The key want to insert.\n * @param value - The value want to set.\n * @param hint - You can give an iterator hint to improve insertion efficiency.\n * @return The size of container after setting.\n * @example\n * const mp = new OrderedMap([[2, 0], [4, 0], [5, 0]]);\n * const iter = mp.begin();\n * mp.setElement(1, 0);\n * mp.setElement(3, 0, iter); // give a hint will be faster.\n */\n setElement(key: K, value: V, hint?: OrderedMapIterator) {\n return this._set(key, value, hint);\n }\n getElementByPos(pos: number) {\n $checkWithinAccessParams!(pos, 0, this._length - 1);\n const node = this._inOrderTraversal(pos);\n return <[K, V]>[node._key, node._value];\n }\n find(key: K) {\n const curNode = this._getTreeNodeByKey(this._root, key);\n return new OrderedMapIterator(curNode, this._header, this);\n }\n /**\n * @description Get the value of the element of the specified key.\n * @param key - The specified key you want to get.\n * @example\n * const val = container.getElementByKey(1);\n */\n getElementByKey(key: K) {\n const curNode = this._getTreeNodeByKey(this._root, key);\n return curNode._value;\n }\n union(other: OrderedMap) {\n const self = this;\n other.forEach(function (el) {\n self.setElement(el[0], el[1]);\n });\n return this._length;\n }\n * [Symbol.iterator]() {\n const length = this._length;\n const nodeList = this._inOrderTraversal();\n for (let i = 0; i < length; ++i) {\n const node = nodeList[i];\n yield <[K, V]>[node._key, node._value];\n }\n }\n // @ts-ignore\n eraseElementByIterator(iter: OrderedMapIterator): OrderedMapIterator;\n}\n\nexport default OrderedMap;\n"]} \ No newline at end of file diff --git a/node_modules/@js-sdsl/ordered-map/dist/esm/index.d.ts b/node_modules/@js-sdsl/ordered-map/dist/esm/index.d.ts deleted file mode 100644 index 8615f37..0000000 --- a/node_modules/@js-sdsl/ordered-map/dist/esm/index.d.ts +++ /dev/null @@ -1,402 +0,0 @@ -/** - * @description The iterator type including `NORMAL` and `REVERSE`. - */ -declare const enum IteratorType { - NORMAL = 0, - REVERSE = 1 -} -declare abstract class ContainerIterator { - /** - * @description The container pointed to by the iterator. - */ - abstract readonly container: Container; - /** - * @description Iterator's type. - * @example - * console.log(container.end().iteratorType === IteratorType.NORMAL); // true - */ - readonly iteratorType: IteratorType; - /** - * @param iter - The other iterator you want to compare. - * @returns Whether this equals to obj. - * @example - * container.find(1).equals(container.end()); - */ - equals(iter: ContainerIterator): boolean; - /** - * @description Pointers to element. - * @returns The value of the pointer's element. - * @example - * const val = container.begin().pointer; - */ - abstract get pointer(): T; - /** - * @description Set pointer's value (some containers are unavailable). - * @param newValue - The new value you want to set. - * @example - * (>container).begin().pointer = 1; - */ - abstract set pointer(newValue: T); - /** - * @description Move `this` iterator to pre. - * @returns The iterator's self. - * @example - * const iter = container.find(1); // container = [0, 1] - * const pre = iter.pre(); - * console.log(pre === iter); // true - * console.log(pre.equals(iter)); // true - * console.log(pre.pointer, iter.pointer); // 0, 0 - */ - abstract pre(): this; - /** - * @description Move `this` iterator to next. - * @returns The iterator's self. - * @example - * const iter = container.find(1); // container = [1, 2] - * const next = iter.next(); - * console.log(next === iter); // true - * console.log(next.equals(iter)); // true - * console.log(next.pointer, iter.pointer); // 2, 2 - */ - abstract next(): this; - /** - * @description Get a copy of itself. - * @returns The copy of self. - * @example - * const iter = container.find(1); // container = [1, 2] - * const next = iter.copy().next(); - * console.log(next === iter); // false - * console.log(next.equals(iter)); // false - * console.log(next.pointer, iter.pointer); // 2, 1 - */ - abstract copy(): ContainerIterator; - abstract isAccessible(): boolean; -} -declare abstract class Base { - /** - * @returns The size of the container. - * @example - * const container = new Vector([1, 2]); - * console.log(container.length); // 2 - */ - get length(): number; - /** - * @returns The size of the container. - * @example - * const container = new Vector([1, 2]); - * console.log(container.size()); // 2 - */ - size(): number; - /** - * @returns Whether the container is empty. - * @example - * container.clear(); - * console.log(container.empty()); // true - */ - empty(): boolean; - /** - * @description Clear the container. - * @example - * container.clear(); - * console.log(container.empty()); // true - */ - abstract clear(): void; -} -declare abstract class Container extends Base { - /** - * @returns Iterator pointing to the beginning element. - * @example - * const begin = container.begin(); - * const end = container.end(); - * for (const it = begin; !it.equals(end); it.next()) { - * doSomething(it.pointer); - * } - */ - abstract begin(): ContainerIterator; - /** - * @returns Iterator pointing to the super end like c++. - * @example - * const begin = container.begin(); - * const end = container.end(); - * for (const it = begin; !it.equals(end); it.next()) { - * doSomething(it.pointer); - * } - */ - abstract end(): ContainerIterator; - /** - * @returns Iterator pointing to the end element. - * @example - * const rBegin = container.rBegin(); - * const rEnd = container.rEnd(); - * for (const it = rBegin; !it.equals(rEnd); it.next()) { - * doSomething(it.pointer); - * } - */ - abstract rBegin(): ContainerIterator; - /** - * @returns Iterator pointing to the super begin like c++. - * @example - * const rBegin = container.rBegin(); - * const rEnd = container.rEnd(); - * for (const it = rBegin; !it.equals(rEnd); it.next()) { - * doSomething(it.pointer); - * } - */ - abstract rEnd(): ContainerIterator; - /** - * @returns The first element of the container. - */ - abstract front(): T | undefined; - /** - * @returns The last element of the container. - */ - abstract back(): T | undefined; - /** - * @param element - The element you want to find. - * @returns An iterator pointing to the element if found, or super end if not found. - * @example - * container.find(1).equals(container.end()); - */ - abstract find(element: T): ContainerIterator; - /** - * @description Iterate over all elements in the container. - * @param callback - Callback function like Array.forEach. - * @example - * container.forEach((element, index) => console.log(element, index)); - */ - abstract forEach(callback: (element: T, index: number, container: Container) => void): void; - /** - * @description Gets the value of the element at the specified position. - * @example - * const val = container.getElementByPos(-1); // throw a RangeError - */ - abstract getElementByPos(pos: number): T; - /** - * @description Removes the element at the specified position. - * @param pos - The element's position you want to remove. - * @returns The container length after erasing. - * @example - * container.eraseElementByPos(-1); // throw a RangeError - */ - abstract eraseElementByPos(pos: number): number; - /** - * @description Removes element by iterator and move `iter` to next. - * @param iter - The iterator you want to erase. - * @returns The next iterator. - * @example - * container.eraseElementByIterator(container.begin()); - * container.eraseElementByIterator(container.end()); // throw a RangeError - */ - abstract eraseElementByIterator(iter: ContainerIterator): ContainerIterator; - /** - * @description Using for `for...of` syntax like Array. - * @example - * for (const element of container) { - * console.log(element); - * } - */ - abstract [Symbol.iterator](): Generator; -} -/** - * @description The initial data type passed in when initializing the container. - */ -type initContainer = { - size?: number | (() => number); - length?: number; - forEach: (callback: (el: T) => void) => void; -}; -declare abstract class TreeIterator extends ContainerIterator { - abstract readonly container: TreeContainer; - /** - * @description Get the sequential index of the iterator in the tree container.
- * Note: - * This function only takes effect when the specified tree container `enableIndex = true`. - * @returns The index subscript of the node in the tree. - * @example - * const st = new OrderedSet([1, 2, 3], true); - * console.log(st.begin().next().index); // 1 - */ - get index(): number; - isAccessible(): boolean; - // @ts-ignore - pre(): this; - // @ts-ignore - next(): this; -} -declare const enum TreeNodeColor { - RED = 1, - BLACK = 0 -} -declare class TreeNode { - _color: TreeNodeColor; - _key: K | undefined; - _value: V | undefined; - _left: TreeNode | undefined; - _right: TreeNode | undefined; - _parent: TreeNode | undefined; - constructor(key?: K, value?: V, color?: TreeNodeColor); - /** - * @description Get the pre node. - * @returns TreeNode about the pre node. - */ - _pre(): TreeNode; - /** - * @description Get the next node. - * @returns TreeNode about the next node. - */ - _next(): TreeNode; - /** - * @description Rotate left. - * @returns TreeNode about moved to original position after rotation. - */ - _rotateLeft(): TreeNode; - /** - * @description Rotate right. - * @returns TreeNode about moved to original position after rotation. - */ - _rotateRight(): TreeNode; -} -declare abstract class TreeContainer extends Container { - enableIndex: boolean; - protected _inOrderTraversal(): TreeNode[]; - protected _inOrderTraversal(pos: number): TreeNode; - protected _inOrderTraversal(callback: (node: TreeNode, index: number, map: this) => void): TreeNode; - clear(): void; - /** - * @description Update node's key by iterator. - * @param iter - The iterator you want to change. - * @param key - The key you want to update. - * @returns Whether the modification is successful. - * @example - * const st = new orderedSet([1, 2, 5]); - * const iter = st.find(2); - * st.updateKeyByIterator(iter, 3); // then st will become [1, 3, 5] - */ - updateKeyByIterator(iter: TreeIterator, key: K): boolean; - eraseElementByPos(pos: number): number; - /** - * @description Remove the element of the specified key. - * @param key - The key you want to remove. - * @returns Whether erase successfully. - */ - eraseElementByKey(key: K): boolean; - eraseElementByIterator(iter: TreeIterator): TreeIterator; - /** - * @description Get the height of the tree. - * @returns Number about the height of the RB-tree. - */ - getHeight(): number; - /** - * @param key - The given key you want to compare. - * @returns An iterator to the first element less than the given key. - */ - abstract reverseUpperBound(key: K): TreeIterator; - /** - * @description Union the other tree to self. - * @param other - The other tree container you want to merge. - * @returns The size of the tree after union. - */ - abstract union(other: TreeContainer): number; - /** - * @param key - The given key you want to compare. - * @returns An iterator to the first element not greater than the given key. - */ - abstract reverseLowerBound(key: K): TreeIterator; - /** - * @param key - The given key you want to compare. - * @returns An iterator to the first element not less than the given key. - */ - abstract lowerBound(key: K): TreeIterator; - /** - * @param key - The given key you want to compare. - * @returns An iterator to the first element greater than the given key. - */ - abstract upperBound(key: K): TreeIterator; -} -declare class OrderedMapIterator extends TreeIterator { - container: OrderedMap; - constructor(node: TreeNode, header: TreeNode, container: OrderedMap, iteratorType?: IteratorType); - get pointer(): [ - K, - V - ]; - copy(): OrderedMapIterator; - // @ts-ignore - equals(iter: OrderedMapIterator): boolean; -} -declare class OrderedMap extends TreeContainer { - /** - * @param container - The initialization container. - * @param cmp - The compare function. - * @param enableIndex - Whether to enable iterator indexing function. - * @example - * new OrderedMap(); - * new OrderedMap([[0, 1], [2, 1]]); - * new OrderedMap([[0, 1], [2, 1]], (x, y) => x - y); - * new OrderedMap([[0, 1], [2, 1]], (x, y) => x - y, true); - */ - constructor(container?: initContainer<[ - K, - V - ]>, cmp?: (x: K, y: K) => number, enableIndex?: boolean); - begin(): OrderedMapIterator; - end(): OrderedMapIterator; - rBegin(): OrderedMapIterator; - rEnd(): OrderedMapIterator; - front(): [ - K, - V - ] | undefined; - back(): [ - K, - V - ] | undefined; - lowerBound(key: K): OrderedMapIterator; - upperBound(key: K): OrderedMapIterator; - reverseLowerBound(key: K): OrderedMapIterator; - reverseUpperBound(key: K): OrderedMapIterator; - forEach(callback: (element: [ - K, - V - ], index: number, map: OrderedMap) => void): void; - /** - * @description Insert a key-value pair or set value by the given key. - * @param key - The key want to insert. - * @param value - The value want to set. - * @param hint - You can give an iterator hint to improve insertion efficiency. - * @return The size of container after setting. - * @example - * const mp = new OrderedMap([[2, 0], [4, 0], [5, 0]]); - * const iter = mp.begin(); - * mp.setElement(1, 0); - * mp.setElement(3, 0, iter); // give a hint will be faster. - */ - setElement(key: K, value: V, hint?: OrderedMapIterator): number; - getElementByPos(pos: number): [ - K, - V - ]; - find(key: K): OrderedMapIterator; - /** - * @description Get the value of the element of the specified key. - * @param key - The specified key you want to get. - * @example - * const val = container.getElementByKey(1); - */ - getElementByKey(key: K): V | undefined; - union(other: OrderedMap): number; - [Symbol.iterator](): Generator<[ - K, - V - ], void, unknown>; - // @ts-ignore - eraseElementByIterator(iter: OrderedMapIterator): OrderedMapIterator; -} -export { OrderedMap }; -export type { OrderedMapIterator, IteratorType, Container, ContainerIterator, TreeContainer }; diff --git a/node_modules/@js-sdsl/ordered-map/dist/esm/index.js b/node_modules/@js-sdsl/ordered-map/dist/esm/index.js deleted file mode 100644 index 1504ce8..0000000 --- a/node_modules/@js-sdsl/ordered-map/dist/esm/index.js +++ /dev/null @@ -1,975 +0,0 @@ -var extendStatics = function(e, r) { - extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function(e, r) { - e.__proto__ = r; - } || function(e, r) { - for (var t in r) if (Object.prototype.hasOwnProperty.call(r, t)) e[t] = r[t]; - }; - return extendStatics(e, r); -}; - -function __extends(e, r) { - if (typeof r !== "function" && r !== null) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null"); - extendStatics(e, r); - function __() { - this.constructor = e; - } - e.prototype = r === null ? Object.create(r) : (__.prototype = r.prototype, new __); -} - -function __generator(e, r) { - var t = { - label: 0, - sent: function() { - if (s[0] & 1) throw s[1]; - return s[1]; - }, - trys: [], - ops: [] - }, i, n, s, h; - return h = { - next: verb(0), - throw: verb(1), - return: verb(2) - }, typeof Symbol === "function" && (h[Symbol.iterator] = function() { - return this; - }), h; - function verb(e) { - return function(r) { - return step([ e, r ]); - }; - } - function step(a) { - if (i) throw new TypeError("Generator is already executing."); - while (h && (h = 0, a[0] && (t = 0)), t) try { - if (i = 1, n && (s = a[0] & 2 ? n["return"] : a[0] ? n["throw"] || ((s = n["return"]) && s.call(n), - 0) : n.next) && !(s = s.call(n, a[1])).done) return s; - if (n = 0, s) a = [ a[0] & 2, s.value ]; - switch (a[0]) { - case 0: - case 1: - s = a; - break; - - case 4: - t.label++; - return { - value: a[1], - done: false - }; - - case 5: - t.label++; - n = a[1]; - a = [ 0 ]; - continue; - - case 7: - a = t.ops.pop(); - t.trys.pop(); - continue; - - default: - if (!(s = t.trys, s = s.length > 0 && s[s.length - 1]) && (a[0] === 6 || a[0] === 2)) { - t = 0; - continue; - } - if (a[0] === 3 && (!s || a[1] > s[0] && a[1] < s[3])) { - t.label = a[1]; - break; - } - if (a[0] === 6 && t.label < s[1]) { - t.label = s[1]; - s = a; - break; - } - if (s && t.label < s[2]) { - t.label = s[2]; - t.ops.push(a); - break; - } - if (s[2]) t.ops.pop(); - t.trys.pop(); - continue; - } - a = r.call(e, t); - } catch (e) { - a = [ 6, e ]; - n = 0; - } finally { - i = s = 0; - } - if (a[0] & 5) throw a[1]; - return { - value: a[0] ? a[1] : void 0, - done: true - }; - } -} - -typeof SuppressedError === "function" ? SuppressedError : function(e, r, t) { - var i = new Error(t); - return i.name = "SuppressedError", i.error = e, i.suppressed = r, i; -}; - -var TreeNode = function() { - function TreeNode(e, r, t) { - if (t === void 0) { - t = 1; - } - this.t = undefined; - this.i = undefined; - this.h = undefined; - this.u = e; - this.o = r; - this.l = t; - } - TreeNode.prototype.v = function() { - var e = this; - var r = e.h.h === e; - if (r && e.l === 1) { - e = e.i; - } else if (e.t) { - e = e.t; - while (e.i) { - e = e.i; - } - } else { - if (r) { - return e.h; - } - var t = e.h; - while (t.t === e) { - e = t; - t = e.h; - } - e = t; - } - return e; - }; - TreeNode.prototype.p = function() { - var e = this; - if (e.i) { - e = e.i; - while (e.t) { - e = e.t; - } - return e; - } else { - var r = e.h; - while (r.i === e) { - e = r; - r = e.h; - } - if (e.i !== r) { - return r; - } else return e; - } - }; - TreeNode.prototype.T = function() { - var e = this.h; - var r = this.i; - var t = r.t; - if (e.h === this) e.h = r; else if (e.t === this) e.t = r; else e.i = r; - r.h = e; - r.t = this; - this.h = r; - this.i = t; - if (t) t.h = this; - return r; - }; - TreeNode.prototype.I = function() { - var e = this.h; - var r = this.t; - var t = r.i; - if (e.h === this) e.h = r; else if (e.t === this) e.t = r; else e.i = r; - r.h = e; - r.i = this; - this.h = r; - this.t = t; - if (t) t.h = this; - return r; - }; - return TreeNode; -}(); - -var TreeNodeEnableIndex = function(e) { - __extends(TreeNodeEnableIndex, e); - function TreeNodeEnableIndex() { - var r = e !== null && e.apply(this, arguments) || this; - r.O = 1; - return r; - } - TreeNodeEnableIndex.prototype.T = function() { - var r = e.prototype.T.call(this); - this.M(); - r.M(); - return r; - }; - TreeNodeEnableIndex.prototype.I = function() { - var r = e.prototype.I.call(this); - this.M(); - r.M(); - return r; - }; - TreeNodeEnableIndex.prototype.M = function() { - this.O = 1; - if (this.t) { - this.O += this.t.O; - } - if (this.i) { - this.O += this.i.O; - } - }; - return TreeNodeEnableIndex; -}(TreeNode); - -var ContainerIterator = function() { - function ContainerIterator(e) { - if (e === void 0) { - e = 0; - } - this.iteratorType = e; - } - ContainerIterator.prototype.equals = function(e) { - return this.C === e.C; - }; - return ContainerIterator; -}(); - -var Base = function() { - function Base() { - this._ = 0; - } - Object.defineProperty(Base.prototype, "length", { - get: function() { - return this._; - }, - enumerable: false, - configurable: true - }); - Base.prototype.size = function() { - return this._; - }; - Base.prototype.empty = function() { - return this._ === 0; - }; - return Base; -}(); - -var Container = function(e) { - __extends(Container, e); - function Container() { - return e !== null && e.apply(this, arguments) || this; - } - return Container; -}(Base); - -function throwIteratorAccessError() { - throw new RangeError("Iterator access denied!"); -} - -var TreeContainer = function(e) { - __extends(TreeContainer, e); - function TreeContainer(r, t) { - if (r === void 0) { - r = function(e, r) { - if (e < r) return -1; - if (e > r) return 1; - return 0; - }; - } - if (t === void 0) { - t = false; - } - var i = e.call(this) || this; - i.N = undefined; - i.g = r; - i.enableIndex = t; - i.S = t ? TreeNodeEnableIndex : TreeNode; - i.A = new i.S; - return i; - } - TreeContainer.prototype.m = function(e, r) { - var t = this.A; - while (e) { - var i = this.g(e.u, r); - if (i < 0) { - e = e.i; - } else if (i > 0) { - t = e; - e = e.t; - } else return e; - } - return t; - }; - TreeContainer.prototype.B = function(e, r) { - var t = this.A; - while (e) { - var i = this.g(e.u, r); - if (i <= 0) { - e = e.i; - } else { - t = e; - e = e.t; - } - } - return t; - }; - TreeContainer.prototype.j = function(e, r) { - var t = this.A; - while (e) { - var i = this.g(e.u, r); - if (i < 0) { - t = e; - e = e.i; - } else if (i > 0) { - e = e.t; - } else return e; - } - return t; - }; - TreeContainer.prototype.k = function(e, r) { - var t = this.A; - while (e) { - var i = this.g(e.u, r); - if (i < 0) { - t = e; - e = e.i; - } else { - e = e.t; - } - } - return t; - }; - TreeContainer.prototype.R = function(e) { - while (true) { - var r = e.h; - if (r === this.A) return; - if (e.l === 1) { - e.l = 0; - return; - } - if (e === r.t) { - var t = r.i; - if (t.l === 1) { - t.l = 0; - r.l = 1; - if (r === this.N) { - this.N = r.T(); - } else r.T(); - } else { - if (t.i && t.i.l === 1) { - t.l = r.l; - r.l = 0; - t.i.l = 0; - if (r === this.N) { - this.N = r.T(); - } else r.T(); - return; - } else if (t.t && t.t.l === 1) { - t.l = 1; - t.t.l = 0; - t.I(); - } else { - t.l = 1; - e = r; - } - } - } else { - var t = r.t; - if (t.l === 1) { - t.l = 0; - r.l = 1; - if (r === this.N) { - this.N = r.I(); - } else r.I(); - } else { - if (t.t && t.t.l === 1) { - t.l = r.l; - r.l = 0; - t.t.l = 0; - if (r === this.N) { - this.N = r.I(); - } else r.I(); - return; - } else if (t.i && t.i.l === 1) { - t.l = 1; - t.i.l = 0; - t.T(); - } else { - t.l = 1; - e = r; - } - } - } - } - }; - TreeContainer.prototype.G = function(e) { - if (this._ === 1) { - this.clear(); - return; - } - var r = e; - while (r.t || r.i) { - if (r.i) { - r = r.i; - while (r.t) r = r.t; - } else { - r = r.t; - } - var t = e.u; - e.u = r.u; - r.u = t; - var i = e.o; - e.o = r.o; - r.o = i; - e = r; - } - if (this.A.t === r) { - this.A.t = r.h; - } else if (this.A.i === r) { - this.A.i = r.h; - } - this.R(r); - var n = r.h; - if (r === n.t) { - n.t = undefined; - } else n.i = undefined; - this._ -= 1; - this.N.l = 0; - if (this.enableIndex) { - while (n !== this.A) { - n.O -= 1; - n = n.h; - } - } - }; - TreeContainer.prototype.P = function(e) { - var r = typeof e === "number" ? e : undefined; - var t = typeof e === "function" ? e : undefined; - var i = typeof e === "undefined" ? [] : undefined; - var n = 0; - var s = this.N; - var h = []; - while (h.length || s) { - if (s) { - h.push(s); - s = s.t; - } else { - s = h.pop(); - if (n === r) return s; - i && i.push(s); - t && t(s, n, this); - n += 1; - s = s.i; - } - } - return i; - }; - TreeContainer.prototype.q = function(e) { - while (true) { - var r = e.h; - if (r.l === 0) return; - var t = r.h; - if (r === t.t) { - var i = t.i; - if (i && i.l === 1) { - i.l = r.l = 0; - if (t === this.N) return; - t.l = 1; - e = t; - continue; - } else if (e === r.i) { - e.l = 0; - if (e.t) { - e.t.h = r; - } - if (e.i) { - e.i.h = t; - } - r.i = e.t; - t.t = e.i; - e.t = r; - e.i = t; - if (t === this.N) { - this.N = e; - this.A.h = e; - } else { - var n = t.h; - if (n.t === t) { - n.t = e; - } else n.i = e; - } - e.h = t.h; - r.h = e; - t.h = e; - t.l = 1; - } else { - r.l = 0; - if (t === this.N) { - this.N = t.I(); - } else t.I(); - t.l = 1; - return; - } - } else { - var i = t.t; - if (i && i.l === 1) { - i.l = r.l = 0; - if (t === this.N) return; - t.l = 1; - e = t; - continue; - } else if (e === r.t) { - e.l = 0; - if (e.t) { - e.t.h = t; - } - if (e.i) { - e.i.h = r; - } - t.i = e.t; - r.t = e.i; - e.t = t; - e.i = r; - if (t === this.N) { - this.N = e; - this.A.h = e; - } else { - var n = t.h; - if (n.t === t) { - n.t = e; - } else n.i = e; - } - e.h = t.h; - r.h = e; - t.h = e; - t.l = 1; - } else { - r.l = 0; - if (t === this.N) { - this.N = t.T(); - } else t.T(); - t.l = 1; - return; - } - } - if (this.enableIndex) { - r.M(); - t.M(); - e.M(); - } - return; - } - }; - TreeContainer.prototype.D = function(e, r, t) { - if (this.N === undefined) { - this._ += 1; - this.N = new this.S(e, r, 0); - this.N.h = this.A; - this.A.h = this.A.t = this.A.i = this.N; - return this._; - } - var i; - var n = this.A.t; - var s = this.g(n.u, e); - if (s === 0) { - n.o = r; - return this._; - } else if (s > 0) { - n.t = new this.S(e, r); - n.t.h = n; - i = n.t; - this.A.t = i; - } else { - var h = this.A.i; - var a = this.g(h.u, e); - if (a === 0) { - h.o = r; - return this._; - } else if (a < 0) { - h.i = new this.S(e, r); - h.i.h = h; - i = h.i; - this.A.i = i; - } else { - if (t !== undefined) { - var u = t.C; - if (u !== this.A) { - var f = this.g(u.u, e); - if (f === 0) { - u.o = r; - return this._; - } else if (f > 0) { - var o = u.v(); - var d = this.g(o.u, e); - if (d === 0) { - o.o = r; - return this._; - } else if (d < 0) { - i = new this.S(e, r); - if (o.i === undefined) { - o.i = i; - i.h = o; - } else { - u.t = i; - i.h = u; - } - } - } - } - } - if (i === undefined) { - i = this.N; - while (true) { - var c = this.g(i.u, e); - if (c > 0) { - if (i.t === undefined) { - i.t = new this.S(e, r); - i.t.h = i; - i = i.t; - break; - } - i = i.t; - } else if (c < 0) { - if (i.i === undefined) { - i.i = new this.S(e, r); - i.i.h = i; - i = i.i; - break; - } - i = i.i; - } else { - i.o = r; - return this._; - } - } - } - } - } - if (this.enableIndex) { - var l = i.h; - while (l !== this.A) { - l.O += 1; - l = l.h; - } - } - this.q(i); - this._ += 1; - return this._; - }; - TreeContainer.prototype.F = function(e, r) { - while (e) { - var t = this.g(e.u, r); - if (t < 0) { - e = e.i; - } else if (t > 0) { - e = e.t; - } else return e; - } - return e || this.A; - }; - TreeContainer.prototype.clear = function() { - this._ = 0; - this.N = undefined; - this.A.h = undefined; - this.A.t = this.A.i = undefined; - }; - TreeContainer.prototype.updateKeyByIterator = function(e, r) { - var t = e.C; - if (t === this.A) { - throwIteratorAccessError(); - } - if (this._ === 1) { - t.u = r; - return true; - } - var i = t.p().u; - if (t === this.A.t) { - if (this.g(i, r) > 0) { - t.u = r; - return true; - } - return false; - } - var n = t.v().u; - if (t === this.A.i) { - if (this.g(n, r) < 0) { - t.u = r; - return true; - } - return false; - } - if (this.g(n, r) >= 0 || this.g(i, r) <= 0) return false; - t.u = r; - return true; - }; - TreeContainer.prototype.eraseElementByPos = function(e) { - if (e < 0 || e > this._ - 1) { - throw new RangeError; - } - var r = this.P(e); - this.G(r); - return this._; - }; - TreeContainer.prototype.eraseElementByKey = function(e) { - if (this._ === 0) return false; - var r = this.F(this.N, e); - if (r === this.A) return false; - this.G(r); - return true; - }; - TreeContainer.prototype.eraseElementByIterator = function(e) { - var r = e.C; - if (r === this.A) { - throwIteratorAccessError(); - } - var t = r.i === undefined; - var i = e.iteratorType === 0; - if (i) { - if (t) e.next(); - } else { - if (!t || r.t === undefined) e.next(); - } - this.G(r); - return e; - }; - TreeContainer.prototype.getHeight = function() { - if (this._ === 0) return 0; - function traversal(e) { - if (!e) return 0; - return Math.max(traversal(e.t), traversal(e.i)) + 1; - } - return traversal(this.N); - }; - return TreeContainer; -}(Container); - -var TreeIterator = function(e) { - __extends(TreeIterator, e); - function TreeIterator(r, t, i) { - var n = e.call(this, i) || this; - n.C = r; - n.A = t; - if (n.iteratorType === 0) { - n.pre = function() { - if (this.C === this.A.t) { - throwIteratorAccessError(); - } - this.C = this.C.v(); - return this; - }; - n.next = function() { - if (this.C === this.A) { - throwIteratorAccessError(); - } - this.C = this.C.p(); - return this; - }; - } else { - n.pre = function() { - if (this.C === this.A.i) { - throwIteratorAccessError(); - } - this.C = this.C.p(); - return this; - }; - n.next = function() { - if (this.C === this.A) { - throwIteratorAccessError(); - } - this.C = this.C.v(); - return this; - }; - } - return n; - } - Object.defineProperty(TreeIterator.prototype, "index", { - get: function() { - var e = this.C; - var r = this.A.h; - if (e === this.A) { - if (r) { - return r.O - 1; - } - return 0; - } - var t = 0; - if (e.t) { - t += e.t.O; - } - while (e !== r) { - var i = e.h; - if (e === i.i) { - t += 1; - if (i.t) { - t += i.t.O; - } - } - e = i; - } - return t; - }, - enumerable: false, - configurable: true - }); - TreeIterator.prototype.isAccessible = function() { - return this.C !== this.A; - }; - return TreeIterator; -}(ContainerIterator); - -var OrderedMapIterator = function(e) { - __extends(OrderedMapIterator, e); - function OrderedMapIterator(r, t, i, n) { - var s = e.call(this, r, t, n) || this; - s.container = i; - return s; - } - Object.defineProperty(OrderedMapIterator.prototype, "pointer", { - get: function() { - if (this.C === this.A) { - throwIteratorAccessError(); - } - var e = this; - return new Proxy([], { - get: function(r, t) { - if (t === "0") return e.C.u; else if (t === "1") return e.C.o; - r[0] = e.C.u; - r[1] = e.C.o; - return r[t]; - }, - set: function(r, t, i) { - if (t !== "1") { - throw new TypeError("prop must be 1"); - } - e.C.o = i; - return true; - } - }); - }, - enumerable: false, - configurable: true - }); - OrderedMapIterator.prototype.copy = function() { - return new OrderedMapIterator(this.C, this.A, this.container, this.iteratorType); - }; - return OrderedMapIterator; -}(TreeIterator); - -var OrderedMap = function(e) { - __extends(OrderedMap, e); - function OrderedMap(r, t, i) { - if (r === void 0) { - r = []; - } - var n = e.call(this, t, i) || this; - var s = n; - r.forEach((function(e) { - s.setElement(e[0], e[1]); - })); - return n; - } - OrderedMap.prototype.begin = function() { - return new OrderedMapIterator(this.A.t || this.A, this.A, this); - }; - OrderedMap.prototype.end = function() { - return new OrderedMapIterator(this.A, this.A, this); - }; - OrderedMap.prototype.rBegin = function() { - return new OrderedMapIterator(this.A.i || this.A, this.A, this, 1); - }; - OrderedMap.prototype.rEnd = function() { - return new OrderedMapIterator(this.A, this.A, this, 1); - }; - OrderedMap.prototype.front = function() { - if (this._ === 0) return; - var e = this.A.t; - return [ e.u, e.o ]; - }; - OrderedMap.prototype.back = function() { - if (this._ === 0) return; - var e = this.A.i; - return [ e.u, e.o ]; - }; - OrderedMap.prototype.lowerBound = function(e) { - var r = this.m(this.N, e); - return new OrderedMapIterator(r, this.A, this); - }; - OrderedMap.prototype.upperBound = function(e) { - var r = this.B(this.N, e); - return new OrderedMapIterator(r, this.A, this); - }; - OrderedMap.prototype.reverseLowerBound = function(e) { - var r = this.j(this.N, e); - return new OrderedMapIterator(r, this.A, this); - }; - OrderedMap.prototype.reverseUpperBound = function(e) { - var r = this.k(this.N, e); - return new OrderedMapIterator(r, this.A, this); - }; - OrderedMap.prototype.forEach = function(e) { - this.P((function(r, t, i) { - e([ r.u, r.o ], t, i); - })); - }; - OrderedMap.prototype.setElement = function(e, r, t) { - return this.D(e, r, t); - }; - OrderedMap.prototype.getElementByPos = function(e) { - if (e < 0 || e > this._ - 1) { - throw new RangeError; - } - var r = this.P(e); - return [ r.u, r.o ]; - }; - OrderedMap.prototype.find = function(e) { - var r = this.F(this.N, e); - return new OrderedMapIterator(r, this.A, this); - }; - OrderedMap.prototype.getElementByKey = function(e) { - var r = this.F(this.N, e); - return r.o; - }; - OrderedMap.prototype.union = function(e) { - var r = this; - e.forEach((function(e) { - r.setElement(e[0], e[1]); - })); - return this._; - }; - OrderedMap.prototype[Symbol.iterator] = function() { - var e, r, t, i; - return __generator(this, (function(n) { - switch (n.label) { - case 0: - e = this._; - r = this.P(); - t = 0; - n.label = 1; - - case 1: - if (!(t < e)) return [ 3, 4 ]; - i = r[t]; - return [ 4, [ i.u, i.o ] ]; - - case 2: - n.sent(); - n.label = 3; - - case 3: - ++t; - return [ 3, 1 ]; - - case 4: - return [ 2 ]; - } - })); - }; - return OrderedMap; -}(TreeContainer); - -export { OrderedMap }; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@js-sdsl/ordered-map/dist/esm/index.js.map b/node_modules/@js-sdsl/ordered-map/dist/esm/index.js.map deleted file mode 100644 index 3b8a588..0000000 --- a/node_modules/@js-sdsl/ordered-map/dist/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../../../../node_modules/tslib/tslib.es6.js","index.js","../../../.build-data/copied-source/src/container/TreeContainer/Base/TreeNode.ts","../../../.build-data/copied-source/src/container/ContainerBase/index.ts","../../../.build-data/copied-source/src/utils/throwError.ts","../../../.build-data/copied-source/src/container/TreeContainer/Base/index.ts","../../../.build-data/copied-source/src/container/TreeContainer/Base/TreeIterator.ts","../../../.build-data/copied-source/src/container/TreeContainer/OrderedMap.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__extends","TypeError","String","__","this","constructor","create","__generator","thisArg","body","_","label","sent","t","trys","ops","f","y","g","next","verb","throw","return","Symbol","iterator","n","v","step","op","done","value","pop","length","push","e","SuppressedError","error","suppressed","message","Error","name","TreeNode","key","color","_left","undefined","_right","_parent","_key","_value","_color","_pre","preNode","isRootOrHeader","pre","_next","nextNode","_rotateLeft","PP","V","R","_rotateRight","F","K","TreeNodeEnableIndex","_super","_this","apply","arguments","_subTreeSize","parent","_recount","ContainerIterator","iteratorType","equals","iter","_node","Base","_length","defineProperty","get","enumerable","configurable","size","empty","Container","throwIteratorAccessError","RangeError","TreeContainer","cmp","enableIndex","x","_root","_cmp","_TreeNodeClass","_header","_lowerBound","curNode","resNode","cmpResult","_upperBound","_reverseLowerBound","_reverseUpperBound","_eraseNodeSelfBalance","parentNode","brother","_eraseNode","clear","swapNode","_inOrderTraversal","param","pos","callback","nodeList","index","stack","_insertNodeSelfBalance","grandParent","uncle","GP","_set","hint","minNode","compareToMin","maxNode","compareToMax","iterNode","iterCmpRes","preCmpRes","parent_1","_getTreeNodeByKey","updateKeyByIterator","node","nextKey","preKey","eraseElementByPos","eraseElementByKey","eraseElementByIterator","hasNoRight","isNormal","getHeight","traversal","Math","max","TreeIterator","header","root","isAccessible","OrderedMapIterator","container","self","Proxy","target","prop","set","newValue","copy","OrderedMap","forEach","el","setElement","begin","end","rBegin","rEnd","front","back","lowerBound","upperBound","reverseLowerBound","reverseUpperBound","map","getElementByPos","find","getElementByKey","union","other","i","_a"],"mappings":"AAgBA,IAAIA,gBAAgB,SAASC,GAAGC;IAC5BF,gBAAgBG,OAAOC,kBAClB;QAAEC,WAAW;iBAAgBC,SAAS,SAAUL,GAAGC;QAAKD,EAAEI,YAAYH;AAAG,SAC1E,SAAUD,GAAGC;QAAK,KAAK,IAAIK,KAAKL,GAAG,IAAIC,OAAOK,UAAUC,eAAeC,KAAKR,GAAGK,IAAIN,EAAE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36BAyJ,WAAehK,UAAAiL,kBAAf,SAAgBpI;QACd,IAAMuD,IAAU7F,KAAK8H,EAAkB9H,KAAKwF,GAAOlD;QACnD,OAAOuD,EAAQhD;ANm7BjB;IMj7BA4G,WAAKhK,UAAAkL,QAAL,SAAMC;QACJ,IAAM1B,IAAOlJ;QACb4K,EAAMlB,SAAQ,SAAUC;YACtBT,EAAKU,WAAWD,EAAG,IAAIA,EAAG;AAC3B;QACD,OAAO3J,KAAK0E;ANm7Bd;IMj7BE+E,WAAAhK,UAAC0B,OAAOC,YAAV;QNm7BE,IAAIQ,GAAQiF,GAAUgE,GAAG7C;QACzB,OAAO7H,YAAYH,OAAM,SAAU8K;YACjC,QAAQA,EAAGvK;cACT,KAAK;gBMr7BHqB,IAAS5B,KAAK0E;gBACdmC,IAAW7G,KAAKyG;gBACboE,IAAI;gBNu7BPC,EAAGvK,QAAQ;;cACb,KAAK;gBACH,MMz7BUsK,IAAIjJ,IAAM,OAAA,EAAA,GAAA;gBAClBoG,IAAOnB,EAASgE;gBACtB,OAAc,EAAA,GAAA,EAAC7C,EAAKpF,GAAMoF,EAAKnF;;cN07B7B,KAAK;gBM17BPiI,EAAAtK;gBN47BIsK,EAAGvK,QAAQ;;cACb,KAAK;kBM/7BqBsK;gBNi8BxB,OAAO,EAAC,GAAa;;cACvB,KAAK;gBACH,OAAO,EAAC;;AAEd;AACF;IM/7BF,OAACpB;AAAD,CAzHA,CAA+BrE;;SN6jCtBqE","file":"index.js","sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends,\r\n __assign,\r\n __rest,\r\n __decorate,\r\n __param,\r\n __metadata,\r\n __awaiter,\r\n __generator,\r\n __createBinding,\r\n __exportStar,\r\n __values,\r\n __read,\r\n __spread,\r\n __spreadArrays,\r\n __spreadArray,\r\n __await,\r\n __asyncGenerator,\r\n __asyncDelegator,\r\n __asyncValues,\r\n __makeTemplateObject,\r\n __importStar,\r\n __importDefault,\r\n __classPrivateFieldGet,\r\n __classPrivateFieldSet,\r\n __classPrivateFieldIn,\r\n __addDisposableResource,\r\n __disposeResources,\r\n};\r\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n};\nfunction __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nfunction __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nvar TreeNode = /** @class */function () {\n function TreeNode(key, value, color) {\n if (color === void 0) {\n color = 1 /* TreeNodeColor.RED */;\n }\n this._left = undefined;\n this._right = undefined;\n this._parent = undefined;\n this._key = key;\n this._value = value;\n this._color = color;\n }\n /**\n * @description Get the pre node.\n * @returns TreeNode about the pre node.\n */\n TreeNode.prototype._pre = function () {\n var preNode = this;\n var isRootOrHeader = preNode._parent._parent === preNode;\n if (isRootOrHeader && preNode._color === 1 /* TreeNodeColor.RED */) {\n preNode = preNode._right;\n } else if (preNode._left) {\n preNode = preNode._left;\n while (preNode._right) {\n preNode = preNode._right;\n }\n } else {\n // Must be root and left is null\n if (isRootOrHeader) {\n return preNode._parent;\n }\n var pre = preNode._parent;\n while (pre._left === preNode) {\n preNode = pre;\n pre = preNode._parent;\n }\n preNode = pre;\n }\n return preNode;\n };\n /**\n * @description Get the next node.\n * @returns TreeNode about the next node.\n */\n TreeNode.prototype._next = function () {\n var nextNode = this;\n if (nextNode._right) {\n nextNode = nextNode._right;\n while (nextNode._left) {\n nextNode = nextNode._left;\n }\n return nextNode;\n } else {\n var pre = nextNode._parent;\n while (pre._right === nextNode) {\n nextNode = pre;\n pre = nextNode._parent;\n }\n if (nextNode._right !== pre) {\n return pre;\n } else return nextNode;\n }\n };\n /**\n * @description Rotate left.\n * @returns TreeNode about moved to original position after rotation.\n */\n TreeNode.prototype._rotateLeft = function () {\n var PP = this._parent;\n var V = this._right;\n var R = V._left;\n if (PP._parent === this) PP._parent = V;else if (PP._left === this) PP._left = V;else PP._right = V;\n V._parent = PP;\n V._left = this;\n this._parent = V;\n this._right = R;\n if (R) R._parent = this;\n return V;\n };\n /**\n * @description Rotate right.\n * @returns TreeNode about moved to original position after rotation.\n */\n TreeNode.prototype._rotateRight = function () {\n var PP = this._parent;\n var F = this._left;\n var K = F._right;\n if (PP._parent === this) PP._parent = F;else if (PP._left === this) PP._left = F;else PP._right = F;\n F._parent = PP;\n F._right = this;\n this._parent = F;\n this._left = K;\n if (K) K._parent = this;\n return F;\n };\n return TreeNode;\n}();\nvar TreeNodeEnableIndex = /** @class */function (_super) {\n __extends(TreeNodeEnableIndex, _super);\n function TreeNodeEnableIndex() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._subTreeSize = 1;\n return _this;\n }\n /**\n * @description Rotate left and do recount.\n * @returns TreeNode about moved to original position after rotation.\n */\n TreeNodeEnableIndex.prototype._rotateLeft = function () {\n var parent = _super.prototype._rotateLeft.call(this);\n this._recount();\n parent._recount();\n return parent;\n };\n /**\n * @description Rotate right and do recount.\n * @returns TreeNode about moved to original position after rotation.\n */\n TreeNodeEnableIndex.prototype._rotateRight = function () {\n var parent = _super.prototype._rotateRight.call(this);\n this._recount();\n parent._recount();\n return parent;\n };\n TreeNodeEnableIndex.prototype._recount = function () {\n this._subTreeSize = 1;\n if (this._left) {\n this._subTreeSize += this._left._subTreeSize;\n }\n if (this._right) {\n this._subTreeSize += this._right._subTreeSize;\n }\n };\n return TreeNodeEnableIndex;\n}(TreeNode);\n\nvar ContainerIterator = /** @class */function () {\n /**\n * @internal\n */\n function ContainerIterator(iteratorType) {\n if (iteratorType === void 0) {\n iteratorType = 0 /* IteratorType.NORMAL */;\n }\n this.iteratorType = iteratorType;\n }\n /**\n * @param iter - The other iterator you want to compare.\n * @returns Whether this equals to obj.\n * @example\n * container.find(1).equals(container.end());\n */\n ContainerIterator.prototype.equals = function (iter) {\n return this._node === iter._node;\n };\n return ContainerIterator;\n}();\nvar Base = /** @class */function () {\n function Base() {\n /**\n * @description Container's size.\n * @internal\n */\n this._length = 0;\n }\n Object.defineProperty(Base.prototype, \"length\", {\n /**\n * @returns The size of the container.\n * @example\n * const container = new Vector([1, 2]);\n * console.log(container.length); // 2\n */\n get: function () {\n return this._length;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * @returns The size of the container.\n * @example\n * const container = new Vector([1, 2]);\n * console.log(container.size()); // 2\n */\n Base.prototype.size = function () {\n return this._length;\n };\n /**\n * @returns Whether the container is empty.\n * @example\n * container.clear();\n * console.log(container.empty()); // true\n */\n Base.prototype.empty = function () {\n return this._length === 0;\n };\n return Base;\n}();\nvar Container = /** @class */function (_super) {\n __extends(Container, _super);\n function Container() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Container;\n}(Base);\n\n/**\n * @description Throw an iterator access error.\n * @internal\n */\nfunction throwIteratorAccessError() {\n throw new RangeError('Iterator access denied!');\n}\n\nvar TreeContainer = /** @class */function (_super) {\n __extends(TreeContainer, _super);\n /**\n * @internal\n */\n function TreeContainer(cmp, enableIndex) {\n if (cmp === void 0) {\n cmp = function (x, y) {\n if (x < y) return -1;\n if (x > y) return 1;\n return 0;\n };\n }\n if (enableIndex === void 0) {\n enableIndex = false;\n }\n var _this = _super.call(this) || this;\n /**\n * @internal\n */\n _this._root = undefined;\n _this._cmp = cmp;\n _this.enableIndex = enableIndex;\n _this._TreeNodeClass = enableIndex ? TreeNodeEnableIndex : TreeNode;\n _this._header = new _this._TreeNodeClass();\n return _this;\n }\n /**\n * @internal\n */\n TreeContainer.prototype._lowerBound = function (curNode, key) {\n var resNode = this._header;\n while (curNode) {\n var cmpResult = this._cmp(curNode._key, key);\n if (cmpResult < 0) {\n curNode = curNode._right;\n } else if (cmpResult > 0) {\n resNode = curNode;\n curNode = curNode._left;\n } else return curNode;\n }\n return resNode;\n };\n /**\n * @internal\n */\n TreeContainer.prototype._upperBound = function (curNode, key) {\n var resNode = this._header;\n while (curNode) {\n var cmpResult = this._cmp(curNode._key, key);\n if (cmpResult <= 0) {\n curNode = curNode._right;\n } else {\n resNode = curNode;\n curNode = curNode._left;\n }\n }\n return resNode;\n };\n /**\n * @internal\n */\n TreeContainer.prototype._reverseLowerBound = function (curNode, key) {\n var resNode = this._header;\n while (curNode) {\n var cmpResult = this._cmp(curNode._key, key);\n if (cmpResult < 0) {\n resNode = curNode;\n curNode = curNode._right;\n } else if (cmpResult > 0) {\n curNode = curNode._left;\n } else return curNode;\n }\n return resNode;\n };\n /**\n * @internal\n */\n TreeContainer.prototype._reverseUpperBound = function (curNode, key) {\n var resNode = this._header;\n while (curNode) {\n var cmpResult = this._cmp(curNode._key, key);\n if (cmpResult < 0) {\n resNode = curNode;\n curNode = curNode._right;\n } else {\n curNode = curNode._left;\n }\n }\n return resNode;\n };\n /**\n * @internal\n */\n TreeContainer.prototype._eraseNodeSelfBalance = function (curNode) {\n while (true) {\n var parentNode = curNode._parent;\n if (parentNode === this._header) return;\n if (curNode._color === 1 /* TreeNodeColor.RED */) {\n curNode._color = 0 /* TreeNodeColor.BLACK */;\n return;\n }\n if (curNode === parentNode._left) {\n var brother = parentNode._right;\n if (brother._color === 1 /* TreeNodeColor.RED */) {\n brother._color = 0 /* TreeNodeColor.BLACK */;\n parentNode._color = 1 /* TreeNodeColor.RED */;\n if (parentNode === this._root) {\n this._root = parentNode._rotateLeft();\n } else parentNode._rotateLeft();\n } else {\n if (brother._right && brother._right._color === 1 /* TreeNodeColor.RED */) {\n brother._color = parentNode._color;\n parentNode._color = 0 /* TreeNodeColor.BLACK */;\n brother._right._color = 0 /* TreeNodeColor.BLACK */;\n if (parentNode === this._root) {\n this._root = parentNode._rotateLeft();\n } else parentNode._rotateLeft();\n return;\n } else if (brother._left && brother._left._color === 1 /* TreeNodeColor.RED */) {\n brother._color = 1 /* TreeNodeColor.RED */;\n brother._left._color = 0 /* TreeNodeColor.BLACK */;\n brother._rotateRight();\n } else {\n brother._color = 1 /* TreeNodeColor.RED */;\n curNode = parentNode;\n }\n }\n } else {\n var brother = parentNode._left;\n if (brother._color === 1 /* TreeNodeColor.RED */) {\n brother._color = 0 /* TreeNodeColor.BLACK */;\n parentNode._color = 1 /* TreeNodeColor.RED */;\n if (parentNode === this._root) {\n this._root = parentNode._rotateRight();\n } else parentNode._rotateRight();\n } else {\n if (brother._left && brother._left._color === 1 /* TreeNodeColor.RED */) {\n brother._color = parentNode._color;\n parentNode._color = 0 /* TreeNodeColor.BLACK */;\n brother._left._color = 0 /* TreeNodeColor.BLACK */;\n if (parentNode === this._root) {\n this._root = parentNode._rotateRight();\n } else parentNode._rotateRight();\n return;\n } else if (brother._right && brother._right._color === 1 /* TreeNodeColor.RED */) {\n brother._color = 1 /* TreeNodeColor.RED */;\n brother._right._color = 0 /* TreeNodeColor.BLACK */;\n brother._rotateLeft();\n } else {\n brother._color = 1 /* TreeNodeColor.RED */;\n curNode = parentNode;\n }\n }\n }\n }\n };\n /**\n * @internal\n */\n TreeContainer.prototype._eraseNode = function (curNode) {\n if (this._length === 1) {\n this.clear();\n return;\n }\n var swapNode = curNode;\n while (swapNode._left || swapNode._right) {\n if (swapNode._right) {\n swapNode = swapNode._right;\n while (swapNode._left) swapNode = swapNode._left;\n } else {\n swapNode = swapNode._left;\n }\n var key = curNode._key;\n curNode._key = swapNode._key;\n swapNode._key = key;\n var value = curNode._value;\n curNode._value = swapNode._value;\n swapNode._value = value;\n curNode = swapNode;\n }\n if (this._header._left === swapNode) {\n this._header._left = swapNode._parent;\n } else if (this._header._right === swapNode) {\n this._header._right = swapNode._parent;\n }\n this._eraseNodeSelfBalance(swapNode);\n var _parent = swapNode._parent;\n if (swapNode === _parent._left) {\n _parent._left = undefined;\n } else _parent._right = undefined;\n this._length -= 1;\n this._root._color = 0 /* TreeNodeColor.BLACK */;\n if (this.enableIndex) {\n while (_parent !== this._header) {\n _parent._subTreeSize -= 1;\n _parent = _parent._parent;\n }\n }\n };\n /**\n * @internal\n */\n TreeContainer.prototype._inOrderTraversal = function (param) {\n var pos = typeof param === 'number' ? param : undefined;\n var callback = typeof param === 'function' ? param : undefined;\n var nodeList = typeof param === 'undefined' ? [] : undefined;\n var index = 0;\n var curNode = this._root;\n var stack = [];\n while (stack.length || curNode) {\n if (curNode) {\n stack.push(curNode);\n curNode = curNode._left;\n } else {\n curNode = stack.pop();\n if (index === pos) return curNode;\n nodeList && nodeList.push(curNode);\n callback && callback(curNode, index, this);\n index += 1;\n curNode = curNode._right;\n }\n }\n return nodeList;\n };\n /**\n * @internal\n */\n TreeContainer.prototype._insertNodeSelfBalance = function (curNode) {\n while (true) {\n var parentNode = curNode._parent;\n if (parentNode._color === 0 /* TreeNodeColor.BLACK */) return;\n var grandParent = parentNode._parent;\n if (parentNode === grandParent._left) {\n var uncle = grandParent._right;\n if (uncle && uncle._color === 1 /* TreeNodeColor.RED */) {\n uncle._color = parentNode._color = 0 /* TreeNodeColor.BLACK */;\n if (grandParent === this._root) return;\n grandParent._color = 1 /* TreeNodeColor.RED */;\n curNode = grandParent;\n continue;\n } else if (curNode === parentNode._right) {\n curNode._color = 0 /* TreeNodeColor.BLACK */;\n if (curNode._left) {\n curNode._left._parent = parentNode;\n }\n if (curNode._right) {\n curNode._right._parent = grandParent;\n }\n parentNode._right = curNode._left;\n grandParent._left = curNode._right;\n curNode._left = parentNode;\n curNode._right = grandParent;\n if (grandParent === this._root) {\n this._root = curNode;\n this._header._parent = curNode;\n } else {\n var GP = grandParent._parent;\n if (GP._left === grandParent) {\n GP._left = curNode;\n } else GP._right = curNode;\n }\n curNode._parent = grandParent._parent;\n parentNode._parent = curNode;\n grandParent._parent = curNode;\n grandParent._color = 1 /* TreeNodeColor.RED */;\n } else {\n parentNode._color = 0 /* TreeNodeColor.BLACK */;\n if (grandParent === this._root) {\n this._root = grandParent._rotateRight();\n } else grandParent._rotateRight();\n grandParent._color = 1 /* TreeNodeColor.RED */;\n return;\n }\n } else {\n var uncle = grandParent._left;\n if (uncle && uncle._color === 1 /* TreeNodeColor.RED */) {\n uncle._color = parentNode._color = 0 /* TreeNodeColor.BLACK */;\n if (grandParent === this._root) return;\n grandParent._color = 1 /* TreeNodeColor.RED */;\n curNode = grandParent;\n continue;\n } else if (curNode === parentNode._left) {\n curNode._color = 0 /* TreeNodeColor.BLACK */;\n if (curNode._left) {\n curNode._left._parent = grandParent;\n }\n if (curNode._right) {\n curNode._right._parent = parentNode;\n }\n grandParent._right = curNode._left;\n parentNode._left = curNode._right;\n curNode._left = grandParent;\n curNode._right = parentNode;\n if (grandParent === this._root) {\n this._root = curNode;\n this._header._parent = curNode;\n } else {\n var GP = grandParent._parent;\n if (GP._left === grandParent) {\n GP._left = curNode;\n } else GP._right = curNode;\n }\n curNode._parent = grandParent._parent;\n parentNode._parent = curNode;\n grandParent._parent = curNode;\n grandParent._color = 1 /* TreeNodeColor.RED */;\n } else {\n parentNode._color = 0 /* TreeNodeColor.BLACK */;\n if (grandParent === this._root) {\n this._root = grandParent._rotateLeft();\n } else grandParent._rotateLeft();\n grandParent._color = 1 /* TreeNodeColor.RED */;\n return;\n }\n }\n if (this.enableIndex) {\n parentNode._recount();\n grandParent._recount();\n curNode._recount();\n }\n return;\n }\n };\n /**\n * @internal\n */\n TreeContainer.prototype._set = function (key, value, hint) {\n if (this._root === undefined) {\n this._length += 1;\n this._root = new this._TreeNodeClass(key, value, 0 /* TreeNodeColor.BLACK */);\n this._root._parent = this._header;\n this._header._parent = this._header._left = this._header._right = this._root;\n return this._length;\n }\n var curNode;\n var minNode = this._header._left;\n var compareToMin = this._cmp(minNode._key, key);\n if (compareToMin === 0) {\n minNode._value = value;\n return this._length;\n } else if (compareToMin > 0) {\n minNode._left = new this._TreeNodeClass(key, value);\n minNode._left._parent = minNode;\n curNode = minNode._left;\n this._header._left = curNode;\n } else {\n var maxNode = this._header._right;\n var compareToMax = this._cmp(maxNode._key, key);\n if (compareToMax === 0) {\n maxNode._value = value;\n return this._length;\n } else if (compareToMax < 0) {\n maxNode._right = new this._TreeNodeClass(key, value);\n maxNode._right._parent = maxNode;\n curNode = maxNode._right;\n this._header._right = curNode;\n } else {\n if (hint !== undefined) {\n var iterNode = hint._node;\n if (iterNode !== this._header) {\n var iterCmpRes = this._cmp(iterNode._key, key);\n if (iterCmpRes === 0) {\n iterNode._value = value;\n return this._length;\n } else /* istanbul ignore else */if (iterCmpRes > 0) {\n var preNode = iterNode._pre();\n var preCmpRes = this._cmp(preNode._key, key);\n if (preCmpRes === 0) {\n preNode._value = value;\n return this._length;\n } else if (preCmpRes < 0) {\n curNode = new this._TreeNodeClass(key, value);\n if (preNode._right === undefined) {\n preNode._right = curNode;\n curNode._parent = preNode;\n } else {\n iterNode._left = curNode;\n curNode._parent = iterNode;\n }\n }\n }\n }\n }\n if (curNode === undefined) {\n curNode = this._root;\n while (true) {\n var cmpResult = this._cmp(curNode._key, key);\n if (cmpResult > 0) {\n if (curNode._left === undefined) {\n curNode._left = new this._TreeNodeClass(key, value);\n curNode._left._parent = curNode;\n curNode = curNode._left;\n break;\n }\n curNode = curNode._left;\n } else if (cmpResult < 0) {\n if (curNode._right === undefined) {\n curNode._right = new this._TreeNodeClass(key, value);\n curNode._right._parent = curNode;\n curNode = curNode._right;\n break;\n }\n curNode = curNode._right;\n } else {\n curNode._value = value;\n return this._length;\n }\n }\n }\n }\n }\n if (this.enableIndex) {\n var parent_1 = curNode._parent;\n while (parent_1 !== this._header) {\n parent_1._subTreeSize += 1;\n parent_1 = parent_1._parent;\n }\n }\n this._insertNodeSelfBalance(curNode);\n this._length += 1;\n return this._length;\n };\n /**\n * @internal\n */\n TreeContainer.prototype._getTreeNodeByKey = function (curNode, key) {\n while (curNode) {\n var cmpResult = this._cmp(curNode._key, key);\n if (cmpResult < 0) {\n curNode = curNode._right;\n } else if (cmpResult > 0) {\n curNode = curNode._left;\n } else return curNode;\n }\n return curNode || this._header;\n };\n TreeContainer.prototype.clear = function () {\n this._length = 0;\n this._root = undefined;\n this._header._parent = undefined;\n this._header._left = this._header._right = undefined;\n };\n /**\n * @description Update node's key by iterator.\n * @param iter - The iterator you want to change.\n * @param key - The key you want to update.\n * @returns Whether the modification is successful.\n * @example\n * const st = new orderedSet([1, 2, 5]);\n * const iter = st.find(2);\n * st.updateKeyByIterator(iter, 3); // then st will become [1, 3, 5]\n */\n TreeContainer.prototype.updateKeyByIterator = function (iter, key) {\n var node = iter._node;\n if (node === this._header) {\n throwIteratorAccessError();\n }\n if (this._length === 1) {\n node._key = key;\n return true;\n }\n var nextKey = node._next()._key;\n if (node === this._header._left) {\n if (this._cmp(nextKey, key) > 0) {\n node._key = key;\n return true;\n }\n return false;\n }\n var preKey = node._pre()._key;\n if (node === this._header._right) {\n if (this._cmp(preKey, key) < 0) {\n node._key = key;\n return true;\n }\n return false;\n }\n if (this._cmp(preKey, key) >= 0 || this._cmp(nextKey, key) <= 0) return false;\n node._key = key;\n return true;\n };\n TreeContainer.prototype.eraseElementByPos = function (pos) {\n if (pos < 0 || pos > this._length - 1) {\n throw new RangeError();\n }\n var node = this._inOrderTraversal(pos);\n this._eraseNode(node);\n return this._length;\n };\n /**\n * @description Remove the element of the specified key.\n * @param key - The key you want to remove.\n * @returns Whether erase successfully.\n */\n TreeContainer.prototype.eraseElementByKey = function (key) {\n if (this._length === 0) return false;\n var curNode = this._getTreeNodeByKey(this._root, key);\n if (curNode === this._header) return false;\n this._eraseNode(curNode);\n return true;\n };\n TreeContainer.prototype.eraseElementByIterator = function (iter) {\n var node = iter._node;\n if (node === this._header) {\n throwIteratorAccessError();\n }\n var hasNoRight = node._right === undefined;\n var isNormal = iter.iteratorType === 0 /* IteratorType.NORMAL */;\n // For the normal iterator, the `next` node will be swapped to `this` node when has right.\n if (isNormal) {\n // So we should move it to next when it's right is null.\n if (hasNoRight) iter.next();\n } else {\n // For the reverse iterator, only when it doesn't have right and has left the `next` node will be swapped.\n // So when it has right, or it is a leaf node we should move it to `next`.\n if (!hasNoRight || node._left === undefined) iter.next();\n }\n this._eraseNode(node);\n return iter;\n };\n /**\n * @description Get the height of the tree.\n * @returns Number about the height of the RB-tree.\n */\n TreeContainer.prototype.getHeight = function () {\n if (this._length === 0) return 0;\n function traversal(curNode) {\n if (!curNode) return 0;\n return Math.max(traversal(curNode._left), traversal(curNode._right)) + 1;\n }\n return traversal(this._root);\n };\n return TreeContainer;\n}(Container);\n\nvar TreeIterator = /** @class */function (_super) {\n __extends(TreeIterator, _super);\n /**\n * @internal\n */\n function TreeIterator(node, header, iteratorType) {\n var _this = _super.call(this, iteratorType) || this;\n _this._node = node;\n _this._header = header;\n if (_this.iteratorType === 0 /* IteratorType.NORMAL */) {\n _this.pre = function () {\n if (this._node === this._header._left) {\n throwIteratorAccessError();\n }\n this._node = this._node._pre();\n return this;\n };\n _this.next = function () {\n if (this._node === this._header) {\n throwIteratorAccessError();\n }\n this._node = this._node._next();\n return this;\n };\n } else {\n _this.pre = function () {\n if (this._node === this._header._right) {\n throwIteratorAccessError();\n }\n this._node = this._node._next();\n return this;\n };\n _this.next = function () {\n if (this._node === this._header) {\n throwIteratorAccessError();\n }\n this._node = this._node._pre();\n return this;\n };\n }\n return _this;\n }\n Object.defineProperty(TreeIterator.prototype, \"index\", {\n /**\n * @description Get the sequential index of the iterator in the tree container.
\n * Note:\n * This function only takes effect when the specified tree container `enableIndex = true`.\n * @returns The index subscript of the node in the tree.\n * @example\n * const st = new OrderedSet([1, 2, 3], true);\n * console.log(st.begin().next().index); // 1\n */\n get: function () {\n var _node = this._node;\n var root = this._header._parent;\n if (_node === this._header) {\n if (root) {\n return root._subTreeSize - 1;\n }\n return 0;\n }\n var index = 0;\n if (_node._left) {\n index += _node._left._subTreeSize;\n }\n while (_node !== root) {\n var _parent = _node._parent;\n if (_node === _parent._right) {\n index += 1;\n if (_parent._left) {\n index += _parent._left._subTreeSize;\n }\n }\n _node = _parent;\n }\n return index;\n },\n enumerable: false,\n configurable: true\n });\n TreeIterator.prototype.isAccessible = function () {\n return this._node !== this._header;\n };\n return TreeIterator;\n}(ContainerIterator);\n\nvar OrderedMapIterator = /** @class */function (_super) {\n __extends(OrderedMapIterator, _super);\n function OrderedMapIterator(node, header, container, iteratorType) {\n var _this = _super.call(this, node, header, iteratorType) || this;\n _this.container = container;\n return _this;\n }\n Object.defineProperty(OrderedMapIterator.prototype, \"pointer\", {\n get: function () {\n if (this._node === this._header) {\n throwIteratorAccessError();\n }\n var self = this;\n return new Proxy([], {\n get: function (target, prop) {\n if (prop === '0') return self._node._key;else if (prop === '1') return self._node._value;\n target[0] = self._node._key;\n target[1] = self._node._value;\n return target[prop];\n },\n set: function (_, prop, newValue) {\n if (prop !== '1') {\n throw new TypeError('prop must be 1');\n }\n self._node._value = newValue;\n return true;\n }\n });\n },\n enumerable: false,\n configurable: true\n });\n OrderedMapIterator.prototype.copy = function () {\n return new OrderedMapIterator(this._node, this._header, this.container, this.iteratorType);\n };\n return OrderedMapIterator;\n}(TreeIterator);\nvar OrderedMap = /** @class */function (_super) {\n __extends(OrderedMap, _super);\n /**\n * @param container - The initialization container.\n * @param cmp - The compare function.\n * @param enableIndex - Whether to enable iterator indexing function.\n * @example\n * new OrderedMap();\n * new OrderedMap([[0, 1], [2, 1]]);\n * new OrderedMap([[0, 1], [2, 1]], (x, y) => x - y);\n * new OrderedMap([[0, 1], [2, 1]], (x, y) => x - y, true);\n */\n function OrderedMap(container, cmp, enableIndex) {\n if (container === void 0) {\n container = [];\n }\n var _this = _super.call(this, cmp, enableIndex) || this;\n var self = _this;\n container.forEach(function (el) {\n self.setElement(el[0], el[1]);\n });\n return _this;\n }\n OrderedMap.prototype.begin = function () {\n return new OrderedMapIterator(this._header._left || this._header, this._header, this);\n };\n OrderedMap.prototype.end = function () {\n return new OrderedMapIterator(this._header, this._header, this);\n };\n OrderedMap.prototype.rBegin = function () {\n return new OrderedMapIterator(this._header._right || this._header, this._header, this, 1 /* IteratorType.REVERSE */);\n };\n\n OrderedMap.prototype.rEnd = function () {\n return new OrderedMapIterator(this._header, this._header, this, 1 /* IteratorType.REVERSE */);\n };\n\n OrderedMap.prototype.front = function () {\n if (this._length === 0) return;\n var minNode = this._header._left;\n return [minNode._key, minNode._value];\n };\n OrderedMap.prototype.back = function () {\n if (this._length === 0) return;\n var maxNode = this._header._right;\n return [maxNode._key, maxNode._value];\n };\n OrderedMap.prototype.lowerBound = function (key) {\n var resNode = this._lowerBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n };\n OrderedMap.prototype.upperBound = function (key) {\n var resNode = this._upperBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n };\n OrderedMap.prototype.reverseLowerBound = function (key) {\n var resNode = this._reverseLowerBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n };\n OrderedMap.prototype.reverseUpperBound = function (key) {\n var resNode = this._reverseUpperBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n };\n OrderedMap.prototype.forEach = function (callback) {\n this._inOrderTraversal(function (node, index, map) {\n callback([node._key, node._value], index, map);\n });\n };\n /**\n * @description Insert a key-value pair or set value by the given key.\n * @param key - The key want to insert.\n * @param value - The value want to set.\n * @param hint - You can give an iterator hint to improve insertion efficiency.\n * @return The size of container after setting.\n * @example\n * const mp = new OrderedMap([[2, 0], [4, 0], [5, 0]]);\n * const iter = mp.begin();\n * mp.setElement(1, 0);\n * mp.setElement(3, 0, iter); // give a hint will be faster.\n */\n OrderedMap.prototype.setElement = function (key, value, hint) {\n return this._set(key, value, hint);\n };\n OrderedMap.prototype.getElementByPos = function (pos) {\n if (pos < 0 || pos > this._length - 1) {\n throw new RangeError();\n }\n var node = this._inOrderTraversal(pos);\n return [node._key, node._value];\n };\n OrderedMap.prototype.find = function (key) {\n var curNode = this._getTreeNodeByKey(this._root, key);\n return new OrderedMapIterator(curNode, this._header, this);\n };\n /**\n * @description Get the value of the element of the specified key.\n * @param key - The specified key you want to get.\n * @example\n * const val = container.getElementByKey(1);\n */\n OrderedMap.prototype.getElementByKey = function (key) {\n var curNode = this._getTreeNodeByKey(this._root, key);\n return curNode._value;\n };\n OrderedMap.prototype.union = function (other) {\n var self = this;\n other.forEach(function (el) {\n self.setElement(el[0], el[1]);\n });\n return this._length;\n };\n OrderedMap.prototype[Symbol.iterator] = function () {\n var length, nodeList, i, node;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n length = this._length;\n nodeList = this._inOrderTraversal();\n i = 0;\n _a.label = 1;\n case 1:\n if (!(i < length)) return [3 /*break*/, 4];\n node = nodeList[i];\n return [4 /*yield*/, [node._key, node._value]];\n case 2:\n _a.sent();\n _a.label = 3;\n case 3:\n ++i;\n return [3 /*break*/, 1];\n case 4:\n return [2 /*return*/];\n }\n });\n };\n\n return OrderedMap;\n}(TreeContainer);\n\nexport { OrderedMap };\n//# sourceMappingURL=index.js.map\n","export const enum TreeNodeColor {\n RED = 1,\n BLACK = 0\n}\n\nexport class TreeNode {\n _color: TreeNodeColor;\n _key: K | undefined;\n _value: V | undefined;\n _left: TreeNode | undefined = undefined;\n _right: TreeNode | undefined = undefined;\n _parent: TreeNode | undefined = undefined;\n constructor(\n key?: K,\n value?: V,\n color: TreeNodeColor = TreeNodeColor.RED\n ) {\n this._key = key;\n this._value = value;\n this._color = color;\n }\n /**\n * @description Get the pre node.\n * @returns TreeNode about the pre node.\n */\n _pre() {\n let preNode: TreeNode = this;\n const isRootOrHeader = preNode._parent!._parent === preNode;\n if (isRootOrHeader && preNode._color === TreeNodeColor.RED) {\n preNode = preNode._right!;\n } else if (preNode._left) {\n preNode = preNode._left;\n while (preNode._right) {\n preNode = preNode._right;\n }\n } else {\n // Must be root and left is null\n if (isRootOrHeader) {\n return preNode._parent!;\n }\n let pre = preNode._parent!;\n while (pre._left === preNode) {\n preNode = pre;\n pre = preNode._parent!;\n }\n preNode = pre;\n }\n return preNode;\n }\n /**\n * @description Get the next node.\n * @returns TreeNode about the next node.\n */\n _next() {\n let nextNode: TreeNode = this;\n if (nextNode._right) {\n nextNode = nextNode._right;\n while (nextNode._left) {\n nextNode = nextNode._left;\n }\n return nextNode;\n } else {\n let pre = nextNode._parent!;\n while (pre._right === nextNode) {\n nextNode = pre;\n pre = nextNode._parent!;\n }\n if (nextNode._right !== pre) {\n return pre;\n } else return nextNode;\n }\n }\n /**\n * @description Rotate left.\n * @returns TreeNode about moved to original position after rotation.\n */\n _rotateLeft() {\n const PP = this._parent!;\n const V = this._right!;\n const R = V._left;\n\n if (PP._parent === this) PP._parent = V;\n else if (PP._left === this) PP._left = V;\n else PP._right = V;\n\n V._parent = PP;\n V._left = this;\n\n this._parent = V;\n this._right = R;\n\n if (R) R._parent = this;\n\n return V;\n }\n /**\n * @description Rotate right.\n * @returns TreeNode about moved to original position after rotation.\n */\n _rotateRight() {\n const PP = this._parent!;\n const F = this._left!;\n const K = F._right;\n\n if (PP._parent === this) PP._parent = F;\n else if (PP._left === this) PP._left = F;\n else PP._right = F;\n\n F._parent = PP;\n F._right = this;\n\n this._parent = F;\n this._left = K;\n\n if (K) K._parent = this;\n\n return F;\n }\n}\n\nexport class TreeNodeEnableIndex extends TreeNode {\n _subTreeSize = 1;\n /**\n * @description Rotate left and do recount.\n * @returns TreeNode about moved to original position after rotation.\n */\n _rotateLeft() {\n const parent = super._rotateLeft() as TreeNodeEnableIndex;\n this._recount();\n parent._recount();\n return parent;\n }\n /**\n * @description Rotate right and do recount.\n * @returns TreeNode about moved to original position after rotation.\n */\n _rotateRight() {\n const parent = super._rotateRight() as TreeNodeEnableIndex;\n this._recount();\n parent._recount();\n return parent;\n }\n _recount() {\n this._subTreeSize = 1;\n if (this._left) {\n this._subTreeSize += (this._left as TreeNodeEnableIndex)._subTreeSize;\n }\n if (this._right) {\n this._subTreeSize += (this._right as TreeNodeEnableIndex)._subTreeSize;\n }\n }\n}\n","/**\n * @description The iterator type including `NORMAL` and `REVERSE`.\n */\nexport const enum IteratorType {\n NORMAL = 0,\n REVERSE = 1\n}\n\nexport abstract class ContainerIterator {\n /**\n * @description The container pointed to by the iterator.\n */\n abstract readonly container: Container;\n /**\n * @internal\n */\n abstract _node: unknown;\n /**\n * @description Iterator's type.\n * @example\n * console.log(container.end().iteratorType === IteratorType.NORMAL); // true\n */\n readonly iteratorType: IteratorType;\n /**\n * @internal\n */\n protected constructor(iteratorType = IteratorType.NORMAL) {\n this.iteratorType = iteratorType;\n }\n /**\n * @param iter - The other iterator you want to compare.\n * @returns Whether this equals to obj.\n * @example\n * container.find(1).equals(container.end());\n */\n equals(iter: ContainerIterator) {\n return this._node === iter._node;\n }\n /**\n * @description Pointers to element.\n * @returns The value of the pointer's element.\n * @example\n * const val = container.begin().pointer;\n */\n abstract get pointer(): T;\n /**\n * @description Set pointer's value (some containers are unavailable).\n * @param newValue - The new value you want to set.\n * @example\n * (>container).begin().pointer = 1;\n */\n abstract set pointer(newValue: T);\n /**\n * @description Move `this` iterator to pre.\n * @returns The iterator's self.\n * @example\n * const iter = container.find(1); // container = [0, 1]\n * const pre = iter.pre();\n * console.log(pre === iter); // true\n * console.log(pre.equals(iter)); // true\n * console.log(pre.pointer, iter.pointer); // 0, 0\n */\n abstract pre(): this;\n /**\n * @description Move `this` iterator to next.\n * @returns The iterator's self.\n * @example\n * const iter = container.find(1); // container = [1, 2]\n * const next = iter.next();\n * console.log(next === iter); // true\n * console.log(next.equals(iter)); // true\n * console.log(next.pointer, iter.pointer); // 2, 2\n */\n abstract next(): this;\n /**\n * @description Get a copy of itself.\n * @returns The copy of self.\n * @example\n * const iter = container.find(1); // container = [1, 2]\n * const next = iter.copy().next();\n * console.log(next === iter); // false\n * console.log(next.equals(iter)); // false\n * console.log(next.pointer, iter.pointer); // 2, 1\n */\n abstract copy(): ContainerIterator;\n abstract isAccessible(): boolean;\n}\n\nexport abstract class Base {\n /**\n * @description Container's size.\n * @internal\n */\n protected _length = 0;\n /**\n * @returns The size of the container.\n * @example\n * const container = new Vector([1, 2]);\n * console.log(container.length); // 2\n */\n get length() {\n return this._length;\n }\n /**\n * @returns The size of the container.\n * @example\n * const container = new Vector([1, 2]);\n * console.log(container.size()); // 2\n */\n size() {\n return this._length;\n }\n /**\n * @returns Whether the container is empty.\n * @example\n * container.clear();\n * console.log(container.empty()); // true\n */\n empty() {\n return this._length === 0;\n }\n /**\n * @description Clear the container.\n * @example\n * container.clear();\n * console.log(container.empty()); // true\n */\n abstract clear(): void;\n}\n\nexport abstract class Container extends Base {\n /**\n * @returns Iterator pointing to the beginning element.\n * @example\n * const begin = container.begin();\n * const end = container.end();\n * for (const it = begin; !it.equals(end); it.next()) {\n * doSomething(it.pointer);\n * }\n */\n abstract begin(): ContainerIterator;\n /**\n * @returns Iterator pointing to the super end like c++.\n * @example\n * const begin = container.begin();\n * const end = container.end();\n * for (const it = begin; !it.equals(end); it.next()) {\n * doSomething(it.pointer);\n * }\n */\n abstract end(): ContainerIterator;\n /**\n * @returns Iterator pointing to the end element.\n * @example\n * const rBegin = container.rBegin();\n * const rEnd = container.rEnd();\n * for (const it = rBegin; !it.equals(rEnd); it.next()) {\n * doSomething(it.pointer);\n * }\n */\n abstract rBegin(): ContainerIterator;\n /**\n * @returns Iterator pointing to the super begin like c++.\n * @example\n * const rBegin = container.rBegin();\n * const rEnd = container.rEnd();\n * for (const it = rBegin; !it.equals(rEnd); it.next()) {\n * doSomething(it.pointer);\n * }\n */\n abstract rEnd(): ContainerIterator;\n /**\n * @returns The first element of the container.\n */\n abstract front(): T | undefined;\n /**\n * @returns The last element of the container.\n */\n abstract back(): T | undefined;\n /**\n * @param element - The element you want to find.\n * @returns An iterator pointing to the element if found, or super end if not found.\n * @example\n * container.find(1).equals(container.end());\n */\n abstract find(element: T): ContainerIterator;\n /**\n * @description Iterate over all elements in the container.\n * @param callback - Callback function like Array.forEach.\n * @example\n * container.forEach((element, index) => console.log(element, index));\n */\n abstract forEach(callback: (element: T, index: number, container: Container) => void): void;\n /**\n * @description Gets the value of the element at the specified position.\n * @example\n * const val = container.getElementByPos(-1); // throw a RangeError\n */\n abstract getElementByPos(pos: number): T;\n /**\n * @description Removes the element at the specified position.\n * @param pos - The element's position you want to remove.\n * @returns The container length after erasing.\n * @example\n * container.eraseElementByPos(-1); // throw a RangeError\n */\n abstract eraseElementByPos(pos: number): number;\n /**\n * @description Removes element by iterator and move `iter` to next.\n * @param iter - The iterator you want to erase.\n * @returns The next iterator.\n * @example\n * container.eraseElementByIterator(container.begin());\n * container.eraseElementByIterator(container.end()); // throw a RangeError\n */\n abstract eraseElementByIterator(\n iter: ContainerIterator\n ): ContainerIterator;\n /**\n * @description Using for `for...of` syntax like Array.\n * @example\n * for (const element of container) {\n * console.log(element);\n * }\n */\n abstract [Symbol.iterator](): Generator;\n}\n\n/**\n * @description The initial data type passed in when initializing the container.\n */\nexport type initContainer = {\n size?: number | (() => number);\n length?: number;\n forEach: (callback: (el: T) => void) => void;\n}\n","/**\n * @description Throw an iterator access error.\n * @internal\n */\nexport function throwIteratorAccessError() {\n throw new RangeError('Iterator access denied!');\n}\n","import type TreeIterator from './TreeIterator';\nimport { TreeNode, TreeNodeColor, TreeNodeEnableIndex } from './TreeNode';\nimport { Container, IteratorType } from '@/container/ContainerBase';\nimport $checkWithinAccessParams from '@/utils/checkParams.macro';\nimport { throwIteratorAccessError } from '@/utils/throwError';\n\nabstract class TreeContainer extends Container {\n enableIndex: boolean;\n /**\n * @internal\n */\n protected _header: TreeNode;\n /**\n * @internal\n */\n protected _root: TreeNode | undefined = undefined;\n /**\n * @internal\n */\n protected readonly _cmp: (x: K, y: K) => number;\n /**\n * @internal\n */\n protected readonly _TreeNodeClass: typeof TreeNode | typeof TreeNodeEnableIndex;\n /**\n * @internal\n */\n protected constructor(\n cmp: (x: K, y: K) => number =\n function (x: K, y: K) {\n if (x < y) return -1;\n if (x > y) return 1;\n return 0;\n },\n enableIndex = false\n ) {\n super();\n this._cmp = cmp;\n this.enableIndex = enableIndex;\n this._TreeNodeClass = enableIndex ? TreeNodeEnableIndex : TreeNode;\n this._header = new this._TreeNodeClass();\n }\n /**\n * @internal\n */\n protected _lowerBound(curNode: TreeNode | undefined, key: K) {\n let resNode = this._header;\n while (curNode) {\n const cmpResult = this._cmp(curNode._key!, key);\n if (cmpResult < 0) {\n curNode = curNode._right;\n } else if (cmpResult > 0) {\n resNode = curNode;\n curNode = curNode._left;\n } else return curNode;\n }\n return resNode;\n }\n /**\n * @internal\n */\n protected _upperBound(curNode: TreeNode | undefined, key: K) {\n let resNode = this._header;\n while (curNode) {\n const cmpResult = this._cmp(curNode._key!, key);\n if (cmpResult <= 0) {\n curNode = curNode._right;\n } else {\n resNode = curNode;\n curNode = curNode._left;\n }\n }\n return resNode;\n }\n /**\n * @internal\n */\n protected _reverseLowerBound(curNode: TreeNode | undefined, key: K) {\n let resNode = this._header;\n while (curNode) {\n const cmpResult = this._cmp(curNode._key!, key);\n if (cmpResult < 0) {\n resNode = curNode;\n curNode = curNode._right;\n } else if (cmpResult > 0) {\n curNode = curNode._left;\n } else return curNode;\n }\n return resNode;\n }\n /**\n * @internal\n */\n protected _reverseUpperBound(curNode: TreeNode | undefined, key: K) {\n let resNode = this._header;\n while (curNode) {\n const cmpResult = this._cmp(curNode._key!, key);\n if (cmpResult < 0) {\n resNode = curNode;\n curNode = curNode._right;\n } else {\n curNode = curNode._left;\n }\n }\n return resNode;\n }\n /**\n * @internal\n */\n protected _eraseNodeSelfBalance(curNode: TreeNode) {\n while (true) {\n const parentNode = curNode._parent!;\n if (parentNode === this._header) return;\n if (curNode._color === TreeNodeColor.RED) {\n curNode._color = TreeNodeColor.BLACK;\n return;\n }\n if (curNode === parentNode._left) {\n const brother = parentNode._right!;\n if (brother._color === TreeNodeColor.RED) {\n brother._color = TreeNodeColor.BLACK;\n parentNode._color = TreeNodeColor.RED;\n if (parentNode === this._root) {\n this._root = parentNode._rotateLeft();\n } else parentNode._rotateLeft();\n } else {\n if (brother._right && brother._right._color === TreeNodeColor.RED) {\n brother._color = parentNode._color;\n parentNode._color = TreeNodeColor.BLACK;\n brother._right._color = TreeNodeColor.BLACK;\n if (parentNode === this._root) {\n this._root = parentNode._rotateLeft();\n } else parentNode._rotateLeft();\n return;\n } else if (brother._left && brother._left._color === TreeNodeColor.RED) {\n brother._color = TreeNodeColor.RED;\n brother._left._color = TreeNodeColor.BLACK;\n brother._rotateRight();\n } else {\n brother._color = TreeNodeColor.RED;\n curNode = parentNode;\n }\n }\n } else {\n const brother = parentNode._left!;\n if (brother._color === TreeNodeColor.RED) {\n brother._color = TreeNodeColor.BLACK;\n parentNode._color = TreeNodeColor.RED;\n if (parentNode === this._root) {\n this._root = parentNode._rotateRight();\n } else parentNode._rotateRight();\n } else {\n if (brother._left && brother._left._color === TreeNodeColor.RED) {\n brother._color = parentNode._color;\n parentNode._color = TreeNodeColor.BLACK;\n brother._left._color = TreeNodeColor.BLACK;\n if (parentNode === this._root) {\n this._root = parentNode._rotateRight();\n } else parentNode._rotateRight();\n return;\n } else if (brother._right && brother._right._color === TreeNodeColor.RED) {\n brother._color = TreeNodeColor.RED;\n brother._right._color = TreeNodeColor.BLACK;\n brother._rotateLeft();\n } else {\n brother._color = TreeNodeColor.RED;\n curNode = parentNode;\n }\n }\n }\n }\n }\n /**\n * @internal\n */\n protected _eraseNode(curNode: TreeNode) {\n if (this._length === 1) {\n this.clear();\n return;\n }\n let swapNode = curNode;\n while (swapNode._left || swapNode._right) {\n if (swapNode._right) {\n swapNode = swapNode._right;\n while (swapNode._left) swapNode = swapNode._left;\n } else {\n swapNode = swapNode._left!;\n }\n const key = curNode._key;\n curNode._key = swapNode._key;\n swapNode._key = key;\n const value = curNode._value;\n curNode._value = swapNode._value;\n swapNode._value = value;\n curNode = swapNode;\n }\n if (this._header._left === swapNode) {\n this._header._left = swapNode._parent;\n } else if (this._header._right === swapNode) {\n this._header._right = swapNode._parent;\n }\n this._eraseNodeSelfBalance(swapNode);\n let _parent = swapNode._parent as TreeNodeEnableIndex;\n if (swapNode === _parent._left) {\n _parent._left = undefined;\n } else _parent._right = undefined;\n this._length -= 1;\n this._root!._color = TreeNodeColor.BLACK;\n if (this.enableIndex) {\n while (_parent !== this._header) {\n _parent._subTreeSize -= 1;\n _parent = _parent._parent as TreeNodeEnableIndex;\n }\n }\n }\n protected _inOrderTraversal(): TreeNode[];\n protected _inOrderTraversal(pos: number): TreeNode;\n protected _inOrderTraversal(\n callback: (node: TreeNode, index: number, map: this) => void\n ): TreeNode;\n /**\n * @internal\n */\n protected _inOrderTraversal(\n param?: number | ((node: TreeNode, index: number, map: this) => void)\n ) {\n const pos = typeof param === 'number' ? param : undefined;\n const callback = typeof param === 'function' ? param : undefined;\n const nodeList = typeof param === 'undefined' ? []>[] : undefined;\n let index = 0;\n let curNode = this._root;\n const stack: TreeNode[] = [];\n while (stack.length || curNode) {\n if (curNode) {\n stack.push(curNode);\n curNode = curNode._left;\n } else {\n curNode = stack.pop()!;\n if (index === pos) return curNode;\n nodeList && nodeList.push(curNode);\n callback && callback(curNode, index, this);\n index += 1;\n curNode = curNode._right;\n }\n }\n return nodeList;\n }\n /**\n * @internal\n */\n protected _insertNodeSelfBalance(curNode: TreeNode) {\n while (true) {\n const parentNode = curNode._parent!;\n if (parentNode._color === TreeNodeColor.BLACK) return;\n const grandParent = parentNode._parent!;\n if (parentNode === grandParent._left) {\n const uncle = grandParent._right;\n if (uncle && uncle._color === TreeNodeColor.RED) {\n uncle._color = parentNode._color = TreeNodeColor.BLACK;\n if (grandParent === this._root) return;\n grandParent._color = TreeNodeColor.RED;\n curNode = grandParent;\n continue;\n } else if (curNode === parentNode._right) {\n curNode._color = TreeNodeColor.BLACK;\n if (curNode._left) {\n curNode._left._parent = parentNode;\n }\n if (curNode._right) {\n curNode._right._parent = grandParent;\n }\n parentNode._right = curNode._left;\n grandParent._left = curNode._right;\n curNode._left = parentNode;\n curNode._right = grandParent;\n if (grandParent === this._root) {\n this._root = curNode;\n this._header._parent = curNode;\n } else {\n const GP = grandParent._parent!;\n if (GP._left === grandParent) {\n GP._left = curNode;\n } else GP._right = curNode;\n }\n curNode._parent = grandParent._parent;\n parentNode._parent = curNode;\n grandParent._parent = curNode;\n grandParent._color = TreeNodeColor.RED;\n } else {\n parentNode._color = TreeNodeColor.BLACK;\n if (grandParent === this._root) {\n this._root = grandParent._rotateRight();\n } else grandParent._rotateRight();\n grandParent._color = TreeNodeColor.RED;\n return;\n }\n } else {\n const uncle = grandParent._left;\n if (uncle && uncle._color === TreeNodeColor.RED) {\n uncle._color = parentNode._color = TreeNodeColor.BLACK;\n if (grandParent === this._root) return;\n grandParent._color = TreeNodeColor.RED;\n curNode = grandParent;\n continue;\n } else if (curNode === parentNode._left) {\n curNode._color = TreeNodeColor.BLACK;\n if (curNode._left) {\n curNode._left._parent = grandParent;\n }\n if (curNode._right) {\n curNode._right._parent = parentNode;\n }\n grandParent._right = curNode._left;\n parentNode._left = curNode._right;\n curNode._left = grandParent;\n curNode._right = parentNode;\n if (grandParent === this._root) {\n this._root = curNode;\n this._header._parent = curNode;\n } else {\n const GP = grandParent._parent!;\n if (GP._left === grandParent) {\n GP._left = curNode;\n } else GP._right = curNode;\n }\n curNode._parent = grandParent._parent;\n parentNode._parent = curNode;\n grandParent._parent = curNode;\n grandParent._color = TreeNodeColor.RED;\n } else {\n parentNode._color = TreeNodeColor.BLACK;\n if (grandParent === this._root) {\n this._root = grandParent._rotateLeft();\n } else grandParent._rotateLeft();\n grandParent._color = TreeNodeColor.RED;\n return;\n }\n }\n if (this.enableIndex) {\n (>parentNode)._recount();\n (>grandParent)._recount();\n (>curNode)._recount();\n }\n return;\n }\n }\n /**\n * @internal\n */\n protected _set(key: K, value?: V, hint?: TreeIterator) {\n if (this._root === undefined) {\n this._length += 1;\n this._root = new this._TreeNodeClass(key, value, TreeNodeColor.BLACK);\n this._root._parent = this._header;\n this._header._parent = this._header._left = this._header._right = this._root;\n return this._length;\n }\n let curNode;\n const minNode = this._header._left!;\n const compareToMin = this._cmp(minNode._key!, key);\n if (compareToMin === 0) {\n minNode._value = value;\n return this._length;\n } else if (compareToMin > 0) {\n minNode._left = new this._TreeNodeClass(key, value);\n minNode._left._parent = minNode;\n curNode = minNode._left;\n this._header._left = curNode;\n } else {\n const maxNode = this._header._right!;\n const compareToMax = this._cmp(maxNode._key!, key);\n if (compareToMax === 0) {\n maxNode._value = value;\n return this._length;\n } else if (compareToMax < 0) {\n maxNode._right = new this._TreeNodeClass(key, value);\n maxNode._right._parent = maxNode;\n curNode = maxNode._right;\n this._header._right = curNode;\n } else {\n if (hint !== undefined) {\n const iterNode = hint._node;\n if (iterNode !== this._header) {\n const iterCmpRes = this._cmp(iterNode._key!, key);\n if (iterCmpRes === 0) {\n iterNode._value = value;\n return this._length;\n } else /* istanbul ignore else */ if (iterCmpRes > 0) {\n const preNode = iterNode._pre();\n const preCmpRes = this._cmp(preNode._key!, key);\n if (preCmpRes === 0) {\n preNode._value = value;\n return this._length;\n } else if (preCmpRes < 0) {\n curNode = new this._TreeNodeClass(key, value);\n if (preNode._right === undefined) {\n preNode._right = curNode;\n curNode._parent = preNode;\n } else {\n iterNode._left = curNode;\n curNode._parent = iterNode;\n }\n }\n }\n }\n }\n if (curNode === undefined) {\n curNode = this._root;\n while (true) {\n const cmpResult = this._cmp(curNode._key!, key);\n if (cmpResult > 0) {\n if (curNode._left === undefined) {\n curNode._left = new this._TreeNodeClass(key, value);\n curNode._left._parent = curNode;\n curNode = curNode._left;\n break;\n }\n curNode = curNode._left;\n } else if (cmpResult < 0) {\n if (curNode._right === undefined) {\n curNode._right = new this._TreeNodeClass(key, value);\n curNode._right._parent = curNode;\n curNode = curNode._right;\n break;\n }\n curNode = curNode._right;\n } else {\n curNode._value = value;\n return this._length;\n }\n }\n }\n }\n }\n if (this.enableIndex) {\n let parent = curNode._parent as TreeNodeEnableIndex;\n while (parent !== this._header) {\n parent._subTreeSize += 1;\n parent = parent._parent as TreeNodeEnableIndex;\n }\n }\n this._insertNodeSelfBalance(curNode);\n this._length += 1;\n return this._length;\n }\n /**\n * @internal\n */\n protected _getTreeNodeByKey(curNode: TreeNode | undefined, key: K) {\n while (curNode) {\n const cmpResult = this._cmp(curNode._key!, key);\n if (cmpResult < 0) {\n curNode = curNode._right;\n } else if (cmpResult > 0) {\n curNode = curNode._left;\n } else return curNode;\n }\n return curNode || this._header;\n }\n clear() {\n this._length = 0;\n this._root = undefined;\n this._header._parent = undefined;\n this._header._left = this._header._right = undefined;\n }\n /**\n * @description Update node's key by iterator.\n * @param iter - The iterator you want to change.\n * @param key - The key you want to update.\n * @returns Whether the modification is successful.\n * @example\n * const st = new orderedSet([1, 2, 5]);\n * const iter = st.find(2);\n * st.updateKeyByIterator(iter, 3); // then st will become [1, 3, 5]\n */\n updateKeyByIterator(iter: TreeIterator, key: K): boolean {\n const node = iter._node;\n if (node === this._header) {\n throwIteratorAccessError();\n }\n if (this._length === 1) {\n node._key = key;\n return true;\n }\n const nextKey = node._next()._key!;\n if (node === this._header._left) {\n if (this._cmp(nextKey, key) > 0) {\n node._key = key;\n return true;\n }\n return false;\n }\n const preKey = node._pre()._key!;\n if (node === this._header._right) {\n if (this._cmp(preKey, key) < 0) {\n node._key = key;\n return true;\n }\n return false;\n }\n if (\n this._cmp(preKey, key) >= 0 ||\n this._cmp(nextKey, key) <= 0\n ) return false;\n node._key = key;\n return true;\n }\n eraseElementByPos(pos: number) {\n $checkWithinAccessParams!(pos, 0, this._length - 1);\n const node = this._inOrderTraversal(pos);\n this._eraseNode(node);\n return this._length;\n }\n /**\n * @description Remove the element of the specified key.\n * @param key - The key you want to remove.\n * @returns Whether erase successfully.\n */\n eraseElementByKey(key: K) {\n if (this._length === 0) return false;\n const curNode = this._getTreeNodeByKey(this._root, key);\n if (curNode === this._header) return false;\n this._eraseNode(curNode);\n return true;\n }\n eraseElementByIterator(iter: TreeIterator) {\n const node = iter._node;\n if (node === this._header) {\n throwIteratorAccessError();\n }\n const hasNoRight = node._right === undefined;\n const isNormal = iter.iteratorType === IteratorType.NORMAL;\n // For the normal iterator, the `next` node will be swapped to `this` node when has right.\n if (isNormal) {\n // So we should move it to next when it's right is null.\n if (hasNoRight) iter.next();\n } else {\n // For the reverse iterator, only when it doesn't have right and has left the `next` node will be swapped.\n // So when it has right, or it is a leaf node we should move it to `next`.\n if (!hasNoRight || node._left === undefined) iter.next();\n }\n this._eraseNode(node);\n return iter;\n }\n /**\n * @description Get the height of the tree.\n * @returns Number about the height of the RB-tree.\n */\n getHeight() {\n if (this._length === 0) return 0;\n function traversal(curNode: TreeNode | undefined): number {\n if (!curNode) return 0;\n return Math.max(traversal(curNode._left), traversal(curNode._right)) + 1;\n }\n return traversal(this._root);\n }\n /**\n * @param key - The given key you want to compare.\n * @returns An iterator to the first element less than the given key.\n */\n abstract reverseUpperBound(key: K): TreeIterator;\n /**\n * @description Union the other tree to self.\n * @param other - The other tree container you want to merge.\n * @returns The size of the tree after union.\n */\n abstract union(other: TreeContainer): number;\n /**\n * @param key - The given key you want to compare.\n * @returns An iterator to the first element not greater than the given key.\n */\n abstract reverseLowerBound(key: K): TreeIterator;\n /**\n * @param key - The given key you want to compare.\n * @returns An iterator to the first element not less than the given key.\n */\n abstract lowerBound(key: K): TreeIterator;\n /**\n * @param key - The given key you want to compare.\n * @returns An iterator to the first element greater than the given key.\n */\n abstract upperBound(key: K): TreeIterator;\n}\n\nexport default TreeContainer;\n","import { TreeNode } from './TreeNode';\nimport type { TreeNodeEnableIndex } from './TreeNode';\nimport { ContainerIterator, IteratorType } from '@/container/ContainerBase';\nimport TreeContainer from '@/container/TreeContainer/Base/index';\nimport { throwIteratorAccessError } from '@/utils/throwError';\n\nabstract class TreeIterator extends ContainerIterator {\n abstract readonly container: TreeContainer;\n /**\n * @internal\n */\n _node: TreeNode;\n /**\n * @internal\n */\n protected _header: TreeNode;\n /**\n * @internal\n */\n protected constructor(\n node: TreeNode,\n header: TreeNode,\n iteratorType?: IteratorType\n ) {\n super(iteratorType);\n this._node = node;\n this._header = header;\n if (this.iteratorType === IteratorType.NORMAL) {\n this.pre = function () {\n if (this._node === this._header._left) {\n throwIteratorAccessError();\n }\n this._node = this._node._pre();\n return this;\n };\n\n this.next = function () {\n if (this._node === this._header) {\n throwIteratorAccessError();\n }\n this._node = this._node._next();\n return this;\n };\n } else {\n this.pre = function () {\n if (this._node === this._header._right) {\n throwIteratorAccessError();\n }\n this._node = this._node._next();\n return this;\n };\n\n this.next = function () {\n if (this._node === this._header) {\n throwIteratorAccessError();\n }\n this._node = this._node._pre();\n return this;\n };\n }\n }\n /**\n * @description Get the sequential index of the iterator in the tree container.
\n * Note:\n * This function only takes effect when the specified tree container `enableIndex = true`.\n * @returns The index subscript of the node in the tree.\n * @example\n * const st = new OrderedSet([1, 2, 3], true);\n * console.log(st.begin().next().index); // 1\n */\n get index() {\n let _node = this._node as TreeNodeEnableIndex;\n const root = this._header._parent as TreeNodeEnableIndex;\n if (_node === this._header) {\n if (root) {\n return root._subTreeSize - 1;\n }\n return 0;\n }\n let index = 0;\n if (_node._left) {\n index += (_node._left as TreeNodeEnableIndex)._subTreeSize;\n }\n while (_node !== root) {\n const _parent = _node._parent as TreeNodeEnableIndex;\n if (_node === _parent._right) {\n index += 1;\n if (_parent._left) {\n index += (_parent._left as TreeNodeEnableIndex)._subTreeSize;\n }\n }\n _node = _parent;\n }\n return index;\n }\n isAccessible() {\n return this._node !== this._header;\n }\n // @ts-ignore\n pre(): this;\n // @ts-ignore\n next(): this;\n}\n\nexport default TreeIterator;\n","import TreeContainer from './Base';\nimport TreeIterator from './Base/TreeIterator';\nimport { TreeNode } from './Base/TreeNode';\nimport { initContainer, IteratorType } from '@/container/ContainerBase';\nimport $checkWithinAccessParams from '@/utils/checkParams.macro';\nimport { throwIteratorAccessError } from '@/utils/throwError';\n\nclass OrderedMapIterator extends TreeIterator {\n container: OrderedMap;\n constructor(\n node: TreeNode,\n header: TreeNode,\n container: OrderedMap,\n iteratorType?: IteratorType\n ) {\n super(node, header, iteratorType);\n this.container = container;\n }\n get pointer() {\n if (this._node === this._header) {\n throwIteratorAccessError();\n }\n const self = this;\n return new Proxy(<[K, V]>[], {\n get(target, prop: '0' | '1') {\n if (prop === '0') return self._node._key!;\n else if (prop === '1') return self._node._value!;\n target[0] = self._node._key!;\n target[1] = self._node._value!;\n return target[prop];\n },\n set(_, prop: '1', newValue: V) {\n if (prop !== '1') {\n throw new TypeError('prop must be 1');\n }\n self._node._value = newValue;\n return true;\n }\n });\n }\n copy() {\n return new OrderedMapIterator(\n this._node,\n this._header,\n this.container,\n this.iteratorType\n );\n }\n // @ts-ignore\n equals(iter: OrderedMapIterator): boolean;\n}\n\nexport type { OrderedMapIterator };\n\nclass OrderedMap extends TreeContainer {\n /**\n * @param container - The initialization container.\n * @param cmp - The compare function.\n * @param enableIndex - Whether to enable iterator indexing function.\n * @example\n * new OrderedMap();\n * new OrderedMap([[0, 1], [2, 1]]);\n * new OrderedMap([[0, 1], [2, 1]], (x, y) => x - y);\n * new OrderedMap([[0, 1], [2, 1]], (x, y) => x - y, true);\n */\n constructor(\n container: initContainer<[K, V]> = [],\n cmp?: (x: K, y: K) => number,\n enableIndex?: boolean\n ) {\n super(cmp, enableIndex);\n const self = this;\n container.forEach(function (el) {\n self.setElement(el[0], el[1]);\n });\n }\n begin() {\n return new OrderedMapIterator(this._header._left || this._header, this._header, this);\n }\n end() {\n return new OrderedMapIterator(this._header, this._header, this);\n }\n rBegin() {\n return new OrderedMapIterator(\n this._header._right || this._header,\n this._header,\n this,\n IteratorType.REVERSE\n );\n }\n rEnd() {\n return new OrderedMapIterator(this._header, this._header, this, IteratorType.REVERSE);\n }\n front() {\n if (this._length === 0) return;\n const minNode = this._header._left!;\n return <[K, V]>[minNode._key, minNode._value];\n }\n back() {\n if (this._length === 0) return;\n const maxNode = this._header._right!;\n return <[K, V]>[maxNode._key, maxNode._value];\n }\n lowerBound(key: K) {\n const resNode = this._lowerBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n }\n upperBound(key: K) {\n const resNode = this._upperBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n }\n reverseLowerBound(key: K) {\n const resNode = this._reverseLowerBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n }\n reverseUpperBound(key: K) {\n const resNode = this._reverseUpperBound(this._root, key);\n return new OrderedMapIterator(resNode, this._header, this);\n }\n forEach(callback: (element: [K, V], index: number, map: OrderedMap) => void) {\n this._inOrderTraversal(function (node, index, map) {\n callback(<[K, V]>[node._key, node._value], index, map);\n });\n }\n /**\n * @description Insert a key-value pair or set value by the given key.\n * @param key - The key want to insert.\n * @param value - The value want to set.\n * @param hint - You can give an iterator hint to improve insertion efficiency.\n * @return The size of container after setting.\n * @example\n * const mp = new OrderedMap([[2, 0], [4, 0], [5, 0]]);\n * const iter = mp.begin();\n * mp.setElement(1, 0);\n * mp.setElement(3, 0, iter); // give a hint will be faster.\n */\n setElement(key: K, value: V, hint?: OrderedMapIterator) {\n return this._set(key, value, hint);\n }\n getElementByPos(pos: number) {\n $checkWithinAccessParams!(pos, 0, this._length - 1);\n const node = this._inOrderTraversal(pos);\n return <[K, V]>[node._key, node._value];\n }\n find(key: K) {\n const curNode = this._getTreeNodeByKey(this._root, key);\n return new OrderedMapIterator(curNode, this._header, this);\n }\n /**\n * @description Get the value of the element of the specified key.\n * @param key - The specified key you want to get.\n * @example\n * const val = container.getElementByKey(1);\n */\n getElementByKey(key: K) {\n const curNode = this._getTreeNodeByKey(this._root, key);\n return curNode._value;\n }\n union(other: OrderedMap) {\n const self = this;\n other.forEach(function (el) {\n self.setElement(el[0], el[1]);\n });\n return this._length;\n }\n * [Symbol.iterator]() {\n const length = this._length;\n const nodeList = this._inOrderTraversal();\n for (let i = 0; i < length; ++i) {\n const node = nodeList[i];\n yield <[K, V]>[node._key, node._value];\n }\n }\n // @ts-ignore\n eraseElementByIterator(iter: OrderedMapIterator): OrderedMapIterator;\n}\n\nexport default OrderedMap;\n"]} \ No newline at end of file diff --git a/node_modules/@js-sdsl/ordered-map/dist/umd/ordered-map.js b/node_modules/@js-sdsl/ordered-map/dist/umd/ordered-map.js deleted file mode 100644 index 84ae512..0000000 --- a/node_modules/@js-sdsl/ordered-map/dist/umd/ordered-map.js +++ /dev/null @@ -1,1157 +0,0 @@ -/*! - * @js-sdsl/ordered-map v4.4.2 - * https://github.com/js-sdsl/js-sdsl - * (c) 2021-present ZLY201 - * MIT license - */ - -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sdsl = {})); -})(this, (function (exports) { 'use strict'; - - /****************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - /* global Reflect, Promise, SuppressedError, Symbol */ - - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - }; - return extendStatics(d, b); - }; - function __extends(d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - } - function __generator(thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { - value: op[1], - done: false - }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } - } - typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; - }; - - var TreeNode = /** @class */function () { - function TreeNode(key, value, color) { - if (color === void 0) { - color = 1 /* TreeNodeColor.RED */; - } - this._left = undefined; - this._right = undefined; - this._parent = undefined; - this._key = key; - this._value = value; - this._color = color; - } - /** - * @description Get the pre node. - * @returns TreeNode about the pre node. - */ - TreeNode.prototype._pre = function () { - var preNode = this; - var isRootOrHeader = preNode._parent._parent === preNode; - if (isRootOrHeader && preNode._color === 1 /* TreeNodeColor.RED */) { - preNode = preNode._right; - } else if (preNode._left) { - preNode = preNode._left; - while (preNode._right) { - preNode = preNode._right; - } - } else { - // Must be root and left is null - if (isRootOrHeader) { - return preNode._parent; - } - var pre = preNode._parent; - while (pre._left === preNode) { - preNode = pre; - pre = preNode._parent; - } - preNode = pre; - } - return preNode; - }; - /** - * @description Get the next node. - * @returns TreeNode about the next node. - */ - TreeNode.prototype._next = function () { - var nextNode = this; - if (nextNode._right) { - nextNode = nextNode._right; - while (nextNode._left) { - nextNode = nextNode._left; - } - return nextNode; - } else { - var pre = nextNode._parent; - while (pre._right === nextNode) { - nextNode = pre; - pre = nextNode._parent; - } - if (nextNode._right !== pre) { - return pre; - } else return nextNode; - } - }; - /** - * @description Rotate left. - * @returns TreeNode about moved to original position after rotation. - */ - TreeNode.prototype._rotateLeft = function () { - var PP = this._parent; - var V = this._right; - var R = V._left; - if (PP._parent === this) PP._parent = V;else if (PP._left === this) PP._left = V;else PP._right = V; - V._parent = PP; - V._left = this; - this._parent = V; - this._right = R; - if (R) R._parent = this; - return V; - }; - /** - * @description Rotate right. - * @returns TreeNode about moved to original position after rotation. - */ - TreeNode.prototype._rotateRight = function () { - var PP = this._parent; - var F = this._left; - var K = F._right; - if (PP._parent === this) PP._parent = F;else if (PP._left === this) PP._left = F;else PP._right = F; - F._parent = PP; - F._right = this; - this._parent = F; - this._left = K; - if (K) K._parent = this; - return F; - }; - return TreeNode; - }(); - var TreeNodeEnableIndex = /** @class */function (_super) { - __extends(TreeNodeEnableIndex, _super); - function TreeNodeEnableIndex() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._subTreeSize = 1; - return _this; - } - /** - * @description Rotate left and do recount. - * @returns TreeNode about moved to original position after rotation. - */ - TreeNodeEnableIndex.prototype._rotateLeft = function () { - var parent = _super.prototype._rotateLeft.call(this); - this._recount(); - parent._recount(); - return parent; - }; - /** - * @description Rotate right and do recount. - * @returns TreeNode about moved to original position after rotation. - */ - TreeNodeEnableIndex.prototype._rotateRight = function () { - var parent = _super.prototype._rotateRight.call(this); - this._recount(); - parent._recount(); - return parent; - }; - TreeNodeEnableIndex.prototype._recount = function () { - this._subTreeSize = 1; - if (this._left) { - this._subTreeSize += this._left._subTreeSize; - } - if (this._right) { - this._subTreeSize += this._right._subTreeSize; - } - }; - return TreeNodeEnableIndex; - }(TreeNode); - - var ContainerIterator = /** @class */function () { - /** - * @internal - */ - function ContainerIterator(iteratorType) { - if (iteratorType === void 0) { - iteratorType = 0 /* IteratorType.NORMAL */; - } - this.iteratorType = iteratorType; - } - /** - * @param iter - The other iterator you want to compare. - * @returns Whether this equals to obj. - * @example - * container.find(1).equals(container.end()); - */ - ContainerIterator.prototype.equals = function (iter) { - return this._node === iter._node; - }; - return ContainerIterator; - }(); - var Base = /** @class */function () { - function Base() { - /** - * @description Container's size. - * @internal - */ - this._length = 0; - } - Object.defineProperty(Base.prototype, "length", { - /** - * @returns The size of the container. - * @example - * const container = new Vector([1, 2]); - * console.log(container.length); // 2 - */ - get: function () { - return this._length; - }, - enumerable: false, - configurable: true - }); - /** - * @returns The size of the container. - * @example - * const container = new Vector([1, 2]); - * console.log(container.size()); // 2 - */ - Base.prototype.size = function () { - return this._length; - }; - /** - * @returns Whether the container is empty. - * @example - * container.clear(); - * console.log(container.empty()); // true - */ - Base.prototype.empty = function () { - return this._length === 0; - }; - return Base; - }(); - var Container = /** @class */function (_super) { - __extends(Container, _super); - function Container() { - return _super !== null && _super.apply(this, arguments) || this; - } - return Container; - }(Base); - - /** - * @description Throw an iterator access error. - * @internal - */ - function throwIteratorAccessError() { - throw new RangeError('Iterator access denied!'); - } - - var TreeContainer = /** @class */function (_super) { - __extends(TreeContainer, _super); - /** - * @internal - */ - function TreeContainer(cmp, enableIndex) { - if (cmp === void 0) { - cmp = function (x, y) { - if (x < y) return -1; - if (x > y) return 1; - return 0; - }; - } - if (enableIndex === void 0) { - enableIndex = false; - } - var _this = _super.call(this) || this; - /** - * @internal - */ - _this._root = undefined; - _this._cmp = cmp; - _this.enableIndex = enableIndex; - _this._TreeNodeClass = enableIndex ? TreeNodeEnableIndex : TreeNode; - _this._header = new _this._TreeNodeClass(); - return _this; - } - /** - * @internal - */ - TreeContainer.prototype._lowerBound = function (curNode, key) { - var resNode = this._header; - while (curNode) { - var cmpResult = this._cmp(curNode._key, key); - if (cmpResult < 0) { - curNode = curNode._right; - } else if (cmpResult > 0) { - resNode = curNode; - curNode = curNode._left; - } else return curNode; - } - return resNode; - }; - /** - * @internal - */ - TreeContainer.prototype._upperBound = function (curNode, key) { - var resNode = this._header; - while (curNode) { - var cmpResult = this._cmp(curNode._key, key); - if (cmpResult <= 0) { - curNode = curNode._right; - } else { - resNode = curNode; - curNode = curNode._left; - } - } - return resNode; - }; - /** - * @internal - */ - TreeContainer.prototype._reverseLowerBound = function (curNode, key) { - var resNode = this._header; - while (curNode) { - var cmpResult = this._cmp(curNode._key, key); - if (cmpResult < 0) { - resNode = curNode; - curNode = curNode._right; - } else if (cmpResult > 0) { - curNode = curNode._left; - } else return curNode; - } - return resNode; - }; - /** - * @internal - */ - TreeContainer.prototype._reverseUpperBound = function (curNode, key) { - var resNode = this._header; - while (curNode) { - var cmpResult = this._cmp(curNode._key, key); - if (cmpResult < 0) { - resNode = curNode; - curNode = curNode._right; - } else { - curNode = curNode._left; - } - } - return resNode; - }; - /** - * @internal - */ - TreeContainer.prototype._eraseNodeSelfBalance = function (curNode) { - while (true) { - var parentNode = curNode._parent; - if (parentNode === this._header) return; - if (curNode._color === 1 /* TreeNodeColor.RED */) { - curNode._color = 0 /* TreeNodeColor.BLACK */; - return; - } - if (curNode === parentNode._left) { - var brother = parentNode._right; - if (brother._color === 1 /* TreeNodeColor.RED */) { - brother._color = 0 /* TreeNodeColor.BLACK */; - parentNode._color = 1 /* TreeNodeColor.RED */; - if (parentNode === this._root) { - this._root = parentNode._rotateLeft(); - } else parentNode._rotateLeft(); - } else { - if (brother._right && brother._right._color === 1 /* TreeNodeColor.RED */) { - brother._color = parentNode._color; - parentNode._color = 0 /* TreeNodeColor.BLACK */; - brother._right._color = 0 /* TreeNodeColor.BLACK */; - if (parentNode === this._root) { - this._root = parentNode._rotateLeft(); - } else parentNode._rotateLeft(); - return; - } else if (brother._left && brother._left._color === 1 /* TreeNodeColor.RED */) { - brother._color = 1 /* TreeNodeColor.RED */; - brother._left._color = 0 /* TreeNodeColor.BLACK */; - brother._rotateRight(); - } else { - brother._color = 1 /* TreeNodeColor.RED */; - curNode = parentNode; - } - } - } else { - var brother = parentNode._left; - if (brother._color === 1 /* TreeNodeColor.RED */) { - brother._color = 0 /* TreeNodeColor.BLACK */; - parentNode._color = 1 /* TreeNodeColor.RED */; - if (parentNode === this._root) { - this._root = parentNode._rotateRight(); - } else parentNode._rotateRight(); - } else { - if (brother._left && brother._left._color === 1 /* TreeNodeColor.RED */) { - brother._color = parentNode._color; - parentNode._color = 0 /* TreeNodeColor.BLACK */; - brother._left._color = 0 /* TreeNodeColor.BLACK */; - if (parentNode === this._root) { - this._root = parentNode._rotateRight(); - } else parentNode._rotateRight(); - return; - } else if (brother._right && brother._right._color === 1 /* TreeNodeColor.RED */) { - brother._color = 1 /* TreeNodeColor.RED */; - brother._right._color = 0 /* TreeNodeColor.BLACK */; - brother._rotateLeft(); - } else { - brother._color = 1 /* TreeNodeColor.RED */; - curNode = parentNode; - } - } - } - } - }; - /** - * @internal - */ - TreeContainer.prototype._eraseNode = function (curNode) { - if (this._length === 1) { - this.clear(); - return; - } - var swapNode = curNode; - while (swapNode._left || swapNode._right) { - if (swapNode._right) { - swapNode = swapNode._right; - while (swapNode._left) swapNode = swapNode._left; - } else { - swapNode = swapNode._left; - } - var key = curNode._key; - curNode._key = swapNode._key; - swapNode._key = key; - var value = curNode._value; - curNode._value = swapNode._value; - swapNode._value = value; - curNode = swapNode; - } - if (this._header._left === swapNode) { - this._header._left = swapNode._parent; - } else if (this._header._right === swapNode) { - this._header._right = swapNode._parent; - } - this._eraseNodeSelfBalance(swapNode); - var _parent = swapNode._parent; - if (swapNode === _parent._left) { - _parent._left = undefined; - } else _parent._right = undefined; - this._length -= 1; - this._root._color = 0 /* TreeNodeColor.BLACK */; - if (this.enableIndex) { - while (_parent !== this._header) { - _parent._subTreeSize -= 1; - _parent = _parent._parent; - } - } - }; - /** - * @internal - */ - TreeContainer.prototype._inOrderTraversal = function (param) { - var pos = typeof param === 'number' ? param : undefined; - var callback = typeof param === 'function' ? param : undefined; - var nodeList = typeof param === 'undefined' ? [] : undefined; - var index = 0; - var curNode = this._root; - var stack = []; - while (stack.length || curNode) { - if (curNode) { - stack.push(curNode); - curNode = curNode._left; - } else { - curNode = stack.pop(); - if (index === pos) return curNode; - nodeList && nodeList.push(curNode); - callback && callback(curNode, index, this); - index += 1; - curNode = curNode._right; - } - } - return nodeList; - }; - /** - * @internal - */ - TreeContainer.prototype._insertNodeSelfBalance = function (curNode) { - while (true) { - var parentNode = curNode._parent; - if (parentNode._color === 0 /* TreeNodeColor.BLACK */) return; - var grandParent = parentNode._parent; - if (parentNode === grandParent._left) { - var uncle = grandParent._right; - if (uncle && uncle._color === 1 /* TreeNodeColor.RED */) { - uncle._color = parentNode._color = 0 /* TreeNodeColor.BLACK */; - if (grandParent === this._root) return; - grandParent._color = 1 /* TreeNodeColor.RED */; - curNode = grandParent; - continue; - } else if (curNode === parentNode._right) { - curNode._color = 0 /* TreeNodeColor.BLACK */; - if (curNode._left) { - curNode._left._parent = parentNode; - } - if (curNode._right) { - curNode._right._parent = grandParent; - } - parentNode._right = curNode._left; - grandParent._left = curNode._right; - curNode._left = parentNode; - curNode._right = grandParent; - if (grandParent === this._root) { - this._root = curNode; - this._header._parent = curNode; - } else { - var GP = grandParent._parent; - if (GP._left === grandParent) { - GP._left = curNode; - } else GP._right = curNode; - } - curNode._parent = grandParent._parent; - parentNode._parent = curNode; - grandParent._parent = curNode; - grandParent._color = 1 /* TreeNodeColor.RED */; - } else { - parentNode._color = 0 /* TreeNodeColor.BLACK */; - if (grandParent === this._root) { - this._root = grandParent._rotateRight(); - } else grandParent._rotateRight(); - grandParent._color = 1 /* TreeNodeColor.RED */; - return; - } - } else { - var uncle = grandParent._left; - if (uncle && uncle._color === 1 /* TreeNodeColor.RED */) { - uncle._color = parentNode._color = 0 /* TreeNodeColor.BLACK */; - if (grandParent === this._root) return; - grandParent._color = 1 /* TreeNodeColor.RED */; - curNode = grandParent; - continue; - } else if (curNode === parentNode._left) { - curNode._color = 0 /* TreeNodeColor.BLACK */; - if (curNode._left) { - curNode._left._parent = grandParent; - } - if (curNode._right) { - curNode._right._parent = parentNode; - } - grandParent._right = curNode._left; - parentNode._left = curNode._right; - curNode._left = grandParent; - curNode._right = parentNode; - if (grandParent === this._root) { - this._root = curNode; - this._header._parent = curNode; - } else { - var GP = grandParent._parent; - if (GP._left === grandParent) { - GP._left = curNode; - } else GP._right = curNode; - } - curNode._parent = grandParent._parent; - parentNode._parent = curNode; - grandParent._parent = curNode; - grandParent._color = 1 /* TreeNodeColor.RED */; - } else { - parentNode._color = 0 /* TreeNodeColor.BLACK */; - if (grandParent === this._root) { - this._root = grandParent._rotateLeft(); - } else grandParent._rotateLeft(); - grandParent._color = 1 /* TreeNodeColor.RED */; - return; - } - } - if (this.enableIndex) { - parentNode._recount(); - grandParent._recount(); - curNode._recount(); - } - return; - } - }; - /** - * @internal - */ - TreeContainer.prototype._set = function (key, value, hint) { - if (this._root === undefined) { - this._length += 1; - this._root = new this._TreeNodeClass(key, value, 0 /* TreeNodeColor.BLACK */); - this._root._parent = this._header; - this._header._parent = this._header._left = this._header._right = this._root; - return this._length; - } - var curNode; - var minNode = this._header._left; - var compareToMin = this._cmp(minNode._key, key); - if (compareToMin === 0) { - minNode._value = value; - return this._length; - } else if (compareToMin > 0) { - minNode._left = new this._TreeNodeClass(key, value); - minNode._left._parent = minNode; - curNode = minNode._left; - this._header._left = curNode; - } else { - var maxNode = this._header._right; - var compareToMax = this._cmp(maxNode._key, key); - if (compareToMax === 0) { - maxNode._value = value; - return this._length; - } else if (compareToMax < 0) { - maxNode._right = new this._TreeNodeClass(key, value); - maxNode._right._parent = maxNode; - curNode = maxNode._right; - this._header._right = curNode; - } else { - if (hint !== undefined) { - var iterNode = hint._node; - if (iterNode !== this._header) { - var iterCmpRes = this._cmp(iterNode._key, key); - if (iterCmpRes === 0) { - iterNode._value = value; - return this._length; - } else /* istanbul ignore else */if (iterCmpRes > 0) { - var preNode = iterNode._pre(); - var preCmpRes = this._cmp(preNode._key, key); - if (preCmpRes === 0) { - preNode._value = value; - return this._length; - } else if (preCmpRes < 0) { - curNode = new this._TreeNodeClass(key, value); - if (preNode._right === undefined) { - preNode._right = curNode; - curNode._parent = preNode; - } else { - iterNode._left = curNode; - curNode._parent = iterNode; - } - } - } - } - } - if (curNode === undefined) { - curNode = this._root; - while (true) { - var cmpResult = this._cmp(curNode._key, key); - if (cmpResult > 0) { - if (curNode._left === undefined) { - curNode._left = new this._TreeNodeClass(key, value); - curNode._left._parent = curNode; - curNode = curNode._left; - break; - } - curNode = curNode._left; - } else if (cmpResult < 0) { - if (curNode._right === undefined) { - curNode._right = new this._TreeNodeClass(key, value); - curNode._right._parent = curNode; - curNode = curNode._right; - break; - } - curNode = curNode._right; - } else { - curNode._value = value; - return this._length; - } - } - } - } - } - if (this.enableIndex) { - var parent_1 = curNode._parent; - while (parent_1 !== this._header) { - parent_1._subTreeSize += 1; - parent_1 = parent_1._parent; - } - } - this._insertNodeSelfBalance(curNode); - this._length += 1; - return this._length; - }; - /** - * @internal - */ - TreeContainer.prototype._getTreeNodeByKey = function (curNode, key) { - while (curNode) { - var cmpResult = this._cmp(curNode._key, key); - if (cmpResult < 0) { - curNode = curNode._right; - } else if (cmpResult > 0) { - curNode = curNode._left; - } else return curNode; - } - return curNode || this._header; - }; - TreeContainer.prototype.clear = function () { - this._length = 0; - this._root = undefined; - this._header._parent = undefined; - this._header._left = this._header._right = undefined; - }; - /** - * @description Update node's key by iterator. - * @param iter - The iterator you want to change. - * @param key - The key you want to update. - * @returns Whether the modification is successful. - * @example - * const st = new orderedSet([1, 2, 5]); - * const iter = st.find(2); - * st.updateKeyByIterator(iter, 3); // then st will become [1, 3, 5] - */ - TreeContainer.prototype.updateKeyByIterator = function (iter, key) { - var node = iter._node; - if (node === this._header) { - throwIteratorAccessError(); - } - if (this._length === 1) { - node._key = key; - return true; - } - var nextKey = node._next()._key; - if (node === this._header._left) { - if (this._cmp(nextKey, key) > 0) { - node._key = key; - return true; - } - return false; - } - var preKey = node._pre()._key; - if (node === this._header._right) { - if (this._cmp(preKey, key) < 0) { - node._key = key; - return true; - } - return false; - } - if (this._cmp(preKey, key) >= 0 || this._cmp(nextKey, key) <= 0) return false; - node._key = key; - return true; - }; - TreeContainer.prototype.eraseElementByPos = function (pos) { - if (pos < 0 || pos > this._length - 1) { - throw new RangeError(); - } - var node = this._inOrderTraversal(pos); - this._eraseNode(node); - return this._length; - }; - /** - * @description Remove the element of the specified key. - * @param key - The key you want to remove. - * @returns Whether erase successfully. - */ - TreeContainer.prototype.eraseElementByKey = function (key) { - if (this._length === 0) return false; - var curNode = this._getTreeNodeByKey(this._root, key); - if (curNode === this._header) return false; - this._eraseNode(curNode); - return true; - }; - TreeContainer.prototype.eraseElementByIterator = function (iter) { - var node = iter._node; - if (node === this._header) { - throwIteratorAccessError(); - } - var hasNoRight = node._right === undefined; - var isNormal = iter.iteratorType === 0 /* IteratorType.NORMAL */; - // For the normal iterator, the `next` node will be swapped to `this` node when has right. - if (isNormal) { - // So we should move it to next when it's right is null. - if (hasNoRight) iter.next(); - } else { - // For the reverse iterator, only when it doesn't have right and has left the `next` node will be swapped. - // So when it has right, or it is a leaf node we should move it to `next`. - if (!hasNoRight || node._left === undefined) iter.next(); - } - this._eraseNode(node); - return iter; - }; - /** - * @description Get the height of the tree. - * @returns Number about the height of the RB-tree. - */ - TreeContainer.prototype.getHeight = function () { - if (this._length === 0) return 0; - function traversal(curNode) { - if (!curNode) return 0; - return Math.max(traversal(curNode._left), traversal(curNode._right)) + 1; - } - return traversal(this._root); - }; - return TreeContainer; - }(Container); - - var TreeIterator = /** @class */function (_super) { - __extends(TreeIterator, _super); - /** - * @internal - */ - function TreeIterator(node, header, iteratorType) { - var _this = _super.call(this, iteratorType) || this; - _this._node = node; - _this._header = header; - if (_this.iteratorType === 0 /* IteratorType.NORMAL */) { - _this.pre = function () { - if (this._node === this._header._left) { - throwIteratorAccessError(); - } - this._node = this._node._pre(); - return this; - }; - _this.next = function () { - if (this._node === this._header) { - throwIteratorAccessError(); - } - this._node = this._node._next(); - return this; - }; - } else { - _this.pre = function () { - if (this._node === this._header._right) { - throwIteratorAccessError(); - } - this._node = this._node._next(); - return this; - }; - _this.next = function () { - if (this._node === this._header) { - throwIteratorAccessError(); - } - this._node = this._node._pre(); - return this; - }; - } - return _this; - } - Object.defineProperty(TreeIterator.prototype, "index", { - /** - * @description Get the sequential index of the iterator in the tree container.
- * Note: - * This function only takes effect when the specified tree container `enableIndex = true`. - * @returns The index subscript of the node in the tree. - * @example - * const st = new OrderedSet([1, 2, 3], true); - * console.log(st.begin().next().index); // 1 - */ - get: function () { - var _node = this._node; - var root = this._header._parent; - if (_node === this._header) { - if (root) { - return root._subTreeSize - 1; - } - return 0; - } - var index = 0; - if (_node._left) { - index += _node._left._subTreeSize; - } - while (_node !== root) { - var _parent = _node._parent; - if (_node === _parent._right) { - index += 1; - if (_parent._left) { - index += _parent._left._subTreeSize; - } - } - _node = _parent; - } - return index; - }, - enumerable: false, - configurable: true - }); - TreeIterator.prototype.isAccessible = function () { - return this._node !== this._header; - }; - return TreeIterator; - }(ContainerIterator); - - var OrderedMapIterator = /** @class */function (_super) { - __extends(OrderedMapIterator, _super); - function OrderedMapIterator(node, header, container, iteratorType) { - var _this = _super.call(this, node, header, iteratorType) || this; - _this.container = container; - return _this; - } - Object.defineProperty(OrderedMapIterator.prototype, "pointer", { - get: function () { - if (this._node === this._header) { - throwIteratorAccessError(); - } - var self = this; - return new Proxy([], { - get: function (target, prop) { - if (prop === '0') return self._node._key;else if (prop === '1') return self._node._value; - target[0] = self._node._key; - target[1] = self._node._value; - return target[prop]; - }, - set: function (_, prop, newValue) { - if (prop !== '1') { - throw new TypeError('prop must be 1'); - } - self._node._value = newValue; - return true; - } - }); - }, - enumerable: false, - configurable: true - }); - OrderedMapIterator.prototype.copy = function () { - return new OrderedMapIterator(this._node, this._header, this.container, this.iteratorType); - }; - return OrderedMapIterator; - }(TreeIterator); - var OrderedMap = /** @class */function (_super) { - __extends(OrderedMap, _super); - /** - * @param container - The initialization container. - * @param cmp - The compare function. - * @param enableIndex - Whether to enable iterator indexing function. - * @example - * new OrderedMap(); - * new OrderedMap([[0, 1], [2, 1]]); - * new OrderedMap([[0, 1], [2, 1]], (x, y) => x - y); - * new OrderedMap([[0, 1], [2, 1]], (x, y) => x - y, true); - */ - function OrderedMap(container, cmp, enableIndex) { - if (container === void 0) { - container = []; - } - var _this = _super.call(this, cmp, enableIndex) || this; - var self = _this; - container.forEach(function (el) { - self.setElement(el[0], el[1]); - }); - return _this; - } - OrderedMap.prototype.begin = function () { - return new OrderedMapIterator(this._header._left || this._header, this._header, this); - }; - OrderedMap.prototype.end = function () { - return new OrderedMapIterator(this._header, this._header, this); - }; - OrderedMap.prototype.rBegin = function () { - return new OrderedMapIterator(this._header._right || this._header, this._header, this, 1 /* IteratorType.REVERSE */); - }; - - OrderedMap.prototype.rEnd = function () { - return new OrderedMapIterator(this._header, this._header, this, 1 /* IteratorType.REVERSE */); - }; - - OrderedMap.prototype.front = function () { - if (this._length === 0) return; - var minNode = this._header._left; - return [minNode._key, minNode._value]; - }; - OrderedMap.prototype.back = function () { - if (this._length === 0) return; - var maxNode = this._header._right; - return [maxNode._key, maxNode._value]; - }; - OrderedMap.prototype.lowerBound = function (key) { - var resNode = this._lowerBound(this._root, key); - return new OrderedMapIterator(resNode, this._header, this); - }; - OrderedMap.prototype.upperBound = function (key) { - var resNode = this._upperBound(this._root, key); - return new OrderedMapIterator(resNode, this._header, this); - }; - OrderedMap.prototype.reverseLowerBound = function (key) { - var resNode = this._reverseLowerBound(this._root, key); - return new OrderedMapIterator(resNode, this._header, this); - }; - OrderedMap.prototype.reverseUpperBound = function (key) { - var resNode = this._reverseUpperBound(this._root, key); - return new OrderedMapIterator(resNode, this._header, this); - }; - OrderedMap.prototype.forEach = function (callback) { - this._inOrderTraversal(function (node, index, map) { - callback([node._key, node._value], index, map); - }); - }; - /** - * @description Insert a key-value pair or set value by the given key. - * @param key - The key want to insert. - * @param value - The value want to set. - * @param hint - You can give an iterator hint to improve insertion efficiency. - * @return The size of container after setting. - * @example - * const mp = new OrderedMap([[2, 0], [4, 0], [5, 0]]); - * const iter = mp.begin(); - * mp.setElement(1, 0); - * mp.setElement(3, 0, iter); // give a hint will be faster. - */ - OrderedMap.prototype.setElement = function (key, value, hint) { - return this._set(key, value, hint); - }; - OrderedMap.prototype.getElementByPos = function (pos) { - if (pos < 0 || pos > this._length - 1) { - throw new RangeError(); - } - var node = this._inOrderTraversal(pos); - return [node._key, node._value]; - }; - OrderedMap.prototype.find = function (key) { - var curNode = this._getTreeNodeByKey(this._root, key); - return new OrderedMapIterator(curNode, this._header, this); - }; - /** - * @description Get the value of the element of the specified key. - * @param key - The specified key you want to get. - * @example - * const val = container.getElementByKey(1); - */ - OrderedMap.prototype.getElementByKey = function (key) { - var curNode = this._getTreeNodeByKey(this._root, key); - return curNode._value; - }; - OrderedMap.prototype.union = function (other) { - var self = this; - other.forEach(function (el) { - self.setElement(el[0], el[1]); - }); - return this._length; - }; - OrderedMap.prototype[Symbol.iterator] = function () { - var length, nodeList, i, node; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - length = this._length; - nodeList = this._inOrderTraversal(); - i = 0; - _a.label = 1; - case 1: - if (!(i < length)) return [3 /*break*/, 4]; - node = nodeList[i]; - return [4 /*yield*/, [node._key, node._value]]; - case 2: - _a.sent(); - _a.label = 3; - case 3: - ++i; - return [3 /*break*/, 1]; - case 4: - return [2 /*return*/]; - } - }); - }; - - return OrderedMap; - }(TreeContainer); - - exports.OrderedMap = OrderedMap; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/@js-sdsl/ordered-map/dist/umd/ordered-map.min.js b/node_modules/@js-sdsl/ordered-map/dist/umd/ordered-map.min.js deleted file mode 100644 index 3c9dbf4..0000000 --- a/node_modules/@js-sdsl/ordered-map/dist/umd/ordered-map.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * @js-sdsl/ordered-map v4.4.2 - * https://github.com/js-sdsl/js-sdsl - * (c) 2021-present ZLY201 - * MIT license - */ -!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self).sdsl={})}(this,function(t){"use strict";var r=function(t,i){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,i){t.__proto__=i}:function(t,i){for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}))(t,i)};function i(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function e(){this.constructor=t}r(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}function o(r,n){var o,s,h,u={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]},f={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(f[Symbol.iterator]=function(){return this}),f;function t(e){return function(t){var i=[e,t];if(o)throw new TypeError("Generator is already executing.");for(;u=f&&i[f=0]?0:u;)try{if(o=1,s&&(h=2&i[0]?s.return:i[0]?s.throw||((h=s.return)&&h.call(s),0):s.next)&&!(h=h.call(s,i[1])).done)return h;switch(s=0,(i=h?[2&i[0],h.value]:i)[0]){case 0:case 1:h=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,s=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(h=0<(h=u.trys).length&&h[h.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!h||i[1]>h[0]&&i[1]this.C-1)throw new RangeError;t=this.P(t);return this.G(t),this.C},A.prototype.eraseElementByKey=function(t){return 0!==this.C&&(t=this.F(this.g,t))!==this.A&&(this.G(t),!0)},A.prototype.eraseElementByIterator=function(t){var i=t.M,e=(i===this.A&&v(),void 0===i.i);return 0===t.iteratorType?e&&t.next():e&&void 0!==i.t||t.next(),this.G(i),t},A.prototype.getHeight=function(){return 0===this.C?0:function t(i){return i?Math.max(t(i.t),t(i.i))+1:0}(this.g)};var d,a=A;function A(t,i){void 0===t&&(t=function(t,i){return tthis.C-1)throw new RangeError;t=this.P(t);return[t.h,t.o]},O.prototype.find=function(t){t=this.F(this.g,t);return new M(t,this.A,this)},O.prototype.getElementByKey=function(t){return this.F(this.g,t).o},O.prototype.union=function(t){var i=this;return t.forEach(function(t){i.setElement(t[0],t[1])}),this.C},O.prototype[Symbol.iterator]=function(){var i,e,r,n;return o(this,function(t){switch(t.label){case 0:i=this.C,e=this.P(),r=0,t.label=1;case 1:return r`**
- Returns a promise from a node-style callback function. - -**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/aspromise/index.d.ts b/node_modules/@protobufjs/aspromise/index.d.ts deleted file mode 100644 index 3db03db..0000000 --- a/node_modules/@protobufjs/aspromise/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export = asPromise; - -type asPromiseCallback = (error: Error | null, ...params: any[]) => {}; - -/** - * Returns a promise from a node-style callback function. - * @memberof util - * @param {asPromiseCallback} fn Function to call - * @param {*} ctx Function context - * @param {...*} params Function arguments - * @returns {Promise<*>} Promisified function - */ -declare function asPromise(fn: asPromiseCallback, ctx: any, ...params: any[]): Promise; diff --git a/node_modules/@protobufjs/aspromise/index.js b/node_modules/@protobufjs/aspromise/index.js deleted file mode 100644 index d6f642c..0000000 --- a/node_modules/@protobufjs/aspromise/index.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -module.exports = asPromise; - -/** - * Callback as used by {@link util.asPromise}. - * @typedef asPromiseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {...*} params Additional arguments - * @returns {undefined} - */ - -/** - * Returns a promise from a node-style callback function. - * @memberof util - * @param {asPromiseCallback} fn Function to call - * @param {*} ctx Function context - * @param {...*} params Function arguments - * @returns {Promise<*>} Promisified function - */ -function asPromise(fn, ctx/*, varargs */) { - var params = new Array(arguments.length - 1), - offset = 0, - index = 2, - pending = true; - while (index < arguments.length) - params[offset++] = arguments[index++]; - return new Promise(function executor(resolve, reject) { - params[offset] = function callback(err/*, varargs */) { - if (pending) { - pending = false; - if (err) - reject(err); - else { - var params = new Array(arguments.length - 1), - offset = 0; - while (offset < params.length) - params[offset++] = arguments[offset]; - resolve.apply(null, params); - } - } - }; - try { - fn.apply(ctx || null, params); - } catch (err) { - if (pending) { - pending = false; - reject(err); - } - } - }); -} diff --git a/node_modules/@protobufjs/aspromise/package.json b/node_modules/@protobufjs/aspromise/package.json deleted file mode 100644 index aa8eaef..0000000 --- a/node_modules/@protobufjs/aspromise/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@protobufjs/aspromise", - "description": "Returns a promise from a node-style callback function.", - "version": "1.1.2", - "author": "Daniel Wirtz ", - "repository": { - "type": "git", - "url": "https://github.com/dcodeIO/protobuf.js.git" - }, - "license": "BSD-3-Clause", - "main": "index.js", - "types": "index.d.ts", - "devDependencies": { - "istanbul": "^0.4.5", - "tape": "^4.6.3" - }, - "scripts": { - "test": "tape tests/*.js", - "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" - } -} \ No newline at end of file diff --git a/node_modules/@protobufjs/aspromise/tests/index.js b/node_modules/@protobufjs/aspromise/tests/index.js deleted file mode 100644 index cfdb258..0000000 --- a/node_modules/@protobufjs/aspromise/tests/index.js +++ /dev/null @@ -1,130 +0,0 @@ -var tape = require("tape"); - -var asPromise = require(".."); - -tape.test("aspromise", function(test) { - - test.test(this.name + " - resolve", function(test) { - - function fn(arg1, arg2, callback) { - test.equal(this, ctx, "function should be called with this = ctx"); - test.equal(arg1, 1, "function should be called with arg1 = 1"); - test.equal(arg2, 2, "function should be called with arg2 = 2"); - callback(null, arg2); - } - - var ctx = {}; - - var promise = asPromise(fn, ctx, 1, 2); - promise.then(function(arg2) { - test.equal(arg2, 2, "promise should be resolved with arg2 = 2"); - test.end(); - }).catch(function(err) { - test.fail("promise should not be rejected (" + err + ")"); - }); - }); - - test.test(this.name + " - reject", function(test) { - - function fn(arg1, arg2, callback) { - test.equal(this, ctx, "function should be called with this = ctx"); - test.equal(arg1, 1, "function should be called with arg1 = 1"); - test.equal(arg2, 2, "function should be called with arg2 = 2"); - callback(arg1); - } - - var ctx = {}; - - var promise = asPromise(fn, ctx, 1, 2); - promise.then(function() { - test.fail("promise should not be resolved"); - }).catch(function(err) { - test.equal(err, 1, "promise should be rejected with err = 1"); - test.end(); - }); - }); - - test.test(this.name + " - resolve twice", function(test) { - - function fn(arg1, arg2, callback) { - test.equal(this, ctx, "function should be called with this = ctx"); - test.equal(arg1, 1, "function should be called with arg1 = 1"); - test.equal(arg2, 2, "function should be called with arg2 = 2"); - callback(null, arg2); - callback(null, arg1); - } - - var ctx = {}; - var count = 0; - - var promise = asPromise(fn, ctx, 1, 2); - promise.then(function(arg2) { - test.equal(arg2, 2, "promise should be resolved with arg2 = 2"); - if (++count > 1) - test.fail("promise should not be resolved twice"); - test.end(); - }).catch(function(err) { - test.fail("promise should not be rejected (" + err + ")"); - }); - }); - - test.test(this.name + " - reject twice", function(test) { - - function fn(arg1, arg2, callback) { - test.equal(this, ctx, "function should be called with this = ctx"); - test.equal(arg1, 1, "function should be called with arg1 = 1"); - test.equal(arg2, 2, "function should be called with arg2 = 2"); - callback(arg1); - callback(arg2); - } - - var ctx = {}; - var count = 0; - - var promise = asPromise(fn, ctx, 1, 2); - promise.then(function() { - test.fail("promise should not be resolved"); - }).catch(function(err) { - test.equal(err, 1, "promise should be rejected with err = 1"); - if (++count > 1) - test.fail("promise should not be rejected twice"); - test.end(); - }); - }); - - test.test(this.name + " - reject error", function(test) { - - function fn(callback) { - test.ok(arguments.length === 1 && typeof callback === "function", "function should be called with just a callback"); - throw 3; - } - - var promise = asPromise(fn, null); - promise.then(function() { - test.fail("promise should not be resolved"); - }).catch(function(err) { - test.equal(err, 3, "promise should be rejected with err = 3"); - test.end(); - }); - }); - - test.test(this.name + " - reject and error", function(test) { - - function fn(callback) { - callback(3); - throw 4; - } - - var count = 0; - - var promise = asPromise(fn, null); - promise.then(function() { - test.fail("promise should not be resolved"); - }).catch(function(err) { - test.equal(err, 3, "promise should be rejected with err = 3"); - if (++count > 1) - test.fail("promise should not be rejected twice"); - test.end(); - }); - }); -}); diff --git a/node_modules/@protobufjs/base64/LICENSE b/node_modules/@protobufjs/base64/LICENSE deleted file mode 100644 index be2b397..0000000 --- a/node_modules/@protobufjs/base64/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2016, Daniel Wirtz All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/base64/README.md b/node_modules/@protobufjs/base64/README.md deleted file mode 100644 index b06cb0a..0000000 --- a/node_modules/@protobufjs/base64/README.md +++ /dev/null @@ -1,19 +0,0 @@ -@protobufjs/base64 -================== -[![npm](https://img.shields.io/npm/v/@protobufjs/base64.svg)](https://www.npmjs.com/package/@protobufjs/base64) - -A minimal base64 implementation for number arrays. - -API ---- - -* **base64.length(string: `string`): `number`**
- Calculates the byte length of a base64 encoded string. - -* **base64.encode(buffer: `Uint8Array`, start: `number`, end: `number`): `string`**
- Encodes a buffer to a base64 encoded string. - -* **base64.decode(string: `string`, buffer: `Uint8Array`, offset: `number`): `number`**
- Decodes a base64 encoded string to a buffer. - -**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/base64/index.d.ts b/node_modules/@protobufjs/base64/index.d.ts deleted file mode 100644 index 085d0a7..0000000 --- a/node_modules/@protobufjs/base64/index.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Calculates the byte length of a base64 encoded string. - * @param {string} string Base64 encoded string - * @returns {number} Byte length - */ -export function length(string: string): number; - -/** - * Encodes a buffer to a base64 encoded string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} Base64 encoded string - */ -export function encode(buffer: Uint8Array, start: number, end: number): string; - -/** - * Decodes a base64 encoded string to a buffer. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Number of bytes written - * @throws {Error} If encoding is invalid - */ -export function decode(string: string, buffer: Uint8Array, offset: number): number; - -/** - * Tests if the specified string appears to be base64 encoded. - * @param {string} string String to test - * @returns {boolean} `true` if it appears to be base64 encoded, otherwise false - */ -export function test(string: string): boolean; diff --git a/node_modules/@protobufjs/base64/index.js b/node_modules/@protobufjs/base64/index.js deleted file mode 100644 index 6146f54..0000000 --- a/node_modules/@protobufjs/base64/index.js +++ /dev/null @@ -1,139 +0,0 @@ -"use strict"; - -/** - * A minimal base64 implementation for number arrays. - * @memberof util - * @namespace - */ -var base64 = exports; - -/** - * Calculates the byte length of a base64 encoded string. - * @param {string} string Base64 encoded string - * @returns {number} Byte length - */ -base64.length = function length(string) { - var p = string.length; - if (!p) - return 0; - var n = 0; - while (--p % 4 > 1 && string.charAt(p) === "=") - ++n; - return Math.ceil(string.length * 3) / 4 - n; -}; - -// Base64 encoding table -var b64 = new Array(64); - -// Base64 decoding table -var s64 = new Array(123); - -// 65..90, 97..122, 48..57, 43, 47 -for (var i = 0; i < 64;) - s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; - -/** - * Encodes a buffer to a base64 encoded string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} Base64 encoded string - */ -base64.encode = function encode(buffer, start, end) { - var parts = null, - chunk = []; - var i = 0, // output index - j = 0, // goto index - t; // temporary - while (start < end) { - var b = buffer[start++]; - switch (j) { - case 0: - chunk[i++] = b64[b >> 2]; - t = (b & 3) << 4; - j = 1; - break; - case 1: - chunk[i++] = b64[t | b >> 4]; - t = (b & 15) << 2; - j = 2; - break; - case 2: - chunk[i++] = b64[t | b >> 6]; - chunk[i++] = b64[b & 63]; - j = 0; - break; - } - if (i > 8191) { - (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); - i = 0; - } - } - if (j) { - chunk[i++] = b64[t]; - chunk[i++] = 61; - if (j === 1) - chunk[i++] = 61; - } - if (parts) { - if (i) - parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); - return parts.join(""); - } - return String.fromCharCode.apply(String, chunk.slice(0, i)); -}; - -var invalidEncoding = "invalid encoding"; - -/** - * Decodes a base64 encoded string to a buffer. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Number of bytes written - * @throws {Error} If encoding is invalid - */ -base64.decode = function decode(string, buffer, offset) { - var start = offset; - var j = 0, // goto index - t; // temporary - for (var i = 0; i < string.length;) { - var c = string.charCodeAt(i++); - if (c === 61 && j > 1) - break; - if ((c = s64[c]) === undefined) - throw Error(invalidEncoding); - switch (j) { - case 0: - t = c; - j = 1; - break; - case 1: - buffer[offset++] = t << 2 | (c & 48) >> 4; - t = c; - j = 2; - break; - case 2: - buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; - t = c; - j = 3; - break; - case 3: - buffer[offset++] = (t & 3) << 6 | c; - j = 0; - break; - } - } - if (j === 1) - throw Error(invalidEncoding); - return offset - start; -}; - -/** - * Tests if the specified string appears to be base64 encoded. - * @param {string} string String to test - * @returns {boolean} `true` if probably base64 encoded, otherwise false - */ -base64.test = function test(string) { - return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); -}; diff --git a/node_modules/@protobufjs/base64/package.json b/node_modules/@protobufjs/base64/package.json deleted file mode 100644 index f119811..0000000 --- a/node_modules/@protobufjs/base64/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@protobufjs/base64", - "description": "A minimal base64 implementation for number arrays.", - "version": "1.1.2", - "author": "Daniel Wirtz ", - "repository": { - "type": "git", - "url": "https://github.com/dcodeIO/protobuf.js.git" - }, - "license": "BSD-3-Clause", - "main": "index.js", - "types": "index.d.ts", - "devDependencies": { - "istanbul": "^0.4.5", - "tape": "^4.6.3" - }, - "scripts": { - "test": "tape tests/*.js", - "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" - } -} \ No newline at end of file diff --git a/node_modules/@protobufjs/base64/tests/index.js b/node_modules/@protobufjs/base64/tests/index.js deleted file mode 100644 index 6ede32c..0000000 --- a/node_modules/@protobufjs/base64/tests/index.js +++ /dev/null @@ -1,46 +0,0 @@ -var tape = require("tape"); - -var base64 = require(".."); - -var strings = { - "": "", - "a": "YQ==", - "ab": "YWI=", - "abcdefg": "YWJjZGVmZw==", - "abcdefgh": "YWJjZGVmZ2g=", - "abcdefghi": "YWJjZGVmZ2hp" -}; - -tape.test("base64", function(test) { - - Object.keys(strings).forEach(function(str) { - var enc = strings[str]; - - test.equal(base64.test(enc), true, "should detect '" + enc + "' to be base64 encoded"); - - var len = base64.length(enc); - test.equal(len, str.length, "should calculate '" + enc + "' as " + str.length + " bytes"); - - var buf = new Array(len); - var len2 = base64.decode(enc, buf, 0); - test.equal(len2, len, "should decode '" + enc + "' to " + len + " bytes"); - - test.equal(String.fromCharCode.apply(String, buf), str, "should decode '" + enc + "' to '" + str + "'"); - - var enc2 = base64.encode(buf, 0, buf.length); - test.equal(enc2, enc, "should encode '" + str + "' to '" + enc + "'"); - - }); - - test.throws(function() { - var buf = new Array(10); - base64.decode("YQ!", buf, 0); - }, Error, "should throw if encoding is invalid"); - - test.throws(function() { - var buf = new Array(10); - base64.decode("Y", buf, 0); - }, Error, "should throw if string is truncated"); - - test.end(); -}); diff --git a/node_modules/@protobufjs/codegen/LICENSE b/node_modules/@protobufjs/codegen/LICENSE deleted file mode 100644 index be2b397..0000000 --- a/node_modules/@protobufjs/codegen/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2016, Daniel Wirtz All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/codegen/README.md b/node_modules/@protobufjs/codegen/README.md deleted file mode 100644 index 577c43e..0000000 --- a/node_modules/@protobufjs/codegen/README.md +++ /dev/null @@ -1,49 +0,0 @@ -@protobufjs/codegen -=================== -[![npm](https://img.shields.io/npm/v/@protobufjs/codegen.svg)](https://www.npmjs.com/package/@protobufjs/codegen) - -A minimalistic code generation utility. - -API ---- - -* **codegen([functionParams: `string[]`], [functionName: string]): `Codegen`**
- Begins generating a function. - -* **codegen.verbose = `false`**
- When set to true, codegen will log generated code to console. Useful for debugging. - -Invoking **codegen** returns an appender function that appends code to the function's body and returns itself: - -* **Codegen(formatString: `string`, [...formatParams: `any`]): Codegen**
- Appends code to the function's body. The format string can contain placeholders specifying the types of inserted format parameters: - - * `%d`: Number (integer or floating point value) - * `%f`: Floating point value - * `%i`: Integer value - * `%j`: JSON.stringify'ed value - * `%s`: String value - * `%%`: Percent sign
- -* **Codegen([scope: `Object.`]): `Function`**
- Finishes the function and returns it. - -* **Codegen.toString([functionNameOverride: `string`]): `string`**
- Returns the function as a string. - -Example -------- - -```js -var codegen = require("@protobufjs/codegen"); - -var add = codegen(["a", "b"], "add") // A function with parameters "a" and "b" named "add" - ("// awesome comment") // adds the line to the function's body - ("return a + b - c + %d", 1) // replaces %d with 1 and adds the line to the body - ({ c: 1 }); // adds "c" with a value of 1 to the function's scope - -console.log(add.toString()); // function add(a, b) { return a + b - c + 1 } -console.log(add(1, 2)); // calculates 1 + 2 - 1 + 1 = 3 -``` - -**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/codegen/index.d.ts b/node_modules/@protobufjs/codegen/index.d.ts deleted file mode 100644 index f8ed908..0000000 --- a/node_modules/@protobufjs/codegen/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export = codegen; - -/** - * Appends code to the function's body. - * @param [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any - * @param [formatParams] Format parameters - * @returns Itself or the generated function if finished - * @throws {Error} If format parameter counts do not match - */ -type Codegen = (formatStringOrScope?: (string|{ [k: string]: any }), ...formatParams: any[]) => (Codegen|Function); - -/** - * Begins generating a function. - * @param functionParams Function parameter names - * @param [functionName] Function name if not anonymous - * @returns Appender that appends code to the function's body - */ -declare function codegen(functionParams: string[], functionName?: string): Codegen; - -/** - * Begins generating a function. - * @param [functionName] Function name if not anonymous - * @returns Appender that appends code to the function's body - */ -declare function codegen(functionName?: string): Codegen; - -declare namespace codegen { - - /** When set to `true`, codegen will log generated code to console. Useful for debugging. */ - let verbose: boolean; -} diff --git a/node_modules/@protobufjs/codegen/index.js b/node_modules/@protobufjs/codegen/index.js deleted file mode 100644 index f3e736c..0000000 --- a/node_modules/@protobufjs/codegen/index.js +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; -module.exports = codegen; - -var reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/; - -/** - * Begins generating a function. - * @memberof util - * @param {string[]} functionParams Function parameter names - * @param {string} [functionName] Function name if not anonymous - * @returns {Codegen} Appender that appends code to the function's body - */ -function codegen(functionParams, functionName) { - - /* istanbul ignore if */ - if (typeof functionParams === "string") { - functionName = functionParams; - functionParams = undefined; - } - - var body = []; - - /** - * Appends code to the function's body or finishes generation. - * @typedef Codegen - * @type {function} - * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any - * @param {...*} [formatParams] Format parameters - * @returns {Codegen|Function} Itself or the generated function if finished - * @throws {Error} If format parameter counts do not match - */ - - function Codegen(formatStringOrScope) { - // note that explicit array handling below makes this ~50% faster - - // finish the function - if (typeof formatStringOrScope !== "string") { - var source = toString(); - if (codegen.verbose) - console.log("codegen: " + source); // eslint-disable-line no-console - source = "return " + source; - if (formatStringOrScope) { - var scopeKeys = Object.keys(formatStringOrScope), - scopeParams = new Array(scopeKeys.length + 1), - scopeValues = new Array(scopeKeys.length), - scopeOffset = 0; - while (scopeOffset < scopeKeys.length) { - scopeParams[scopeOffset] = scopeKeys[scopeOffset]; - scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]]; - } - scopeParams[scopeOffset] = source; - return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func - } - return Function(source)(); // eslint-disable-line no-new-func - } - - // otherwise append to body - var formatParams = new Array(arguments.length - 1), - formatOffset = 0; - while (formatOffset < formatParams.length) - formatParams[formatOffset] = arguments[++formatOffset]; - formatOffset = 0; - formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) { - var value = formatParams[formatOffset++]; - switch ($1) { - case "d": case "f": return String(Number(value)); - case "i": return String(Math.floor(value)); - case "j": return JSON.stringify(value); - case "s": return String(value); - } - return "%"; - }); - if (formatOffset !== formatParams.length) - throw Error("parameter count mismatch"); - body.push(formatStringOrScope); - return Codegen; - } - - function toString(functionNameOverride) { - return "function " + safeFunctionName(functionNameOverride || functionName) + "(" + (functionParams && functionParams.join(",") || "") + "){\n " + body.join("\n ") + "\n}"; - } - - Codegen.toString = toString; - return Codegen; -} - -/** - * Begins generating a function. - * @memberof util - * @function codegen - * @param {string} [functionName] Function name if not anonymous - * @returns {Codegen} Appender that appends code to the function's body - * @variation 2 - */ - -/** - * When set to `true`, codegen will log generated code to console. Useful for debugging. - * @name util.codegen.verbose - * @type {boolean} - */ -codegen.verbose = false; - -function safeFunctionName(name) { - if (!name) - return ""; - name = String(name).replace(/[^\w$]/g, ""); - if (!name) - return ""; - if (/^\d/.test(name)) - name = "_" + name; - return reservedRe.test(name) ? name + "_" : name; -} diff --git a/node_modules/@protobufjs/codegen/package.json b/node_modules/@protobufjs/codegen/package.json deleted file mode 100644 index 65200d1..0000000 --- a/node_modules/@protobufjs/codegen/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@protobufjs/codegen", - "description": "A minimalistic code generation utility.", - "version": "2.0.5", - "author": "Daniel Wirtz ", - "repository": { - "type": "git", - "url": "https://github.com/dcodeIO/protobuf.js.git" - }, - "license": "BSD-3-Clause", - "main": "index.js", - "types": "index.d.ts" -} \ No newline at end of file diff --git a/node_modules/@protobufjs/codegen/tests/index.js b/node_modules/@protobufjs/codegen/tests/index.js deleted file mode 100644 index b189117..0000000 --- a/node_modules/@protobufjs/codegen/tests/index.js +++ /dev/null @@ -1,13 +0,0 @@ -var codegen = require(".."); - -// new require("benchmark").Suite().add("add", function() { - -var add = codegen(["a", "b"], "add") - ("// awesome comment") - ("return a + b - c + %d", 1) - ({ c: 1 }); - -if (add(1, 2) !== 3) - throw Error("failed"); - -// }).on("cycle", function(event) { process.stdout.write(String(event.target) + "\n"); }).run(); diff --git a/node_modules/@protobufjs/eventemitter/CHANGELOG.md b/node_modules/@protobufjs/eventemitter/CHANGELOG.md deleted file mode 100644 index 1a15e37..0000000 --- a/node_modules/@protobufjs/eventemitter/CHANGELOG.md +++ /dev/null @@ -1,8 +0,0 @@ -# Changelog - -## [1.1.1](https://github.com/protobufjs/protobuf.js/compare/eventemitter-v1.1.0...eventemitter-v1.1.1) (2026-05-22) - - -### Bug Fixes - -* Backport misc utility hardening ([#2280](https://github.com/protobufjs/protobuf.js/issues/2280)) ([8a45c13](https://github.com/protobufjs/protobuf.js/commit/8a45c13d22ec2d05ab1b7935fcb5331ea59a9cd0)) diff --git a/node_modules/@protobufjs/eventemitter/LICENSE b/node_modules/@protobufjs/eventemitter/LICENSE deleted file mode 100644 index be2b397..0000000 --- a/node_modules/@protobufjs/eventemitter/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2016, Daniel Wirtz All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/eventemitter/README.md b/node_modules/@protobufjs/eventemitter/README.md deleted file mode 100644 index 528e725..0000000 --- a/node_modules/@protobufjs/eventemitter/README.md +++ /dev/null @@ -1,22 +0,0 @@ -@protobufjs/eventemitter -======================== -[![npm](https://img.shields.io/npm/v/@protobufjs/eventemitter.svg)](https://www.npmjs.com/package/@protobufjs/eventemitter) - -A minimal event emitter. - -API ---- - -* **new EventEmitter()**
- Constructs a new event emitter instance. - -* **EventEmitter#on(evt: `string`, fn: `function`, [ctx: `Object`]): `EventEmitter`**
- Registers an event listener. - -* **EventEmitter#off([evt: `string`], [fn: `function`]): `EventEmitter`**
- Removes an event listener or any matching listeners if arguments are omitted. - -* **EventEmitter#emit(evt: `string`, ...args: `*`): `EventEmitter`**
- Emits an event by calling its listeners with the specified arguments. - -**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/eventemitter/index.d.ts b/node_modules/@protobufjs/eventemitter/index.d.ts deleted file mode 100644 index ae967ec..0000000 --- a/node_modules/@protobufjs/eventemitter/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -export = EventEmitter; - -type EventEmitterListener = (...args: any[]) => {}; - -/** - * Constructs a new event emitter instance. - * @classdesc A minimal event emitter. - * @memberof util - * @constructor - */ -declare class EventEmitter { - - /** - * Constructs a new event emitter instance. - * @classdesc A minimal event emitter. - * @memberof util - * @constructor - */ - constructor(); - - /** - * Registers an event listener. - * @param {string} evt Event name - * @param {EventEmitterListener} fn Listener - * @param {*} [ctx] Listener context - * @returns {this} `this` - */ - public on(evt: string, fn: EventEmitterListener, ctx?: any): EventEmitter; - - /** - * Removes an event listener or any matching listeners if arguments are omitted. - * @param {string} [evt] Event name. Removes all listeners if omitted. - * @param {EventEmitterListener} [fn] Listener to remove. Removes all listeners of `evt` if omitted. - * @returns {this} `this` - */ - public off(evt?: string, fn?: EventEmitterListener): EventEmitter; - - /** - * Emits an event by calling its listeners with the specified arguments. - * @param {string} evt Event name - * @param {...*} args Arguments - * @returns {this} `this` - */ - public emit(evt: string, ...args: any[]): EventEmitter; -} diff --git a/node_modules/@protobufjs/eventemitter/index.js b/node_modules/@protobufjs/eventemitter/index.js deleted file mode 100644 index b369b47..0000000 --- a/node_modules/@protobufjs/eventemitter/index.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -module.exports = EventEmitter; - -/** - * Constructs a new event emitter instance. - * @classdesc A minimal event emitter. - * @memberof util - * @constructor - */ -function EventEmitter() { - - /** - * Registered listeners. - * @type {Object.} - * @private - */ - this._listeners = Object.create(null); -} - -/** - * Event listener as used by {@link util.EventEmitter}. - * @typedef EventEmitterListener - * @type {function} - * @param {...*} args Arguments - * @returns {undefined} - */ - -/** - * Registers an event listener. - * @param {string} evt Event name - * @param {EventEmitterListener} fn Listener - * @param {*} [ctx] Listener context - * @returns {this} `this` - */ -EventEmitter.prototype.on = function on(evt, fn, ctx) { - (this._listeners[evt] || (this._listeners[evt] = [])).push({ - fn : fn, - ctx : ctx || this - }); - return this; -}; - -/** - * Removes an event listener or any matching listeners if arguments are omitted. - * @param {string} [evt] Event name. Removes all listeners if omitted. - * @param {EventEmitterListener} [fn] Listener to remove. Removes all listeners of `evt` if omitted. - * @returns {this} `this` - */ -EventEmitter.prototype.off = function off(evt, fn) { - if (evt === undefined) - this._listeners = Object.create(null); - else { - if (fn === undefined) - this._listeners[evt] = []; - else { - var listeners = this._listeners[evt]; - if (!listeners) - return this; - for (var i = 0; i < listeners.length;) - if (listeners[i].fn === fn) - listeners.splice(i, 1); - else - ++i; - } - } - return this; -}; - -/** - * Emits an event by calling its listeners with the specified arguments. - * @param {string} evt Event name - * @param {...*} args Arguments - * @returns {this} `this` - */ -EventEmitter.prototype.emit = function emit(evt) { - var listeners = this._listeners[evt]; - if (listeners) { - var args = [], - i = 1; - for (; i < arguments.length;) - args.push(arguments[i++]); - for (i = 0; i < listeners.length;) - listeners[i].fn.apply(listeners[i++].ctx, args); - } - return this; -}; diff --git a/node_modules/@protobufjs/eventemitter/package.json b/node_modules/@protobufjs/eventemitter/package.json deleted file mode 100644 index e06330e..0000000 --- a/node_modules/@protobufjs/eventemitter/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@protobufjs/eventemitter", - "description": "A minimal event emitter.", - "version": "1.1.1", - "author": "Daniel Wirtz ", - "repository": { - "type": "git", - "url": "https://github.com/dcodeIO/protobuf.js.git" - }, - "license": "BSD-3-Clause", - "main": "index.js", - "types": "index.d.ts", - "devDependencies": { - "istanbul": "^0.4.5", - "tape": "^5.0.0" - }, - "scripts": { - "test": "tape tests/*.js", - "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" - } -} \ No newline at end of file diff --git a/node_modules/@protobufjs/eventemitter/tests/index.js b/node_modules/@protobufjs/eventemitter/tests/index.js deleted file mode 100644 index cf05780..0000000 --- a/node_modules/@protobufjs/eventemitter/tests/index.js +++ /dev/null @@ -1,83 +0,0 @@ -var tape = require("tape"); - -var EventEmitter = require(".."); - -tape.test("eventemitter", function(test) { - - var ee = new EventEmitter(); - var fn; - var ctx = {}; - - test.equal(Object.getPrototypeOf(ee._listeners), null, "should not inherit listener lookup keys"); - - test.doesNotThrow(function() { - ee.emit("a", 1); - ee.off(); - ee.off("a"); - ee.off("a", function() {}); - }, "should not throw if no listeners are registered"); - - test.equal(ee.on("a", function(arg1) { - test.equal(this, ctx, "should be called with this = ctx"); - test.equal(arg1, 1, "should be called with arg1 = 1"); - }, ctx), ee, "should return itself when registering events"); - ee.emit("a", 1); - - ee.off("a"); - test.same(Object.keys(ee._listeners), [ "a" ], "should keep the event key when calling off(evt)"); - test.same(ee._listeners.a, [], "should remove all listeners of the respective event when calling off(evt)"); - - ee.off(); - test.equal(Object.getPrototypeOf(ee._listeners), null, "should keep the listener table isolated when just calling off()"); - test.same(Object.keys(ee._listeners), [], "should remove all listeners when just calling off()"); - - ee.on("a", fn = function(arg1) { - test.equal(this, ctx, "should be called with this = ctx"); - test.equal(arg1, 1, "should be called with arg1 = 1"); - }, ctx).emit("a", 1); - - ee.off("a", fn); - test.same(Object.keys(ee._listeners), [ "a" ], "should keep the event key when calling off(evt, fn)"); - test.same(ee._listeners.a, [], "should remove the exact listener when calling off(evt, fn)"); - - ee.on("a", function() { - test.equal(this, ee, "should be called with this = ee"); - }).emit("a"); - - test.doesNotThrow(function() { - ee.off("a", fn); - }, "should not throw if no such listener is found"); - - test.test(test.name + " - special event names", function(test) { - var ee = new EventEmitter(); - var calls = 0; - - test.doesNotThrow(function() { - ee.off("__proto__", function() {}); - }, "should not throw when removing an absent special event listener"); - - ee.on("__proto__", function(arg) { - ++calls; - test.equal(arg, 1, "should pass arguments for __proto__ events"); - }); - ee.on("constructor", function(arg) { - ++calls; - test.equal(arg, 2, "should pass arguments for constructor events"); - }); - ee.emit("__proto__", 1); - ee.emit("constructor", 2); - - test.equal(calls, 2, "should dispatch special event names"); - test.equal(Object.getPrototypeOf(ee._listeners), null, "should keep the listener table isolated"); - test.ok(Object.prototype.hasOwnProperty.call(ee._listeners, "__proto__"), "should store __proto__ as an own event key"); - test.ok(Object.prototype.hasOwnProperty.call(ee._listeners, "constructor"), "should store constructor as an own event key"); - - ee.off("__proto__"); - ee.off("constructor"); - test.same(ee._listeners.__proto__, [], "should clear __proto__ listeners"); - test.same(ee._listeners.constructor, [], "should clear constructor listeners"); - test.end(); - }); - - test.end(); -}); diff --git a/node_modules/@protobufjs/fetch/CHANGELOG.md b/node_modules/@protobufjs/fetch/CHANGELOG.md deleted file mode 100644 index c31d51d..0000000 --- a/node_modules/@protobufjs/fetch/CHANGELOG.md +++ /dev/null @@ -1,8 +0,0 @@ -# Changelog - -## [1.1.1](https://github.com/protobufjs/protobuf.js/compare/fetch-v1.1.0...fetch-v1.1.1) (2026-05-17) - - -### Bug Fixes - -* Backport bundler-safe optional module lookups ([#2254](https://github.com/protobufjs/protobuf.js/issues/2254)) ([0853a62](https://github.com/protobufjs/protobuf.js/commit/0853a625680f9247596b84ef48082b8f4e554797)) diff --git a/node_modules/@protobufjs/fetch/LICENSE b/node_modules/@protobufjs/fetch/LICENSE deleted file mode 100644 index be2b397..0000000 --- a/node_modules/@protobufjs/fetch/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2016, Daniel Wirtz All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/fetch/README.md b/node_modules/@protobufjs/fetch/README.md deleted file mode 100644 index 1ebf4d4..0000000 --- a/node_modules/@protobufjs/fetch/README.md +++ /dev/null @@ -1,13 +0,0 @@ -@protobufjs/fetch -================= -[![npm](https://img.shields.io/npm/v/@protobufjs/fetch.svg)](https://www.npmjs.com/package/@protobufjs/fetch) - -Fetches the contents of a file accross node and browsers. - -API ---- - -* **fetch(path: `string`, [options: { binary: boolean } ], [callback: `function(error: ?Error, [contents: string])`]): `Promise|undefined`** - Fetches the contents of a file. - -**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/fetch/index.d.ts b/node_modules/@protobufjs/fetch/index.d.ts deleted file mode 100644 index a3c5838..0000000 --- a/node_modules/@protobufjs/fetch/index.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -export = fetch; - -/** - * Node-style callback as used by {@link util.fetch}. - * @typedef FetchCallback - * @type {function} - * @param {?Error} error Error, if any, otherwise `null` - * @param {string} [contents] File contents, if there hasn't been an error - * @returns {undefined} - */ -type FetchCallback = (error: Error, contents?: string) => void; - -/** - * Options as used by {@link util.fetch}. - * @typedef IFetchOptions - * @type {Object} - * @property {boolean} [binary=false] Whether expecting a binary response - * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest - */ - -interface IFetchOptions { - binary?: boolean; - xhr?: boolean; -} - -/** - * Fetches the contents of a file. - * @memberof util - * @param {string} filename File path or url - * @param {IFetchOptions} options Fetch options - * @param {FetchCallback} callback Callback function - * @returns {undefined} - */ -declare function fetch(filename: string, options: IFetchOptions, callback: FetchCallback): void; - -/** - * Fetches the contents of a file. - * @name util.fetch - * @function - * @param {string} path File path or url - * @param {FetchCallback} callback Callback function - * @returns {undefined} - * @variation 2 - */ -declare function fetch(path: string, callback: FetchCallback): void; - -/** - * Fetches the contents of a file. - * @name util.fetch - * @function - * @param {string} path File path or url - * @param {IFetchOptions} [options] Fetch options - * @returns {Promise} Promise - * @variation 3 - */ -declare function fetch(path: string, options?: IFetchOptions): Promise<(string|Uint8Array)>; diff --git a/node_modules/@protobufjs/fetch/index.js b/node_modules/@protobufjs/fetch/index.js deleted file mode 100644 index 3097258..0000000 --- a/node_modules/@protobufjs/fetch/index.js +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; -module.exports = fetch; - -var asPromise = require("@protobufjs/aspromise"), - fs = require("./util/fs"); - -/** - * Node-style callback as used by {@link util.fetch}. - * @typedef FetchCallback - * @type {function} - * @param {?Error} error Error, if any, otherwise `null` - * @param {string} [contents] File contents, if there hasn't been an error - * @returns {undefined} - */ - -/** - * Options as used by {@link util.fetch}. - * @interface IFetchOptions - * @property {boolean} [binary=false] Whether expecting a binary response - * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest - */ - -/** - * Fetches the contents of a file. - * @memberof util - * @param {string} filename File path or url - * @param {IFetchOptions} options Fetch options - * @param {FetchCallback} callback Callback function - * @returns {undefined} - */ -function fetch(filename, options, callback) { - if (typeof options === "function") { - callback = options; - options = {}; - } else if (!options) - options = {}; - - if (!callback) - return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this - - // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found. - if (!options.xhr && fs && fs.readFile) - return fs.readFile(filename, function fetchReadFileCallback(err, contents) { - return err && typeof XMLHttpRequest !== "undefined" - ? fetch.xhr(filename, options, callback) - : err - ? callback(err) - : callback(null, options.binary ? contents : contents.toString("utf8")); - }); - - // use the XHR version otherwise. - return fetch.xhr(filename, options, callback); -} - -/** - * Fetches the contents of a file. - * @name util.fetch - * @function - * @param {string} path File path or url - * @param {FetchCallback} callback Callback function - * @returns {undefined} - * @variation 2 - */ - -/** - * Fetches the contents of a file. - * @name util.fetch - * @function - * @param {string} path File path or url - * @param {IFetchOptions} [options] Fetch options - * @returns {Promise} Promise - * @variation 3 - */ - -/**/ -fetch.xhr = function fetch_xhr(filename, options, callback) { - var xhr = new XMLHttpRequest(); - xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() { - - if (xhr.readyState !== 4) - return undefined; - - // local cors security errors return status 0 / empty string, too. afaik this cannot be - // reliably distinguished from an actually empty file for security reasons. feel free - // to send a pull request if you are aware of a solution. - if (xhr.status !== 0 && xhr.status !== 200) - return callback(Error("status " + xhr.status)); - - // if binary data is expected, make sure that some sort of array is returned, even if - // ArrayBuffers are not supported. the binary string fallback, however, is unsafe. - if (options.binary) { - var buffer = xhr.response; - if (!buffer) { - buffer = []; - for (var i = 0; i < xhr.responseText.length; ++i) - buffer.push(xhr.responseText.charCodeAt(i) & 255); - } - return callback(null, typeof Uint8Array !== "undefined" ? new Uint8Array(buffer) : buffer); - } - return callback(null, xhr.responseText); - }; - - if (options.binary) { - // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers - if ("overrideMimeType" in xhr) - xhr.overrideMimeType("text/plain; charset=x-user-defined"); - xhr.responseType = "arraybuffer"; - } - - xhr.open("GET", filename); - xhr.send(); -}; diff --git a/node_modules/@protobufjs/fetch/package.json b/node_modules/@protobufjs/fetch/package.json deleted file mode 100644 index 889d224..0000000 --- a/node_modules/@protobufjs/fetch/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@protobufjs/fetch", - "description": "Fetches the contents of a file accross node and browsers.", - "version": "1.1.1", - "author": "Daniel Wirtz ", - "repository": { - "type": "git", - "url": "https://github.com/dcodeIO/protobuf.js.git" - }, - "dependencies": { - "@protobufjs/aspromise": "^1.1.1" - }, - "license": "BSD-3-Clause", - "main": "index.js", - "types": "index.d.ts", - "browser": { - "fs": false - }, - "devDependencies": { - "istanbul": "^0.4.5", - "tape": "^5.0.0" - }, - "scripts": { - "test": "tape tests/*.js", - "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" - } -} diff --git a/node_modules/@protobufjs/fetch/tests/data/file.txt b/node_modules/@protobufjs/fetch/tests/data/file.txt deleted file mode 100644 index 4c33073..0000000 --- a/node_modules/@protobufjs/fetch/tests/data/file.txt +++ /dev/null @@ -1 +0,0 @@ -file.txt \ No newline at end of file diff --git a/node_modules/@protobufjs/fetch/tests/index.js b/node_modules/@protobufjs/fetch/tests/index.js deleted file mode 100644 index 81b3e48..0000000 --- a/node_modules/@protobufjs/fetch/tests/index.js +++ /dev/null @@ -1,158 +0,0 @@ -var tape = require("tape"); - -var fetch = require(".."); - -tape.test("fetch", function(test) { - - if (typeof Promise !== "undefined") - test.test(test.name + " - promise", function(test) { - var promise = fetch("NOTFOUND"); - test.plan(2); - test.ok(promise instanceof Promise, "should return a promise if callback has been omitted"); - promise - .then(function() { - test.fail("should not resolve"); - }) - .catch(function(err) { - test.ok(err, "should reject with an error"); - }); - }); - - test.test(test.name + " - node fs", function(test) { - - test.test(test.name + " - string", function(test) { - test.plan(2); - fetch(require.resolve("./data/file.txt"), function(err, contents) { - test.notOk(err, "should not return an error"); - test.equal(contents, "file.txt", "should return contents as a string"); - }); - }); - - test.test(test.name + " - binary", function(test) { - test.plan(2); - fetch(require.resolve("./data/file.txt"), { binary: true }, function(err, contents) { - test.notOk(err, "should not return an error"); - test.same(contents, new Buffer("file.txt", "utf8"), "should return contents as a Buffer"); - }); - }); - - test.test(test.name + " - fallback", function(test) { - test.plan(2); - global.XMLHttpRequest = fakeXHR(0); - fetch("file.txt", function(err, contents) { - delete global.XMLHttpRequest; - test.notOk(err, "should not return an error"); - test.same(contents, "file.txt", "should return contents as a string"); - }); - }); - - test.end(); - }); - - test.test(test.name + " - XMLHttpRequest", function(test) { - - test.test(test.name + " - 404", function(test) { - global.XMLHttpRequest = fakeXHR(404); - fetch("file.txt", { xhr: true }, function(err) { - delete global.XMLHttpRequest; - test.ok(err, "should return an error"); - test.end(); - }); - }); - - test.test(test.name + " - string", function(test) { - global.XMLHttpRequest = fakeXHR(0); - test.plan(2); - fetch("file.txt", { xhr: true }, function(err, contents) { - delete global.XMLHttpRequest; - test.notOk(err, "should not return an error"); - test.equal(contents, "file.txt", "should return contents as a string"); - }); - }); - - test.test(test.name + " - binary", function(test) { - global.XMLHttpRequest = fakeXHR(200); - test.plan(2); - fetch("file.txt", { xhr: true, binary: true }, function(err, contents) { - delete global.XMLHttpRequest; - test.notOk(err, "should not return an error"); - test.same(contents, new Uint8Array([0x66, 0x69, 0x6c, 0x65, 0x2e, 0x74, 0x78, 0x74]), "should return contents as an Uint8Array"); - }); - }); - - }); - - test.test(test.name + " - XMLHttpRequest (ancient)", function(test) { - - test.test(test.name + " - string", function(test) { - global.XMLHttpRequest = fakeXHR(0, true); - test.plan(2); - fetch("file.txt", { xhr: true }, function(err, contents) { - delete global.XMLHttpRequest; - test.notOk(err, "should not return an error"); - test.equal(contents, "file.txt", "should return contents as a string"); - }); - }); - - test.test(test.name + " - binary", function(test) { - global.XMLHttpRequest = fakeXHR(200, true); - var U8 = global.Uint8Array; - delete global.Uint8Array; - test.plan(2); - fetch("file.txt", { xhr: true, binary: true }, function(err, contents) { - delete global.XMLHttpRequest; - global.Uint8Array = U8; - test.notOk(err, "should not return an error"); - test.same(contents, [0x66, 0x69, 0x6c, 0x65, 0x2e, 0x74, 0x78, 0x74], "should return contents as an Array"); - }); - }); - - }); - -}); - -function fakeXHR(status, ancient) { - - var UNSENT = 0, - OPENED = 1, - HEADERS_RECEIVED = 2, - LOADING = 3, - DONE = 4; - - function XMLHttpRequest() { - this.status = 0; - this.readyState = UNSENT; - } - if (!ancient) - XMLHttpRequest.prototype.overrideMimeType = function(mimeType) { - this._mimeType = mimeType; - }; - XMLHttpRequest.prototype.open = function open(method, path) { - this._method = method; - this._path = path; - this.readyState = OPENED; - }; - XMLHttpRequest.prototype.send = function send() { - var self = this; - setTimeout(function() { - self.onreadystatechange(); // opened - self.readyState = HEADERS_RECEIVED; - self.onreadystatechange(); - self.readyState = LOADING; - self.onreadystatechange(); - self.readyState = DONE; - self.status = status; - if (self.responseType === "arraybuffer" && !ancient) { - var buf = new Buffer(self._path, "utf8"); - var abuf = new ArrayBuffer(buf.length); - var view = new Uint8Array(abuf); - for (var i = 0; i < buf.length; ++i) - view[i] = buf[i]; - self.response = abuf; - } else - self.responseText = self._path; - self.onreadystatechange(); - }); - }; - return XMLHttpRequest; -} \ No newline at end of file diff --git a/node_modules/@protobufjs/fetch/util/fs.js b/node_modules/@protobufjs/fetch/util/fs.js deleted file mode 100644 index 9f3abda..0000000 --- a/node_modules/@protobufjs/fetch/util/fs.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var fs = null; -try { - fs = require(/* webpackIgnore: true */ "fs"); - if (!fs || !fs.readFile || !fs.readFileSync) - fs = null; -} catch (e) { - // `fs` is unavailable in browsers and browser-like bundles. -} -module.exports = fs; diff --git a/node_modules/@protobufjs/float/LICENSE b/node_modules/@protobufjs/float/LICENSE deleted file mode 100644 index be2b397..0000000 --- a/node_modules/@protobufjs/float/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2016, Daniel Wirtz All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/float/README.md b/node_modules/@protobufjs/float/README.md deleted file mode 100644 index e475fc9..0000000 --- a/node_modules/@protobufjs/float/README.md +++ /dev/null @@ -1,102 +0,0 @@ -@protobufjs/float -================= -[![npm](https://img.shields.io/npm/v/@protobufjs/float.svg)](https://www.npmjs.com/package/@protobufjs/float) - -Reads / writes floats / doubles from / to buffers in both modern and ancient browsers. Fast. - -API ---- - -* **writeFloatLE(val: `number`, buf: `Uint8Array`, pos: `number`)**
- Writes a 32 bit float to a buffer using little endian byte order. - -* **writeFloatBE(val: `number`, buf: `Uint8Array`, pos: `number`)**
- Writes a 32 bit float to a buffer using big endian byte order. - -* **readFloatLE(buf: `Uint8Array`, pos: `number`): `number`**
- Reads a 32 bit float from a buffer using little endian byte order. - -* **readFloatBE(buf: `Uint8Array`, pos: `number`): `number`**
- Reads a 32 bit float from a buffer using big endian byte order. - -* **writeDoubleLE(val: `number`, buf: `Uint8Array`, pos: `number`)**
- Writes a 64 bit double to a buffer using little endian byte order. - -* **writeDoubleBE(val: `number`, buf: `Uint8Array`, pos: `number`)**
- Writes a 64 bit double to a buffer using big endian byte order. - -* **readDoubleLE(buf: `Uint8Array`, pos: `number`): `number`**
- Reads a 64 bit double from a buffer using little endian byte order. - -* **readDoubleBE(buf: `Uint8Array`, pos: `number`): `number`**
- Reads a 64 bit double from a buffer using big endian byte order. - -Performance ------------ -There is a simple benchmark included comparing raw read/write performance of this library (float), float's fallback for old browsers, the [ieee754](https://www.npmjs.com/package/ieee754) module and node's [buffer](https://nodejs.org/api/buffer.html). On an i7-2600k running node 6.9.1 it yields: - -``` -benchmarking writeFloat performance ... - -float x 42,741,625 ops/sec ±1.75% (81 runs sampled) -float (fallback) x 11,272,532 ops/sec ±1.12% (85 runs sampled) -ieee754 x 8,653,337 ops/sec ±1.18% (84 runs sampled) -buffer x 12,412,414 ops/sec ±1.41% (83 runs sampled) -buffer (noAssert) x 13,471,149 ops/sec ±1.09% (84 runs sampled) - - float was fastest - float (fallback) was 73.5% slower - ieee754 was 79.6% slower - buffer was 70.9% slower - buffer (noAssert) was 68.3% slower - -benchmarking readFloat performance ... - -float x 44,382,729 ops/sec ±1.70% (84 runs sampled) -float (fallback) x 20,925,938 ops/sec ±0.86% (87 runs sampled) -ieee754 x 17,189,009 ops/sec ±1.01% (87 runs sampled) -buffer x 10,518,437 ops/sec ±1.04% (83 runs sampled) -buffer (noAssert) x 11,031,636 ops/sec ±1.15% (87 runs sampled) - - float was fastest - float (fallback) was 52.5% slower - ieee754 was 61.0% slower - buffer was 76.1% slower - buffer (noAssert) was 75.0% slower - -benchmarking writeDouble performance ... - -float x 38,624,906 ops/sec ±0.93% (83 runs sampled) -float (fallback) x 10,457,811 ops/sec ±1.54% (85 runs sampled) -ieee754 x 7,681,130 ops/sec ±1.11% (83 runs sampled) -buffer x 12,657,876 ops/sec ±1.03% (83 runs sampled) -buffer (noAssert) x 13,372,795 ops/sec ±0.84% (85 runs sampled) - - float was fastest - float (fallback) was 73.1% slower - ieee754 was 80.1% slower - buffer was 67.3% slower - buffer (noAssert) was 65.3% slower - -benchmarking readDouble performance ... - -float x 40,527,888 ops/sec ±1.05% (84 runs sampled) -float (fallback) x 18,696,480 ops/sec ±0.84% (86 runs sampled) -ieee754 x 14,074,028 ops/sec ±1.04% (87 runs sampled) -buffer x 10,092,367 ops/sec ±1.15% (84 runs sampled) -buffer (noAssert) x 10,623,793 ops/sec ±0.96% (84 runs sampled) - - float was fastest - float (fallback) was 53.8% slower - ieee754 was 65.3% slower - buffer was 75.1% slower - buffer (noAssert) was 73.8% slower -``` - -To run it yourself: - -``` -$> npm run bench -``` - -**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/float/bench/index.js b/node_modules/@protobufjs/float/bench/index.js deleted file mode 100644 index 911f461..0000000 --- a/node_modules/@protobufjs/float/bench/index.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; - -var float = require(".."), - ieee754 = require("ieee754"), - newSuite = require("./suite"); - -var F32 = Float32Array; -var F64 = Float64Array; -delete global.Float32Array; -delete global.Float64Array; -var floatFallback = float({}); -global.Float32Array = F32; -global.Float64Array = F64; - -var buf = new Buffer(8); - -newSuite("writeFloat") -.add("float", function() { - float.writeFloatLE(0.1, buf, 0); -}) -.add("float (fallback)", function() { - floatFallback.writeFloatLE(0.1, buf, 0); -}) -.add("ieee754", function() { - ieee754.write(buf, 0.1, 0, true, 23, 4); -}) -.add("buffer", function() { - buf.writeFloatLE(0.1, 0); -}) -.add("buffer (noAssert)", function() { - buf.writeFloatLE(0.1, 0, true); -}) -.run(); - -newSuite("readFloat") -.add("float", function() { - float.readFloatLE(buf, 0); -}) -.add("float (fallback)", function() { - floatFallback.readFloatLE(buf, 0); -}) -.add("ieee754", function() { - ieee754.read(buf, 0, true, 23, 4); -}) -.add("buffer", function() { - buf.readFloatLE(0); -}) -.add("buffer (noAssert)", function() { - buf.readFloatLE(0, true); -}) -.run(); - -newSuite("writeDouble") -.add("float", function() { - float.writeDoubleLE(0.1, buf, 0); -}) -.add("float (fallback)", function() { - floatFallback.writeDoubleLE(0.1, buf, 0); -}) -.add("ieee754", function() { - ieee754.write(buf, 0.1, 0, true, 52, 8); -}) -.add("buffer", function() { - buf.writeDoubleLE(0.1, 0); -}) -.add("buffer (noAssert)", function() { - buf.writeDoubleLE(0.1, 0, true); -}) -.run(); - -newSuite("readDouble") -.add("float", function() { - float.readDoubleLE(buf, 0); -}) -.add("float (fallback)", function() { - floatFallback.readDoubleLE(buf, 0); -}) -.add("ieee754", function() { - ieee754.read(buf, 0, true, 52, 8); -}) -.add("buffer", function() { - buf.readDoubleLE(0); -}) -.add("buffer (noAssert)", function() { - buf.readDoubleLE(0, true); -}) -.run(); diff --git a/node_modules/@protobufjs/float/bench/suite.js b/node_modules/@protobufjs/float/bench/suite.js deleted file mode 100644 index e8016d2..0000000 --- a/node_modules/@protobufjs/float/bench/suite.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -module.exports = newSuite; - -var benchmark = require("benchmark"), - chalk = require("chalk"); - -var padSize = 27; - -function newSuite(name) { - var benches = []; - return new benchmark.Suite(name) - .on("add", function(event) { - benches.push(event.target); - }) - .on("start", function() { - process.stdout.write("benchmarking " + name + " performance ...\n\n"); - }) - .on("cycle", function(event) { - process.stdout.write(String(event.target) + "\n"); - }) - .on("complete", function() { - if (benches.length > 1) { - var fastest = this.filter("fastest"), // eslint-disable-line no-invalid-this - fastestHz = getHz(fastest[0]); - process.stdout.write("\n" + chalk.white(pad(fastest[0].name, padSize)) + " was " + chalk.green("fastest") + "\n"); - benches.forEach(function(bench) { - if (fastest.indexOf(bench) === 0) - return; - var hz = hz = getHz(bench); - var percent = (1 - hz / fastestHz) * 100; - process.stdout.write(chalk.white(pad(bench.name, padSize)) + " was " + chalk.red(percent.toFixed(1) + "% slower") + "\n"); - }); - } - process.stdout.write("\n"); - }); -} - -function getHz(bench) { - return 1 / (bench.stats.mean + bench.stats.moe); -} - -function pad(str, len, l) { - while (str.length < len) - str = l ? str + " " : " " + str; - return str; -} diff --git a/node_modules/@protobufjs/float/index.d.ts b/node_modules/@protobufjs/float/index.d.ts deleted file mode 100644 index ab05de3..0000000 --- a/node_modules/@protobufjs/float/index.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Writes a 32 bit float to a buffer using little endian byte order. - * @name writeFloatLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ -export function writeFloatLE(val: number, buf: Uint8Array, pos: number): void; - -/** - * Writes a 32 bit float to a buffer using big endian byte order. - * @name writeFloatBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ -export function writeFloatBE(val: number, buf: Uint8Array, pos: number): void; - -/** - * Reads a 32 bit float from a buffer using little endian byte order. - * @name readFloatLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ -export function readFloatLE(buf: Uint8Array, pos: number): number; - -/** - * Reads a 32 bit float from a buffer using big endian byte order. - * @name readFloatBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ -export function readFloatBE(buf: Uint8Array, pos: number): number; - -/** - * Writes a 64 bit double to a buffer using little endian byte order. - * @name writeDoubleLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ -export function writeDoubleLE(val: number, buf: Uint8Array, pos: number): void; - -/** - * Writes a 64 bit double to a buffer using big endian byte order. - * @name writeDoubleBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ -export function writeDoubleBE(val: number, buf: Uint8Array, pos: number): void; - -/** - * Reads a 64 bit double from a buffer using little endian byte order. - * @name readDoubleLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ -export function readDoubleLE(buf: Uint8Array, pos: number): number; - -/** - * Reads a 64 bit double from a buffer using big endian byte order. - * @name readDoubleBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ -export function readDoubleBE(buf: Uint8Array, pos: number): number; diff --git a/node_modules/@protobufjs/float/index.js b/node_modules/@protobufjs/float/index.js deleted file mode 100644 index 52ba3aa..0000000 --- a/node_modules/@protobufjs/float/index.js +++ /dev/null @@ -1,335 +0,0 @@ -"use strict"; - -module.exports = factory(factory); - -/** - * Reads / writes floats / doubles from / to buffers. - * @name util.float - * @namespace - */ - -/** - * Writes a 32 bit float to a buffer using little endian byte order. - * @name util.float.writeFloatLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Writes a 32 bit float to a buffer using big endian byte order. - * @name util.float.writeFloatBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Reads a 32 bit float from a buffer using little endian byte order. - * @name util.float.readFloatLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Reads a 32 bit float from a buffer using big endian byte order. - * @name util.float.readFloatBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Writes a 64 bit double to a buffer using little endian byte order. - * @name util.float.writeDoubleLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Writes a 64 bit double to a buffer using big endian byte order. - * @name util.float.writeDoubleBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Reads a 64 bit double from a buffer using little endian byte order. - * @name util.float.readDoubleLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Reads a 64 bit double from a buffer using big endian byte order. - * @name util.float.readDoubleBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -// Factory function for the purpose of node-based testing in modified global environments -function factory(exports) { - - // float: typed array - if (typeof Float32Array !== "undefined") (function() { - - var f32 = new Float32Array([ -0 ]), - f8b = new Uint8Array(f32.buffer), - le = f8b[3] === 128; - - function writeFloat_f32_cpy(val, buf, pos) { - f32[0] = val; - buf[pos ] = f8b[0]; - buf[pos + 1] = f8b[1]; - buf[pos + 2] = f8b[2]; - buf[pos + 3] = f8b[3]; - } - - function writeFloat_f32_rev(val, buf, pos) { - f32[0] = val; - buf[pos ] = f8b[3]; - buf[pos + 1] = f8b[2]; - buf[pos + 2] = f8b[1]; - buf[pos + 3] = f8b[0]; - } - - /* istanbul ignore next */ - exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev; - /* istanbul ignore next */ - exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy; - - function readFloat_f32_cpy(buf, pos) { - f8b[0] = buf[pos ]; - f8b[1] = buf[pos + 1]; - f8b[2] = buf[pos + 2]; - f8b[3] = buf[pos + 3]; - return f32[0]; - } - - function readFloat_f32_rev(buf, pos) { - f8b[3] = buf[pos ]; - f8b[2] = buf[pos + 1]; - f8b[1] = buf[pos + 2]; - f8b[0] = buf[pos + 3]; - return f32[0]; - } - - /* istanbul ignore next */ - exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev; - /* istanbul ignore next */ - exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy; - - // float: ieee754 - })(); else (function() { - - function writeFloat_ieee754(writeUint, val, buf, pos) { - var sign = val < 0 ? 1 : 0; - if (sign) - val = -val; - if (val === 0) - writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos); - else if (isNaN(val)) - writeUint(2143289344, buf, pos); - else if (val > 3.4028234663852886e+38) // +-Infinity - writeUint((sign << 31 | 2139095040) >>> 0, buf, pos); - else if (val < 1.1754943508222875e-38) // denormal - writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos); - else { - var exponent = Math.floor(Math.log(val) / Math.LN2), - mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607; - writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos); - } - } - - exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE); - exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE); - - function readFloat_ieee754(readUint, buf, pos) { - var uint = readUint(buf, pos), - sign = (uint >> 31) * 2 + 1, - exponent = uint >>> 23 & 255, - mantissa = uint & 8388607; - return exponent === 255 - ? mantissa - ? NaN - : sign * Infinity - : exponent === 0 // denormal - ? sign * 1.401298464324817e-45 * mantissa - : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608); - } - - exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE); - exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE); - - })(); - - // double: typed array - if (typeof Float64Array !== "undefined") (function() { - - var f64 = new Float64Array([-0]), - f8b = new Uint8Array(f64.buffer), - le = f8b[7] === 128; - - function writeDouble_f64_cpy(val, buf, pos) { - f64[0] = val; - buf[pos ] = f8b[0]; - buf[pos + 1] = f8b[1]; - buf[pos + 2] = f8b[2]; - buf[pos + 3] = f8b[3]; - buf[pos + 4] = f8b[4]; - buf[pos + 5] = f8b[5]; - buf[pos + 6] = f8b[6]; - buf[pos + 7] = f8b[7]; - } - - function writeDouble_f64_rev(val, buf, pos) { - f64[0] = val; - buf[pos ] = f8b[7]; - buf[pos + 1] = f8b[6]; - buf[pos + 2] = f8b[5]; - buf[pos + 3] = f8b[4]; - buf[pos + 4] = f8b[3]; - buf[pos + 5] = f8b[2]; - buf[pos + 6] = f8b[1]; - buf[pos + 7] = f8b[0]; - } - - /* istanbul ignore next */ - exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev; - /* istanbul ignore next */ - exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy; - - function readDouble_f64_cpy(buf, pos) { - f8b[0] = buf[pos ]; - f8b[1] = buf[pos + 1]; - f8b[2] = buf[pos + 2]; - f8b[3] = buf[pos + 3]; - f8b[4] = buf[pos + 4]; - f8b[5] = buf[pos + 5]; - f8b[6] = buf[pos + 6]; - f8b[7] = buf[pos + 7]; - return f64[0]; - } - - function readDouble_f64_rev(buf, pos) { - f8b[7] = buf[pos ]; - f8b[6] = buf[pos + 1]; - f8b[5] = buf[pos + 2]; - f8b[4] = buf[pos + 3]; - f8b[3] = buf[pos + 4]; - f8b[2] = buf[pos + 5]; - f8b[1] = buf[pos + 6]; - f8b[0] = buf[pos + 7]; - return f64[0]; - } - - /* istanbul ignore next */ - exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev; - /* istanbul ignore next */ - exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy; - - // double: ieee754 - })(); else (function() { - - function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) { - var sign = val < 0 ? 1 : 0; - if (sign) - val = -val; - if (val === 0) { - writeUint(0, buf, pos + off0); - writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1); - } else if (isNaN(val)) { - writeUint(0, buf, pos + off0); - writeUint(2146959360, buf, pos + off1); - } else if (val > 1.7976931348623157e+308) { // +-Infinity - writeUint(0, buf, pos + off0); - writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1); - } else { - var mantissa; - if (val < 2.2250738585072014e-308) { // denormal - mantissa = val / 5e-324; - writeUint(mantissa >>> 0, buf, pos + off0); - writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1); - } else { - var exponent = Math.floor(Math.log(val) / Math.LN2); - if (exponent === 1024) - exponent = 1023; - mantissa = val * Math.pow(2, -exponent); - writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0); - writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1); - } - } - } - - exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4); - exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0); - - function readDouble_ieee754(readUint, off0, off1, buf, pos) { - var lo = readUint(buf, pos + off0), - hi = readUint(buf, pos + off1); - var sign = (hi >> 31) * 2 + 1, - exponent = hi >>> 20 & 2047, - mantissa = 4294967296 * (hi & 1048575) + lo; - return exponent === 2047 - ? mantissa - ? NaN - : sign * Infinity - : exponent === 0 // denormal - ? sign * 5e-324 * mantissa - : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496); - } - - exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4); - exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0); - - })(); - - return exports; -} - -// uint helpers - -function writeUintLE(val, buf, pos) { - buf[pos ] = val & 255; - buf[pos + 1] = val >>> 8 & 255; - buf[pos + 2] = val >>> 16 & 255; - buf[pos + 3] = val >>> 24; -} - -function writeUintBE(val, buf, pos) { - buf[pos ] = val >>> 24; - buf[pos + 1] = val >>> 16 & 255; - buf[pos + 2] = val >>> 8 & 255; - buf[pos + 3] = val & 255; -} - -function readUintLE(buf, pos) { - return (buf[pos ] - | buf[pos + 1] << 8 - | buf[pos + 2] << 16 - | buf[pos + 3] << 24) >>> 0; -} - -function readUintBE(buf, pos) { - return (buf[pos ] << 24 - | buf[pos + 1] << 16 - | buf[pos + 2] << 8 - | buf[pos + 3]) >>> 0; -} diff --git a/node_modules/@protobufjs/float/package.json b/node_modules/@protobufjs/float/package.json deleted file mode 100644 index aaebccf..0000000 --- a/node_modules/@protobufjs/float/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@protobufjs/float", - "description": "Reads / writes floats / doubles from / to buffers in both modern and ancient browsers.", - "version": "1.0.2", - "author": "Daniel Wirtz ", - "repository": { - "type": "git", - "url": "https://github.com/dcodeIO/protobuf.js.git" - }, - "dependencies": {}, - "license": "BSD-3-Clause", - "main": "index.js", - "types": "index.d.ts", - "devDependencies": { - "benchmark": "^2.1.4", - "chalk": "^1.1.3", - "ieee754": "^1.1.8", - "istanbul": "^0.4.5", - "tape": "^4.6.3" - }, - "scripts": { - "test": "tape tests/*.js", - "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js", - "bench": "node bench" - } -} \ No newline at end of file diff --git a/node_modules/@protobufjs/float/tests/index.js b/node_modules/@protobufjs/float/tests/index.js deleted file mode 100644 index 62f0827..0000000 --- a/node_modules/@protobufjs/float/tests/index.js +++ /dev/null @@ -1,100 +0,0 @@ -var tape = require("tape"); - -var float = require(".."); - -tape.test("float", function(test) { - - // default - test.test(test.name + " - typed array", function(test) { - runTest(float, test); - }); - - // ieee754 - test.test(test.name + " - fallback", function(test) { - var F32 = global.Float32Array, - F64 = global.Float64Array; - delete global.Float32Array; - delete global.Float64Array; - runTest(float({}), test); - global.Float32Array = F32; - global.Float64Array = F64; - }); -}); - -function runTest(float, test) { - - var common = [ - 0, - -0, - Infinity, - -Infinity, - 0.125, - 1024.5, - -4096.5, - NaN - ]; - - test.test(test.name + " - using 32 bits", function(test) { - common.concat([ - 3.4028234663852886e+38, - 1.1754943508222875e-38, - 1.1754946310819804e-39 - ]) - .forEach(function(value) { - var strval = value === 0 && 1 / value < 0 ? "-0" : value.toString(); - test.ok( - checkValue(value, 4, float.readFloatLE, float.writeFloatLE, Buffer.prototype.writeFloatLE), - "should write and read back " + strval + " (32 bit LE)" - ); - test.ok( - checkValue(value, 4, float.readFloatBE, float.writeFloatBE, Buffer.prototype.writeFloatBE), - "should write and read back " + strval + " (32 bit BE)" - ); - }); - test.end(); - }); - - test.test(test.name + " - using 64 bits", function(test) { - common.concat([ - 1.7976931348623157e+308, - 2.2250738585072014e-308, - 2.2250738585072014e-309 - ]) - .forEach(function(value) { - var strval = value === 0 && 1 / value < 0 ? "-0" : value.toString(); - test.ok( - checkValue(value, 8, float.readDoubleLE, float.writeDoubleLE, Buffer.prototype.writeDoubleLE), - "should write and read back " + strval + " (64 bit LE)" - ); - test.ok( - checkValue(value, 8, float.readDoubleBE, float.writeDoubleBE, Buffer.prototype.writeDoubleBE), - "should write and read back " + strval + " (64 bit BE)" - ); - }); - test.end(); - }); - - test.end(); -} - -function checkValue(value, size, read, write, write_comp) { - var buffer = new Buffer(size); - write(value, buffer, 0); - var value_comp = read(buffer, 0); - var strval = value === 0 && 1 / value < 0 ? "-0" : value.toString(); - if (value !== value) { - if (value_comp === value_comp) - return false; - } else if (value_comp !== value) - return false; - - var buffer_comp = new Buffer(size); - write_comp.call(buffer_comp, value, 0); - for (var i = 0; i < size; ++i) - if (buffer[i] !== buffer_comp[i]) { - console.error(">", buffer, buffer_comp); - return false; - } - - return true; -} \ No newline at end of file diff --git a/node_modules/@protobufjs/inquire/CHANGELOG.md b/node_modules/@protobufjs/inquire/CHANGELOG.md deleted file mode 100644 index ed9e037..0000000 --- a/node_modules/@protobufjs/inquire/CHANGELOG.md +++ /dev/null @@ -1,8 +0,0 @@ -# Changelog - -## [1.1.2](https://github.com/protobufjs/protobuf.js/compare/inquire-v1.1.1...inquire-v1.1.2) (2026-05-17) - - -### Bug Fixes - -* Backport bundler-safe optional module lookups ([#2254](https://github.com/protobufjs/protobuf.js/issues/2254)) ([0853a62](https://github.com/protobufjs/protobuf.js/commit/0853a625680f9247596b84ef48082b8f4e554797)) diff --git a/node_modules/@protobufjs/inquire/LICENSE b/node_modules/@protobufjs/inquire/LICENSE deleted file mode 100644 index be2b397..0000000 --- a/node_modules/@protobufjs/inquire/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2016, Daniel Wirtz All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/inquire/README.md b/node_modules/@protobufjs/inquire/README.md deleted file mode 100644 index 3eabd86..0000000 --- a/node_modules/@protobufjs/inquire/README.md +++ /dev/null @@ -1,13 +0,0 @@ -@protobufjs/inquire -=================== -[![npm](https://img.shields.io/npm/v/@protobufjs/inquire.svg)](https://www.npmjs.com/package/@protobufjs/inquire) - -Requires a module only if available and hides the require call from bundlers. - -API ---- - -* **inquire(moduleName: `string`): `?Object`**
- Requires a module only if available. - -**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/inquire/index.d.ts b/node_modules/@protobufjs/inquire/index.d.ts deleted file mode 100644 index ca37fea..0000000 --- a/node_modules/@protobufjs/inquire/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export = inquire; - -/** - * Requires a module only if available. - * @memberof util - * @param {string} moduleName Module to require - * @returns {?Object} Required module if available and not empty, otherwise `null` - * @deprecated Legacy optional require helper. Will be removed in a future release. - */ -declare function inquire(moduleName: string): object; diff --git a/node_modules/@protobufjs/inquire/index.js b/node_modules/@protobufjs/inquire/index.js deleted file mode 100644 index 5b97063..0000000 --- a/node_modules/@protobufjs/inquire/index.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -module.exports = inquire; - -/** - * Requires a module only if available. - * @memberof util - * @param {string} moduleName Module to require - * @returns {?Object} Required module if available and not empty, otherwise `null` - * @deprecated Legacy optional require helper. Will be removed in a future release. - */ -function inquire(moduleName) { - try { - if (typeof require !== "function") { - return null; - } - var mod = require(moduleName); - if (mod && (mod.length || Object.keys(mod).length)) return mod; - return null; - } catch (err) { - // ignore - return null; - } -} - -/* -// maybe worth a shot to prevent renaming issues: -// see: https://github.com/webpack/webpack/blob/master/lib/dependencies/CommonJsRequireDependencyParserPlugin.js -// triggers on: -// - expression require.cache -// - expression require (???) -// - call require -// - call require:commonjs:item -// - call require:commonjs:context - -Object.defineProperty(Function.prototype, "__self", { get: function() { return this; } }); -var r = require.__self; -delete Function.prototype.__self; -*/ diff --git a/node_modules/@protobufjs/inquire/package.json b/node_modules/@protobufjs/inquire/package.json deleted file mode 100644 index 901ec2f..0000000 --- a/node_modules/@protobufjs/inquire/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@protobufjs/inquire", - "description": "Requires a module only if available and hides the require call from bundlers.", - "version": "1.1.2", - "author": "Daniel Wirtz ", - "repository": { - "type": "git", - "url": "https://github.com/dcodeIO/protobuf.js.git" - }, - "license": "BSD-3-Clause", - "main": "index.js", - "types": "index.d.ts", - "devDependencies": { - "istanbul": "^0.4.5", - "tape": "^5.0.0" - }, - "scripts": { - "test": "tape tests/*.js", - "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" - } -} \ No newline at end of file diff --git a/node_modules/@protobufjs/inquire/tests/data/array.js b/node_modules/@protobufjs/inquire/tests/data/array.js deleted file mode 100644 index 0847b28..0000000 --- a/node_modules/@protobufjs/inquire/tests/data/array.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = [1]; diff --git a/node_modules/@protobufjs/inquire/tests/data/emptyArray.js b/node_modules/@protobufjs/inquire/tests/data/emptyArray.js deleted file mode 100644 index e0a30c5..0000000 --- a/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = []; diff --git a/node_modules/@protobufjs/inquire/tests/data/emptyObject.js b/node_modules/@protobufjs/inquire/tests/data/emptyObject.js deleted file mode 100644 index f053ebf..0000000 --- a/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {}; diff --git a/node_modules/@protobufjs/inquire/tests/data/object.js b/node_modules/@protobufjs/inquire/tests/data/object.js deleted file mode 100644 index 3b75bca..0000000 --- a/node_modules/@protobufjs/inquire/tests/data/object.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { a: 1 }; diff --git a/node_modules/@protobufjs/inquire/tests/index.js b/node_modules/@protobufjs/inquire/tests/index.js deleted file mode 100644 index 4a555ca..0000000 --- a/node_modules/@protobufjs/inquire/tests/index.js +++ /dev/null @@ -1,20 +0,0 @@ -var tape = require("tape"); - -var inquire = require(".."); - -tape.test("inquire", function(test) { - - test.equal(inquire("buffer").Buffer, Buffer, "should be able to require \"buffer\""); - - test.equal(inquire("%invalid"), null, "should not be able to require \"%invalid\""); - - test.equal(inquire("./tests/data/emptyObject"), null, "should return null when requiring a module exporting an empty object"); - - test.equal(inquire("./tests/data/emptyArray"), null, "should return null when requiring a module exporting an empty array"); - - test.same(inquire("./tests/data/object"), { a: 1 }, "should return the object if a non-empty object"); - - test.same(inquire("./tests/data/array"), [ 1 ], "should return the module if a non-empty array"); - - test.end(); -}); diff --git a/node_modules/@protobufjs/path/LICENSE b/node_modules/@protobufjs/path/LICENSE deleted file mode 100644 index be2b397..0000000 --- a/node_modules/@protobufjs/path/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2016, Daniel Wirtz All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/path/README.md b/node_modules/@protobufjs/path/README.md deleted file mode 100644 index 1c1a2ba..0000000 --- a/node_modules/@protobufjs/path/README.md +++ /dev/null @@ -1,19 +0,0 @@ -@protobufjs/path -================ -[![npm](https://img.shields.io/npm/v/@protobufjs/path.svg)](https://www.npmjs.com/package/@protobufjs/path) - -A minimal path module to resolve Unix, Windows and URL paths alike. - -API ---- - -* **path.isAbsolute(path: `string`): `boolean`**
- Tests if the specified path is absolute. - -* **path.normalize(path: `string`): `string`**
- Normalizes the specified path. - -* **path.resolve(originPath: `string`, includePath: `string`, [alreadyNormalized=false: `boolean`]): `string`**
- Resolves the specified include path against the specified origin path. - -**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/path/index.d.ts b/node_modules/@protobufjs/path/index.d.ts deleted file mode 100644 index b664d81..0000000 --- a/node_modules/@protobufjs/path/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Tests if the specified path is absolute. - * @param {string} path Path to test - * @returns {boolean} `true` if path is absolute - */ -export function isAbsolute(path: string): boolean; - -/** - * Normalizes the specified path. - * @param {string} path Path to normalize - * @returns {string} Normalized path - */ -export function normalize(path: string): string; - -/** - * Resolves the specified include path against the specified origin path. - * @param {string} originPath Path to the origin file - * @param {string} includePath Include path relative to origin path - * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized - * @returns {string} Path to the include file - */ -export function resolve(originPath: string, includePath: string, alreadyNormalized?: boolean): string; diff --git a/node_modules/@protobufjs/path/index.js b/node_modules/@protobufjs/path/index.js deleted file mode 100644 index 7c7fb72..0000000 --- a/node_modules/@protobufjs/path/index.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; - -/** - * A minimal path module to resolve Unix, Windows and URL paths alike. - * @memberof util - * @namespace - */ -var path = exports; - -var isAbsolute = -/** - * Tests if the specified path is absolute. - * @param {string} path Path to test - * @returns {boolean} `true` if path is absolute - */ -path.isAbsolute = function isAbsolute(path) { - return /^(?:\/|\w+:)/.test(path); -}; - -var normalize = -/** - * Normalizes the specified path. - * @param {string} path Path to normalize - * @returns {string} Normalized path - */ -path.normalize = function normalize(path) { - path = path.replace(/\\/g, "/") - .replace(/\/{2,}/g, "/"); - var parts = path.split("/"), - absolute = isAbsolute(path), - prefix = ""; - if (absolute) - prefix = parts.shift() + "/"; - for (var i = 0; i < parts.length;) { - if (parts[i] === "..") { - if (i > 0 && parts[i - 1] !== "..") - parts.splice(--i, 2); - else if (absolute) - parts.splice(i, 1); - else - ++i; - } else if (parts[i] === ".") - parts.splice(i, 1); - else - ++i; - } - return prefix + parts.join("/"); -}; - -/** - * Resolves the specified include path against the specified origin path. - * @param {string} originPath Path to the origin file - * @param {string} includePath Include path relative to origin path - * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized - * @returns {string} Path to the include file - */ -path.resolve = function resolve(originPath, includePath, alreadyNormalized) { - if (!alreadyNormalized) - includePath = normalize(includePath); - if (isAbsolute(includePath)) - return includePath; - if (!alreadyNormalized) - originPath = normalize(originPath); - return (originPath = originPath.replace(/(?:\/|^)[^/]+$/, "")).length ? normalize(originPath + "/" + includePath) : includePath; -}; diff --git a/node_modules/@protobufjs/path/package.json b/node_modules/@protobufjs/path/package.json deleted file mode 100644 index 2262e01..0000000 --- a/node_modules/@protobufjs/path/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@protobufjs/path", - "description": "A minimal path module to resolve Unix, Windows and URL paths alike.", - "version": "1.1.2", - "author": "Daniel Wirtz ", - "repository": { - "type": "git", - "url": "https://github.com/dcodeIO/protobuf.js.git" - }, - "license": "BSD-3-Clause", - "main": "index.js", - "types": "index.d.ts", - "devDependencies": { - "istanbul": "^0.4.5", - "tape": "^4.6.3" - }, - "scripts": { - "test": "tape tests/*.js", - "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" - } -} \ No newline at end of file diff --git a/node_modules/@protobufjs/path/tests/index.js b/node_modules/@protobufjs/path/tests/index.js deleted file mode 100644 index 9c23bc9..0000000 --- a/node_modules/@protobufjs/path/tests/index.js +++ /dev/null @@ -1,60 +0,0 @@ -var tape = require("tape"); - -var path = require(".."); - -tape.test("path", function(test) { - - test.ok(path.isAbsolute("X:\\some\\path\\file.js"), "should identify absolute windows paths"); - test.ok(path.isAbsolute("/some/path/file.js"), "should identify absolute unix paths"); - - test.notOk(path.isAbsolute("some\\path\\file.js"), "should identify relative windows paths"); - test.notOk(path.isAbsolute("some/path/file.js"), "should identify relative unix paths"); - - var paths = [ - { - actual: "X:\\some\\..\\.\\path\\\\file.js", - normal: "X:/path/file.js", - resolve: { - origin: "X:/path/origin.js", - expected: "X:/path/file.js" - } - }, { - actual: "some\\..\\.\\path\\\\file.js", - normal: "path/file.js", - resolve: { - origin: "X:/path/origin.js", - expected: "X:/path/path/file.js" - } - }, { - actual: "/some/.././path//file.js", - normal: "/path/file.js", - resolve: { - origin: "/path/origin.js", - expected: "/path/file.js" - } - }, { - actual: "some/.././path//file.js", - normal: "path/file.js", - resolve: { - origin: "", - expected: "path/file.js" - } - }, { - actual: ".././path//file.js", - normal: "../path/file.js" - }, { - actual: "/.././path//file.js", - normal: "/path/file.js" - } - ]; - - paths.forEach(function(p) { - test.equal(path.normalize(p.actual), p.normal, "should normalize " + p.actual); - if (p.resolve) { - test.equal(path.resolve(p.resolve.origin, p.actual), p.resolve.expected, "should resolve " + p.actual); - test.equal(path.resolve(p.resolve.origin, p.normal, true), p.resolve.expected, "should resolve " + p.normal + " (already normalized)"); - } - }); - - test.end(); -}); diff --git a/node_modules/@protobufjs/pool/.npmignore b/node_modules/@protobufjs/pool/.npmignore deleted file mode 100644 index c3fc82e..0000000 --- a/node_modules/@protobufjs/pool/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -npm-debug.* -node_modules/ -coverage/ diff --git a/node_modules/@protobufjs/pool/LICENSE b/node_modules/@protobufjs/pool/LICENSE deleted file mode 100644 index be2b397..0000000 --- a/node_modules/@protobufjs/pool/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2016, Daniel Wirtz All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/pool/README.md b/node_modules/@protobufjs/pool/README.md deleted file mode 100644 index 9fb0e97..0000000 --- a/node_modules/@protobufjs/pool/README.md +++ /dev/null @@ -1,13 +0,0 @@ -@protobufjs/pool -================ -[![npm](https://img.shields.io/npm/v/@protobufjs/pool.svg)](https://www.npmjs.com/package/@protobufjs/pool) - -A general purpose buffer pool. - -API ---- - -* **pool(alloc: `function(size: number): Uint8Array`, slice: `function(this: Uint8Array, start: number, end: number): Uint8Array`, [size=8192: `number`]): `function(size: number): Uint8Array`**
- Creates a pooled allocator. - -**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/pool/index.d.ts b/node_modules/@protobufjs/pool/index.d.ts deleted file mode 100644 index 23fe38c..0000000 --- a/node_modules/@protobufjs/pool/index.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -export = pool; - -/** - * An allocator as used by {@link util.pool}. - * @typedef PoolAllocator - * @type {function} - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ -type PoolAllocator = (size: number) => Uint8Array; - -/** - * A slicer as used by {@link util.pool}. - * @typedef PoolSlicer - * @type {function} - * @param {number} start Start offset - * @param {number} end End offset - * @returns {Uint8Array} Buffer slice - * @this {Uint8Array} - */ -type PoolSlicer = (this: Uint8Array, start: number, end: number) => Uint8Array; - -/** - * A general purpose buffer pool. - * @memberof util - * @function - * @param {PoolAllocator} alloc Allocator - * @param {PoolSlicer} slice Slicer - * @param {number} [size=8192] Slab size - * @returns {PoolAllocator} Pooled allocator - */ -declare function pool(alloc: PoolAllocator, slice: PoolSlicer, size?: number): PoolAllocator; diff --git a/node_modules/@protobufjs/pool/index.js b/node_modules/@protobufjs/pool/index.js deleted file mode 100644 index 6c666f6..0000000 --- a/node_modules/@protobufjs/pool/index.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -module.exports = pool; - -/** - * An allocator as used by {@link util.pool}. - * @typedef PoolAllocator - * @type {function} - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ - -/** - * A slicer as used by {@link util.pool}. - * @typedef PoolSlicer - * @type {function} - * @param {number} start Start offset - * @param {number} end End offset - * @returns {Uint8Array} Buffer slice - * @this {Uint8Array} - */ - -/** - * A general purpose buffer pool. - * @memberof util - * @function - * @param {PoolAllocator} alloc Allocator - * @param {PoolSlicer} slice Slicer - * @param {number} [size=8192] Slab size - * @returns {PoolAllocator} Pooled allocator - */ -function pool(alloc, slice, size) { - var SIZE = size || 8192; - var MAX = SIZE >>> 1; - var slab = null; - var offset = SIZE; - return function pool_alloc(size) { - if (size < 1 || size > MAX) - return alloc(size); - if (offset + size > SIZE) { - slab = alloc(SIZE); - offset = 0; - } - var buf = slice.call(slab, offset, offset += size); - if (offset & 7) // align to 32 bit - offset = (offset | 7) + 1; - return buf; - }; -} diff --git a/node_modules/@protobufjs/pool/package.json b/node_modules/@protobufjs/pool/package.json deleted file mode 100644 index f025e03..0000000 --- a/node_modules/@protobufjs/pool/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@protobufjs/pool", - "description": "A general purpose buffer pool.", - "version": "1.1.0", - "author": "Daniel Wirtz ", - "repository": { - "type": "git", - "url": "https://github.com/dcodeIO/protobuf.js.git" - }, - "license": "BSD-3-Clause", - "main": "index.js", - "types": "index.d.ts", - "devDependencies": { - "istanbul": "^0.4.5", - "tape": "^4.6.3" - }, - "scripts": { - "test": "tape tests/*.js", - "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" - } -} diff --git a/node_modules/@protobufjs/pool/tests/index.js b/node_modules/@protobufjs/pool/tests/index.js deleted file mode 100644 index 5d1a921..0000000 --- a/node_modules/@protobufjs/pool/tests/index.js +++ /dev/null @@ -1,33 +0,0 @@ -var tape = require("tape"); - -var pool = require(".."); - -if (typeof Uint8Array !== "undefined") -tape.test("pool", function(test) { - - var alloc = pool(function(size) { return new Uint8Array(size); }, Uint8Array.prototype.subarray); - - var buf1 = alloc(0); - test.equal(buf1.length, 0, "should allocate a buffer of size 0"); - - var buf2 = alloc(1); - test.equal(buf2.length, 1, "should allocate a buffer of size 1 (initializes slab)"); - - test.notEqual(buf2.buffer, buf1.buffer, "should not reference the same backing buffer if previous buffer had size 0"); - test.equal(buf2.byteOffset, 0, "should allocate at byteOffset 0 when using a new slab"); - - buf1 = alloc(1); - test.equal(buf1.buffer, buf2.buffer, "should reference the same backing buffer when allocating a chunk fitting into the slab"); - test.equal(buf1.byteOffset, 8, "should align slices to 32 bit and this allocate at byteOffset 8"); - - var buf3 = alloc(4097); - test.notEqual(buf3.buffer, buf2.buffer, "should not reference the same backing buffer when allocating a buffer larger than half the backing buffer's size"); - - buf2 = alloc(4096); - test.equal(buf2.buffer, buf1.buffer, "should reference the same backing buffer when allocating a buffer smaller or equal than half the backing buffer's size"); - - buf1 = alloc(4096); - test.notEqual(buf1.buffer, buf2.buffer, "should not reference the same backing buffer when the slab is exhausted (initializes new slab)"); - - test.end(); -}); \ No newline at end of file diff --git a/node_modules/@protobufjs/utf8/LICENSE b/node_modules/@protobufjs/utf8/LICENSE deleted file mode 100644 index be2b397..0000000 --- a/node_modules/@protobufjs/utf8/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2016, Daniel Wirtz All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/utf8/README.md b/node_modules/@protobufjs/utf8/README.md deleted file mode 100644 index c936d9b..0000000 --- a/node_modules/@protobufjs/utf8/README.md +++ /dev/null @@ -1,20 +0,0 @@ -@protobufjs/utf8 -================ -[![npm](https://img.shields.io/npm/v/@protobufjs/utf8.svg)](https://www.npmjs.com/package/@protobufjs/utf8) - -A minimal UTF8 implementation for number arrays. - -API ---- - -* **utf8.length(string: `string`): `number`**
- Calculates the UTF8 byte length of a string. - -* **utf8.read(buffer: `Uint8Array`, start: `number`, end: `number`): `string`**
- Reads UTF8 bytes as a string. - -* **utf8.write(string: `string`, buffer: `Uint8Array`, offset: `number`): `number`**
- Writes a string as UTF8 bytes. - - -**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/utf8/index.d.ts b/node_modules/@protobufjs/utf8/index.d.ts deleted file mode 100644 index 2f1d0ab..0000000 --- a/node_modules/@protobufjs/utf8/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Calculates the UTF8 byte length of a string. - * @param {string} string String - * @returns {number} Byte length - */ -export function length(string: string): number; - -/** - * Reads UTF8 bytes as a string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} String read - */ -export function read(buffer: Uint8Array, start: number, end: number): string; - -/** - * Writes a string as UTF8 bytes. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Bytes written - */ -export function write(string: string, buffer: Uint8Array, offset: number): number; diff --git a/node_modules/@protobufjs/utf8/index.js b/node_modules/@protobufjs/utf8/index.js deleted file mode 100644 index 7b44b29..0000000 --- a/node_modules/@protobufjs/utf8/index.js +++ /dev/null @@ -1,104 +0,0 @@ -"use strict"; - -/** - * A minimal UTF8 implementation for number arrays. - * @memberof util - * @namespace - */ -var utf8 = exports, - replacementChar = "\ufffd"; - -/** - * Calculates the UTF8 byte length of a string. - * @param {string} string String - * @returns {number} Byte length - */ -utf8.length = function utf8_length(string) { - var len = 0, - c = 0; - for (var i = 0; i < string.length; ++i) { - c = string.charCodeAt(i); - if (c < 128) - len += 1; - else if (c < 2048) - len += 2; - else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { - ++i; - len += 4; - } else - len += 3; - } - return len; -}; - -/** - * Reads UTF8 bytes as a string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} String read - */ -utf8.read = function utf8_read(buffer, start, end) { - if (end - start < 1) { - return ""; - } - - var str = ""; - for (var i = start; i < end;) { - var t = buffer[i++]; - if (t <= 0x7F) { - str += String.fromCharCode(t); - } else if (t >= 0xC0 && t < 0xE0) { - var c2 = (t & 0x1F) << 6 | buffer[i++] & 0x3F; - str += c2 >= 0x80 ? String.fromCharCode(c2) : replacementChar; - } else if (t >= 0xE0 && t < 0xF0) { - var c3 = (t & 0xF) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F; - str += c3 >= 0x800 ? String.fromCharCode(c3) : replacementChar; - } else if (t >= 0xF0) { - var t2 = (t & 7) << 18 | (buffer[i++] & 0x3F) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F; - if (t2 < 0x10000 || t2 > 0x10FFFF) - str += replacementChar; - else { - t2 -= 0x10000; - str += String.fromCharCode(0xD800 + (t2 >> 10)); - str += String.fromCharCode(0xDC00 + (t2 & 0x3FF)); - } - } - } - - return str; -}; - -/** - * Writes a string as UTF8 bytes. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Bytes written - */ -utf8.write = function utf8_write(string, buffer, offset) { - var start = offset, - c1, // character 1 - c2; // character 2 - for (var i = 0; i < string.length; ++i) { - c1 = string.charCodeAt(i); - if (c1 < 128) { - buffer[offset++] = c1; - } else if (c1 < 2048) { - buffer[offset++] = c1 >> 6 | 192; - buffer[offset++] = c1 & 63 | 128; - } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { - c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); - ++i; - buffer[offset++] = c1 >> 18 | 240; - buffer[offset++] = c1 >> 12 & 63 | 128; - buffer[offset++] = c1 >> 6 & 63 | 128; - buffer[offset++] = c1 & 63 | 128; - } else { - buffer[offset++] = c1 >> 12 | 224; - buffer[offset++] = c1 >> 6 & 63 | 128; - buffer[offset++] = c1 & 63 | 128; - } - } - return offset - start; -}; diff --git a/node_modules/@protobufjs/utf8/package.json b/node_modules/@protobufjs/utf8/package.json deleted file mode 100644 index 0284f72..0000000 --- a/node_modules/@protobufjs/utf8/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@protobufjs/utf8", - "description": "A minimal UTF8 implementation for number arrays.", - "version": "1.1.1", - "author": "Daniel Wirtz ", - "repository": { - "type": "git", - "url": "https://github.com/dcodeIO/protobuf.js.git" - }, - "license": "BSD-3-Clause", - "main": "index.js", - "types": "index.d.ts", - "devDependencies": { - "istanbul": "^0.4.5", - "tape": "^5.0.0" - }, - "scripts": { - "test": "tape tests/*.js", - "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" - } -} diff --git a/node_modules/@protobufjs/utf8/tests/data/surrogate_pair_bug.txt b/node_modules/@protobufjs/utf8/tests/data/surrogate_pair_bug.txt deleted file mode 100644 index 8dc49d0..0000000 --- a/node_modules/@protobufjs/utf8/tests/data/surrogate_pair_bug.txt +++ /dev/null @@ -1,207 +0,0 @@ -this file demonstrates a bug in the utf8_read function. xxxxxxxxxxxxxxxxxxxxxxx -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz -zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz -zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz -zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz -zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz -zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz diff --git a/node_modules/@protobufjs/utf8/tests/data/utf8.txt b/node_modules/@protobufjs/utf8/tests/data/utf8.txt deleted file mode 100644 index 580b4c4..0000000 --- a/node_modules/@protobufjs/utf8/tests/data/utf8.txt +++ /dev/null @@ -1,216 +0,0 @@ -UTF-8 encoded sample plain-text file -‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - -Markus Kuhn [ˈmaʳkʊs kuːn] — 2002-07-25 CC BY - - -The ASCII compatible UTF-8 encoding used in this plain-text file -is defined in Unicode, ISO 10646-1, and RFC 2279. - - -Using Unicode/UTF-8, you can write in emails and source code things such as - -Mathematics and sciences: - - ∮ E⋅da = Q, n → ∞, ∑ f(i) = ∏ g(i), ⎧⎡⎛┌─────┐⎞⎤⎫ - ⎪⎢⎜│a²+b³ ⎟⎥⎪ - ∀x∈ℝ: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β), ⎪⎢⎜│───── ⎟⎥⎪ - ⎪⎢⎜⎷ c₈ ⎟⎥⎪ - ℕ ⊆ ℕ₀ ⊂ ℤ ⊂ ℚ ⊂ ℝ ⊂ ℂ, ⎨⎢⎜ ⎟⎥⎬ - ⎪⎢⎜ ∞ ⎟⎥⎪ - ⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (⟦A⟧ ⇔ ⟪B⟫), ⎪⎢⎜ ⎲ ⎟⎥⎪ - ⎪⎢⎜ ⎳aⁱ-bⁱ⎟⎥⎪ - 2H₂ + O₂ ⇌ 2H₂O, R = 4.7 kΩ, ⌀ 200 mm ⎩⎣⎝i=1 ⎠⎦⎭ - -Linguistics and dictionaries: - - ði ıntəˈnæʃənəl fəˈnɛtık əsoʊsiˈeıʃn - Y [ˈʏpsilɔn], Yen [jɛn], Yoga [ˈjoːgɑ] - -APL: - - ((V⍳V)=⍳⍴V)/V←,V ⌷←⍳→⍴∆∇⊃‾⍎⍕⌈ - -Nicer typography in plain text files: - - ╔══════════════════════════════════════════╗ - ║ ║ - ║ • ‘single’ and “double” quotes ║ - ║ ║ - ║ • Curly apostrophes: “We’ve been here” ║ - ║ ║ - ║ • Latin-1 apostrophe and accents: '´` ║ - ║ ║ - ║ • ‚deutsche‘ „Anführungszeichen“ ║ - ║ ║ - ║ • †, ‡, ‰, •, 3–4, —, −5/+5, ™, … ║ - ║ ║ - ║ • ASCII safety test: 1lI|, 0OD, 8B ║ - ║ ╭─────────╮ ║ - ║ • the euro symbol: │ 14.95 € │ ║ - ║ ╰─────────╯ ║ - ╚══════════════════════════════════════════╝ - -Combining characters: - - STARGΛ̊TE SG-1, a = v̇ = r̈, a⃑ ⊥ b⃑ - -Greek (in Polytonic): - - The Greek anthem: - - Σὲ γνωρίζω ἀπὸ τὴν κόψη - τοῦ σπαθιοῦ τὴν τρομερή, - σὲ γνωρίζω ἀπὸ τὴν ὄψη - ποὺ μὲ βία μετράει τὴ γῆ. - - ᾿Απ᾿ τὰ κόκκαλα βγαλμένη - τῶν ῾Ελλήνων τὰ ἱερά - καὶ σὰν πρῶτα ἀνδρειωμένη - χαῖρε, ὦ χαῖρε, ᾿Ελευθεριά! - - From a speech of Demosthenes in the 4th century BC: - - Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν, ὦ ἄνδρες ᾿Αθηναῖοι, - ὅταν τ᾿ εἰς τὰ πράγματα ἀποβλέψω καὶ ὅταν πρὸς τοὺς - λόγους οὓς ἀκούω· τοὺς μὲν γὰρ λόγους περὶ τοῦ - τιμωρήσασθαι Φίλιππον ὁρῶ γιγνομένους, τὰ δὲ πράγματ᾿ - εἰς τοῦτο προήκοντα, ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αὐτοὶ - πρότερον κακῶς σκέψασθαι δέον. οὐδέν οὖν ἄλλο μοι δοκοῦσιν - οἱ τὰ τοιαῦτα λέγοντες ἢ τὴν ὑπόθεσιν, περὶ ἧς βουλεύεσθαι, - οὐχὶ τὴν οὖσαν παριστάντες ὑμῖν ἁμαρτάνειν. ἐγὼ δέ, ὅτι μέν - ποτ᾿ ἐξῆν τῇ πόλει καὶ τὰ αὑτῆς ἔχειν ἀσφαλῶς καὶ Φίλιππον - τιμωρήσασθαι, καὶ μάλ᾿ ἀκριβῶς οἶδα· ἐπ᾿ ἐμοῦ γάρ, οὐ πάλαι - γέγονεν ταῦτ᾿ ἀμφότερα· νῦν μέντοι πέπεισμαι τοῦθ᾿ ἱκανὸν - προλαβεῖν ἡμῖν εἶναι τὴν πρώτην, ὅπως τοὺς συμμάχους - σώσομεν. ἐὰν γὰρ τοῦτο βεβαίως ὑπάρξῃ, τότε καὶ περὶ τοῦ - τίνα τιμωρήσεταί τις καὶ ὃν τρόπον ἐξέσται σκοπεῖν· πρὶν δὲ - τὴν ἀρχὴν ὀρθῶς ὑποθέσθαι, μάταιον ἡγοῦμαι περὶ τῆς - τελευτῆς ὁντινοῦν ποιεῖσθαι λόγον. - - Δημοσθένους, Γ´ ᾿Ολυνθιακὸς - -Georgian: - - From a Unicode conference invitation: - - გთხოვთ ახლავე გაიაროთ რეგისტრაცია Unicode-ის მეათე საერთაშორისო - კონფერენციაზე დასასწრებად, რომელიც გაიმართება 10-12 მარტს, - ქ. მაინცში, გერმანიაში. კონფერენცია შეჰკრებს ერთად მსოფლიოს - ექსპერტებს ისეთ დარგებში როგორიცაა ინტერნეტი და Unicode-ი, - ინტერნაციონალიზაცია და ლოკალიზაცია, Unicode-ის გამოყენება - ოპერაციულ სისტემებსა, და გამოყენებით პროგრამებში, შრიფტებში, - ტექსტების დამუშავებასა და მრავალენოვან კომპიუტერულ სისტემებში. - -Russian: - - From a Unicode conference invitation: - - Зарегистрируйтесь сейчас на Десятую Международную Конференцию по - Unicode, которая состоится 10-12 марта 1997 года в Майнце в Германии. - Конференция соберет широкий круг экспертов по вопросам глобального - Интернета и Unicode, локализации и интернационализации, воплощению и - применению Unicode в различных операционных системах и программных - приложениях, шрифтах, верстке и многоязычных компьютерных системах. - -Thai (UCS Level 2): - - Excerpt from a poetry on The Romance of The Three Kingdoms (a Chinese - classic 'San Gua'): - - [----------------------------|------------------------] - ๏ แผ่นดินฮั่นเสื่อมโทรมแสนสังเวช พระปกเกศกองบู๊กู้ขึ้นใหม่ - สิบสองกษัตริย์ก่อนหน้าแลถัดไป สององค์ไซร้โง่เขลาเบาปัญญา - ทรงนับถือขันทีเป็นที่พึ่ง บ้านเมืองจึงวิปริตเป็นนักหนา - โฮจิ๋นเรียกทัพทั่วหัวเมืองมา หมายจะฆ่ามดชั่วตัวสำคัญ - เหมือนขับไสไล่เสือจากเคหา รับหมาป่าเข้ามาเลยอาสัญ - ฝ่ายอ้องอุ้นยุแยกให้แตกกัน ใช้สาวนั้นเป็นชนวนชื่นชวนใจ - พลันลิฉุยกุยกีกลับก่อเหตุ ช่างอาเพศจริงหนาฟ้าร้องไห้ - ต้องรบราฆ่าฟันจนบรรลัย ฤๅหาใครค้ำชูกู้บรรลังก์ ฯ - - (The above is a two-column text. If combining characters are handled - correctly, the lines of the second column should be aligned with the - | character above.) - -Ethiopian: - - Proverbs in the Amharic language: - - ሰማይ አይታረስ ንጉሥ አይከሰስ። - ብላ ካለኝ እንደአባቴ በቆመጠኝ። - ጌጥ ያለቤቱ ቁምጥና ነው። - ደሀ በሕልሙ ቅቤ ባይጠጣ ንጣት በገደለው። - የአፍ ወለምታ በቅቤ አይታሽም። - አይጥ በበላ ዳዋ ተመታ። - ሲተረጉሙ ይደረግሙ። - ቀስ በቀስ፥ ዕንቁላል በእግሩ ይሄዳል። - ድር ቢያብር አንበሳ ያስር። - ሰው እንደቤቱ እንጅ እንደ ጉረቤቱ አይተዳደርም። - እግዜር የከፈተውን ጉሮሮ ሳይዘጋው አይድርም። - የጎረቤት ሌባ፥ ቢያዩት ይስቅ ባያዩት ያጠልቅ። - ሥራ ከመፍታት ልጄን ላፋታት። - ዓባይ ማደሪያ የለው፥ ግንድ ይዞ ይዞራል። - የእስላም አገሩ መካ የአሞራ አገሩ ዋርካ። - ተንጋሎ ቢተፉ ተመልሶ ባፉ። - ወዳጅህ ማር ቢሆን ጨርስህ አትላሰው። - እግርህን በፍራሽህ ልክ ዘርጋ። - -Runes: - - ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛏ ᚻᛖ ᛒᚢᛞᛖ ᚩᚾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ ᚹᛁᚦ ᚦᚪ ᚹᛖᛥᚫ - - (Old English, which transcribed into Latin reads 'He cwaeth that he - bude thaem lande northweardum with tha Westsae.' and means 'He said - that he lived in the northern land near the Western Sea.') - -Braille: - - ⡌⠁⠧⠑ ⠼⠁⠒ ⡍⠜⠇⠑⠹⠰⠎ ⡣⠕⠌ - - ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠙⠑⠁⠙⠒ ⠞⠕ ⠃⠑⠛⠔ ⠺⠊⠹⠲ ⡹⠻⠑ ⠊⠎ ⠝⠕ ⠙⠳⠃⠞ - ⠱⠁⠞⠑⠧⠻ ⠁⠃⠳⠞ ⠹⠁⠞⠲ ⡹⠑ ⠗⠑⠛⠊⠌⠻ ⠕⠋ ⠙⠊⠎ ⠃⠥⠗⠊⠁⠇ ⠺⠁⠎ - ⠎⠊⠛⠝⠫ ⠃⠹ ⠹⠑ ⠊⠇⠻⠛⠹⠍⠁⠝⠂ ⠹⠑ ⠊⠇⠻⠅⠂ ⠹⠑ ⠥⠝⠙⠻⠞⠁⠅⠻⠂ - ⠁⠝⠙ ⠹⠑ ⠡⠊⠑⠋ ⠍⠳⠗⠝⠻⠲ ⡎⠊⠗⠕⠕⠛⠑ ⠎⠊⠛⠝⠫ ⠊⠞⠲ ⡁⠝⠙ - ⡎⠊⠗⠕⠕⠛⠑⠰⠎ ⠝⠁⠍⠑ ⠺⠁⠎ ⠛⠕⠕⠙ ⠥⠏⠕⠝ ⠰⡡⠁⠝⠛⠑⠂ ⠋⠕⠗ ⠁⠝⠹⠹⠔⠛ ⠙⠑ - ⠡⠕⠎⠑ ⠞⠕ ⠏⠥⠞ ⠙⠊⠎ ⠙⠁⠝⠙ ⠞⠕⠲ - - ⡕⠇⠙ ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ - - ⡍⠔⠙⠖ ⡊ ⠙⠕⠝⠰⠞ ⠍⠑⠁⠝ ⠞⠕ ⠎⠁⠹ ⠹⠁⠞ ⡊ ⠅⠝⠪⠂ ⠕⠋ ⠍⠹ - ⠪⠝ ⠅⠝⠪⠇⠫⠛⠑⠂ ⠱⠁⠞ ⠹⠻⠑ ⠊⠎ ⠏⠜⠞⠊⠊⠥⠇⠜⠇⠹ ⠙⠑⠁⠙ ⠁⠃⠳⠞ - ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ ⡊ ⠍⠊⠣⠞ ⠙⠁⠧⠑ ⠃⠑⠲ ⠔⠊⠇⠔⠫⠂ ⠍⠹⠎⠑⠇⠋⠂ ⠞⠕ - ⠗⠑⠛⠜⠙ ⠁ ⠊⠕⠋⠋⠔⠤⠝⠁⠊⠇ ⠁⠎ ⠹⠑ ⠙⠑⠁⠙⠑⠌ ⠏⠊⠑⠊⠑ ⠕⠋ ⠊⠗⠕⠝⠍⠕⠝⠛⠻⠹ - ⠔ ⠹⠑ ⠞⠗⠁⠙⠑⠲ ⡃⠥⠞ ⠹⠑ ⠺⠊⠎⠙⠕⠍ ⠕⠋ ⠳⠗ ⠁⠝⠊⠑⠌⠕⠗⠎ - ⠊⠎ ⠔ ⠹⠑ ⠎⠊⠍⠊⠇⠑⠆ ⠁⠝⠙ ⠍⠹ ⠥⠝⠙⠁⠇⠇⠪⠫ ⠙⠁⠝⠙⠎ - ⠩⠁⠇⠇ ⠝⠕⠞ ⠙⠊⠌⠥⠗⠃ ⠊⠞⠂ ⠕⠗ ⠹⠑ ⡊⠳⠝⠞⠗⠹⠰⠎ ⠙⠕⠝⠑ ⠋⠕⠗⠲ ⡹⠳ - ⠺⠊⠇⠇ ⠹⠻⠑⠋⠕⠗⠑ ⠏⠻⠍⠊⠞ ⠍⠑ ⠞⠕ ⠗⠑⠏⠑⠁⠞⠂ ⠑⠍⠏⠙⠁⠞⠊⠊⠁⠇⠇⠹⠂ ⠹⠁⠞ - ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ - - (The first couple of paragraphs of "A Christmas Carol" by Dickens) - -Compact font selection example text: - - ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789 - abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ - –—‘“”„†•…‰™œŠŸž€ ΑΒΓΔΩαβγδω АБВГДабвгд - ∀∂∈ℝ∧∪≡∞ ↑↗↨↻⇣ ┐┼╔╘░►☺♀ fi�⑀₂ἠḂӥẄɐː⍎אԱა - -Greetings in various languages: - - Hello world, Καλημέρα κόσμε, コンニチハ - -Box drawing alignment tests: █ - ▉ - ╔══╦══╗ ┌──┬──┐ ╭──┬──╮ ╭──┬──╮ ┏━━┳━━┓ ┎┒┏┑ ╷ ╻ ┏┯┓ ┌┰┐ ▊ ╱╲╱╲╳╳╳ - ║┌─╨─┐║ │╔═╧═╗│ │╒═╪═╕│ │╓─╁─╖│ ┃┌─╂─┐┃ ┗╃╄┙ ╶┼╴╺╋╸┠┼┨ ┝╋┥ ▋ ╲╱╲╱╳╳╳ - ║│╲ ╱│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╿ │┃ ┍╅╆┓ ╵ ╹ ┗┷┛ └┸┘ ▌ ╱╲╱╲╳╳╳ - ╠╡ ╳ ╞╣ ├╢ ╟┤ ├┼─┼─┼┤ ├╫─╂─╫┤ ┣┿╾┼╼┿┫ ┕┛┖┚ ┌┄┄┐ ╎ ┏┅┅┓ ┋ ▍ ╲╱╲╱╳╳╳ - ║│╱ ╲│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╽ │┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▎ - ║└─╥─┘║ │╚═╤═╝│ │╘═╪═╛│ │╙─╀─╜│ ┃└─╂─┘┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▏ - ╚══╩══╝ └──┴──┘ ╰──┴──╯ ╰──┴──╯ ┗━━┻━━┛ ▗▄▖▛▀▜ └╌╌┘ ╎ ┗╍╍┛ ┋ ▁▂▃▄▅▆▇█ - ▝▀▘▙▄▟ - -Surrogates: - -𠜎 𠜱 𠝹 𠱓 𠱸 𠲖 𠳏 𠳕 𠴕 𠵼 𠵿 𠸎 𠸏 𠹷 𠺝 𠺢 𠻗 𠻹 𠻺 𠼭 𠼮 𠽌 𠾴 𠾼 𠿪 𡁜 𡁯 𡁵 𡁶 𡁻 𡃁 -𡃉 𡇙 𢃇 𢞵 𢫕 𢭃 𢯊 𢱑 𢱕 𢳂 𢴈 𢵌 𢵧 𢺳 𣲷 𤓓 𤶸 𤷪 𥄫 𦉘 𦟌 𦧲 𦧺 𧨾 𨅝 𨈇 𨋢 𨳊 𨳍 𨳒 𩶘 diff --git a/node_modules/@protobufjs/utf8/tests/index.js b/node_modules/@protobufjs/utf8/tests/index.js deleted file mode 100644 index 1bbc073..0000000 --- a/node_modules/@protobufjs/utf8/tests/index.js +++ /dev/null @@ -1,74 +0,0 @@ -var tape = require("tape"); - -var utf8 = require(".."); - -var data = require("fs").readFileSync(require.resolve("./data/utf8.txt")), - dataStr = data.toString("utf8"); - -var surrogatePairErr = require("fs").readFileSync(require.resolve("./data/surrogate_pair_bug.txt")), - surrogatePairErrStr = data.toString("utf8"); - -tape.test("utf8", function(test) { - - test.test(test.name + " - length", function(test) { - test.equal(utf8.length(""), 0, "should return a byte length of zero for an empty string"); - - test.equal(utf8.length(dataStr), Buffer.byteLength(dataStr), "should return the same byte length as node buffers"); - - test.end(); - }); - - test.test(test.name + " - read", function(test) { - var comp = utf8.read([], 0, 0); - test.equal(comp, "", "should decode an empty buffer to an empty string"); - - comp = utf8.read(data, 0, data.length); - test.equal(comp, data.toString("utf8"), "should decode to the same byte data as node buffers"); - - var longData = Buffer.concat([data, data, data, data]); - comp = utf8.read(longData, 0, longData.length); - test.equal(comp, longData.toString("utf8"), "should decode to the same byte data as node buffers (long)"); - - var chunkData = new Buffer(data.toString("utf8").substring(0, 8192)); - comp = utf8.read(chunkData, 0, chunkData.length); - test.equal(comp, chunkData.toString("utf8"), "should decode to the same byte data as node buffers (chunk size)"); - - comp = utf8.read(surrogatePairErr, 0, surrogatePairErr.length); - test.equal(comp, surrogatePairErr.toString("utf8"), "should decode to the same byte data as node buffers (surrogate pair over chunk)"); - - [ - [0xC0, 0x80], // U+0000 encoded as two bytes - [0xE0, 0x81, 0xBF], // U+007F encoded as three bytes - [0xF0, 0x80, 0x9F, 0xBF], // U+07FF encoded as four bytes - [0xF4, 0x90, 0x80, 0x80] // >U+10FFFF encoded as four bytes - ].forEach(function(bytes) { - var overlong = new Buffer(bytes); - comp = utf8.read(overlong, 0, overlong.length); - test.equal(comp, "\ufffd", "should decode overlong UTF-8 sequences as replacement characters"); - }); - - test.end(); - }); - - test.test(test.name + " - write", function(test) { - var buf = new Buffer(0); - test.equal(utf8.write("", buf, 0), 0, "should encode an empty string to an empty buffer"); - - var len = utf8.length(dataStr); - buf = new Buffer(len); - test.equal(utf8.write(dataStr, buf, 0), len, "should encode to exactly " + len + " bytes"); - - test.equal(buf.length, data.length, "should encode to a buffer length equal to that of node buffers"); - - for (var i = 0; i < buf.length; ++i) { - if (buf[i] !== data[i]) { - test.fail("should encode to the same buffer data as node buffers (offset " + i + ")"); - return; - } - } - test.pass("should encode to the same buffer data as node buffers"); - - test.end(); - }); - -}); diff --git a/node_modules/@temporalio/client/LICENSE b/node_modules/@temporalio/client/LICENSE deleted file mode 100644 index 7c6bbca..0000000 --- a/node_modules/@temporalio/client/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2021-2025 Temporal Technologies Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@temporalio/client/README.md b/node_modules/@temporalio/client/README.md deleted file mode 100644 index 3cbc914..0000000 --- a/node_modules/@temporalio/client/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# `@temporalio/client` - -[![NPM](https://img.shields.io/npm/v/@temporalio/client?style=for-the-badge)](https://www.npmjs.com/package/@temporalio/client) - -Part of [Temporal](https://temporal.io)'s [TypeScript SDK](https://docs.temporal.io/typescript/introduction/). - -- [Client docs](https://docs.temporal.io/typescript/clients) -- [API reference](https://typescript.temporal.io/api/namespaces/client) -- [Sample projects](https://github.com/temporalio/samples-typescript) diff --git a/node_modules/@temporalio/client/lib/async-completion-client.d.ts b/node_modules/@temporalio/client/lib/async-completion-client.d.ts deleted file mode 100644 index 5a6ba19..0000000 --- a/node_modules/@temporalio/client/lib/async-completion-client.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { BaseClient, BaseClientOptions, LoadedWithDefaults } from './base-client'; -import { WorkflowService } from './types'; -/** - * Thrown by {@link AsyncCompletionClient} when trying to complete or heartbeat an Activity that does not exist in the - * system. - */ -export declare class ActivityNotFoundError extends Error { -} -/** - * Thrown by {@link AsyncCompletionClient} when trying to complete or heartbeat - * an Activity for any reason apart from {@link ActivityNotFoundError}. - */ -export declare class ActivityCompletionError extends Error { -} -/** - * Thrown by {@link AsyncCompletionClient.heartbeat} when the Workflow has - * requested to cancel the reporting Activity. - */ -export declare class ActivityCancelledError extends Error { -} -/** - * Thrown by {@link AsyncCompletionClient.heartbeat} when the reporting Activity - * has been paused. - */ -export declare class ActivityPausedError extends Error { -} -/** - * Thrown by {@link AsyncCompletionClient.heartbeat} when the reporting Activity - * has been reset. - */ -export declare class ActivityResetError extends Error { -} -/** - * Options used to configure {@link AsyncCompletionClient} - */ -export type AsyncCompletionClientOptions = BaseClientOptions; -export type LoadedAsyncCompletionClientOptions = LoadedWithDefaults; -/** - * A mostly unique Activity identifier including its scheduling workflow's ID - * and an optional runId. - * - * Activity IDs may be reused in a single Workflow run as long as a previous - * Activity with the same ID has completed already. - */ -export interface FullActivityId { - workflowId: string; - runId?: string; - activityId: string; -} -/** - * A client for asynchronous completion and heartbeating of Activities. - * - * Typically this client should not be instantiated directly, instead create the high level {@link Client} and use - * {@link Client.activity} to complete async activities. - */ -export declare class AsyncCompletionClient extends BaseClient { - readonly options: LoadedAsyncCompletionClientOptions; - constructor(options?: AsyncCompletionClientOptions); - /** - * Raw gRPC access to the Temporal service. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests made via this service - * object. - */ - get workflowService(): WorkflowService; - /** - * Transforms grpc errors into well defined TS errors. - */ - protected handleError(err: unknown): never; - /** - * Complete an Activity by task token - */ - complete(taskToken: Uint8Array, result: unknown): Promise; - /** - * Complete an Activity by full ID - */ - complete(fullActivityId: FullActivityId, result: unknown): Promise; - /** - * Fail an Activity by task token - */ - fail(taskToken: Uint8Array, err: unknown): Promise; - /** - * Fail an Activity by full ID - */ - fail(fullActivityId: FullActivityId, err: unknown): Promise; - /** - * Report Activity cancellation by task token - */ - reportCancellation(taskToken: Uint8Array, details?: unknown): Promise; - /** - * Report Activity cancellation by full ID - */ - reportCancellation(fullActivityId: FullActivityId, details?: unknown): Promise; - /** - * Send Activity heartbeat by task token - */ - heartbeat(taskToken: Uint8Array, details?: unknown): Promise; - /** - * Send Activity heartbeat by full ID - */ - heartbeat(fullActivityId: FullActivityId, details?: unknown): Promise; -} diff --git a/node_modules/@temporalio/client/lib/async-completion-client.js b/node_modules/@temporalio/client/lib/async-completion-client.js deleted file mode 100644 index 644fe8d..0000000 --- a/node_modules/@temporalio/client/lib/async-completion-client.js +++ /dev/null @@ -1,227 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AsyncCompletionClient = exports.ActivityResetError = exports.ActivityPausedError = exports.ActivityCancelledError = exports.ActivityCompletionError = exports.ActivityNotFoundError = void 0; -const grpc_js_1 = require("@grpc/grpc-js"); -const common_1 = require("@temporalio/common"); -const internal_non_workflow_1 = require("@temporalio/common/lib/internal-non-workflow"); -const internal_workflow_1 = require("@temporalio/common/lib/internal-workflow"); -const type_helpers_1 = require("@temporalio/common/lib/type-helpers"); -const base_client_1 = require("./base-client"); -const errors_1 = require("./errors"); -const helpers_1 = require("./helpers"); -/** - * Thrown by {@link AsyncCompletionClient} when trying to complete or heartbeat an Activity that does not exist in the - * system. - */ -let ActivityNotFoundError = class ActivityNotFoundError extends Error { -}; -exports.ActivityNotFoundError = ActivityNotFoundError; -exports.ActivityNotFoundError = ActivityNotFoundError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('ActivityNotFoundError') -], ActivityNotFoundError); -/** - * Thrown by {@link AsyncCompletionClient} when trying to complete or heartbeat - * an Activity for any reason apart from {@link ActivityNotFoundError}. - */ -let ActivityCompletionError = class ActivityCompletionError extends Error { -}; -exports.ActivityCompletionError = ActivityCompletionError; -exports.ActivityCompletionError = ActivityCompletionError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('ActivityCompletionError') -], ActivityCompletionError); -/** - * Thrown by {@link AsyncCompletionClient.heartbeat} when the Workflow has - * requested to cancel the reporting Activity. - */ -let ActivityCancelledError = class ActivityCancelledError extends Error { -}; -exports.ActivityCancelledError = ActivityCancelledError; -exports.ActivityCancelledError = ActivityCancelledError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('ActivityCancelledError') -], ActivityCancelledError); -/** - * Thrown by {@link AsyncCompletionClient.heartbeat} when the reporting Activity - * has been paused. - */ -let ActivityPausedError = class ActivityPausedError extends Error { -}; -exports.ActivityPausedError = ActivityPausedError; -exports.ActivityPausedError = ActivityPausedError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('ActivityPausedError') -], ActivityPausedError); -/** - * Thrown by {@link AsyncCompletionClient.heartbeat} when the reporting Activity - * has been reset. - */ -let ActivityResetError = class ActivityResetError extends Error { -}; -exports.ActivityResetError = ActivityResetError; -exports.ActivityResetError = ActivityResetError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('ActivityResetError') -], ActivityResetError); -function defaultAsyncCompletionClientOptions() { - return (0, base_client_1.defaultBaseClientOptions)(); -} -/** - * A client for asynchronous completion and heartbeating of Activities. - * - * Typically this client should not be instantiated directly, instead create the high level {@link Client} and use - * {@link Client.activity} to complete async activities. - */ -class AsyncCompletionClient extends base_client_1.BaseClient { - options; - constructor(options) { - super(options); - this.options = { - ...defaultAsyncCompletionClientOptions(), - ...(0, internal_workflow_1.filterNullAndUndefined)(options ?? {}), - loadedDataConverter: this.dataConverter, - }; - } - /** - * Raw gRPC access to the Temporal service. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests made via this service - * object. - */ - get workflowService() { - return this.connection.workflowService; - } - /** - * Transforms grpc errors into well defined TS errors. - */ - handleError(err) { - if ((0, errors_1.isGrpcServiceError)(err)) { - (0, helpers_1.rethrowKnownErrorTypes)(err); - if (err.code === grpc_js_1.status.NOT_FOUND) { - throw new ActivityNotFoundError('Not found'); - } - throw new ActivityCompletionError(err.details || err.message); - } - throw new ActivityCompletionError('Unexpected failure'); - } - async complete(taskTokenOrFullActivityId, result) { - const payloads = await (0, internal_non_workflow_1.encodeToPayloads)(this.dataConverter, result); - try { - if (taskTokenOrFullActivityId instanceof Uint8Array) { - await this.workflowService.respondActivityTaskCompleted({ - identity: this.options.identity, - namespace: this.options.namespace, - taskToken: taskTokenOrFullActivityId, - result: { payloads }, - }); - } - else { - await this.workflowService.respondActivityTaskCompletedById({ - identity: this.options.identity, - namespace: this.options.namespace, - ...taskTokenOrFullActivityId, - result: { payloads }, - }); - } - } - catch (err) { - this.handleError(err); - } - } - async fail(taskTokenOrFullActivityId, err) { - const failure = await (0, internal_non_workflow_1.encodeErrorToFailure)(this.dataConverter, (0, common_1.ensureTemporalFailure)(err)); - try { - if (taskTokenOrFullActivityId instanceof Uint8Array) { - await this.workflowService.respondActivityTaskFailed({ - identity: this.options.identity, - namespace: this.options.namespace, - taskToken: taskTokenOrFullActivityId, - failure, - }); - } - else { - await this.workflowService.respondActivityTaskFailedById({ - identity: this.options.identity, - namespace: this.options.namespace, - ...taskTokenOrFullActivityId, - failure, - }); - } - } - catch (err) { - this.handleError(err); - } - } - async reportCancellation(taskTokenOrFullActivityId, details) { - const payloads = await (0, internal_non_workflow_1.encodeToPayloads)(this.dataConverter, details); - try { - if (taskTokenOrFullActivityId instanceof Uint8Array) { - await this.workflowService.respondActivityTaskCanceled({ - identity: this.options.identity, - namespace: this.options.namespace, - taskToken: taskTokenOrFullActivityId, - details: { payloads }, - }); - } - else { - await this.workflowService.respondActivityTaskCanceledById({ - identity: this.options.identity, - namespace: this.options.namespace, - ...taskTokenOrFullActivityId, - details: { payloads }, - }); - } - } - catch (err) { - this.handleError(err); - } - } - async heartbeat(taskTokenOrFullActivityId, details) { - const payloads = await (0, internal_non_workflow_1.encodeToPayloads)(this.dataConverter, details); - let cancelRequested = false; - let paused = false; - let reset = false; - try { - if (taskTokenOrFullActivityId instanceof Uint8Array) { - const response = await this.workflowService.recordActivityTaskHeartbeat({ - identity: this.options.identity, - namespace: this.options.namespace, - taskToken: taskTokenOrFullActivityId, - details: { payloads }, - }); - cancelRequested = !!response.cancelRequested; - paused = !!response.activityPaused; - reset = !!response.activityReset; - } - else { - const response = await this.workflowService.recordActivityTaskHeartbeatById({ - identity: this.options.identity, - namespace: this.options.namespace, - ...taskTokenOrFullActivityId, - details: { payloads }, - }); - cancelRequested = !!response.cancelRequested; - paused = !!response.activityPaused; - reset = !!response.activityReset; - } - } - catch (err) { - this.handleError(err); - } - // Note that it is possible for a heartbeat response to have multiple fields - // set as true (i.e. cancelled and pause). - if (cancelRequested) { - throw new ActivityCancelledError('cancelled'); - } - else if (reset) { - throw new ActivityResetError('reset'); - } - else if (paused) { - throw new ActivityPausedError('paused'); - } - } -} -exports.AsyncCompletionClient = AsyncCompletionClient; -//# sourceMappingURL=async-completion-client.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/async-completion-client.js.map b/node_modules/@temporalio/client/lib/async-completion-client.js.map deleted file mode 100644 index 7560582..0000000 --- a/node_modules/@temporalio/client/lib/async-completion-client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"async-completion-client.js","sourceRoot":"","sources":["../src/async-completion-client.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAqD;AACrD,+CAA2D;AAC3D,wFAAsG;AACtG,gFAAkF;AAClF,sEAAiF;AACjF,+CAMuB;AACvB,qCAA8C;AAE9C,uCAAmD;AAEnD;;;GAGG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,KAAK;CAAG,CAAA;AAAtC,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,yCAA0B,EAAC,uBAAuB,CAAC;GACvC,qBAAqB,CAAiB;AAEnD;;;GAGG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,KAAK;CAAG,CAAA;AAAxC,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,yCAA0B,EAAC,yBAAyB,CAAC;GACzC,uBAAuB,CAAiB;AAErD;;;GAGG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,KAAK;CAAG,CAAA;AAAvC,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,yCAA0B,EAAC,wBAAwB,CAAC;GACxC,sBAAsB,CAAiB;AAEpD;;;GAGG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,KAAK;CAAG,CAAA;AAApC,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,yCAA0B,EAAC,qBAAqB,CAAC;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,IAAI,sBAAsB,CAAC,WAAW,CAAC,CAAC;QAChD,CAAC;aAAM,IAAI,KAAK,EAAE,CAAC;YACjB,MAAM,IAAI,kBAAkB,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;aAAM,IAAI,MAAM,EAAE,CAAC;YAClB,MAAM,IAAI,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;CACF;AAvLD,sDAuLC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/base-client.d.ts b/node_modules/@temporalio/client/lib/base-client.d.ts deleted file mode 100644 index f92e594..0000000 --- a/node_modules/@temporalio/client/lib/base-client.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { DataConverter, LoadedDataConverter } from '@temporalio/common'; -import { ConnectionLike, Metadata } from './types'; -export interface BaseClientOptions { - /** - * {@link DataConverter} to use for serializing and deserializing payloads - */ - dataConverter?: DataConverter; - /** - * Identity to report to the server - * - * @default `${process.pid}@${os.hostname()}` - */ - identity?: string; - /** - * Connection to use to communicate with the server. - * - * By default, connects to localhost. - * - * Connections are expensive to construct and should be reused. - */ - connection?: ConnectionLike; - /** - * Server namespace - * - * @default default - */ - namespace?: string; -} -export type WithDefaults = // -Required> & Pick; -export type LoadedWithDefaults = // -WithDefaults & { - loadedDataConverter: LoadedDataConverter; -}; -export declare function defaultBaseClientOptions(): WithDefaults; -export declare class BaseClient { - /** - * The underlying {@link Connection | connection} or {@link NativeConnection | native connection} used by this client. - * - * Clients are cheap to create, but connections are expensive. Where it makes sense, - * a single connection may and should be reused by multiple `Client`s. - */ - readonly connection: ConnectionLike; - private readonly loadedDataConverter; - protected constructor(options?: BaseClientOptions); - /** - * Set a deadline for any service requests executed in `fn`'s scope. - * - * The deadline is a point in time after which any pending gRPC request will be considered as failed; - * this will locally result in the request call throwing a {@link _grpc.ServiceError|ServiceError} - * with code {@link _grpc.status.DEADLINE_EXCEEDED|DEADLINE_EXCEEDED}; see {@link isGrpcDeadlineError}. - * - * It is stronly recommended to explicitly set deadlines. If no deadline is set, then it is - * possible for the client to end up waiting forever for a response. - * - * This method is only a convenience wrapper around {@link Connection.withDeadline}. - * - * @param deadline a point in time after which the request will be considered as failed; either a - * Date object, or a number of milliseconds since the Unix epoch (UTC). - * @returns the value returned from `fn` - * - * @see https://grpc.io/docs/guides/deadlines/ - */ - withDeadline(deadline: number | Date, fn: () => Promise): Promise; - /** - * Set an {@link AbortSignal} that, when aborted, cancels any ongoing service requests executed in - * `fn`'s scope. This will locally result in the request call throwing a {@link _grpc.ServiceError|ServiceError} - * with code {@link _grpc.status.CANCELLED|CANCELLED}; see {@link isGrpcCancelledError}. - * - * This method is only a convenience wrapper around {@link Connection.withAbortSignal}. - * - * @returns value returned from `fn` - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal - */ - withAbortSignal(abortSignal: AbortSignal, fn: () => Promise): Promise; - /** - * Set metadata for any service requests executed in `fn`'s scope. - * - * This method is only a convenience wrapper around {@link Connection.withMetadata}. - * - * @returns returned value of `fn` - */ - withMetadata(metadata: Metadata, fn: () => Promise): Promise; - protected get dataConverter(): LoadedDataConverter; -} diff --git a/node_modules/@temporalio/client/lib/base-client.js b/node_modules/@temporalio/client/lib/base-client.js deleted file mode 100644 index 5e55faf..0000000 --- a/node_modules/@temporalio/client/lib/base-client.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BaseClient = void 0; -exports.defaultBaseClientOptions = defaultBaseClientOptions; -const node_os_1 = __importDefault(require("node:os")); -const internal_non_workflow_1 = require("@temporalio/common/lib/internal-non-workflow"); -const connection_1 = require("./connection"); -function defaultBaseClientOptions() { - return { - dataConverter: {}, - identity: `${process.pid}@${node_os_1.default.hostname()}`, - namespace: 'default', - }; -} -class BaseClient { - /** - * The underlying {@link Connection | connection} or {@link NativeConnection | native connection} used by this client. - * - * Clients are cheap to create, but connections are expensive. Where it makes sense, - * a single connection may and should be reused by multiple `Client`s. - */ - connection; - loadedDataConverter; - constructor(options) { - this.connection = options?.connection ?? connection_1.Connection.lazy(); - const dataConverter = options?.dataConverter ?? {}; - this.loadedDataConverter = (0, internal_non_workflow_1.isLoadedDataConverter)(dataConverter) ? dataConverter : (0, internal_non_workflow_1.loadDataConverter)(dataConverter); - } - /** - * Set a deadline for any service requests executed in `fn`'s scope. - * - * The deadline is a point in time after which any pending gRPC request will be considered as failed; - * this will locally result in the request call throwing a {@link _grpc.ServiceError|ServiceError} - * with code {@link _grpc.status.DEADLINE_EXCEEDED|DEADLINE_EXCEEDED}; see {@link isGrpcDeadlineError}. - * - * It is stronly recommended to explicitly set deadlines. If no deadline is set, then it is - * possible for the client to end up waiting forever for a response. - * - * This method is only a convenience wrapper around {@link Connection.withDeadline}. - * - * @param deadline a point in time after which the request will be considered as failed; either a - * Date object, or a number of milliseconds since the Unix epoch (UTC). - * @returns the value returned from `fn` - * - * @see https://grpc.io/docs/guides/deadlines/ - */ - async withDeadline(deadline, fn) { - return await this.connection.withDeadline(deadline, fn); - } - /** - * Set an {@link AbortSignal} that, when aborted, cancels any ongoing service requests executed in - * `fn`'s scope. This will locally result in the request call throwing a {@link _grpc.ServiceError|ServiceError} - * with code {@link _grpc.status.CANCELLED|CANCELLED}; see {@link isGrpcCancelledError}. - * - * This method is only a convenience wrapper around {@link Connection.withAbortSignal}. - * - * @returns value returned from `fn` - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal - */ - async withAbortSignal(abortSignal, fn) { - return await this.connection.withAbortSignal(abortSignal, fn); - } - /** - * Set metadata for any service requests executed in `fn`'s scope. - * - * This method is only a convenience wrapper around {@link Connection.withMetadata}. - * - * @returns returned value of `fn` - */ - async withMetadata(metadata, fn) { - return await this.connection.withMetadata(metadata, fn); - } - get dataConverter() { - return this.loadedDataConverter; - } -} -exports.BaseClient = BaseClient; -//# sourceMappingURL=base-client.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/base-client.js.map b/node_modules/@temporalio/client/lib/base-client.js.map deleted file mode 100644 index cdf06b7..0000000 --- a/node_modules/@temporalio/client/lib/base-client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base-client.js","sourceRoot":"","sources":["../src/base-client.ts"],"names":[],"mappings":";;;;;;AA6CA,4DAMC;AAnDD,sDAAyB;AAGzB,wFAAwG;AACxG,6CAA0C;AAyC1C,SAAgB,wBAAwB;IACtC,OAAO;QACL,aAAa,EAAE,EAAE;QACjB,QAAQ,EAAE,GAAG,OAAO,CAAC,GAAG,IAAI,iBAAE,CAAC,QAAQ,EAAE,EAAE;QAC3C,SAAS,EAAE,SAAS;KACrB,CAAC;AACJ,CAAC;AAED,MAAa,UAAU;IACrB;;;;;OAKG;IACa,UAAU,CAAiB;IAE1B,mBAAmB,CAAsB;IAE1D,YAAsB,OAA2B;QAC/C,IAAI,CAAC,UAAU,GAAG,OAAO,EAAE,UAAU,IAAI,uBAAU,CAAC,IAAI,EAAE,CAAC;QAC3D,MAAM,aAAa,GAAG,OAAO,EAAE,aAAa,IAAI,EAAE,CAAC;QACnD,IAAI,CAAC,mBAAmB,GAAG,IAAA,6CAAqB,EAAC,aAAa,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAA,yCAAiB,EAAC,aAAa,CAAC,CAAC;IACrH,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACI,KAAK,CAAC,YAAY,CAAI,QAAuB,EAAE,EAAoB;QACxE,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,eAAe,CAAI,WAAwB,EAAE,EAAoB;QACrE,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,YAAY,CAAI,QAAkB,EAAE,EAAoB;QACnE,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED,IAAc,aAAa;QACzB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;CACF;AApED,gCAoEC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/build-id-types.d.ts b/node_modules/@temporalio/client/lib/build-id-types.d.ts deleted file mode 100644 index 5b7d98e..0000000 --- a/node_modules/@temporalio/client/lib/build-id-types.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { temporal } from '@temporalio/proto'; -/** - * Operations that can be passed to {@link TaskQueueClient.updateBuildIdCompatibility}. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export type BuildIdOperation = AddNewIdInNewDefaultSet | AddNewCompatibleVersion | PromoteSetByBuildId | PromoteBuildIdWithinSet | MergeSets; -/** - * Adds a new Build Id into a new set, which will be used as the default set for - * the queue. This means all new workflows will start on this Build Id. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface AddNewIdInNewDefaultSet { - operation: 'addNewIdInNewDefaultSet'; - buildId: string; -} -/** - * Adds a new Build Id into an existing compatible set. The newly added ID becomes - * the default for that compatible set, and thus new workflow tasks for workflows which have been - * executing on workers in that set will now start on this new Build Id. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface AddNewCompatibleVersion { - operation: 'addNewCompatibleVersion'; - buildId: string; - existingCompatibleBuildId: string; - promoteSet?: boolean; -} -/** - * Promotes a set of compatible Build Ids to become the current - * default set for the task queue. Any Build Id in the set may be used to - * target it. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface PromoteSetByBuildId { - operation: 'promoteSetByBuildId'; - buildId: string; -} -/** - * Promotes a Build Id within an existing set to become the default ID for that - * set. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface PromoteBuildIdWithinSet { - operation: 'promoteBuildIdWithinSet'; - buildId: string; -} -/** - * Merges two sets into one set, thus declaring all the Build Ids in both as - * compatible with one another. The default of the primary set is maintained as - * the merged set's overall default. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface MergeSets { - operation: 'mergeSets'; - primaryBuildId: string; - secondaryBuildId: string; -} -/** - * Represents the sets of compatible Build Id versions associated with some - * Task Queue, as fetched by {@link TaskQueueClient.getBuildIdCompatability}. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface WorkerBuildIdVersionSets { - /** - * All version sets that were fetched for this task queue. - */ - readonly versionSets: BuildIdVersionSet[]; - /** - * Returns the default set of compatible Build Ids for the task queue these sets are - * associated with. - */ - defaultSet: BuildIdVersionSet; - /** - * Returns the overall default Build Id for the task queue these sets are - * associated with. - */ - defaultBuildId: string; -} -/** - * Represents one set of compatible Build Ids. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface BuildIdVersionSet { - readonly buildIds: string[]; - readonly default: string; -} -export declare function versionSetsFromProto(resp: temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse): WorkerBuildIdVersionSets; diff --git a/node_modules/@temporalio/client/lib/build-id-types.js b/node_modules/@temporalio/client/lib/build-id-types.js deleted file mode 100644 index 0e70f08..0000000 --- a/node_modules/@temporalio/client/lib/build-id-types.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.versionSetsFromProto = versionSetsFromProto; -function versionSetsFromProto(resp) { - if (resp == null || resp.majorVersionSets == null || resp.majorVersionSets.length === 0) { - throw new Error('Must be constructed from a compatability response with at least one version set'); - } - return { - versionSets: resp.majorVersionSets.map((set) => versionSetFromProto(set)), - get defaultSet() { - // versionSets are read only so no need to worry about an undefined ending up in it - return this.versionSets[this.versionSets.length - 1]; - }, - get defaultBuildId() { - return this.defaultSet.default; - }, - }; -} -function versionSetFromProto(set) { - if (set == null || set.buildIds == null || set.buildIds.length === 0) { - throw new Error('Compatible version sets must contain at least one Build Id'); - } - const buildId = set.buildIds[set.buildIds.length - 1]; - if (buildId === undefined) { - throw new Error('Compatible version sets must contain at least one Build Id'); - } - return { - buildIds: set.buildIds, - default: buildId, - }; -} -//# sourceMappingURL=build-id-types.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/build-id-types.js.map b/node_modules/@temporalio/client/lib/build-id-types.js.map deleted file mode 100644 index f8bd95b..0000000 --- a/node_modules/@temporalio/client/lib/build-id-types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"build-id-types.js","sourceRoot":"","sources":["../src/build-id-types.ts"],"names":[],"mappings":";;AAwHA,oDAgBC;AAhBD,SAAgB,oBAAoB,CAClC,IAA2E;IAE3E,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,IAAI,IAAI,CAAC,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxF,MAAM,IAAI,KAAK,CAAC,iFAAiF,CAAC,CAAC;IACrG,CAAC;IACD,OAAO;QACL,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;QACzE,IAAI,UAAU;YACZ,mFAAmF;YACnF,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAE,CAAC;QACxD,CAAC;QACD,IAAI,cAAc;YAChB,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QACjC,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,GAAoD;IAC/E,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,QAAQ,IAAI,IAAI,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrE,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAChF,CAAC;IACD,MAAM,OAAO,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACtD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAChF,CAAC;IACD,OAAO;QACL,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,OAAO,EAAE,OAAO;KACjB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/client.d.ts b/node_modules/@temporalio/client/lib/client.d.ts deleted file mode 100644 index 9af3ec9..0000000 --- a/node_modules/@temporalio/client/lib/client.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { AsyncCompletionClient } from './async-completion-client'; -import { BaseClient, BaseClientOptions, LoadedWithDefaults } from './base-client'; -import { ClientInterceptors } from './interceptors'; -import { ScheduleClient } from './schedule-client'; -import { QueryRejectCondition, WorkflowService } from './types'; -import { WorkflowClient } from './workflow-client'; -import { TaskQueueClient } from './task-queue-client'; -export interface ClientOptions extends BaseClientOptions { - /** - * Used to override and extend default Connection functionality - * - * Useful for injecting auth headers and tracing Workflow executions - */ - interceptors?: ClientInterceptors; - /** - * List of plugins to register with the client. - * - * Plugins allow you to extend and customize the behavior of Temporal clients. - * They can intercept and modify client creation. - * - * @experimental Plugins is an experimental feature; APIs may change without notice. - */ - plugins?: ClientPlugin[]; - workflow?: { - /** - * Should a query be rejected by closed and failed workflows - * - * @default `undefined`, which means that closed and failed workflows are still queryable - */ - queryRejectCondition?: QueryRejectCondition; - }; -} -export type LoadedClientOptions = LoadedWithDefaults; -/** - * High level SDK client. - */ -export declare class Client extends BaseClient { - readonly options: LoadedClientOptions; - /** - * Workflow sub-client - use to start and interact with Workflows - */ - readonly workflow: WorkflowClient; - /** - * (Async) Activity completion sub-client - use to manually manage Activities - */ - readonly activity: AsyncCompletionClient; - /** - * Schedule sub-client - use to start and interact with Schedules - */ - readonly schedule: ScheduleClient; - /** - * Task Queue sub-client - use to perform operations on Task Queues - * - * @experimental The Worker Versioning API is still being designed. Major changes are expected. - */ - readonly taskQueue: TaskQueueClient; - constructor(options?: ClientOptions); - /** - * Raw gRPC access to the Temporal service. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests made via this service - * object. - */ - get workflowService(): WorkflowService; -} -/** - * Plugin to control the configuration of a native connection. - * - * @experimental Plugins is an experimental feature; APIs may change without notice. - */ -export interface ClientPlugin { - /** - * Gets the name of this plugin. - */ - get name(): string; - /** - * Hook called when creating a client to allow modification of configuration. - * - * This method is called during client creation and allows plugins to modify - * the client configuration before the client is fully initialized. - */ - configureClient?(options: Omit): Omit; -} diff --git a/node_modules/@temporalio/client/lib/client.js b/node_modules/@temporalio/client/lib/client.js deleted file mode 100644 index fe72c37..0000000 --- a/node_modules/@temporalio/client/lib/client.js +++ /dev/null @@ -1,94 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Client = void 0; -const internal_workflow_1 = require("@temporalio/common/lib/internal-workflow"); -const async_completion_client_1 = require("./async-completion-client"); -const base_client_1 = require("./base-client"); -const schedule_client_1 = require("./schedule-client"); -const workflow_client_1 = require("./workflow-client"); -const task_queue_client_1 = require("./task-queue-client"); -/** - * High level SDK client. - */ -class Client extends base_client_1.BaseClient { - options; - /** - * Workflow sub-client - use to start and interact with Workflows - */ - workflow; - /** - * (Async) Activity completion sub-client - use to manually manage Activities - */ - activity; - /** - * Schedule sub-client - use to start and interact with Schedules - */ - schedule; - /** - * Task Queue sub-client - use to perform operations on Task Queues - * - * @experimental The Worker Versioning API is still being designed. Major changes are expected. - */ - taskQueue; - constructor(options) { - options = options ?? {}; - // Add client plugins from the connection - options.plugins = (options.plugins ?? []).concat(options.connection?.plugins ?? []); - // Process plugins first to allow them to modify connect configuration - for (const plugin of options.plugins) { - if (plugin.configureClient !== undefined) { - options = plugin.configureClient(options); - } - } - super(options); - const { interceptors, workflow, plugins, ...commonOptions } = options; - this.workflow = new workflow_client_1.WorkflowClient({ - ...commonOptions, - ...(workflow ?? {}), - connection: this.connection, - dataConverter: this.dataConverter, - interceptors: interceptors?.workflow, - queryRejectCondition: workflow?.queryRejectCondition, - }); - this.activity = new async_completion_client_1.AsyncCompletionClient({ - ...commonOptions, - connection: this.connection, - dataConverter: this.dataConverter, - }); - this.schedule = new schedule_client_1.ScheduleClient({ - ...commonOptions, - connection: this.connection, - dataConverter: this.dataConverter, - interceptors: interceptors?.schedule, - }); - this.taskQueue = new task_queue_client_1.TaskQueueClient({ - ...commonOptions, - connection: this.connection, - dataConverter: this.dataConverter, - }); - this.options = { - ...(0, base_client_1.defaultBaseClientOptions)(), - ...(0, internal_workflow_1.filterNullAndUndefined)(commonOptions), - loadedDataConverter: this.dataConverter, - interceptors: { - workflow: this.workflow.options.interceptors, - schedule: this.schedule.options.interceptors, - }, - workflow: { - queryRejectCondition: this.workflow.options.queryRejectCondition, - }, - plugins: plugins ?? [], - }; - } - /** - * Raw gRPC access to the Temporal service. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests made via this service - * object. - */ - get workflowService() { - return this.connection.workflowService; - } -} -exports.Client = Client; -//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/client.js.map b/node_modules/@temporalio/client/lib/client.js.map deleted file mode 100644 index 5cb3960..0000000 --- a/node_modules/@temporalio/client/lib/client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.js","sourceRo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G,aAAa;YAChB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,aAAa,EAAE,IAAI,CAAC,aAAa;SAClC,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,GAAG,IAAI,gCAAc,CAAC;YACjC,GAAG,aAAa;YAChB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,YAAY,EAAE,YAAY,EAAE,QAAQ;SACrC,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,GAAG,IAAI,mCAAe,CAAC;YACnC,GAAG,aAAa;YAChB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,aAAa,EAAE,IAAI,CAAC,aAAa;SAClC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,GAAG;YACb,GAAG,IAAA,sCAAwB,GAAE;YAC7B,GAAG,IAAA,0CAAsB,EAAC,aAAa,CAAC;YACxC,mBAAmB,EAAE,IAAI,CAAC,aAAa;YACvC,YAAY,EAAE;gBACZ,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY;gBAC5C,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY;aAC7C;YACD,QAAQ,EAAE;gBACR,oBAAoB,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,oBAAoB;aACjE;YACD,OAAO,EAAE,OAAO,IAAI,EAAE;SACvB,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;IACzC,CAAC;CACF;AA3FD,wBA2FC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/connection.d.ts b/node_modules/@temporalio/client/lib/connection.d.ts deleted file mode 100644 index f8d513e..0000000 --- a/node_modules/@temporalio/client/lib/connection.d.ts +++ /dev/null @@ -1,352 +0,0 @@ -import { AsyncLocalStorage } from 'node:async_hooks'; -import * as grpc from '@grpc/grpc-js'; -import type * as proto from 'protobufjs'; -import { TLSConfig } from '@temporalio/common/lib/internal-non-workflow'; -import { Duration } from '@temporalio/common/lib/time'; -import { CallContext, HealthService, Metadata, OperatorService, TestService, WorkflowService } from './types'; -/** - * gRPC and Temporal Server connection options - */ -export interface ConnectionOptions { - /** - * The address of the Temporal server to connect to, in `hostname:port` format. - * - * Port defaults to 7233. Raw IPv6 addresses must be wrapped in square brackets (e.g. `[ipv6]:port`). - * - * @default localhost:7233 - */ - address?: string; - /** - * TLS configuration. Pass a falsy value to use a non-encrypted connection, - * or `true` or `{}` to connect with TLS without any customization. - * - * For advanced scenario, a prebuilt {@link grpc.ChannelCredentials} object - * may instead be specified using the {@link credentials} property. - * - * Either {@link credentials} or this may be specified for configuring TLS - * - * @default TLS is disabled - */ - tls?: TLSConfig | boolean | null; - /** - * gRPC channel credentials. - * - * `ChannelCredentials` are things like SSL credentials that can be used to secure a connection. - * There may be only one `ChannelCredentials`. They can be created using some of the factory - * methods defined {@link https://grpc.github.io/grpc/node/grpc.credentials.html | here} - * - * Specifying a prebuilt `ChannelCredentials` should only be required for advanced use cases. - * For simple TLS use cases, using the {@link tls} property is recommended. To register - * `CallCredentials` (eg. metadata-based authentication), use the {@link callCredentials} property. - * - * Either {@link tls} or this may be specified for configuring TLS - */ - credentials?: grpc.ChannelCredentials; - /** - * gRPC call credentials. - * - * `CallCredentials` generaly modify metadata; they can be attached to a connection to affect all method - * calls made using that connection. They can be created using some of the factory methods defined - * {@link https://grpc.github.io/grpc/node/grpc.credentials.html | here} - * - * If `callCredentials` are specified, they will be composed with channel credentials - * (either the one created implicitely by using the {@link tls} option, or the one specified - * explicitly through {@link credentials}). Notice that gRPC doesn't allow registering - * `callCredentials` on insecure connections. - */ - callCredentials?: grpc.CallCredentials[]; - /** - * GRPC Channel arguments - * - * @see option descriptions {@link https://grpc.github.io/grpc/core/group__grpc__arg__keys.html | here} - * - * By default the SDK sets the following keepalive arguments: - * - * ``` - * grpc.keepalive_permit_without_calls: 1 - * grpc.keepalive_time_ms: 30_000 - * grpc.keepalive_timeout_ms: 15_000 - * ``` - * - * To opt-out of keepalive, override these keys with `undefined`. - */ - channelArgs?: grpc.ChannelOptions; - /** - * {@link https://grpc.github.io/grpc/node/module-src_client_interceptors.html | gRPC interceptors} which will be - * applied to every RPC call performed by this connection. By default, an interceptor will be included which - * automatically retries retryable errors. If you do not wish to perform automatic retries, set this to an empty list - * (or a list with your own interceptors). If you want to add your own interceptors while keeping the default retry - * behavior, add this to your list of interceptors: `makeGrpcRetryInterceptor(defaultGrpcRetryOptions())`. See: - * - * - {@link makeGrpcRetryInterceptor} - * - {@link defaultGrpcRetryOptions} - */ - interceptors?: grpc.Interceptor[]; - /** - * Optional mapping of gRPC metadata (HTTP headers) to send with each request to the server. - * Setting the `Authorization` header is mutually exclusive with the {@link apiKey} option. - * - * In order to dynamically set metadata, use {@link Connection.withMetadata} - */ - metadata?: Metadata; - /** - * API key for Temporal. This becomes the "Authorization" HTTP header with "Bearer " prepended. - * This is mutually exclusive with the `Authorization` header in {@link ConnectionOptions.metadata}. - * - * You may provide a static string or a callback. Also see {@link Connection.withApiKey} or - * {@link Connection.setApiKey} - */ - apiKey?: string | (() => string); - /** - * Milliseconds to wait until establishing a connection with the server. - * - * Used either when connecting eagerly with {@link Connection.connect} or - * calling {@link Connection.ensureConnected}. - * - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - * @default 10 seconds - */ - connectTimeout?: Duration; - /** - * List of plugins to register with the connection. - * - * Plugins allow you to configure the connection options. - * Any plugins provided will also be passed to any client built from this connection. - * - * @experimental Plugins is an experimental feature; APIs may change without notice. - */ - plugins?: ConnectionPlugin[]; -} -export type ConnectionOptionsWithDefaults = Required> & { - connectTimeoutMs: number; -}; -/** - * A symbol used to attach extra, SDK-internal connection options. - * - * @internal - * @hidden - */ -export declare const InternalConnectionOptionsSymbol: unique symbol; -export type InternalConnectionOptions = ConnectionOptions & { - [InternalConnectionOptionsSymbol]?: { - /** - * Indicate whether the `TestService` should be enabled on this connection. This is set to true - * on connections created internally by `TestWorkflowEnvironment.createTimeSkipping()`. - */ - supportsTestService?: boolean; - }; -}; -export declare const LOCAL_TARGET = "localhost:7233"; -export interface RPCImplOptions { - serviceName: string; - client: grpc.Client; - callContextStorage: AsyncLocalStorage; - interceptors?: grpc.Interceptor[]; - staticMetadata: Metadata; - apiKeyFnRef: { - fn?: () => string; - }; -} -export interface ConnectionCtorOptions { - readonly options: ConnectionOptionsWithDefaults; - readonly client: grpc.Client; - /** - * Raw gRPC access to the Temporal service. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests made to the service. - */ - readonly workflowService: WorkflowService; - /** - * Raw gRPC access to the Temporal {@link https://github.com/temporalio/api/blob/ddf07ab9933e8230309850e3c579e1ff34b03f53/temporal/api/operatorservice/v1/service.proto | operator service}. - */ - readonly operatorService: OperatorService; - /** - * Raw gRPC access to the Temporal test service. - * - * Will be `undefined` if connected to a server that does not support the test service. - */ - readonly testService: TestService | undefined; - /** - * Raw gRPC access to the standard gRPC {@link https://github.com/grpc/grpc/blob/92f58c18a8da2728f571138c37760a721c8915a2/doc/health-checking.md | health service}. - */ - readonly healthService: HealthService; - readonly callContextStorage: AsyncLocalStorage; - readonly apiKeyFnRef: { - fn?: () => string; - }; -} -/** - * Client connection to the Temporal Server - * - * ⚠️ Connections are expensive to construct and should be reused. - * Make sure to {@link close} any unused connections to avoid leaking resources. - */ -export declare class Connection { - /** - * @internal - */ - static readonly Client: grpc.ServiceClientConstructor; - readonly options: ConnectionOptionsWithDefaults; - protected readonly client: grpc.Client; - /** - * Used to ensure `ensureConnected` is called once. - */ - protected connectPromise?: Promise; - /** - * Raw gRPC access to Temporal Server's {@link - * https://github.com/temporalio/api/blob/master/temporal/api/workflowservice/v1/service.proto | Workflow service} - */ - readonly workflowService: WorkflowService; - /** - * Raw gRPC access to Temporal Server's - * {@link https://github.com/temporalio/api/blob/master/temporal/api/operatorservice/v1/service.proto | Operator service} - * - * The Operator Service API defines how Temporal SDKs and other clients interact with the Temporal - * server to perform administrative functions like registering a search attribute or a namespace. - * - * This Service API is NOT compatible with Temporal Cloud. Attempt to use it against a Temporal - * Cloud namespace will result in gRPC `unauthorized` error. - */ - readonly operatorService: OperatorService; - /** - * Raw gRPC access to the Temporal test service. - * - * Will be `undefined` if connected to a server that does not support the test service. - */ - readonly testService: TestService | undefined; - /** - * Raw gRPC access to the standard gRPC {@link https://github.com/grpc/grpc/blob/92f58c18a8da2728f571138c37760a721c8915a2/doc/health-checking.md | health service}. - */ - readonly healthService: HealthService; - readonly plugins: ConnectionPlugin[]; - readonly callContextStorage: AsyncLocalStorage; - private readonly apiKeyFnRef; - protected static createCtorOptions(options: ConnectionOptions): ConnectionCtorOptions; - /** - * Ensure connection can be established. - * - * Does not need to be called if you use {@link connect}. - * - * This method's result is memoized to ensure it runs only once. - * - * Calls {@link proto.temporal.api.workflowservice.v1.WorkflowService.getSystemInfo} internally. - */ - ensureConnected(): Promise; - /** - * Create a lazy `Connection` instance. - * - * This method does not verify connectivity with the server. We recommend using {@link connect} instead. - */ - static lazy(options?: ConnectionOptions): Connection; - /** - * Establish a connection with the server and return a `Connection` instance. - * - * This is the preferred method of creating connections as it verifies connectivity by calling - * {@link ensureConnected}. - */ - static connect(options?: ConnectionOptions): Promise; - protected constructor({ options, client, workflowService, operatorService, testService, healthService, callContextStorage, apiKeyFnRef, }: ConnectionCtorOptions); - protected static generateRPCImplementation({ serviceName, client, callContextStorage, interceptors, staticMetadata, apiKeyFnRef, }: RPCImplOptions): proto.RPCImpl; - /** - * Set a deadline for any service requests executed in `fn`'s scope. - * - * The deadline is a point in time after which any pending gRPC request will be considered as failed; - * this will locally result in the request call throwing a {@link grpc.ServiceError|ServiceError} - * with code {@link grpc.status.DEADLINE_EXCEEDED|DEADLINE_EXCEEDED}; see {@link isGrpcDeadlineError}. - * - * It is strongly recommended to explicitly set deadlines. If no deadline is set, then it is - * possible for the client to end up waiting forever for a response. - * - * @param deadline a point in time after which the request will be considered as failed; either a - * Date object, or a number of milliseconds since the Unix epoch (UTC). - * @returns the value returned from `fn` - * - * @see https://grpc.io/docs/guides/deadlines/ - */ - withDeadline(deadline: number | Date, fn: () => Promise): Promise; - /** - * Set an {@link AbortSignal} that, when aborted, cancels any ongoing service requests executed in - * `fn`'s scope. This will locally result in the request call throwing a {@link grpc.ServiceError|ServiceError} - * with code {@link grpc.status.CANCELLED|CANCELLED}; see {@link isGrpcCancelledError}. - * - * This method is only a convenience wrapper around {@link Connection.withAbortSignal}. - * - * @example - * - * ```ts - * const ctrl = new AbortController(); - * setTimeout(() => ctrl.abort(), 10_000); - * // 👇 throws if incomplete by the timeout. - * await conn.withAbortSignal(ctrl.signal, () => client.workflow.execute(myWorkflow, options)); - * ``` - * - * @returns value returned from `fn` - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal - */ - withAbortSignal(abortSignal: AbortSignal, fn: () => Promise): Promise; - /** - * Set metadata for any service requests executed in `fn`'s scope. - * - * The provided metadata is merged on top of any existing metadata in current scope, including metadata provided in - * {@link ConnectionOptions.metadata}. - * - * @returns value returned from `fn` - * - * @example - * - * ```ts - * const workflowHandle = await conn.withMetadata({ apiKey: 'secret' }, () => - * conn.withMetadata({ otherKey: 'set' }, () => client.start(options))) - * ); - * ``` - */ - withMetadata(metadata: Metadata, fn: () => Promise): Promise; - /** - * Set the apiKey for any service requests executed in `fn`'s scope (thus changing the `Authorization` header). - * - * @returns value returned from `fn` - * - * @example - * - * ```ts - * const workflowHandle = await conn.withApiKey('secret', () => - * conn.withMetadata({ otherKey: 'set' }, () => client.start(options))) - * ); - * ``` - */ - withApiKey(apiKey: string, fn: () => Promise): Promise; - /** - * Set the {@link ConnectionOptions.apiKey} for all subsequent requests. A static string or a - * callback function may be provided. - */ - setApiKey(apiKey: string | (() => string)): void; - /** - * Wait for successful connection to the server. - * - * @see https://grpc.github.io/grpc/node/grpc.Client.html#waitForReady__anchor - */ - protected untilReady(deadline: number): Promise; - /** - * Close the underlying gRPC client. - * - * Make sure to call this method to ensure proper resource cleanup. - */ - close(): Promise; - private withNamespaceHeaderInjector; -} -/** - * Plugin to control the configuration of a connection. - * - * @experimental Plugins is an experimental feature; APIs may change without notice. - */ -export interface ConnectionPlugin { - /** - * Gets the name of this plugin. - */ - get name(): string; - /** - * Hook called when creating a connection to allow modification of configuration. - */ - configureConnection?(options: ConnectionOptions): ConnectionOptions; -} diff --git a/node_modules/@temporalio/client/lib/connection.js b/node_modules/@temporalio/client/lib/connection.js deleted file mode 100644 index a8af155..0000000 --- a/node_modules/@temporalio/client/lib/connection.js +++ /dev/null @@ -1,475 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Connection = exports.LOCAL_TARGET = exports.InternalConnectionOptionsSymbol = void 0; -const node_async_hooks_1 = require("node:async_hooks"); -const grpc = __importStar(require("@grpc/grpc-js")); -const internal_non_workflow_1 = require("@temporalio/common/lib/internal-non-workflow"); -const internal_workflow_1 = require("@temporalio/common/lib/internal-workflow"); -const time_1 = require("@temporalio/common/lib/time"); -const errors_1 = require("./errors"); -const grpc_retry_1 = require("./grpc-retry"); -const pkg_1 = __importDefault(require("./pkg")); -const types_1 = require("./types"); -/** - * The default Temporal Server's TCP port for public gRPC connections. - */ -const DEFAULT_TEMPORAL_GRPC_PORT = 7233; -/** - * A symbol used to attach extra, SDK-internal connection options. - * - * @internal - * @hidden - */ -exports.InternalConnectionOptionsSymbol = Symbol('__temporal_internal_connection_options'); -exports.LOCAL_TARGET = 'localhost:7233'; -function addDefaults(options) { - const { channelArgs, interceptors, connectTimeout, ...rest } = options; - return { - address: exports.LOCAL_TARGET, - credentials: grpc.credentials.createInsecure(), - channelArgs: { - 'grpc.keepalive_permit_without_calls': 1, - 'grpc.keepalive_time_ms': 30_000, - 'grpc.keepalive_timeout_ms': 15_000, - max_receive_message_length: 128 * 1024 * 1024, // 128 MB - ...channelArgs, - }, - interceptors: interceptors ?? [(0, grpc_retry_1.makeGrpcRetryInterceptor)((0, grpc_retry_1.defaultGrpcRetryOptions)())], - metadata: {}, - connectTimeoutMs: (0, time_1.msOptionalToNumber)(connectTimeout) ?? 10_000, - plugins: [], - ...(0, internal_workflow_1.filterNullAndUndefined)(rest), - }; -} -/** - * - Convert {@link ConnectionOptions.tls} to {@link grpc.ChannelCredentials} - * - Add the grpc.ssl_target_name_override GRPC {@link ConnectionOptions.channelArgs | channel arg} - * - Add default port to address if port not specified - * - Set `Authorization` header based on {@link ConnectionOptions.apiKey} - */ -function normalizeGRPCConfig(options) { - const { tls: tlsFromConfig, credentials, callCredentials, ...rest } = options; - if (rest.apiKey) { - if (rest.metadata?.['Authorization']) { - throw new TypeError('Both `apiKey` option and `Authorization` header were provided, but only one makes sense to use at a time.'); - } - if (credentials !== undefined) { - throw new TypeError('Both `apiKey` and `credentials` ConnectionOptions were provided, but only one makes sense to use at a time'); - } - } - if (rest.address) { - rest.address = (0, internal_non_workflow_1.normalizeGrpcEndpointAddress)(rest.address, DEFAULT_TEMPORAL_GRPC_PORT); - } - const tls = (0, internal_non_workflow_1.normalizeTlsConfig)(tlsFromConfig, options.apiKey); - if (tls) { - if (credentials) { - throw new TypeError('Both `tls` and `credentials` ConnectionOptions were provided'); - } - const serverRootCert = tls.serverRootCACertificate && Buffer.from(tls.serverRootCACertificate); - const clientCertKey = tls.clientCertPair?.key && Buffer.from(tls.clientCertPair?.key); - const clientCertCrt = tls.clientCertPair?.crt && Buffer.from(tls.clientCertPair?.crt); - return { - ...rest, - credentials: grpc.credentials.combineChannelCredentials(grpc.credentials.createSsl(serverRootCert, clientCertKey, clientCertCrt), ...(callCredentials ?? [])), - channelArgs: { - ...rest.channelArgs, - ...(tls.serverNameOverride - ? { - 'grpc.ssl_target_name_override': tls.serverNameOverride, - 'grpc.default_authority': tls.serverNameOverride, - } - : undefined), - }, - }; - } - else { - return { - ...rest, - credentials: grpc.credentials.combineChannelCredentials(credentials ?? grpc.credentials.createInsecure(), ...(callCredentials ?? [])), - }; - } -} -/** - * Client connection to the Temporal Server - * - * ⚠️ Connections are expensive to construct and should be reused. - * Make sure to {@link close} any unused connections to avoid leaking resources. - */ -class Connection { - /** - * @internal - */ - static Client = grpc.makeGenericClientConstructor({}, 'WorkflowService', {}); - options; - client; - /** - * Used to ensure `ensureConnected` is called once. - */ - connectPromise; - /** - * Raw gRPC access to Temporal Server's {@link - * https://github.com/temporalio/api/blob/master/temporal/api/workflowservice/v1/service.proto | Workflow service} - */ - workflowService; - /** - * Raw gRPC access to Temporal Server's - * {@link https://github.com/temporalio/api/blob/master/temporal/api/operatorservice/v1/service.proto | Operator service} - * - * The Operator Service API defines how Temporal SDKs and other clients interact with the Temporal - * server to perform administrative functions like registering a search attribute or a namespace. - * - * This Service API is NOT compatible with Temporal Cloud. Attempt to use it against a Temporal - * Cloud namespace will result in gRPC `unauthorized` error. - */ - operatorService; - /** - * Raw gRPC access to the Temporal test service. - * - * Will be `undefined` if connected to a server that does not support the test service. - */ - testService; - /** - * Raw gRPC access to the standard gRPC {@link https://github.com/grpc/grpc/blob/92f58c18a8da2728f571138c37760a721c8915a2/doc/health-checking.md | health service}. - */ - healthService; - plugins; - callContextStorage; - apiKeyFnRef; - static createCtorOptions(options) { - const normalizedOptions = normalizeGRPCConfig(options); - const apiKeyFnRef = {}; - if (normalizedOptions.apiKey) { - if (typeof normalizedOptions.apiKey === 'string') { - const apiKey = normalizedOptions.apiKey; - apiKeyFnRef.fn = () => apiKey; - } - else { - apiKeyFnRef.fn = normalizedOptions.apiKey; - } - } - const optionsWithDefaults = addDefaults(normalizedOptions); - // Allow overriding this - optionsWithDefaults.metadata['client-name'] ??= 'temporal-typescript'; - optionsWithDefaults.metadata['client-version'] ??= pkg_1.default.version; - const client = new this.Client(optionsWithDefaults.address, optionsWithDefaults.credentials, optionsWithDefaults.channelArgs); - const callContextStorage = new node_async_hooks_1.AsyncLocalStorage(); - const workflowRpcImpl = this.generateRPCImplementation({ - serviceName: 'temporal.api.workflowservice.v1.WorkflowService', - client, - callContextStorage, - interceptors: optionsWithDefaults?.interceptors, - staticMetadata: optionsWithDefaults.metadata, - apiKeyFnRef, - }); - const workflowService = types_1.WorkflowService.create(workflowRpcImpl, false, false); - const operatorRpcImpl = this.generateRPCImplementation({ - serviceName: 'temporal.api.operatorservice.v1.OperatorService', - client, - callContextStorage, - interceptors: optionsWithDefaults?.interceptors, - staticMetadata: optionsWithDefaults.metadata, - apiKeyFnRef, - }); - const operatorService = types_1.OperatorService.create(operatorRpcImpl, false, false); - let testService = undefined; - if (options?.[exports.InternalConnectionOptionsSymbol]?.supportsTestService) { - const testRpcImpl = this.generateRPCImplementation({ - serviceName: 'temporal.api.testservice.v1.TestService', - client, - callContextStorage, - interceptors: optionsWithDefaults?.interceptors, - staticMetadata: optionsWithDefaults.metadata, - apiKeyFnRef, - }); - testService = types_1.TestService.create(testRpcImpl, false, false); - } - const healthRpcImpl = this.generateRPCImplementation({ - serviceName: 'grpc.health.v1.Health', - client, - callContextStorage, - interceptors: optionsWithDefaults?.interceptors, - staticMetadata: optionsWithDefaults.metadata, - apiKeyFnRef, - }); - const healthService = types_1.HealthService.create(healthRpcImpl, false, false); - return { - client, - callContextStorage, - workflowService, - operatorService, - testService, - healthService, - options: optionsWithDefaults, - apiKeyFnRef, - }; - } - /** - * Ensure connection can be established. - * - * Does not need to be called if you use {@link connect}. - * - * This method's result is memoized to ensure it runs only once. - * - * Calls {@link proto.temporal.api.workflowservice.v1.WorkflowService.getSystemInfo} internally. - */ - async ensureConnected() { - if (this.connectPromise == null) { - const deadline = Date.now() + this.options.connectTimeoutMs; - this.connectPromise = (async () => { - await this.untilReady(deadline); - try { - await this.withDeadline(deadline, () => this.workflowService.getSystemInfo({})); - } - catch (err) { - if ((0, errors_1.isGrpcServiceError)(err)) { - // Ignore old servers - if (err.code !== grpc.status.UNIMPLEMENTED) { - throw new errors_1.ServiceError('Failed to connect to Temporal server', { cause: err }); - } - } - else { - throw err; - } - } - })(); - } - return this.connectPromise; - } - /** - * Create a lazy `Connection` instance. - * - * This method does not verify connectivity with the server. We recommend using {@link connect} instead. - */ - static lazy(options) { - options = options ?? {}; - for (const plugin of options.plugins ?? []) { - if (plugin.configureConnection !== undefined) { - options = plugin.configureConnection(options); - } - } - return new this(this.createCtorOptions(options)); - } - /** - * Establish a connection with the server and return a `Connection` instance. - * - * This is the preferred method of creating connections as it verifies connectivity by calling - * {@link ensureConnected}. - */ - static async connect(options) { - const conn = this.lazy(options); - await conn.ensureConnected(); - return conn; - } - constructor({ options, client, workflowService, operatorService, testService, healthService, callContextStorage, apiKeyFnRef, }) { - this.options = options; - this.client = client; - this.workflowService = this.withNamespaceHeaderInjector(workflowService); - this.operatorService = operatorService; - this.testService = testService; - this.healthService = healthService; - this.callContextStorage = callContextStorage; - this.apiKeyFnRef = apiKeyFnRef; - this.plugins = options.plugins ?? []; - } - static generateRPCImplementation({ serviceName, client, callContextStorage, interceptors, staticMetadata, apiKeyFnRef, }) { - return (method, requestData, callback) => { - const metadataContainer = new grpc.Metadata(); - const { metadata, deadline, abortSignal } = callContextStorage.getStore() ?? {}; - if (apiKeyFnRef.fn) { - const apiKey = apiKeyFnRef.fn(); - if (apiKey) - metadataContainer.set('Authorization', `Bearer ${apiKey}`); - } - for (const [k, v] of Object.entries(staticMetadata)) { - metadataContainer.set(k, v); - } - if (metadata != null) { - for (const [k, v] of Object.entries(metadata)) { - metadataContainer.set(k, v); - } - } - const call = client.makeUnaryRequest(`/${serviceName}/${method.name}`, (arg) => arg, (arg) => arg, requestData, metadataContainer, { interceptors, deadline }, callback); - if (abortSignal != null) { - abortSignal.addEventListener('abort', () => call.cancel()); - } - return call; - }; - } - /** - * Set a deadline for any service requests executed in `fn`'s scope. - * - * The deadline is a point in time after which any pending gRPC request will be considered as failed; - * this will locally result in the request call throwing a {@link grpc.ServiceError|ServiceError} - * with code {@link grpc.status.DEADLINE_EXCEEDED|DEADLINE_EXCEEDED}; see {@link isGrpcDeadlineError}. - * - * It is strongly recommended to explicitly set deadlines. If no deadline is set, then it is - * possible for the client to end up waiting forever for a response. - * - * @param deadline a point in time after which the request will be considered as failed; either a - * Date object, or a number of milliseconds since the Unix epoch (UTC). - * @returns the value returned from `fn` - * - * @see https://grpc.io/docs/guides/deadlines/ - */ - async withDeadline(deadline, fn) { - const cc = this.callContextStorage.getStore(); - return await this.callContextStorage.run({ ...cc, deadline }, fn); - } - /** - * Set an {@link AbortSignal} that, when aborted, cancels any ongoing service requests executed in - * `fn`'s scope. This will locally result in the request call throwing a {@link grpc.ServiceError|ServiceError} - * with code {@link grpc.status.CANCELLED|CANCELLED}; see {@link isGrpcCancelledError}. - * - * This method is only a convenience wrapper around {@link Connection.withAbortSignal}. - * - * @example - * - * ```ts - * const ctrl = new AbortController(); - * setTimeout(() => ctrl.abort(), 10_000); - * // 👇 throws if incomplete by the timeout. - * await conn.withAbortSignal(ctrl.signal, () => client.workflow.execute(myWorkflow, options)); - * ``` - * - * @returns value returned from `fn` - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal - */ - // FIXME: `abortSignal` should be cumulative, i.e. if a signal is already set, it should be added - // to the list of signals, and both the new and existing signal should abort the request. - async withAbortSignal(abortSignal, fn) { - const cc = this.callContextStorage.getStore(); - return await this.callContextStorage.run({ ...cc, abortSignal }, fn); - } - /** - * Set metadata for any service requests executed in `fn`'s scope. - * - * The provided metadata is merged on top of any existing metadata in current scope, including metadata provided in - * {@link ConnectionOptions.metadata}. - * - * @returns value returned from `fn` - * - * @example - * - * ```ts - * const workflowHandle = await conn.withMetadata({ apiKey: 'secret' }, () => - * conn.withMetadata({ otherKey: 'set' }, () => client.start(options))) - * ); - * ``` - */ - async withMetadata(metadata, fn) { - const cc = this.callContextStorage.getStore(); - return await this.callContextStorage.run({ - ...cc, - metadata: { ...cc?.metadata, ...metadata }, - }, fn); - } - /** - * Set the apiKey for any service requests executed in `fn`'s scope (thus changing the `Authorization` header). - * - * @returns value returned from `fn` - * - * @example - * - * ```ts - * const workflowHandle = await conn.withApiKey('secret', () => - * conn.withMetadata({ otherKey: 'set' }, () => client.start(options))) - * ); - * ``` - */ - async withApiKey(apiKey, fn) { - const cc = this.callContextStorage.getStore(); - return await this.callContextStorage.run({ - ...cc, - metadata: { ...cc?.metadata, Authorization: `Bearer ${apiKey}` }, - }, fn); - } - /** - * Set the {@link ConnectionOptions.apiKey} for all subsequent requests. A static string or a - * callback function may be provided. - */ - setApiKey(apiKey) { - if (typeof apiKey === 'string') { - if (apiKey === '') { - throw new TypeError('`apiKey` must not be an empty string'); - } - this.apiKeyFnRef.fn = () => apiKey; - } - else { - this.apiKeyFnRef.fn = apiKey; - } - } - /** - * Wait for successful connection to the server. - * - * @see https://grpc.github.io/grpc/node/grpc.Client.html#waitForReady__anchor - */ - async untilReady(deadline) { - return new Promise((resolve, reject) => { - this.client.waitForReady(deadline, (err) => { - if (err) { - reject(err); - } - else { - resolve(); - } - }); - }); - } - // This method is async for uniformity with NativeConnection which could be used in the future to power clients - /** - * Close the underlying gRPC client. - * - * Make sure to call this method to ensure proper resource cleanup. - */ - async close() { - this.client.close(); - this.callContextStorage.disable(); - } - withNamespaceHeaderInjector(workflowService) { - const wrapper = {}; - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - for (const [methodName, methodImpl] of Object.entries(workflowService)) { - if (typeof methodImpl !== 'function') - continue; - wrapper[methodName] = (...args) => { - const namespace = args[0]?.namespace; - if (namespace) { - return this.withMetadata({ 'temporal-namespace': namespace }, () => methodImpl.apply(workflowService, args)); - } - else { - return methodImpl.apply(workflowService, args); - } - }; - } - return wrapper; - } -} -exports.Connection = Connection; -//# sourceMappingURL=connection.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/connection.js.map b/node_modules/@temporalio/client/lib/connection.js.map deleted file mode 100644 index 5e3d639..0000000 --- a/node_modules/@temporalio/client/lib/connection.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"connection.js","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAqD;AACrD,oDAAsC;AAEtC,wFAIsD;AACtD,gFAAkF;AAClF,sDAA2E;AAE3E,qCAA4D;AAC5D,6CAAiF;AACjF,gDAAwB;AACxB,mCAA8G;AAE9G;;GAEG;AACH,MAAM,0BAA0B,GAAG,IAAI,CAAC;AAmIxC;;;;;GAKG;AACU,QAAA,+BAA+B,GAAG,MAAM,CAAC,wCAAwC,CAAC,CAAC;AAWnF,QAAA,YAAY,GAAG,gBAAgB,CAAC;AAE7C,SAAS,WAAW,CAAC,OAA0B;IAC7C,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IACvE,OAAO;QACL,OAAO,EAAE,oBAAY;QACrB,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE;QAC9C,WAAW,EAAE;YACX,qCAAqC,EAAE,CAAC;YACxC,wBAAwB,EAAE,MAAM;YAChC,2BAA2B,EAAE,MA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AS,EAAE,CAAC;oBACd,OAAO,IAAI,CAAC,YAAY,CAAC,EAAE,oBAAoB,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC,CAAC;gBAC/G,CAAC;qBAAM,CAAC;oBACN,OAAO,UAAU,CAAC,KAAK,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;gBACjD,CAAC;YACH,CAAC,CAAC;QACJ,CAAC;QACD,OAAO,OAA0B,CAAC;IACpC,CAAC;;AA9ZH,gCA+ZC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/errors.d.ts b/node_modules/@temporalio/client/lib/errors.d.ts deleted file mode 100644 index 9eaedf8..0000000 --- a/node_modules/@temporalio/client/lib/errors.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { ServiceError as GrpcServiceError } from '@grpc/grpc-js'; -import { RetryState } from '@temporalio/common'; -/** - * Generic Error class for errors coming from the service - */ -export declare class ServiceError extends Error { - readonly cause?: Error; - constructor(message: string, opts?: { - cause: Error; - }); -} -/** - * Thrown by the client while waiting on Workflow execution result if execution - * completes with failure. - * - * The failure type will be set in the `cause` attribute. - * - * For example if the workflow is cancelled, `cause` will be set to - * {@link CancelledFailure}. - */ -export declare class WorkflowFailedError extends Error { - readonly cause: Error | undefined; - readonly retryState: RetryState; - constructor(message: string, cause: Error | undefined, retryState: RetryState); -} -/** - * Thrown by the client while waiting on Workflow Update result if Update - * completes with failure. - */ -export declare class WorkflowUpdateFailedError extends Error { - readonly cause: Error | undefined; - constructor(message: string, cause: Error | undefined); -} -/** - * Thrown by the client if the Update call timed out or was cancelled. - * This doesn't mean the update itself was timed out or cancelled. - */ -export declare class WorkflowUpdateRPCTimeoutOrCancelledError extends Error { - readonly cause?: Error; - constructor(message: string, opts?: { - cause: Error; - }); -} -/** - * Thrown the by client while waiting on Workflow execution result if Workflow - * continues as new. - * - * Only thrown if asked not to follow the chain of execution (see {@link WorkflowOptions.followRuns}). - */ -export declare class WorkflowContinuedAsNewError extends Error { - readonly newExecutionRunId: string; - constructor(message: string, newExecutionRunId: string); -} -/** - * Returns true if the provided error is a {@link GrpcServiceError}. - */ -export declare function isGrpcServiceError(err: unknown): err is GrpcServiceError; -/** - * Returns true if the provided error or its cause is a {@link GrpcServiceError} with code DEADLINE_EXCEEDED. - * - * @see {@link Connection.withDeadline} - */ -export declare function isGrpcDeadlineError(err: unknown): err is Error; -/** - * Returns true if the provided error or its cause is a {@link GrpcServiceError} with code CANCELLED. - * - * @see {@link Connection.withAbortSignal} - */ -export declare function isGrpcCancelledError(err: unknown): err is Error; -/** - * @deprecated Use `isGrpcServiceError` instead - */ -export declare const isServerErrorResponse: typeof isGrpcServiceError; diff --git a/node_modules/@temporalio/client/lib/errors.js b/node_modules/@temporalio/client/lib/errors.js deleted file mode 100644 index 7235835..0000000 --- a/node_modules/@temporalio/client/lib/errors.js +++ /dev/null @@ -1,138 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isServerErrorResponse = exports.WorkflowContinuedAsNewError = exports.WorkflowUpdateRPCTimeoutOrCancelledError = exports.WorkflowUpdateFailedError = exports.WorkflowFailedError = exports.ServiceError = void 0; -exports.isGrpcServiceError = isGrpcServiceError; -exports.isGrpcDeadlineError = isGrpcDeadlineError; -exports.isGrpcCancelledError = isGrpcCancelledError; -const grpc_js_1 = require("@grpc/grpc-js"); -const type_helpers_1 = require("@temporalio/common/lib/type-helpers"); -/** - * Generic Error class for errors coming from the service - */ -let ServiceError = class ServiceError extends Error { - cause; - constructor(message, opts) { - super(message); - this.cause = opts?.cause; - } -}; -exports.ServiceError = ServiceError; -exports.ServiceError = ServiceError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('ServiceError') -], ServiceError); -/** - * Thrown by the client while waiting on Workflow execution result if execution - * completes with failure. - * - * The failure type will be set in the `cause` attribute. - * - * For example if the workflow is cancelled, `cause` will be set to - * {@link CancelledFailure}. - */ -let WorkflowFailedError = class WorkflowFailedError extends Error { - cause; - retryState; - constructor(message, cause, retryState) { - super(message); - this.cause = cause; - this.retryState = retryState; - } -}; -exports.WorkflowFailedError = WorkflowFailedError; -exports.WorkflowFailedError = WorkflowFailedError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('WorkflowFailedError') -], WorkflowFailedError); -/** - * Thrown by the client while waiting on Workflow Update result if Update - * completes with failure. - */ -let WorkflowUpdateFailedError = class WorkflowUpdateFailedError extends Error { - cause; - constructor(message, cause) { - super(message); - this.cause = cause; - } -}; -exports.WorkflowUpdateFailedError = WorkflowUpdateFailedError; -exports.WorkflowUpdateFailedError = WorkflowUpdateFailedError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('WorkflowUpdateFailedError') -], WorkflowUpdateFailedError); -/** - * Thrown by the client if the Update call timed out or was cancelled. - * This doesn't mean the update itself was timed out or cancelled. - */ -let WorkflowUpdateRPCTimeoutOrCancelledError = class WorkflowUpdateRPCTimeoutOrCancelledError extends Error { - cause; - constructor(message, opts) { - super(message); - this.cause = opts?.cause; - } -}; -exports.WorkflowUpdateRPCTimeoutOrCancelledError = WorkflowUpdateRPCTimeoutOrCancelledError; -exports.WorkflowUpdateRPCTimeoutOrCancelledError = WorkflowUpdateRPCTimeoutOrCancelledError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('WorkflowUpdateRPCTimeoutOrCancelledError') -], WorkflowUpdateRPCTimeoutOrCancelledError); -/** - * Thrown the by client while waiting on Workflow execution result if Workflow - * continues as new. - * - * Only thrown if asked not to follow the chain of execution (see {@link WorkflowOptions.followRuns}). - */ -let WorkflowContinuedAsNewError = class WorkflowContinuedAsNewError extends Error { - newExecutionRunId; - constructor(message, newExecutionRunId) { - super(message); - this.newExecutionRunId = newExecutionRunId; - } -}; -exports.WorkflowContinuedAsNewError = WorkflowContinuedAsNewError; -exports.WorkflowContinuedAsNewError = WorkflowContinuedAsNewError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('WorkflowExecutionContinuedAsNewError') -], WorkflowContinuedAsNewError); -/** - * Returns true if the provided error is a {@link GrpcServiceError}. - */ -function isGrpcServiceError(err) { - return ((0, type_helpers_1.isError)(err) && - typeof err?.details === 'string' && - (0, type_helpers_1.isRecord)(err.metadata)); -} -/** - * Returns true if the provided error or its cause is a {@link GrpcServiceError} with code DEADLINE_EXCEEDED. - * - * @see {@link Connection.withDeadline} - */ -function isGrpcDeadlineError(err) { - while ((0, type_helpers_1.isError)(err)) { - if (isGrpcServiceError(err) && err.code === grpc_js_1.status.DEADLINE_EXCEEDED) { - return true; - } - err = err.cause; - } - return false; -} -/** - * Returns true if the provided error or its cause is a {@link GrpcServiceError} with code CANCELLED. - * - * @see {@link Connection.withAbortSignal} - */ -function isGrpcCancelledError(err) { - while ((0, type_helpers_1.isError)(err)) { - if (isGrpcServiceError(err) && err.code === grpc_js_1.status.CANCELLED) { - return true; - } - err = err.cause; - } - return false; -} -/** - * @deprecated Use `isGrpcServiceError` instead - */ -exports.isServerErrorResponse = isGrpcServiceError; -//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/errors.js.map b/node_modules/@temporalio/client/lib/errors.js.map deleted file mode 100644 index 535f0e1..0000000 --- a/node_modules/@temporalio/client/lib/errors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;;;;;;;AAoFA,gDAMC;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K,CAAC;IAC3B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACU,QAAA,qBAAqB,GAAG,kBAAkB,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/grpc-retry.d.ts b/node_modules/@temporalio/client/lib/grpc-retry.d.ts deleted file mode 100644 index 6bd9d13..0000000 --- a/node_modules/@temporalio/client/lib/grpc-retry.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Interceptor, StatusObject } from '@grpc/grpc-js'; -export interface GrpcRetryOptions { - /** - * A function which accepts the current retry attempt (starts at 1) and returns the millisecond - * delay that should be applied before the next retry. - */ - delayFunction: (attempt: number, status: StatusObject) => number; - /** - * A function which accepts a failed status object and returns true if the call should be retried - */ - retryableDecider: (attempt: number, status: StatusObject) => boolean; -} -/** - * Options for the backoff formula: `factor ^ attempt * initialIntervalMs(status) * jitter(maxJitter)` - */ -export interface BackoffOptions { - /** - * Exponential backoff factor - * - * @default 1.7 - */ - factor: number; - /** - * Maximum number of attempts - * - * @default 10 - */ - maxAttempts: number; - /** - * Maximum amount of jitter to apply - * - * @default 0.2 - */ - maxJitter: number; - /** - * Function that returns the "initial" backoff interval based on the returned status. - * - * The default is 1 second for RESOURCE_EXHAUSTED errors and 100 millis for other retryable errors. - */ - initialIntervalMs(status: StatusObject): number; - /** - * Function that returns the "maximum" backoff interval based on the returned status. - * - * The default is 5 seconds regardless of the status. - */ - maxIntervalMs(status: StatusObject): number; -} -/** - * Generates the default retry behavior based on given backoff options - */ -export declare function defaultGrpcRetryOptions(options?: Partial): GrpcRetryOptions; -export declare function isRetryableError(status: StatusObject): boolean; -/** - * Returns a GRPC interceptor that will perform automatic retries for some types of failed calls - * - * @param retryOptions Options for the retry interceptor - */ -export declare function makeGrpcRetryInterceptor(retryOptions: GrpcRetryOptions): Interceptor; diff --git a/node_modules/@temporalio/client/lib/grpc-retry.js b/node_modules/@temporalio/client/lib/grpc-retry.js deleted file mode 100644 index 80ee64c..0000000 --- a/node_modules/@temporalio/client/lib/grpc-retry.js +++ /dev/null @@ -1,177 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.defaultGrpcRetryOptions = defaultGrpcRetryOptions; -exports.isRetryableError = isRetryableError; -exports.makeGrpcRetryInterceptor = makeGrpcRetryInterceptor; -const grpc_js_1 = require("@grpc/grpc-js"); -const grpc = __importStar(require("@grpc/grpc-js")); -/** - * Add defaults as documented in {@link BackoffOptions} - */ -function withDefaultBackoffOptions({ maxAttempts, factor, maxJitter, initialIntervalMs, }) { - return { - maxAttempts: maxAttempts ?? 10, - factor: factor ?? 1.7, - maxJitter: maxJitter ?? 0.2, - initialIntervalMs: initialIntervalMs ?? defaultInitialIntervalMs, - maxIntervalMs() { - return 5_000; - }, - }; -} -/** - * Generates the default retry behavior based on given backoff options - */ -function defaultGrpcRetryOptions(options = {}) { - const { maxAttempts, factor, maxJitter, initialIntervalMs, maxIntervalMs } = withDefaultBackoffOptions(options); - return { - delayFunction(attempt, status) { - return Math.min(maxIntervalMs(status), factor ** attempt * initialIntervalMs(status)) * jitter(maxJitter); - }, - retryableDecider(attempt, status) { - return attempt < maxAttempts && isRetryableError(status); - }, - }; -} -/** - * Set of retryable gRPC status codes - */ -const retryableCodes = new Set([ - grpc.status.UNKNOWN, - grpc.status.RESOURCE_EXHAUSTED, - grpc.status.UNAVAILABLE, - grpc.status.ABORTED, - grpc.status.DATA_LOSS, - grpc.status.OUT_OF_RANGE, -]); -function isRetryableError(status) { - // gRPC INTERNAL status is ambiguous and may be used in many unrelated situations, including: - // - TLS errors - // - Compression errors - // - Errors decoding protobuf messages (either client-side or server-side) - // - Transient HTTP/2 network errors - // - Failing some server-side request validation - // - etc. - // - // In most case, retrying is useless and would only be a waste of resource. - // However, in case of transient network errors, retrying is highly desirable. - // Unfortunately, the only way of differenciating between those various cases - // is pattern matching the error messages. - if (status.code === grpc.status.INTERNAL) { - // RST_STREAM code 0 means the HTTP2 request completed with HTTP status 200, but without - // the mandatory `grpc-status` header. That's generally due to some HTTP2 proxy or load balancer - // that doesn't know about gRPC-specifics. Retrying may help. - if (/RST_STREAM with code 0|Call ended without gRPC status/i.test(status.details)) - return true; - // RST_STREAM code 2 is pretty generic and encompasses most HTTP2 protocol errors. - // That may for example happen if the client tries to reuse the connection at the - // same time as the server initiate graceful closing. Retrying may help. - if (/RST_STREAM with code 2/i.test(status.details)) { - // Some TLS errors surfaces with message: - // "Received RST_STREAM with code 2 triggered by internal client error: […] SSL alert number XX" - // At this time, no TLS error is worth retrying, so dismiss those. - if (/SSL alert number/i.test(status.details)) - return false; - return true; - } - return false; - } - return retryableCodes.has(status.code); -} -/** - * Calculates random amount of jitter between 0 and `max` - */ -function jitter(max) { - return 1 - max + Math.random() * max * 2; -} -/** - * Default implementation - backs off more on RESOURCE_EXHAUSTED errors - */ -function defaultInitialIntervalMs({ code }) { - // Backoff more on RESOURCE_EXHAUSTED - if (code === grpc.status.RESOURCE_EXHAUSTED) { - return 1000; - } - return 100; -} -/** - * Returns a GRPC interceptor that will perform automatic retries for some types of failed calls - * - * @param retryOptions Options for the retry interceptor - */ -function makeGrpcRetryInterceptor(retryOptions) { - return (options, nextCall) => { - let savedSendMessage; - let savedReceiveMessage; - let savedMessageNext; - const requester = new grpc_js_1.RequesterBuilder() - .withStart(function (metadata, _listener, next) { - // First attempt - let attempt = 1; - const listener = new grpc_js_1.ListenerBuilder() - .withOnReceiveMessage((message, next) => { - savedReceiveMessage = message; - savedMessageNext = next; - }) - .withOnReceiveStatus((status, next) => { - const retry = () => { - attempt++; - const call = nextCall(options); - call.start(metadata, { - onReceiveMessage(message) { - savedReceiveMessage = message; - }, - onReceiveStatus, - }); - call.sendMessage(savedSendMessage); - call.halfClose(); - }; - const onReceiveStatus = (status) => { - if (retryOptions.retryableDecider(attempt, status)) { - setTimeout(retry, retryOptions.delayFunction(attempt, status)); - } - else { - savedMessageNext(savedReceiveMessage); - // TODO: For reasons that are completely unclear to me, if you pass a handcrafted - // status object here, node will magically just exit at the end of this line. - // No warning, no nothing. Here be dragons. - next(status); - } - }; - onReceiveStatus(status); - }) - .build(); - next(metadata, listener); - }) - .withSendMessage((message, next) => { - savedSendMessage = message; - next(message); - }) - .build(); - return new grpc_js_1.InterceptingCall(nextCall(options), requester); - }; -} -//# sourceMappingURL=grpc-retry.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/grpc-retry.js.map b/node_modules/@temporalio/client/lib/grpc-retry.js.map deleted file mode 100644 index 02bfaaa..0000000 --- a/node_modules/@temporalio/client/lib/grpc-retry.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"grpc-retry.js","sourceRoot":"","sources":["../src/grpc-retry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6EA,0DAUC;AAcD,4CAmCC;AAyBD,4DAsDC;AAvND,2CAA+G;AAC/G,oDAAsC;AAqDtC;;GAEG;AACH,SAAS,yBAAyB,CAAC,EACjC,WAAW,EACX,MAAM,EACN,SAAS,EACT,iBAAiB,GACO;IACxB,OAAO;QACL,WAAW,EAAE,WAAW,IAAI,EAAE;QAC9B,M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C,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;YACjC,gBAAgB,GAAG,OAAO,CAAC;YAC3B,IAAI,CAAC,OAAO,CAAC,CAAC;QAChB,CAAC,CAAC;aACD,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,0BAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC;IAC5D,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/helpers.d.ts b/node_modules/@temporalio/client/lib/helpers.d.ts deleted file mode 100644 index e294abd..0000000 --- a/node_modules/@temporalio/client/lib/helpers.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ServiceError as GrpcServiceError } from '@grpc/grpc-js'; -import { LoadedDataConverter } from '@temporalio/common'; -import { Replace } from '@temporalio/common/lib/type-helpers'; -import { temporal } from '@temporalio/proto'; -import { CountWorkflowExecution, RawWorkflowExecutionInfo, WorkflowExecutionInfo } from './types'; -export declare function executionInfoFromRaw(raw: RawWorkflowExecutionInfo, dataConverter: LoadedDataConverter, rawDataToEmbed: T): Promise>; -export declare function decodeCountWorkflowExecutionsResponse(raw: temporal.api.workflowservice.v1.ICountWorkflowExecutionsResponse): CountWorkflowExecution; -/** - * If the error type can be determined based on embedded grpc error details, - * then rethrow the appropriate TypeScript error. Otherwise do nothing. - * - * This function should be used before falling back to generic error handling - * based on grpc error code. Very few error types are currently supported, but - * this function will be expanded over time as more server error types are added. - */ -export declare function rethrowKnownErrorTypes(err: GrpcServiceError): void; diff --git a/node_modules/@temporalio/client/lib/helpers.js b/node_modules/@temporalio/client/lib/helpers.js deleted file mode 100644 index b1027cc..0000000 --- a/node_modules/@temporalio/client/lib/helpers.js +++ /dev/null @@ -1,139 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.executionInfoFromRaw = executionInfoFromRaw; -exports.decodeCountWorkflowExecutionsResponse = decodeCountWorkflowExecutionsResponse; -exports.rethrowKnownErrorTypes = rethrowKnownErrorTypes; -const grpc_js_1 = require("@grpc/grpc-js"); -const common_1 = require("@temporalio/common"); -const payload_search_attributes_1 = require("@temporalio/common/lib/converter/payload-search-attributes"); -const time_1 = require("@temporalio/common/lib/time"); -const codec_helpers_1 = require("@temporalio/common/lib/internal-non-workflow/codec-helpers"); -const proto_1 = require("@temporalio/proto"); -function workflowStatusCodeToName(code) { - return workflowStatusCodeToNameInternal(code) ?? 'UNKNOWN'; -} -/** - * Intentionally leave out `default` branch to get compilation errors when new values are added - */ -function workflowStatusCodeToNameInternal(code) { - switch (code) { - case proto_1.temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_UNSPECIFIED: - return 'UNSPECIFIED'; - case proto_1.temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_RUNNING: - return 'RUNNING'; - case proto_1.temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_FAILED: - return 'FAILED'; - case proto_1.temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_TIMED_OUT: - return 'TIMED_OUT'; - case proto_1.temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_CANCELED: - return 'CANCELLED'; - case proto_1.temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_TERMINATED: - return 'TERMINATED'; - case proto_1.temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_COMPLETED: - return 'COMPLETED'; - case proto_1.temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW: - return 'CONTINUED_AS_NEW'; - case proto_1.temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_PAUSED: - return 'PAUSED'; - } -} -async function executionInfoFromRaw(raw, dataConverter, rawDataToEmbed) { - return { - type: raw.type.name, - workflowId: raw.execution.workflowId, - runId: raw.execution.runId, - taskQueue: raw.taskQueue, - status: { - code: raw.status, - name: workflowStatusCodeToName(raw.status), - }, - // Safe to convert to number, max history length is 50k, which is much less than Number.MAX_SAFE_INTEGER - historyLength: raw.historyLength.toNumber(), - // Exact truncation for multi-petabyte histories - // historySize === 0 means WFT was generated by pre-1.20.0 server, and the history size is unknown - historySize: raw.historySizeBytes?.toNumber() || undefined, - startTime: (0, time_1.requiredTsToDate)(raw.startTime, 'startTime'), - executionTime: (0, time_1.optionalTsToDate)(raw.executionTime), - closeTime: (0, time_1.optionalTsToDate)(raw.closeTime), - memo: await (0, codec_helpers_1.decodeMapFromPayloads)(dataConverter, raw.memo?.fields), - searchAttributes: (0, payload_search_attributes_1.decodeSearchAttributes)(raw.searchAttributes?.indexedFields), - typedSearchAttributes: (0, payload_search_attributes_1.decodeTypedSearchAttributes)(raw.searchAttributes?.indexedFields), - parentExecution: raw.parentExecution - ? { - workflowId: raw.parentExecution.workflowId, - runId: raw.parentExecution.runId, - } - : undefined, - rootExecution: raw.rootExecution - ? { - workflowId: raw.rootExecution.workflowId, - runId: raw.rootExecution.runId, - } - : undefined, - raw: rawDataToEmbed, - priority: (0, common_1.decodePriority)(raw.priority), - }; -} -function decodeCountWorkflowExecutionsResponse(raw) { - return { - // Note: lossy conversion of Long to number - count: raw.count.toNumber(), - groups: raw.groups.map((group) => { - return { - // Note: lossy conversion of Long to number - count: group.count.toNumber(), - groupValues: group.groupValues.map((value) => payload_search_attributes_1.searchAttributePayloadConverter.fromPayload(value)), - }; - }), - }; -} -/** - * If the error type can be determined based on embedded grpc error details, - * then rethrow the appropriate TypeScript error. Otherwise do nothing. - * - * This function should be used before falling back to generic error handling - * based on grpc error code. Very few error types are currently supported, but - * this function will be expanded over time as more server error types are added. - */ -function rethrowKnownErrorTypes(err) { - // We really don't expect multiple error details, but this really is an array, so just in case... - for (const entry of getGrpcStatusDetails(err) ?? []) { - if (!entry.type_url || !entry.value) - continue; - const type = entry.type_url.replace(/^type.googleapis.com\//, ''); - switch (type) { - case 'temporal.api.errordetails.v1.NamespaceNotFoundFailure': { - const { namespace } = proto_1.temporal.api.errordetails.v1.NamespaceNotFoundFailure.decode(entry.value); - throw new common_1.NamespaceNotFoundError(namespace); - } - case 'temporal.api.errordetails.v1.MultiOperationExecutionFailure': { - // MultiOperationExecutionFailure contains error statuses for multiple - // operations. A MultiOperationExecutionAborted error status means that - // the corresponding operation was aborted due to an error in one of the - // other operations. We rethrow the first operation error that is not - // MultiOperationExecutionAborted. - const { statuses } = proto_1.temporal.api.errordetails.v1.MultiOperationExecutionFailure.decode(entry.value); - for (const status of statuses) { - const detail = status.details?.[0]; - const statusType = detail?.type_url?.replace(/^type.googleapis.com\//, ''); - if (statusType === 'temporal.api.failure.v1.MultiOperationExecutionAborted' || - status.code === grpc_js_1.status.OK) { - continue; - } - err.message = status.message ?? err.message; - err.code = status.code || err.code; - err.details = detail?.value?.toString() || err.details; - throw err; - } - } - } - } -} -function getGrpcStatusDetails(err) { - const statusBuffer = err.metadata.get('grpc-status-details-bin')?.[0]; - if (!statusBuffer || typeof statusBuffer === 'string') { - return undefined; - } - return proto_1.google.rpc.Status.decode(statusBuffer).details; -} -//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/helpers.js.map b/node_modules/@temporalio/client/lib/helpers.js.map deleted file mode 100644 index 3b4af98..0000000 --- a/node_modules/@temporalio/client/lib/helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;AAkDA,oDAwCC;AAED,sFAcC;AAaD,wDAmCC;AA1JD,2CAAuF;AACvF,+CAAiG;AACjG,0GAIoE;AAEpE,sDAAiF;AACjF,8FAAmG;AACnG,6CAAqD;AAQrD,SAAS,wBAAwB,CAAC,IAAmD;IACnF,OAAO,gCAAgC,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC;AAC7D,CAAC;AAED;;GAEG;AACH,SA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alio/client/lib/index.d.ts b/node_modules/@temporalio/client/lib/index.d.ts deleted file mode 100644 index 90409bb..0000000 --- a/node_modules/@temporalio/client/lib/index.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Client for communicating with Temporal Server. - * - * Most functionality is available through {@link WorkflowClient}, but you can also call gRPC methods directly using {@link Connection.workflowService} and {@link Connection.operatorService}. - * - * ### Usage - * - * ```ts - * import { Connection, Client } from '@temporalio/client'; - * import { loadClientConnectConfig } from '@temporalio/envconfig'; - * import { sleepForDays } from './workflows'; - * import { nanoid } from 'nanoid'; - * - * async function run() { - * const config = loadClientConnectConfig(); - * const connection = await Connection.connect(config.connectionOptions); - * const client = new Client({ connection }); - * - * const handle = await client.workflow.start(sleepForDays, { - * taskQueue: 'sleep-for-days', - * workflowId: 'workflow-' + nanoid(), - * }); - * console.log(`Started workflow ${handle.workflowId}`); - * - * // Wait for workflow completion (runs indefinitely until it receives a signal) - * console.log(await handle.result()); - * } - * - * run().catch((err) => { - * console.error(err); - * process.exit(1); - * }); - * ``` - * @module - */ -export { ActivityFailure, ApplicationFailure, CancelledFailure, ChildWorkflowFailure, DataConverter, defaultPayloadConverter, ProtoFailure, RetryPolicy, ServerFailure, TemporalFailure, TerminatedFailure, TimeoutFailure, WorkflowExecutionAlreadyStartedError, } from '@temporalio/common'; -export { TLSConfig } from '@temporalio/common/lib/internal-non-workflow'; -export * from '@temporalio/common/lib/errors'; -export * from '@temporalio/common/lib/interfaces'; -export * from '@temporalio/common/lib/workflow-handle'; -export * from './async-completion-client'; -export * from './client'; -export { Connection, ConnectionOptions, ConnectionOptionsWithDefaults, ConnectionPlugin, LOCAL_TARGET, } from './connection'; -export * from './errors'; -export * from './grpc-retry'; -export * from './interceptors'; -export * from './types'; -export * from './workflow-client'; -export * from './workflow-options'; -export * from './schedule-types'; -export * from './schedule-client'; -export * from './task-queue-client'; -export { WorkflowUpdateStage } from './workflow-update-stage'; -export { WorkerBuildIdVersionSets, BuildIdVersionSet, BuildIdOperation, PromoteSetByBuildId, PromoteBuildIdWithinSet, MergeSets, AddNewIdInNewDefaultSet, AddNewCompatibleVersion, } from './build-id-types'; diff --git a/node_modules/@temporalio/client/lib/index.js b/node_modules/@temporalio/client/lib/index.js deleted file mode 100644 index 5f9bd4e..0000000 --- a/node_modules/@temporalio/client/lib/index.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -/** - * Client for communicating with Temporal Server. - * - * Most functionality is available through {@link WorkflowClient}, but you can also call gRPC methods directly using {@link Connection.workflowService} and {@link Connection.operatorService}. - * - * ### Usage - * - * ```ts - * import { Connection, Client } from '@temporalio/client'; - * import { loadClientConnectConfig } from '@temporalio/envconfig'; - * import { sleepForDays } from './workflows'; - * import { nanoid } from 'nanoid'; - * - * async function run() { - * const config = loadClientConnectConfig(); - * const connection = await Connection.connect(config.connectionOptions); - * const client = new Client({ connection }); - * - * const handle = await client.workflow.start(sleepForDays, { - * taskQueue: 'sleep-for-days', - * workflowId: 'workflow-' + nanoid(), - * }); - * console.log(`Started workflow ${handle.workflowId}`); - * - * // Wait for workflow completion (runs indefinitely until it receives a signal) - * console.log(await handle.result()); - * } - * - * run().catch((err) => { - * console.error(err); - * process.exit(1); - * }); - * ``` - * @module - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.WorkflowUpdateStage = exports.LOCAL_TARGET = exports.Connection = exports.WorkflowExecutionAlreadyStartedError = exports.TimeoutFailure = exports.TerminatedFailure = exports.TemporalFailure = exports.ServerFailure = exports.defaultPayloadConverter = exports.ChildWorkflowFailure = exports.CancelledFailure = exports.ApplicationFailure = exports.ActivityFailure = void 0; -var common_1 = require("@temporalio/common"); -Object.defineProperty(exports, "ActivityFailure", { enumerable: true, get: function () { return common_1.ActivityFailure; } }); -Object.defineProperty(exports, "ApplicationFailure", { enumerable: true, get: function () { return common_1.ApplicationFailure; } }); -Object.defineProperty(exports, "CancelledFailure", { enumerable: true, get: function () { return common_1.CancelledFailure; } }); -Object.defineProperty(exports, "ChildWorkflowFailure", { enumerable: true, get: function () { return common_1.ChildWorkflowFailure; } }); -Object.defineProperty(exports, "defaultPayloadConverter", { enumerable: true, get: function () { return common_1.defaultPayloadConverter; } }); -Object.defineProperty(exports, "ServerFailure", { enumerable: true, get: function () { return common_1.ServerFailure; } }); -Object.defineProperty(exports, "TemporalFailure", { enumerable: true, get: function () { return common_1.TemporalFailure; } }); -Object.defineProperty(exports, "TerminatedFailure", { enumerable: true, get: function () { return common_1.TerminatedFailure; } }); -Object.defineProperty(exports, "TimeoutFailure", { enumerable: true, get: function () { return common_1.TimeoutFailure; } }); -Object.defineProperty(exports, "WorkflowExecutionAlreadyStartedError", { enumerable: true, get: function () { return common_1.WorkflowExecutionAlreadyStartedError; } }); -__exportStar(require("@temporalio/common/lib/errors"), exports); -__exportStar(require("@temporalio/common/lib/interfaces"), exports); -__exportStar(require("@temporalio/common/lib/workflow-handle"), exports); -__exportStar(require("./async-completion-client"), exports); -__exportStar(require("./client"), exports); -var connection_1 = require("./connection"); -Object.defineProperty(exports, "Connection", { enumerable: true, get: function () { return connection_1.Connection; } }); -Object.defineProperty(exports, "LOCAL_TARGET", { enumerable: true, get: function () { return connection_1.LOCAL_TARGET; } }); -__exportStar(require("./errors"), exports); -__exportStar(require("./grpc-retry"), exports); -__exportStar(require("./interceptors"), exports); -__exportStar(require("./types"), exports); -__exportStar(require("./workflow-client"), exports); -__exportStar(require("./workflow-options"), exports); -__exportStar(require("./schedule-types"), exports); -__exportStar(require("./schedule-client"), exports); -__exportStar(require("./task-queue-client"), exports); -var workflow_update_stage_1 = require("./workflow-update-stage"); -Object.defineProperty(exports, "WorkflowUpdateStage", { enumerable: true, get: function () { return workflow_update_stage_1.WorkflowUpdateStage; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/index.js.map b/node_modules/@temporalio/client/lib/index.js.map deleted file mode 100644 index 625e54e..0000000 --- a/node_modules/@temporalio/client/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;;;;;;;;;;;;;;;;;AAEH,6CAc4B;AAb1B,yGAAA,eAAe,OAAA;AACf,4GAAA,kBAAkB,OAAA;AAClB,0GAAA,gBAAgB,OAAA;AAChB,8GAAA,oBAAoB,OAAA;AAEpB,iHAAA,uBAAuB,OAAA;AAGvB,uGAAA,aAAa,OAAA;AACb,yGAAA,eAAe,OAAA;AACf,2GAAA,iBAAiB,OAAA;AACjB,wGAAA,cAAc,OAAA;AACd,8HAAA,oCAAoC,OAAA;AAGtC,gEAA8C;AAC9C,oEAAkD;AAClD,yEAAuD;AACvD,4DAA0C;AAC1C,2CAAyB;AACzB,2CAMsB;AALpB,wGAAA,UAAU,OAAA;AAIV,0GAAA,YAAY,OAAA;AAEd,2CAAyB;AACzB,+CAA6B;AAC7B,iDAA+B;AAC/B,0CAAwB;AACxB,oDAAkC;AAClC,qDAAmC;AACnC,mDAAiC;AACjC,oDAAkC;AAClC,sDAAoC;AACpC,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/interceptor-adapters.d.ts b/node_modules/@temporalio/client/lib/interceptor-adapters.d.ts deleted file mode 100644 index e375504..0000000 --- a/node_modules/@temporalio/client/lib/interceptor-adapters.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { WorkflowClientInterceptor } from './interceptors'; -export declare function adaptWorkflowClientInterceptor(i: WorkflowClientInterceptor): WorkflowClientInterceptor; diff --git a/node_modules/@temporalio/client/lib/interceptor-adapters.js b/node_modules/@temporalio/client/lib/interceptor-adapters.js deleted file mode 100644 index 9bfa50a..0000000 --- a/node_modules/@temporalio/client/lib/interceptor-adapters.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.adaptWorkflowClientInterceptor = adaptWorkflowClientInterceptor; -function adaptWorkflowClientInterceptor(i) { - return adaptLegacyStartInterceptor(i); -} -// Adapt legacy `start` interceptors to the new `startWithDetails` interceptor. -function adaptLegacyStartInterceptor(i) { - // If it already has the new method, or doesn't have the legacy one, no adaptation is needed. - // eslint-disable-next-line @typescript-eslint/no-deprecated - if (i.startWithDetails || !i.start) { - return i; - } - // This interceptor has a legacy `start` but not `startWithDetails`. We'll adapt it. - return { - ...i, - startWithDetails: async (input, next) => { - let downstreamOut; - // Patched `next` for legacy `start` interceptors. - // Captures the full `WorkflowStartOutput` while returning `runId` as a string. - const patchedNext = async (patchedInput) => { - downstreamOut = await next(patchedInput); - return downstreamOut.runId; - }; - const runIdFromLegacyInterceptor = await i.start(input, patchedNext); // eslint-disable-line @typescript-eslint/no-deprecated - // If the interceptor short-circuited (didn't call `next`), `downstreamOut` will be undefined. - // In that case, we can't have an eager start. - if (downstreamOut === undefined) { - return { runId: runIdFromLegacyInterceptor, eagerlyStarted: false }; - } - // If `next` was called, honor the `runId` from the legacy interceptor but preserve - // the `eagerlyStarted` status from the actual downstream call. - return { ...downstreamOut, runId: runIdFromLegacyInterceptor }; - }, - }; -} -//# sourceMappingURL=interceptor-adapters.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/interceptor-adapters.js.map b/node_modules/@temporalio/client/lib/interceptor-adapters.js.map deleted file mode 100644 index 848607e..0000000 --- a/node_modules/@temporalio/client/lib/interceptor-adapters.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interceptor-adapters.js","sourceRoot":"","sources":["../src/interceptor-adapters.ts"],"names":[],"mappings":";;AAEA,wEAEC;AAFD,SAAgB,8BAA8B,CAAC,CAA4B;IACzE,OAAO,2BAA2B,CAAC,CAAC,CAAC,CAAC;AACxC,CAAC;AAED,+EAA+E;AAC/E,SAAS,2BAA2B,CAAC,CAA4B;IAC/D,6FAA6F;IAC7F,4DAA4D;IAC5D,IAAI,CAAC,CAAC,gBAAgB,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;QACnC,OAAO,CAAC,CAAC;IACX,CAAC;IAED,oFAAoF;IACpF,OAAO;QACL,GAAG,CAAC;QACJ,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAgC,EAAE;YACpE,IAAI,aAA8C,CAAC;YAEnD,kDAAkD;YAClD,+EAA+E;YAC/E,MAAM,WAAW,GAAG,KAAK,EAAE,YAAgC,EAAmB,EAAE;gBAC9E,aAAa,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,CAAC;gBACzC,OAAO,aAAa,CAAC,KAAK,CAAC;YAC7B,CAAC,CAAC;YAEF,MAAM,0BAA0B,GAAG,MAAM,CAAC,CAAC,KAAM,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,uDAAuD;YAE9H,8FAA8F;YAC9F,8CAA8C;YAC9C,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;gBAChC,OAAO,EAAE,KAAK,EAAE,0BAA0B,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC;YACtE,CAAC;YAED,mFAAmF;YACnF,+DAA+D;YAC/D,OAAO,EAAE,GAAG,aAAa,EAAE,KAAK,EAAE,0BAA0B,EAAE,CAAC;QACjE,CAAC;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/interceptors.d.ts b/node_modules/@temporalio/client/lib/interceptors.d.ts deleted file mode 100644 index 59398ae..0000000 --- a/node_modules/@temporalio/client/lib/interceptors.d.ts +++ /dev/null @@ -1,207 +0,0 @@ -/** - * Definitions for Connection interceptors. - * - * @module - */ -import { Headers, Next } from '@temporalio/common'; -import { temporal } from '@temporalio/proto'; -import { CompiledScheduleOptions } from './schedule-types'; -import { DescribeWorkflowExecutionResponse, RequestCancelWorkflowExecutionResponse, TerminateWorkflowExecutionResponse, WorkflowExecution } from './types'; -import { CompiledWorkflowOptions, WorkflowUpdateOptions } from './workflow-options'; -export { Headers, Next }; -/** Input for WorkflowClientInterceptor.start */ -export interface WorkflowStartInput { - /** Name of Workflow to start */ - readonly workflowType: string; - readonly headers: Headers; - readonly options: CompiledWorkflowOptions; -} -/** Input for WorkflowClientInterceptor.update */ -export interface WorkflowStartUpdateInput { - readonly updateName: string; - readonly args: unknown[]; - readonly workflowExecution: WorkflowExecution; - readonly firstExecutionRunId?: string; - readonly headers: Headers; - readonly options: WorkflowUpdateOptions; -} -/** Output for WorkflowClientInterceptor.startWithDetails */ -export interface WorkflowStartOutput { - readonly runId: string; - readonly eagerlyStarted: boolean; -} -/** Output for WorkflowClientInterceptor.startUpdate */ -export interface WorkflowStartUpdateOutput { - readonly updateId: string; - readonly workflowRunId: string; - readonly outcome?: temporal.api.update.v1.IOutcome; -} -/** - * Input for WorkflowClientInterceptor.startUpdateWithStart - */ -export interface WorkflowStartUpdateWithStartInput { - readonly workflowType: string; - readonly workflowStartOptions: CompiledWorkflowOptions; - readonly workflowStartHeaders: Headers; - readonly updateName: string; - readonly updateArgs: unknown[]; - readonly updateOptions: WorkflowUpdateOptions; - readonly updateHeaders: Headers; -} -/** - * Output for WorkflowClientInterceptor.startUpdateWithStart - */ -export interface WorkflowStartUpdateWithStartOutput { - readonly workflowExecution: WorkflowExecution; - readonly updateId: string; - readonly updateOutcome?: temporal.api.update.v1.IOutcome; -} -/** Input for WorkflowClientInterceptor.signal */ -export interface WorkflowSignalInput { - readonly signalName: string; - readonly args: unknown[]; - readonly workflowExecution: WorkflowExecution; - readonly headers: Headers; -} -/** Input for WorkflowClientInterceptor.signalWithStart */ -export interface WorkflowSignalWithStartInput { - readonly workflowType: string; - readonly signalName: string; - readonly signalArgs: unknown[]; - readonly headers: Headers; - readonly options: CompiledWorkflowOptions; -} -/** Input for WorkflowClientInterceptor.query */ -export interface WorkflowQueryInput { - readonly queryType: string; - readonly args: unknown[]; - readonly workflowExecution: WorkflowExecution; - readonly queryRejectCondition?: temporal.api.enums.v1.QueryRejectCondition; - readonly headers: Headers; -} -/** Input for WorkflowClientInterceptor.terminate */ -export interface WorkflowTerminateInput { - readonly workflowExecution: WorkflowExecution; - readonly reason?: string; - readonly details?: unknown[]; - readonly firstExecutionRunId?: string; -} -/** Input for WorkflowClientInterceptor.cancel */ -export interface WorkflowCancelInput { - readonly workflowExecution: WorkflowExecution; - readonly firstExecutionRunId?: string; -} -/** Input for WorkflowClientInterceptor.describe */ -export interface WorkflowDescribeInput { - readonly workflowExecution: WorkflowExecution; -} -/** - * Implement any of these methods to intercept WorkflowClient outbound calls - */ -export interface WorkflowClientInterceptor { - /** - * Intercept a service call to startWorkflowExecution - * - * If you implement this method, - * {@link signalWithStart} most likely needs to be implemented too - * - * @deprecated in favour of {@link startWithDetails} - */ - start?: (input: WorkflowStartInput, next: Next) => Promise; - /** - * Intercept a service call to startWorkflowExecution - * - * This method returns start details via {@link WorkflowStartOutput}. - * - * If you implement this method, - * {@link signalWithStart} most likely needs to be implemented too - */ - startWithDetails?: (input: WorkflowStartInput, next: Next) => Promise; - /** - * Intercept a service call to updateWorkflowExecution - */ - startUpdate?: (input: WorkflowStartUpdateInput, next: Next) => Promise; - /** - * Intercept a service call to startUpdateWithStart - */ - startUpdateWithStart?: (input: WorkflowStartUpdateWithStartInput, next: Next) => Promise; - /** - * Intercept a service call to signalWorkflowExecution - * - * If you implement this method, - * {@link signalWithStart} most likely needs to be implemented too - */ - signal?: (input: WorkflowSignalInput, next: Next) => Promise; - /** - * Intercept a service call to signalWithStartWorkflowExecution - */ - signalWithStart?: (input: WorkflowSignalWithStartInput, next: Next) => Promise; - /** - * Intercept a service call to queryWorkflow - */ - query?: (input: WorkflowQueryInput, next: Next) => Promise; - /** - * Intercept a service call to terminateWorkflowExecution - */ - terminate?: (input: WorkflowTerminateInput, next: Next) => Promise; - /** - * Intercept a service call to requestCancelWorkflowExecution - */ - cancel?: (input: WorkflowCancelInput, next: Next) => Promise; - /** - * Intercept a service call to describeWorkflowExecution - */ - describe?: (input: WorkflowDescribeInput, next: Next) => Promise; -} -/** @deprecated: Use WorkflowClientInterceptor instead */ -export type WorkflowClientCallsInterceptor = WorkflowClientInterceptor; -/** @deprecated */ -export interface WorkflowClientCallsInterceptorFactoryInput { - workflowId: string; - runId?: string; -} -/** - * A function that takes {@link CompiledWorkflowOptions} and returns an interceptor - * - * @deprecated: Please define interceptors directly, without factory - */ -export interface WorkflowClientCallsInterceptorFactory { - (input: WorkflowClientCallsInterceptorFactoryInput): WorkflowClientCallsInterceptor; -} -/** - * A mapping of interceptor type of a list of factory functions - * - * @deprecated: Please define interceptors directly, without factory - */ -export interface WorkflowClientInterceptors { - /** @deprecated */ - calls?: WorkflowClientCallsInterceptorFactory[]; -} -/** - * Implement any of these methods to intercept ScheduleClient outbound calls - */ -export interface ScheduleClientInterceptor { - /** - * Intercept a service call to CreateSchedule - */ - create?: (input: CreateScheduleInput, next: Next) => Promise; -} -/** - * Input for {@link ScheduleClientInterceptor.create} - */ -export interface CreateScheduleInput { - readonly headers: Headers; - readonly options: CompiledScheduleOptions; -} -export type CreateScheduleOutput = { - readonly conflictToken: Uint8Array; -}; -/** - * Interceptors for any high-level SDK client. - * - * NOTE: Currently only for {@link WorkflowClient} and {@link ScheduleClient}. More will be added later as needed. - */ -export interface ClientInterceptors { - workflow?: WorkflowClientInterceptors | WorkflowClientInterceptor[]; - schedule?: ScheduleClientInterceptor[]; -} diff --git a/node_modules/@temporalio/client/lib/interceptors.js b/node_modules/@temporalio/client/lib/interceptors.js deleted file mode 100644 index 92591ee..0000000 --- a/node_modules/@temporalio/client/lib/interceptors.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -/** - * Definitions for Connection interceptors. - * - * @module - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=interceptors.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/interceptors.js.map b/node_modules/@temporalio/client/lib/interceptors.js.map deleted file mode 100644 index e6a5c76..0000000 --- a/node_modules/@temporalio/client/lib/interceptors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interceptors.js","sourceRoot":"","sources":["../src/interceptors.ts"],"names":[],"mappings":";AAAA;;;;GAIG"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/internal.d.ts b/node_modules/@temporalio/client/lib/internal.d.ts deleted file mode 100644 index 25c462b..0000000 --- a/node_modules/@temporalio/client/lib/internal.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { temporal } from '@temporalio/proto'; -import { WorkflowOptions } from './workflow-options'; -/** - * A symbol used to attach extra, SDK-internal options to the `WorkflowClient.start()` call. - * - * These are notably used by the Temporal Nexus helpers. - * - * @internal - * @hidden - */ -export declare const InternalWorkflowStartOptionsSymbol: unique symbol; -export interface InternalWorkflowStartOptions extends WorkflowOptions { - [InternalWorkflowStartOptionsSymbol]?: { - /** - * Request ID to be used for the workflow. - */ - requestId?: string; - /** - * Callbacks to be called by the server when this workflow reaches a terminal state. - * If the workflow continues-as-new, these callbacks will be carried over to the new execution. - * Callback addresses must be whitelisted in the server's dynamic configuration. - */ - completionCallbacks?: temporal.api.common.v1.ICallback[]; - /** - * Links to be associated with the workflow. - */ - links?: temporal.api.common.v1.ILink[]; - /** - * Backlink copied by the client from the StartWorkflowExecutionResponse. - * Only populated in servers newer than 1.27. - */ - backLink?: temporal.api.common.v1.ILink; - /** - * Conflict options for when USE_EXISTING is specified. - * - * Used by the Nexus WorkflowRunOperations to attach to a callback to a running workflow. - */ - onConflictOptions?: temporal.api.workflow.v1.IOnConflictOptions; - }; -} diff --git a/node_modules/@temporalio/client/lib/internal.js b/node_modules/@temporalio/client/lib/internal.js deleted file mode 100644 index 9f7f83e..0000000 --- a/node_modules/@temporalio/client/lib/internal.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InternalWorkflowStartOptionsSymbol = void 0; -/** - * A symbol used to attach extra, SDK-internal options to the `WorkflowClient.start()` call. - * - * These are notably used by the Temporal Nexus helpers. - * - * @internal - * @hidden - */ -exports.InternalWorkflowStartOptionsSymbol = Symbol.for('__temporal_internal_client_workflow_start_options'); -//# sourceMappingURL=internal.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/internal.js.map b/node_modules/@temporalio/client/lib/internal.js.map deleted file mode 100644 index 0161f98..0000000 --- a/node_modules/@temporalio/client/lib/internal.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":";;;AAGA;;;;;;;GAOG;AACU,QAAA,kCAAkC,GAAG,MAAM,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/iterators-utils.d.ts b/node_modules/@temporalio/client/lib/iterators-utils.d.ts deleted file mode 100644 index 29d568f..0000000 --- a/node_modules/@temporalio/client/lib/iterators-utils.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import 'abort-controller/polyfill'; -export interface MapAsyncOptions { - /** - * How many items to map concurrently. If set to less than 2 (or not set), then items are not mapped concurrently. - * - * When items are mapped concurrently, mapped items are returned by the resulting iterator in the order they complete - * mapping, not the order in which the corresponding source items were obtained from the source iterator. - * - * @default 1 (ie. items are not mapped concurrently) - */ - concurrency?: number; - /** - * Maximum number of mapped items to keep in buffer, ready for consumption. - * - * Ignored unless `concurrency > 1`. No limit applies if set to `undefined`. - * - * @default unlimited - */ - bufferLimit?: number | undefined; -} -/** - * Return an async iterable that transforms items from a source iterable by mapping each item - * through a mapping function. - * - * If `concurrency > 1`, then up to `concurrency` items may be mapped concurrently. In that case, - * items are returned by the resulting iterator in the order they complete processing, not the order - * in which the corresponding source items were obtained from the source iterator. - * - * @param source the source async iterable - * @param mapFn a mapping function to apply on every item of the source iterable - */ -export declare function mapAsyncIterable(source: AsyncIterable, mapFn: (val: A) => Promise, options?: MapAsyncOptions): AsyncIterable; diff --git a/node_modules/@temporalio/client/lib/iterators-utils.js b/node_modules/@temporalio/client/lib/iterators-utils.js deleted file mode 100644 index 14dcaf3..0000000 --- a/node_modules/@temporalio/client/lib/iterators-utils.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mapAsyncIterable = mapAsyncIterable; -require("abort-controller/polyfill"); // eslint-disable-line import/no-unassigned-import -const node_events_1 = require("node:events"); -const type_helpers_1 = require("@temporalio/common/lib/type-helpers"); -function toAsyncIterator(iterable) { - return iterable[Symbol.asyncIterator](); -} -/** - * Return an async iterable that transforms items from a source iterable by mapping each item - * through a mapping function. - * - * If `concurrency > 1`, then up to `concurrency` items may be mapped concurrently. In that case, - * items are returned by the resulting iterator in the order they complete processing, not the order - * in which the corresponding source items were obtained from the source iterator. - * - * @param source the source async iterable - * @param mapFn a mapping function to apply on every item of the source iterable - */ -async function* mapAsyncIterable(source, mapFn, options) { - const { concurrency, bufferLimit } = options ?? {}; - if (!concurrency || concurrency < 2) { - for await (const x of source) { - yield mapFn(x); - } - return; - } - const sourceIterator = toAsyncIterator(source); - const emitter = new node_events_1.EventEmitter(); - const controller = new AbortController(); - const emitterEventsIterable = (0, node_events_1.on)(emitter, 'result', { signal: controller.signal }); - const emitterError = (0, node_events_1.once)(emitter, 'error'); - const bufferLimitSemaphore = typeof bufferLimit === 'number' - ? (() => { - const releaseEvents = toAsyncIterator((0, node_events_1.on)(emitter, 'released', { signal: controller.signal })); - let value = bufferLimit + concurrency; - return { - acquire: async () => { - while (value <= 0) { - await Promise.race([releaseEvents.next(), emitterError]); - } - value--; - }, - release: () => { - value++; - emitter.emit('released'); - }, - }; - })() - : undefined; - const mapper = async () => { - for (;;) { - await bufferLimitSemaphore?.acquire(); - const val = await Promise.race([sourceIterator.next(), emitterError]); - if (Array.isArray(val)) - return; - if (val?.done) - return; - emitter.emit('result', await mapFn(val.value)); - } - }; - const mappers = Array(concurrency) - .fill(mapper) - .map((f) => f()); - Promise.all(mappers).then(() => controller.abort(), (err) => emitter.emit('error', err)); - try { - for await (const [res] of emitterEventsIterable) { - bufferLimitSemaphore?.release(); - yield res; - } - } - catch (err) { - if ((0, type_helpers_1.isAbortError)(err)) { - return; - } - throw err; - } -} -//# sourceMappingURL=iterators-utils.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/iterators-utils.js.map b/node_modules/@temporalio/client/lib/iterators-utils.js.map deleted file mode 100644 index b12d608..0000000 --- a/node_modules/@temporalio/client/lib/iterators-utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iterators-utils.js","sourceRoot":"","sources":["../src/iterators-utils.ts"],"names":[],"mappings":";;AAwCA,4CA4EC;AApHD,qCAAmC,CAAC,kDAAkD;AACtF,6CAAqD;AACrD,sEAAmE;AAuBnE,SAAS,eAAe,CAAI,QAA0B;IACpD,OAAO,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;AAC1C,CAAC;AAED;;;;;;;;;;GAUG;AACI,KAAK,SAAS,CAAC,CAAC,gBAAgB,CACrC,MAAwB,EACxB,KAA6B,EAC7B,OAAyB;IAEzB,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAEnD,IAAI,CAAC,WAAW,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC;QACpC,IAAI,KAAK,EAAE,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;YAC7B,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;QACj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AI,CAAC,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC;YAEtE,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;gBAAE,OAAO;YAC/B,IAAK,GAA2B,EAAE,IAAI;gBAAE,OAAO;YAE/C,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QACjD,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC;SAC/B,IAAI,CAAC,MAAM,CAAC;SACZ,GAAG,CAAC,CAAC,CAAgB,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAElC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CACvB,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EACxB,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CACpC,CAAC;IAEF,IAAI,CAAC;QACH,IAAI,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,IAAI,qBAAqB,EAAE,CAAC;YAChD,oBAAoB,EAAE,OAAO,EAAE,CAAC;YAChC,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,IAAI,IAAA,2BAAY,EAAC,GAAG,CAAC,EAAE,CAAC;YACtB,OAAO;QACT,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/pkg.d.ts b/node_modules/@temporalio/client/lib/pkg.d.ts deleted file mode 100644 index 440ed8f..0000000 --- a/node_modules/@temporalio/client/lib/pkg.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare const _default: { - name: string; - version: string; -}; -export default _default; diff --git a/node_modules/@temporalio/client/lib/pkg.js b/node_modules/@temporalio/client/lib/pkg.js deleted file mode 100644 index f636275..0000000 --- a/node_modules/@temporalio/client/lib/pkg.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -// ../package.json is outside of the TS project rootDir which causes TS to complain about this import. -// We do not want to change the rootDir because it messes up the output structure. -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -const package_json_1 = __importDefault(require("../package.json")); -exports.default = package_json_1.default; -//# sourceMappingURL=pkg.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/pkg.js.map b/node_modules/@temporalio/client/lib/pkg.js.map deleted file mode 100644 index 0344592..0000000 --- a/node_modules/@temporalio/client/lib/pkg.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pkg.js","sourceRoot":"","sources":["../src/pkg.ts"],"names":[],"mappings":";;;;;AAAA,sGAAsG;AACtG,kFAAkF;AAClF,6DAA6D;AAC7D,aAAa;AACb,mEAAkC;AAElC,kBAAe,sBAAwC,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/schedule-client.d.ts b/node_modules/@temporalio/client/lib/schedule-client.d.ts deleted file mode 100644 index 0217379..0000000 --- a/node_modules/@temporalio/client/lib/schedule-client.d.ts +++ /dev/null @@ -1,165 +0,0 @@ -import { Workflow } from '@temporalio/common'; -import { Headers } from '@temporalio/common/lib/interceptors'; -import { temporal } from '@temporalio/proto'; -import { CreateScheduleInput, CreateScheduleOutput, ScheduleClientInterceptor } from './interceptors'; -import { WorkflowService } from './types'; -import { Backfill, CompiledScheduleUpdateOptions, ScheduleSummary, ScheduleDescription, ScheduleOptions, ScheduleOverlapPolicy, ScheduleUpdateOptions, ScheduleOptionsStartWorkflowAction } from './schedule-types'; -import { BaseClient, BaseClientOptions, LoadedWithDefaults } from './base-client'; -/** - * Handle to a single Schedule - */ -export interface ScheduleHandle { - /** - * This Schedule's identifier - */ - readonly scheduleId: string; - /** - * Fetch the Schedule's description from the Server - */ - describe(): Promise; - /** - * Update the Schedule - * - * This function calls `.describe()`, provides the `Schedule` to the provided `updateFn`, and - * sends the returned `UpdatedSchedule` to the Server to update the Schedule definition. Note that, - * in the future, `updateFn` might be invoked multiple time, with identical or different input. - */ - update(updateFn: (previous: ScheduleDescription) => ScheduleUpdateOptions>): Promise; - /** - * Delete the Schedule - */ - delete(): Promise; - /** - * Trigger an Action to be taken immediately - * - * @param overlap Override the Overlap Policy for this one trigger. Defaults to {@link ScheduleOverlapPolicy.ALLOW_ALL}. - */ - trigger(overlap?: ScheduleOverlapPolicy): Promise; - /** - * Run though the specified time period(s) and take Actions as if that time passed by right now, all at once. - * The Overlap Policy can be overridden for the scope of the Backfill. - */ - backfill(options: Backfill | Backfill[]): Promise; - /** - * Pause the Schedule - * - * @param note A new {@link ScheduleDescription.note}. Defaults to `"Paused via TypeScript SDK"` - */ - pause(note?: string): Promise; - /** - * Unpause the Schedule - * - * @param note A new {@link ScheduleDescription.note}. Defaults to `"Unpaused via TypeScript SDK" - */ - unpause(note?: string): Promise; - /** - * Readonly accessor to the underlying ScheduleClient - */ - readonly client: ScheduleClient; -} -export interface ScheduleClientOptions extends BaseClientOptions { - /** - * Used to override and extend default Connection functionality - * - * Useful for injecting auth headers and tracing Workflow executions - */ - interceptors?: ScheduleClientInterceptor[]; -} -export type LoadedScheduleClientOptions = LoadedWithDefaults; -export interface ListScheduleOptions { - /** - * How many results to fetch from the Server at a time. - * @default 1000 - */ - pageSize?: number; - /** - * Filter schedules by a query string. - */ - query?: string; -} -/** - * Client for starting Workflow executions and creating Workflow handles - */ -export declare class ScheduleClient extends BaseClient { - readonly options: LoadedScheduleClientOptions; - constructor(options?: ScheduleClientOptions); - /** - * Raw gRPC access to the Temporal service. Schedule-related methods are included in {@link WorkflowService}. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests made to the service. - */ - get workflowService(): WorkflowService; - /** - * Create a new Schedule. - * - * @throws {@link ScheduleAlreadyRunning} if there's a running (not deleted) Schedule with the given `id` - * @returns a ScheduleHandle to the created Schedule - */ - create(options: ScheduleOptions>): Promise; - /** - * Create a new Schedule. - */ - protected _createSchedule(options: ScheduleOptions): Promise; - /** - * Create a new Schedule. - */ - protected _createScheduleHandler(input: CreateScheduleInput): Promise; - /** - * Describe a Schedule. - */ - protected _describeSchedule(scheduleId: string): Promise; - /** - * Update a Schedule. - */ - protected _updateSchedule(scheduleId: string, opts: CompiledScheduleUpdateOptions, header: Headers): Promise; - /** - * Patch a Schedule. - */ - protected _patchSchedule(scheduleId: string, patch: temporal.api.schedule.v1.ISchedulePatch): Promise; - /** - * Delete a Schedule. - */ - protected _deleteSchedule(scheduleId: string): Promise; - /** - * List Schedules with an `AsyncIterator`: - * - * ```ts - * for await (const schedule: Schedule of client.list()) { - * const { id, memo, searchAttributes } = schedule - * // ... - * } - * ``` - * - * To list one page at a time, instead use the raw gRPC method {@link WorkflowService.listSchedules}: - * - * ```ts - * await { schedules, nextPageToken } = client.scheduleService.listSchedules() - * ``` - */ - list(options?: ListScheduleOptions): AsyncIterable; - /** - * Get a handle to a Schedule - * - * This method does not validate `scheduleId`. If there is no Schedule with the given `scheduleId`, handle - * methods like `handle.describe()` will throw a {@link ScheduleNotFoundError} error. - */ - getHandle(scheduleId: string): ScheduleHandle; - protected rethrowGrpcError(err: unknown, fallbackMessage: string, scheduleId?: string): never; -} -/** - * Thrown from {@link ScheduleClient.create} if there's a running (not deleted) Schedule with the given `id`. - */ -export declare class ScheduleAlreadyRunning extends Error { - readonly scheduleId: string; - constructor(message: string, scheduleId: string); -} -/** - * Thrown when a Schedule with the given Id is not known to Temporal Server. - * It could be because: - * - Id passed is incorrect - * - Schedule was deleted - */ -export declare class ScheduleNotFoundError extends Error { - readonly scheduleId: string; - constructor(message: string, scheduleId: string); -} diff --git a/node_modules/@temporalio/client/lib/schedule-client.js b/node_modules/@temporalio/client/lib/schedule-client.js deleted file mode 100644 index be93304..0000000 --- a/node_modules/@temporalio/client/lib/schedule-client.js +++ /dev/null @@ -1,396 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ScheduleNotFoundError = exports.ScheduleAlreadyRunning = exports.ScheduleClient = void 0; -const grpc_js_1 = require("@grpc/grpc-js"); -const uuid_1 = require("uuid"); -const payload_search_attributes_1 = require("@temporalio/common/lib/converter/payload-search-attributes"); -const interceptors_1 = require("@temporalio/common/lib/interceptors"); -const internal_non_workflow_1 = require("@temporalio/common/lib/internal-non-workflow"); -const internal_workflow_1 = require("@temporalio/common/lib/internal-workflow"); -const proto_1 = require("@temporalio/proto"); -const time_1 = require("@temporalio/common/lib/time"); -const type_helpers_1 = require("@temporalio/common/lib/type-helpers"); -const errors_1 = require("./errors"); -const schedule_types_1 = require("./schedule-types"); -const schedule_helpers_1 = require("./schedule-helpers"); -const base_client_1 = require("./base-client"); -const helpers_1 = require("./helpers"); -function defaultScheduleClientOptions() { - return { - ...(0, base_client_1.defaultBaseClientOptions)(), - interceptors: [], - }; -} -function assertRequiredScheduleOptions(opts, action) { - const structureName = action === 'CREATE' ? 'ScheduleOptions' : 'ScheduleUpdateOptions'; - if (action === 'CREATE' && !opts.scheduleId) { - throw new TypeError(`Missing ${structureName}.scheduleId`); - } - switch (opts.action.type) { - case 'startWorkflow': - if (!opts.action.taskQueue) { - throw new TypeError(`Missing ${structureName}.action.taskQueue for 'startWorkflow' action`); - } - if (!opts.action.workflowType) { - throw new TypeError(`Missing ${structureName}.action.workflowType for 'startWorkflow' action`); - } - } -} -/** - * Client for starting Workflow executions and creating Workflow handles - */ -class ScheduleClient extends base_client_1.BaseClient { - options; - constructor(options) { - super(options); - this.options = { - ...defaultScheduleClientOptions(), - ...(0, internal_workflow_1.filterNullAndUndefined)(options ?? {}), - loadedDataConverter: this.dataConverter, - }; - } - /** - * Raw gRPC access to the Temporal service. Schedule-related methods are included in {@link WorkflowService}. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests made to the service. - */ - get workflowService() { - return this.connection.workflowService; - } - async create(options) { - await this._createSchedule(options); - return this.getHandle(options.scheduleId); - } - /** - * Create a new Schedule. - */ - async _createSchedule(options) { - assertRequiredScheduleOptions(options, 'CREATE'); - const compiledOptions = (0, schedule_helpers_1.compileScheduleOptions)(options); - const create = (0, interceptors_1.composeInterceptors)(this.options.interceptors, 'create', this._createScheduleHandler.bind(this)); - await create({ - options: compiledOptions, - headers: {}, - }); - } - /** - * Create a new Schedule. - */ - async _createScheduleHandler(input) { - const { options: opts, headers } = input; - const { identity } = this.options; - const req = { - namespace: this.options.namespace, - identity, - requestId: (0, uuid_1.v4)(), - scheduleId: opts.scheduleId, - schedule: { - spec: (0, schedule_helpers_1.encodeScheduleSpec)(opts.spec), - action: await (0, schedule_helpers_1.encodeScheduleAction)(this.dataConverter, opts.action, headers), - policies: (0, schedule_helpers_1.encodeSchedulePolicies)(opts.policies), - state: (0, schedule_helpers_1.encodeScheduleState)(opts.state), - }, - memo: opts.memo ? { fields: await (0, internal_non_workflow_1.encodeMapToPayloads)(this.dataConverter, opts.memo) } : undefined, - searchAttributes: opts.searchAttributes || opts.typedSearchAttributes // eslint-disable-line @typescript-eslint/no-deprecated - ? { - indexedFields: (0, payload_search_attributes_1.encodeUnifiedSearchAttributes)(opts.searchAttributes, opts.typedSearchAttributes), // eslint-disable-line @typescript-eslint/no-deprecated - } - : undefined, - initialPatch: { - triggerImmediately: opts.state?.triggerImmediately - ? { overlapPolicy: proto_1.temporal.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_ALLOW_ALL } - : undefined, - backfillRequest: opts.state?.backfill - ? opts.state.backfill.map((x) => ({ - startTime: (0, time_1.optionalDateToTs)(x.start), - endTime: (0, time_1.optionalDateToTs)(x.end), - overlapPolicy: x.overlap ? (0, schedule_types_1.encodeScheduleOverlapPolicy)(x.overlap) : undefined, - })) - : undefined, - }, - }; - try { - const res = await this.workflowService.createSchedule(req); - return { conflictToken: res.conflictToken }; - } - catch (err) { - if (err.code === grpc_js_1.status.ALREADY_EXISTS) { - throw new ScheduleAlreadyRunning('Schedule already exists and is running', opts.scheduleId); - } - this.rethrowGrpcError(err, 'Failed to create schedule', opts.scheduleId); - } - } - /** - * Describe a Schedule. - */ - async _describeSchedule(scheduleId) { - try { - return await this.workflowService.describeSchedule({ - namespace: this.options.namespace, - scheduleId, - }); - } - catch (err) { - this.rethrowGrpcError(err, 'Failed to describe schedule', scheduleId); - } - } - /** - * Update a Schedule. - */ - async _updateSchedule(scheduleId, opts, header) { - const req = { - namespace: this.options.namespace, - scheduleId, - schedule: { - spec: (0, schedule_helpers_1.encodeScheduleSpec)(opts.spec), - action: await (0, schedule_helpers_1.encodeScheduleAction)(this.dataConverter, opts.action, header), - policies: (0, schedule_helpers_1.encodeSchedulePolicies)(opts.policies), - state: (0, schedule_helpers_1.encodeScheduleState)(opts.state), - }, - identity: this.options.identity, - requestId: (0, uuid_1.v4)(), - searchAttributes: opts.searchAttributes || opts.typedSearchAttributes // eslint-disable-line @typescript-eslint/no-deprecated - ? { - indexedFields: (0, payload_search_attributes_1.encodeUnifiedSearchAttributes)(opts.searchAttributes, opts.typedSearchAttributes), // eslint-disable-line @typescript-eslint/no-deprecated - } - : undefined, - }; - try { - return await this.workflowService.updateSchedule(req); - } - catch (err) { - this.rethrowGrpcError(err, 'Failed to update schedule', scheduleId); - } - } - /** - * Patch a Schedule. - */ - async _patchSchedule(scheduleId, patch) { - try { - return await this.workflowService.patchSchedule({ - namespace: this.options.namespace, - scheduleId, - identity: this.options.identity, - requestId: (0, uuid_1.v4)(), - patch, - }); - } - catch (err) { - this.rethrowGrpcError(err, 'Failed to patch schedule', scheduleId); - } - } - /** - * Delete a Schedule. - */ - async _deleteSchedule(scheduleId) { - try { - return await this.workflowService.deleteSchedule({ - namespace: this.options.namespace, - identity: this.options.identity, - scheduleId, - }); - } - catch (err) { - this.rethrowGrpcError(err, 'Failed to delete schedule', scheduleId); - } - } - /** - * List Schedules with an `AsyncIterator`: - * - * ```ts - * for await (const schedule: Schedule of client.list()) { - * const { id, memo, searchAttributes } = schedule - * // ... - * } - * ``` - * - * To list one page at a time, instead use the raw gRPC method {@link WorkflowService.listSchedules}: - * - * ```ts - * await { schedules, nextPageToken } = client.scheduleService.listSchedules() - * ``` - */ - async *list(options) { - let nextPageToken = undefined; - for (;;) { - let response; - try { - response = await this.workflowService.listSchedules({ - nextPageToken, - namespace: this.options.namespace, - maximumPageSize: options?.pageSize, - query: options?.query, - }); - } - catch (e) { - this.rethrowGrpcError(e, 'Failed to list schedules', undefined); - } - for (const raw of response.schedules ?? []) { - yield { - scheduleId: raw.scheduleId, - spec: (0, schedule_helpers_1.decodeScheduleSpec)(raw.info?.spec ?? {}), - action: raw.info?.workflowType && { - type: 'startWorkflow', - workflowType: raw.info.workflowType.name, - }, - memo: await (0, internal_non_workflow_1.decodeMapFromPayloads)(this.dataConverter, raw.memo?.fields), - searchAttributes: (0, payload_search_attributes_1.decodeSearchAttributes)(raw.searchAttributes?.indexedFields), - typedSearchAttributes: (0, payload_search_attributes_1.decodeTypedSearchAttributes)(raw.searchAttributes?.indexedFields), - state: { - paused: raw.info?.paused === true, - note: raw.info?.notes ?? undefined, - }, - info: { - recentActions: (0, schedule_helpers_1.decodeScheduleRecentActions)(raw.info?.recentActions), - nextActionTimes: raw.info?.futureActionTimes?.map(time_1.tsToDate) ?? [], - }, - }; - } - if (response.nextPageToken == null || response.nextPageToken.length === 0) - break; - nextPageToken = response.nextPageToken; - } - } - /** - * Get a handle to a Schedule - * - * This method does not validate `scheduleId`. If there is no Schedule with the given `scheduleId`, handle - * methods like `handle.describe()` will throw a {@link ScheduleNotFoundError} error. - */ - getHandle(scheduleId) { - return { - client: this, - scheduleId, - async describe() { - const raw = await this.client._describeSchedule(this.scheduleId); - if (!raw.schedule?.spec || !raw.schedule.action) - throw new Error('Received invalid Schedule description from server'); - return { - scheduleId, - spec: (0, schedule_helpers_1.decodeScheduleSpec)(raw.schedule.spec), - action: await (0, schedule_helpers_1.decodeScheduleAction)(this.client.dataConverter, raw.schedule.action), - memo: await (0, internal_non_workflow_1.decodeMapFromPayloads)(this.client.dataConverter, raw.memo?.fields), - searchAttributes: (0, payload_search_attributes_1.decodeSearchAttributes)(raw.searchAttributes?.indexedFields), - typedSearchAttributes: (0, payload_search_attributes_1.decodeTypedSearchAttributes)(raw.searchAttributes?.indexedFields), - policies: { - // 'overlap' should never be missing on describe, as the server will replace UNSPECIFIED by an actual value - overlap: (0, schedule_types_1.decodeScheduleOverlapPolicy)(raw.schedule.policies?.overlapPolicy) ?? schedule_types_1.ScheduleOverlapPolicy.SKIP, - catchupWindow: (0, time_1.optionalTsToMs)(raw.schedule.policies?.catchupWindow) ?? 60_000, - pauseOnFailure: raw.schedule.policies?.pauseOnFailure === true, - }, - state: { - paused: raw.schedule.state?.paused === true, - note: raw.schedule.state?.notes ?? undefined, - remainingActions: raw.schedule.state?.limitedActions - ? raw.schedule.state?.remainingActions?.toNumber() || 0 - : undefined, - }, - info: { - recentActions: (0, schedule_helpers_1.decodeScheduleRecentActions)(raw.info?.recentActions), - nextActionTimes: raw.info?.futureActionTimes?.map(time_1.tsToDate) ?? [], - createdAt: (0, time_1.requiredTsToDate)(raw.info?.createTime, 'createTime'), - lastUpdatedAt: (0, time_1.optionalTsToDate)(raw.info?.updateTime), - runningActions: (0, schedule_helpers_1.decodeScheduleRunningActions)(raw.info?.runningWorkflows), - numActionsMissedCatchupWindow: raw.info?.missedCatchupWindow?.toNumber() ?? 0, - numActionsSkippedOverlap: raw.info?.overlapSkipped?.toNumber() ?? 0, - numActionsTaken: raw.info?.actionCount?.toNumber() ?? 0, - }, - raw, - }; - }, - async update(updateFn) { - const current = await this.describe(); - // Keep existing headers - const currentHeader = current.raw.schedule?.action?.startWorkflow?.header?.fields ?? {}; - const updated = updateFn(current); - assertRequiredScheduleOptions(updated, 'UPDATE'); - await this.client._updateSchedule(scheduleId, (0, schedule_helpers_1.compileUpdatedScheduleOptions)(scheduleId, updated), currentHeader); - }, - async delete() { - await this.client._deleteSchedule(this.scheduleId); - }, - async pause(note) { - await this.client._patchSchedule(this.scheduleId, { - pause: note ?? 'Paused via TypeScript SDK"', - }); - }, - async unpause(note) { - await this.client._patchSchedule(this.scheduleId, { - unpause: note ?? 'Unpaused via TypeScript SDK"', - }); - }, - async trigger(overlap) { - await this.client._patchSchedule(this.scheduleId, { - triggerImmediately: { - overlapPolicy: overlap - ? (0, schedule_types_1.encodeScheduleOverlapPolicy)(overlap) - : proto_1.temporal.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_ALLOW_ALL, - }, - }); - }, - async backfill(options) { - const backfills = Array.isArray(options) ? options : [options]; - await this.client._patchSchedule(this.scheduleId, { - backfillRequest: backfills.map((x) => ({ - startTime: (0, time_1.optionalDateToTs)(x.start), - endTime: (0, time_1.optionalDateToTs)(x.end), - overlapPolicy: x.overlap ? (0, schedule_types_1.encodeScheduleOverlapPolicy)(x.overlap) : undefined, - })), - }); - }, - }; - } - rethrowGrpcError(err, fallbackMessage, scheduleId) { - if ((0, errors_1.isGrpcServiceError)(err)) { - (0, helpers_1.rethrowKnownErrorTypes)(err); - if (err.code === grpc_js_1.status.NOT_FOUND) { - throw new ScheduleNotFoundError(err.details ?? 'Schedule not found', scheduleId ?? ''); - } - if (err.code === grpc_js_1.status.INVALID_ARGUMENT && - err.message.match(/^3 INVALID_ARGUMENT: Invalid schedule spec: /)) { - throw new TypeError(err.message.replace(/^3 INVALID_ARGUMENT: Invalid schedule spec: /, '')); - } - throw new errors_1.ServiceError(fallbackMessage, { cause: err }); - } - throw new errors_1.ServiceError('Unexpected error while making gRPC request', { cause: err }); - } -} -exports.ScheduleClient = ScheduleClient; -/** - * Thrown from {@link ScheduleClient.create} if there's a running (not deleted) Schedule with the given `id`. - */ -let ScheduleAlreadyRunning = class ScheduleAlreadyRunning extends Error { - scheduleId; - constructor(message, scheduleId) { - super(message); - this.scheduleId = scheduleId; - } -}; -exports.ScheduleAlreadyRunning = ScheduleAlreadyRunning; -exports.ScheduleAlreadyRunning = ScheduleAlreadyRunning = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('ScheduleAlreadyRunning') -], ScheduleAlreadyRunning); -/** - * Thrown when a Schedule with the given Id is not known to Temporal Server. - * It could be because: - * - Id passed is incorrect - * - Schedule was deleted - */ -let ScheduleNotFoundError = class ScheduleNotFoundError extends Error { - scheduleId; - constructor(message, scheduleId) { - super(message); - this.scheduleId = scheduleId; - } -}; -exports.ScheduleNotFoundError = ScheduleNotFoundError; -exports.ScheduleNotFoundError = ScheduleNotFoundError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('ScheduleNotFoundError') -], ScheduleNotFoundError); -//# sourceMappingURL=schedule-client.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/schedule-client.js.map b/node_modules/@temporalio/client/lib/schedule-client.js.map deleted file mode 100644 index d116cdf..0000000 --- a/node_modules/@temporalio/client/lib/schedule-client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schedule-client.js","sourceRoot":"","sources":["../src/schedule-client.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAqD;AACrD,+BAAmC;AAEnC,0GAIoE;AACpE,sEAAmF;AACnF,wFAA0G;AAC1G,gFAAkF;AAClF,6CAA6C;AAC7C,sDAMqC;AACrC,sEAAiF;AAGjF,qCAA4D;AAC5D,qDAY0B;AAC1B,yDAW4B;A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ACvC,qBAAqB,CAOjC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/schedule-helpers.d.ts b/node_modules/@temporalio/client/lib/schedule-helpers.d.ts deleted file mode 100644 index 851c53e..0000000 --- a/node_modules/@temporalio/client/lib/schedule-helpers.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { LoadedDataConverter } from '@temporalio/common'; -import { Headers } from '@temporalio/common/lib/interceptors'; -import { temporal } from '@temporalio/proto'; -import { CalendarSpec, CalendarSpecDescription, CompiledScheduleOptions, CompiledScheduleUpdateOptions, ScheduleOptions, ScheduleUpdateOptions, ScheduleSpec, CompiledScheduleAction, ScheduleSpecDescription, ScheduleDescriptionAction, ScheduleExecutionResult, ScheduleExecutionStartWorkflowActionResult } from './schedule-types'; -export declare function encodeOptionalStructuredCalendarSpecs(input: CalendarSpec[] | null | undefined): temporal.api.schedule.v1.IStructuredCalendarSpec[] | undefined; -export declare function decodeOptionalStructuredCalendarSpecs(input: temporal.api.schedule.v1.IStructuredCalendarSpec[] | null | undefined): CalendarSpecDescription[]; -export declare function compileScheduleOptions(options: ScheduleOptions): CompiledScheduleOptions; -export declare function compileUpdatedScheduleOptions(scheduleId: string, options: ScheduleUpdateOptions): CompiledScheduleUpdateOptions; -export declare function encodeScheduleSpec(spec: ScheduleSpec): temporal.api.schedule.v1.IScheduleSpec; -export declare function encodeScheduleAction(dataConverter: LoadedDataConverter, action: CompiledScheduleAction, headers: Headers): Promise; -export declare function encodeSchedulePolicies(policies?: ScheduleOptions['policies']): temporal.api.schedule.v1.ISchedulePolicies; -export declare function encodeScheduleState(state?: ScheduleOptions['state']): temporal.api.schedule.v1.IScheduleState; -export declare function decodeScheduleSpec(pb: temporal.api.schedule.v1.IScheduleSpec): ScheduleSpecDescription; -export declare function decodeScheduleAction(dataConverter: LoadedDataConverter, pb: temporal.api.schedule.v1.IScheduleAction): Promise; -export declare function decodeScheduleRunningActions(pb?: temporal.api.common.v1.IWorkflowExecution[] | null): ScheduleExecutionStartWorkflowActionResult[]; -export declare function decodeScheduleRecentActions(pb?: temporal.api.schedule.v1.IScheduleActionResult[] | null): ScheduleExecutionResult[]; diff --git a/node_modules/@temporalio/client/lib/schedule-helpers.js b/node_modules/@temporalio/client/lib/schedule-helpers.js deleted file mode 100644 index 887aa54..0000000 --- a/node_modules/@temporalio/client/lib/schedule-helpers.js +++ /dev/null @@ -1,273 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.encodeOptionalStructuredCalendarSpecs = encodeOptionalStructuredCalendarSpecs; -exports.decodeOptionalStructuredCalendarSpecs = decodeOptionalStructuredCalendarSpecs; -exports.compileScheduleOptions = compileScheduleOptions; -exports.compileUpdatedScheduleOptions = compileUpdatedScheduleOptions; -exports.encodeScheduleSpec = encodeScheduleSpec; -exports.encodeScheduleAction = encodeScheduleAction; -exports.encodeSchedulePolicies = encodeSchedulePolicies; -exports.encodeScheduleState = encodeScheduleState; -exports.decodeScheduleSpec = decodeScheduleSpec; -exports.decodeScheduleAction = decodeScheduleAction; -exports.decodeScheduleRunningActions = decodeScheduleRunningActions; -exports.decodeScheduleRecentActions = decodeScheduleRecentActions; -const long_1 = __importDefault(require("long")); -const common_1 = require("@temporalio/common"); -const codec_helpers_1 = require("@temporalio/common/lib/internal-non-workflow/codec-helpers"); -const payload_search_attributes_1 = require("@temporalio/common/lib/converter/payload-search-attributes"); -const internal_non_workflow_1 = require("@temporalio/common/lib/internal-non-workflow"); -const proto_1 = require("@temporalio/proto"); -const time_1 = require("@temporalio/common/lib/time"); -const schedule_types_1 = require("./schedule-types"); -const [encodeSecond, decodeSecond] = makeCalendarSpecFieldCoders('second', (x) => (typeof x === 'number' && x >= 0 && x <= 59 ? x : undefined), (x) => x, [{ start: 0, end: 0, step: 0 }], // default to 0 -[{ start: 0, end: 59, step: 1 }]); -const [encodeMinute, decodeMinue] = makeCalendarSpecFieldCoders('minute', (x) => (typeof x === 'number' && x >= 0 && x <= 59 ? x : undefined), (x) => x, [{ start: 0, end: 0, step: 0 }], // default to 0 -[{ start: 0, end: 59, step: 1 }]); -const [encodeHour, decodeHour] = makeCalendarSpecFieldCoders('hour', (x) => (typeof x === 'number' && x >= 0 && x <= 23 ? x : undefined), (x) => x, [{ start: 0, end: 0, step: 0 }], // default to 0 -[{ start: 0, end: 23, step: 1 }]); -const [encodeDayOfMonth, decodeDayOfMonth] = makeCalendarSpecFieldCoders('dayOfMonth', (x) => (typeof x === 'number' && x >= 0 && x <= 31 ? x : undefined), (x) => x, [{ start: 1, end: 31, step: 1 }], // default to * -[{ start: 1, end: 31, step: 1 }]); -const [encodeMonth, decodeMonth] = makeCalendarSpecFieldCoders('month', function monthNameToNumber(month) { - const index = schedule_types_1.MONTHS.indexOf(month); - return index >= 0 ? index + 1 : undefined; -}, (month) => schedule_types_1.MONTHS[month - 1], [{ start: 1, end: 12, step: 1 }], // default to * -[{ start: 1, end: 12, step: 1 }]); -const [encodeYear, decodeYear] = makeCalendarSpecFieldCoders('year', (x) => (typeof x === 'number' ? x : undefined), (x) => x, [], // default to * -[] // special case: * for years is encoded as no range at all -); -const [encodeDayOfWeek, decodeDayOfWeek] = makeCalendarSpecFieldCoders('dayOfWeek', function dayOfWeekNameToNumber(day) { - const index = schedule_types_1.DAYS_OF_WEEK.indexOf(day); - return index >= 0 ? index : undefined; -}, (day) => schedule_types_1.DAYS_OF_WEEK[day], [{ start: 0, end: 6, step: 1 }], // default to * -[{ start: 0, end: 6, step: 1 }]); -function makeCalendarSpecFieldCoders(fieldName, encodeValueFn, decodeValueFn, defaultValue, matchAllValue) { - function encoder(input) { - if (input === undefined) - return defaultValue; - if (input === '*') - return matchAllValue; - return (Array.isArray(input) ? input : [input]).map((item) => { - if (typeof item === 'object' && item.start !== undefined) { - const range = item; - const start = encodeValueFn(range.start); - if (start !== undefined) { - return { - start, - end: range.end !== undefined ? encodeValueFn(range.end) ?? start : 1, - step: typeof range.step === 'number' && range.step > 0 ? range.step : 1, - }; - } - } - if (item !== undefined) { - const value = encodeValueFn(item); - if (value !== undefined) - return { start: value, end: value, step: 1 }; - } - throw new TypeError(`Invalid CalendarSpec component for field ${fieldName}: '${item}' of type '${typeof item}'`); - }); - } - function decoder(input) { - if (!input) - return []; - return input.map((pb) => { - const start = decodeValueFn(pb.start); - if (start === undefined) { - throw new RangeError(`Invalid CalendarSpec component for field ${fieldName}: ${pb.start} is out of bounds`); - } - const end = pb.end > pb.start ? decodeValueFn(pb.end) ?? start : start; - const step = pb.step > 0 ? pb.step : 1; - return { start, end, step }; - }); - } - return [encoder, decoder]; -} -function encodeOptionalStructuredCalendarSpecs(input) { - if (!input) - return undefined; - return input.map((spec) => ({ - second: encodeSecond(spec.second), - minute: encodeMinute(spec.minute), - hour: encodeHour(spec.hour), - dayOfMonth: encodeDayOfMonth(spec.dayOfMonth), - month: encodeMonth(spec.month), - year: encodeYear(spec.year), - dayOfWeek: encodeDayOfWeek(spec.dayOfWeek), - comment: spec.comment, - })); -} -function decodeOptionalStructuredCalendarSpecs(input) { - if (!input) - return []; - return input.map((pb) => ({ - second: decodeSecond(pb.second), - minute: decodeMinue(pb.minute), - hour: decodeHour(pb.hour), - dayOfMonth: decodeDayOfMonth(pb.dayOfMonth), - month: decodeMonth(pb.month), - year: decodeYear(pb.year), - dayOfWeek: decodeDayOfWeek(pb.dayOfWeek), - comment: pb.comment, - })); -} -function compileScheduleOptions(options) { - const workflowType = (0, common_1.extractWorkflowType)(options.action.workflowType); - return { - ...options, - action: { - ...options.action, - workflowId: options.action.workflowId ?? `${options.scheduleId}-workflow`, - workflowType, - args: (options.action.args ?? []), - }, - }; -} -function compileUpdatedScheduleOptions(scheduleId, options) { - const workflowTypeOrFunc = options.action.workflowType; - const workflowType = (0, common_1.extractWorkflowType)(workflowTypeOrFunc); - return { - ...options, - action: { - ...options.action, - workflowId: options.action.workflowId ?? `${scheduleId}-workflow`, - workflowType, - args: (options.action.args ?? []), - }, - }; -} -function encodeScheduleSpec(spec) { - return { - structuredCalendar: encodeOptionalStructuredCalendarSpecs(spec.calendars), - interval: spec.intervals?.map((interval) => ({ - interval: (0, time_1.msToTs)(interval.every), - phase: (0, time_1.msOptionalToTs)(interval.offset), - })), - cronString: spec.cronExpressions, - excludeStructuredCalendar: encodeOptionalStructuredCalendarSpecs(spec.skip), - startTime: (0, time_1.optionalDateToTs)(spec.startAt), - endTime: (0, time_1.optionalDateToTs)(spec.endAt), - jitter: (0, time_1.msOptionalToTs)(spec.jitter), - timezoneName: spec.timezone, - }; -} -async function encodeScheduleAction(dataConverter, action, headers) { - return { - startWorkflow: { - workflowId: action.workflowId, - workflowType: { - name: action.workflowType, - }, - input: { payloads: await (0, internal_non_workflow_1.encodeToPayloads)(dataConverter, ...action.args) }, - taskQueue: { - kind: proto_1.temporal.api.enums.v1.TaskQueueKind.TASK_QUEUE_KIND_NORMAL, - name: action.taskQueue, - }, - workflowExecutionTimeout: (0, time_1.msOptionalToTs)(action.workflowExecutionTimeout), - workflowRunTimeout: (0, time_1.msOptionalToTs)(action.workflowRunTimeout), - workflowTaskTimeout: (0, time_1.msOptionalToTs)(action.workflowTaskTimeout), - retryPolicy: action.retry ? (0, common_1.compileRetryPolicy)(action.retry) : undefined, - memo: action.memo ? { fields: await (0, internal_non_workflow_1.encodeMapToPayloads)(dataConverter, action.memo) } : undefined, - searchAttributes: action.searchAttributes || action.typedSearchAttributes // eslint-disable-line @typescript-eslint/no-deprecated - ? { - indexedFields: (0, payload_search_attributes_1.encodeUnifiedSearchAttributes)(action.searchAttributes, action.typedSearchAttributes), // eslint-disable-line @typescript-eslint/no-deprecated - } - : undefined, - header: { fields: headers }, - userMetadata: await (0, codec_helpers_1.encodeUserMetadata)(dataConverter, action.staticSummary, action.staticDetails), - priority: action.priority ? (0, common_1.compilePriority)(action.priority) : undefined, - }, - }; -} -function encodeSchedulePolicies(policies) { - return { - catchupWindow: (0, time_1.msOptionalToTs)(policies?.catchupWindow), - overlapPolicy: policies?.overlap ? (0, schedule_types_1.encodeScheduleOverlapPolicy)(policies.overlap) : undefined, - pauseOnFailure: policies?.pauseOnFailure, - }; -} -function encodeScheduleState(state) { - return { - paused: state?.paused, - notes: state?.note, - limitedActions: state?.remainingActions !== undefined, - remainingActions: state?.remainingActions ? long_1.default.fromNumber(state?.remainingActions) : undefined, - }; -} -function decodeScheduleSpec(pb) { - // Note: the server will have compiled calendar and cron_string fields into - // structured_calendar (and maybe interval and timezone_name), so at this - // point, we'll see only structured_calendar, interval, etc. - return { - calendars: decodeOptionalStructuredCalendarSpecs(pb.structuredCalendar), - intervals: (pb.interval ?? []).map((x) => ({ - every: (0, time_1.optionalTsToMs)(x.interval), - offset: (0, time_1.optionalTsToMs)(x.phase), - })), - skip: decodeOptionalStructuredCalendarSpecs(pb.excludeStructuredCalendar), - startAt: (0, time_1.optionalTsToDate)(pb.startTime), - endAt: (0, time_1.optionalTsToDate)(pb.endTime), - jitter: (0, time_1.optionalTsToMs)(pb.jitter), - timezone: pb.timezoneName ?? undefined, - }; -} -async function decodeScheduleAction(dataConverter, pb) { - if (pb.startWorkflow) { - const { staticSummary, staticDetails } = await (0, codec_helpers_1.decodeUserMetadata)(dataConverter, pb.startWorkflow?.userMetadata); - return { - type: 'startWorkflow', - workflowId: pb.startWorkflow.workflowId, - workflowType: pb.startWorkflow.workflowType.name, - taskQueue: pb.startWorkflow.taskQueue.name, - args: await (0, internal_non_workflow_1.decodeArrayFromPayloads)(dataConverter, pb.startWorkflow.input?.payloads), - memo: await (0, internal_non_workflow_1.decodeMapFromPayloads)(dataConverter, pb.startWorkflow.memo?.fields), - retry: (0, common_1.decompileRetryPolicy)(pb.startWorkflow.retryPolicy), - searchAttributes: (0, payload_search_attributes_1.decodeSearchAttributes)(pb.startWorkflow.searchAttributes?.indexedFields), - typedSearchAttributes: (0, payload_search_attributes_1.decodeTypedSearchAttributes)(pb.startWorkflow.searchAttributes?.indexedFields), - workflowExecutionTimeout: (0, time_1.optionalTsToMs)(pb.startWorkflow.workflowExecutionTimeout), - workflowRunTimeout: (0, time_1.optionalTsToMs)(pb.startWorkflow.workflowRunTimeout), - workflowTaskTimeout: (0, time_1.optionalTsToMs)(pb.startWorkflow.workflowTaskTimeout), - staticSummary, - staticDetails, - priority: (0, common_1.decodePriority)(pb.startWorkflow.priority), - }; - } - throw new TypeError('Unsupported schedule action'); -} -function decodeScheduleRunningActions(pb) { - if (!pb) - return []; - return pb.map((x) => ({ - type: 'startWorkflow', - workflow: { - workflowId: x.workflowId, - firstExecutionRunId: x.runId, - }, - })); -} -function decodeScheduleRecentActions(pb) { - if (!pb) - return []; - return pb.map((executionResult) => { - let action; - if (executionResult.startWorkflowResult) { - action = { - type: 'startWorkflow', - workflow: { - workflowId: executionResult.startWorkflowResult.workflowId, - firstExecutionRunId: executionResult.startWorkflowResult.runId, - }, - }; - } - else - throw new TypeError('Unsupported schedule action'); - return { - scheduledAt: (0, time_1.requiredTsToDate)(executionResult.scheduleTime, 'scheduleTime'), - takenAt: (0, time_1.requiredTsToDate)(executionResult.actualTime, 'actualTime'), - action, - }; - }); -} -//# sourceMappingURL=schedule-helpers.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/schedule-helpers.js.map b/node_modules/@temporalio/client/lib/schedule-helpers.js.map deleted file mode 100644 index 4c9208f..0000000 --- a/node_modules/@temporalio/client/lib/schedule-helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schedule-helpers.js","sourceRoot":"","sources":["../src/schedule-helpers.ts"],"names":[],"mappings":";;;;;AAsKA,sFAcC;AAED,sFAiBC;AAED,wDAWC;AAED,sEAeC;AAED,gDAcC;AAED,oDAgCC;AAED,wDAQC;AAED,kDAOC;AAED,gDAmBC;AAED,oDA4BC;AAED,oEAcC;AAED,kEAyBC;AAxYD,gDAAwB;AACxB,+CAO4B;AAC5B,8FAAoH;AACpH,0GAIoE;AAEpE,wFAKsD;AACtD,6CAA6C;AAC7C,sDAOqC;AAC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AAE,IAAA,uBAAc,EAAC,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC;SACpD,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,SAAS,CAAC,6BAA6B,CAAC,CAAC;AACrD,CAAC;AAED,SAAgB,4BAA4B,CAC1C,EAAuD;IAEvD,IAAI,CAAC,EAAE;QAAE,OAAO,EAAE,CAAC;IACnB,OAAO,EAAE,CAAC,GAAG,CACX,CAAC,CAAC,EAA8C,EAAE,CAAC,CAAC;QAClD,IAAI,EAAE,eAAe;QACrB,QAAQ,EAAE;YACR,UAAU,EAAE,CAAC,CAAC,UAAW;YAEzB,mBAAmB,EAAE,CAAC,CAAC,KAAM;SAC9B;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,SAAgB,2BAA2B,CACzC,EAA4D;IAE5D,IAAI,CAAC,EAAE;QAAE,OAAO,EAAE,CAAC;IACnB,OAAQ,EAAiE,CAAC,GAAG,CAC3E,CAAC,eAAe,EAA2B,EAAE;QAC3C,IAAI,MAAiD,CAAC;QACtD,IAAI,eAAe,CAAC,mBAAmB,EAAE,CAAC;YACxC,MAAM,GAAG;gBACP,IAAI,EAAE,eAAe;gBACrB,QAAQ,EAAE;oBACR,UAAU,EAAE,eAAe,CAAC,mBAAoB,CAAC,UAAW;oBAE5D,mBAAmB,EAAE,eAAe,CAAC,mBAAoB,CAAC,KAAM;iBACjE;aACF,CAAC;QACJ,CAAC;;YAAM,MAAM,IAAI,SAAS,CAAC,6BAA6B,CAAC,CAAC;QAE1D,OAAO;YACL,WAAW,EAAE,IAAA,uBAAgB,EAAC,eAAe,CAAC,YAAY,EAAE,cAAc,CAAC;YAC3E,OAAO,EAAE,IAAA,uBAAgB,EAAC,eAAe,CAAC,UAAU,EAAE,YAAY,CAAC;YACnE,MAAM;SACP,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/schedule-types.d.ts b/node_modules/@temporalio/client/lib/schedule-types.d.ts deleted file mode 100644 index f5737d7..0000000 --- a/node_modules/@temporalio/client/lib/schedule-types.d.ts +++ /dev/null @@ -1,718 +0,0 @@ -import { Replace } from '@temporalio/common/lib/type-helpers'; -import { Duration, SearchAttributes, Workflow, TypedSearchAttributes, SearchAttributePair } from '@temporalio/common'; -import type { temporal } from '@temporalio/proto'; -import { WorkflowStartOptions } from './workflow-options'; -/** - * The specification of a Schedule to be created, as expected by {@link ScheduleClient.create}. - */ -export interface ScheduleOptions { - /** - * Schedule Id - * - * We recommend using a meaningful business identifier. - */ - scheduleId: string; - /** - * When Actions should be taken - */ - spec: ScheduleSpec; - /** - * Which Action to take - */ - action: A; - policies?: { - /** - * Controls what happens when an Action would be started by a Schedule at the same time that an older Action is still - * running. This can be changed after a Schedule has taken some Actions, and some changes might produce - * unintuitive results. In general, the later policy overrides the earlier policy. - * - * @default ScheduleOverlapPolicy.SKIP - */ - overlap?: ScheduleOverlapPolicy; - /** - * The Temporal Server might be down or unavailable at the time when a Schedule should take an Action. When the Server - * comes back up, `catchupWindow` controls which missed Actions should be taken at that point. The default is one - * minute, which means that the Schedule attempts to take any Actions that wouldn't be more than one minute late. It - * takes those Actions according to the {@link ScheduleOverlapPolicy}. An outage that lasts longer than the Catchup - * Window could lead to missed Actions. (But you can always {@link ScheduleHandle.backfill}.) - * - * @default 1 year - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - catchupWindow?: Duration; - /** - * When an Action times out or reaches the end of its Retry Policy, {@link pause}. - * - * With {@link ScheduleOverlapPolicy.ALLOW_ALL}, this pause might not apply to the next Action, because the next Action - * might have already started previous to the failed one finishing. Pausing applies only to Actions that are scheduled - * to start after the failed one finishes. - * - * @default false - */ - pauseOnFailure?: boolean; - }; - /** - * Additional non-indexed information attached to the Schedule. The values can be anything that is - * serializable by the {@link DataConverter}. - */ - memo?: Record; - /** - * Additional indexed information attached to the Schedule. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom Data Converter is provided. - * - * @deprecated Use {@link typedSearchAttributes} instead. - */ - searchAttributes?: SearchAttributes; - /** - * Additional indexed information attached to the Schedule. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom Data Converter is provided. - * - * If both {@link searchAttributes} and {@link typedSearchAttributes} are provided, conflicting keys will be overwritten - * by {@link typedSearchAttributes}. - */ - typedSearchAttributes?: SearchAttributePair[] | TypedSearchAttributes; - /** - * The initial state of the schedule, right after creation or update. - */ - state?: { - /** - * Start in paused state. - * - * @default false - */ - paused?: boolean; - /** - * Informative human-readable message with contextual notes, e.g. the reason - * a Schedule is paused. The system may overwrite this message on certain - * conditions, e.g. when pause-on-failure happens. - */ - note?: string; - /** - * Limit the number of Actions to take. - * - * This number is decremented after each Action is taken, and Actions are not - * taken when the number is `0` (unless {@link ScheduleHandle.trigger} is called). - * - * If `undefined`, then no such limit applies. - * - * @default undefined, which allows for unlimited exections - */ - remainingActions?: number; - /** - * Trigger one Action immediately on create. - * - * @default false - */ - triggerImmediately?: boolean; - /** - * Runs though the specified time periods and takes Actions as if that time passed by right now, all at once. The - * overlap policy can be overridden for the scope of the backfill. - */ - backfill?: Backfill[]; - }; -} -export type CompiledScheduleOptions = Replace; -/** - * The specification of an updated Schedule, as expected by {@link ScheduleHandle.update}. - */ -export type ScheduleUpdateOptions = Replace, { - action: A; - state: Omit; -}>; -export type CompiledScheduleUpdateOptions = Replace; -/** - * A summary description of an existing Schedule, as returned by {@link ScheduleClient.list}. - * - * Note that schedule listing is eventual consistent; some returned properties may therefore - * be undefined or incorrect for some time after creating or modifying a schedule. - */ -export interface ScheduleSummary { - /** - * The Schedule Id. We recommend using a meaningful business identifier. - */ - scheduleId: string; - /** - * When will Actions be taken. - */ - spec?: ScheduleSpecDescription; - /** - * The Action that will be taken. - */ - action?: ScheduleSummaryAction; - /** - * Additional non-indexed information attached to the Schedule. - * The values can be anything that is serializable by the {@link DataConverter}. - */ - memo?: Record; - /** - * Additional indexed information attached to the Schedule. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom Data Converter is provided. - * - * @deprecated Use {@link typedSearchAttributes} instead. - */ - searchAttributes?: SearchAttributes; - /** - * Additional indexed information attached to the Schedule. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom Data Converter is provided. - */ - typedSearchAttributes?: TypedSearchAttributes; - state: { - /** - * Whether Schedule is currently paused. - */ - paused: boolean; - /** - * Informative human-readable message with contextual notes, e.g. the reason a Schedule is paused. - * The system may overwrite this message on certain conditions, e.g. when pause-on-failure happens. - */ - note?: string; - }; - info: { - /** - * Most recent actions started (including manual triggers), sorted from older start time to newer. - */ - recentActions: ScheduleExecutionResult[]; - /** - * Next upcoming scheduled times of this Schedule - */ - nextActionTimes: Date[]; - }; -} -export interface ScheduleExecutionResult { - /** Time that the Action was scheduled for, including jitter */ - scheduledAt: Date; - /** Time that the Action was actually taken */ - takenAt: Date; - /** The Action that was taken */ - action: ScheduleExecutionActionResult; -} -export type ScheduleExecutionActionResult = ScheduleExecutionStartWorkflowActionResult; -export interface ScheduleExecutionStartWorkflowActionResult { - type: 'startWorkflow'; - workflow: { - workflowId: string; - /** - * The Run Id of the original execution that was started by the Schedule. If the Workflow retried, did - * Continue-As-New, or was Reset, the following runs would have different Run Ids. - */ - firstExecutionRunId: string; - }; -} -/** - * A detailed description of an exisiting Schedule, as returned by {@link ScheduleHandle.describe}. - */ -export type ScheduleDescription = { - /** - * The Schedule Id. We recommend using a meaningful business identifier. - */ - scheduleId: string; - /** - * When will Actions be taken. - */ - spec: ScheduleSpecDescription; - /** - * The Action that will be taken. - */ - action: ScheduleDescriptionAction; - policies: { - /** - * Controls what happens when an Action would be started by a Schedule at the same time that an older Action is still - * running. - */ - overlap: ScheduleOverlapPolicy; - /** - * The Temporal Server might be down or unavailable at the time when a Schedule should take an Action. - * When the Server comes back up, `catchupWindow` controls which missed Actions should be taken at that point. - * It takes those Actions according to the {@link ScheduleOverlapPolicy}. An outage that lasts longer than the - * Catchup Window could lead to missed Actions. (But you can always {@link ScheduleHandle.backfill}.) - * - * Unit is miliseconds. - */ - catchupWindow: number; - /** - * When an Action times out or reaches the end of its Retry Policy, {@link pause}. - * - * With {@link ScheduleOverlapPolicy.ALLOW_ALL}, this pause might not apply to the next Action, because the next Action - * might have already started previous to the failed one finishing. Pausing applies only to Actions that are scheduled - * to start after the failed one finishes. - */ - pauseOnFailure: boolean; - }; - /** - * Additional non-indexed information attached to the Schedule. - * The values can be anything that is serializable by the {@link DataConverter}. - */ - memo?: Record; - /** - * Additional indexed information attached to the Schedule. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom Data Converter is provided. - * - * @deprecated Use {@link typedSearchAttributes} instead. - */ - searchAttributes: SearchAttributes; - /** - * Additional indexed information attached to the Schedule. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom Data Converter is provided. - */ - typedSearchAttributes: TypedSearchAttributes; - state: { - /** - * Whether Schedule is currently paused. - */ - paused: boolean; - /** - * Informative human-readable message with contextual notes, e.g. the reason a Schedule is paused. - * The system may overwrite this message on certain conditions, e.g. when pause-on-failure happens. - */ - note?: string; - /** - * The Actions remaining in this Schedule. - * Once this number hits `0`, no further Actions are taken (unless {@link ScheduleHandle.trigger} is called). - * - * If `undefined`, then no such limit applies. - */ - remainingActions?: number; - }; - info: { - /** - * Most recent actions started (including manual triggers), sorted from older start time to newer. - */ - recentActions: ScheduleExecutionResult[]; - /** - * Next upcoming scheduled times of this Schedule - */ - nextActionTimes: Date[]; - /** - * Number of Actions taken so far. - */ - numActionsTaken: number; - /** - * Number of times a scheduled Action was skipped due to missing the catchup window. - */ - numActionsMissedCatchupWindow: number; - /** - * Number of Actions skipped due to overlap. - */ - numActionsSkippedOverlap: number; - createdAt: Date; - lastUpdatedAt: Date | undefined; - /** - * Currently-running workflows started by this schedule. (There might be - * more than one if the overlap policy allows overlaps.) - */ - runningActions: ScheduleExecutionActionResult[]; - }; - /** @internal */ - raw: temporal.api.workflowservice.v1.IDescribeScheduleResponse; -}; -/** - * A complete description of a set of absolute times (possibly infinite) that an Action should occur at. - * The times are the union of `calendars`, `intervals`, and `cronExpressions`, minus the `skip` times. These times - * never change, except that the definition of a time zone can change over time (most commonly, when daylight saving - * time policy changes for an area). To create a totally self-contained `ScheduleSpec`, use UTC. - */ -export interface ScheduleSpec { - /** Calendar-based specifications of times. */ - calendars?: CalendarSpec[]; - /** Interval-based specifications of times. */ - intervals?: IntervalSpec[]; - /** - * [Cron expressions](https://crontab.guru/). This is provided for easy migration from legacy Cron Workflows. For new - * use cases, we recommend using {@link calendars} or {@link intervals} for readability and maintainability. - * - * For example, `0 12 * * MON-WED,FRI` is every M/Tu/W/F at noon, and is equivalent to this {@link CalendarSpec}: - * - * ```ts - * { - * hour: 12, - * dayOfWeek: [{ - * start: 'MONDAY' - * end: 'WEDNESDAY' - * }, 'FRIDAY'] - * } - * ``` - * - * The string can have 5, 6, or 7 fields, separated by spaces, and they are interpreted in the - * same way as a {@link CalendarSpec}. - * - * - 5 fields: minute, hour, day_of_month, month, day_of_week - * - 6 fields: minute, hour, day_of_month, month, day_of_week, year - * - 7 fields: second, minute, hour, day_of_month, month, day_of_week, year - * - * Notes: - * - * - If year is not given, it defaults to *. - * - If second is not given, it defaults to 0. - * - Shorthands `@yearly`, `@monthly`, `@weekly`, `@daily`, and `@hourly` are also - * accepted instead of the 5-7 time fields. - * - `@every interval[/]` is accepted and gets compiled into an - * IntervalSpec instead. `` and `` should be a decimal integer - * with a unit suffix s, m, h, or d. - * - Optionally, the string can be preceded by `CRON_TZ=` or - * `TZ=`, which will get copied to {@link timezone}. - * (In which case the {@link timezone} field should be left empty.) - * - Optionally, "#" followed by a comment can appear at the end of the string. - * - Note that the special case that some cron implementations have for - * treating day_of_month and day_of_week as "or" instead of "and" when both - * are set is not implemented. - */ - cronExpressions?: string[]; - /** - * Any matching times will be skipped. - * - * All aspects of the CalendarSpec—including seconds—must match a time for the time to be skipped. - */ - skip?: CalendarSpec[]; - /** - * Any times before `startAt` will be skipped. Together, `startAt` and `endAt` make an inclusive interval. - * - * @default The beginning of time - */ - startAt?: Date; - /** - * Any times after `endAt` will be skipped. - * - * @default The end of time - */ - endAt?: Date; - /** - * All times will be incremented by a random value from 0 to this amount of jitter. - * - * @default 0 - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - jitter?: Duration; - /** - * IANA timezone name, for example `US/Pacific`. - * - * https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - * - * The definition will be loaded by Temporal Server from the environment it runs in. - * - * Calendar spec matching is based on literal matching of the clock time - * with no special handling of DST: if you write a calendar spec that fires - * at 2:30am and specify a time zone that follows DST, that action will not - * be triggered on the day that has no 2:30am. Similarly, an action that - * fires at 1:30am will be triggered twice on the day that has two 1:30s. - * - * Also note that no actions are taken on leap-seconds (e.g. 23:59:60 UTC). - * - * @default UTC - */ - timezone?: string; -} -/** - * The version of {@link ScheduleSpec} that you get back from {@link ScheduleHandle.describe} and {@link ScheduleClient.list} - */ -export type ScheduleSpecDescription = Omit & { - /** Calendar-based specifications of times. */ - calendars?: CalendarSpecDescription[]; - /** Interval-based specifications of times. */ - intervals?: IntervalSpecDescription[]; - /** Any matching times will be skipped. */ - skip?: CalendarSpecDescription[]; - /** - * All times will be incremented by a random value from 0 to this amount of jitter. - * - * @default 1 second - * @format number of milliseconds - */ - jitter?: number; -}; -/** - * An event specification relative to the calendar, similar to a traditional cron specification. - * - * A second in time matches if all fields match. This includes `dayOfMonth` and `dayOfWeek`. - */ -export interface CalendarSpec { - /** - * Valid values: 0–59 - * - * @default 0 - */ - second?: LooseRange | LooseRange[] | '*'; - /** - * Valid values: 0–59 - * - * @default 0 - */ - minute?: LooseRange | LooseRange[] | '*'; - /** - * Valid values: 0–23 - * - * @default 0 - */ - hour?: LooseRange | LooseRange[] | '*'; - /** - * Valid values: 1–31 - * - * @default '*' - */ - dayOfMonth?: LooseRange | LooseRange[] | '*'; - /** - * @default '*' - */ - month?: LooseRange | LooseRange[] | '*'; - /** - * Use full years, like `2030` - * - * @default '*' - */ - year?: LooseRange | LooseRange[] | '*'; - /** - * @default '*' - */ - dayOfWeek?: LooseRange | LooseRange[] | '*'; - /** - * Description of the intention of this spec. - */ - comment?: string; -} -/** - * An event specification relative to the calendar, similar to a traditional cron specification. - * - * A second in time matches if all fields match. This includes `dayOfMonth` and `dayOfWeek`. - */ -export interface CalendarSpecDescription { - /** - * Valid values: 0–59 - * - * @default Match only when second is 0 (ie. `[{ start: 0, end: 0, step: 0 }]`) - */ - second: Range[]; - /** - * Valid values: 0–59 - * - * @default Match only when minute is 0 (ie. `[{ start: 0, end: 0, step: 0 }]`) - */ - minute: Range[]; - /** - * Valid values: 0–23 - * - * @default Match only when hour is 0 (ie. `[{ start: 0, end: 0, step: 0 }]`) - */ - hour: Range[]; - /** - * Valid values: 1–31 - * - * @default Match on any day (ie. `[{ start: 1, end: 31, step: 1 }]`) - */ - dayOfMonth: Range[]; - /** - * Valid values are 'JANUARY' to 'DECEMBER'. - * - * @default Match on any month (ie. `[{ start: 'JANUARY', end: 'DECEMBER', step: 1 }]`) - */ - month: Range[]; - /** - * Use full years, like `2030` - * - * @default Match on any year - */ - year: Range[]; - /** - * Valid values are 'SUNDAY' to 'SATURDAY'. - * - * @default Match on any day of the week (ie. `[{ start: 'SUNDAY', end: 'SATURDAY', step: 1 }]`) - */ - dayOfWeek: Range[]; - /** - * Description of the intention of this spec. - */ - comment?: string; -} -/** - * IntervalSpec matches times that can be expressed as: - * - * `Epoch + (n * every) + offset` - * - * where `n` is all integers ≥ 0. - * - * For example, an `every` of 1 hour with `offset` of zero would match every hour, on the hour. The same `every` but an `offset` - * of 19 minutes would match every `xx:19:00`. An `every` of 28 days with `offset` zero would match `2022-02-17T00:00:00Z` - * (among other times). The same `every` with `offset` of 3 days, 5 hours, and 23 minutes would match `2022-02-20T05:23:00Z` - * instead. - */ -export interface IntervalSpec { - /** - * Value is rounded to the nearest second. - * - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - every: Duration; - /** - * Value is rounded to the nearest second. - * - * @default 0 - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - offset?: Duration; -} -/** - * IntervalSpec matches times that can be expressed as: - * - * `Epoch + (n * every) + offset` - * - * where `n` is all integers ≥ 0. - * - * For example, an `every` of 1 hour with `offset` of zero would match every hour, on the hour. The same `every` but an `offset` - * of 19 minutes would match every `xx:19:00`. An `every` of 28 days with `offset` zero would match `2022-02-17T00:00:00Z` - * (among other times). The same `every` with `offset` of 3 days, 5 hours, and 23 minutes would match `2022-02-20T05:23:00Z` - * instead. - * - * This is the version of {@link IntervalSpec} that you get back from {@link ScheduleHandle.describe} and {@link ScheduleClient.list} - */ -export interface IntervalSpecDescription { - /** - * Value is rounded to the nearest second. - * - * @format number of milliseconds - */ - every: number; - /** - * Value is rounded to the nearest second. - * - * @format number of milliseconds - */ - offset: number; -} -/** - * Range represents a set of values, used to match fields of a calendar. If end < start, then end is - * interpreted as equal to start. Similarly, if step is less than 1, then step is interpreted as 1. - */ -export interface Range { - /** - * Start of range (inclusive) - */ - start: Unit; - /** - * End of range (inclusive) - * - * @default `start` - */ - end: Unit; - /** - * The step to take between each value. - * - * @default 1 - */ - step: number; -} -/** - * A {@link Range} definition, with support for loose syntax. - * - * For example: - * ``` - * 3 ➡️ 3 - * { start: 2 } ➡️ 2 - * { start: 2, end: 4 } ➡️ 2, 3, 4 - * { start: 2, end: 10, step: 3 } ➡️ 2, 5, 8 - * ``` - */ -export type LooseRange = Range | { - start: Range['start']; - end?: Range['end']; - step?: never; -} | Unit; -export declare const MONTHS: readonly ["JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER"]; -export type Month = (typeof MONTHS)[number]; -export declare const DAYS_OF_WEEK: readonly ["SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY"]; -export type DayOfWeek = (typeof DAYS_OF_WEEK)[number]; -export type ScheduleOptionsAction = ScheduleOptionsStartWorkflowAction; -export type ScheduleOptionsStartWorkflowAction = { - type: 'startWorkflow'; - workflowType: string | W; -} & Pick, 'taskQueue' | 'args' | 'memo' | 'searchAttributes' | 'typedSearchAttributes' | 'retry' | 'workflowExecutionTimeout' | 'workflowRunTimeout' | 'workflowTaskTimeout' | 'staticDetails' | 'staticSummary'> & { - /** - * Workflow id to use when starting. Assign a meaningful business id. - * This ID can be used to ensure starting Workflows is idempotent. - * - * @default `${scheduleId}-workflow` - */ - workflowId?: string; -}; -export type ScheduleSummaryAction = ScheduleSummaryStartWorkflowAction; -export interface ScheduleSummaryStartWorkflowAction { - type: 'startWorkflow'; - workflowType: string; -} -export type ScheduleDescriptionAction = ScheduleDescriptionStartWorkflowAction; -export type ScheduleDescriptionStartWorkflowAction = ScheduleSummaryStartWorkflowAction & Pick, 'taskQueue' | 'workflowId' | 'args' | 'memo' | 'searchAttributes' | 'typedSearchAttributes' | 'retry' | 'workflowExecutionTimeout' | 'workflowRunTimeout' | 'workflowTaskTimeout' | 'staticSummary' | 'staticDetails' | 'priority'>; -export type CompiledScheduleAction = Replace; -/** - * Policy for overlapping Actions. - */ -export declare const ScheduleOverlapPolicy: { - /** - * Don't start a new Action. - * @default - */ - readonly SKIP: "SKIP"; - /** - * Start another Action as soon as the current Action completes, but only buffer one Action in this way. If another - * Action is supposed to start, but one Action is running and one is already buffered, then only the buffered one will - * be started after the running Action finishes. - */ - readonly BUFFER_ONE: "BUFFER_ONE"; - /** - * Allows an unlimited number of Actions to buffer. They are started sequentially. - */ - readonly BUFFER_ALL: "BUFFER_ALL"; - /** - * Cancels the running Action, and then starts the new Action once the cancelled one completes. - */ - readonly CANCEL_OTHER: "CANCEL_OTHER"; - /** - * Terminate the running Action and start the new Action immediately. - */ - readonly TERMINATE_OTHER: "TERMINATE_OTHER"; - /** - * Allow any number of Actions to start immediately. - * - * This is the only policy under which multiple Actions can run concurrently. - */ - readonly ALLOW_ALL: "ALLOW_ALL"; - /** - * Use server default (currently SKIP). - * - * @deprecated Either leave property `undefined`, or use {@link SKIP} instead. - */ - readonly UNSPECIFIED: undefined; -}; -export type ScheduleOverlapPolicy = (typeof ScheduleOverlapPolicy)[keyof typeof ScheduleOverlapPolicy]; -export declare const encodeScheduleOverlapPolicy: (input: "SKIP" | "BUFFER_ONE" | "BUFFER_ALL" | "CANCEL_OTHER" | "TERMINATE_OTHER" | "ALLOW_ALL" | temporal.api.enums.v1.ScheduleOverlapPolicy | "SCHEDULE_OVERLAP_POLICY_SKIP" | "SCHEDULE_OVERLAP_POLICY_BUFFER_ONE" | "SCHEDULE_OVERLAP_POLICY_BUFFER_ALL" | "SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER" | "SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER" | "SCHEDULE_OVERLAP_POLICY_ALLOW_ALL" | null | undefined) => temporal.api.enums.v1.ScheduleOverlapPolicy | undefined, decodeScheduleOverlapPolicy: (input: temporal.api.enums.v1.ScheduleOverlapPolicy | null | undefined) => "SKIP" | "BUFFER_ONE" | "BUFFER_ALL" | "CANCEL_OTHER" | "TERMINATE_OTHER" | "ALLOW_ALL" | undefined; -export interface Backfill { - /** - * Start of the time range to evaluate Schedule in. - */ - start: Date; - /** - * End of the time range to evaluate Schedule in. - */ - end: Date; - /** - * Override the Overlap Policy for this request. - * - * @default SKIP - */ - overlap?: ScheduleOverlapPolicy; -} diff --git a/node_modules/@temporalio/client/lib/schedule-types.js b/node_modules/@temporalio/client/lib/schedule-types.js deleted file mode 100644 index 271c34f..0000000 --- a/node_modules/@temporalio/client/lib/schedule-types.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeScheduleOverlapPolicy = exports.encodeScheduleOverlapPolicy = exports.ScheduleOverlapPolicy = exports.DAYS_OF_WEEK = exports.MONTHS = void 0; -const type_helpers_1 = require("@temporalio/common/lib/type-helpers"); -const internal_workflow_1 = require("@temporalio/common/lib/internal-workflow"); -// Invariant: ScheduleDescription contains at least the same fields as ScheduleSummary -(0, type_helpers_1.checkExtends)(); -// Invariant: An existing ScheduleDescription can be used as template to create a new Schedule -(0, type_helpers_1.checkExtends)(); -// Invariant: An existing ScheduleDescription can be used as template to update that Schedule -(0, type_helpers_1.checkExtends)(); -// Invariant: An existing ScheduleSpec can be used as is to create or update a Schedule -(0, type_helpers_1.checkExtends)(); -exports.MONTHS = [ - 'JANUARY', - 'FEBRUARY', - 'MARCH', - 'APRIL', - 'MAY', - 'JUNE', - 'JULY', - 'AUGUST', - 'SEPTEMBER', - 'OCTOBER', - 'NOVEMBER', - 'DECEMBER', -]; -exports.DAYS_OF_WEEK = ['SUNDAY', 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY']; -// Invariant: an existing ScheduleDescriptionAction can be used as is to create or update a schedule -(0, type_helpers_1.checkExtends)(); -/** - * Policy for overlapping Actions. - */ -exports.ScheduleOverlapPolicy = { - /** - * Don't start a new Action. - * @default - */ - SKIP: 'SKIP', - /** - * Start another Action as soon as the current Action completes, but only buffer one Action in this way. If another - * Action is supposed to start, but one Action is running and one is already buffered, then only the buffered one will - * be started after the running Action finishes. - */ - BUFFER_ONE: 'BUFFER_ONE', - /** - * Allows an unlimited number of Actions to buffer. They are started sequentially. - */ - BUFFER_ALL: 'BUFFER_ALL', - /** - * Cancels the running Action, and then starts the new Action once the cancelled one completes. - */ - CANCEL_OTHER: 'CANCEL_OTHER', - /** - * Terminate the running Action and start the new Action immediately. - */ - TERMINATE_OTHER: 'TERMINATE_OTHER', - /** - * Allow any number of Actions to start immediately. - * - * This is the only policy under which multiple Actions can run concurrently. - */ - ALLOW_ALL: 'ALLOW_ALL', - /** - * Use server default (currently SKIP). - * - * @deprecated Either leave property `undefined`, or use {@link SKIP} instead. - */ - UNSPECIFIED: undefined, -}; -_a = (0, internal_workflow_1.makeProtoEnumConverters)({ - [exports.ScheduleOverlapPolicy.SKIP]: 1, - [exports.ScheduleOverlapPolicy.BUFFER_ONE]: 2, - [exports.ScheduleOverlapPolicy.BUFFER_ALL]: 3, - [exports.ScheduleOverlapPolicy.CANCEL_OTHER]: 4, - [exports.ScheduleOverlapPolicy.TERMINATE_OTHER]: 5, - [exports.ScheduleOverlapPolicy.ALLOW_ALL]: 6, - UNSPECIFIED: 0, -}, 'SCHEDULE_OVERLAP_POLICY_'), exports.encodeScheduleOverlapPolicy = _a[0], exports.decodeScheduleOverlapPolicy = _a[1]; -//# sourceMappingURL=schedule-types.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/schedule-types.js.map b/node_modules/@temporalio/client/lib/schedule-types.js.map deleted file mode 100644 index 0bd5860..0000000 --- a/node_modules/@temporalio/client/lib/schedule-types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schedule-types.js","sourceRoot":"","sources":["../src/schedule-types.ts"],"names":[],"mappings":";;;;AAAA,sEAA4E;AAE5E,gFAAmF;AAiYnF,sFAAsF;AACtF,IAAA,2BAAY,GAAwC,CAAC;AAErD,8FAA8F;AAC9F,IAAA,2BAAY,GAAwC,CAAC;AAErD,6FAA6F;AAC7F,IAAA,2BAAY,GAA8C,CAAC;AAqI3D,uFAAuF;AACvF,IAAA,2BAAY,GAAyC,CAAC;AA4NzC,QAAA,MAAM,GAAG;IACpB,SAAS;IACT,UAAU;IACV,OAAO;IACP,OAAO;IACP,KAAK;IACL,MAAM;IACN,MAAM;IACN,QAAQ;IACR,WAAW;IACX,SAAS;IACT,UAAU;IACV,UAAU;CACF,CAAC;AAIE,QAAA,YAAY,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAC;AA2DpH,oGAAoG;AACpG,IAAA,2BAAY,GAAoD,CAAC;AAUjE;;GAEG;AACU,QAAA,qBAAqB,GAAG;IACnC;;;OAGG;IACH,IAAI,EAAE,MAAM;IAEZ;;;;OAIG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;;;OAIG;IACH,SAAS,EAAE,WAAW;IAEtB;;;;OAIG;IACH,WAAW,EAAE,SAAS;CACd,CAAC;AAGE,KAA6D,IAAA,2CAAuB,EAO/F;IACE,CAAC,6BAAqB,CAAC,IAAI,CAAC,EAAE,CAAC;IAC/B,CAAC,6BAAqB,CAAC,UAAU,CAAC,EAAE,CAAC;IACrC,CAAC,6BAAqB,CAAC,UAAU,CAAC,EAAE,CAAC;IACrC,CAAC,6BAAqB,CAAC,YAAY,CAAC,EAAE,CAAC;IACvC,CAAC,6BAAqB,CAAC,eAAe,CAAC,EAAE,CAAC;IAC1C,CAAC,6BAAqB,CAAC,SAAS,CAAC,EAAE,CAAC;IACpC,WAAW,EAAE,CAAC;CACN,EACV,0BAA0B,CAC3B,EAjBa,mCAA2B,UAAE,mCAA2B,SAiBpE"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/task-queue-client.d.ts b/node_modules/@temporalio/client/lib/task-queue-client.d.ts deleted file mode 100644 index 8831df7..0000000 --- a/node_modules/@temporalio/client/lib/task-queue-client.d.ts +++ /dev/null @@ -1,153 +0,0 @@ -import { RequireAtLeastOne } from '@temporalio/common/lib/type-helpers'; -import { temporal } from '@temporalio/proto'; -import { BaseClient, BaseClientOptions, LoadedWithDefaults } from './base-client'; -import { WorkflowService } from './types'; -import { BuildIdOperation, WorkerBuildIdVersionSets } from './build-id-types'; -type GetWorkerTaskReachabilityResponse = temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse; -/** - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export type TaskQueueClientOptions = BaseClientOptions; -/** - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export type LoadedTaskQueueClientOptions = LoadedWithDefaults; -/** - * A stand-in for a Build Id for unversioned Workers - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export declare const UnversionedBuildId: unique symbol; -export type UnversionedBuildIdType = typeof UnversionedBuildId; -/** - * Client for starting Workflow executions and creating Workflow handles - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export declare class TaskQueueClient extends BaseClient { - readonly options: LoadedTaskQueueClientOptions; - constructor(options?: TaskQueueClientOptions); - /** - * Raw gRPC access to the Temporal service. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests - * using this service attribute. - */ - get workflowService(): WorkflowService; - /** - * Used to add new Build Ids or otherwise update the relative compatibility of Build Ids as - * defined on a specific task queue for the Worker Versioning feature. For more on this feature, - * see https://docs.temporal.io/workers#worker-versioning - * - * @param taskQueue The task queue to make changes to. - * @param operation The operation to be performed. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ - updateBuildIdCompatibility(taskQueue: string, operation: BuildIdOperation): Promise; - /** - * Fetch the sets of compatible Build Ids for a given task queue. - * - * @param taskQueue The task queue to fetch the compatibility information for. - * @returns The sets of compatible Build Ids for the given task queue, or undefined if the queue - * has no Build Ids defined on it. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ - getBuildIdCompatability(taskQueue: string): Promise; - /** - * Fetches task reachability to determine whether a worker may be retired. The request may specify - * task queues to query for or let the server fetch all task queues mapped to the given build IDs. - * - * When requesting a large number of task queues or all task queues associated with the given - * build ids in a namespace, all task queues will be listed in the response but some of them may - * not contain reachability information due to a server enforced limit. When reaching the limit, - * task queues that reachability information could not be retrieved for will be marked with a - * `NotFetched` entry in {@link BuildIdReachability.taskQueueReachability}. The caller may issue - * another call to get the reachability for those task queues. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ - getReachability(options: ReachabilityOptions): Promise; - protected rethrowGrpcError(err: unknown, fallbackMessage: string): never; -} -/** - * Options for {@link TaskQueueClient.getReachability} - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export type ReachabilityOptions = RequireAtLeastOne; -/** - * There are different types of reachability: - * - `NEW_WORKFLOWS`: The Build Id might be used by new workflows - * - `EXISTING_WORKFLOWS` The Build Id might be used by open workflows and/or closed workflows. - * - `OPEN_WORKFLOWS` The Build Id might be used by open workflows - * - `CLOSED_WORKFLOWS` The Build Id might be used by closed workflows - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export declare const ReachabilityType: { - /** The Build Id might be used by new workflows. */ - readonly NEW_WORKFLOWS: "NEW_WORKFLOWS"; - /** The Build Id might be used by open workflows and/or closed workflows. */ - readonly EXISTING_WORKFLOWS: "EXISTING_WORKFLOWS"; - /** The Build Id might be used by open workflows. */ - readonly OPEN_WORKFLOWS: "OPEN_WORKFLOWS"; - /** The Build Id might be used by closed workflows. */ - readonly CLOSED_WORKFLOWS: "CLOSED_WORKFLOWS"; -}; -export type ReachabilityType = (typeof ReachabilityType)[keyof typeof ReachabilityType]; -export declare const encodeTaskReachability: (input: temporal.api.enums.v1.TaskReachability | "NEW_WORKFLOWS" | "EXISTING_WORKFLOWS" | "OPEN_WORKFLOWS" | "CLOSED_WORKFLOWS" | "TASK_REACHABILITY_NEW_WORKFLOWS" | "TASK_REACHABILITY_EXISTING_WORKFLOWS" | "TASK_REACHABILITY_OPEN_WORKFLOWS" | "TASK_REACHABILITY_CLOSED_WORKFLOWS" | null | undefined) => temporal.api.enums.v1.TaskReachability | undefined, decodeTaskReachability: (input: temporal.api.enums.v1.TaskReachability | null | undefined) => "NEW_WORKFLOWS" | "EXISTING_WORKFLOWS" | "OPEN_WORKFLOWS" | "CLOSED_WORKFLOWS" | undefined; -/** - * See {@link ReachabilityOptions} - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface BaseReachabilityOptions { - /** - * A list of build ids to query the reachability of. Currently, at least one Build Id must be - * specified, but this restriction may be lifted in the future. - */ - buildIds: (string | UnversionedBuildIdType)[]; - /** - * A list of task queues with Build Ids defined on them that the request is - * concerned with. - */ - taskQueues?: string[]; - /** The kind of reachability this request is concerned with. */ - reachability?: ReachabilityType; -} -/** - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface ReachabilityResponse { - /** Maps Build Ids to their reachability information. */ - buildIdReachability: Record; -} -/** - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export type ReachabilityTypeResponse = ReachabilityType | 'NOT_FETCHED'; -/** - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface BuildIdReachability { - /** - * Maps Task Queue names to how the Build Id may be reachable from them. If they are not - * reachable, the map value will be an empty array. - */ - taskQueueReachability: Record; -} -export declare function reachabilityResponseFromProto(resp: GetWorkerTaskReachabilityResponse): ReachabilityResponse; -/** - * Thrown when one or more Build Ids are not found while using the {@link TaskQueueClient}. - * - * It could be because: - * - Id passed is incorrect - * - Build Id has been scavenged by the server. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export declare class BuildIdNotFoundError extends Error { -} -export {}; diff --git a/node_modules/@temporalio/client/lib/task-queue-client.js b/node_modules/@temporalio/client/lib/task-queue-client.js deleted file mode 100644 index 1adf4f6..0000000 --- a/node_modules/@temporalio/client/lib/task-queue-client.js +++ /dev/null @@ -1,235 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BuildIdNotFoundError = exports.decodeTaskReachability = exports.encodeTaskReachability = exports.ReachabilityType = exports.TaskQueueClient = exports.UnversionedBuildId = void 0; -exports.reachabilityResponseFromProto = reachabilityResponseFromProto; -const grpc_js_1 = require("@grpc/grpc-js"); -const type_helpers_1 = require("@temporalio/common/lib/type-helpers"); -const internal_workflow_1 = require("@temporalio/common/lib/internal-workflow"); -const base_client_1 = require("./base-client"); -const build_id_types_1 = require("./build-id-types"); -const errors_1 = require("./errors"); -const helpers_1 = require("./helpers"); -/** - * A stand-in for a Build Id for unversioned Workers - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -exports.UnversionedBuildId = Symbol.for('__temporal_unversionedBuildId'); -/** - * Client for starting Workflow executions and creating Workflow handles - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -class TaskQueueClient extends base_client_1.BaseClient { - options; - constructor(options) { - super(options); - this.options = { - ...(0, base_client_1.defaultBaseClientOptions)(), - ...(0, internal_workflow_1.filterNullAndUndefined)(options ?? {}), - loadedDataConverter: this.dataConverter, - }; - } - /** - * Raw gRPC access to the Temporal service. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests - * using this service attribute. - */ - get workflowService() { - return this.connection.workflowService; - } - /** - * Used to add new Build Ids or otherwise update the relative compatibility of Build Ids as - * defined on a specific task queue for the Worker Versioning feature. For more on this feature, - * see https://docs.temporal.io/workers#worker-versioning - * - * @param taskQueue The task queue to make changes to. - * @param operation The operation to be performed. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ - async updateBuildIdCompatibility(taskQueue, operation) { - const request = { - namespace: this.options.namespace, - taskQueue, - }; - switch (operation.operation) { - case 'addNewIdInNewDefaultSet': - request.addNewBuildIdInNewDefaultSet = operation.buildId; - break; - case 'addNewCompatibleVersion': - request.addNewCompatibleBuildId = { - newBuildId: operation.buildId, - existingCompatibleBuildId: operation.existingCompatibleBuildId, - }; - break; - case 'promoteSetByBuildId': - request.promoteSetByBuildId = operation.buildId; - break; - case 'promoteBuildIdWithinSet': - request.promoteBuildIdWithinSet = operation.buildId; - break; - case 'mergeSets': - request.mergeSets = { - primarySetBuildId: operation.primaryBuildId, - secondarySetBuildId: operation.secondaryBuildId, - }; - break; - default: - (0, type_helpers_1.assertNever)('Unknown build id update operation', operation); - } - try { - await this.workflowService.updateWorkerBuildIdCompatibility(request); - } - catch (e) { - this.rethrowGrpcError(e, 'Unexpected error updating Build Id compatibility'); - } - } - /** - * Fetch the sets of compatible Build Ids for a given task queue. - * - * @param taskQueue The task queue to fetch the compatibility information for. - * @returns The sets of compatible Build Ids for the given task queue, or undefined if the queue - * has no Build Ids defined on it. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ - async getBuildIdCompatability(taskQueue) { - let resp; - try { - resp = await this.workflowService.getWorkerBuildIdCompatibility({ - taskQueue, - namespace: this.options.namespace, - }); - } - catch (e) { - this.rethrowGrpcError(e, 'Unexpected error fetching Build Id compatibility'); - } - if (resp.majorVersionSets == null || resp.majorVersionSets.length === 0) { - return undefined; - } - return (0, build_id_types_1.versionSetsFromProto)(resp); - } - /** - * Fetches task reachability to determine whether a worker may be retired. The request may specify - * task queues to query for or let the server fetch all task queues mapped to the given build IDs. - * - * When requesting a large number of task queues or all task queues associated with the given - * build ids in a namespace, all task queues will be listed in the response but some of them may - * not contain reachability information due to a server enforced limit. When reaching the limit, - * task queues that reachability information could not be retrieved for will be marked with a - * `NotFetched` entry in {@link BuildIdReachability.taskQueueReachability}. The caller may issue - * another call to get the reachability for those task queues. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ - async getReachability(options) { - let resp; - const buildIds = options.buildIds?.map((bid) => { - if (bid === exports.UnversionedBuildId) { - return ''; - } - return bid; - }); - try { - resp = await this.workflowService.getWorkerTaskReachability({ - namespace: this.options.namespace, - taskQueues: options.taskQueues, - buildIds, - reachability: (0, exports.encodeTaskReachability)(options.reachability), - }); - } - catch (e) { - this.rethrowGrpcError(e, 'Unexpected error fetching Build Id reachability'); - } - return reachabilityResponseFromProto(resp); - } - rethrowGrpcError(err, fallbackMessage) { - if ((0, errors_1.isGrpcServiceError)(err)) { - (0, helpers_1.rethrowKnownErrorTypes)(err); - if (err.code === grpc_js_1.status.NOT_FOUND) { - throw new BuildIdNotFoundError(err.details ?? 'Build Id not found'); - } - throw new errors_1.ServiceError(fallbackMessage, { cause: err }); - } - throw new errors_1.ServiceError('Unexpected error while making gRPC request'); - } -} -exports.TaskQueueClient = TaskQueueClient; -/** - * There are different types of reachability: - * - `NEW_WORKFLOWS`: The Build Id might be used by new workflows - * - `EXISTING_WORKFLOWS` The Build Id might be used by open workflows and/or closed workflows. - * - `OPEN_WORKFLOWS` The Build Id might be used by open workflows - * - `CLOSED_WORKFLOWS` The Build Id might be used by closed workflows - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -exports.ReachabilityType = { - /** The Build Id might be used by new workflows. */ - NEW_WORKFLOWS: 'NEW_WORKFLOWS', - /** The Build Id might be used by open workflows and/or closed workflows. */ - EXISTING_WORKFLOWS: 'EXISTING_WORKFLOWS', - /** The Build Id might be used by open workflows. */ - OPEN_WORKFLOWS: 'OPEN_WORKFLOWS', - /** The Build Id might be used by closed workflows. */ - CLOSED_WORKFLOWS: 'CLOSED_WORKFLOWS', -}; -_a = (0, internal_workflow_1.makeProtoEnumConverters)({ - [exports.ReachabilityType.NEW_WORKFLOWS]: 1, - [exports.ReachabilityType.EXISTING_WORKFLOWS]: 2, - [exports.ReachabilityType.OPEN_WORKFLOWS]: 3, - [exports.ReachabilityType.CLOSED_WORKFLOWS]: 4, - UNSPECIFIED: 0, -}, 'TASK_REACHABILITY_'), exports.encodeTaskReachability = _a[0], exports.decodeTaskReachability = _a[1]; -function reachabilityResponseFromProto(resp) { - return { - buildIdReachability: Object.fromEntries(resp.buildIdReachability.map((bir) => { - const taskQueueReachability = {}; - if (bir.taskQueueReachability != null) { - for (const tqr of bir.taskQueueReachability) { - if (tqr.taskQueue == null) { - continue; - } - if (tqr.reachability == null) { - taskQueueReachability[tqr.taskQueue] = []; - continue; - } - taskQueueReachability[tqr.taskQueue] = tqr.reachability.map((x) => (0, exports.decodeTaskReachability)(x) ?? 'NOT_FETCHED'); - } - } - let bid; - if (bir.buildId) { - bid = bir.buildId; - } - else { - bid = exports.UnversionedBuildId; - } - return [bid, { taskQueueReachability }]; - })), - }; -} -/** - * Thrown when one or more Build Ids are not found while using the {@link TaskQueueClient}. - * - * It could be because: - * - Id passed is incorrect - * - Build Id has been scavenged by the server. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -let BuildIdNotFoundError = class BuildIdNotFoundError extends Error { -}; -exports.BuildIdNotFoundError = BuildIdNotFoundError; -exports.BuildIdNotFoundError = BuildIdNotFoundError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('BuildIdNotFoundError') -], BuildIdNotFoundError); -//# sourceMappingURL=task-queue-client.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/task-queue-client.js.map b/node_modules/@temporalio/client/lib/task-queue-client.js.map deleted file mode 100644 index 95947d2..0000000 --- a/node_modules/@temporalio/client/lib/task-queue-client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"task-queue-client.js","sourceRoot":"","sources":["../src/task-queue-client.ts"],"names":[],"mappings":";;;;;;;;;;AA6QA,sEA6BC;AA1SD,2CAAuC;AACvC,sEAAiH;AACjH,gFAA2G;AAE3G,+CAA4G;AAE5G,qDAAoG;AACpG,qCAA4D;AAC5D,uCAAmD;AAgBnD;;;;GAIG;AACU,QAAA,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;AAG9E;;;;GAIG;AACH,MAAa,eAAgB,SAAQ,wBAAU;IAC7B,OAAO,CAA+B;IAEtD,YAAY,OAAgC;QAC1C,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,OAAO,GAAG;YACb,GAAG,IAAA,sCAAwB,GAAE;YAC7B,GAAG,IAAA,0CAAsB,EAAC,OAAO,IAAI,EAAE,CAAC;YACxC,mBAAmB,EAAE,IAAI,CAAC,aAAa;SACxC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;IACzC,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,0BAA0B,CAAC,SAAiB,EAAE,SAA2B;QACpF,MAAM,OAAO,GAA6C;YACxD,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS;YACjC,SAAS;SACV,CAAC;QACF,QAAQ,SAAS,CAAC,SAAS,EAAE,CAAC;YAC5B,KAAK,yBAAyB;gBAC5B,OAAO,CAAC,4BAA4B,GAAG,SAAS,CAAC,OAAO,CAAC;gBACzD,MAAM;YACR,KAAK,yBAAyB;gBAC5B,OA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,YAAY,CAAC,GAAG,CACzD,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,8BAAsB,EAAC,CAAC,CAAC,IAAI,aAAa,CAClD,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,IAAI,GAAoC,CAAC;YACzC,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;gBAChB,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC;YACpB,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,0BAAkB,CAAC;YAC3B,CAAC;YACD,OAAO,CAAC,GAAG,EAAE,EAAE,qBAAqB,EAAE,CAAC,CAAC;QAC1C,CAAC,CAAC,CAC6D;KAClE,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,KAAK;CAAG,CAAA;AAArC,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,yCAA0B,EAAC,sBAAsB,CAAC;GACtC,oBAAoB,CAAiB"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/types.d.ts b/node_modules/@temporalio/client/lib/types.d.ts deleted file mode 100644 index f7aa0f4..0000000 --- a/node_modules/@temporalio/client/lib/types.d.ts +++ /dev/null @@ -1,165 +0,0 @@ -import type * as grpc from '@grpc/grpc-js'; -import type { TypedSearchAttributes, SearchAttributes, SearchAttributeValue, Priority } from '@temporalio/common'; -import * as proto from '@temporalio/proto'; -import { Replace } from '@temporalio/common/lib/type-helpers'; -import type { ConnectionPlugin } from './connection'; -export interface WorkflowExecution { - workflowId: string; - runId?: string; -} -export type StartWorkflowExecutionRequest = proto.temporal.api.workflowservice.v1.IStartWorkflowExecutionRequest; -export type GetWorkflowExecutionHistoryRequest = proto.temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryRequest; -export type DescribeWorkflowExecutionResponse = proto.temporal.api.workflowservice.v1.IDescribeWorkflowExecutionResponse; -export type RawWorkflowExecutionInfo = proto.temporal.api.workflow.v1.IWorkflowExecutionInfo; -export type TerminateWorkflowExecutionResponse = proto.temporal.api.workflowservice.v1.ITerminateWorkflowExecutionResponse; -export type RequestCancelWorkflowExecutionResponse = proto.temporal.api.workflowservice.v1.IRequestCancelWorkflowExecutionResponse; -export type WorkflowExecutionStatusName = 'UNSPECIFIED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'TERMINATED' | 'CONTINUED_AS_NEW' | 'TIMED_OUT' | 'PAUSED' | 'UNKNOWN'; -export interface WorkflowExecutionInfo { - type: string; - workflowId: string; - runId: string; - taskQueue: string; - status: { - code: proto.temporal.api.enums.v1.WorkflowExecutionStatus; - name: WorkflowExecutionStatusName; - }; - historyLength: number; - /** -  * Size of Workflow history in bytes. -  * -  * This value is only available in server versions >= 1.20 -  */ - historySize?: number; - startTime: Date; - executionTime?: Date; - closeTime?: Date; - memo?: Record; - /** @deprecated Use {@link typedSearchAttributes} instead. */ - searchAttributes: SearchAttributes; - typedSearchAttributes: TypedSearchAttributes; - parentExecution?: Required; - rootExecution?: Required; - raw: RawWorkflowExecutionInfo; - priority?: Priority; -} -export interface CountWorkflowExecution { - count: number; - groups: { - count: number; - groupValues: SearchAttributeValue[]; - }[]; -} -export type WorkflowExecutionDescription = Replace & { - /** - * General fixed details for this workflow execution that may appear in UI/CLI. - * This can be in Temporal markdown format and can span multiple lines. - * - * @experimental User metadata is a new API and susceptible to change. - */ - staticDetails: () => Promise; - /** - * A single-line fixed summary for this workflow execution that may appear in the UI/CLI. - * This can be in single-line Temporal markdown format. - * - * @experimental User metadata is a new API and susceptible to change. - */ - staticSummary: () => Promise; -}; -export type WorkflowService = proto.temporal.api.workflowservice.v1.WorkflowService; -export declare const WorkflowService: typeof proto.temporal.api.workflowservice.v1.WorkflowService; -export type OperatorService = proto.temporal.api.operatorservice.v1.OperatorService; -export declare const OperatorService: typeof proto.temporal.api.operatorservice.v1.OperatorService; -export type TestService = proto.temporal.api.testservice.v1.TestService; -export declare const TestService: typeof proto.temporal.api.testservice.v1.TestService; -export type HealthService = proto.grpc.health.v1.Health; -export declare const HealthService: typeof proto.grpc.health.v1.Health; -/** - * Mapping of string to valid gRPC metadata value - */ -export type Metadata = Record; -/** - * User defined context for gRPC client calls - */ -export interface CallContext { - /** - * {@link Deadline | https://grpc.io/blog/deadlines/} for gRPC client calls - */ - deadline?: number | Date; - /** - * Metadata to set on gRPC requests - */ - metadata?: Metadata; - abortSignal?: AbortSignal; -} -/** - * Connection interface used by high level SDK clients. - */ -export interface ConnectionLike { - workflowService: WorkflowService; - operatorService: OperatorService; - plugins: ConnectionPlugin[]; - close(): Promise; - ensureConnected(): Promise; - /** - * Set a deadline for any service requests executed in `fn`'s scope. - * - * The deadline is a point in time after which any pending gRPC request will be considered as failed; - * this will locally result in the request call throwing a {@link grpc.ServiceError|ServiceError} - * with code {@link grpc.status.DEADLINE_EXCEEDED|DEADLINE_EXCEEDED}; see {@link isGrpcDeadlineError}. - * - * It is stronly recommended to explicitly set deadlines. If no deadline is set, then it is - * possible for the client to end up waiting forever for a response. - * - * This method is only a convenience wrapper around {@link Connection.withDeadline}. - * - * @param deadline a point in time after which the request will be considered as failed; either a - * Date object, or a number of milliseconds since the Unix epoch (UTC). - * @returns the value returned from `fn` - * - * @see https://grpc.io/docs/guides/deadlines/ - */ - withDeadline(deadline: number | Date, fn: () => Promise): Promise; - /** - * Set metadata for any service requests executed in `fn`'s scope. - * - * @returns returned value of `fn` - */ - withMetadata(metadata: Metadata, fn: () => Promise): Promise; - /** - * Set an {@link AbortSignal} that, when aborted, cancels any ongoing service requests executed in - * `fn`'s scope. This will locally result in the request call throwing a {@link grpc.ServiceError|ServiceError} - * with code {@link grpc.status.CANCELLED|CANCELLED}; see {@link isGrpcCancelledError}. - * - * @returns value returned from `fn` - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal - */ - withAbortSignal(abortSignal: AbortSignal, fn: () => Promise): Promise; -} -export declare const InternalConnectionLikeSymbol: unique symbol; -export type InternalConnectionLike = ConnectionLike & { - [InternalConnectionLikeSymbol]?: { - /** - * Capability flag that determines whether the connection supports eager workflow start. - * This will only be true if the underlying connection is a {@link NativeConnection}. - */ - readonly supportsEagerStart?: boolean; - }; -}; -export declare const QueryRejectCondition: { - readonly NONE: "NONE"; - readonly NOT_OPEN: "NOT_OPEN"; - readonly NOT_COMPLETED_CLEANLY: "NOT_COMPLETED_CLEANLY"; - /** @deprecated Use {@link NONE} instead. */ - readonly QUERY_REJECT_CONDITION_NONE: "NONE"; - /** @deprecated Use {@link NOT_OPEN} instead. */ - readonly QUERY_REJECT_CONDITION_NOT_OPEN: "NOT_OPEN"; - /** @deprecated Use {@link NOT_COMPLETED_CLEANLY} instead. */ - readonly QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY: "NOT_COMPLETED_CLEANLY"; - /** @deprecated Use `undefined` instead. */ - readonly QUERY_REJECT_CONDITION_UNSPECIFIED: undefined; -}; -export type QueryRejectCondition = (typeof QueryRejectCondition)[keyof typeof QueryRejectCondition]; -export declare const encodeQueryRejectCondition: (input: "NONE" | "NOT_OPEN" | "NOT_COMPLETED_CLEANLY" | "QUERY_REJECT_CONDITION_NONE" | "QUERY_REJECT_CONDITION_NOT_OPEN" | "QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY" | proto.temporal.api.enums.v1.QueryRejectCondition | null | undefined) => proto.temporal.api.enums.v1.QueryRejectCondition | undefined, decodeQueryRejectCondition: (input: proto.temporal.api.enums.v1.QueryRejectCondition | null | undefined) => "NONE" | "NOT_OPEN" | "NOT_COMPLETED_CLEANLY" | undefined; diff --git a/node_modules/@temporalio/client/lib/types.js b/node_modules/@temporalio/client/lib/types.js deleted file mode 100644 index b9ddb4a..0000000 --- a/node_modules/@temporalio/client/lib/types.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeQueryRejectCondition = exports.encodeQueryRejectCondition = exports.QueryRejectCondition = exports.InternalConnectionLikeSymbol = exports.HealthService = exports.TestService = exports.OperatorService = exports.WorkflowService = void 0; -const internal_workflow_1 = require("@temporalio/common/lib/internal-workflow"); -const proto = __importStar(require("@temporalio/proto")); -exports.WorkflowService = proto.temporal.api.workflowservice.v1.WorkflowService; -exports.OperatorService = proto.temporal.api.operatorservice.v1.OperatorService; -exports.TestService = proto.temporal.api.testservice.v1.TestService; -exports.HealthService = proto.grpc.health.v1.Health; -exports.InternalConnectionLikeSymbol = Symbol('__temporal_internal_connection_like'); -exports.QueryRejectCondition = { - NONE: 'NONE', - NOT_OPEN: 'NOT_OPEN', - NOT_COMPLETED_CLEANLY: 'NOT_COMPLETED_CLEANLY', - /** @deprecated Use {@link NONE} instead. */ - QUERY_REJECT_CONDITION_NONE: 'NONE', - /** @deprecated Use {@link NOT_OPEN} instead. */ - QUERY_REJECT_CONDITION_NOT_OPEN: 'NOT_OPEN', - /** @deprecated Use {@link NOT_COMPLETED_CLEANLY} instead. */ - QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY: 'NOT_COMPLETED_CLEANLY', - /** @deprecated Use `undefined` instead. */ - QUERY_REJECT_CONDITION_UNSPECIFIED: undefined, -}; -_a = (0, internal_workflow_1.makeProtoEnumConverters)({ - [exports.QueryRejectCondition.NONE]: 1, - [exports.QueryRejectCondition.NOT_OPEN]: 2, - [exports.QueryRejectCondition.NOT_COMPLETED_CLEANLY]: 3, - UNSPECIFIED: 0, -}, 'QUERY_REJECT_CONDITION_'), exports.encodeQueryRejectCondition = _a[0], exports.decodeQueryRejectCondition = _a[1]; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/types.js.map b/node_modules/@temporalio/client/lib/types.js.map deleted file mode 100644 index a272390..0000000 --- a/node_modules/@temporalio/client/lib/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,gFAAmF;AACnF,yDAA2C;AAyF5B,uBAAe,GAAK,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,iBAAC;AAE1D,uBAAe,GAAK,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,iBAAC;AAE1D,mBAAW,GAAK,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,aAAC;AAE1C,qBAAa,GAAK,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,QAAC;AAwEjD,QAAA,4BAA4B,GAAG,MAAM,CAAC,qCAAqC,CAAC,CAAC;AAW7E,QAAA,oBAAoB,GAAG;IAClC,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,qBAAqB,EAAE,uBAAuB;IAE9C,4CAA4C;IAC5C,2BAA2B,EAAE,MAAM;IAEnC,gDAAgD;IAChD,+BAA+B,EAAE,UAAU;IAE3C,6DAA6D;IAC7D,4CAA4C,EAAE,uBAAuB;IAErE,2CAA2C;IAC3C,kCAAkC,EAAE,SAAS;CACrC,CAAC;AAGE,KAA2D,IAAA,2CAAuB,EAO7F;IACE,CAAC,4BAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;IAC9B,CAAC,4BAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC;IAClC,CAAC,4BAAoB,CAAC,qBAAqB,CAAC,EAAE,CAAC;IAC/C,WAAW,EAAE,CAAC;CACN,EACV,yBAAyB,CAC1B,EAda,kCAA0B,UAAE,kCAA0B,SAclE"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/workflow-client.d.ts b/node_modules/@temporalio/client/lib/workflow-client.d.ts deleted file mode 100644 index 6fbbec6..0000000 --- a/node_modules/@temporalio/client/lib/workflow-client.d.ts +++ /dev/null @@ -1,554 +0,0 @@ -import { status as grpcStatus } from '@grpc/grpc-js'; -import { BaseWorkflowHandle, HistoryAndWorkflowId, QueryDefinition, UpdateDefinition, WithWorkflowArgs, Workflow, WorkflowResultType, WorkflowIdConflictPolicy } from '@temporalio/common'; -import { History } from '@temporalio/common/lib/proto-utils'; -import { temporal } from '@temporalio/proto'; -import { WorkflowCancelInput, WorkflowClientInterceptor, WorkflowClientInterceptors, WorkflowDescribeInput, WorkflowQueryInput, WorkflowSignalInput, WorkflowSignalWithStartInput, WorkflowStartInput, WorkflowTerminateInput, WorkflowStartUpdateInput, WorkflowStartUpdateOutput, WorkflowStartUpdateWithStartInput, WorkflowStartUpdateWithStartOutput, WorkflowStartOutput } from './interceptors'; -import { CountWorkflowExecution, DescribeWorkflowExecutionResponse, QueryRejectCondition, RequestCancelWorkflowExecutionResponse, StartWorkflowExecutionRequest, TerminateWorkflowExecutionResponse, WorkflowExecution, WorkflowExecutionDescription, WorkflowExecutionInfo, WorkflowService } from './types'; -import { WorkflowSignalWithStartOptions, WorkflowStartOptions, WorkflowUpdateOptions } from './workflow-options'; -import { BaseClient, BaseClientOptions, LoadedWithDefaults } from './base-client'; -import { WorkflowUpdateStage } from './workflow-update-stage'; -/** - * A client side handle to a single Workflow instance. - * It can be used to start, signal, query, wait for completion, terminate and cancel a Workflow execution. - * - * Given the following Workflow definition: - * ```ts - * export const incrementSignal = defineSignal<[number]>('increment'); - * export const getValueQuery = defineQuery('getValue'); - * export const incrementAndGetValueUpdate = defineUpdate('incrementAndGetValue'); - * export async function counterWorkflow(initialValue: number): Promise; - * ``` - * - * Create a handle for running and interacting with a single Workflow: - * ```ts - * const client = new WorkflowClient(); - * // Start the Workflow with initialValue of 2. - * const handle = await client.start({ - * workflowType: counterWorkflow, - * args: [2], - * taskQueue: 'tutorial', - * }); - * await handle.signal(incrementSignal, 2); - * const queryResult = await handle.query(getValueQuery); // 4 - * const firstUpdateResult = await handle.executeUpdate(incrementAndGetValueUpdate, { args: [2] }); // 6 - * const secondUpdateHandle = await handle.startUpdate(incrementAndGetValueUpdate, { args: [2] }); - * const secondUpdateResult = await secondUpdateHandle.result(); // 8 - * await handle.cancel(); - * await handle.result(); // throws a WorkflowFailedError with `cause` set to a CancelledFailure. - * ``` - */ -export interface WorkflowHandle extends BaseWorkflowHandle { - /** - * Start an Update and wait for the result. - * - * @throws {@link WorkflowUpdateFailedError} if Update validation fails or if ApplicationFailure is thrown in the Update handler. - * @throws {@link WorkflowUpdateRPCTimeoutOrCancelledError} if this Update call timed out or was cancelled. This doesn't - * mean the update itself was timed out or cancelled. - * @param def an Update definition as returned from {@link defineUpdate} - * @param options Update arguments - * - * @example - * ```ts - * const updateResult = await handle.executeUpdate(incrementAndGetValueUpdate, { args: [2] }); - * ``` - */ - executeUpdate(def: UpdateDefinition | string, options: WorkflowUpdateOptions & { - args: Args; - }): Promise; - executeUpdate(def: UpdateDefinition | string, options?: WorkflowUpdateOptions & { - args?: Args; - }): Promise; - /** - * Start an Update and receive a handle to the Update. The Update validator (if present) is run - * before the handle is returned. - * - * @throws {@link WorkflowUpdateFailedError} if Update validation fails. - * @throws {@link WorkflowUpdateRPCTimeoutOrCancelledError} if this Update call timed out or was cancelled. This doesn't - * mean the update itself was timed out or cancelled. - * - * @param def an Update definition as returned from {@link defineUpdate} - * @param options update arguments, and update lifecycle stage to wait for - * - * Currently, startUpdate always waits until a worker is accepting tasks for the workflow and the - * update is accepted or rejected, and the options object must be at least - * ```ts - * { - * waitForStage: WorkflowUpdateStage.ACCEPTED - * } - * ``` - * If the update takes arguments, then the options object must additionally contain an `args` - * property with an array of argument values. - * - * @example - * ```ts - * const updateHandle = await handle.startUpdate(incrementAndGetValueUpdate, { - * args: [2], - * waitForStage: 'ACCEPTED', - * }); - * const updateResult = await updateHandle.result(); - * ``` - */ - startUpdate(def: UpdateDefinition | string, options: WorkflowUpdateOptions & { - args: Args; - waitForStage: 'ACCEPTED'; - }): Promise>; - startUpdate(def: UpdateDefinition | string, options: WorkflowUpdateOptions & { - args?: Args; - waitForStage: typeof WorkflowUpdateStage.ACCEPTED; - }): Promise>; - /** - * Get a handle to an Update of this Workflow. - */ - getUpdateHandle(updateId: string): WorkflowUpdateHandle; - /** - * Query a running or completed Workflow. - * - * @param def a query definition as returned from {@link defineQuery} or query name (string) - * - * @example - * ```ts - * await handle.query(getValueQuery); - * await handle.query('getValue'); - * ``` - */ - query(def: QueryDefinition | string, ...args: Args): Promise; - /** - * Terminate a running Workflow - */ - terminate(reason?: string): Promise; - /** - * Cancel a running Workflow. - * - * When a Workflow is cancelled, the root scope throws {@link CancelledFailure} with `message: 'Workflow canceled'`. - * That means that all cancellable scopes will throw `CancelledFailure`. - * - * Cancellation may be propagated to Activities depending on {@link ActivityOptions#cancellationType}, after which - * Activity calls may throw an {@link ActivityFailure}, and `isCancellation(error)` will be true (see {@link isCancellation}). - * - * Cancellation may be propagated to Child Workflows depending on {@link ChildWorkflowOptions#cancellationType}, after - * which calls to {@link executeChild} and {@link ChildWorkflowHandle#result} will throw, and `isCancellation(error)` - * will be true (see {@link isCancellation}). - */ - cancel(): Promise; - /** - * Describe the current workflow execution - */ - describe(): Promise; - /** - * Return a workflow execution's history - */ - fetchHistory(): Promise; - /** - * Readonly accessor to the underlying WorkflowClient - */ - readonly client: WorkflowClient; -} -/** - * This interface is exactly the same as {@link WorkflowHandle} except it - * includes the `firstExecutionRunId` returned from {@link WorkflowClient.start}. - */ -export interface WorkflowHandleWithFirstExecutionRunId extends WorkflowHandle { - /** - * Run Id of the first Execution in the Workflow Execution Chain. - */ - readonly firstExecutionRunId: string; -} -/** - * This interface is exactly the same as {@link WorkflowHandleWithFirstExecutionRunId} except it - * includes the `eagerlyStarted` returned from {@link WorkflowClient.start}. - */ -export interface WorkflowHandleWithStartDetails extends WorkflowHandleWithFirstExecutionRunId { - readonly eagerlyStarted: boolean; -} -/** - * This interface is exactly the same as {@link WorkflowHandle} except it - * includes the `signaledRunId` returned from `signalWithStart`. - */ -export interface WorkflowHandleWithSignaledRunId extends WorkflowHandle { - /** - * The Run Id of the bound Workflow at the time of {@link WorkflowClient.signalWithStart}. - * - * Since `signalWithStart` may have signaled an existing Workflow Chain, `signaledRunId` might not be the - * `firstExecutionRunId`. - */ - readonly signaledRunId: string; -} -export interface WorkflowClientOptions extends BaseClientOptions { - /** - * Used to override and extend default Connection functionality - * - * Useful for injecting auth headers and tracing Workflow executions - */ - interceptors?: WorkflowClientInterceptors | WorkflowClientInterceptor[]; - /** - * Should a query be rejected by closed and failed workflows - * - * @default `undefined` which means that closed and failed workflows are still queryable - */ - queryRejectCondition?: QueryRejectCondition; -} -export type LoadedWorkflowClientOptions = LoadedWithDefaults; -/** - * Options for getting a result of a Workflow execution. - */ -export interface WorkflowResultOptions { - /** - * If set to true, instructs the client to follow the chain of execution before returning a Workflow's result. - * - * Workflow execution is chained if the Workflow has a cron schedule or continues-as-new or configured to retry - * after failure or timeout. - * - * @default true - */ - followRuns?: boolean; -} -/** - * Options for {@link WorkflowClient.getHandle} - */ -export interface GetWorkflowHandleOptions extends WorkflowResultOptions { - /** - * ID of the first execution in the Workflow execution chain. - * - * When getting a handle with no `runId`, pass this option to ensure some - * {@link WorkflowHandle} methods (e.g. `terminate` and `cancel`) don't - * affect executions from another chain. - */ - firstExecutionRunId?: string; -} -interface WorkflowHandleOptions extends GetWorkflowHandleOptions { - workflowId: string; - runId?: string; - interceptors: WorkflowClientInterceptor[]; - /** - * A runId to use for getting the workflow's result. - * - * - When creating a handle using `getHandle`, uses the provided runId or firstExecutionRunId - * - When creating a handle using `start`, uses the returned runId (first in the chain) - * - When creating a handle using `signalWithStart`, uses the the returned runId - */ - runIdForResult?: string; -} -/** - * An iterable list of WorkflowExecution, as returned by {@link WorkflowClient.list}. - */ -export interface AsyncWorkflowListIterable extends AsyncIterable { - /** - * Return an iterable of histories corresponding to this iterable's WorkflowExecutions. - * Workflow histories will be fetched concurrently. - * - * Useful in batch replaying - */ - intoHistories: (intoHistoriesOptions?: IntoHistoriesOptions) => AsyncIterable; -} -/** - * A client-side handle to an Update. - */ -export interface WorkflowUpdateHandle { - /** - * The ID of this Update request. - */ - updateId: string; - /** - * The ID of the Workflow being targeted by this Update request. - */ - workflowId: string; - /** - * The ID of the Run of the Workflow being targeted by this Update request. - */ - workflowRunId?: string; - /** - * Return the result of the Update. - * @throws {@link WorkflowUpdateFailedError} if ApplicationFailure is thrown in the Update handler. - */ - result(): Promise; -} -/** - * Options for {@link WorkflowHandle.getUpdateHandle} - */ -export interface GetWorkflowUpdateHandleOptions { - /** - * The ID of the Run of the Workflow targeted by the Update. - */ - workflowRunId?: string; -} -/** - * Options for {@link WorkflowClient.list} - */ -export interface ListOptions { - /** - * Maximum number of results to fetch per page. - * - * @default depends on server config, typically 1000 - */ - pageSize?: number; - /** - * Query string for matching and ordering the results - */ - query?: string; -} -/** - * Options for {@link WorkflowClient.list().intoHistories()} - */ -export interface IntoHistoriesOptions { - /** - * Maximum number of workflow histories to download concurrently. - * - * @default 5 - */ - concurrency?: number; - /** - * Maximum number of workflow histories to buffer ahead, ready for consumption. - * - * It is recommended to set `bufferLimit` to a rasonnably low number if it is expected that the - * iterable may be stopped before reaching completion (for example, when implementing a fail fast - * bach replay test). - * - * Ignored unless `concurrency > 1`. No limit applies if set to `undefined`. - * - * @default unlimited - */ - bufferLimit?: number; -} -declare const withStartWorkflowOperationResolve: unique symbol; -declare const withStartWorkflowOperationReject: unique symbol; -declare const withStartWorkflowOperationUsed: unique symbol; -/** - * Define how to start a workflow when using {@link WorkflowClient.startUpdateWithStart} and - * {@link WorkflowClient.executeUpdateWithStart}. `workflowIdConflictPolicy` is required in the options. - */ -export declare class WithStartWorkflowOperation { - workflowTypeOrFunc: string | T; - options: WorkflowStartOptions & { - workflowIdConflictPolicy: WorkflowIdConflictPolicy; - }; - private [withStartWorkflowOperationUsed]; - private [withStartWorkflowOperationResolve]; - private [withStartWorkflowOperationReject]; - private workflowHandlePromise; - constructor(workflowTypeOrFunc: string | T, options: WorkflowStartOptions & { - workflowIdConflictPolicy: WorkflowIdConflictPolicy; - }); - workflowHandle(): Promise>; -} -/** - * Client for starting Workflow executions and creating Workflow handles. - * - * Typically this client should not be instantiated directly, instead create the high level {@link Client} and use - * {@link Client.workflow} to interact with Workflows. - */ -export declare class WorkflowClient extends BaseClient { - readonly options: LoadedWorkflowClientOptions; - constructor(options?: WorkflowClientOptions); - /** - * Raw gRPC access to the Temporal service. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests made via this service - * object. - */ - get workflowService(): WorkflowService; - protected _start(workflowTypeOrFunc: string | T, options: WorkflowStartOptions, interceptors: WorkflowClientInterceptor[]): Promise; - protected _signalWithStart(workflowTypeOrFunc: string | T, options: WithWorkflowArgs>, interceptors: WorkflowClientInterceptor[]): Promise; - /** - * Start a new Workflow execution. - * - * @returns a {@link WorkflowHandle} to the started Workflow - */ - start(workflowTypeOrFunc: string | T, options: WorkflowStartOptions): Promise>; - /** - * Start a new Workflow Execution and immediately send a Signal to that Workflow. - * - * The behavior of Signal-with-Start in the case where there is already a running Workflow with - * the given Workflow ID depends on the {@link WorkflowIDConflictPolicy}. That is, if the policy - * is `USE_EXISTING`, then the Signal is issued against the already existing Workflow Execution; - * however, if the policy is `FAIL`, then an error is thrown. If no policy is specified, - * Signal-with-Start defaults to `USE_EXISTING`. - * - * @returns a {@link WorkflowHandle} to the started Workflow - */ - signalWithStart(workflowTypeOrFunc: string | WorkflowFn, options: WithWorkflowArgs>): Promise>; - /** - * Start a new Workflow Execution and immediately send an Update to that Workflow, - * then await and return the Update's result. - * - * The `updateOptions` object must contain a {@link WithStartWorkflowOperation}, which defines - * the options for the Workflow execution to start (e.g. the Workflow's type, task queue, input - * arguments, etc.) - * - * The behavior of Update-with-Start in the case where there is already a running Workflow with - * the given Workflow ID depends on the specified {@link WorkflowIDConflictPolicy}. That is, if - * the policy is `USE_EXISTING`, then the Update is issued against the already existing Workflow - * Execution; however, if the policy is `FAIL`, then an error is thrown. Caller MUST specify - * the desired WorkflowIDConflictPolicy. - * - * This call will block until the Update has completed. The Workflow handle can be retrieved by - * awaiting on {@link WithStartWorkflowOperation.workflowHandle}, whether or not the Update - * succeeds. - * - * @returns the Update result - */ - executeUpdateWithStart(updateDef: UpdateDefinition | string, updateOptions: WorkflowUpdateOptions & { - args?: Args; - startWorkflowOperation: WithStartWorkflowOperation; - }): Promise; - /** - * Start a new Workflow Execution and immediately send an Update to that Workflow, - * then return a {@link WorkflowUpdateHandle} for that Update. - * - * The `updateOptions` object must contain a {@link WithStartWorkflowOperation}, which defines - * the options for the Workflow execution to start (e.g. the Workflow's type, task queue, input - * arguments, etc.) - * - * The behavior of Update-with-Start in the case where there is already a running Workflow with - * the given Workflow ID depends on the specified {@link WorkflowIDConflictPolicy}. That is, if - * the policy is `USE_EXISTING`, then the Update is issued against the already existing Workflow - * Execution; however, if the policy is `FAIL`, then an error is thrown. Caller MUST specify - * the desired WorkflowIDConflictPolicy. - * - * This call will block until the Update has reached the specified {@link WorkflowUpdateStage}. - * Note that this means that the call will not return successfully until the Update has - * been delivered to a Worker. The Workflow handle can be retrieved by awaiting on - * {@link WithStartWorkflowOperation.workflowHandle}, whether or not the Update succeeds. - * - * @returns a {@link WorkflowUpdateHandle} to the started Update - */ - startUpdateWithStart(updateDef: UpdateDefinition | string, updateOptions: WorkflowUpdateOptions & { - args?: Args; - waitForStage: 'ACCEPTED'; - startWorkflowOperation: WithStartWorkflowOperation; - }): Promise>; - protected _startUpdateWithStart(updateDef: UpdateDefinition | string, updateWithStartOptions: WorkflowUpdateOptions & { - args?: Args; - waitForStage: WorkflowUpdateStage; - startWorkflowOperation: WithStartWorkflowOperation; - }): Promise>; - /** - * Start a new Workflow execution, then await for its completion and return that Workflow's result. - * - * @returns the result of the Workflow execution - */ - execute(workflowTypeOrFunc: string | T, options: WorkflowStartOptions): Promise>; - /** - * Get the result of a Workflow execution. - * - * Follow the chain of execution in case Workflow continues as new, or has a cron schedule or retry policy. - */ - result(workflowId: string, runId?: string, opts?: WorkflowResultOptions): Promise>; - protected rethrowUpdateGrpcError(err: unknown, fallbackMessage: string, workflowExecution?: WorkflowExecution): never; - protected rethrowGrpcError(err: unknown, fallbackMessage: string, workflowExecution?: WorkflowExecution): never; - /** - * Use given input to make a queryWorkflow call to the service - * - * Used as the final function of the query interceptor chain - */ - protected _queryWorkflowHandler(input: WorkflowQueryInput): Promise; - protected _createUpdateWorkflowRequest(lifecycleStage: temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage, input: WorkflowStartUpdateInput): Promise; - /** - * Start the Update. - * - * Used as the final function of the interceptor chain during startUpdate and executeUpdate. - */ - protected _startUpdateHandler(waitForStage: WorkflowUpdateStage, input: WorkflowStartUpdateInput): Promise; - /** - * Send the Update-With-Start MultiOperation request. - * - * Used as the final function of the interceptor chain during - * startUpdateWithStart and executeUpdateWithStart. - */ - protected _updateWithStartHandler(waitForStage: WorkflowUpdateStage, onStart: (startResponse: temporal.api.workflowservice.v1.IStartWorkflowExecutionResponse) => void, onStartError: (err: any) => void, input: WorkflowStartUpdateWithStartInput): Promise; - protected createWorkflowUpdateHandle(updateId: string, workflowId: string, workflowRunId?: string, outcome?: temporal.api.update.v1.IOutcome): WorkflowUpdateHandle; - /** - * Poll Update until a response with an outcome is received; return that outcome. - * This is used directly; no interceptor is available. - */ - protected _pollForUpdateOutcome(updateId: string, workflowExecution: temporal.api.common.v1.IWorkflowExecution): Promise; - /** - * Use given input to make a signalWorkflowExecution call to the service - * - * Used as the final function of the signal interceptor chain - */ - protected _signalWorkflowHandler(input: WorkflowSignalInput): Promise; - /** - * Use given input to make a signalWithStartWorkflowExecution call to the service - * - * Used as the final function of the signalWithStart interceptor chain - */ - protected _signalWithStartWorkflowHandler(input: WorkflowSignalWithStartInput): Promise; - /** - * Use given input to make startWorkflowExecution call to the service - * - * Used as the final function of the start interceptor chain - */ - protected _startWorkflowHandler(input: WorkflowStartInput): Promise; - protected createStartWorkflowRequest(input: WorkflowStartInput): Promise; - /** - * Use given input to make terminateWorkflowExecution call to the service - * - * Used as the final function of the terminate interceptor chain - */ - protected _terminateWorkflowHandler(input: WorkflowTerminateInput): Promise; - /** - * Uses given input to make requestCancelWorkflowExecution call to the service - * - * Used as the final function of the cancel interceptor chain - */ - protected _cancelWorkflowHandler(input: WorkflowCancelInput): Promise; - /** - * Uses given input to make describeWorkflowExecution call to the service - * - * Used as the final function of the describe interceptor chain - */ - protected _describeWorkflowHandler(input: WorkflowDescribeInput): Promise; - /** - * Create a new workflow handle for new or existing Workflow execution - */ - protected _createWorkflowHandle({ workflowId, runId, firstExecutionRunId, interceptors, runIdForResult, ...resultOptions }: WorkflowHandleOptions): WorkflowHandle; - /** - * Create a handle to an existing Workflow. - * - * - If only `workflowId` is passed, and there are multiple Workflow Executions with that ID, the handle will refer to - * the most recent one. - * - If `workflowId` and `runId` are passed, the handle will refer to the specific Workflow Execution with that Run - * ID. - * - If `workflowId` and {@link GetWorkflowHandleOptions.firstExecutionRunId} are passed, the handle will refer to the - * most recent Workflow Execution in the *Chain* that started with `firstExecutionRunId`. - * - * A *Chain* is a series of Workflow Executions that share the same Workflow ID and are connected by: - * - Being part of the same {@link https://docs.temporal.io/typescript/clients#scheduling-cron-workflows | Cron} - * - {@link https://docs.temporal.io/typescript/workflows#continueasnew | Continue As New} - * - {@link https://typescript.temporal.io/api/interfaces/client.workflowoptions/#retry | Retries} - * - * This method does not validate `workflowId`. If there is no Workflow Execution with the given `workflowId`, handle - * methods like `handle.describe()` will throw a {@link WorkflowNotFoundError} error. - */ - getHandle(workflowId: string, runId?: string, options?: GetWorkflowHandleOptions): WorkflowHandle; - protected _list(options?: ListOptions): AsyncIterable; - /** - * Return a list of Workflow Executions matching the given `query`. - * - * Note that the list of Workflow Executions returned is approximate and eventually consistent. - * - * More info on the concept of "visibility" and the query syntax on the Temporal documentation site: - * https://docs.temporal.io/visibility - */ - list(options?: ListOptions): AsyncWorkflowListIterable; - /** - * Return the number of Workflow Executions matching the given `query`. If no `query` is provided, then return the - * total number of Workflow Executions for this namespace. - * - * Note that the number of Workflow Executions returned is approximate and eventually consistent. - * - * More info on the concept of "visibility" and the query syntax on the Temporal documentation site: - * https://docs.temporal.io/visibility - */ - count(query?: string): Promise; - protected getOrMakeInterceptors(workflowId: string, runId?: string): WorkflowClientInterceptor[]; -} -export declare class QueryRejectedError extends Error { - readonly status: temporal.api.enums.v1.WorkflowExecutionStatus; - constructor(status: temporal.api.enums.v1.WorkflowExecutionStatus); -} -export declare class QueryNotRegisteredError extends Error { - readonly code: grpcStatus; - constructor(message: string, code: grpcStatus); -} -export {}; diff --git a/node_modules/@temporalio/client/lib/workflow-client.js b/node_modules/@temporalio/client/lib/workflow-client.js deleted file mode 100644 index b959fe4..0000000 --- a/node_modules/@temporalio/client/lib/workflow-client.js +++ /dev/null @@ -1,1056 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.QueryNotRegisteredError = exports.QueryRejectedError = exports.WorkflowClient = exports.WithStartWorkflowOperation = void 0; -const grpc_js_1 = require("@grpc/grpc-js"); -const uuid_1 = require("uuid"); -const common_1 = require("@temporalio/common"); -const codec_helpers_1 = require("@temporalio/common/lib/internal-non-workflow/codec-helpers"); -const payload_search_attributes_1 = require("@temporalio/common/lib/converter/payload-search-attributes"); -const interceptors_1 = require("@temporalio/common/lib/interceptors"); -const type_helpers_1 = require("@temporalio/common/lib/type-helpers"); -const internal_non_workflow_1 = require("@temporalio/common/lib/internal-non-workflow"); -const internal_workflow_1 = require("@temporalio/common/lib/internal-workflow"); -const proto_1 = require("@temporalio/proto"); -const errors_1 = require("./errors"); -const types_1 = require("./types"); -const workflow_options_1 = require("./workflow-options"); -const helpers_1 = require("./helpers"); -const base_client_1 = require("./base-client"); -const iterators_utils_1 = require("./iterators-utils"); -const workflow_update_stage_1 = require("./workflow-update-stage"); -const internal_1 = require("./internal"); -const interceptor_adapters_1 = require("./interceptor-adapters"); -const UpdateWorkflowExecutionLifecycleStage = proto_1.temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage; -function defaultWorkflowClientOptions() { - return { - ...(0, base_client_1.defaultBaseClientOptions)(), - interceptors: [], - queryRejectCondition: 'NONE', - }; -} -function assertRequiredWorkflowOptions(opts) { - if (!opts.taskQueue) { - throw new TypeError('Missing WorkflowOptions.taskQueue'); - } - if (!opts.workflowId) { - throw new TypeError('Missing WorkflowOptions.workflowId'); - } -} -function ensureArgs(opts) { - const { args, ...rest } = opts; - return { args: args ?? [], ...rest }; -} -const withStartWorkflowOperationResolve = Symbol(); -const withStartWorkflowOperationReject = Symbol(); -const withStartWorkflowOperationUsed = Symbol(); -/** - * Define how to start a workflow when using {@link WorkflowClient.startUpdateWithStart} and - * {@link WorkflowClient.executeUpdateWithStart}. `workflowIdConflictPolicy` is required in the options. - */ -class WithStartWorkflowOperation { - workflowTypeOrFunc; - options; - [withStartWorkflowOperationUsed] = false; - [withStartWorkflowOperationResolve] = undefined; - [withStartWorkflowOperationReject] = undefined; - workflowHandlePromise; - constructor(workflowTypeOrFunc, options) { - this.workflowTypeOrFunc = workflowTypeOrFunc; - this.options = options; - this.workflowHandlePromise = new Promise((resolve, reject) => { - this[withStartWorkflowOperationResolve] = resolve; - this[withStartWorkflowOperationReject] = reject; - }); - // Suppress unhandled rejection: if executeUpdateWithStart fails before any - // response, we reject this promise AND re-throw to the caller. Without this - // no-op catch the rejected promise has no handler and Node 15+ terminates. - this.workflowHandlePromise.catch(() => undefined); - } - async workflowHandle() { - return await this.workflowHandlePromise; - } -} -exports.WithStartWorkflowOperation = WithStartWorkflowOperation; -/** - * Client for starting Workflow executions and creating Workflow handles. - * - * Typically this client should not be instantiated directly, instead create the high level {@link Client} and use - * {@link Client.workflow} to interact with Workflows. - */ -class WorkflowClient extends base_client_1.BaseClient { - options; - constructor(options) { - super(options); - this.options = { - ...defaultWorkflowClientOptions(), - ...(0, internal_workflow_1.filterNullAndUndefined)(options ?? {}), - loadedDataConverter: this.dataConverter, - }; - } - /** - * Raw gRPC access to the Temporal service. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests made via this service - * object. - */ - get workflowService() { - return this.connection.workflowService; - } - async _start(workflowTypeOrFunc, options, interceptors) { - const workflowType = (0, common_1.extractWorkflowType)(workflowTypeOrFunc); - assertRequiredWorkflowOptions(options); - const compiledOptions = (0, workflow_options_1.compileWorkflowOptions)(ensureArgs(options)); - const adaptedInterceptors = interceptors.map((i) => (0, interceptor_adapters_1.adaptWorkflowClientInterceptor)(i)); - const startWithDetails = (0, interceptors_1.composeInterceptors)(adaptedInterceptors, 'startWithDetails', this._startWorkflowHandler.bind(this)); - return startWithDetails({ - options: compiledOptions, - headers: {}, - workflowType, - }); - } - async _signalWithStart(workflowTypeOrFunc, options, interceptors) { - const workflowType = (0, common_1.extractWorkflowType)(workflowTypeOrFunc); - const { signal, signalArgs, ...rest } = options; - assertRequiredWorkflowOptions(rest); - const compiledOptions = (0, workflow_options_1.compileWorkflowOptions)(ensureArgs(rest)); - const signalWithStart = (0, interceptors_1.composeInterceptors)(interceptors, 'signalWithStart', this._signalWithStartWorkflowHandler.bind(this)); - return signalWithStart({ - options: compiledOptions, - headers: {}, - workflowType, - signalName: typeof signal === 'string' ? signal : signal.name, - signalArgs: signalArgs ?? [], - }); - } - /** - * Start a new Workflow execution. - * - * @returns a {@link WorkflowHandle} to the started Workflow - */ - async start(workflowTypeOrFunc, options) { - const { workflowId } = options; - const interceptors = this.getOrMakeInterceptors(workflowId); - const wfStartOutput = await this._start(workflowTypeOrFunc, { ...options, workflowId }, interceptors); - // runId is not used in handles created with `start*` calls because these - // handles should allow interacting with the workflow if it continues as new. - const baseHandle = this._createWorkflowHandle({ - workflowId, - runId: undefined, - firstExecutionRunId: wfStartOutput.runId, - runIdForResult: wfStartOutput.runId, - interceptors, - followRuns: options.followRuns ?? true, - }); - return { - ...baseHandle, - firstExecutionRunId: wfStartOutput.runId, - eagerlyStarted: wfStartOutput.eagerlyStarted, - }; - } - /** - * Start a new Workflow Execution and immediately send a Signal to that Workflow. - * - * The behavior of Signal-with-Start in the case where there is already a running Workflow with - * the given Workflow ID depends on the {@link WorkflowIDConflictPolicy}. That is, if the policy - * is `USE_EXISTING`, then the Signal is issued against the already existing Workflow Execution; - * however, if the policy is `FAIL`, then an error is thrown. If no policy is specified, - * Signal-with-Start defaults to `USE_EXISTING`. - * - * @returns a {@link WorkflowHandle} to the started Workflow - */ - async signalWithStart(workflowTypeOrFunc, options) { - const { workflowId } = options; - const interceptors = this.getOrMakeInterceptors(workflowId); - const runId = await this._signalWithStart(workflowTypeOrFunc, options, interceptors); - // runId is not used in handles created with `start*` calls because these - // handles should allow interacting with the workflow if it continues as new. - const handle = this._createWorkflowHandle({ - workflowId, - runId: undefined, - firstExecutionRunId: undefined, // We don't know if this runId is first in the chain or not - runIdForResult: runId, - interceptors, - followRuns: options.followRuns ?? true, - }); // Cast is safe because we know we add the signaledRunId below - handle /* readonly */.signaledRunId = runId; - return handle; - } - /** - * Start a new Workflow Execution and immediately send an Update to that Workflow, - * then await and return the Update's result. - * - * The `updateOptions` object must contain a {@link WithStartWorkflowOperation}, which defines - * the options for the Workflow execution to start (e.g. the Workflow's type, task queue, input - * arguments, etc.) - * - * The behavior of Update-with-Start in the case where there is already a running Workflow with - * the given Workflow ID depends on the specified {@link WorkflowIDConflictPolicy}. That is, if - * the policy is `USE_EXISTING`, then the Update is issued against the already existing Workflow - * Execution; however, if the policy is `FAIL`, then an error is thrown. Caller MUST specify - * the desired WorkflowIDConflictPolicy. - * - * This call will block until the Update has completed. The Workflow handle can be retrieved by - * awaiting on {@link WithStartWorkflowOperation.workflowHandle}, whether or not the Update - * succeeds. - * - * @returns the Update result - */ - async executeUpdateWithStart(updateDef, updateOptions) { - const handle = await this._startUpdateWithStart(updateDef, { - ...updateOptions, - waitForStage: workflow_update_stage_1.WorkflowUpdateStage.COMPLETED, - }); - return await handle.result(); - } - /** - * Start a new Workflow Execution and immediately send an Update to that Workflow, - * then return a {@link WorkflowUpdateHandle} for that Update. - * - * The `updateOptions` object must contain a {@link WithStartWorkflowOperation}, which defines - * the options for the Workflow execution to start (e.g. the Workflow's type, task queue, input - * arguments, etc.) - * - * The behavior of Update-with-Start in the case where there is already a running Workflow with - * the given Workflow ID depends on the specified {@link WorkflowIDConflictPolicy}. That is, if - * the policy is `USE_EXISTING`, then the Update is issued against the already existing Workflow - * Execution; however, if the policy is `FAIL`, then an error is thrown. Caller MUST specify - * the desired WorkflowIDConflictPolicy. - * - * This call will block until the Update has reached the specified {@link WorkflowUpdateStage}. - * Note that this means that the call will not return successfully until the Update has - * been delivered to a Worker. The Workflow handle can be retrieved by awaiting on - * {@link WithStartWorkflowOperation.workflowHandle}, whether or not the Update succeeds. - * - * @returns a {@link WorkflowUpdateHandle} to the started Update - */ - async startUpdateWithStart(updateDef, updateOptions) { - return this._startUpdateWithStart(updateDef, updateOptions); - } - async _startUpdateWithStart(updateDef, updateWithStartOptions) { - const { waitForStage, args, startWorkflowOperation, ...updateOptions } = updateWithStartOptions; - const { workflowTypeOrFunc, options: workflowOptions } = startWorkflowOperation; - const { workflowId } = workflowOptions; - if (startWorkflowOperation[withStartWorkflowOperationUsed]) { - throw new Error('This WithStartWorkflowOperation instance has already been executed.'); - } - startWorkflowOperation[withStartWorkflowOperationUsed] = true; - assertRequiredWorkflowOptions(workflowOptions); - const startUpdateWithStartInput = { - workflowType: (0, common_1.extractWorkflowType)(workflowTypeOrFunc), - workflowStartOptions: (0, workflow_options_1.compileWorkflowOptions)(ensureArgs(workflowOptions)), - workflowStartHeaders: {}, - updateName: typeof updateDef === 'string' ? updateDef : updateDef.name, - updateArgs: args ?? [], - updateOptions, - updateHeaders: {}, - }; - const interceptors = this.getOrMakeInterceptors(workflowId); - const onStart = (startResponse) => startWorkflowOperation[withStartWorkflowOperationResolve](this._createWorkflowHandle({ - workflowId, - firstExecutionRunId: startResponse.runId ?? undefined, - interceptors, - followRuns: workflowOptions.followRuns ?? true, - })); - const onStartError = (err) => { - startWorkflowOperation[withStartWorkflowOperationReject](err); - }; - const fn = (0, interceptors_1.composeInterceptors)(interceptors, 'startUpdateWithStart', this._updateWithStartHandler.bind(this, waitForStage, onStart, onStartError)); - const updateOutput = await fn(startUpdateWithStartInput); - let outcome = updateOutput.updateOutcome; - if (!outcome && waitForStage === workflow_update_stage_1.WorkflowUpdateStage.COMPLETED) { - outcome = await this._pollForUpdateOutcome(updateOutput.updateId, { - workflowId, - runId: updateOutput.workflowExecution.runId, - }); - } - return this.createWorkflowUpdateHandle(updateOutput.updateId, workflowId, updateOutput.workflowExecution.runId, outcome); - } - /** - * Start a new Workflow execution, then await for its completion and return that Workflow's result. - * - * @returns the result of the Workflow execution - */ - async execute(workflowTypeOrFunc, options) { - const { workflowId } = options; - const interceptors = this.getOrMakeInterceptors(workflowId); - await this._start(workflowTypeOrFunc, options, interceptors); - return await this.result(workflowId, undefined, { - ...options, - followRuns: options.followRuns ?? true, - }); - } - /** - * Get the result of a Workflow execution. - * - * Follow the chain of execution in case Workflow continues as new, or has a cron schedule or retry policy. - */ - async result(workflowId, runId, opts) { - const followRuns = opts?.followRuns ?? true; - const execution = { workflowId, runId }; - const req = { - namespace: this.options.namespace, - execution, - skipArchival: true, - waitNewEvent: true, - historyEventFilterType: proto_1.temporal.api.enums.v1.HistoryEventFilterType.HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT, - }; - let ev; - for (;;) { - let res; - try { - res = await this.workflowService.getWorkflowExecutionHistory(req); - } - catch (err) { - this.rethrowGrpcError(err, 'Failed to get Workflow execution history', { workflowId, runId }); - } - const events = res.history?.events; - if (events == null || events.length === 0) { - req.nextPageToken = res.nextPageToken; - continue; - } - if (events.length !== 1) { - throw new Error(`Expected at most 1 close event(s), got: ${events.length}`); - } - // getWorkflowExecutionHistory should never return an array of undefined events - ev = events[0]; - if (ev.workflowExecutionCompletedEventAttributes) { - if (followRuns && ev.workflowExecutionCompletedEventAttributes.newExecutionRunId) { - execution.runId = ev.workflowExecutionCompletedEventAttributes.newExecutionRunId; - req.nextPageToken = undefined; - continue; - } - // Note that we can only return one value from our workflow function in JS. - // Ignore any other payloads in result - const [result] = await (0, internal_non_workflow_1.decodeArrayFromPayloads)(this.dataConverter, ev.workflowExecutionCompletedEventAttributes.result?.payloads); - return result; - } - else if (ev.workflowExecutionFailedEventAttributes) { - if (followRuns && ev.workflowExecutionFailedEventAttributes.newExecutionRunId) { - execution.runId = ev.workflowExecutionFailedEventAttributes.newExecutionRunId; - req.nextPageToken = undefined; - continue; - } - const { failure, retryState } = ev.workflowExecutionFailedEventAttributes; - throw new errors_1.WorkflowFailedError('Workflow execution failed', await (0, internal_non_workflow_1.decodeOptionalFailureToOptionalError)(this.dataConverter, failure), (0, common_1.decodeRetryState)(retryState)); - } - else if (ev.workflowExecutionCanceledEventAttributes) { - const failure = new common_1.CancelledFailure('Workflow canceled', await (0, internal_non_workflow_1.decodeArrayFromPayloads)(this.dataConverter, ev.workflowExecutionCanceledEventAttributes.details?.payloads)); - failure.stack = ''; - throw new errors_1.WorkflowFailedError('Workflow execution cancelled', failure, common_1.RetryState.NON_RETRYABLE_FAILURE); - } - else if (ev.workflowExecutionTerminatedEventAttributes) { - const failure = new common_1.TerminatedFailure(ev.workflowExecutionTerminatedEventAttributes.reason || 'Workflow execution terminated'); - failure.stack = ''; - throw new errors_1.WorkflowFailedError(ev.workflowExecutionTerminatedEventAttributes.reason || 'Workflow execution terminated', failure, common_1.RetryState.NON_RETRYABLE_FAILURE); - } - else if (ev.workflowExecutionTimedOutEventAttributes) { - if (followRuns && ev.workflowExecutionTimedOutEventAttributes.newExecutionRunId) { - execution.runId = ev.workflowExecutionTimedOutEventAttributes.newExecutionRunId; - req.nextPageToken = undefined; - continue; - } - const failure = new common_1.TimeoutFailure('Workflow execution timed out', undefined, common_1.TimeoutType.START_TO_CLOSE); - failure.stack = ''; - throw new errors_1.WorkflowFailedError('Workflow execution timed out', failure, (0, common_1.decodeRetryState)(ev.workflowExecutionTimedOutEventAttributes.retryState)); - } - else if (ev.workflowExecutionContinuedAsNewEventAttributes) { - const { newExecutionRunId } = ev.workflowExecutionContinuedAsNewEventAttributes; - if (!newExecutionRunId) { - throw new TypeError('Expected service to return newExecutionRunId for WorkflowExecutionContinuedAsNewEvent'); - } - if (!followRuns) { - throw new errors_1.WorkflowContinuedAsNewError('Workflow execution continued as new', newExecutionRunId); - } - execution.runId = newExecutionRunId; - req.nextPageToken = undefined; - continue; - } - } - } - rethrowUpdateGrpcError(err, fallbackMessage, workflowExecution) { - if ((0, errors_1.isGrpcServiceError)(err)) { - if (err.code === grpc_js_1.status.DEADLINE_EXCEEDED || err.code === grpc_js_1.status.CANCELLED) { - throw new errors_1.WorkflowUpdateRPCTimeoutOrCancelledError(err.details ?? 'Workflow update call timeout or cancelled', { - cause: err, - }); - } - } - if (err instanceof common_1.CancelledFailure) { - throw new errors_1.WorkflowUpdateRPCTimeoutOrCancelledError(err.message ?? 'Workflow update call timeout or cancelled', { - cause: err, - }); - } - this.rethrowGrpcError(err, fallbackMessage, workflowExecution); - } - rethrowGrpcError(err, fallbackMessage, workflowExecution) { - if ((0, errors_1.isGrpcServiceError)(err)) { - (0, helpers_1.rethrowKnownErrorTypes)(err); - if (err.code === grpc_js_1.status.NOT_FOUND) { - throw new common_1.WorkflowNotFoundError(err.details ?? 'Workflow not found', workflowExecution?.workflowId ?? '', workflowExecution?.runId); - } - throw new errors_1.ServiceError(fallbackMessage, { cause: err }); - } - throw new errors_1.ServiceError('Unexpected error while making gRPC request', { cause: err }); - } - /** - * Use given input to make a queryWorkflow call to the service - * - * Used as the final function of the query interceptor chain - */ - async _queryWorkflowHandler(input) { - const req = { - queryRejectCondition: input.queryRejectCondition, - namespace: this.options.namespace, - execution: input.workflowExecution, - query: { - queryType: input.queryType, - queryArgs: { payloads: await (0, internal_non_workflow_1.encodeToPayloads)(this.dataConverter, ...input.args) }, - header: { fields: input.headers }, - }, - }; - let response; - try { - response = await this.workflowService.queryWorkflow(req); - } - catch (err) { - if ((0, errors_1.isGrpcServiceError)(err)) { - (0, helpers_1.rethrowKnownErrorTypes)(err); - if (err.code === grpc_js_1.status.INVALID_ARGUMENT) { - throw new QueryNotRegisteredError(err.message.replace(/^3 INVALID_ARGUMENT: /, ''), err.code); - } - } - this.rethrowGrpcError(err, 'Failed to query Workflow', input.workflowExecution); - } - if (response.queryRejected) { - if (response.queryRejected.status === undefined || response.queryRejected.status === null) { - throw new TypeError('Received queryRejected from server with no status'); - } - throw new QueryRejectedError(response.queryRejected.status); - } - if (!response.queryResult) { - throw new TypeError('Invalid response from server'); - } - // We ignore anything but the first result - return await (0, internal_non_workflow_1.decodeFromPayloadsAtIndex)(this.dataConverter, 0, response.queryResult?.payloads); - } - async _createUpdateWorkflowRequest(lifecycleStage, input) { - const updateId = input.options?.updateId ?? (0, uuid_1.v4)(); - return { - namespace: this.options.namespace, - workflowExecution: input.workflowExecution, - firstExecutionRunId: input.firstExecutionRunId, - waitPolicy: { - lifecycleStage, - }, - request: { - meta: { - updateId, - identity: this.options.identity, - }, - input: { - header: { fields: input.headers }, - name: input.updateName, - args: { payloads: await (0, internal_non_workflow_1.encodeToPayloads)(this.dataConverter, ...input.args) }, - }, - }, - }; - } - /** - * Start the Update. - * - * Used as the final function of the interceptor chain during startUpdate and executeUpdate. - */ - async _startUpdateHandler(waitForStage, input) { - let waitForStageProto = (0, workflow_update_stage_1.encodeWorkflowUpdateStage)(waitForStage) ?? - UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED; - waitForStageProto = - waitForStageProto >= UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED - ? waitForStageProto - : UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED; - const request = await this._createUpdateWorkflowRequest(waitForStageProto, input); - // Repeatedly send UpdateWorkflowExecution until update is durable (if the server receives a request with - // an update ID that already exists, it responds with information for the existing update). If the - // requested wait stage is COMPLETED, further polling is done before returning the UpdateHandle. - let response; - try { - do { - response = await this.workflowService.updateWorkflowExecution(request); - } while (response.stage < UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED); - } - catch (err) { - this.rethrowUpdateGrpcError(err, 'Workflow Update failed', input.workflowExecution); - } - return { - updateId: request.request.meta.updateId, - workflowRunId: response.updateRef.workflowExecution.runId, - outcome: response.outcome ?? undefined, - }; - } - /** - * Send the Update-With-Start MultiOperation request. - * - * Used as the final function of the interceptor chain during - * startUpdateWithStart and executeUpdateWithStart. - */ - async _updateWithStartHandler(waitForStage, onStart, onStartError, input) { - const startInput = { - workflowType: input.workflowType, - options: input.workflowStartOptions, - headers: input.workflowStartHeaders, - }; - const updateInput = { - updateName: input.updateName, - args: input.updateArgs, - workflowExecution: { - workflowId: input.workflowStartOptions.workflowId, - }, - options: input.updateOptions, - headers: input.updateHeaders, - }; - let seenStart = false; - try { - const startRequest = await this.createStartWorkflowRequest(startInput); - const waitForStageProto = (0, workflow_update_stage_1.encodeWorkflowUpdateStage)(waitForStage); - const updateRequest = await this._createUpdateWorkflowRequest(waitForStageProto, updateInput); - const multiOpReq = { - namespace: this.options.namespace, - operations: [ - { - startWorkflow: startRequest, - }, - { - updateWorkflow: updateRequest, - }, - ], - }; - let multiOpResp; - let startResp; - let updateResp; - let reachedStage; - // Repeatedly send ExecuteMultiOperation until update is durable (if the server receives a request with - // an update ID that already exists, it responds with information for the existing update). If the - // requested wait stage is COMPLETED, further polling is done before returning the UpdateHandle. - do { - multiOpResp = await this.workflowService.executeMultiOperation(multiOpReq); - startResp = multiOpResp.responses?.[0] - ?.startWorkflow; - if (!seenStart) { - onStart(startResp); - seenStart = true; - } - updateResp = multiOpResp.responses?.[1] - ?.updateWorkflow; - reachedStage = - updateResp.stage ?? - UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED; - } while (reachedStage < UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED); - return { - workflowExecution: { - workflowId: updateResp.updateRef.workflowExecution.workflowId, - runId: updateResp.updateRef.workflowExecution.runId, - }, - updateId: updateRequest.request.meta.updateId, - updateOutcome: updateResp.outcome ?? undefined, - }; - } - catch (thrownError) { - let err = thrownError; - if ((0, errors_1.isGrpcServiceError)(err) && err.code === grpc_js_1.status.ALREADY_EXISTS) { - err = new common_1.WorkflowExecutionAlreadyStartedError('Workflow execution already started', input.workflowStartOptions.workflowId, input.workflowType); - } - if (!seenStart) { - onStartError(err); - } - if ((0, errors_1.isGrpcServiceError)(err)) { - this.rethrowUpdateGrpcError(err, 'Update-With-Start failed', updateInput.workflowExecution); - } - throw err; - } - } - createWorkflowUpdateHandle(updateId, workflowId, workflowRunId, outcome) { - return { - updateId, - workflowId, - workflowRunId, - result: async () => { - const completedOutcome = outcome ?? (await this._pollForUpdateOutcome(updateId, { workflowId, runId: workflowRunId })); - if (completedOutcome.failure) { - throw new errors_1.WorkflowUpdateFailedError('Workflow Update failed', await (0, internal_non_workflow_1.decodeOptionalFailureToOptionalError)(this.dataConverter, completedOutcome.failure)); - } - else { - return await (0, internal_non_workflow_1.decodeFromPayloadsAtIndex)(this.dataConverter, 0, completedOutcome.success?.payloads); - } - }, - }; - } - /** - * Poll Update until a response with an outcome is received; return that outcome. - * This is used directly; no interceptor is available. - */ - async _pollForUpdateOutcome(updateId, workflowExecution) { - const req = { - namespace: this.options.namespace, - updateRef: { workflowExecution, updateId }, - identity: this.options.identity, - waitPolicy: { - lifecycleStage: (0, workflow_update_stage_1.encodeWorkflowUpdateStage)(workflow_update_stage_1.WorkflowUpdateStage.COMPLETED), - }, - }; - for (;;) { - try { - const response = await this.workflowService.pollWorkflowExecutionUpdate(req); - if (response.outcome) { - return response.outcome; - } - } - catch (err) { - const wE = typeof workflowExecution.workflowId === 'string' ? workflowExecution : undefined; - this.rethrowUpdateGrpcError(err, 'Workflow Update Poll failed', wE); - } - } - } - /** - * Use given input to make a signalWorkflowExecution call to the service - * - * Used as the final function of the signal interceptor chain - */ - async _signalWorkflowHandler(input) { - const req = { - identity: this.options.identity, - namespace: this.options.namespace, - workflowExecution: input.workflowExecution, - requestId: (0, uuid_1.v4)(), - // control is unused, - signalName: input.signalName, - header: { fields: input.headers }, - input: { payloads: await (0, internal_non_workflow_1.encodeToPayloads)(this.dataConverter, ...input.args) }, - }; - try { - await this.workflowService.signalWorkflowExecution(req); - } - catch (err) { - this.rethrowGrpcError(err, 'Failed to signal Workflow', input.workflowExecution); - } - } - /** - * Use given input to make a signalWithStartWorkflowExecution call to the service - * - * Used as the final function of the signalWithStart interceptor chain - */ - async _signalWithStartWorkflowHandler(input) { - const { identity } = this.options; - const { options, workflowType, signalName, signalArgs, headers } = input; - const req = { - namespace: this.options.namespace, - identity, - requestId: (0, uuid_1.v4)(), - workflowId: options.workflowId, - workflowIdReusePolicy: (0, common_1.encodeWorkflowIdReusePolicy)(options.workflowIdReusePolicy), - workflowIdConflictPolicy: (0, common_1.encodeWorkflowIdConflictPolicy)(options.workflowIdConflictPolicy), - workflowType: { name: workflowType }, - input: { payloads: await (0, internal_non_workflow_1.encodeToPayloads)(this.dataConverter, ...options.args) }, - signalName, - signalInput: { payloads: await (0, internal_non_workflow_1.encodeToPayloads)(this.dataConverter, ...signalArgs) }, - taskQueue: { - kind: proto_1.temporal.api.enums.v1.TaskQueueKind.TASK_QUEUE_KIND_NORMAL, - name: options.taskQueue, - }, - workflowExecutionTimeout: options.workflowExecutionTimeout, - workflowRunTimeout: options.workflowRunTimeout, - workflowTaskTimeout: options.workflowTaskTimeout, - workflowStartDelay: options.startDelay, - retryPolicy: options.retry ? (0, common_1.compileRetryPolicy)(options.retry) : undefined, - memo: options.memo ? { fields: await (0, internal_non_workflow_1.encodeMapToPayloads)(this.dataConverter, options.memo) } : undefined, - searchAttributes: options.searchAttributes || options.typedSearchAttributes // eslint-disable-line @typescript-eslint/no-deprecated - ? { - indexedFields: (0, payload_search_attributes_1.encodeUnifiedSearchAttributes)(options.searchAttributes, options.typedSearchAttributes), // eslint-disable-line @typescript-eslint/no-deprecated - } - : undefined, - cronSchedule: options.cronSchedule, - header: { fields: headers }, - userMetadata: await (0, codec_helpers_1.encodeUserMetadata)(this.dataConverter, options.staticSummary, options.staticDetails), - priority: options.priority ? (0, common_1.compilePriority)(options.priority) : undefined, - versioningOverride: options.versioningOverride ?? undefined, - }; - try { - return (await this.workflowService.signalWithStartWorkflowExecution(req)).runId; - } - catch (err) { - if (err.code === grpc_js_1.status.ALREADY_EXISTS) { - throw new common_1.WorkflowExecutionAlreadyStartedError('Workflow execution already started', options.workflowId, workflowType); - } - this.rethrowGrpcError(err, 'Failed to signalWithStart Workflow', { workflowId: options.workflowId }); - } - } - /** - * Use given input to make startWorkflowExecution call to the service - * - * Used as the final function of the start interceptor chain - */ - async _startWorkflowHandler(input) { - const req = await this.createStartWorkflowRequest(input); - const { options: opts, workflowType } = input; - const internalOptions = opts[internal_1.InternalWorkflowStartOptionsSymbol]; - try { - const response = await this.workflowService.startWorkflowExecution(req); - if (internalOptions != null) { - internalOptions.backLink = response.link ?? undefined; - } - return { - runId: response.runId, - eagerlyStarted: response.eagerWorkflowTask != null, - }; - } - catch (err) { - if (err.code === grpc_js_1.status.ALREADY_EXISTS) { - throw new common_1.WorkflowExecutionAlreadyStartedError('Workflow execution already started', opts.workflowId, workflowType); - } - this.rethrowGrpcError(err, 'Failed to start Workflow', { workflowId: opts.workflowId }); - } - } - async createStartWorkflowRequest(input) { - const { options: opts, workflowType, headers } = input; - const { identity, namespace } = this.options; - const internalOptions = opts[internal_1.InternalWorkflowStartOptionsSymbol]; - const supportsEagerStart = this.connection?.[types_1.InternalConnectionLikeSymbol] - ?.supportsEagerStart; - if (opts.requestEagerStart && !supportsEagerStart) { - throw new Error('Eager workflow start requires a NativeConnection shared between client and worker. ' + - 'Pass a NativeConnection via ClientOptions.connection, or disable requestEagerStart.'); - } - return { - namespace, - identity, - requestId: internalOptions?.requestId ?? (0, uuid_1.v4)(), - workflowId: opts.workflowId, - workflowIdReusePolicy: (0, common_1.encodeWorkflowIdReusePolicy)(opts.workflowIdReusePolicy), - workflowIdConflictPolicy: (0, common_1.encodeWorkflowIdConflictPolicy)(opts.workflowIdConflictPolicy), - workflowType: { name: workflowType }, - input: { payloads: await (0, internal_non_workflow_1.encodeToPayloads)(this.dataConverter, ...opts.args) }, - taskQueue: { - kind: proto_1.temporal.api.enums.v1.TaskQueueKind.TASK_QUEUE_KIND_NORMAL, - name: opts.taskQueue, - }, - workflowExecutionTimeout: opts.workflowExecutionTimeout, - workflowRunTimeout: opts.workflowRunTimeout, - workflowTaskTimeout: opts.workflowTaskTimeout, - workflowStartDelay: opts.startDelay, - retryPolicy: opts.retry ? (0, common_1.compileRetryPolicy)(opts.retry) : undefined, - memo: opts.memo ? { fields: await (0, internal_non_workflow_1.encodeMapToPayloads)(this.dataConverter, opts.memo) } : undefined, - searchAttributes: opts.searchAttributes || opts.typedSearchAttributes // eslint-disable-line @typescript-eslint/no-deprecated - ? { - indexedFields: (0, payload_search_attributes_1.encodeUnifiedSearchAttributes)(opts.searchAttributes, opts.typedSearchAttributes), // eslint-disable-line @typescript-eslint/no-deprecated - } - : undefined, - cronSchedule: opts.cronSchedule, - header: { fields: headers }, - userMetadata: await (0, codec_helpers_1.encodeUserMetadata)(this.dataConverter, opts.staticSummary, opts.staticDetails), - priority: opts.priority ? (0, common_1.compilePriority)(opts.priority) : undefined, - versioningOverride: opts.versioningOverride ?? undefined, - requestEagerExecution: opts.requestEagerStart, - ...(0, internal_workflow_1.filterNullAndUndefined)(internalOptions ?? {}), - }; - } - /** - * Use given input to make terminateWorkflowExecution call to the service - * - * Used as the final function of the terminate interceptor chain - */ - async _terminateWorkflowHandler(input) { - const req = { - namespace: this.options.namespace, - identity: this.options.identity, - ...input, - details: { - payloads: input.details ? await (0, internal_non_workflow_1.encodeToPayloads)(this.dataConverter, ...input.details) : undefined, - }, - firstExecutionRunId: input.firstExecutionRunId, - }; - try { - return await this.workflowService.terminateWorkflowExecution(req); - } - catch (err) { - this.rethrowGrpcError(err, 'Failed to terminate Workflow', input.workflowExecution); - } - } - /** - * Uses given input to make requestCancelWorkflowExecution call to the service - * - * Used as the final function of the cancel interceptor chain - */ - async _cancelWorkflowHandler(input) { - try { - return await this.workflowService.requestCancelWorkflowExecution({ - namespace: this.options.namespace, - identity: this.options.identity, - requestId: (0, uuid_1.v4)(), - workflowExecution: input.workflowExecution, - firstExecutionRunId: input.firstExecutionRunId, - }); - } - catch (err) { - this.rethrowGrpcError(err, 'Failed to cancel workflow', input.workflowExecution); - } - } - /** - * Uses given input to make describeWorkflowExecution call to the service - * - * Used as the final function of the describe interceptor chain - */ - async _describeWorkflowHandler(input) { - try { - return await this.workflowService.describeWorkflowExecution({ - namespace: this.options.namespace, - execution: input.workflowExecution, - }); - } - catch (err) { - this.rethrowGrpcError(err, 'Failed to describe workflow', input.workflowExecution); - } - } - /** - * Create a new workflow handle for new or existing Workflow execution - */ - _createWorkflowHandle({ workflowId, runId, firstExecutionRunId, interceptors, runIdForResult, ...resultOptions }) { - const _startUpdate = async (def, waitForStage, options) => { - const next = this._startUpdateHandler.bind(this, waitForStage); - const fn = (0, interceptors_1.composeInterceptors)(interceptors, 'startUpdate', next); - const { args, ...opts } = options ?? {}; - const input = { - workflowExecution: { workflowId, runId }, - firstExecutionRunId, - updateName: typeof def === 'string' ? def : def.name, - args: args ?? [], - waitForStage, - headers: {}, - options: opts, - }; - const output = await fn(input); - const handle = this.createWorkflowUpdateHandle(output.updateId, input.workflowExecution.workflowId, output.workflowRunId, output.outcome); - if (!output.outcome && waitForStage === workflow_update_stage_1.WorkflowUpdateStage.COMPLETED) { - await this._pollForUpdateOutcome(handle.updateId, input.workflowExecution); - } - return handle; - }; - return { - client: this, - workflowId, - async result() { - return this.client.result(workflowId, runIdForResult, resultOptions); - }, - async terminate(reason) { - const next = this.client._terminateWorkflowHandler.bind(this.client); - const fn = (0, interceptors_1.composeInterceptors)(interceptors, 'terminate', next); - return await fn({ - workflowExecution: { workflowId, runId }, - reason, - firstExecutionRunId, - }); - }, - async cancel() { - const next = this.client._cancelWorkflowHandler.bind(this.client); - const fn = (0, interceptors_1.composeInterceptors)(interceptors, 'cancel', next); - return await fn({ - workflowExecution: { workflowId, runId }, - firstExecutionRunId, - }); - }, - async describe() { - const next = this.client._describeWorkflowHandler.bind(this.client); - const fn = (0, interceptors_1.composeInterceptors)(interceptors, 'describe', next); - const raw = await fn({ - workflowExecution: { workflowId, runId }, - }); - const info = await (0, helpers_1.executionInfoFromRaw)(raw.workflowExecutionInfo ?? {}, this.client.dataConverter, raw); - const userMetadata = raw.executionConfig?.userMetadata; - return { - ...info, - staticDetails: async () => (await (0, internal_non_workflow_1.decodeOptionalSinglePayload)(this.client.dataConverter, userMetadata?.details)) ?? undefined, - staticSummary: async () => (await (0, internal_non_workflow_1.decodeOptionalSinglePayload)(this.client.dataConverter, userMetadata?.summary)) ?? undefined, - raw, - }; - }, - async fetchHistory() { - let nextPageToken = undefined; - const events = Array(); - for (;;) { - const response = await this.client.workflowService.getWorkflowExecutionHistory({ - nextPageToken, - namespace: this.client.options.namespace, - execution: { workflowId, runId }, - }); - events.push(...(response.history?.events ?? [])); - nextPageToken = response.nextPageToken; - if (nextPageToken == null || nextPageToken.length === 0) - break; - } - return proto_1.temporal.api.history.v1.History.create({ events }); - }, - async startUpdate(def, options) { - return await _startUpdate(def, options.waitForStage, options); - }, - async executeUpdate(def, options) { - const handle = await _startUpdate(def, workflow_update_stage_1.WorkflowUpdateStage.COMPLETED, options); - return await handle.result(); - }, - getUpdateHandle(updateId) { - return this.client.createWorkflowUpdateHandle(updateId, workflowId, runId); - }, - async signal(def, ...args) { - const next = this.client._signalWorkflowHandler.bind(this.client); - const fn = (0, interceptors_1.composeInterceptors)(interceptors, 'signal', next); - await fn({ - workflowExecution: { workflowId, runId }, - signalName: typeof def === 'string' ? def : def.name, - args, - headers: {}, - }); - }, - async query(def, ...args) { - const next = this.client._queryWorkflowHandler.bind(this.client); - const fn = (0, interceptors_1.composeInterceptors)(interceptors, 'query', next); - return fn({ - workflowExecution: { workflowId, runId }, - queryRejectCondition: (0, types_1.encodeQueryRejectCondition)(this.client.options.queryRejectCondition), - queryType: typeof def === 'string' ? def : def.name, - args, - headers: {}, - }); - }, - }; - } - /** - * Create a handle to an existing Workflow. - * - * - If only `workflowId` is passed, and there are multiple Workflow Executions with that ID, the handle will refer to - * the most recent one. - * - If `workflowId` and `runId` are passed, the handle will refer to the specific Workflow Execution with that Run - * ID. - * - If `workflowId` and {@link GetWorkflowHandleOptions.firstExecutionRunId} are passed, the handle will refer to the - * most recent Workflow Execution in the *Chain* that started with `firstExecutionRunId`. - * - * A *Chain* is a series of Workflow Executions that share the same Workflow ID and are connected by: - * - Being part of the same {@link https://docs.temporal.io/typescript/clients#scheduling-cron-workflows | Cron} - * - {@link https://docs.temporal.io/typescript/workflows#continueasnew | Continue As New} - * - {@link https://typescript.temporal.io/api/interfaces/client.workflowoptions/#retry | Retries} - * - * This method does not validate `workflowId`. If there is no Workflow Execution with the given `workflowId`, handle - * methods like `handle.describe()` will throw a {@link WorkflowNotFoundError} error. - */ - getHandle(workflowId, runId, options) { - const interceptors = this.getOrMakeInterceptors(workflowId, runId); - return this._createWorkflowHandle({ - workflowId, - runId, - firstExecutionRunId: options?.firstExecutionRunId, - runIdForResult: runId ?? options?.firstExecutionRunId, - interceptors, - followRuns: options?.followRuns ?? true, - }); - } - async *_list(options) { - let nextPageToken = Buffer.alloc(0); - for (;;) { - let response; - try { - response = await this.workflowService.listWorkflowExecutions({ - namespace: this.options.namespace, - query: options?.query, - nextPageToken, - pageSize: options?.pageSize, - }); - } - catch (e) { - this.rethrowGrpcError(e, 'Failed to list workflows', undefined); - } - // Not decoding memo payloads concurrently even though we could have to keep the lazy nature of this iterator. - // Decoding is done for `memo` fields which tend to be small. - // We might decide to change that based on user feedback. - for (const raw of response.executions) { - yield await (0, helpers_1.executionInfoFromRaw)(raw, this.dataConverter, raw); - } - nextPageToken = response.nextPageToken; - if (nextPageToken == null || nextPageToken.length === 0) - break; - } - } - /** - * Return a list of Workflow Executions matching the given `query`. - * - * Note that the list of Workflow Executions returned is approximate and eventually consistent. - * - * More info on the concept of "visibility" and the query syntax on the Temporal documentation site: - * https://docs.temporal.io/visibility - */ - list(options) { - return { - [Symbol.asyncIterator]: () => this._list(options)[Symbol.asyncIterator](), - intoHistories: (intoHistoriesOptions) => { - return (0, iterators_utils_1.mapAsyncIterable)(this._list(options), async ({ workflowId, runId }) => ({ - workflowId, - history: await this.getHandle(workflowId, runId).fetchHistory(), - }), { concurrency: intoHistoriesOptions?.concurrency ?? 5 }); - }, - }; - } - /** - * Return the number of Workflow Executions matching the given `query`. If no `query` is provided, then return the - * total number of Workflow Executions for this namespace. - * - * Note that the number of Workflow Executions returned is approximate and eventually consistent. - * - * More info on the concept of "visibility" and the query syntax on the Temporal documentation site: - * https://docs.temporal.io/visibility - */ - async count(query) { - let response; - try { - response = await this.workflowService.countWorkflowExecutions({ - namespace: this.options.namespace, - query, - }); - } - catch (e) { - this.rethrowGrpcError(e, 'Failed to count workflows'); - } - return (0, helpers_1.decodeCountWorkflowExecutionsResponse)(response); - } - getOrMakeInterceptors(workflowId, runId) { - if (typeof this.options.interceptors === 'object' && 'calls' in this.options.interceptors) { - // eslint-disable-next-line @typescript-eslint/no-deprecated - const factories = this.options.interceptors.calls ?? []; - return factories.map((ctor) => ctor({ workflowId, runId })); - } - return Array.isArray(this.options.interceptors) ? this.options.interceptors : []; - } -} -exports.WorkflowClient = WorkflowClient; -let QueryRejectedError = class QueryRejectedError extends Error { - status; - constructor(status) { - super('Query rejected'); - this.status = status; - } -}; -exports.QueryRejectedError = QueryRejectedError; -exports.QueryRejectedError = QueryRejectedError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('QueryRejectedError') -], QueryRejectedError); -let QueryNotRegisteredError = class QueryNotRegisteredError extends Error { - code; - constructor(message, code) { - super(message); - this.code = code; - } -}; -exports.QueryNotRegisteredError = QueryNotRegisteredError; -exports.QueryNotRegisteredError = QueryNotRegisteredError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('QueryNotRegisteredError') -], QueryNotRegisteredError); -//# sourceMappingURL=workflow-client.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/workflow-client.js.map b/node_modules/@temporalio/client/lib/workflow-client.js.map deleted file mode 100644 index 2153be2..0000000 --- a/node_modules/@temporalio/client/lib/workflow-client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workflow-client.js","sourceRoot":"","sources":["../src/workflow-client.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAqD;AACrD,+BAAmC;AACnC,+CAuB4B;AAC5B,8FAAgG;AAChG,0GAA2G;AA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;IAG9B;IAFlB,YACE,OAAe,EACC,IAAgB;QAEhC,KAAK,CAAC,OAAO,CAAC,CAAC;QAFC,SAAI,GAAJ,IAAI,CAAY;IAGlC,CAAC;CACF,CAAA;AAPY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,yCAA0B,EAAC,yBAAyB,CAAC;GACzC,uBAAuB,CAOnC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/workflow-options.d.ts b/node_modules/@temporalio/client/lib/workflow-options.d.ts deleted file mode 100644 index e60dda3..0000000 --- a/node_modules/@temporalio/client/lib/workflow-options.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { CommonWorkflowOptions, SignalDefinition, WithWorkflowArgs, Workflow, VersioningOverride } from '@temporalio/common'; -import { Duration } from '@temporalio/common/lib/time'; -import { Replace } from '@temporalio/common/lib/type-helpers'; -import { google, temporal } from '@temporalio/proto'; -export * from '@temporalio/common/lib/workflow-options'; -export interface CompiledWorkflowOptions extends WithCompiledWorkflowOptions { - args: unknown[]; -} -export interface WorkflowOptions extends CommonWorkflowOptions { - /** - * Workflow id to use when starting. - * - * Assign a meaningful business id. - * This ID can be used to ensure starting Workflows is idempotent. - * Workflow IDs are unique: see {@link WorkflowOptions.workflowIdReusePolicy} - * and {@link WorkflowOptions.workflowIdConflictPolicy}. - */ - workflowId: string; - /** - * Task queue to use for Workflow tasks. It should match a task queue specified when creating a - * `Worker` that hosts the Workflow code. - */ - taskQueue: string; - /** - * If set to true, instructs the client to follow the chain of execution before returning a Workflow's result. - * - * Workflow execution is chained if the Workflow has a cron schedule or continues-as-new or configured to retry - * after failure or timeout. - * - * @default true - */ - followRuns?: boolean; - /** - * Amount of time to wait before starting the workflow. - */ - startDelay?: Duration; - /** - * Override the versioning behavior of the Workflow that is about to be started. - */ - versioningOverride?: VersioningOverride; - /** - * Potentially reduce the latency to start this workflow by requesting that the server - * start it on a local worker running with this same client. - */ - requestEagerStart?: boolean; -} -export type WithCompiledWorkflowOptions = Replace; -export declare function compileWorkflowOptions(options: T): WithCompiledWorkflowOptions; -export interface WorkflowUpdateOptions { - /** - * The Update Id, which is a unique-per-Workflow-Execution identifier for this Update. - * - * We recommend setting it to a meaningful business ID or idempotency key (like a request ID) passed from upstream. If - * it is not provided, it will be set to a random string by the Client. If the Server receives two Updates with the - * same Update Id to a Workflow Execution with the same Run Id, the second Update will return a handle to the first - * Update. - */ - readonly updateId?: string; -} -export type WorkflowSignalWithStartOptions = SignalArgs extends [any, ...any[]] ? WorkflowSignalWithStartOptionsWithArgs : WorkflowSignalWithStartOptionsWithoutArgs; -export interface WorkflowSignalWithStartOptionsWithoutArgs extends Omit { - /** - * SignalDefinition or name of signal - */ - signal: SignalDefinition | string; - /** - * Arguments to invoke the signal handler with - */ - signalArgs?: SignalArgs; -} -export interface WorkflowSignalWithStartOptionsWithArgs extends Omit { - /** - * SignalDefinition or name of signal - */ - signal: SignalDefinition | string; - /** - * Arguments to invoke the signal handler with - */ - signalArgs: SignalArgs; -} -/** - * Options for starting a Workflow - */ -export type WorkflowStartOptions = WithWorkflowArgs; diff --git a/node_modules/@temporalio/client/lib/workflow-options.js b/node_modules/@temporalio/client/lib/workflow-options.js deleted file mode 100644 index 5113316..0000000 --- a/node_modules/@temporalio/client/lib/workflow-options.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.compileWorkflowOptions = compileWorkflowOptions; -const common_1 = require("@temporalio/common"); -const time_1 = require("@temporalio/common/lib/time"); -const proto_1 = require("@temporalio/proto"); -__exportStar(require("@temporalio/common/lib/workflow-options"), exports); -function compileWorkflowOptions(options) { - const { workflowExecutionTimeout, workflowRunTimeout, workflowTaskTimeout, startDelay, versioningOverride, ...rest } = options; - return { - ...rest, - workflowExecutionTimeout: (0, time_1.msOptionalToTs)(workflowExecutionTimeout), - workflowRunTimeout: (0, time_1.msOptionalToTs)(workflowRunTimeout), - workflowTaskTimeout: (0, time_1.msOptionalToTs)(workflowTaskTimeout), - startDelay: (0, time_1.msOptionalToTs)(startDelay), - versioningOverride: versioningOverrideToProto(versioningOverride), - }; -} -function versioningOverrideToProto(vo) { - if (!vo) - return undefined; - // TODO: Remove deprecated field assignments when versioning is non-experimental - if (vo === 'AUTO_UPGRADE') { - return { - autoUpgrade: true, - behavior: proto_1.temporal.api.enums.v1.VersioningBehavior.VERSIONING_BEHAVIOR_AUTO_UPGRADE, - }; - } - return { - pinned: { - version: vo.pinnedTo, - behavior: proto_1.temporal.api.workflow.v1.VersioningOverride.PinnedOverrideBehavior.PINNED_OVERRIDE_BEHAVIOR_PINNED, - }, - behavior: proto_1.temporal.api.enums.v1.VersioningBehavior.VERSIONING_BEHAVIOR_PINNED, - pinnedVersion: (0, common_1.toCanonicalString)(vo.pinnedTo), - }; -} -//# sourceMappingURL=workflow-options.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/workflow-options.js.map b/node_modules/@temporalio/client/lib/workflow-options.js.map deleted file mode 100644 index e256213..0000000 --- a/node_modules/@temporalio/client/lib/workflow-options.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workflow-options.js","sourceRoot":"","sources":["../src/workflow-options.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAyEA,wDAYC;AArFD,+CAO4B;AAC5B,sDAAuE;AAEvE,6CAAqD;AAErD,0EAAwD;AA6DxD,SAAgB,sBAAsB,CAA4B,OAAU;IAC1E,MAAM,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAClH,OAAO,CAAC;IAEV,OAAO;QACL,GAAG,IAAI;QACP,wBAAwB,EAAE,IAAA,qBAAc,EAAC,wBAAwB,CAAC;QAClE,kBAAkB,EAAE,IAAA,qBAAc,EAAC,kBAAkB,CAAC;QACtD,mBAAmB,EAAE,IAAA,qBAAc,EAAC,mBAAmB,CAAC;QACxD,UAAU,EAAE,IAAA,qBAAc,EAAC,UAAU,CAAC;QACtC,kBAAkB,EAAE,yBAAyB,CAAC,kBAAkB,CAAC;KAClE,CAAC;AACJ,CAAC;AAiDD,SAAS,yBAAyB,CAChC,EAAkC;IAElC,IAAI,CAAC,EAAE;QAAE,OAAO,SAAS,CAAC;IAE1B,gFAAgF;IAChF,IAAI,EAAE,KAAK,cAAc,EAAE,CAAC;QAC1B,OAAO;YACL,WAAW,EAAE,IAAI;YACjB,QAAQ,EAAE,gBAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAAC,gCAAgC;SACpF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,MAAM,EAAE;YACN,OAAO,EAAE,EAAE,CAAC,QAAQ;YACpB,QAAQ,EAAE,gBAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,+BAA+B;SAC7G;QACD,QAAQ,EAAE,gBAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAAC,0BAA0B;QAC7E,aAAa,EAAE,IAAA,0BAAiB,EAAC,EAAE,CAAC,QAAQ,CAAC;KAC9C,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/workflow-update-stage.d.ts b/node_modules/@temporalio/client/lib/workflow-update-stage.d.ts deleted file mode 100644 index c7b5779..0000000 --- a/node_modules/@temporalio/client/lib/workflow-update-stage.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { temporal } from '@temporalio/proto'; -export declare const WorkflowUpdateStage: { - /** Admitted stage. This stage is reached when the server accepts the update request. It is not - * allowed to wait for this stage when using startUpdate, since the update request has not yet - * been durably persisted at this stage. */ - readonly ADMITTED: "ADMITTED"; - /** Accepted stage. This stage is reached when a workflow has received the update and either - * accepted it (i.e. it has passed validation, or there was no validator configured on the update - * handler) or rejected it. This is currently the only allowed value when using startUpdate. */ - readonly ACCEPTED: "ACCEPTED"; - /** Completed stage. This stage is reached when a workflow has completed processing the - * update with either a success or failure. */ - readonly COMPLETED: "COMPLETED"; - /** - * This is not an allowed value. - * @deprecated - */ - readonly UNSPECIFIED: undefined; -}; -export type WorkflowUpdateStage = (typeof WorkflowUpdateStage)[keyof typeof WorkflowUpdateStage]; -export declare const encodeWorkflowUpdateStage: (input: "COMPLETED" | "ADMITTED" | "ACCEPTED" | temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage | "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED" | "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED" | "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED" | null | undefined) => temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage | undefined; diff --git a/node_modules/@temporalio/client/lib/workflow-update-stage.js b/node_modules/@temporalio/client/lib/workflow-update-stage.js deleted file mode 100644 index d002434..0000000 --- a/node_modules/@temporalio/client/lib/workflow-update-stage.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.encodeWorkflowUpdateStage = exports.WorkflowUpdateStage = void 0; -const internal_workflow_1 = require("@temporalio/common/lib/internal-workflow"); -exports.WorkflowUpdateStage = { - /** Admitted stage. This stage is reached when the server accepts the update request. It is not - * allowed to wait for this stage when using startUpdate, since the update request has not yet - * been durably persisted at this stage. */ - ADMITTED: 'ADMITTED', - /** Accepted stage. This stage is reached when a workflow has received the update and either - * accepted it (i.e. it has passed validation, or there was no validator configured on the update - * handler) or rejected it. This is currently the only allowed value when using startUpdate. */ - ACCEPTED: 'ACCEPTED', - /** Completed stage. This stage is reached when a workflow has completed processing the - * update with either a success or failure. */ - COMPLETED: 'COMPLETED', - /** - * This is not an allowed value. - * @deprecated - */ - UNSPECIFIED: undefined, -}; -exports.encodeWorkflowUpdateStage = (0, internal_workflow_1.makeProtoEnumConverters)({ - [exports.WorkflowUpdateStage.ADMITTED]: 1, - [exports.WorkflowUpdateStage.ACCEPTED]: 2, - [exports.WorkflowUpdateStage.COMPLETED]: 3, - UNSPECIFIED: 0, -}, 'UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_')[0]; -//# sourceMappingURL=workflow-update-stage.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/client/lib/workflow-update-stage.js.map b/node_modules/@temporalio/client/lib/workflow-update-stage.js.map deleted file mode 100644 index bf43504..0000000 --- a/node_modules/@temporalio/client/lib/workflow-update-stage.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workflow-update-stage.js","sourceRoot":"","sources":["../src/workflow-update-stage.ts"],"names":[],"mappings":";;;AACA,gFAAmF;AAEtE,QAAA,mBAAmB,GAAG;IACjC;;+CAE2C;IAC3C,QAAQ,EAAE,UAAU;IAEpB;;mGAE+F;IAC/F,QAAQ,EAAE,UAAU;IAEpB;kDAC8C;IAC9C,SAAS,EAAE,WAAW;IAEtB;;;OAGG;IACH,WAAW,EAAE,SAAS;CACd,CAAC;AAGG,iCAAyB,GAAI,IAAA,2CAAuB,EAOhE;IACE,CAAC,2BAAmB,CAAC,QAAQ,CAAC,EAAE,CAAC;IACjC,CAAC,2BAAmB,CAAC,QAAQ,CAAC,EAAE,CAAC;IACjC,CAAC,2BAAmB,CAAC,SAAS,CAAC,EAAE,CAAC;IAClC,WAAW,EAAE,CAAC;CACN,EACV,4CAA4C,CAC7C,IAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/client/node_modules/.bin/uuid b/node_modules/@temporalio/client/node_modules/.bin/uuid deleted file mode 100644 index 25cbae6..0000000 --- a/node_modules/@temporalio/client/node_modules/.bin/uuid +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../uuid/dist/esm/bin/uuid" "$@" -else - exec node "$basedir/../uuid/dist/esm/bin/uuid" "$@" -fi diff --git a/node_modules/@temporalio/client/node_modules/.bin/uuid.cmd b/node_modules/@temporalio/client/node_modules/.bin/uuid.cmd deleted file mode 100644 index 3debc70..0000000 --- a/node_modules/@temporalio/client/node_modules/.bin/uuid.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\dist\esm\bin\uuid" %* diff --git a/node_modules/@temporalio/client/node_modules/.bin/uuid.ps1 b/node_modules/@temporalio/client/node_modules/.bin/uuid.ps1 deleted file mode 100644 index 14f6846..0000000 --- a/node_modules/@temporalio/client/node_modules/.bin/uuid.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../uuid/dist/esm/bin/uuid" $args - } else { - & "$basedir/node$exe" "$basedir/../uuid/dist/esm/bin/uuid" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../uuid/dist/esm/bin/uuid" $args - } else { - & "node$exe" "$basedir/../uuid/dist/esm/bin/uuid" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/@temporalio/client/node_modules/uuid/LICENSE.md b/node_modules/@temporalio/client/node_modules/uuid/LICENSE.md deleted file mode 100644 index 3934168..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010-2020 Robert Kieffer and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@temporalio/client/node_modules/uuid/README.md b/node_modules/@temporalio/client/node_modules/uuid/README.md deleted file mode 100644 index 83ae737..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/README.md +++ /dev/null @@ -1,510 +0,0 @@ - - -# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions/workflows/browser.yml) - -For the creation of [RFC9562](https://www.rfc-editor.org/rfc/rfc9562.html) (formerly [RFC4122](https://www.rfc-editor.org/rfc/rfc4122.html)) UUIDs - -- **Complete** - Support for all RFC9562 UUID versions -- **Cross-platform** - Support for... - - ESM & Common JS - - [Typescript](#support) - - [Chrome, Safari, Firefox, and Edge](#support) - - [NodeJS](#support) - - [React Native / Expo](#react-native--expo) -- **Secure** - Uses modern `crypto` API for random values -- **Compact** - Zero-dependency, [tree-shakable](https://developer.mozilla.org/en-US/docs/Glossary/Tree_shaking) -- **CLI** - [`uuid` command line](#command-line) utility - - -> [!NOTE] -> `uuid@11` is now available: See the [CHANGELOG](./CHANGELOG.md) for details. TL;DR: -> * TypeScript support is now included (remove `@types/uuid` from your dependencies) -> * Subtle changes to how the `options` arg is interpreted for `v1()`, `v6()`, and `v7()`. [See details](#options-handling-for-timestamp-uuids) -> * Binary UUIDs are now `Uint8Array`s. (May impact callers of `parse()`, `stringify()`, or that pass an `option#buf` argument to `v1()`-`v7()`.) - -## Quickstart - -**1. Install** - -```shell -npm install uuid -``` - -**2. Create a UUID** - -ESM-syntax (must use named exports): - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' -``` - -... CommonJS: - -```javascript -const { v4: uuidv4 } = require('uuid'); -uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' -``` - -For timestamp UUIDs, namespace UUIDs, and other options read on ... - -## API Summary - -| | | | -| --- | --- | --- | -| [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` | -| [`uuid.MAX`](#uuidmax) | The max UUID string (all ones) | New in `uuid@9.1` | -| [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` | -| [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` | -| [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID | | -| [`uuid.v1ToV6()`](#uuidv1tov6uuid) | Create a version 6 UUID from a version 1 UUID | New in `uuid@10` | -| [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | | -| [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | | -| [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | | -| [`uuid.v6()`](#uuidv6options-buffer-offset) | Create a version 6 (timestamp, reordered) UUID | New in `uuid@10` | -| [`uuid.v6ToV1()`](#uuidv6tov1uuid) | Create a version 1 UUID from a version 6 UUID | New in `uuid@10` | -| [`uuid.v7()`](#uuidv7options-buffer-offset) | Create a version 7 (Unix Epoch time-based) UUID | New in `uuid@10` | -| ~~[`uuid.v8()`](#uuidv8)~~ | "Intentionally left blank" | | -| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` | -| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` | - -## API - -### uuid.NIL - -The nil UUID string (all zeros). - -Example: - -```javascript -import { NIL as NIL_UUID } from 'uuid'; - -NIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000' -``` - -### uuid.MAX - -The max UUID string (all ones). - -Example: - -```javascript -import { MAX as MAX_UUID } from 'uuid'; - -MAX_UUID; // ⇨ 'ffffffff-ffff-ffff-ffff-ffffffffffff' -``` - -### uuid.parse(str) - -Convert UUID string to array of bytes - -| | | -| --------- | ---------------------------------------- | -| `str` | A valid UUID `String` | -| _returns_ | `Uint8Array[16]` | -| _throws_ | `TypeError` if `str` is not a valid UUID | - - -> [!NOTE] -> Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. - -Example: - -```javascript -import { parse as uuidParse } from 'uuid'; - -// Parse a UUID -uuidParse('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ -// Uint8Array(16) [ -// 110, 192, 189, 127, 17, -// 192, 67, 218, 151, 94, -// 42, 138, 217, 235, 174, -// 11 -// ] -``` - -### uuid.stringify(arr[, offset]) - -Convert array of bytes to UUID string - -| | | -| -------------- | ---------------------------------------------------------------------------- | -| `arr` | `Array`-like collection of 16 values (starting from `offset`) between 0-255. | -| [`offset` = 0] | `Number` Starting index in the Array | -| _returns_ | `String` | -| _throws_ | `TypeError` if a valid UUID string cannot be generated | - - -> [!NOTE] -> Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. - -Example: - -```javascript -import { stringify as uuidStringify } from 'uuid'; - -const uuidBytes = Uint8Array.of( - 0x6e, - 0xc0, - 0xbd, - 0x7f, - 0x11, - 0xc0, - 0x43, - 0xda, - 0x97, - 0x5e, - 0x2a, - 0x8a, - 0xd9, - 0xeb, - 0xae, - 0x0b -); - -uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b' -``` - -### uuid.v1([options[, buffer[, offset]]]) - -Create an RFC version 1 (timestamp) UUID - -| | | -| --- | --- | -| [`options`] | `Object` with one or more of the following properties: | -| [`options.node = (random)` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) | -| [`options.clockseq = (random)`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff | -| [`options.msecs = (current time)`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) | -| [`options.nsecs = 0`] | RFC "timestamp" field (`Number` of nanoseconds to add to `msecs`, should be 0-10,000) | -| [`options.random = (random)`] | `Array` of 16 random bytes (0-255) used to generate other fields, above | -| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | -| [`buffer`] | `Uint8Array` or `Uint8Array` subtype (e.g. Node.js `Buffer`). If provided, binary UUID is written into the array, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | -| _throws_ | `Error` if more than 10M UUIDs/sec are requested | - - -> [!NOTE] -> The default [node id](https://datatracker.ietf.org/doc/html/rfc9562#section-5.1) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. - - -> [!NOTE] -> `options.random` and `options.rng` are only meaningful on the very first call to `v1()`, where they may be passed to initialize the internal `node` and `clockseq` fields. - -Example: - -```javascript -import { v1 as uuidv1 } from 'uuid'; - -uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-9bdd-2b0d7b3dcb6d' -``` - -Example using `options`: - -```javascript -import { v1 as uuidv1 } from 'uuid'; - -const options = { - node: Uint8Array.of(0x01, 0x23, 0x45, 0x67, 0x89, 0xab), - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678, -}; -uuidv1(options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' -``` - -### uuid.v1ToV6(uuid) - -Convert a UUID from version 1 to version 6 - -```javascript -import { v1ToV6 } from 'uuid'; - -v1ToV6('92f62d9e-22c4-11ef-97e9-325096b39f47'); // ⇨ '1ef22c49-2f62-6d9e-97e9-325096b39f47' -``` - -### uuid.v3(name, namespace[, buffer[, offset]]) - -Create an RFC version 3 (namespace w/ MD5) UUID - -API is identical to `v5()`, but uses "v3" instead. - - -> [!IMPORTANT] -> Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_." - -### uuid.v4([options[, buffer[, offset]]]) - -Create an RFC version 4 (random) UUID - -| | | -| --- | --- | -| [`options`] | `Object` with one or more of the following properties: | -| [`options.random`] | `Array` of 16 random bytes (0-255) | -| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | -| [`buffer`] | `Uint8Array` or `Uint8Array` subtype (e.g. Node.js `Buffer`). If provided, binary UUID is written into the array, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | - -Example: - -```javascript -import { v4 as uuidv4 } from 'uuid'; - -uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' -``` - -Example using predefined `random` values: - -```javascript -import { v4 as uuidv4 } from 'uuid'; - -const v4options = { - random: Uint8Array.of( - 0x10, - 0x91, - 0x56, - 0xbe, - 0xc4, - 0xfb, - 0xc1, - 0xea, - 0x71, - 0xb4, - 0xef, - 0xe1, - 0x67, - 0x1c, - 0x58, - 0x36 - ), -}; -uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' -``` - -### uuid.v5(name, namespace[, buffer[, offset]]) - -Create an RFC version 5 (namespace w/ SHA-1) UUID - -| | | -| --- | --- | -| `name` | `String \| Array` | -| `namespace` | `String \| Array[16]` Namespace UUID | -| [`buffer`] | `Uint8Array` or `Uint8Array` subtype (e.g. Node.js `Buffer`). If provided, binary UUID is written into the array, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | - - -> [!NOTE] -> The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`. - -Example with custom namespace: - -```javascript -import { v5 as uuidv5 } from 'uuid'; - -// Define a custom namespace. Readers, create your own using something like -// https://www.uuidgenerator.net/ -const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; - -uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' -``` - -Example with RFC `URL` namespace: - -```javascript -import { v5 as uuidv5 } from 'uuid'; - -uuidv5('https://www.w3.org/', uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1' -``` - -### uuid.v6([options[, buffer[, offset]]]) - -Create an RFC version 6 (timestamp, reordered) UUID - -This method takes the same arguments as uuid.v1(). - -```javascript -import { v6 as uuidv6 } from 'uuid'; - -uuidv6(); // ⇨ '1e940672-c5ea-64c0-9b5d-ab8dfbbd4bed' -``` - -Example using `options`: - -```javascript -import { v6 as uuidv6 } from 'uuid'; - -const options = { - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678, -}; -uuidv6(options); // ⇨ '1e1041c7-10b9-662e-9234-0123456789ab' -``` - -### uuid.v6ToV1(uuid) - -Convert a UUID from version 6 to version 1 - -```javascript -import { v6ToV1 } from 'uuid'; - -v6ToV1('1ef22c49-2f62-6d9e-97e9-325096b39f47'); // ⇨ '92f62d9e-22c4-11ef-97e9-325096b39f47' -``` - -### uuid.v7([options[, buffer[, offset]]]) - -Create an RFC version 7 (random) UUID - -| | | -| --- | --- | -| [`options`] | `Object` with one or more of the following properties: | -| [`options.msecs = (current time)`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) | -| [`options.random = (random)`] | `Array` of 16 random bytes (0-255) used to generate other fields, above | -| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | -| [`options.seq = (random)`] | 32-bit sequence `Number` between 0 - 0xffffffff. This may be provided to help ensure uniqueness for UUIDs generated within the same millisecond time interval. Default = random value. | -| [`buffer`] | `Uint8Array` or `Uint8Array` subtype (e.g. Node.js `Buffer`). If provided, binary UUID is written into the array, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | - -Example: - -```javascript -import { v7 as uuidv7 } from 'uuid'; - -uuidv7(); // ⇨ '01695553-c90c-705a-b56d-778dfbbd4bed' -``` - -### ~~uuid.v8()~~ - -**_"Intentionally left blank"_** - - -> [!NOTE] -> Version 8 (experimental) UUIDs are "[for experimental or vendor-specific use cases](https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-8)". The RFC does not define a creation algorithm for them, which is why this package does not offer a `v8()` method. The `validate()` and `version()` methods do work with such UUIDs, however. - -### uuid.validate(str) - -Test a string to see if it is a valid UUID - -| | | -| --------- | --------------------------------------------------- | -| `str` | `String` to validate | -| _returns_ | `true` if string is a valid UUID, `false` otherwise | - -Example: - -```javascript -import { validate as uuidValidate } from 'uuid'; - -uuidValidate('not a UUID'); // ⇨ false -uuidValidate('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ true -``` - -Using `validate` and `version` together it is possible to do per-version validation, e.g. validate for only v4 UUIds. - -```javascript -import { version as uuidVersion } from 'uuid'; -import { validate as uuidValidate } from 'uuid'; - -function uuidValidateV4(uuid) { - return uuidValidate(uuid) && uuidVersion(uuid) === 4; -} - -const v1Uuid = 'd9428888-122b-11e1-b85c-61cd3cbb3210'; -const v4Uuid = '109156be-c4fb-41ea-b1b4-efe1671c5836'; - -uuidValidateV4(v4Uuid); // ⇨ true -uuidValidateV4(v1Uuid); // ⇨ false -``` - -### uuid.version(str) - -Detect RFC version of a UUID - -| | | -| --------- | ---------------------------------------- | -| `str` | A valid UUID `String` | -| _returns_ | `Number` The RFC version of the UUID | -| _throws_ | `TypeError` if `str` is not a valid UUID | - -Example: - -```javascript -import { version as uuidVersion } from 'uuid'; - -uuidVersion('45637ec4-c85f-11ea-87d0-0242ac130003'); // ⇨ 1 -uuidVersion('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ 4 -``` - - -> [!NOTE] -> This method returns `0` for the `NIL` UUID, and `15` for the `MAX` UUID. - -## Command Line - -UUIDs can be generated from the command line using `uuid`. - -```shell -$ npx uuid -ddeb27fb-d9a0-4624-be4d-4615062daed4 -``` - -The default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details: - -```shell -$ npx uuid --help - -Usage: - uuid - uuid v1 - uuid v3 - uuid v4 - uuid v5 - uuid v7 - uuid --help - -Note: may be "URL" or "DNS" to use the corresponding UUIDs -defined by RFC9562 -``` - -## `options` Handling for Timestamp UUIDs - -Prior to `uuid@11`, it was possible for `options` state to interfere with the internal state used to ensure uniqueness of timestamp-based UUIDs (the `v1()`, `v6()`, and `v7()` methods). Starting with `uuid@11`, this issue has been addressed by using the presence of the `options` argument as a flag to select between two possible behaviors: - -- Without `options`: Internal state is utilized to improve UUID uniqueness. -- With `options`: Internal state is **NOT** used and, instead, appropriate defaults are applied as needed. - -## Support - -**Browsers**: `uuid` [builds are tested](/uuidjs/uuid/blob/main/wdio.conf.js) against the latest version of desktop Chrome, Safari, Firefox, and Edge. Mobile versions of these same browsers are expected to work but aren't currently tested. - -**Node**: `uuid` [builds are tested](https://github.com/uuidjs/uuid/blob/main/.github/workflows/ci.yml#L26-L27) against node ([LTS releases](https://github.com/nodejs/Release)), plus one prior. E.g. `node@18` is in maintainence mode, and `node@22` is the current LTS release. So `uuid` supports `node@16`-`node@22`. - -**Typescript**: TS versions released within the past two years are supported. [source](https://github.com/microsoft/TypeScript/issues/49088#issuecomment-2468723715) - -## Known issues - - - -### "getRandomValues() not supported" - -This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill: - -#### React Native / Expo - -1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) -1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point: - -```javascript -import 'react-native-get-random-values'; -import { v4 as uuidv4 } from 'uuid'; -``` - ---- - -Markdown generated from [README_js.md](README_js.md) by diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/index.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/index.d.ts deleted file mode 100644 index d7d4edc..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export type * from './types.js'; -export { default as MAX } from './max.js'; -export { default as NIL } from './nil.js'; -export { default as parse } from './parse.js'; -export { default as stringify } from './stringify.js'; -export { default as v1 } from './v1.js'; -export { default as v1ToV6 } from './v1ToV6.js'; -export { default as v3 } from './v3.js'; -export { default as v4 } from './v4.js'; -export { default as v5 } from './v5.js'; -export { default as v6 } from './v6.js'; -export { default as v6ToV1 } from './v6ToV1.js'; -export { default as v7 } from './v7.js'; -export { default as validate } from './validate.js'; -export { default as version } from './version.js'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/index.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/index.js deleted file mode 100644 index 6148ea4..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/index.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.version = exports.validate = exports.v7 = exports.v6ToV1 = exports.v6 = exports.v5 = exports.v4 = exports.v3 = exports.v1ToV6 = exports.v1 = exports.stringify = exports.parse = exports.NIL = exports.MAX = void 0; -var max_js_1 = require("./max.js"); -Object.defineProperty(exports, "MAX", { enumerable: true, get: function () { return max_js_1.default; } }); -var nil_js_1 = require("./nil.js"); -Object.defineProperty(exports, "NIL", { enumerable: true, get: function () { return nil_js_1.default; } }); -var parse_js_1 = require("./parse.js"); -Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parse_js_1.default; } }); -var stringify_js_1 = require("./stringify.js"); -Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return stringify_js_1.default; } }); -var v1_js_1 = require("./v1.js"); -Object.defineProperty(exports, "v1", { enumerable: true, get: function () { return v1_js_1.default; } }); -var v1ToV6_js_1 = require("./v1ToV6.js"); -Object.defineProperty(exports, "v1ToV6", { enumerable: true, get: function () { return v1ToV6_js_1.default; } }); -var v3_js_1 = require("./v3.js"); -Object.defineProperty(exports, "v3", { enumerable: true, get: function () { return v3_js_1.default; } }); -var v4_js_1 = require("./v4.js"); -Object.defineProperty(exports, "v4", { enumerable: true, get: function () { return v4_js_1.default; } }); -var v5_js_1 = require("./v5.js"); -Object.defineProperty(exports, "v5", { enumerable: true, get: function () { return v5_js_1.default; } }); -var v6_js_1 = require("./v6.js"); -Object.defineProperty(exports, "v6", { enumerable: true, get: function () { return v6_js_1.default; } }); -var v6ToV1_js_1 = require("./v6ToV1.js"); -Object.defineProperty(exports, "v6ToV1", { enumerable: true, get: function () { return v6ToV1_js_1.default; } }); -var v7_js_1 = require("./v7.js"); -Object.defineProperty(exports, "v7", { enumerable: true, get: function () { return v7_js_1.default; } }); -var validate_js_1 = require("./validate.js"); -Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return validate_js_1.default; } }); -var version_js_1 = require("./version.js"); -Object.defineProperty(exports, "version", { enumerable: true, get: function () { return version_js_1.default; } }); diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/max.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/max.d.ts deleted file mode 100644 index 7a1e972..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/max.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "ffffffff-ffff-ffff-ffff-ffffffffffff"; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/max.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/max.js deleted file mode 100644 index 7ba71ef..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/max.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = 'ffffffff-ffff-ffff-ffff-ffffffffffff'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/md5.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/md5.d.ts deleted file mode 100644 index 5a55f51..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/md5.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function md5(bytes: Uint8Array): Uint8Array; -export default md5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/md5.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/md5.js deleted file mode 100644 index 004b3d6..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/md5.js +++ /dev/null @@ -1,137 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function md5(bytes) { - const words = uint8ToUint32(bytes); - const md5Bytes = wordsToMd5(words, bytes.length * 8); - return uint32ToUint8(md5Bytes); -} -function uint32ToUint8(input) { - const bytes = new Uint8Array(input.length * 4); - for (let i = 0; i < input.length * 4; i++) { - bytes[i] = (input[i >> 2] >>> ((i % 4) * 8)) & 0xff; - } - return bytes; -} -function getOutputLength(inputLength8) { - return (((inputLength8 + 64) >>> 9) << 4) + 14 + 1; -} -function wordsToMd5(x, len) { - const xpad = new Uint32Array(getOutputLength(len)).fill(0); - xpad.set(x); - xpad[len >> 5] |= 0x80 << len % 32; - xpad[xpad.length - 1] = len; - x = xpad; - let a = 1732584193; - let b = -271733879; - let c = -1732584194; - let d = 271733878; - for (let i = 0; i < x.length; i += 16) { - const olda = a; - const oldb = b; - const oldc = c; - const oldd = d; - a = md5ff(a, b, c, d, x[i], 7, -680876936); - d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); - c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); - b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); - a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); - d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); - c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); - b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); - a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); - d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); - c = md5ff(c, d, a, b, x[i + 10], 17, -42063); - b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); - a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); - d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); - c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); - b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); - a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); - d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); - c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); - b = md5gg(b, c, d, a, x[i], 20, -373897302); - a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); - d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); - c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); - b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); - a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); - d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); - c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); - b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); - a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); - d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); - c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); - b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); - a = md5hh(a, b, c, d, x[i + 5], 4, -378558); - d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); - c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); - b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); - a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); - d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); - c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); - b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); - a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); - d = md5hh(d, a, b, c, x[i], 11, -358537222); - c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); - b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); - a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); - d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); - c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); - b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); - a = md5ii(a, b, c, d, x[i], 6, -198630844); - d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); - c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); - b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); - a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); - d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); - c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); - b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); - a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); - d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); - c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); - b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); - a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); - d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); - c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); - b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); - a = safeAdd(a, olda); - b = safeAdd(b, oldb); - c = safeAdd(c, oldc); - d = safeAdd(d, oldd); - } - return Uint32Array.of(a, b, c, d); -} -function uint8ToUint32(input) { - if (input.length === 0) { - return new Uint32Array(); - } - const output = new Uint32Array(getOutputLength(input.length * 8)).fill(0); - for (let i = 0; i < input.length; i++) { - output[i >> 2] |= (input[i] & 0xff) << ((i % 4) * 8); - } - return output; -} -function safeAdd(x, y) { - const lsw = (x & 0xffff) + (y & 0xffff); - const msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xffff); -} -function bitRotateLeft(num, cnt) { - return (num << cnt) | (num >>> (32 - cnt)); -} -function md5cmn(q, a, b, x, s, t) { - return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); -} -function md5ff(a, b, c, d, x, s, t) { - return md5cmn((b & c) | (~b & d), a, b, x, s, t); -} -function md5gg(a, b, c, d, x, s, t) { - return md5cmn((b & d) | (c & ~d), a, b, x, s, t); -} -function md5hh(a, b, c, d, x, s, t) { - return md5cmn(b ^ c ^ d, a, b, x, s, t); -} -function md5ii(a, b, c, d, x, s, t) { - return md5cmn(c ^ (b | ~d), a, b, x, s, t); -} -exports.default = md5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/native.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/native.d.ts deleted file mode 100644 index 9418fd3..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/native.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare const _default: { - randomUUID: false | (() => `${string}-${string}-${string}-${string}-${string}`); -}; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/native.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/native.js deleted file mode 100644 index 7e31a2a..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/native.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); -exports.default = { randomUUID }; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/nil.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/nil.d.ts deleted file mode 100644 index b03bb98..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/nil.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "00000000-0000-0000-0000-000000000000"; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/nil.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/nil.js deleted file mode 100644 index 5828aa4..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/nil.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = '00000000-0000-0000-0000-000000000000'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/package.json b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/package.json deleted file mode 100644 index 729ac4d..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"commonjs"} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/parse.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/parse.d.ts deleted file mode 100644 index a316fb1..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/parse.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function parse(uuid: string): Uint8Array; -export default parse; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/parse.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/parse.js deleted file mode 100644 index d2fa8ca..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/parse.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const validate_js_1 = require("./validate.js"); -function parse(uuid) { - if (!(0, validate_js_1.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - let v; - return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 0xff, ((v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000) & 0xff, (v / 0x100000000) & 0xff, (v >>> 24) & 0xff, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff); -} -exports.default = parse; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/regex.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/regex.d.ts deleted file mode 100644 index d39fa3f..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/regex.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: RegExp; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/regex.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/regex.js deleted file mode 100644 index e3dde2a..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/regex.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/rng.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/rng.d.ts deleted file mode 100644 index 73e60cf..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/rng.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function rng(): Uint8Array; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/rng.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/rng.js deleted file mode 100644 index 155bcd7..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/rng.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -let getRandomValues; -const rnds8 = new Uint8Array(16); -function rng() { - if (!getRandomValues) { - if (typeof crypto === 'undefined' || !crypto.getRandomValues) { - throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); - } - getRandomValues = crypto.getRandomValues.bind(crypto); - } - return getRandomValues(rnds8); -} -exports.default = rng; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/sha1.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/sha1.d.ts deleted file mode 100644 index a6552e5..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/sha1.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function sha1(bytes: Uint8Array): Uint8Array; -export default sha1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/sha1.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/sha1.js deleted file mode 100644 index 031c42c..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/sha1.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function f(s, x, y, z) { - switch (s) { - case 0: - return (x & y) ^ (~x & z); - case 1: - return x ^ y ^ z; - case 2: - return (x & y) ^ (x & z) ^ (y & z); - case 3: - return x ^ y ^ z; - } -} -function ROTL(x, n) { - return (x << n) | (x >>> (32 - n)); -} -function sha1(bytes) { - const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; - const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; - const newBytes = new Uint8Array(bytes.length + 1); - newBytes.set(bytes); - newBytes[bytes.length] = 0x80; - bytes = newBytes; - const l = bytes.length / 4 + 2; - const N = Math.ceil(l / 16); - const M = new Array(N); - for (let i = 0; i < N; ++i) { - const arr = new Uint32Array(16); - for (let j = 0; j < 16; ++j) { - arr[j] = - (bytes[i * 64 + j * 4] << 24) | - (bytes[i * 64 + j * 4 + 1] << 16) | - (bytes[i * 64 + j * 4 + 2] << 8) | - bytes[i * 64 + j * 4 + 3]; - } - M[i] = arr; - } - M[N - 1][14] = ((bytes.length - 1) * 8) / Math.pow(2, 32); - M[N - 1][14] = Math.floor(M[N - 1][14]); - M[N - 1][15] = ((bytes.length - 1) * 8) & 0xffffffff; - for (let i = 0; i < N; ++i) { - const W = new Uint32Array(80); - for (let t = 0; t < 16; ++t) { - W[t] = M[i][t]; - } - for (let t = 16; t < 80; ++t) { - W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1); - } - let a = H[0]; - let b = H[1]; - let c = H[2]; - let d = H[3]; - let e = H[4]; - for (let t = 0; t < 80; ++t) { - const s = Math.floor(t / 20); - const T = (ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t]) >>> 0; - e = d; - d = c; - c = ROTL(b, 30) >>> 0; - b = a; - a = T; - } - H[0] = (H[0] + a) >>> 0; - H[1] = (H[1] + b) >>> 0; - H[2] = (H[2] + c) >>> 0; - H[3] = (H[3] + d) >>> 0; - H[4] = (H[4] + e) >>> 0; - } - return Uint8Array.of(H[0] >> 24, H[0] >> 16, H[0] >> 8, H[0], H[1] >> 24, H[1] >> 16, H[1] >> 8, H[1], H[2] >> 24, H[2] >> 16, H[2] >> 8, H[2], H[3] >> 24, H[3] >> 16, H[3] >> 8, H[3], H[4] >> 24, H[4] >> 16, H[4] >> 8, H[4]); -} -exports.default = sha1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/stringify.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/stringify.d.ts deleted file mode 100644 index 16cb008..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/stringify.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare function unsafeStringify(arr: Uint8Array, offset?: number): string; -declare function stringify(arr: Uint8Array, offset?: number): string; -export default stringify; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/stringify.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/stringify.js deleted file mode 100644 index 2ba27bb..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/stringify.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.unsafeStringify = void 0; -const validate_js_1 = require("./validate.js"); -const byteToHex = []; -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} -function unsafeStringify(arr, offset = 0) { - return (byteToHex[arr[offset + 0]] + - byteToHex[arr[offset + 1]] + - byteToHex[arr[offset + 2]] + - byteToHex[arr[offset + 3]] + - '-' + - byteToHex[arr[offset + 4]] + - byteToHex[arr[offset + 5]] + - '-' + - byteToHex[arr[offset + 6]] + - byteToHex[arr[offset + 7]] + - '-' + - byteToHex[arr[offset + 8]] + - byteToHex[arr[offset + 9]] + - '-' + - byteToHex[arr[offset + 10]] + - byteToHex[arr[offset + 11]] + - byteToHex[arr[offset + 12]] + - byteToHex[arr[offset + 13]] + - byteToHex[arr[offset + 14]] + - byteToHex[arr[offset + 15]]).toLowerCase(); -} -exports.unsafeStringify = unsafeStringify; -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); - if (!(0, validate_js_1.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - return uuid; -} -exports.default = stringify; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/types.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/types.d.ts deleted file mode 100644 index ecaed97..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/types.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export type UUIDTypes = string | TBuf; -export type Version1Options = { - node?: Uint8Array; - clockseq?: number; - random?: Uint8Array; - rng?: () => Uint8Array; - msecs?: number; - nsecs?: number; - _v6?: boolean; -}; -export type Version4Options = { - random?: Uint8Array; - rng?: () => Uint8Array; -}; -export type Version6Options = Version1Options; -export type Version7Options = { - random?: Uint8Array; - msecs?: number; - seq?: number; - rng?: () => Uint8Array; -}; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/types.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/types.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/types.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/uuid-bin.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/uuid-bin.js deleted file mode 100644 index d613137..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/uuid-bin.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const assert = require("assert"); -const v1_js_1 = require("./v1.js"); -const v3_js_1 = require("./v3.js"); -const v4_js_1 = require("./v4.js"); -const v5_js_1 = require("./v5.js"); -const v6_js_1 = require("./v6.js"); -const v7_js_1 = require("./v7.js"); -function usage() { - console.log('Usage:'); - console.log(' uuid'); - console.log(' uuid v1'); - console.log(' uuid v3 '); - console.log(' uuid v4'); - console.log(' uuid v5 '); - console.log(' uuid v6'); - console.log(' uuid v7'); - console.log(' uuid --help'); - console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC9562'); -} -const args = process.argv.slice(2); -if (args.indexOf('--help') >= 0) { - usage(); - process.exit(0); -} -const version = args.shift() || 'v4'; -switch (version) { - case 'v1': - console.log((0, v1_js_1.default)()); - break; - case 'v3': { - const name = args.shift(); - let namespace = args.shift(); - assert.ok(name != null, 'v3 name not specified'); - assert.ok(namespace != null, 'v3 namespace not specified'); - if (namespace === 'URL') { - namespace = v3_js_1.default.URL; - } - if (namespace === 'DNS') { - namespace = v3_js_1.default.DNS; - } - console.log((0, v3_js_1.default)(name, namespace)); - break; - } - case 'v4': - console.log((0, v4_js_1.default)()); - break; - case 'v5': { - const name = args.shift(); - let namespace = args.shift(); - assert.ok(name != null, 'v5 name not specified'); - assert.ok(namespace != null, 'v5 namespace not specified'); - if (namespace === 'URL') { - namespace = v5_js_1.default.URL; - } - if (namespace === 'DNS') { - namespace = v5_js_1.default.DNS; - } - console.log((0, v5_js_1.default)(name, namespace)); - break; - } - case 'v6': - console.log((0, v6_js_1.default)()); - break; - case 'v7': - console.log((0, v7_js_1.default)()); - break; - default: - usage(); - process.exit(1); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v1.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v1.d.ts deleted file mode 100644 index d8ecee0..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v1.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Version1Options } from './types.js'; -type V1State = { - node?: Uint8Array; - clockseq?: number; - msecs?: number; - nsecs?: number; -}; -declare function v1(options?: Version1Options, buf?: undefined, offset?: number): string; -declare function v1(options: Version1Options | undefined, buf: Buf, offset?: number): Buf; -export declare function updateV1State(state: V1State, now: number, rnds: Uint8Array): V1State; -export default v1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v1.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v1.js deleted file mode 100644 index 155b80d..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v1.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.updateV1State = void 0; -const rng_js_1 = require("./rng.js"); -const stringify_js_1 = require("./stringify.js"); -const _state = {}; -function v1(options, buf, offset) { - let bytes; - const isV6 = options?._v6 ?? false; - if (options) { - const optionsKeys = Object.keys(options); - if (optionsKeys.length === 1 && optionsKeys[0] === '_v6') { - options = undefined; - } - } - if (options) { - bytes = v1Bytes(options.random ?? options.rng?.() ?? (0, rng_js_1.default)(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset); - } - else { - const now = Date.now(); - const rnds = (0, rng_js_1.default)(); - updateV1State(_state, now, rnds); - bytes = v1Bytes(rnds, _state.msecs, _state.nsecs, isV6 ? undefined : _state.clockseq, isV6 ? undefined : _state.node, buf, offset); - } - return buf ?? (0, stringify_js_1.unsafeStringify)(bytes); -} -function updateV1State(state, now, rnds) { - state.msecs ??= -Infinity; - state.nsecs ??= 0; - if (now === state.msecs) { - state.nsecs++; - if (state.nsecs >= 10000) { - state.node = undefined; - state.nsecs = 0; - } - } - else if (now > state.msecs) { - state.nsecs = 0; - } - else if (now < state.msecs) { - state.node = undefined; - } - if (!state.node) { - state.node = rnds.slice(10, 16); - state.node[0] |= 0x01; - state.clockseq = ((rnds[8] << 8) | rnds[9]) & 0x3fff; - } - state.msecs = now; - return state; -} -exports.updateV1State = updateV1State; -function v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) { - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - if (!buf) { - buf = new Uint8Array(16); - offset = 0; - } - else { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - } - msecs ??= Date.now(); - nsecs ??= 0; - clockseq ??= ((rnds[8] << 8) | rnds[9]) & 0x3fff; - node ??= rnds.slice(10, 16); - msecs += 12219292800000; - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - buf[offset++] = (tl >>> 24) & 0xff; - buf[offset++] = (tl >>> 16) & 0xff; - buf[offset++] = (tl >>> 8) & 0xff; - buf[offset++] = tl & 0xff; - const tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff; - buf[offset++] = (tmh >>> 8) & 0xff; - buf[offset++] = tmh & 0xff; - buf[offset++] = ((tmh >>> 24) & 0xf) | 0x10; - buf[offset++] = (tmh >>> 16) & 0xff; - buf[offset++] = (clockseq >>> 8) | 0x80; - buf[offset++] = clockseq & 0xff; - for (let n = 0; n < 6; ++n) { - buf[offset++] = node[n]; - } - return buf; -} -exports.default = v1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts deleted file mode 100644 index 38eaaf0..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default function v1ToV6(uuid: string): string; -export default function v1ToV6(uuid: Uint8Array): Uint8Array; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v1ToV6.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v1ToV6.js deleted file mode 100644 index daba2c3..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v1ToV6.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const parse_js_1 = require("./parse.js"); -const stringify_js_1 = require("./stringify.js"); -function v1ToV6(uuid) { - const v1Bytes = typeof uuid === 'string' ? (0, parse_js_1.default)(uuid) : uuid; - const v6Bytes = _v1ToV6(v1Bytes); - return typeof uuid === 'string' ? (0, stringify_js_1.unsafeStringify)(v6Bytes) : v6Bytes; -} -exports.default = v1ToV6; -function _v1ToV6(v1Bytes) { - return Uint8Array.of(((v1Bytes[6] & 0x0f) << 4) | ((v1Bytes[7] >> 4) & 0x0f), ((v1Bytes[7] & 0x0f) << 4) | ((v1Bytes[4] & 0xf0) >> 4), ((v1Bytes[4] & 0x0f) << 4) | ((v1Bytes[5] & 0xf0) >> 4), ((v1Bytes[5] & 0x0f) << 4) | ((v1Bytes[0] & 0xf0) >> 4), ((v1Bytes[0] & 0x0f) << 4) | ((v1Bytes[1] & 0xf0) >> 4), ((v1Bytes[1] & 0x0f) << 4) | ((v1Bytes[2] & 0xf0) >> 4), 0x60 | (v1Bytes[2] & 0x0f), v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v3.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v3.d.ts deleted file mode 100644 index 5d1c434..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v3.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { UUIDTypes } from './types.js'; -export { DNS, URL } from './v35.js'; -declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string; -declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf: TBuf, offset?: number): TBuf; -declare namespace v3 { - var DNS: string; - var URL: string; -} -export default v3; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v3.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v3.js deleted file mode 100644 index d318d2a..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v3.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.URL = exports.DNS = void 0; -const md5_js_1 = require("./md5.js"); -const v35_js_1 = require("./v35.js"); -var v35_js_2 = require("./v35.js"); -Object.defineProperty(exports, "DNS", { enumerable: true, get: function () { return v35_js_2.DNS; } }); -Object.defineProperty(exports, "URL", { enumerable: true, get: function () { return v35_js_2.URL; } }); -function v3(value, namespace, buf, offset) { - return (0, v35_js_1.default)(0x30, md5_js_1.default, value, namespace, buf, offset); -} -v3.DNS = v35_js_1.DNS; -v3.URL = v35_js_1.URL; -exports.default = v3; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v35.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v35.d.ts deleted file mode 100644 index 4e6e9d5..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v35.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { UUIDTypes } from './types.js'; -export declare function stringToBytes(str: string): Uint8Array; -export declare const DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; -export declare const URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; -type HashFunction = (bytes: Uint8Array) => Uint8Array; -export default function v35(version: 0x30 | 0x50, hash: HashFunction, value: string | Uint8Array, namespace: UUIDTypes, buf?: TBuf, offset?: number): UUIDTypes; -export {}; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v35.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v35.js deleted file mode 100644 index b8b8e09..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v35.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.URL = exports.DNS = exports.stringToBytes = void 0; -const parse_js_1 = require("./parse.js"); -const stringify_js_1 = require("./stringify.js"); -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); - const bytes = new Uint8Array(str.length); - for (let i = 0; i < str.length; ++i) { - bytes[i] = str.charCodeAt(i); - } - return bytes; -} -exports.stringToBytes = stringToBytes; -exports.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -function v35(version, hash, value, namespace, buf, offset) { - const valueBytes = typeof value === 'string' ? stringToBytes(value) : value; - const namespaceBytes = typeof namespace === 'string' ? (0, parse_js_1.default)(namespace) : namespace; - if (typeof namespace === 'string') { - namespace = (0, parse_js_1.default)(namespace); - } - if (namespace?.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } - let bytes = new Uint8Array(16 + valueBytes.length); - bytes.set(namespaceBytes); - bytes.set(valueBytes, namespaceBytes.length); - bytes = hash(bytes); - bytes[6] = (bytes[6] & 0x0f) | version; - bytes[8] = (bytes[8] & 0x3f) | 0x80; - if (buf) { - offset = offset || 0; - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return (0, stringify_js_1.unsafeStringify)(bytes); -} -exports.default = v35; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v4.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v4.d.ts deleted file mode 100644 index 8205333..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v4.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Version4Options } from './types.js'; -declare function v4(options?: Version4Options, buf?: undefined, offset?: number): string; -declare function v4(options: Version4Options | undefined, buf: TBuf, offset?: number): TBuf; -export default v4; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v4.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v4.js deleted file mode 100644 index 69c975e..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v4.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const native_js_1 = require("./native.js"); -const rng_js_1 = require("./rng.js"); -const stringify_js_1 = require("./stringify.js"); -function v4(options, buf, offset) { - if (native_js_1.default.randomUUID && !buf && !options) { - return native_js_1.default.randomUUID(); - } - options = options || {}; - const rnds = options.random ?? options.rng?.() ?? (0, rng_js_1.default)(); - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - if (buf) { - offset = offset || 0; - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - return buf; - } - return (0, stringify_js_1.unsafeStringify)(rnds); -} -exports.default = v4; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v5.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v5.d.ts deleted file mode 100644 index 0e2ff2f..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v5.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { UUIDTypes } from './types.js'; -export { DNS, URL } from './v35.js'; -declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string; -declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf: TBuf, offset?: number): TBuf; -declare namespace v5 { - var DNS: string; - var URL: string; -} -export default v5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v5.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v5.js deleted file mode 100644 index c4239c2..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v5.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.URL = exports.DNS = void 0; -const sha1_js_1 = require("./sha1.js"); -const v35_js_1 = require("./v35.js"); -var v35_js_2 = require("./v35.js"); -Object.defineProperty(exports, "DNS", { enumerable: true, get: function () { return v35_js_2.DNS; } }); -Object.defineProperty(exports, "URL", { enumerable: true, get: function () { return v35_js_2.URL; } }); -function v5(value, namespace, buf, offset) { - return (0, v35_js_1.default)(0x50, sha1_js_1.default, value, namespace, buf, offset); -} -v5.DNS = v35_js_1.DNS; -v5.URL = v35_js_1.URL; -exports.default = v5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v6.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v6.d.ts deleted file mode 100644 index cabf4a0..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v6.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Version6Options } from './types.js'; -declare function v6(options?: Version6Options, buf?: undefined, offset?: number): string; -declare function v6(options: Version6Options | undefined, buf: TBuf, offset?: number): TBuf; -export default v6; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v6.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v6.js deleted file mode 100644 index a566d0a..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v6.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const stringify_js_1 = require("./stringify.js"); -const v1_js_1 = require("./v1.js"); -const v1ToV6_js_1 = require("./v1ToV6.js"); -function v6(options, buf, offset) { - options ??= {}; - offset ??= 0; - let bytes = (0, v1_js_1.default)({ ...options, _v6: true }, new Uint8Array(16)); - bytes = (0, v1ToV6_js_1.default)(bytes); - if (buf) { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; i++) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return (0, stringify_js_1.unsafeStringify)(bytes); -} -exports.default = v6; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts deleted file mode 100644 index 3b3ffc2..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default function v6ToV1(uuid: string): string; -export default function v6ToV1(uuid: Uint8Array): Uint8Array; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v6ToV1.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v6ToV1.js deleted file mode 100644 index 9dcb661..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v6ToV1.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const parse_js_1 = require("./parse.js"); -const stringify_js_1 = require("./stringify.js"); -function v6ToV1(uuid) { - const v6Bytes = typeof uuid === 'string' ? (0, parse_js_1.default)(uuid) : uuid; - const v1Bytes = _v6ToV1(v6Bytes); - return typeof uuid === 'string' ? (0, stringify_js_1.unsafeStringify)(v1Bytes) : v1Bytes; -} -exports.default = v6ToV1; -function _v6ToV1(v6Bytes) { - return Uint8Array.of(((v6Bytes[3] & 0x0f) << 4) | ((v6Bytes[4] >> 4) & 0x0f), ((v6Bytes[4] & 0x0f) << 4) | ((v6Bytes[5] & 0xf0) >> 4), ((v6Bytes[5] & 0x0f) << 4) | (v6Bytes[6] & 0x0f), v6Bytes[7], ((v6Bytes[1] & 0x0f) << 4) | ((v6Bytes[2] & 0xf0) >> 4), ((v6Bytes[2] & 0x0f) << 4) | ((v6Bytes[3] & 0xf0) >> 4), 0x10 | ((v6Bytes[0] & 0xf0) >> 4), ((v6Bytes[0] & 0x0f) << 4) | ((v6Bytes[1] & 0xf0) >> 4), v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v7.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v7.d.ts deleted file mode 100644 index f49b03d..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v7.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Version7Options } from './types.js'; -type V7State = { - msecs?: number; - seq?: number; -}; -declare function v7(options?: Version7Options, buf?: undefined, offset?: number): string; -declare function v7(options: Version7Options | undefined, buf: TBuf, offset?: number): TBuf; -export declare function updateV7State(state: V7State, now: number, rnds: Uint8Array): V7State; -export default v7; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v7.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v7.js deleted file mode 100644 index 697fe34..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/v7.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.updateV7State = void 0; -const rng_js_1 = require("./rng.js"); -const stringify_js_1 = require("./stringify.js"); -const _state = {}; -function v7(options, buf, offset) { - let bytes; - if (options) { - bytes = v7Bytes(options.random ?? options.rng?.() ?? (0, rng_js_1.default)(), options.msecs, options.seq, buf, offset); - } - else { - const now = Date.now(); - const rnds = (0, rng_js_1.default)(); - updateV7State(_state, now, rnds); - bytes = v7Bytes(rnds, _state.msecs, _state.seq, buf, offset); - } - return buf ?? (0, stringify_js_1.unsafeStringify)(bytes); -} -function updateV7State(state, now, rnds) { - state.msecs ??= -Infinity; - state.seq ??= 0; - if (now > state.msecs) { - state.seq = (rnds[6] << 23) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9]; - state.msecs = now; - } - else { - state.seq = (state.seq + 1) | 0; - if (state.seq === 0) { - state.msecs++; - } - } - return state; -} -exports.updateV7State = updateV7State; -function v7Bytes(rnds, msecs, seq, buf, offset = 0) { - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - if (!buf) { - buf = new Uint8Array(16); - offset = 0; - } - else { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - } - msecs ??= Date.now(); - seq ??= ((rnds[6] * 0x7f) << 24) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9]; - buf[offset++] = (msecs / 0x10000000000) & 0xff; - buf[offset++] = (msecs / 0x100000000) & 0xff; - buf[offset++] = (msecs / 0x1000000) & 0xff; - buf[offset++] = (msecs / 0x10000) & 0xff; - buf[offset++] = (msecs / 0x100) & 0xff; - buf[offset++] = msecs & 0xff; - buf[offset++] = 0x70 | ((seq >>> 28) & 0x0f); - buf[offset++] = (seq >>> 20) & 0xff; - buf[offset++] = 0x80 | ((seq >>> 14) & 0x3f); - buf[offset++] = (seq >>> 6) & 0xff; - buf[offset++] = ((seq << 2) & 0xff) | (rnds[10] & 0x03); - buf[offset++] = rnds[11]; - buf[offset++] = rnds[12]; - buf[offset++] = rnds[13]; - buf[offset++] = rnds[14]; - buf[offset++] = rnds[15]; - return buf; -} -exports.default = v7; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/validate.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/validate.d.ts deleted file mode 100644 index 57da03d..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/validate.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function validate(uuid: unknown): boolean; -export default validate; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/validate.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/validate.js deleted file mode 100644 index 89733b0..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/validate.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const regex_js_1 = require("./regex.js"); -function validate(uuid) { - return typeof uuid === 'string' && regex_js_1.default.test(uuid); -} -exports.default = validate; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/version.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/version.d.ts deleted file mode 100644 index f1948dc..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/version.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function version(uuid: string): number; -export default version; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/version.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/version.js deleted file mode 100644 index 05ecd00..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs-browser/version.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const validate_js_1 = require("./validate.js"); -function version(uuid) { - if (!(0, validate_js_1.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - return parseInt(uuid.slice(14, 15), 16); -} -exports.default = version; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/index.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/index.d.ts deleted file mode 100644 index d7d4edc..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export type * from './types.js'; -export { default as MAX } from './max.js'; -export { default as NIL } from './nil.js'; -export { default as parse } from './parse.js'; -export { default as stringify } from './stringify.js'; -export { default as v1 } from './v1.js'; -export { default as v1ToV6 } from './v1ToV6.js'; -export { default as v3 } from './v3.js'; -export { default as v4 } from './v4.js'; -export { default as v5 } from './v5.js'; -export { default as v6 } from './v6.js'; -export { default as v6ToV1 } from './v6ToV1.js'; -export { default as v7 } from './v7.js'; -export { default as validate } from './validate.js'; -export { default as version } from './version.js'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/index.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/index.js deleted file mode 100644 index 6148ea4..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/index.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.version = exports.validate = exports.v7 = exports.v6ToV1 = exports.v6 = exports.v5 = exports.v4 = exports.v3 = exports.v1ToV6 = exports.v1 = exports.stringify = exports.parse = exports.NIL = exports.MAX = void 0; -var max_js_1 = require("./max.js"); -Object.defineProperty(exports, "MAX", { enumerable: true, get: function () { return max_js_1.default; } }); -var nil_js_1 = require("./nil.js"); -Object.defineProperty(exports, "NIL", { enumerable: true, get: function () { return nil_js_1.default; } }); -var parse_js_1 = require("./parse.js"); -Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parse_js_1.default; } }); -var stringify_js_1 = require("./stringify.js"); -Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return stringify_js_1.default; } }); -var v1_js_1 = require("./v1.js"); -Object.defineProperty(exports, "v1", { enumerable: true, get: function () { return v1_js_1.default; } }); -var v1ToV6_js_1 = require("./v1ToV6.js"); -Object.defineProperty(exports, "v1ToV6", { enumerable: true, get: function () { return v1ToV6_js_1.default; } }); -var v3_js_1 = require("./v3.js"); -Object.defineProperty(exports, "v3", { enumerable: true, get: function () { return v3_js_1.default; } }); -var v4_js_1 = require("./v4.js"); -Object.defineProperty(exports, "v4", { enumerable: true, get: function () { return v4_js_1.default; } }); -var v5_js_1 = require("./v5.js"); -Object.defineProperty(exports, "v5", { enumerable: true, get: function () { return v5_js_1.default; } }); -var v6_js_1 = require("./v6.js"); -Object.defineProperty(exports, "v6", { enumerable: true, get: function () { return v6_js_1.default; } }); -var v6ToV1_js_1 = require("./v6ToV1.js"); -Object.defineProperty(exports, "v6ToV1", { enumerable: true, get: function () { return v6ToV1_js_1.default; } }); -var v7_js_1 = require("./v7.js"); -Object.defineProperty(exports, "v7", { enumerable: true, get: function () { return v7_js_1.default; } }); -var validate_js_1 = require("./validate.js"); -Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return validate_js_1.default; } }); -var version_js_1 = require("./version.js"); -Object.defineProperty(exports, "version", { enumerable: true, get: function () { return version_js_1.default; } }); diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/max.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/max.d.ts deleted file mode 100644 index 7a1e972..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/max.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "ffffffff-ffff-ffff-ffff-ffffffffffff"; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/max.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/max.js deleted file mode 100644 index 7ba71ef..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/max.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = 'ffffffff-ffff-ffff-ffff-ffffffffffff'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/md5.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/md5.d.ts deleted file mode 100644 index f8f6ecf..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/md5.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// -/// -declare function md5(bytes: Uint8Array): Buffer; -export default md5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/md5.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/md5.js deleted file mode 100644 index 7665013..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/md5.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const crypto_1 = require("crypto"); -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } - else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - return (0, crypto_1.createHash)('md5').update(bytes).digest(); -} -exports.default = md5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/native.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/native.d.ts deleted file mode 100644 index 2b6c756..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/native.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -import { randomUUID } from 'crypto'; -declare const _default: { - randomUUID: typeof randomUUID; -}; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/native.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/native.js deleted file mode 100644 index 1013e98..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/native.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const crypto_1 = require("crypto"); -exports.default = { randomUUID: crypto_1.randomUUID }; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/nil.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/nil.d.ts deleted file mode 100644 index b03bb98..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/nil.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "00000000-0000-0000-0000-000000000000"; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/nil.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/nil.js deleted file mode 100644 index 5828aa4..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/nil.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = '00000000-0000-0000-0000-000000000000'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/package.json b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/package.json deleted file mode 100644 index 729ac4d..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"commonjs"} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/parse.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/parse.d.ts deleted file mode 100644 index a316fb1..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/parse.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function parse(uuid: string): Uint8Array; -export default parse; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/parse.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/parse.js deleted file mode 100644 index d2fa8ca..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/parse.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const validate_js_1 = require("./validate.js"); -function parse(uuid) { - if (!(0, validate_js_1.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - let v; - return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 0xff, ((v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000) & 0xff, (v / 0x100000000) & 0xff, (v >>> 24) & 0xff, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff); -} -exports.default = parse; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/regex.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/regex.d.ts deleted file mode 100644 index d39fa3f..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/regex.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: RegExp; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/regex.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/regex.js deleted file mode 100644 index e3dde2a..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/regex.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/rng.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/rng.d.ts deleted file mode 100644 index 73e60cf..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/rng.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function rng(): Uint8Array; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/rng.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/rng.js deleted file mode 100644 index 8f5458e..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/rng.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const crypto_1 = require("crypto"); -const rnds8Pool = new Uint8Array(256); -let poolPtr = rnds8Pool.length; -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - (0, crypto_1.randomFillSync)(rnds8Pool); - poolPtr = 0; - } - return rnds8Pool.slice(poolPtr, (poolPtr += 16)); -} -exports.default = rng; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/sha1.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/sha1.d.ts deleted file mode 100644 index dfdc2ea..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/sha1.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// -/// -declare function sha1(bytes: Uint8Array): Buffer; -export default sha1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/sha1.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/sha1.js deleted file mode 100644 index dccedf5..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/sha1.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const crypto_1 = require("crypto"); -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } - else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - return (0, crypto_1.createHash)('sha1').update(bytes).digest(); -} -exports.default = sha1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/stringify.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/stringify.d.ts deleted file mode 100644 index 16cb008..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/stringify.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare function unsafeStringify(arr: Uint8Array, offset?: number): string; -declare function stringify(arr: Uint8Array, offset?: number): string; -export default stringify; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/stringify.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/stringify.js deleted file mode 100644 index 2ba27bb..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/stringify.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.unsafeStringify = void 0; -const validate_js_1 = require("./validate.js"); -const byteToHex = []; -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} -function unsafeStringify(arr, offset = 0) { - return (byteToHex[arr[offset + 0]] + - byteToHex[arr[offset + 1]] + - byteToHex[arr[offset + 2]] + - byteToHex[arr[offset + 3]] + - '-' + - byteToHex[arr[offset + 4]] + - byteToHex[arr[offset + 5]] + - '-' + - byteToHex[arr[offset + 6]] + - byteToHex[arr[offset + 7]] + - '-' + - byteToHex[arr[offset + 8]] + - byteToHex[arr[offset + 9]] + - '-' + - byteToHex[arr[offset + 10]] + - byteToHex[arr[offset + 11]] + - byteToHex[arr[offset + 12]] + - byteToHex[arr[offset + 13]] + - byteToHex[arr[offset + 14]] + - byteToHex[arr[offset + 15]]).toLowerCase(); -} -exports.unsafeStringify = unsafeStringify; -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); - if (!(0, validate_js_1.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - return uuid; -} -exports.default = stringify; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/types.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/types.d.ts deleted file mode 100644 index ecaed97..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/types.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export type UUIDTypes = string | TBuf; -export type Version1Options = { - node?: Uint8Array; - clockseq?: number; - random?: Uint8Array; - rng?: () => Uint8Array; - msecs?: number; - nsecs?: number; - _v6?: boolean; -}; -export type Version4Options = { - random?: Uint8Array; - rng?: () => Uint8Array; -}; -export type Version6Options = Version1Options; -export type Version7Options = { - random?: Uint8Array; - msecs?: number; - seq?: number; - rng?: () => Uint8Array; -}; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/types.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/types.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/types.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/uuid-bin.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/uuid-bin.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/uuid-bin.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/uuid-bin.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/uuid-bin.js deleted file mode 100644 index d613137..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/uuid-bin.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const assert = require("assert"); -const v1_js_1 = require("./v1.js"); -const v3_js_1 = require("./v3.js"); -const v4_js_1 = require("./v4.js"); -const v5_js_1 = require("./v5.js"); -const v6_js_1 = require("./v6.js"); -const v7_js_1 = require("./v7.js"); -function usage() { - console.log('Usage:'); - console.log(' uuid'); - console.log(' uuid v1'); - console.log(' uuid v3 '); - console.log(' uuid v4'); - console.log(' uuid v5 '); - console.log(' uuid v6'); - console.log(' uuid v7'); - console.log(' uuid --help'); - console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC9562'); -} -const args = process.argv.slice(2); -if (args.indexOf('--help') >= 0) { - usage(); - process.exit(0); -} -const version = args.shift() || 'v4'; -switch (version) { - case 'v1': - console.log((0, v1_js_1.default)()); - break; - case 'v3': { - const name = args.shift(); - let namespace = args.shift(); - assert.ok(name != null, 'v3 name not specified'); - assert.ok(namespace != null, 'v3 namespace not specified'); - if (namespace === 'URL') { - namespace = v3_js_1.default.URL; - } - if (namespace === 'DNS') { - namespace = v3_js_1.default.DNS; - } - console.log((0, v3_js_1.default)(name, namespace)); - break; - } - case 'v4': - console.log((0, v4_js_1.default)()); - break; - case 'v5': { - const name = args.shift(); - let namespace = args.shift(); - assert.ok(name != null, 'v5 name not specified'); - assert.ok(namespace != null, 'v5 namespace not specified'); - if (namespace === 'URL') { - namespace = v5_js_1.default.URL; - } - if (namespace === 'DNS') { - namespace = v5_js_1.default.DNS; - } - console.log((0, v5_js_1.default)(name, namespace)); - break; - } - case 'v6': - console.log((0, v6_js_1.default)()); - break; - case 'v7': - console.log((0, v7_js_1.default)()); - break; - default: - usage(); - process.exit(1); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v1.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v1.d.ts deleted file mode 100644 index d8ecee0..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v1.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Version1Options } from './types.js'; -type V1State = { - node?: Uint8Array; - clockseq?: number; - msecs?: number; - nsecs?: number; -}; -declare function v1(options?: Version1Options, buf?: undefined, offset?: number): string; -declare function v1(options: Version1Options | undefined, buf: Buf, offset?: number): Buf; -export declare function updateV1State(state: V1State, now: number, rnds: Uint8Array): V1State; -export default v1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v1.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v1.js deleted file mode 100644 index 155b80d..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v1.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.updateV1State = void 0; -const rng_js_1 = require("./rng.js"); -const stringify_js_1 = require("./stringify.js"); -const _state = {}; -function v1(options, buf, offset) { - let bytes; - const isV6 = options?._v6 ?? false; - if (options) { - const optionsKeys = Object.keys(options); - if (optionsKeys.length === 1 && optionsKeys[0] === '_v6') { - options = undefined; - } - } - if (options) { - bytes = v1Bytes(options.random ?? options.rng?.() ?? (0, rng_js_1.default)(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset); - } - else { - const now = Date.now(); - const rnds = (0, rng_js_1.default)(); - updateV1State(_state, now, rnds); - bytes = v1Bytes(rnds, _state.msecs, _state.nsecs, isV6 ? undefined : _state.clockseq, isV6 ? undefined : _state.node, buf, offset); - } - return buf ?? (0, stringify_js_1.unsafeStringify)(bytes); -} -function updateV1State(state, now, rnds) { - state.msecs ??= -Infinity; - state.nsecs ??= 0; - if (now === state.msecs) { - state.nsecs++; - if (state.nsecs >= 10000) { - state.node = undefined; - state.nsecs = 0; - } - } - else if (now > state.msecs) { - state.nsecs = 0; - } - else if (now < state.msecs) { - state.node = undefined; - } - if (!state.node) { - state.node = rnds.slice(10, 16); - state.node[0] |= 0x01; - state.clockseq = ((rnds[8] << 8) | rnds[9]) & 0x3fff; - } - state.msecs = now; - return state; -} -exports.updateV1State = updateV1State; -function v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) { - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - if (!buf) { - buf = new Uint8Array(16); - offset = 0; - } - else { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - } - msecs ??= Date.now(); - nsecs ??= 0; - clockseq ??= ((rnds[8] << 8) | rnds[9]) & 0x3fff; - node ??= rnds.slice(10, 16); - msecs += 12219292800000; - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - buf[offset++] = (tl >>> 24) & 0xff; - buf[offset++] = (tl >>> 16) & 0xff; - buf[offset++] = (tl >>> 8) & 0xff; - buf[offset++] = tl & 0xff; - const tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff; - buf[offset++] = (tmh >>> 8) & 0xff; - buf[offset++] = tmh & 0xff; - buf[offset++] = ((tmh >>> 24) & 0xf) | 0x10; - buf[offset++] = (tmh >>> 16) & 0xff; - buf[offset++] = (clockseq >>> 8) | 0x80; - buf[offset++] = clockseq & 0xff; - for (let n = 0; n < 6; ++n) { - buf[offset++] = node[n]; - } - return buf; -} -exports.default = v1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v1ToV6.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v1ToV6.d.ts deleted file mode 100644 index 38eaaf0..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v1ToV6.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default function v1ToV6(uuid: string): string; -export default function v1ToV6(uuid: Uint8Array): Uint8Array; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v1ToV6.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v1ToV6.js deleted file mode 100644 index daba2c3..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v1ToV6.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const parse_js_1 = require("./parse.js"); -const stringify_js_1 = require("./stringify.js"); -function v1ToV6(uuid) { - const v1Bytes = typeof uuid === 'string' ? (0, parse_js_1.default)(uuid) : uuid; - const v6Bytes = _v1ToV6(v1Bytes); - return typeof uuid === 'string' ? (0, stringify_js_1.unsafeStringify)(v6Bytes) : v6Bytes; -} -exports.default = v1ToV6; -function _v1ToV6(v1Bytes) { - return Uint8Array.of(((v1Bytes[6] & 0x0f) << 4) | ((v1Bytes[7] >> 4) & 0x0f), ((v1Bytes[7] & 0x0f) << 4) | ((v1Bytes[4] & 0xf0) >> 4), ((v1Bytes[4] & 0x0f) << 4) | ((v1Bytes[5] & 0xf0) >> 4), ((v1Bytes[5] & 0x0f) << 4) | ((v1Bytes[0] & 0xf0) >> 4), ((v1Bytes[0] & 0x0f) << 4) | ((v1Bytes[1] & 0xf0) >> 4), ((v1Bytes[1] & 0x0f) << 4) | ((v1Bytes[2] & 0xf0) >> 4), 0x60 | (v1Bytes[2] & 0x0f), v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v3.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v3.d.ts deleted file mode 100644 index 5d1c434..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v3.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { UUIDTypes } from './types.js'; -export { DNS, URL } from './v35.js'; -declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string; -declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf: TBuf, offset?: number): TBuf; -declare namespace v3 { - var DNS: string; - var URL: string; -} -export default v3; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v3.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v3.js deleted file mode 100644 index d318d2a..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v3.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.URL = exports.DNS = void 0; -const md5_js_1 = require("./md5.js"); -const v35_js_1 = require("./v35.js"); -var v35_js_2 = require("./v35.js"); -Object.defineProperty(exports, "DNS", { enumerable: true, get: function () { return v35_js_2.DNS; } }); -Object.defineProperty(exports, "URL", { enumerable: true, get: function () { return v35_js_2.URL; } }); -function v3(value, namespace, buf, offset) { - return (0, v35_js_1.default)(0x30, md5_js_1.default, value, namespace, buf, offset); -} -v3.DNS = v35_js_1.DNS; -v3.URL = v35_js_1.URL; -exports.default = v3; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v35.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v35.d.ts deleted file mode 100644 index 4e6e9d5..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v35.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { UUIDTypes } from './types.js'; -export declare function stringToBytes(str: string): Uint8Array; -export declare const DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; -export declare const URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; -type HashFunction = (bytes: Uint8Array) => Uint8Array; -export default function v35(version: 0x30 | 0x50, hash: HashFunction, value: string | Uint8Array, namespace: UUIDTypes, buf?: TBuf, offset?: number): UUIDTypes; -export {}; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v35.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v35.js deleted file mode 100644 index b8b8e09..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v35.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.URL = exports.DNS = exports.stringToBytes = void 0; -const parse_js_1 = require("./parse.js"); -const stringify_js_1 = require("./stringify.js"); -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); - const bytes = new Uint8Array(str.length); - for (let i = 0; i < str.length; ++i) { - bytes[i] = str.charCodeAt(i); - } - return bytes; -} -exports.stringToBytes = stringToBytes; -exports.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -function v35(version, hash, value, namespace, buf, offset) { - const valueBytes = typeof value === 'string' ? stringToBytes(value) : value; - const namespaceBytes = typeof namespace === 'string' ? (0, parse_js_1.default)(namespace) : namespace; - if (typeof namespace === 'string') { - namespace = (0, parse_js_1.default)(namespace); - } - if (namespace?.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } - let bytes = new Uint8Array(16 + valueBytes.length); - bytes.set(namespaceBytes); - bytes.set(valueBytes, namespaceBytes.length); - bytes = hash(bytes); - bytes[6] = (bytes[6] & 0x0f) | version; - bytes[8] = (bytes[8] & 0x3f) | 0x80; - if (buf) { - offset = offset || 0; - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return (0, stringify_js_1.unsafeStringify)(bytes); -} -exports.default = v35; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v4.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v4.d.ts deleted file mode 100644 index 8205333..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v4.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Version4Options } from './types.js'; -declare function v4(options?: Version4Options, buf?: undefined, offset?: number): string; -declare function v4(options: Version4Options | undefined, buf: TBuf, offset?: number): TBuf; -export default v4; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v4.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v4.js deleted file mode 100644 index 69c975e..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v4.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const native_js_1 = require("./native.js"); -const rng_js_1 = require("./rng.js"); -const stringify_js_1 = require("./stringify.js"); -function v4(options, buf, offset) { - if (native_js_1.default.randomUUID && !buf && !options) { - return native_js_1.default.randomUUID(); - } - options = options || {}; - const rnds = options.random ?? options.rng?.() ?? (0, rng_js_1.default)(); - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - if (buf) { - offset = offset || 0; - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - return buf; - } - return (0, stringify_js_1.unsafeStringify)(rnds); -} -exports.default = v4; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v5.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v5.d.ts deleted file mode 100644 index 0e2ff2f..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v5.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { UUIDTypes } from './types.js'; -export { DNS, URL } from './v35.js'; -declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string; -declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf: TBuf, offset?: number): TBuf; -declare namespace v5 { - var DNS: string; - var URL: string; -} -export default v5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v5.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v5.js deleted file mode 100644 index c4239c2..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v5.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.URL = exports.DNS = void 0; -const sha1_js_1 = require("./sha1.js"); -const v35_js_1 = require("./v35.js"); -var v35_js_2 = require("./v35.js"); -Object.defineProperty(exports, "DNS", { enumerable: true, get: function () { return v35_js_2.DNS; } }); -Object.defineProperty(exports, "URL", { enumerable: true, get: function () { return v35_js_2.URL; } }); -function v5(value, namespace, buf, offset) { - return (0, v35_js_1.default)(0x50, sha1_js_1.default, value, namespace, buf, offset); -} -v5.DNS = v35_js_1.DNS; -v5.URL = v35_js_1.URL; -exports.default = v5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v6.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v6.d.ts deleted file mode 100644 index cabf4a0..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v6.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Version6Options } from './types.js'; -declare function v6(options?: Version6Options, buf?: undefined, offset?: number): string; -declare function v6(options: Version6Options | undefined, buf: TBuf, offset?: number): TBuf; -export default v6; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v6.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v6.js deleted file mode 100644 index a566d0a..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v6.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const stringify_js_1 = require("./stringify.js"); -const v1_js_1 = require("./v1.js"); -const v1ToV6_js_1 = require("./v1ToV6.js"); -function v6(options, buf, offset) { - options ??= {}; - offset ??= 0; - let bytes = (0, v1_js_1.default)({ ...options, _v6: true }, new Uint8Array(16)); - bytes = (0, v1ToV6_js_1.default)(bytes); - if (buf) { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; i++) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return (0, stringify_js_1.unsafeStringify)(bytes); -} -exports.default = v6; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v6ToV1.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v6ToV1.d.ts deleted file mode 100644 index 3b3ffc2..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v6ToV1.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default function v6ToV1(uuid: string): string; -export default function v6ToV1(uuid: Uint8Array): Uint8Array; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v6ToV1.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v6ToV1.js deleted file mode 100644 index 9dcb661..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v6ToV1.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const parse_js_1 = require("./parse.js"); -const stringify_js_1 = require("./stringify.js"); -function v6ToV1(uuid) { - const v6Bytes = typeof uuid === 'string' ? (0, parse_js_1.default)(uuid) : uuid; - const v1Bytes = _v6ToV1(v6Bytes); - return typeof uuid === 'string' ? (0, stringify_js_1.unsafeStringify)(v1Bytes) : v1Bytes; -} -exports.default = v6ToV1; -function _v6ToV1(v6Bytes) { - return Uint8Array.of(((v6Bytes[3] & 0x0f) << 4) | ((v6Bytes[4] >> 4) & 0x0f), ((v6Bytes[4] & 0x0f) << 4) | ((v6Bytes[5] & 0xf0) >> 4), ((v6Bytes[5] & 0x0f) << 4) | (v6Bytes[6] & 0x0f), v6Bytes[7], ((v6Bytes[1] & 0x0f) << 4) | ((v6Bytes[2] & 0xf0) >> 4), ((v6Bytes[2] & 0x0f) << 4) | ((v6Bytes[3] & 0xf0) >> 4), 0x10 | ((v6Bytes[0] & 0xf0) >> 4), ((v6Bytes[0] & 0x0f) << 4) | ((v6Bytes[1] & 0xf0) >> 4), v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v7.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v7.d.ts deleted file mode 100644 index f49b03d..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v7.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Version7Options } from './types.js'; -type V7State = { - msecs?: number; - seq?: number; -}; -declare function v7(options?: Version7Options, buf?: undefined, offset?: number): string; -declare function v7(options: Version7Options | undefined, buf: TBuf, offset?: number): TBuf; -export declare function updateV7State(state: V7State, now: number, rnds: Uint8Array): V7State; -export default v7; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v7.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v7.js deleted file mode 100644 index 697fe34..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/v7.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.updateV7State = void 0; -const rng_js_1 = require("./rng.js"); -const stringify_js_1 = require("./stringify.js"); -const _state = {}; -function v7(options, buf, offset) { - let bytes; - if (options) { - bytes = v7Bytes(options.random ?? options.rng?.() ?? (0, rng_js_1.default)(), options.msecs, options.seq, buf, offset); - } - else { - const now = Date.now(); - const rnds = (0, rng_js_1.default)(); - updateV7State(_state, now, rnds); - bytes = v7Bytes(rnds, _state.msecs, _state.seq, buf, offset); - } - return buf ?? (0, stringify_js_1.unsafeStringify)(bytes); -} -function updateV7State(state, now, rnds) { - state.msecs ??= -Infinity; - state.seq ??= 0; - if (now > state.msecs) { - state.seq = (rnds[6] << 23) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9]; - state.msecs = now; - } - else { - state.seq = (state.seq + 1) | 0; - if (state.seq === 0) { - state.msecs++; - } - } - return state; -} -exports.updateV7State = updateV7State; -function v7Bytes(rnds, msecs, seq, buf, offset = 0) { - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - if (!buf) { - buf = new Uint8Array(16); - offset = 0; - } - else { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - } - msecs ??= Date.now(); - seq ??= ((rnds[6] * 0x7f) << 24) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9]; - buf[offset++] = (msecs / 0x10000000000) & 0xff; - buf[offset++] = (msecs / 0x100000000) & 0xff; - buf[offset++] = (msecs / 0x1000000) & 0xff; - buf[offset++] = (msecs / 0x10000) & 0xff; - buf[offset++] = (msecs / 0x100) & 0xff; - buf[offset++] = msecs & 0xff; - buf[offset++] = 0x70 | ((seq >>> 28) & 0x0f); - buf[offset++] = (seq >>> 20) & 0xff; - buf[offset++] = 0x80 | ((seq >>> 14) & 0x3f); - buf[offset++] = (seq >>> 6) & 0xff; - buf[offset++] = ((seq << 2) & 0xff) | (rnds[10] & 0x03); - buf[offset++] = rnds[11]; - buf[offset++] = rnds[12]; - buf[offset++] = rnds[13]; - buf[offset++] = rnds[14]; - buf[offset++] = rnds[15]; - return buf; -} -exports.default = v7; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/validate.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/validate.d.ts deleted file mode 100644 index 57da03d..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/validate.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function validate(uuid: unknown): boolean; -export default validate; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/validate.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/validate.js deleted file mode 100644 index 89733b0..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/validate.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const regex_js_1 = require("./regex.js"); -function validate(uuid) { - return typeof uuid === 'string' && regex_js_1.default.test(uuid); -} -exports.default = validate; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/version.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/version.d.ts deleted file mode 100644 index f1948dc..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/version.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function version(uuid: string): number; -export default version; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/version.js b/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/version.js deleted file mode 100644 index 05ecd00..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/cjs/version.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const validate_js_1 = require("./validate.js"); -function version(uuid) { - if (!(0, validate_js_1.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - return parseInt(uuid.slice(14, 15), 16); -} -exports.default = version; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/index.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/index.d.ts deleted file mode 100644 index d7d4edc..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export type * from './types.js'; -export { default as MAX } from './max.js'; -export { default as NIL } from './nil.js'; -export { default as parse } from './parse.js'; -export { default as stringify } from './stringify.js'; -export { default as v1 } from './v1.js'; -export { default as v1ToV6 } from './v1ToV6.js'; -export { default as v3 } from './v3.js'; -export { default as v4 } from './v4.js'; -export { default as v5 } from './v5.js'; -export { default as v6 } from './v6.js'; -export { default as v6ToV1 } from './v6ToV1.js'; -export { default as v7 } from './v7.js'; -export { default as validate } from './validate.js'; -export { default as version } from './version.js'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/index.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/index.js deleted file mode 100644 index 3193e9a..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/index.js +++ /dev/null @@ -1,14 +0,0 @@ -export { default as MAX } from './max.js'; -export { default as NIL } from './nil.js'; -export { default as parse } from './parse.js'; -export { default as stringify } from './stringify.js'; -export { default as v1 } from './v1.js'; -export { default as v1ToV6 } from './v1ToV6.js'; -export { default as v3 } from './v3.js'; -export { default as v4 } from './v4.js'; -export { default as v5 } from './v5.js'; -export { default as v6 } from './v6.js'; -export { default as v6ToV1 } from './v6ToV1.js'; -export { default as v7 } from './v7.js'; -export { default as validate } from './validate.js'; -export { default as version } from './version.js'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/max.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/max.d.ts deleted file mode 100644 index 7a1e972..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/max.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "ffffffff-ffff-ffff-ffff-ffffffffffff"; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/max.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/max.js deleted file mode 100644 index 58951f6..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/max.js +++ /dev/null @@ -1 +0,0 @@ -export default 'ffffffff-ffff-ffff-ffff-ffffffffffff'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/md5.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/md5.d.ts deleted file mode 100644 index 5a55f51..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/md5.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function md5(bytes: Uint8Array): Uint8Array; -export default md5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/md5.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/md5.js deleted file mode 100644 index 918be8c..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/md5.js +++ /dev/null @@ -1,135 +0,0 @@ -function md5(bytes) { - const words = uint8ToUint32(bytes); - const md5Bytes = wordsToMd5(words, bytes.length * 8); - return uint32ToUint8(md5Bytes); -} -function uint32ToUint8(input) { - const bytes = new Uint8Array(input.length * 4); - for (let i = 0; i < input.length * 4; i++) { - bytes[i] = (input[i >> 2] >>> ((i % 4) * 8)) & 0xff; - } - return bytes; -} -function getOutputLength(inputLength8) { - return (((inputLength8 + 64) >>> 9) << 4) + 14 + 1; -} -function wordsToMd5(x, len) { - const xpad = new Uint32Array(getOutputLength(len)).fill(0); - xpad.set(x); - xpad[len >> 5] |= 0x80 << len % 32; - xpad[xpad.length - 1] = len; - x = xpad; - let a = 1732584193; - let b = -271733879; - let c = -1732584194; - let d = 271733878; - for (let i = 0; i < x.length; i += 16) { - const olda = a; - const oldb = b; - const oldc = c; - const oldd = d; - a = md5ff(a, b, c, d, x[i], 7, -680876936); - d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); - c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); - b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); - a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); - d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); - c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); - b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); - a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); - d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); - c = md5ff(c, d, a, b, x[i + 10], 17, -42063); - b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); - a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); - d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); - c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); - b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); - a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); - d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); - c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); - b = md5gg(b, c, d, a, x[i], 20, -373897302); - a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); - d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); - c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); - b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); - a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); - d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); - c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); - b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); - a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); - d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); - c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); - b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); - a = md5hh(a, b, c, d, x[i + 5], 4, -378558); - d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); - c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); - b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); - a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); - d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); - c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); - b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); - a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); - d = md5hh(d, a, b, c, x[i], 11, -358537222); - c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); - b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); - a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); - d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); - c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); - b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); - a = md5ii(a, b, c, d, x[i], 6, -198630844); - d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); - c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); - b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); - a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); - d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); - c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); - b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); - a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); - d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); - c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); - b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); - a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); - d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); - c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); - b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); - a = safeAdd(a, olda); - b = safeAdd(b, oldb); - c = safeAdd(c, oldc); - d = safeAdd(d, oldd); - } - return Uint32Array.of(a, b, c, d); -} -function uint8ToUint32(input) { - if (input.length === 0) { - return new Uint32Array(); - } - const output = new Uint32Array(getOutputLength(input.length * 8)).fill(0); - for (let i = 0; i < input.length; i++) { - output[i >> 2] |= (input[i] & 0xff) << ((i % 4) * 8); - } - return output; -} -function safeAdd(x, y) { - const lsw = (x & 0xffff) + (y & 0xffff); - const msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xffff); -} -function bitRotateLeft(num, cnt) { - return (num << cnt) | (num >>> (32 - cnt)); -} -function md5cmn(q, a, b, x, s, t) { - return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); -} -function md5ff(a, b, c, d, x, s, t) { - return md5cmn((b & c) | (~b & d), a, b, x, s, t); -} -function md5gg(a, b, c, d, x, s, t) { - return md5cmn((b & d) | (c & ~d), a, b, x, s, t); -} -function md5hh(a, b, c, d, x, s, t) { - return md5cmn(b ^ c ^ d, a, b, x, s, t); -} -function md5ii(a, b, c, d, x, s, t) { - return md5cmn(c ^ (b | ~d), a, b, x, s, t); -} -export default md5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/native.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/native.d.ts deleted file mode 100644 index 9418fd3..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/native.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare const _default: { - randomUUID: false | (() => `${string}-${string}-${string}-${string}-${string}`); -}; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/native.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/native.js deleted file mode 100644 index 76f44f9..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/native.js +++ /dev/null @@ -1,2 +0,0 @@ -const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); -export default { randomUUID }; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/nil.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/nil.d.ts deleted file mode 100644 index b03bb98..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/nil.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "00000000-0000-0000-0000-000000000000"; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/nil.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/nil.js deleted file mode 100644 index de6f830..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/nil.js +++ /dev/null @@ -1 +0,0 @@ -export default '00000000-0000-0000-0000-000000000000'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/parse.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/parse.d.ts deleted file mode 100644 index a316fb1..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/parse.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function parse(uuid: string): Uint8Array; -export default parse; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/parse.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/parse.js deleted file mode 100644 index 64ac401..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/parse.js +++ /dev/null @@ -1,9 +0,0 @@ -import validate from './validate.js'; -function parse(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - let v; - return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 0xff, ((v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000) & 0xff, (v / 0x100000000) & 0xff, (v >>> 24) & 0xff, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff); -} -export default parse; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/regex.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/regex.d.ts deleted file mode 100644 index d39fa3f..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/regex.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: RegExp; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/regex.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/regex.js deleted file mode 100644 index 3e38591..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/regex.js +++ /dev/null @@ -1 +0,0 @@ -export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/rng.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/rng.d.ts deleted file mode 100644 index 73e60cf..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/rng.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function rng(): Uint8Array; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/rng.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/rng.js deleted file mode 100644 index 770f2e2..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/rng.js +++ /dev/null @@ -1,11 +0,0 @@ -let getRandomValues; -const rnds8 = new Uint8Array(16); -export default function rng() { - if (!getRandomValues) { - if (typeof crypto === 'undefined' || !crypto.getRandomValues) { - throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); - } - getRandomValues = crypto.getRandomValues.bind(crypto); - } - return getRandomValues(rnds8); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/sha1.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/sha1.d.ts deleted file mode 100644 index a6552e5..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/sha1.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function sha1(bytes: Uint8Array): Uint8Array; -export default sha1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/sha1.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/sha1.js deleted file mode 100644 index dbb78ae..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/sha1.js +++ /dev/null @@ -1,70 +0,0 @@ -function f(s, x, y, z) { - switch (s) { - case 0: - return (x & y) ^ (~x & z); - case 1: - return x ^ y ^ z; - case 2: - return (x & y) ^ (x & z) ^ (y & z); - case 3: - return x ^ y ^ z; - } -} -function ROTL(x, n) { - return (x << n) | (x >>> (32 - n)); -} -function sha1(bytes) { - const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; - const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; - const newBytes = new Uint8Array(bytes.length + 1); - newBytes.set(bytes); - newBytes[bytes.length] = 0x80; - bytes = newBytes; - const l = bytes.length / 4 + 2; - const N = Math.ceil(l / 16); - const M = new Array(N); - for (let i = 0; i < N; ++i) { - const arr = new Uint32Array(16); - for (let j = 0; j < 16; ++j) { - arr[j] = - (bytes[i * 64 + j * 4] << 24) | - (bytes[i * 64 + j * 4 + 1] << 16) | - (bytes[i * 64 + j * 4 + 2] << 8) | - bytes[i * 64 + j * 4 + 3]; - } - M[i] = arr; - } - M[N - 1][14] = ((bytes.length - 1) * 8) / Math.pow(2, 32); - M[N - 1][14] = Math.floor(M[N - 1][14]); - M[N - 1][15] = ((bytes.length - 1) * 8) & 0xffffffff; - for (let i = 0; i < N; ++i) { - const W = new Uint32Array(80); - for (let t = 0; t < 16; ++t) { - W[t] = M[i][t]; - } - for (let t = 16; t < 80; ++t) { - W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1); - } - let a = H[0]; - let b = H[1]; - let c = H[2]; - let d = H[3]; - let e = H[4]; - for (let t = 0; t < 80; ++t) { - const s = Math.floor(t / 20); - const T = (ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t]) >>> 0; - e = d; - d = c; - c = ROTL(b, 30) >>> 0; - b = a; - a = T; - } - H[0] = (H[0] + a) >>> 0; - H[1] = (H[1] + b) >>> 0; - H[2] = (H[2] + c) >>> 0; - H[3] = (H[3] + d) >>> 0; - H[4] = (H[4] + e) >>> 0; - } - return Uint8Array.of(H[0] >> 24, H[0] >> 16, H[0] >> 8, H[0], H[1] >> 24, H[1] >> 16, H[1] >> 8, H[1], H[2] >> 24, H[2] >> 16, H[2] >> 8, H[2], H[3] >> 24, H[3] >> 16, H[3] >> 8, H[3], H[4] >> 24, H[4] >> 16, H[4] >> 8, H[4]); -} -export default sha1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/stringify.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/stringify.d.ts deleted file mode 100644 index 16cb008..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/stringify.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare function unsafeStringify(arr: Uint8Array, offset?: number): string; -declare function stringify(arr: Uint8Array, offset?: number): string; -export default stringify; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/stringify.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/stringify.js deleted file mode 100644 index 962738c..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/stringify.js +++ /dev/null @@ -1,35 +0,0 @@ -import validate from './validate.js'; -const byteToHex = []; -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} -export function unsafeStringify(arr, offset = 0) { - return (byteToHex[arr[offset + 0]] + - byteToHex[arr[offset + 1]] + - byteToHex[arr[offset + 2]] + - byteToHex[arr[offset + 3]] + - '-' + - byteToHex[arr[offset + 4]] + - byteToHex[arr[offset + 5]] + - '-' + - byteToHex[arr[offset + 6]] + - byteToHex[arr[offset + 7]] + - '-' + - byteToHex[arr[offset + 8]] + - byteToHex[arr[offset + 9]] + - '-' + - byteToHex[arr[offset + 10]] + - byteToHex[arr[offset + 11]] + - byteToHex[arr[offset + 12]] + - byteToHex[arr[offset + 13]] + - byteToHex[arr[offset + 14]] + - byteToHex[arr[offset + 15]]).toLowerCase(); -} -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); - if (!validate(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - return uuid; -} -export default stringify; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/types.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/types.d.ts deleted file mode 100644 index ecaed97..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/types.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export type UUIDTypes = string | TBuf; -export type Version1Options = { - node?: Uint8Array; - clockseq?: number; - random?: Uint8Array; - rng?: () => Uint8Array; - msecs?: number; - nsecs?: number; - _v6?: boolean; -}; -export type Version4Options = { - random?: Uint8Array; - rng?: () => Uint8Array; -}; -export type Version6Options = Version1Options; -export type Version7Options = { - random?: Uint8Array; - msecs?: number; - seq?: number; - rng?: () => Uint8Array; -}; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/types.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/types.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/types.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/uuid-bin.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/uuid-bin.js deleted file mode 100644 index 30766fe..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/uuid-bin.js +++ /dev/null @@ -1,70 +0,0 @@ -import * as assert from 'assert'; -import v1 from './v1.js'; -import v3 from './v3.js'; -import v4 from './v4.js'; -import v5 from './v5.js'; -import v6 from './v6.js'; -import v7 from './v7.js'; -function usage() { - console.log('Usage:'); - console.log(' uuid'); - console.log(' uuid v1'); - console.log(' uuid v3 '); - console.log(' uuid v4'); - console.log(' uuid v5 '); - console.log(' uuid v6'); - console.log(' uuid v7'); - console.log(' uuid --help'); - console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC9562'); -} -const args = process.argv.slice(2); -if (args.indexOf('--help') >= 0) { - usage(); - process.exit(0); -} -const version = args.shift() || 'v4'; -switch (version) { - case 'v1': - console.log(v1()); - break; - case 'v3': { - const name = args.shift(); - let namespace = args.shift(); - assert.ok(name != null, 'v3 name not specified'); - assert.ok(namespace != null, 'v3 namespace not specified'); - if (namespace === 'URL') { - namespace = v3.URL; - } - if (namespace === 'DNS') { - namespace = v3.DNS; - } - console.log(v3(name, namespace)); - break; - } - case 'v4': - console.log(v4()); - break; - case 'v5': { - const name = args.shift(); - let namespace = args.shift(); - assert.ok(name != null, 'v5 name not specified'); - assert.ok(namespace != null, 'v5 namespace not specified'); - if (namespace === 'URL') { - namespace = v5.URL; - } - if (namespace === 'DNS') { - namespace = v5.DNS; - } - console.log(v5(name, namespace)); - break; - } - case 'v6': - console.log(v6()); - break; - case 'v7': - console.log(v7()); - break; - default: - usage(); - process.exit(1); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v1.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v1.d.ts deleted file mode 100644 index d8ecee0..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v1.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Version1Options } from './types.js'; -type V1State = { - node?: Uint8Array; - clockseq?: number; - msecs?: number; - nsecs?: number; -}; -declare function v1(options?: Version1Options, buf?: undefined, offset?: number): string; -declare function v1(options: Version1Options | undefined, buf: Buf, offset?: number): Buf; -export declare function updateV1State(state: V1State, now: number, rnds: Uint8Array): V1State; -export default v1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v1.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v1.js deleted file mode 100644 index 65e3f68..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v1.js +++ /dev/null @@ -1,83 +0,0 @@ -import rng from './rng.js'; -import { unsafeStringify } from './stringify.js'; -const _state = {}; -function v1(options, buf, offset) { - let bytes; - const isV6 = options?._v6 ?? false; - if (options) { - const optionsKeys = Object.keys(options); - if (optionsKeys.length === 1 && optionsKeys[0] === '_v6') { - options = undefined; - } - } - if (options) { - bytes = v1Bytes(options.random ?? options.rng?.() ?? rng(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset); - } - else { - const now = Date.now(); - const rnds = rng(); - updateV1State(_state, now, rnds); - bytes = v1Bytes(rnds, _state.msecs, _state.nsecs, isV6 ? undefined : _state.clockseq, isV6 ? undefined : _state.node, buf, offset); - } - return buf ?? unsafeStringify(bytes); -} -export function updateV1State(state, now, rnds) { - state.msecs ??= -Infinity; - state.nsecs ??= 0; - if (now === state.msecs) { - state.nsecs++; - if (state.nsecs >= 10000) { - state.node = undefined; - state.nsecs = 0; - } - } - else if (now > state.msecs) { - state.nsecs = 0; - } - else if (now < state.msecs) { - state.node = undefined; - } - if (!state.node) { - state.node = rnds.slice(10, 16); - state.node[0] |= 0x01; - state.clockseq = ((rnds[8] << 8) | rnds[9]) & 0x3fff; - } - state.msecs = now; - return state; -} -function v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) { - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - if (!buf) { - buf = new Uint8Array(16); - offset = 0; - } - else { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - } - msecs ??= Date.now(); - nsecs ??= 0; - clockseq ??= ((rnds[8] << 8) | rnds[9]) & 0x3fff; - node ??= rnds.slice(10, 16); - msecs += 12219292800000; - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - buf[offset++] = (tl >>> 24) & 0xff; - buf[offset++] = (tl >>> 16) & 0xff; - buf[offset++] = (tl >>> 8) & 0xff; - buf[offset++] = tl & 0xff; - const tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff; - buf[offset++] = (tmh >>> 8) & 0xff; - buf[offset++] = tmh & 0xff; - buf[offset++] = ((tmh >>> 24) & 0xf) | 0x10; - buf[offset++] = (tmh >>> 16) & 0xff; - buf[offset++] = (clockseq >>> 8) | 0x80; - buf[offset++] = clockseq & 0xff; - for (let n = 0; n < 6; ++n) { - buf[offset++] = node[n]; - } - return buf; -} -export default v1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts deleted file mode 100644 index 38eaaf0..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default function v1ToV6(uuid: string): string; -export default function v1ToV6(uuid: Uint8Array): Uint8Array; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v1ToV6.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v1ToV6.js deleted file mode 100644 index da0f763..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v1ToV6.js +++ /dev/null @@ -1,10 +0,0 @@ -import parse from './parse.js'; -import { unsafeStringify } from './stringify.js'; -export default function v1ToV6(uuid) { - const v1Bytes = typeof uuid === 'string' ? parse(uuid) : uuid; - const v6Bytes = _v1ToV6(v1Bytes); - return typeof uuid === 'string' ? unsafeStringify(v6Bytes) : v6Bytes; -} -function _v1ToV6(v1Bytes) { - return Uint8Array.of(((v1Bytes[6] & 0x0f) << 4) | ((v1Bytes[7] >> 4) & 0x0f), ((v1Bytes[7] & 0x0f) << 4) | ((v1Bytes[4] & 0xf0) >> 4), ((v1Bytes[4] & 0x0f) << 4) | ((v1Bytes[5] & 0xf0) >> 4), ((v1Bytes[5] & 0x0f) << 4) | ((v1Bytes[0] & 0xf0) >> 4), ((v1Bytes[0] & 0x0f) << 4) | ((v1Bytes[1] & 0xf0) >> 4), ((v1Bytes[1] & 0x0f) << 4) | ((v1Bytes[2] & 0xf0) >> 4), 0x60 | (v1Bytes[2] & 0x0f), v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v3.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v3.d.ts deleted file mode 100644 index 5d1c434..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v3.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { UUIDTypes } from './types.js'; -export { DNS, URL } from './v35.js'; -declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string; -declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf: TBuf, offset?: number): TBuf; -declare namespace v3 { - var DNS: string; - var URL: string; -} -export default v3; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v3.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v3.js deleted file mode 100644 index b5c3781..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v3.js +++ /dev/null @@ -1,9 +0,0 @@ -import md5 from './md5.js'; -import v35, { DNS, URL } from './v35.js'; -export { DNS, URL } from './v35.js'; -function v3(value, namespace, buf, offset) { - return v35(0x30, md5, value, namespace, buf, offset); -} -v3.DNS = DNS; -v3.URL = URL; -export default v3; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v35.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v35.d.ts deleted file mode 100644 index 4e6e9d5..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v35.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { UUIDTypes } from './types.js'; -export declare function stringToBytes(str: string): Uint8Array; -export declare const DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; -export declare const URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; -type HashFunction = (bytes: Uint8Array) => Uint8Array; -export default function v35(version: 0x30 | 0x50, hash: HashFunction, value: string | Uint8Array, namespace: UUIDTypes, buf?: TBuf, offset?: number): UUIDTypes; -export {}; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v35.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v35.js deleted file mode 100644 index 2e02842..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v35.js +++ /dev/null @@ -1,39 +0,0 @@ -import parse from './parse.js'; -import { unsafeStringify } from './stringify.js'; -export function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); - const bytes = new Uint8Array(str.length); - for (let i = 0; i < str.length; ++i) { - bytes[i] = str.charCodeAt(i); - } - return bytes; -} -export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -export default function v35(version, hash, value, namespace, buf, offset) { - const valueBytes = typeof value === 'string' ? stringToBytes(value) : value; - const namespaceBytes = typeof namespace === 'string' ? parse(namespace) : namespace; - if (typeof namespace === 'string') { - namespace = parse(namespace); - } - if (namespace?.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } - let bytes = new Uint8Array(16 + valueBytes.length); - bytes.set(namespaceBytes); - bytes.set(valueBytes, namespaceBytes.length); - bytes = hash(bytes); - bytes[6] = (bytes[6] & 0x0f) | version; - bytes[8] = (bytes[8] & 0x3f) | 0x80; - if (buf) { - offset = offset || 0; - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return unsafeStringify(bytes); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v4.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v4.d.ts deleted file mode 100644 index 8205333..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v4.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Version4Options } from './types.js'; -declare function v4(options?: Version4Options, buf?: undefined, offset?: number): string; -declare function v4(options: Version4Options | undefined, buf: TBuf, offset?: number): TBuf; -export default v4; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v4.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v4.js deleted file mode 100644 index dd9067a..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v4.js +++ /dev/null @@ -1,27 +0,0 @@ -import native from './native.js'; -import rng from './rng.js'; -import { unsafeStringify } from './stringify.js'; -function v4(options, buf, offset) { - if (native.randomUUID && !buf && !options) { - return native.randomUUID(); - } - options = options || {}; - const rnds = options.random ?? options.rng?.() ?? rng(); - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - if (buf) { - offset = offset || 0; - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - return buf; - } - return unsafeStringify(rnds); -} -export default v4; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v5.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v5.d.ts deleted file mode 100644 index 0e2ff2f..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v5.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { UUIDTypes } from './types.js'; -export { DNS, URL } from './v35.js'; -declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string; -declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf: TBuf, offset?: number): TBuf; -declare namespace v5 { - var DNS: string; - var URL: string; -} -export default v5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v5.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v5.js deleted file mode 100644 index bd470a4..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v5.js +++ /dev/null @@ -1,9 +0,0 @@ -import sha1 from './sha1.js'; -import v35, { DNS, URL } from './v35.js'; -export { DNS, URL } from './v35.js'; -function v5(value, namespace, buf, offset) { - return v35(0x50, sha1, value, namespace, buf, offset); -} -v5.DNS = DNS; -v5.URL = URL; -export default v5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v6.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v6.d.ts deleted file mode 100644 index cabf4a0..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v6.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Version6Options } from './types.js'; -declare function v6(options?: Version6Options, buf?: undefined, offset?: number): string; -declare function v6(options: Version6Options | undefined, buf: TBuf, offset?: number): TBuf; -export default v6; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v6.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v6.js deleted file mode 100644 index bd1fc35..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v6.js +++ /dev/null @@ -1,20 +0,0 @@ -import { unsafeStringify } from './stringify.js'; -import v1 from './v1.js'; -import v1ToV6 from './v1ToV6.js'; -function v6(options, buf, offset) { - options ??= {}; - offset ??= 0; - let bytes = v1({ ...options, _v6: true }, new Uint8Array(16)); - bytes = v1ToV6(bytes); - if (buf) { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; i++) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return unsafeStringify(bytes); -} -export default v6; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts deleted file mode 100644 index 3b3ffc2..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default function v6ToV1(uuid: string): string; -export default function v6ToV1(uuid: Uint8Array): Uint8Array; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v6ToV1.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v6ToV1.js deleted file mode 100644 index bfd942f..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v6ToV1.js +++ /dev/null @@ -1,10 +0,0 @@ -import parse from './parse.js'; -import { unsafeStringify } from './stringify.js'; -export default function v6ToV1(uuid) { - const v6Bytes = typeof uuid === 'string' ? parse(uuid) : uuid; - const v1Bytes = _v6ToV1(v6Bytes); - return typeof uuid === 'string' ? unsafeStringify(v1Bytes) : v1Bytes; -} -function _v6ToV1(v6Bytes) { - return Uint8Array.of(((v6Bytes[3] & 0x0f) << 4) | ((v6Bytes[4] >> 4) & 0x0f), ((v6Bytes[4] & 0x0f) << 4) | ((v6Bytes[5] & 0xf0) >> 4), ((v6Bytes[5] & 0x0f) << 4) | (v6Bytes[6] & 0x0f), v6Bytes[7], ((v6Bytes[1] & 0x0f) << 4) | ((v6Bytes[2] & 0xf0) >> 4), ((v6Bytes[2] & 0x0f) << 4) | ((v6Bytes[3] & 0xf0) >> 4), 0x10 | ((v6Bytes[0] & 0xf0) >> 4), ((v6Bytes[0] & 0x0f) << 4) | ((v6Bytes[1] & 0xf0) >> 4), v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v7.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v7.d.ts deleted file mode 100644 index f49b03d..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v7.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Version7Options } from './types.js'; -type V7State = { - msecs?: number; - seq?: number; -}; -declare function v7(options?: Version7Options, buf?: undefined, offset?: number): string; -declare function v7(options: Version7Options | undefined, buf: TBuf, offset?: number): TBuf; -export declare function updateV7State(state: V7State, now: number, rnds: Uint8Array): V7State; -export default v7; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v7.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v7.js deleted file mode 100644 index 276c9bf..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/v7.js +++ /dev/null @@ -1,65 +0,0 @@ -import rng from './rng.js'; -import { unsafeStringify } from './stringify.js'; -const _state = {}; -function v7(options, buf, offset) { - let bytes; - if (options) { - bytes = v7Bytes(options.random ?? options.rng?.() ?? rng(), options.msecs, options.seq, buf, offset); - } - else { - const now = Date.now(); - const rnds = rng(); - updateV7State(_state, now, rnds); - bytes = v7Bytes(rnds, _state.msecs, _state.seq, buf, offset); - } - return buf ?? unsafeStringify(bytes); -} -export function updateV7State(state, now, rnds) { - state.msecs ??= -Infinity; - state.seq ??= 0; - if (now > state.msecs) { - state.seq = (rnds[6] << 23) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9]; - state.msecs = now; - } - else { - state.seq = (state.seq + 1) | 0; - if (state.seq === 0) { - state.msecs++; - } - } - return state; -} -function v7Bytes(rnds, msecs, seq, buf, offset = 0) { - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - if (!buf) { - buf = new Uint8Array(16); - offset = 0; - } - else { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - } - msecs ??= Date.now(); - seq ??= ((rnds[6] * 0x7f) << 24) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9]; - buf[offset++] = (msecs / 0x10000000000) & 0xff; - buf[offset++] = (msecs / 0x100000000) & 0xff; - buf[offset++] = (msecs / 0x1000000) & 0xff; - buf[offset++] = (msecs / 0x10000) & 0xff; - buf[offset++] = (msecs / 0x100) & 0xff; - buf[offset++] = msecs & 0xff; - buf[offset++] = 0x70 | ((seq >>> 28) & 0x0f); - buf[offset++] = (seq >>> 20) & 0xff; - buf[offset++] = 0x80 | ((seq >>> 14) & 0x3f); - buf[offset++] = (seq >>> 6) & 0xff; - buf[offset++] = ((seq << 2) & 0xff) | (rnds[10] & 0x03); - buf[offset++] = rnds[11]; - buf[offset++] = rnds[12]; - buf[offset++] = rnds[13]; - buf[offset++] = rnds[14]; - buf[offset++] = rnds[15]; - return buf; -} -export default v7; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/validate.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/validate.d.ts deleted file mode 100644 index 57da03d..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/validate.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function validate(uuid: unknown): boolean; -export default validate; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/validate.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/validate.js deleted file mode 100644 index 444a1a2..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/validate.js +++ /dev/null @@ -1,5 +0,0 @@ -import REGEX from './regex.js'; -function validate(uuid) { - return typeof uuid === 'string' && REGEX.test(uuid); -} -export default validate; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/version.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/version.d.ts deleted file mode 100644 index f1948dc..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/version.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function version(uuid: string): number; -export default version; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/version.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/version.js deleted file mode 100644 index bae91d3..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm-browser/version.js +++ /dev/null @@ -1,8 +0,0 @@ -import validate from './validate.js'; -function version(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - return parseInt(uuid.slice(14, 15), 16); -} -export default version; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/bin/uuid b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/bin/uuid deleted file mode 100644 index b4f612d..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/bin/uuid +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -import '../uuid-bin.js'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/index.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/index.d.ts deleted file mode 100644 index d7d4edc..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export type * from './types.js'; -export { default as MAX } from './max.js'; -export { default as NIL } from './nil.js'; -export { default as parse } from './parse.js'; -export { default as stringify } from './stringify.js'; -export { default as v1 } from './v1.js'; -export { default as v1ToV6 } from './v1ToV6.js'; -export { default as v3 } from './v3.js'; -export { default as v4 } from './v4.js'; -export { default as v5 } from './v5.js'; -export { default as v6 } from './v6.js'; -export { default as v6ToV1 } from './v6ToV1.js'; -export { default as v7 } from './v7.js'; -export { default as validate } from './validate.js'; -export { default as version } from './version.js'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/index.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/index.js deleted file mode 100644 index 3193e9a..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/index.js +++ /dev/null @@ -1,14 +0,0 @@ -export { default as MAX } from './max.js'; -export { default as NIL } from './nil.js'; -export { default as parse } from './parse.js'; -export { default as stringify } from './stringify.js'; -export { default as v1 } from './v1.js'; -export { default as v1ToV6 } from './v1ToV6.js'; -export { default as v3 } from './v3.js'; -export { default as v4 } from './v4.js'; -export { default as v5 } from './v5.js'; -export { default as v6 } from './v6.js'; -export { default as v6ToV1 } from './v6ToV1.js'; -export { default as v7 } from './v7.js'; -export { default as validate } from './validate.js'; -export { default as version } from './version.js'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/max.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/max.d.ts deleted file mode 100644 index 7a1e972..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/max.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "ffffffff-ffff-ffff-ffff-ffffffffffff"; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/max.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/max.js deleted file mode 100644 index 58951f6..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/max.js +++ /dev/null @@ -1 +0,0 @@ -export default 'ffffffff-ffff-ffff-ffff-ffffffffffff'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/md5.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/md5.d.ts deleted file mode 100644 index 7d60244..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/md5.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// -/// -declare function md5(bytes: Uint8Array): Buffer; -export default md5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/md5.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/md5.js deleted file mode 100644 index b922d98..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/md5.js +++ /dev/null @@ -1,11 +0,0 @@ -import { createHash } from 'crypto'; -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } - else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - return createHash('md5').update(bytes).digest(); -} -export default md5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/native.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/native.d.ts deleted file mode 100644 index 9e0d2ac..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/native.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -import { randomUUID } from 'crypto'; -declare const _default: { - randomUUID: typeof randomUUID; -}; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/native.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/native.js deleted file mode 100644 index ba74bca..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/native.js +++ /dev/null @@ -1,2 +0,0 @@ -import { randomUUID } from 'crypto'; -export default { randomUUID }; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/nil.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/nil.d.ts deleted file mode 100644 index b03bb98..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/nil.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "00000000-0000-0000-0000-000000000000"; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/nil.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/nil.js deleted file mode 100644 index de6f830..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/nil.js +++ /dev/null @@ -1 +0,0 @@ -export default '00000000-0000-0000-0000-000000000000'; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/parse.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/parse.d.ts deleted file mode 100644 index a316fb1..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/parse.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function parse(uuid: string): Uint8Array; -export default parse; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/parse.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/parse.js deleted file mode 100644 index 64ac401..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/parse.js +++ /dev/null @@ -1,9 +0,0 @@ -import validate from './validate.js'; -function parse(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - let v; - return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 0xff, ((v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000) & 0xff, (v / 0x100000000) & 0xff, (v >>> 24) & 0xff, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff); -} -export default parse; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/regex.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/regex.d.ts deleted file mode 100644 index d39fa3f..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/regex.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: RegExp; -export default _default; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/regex.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/regex.js deleted file mode 100644 index 3e38591..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/regex.js +++ /dev/null @@ -1 +0,0 @@ -export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/rng.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/rng.d.ts deleted file mode 100644 index 73e60cf..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/rng.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function rng(): Uint8Array; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/rng.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/rng.js deleted file mode 100644 index 54c1cfe..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/rng.js +++ /dev/null @@ -1,10 +0,0 @@ -import { randomFillSync } from 'crypto'; -const rnds8Pool = new Uint8Array(256); -let poolPtr = rnds8Pool.length; -export default function rng() { - if (poolPtr > rnds8Pool.length - 16) { - randomFillSync(rnds8Pool); - poolPtr = 0; - } - return rnds8Pool.slice(poolPtr, (poolPtr += 16)); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/sha1.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/sha1.d.ts deleted file mode 100644 index ebb1404..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/sha1.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// -/// -declare function sha1(bytes: Uint8Array): Buffer; -export default sha1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/sha1.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/sha1.js deleted file mode 100644 index fda4aa3..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/sha1.js +++ /dev/null @@ -1,11 +0,0 @@ -import { createHash } from 'crypto'; -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } - else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - return createHash('sha1').update(bytes).digest(); -} -export default sha1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/stringify.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/stringify.d.ts deleted file mode 100644 index 16cb008..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/stringify.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare function unsafeStringify(arr: Uint8Array, offset?: number): string; -declare function stringify(arr: Uint8Array, offset?: number): string; -export default stringify; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/stringify.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/stringify.js deleted file mode 100644 index 962738c..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/stringify.js +++ /dev/null @@ -1,35 +0,0 @@ -import validate from './validate.js'; -const byteToHex = []; -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} -export function unsafeStringify(arr, offset = 0) { - return (byteToHex[arr[offset + 0]] + - byteToHex[arr[offset + 1]] + - byteToHex[arr[offset + 2]] + - byteToHex[arr[offset + 3]] + - '-' + - byteToHex[arr[offset + 4]] + - byteToHex[arr[offset + 5]] + - '-' + - byteToHex[arr[offset + 6]] + - byteToHex[arr[offset + 7]] + - '-' + - byteToHex[arr[offset + 8]] + - byteToHex[arr[offset + 9]] + - '-' + - byteToHex[arr[offset + 10]] + - byteToHex[arr[offset + 11]] + - byteToHex[arr[offset + 12]] + - byteToHex[arr[offset + 13]] + - byteToHex[arr[offset + 14]] + - byteToHex[arr[offset + 15]]).toLowerCase(); -} -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); - if (!validate(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - return uuid; -} -export default stringify; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/types.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/types.d.ts deleted file mode 100644 index ecaed97..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/types.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export type UUIDTypes = string | TBuf; -export type Version1Options = { - node?: Uint8Array; - clockseq?: number; - random?: Uint8Array; - rng?: () => Uint8Array; - msecs?: number; - nsecs?: number; - _v6?: boolean; -}; -export type Version4Options = { - random?: Uint8Array; - rng?: () => Uint8Array; -}; -export type Version6Options = Version1Options; -export type Version7Options = { - random?: Uint8Array; - msecs?: number; - seq?: number; - rng?: () => Uint8Array; -}; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/types.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/types.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/types.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/uuid-bin.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/uuid-bin.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/uuid-bin.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/uuid-bin.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/uuid-bin.js deleted file mode 100644 index 30766fe..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/uuid-bin.js +++ /dev/null @@ -1,70 +0,0 @@ -import * as assert from 'assert'; -import v1 from './v1.js'; -import v3 from './v3.js'; -import v4 from './v4.js'; -import v5 from './v5.js'; -import v6 from './v6.js'; -import v7 from './v7.js'; -function usage() { - console.log('Usage:'); - console.log(' uuid'); - console.log(' uuid v1'); - console.log(' uuid v3 '); - console.log(' uuid v4'); - console.log(' uuid v5 '); - console.log(' uuid v6'); - console.log(' uuid v7'); - console.log(' uuid --help'); - console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC9562'); -} -const args = process.argv.slice(2); -if (args.indexOf('--help') >= 0) { - usage(); - process.exit(0); -} -const version = args.shift() || 'v4'; -switch (version) { - case 'v1': - console.log(v1()); - break; - case 'v3': { - const name = args.shift(); - let namespace = args.shift(); - assert.ok(name != null, 'v3 name not specified'); - assert.ok(namespace != null, 'v3 namespace not specified'); - if (namespace === 'URL') { - namespace = v3.URL; - } - if (namespace === 'DNS') { - namespace = v3.DNS; - } - console.log(v3(name, namespace)); - break; - } - case 'v4': - console.log(v4()); - break; - case 'v5': { - const name = args.shift(); - let namespace = args.shift(); - assert.ok(name != null, 'v5 name not specified'); - assert.ok(namespace != null, 'v5 namespace not specified'); - if (namespace === 'URL') { - namespace = v5.URL; - } - if (namespace === 'DNS') { - namespace = v5.DNS; - } - console.log(v5(name, namespace)); - break; - } - case 'v6': - console.log(v6()); - break; - case 'v7': - console.log(v7()); - break; - default: - usage(); - process.exit(1); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v1.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v1.d.ts deleted file mode 100644 index d8ecee0..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v1.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Version1Options } from './types.js'; -type V1State = { - node?: Uint8Array; - clockseq?: number; - msecs?: number; - nsecs?: number; -}; -declare function v1(options?: Version1Options, buf?: undefined, offset?: number): string; -declare function v1(options: Version1Options | undefined, buf: Buf, offset?: number): Buf; -export declare function updateV1State(state: V1State, now: number, rnds: Uint8Array): V1State; -export default v1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v1.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v1.js deleted file mode 100644 index 65e3f68..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v1.js +++ /dev/null @@ -1,83 +0,0 @@ -import rng from './rng.js'; -import { unsafeStringify } from './stringify.js'; -const _state = {}; -function v1(options, buf, offset) { - let bytes; - const isV6 = options?._v6 ?? false; - if (options) { - const optionsKeys = Object.keys(options); - if (optionsKeys.length === 1 && optionsKeys[0] === '_v6') { - options = undefined; - } - } - if (options) { - bytes = v1Bytes(options.random ?? options.rng?.() ?? rng(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset); - } - else { - const now = Date.now(); - const rnds = rng(); - updateV1State(_state, now, rnds); - bytes = v1Bytes(rnds, _state.msecs, _state.nsecs, isV6 ? undefined : _state.clockseq, isV6 ? undefined : _state.node, buf, offset); - } - return buf ?? unsafeStringify(bytes); -} -export function updateV1State(state, now, rnds) { - state.msecs ??= -Infinity; - state.nsecs ??= 0; - if (now === state.msecs) { - state.nsecs++; - if (state.nsecs >= 10000) { - state.node = undefined; - state.nsecs = 0; - } - } - else if (now > state.msecs) { - state.nsecs = 0; - } - else if (now < state.msecs) { - state.node = undefined; - } - if (!state.node) { - state.node = rnds.slice(10, 16); - state.node[0] |= 0x01; - state.clockseq = ((rnds[8] << 8) | rnds[9]) & 0x3fff; - } - state.msecs = now; - return state; -} -function v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) { - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - if (!buf) { - buf = new Uint8Array(16); - offset = 0; - } - else { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - } - msecs ??= Date.now(); - nsecs ??= 0; - clockseq ??= ((rnds[8] << 8) | rnds[9]) & 0x3fff; - node ??= rnds.slice(10, 16); - msecs += 12219292800000; - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - buf[offset++] = (tl >>> 24) & 0xff; - buf[offset++] = (tl >>> 16) & 0xff; - buf[offset++] = (tl >>> 8) & 0xff; - buf[offset++] = tl & 0xff; - const tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff; - buf[offset++] = (tmh >>> 8) & 0xff; - buf[offset++] = tmh & 0xff; - buf[offset++] = ((tmh >>> 24) & 0xf) | 0x10; - buf[offset++] = (tmh >>> 16) & 0xff; - buf[offset++] = (clockseq >>> 8) | 0x80; - buf[offset++] = clockseq & 0xff; - for (let n = 0; n < 6; ++n) { - buf[offset++] = node[n]; - } - return buf; -} -export default v1; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v1ToV6.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v1ToV6.d.ts deleted file mode 100644 index 38eaaf0..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v1ToV6.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default function v1ToV6(uuid: string): string; -export default function v1ToV6(uuid: Uint8Array): Uint8Array; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v1ToV6.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v1ToV6.js deleted file mode 100644 index da0f763..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v1ToV6.js +++ /dev/null @@ -1,10 +0,0 @@ -import parse from './parse.js'; -import { unsafeStringify } from './stringify.js'; -export default function v1ToV6(uuid) { - const v1Bytes = typeof uuid === 'string' ? parse(uuid) : uuid; - const v6Bytes = _v1ToV6(v1Bytes); - return typeof uuid === 'string' ? unsafeStringify(v6Bytes) : v6Bytes; -} -function _v1ToV6(v1Bytes) { - return Uint8Array.of(((v1Bytes[6] & 0x0f) << 4) | ((v1Bytes[7] >> 4) & 0x0f), ((v1Bytes[7] & 0x0f) << 4) | ((v1Bytes[4] & 0xf0) >> 4), ((v1Bytes[4] & 0x0f) << 4) | ((v1Bytes[5] & 0xf0) >> 4), ((v1Bytes[5] & 0x0f) << 4) | ((v1Bytes[0] & 0xf0) >> 4), ((v1Bytes[0] & 0x0f) << 4) | ((v1Bytes[1] & 0xf0) >> 4), ((v1Bytes[1] & 0x0f) << 4) | ((v1Bytes[2] & 0xf0) >> 4), 0x60 | (v1Bytes[2] & 0x0f), v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v3.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v3.d.ts deleted file mode 100644 index 5d1c434..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v3.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { UUIDTypes } from './types.js'; -export { DNS, URL } from './v35.js'; -declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string; -declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf: TBuf, offset?: number): TBuf; -declare namespace v3 { - var DNS: string; - var URL: string; -} -export default v3; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v3.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v3.js deleted file mode 100644 index b5c3781..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v3.js +++ /dev/null @@ -1,9 +0,0 @@ -import md5 from './md5.js'; -import v35, { DNS, URL } from './v35.js'; -export { DNS, URL } from './v35.js'; -function v3(value, namespace, buf, offset) { - return v35(0x30, md5, value, namespace, buf, offset); -} -v3.DNS = DNS; -v3.URL = URL; -export default v3; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v35.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v35.d.ts deleted file mode 100644 index 4e6e9d5..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v35.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { UUIDTypes } from './types.js'; -export declare function stringToBytes(str: string): Uint8Array; -export declare const DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; -export declare const URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; -type HashFunction = (bytes: Uint8Array) => Uint8Array; -export default function v35(version: 0x30 | 0x50, hash: HashFunction, value: string | Uint8Array, namespace: UUIDTypes, buf?: TBuf, offset?: number): UUIDTypes; -export {}; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v35.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v35.js deleted file mode 100644 index 2e02842..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v35.js +++ /dev/null @@ -1,39 +0,0 @@ -import parse from './parse.js'; -import { unsafeStringify } from './stringify.js'; -export function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); - const bytes = new Uint8Array(str.length); - for (let i = 0; i < str.length; ++i) { - bytes[i] = str.charCodeAt(i); - } - return bytes; -} -export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -export default function v35(version, hash, value, namespace, buf, offset) { - const valueBytes = typeof value === 'string' ? stringToBytes(value) : value; - const namespaceBytes = typeof namespace === 'string' ? parse(namespace) : namespace; - if (typeof namespace === 'string') { - namespace = parse(namespace); - } - if (namespace?.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } - let bytes = new Uint8Array(16 + valueBytes.length); - bytes.set(namespaceBytes); - bytes.set(valueBytes, namespaceBytes.length); - bytes = hash(bytes); - bytes[6] = (bytes[6] & 0x0f) | version; - bytes[8] = (bytes[8] & 0x3f) | 0x80; - if (buf) { - offset = offset || 0; - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return unsafeStringify(bytes); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v4.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v4.d.ts deleted file mode 100644 index 8205333..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v4.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Version4Options } from './types.js'; -declare function v4(options?: Version4Options, buf?: undefined, offset?: number): string; -declare function v4(options: Version4Options | undefined, buf: TBuf, offset?: number): TBuf; -export default v4; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v4.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v4.js deleted file mode 100644 index dd9067a..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v4.js +++ /dev/null @@ -1,27 +0,0 @@ -import native from './native.js'; -import rng from './rng.js'; -import { unsafeStringify } from './stringify.js'; -function v4(options, buf, offset) { - if (native.randomUUID && !buf && !options) { - return native.randomUUID(); - } - options = options || {}; - const rnds = options.random ?? options.rng?.() ?? rng(); - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - if (buf) { - offset = offset || 0; - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - return buf; - } - return unsafeStringify(rnds); -} -export default v4; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v5.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v5.d.ts deleted file mode 100644 index 0e2ff2f..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v5.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { UUIDTypes } from './types.js'; -export { DNS, URL } from './v35.js'; -declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string; -declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf: TBuf, offset?: number): TBuf; -declare namespace v5 { - var DNS: string; - var URL: string; -} -export default v5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v5.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v5.js deleted file mode 100644 index bd470a4..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v5.js +++ /dev/null @@ -1,9 +0,0 @@ -import sha1 from './sha1.js'; -import v35, { DNS, URL } from './v35.js'; -export { DNS, URL } from './v35.js'; -function v5(value, namespace, buf, offset) { - return v35(0x50, sha1, value, namespace, buf, offset); -} -v5.DNS = DNS; -v5.URL = URL; -export default v5; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v6.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v6.d.ts deleted file mode 100644 index cabf4a0..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v6.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Version6Options } from './types.js'; -declare function v6(options?: Version6Options, buf?: undefined, offset?: number): string; -declare function v6(options: Version6Options | undefined, buf: TBuf, offset?: number): TBuf; -export default v6; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v6.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v6.js deleted file mode 100644 index bd1fc35..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v6.js +++ /dev/null @@ -1,20 +0,0 @@ -import { unsafeStringify } from './stringify.js'; -import v1 from './v1.js'; -import v1ToV6 from './v1ToV6.js'; -function v6(options, buf, offset) { - options ??= {}; - offset ??= 0; - let bytes = v1({ ...options, _v6: true }, new Uint8Array(16)); - bytes = v1ToV6(bytes); - if (buf) { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; i++) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return unsafeStringify(bytes); -} -export default v6; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v6ToV1.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v6ToV1.d.ts deleted file mode 100644 index 3b3ffc2..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v6ToV1.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default function v6ToV1(uuid: string): string; -export default function v6ToV1(uuid: Uint8Array): Uint8Array; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v6ToV1.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v6ToV1.js deleted file mode 100644 index bfd942f..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v6ToV1.js +++ /dev/null @@ -1,10 +0,0 @@ -import parse from './parse.js'; -import { unsafeStringify } from './stringify.js'; -export default function v6ToV1(uuid) { - const v6Bytes = typeof uuid === 'string' ? parse(uuid) : uuid; - const v1Bytes = _v6ToV1(v6Bytes); - return typeof uuid === 'string' ? unsafeStringify(v1Bytes) : v1Bytes; -} -function _v6ToV1(v6Bytes) { - return Uint8Array.of(((v6Bytes[3] & 0x0f) << 4) | ((v6Bytes[4] >> 4) & 0x0f), ((v6Bytes[4] & 0x0f) << 4) | ((v6Bytes[5] & 0xf0) >> 4), ((v6Bytes[5] & 0x0f) << 4) | (v6Bytes[6] & 0x0f), v6Bytes[7], ((v6Bytes[1] & 0x0f) << 4) | ((v6Bytes[2] & 0xf0) >> 4), ((v6Bytes[2] & 0x0f) << 4) | ((v6Bytes[3] & 0xf0) >> 4), 0x10 | ((v6Bytes[0] & 0xf0) >> 4), ((v6Bytes[0] & 0x0f) << 4) | ((v6Bytes[1] & 0xf0) >> 4), v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]); -} diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v7.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v7.d.ts deleted file mode 100644 index f49b03d..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v7.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Version7Options } from './types.js'; -type V7State = { - msecs?: number; - seq?: number; -}; -declare function v7(options?: Version7Options, buf?: undefined, offset?: number): string; -declare function v7(options: Version7Options | undefined, buf: TBuf, offset?: number): TBuf; -export declare function updateV7State(state: V7State, now: number, rnds: Uint8Array): V7State; -export default v7; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v7.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v7.js deleted file mode 100644 index 276c9bf..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/v7.js +++ /dev/null @@ -1,65 +0,0 @@ -import rng from './rng.js'; -import { unsafeStringify } from './stringify.js'; -const _state = {}; -function v7(options, buf, offset) { - let bytes; - if (options) { - bytes = v7Bytes(options.random ?? options.rng?.() ?? rng(), options.msecs, options.seq, buf, offset); - } - else { - const now = Date.now(); - const rnds = rng(); - updateV7State(_state, now, rnds); - bytes = v7Bytes(rnds, _state.msecs, _state.seq, buf, offset); - } - return buf ?? unsafeStringify(bytes); -} -export function updateV7State(state, now, rnds) { - state.msecs ??= -Infinity; - state.seq ??= 0; - if (now > state.msecs) { - state.seq = (rnds[6] << 23) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9]; - state.msecs = now; - } - else { - state.seq = (state.seq + 1) | 0; - if (state.seq === 0) { - state.msecs++; - } - } - return state; -} -function v7Bytes(rnds, msecs, seq, buf, offset = 0) { - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - if (!buf) { - buf = new Uint8Array(16); - offset = 0; - } - else { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - } - msecs ??= Date.now(); - seq ??= ((rnds[6] * 0x7f) << 24) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9]; - buf[offset++] = (msecs / 0x10000000000) & 0xff; - buf[offset++] = (msecs / 0x100000000) & 0xff; - buf[offset++] = (msecs / 0x1000000) & 0xff; - buf[offset++] = (msecs / 0x10000) & 0xff; - buf[offset++] = (msecs / 0x100) & 0xff; - buf[offset++] = msecs & 0xff; - buf[offset++] = 0x70 | ((seq >>> 28) & 0x0f); - buf[offset++] = (seq >>> 20) & 0xff; - buf[offset++] = 0x80 | ((seq >>> 14) & 0x3f); - buf[offset++] = (seq >>> 6) & 0xff; - buf[offset++] = ((seq << 2) & 0xff) | (rnds[10] & 0x03); - buf[offset++] = rnds[11]; - buf[offset++] = rnds[12]; - buf[offset++] = rnds[13]; - buf[offset++] = rnds[14]; - buf[offset++] = rnds[15]; - return buf; -} -export default v7; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/validate.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/validate.d.ts deleted file mode 100644 index 57da03d..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/validate.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function validate(uuid: unknown): boolean; -export default validate; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/validate.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/validate.js deleted file mode 100644 index 444a1a2..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/validate.js +++ /dev/null @@ -1,5 +0,0 @@ -import REGEX from './regex.js'; -function validate(uuid) { - return typeof uuid === 'string' && REGEX.test(uuid); -} -export default validate; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/version.d.ts b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/version.d.ts deleted file mode 100644 index f1948dc..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/version.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function version(uuid: string): number; -export default version; diff --git a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/version.js b/node_modules/@temporalio/client/node_modules/uuid/dist/esm/version.js deleted file mode 100644 index bae91d3..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/dist/esm/version.js +++ /dev/null @@ -1,8 +0,0 @@ -import validate from './validate.js'; -function version(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - return parseInt(uuid.slice(14, 15), 16); -} -export default version; diff --git a/node_modules/@temporalio/client/node_modules/uuid/package.json b/node_modules/@temporalio/client/node_modules/uuid/package.json deleted file mode 100644 index d0af3f8..0000000 --- a/node_modules/@temporalio/client/node_modules/uuid/package.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "name": "uuid", - "version": "11.1.1", - "description": "RFC9562 UUIDs", - "type": "module", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "keywords": [ - "uuid", - "guid", - "rfc4122", - "rfc9562" - ], - "license": "MIT", - "bin": { - "uuid": "./dist/esm/bin/uuid" - }, - "sideEffects": false, - "main": "./dist/cjs/index.js", - "exports": { - ".": { - "node": { - "import": "./dist/esm/index.js", - "require": "./dist/cjs/index.js" - }, - "browser": { - "import": "./dist/esm-browser/index.js", - "require": "./dist/cjs-browser/index.js" - }, - "default": "./dist/esm-browser/index.js" - }, - "./package.json": "./package.json" - }, - "module": "./dist/esm/index.js", - "browser": { - "./dist/esm/index.js": "./dist/esm-browser/index.js", - "./dist/cjs/index.js": "./dist/cjs-browser/index.js" - }, - "files": [ - "dist", - "!dist/**/test" - ], - "devDependencies": { - "@babel/eslint-parser": "7.25.9", - "@commitlint/cli": "19.6.1", - "@commitlint/config-conventional": "19.6.0", - "@eslint/js": "9.17.0", - "@types/eslint__js": "8.42.3", - "bundlewatch": "0.4.0", - "commander": "12.1.0", - "eslint": "9.17.0", - "eslint-config-prettier": "9.1.0", - "eslint-plugin-prettier": "5.2.1", - "globals": "15.14.0", - "husky": "9.1.7", - "jest": "29.7.0", - "lint-staged": "15.2.11", - "neostandard": "0.12.0", - "npm-run-all": "4.1.5", - "prettier": "3.4.2", - "release-please": "16.15.0", - "runmd": "1.4.1", - "standard-version": "9.5.0", - "typescript": "5.0.4", - "typescript-eslint": "8.18.2" - }, - "optionalDevDependencies": { - "@wdio/browserstack-service": "9.2.1", - "@wdio/cli": "9.2.1", - "@wdio/jasmine-framework": "9.2.1", - "@wdio/local-runner": "9.2.1", - "@wdio/spec-reporter": "9.1.3", - "@wdio/static-server-service": "9.1.3" - }, - "scripts": { - "build": "./scripts/build.sh", - "build:watch": "tsc --watch -p tsconfig.esm.json", - "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json", - "docs:diff": "npm run docs && git diff --quiet README.md", - "docs": "npm run build && npx runmd --output=README.md README_js.md", - "eslint:check": "eslint src/ test/ examples/ *.[jt]s", - "eslint:fix": "eslint --fix src/ test/ examples/ *.[jt]s", - "examples:browser:rollup:build": "cd examples/browser-rollup && npm run build", - "examples:browser:webpack:build": "cd examples/browser-webpack && npm run build", - "examples:node:commonjs:test": "cd examples/node-commonjs && npm test", - "examples:node:esmodules:test": "cd examples/node-esmodules && npm test", - "examples:node:jest:test": "cd examples/node-jest && npm test", - "examples:node:typescript:test": "cd examples/typescript && npm test", - "lint": "npm run eslint:check && npm run prettier:check", - "md": "runmd --watch --output=README.md README_js.md", - "prepack": "npm run build -- --no-pack", - "prepare": "husky", - "prepublishOnly": "npm run build", - "pretest:benchmark": "npm run build", - "pretest:browser": "./scripts/iodd && npm run build && npm-run-all --parallel examples:browser:**", - "pretest:node": "npm run build", - "pretest": "npm run build", - "prettier:check": "prettier --check .", - "prettier:fix": "prettier --write .", - "release": "standard-version --no-verify", - "test:benchmark": "cd examples/benchmark && npm test", - "test:browser": "wdio run ./wdio.conf.js", - "test:node": "npm-run-all --parallel examples:node:**", - "test:watch": "node --test --enable-source-maps --watch dist/esm/test/*.js", - "test": "node --test --enable-source-maps dist/esm/test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/uuidjs/uuid.git" - }, - "lint-staged": { - "*": [ - "prettier --no-error-on-unmatched-pattern --write" - ], - "*.{js,jsx}": [ - "eslint --no-error-on-unmatched-pattern --fix" - ] - }, - "standard-version": { - "scripts": { - "postchangelog": "prettier --write CHANGELOG.md" - } - }, - "packageManager": "npm@11.0.0" -} diff --git a/node_modules/@temporalio/client/package.json b/node_modules/@temporalio/client/package.json deleted file mode 100644 index af4074d..0000000 --- a/node_modules/@temporalio/client/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "@temporalio/client", - "version": "1.16.2", - "description": "Temporal.io SDK Client sub-package", - "main": "lib/index.js", - "types": "./lib/index.d.ts", - "keywords": [ - "temporal", - "workflow", - "client" - ], - "author": "Temporal Technologies Inc. ", - "license": "MIT", - "dependencies": { - "@grpc/grpc-js": "^1.12.4", - "abort-controller": "^3.0.0", - "long": "^5.2.3", - "uuid": "^11.1.0", - "@temporalio/proto": "1.16.2", - "@temporalio/common": "1.16.2" - }, - "devDependencies": { - "@types/uuid": "^9.0.7", - "protobufjs": "^7.2.5" - }, - "bugs": { - "url": "https://github.com/temporalio/sdk-typescript/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/temporalio/sdk-typescript.git", - "directory": "packages/client" - }, - "homepage": "https://github.com/temporalio/sdk-typescript/tree/main/packages/client", - "publishConfig": { - "access": "public" - }, - "files": [ - "src", - "lib" - ], - "engines": { - "node": ">= 20.0.0" - }, - "scripts": {} -} \ No newline at end of file diff --git a/node_modules/@temporalio/client/src/async-completion-client.ts b/node_modules/@temporalio/client/src/async-completion-client.ts deleted file mode 100644 index 36cd894..0000000 --- a/node_modules/@temporalio/client/src/async-completion-client.ts +++ /dev/null @@ -1,265 +0,0 @@ -import { status as grpcStatus } from '@grpc/grpc-js'; -import { ensureTemporalFailure } from '@temporalio/common'; -import { encodeErrorToFailure, encodeToPayloads } from '@temporalio/common/lib/internal-non-workflow'; -import { filterNullAndUndefined } from '@temporalio/common/lib/internal-workflow'; -import { SymbolBasedInstanceOfError } from '@temporalio/common/lib/type-helpers'; -import { - BaseClient, - BaseClientOptions, - defaultBaseClientOptions, - LoadedWithDefaults, - WithDefaults, -} from './base-client'; -import { isGrpcServiceError } from './errors'; -import { WorkflowService } from './types'; -import { rethrowKnownErrorTypes } from './helpers'; - -/** - * Thrown by {@link AsyncCompletionClient} when trying to complete or heartbeat an Activity that does not exist in the - * system. - */ -@SymbolBasedInstanceOfError('ActivityNotFoundError') -export class ActivityNotFoundError extends Error {} - -/** - * Thrown by {@link AsyncCompletionClient} when trying to complete or heartbeat - * an Activity for any reason apart from {@link ActivityNotFoundError}. - */ -@SymbolBasedInstanceOfError('ActivityCompletionError') -export class ActivityCompletionError extends Error {} - -/** - * Thrown by {@link AsyncCompletionClient.heartbeat} when the Workflow has - * requested to cancel the reporting Activity. - */ -@SymbolBasedInstanceOfError('ActivityCancelledError') -export class ActivityCancelledError extends Error {} - -/** - * Thrown by {@link AsyncCompletionClient.heartbeat} when the reporting Activity - * has been paused. - */ -@SymbolBasedInstanceOfError('ActivityPausedError') -export class ActivityPausedError extends Error {} - -/** - * Thrown by {@link AsyncCompletionClient.heartbeat} when the reporting Activity - * has been reset. - */ -@SymbolBasedInstanceOfError('ActivityResetError') -export class ActivityResetError extends Error {} - -/** - * Options used to configure {@link AsyncCompletionClient} - */ -export type AsyncCompletionClientOptions = BaseClientOptions; - -export type LoadedAsyncCompletionClientOptions = LoadedWithDefaults; - -function defaultAsyncCompletionClientOptions(): WithDefaults { - return defaultBaseClientOptions(); -} - -/** - * A mostly unique Activity identifier including its scheduling workflow's ID - * and an optional runId. - * - * Activity IDs may be reused in a single Workflow run as long as a previous - * Activity with the same ID has completed already. - */ -export interface FullActivityId { - workflowId: string; - runId?: string; - activityId: string; -} - -/** - * A client for asynchronous completion and heartbeating of Activities. - * - * Typically this client should not be instantiated directly, instead create the high level {@link Client} and use - * {@link Client.activity} to complete async activities. - */ -export class AsyncCompletionClient extends BaseClient { - public readonly options: LoadedAsyncCompletionClientOptions; - - constructor(options?: AsyncCompletionClientOptions) { - super(options); - this.options = { - ...defaultAsyncCompletionClientOptions(), - ...filterNullAndUndefined(options ?? {}), - loadedDataConverter: this.dataConverter, - }; - } - - /** - * Raw gRPC access to the Temporal service. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests made via this service - * object. - */ - get workflowService(): WorkflowService { - return this.connection.workflowService; - } - - /** - * Transforms grpc errors into well defined TS errors. - */ - protected handleError(err: unknown): never { - if (isGrpcServiceError(err)) { - rethrowKnownErrorTypes(err); - - if (err.code === grpcStatus.NOT_FOUND) { - throw new ActivityNotFoundError('Not found'); - } - - throw new ActivityCompletionError(err.details || err.message); - } - throw new ActivityCompletionError('Unexpected failure'); - } - - /** - * Complete an Activity by task token - */ - async complete(taskToken: Uint8Array, result: unknown): Promise; - /** - * Complete an Activity by full ID - */ - async complete(fullActivityId: FullActivityId, result: unknown): Promise; - - async complete(taskTokenOrFullActivityId: Uint8Array | FullActivityId, result: unknown): Promise { - const payloads = await encodeToPayloads(this.dataConverter, result); - try { - if (taskTokenOrFullActivityId instanceof Uint8Array) { - await this.workflowService.respondActivityTaskCompleted({ - identity: this.options.identity, - namespace: this.options.namespace, - taskToken: taskTokenOrFullActivityId, - result: { payloads }, - }); - } else { - await this.workflowService.respondActivityTaskCompletedById({ - identity: this.options.identity, - namespace: this.options.namespace, - ...taskTokenOrFullActivityId, - result: { payloads }, - }); - } - } catch (err) { - this.handleError(err); - } - } - - /** - * Fail an Activity by task token - */ - async fail(taskToken: Uint8Array, err: unknown): Promise; - /** - * Fail an Activity by full ID - */ - async fail(fullActivityId: FullActivityId, err: unknown): Promise; - - async fail(taskTokenOrFullActivityId: Uint8Array | FullActivityId, err: unknown): Promise { - const failure = await encodeErrorToFailure(this.dataConverter, ensureTemporalFailure(err)); - try { - if (taskTokenOrFullActivityId instanceof Uint8Array) { - await this.workflowService.respondActivityTaskFailed({ - identity: this.options.identity, - namespace: this.options.namespace, - taskToken: taskTokenOrFullActivityId, - failure, - }); - } else { - await this.workflowService.respondActivityTaskFailedById({ - identity: this.options.identity, - namespace: this.options.namespace, - ...taskTokenOrFullActivityId, - failure, - }); - } - } catch (err) { - this.handleError(err); - } - } - - /** - * Report Activity cancellation by task token - */ - reportCancellation(taskToken: Uint8Array, details?: unknown): Promise; - /** - * Report Activity cancellation by full ID - */ - reportCancellation(fullActivityId: FullActivityId, details?: unknown): Promise; - - async reportCancellation(taskTokenOrFullActivityId: Uint8Array | FullActivityId, details?: unknown): Promise { - const payloads = await encodeToPayloads(this.dataConverter, details); - try { - if (taskTokenOrFullActivityId instanceof Uint8Array) { - await this.workflowService.respondActivityTaskCanceled({ - identity: this.options.identity, - namespace: this.options.namespace, - taskToken: taskTokenOrFullActivityId, - details: { payloads }, - }); - } else { - await this.workflowService.respondActivityTaskCanceledById({ - identity: this.options.identity, - namespace: this.options.namespace, - ...taskTokenOrFullActivityId, - details: { payloads }, - }); - } - } catch (err) { - this.handleError(err); - } - } - - /** - * Send Activity heartbeat by task token - */ - heartbeat(taskToken: Uint8Array, details?: unknown): Promise; - /** - * Send Activity heartbeat by full ID - */ - heartbeat(fullActivityId: FullActivityId, details?: unknown): Promise; - - async heartbeat(taskTokenOrFullActivityId: Uint8Array | FullActivityId, details?: unknown): Promise { - const payloads = await encodeToPayloads(this.dataConverter, details); - let cancelRequested = false; - let paused = false; - let reset = false; - try { - if (taskTokenOrFullActivityId instanceof Uint8Array) { - const response = await this.workflowService.recordActivityTaskHeartbeat({ - identity: this.options.identity, - namespace: this.options.namespace, - taskToken: taskTokenOrFullActivityId, - details: { payloads }, - }); - cancelRequested = !!response.cancelRequested; - paused = !!response.activityPaused; - reset = !!response.activityReset; - } else { - const response = await this.workflowService.recordActivityTaskHeartbeatById({ - identity: this.options.identity, - namespace: this.options.namespace, - ...taskTokenOrFullActivityId, - details: { payloads }, - }); - cancelRequested = !!response.cancelRequested; - paused = !!response.activityPaused; - reset = !!response.activityReset; - } - } catch (err) { - this.handleError(err); - } - // Note that it is possible for a heartbeat response to have multiple fields - // set as true (i.e. cancelled and pause). - if (cancelRequested) { - throw new ActivityCancelledError('cancelled'); - } else if (reset) { - throw new ActivityResetError('reset'); - } else if (paused) { - throw new ActivityPausedError('paused'); - } - } -} diff --git a/node_modules/@temporalio/client/src/base-client.ts b/node_modules/@temporalio/client/src/base-client.ts deleted file mode 100644 index 9e865a3..0000000 --- a/node_modules/@temporalio/client/src/base-client.ts +++ /dev/null @@ -1,122 +0,0 @@ -import os from 'node:os'; -import type * as _grpc from '@grpc/grpc-js'; // For JSDoc only -import { DataConverter, LoadedDataConverter } from '@temporalio/common'; -import { isLoadedDataConverter, loadDataConverter } from '@temporalio/common/lib/internal-non-workflow'; -import { Connection } from './connection'; -import { ConnectionLike, Metadata } from './types'; - -export interface BaseClientOptions { - /** - * {@link DataConverter} to use for serializing and deserializing payloads - */ - dataConverter?: DataConverter; - - /** - * Identity to report to the server - * - * @default `${process.pid}@${os.hostname()}` - */ - identity?: string; - - /** - * Connection to use to communicate with the server. - * - * By default, connects to localhost. - * - * Connections are expensive to construct and should be reused. - */ - connection?: ConnectionLike; - - /** - * Server namespace - * - * @default default - */ - namespace?: string; -} - -export type WithDefaults = // - Required> & Pick; - -export type LoadedWithDefaults = // - WithDefaults & { - loadedDataConverter: LoadedDataConverter; - }; - -export function defaultBaseClientOptions(): WithDefaults { - return { - dataConverter: {}, - identity: `${process.pid}@${os.hostname()}`, - namespace: 'default', - }; -} - -export class BaseClient { - /** - * The underlying {@link Connection | connection} or {@link NativeConnection | native connection} used by this client. - * - * Clients are cheap to create, but connections are expensive. Where it makes sense, - * a single connection may and should be reused by multiple `Client`s. - */ - public readonly connection: ConnectionLike; - - private readonly loadedDataConverter: LoadedDataConverter; - - protected constructor(options?: BaseClientOptions) { - this.connection = options?.connection ?? Connection.lazy(); - const dataConverter = options?.dataConverter ?? {}; - this.loadedDataConverter = isLoadedDataConverter(dataConverter) ? dataConverter : loadDataConverter(dataConverter); - } - - /** - * Set a deadline for any service requests executed in `fn`'s scope. - * - * The deadline is a point in time after which any pending gRPC request will be considered as failed; - * this will locally result in the request call throwing a {@link _grpc.ServiceError|ServiceError} - * with code {@link _grpc.status.DEADLINE_EXCEEDED|DEADLINE_EXCEEDED}; see {@link isGrpcDeadlineError}. - * - * It is stronly recommended to explicitly set deadlines. If no deadline is set, then it is - * possible for the client to end up waiting forever for a response. - * - * This method is only a convenience wrapper around {@link Connection.withDeadline}. - * - * @param deadline a point in time after which the request will be considered as failed; either a - * Date object, or a number of milliseconds since the Unix epoch (UTC). - * @returns the value returned from `fn` - * - * @see https://grpc.io/docs/guides/deadlines/ - */ - public async withDeadline(deadline: number | Date, fn: () => Promise): Promise { - return await this.connection.withDeadline(deadline, fn); - } - - /** - * Set an {@link AbortSignal} that, when aborted, cancels any ongoing service requests executed in - * `fn`'s scope. This will locally result in the request call throwing a {@link _grpc.ServiceError|ServiceError} - * with code {@link _grpc.status.CANCELLED|CANCELLED}; see {@link isGrpcCancelledError}. - * - * This method is only a convenience wrapper around {@link Connection.withAbortSignal}. - * - * @returns value returned from `fn` - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal - */ - async withAbortSignal(abortSignal: AbortSignal, fn: () => Promise): Promise { - return await this.connection.withAbortSignal(abortSignal, fn); - } - - /** - * Set metadata for any service requests executed in `fn`'s scope. - * - * This method is only a convenience wrapper around {@link Connection.withMetadata}. - * - * @returns returned value of `fn` - */ - public async withMetadata(metadata: Metadata, fn: () => Promise): Promise { - return await this.connection.withMetadata(metadata, fn); - } - - protected get dataConverter(): LoadedDataConverter { - return this.loadedDataConverter; - } -} diff --git a/node_modules/@temporalio/client/src/build-id-types.ts b/node_modules/@temporalio/client/src/build-id-types.ts deleted file mode 100644 index ff8b214..0000000 --- a/node_modules/@temporalio/client/src/build-id-types.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { temporal } from '@temporalio/proto'; - -/** - * Operations that can be passed to {@link TaskQueueClient.updateBuildIdCompatibility}. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export type BuildIdOperation = - | AddNewIdInNewDefaultSet - | AddNewCompatibleVersion - | PromoteSetByBuildId - | PromoteBuildIdWithinSet - | MergeSets; - -/** - * Adds a new Build Id into a new set, which will be used as the default set for - * the queue. This means all new workflows will start on this Build Id. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface AddNewIdInNewDefaultSet { - operation: 'addNewIdInNewDefaultSet'; - buildId: string; -} - -/** - * Adds a new Build Id into an existing compatible set. The newly added ID becomes - * the default for that compatible set, and thus new workflow tasks for workflows which have been - * executing on workers in that set will now start on this new Build Id. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface AddNewCompatibleVersion { - operation: 'addNewCompatibleVersion'; - // The Build Id to add to an existing compatible set. - buildId: string; - // A Build Id which must already be defined on the task queue, and is used to - // find the compatible set to add the new id to. - existingCompatibleBuildId: string; - // If set to true, the targeted set will also be promoted to become the - // overall default set for the queue. - promoteSet?: boolean; -} - -/** - * Promotes a set of compatible Build Ids to become the current - * default set for the task queue. Any Build Id in the set may be used to - * target it. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface PromoteSetByBuildId { - operation: 'promoteSetByBuildId'; - buildId: string; -} - -/** - * Promotes a Build Id within an existing set to become the default ID for that - * set. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface PromoteBuildIdWithinSet { - operation: 'promoteBuildIdWithinSet'; - buildId: string; -} - -/** - * Merges two sets into one set, thus declaring all the Build Ids in both as - * compatible with one another. The default of the primary set is maintained as - * the merged set's overall default. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface MergeSets { - operation: 'mergeSets'; - // A Build Id which is used to find the primary set to be merged. - primaryBuildId: string; - // A Build Id which is used to find the secondary set to be merged. - secondaryBuildId: string; -} - -/** - * Represents the sets of compatible Build Id versions associated with some - * Task Queue, as fetched by {@link TaskQueueClient.getBuildIdCompatability}. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface WorkerBuildIdVersionSets { - /** - * All version sets that were fetched for this task queue. - */ - readonly versionSets: BuildIdVersionSet[]; - - /** - * Returns the default set of compatible Build Ids for the task queue these sets are - * associated with. - */ - defaultSet: BuildIdVersionSet; - - /** - * Returns the overall default Build Id for the task queue these sets are - * associated with. - */ - defaultBuildId: string; -} - -/** - * Represents one set of compatible Build Ids. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface BuildIdVersionSet { - // All build IDs contained in the set. - readonly buildIds: string[]; - - // Returns the default Build Id for this set - readonly default: string; -} - -export function versionSetsFromProto( - resp: temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse -): WorkerBuildIdVersionSets { - if (resp == null || resp.majorVersionSets == null || resp.majorVersionSets.length === 0) { - throw new Error('Must be constructed from a compatability response with at least one version set'); - } - return { - versionSets: resp.majorVersionSets.map((set) => versionSetFromProto(set)), - get defaultSet(): BuildIdVersionSet { - // versionSets are read only so no need to worry about an undefined ending up in it - return this.versionSets[this.versionSets.length - 1]!; - }, - get defaultBuildId(): string { - return this.defaultSet.default; - }, - }; -} - -function versionSetFromProto(set: temporal.api.taskqueue.v1.ICompatibleVersionSet): BuildIdVersionSet { - if (set == null || set.buildIds == null || set.buildIds.length === 0) { - throw new Error('Compatible version sets must contain at least one Build Id'); - } - const buildId = set.buildIds[set.buildIds.length - 1]; - if (buildId === undefined) { - throw new Error('Compatible version sets must contain at least one Build Id'); - } - return { - buildIds: set.buildIds, - default: buildId, - }; -} diff --git a/node_modules/@temporalio/client/src/client.ts b/node_modules/@temporalio/client/src/client.ts deleted file mode 100644 index 601b4ab..0000000 --- a/node_modules/@temporalio/client/src/client.ts +++ /dev/null @@ -1,154 +0,0 @@ -import { filterNullAndUndefined } from '@temporalio/common/lib/internal-workflow'; -import { AsyncCompletionClient } from './async-completion-client'; -import { BaseClient, BaseClientOptions, defaultBaseClientOptions, LoadedWithDefaults } from './base-client'; -import { ClientInterceptors } from './interceptors'; -import { ScheduleClient } from './schedule-client'; -import { QueryRejectCondition, WorkflowService } from './types'; -import { WorkflowClient } from './workflow-client'; -import { TaskQueueClient } from './task-queue-client'; - -export interface ClientOptions extends BaseClientOptions { - /** - * Used to override and extend default Connection functionality - * - * Useful for injecting auth headers and tracing Workflow executions - */ - interceptors?: ClientInterceptors; - - /** - * List of plugins to register with the client. - * - * Plugins allow you to extend and customize the behavior of Temporal clients. - * They can intercept and modify client creation. - * - * @experimental Plugins is an experimental feature; APIs may change without notice. - */ - plugins?: ClientPlugin[]; - - workflow?: { - /** - * Should a query be rejected by closed and failed workflows - * - * @default `undefined`, which means that closed and failed workflows are still queryable - */ - queryRejectCondition?: QueryRejectCondition; - }; -} - -export type LoadedClientOptions = LoadedWithDefaults; - -/** - * High level SDK client. - */ -export class Client extends BaseClient { - public readonly options: LoadedClientOptions; - - /** - * Workflow sub-client - use to start and interact with Workflows - */ - public readonly workflow: WorkflowClient; - /** - * (Async) Activity completion sub-client - use to manually manage Activities - */ - public readonly activity: AsyncCompletionClient; - /** - * Schedule sub-client - use to start and interact with Schedules - */ - public readonly schedule: ScheduleClient; - /** - * Task Queue sub-client - use to perform operations on Task Queues - * - * @experimental The Worker Versioning API is still being designed. Major changes are expected. - */ - public readonly taskQueue: TaskQueueClient; - - constructor(options?: ClientOptions) { - options = options ?? {}; - - // Add client plugins from the connection - options.plugins = (options.plugins ?? []).concat(options.connection?.plugins ?? []); - - // Process plugins first to allow them to modify connect configuration - for (const plugin of options.plugins) { - if (plugin.configureClient !== undefined) { - options = plugin.configureClient(options); - } - } - - super(options); - - const { interceptors, workflow, plugins, ...commonOptions } = options; - - this.workflow = new WorkflowClient({ - ...commonOptions, - ...(workflow ?? {}), - connection: this.connection, - dataConverter: this.dataConverter, - interceptors: interceptors?.workflow, - queryRejectCondition: workflow?.queryRejectCondition, - }); - - this.activity = new AsyncCompletionClient({ - ...commonOptions, - connection: this.connection, - dataConverter: this.dataConverter, - }); - - this.schedule = new ScheduleClient({ - ...commonOptions, - connection: this.connection, - dataConverter: this.dataConverter, - interceptors: interceptors?.schedule, - }); - - this.taskQueue = new TaskQueueClient({ - ...commonOptions, - connection: this.connection, - dataConverter: this.dataConverter, - }); - - this.options = { - ...defaultBaseClientOptions(), - ...filterNullAndUndefined(commonOptions), - loadedDataConverter: this.dataConverter, - interceptors: { - workflow: this.workflow.options.interceptors, - schedule: this.schedule.options.interceptors, - }, - workflow: { - queryRejectCondition: this.workflow.options.queryRejectCondition, - }, - plugins: plugins ?? [], - }; - } - - /** - * Raw gRPC access to the Temporal service. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests made via this service - * object. - */ - get workflowService(): WorkflowService { - return this.connection.workflowService; - } -} - -/** - * Plugin to control the configuration of a native connection. - * - * @experimental Plugins is an experimental feature; APIs may change without notice. - */ -export interface ClientPlugin { - /** - * Gets the name of this plugin. - */ - get name(): string; - - /** - * Hook called when creating a client to allow modification of configuration. - * - * This method is called during client creation and allows plugins to modify - * the client configuration before the client is fully initialized. - */ - configureClient?(options: Omit): Omit; -} diff --git a/node_modules/@temporalio/client/src/connection.ts b/node_modules/@temporalio/client/src/connection.ts deleted file mode 100644 index 3f11da5..0000000 --- a/node_modules/@temporalio/client/src/connection.ts +++ /dev/null @@ -1,727 +0,0 @@ -import { AsyncLocalStorage } from 'node:async_hooks'; -import * as grpc from '@grpc/grpc-js'; -import type * as proto from 'protobufjs'; -import { - normalizeTlsConfig, - TLSConfig, - normalizeGrpcEndpointAddress, -} from '@temporalio/common/lib/internal-non-workflow'; -import { filterNullAndUndefined } from '@temporalio/common/lib/internal-workflow'; -import { Duration, msOptionalToNumber } from '@temporalio/common/lib/time'; -import { type temporal } from '@temporalio/proto'; -import { isGrpcServiceError, ServiceError } from './errors'; -import { defaultGrpcRetryOptions, makeGrpcRetryInterceptor } from './grpc-retry'; -import pkg from './pkg'; -import { CallContext, HealthService, Metadata, OperatorService, TestService, WorkflowService } from './types'; - -/** - * The default Temporal Server's TCP port for public gRPC connections. - */ -const DEFAULT_TEMPORAL_GRPC_PORT = 7233; - -/** - * gRPC and Temporal Server connection options - */ -export interface ConnectionOptions { - /** - * The address of the Temporal server to connect to, in `hostname:port` format. - * - * Port defaults to 7233. Raw IPv6 addresses must be wrapped in square brackets (e.g. `[ipv6]:port`). - * - * @default localhost:7233 - */ - address?: string; - - /** - * TLS configuration. Pass a falsy value to use a non-encrypted connection, - * or `true` or `{}` to connect with TLS without any customization. - * - * For advanced scenario, a prebuilt {@link grpc.ChannelCredentials} object - * may instead be specified using the {@link credentials} property. - * - * Either {@link credentials} or this may be specified for configuring TLS - * - * @default TLS is disabled - */ - tls?: TLSConfig | boolean | null; - - /** - * gRPC channel credentials. - * - * `ChannelCredentials` are things like SSL credentials that can be used to secure a connection. - * There may be only one `ChannelCredentials`. They can be created using some of the factory - * methods defined {@link https://grpc.github.io/grpc/node/grpc.credentials.html | here} - * - * Specifying a prebuilt `ChannelCredentials` should only be required for advanced use cases. - * For simple TLS use cases, using the {@link tls} property is recommended. To register - * `CallCredentials` (eg. metadata-based authentication), use the {@link callCredentials} property. - * - * Either {@link tls} or this may be specified for configuring TLS - */ - credentials?: grpc.ChannelCredentials; - - /** - * gRPC call credentials. - * - * `CallCredentials` generaly modify metadata; they can be attached to a connection to affect all method - * calls made using that connection. They can be created using some of the factory methods defined - * {@link https://grpc.github.io/grpc/node/grpc.credentials.html | here} - * - * If `callCredentials` are specified, they will be composed with channel credentials - * (either the one created implicitely by using the {@link tls} option, or the one specified - * explicitly through {@link credentials}). Notice that gRPC doesn't allow registering - * `callCredentials` on insecure connections. - */ - callCredentials?: grpc.CallCredentials[]; - - /** - * GRPC Channel arguments - * - * @see option descriptions {@link https://grpc.github.io/grpc/core/group__grpc__arg__keys.html | here} - * - * By default the SDK sets the following keepalive arguments: - * - * ``` - * grpc.keepalive_permit_without_calls: 1 - * grpc.keepalive_time_ms: 30_000 - * grpc.keepalive_timeout_ms: 15_000 - * ``` - * - * To opt-out of keepalive, override these keys with `undefined`. - */ - channelArgs?: grpc.ChannelOptions; - - /** - * {@link https://grpc.github.io/grpc/node/module-src_client_interceptors.html | gRPC interceptors} which will be - * applied to every RPC call performed by this connection. By default, an interceptor will be included which - * automatically retries retryable errors. If you do not wish to perform automatic retries, set this to an empty list - * (or a list with your own interceptors). If you want to add your own interceptors while keeping the default retry - * behavior, add this to your list of interceptors: `makeGrpcRetryInterceptor(defaultGrpcRetryOptions())`. See: - * - * - {@link makeGrpcRetryInterceptor} - * - {@link defaultGrpcRetryOptions} - */ - interceptors?: grpc.Interceptor[]; - - /** - * Optional mapping of gRPC metadata (HTTP headers) to send with each request to the server. - * Setting the `Authorization` header is mutually exclusive with the {@link apiKey} option. - * - * In order to dynamically set metadata, use {@link Connection.withMetadata} - */ - metadata?: Metadata; - - /** - * API key for Temporal. This becomes the "Authorization" HTTP header with "Bearer " prepended. - * This is mutually exclusive with the `Authorization` header in {@link ConnectionOptions.metadata}. - * - * You may provide a static string or a callback. Also see {@link Connection.withApiKey} or - * {@link Connection.setApiKey} - */ - apiKey?: string | (() => string); - - /** - * Milliseconds to wait until establishing a connection with the server. - * - * Used either when connecting eagerly with {@link Connection.connect} or - * calling {@link Connection.ensureConnected}. - * - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - * @default 10 seconds - */ - connectTimeout?: Duration; - - /** - * List of plugins to register with the connection. - * - * Plugins allow you to configure the connection options. - * Any plugins provided will also be passed to any client built from this connection. - * - * @experimental Plugins is an experimental feature; APIs may change without notice. - */ - plugins?: ConnectionPlugin[]; -} - -export type ConnectionOptionsWithDefaults = Required< - Omit -> & { - connectTimeoutMs: number; -}; - -/** - * A symbol used to attach extra, SDK-internal connection options. - * - * @internal - * @hidden - */ -export const InternalConnectionOptionsSymbol = Symbol('__temporal_internal_connection_options'); -export type InternalConnectionOptions = ConnectionOptions & { - [InternalConnectionOptionsSymbol]?: { - /** - * Indicate whether the `TestService` should be enabled on this connection. This is set to true - * on connections created internally by `TestWorkflowEnvironment.createTimeSkipping()`. - */ - supportsTestService?: boolean; - }; -}; - -export const LOCAL_TARGET = 'localhost:7233'; - -function addDefaults(options: ConnectionOptions): ConnectionOptionsWithDefaults { - const { channelArgs, interceptors, connectTimeout, ...rest } = options; - return { - address: LOCAL_TARGET, - credentials: grpc.credentials.createInsecure(), - channelArgs: { - 'grpc.keepalive_permit_without_calls': 1, - 'grpc.keepalive_time_ms': 30_000, - 'grpc.keepalive_timeout_ms': 15_000, - max_receive_message_length: 128 * 1024 * 1024, // 128 MB - ...channelArgs, - }, - interceptors: interceptors ?? [makeGrpcRetryInterceptor(defaultGrpcRetryOptions())], - metadata: {}, - connectTimeoutMs: msOptionalToNumber(connectTimeout) ?? 10_000, - plugins: [], - ...filterNullAndUndefined(rest), - }; -} - -/** - * - Convert {@link ConnectionOptions.tls} to {@link grpc.ChannelCredentials} - * - Add the grpc.ssl_target_name_override GRPC {@link ConnectionOptions.channelArgs | channel arg} - * - Add default port to address if port not specified - * - Set `Authorization` header based on {@link ConnectionOptions.apiKey} - */ -function normalizeGRPCConfig(options: ConnectionOptions): ConnectionOptions { - const { tls: tlsFromConfig, credentials, callCredentials, ...rest } = options; - if (rest.apiKey) { - if (rest.metadata?.['Authorization']) { - throw new TypeError( - 'Both `apiKey` option and `Authorization` header were provided, but only one makes sense to use at a time.' - ); - } - if (credentials !== undefined) { - throw new TypeError( - 'Both `apiKey` and `credentials` ConnectionOptions were provided, but only one makes sense to use at a time' - ); - } - } - if (rest.address) { - rest.address = normalizeGrpcEndpointAddress(rest.address, DEFAULT_TEMPORAL_GRPC_PORT); - } - const tls = normalizeTlsConfig(tlsFromConfig, options.apiKey); - if (tls) { - if (credentials) { - throw new TypeError('Both `tls` and `credentials` ConnectionOptions were provided'); - } - const serverRootCert = tls.serverRootCACertificate && Buffer.from(tls.serverRootCACertificate); - const clientCertKey = tls.clientCertPair?.key && Buffer.from(tls.clientCertPair?.key); - const clientCertCrt = tls.clientCertPair?.crt && Buffer.from(tls.clientCertPair?.crt); - return { - ...rest, - credentials: grpc.credentials.combineChannelCredentials( - grpc.credentials.createSsl(serverRootCert, clientCertKey, clientCertCrt), - ...(callCredentials ?? []) - ), - channelArgs: { - ...rest.channelArgs, - ...(tls.serverNameOverride - ? { - 'grpc.ssl_target_name_override': tls.serverNameOverride, - 'grpc.default_authority': tls.serverNameOverride, - } - : undefined), - }, - }; - } else { - return { - ...rest, - credentials: grpc.credentials.combineChannelCredentials( - credentials ?? grpc.credentials.createInsecure(), - ...(callCredentials ?? []) - ), - }; - } -} - -export interface RPCImplOptions { - serviceName: string; - client: grpc.Client; - callContextStorage: AsyncLocalStorage; - interceptors?: grpc.Interceptor[]; - staticMetadata: Metadata; - apiKeyFnRef: { fn?: () => string }; -} - -export interface ConnectionCtorOptions { - readonly options: ConnectionOptionsWithDefaults; - readonly client: grpc.Client; - - /** - * Raw gRPC access to the Temporal service. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests made to the service. - */ - readonly workflowService: WorkflowService; - - /** - * Raw gRPC access to the Temporal {@link https://github.com/temporalio/api/blob/ddf07ab9933e8230309850e3c579e1ff34b03f53/temporal/api/operatorservice/v1/service.proto | operator service}. - */ - readonly operatorService: OperatorService; - - /** - * Raw gRPC access to the Temporal test service. - * - * Will be `undefined` if connected to a server that does not support the test service. - */ - readonly testService: TestService | undefined; - - /** - * Raw gRPC access to the standard gRPC {@link https://github.com/grpc/grpc/blob/92f58c18a8da2728f571138c37760a721c8915a2/doc/health-checking.md | health service}. - */ - readonly healthService: HealthService; - - readonly callContextStorage: AsyncLocalStorage; - readonly apiKeyFnRef: { fn?: () => string }; -} - -/** - * Client connection to the Temporal Server - * - * ⚠️ Connections are expensive to construct and should be reused. - * Make sure to {@link close} any unused connections to avoid leaking resources. - */ -export class Connection { - /** - * @internal - */ - public static readonly Client = grpc.makeGenericClientConstructor({}, 'WorkflowService', {}); - - public readonly options: ConnectionOptionsWithDefaults; - protected readonly client: grpc.Client; - - /** - * Used to ensure `ensureConnected` is called once. - */ - protected connectPromise?: Promise; - - /** - * Raw gRPC access to Temporal Server's {@link - * https://github.com/temporalio/api/blob/master/temporal/api/workflowservice/v1/service.proto | Workflow service} - */ - public readonly workflowService: WorkflowService; - - /** - * Raw gRPC access to Temporal Server's - * {@link https://github.com/temporalio/api/blob/master/temporal/api/operatorservice/v1/service.proto | Operator service} - * - * The Operator Service API defines how Temporal SDKs and other clients interact with the Temporal - * server to perform administrative functions like registering a search attribute or a namespace. - * - * This Service API is NOT compatible with Temporal Cloud. Attempt to use it against a Temporal - * Cloud namespace will result in gRPC `unauthorized` error. - */ - public readonly operatorService: OperatorService; - - /** - * Raw gRPC access to the Temporal test service. - * - * Will be `undefined` if connected to a server that does not support the test service. - */ - public readonly testService: TestService | undefined; - - /** - * Raw gRPC access to the standard gRPC {@link https://github.com/grpc/grpc/blob/92f58c18a8da2728f571138c37760a721c8915a2/doc/health-checking.md | health service}. - */ - public readonly healthService: HealthService; - - public readonly plugins: ConnectionPlugin[]; - - readonly callContextStorage: AsyncLocalStorage; - private readonly apiKeyFnRef: { fn?: () => string }; - - protected static createCtorOptions(options: ConnectionOptions): ConnectionCtorOptions { - const normalizedOptions = normalizeGRPCConfig(options); - const apiKeyFnRef: { fn?: () => string } = {}; - if (normalizedOptions.apiKey) { - if (typeof normalizedOptions.apiKey === 'string') { - const apiKey = normalizedOptions.apiKey; - apiKeyFnRef.fn = () => apiKey; - } else { - apiKeyFnRef.fn = normalizedOptions.apiKey; - } - } - const optionsWithDefaults = addDefaults(normalizedOptions); - // Allow overriding this - optionsWithDefaults.metadata['client-name'] ??= 'temporal-typescript'; - optionsWithDefaults.metadata['client-version'] ??= pkg.version; - - const client = new this.Client( - optionsWithDefaults.address, - optionsWithDefaults.credentials, - optionsWithDefaults.channelArgs - ); - const callContextStorage = new AsyncLocalStorage(); - - const workflowRpcImpl = this.generateRPCImplementation({ - serviceName: 'temporal.api.workflowservice.v1.WorkflowService', - client, - callContextStorage, - interceptors: optionsWithDefaults?.interceptors, - staticMetadata: optionsWithDefaults.metadata, - apiKeyFnRef, - }); - const workflowService = WorkflowService.create(workflowRpcImpl, false, false); - - const operatorRpcImpl = this.generateRPCImplementation({ - serviceName: 'temporal.api.operatorservice.v1.OperatorService', - client, - callContextStorage, - interceptors: optionsWithDefaults?.interceptors, - staticMetadata: optionsWithDefaults.metadata, - apiKeyFnRef, - }); - const operatorService = OperatorService.create(operatorRpcImpl, false, false); - - let testService: TestService | undefined = undefined; - if ((options as InternalConnectionOptions)?.[InternalConnectionOptionsSymbol]?.supportsTestService) { - const testRpcImpl = this.generateRPCImplementation({ - serviceName: 'temporal.api.testservice.v1.TestService', - client, - callContextStorage, - interceptors: optionsWithDefaults?.interceptors, - staticMetadata: optionsWithDefaults.metadata, - apiKeyFnRef, - }); - testService = TestService.create(testRpcImpl, false, false); - } - - const healthRpcImpl = this.generateRPCImplementation({ - serviceName: 'grpc.health.v1.Health', - client, - callContextStorage, - interceptors: optionsWithDefaults?.interceptors, - staticMetadata: optionsWithDefaults.metadata, - apiKeyFnRef, - }); - const healthService = HealthService.create(healthRpcImpl, false, false); - - return { - client, - callContextStorage, - workflowService, - operatorService, - testService, - healthService, - options: optionsWithDefaults, - apiKeyFnRef, - }; - } - - /** - * Ensure connection can be established. - * - * Does not need to be called if you use {@link connect}. - * - * This method's result is memoized to ensure it runs only once. - * - * Calls {@link proto.temporal.api.workflowservice.v1.WorkflowService.getSystemInfo} internally. - */ - async ensureConnected(): Promise { - if (this.connectPromise == null) { - const deadline = Date.now() + this.options.connectTimeoutMs; - this.connectPromise = (async () => { - await this.untilReady(deadline); - - try { - await this.withDeadline(deadline, () => this.workflowService.getSystemInfo({})); - } catch (err) { - if (isGrpcServiceError(err)) { - // Ignore old servers - if (err.code !== grpc.status.UNIMPLEMENTED) { - throw new ServiceError('Failed to connect to Temporal server', { cause: err }); - } - } else { - throw err; - } - } - })(); - } - return this.connectPromise; - } - - /** - * Create a lazy `Connection` instance. - * - * This method does not verify connectivity with the server. We recommend using {@link connect} instead. - */ - static lazy(options?: ConnectionOptions): Connection { - options = options ?? {}; - for (const plugin of options.plugins ?? []) { - if (plugin.configureConnection !== undefined) { - options = plugin.configureConnection(options); - } - } - return new this(this.createCtorOptions(options)); - } - - /** - * Establish a connection with the server and return a `Connection` instance. - * - * This is the preferred method of creating connections as it verifies connectivity by calling - * {@link ensureConnected}. - */ - static async connect(options?: ConnectionOptions): Promise { - const conn = this.lazy(options); - await conn.ensureConnected(); - return conn; - } - - protected constructor({ - options, - client, - workflowService, - operatorService, - testService, - healthService, - callContextStorage, - apiKeyFnRef, - }: ConnectionCtorOptions) { - this.options = options; - this.client = client; - this.workflowService = this.withNamespaceHeaderInjector(workflowService); - this.operatorService = operatorService; - this.testService = testService; - this.healthService = healthService; - this.callContextStorage = callContextStorage; - this.apiKeyFnRef = apiKeyFnRef; - this.plugins = options.plugins ?? []; - } - - protected static generateRPCImplementation({ - serviceName, - client, - callContextStorage, - interceptors, - staticMetadata, - apiKeyFnRef, - }: RPCImplOptions): proto.RPCImpl { - return ( - method: proto.Method | proto.rpc.ServiceMethod, proto.Message>, - requestData: Uint8Array, - callback: grpc.requestCallback - ) => { - const metadataContainer = new grpc.Metadata(); - const { metadata, deadline, abortSignal } = callContextStorage.getStore() ?? {}; - if (apiKeyFnRef.fn) { - const apiKey = apiKeyFnRef.fn(); - if (apiKey) metadataContainer.set('Authorization', `Bearer ${apiKey}`); - } - for (const [k, v] of Object.entries(staticMetadata)) { - metadataContainer.set(k, v); - } - if (metadata != null) { - for (const [k, v] of Object.entries(metadata)) { - metadataContainer.set(k, v); - } - } - - const call = client.makeUnaryRequest( - `/${serviceName}/${method.name}`, - (arg: any) => arg, - (arg: any) => arg, - requestData, - metadataContainer, - { interceptors, deadline }, - callback - ); - - if (abortSignal != null) { - abortSignal.addEventListener('abort', () => call.cancel()); - } - - return call; - }; - } - - /** - * Set a deadline for any service requests executed in `fn`'s scope. - * - * The deadline is a point in time after which any pending gRPC request will be considered as failed; - * this will locally result in the request call throwing a {@link grpc.ServiceError|ServiceError} - * with code {@link grpc.status.DEADLINE_EXCEEDED|DEADLINE_EXCEEDED}; see {@link isGrpcDeadlineError}. - * - * It is strongly recommended to explicitly set deadlines. If no deadline is set, then it is - * possible for the client to end up waiting forever for a response. - * - * @param deadline a point in time after which the request will be considered as failed; either a - * Date object, or a number of milliseconds since the Unix epoch (UTC). - * @returns the value returned from `fn` - * - * @see https://grpc.io/docs/guides/deadlines/ - */ - async withDeadline(deadline: number | Date, fn: () => Promise): Promise { - const cc = this.callContextStorage.getStore(); - return await this.callContextStorage.run({ ...cc, deadline }, fn); - } - - /** - * Set an {@link AbortSignal} that, when aborted, cancels any ongoing service requests executed in - * `fn`'s scope. This will locally result in the request call throwing a {@link grpc.ServiceError|ServiceError} - * with code {@link grpc.status.CANCELLED|CANCELLED}; see {@link isGrpcCancelledError}. - * - * This method is only a convenience wrapper around {@link Connection.withAbortSignal}. - * - * @example - * - * ```ts - * const ctrl = new AbortController(); - * setTimeout(() => ctrl.abort(), 10_000); - * // 👇 throws if incomplete by the timeout. - * await conn.withAbortSignal(ctrl.signal, () => client.workflow.execute(myWorkflow, options)); - * ``` - * - * @returns value returned from `fn` - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal - */ - // FIXME: `abortSignal` should be cumulative, i.e. if a signal is already set, it should be added - // to the list of signals, and both the new and existing signal should abort the request. - async withAbortSignal(abortSignal: AbortSignal, fn: () => Promise): Promise { - const cc = this.callContextStorage.getStore(); - return await this.callContextStorage.run({ ...cc, abortSignal }, fn); - } - - /** - * Set metadata for any service requests executed in `fn`'s scope. - * - * The provided metadata is merged on top of any existing metadata in current scope, including metadata provided in - * {@link ConnectionOptions.metadata}. - * - * @returns value returned from `fn` - * - * @example - * - * ```ts - * const workflowHandle = await conn.withMetadata({ apiKey: 'secret' }, () => - * conn.withMetadata({ otherKey: 'set' }, () => client.start(options))) - * ); - * ``` - */ - async withMetadata(metadata: Metadata, fn: () => Promise): Promise { - const cc = this.callContextStorage.getStore(); - return await this.callContextStorage.run( - { - ...cc, - metadata: { ...cc?.metadata, ...metadata }, - }, - fn - ); - } - - /** - * Set the apiKey for any service requests executed in `fn`'s scope (thus changing the `Authorization` header). - * - * @returns value returned from `fn` - * - * @example - * - * ```ts - * const workflowHandle = await conn.withApiKey('secret', () => - * conn.withMetadata({ otherKey: 'set' }, () => client.start(options))) - * ); - * ``` - */ - async withApiKey(apiKey: string, fn: () => Promise): Promise { - const cc = this.callContextStorage.getStore(); - return await this.callContextStorage.run( - { - ...cc, - metadata: { ...cc?.metadata, Authorization: `Bearer ${apiKey}` }, - }, - fn - ); - } - - /** - * Set the {@link ConnectionOptions.apiKey} for all subsequent requests. A static string or a - * callback function may be provided. - */ - setApiKey(apiKey: string | (() => string)): void { - if (typeof apiKey === 'string') { - if (apiKey === '') { - throw new TypeError('`apiKey` must not be an empty string'); - } - this.apiKeyFnRef.fn = () => apiKey; - } else { - this.apiKeyFnRef.fn = apiKey; - } - } - - /** - * Wait for successful connection to the server. - * - * @see https://grpc.github.io/grpc/node/grpc.Client.html#waitForReady__anchor - */ - protected async untilReady(deadline: number): Promise { - return new Promise((resolve, reject) => { - this.client.waitForReady(deadline, (err) => { - if (err) { - reject(err); - } else { - resolve(); - } - }); - }); - } - - // This method is async for uniformity with NativeConnection which could be used in the future to power clients - /** - * Close the underlying gRPC client. - * - * Make sure to call this method to ensure proper resource cleanup. - */ - public async close(): Promise { - this.client.close(); - this.callContextStorage.disable(); - } - - private withNamespaceHeaderInjector( - workflowService: temporal.api.workflowservice.v1.WorkflowService - ): temporal.api.workflowservice.v1.WorkflowService { - const wrapper: any = {}; - - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - for (const [methodName, methodImpl] of Object.entries(workflowService) as [string, Function][]) { - if (typeof methodImpl !== 'function') continue; - - wrapper[methodName] = (...args: any[]) => { - const namespace = args[0]?.namespace; - if (namespace) { - return this.withMetadata({ 'temporal-namespace': namespace }, () => methodImpl.apply(workflowService, args)); - } else { - return methodImpl.apply(workflowService, args); - } - }; - } - return wrapper as WorkflowService; - } -} - -/** - * Plugin to control the configuration of a connection. - * - * @experimental Plugins is an experimental feature; APIs may change without notice. - */ -export interface ConnectionPlugin { - /** - * Gets the name of this plugin. - */ - get name(): string; - - /** - * Hook called when creating a connection to allow modification of configuration. - */ - configureConnection?(options: ConnectionOptions): ConnectionOptions; -} diff --git a/node_modules/@temporalio/client/src/errors.ts b/node_modules/@temporalio/client/src/errors.ts deleted file mode 100644 index eb1aa47..0000000 --- a/node_modules/@temporalio/client/src/errors.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { ServiceError as GrpcServiceError, status } from '@grpc/grpc-js'; -import { RetryState } from '@temporalio/common'; -import { isError, isRecord, SymbolBasedInstanceOfError } from '@temporalio/common/lib/type-helpers'; - -/** - * Generic Error class for errors coming from the service - */ -@SymbolBasedInstanceOfError('ServiceError') -export class ServiceError extends Error { - public readonly cause?: Error; - - constructor(message: string, opts?: { cause: Error }) { - super(message); - this.cause = opts?.cause; - } -} - -/** - * Thrown by the client while waiting on Workflow execution result if execution - * completes with failure. - * - * The failure type will be set in the `cause` attribute. - * - * For example if the workflow is cancelled, `cause` will be set to - * {@link CancelledFailure}. - */ -@SymbolBasedInstanceOfError('WorkflowFailedError') -export class WorkflowFailedError extends Error { - public constructor( - message: string, - public readonly cause: Error | undefined, - public readonly retryState: RetryState - ) { - super(message); - } -} - -/** - * Thrown by the client while waiting on Workflow Update result if Update - * completes with failure. - */ -@SymbolBasedInstanceOfError('WorkflowUpdateFailedError') -export class WorkflowUpdateFailedError extends Error { - public constructor( - message: string, - public readonly cause: Error | undefined - ) { - super(message); - } -} - -/** - * Thrown by the client if the Update call timed out or was cancelled. - * This doesn't mean the update itself was timed out or cancelled. - */ -@SymbolBasedInstanceOfError('WorkflowUpdateRPCTimeoutOrCancelledError') -export class WorkflowUpdateRPCTimeoutOrCancelledError extends Error { - public readonly cause?: Error; - - public constructor(message: string, opts?: { cause: Error }) { - super(message); - this.cause = opts?.cause; - } -} - -/** - * Thrown the by client while waiting on Workflow execution result if Workflow - * continues as new. - * - * Only thrown if asked not to follow the chain of execution (see {@link WorkflowOptions.followRuns}). - */ -@SymbolBasedInstanceOfError('WorkflowExecutionContinuedAsNewError') -export class WorkflowContinuedAsNewError extends Error { - public constructor( - message: string, - public readonly newExecutionRunId: string - ) { - super(message); - } -} - -/** - * Returns true if the provided error is a {@link GrpcServiceError}. - */ -export function isGrpcServiceError(err: unknown): err is GrpcServiceError { - return ( - isError(err) && - typeof (err as GrpcServiceError)?.details === 'string' && - isRecord((err as GrpcServiceError).metadata) - ); -} - -/** - * Returns true if the provided error or its cause is a {@link GrpcServiceError} with code DEADLINE_EXCEEDED. - * - * @see {@link Connection.withDeadline} - */ -export function isGrpcDeadlineError(err: unknown): err is Error { - while (isError(err)) { - if (isGrpcServiceError(err) && (err as GrpcServiceError).code === status.DEADLINE_EXCEEDED) { - return true; - } - err = (err as any).cause; - } - return false; -} - -/** - * Returns true if the provided error or its cause is a {@link GrpcServiceError} with code CANCELLED. - * - * @see {@link Connection.withAbortSignal} - */ -export function isGrpcCancelledError(err: unknown): err is Error { - while (isError(err)) { - if (isGrpcServiceError(err) && (err as GrpcServiceError).code === status.CANCELLED) { - return true; - } - err = (err as any).cause; - } - return false; -} - -/** - * @deprecated Use `isGrpcServiceError` instead - */ -export const isServerErrorResponse = isGrpcServiceError; diff --git a/node_modules/@temporalio/client/src/grpc-retry.ts b/node_modules/@temporalio/client/src/grpc-retry.ts deleted file mode 100644 index e79a1c2..0000000 --- a/node_modules/@temporalio/client/src/grpc-retry.ts +++ /dev/null @@ -1,216 +0,0 @@ -import { InterceptingCall, Interceptor, ListenerBuilder, RequesterBuilder, StatusObject } from '@grpc/grpc-js'; -import * as grpc from '@grpc/grpc-js'; - -export interface GrpcRetryOptions { - /** - * A function which accepts the current retry attempt (starts at 1) and returns the millisecond - * delay that should be applied before the next retry. - */ - delayFunction: (attempt: number, status: StatusObject) => number; - - /** - * A function which accepts a failed status object and returns true if the call should be retried - */ - retryableDecider: (attempt: number, status: StatusObject) => boolean; -} - -/** - * Options for the backoff formula: `factor ^ attempt * initialIntervalMs(status) * jitter(maxJitter)` - */ -export interface BackoffOptions { - /** - * Exponential backoff factor - * - * @default 1.7 - */ - factor: number; - - /** - * Maximum number of attempts - * - * @default 10 - */ - maxAttempts: number; - /** - * Maximum amount of jitter to apply - * - * @default 0.2 - */ - maxJitter: number; - /** - * Function that returns the "initial" backoff interval based on the returned status. - * - * The default is 1 second for RESOURCE_EXHAUSTED errors and 100 millis for other retryable errors. - */ - initialIntervalMs(status: StatusObject): number; - - /** - * Function that returns the "maximum" backoff interval based on the returned status. - * - * The default is 5 seconds regardless of the status. - */ - maxIntervalMs(status: StatusObject): number; -} - -/** - * Add defaults as documented in {@link BackoffOptions} - */ -function withDefaultBackoffOptions({ - maxAttempts, - factor, - maxJitter, - initialIntervalMs, -}: Partial): BackoffOptions { - return { - maxAttempts: maxAttempts ?? 10, - factor: factor ?? 1.7, - maxJitter: maxJitter ?? 0.2, - initialIntervalMs: initialIntervalMs ?? defaultInitialIntervalMs, - maxIntervalMs() { - return 5_000; - }, - }; -} - -/** - * Generates the default retry behavior based on given backoff options - */ -export function defaultGrpcRetryOptions(options: Partial = {}): GrpcRetryOptions { - const { maxAttempts, factor, maxJitter, initialIntervalMs, maxIntervalMs } = withDefaultBackoffOptions(options); - return { - delayFunction(attempt, status) { - return Math.min(maxIntervalMs(status), factor ** attempt * initialIntervalMs(status)) * jitter(maxJitter); - }, - retryableDecider(attempt, status) { - return attempt < maxAttempts && isRetryableError(status); - }, - }; -} - -/** - * Set of retryable gRPC status codes - */ -const retryableCodes = new Set([ - grpc.status.UNKNOWN, - grpc.status.RESOURCE_EXHAUSTED, - grpc.status.UNAVAILABLE, - grpc.status.ABORTED, - grpc.status.DATA_LOSS, - grpc.status.OUT_OF_RANGE, -]); - -export function isRetryableError(status: StatusObject): boolean { - // gRPC INTERNAL status is ambiguous and may be used in many unrelated situations, including: - // - TLS errors - // - Compression errors - // - Errors decoding protobuf messages (either client-side or server-side) - // - Transient HTTP/2 network errors - // - Failing some server-side request validation - // - etc. - // - // In most case, retrying is useless and would only be a waste of resource. - // However, in case of transient network errors, retrying is highly desirable. - // Unfortunately, the only way of differenciating between those various cases - // is pattern matching the error messages. - if (status.code === grpc.status.INTERNAL) { - // RST_STREAM code 0 means the HTTP2 request completed with HTTP status 200, but without - // the mandatory `grpc-status` header. That's generally due to some HTTP2 proxy or load balancer - // that doesn't know about gRPC-specifics. Retrying may help. - if (/RST_STREAM with code 0|Call ended without gRPC status/i.test(status.details)) return true; - - // RST_STREAM code 2 is pretty generic and encompasses most HTTP2 protocol errors. - // That may for example happen if the client tries to reuse the connection at the - // same time as the server initiate graceful closing. Retrying may help. - if (/RST_STREAM with code 2/i.test(status.details)) { - // Some TLS errors surfaces with message: - // "Received RST_STREAM with code 2 triggered by internal client error: […] SSL alert number XX" - // At this time, no TLS error is worth retrying, so dismiss those. - if (/SSL alert number/i.test(status.details)) return false; - - return true; - } - - return false; - } - - return retryableCodes.has(status.code); -} - -/** - * Calculates random amount of jitter between 0 and `max` - */ -function jitter(max: number) { - return 1 - max + Math.random() * max * 2; -} - -/** - * Default implementation - backs off more on RESOURCE_EXHAUSTED errors - */ -function defaultInitialIntervalMs({ code }: StatusObject) { - // Backoff more on RESOURCE_EXHAUSTED - if (code === grpc.status.RESOURCE_EXHAUSTED) { - return 1000; - } - return 100; -} - -/** - * Returns a GRPC interceptor that will perform automatic retries for some types of failed calls - * - * @param retryOptions Options for the retry interceptor - */ -export function makeGrpcRetryInterceptor(retryOptions: GrpcRetryOptions): Interceptor { - return (options, nextCall) => { - let savedSendMessage: any; - let savedReceiveMessage: any; - let savedMessageNext: (message: any) => void; - - const requester = new RequesterBuilder() - .withStart(function (metadata, _listener, next) { - // First attempt - let attempt = 1; - - const listener = new ListenerBuilder() - .withOnReceiveMessage((message, next) => { - savedReceiveMessage = message; - savedMessageNext = next; - }) - .withOnReceiveStatus((status, next) => { - const retry = () => { - attempt++; - const call = nextCall(options); - call.start(metadata, { - onReceiveMessage(message) { - savedReceiveMessage = message; - }, - onReceiveStatus, - }); - call.sendMessage(savedSendMessage); - call.halfClose(); - }; - - const onReceiveStatus = (status: StatusObject) => { - if (retryOptions.retryableDecider(attempt, status)) { - setTimeout(retry, retryOptions.delayFunction(attempt, status)); - } else { - savedMessageNext(savedReceiveMessage); - // TODO: For reasons that are completely unclear to me, if you pass a handcrafted - // status object here, node will magically just exit at the end of this line. - // No warning, no nothing. Here be dragons. - next(status); - } - }; - - onReceiveStatus(status); - }) - .build(); - next(metadata, listener); - }) - .withSendMessage((message, next) => { - savedSendMessage = message; - next(message); - }) - .build(); - return new InterceptingCall(nextCall(options), requester); - }; -} diff --git a/node_modules/@temporalio/client/src/helpers.ts b/node_modules/@temporalio/client/src/helpers.ts deleted file mode 100644 index 9fb332c..0000000 --- a/node_modules/@temporalio/client/src/helpers.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { ServiceError as GrpcServiceError, status as grpcStatus } from '@grpc/grpc-js'; -import { decodePriority, LoadedDataConverter, NamespaceNotFoundError } from '@temporalio/common'; -import { - decodeSearchAttributes, - decodeTypedSearchAttributes, - searchAttributePayloadConverter, -} from '@temporalio/common/lib/converter/payload-search-attributes'; -import { Replace } from '@temporalio/common/lib/type-helpers'; -import { optionalTsToDate, requiredTsToDate } from '@temporalio/common/lib/time'; -import { decodeMapFromPayloads } from '@temporalio/common/lib/internal-non-workflow/codec-helpers'; -import { temporal, google } from '@temporalio/proto'; -import { - CountWorkflowExecution, - RawWorkflowExecutionInfo, - WorkflowExecutionInfo, - WorkflowExecutionStatusName, -} from './types'; - -function workflowStatusCodeToName(code: temporal.api.enums.v1.WorkflowExecutionStatus): WorkflowExecutionStatusName { - return workflowStatusCodeToNameInternal(code) ?? 'UNKNOWN'; -} - -/** - * Intentionally leave out `default` branch to get compilation errors when new values are added - */ -function workflowStatusCodeToNameInternal( - code: temporal.api.enums.v1.WorkflowExecutionStatus -): WorkflowExecutionStatusName { - switch (code) { - case temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_UNSPECIFIED: - return 'UNSPECIFIED'; - case temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_RUNNING: - return 'RUNNING'; - case temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_FAILED: - return 'FAILED'; - case temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_TIMED_OUT: - return 'TIMED_OUT'; - case temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_CANCELED: - return 'CANCELLED'; - case temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_TERMINATED: - return 'TERMINATED'; - case temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_COMPLETED: - return 'COMPLETED'; - case temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW: - return 'CONTINUED_AS_NEW'; - case temporal.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_PAUSED: - return 'PAUSED'; - } -} - -export async function executionInfoFromRaw( - raw: RawWorkflowExecutionInfo, - dataConverter: LoadedDataConverter, - rawDataToEmbed: T -): Promise> { - return { - type: raw.type!.name!, - workflowId: raw.execution!.workflowId!, - runId: raw.execution!.runId!, - taskQueue: raw.taskQueue!, - status: { - code: raw.status!, - name: workflowStatusCodeToName(raw.status!), - }, - // Safe to convert to number, max history length is 50k, which is much less than Number.MAX_SAFE_INTEGER - historyLength: raw.historyLength!.toNumber(), - // Exact truncation for multi-petabyte histories - // historySize === 0 means WFT was generated by pre-1.20.0 server, and the history size is unknown - historySize: raw.historySizeBytes?.toNumber() || undefined, - startTime: requiredTsToDate(raw.startTime, 'startTime'), - executionTime: optionalTsToDate(raw.executionTime), - closeTime: optionalTsToDate(raw.closeTime), - memo: await decodeMapFromPayloads(dataConverter, raw.memo?.fields), - searchAttributes: decodeSearchAttributes(raw.searchAttributes?.indexedFields), - typedSearchAttributes: decodeTypedSearchAttributes(raw.searchAttributes?.indexedFields), - parentExecution: raw.parentExecution - ? { - workflowId: raw.parentExecution.workflowId!, - runId: raw.parentExecution.runId!, - } - : undefined, - rootExecution: raw.rootExecution - ? { - workflowId: raw.rootExecution.workflowId!, - runId: raw.rootExecution.runId!, - } - : undefined, - raw: rawDataToEmbed, - priority: decodePriority(raw.priority), - }; -} - -export function decodeCountWorkflowExecutionsResponse( - raw: temporal.api.workflowservice.v1.ICountWorkflowExecutionsResponse -): CountWorkflowExecution { - return { - // Note: lossy conversion of Long to number - count: raw.count!.toNumber(), - groups: raw.groups!.map((group) => { - return { - // Note: lossy conversion of Long to number - count: group.count!.toNumber(), - groupValues: group.groupValues!.map((value) => searchAttributePayloadConverter.fromPayload(value)), - }; - }), - }; -} - -type ErrorDetailsName = `temporal.api.errordetails.v1.${keyof typeof temporal.api.errordetails.v1}`; -type FailureName = `temporal.api.failure.v1.${keyof typeof temporal.api.failure.v1}`; - -/** - * If the error type can be determined based on embedded grpc error details, - * then rethrow the appropriate TypeScript error. Otherwise do nothing. - * - * This function should be used before falling back to generic error handling - * based on grpc error code. Very few error types are currently supported, but - * this function will be expanded over time as more server error types are added. - */ -export function rethrowKnownErrorTypes(err: GrpcServiceError): void { - // We really don't expect multiple error details, but this really is an array, so just in case... - for (const entry of getGrpcStatusDetails(err) ?? []) { - if (!entry.type_url || !entry.value) continue; - const type = entry.type_url.replace(/^type.googleapis.com\//, '') as ErrorDetailsName; - - switch (type) { - case 'temporal.api.errordetails.v1.NamespaceNotFoundFailure': { - const { namespace } = temporal.api.errordetails.v1.NamespaceNotFoundFailure.decode(entry.value); - throw new NamespaceNotFoundError(namespace); - } - case 'temporal.api.errordetails.v1.MultiOperationExecutionFailure': { - // MultiOperationExecutionFailure contains error statuses for multiple - // operations. A MultiOperationExecutionAborted error status means that - // the corresponding operation was aborted due to an error in one of the - // other operations. We rethrow the first operation error that is not - // MultiOperationExecutionAborted. - const { statuses } = temporal.api.errordetails.v1.MultiOperationExecutionFailure.decode(entry.value); - for (const status of statuses) { - const detail = status.details?.[0]; - const statusType = detail?.type_url?.replace(/^type.googleapis.com\//, '') as FailureName | undefined; - if ( - statusType === 'temporal.api.failure.v1.MultiOperationExecutionAborted' || - status.code === grpcStatus.OK - ) { - continue; - } - err.message = status.message ?? err.message; - err.code = status.code || err.code; - err.details = detail?.value?.toString() || err.details; - throw err; - } - } - } - } -} - -function getGrpcStatusDetails(err: GrpcServiceError): google.rpc.Status['details'] | undefined { - const statusBuffer = err.metadata.get('grpc-status-details-bin')?.[0]; - if (!statusBuffer || typeof statusBuffer === 'string') { - return undefined; - } - return google.rpc.Status.decode(statusBuffer).details; -} diff --git a/node_modules/@temporalio/client/src/index.ts b/node_modules/@temporalio/client/src/index.ts deleted file mode 100644 index 9db7133..0000000 --- a/node_modules/@temporalio/client/src/index.ts +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Client for communicating with Temporal Server. - * - * Most functionality is available through {@link WorkflowClient}, but you can also call gRPC methods directly using {@link Connection.workflowService} and {@link Connection.operatorService}. - * - * ### Usage - * - * ```ts - * import { Connection, Client } from '@temporalio/client'; - * import { loadClientConnectConfig } from '@temporalio/envconfig'; - * import { sleepForDays } from './workflows'; - * import { nanoid } from 'nanoid'; - * - * async function run() { - * const config = loadClientConnectConfig(); - * const connection = await Connection.connect(config.connectionOptions); - * const client = new Client({ connection }); - * - * const handle = await client.workflow.start(sleepForDays, { - * taskQueue: 'sleep-for-days', - * workflowId: 'workflow-' + nanoid(), - * }); - * console.log(`Started workflow ${handle.workflowId}`); - * - * // Wait for workflow completion (runs indefinitely until it receives a signal) - * console.log(await handle.result()); - * } - * - * run().catch((err) => { - * console.error(err); - * process.exit(1); - * }); - * ``` - * @module - */ - -export { - ActivityFailure, - ApplicationFailure, - CancelledFailure, - ChildWorkflowFailure, - DataConverter, - defaultPayloadConverter, - ProtoFailure, - RetryPolicy, - ServerFailure, - TemporalFailure, - TerminatedFailure, - TimeoutFailure, - WorkflowExecutionAlreadyStartedError, -} from '@temporalio/common'; -export { TLSConfig } from '@temporalio/common/lib/internal-non-workflow'; -export * from '@temporalio/common/lib/errors'; -export * from '@temporalio/common/lib/interfaces'; -export * from '@temporalio/common/lib/workflow-handle'; -export * from './async-completion-client'; -export * from './client'; -export { - Connection, - ConnectionOptions, - ConnectionOptionsWithDefaults, - ConnectionPlugin, - LOCAL_TARGET, -} from './connection'; -export * from './errors'; -export * from './grpc-retry'; -export * from './interceptors'; -export * from './types'; -export * from './workflow-client'; -export * from './workflow-options'; -export * from './schedule-types'; -export * from './schedule-client'; -export * from './task-queue-client'; -export { WorkflowUpdateStage } from './workflow-update-stage'; -export { - WorkerBuildIdVersionSets, - BuildIdVersionSet, - BuildIdOperation, - PromoteSetByBuildId, - PromoteBuildIdWithinSet, - MergeSets, - AddNewIdInNewDefaultSet, - AddNewCompatibleVersion, -} from './build-id-types'; diff --git a/node_modules/@temporalio/client/src/interceptor-adapters.ts b/node_modules/@temporalio/client/src/interceptor-adapters.ts deleted file mode 100644 index 8e62900..0000000 --- a/node_modules/@temporalio/client/src/interceptor-adapters.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { WorkflowClientInterceptor, WorkflowStartInput, WorkflowStartOutput } from './interceptors'; - -export function adaptWorkflowClientInterceptor(i: WorkflowClientInterceptor): WorkflowClientInterceptor { - return adaptLegacyStartInterceptor(i); -} - -// Adapt legacy `start` interceptors to the new `startWithDetails` interceptor. -function adaptLegacyStartInterceptor(i: WorkflowClientInterceptor): WorkflowClientInterceptor { - // If it already has the new method, or doesn't have the legacy one, no adaptation is needed. - // eslint-disable-next-line @typescript-eslint/no-deprecated - if (i.startWithDetails || !i.start) { - return i; - } - - // This interceptor has a legacy `start` but not `startWithDetails`. We'll adapt it. - return { - ...i, - startWithDetails: async (input, next): Promise => { - let downstreamOut: WorkflowStartOutput | undefined; - - // Patched `next` for legacy `start` interceptors. - // Captures the full `WorkflowStartOutput` while returning `runId` as a string. - const patchedNext = async (patchedInput: WorkflowStartInput): Promise => { - downstreamOut = await next(patchedInput); - return downstreamOut.runId; - }; - - const runIdFromLegacyInterceptor = await i.start!(input, patchedNext); // eslint-disable-line @typescript-eslint/no-deprecated - - // If the interceptor short-circuited (didn't call `next`), `downstreamOut` will be undefined. - // In that case, we can't have an eager start. - if (downstreamOut === undefined) { - return { runId: runIdFromLegacyInterceptor, eagerlyStarted: false }; - } - - // If `next` was called, honor the `runId` from the legacy interceptor but preserve - // the `eagerlyStarted` status from the actual downstream call. - return { ...downstreamOut, runId: runIdFromLegacyInterceptor }; - }, - }; -} diff --git a/node_modules/@temporalio/client/src/interceptors.ts b/node_modules/@temporalio/client/src/interceptors.ts deleted file mode 100644 index 0f07cee..0000000 --- a/node_modules/@temporalio/client/src/interceptors.ts +++ /dev/null @@ -1,250 +0,0 @@ -/** - * Definitions for Connection interceptors. - * - * @module - */ - -import { Headers, Next } from '@temporalio/common'; -import { temporal } from '@temporalio/proto'; -import { CompiledScheduleOptions } from './schedule-types'; -import { - DescribeWorkflowExecutionResponse, - RequestCancelWorkflowExecutionResponse, - TerminateWorkflowExecutionResponse, - WorkflowExecution, -} from './types'; -import { CompiledWorkflowOptions, WorkflowUpdateOptions } from './workflow-options'; - -export { Headers, Next }; - -/** Input for WorkflowClientInterceptor.start */ -export interface WorkflowStartInput { - /** Name of Workflow to start */ - readonly workflowType: string; - readonly headers: Headers; - readonly options: CompiledWorkflowOptions; -} - -/** Input for WorkflowClientInterceptor.update */ -export interface WorkflowStartUpdateInput { - readonly updateName: string; - readonly args: unknown[]; - readonly workflowExecution: WorkflowExecution; - readonly firstExecutionRunId?: string; - readonly headers: Headers; - readonly options: WorkflowUpdateOptions; -} - -/** Output for WorkflowClientInterceptor.startWithDetails */ -export interface WorkflowStartOutput { - readonly runId: string; - readonly eagerlyStarted: boolean; -} - -/** Output for WorkflowClientInterceptor.startUpdate */ -export interface WorkflowStartUpdateOutput { - readonly updateId: string; - readonly workflowRunId: string; - readonly outcome?: temporal.api.update.v1.IOutcome; -} - -/** - * Input for WorkflowClientInterceptor.startUpdateWithStart - */ -export interface WorkflowStartUpdateWithStartInput { - readonly workflowType: string; - readonly workflowStartOptions: CompiledWorkflowOptions; - readonly workflowStartHeaders: Headers; - readonly updateName: string; - readonly updateArgs: unknown[]; - readonly updateOptions: WorkflowUpdateOptions; - readonly updateHeaders: Headers; -} - -/** - * Output for WorkflowClientInterceptor.startUpdateWithStart - */ -export interface WorkflowStartUpdateWithStartOutput { - readonly workflowExecution: WorkflowExecution; - readonly updateId: string; - readonly updateOutcome?: temporal.api.update.v1.IOutcome; -} - -/** Input for WorkflowClientInterceptor.signal */ -export interface WorkflowSignalInput { - readonly signalName: string; - readonly args: unknown[]; - readonly workflowExecution: WorkflowExecution; - readonly headers: Headers; -} - -/** Input for WorkflowClientInterceptor.signalWithStart */ -export interface WorkflowSignalWithStartInput { - readonly workflowType: string; - readonly signalName: string; - readonly signalArgs: unknown[]; - readonly headers: Headers; - readonly options: CompiledWorkflowOptions; -} - -/** Input for WorkflowClientInterceptor.query */ -export interface WorkflowQueryInput { - readonly queryType: string; - readonly args: unknown[]; - readonly workflowExecution: WorkflowExecution; - readonly queryRejectCondition?: temporal.api.enums.v1.QueryRejectCondition; - readonly headers: Headers; -} - -/** Input for WorkflowClientInterceptor.terminate */ -export interface WorkflowTerminateInput { - readonly workflowExecution: WorkflowExecution; - readonly reason?: string; - readonly details?: unknown[]; - readonly firstExecutionRunId?: string; -} - -/** Input for WorkflowClientInterceptor.cancel */ -export interface WorkflowCancelInput { - readonly workflowExecution: WorkflowExecution; - readonly firstExecutionRunId?: string; -} - -/** Input for WorkflowClientInterceptor.describe */ -export interface WorkflowDescribeInput { - readonly workflowExecution: WorkflowExecution; -} - -/** - * Implement any of these methods to intercept WorkflowClient outbound calls - */ -export interface WorkflowClientInterceptor { - /** - * Intercept a service call to startWorkflowExecution - * - * If you implement this method, - * {@link signalWithStart} most likely needs to be implemented too - * - * @deprecated in favour of {@link startWithDetails} - */ - start?: (input: WorkflowStartInput, next: Next) => Promise; - - /** - * Intercept a service call to startWorkflowExecution - * - * This method returns start details via {@link WorkflowStartOutput}. - * - * If you implement this method, - * {@link signalWithStart} most likely needs to be implemented too - */ - startWithDetails?: (input: WorkflowStartInput, next: Next) => Promise; - - /** - * Intercept a service call to updateWorkflowExecution - */ - startUpdate?: ( - input: WorkflowStartUpdateInput, - next: Next - ) => Promise; - /** - * Intercept a service call to startUpdateWithStart - */ - startUpdateWithStart?: ( - input: WorkflowStartUpdateWithStartInput, - next: Next - ) => Promise; - /** - * Intercept a service call to signalWorkflowExecution - * - * If you implement this method, - * {@link signalWithStart} most likely needs to be implemented too - */ - signal?: (input: WorkflowSignalInput, next: Next) => Promise; - /** - * Intercept a service call to signalWithStartWorkflowExecution - */ - signalWithStart?: (input: WorkflowSignalWithStartInput, next: Next) => Promise; - /** - * Intercept a service call to queryWorkflow - */ - query?: (input: WorkflowQueryInput, next: Next) => Promise; - /** - * Intercept a service call to terminateWorkflowExecution - */ - terminate?: ( - input: WorkflowTerminateInput, - next: Next - ) => Promise; - /** - * Intercept a service call to requestCancelWorkflowExecution - */ - cancel?: (input: WorkflowCancelInput, next: Next) => Promise; - /** - * Intercept a service call to describeWorkflowExecution - */ - describe?: (input: WorkflowDescribeInput, next: Next) => Promise; -} - -/** @deprecated: Use WorkflowClientInterceptor instead */ -export type WorkflowClientCallsInterceptor = WorkflowClientInterceptor; - -/** @deprecated */ -export interface WorkflowClientCallsInterceptorFactoryInput { - workflowId: string; - runId?: string; -} - -/** - * A function that takes {@link CompiledWorkflowOptions} and returns an interceptor - * - * @deprecated: Please define interceptors directly, without factory - */ -export interface WorkflowClientCallsInterceptorFactory { - // eslint-disable-next-line @typescript-eslint/no-deprecated - (input: WorkflowClientCallsInterceptorFactoryInput): WorkflowClientCallsInterceptor; -} - -/** - * A mapping of interceptor type of a list of factory functions - * - * @deprecated: Please define interceptors directly, without factory - */ -export interface WorkflowClientInterceptors { - /** @deprecated */ - // eslint-disable-next-line @typescript-eslint/no-deprecated - calls?: WorkflowClientCallsInterceptorFactory[]; -} - -/** - * Implement any of these methods to intercept ScheduleClient outbound calls - */ -export interface ScheduleClientInterceptor { - /** - * Intercept a service call to CreateSchedule - */ - create?: (input: CreateScheduleInput, next: Next) => Promise; -} - -/** - * Input for {@link ScheduleClientInterceptor.create} - */ -export interface CreateScheduleInput { - readonly headers: Headers; - readonly options: CompiledScheduleOptions; -} - -export type CreateScheduleOutput = { - readonly conflictToken: Uint8Array; -}; - -/** - * Interceptors for any high-level SDK client. - * - * NOTE: Currently only for {@link WorkflowClient} and {@link ScheduleClient}. More will be added later as needed. - */ -export interface ClientInterceptors { - // eslint-disable-next-line @typescript-eslint/no-deprecated - workflow?: WorkflowClientInterceptors | WorkflowClientInterceptor[]; - - schedule?: ScheduleClientInterceptor[]; -} diff --git a/node_modules/@temporalio/client/src/internal.ts b/node_modules/@temporalio/client/src/internal.ts deleted file mode 100644 index bed16a2..0000000 --- a/node_modules/@temporalio/client/src/internal.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { temporal } from '@temporalio/proto'; -import { WorkflowOptions } from './workflow-options'; - -/** - * A symbol used to attach extra, SDK-internal options to the `WorkflowClient.start()` call. - * - * These are notably used by the Temporal Nexus helpers. - * - * @internal - * @hidden - */ -export const InternalWorkflowStartOptionsSymbol = Symbol.for('__temporal_internal_client_workflow_start_options'); -export interface InternalWorkflowStartOptions extends WorkflowOptions { - [InternalWorkflowStartOptionsSymbol]?: { - /** - * Request ID to be used for the workflow. - */ - requestId?: string; - - /** - * Callbacks to be called by the server when this workflow reaches a terminal state. - * If the workflow continues-as-new, these callbacks will be carried over to the new execution. - * Callback addresses must be whitelisted in the server's dynamic configuration. - */ - completionCallbacks?: temporal.api.common.v1.ICallback[]; - - /** - * Links to be associated with the workflow. - */ - links?: temporal.api.common.v1.ILink[]; - - /** - * Backlink copied by the client from the StartWorkflowExecutionResponse. - * Only populated in servers newer than 1.27. - */ - backLink?: temporal.api.common.v1.ILink; - - /** - * Conflict options for when USE_EXISTING is specified. - * - * Used by the Nexus WorkflowRunOperations to attach to a callback to a running workflow. - */ - onConflictOptions?: temporal.api.workflow.v1.IOnConflictOptions; - }; -} diff --git a/node_modules/@temporalio/client/src/iterators-utils.ts b/node_modules/@temporalio/client/src/iterators-utils.ts deleted file mode 100644 index df86d14..0000000 --- a/node_modules/@temporalio/client/src/iterators-utils.ts +++ /dev/null @@ -1,117 +0,0 @@ -import 'abort-controller/polyfill'; // eslint-disable-line import/no-unassigned-import -import { EventEmitter, on, once } from 'node:events'; -import { isAbortError } from '@temporalio/common/lib/type-helpers'; - -export interface MapAsyncOptions { - /** - * How many items to map concurrently. If set to less than 2 (or not set), then items are not mapped concurrently. - * - * When items are mapped concurrently, mapped items are returned by the resulting iterator in the order they complete - * mapping, not the order in which the corresponding source items were obtained from the source iterator. - * - * @default 1 (ie. items are not mapped concurrently) - */ - concurrency?: number; - - /** - * Maximum number of mapped items to keep in buffer, ready for consumption. - * - * Ignored unless `concurrency > 1`. No limit applies if set to `undefined`. - * - * @default unlimited - */ - bufferLimit?: number | undefined; -} - -function toAsyncIterator(iterable: AsyncIterable): AsyncIterator { - return iterable[Symbol.asyncIterator](); -} - -/** - * Return an async iterable that transforms items from a source iterable by mapping each item - * through a mapping function. - * - * If `concurrency > 1`, then up to `concurrency` items may be mapped concurrently. In that case, - * items are returned by the resulting iterator in the order they complete processing, not the order - * in which the corresponding source items were obtained from the source iterator. - * - * @param source the source async iterable - * @param mapFn a mapping function to apply on every item of the source iterable - */ -export async function* mapAsyncIterable( - source: AsyncIterable, - mapFn: (val: A) => Promise, - options?: MapAsyncOptions -): AsyncIterable { - const { concurrency, bufferLimit } = options ?? {}; - - if (!concurrency || concurrency < 2) { - for await (const x of source) { - yield mapFn(x); - } - return; - } - - const sourceIterator = toAsyncIterator(source); - - const emitter = new EventEmitter(); - const controller = new AbortController(); - const emitterEventsIterable: AsyncIterable<[B]> = on(emitter, 'result', { signal: controller.signal }); - const emitterError: Promise = once(emitter, 'error'); - - const bufferLimitSemaphore = - typeof bufferLimit === 'number' - ? (() => { - const releaseEvents: AsyncIterator = toAsyncIterator( - on(emitter, 'released', { signal: controller.signal }) - ); - let value = bufferLimit + concurrency; - - return { - acquire: async () => { - while (value <= 0) { - await Promise.race([releaseEvents.next(), emitterError]); - } - value--; - }, - release: () => { - value++; - emitter.emit('released'); - }, - }; - })() - : undefined; - - const mapper = async () => { - for (;;) { - await bufferLimitSemaphore?.acquire(); - const val = await Promise.race([sourceIterator.next(), emitterError]); - - if (Array.isArray(val)) return; - if ((val as IteratorResult<[B]>)?.done) return; - - emitter.emit('result', await mapFn(val.value)); - } - }; - - const mappers = Array(concurrency) - .fill(mapper) - .map((f: typeof mapper) => f()); - - Promise.all(mappers).then( - () => controller.abort(), - (err) => emitter.emit('error', err) - ); - - try { - for await (const [res] of emitterEventsIterable) { - bufferLimitSemaphore?.release(); - yield res; - } - } catch (err: unknown) { - if (isAbortError(err)) { - return; - } - throw err; - } -} diff --git a/node_modules/@temporalio/client/src/pkg.ts b/node_modules/@temporalio/client/src/pkg.ts deleted file mode 100644 index 60ba3e2..0000000 --- a/node_modules/@temporalio/client/src/pkg.ts +++ /dev/null @@ -1,7 +0,0 @@ -// ../package.json is outside of the TS project rootDir which causes TS to complain about this import. -// We do not want to change the rootDir because it messes up the output structure. -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -import pkg from '../package.json'; - -export default pkg as { name: string; version: string }; diff --git a/node_modules/@temporalio/client/src/schedule-client.ts b/node_modules/@temporalio/client/src/schedule-client.ts deleted file mode 100644 index 34ec5c6..0000000 --- a/node_modules/@temporalio/client/src/schedule-client.ts +++ /dev/null @@ -1,565 +0,0 @@ -import { status as grpcStatus } from '@grpc/grpc-js'; -import { v4 as uuid4 } from 'uuid'; -import { Workflow } from '@temporalio/common'; -import { - decodeSearchAttributes, - decodeTypedSearchAttributes, - encodeUnifiedSearchAttributes, -} from '@temporalio/common/lib/converter/payload-search-attributes'; -import { composeInterceptors, Headers } from '@temporalio/common/lib/interceptors'; -import { encodeMapToPayloads, decodeMapFromPayloads } from '@temporalio/common/lib/internal-non-workflow'; -import { filterNullAndUndefined } from '@temporalio/common/lib/internal-workflow'; -import { temporal } from '@temporalio/proto'; -import { - optionalDateToTs, - optionalTsToDate, - optionalTsToMs, - requiredTsToDate, - tsToDate, -} from '@temporalio/common/lib/time'; -import { SymbolBasedInstanceOfError } from '@temporalio/common/lib/type-helpers'; -import { CreateScheduleInput, CreateScheduleOutput, ScheduleClientInterceptor } from './interceptors'; -import { WorkflowService } from './types'; -import { isGrpcServiceError, ServiceError } from './errors'; -import { - Backfill, - CompiledScheduleUpdateOptions, - ScheduleSummary, - ScheduleDescription, - ScheduleOptions, - ScheduleOverlapPolicy, - ScheduleUpdateOptions, - ScheduleOptionsAction, - ScheduleOptionsStartWorkflowAction, - encodeScheduleOverlapPolicy, - decodeScheduleOverlapPolicy, -} from './schedule-types'; -import { - compileScheduleOptions, - compileUpdatedScheduleOptions, - decodeScheduleAction, - decodeScheduleRecentActions, - decodeScheduleRunningActions, - decodeScheduleSpec, - encodeScheduleAction, - encodeSchedulePolicies, - encodeScheduleSpec, - encodeScheduleState, -} from './schedule-helpers'; -import { - BaseClient, - BaseClientOptions, - defaultBaseClientOptions, - LoadedWithDefaults, - WithDefaults, -} from './base-client'; -import { rethrowKnownErrorTypes } from './helpers'; - -/** - * Handle to a single Schedule - */ -export interface ScheduleHandle { - /** - * This Schedule's identifier - */ - readonly scheduleId: string; - - /** - * Fetch the Schedule's description from the Server - */ - describe(): Promise; - - /** - * Update the Schedule - * - * This function calls `.describe()`, provides the `Schedule` to the provided `updateFn`, and - * sends the returned `UpdatedSchedule` to the Server to update the Schedule definition. Note that, - * in the future, `updateFn` might be invoked multiple time, with identical or different input. - */ - update( - updateFn: (previous: ScheduleDescription) => ScheduleUpdateOptions> - ): Promise; - - /** - * Delete the Schedule - */ - delete(): Promise; - - /** - * Trigger an Action to be taken immediately - * - * @param overlap Override the Overlap Policy for this one trigger. Defaults to {@link ScheduleOverlapPolicy.ALLOW_ALL}. - */ - trigger(overlap?: ScheduleOverlapPolicy): Promise; - - /** - * Run though the specified time period(s) and take Actions as if that time passed by right now, all at once. - * The Overlap Policy can be overridden for the scope of the Backfill. - */ - backfill(options: Backfill | Backfill[]): Promise; - - /** - * Pause the Schedule - * - * @param note A new {@link ScheduleDescription.note}. Defaults to `"Paused via TypeScript SDK"` - */ - pause(note?: string): Promise; - - /** - * Unpause the Schedule - * - * @param note A new {@link ScheduleDescription.note}. Defaults to `"Unpaused via TypeScript SDK" - */ - unpause(note?: string): Promise; - - /** - * Readonly accessor to the underlying ScheduleClient - */ - readonly client: ScheduleClient; -} - -export interface ScheduleClientOptions extends BaseClientOptions { - /** - * Used to override and extend default Connection functionality - * - * Useful for injecting auth headers and tracing Workflow executions - */ - interceptors?: ScheduleClientInterceptor[]; -} - -export type LoadedScheduleClientOptions = LoadedWithDefaults; - -function defaultScheduleClientOptions(): WithDefaults { - return { - ...defaultBaseClientOptions(), - interceptors: [], - }; -} - -function assertRequiredScheduleOptions(opts: ScheduleOptions, action: 'CREATE'): void; -function assertRequiredScheduleOptions(opts: ScheduleUpdateOptions, action: 'UPDATE'): void; -function assertRequiredScheduleOptions( - opts: ScheduleOptions | ScheduleUpdateOptions, - action: 'CREATE' | 'UPDATE' -): void { - const structureName = action === 'CREATE' ? 'ScheduleOptions' : 'ScheduleUpdateOptions'; - if (action === 'CREATE' && !(opts as ScheduleOptions).scheduleId) { - throw new TypeError(`Missing ${structureName}.scheduleId`); - } - switch (opts.action.type) { - case 'startWorkflow': - if (!opts.action.taskQueue) { - throw new TypeError(`Missing ${structureName}.action.taskQueue for 'startWorkflow' action`); - } - if (!opts.action.workflowType) { - throw new TypeError(`Missing ${structureName}.action.workflowType for 'startWorkflow' action`); - } - } -} - -export interface ListScheduleOptions { - /** - * How many results to fetch from the Server at a time. - * @default 1000 - */ - pageSize?: number; - /** - * Filter schedules by a query string. - */ - query?: string; -} - -/** - * Client for starting Workflow executions and creating Workflow handles - */ -export class ScheduleClient extends BaseClient { - public readonly options: LoadedScheduleClientOptions; - - constructor(options?: ScheduleClientOptions) { - super(options); - this.options = { - ...defaultScheduleClientOptions(), - ...filterNullAndUndefined(options ?? {}), - loadedDataConverter: this.dataConverter, - }; - } - - /** - * Raw gRPC access to the Temporal service. Schedule-related methods are included in {@link WorkflowService}. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests made to the service. - */ - get workflowService(): WorkflowService { - return this.connection.workflowService; - } - - /** - * Create a new Schedule. - * - * @throws {@link ScheduleAlreadyRunning} if there's a running (not deleted) Schedule with the given `id` - * @returns a ScheduleHandle to the created Schedule - */ - public async create( - options: ScheduleOptions> - ): Promise; - public async create(options: ScheduleOptions): Promise { - await this._createSchedule(options); - return this.getHandle(options.scheduleId); - } - - /** - * Create a new Schedule. - */ - protected async _createSchedule(options: ScheduleOptions): Promise { - assertRequiredScheduleOptions(options, 'CREATE'); - const compiledOptions = compileScheduleOptions(options); - - const create = composeInterceptors(this.options.interceptors, 'create', this._createScheduleHandler.bind(this)); - await create({ - options: compiledOptions, - headers: {}, - }); - } - - /** - * Create a new Schedule. - */ - protected async _createScheduleHandler(input: CreateScheduleInput): Promise { - const { options: opts, headers } = input; - const { identity } = this.options; - const req: temporal.api.workflowservice.v1.ICreateScheduleRequest = { - namespace: this.options.namespace, - identity, - requestId: uuid4(), - scheduleId: opts.scheduleId, - schedule: { - spec: encodeScheduleSpec(opts.spec), - action: await encodeScheduleAction(this.dataConverter, opts.action, headers), - policies: encodeSchedulePolicies(opts.policies), - state: encodeScheduleState(opts.state), - }, - memo: opts.memo ? { fields: await encodeMapToPayloads(this.dataConverter, opts.memo) } : undefined, - searchAttributes: - opts.searchAttributes || opts.typedSearchAttributes // eslint-disable-line @typescript-eslint/no-deprecated - ? { - indexedFields: encodeUnifiedSearchAttributes(opts.searchAttributes, opts.typedSearchAttributes), // eslint-disable-line @typescript-eslint/no-deprecated - } - : undefined, - initialPatch: { - triggerImmediately: opts.state?.triggerImmediately - ? { overlapPolicy: temporal.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_ALLOW_ALL } - : undefined, - backfillRequest: opts.state?.backfill - ? opts.state.backfill.map((x) => ({ - startTime: optionalDateToTs(x.start), - endTime: optionalDateToTs(x.end), - overlapPolicy: x.overlap ? encodeScheduleOverlapPolicy(x.overlap) : undefined, - })) - : undefined, - }, - }; - try { - const res = await this.workflowService.createSchedule(req); - return { conflictToken: res.conflictToken }; - } catch (err: any) { - if (err.code === grpcStatus.ALREADY_EXISTS) { - throw new ScheduleAlreadyRunning('Schedule already exists and is running', opts.scheduleId); - } - this.rethrowGrpcError(err, 'Failed to create schedule', opts.scheduleId); - } - } - - /** - * Describe a Schedule. - */ - protected async _describeSchedule( - scheduleId: string - ): Promise { - try { - return await this.workflowService.describeSchedule({ - namespace: this.options.namespace, - scheduleId, - }); - } catch (err: any) { - this.rethrowGrpcError(err, 'Failed to describe schedule', scheduleId); - } - } - - /** - * Update a Schedule. - */ - protected async _updateSchedule( - scheduleId: string, - opts: CompiledScheduleUpdateOptions, - header: Headers - ): Promise { - const req = { - namespace: this.options.namespace, - scheduleId, - schedule: { - spec: encodeScheduleSpec(opts.spec), - action: await encodeScheduleAction(this.dataConverter, opts.action, header), - policies: encodeSchedulePolicies(opts.policies), - state: encodeScheduleState(opts.state), - }, - identity: this.options.identity, - requestId: uuid4(), - searchAttributes: - opts.searchAttributes || opts.typedSearchAttributes // eslint-disable-line @typescript-eslint/no-deprecated - ? { - indexedFields: encodeUnifiedSearchAttributes(opts.searchAttributes, opts.typedSearchAttributes), // eslint-disable-line @typescript-eslint/no-deprecated - } - : undefined, - }; - try { - return await this.workflowService.updateSchedule(req); - } catch (err: any) { - this.rethrowGrpcError(err, 'Failed to update schedule', scheduleId); - } - } - - /** - * Patch a Schedule. - */ - protected async _patchSchedule( - scheduleId: string, - patch: temporal.api.schedule.v1.ISchedulePatch - ): Promise { - try { - return await this.workflowService.patchSchedule({ - namespace: this.options.namespace, - scheduleId, - identity: this.options.identity, - requestId: uuid4(), - patch, - }); - } catch (err: any) { - this.rethrowGrpcError(err, 'Failed to patch schedule', scheduleId); - } - } - - /** - * Delete a Schedule. - */ - protected async _deleteSchedule( - scheduleId: string - ): Promise { - try { - return await this.workflowService.deleteSchedule({ - namespace: this.options.namespace, - identity: this.options.identity, - scheduleId, - }); - } catch (err: any) { - this.rethrowGrpcError(err, 'Failed to delete schedule', scheduleId); - } - } - - /** - * List Schedules with an `AsyncIterator`: - * - * ```ts - * for await (const schedule: Schedule of client.list()) { - * const { id, memo, searchAttributes } = schedule - * // ... - * } - * ``` - * - * To list one page at a time, instead use the raw gRPC method {@link WorkflowService.listSchedules}: - * - * ```ts - * await { schedules, nextPageToken } = client.scheduleService.listSchedules() - * ``` - */ - public async *list(options?: ListScheduleOptions): AsyncIterable { - let nextPageToken: Uint8Array | undefined = undefined; - for (;;) { - let response: temporal.api.workflowservice.v1.ListSchedulesResponse; - try { - response = await this.workflowService.listSchedules({ - nextPageToken, - namespace: this.options.namespace, - maximumPageSize: options?.pageSize, - query: options?.query, - }); - } catch (e) { - this.rethrowGrpcError(e, 'Failed to list schedules', undefined); - } - - for (const raw of response.schedules ?? []) { - yield { - scheduleId: raw.scheduleId, - - spec: decodeScheduleSpec(raw.info?.spec ?? {}), - action: raw.info?.workflowType && { - type: 'startWorkflow', - workflowType: raw.info.workflowType.name, - }, - memo: await decodeMapFromPayloads(this.dataConverter, raw.memo?.fields), - searchAttributes: decodeSearchAttributes(raw.searchAttributes?.indexedFields), - typedSearchAttributes: decodeTypedSearchAttributes(raw.searchAttributes?.indexedFields), - state: { - paused: raw.info?.paused === true, - note: raw.info?.notes ?? undefined, - }, - info: { - recentActions: decodeScheduleRecentActions(raw.info?.recentActions), - nextActionTimes: raw.info?.futureActionTimes?.map(tsToDate) ?? [], - }, - }; - } - - if (response.nextPageToken == null || response.nextPageToken.length === 0) break; - nextPageToken = response.nextPageToken; - } - } - - /** - * Get a handle to a Schedule - * - * This method does not validate `scheduleId`. If there is no Schedule with the given `scheduleId`, handle - * methods like `handle.describe()` will throw a {@link ScheduleNotFoundError} error. - */ - public getHandle(scheduleId: string): ScheduleHandle { - return { - client: this, - scheduleId, - - async describe(): Promise { - const raw = await this.client._describeSchedule(this.scheduleId); - if (!raw.schedule?.spec || !raw.schedule.action) - throw new Error('Received invalid Schedule description from server'); - return { - scheduleId, - spec: decodeScheduleSpec(raw.schedule.spec), - action: await decodeScheduleAction(this.client.dataConverter, raw.schedule.action), - memo: await decodeMapFromPayloads(this.client.dataConverter, raw.memo?.fields), - searchAttributes: decodeSearchAttributes(raw.searchAttributes?.indexedFields), - typedSearchAttributes: decodeTypedSearchAttributes(raw.searchAttributes?.indexedFields), - policies: { - // 'overlap' should never be missing on describe, as the server will replace UNSPECIFIED by an actual value - overlap: decodeScheduleOverlapPolicy(raw.schedule.policies?.overlapPolicy) ?? ScheduleOverlapPolicy.SKIP, - catchupWindow: optionalTsToMs(raw.schedule.policies?.catchupWindow) ?? 60_000, - pauseOnFailure: raw.schedule.policies?.pauseOnFailure === true, - }, - state: { - paused: raw.schedule.state?.paused === true, - note: raw.schedule.state?.notes ?? undefined, - remainingActions: raw.schedule.state?.limitedActions - ? raw.schedule.state?.remainingActions?.toNumber() || 0 - : undefined, - }, - info: { - recentActions: decodeScheduleRecentActions(raw.info?.recentActions), - nextActionTimes: raw.info?.futureActionTimes?.map(tsToDate) ?? [], - createdAt: requiredTsToDate(raw.info?.createTime, 'createTime'), - lastUpdatedAt: optionalTsToDate(raw.info?.updateTime), - runningActions: decodeScheduleRunningActions(raw.info?.runningWorkflows), - numActionsMissedCatchupWindow: raw.info?.missedCatchupWindow?.toNumber() ?? 0, - numActionsSkippedOverlap: raw.info?.overlapSkipped?.toNumber() ?? 0, - numActionsTaken: raw.info?.actionCount?.toNumber() ?? 0, - }, - raw, - }; - }, - - async update(updateFn): Promise { - const current = await this.describe(); - // Keep existing headers - const currentHeader: Headers = current.raw.schedule?.action?.startWorkflow?.header?.fields ?? {}; - const updated = updateFn(current); - assertRequiredScheduleOptions(updated, 'UPDATE'); - await this.client._updateSchedule( - scheduleId, - compileUpdatedScheduleOptions(scheduleId, updated), - currentHeader - ); - }, - - async delete(): Promise { - await this.client._deleteSchedule(this.scheduleId); - }, - - async pause(note?: string): Promise { - await this.client._patchSchedule(this.scheduleId, { - pause: note ?? 'Paused via TypeScript SDK"', - }); - }, - - async unpause(note?): Promise { - await this.client._patchSchedule(this.scheduleId, { - unpause: note ?? 'Unpaused via TypeScript SDK"', - }); - }, - - async trigger(overlap?): Promise { - await this.client._patchSchedule(this.scheduleId, { - triggerImmediately: { - overlapPolicy: overlap - ? encodeScheduleOverlapPolicy(overlap) - : temporal.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_ALLOW_ALL, - }, - }); - }, - - async backfill(options): Promise { - const backfills = Array.isArray(options) ? options : [options]; - await this.client._patchSchedule(this.scheduleId, { - backfillRequest: backfills.map((x) => ({ - startTime: optionalDateToTs(x.start), - endTime: optionalDateToTs(x.end), - overlapPolicy: x.overlap ? encodeScheduleOverlapPolicy(x.overlap) : undefined, - })), - }); - }, - }; - } - - protected rethrowGrpcError(err: unknown, fallbackMessage: string, scheduleId?: string): never { - if (isGrpcServiceError(err)) { - rethrowKnownErrorTypes(err); - - if (err.code === grpcStatus.NOT_FOUND) { - throw new ScheduleNotFoundError(err.details ?? 'Schedule not found', scheduleId ?? ''); - } - if ( - err.code === grpcStatus.INVALID_ARGUMENT && - err.message.match(/^3 INVALID_ARGUMENT: Invalid schedule spec: /) - ) { - throw new TypeError(err.message.replace(/^3 INVALID_ARGUMENT: Invalid schedule spec: /, '')); - } - - throw new ServiceError(fallbackMessage, { cause: err }); - } - throw new ServiceError('Unexpected error while making gRPC request', { cause: err as Error }); - } -} - -/** - * Thrown from {@link ScheduleClient.create} if there's a running (not deleted) Schedule with the given `id`. - */ -@SymbolBasedInstanceOfError('ScheduleAlreadyRunning') -export class ScheduleAlreadyRunning extends Error { - constructor( - message: string, - public readonly scheduleId: string - ) { - super(message); - } -} - -/** - * Thrown when a Schedule with the given Id is not known to Temporal Server. - * It could be because: - * - Id passed is incorrect - * - Schedule was deleted - */ -@SymbolBasedInstanceOfError('ScheduleNotFoundError') -export class ScheduleNotFoundError extends Error { - constructor( - message: string, - public readonly scheduleId: string - ) { - super(message); - } -} diff --git a/node_modules/@temporalio/client/src/schedule-helpers.ts b/node_modules/@temporalio/client/src/schedule-helpers.ts deleted file mode 100644 index e01b0e2..0000000 --- a/node_modules/@temporalio/client/src/schedule-helpers.ts +++ /dev/null @@ -1,393 +0,0 @@ -import Long from 'long'; -import { - compilePriority, - compileRetryPolicy, - decodePriority, - decompileRetryPolicy, - extractWorkflowType, - LoadedDataConverter, -} from '@temporalio/common'; -import { encodeUserMetadata, decodeUserMetadata } from '@temporalio/common/lib/internal-non-workflow/codec-helpers'; -import { - encodeUnifiedSearchAttributes, - decodeSearchAttributes, - decodeTypedSearchAttributes, -} from '@temporalio/common/lib/converter/payload-search-attributes'; -import { Headers } from '@temporalio/common/lib/interceptors'; -import { - decodeArrayFromPayloads, - decodeMapFromPayloads, - encodeMapToPayloads, - encodeToPayloads, -} from '@temporalio/common/lib/internal-non-workflow'; -import { temporal } from '@temporalio/proto'; -import { - msOptionalToTs, - msToTs, - optionalDateToTs, - optionalTsToDate, - optionalTsToMs, - requiredTsToDate, -} from '@temporalio/common/lib/time'; -import { - CalendarSpec, - CalendarSpecDescription, - CompiledScheduleOptions, - CompiledScheduleUpdateOptions, - Range, - ScheduleOptions, - ScheduleUpdateOptions, - DayOfWeek, - DAYS_OF_WEEK, - Month, - MONTHS, - LooseRange, - ScheduleSpec, - CompiledScheduleAction, - ScheduleSpecDescription, - IntervalSpecDescription, - ScheduleDescriptionAction, - ScheduleExecutionActionResult, - ScheduleExecutionResult, - ScheduleExecutionStartWorkflowActionResult, - encodeScheduleOverlapPolicy, -} from './schedule-types'; - -const [encodeSecond, decodeSecond] = makeCalendarSpecFieldCoders( - 'second', - (x: number) => (typeof x === 'number' && x >= 0 && x <= 59 ? x : undefined), - (x: number) => x, - [{ start: 0, end: 0, step: 0 }], // default to 0 - [{ start: 0, end: 59, step: 1 }] -); - -const [encodeMinute, decodeMinue] = makeCalendarSpecFieldCoders( - 'minute', - (x: number) => (typeof x === 'number' && x >= 0 && x <= 59 ? x : undefined), - (x: number) => x, - [{ start: 0, end: 0, step: 0 }], // default to 0 - [{ start: 0, end: 59, step: 1 }] -); - -const [encodeHour, decodeHour] = makeCalendarSpecFieldCoders( - 'hour', - (x: number) => (typeof x === 'number' && x >= 0 && x <= 23 ? x : undefined), - (x: number) => x, - [{ start: 0, end: 0, step: 0 }], // default to 0 - [{ start: 0, end: 23, step: 1 }] -); - -const [encodeDayOfMonth, decodeDayOfMonth] = makeCalendarSpecFieldCoders( - 'dayOfMonth', - (x: number) => (typeof x === 'number' && x >= 0 && x <= 31 ? x : undefined), - (x: number) => x, - [{ start: 1, end: 31, step: 1 }], // default to * - [{ start: 1, end: 31, step: 1 }] -); - -const [encodeMonth, decodeMonth] = makeCalendarSpecFieldCoders( - 'month', - function monthNameToNumber(month: Month): number | undefined { - const index = MONTHS.indexOf(month); - return index >= 0 ? index + 1 : undefined; - }, - (month: number) => MONTHS[month - 1], - [{ start: 1, end: 12, step: 1 }], // default to * - [{ start: 1, end: 12, step: 1 }] -); - -const [encodeYear, decodeYear] = makeCalendarSpecFieldCoders( - 'year', - (x: number) => (typeof x === 'number' ? x : undefined), - (x: number) => x, - [], // default to * - [] // special case: * for years is encoded as no range at all -); - -const [encodeDayOfWeek, decodeDayOfWeek] = makeCalendarSpecFieldCoders( - 'dayOfWeek', - function dayOfWeekNameToNumber(day: DayOfWeek): number | undefined { - const index = DAYS_OF_WEEK.indexOf(day); - return index >= 0 ? index : undefined; - }, - (day: number) => DAYS_OF_WEEK[day], - [{ start: 0, end: 6, step: 1 }], // default to * - [{ start: 0, end: 6, step: 1 }] -); - -function makeCalendarSpecFieldCoders( - fieldName: string, - encodeValueFn: (x: Unit) => number | undefined, - decodeValueFn: (x: number) => Unit | undefined, - defaultValue: temporal.api.schedule.v1.IRange[], - matchAllValue: temporal.api.schedule.v1.IRange[] -) { - function encoder( - input: LooseRange | LooseRange[] | '*' | undefined - ): temporal.api.schedule.v1.IRange[] | undefined { - if (input === undefined) return defaultValue; - if (input === '*') return matchAllValue; - - return (Array.isArray(input) ? input : [input]).map((item) => { - if (typeof item === 'object' && (item as Range).start !== undefined) { - const range = item as Range; - const start = encodeValueFn(range.start); - if (start !== undefined) { - return { - start, - end: range.end !== undefined ? encodeValueFn(range.end) ?? start : 1, - step: typeof range.step === 'number' && range.step > 0 ? range.step : 1, - }; - } - } - if (item !== undefined) { - const value = encodeValueFn(item as Unit); - if (value !== undefined) return { start: value, end: value, step: 1 }; - } - throw new TypeError(`Invalid CalendarSpec component for field ${fieldName}: '${item}' of type '${typeof item}'`); - }); - } - - function decoder(input: temporal.api.schedule.v1.IRange[] | undefined | null): Range[] { - if (!input) return []; - return (input as temporal.api.schedule.v1.Range[]).map((pb): Range => { - const start = decodeValueFn(pb.start); - if (start === undefined) { - throw new RangeError(`Invalid CalendarSpec component for field ${fieldName}: ${pb.start} is out of bounds`); - } - const end = pb.end > pb.start ? decodeValueFn(pb.end) ?? start : start; - const step = pb.step > 0 ? pb.step : 1; - return { start, end, step }; - }); - } - - return [encoder, decoder] as const; -} - -export function encodeOptionalStructuredCalendarSpecs( - input: CalendarSpec[] | null | undefined -): temporal.api.schedule.v1.IStructuredCalendarSpec[] | undefined { - if (!input) return undefined; - return input.map((spec) => ({ - second: encodeSecond(spec.second), - minute: encodeMinute(spec.minute), - hour: encodeHour(spec.hour), - dayOfMonth: encodeDayOfMonth(spec.dayOfMonth), - month: encodeMonth(spec.month), - year: encodeYear(spec.year), - dayOfWeek: encodeDayOfWeek(spec.dayOfWeek), - comment: spec.comment, - })); -} - -export function decodeOptionalStructuredCalendarSpecs( - input: temporal.api.schedule.v1.IStructuredCalendarSpec[] | null | undefined -): CalendarSpecDescription[] { - if (!input) return []; - - return (input as temporal.api.schedule.v1.StructuredCalendarSpec[]).map( - (pb): CalendarSpecDescription => ({ - second: decodeSecond(pb.second), - minute: decodeMinue(pb.minute), - hour: decodeHour(pb.hour), - dayOfMonth: decodeDayOfMonth(pb.dayOfMonth), - month: decodeMonth(pb.month), - year: decodeYear(pb.year), - dayOfWeek: decodeDayOfWeek(pb.dayOfWeek), - comment: pb.comment, - }) - ); -} - -export function compileScheduleOptions(options: ScheduleOptions): CompiledScheduleOptions { - const workflowType = extractWorkflowType(options.action.workflowType); - return { - ...options, - action: { - ...options.action, - workflowId: options.action.workflowId ?? `${options.scheduleId}-workflow`, - workflowType, - args: (options.action.args ?? []) as unknown[], - }, - }; -} - -export function compileUpdatedScheduleOptions( - scheduleId: string, - options: ScheduleUpdateOptions -): CompiledScheduleUpdateOptions { - const workflowTypeOrFunc = options.action.workflowType; - const workflowType = extractWorkflowType(workflowTypeOrFunc); - return { - ...options, - action: { - ...options.action, - workflowId: options.action.workflowId ?? `${scheduleId}-workflow`, - workflowType, - args: (options.action.args ?? []) as unknown[], - }, - }; -} - -export function encodeScheduleSpec(spec: ScheduleSpec): temporal.api.schedule.v1.IScheduleSpec { - return { - structuredCalendar: encodeOptionalStructuredCalendarSpecs(spec.calendars), - interval: spec.intervals?.map((interval) => ({ - interval: msToTs(interval.every), - phase: msOptionalToTs(interval.offset), - })), - cronString: spec.cronExpressions, - excludeStructuredCalendar: encodeOptionalStructuredCalendarSpecs(spec.skip), - startTime: optionalDateToTs(spec.startAt), - endTime: optionalDateToTs(spec.endAt), - jitter: msOptionalToTs(spec.jitter), - timezoneName: spec.timezone, - }; -} - -export async function encodeScheduleAction( - dataConverter: LoadedDataConverter, - action: CompiledScheduleAction, - headers: Headers -): Promise { - return { - startWorkflow: { - workflowId: action.workflowId, - workflowType: { - name: action.workflowType, - }, - input: { payloads: await encodeToPayloads(dataConverter, ...action.args) }, - taskQueue: { - kind: temporal.api.enums.v1.TaskQueueKind.TASK_QUEUE_KIND_NORMAL, - name: action.taskQueue, - }, - workflowExecutionTimeout: msOptionalToTs(action.workflowExecutionTimeout), - workflowRunTimeout: msOptionalToTs(action.workflowRunTimeout), - workflowTaskTimeout: msOptionalToTs(action.workflowTaskTimeout), - retryPolicy: action.retry ? compileRetryPolicy(action.retry) : undefined, - memo: action.memo ? { fields: await encodeMapToPayloads(dataConverter, action.memo) } : undefined, - searchAttributes: - action.searchAttributes || action.typedSearchAttributes // eslint-disable-line @typescript-eslint/no-deprecated - ? { - indexedFields: encodeUnifiedSearchAttributes(action.searchAttributes, action.typedSearchAttributes), // eslint-disable-line @typescript-eslint/no-deprecated - } - : undefined, - header: { fields: headers }, - userMetadata: await encodeUserMetadata(dataConverter, action.staticSummary, action.staticDetails), - priority: action.priority ? compilePriority(action.priority) : undefined, - }, - }; -} - -export function encodeSchedulePolicies( - policies?: ScheduleOptions['policies'] -): temporal.api.schedule.v1.ISchedulePolicies { - return { - catchupWindow: msOptionalToTs(policies?.catchupWindow), - overlapPolicy: policies?.overlap ? encodeScheduleOverlapPolicy(policies.overlap) : undefined, - pauseOnFailure: policies?.pauseOnFailure, - }; -} - -export function encodeScheduleState(state?: ScheduleOptions['state']): temporal.api.schedule.v1.IScheduleState { - return { - paused: state?.paused, - notes: state?.note, - limitedActions: state?.remainingActions !== undefined, - remainingActions: state?.remainingActions ? Long.fromNumber(state?.remainingActions) : undefined, - }; -} - -export function decodeScheduleSpec(pb: temporal.api.schedule.v1.IScheduleSpec): ScheduleSpecDescription { - // Note: the server will have compiled calendar and cron_string fields into - // structured_calendar (and maybe interval and timezone_name), so at this - // point, we'll see only structured_calendar, interval, etc. - return { - calendars: decodeOptionalStructuredCalendarSpecs(pb.structuredCalendar), - intervals: (pb.interval ?? []).map( - (x) => - { - every: optionalTsToMs(x.interval), - offset: optionalTsToMs(x.phase), - } - ), - skip: decodeOptionalStructuredCalendarSpecs(pb.excludeStructuredCalendar), - startAt: optionalTsToDate(pb.startTime), - endAt: optionalTsToDate(pb.endTime), - jitter: optionalTsToMs(pb.jitter), - timezone: pb.timezoneName ?? undefined, - }; -} - -export async function decodeScheduleAction( - dataConverter: LoadedDataConverter, - pb: temporal.api.schedule.v1.IScheduleAction -): Promise { - if (pb.startWorkflow) { - const { staticSummary, staticDetails } = await decodeUserMetadata(dataConverter, pb.startWorkflow?.userMetadata); - return { - type: 'startWorkflow', - - workflowId: pb.startWorkflow.workflowId!, - - workflowType: pb.startWorkflow.workflowType!.name!, - - taskQueue: pb.startWorkflow.taskQueue!.name!, - args: await decodeArrayFromPayloads(dataConverter, pb.startWorkflow.input?.payloads), - memo: await decodeMapFromPayloads(dataConverter, pb.startWorkflow.memo?.fields), - retry: decompileRetryPolicy(pb.startWorkflow.retryPolicy), - searchAttributes: decodeSearchAttributes(pb.startWorkflow.searchAttributes?.indexedFields), - typedSearchAttributes: decodeTypedSearchAttributes(pb.startWorkflow.searchAttributes?.indexedFields), - workflowExecutionTimeout: optionalTsToMs(pb.startWorkflow.workflowExecutionTimeout), - workflowRunTimeout: optionalTsToMs(pb.startWorkflow.workflowRunTimeout), - workflowTaskTimeout: optionalTsToMs(pb.startWorkflow.workflowTaskTimeout), - staticSummary, - staticDetails, - priority: decodePriority(pb.startWorkflow.priority), - }; - } - throw new TypeError('Unsupported schedule action'); -} - -export function decodeScheduleRunningActions( - pb?: temporal.api.common.v1.IWorkflowExecution[] | null -): ScheduleExecutionStartWorkflowActionResult[] { - if (!pb) return []; - return pb.map( - (x): ScheduleExecutionStartWorkflowActionResult => ({ - type: 'startWorkflow', - workflow: { - workflowId: x.workflowId!, - - firstExecutionRunId: x.runId!, - }, - }) - ); -} - -export function decodeScheduleRecentActions( - pb?: temporal.api.schedule.v1.IScheduleActionResult[] | null -): ScheduleExecutionResult[] { - if (!pb) return []; - return (pb as Required[]).map( - (executionResult): ScheduleExecutionResult => { - let action: ScheduleExecutionActionResult | undefined; - if (executionResult.startWorkflowResult) { - action = { - type: 'startWorkflow', - workflow: { - workflowId: executionResult.startWorkflowResult!.workflowId!, - - firstExecutionRunId: executionResult.startWorkflowResult!.runId!, - }, - }; - } else throw new TypeError('Unsupported schedule action'); - - return { - scheduledAt: requiredTsToDate(executionResult.scheduleTime, 'scheduleTime'), - takenAt: requiredTsToDate(executionResult.actualTime, 'actualTime'), - action, - }; - } - ); -} diff --git a/node_modules/@temporalio/client/src/schedule-types.ts b/node_modules/@temporalio/client/src/schedule-types.ts deleted file mode 100644 index 10602a4..0000000 --- a/node_modules/@temporalio/client/src/schedule-types.ts +++ /dev/null @@ -1,920 +0,0 @@ -import { checkExtends, Replace } from '@temporalio/common/lib/type-helpers'; -import { Duration, SearchAttributes, Workflow, TypedSearchAttributes, SearchAttributePair } from '@temporalio/common'; -import { makeProtoEnumConverters } from '@temporalio/common/lib/internal-workflow'; -import type { temporal } from '@temporalio/proto'; -import { WorkflowStartOptions } from './workflow-options'; - -/** - * The specification of a Schedule to be created, as expected by {@link ScheduleClient.create}. - */ -export interface ScheduleOptions { - /** - * Schedule Id - * - * We recommend using a meaningful business identifier. - */ - scheduleId: string; - - /** - * When Actions should be taken - */ - spec: ScheduleSpec; - - /** - * Which Action to take - */ - action: A; - - policies?: { - /** - * Controls what happens when an Action would be started by a Schedule at the same time that an older Action is still - * running. This can be changed after a Schedule has taken some Actions, and some changes might produce - * unintuitive results. In general, the later policy overrides the earlier policy. - * - * @default ScheduleOverlapPolicy.SKIP - */ - overlap?: ScheduleOverlapPolicy; - - /** - * The Temporal Server might be down or unavailable at the time when a Schedule should take an Action. When the Server - * comes back up, `catchupWindow` controls which missed Actions should be taken at that point. The default is one - * minute, which means that the Schedule attempts to take any Actions that wouldn't be more than one minute late. It - * takes those Actions according to the {@link ScheduleOverlapPolicy}. An outage that lasts longer than the Catchup - * Window could lead to missed Actions. (But you can always {@link ScheduleHandle.backfill}.) - * - * @default 1 year - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - catchupWindow?: Duration; - - /** - * When an Action times out or reaches the end of its Retry Policy, {@link pause}. - * - * With {@link ScheduleOverlapPolicy.ALLOW_ALL}, this pause might not apply to the next Action, because the next Action - * might have already started previous to the failed one finishing. Pausing applies only to Actions that are scheduled - * to start after the failed one finishes. - * - * @default false - */ - pauseOnFailure?: boolean; - }; - - /** - * Additional non-indexed information attached to the Schedule. The values can be anything that is - * serializable by the {@link DataConverter}. - */ - memo?: Record; - - /** - * Additional indexed information attached to the Schedule. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom Data Converter is provided. - * - * @deprecated Use {@link typedSearchAttributes} instead. - */ - searchAttributes?: SearchAttributes; // eslint-disable-line @typescript-eslint/no-deprecated - - /** - * Additional indexed information attached to the Schedule. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom Data Converter is provided. - * - * If both {@link searchAttributes} and {@link typedSearchAttributes} are provided, conflicting keys will be overwritten - * by {@link typedSearchAttributes}. - */ - typedSearchAttributes?: SearchAttributePair[] | TypedSearchAttributes; - - /** - * The initial state of the schedule, right after creation or update. - */ - state?: { - /** - * Start in paused state. - * - * @default false - */ - paused?: boolean; - - /** - * Informative human-readable message with contextual notes, e.g. the reason - * a Schedule is paused. The system may overwrite this message on certain - * conditions, e.g. when pause-on-failure happens. - */ - note?: string; - - /** - * Limit the number of Actions to take. - * - * This number is decremented after each Action is taken, and Actions are not - * taken when the number is `0` (unless {@link ScheduleHandle.trigger} is called). - * - * If `undefined`, then no such limit applies. - * - * @default undefined, which allows for unlimited exections - */ - remainingActions?: number; - - /** - * Trigger one Action immediately on create. - * - * @default false - */ - triggerImmediately?: boolean; - - /** - * Runs though the specified time periods and takes Actions as if that time passed by right now, all at once. The - * overlap policy can be overridden for the scope of the backfill. - */ - backfill?: Backfill[]; - }; -} - -export type CompiledScheduleOptions = Replace< - ScheduleOptions, - { - action: CompiledScheduleAction; - } ->; - -/** - * The specification of an updated Schedule, as expected by {@link ScheduleHandle.update}. - */ -export type ScheduleUpdateOptions = Replace< - Omit, - { - action: A; - state: Omit; - } ->; - -export type CompiledScheduleUpdateOptions = Replace< - ScheduleUpdateOptions, - { - action: CompiledScheduleAction; - } ->; - -/** - * A summary description of an existing Schedule, as returned by {@link ScheduleClient.list}. - * - * Note that schedule listing is eventual consistent; some returned properties may therefore - * be undefined or incorrect for some time after creating or modifying a schedule. - */ -export interface ScheduleSummary { - /** - * The Schedule Id. We recommend using a meaningful business identifier. - */ - scheduleId: string; - - /** - * When will Actions be taken. - */ - spec?: ScheduleSpecDescription; - - /** - * The Action that will be taken. - */ - action?: ScheduleSummaryAction; - - /** - * Additional non-indexed information attached to the Schedule. - * The values can be anything that is serializable by the {@link DataConverter}. - */ - memo?: Record; - - /** - * Additional indexed information attached to the Schedule. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom Data Converter is provided. - * - * @deprecated Use {@link typedSearchAttributes} instead. - */ - searchAttributes?: SearchAttributes; // eslint-disable-line @typescript-eslint/no-deprecated - - /** - * Additional indexed information attached to the Schedule. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom Data Converter is provided. - */ - typedSearchAttributes?: TypedSearchAttributes; - - state: { - /** - * Whether Schedule is currently paused. - */ - paused: boolean; - - /** - * Informative human-readable message with contextual notes, e.g. the reason a Schedule is paused. - * The system may overwrite this message on certain conditions, e.g. when pause-on-failure happens. - */ - note?: string; - }; - - info: { - /** - * Most recent actions started (including manual triggers), sorted from older start time to newer. - */ - recentActions: ScheduleExecutionResult[]; - - /** - * Next upcoming scheduled times of this Schedule - */ - nextActionTimes: Date[]; - }; -} - -export interface ScheduleExecutionResult { - /** Time that the Action was scheduled for, including jitter */ - scheduledAt: Date; - - /** Time that the Action was actually taken */ - takenAt: Date; - - /** The Action that was taken */ - action: ScheduleExecutionActionResult; -} - -export type ScheduleExecutionActionResult = ScheduleExecutionStartWorkflowActionResult; - -export interface ScheduleExecutionStartWorkflowActionResult { - type: 'startWorkflow'; - workflow: { - workflowId: string; - - /** - * The Run Id of the original execution that was started by the Schedule. If the Workflow retried, did - * Continue-As-New, or was Reset, the following runs would have different Run Ids. - */ - firstExecutionRunId: string; - }; -} - -/** - * A detailed description of an exisiting Schedule, as returned by {@link ScheduleHandle.describe}. - */ -export type ScheduleDescription = { - /** - * The Schedule Id. We recommend using a meaningful business identifier. - */ - scheduleId: string; - - /** - * When will Actions be taken. - */ - spec: ScheduleSpecDescription; - - /** - * The Action that will be taken. - */ - action: ScheduleDescriptionAction; - - policies: { - /** - * Controls what happens when an Action would be started by a Schedule at the same time that an older Action is still - * running. - */ - overlap: ScheduleOverlapPolicy; - - /** - * The Temporal Server might be down or unavailable at the time when a Schedule should take an Action. - * When the Server comes back up, `catchupWindow` controls which missed Actions should be taken at that point. - * It takes those Actions according to the {@link ScheduleOverlapPolicy}. An outage that lasts longer than the - * Catchup Window could lead to missed Actions. (But you can always {@link ScheduleHandle.backfill}.) - * - * Unit is miliseconds. - */ - catchupWindow: number; - - /** - * When an Action times out or reaches the end of its Retry Policy, {@link pause}. - * - * With {@link ScheduleOverlapPolicy.ALLOW_ALL}, this pause might not apply to the next Action, because the next Action - * might have already started previous to the failed one finishing. Pausing applies only to Actions that are scheduled - * to start after the failed one finishes. - */ - pauseOnFailure: boolean; - }; - - /** - * Additional non-indexed information attached to the Schedule. - * The values can be anything that is serializable by the {@link DataConverter}. - */ - memo?: Record; - - /** - * Additional indexed information attached to the Schedule. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom Data Converter is provided. - * - * @deprecated Use {@link typedSearchAttributes} instead. - */ - searchAttributes: SearchAttributes; // eslint-disable-line @typescript-eslint/no-deprecated - - /** - * Additional indexed information attached to the Schedule. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom Data Converter is provided. - */ - typedSearchAttributes: TypedSearchAttributes; - - state: { - /** - * Whether Schedule is currently paused. - */ - paused: boolean; - - /** - * Informative human-readable message with contextual notes, e.g. the reason a Schedule is paused. - * The system may overwrite this message on certain conditions, e.g. when pause-on-failure happens. - */ - note?: string; - - /** - * The Actions remaining in this Schedule. - * Once this number hits `0`, no further Actions are taken (unless {@link ScheduleHandle.trigger} is called). - * - * If `undefined`, then no such limit applies. - */ - remainingActions?: number; - }; - - info: { - /** - * Most recent actions started (including manual triggers), sorted from older start time to newer. - */ - recentActions: ScheduleExecutionResult[]; - - /** - * Next upcoming scheduled times of this Schedule - */ - nextActionTimes: Date[]; - - /** - * Number of Actions taken so far. - */ - numActionsTaken: number; - - /** - * Number of times a scheduled Action was skipped due to missing the catchup window. - */ - numActionsMissedCatchupWindow: number; - - /** - * Number of Actions skipped due to overlap. - */ - numActionsSkippedOverlap: number; - - createdAt: Date; - lastUpdatedAt: Date | undefined; - - /** - * Currently-running workflows started by this schedule. (There might be - * more than one if the overlap policy allows overlaps.) - */ - runningActions: ScheduleExecutionActionResult[]; - }; - - /** @internal */ - raw: temporal.api.workflowservice.v1.IDescribeScheduleResponse; -}; - -// Invariant: ScheduleDescription contains at least the same fields as ScheduleSummary -checkExtends(); - -// Invariant: An existing ScheduleDescription can be used as template to create a new Schedule -checkExtends(); - -// Invariant: An existing ScheduleDescription can be used as template to update that Schedule -checkExtends(); - -/** - * A complete description of a set of absolute times (possibly infinite) that an Action should occur at. - * The times are the union of `calendars`, `intervals`, and `cronExpressions`, minus the `skip` times. These times - * never change, except that the definition of a time zone can change over time (most commonly, when daylight saving - * time policy changes for an area). To create a totally self-contained `ScheduleSpec`, use UTC. - */ -export interface ScheduleSpec { - /** Calendar-based specifications of times. */ - calendars?: CalendarSpec[]; - - /** Interval-based specifications of times. */ - intervals?: IntervalSpec[]; - - /** - * [Cron expressions](https://crontab.guru/). This is provided for easy migration from legacy Cron Workflows. For new - * use cases, we recommend using {@link calendars} or {@link intervals} for readability and maintainability. - * - * For example, `0 12 * * MON-WED,FRI` is every M/Tu/W/F at noon, and is equivalent to this {@link CalendarSpec}: - * - * ```ts - * { - * hour: 12, - * dayOfWeek: [{ - * start: 'MONDAY' - * end: 'WEDNESDAY' - * }, 'FRIDAY'] - * } - * ``` - * - * The string can have 5, 6, or 7 fields, separated by spaces, and they are interpreted in the - * same way as a {@link CalendarSpec}. - * - * - 5 fields: minute, hour, day_of_month, month, day_of_week - * - 6 fields: minute, hour, day_of_month, month, day_of_week, year - * - 7 fields: second, minute, hour, day_of_month, month, day_of_week, year - * - * Notes: - * - * - If year is not given, it defaults to *. - * - If second is not given, it defaults to 0. - * - Shorthands `@yearly`, `@monthly`, `@weekly`, `@daily`, and `@hourly` are also - * accepted instead of the 5-7 time fields. - * - `@every interval[/]` is accepted and gets compiled into an - * IntervalSpec instead. `` and `` should be a decimal integer - * with a unit suffix s, m, h, or d. - * - Optionally, the string can be preceded by `CRON_TZ=` or - * `TZ=`, which will get copied to {@link timezone}. - * (In which case the {@link timezone} field should be left empty.) - * - Optionally, "#" followed by a comment can appear at the end of the string. - * - Note that the special case that some cron implementations have for - * treating day_of_month and day_of_week as "or" instead of "and" when both - * are set is not implemented. - */ - cronExpressions?: string[]; - - /** - * Any matching times will be skipped. - * - * All aspects of the CalendarSpec—including seconds—must match a time for the time to be skipped. - */ - skip?: CalendarSpec[]; - // TODO see if users want to be able to skip an IntervalSpec - // https://github.com/temporalio/api/pull/230/files#r956434347 - - /** - * Any times before `startAt` will be skipped. Together, `startAt` and `endAt` make an inclusive interval. - * - * @default The beginning of time - */ - startAt?: Date; - - /** - * Any times after `endAt` will be skipped. - * - * @default The end of time - */ - endAt?: Date; - - /** - * All times will be incremented by a random value from 0 to this amount of jitter. - * - * @default 0 - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - jitter?: Duration; - - /** - * IANA timezone name, for example `US/Pacific`. - * - * https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - * - * The definition will be loaded by Temporal Server from the environment it runs in. - * - * Calendar spec matching is based on literal matching of the clock time - * with no special handling of DST: if you write a calendar spec that fires - * at 2:30am and specify a time zone that follows DST, that action will not - * be triggered on the day that has no 2:30am. Similarly, an action that - * fires at 1:30am will be triggered twice on the day that has two 1:30s. - * - * Also note that no actions are taken on leap-seconds (e.g. 23:59:60 UTC). - * - * @default UTC - */ - timezone?: string; -} - -/** - * The version of {@link ScheduleSpec} that you get back from {@link ScheduleHandle.describe} and {@link ScheduleClient.list} - */ -export type ScheduleSpecDescription = Omit< - ScheduleSpec, - 'calendars' | 'intervals' | 'cronExpressions' | 'skip' | 'jitter' -> & { - /** Calendar-based specifications of times. */ - calendars?: CalendarSpecDescription[]; - - /** Interval-based specifications of times. */ - intervals?: IntervalSpecDescription[]; - - /** Any matching times will be skipped. */ - skip?: CalendarSpecDescription[]; - - /** - * All times will be incremented by a random value from 0 to this amount of jitter. - * - * @default 1 second - * @format number of milliseconds - */ - jitter?: number; -}; - -// Invariant: An existing ScheduleSpec can be used as is to create or update a Schedule -checkExtends(); - -/** - * An event specification relative to the calendar, similar to a traditional cron specification. - * - * A second in time matches if all fields match. This includes `dayOfMonth` and `dayOfWeek`. - */ -export interface CalendarSpec { - /** - * Valid values: 0–59 - * - * @default 0 - */ - second?: LooseRange | LooseRange[] | '*'; - - /** - * Valid values: 0–59 - * - * @default 0 - */ - minute?: LooseRange | LooseRange[] | '*'; - - /** - * Valid values: 0–23 - * - * @default 0 - */ - hour?: LooseRange | LooseRange[] | '*'; - - /** - * Valid values: 1–31 - * - * @default '*' - */ - dayOfMonth?: LooseRange | LooseRange[] | '*'; - - /** - * @default '*' - */ - month?: LooseRange | LooseRange[] | '*'; - - /** - * Use full years, like `2030` - * - * @default '*' - */ - year?: LooseRange | LooseRange[] | '*'; - - /** - * @default '*' - */ - dayOfWeek?: LooseRange | LooseRange[] | '*'; - - /** - * Description of the intention of this spec. - */ - comment?: string; -} - -/** - * An event specification relative to the calendar, similar to a traditional cron specification. - * - * A second in time matches if all fields match. This includes `dayOfMonth` and `dayOfWeek`. - */ -export interface CalendarSpecDescription { - /** - * Valid values: 0–59 - * - * @default Match only when second is 0 (ie. `[{ start: 0, end: 0, step: 0 }]`) - */ - second: Range[]; - - /** - * Valid values: 0–59 - * - * @default Match only when minute is 0 (ie. `[{ start: 0, end: 0, step: 0 }]`) - */ - minute: Range[]; - - /** - * Valid values: 0–23 - * - * @default Match only when hour is 0 (ie. `[{ start: 0, end: 0, step: 0 }]`) - */ - hour: Range[]; - - /** - * Valid values: 1–31 - * - * @default Match on any day (ie. `[{ start: 1, end: 31, step: 1 }]`) - */ - dayOfMonth: Range[]; - - /** - * Valid values are 'JANUARY' to 'DECEMBER'. - * - * @default Match on any month (ie. `[{ start: 'JANUARY', end: 'DECEMBER', step: 1 }]`) - */ - month: Range[]; - - /** - * Use full years, like `2030` - * - * @default Match on any year - */ - year: Range[]; - - /** - * Valid values are 'SUNDAY' to 'SATURDAY'. - * - * @default Match on any day of the week (ie. `[{ start: 'SUNDAY', end: 'SATURDAY', step: 1 }]`) - */ - dayOfWeek: Range[]; - - /** - * Description of the intention of this spec. - */ - comment?: string; -} - -/** - * IntervalSpec matches times that can be expressed as: - * - * `Epoch + (n * every) + offset` - * - * where `n` is all integers ≥ 0. - * - * For example, an `every` of 1 hour with `offset` of zero would match every hour, on the hour. The same `every` but an `offset` - * of 19 minutes would match every `xx:19:00`. An `every` of 28 days with `offset` zero would match `2022-02-17T00:00:00Z` - * (among other times). The same `every` with `offset` of 3 days, 5 hours, and 23 minutes would match `2022-02-20T05:23:00Z` - * instead. - */ -export interface IntervalSpec { - /** - * Value is rounded to the nearest second. - * - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - every: Duration; - - /** - * Value is rounded to the nearest second. - * - * @default 0 - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - offset?: Duration; -} - -/** - * IntervalSpec matches times that can be expressed as: - * - * `Epoch + (n * every) + offset` - * - * where `n` is all integers ≥ 0. - * - * For example, an `every` of 1 hour with `offset` of zero would match every hour, on the hour. The same `every` but an `offset` - * of 19 minutes would match every `xx:19:00`. An `every` of 28 days with `offset` zero would match `2022-02-17T00:00:00Z` - * (among other times). The same `every` with `offset` of 3 days, 5 hours, and 23 minutes would match `2022-02-20T05:23:00Z` - * instead. - * - * This is the version of {@link IntervalSpec} that you get back from {@link ScheduleHandle.describe} and {@link ScheduleClient.list} - */ -export interface IntervalSpecDescription { - /** - * Value is rounded to the nearest second. - * - * @format number of milliseconds - */ - every: number; - - /** - * Value is rounded to the nearest second. - * - * @format number of milliseconds - */ - offset: number; -} - -/** - * Range represents a set of values, used to match fields of a calendar. If end < start, then end is - * interpreted as equal to start. Similarly, if step is less than 1, then step is interpreted as 1. - */ -export interface Range { - /** - * Start of range (inclusive) - */ - start: Unit; - - /** - * End of range (inclusive) - * - * @default `start` - */ - end: Unit; - - /** - * The step to take between each value. - * - * @default 1 - */ - step: number; -} - -/** - * A {@link Range} definition, with support for loose syntax. - * - * For example: - * ``` - * 3 ➡️ 3 - * { start: 2 } ➡️ 2 - * { start: 2, end: 4 } ➡️ 2, 3, 4 - * { start: 2, end: 10, step: 3 } ➡️ 2, 5, 8 - * ``` - */ -export type LooseRange = - | Range - | { start: Range['start']; end?: Range['end']; step?: never } - | Unit; - -export const MONTHS = [ - 'JANUARY', - 'FEBRUARY', - 'MARCH', - 'APRIL', - 'MAY', - 'JUNE', - 'JULY', - 'AUGUST', - 'SEPTEMBER', - 'OCTOBER', - 'NOVEMBER', - 'DECEMBER', -] as const; - -export type Month = (typeof MONTHS)[number]; - -export const DAYS_OF_WEEK = ['SUNDAY', 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY'] as const; - -export type DayOfWeek = (typeof DAYS_OF_WEEK)[number]; - -export type ScheduleOptionsAction = ScheduleOptionsStartWorkflowAction; - -export type ScheduleOptionsStartWorkflowAction = { - type: 'startWorkflow'; - workflowType: string | W; -} & Pick< - WorkflowStartOptions, - | 'taskQueue' - | 'args' - | 'memo' - | 'searchAttributes' - | 'typedSearchAttributes' - | 'retry' - | 'workflowExecutionTimeout' - | 'workflowRunTimeout' - | 'workflowTaskTimeout' - | 'staticDetails' - | 'staticSummary' -> & { - /** - * Workflow id to use when starting. Assign a meaningful business id. - * This ID can be used to ensure starting Workflows is idempotent. - * - * @default `${scheduleId}-workflow` - */ - workflowId?: string; - }; - -export type ScheduleSummaryAction = ScheduleSummaryStartWorkflowAction; - -export interface ScheduleSummaryStartWorkflowAction { - type: 'startWorkflow'; - workflowType: string; -} - -export type ScheduleDescriptionAction = ScheduleDescriptionStartWorkflowAction; - -export type ScheduleDescriptionStartWorkflowAction = ScheduleSummaryStartWorkflowAction & - Pick< - WorkflowStartOptions, - | 'taskQueue' - | 'workflowId' - | 'args' - | 'memo' - | 'searchAttributes' - | 'typedSearchAttributes' - | 'retry' - | 'workflowExecutionTimeout' - | 'workflowRunTimeout' - | 'workflowTaskTimeout' - | 'staticSummary' - | 'staticDetails' - | 'priority' - >; - -// Invariant: an existing ScheduleDescriptionAction can be used as is to create or update a schedule -checkExtends(); - -export type CompiledScheduleAction = Replace< - ScheduleDescriptionAction, - { - workflowType: string; - args: unknown[]; - } ->; - -/** - * Policy for overlapping Actions. - */ -export const ScheduleOverlapPolicy = { - /** - * Don't start a new Action. - * @default - */ - SKIP: 'SKIP', - - /** - * Start another Action as soon as the current Action completes, but only buffer one Action in this way. If another - * Action is supposed to start, but one Action is running and one is already buffered, then only the buffered one will - * be started after the running Action finishes. - */ - BUFFER_ONE: 'BUFFER_ONE', - - /** - * Allows an unlimited number of Actions to buffer. They are started sequentially. - */ - BUFFER_ALL: 'BUFFER_ALL', - - /** - * Cancels the running Action, and then starts the new Action once the cancelled one completes. - */ - CANCEL_OTHER: 'CANCEL_OTHER', - - /** - * Terminate the running Action and start the new Action immediately. - */ - TERMINATE_OTHER: 'TERMINATE_OTHER', - - /** - * Allow any number of Actions to start immediately. - * - * This is the only policy under which multiple Actions can run concurrently. - */ - ALLOW_ALL: 'ALLOW_ALL', - - /** - * Use server default (currently SKIP). - * - * @deprecated Either leave property `undefined`, or use {@link SKIP} instead. - */ - UNSPECIFIED: undefined, -} as const; -export type ScheduleOverlapPolicy = (typeof ScheduleOverlapPolicy)[keyof typeof ScheduleOverlapPolicy]; - -export const [encodeScheduleOverlapPolicy, decodeScheduleOverlapPolicy] = makeProtoEnumConverters< - temporal.api.enums.v1.ScheduleOverlapPolicy, - typeof temporal.api.enums.v1.ScheduleOverlapPolicy, - keyof typeof temporal.api.enums.v1.ScheduleOverlapPolicy, - typeof ScheduleOverlapPolicy, - 'SCHEDULE_OVERLAP_POLICY_' ->( - { - [ScheduleOverlapPolicy.SKIP]: 1, - [ScheduleOverlapPolicy.BUFFER_ONE]: 2, - [ScheduleOverlapPolicy.BUFFER_ALL]: 3, - [ScheduleOverlapPolicy.CANCEL_OTHER]: 4, - [ScheduleOverlapPolicy.TERMINATE_OTHER]: 5, - [ScheduleOverlapPolicy.ALLOW_ALL]: 6, - UNSPECIFIED: 0, - } as const, - 'SCHEDULE_OVERLAP_POLICY_' -); - -export interface Backfill { - /** - * Start of the time range to evaluate Schedule in. - */ - start: Date; - - /** - * End of the time range to evaluate Schedule in. - */ - end: Date; - - /** - * Override the Overlap Policy for this request. - * - * @default SKIP - */ - overlap?: ScheduleOverlapPolicy; -} diff --git a/node_modules/@temporalio/client/src/task-queue-client.ts b/node_modules/@temporalio/client/src/task-queue-client.ts deleted file mode 100644 index 4a64178..0000000 --- a/node_modules/@temporalio/client/src/task-queue-client.ts +++ /dev/null @@ -1,311 +0,0 @@ -import { status } from '@grpc/grpc-js'; -import { assertNever, SymbolBasedInstanceOfError, RequireAtLeastOne } from '@temporalio/common/lib/type-helpers'; -import { filterNullAndUndefined, makeProtoEnumConverters } from '@temporalio/common/lib/internal-workflow'; -import { temporal } from '@temporalio/proto'; -import { BaseClient, BaseClientOptions, defaultBaseClientOptions, LoadedWithDefaults } from './base-client'; -import { WorkflowService } from './types'; -import { BuildIdOperation, versionSetsFromProto, WorkerBuildIdVersionSets } from './build-id-types'; -import { isGrpcServiceError, ServiceError } from './errors'; -import { rethrowKnownErrorTypes } from './helpers'; - -type IUpdateWorkerBuildIdCompatibilityRequest = - temporal.api.workflowservice.v1.IUpdateWorkerBuildIdCompatibilityRequest; -type GetWorkerTaskReachabilityResponse = temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse; - -/** - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export type TaskQueueClientOptions = BaseClientOptions; - -/** - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export type LoadedTaskQueueClientOptions = LoadedWithDefaults; - -/** - * A stand-in for a Build Id for unversioned Workers - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export const UnversionedBuildId = Symbol.for('__temporal_unversionedBuildId'); -export type UnversionedBuildIdType = typeof UnversionedBuildId; - -/** - * Client for starting Workflow executions and creating Workflow handles - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export class TaskQueueClient extends BaseClient { - public readonly options: LoadedTaskQueueClientOptions; - - constructor(options?: TaskQueueClientOptions) { - super(options); - this.options = { - ...defaultBaseClientOptions(), - ...filterNullAndUndefined(options ?? {}), - loadedDataConverter: this.dataConverter, - }; - } - - /** - * Raw gRPC access to the Temporal service. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests - * using this service attribute. - */ - get workflowService(): WorkflowService { - return this.connection.workflowService; - } - - /** - * Used to add new Build Ids or otherwise update the relative compatibility of Build Ids as - * defined on a specific task queue for the Worker Versioning feature. For more on this feature, - * see https://docs.temporal.io/workers#worker-versioning - * - * @param taskQueue The task queue to make changes to. - * @param operation The operation to be performed. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ - public async updateBuildIdCompatibility(taskQueue: string, operation: BuildIdOperation): Promise { - const request: IUpdateWorkerBuildIdCompatibilityRequest = { - namespace: this.options.namespace, - taskQueue, - }; - switch (operation.operation) { - case 'addNewIdInNewDefaultSet': - request.addNewBuildIdInNewDefaultSet = operation.buildId; - break; - case 'addNewCompatibleVersion': - request.addNewCompatibleBuildId = { - newBuildId: operation.buildId, - existingCompatibleBuildId: operation.existingCompatibleBuildId, - }; - break; - case 'promoteSetByBuildId': - request.promoteSetByBuildId = operation.buildId; - break; - case 'promoteBuildIdWithinSet': - request.promoteBuildIdWithinSet = operation.buildId; - break; - case 'mergeSets': - request.mergeSets = { - primarySetBuildId: operation.primaryBuildId, - secondarySetBuildId: operation.secondaryBuildId, - }; - break; - default: - assertNever('Unknown build id update operation', operation); - } - try { - await this.workflowService.updateWorkerBuildIdCompatibility(request); - } catch (e) { - this.rethrowGrpcError(e, 'Unexpected error updating Build Id compatibility'); - } - } - - /** - * Fetch the sets of compatible Build Ids for a given task queue. - * - * @param taskQueue The task queue to fetch the compatibility information for. - * @returns The sets of compatible Build Ids for the given task queue, or undefined if the queue - * has no Build Ids defined on it. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ - public async getBuildIdCompatability(taskQueue: string): Promise { - let resp; - try { - resp = await this.workflowService.getWorkerBuildIdCompatibility({ - taskQueue, - namespace: this.options.namespace, - }); - } catch (e) { - this.rethrowGrpcError(e, 'Unexpected error fetching Build Id compatibility'); - } - if (resp.majorVersionSets == null || resp.majorVersionSets.length === 0) { - return undefined; - } - return versionSetsFromProto(resp); - } - - /** - * Fetches task reachability to determine whether a worker may be retired. The request may specify - * task queues to query for or let the server fetch all task queues mapped to the given build IDs. - * - * When requesting a large number of task queues or all task queues associated with the given - * build ids in a namespace, all task queues will be listed in the response but some of them may - * not contain reachability information due to a server enforced limit. When reaching the limit, - * task queues that reachability information could not be retrieved for will be marked with a - * `NotFetched` entry in {@link BuildIdReachability.taskQueueReachability}. The caller may issue - * another call to get the reachability for those task queues. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ - public async getReachability(options: ReachabilityOptions): Promise { - let resp; - const buildIds = options.buildIds?.map((bid) => { - if (bid === UnversionedBuildId) { - return ''; - } - return bid; - }); - try { - resp = await this.workflowService.getWorkerTaskReachability({ - namespace: this.options.namespace, - taskQueues: options.taskQueues, - buildIds, - reachability: encodeTaskReachability(options.reachability), - }); - } catch (e) { - this.rethrowGrpcError(e, 'Unexpected error fetching Build Id reachability'); - } - return reachabilityResponseFromProto(resp); - } - - protected rethrowGrpcError(err: unknown, fallbackMessage: string): never { - if (isGrpcServiceError(err)) { - rethrowKnownErrorTypes(err); - if (err.code === status.NOT_FOUND) { - throw new BuildIdNotFoundError(err.details ?? 'Build Id not found'); - } - throw new ServiceError(fallbackMessage, { cause: err }); - } - throw new ServiceError('Unexpected error while making gRPC request'); - } -} - -/** - * Options for {@link TaskQueueClient.getReachability} - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export type ReachabilityOptions = RequireAtLeastOne; - -/** - * There are different types of reachability: - * - `NEW_WORKFLOWS`: The Build Id might be used by new workflows - * - `EXISTING_WORKFLOWS` The Build Id might be used by open workflows and/or closed workflows. - * - `OPEN_WORKFLOWS` The Build Id might be used by open workflows - * - `CLOSED_WORKFLOWS` The Build Id might be used by closed workflows - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export const ReachabilityType = { - /** The Build Id might be used by new workflows. */ - NEW_WORKFLOWS: 'NEW_WORKFLOWS', - - /** The Build Id might be used by open workflows and/or closed workflows. */ - EXISTING_WORKFLOWS: 'EXISTING_WORKFLOWS', - - /** The Build Id might be used by open workflows. */ - OPEN_WORKFLOWS: 'OPEN_WORKFLOWS', - - /** The Build Id might be used by closed workflows. */ - CLOSED_WORKFLOWS: 'CLOSED_WORKFLOWS', -} as const; -export type ReachabilityType = (typeof ReachabilityType)[keyof typeof ReachabilityType]; - -export const [encodeTaskReachability, decodeTaskReachability] = makeProtoEnumConverters< - temporal.api.enums.v1.TaskReachability, - typeof temporal.api.enums.v1.TaskReachability, - keyof typeof temporal.api.enums.v1.TaskReachability, - typeof ReachabilityType, - 'TASK_REACHABILITY_' ->( - { - [ReachabilityType.NEW_WORKFLOWS]: 1, - [ReachabilityType.EXISTING_WORKFLOWS]: 2, - [ReachabilityType.OPEN_WORKFLOWS]: 3, - [ReachabilityType.CLOSED_WORKFLOWS]: 4, - UNSPECIFIED: 0, - } as const, - 'TASK_REACHABILITY_' -); - -/** - * See {@link ReachabilityOptions} - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface BaseReachabilityOptions { - /** - * A list of build ids to query the reachability of. Currently, at least one Build Id must be - * specified, but this restriction may be lifted in the future. - */ - buildIds: (string | UnversionedBuildIdType)[]; - /** - * A list of task queues with Build Ids defined on them that the request is - * concerned with. - */ - taskQueues?: string[]; - /** The kind of reachability this request is concerned with. */ - reachability?: ReachabilityType; -} - -/** - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface ReachabilityResponse { - /** Maps Build Ids to their reachability information. */ - buildIdReachability: Record; -} - -/** - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export type ReachabilityTypeResponse = ReachabilityType | 'NOT_FETCHED'; - -/** - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export interface BuildIdReachability { - /** - * Maps Task Queue names to how the Build Id may be reachable from them. If they are not - * reachable, the map value will be an empty array. - */ - taskQueueReachability: Record; -} - -export function reachabilityResponseFromProto(resp: GetWorkerTaskReachabilityResponse): ReachabilityResponse { - return { - buildIdReachability: Object.fromEntries( - resp.buildIdReachability.map((bir) => { - const taskQueueReachability: Record = {}; - if (bir.taskQueueReachability != null) { - for (const tqr of bir.taskQueueReachability) { - if (tqr.taskQueue == null) { - continue; - } - if (tqr.reachability == null) { - taskQueueReachability[tqr.taskQueue] = []; - continue; - } - taskQueueReachability[tqr.taskQueue] = tqr.reachability.map( - (x) => decodeTaskReachability(x) ?? 'NOT_FETCHED' - ); - } - } - let bid: string | UnversionedBuildIdType; - if (bir.buildId) { - bid = bir.buildId; - } else { - bid = UnversionedBuildId; - } - return [bid, { taskQueueReachability }]; - }) - ) as Record, - }; -} - -/** - * Thrown when one or more Build Ids are not found while using the {@link TaskQueueClient}. - * - * It could be because: - * - Id passed is incorrect - * - Build Id has been scavenged by the server. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -@SymbolBasedInstanceOfError('BuildIdNotFoundError') -export class BuildIdNotFoundError extends Error {} diff --git a/node_modules/@temporalio/client/src/types.ts b/node_modules/@temporalio/client/src/types.ts deleted file mode 100644 index ee1ad77..0000000 --- a/node_modules/@temporalio/client/src/types.ts +++ /dev/null @@ -1,215 +0,0 @@ -import type * as grpc from '@grpc/grpc-js'; -import type { TypedSearchAttributes, SearchAttributes, SearchAttributeValue, Priority } from '@temporalio/common'; -import { makeProtoEnumConverters } from '@temporalio/common/lib/internal-workflow'; -import * as proto from '@temporalio/proto'; -import { Replace } from '@temporalio/common/lib/type-helpers'; -import type { ConnectionPlugin } from './connection'; - -export interface WorkflowExecution { - workflowId: string; - runId?: string; -} -export type StartWorkflowExecutionRequest = proto.temporal.api.workflowservice.v1.IStartWorkflowExecutionRequest; -export type GetWorkflowExecutionHistoryRequest = - proto.temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryRequest; -export type DescribeWorkflowExecutionResponse = - proto.temporal.api.workflowservice.v1.IDescribeWorkflowExecutionResponse; -export type RawWorkflowExecutionInfo = proto.temporal.api.workflow.v1.IWorkflowExecutionInfo; -export type TerminateWorkflowExecutionResponse = - proto.temporal.api.workflowservice.v1.ITerminateWorkflowExecutionResponse; -export type RequestCancelWorkflowExecutionResponse = - proto.temporal.api.workflowservice.v1.IRequestCancelWorkflowExecutionResponse; - -export type WorkflowExecutionStatusName = - | 'UNSPECIFIED' - | 'RUNNING' - | 'COMPLETED' - | 'FAILED' - | 'CANCELLED' - | 'TERMINATED' - | 'CONTINUED_AS_NEW' - | 'TIMED_OUT' - | 'PAUSED' - | 'UNKNOWN'; // UNKNOWN is reserved for future enum values - -export interface WorkflowExecutionInfo { - type: string; - workflowId: string; - runId: string; - taskQueue: string; - status: { code: proto.temporal.api.enums.v1.WorkflowExecutionStatus; name: WorkflowExecutionStatusName }; - historyLength: number; - /** - * Size of Workflow history in bytes. - * - * This value is only available in server versions >= 1.20 - */ - historySize?: number; - startTime: Date; - executionTime?: Date; - closeTime?: Date; - memo?: Record; - /** @deprecated Use {@link typedSearchAttributes} instead. */ - searchAttributes: SearchAttributes; // eslint-disable-line @typescript-eslint/no-deprecated - typedSearchAttributes: TypedSearchAttributes; - parentExecution?: Required; - rootExecution?: Required; - raw: RawWorkflowExecutionInfo; - priority?: Priority; -} - -export interface CountWorkflowExecution { - count: number; - groups: { - count: number; - groupValues: SearchAttributeValue[]; // eslint-disable-line @typescript-eslint/no-deprecated - }[]; -} - -export type WorkflowExecutionDescription = Replace< - WorkflowExecutionInfo, - { - raw: DescribeWorkflowExecutionResponse; - } -> & { - /** - * General fixed details for this workflow execution that may appear in UI/CLI. - * This can be in Temporal markdown format and can span multiple lines. - * - * @experimental User metadata is a new API and susceptible to change. - */ - staticDetails: () => Promise; - - /** - * A single-line fixed summary for this workflow execution that may appear in the UI/CLI. - * This can be in single-line Temporal markdown format. - * - * @experimental User metadata is a new API and susceptible to change. - */ - staticSummary: () => Promise; -}; - -export type WorkflowService = proto.temporal.api.workflowservice.v1.WorkflowService; -export const { WorkflowService } = proto.temporal.api.workflowservice.v1; -export type OperatorService = proto.temporal.api.operatorservice.v1.OperatorService; -export const { OperatorService } = proto.temporal.api.operatorservice.v1; -export type TestService = proto.temporal.api.testservice.v1.TestService; -export const { TestService } = proto.temporal.api.testservice.v1; -export type HealthService = proto.grpc.health.v1.Health; -export const { Health: HealthService } = proto.grpc.health.v1; - -/** - * Mapping of string to valid gRPC metadata value - */ -export type Metadata = Record; - -/** - * User defined context for gRPC client calls - */ -export interface CallContext { - /** - * {@link Deadline | https://grpc.io/blog/deadlines/} for gRPC client calls - */ - deadline?: number | Date; - /** - * Metadata to set on gRPC requests - */ - metadata?: Metadata; - - abortSignal?: AbortSignal; -} - -/** - * Connection interface used by high level SDK clients. - */ -export interface ConnectionLike { - workflowService: WorkflowService; - operatorService: OperatorService; - plugins: ConnectionPlugin[]; - close(): Promise; - ensureConnected(): Promise; - - /** - * Set a deadline for any service requests executed in `fn`'s scope. - * - * The deadline is a point in time after which any pending gRPC request will be considered as failed; - * this will locally result in the request call throwing a {@link grpc.ServiceError|ServiceError} - * with code {@link grpc.status.DEADLINE_EXCEEDED|DEADLINE_EXCEEDED}; see {@link isGrpcDeadlineError}. - * - * It is stronly recommended to explicitly set deadlines. If no deadline is set, then it is - * possible for the client to end up waiting forever for a response. - * - * This method is only a convenience wrapper around {@link Connection.withDeadline}. - * - * @param deadline a point in time after which the request will be considered as failed; either a - * Date object, or a number of milliseconds since the Unix epoch (UTC). - * @returns the value returned from `fn` - * - * @see https://grpc.io/docs/guides/deadlines/ - */ - withDeadline(deadline: number | Date, fn: () => Promise): Promise; - - /** - * Set metadata for any service requests executed in `fn`'s scope. - * - * @returns returned value of `fn` - */ - withMetadata(metadata: Metadata, fn: () => Promise): Promise; - - /** - * Set an {@link AbortSignal} that, when aborted, cancels any ongoing service requests executed in - * `fn`'s scope. This will locally result in the request call throwing a {@link grpc.ServiceError|ServiceError} - * with code {@link grpc.status.CANCELLED|CANCELLED}; see {@link isGrpcCancelledError}. - * - * @returns value returned from `fn` - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal - */ - withAbortSignal(abortSignal: AbortSignal, fn: () => Promise): Promise; -} - -export const InternalConnectionLikeSymbol = Symbol('__temporal_internal_connection_like'); -export type InternalConnectionLike = ConnectionLike & { - [InternalConnectionLikeSymbol]?: { - /** - * Capability flag that determines whether the connection supports eager workflow start. - * This will only be true if the underlying connection is a {@link NativeConnection}. - */ - readonly supportsEagerStart?: boolean; - }; -}; - -export const QueryRejectCondition = { - NONE: 'NONE', - NOT_OPEN: 'NOT_OPEN', - NOT_COMPLETED_CLEANLY: 'NOT_COMPLETED_CLEANLY', - - /** @deprecated Use {@link NONE} instead. */ - QUERY_REJECT_CONDITION_NONE: 'NONE', - - /** @deprecated Use {@link NOT_OPEN} instead. */ - QUERY_REJECT_CONDITION_NOT_OPEN: 'NOT_OPEN', - - /** @deprecated Use {@link NOT_COMPLETED_CLEANLY} instead. */ - QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY: 'NOT_COMPLETED_CLEANLY', - - /** @deprecated Use `undefined` instead. */ - QUERY_REJECT_CONDITION_UNSPECIFIED: undefined, -} as const; -export type QueryRejectCondition = (typeof QueryRejectCondition)[keyof typeof QueryRejectCondition]; - -export const [encodeQueryRejectCondition, decodeQueryRejectCondition] = makeProtoEnumConverters< - proto.temporal.api.enums.v1.QueryRejectCondition, - typeof proto.temporal.api.enums.v1.QueryRejectCondition, - keyof typeof proto.temporal.api.enums.v1.QueryRejectCondition, - typeof QueryRejectCondition, - 'QUERY_REJECT_CONDITION_' ->( - { - [QueryRejectCondition.NONE]: 1, - [QueryRejectCondition.NOT_OPEN]: 2, - [QueryRejectCondition.NOT_COMPLETED_CLEANLY]: 3, - UNSPECIFIED: 0, - } as const, - 'QUERY_REJECT_CONDITION_' -); diff --git a/node_modules/@temporalio/client/src/workflow-client.ts b/node_modules/@temporalio/client/src/workflow-client.ts deleted file mode 100644 index a609c35..0000000 --- a/node_modules/@temporalio/client/src/workflow-client.ts +++ /dev/null @@ -1,1679 +0,0 @@ -import { status as grpcStatus } from '@grpc/grpc-js'; -import { v4 as uuid4 } from 'uuid'; -import { - BaseWorkflowHandle, - CancelledFailure, - compileRetryPolicy, - HistoryAndWorkflowId, - QueryDefinition, - RetryState, - SignalDefinition, - UpdateDefinition, - TerminatedFailure, - TimeoutFailure, - TimeoutType, - WithWorkflowArgs, - Workflow, - WorkflowExecutionAlreadyStartedError, - WorkflowNotFoundError, - WorkflowResultType, - extractWorkflowType, - encodeWorkflowIdReusePolicy, - decodeRetryState, - encodeWorkflowIdConflictPolicy, - WorkflowIdConflictPolicy, - compilePriority, -} from '@temporalio/common'; -import { encodeUserMetadata } from '@temporalio/common/lib/internal-non-workflow/codec-helpers'; -import { encodeUnifiedSearchAttributes } from '@temporalio/common/lib/converter/payload-search-attributes'; -import { composeInterceptors } from '@temporalio/common/lib/interceptors'; -import { History } from '@temporalio/common/lib/proto-utils'; -import { SymbolBasedInstanceOfError } from '@temporalio/common/lib/type-helpers'; -import { - decodeArrayFromPayloads, - decodeFromPayloadsAtIndex, - decodeOptionalFailureToOptionalError, - decodeOptionalSinglePayload, - encodeMapToPayloads, - encodeToPayloads, -} from '@temporalio/common/lib/internal-non-workflow'; -import { filterNullAndUndefined } from '@temporalio/common/lib/internal-workflow'; -import { temporal } from '@temporalio/proto'; -import { - ServiceError, - WorkflowContinuedAsNewError, - WorkflowFailedError, - WorkflowUpdateFailedError, - WorkflowUpdateRPCTimeoutOrCancelledError, - isGrpcServiceError, -} from './errors'; -import { - WorkflowCancelInput, - WorkflowClientInterceptor, - WorkflowClientInterceptors, - WorkflowDescribeInput, - WorkflowQueryInput, - WorkflowSignalInput, - WorkflowSignalWithStartInput, - WorkflowStartInput, - WorkflowTerminateInput, - WorkflowStartUpdateInput, - WorkflowStartUpdateOutput, - WorkflowStartUpdateWithStartInput, - WorkflowStartUpdateWithStartOutput, - WorkflowStartOutput, -} from './interceptors'; -import { - CountWorkflowExecution, - DescribeWorkflowExecutionResponse, - encodeQueryRejectCondition, - GetWorkflowExecutionHistoryRequest, - InternalConnectionLike, - InternalConnectionLikeSymbol, - QueryRejectCondition, - RequestCancelWorkflowExecutionResponse, - StartWorkflowExecutionRequest, - TerminateWorkflowExecutionResponse, - WorkflowExecution, - WorkflowExecutionDescription, - WorkflowExecutionInfo, - WorkflowService, -} from './types'; -import { - compileWorkflowOptions, - WorkflowOptions, - WorkflowSignalWithStartOptions, - WorkflowStartOptions, - WorkflowUpdateOptions, -} from './workflow-options'; -import { decodeCountWorkflowExecutionsResponse, executionInfoFromRaw, rethrowKnownErrorTypes } from './helpers'; -import { - BaseClient, - BaseClientOptions, - defaultBaseClientOptions, - LoadedWithDefaults, - WithDefaults, -} from './base-client'; -import { mapAsyncIterable } from './iterators-utils'; -import { WorkflowUpdateStage, encodeWorkflowUpdateStage } from './workflow-update-stage'; -import { InternalWorkflowStartOptionsSymbol, InternalWorkflowStartOptions } from './internal'; -import { adaptWorkflowClientInterceptor } from './interceptor-adapters'; - -const UpdateWorkflowExecutionLifecycleStage = temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage; - -/** - * A client side handle to a single Workflow instance. - * It can be used to start, signal, query, wait for completion, terminate and cancel a Workflow execution. - * - * Given the following Workflow definition: - * ```ts - * export const incrementSignal = defineSignal<[number]>('increment'); - * export const getValueQuery = defineQuery('getValue'); - * export const incrementAndGetValueUpdate = defineUpdate('incrementAndGetValue'); - * export async function counterWorkflow(initialValue: number): Promise; - * ``` - * - * Create a handle for running and interacting with a single Workflow: - * ```ts - * const client = new WorkflowClient(); - * // Start the Workflow with initialValue of 2. - * const handle = await client.start({ - * workflowType: counterWorkflow, - * args: [2], - * taskQueue: 'tutorial', - * }); - * await handle.signal(incrementSignal, 2); - * const queryResult = await handle.query(getValueQuery); // 4 - * const firstUpdateResult = await handle.executeUpdate(incrementAndGetValueUpdate, { args: [2] }); // 6 - * const secondUpdateHandle = await handle.startUpdate(incrementAndGetValueUpdate, { args: [2] }); - * const secondUpdateResult = await secondUpdateHandle.result(); // 8 - * await handle.cancel(); - * await handle.result(); // throws a WorkflowFailedError with `cause` set to a CancelledFailure. - * ``` - */ -export interface WorkflowHandle extends BaseWorkflowHandle { - /** - * Start an Update and wait for the result. - * - * @throws {@link WorkflowUpdateFailedError} if Update validation fails or if ApplicationFailure is thrown in the Update handler. - * @throws {@link WorkflowUpdateRPCTimeoutOrCancelledError} if this Update call timed out or was cancelled. This doesn't - * mean the update itself was timed out or cancelled. - * @param def an Update definition as returned from {@link defineUpdate} - * @param options Update arguments - * - * @example - * ```ts - * const updateResult = await handle.executeUpdate(incrementAndGetValueUpdate, { args: [2] }); - * ``` - */ - executeUpdate( - def: UpdateDefinition | string, - options: WorkflowUpdateOptions & { args: Args } - ): Promise; - - executeUpdate( - def: UpdateDefinition | string, - options?: WorkflowUpdateOptions & { args?: Args } - ): Promise; - - /** - * Start an Update and receive a handle to the Update. The Update validator (if present) is run - * before the handle is returned. - * - * @throws {@link WorkflowUpdateFailedError} if Update validation fails. - * @throws {@link WorkflowUpdateRPCTimeoutOrCancelledError} if this Update call timed out or was cancelled. This doesn't - * mean the update itself was timed out or cancelled. - * - * @param def an Update definition as returned from {@link defineUpdate} - * @param options update arguments, and update lifecycle stage to wait for - * - * Currently, startUpdate always waits until a worker is accepting tasks for the workflow and the - * update is accepted or rejected, and the options object must be at least - * ```ts - * { - * waitForStage: WorkflowUpdateStage.ACCEPTED - * } - * ``` - * If the update takes arguments, then the options object must additionally contain an `args` - * property with an array of argument values. - * - * @example - * ```ts - * const updateHandle = await handle.startUpdate(incrementAndGetValueUpdate, { - * args: [2], - * waitForStage: 'ACCEPTED', - * }); - * const updateResult = await updateHandle.result(); - * ``` - */ - startUpdate( - def: UpdateDefinition | string, - options: WorkflowUpdateOptions & { - args: Args; - waitForStage: 'ACCEPTED'; - } - ): Promise>; - - startUpdate( - def: UpdateDefinition | string, - options: WorkflowUpdateOptions & { - args?: Args; - waitForStage: typeof WorkflowUpdateStage.ACCEPTED; - } - ): Promise>; - - /** - * Get a handle to an Update of this Workflow. - */ - getUpdateHandle(updateId: string): WorkflowUpdateHandle; - - /** - * Query a running or completed Workflow. - * - * @param def a query definition as returned from {@link defineQuery} or query name (string) - * - * @example - * ```ts - * await handle.query(getValueQuery); - * await handle.query('getValue'); - * ``` - */ - query(def: QueryDefinition | string, ...args: Args): Promise; - - /** - * Terminate a running Workflow - */ - terminate(reason?: string): Promise; - - /** - * Cancel a running Workflow. - * - * When a Workflow is cancelled, the root scope throws {@link CancelledFailure} with `message: 'Workflow canceled'`. - * That means that all cancellable scopes will throw `CancelledFailure`. - * - * Cancellation may be propagated to Activities depending on {@link ActivityOptions#cancellationType}, after which - * Activity calls may throw an {@link ActivityFailure}, and `isCancellation(error)` will be true (see {@link isCancellation}). - * - * Cancellation may be propagated to Child Workflows depending on {@link ChildWorkflowOptions#cancellationType}, after - * which calls to {@link executeChild} and {@link ChildWorkflowHandle#result} will throw, and `isCancellation(error)` - * will be true (see {@link isCancellation}). - */ - cancel(): Promise; - - /** - * Describe the current workflow execution - */ - describe(): Promise; - - /** - * Return a workflow execution's history - */ - fetchHistory(): Promise; - - /** - * Readonly accessor to the underlying WorkflowClient - */ - readonly client: WorkflowClient; -} - -/** - * This interface is exactly the same as {@link WorkflowHandle} except it - * includes the `firstExecutionRunId` returned from {@link WorkflowClient.start}. - */ -export interface WorkflowHandleWithFirstExecutionRunId extends WorkflowHandle { - /** - * Run Id of the first Execution in the Workflow Execution Chain. - */ - readonly firstExecutionRunId: string; -} - -/** - * This interface is exactly the same as {@link WorkflowHandleWithFirstExecutionRunId} except it - * includes the `eagerlyStarted` returned from {@link WorkflowClient.start}. - */ -export interface WorkflowHandleWithStartDetails - extends WorkflowHandleWithFirstExecutionRunId { - readonly eagerlyStarted: boolean; -} - -/** - * This interface is exactly the same as {@link WorkflowHandle} except it - * includes the `signaledRunId` returned from `signalWithStart`. - */ -export interface WorkflowHandleWithSignaledRunId extends WorkflowHandle { - /** - * The Run Id of the bound Workflow at the time of {@link WorkflowClient.signalWithStart}. - * - * Since `signalWithStart` may have signaled an existing Workflow Chain, `signaledRunId` might not be the - * `firstExecutionRunId`. - */ - readonly signaledRunId: string; -} - -export interface WorkflowClientOptions extends BaseClientOptions { - /** - * Used to override and extend default Connection functionality - * - * Useful for injecting auth headers and tracing Workflow executions - */ - // eslint-disable-next-line @typescript-eslint/no-deprecated - interceptors?: WorkflowClientInterceptors | WorkflowClientInterceptor[]; - - /** - * Should a query be rejected by closed and failed workflows - * - * @default `undefined` which means that closed and failed workflows are still queryable - */ - queryRejectCondition?: QueryRejectCondition; -} - -export type LoadedWorkflowClientOptions = LoadedWithDefaults; - -function defaultWorkflowClientOptions(): WithDefaults { - return { - ...defaultBaseClientOptions(), - interceptors: [], - queryRejectCondition: 'NONE', - }; -} - -function assertRequiredWorkflowOptions(opts: WorkflowOptions): asserts opts is WorkflowOptions { - if (!opts.taskQueue) { - throw new TypeError('Missing WorkflowOptions.taskQueue'); - } - if (!opts.workflowId) { - throw new TypeError('Missing WorkflowOptions.workflowId'); - } -} - -function ensureArgs>( - opts: T -): Omit & { args: unknown[] } { - const { args, ...rest } = opts; - return { args: (args as unknown[]) ?? [], ...rest }; -} - -/** - * Options for getting a result of a Workflow execution. - */ -export interface WorkflowResultOptions { - /** - * If set to true, instructs the client to follow the chain of execution before returning a Workflow's result. - * - * Workflow execution is chained if the Workflow has a cron schedule or continues-as-new or configured to retry - * after failure or timeout. - * - * @default true - */ - followRuns?: boolean; -} - -/** - * Options for {@link WorkflowClient.getHandle} - */ -export interface GetWorkflowHandleOptions extends WorkflowResultOptions { - /** - * ID of the first execution in the Workflow execution chain. - * - * When getting a handle with no `runId`, pass this option to ensure some - * {@link WorkflowHandle} methods (e.g. `terminate` and `cancel`) don't - * affect executions from another chain. - */ - firstExecutionRunId?: string; -} - -interface WorkflowHandleOptions extends GetWorkflowHandleOptions { - workflowId: string; - runId?: string; - interceptors: WorkflowClientInterceptor[]; - /** - * A runId to use for getting the workflow's result. - * - * - When creating a handle using `getHandle`, uses the provided runId or firstExecutionRunId - * - When creating a handle using `start`, uses the returned runId (first in the chain) - * - When creating a handle using `signalWithStart`, uses the the returned runId - */ - runIdForResult?: string; -} - -/** - * An iterable list of WorkflowExecution, as returned by {@link WorkflowClient.list}. - */ -export interface AsyncWorkflowListIterable extends AsyncIterable { - /** - * Return an iterable of histories corresponding to this iterable's WorkflowExecutions. - * Workflow histories will be fetched concurrently. - * - * Useful in batch replaying - */ - intoHistories: (intoHistoriesOptions?: IntoHistoriesOptions) => AsyncIterable; -} - -/** - * A client-side handle to an Update. - */ -export interface WorkflowUpdateHandle { - /** - * The ID of this Update request. - */ - updateId: string; - - /** - * The ID of the Workflow being targeted by this Update request. - */ - workflowId: string; - - /** - * The ID of the Run of the Workflow being targeted by this Update request. - */ - workflowRunId?: string; - - /** - * Return the result of the Update. - * @throws {@link WorkflowUpdateFailedError} if ApplicationFailure is thrown in the Update handler. - */ - result(): Promise; -} - -/** - * Options for {@link WorkflowHandle.getUpdateHandle} - */ -export interface GetWorkflowUpdateHandleOptions { - /** - * The ID of the Run of the Workflow targeted by the Update. - */ - workflowRunId?: string; -} - -/** - * Options for {@link WorkflowClient.list} - */ -export interface ListOptions { - /** - * Maximum number of results to fetch per page. - * - * @default depends on server config, typically 1000 - */ - pageSize?: number; - /** - * Query string for matching and ordering the results - */ - query?: string; -} - -/** - * Options for {@link WorkflowClient.list().intoHistories()} - */ -export interface IntoHistoriesOptions { - /** - * Maximum number of workflow histories to download concurrently. - * - * @default 5 - */ - concurrency?: number; - - /** - * Maximum number of workflow histories to buffer ahead, ready for consumption. - * - * It is recommended to set `bufferLimit` to a rasonnably low number if it is expected that the - * iterable may be stopped before reaching completion (for example, when implementing a fail fast - * bach replay test). - * - * Ignored unless `concurrency > 1`. No limit applies if set to `undefined`. - * - * @default unlimited - */ - bufferLimit?: number; -} - -const withStartWorkflowOperationResolve: unique symbol = Symbol(); -const withStartWorkflowOperationReject: unique symbol = Symbol(); -const withStartWorkflowOperationUsed: unique symbol = Symbol(); - -/** - * Define how to start a workflow when using {@link WorkflowClient.startUpdateWithStart} and - * {@link WorkflowClient.executeUpdateWithStart}. `workflowIdConflictPolicy` is required in the options. - */ -export class WithStartWorkflowOperation { - private [withStartWorkflowOperationUsed]: boolean = false; - private [withStartWorkflowOperationResolve]: ((handle: WorkflowHandle) => void) | undefined = undefined; - private [withStartWorkflowOperationReject]: ((error: any) => void) | undefined = undefined; - private workflowHandlePromise: Promise>; - - constructor( - public workflowTypeOrFunc: string | T, - public options: WorkflowStartOptions & { workflowIdConflictPolicy: WorkflowIdConflictPolicy } - ) { - this.workflowHandlePromise = new Promise>((resolve, reject) => { - this[withStartWorkflowOperationResolve] = resolve; - this[withStartWorkflowOperationReject] = reject; - }); - // Suppress unhandled rejection: if executeUpdateWithStart fails before any - // response, we reject this promise AND re-throw to the caller. Without this - // no-op catch the rejected promise has no handler and Node 15+ terminates. - this.workflowHandlePromise.catch(() => undefined); - } - - public async workflowHandle(): Promise> { - return await this.workflowHandlePromise; - } -} - -/** - * Client for starting Workflow executions and creating Workflow handles. - * - * Typically this client should not be instantiated directly, instead create the high level {@link Client} and use - * {@link Client.workflow} to interact with Workflows. - */ -export class WorkflowClient extends BaseClient { - public readonly options: LoadedWorkflowClientOptions; - - constructor(options?: WorkflowClientOptions) { - super(options); - this.options = { - ...defaultWorkflowClientOptions(), - ...filterNullAndUndefined(options ?? {}), - loadedDataConverter: this.dataConverter, - }; - } - - /** - * Raw gRPC access to the Temporal service. - * - * **NOTE**: The namespace provided in {@link options} is **not** automatically set on requests made via this service - * object. - */ - get workflowService(): WorkflowService { - return this.connection.workflowService; - } - - protected async _start( - workflowTypeOrFunc: string | T, - options: WorkflowStartOptions, - interceptors: WorkflowClientInterceptor[] - ): Promise { - const workflowType = extractWorkflowType(workflowTypeOrFunc); - assertRequiredWorkflowOptions(options); - const compiledOptions = compileWorkflowOptions(ensureArgs(options)); - const adaptedInterceptors = interceptors.map((i) => adaptWorkflowClientInterceptor(i)); - - const startWithDetails = composeInterceptors( - adaptedInterceptors, - 'startWithDetails', - this._startWorkflowHandler.bind(this) - ); - - return startWithDetails({ - options: compiledOptions, - headers: {}, - workflowType, - }); - } - - protected async _signalWithStart( - workflowTypeOrFunc: string | T, - options: WithWorkflowArgs>, - interceptors: WorkflowClientInterceptor[] - ): Promise { - const workflowType = extractWorkflowType(workflowTypeOrFunc); - const { signal, signalArgs, ...rest } = options; - assertRequiredWorkflowOptions(rest); - const compiledOptions = compileWorkflowOptions(ensureArgs(rest)); - const signalWithStart = composeInterceptors( - interceptors, - 'signalWithStart', - this._signalWithStartWorkflowHandler.bind(this) - ); - - return signalWithStart({ - options: compiledOptions, - headers: {}, - workflowType, - signalName: typeof signal === 'string' ? signal : signal.name, - signalArgs: signalArgs ?? [], - }); - } - - /** - * Start a new Workflow execution. - * - * @returns a {@link WorkflowHandle} to the started Workflow - */ - public async start( - workflowTypeOrFunc: string | T, - options: WorkflowStartOptions - ): Promise> { - const { workflowId } = options; - const interceptors = this.getOrMakeInterceptors(workflowId); - const wfStartOutput = await this._start(workflowTypeOrFunc, { ...options, workflowId }, interceptors); - // runId is not used in handles created with `start*` calls because these - // handles should allow interacting with the workflow if it continues as new. - const baseHandle = this._createWorkflowHandle({ - workflowId, - runId: undefined, - firstExecutionRunId: wfStartOutput.runId, - runIdForResult: wfStartOutput.runId, - interceptors, - followRuns: options.followRuns ?? true, - }); - return { - ...baseHandle, - firstExecutionRunId: wfStartOutput.runId, - eagerlyStarted: wfStartOutput.eagerlyStarted, - }; - } - - /** - * Start a new Workflow Execution and immediately send a Signal to that Workflow. - * - * The behavior of Signal-with-Start in the case where there is already a running Workflow with - * the given Workflow ID depends on the {@link WorkflowIDConflictPolicy}. That is, if the policy - * is `USE_EXISTING`, then the Signal is issued against the already existing Workflow Execution; - * however, if the policy is `FAIL`, then an error is thrown. If no policy is specified, - * Signal-with-Start defaults to `USE_EXISTING`. - * - * @returns a {@link WorkflowHandle} to the started Workflow - */ - public async signalWithStart( - workflowTypeOrFunc: string | WorkflowFn, - options: WithWorkflowArgs> - ): Promise> { - const { workflowId } = options; - const interceptors = this.getOrMakeInterceptors(workflowId); - const runId = await this._signalWithStart(workflowTypeOrFunc, options, interceptors); - // runId is not used in handles created with `start*` calls because these - // handles should allow interacting with the workflow if it continues as new. - const handle = this._createWorkflowHandle({ - workflowId, - runId: undefined, - firstExecutionRunId: undefined, // We don't know if this runId is first in the chain or not - runIdForResult: runId, - interceptors, - followRuns: options.followRuns ?? true, - }) as WorkflowHandleWithSignaledRunId; // Cast is safe because we know we add the signaledRunId below - (handle as any) /* readonly */.signaledRunId = runId; - return handle; - } - - /** - * Start a new Workflow Execution and immediately send an Update to that Workflow, - * then await and return the Update's result. - * - * The `updateOptions` object must contain a {@link WithStartWorkflowOperation}, which defines - * the options for the Workflow execution to start (e.g. the Workflow's type, task queue, input - * arguments, etc.) - * - * The behavior of Update-with-Start in the case where there is already a running Workflow with - * the given Workflow ID depends on the specified {@link WorkflowIDConflictPolicy}. That is, if - * the policy is `USE_EXISTING`, then the Update is issued against the already existing Workflow - * Execution; however, if the policy is `FAIL`, then an error is thrown. Caller MUST specify - * the desired WorkflowIDConflictPolicy. - * - * This call will block until the Update has completed. The Workflow handle can be retrieved by - * awaiting on {@link WithStartWorkflowOperation.workflowHandle}, whether or not the Update - * succeeds. - * - * @returns the Update result - */ - public async executeUpdateWithStart( - updateDef: UpdateDefinition | string, - updateOptions: WorkflowUpdateOptions & { args?: Args; startWorkflowOperation: WithStartWorkflowOperation } - ): Promise { - const handle = await this._startUpdateWithStart(updateDef, { - ...updateOptions, - waitForStage: WorkflowUpdateStage.COMPLETED, - }); - return await handle.result(); - } - - /** - * Start a new Workflow Execution and immediately send an Update to that Workflow, - * then return a {@link WorkflowUpdateHandle} for that Update. - * - * The `updateOptions` object must contain a {@link WithStartWorkflowOperation}, which defines - * the options for the Workflow execution to start (e.g. the Workflow's type, task queue, input - * arguments, etc.) - * - * The behavior of Update-with-Start in the case where there is already a running Workflow with - * the given Workflow ID depends on the specified {@link WorkflowIDConflictPolicy}. That is, if - * the policy is `USE_EXISTING`, then the Update is issued against the already existing Workflow - * Execution; however, if the policy is `FAIL`, then an error is thrown. Caller MUST specify - * the desired WorkflowIDConflictPolicy. - * - * This call will block until the Update has reached the specified {@link WorkflowUpdateStage}. - * Note that this means that the call will not return successfully until the Update has - * been delivered to a Worker. The Workflow handle can be retrieved by awaiting on - * {@link WithStartWorkflowOperation.workflowHandle}, whether or not the Update succeeds. - * - * @returns a {@link WorkflowUpdateHandle} to the started Update - */ - public async startUpdateWithStart( - updateDef: UpdateDefinition | string, - updateOptions: WorkflowUpdateOptions & { - args?: Args; - waitForStage: 'ACCEPTED'; - startWorkflowOperation: WithStartWorkflowOperation; - } - ): Promise> { - return this._startUpdateWithStart(updateDef, updateOptions); - } - - protected async _startUpdateWithStart( - updateDef: UpdateDefinition | string, - updateWithStartOptions: WorkflowUpdateOptions & { - args?: Args; - waitForStage: WorkflowUpdateStage; - startWorkflowOperation: WithStartWorkflowOperation; - } - ): Promise> { - const { waitForStage, args, startWorkflowOperation, ...updateOptions } = updateWithStartOptions; - const { workflowTypeOrFunc, options: workflowOptions } = startWorkflowOperation; - const { workflowId } = workflowOptions; - - if (startWorkflowOperation[withStartWorkflowOperationUsed]) { - throw new Error('This WithStartWorkflowOperation instance has already been executed.'); - } - startWorkflowOperation[withStartWorkflowOperationUsed] = true; - assertRequiredWorkflowOptions(workflowOptions); - - const startUpdateWithStartInput: WorkflowStartUpdateWithStartInput = { - workflowType: extractWorkflowType(workflowTypeOrFunc), - workflowStartOptions: compileWorkflowOptions(ensureArgs(workflowOptions)), - workflowStartHeaders: {}, - updateName: typeof updateDef === 'string' ? updateDef : updateDef.name, - updateArgs: args ?? [], - updateOptions, - updateHeaders: {}, - }; - - const interceptors = this.getOrMakeInterceptors(workflowId); - - const onStart = (startResponse: temporal.api.workflowservice.v1.IStartWorkflowExecutionResponse) => - startWorkflowOperation[withStartWorkflowOperationResolve]!( - this._createWorkflowHandle({ - workflowId, - firstExecutionRunId: startResponse.runId ?? undefined, - interceptors, - followRuns: workflowOptions.followRuns ?? true, - }) - ); - - const onStartError = (err: any) => { - startWorkflowOperation[withStartWorkflowOperationReject]!(err); - }; - - const fn = composeInterceptors( - interceptors, - 'startUpdateWithStart', - this._updateWithStartHandler.bind(this, waitForStage, onStart, onStartError) - ); - const updateOutput = await fn(startUpdateWithStartInput); - - let outcome = updateOutput.updateOutcome; - if (!outcome && waitForStage === WorkflowUpdateStage.COMPLETED) { - outcome = await this._pollForUpdateOutcome(updateOutput.updateId, { - workflowId, - runId: updateOutput.workflowExecution.runId, - }); - } - - return this.createWorkflowUpdateHandle( - updateOutput.updateId, - workflowId, - updateOutput.workflowExecution.runId, - outcome - ); - } - - /** - * Start a new Workflow execution, then await for its completion and return that Workflow's result. - * - * @returns the result of the Workflow execution - */ - public async execute( - workflowTypeOrFunc: string | T, - options: WorkflowStartOptions - ): Promise> { - const { workflowId } = options; - const interceptors = this.getOrMakeInterceptors(workflowId); - await this._start(workflowTypeOrFunc, options, interceptors); - return await this.result(workflowId, undefined, { - ...options, - followRuns: options.followRuns ?? true, - }); - } - - /** - * Get the result of a Workflow execution. - * - * Follow the chain of execution in case Workflow continues as new, or has a cron schedule or retry policy. - */ - public async result( - workflowId: string, - runId?: string, - opts?: WorkflowResultOptions - ): Promise> { - const followRuns = opts?.followRuns ?? true; - const execution: temporal.api.common.v1.IWorkflowExecution = { workflowId, runId }; - const req: GetWorkflowExecutionHistoryRequest = { - namespace: this.options.namespace, - execution, - skipArchival: true, - waitNewEvent: true, - historyEventFilterType: temporal.api.enums.v1.HistoryEventFilterType.HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT, - }; - let ev: temporal.api.history.v1.IHistoryEvent; - - for (;;) { - let res: temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse; - try { - res = await this.workflowService.getWorkflowExecutionHistory(req); - } catch (err) { - this.rethrowGrpcError(err, 'Failed to get Workflow execution history', { workflowId, runId }); - } - const events = res.history?.events; - - if (events == null || events.length === 0) { - req.nextPageToken = res.nextPageToken; - continue; - } - if (events.length !== 1) { - throw new Error(`Expected at most 1 close event(s), got: ${events.length}`); - } - // getWorkflowExecutionHistory should never return an array of undefined events - ev = events[0]!; - - if (ev.workflowExecutionCompletedEventAttributes) { - if (followRuns && ev.workflowExecutionCompletedEventAttributes.newExecutionRunId) { - execution.runId = ev.workflowExecutionCompletedEventAttributes.newExecutionRunId; - req.nextPageToken = undefined; - continue; - } - // Note that we can only return one value from our workflow function in JS. - // Ignore any other payloads in result - const [result] = await decodeArrayFromPayloads( - this.dataConverter, - ev.workflowExecutionCompletedEventAttributes.result?.payloads - ); - return result as any; - } else if (ev.workflowExecutionFailedEventAttributes) { - if (followRuns && ev.workflowExecutionFailedEventAttributes.newExecutionRunId) { - execution.runId = ev.workflowExecutionFailedEventAttributes.newExecutionRunId; - req.nextPageToken = undefined; - continue; - } - const { failure, retryState } = ev.workflowExecutionFailedEventAttributes; - throw new WorkflowFailedError( - 'Workflow execution failed', - await decodeOptionalFailureToOptionalError(this.dataConverter, failure), - decodeRetryState(retryState) - ); - } else if (ev.workflowExecutionCanceledEventAttributes) { - const failure = new CancelledFailure( - 'Workflow canceled', - await decodeArrayFromPayloads( - this.dataConverter, - ev.workflowExecutionCanceledEventAttributes.details?.payloads - ) - ); - failure.stack = ''; - throw new WorkflowFailedError('Workflow execution cancelled', failure, RetryState.NON_RETRYABLE_FAILURE); - } else if (ev.workflowExecutionTerminatedEventAttributes) { - const failure = new TerminatedFailure( - ev.workflowExecutionTerminatedEventAttributes.reason || 'Workflow execution terminated' - ); - failure.stack = ''; - throw new WorkflowFailedError( - ev.workflowExecutionTerminatedEventAttributes.reason || 'Workflow execution terminated', - failure, - RetryState.NON_RETRYABLE_FAILURE - ); - } else if (ev.workflowExecutionTimedOutEventAttributes) { - if (followRuns && ev.workflowExecutionTimedOutEventAttributes.newExecutionRunId) { - execution.runId = ev.workflowExecutionTimedOutEventAttributes.newExecutionRunId; - req.nextPageToken = undefined; - continue; - } - const failure = new TimeoutFailure('Workflow execution timed out', undefined, TimeoutType.START_TO_CLOSE); - failure.stack = ''; - throw new WorkflowFailedError( - 'Workflow execution timed out', - failure, - decodeRetryState(ev.workflowExecutionTimedOutEventAttributes.retryState) - ); - } else if (ev.workflowExecutionContinuedAsNewEventAttributes) { - const { newExecutionRunId } = ev.workflowExecutionContinuedAsNewEventAttributes; - if (!newExecutionRunId) { - throw new TypeError('Expected service to return newExecutionRunId for WorkflowExecutionContinuedAsNewEvent'); - } - if (!followRuns) { - throw new WorkflowContinuedAsNewError('Workflow execution continued as new', newExecutionRunId); - } - execution.runId = newExecutionRunId; - req.nextPageToken = undefined; - continue; - } - } - } - - protected rethrowUpdateGrpcError( - err: unknown, - fallbackMessage: string, - workflowExecution?: WorkflowExecution - ): never { - if (isGrpcServiceError(err)) { - if (err.code === grpcStatus.DEADLINE_EXCEEDED || err.code === grpcStatus.CANCELLED) { - throw new WorkflowUpdateRPCTimeoutOrCancelledError(err.details ?? 'Workflow update call timeout or cancelled', { - cause: err, - }); - } - } - - if (err instanceof CancelledFailure) { - throw new WorkflowUpdateRPCTimeoutOrCancelledError(err.message ?? 'Workflow update call timeout or cancelled', { - cause: err, - }); - } - - this.rethrowGrpcError(err, fallbackMessage, workflowExecution); - } - - protected rethrowGrpcError(err: unknown, fallbackMessage: string, workflowExecution?: WorkflowExecution): never { - if (isGrpcServiceError(err)) { - rethrowKnownErrorTypes(err); - - if (err.code === grpcStatus.NOT_FOUND) { - throw new WorkflowNotFoundError( - err.details ?? 'Workflow not found', - workflowExecution?.workflowId ?? '', - workflowExecution?.runId - ); - } - - throw new ServiceError(fallbackMessage, { cause: err }); - } - throw new ServiceError('Unexpected error while making gRPC request', { cause: err as Error }); - } - - /** - * Use given input to make a queryWorkflow call to the service - * - * Used as the final function of the query interceptor chain - */ - protected async _queryWorkflowHandler(input: WorkflowQueryInput): Promise { - const req: temporal.api.workflowservice.v1.IQueryWorkflowRequest = { - queryRejectCondition: input.queryRejectCondition, - namespace: this.options.namespace, - execution: input.workflowExecution, - query: { - queryType: input.queryType, - queryArgs: { payloads: await encodeToPayloads(this.dataConverter, ...input.args) }, - header: { fields: input.headers }, - }, - }; - let response: temporal.api.workflowservice.v1.QueryWorkflowResponse; - try { - response = await this.workflowService.queryWorkflow(req); - } catch (err) { - if (isGrpcServiceError(err)) { - rethrowKnownErrorTypes(err); - if (err.code === grpcStatus.INVALID_ARGUMENT) { - throw new QueryNotRegisteredError(err.message.replace(/^3 INVALID_ARGUMENT: /, ''), err.code); - } - } - this.rethrowGrpcError(err, 'Failed to query Workflow', input.workflowExecution); - } - if (response.queryRejected) { - if (response.queryRejected.status === undefined || response.queryRejected.status === null) { - throw new TypeError('Received queryRejected from server with no status'); - } - throw new QueryRejectedError(response.queryRejected.status); - } - if (!response.queryResult) { - throw new TypeError('Invalid response from server'); - } - // We ignore anything but the first result - return await decodeFromPayloadsAtIndex(this.dataConverter, 0, response.queryResult?.payloads); - } - - protected async _createUpdateWorkflowRequest( - lifecycleStage: temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage, - input: WorkflowStartUpdateInput - ): Promise { - const updateId = input.options?.updateId ?? uuid4(); - return { - namespace: this.options.namespace, - workflowExecution: input.workflowExecution, - firstExecutionRunId: input.firstExecutionRunId, - waitPolicy: { - lifecycleStage, - }, - request: { - meta: { - updateId, - identity: this.options.identity, - }, - input: { - header: { fields: input.headers }, - name: input.updateName, - args: { payloads: await encodeToPayloads(this.dataConverter, ...input.args) }, - }, - }, - }; - } - - /** - * Start the Update. - * - * Used as the final function of the interceptor chain during startUpdate and executeUpdate. - */ - protected async _startUpdateHandler( - waitForStage: WorkflowUpdateStage, - input: WorkflowStartUpdateInput - ): Promise { - let waitForStageProto: temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage = - encodeWorkflowUpdateStage(waitForStage) ?? - UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED; - - waitForStageProto = - waitForStageProto >= UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED - ? waitForStageProto - : UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED; - - const request = await this._createUpdateWorkflowRequest(waitForStageProto, input); - - // Repeatedly send UpdateWorkflowExecution until update is durable (if the server receives a request with - // an update ID that already exists, it responds with information for the existing update). If the - // requested wait stage is COMPLETED, further polling is done before returning the UpdateHandle. - let response: temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse; - try { - do { - response = await this.workflowService.updateWorkflowExecution(request); - } while ( - response.stage < UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED - ); - } catch (err) { - this.rethrowUpdateGrpcError(err, 'Workflow Update failed', input.workflowExecution); - } - return { - updateId: request.request!.meta!.updateId!, - - workflowRunId: response.updateRef!.workflowExecution!.runId!, - outcome: response.outcome ?? undefined, - }; - } - - /** - * Send the Update-With-Start MultiOperation request. - * - * Used as the final function of the interceptor chain during - * startUpdateWithStart and executeUpdateWithStart. - */ - protected async _updateWithStartHandler( - waitForStage: WorkflowUpdateStage, - onStart: (startResponse: temporal.api.workflowservice.v1.IStartWorkflowExecutionResponse) => void, - onStartError: (err: any) => void, - input: WorkflowStartUpdateWithStartInput - ): Promise { - const startInput: WorkflowStartInput = { - workflowType: input.workflowType, - options: input.workflowStartOptions, - headers: input.workflowStartHeaders, - }; - const updateInput: WorkflowStartUpdateInput = { - updateName: input.updateName, - args: input.updateArgs, - workflowExecution: { - workflowId: input.workflowStartOptions.workflowId, - }, - options: input.updateOptions, - headers: input.updateHeaders, - }; - let seenStart = false; - try { - const startRequest = await this.createStartWorkflowRequest(startInput); - const waitForStageProto = encodeWorkflowUpdateStage(waitForStage)!; - const updateRequest = await this._createUpdateWorkflowRequest(waitForStageProto, updateInput); - const multiOpReq: temporal.api.workflowservice.v1.IExecuteMultiOperationRequest = { - namespace: this.options.namespace, - operations: [ - { - startWorkflow: startRequest, - }, - { - updateWorkflow: updateRequest, - }, - ], - }; - - let multiOpResp: temporal.api.workflowservice.v1.IExecuteMultiOperationResponse; - let startResp: temporal.api.workflowservice.v1.IStartWorkflowExecutionResponse; - let updateResp: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionResponse; - let reachedStage: temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage; - // Repeatedly send ExecuteMultiOperation until update is durable (if the server receives a request with - // an update ID that already exists, it responds with information for the existing update). If the - // requested wait stage is COMPLETED, further polling is done before returning the UpdateHandle. - do { - multiOpResp = await this.workflowService.executeMultiOperation(multiOpReq); - startResp = multiOpResp.responses?.[0] - ?.startWorkflow as temporal.api.workflowservice.v1.IStartWorkflowExecutionResponse; - if (!seenStart) { - onStart(startResp); - seenStart = true; - } - updateResp = multiOpResp.responses?.[1] - ?.updateWorkflow as temporal.api.workflowservice.v1.IUpdateWorkflowExecutionResponse; - reachedStage = - updateResp.stage ?? - UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED; - } while (reachedStage < UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED); - return { - workflowExecution: { - workflowId: updateResp.updateRef!.workflowExecution!.workflowId!, - runId: updateResp.updateRef!.workflowExecution!.runId!, - }, - updateId: updateRequest.request!.meta!.updateId!, - updateOutcome: updateResp.outcome ?? undefined, - }; - } catch (thrownError) { - let err = thrownError; - if (isGrpcServiceError(err) && err.code === grpcStatus.ALREADY_EXISTS) { - err = new WorkflowExecutionAlreadyStartedError( - 'Workflow execution already started', - input.workflowStartOptions.workflowId, - input.workflowType - ); - } - if (!seenStart) { - onStartError(err); - } - if (isGrpcServiceError(err)) { - this.rethrowUpdateGrpcError(err, 'Update-With-Start failed', updateInput.workflowExecution); - } - throw err; - } - } - - protected createWorkflowUpdateHandle( - updateId: string, - workflowId: string, - workflowRunId?: string, - outcome?: temporal.api.update.v1.IOutcome - ): WorkflowUpdateHandle { - return { - updateId, - workflowId, - workflowRunId, - result: async () => { - const completedOutcome = - outcome ?? (await this._pollForUpdateOutcome(updateId, { workflowId, runId: workflowRunId })); - if (completedOutcome.failure) { - throw new WorkflowUpdateFailedError( - 'Workflow Update failed', - await decodeOptionalFailureToOptionalError(this.dataConverter, completedOutcome.failure) - ); - } else { - return await decodeFromPayloadsAtIndex(this.dataConverter, 0, completedOutcome.success?.payloads); - } - }, - }; - } - - /** - * Poll Update until a response with an outcome is received; return that outcome. - * This is used directly; no interceptor is available. - */ - protected async _pollForUpdateOutcome( - updateId: string, - workflowExecution: temporal.api.common.v1.IWorkflowExecution - ): Promise { - const req: temporal.api.workflowservice.v1.IPollWorkflowExecutionUpdateRequest = { - namespace: this.options.namespace, - updateRef: { workflowExecution, updateId }, - identity: this.options.identity, - waitPolicy: { - lifecycleStage: encodeWorkflowUpdateStage(WorkflowUpdateStage.COMPLETED), - }, - }; - for (;;) { - try { - const response = await this.workflowService.pollWorkflowExecutionUpdate(req); - if (response.outcome) { - return response.outcome; - } - } catch (err) { - const wE = typeof workflowExecution.workflowId === 'string' ? workflowExecution : undefined; - this.rethrowUpdateGrpcError(err, 'Workflow Update Poll failed', wE as WorkflowExecution); - } - } - } - - /** - * Use given input to make a signalWorkflowExecution call to the service - * - * Used as the final function of the signal interceptor chain - */ - protected async _signalWorkflowHandler(input: WorkflowSignalInput): Promise { - const req: temporal.api.workflowservice.v1.ISignalWorkflowExecutionRequest = { - identity: this.options.identity, - namespace: this.options.namespace, - workflowExecution: input.workflowExecution, - requestId: uuid4(), - // control is unused, - signalName: input.signalName, - header: { fields: input.headers }, - input: { payloads: await encodeToPayloads(this.dataConverter, ...input.args) }, - }; - try { - await this.workflowService.signalWorkflowExecution(req); - } catch (err) { - this.rethrowGrpcError(err, 'Failed to signal Workflow', input.workflowExecution); - } - } - - /** - * Use given input to make a signalWithStartWorkflowExecution call to the service - * - * Used as the final function of the signalWithStart interceptor chain - */ - protected async _signalWithStartWorkflowHandler(input: WorkflowSignalWithStartInput): Promise { - const { identity } = this.options; - const { options, workflowType, signalName, signalArgs, headers } = input; - const req: temporal.api.workflowservice.v1.ISignalWithStartWorkflowExecutionRequest = { - namespace: this.options.namespace, - identity, - requestId: uuid4(), - workflowId: options.workflowId, - workflowIdReusePolicy: encodeWorkflowIdReusePolicy(options.workflowIdReusePolicy), - workflowIdConflictPolicy: encodeWorkflowIdConflictPolicy(options.workflowIdConflictPolicy), - workflowType: { name: workflowType }, - input: { payloads: await encodeToPayloads(this.dataConverter, ...options.args) }, - signalName, - signalInput: { payloads: await encodeToPayloads(this.dataConverter, ...signalArgs) }, - taskQueue: { - kind: temporal.api.enums.v1.TaskQueueKind.TASK_QUEUE_KIND_NORMAL, - name: options.taskQueue, - }, - workflowExecutionTimeout: options.workflowExecutionTimeout, - workflowRunTimeout: options.workflowRunTimeout, - workflowTaskTimeout: options.workflowTaskTimeout, - workflowStartDelay: options.startDelay, - retryPolicy: options.retry ? compileRetryPolicy(options.retry) : undefined, - memo: options.memo ? { fields: await encodeMapToPayloads(this.dataConverter, options.memo) } : undefined, - searchAttributes: - options.searchAttributes || options.typedSearchAttributes // eslint-disable-line @typescript-eslint/no-deprecated - ? { - indexedFields: encodeUnifiedSearchAttributes(options.searchAttributes, options.typedSearchAttributes), // eslint-disable-line @typescript-eslint/no-deprecated - } - : undefined, - cronSchedule: options.cronSchedule, - header: { fields: headers }, - userMetadata: await encodeUserMetadata(this.dataConverter, options.staticSummary, options.staticDetails), - priority: options.priority ? compilePriority(options.priority) : undefined, - versioningOverride: options.versioningOverride ?? undefined, - }; - try { - return (await this.workflowService.signalWithStartWorkflowExecution(req)).runId; - } catch (err: any) { - if (err.code === grpcStatus.ALREADY_EXISTS) { - throw new WorkflowExecutionAlreadyStartedError( - 'Workflow execution already started', - options.workflowId, - workflowType - ); - } - this.rethrowGrpcError(err, 'Failed to signalWithStart Workflow', { workflowId: options.workflowId }); - } - } - - /** - * Use given input to make startWorkflowExecution call to the service - * - * Used as the final function of the start interceptor chain - */ - protected async _startWorkflowHandler(input: WorkflowStartInput): Promise { - const req = await this.createStartWorkflowRequest(input); - const { options: opts, workflowType } = input; - const internalOptions = (opts as InternalWorkflowStartOptions)[InternalWorkflowStartOptionsSymbol]; - try { - const response = await this.workflowService.startWorkflowExecution(req); - if (internalOptions != null) { - internalOptions.backLink = response.link ?? undefined; - } - return { - runId: response.runId, - eagerlyStarted: response.eagerWorkflowTask != null, - }; - } catch (err: any) { - if (err.code === grpcStatus.ALREADY_EXISTS) { - throw new WorkflowExecutionAlreadyStartedError( - 'Workflow execution already started', - opts.workflowId, - workflowType - ); - } - this.rethrowGrpcError(err, 'Failed to start Workflow', { workflowId: opts.workflowId }); - } - } - - protected async createStartWorkflowRequest(input: WorkflowStartInput): Promise { - const { options: opts, workflowType, headers } = input; - const { identity, namespace } = this.options; - const internalOptions = (opts as InternalWorkflowStartOptions)[InternalWorkflowStartOptionsSymbol]; - const supportsEagerStart = (this.connection as InternalConnectionLike)?.[InternalConnectionLikeSymbol] - ?.supportsEagerStart; - - if (opts.requestEagerStart && !supportsEagerStart) { - throw new Error( - 'Eager workflow start requires a NativeConnection shared between client and worker. ' + - 'Pass a NativeConnection via ClientOptions.connection, or disable requestEagerStart.' - ); - } - - return { - namespace, - identity, - requestId: internalOptions?.requestId ?? uuid4(), - workflowId: opts.workflowId, - workflowIdReusePolicy: encodeWorkflowIdReusePolicy(opts.workflowIdReusePolicy), - workflowIdConflictPolicy: encodeWorkflowIdConflictPolicy(opts.workflowIdConflictPolicy), - workflowType: { name: workflowType }, - input: { payloads: await encodeToPayloads(this.dataConverter, ...opts.args) }, - taskQueue: { - kind: temporal.api.enums.v1.TaskQueueKind.TASK_QUEUE_KIND_NORMAL, - name: opts.taskQueue, - }, - workflowExecutionTimeout: opts.workflowExecutionTimeout, - workflowRunTimeout: opts.workflowRunTimeout, - workflowTaskTimeout: opts.workflowTaskTimeout, - workflowStartDelay: opts.startDelay, - retryPolicy: opts.retry ? compileRetryPolicy(opts.retry) : undefined, - memo: opts.memo ? { fields: await encodeMapToPayloads(this.dataConverter, opts.memo) } : undefined, - searchAttributes: - opts.searchAttributes || opts.typedSearchAttributes // eslint-disable-line @typescript-eslint/no-deprecated - ? { - indexedFields: encodeUnifiedSearchAttributes(opts.searchAttributes, opts.typedSearchAttributes), // eslint-disable-line @typescript-eslint/no-deprecated - } - : undefined, - cronSchedule: opts.cronSchedule, - header: { fields: headers }, - userMetadata: await encodeUserMetadata(this.dataConverter, opts.staticSummary, opts.staticDetails), - priority: opts.priority ? compilePriority(opts.priority) : undefined, - versioningOverride: opts.versioningOverride ?? undefined, - requestEagerExecution: opts.requestEagerStart, - ...filterNullAndUndefined(internalOptions ?? {}), - }; - } - - /** - * Use given input to make terminateWorkflowExecution call to the service - * - * Used as the final function of the terminate interceptor chain - */ - protected async _terminateWorkflowHandler( - input: WorkflowTerminateInput - ): Promise { - const req: temporal.api.workflowservice.v1.ITerminateWorkflowExecutionRequest = { - namespace: this.options.namespace, - identity: this.options.identity, - ...input, - details: { - payloads: input.details ? await encodeToPayloads(this.dataConverter, ...input.details) : undefined, - }, - firstExecutionRunId: input.firstExecutionRunId, - }; - try { - return await this.workflowService.terminateWorkflowExecution(req); - } catch (err) { - this.rethrowGrpcError(err, 'Failed to terminate Workflow', input.workflowExecution); - } - } - - /** - * Uses given input to make requestCancelWorkflowExecution call to the service - * - * Used as the final function of the cancel interceptor chain - */ - protected async _cancelWorkflowHandler(input: WorkflowCancelInput): Promise { - try { - return await this.workflowService.requestCancelWorkflowExecution({ - namespace: this.options.namespace, - identity: this.options.identity, - requestId: uuid4(), - workflowExecution: input.workflowExecution, - firstExecutionRunId: input.firstExecutionRunId, - }); - } catch (err) { - this.rethrowGrpcError(err, 'Failed to cancel workflow', input.workflowExecution); - } - } - - /** - * Uses given input to make describeWorkflowExecution call to the service - * - * Used as the final function of the describe interceptor chain - */ - protected async _describeWorkflowHandler(input: WorkflowDescribeInput): Promise { - try { - return await this.workflowService.describeWorkflowExecution({ - namespace: this.options.namespace, - execution: input.workflowExecution, - }); - } catch (err) { - this.rethrowGrpcError(err, 'Failed to describe workflow', input.workflowExecution); - } - } - - /** - * Create a new workflow handle for new or existing Workflow execution - */ - protected _createWorkflowHandle({ - workflowId, - runId, - firstExecutionRunId, - interceptors, - runIdForResult, - ...resultOptions - }: WorkflowHandleOptions): WorkflowHandle { - const _startUpdate = async ( - def: UpdateDefinition | string, - waitForStage: WorkflowUpdateStage, - options?: WorkflowUpdateOptions & { args?: Args } - ): Promise> => { - const next = this._startUpdateHandler.bind(this, waitForStage); - const fn = composeInterceptors(interceptors, 'startUpdate', next); - const { args, ...opts } = options ?? {}; - const input = { - workflowExecution: { workflowId, runId }, - firstExecutionRunId, - updateName: typeof def === 'string' ? def : def.name, - args: args ?? [], - waitForStage, - headers: {}, - options: opts, - }; - const output = await fn(input); - const handle = this.createWorkflowUpdateHandle( - output.updateId, - input.workflowExecution.workflowId, - output.workflowRunId, - output.outcome - ); - if (!output.outcome && waitForStage === WorkflowUpdateStage.COMPLETED) { - await this._pollForUpdateOutcome(handle.updateId, input.workflowExecution); - } - return handle; - }; - - return { - client: this, - workflowId, - async result(): Promise> { - return this.client.result(workflowId, runIdForResult, resultOptions); - }, - async terminate(reason?: string) { - const next = this.client._terminateWorkflowHandler.bind(this.client); - const fn = composeInterceptors(interceptors, 'terminate', next); - return await fn({ - workflowExecution: { workflowId, runId }, - reason, - firstExecutionRunId, - }); - }, - async cancel() { - const next = this.client._cancelWorkflowHandler.bind(this.client); - const fn = composeInterceptors(interceptors, 'cancel', next); - return await fn({ - workflowExecution: { workflowId, runId }, - firstExecutionRunId, - }); - }, - async describe() { - const next = this.client._describeWorkflowHandler.bind(this.client); - const fn = composeInterceptors(interceptors, 'describe', next); - const raw = await fn({ - workflowExecution: { workflowId, runId }, - }); - const info = await executionInfoFromRaw(raw.workflowExecutionInfo ?? {}, this.client.dataConverter, raw); - const userMetadata = raw.executionConfig?.userMetadata; - return { - ...info, - staticDetails: async () => - (await decodeOptionalSinglePayload(this.client.dataConverter, userMetadata?.details)) ?? undefined, - staticSummary: async () => - (await decodeOptionalSinglePayload(this.client.dataConverter, userMetadata?.summary)) ?? undefined, - raw, - }; - }, - async fetchHistory() { - let nextPageToken: Uint8Array | undefined = undefined; - const events = Array(); - for (;;) { - const response: temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse = - await this.client.workflowService.getWorkflowExecutionHistory({ - nextPageToken, - namespace: this.client.options.namespace, - execution: { workflowId, runId }, - }); - events.push(...(response.history?.events ?? [])); - nextPageToken = response.nextPageToken; - if (nextPageToken == null || nextPageToken.length === 0) break; - } - return temporal.api.history.v1.History.create({ events }); - }, - async startUpdate( - def: UpdateDefinition | string, - options: WorkflowUpdateOptions & { - args?: Args; - waitForStage: typeof WorkflowUpdateStage.ACCEPTED; - } - ): Promise> { - return await _startUpdate(def, options.waitForStage, options); - }, - async executeUpdate( - def: UpdateDefinition | string, - options?: WorkflowUpdateOptions & { args?: Args } - ): Promise { - const handle = await _startUpdate(def, WorkflowUpdateStage.COMPLETED, options); - return await handle.result(); - }, - getUpdateHandle(updateId: string): WorkflowUpdateHandle { - return this.client.createWorkflowUpdateHandle(updateId, workflowId, runId); - }, - async signal(def: SignalDefinition | string, ...args: Args): Promise { - const next = this.client._signalWorkflowHandler.bind(this.client); - const fn = composeInterceptors(interceptors, 'signal', next); - await fn({ - workflowExecution: { workflowId, runId }, - signalName: typeof def === 'string' ? def : def.name, - args, - headers: {}, - }); - }, - async query(def: QueryDefinition | string, ...args: Args): Promise { - const next = this.client._queryWorkflowHandler.bind(this.client); - const fn = composeInterceptors(interceptors, 'query', next); - return fn({ - workflowExecution: { workflowId, runId }, - queryRejectCondition: encodeQueryRejectCondition(this.client.options.queryRejectCondition), - queryType: typeof def === 'string' ? def : def.name, - args, - headers: {}, - }) as Promise; - }, - }; - } - - /** - * Create a handle to an existing Workflow. - * - * - If only `workflowId` is passed, and there are multiple Workflow Executions with that ID, the handle will refer to - * the most recent one. - * - If `workflowId` and `runId` are passed, the handle will refer to the specific Workflow Execution with that Run - * ID. - * - If `workflowId` and {@link GetWorkflowHandleOptions.firstExecutionRunId} are passed, the handle will refer to the - * most recent Workflow Execution in the *Chain* that started with `firstExecutionRunId`. - * - * A *Chain* is a series of Workflow Executions that share the same Workflow ID and are connected by: - * - Being part of the same {@link https://docs.temporal.io/typescript/clients#scheduling-cron-workflows | Cron} - * - {@link https://docs.temporal.io/typescript/workflows#continueasnew | Continue As New} - * - {@link https://typescript.temporal.io/api/interfaces/client.workflowoptions/#retry | Retries} - * - * This method does not validate `workflowId`. If there is no Workflow Execution with the given `workflowId`, handle - * methods like `handle.describe()` will throw a {@link WorkflowNotFoundError} error. - */ - public getHandle( - workflowId: string, - runId?: string, - options?: GetWorkflowHandleOptions - ): WorkflowHandle { - const interceptors = this.getOrMakeInterceptors(workflowId, runId); - - return this._createWorkflowHandle({ - workflowId, - runId, - firstExecutionRunId: options?.firstExecutionRunId, - runIdForResult: runId ?? options?.firstExecutionRunId, - interceptors, - followRuns: options?.followRuns ?? true, - }); - } - - protected async *_list(options?: ListOptions): AsyncIterable { - let nextPageToken: Uint8Array = Buffer.alloc(0); - for (;;) { - let response: temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse; - try { - response = await this.workflowService.listWorkflowExecutions({ - namespace: this.options.namespace, - query: options?.query, - nextPageToken, - pageSize: options?.pageSize, - }); - } catch (e) { - this.rethrowGrpcError(e, 'Failed to list workflows', undefined); - } - // Not decoding memo payloads concurrently even though we could have to keep the lazy nature of this iterator. - // Decoding is done for `memo` fields which tend to be small. - // We might decide to change that based on user feedback. - for (const raw of response.executions) { - yield await executionInfoFromRaw(raw, this.dataConverter, raw); - } - nextPageToken = response.nextPageToken; - if (nextPageToken == null || nextPageToken.length === 0) break; - } - } - - /** - * Return a list of Workflow Executions matching the given `query`. - * - * Note that the list of Workflow Executions returned is approximate and eventually consistent. - * - * More info on the concept of "visibility" and the query syntax on the Temporal documentation site: - * https://docs.temporal.io/visibility - */ - public list(options?: ListOptions): AsyncWorkflowListIterable { - return { - [Symbol.asyncIterator]: () => this._list(options)[Symbol.asyncIterator](), - intoHistories: (intoHistoriesOptions?: IntoHistoriesOptions) => { - return mapAsyncIterable( - this._list(options), - async ({ workflowId, runId }) => ({ - workflowId, - history: await this.getHandle(workflowId, runId).fetchHistory(), - }), - { concurrency: intoHistoriesOptions?.concurrency ?? 5 } - ); - }, - }; - } - - /** - * Return the number of Workflow Executions matching the given `query`. If no `query` is provided, then return the - * total number of Workflow Executions for this namespace. - * - * Note that the number of Workflow Executions returned is approximate and eventually consistent. - * - * More info on the concept of "visibility" and the query syntax on the Temporal documentation site: - * https://docs.temporal.io/visibility - */ - public async count(query?: string): Promise { - let response: temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse; - try { - response = await this.workflowService.countWorkflowExecutions({ - namespace: this.options.namespace, - query, - }); - } catch (e) { - this.rethrowGrpcError(e, 'Failed to count workflows'); - } - - return decodeCountWorkflowExecutionsResponse(response); - } - - protected getOrMakeInterceptors(workflowId: string, runId?: string): WorkflowClientInterceptor[] { - if (typeof this.options.interceptors === 'object' && 'calls' in this.options.interceptors) { - // eslint-disable-next-line @typescript-eslint/no-deprecated - const factories = (this.options.interceptors as WorkflowClientInterceptors).calls ?? []; - return factories.map((ctor) => ctor({ workflowId, runId })); - } - return Array.isArray(this.options.interceptors) ? (this.options.interceptors as WorkflowClientInterceptor[]) : []; - } -} - -@SymbolBasedInstanceOfError('QueryRejectedError') -export class QueryRejectedError extends Error { - constructor(public readonly status: temporal.api.enums.v1.WorkflowExecutionStatus) { - super('Query rejected'); - } -} - -@SymbolBasedInstanceOfError('QueryNotRegisteredError') -export class QueryNotRegisteredError extends Error { - constructor( - message: string, - public readonly code: grpcStatus - ) { - super(message); - } -} diff --git a/node_modules/@temporalio/client/src/workflow-options.ts b/node_modules/@temporalio/client/src/workflow-options.ts deleted file mode 100644 index 4bc7bc3..0000000 --- a/node_modules/@temporalio/client/src/workflow-options.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { - CommonWorkflowOptions, - SignalDefinition, - WithWorkflowArgs, - Workflow, - VersioningOverride, - toCanonicalString, -} from '@temporalio/common'; -import { Duration, msOptionalToTs } from '@temporalio/common/lib/time'; -import { Replace } from '@temporalio/common/lib/type-helpers'; -import { google, temporal } from '@temporalio/proto'; - -export * from '@temporalio/common/lib/workflow-options'; - -export interface CompiledWorkflowOptions extends WithCompiledWorkflowOptions { - args: unknown[]; -} - -export interface WorkflowOptions extends CommonWorkflowOptions { - /** - * Workflow id to use when starting. - * - * Assign a meaningful business id. - * This ID can be used to ensure starting Workflows is idempotent. - * Workflow IDs are unique: see {@link WorkflowOptions.workflowIdReusePolicy} - * and {@link WorkflowOptions.workflowIdConflictPolicy}. - */ - workflowId: string; - - /** - * Task queue to use for Workflow tasks. It should match a task queue specified when creating a - * `Worker` that hosts the Workflow code. - */ - taskQueue: string; - - /** - * If set to true, instructs the client to follow the chain of execution before returning a Workflow's result. - * - * Workflow execution is chained if the Workflow has a cron schedule or continues-as-new or configured to retry - * after failure or timeout. - * - * @default true - */ - followRuns?: boolean; - - /** - * Amount of time to wait before starting the workflow. - */ - startDelay?: Duration; - - /** - * Override the versioning behavior of the Workflow that is about to be started. - */ - versioningOverride?: VersioningOverride; - - /** - * Potentially reduce the latency to start this workflow by requesting that the server - * start it on a local worker running with this same client. - */ - requestEagerStart?: boolean; -} - -export type WithCompiledWorkflowOptions = Replace< - T, - { - workflowExecutionTimeout?: google.protobuf.IDuration; - workflowRunTimeout?: google.protobuf.IDuration; - workflowTaskTimeout?: google.protobuf.IDuration; - startDelay?: google.protobuf.IDuration; - versioningOverride?: temporal.api.workflow.v1.IVersioningOverride; - } ->; - -export function compileWorkflowOptions(options: T): WithCompiledWorkflowOptions { - const { workflowExecutionTimeout, workflowRunTimeout, workflowTaskTimeout, startDelay, versioningOverride, ...rest } = - options; - - return { - ...rest, - workflowExecutionTimeout: msOptionalToTs(workflowExecutionTimeout), - workflowRunTimeout: msOptionalToTs(workflowRunTimeout), - workflowTaskTimeout: msOptionalToTs(workflowTaskTimeout), - startDelay: msOptionalToTs(startDelay), - versioningOverride: versioningOverrideToProto(versioningOverride), - }; -} - -export interface WorkflowUpdateOptions { - /** - * The Update Id, which is a unique-per-Workflow-Execution identifier for this Update. - * - * We recommend setting it to a meaningful business ID or idempotency key (like a request ID) passed from upstream. If - * it is not provided, it will be set to a random string by the Client. If the Server receives two Updates with the - * same Update Id to a Workflow Execution with the same Run Id, the second Update will return a handle to the first - * Update. - */ - readonly updateId?: string; -} - -export type WorkflowSignalWithStartOptions = SignalArgs extends [any, ...any[]] - ? WorkflowSignalWithStartOptionsWithArgs - : WorkflowSignalWithStartOptionsWithoutArgs; - -export interface WorkflowSignalWithStartOptionsWithoutArgs - extends Omit { - /** - * SignalDefinition or name of signal - */ - signal: SignalDefinition | string; - - /** - * Arguments to invoke the signal handler with - */ - signalArgs?: SignalArgs; -} - -export interface WorkflowSignalWithStartOptionsWithArgs - extends Omit { - /** - * SignalDefinition or name of signal - */ - signal: SignalDefinition | string; - - /** - * Arguments to invoke the signal handler with - */ - signalArgs: SignalArgs; -} - -/** - * Options for starting a Workflow - */ -export type WorkflowStartOptions = WithWorkflowArgs; - -function versioningOverrideToProto( - vo: VersioningOverride | undefined -): temporal.api.workflow.v1.IVersioningOverride | undefined { - if (!vo) return undefined; - - // TODO: Remove deprecated field assignments when versioning is non-experimental - if (vo === 'AUTO_UPGRADE') { - return { - autoUpgrade: true, - behavior: temporal.api.enums.v1.VersioningBehavior.VERSIONING_BEHAVIOR_AUTO_UPGRADE, - }; - } - - return { - pinned: { - version: vo.pinnedTo, - behavior: temporal.api.workflow.v1.VersioningOverride.PinnedOverrideBehavior.PINNED_OVERRIDE_BEHAVIOR_PINNED, - }, - behavior: temporal.api.enums.v1.VersioningBehavior.VERSIONING_BEHAVIOR_PINNED, - pinnedVersion: toCanonicalString(vo.pinnedTo), - }; -} diff --git a/node_modules/@temporalio/client/src/workflow-update-stage.ts b/node_modules/@temporalio/client/src/workflow-update-stage.ts deleted file mode 100644 index c6c23f9..0000000 --- a/node_modules/@temporalio/client/src/workflow-update-stage.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { temporal } from '@temporalio/proto'; -import { makeProtoEnumConverters } from '@temporalio/common/lib/internal-workflow'; - -export const WorkflowUpdateStage = { - /** Admitted stage. This stage is reached when the server accepts the update request. It is not - * allowed to wait for this stage when using startUpdate, since the update request has not yet - * been durably persisted at this stage. */ - ADMITTED: 'ADMITTED', - - /** Accepted stage. This stage is reached when a workflow has received the update and either - * accepted it (i.e. it has passed validation, or there was no validator configured on the update - * handler) or rejected it. This is currently the only allowed value when using startUpdate. */ - ACCEPTED: 'ACCEPTED', - - /** Completed stage. This stage is reached when a workflow has completed processing the - * update with either a success or failure. */ - COMPLETED: 'COMPLETED', - - /** - * This is not an allowed value. - * @deprecated - */ - UNSPECIFIED: undefined, -} as const; -export type WorkflowUpdateStage = (typeof WorkflowUpdateStage)[keyof typeof WorkflowUpdateStage]; - -export const [encodeWorkflowUpdateStage] = makeProtoEnumConverters< - temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage, - typeof temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage, - keyof typeof temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage, - typeof WorkflowUpdateStage, - 'UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_' ->( - { - [WorkflowUpdateStage.ADMITTED]: 1, - [WorkflowUpdateStage.ACCEPTED]: 2, - [WorkflowUpdateStage.COMPLETED]: 3, - UNSPECIFIED: 0, - } as const, - 'UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_' -); diff --git a/node_modules/@temporalio/common/LICENSE b/node_modules/@temporalio/common/LICENSE deleted file mode 100644 index 7c6bbca..0000000 --- a/node_modules/@temporalio/common/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2021-2025 Temporal Technologies Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@temporalio/common/README.md b/node_modules/@temporalio/common/README.md deleted file mode 100644 index 87afb9a..0000000 --- a/node_modules/@temporalio/common/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# `@temporalio/common` - -[![NPM](https://img.shields.io/npm/v/@temporalio/common?style=for-the-badge)](https://www.npmjs.com/package/@temporalio/common) - -Part of [Temporal](https://temporal.io)'s TypeScript SDK (see [docs](https://docs.temporal.io/typescript/introduction/) and [samples](https://github.com/temporalio/samples-typescript)). - -Common library for code that's used across the Client, Worker, and/or Workflow: - -- [DataConverter docs](https://docs.temporal.io/typescript/data-converters) -- [Failure docs](https://docs.temporal.io/typescript/handling-failure) -- [API reference](https://typescript.temporal.io/api/namespaces/common) diff --git a/node_modules/@temporalio/common/lib/activity-cancellation-details.d.ts b/node_modules/@temporalio/common/lib/activity-cancellation-details.d.ts deleted file mode 100644 index 3d9b539..0000000 --- a/node_modules/@temporalio/common/lib/activity-cancellation-details.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { coresdk } from '@temporalio/proto'; -export interface ActivityCancellationDetailsHolder { - details?: ActivityCancellationDetails; -} -export interface ActivityCancellationDetailsOptions { - notFound?: boolean; - cancelRequested?: boolean; - paused?: boolean; - timedOut?: boolean; - workerShutdown?: boolean; - reset?: boolean; -} -/** - * Provides the reasons for the activity's cancellation. Cancellation details are set once and do not change once set. - */ -export declare class ActivityCancellationDetails { - readonly notFound: boolean; - readonly cancelRequested: boolean; - readonly paused: boolean; - readonly timedOut: boolean; - readonly workerShutdown: boolean; - readonly reset: boolean; - constructor(options?: ActivityCancellationDetailsOptions); - static fromProto(proto: coresdk.activity_task.IActivityCancellationDetails | null | undefined): ActivityCancellationDetails; -} diff --git a/node_modules/@temporalio/common/lib/activity-cancellation-details.js b/node_modules/@temporalio/common/lib/activity-cancellation-details.js deleted file mode 100644 index cc722f8..0000000 --- a/node_modules/@temporalio/common/lib/activity-cancellation-details.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ActivityCancellationDetails = void 0; -/** - * Provides the reasons for the activity's cancellation. Cancellation details are set once and do not change once set. - */ -class ActivityCancellationDetails { - notFound; - cancelRequested; - paused; - timedOut; - workerShutdown; - reset; - constructor(options = {}) { - this.notFound = options.notFound ?? false; - this.cancelRequested = options.cancelRequested ?? false; - this.paused = options.paused ?? false; - this.timedOut = options.timedOut ?? false; - this.workerShutdown = options.workerShutdown ?? false; - this.reset = options.reset ?? false; - } - static fromProto(proto) { - if (proto == null) { - return new ActivityCancellationDetails(); - } - return new ActivityCancellationDetails({ - notFound: proto.isNotFound ?? false, - cancelRequested: proto.isCancelled ?? false, - paused: proto.isPaused ?? false, - timedOut: proto.isTimedOut ?? false, - workerShutdown: proto.isWorkerShutdown ?? false, - reset: proto.isReset ?? false, - }); - } -} -exports.ActivityCancellationDetails = ActivityCancellationDetails; -//# sourceMappingURL=activity-cancellation-details.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/activity-cancellation-details.js.map b/node_modules/@temporalio/common/lib/activity-cancellation-details.js.map deleted file mode 100644 index 4d7b578..0000000 --- a/node_modules/@temporalio/common/lib/activity-cancellation-details.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"activity-cancellation-details.js","sourceRoot":"","sources":["../src/activity-cancellation-details.ts"],"names":[],"mappings":";;;AAgBA;;GAEG;AACH,MAAa,2BAA2B;IAC7B,QAAQ,CAAU;IAClB,eAAe,CAAU;IACzB,MAAM,CAAU;IAChB,QAAQ,CAAU;IAClB,cAAc,CAAU;IACxB,KAAK,CAAU;IAExB,YAAmB,UAA8C,EAAE;QACjE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,KAAK,CAAC;QAC1C,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,IAAI,KAAK,CAAC;QACxD,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,KAAK,CAAC;QAC1C,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,KAAK,CAAC;QACtD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,SAAS,CACd,KAA4E;QAE5E,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAClB,OAAO,IAAI,2BAA2B,EAAE,CAAC;QAC3C,CAAC;QACD,OAAO,IAAI,2BAA2B,CAAC;YACrC,QAAQ,EAAE,KAAK,CAAC,UAAU,IAAI,KAAK;YACnC,eAAe,EAAE,KAAK,CAAC,WAAW,IAAI,KAAK;YAC3C,MAAM,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK;YAC/B,QAAQ,EAAE,KAAK,CAAC,UAAU,IAAI,KAAK;YACnC,cAAc,EAAE,KAAK,CAAC,gBAAgB,IAAI,KAAK;YAC/C,KAAK,EAAE,KAAK,CAAC,OAAO,IAAI,KAAK;SAC9B,CAAC,CAAC;IACL,CAAC;CACF;AAhCD,kEAgCC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/activity-options.d.ts b/node_modules/@temporalio/common/lib/activity-options.d.ts deleted file mode 100644 index f42fbec..0000000 --- a/node_modules/@temporalio/common/lib/activity-options.d.ts +++ /dev/null @@ -1,228 +0,0 @@ -import type { coresdk } from '@temporalio/proto'; -import { RetryPolicy } from './retry-policy'; -import { Duration } from './time'; -import { VersioningIntent } from './versioning-intent'; -import { Priority } from './priority'; -/** - * Determines: - * - whether cancellation requests should be propagated from the current Workflow to the Activity; and - * - when should the Activity cancellation be reported to Workflow (i.e. at which moment should the - * Activity call's promise fail with an `ActivityFailure`, with `cause` set to a `CancelledFailure`). - * - * Note that this setting only applies to cancellation originating from cancellation being - * externally requested on the Workflow itself, or from internal cancellation of the - * `CancellationScope` in which the Activity call was made. Termination of a Workflow Execution - * always results in cancellation of its outstanding Activity executions, regardless of those - * Activities' {@link ActivityCancellationType} settings. - * - * @default ActivityCancellationType.WAIT_CANCELLATION_COMPLETED - */ -export declare const ActivityCancellationType: { - /** - * Do not propagate cancellation requests to the Activity, and immediately report cancellation - * to the caller. - */ - readonly ABANDON: "ABANDON"; - /** - * Propagate cancellation request from the Workflow to the Activity, yet _immediately_ report - * cancellation to the caller, i.e. without waiting for the server to confirm the cancellation - * request. - * - * Note that this cancellation type provides no guarantee, from the Workflow-side, that the - * cancellation request will actually be delivered to the Activity; e.g. the calling Workflow - * may exit before the delivery is completed, or the Activity may complete (either successfully - * or uncessfully) before the cancellation is delivered, resulting in a situation where the - * workflow thinks the activity was cancelled, but the activity actually completed successfully. - * - * To ensure that the Workflow is properly informed of the Activity's final state (i.e. either - * completion or cancellation), use {@link WAIT_CANCELLATION_COMPLETED}. - */ - readonly TRY_CANCEL: "TRY_CANCEL"; - /** - * Propagate cancellation request from the Workflow to the Activity, and wait for the activity - * to complete its execution (either successfully, uncessfully, or as cancelled). - * - * Note that the Activity must heartbeat to receive a cancellation notification. This can block - * the Workflow's cancellation for a long time if the Activity doesn't heartbeat or chooses to - * ignore the cancellation request. - */ - readonly WAIT_CANCELLATION_COMPLETED: "WAIT_CANCELLATION_COMPLETED"; -}; -export type ActivityCancellationType = (typeof ActivityCancellationType)[keyof typeof ActivityCancellationType]; -export declare const encodeActivityCancellationType: (input: coresdk.workflow_commands.ActivityCancellationType | import("./type-helpers").RemovePrefix<"", "ABANDON" | "TRY_CANCEL" | "WAIT_CANCELLATION_COMPLETED"> | null | undefined) => coresdk.workflow_commands.ActivityCancellationType | undefined, decodeActivityCancellationType: (input: coresdk.workflow_commands.ActivityCancellationType | null | undefined) => import("./type-helpers").RemovePrefix<"", "ABANDON" | "TRY_CANCEL" | "WAIT_CANCELLATION_COMPLETED"> | undefined; -/** - * Options for remote activity invocation - */ -export interface ActivityOptions { - /** - * Identifier to use for tracking the activity in Workflow history. - * The `activityId` can be accessed by the activity function. - * Does not need to be unique. - * - * @default an incremental sequence number - */ - activityId?: string; - /** - * Task queue name. - * - * @default current worker task queue - */ - taskQueue?: string; - /** - * Heartbeat interval. Activity must heartbeat before this interval passes after a last heartbeat or activity start. - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - heartbeatTimeout?: Duration; - /** - * RetryPolicy that define how activity is retried in case of failure. If this is not set, then the server-defined default activity retry policy will be used. To ensure zero retries, set maximum attempts to 1. - */ - retry?: RetryPolicy; - /** - * Maximum time of a single Activity execution attempt. Note that the Temporal Server doesn't detect Worker process - * failures directly: instead, it relies on this timeout to detect that an Activity didn't complete on time. Therefore, this - * timeout should be as short as the longest possible execution of the Activity body. Potentially long-running - * Activities must specify {@link heartbeatTimeout} and call {@link activity.Context.heartbeat} periodically for - * timely failure detection. - * - * Either this option or {@link scheduleToCloseTimeout} is required. - * - * @default `scheduleToCloseTimeout` or unlimited - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - startToCloseTimeout?: Duration; - /** - * Time that the Activity Task can stay in the Task Queue before it is picked up by a Worker. Do not specify this timeout unless using host-specific Task Queues for Activity Tasks are being used for routing. - * `scheduleToStartTimeout` is always non-retryable. Retrying after this timeout doesn't make sense as it would just put the Activity Task back into the same Task Queue. - * - * @default `scheduleToCloseTimeout` or unlimited - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - scheduleToStartTimeout?: Duration; - /** - * Total time that a workflow is willing to wait for the Activity to complete. - * `scheduleToCloseTimeout` limits the total time of an Activity's execution including retries (use {@link startToCloseTimeout} to limit the time of a single attempt). - * - * Either this option or {@link startToCloseTimeout} is required. - * - * @default unlimited - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - scheduleToCloseTimeout?: Duration; - /** - * Determines: - * - whether cancellation requests should be propagated from the current Workflow to the Activity; and - * - when should the Activity cancellation be reported to Workflow (i.e. at which moment should the - * Activity call's promise fail with an `ActivityFailure`, with `cause` set to a `CancelledFailure`). - * - * Note that this setting only applies to cancellation originating from cancellation being - * externally requested on the Workflow itself, or from internal cancellation of the - * `CancellationScope` in which the Activity call was made. Termination of a Workflow Execution - * always results in cancellation of its outstanding Activity executions, regardless of those - * Activities' {@link ActivityCancellationType} settings. - * - * @default ActivityCancellationType.WAIT_CANCELLATION_COMPLETED - */ - cancellationType?: ActivityCancellationType; - /** - * Eager dispatch is an optimization that improves the throughput and load on the server for scheduling Activities. - * When used, the server will hand out Activity tasks back to the Worker when it completes a Workflow task. - * It is available from server version 1.17 behind the `system.enableActivityEagerExecution` feature flag. - * - * Eager dispatch will only be used if `allowEagerDispatch` is enabled (the default) and {@link taskQueue} is either - * omitted or the same as the current Workflow. - * - * @default true - */ - allowEagerDispatch?: boolean; - /** - * When using the Worker Versioning feature, specifies whether this Activity should run on a - * worker with a compatible Build Id or not. See {@link VersioningIntent}. - * - * @default 'COMPATIBLE' - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ - versioningIntent?: VersioningIntent; - /** - * A fixed, single-line summary for this workflow execution that may appear in the UI/CLI. - * This can be in single-line Temporal markdown format. - * - * @experimental User metadata is a new API and susceptible to change. - */ - summary?: string; - /** - * Priority of this activity - */ - priority?: Priority; -} -/** - * Options for local activity invocation - */ -export interface LocalActivityOptions { - /** - * RetryPolicy that defines how an activity is retried in case of failure. If this is not set, then the SDK-defined default activity retry policy will be used. - * Note that local activities are always executed at least once, even if maximum attempts is set to 1 due to Workflow task retries. - */ - retry?: RetryPolicy; - /** - * Maximum time the local activity is allowed to execute after the task is dispatched. This - * timeout is always retryable. - * - * Either this option or {@link scheduleToCloseTimeout} is required. - * If set, this must be <= {@link scheduleToCloseTimeout}, otherwise, it will be clamped down. - * - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - startToCloseTimeout?: Duration; - /** - * Limits time the local activity can idle internally before being executed. That can happen if - * the worker is currently at max concurrent local activity executions. This timeout is always - * non retryable as all a retry would achieve is to put it back into the same queue. Defaults - * to {@link scheduleToCloseTimeout} if not specified and that is set. Must be <= - * {@link scheduleToCloseTimeout} when set, otherwise, it will be clamped down. - * - * @default unlimited - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - scheduleToStartTimeout?: Duration; - /** - * Indicates how long the caller is willing to wait for local activity completion. Limits how - * long retries will be attempted. - * - * Either this option or {@link startToCloseTimeout} is required. - * - * @default unlimited - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - scheduleToCloseTimeout?: Duration; - /** - * If the activity is retrying and backoff would exceed this value, a server side timer will be scheduled for the next attempt. - * Otherwise, backoff will happen internally in the SDK. - * - * @default 1 minute - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - **/ - localRetryThreshold?: Duration; - /** - * Determines: - * - whether cancellation requests should be propagated from the current Workflow to the Activity; and - * - when should the Activity cancellation be reported to Workflow (i.e. at which moment should the - * Activity call's promise fail with an `ActivityFailure`, with `cause` set to a `CancelledFailure`). - * - * Note that this setting only applies to cancellation originating from cancellation being - * externally requested on the Workflow itself, or from internal cancellation of the - * `CancellationScope` in which the Activity call was made. Termination of a Workflow Execution - * always results in cancellation of its outstanding Activity executions, regardless of those - * Activities' {@link ActivityCancellationType} settings. - * - * @default ActivityCancellationType.WAIT_CANCELLATION_COMPLETED - */ - cancellationType?: ActivityCancellationType; - /** - * A fixed, single-line summary for this workflow execution that may appear in the UI/CLI. - * This can be in single-line Temporal markdown format. - * - * @experimental User metadata is a new API and susceptible to change. - */ - summary?: string; -} diff --git a/node_modules/@temporalio/common/lib/activity-options.js b/node_modules/@temporalio/common/lib/activity-options.js deleted file mode 100644 index 9c66716..0000000 --- a/node_modules/@temporalio/common/lib/activity-options.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeActivityCancellationType = exports.encodeActivityCancellationType = exports.ActivityCancellationType = void 0; -const internal_workflow_1 = require("./internal-workflow"); -// Note: The types defined in this file are here for legacy reasons. They should have been defined -// in the 'workflow' package, instead of 'common'. They are now reexported from the 'workflow' -// package, which is the preferred way to import them, but we unfortunately can't remove them from -// here as that would be a breaking change. -/** - * Determines: - * - whether cancellation requests should be propagated from the current Workflow to the Activity; and - * - when should the Activity cancellation be reported to Workflow (i.e. at which moment should the - * Activity call's promise fail with an `ActivityFailure`, with `cause` set to a `CancelledFailure`). - * - * Note that this setting only applies to cancellation originating from cancellation being - * externally requested on the Workflow itself, or from internal cancellation of the - * `CancellationScope` in which the Activity call was made. Termination of a Workflow Execution - * always results in cancellation of its outstanding Activity executions, regardless of those - * Activities' {@link ActivityCancellationType} settings. - * - * @default ActivityCancellationType.WAIT_CANCELLATION_COMPLETED - */ -// MAINTENANCE: Keep this typedoc in sync with the `ActivityOptions.cancellationType` and -// `LocalActivityOptions.cancellationType` fields later in this file. -exports.ActivityCancellationType = { - /** - * Do not propagate cancellation requests to the Activity, and immediately report cancellation - * to the caller. - */ - ABANDON: 'ABANDON', - /** - * Propagate cancellation request from the Workflow to the Activity, yet _immediately_ report - * cancellation to the caller, i.e. without waiting for the server to confirm the cancellation - * request. - * - * Note that this cancellation type provides no guarantee, from the Workflow-side, that the - * cancellation request will actually be delivered to the Activity; e.g. the calling Workflow - * may exit before the delivery is completed, or the Activity may complete (either successfully - * or uncessfully) before the cancellation is delivered, resulting in a situation where the - * workflow thinks the activity was cancelled, but the activity actually completed successfully. - * - * To ensure that the Workflow is properly informed of the Activity's final state (i.e. either - * completion or cancellation), use {@link WAIT_CANCELLATION_COMPLETED}. - */ - TRY_CANCEL: 'TRY_CANCEL', - /** - * Propagate cancellation request from the Workflow to the Activity, and wait for the activity - * to complete its execution (either successfully, uncessfully, or as cancelled). - * - * Note that the Activity must heartbeat to receive a cancellation notification. This can block - * the Workflow's cancellation for a long time if the Activity doesn't heartbeat or chooses to - * ignore the cancellation request. - */ - WAIT_CANCELLATION_COMPLETED: 'WAIT_CANCELLATION_COMPLETED', -}; -_a = (0, internal_workflow_1.makeProtoEnumConverters)({ - [exports.ActivityCancellationType.TRY_CANCEL]: 0, - [exports.ActivityCancellationType.WAIT_CANCELLATION_COMPLETED]: 1, - [exports.ActivityCancellationType.ABANDON]: 2, -}, ''), exports.encodeActivityCancellationType = _a[0], exports.decodeActivityCancellationType = _a[1]; -//# sourceMappingURL=activity-options.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/activity-options.js.map b/node_modules/@temporalio/common/lib/activity-options.js.map deleted file mode 100644 index 7588e91..0000000 --- a/node_modules/@temporalio/common/lib/activity-options.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"activity-options.js","sourceRoot":"","sources":["../src/activity-options.ts"],"names":[],"mappings":";;;;AAIA,2DAA8D;AAG9D,kGAAkG;AAClG,8FAA8F;AAC9F,kGAAkG;AAClG,2CAA2C;AAE3C;;;;;;;;;;;;;GAaG;AACH,yFAAyF;AACzF,kFAAkF;AACrE,QAAA,wBAAwB,GAAG;IACtC;;;OAGG;IACH,OAAO,EAAE,SAAS;IAElB;;;;;;;;;;;;;OAaG;IACH,UAAU,EAAE,YAAY;IAExB;;;;;;;OAOG;IACH,2BAA2B,EAAE,6BAA6B;CAClD,CAAC;AAGE,KAAmE,IAAA,2CAAuB,EAOrG;IACE,CAAC,gCAAwB,CAAC,UAAU,CAAC,EAAE,CAAC;IACxC,CAAC,gCAAwB,CAAC,2BAA2B,CAAC,EAAE,CAAC;IACzD,CAAC,gCAAwB,CAAC,OAAO,CAAC,EAAE,CAAC;CAC7B,EACV,EAAE,CACH,EAba,sCAA8B,UAAE,sCAA8B,SAa1E"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/continue-as-new.d.ts b/node_modules/@temporalio/common/lib/continue-as-new.d.ts deleted file mode 100644 index dd16627..0000000 --- a/node_modules/@temporalio/common/lib/continue-as-new.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { temporal } from '@temporalio/proto'; -/** - * Reason(s) why continue as new is suggested. Can potentially be multiple reasons. - * - * @experimental May be removed or changed in the future. - */ -export declare const SuggestContinueAsNewReason: { - readonly HISTORY_SIZE_TOO_LARGE: "HISTORY_SIZE_TOO_LARGE"; - readonly TOO_MANY_HISTORY_EVENTS: "TOO_MANY_HISTORY_EVENTS"; - readonly TOO_MANY_UPDATES: "TOO_MANY_UPDATES"; -}; -export type SuggestContinueAsNewReason = (typeof SuggestContinueAsNewReason)[keyof typeof SuggestContinueAsNewReason]; -export declare const encodeSuggestContinueAsNewReason: (input: "HISTORY_SIZE_TOO_LARGE" | "TOO_MANY_HISTORY_EVENTS" | "TOO_MANY_UPDATES" | temporal.api.enums.v1.SuggestContinueAsNewReason | "SUGGEST_CONTINUE_AS_NEW_REASON_HISTORY_SIZE_TOO_LARGE" | "SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_HISTORY_EVENTS" | "SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_UPDATES" | null | undefined) => temporal.api.enums.v1.SuggestContinueAsNewReason | undefined, decodeSuggestContinueAsNewReason: (input: temporal.api.enums.v1.SuggestContinueAsNewReason | null | undefined) => "HISTORY_SIZE_TOO_LARGE" | "TOO_MANY_HISTORY_EVENTS" | "TOO_MANY_UPDATES" | undefined; -export declare function suggestContinueAsNewReasonsFromProto(reasons: temporal.api.enums.v1.SuggestContinueAsNewReason[] | null | undefined): SuggestContinueAsNewReason[] | undefined; diff --git a/node_modules/@temporalio/common/lib/continue-as-new.js b/node_modules/@temporalio/common/lib/continue-as-new.js deleted file mode 100644 index e4c55b9..0000000 --- a/node_modules/@temporalio/common/lib/continue-as-new.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeSuggestContinueAsNewReason = exports.encodeSuggestContinueAsNewReason = exports.SuggestContinueAsNewReason = void 0; -exports.suggestContinueAsNewReasonsFromProto = suggestContinueAsNewReasonsFromProto; -const internal_workflow_1 = require("./internal-workflow"); -/** - * Reason(s) why continue as new is suggested. Can potentially be multiple reasons. - * - * @experimental May be removed or changed in the future. - */ -exports.SuggestContinueAsNewReason = { - HISTORY_SIZE_TOO_LARGE: 'HISTORY_SIZE_TOO_LARGE', - TOO_MANY_HISTORY_EVENTS: 'TOO_MANY_HISTORY_EVENTS', - TOO_MANY_UPDATES: 'TOO_MANY_UPDATES', -}; -// ts-prune-ignore-next -_a = (0, internal_workflow_1.makeProtoEnumConverters)({ - [exports.SuggestContinueAsNewReason.HISTORY_SIZE_TOO_LARGE]: 1, - [exports.SuggestContinueAsNewReason.TOO_MANY_HISTORY_EVENTS]: 2, - [exports.SuggestContinueAsNewReason.TOO_MANY_UPDATES]: 3, - UNSPECIFIED: 0, -}, 'SUGGEST_CONTINUE_AS_NEW_REASON_'), exports.encodeSuggestContinueAsNewReason = _a[0], exports.decodeSuggestContinueAsNewReason = _a[1]; -// ts-prune-ignore-next -function suggestContinueAsNewReasonsFromProto(reasons) { - if (reasons == null) { - return undefined; - } - const res = []; - for (const r of reasons) { - const decoded = (0, exports.decodeSuggestContinueAsNewReason)(r); - if (decoded !== undefined) { - res.push(decoded); - } - } - if (res.length === 0) { - return undefined; - } - return res; -} -//# sourceMappingURL=continue-as-new.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/continue-as-new.js.map b/node_modules/@temporalio/common/lib/continue-as-new.js.map deleted file mode 100644 index 75bed03..0000000 --- a/node_modules/@temporalio/common/lib/continue-as-new.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"continue-as-new.js","sourceRoot":"","sources":["../src/continue-as-new.ts"],"names":[],"mappings":";;;;AAiCA,oFAkBC;AAlDD,2DAA8D;AAE9D;;;;GAIG;AACU,QAAA,0BAA0B,GAAG;IACxC,sBAAsB,EAAE,wBAAwB;IAChD,uBAAuB,EAAE,yBAAyB;IAClD,gBAAgB,EAAE,kBAAkB;CAC5B,CAAC;AAGX,uBAAuB;AACV,KAAuE,IAAA,2CAAuB,EAOzG;IACE,CAAC,kCAA0B,CAAC,sBAAsB,CAAC,EAAE,CAAC;IACtD,CAAC,kCAA0B,CAAC,uBAAuB,CAAC,EAAE,CAAC;IACvD,CAAC,kCAA0B,CAAC,gBAAgB,CAAC,EAAE,CAAC;IAChD,WAAW,EAAE,CAAC;CACN,EACV,iCAAiC,CAClC,EAda,wCAAgC,UAAE,wCAAgC,SAc9E;AAEF,uBAAuB;AACvB,SAAgB,oCAAoC,CAClD,OAA8E;IAE9E,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;QACpB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,GAAG,GAAiC,EAAE,CAAC;IAC7C,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,MAAM,OAAO,GAAG,IAAA,wCAAgC,EAAC,CAAC,CAAC,CAAC;QACpD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IACD,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/converter/data-converter.d.ts b/node_modules/@temporalio/common/lib/converter/data-converter.d.ts deleted file mode 100644 index cffc45f..0000000 --- a/node_modules/@temporalio/common/lib/converter/data-converter.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { FailureConverter } from './failure-converter'; -import { PayloadCodec } from './payload-codec'; -import { PayloadConverter } from './payload-converter'; -/** - * When your data (arguments and return values) is sent over the wire and stored by Temporal Server, it is encoded in - * binary in a {@link Payload} Protobuf message. - * - * The default `DataConverter` supports `undefined`, `Uint8Array`, and JSON serializables (so if - * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description | `JSON.stringify(yourArgOrRetval)`} - * works, the default data converter will work). Protobufs are supported via - * {@link https://docs.temporal.io/typescript/data-converters#protobufs | this API}. - * - * Use a custom `DataConverter` to control the contents of your {@link Payload}s. Common reasons for using a custom - * `DataConverter` are: - * - Converting values that are not supported by the default `DataConverter` (for example, `JSON.stringify()` doesn't - * handle `BigInt`s, so if you want to return `{ total: 1000n }` from a Workflow, Signal, or Activity, you need your - * own `DataConverter`). - * - Encrypting values that may contain private information that you don't want stored in plaintext in Temporal Server's - * database. - * - Compressing values to reduce disk or network usage. - * - * To use your custom `DataConverter`, provide it to the {@link WorkflowClient}, {@link Worker}, and - * {@link bundleWorkflowCode} (if you use it): - * - `new WorkflowClient({ ..., dataConverter })` - * - `Worker.create({ ..., dataConverter })` - * - `bundleWorkflowCode({ ..., payloadConverterPath })` - */ -export interface DataConverter { - /** - * Path of a file that has a `payloadConverter` named export. - * `payloadConverter` should be an object that implements {@link PayloadConverter}. - * If no path is provided, {@link defaultPayloadConverter} is used. - */ - payloadConverterPath?: string; - /** - * Path of a file that has a `failureConverter` named export. - * `failureConverter` should be an object that implements {@link FailureConverter}. - * If no path is provided, {@link defaultFailureConverter} is used. - */ - failureConverterPath?: string; - /** - * An array of {@link PayloadCodec} instances. - * - * Payloads are encoded in the order of the array and decoded in the opposite order. For example, if you have a - * compression codec and an encryption codec, then you want data to be encoded with the compression codec first, so - * you'd do `payloadCodecs: [compressionCodec, encryptionCodec]`. - */ - payloadCodecs?: PayloadCodec[]; -} -/** - * A {@link DataConverter} that has been loaded via {@link loadDataConverter}. - */ -export interface LoadedDataConverter { - payloadConverter: PayloadConverter; - failureConverter: FailureConverter; - payloadCodecs: PayloadCodec[]; -} -/** - * The default {@link FailureConverter} used by the SDK. - * - * Error messages and stack traces are serizalized as plain text. - */ -export declare const defaultFailureConverter: FailureConverter; -/** - * A "loaded" data converter that uses the default set of failure and payload converters. - */ -export declare const defaultDataConverter: LoadedDataConverter; diff --git a/node_modules/@temporalio/common/lib/converter/data-converter.js b/node_modules/@temporalio/common/lib/converter/data-converter.js deleted file mode 100644 index d368967..0000000 --- a/node_modules/@temporalio/common/lib/converter/data-converter.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.defaultDataConverter = exports.defaultFailureConverter = void 0; -const failure_converter_1 = require("./failure-converter"); -const payload_converter_1 = require("./payload-converter"); -/** - * The default {@link FailureConverter} used by the SDK. - * - * Error messages and stack traces are serizalized as plain text. - */ -exports.defaultFailureConverter = new failure_converter_1.DefaultFailureConverter(); -/** - * A "loaded" data converter that uses the default set of failure and payload converters. - */ -exports.defaultDataConverter = { - payloadConverter: payload_converter_1.defaultPayloadConverter, - failureConverter: exports.defaultFailureConverter, - payloadCodecs: [], -}; -//# sourceMappingURL=data-converter.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/converter/data-converter.js.map b/node_modules/@temporalio/common/lib/converter/data-converter.js.map deleted file mode 100644 index 0dfe3bf..0000000 --- a/node_modules/@temporalio/common/lib/converter/data-converter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"data-converter.js","sourceRoot":"","sources":["../../src/converter/data-converter.ts"],"names":[],"mappings":";;;AAAA,2DAAgF;AAEhF,2DAAgF;AA4DhF;;;;GAIG;AACU,QAAA,uBAAuB,GAAqB,IAAI,2CAAuB,EAAE,CAAC;AAEvF;;GAEG;AACU,QAAA,oBAAoB,GAAwB;IACvD,gBAAgB,EAAE,2CAAuB;IACzC,gBAAgB,EAAE,+BAAuB;IACzC,aAAa,EAAE,EAAE;CAClB,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/converter/failure-converter.d.ts b/node_modules/@temporalio/common/lib/converter/failure-converter.d.ts deleted file mode 100644 index 46f948a..0000000 --- a/node_modules/@temporalio/common/lib/converter/failure-converter.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { ProtoFailure } from '../failure'; -import { PayloadConverter } from './payload-converter'; -/** - * Cuts out the framework part of a stack trace, leaving only user code entries - */ -export declare function cutoffStackTrace(stack?: string): string; -/** - * A `FailureConverter` is responsible for converting from proto `Failure` instances to JS `Errors` and back. - * - * We recommended using the {@link DefaultFailureConverter} instead of customizing the default implementation in order - * to maintain cross-language Failure serialization compatibility. - */ -export interface FailureConverter { - /** - * Converts a caught error to a Failure proto message. - */ - errorToFailure(err: unknown, payloadConverter: PayloadConverter): ProtoFailure; - /** - * Converts a Failure proto message to a JS Error object. - * - * The returned error must be an instance of `TemporalFailure`. - */ - failureToError(err: ProtoFailure, payloadConverter: PayloadConverter): Error; -} -/** - * The "shape" of the attributes set as the {@link ProtoFailure.encodedAttributes} payload in case - * {@link DefaultEncodedFailureAttributes.encodeCommonAttributes} is set to `true`. - */ -export interface DefaultEncodedFailureAttributes { - message: string; - stack_trace: string; -} -/** - * Options for the {@link DefaultFailureConverter} constructor. - */ -export interface DefaultFailureConverterOptions { - /** - * Whether to encode error messages and stack traces (for encrypting these attributes use a {@link PayloadCodec}). - */ - encodeCommonAttributes: boolean; -} -/** - * Default, cross-language-compatible Failure converter. - * - * By default, it will leave error messages and stack traces as plain text. In order to encrypt them, set - * `encodeCommonAttributes` to `true` in the constructor options and use a {@link PayloadCodec} that can encrypt / - * decrypt Payloads in your {@link WorkerOptions.dataConverter | Worker} and - * {@link ClientOptions.dataConverter | Client options}. - */ -export declare class DefaultFailureConverter implements FailureConverter { - readonly options: DefaultFailureConverterOptions; - constructor(options?: Partial); - /** - * Converts a Failure proto message to a JS Error object. - * - * Does not set common properties, that is done in {@link failureToError}. - */ - failureToErrorInner(failure: ProtoFailure, payloadConverter: PayloadConverter): Error; - failureToError(failure: ProtoFailure, payloadConverter: PayloadConverter): Error; - errorToFailure(err: unknown, payloadConverter: PayloadConverter): ProtoFailure; - errorToFailureInner(err: unknown, payloadConverter: PayloadConverter): ProtoFailure; - /** - * Converts a Failure proto message to a JS Error object if defined or returns undefined. - */ - optionalFailureToOptionalError(failure: ProtoFailure | undefined | null, payloadConverter: PayloadConverter): Error | undefined; - /** - * Converts an error to a Failure proto message if defined or returns undefined - */ - optionalErrorToOptionalFailure(err: unknown, payloadConverter: PayloadConverter): ProtoFailure | undefined; - private nexusFailureToTemporalFailure; - private temporalFailureToNexusFailure; -} diff --git a/node_modules/@temporalio/common/lib/converter/failure-converter.js b/node_modules/@temporalio/common/lib/converter/failure-converter.js deleted file mode 100644 index 5c6fd07..0000000 --- a/node_modules/@temporalio/common/lib/converter/failure-converter.js +++ /dev/null @@ -1,396 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DefaultFailureConverter = void 0; -exports.cutoffStackTrace = cutoffStackTrace; -const nexus = __importStar(require("nexus-rpc")); -const long_1 = __importDefault(require("long")); -const failure_1 = require("../failure"); -const internal_workflow_1 = require("../internal-workflow"); -const type_helpers_1 = require("../type-helpers"); -const time_1 = require("../time"); -const encoding_1 = require("../encoding"); -const payload_converter_1 = require("./payload-converter"); -// Can't import proto enums into the workflow sandbox, use this helper type and enum converter instead. -const NexusHandlerErrorRetryBehavior = { - RETRYABLE: 'RETRYABLE', - NON_RETRYABLE: 'NON_RETRYABLE', -}; -const [encodeNexusHandlerErrorRetryBehavior, decodeNexusHandlerErrorRetryBehavior] = (0, internal_workflow_1.makeProtoEnumConverters)({ - UNSPECIFIED: 0, - [NexusHandlerErrorRetryBehavior.RETRYABLE]: 1, - [NexusHandlerErrorRetryBehavior.NON_RETRYABLE]: 2, -}, 'NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_'); -function combineRegExp(...regexps) { - return new RegExp(regexps.map((x) => `(?:${x.source})`).join('|')); -} -/** - * Stack traces will be cutoff when on of these patterns is matched - */ -const CUTOFF_STACK_PATTERNS = combineRegExp( -/** Activity execution */ -/\s+at (Activity\.)?execute \(.*[\\/]worker[\\/](?:src|lib)[\\/]activity\.[jt]s:\d+:\d+\)/, -/** Nexus execution */ -/\s+at( async)? (NexusHandler\.)?invokeUserCode \(.*[\\/]worker[\\/](?:src|lib)[\\/]nexus[\\/]index\.[jt]s:\d+:\d+\)/, -/** Workflow activation (inbound handlers only) */ -/\s+at( async)? (Activator\.)?(startWorkflow|queryWorkflow|signalWorkflow|update|validateUpdate)NextHandler \(.*\.[jt]s:\d+:\d+\)/, -/** Workflow run anything in context */ -/\s+at (Script\.)?runInContext \(native|unknown|(?:(?:node:vm|vm\.js):\d+:\d+)\)/); -/** - * Any stack trace frames that match any of those wil be dopped. - * The "null." prefix on some cases is to avoid https://github.com/nodejs/node/issues/42417 - */ -const DROPPED_STACK_FRAMES_PATTERNS = combineRegExp( -/** Internal functions used to recursively chain interceptors */ -/\s+at (null\.)?next \(.*[\\/]common[\\/](?:src|lib)[\\/]interceptors\.[jt]s:\d+:\d+\)/, -/** Internal functions used to recursively chain interceptors */ -/\s+at (null\.)?executeNextHandler \(.*[\\/]worker[\\/](?:src|lib)[\\/]activity\.[jt]s:\d+:\d+\)/); -/** - * Cuts out the framework part of a stack trace, leaving only user code entries - */ -function cutoffStackTrace(stack) { - const lines = (stack ?? '').split(/\r?\n/); - const acc = Array(); - for (const line of lines) { - if (CUTOFF_STACK_PATTERNS.test(line)) - break; - if (!DROPPED_STACK_FRAMES_PATTERNS.test(line)) - acc.push(line); - } - return acc.join('\n'); -} -/** - * Default, cross-language-compatible Failure converter. - * - * By default, it will leave error messages and stack traces as plain text. In order to encrypt them, set - * `encodeCommonAttributes` to `true` in the constructor options and use a {@link PayloadCodec} that can encrypt / - * decrypt Payloads in your {@link WorkerOptions.dataConverter | Worker} and - * {@link ClientOptions.dataConverter | Client options}. - */ -class DefaultFailureConverter { - options; - constructor(options) { - const { encodeCommonAttributes } = options ?? {}; - this.options = { - encodeCommonAttributes: encodeCommonAttributes ?? false, - }; - } - /** - * Converts a Failure proto message to a JS Error object. - * - * Does not set common properties, that is done in {@link failureToError}. - */ - failureToErrorInner(failure, payloadConverter) { - if (failure.applicationFailureInfo) { - return new failure_1.ApplicationFailure(failure.message ?? undefined, failure.applicationFailureInfo.type, Boolean(failure.applicationFailureInfo.nonRetryable), (0, payload_converter_1.arrayFromPayloads)(payloadConverter, failure.applicationFailureInfo.details?.payloads), this.optionalFailureToOptionalError(failure.cause, payloadConverter), undefined, (0, failure_1.decodeApplicationFailureCategory)(failure.applicationFailureInfo.category)); - } - if (failure.serverFailureInfo) { - return new failure_1.ServerFailure(failure.message ?? undefined, Boolean(failure.serverFailureInfo.nonRetryable), this.optionalFailureToOptionalError(failure.cause, payloadConverter)); - } - if (failure.timeoutFailureInfo) { - return new failure_1.TimeoutFailure(failure.message ?? undefined, (0, payload_converter_1.fromPayloadsAtIndex)(payloadConverter, 0, failure.timeoutFailureInfo.lastHeartbeatDetails?.payloads), (0, failure_1.decodeTimeoutType)(failure.timeoutFailureInfo.timeoutType)); - } - if (failure.terminatedFailureInfo) { - return new failure_1.TerminatedFailure(failure.message ?? undefined, this.optionalFailureToOptionalError(failure.cause, payloadConverter)); - } - if (failure.canceledFailureInfo) { - return new failure_1.CancelledFailure(failure.message ?? undefined, (0, payload_converter_1.arrayFromPayloads)(payloadConverter, failure.canceledFailureInfo.details?.payloads), this.optionalFailureToOptionalError(failure.cause, payloadConverter)); - } - if (failure.resetWorkflowFailureInfo) { - return new failure_1.ApplicationFailure(failure.message ?? undefined, 'ResetWorkflow', false, (0, payload_converter_1.arrayFromPayloads)(payloadConverter, failure.resetWorkflowFailureInfo.lastHeartbeatDetails?.payloads), this.optionalFailureToOptionalError(failure.cause, payloadConverter)); - } - if (failure.childWorkflowExecutionFailureInfo) { - const { namespace, workflowType, workflowExecution, retryState } = failure.childWorkflowExecutionFailureInfo; - if (!(workflowType?.name && workflowExecution)) { - throw new TypeError('Missing attributes on childWorkflowExecutionFailureInfo'); - } - return new failure_1.ChildWorkflowFailure(namespace ?? undefined, workflowExecution, workflowType.name, (0, failure_1.decodeRetryState)(retryState), this.optionalFailureToOptionalError(failure.cause, payloadConverter)); - } - if (failure.activityFailureInfo) { - if (!failure.activityFailureInfo.activityType?.name) { - throw new TypeError('Missing activityType?.name on activityFailureInfo'); - } - return new failure_1.ActivityFailure(failure.message ?? undefined, failure.activityFailureInfo.activityType.name, failure.activityFailureInfo.activityId ?? undefined, (0, failure_1.decodeRetryState)(failure.activityFailureInfo.retryState), failure.activityFailureInfo.identity ?? undefined, this.optionalFailureToOptionalError(failure.cause, payloadConverter)); - } - if (failure.nexusHandlerFailureInfo) { - let retryableOverride = undefined; - const retryBehavior = decodeNexusHandlerErrorRetryBehavior(failure.nexusHandlerFailureInfo.retryBehavior); - switch (retryBehavior) { - case 'RETRYABLE': - retryableOverride = true; - break; - case 'NON_RETRYABLE': - retryableOverride = false; - break; - } - const rawErrorType = failure.nexusHandlerFailureInfo.type || ''; - const resolvedType = Object.hasOwn(nexus.HandlerErrorType, rawErrorType) - ? nexus.HandlerErrorType[rawErrorType] - : 'UNKNOWN'; - return new nexus.HandlerError(resolvedType, failure.message ?? 'Nexus handler error', { - cause: this.optionalFailureToOptionalError(failure.cause, payloadConverter), - retryableOverride, - rawErrorType, - originalFailure: this.temporalFailureToNexusFailure(failure), - }); - } - if (failure.nexusOperationExecutionFailureInfo) { - return new failure_1.NexusOperationFailure( - // TODO(nexus/error): Maybe set a default message here, once we've decided on error handling. - failure.message ?? undefined, failure.nexusOperationExecutionFailureInfo.scheduledEventId?.toNumber(), - // We assume these will always be set or gracefully set to empty strings. - failure.nexusOperationExecutionFailureInfo.endpoint ?? '', failure.nexusOperationExecutionFailureInfo.service ?? '', failure.nexusOperationExecutionFailureInfo.operation ?? '', failure.nexusOperationExecutionFailureInfo.operationToken ?? undefined, this.optionalFailureToOptionalError(failure.cause, payloadConverter)); - } - return new failure_1.TemporalFailure(failure.message ?? undefined, this.optionalFailureToOptionalError(failure.cause, payloadConverter)); - } - failureToError(failure, payloadConverter) { - if (failure.encodedAttributes) { - const attrs = payloadConverter.fromPayload(failure.encodedAttributes); - // Don't apply encodedAttributes unless they conform to an expected schema - if (typeof attrs === 'object' && attrs !== null) { - const { message, stack_trace } = attrs; - // Avoid mutating the argument - failure = { ...failure }; - if (typeof message === 'string') { - failure.message = message; - } - if (typeof stack_trace === 'string') { - failure.stackTrace = stack_trace; - } - } - } - const err = this.failureToErrorInner(failure, payloadConverter); - err.stack = failure.stackTrace ?? ''; - if (err instanceof failure_1.TemporalFailure) { - err.failure = failure; - } - return err; - } - errorToFailure(err, payloadConverter) { - const failure = this.errorToFailureInner(err, payloadConverter); - if (this.options.encodeCommonAttributes) { - const { message, stackTrace } = failure; - failure.message = 'Encoded failure'; - failure.stackTrace = ''; - failure.encodedAttributes = payloadConverter.toPayload({ message, stack_trace: stackTrace }); - } - return failure; - } - errorToFailureInner(err, payloadConverter) { - if (err instanceof failure_1.TemporalFailure || err instanceof nexus.HandlerError) { - if (err instanceof failure_1.TemporalFailure && err.failure) - return err.failure; - const base = { - message: err.message, - stackTrace: cutoffStackTrace(err.stack), - cause: this.optionalErrorToOptionalFailure(err.cause, payloadConverter), - source: failure_1.FAILURE_SOURCE, - }; - if (err instanceof failure_1.ActivityFailure) { - return { - ...base, - activityFailureInfo: { - ...err, - retryState: (0, failure_1.encodeRetryState)(err.retryState), - activityType: { name: err.activityType }, - }, - }; - } - if (err instanceof failure_1.ChildWorkflowFailure) { - return { - ...base, - childWorkflowExecutionFailureInfo: { - ...err, - retryState: (0, failure_1.encodeRetryState)(err.retryState), - workflowExecution: err.execution, - workflowType: { name: err.workflowType }, - }, - }; - } - if (err instanceof failure_1.ApplicationFailure) { - return { - ...base, - applicationFailureInfo: { - type: err.type, - nonRetryable: err.nonRetryable, - details: err.details && err.details.length - ? { payloads: (0, payload_converter_1.toPayloads)(payloadConverter, ...err.details) } - : undefined, - nextRetryDelay: (0, time_1.msOptionalToTs)(err.nextRetryDelay), - category: (0, failure_1.encodeApplicationFailureCategory)(err.category), - }, - }; - } - if (err instanceof failure_1.CancelledFailure) { - return { - ...base, - canceledFailureInfo: { - details: err.details && err.details.length - ? { payloads: (0, payload_converter_1.toPayloads)(payloadConverter, ...err.details) } - : undefined, - }, - }; - } - if (err instanceof failure_1.TimeoutFailure) { - return { - ...base, - timeoutFailureInfo: { - timeoutType: (0, failure_1.encodeTimeoutType)(err.timeoutType), - lastHeartbeatDetails: err.lastHeartbeatDetails - ? { payloads: (0, payload_converter_1.toPayloads)(payloadConverter, err.lastHeartbeatDetails) } - : undefined, - }, - }; - } - if (err instanceof failure_1.ServerFailure) { - return { - ...base, - serverFailureInfo: { nonRetryable: err.nonRetryable }, - }; - } - if (err instanceof failure_1.TerminatedFailure) { - return { - ...base, - terminatedFailureInfo: {}, - }; - } - if (err instanceof nexus.HandlerError) { - if (err.originalFailure) { - return this.nexusFailureToTemporalFailure(err.originalFailure, err.retryable); - } - else { - let retryBehavior = undefined; - switch (err.retryableOverride) { - case true: - retryBehavior = encodeNexusHandlerErrorRetryBehavior('RETRYABLE'); - break; - case false: - retryBehavior = encodeNexusHandlerErrorRetryBehavior('NON_RETRYABLE'); - break; - } - return { - ...base, - nexusHandlerFailureInfo: { - type: err.type, - retryBehavior, - }, - }; - } - } - if (err instanceof failure_1.NexusOperationFailure) { - return { - ...base, - nexusOperationExecutionFailureInfo: { - scheduledEventId: err.scheduledEventId ? long_1.default.fromNumber(err.scheduledEventId) : undefined, - endpoint: err.endpoint, - service: err.service, - operation: err.operation, - operationToken: err.operationToken, - }, - }; - } - // Just a TemporalFailure - return base; - } - const base = { - source: failure_1.FAILURE_SOURCE, - }; - if ((0, type_helpers_1.isError)(err)) { - return { - ...base, - message: String(err.message ?? ''), - stackTrace: cutoffStackTrace(err.stack), - cause: this.optionalErrorToOptionalFailure(err.cause, payloadConverter), - }; - } - const recommendation = ` [A non-Error value was thrown from your code. We recommend throwing Error objects so that we can provide a stack trace]`; - if (typeof err === 'string') { - return { ...base, message: err + recommendation }; - } - if (typeof err === 'object') { - let message = ''; - try { - message = JSON.stringify(err); - } - catch (_err) { - message = String(err); - } - return { ...base, message: message + recommendation }; - } - return { ...base, message: String(err) + recommendation }; - } - /** - * Converts a Failure proto message to a JS Error object if defined or returns undefined. - */ - optionalFailureToOptionalError(failure, payloadConverter) { - return failure ? this.failureToError(failure, payloadConverter) : undefined; - } - /** - * Converts an error to a Failure proto message if defined or returns undefined - */ - optionalErrorToOptionalFailure(err, payloadConverter) { - return err ? this.errorToFailure(err, payloadConverter) : undefined; - } - nexusFailureToTemporalFailure(failure, retryable) { - if (failure.metadata?.type === 'temporal.api.failure.v1.Failure') { - if (failure.details == null) { - throw new TypeError("missing details for Nexus Failure of type 'temporal.api.failure.v1.Failure'"); - } - return failure.details; - } - else { - const temporalFailure = {}; - temporalFailure.applicationFailureInfo = { - type: 'NexusFailure', - nonRetryable: !retryable, - details: { - payloads: [ - { - metadata: { encoding: (0, encoding_1.encode)('json/plain') }, - data: (0, encoding_1.encode)(JSON.stringify({ ...failure, message: '' })), - }, - ], - }, - }; - temporalFailure.message = failure.message; - temporalFailure.stackTrace = failure.stackTrace ?? ''; - return temporalFailure; - } - } - temporalFailureToNexusFailure(failure) { - return { - message: failure.message ?? '', - metadata: { type: 'temporal.api.failure.v1.Failure' }, - // Store the full ProtoFailure as the Nexus failure details so it can be round-tripped - // losslessly back to a ProtoFailure via nexusFailureToTemporalFailure. - details: { ...failure }, - }; - } -} -exports.DefaultFailureConverter = DefaultFailureConverter; -//# sourceMappingURL=failure-converter.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/converter/failure-converter.js.map b/node_modules/@temporalio/common/lib/converter/failure-converter.js.map deleted file mode 100644 index 749881c..0000000 --- a/node_modules/@temporalio/common/lib/converter/failure-converter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"failure-converter.js","sourceRoot":"","sources":["../../src/converter/failure-converter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,4CAQC;AA3FD,iDAAmC;AACnC,gDAAwB;AAExB,wCAkBoB;AACpB,4DAA+D;AAC/D,kDAA0C;AAC1C,kCAAyC;AACzC,0CAAqC;AACrC,2DAA2G;AAE3G,uGAAuG;AACvG,MAAM,8BAA8B,GAAG;IACrC,SA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git a/node_modules/@temporalio/common/lib/converter/payload-codec.d.ts b/node_modules/@temporalio/common/lib/converter/payload-codec.d.ts deleted file mode 100644 index 9787f32..0000000 --- a/node_modules/@temporalio/common/lib/converter/payload-codec.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Payload } from '../interfaces'; -/** - * `PayloadCodec` is an optional step that happens between the wire and the {@link PayloadConverter}: - * - * Temporal Server <--> Wire <--> `PayloadCodec` <--> `PayloadConverter` <--> User code - * - * Implement this to transform an array of {@link Payload}s to/from the format sent over the wire and stored by Temporal Server. - * Common transformations are encryption and compression. - */ -export interface PayloadCodec { - /** - * Encode an array of {@link Payload}s for sending over the wire. - * @param payloads May have length 0. - */ - encode(payloads: Payload[]): Promise; - /** - * Decode an array of {@link Payload}s received from the wire. - */ - decode(payloads: Payload[]): Promise; -} diff --git a/node_modules/@temporalio/common/lib/converter/payload-codec.js b/node_modules/@temporalio/common/lib/converter/payload-codec.js deleted file mode 100644 index 88454a9..0000000 --- a/node_modules/@temporalio/common/lib/converter/payload-codec.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=payload-codec.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/converter/payload-codec.js.map b/node_modules/@temporalio/common/lib/converter/payload-codec.js.map deleted file mode 100644 index 30b8555..0000000 --- a/node_modules/@temporalio/common/lib/converter/payload-codec.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"payload-codec.js","sourceRoot":"","sources":["../../src/converter/payload-codec.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/converter/payload-converter.d.ts b/node_modules/@temporalio/common/lib/converter/payload-converter.d.ts deleted file mode 100644 index c68e7ce..0000000 --- a/node_modules/@temporalio/common/lib/converter/payload-converter.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { Payload } from '../interfaces'; -/** - * Used by the framework to serialize/deserialize data like parameters and return values. - * - * This is called inside the {@link https://docs.temporal.io/typescript/determinism | Workflow isolate}. - * To write async code or use Node APIs (or use packages that use Node APIs), use a {@link PayloadCodec}. - */ -export interface PayloadConverter { - /** - * Converts a value to a {@link Payload}. - * - * @param value The value to convert. Example values include the Workflow args sent from the Client and the values returned by a Workflow or Activity. - * - * @returns The {@link Payload}. - * - * Should throw {@link ValueError} if unable to convert. - */ - toPayload(value: T): Payload; - /** - * Converts a {@link Payload} back to a value. - */ - fromPayload(payload: Payload): T; -} -/** - * Implements conversion of a list of values. - * - * @param converter - * @param values JS values to convert to Payloads - * @return list of {@link Payload}s - * @throws {@link ValueError} if conversion of the value passed as parameter failed for any - * reason. - */ -export declare function toPayloads(converter: PayloadConverter, ...values: unknown[]): Payload[] | undefined; -/** - * Run {@link PayloadConverter.toPayload} on an optional value, and then encode it. - */ -export declare function convertOptionalToPayload(payloadConverter: PayloadConverter, value: unknown): Payload | null | undefined; -/** - * Run {@link PayloadConverter.toPayload} on each value in the map. - * - * @throws {@link ValueError} if conversion of any value in the map fails - */ -export declare function mapToPayloads(converter: PayloadConverter, map: Record): Record; -/** - * Implements conversion of an array of values of different types. Useful for deserializing - * arguments of function invocations. - * - * @param converter - * @param index index of the value in the payloads - * @param payloads serialized value to convert to JS values. - * @return converted JS value - * @throws {@link PayloadConverterError} if conversion of the data passed as parameter failed for any - * reason. - */ -export declare function fromPayloadsAtIndex(converter: PayloadConverter, index: number, payloads?: Payload[] | null): T; -/** - * Run {@link PayloadConverter.fromPayload} on each value in the array. - */ -export declare function arrayFromPayloads(converter: PayloadConverter, payloads?: Payload[] | null): unknown[]; -export declare function mapFromPayloads(converter: PayloadConverter, map?: Record | null | undefined): Record | undefined; -export declare const rawPayloadTypeBrand: unique symbol; -/** - * RawValue is a wrapper over a payload. - * A payload that belongs to a RawValue is special in that it bypasses user-defined payload converters, - * instead using the default payload converter. The payload still undergoes codec conversion. - */ -export declare class RawValue { - private readonly _payload; - private readonly [rawPayloadTypeBrand]; - constructor(value: T, payloadConverter?: PayloadConverter); - static fromPayload(p: Payload): RawValue; - get payload(): Payload; -} -export interface PayloadConverterWithEncoding { - /** - * Converts a value to a {@link Payload}. - * - * @param value The value to convert. Example values include the Workflow args sent from the Client and the values returned by a Workflow or Activity. - * @returns The {@link Payload}, or `undefined` if unable to convert. - */ - toPayload(value: T): Payload | undefined; - /** - * Converts a {@link Payload} back to a value. - */ - fromPayload(payload: Payload): T; - readonly encodingType: string; -} -/** - * Tries to convert values to {@link Payload}s using the {@link PayloadConverterWithEncoding}s provided to the constructor, in the order provided. - * - * Converts Payloads to values based on the `Payload.metadata.encoding` field, which matches the {@link PayloadConverterWithEncoding.encodingType} - * of the converter that created the Payload. - */ -export declare class CompositePayloadConverter implements PayloadConverter { - readonly converters: PayloadConverterWithEncoding[]; - readonly converterByEncoding: Map; - constructor(...converters: PayloadConverterWithEncoding[]); - /** - * Tries to run `.toPayload(value)` on each converter in the order provided at construction. - * Returns the first successful result, throws {@link ValueError} if there is no converter that can handle the value. - */ - toPayload(value: T): Payload; - /** - * Run {@link PayloadConverterWithEncoding.fromPayload} based on the `encoding` metadata of the {@link Payload}. - */ - fromPayload(payload: Payload): T; -} -/** - * Converts between JS undefined and NULL Payload - */ -export declare class UndefinedPayloadConverter implements PayloadConverterWithEncoding { - encodingType: "binary/null"; - toPayload(value: unknown): Payload | undefined; - fromPayload(_content: Payload): T; -} -/** - * Converts between binary data types and RAW Payload - */ -export declare class BinaryPayloadConverter implements PayloadConverterWithEncoding { - encodingType: "binary/plain"; - toPayload(value: unknown): Payload | undefined; - fromPayload(content: Payload): T; -} -/** - * Converts between non-undefined values and serialized JSON Payload - */ -export declare class JsonPayloadConverter implements PayloadConverterWithEncoding { - encodingType: "json/plain"; - toPayload(value: unknown): Payload | undefined; - fromPayload(content: Payload): T; -} -export declare class DefaultPayloadConverter extends CompositePayloadConverter { - constructor(); -} -/** - * The default {@link PayloadConverter} used by the SDK. Supports `Uint8Array` and JSON serializables (so if - * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description | `JSON.stringify(yourArgOrRetval)`} - * works, the default payload converter will work). - * - * To also support Protobufs, create a custom payload converter with {@link DefaultPayloadConverter}: - * - * `const myConverter = new DefaultPayloadConverter({ protobufRoot })` - */ -export declare const defaultPayloadConverter: DefaultPayloadConverter; diff --git a/node_modules/@temporalio/common/lib/converter/payload-converter.js b/node_modules/@temporalio/common/lib/converter/payload-converter.js deleted file mode 100644 index 397cf80..0000000 --- a/node_modules/@temporalio/common/lib/converter/payload-converter.js +++ /dev/null @@ -1,260 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.defaultPayloadConverter = exports.DefaultPayloadConverter = exports.JsonPayloadConverter = exports.BinaryPayloadConverter = exports.UndefinedPayloadConverter = exports.CompositePayloadConverter = exports.RawValue = void 0; -exports.toPayloads = toPayloads; -exports.convertOptionalToPayload = convertOptionalToPayload; -exports.mapToPayloads = mapToPayloads; -exports.fromPayloadsAtIndex = fromPayloadsAtIndex; -exports.arrayFromPayloads = arrayFromPayloads; -exports.mapFromPayloads = mapFromPayloads; -const encoding_1 = require("../encoding"); -const errors_1 = require("../errors"); -const types_1 = require("./types"); -/** - * Implements conversion of a list of values. - * - * @param converter - * @param values JS values to convert to Payloads - * @return list of {@link Payload}s - * @throws {@link ValueError} if conversion of the value passed as parameter failed for any - * reason. - */ -function toPayloads(converter, ...values) { - if (values.length === 0) { - return undefined; - } - return values.map((value) => converter.toPayload(value)); -} -/** - * Run {@link PayloadConverter.toPayload} on an optional value, and then encode it. - */ -function convertOptionalToPayload(payloadConverter, value) { - if (value == null) - return value; - return payloadConverter.toPayload(value); -} -/** - * Run {@link PayloadConverter.toPayload} on each value in the map. - * - * @throws {@link ValueError} if conversion of any value in the map fails - */ -function mapToPayloads(converter, map) { - return Object.fromEntries(Object.entries(map).map(([k, v]) => [k, converter.toPayload(v)])); -} -/** - * Implements conversion of an array of values of different types. Useful for deserializing - * arguments of function invocations. - * - * @param converter - * @param index index of the value in the payloads - * @param payloads serialized value to convert to JS values. - * @return converted JS value - * @throws {@link PayloadConverterError} if conversion of the data passed as parameter failed for any - * reason. - */ -function fromPayloadsAtIndex(converter, index, payloads) { - // To make adding arguments a backwards compatible change - if (payloads === undefined || payloads === null || index >= payloads.length) { - return undefined; - } - const payload = payloads?.[index]; - if (!payload) { - return undefined; - } - return converter.fromPayload(payload); -} -/** - * Run {@link PayloadConverter.fromPayload} on each value in the array. - */ -function arrayFromPayloads(converter, payloads) { - if (!payloads) { - return []; - } - return payloads.map((payload) => converter.fromPayload(payload)); -} -function mapFromPayloads(converter, map) { - if (map == null) - return undefined; - return Object.fromEntries(Object.entries(map).map(([k, payload]) => { - const value = converter.fromPayload(payload); - return [k, value]; - })); -} -/** - * RawValue is a wrapper over a payload. - * A payload that belongs to a RawValue is special in that it bypasses user-defined payload converters, - * instead using the default payload converter. The payload still undergoes codec conversion. - */ -class RawValue { - _payload; - [exports.rawPayloadTypeBrand] = undefined; - constructor(value, payloadConverter = exports.defaultPayloadConverter) { - this._payload = payloadConverter.toPayload(value); - } - static fromPayload(p) { - return new RawValue(p, identityPayloadConverter); - } - get payload() { - return this._payload; - } -} -exports.RawValue = RawValue; -/** - * Tries to convert values to {@link Payload}s using the {@link PayloadConverterWithEncoding}s provided to the constructor, in the order provided. - * - * Converts Payloads to values based on the `Payload.metadata.encoding` field, which matches the {@link PayloadConverterWithEncoding.encodingType} - * of the converter that created the Payload. - */ -class CompositePayloadConverter { - converters; - converterByEncoding = new Map(); - constructor(...converters) { - if (converters.length === 0) { - throw new errors_1.PayloadConverterError('Must provide at least one PayloadConverterWithEncoding'); - } - this.converters = converters; - for (const converter of converters) { - this.converterByEncoding.set(converter.encodingType, converter); - } - } - /** - * Tries to run `.toPayload(value)` on each converter in the order provided at construction. - * Returns the first successful result, throws {@link ValueError} if there is no converter that can handle the value. - */ - toPayload(value) { - if (value instanceof RawValue) { - return value.payload; - } - for (const converter of this.converters) { - const result = converter.toPayload(value); - if (result !== undefined) { - return result; - } - } - throw new errors_1.ValueError(`Unable to convert ${value} to payload`); - } - /** - * Run {@link PayloadConverterWithEncoding.fromPayload} based on the `encoding` metadata of the {@link Payload}. - */ - fromPayload(payload) { - if (payload.metadata === undefined || payload.metadata === null) { - throw new errors_1.ValueError('Missing payload metadata'); - } - const encoding = (0, encoding_1.decode)(payload.metadata[types_1.METADATA_ENCODING_KEY]); - const converter = this.converterByEncoding.get(encoding); - if (converter === undefined) { - throw new errors_1.ValueError(`Unknown encoding: ${encoding}`); - } - return converter.fromPayload(payload); - } -} -exports.CompositePayloadConverter = CompositePayloadConverter; -/** - * Converts between JS undefined and NULL Payload - */ -class UndefinedPayloadConverter { - encodingType = types_1.encodingTypes.METADATA_ENCODING_NULL; - toPayload(value) { - if (value !== undefined) { - return undefined; - } - return { - metadata: { - [types_1.METADATA_ENCODING_KEY]: types_1.encodingKeys.METADATA_ENCODING_NULL, - }, - }; - } - fromPayload(_content) { - return undefined; // Just return undefined - } -} -exports.UndefinedPayloadConverter = UndefinedPayloadConverter; -/** - * Converts between binary data types and RAW Payload - */ -class BinaryPayloadConverter { - encodingType = types_1.encodingTypes.METADATA_ENCODING_RAW; - toPayload(value) { - if (!(value instanceof Uint8Array)) { - return undefined; - } - return { - metadata: { - [types_1.METADATA_ENCODING_KEY]: types_1.encodingKeys.METADATA_ENCODING_RAW, - }, - data: value, - }; - } - fromPayload(content) { - return ( - // Wrap with Uint8Array from this context to ensure `instanceof` works - (content.data ? new Uint8Array(content.data.buffer, content.data.byteOffset, content.data.length) : content.data)); - } -} -exports.BinaryPayloadConverter = BinaryPayloadConverter; -/** - * Converts between non-undefined values and serialized JSON Payload - */ -class JsonPayloadConverter { - encodingType = types_1.encodingTypes.METADATA_ENCODING_JSON; - toPayload(value) { - if (value === undefined) { - return undefined; - } - let json; - try { - json = JSON.stringify(value); - } - catch (_err) { - return undefined; - } - return { - metadata: { - [types_1.METADATA_ENCODING_KEY]: types_1.encodingKeys.METADATA_ENCODING_JSON, - }, - data: (0, encoding_1.encode)(json), - }; - } - fromPayload(content) { - if (content.data === undefined || content.data === null) { - throw new errors_1.ValueError('Got payload with no data'); - } - return JSON.parse((0, encoding_1.decode)(content.data)); - } -} -exports.JsonPayloadConverter = JsonPayloadConverter; -class DefaultPayloadConverter extends CompositePayloadConverter { - // Match the order used in other SDKs, but exclude Protobuf converters so that the code, including - // `proto3-json-serializer`, doesn't take space in Workflow bundles that don't use Protobufs. To use Protobufs, use - // {@link DefaultPayloadConverterWithProtobufs}. - // - // Go SDK: - // https://github.com/temporalio/sdk-go/blob/5e5645f0c550dcf717c095ae32c76a7087d2e985/converter/default_data_converter.go#L28 - constructor() { - super(new UndefinedPayloadConverter(), new BinaryPayloadConverter(), new JsonPayloadConverter()); - } -} -exports.DefaultPayloadConverter = DefaultPayloadConverter; -/** - * The default {@link PayloadConverter} used by the SDK. Supports `Uint8Array` and JSON serializables (so if - * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description | `JSON.stringify(yourArgOrRetval)`} - * works, the default payload converter will work). - * - * To also support Protobufs, create a custom payload converter with {@link DefaultPayloadConverter}: - * - * `const myConverter = new DefaultPayloadConverter({ protobufRoot })` - */ -exports.defaultPayloadConverter = new DefaultPayloadConverter(); -/** - * The identity payload converter returns the inputs it was given. - */ -class IdentityPayloadConverter { - toPayload(value) { - return value; - } - fromPayload(payload) { - return payload; - } -} -const identityPayloadConverter = new IdentityPayloadConverter(); -//# sourceMappingURL=payload-converter.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/converter/payload-converter.js.map b/node_modules/@temporalio/common/lib/converter/payload-converter.js.map deleted file mode 100644 index efc0f74..0000000 --- a/node_modules/@temporalio/common/lib/converter/payload-converter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"payload-converter.js","sourceRoot":"","sources":["../../src/converter/payload-converter.ts"],"names":[],"mappings":";;;AAsCA,gCAMC;AAKD,4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;QAC7B,OAAO,OAAY,CAAC;IACtB,CAAC;CACF;AAED,MAAM,wBAAwB,GAAG,IAAI,wBAAwB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/converter/payload-search-attributes.d.ts b/node_modules/@temporalio/common/lib/converter/payload-search-attributes.d.ts deleted file mode 100644 index 46cbac3..0000000 --- a/node_modules/@temporalio/common/lib/converter/payload-search-attributes.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Payload } from '../interfaces'; -import { TypedSearchAttributes, SearchAttributes, SearchAttributeUpdatePair } from '../search-attributes'; -import { PayloadConverter, JsonPayloadConverter } from './payload-converter'; -/** - * Converts Search Attribute values using JsonPayloadConverter - */ -export declare class SearchAttributePayloadConverter implements PayloadConverter { - jsonConverter: JsonPayloadConverter; - validNonDateTypes: string[]; - toPayload(values: unknown): Payload; - /** - * Datetime Search Attribute values are converted to `Date`s - */ - fromPayload(payload: Payload): T; -} -export declare const searchAttributePayloadConverter: SearchAttributePayloadConverter; -export declare class TypedSearchAttributePayloadConverter implements PayloadConverter { - jsonConverter: JsonPayloadConverter; - toPayload(attr: T): Payload; - fromPayload(payload: Payload): T; -} -export declare const typedSearchAttributePayloadConverter: TypedSearchAttributePayloadConverter; -export declare function encodeUnifiedSearchAttributes(searchAttributes?: SearchAttributes, // eslint-disable-line @typescript-eslint/no-deprecated -typedSearchAttributes?: TypedSearchAttributes | SearchAttributeUpdatePair[]): Record; -export declare function decodeSearchAttributes(indexedFields: Record | undefined | null): SearchAttributes; -export declare function decodeTypedSearchAttributes(indexedFields: Record | undefined | null): TypedSearchAttributes; diff --git a/node_modules/@temporalio/common/lib/converter/payload-search-attributes.js b/node_modules/@temporalio/common/lib/converter/payload-search-attributes.js deleted file mode 100644 index c292ee2..0000000 --- a/node_modules/@temporalio/common/lib/converter/payload-search-attributes.js +++ /dev/null @@ -1,171 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.typedSearchAttributePayloadConverter = exports.TypedSearchAttributePayloadConverter = exports.searchAttributePayloadConverter = exports.SearchAttributePayloadConverter = void 0; -exports.encodeUnifiedSearchAttributes = encodeUnifiedSearchAttributes; -exports.decodeSearchAttributes = decodeSearchAttributes; -exports.decodeTypedSearchAttributes = decodeTypedSearchAttributes; -const encoding_1 = require("../encoding"); -const errors_1 = require("../errors"); -const search_attributes_1 = require("../search-attributes"); -const payload_converter_1 = require("./payload-converter"); -/** - * Converts Search Attribute values using JsonPayloadConverter - */ -class SearchAttributePayloadConverter { - jsonConverter = new payload_converter_1.JsonPayloadConverter(); - validNonDateTypes = ['string', 'number', 'boolean']; - toPayload(values) { - if (!Array.isArray(values)) { - throw new errors_1.ValueError(`SearchAttribute value must be an array`); - } - if (values.length > 0) { - const firstValue = values[0]; - const firstType = typeof firstValue; - if (firstType === 'object') { - for (const [idx, value] of values.entries()) { - if (!(value instanceof Date)) { - throw new errors_1.ValueError(`SearchAttribute values must arrays of strings, numbers, booleans, or Dates. The value ${value} at index ${idx} is of type ${typeof value}`); - } - } - } - else { - if (!this.validNonDateTypes.includes(firstType)) { - throw new errors_1.ValueError(`SearchAttribute array values must be: string | number | boolean | Date`); - } - for (const [idx, value] of values.entries()) { - if (typeof value !== firstType) { - throw new errors_1.ValueError(`All SearchAttribute array values must be of the same type. The first value ${firstValue} of type ${firstType} doesn't match value ${value} of type ${typeof value} at index ${idx}`); - } - } - } - } - // JSON.stringify takes care of converting Dates to ISO strings - const ret = this.jsonConverter.toPayload(values); - if (ret === undefined) { - throw new errors_1.ValueError('Could not convert search attributes to payloads'); - } - return ret; - } - /** - * Datetime Search Attribute values are converted to `Date`s - */ - fromPayload(payload) { - if (payload.metadata == null) { - throw new errors_1.ValueError('Missing payload metadata'); - } - const value = this.jsonConverter.fromPayload(payload); - let arrayWrappedValue = Array.isArray(value) ? value : [value]; - const searchAttributeType = payload.metadata.type ? (0, encoding_1.decode)(payload.metadata.type) : undefined; - if (searchAttributeType === 'Datetime') { - arrayWrappedValue = arrayWrappedValue.map((dateString) => new Date(dateString)); - } - return arrayWrappedValue; - } -} -exports.SearchAttributePayloadConverter = SearchAttributePayloadConverter; -exports.searchAttributePayloadConverter = new SearchAttributePayloadConverter(); -class TypedSearchAttributePayloadConverter { - jsonConverter = new payload_converter_1.JsonPayloadConverter(); - toPayload(attr) { - if (!(attr instanceof search_attributes_1.TypedSearchAttributeValue || attr instanceof search_attributes_1.TypedSearchAttributeUpdateValue)) { - throw new errors_1.ValueError(`Expect input to be instance of TypedSearchAttributeValue or TypedSearchAttributeUpdateValue, got: ${JSON.stringify(attr)}`); - } - // We check for deletion as well as regular typed search attributes. - if (attr.value !== null && !(0, search_attributes_1.isValidValueForType)(attr.type, attr.value)) { - throw new errors_1.ValueError(`Invalid search attribute value ${attr.value} for given type ${attr.type}`); - } - // For server search attributes to work properly, we cannot set the metadata - // type when we set null - if (attr.value === null) { - const payload = this.jsonConverter.toPayload(attr.value); - if (payload === undefined) { - throw new errors_1.ValueError('Could not convert typed search attribute to payload'); - } - return payload; - } - // JSON.stringify takes care of converting Dates to ISO strings - const payload = this.jsonConverter.toPayload(attr.value); - if (payload === undefined) { - throw new errors_1.ValueError('Could not convert typed search attribute to payload'); - } - // Note: this shouldn't be the case but the compiler complains without this check. - if (payload.metadata == null) { - throw new errors_1.ValueError('Missing payload metadata'); - } - // Add encoded type of search attribute to metatdata - payload.metadata['type'] = (0, encoding_1.encode)(search_attributes_1.TypedSearchAttributes.toMetadataType(attr.type)); - return payload; - } - // Note: type casting undefined values is not clear to caller. - // We can't change the typing of the method to return undefined, it's not allowed by the interface. - fromPayload(payload) { - if (payload.metadata == null) { - throw new errors_1.ValueError('Missing payload metadata'); - } - // If no 'type' metadata field or no given value, we skip. - if (payload.metadata.type == null) { - return undefined; - } - const type = search_attributes_1.TypedSearchAttributes.toSearchAttributeType((0, encoding_1.decode)(payload.metadata.type)); - // Unrecognized metadata type (sanity check). - if (type === undefined) { - return undefined; - } - let value = this.jsonConverter.fromPayload(payload); - // Handle legacy values without KEYWORD_LIST type. - if (type !== search_attributes_1.SearchAttributeType.KEYWORD_LIST && Array.isArray(value)) { - // Cannot have an array with multiple values for non-KEYWORD_LIST type. - if (value.length > 1) { - return undefined; - } - // Unpack single value array. - value = value[0]; - } - if (type === search_attributes_1.SearchAttributeType.DATETIME && value) { - value = new Date(value); - } - // Check if the value is a valid for the given type. If not, skip. - if (!(0, search_attributes_1.isValidValueForType)(type, value)) { - return undefined; - } - return new search_attributes_1.TypedSearchAttributeValue(type, value); - } -} -exports.TypedSearchAttributePayloadConverter = TypedSearchAttributePayloadConverter; -exports.typedSearchAttributePayloadConverter = new TypedSearchAttributePayloadConverter(); -// If both params are provided, conflicting keys will be overwritten by typedSearchAttributes. -function encodeUnifiedSearchAttributes(searchAttributes, // eslint-disable-line @typescript-eslint/no-deprecated -typedSearchAttributes) { - return { - ...(searchAttributes ? (0, payload_converter_1.mapToPayloads)(exports.searchAttributePayloadConverter, searchAttributes) : {}), - ...(typedSearchAttributes - ? (0, payload_converter_1.mapToPayloads)(exports.typedSearchAttributePayloadConverter, Object.fromEntries((Array.isArray(typedSearchAttributes) ? typedSearchAttributes : typedSearchAttributes.getAll()).map((pair) => { - return [pair.key.name, new search_attributes_1.TypedSearchAttributeUpdateValue(pair.key.type, pair.value)]; - }))) - : {}), - }; -} -// eslint-disable-next-line @typescript-eslint/no-deprecated -function decodeSearchAttributes(indexedFields) { - if (!indexedFields) - return {}; - return Object.fromEntries( - // eslint-disable-next-line @typescript-eslint/no-deprecated - Object.entries((0, payload_converter_1.mapFromPayloads)(exports.searchAttributePayloadConverter, indexedFields)).filter(([_, v]) => v && v.length > 0) // Filter out empty arrays returned by pre 1.18 servers - ); -} -function decodeTypedSearchAttributes(indexedFields) { - return new search_attributes_1.TypedSearchAttributes(Object.entries((0, payload_converter_1.mapFromPayloads)(exports.typedSearchAttributePayloadConverter, indexedFields) ?? {}).reduce((acc, [k, attr]) => { - // Filter out undefined values from converter. - if (!attr) { - return acc; - } - const key = { name: k, type: attr.type }; - // Ensure is valid pair. - if ((0, search_attributes_1.isValidValueForType)(key.type, attr.value)) { - acc.push({ key, value: attr.value }); - } - return acc; - }, [])); -} -//# sourceMappingURL=payload-search-attributes.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/converter/payload-search-attributes.js.map b/node_modules/@temporalio/common/lib/converter/payload-search-attributes.js.map deleted file mode 100644 index 1a0ec59..0000000 --- a/node_modules/@temporalio/common/lib/converter/payload-search-attributes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"payload-search-attributes.js","sourceRoot":"","sources":["../../src/converter/payload-search-attributes.ts"],"names":[],"mappings":";;;AAqKA,sEAmBC;AAGD,wDAQC;AAED,kEAsBC;AA3ND,0CAA6C;AAC7C,sCAAuC;AAEvC,4DAS8B;AAC9B,2DAA6G;AAE7G;;GAEG;AACH,MAAa,+BAA+B;IAC1C,aAAa,GAAG,IAAI,wCAAoB,EAAE,CAAC;IAC3C,iBAAiB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IAE7C,SAAS,CAAC,MAAe;QAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,mBAAU,CAAC,wCAAwC,CAAC,CAAC;QACjE,CAAC;QAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAC7B,MAAM,SAAS,GAAG,OAAO,UAAU,CAAC;YACpC,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;gBAC3B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;oBAC5C,IAAI,CAAC,CAAC,KAAK,YAAY,IAAI,CAAC,EAAE,CAAC;wBAC7B,MAAM,IAAI,mBAAU,CAClB,yFAAyF,KAAK,aAAa,GAAG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;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC;AAED,4DAA4D;AAC5D,SAAgB,sBAAsB,CAAC,aAAyD;IAC9F,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAC9B,OAAO,MAAM,CAAC,WAAW;IACvB,4DAA4D;IAC5D,MAAM,CAAC,OAAO,CAAC,IAAA,mCAAe,EAAC,uCAA+B,EAAE,aAAa,CAAqB,CAAC,CAAC,MAAM,CACxG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAC9B,CAAC,uDAAuD;KAC1D,CAAC;AACJ,CAAC;AAED,SAAgB,2BAA2B,CACzC,aAAyD;IAEzD,OAAO,IAAI,yCAAqB,CAC9B,MAAM,CAAC,OAAO,CACZ,IAAA,mCAAe,EACb,4CAAoC,EACpC,aAAa,CACd,IAAI,EAAE,CACR,CAAC,MAAM,CAAwB,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE;QACjD,8CAA8C;QAC9C,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,GAAG,CAAC;QACb,CAAC;QACD,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;QACzC,wBAAwB;QACxB,IAAI,IAAA,uCAAmB,EAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9C,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAyB,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CACP,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/converter/protobuf-payload-converters.d.ts b/node_modules/@temporalio/common/lib/converter/protobuf-payload-converters.d.ts deleted file mode 100644 index 5cc5118..0000000 --- a/node_modules/@temporalio/common/lib/converter/protobuf-payload-converters.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { Root, Type } from 'protobufjs'; -import { Payload } from '../interfaces'; -import { CompositePayloadConverter, PayloadConverterWithEncoding } from './payload-converter'; -declare abstract class ProtobufPayloadConverter implements PayloadConverterWithEncoding { - protected readonly root: Root | undefined; - abstract encodingType: string; - abstract toPayload(value: T): Payload | undefined; - abstract fromPayload(payload: Payload): T; - constructor(root?: unknown); - protected validatePayload(content: Payload): { - messageType: Type; - data: Uint8Array; - }; - protected constructPayload({ messageTypeName, message }: { - messageTypeName: string; - message: Uint8Array; - }): Payload; -} -/** - * Converts between protobufjs Message instances and serialized Protobuf Payload - */ -export declare class ProtobufBinaryPayloadConverter extends ProtobufPayloadConverter { - encodingType: "binary/protobuf"; - /** - * @param root The value returned from {@link patchProtobufRoot} - */ - constructor(root?: unknown); - toPayload(value: unknown): Payload | undefined; - fromPayload(content: Payload): T; -} -/** - * Converts between protobufjs Message instances and serialized JSON Payload - */ -export declare class ProtobufJsonPayloadConverter extends ProtobufPayloadConverter { - encodingType: "json/protobuf"; - /** - * @param root The value returned from {@link patchProtobufRoot} - */ - constructor(root?: unknown); - toPayload(value: unknown): Payload | undefined; - fromPayload(content: Payload): T; -} -export interface DefaultPayloadConverterWithProtobufsOptions { - /** - * The `root` provided to {@link ProtobufJsonPayloadConverter} and {@link ProtobufBinaryPayloadConverter} - */ - protobufRoot: Record; -} -export declare class DefaultPayloadConverterWithProtobufs extends CompositePayloadConverter { - constructor({ protobufRoot }: DefaultPayloadConverterWithProtobufsOptions); -} -export {}; diff --git a/node_modules/@temporalio/common/lib/converter/protobuf-payload-converters.js b/node_modules/@temporalio/common/lib/converter/protobuf-payload-converters.js deleted file mode 100644 index 09c14b5..0000000 --- a/node_modules/@temporalio/common/lib/converter/protobuf-payload-converters.js +++ /dev/null @@ -1,218 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DefaultPayloadConverterWithProtobufs = exports.ProtobufJsonPayloadConverter = exports.ProtobufBinaryPayloadConverter = void 0; -const protoJsonSerializer = __importStar(require("proto3-json-serializer")); -const encoding_1 = require("../encoding"); -const errors_1 = require("../errors"); -const type_helpers_1 = require("../type-helpers"); -const payload_converter_1 = require("./payload-converter"); -const types_1 = require("./types"); -const GLOBAL_BUFFER = globalThis.constructor.constructor('return globalThis.Buffer')(); -class ProtobufPayloadConverter { - root; - // Don't use type Root here because root.d.ts doesn't export Root, so users would have to type assert - constructor(root) { - if (root) { - if (!isRoot(root)) { - throw new TypeError('root must be an instance of a protobufjs Root'); - } - this.root = root; - } - } - validatePayload(content) { - if (content.data === undefined || content.data === null) { - throw new errors_1.ValueError('Got payload with no data'); - } - if (!content.metadata || !(types_1.METADATA_MESSAGE_TYPE_KEY in content.metadata)) { - throw new errors_1.ValueError(`Got protobuf payload without metadata.${types_1.METADATA_MESSAGE_TYPE_KEY}`); - } - if (!this.root) { - throw new errors_1.PayloadConverterError('Unable to deserialize protobuf message without `root` being provided'); - } - const messageTypeName = (0, encoding_1.decode)(content.metadata[types_1.METADATA_MESSAGE_TYPE_KEY]); - let messageType; - try { - messageType = this.root.lookupType(messageTypeName); - } - catch (e) { - if ((0, type_helpers_1.errorMessage)(e)?.includes('no such type')) { - throw new errors_1.PayloadConverterError(`Got a \`${messageTypeName}\` protobuf message but cannot find corresponding message class in \`root\``); - } - throw e; - } - return { messageType, data: content.data }; - } - constructPayload({ messageTypeName, message }) { - return { - metadata: { - [types_1.METADATA_ENCODING_KEY]: (0, encoding_1.encode)(this.encodingType), - [types_1.METADATA_MESSAGE_TYPE_KEY]: (0, encoding_1.encode)(messageTypeName), - }, - data: message, - }; - } -} -/** - * Converts between protobufjs Message instances and serialized Protobuf Payload - */ -class ProtobufBinaryPayloadConverter extends ProtobufPayloadConverter { - encodingType = types_1.encodingTypes.METADATA_ENCODING_PROTOBUF; - /** - * @param root The value returned from {@link patchProtobufRoot} - */ - constructor(root) { - super(root); - } - toPayload(value) { - if (!isProtobufMessage(value)) { - return undefined; - } - return this.constructPayload({ - messageTypeName: getNamespacedTypeName(value.$type), - message: value.$type.encode(value).finish(), - }); - } - fromPayload(content) { - const { messageType, data } = this.validatePayload(content); - // Wrap with Uint8Array from this context to ensure `instanceof` works - const localData = data ? new Uint8Array(data.buffer, data.byteOffset, data.length) : data; - return messageType.decode(localData); - } -} -exports.ProtobufBinaryPayloadConverter = ProtobufBinaryPayloadConverter; -/** - * Converts between protobufjs Message instances and serialized JSON Payload - */ -class ProtobufJsonPayloadConverter extends ProtobufPayloadConverter { - encodingType = types_1.encodingTypes.METADATA_ENCODING_PROTOBUF_JSON; - /** - * @param root The value returned from {@link patchProtobufRoot} - */ - constructor(root) { - super(root); - } - toPayload(value) { - if (!isProtobufMessage(value)) { - return undefined; - } - const hasBufferChanged = setBufferInGlobal(); - try { - const jsonValue = protoJsonSerializer.toProto3JSON(value); - return this.constructPayload({ - messageTypeName: getNamespacedTypeName(value.$type), - message: (0, encoding_1.encode)(JSON.stringify(jsonValue)), - }); - } - finally { - resetBufferInGlobal(hasBufferChanged); - } - } - fromPayload(content) { - const hasBufferChanged = setBufferInGlobal(); - try { - const { messageType, data } = this.validatePayload(content); - const res = protoJsonSerializer.fromProto3JSON(messageType, JSON.parse((0, encoding_1.decode)(data))); - if (Buffer.isBuffer(res)) { - return new Uint8Array(res); - } - replaceBuffers(res); - return res; - } - finally { - resetBufferInGlobal(hasBufferChanged); - } - } -} -exports.ProtobufJsonPayloadConverter = ProtobufJsonPayloadConverter; -function replaceBuffers(obj) { - const replaceBuffersImpl = (value, key, target) => { - if (Buffer.isBuffer(value)) { - target[key] = new Uint8Array(value); - } - else { - replaceBuffers(value); - } - }; - if (obj != null && typeof obj === 'object') { - // Performance optimization for large arrays - if (Array.isArray(obj)) { - obj.forEach(replaceBuffersImpl); - } - else { - for (const [key, value] of Object.entries(obj)) { - replaceBuffersImpl(value, key, obj); - } - } - } -} -function setBufferInGlobal() { - if (typeof globalThis.Buffer === 'undefined') { - globalThis.Buffer = GLOBAL_BUFFER; - return true; - } - return false; -} -function resetBufferInGlobal(hasChanged) { - if (hasChanged) { - delete globalThis.Buffer; - } -} -function isProtobufType(type) { - return ((0, type_helpers_1.isRecord)(type) && - // constructor.name may get mangled by minifiers; thanksfuly protobufjs also sets a className property - type.constructor.className === 'Type' && - (0, type_helpers_1.hasOwnProperties)(type, ['parent', 'name', 'create', 'encode', 'decode']) && - typeof type.name === 'string' && - typeof type.create === 'function' && - typeof type.encode === 'function' && - typeof type.decode === 'function'); -} -function isProtobufMessage(value) { - return (0, type_helpers_1.isRecord)(value) && (0, type_helpers_1.hasOwnProperty)(value, '$type') && isProtobufType(value.$type); -} -function getNamespacedTypeName(node) { - if (node.parent && !isRoot(node.parent)) { - return getNamespacedTypeName(node.parent) + '.' + node.name; - } - else { - return node.name; - } -} -function isRoot(root) { - // constructor.name may get mangled by minifiers; thanksfuly protobufjs also sets a className property - return (0, type_helpers_1.isRecord)(root) && root.constructor.className === 'Root'; -} -class DefaultPayloadConverterWithProtobufs extends payload_converter_1.CompositePayloadConverter { - // Match the order used in other SDKs. - // - // Go SDK: - // https://github.com/temporalio/sdk-go/blob/5e5645f0c550dcf717c095ae32c76a7087d2e985/converter/default_data_converter.go#L28 - constructor({ protobufRoot }) { - super(new payload_converter_1.UndefinedPayloadConverter(), new payload_converter_1.BinaryPayloadConverter(), new ProtobufJsonPayloadConverter(protobufRoot), new ProtobufBinaryPayloadConverter(protobufRoot), new payload_converter_1.JsonPayloadConverter()); - } -} -exports.DefaultPayloadConverterWithProtobufs = DefaultPayloadConverterWithProtobufs; -//# sourceMappingURL=protobuf-payload-converters.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/converter/protobuf-payload-converters.js.map b/node_modules/@temporalio/common/lib/converter/protobuf-payload-converters.js.map deleted file mode 100644 index 031a731..0000000 --- a/node_modules/@temporalio/common/lib/converter/protobuf-payload-converters.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"protobuf-payload-converters.js","sourceRoot":"","sources":["../../src/converter/protobuf-payload-converters.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4EAA8D;AAE9D,0CAA6C;AAC7C,sCAA8D;AAE9D,kDAA2F;AAC3F,2DAM6B;AAE7B,mCAA0F;AAE1F,MAAM,aAAa,GAAG,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,0BAA0B,CAAC,EAAE,CAAC;AAEvF,MAAe,wBAAwB;IAClB,IAAI,CAAmB;IAM1C,qGAAqG;IACrG,YAAY,IAAc;QACxB,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClB,MAAM,IAAI,SAAS,CAAC,+CAA+C,CAAC,CAAC;YACvE,CAAC;YAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACnB,CAAC;IACH,CAAC;IAES,eAAe,CAAC,OAAgB;QACxC,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,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AU,CAClC,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAc;IACvC,OAAO,IAAA,uBAAQ,EAAC,KAAK,CAAC,IAAI,IAAA,6BAAc,EAAC,KAAK,EAAE,OAAO,CAAC,IAAI,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1F,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAsB;IACnD,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACxC,OAAO,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC;IAC9D,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAC,IAAa;IAC3B,sGAAsG;IACtG,OAAO,IAAA,uBAAQ,EAAC,IAAI,CAAC,IAAK,IAAI,CAAC,WAAmB,CAAC,SAAS,KAAK,MAAM,CAAC;AAC1E,CAAC;AASD,MAAa,oCAAqC,SAAQ,6CAAyB;IACjF,sCAAsC;IACtC,EAAE;IACF,UAAU;IACV,6HAA6H;IAC7H,YAAY,EAAE,YAAY,EAA+C;QACvE,KAAK,CACH,IAAI,6CAAyB,EAAE,EAC/B,IAAI,0CAAsB,EAAE,EAC5B,IAAI,4BAA4B,CAAC,YAAY,CAAC,EAC9C,IAAI,8BAA8B,CAAC,YAAY,CAAC,EAChD,IAAI,wCAAoB,EAAE,CAC3B,CAAC;IACJ,CAAC;CACF;AAdD,oFAcC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/converter/types.d.ts b/node_modules/@temporalio/common/lib/converter/types.d.ts deleted file mode 100644 index 087d47e..0000000 --- a/node_modules/@temporalio/common/lib/converter/types.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export declare const METADATA_ENCODING_KEY = "encoding"; -export declare const encodingTypes: { - readonly METADATA_ENCODING_NULL: "binary/null"; - readonly METADATA_ENCODING_RAW: "binary/plain"; - readonly METADATA_ENCODING_JSON: "json/plain"; - readonly METADATA_ENCODING_PROTOBUF_JSON: "json/protobuf"; - readonly METADATA_ENCODING_PROTOBUF: "binary/protobuf"; -}; -export type EncodingType = (typeof encodingTypes)[keyof typeof encodingTypes]; -export declare const encodingKeys: { - readonly METADATA_ENCODING_NULL: Uint8Array; - readonly METADATA_ENCODING_RAW: Uint8Array; - readonly METADATA_ENCODING_JSON: Uint8Array; - readonly METADATA_ENCODING_PROTOBUF_JSON: Uint8Array; - readonly METADATA_ENCODING_PROTOBUF: Uint8Array; -}; -export declare const METADATA_MESSAGE_TYPE_KEY = "messageType"; diff --git a/node_modules/@temporalio/common/lib/converter/types.js b/node_modules/@temporalio/common/lib/converter/types.js deleted file mode 100644 index 7520946..0000000 --- a/node_modules/@temporalio/common/lib/converter/types.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.METADATA_MESSAGE_TYPE_KEY = exports.encodingKeys = exports.encodingTypes = exports.METADATA_ENCODING_KEY = void 0; -const encoding_1 = require("../encoding"); -exports.METADATA_ENCODING_KEY = 'encoding'; -exports.encodingTypes = { - METADATA_ENCODING_NULL: 'binary/null', - METADATA_ENCODING_RAW: 'binary/plain', - METADATA_ENCODING_JSON: 'json/plain', - METADATA_ENCODING_PROTOBUF_JSON: 'json/protobuf', - METADATA_ENCODING_PROTOBUF: 'binary/protobuf', -}; -exports.encodingKeys = { - METADATA_ENCODING_NULL: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_NULL), - METADATA_ENCODING_RAW: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_RAW), - METADATA_ENCODING_JSON: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_JSON), - METADATA_ENCODING_PROTOBUF_JSON: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_PROTOBUF_JSON), - METADATA_ENCODING_PROTOBUF: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_PROTOBUF), -}; -exports.METADATA_MESSAGE_TYPE_KEY = 'messageType'; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/converter/types.js.map b/node_modules/@temporalio/common/lib/converter/types.js.map deleted file mode 100644 index a20eb82..0000000 --- a/node_modules/@temporalio/common/lib/converter/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/converter/types.ts"],"names":[],"mappings":";;;AAAA,0CAAqC;AAExB,QAAA,qBAAqB,GAAG,UAAU,CAAC;AACnC,QAAA,aAAa,GAAG;IAC3B,sBAAsB,EAAE,aAAa;IACrC,qBAAqB,EAAE,cAAc;IACrC,sBAAsB,EAAE,YAAY;IACpC,+BAA+B,EAAE,eAAe;IAChD,0BAA0B,EAAE,iBAAiB;CACrC,CAAC;AAGE,QAAA,YAAY,GAAG;IAC1B,sBAAsB,EAAE,IAAA,iBAAM,EAAC,qBAAa,CAAC,sBAAsB,CAAC;IACpE,qBAAqB,EAAE,IAAA,iBAAM,EAAC,qBAAa,CAAC,qBAAqB,CAAC;IAClE,sBAAsB,EAAE,IAAA,iBAAM,EAAC,qBAAa,CAAC,sBAAsB,CAAC;IACpE,+BAA+B,EAAE,IAAA,iBAAM,EAAC,qBAAa,CAAC,+BAA+B,CAAC;IACtF,0BAA0B,EAAE,IAAA,iBAAM,EAAC,qBAAa,CAAC,0BAA0B,CAAC;CACpE,CAAC;AAEE,QAAA,yBAAyB,GAAG,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/deprecated-time.d.ts b/node_modules/@temporalio/common/lib/deprecated-time.d.ts deleted file mode 100644 index cb9b07a..0000000 --- a/node_modules/@temporalio/common/lib/deprecated-time.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { type Timestamp, Duration } from './time'; -/** - * Lossy conversion function from Timestamp to number due to possible overflow. - * If ts is null or undefined returns undefined. - * - * @hidden - * @deprecated - meant for internal use only - */ -export declare function optionalTsToMs(ts: Timestamp | null | undefined): number | undefined; -/** - * Lossy conversion function from Timestamp to number due to possible overflow - * - * @hidden - * @deprecated - meant for internal use only - * @deprecated - meant for internal use only - */ -export declare function tsToMs(ts: Timestamp | null | undefined): number; -/** - * @hidden - * @deprecated - meant for internal use only - */ -export declare function msNumberToTs(millis: number): Timestamp; -/** - * @hidden - * @deprecated - meant for internal use only - */ -export declare function msToTs(str: Duration): Timestamp; -/** - * @hidden - * @deprecated - meant for internal use only - */ -export declare function msOptionalToTs(str: Duration | undefined): Timestamp | undefined; -/** - * @hidden - * @deprecated - meant for internal use only - */ -export declare function msOptionalToNumber(val: Duration | undefined): number | undefined; -/** - * @hidden - * @deprecated - meant for internal use only - */ -export declare function msToNumber(val: Duration): number; -/** - * @hidden - * @deprecated - meant for internal use only - */ -export declare function tsToDate(ts: Timestamp): Date; -/** - * @hidden - * @deprecated - meant for internal use only - */ -export declare function optionalTsToDate(ts: Timestamp | null | undefined): Date | undefined; diff --git a/node_modules/@temporalio/common/lib/deprecated-time.js b/node_modules/@temporalio/common/lib/deprecated-time.js deleted file mode 100644 index dd08169..0000000 --- a/node_modules/@temporalio/common/lib/deprecated-time.js +++ /dev/null @@ -1,105 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.optionalTsToMs = optionalTsToMs; -exports.tsToMs = tsToMs; -exports.msNumberToTs = msNumberToTs; -exports.msToTs = msToTs; -exports.msOptionalToTs = msOptionalToTs; -exports.msOptionalToNumber = msOptionalToNumber; -exports.msToNumber = msToNumber; -exports.tsToDate = tsToDate; -exports.optionalTsToDate = optionalTsToDate; -const time = __importStar(require("./time")); -/** - * Lossy conversion function from Timestamp to number due to possible overflow. - * If ts is null or undefined returns undefined. - * - * @hidden - * @deprecated - meant for internal use only - */ -function optionalTsToMs(ts) { - return time.optionalTsToMs(ts); -} -/** - * Lossy conversion function from Timestamp to number due to possible overflow - * - * @hidden - * @deprecated - meant for internal use only - * @deprecated - meant for internal use only - */ -function tsToMs(ts) { - return time.tsToMs(ts); -} -/** - * @hidden - * @deprecated - meant for internal use only - */ -function msNumberToTs(millis) { - return time.msNumberToTs(millis); -} -/** - * @hidden - * @deprecated - meant for internal use only - */ -function msToTs(str) { - return time.msToTs(str); -} -/** - * @hidden - * @deprecated - meant for internal use only - */ -function msOptionalToTs(str) { - return time.msOptionalToTs(str); -} -/** - * @hidden - * @deprecated - meant for internal use only - */ -function msOptionalToNumber(val) { - return time.msOptionalToNumber(val); -} -/** - * @hidden - * @deprecated - meant for internal use only - */ -function msToNumber(val) { - return time.msToNumber(val); -} -/** - * @hidden - * @deprecated - meant for internal use only - */ -function tsToDate(ts) { - return time.tsToDate(ts); -} -/** - * @hidden - * @deprecated - meant for internal use only - */ -function optionalTsToDate(ts) { - return time.optionalTsToDate(ts); -} -//# sourceMappingURL=deprecated-time.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/deprecated-time.js.map b/node_modules/@temporalio/common/lib/deprecated-time.js.map deleted file mode 100644 index ee15488..0000000 --- a/node_modules/@temporalio/common/lib/deprecated-time.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"deprecated-time.js","sourceRoot":"","sources":["../src/deprecated-time.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAUA,wCAEC;AASD,wBAEC;AAMD,oCAEC;AAMD,wBAEC;AAMD,wCAEC;AAMD,gDAEC;AAMD,gCAEC;AAMD,4BAEC;AAMD,4CAEC;AA/ED,6CAA+B;AAG/B;;;;;;GAMG;AACH,SAAgB,cAAc,CAAC,EAAgC;IAC7D,OAAO,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,MAAM,CAAC,EAAgC;IACrD,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACzB,CAAC;AAED;;;GAGG;AACH,SAAgB,YAAY,CAAC,MAAc;IACzC,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC;AAED;;;GAGG;AACH,SAAgB,MAAM,CAAC,GAAa;IAClC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC;AAED;;;GAGG;AACH,SAAgB,cAAc,CAAC,GAAyB;IACtD,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AAClC,CAAC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,GAAyB;IAC1D,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,SAAgB,UAAU,CAAC,GAAa;IACtC,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,SAAgB,QAAQ,CAAC,EAAa;IACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC3B,CAAC;AAED;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,EAAgC;IAC/D,OAAO,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;AACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/encoding.d.ts b/node_modules/@temporalio/common/lib/encoding.d.ts deleted file mode 100644 index 760f6ec..0000000 --- a/node_modules/@temporalio/common/lib/encoding.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export declare class TextDecoder { - decode(inputArrayOrBuffer: Uint8Array | ArrayBuffer | SharedArrayBuffer): string; -} -export declare class TextEncoder { - encode(inputString: string): Uint8Array; - encodeInto(inputString: string, u8Arr: Uint8Array): { - written: number; - read: number; - }; -} -/** - * Encode a UTF-8 string into a Uint8Array - */ -export declare function encode(s: string): Uint8Array; -/** - * Decode a Uint8Array into a UTF-8 string - */ -export declare function decode(a: Uint8Array): string; diff --git a/node_modules/@temporalio/common/lib/encoding.js b/node_modules/@temporalio/common/lib/encoding.js deleted file mode 100644 index c64df1d..0000000 --- a/node_modules/@temporalio/common/lib/encoding.js +++ /dev/null @@ -1,280 +0,0 @@ -"use strict"; -// Pasted with modifications from: https://raw.githubusercontent.com/anonyco/FastestSmallestTextEncoderDecoder/master/EncoderDecoderTogether.src.js -/* eslint no-fallthrough: 0 */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TextEncoder = exports.TextDecoder = void 0; -exports.encode = encode; -exports.decode = decode; -const fromCharCode = String.fromCharCode; -const encoderRegexp = /[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g; -const tmpBufferU16 = new Uint16Array(32); -class TextDecoder { - decode(inputArrayOrBuffer) { - const inputAs8 = inputArrayOrBuffer instanceof Uint8Array ? inputArrayOrBuffer : new Uint8Array(inputArrayOrBuffer); - let resultingString = '', tmpStr = '', index = 0, nextEnd = 0, cp0 = 0, codePoint = 0, minBits = 0, cp1 = 0, pos = 0, tmp = -1; - const len = inputAs8.length | 0; - const lenMinus32 = (len - 32) | 0; - // Note that tmp represents the 2nd half of a surrogate pair incase a surrogate gets divided between blocks - for (; index < len;) { - nextEnd = index <= lenMinus32 ? 32 : (len - index) | 0; - for (; pos < nextEnd; index = (index + 1) | 0, pos = (pos + 1) | 0) { - // @ts-expect-error ignoring unchecked index - cp0 = inputAs8[index] & 0xff; - switch (cp0 >> 4) { - case 15: - // @ts-expect-error ignoring unchecked index - cp1 = inputAs8[(index = (index + 1) | 0)] & 0xff; - if (cp1 >> 6 !== 0b10 || 0b11110111 < cp0) { - index = (index - 1) | 0; - break; - } - codePoint = ((cp0 & 0b111) << 6) | (cp1 & 0b00111111); - minBits = 5; // 20 ensures it never passes -> all invalid replacements - cp0 = 0x100; // keep track of th bit size - case 14: - // @ts-expect-error ignoring unchecked index - cp1 = inputAs8[(index = (index + 1) | 0)] & 0xff; - codePoint <<= 6; - codePoint |= ((cp0 & 0b1111) << 6) | (cp1 & 0b00111111); - minBits = cp1 >> 6 === 0b10 ? (minBits + 4) | 0 : 24; // 24 ensures it never passes -> all invalid replacements - cp0 = (cp0 + 0x100) & 0x300; // keep track of th bit size - case 13: - case 12: - // @ts-expect-error ignoring unchecked index - cp1 = inputAs8[(index = (index + 1) | 0)] & 0xff; - codePoint <<= 6; - codePoint |= ((cp0 & 0b11111) << 6) | (cp1 & 0b00111111); - minBits = (minBits + 7) | 0; - // Now, process the code point - if (index < len && cp1 >> 6 === 0b10 && codePoint >> minBits && codePoint < 0x110000) { - cp0 = codePoint; - codePoint = (codePoint - 0x10000) | 0; - if (0 <= codePoint /*0xffff < codePoint*/) { - // BMP code point - //nextEnd = nextEnd - 1|0; - tmp = ((codePoint >> 10) + 0xd800) | 0; // highSurrogate - cp0 = ((codePoint & 0x3ff) + 0xdc00) | 0; // lowSurrogate (will be inserted later in the switch-statement) - if (pos < 31) { - // notice 31 instead of 32 - tmpBufferU16[pos] = tmp; - pos = (pos + 1) | 0; - tmp = -1; - } - else { - // else, we are at the end of the inputAs8 and let tmp0 be filled in later on - // NOTE that cp1 is being used as a temporary variable for the swapping of tmp with cp0 - cp1 = tmp; - tmp = cp0; - cp0 = cp1; - } - } - else - nextEnd = (nextEnd + 1) | 0; // because we are advancing i without advancing pos - } - else { - // invalid code point means replacing the whole thing with null replacement characters - cp0 >>= 8; - index = (index - cp0 - 1) | 0; // reset index back to what it was before - cp0 = 0xfffd; - } - // Finally, reset the variables for the next go-around - minBits = 0; - codePoint = 0; - nextEnd = index <= lenMinus32 ? 32 : (len - index) | 0; - /*case 11: - case 10: - case 9: - case 8: - codePoint ? codePoint = 0 : cp0 = 0xfffd; // fill with invalid replacement character - case 7: - case 6: - case 5: - case 4: - case 3: - case 2: - case 1: - case 0: - tmpBufferU16[pos] = cp0; - continue;*/ - default: // fill with invalid replacement character - tmpBufferU16[pos] = cp0; - continue; - case 11: - case 10: - case 9: - case 8: - } - tmpBufferU16[pos] = 0xfffd; // fill with invalid replacement character - } - tmpStr += fromCharCode( - // @ts-expect-error ignoring unchecked index - tmpBufferU16[0], tmpBufferU16[1], tmpBufferU16[2], tmpBufferU16[3], tmpBufferU16[4], tmpBufferU16[5], tmpBufferU16[6], tmpBufferU16[7], tmpBufferU16[8], tmpBufferU16[9], tmpBufferU16[10], tmpBufferU16[11], tmpBufferU16[12], tmpBufferU16[13], tmpBufferU16[14], tmpBufferU16[15], tmpBufferU16[16], tmpBufferU16[17], tmpBufferU16[18], tmpBufferU16[19], tmpBufferU16[20], tmpBufferU16[21], tmpBufferU16[22], tmpBufferU16[23], tmpBufferU16[24], tmpBufferU16[25], tmpBufferU16[26], tmpBufferU16[27], tmpBufferU16[28], tmpBufferU16[29], tmpBufferU16[30], tmpBufferU16[31]); - if (pos < 32) - tmpStr = tmpStr.slice(0, (pos - 32) | 0); //-(32-pos)); - if (index < len) { - //fromCharCode.apply(0, tmpBufferU16 : Uint8Array ? tmpBufferU16.subarray(0,pos) : tmpBufferU16.slice(0,pos)); - tmpBufferU16[0] = tmp; - pos = ~tmp >>> 31; //tmp !== -1 ? 1 : 0; - tmp = -1; - if (tmpStr.length < resultingString.length) - continue; - } - else if (tmp !== -1) { - tmpStr += fromCharCode(tmp); - } - resultingString += tmpStr; - tmpStr = ''; - } - return resultingString; - } -} -exports.TextDecoder = TextDecoder; -////////////////////////////////////////////////////////////////////////////////////// -function encoderReplacer(nonAsciiChars) { - // make the UTF string into a binary UTF-8 encoded string - let point = nonAsciiChars.charCodeAt(0) | 0; - if (0xd800 <= point) { - if (point <= 0xdbff) { - const nextcode = nonAsciiChars.charCodeAt(1) | 0; // defaults to 0 when NaN, causing null replacement character - if (0xdc00 <= nextcode && nextcode <= 0xdfff) { - //point = ((point - 0xD800)<<10) + nextcode - 0xDC00 + 0x10000|0; - point = ((point << 10) + nextcode - 0x35fdc00) | 0; - if (point > 0xffff) - return fromCharCode((0x1e /*0b11110*/ << 3) | (point >> 18), (0x2 /*0b10*/ << 6) | ((point >> 12) & 0x3f) /*0b00111111*/, (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/, (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/); - } - else - point = 65533 /*0b1111111111111101*/; //return '\xEF\xBF\xBD';//fromCharCode(0xef, 0xbf, 0xbd); - } - else if (point <= 0xdfff) { - point = 65533 /*0b1111111111111101*/; //return '\xEF\xBF\xBD';//fromCharCode(0xef, 0xbf, 0xbd); - } - } - /*if (point <= 0x007f) return nonAsciiChars; - else */ if (point <= 0x07ff) { - return fromCharCode((0x6 << 5) | (point >> 6), (0x2 << 6) | (point & 0x3f)); - } - else - return fromCharCode((0xe /*0b1110*/ << 4) | (point >> 12), (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/, (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/); -} -class TextEncoder { - encode(inputString) { - // 0xc0 => 0b11000000; 0xff => 0b11111111; 0xc0-0xff => 0b11xxxxxx - // 0x80 => 0b10000000; 0xbf => 0b10111111; 0x80-0xbf => 0b10xxxxxx - const encodedString = inputString === void 0 ? '' : '' + inputString, len = encodedString.length | 0; - let result = new Uint8Array(((len << 1) + 8) | 0); - let tmpResult; - let i = 0, pos = 0, point = 0, nextcode = 0; - let upgradededArraySize = !Uint8Array; // normal arrays are auto-expanding - for (i = 0; i < len; i = (i + 1) | 0, pos = (pos + 1) | 0) { - point = encodedString.charCodeAt(i) | 0; - if (point <= 0x007f) { - result[pos] = point; - } - else if (point <= 0x07ff) { - result[pos] = (0x6 << 5) | (point >> 6); - result[(pos = (pos + 1) | 0)] = (0x2 << 6) | (point & 0x3f); - } - else { - widenCheck: { - if (0xd800 <= point) { - if (point <= 0xdbff) { - nextcode = encodedString.charCodeAt((i = (i + 1) | 0)) | 0; // defaults to 0 when NaN, causing null replacement character - if (0xdc00 <= nextcode && nextcode <= 0xdfff) { - //point = ((point - 0xD800)<<10) + nextcode - 0xDC00 + 0x10000|0; - point = ((point << 10) + nextcode - 0x35fdc00) | 0; - if (point > 0xffff) { - result[pos] = (0x1e /*0b11110*/ << 3) | (point >> 18); - result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | ((point >> 12) & 0x3f) /*0b00111111*/; - result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/; - result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/; - continue; - } - break widenCheck; - } - point = 65533 /*0b1111111111111101*/; //return '\xEF\xBF\xBD';//fromCharCode(0xef, 0xbf, 0xbd); - } - else if (point <= 0xdfff) { - point = 65533 /*0b1111111111111101*/; //return '\xEF\xBF\xBD';//fromCharCode(0xef, 0xbf, 0xbd); - } - } - if (!upgradededArraySize && i << 1 < pos && i << 1 < ((pos - 7) | 0)) { - upgradededArraySize = true; - tmpResult = new Uint8Array(len * 3); - tmpResult.set(result); - result = tmpResult; - } - } - result[pos] = (0xe /*0b1110*/ << 4) | (point >> 12); - result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/; - result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/; - } - } - return Uint8Array ? result.subarray(0, pos) : result.slice(0, pos); - } - encodeInto(inputString, u8Arr) { - const encodedString = inputString === void 0 ? '' : ('' + inputString).replace(encoderRegexp, encoderReplacer); - let len = encodedString.length | 0, i = 0, char = 0, read = 0; - const u8ArrLen = u8Arr.length | 0; - const inputLength = inputString.length | 0; - if (u8ArrLen < len) - len = u8ArrLen; - putChars: { - for (; i < len; i = (i + 1) | 0) { - char = encodedString.charCodeAt(i) | 0; - switch (char >> 4) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - read = (read + 1) | 0; - // extension points: - case 8: - case 9: - case 10: - case 11: - break; - case 12: - case 13: - if (((i + 1) | 0) < u8ArrLen) { - read = (read + 1) | 0; - break; - } - case 14: - if (((i + 2) | 0) < u8ArrLen) { - //if (!(char === 0xEF && encodedString.substr(i+1|0,2) === "\xBF\xBD")) - read = (read + 1) | 0; - break; - } - case 15: - if (((i + 3) | 0) < u8ArrLen) { - read = (read + 1) | 0; - break; - } - default: - break putChars; - } - //read = read + ((char >> 6) !== 2) |0; - u8Arr[i] = char; - } - } - return { written: i, read: inputLength < read ? inputLength : read }; - } -} -exports.TextEncoder = TextEncoder; -/** - * Encode a UTF-8 string into a Uint8Array - */ -function encode(s) { - return TextEncoder.prototype.encode(s); -} -/** - * Decode a Uint8Array into a UTF-8 string - */ -function decode(a) { - return TextDecoder.prototype.decode(a); -} -//# sourceMappingURL=encoding.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/encoding.js.map b/node_modules/@temporalio/common/lib/encoding.js.map deleted file mode 100644 index edbc83c..0000000 --- a/node_modules/@temporalio/common/lib/encoding.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encoding.js","sourceRoot":"","sources":["../src/encoding.ts"],"names":[],"mappings":";AAAA,mJAA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ACR,CAAC;oBACH;wBACE,MAAM,QAAQ,CAAC;gBACnB,CAAC;gBACD,uCAAuC;gBACvC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;YAClB,CAAC;QACH,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACvE,CAAC;CACF;AAhHD,kCAgHC;AAED;;GAEG;AACH,SAAgB,MAAM,CAAC,CAAS;IAC9B,OAAO,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,SAAgB,MAAM,CAAC,CAAa;IAClC,OAAO,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/errors.d.ts b/node_modules/@temporalio/common/lib/errors.d.ts deleted file mode 100644 index 85316f4..0000000 --- a/node_modules/@temporalio/common/lib/errors.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Thrown from code that receives a value that is unexpected or that it's unable to handle. - */ -export declare class ValueError extends Error { - readonly cause?: unknown; - constructor(message: string | undefined, cause?: unknown); -} -/** - * Thrown when a Payload Converter is misconfigured. - */ -export declare class PayloadConverterError extends ValueError { -} -/** - * Signals that a requested operation can't be completed because it is illegal given the - * current state of the object; e.g. trying to use a resource after it has been closed. - */ -export declare class IllegalStateError extends Error { -} -/** - * Thrown when a Workflow with the given Id is not known to Temporal Server. - * It could be because: - * - Id passed is incorrect - * - Workflow is closed (for some calls, e.g. `terminate`) - * - Workflow was deleted from the Server after reaching its retention limit - */ -export declare class WorkflowNotFoundError extends Error { - readonly workflowId: string; - readonly runId: string | undefined; - constructor(message: string, workflowId: string, runId: string | undefined); -} -/** - * Thrown when the specified namespace is not known to Temporal Server. - */ -export declare class NamespaceNotFoundError extends Error { - readonly namespace: string; - constructor(namespace: string); -} -/** - * Throw this error from an Activity in order to make the Worker forget about this Activity. - * - * The Activity can then be completed asynchronously (from anywhere—usually outside the Worker) using - * the Client's activity handle. - * - * @example - * - * ```ts - *import { CompleteAsyncError } from '@temporalio/activity'; - * - *export async function myActivity(): Promise { - * // ... - * throw new CompleteAsyncError(); - *} - * ``` - */ -export declare class CompleteAsyncError extends Error { -} diff --git a/node_modules/@temporalio/common/lib/errors.js b/node_modules/@temporalio/common/lib/errors.js deleted file mode 100644 index 69e2870..0000000 --- a/node_modules/@temporalio/common/lib/errors.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CompleteAsyncError = exports.NamespaceNotFoundError = exports.WorkflowNotFoundError = exports.IllegalStateError = exports.PayloadConverterError = exports.ValueError = void 0; -const type_helpers_1 = require("./type-helpers"); -/** - * Thrown from code that receives a value that is unexpected or that it's unable to handle. - */ -let ValueError = class ValueError extends Error { - cause; - constructor(message, cause) { - super(message ?? undefined); - this.cause = cause; - } -}; -exports.ValueError = ValueError; -exports.ValueError = ValueError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('ValueError') -], ValueError); -/** - * Thrown when a Payload Converter is misconfigured. - */ -let PayloadConverterError = class PayloadConverterError extends ValueError { -}; -exports.PayloadConverterError = PayloadConverterError; -exports.PayloadConverterError = PayloadConverterError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('PayloadConverterError') -], PayloadConverterError); -/** - * Signals that a requested operation can't be completed because it is illegal given the - * current state of the object; e.g. trying to use a resource after it has been closed. - */ -let IllegalStateError = class IllegalStateError extends Error { -}; -exports.IllegalStateError = IllegalStateError; -exports.IllegalStateError = IllegalStateError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('IllegalStateError') -], IllegalStateError); -/** - * Thrown when a Workflow with the given Id is not known to Temporal Server. - * It could be because: - * - Id passed is incorrect - * - Workflow is closed (for some calls, e.g. `terminate`) - * - Workflow was deleted from the Server after reaching its retention limit - */ -let WorkflowNotFoundError = class WorkflowNotFoundError extends Error { - workflowId; - runId; - constructor(message, workflowId, runId) { - super(message); - this.workflowId = workflowId; - this.runId = runId; - } -}; -exports.WorkflowNotFoundError = WorkflowNotFoundError; -exports.WorkflowNotFoundError = WorkflowNotFoundError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('WorkflowNotFoundError') -], WorkflowNotFoundError); -/** - * Thrown when the specified namespace is not known to Temporal Server. - */ -let NamespaceNotFoundError = class NamespaceNotFoundError extends Error { - namespace; - constructor(namespace) { - super(`Namespace not found: '${namespace}'`); - this.namespace = namespace; - } -}; -exports.NamespaceNotFoundError = NamespaceNotFoundError; -exports.NamespaceNotFoundError = NamespaceNotFoundError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('NamespaceNotFoundError') -], NamespaceNotFoundError); -/** - * Throw this error from an Activity in order to make the Worker forget about this Activity. - * - * The Activity can then be completed asynchronously (from anywhere—usually outside the Worker) using - * the Client's activity handle. - * - * @example - * - * ```ts - *import { CompleteAsyncError } from '@temporalio/activity'; - * - *export async function myActivity(): Promise { - * // ... - * throw new CompleteAsyncError(); - *} - * ``` - */ -let CompleteAsyncError = class CompleteAsyncError extends Error { -}; -exports.CompleteAsyncError = CompleteAsyncError; -exports.CompleteAsyncError = CompleteAsyncError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('CompleteAsyncError') -], CompleteAsyncError); -//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/errors.js.map b/node_modules/@temporalio/common/lib/errors.js.map deleted file mode 100644 index f656223..0000000 --- a/node_modules/@temporalio/common/lib/errors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;;;;;;;AAAA,iDAA4D;AAE5D;;GAEG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,KAAK;IAGjB;IAFlB,YACE,OAA2B,EACX,KAAe;QAE/B,KAAK,CAAC,OAAO,IAAI,SAAS,CAAC,CAAC;QAFZ,UAAK,GAAL,KAAK,CAAU;IAGjC,CAAC;CACF,CAAA;AAPY,gCAAU;qBAAV,UAAU;IADtB,IAAA,yCAA0B,EAAC,YAAY,CAAC;GAC5B,UAAU,CAOtB;AAED;;GAEG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,UAAU;CAAG,CAAA;AAA3C,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,yCAA0B,EAAC,uBAAuB,CAAC;GACvC,qBAAqB,CAAsB;AAExD;;;GAGG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,KAAK;CAAG,CAAA;AAAlC,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,yCAA0B,EAAC,mBAAmB,CAAC;GACnC,iBAAiB,CAAiB;AAE/C;;;;;;GAMG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,KAAK;IAG5B;IACA;IAHlB,YACE,OAAe,EACC,UAAkB,EAClB,KAAyB;QAEzC,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,eAAU,GAAV,UAAU,CAAQ;QAClB,UAAK,GAAL,KAAK,CAAoB;IAG3C,CAAC;CACF,CAAA;AARY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,yCAA0B,EAAC,uBAAuB,CAAC;GACvC,qBAAqB,CAQjC;AAED;;GAEG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,KAAK;IACnB;IAA5B,YAA4B,SAAiB;QAC3C,KAAK,CAAC,yBAAyB,SAAS,GAAG,CAAC,CAAC;QADnB,cAAS,GAAT,SAAS,CAAQ;IAE7C,CAAC;CACF,CAAA;AAJY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,yCAA0B,EAAC,wBAAwB,CAAC;GACxC,sBAAsB,CAIlC;AAED;;;;;;;;;;;;;;;;GAgBG;AAEI,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,KAAK;CAAG,CAAA;AAAnC,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,yCAA0B,EAAC,oBAAoB,CAAC;GACpC,kBAAkB,CAAiB"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/failure.d.ts b/node_modules/@temporalio/common/lib/failure.d.ts deleted file mode 100644 index 0279db1..0000000 --- a/node_modules/@temporalio/common/lib/failure.d.ts +++ /dev/null @@ -1,289 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -import { Duration } from './time'; -export declare const FAILURE_SOURCE = "TypeScriptSDK"; -export type ProtoFailure = temporal.api.failure.v1.IFailure; -export declare const TimeoutType: { - readonly START_TO_CLOSE: "START_TO_CLOSE"; - readonly SCHEDULE_TO_START: "SCHEDULE_TO_START"; - readonly SCHEDULE_TO_CLOSE: "SCHEDULE_TO_CLOSE"; - readonly HEARTBEAT: "HEARTBEAT"; - /** @deprecated Use {@link START_TO_CLOSE} instead. */ - readonly TIMEOUT_TYPE_START_TO_CLOSE: "START_TO_CLOSE"; - /** @deprecated Use {@link SCHEDULE_TO_START} instead. */ - readonly TIMEOUT_TYPE_SCHEDULE_TO_START: "SCHEDULE_TO_START"; - /** @deprecated Use {@link SCHEDULE_TO_CLOSE} instead. */ - readonly TIMEOUT_TYPE_SCHEDULE_TO_CLOSE: "SCHEDULE_TO_CLOSE"; - /** @deprecated Use {@link HEARTBEAT} instead. */ - readonly TIMEOUT_TYPE_HEARTBEAT: "HEARTBEAT"; - /** @deprecated Use `undefined` instead. */ - readonly TIMEOUT_TYPE_UNSPECIFIED: undefined; -}; -export type TimeoutType = (typeof TimeoutType)[keyof typeof TimeoutType]; -export declare const encodeTimeoutType: (input: "START_TO_CLOSE" | "SCHEDULE_TO_START" | "SCHEDULE_TO_CLOSE" | "HEARTBEAT" | "TIMEOUT_TYPE_START_TO_CLOSE" | "TIMEOUT_TYPE_SCHEDULE_TO_START" | "TIMEOUT_TYPE_SCHEDULE_TO_CLOSE" | "TIMEOUT_TYPE_HEARTBEAT" | temporal.api.enums.v1.TimeoutType | null | undefined) => temporal.api.enums.v1.TimeoutType | undefined, decodeTimeoutType: (input: temporal.api.enums.v1.TimeoutType | null | undefined) => "START_TO_CLOSE" | "SCHEDULE_TO_START" | "SCHEDULE_TO_CLOSE" | "HEARTBEAT" | undefined; -export declare const RetryState: { - readonly IN_PROGRESS: "IN_PROGRESS"; - readonly NON_RETRYABLE_FAILURE: "NON_RETRYABLE_FAILURE"; - readonly TIMEOUT: "TIMEOUT"; - readonly MAXIMUM_ATTEMPTS_REACHED: "MAXIMUM_ATTEMPTS_REACHED"; - readonly RETRY_POLICY_NOT_SET: "RETRY_POLICY_NOT_SET"; - readonly INTERNAL_SERVER_ERROR: "INTERNAL_SERVER_ERROR"; - readonly CANCEL_REQUESTED: "CANCEL_REQUESTED"; - /** @deprecated Use {@link IN_PROGRESS} instead. */ - readonly RETRY_STATE_IN_PROGRESS: "IN_PROGRESS"; - /** @deprecated Use {@link NON_RETRYABLE_FAILURE} instead. */ - readonly RETRY_STATE_NON_RETRYABLE_FAILURE: "NON_RETRYABLE_FAILURE"; - /** @deprecated Use {@link TIMEOUT} instead. */ - readonly RETRY_STATE_TIMEOUT: "TIMEOUT"; - /** @deprecated Use {@link MAXIMUM_ATTEMPTS_REACHED} instead. */ - readonly RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED: "MAXIMUM_ATTEMPTS_REACHED"; - /** @deprecated Use {@link RETRY_POLICY_NOT_SET} instead. */ - readonly RETRY_STATE_RETRY_POLICY_NOT_SET: "RETRY_POLICY_NOT_SET"; - /** @deprecated Use {@link INTERNAL_SERVER_ERROR} instead. */ - readonly RETRY_STATE_INTERNAL_SERVER_ERROR: "INTERNAL_SERVER_ERROR"; - /** @deprecated Use {@link CANCEL_REQUESTED} instead. */ - readonly RETRY_STATE_CANCEL_REQUESTED: "CANCEL_REQUESTED"; - /** @deprecated Use `undefined` instead. */ - readonly RETRY_STATE_UNSPECIFIED: undefined; -}; -export type RetryState = (typeof RetryState)[keyof typeof RetryState]; -export declare const encodeRetryState: (input: "IN_PROGRESS" | "NON_RETRYABLE_FAILURE" | "TIMEOUT" | "MAXIMUM_ATTEMPTS_REACHED" | "RETRY_POLICY_NOT_SET" | "INTERNAL_SERVER_ERROR" | "CANCEL_REQUESTED" | "RETRY_STATE_IN_PROGRESS" | "RETRY_STATE_NON_RETRYABLE_FAILURE" | "RETRY_STATE_TIMEOUT" | "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" | "RETRY_STATE_RETRY_POLICY_NOT_SET" | "RETRY_STATE_INTERNAL_SERVER_ERROR" | "RETRY_STATE_CANCEL_REQUESTED" | temporal.api.enums.v1.RetryState | null | undefined) => temporal.api.enums.v1.RetryState | undefined, decodeRetryState: (input: temporal.api.enums.v1.RetryState | null | undefined) => "IN_PROGRESS" | "NON_RETRYABLE_FAILURE" | "TIMEOUT" | "MAXIMUM_ATTEMPTS_REACHED" | "RETRY_POLICY_NOT_SET" | "INTERNAL_SERVER_ERROR" | "CANCEL_REQUESTED" | undefined; -/** - * A category to describe the severity and change the observability behavior of an application failure. - * - * Currently, observability behavior changes are limited to: - * - activities that fail due to a BENIGN application failure emit DEBUG level logs and do not record metrics - * - * @experimental Category is a new feature and may be subject to change. - */ -export declare const ApplicationFailureCategory: { - readonly BENIGN: "BENIGN"; -}; -export type ApplicationFailureCategory = (typeof ApplicationFailureCategory)[keyof typeof ApplicationFailureCategory]; -export declare const encodeApplicationFailureCategory: (input: "BENIGN" | temporal.api.enums.v1.ApplicationErrorCategory | "APPLICATION_ERROR_CATEGORY_BENIGN" | null | undefined) => temporal.api.enums.v1.ApplicationErrorCategory | undefined, decodeApplicationFailureCategory: (input: temporal.api.enums.v1.ApplicationErrorCategory | null | undefined) => "BENIGN" | undefined; -export type WorkflowExecution = temporal.api.common.v1.IWorkflowExecution; -/** - * Represents failures that can cross Workflow and Activity boundaries. - * - * **Never extend this class or any of its children.** - * - * The only child class you should ever throw from your code is {@link ApplicationFailure}. - */ -export declare class TemporalFailure extends Error { - readonly cause?: Error | undefined; - /** - * The original failure that constructed this error. - * - * Only present if this error was generated from an external operation. - */ - failure?: ProtoFailure; - constructor(message?: string | undefined | null, cause?: Error | undefined); -} -/** Exceptions originated at the Temporal service. */ -export declare class ServerFailure extends TemporalFailure { - readonly nonRetryable: boolean; - constructor(message: string | undefined, nonRetryable: boolean, cause?: Error); -} -/** - * `ApplicationFailure`s are used to communicate application-specific failures in Workflows and Activities. - * - * The {@link type} property is matched against {@link RetryPolicy.nonRetryableErrorTypes} to determine if an instance - * of this error is retryable. Another way to avoid retrying is by setting the {@link nonRetryable} flag to `true`. - * - * In Workflows, if you throw a non-`ApplicationFailure`, the Workflow Task will fail and be retried. If you throw an - * `ApplicationFailure`, the Workflow Execution will fail. - * - * In Activities, you can either throw an `ApplicationFailure` or another `Error` to fail the Activity Task. In the - * latter case, the `Error` will be converted to an `ApplicationFailure`. The conversion is done as following: - * - * - `type` is set to `error.constructor?.name ?? error.name` - * - `message` is set to `error.message` - * - `nonRetryable` is set to false - * - `details` are set to null - * - stack trace is copied from the original error - * - * When an {@link https://docs.temporal.io/concepts/what-is-an-activity-execution | Activity Execution} fails, the - * `ApplicationFailure` from the last Activity Task will be the `cause` of the {@link ActivityFailure} thrown in the - * Workflow. - */ -export declare class ApplicationFailure extends TemporalFailure { - readonly type?: string | undefined | null; - readonly nonRetryable?: boolean | undefined | null; - readonly details?: unknown[] | undefined | null; - readonly nextRetryDelay?: Duration | undefined | null; - readonly category?: ApplicationFailureCategory | undefined | null; - /** - * Alternatively, use {@link fromError} or {@link create}. - */ - constructor(message?: string | undefined | null, type?: string | undefined | null, nonRetryable?: boolean | undefined | null, details?: unknown[] | undefined | null, cause?: Error, nextRetryDelay?: Duration | undefined | null, category?: ApplicationFailureCategory | undefined | null); - /** - * Create a new `ApplicationFailure` from an Error object. - * - * First calls {@link ensureApplicationFailure | `ensureApplicationFailure(error)`} and then overrides any fields - * provided in `overrides`. - */ - static fromError(error: Error | unknown, overrides?: ApplicationFailureOptions): ApplicationFailure; - /** - * Create a new `ApplicationFailure`. - * - * By default, will be retryable (unless its `type` is included in {@link RetryPolicy.nonRetryableErrorTypes}). - */ - static create(options: ApplicationFailureOptions): ApplicationFailure; - /** - * Get a new `ApplicationFailure` with the {@link nonRetryable} flag set to false. Note that this error will still - * not be retried if its `type` is included in {@link RetryPolicy.nonRetryableErrorTypes}. - * - * @param message Optional error message - * @param type Optional error type (used by {@link RetryPolicy.nonRetryableErrorTypes}) - * @param details Optional details about the failure. Serialized by the Worker's {@link PayloadConverter}. - */ - static retryable(message?: string | null, type?: string | null, ...details: unknown[]): ApplicationFailure; - /** - * Get a new `ApplicationFailure` with the {@link nonRetryable} flag set to true. - * - * When thrown from an Activity or Workflow, the Activity or Workflow will not be retried (even if `type` is not - * listed in {@link RetryPolicy.nonRetryableErrorTypes}). - * - * @param message Optional error message - * @param type Optional error type - * @param details Optional details about the failure. Serialized by the Worker's {@link PayloadConverter}. - */ - static nonRetryable(message?: string | null, type?: string | null, ...details: unknown[]): ApplicationFailure; -} -export interface ApplicationFailureOptions { - /** - * Error message - */ - message?: string; - /** - * Error type (used by {@link RetryPolicy.nonRetryableErrorTypes}) - */ - type?: string; - /** - * Whether the current Activity or Workflow can be retried - * - * @default false - */ - nonRetryable?: boolean; - /** - * Details about the failure. Serialized by the Worker's {@link PayloadConverter}. - */ - details?: unknown[]; - /** - * If set, overrides the delay until the next retry of this Activity / Workflow Task. - * - * Retry attempts will still be subject to the maximum retries limit and total time limit defined - * by the policy. - */ - nextRetryDelay?: Duration; - /** - * Cause of the failure - */ - cause?: Error; - /** - * Severity category of the application error. - * Affects worker-side logging and metrics behavior of this failure. - */ - category?: ApplicationFailureCategory; -} -/** - * This error is thrown when Cancellation has been requested. To allow Cancellation to happen, let it propagate. To - * ignore Cancellation, catch it and continue executing. Note that Cancellation can only be requested a single time, so - * your Workflow/Activity Execution will not receive further Cancellation requests. - * - * When a Workflow or Activity has been successfully cancelled, a `CancelledFailure` will be the `cause`. - */ -export declare class CancelledFailure extends TemporalFailure { - readonly details: unknown[]; - constructor(message: string | undefined, details?: unknown[], cause?: Error); -} -/** - * Used as the `cause` when a Workflow has been terminated - */ -export declare class TerminatedFailure extends TemporalFailure { - constructor(message: string | undefined, cause?: Error); -} -/** - * Used to represent timeouts of Activities and Workflows - */ -export declare class TimeoutFailure extends TemporalFailure { - readonly lastHeartbeatDetails: unknown; - readonly timeoutType: TimeoutType; - constructor(message: string | undefined, lastHeartbeatDetails: unknown, timeoutType: TimeoutType); -} -/** - * Contains information about an Activity failure. Always contains the original reason for the failure as its `cause`. - * For example, if an Activity timed out, the cause will be a {@link TimeoutFailure}. - * - * This exception is expected to be thrown only by the framework code. - */ -export declare class ActivityFailure extends TemporalFailure { - readonly activityType: string; - readonly activityId: string | undefined; - readonly retryState: RetryState; - readonly identity: string | undefined; - constructor(message: string | undefined, activityType: string, activityId: string | undefined, retryState: RetryState, identity: string | undefined, cause?: Error); -} -/** - * Contains information about a Child Workflow failure. Always contains the reason for the failure as its {@link cause}. - * For example, if the Child was Terminated, the `cause` is a {@link TerminatedFailure}. - * - * This exception is expected to be thrown only by the framework code. - */ -export declare class ChildWorkflowFailure extends TemporalFailure { - readonly namespace: string | undefined; - readonly execution: WorkflowExecution; - readonly workflowType: string; - readonly retryState: RetryState; - constructor(namespace: string | undefined, execution: WorkflowExecution, workflowType: string, retryState: RetryState, cause?: Error); -} -/** - * Thrown when a Nexus Operation executed inside a Workflow fails. - * - * @experimental Nexus support in Temporal SDK is experimental. - */ -export declare class NexusOperationFailure extends TemporalFailure { - readonly scheduledEventId: number | undefined; - readonly endpoint: string; - readonly service: string; - readonly operation: string; - readonly operationToken: string | undefined; - constructor(message: string | undefined, scheduledEventId: number | undefined, endpoint: string, service: string, operation: string, operationToken: string | undefined, cause?: Error); -} -/** - * This exception is thrown in the following cases: - * - Workflow with the same Workflow ID is currently running and the {@link WorkflowOptions.workflowIdConflictPolicy} is `WORKFLOW_ID_CONFLICT_POLICY_FAIL` - * - There is a closed Workflow with the same Workflow Id and the {@link WorkflowOptions.workflowIdReusePolicy} - * is `WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE` - * - There is closed Workflow in the `Completed` state with the same Workflow Id and the {@link WorkflowOptions.workflowIdReusePolicy} - * is `WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY` - */ -export declare class WorkflowExecutionAlreadyStartedError extends TemporalFailure { - readonly workflowId: string; - readonly workflowType: string; - constructor(message: string, workflowId: string, workflowType: string); -} -/** - * If `error` is already an `ApplicationFailure`, returns `error`. - * - * Otherwise, converts `error` into an `ApplicationFailure` with: - * - * - `message`: `error.message` or `String(error)` - * - `type`: `error.constructor.name` or `error.name` - * - `stack`: `error.stack` or `''` - */ -export declare function ensureApplicationFailure(error: unknown): ApplicationFailure; -/** - * If `err` is an Error it is turned into an `ApplicationFailure`. - * - * If `err` was already a `TemporalFailure`, returns the original error. - * - * Otherwise returns an `ApplicationFailure` with `String(err)` as the message. - */ -export declare function ensureTemporalFailure(err: unknown): TemporalFailure; -/** - * Get the root cause message of given `error`. - * - * In case `error` is a {@link TemporalFailure}, recurse the `cause` chain and return the root `cause.message`. - * Otherwise, return `error.message`. - */ -export declare function rootCause(error: unknown): string | undefined; diff --git a/node_modules/@temporalio/common/lib/failure.js b/node_modules/@temporalio/common/lib/failure.js deleted file mode 100644 index dba2b24..0000000 --- a/node_modules/@temporalio/common/lib/failure.js +++ /dev/null @@ -1,396 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var _a, _b, _c; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.WorkflowExecutionAlreadyStartedError = exports.NexusOperationFailure = exports.ChildWorkflowFailure = exports.ActivityFailure = exports.TimeoutFailure = exports.TerminatedFailure = exports.CancelledFailure = exports.ApplicationFailure = exports.ServerFailure = exports.TemporalFailure = exports.decodeApplicationFailureCategory = exports.encodeApplicationFailureCategory = exports.ApplicationFailureCategory = exports.decodeRetryState = exports.encodeRetryState = exports.RetryState = exports.decodeTimeoutType = exports.encodeTimeoutType = exports.TimeoutType = exports.FAILURE_SOURCE = void 0; -exports.ensureApplicationFailure = ensureApplicationFailure; -exports.ensureTemporalFailure = ensureTemporalFailure; -exports.rootCause = rootCause; -const type_helpers_1 = require("./type-helpers"); -const internal_workflow_1 = require("./internal-workflow"); -exports.FAILURE_SOURCE = 'TypeScriptSDK'; -exports.TimeoutType = { - START_TO_CLOSE: 'START_TO_CLOSE', - SCHEDULE_TO_START: 'SCHEDULE_TO_START', - SCHEDULE_TO_CLOSE: 'SCHEDULE_TO_CLOSE', - HEARTBEAT: 'HEARTBEAT', - /** @deprecated Use {@link START_TO_CLOSE} instead. */ - TIMEOUT_TYPE_START_TO_CLOSE: 'START_TO_CLOSE', - /** @deprecated Use {@link SCHEDULE_TO_START} instead. */ - TIMEOUT_TYPE_SCHEDULE_TO_START: 'SCHEDULE_TO_START', - /** @deprecated Use {@link SCHEDULE_TO_CLOSE} instead. */ - TIMEOUT_TYPE_SCHEDULE_TO_CLOSE: 'SCHEDULE_TO_CLOSE', - /** @deprecated Use {@link HEARTBEAT} instead. */ - TIMEOUT_TYPE_HEARTBEAT: 'HEARTBEAT', - /** @deprecated Use `undefined` instead. */ - TIMEOUT_TYPE_UNSPECIFIED: undefined, -}; -_a = (0, internal_workflow_1.makeProtoEnumConverters)({ - [exports.TimeoutType.START_TO_CLOSE]: 1, - [exports.TimeoutType.SCHEDULE_TO_START]: 2, - [exports.TimeoutType.SCHEDULE_TO_CLOSE]: 3, - [exports.TimeoutType.HEARTBEAT]: 4, - UNSPECIFIED: 0, -}, 'TIMEOUT_TYPE_'), exports.encodeTimeoutType = _a[0], exports.decodeTimeoutType = _a[1]; -exports.RetryState = { - IN_PROGRESS: 'IN_PROGRESS', - NON_RETRYABLE_FAILURE: 'NON_RETRYABLE_FAILURE', - TIMEOUT: 'TIMEOUT', - MAXIMUM_ATTEMPTS_REACHED: 'MAXIMUM_ATTEMPTS_REACHED', - RETRY_POLICY_NOT_SET: 'RETRY_POLICY_NOT_SET', - INTERNAL_SERVER_ERROR: 'INTERNAL_SERVER_ERROR', - CANCEL_REQUESTED: 'CANCEL_REQUESTED', - /** @deprecated Use {@link IN_PROGRESS} instead. */ - RETRY_STATE_IN_PROGRESS: 'IN_PROGRESS', - /** @deprecated Use {@link NON_RETRYABLE_FAILURE} instead. */ - RETRY_STATE_NON_RETRYABLE_FAILURE: 'NON_RETRYABLE_FAILURE', - /** @deprecated Use {@link TIMEOUT} instead. */ - RETRY_STATE_TIMEOUT: 'TIMEOUT', - /** @deprecated Use {@link MAXIMUM_ATTEMPTS_REACHED} instead. */ - RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED: 'MAXIMUM_ATTEMPTS_REACHED', - /** @deprecated Use {@link RETRY_POLICY_NOT_SET} instead. */ - RETRY_STATE_RETRY_POLICY_NOT_SET: 'RETRY_POLICY_NOT_SET', - /** @deprecated Use {@link INTERNAL_SERVER_ERROR} instead. */ - RETRY_STATE_INTERNAL_SERVER_ERROR: 'INTERNAL_SERVER_ERROR', - /** @deprecated Use {@link CANCEL_REQUESTED} instead. */ - RETRY_STATE_CANCEL_REQUESTED: 'CANCEL_REQUESTED', - /** @deprecated Use `undefined` instead. */ - RETRY_STATE_UNSPECIFIED: undefined, -}; -_b = (0, internal_workflow_1.makeProtoEnumConverters)({ - [exports.RetryState.IN_PROGRESS]: 1, - [exports.RetryState.NON_RETRYABLE_FAILURE]: 2, - [exports.RetryState.TIMEOUT]: 3, - [exports.RetryState.MAXIMUM_ATTEMPTS_REACHED]: 4, - [exports.RetryState.RETRY_POLICY_NOT_SET]: 5, - [exports.RetryState.INTERNAL_SERVER_ERROR]: 6, - [exports.RetryState.CANCEL_REQUESTED]: 7, - UNSPECIFIED: 0, -}, 'RETRY_STATE_'), exports.encodeRetryState = _b[0], exports.decodeRetryState = _b[1]; -/** - * A category to describe the severity and change the observability behavior of an application failure. - * - * Currently, observability behavior changes are limited to: - * - activities that fail due to a BENIGN application failure emit DEBUG level logs and do not record metrics - * - * @experimental Category is a new feature and may be subject to change. - */ -exports.ApplicationFailureCategory = { - BENIGN: 'BENIGN', -}; -_c = (0, internal_workflow_1.makeProtoEnumConverters)({ - [exports.ApplicationFailureCategory.BENIGN]: 1, - UNSPECIFIED: 0, -}, 'APPLICATION_ERROR_CATEGORY_'), exports.encodeApplicationFailureCategory = _c[0], exports.decodeApplicationFailureCategory = _c[1]; -/** - * Represents failures that can cross Workflow and Activity boundaries. - * - * **Never extend this class or any of its children.** - * - * The only child class you should ever throw from your code is {@link ApplicationFailure}. - */ -let TemporalFailure = class TemporalFailure extends Error { - cause; - /** - * The original failure that constructed this error. - * - * Only present if this error was generated from an external operation. - */ - failure; - constructor(message, cause) { - super(message ?? undefined); - this.cause = cause; - } -}; -exports.TemporalFailure = TemporalFailure; -exports.TemporalFailure = TemporalFailure = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('TemporalFailure') -], TemporalFailure); -/** Exceptions originated at the Temporal service. */ -let ServerFailure = class ServerFailure extends TemporalFailure { - nonRetryable; - constructor(message, nonRetryable, cause) { - super(message, cause); - this.nonRetryable = nonRetryable; - } -}; -exports.ServerFailure = ServerFailure; -exports.ServerFailure = ServerFailure = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('ServerFailure') -], ServerFailure); -/** - * `ApplicationFailure`s are used to communicate application-specific failures in Workflows and Activities. - * - * The {@link type} property is matched against {@link RetryPolicy.nonRetryableErrorTypes} to determine if an instance - * of this error is retryable. Another way to avoid retrying is by setting the {@link nonRetryable} flag to `true`. - * - * In Workflows, if you throw a non-`ApplicationFailure`, the Workflow Task will fail and be retried. If you throw an - * `ApplicationFailure`, the Workflow Execution will fail. - * - * In Activities, you can either throw an `ApplicationFailure` or another `Error` to fail the Activity Task. In the - * latter case, the `Error` will be converted to an `ApplicationFailure`. The conversion is done as following: - * - * - `type` is set to `error.constructor?.name ?? error.name` - * - `message` is set to `error.message` - * - `nonRetryable` is set to false - * - `details` are set to null - * - stack trace is copied from the original error - * - * When an {@link https://docs.temporal.io/concepts/what-is-an-activity-execution | Activity Execution} fails, the - * `ApplicationFailure` from the last Activity Task will be the `cause` of the {@link ActivityFailure} thrown in the - * Workflow. - */ -let ApplicationFailure = class ApplicationFailure extends TemporalFailure { - type; - nonRetryable; - details; - nextRetryDelay; - category; - /** - * Alternatively, use {@link fromError} or {@link create}. - */ - constructor(message, type, nonRetryable, details, cause, nextRetryDelay, category) { - super(message, cause); - this.type = type; - this.nonRetryable = nonRetryable; - this.details = details; - this.nextRetryDelay = nextRetryDelay; - this.category = category; - } - /** - * Create a new `ApplicationFailure` from an Error object. - * - * First calls {@link ensureApplicationFailure | `ensureApplicationFailure(error)`} and then overrides any fields - * provided in `overrides`. - */ - static fromError(error, overrides) { - const failure = ensureApplicationFailure(error); - Object.assign(failure, overrides); - return failure; - } - /** - * Create a new `ApplicationFailure`. - * - * By default, will be retryable (unless its `type` is included in {@link RetryPolicy.nonRetryableErrorTypes}). - */ - static create(options) { - const { message, type, nonRetryable = false, details, nextRetryDelay, cause, category } = options; - return new this(message, type, nonRetryable, details, cause, nextRetryDelay, category); - } - /** - * Get a new `ApplicationFailure` with the {@link nonRetryable} flag set to false. Note that this error will still - * not be retried if its `type` is included in {@link RetryPolicy.nonRetryableErrorTypes}. - * - * @param message Optional error message - * @param type Optional error type (used by {@link RetryPolicy.nonRetryableErrorTypes}) - * @param details Optional details about the failure. Serialized by the Worker's {@link PayloadConverter}. - */ - static retryable(message, type, ...details) { - return new this(message, type ?? 'Error', false, details); - } - /** - * Get a new `ApplicationFailure` with the {@link nonRetryable} flag set to true. - * - * When thrown from an Activity or Workflow, the Activity or Workflow will not be retried (even if `type` is not - * listed in {@link RetryPolicy.nonRetryableErrorTypes}). - * - * @param message Optional error message - * @param type Optional error type - * @param details Optional details about the failure. Serialized by the Worker's {@link PayloadConverter}. - */ - static nonRetryable(message, type, ...details) { - return new this(message, type ?? 'Error', true, details); - } -}; -exports.ApplicationFailure = ApplicationFailure; -exports.ApplicationFailure = ApplicationFailure = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('ApplicationFailure') -], ApplicationFailure); -/** - * This error is thrown when Cancellation has been requested. To allow Cancellation to happen, let it propagate. To - * ignore Cancellation, catch it and continue executing. Note that Cancellation can only be requested a single time, so - * your Workflow/Activity Execution will not receive further Cancellation requests. - * - * When a Workflow or Activity has been successfully cancelled, a `CancelledFailure` will be the `cause`. - */ -let CancelledFailure = class CancelledFailure extends TemporalFailure { - details; - constructor(message, details = [], cause) { - super(message, cause); - this.details = details; - } -}; -exports.CancelledFailure = CancelledFailure; -exports.CancelledFailure = CancelledFailure = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('CancelledFailure') -], CancelledFailure); -/** - * Used as the `cause` when a Workflow has been terminated - */ -let TerminatedFailure = class TerminatedFailure extends TemporalFailure { - constructor(message, cause) { - super(message, cause); - } -}; -exports.TerminatedFailure = TerminatedFailure; -exports.TerminatedFailure = TerminatedFailure = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('TerminatedFailure') -], TerminatedFailure); -/** - * Used to represent timeouts of Activities and Workflows - */ -let TimeoutFailure = class TimeoutFailure extends TemporalFailure { - lastHeartbeatDetails; - timeoutType; - constructor(message, lastHeartbeatDetails, timeoutType) { - super(message); - this.lastHeartbeatDetails = lastHeartbeatDetails; - this.timeoutType = timeoutType; - } -}; -exports.TimeoutFailure = TimeoutFailure; -exports.TimeoutFailure = TimeoutFailure = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('TimeoutFailure') -], TimeoutFailure); -/** - * Contains information about an Activity failure. Always contains the original reason for the failure as its `cause`. - * For example, if an Activity timed out, the cause will be a {@link TimeoutFailure}. - * - * This exception is expected to be thrown only by the framework code. - */ -let ActivityFailure = class ActivityFailure extends TemporalFailure { - activityType; - activityId; - retryState; - identity; - constructor(message, activityType, activityId, retryState, identity, cause) { - super(message, cause); - this.activityType = activityType; - this.activityId = activityId; - this.retryState = retryState; - this.identity = identity; - } -}; -exports.ActivityFailure = ActivityFailure; -exports.ActivityFailure = ActivityFailure = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('ActivityFailure') -], ActivityFailure); -/** - * Contains information about a Child Workflow failure. Always contains the reason for the failure as its {@link cause}. - * For example, if the Child was Terminated, the `cause` is a {@link TerminatedFailure}. - * - * This exception is expected to be thrown only by the framework code. - */ -let ChildWorkflowFailure = class ChildWorkflowFailure extends TemporalFailure { - namespace; - execution; - workflowType; - retryState; - constructor(namespace, execution, workflowType, retryState, cause) { - super('Child Workflow execution failed', cause); - this.namespace = namespace; - this.execution = execution; - this.workflowType = workflowType; - this.retryState = retryState; - } -}; -exports.ChildWorkflowFailure = ChildWorkflowFailure; -exports.ChildWorkflowFailure = ChildWorkflowFailure = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('ChildWorkflowFailure') -], ChildWorkflowFailure); -/** - * Thrown when a Nexus Operation executed inside a Workflow fails. - * - * @experimental Nexus support in Temporal SDK is experimental. - */ -let NexusOperationFailure = class NexusOperationFailure extends TemporalFailure { - scheduledEventId; - endpoint; - service; - operation; - operationToken; - constructor(message, scheduledEventId, endpoint, service, operation, operationToken, cause) { - super(message, cause); - this.scheduledEventId = scheduledEventId; - this.endpoint = endpoint; - this.service = service; - this.operation = operation; - this.operationToken = operationToken; - } -}; -exports.NexusOperationFailure = NexusOperationFailure; -exports.NexusOperationFailure = NexusOperationFailure = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('NexusOperationFailure') -], NexusOperationFailure); -// TODO(nexus/error): Maybe add a NexusHandlerFailure class here, once we've decided on error handling. -/** - * This exception is thrown in the following cases: - * - Workflow with the same Workflow ID is currently running and the {@link WorkflowOptions.workflowIdConflictPolicy} is `WORKFLOW_ID_CONFLICT_POLICY_FAIL` - * - There is a closed Workflow with the same Workflow Id and the {@link WorkflowOptions.workflowIdReusePolicy} - * is `WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE` - * - There is closed Workflow in the `Completed` state with the same Workflow Id and the {@link WorkflowOptions.workflowIdReusePolicy} - * is `WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY` - */ -let WorkflowExecutionAlreadyStartedError = class WorkflowExecutionAlreadyStartedError extends TemporalFailure { - workflowId; - workflowType; - constructor(message, workflowId, workflowType) { - super(message); - this.workflowId = workflowId; - this.workflowType = workflowType; - } -}; -exports.WorkflowExecutionAlreadyStartedError = WorkflowExecutionAlreadyStartedError; -exports.WorkflowExecutionAlreadyStartedError = WorkflowExecutionAlreadyStartedError = __decorate([ - (0, type_helpers_1.SymbolBasedInstanceOfError)('WorkflowExecutionAlreadyStartedError') -], WorkflowExecutionAlreadyStartedError); -/** - * If `error` is already an `ApplicationFailure`, returns `error`. - * - * Otherwise, converts `error` into an `ApplicationFailure` with: - * - * - `message`: `error.message` or `String(error)` - * - `type`: `error.constructor.name` or `error.name` - * - `stack`: `error.stack` or `''` - */ -function ensureApplicationFailure(error) { - if (error instanceof ApplicationFailure) { - return error; - } - const message = ((0, type_helpers_1.isRecord)(error) && String(error.message)) || String(error); - const type = ((0, type_helpers_1.isRecord)(error) && (error.constructor?.name ?? error.name)) || undefined; - const failure = ApplicationFailure.create({ message, type, nonRetryable: false }); - failure.stack = ((0, type_helpers_1.isRecord)(error) && String(error.stack)) || ''; - return failure; -} -/** - * If `err` is an Error it is turned into an `ApplicationFailure`. - * - * If `err` was already a `TemporalFailure`, returns the original error. - * - * Otherwise returns an `ApplicationFailure` with `String(err)` as the message. - */ -function ensureTemporalFailure(err) { - if (err instanceof TemporalFailure) { - return err; - } - return ensureApplicationFailure(err); -} -/** - * Get the root cause message of given `error`. - * - * In case `error` is a {@link TemporalFailure}, recurse the `cause` chain and return the root `cause.message`. - * Otherwise, return `error.message`. - */ -function rootCause(error) { - if (error instanceof TemporalFailure) { - return error.cause ? rootCause(error.cause) : error.message; - } - return (0, type_helpers_1.errorMessage)(error); -} -//# sourceMappingURL=failure.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/failure.js.map b/node_modules/@temporalio/common/lib/failure.js.map deleted file mode 100644 index 5529724..0000000 --- a/node_modules/@temporalio/common/lib/failure.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"failure.js","sourceRoot":"","sources":["../src/failure.ts"],"names":[],"mappings":";;;;;;;;;;AA8aA,4DAUC;AASD,sDAKC;AAQD,8BAKC;AAldD,iDAAoF;AAEpF,2DAA8D;AAEjD,QAAA,cAAc,GAAG,eAAe,CAAC;AAGjC,QAAA,WAAW,GAAG;IACzB,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,SAAS,EAAE,WAAW;IAEtB,sDAAsD;IACtD,2BAA2B,EAAE,gBAAgB;IAE7C,yDAAyD;IACzD,8BAA8B,EAAE,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MG;AACH,SAAgB,qBAAqB,CAAC,GAAY;IAChD,IAAI,GAAG,YAAY,eAAe,EAAE,CAAC;QACnC,OAAO,GAAG,CAAC;IACb,CAAC;IACD,OAAO,wBAAwB,CAAC,GAAG,CAAC,CAAC;AACvC,CAAC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,KAAc;IACtC,IAAI,KAAK,YAAY,eAAe,EAAE,CAAC;QACrC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;IAC9D,CAAC;IACD,OAAO,IAAA,2BAAY,EAAC,KAAK,CAAC,CAAC;AAC7B,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/index.d.ts b/node_modules/@temporalio/common/lib/index.d.ts deleted file mode 100644 index b10af09..0000000 --- a/node_modules/@temporalio/common/lib/index.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Common library for code that's used across the Client, Worker, and/or Workflow - * - * @module - */ -export * from './activity-options'; -export { ActivityCancellationDetailsOptions, ActivityCancellationDetails } from './activity-cancellation-details'; -export { SuggestContinueAsNewReason } from './continue-as-new'; -export * from './converter/data-converter'; -export * from './converter/failure-converter'; -export * from './converter/payload-codec'; -export * from './converter/payload-converter'; -export * from './converter/types'; -export * from './deprecated-time'; -export * from './errors'; -export * from './failure'; -export { Headers, Next } from './interceptors'; -export * from './interfaces'; -export * from './logger'; -export * from './priority'; -export * from './metrics'; -export * from './retry-policy'; -export type { Timestamp, Duration, StringValue } from './time'; -export * from './worker-deployments'; -export * from './workflow-definition-options'; -export * from './workflow-handle'; -export * from './workflow-options'; -export * from './versioning-intent'; -export { SearchAttributes, // eslint-disable-line @typescript-eslint/no-deprecated -SearchAttributeValue, // eslint-disable-line @typescript-eslint/no-deprecated -SearchAttributeType, SearchAttributePair, SearchAttributeUpdatePair, TypedSearchAttributes, defineSearchAttributeKey, } from './search-attributes'; -/** - * Encode a UTF-8 string into a Uint8Array - * - * @hidden - * @deprecated - meant for internal use only - */ -export declare function u8(s: string): Uint8Array; -/** - * Decode a Uint8Array into a UTF-8 string - * - * @hidden - * @deprecated - meant for internal use only - */ -export declare function str(arr: Uint8Array): string; -/** - * Get `error.message` (or `undefined` if not present) - * - * @hidden - * @deprecated - meant for internal use only - */ -export declare function errorMessage(error: unknown): string | undefined; -/** - * Get `error.code` (or `undefined` if not present) - * - * @hidden - * @deprecated - meant for internal use only - */ -export declare function errorCode(error: unknown): string | undefined; diff --git a/node_modules/@temporalio/common/lib/index.js b/node_modules/@temporalio/common/lib/index.js deleted file mode 100644 index e74f083..0000000 --- a/node_modules/@temporalio/common/lib/index.js +++ /dev/null @@ -1,104 +0,0 @@ -"use strict"; -/** - * Common library for code that's used across the Client, Worker, and/or Workflow - * - * @module - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.defineSearchAttributeKey = exports.TypedSearchAttributes = exports.SearchAttributeType = exports.SuggestContinueAsNewReason = exports.ActivityCancellationDetails = void 0; -exports.u8 = u8; -exports.str = str; -exports.errorMessage = errorMessage; -exports.errorCode = errorCode; -const encoding = __importStar(require("./encoding")); -const helpers = __importStar(require("./type-helpers")); -__exportStar(require("./activity-options"), exports); -var activity_cancellation_details_1 = require("./activity-cancellation-details"); -Object.defineProperty(exports, "ActivityCancellationDetails", { enumerable: true, get: function () { return activity_cancellation_details_1.ActivityCancellationDetails; } }); -var continue_as_new_1 = require("./continue-as-new"); -Object.defineProperty(exports, "SuggestContinueAsNewReason", { enumerable: true, get: function () { return continue_as_new_1.SuggestContinueAsNewReason; } }); -__exportStar(require("./converter/data-converter"), exports); -__exportStar(require("./converter/failure-converter"), exports); -__exportStar(require("./converter/payload-codec"), exports); -__exportStar(require("./converter/payload-converter"), exports); -__exportStar(require("./converter/types"), exports); -__exportStar(require("./deprecated-time"), exports); -__exportStar(require("./errors"), exports); -__exportStar(require("./failure"), exports); -__exportStar(require("./interfaces"), exports); -__exportStar(require("./logger"), exports); -__exportStar(require("./priority"), exports); -__exportStar(require("./metrics"), exports); -__exportStar(require("./retry-policy"), exports); -__exportStar(require("./worker-deployments"), exports); -__exportStar(require("./workflow-definition-options"), exports); -__exportStar(require("./workflow-handle"), exports); -__exportStar(require("./workflow-options"), exports); -__exportStar(require("./versioning-intent"), exports); -var search_attributes_1 = require("./search-attributes"); -Object.defineProperty(exports, "SearchAttributeType", { enumerable: true, get: function () { return search_attributes_1.SearchAttributeType; } }); -Object.defineProperty(exports, "TypedSearchAttributes", { enumerable: true, get: function () { return search_attributes_1.TypedSearchAttributes; } }); -Object.defineProperty(exports, "defineSearchAttributeKey", { enumerable: true, get: function () { return search_attributes_1.defineSearchAttributeKey; } }); -/** - * Encode a UTF-8 string into a Uint8Array - * - * @hidden - * @deprecated - meant for internal use only - */ -function u8(s) { - return encoding.encode(s); -} -/** - * Decode a Uint8Array into a UTF-8 string - * - * @hidden - * @deprecated - meant for internal use only - */ -function str(arr) { - return encoding.decode(arr); -} -/** - * Get `error.message` (or `undefined` if not present) - * - * @hidden - * @deprecated - meant for internal use only - */ -function errorMessage(error) { - return helpers.errorMessage(error); -} -/** - * Get `error.code` (or `undefined` if not present) - * - * @hidden - * @deprecated - meant for internal use only - */ -function errorCode(error) { - return helpers.errorCode(error); -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/index.js.map b/node_modules/@temporalio/common/lib/index.js.map deleted file mode 100644 index 489b8f9..0000000 --- a/node_modules/@temporalio/common/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CH,gBAEC;AAQD,kBAEC;AAQD,oCAEC;AAQD,8BAEC;AA1ED,qDAAuC;AACvC,wDAA0C;AAE1C,qDAAmC;AACnC,iFAAkH;AAArE,4IAAA,2BAA2B,OAAA;AACxE,qDAA+D;AAAtD,6HAAA,0BAA0B,OAAA;AACnC,6DAA2C;AAC3C,gEAA8C;AAC9C,4DAA0C;AAC1C,gEAA8C;AAC9C,oDAAkC;AAClC,oDAAkC;AAClC,2CAAyB;AACzB,4CAA0B;AAE1B,+CAA6B;AAC7B,2CAAyB;AACzB,6CAA2B;AAC3B,4CAA0B;AAC1B,iDAA+B;AAE/B,uDAAqC;AACrC,gEAA8C;AAC9C,oDAAkC;AAClC,qDAAmC;AACnC,sDAAoC;AACpC,yDAQ6B;AAL3B,wHAAA,mBAAmB,OAAA;AAGnB,0HAAA,qBAAqB,OAAA;AACrB,6HAAA,wBAAwB,OAAA;AAG1B;;;;;GAKG;AACH,SAAgB,EAAE,CAAC,CAAS;IAC1B,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;GAKG;AACH,SAAgB,GAAG,CAAC,GAAe;IACjC,OAAO,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC;AAED;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,KAAc;IACzC,OAAO,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,KAAc;IACtC,OAAO,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/interceptors.d.ts b/node_modules/@temporalio/common/lib/interceptors.d.ts deleted file mode 100644 index 1b7f061..0000000 --- a/node_modules/@temporalio/common/lib/interceptors.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { AnyFunc, OmitLastParam } from './type-helpers'; -import { Payload } from './interfaces'; -/** - * Type of the next function for a given interceptor function - * - * Called from an interceptor to continue the interception chain - */ -export type Next = Required[FN] extends AnyFunc ? OmitLastParam[FN]> : never; -/** Headers are just a mapping of header name to Payload */ -export type Headers = Record; -/** - * Compose all interceptor methods into a single function. - * - * Calling the composed function results in calling each of the provided interceptor, in order (from the first to - * the last), followed by the original function provided as argument to `composeInterceptors()`. - * - * @param interceptors a list of interceptors - * @param method the name of the interceptor method to compose - * @param next the original function to be executed at the end of the interception chain - */ -export declare function composeInterceptors(interceptors: I[], method: M, next: Next): Next; diff --git a/node_modules/@temporalio/common/lib/interceptors.js b/node_modules/@temporalio/common/lib/interceptors.js deleted file mode 100644 index 1be6d6e..0000000 --- a/node_modules/@temporalio/common/lib/interceptors.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.composeInterceptors = composeInterceptors; -/** - * Compose all interceptor methods into a single function. - * - * Calling the composed function results in calling each of the provided interceptor, in order (from the first to - * the last), followed by the original function provided as argument to `composeInterceptors()`. - * - * @param interceptors a list of interceptors - * @param method the name of the interceptor method to compose - * @param next the original function to be executed at the end of the interception chain - */ -// ts-prune-ignore-next (imported via lib/interceptors) -function composeInterceptors(interceptors, method, next) { - for (let i = interceptors.length - 1; i >= 0; --i) { - const interceptor = interceptors[i]; - if (interceptor?.[method] !== undefined) { - const prev = next; - // We lose type safety here because Typescript can't deduce that interceptor[method] is a function that returns - // the same type as Next - next = ((input) => interceptor[method](input, prev)); - } - } - return next; -} -//# sourceMappingURL=interceptors.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/interceptors.js.map b/node_modules/@temporalio/common/lib/interceptors.js.map deleted file mode 100644 index be1574f..0000000 --- a/node_modules/@temporalio/common/lib/interceptors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interceptors.js","sourceRoot":"","sources":["../src/interceptors.ts"],"names":[],"mappings":";;AAwBA,kDAWC;AAtBD;;;;;;;;;GASG;AACH,uDAAuD;AACvD,SAAgB,mBAAmB,CAAuB,YAAiB,EAAE,MAAS,EAAE,IAAgB;IACtG,KAAK,IAAI,CAAC,GAAG,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;QAClD,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QACpC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE,CAAC;YACxC,MAAM,IAAI,GAAG,IAAI,CAAC;YAClB,+GAA+G;YAC/G,8BAA8B;YAC9B,IAAI,GAAG,CAAC,CAAC,KAAU,EAAE,EAAE,CAAE,WAAW,CAAC,MAAM,CAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAQ,CAAC;QAC5E,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/interfaces.d.ts b/node_modules/@temporalio/common/lib/interfaces.d.ts deleted file mode 100644 index e4e02df..0000000 --- a/node_modules/@temporalio/common/lib/interfaces.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -export type Payload = temporal.api.common.v1.IPayload; -/** Type that can be returned from a Workflow `execute` function */ -export type WorkflowReturnType = Promise; -export type WorkflowUpdateType = (...args: any[]) => Promise | any; -export type WorkflowUpdateValidatorType = (...args: any[]) => void; -export type WorkflowUpdateAnnotatedType = { - handler: WorkflowUpdateType; - unfinishedPolicy: HandlerUnfinishedPolicy; - validator?: WorkflowUpdateValidatorType; - description?: string; -}; -export type WorkflowSignalType = (...args: any[]) => Promise | void; -export type WorkflowSignalAnnotatedType = { - handler: WorkflowSignalType; - unfinishedPolicy: HandlerUnfinishedPolicy; - description?: string; -}; -export type WorkflowQueryType = (...args: any[]) => any; -export type WorkflowQueryAnnotatedType = { - handler: WorkflowQueryType; - description?: string; -}; -/** - * Broad Workflow function definition, specific Workflows will typically use a narrower type definition, e.g: - * ```ts - * export async function myWorkflow(arg1: number, arg2: string): Promise; - * ``` - */ -export type Workflow = (...args: any[]) => WorkflowReturnType; -declare const argsBrand: unique symbol; -declare const retBrand: unique symbol; -/** - * An interface representing a Workflow update definition, as returned from {@link defineUpdate} - * - * @remarks `Args` can be used for parameter type inference in handler functions and WorkflowHandle methods. - * `Name` can optionally be specified with a string literal type to preserve type-level knowledge of the update name. - */ -export interface UpdateDefinition { - type: 'update'; - name: Name; - /** - * Virtual type brand to maintain a distinction between {@link UpdateDefinition} types with different args. - * This field is not present at run-time. - */ - [argsBrand]: Args; - /** - * Virtual type brand to maintain a distinction between {@link UpdateDefinition} types with different return types. - * This field is not present at run-time. - */ - [retBrand]: Ret; -} -/** - * An interface representing a Workflow signal definition, as returned from {@link defineSignal} - * - * @remarks `Args` can be used for parameter type inference in handler functions and WorkflowHandle methods. - * `Name` can optionally be specified with a string literal type to preserve type-level knowledge of the signal name. - */ -export interface SignalDefinition { - type: 'signal'; - name: Name; - /** - * Virtual type brand to maintain a distinction between {@link SignalDefinition} types with different args. - * This field is not present at run-time. - */ - [argsBrand]: Args; -} -/** - * An interface representing a Workflow query definition as returned from {@link defineQuery} - * - * @remarks `Args` and `Ret` can be used for parameter type inference in handler functions and WorkflowHandle methods. - * `Name` can optionally be specified with a string literal type to preserve type-level knowledge of the query name. - */ -export interface QueryDefinition { - type: 'query'; - name: Name; - /** - * Virtual type brand to maintain a distinction between {@link QueryDefinition} types with different args. - * This field is not present at run-time. - */ - [argsBrand]: Args; - /** - * Virtual type brand to maintain a distinction between {@link QueryDefinition} types with different return types. - * This field is not present at run-time. - */ - [retBrand]: Ret; -} -/** Get the "unwrapped" return type (without Promise) of the execute handler from Workflow type `W` */ -export type WorkflowResultType = ReturnType extends Promise ? R : never; -export interface ActivityFunction

{ - (...args: P): Promise; -} -/** - * Mapping of Activity name to function - * @deprecated not required anymore, for untyped activities use {@link UntypedActivities} - */ -export type ActivityInterface = Record; -/** - * Mapping of Activity name to function - */ -export type UntypedActivities = Record; -/** - * A workflow's history and ID. Useful for replay. - */ -export interface HistoryAndWorkflowId { - workflowId: string; - history: temporal.api.history.v1.History | unknown | undefined; -} -/** - * Policy defining actions taken when a workflow exits while update or signal handlers are running. - * The workflow exit may be due to successful return, failure, cancellation, or continue-as-new. - */ -export declare const HandlerUnfinishedPolicy: { - /** - * Issue a warning in addition to abandoning the handler execution. The warning will not be issued if the workflow fails. - */ - readonly WARN_AND_ABANDON: "WARN_AND_ABANDON"; - /** - * Abandon the handler execution. - * - * In the case of an update handler this means that the client will receive an error rather than - * the update result. - */ - readonly ABANDON: "ABANDON"; -}; -export type HandlerUnfinishedPolicy = (typeof HandlerUnfinishedPolicy)[keyof typeof HandlerUnfinishedPolicy]; -export {}; diff --git a/node_modules/@temporalio/common/lib/interfaces.js b/node_modules/@temporalio/common/lib/interfaces.js deleted file mode 100644 index 5e8627a..0000000 --- a/node_modules/@temporalio/common/lib/interfaces.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HandlerUnfinishedPolicy = void 0; -/** - * Policy defining actions taken when a workflow exits while update or signal handlers are running. - * The workflow exit may be due to successful return, failure, cancellation, or continue-as-new. - */ -exports.HandlerUnfinishedPolicy = { - /** - * Issue a warning in addition to abandoning the handler execution. The warning will not be issued if the workflow fails. - */ - WARN_AND_ABANDON: 'WARN_AND_ABANDON', - /** - * Abandon the handler execution. - * - * In the case of an update handler this means that the client will receive an error rather than - * the update result. - */ - ABANDON: 'ABANDON', -}; -//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/interfaces.js.map b/node_modules/@temporalio/common/lib/interfaces.js.map deleted file mode 100644 index ccb26be..0000000 --- a/node_modules/@temporalio/common/lib/interfaces.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";;;AAsHA;;;GAGG;AACU,QAAA,uBAAuB,GAAG;IACrC;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;IAEpC;;;;;OAKG;IACH,OAAO,EAAE,SAAS;CACV,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/codec-helpers.d.ts b/node_modules/@temporalio/common/lib/internal-non-workflow/codec-helpers.d.ts deleted file mode 100644 index 80ceec2..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/codec-helpers.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -import { Payload } from '../interfaces'; -import { PayloadCodec } from '../converter/payload-codec'; -import { ProtoFailure } from '../failure'; -import { LoadedDataConverter } from '../converter/data-converter'; -import { UserMetadata } from '../user-metadata'; -import { DecodedPayload, DecodedProtoFailure, EncodedPayload, EncodedProtoFailure } from './codec-types'; -/** - * Decode through each codec, starting with the last codec. - */ -export declare function decode(codecs: PayloadCodec[], payloads: Payload[]): Promise; -/** - * Encode through each codec, starting with the first codec. - */ -export declare function encode(codecs: PayloadCodec[], payloads: Payload[]): Promise; -/** Run {@link PayloadCodec.encode} on `payloads` */ -export declare function encodeOptional(codecs: PayloadCodec[], payloads: Payload[] | null | undefined): Promise; -/** Run {@link PayloadCodec.decode} on `payloads` */ -export declare function decodeOptional(codecs: PayloadCodec[], payloads: Payload[] | null | undefined): Promise; -/** Run {@link PayloadCodec.encode} on a single Payload */ -export declare function encodeOptionalSingle(codecs: PayloadCodec[], payload: Payload | null | undefined): Promise; -/** Run {@link PayloadCodec.decode} on a single Payload */ -export declare function decodeOptionalSingle(codecs: PayloadCodec[], payload: Payload | null | undefined): Promise; -/** Run {@link PayloadCodec.decode} and convert from a single Payload */ -export declare function decodeOptionalSinglePayload(dataConverter: LoadedDataConverter, payload?: Payload | null | undefined): Promise; -/** - * Run {@link PayloadConverter.toPayload} on value, and then encode it. - */ -export declare function encodeToPayload(converter: LoadedDataConverter, value: unknown): Promise; -/** - * Decode `payloads` and then return {@link arrayFromPayloads}`. - */ -export declare function decodeArrayFromPayloads(converter: LoadedDataConverter, payloads?: Payload[] | null): Promise; -/** - * Decode `payloads` and then return {@link fromPayloadsAtIndex}. - */ -export declare function decodeFromPayloadsAtIndex(converter: LoadedDataConverter, index: number, payloads?: Payload[] | null): Promise; -/** - * Run {@link decodeFailure} and then return {@link failureToError}. - */ -export declare function decodeOptionalFailureToOptionalError(converter: LoadedDataConverter, failure: ProtoFailure | undefined | null): Promise; -export declare function decodeOptionalMap(codecs: PayloadCodec[], payloads: Record | null | undefined): Promise | null | undefined>; -/** - * Run {@link PayloadConverter.toPayload} on values, and then encode them. - */ -export declare function encodeToPayloads(converter: LoadedDataConverter, ...values: unknown[]): Promise; -/** - * Run {@link PayloadCodec.decode} and then {@link PayloadConverter.fromPayload} on values in `map`. - */ -export declare function decodeMapFromPayloads(converter: LoadedDataConverter, map: Record | null | undefined): Promise | undefined>; -/** Run {@link PayloadCodec.encode} on all values in `map` */ -export declare function encodeMap(codecs: PayloadCodec[], map: Record | null | undefined): Promise | null | undefined>; -/** - * Run {@link PayloadConverter.toPayload} and then {@link PayloadCodec.encode} on values in `map`. - */ -export declare function encodeMapToPayloads(converter: LoadedDataConverter, map: Record): Promise>; -/** - * Run {@link errorToFailure} on `error`, and then {@link encodeFailure}. - */ -export declare function encodeErrorToFailure(dataConverter: LoadedDataConverter, error: unknown): Promise; -/** - * Return a new {@link ProtoFailure} with `codec.encode()` run on all the {@link Payload}s. - */ -export declare function encodeFailure(codecs: PayloadCodec[], failure: ProtoFailure): Promise; -/** - * Return a new {@link ProtoFailure} with `codec.decode()` run on all the {@link Payload}s. - */ -export declare function decodeFailure(codecs: PayloadCodec[], failure: ProtoFailure): Promise; -/** - * Return a new {@link ProtoFailure} with `codec.encode()` run on all the {@link Payload}s. - */ -export declare function encodeOptionalFailure(codecs: PayloadCodec[], failure: ProtoFailure | null | undefined): Promise; -/** - * Return a new {@link ProtoFailure} with `codec.encode()` run on all the {@link Payload}s. - */ -export declare function decodeOptionalFailure(codecs: PayloadCodec[], failure: ProtoFailure | null | undefined): Promise; -/** - * Mark all values in the map as encoded. - * Use this for headers, which we don't encode. - */ -export declare function noopEncodeMap(map: Record | null | undefined): Record | null | undefined; -export declare function noopEncodeSearchAttrs(attrs: temporal.api.common.v1.ISearchAttributes | null | undefined): temporal.api.common.v1.ISearchAttributes | null | undefined; -/** - * Mark all values in the map as decoded. - * Use this for headers, which we don't encode. - */ -export declare function noopDecodeMap(map: Record | null | undefined): Record | null | undefined; -export declare function encodeUserMetadata(dataConverter: LoadedDataConverter, staticSummary: string | undefined, staticDetails: string | undefined): Promise; -export declare function decodeUserMetadata(dataConverter: LoadedDataConverter, metadata: temporal.api.sdk.v1.IUserMetadata | undefined | null): Promise; diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/codec-helpers.js b/node_modules/@temporalio/common/lib/internal-non-workflow/codec-helpers.js deleted file mode 100644 index 82b0892..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/codec-helpers.js +++ /dev/null @@ -1,334 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decode = decode; -exports.encode = encode; -exports.encodeOptional = encodeOptional; -exports.decodeOptional = decodeOptional; -exports.encodeOptionalSingle = encodeOptionalSingle; -exports.decodeOptionalSingle = decodeOptionalSingle; -exports.decodeOptionalSinglePayload = decodeOptionalSinglePayload; -exports.encodeToPayload = encodeToPayload; -exports.decodeArrayFromPayloads = decodeArrayFromPayloads; -exports.decodeFromPayloadsAtIndex = decodeFromPayloadsAtIndex; -exports.decodeOptionalFailureToOptionalError = decodeOptionalFailureToOptionalError; -exports.decodeOptionalMap = decodeOptionalMap; -exports.encodeToPayloads = encodeToPayloads; -exports.decodeMapFromPayloads = decodeMapFromPayloads; -exports.encodeMap = encodeMap; -exports.encodeMapToPayloads = encodeMapToPayloads; -exports.encodeErrorToFailure = encodeErrorToFailure; -exports.encodeFailure = encodeFailure; -exports.decodeFailure = decodeFailure; -exports.encodeOptionalFailure = encodeOptionalFailure; -exports.decodeOptionalFailure = decodeOptionalFailure; -exports.noopEncodeMap = noopEncodeMap; -exports.noopEncodeSearchAttrs = noopEncodeSearchAttrs; -exports.noopDecodeMap = noopDecodeMap; -exports.encodeUserMetadata = encodeUserMetadata; -exports.decodeUserMetadata = decodeUserMetadata; -const payload_converter_1 = require("../converter/payload-converter"); -const errors_1 = require("../errors"); -/** - * Decode through each codec, starting with the last codec. - */ -async function decode(codecs, payloads) { - for (let i = codecs.length - 1; i >= 0; i--) { - payloads = await codecs[i].decode(payloads); - } - return payloads; -} -/** - * Encode through each codec, starting with the first codec. - */ -async function encode(codecs, payloads) { - for (let i = 0; i < codecs.length; i++) { - payloads = await codecs[i].encode(payloads); - } - return payloads; -} -/** Run {@link PayloadCodec.encode} on `payloads` */ -async function encodeOptional(codecs, payloads) { - if (payloads == null) - return payloads; - return await encode(codecs, payloads); -} -/** Run {@link PayloadCodec.decode} on `payloads` */ -async function decodeOptional(codecs, payloads) { - if (payloads == null) - return payloads; - return await decode(codecs, payloads); -} -async function encodeSingle(codecs, payload) { - const encodedPayloads = await encode(codecs, [payload]); - return encodedPayloads[0]; -} -async function decodeSingle(codecs, payload) { - const [decodedPayload] = await decode(codecs, [payload]); - return decodedPayload; -} -/** Run {@link PayloadCodec.encode} on a single Payload */ -async function encodeOptionalSingle(codecs, payload) { - if (payload == null) - return payload; - return await encodeSingle(codecs, payload); -} -/** Run {@link PayloadCodec.decode} on a single Payload */ -async function decodeOptionalSingle(codecs, payload) { - if (payload == null) - return payload; - return await decodeSingle(codecs, payload); -} -/** Run {@link PayloadCodec.decode} and convert from a single Payload */ -async function decodeOptionalSinglePayload(dataConverter, payload) { - const { payloadConverter, payloadCodecs } = dataConverter; - const decoded = await decodeOptionalSingle(payloadCodecs, payload); - if (decoded == null) - return decoded; - return payloadConverter.fromPayload(decoded); -} -/** - * Run {@link PayloadConverter.toPayload} on value, and then encode it. - */ -async function encodeToPayload(converter, value) { - const { payloadConverter, payloadCodecs } = converter; - return await encodeSingle(payloadCodecs, payloadConverter.toPayload(value)); -} -/** - * Decode `payloads` and then return {@link arrayFromPayloads}`. - */ -async function decodeArrayFromPayloads(converter, payloads) { - const { payloadConverter, payloadCodecs } = converter; - return (0, payload_converter_1.arrayFromPayloads)(payloadConverter, await decodeOptional(payloadCodecs, payloads)); -} -/** - * Decode `payloads` and then return {@link fromPayloadsAtIndex}. - */ -async function decodeFromPayloadsAtIndex(converter, index, payloads) { - const { payloadConverter, payloadCodecs } = converter; - return await (0, payload_converter_1.fromPayloadsAtIndex)(payloadConverter, index, await decodeOptional(payloadCodecs, payloads)); -} -/** - * Run {@link decodeFailure} and then return {@link failureToError}. - */ -async function decodeOptionalFailureToOptionalError(converter, failure) { - const { failureConverter, payloadConverter, payloadCodecs } = converter; - return failure - ? failureConverter.failureToError(await decodeFailure(payloadCodecs, failure), payloadConverter) - : undefined; -} -async function decodeOptionalMap(codecs, payloads) { - if (payloads == null) - return payloads; - return Object.fromEntries(await Promise.all(Object.entries(payloads).map(async ([k, v]) => [k, (await decode(codecs, [v]))[0]]))); -} -/** - * Run {@link PayloadConverter.toPayload} on values, and then encode them. - */ -async function encodeToPayloads(converter, ...values) { - const { payloadConverter, payloadCodecs } = converter; - if (values.length === 0) { - return undefined; - } - const payloads = (0, payload_converter_1.toPayloads)(payloadConverter, ...values); - return payloads ? await encode(payloadCodecs, payloads) : undefined; -} -/** - * Run {@link PayloadCodec.decode} and then {@link PayloadConverter.fromPayload} on values in `map`. - */ -async function decodeMapFromPayloads(converter, map) { - if (!map) - return undefined; - const { payloadConverter, payloadCodecs } = converter; - return Object.fromEntries(await Promise.all(Object.entries(map).map(async ([k, payload]) => { - const [decodedPayload] = await decode(payloadCodecs, [payload]); - const value = payloadConverter.fromPayload(decodedPayload); - return [k, value]; - }))); -} -/** Run {@link PayloadCodec.encode} on all values in `map` */ -async function encodeMap(codecs, map) { - if (map === null) - return null; - if (map === undefined) - return undefined; - return Object.fromEntries(await Promise.all(Object.entries(map).map(async ([k, payload]) => { - return [k, await encodeSingle(codecs, payload)]; - }))); -} -/** - * Run {@link PayloadConverter.toPayload} and then {@link PayloadCodec.encode} on values in `map`. - */ -async function encodeMapToPayloads(converter, map) { - const { payloadConverter, payloadCodecs } = converter; - return Object.fromEntries(await Promise.all(Object.entries(map).map(async ([k, v]) => { - const payload = payloadConverter.toPayload(v); - if (payload === undefined) - throw new errors_1.PayloadConverterError(`Failed to encode entry: ${k}: ${v}`); - const [encodedPayload] = await encode(payloadCodecs, [payload]); - return [k, encodedPayload]; - }))); -} -/** - * Run {@link errorToFailure} on `error`, and then {@link encodeFailure}. - */ -async function encodeErrorToFailure(dataConverter, error) { - const { failureConverter, payloadConverter, payloadCodecs } = dataConverter; - return await encodeFailure(payloadCodecs, failureConverter.errorToFailure(error, payloadConverter)); -} -/** - * Return a new {@link ProtoFailure} with `codec.encode()` run on all the {@link Payload}s. - */ -async function encodeFailure(codecs, failure) { - return { - ...failure, - encodedAttributes: failure.encodedAttributes ? (await encode(codecs, [failure.encodedAttributes]))[0] : undefined, - cause: failure.cause ? await encodeFailure(codecs, failure.cause) : null, - applicationFailureInfo: failure.applicationFailureInfo - ? { - ...failure.applicationFailureInfo, - details: failure.applicationFailureInfo.details - ? { - payloads: await encode(codecs, failure.applicationFailureInfo.details.payloads ?? []), - } - : undefined, - } - : undefined, - timeoutFailureInfo: failure.timeoutFailureInfo - ? { - ...failure.timeoutFailureInfo, - lastHeartbeatDetails: failure.timeoutFailureInfo.lastHeartbeatDetails - ? { - payloads: await encode(codecs, failure.timeoutFailureInfo.lastHeartbeatDetails.payloads ?? []), - } - : undefined, - } - : undefined, - canceledFailureInfo: failure.canceledFailureInfo - ? { - ...failure.canceledFailureInfo, - details: failure.canceledFailureInfo.details - ? { - payloads: await encode(codecs, failure.canceledFailureInfo.details.payloads ?? []), - } - : undefined, - } - : undefined, - resetWorkflowFailureInfo: failure.resetWorkflowFailureInfo - ? { - ...failure.resetWorkflowFailureInfo, - lastHeartbeatDetails: failure.resetWorkflowFailureInfo.lastHeartbeatDetails - ? { - payloads: await encode(codecs, failure.resetWorkflowFailureInfo.lastHeartbeatDetails.payloads ?? []), - } - : undefined, - } - : undefined, - }; -} -/** - * Return a new {@link ProtoFailure} with `codec.decode()` run on all the {@link Payload}s. - */ -async function decodeFailure(codecs, failure) { - return { - ...failure, - encodedAttributes: failure.encodedAttributes ? (await decode(codecs, [failure.encodedAttributes]))[0] : undefined, - cause: failure.cause ? await decodeFailure(codecs, failure.cause) : null, - applicationFailureInfo: failure.applicationFailureInfo - ? { - ...failure.applicationFailureInfo, - details: failure.applicationFailureInfo.details - ? { - payloads: await decode(codecs, failure.applicationFailureInfo.details.payloads ?? []), - } - : undefined, - } - : undefined, - timeoutFailureInfo: failure.timeoutFailureInfo - ? { - ...failure.timeoutFailureInfo, - lastHeartbeatDetails: failure.timeoutFailureInfo.lastHeartbeatDetails - ? { - payloads: await decode(codecs, failure.timeoutFailureInfo.lastHeartbeatDetails.payloads ?? []), - } - : undefined, - } - : undefined, - canceledFailureInfo: failure.canceledFailureInfo - ? { - ...failure.canceledFailureInfo, - details: failure.canceledFailureInfo.details - ? { - payloads: await decode(codecs, failure.canceledFailureInfo.details.payloads ?? []), - } - : undefined, - } - : undefined, - resetWorkflowFailureInfo: failure.resetWorkflowFailureInfo - ? { - ...failure.resetWorkflowFailureInfo, - lastHeartbeatDetails: failure.resetWorkflowFailureInfo.lastHeartbeatDetails - ? { - payloads: await decode(codecs, failure.resetWorkflowFailureInfo.lastHeartbeatDetails.payloads ?? []), - } - : undefined, - } - : undefined, - }; -} -/** - * Return a new {@link ProtoFailure} with `codec.encode()` run on all the {@link Payload}s. - */ -async function encodeOptionalFailure(codecs, failure) { - if (failure == null) - return failure; - return await encodeFailure(codecs, failure); -} -/** - * Return a new {@link ProtoFailure} with `codec.encode()` run on all the {@link Payload}s. - */ -async function decodeOptionalFailure(codecs, failure) { - if (failure == null) - return failure; - return await decodeFailure(codecs, failure); -} -/** - * Mark all values in the map as encoded. - * Use this for headers, which we don't encode. - */ -function noopEncodeMap(map) { - return map; -} -function noopEncodeSearchAttrs(attrs) { - if (!attrs) { - return attrs; - } - return { - indexedFields: noopEncodeMap(attrs.indexedFields), - }; -} -/** - * Mark all values in the map as decoded. - * Use this for headers, which we don't encode. - */ -function noopDecodeMap(map) { - return map; -} -async function encodeUserMetadata(dataConverter, staticSummary, staticDetails) { - if (staticSummary == null && staticDetails == null) - return undefined; - const { payloadConverter, payloadCodecs } = dataConverter; - const summary = await encodeOptionalSingle(payloadCodecs, (0, payload_converter_1.convertOptionalToPayload)(payloadConverter, staticSummary)); - const details = await encodeOptionalSingle(payloadCodecs, (0, payload_converter_1.convertOptionalToPayload)(payloadConverter, staticDetails)); - if (summary == null && details == null) - return undefined; - return { summary, details }; -} -async function decodeUserMetadata(dataConverter, metadata) { - const res = { staticSummary: undefined, staticDetails: undefined }; - if (metadata == null) - return res; - const staticSummary = (await decodeOptionalSinglePayload(dataConverter, metadata.summary)) ?? undefined; - const staticDetails = (await decodeOptionalSinglePayload(dataConverter, metadata.details)) ?? undefined; - return { staticSummary, staticDetails }; -} -//# sourceMappingURL=codec-helpers.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/codec-helpers.js.map b/node_modules/@temporalio/common/lib/internal-non-workflow/codec-helpers.js.map deleted file mode 100644 index 5da2d4f..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/codec-helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"codec-helpers.js","sourceRoot":"","sources":["../../src/internal-non-workflow/codec-helpers.ts"],"names":[],"mappings":";;AAkBA,wBAKC;AAKD,wBAKC;AAGD,wCAMC;AAGD,wCAMC;AAaD,oDAMC;AAGD,oDAMC;AAGD,kEAQC;AAKD,0CAGC;AAKD,0DAMC;AAKD,8DAOC;AAKD,oFAQC;AAED,8CAQC;AAKD,4CAUC;AAKD,sDAeC;AAGD,8BAaC;AAKD,kDAeC;AAKD,oDAGC;AAKD,sCA8CC;AAKD,sCA8CC;AAKD,sDAMC;AAKD,sDAMC;AAMD,sCAIC;AAED,sDASC;AAMD,sCAIC;AAED,gDAcC;AAED,gDAWC;AArZD,sEAKwC;AACxC,sCAAkD;AAOlD;;GAEG;AACI,KAAK,UAAU,MAAM,CAAC,MAAsB,EAAE,QAAmB;IACtE,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5C,QAAQ,GAAG,MAAM,MAAM,CAAC,CAAC,CAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,QAA4B,CAAC;AACtC,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,MAAM,CAAC,MAAsB,EAAE,QAAmB;IACtE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,QAAQ,GAAG,MAAM,MAAM,CAAC,CAAC,CAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,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ClC,aAAiC,EACjC,aAAiC;IAEjC,IAAI,aAAa,IAAI,IAAI,IAAI,aAAa,IAAI,IAAI;QAAE,OAAO,SAAS,CAAC;IAErE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,GAAG,aAAa,CAAC;IAC1D,MAAM,OAAO,GAAG,MAAM,oBAAoB,CAAC,aAAa,EAAE,IAAA,4CAAwB,EAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC;IACrH,MAAM,OAAO,GAAG,MAAM,oBAAoB,CAAC,aAAa,EAAE,IAAA,4CAAwB,EAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC;IAErH,IAAI,OAAO,IAAI,IAAI,IAAI,OAAO,IAAI,IAAI;QAAE,OAAO,SAAS,CAAC;IAEzD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAC9B,CAAC;AAEM,KAAK,UAAU,kBAAkB,CACtC,aAAkC,EAClC,QAA8D;IAE9D,MAAM,GAAG,GAAG,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;IACnE,IAAI,QAAQ,IAAI,IAAI;QAAE,OAAO,GAAG,CAAC;IAEjC,MAAM,aAAa,GAAG,CAAC,MAAM,2BAA2B,CAAS,aAAa,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,SAAS,CAAC;IAChH,MAAM,aAAa,GAAG,CAAC,MAAM,2BAA2B,CAAS,aAAa,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,SAAS,CAAC;IAEhH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/codec-types.d.ts b/node_modules/@temporalio/common/lib/internal-non-workflow/codec-types.d.ts deleted file mode 100644 index 35bd1b6..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/codec-types.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { Payload } from '../interfaces'; -import type { ProtoFailure } from '../failure'; -export interface EncodedPayload extends Payload { - encoded: true; -} -export interface DecodedPayload extends Payload { - decoded: true; -} -/** Replace `Payload`s with `EncodedPayload`s */ -export type Encoded = ReplaceNested; -/** Replace `Payload`s with `DecodedPayload`s */ -export type Decoded = ReplaceNested; -export type EncodedProtoFailure = Encoded; -export type DecodedProtoFailure = Decoded; -/** An object T with any nested values of type ToReplace replaced with ReplaceWith */ -export type ReplaceNested = T extends (...args: any[]) => any ? T : [keyof T] extends [never] ? T : T extends Record ? T : T extends { - [k: string]: ToReplace; -} ? { - [P in keyof T]: ReplaceNested; -} : T extends ToReplace ? ReplaceWith | Exclude : { - [P in keyof T]: ReplaceNested; -}; diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/codec-types.js b/node_modules/@temporalio/common/lib/internal-non-workflow/codec-types.js deleted file mode 100644 index 7f4033c..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/codec-types.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=codec-types.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/codec-types.js.map b/node_modules/@temporalio/common/lib/internal-non-workflow/codec-types.js.map deleted file mode 100644 index 452e5ef..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/codec-types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"codec-types.js","sourceRoot":"","sources":["../../src/internal-non-workflow/codec-types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/data-converter-helpers.d.ts b/node_modules/@temporalio/common/lib/internal-non-workflow/data-converter-helpers.d.ts deleted file mode 100644 index cb532f7..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/data-converter-helpers.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { DataConverter, LoadedDataConverter } from '../converter/data-converter'; -/** - * If {@link DataConverter.payloadConverterPath} is specified, `require()` it and validate that the module has a `payloadConverter` named export. - * If not, use {@link defaultPayloadConverter}. - * If {@link DataConverter.payloadCodecs} is unspecified, use an empty array. - */ -export declare function loadDataConverter(dataConverter?: DataConverter): LoadedDataConverter; -/** - * Returns true if the converter is already "loaded" - */ -export declare function isLoadedDataConverter(dataConverter?: DataConverter | LoadedDataConverter): dataConverter is LoadedDataConverter; diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/data-converter-helpers.js b/node_modules/@temporalio/common/lib/internal-non-workflow/data-converter-helpers.js deleted file mode 100644 index d3dd9e9..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/data-converter-helpers.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.loadDataConverter = loadDataConverter; -exports.isLoadedDataConverter = isLoadedDataConverter; -const payload_converter_1 = require("../converter/payload-converter"); -const data_converter_1 = require("../converter/data-converter"); -const type_helpers_1 = require("../type-helpers"); -const errors_1 = require("../errors"); -const isValidPayloadConverter = (converter, path) => { - const isValid = typeof converter === 'object' && - converter !== null && - ['toPayload', 'fromPayload'].every((method) => typeof converter[method] === 'function'); - if (!isValid) { - throw new errors_1.ValueError(`payloadConverter export at ${path} must be an object with toPayload and fromPayload methods`); - } -}; -const isValidFailureConverter = (converter, path) => { - const isValid = typeof converter === 'object' && - converter !== null && - ['errorToFailure', 'failureToError'].every((method) => typeof converter[method] === 'function'); - if (!isValid) { - throw new errors_1.ValueError(`failureConverter export at ${path} must be an object with errorToFailure and failureToError methods`); - } -}; -function requireConverter(path, type, validator) { - let module; - try { - module = require(path); // eslint-disable-line @typescript-eslint/no-require-imports - } - catch (error) { - if ((0, type_helpers_1.errorCode)(error) === 'MODULE_NOT_FOUND') { - throw new errors_1.ValueError(`Could not find a file at the specified ${type}Path: '${path}'.`); - } - throw error; - } - if ((0, type_helpers_1.isRecord)(module) && (0, type_helpers_1.hasOwnProperty)(module, type)) { - const converter = module[type]; - validator(converter, path); - return converter; - } - else { - throw new errors_1.ValueError(`Module ${path} does not have a \`${type}\` named export`); - } -} -/** - * If {@link DataConverter.payloadConverterPath} is specified, `require()` it and validate that the module has a `payloadConverter` named export. - * If not, use {@link defaultPayloadConverter}. - * If {@link DataConverter.payloadCodecs} is unspecified, use an empty array. - */ -function loadDataConverter(dataConverter) { - let payloadConverter = payload_converter_1.defaultPayloadConverter; - if (dataConverter?.payloadConverterPath) { - payloadConverter = requireConverter(dataConverter.payloadConverterPath, 'payloadConverter', isValidPayloadConverter); - } - let failureConverter = data_converter_1.defaultFailureConverter; - if (dataConverter?.failureConverterPath) { - failureConverter = requireConverter(dataConverter.failureConverterPath, 'failureConverter', isValidFailureConverter); - } - return { - payloadConverter, - failureConverter, - payloadCodecs: dataConverter?.payloadCodecs ?? [], - }; -} -/** - * Returns true if the converter is already "loaded" - */ -function isLoadedDataConverter(dataConverter) { - return (0, type_helpers_1.isRecord)(dataConverter) && (0, type_helpers_1.hasOwnProperty)(dataConverter, 'payloadConverter'); -} -//# sourceMappingURL=data-converter-helpers.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/data-converter-helpers.js.map b/node_modules/@temporalio/common/lib/internal-non-workflow/data-converter-helpers.js.map deleted file mode 100644 index 921af7a..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/data-converter-helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"data-converter-helpers.js","sourceRoot":"","sources":["../../src/internal-non-workflow/data-converter-helpers.ts"],"names":[],"mappings":";;AA6DA,8CAsBC;AAKD,sDAIC;AA5FD,sEAA2F;AAC3F,gEAA0G;AAE1G,kDAAsE;AACtE,sCAAuC;AAEvC,MAAM,uBAAuB,GAAG,CAAC,SAAkB,EAAE,IAAY,EAAyC,EAAE;IAC1G,MAAM,OAAO,GACX,OAAO,SAAS,KAAK,QAAQ;QAC7B,SAAS,KAAK,IAAI;QAClB,CAAC,WAAW,EAA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AAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,mBAAU,CAAC,UAAU,IAAI,sBAAsB,IAAI,iBAAiB,CAAC,CAAC;IAClF,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,aAA6B;IAC7D,IAAI,gBAAgB,GAAqB,2CAAuB,CAAC;IACjE,IAAI,aAAa,EAAE,oBAAoB,EAAE,CAAC;QACxC,gBAAgB,GAAG,gBAAgB,CACjC,aAAa,CAAC,oBAAoB,EAClC,kBAAkB,EAClB,uBAAuB,CACxB,CAAC;IACJ,CAAC;IACD,IAAI,gBAAgB,GAAqB,wCAAuB,CAAC;IACjE,IAAI,aAAa,EAAE,oBAAoB,EAAE,CAAC;QACxC,gBAAgB,GAAG,gBAAgB,CACjC,aAAa,CAAC,oBAAoB,EAClC,kBAAkB,EAClB,uBAAuB,CACxB,CAAC;IACJ,CAAC;IACD,OAAO;QACL,gBAAgB;QAChB,gBAAgB;QAChB,aAAa,EAAE,aAAa,EAAE,aAAa,IAAI,EAAE;KAClD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,qBAAqB,CACnC,aAAmD;IAEnD,OAAO,IAAA,uBAAQ,EAAC,aAAa,CAAC,IAAI,IAAA,6BAAc,EAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC;AACtF,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/index.d.ts b/node_modules/@temporalio/common/lib/internal-non-workflow/index.d.ts deleted file mode 100644 index 11b2fea..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Internal SDK library: users should usually use other packages instead. Not included in Workflow bundle. - * - * @module - */ -export * from './codec-helpers'; -export * from './codec-types'; -export * from './data-converter-helpers'; -export * from './parse-host-uri'; -export * from './proxy-config'; -export * from './tls-config'; diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/index.js b/node_modules/@temporalio/common/lib/internal-non-workflow/index.js deleted file mode 100644 index fec1e5b..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Internal SDK library: users should usually use other packages instead. Not included in Workflow bundle. - * - * @module - */ -__exportStar(require("./codec-helpers"), exports); -__exportStar(require("./codec-types"), exports); -__exportStar(require("./data-converter-helpers"), exports); -__exportStar(require("./parse-host-uri"), exports); -__exportStar(require("./proxy-config"), exports); -__exportStar(require("./tls-config"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/index.js.map b/node_modules/@temporalio/common/lib/internal-non-workflow/index.js.map deleted file mode 100644 index 54a1eec..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internal-non-workflow/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,kDAAgC;AAChC,gDAA8B;AAC9B,2DAAyC;AACzC,mDAAiC;AACjC,iDAA+B;AAC/B,+CAA6B"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/parse-host-uri.d.ts b/node_modules/@temporalio/common/lib/internal-non-workflow/parse-host-uri.d.ts deleted file mode 100644 index de22514..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/parse-host-uri.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This file contain helper functions to parse specific subsets of URIs. - * - * The ECMAScript-compliant URL class don't properly handle some syntaxes that - * we care about, such as not providing a protocol (e.g. '127.0.0.1:7233'), and - * performs some normalizations that are not desirable for our use cases - * (e.g. parsing 'http://127.0.0.1:7233' adds a '/' path). On the other side, - * simply using `split(':')` breaks on IPv6 addresses. Hence these helpers. - */ -export interface ProtoHostPort { - scheme?: string; - hostname: string; - port?: number; -} -/** - * Split a URI composed only of a scheme, a hostname, and port. - * The scheme and port are optional. - * - * Examples of valid URIs for HTTP CONNECT proxies: - * - * ``` - * http://test.com:8080 => { scheme: 'http', host: 'test.com', port: 8080 } - * http://192.168.0.1:8080 => { scheme: 'http', host: '192.168.0.1', port: 8080 } - * [::1]:8080 => { scheme: 'http', host: '::1', port: 8080 } - * [::ffff:192.0.2.128]:8080 => { scheme: 'http', host: '::ffff:192.0.2.128', port: 8080 } - * 192.168.0.1:8080 => { scheme: 'http', host: '192.168.0.1', port: 8080 } - * ``` - */ -export declare function splitProtoHostPort(uri: string): ProtoHostPort | undefined; -export declare function joinProtoHostPort(components: ProtoHostPort): string; -/** - * Parse the address for the gRPC endpoint of a Temporal server. - * - * - The URI may only contain a hostname and a port. - * - Port is optional; if not specified, set it to `defaultPort`. - * - * Examples of valid URIs (assuming `defaultPort` is 7233): - * - * ``` - * 127.0.0.1 => { host: '127.0.0.1', port: 7233 } - * 192.168.0.1:7233 => { host: '192.168.0.1', port: 7233 } - * my.temporal.service.com:7233 => { host: 'my.temporal.service.com', port: 7233 } - * [::ffff:192.0.2.128]:8080 => { host: '[::ffff:192.0.2.128]', port: 8080 } - * ``` - */ -export declare function normalizeGrpcEndpointAddress(uri: string, defaultPort: number): string; diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/parse-host-uri.js b/node_modules/@temporalio/common/lib/internal-non-workflow/parse-host-uri.js deleted file mode 100644 index 2100979..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/parse-host-uri.js +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; -/** - * This file contain helper functions to parse specific subsets of URIs. - * - * The ECMAScript-compliant URL class don't properly handle some syntaxes that - * we care about, such as not providing a protocol (e.g. '127.0.0.1:7233'), and - * performs some normalizations that are not desirable for our use cases - * (e.g. parsing 'http://127.0.0.1:7233' adds a '/' path). On the other side, - * simply using `split(':')` breaks on IPv6 addresses. Hence these helpers. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.splitProtoHostPort = splitProtoHostPort; -exports.joinProtoHostPort = joinProtoHostPort; -exports.normalizeGrpcEndpointAddress = normalizeGrpcEndpointAddress; -/** - * Scheme. Requires but doesn't capture the ':' or '://' separator that follows. - * e.g. `http:` will be captured as 'http'. - */ -const scheme = '(?:(?[a-z][a-z0-9]+):(?:\\/\\/)?)'; -/** - * IPv4-style hostname. Not captured. - * e.g.: `192.168.1.100`. - */ -const ipv4Hostname = '(?:\\d{1,3}(?:\\.\\d{1,3}){3})'; -/** - * IPv6-style hostname; must be enclosed in square brackets. Not captured. - * e.g.: `[::1]`, `[2001:db8::1]`, `[::FFFF:129.144.52.38]`, etc. - */ -const ipv6Hostname = '(?:\\[(?[0-9a-fA-F.:]+)\\])'; -// DNS-style hostname. Not captured. -// e.g.: `test.com` or `localhost`. -const dnsHostname = '(?:[^:/]+)'; -const hostname = `(?:${ipv4Hostname}|${ipv6Hostname}|${dnsHostname})`; -// Port number. Requires but don't capture a preceeding ':' separator. -// For example, `:7233` will be captured as `7233`. -const port = '(?::(?\\d+))'; -const protoHostPortRegex = new RegExp(`^${scheme}??(?${hostname})${port}?$`); -/** - * Split a URI composed only of a scheme, a hostname, and port. - * The scheme and port are optional. - * - * Examples of valid URIs for HTTP CONNECT proxies: - * - * ``` - * http://test.com:8080 => { scheme: 'http', host: 'test.com', port: 8080 } - * http://192.168.0.1:8080 => { scheme: 'http', host: '192.168.0.1', port: 8080 } - * [::1]:8080 => { scheme: 'http', host: '::1', port: 8080 } - * [::ffff:192.0.2.128]:8080 => { scheme: 'http', host: '::ffff:192.0.2.128', port: 8080 } - * 192.168.0.1:8080 => { scheme: 'http', host: '192.168.0.1', port: 8080 } - * ``` - */ -function splitProtoHostPort(uri) { - const match = protoHostPortRegex.exec(uri); - if (!match?.groups) - return undefined; - return { - scheme: match.groups.scheme, - hostname: match.groups.ipv6 ?? match.groups.hostname, - port: match.groups.port !== undefined ? Number(match.groups.port) : undefined, - }; -} -function joinProtoHostPort(components) { - const { scheme, hostname, port } = components; - const schemeText = scheme ? `${scheme}:` : ''; - const hostnameText = hostname.includes(':') ? `[${hostname}]` : hostname; - const portText = port !== undefined ? `:${port}` : ''; - return `${schemeText}${hostnameText}${portText}`; -} -/** - * Parse the address for the gRPC endpoint of a Temporal server. - * - * - The URI may only contain a hostname and a port. - * - Port is optional; if not specified, set it to `defaultPort`. - * - * Examples of valid URIs (assuming `defaultPort` is 7233): - * - * ``` - * 127.0.0.1 => { host: '127.0.0.1', port: 7233 } - * 192.168.0.1:7233 => { host: '192.168.0.1', port: 7233 } - * my.temporal.service.com:7233 => { host: 'my.temporal.service.com', port: 7233 } - * [::ffff:192.0.2.128]:8080 => { host: '[::ffff:192.0.2.128]', port: 8080 } - * ``` - */ -function normalizeGrpcEndpointAddress(uri, defaultPort) { - const splitted = splitProtoHostPort(uri); - if (!splitted || splitted.scheme !== undefined) { - throw new TypeError(`Invalid address for Temporal gRPC endpoint: expected URI of the form 'hostname' or 'hostname:port'; got '${uri}'`); - } - splitted.port ??= defaultPort; - return joinProtoHostPort(splitted); -} -//# sourceMappingURL=parse-host-uri.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/parse-host-uri.js.map b/node_modules/@temporalio/common/lib/internal-non-workflow/parse-host-uri.js.map deleted file mode 100644 index 6c2cb27..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/parse-host-uri.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse-host-uri.js","sourceRoot":"","sources":["../../src/internal-non-workflow/parse-host-uri.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAoDH,gDAQC;AAED,8CAMC;AAiBD,oEASC;AA5FD;;;GAGG;AACH,MAAM,MAAM,GAAG,2CAA2C,CAAC;AAE3D;;;GAGG;AACH,MAAM,YAAY,GAAG,gCAAgC,CAAC;AAEtD;;;GAGG;AACH,MAAM,YAAY,GAAG,mCAAmC,CAAC;AAEzD,oCAAoC;AACpC,mCAAmC;AACnC,MAAM,WAAW,GAAG,YAAY,CAAC;AAEjC,MAAM,QAAQ,GAAG,MAAM,YAAY,IAAI,YAAY,IAAI,WAAW,GAAG,CAAC;AAEtE,sEAAsE;AACtE,mDAAmD;AACnD,MAAM,IAAI,GAAG,oBAAoB,CAAC;AAElC,MAAM,kBAAkB,GAAG,IAAI,MAAM,CAAC,IAAI,MAAM,iBAAiB,QAAQ,IAAI,IAAI,IAAI,CAAC,CAAC;AAQvF;;;;;;;;;;;;;GAaG;AACH,SAAgB,kBAAkB,CAAC,GAAW;IAC5C,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3C,IAAI,CAAC,KAAK,EAAE,MAAM;QAAE,OAAO,SAAS,CAAC;IACrC,OAAO;QACL,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;QAC3B,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,KAAK,CAAC,MAAM,CAAC,QAAS;QACrD,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;KAC9E,CAAC;AACJ,CAAC;AAED,SAAgB,iBAAiB,CAAC,UAAyB;IACzD,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC;IAC9C,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9C,MAAM,YAAY,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;IACzE,MAAM,QAAQ,GAAG,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACtD,OAAO,GAAG,UAAU,GAAG,YAAY,GAAG,QAAQ,EAAE,CAAC;AACnD,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,4BAA4B,CAAC,GAAW,EAAE,WAAmB;IAC3E,MAAM,QAAQ,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC/C,MAAM,IAAI,SAAS,CACjB,4GAA4G,GAAG,GAAG,CACnH,CAAC;IACJ,CAAC;IACD,QAAQ,CAAC,IAAI,KAAK,WAAW,CAAC;IAC9B,OAAO,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/proxy-config.d.ts b/node_modules/@temporalio/common/lib/internal-non-workflow/proxy-config.d.ts deleted file mode 100644 index 76c1fb0..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/proxy-config.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ProtoHostPort } from './parse-host-uri'; -/** - * Configuration for HTTP CONNECT proxying. - */ -export interface HttpConnectProxyConfig { - type: 'http-connect'; - /** - * Address of the HTTP CONNECT proxy server, in either `hostname:port` or `http://hostname:port` formats. - * - * Port is required, and only the `http` scheme is supported. Raw IPv6 addresses must be wrapped in square brackets - * (e.g. `[ipv6]:port`). - */ - targetHost: string; - /** - * Basic auth for the HTTP CONNECT proxy, if any. - * - * Neither username nor password may contain `:` or `@`. - * - * Note that these credentials will be exposed through environment variables, and will be exchanged in non-encrypted - * form ovrer the network. The connection to the proxy server is not encrypted. - */ - basicAuth?: { - username: string; - password: string; - }; -} -export type ProxyConfig = HttpConnectProxyConfig; -/** - * Parse the address of a HTTP CONNECT proxy endpoint. - * - * - The URI may only contain a scheme, a hostname, and a port; - * - If specified, scheme must be 'http'; - * - Port is required. - * - * Examples of valid URIs: - * - * ``` - * 127.0.0.1:8080 => { scheme: 'http', host: '192.168.0.1', port: 8080 } - * my.temporal.service.com:8888 => { scheme: 'http', host: 'my.temporal.service.com', port: 8888 } - * [::ffff:192.0.2.128]:8080 => { scheme: 'http', host: '::ffff:192.0.2.128', port: 8080 } - * ``` - */ -export declare function parseHttpConnectProxyAddress(target: string): ProtoHostPort; diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/proxy-config.js b/node_modules/@temporalio/common/lib/internal-non-workflow/proxy-config.js deleted file mode 100644 index d1b195b..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/proxy-config.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseHttpConnectProxyAddress = parseHttpConnectProxyAddress; -const parse_host_uri_1 = require("./parse-host-uri"); -/** - * Parse the address of a HTTP CONNECT proxy endpoint. - * - * - The URI may only contain a scheme, a hostname, and a port; - * - If specified, scheme must be 'http'; - * - Port is required. - * - * Examples of valid URIs: - * - * ``` - * 127.0.0.1:8080 => { scheme: 'http', host: '192.168.0.1', port: 8080 } - * my.temporal.service.com:8888 => { scheme: 'http', host: 'my.temporal.service.com', port: 8888 } - * [::ffff:192.0.2.128]:8080 => { scheme: 'http', host: '::ffff:192.0.2.128', port: 8080 } - * ``` - */ -function parseHttpConnectProxyAddress(target) { - const match = (0, parse_host_uri_1.splitProtoHostPort)(target); - if (!match) - throw new TypeError(`Invalid address for HTTP CONNECT proxy: expected 'hostname:port' or '[ipv6 address]:port'; got '${target}'`); - const { scheme = 'http', hostname: host, port } = match; - if (scheme !== 'http') - throw new TypeError(`Invalid address for HTTP CONNECT proxy: scheme must be http'; got '${target}'`); - if (port === undefined) - throw new TypeError(`Invalid address for HTTP CONNECT proxy: port is required; got '${target}'`); - return { scheme, hostname: host, port }; -} -//# sourceMappingURL=proxy-config.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/proxy-config.js.map b/node_modules/@temporalio/common/lib/internal-non-workflow/proxy-config.js.map deleted file mode 100644 index 57b802b..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/proxy-config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"proxy-config.js","sourceRoot":"","sources":["../../src/internal-non-workflow/proxy-config.ts"],"names":[],"mappings":";;AA+CA,oEAYC;AA3DD,qDAAqE;AAgCrE;;;;;;;;;;;;;;GAcG;AACH,SAAgB,4BAA4B,CAAC,MAAc;IACzD,MAAM,KAAK,GAAG,IAAA,mCAAkB,EAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,KAAK;QACR,MAAM,IAAI,SAAS,CACjB,mGAAmG,MAAM,GAAG,CAC7G,CAAC;IACJ,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACxD,IAAI,MAAM,KAAK,MAAM;QACnB,MAAM,IAAI,SAAS,CAAC,sEAAsE,MAAM,GAAG,CAAC,CAAC;IACvG,IAAI,IAAI,KAAK,SAAS;QACpB,MAAM,IAAI,SAAS,CAAC,kEAAkE,MAAM,GAAG,CAAC,CAAC;IACnG,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/tls-config.d.ts b/node_modules/@temporalio/common/lib/internal-non-workflow/tls-config.d.ts deleted file mode 100644 index 64e9272..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/tls-config.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** TLS configuration options. */ -export interface TLSConfig { - /** - * Overrides the target name (SNI) used for TLS host name checking. - * If this attribute is not specified, the name used for TLS host name checking will be the host from {@link ServerOptions.url}. - * This can be useful when you have reverse proxy in front of temporal server, and you may want to override the SNI to - * direct traffic to the appropriate backend server based on custom routing rules. Oppositely, connections could be refused - * if the provided SNI does not match the expected host. Adding this override should be done with care. - */ - serverNameOverride?: string; - /** - * Root CA certificate used by the server. If not set, and the server's - * cert is issued by someone the operating system trusts, verification will still work (ex: Cloud offering). - */ - serverRootCACertificate?: Uint8Array; - /** Sets the client certificate and key for connecting with mTLS */ - clientCertPair?: { - /** The certificate for this client */ - crt: Uint8Array; - /** The private key for this client */ - key: Uint8Array; - }; -} -/** - * TLS configuration. - * Pass a falsy value to use a non-encrypted connection or `true` or `{}` to - * connect with TLS without any customization. - */ -export type TLSConfigOption = TLSConfig | boolean | undefined | null; -/** - * Normalize {@link TLSConfigOption} by turning false and null to undefined and true to and empty object - */ -export declare function normalizeTlsConfig(tls: TLSConfigOption, apiKey?: string | (() => string) | undefined): TLSConfig | undefined; diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/tls-config.js b/node_modules/@temporalio/common/lib/internal-non-workflow/tls-config.js deleted file mode 100644 index df6d13f..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/tls-config.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.normalizeTlsConfig = normalizeTlsConfig; -/** - * Normalize {@link TLSConfigOption} by turning false and null to undefined and true to and empty object - */ -function normalizeTlsConfig(tls, apiKey) { - tls = tls ?? (apiKey !== undefined ? true : undefined); - return typeof tls === 'object' ? (tls === null ? undefined : tls) : tls ? {} : undefined; -} -//# sourceMappingURL=tls-config.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-non-workflow/tls-config.js.map b/node_modules/@temporalio/common/lib/internal-non-workflow/tls-config.js.map deleted file mode 100644 index 5783cf4..0000000 --- a/node_modules/@temporalio/common/lib/internal-non-workflow/tls-config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tls-config.js","sourceRoot":"","sources":["../../src/internal-non-workflow/tls-config.ts"],"names":[],"mappings":";;AAkCA,gDAMC;AATD;;GAEG;AACH,SAAgB,kBAAkB,CAChC,GAAoB,EACpB,MAA4C;IAE5C,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACvD,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3F,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-workflow/enums-helpers.d.ts b/node_modules/@temporalio/common/lib/internal-workflow/enums-helpers.d.ts deleted file mode 100644 index 62dafdf..0000000 --- a/node_modules/@temporalio/common/lib/internal-workflow/enums-helpers.d.ts +++ /dev/null @@ -1,170 +0,0 @@ -import { Exact, RemovePrefix, UnionToIntersection } from '../type-helpers'; -/** - * Create encoding and decoding functions to convert between the numeric `enum` types produced by our - * Protobuf compiler and "const object of strings" enum values that we expose in our public APIs. - * - * ### Usage - * - * Newly introduced enums should follow the following pattern: - * - * ```ts - * const ParentClosePolicy = { - * TERMINATE: 'TERMINATE', - * ABANDON: 'ABANDON', - * REQUEST_CANCEL: 'REQUEST_CANCEL', - * } as const; - * type ParentClosePolicy = (typeof ParentClosePolicy)[keyof typeof ParentClosePolicy]; - * - * const [encodeParentClosePolicy, decodeParentClosePolicy] = // - * makeProtoEnumConverters< - * coresdk.child_workflow.ParentClosePolicy, - * typeof coresdk.child_workflow.ParentClosePolicy, - * keyof typeof coresdk.child_workflow.ParentClosePolicy, - * typeof ParentClosePolicy, - * 'PARENT_CLOSE_POLICY_' // This may be an empty string if the proto enum doesn't add a repeated prefix on values - * >( - * { - * [ParentClosePolicy.TERMINATE]: 1, // These numbers must match the ones in the proto enum - * [ParentClosePolicy.ABANDON]: 2, - * [ParentClosePolicy.REQUEST_CANCEL]: 3, - * - * UNSPECIFIED: 0, - * } as const, - * 'PARENT_CLOSE_POLICY_' - * ); - * ``` - * - * `makeProtoEnumConverters` supports other usage patterns, but they are only meant for - * backward compatibility with former enum definitions and should not be used for new enums. - * - * ### Context - * - * Temporal's Protobuf APIs define several `enum` types; our Protobuf compiler transforms these to - * traditional (i.e. non-const) [TypeScript numeric `enum`s](https://www.typescriptlang.org/docs/handbook/enums.html#numeric-enums). - * - * For various reasons, this is far from ideal: - * - * - Due to the dual nature of non-const TypeScript `enum`s (they are both a type and a value), - * it is not possible to refer to an enum value from code without a "real" import of the enum type - * (i.e. can't simply do `import type ...`). In Workflow code, such an import would result in - * loading our entire Protobuf definitions into the workflow sandbox, adding several megabytes to - * the per-workflow memory footprint, which is unacceptable; to avoid that, we need to maintain - * a mirror copy of each enum types used by in-workflow APIs, and export these from either - * `@temporalio/common` or `@temporalio/workflow`. - * - It is not desirable for users to need an explicit dependency on `@temporalio/proto` just to - * get access to these enum types; we therefore made it a common practice to reexport these enums - * from our public facing packages. However, experience demontrated that these reexports effectively - * resulted in poor and inconsistent documentation coverage compared to mirrored enums types. - * - Our Protobuf enum types tend to follow a verbose and redundant naming convention, which feels - * unatural and excessive according to most TypeScript style guides; e.g. instead of - * `workflowIdReusePolicy: WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE`, - * a TypeScript developer would generally expect to be able to write something similar to - * `workflowIdReusePolicy: 'REJECT_DUPLICATE'`. - * - Because of the way Protobuf works, many of our enum types contain an `UNSPECIFIED` value, which - * is used to explicitly identify a value that is unset. In TypeScript code, the `undefined` value - * already serves that purpose, and is definitely more idiomatic to TS developers, whereas these - * `UNSPECIFIED` values create noise and confusion in our APIs. - * - TypeScript editors generally do a very bad job at providing autocompletion that implies reaching - * for values of a TypeScript enum type, forcing developers to explicitly type in at least part - * of the name of the enum type before they can get autocompletion for its values. On the other - * hand, all TS editors immediately provide autocompletion for string union types. - * - The [TypeScript's official documentation](https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums) - * itself suggests that, in modern TypeScript, the use of `as const` objects may generally suffice - * and may be advantageous over the use of `enum` types. - * - * A const object of strings, combined with a union type of possible string values, provides a much - * more idiomatic syntax and a better DX for TypeScript developers. This however requires a way to - * convert back and forth between the `enum` values produced by the Protobuf compiler and the - * equivalent string values. - * - * This helper dynamically creates these conversion functions for a given Protobuf enum type, - * strongly building upon specific conventions that we have adopted in our Protobuf definitions. - * - * ### Validations - * - * The complex type signature of this helper is there to prevent most potential incoherencies - * that could result from having to manually synchronize the const object of strings enum and the - * conversion table with the proto enum, while not requiring a regular import on the Protobuf enum - * itself (so it can be used safely for enums meant to be used from workflow code). - * - * In particular, failing any of the following invariants will result in build time errors: - * - * - For every key of the form `PREFIX_KEY: number` in the proto enum, excluding the `UNSPECIFIED` key: - * - There MUST be a corresponding `KEY: 'KEY'` entry in the const object of strings enum; - * - There MAY be a corresponding `PREFIX_KEY: 'KEY'` in the const object of strings enum - * (this is meant to preserve backward compatibility with the former syntax; such aliases should - * not be added for new enums and enum entries introduced going forward); - * - There MUST be a corresponding `KEY: number` in the mapping table. - * - If the proto enum contains a `PREFIX_UNSPECIFIED` entry, then: - * - There MAY be a corresponding `PREFIX_UNSPECIFIED: undefined` and/or `UNSPECIFIED: undefined` - * entries in the const object of strings enum — this is meant to preserve backward compatibility - * with the former syntax; this alias should not be added for new enums introduced going forward; - * - There MUST be an `UNSPECIFIED: 0` in the mapping table. - * - The const object of strings enum MUST NOT contain any other keys than the ones mandated or - * optionally allowed be the preceeding rules. - * - The mapping table MUST NOT contain any other keys than the ones mandated above. - * - * These rules notably ensure that whenever a new value is added to an existing Proto enum, the code - * will fail to compile until the corresponding entry is added on the const object of strings enum - * and the mapping table. - * - * @internal - */ -export declare function makeProtoEnumConverters, Prefix extends string, Unspecified = ProtoEnumKey extends `${Prefix}UNSPECIFIED` ? 'UNSPECIFIED' : never, ShortStringEnumKey extends RemovePrefix = Exclude, Unspecified>, StringEnumType extends ProtoConstObjectOfStringsEnum = ProtoConstObjectOfStringsEnum, MapTable extends ProtoEnumToConstObjectOfStringMapTable = ProtoEnumToConstObjectOfStringMapTable>(mapTable: MapTable, prefix: Prefix): [ - (input: ShortStringEnumKey | `${Prefix}${ShortStringEnumKey}` | ProtoEnumValue | null | undefined) => ProtoEnumValue | undefined, - (input: ProtoEnumValue | null | undefined) => ShortStringEnumKey | undefined -]; -/** - * Given the exploded parameters of a proto enum (i.e. short keys, prefix, and short key of the - * unspecified value), make a type that _exactly_ corresponds to the const object of strings enum, - * e.g. the type that the developer is expected to write. - * - * For example, for coresdk.child_workflow.ParentClosePolicy, this evaluates to: - * - * { - * TERMINATE: "TERMINATE"; - * ABANDON: "ABANDON"; - * REQUEST_CANCEL: "REQUEST_CANCEL"; - * - * PARENT_CLOSE_POLICY_TERMINATE?: "TERMINATE"; - * PARENT_CLOSE_POLICY_ABANDON?: "ABANDON"; - * PARENT_CLOSE_POLICY_REQUEST_CANCEL?: "REQUEST_CANCEL"; - * - * PARENT_CLOSE_POLICY_UNSPECIFIED?: undefined; - * } - */ -type ProtoConstObjectOfStringsEnum = UnionToIntersection<{ - readonly [k in ShortStringEnumKey]: k; -} | { - [k in ShortStringEnumKey]: Prefix extends '' ? object : { - readonly [kk in `${Prefix}${k}`]?: k; - }; -}[ShortStringEnumKey] | (Unspecified extends string ? { - [k in `${Prefix}${Unspecified}`]?: undefined; -} : object) | (Unspecified extends string ? { - [k in `${Unspecified}`]?: undefined; -} : object)>; -/** - * Given the exploded parameters of a proto enum (i.e. short keys, prefix, and short key of the - * unspecified value), make a type that _exactly_ corresponds to the mapping table that the user is - * expected to provide. - * - * For example, for coresdk.child_workflow.ParentClosePolicy, this evaluates to: - * - * { - * UNSPECIFIED: 0, - * TERMINATE: 1, - * ABANDON: 2, - * REQUEST_CANCEL: 3, - * } - */ -type ProtoEnumToConstObjectOfStringMapTable<_StringEnum extends ProtoConstObjectOfStringsEnum, ProtoEnumValue extends number, ProtoEnum extends { - [k in ProtoEnumKey]: ProtoEnumValue; -}, ProtoEnumKey extends `${Prefix}${string}`, Prefix extends string, Unspecified, ShortStringEnumKey extends RemovePrefix> = UnionToIntersection<{ - [k in ProtoEnumKey]: { - [kk in RemovePrefix]: ProtoEnum[k] extends number ? ProtoEnum[k] : never; - }; -}[ProtoEnumKey]>; -export {}; diff --git a/node_modules/@temporalio/common/lib/internal-workflow/enums-helpers.js b/node_modules/@temporalio/common/lib/internal-workflow/enums-helpers.js deleted file mode 100644 index 2174f97..0000000 --- a/node_modules/@temporalio/common/lib/internal-workflow/enums-helpers.js +++ /dev/null @@ -1,172 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.makeProtoEnumConverters = makeProtoEnumConverters; -const errors_1 = require("../errors"); -/** - * Create encoding and decoding functions to convert between the numeric `enum` types produced by our - * Protobuf compiler and "const object of strings" enum values that we expose in our public APIs. - * - * ### Usage - * - * Newly introduced enums should follow the following pattern: - * - * ```ts - * const ParentClosePolicy = { - * TERMINATE: 'TERMINATE', - * ABANDON: 'ABANDON', - * REQUEST_CANCEL: 'REQUEST_CANCEL', - * } as const; - * type ParentClosePolicy = (typeof ParentClosePolicy)[keyof typeof ParentClosePolicy]; - * - * const [encodeParentClosePolicy, decodeParentClosePolicy] = // - * makeProtoEnumConverters< - * coresdk.child_workflow.ParentClosePolicy, - * typeof coresdk.child_workflow.ParentClosePolicy, - * keyof typeof coresdk.child_workflow.ParentClosePolicy, - * typeof ParentClosePolicy, - * 'PARENT_CLOSE_POLICY_' // This may be an empty string if the proto enum doesn't add a repeated prefix on values - * >( - * { - * [ParentClosePolicy.TERMINATE]: 1, // These numbers must match the ones in the proto enum - * [ParentClosePolicy.ABANDON]: 2, - * [ParentClosePolicy.REQUEST_CANCEL]: 3, - * - * UNSPECIFIED: 0, - * } as const, - * 'PARENT_CLOSE_POLICY_' - * ); - * ``` - * - * `makeProtoEnumConverters` supports other usage patterns, but they are only meant for - * backward compatibility with former enum definitions and should not be used for new enums. - * - * ### Context - * - * Temporal's Protobuf APIs define several `enum` types; our Protobuf compiler transforms these to - * traditional (i.e. non-const) [TypeScript numeric `enum`s](https://www.typescriptlang.org/docs/handbook/enums.html#numeric-enums). - * - * For various reasons, this is far from ideal: - * - * - Due to the dual nature of non-const TypeScript `enum`s (they are both a type and a value), - * it is not possible to refer to an enum value from code without a "real" import of the enum type - * (i.e. can't simply do `import type ...`). In Workflow code, such an import would result in - * loading our entire Protobuf definitions into the workflow sandbox, adding several megabytes to - * the per-workflow memory footprint, which is unacceptable; to avoid that, we need to maintain - * a mirror copy of each enum types used by in-workflow APIs, and export these from either - * `@temporalio/common` or `@temporalio/workflow`. - * - It is not desirable for users to need an explicit dependency on `@temporalio/proto` just to - * get access to these enum types; we therefore made it a common practice to reexport these enums - * from our public facing packages. However, experience demontrated that these reexports effectively - * resulted in poor and inconsistent documentation coverage compared to mirrored enums types. - * - Our Protobuf enum types tend to follow a verbose and redundant naming convention, which feels - * unatural and excessive according to most TypeScript style guides; e.g. instead of - * `workflowIdReusePolicy: WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE`, - * a TypeScript developer would generally expect to be able to write something similar to - * `workflowIdReusePolicy: 'REJECT_DUPLICATE'`. - * - Because of the way Protobuf works, many of our enum types contain an `UNSPECIFIED` value, which - * is used to explicitly identify a value that is unset. In TypeScript code, the `undefined` value - * already serves that purpose, and is definitely more idiomatic to TS developers, whereas these - * `UNSPECIFIED` values create noise and confusion in our APIs. - * - TypeScript editors generally do a very bad job at providing autocompletion that implies reaching - * for values of a TypeScript enum type, forcing developers to explicitly type in at least part - * of the name of the enum type before they can get autocompletion for its values. On the other - * hand, all TS editors immediately provide autocompletion for string union types. - * - The [TypeScript's official documentation](https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums) - * itself suggests that, in modern TypeScript, the use of `as const` objects may generally suffice - * and may be advantageous over the use of `enum` types. - * - * A const object of strings, combined with a union type of possible string values, provides a much - * more idiomatic syntax and a better DX for TypeScript developers. This however requires a way to - * convert back and forth between the `enum` values produced by the Protobuf compiler and the - * equivalent string values. - * - * This helper dynamically creates these conversion functions for a given Protobuf enum type, - * strongly building upon specific conventions that we have adopted in our Protobuf definitions. - * - * ### Validations - * - * The complex type signature of this helper is there to prevent most potential incoherencies - * that could result from having to manually synchronize the const object of strings enum and the - * conversion table with the proto enum, while not requiring a regular import on the Protobuf enum - * itself (so it can be used safely for enums meant to be used from workflow code). - * - * In particular, failing any of the following invariants will result in build time errors: - * - * - For every key of the form `PREFIX_KEY: number` in the proto enum, excluding the `UNSPECIFIED` key: - * - There MUST be a corresponding `KEY: 'KEY'` entry in the const object of strings enum; - * - There MAY be a corresponding `PREFIX_KEY: 'KEY'` in the const object of strings enum - * (this is meant to preserve backward compatibility with the former syntax; such aliases should - * not be added for new enums and enum entries introduced going forward); - * - There MUST be a corresponding `KEY: number` in the mapping table. - * - If the proto enum contains a `PREFIX_UNSPECIFIED` entry, then: - * - There MAY be a corresponding `PREFIX_UNSPECIFIED: undefined` and/or `UNSPECIFIED: undefined` - * entries in the const object of strings enum — this is meant to preserve backward compatibility - * with the former syntax; this alias should not be added for new enums introduced going forward; - * - There MUST be an `UNSPECIFIED: 0` in the mapping table. - * - The const object of strings enum MUST NOT contain any other keys than the ones mandated or - * optionally allowed be the preceeding rules. - * - The mapping table MUST NOT contain any other keys than the ones mandated above. - * - * These rules notably ensure that whenever a new value is added to an existing Proto enum, the code - * will fail to compile until the corresponding entry is added on the const object of strings enum - * and the mapping table. - * - * @internal - */ -function makeProtoEnumConverters(mapTable, prefix) { - const reverseTable = Object.fromEntries(Object.entries(mapTable).map(([k, v]) => [v, k])); - const hasUnspecified = mapTable['UNSPECIFIED'] === 0 || mapTable[`${prefix}UNSPECIFIED`] === 0; - function isShortStringEnumKeys(x) { - return typeof x === 'string' && x in mapTable; - } - function isNumericEnumValue(x) { - return typeof x === 'number' && x in reverseTable; - } - function encode(input) { - if (input == null) { - return undefined; - } - else if (typeof input === 'string') { - let shorten = input; - if (shorten.startsWith(prefix)) { - shorten = shorten.slice(prefix.length); - } - if (isShortStringEnumKeys(shorten)) { - return mapTable[shorten]; - } - throw new errors_1.ValueError(`Invalid enum value: '${input}'`); - } - else if (typeof input === 'number') { - return input; - } - else { - throw new errors_1.ValueError(`Invalid enum value: '${input}' of type ${typeof input}`); - } - } - function decode(input) { - if (input == null) { - return undefined; - } - else if (typeof input === 'number') { - if (hasUnspecified && input === 0) { - return undefined; - } - if (isNumericEnumValue(input)) { - return reverseTable[input]; - } - // We got a proto enum value that we don't yet know about (i.e. it didn't exist when this code - // was compiled). This is certainly a possibility, but given how our APIs evolve, this is is - // unlikely to be a terribly bad thing by itself (we avoid adding new enum values in places - // that would break backward compatibility with existing deployed code). Therefore, throwing - // on "unexpected" values is likely to end up causing more problems than it might avoid, - // especially given that the decoded value may actually never get read anwyay. - // - // Therefore, we instead cheat on type constraints and return a string of the form "unknown_23". - // That somewhat mirrors the behavior we'd get with the pure numerical approach. - return `unknown_${input}`; - } - throw new errors_1.ValueError(`Invalid proto enum value: '${input}' of type ${typeof input}`); - } - return [encode, decode]; -} -//# sourceMappingURL=enums-helpers.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-workflow/enums-helpers.js.map b/node_modules/@temporalio/common/lib/internal-workflow/enums-helpers.js.map deleted file mode 100644 index 4f597b8..0000000 --- a/node_modules/@temporalio/common/lib/internal-workflow/enums-helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"enums-helpers.js","sourceRoot":"","sources":["../../src/internal-workflow/enums-helpers.ts"],"names":[],"mappings":";;AAkHA,0DA0GC;AA5ND,sCAAuC;AAGvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8GG;AACH,SAAgB,uBAAuB,CAoCrC,QAAkB,EAClB,MAAc;IAOd,MAAM,YAAY,GAA+C,MAAM,CAAC,WAAW,CACjF,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CACjD,CAAC;IACF,MAAM,cAAc,GAAI,QAAgB,CAAC,aAAa,CAAC,KAAK,CAAC,IAAK,QAAgB,CAAC,GAAG,MAAM,aAAa,CAAC,KAAK,CAAC,CAAC;IAEjH,SAAS,qBAAqB,CAAC,CAAU;QACvC,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,IAAI,QAAQ,CAAC;IAChD,CAAC;IAED,SAAS,kBAAkB,CAAC,CAAU;QACpC,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,IAAI,YAAY,CAAC;IACpD,CAAC;IAED,SAAS,MAAM,CACb,KAAgG;QAEhG,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAClB,OAAO,SAAS,CAAC;QACnB,CAAC;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACrC,IAAI,OAAO,GAAW,KAAK,CAAC;YAC5B,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC/B,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACzC,CAAC;YACD,IAAI,qBAAqB,CAAC,OAAO,CAAC,EAAE,CAAC;gBACnC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC;YAC3B,CAAC;YACD,MAAM,IAAI,mBAAU,CAAC,wBAAwB,KAAK,GAAG,CAAC,CAAC;QACzD,CAAC;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACrC,OAAO,KAAK,CAAC;QACf,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,mBAAU,CAAC,wBAAwB,KAAK,aAAa,OAAO,KAAK,EAAE,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;IAED,SAAS,MAAM,CAAC,KAAwC;QACtD,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAClB,OAAO,SAAS,CAAC;QACnB,CAAC;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACrC,IAAI,cAAc,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;gBAClC,OAAO,SAAS,CAAC;YACnB,CAAC;YAED,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC9B,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;YAC7B,CAAC;YAED,8FAA8F;YAC9F,4FAA4F;YAC5F,2FAA2F;YAC3F,4FAA4F;YAC5F,wFAAwF;YACxF,8EAA8E;YAC9E,EAAE;YACF,gGAAgG;YAChG,gFAAgF;YAChF,OAAO,WAAW,KAAK,EAAwB,CAAC;QAClD,CAAC;QAED,MAAM,IAAI,mBAAU,CAAC,8BAA8B,KAAK,aAAa,OAAO,KAAK,EAAE,CAAC,CAAC;IACvF,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,MAAM,CAAU,CAAC;AACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-workflow/index.d.ts b/node_modules/@temporalio/common/lib/internal-workflow/index.d.ts deleted file mode 100644 index 07327bc..0000000 --- a/node_modules/@temporalio/common/lib/internal-workflow/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './enums-helpers'; -export { filterNullAndUndefined, mergeObjects, deepMerge, } from './objects-helpers'; diff --git a/node_modules/@temporalio/common/lib/internal-workflow/index.js b/node_modules/@temporalio/common/lib/internal-workflow/index.js deleted file mode 100644 index 2637c48..0000000 --- a/node_modules/@temporalio/common/lib/internal-workflow/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.deepMerge = exports.mergeObjects = exports.filterNullAndUndefined = void 0; -__exportStar(require("./enums-helpers"), exports); -var objects_helpers_1 = require("./objects-helpers"); -Object.defineProperty(exports, "filterNullAndUndefined", { enumerable: true, get: function () { return objects_helpers_1.filterNullAndUndefined; } }); -Object.defineProperty(exports, "mergeObjects", { enumerable: true, get: function () { return objects_helpers_1.mergeObjects; } }); -// ts-prune-ignore-next -Object.defineProperty(exports, "deepMerge", { enumerable: true, get: function () { return objects_helpers_1.deepMerge; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-workflow/index.js.map b/node_modules/@temporalio/common/lib/internal-workflow/index.js.map deleted file mode 100644 index 3b9f273..0000000 --- a/node_modules/@temporalio/common/lib/internal-workflow/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internal-workflow/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,qDAK2B;AAJzB,yHAAA,sBAAsB,OAAA;AACtB,+GAAA,YAAY,OAAA;AACZ,uBAAuB;AACvB,4GAAA,SAAS,OAAA"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-workflow/objects-helpers.d.ts b/node_modules/@temporalio/common/lib/internal-workflow/objects-helpers.d.ts deleted file mode 100644 index 3bbcb15..0000000 --- a/node_modules/@temporalio/common/lib/internal-workflow/objects-helpers.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Helper to prevent `undefined` and `null` values overriding defaults when merging maps. - */ -export declare function filterNullAndUndefined>(obj: T): T; -/** - * Merge two objects, possibly removing keys. - * - * More specifically: - * - Any key/value pair in `delta` overrides the corresponding key/value pair in `original`; - * - A key present in `delta` with value `undefined` removes the key from the resulting object; - * - If `original` is `undefined` or empty, return `delta`; - * - If `delta` is `undefined` or empty, return `original` (or undefined if `original` is also undefined); - * - If there are no changes, then return `original`. - */ -export declare function mergeObjects>(original: T, delta: T | undefined): T; -/** - * Recursively merges two objects, returning a new object. - * - * Properties from `source` will overwrite properties on `target`. - * Nested objects are merged recursively. - * - * Object fields in the returned object are references, as in, - * the returned object is not completely fresh. - */ -export declare function deepMerge>(target: T, source: Partial): T; diff --git a/node_modules/@temporalio/common/lib/internal-workflow/objects-helpers.js b/node_modules/@temporalio/common/lib/internal-workflow/objects-helpers.js deleted file mode 100644 index 1777311..0000000 --- a/node_modules/@temporalio/common/lib/internal-workflow/objects-helpers.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.filterNullAndUndefined = filterNullAndUndefined; -exports.mergeObjects = mergeObjects; -exports.deepMerge = deepMerge; -/** - * Helper to prevent `undefined` and `null` values overriding defaults when merging maps. - */ -function filterNullAndUndefined(obj) { - return Object.fromEntries(Object.entries(obj).filter(([_k, v]) => v != null)); -} -function mergeObjects(original, delta) { - if (original == null) - return delta; - if (delta == null) - return original; - const merged = { ...original }; - let changed = false; - for (const [k, v] of Object.entries(delta)) { - if (v !== merged[k]) { - if (v == null) - delete merged[k]; - else - merged[k] = v; - changed = true; - } - } - return changed ? merged : original; -} -function isObject(item) { - return item && typeof item === 'object' && !Array.isArray(item); -} -/** - * Recursively merges two objects, returning a new object. - * - * Properties from `source` will overwrite properties on `target`. - * Nested objects are merged recursively. - * - * Object fields in the returned object are references, as in, - * the returned object is not completely fresh. - */ -function deepMerge(target, source) { - const output = { ...target }; - if (isObject(target) && isObject(source)) { - for (const key of Object.keys(source)) { - const sourceValue = source[key]; - if (isObject(sourceValue) && key in target && isObject(target[key])) { - output[key] = deepMerge(target[key], sourceValue); - } - else { - output[key] = sourceValue; - } - } - } - return output; -} -//# sourceMappingURL=objects-helpers.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/internal-workflow/objects-helpers.js.map b/node_modules/@temporalio/common/lib/internal-workflow/objects-helpers.js.map deleted file mode 100644 index f6240e5..0000000 --- a/node_modules/@temporalio/common/lib/internal-workflow/objects-helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"objects-helpers.js","sourceRoot":"","sources":["../../src/internal-workflow/objects-helpers.ts"],"names":[],"mappings":";;AAGA,wDAEC;AAaD,oCAkBC;AAeD,8BAeC;AAlED;;GAEG;AACH,SAAgB,sBAAsB,CAAgC,GAAM;IAC1E,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAAQ,CAAC;AACvF,CAAC;AAaD,SAAgB,YAAY,CAC1B,QAAuB,EACvB,KAAoB;IAEpB,IAAI,QAAQ,IAAI,IAAI;QAAE,OAAO,KAAK,CAAC;IACnC,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C,GAAG,CAAC,EAAE,WAAW,CAAC,CAAC;YAC/D,CAAC;iBAAM,CAAC;gBACL,MAAc,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC;YACrC,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/logger.d.ts b/node_modules/@temporalio/common/lib/logger.d.ts deleted file mode 100644 index f9f6695..0000000 --- a/node_modules/@temporalio/common/lib/logger.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -export type LogLevel = 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR'; -export type LogMetadata = Record; -/** - * Implement this interface in order to customize worker logging - */ -export interface Logger { - log(level: LogLevel, message: string, meta?: LogMetadata): any; - trace(message: string, meta?: LogMetadata): any; - debug(message: string, meta?: LogMetadata): any; - info(message: string, meta?: LogMetadata): any; - warn(message: string, meta?: LogMetadata): any; - error(message: string, meta?: LogMetadata): any; -} -/** - * Possible values of the `sdkComponent` meta attributes on log messages. This - * attribute indicates which subsystem emitted the log message; this may for - * example be used to implement fine-grained filtering of log messages. - * - * Note that there is no guarantee that this list will remain stable in the - * future; values may be added or removed, and messages that are currently - * emitted with some `sdkComponent` value may use a different value in the future. - */ -export declare enum SdkComponent { - /** - * Component name for messages emited from Workflow code, using the {@link Workflow context logger|workflow.log}. - * The SDK itself never publishes messages with this component name. - */ - workflow = "workflow", - /** - * Component name for messages emited from an activity, using the {@link activity context logger|Context.log}. - * The SDK itself never publishes messages with this component name. - */ - activity = "activity", - /** - * Component name for messages emited from a Nexus Operation Handler, using the Nexus context logger. - * The SDK itself never publishes messages with this component name. - */ - nexus = "nexus", - /** - * Component name for messages emited from a Temporal Worker instance. - * - * This notably includes: - * - Issues with Worker or runtime configuration, or the JS execution environment; - * - Worker's, Activity's, and Workflow's lifecycle events; - * - Workflow Activation and Activity Task processing events; - * - Workflow bundling messages; - * - Sink processing issues. - */ - worker = "worker", - /** - * Component name for all messages emitted by the Rust Core SDK library. - */ - core = "core" -} -/** - * @internal - * @hidden - */ -export type LogMetaOrFunc = LogMetadata | (() => LogMetadata); -/** - * A logger implementation that adds metadata before delegating calls to a parent logger. - * - * @internal - * @hidden - */ -export declare class LoggerWithComposedMetadata implements Logger { - private readonly parentLogger; - private readonly contributors; - /** - * Return a {@link Logger} that adds metadata before delegating calls to a parent logger. - * - * New metadata may either be specified statically as a delta object, or as a function evaluated - * every time a log is emitted that will return a delta object. - * - * Some optimizations are performed to avoid creating unnecessary objects and to keep runtime - * overhead associated with resolving metadata as low as possible. - */ - static compose(logger: Logger, metaOrFunc: LogMetaOrFunc): Logger; - constructor(parentLogger: Logger, contributors: LogMetaOrFunc[]); - log(level: LogLevel, message: string, extraMeta?: LogMetadata): void; - trace(message: string, extraMeta?: LogMetadata): void; - debug(message: string, extraMeta?: LogMetadata): void; - info(message: string, extraMeta?: LogMetadata): void; - warn(message: string, extraMeta?: LogMetadata): void; - error(message: string, extraMeta?: LogMetadata): void; -} diff --git a/node_modules/@temporalio/common/lib/logger.js b/node_modules/@temporalio/common/lib/logger.js deleted file mode 100644 index 6487fba..0000000 --- a/node_modules/@temporalio/common/lib/logger.js +++ /dev/null @@ -1,136 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LoggerWithComposedMetadata = exports.SdkComponent = void 0; -const internal_workflow_1 = require("./internal-workflow"); -/** - * Possible values of the `sdkComponent` meta attributes on log messages. This - * attribute indicates which subsystem emitted the log message; this may for - * example be used to implement fine-grained filtering of log messages. - * - * Note that there is no guarantee that this list will remain stable in the - * future; values may be added or removed, and messages that are currently - * emitted with some `sdkComponent` value may use a different value in the future. - */ -var SdkComponent; -(function (SdkComponent) { - /** - * Component name for messages emited from Workflow code, using the {@link Workflow context logger|workflow.log}. - * The SDK itself never publishes messages with this component name. - */ - SdkComponent["workflow"] = "workflow"; - /** - * Component name for messages emited from an activity, using the {@link activity context logger|Context.log}. - * The SDK itself never publishes messages with this component name. - */ - SdkComponent["activity"] = "activity"; - /** - * Component name for messages emited from a Nexus Operation Handler, using the Nexus context logger. - * The SDK itself never publishes messages with this component name. - */ - SdkComponent["nexus"] = "nexus"; - /** - * Component name for messages emited from a Temporal Worker instance. - * - * This notably includes: - * - Issues with Worker or runtime configuration, or the JS execution environment; - * - Worker's, Activity's, and Workflow's lifecycle events; - * - Workflow Activation and Activity Task processing events; - * - Workflow bundling messages; - * - Sink processing issues. - */ - SdkComponent["worker"] = "worker"; - /** - * Component name for all messages emitted by the Rust Core SDK library. - */ - SdkComponent["core"] = "core"; -})(SdkComponent || (exports.SdkComponent = SdkComponent = {})); -/** - * A logger implementation that adds metadata before delegating calls to a parent logger. - * - * @internal - * @hidden - */ -class LoggerWithComposedMetadata { - parentLogger; - contributors; - /** - * Return a {@link Logger} that adds metadata before delegating calls to a parent logger. - * - * New metadata may either be specified statically as a delta object, or as a function evaluated - * every time a log is emitted that will return a delta object. - * - * Some optimizations are performed to avoid creating unnecessary objects and to keep runtime - * overhead associated with resolving metadata as low as possible. - */ - static compose(logger, metaOrFunc) { - // Flatten recursive LoggerWithComposedMetadata instances - if (logger instanceof LoggerWithComposedMetadata) { - const contributors = appendToChain(logger.contributors, metaOrFunc); - // If the new contributor results in no actual change to the chain, then we don't need a new logger - if (contributors === undefined) - return logger; - return new LoggerWithComposedMetadata(logger.parentLogger, contributors); - } - else { - const contributors = appendToChain(undefined, metaOrFunc); - if (contributors === undefined) - return logger; - return new LoggerWithComposedMetadata(logger, contributors); - } - } - constructor(parentLogger, contributors) { - this.parentLogger = parentLogger; - this.contributors = contributors; - } - log(level, message, extraMeta) { - this.parentLogger.log(level, message, resolveMetadata(this.contributors, extraMeta)); - } - trace(message, extraMeta) { - this.parentLogger.trace(message, resolveMetadata(this.contributors, extraMeta)); - } - debug(message, extraMeta) { - this.parentLogger.debug(message, resolveMetadata(this.contributors, extraMeta)); - } - info(message, extraMeta) { - this.parentLogger.info(message, resolveMetadata(this.contributors, extraMeta)); - } - warn(message, extraMeta) { - this.parentLogger.warn(message, resolveMetadata(this.contributors, extraMeta)); - } - error(message, extraMeta) { - this.parentLogger.error(message, resolveMetadata(this.contributors, extraMeta)); - } -} -exports.LoggerWithComposedMetadata = LoggerWithComposedMetadata; -function resolveMetadata(contributors, extraMeta) { - const resolved = {}; - for (const contributor of contributors) { - Object.assign(resolved, typeof contributor === 'function' ? contributor() : contributor); - } - Object.assign(resolved, extraMeta); - return (0, internal_workflow_1.filterNullAndUndefined)(resolved); -} -/** - * Append a metadata contributor to the chain, merging it with the former last contributor if both are plain objects - */ -function appendToChain(existingContributors, newContributor) { - // If the new contributor is an empty object, then it results in no actual change to the chain - if (typeof newContributor === 'object' && Object.keys(newContributor).length === 0) { - return existingContributors; - } - // If existing chain is empty, then the new contributor is the chain - if (existingContributors == null || existingContributors.length === 0) { - return [newContributor]; - } - // If both last contributor and new contributor are plain objects, merge them to a single object. - const last = existingContributors[existingContributors.length - 1]; - if (typeof last === 'object' && typeof newContributor === 'object') { - const merged = (0, internal_workflow_1.mergeObjects)(last, newContributor); - if (merged === last) - return existingContributors; - return [...existingContributors.slice(0, -1), merged]; - } - // Otherwise, just append the new contributor to the chain. - return [...existingContributors, newContributor]; -} -//# sourceMappingURL=logger.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/logger.js.map b/node_modules/@temporalio/common/lib/logger.js.map deleted file mode 100644 index f5989d1..0000000 --- a/node_modules/@temporalio/common/lib/logger.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";;;AAAA,2DAA2E;AAkB3E;;;;;;;;GAQG;AACH,IAAY,YAmCX;AAnCD,WAAY,YAAY;IACtB;;;OAGG;IACH,qCAAqB,CAAA;IAErB;;;OAGG;IACH,qCAAqB,CAAA;IAErB;;;OAGG;IACH,+BAAe,CAAA;IAEf;;;;;;;;;OASG;IACH,iCAAiB,CAAA;IAEjB;;OAEG;I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9B,CAAC;IAED,oEAAoE;IACpE,IAAI,oBAAoB,IAAI,IAAI,IAAI,oBAAoB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtE,OAAO,CAAC,cAAc,CAAC,CAAC;IAC1B,CAAC;IAED,iGAAiG;IACjG,MAAM,IAAI,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACnE,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE,CAAC;QACnE,MAAM,MAAM,GAAG,IAAA,gCAAY,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QAClD,IAAI,MAAM,KAAK,IAAI;YAAE,OAAO,oBAAoB,CAAC;QACjD,OAAO,CAAC,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACxD,CAAC;IAED,2DAA2D;IAC3D,OAAO,CAAC,GAAG,oBAAoB,EAAE,cAAc,CAAC,CAAC;AACnD,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/metrics.d.ts b/node_modules/@temporalio/common/lib/metrics.d.ts deleted file mode 100644 index f338e9f..0000000 --- a/node_modules/@temporalio/common/lib/metrics.d.ts +++ /dev/null @@ -1,200 +0,0 @@ -/** - * A meter for creating metrics to record values on. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export interface MetricMeter { - /** - * Create a new counter metric that supports adding values. - * - * @param name Name for the counter metric. - * @param unit Unit for the counter metric. Optional. - * @param description Description for the counter metric. Optional. - */ - createCounter(name: string, unit?: string, description?: string): MetricCounter; - /** - * Create a new histogram metric that supports recording values. - * - * @param name Name for the histogram metric. - * @param valueType Type of value to record. Defaults to `int`. - * @param unit Unit for the histogram metric. Optional. - * @param description Description for the histogram metric. Optional. - */ - createHistogram(name: string, valueType?: NumericMetricValueType, unit?: string, description?: string): MetricHistogram; - /** - * Create a new gauge metric that supports setting values. - * - * @param name Name for the gauge metric. - * @param valueType Type of value to set. Defaults to `int`. - * @param unit Unit for the gauge metric. Optional. - * @param description Description for the gauge metric. Optional. - */ - createGauge(name: string, valueType?: NumericMetricValueType, unit?: string, description?: string): MetricGauge; - /** - * Return a clone of this meter, with additional tags. All metrics created off the meter will - * have the tags. - * - * @param tags Tags to append. - */ - withTags(tags: MetricTags): MetricMeter; -} -/** - * Base interface for all metrics. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export interface Metric { - /** - * The name of the metric. - */ - name: string; - /** - * The unit of the metric, if any. - */ - unit?: string; - /** - * The description of the metric, if any. - */ - description?: string; - /** - * The kind of the metric (e.g. `counter`, `histogram`, `gauge`). - */ - kind: MetricKind; - /** - * The type of value recorded by the metric. Either `int` or `float`. - */ - valueType: NumericMetricValueType; -} -/** - * Tags to be attached to some metrics. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export type MetricTags = Record; -/** - * Type of numerical values recorded by a metric. - * - * Note that this represents the _configuration_ of the metric; however, since JavaScript doesn't - * have different runtime representation for integers and floats, the actual value type is always - * a JS 'number'. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export type NumericMetricValueType = 'int' | 'float'; -/** - * The kind of a metric. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export type MetricKind = 'counter' | 'histogram' | 'gauge'; -/** - * A metric that supports adding values as a counter. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export interface MetricCounter extends Metric { - /** - * Add the given value to the counter. - * - * @param value Value to add. - * @param extraTags Extra tags if any. - */ - add(value: number, extraTags?: MetricTags): void; - /** - * Return a clone of this counter, with additional tags. - * - * @param tags Tags to append to existing tags. - */ - withTags(tags: MetricTags): MetricCounter; - kind: 'counter'; - valueType: 'int'; -} -/** - * A metric that supports recording values on a histogram. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export interface MetricHistogram extends Metric { - /** - * Record the given value on the histogram. - * - * @param value Value to record. Must be a non-negative number. Value will be casted to the given - * {@link valueType}. Loss of precision may occur if the value is not already of the - * correct type. - * @param extraTags Extra tags if any. - */ - record(value: number, extraTags?: MetricTags): void; - /** - * Return a clone of this histogram, with additional tags. - * - * @param tags Tags to append to existing tags. - */ - withTags(tags: MetricTags): MetricHistogram; - kind: 'histogram'; -} -/** - * A metric that supports setting values. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export interface MetricGauge extends Metric { - /** - * Set the given value on the gauge. - * - * @param value Value to set. - * @param extraTags Extra tags if any. - */ - set(value: number, extraTags?: MetricTags): void; - /** - * Return a clone of this gauge, with additional tags. - * - * @param tags Tags to append to existing tags. - */ - withTags(tags: MetricTags): MetricGauge; - kind: 'gauge'; -} -/** - * A meter implementation that does nothing. - */ -declare class NoopMetricMeter implements MetricMeter { - createCounter(name: string, unit?: string, description?: string): MetricCounter; - createHistogram(name: string, valueType?: NumericMetricValueType, unit?: string, description?: string): MetricHistogram; - createGauge(name: string, valueType?: NumericMetricValueType, unit?: string, description?: string): MetricGauge; - withTags(_extraTags: MetricTags): MetricMeter; -} -export declare const noopMetricMeter: NoopMetricMeter; -export type MetricTagsOrFunc = MetricTags | (() => MetricTags); -/** - * A meter implementation that adds tags before delegating calls to a parent meter. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - * @internal - * @hidden - */ -export declare class MetricMeterWithComposedTags implements MetricMeter { - private readonly parentMeter; - private readonly contributors; - /** - * Return a {@link MetricMeter} that adds tags before delegating calls to a parent meter. - * - * New tags may either be specified statically as a delta object, or as a function evaluated - * every time a metric is recorded that will return a delta object. - * - * Some optimizations are performed to avoid creating unnecessary objects and to keep runtime - * overhead associated with resolving tags as low as possible. - * - * @param meter The parent meter to delegate calls to. - * @param tagsOrFunc New tags may either be specified statically as a delta object, or as a function - * evaluated every time a metric is recorded that will return a delta object. - * @param force if `true`, then a `MetricMeterWithComposedTags` will be created even if there - * is no tags to add. This is useful to add tags support to an underlying meter - * implementation that does not support tags directly. - */ - static compose(meter: MetricMeter, tagsOrFunc: MetricTagsOrFunc, force?: boolean): MetricMeter; - private constructor(); - createCounter(name: string, unit?: string, description?: string): MetricCounter; - createHistogram(name: string, valueType?: NumericMetricValueType, unit?: string, description?: string): MetricHistogram; - createGauge(name: string, valueType?: NumericMetricValueType, unit?: string, description?: string): MetricGauge; - withTags(tags: MetricTags): MetricMeter; -} -export {}; diff --git a/node_modules/@temporalio/common/lib/metrics.js b/node_modules/@temporalio/common/lib/metrics.js deleted file mode 100644 index 8b6aee5..0000000 --- a/node_modules/@temporalio/common/lib/metrics.js +++ /dev/null @@ -1,248 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MetricMeterWithComposedTags = exports.noopMetricMeter = void 0; -const internal_workflow_1 = require("./internal-workflow"); -//////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * A meter implementation that does nothing. - */ -class NoopMetricMeter { - createCounter(name, unit, description) { - return { - name, - unit, - description, - kind: 'counter', - valueType: 'int', - add(_value, _extraTags) { }, - withTags(_extraTags) { - return this; - }, - }; - } - createHistogram(name, valueType = 'int', unit, description) { - return { - name, - unit, - description, - kind: 'histogram', - valueType, - record(_value, _extraTags) { }, - withTags(_extraTags) { - return this; - }, - }; - } - createGauge(name, valueType = 'int', unit, description) { - return { - name, - unit, - description, - kind: 'gauge', - valueType, - set(_value, _extraTags) { }, - withTags(_extraTags) { - return this; - }, - }; - } - withTags(_extraTags) { - return this; - } -} -exports.noopMetricMeter = new NoopMetricMeter(); -/** - * A meter implementation that adds tags before delegating calls to a parent meter. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - * @internal - * @hidden - */ -class MetricMeterWithComposedTags { - parentMeter; - contributors; - /** - * Return a {@link MetricMeter} that adds tags before delegating calls to a parent meter. - * - * New tags may either be specified statically as a delta object, or as a function evaluated - * every time a metric is recorded that will return a delta object. - * - * Some optimizations are performed to avoid creating unnecessary objects and to keep runtime - * overhead associated with resolving tags as low as possible. - * - * @param meter The parent meter to delegate calls to. - * @param tagsOrFunc New tags may either be specified statically as a delta object, or as a function - * evaluated every time a metric is recorded that will return a delta object. - * @param force if `true`, then a `MetricMeterWithComposedTags` will be created even if there - * is no tags to add. This is useful to add tags support to an underlying meter - * implementation that does not support tags directly. - */ - static compose(meter, tagsOrFunc, force = false) { - if (meter instanceof MetricMeterWithComposedTags) { - const contributors = appendToChain(meter.contributors, tagsOrFunc); - // If the new contributor results in no actual change to the chain, then we don't need a new meter - if (contributors === undefined && !force) - return meter; - return new MetricMeterWithComposedTags(meter.parentMeter, contributors ?? []); - } - else { - const contributors = appendToChain(undefined, tagsOrFunc); - if (contributors === undefined && !force) - return meter; - return new MetricMeterWithComposedTags(meter, contributors ?? []); - } - } - constructor(parentMeter, contributors) { - this.parentMeter = parentMeter; - this.contributors = contributors; - } - createCounter(name, unit, description) { - const parentCounter = this.parentMeter.createCounter(name, unit, description); - return new MetricCounterWithComposedTags(parentCounter, this.contributors); - } - createHistogram(name, valueType = 'int', unit, description) { - const parentHistogram = this.parentMeter.createHistogram(name, valueType, unit, description); - return new MetricHistogramWithComposedTags(parentHistogram, this.contributors); - } - createGauge(name, valueType = 'int', unit, description) { - const parentGauge = this.parentMeter.createGauge(name, valueType, unit, description); - return new MetricGaugeWithComposedTags(parentGauge, this.contributors); - } - withTags(tags) { - return MetricMeterWithComposedTags.compose(this, tags); - } -} -exports.MetricMeterWithComposedTags = MetricMeterWithComposedTags; -/** - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -class MetricCounterWithComposedTags { - parentCounter; - contributors; - kind = 'counter'; - valueType = 'int'; - constructor(parentCounter, contributors) { - this.parentCounter = parentCounter; - this.contributors = contributors; - } - add(value, extraTags) { - this.parentCounter.add(value, resolveTags(this.contributors, extraTags)); - } - withTags(extraTags) { - const contributors = appendToChain(this.contributors, extraTags); - if (contributors === undefined) - return this; - return new MetricCounterWithComposedTags(this.parentCounter, contributors); - } - get name() { - return this.parentCounter.name; - } - get unit() { - return this.parentCounter.unit; - } - get description() { - return this.parentCounter.description; - } -} -/** - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -class MetricHistogramWithComposedTags { - parentHistogram; - contributors; - kind = 'histogram'; - constructor(parentHistogram, contributors) { - this.parentHistogram = parentHistogram; - this.contributors = contributors; - } - record(value, extraTags) { - this.parentHistogram.record(value, resolveTags(this.contributors, extraTags)); - } - withTags(extraTags) { - const contributors = appendToChain(this.contributors, extraTags); - if (contributors === undefined) - return this; - return new MetricHistogramWithComposedTags(this.parentHistogram, contributors); - } - get name() { - return this.parentHistogram.name; - } - get valueType() { - return this.parentHistogram.valueType; - } - get unit() { - return this.parentHistogram.unit; - } - get description() { - return this.parentHistogram.description; - } -} -/** - * @internal - * @hidden - */ -class MetricGaugeWithComposedTags { - parentGauge; - contributors; - kind = 'gauge'; - constructor(parentGauge, contributors) { - this.parentGauge = parentGauge; - this.contributors = contributors; - } - set(value, extraTags) { - this.parentGauge.set(value, resolveTags(this.contributors, extraTags)); - } - withTags(extraTags) { - const contributors = appendToChain(this.contributors, extraTags); - if (contributors === undefined) - return this; - return new MetricGaugeWithComposedTags(this.parentGauge, contributors); - } - get name() { - return this.parentGauge.name; - } - get valueType() { - return this.parentGauge.valueType; - } - get unit() { - return this.parentGauge.unit; - } - get description() { - return this.parentGauge.description; - } -} -function resolveTags(contributors, extraTags) { - const resolved = {}; - for (const contributor of contributors) { - Object.assign(resolved, typeof contributor === 'function' ? contributor() : contributor); - } - Object.assign(resolved, extraTags); - return (0, internal_workflow_1.filterNullAndUndefined)(resolved); -} -/** - * Append a tags contributor to the chain, merging it with the former last contributor if possible. - * - * If appending the new contributor results in no actual change to the chain of contributors, return - * `existingContributors`; in that case, the caller should avoid creating a new object if possible. - */ -function appendToChain(existingContributors, newContributor) { - // If the new contributor is an empty object, then it results in no actual change to the chain - if (typeof newContributor === 'object' && Object.keys(newContributor).length === 0) { - return existingContributors; - } - // If existing chain is empty, then the new contributor is the chain - if (existingContributors == null || existingContributors.length === 0) { - return [newContributor]; - } - // If both last contributor and new contributor are plain objects, merge them to a single object. - const last = existingContributors[existingContributors.length - 1]; - if (typeof last === 'object' && typeof newContributor === 'object') { - const merged = (0, internal_workflow_1.mergeObjects)(last, newContributor); - if (merged === last) - return existingContributors; - return [...existingContributors.slice(0, -1), merged]; - } - // Otherwise, just append the new contributor to the chain. - return [...existingContributors, newContributor]; -} -//# sourceMappingURL=metrics.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/metrics.js.map b/node_modules/@temporalio/common/lib/metrics.js.map deleted file mode 100644 index 4d04d72..0000000 --- a/node_modules/@temporalio/common/lib/metrics.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":";;;AAAA,2DAA2E;AAuL3E,oGAAoG;AAEpG;;GAEG;AACH,MAAM,eAAe;IACnB,aAAa,CAAC,IAAY,EAAE,IAAa,EAAE,WAAoB;QAC7D,OAAO;YACL,IAAI;YACJ,IAAI;YACJ,WAAW;YAEX,IAAI,EAAE,SAAS;YACf,SAAS,EAAE,KAAK;YAEhB,GAAG,CAAC,MAAM,EAAE,UAAU,IAAG,CAAC;YAE1B,QAAQ,CAAC,UAAU;gBACjB,OAAO,IAAI,CAAC;YACd,CAAC;SACF,CAAC;IACJ,CAAC;IAED,eAAe,CACb,IAAY,EACZ,YAAoC,KAAK,EACzC,IAAa,EACb,WAAoB;QAEpB,OAAO;YACL,IAAI;YACJ,IAAI;YACJ,WAAW;YAEX,IAAI,EAAE,WAAW;YACjB,SAAS;YAET,MAAM,CAAC,MAAM,EAAE,UAAU,IAAG,CAAC;YAE7B,QAAQ,CAAC,UAAU;gBACjB,OAAO,IAAI,CAAC;YACd,CAAC;SACF,CAAC;IACJ,CAAC;IAED,WAAW,CACT,IAAY,EACZ,YAAoC,KAAK,EACzC,IAAa,EACb,WAAoB;QAEpB,OAAO;YACL,IAAI;YACJ,IAAI;YACJ,WAAW;YAEX,IAAI,EAAE,OAAO;YACb,SAAS;Y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CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACnC,OAAO,IAAA,0CAAsB,EAAC,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAED;;;;;GAKG;AACH,SAAS,aAAa,CACpB,oBAAoD,EACpD,cAAgC;IAEhC,8FAA8F;IAC9F,IAAI,OAAO,cAAc,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnF,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IAED,oEAAoE;IACpE,IAAI,oBAAoB,IAAI,IAAI,IAAI,oBAAoB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtE,OAAO,CAAC,cAAc,CAAC,CAAC;IAC1B,CAAC;IAED,iGAAiG;IACjG,MAAM,IAAI,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACnE,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE,CAAC;QACnE,MAAM,MAAM,GAAG,IAAA,gCAAY,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QAClD,IAAI,MAAM,KAAK,IAAI;YAAE,OAAO,oBAAoB,CAAC;QACjD,OAAO,CAAC,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAO,CAAC,CAAC;IACzD,CAAC;IAED,2DAA2D;IAC3D,OAAO,CAAC,GAAG,oBAAoB,EAAE,cAAc,CAAC,CAAC;AACnD,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/priority.d.ts b/node_modules/@temporalio/common/lib/priority.d.ts deleted file mode 100644 index 2d5c6e4..0000000 --- a/node_modules/@temporalio/common/lib/priority.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -/** - * Priority contains metadata that controls relative ordering of task processing when tasks are - * backlogged in a queue. Initially, Priority will be used in activity and workflow task queues, - * which are typically where backlogs exist. - * Priority is (for now) attached to workflows and activities. Activities and child workflows - * inherit Priority from the workflow that created them, but may override fields when they are - * started or modified. For each field of a Priority on an activity/workflow, not present or equal - * to zero/empty string means to inherit the value from the calling workflow, or if there is no - * calling workflow, then use the default (documented on the field). - * The overall semantics of Priority are: - * 1. First, consider "priority_key": lower number goes first. - * 2. Then, consider fairness: the fairness mechanism attempts to dispatch tasks for a given key in - * proportion to its weight. - */ -export interface Priority { - /** - * Priority key is a positive integer from 1 to n, where smaller integers - * correspond to higher priorities (tasks run sooner). In general, tasks in - * a queue should be processed in close to priority order, although small - * deviations are possible. - * - * The maximum priority value (minimum priority) is determined by server configuration, and - * defaults to 5. - * - * The default priority is (min+max)/2. With the default max of 5 and min of 1, that comes out to 3. - */ - priorityKey?: number; - /** - * FairnessKey is a short string that's used as a key for a fairness - * balancing mechanism. It may correspond to a tenant id, or to a fixed - * string like "high" or "low". The default is the empty string. - * - * The fairness mechanism attempts to dispatch tasks for a given key in - * proportion to its weight. For example, using a thousand distinct tenant - * ids, each with a weight of 1.0 (the default) will result in each tenant - * getting a roughly equal share of task dispatch throughput. - * - * Fairness keys are limited to 64 bytes. - */ - fairnessKey?: string; - /** - * FairnessWeight for a task can come from multiple sources for - * flexibility. From highest to lowest precedence: - * 1. Weights for a small set of keys can be overridden in task queue - * configuration with an API. - * 2. It can be attached to the workflow/activity in this field. - * 3. The default weight of 1.0 will be used. - * - * Weight values are clamped to the range [0.001, 1000]. - */ - fairnessWeight?: number; -} -/** - * Turn a proto compatible Priority into a TS Priority - */ -export declare function decodePriority(priority?: temporal.api.common.v1.IPriority | null): Priority; -/** - * Turn a TS Priority into a proto compatible Priority - */ -export declare function compilePriority(priority: Priority): temporal.api.common.v1.IPriority; diff --git a/node_modules/@temporalio/common/lib/priority.js b/node_modules/@temporalio/common/lib/priority.js deleted file mode 100644 index 2caab0d..0000000 --- a/node_modules/@temporalio/common/lib/priority.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodePriority = decodePriority; -exports.compilePriority = compilePriority; -/** - * Turn a proto compatible Priority into a TS Priority - */ -function decodePriority(priority) { - return { - priorityKey: priority?.priorityKey ?? undefined, - fairnessKey: priority?.fairnessKey ?? undefined, - fairnessWeight: priority?.fairnessWeight ?? undefined, - }; -} -/** - * Turn a TS Priority into a proto compatible Priority - */ -function compilePriority(priority) { - if (priority.priorityKey !== undefined && priority.priorityKey !== null) { - if (!Number.isInteger(priority.priorityKey)) { - throw new TypeError('priorityKey must be an integer'); - } - if (priority.priorityKey < 0) { - throw new RangeError('priorityKey must be a positive integer'); - } - } - return { - priorityKey: priority.priorityKey ?? 0, - fairnessKey: priority.fairnessKey ?? '', - fairnessWeight: priority.fairnessWeight ?? 0, - }; -} -//# sourceMappingURL=priority.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/priority.js.map b/node_modules/@temporalio/common/lib/priority.js.map deleted file mode 100644 index 3c275c1..0000000 --- a/node_modules/@temporalio/common/lib/priority.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"priority.js","sourceRoot":"","sources":["../src/priority.ts"],"names":[],"mappings":";;AA4DA,wCAMC;AAKD,0CAeC;AA7BD;;GAEG;AACH,SAAgB,cAAc,CAAC,QAAkD;IAC/E,OAAO;QACL,WAAW,EAAE,QAAQ,EAAE,WAAW,IAAI,SAAS;QAC/C,WAAW,EAAE,QAAQ,EAAE,WAAW,IAAI,SAAS;QAC/C,cAAc,EAAE,QAAQ,EAAE,cAAc,IAAI,SAAS;KACtD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,eAAe,CAAC,QAAkB;IAChD,IAAI,QAAQ,CAAC,WAAW,KAAK,SAAS,IAAI,QAAQ,CAAC,WAAW,KAAK,IAAI,EAAE,CAAC;QACxE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YAC5C,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAC;QACxD,CAAC;QACD,IAAI,QAAQ,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,UAAU,CAAC,wCAAwC,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAED,OAAO;QACL,WAAW,EAAE,QAAQ,CAAC,WAAW,IAAI,CAAC;QACtC,WAAW,EAAE,QAAQ,CAAC,WAAW,IAAI,EAAE;QACvC,cAAc,EAAE,QAAQ,CAAC,cAAc,IAAI,CAAC;KAC7C,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/proto-utils.d.ts b/node_modules/@temporalio/common/lib/proto-utils.d.ts deleted file mode 100644 index 139da5f..0000000 --- a/node_modules/@temporalio/common/lib/proto-utils.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import * as proto from '@temporalio/proto'; -export type History = proto.temporal.api.history.v1.IHistory; -export type Payload = proto.temporal.api.common.v1.IPayload; -/** - * JSON representation of Temporal's {@link Payload} protobuf object - */ -export interface JSONPayload { - /** - * Mapping of key to base64 encoded value - */ - metadata?: Record | null; - /** - * base64 encoded value - */ - data?: string | null; -} -/** - * Convert a proto JSON representation of History to a valid History object - */ -export declare function historyFromJSON(history: unknown): History; -/** - * Convert an History object, e.g. as returned by `WorkflowClient.list().withHistory()`, to a JSON - * string that adheres to the same norm as JSON history files produced by other Temporal tools. - */ -export declare function historyToJSON(history: History): string; -/** - * toProto3JSON doesn't correctly handle some of our "bytes" fields, passing them untouched to the - * output, after which JSON.stringify() would convert them to an array of numbers. As a workaround, - * recursively walk the object and convert all Buffer instances to base64 strings. Note this only - * works on proto3-json-serializer v2.0.0. v2.0.2 throws an error before we even get the chance - * to fix the buffers. See https://github.com/googleapis/proto3-json-serializer-nodejs/issues/103. - */ -export declare function fixBuffers(e: T): T; -/** - * Convert from protobuf payload to JSON - */ -export declare function payloadToJSON(payload: Payload): JSONPayload; -/** - * Convert from JSON to protobuf payload - */ -export declare function JSONToPayload(json: JSONPayload): Payload; diff --git a/node_modules/@temporalio/common/lib/proto-utils.js b/node_modules/@temporalio/common/lib/proto-utils.js deleted file mode 100644 index f877515..0000000 --- a/node_modules/@temporalio/common/lib/proto-utils.js +++ /dev/null @@ -1,155 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.historyFromJSON = historyFromJSON; -exports.historyToJSON = historyToJSON; -exports.fixBuffers = fixBuffers; -exports.payloadToJSON = payloadToJSON; -exports.JSONToPayload = JSONToPayload; -const proto3_json_serializer_1 = require("proto3-json-serializer"); -const proto = __importStar(require("@temporalio/proto")); -const patch_protobuf_root_1 = require("@temporalio/proto/lib/patch-protobuf-root"); -// Cast to any because the generated proto module types are missing the lookupType method -const patched = (0, patch_protobuf_root_1.patchProtobufRoot)(proto); -const historyType = patched.lookupType('temporal.api.history.v1.History'); -const payloadType = patched.lookupType('temporal.api.common.v1.Payload'); -/** - * Convert a proto JSON representation of History to a valid History object - */ -function historyFromJSON(history) { - function pascalCaseToConstantCase(s) { - return s.replace(/[^\b][A-Z]/g, (m) => `${m[0]}_${m[1]}`).toUpperCase(); - } - function fixEnumValue(obj, attr, prefix) { - return (obj[attr] && { - [attr]: obj[attr].startsWith(prefix) ? obj[attr] : `${prefix}_${pascalCaseToConstantCase(obj[attr])}`, - }); - } - // fromProto3JSON doesn't allow null values on 'bytes' fields. This turns out to be a problem for payloads. - // Recursively descend on objects and array, and fix in-place any payload that has a null data field - function fixPayloads(e) { - function isPayload(p) { - return p && typeof p === 'object' && 'metadata' in p && 'data' in p; - } - if (e && typeof e === 'object') { - if (isPayload(e)) { - if (e.data === null) { - const { data: _data, ...rest } = e; - return rest; - } - return e; - } - if (Array.isArray(e)) - return e.map(fixPayloads); - return Object.fromEntries(Object.entries(e).map(([k, v]) => [k, fixPayloads(v)])); - } - return e; - } - function fixHistoryEvent(e) { - const type = Object.keys(e).find((k) => k.endsWith('EventAttributes')); - if (!type) { - throw new TypeError(`Missing attributes in history event: ${JSON.stringify(e)}`); - } - // Fix payloads with null data - e = fixPayloads(e); - return { - ...e, - ...fixEnumValue(e, 'eventType', 'EVENT_TYPE'), - [type]: { - ...e[type], - ...(e[type].taskQueue && { - taskQueue: { ...e[type].taskQueue, ...fixEnumValue(e[type].taskQueue, 'kind', 'TASK_QUEUE_KIND') }, - }), - ...fixEnumValue(e[type], 'parentClosePolicy', 'PARENT_CLOSE_POLICY'), - ...fixEnumValue(e[type], 'workflowIdReusePolicy', 'WORKFLOW_ID_REUSE_POLICY'), - ...fixEnumValue(e[type], 'initiator', 'CONTINUE_AS_NEW_INITIATOR'), - ...fixEnumValue(e[type], 'retryState', 'RETRY_STATE'), - ...(e[type].childWorkflowExecutionFailureInfo && { - childWorkflowExecutionFailureInfo: { - ...e[type].childWorkflowExecutionFailureInfo, - ...fixEnumValue(e[type].childWorkflowExecutionFailureInfo, 'retryState', 'RETRY_STATE'), - }, - }), - }, - }; - } - function fixHistory(h) { - return { - events: h.events.map(fixHistoryEvent), - }; - } - if (typeof history !== 'object' || history == null || !Array.isArray(history.events)) { - throw new TypeError('Invalid history, expected an object with an array of events'); - } - const loaded = (0, proto3_json_serializer_1.fromProto3JSON)(historyType, fixHistory(history)); - if (loaded === null) { - throw new TypeError('Invalid history'); - } - return loaded; -} -/** - * Convert an History object, e.g. as returned by `WorkflowClient.list().withHistory()`, to a JSON - * string that adheres to the same norm as JSON history files produced by other Temporal tools. - */ -function historyToJSON(history) { - const protoJson = (0, proto3_json_serializer_1.toProto3JSON)(proto.temporal.api.history.v1.History.fromObject(history)); - return JSON.stringify(fixBuffers(protoJson), null, 2); -} -/** - * toProto3JSON doesn't correctly handle some of our "bytes" fields, passing them untouched to the - * output, after which JSON.stringify() would convert them to an array of numbers. As a workaround, - * recursively walk the object and convert all Buffer instances to base64 strings. Note this only - * works on proto3-json-serializer v2.0.0. v2.0.2 throws an error before we even get the chance - * to fix the buffers. See https://github.com/googleapis/proto3-json-serializer-nodejs/issues/103. - */ -function fixBuffers(e) { - if (e && typeof e === 'object') { - if (e instanceof Buffer) - return e.toString('base64'); - if (e instanceof Uint8Array) - return Buffer.from(e).toString('base64'); - if (Array.isArray(e)) - return e.map(fixBuffers); - return Object.fromEntries(Object.entries(e).map(([k, v]) => [k, fixBuffers(v)])); - } - return e; -} -/** - * Convert from protobuf payload to JSON - */ -function payloadToJSON(payload) { - return fixBuffers((0, proto3_json_serializer_1.toProto3JSON)(patched.temporal.api.common.v1.Payload.create(payload))); -} -/** - * Convert from JSON to protobuf payload - */ -function JSONToPayload(json) { - const loaded = (0, proto3_json_serializer_1.fromProto3JSON)(payloadType, json); - if (loaded === null) { - throw new TypeError('Invalid payload'); - } - return loaded; -} -//# sourceMappingURL=proto-utils.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/proto-utils.js.map b/node_modules/@temporalio/common/lib/proto-utils.js.map deleted file mode 100644 index b041168..0000000 --- a/node_modules/@temporalio/common/lib/proto-utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"proto-utils.js","sourceRoot":"","sources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Q,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAQ,CAAC;AACjG,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,IAAiB;IAC7C,MAAM,MAAM,GAAG,IAAA,uCAAc,EAAC,WAAW,EAAE,IAAW,CAAC,CAAC;IACxD,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,MAAa,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/protobufs.d.ts b/node_modules/@temporalio/common/lib/protobufs.d.ts deleted file mode 100644 index 580d08e..0000000 --- a/node_modules/@temporalio/common/lib/protobufs.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Entry point for classes and utilities related to using - * {@link https://docs.temporal.io/typescript/data-converters#protobufs | Protobufs} for serialization. - * - * Import from `@temporalio/common/lib/protobufs`, for example: - * - * ``` - * import { patchProtobufRoot } from '@temporalio/common/lib/protobufs'; - * ``` - * @module - */ -export * from './converter/protobuf-payload-converters'; -export { patchProtobufRoot } from '@temporalio/proto/lib/patch-protobuf-root'; diff --git a/node_modules/@temporalio/common/lib/protobufs.js b/node_modules/@temporalio/common/lib/protobufs.js deleted file mode 100644 index 56c93c5..0000000 --- a/node_modules/@temporalio/common/lib/protobufs.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -/** - * Entry point for classes and utilities related to using - * {@link https://docs.temporal.io/typescript/data-converters#protobufs | Protobufs} for serialization. - * - * Import from `@temporalio/common/lib/protobufs`, for example: - * - * ``` - * import { patchProtobufRoot } from '@temporalio/common/lib/protobufs'; - * ``` - * @module - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.patchProtobufRoot = void 0; -// Don't export from index, so we save space in Workflow bundles of users who don't use Protobufs -__exportStar(require("./converter/protobuf-payload-converters"), exports); -var patch_protobuf_root_1 = require("@temporalio/proto/lib/patch-protobuf-root"); -Object.defineProperty(exports, "patchProtobufRoot", { enumerable: true, get: function () { return patch_protobuf_root_1.patchProtobufRoot; } }); -//# sourceMappingURL=protobufs.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/protobufs.js.map b/node_modules/@temporalio/common/lib/protobufs.js.map deleted file mode 100644 index 100134e..0000000 --- a/node_modules/@temporalio/common/lib/protobufs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"protobufs.js","sourceRoot":"","sources":["../src/protobufs.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;AAEH,iGAAiG;AACjG,0EAAwD;AACxD,iFAA8E;AAArE,wHAAA,iBAAiB,OAAA"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/reserved.d.ts b/node_modules/@temporalio/common/lib/reserved.d.ts deleted file mode 100644 index e219208..0000000 --- a/node_modules/@temporalio/common/lib/reserved.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export declare const TEMPORAL_RESERVED_PREFIX = "__temporal_"; -export declare const STACK_TRACE_QUERY_NAME = "__stack_trace"; -export declare const ENHANCED_STACK_TRACE_QUERY_NAME = "__enhanced_stack_trace"; -/** - * Valid entity types that can be checked for reserved name violations - */ -export type ReservedNameEntityType = 'query' | 'signal' | 'update' | 'activity' | 'task queue' | 'sink' | 'workflow'; -/** - * Validates if the provided name contains any reserved prefixes or matches any reserved names. - * Throws a TypeError if validation fails, with a specific message indicating whether the issue - * is with a reserved prefix or an exact match to a reserved name. - * - * @param type The entity type being checked - * @param name The name to check against reserved prefixes/names - */ -export declare function throwIfReservedName(type: ReservedNameEntityType, name: string): void; diff --git a/node_modules/@temporalio/common/lib/reserved.js b/node_modules/@temporalio/common/lib/reserved.js deleted file mode 100644 index b02218c..0000000 --- a/node_modules/@temporalio/common/lib/reserved.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ENHANCED_STACK_TRACE_QUERY_NAME = exports.STACK_TRACE_QUERY_NAME = exports.TEMPORAL_RESERVED_PREFIX = void 0; -exports.throwIfReservedName = throwIfReservedName; -exports.TEMPORAL_RESERVED_PREFIX = '__temporal_'; -exports.STACK_TRACE_QUERY_NAME = '__stack_trace'; -exports.ENHANCED_STACK_TRACE_QUERY_NAME = '__enhanced_stack_trace'; -/** - * Validates if the provided name contains any reserved prefixes or matches any reserved names. - * Throws a TypeError if validation fails, with a specific message indicating whether the issue - * is with a reserved prefix or an exact match to a reserved name. - * - * @param type The entity type being checked - * @param name The name to check against reserved prefixes/names - */ -function throwIfReservedName(type, name) { - if (name.startsWith(exports.TEMPORAL_RESERVED_PREFIX)) { - throw new TypeError(`Cannot use ${type} name: '${name}', with reserved prefix: '${exports.TEMPORAL_RESERVED_PREFIX}'`); - } - if (name === exports.STACK_TRACE_QUERY_NAME || name === exports.ENHANCED_STACK_TRACE_QUERY_NAME) { - throw new TypeError(`Cannot use ${type} name: '${name}', which is a reserved name`); - } -} -//# sourceMappingURL=reserved.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/reserved.js.map b/node_modules/@temporalio/common/lib/reserved.js.map deleted file mode 100644 index ea54e18..0000000 --- a/node_modules/@temporalio/common/lib/reserved.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reserved.js","sourceRoot":"","sources":["../src/reserved.ts"],"names":[],"mappings":";;;AAiBA,kDAQC;AAzBY,QAAA,wBAAwB,GAAG,aAAa,CAAC;AACzC,QAAA,sBAAsB,GAAG,eAAe,CAAC;AACzC,QAAA,+BAA+B,GAAG,wBAAwB,CAAC;AAOxE;;;;;;;GAOG;AACH,SAAgB,mBAAmB,CAAC,IAA4B,EAAE,IAAY;IAC5E,IAAI,IAAI,CAAC,UAAU,CAAC,gCAAwB,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,SAAS,CAAC,cAAc,IAAI,WAAW,IAAI,6BAA6B,gCAAwB,GAAG,CAAC,CAAC;IACjH,CAAC;IAED,IAAI,IAAI,KAAK,8BAAsB,IAAI,IAAI,KAAK,uCAA+B,EAAE,CAAC;QAChF,MAAM,IAAI,SAAS,CAAC,cAAc,IAAI,WAAW,IAAI,6BAA6B,CAAC,CAAC;IACtF,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/retry-policy.d.ts b/node_modules/@temporalio/common/lib/retry-policy.d.ts deleted file mode 100644 index d7621e6..0000000 --- a/node_modules/@temporalio/common/lib/retry-policy.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -import { Duration } from './time'; -/** - * Options for retrying Workflows and Activities - */ -export interface RetryPolicy { - /** - * Coefficient used to calculate the next retry interval. - * The next retry interval is previous interval multiplied by this coefficient. - * @minimum 1 - * @default 2 - */ - backoffCoefficient?: number; - /** - * Interval of the first retry. - * If coefficient is 1 then it is used for all retries - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - * @default 1 second - */ - initialInterval?: Duration; - /** - * Maximum number of attempts. When exceeded, retries stop (even if {@link ActivityOptions.scheduleToCloseTimeout} - * hasn't been reached). - * - * @default Infinity - */ - maximumAttempts?: number; - /** - * Maximum interval between retries. - * Exponential backoff leads to interval increase. - * This value is the cap of the increase. - * - * @default 100x of {@link initialInterval} - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - maximumInterval?: Duration; - /** - * List of application failures types to not retry. - */ - nonRetryableErrorTypes?: string[]; -} -/** - * Turn a TS RetryPolicy into a proto compatible RetryPolicy - */ -export declare function compileRetryPolicy(retryPolicy: RetryPolicy): temporal.api.common.v1.IRetryPolicy; -/** - * Turn a proto compatible RetryPolicy into a TS RetryPolicy - */ -export declare function decompileRetryPolicy(retryPolicy?: temporal.api.common.v1.IRetryPolicy | null): RetryPolicy | undefined; diff --git a/node_modules/@temporalio/common/lib/retry-policy.js b/node_modules/@temporalio/common/lib/retry-policy.js deleted file mode 100644 index c7ebc8b..0000000 --- a/node_modules/@temporalio/common/lib/retry-policy.js +++ /dev/null @@ -1,61 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.compileRetryPolicy = compileRetryPolicy; -exports.decompileRetryPolicy = decompileRetryPolicy; -const errors_1 = require("./errors"); -const time_1 = require("./time"); -/** - * Turn a TS RetryPolicy into a proto compatible RetryPolicy - */ -function compileRetryPolicy(retryPolicy) { - if (retryPolicy.backoffCoefficient != null && retryPolicy.backoffCoefficient <= 0) { - throw new errors_1.ValueError('RetryPolicy.backoffCoefficient must be greater than 0'); - } - if (retryPolicy.maximumAttempts != null) { - if (retryPolicy.maximumAttempts === Number.POSITIVE_INFINITY) { - // drop field (Infinity is the default) - const { maximumAttempts: _, ...without } = retryPolicy; - retryPolicy = without; - } - else if (retryPolicy.maximumAttempts <= 0) { - throw new errors_1.ValueError('RetryPolicy.maximumAttempts must be a positive integer'); - } - else if (!Number.isInteger(retryPolicy.maximumAttempts)) { - throw new errors_1.ValueError('RetryPolicy.maximumAttempts must be an integer'); - } - } - const maximumInterval = (0, time_1.msOptionalToNumber)(retryPolicy.maximumInterval); - const initialInterval = (0, time_1.msToNumber)(retryPolicy.initialInterval ?? 1000); - if (maximumInterval === 0) { - throw new errors_1.ValueError('RetryPolicy.maximumInterval cannot be 0'); - } - if (initialInterval === 0) { - throw new errors_1.ValueError('RetryPolicy.initialInterval cannot be 0'); - } - if (maximumInterval != null && maximumInterval < initialInterval) { - throw new errors_1.ValueError('RetryPolicy.maximumInterval cannot be less than its initialInterval'); - } - return { - maximumAttempts: retryPolicy.maximumAttempts, - initialInterval: (0, time_1.msToTs)(initialInterval), - maximumInterval: (0, time_1.msOptionalToTs)(maximumInterval), - backoffCoefficient: retryPolicy.backoffCoefficient, - nonRetryableErrorTypes: retryPolicy.nonRetryableErrorTypes, - }; -} -/** - * Turn a proto compatible RetryPolicy into a TS RetryPolicy - */ -function decompileRetryPolicy(retryPolicy) { - if (!retryPolicy) { - return undefined; - } - return { - backoffCoefficient: retryPolicy.backoffCoefficient ?? undefined, - maximumAttempts: retryPolicy.maximumAttempts ?? undefined, - maximumInterval: (0, time_1.optionalTsToMs)(retryPolicy.maximumInterval), - initialInterval: (0, time_1.optionalTsToMs)(retryPolicy.initialInterval), - nonRetryableErrorTypes: retryPolicy.nonRetryableErrorTypes ?? undefined, - }; -} -//# sourceMappingURL=retry-policy.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/retry-policy.js.map b/node_modules/@temporalio/common/lib/retry-policy.js.map deleted file mode 100644 index 9b6d161..0000000 --- a/node_modules/@temporalio/common/lib/retry-policy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retry-policy.js","sourceRoot":"","sources":["../src/retry-policy.ts"],"names":[],"mappings":";;AAgDA,gDAiCC;AAKD,oDAcC;AAnGD,qCAAsC;AACtC,iCAA0G;AA2C1G;;GAEG;AACH,SAAgB,kBAAkB,CAAC,WAAwB;IACzD,IAAI,WAAW,CAAC,kBAAkB,IAAI,IAAI,IAAI,WAAW,CAAC,kBAAkB,IAAI,CAAC,EAAE,CAAC;QAClF,MAAM,IAAI,mBAAU,CAAC,uDAAuD,CAAC,CAAC;IAChF,CAAC;IACD,IAAI,WAAW,CAAC,eAAe,IAAI,IAAI,EAAE,CAAC;QACxC,IAAI,WAAW,CAAC,e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AAoB,CAClC,WAAwD;IAExD,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO;QACL,kBAAkB,EAAE,WAAW,CAAC,kBAAkB,IAAI,SAAS;QAC/D,eAAe,EAAE,WAAW,CAAC,eAAe,IAAI,SAAS;QACzD,eAAe,EAAE,IAAA,qBAAc,EAAC,WAAW,CAAC,eAAe,CAAC;QAC5D,eAAe,EAAE,IAAA,qBAAc,EAAC,WAAW,CAAC,eAAe,CAAC;QAC5D,sBAAsB,EAAE,WAAW,CAAC,sBAAsB,IAAI,SAAS;KACxE,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/search-attributes.d.ts b/node_modules/@temporalio/common/lib/search-attributes.d.ts deleted file mode 100644 index a5f9177..0000000 --- a/node_modules/@temporalio/common/lib/search-attributes.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -/** @deprecated: Use {@link TypedSearchAttributes} instead */ -export type SearchAttributeValueOrReadonly = SearchAttributeValue | Readonly | undefined; -/** @deprecated: Use {@link TypedSearchAttributes} instead */ -export type SearchAttributes = Record; -/** @deprecated: Use {@link TypedSearchAttributes} instead */ -export type SearchAttributeValue = string[] | number[] | boolean[] | Date[]; -export declare const SearchAttributeType: { - readonly TEXT: "TEXT"; - readonly KEYWORD: "KEYWORD"; - readonly INT: "INT"; - readonly DOUBLE: "DOUBLE"; - readonly BOOL: "BOOL"; - readonly DATETIME: "DATETIME"; - readonly KEYWORD_LIST: "KEYWORD_LIST"; -}; -export type SearchAttributeType = (typeof SearchAttributeType)[keyof typeof SearchAttributeType]; -export declare const encodeSearchAttributeIndexedValueType: (input: "TEXT" | "KEYWORD" | "INT" | "DOUBLE" | "BOOL" | "DATETIME" | "KEYWORD_LIST" | temporal.api.enums.v1.IndexedValueType | "INDEXED_VALUE_TYPE_TEXT" | "INDEXED_VALUE_TYPE_KEYWORD" | "INDEXED_VALUE_TYPE_INT" | "INDEXED_VALUE_TYPE_DOUBLE" | "INDEXED_VALUE_TYPE_BOOL" | "INDEXED_VALUE_TYPE_DATETIME" | "INDEXED_VALUE_TYPE_KEYWORD_LIST" | null | undefined) => temporal.api.enums.v1.IndexedValueType | undefined, _: (input: temporal.api.enums.v1.IndexedValueType | null | undefined) => "TEXT" | "KEYWORD" | "INT" | "DOUBLE" | "BOOL" | "DATETIME" | "KEYWORD_LIST" | undefined; -interface IndexedValueTypeMapping { - TEXT: string; - KEYWORD: string; - INT: number; - DOUBLE: number; - BOOL: boolean; - DATETIME: Date; - KEYWORD_LIST: string[]; -} -export declare function isValidValueForType(type: T, value: unknown): value is IndexedValueTypeMapping[T]; -export interface SearchAttributeKey { - name: string; - type: T; -} -export declare function defineSearchAttributeKey(name: string, type: T): SearchAttributeKey; -declare class BaseSearchAttributeValue { - private readonly _type; - private readonly _value; - constructor(type: T, value: V); - get type(): T; - get value(): V; -} -export declare class TypedSearchAttributeValue extends BaseSearchAttributeValue { -} -export declare class TypedSearchAttributeUpdateValue extends BaseSearchAttributeValue { -} -export type SearchAttributePair = { - [T in SearchAttributeType]: { - key: SearchAttributeKey; - value: IndexedValueTypeMapping[T]; - }; -}[SearchAttributeType]; -export type SearchAttributeUpdatePair = { - [T in SearchAttributeType]: { - key: SearchAttributeKey; - value: IndexedValueTypeMapping[T] | null; - }; -}[SearchAttributeType]; -export declare class TypedSearchAttributes { - private searchAttributes; - constructor(initialAttributes?: SearchAttributePair[]); - get(key: SearchAttributeKey): IndexedValueTypeMapping[T] | undefined; - /** Returns a deep copy of the given TypedSearchAttributes instance */ - copy(): TypedSearchAttributes; - /** - * @hidden - * Return JSON representation of this class as SearchAttributePair[] - * Default toJSON method is not used because it's JSON representation includes private state. - */ - toJSON(): SearchAttributePair[]; - /** Returns a copy of the current TypedSearchAttributes instance with the updated attributes. */ - updateCopy(updates: SearchAttributeUpdatePair[]): TypedSearchAttributes; - private update; - getAll(): SearchAttributePair[]; - static getKeyFromUntyped(key: string, value: SearchAttributeValueOrReadonly): SearchAttributeKey | undefined; - static toMetadataType(type: SearchAttributeType): string; - static toSearchAttributeType(type: string): SearchAttributeType | undefined; -} -export {}; diff --git a/node_modules/@temporalio/common/lib/search-attributes.js b/node_modules/@temporalio/common/lib/search-attributes.js deleted file mode 100644 index c495821..0000000 --- a/node_modules/@temporalio/common/lib/search-attributes.js +++ /dev/null @@ -1,242 +0,0 @@ -"use strict"; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TypedSearchAttributes = exports.TypedSearchAttributeUpdateValue = exports.TypedSearchAttributeValue = exports._ = exports.encodeSearchAttributeIndexedValueType = exports.SearchAttributeType = void 0; -exports.isValidValueForType = isValidValueForType; -exports.defineSearchAttributeKey = defineSearchAttributeKey; -const internal_workflow_1 = require("./internal-workflow"); -exports.SearchAttributeType = { - TEXT: 'TEXT', - KEYWORD: 'KEYWORD', - INT: 'INT', - DOUBLE: 'DOUBLE', - BOOL: 'BOOL', - DATETIME: 'DATETIME', - KEYWORD_LIST: 'KEYWORD_LIST', -}; -// Note: encodeSearchAttributeIndexedValueType exported for use in tests to register search attributes -// ts-prune-ignore-next -_a = (0, internal_workflow_1.makeProtoEnumConverters)({ - [exports.SearchAttributeType.TEXT]: 1, - [exports.SearchAttributeType.KEYWORD]: 2, - [exports.SearchAttributeType.INT]: 3, - [exports.SearchAttributeType.DOUBLE]: 4, - [exports.SearchAttributeType.BOOL]: 5, - [exports.SearchAttributeType.DATETIME]: 6, - [exports.SearchAttributeType.KEYWORD_LIST]: 7, - UNSPECIFIED: 0, -}, 'INDEXED_VALUE_TYPE_'), exports.encodeSearchAttributeIndexedValueType = _a[0], exports._ = _a[1]; -function isValidValueForType(type, value) { - switch (type) { - case exports.SearchAttributeType.TEXT: - case exports.SearchAttributeType.KEYWORD: - return typeof value === 'string'; - case exports.SearchAttributeType.INT: - return Number.isInteger(value); - case exports.SearchAttributeType.DOUBLE: - return typeof value === 'number'; - case exports.SearchAttributeType.BOOL: - return typeof value === 'boolean'; - case exports.SearchAttributeType.DATETIME: - return value instanceof Date; - case exports.SearchAttributeType.KEYWORD_LIST: - return Array.isArray(value) && value.every((item) => typeof item === 'string'); - default: - return false; - } -} -function defineSearchAttributeKey(name, type) { - return { name, type }; -} -class BaseSearchAttributeValue { - _type; - _value; - constructor(type, value) { - this._type = type; - this._value = value; - } - get type() { - return this._type; - } - get value() { - return this._value; - } -} -// Internal type for class private data. -// Exported for use in payload conversion. -class TypedSearchAttributeValue extends BaseSearchAttributeValue { -} -exports.TypedSearchAttributeValue = TypedSearchAttributeValue; -// ts-prune-ignore-next -class TypedSearchAttributeUpdateValue extends BaseSearchAttributeValue { -} -exports.TypedSearchAttributeUpdateValue = TypedSearchAttributeUpdateValue; -class TypedSearchAttributes { - searchAttributes = {}; - constructor(initialAttributes) { - if (initialAttributes === undefined) - return; - for (const pair of initialAttributes) { - if (pair.key.name in this.searchAttributes) { - throw new Error(`Duplicate search attribute key: ${pair.key.name}`); - } - this.searchAttributes[pair.key.name] = new TypedSearchAttributeValue(pair.key.type, pair.value); - } - } - get(key) { - const attr = this.searchAttributes[key.name]; - // Key not found or type mismatch. - if (attr === undefined || !isValidValueForType(key.type, attr.value)) { - return undefined; - } - return attr.value; - } - /** Returns a deep copy of the given TypedSearchAttributes instance */ - copy() { - const state = {}; - for (const [key, attr] of Object.entries(this.searchAttributes)) { - // Create a new instance with the same properties - let value = attr.value; - // For non-primitive types, create a deep copy - if (attr.value instanceof Date) { - value = new Date(attr.value); - } - else if (Array.isArray(attr.value)) { - value = [...attr.value]; - } - state[key] = new TypedSearchAttributeValue(attr.type, value); - } - // Create return value with manually assigned state. - const res = new TypedSearchAttributes(); - res.searchAttributes = state; - return res; - } - /** - * @hidden - * Return JSON representation of this class as SearchAttributePair[] - * Default toJSON method is not used because it's JSON representation includes private state. - */ - toJSON() { - return this.getAll(); - } - /** Returns a copy of the current TypedSearchAttributes instance with the updated attributes. */ - updateCopy(updates) { - // Create a deep copy of the current instance. - const res = this.copy(); - // Apply updates. - res.update(updates); - return res; - } - // Performs direct mutation on the current instance. - update(updates) { - // Apply updates. - for (const pair of updates) { - // Delete attribute. - if (pair.value === null) { - // Delete only if the update matches a key and type. - const attrVal = this.searchAttributes[pair.key.name]; - if (attrVal && attrVal.type === pair.key.type) { - delete this.searchAttributes[pair.key.name]; - } - continue; - } - // Add or update attribute. - this.searchAttributes[pair.key.name] = new TypedSearchAttributeValue(pair.key.type, pair.value); - } - } - getAll() { - const res = []; - for (const [key, attr] of Object.entries(this.searchAttributes)) { - const attrKey = { name: key, type: attr.type }; - // Sanity check, should always be legal. - if (isValidValueForType(attrKey.type, attr.value)) { - res.push({ key: attrKey, value: attr.value }); - } - } - return res; - } - static getKeyFromUntyped(key, value // eslint-disable-line @typescript-eslint/no-deprecated - ) { - if (value == null) { - return; - } - // Unpack single-element arrays. - const val = value.length === 1 ? value[0] : value; - switch (typeof val) { - case 'string': - // Check if val is an ISO string, if so, return a DATETIME key. - if (!isNaN(Date.parse(val)) && Date.parse(val) === new Date(val).getTime()) { - return { name: key, type: exports.SearchAttributeType.DATETIME }; - } - return { name: key, type: exports.SearchAttributeType.TEXT }; - case 'number': - return { - name: key, - type: Number.isInteger(val) ? exports.SearchAttributeType.INT : exports.SearchAttributeType.DOUBLE, - }; - case 'boolean': - return { name: key, type: exports.SearchAttributeType.BOOL }; - case 'object': - if (val instanceof Date) { - return { name: key, type: exports.SearchAttributeType.DATETIME }; - } - if (Array.isArray(val) && val.every((item) => typeof item === 'string')) { - return { name: key, type: exports.SearchAttributeType.KEYWORD_LIST }; - } - return; - default: - return; - } - } - static toMetadataType(type) { - switch (type) { - case exports.SearchAttributeType.TEXT: - return 'Text'; - case exports.SearchAttributeType.KEYWORD: - return 'Keyword'; - case exports.SearchAttributeType.INT: - return 'Int'; - case exports.SearchAttributeType.DOUBLE: - return 'Double'; - case exports.SearchAttributeType.BOOL: - return 'Bool'; - case exports.SearchAttributeType.DATETIME: - return 'Datetime'; - case exports.SearchAttributeType.KEYWORD_LIST: - return 'KeywordList'; - default: - throw new Error(`Unknown search attribute type: ${type}`); - } - } - static toSearchAttributeType(type) { - // The type metadata is usually in PascalCase (e.g. "KeywordList") but in - // rare cases may be in SCREAMING_SNAKE_CASE (e.g. "INDEXED_VALUE_TYPE_KEYWORD_LIST"). - switch (type) { - case 'Text': - case 'INDEXED_VALUE_TYPE_TEXT': - return exports.SearchAttributeType.TEXT; - case 'Keyword': - case 'INDEXED_VALUE_TYPE_KEYWORD': - return exports.SearchAttributeType.KEYWORD; - case 'Int': - case 'INDEXED_VALUE_TYPE_INT': - return exports.SearchAttributeType.INT; - case 'Double': - case 'INDEXED_VALUE_TYPE_DOUBLE': - return exports.SearchAttributeType.DOUBLE; - case 'Bool': - case 'INDEXED_VALUE_TYPE_BOOL': - return exports.SearchAttributeType.BOOL; - case 'Datetime': - case 'INDEXED_VALUE_TYPE_DATETIME': - return exports.SearchAttributeType.DATETIME; - case 'KeywordList': - case 'INDEXED_VALUE_TYPE_KEYWORD_LIST': - return exports.SearchAttributeType.KEYWORD_LIST; - default: - return; - } - } -} -exports.TypedSearchAttributes = TypedSearchAttributes; -//# sourceMappingURL=search-attributes.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/search-attributes.js.map b/node_modules/@temporalio/common/lib/search-attributes.js.map deleted file mode 100644 index ae9f0a5..0000000 --- a/node_modules/@temporalio/common/lib/search-attributes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"search-attributes.js","sourceRoot":"","sources":["../src/search-attributes.ts"],"names":[],"mappings":";;;;AAqDA,kDAqBC;AAOD,4DAEC;AAlFD,2DAA8D;AASjD,QAAA,mBAAmB,GAAG;IACjC,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,cAAc;CACpB,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C,GAAG,CAAC;YACjC,KAAK,QAAQ,CAAC;YACd,KAAK,2BAA2B;gBAC9B,OAAO,2BAAmB,CAAC,MAAM,CAAC;YACpC,KAAK,MAAM,CAAC;YACZ,KAAK,yBAAyB;gBAC5B,OAAO,2BAAmB,CAAC,IAAI,CAAC;YAClC,KAAK,UAAU,CAAC;YAChB,KAAK,6BAA6B;gBAChC,OAAO,2BAAmB,CAAC,QAAQ,CAAC;YACtC,KAAK,aAAa,CAAC;YACnB,KAAK,iCAAiC;gBACpC,OAAO,2BAAmB,CAAC,YAAY,CAAC;YAC1C;gBACE,OAAO;QACX,CAAC;IACH,CAAC;CACF;AAnLD,sDAmLC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/time.d.ts b/node_modules/@temporalio/common/lib/time.d.ts deleted file mode 100644 index 5c403a6..0000000 --- a/node_modules/@temporalio/common/lib/time.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { StringValue } from 'ms'; -import type { google } from '@temporalio/proto'; -export type Timestamp = google.protobuf.ITimestamp; -/** - * A duration, expressed either as a number of milliseconds, or as a {@link https://www.npmjs.com/package/ms | ms-formatted string}. - */ -export type Duration = StringValue | number; -export type { StringValue } from 'ms'; -/** - * Lossy conversion function from Timestamp to number due to possible overflow. - * If ts is null or undefined returns undefined. - */ -export declare function optionalTsToMs(ts: Timestamp | null | undefined): number | undefined; -/** - * Lossy conversion function from Timestamp to number due to possible overflow. - * If ts is null or undefined, throws a TypeError, with error message including the name of the field. - */ -export declare function requiredTsToMs(ts: Timestamp | null | undefined, fieldName: string): number; -/** - * Lossy conversion function from Timestamp to number due to possible overflow - */ -export declare function tsToMs(ts: Timestamp | null | undefined): number; -export declare function msNumberToTs(millis: number): Timestamp; -export declare function msToTs(str: Duration): Timestamp; -export declare function msOptionalToTs(str: Duration | undefined | null): Timestamp | undefined; -export declare function msOptionalToNumber(val: Duration | undefined): number | undefined; -export declare function msToNumber(val: Duration): number; -export declare function tsToDate(ts: Timestamp): Date; -export declare function requiredTsToDate(ts: Timestamp | null | undefined, fieldName: string): Date; -export declare function optionalTsToDate(ts: Timestamp | null | undefined): Date | undefined; -export declare function optionalDateToTs(date: Date | null | undefined): Timestamp | undefined; diff --git a/node_modules/@temporalio/common/lib/time.js b/node_modules/@temporalio/common/lib/time.js deleted file mode 100644 index 25b911a..0000000 --- a/node_modules/@temporalio/common/lib/time.js +++ /dev/null @@ -1,106 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.optionalTsToMs = optionalTsToMs; -exports.requiredTsToMs = requiredTsToMs; -exports.tsToMs = tsToMs; -exports.msNumberToTs = msNumberToTs; -exports.msToTs = msToTs; -exports.msOptionalToTs = msOptionalToTs; -exports.msOptionalToNumber = msOptionalToNumber; -exports.msToNumber = msToNumber; -exports.tsToDate = tsToDate; -exports.requiredTsToDate = requiredTsToDate; -exports.optionalTsToDate = optionalTsToDate; -exports.optionalDateToTs = optionalDateToTs; -const long_1 = __importDefault(require("long")); -const ms_1 = __importDefault(require("ms")); -const errors_1 = require("./errors"); -/** - * Lossy conversion function from Timestamp to number due to possible overflow. - * If ts is null or undefined returns undefined. - */ -function optionalTsToMs(ts) { - if (ts === undefined || ts === null) { - return undefined; - } - return tsToMs(ts); -} -/** - * Lossy conversion function from Timestamp to number due to possible overflow. - * If ts is null or undefined, throws a TypeError, with error message including the name of the field. - */ -function requiredTsToMs(ts, fieldName) { - if (ts === undefined || ts === null) { - throw new TypeError(`Expected ${fieldName} to be a timestamp, got ${ts}`); - } - return tsToMs(ts); -} -/** - * Lossy conversion function from Timestamp to number due to possible overflow - */ -function tsToMs(ts) { - if (ts === undefined || ts === null) { - throw new Error(`Expected timestamp, got ${ts}`); - } - const { seconds, nanos } = ts; - return (seconds || long_1.default.UZERO) - .mul(1000) - .add(Math.floor((nanos || 0) / 1000000)) - .toNumber(); -} -function msNumberToTs(millis) { - const seconds = Math.floor(millis / 1000); - const nanos = (millis % 1000) * 1000000; - if (Number.isNaN(seconds) || Number.isNaN(nanos)) { - throw new errors_1.ValueError(`Invalid millis ${millis}`); - } - return { seconds: long_1.default.fromNumber(seconds), nanos }; -} -function msToTs(str) { - return msNumberToTs(msToNumber(str)); -} -function msOptionalToTs(str) { - return str ? msToTs(str) : undefined; -} -function msOptionalToNumber(val) { - if (val === undefined) - return undefined; - return msToNumber(val); -} -function msToNumber(val) { - if (typeof val === 'number') { - return val; - } - return msWithValidation(val); -} -function msWithValidation(str) { - const millis = (0, ms_1.default)(str); - if (millis == null || isNaN(millis)) { - throw new TypeError(`Invalid duration string: '${str}'`); - } - return millis; -} -function tsToDate(ts) { - return new Date(tsToMs(ts)); -} -// ts-prune-ignore-next -function requiredTsToDate(ts, fieldName) { - return new Date(requiredTsToMs(ts, fieldName)); -} -function optionalTsToDate(ts) { - if (ts === undefined || ts === null) { - return undefined; - } - return new Date(tsToMs(ts)); -} -// ts-prune-ignore-next (imported via schedule-helpers.ts) -function optionalDateToTs(date) { - if (date === undefined || date === null) { - return undefined; - } - return msToTs(date.getTime()); -} -//# sourceMappingURL=time.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/time.js.map b/node_modules/@temporalio/common/lib/time.js.map deleted file mode 100644 index 34cb455..0000000 --- a/node_modules/@temporalio/common/lib/time.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"time.js","sourceRoot":"","sources":["../src/time.ts"],"names":[],"mappings":";;;;;AAuBA,wCAKC;AAMD,wCAKC;AAKD,wBASC;AAED,oCAOC;AAED,wBAEC;AAED,wCAEC;AAED,gDAGC;AAED,gCAKC;AAUD,4BAEC;AAGD,4CAEC;AAED,4CAKC;AAGD,4CAKC;AAlHD,gDAAwB;AACxB,4CAAqC;AAErC,qCAAsC;AAgBtC;;;GAGG;AACH,SAAgB,cAAc,CAAC,EAAgC;IAC7D,IAAI,EAAE,KAAK,SAAS,IAAI,EAAE,KAA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KAAK,IAAI,EAAE,CAAC;QACpC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9B,CAAC;AAED,0DAA0D;AAC1D,SAAgB,gBAAgB,CAAC,IAA6B;IAC5D,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QACxC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;AAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/type-helpers.d.ts b/node_modules/@temporalio/common/lib/type-helpers.d.ts deleted file mode 100644 index ecfdc8f..0000000 --- a/node_modules/@temporalio/common/lib/type-helpers.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -export type NonNullableObject = { - [P in keyof T]-?: NonNullable; -}; -/** Shorthand alias */ -export type AnyFunc = (...args: any[]) => any; -/** A tuple without its last element */ -export type OmitLast = T extends [...infer REST, any] ? REST : never; -/** F with all arguments but the last */ -export type OmitLastParam = (...args: OmitLast>) => ReturnType; -export type OmitFirst = T extends [any, ...infer REST] ? REST : never; -export type OmitFirstParam = T extends (...args: any[]) => any ? (...args: OmitFirst>) => ReturnType : never; -/** Require that T has at least one of the provided properties defined */ -export type RequireAtLeastOne = Pick> & { - [K in Keys]-?: Required> & Partial>>; -}[Keys]; -/** Verify that an type _Copy extends _Orig */ -export declare function checkExtends<_Orig, _Copy extends _Orig>(): void; -export type Replace = Omit & New; -export type UnionToIntersection = (Union extends unknown ? (distributedUnion: Union) => void : never) extends (mergedIntersection: infer Intersection) => void ? // The `& Union` is to allow indexing by the resulting type -Intersection & Union : never; -type IsEqual = (() => G extends A ? 1 : 2) extends () => G extends B ? 1 : 2 ? true : false; -type Primitive = null | undefined | string | number | boolean | symbol | bigint; -type IsNull = [T] extends [null] ? true : false; -type IsUnknown = unknown extends T ? IsNull extends false ? true : false : false; -type ObjectValue = K extends keyof T ? T[K] : ToString extends keyof T ? T[ToString] : K extends `${infer NumberK extends number}` ? NumberK extends keyof T ? T[NumberK] : never : never; -type ToString = T extends string | number ? `${T}` : never; -type KeysOfUnion = ObjectType extends unknown ? keyof ObjectType : never; -type ArrayElement = T extends readonly unknown[] ? T[0] : never; -type ExactObject = { - [Key in keyof ParameterType]: Exact>; -} & Record>, never>; -export type Exact = IsEqual extends true ? ParameterType : ParameterType extends Primitive ? ParameterType : IsUnknown extends true ? unknown : ParameterType extends Function ? ParameterType : ParameterType extends unknown[] ? Array, ArrayElement>> : ParameterType extends readonly unknown[] ? ReadonlyArray, ArrayElement>> : ExactObject; -export type RemovePrefix = { - [k in Keys]: k extends `${Prefix}${infer Suffix}` ? Suffix : never; -}[Keys]; -export declare function isRecord(value: unknown): value is Record; -export declare function hasOwnProperty, Y extends PropertyKey>(record: X, prop: Y): record is X & Record; -export declare function hasOwnProperties, Y extends PropertyKey>(record: X, props: Y[]): record is X & Record; -export declare function isError(error: unknown): error is Error; -export declare function isAbortError(error: unknown): error is Error & { - name: 'AbortError'; -}; -/** - * Get `error.message` (or `undefined` if not present) - */ -export declare function errorMessage(error: unknown): string | undefined; -/** - * Get `error.code` (or `undefined` if not present) - */ -export declare function errorCode(error: unknown): string | undefined; -/** - * Asserts that some type is the never type - */ -export declare function assertNever(msg: string, x: never): never; -export type Class = { - new (...args: any[]): E; - prototype: E; -}; -/** - * A decorator to be used on error classes. It adds the 'name' property AND provides a custom - * 'instanceof' handler that works correctly across execution contexts. - * - * ### Details ### - * - * According to the EcmaScript's spec, the default behavior of JavaScript's `x instanceof Y` operator is to walk up the - * prototype chain of object 'x', checking if any constructor in that hierarchy is _exactly the same object_ as the - * constructor function 'Y'. - * - * Unfortunately, it happens in various situations that different constructor function objects get created for what - * appears to be the very same class. This leads to surprising behavior where `instanceof` returns false though it is - * known that the object is indeed an instance of that class. One particular case where this happens is when constructor - * 'Y' belongs to a different realm than the constuctor with which 'x' was instantiated. Another case is when two copies - * of the same library gets loaded in the same realm. - * - * In practice, this tends to cause issues when crossing the workflow-sandboxing boundary (since Node's vm module - * really creates new execution realms), as well as when running tests using Jest (see https://github.com/jestjs/jest/issues/2549 - * for some details on that one). - * - * This function injects a custom 'instanceof' handler into the prototype of 'clazz', which is both cross-realm safe and - * cross-copies-of-the-same-lib safe. It works by adding a special symbol property to the prototype of 'clazz', and then - * checking for the presence of that symbol. - */ -export declare function SymbolBasedInstanceOfError(markerName: string): (clazz: Class) => void; -export {}; diff --git a/node_modules/@temporalio/common/lib/type-helpers.js b/node_modules/@temporalio/common/lib/type-helpers.js deleted file mode 100644 index d5d18d4..0000000 --- a/node_modules/@temporalio/common/lib/type-helpers.js +++ /dev/null @@ -1,114 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.checkExtends = checkExtends; -exports.isRecord = isRecord; -exports.hasOwnProperty = hasOwnProperty; -exports.hasOwnProperties = hasOwnProperties; -exports.isError = isError; -exports.isAbortError = isAbortError; -exports.errorMessage = errorMessage; -exports.errorCode = errorCode; -exports.assertNever = assertNever; -exports.SymbolBasedInstanceOfError = SymbolBasedInstanceOfError; -/** Verify that an type _Copy extends _Orig */ -function checkExtends() { - // noop, just type check -} -function isRecord(value) { - return typeof value === 'object' && value !== null; -} -function hasOwnProperty(record, prop) { - return prop in record; -} -function hasOwnProperties(record, props) { - return props.every((prop) => prop in record); -} -function isError(error) { - return (isRecord(error) && - typeof error.name === 'string' && - typeof error.message === 'string' && - (error.stack == null || typeof error.stack === 'string')); -} -function isAbortError(error) { - return isError(error) && error.name === 'AbortError'; -} -/** - * Get `error.message` (or `undefined` if not present) - */ -function errorMessage(error) { - if (isError(error)) { - return error.message; - } - else if (typeof error === 'string') { - return error; - } - return undefined; -} -function isErrorWithCode(error) { - return isRecord(error) && typeof error.code === 'string'; -} -/** - * Get `error.code` (or `undefined` if not present) - */ -function errorCode(error) { - if (isErrorWithCode(error)) { - return error.code; - } - return undefined; -} -/** - * Asserts that some type is the never type - */ -function assertNever(msg, x) { - throw new TypeError(msg + ': ' + x); -} -/** - * A decorator to be used on error classes. It adds the 'name' property AND provides a custom - * 'instanceof' handler that works correctly across execution contexts. - * - * ### Details ### - * - * According to the EcmaScript's spec, the default behavior of JavaScript's `x instanceof Y` operator is to walk up the - * prototype chain of object 'x', checking if any constructor in that hierarchy is _exactly the same object_ as the - * constructor function 'Y'. - * - * Unfortunately, it happens in various situations that different constructor function objects get created for what - * appears to be the very same class. This leads to surprising behavior where `instanceof` returns false though it is - * known that the object is indeed an instance of that class. One particular case where this happens is when constructor - * 'Y' belongs to a different realm than the constuctor with which 'x' was instantiated. Another case is when two copies - * of the same library gets loaded in the same realm. - * - * In practice, this tends to cause issues when crossing the workflow-sandboxing boundary (since Node's vm module - * really creates new execution realms), as well as when running tests using Jest (see https://github.com/jestjs/jest/issues/2549 - * for some details on that one). - * - * This function injects a custom 'instanceof' handler into the prototype of 'clazz', which is both cross-realm safe and - * cross-copies-of-the-same-lib safe. It works by adding a special symbol property to the prototype of 'clazz', and then - * checking for the presence of that symbol. - */ -function SymbolBasedInstanceOfError(markerName) { - return (clazz) => { - const marker = Symbol.for(`__temporal_is${markerName}`); - Object.defineProperty(clazz.prototype, 'name', { value: markerName, enumerable: true }); - Object.defineProperty(clazz.prototype, marker, { value: true, enumerable: false }); - Object.defineProperty(clazz, Symbol.hasInstance, { - // eslint-disable-next-line object-shorthand - value: function (error) { - if (this === clazz) { - return isRecord(error) && error[marker] === true; - } - else { - // 'this' must be a _subclass_ of clazz that doesn't redefined [Symbol.hasInstance], so that it inherited - // from clazz's [Symbol.hasInstance]. If we don't handle this particular situation, then - // `x instanceof SubclassOfParent` would return true for any instance of 'Parent', which is clearly wrong. - // - // Ideally, it'd be preferable to avoid this case entirely, by making sure that all subclasses of 'clazz' - // redefine [Symbol.hasInstance], but we can't enforce that. We therefore fallback to the default instanceof - // behavior (which is NOT cross-realm safe). - return this.prototype.isPrototypeOf(error); // eslint-disable-line no-prototype-builtins - } - }, - }); - }; -} -//# sourceMappingURL=type-helpers.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/type-helpers.js.map b/node_modules/@temporalio/common/lib/type-helpers.js.map deleted file mode 100644 index 8987da9..0000000 --- a/node_modules/@temporalio/common/lib/type-helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"type-helpers.js","sourceRoot":"","sources":["../src/type-helpers.ts"],"names":[],"mappings":";;AAwBA,oCAEC;AAkFD,4BAEC;AAED,wCAKC;AAED,4CAKC;AAED,0BAOC;AAED,oCAEC;AAKD,oCAOC;AAaD,8BAMC;AAKD,kCAEC;AA+BD,gEAwBC;AA/MD,8CAA8C;AAC9C,SAAgB,YAAY;IAC1B,wBAAwB;AAC1B,CAAC;AAkFD,SAAgB,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC;AAED,SAAgB,cAAc,CAC5B,MAAS,EACT,IAAO;IAEP,OAAO,IAAI,IAAI,MAAM,CAAC;AACxB,CAAC;AAED,SAAgB,gBAAgB,CAC9B,MAAS,EACT,KAAU;IAEV,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,MAAM,CAAC,CAAC;AAC/C,CAAC;AAED,SAAgB,OAAO,CAAC,KAAc;IACpC,OAAO,CACL,QAAQ,CAAC,KAAK,CAAC;QACf,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;QAC9B,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;QACjC,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,CAAC,CACzD,CAAC;AACJ,CAAC;AAED,SAAgB,YAAY,CAAC,KAAc;IACzC,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,CAA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AAW,EAAE;YAC/C,4CAA4C;YAC5C,KAAK,EAAE,UAAqB,KAAa;gBACvC,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;oBACnB,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAK,KAAa,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;gBAC5D,CAAC;qBAAM,CAAC;oBACN,yGAAyG;oBACzG,wFAAwF;oBACxF,0GAA0G;oBAC1G,EAAE;oBACF,yGAAyG;oBACzG,4GAA4G;oBAC5G,4CAA4C;oBAC5C,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,4CAA4C;gBAC1F,CAAC;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/user-metadata.d.ts b/node_modules/@temporalio/common/lib/user-metadata.d.ts deleted file mode 100644 index 6acf70e..0000000 --- a/node_modules/@temporalio/common/lib/user-metadata.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -import { PayloadConverter } from './converter/payload-converter'; -/** - * User metadata that can be attached to workflow commands. - */ -export interface UserMetadata { - /** @experimental A fixed, single line summary of the command's purpose */ - staticSummary?: string; - /** @experimental Fixed additional details about the command for longer-text description, can span multiple lines */ - staticDetails?: string; -} -export declare function userMetadataToPayload(payloadConverter: PayloadConverter, staticSummary: string | undefined, staticDetails: string | undefined): temporal.api.sdk.v1.IUserMetadata | undefined; diff --git a/node_modules/@temporalio/common/lib/user-metadata.js b/node_modules/@temporalio/common/lib/user-metadata.js deleted file mode 100644 index 307c73f..0000000 --- a/node_modules/@temporalio/common/lib/user-metadata.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.userMetadataToPayload = userMetadataToPayload; -const payload_converter_1 = require("./converter/payload-converter"); -function userMetadataToPayload(payloadConverter, staticSummary, staticDetails) { - if (staticSummary == null && staticDetails == null) - return undefined; - const summary = (0, payload_converter_1.convertOptionalToPayload)(payloadConverter, staticSummary); - const details = (0, payload_converter_1.convertOptionalToPayload)(payloadConverter, staticDetails); - if (summary == null && details == null) - return undefined; - return { summary, details }; -} -//# sourceMappingURL=user-metadata.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/user-metadata.js.map b/node_modules/@temporalio/common/lib/user-metadata.js.map deleted file mode 100644 index 798986a..0000000 --- a/node_modules/@temporalio/common/lib/user-metadata.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"user-metadata.js","sourceRoot":"","sources":["../src/user-metadata.ts"],"names":[],"mappings":";;AAaA,sDAaC;AAzBD,qEAA2F;AAY3F,SAAgB,qBAAqB,CACnC,gBAAkC,EAClC,aAAiC,EACjC,aAAiC;IAEjC,IAAI,aAAa,IAAI,IAAI,IAAI,aAAa,IAAI,IAAI;QAAE,OAAO,SAAS,CAAC;IAErE,MAAM,OAAO,GAAG,IAAA,4CAAwB,EAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,IAAA,4CAAwB,EAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;IAE1E,IAAI,OAAO,IAAI,IAAI,IAAI,OAAO,IAAI,IAAI;QAAE,OAAO,SAAS,CAAC;IAEzD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAC9B,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/versioning-intent-enum.d.ts b/node_modules/@temporalio/common/lib/versioning-intent-enum.d.ts deleted file mode 100644 index 2119055..0000000 --- a/node_modules/@temporalio/common/lib/versioning-intent-enum.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { VersioningIntent as VersioningIntentString } from './versioning-intent'; -/** - * Protobuf enum representation of {@link VersioningIntentString}. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export declare enum VersioningIntent { - UNSPECIFIED = 0, - COMPATIBLE = 1, - DEFAULT = 2 -} -/** - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export declare function versioningIntentToProto(intent: VersioningIntentString | undefined): VersioningIntent; diff --git a/node_modules/@temporalio/common/lib/versioning-intent-enum.js b/node_modules/@temporalio/common/lib/versioning-intent-enum.js deleted file mode 100644 index 6b98119..0000000 --- a/node_modules/@temporalio/common/lib/versioning-intent-enum.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.VersioningIntent = void 0; -exports.versioningIntentToProto = versioningIntentToProto; -const type_helpers_1 = require("./type-helpers"); -/* eslint-disable @typescript-eslint/no-deprecated */ -// Avoid importing the proto implementation to reduce workflow bundle size -// Copied from coresdk.common.VersioningIntent -/** - * Protobuf enum representation of {@link VersioningIntentString}. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -var VersioningIntent; -(function (VersioningIntent) { - VersioningIntent[VersioningIntent["UNSPECIFIED"] = 0] = "UNSPECIFIED"; - VersioningIntent[VersioningIntent["COMPATIBLE"] = 1] = "COMPATIBLE"; - VersioningIntent[VersioningIntent["DEFAULT"] = 2] = "DEFAULT"; -})(VersioningIntent || (exports.VersioningIntent = VersioningIntent = {})); -(0, type_helpers_1.checkExtends)(); -(0, type_helpers_1.checkExtends)(); -/** - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -function versioningIntentToProto(intent) { - switch (intent) { - case 'DEFAULT': - return VersioningIntent.DEFAULT; - case 'COMPATIBLE': - return VersioningIntent.COMPATIBLE; - case undefined: - return VersioningIntent.UNSPECIFIED; - default: - (0, type_helpers_1.assertNever)('Unexpected VersioningIntent', intent); - } -} -//# sourceMappingURL=versioning-intent-enum.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/versioning-intent-enum.js.map b/node_modules/@temporalio/common/lib/versioning-intent-enum.js.map deleted file mode 100644 index 96d916c..0000000 --- a/node_modules/@temporalio/common/lib/versioning-intent-enum.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"versioning-intent-enum.js","sourceRoot":"","sources":["../src/versioning-intent-enum.ts"],"names":[],"mappings":";;;AAyBA,0DAWC;AAlCD,iDAA2D;AAE3D,qDAAqD;AAErD,0EAA0E;AAC1E,8CAA8C;AAC9C;;;;GAIG;AACH,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,qEAAe,CAAA;IACf,mEAAc,CAAA;IACd,6DAAW,CAAA;AACb,CAAC,EAJW,gBAAgB,gCAAhB,gBAAgB,QAI3B;AAED,IAAA,2BAAY,GAAqD,CAAC;AAClE,IAAA,2BAAY,GAAqD,CAAC;AAElE;;GAEG;AACH,SAAgB,uBAAuB,CAAC,MAA0C;IAChF,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,SAAS;YACZ,OAAO,gBAAgB,CAAC,OAAO,CAAC;QAClC,KAAK,YAAY;YACf,OAAO,gBAAgB,CAAC,UAAU,CAAC;QACrC,KAAK,SAAS;YACZ,OAAO,gBAAgB,CAAC,WAAW,CAAC;QACtC;YACE,IAAA,0BAAW,EAAC,6BAA6B,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/versioning-intent.d.ts b/node_modules/@temporalio/common/lib/versioning-intent.d.ts deleted file mode 100644 index eb305b8..0000000 --- a/node_modules/@temporalio/common/lib/versioning-intent.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Indicates whether the user intends certain commands to be run on a compatible worker Build Id version or not. - * - * `COMPATIBLE` indicates that the command should run on a worker with compatible version if possible. It may not be - * possible if the target task queue does not also have knowledge of the current worker's Build Id. - * - * `DEFAULT` indicates that the command should run on the target task queue's current overall-default Build Id. - * - * Where this type is accepted optionally, an unset value indicates that the SDK should choose the most sensible default - * behavior for the type of command, accounting for whether the command will be run on the same task queue as the - * current worker. The default behavior for starting Workflows is `DEFAULT`. The default behavior for Workflows starting - * Activities, starting Child Workflows, or Continuing As New is `COMPATIBLE`. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export type VersioningIntent = 'COMPATIBLE' | 'DEFAULT'; diff --git a/node_modules/@temporalio/common/lib/versioning-intent.js b/node_modules/@temporalio/common/lib/versioning-intent.js deleted file mode 100644 index b38efc2..0000000 --- a/node_modules/@temporalio/common/lib/versioning-intent.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=versioning-intent.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/versioning-intent.js.map b/node_modules/@temporalio/common/lib/versioning-intent.js.map deleted file mode 100644 index e84b631..0000000 --- a/node_modules/@temporalio/common/lib/versioning-intent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"versioning-intent.js","sourceRoot":"","sources":["../src/versioning-intent.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/worker-deployments.d.ts b/node_modules/@temporalio/common/lib/worker-deployments.d.ts deleted file mode 100644 index bef164d..0000000 --- a/node_modules/@temporalio/common/lib/worker-deployments.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -/** - * Represents the version of a specific worker deployment. - */ -export interface WorkerDeploymentVersion { - readonly buildId: string; - readonly deploymentName: string; -} -/** - * @returns The canonical representation of a deployment version, which is a string in the format - * `deploymentName.buildId`. - */ -export declare function toCanonicalString(version: WorkerDeploymentVersion): string; -/** - * Specifies when a workflow might move from a worker of one Build Id to another. - * - * * 'PINNED' - The workflow will be pinned to the current Build ID unless manually moved. - * * 'AUTO_UPGRADE' - The workflow will automatically move to the latest version (default Build ID - * of the task queue) when the next task is dispatched. - */ -export declare const VersioningBehavior: { - readonly PINNED: "PINNED"; - readonly AUTO_UPGRADE: "AUTO_UPGRADE"; -}; -export type VersioningBehavior = (typeof VersioningBehavior)[keyof typeof VersioningBehavior]; -export declare const encodeVersioningBehavior: (input: "PINNED" | "AUTO_UPGRADE" | temporal.api.enums.v1.VersioningBehavior | "VERSIONING_BEHAVIOR_PINNED" | "VERSIONING_BEHAVIOR_AUTO_UPGRADE" | null | undefined) => temporal.api.enums.v1.VersioningBehavior | undefined, decodeVersioningBehavior: (input: temporal.api.enums.v1.VersioningBehavior | null | undefined) => "PINNED" | "AUTO_UPGRADE" | undefined; -/** - * Represents versioning overrides. For example, when starting workflows. - */ -export type VersioningOverride = PinnedVersioningOverride | 'AUTO_UPGRADE'; -/** - * Workflow will be pinned to a specific deployment version. - */ -export interface PinnedVersioningOverride { - /** - * The worker deployment version to pin the workflow to. - */ - pinnedTo: WorkerDeploymentVersion; -} -/** - * The workflow will auto-upgrade to the current deployment version on the next workflow task. - */ -export type AutoUpgradeVersioningOverride = 'AUTO_UPGRADE'; -/** - * Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain. - * - * AUTO_UPGRADE - Start the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at - * start-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever - * Versioning Behavior the workflow is annotated with in the workflow code. - * - * Note that if the previous workflow had a Pinned override, that override will be inherited by the - * new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new - * command. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade - * behavior, the base version of the new run will be the Target Version as described above, but the - * effective version will be whatever is specified by the Versioning Override until the override is removed. - * - * @experimental Versioning semantics with continue-as-new are experimental and may change in the future. - */ -export declare const InitialVersioningBehavior: { - readonly AUTO_UPGRADE: "AUTO_UPGRADE"; -}; -export type InitialVersioningBehavior = (typeof InitialVersioningBehavior)[keyof typeof InitialVersioningBehavior]; -export declare const encodeInitialVersioningBehavior: (input: "AUTO_UPGRADE" | temporal.api.enums.v1.ContinueAsNewVersioningBehavior | "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE" | null | undefined) => temporal.api.enums.v1.ContinueAsNewVersioningBehavior | undefined, decodeInitialVersioningBehavior: (input: temporal.api.enums.v1.ContinueAsNewVersioningBehavior | null | undefined) => "AUTO_UPGRADE" | undefined; diff --git a/node_modules/@temporalio/common/lib/worker-deployments.js b/node_modules/@temporalio/common/lib/worker-deployments.js deleted file mode 100644 index 15519da..0000000 --- a/node_modules/@temporalio/common/lib/worker-deployments.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -var _a, _b; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeInitialVersioningBehavior = exports.encodeInitialVersioningBehavior = exports.InitialVersioningBehavior = exports.decodeVersioningBehavior = exports.encodeVersioningBehavior = exports.VersioningBehavior = void 0; -exports.toCanonicalString = toCanonicalString; -const internal_workflow_1 = require("./internal-workflow"); -/** - * @returns The canonical representation of a deployment version, which is a string in the format - * `deploymentName.buildId`. - */ -function toCanonicalString(version) { - return `${version.deploymentName}.${version.buildId}`; -} -/** - * Specifies when a workflow might move from a worker of one Build Id to another. - * - * * 'PINNED' - The workflow will be pinned to the current Build ID unless manually moved. - * * 'AUTO_UPGRADE' - The workflow will automatically move to the latest version (default Build ID - * of the task queue) when the next task is dispatched. - */ -exports.VersioningBehavior = { - PINNED: 'PINNED', - AUTO_UPGRADE: 'AUTO_UPGRADE', -}; -_a = (0, internal_workflow_1.makeProtoEnumConverters)({ - [exports.VersioningBehavior.PINNED]: 1, - [exports.VersioningBehavior.AUTO_UPGRADE]: 2, - UNSPECIFIED: 0, -}, 'VERSIONING_BEHAVIOR_'), exports.encodeVersioningBehavior = _a[0], exports.decodeVersioningBehavior = _a[1]; -/** - * Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain. - * - * AUTO_UPGRADE - Start the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at - * start-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever - * Versioning Behavior the workflow is annotated with in the workflow code. - * - * Note that if the previous workflow had a Pinned override, that override will be inherited by the - * new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new - * command. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade - * behavior, the base version of the new run will be the Target Version as described above, but the - * effective version will be whatever is specified by the Versioning Override until the override is removed. - * - * @experimental Versioning semantics with continue-as-new are experimental and may change in the future. - */ -exports.InitialVersioningBehavior = { - AUTO_UPGRADE: 'AUTO_UPGRADE', -}; -_b = (0, internal_workflow_1.makeProtoEnumConverters)({ - [exports.InitialVersioningBehavior.AUTO_UPGRADE]: 1, - UNSPECIFIED: 0, -}, 'CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_'), exports.encodeInitialVersioningBehavior = _b[0], exports.decodeInitialVersioningBehavior = _b[1]; -//# sourceMappingURL=worker-deployments.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/worker-deployments.js.map b/node_modules/@temporalio/common/lib/worker-deployments.js.map deleted file mode 100644 index 9063b78..0000000 --- a/node_modules/@temporalio/common/lib/worker-deployments.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"worker-deployments.js","sourceRoot":"","sources":["../src/worker-deployments.ts"],"names":[],"mappings":";;;;AAeA,8CAEC;AAhBD,2DAA8D;AAU9D;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,OAAgC;IAChE,OAAO,GAAG,OAAO,CAAC,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;AACxD,CAAC;AAED;;;;;;GAMG;AACU,QAAA,kBAAkB,GAAG;IAChC,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,cAAc;CACpB,CAAC;AAGE,KAAuD,IAAA,2CAAuB,EAOzF;IACE,CAAC,0BAAkB,CAAC,MAAM,CAAC,EAAE,CAAC;IAC9B,CAAC,0BAAkB,CAAC,YAAY,CAAC,EAAE,CAAC;IACpC,WAAW,EAAE,CAAC;CACN,EACV,sBAAsB,CACvB,EAba,gCAAwB,UAAE,gCAAwB,SAa9D;AAsBF;;;;;;;;;;;;;;GAcG;AACU,QAAA,yBAAyB,GAAG;IACvC,YAAY,EAAE,cAAc;CACpB,CAAC;AAGE,KAAqE,IAAA,2CAAuB,EAOvG;IACE,CAAC,iCAAyB,CAAC,YAAY,CAAC,EAAE,CAAC;IAC3C,WAAW,EAAE,CAAC;CACN,EACV,sCAAsC,CACvC,EAZa,uCAA+B,UAAE,uCAA+B,SAY5E"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/workflow-definition-options.d.ts b/node_modules/@temporalio/common/lib/workflow-definition-options.d.ts deleted file mode 100644 index 4f1ab48..0000000 --- a/node_modules/@temporalio/common/lib/workflow-definition-options.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { VersioningBehavior } from './worker-deployments'; -/** - * Options that can be used when defining a workflow via {@link setWorkflowOptions}. - */ -export interface WorkflowDefinitionOptions { - versioningBehavior?: VersioningBehavior; -} -type AsyncFunction = (...args: Args) => Promise; -export type WorkflowDefinitionOptionsOrGetter = WorkflowDefinitionOptions | (() => WorkflowDefinitionOptions); -/** - * @internal - * @hidden - * A workflow function that has been defined with options from {@link WorkflowDefinitionOptions}. - */ -export interface WorkflowFunctionWithOptions extends AsyncFunction { - workflowDefinitionOptions: WorkflowDefinitionOptionsOrGetter; -} -export {}; diff --git a/node_modules/@temporalio/common/lib/workflow-definition-options.js b/node_modules/@temporalio/common/lib/workflow-definition-options.js deleted file mode 100644 index e15bca6..0000000 --- a/node_modules/@temporalio/common/lib/workflow-definition-options.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=workflow-definition-options.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/workflow-definition-options.js.map b/node_modules/@temporalio/common/lib/workflow-definition-options.js.map deleted file mode 100644 index fcc885c..0000000 --- a/node_modules/@temporalio/common/lib/workflow-definition-options.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workflow-definition-options.js","sourceRoot":"","sources":["../src/workflow-definition-options.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/workflow-handle.d.ts b/node_modules/@temporalio/common/lib/workflow-handle.d.ts deleted file mode 100644 index 0eb601c..0000000 --- a/node_modules/@temporalio/common/lib/workflow-handle.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Workflow, WorkflowResultType, SignalDefinition } from './interfaces'; -/** - * Base WorkflowHandle interface, extended in workflow and client libs. - * - * Transforms a workflow interface `T` into a client interface. - */ -export interface BaseWorkflowHandle { - /** - * Promise that resolves when Workflow execution completes - */ - result(): Promise>; - /** - * Signal a running Workflow. - * - * @param def a signal definition as returned from {@link defineSignal} - * - * @example - * ```ts - * await handle.signal(incrementSignal, 3); - * ``` - */ - signal(def: SignalDefinition | string, ...args: Args): Promise; - /** - * The workflowId of the current Workflow - */ - readonly workflowId: string; -} diff --git a/node_modules/@temporalio/common/lib/workflow-handle.js b/node_modules/@temporalio/common/lib/workflow-handle.js deleted file mode 100644 index 07f0fc8..0000000 --- a/node_modules/@temporalio/common/lib/workflow-handle.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=workflow-handle.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/workflow-handle.js.map b/node_modules/@temporalio/common/lib/workflow-handle.js.map deleted file mode 100644 index a8e0c43..0000000 --- a/node_modules/@temporalio/common/lib/workflow-handle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workflow-handle.js","sourceRoot":"","sources":["../src/workflow-handle.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/workflow-options.d.ts b/node_modules/@temporalio/common/lib/workflow-options.d.ts deleted file mode 100644 index 5074439..0000000 --- a/node_modules/@temporalio/common/lib/workflow-options.d.ts +++ /dev/null @@ -1,198 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -import { Workflow } from './interfaces'; -import { RetryPolicy } from './retry-policy'; -import { Duration } from './time'; -import { SearchAttributePair, SearchAttributes, TypedSearchAttributes } from './search-attributes'; -import { Priority } from './priority'; -import { WorkflowFunctionWithOptions } from './workflow-definition-options'; -/** - * Defines what happens when trying to start a Workflow with the same ID as a *Closed* Workflow. - * - * See {@link WorkflowOptions.workflowIdConflictPolicy} for what happens when trying to start a - * Workflow with the same ID as a *Running* Workflow. - * - * Concept: {@link https://docs.temporal.io/concepts/what-is-a-workflow-id-reuse-policy/ | Workflow Id Reuse Policy} - * - * *Note: It is not possible to have two actively running Workflows with the same ID.* - * - */ -export declare const WorkflowIdReusePolicy: { - /** - * The Workflow can be started if the previous Workflow is in a Closed state. - * @default - */ - readonly ALLOW_DUPLICATE: "ALLOW_DUPLICATE"; - /** - * The Workflow can be started if the previous Workflow is in a Closed state that is not Completed. - */ - readonly ALLOW_DUPLICATE_FAILED_ONLY: "ALLOW_DUPLICATE_FAILED_ONLY"; - /** - * The Workflow cannot be started. - */ - readonly REJECT_DUPLICATE: "REJECT_DUPLICATE"; - /** - * Terminate the current Workflow if one is already running; otherwise allow reusing the Workflow ID. - * - * @deprecated Use {@link WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE} instead, and - * set `WorkflowOptions.workflowIdConflictPolicy` to - * {@link WorkflowIdConflictPolicy.WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING}. - * When using this option, `WorkflowOptions.workflowIdConflictPolicy` must be left unspecified. - */ - readonly TERMINATE_IF_RUNNING: "TERMINATE_IF_RUNNING"; - /** - * No need to use this. If a `WorkflowIdReusePolicy` is set to this, or is not set at all, the default value will be used. - * - * @deprecated Either leave property `undefined`, or use {@link ALLOW_DUPLICATE} instead. - */ - readonly WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED: undefined; - /** @deprecated Use {@link ALLOW_DUPLICATE} instead. */ - readonly WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE: "ALLOW_DUPLICATE"; - /** @deprecated Use {@link ALLOW_DUPLICATE_FAILED_ONLY} instead. */ - readonly WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY: "ALLOW_DUPLICATE_FAILED_ONLY"; - /** @deprecated Use {@link REJECT_DUPLICATE} instead. */ - readonly WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE: "REJECT_DUPLICATE"; - /** @deprecated Use {@link TERMINATE_IF_RUNNING} instead. */ - readonly WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING: "TERMINATE_IF_RUNNING"; -}; -export type WorkflowIdReusePolicy = (typeof WorkflowIdReusePolicy)[keyof typeof WorkflowIdReusePolicy]; -export declare const encodeWorkflowIdReusePolicy: (input: "ALLOW_DUPLICATE" | "ALLOW_DUPLICATE_FAILED_ONLY" | "REJECT_DUPLICATE" | "TERMINATE_IF_RUNNING" | "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE" | "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY" | "WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE" | "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING" | temporal.api.enums.v1.WorkflowIdReusePolicy | null | undefined) => temporal.api.enums.v1.WorkflowIdReusePolicy | undefined, decodeWorkflowIdReusePolicy: (input: temporal.api.enums.v1.WorkflowIdReusePolicy | null | undefined) => "ALLOW_DUPLICATE" | "ALLOW_DUPLICATE_FAILED_ONLY" | "REJECT_DUPLICATE" | "TERMINATE_IF_RUNNING" | undefined; -/** - * Defines what happens when trying to start a Workflow with the same ID as a *Running* Workflow. - * - * See {@link WorkflowOptions.workflowIdReusePolicy} for what happens when trying to start a Workflow - * with the same ID as a *Closed* Workflow. - * - * *Note: It is never possible to have two _actively running_ Workflows with the same ID.* - */ -export declare const WorkflowIdConflictPolicy: { - /** - * Do not start a new Workflow. Instead raise a `WorkflowExecutionAlreadyStartedError`. - */ - readonly FAIL: "FAIL"; - /** - * Do not start a new Workflow. Instead return a Workflow Handle for the already Running Workflow. - */ - readonly USE_EXISTING: "USE_EXISTING"; - /** - * Start a new Workflow, terminating the current workflow if one is already running. - */ - readonly TERMINATE_EXISTING: "TERMINATE_EXISTING"; -}; -export type WorkflowIdConflictPolicy = (typeof WorkflowIdConflictPolicy)[keyof typeof WorkflowIdConflictPolicy]; -export declare const encodeWorkflowIdConflictPolicy: (input: "FAIL" | "USE_EXISTING" | "TERMINATE_EXISTING" | temporal.api.enums.v1.WorkflowIdConflictPolicy | "WORKFLOW_ID_CONFLICT_POLICY_FAIL" | "WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING" | "WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING" | null | undefined) => temporal.api.enums.v1.WorkflowIdConflictPolicy | undefined, decodeWorkflowIdConflictPolicy: (input: temporal.api.enums.v1.WorkflowIdConflictPolicy | null | undefined) => "FAIL" | "USE_EXISTING" | "TERMINATE_EXISTING" | undefined; -export interface BaseWorkflowOptions { - /** - * Defines what happens when trying to start a Workflow with the same ID as a *Closed* Workflow. - * - * *Note: It is not possible to have two actively running Workflows with the same ID.* - * - * @default WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE - */ - workflowIdReusePolicy?: WorkflowIdReusePolicy; - /** - * Defines what happens when trying to start a Workflow with the same ID as a *Running* Workflow. - * - * *Note: It is not possible to have two actively running Workflows with the same ID.* - * - * @default WorkflowIdConflictPolicy.WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED - */ - workflowIdConflictPolicy?: WorkflowIdConflictPolicy; - /** - * Controls how a Workflow Execution is retried. - * - * By default, Workflow Executions are not retried. Do not override this behavior unless you know what you're doing. - * {@link https://docs.temporal.io/concepts/what-is-a-retry-policy/ | More information}. - */ - retry?: RetryPolicy; - /** - * Optional cron schedule for Workflow. If a cron schedule is specified, the Workflow will run as a cron based on the - * schedule. The scheduling will be based on UTC time. The schedule for the next run only happens after the current - * run is completed/failed/timeout. If a RetryPolicy is also supplied, and the Workflow failed or timed out, the - * Workflow will be retried based on the retry policy. While the Workflow is retrying, it won't schedule its next run. - * If the next schedule is due while the Workflow is running (or retrying), then it will skip that schedule. Cron - * Workflow will not stop until it is terminated or cancelled (by returning temporal.CanceledError). - * https://crontab.guru/ is useful for testing your cron expressions. - */ - cronSchedule?: string; - /** - * Specifies additional non-indexed information to attach to the Workflow Execution. The values can be anything that - * is serializable by {@link DataConverter}. - */ - memo?: Record; - /** - * Specifies additional indexed information to attach to the Workflow Execution. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom data converter is provided. - * - * @deprecated Use {@link typedSearchAttributes} instead. - */ - searchAttributes?: SearchAttributes; - /** - * Specifies additional indexed information to attach to the Workflow Execution. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom data converter is provided. - * Note that search attributes are not encoded, as such, do not include any sensitive information. - * - * If both {@link searchAttributes} and {@link typedSearchAttributes} are provided, conflicting keys will be overwritten - * by {@link typedSearchAttributes}. - */ - typedSearchAttributes?: SearchAttributePair[] | TypedSearchAttributes; - /** - * General fixed details for this workflow execution that may appear in UI/CLI. - * This can be in Temporal markdown format and can span multiple lines. - * - * @experimental User metadata is a new API and susceptible to change. - */ - staticDetails?: string; - /** - * A single-line fixed summary for this workflow execution that may appear in the UI/CLI. - * This can be in single-line Temporal markdown format. - * - * @experimental User metadata is a new API and susceptible to change. - */ - staticSummary?: string; - /** - * Priority of a workflow - */ - priority?: Priority; -} -export type WithWorkflowArgs = T & (Parameters extends [any, ...any[]] ? { - /** - * Arguments to pass to the Workflow - */ - args: Parameters | Readonly>; -} : { - /** - * Arguments to pass to the Workflow - */ - args?: Parameters | Readonly>; -}); -export interface WorkflowDurationOptions { - /** - * The time after which workflow run is automatically terminated by Temporal service. Do not - * rely on run timeout for business level timeouts. It is preferred to use in workflow timers - * for this purpose. - * - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - workflowRunTimeout?: Duration; - /** - * - * The time after which workflow execution (which includes run retries and continue as new) is - * automatically terminated by Temporal service. Do not rely on execution timeout for business - * level timeouts. It is preferred to use in workflow timers for this purpose. - * - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - workflowExecutionTimeout?: Duration; - /** - * Maximum execution time of a single workflow task. Default is 10 seconds. - * - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - workflowTaskTimeout?: Duration; -} -export type CommonWorkflowOptions = BaseWorkflowOptions & WorkflowDurationOptions; -export declare function extractWorkflowType(workflowTypeOrFunc: string | T | WorkflowFunctionWithOptions): string; diff --git a/node_modules/@temporalio/common/lib/workflow-options.js b/node_modules/@temporalio/common/lib/workflow-options.js deleted file mode 100644 index 754079b..0000000 --- a/node_modules/@temporalio/common/lib/workflow-options.js +++ /dev/null @@ -1,102 +0,0 @@ -"use strict"; -var _a, _b; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeWorkflowIdConflictPolicy = exports.encodeWorkflowIdConflictPolicy = exports.WorkflowIdConflictPolicy = exports.decodeWorkflowIdReusePolicy = exports.encodeWorkflowIdReusePolicy = exports.WorkflowIdReusePolicy = void 0; -exports.extractWorkflowType = extractWorkflowType; -const internal_workflow_1 = require("./internal-workflow"); -/** - * Defines what happens when trying to start a Workflow with the same ID as a *Closed* Workflow. - * - * See {@link WorkflowOptions.workflowIdConflictPolicy} for what happens when trying to start a - * Workflow with the same ID as a *Running* Workflow. - * - * Concept: {@link https://docs.temporal.io/concepts/what-is-a-workflow-id-reuse-policy/ | Workflow Id Reuse Policy} - * - * *Note: It is not possible to have two actively running Workflows with the same ID.* - * - */ -exports.WorkflowIdReusePolicy = { - /** - * The Workflow can be started if the previous Workflow is in a Closed state. - * @default - */ - ALLOW_DUPLICATE: 'ALLOW_DUPLICATE', - /** - * The Workflow can be started if the previous Workflow is in a Closed state that is not Completed. - */ - ALLOW_DUPLICATE_FAILED_ONLY: 'ALLOW_DUPLICATE_FAILED_ONLY', - /** - * The Workflow cannot be started. - */ - REJECT_DUPLICATE: 'REJECT_DUPLICATE', - /** - * Terminate the current Workflow if one is already running; otherwise allow reusing the Workflow ID. - * - * @deprecated Use {@link WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE} instead, and - * set `WorkflowOptions.workflowIdConflictPolicy` to - * {@link WorkflowIdConflictPolicy.WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING}. - * When using this option, `WorkflowOptions.workflowIdConflictPolicy` must be left unspecified. - */ - TERMINATE_IF_RUNNING: 'TERMINATE_IF_RUNNING', - /// Anything below this line has been deprecated - /** - * No need to use this. If a `WorkflowIdReusePolicy` is set to this, or is not set at all, the default value will be used. - * - * @deprecated Either leave property `undefined`, or use {@link ALLOW_DUPLICATE} instead. - */ - WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED: undefined, - /** @deprecated Use {@link ALLOW_DUPLICATE} instead. */ - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE: 'ALLOW_DUPLICATE', - /** @deprecated Use {@link ALLOW_DUPLICATE_FAILED_ONLY} instead. */ - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY: 'ALLOW_DUPLICATE_FAILED_ONLY', - /** @deprecated Use {@link REJECT_DUPLICATE} instead. */ - WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE: 'REJECT_DUPLICATE', - /** @deprecated Use {@link TERMINATE_IF_RUNNING} instead. */ - WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING: 'TERMINATE_IF_RUNNING', -}; -_a = (0, internal_workflow_1.makeProtoEnumConverters)({ - [exports.WorkflowIdReusePolicy.ALLOW_DUPLICATE]: 1, - [exports.WorkflowIdReusePolicy.ALLOW_DUPLICATE_FAILED_ONLY]: 2, - [exports.WorkflowIdReusePolicy.REJECT_DUPLICATE]: 3, - [exports.WorkflowIdReusePolicy.TERMINATE_IF_RUNNING]: 4, // eslint-disable-line @typescript-eslint/no-deprecated - UNSPECIFIED: 0, -}, 'WORKFLOW_ID_REUSE_POLICY_'), exports.encodeWorkflowIdReusePolicy = _a[0], exports.decodeWorkflowIdReusePolicy = _a[1]; -/** - * Defines what happens when trying to start a Workflow with the same ID as a *Running* Workflow. - * - * See {@link WorkflowOptions.workflowIdReusePolicy} for what happens when trying to start a Workflow - * with the same ID as a *Closed* Workflow. - * - * *Note: It is never possible to have two _actively running_ Workflows with the same ID.* - */ -exports.WorkflowIdConflictPolicy = { - /** - * Do not start a new Workflow. Instead raise a `WorkflowExecutionAlreadyStartedError`. - */ - FAIL: 'FAIL', - /** - * Do not start a new Workflow. Instead return a Workflow Handle for the already Running Workflow. - */ - USE_EXISTING: 'USE_EXISTING', - /** - * Start a new Workflow, terminating the current workflow if one is already running. - */ - TERMINATE_EXISTING: 'TERMINATE_EXISTING', -}; -_b = (0, internal_workflow_1.makeProtoEnumConverters)({ - [exports.WorkflowIdConflictPolicy.FAIL]: 1, - [exports.WorkflowIdConflictPolicy.USE_EXISTING]: 2, - [exports.WorkflowIdConflictPolicy.TERMINATE_EXISTING]: 3, - UNSPECIFIED: 0, -}, 'WORKFLOW_ID_CONFLICT_POLICY_'), exports.encodeWorkflowIdConflictPolicy = _b[0], exports.decodeWorkflowIdConflictPolicy = _b[1]; -function extractWorkflowType(workflowTypeOrFunc) { - if (typeof workflowTypeOrFunc === 'string') - return workflowTypeOrFunc; - if (typeof workflowTypeOrFunc === 'function') { - if (workflowTypeOrFunc?.name) - return workflowTypeOrFunc.name; - throw new TypeError('Invalid workflow type: the workflow function is anonymous'); - } - throw new TypeError(`Invalid workflow type: expected either a string or a function, got '${typeof workflowTypeOrFunc}'`); -} -//# sourceMappingURL=workflow-options.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/common/lib/workflow-options.js.map b/node_modules/@temporalio/common/lib/workflow-options.js.map deleted file mode 100644 index 29502c1..0000000 --- a/node_modules/@temporalio/common/lib/workflow-options.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workflow-options.js","sourceRoot":"","sources":["../src/workflow-options.ts"],"names":[],"mappings":";;;;AAqQA,kDAWC;AA5QD,2DAA8D;AAK9D;;;;;;;;;;GAUG;AACU,QAAA,qBAAqB,GAAG;IACnC;;;OAGG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,2BAA2B,EAAE,6BAA6B;IAE1D;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;IAEpC;;;;;;;OAOG;IACH,oBAAoB,EAAE,sBAAsB;IAE5C,gDAAgD;IAEhD;;;;OAIG;IACH,oCAAoC,EAAE,SAAS;IAE/C,uDAAuD;IACvD,wCAAwC,EAAE,iBAAiB;IAE3D,mEAAmE;IACnE,oDAAoD,EAAE,6BAA6B;IAEnF,wDAAwD;IACxD,yCAAyC,EAAE,kBAAkB;IAE7D,4DAA4D;IAC5D,6CAA6C,EAAE,sBAAsB;CAC7D,CAAC;AAGE,KAA6D,IAAA,2CAAuB,EAO/F;IACE,CAAC,6BAAqB,CAAC,eAAe,CAAC,EAAE,CAAC;IAC1C,CAAC,6BAAqB,CAAC,2BAA2B,CAAC,EAAE,CAAC;IACtD,CAAC,6BAAqB,CAAC,gBAAgB,CAAC,EAAE,CAAC;IAC3C,CAAC,6BAAqB,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,uDAAuD;IACxG,WAAW,EAAE,CAAC;CACN,EACV,2BAA2B,CAC5B,EAfa,mCAA2B,UAAE,mCAA2B,SAepE;AAEF;;;;;;;GAOG;AACU,QAAA,wBAAwB,GAAG;IACtC;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,kBAAkB,EAAE,oBAAoB;CAChC,CAAC;AAGE,KAAmE,IAAA,2CAAuB,EAOrG;IACE,CAAC,gCAAwB,CAAC,IAAI,CAAC,EAAE,CAAC;IAClC,CAAC,gCAAwB,CAAC,YAAY,CAAC,EAAE,CAAC;IAC1C,CAAC,gCAAwB,CAAC,kBAAkB,CAAC,EAAE,CAAC;IAChD,WAAW,EAAE,CAAC;CACN,EACV,8BAA8B,CAC/B,EAda,sCAA8B,UAAE,sCAA8B,SAc1E;AAsIF,SAAgB,mBAAmB,CACjC,kBAAwE;IAExE,IAAI,OAAO,kBAAkB,KAAK,QAAQ;QAAE,OAAO,kBAA4B,CAAC;IAChF,IAAI,OAAO,kBAAkB,KAAK,UAAU,EAAE,CAAC;QAC7C,IAAI,kBAAkB,EAAE,IAAI;YAAE,OAAO,kBAAkB,CAAC,IAAI,CAAC;QAC7D,MAAM,IAAI,SAAS,CAAC,2DAA2D,CAAC,CAAC;IACnF,CAAC;IACD,MAAM,IAAI,SAAS,CACjB,uEAAuE,OAAO,kBAAkB,GAAG,CACpG,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/common/package.json b/node_modules/@temporalio/common/package.json deleted file mode 100644 index 87be475..0000000 --- a/node_modules/@temporalio/common/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "@temporalio/common", - "version": "1.16.2", - "description": "Common library for code that's used across the Client, Worker, and/or Workflow", - "main": "lib/index.js", - "types": "./lib/index.d.ts", - "keywords": [ - "temporal", - "workflow", - "worker" - ], - "author": "Temporal Technologies Inc. ", - "license": "MIT", - "dependencies": { - "long": "^5.2.3", - "ms": "3.0.0-canary.1", - "nexus-rpc": "^0.0.2", - "proto3-json-serializer": "^2.0.0", - "@temporalio/proto": "1.16.2" - }, - "devDependencies": { - "protobufjs": "^7.2.5" - }, - "bugs": { - "url": "https://github.com/temporalio/sdk-typescript/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/temporalio/sdk-typescript.git", - "directory": "packages/common" - }, - "homepage": "https://github.com/temporalio/sdk-typescript/tree/main/packages/common", - "publishConfig": { - "access": "public" - }, - "engines": { - "node": ">= 20.0.0" - }, - "files": [ - "src", - "lib" - ] -} \ No newline at end of file diff --git a/node_modules/@temporalio/common/src/activity-cancellation-details.ts b/node_modules/@temporalio/common/src/activity-cancellation-details.ts deleted file mode 100644 index e4ed184..0000000 --- a/node_modules/@temporalio/common/src/activity-cancellation-details.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { coresdk } from '@temporalio/proto'; - -// ts-prune-ignore-next -export interface ActivityCancellationDetailsHolder { - details?: ActivityCancellationDetails; -} - -export interface ActivityCancellationDetailsOptions { - notFound?: boolean; - cancelRequested?: boolean; - paused?: boolean; - timedOut?: boolean; - workerShutdown?: boolean; - reset?: boolean; -} - -/** - * Provides the reasons for the activity's cancellation. Cancellation details are set once and do not change once set. - */ -export class ActivityCancellationDetails { - readonly notFound: boolean; - readonly cancelRequested: boolean; - readonly paused: boolean; - readonly timedOut: boolean; - readonly workerShutdown: boolean; - readonly reset: boolean; - - public constructor(options: ActivityCancellationDetailsOptions = {}) { - this.notFound = options.notFound ?? false; - this.cancelRequested = options.cancelRequested ?? false; - this.paused = options.paused ?? false; - this.timedOut = options.timedOut ?? false; - this.workerShutdown = options.workerShutdown ?? false; - this.reset = options.reset ?? false; - } - - static fromProto( - proto: coresdk.activity_task.IActivityCancellationDetails | null | undefined - ): ActivityCancellationDetails { - if (proto == null) { - return new ActivityCancellationDetails(); - } - return new ActivityCancellationDetails({ - notFound: proto.isNotFound ?? false, - cancelRequested: proto.isCancelled ?? false, - paused: proto.isPaused ?? false, - timedOut: proto.isTimedOut ?? false, - workerShutdown: proto.isWorkerShutdown ?? false, - reset: proto.isReset ?? false, - }); - } -} diff --git a/node_modules/@temporalio/common/src/activity-options.ts b/node_modules/@temporalio/common/src/activity-options.ts deleted file mode 100644 index 44d888b..0000000 --- a/node_modules/@temporalio/common/src/activity-options.ts +++ /dev/null @@ -1,274 +0,0 @@ -import type { coresdk } from '@temporalio/proto'; -import { RetryPolicy } from './retry-policy'; -import { Duration } from './time'; -import { VersioningIntent } from './versioning-intent'; -import { makeProtoEnumConverters } from './internal-workflow'; -import { Priority } from './priority'; - -// Note: The types defined in this file are here for legacy reasons. They should have been defined -// in the 'workflow' package, instead of 'common'. They are now reexported from the 'workflow' -// package, which is the preferred way to import them, but we unfortunately can't remove them from -// here as that would be a breaking change. - -/** - * Determines: - * - whether cancellation requests should be propagated from the current Workflow to the Activity; and - * - when should the Activity cancellation be reported to Workflow (i.e. at which moment should the - * Activity call's promise fail with an `ActivityFailure`, with `cause` set to a `CancelledFailure`). - * - * Note that this setting only applies to cancellation originating from cancellation being - * externally requested on the Workflow itself, or from internal cancellation of the - * `CancellationScope` in which the Activity call was made. Termination of a Workflow Execution - * always results in cancellation of its outstanding Activity executions, regardless of those - * Activities' {@link ActivityCancellationType} settings. - * - * @default ActivityCancellationType.WAIT_CANCELLATION_COMPLETED - */ -// MAINTENANCE: Keep this typedoc in sync with the `ActivityOptions.cancellationType` and -// `LocalActivityOptions.cancellationType` fields later in this file. -export const ActivityCancellationType = { - /** - * Do not propagate cancellation requests to the Activity, and immediately report cancellation - * to the caller. - */ - ABANDON: 'ABANDON', - - /** - * Propagate cancellation request from the Workflow to the Activity, yet _immediately_ report - * cancellation to the caller, i.e. without waiting for the server to confirm the cancellation - * request. - * - * Note that this cancellation type provides no guarantee, from the Workflow-side, that the - * cancellation request will actually be delivered to the Activity; e.g. the calling Workflow - * may exit before the delivery is completed, or the Activity may complete (either successfully - * or uncessfully) before the cancellation is delivered, resulting in a situation where the - * workflow thinks the activity was cancelled, but the activity actually completed successfully. - * - * To ensure that the Workflow is properly informed of the Activity's final state (i.e. either - * completion or cancellation), use {@link WAIT_CANCELLATION_COMPLETED}. - */ - TRY_CANCEL: 'TRY_CANCEL', - - /** - * Propagate cancellation request from the Workflow to the Activity, and wait for the activity - * to complete its execution (either successfully, uncessfully, or as cancelled). - * - * Note that the Activity must heartbeat to receive a cancellation notification. This can block - * the Workflow's cancellation for a long time if the Activity doesn't heartbeat or chooses to - * ignore the cancellation request. - */ - WAIT_CANCELLATION_COMPLETED: 'WAIT_CANCELLATION_COMPLETED', -} as const; -export type ActivityCancellationType = (typeof ActivityCancellationType)[keyof typeof ActivityCancellationType]; - -export const [encodeActivityCancellationType, decodeActivityCancellationType] = makeProtoEnumConverters< - coresdk.workflow_commands.ActivityCancellationType, - typeof coresdk.workflow_commands.ActivityCancellationType, - keyof typeof coresdk.workflow_commands.ActivityCancellationType, - typeof ActivityCancellationType, - '' ->( - { - [ActivityCancellationType.TRY_CANCEL]: 0, - [ActivityCancellationType.WAIT_CANCELLATION_COMPLETED]: 1, - [ActivityCancellationType.ABANDON]: 2, - } as const, - '' -); - -/** - * Options for remote activity invocation - */ -export interface ActivityOptions { - /** - * Identifier to use for tracking the activity in Workflow history. - * The `activityId` can be accessed by the activity function. - * Does not need to be unique. - * - * @default an incremental sequence number - */ - activityId?: string; - - /** - * Task queue name. - * - * @default current worker task queue - */ - taskQueue?: string; - - /** - * Heartbeat interval. Activity must heartbeat before this interval passes after a last heartbeat or activity start. - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - heartbeatTimeout?: Duration; - - /** - * RetryPolicy that define how activity is retried in case of failure. If this is not set, then the server-defined default activity retry policy will be used. To ensure zero retries, set maximum attempts to 1. - */ - retry?: RetryPolicy; - - /** - * Maximum time of a single Activity execution attempt. Note that the Temporal Server doesn't detect Worker process - * failures directly: instead, it relies on this timeout to detect that an Activity didn't complete on time. Therefore, this - * timeout should be as short as the longest possible execution of the Activity body. Potentially long-running - * Activities must specify {@link heartbeatTimeout} and call {@link activity.Context.heartbeat} periodically for - * timely failure detection. - * - * Either this option or {@link scheduleToCloseTimeout} is required. - * - * @default `scheduleToCloseTimeout` or unlimited - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - startToCloseTimeout?: Duration; - - /** - * Time that the Activity Task can stay in the Task Queue before it is picked up by a Worker. Do not specify this timeout unless using host-specific Task Queues for Activity Tasks are being used for routing. - * `scheduleToStartTimeout` is always non-retryable. Retrying after this timeout doesn't make sense as it would just put the Activity Task back into the same Task Queue. - * - * @default `scheduleToCloseTimeout` or unlimited - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - scheduleToStartTimeout?: Duration; - - /** - * Total time that a workflow is willing to wait for the Activity to complete. - * `scheduleToCloseTimeout` limits the total time of an Activity's execution including retries (use {@link startToCloseTimeout} to limit the time of a single attempt). - * - * Either this option or {@link startToCloseTimeout} is required. - * - * @default unlimited - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - scheduleToCloseTimeout?: Duration; - - /** - * Determines: - * - whether cancellation requests should be propagated from the current Workflow to the Activity; and - * - when should the Activity cancellation be reported to Workflow (i.e. at which moment should the - * Activity call's promise fail with an `ActivityFailure`, with `cause` set to a `CancelledFailure`). - * - * Note that this setting only applies to cancellation originating from cancellation being - * externally requested on the Workflow itself, or from internal cancellation of the - * `CancellationScope` in which the Activity call was made. Termination of a Workflow Execution - * always results in cancellation of its outstanding Activity executions, regardless of those - * Activities' {@link ActivityCancellationType} settings. - * - * @default ActivityCancellationType.WAIT_CANCELLATION_COMPLETED - */ - // MAINTENANCE: Keep this typedoc in sync with the `ActivityCancellationType` enum - cancellationType?: ActivityCancellationType; - - /** - * Eager dispatch is an optimization that improves the throughput and load on the server for scheduling Activities. - * When used, the server will hand out Activity tasks back to the Worker when it completes a Workflow task. - * It is available from server version 1.17 behind the `system.enableActivityEagerExecution` feature flag. - * - * Eager dispatch will only be used if `allowEagerDispatch` is enabled (the default) and {@link taskQueue} is either - * omitted or the same as the current Workflow. - * - * @default true - */ - allowEagerDispatch?: boolean; - - /** - * When using the Worker Versioning feature, specifies whether this Activity should run on a - * worker with a compatible Build Id or not. See {@link VersioningIntent}. - * - * @default 'COMPATIBLE' - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ - versioningIntent?: VersioningIntent; // eslint-disable-line @typescript-eslint/no-deprecated - - /** - * A fixed, single-line summary for this workflow execution that may appear in the UI/CLI. - * This can be in single-line Temporal markdown format. - * - * @experimental User metadata is a new API and susceptible to change. - */ - summary?: string; - - /** - * Priority of this activity - */ - priority?: Priority; -} - -/** - * Options for local activity invocation - */ -export interface LocalActivityOptions { - /** - * RetryPolicy that defines how an activity is retried in case of failure. If this is not set, then the SDK-defined default activity retry policy will be used. - * Note that local activities are always executed at least once, even if maximum attempts is set to 1 due to Workflow task retries. - */ - retry?: RetryPolicy; - - /** - * Maximum time the local activity is allowed to execute after the task is dispatched. This - * timeout is always retryable. - * - * Either this option or {@link scheduleToCloseTimeout} is required. - * If set, this must be <= {@link scheduleToCloseTimeout}, otherwise, it will be clamped down. - * - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - startToCloseTimeout?: Duration; - - /** - * Limits time the local activity can idle internally before being executed. That can happen if - * the worker is currently at max concurrent local activity executions. This timeout is always - * non retryable as all a retry would achieve is to put it back into the same queue. Defaults - * to {@link scheduleToCloseTimeout} if not specified and that is set. Must be <= - * {@link scheduleToCloseTimeout} when set, otherwise, it will be clamped down. - * - * @default unlimited - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - scheduleToStartTimeout?: Duration; - - /** - * Indicates how long the caller is willing to wait for local activity completion. Limits how - * long retries will be attempted. - * - * Either this option or {@link startToCloseTimeout} is required. - * - * @default unlimited - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - scheduleToCloseTimeout?: Duration; - - /** - * If the activity is retrying and backoff would exceed this value, a server side timer will be scheduled for the next attempt. - * Otherwise, backoff will happen internally in the SDK. - * - * @default 1 minute - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - **/ - localRetryThreshold?: Duration; - - /** - * Determines: - * - whether cancellation requests should be propagated from the current Workflow to the Activity; and - * - when should the Activity cancellation be reported to Workflow (i.e. at which moment should the - * Activity call's promise fail with an `ActivityFailure`, with `cause` set to a `CancelledFailure`). - * - * Note that this setting only applies to cancellation originating from cancellation being - * externally requested on the Workflow itself, or from internal cancellation of the - * `CancellationScope` in which the Activity call was made. Termination of a Workflow Execution - * always results in cancellation of its outstanding Activity executions, regardless of those - * Activities' {@link ActivityCancellationType} settings. - * - * @default ActivityCancellationType.WAIT_CANCELLATION_COMPLETED - */ - // MAINTENANCE: Keep this typedoc in sync with the `ActivityCancellationType` enum - cancellationType?: ActivityCancellationType; - - /** - * A fixed, single-line summary for this workflow execution that may appear in the UI/CLI. - * This can be in single-line Temporal markdown format. - * - * @experimental User metadata is a new API and susceptible to change. - */ - summary?: string; -} diff --git a/node_modules/@temporalio/common/src/continue-as-new.ts b/node_modules/@temporalio/common/src/continue-as-new.ts deleted file mode 100644 index 4faca9b..0000000 --- a/node_modules/@temporalio/common/src/continue-as-new.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { temporal } from '@temporalio/proto'; -import { makeProtoEnumConverters } from './internal-workflow'; - -/** - * Reason(s) why continue as new is suggested. Can potentially be multiple reasons. - * - * @experimental May be removed or changed in the future. - */ -export const SuggestContinueAsNewReason = { - HISTORY_SIZE_TOO_LARGE: 'HISTORY_SIZE_TOO_LARGE', - TOO_MANY_HISTORY_EVENTS: 'TOO_MANY_HISTORY_EVENTS', - TOO_MANY_UPDATES: 'TOO_MANY_UPDATES', -} as const; -export type SuggestContinueAsNewReason = (typeof SuggestContinueAsNewReason)[keyof typeof SuggestContinueAsNewReason]; - -// ts-prune-ignore-next -export const [encodeSuggestContinueAsNewReason, decodeSuggestContinueAsNewReason] = makeProtoEnumConverters< - temporal.api.enums.v1.SuggestContinueAsNewReason, - typeof temporal.api.enums.v1.SuggestContinueAsNewReason, - keyof typeof temporal.api.enums.v1.SuggestContinueAsNewReason, - typeof SuggestContinueAsNewReason, - 'SUGGEST_CONTINUE_AS_NEW_REASON_' ->( - { - [SuggestContinueAsNewReason.HISTORY_SIZE_TOO_LARGE]: 1, - [SuggestContinueAsNewReason.TOO_MANY_HISTORY_EVENTS]: 2, - [SuggestContinueAsNewReason.TOO_MANY_UPDATES]: 3, - UNSPECIFIED: 0, - } as const, - 'SUGGEST_CONTINUE_AS_NEW_REASON_' -); - -// ts-prune-ignore-next -export function suggestContinueAsNewReasonsFromProto( - reasons: temporal.api.enums.v1.SuggestContinueAsNewReason[] | null | undefined -): SuggestContinueAsNewReason[] | undefined { - if (reasons == null) { - return undefined; - } - - const res: SuggestContinueAsNewReason[] = []; - for (const r of reasons) { - const decoded = decodeSuggestContinueAsNewReason(r); - if (decoded !== undefined) { - res.push(decoded); - } - } - if (res.length === 0) { - return undefined; - } - return res; -} diff --git a/node_modules/@temporalio/common/src/converter/data-converter.ts b/node_modules/@temporalio/common/src/converter/data-converter.ts deleted file mode 100644 index 9fd4374..0000000 --- a/node_modules/@temporalio/common/src/converter/data-converter.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { DefaultFailureConverter, FailureConverter } from './failure-converter'; -import { PayloadCodec } from './payload-codec'; -import { defaultPayloadConverter, PayloadConverter } from './payload-converter'; - -/** - * When your data (arguments and return values) is sent over the wire and stored by Temporal Server, it is encoded in - * binary in a {@link Payload} Protobuf message. - * - * The default `DataConverter` supports `undefined`, `Uint8Array`, and JSON serializables (so if - * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description | `JSON.stringify(yourArgOrRetval)`} - * works, the default data converter will work). Protobufs are supported via - * {@link https://docs.temporal.io/typescript/data-converters#protobufs | this API}. - * - * Use a custom `DataConverter` to control the contents of your {@link Payload}s. Common reasons for using a custom - * `DataConverter` are: - * - Converting values that are not supported by the default `DataConverter` (for example, `JSON.stringify()` doesn't - * handle `BigInt`s, so if you want to return `{ total: 1000n }` from a Workflow, Signal, or Activity, you need your - * own `DataConverter`). - * - Encrypting values that may contain private information that you don't want stored in plaintext in Temporal Server's - * database. - * - Compressing values to reduce disk or network usage. - * - * To use your custom `DataConverter`, provide it to the {@link WorkflowClient}, {@link Worker}, and - * {@link bundleWorkflowCode} (if you use it): - * - `new WorkflowClient({ ..., dataConverter })` - * - `Worker.create({ ..., dataConverter })` - * - `bundleWorkflowCode({ ..., payloadConverterPath })` - */ -export interface DataConverter { - /** - * Path of a file that has a `payloadConverter` named export. - * `payloadConverter` should be an object that implements {@link PayloadConverter}. - * If no path is provided, {@link defaultPayloadConverter} is used. - */ - payloadConverterPath?: string; - - /** - * Path of a file that has a `failureConverter` named export. - * `failureConverter` should be an object that implements {@link FailureConverter}. - * If no path is provided, {@link defaultFailureConverter} is used. - */ - failureConverterPath?: string; - - /** - * An array of {@link PayloadCodec} instances. - * - * Payloads are encoded in the order of the array and decoded in the opposite order. For example, if you have a - * compression codec and an encryption codec, then you want data to be encoded with the compression codec first, so - * you'd do `payloadCodecs: [compressionCodec, encryptionCodec]`. - */ - payloadCodecs?: PayloadCodec[]; -} - -/** - * A {@link DataConverter} that has been loaded via {@link loadDataConverter}. - */ -export interface LoadedDataConverter { - payloadConverter: PayloadConverter; - failureConverter: FailureConverter; - payloadCodecs: PayloadCodec[]; -} - -/** - * The default {@link FailureConverter} used by the SDK. - * - * Error messages and stack traces are serizalized as plain text. - */ -export const defaultFailureConverter: FailureConverter = new DefaultFailureConverter(); - -/** - * A "loaded" data converter that uses the default set of failure and payload converters. - */ -export const defaultDataConverter: LoadedDataConverter = { - payloadConverter: defaultPayloadConverter, - failureConverter: defaultFailureConverter, - payloadCodecs: [], -}; diff --git a/node_modules/@temporalio/common/src/converter/failure-converter.ts b/node_modules/@temporalio/common/src/converter/failure-converter.ts deleted file mode 100644 index 2113826..0000000 --- a/node_modules/@temporalio/common/src/converter/failure-converter.ts +++ /dev/null @@ -1,510 +0,0 @@ -import * as nexus from 'nexus-rpc'; -import Long from 'long'; -import type { temporal } from '@temporalio/proto'; -import { - ActivityFailure, - ApplicationFailure, - CancelledFailure, - ChildWorkflowFailure, - decodeApplicationFailureCategory, - decodeRetryState, - decodeTimeoutType, - encodeApplicationFailureCategory, - encodeRetryState, - encodeTimeoutType, - FAILURE_SOURCE, - NexusOperationFailure, - ProtoFailure, - ServerFailure, - TemporalFailure, - TerminatedFailure, - TimeoutFailure, -} from '../failure'; -import { makeProtoEnumConverters } from '../internal-workflow'; -import { isError } from '../type-helpers'; -import { msOptionalToTs } from '../time'; -import { encode } from '../encoding'; -import { arrayFromPayloads, fromPayloadsAtIndex, PayloadConverter, toPayloads } from './payload-converter'; - -// Can't import proto enums into the workflow sandbox, use this helper type and enum converter instead. -const NexusHandlerErrorRetryBehavior = { - RETRYABLE: 'RETRYABLE', - NON_RETRYABLE: 'NON_RETRYABLE', -} as const; -type NexusHandlerErrorRetryBehavior = - (typeof NexusHandlerErrorRetryBehavior)[keyof typeof NexusHandlerErrorRetryBehavior]; - -const [encodeNexusHandlerErrorRetryBehavior, decodeNexusHandlerErrorRetryBehavior] = makeProtoEnumConverters< - temporal.api.enums.v1.NexusHandlerErrorRetryBehavior, - typeof temporal.api.enums.v1.NexusHandlerErrorRetryBehavior, - keyof typeof temporal.api.enums.v1.NexusHandlerErrorRetryBehavior, - typeof NexusHandlerErrorRetryBehavior, - 'NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_' ->( - { - UNSPECIFIED: 0, - [NexusHandlerErrorRetryBehavior.RETRYABLE]: 1, - [NexusHandlerErrorRetryBehavior.NON_RETRYABLE]: 2, - } as const, - 'NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_' -); - -function combineRegExp(...regexps: RegExp[]): RegExp { - return new RegExp(regexps.map((x) => `(?:${x.source})`).join('|')); -} - -/** - * Stack traces will be cutoff when on of these patterns is matched - */ -const CUTOFF_STACK_PATTERNS = combineRegExp( - /** Activity execution */ - /\s+at (Activity\.)?execute \(.*[\\/]worker[\\/](?:src|lib)[\\/]activity\.[jt]s:\d+:\d+\)/, - /** Nexus execution */ - /\s+at( async)? (NexusHandler\.)?invokeUserCode \(.*[\\/]worker[\\/](?:src|lib)[\\/]nexus[\\/]index\.[jt]s:\d+:\d+\)/, - /** Workflow activation (inbound handlers only) */ - /\s+at( async)? (Activator\.)?(startWorkflow|queryWorkflow|signalWorkflow|update|validateUpdate)NextHandler \(.*\.[jt]s:\d+:\d+\)/, - /** Workflow run anything in context */ - /\s+at (Script\.)?runInContext \(native|unknown|(?:(?:node:vm|vm\.js):\d+:\d+)\)/ -); - -/** - * Any stack trace frames that match any of those wil be dopped. - * The "null." prefix on some cases is to avoid https://github.com/nodejs/node/issues/42417 - */ -const DROPPED_STACK_FRAMES_PATTERNS = combineRegExp( - /** Internal functions used to recursively chain interceptors */ - /\s+at (null\.)?next \(.*[\\/]common[\\/](?:src|lib)[\\/]interceptors\.[jt]s:\d+:\d+\)/, - /** Internal functions used to recursively chain interceptors */ - /\s+at (null\.)?executeNextHandler \(.*[\\/]worker[\\/](?:src|lib)[\\/]activity\.[jt]s:\d+:\d+\)/ -); - -/** - * Cuts out the framework part of a stack trace, leaving only user code entries - */ -export function cutoffStackTrace(stack?: string): string { - const lines = (stack ?? '').split(/\r?\n/); - const acc = Array(); - for (const line of lines) { - if (CUTOFF_STACK_PATTERNS.test(line)) break; - if (!DROPPED_STACK_FRAMES_PATTERNS.test(line)) acc.push(line); - } - return acc.join('\n'); -} - -/** - * A `FailureConverter` is responsible for converting from proto `Failure` instances to JS `Errors` and back. - * - * We recommended using the {@link DefaultFailureConverter} instead of customizing the default implementation in order - * to maintain cross-language Failure serialization compatibility. - */ -export interface FailureConverter { - /** - * Converts a caught error to a Failure proto message. - */ - errorToFailure(err: unknown, payloadConverter: PayloadConverter): ProtoFailure; - - /** - * Converts a Failure proto message to a JS Error object. - * - * The returned error must be an instance of `TemporalFailure`. - */ - failureToError(err: ProtoFailure, payloadConverter: PayloadConverter): Error; -} - -/** - * The "shape" of the attributes set as the {@link ProtoFailure.encodedAttributes} payload in case - * {@link DefaultEncodedFailureAttributes.encodeCommonAttributes} is set to `true`. - */ -export interface DefaultEncodedFailureAttributes { - message: string; - stack_trace: string; -} - -/** - * Options for the {@link DefaultFailureConverter} constructor. - */ -export interface DefaultFailureConverterOptions { - /** - * Whether to encode error messages and stack traces (for encrypting these attributes use a {@link PayloadCodec}). - */ - encodeCommonAttributes: boolean; -} - -/** - * Default, cross-language-compatible Failure converter. - * - * By default, it will leave error messages and stack traces as plain text. In order to encrypt them, set - * `encodeCommonAttributes` to `true` in the constructor options and use a {@link PayloadCodec} that can encrypt / - * decrypt Payloads in your {@link WorkerOptions.dataConverter | Worker} and - * {@link ClientOptions.dataConverter | Client options}. - */ -export class DefaultFailureConverter implements FailureConverter { - public readonly options: DefaultFailureConverterOptions; - - constructor(options?: Partial) { - const { encodeCommonAttributes } = options ?? {}; - this.options = { - encodeCommonAttributes: encodeCommonAttributes ?? false, - }; - } - - /** - * Converts a Failure proto message to a JS Error object. - * - * Does not set common properties, that is done in {@link failureToError}. - */ - failureToErrorInner(failure: ProtoFailure, payloadConverter: PayloadConverter): Error { - if (failure.applicationFailureInfo) { - return new ApplicationFailure( - failure.message ?? undefined, - failure.applicationFailureInfo.type, - Boolean(failure.applicationFailureInfo.nonRetryable), - arrayFromPayloads(payloadConverter, failure.applicationFailureInfo.details?.payloads), - this.optionalFailureToOptionalError(failure.cause, payloadConverter), - undefined, - decodeApplicationFailureCategory(failure.applicationFailureInfo.category) - ); - } - if (failure.serverFailureInfo) { - return new ServerFailure( - failure.message ?? undefined, - Boolean(failure.serverFailureInfo.nonRetryable), - this.optionalFailureToOptionalError(failure.cause, payloadConverter) - ); - } - if (failure.timeoutFailureInfo) { - return new TimeoutFailure( - failure.message ?? undefined, - fromPayloadsAtIndex(payloadConverter, 0, failure.timeoutFailureInfo.lastHeartbeatDetails?.payloads), - decodeTimeoutType(failure.timeoutFailureInfo.timeoutType) - ); - } - if (failure.terminatedFailureInfo) { - return new TerminatedFailure( - failure.message ?? undefined, - this.optionalFailureToOptionalError(failure.cause, payloadConverter) - ); - } - if (failure.canceledFailureInfo) { - return new CancelledFailure( - failure.message ?? undefined, - arrayFromPayloads(payloadConverter, failure.canceledFailureInfo.details?.payloads), - this.optionalFailureToOptionalError(failure.cause, payloadConverter) - ); - } - if (failure.resetWorkflowFailureInfo) { - return new ApplicationFailure( - failure.message ?? undefined, - 'ResetWorkflow', - false, - arrayFromPayloads(payloadConverter, failure.resetWorkflowFailureInfo.lastHeartbeatDetails?.payloads), - this.optionalFailureToOptionalError(failure.cause, payloadConverter) - ); - } - if (failure.childWorkflowExecutionFailureInfo) { - const { namespace, workflowType, workflowExecution, retryState } = failure.childWorkflowExecutionFailureInfo; - if (!(workflowType?.name && workflowExecution)) { - throw new TypeError('Missing attributes on childWorkflowExecutionFailureInfo'); - } - return new ChildWorkflowFailure( - namespace ?? undefined, - workflowExecution, - workflowType.name, - decodeRetryState(retryState), - this.optionalFailureToOptionalError(failure.cause, payloadConverter) - ); - } - if (failure.activityFailureInfo) { - if (!failure.activityFailureInfo.activityType?.name) { - throw new TypeError('Missing activityType?.name on activityFailureInfo'); - } - return new ActivityFailure( - failure.message ?? undefined, - failure.activityFailureInfo.activityType.name, - failure.activityFailureInfo.activityId ?? undefined, - decodeRetryState(failure.activityFailureInfo.retryState), - failure.activityFailureInfo.identity ?? undefined, - this.optionalFailureToOptionalError(failure.cause, payloadConverter) - ); - } - if (failure.nexusHandlerFailureInfo) { - let retryableOverride: boolean | undefined = undefined; - const retryBehavior = decodeNexusHandlerErrorRetryBehavior(failure.nexusHandlerFailureInfo.retryBehavior); - switch (retryBehavior) { - case 'RETRYABLE': - retryableOverride = true; - break; - case 'NON_RETRYABLE': - retryableOverride = false; - break; - } - - const rawErrorType = failure.nexusHandlerFailureInfo.type || ''; - const resolvedType: nexus.HandlerErrorType = Object.hasOwn(nexus.HandlerErrorType, rawErrorType) - ? nexus.HandlerErrorType[rawErrorType as keyof typeof nexus.HandlerErrorType] - : 'UNKNOWN'; - - return new nexus.HandlerError(resolvedType, failure.message ?? 'Nexus handler error', { - cause: this.optionalFailureToOptionalError(failure.cause, payloadConverter), - retryableOverride, - rawErrorType, - originalFailure: this.temporalFailureToNexusFailure(failure), - }); - } - if (failure.nexusOperationExecutionFailureInfo) { - return new NexusOperationFailure( - // TODO(nexus/error): Maybe set a default message here, once we've decided on error handling. - failure.message ?? undefined, - failure.nexusOperationExecutionFailureInfo.scheduledEventId?.toNumber(), - // We assume these will always be set or gracefully set to empty strings. - failure.nexusOperationExecutionFailureInfo.endpoint ?? '', - failure.nexusOperationExecutionFailureInfo.service ?? '', - failure.nexusOperationExecutionFailureInfo.operation ?? '', - failure.nexusOperationExecutionFailureInfo.operationToken ?? undefined, - this.optionalFailureToOptionalError(failure.cause, payloadConverter) - ); - } - return new TemporalFailure( - failure.message ?? undefined, - this.optionalFailureToOptionalError(failure.cause, payloadConverter) - ); - } - - failureToError(failure: ProtoFailure, payloadConverter: PayloadConverter): Error { - if (failure.encodedAttributes) { - const attrs = payloadConverter.fromPayload(failure.encodedAttributes); - // Don't apply encodedAttributes unless they conform to an expected schema - if (typeof attrs === 'object' && attrs !== null) { - const { message, stack_trace } = attrs; - // Avoid mutating the argument - failure = { ...failure }; - if (typeof message === 'string') { - failure.message = message; - } - if (typeof stack_trace === 'string') { - failure.stackTrace = stack_trace; - } - } - } - const err = this.failureToErrorInner(failure, payloadConverter); - err.stack = failure.stackTrace ?? ''; - if (err instanceof TemporalFailure) { - err.failure = failure; - } - return err; - } - - errorToFailure(err: unknown, payloadConverter: PayloadConverter): ProtoFailure { - const failure = this.errorToFailureInner(err, payloadConverter); - if (this.options.encodeCommonAttributes) { - const { message, stackTrace } = failure; - failure.message = 'Encoded failure'; - failure.stackTrace = ''; - failure.encodedAttributes = payloadConverter.toPayload({ message, stack_trace: stackTrace }); - } - return failure; - } - - errorToFailureInner(err: unknown, payloadConverter: PayloadConverter): ProtoFailure { - if (err instanceof TemporalFailure || err instanceof nexus.HandlerError) { - if (err instanceof TemporalFailure && err.failure) return err.failure; - const base = { - message: err.message, - stackTrace: cutoffStackTrace(err.stack), - cause: this.optionalErrorToOptionalFailure(err.cause, payloadConverter), - source: FAILURE_SOURCE, - }; - - if (err instanceof ActivityFailure) { - return { - ...base, - activityFailureInfo: { - ...err, - retryState: encodeRetryState(err.retryState), - activityType: { name: err.activityType }, - }, - }; - } - if (err instanceof ChildWorkflowFailure) { - return { - ...base, - childWorkflowExecutionFailureInfo: { - ...err, - retryState: encodeRetryState(err.retryState), - workflowExecution: err.execution, - workflowType: { name: err.workflowType }, - }, - }; - } - if (err instanceof ApplicationFailure) { - return { - ...base, - applicationFailureInfo: { - type: err.type, - nonRetryable: err.nonRetryable, - details: - err.details && err.details.length - ? { payloads: toPayloads(payloadConverter, ...err.details) } - : undefined, - nextRetryDelay: msOptionalToTs(err.nextRetryDelay), - category: encodeApplicationFailureCategory(err.category), - }, - }; - } - if (err instanceof CancelledFailure) { - return { - ...base, - canceledFailureInfo: { - details: - err.details && err.details.length - ? { payloads: toPayloads(payloadConverter, ...err.details) } - : undefined, - }, - }; - } - if (err instanceof TimeoutFailure) { - return { - ...base, - timeoutFailureInfo: { - timeoutType: encodeTimeoutType(err.timeoutType), - lastHeartbeatDetails: err.lastHeartbeatDetails - ? { payloads: toPayloads(payloadConverter, err.lastHeartbeatDetails) } - : undefined, - }, - }; - } - if (err instanceof ServerFailure) { - return { - ...base, - serverFailureInfo: { nonRetryable: err.nonRetryable }, - }; - } - if (err instanceof TerminatedFailure) { - return { - ...base, - terminatedFailureInfo: {}, - }; - } - if (err instanceof nexus.HandlerError) { - if (err.originalFailure) { - return this.nexusFailureToTemporalFailure(err.originalFailure, err.retryable); - } else { - let retryBehavior: temporal.api.enums.v1.NexusHandlerErrorRetryBehavior | undefined = undefined; - switch (err.retryableOverride) { - case true: - retryBehavior = encodeNexusHandlerErrorRetryBehavior('RETRYABLE'); - break; - case false: - retryBehavior = encodeNexusHandlerErrorRetryBehavior('NON_RETRYABLE'); - break; - } - - return { - ...base, - nexusHandlerFailureInfo: { - type: err.type, - retryBehavior, - }, - }; - } - } - if (err instanceof NexusOperationFailure) { - return { - ...base, - nexusOperationExecutionFailureInfo: { - scheduledEventId: err.scheduledEventId ? Long.fromNumber(err.scheduledEventId) : undefined, - endpoint: err.endpoint, - service: err.service, - operation: err.operation, - operationToken: err.operationToken, - }, - }; - } - // Just a TemporalFailure - return base; - } - - const base = { - source: FAILURE_SOURCE, - }; - - if (isError(err)) { - return { - ...base, - message: String(err.message ?? ''), - stackTrace: cutoffStackTrace(err.stack), - cause: this.optionalErrorToOptionalFailure((err as any).cause, payloadConverter), - }; - } - - const recommendation = ` [A non-Error value was thrown from your code. We recommend throwing Error objects so that we can provide a stack trace]`; - - if (typeof err === 'string') { - return { ...base, message: err + recommendation }; - } - if (typeof err === 'object') { - let message = ''; - try { - message = JSON.stringify(err); - } catch (_err) { - message = String(err); - } - return { ...base, message: message + recommendation }; - } - - return { ...base, message: String(err) + recommendation }; - } - - /** - * Converts a Failure proto message to a JS Error object if defined or returns undefined. - */ - optionalFailureToOptionalError( - failure: ProtoFailure | undefined | null, - payloadConverter: PayloadConverter - ): Error | undefined { - return failure ? this.failureToError(failure, payloadConverter) : undefined; - } - - /** - * Converts an error to a Failure proto message if defined or returns undefined - */ - optionalErrorToOptionalFailure(err: unknown, payloadConverter: PayloadConverter): ProtoFailure | undefined { - return err ? this.errorToFailure(err, payloadConverter) : undefined; - } - - private nexusFailureToTemporalFailure(failure: nexus.Failure, retryable: boolean): ProtoFailure { - if (failure.metadata?.type === 'temporal.api.failure.v1.Failure') { - if (failure.details == null) { - throw new TypeError("missing details for Nexus Failure of type 'temporal.api.failure.v1.Failure'"); - } - return failure.details; - } else { - const temporalFailure: ProtoFailure = {}; - temporalFailure.applicationFailureInfo = { - type: 'NexusFailure', - nonRetryable: !retryable, - details: { - payloads: [ - { - metadata: { encoding: encode('json/plain') }, - data: encode(JSON.stringify({ ...failure, message: '' })), - }, - ], - }, - }; - temporalFailure.message = failure.message; - temporalFailure.stackTrace = failure.stackTrace ?? ''; - return temporalFailure; - } - } - - private temporalFailureToNexusFailure(failure: ProtoFailure): nexus.Failure { - return { - message: failure.message ?? '', - metadata: { type: 'temporal.api.failure.v1.Failure' }, - // Store the full ProtoFailure as the Nexus failure details so it can be round-tripped - // losslessly back to a ProtoFailure via nexusFailureToTemporalFailure. - details: { ...failure }, - }; - } -} diff --git a/node_modules/@temporalio/common/src/converter/payload-codec.ts b/node_modules/@temporalio/common/src/converter/payload-codec.ts deleted file mode 100644 index 8562fa4..0000000 --- a/node_modules/@temporalio/common/src/converter/payload-codec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Payload } from '../interfaces'; - -/** - * `PayloadCodec` is an optional step that happens between the wire and the {@link PayloadConverter}: - * - * Temporal Server <--> Wire <--> `PayloadCodec` <--> `PayloadConverter` <--> User code - * - * Implement this to transform an array of {@link Payload}s to/from the format sent over the wire and stored by Temporal Server. - * Common transformations are encryption and compression. - */ -export interface PayloadCodec { - /** - * Encode an array of {@link Payload}s for sending over the wire. - * @param payloads May have length 0. - */ - encode(payloads: Payload[]): Promise; - - /** - * Decode an array of {@link Payload}s received from the wire. - */ - decode(payloads: Payload[]): Promise; -} diff --git a/node_modules/@temporalio/common/src/converter/payload-converter.ts b/node_modules/@temporalio/common/src/converter/payload-converter.ts deleted file mode 100644 index ba8b7dc..0000000 --- a/node_modules/@temporalio/common/src/converter/payload-converter.ts +++ /dev/null @@ -1,337 +0,0 @@ -import { decode, encode } from '../encoding'; -import { PayloadConverterError, ValueError } from '../errors'; -import { Payload } from '../interfaces'; -import { encodingKeys, encodingTypes, METADATA_ENCODING_KEY } from './types'; - -/** - * Used by the framework to serialize/deserialize data like parameters and return values. - * - * This is called inside the {@link https://docs.temporal.io/typescript/determinism | Workflow isolate}. - * To write async code or use Node APIs (or use packages that use Node APIs), use a {@link PayloadCodec}. - */ -export interface PayloadConverter { - /** - * Converts a value to a {@link Payload}. - * - * @param value The value to convert. Example values include the Workflow args sent from the Client and the values returned by a Workflow or Activity. - * - * @returns The {@link Payload}. - * - * Should throw {@link ValueError} if unable to convert. - */ - toPayload(value: T): Payload; - - /** - * Converts a {@link Payload} back to a value. - */ - fromPayload(payload: Payload): T; -} - -/** - * Implements conversion of a list of values. - * - * @param converter - * @param values JS values to convert to Payloads - * @return list of {@link Payload}s - * @throws {@link ValueError} if conversion of the value passed as parameter failed for any - * reason. - */ -export function toPayloads(converter: PayloadConverter, ...values: unknown[]): Payload[] | undefined { - if (values.length === 0) { - return undefined; - } - - return values.map((value) => converter.toPayload(value)); -} - -/** - * Run {@link PayloadConverter.toPayload} on an optional value, and then encode it. - */ -export function convertOptionalToPayload( - payloadConverter: PayloadConverter, - value: unknown -): Payload | null | undefined { - if (value == null) return value; - - return payloadConverter.toPayload(value); -} - -/** - * Run {@link PayloadConverter.toPayload} on each value in the map. - * - * @throws {@link ValueError} if conversion of any value in the map fails - */ -export function mapToPayloads( - converter: PayloadConverter, - map: Record -): Record { - return Object.fromEntries( - Object.entries(map).map(([k, v]): [K, Payload] => [k as K, converter.toPayload(v)]) - ) as Record; -} - -/** - * Implements conversion of an array of values of different types. Useful for deserializing - * arguments of function invocations. - * - * @param converter - * @param index index of the value in the payloads - * @param payloads serialized value to convert to JS values. - * @return converted JS value - * @throws {@link PayloadConverterError} if conversion of the data passed as parameter failed for any - * reason. - */ -export function fromPayloadsAtIndex(converter: PayloadConverter, index: number, payloads?: Payload[] | null): T { - // To make adding arguments a backwards compatible change - if (payloads === undefined || payloads === null || index >= payloads.length) { - return undefined as any; - } - const payload = payloads?.[index]; - if (!payload) { - return undefined as any; - } - return converter.fromPayload(payload); -} - -/** - * Run {@link PayloadConverter.fromPayload} on each value in the array. - */ -export function arrayFromPayloads(converter: PayloadConverter, payloads?: Payload[] | null): unknown[] { - if (!payloads) { - return []; - } - return payloads.map((payload: Payload) => converter.fromPayload(payload)); -} - -export function mapFromPayloads( - converter: PayloadConverter, - map?: Record | null | undefined -): Record | undefined { - if (map == null) return undefined; - return Object.fromEntries( - Object.entries(map).map(([k, payload]): [K, unknown] => { - const value = converter.fromPayload(payload as Payload); - return [k as K, value]; - }) - ) as Record; -} - -export declare const rawPayloadTypeBrand: unique symbol; -/** - * RawValue is a wrapper over a payload. - * A payload that belongs to a RawValue is special in that it bypasses user-defined payload converters, - * instead using the default payload converter. The payload still undergoes codec conversion. - */ -export class RawValue { - private readonly _payload: Payload; - private readonly [rawPayloadTypeBrand]: T = undefined as T; - - constructor(value: T, payloadConverter: PayloadConverter = defaultPayloadConverter) { - this._payload = payloadConverter.toPayload(value); - } - - static fromPayload(p: Payload): RawValue { - return new RawValue(p, identityPayloadConverter); - } - - get payload(): Payload { - return this._payload; - } -} - -export interface PayloadConverterWithEncoding { - /** - * Converts a value to a {@link Payload}. - * - * @param value The value to convert. Example values include the Workflow args sent from the Client and the values returned by a Workflow or Activity. - * @returns The {@link Payload}, or `undefined` if unable to convert. - */ - toPayload(value: T): Payload | undefined; - - /** - * Converts a {@link Payload} back to a value. - */ - fromPayload(payload: Payload): T; - - readonly encodingType: string; -} - -/** - * Tries to convert values to {@link Payload}s using the {@link PayloadConverterWithEncoding}s provided to the constructor, in the order provided. - * - * Converts Payloads to values based on the `Payload.metadata.encoding` field, which matches the {@link PayloadConverterWithEncoding.encodingType} - * of the converter that created the Payload. - */ -export class CompositePayloadConverter implements PayloadConverter { - readonly converters: PayloadConverterWithEncoding[]; - readonly converterByEncoding: Map = new Map(); - - constructor(...converters: PayloadConverterWithEncoding[]) { - if (converters.length === 0) { - throw new PayloadConverterError('Must provide at least one PayloadConverterWithEncoding'); - } - - this.converters = converters; - for (const converter of converters) { - this.converterByEncoding.set(converter.encodingType, converter); - } - } - - /** - * Tries to run `.toPayload(value)` on each converter in the order provided at construction. - * Returns the first successful result, throws {@link ValueError} if there is no converter that can handle the value. - */ - public toPayload(value: T): Payload { - if (value instanceof RawValue) { - return value.payload; - } - for (const converter of this.converters) { - const result = converter.toPayload(value); - if (result !== undefined) { - return result; - } - } - - throw new ValueError(`Unable to convert ${value} to payload`); - } - - /** - * Run {@link PayloadConverterWithEncoding.fromPayload} based on the `encoding` metadata of the {@link Payload}. - */ - public fromPayload(payload: Payload): T { - if (payload.metadata === undefined || payload.metadata === null) { - throw new ValueError('Missing payload metadata'); - } - - const encoding = decode(payload.metadata[METADATA_ENCODING_KEY]!); - const converter = this.converterByEncoding.get(encoding); - if (converter === undefined) { - throw new ValueError(`Unknown encoding: ${encoding}`); - } - return converter.fromPayload(payload); - } -} - -/** - * Converts between JS undefined and NULL Payload - */ -export class UndefinedPayloadConverter implements PayloadConverterWithEncoding { - public encodingType = encodingTypes.METADATA_ENCODING_NULL; - - public toPayload(value: unknown): Payload | undefined { - if (value !== undefined) { - return undefined; - } - - return { - metadata: { - [METADATA_ENCODING_KEY]: encodingKeys.METADATA_ENCODING_NULL, - }, - }; - } - - public fromPayload(_content: Payload): T { - return undefined as any; // Just return undefined - } -} - -/** - * Converts between binary data types and RAW Payload - */ -export class BinaryPayloadConverter implements PayloadConverterWithEncoding { - public encodingType = encodingTypes.METADATA_ENCODING_RAW; - - public toPayload(value: unknown): Payload | undefined { - if (!(value instanceof Uint8Array)) { - return undefined; - } - - return { - metadata: { - [METADATA_ENCODING_KEY]: encodingKeys.METADATA_ENCODING_RAW, - }, - data: value, - }; - } - - public fromPayload(content: Payload): T { - return ( - // Wrap with Uint8Array from this context to ensure `instanceof` works - ( - content.data ? new Uint8Array(content.data.buffer, content.data.byteOffset, content.data.length) : content.data - ) as any - ); - } -} - -/** - * Converts between non-undefined values and serialized JSON Payload - */ -export class JsonPayloadConverter implements PayloadConverterWithEncoding { - public encodingType = encodingTypes.METADATA_ENCODING_JSON; - - public toPayload(value: unknown): Payload | undefined { - if (value === undefined) { - return undefined; - } - - let json; - try { - json = JSON.stringify(value); - } catch (_err) { - return undefined; - } - - return { - metadata: { - [METADATA_ENCODING_KEY]: encodingKeys.METADATA_ENCODING_JSON, - }, - data: encode(json), - }; - } - - public fromPayload(content: Payload): T { - if (content.data === undefined || content.data === null) { - throw new ValueError('Got payload with no data'); - } - return JSON.parse(decode(content.data)); - } -} - -export class DefaultPayloadConverter extends CompositePayloadConverter { - // Match the order used in other SDKs, but exclude Protobuf converters so that the code, including - // `proto3-json-serializer`, doesn't take space in Workflow bundles that don't use Protobufs. To use Protobufs, use - // {@link DefaultPayloadConverterWithProtobufs}. - // - // Go SDK: - // https://github.com/temporalio/sdk-go/blob/5e5645f0c550dcf717c095ae32c76a7087d2e985/converter/default_data_converter.go#L28 - constructor() { - super(new UndefinedPayloadConverter(), new BinaryPayloadConverter(), new JsonPayloadConverter()); - } -} - -/** - * The default {@link PayloadConverter} used by the SDK. Supports `Uint8Array` and JSON serializables (so if - * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description | `JSON.stringify(yourArgOrRetval)`} - * works, the default payload converter will work). - * - * To also support Protobufs, create a custom payload converter with {@link DefaultPayloadConverter}: - * - * `const myConverter = new DefaultPayloadConverter({ protobufRoot })` - */ -export const defaultPayloadConverter = new DefaultPayloadConverter(); - -/** - * The identity payload converter returns the inputs it was given. - */ -class IdentityPayloadConverter implements PayloadConverter { - toPayload(value: T): Payload { - return value as Payload; - } - - fromPayload(payload: Payload): T { - return payload as T; - } -} - -const identityPayloadConverter = new IdentityPayloadConverter(); diff --git a/node_modules/@temporalio/common/src/converter/payload-search-attributes.ts b/node_modules/@temporalio/common/src/converter/payload-search-attributes.ts deleted file mode 100644 index 06553ee..0000000 --- a/node_modules/@temporalio/common/src/converter/payload-search-attributes.ts +++ /dev/null @@ -1,220 +0,0 @@ -import { decode, encode } from '../encoding'; -import { ValueError } from '../errors'; -import { Payload } from '../interfaces'; -import { - TypedSearchAttributes, - SearchAttributeType, - SearchAttributes, - isValidValueForType, - TypedSearchAttributeValue, - SearchAttributePair, - SearchAttributeUpdatePair, - TypedSearchAttributeUpdateValue, -} from '../search-attributes'; -import { PayloadConverter, JsonPayloadConverter, mapFromPayloads, mapToPayloads } from './payload-converter'; - -/** - * Converts Search Attribute values using JsonPayloadConverter - */ -export class SearchAttributePayloadConverter implements PayloadConverter { - jsonConverter = new JsonPayloadConverter(); - validNonDateTypes = ['string', 'number', 'boolean']; - - public toPayload(values: unknown): Payload { - if (!Array.isArray(values)) { - throw new ValueError(`SearchAttribute value must be an array`); - } - - if (values.length > 0) { - const firstValue = values[0]; - const firstType = typeof firstValue; - if (firstType === 'object') { - for (const [idx, value] of values.entries()) { - if (!(value instanceof Date)) { - throw new ValueError( - `SearchAttribute values must arrays of strings, numbers, booleans, or Dates. The value ${value} at index ${idx} is of type ${typeof value}` - ); - } - } - } else { - if (!this.validNonDateTypes.includes(firstType)) { - throw new ValueError(`SearchAttribute array values must be: string | number | boolean | Date`); - } - - for (const [idx, value] of values.entries()) { - if (typeof value !== firstType) { - throw new ValueError( - `All SearchAttribute array values must be of the same type. The first value ${firstValue} of type ${firstType} doesn't match value ${value} of type ${typeof value} at index ${idx}` - ); - } - } - } - } - - // JSON.stringify takes care of converting Dates to ISO strings - const ret = this.jsonConverter.toPayload(values); - if (ret === undefined) { - throw new ValueError('Could not convert search attributes to payloads'); - } - return ret; - } - - /** - * Datetime Search Attribute values are converted to `Date`s - */ - public fromPayload(payload: Payload): T { - if (payload.metadata == null) { - throw new ValueError('Missing payload metadata'); - } - - const value = this.jsonConverter.fromPayload(payload); - let arrayWrappedValue = Array.isArray(value) ? value : [value]; - const searchAttributeType = payload.metadata.type ? decode(payload.metadata.type) : undefined; - if (searchAttributeType === 'Datetime') { - arrayWrappedValue = arrayWrappedValue.map((dateString) => new Date(dateString)); - } - return arrayWrappedValue as unknown as T; - } -} - -export const searchAttributePayloadConverter = new SearchAttributePayloadConverter(); - -export class TypedSearchAttributePayloadConverter implements PayloadConverter { - jsonConverter = new JsonPayloadConverter(); - - public toPayload(attr: T): Payload { - if (!(attr instanceof TypedSearchAttributeValue || attr instanceof TypedSearchAttributeUpdateValue)) { - throw new ValueError( - `Expect input to be instance of TypedSearchAttributeValue or TypedSearchAttributeUpdateValue, got: ${JSON.stringify( - attr - )}` - ); - } - - // We check for deletion as well as regular typed search attributes. - if (attr.value !== null && !isValidValueForType(attr.type, attr.value)) { - throw new ValueError(`Invalid search attribute value ${attr.value} for given type ${attr.type}`); - } - - // For server search attributes to work properly, we cannot set the metadata - // type when we set null - if (attr.value === null) { - const payload = this.jsonConverter.toPayload(attr.value); - if (payload === undefined) { - throw new ValueError('Could not convert typed search attribute to payload'); - } - return payload; - } - - // JSON.stringify takes care of converting Dates to ISO strings - const payload = this.jsonConverter.toPayload(attr.value); - if (payload === undefined) { - throw new ValueError('Could not convert typed search attribute to payload'); - } - - // Note: this shouldn't be the case but the compiler complains without this check. - if (payload.metadata == null) { - throw new ValueError('Missing payload metadata'); - } - // Add encoded type of search attribute to metatdata - payload.metadata['type'] = encode(TypedSearchAttributes.toMetadataType(attr.type)); - return payload; - } - - // Note: type casting undefined values is not clear to caller. - // We can't change the typing of the method to return undefined, it's not allowed by the interface. - public fromPayload(payload: Payload): T { - if (payload.metadata == null) { - throw new ValueError('Missing payload metadata'); - } - - // If no 'type' metadata field or no given value, we skip. - if (payload.metadata.type == null) { - return undefined as T; - } - const type = TypedSearchAttributes.toSearchAttributeType(decode(payload.metadata.type)); - // Unrecognized metadata type (sanity check). - if (type === undefined) { - return undefined as T; - } - - let value = this.jsonConverter.fromPayload(payload); - - // Handle legacy values without KEYWORD_LIST type. - if (type !== SearchAttributeType.KEYWORD_LIST && Array.isArray(value)) { - // Cannot have an array with multiple values for non-KEYWORD_LIST type. - if (value.length > 1) { - return undefined as T; - } - // Unpack single value array. - value = value[0]; - } - if (type === SearchAttributeType.DATETIME && value) { - value = new Date(value as string); - } - // Check if the value is a valid for the given type. If not, skip. - if (!isValidValueForType(type, value)) { - return undefined as T; - } - return new TypedSearchAttributeValue(type, value) as T; - } -} - -export const typedSearchAttributePayloadConverter = new TypedSearchAttributePayloadConverter(); - -// If both params are provided, conflicting keys will be overwritten by typedSearchAttributes. -export function encodeUnifiedSearchAttributes( - searchAttributes?: SearchAttributes, // eslint-disable-line @typescript-eslint/no-deprecated - typedSearchAttributes?: TypedSearchAttributes | SearchAttributeUpdatePair[] -): Record { - return { - ...(searchAttributes ? mapToPayloads(searchAttributePayloadConverter, searchAttributes) : {}), - ...(typedSearchAttributes - ? mapToPayloads>( - typedSearchAttributePayloadConverter, - Object.fromEntries( - (Array.isArray(typedSearchAttributes) ? typedSearchAttributes : typedSearchAttributes.getAll()).map( - (pair) => { - return [pair.key.name, new TypedSearchAttributeUpdateValue(pair.key.type, pair.value)]; - } - ) - ) - ) - : {}), - }; -} - -// eslint-disable-next-line @typescript-eslint/no-deprecated -export function decodeSearchAttributes(indexedFields: Record | undefined | null): SearchAttributes { - if (!indexedFields) return {}; - return Object.fromEntries( - // eslint-disable-next-line @typescript-eslint/no-deprecated - Object.entries(mapFromPayloads(searchAttributePayloadConverter, indexedFields) as SearchAttributes).filter( - ([_, v]) => v && v.length > 0 - ) // Filter out empty arrays returned by pre 1.18 servers - ); -} - -export function decodeTypedSearchAttributes( - indexedFields: Record | undefined | null -): TypedSearchAttributes { - return new TypedSearchAttributes( - Object.entries( - mapFromPayloads | undefined>( - typedSearchAttributePayloadConverter, - indexedFields - ) ?? {} - ).reduce((acc, [k, attr]) => { - // Filter out undefined values from converter. - if (!attr) { - return acc; - } - const key = { name: k, type: attr.type }; - // Ensure is valid pair. - if (isValidValueForType(key.type, attr.value)) { - acc.push({ key, value: attr.value } as SearchAttributePair); - } - return acc; - }, []) - ); -} diff --git a/node_modules/@temporalio/common/src/converter/protobuf-payload-converters.ts b/node_modules/@temporalio/common/src/converter/protobuf-payload-converters.ts deleted file mode 100644 index bcc5135..0000000 --- a/node_modules/@temporalio/common/src/converter/protobuf-payload-converters.ts +++ /dev/null @@ -1,243 +0,0 @@ -import * as protoJsonSerializer from 'proto3-json-serializer'; -import type { Message, Namespace, Root, Type } from 'protobufjs'; -import { decode, encode } from '../encoding'; -import { PayloadConverterError, ValueError } from '../errors'; -import { Payload } from '../interfaces'; -import { errorMessage, hasOwnProperties, hasOwnProperty, isRecord } from '../type-helpers'; -import { - BinaryPayloadConverter, - CompositePayloadConverter, - JsonPayloadConverter, - PayloadConverterWithEncoding, - UndefinedPayloadConverter, -} from './payload-converter'; - -import { encodingTypes, METADATA_ENCODING_KEY, METADATA_MESSAGE_TYPE_KEY } from './types'; - -const GLOBAL_BUFFER = globalThis.constructor.constructor('return globalThis.Buffer')(); - -abstract class ProtobufPayloadConverter implements PayloadConverterWithEncoding { - protected readonly root: Root | undefined; - public abstract encodingType: string; - - public abstract toPayload(value: T): Payload | undefined; - public abstract fromPayload(payload: Payload): T; - - // Don't use type Root here because root.d.ts doesn't export Root, so users would have to type assert - constructor(root?: unknown) { - if (root) { - if (!isRoot(root)) { - throw new TypeError('root must be an instance of a protobufjs Root'); - } - - this.root = root; - } - } - - protected validatePayload(content: Payload): { messageType: Type; data: Uint8Array } { - if (content.data === undefined || content.data === null) { - throw new ValueError('Got payload with no data'); - } - if (!content.metadata || !(METADATA_MESSAGE_TYPE_KEY in content.metadata)) { - throw new ValueError(`Got protobuf payload without metadata.${METADATA_MESSAGE_TYPE_KEY}`); - } - if (!this.root) { - throw new PayloadConverterError('Unable to deserialize protobuf message without `root` being provided'); - } - - const messageTypeName = decode(content.metadata[METADATA_MESSAGE_TYPE_KEY]); - let messageType; - try { - messageType = this.root.lookupType(messageTypeName); - } catch (e) { - if (errorMessage(e)?.includes('no such type')) { - throw new PayloadConverterError( - `Got a \`${messageTypeName}\` protobuf message but cannot find corresponding message class in \`root\`` - ); - } - - throw e; - } - - return { messageType, data: content.data }; - } - - protected constructPayload({ messageTypeName, message }: { messageTypeName: string; message: Uint8Array }): Payload { - return { - metadata: { - [METADATA_ENCODING_KEY]: encode(this.encodingType), - [METADATA_MESSAGE_TYPE_KEY]: encode(messageTypeName), - }, - data: message, - }; - } -} - -/** - * Converts between protobufjs Message instances and serialized Protobuf Payload - */ -export class ProtobufBinaryPayloadConverter extends ProtobufPayloadConverter { - public encodingType = encodingTypes.METADATA_ENCODING_PROTOBUF; - - /** - * @param root The value returned from {@link patchProtobufRoot} - */ - constructor(root?: unknown) { - super(root); - } - - public toPayload(value: unknown): Payload | undefined { - if (!isProtobufMessage(value)) { - return undefined; - } - - return this.constructPayload({ - messageTypeName: getNamespacedTypeName(value.$type), - message: value.$type.encode(value).finish(), - }); - } - - public fromPayload(content: Payload): T { - const { messageType, data } = this.validatePayload(content); - // Wrap with Uint8Array from this context to ensure `instanceof` works - const localData = data ? new Uint8Array(data.buffer, data.byteOffset, data.length) : data; - return messageType.decode(localData) as unknown as T; - } -} - -/** - * Converts between protobufjs Message instances and serialized JSON Payload - */ -export class ProtobufJsonPayloadConverter extends ProtobufPayloadConverter { - public encodingType = encodingTypes.METADATA_ENCODING_PROTOBUF_JSON; - - /** - * @param root The value returned from {@link patchProtobufRoot} - */ - constructor(root?: unknown) { - super(root); - } - - public toPayload(value: unknown): Payload | undefined { - if (!isProtobufMessage(value)) { - return undefined; - } - - const hasBufferChanged = setBufferInGlobal(); - try { - const jsonValue = protoJsonSerializer.toProto3JSON(value); - - return this.constructPayload({ - messageTypeName: getNamespacedTypeName(value.$type), - message: encode(JSON.stringify(jsonValue)), - }); - } finally { - resetBufferInGlobal(hasBufferChanged); - } - } - - public fromPayload(content: Payload): T { - const hasBufferChanged = setBufferInGlobal(); - try { - const { messageType, data } = this.validatePayload(content); - const res = protoJsonSerializer.fromProto3JSON(messageType, JSON.parse(decode(data))) as unknown as T; - if (Buffer.isBuffer(res)) { - return new Uint8Array(res) as any; - } - replaceBuffers(res); - return res; - } finally { - resetBufferInGlobal(hasBufferChanged); - } - } -} - -function replaceBuffers(obj: X) { - const replaceBuffersImpl = (value: any, key: string | number, target: Y) => { - if (Buffer.isBuffer(value)) { - // Need to copy. `Buffer` manages a pool slab, internally reused when Buffer objects are GC. - type T = keyof typeof target; - target[key as T] = new Uint8Array(value) as any; - } else { - replaceBuffers(value); - } - }; - - if (obj != null && typeof obj === 'object') { - // Performance optimization for large arrays - if (Array.isArray(obj)) { - obj.forEach(replaceBuffersImpl); - } else { - for (const [key, value] of Object.entries(obj)) { - replaceBuffersImpl(value, key, obj); - } - } - } -} - -function setBufferInGlobal(): boolean { - if (typeof globalThis.Buffer === 'undefined') { - globalThis.Buffer = GLOBAL_BUFFER; - return true; - } - return false; -} - -function resetBufferInGlobal(hasChanged: boolean): void { - if (hasChanged) { - delete (globalThis as any).Buffer; - } -} - -function isProtobufType(type: unknown): type is Type { - return ( - isRecord(type) && - // constructor.name may get mangled by minifiers; thanksfuly protobufjs also sets a className property - (type.constructor as any).className === 'Type' && - hasOwnProperties(type, ['parent', 'name', 'create', 'encode', 'decode']) && - typeof type.name === 'string' && - typeof type.create === 'function' && - typeof type.encode === 'function' && - typeof type.decode === 'function' - ); -} - -function isProtobufMessage(value: unknown): value is Message { - return isRecord(value) && hasOwnProperty(value, '$type') && isProtobufType(value.$type); -} - -function getNamespacedTypeName(node: Type | Namespace): string { - if (node.parent && !isRoot(node.parent)) { - return getNamespacedTypeName(node.parent) + '.' + node.name; - } else { - return node.name; - } -} - -function isRoot(root: unknown): root is Root { - // constructor.name may get mangled by minifiers; thanksfuly protobufjs also sets a className property - return isRecord(root) && (root.constructor as any).className === 'Root'; -} - -export interface DefaultPayloadConverterWithProtobufsOptions { - /** - * The `root` provided to {@link ProtobufJsonPayloadConverter} and {@link ProtobufBinaryPayloadConverter} - */ - protobufRoot: Record; -} - -export class DefaultPayloadConverterWithProtobufs extends CompositePayloadConverter { - // Match the order used in other SDKs. - // - // Go SDK: - // https://github.com/temporalio/sdk-go/blob/5e5645f0c550dcf717c095ae32c76a7087d2e985/converter/default_data_converter.go#L28 - constructor({ protobufRoot }: DefaultPayloadConverterWithProtobufsOptions) { - super( - new UndefinedPayloadConverter(), - new BinaryPayloadConverter(), - new ProtobufJsonPayloadConverter(protobufRoot), - new ProtobufBinaryPayloadConverter(protobufRoot), - new JsonPayloadConverter() - ); - } -} diff --git a/node_modules/@temporalio/common/src/converter/types.ts b/node_modules/@temporalio/common/src/converter/types.ts deleted file mode 100644 index 413c359..0000000 --- a/node_modules/@temporalio/common/src/converter/types.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { encode } from '../encoding'; - -export const METADATA_ENCODING_KEY = 'encoding'; -export const encodingTypes = { - METADATA_ENCODING_NULL: 'binary/null', - METADATA_ENCODING_RAW: 'binary/plain', - METADATA_ENCODING_JSON: 'json/plain', - METADATA_ENCODING_PROTOBUF_JSON: 'json/protobuf', - METADATA_ENCODING_PROTOBUF: 'binary/protobuf', -} as const; -export type EncodingType = (typeof encodingTypes)[keyof typeof encodingTypes]; - -export const encodingKeys = { - METADATA_ENCODING_NULL: encode(encodingTypes.METADATA_ENCODING_NULL), - METADATA_ENCODING_RAW: encode(encodingTypes.METADATA_ENCODING_RAW), - METADATA_ENCODING_JSON: encode(encodingTypes.METADATA_ENCODING_JSON), - METADATA_ENCODING_PROTOBUF_JSON: encode(encodingTypes.METADATA_ENCODING_PROTOBUF_JSON), - METADATA_ENCODING_PROTOBUF: encode(encodingTypes.METADATA_ENCODING_PROTOBUF), -} as const; - -export const METADATA_MESSAGE_TYPE_KEY = 'messageType'; diff --git a/node_modules/@temporalio/common/src/deprecated-time.ts b/node_modules/@temporalio/common/src/deprecated-time.ts deleted file mode 100644 index 4c6754f..0000000 --- a/node_modules/@temporalio/common/src/deprecated-time.ts +++ /dev/null @@ -1,80 +0,0 @@ -import * as time from './time'; -import { type Timestamp, Duration } from './time'; - -/** - * Lossy conversion function from Timestamp to number due to possible overflow. - * If ts is null or undefined returns undefined. - * - * @hidden - * @deprecated - meant for internal use only - */ -export function optionalTsToMs(ts: Timestamp | null | undefined): number | undefined { - return time.optionalTsToMs(ts); -} - -/** - * Lossy conversion function from Timestamp to number due to possible overflow - * - * @hidden - * @deprecated - meant for internal use only - * @deprecated - meant for internal use only - */ -export function tsToMs(ts: Timestamp | null | undefined): number { - return time.tsToMs(ts); -} - -/** - * @hidden - * @deprecated - meant for internal use only - */ -export function msNumberToTs(millis: number): Timestamp { - return time.msNumberToTs(millis); -} - -/** - * @hidden - * @deprecated - meant for internal use only - */ -export function msToTs(str: Duration): Timestamp { - return time.msToTs(str); -} - -/** - * @hidden - * @deprecated - meant for internal use only - */ -export function msOptionalToTs(str: Duration | undefined): Timestamp | undefined { - return time.msOptionalToTs(str); -} - -/** - * @hidden - * @deprecated - meant for internal use only - */ -export function msOptionalToNumber(val: Duration | undefined): number | undefined { - return time.msOptionalToNumber(val); -} - -/** - * @hidden - * @deprecated - meant for internal use only - */ -export function msToNumber(val: Duration): number { - return time.msToNumber(val); -} - -/** - * @hidden - * @deprecated - meant for internal use only - */ -export function tsToDate(ts: Timestamp): Date { - return time.tsToDate(ts); -} - -/** - * @hidden - * @deprecated - meant for internal use only - */ -export function optionalTsToDate(ts: Timestamp | null | undefined): Date | undefined { - return time.optionalTsToDate(ts); -} diff --git a/node_modules/@temporalio/common/src/encoding.ts b/node_modules/@temporalio/common/src/encoding.ts deleted file mode 100644 index 86121b1..0000000 --- a/node_modules/@temporalio/common/src/encoding.ts +++ /dev/null @@ -1,331 +0,0 @@ -// Pasted with modifications from: https://raw.githubusercontent.com/anonyco/FastestSmallestTextEncoderDecoder/master/EncoderDecoderTogether.src.js -/* eslint no-fallthrough: 0 */ - -const fromCharCode = String.fromCharCode; -const encoderRegexp = /[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g; -const tmpBufferU16 = new Uint16Array(32); - -export class TextDecoder { - decode(inputArrayOrBuffer: Uint8Array | ArrayBuffer | SharedArrayBuffer): string { - const inputAs8 = inputArrayOrBuffer instanceof Uint8Array ? inputArrayOrBuffer : new Uint8Array(inputArrayOrBuffer); - - let resultingString = '', - tmpStr = '', - index = 0, - nextEnd = 0, - cp0 = 0, - codePoint = 0, - minBits = 0, - cp1 = 0, - pos = 0, - tmp = -1; - const len = inputAs8.length | 0; - const lenMinus32 = (len - 32) | 0; - // Note that tmp represents the 2nd half of a surrogate pair incase a surrogate gets divided between blocks - for (; index < len; ) { - nextEnd = index <= lenMinus32 ? 32 : (len - index) | 0; - for (; pos < nextEnd; index = (index + 1) | 0, pos = (pos + 1) | 0) { - // @ts-expect-error ignoring unchecked index - cp0 = inputAs8[index] & 0xff; - switch (cp0 >> 4) { - case 15: - // @ts-expect-error ignoring unchecked index - cp1 = inputAs8[(index = (index + 1) | 0)] & 0xff; - if (cp1 >> 6 !== 0b10 || 0b11110111 < cp0) { - index = (index - 1) | 0; - break; - } - codePoint = ((cp0 & 0b111) << 6) | (cp1 & 0b00111111); - minBits = 5; // 20 ensures it never passes -> all invalid replacements - cp0 = 0x100; // keep track of th bit size - case 14: - // @ts-expect-error ignoring unchecked index - cp1 = inputAs8[(index = (index + 1) | 0)] & 0xff; - codePoint <<= 6; - codePoint |= ((cp0 & 0b1111) << 6) | (cp1 & 0b00111111); - minBits = cp1 >> 6 === 0b10 ? (minBits + 4) | 0 : 24; // 24 ensures it never passes -> all invalid replacements - cp0 = (cp0 + 0x100) & 0x300; // keep track of th bit size - case 13: - case 12: - // @ts-expect-error ignoring unchecked index - cp1 = inputAs8[(index = (index + 1) | 0)] & 0xff; - codePoint <<= 6; - codePoint |= ((cp0 & 0b11111) << 6) | (cp1 & 0b00111111); - minBits = (minBits + 7) | 0; - - // Now, process the code point - if (index < len && cp1 >> 6 === 0b10 && codePoint >> minBits && codePoint < 0x110000) { - cp0 = codePoint; - codePoint = (codePoint - 0x10000) | 0; - if (0 <= codePoint /*0xffff < codePoint*/) { - // BMP code point - //nextEnd = nextEnd - 1|0; - - tmp = ((codePoint >> 10) + 0xd800) | 0; // highSurrogate - cp0 = ((codePoint & 0x3ff) + 0xdc00) | 0; // lowSurrogate (will be inserted later in the switch-statement) - - if (pos < 31) { - // notice 31 instead of 32 - tmpBufferU16[pos] = tmp; - pos = (pos + 1) | 0; - tmp = -1; - } else { - // else, we are at the end of the inputAs8 and let tmp0 be filled in later on - // NOTE that cp1 is being used as a temporary variable for the swapping of tmp with cp0 - cp1 = tmp; - tmp = cp0; - cp0 = cp1; - } - } else nextEnd = (nextEnd + 1) | 0; // because we are advancing i without advancing pos - } else { - // invalid code point means replacing the whole thing with null replacement characters - cp0 >>= 8; - index = (index - cp0 - 1) | 0; // reset index back to what it was before - cp0 = 0xfffd; - } - - // Finally, reset the variables for the next go-around - minBits = 0; - codePoint = 0; - nextEnd = index <= lenMinus32 ? 32 : (len - index) | 0; - /*case 11: - case 10: - case 9: - case 8: - codePoint ? codePoint = 0 : cp0 = 0xfffd; // fill with invalid replacement character - case 7: - case 6: - case 5: - case 4: - case 3: - case 2: - case 1: - case 0: - tmpBufferU16[pos] = cp0; - continue;*/ - default: // fill with invalid replacement character - tmpBufferU16[pos] = cp0; - continue; - case 11: - case 10: - case 9: - case 8: - } - tmpBufferU16[pos] = 0xfffd; // fill with invalid replacement character - } - tmpStr += fromCharCode( - // @ts-expect-error ignoring unchecked index - tmpBufferU16[0], - tmpBufferU16[1], - tmpBufferU16[2], - tmpBufferU16[3], - tmpBufferU16[4], - tmpBufferU16[5], - tmpBufferU16[6], - tmpBufferU16[7], - tmpBufferU16[8], - tmpBufferU16[9], - tmpBufferU16[10], - tmpBufferU16[11], - tmpBufferU16[12], - tmpBufferU16[13], - tmpBufferU16[14], - tmpBufferU16[15], - tmpBufferU16[16], - tmpBufferU16[17], - tmpBufferU16[18], - tmpBufferU16[19], - tmpBufferU16[20], - tmpBufferU16[21], - tmpBufferU16[22], - tmpBufferU16[23], - tmpBufferU16[24], - tmpBufferU16[25], - tmpBufferU16[26], - tmpBufferU16[27], - tmpBufferU16[28], - tmpBufferU16[29], - tmpBufferU16[30], - tmpBufferU16[31] - ); - if (pos < 32) tmpStr = tmpStr.slice(0, (pos - 32) | 0); //-(32-pos)); - if (index < len) { - //fromCharCode.apply(0, tmpBufferU16 : Uint8Array ? tmpBufferU16.subarray(0,pos) : tmpBufferU16.slice(0,pos)); - tmpBufferU16[0] = tmp; - pos = ~tmp >>> 31; //tmp !== -1 ? 1 : 0; - tmp = -1; - - if (tmpStr.length < resultingString.length) continue; - } else if (tmp !== -1) { - tmpStr += fromCharCode(tmp); - } - - resultingString += tmpStr; - tmpStr = ''; - } - - return resultingString; - } -} - -////////////////////////////////////////////////////////////////////////////////////// -function encoderReplacer(nonAsciiChars: string) { - // make the UTF string into a binary UTF-8 encoded string - let point = nonAsciiChars.charCodeAt(0) | 0; - if (0xd800 <= point) { - if (point <= 0xdbff) { - const nextcode = nonAsciiChars.charCodeAt(1) | 0; // defaults to 0 when NaN, causing null replacement character - - if (0xdc00 <= nextcode && nextcode <= 0xdfff) { - //point = ((point - 0xD800)<<10) + nextcode - 0xDC00 + 0x10000|0; - point = ((point << 10) + nextcode - 0x35fdc00) | 0; - if (point > 0xffff) - return fromCharCode( - (0x1e /*0b11110*/ << 3) | (point >> 18), - (0x2 /*0b10*/ << 6) | ((point >> 12) & 0x3f) /*0b00111111*/, - (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/, - (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/ - ); - } else point = 65533 /*0b1111111111111101*/; //return '\xEF\xBF\xBD';//fromCharCode(0xef, 0xbf, 0xbd); - } else if (point <= 0xdfff) { - point = 65533 /*0b1111111111111101*/; //return '\xEF\xBF\xBD';//fromCharCode(0xef, 0xbf, 0xbd); - } - } - /*if (point <= 0x007f) return nonAsciiChars; - else */ if (point <= 0x07ff) { - return fromCharCode((0x6 << 5) | (point >> 6), (0x2 << 6) | (point & 0x3f)); - } else - return fromCharCode( - (0xe /*0b1110*/ << 4) | (point >> 12), - (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/, - (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/ - ); -} - -export class TextEncoder { - public encode(inputString: string): Uint8Array { - // 0xc0 => 0b11000000; 0xff => 0b11111111; 0xc0-0xff => 0b11xxxxxx - // 0x80 => 0b10000000; 0xbf => 0b10111111; 0x80-0xbf => 0b10xxxxxx - const encodedString = inputString === void 0 ? '' : '' + inputString, - len = encodedString.length | 0; - let result = new Uint8Array(((len << 1) + 8) | 0); - let tmpResult: Uint8Array; - let i = 0, - pos = 0, - point = 0, - nextcode = 0; - let upgradededArraySize = !Uint8Array; // normal arrays are auto-expanding - for (i = 0; i < len; i = (i + 1) | 0, pos = (pos + 1) | 0) { - point = encodedString.charCodeAt(i) | 0; - if (point <= 0x007f) { - result[pos] = point; - } else if (point <= 0x07ff) { - result[pos] = (0x6 << 5) | (point >> 6); - result[(pos = (pos + 1) | 0)] = (0x2 << 6) | (point & 0x3f); - } else { - widenCheck: { - if (0xd800 <= point) { - if (point <= 0xdbff) { - nextcode = encodedString.charCodeAt((i = (i + 1) | 0)) | 0; // defaults to 0 when NaN, causing null replacement character - - if (0xdc00 <= nextcode && nextcode <= 0xdfff) { - //point = ((point - 0xD800)<<10) + nextcode - 0xDC00 + 0x10000|0; - point = ((point << 10) + nextcode - 0x35fdc00) | 0; - if (point > 0xffff) { - result[pos] = (0x1e /*0b11110*/ << 3) | (point >> 18); - result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | ((point >> 12) & 0x3f) /*0b00111111*/; - result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/; - result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/; - continue; - } - break widenCheck; - } - point = 65533 /*0b1111111111111101*/; //return '\xEF\xBF\xBD';//fromCharCode(0xef, 0xbf, 0xbd); - } else if (point <= 0xdfff) { - point = 65533 /*0b1111111111111101*/; //return '\xEF\xBF\xBD';//fromCharCode(0xef, 0xbf, 0xbd); - } - } - if (!upgradededArraySize && i << 1 < pos && i << 1 < ((pos - 7) | 0)) { - upgradededArraySize = true; - tmpResult = new Uint8Array(len * 3); - tmpResult.set(result); - result = tmpResult; - } - } - result[pos] = (0xe /*0b1110*/ << 4) | (point >> 12); - result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/; - result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/; - } - } - return Uint8Array ? result.subarray(0, pos) : result.slice(0, pos); - } - - public encodeInto(inputString: string, u8Arr: Uint8Array): { written: number; read: number } { - const encodedString = inputString === void 0 ? '' : ('' + inputString).replace(encoderRegexp, encoderReplacer); - let len = encodedString.length | 0, - i = 0, - char = 0, - read = 0; - const u8ArrLen = u8Arr.length | 0; - const inputLength = inputString.length | 0; - if (u8ArrLen < len) len = u8ArrLen; - putChars: { - for (; i < len; i = (i + 1) | 0) { - char = encodedString.charCodeAt(i) | 0; - switch (char >> 4) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - read = (read + 1) | 0; - // extension points: - case 8: - case 9: - case 10: - case 11: - break; - case 12: - case 13: - if (((i + 1) | 0) < u8ArrLen) { - read = (read + 1) | 0; - break; - } - case 14: - if (((i + 2) | 0) < u8ArrLen) { - //if (!(char === 0xEF && encodedString.substr(i+1|0,2) === "\xBF\xBD")) - read = (read + 1) | 0; - break; - } - case 15: - if (((i + 3) | 0) < u8ArrLen) { - read = (read + 1) | 0; - break; - } - default: - break putChars; - } - //read = read + ((char >> 6) !== 2) |0; - u8Arr[i] = char; - } - } - return { written: i, read: inputLength < read ? inputLength : read }; - } -} - -/** - * Encode a UTF-8 string into a Uint8Array - */ -export function encode(s: string): Uint8Array { - return TextEncoder.prototype.encode(s); -} - -/** - * Decode a Uint8Array into a UTF-8 string - */ -export function decode(a: Uint8Array): string { - return TextDecoder.prototype.decode(a); -} diff --git a/node_modules/@temporalio/common/src/errors.ts b/node_modules/@temporalio/common/src/errors.ts deleted file mode 100644 index 92bbf2b..0000000 --- a/node_modules/@temporalio/common/src/errors.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { SymbolBasedInstanceOfError } from './type-helpers'; - -/** - * Thrown from code that receives a value that is unexpected or that it's unable to handle. - */ -@SymbolBasedInstanceOfError('ValueError') -export class ValueError extends Error { - constructor( - message: string | undefined, - public readonly cause?: unknown - ) { - super(message ?? undefined); - } -} - -/** - * Thrown when a Payload Converter is misconfigured. - */ -@SymbolBasedInstanceOfError('PayloadConverterError') -export class PayloadConverterError extends ValueError {} - -/** - * Signals that a requested operation can't be completed because it is illegal given the - * current state of the object; e.g. trying to use a resource after it has been closed. - */ -@SymbolBasedInstanceOfError('IllegalStateError') -export class IllegalStateError extends Error {} - -/** - * Thrown when a Workflow with the given Id is not known to Temporal Server. - * It could be because: - * - Id passed is incorrect - * - Workflow is closed (for some calls, e.g. `terminate`) - * - Workflow was deleted from the Server after reaching its retention limit - */ -@SymbolBasedInstanceOfError('WorkflowNotFoundError') -export class WorkflowNotFoundError extends Error { - constructor( - message: string, - public readonly workflowId: string, - public readonly runId: string | undefined - ) { - super(message); - } -} - -/** - * Thrown when the specified namespace is not known to Temporal Server. - */ -@SymbolBasedInstanceOfError('NamespaceNotFoundError') -export class NamespaceNotFoundError extends Error { - constructor(public readonly namespace: string) { - super(`Namespace not found: '${namespace}'`); - } -} - -/** - * Throw this error from an Activity in order to make the Worker forget about this Activity. - * - * The Activity can then be completed asynchronously (from anywhere—usually outside the Worker) using - * the Client's activity handle. - * - * @example - * - * ```ts - *import { CompleteAsyncError } from '@temporalio/activity'; - * - *export async function myActivity(): Promise { - * // ... - * throw new CompleteAsyncError(); - *} - * ``` - */ -@SymbolBasedInstanceOfError('CompleteAsyncError') -export class CompleteAsyncError extends Error {} diff --git a/node_modules/@temporalio/common/src/failure.ts b/node_modules/@temporalio/common/src/failure.ts deleted file mode 100644 index 6d15d3d..0000000 --- a/node_modules/@temporalio/common/src/failure.ts +++ /dev/null @@ -1,468 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -import { errorMessage, isRecord, SymbolBasedInstanceOfError } from './type-helpers'; -import { Duration } from './time'; -import { makeProtoEnumConverters } from './internal-workflow'; - -export const FAILURE_SOURCE = 'TypeScriptSDK'; -export type ProtoFailure = temporal.api.failure.v1.IFailure; - -export const TimeoutType = { - START_TO_CLOSE: 'START_TO_CLOSE', - SCHEDULE_TO_START: 'SCHEDULE_TO_START', - SCHEDULE_TO_CLOSE: 'SCHEDULE_TO_CLOSE', - HEARTBEAT: 'HEARTBEAT', - - /** @deprecated Use {@link START_TO_CLOSE} instead. */ - TIMEOUT_TYPE_START_TO_CLOSE: 'START_TO_CLOSE', - - /** @deprecated Use {@link SCHEDULE_TO_START} instead. */ - TIMEOUT_TYPE_SCHEDULE_TO_START: 'SCHEDULE_TO_START', - - /** @deprecated Use {@link SCHEDULE_TO_CLOSE} instead. */ - TIMEOUT_TYPE_SCHEDULE_TO_CLOSE: 'SCHEDULE_TO_CLOSE', - - /** @deprecated Use {@link HEARTBEAT} instead. */ - TIMEOUT_TYPE_HEARTBEAT: 'HEARTBEAT', - - /** @deprecated Use `undefined` instead. */ - TIMEOUT_TYPE_UNSPECIFIED: undefined, -} as const; -export type TimeoutType = (typeof TimeoutType)[keyof typeof TimeoutType]; - -export const [encodeTimeoutType, decodeTimeoutType] = makeProtoEnumConverters< - temporal.api.enums.v1.TimeoutType, - typeof temporal.api.enums.v1.TimeoutType, - keyof typeof temporal.api.enums.v1.TimeoutType, - typeof TimeoutType, - 'TIMEOUT_TYPE_' ->( - { - [TimeoutType.START_TO_CLOSE]: 1, - [TimeoutType.SCHEDULE_TO_START]: 2, - [TimeoutType.SCHEDULE_TO_CLOSE]: 3, - [TimeoutType.HEARTBEAT]: 4, - UNSPECIFIED: 0, - } as const, - 'TIMEOUT_TYPE_' -); - -export const RetryState = { - IN_PROGRESS: 'IN_PROGRESS', - NON_RETRYABLE_FAILURE: 'NON_RETRYABLE_FAILURE', - TIMEOUT: 'TIMEOUT', - MAXIMUM_ATTEMPTS_REACHED: 'MAXIMUM_ATTEMPTS_REACHED', - RETRY_POLICY_NOT_SET: 'RETRY_POLICY_NOT_SET', - INTERNAL_SERVER_ERROR: 'INTERNAL_SERVER_ERROR', - CANCEL_REQUESTED: 'CANCEL_REQUESTED', - - /** @deprecated Use {@link IN_PROGRESS} instead. */ - RETRY_STATE_IN_PROGRESS: 'IN_PROGRESS', - - /** @deprecated Use {@link NON_RETRYABLE_FAILURE} instead. */ - RETRY_STATE_NON_RETRYABLE_FAILURE: 'NON_RETRYABLE_FAILURE', - - /** @deprecated Use {@link TIMEOUT} instead. */ - RETRY_STATE_TIMEOUT: 'TIMEOUT', - - /** @deprecated Use {@link MAXIMUM_ATTEMPTS_REACHED} instead. */ - RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED: 'MAXIMUM_ATTEMPTS_REACHED', - - /** @deprecated Use {@link RETRY_POLICY_NOT_SET} instead. */ - RETRY_STATE_RETRY_POLICY_NOT_SET: 'RETRY_POLICY_NOT_SET', - - /** @deprecated Use {@link INTERNAL_SERVER_ERROR} instead. */ - RETRY_STATE_INTERNAL_SERVER_ERROR: 'INTERNAL_SERVER_ERROR', - - /** @deprecated Use {@link CANCEL_REQUESTED} instead. */ - RETRY_STATE_CANCEL_REQUESTED: 'CANCEL_REQUESTED', - - /** @deprecated Use `undefined` instead. */ - RETRY_STATE_UNSPECIFIED: undefined, -} as const; -export type RetryState = (typeof RetryState)[keyof typeof RetryState]; - -export const [encodeRetryState, decodeRetryState] = makeProtoEnumConverters< - temporal.api.enums.v1.RetryState, - typeof temporal.api.enums.v1.RetryState, - keyof typeof temporal.api.enums.v1.RetryState, - typeof RetryState, - 'RETRY_STATE_' ->( - { - [RetryState.IN_PROGRESS]: 1, - [RetryState.NON_RETRYABLE_FAILURE]: 2, - [RetryState.TIMEOUT]: 3, - [RetryState.MAXIMUM_ATTEMPTS_REACHED]: 4, - [RetryState.RETRY_POLICY_NOT_SET]: 5, - [RetryState.INTERNAL_SERVER_ERROR]: 6, - [RetryState.CANCEL_REQUESTED]: 7, - UNSPECIFIED: 0, - } as const, - 'RETRY_STATE_' -); - -/** - * A category to describe the severity and change the observability behavior of an application failure. - * - * Currently, observability behavior changes are limited to: - * - activities that fail due to a BENIGN application failure emit DEBUG level logs and do not record metrics - * - * @experimental Category is a new feature and may be subject to change. - */ -export const ApplicationFailureCategory = { - BENIGN: 'BENIGN', -} as const; -export type ApplicationFailureCategory = (typeof ApplicationFailureCategory)[keyof typeof ApplicationFailureCategory]; - -export const [encodeApplicationFailureCategory, decodeApplicationFailureCategory] = makeProtoEnumConverters< - temporal.api.enums.v1.ApplicationErrorCategory, - typeof temporal.api.enums.v1.ApplicationErrorCategory, - keyof typeof temporal.api.enums.v1.ApplicationErrorCategory, - typeof ApplicationFailureCategory, - 'APPLICATION_ERROR_CATEGORY_' ->( - { - [ApplicationFailureCategory.BENIGN]: 1, - UNSPECIFIED: 0, - } as const, - 'APPLICATION_ERROR_CATEGORY_' -); - -export type WorkflowExecution = temporal.api.common.v1.IWorkflowExecution; - -/** - * Represents failures that can cross Workflow and Activity boundaries. - * - * **Never extend this class or any of its children.** - * - * The only child class you should ever throw from your code is {@link ApplicationFailure}. - */ -@SymbolBasedInstanceOfError('TemporalFailure') -export class TemporalFailure extends Error { - /** - * The original failure that constructed this error. - * - * Only present if this error was generated from an external operation. - */ - public failure?: ProtoFailure; - - constructor( - message?: string | undefined | null, - public readonly cause?: Error - ) { - super(message ?? undefined); - } -} - -/** Exceptions originated at the Temporal service. */ -@SymbolBasedInstanceOfError('ServerFailure') -export class ServerFailure extends TemporalFailure { - constructor( - message: string | undefined, - public readonly nonRetryable: boolean, - cause?: Error - ) { - super(message, cause); - } -} - -/** - * `ApplicationFailure`s are used to communicate application-specific failures in Workflows and Activities. - * - * The {@link type} property is matched against {@link RetryPolicy.nonRetryableErrorTypes} to determine if an instance - * of this error is retryable. Another way to avoid retrying is by setting the {@link nonRetryable} flag to `true`. - * - * In Workflows, if you throw a non-`ApplicationFailure`, the Workflow Task will fail and be retried. If you throw an - * `ApplicationFailure`, the Workflow Execution will fail. - * - * In Activities, you can either throw an `ApplicationFailure` or another `Error` to fail the Activity Task. In the - * latter case, the `Error` will be converted to an `ApplicationFailure`. The conversion is done as following: - * - * - `type` is set to `error.constructor?.name ?? error.name` - * - `message` is set to `error.message` - * - `nonRetryable` is set to false - * - `details` are set to null - * - stack trace is copied from the original error - * - * When an {@link https://docs.temporal.io/concepts/what-is-an-activity-execution | Activity Execution} fails, the - * `ApplicationFailure` from the last Activity Task will be the `cause` of the {@link ActivityFailure} thrown in the - * Workflow. - */ -@SymbolBasedInstanceOfError('ApplicationFailure') -export class ApplicationFailure extends TemporalFailure { - /** - * Alternatively, use {@link fromError} or {@link create}. - */ - constructor( - message?: string | undefined | null, - public readonly type?: string | undefined | null, - public readonly nonRetryable?: boolean | undefined | null, - public readonly details?: unknown[] | undefined | null, - cause?: Error, - public readonly nextRetryDelay?: Duration | undefined | null, - public readonly category?: ApplicationFailureCategory | undefined | null - ) { - super(message, cause); - } - - /** - * Create a new `ApplicationFailure` from an Error object. - * - * First calls {@link ensureApplicationFailure | `ensureApplicationFailure(error)`} and then overrides any fields - * provided in `overrides`. - */ - public static fromError(error: Error | unknown, overrides?: ApplicationFailureOptions): ApplicationFailure { - const failure = ensureApplicationFailure(error); - Object.assign(failure, overrides); - return failure; - } - - /** - * Create a new `ApplicationFailure`. - * - * By default, will be retryable (unless its `type` is included in {@link RetryPolicy.nonRetryableErrorTypes}). - */ - public static create(options: ApplicationFailureOptions): ApplicationFailure { - const { message, type, nonRetryable = false, details, nextRetryDelay, cause, category } = options; - return new this(message, type, nonRetryable, details, cause, nextRetryDelay, category); - } - - /** - * Get a new `ApplicationFailure` with the {@link nonRetryable} flag set to false. Note that this error will still - * not be retried if its `type` is included in {@link RetryPolicy.nonRetryableErrorTypes}. - * - * @param message Optional error message - * @param type Optional error type (used by {@link RetryPolicy.nonRetryableErrorTypes}) - * @param details Optional details about the failure. Serialized by the Worker's {@link PayloadConverter}. - */ - public static retryable(message?: string | null, type?: string | null, ...details: unknown[]): ApplicationFailure { - return new this(message, type ?? 'Error', false, details); - } - - /** - * Get a new `ApplicationFailure` with the {@link nonRetryable} flag set to true. - * - * When thrown from an Activity or Workflow, the Activity or Workflow will not be retried (even if `type` is not - * listed in {@link RetryPolicy.nonRetryableErrorTypes}). - * - * @param message Optional error message - * @param type Optional error type - * @param details Optional details about the failure. Serialized by the Worker's {@link PayloadConverter}. - */ - public static nonRetryable(message?: string | null, type?: string | null, ...details: unknown[]): ApplicationFailure { - return new this(message, type ?? 'Error', true, details); - } -} - -export interface ApplicationFailureOptions { - /** - * Error message - */ - message?: string; - - /** - * Error type (used by {@link RetryPolicy.nonRetryableErrorTypes}) - */ - type?: string; - - /** - * Whether the current Activity or Workflow can be retried - * - * @default false - */ - nonRetryable?: boolean; - - /** - * Details about the failure. Serialized by the Worker's {@link PayloadConverter}. - */ - details?: unknown[]; - - /** - * If set, overrides the delay until the next retry of this Activity / Workflow Task. - * - * Retry attempts will still be subject to the maximum retries limit and total time limit defined - * by the policy. - */ - nextRetryDelay?: Duration; - - /** - * Cause of the failure - */ - cause?: Error; - - /** - * Severity category of the application error. - * Affects worker-side logging and metrics behavior of this failure. - */ - category?: ApplicationFailureCategory; -} - -/** - * This error is thrown when Cancellation has been requested. To allow Cancellation to happen, let it propagate. To - * ignore Cancellation, catch it and continue executing. Note that Cancellation can only be requested a single time, so - * your Workflow/Activity Execution will not receive further Cancellation requests. - * - * When a Workflow or Activity has been successfully cancelled, a `CancelledFailure` will be the `cause`. - */ -@SymbolBasedInstanceOfError('CancelledFailure') -export class CancelledFailure extends TemporalFailure { - constructor( - message: string | undefined, - public readonly details: unknown[] = [], - cause?: Error - ) { - super(message, cause); - } -} - -/** - * Used as the `cause` when a Workflow has been terminated - */ -@SymbolBasedInstanceOfError('TerminatedFailure') -export class TerminatedFailure extends TemporalFailure { - constructor(message: string | undefined, cause?: Error) { - super(message, cause); - } -} - -/** - * Used to represent timeouts of Activities and Workflows - */ -@SymbolBasedInstanceOfError('TimeoutFailure') -export class TimeoutFailure extends TemporalFailure { - constructor( - message: string | undefined, - public readonly lastHeartbeatDetails: unknown, - public readonly timeoutType: TimeoutType - ) { - super(message); - } -} - -/** - * Contains information about an Activity failure. Always contains the original reason for the failure as its `cause`. - * For example, if an Activity timed out, the cause will be a {@link TimeoutFailure}. - * - * This exception is expected to be thrown only by the framework code. - */ -@SymbolBasedInstanceOfError('ActivityFailure') -export class ActivityFailure extends TemporalFailure { - public constructor( - message: string | undefined, - public readonly activityType: string, - public readonly activityId: string | undefined, - public readonly retryState: RetryState, - public readonly identity: string | undefined, - cause?: Error - ) { - super(message, cause); - } -} - -/** - * Contains information about a Child Workflow failure. Always contains the reason for the failure as its {@link cause}. - * For example, if the Child was Terminated, the `cause` is a {@link TerminatedFailure}. - * - * This exception is expected to be thrown only by the framework code. - */ -@SymbolBasedInstanceOfError('ChildWorkflowFailure') -export class ChildWorkflowFailure extends TemporalFailure { - public constructor( - public readonly namespace: string | undefined, - public readonly execution: WorkflowExecution, - public readonly workflowType: string, - public readonly retryState: RetryState, - cause?: Error - ) { - super('Child Workflow execution failed', cause); - } -} - -/** - * Thrown when a Nexus Operation executed inside a Workflow fails. - * - * @experimental Nexus support in Temporal SDK is experimental. - */ -@SymbolBasedInstanceOfError('NexusOperationFailure') -export class NexusOperationFailure extends TemporalFailure { - public constructor( - message: string | undefined, - public readonly scheduledEventId: number | undefined, - public readonly endpoint: string, - public readonly service: string, - public readonly operation: string, - public readonly operationToken: string | undefined, - cause?: Error - ) { - super(message, cause); - } -} - -// TODO(nexus/error): Maybe add a NexusHandlerFailure class here, once we've decided on error handling. - -/** - * This exception is thrown in the following cases: - * - Workflow with the same Workflow ID is currently running and the {@link WorkflowOptions.workflowIdConflictPolicy} is `WORKFLOW_ID_CONFLICT_POLICY_FAIL` - * - There is a closed Workflow with the same Workflow Id and the {@link WorkflowOptions.workflowIdReusePolicy} - * is `WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE` - * - There is closed Workflow in the `Completed` state with the same Workflow Id and the {@link WorkflowOptions.workflowIdReusePolicy} - * is `WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY` - */ -@SymbolBasedInstanceOfError('WorkflowExecutionAlreadyStartedError') -export class WorkflowExecutionAlreadyStartedError extends TemporalFailure { - constructor( - message: string, - public readonly workflowId: string, - public readonly workflowType: string - ) { - super(message); - } -} - -/** - * If `error` is already an `ApplicationFailure`, returns `error`. - * - * Otherwise, converts `error` into an `ApplicationFailure` with: - * - * - `message`: `error.message` or `String(error)` - * - `type`: `error.constructor.name` or `error.name` - * - `stack`: `error.stack` or `''` - */ -export function ensureApplicationFailure(error: unknown): ApplicationFailure { - if (error instanceof ApplicationFailure) { - return error; - } - - const message = (isRecord(error) && String(error.message)) || String(error); - const type = (isRecord(error) && (error.constructor?.name ?? error.name)) || undefined; - const failure = ApplicationFailure.create({ message, type, nonRetryable: false }); - failure.stack = (isRecord(error) && String(error.stack)) || ''; - return failure; -} - -/** - * If `err` is an Error it is turned into an `ApplicationFailure`. - * - * If `err` was already a `TemporalFailure`, returns the original error. - * - * Otherwise returns an `ApplicationFailure` with `String(err)` as the message. - */ -export function ensureTemporalFailure(err: unknown): TemporalFailure { - if (err instanceof TemporalFailure) { - return err; - } - return ensureApplicationFailure(err); -} - -/** - * Get the root cause message of given `error`. - * - * In case `error` is a {@link TemporalFailure}, recurse the `cause` chain and return the root `cause.message`. - * Otherwise, return `error.message`. - */ -export function rootCause(error: unknown): string | undefined { - if (error instanceof TemporalFailure) { - return error.cause ? rootCause(error.cause) : error.message; - } - return errorMessage(error); -} diff --git a/node_modules/@temporalio/common/src/index.ts b/node_modules/@temporalio/common/src/index.ts deleted file mode 100644 index 343bb6f..0000000 --- a/node_modules/@temporalio/common/src/index.ts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Common library for code that's used across the Client, Worker, and/or Workflow - * - * @module - */ - -import * as encoding from './encoding'; -import * as helpers from './type-helpers'; - -export * from './activity-options'; -export { ActivityCancellationDetailsOptions, ActivityCancellationDetails } from './activity-cancellation-details'; -export { SuggestContinueAsNewReason } from './continue-as-new'; -export * from './converter/data-converter'; -export * from './converter/failure-converter'; -export * from './converter/payload-codec'; -export * from './converter/payload-converter'; -export * from './converter/types'; -export * from './deprecated-time'; -export * from './errors'; -export * from './failure'; -export { Headers, Next } from './interceptors'; -export * from './interfaces'; -export * from './logger'; -export * from './priority'; -export * from './metrics'; -export * from './retry-policy'; -export type { Timestamp, Duration, StringValue } from './time'; -export * from './worker-deployments'; -export * from './workflow-definition-options'; -export * from './workflow-handle'; -export * from './workflow-options'; -export * from './versioning-intent'; -export { - SearchAttributes, // eslint-disable-line @typescript-eslint/no-deprecated - SearchAttributeValue, // eslint-disable-line @typescript-eslint/no-deprecated - SearchAttributeType, - SearchAttributePair, - SearchAttributeUpdatePair, - TypedSearchAttributes, - defineSearchAttributeKey, -} from './search-attributes'; - -/** - * Encode a UTF-8 string into a Uint8Array - * - * @hidden - * @deprecated - meant for internal use only - */ -export function u8(s: string): Uint8Array { - return encoding.encode(s); -} - -/** - * Decode a Uint8Array into a UTF-8 string - * - * @hidden - * @deprecated - meant for internal use only - */ -export function str(arr: Uint8Array): string { - return encoding.decode(arr); -} - -/** - * Get `error.message` (or `undefined` if not present) - * - * @hidden - * @deprecated - meant for internal use only - */ -export function errorMessage(error: unknown): string | undefined { - return helpers.errorMessage(error); -} - -/** - * Get `error.code` (or `undefined` if not present) - * - * @hidden - * @deprecated - meant for internal use only - */ -export function errorCode(error: unknown): string | undefined { - return helpers.errorCode(error); -} diff --git a/node_modules/@temporalio/common/src/interceptors.ts b/node_modules/@temporalio/common/src/interceptors.ts deleted file mode 100644 index 9226fdd..0000000 --- a/node_modules/@temporalio/common/src/interceptors.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { AnyFunc, OmitLastParam } from './type-helpers'; -import { Payload } from './interfaces'; - -/** - * Type of the next function for a given interceptor function - * - * Called from an interceptor to continue the interception chain - */ -export type Next = Required[FN] extends AnyFunc ? OmitLastParam[FN]> : never; - -/** Headers are just a mapping of header name to Payload */ -export type Headers = Record; - -/** - * Compose all interceptor methods into a single function. - * - * Calling the composed function results in calling each of the provided interceptor, in order (from the first to - * the last), followed by the original function provided as argument to `composeInterceptors()`. - * - * @param interceptors a list of interceptors - * @param method the name of the interceptor method to compose - * @param next the original function to be executed at the end of the interception chain - */ -// ts-prune-ignore-next (imported via lib/interceptors) -export function composeInterceptors(interceptors: I[], method: M, next: Next): Next { - for (let i = interceptors.length - 1; i >= 0; --i) { - const interceptor = interceptors[i]; - if (interceptor?.[method] !== undefined) { - const prev = next; - // We lose type safety here because Typescript can't deduce that interceptor[method] is a function that returns - // the same type as Next - next = ((input: any) => (interceptor[method] as any)(input, prev)) as any; - } - } - return next; -} diff --git a/node_modules/@temporalio/common/src/interfaces.ts b/node_modules/@temporalio/common/src/interfaces.ts deleted file mode 100644 index 34becc4..0000000 --- a/node_modules/@temporalio/common/src/interfaces.ts +++ /dev/null @@ -1,137 +0,0 @@ -import type { temporal } from '@temporalio/proto'; - -export type Payload = temporal.api.common.v1.IPayload; - -/** Type that can be returned from a Workflow `execute` function */ -export type WorkflowReturnType = Promise; -export type WorkflowUpdateType = (...args: any[]) => Promise | any; -export type WorkflowUpdateValidatorType = (...args: any[]) => void; -export type WorkflowUpdateAnnotatedType = { - handler: WorkflowUpdateType; - unfinishedPolicy: HandlerUnfinishedPolicy; - validator?: WorkflowUpdateValidatorType; - description?: string; -}; -export type WorkflowSignalType = (...args: any[]) => Promise | void; -export type WorkflowSignalAnnotatedType = { - handler: WorkflowSignalType; - unfinishedPolicy: HandlerUnfinishedPolicy; - description?: string; -}; -export type WorkflowQueryType = (...args: any[]) => any; -export type WorkflowQueryAnnotatedType = { handler: WorkflowQueryType; description?: string }; - -/** - * Broad Workflow function definition, specific Workflows will typically use a narrower type definition, e.g: - * ```ts - * export async function myWorkflow(arg1: number, arg2: string): Promise; - * ``` - */ -export type Workflow = (...args: any[]) => WorkflowReturnType; - -declare const argsBrand: unique symbol; -declare const retBrand: unique symbol; - -/** - * An interface representing a Workflow update definition, as returned from {@link defineUpdate} - * - * @remarks `Args` can be used for parameter type inference in handler functions and WorkflowHandle methods. - * `Name` can optionally be specified with a string literal type to preserve type-level knowledge of the update name. - */ -export interface UpdateDefinition { - type: 'update'; - name: Name; - /** - * Virtual type brand to maintain a distinction between {@link UpdateDefinition} types with different args. - * This field is not present at run-time. - */ - [argsBrand]: Args; - /** - * Virtual type brand to maintain a distinction between {@link UpdateDefinition} types with different return types. - * This field is not present at run-time. - */ - [retBrand]: Ret; -} - -/** - * An interface representing a Workflow signal definition, as returned from {@link defineSignal} - * - * @remarks `Args` can be used for parameter type inference in handler functions and WorkflowHandle methods. - * `Name` can optionally be specified with a string literal type to preserve type-level knowledge of the signal name. - */ -export interface SignalDefinition { - type: 'signal'; - name: Name; - /** - * Virtual type brand to maintain a distinction between {@link SignalDefinition} types with different args. - * This field is not present at run-time. - */ - [argsBrand]: Args; -} - -/** - * An interface representing a Workflow query definition as returned from {@link defineQuery} - * - * @remarks `Args` and `Ret` can be used for parameter type inference in handler functions and WorkflowHandle methods. - * `Name` can optionally be specified with a string literal type to preserve type-level knowledge of the query name. - */ -export interface QueryDefinition { - type: 'query'; - name: Name; - /** - * Virtual type brand to maintain a distinction between {@link QueryDefinition} types with different args. - * This field is not present at run-time. - */ - [argsBrand]: Args; - /** - * Virtual type brand to maintain a distinction between {@link QueryDefinition} types with different return types. - * This field is not present at run-time. - */ - [retBrand]: Ret; -} - -/** Get the "unwrapped" return type (without Promise) of the execute handler from Workflow type `W` */ -export type WorkflowResultType = ReturnType extends Promise ? R : never; - -export interface ActivityFunction

{ - (...args: P): Promise; -} - -/** - * Mapping of Activity name to function - * @deprecated not required anymore, for untyped activities use {@link UntypedActivities} - */ -export type ActivityInterface = Record; - -/** - * Mapping of Activity name to function - */ -export type UntypedActivities = Record; - -/** - * A workflow's history and ID. Useful for replay. - */ -export interface HistoryAndWorkflowId { - workflowId: string; - history: temporal.api.history.v1.History | unknown | undefined; -} - -/** - * Policy defining actions taken when a workflow exits while update or signal handlers are running. - * The workflow exit may be due to successful return, failure, cancellation, or continue-as-new. - */ -export const HandlerUnfinishedPolicy = { - /** - * Issue a warning in addition to abandoning the handler execution. The warning will not be issued if the workflow fails. - */ - WARN_AND_ABANDON: 'WARN_AND_ABANDON', - - /** - * Abandon the handler execution. - * - * In the case of an update handler this means that the client will receive an error rather than - * the update result. - */ - ABANDON: 'ABANDON', -} as const; -export type HandlerUnfinishedPolicy = (typeof HandlerUnfinishedPolicy)[keyof typeof HandlerUnfinishedPolicy]; diff --git a/node_modules/@temporalio/common/src/internal-non-workflow/codec-helpers.ts b/node_modules/@temporalio/common/src/internal-non-workflow/codec-helpers.ts deleted file mode 100644 index eefb6f7..0000000 --- a/node_modules/@temporalio/common/src/internal-non-workflow/codec-helpers.ts +++ /dev/null @@ -1,408 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -import { Payload } from '../interfaces'; -import { - arrayFromPayloads, - convertOptionalToPayload, - fromPayloadsAtIndex, - toPayloads, -} from '../converter/payload-converter'; -import { PayloadConverterError } from '../errors'; -import { PayloadCodec } from '../converter/payload-codec'; -import { ProtoFailure } from '../failure'; -import { LoadedDataConverter } from '../converter/data-converter'; -import { UserMetadata } from '../user-metadata'; -import { DecodedPayload, DecodedProtoFailure, EncodedPayload, EncodedProtoFailure } from './codec-types'; - -/** - * Decode through each codec, starting with the last codec. - */ -export async function decode(codecs: PayloadCodec[], payloads: Payload[]): Promise { - for (let i = codecs.length - 1; i >= 0; i--) { - payloads = await codecs[i]!.decode(payloads); - } - return payloads as DecodedPayload[]; -} - -/** - * Encode through each codec, starting with the first codec. - */ -export async function encode(codecs: PayloadCodec[], payloads: Payload[]): Promise { - for (let i = 0; i < codecs.length; i++) { - payloads = await codecs[i]!.encode(payloads); - } - return payloads as EncodedPayload[]; -} - -/** Run {@link PayloadCodec.encode} on `payloads` */ -export async function encodeOptional( - codecs: PayloadCodec[], - payloads: Payload[] | null | undefined -): Promise { - if (payloads == null) return payloads; - return await encode(codecs, payloads); -} - -/** Run {@link PayloadCodec.decode} on `payloads` */ -export async function decodeOptional( - codecs: PayloadCodec[], - payloads: Payload[] | null | undefined -): Promise { - if (payloads == null) return payloads; - return await decode(codecs, payloads); -} - -async function encodeSingle(codecs: PayloadCodec[], payload: Payload): Promise { - const encodedPayloads = await encode(codecs, [payload]); - return encodedPayloads[0] as EncodedPayload; -} - -async function decodeSingle(codecs: PayloadCodec[], payload: Payload): Promise { - const [decodedPayload] = await decode(codecs, [payload]); - return decodedPayload!; -} - -/** Run {@link PayloadCodec.encode} on a single Payload */ -export async function encodeOptionalSingle( - codecs: PayloadCodec[], - payload: Payload | null | undefined -): Promise { - if (payload == null) return payload; - return await encodeSingle(codecs, payload); -} - -/** Run {@link PayloadCodec.decode} on a single Payload */ -export async function decodeOptionalSingle( - codecs: PayloadCodec[], - payload: Payload | null | undefined -): Promise { - if (payload == null) return payload; - return await decodeSingle(codecs, payload); -} - -/** Run {@link PayloadCodec.decode} and convert from a single Payload */ -export async function decodeOptionalSinglePayload( - dataConverter: LoadedDataConverter, - payload?: Payload | null | undefined -): Promise { - const { payloadConverter, payloadCodecs } = dataConverter; - const decoded = await decodeOptionalSingle(payloadCodecs, payload); - if (decoded == null) return decoded; - return payloadConverter.fromPayload(decoded); -} - -/** - * Run {@link PayloadConverter.toPayload} on value, and then encode it. - */ -export async function encodeToPayload(converter: LoadedDataConverter, value: unknown): Promise { - const { payloadConverter, payloadCodecs } = converter; - return await encodeSingle(payloadCodecs, payloadConverter.toPayload(value)); -} - -/** - * Decode `payloads` and then return {@link arrayFromPayloads}`. - */ -export async function decodeArrayFromPayloads( - converter: LoadedDataConverter, - payloads?: Payload[] | null -): Promise { - const { payloadConverter, payloadCodecs } = converter; - return arrayFromPayloads(payloadConverter, await decodeOptional(payloadCodecs, payloads)); -} - -/** - * Decode `payloads` and then return {@link fromPayloadsAtIndex}. - */ -export async function decodeFromPayloadsAtIndex( - converter: LoadedDataConverter, - index: number, - payloads?: Payload[] | null -): Promise { - const { payloadConverter, payloadCodecs } = converter; - return await fromPayloadsAtIndex(payloadConverter, index, await decodeOptional(payloadCodecs, payloads)); -} - -/** - * Run {@link decodeFailure} and then return {@link failureToError}. - */ -export async function decodeOptionalFailureToOptionalError( - converter: LoadedDataConverter, - failure: ProtoFailure | undefined | null -): Promise { - const { failureConverter, payloadConverter, payloadCodecs } = converter; - return failure - ? failureConverter.failureToError(await decodeFailure(payloadCodecs, failure), payloadConverter) - : undefined; -} - -export async function decodeOptionalMap( - codecs: PayloadCodec[], - payloads: Record | null | undefined -): Promise | null | undefined> { - if (payloads == null) return payloads; - return Object.fromEntries( - await Promise.all(Object.entries(payloads).map(async ([k, v]) => [k, (await decode(codecs, [v]))[0]])) - ); -} - -/** - * Run {@link PayloadConverter.toPayload} on values, and then encode them. - */ -export async function encodeToPayloads( - converter: LoadedDataConverter, - ...values: unknown[] -): Promise { - const { payloadConverter, payloadCodecs } = converter; - if (values.length === 0) { - return undefined; - } - const payloads = toPayloads(payloadConverter, ...values); - return payloads ? await encode(payloadCodecs, payloads) : undefined; -} - -/** - * Run {@link PayloadCodec.decode} and then {@link PayloadConverter.fromPayload} on values in `map`. - */ -export async function decodeMapFromPayloads( - converter: LoadedDataConverter, - map: Record | null | undefined -): Promise | undefined> { - if (!map) return undefined; - const { payloadConverter, payloadCodecs } = converter; - return Object.fromEntries( - await Promise.all( - Object.entries(map).map(async ([k, payload]): Promise<[K, unknown]> => { - const [decodedPayload] = await decode(payloadCodecs, [payload as Payload]); - const value = payloadConverter.fromPayload(decodedPayload!); - return [k as K, value]; - }) - ) - ) as Record; -} - -/** Run {@link PayloadCodec.encode} on all values in `map` */ -export async function encodeMap( - codecs: PayloadCodec[], - map: Record | null | undefined -): Promise | null | undefined> { - if (map === null) return null; - if (map === undefined) return undefined; - return Object.fromEntries( - await Promise.all( - Object.entries(map).map(async ([k, payload]): Promise<[K, EncodedPayload]> => { - return [k as K, await encodeSingle(codecs, payload as Payload)]; - }) - ) - ) as Record; -} - -/** - * Run {@link PayloadConverter.toPayload} and then {@link PayloadCodec.encode} on values in `map`. - */ -export async function encodeMapToPayloads( - converter: LoadedDataConverter, - map: Record -): Promise> { - const { payloadConverter, payloadCodecs } = converter; - return Object.fromEntries( - await Promise.all( - Object.entries(map).map(async ([k, v]): Promise<[K, Payload]> => { - const payload = payloadConverter.toPayload(v); - if (payload === undefined) throw new PayloadConverterError(`Failed to encode entry: ${k}: ${v}`); - const [encodedPayload] = await encode(payloadCodecs, [payload]); - return [k as K, encodedPayload!]; - }) - ) - ) as Record; -} - -/** - * Run {@link errorToFailure} on `error`, and then {@link encodeFailure}. - */ -export async function encodeErrorToFailure(dataConverter: LoadedDataConverter, error: unknown): Promise { - const { failureConverter, payloadConverter, payloadCodecs } = dataConverter; - return await encodeFailure(payloadCodecs, failureConverter.errorToFailure(error, payloadConverter)); -} - -/** - * Return a new {@link ProtoFailure} with `codec.encode()` run on all the {@link Payload}s. - */ -export async function encodeFailure(codecs: PayloadCodec[], failure: ProtoFailure): Promise { - return { - ...failure, - encodedAttributes: failure.encodedAttributes ? (await encode(codecs, [failure.encodedAttributes]))[0] : undefined, - cause: failure.cause ? await encodeFailure(codecs, failure.cause) : null, - applicationFailureInfo: failure.applicationFailureInfo - ? { - ...failure.applicationFailureInfo, - details: failure.applicationFailureInfo.details - ? { - payloads: await encode(codecs, failure.applicationFailureInfo.details.payloads ?? []), - } - : undefined, - } - : undefined, - timeoutFailureInfo: failure.timeoutFailureInfo - ? { - ...failure.timeoutFailureInfo, - lastHeartbeatDetails: failure.timeoutFailureInfo.lastHeartbeatDetails - ? { - payloads: await encode(codecs, failure.timeoutFailureInfo.lastHeartbeatDetails.payloads ?? []), - } - : undefined, - } - : undefined, - canceledFailureInfo: failure.canceledFailureInfo - ? { - ...failure.canceledFailureInfo, - details: failure.canceledFailureInfo.details - ? { - payloads: await encode(codecs, failure.canceledFailureInfo.details.payloads ?? []), - } - : undefined, - } - : undefined, - resetWorkflowFailureInfo: failure.resetWorkflowFailureInfo - ? { - ...failure.resetWorkflowFailureInfo, - lastHeartbeatDetails: failure.resetWorkflowFailureInfo.lastHeartbeatDetails - ? { - payloads: await encode(codecs, failure.resetWorkflowFailureInfo.lastHeartbeatDetails.payloads ?? []), - } - : undefined, - } - : undefined, - }; -} - -/** - * Return a new {@link ProtoFailure} with `codec.decode()` run on all the {@link Payload}s. - */ -export async function decodeFailure(codecs: PayloadCodec[], failure: ProtoFailure): Promise { - return { - ...failure, - encodedAttributes: failure.encodedAttributes ? (await decode(codecs, [failure.encodedAttributes]))[0] : undefined, - cause: failure.cause ? await decodeFailure(codecs, failure.cause) : null, - applicationFailureInfo: failure.applicationFailureInfo - ? { - ...failure.applicationFailureInfo, - details: failure.applicationFailureInfo.details - ? { - payloads: await decode(codecs, failure.applicationFailureInfo.details.payloads ?? []), - } - : undefined, - } - : undefined, - timeoutFailureInfo: failure.timeoutFailureInfo - ? { - ...failure.timeoutFailureInfo, - lastHeartbeatDetails: failure.timeoutFailureInfo.lastHeartbeatDetails - ? { - payloads: await decode(codecs, failure.timeoutFailureInfo.lastHeartbeatDetails.payloads ?? []), - } - : undefined, - } - : undefined, - canceledFailureInfo: failure.canceledFailureInfo - ? { - ...failure.canceledFailureInfo, - details: failure.canceledFailureInfo.details - ? { - payloads: await decode(codecs, failure.canceledFailureInfo.details.payloads ?? []), - } - : undefined, - } - : undefined, - resetWorkflowFailureInfo: failure.resetWorkflowFailureInfo - ? { - ...failure.resetWorkflowFailureInfo, - lastHeartbeatDetails: failure.resetWorkflowFailureInfo.lastHeartbeatDetails - ? { - payloads: await decode(codecs, failure.resetWorkflowFailureInfo.lastHeartbeatDetails.payloads ?? []), - } - : undefined, - } - : undefined, - }; -} - -/** - * Return a new {@link ProtoFailure} with `codec.encode()` run on all the {@link Payload}s. - */ -export async function encodeOptionalFailure( - codecs: PayloadCodec[], - failure: ProtoFailure | null | undefined -): Promise { - if (failure == null) return failure; - return await encodeFailure(codecs, failure); -} - -/** - * Return a new {@link ProtoFailure} with `codec.encode()` run on all the {@link Payload}s. - */ -export async function decodeOptionalFailure( - codecs: PayloadCodec[], - failure: ProtoFailure | null | undefined -): Promise { - if (failure == null) return failure; - return await decodeFailure(codecs, failure); -} - -/** - * Mark all values in the map as encoded. - * Use this for headers, which we don't encode. - */ -export function noopEncodeMap( - map: Record | null | undefined -): Record | null | undefined { - return map as Record | null | undefined; -} - -export function noopEncodeSearchAttrs( - attrs: temporal.api.common.v1.ISearchAttributes | null | undefined -): temporal.api.common.v1.ISearchAttributes | null | undefined { - if (!attrs) { - return attrs; - } - return { - indexedFields: noopEncodeMap(attrs.indexedFields), - }; -} - -/** - * Mark all values in the map as decoded. - * Use this for headers, which we don't encode. - */ -export function noopDecodeMap( - map: Record | null | undefined -): Record | null | undefined { - return map as Record | null | undefined; -} - -export async function encodeUserMetadata( - dataConverter: LoadedDataConverter, - staticSummary: string | undefined, - staticDetails: string | undefined -): Promise { - if (staticSummary == null && staticDetails == null) return undefined; - - const { payloadConverter, payloadCodecs } = dataConverter; - const summary = await encodeOptionalSingle(payloadCodecs, convertOptionalToPayload(payloadConverter, staticSummary)); - const details = await encodeOptionalSingle(payloadCodecs, convertOptionalToPayload(payloadConverter, staticDetails)); - - if (summary == null && details == null) return undefined; - - return { summary, details }; -} - -export async function decodeUserMetadata( - dataConverter: LoadedDataConverter, - metadata: temporal.api.sdk.v1.IUserMetadata | undefined | null -): Promise { - const res = { staticSummary: undefined, staticDetails: undefined }; - if (metadata == null) return res; - - const staticSummary = (await decodeOptionalSinglePayload(dataConverter, metadata.summary)) ?? undefined; - const staticDetails = (await decodeOptionalSinglePayload(dataConverter, metadata.details)) ?? undefined; - - return { staticSummary, staticDetails }; -} diff --git a/node_modules/@temporalio/common/src/internal-non-workflow/codec-types.ts b/node_modules/@temporalio/common/src/internal-non-workflow/codec-types.ts deleted file mode 100644 index 814cbe7..0000000 --- a/node_modules/@temporalio/common/src/internal-non-workflow/codec-types.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { Payload } from '../interfaces'; -import type { ProtoFailure } from '../failure'; - -export interface EncodedPayload extends Payload { - encoded: true; -} - -export interface DecodedPayload extends Payload { - decoded: true; -} - -/** Replace `Payload`s with `EncodedPayload`s */ -export type Encoded = ReplaceNested; - -/** Replace `Payload`s with `DecodedPayload`s */ -export type Decoded = ReplaceNested; - -export type EncodedProtoFailure = Encoded; -export type DecodedProtoFailure = Decoded; - -/** An object T with any nested values of type ToReplace replaced with ReplaceWith */ -export type ReplaceNested = T extends (...args: any[]) => any - ? T - : [keyof T] extends [never] - ? T - : T extends Record // Special exception for Nexus Headers. - ? T - : T extends { [k: string]: ToReplace } - ? { - [P in keyof T]: ReplaceNested; - } - : T extends ToReplace - ? ReplaceWith | Exclude - : { - [P in keyof T]: ReplaceNested; - }; diff --git a/node_modules/@temporalio/common/src/internal-non-workflow/data-converter-helpers.ts b/node_modules/@temporalio/common/src/internal-non-workflow/data-converter-helpers.ts deleted file mode 100644 index 258ed89..0000000 --- a/node_modules/@temporalio/common/src/internal-non-workflow/data-converter-helpers.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { PayloadConverter, defaultPayloadConverter } from '../converter/payload-converter'; -import { DataConverter, defaultFailureConverter, LoadedDataConverter } from '../converter/data-converter'; -import { FailureConverter } from '../converter/failure-converter'; -import { errorCode, hasOwnProperty, isRecord } from '../type-helpers'; -import { ValueError } from '../errors'; - -const isValidPayloadConverter = (converter: unknown, path: string): asserts converter is PayloadConverter => { - const isValid = - typeof converter === 'object' && - converter !== null && - ['toPayload', 'fromPayload'].every( - (method) => typeof (converter as Record)[method] === 'function' - ); - if (!isValid) { - throw new ValueError(`payloadConverter export at ${path} must be an object with toPayload and fromPayload methods`); - } -}; - -const isValidFailureConverter = (converter: unknown, path: string): asserts converter is FailureConverter => { - const isValid = - typeof converter === 'object' && - converter !== null && - ['errorToFailure', 'failureToError'].every( - (method) => typeof (converter as Record)[method] === 'function' - ); - if (!isValid) { - throw new ValueError( - `failureConverter export at ${path} must be an object with errorToFailure and failureToError methods` - ); - } -}; - -function requireConverter( - path: string, - type: string, - validator: (converter: unknown, path: string) => asserts converter is T -): T { - let module; - try { - module = require(path); // eslint-disable-line @typescript-eslint/no-require-imports - } catch (error) { - if (errorCode(error) === 'MODULE_NOT_FOUND') { - throw new ValueError(`Could not find a file at the specified ${type}Path: '${path}'.`); - } - throw error; - } - - if (isRecord(module) && hasOwnProperty(module, type)) { - const converter = module[type]; - validator(converter, path); - return converter; - } else { - throw new ValueError(`Module ${path} does not have a \`${type}\` named export`); - } -} - -/** - * If {@link DataConverter.payloadConverterPath} is specified, `require()` it and validate that the module has a `payloadConverter` named export. - * If not, use {@link defaultPayloadConverter}. - * If {@link DataConverter.payloadCodecs} is unspecified, use an empty array. - */ -export function loadDataConverter(dataConverter?: DataConverter): LoadedDataConverter { - let payloadConverter: PayloadConverter = defaultPayloadConverter; - if (dataConverter?.payloadConverterPath) { - payloadConverter = requireConverter( - dataConverter.payloadConverterPath, - 'payloadConverter', - isValidPayloadConverter - ); - } - let failureConverter: FailureConverter = defaultFailureConverter; - if (dataConverter?.failureConverterPath) { - failureConverter = requireConverter( - dataConverter.failureConverterPath, - 'failureConverter', - isValidFailureConverter - ); - } - return { - payloadConverter, - failureConverter, - payloadCodecs: dataConverter?.payloadCodecs ?? [], - }; -} - -/** - * Returns true if the converter is already "loaded" - */ -export function isLoadedDataConverter( - dataConverter?: DataConverter | LoadedDataConverter -): dataConverter is LoadedDataConverter { - return isRecord(dataConverter) && hasOwnProperty(dataConverter, 'payloadConverter'); -} diff --git a/node_modules/@temporalio/common/src/internal-non-workflow/index.ts b/node_modules/@temporalio/common/src/internal-non-workflow/index.ts deleted file mode 100644 index 11b2fea..0000000 --- a/node_modules/@temporalio/common/src/internal-non-workflow/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Internal SDK library: users should usually use other packages instead. Not included in Workflow bundle. - * - * @module - */ -export * from './codec-helpers'; -export * from './codec-types'; -export * from './data-converter-helpers'; -export * from './parse-host-uri'; -export * from './proxy-config'; -export * from './tls-config'; diff --git a/node_modules/@temporalio/common/src/internal-non-workflow/parse-host-uri.ts b/node_modules/@temporalio/common/src/internal-non-workflow/parse-host-uri.ts deleted file mode 100644 index 68c4ad1..0000000 --- a/node_modules/@temporalio/common/src/internal-non-workflow/parse-host-uri.ts +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file contain helper functions to parse specific subsets of URIs. - * - * The ECMAScript-compliant URL class don't properly handle some syntaxes that - * we care about, such as not providing a protocol (e.g. '127.0.0.1:7233'), and - * performs some normalizations that are not desirable for our use cases - * (e.g. parsing 'http://127.0.0.1:7233' adds a '/' path). On the other side, - * simply using `split(':')` breaks on IPv6 addresses. Hence these helpers. - */ - -/** - * Scheme. Requires but doesn't capture the ':' or '://' separator that follows. - * e.g. `http:` will be captured as 'http'. - */ -const scheme = '(?:(?[a-z][a-z0-9]+):(?:\\/\\/)?)'; - -/** - * IPv4-style hostname. Not captured. - * e.g.: `192.168.1.100`. - */ -const ipv4Hostname = '(?:\\d{1,3}(?:\\.\\d{1,3}){3})'; - -/** - * IPv6-style hostname; must be enclosed in square brackets. Not captured. - * e.g.: `[::1]`, `[2001:db8::1]`, `[::FFFF:129.144.52.38]`, etc. - */ -const ipv6Hostname = '(?:\\[(?[0-9a-fA-F.:]+)\\])'; - -// DNS-style hostname. Not captured. -// e.g.: `test.com` or `localhost`. -const dnsHostname = '(?:[^:/]+)'; - -const hostname = `(?:${ipv4Hostname}|${ipv6Hostname}|${dnsHostname})`; - -// Port number. Requires but don't capture a preceeding ':' separator. -// For example, `:7233` will be captured as `7233`. -const port = '(?::(?\\d+))'; - -const protoHostPortRegex = new RegExp(`^${scheme}??(?${hostname})${port}?$`); - -export interface ProtoHostPort { - scheme?: string; - hostname: string; - port?: number; -} - -/** - * Split a URI composed only of a scheme, a hostname, and port. - * The scheme and port are optional. - * - * Examples of valid URIs for HTTP CONNECT proxies: - * - * ``` - * http://test.com:8080 => { scheme: 'http', host: 'test.com', port: 8080 } - * http://192.168.0.1:8080 => { scheme: 'http', host: '192.168.0.1', port: 8080 } - * [::1]:8080 => { scheme: 'http', host: '::1', port: 8080 } - * [::ffff:192.0.2.128]:8080 => { scheme: 'http', host: '::ffff:192.0.2.128', port: 8080 } - * 192.168.0.1:8080 => { scheme: 'http', host: '192.168.0.1', port: 8080 } - * ``` - */ -export function splitProtoHostPort(uri: string): ProtoHostPort | undefined { - const match = protoHostPortRegex.exec(uri); - if (!match?.groups) return undefined; - return { - scheme: match.groups.scheme, - hostname: match.groups.ipv6 ?? match.groups.hostname!, - port: match.groups.port !== undefined ? Number(match.groups.port) : undefined, - }; -} - -export function joinProtoHostPort(components: ProtoHostPort): string { - const { scheme, hostname, port } = components; - const schemeText = scheme ? `${scheme}:` : ''; - const hostnameText = hostname.includes(':') ? `[${hostname}]` : hostname; - const portText = port !== undefined ? `:${port}` : ''; - return `${schemeText}${hostnameText}${portText}`; -} - -/** - * Parse the address for the gRPC endpoint of a Temporal server. - * - * - The URI may only contain a hostname and a port. - * - Port is optional; if not specified, set it to `defaultPort`. - * - * Examples of valid URIs (assuming `defaultPort` is 7233): - * - * ``` - * 127.0.0.1 => { host: '127.0.0.1', port: 7233 } - * 192.168.0.1:7233 => { host: '192.168.0.1', port: 7233 } - * my.temporal.service.com:7233 => { host: 'my.temporal.service.com', port: 7233 } - * [::ffff:192.0.2.128]:8080 => { host: '[::ffff:192.0.2.128]', port: 8080 } - * ``` - */ -export function normalizeGrpcEndpointAddress(uri: string, defaultPort: number): string { - const splitted = splitProtoHostPort(uri); - if (!splitted || splitted.scheme !== undefined) { - throw new TypeError( - `Invalid address for Temporal gRPC endpoint: expected URI of the form 'hostname' or 'hostname:port'; got '${uri}'` - ); - } - splitted.port ??= defaultPort; - return joinProtoHostPort(splitted); -} diff --git a/node_modules/@temporalio/common/src/internal-non-workflow/proxy-config.ts b/node_modules/@temporalio/common/src/internal-non-workflow/proxy-config.ts deleted file mode 100644 index 44dce35..0000000 --- a/node_modules/@temporalio/common/src/internal-non-workflow/proxy-config.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { ProtoHostPort, splitProtoHostPort } from './parse-host-uri'; - -/** - * Configuration for HTTP CONNECT proxying. - */ -export interface HttpConnectProxyConfig { - type: 'http-connect'; - - /** - * Address of the HTTP CONNECT proxy server, in either `hostname:port` or `http://hostname:port` formats. - * - * Port is required, and only the `http` scheme is supported. Raw IPv6 addresses must be wrapped in square brackets - * (e.g. `[ipv6]:port`). - */ - targetHost: string; - - /** - * Basic auth for the HTTP CONNECT proxy, if any. - * - * Neither username nor password may contain `:` or `@`. - * - * Note that these credentials will be exposed through environment variables, and will be exchanged in non-encrypted - * form ovrer the network. The connection to the proxy server is not encrypted. - */ - basicAuth?: { - username: string; - password: string; - }; -} - -export type ProxyConfig = HttpConnectProxyConfig; - -/** - * Parse the address of a HTTP CONNECT proxy endpoint. - * - * - The URI may only contain a scheme, a hostname, and a port; - * - If specified, scheme must be 'http'; - * - Port is required. - * - * Examples of valid URIs: - * - * ``` - * 127.0.0.1:8080 => { scheme: 'http', host: '192.168.0.1', port: 8080 } - * my.temporal.service.com:8888 => { scheme: 'http', host: 'my.temporal.service.com', port: 8888 } - * [::ffff:192.0.2.128]:8080 => { scheme: 'http', host: '::ffff:192.0.2.128', port: 8080 } - * ``` - */ -export function parseHttpConnectProxyAddress(target: string): ProtoHostPort { - const match = splitProtoHostPort(target); - if (!match) - throw new TypeError( - `Invalid address for HTTP CONNECT proxy: expected 'hostname:port' or '[ipv6 address]:port'; got '${target}'` - ); - const { scheme = 'http', hostname: host, port } = match; - if (scheme !== 'http') - throw new TypeError(`Invalid address for HTTP CONNECT proxy: scheme must be http'; got '${target}'`); - if (port === undefined) - throw new TypeError(`Invalid address for HTTP CONNECT proxy: port is required; got '${target}'`); - return { scheme, hostname: host, port }; -} diff --git a/node_modules/@temporalio/common/src/internal-non-workflow/tls-config.ts b/node_modules/@temporalio/common/src/internal-non-workflow/tls-config.ts deleted file mode 100644 index f24f4a3..0000000 --- a/node_modules/@temporalio/common/src/internal-non-workflow/tls-config.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** TLS configuration options. */ -export interface TLSConfig { - /** - * Overrides the target name (SNI) used for TLS host name checking. - * If this attribute is not specified, the name used for TLS host name checking will be the host from {@link ServerOptions.url}. - * This can be useful when you have reverse proxy in front of temporal server, and you may want to override the SNI to - * direct traffic to the appropriate backend server based on custom routing rules. Oppositely, connections could be refused - * if the provided SNI does not match the expected host. Adding this override should be done with care. - */ - serverNameOverride?: string; - /** - * Root CA certificate used by the server. If not set, and the server's - * cert is issued by someone the operating system trusts, verification will still work (ex: Cloud offering). - */ - serverRootCACertificate?: Uint8Array; - /** Sets the client certificate and key for connecting with mTLS */ - clientCertPair?: { - /** The certificate for this client */ - crt: Uint8Array; - /** The private key for this client */ - key: Uint8Array; - }; -} - -/** - * TLS configuration. - * Pass a falsy value to use a non-encrypted connection or `true` or `{}` to - * connect with TLS without any customization. - */ -export type TLSConfigOption = TLSConfig | boolean | undefined | null; - -/** - * Normalize {@link TLSConfigOption} by turning false and null to undefined and true to and empty object - */ -export function normalizeTlsConfig( - tls: TLSConfigOption, - apiKey?: string | (() => string) | undefined -): TLSConfig | undefined { - tls = tls ?? (apiKey !== undefined ? true : undefined); - return typeof tls === 'object' ? (tls === null ? undefined : tls) : tls ? {} : undefined; -} diff --git a/node_modules/@temporalio/common/src/internal-workflow/enums-helpers.ts b/node_modules/@temporalio/common/src/internal-workflow/enums-helpers.ts deleted file mode 100644 index d510d73..0000000 --- a/node_modules/@temporalio/common/src/internal-workflow/enums-helpers.ts +++ /dev/null @@ -1,301 +0,0 @@ -import { ValueError } from '../errors'; -import { Exact, RemovePrefix, UnionToIntersection } from '../type-helpers'; - -/** - * Create encoding and decoding functions to convert between the numeric `enum` types produced by our - * Protobuf compiler and "const object of strings" enum values that we expose in our public APIs. - * - * ### Usage - * - * Newly introduced enums should follow the following pattern: - * - * ```ts - * const ParentClosePolicy = { - * TERMINATE: 'TERMINATE', - * ABANDON: 'ABANDON', - * REQUEST_CANCEL: 'REQUEST_CANCEL', - * } as const; - * type ParentClosePolicy = (typeof ParentClosePolicy)[keyof typeof ParentClosePolicy]; - * - * const [encodeParentClosePolicy, decodeParentClosePolicy] = // - * makeProtoEnumConverters< - * coresdk.child_workflow.ParentClosePolicy, - * typeof coresdk.child_workflow.ParentClosePolicy, - * keyof typeof coresdk.child_workflow.ParentClosePolicy, - * typeof ParentClosePolicy, - * 'PARENT_CLOSE_POLICY_' // This may be an empty string if the proto enum doesn't add a repeated prefix on values - * >( - * { - * [ParentClosePolicy.TERMINATE]: 1, // These numbers must match the ones in the proto enum - * [ParentClosePolicy.ABANDON]: 2, - * [ParentClosePolicy.REQUEST_CANCEL]: 3, - * - * UNSPECIFIED: 0, - * } as const, - * 'PARENT_CLOSE_POLICY_' - * ); - * ``` - * - * `makeProtoEnumConverters` supports other usage patterns, but they are only meant for - * backward compatibility with former enum definitions and should not be used for new enums. - * - * ### Context - * - * Temporal's Protobuf APIs define several `enum` types; our Protobuf compiler transforms these to - * traditional (i.e. non-const) [TypeScript numeric `enum`s](https://www.typescriptlang.org/docs/handbook/enums.html#numeric-enums). - * - * For various reasons, this is far from ideal: - * - * - Due to the dual nature of non-const TypeScript `enum`s (they are both a type and a value), - * it is not possible to refer to an enum value from code without a "real" import of the enum type - * (i.e. can't simply do `import type ...`). In Workflow code, such an import would result in - * loading our entire Protobuf definitions into the workflow sandbox, adding several megabytes to - * the per-workflow memory footprint, which is unacceptable; to avoid that, we need to maintain - * a mirror copy of each enum types used by in-workflow APIs, and export these from either - * `@temporalio/common` or `@temporalio/workflow`. - * - It is not desirable for users to need an explicit dependency on `@temporalio/proto` just to - * get access to these enum types; we therefore made it a common practice to reexport these enums - * from our public facing packages. However, experience demontrated that these reexports effectively - * resulted in poor and inconsistent documentation coverage compared to mirrored enums types. - * - Our Protobuf enum types tend to follow a verbose and redundant naming convention, which feels - * unatural and excessive according to most TypeScript style guides; e.g. instead of - * `workflowIdReusePolicy: WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE`, - * a TypeScript developer would generally expect to be able to write something similar to - * `workflowIdReusePolicy: 'REJECT_DUPLICATE'`. - * - Because of the way Protobuf works, many of our enum types contain an `UNSPECIFIED` value, which - * is used to explicitly identify a value that is unset. In TypeScript code, the `undefined` value - * already serves that purpose, and is definitely more idiomatic to TS developers, whereas these - * `UNSPECIFIED` values create noise and confusion in our APIs. - * - TypeScript editors generally do a very bad job at providing autocompletion that implies reaching - * for values of a TypeScript enum type, forcing developers to explicitly type in at least part - * of the name of the enum type before they can get autocompletion for its values. On the other - * hand, all TS editors immediately provide autocompletion for string union types. - * - The [TypeScript's official documentation](https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums) - * itself suggests that, in modern TypeScript, the use of `as const` objects may generally suffice - * and may be advantageous over the use of `enum` types. - * - * A const object of strings, combined with a union type of possible string values, provides a much - * more idiomatic syntax and a better DX for TypeScript developers. This however requires a way to - * convert back and forth between the `enum` values produced by the Protobuf compiler and the - * equivalent string values. - * - * This helper dynamically creates these conversion functions for a given Protobuf enum type, - * strongly building upon specific conventions that we have adopted in our Protobuf definitions. - * - * ### Validations - * - * The complex type signature of this helper is there to prevent most potential incoherencies - * that could result from having to manually synchronize the const object of strings enum and the - * conversion table with the proto enum, while not requiring a regular import on the Protobuf enum - * itself (so it can be used safely for enums meant to be used from workflow code). - * - * In particular, failing any of the following invariants will result in build time errors: - * - * - For every key of the form `PREFIX_KEY: number` in the proto enum, excluding the `UNSPECIFIED` key: - * - There MUST be a corresponding `KEY: 'KEY'` entry in the const object of strings enum; - * - There MAY be a corresponding `PREFIX_KEY: 'KEY'` in the const object of strings enum - * (this is meant to preserve backward compatibility with the former syntax; such aliases should - * not be added for new enums and enum entries introduced going forward); - * - There MUST be a corresponding `KEY: number` in the mapping table. - * - If the proto enum contains a `PREFIX_UNSPECIFIED` entry, then: - * - There MAY be a corresponding `PREFIX_UNSPECIFIED: undefined` and/or `UNSPECIFIED: undefined` - * entries in the const object of strings enum — this is meant to preserve backward compatibility - * with the former syntax; this alias should not be added for new enums introduced going forward; - * - There MUST be an `UNSPECIFIED: 0` in the mapping table. - * - The const object of strings enum MUST NOT contain any other keys than the ones mandated or - * optionally allowed be the preceeding rules. - * - The mapping table MUST NOT contain any other keys than the ones mandated above. - * - * These rules notably ensure that whenever a new value is added to an existing Proto enum, the code - * will fail to compile until the corresponding entry is added on the const object of strings enum - * and the mapping table. - * - * @internal - */ -export function makeProtoEnumConverters< - ProtoEnumValue extends number, - ProtoEnum extends { [k in ProtoEnumKey]: ProtoEnumValue }, - ProtoEnumKey extends `${Prefix}${string}`, - StringEnumTypeActual extends Exact, - Prefix extends string, - // - // Parameters after this point will be inferred; they're not meant not to be specified by developers - Unspecified = ProtoEnumKey extends `${Prefix}UNSPECIFIED` ? 'UNSPECIFIED' : never, - ShortStringEnumKey extends RemovePrefix = Exclude< - RemovePrefix, - Unspecified - >, - StringEnumType extends ProtoConstObjectOfStringsEnum< - ShortStringEnumKey, - Prefix, - Unspecified - > = ProtoConstObjectOfStringsEnum, - MapTable extends ProtoEnumToConstObjectOfStringMapTable< - StringEnumType, - ProtoEnumValue, - ProtoEnum, - ProtoEnumKey, - Prefix, - Unspecified, - ShortStringEnumKey - > = ProtoEnumToConstObjectOfStringMapTable< - StringEnumType, - ProtoEnumValue, - ProtoEnum, - ProtoEnumKey, - Prefix, - Unspecified, - ShortStringEnumKey - >, ->( - mapTable: MapTable, - prefix: Prefix -): [ - ( - input: ShortStringEnumKey | `${Prefix}${ShortStringEnumKey}` | ProtoEnumValue | null | undefined - ) => ProtoEnumValue | undefined, // - (input: ProtoEnumValue | null | undefined) => ShortStringEnumKey | undefined, // -] { - const reverseTable: Record = Object.fromEntries( - Object.entries(mapTable).map(([k, v]) => [v, k]) - ); - const hasUnspecified = (mapTable as any)['UNSPECIFIED'] === 0 || (mapTable as any)[`${prefix}UNSPECIFIED`] === 0; - - function isShortStringEnumKeys(x: unknown): x is ShortStringEnumKey { - return typeof x === 'string' && x in mapTable; - } - - function isNumericEnumValue(x: unknown): x is ProtoEnum[keyof ProtoEnum] { - return typeof x === 'number' && x in reverseTable; - } - - function encode( - input: ShortStringEnumKey | `${Prefix}${ShortStringEnumKey}` | ProtoEnumValue | null | undefined - ): ProtoEnumValue | undefined { - if (input == null) { - return undefined; - } else if (typeof input === 'string') { - let shorten: string = input; - if (shorten.startsWith(prefix)) { - shorten = shorten.slice(prefix.length); - } - if (isShortStringEnumKeys(shorten)) { - return mapTable[shorten]; - } - throw new ValueError(`Invalid enum value: '${input}'`); - } else if (typeof input === 'number') { - return input; - } else { - throw new ValueError(`Invalid enum value: '${input}' of type ${typeof input}`); - } - } - - function decode(input: ProtoEnumValue | null | undefined): ShortStringEnumKey | undefined { - if (input == null) { - return undefined; - } else if (typeof input === 'number') { - if (hasUnspecified && input === 0) { - return undefined; - } - - if (isNumericEnumValue(input)) { - return reverseTable[input]; - } - - // We got a proto enum value that we don't yet know about (i.e. it didn't exist when this code - // was compiled). This is certainly a possibility, but given how our APIs evolve, this is is - // unlikely to be a terribly bad thing by itself (we avoid adding new enum values in places - // that would break backward compatibility with existing deployed code). Therefore, throwing - // on "unexpected" values is likely to end up causing more problems than it might avoid, - // especially given that the decoded value may actually never get read anwyay. - // - // Therefore, we instead cheat on type constraints and return a string of the form "unknown_23". - // That somewhat mirrors the behavior we'd get with the pure numerical approach. - return `unknown_${input}` as ShortStringEnumKey; - } - - throw new ValueError(`Invalid proto enum value: '${input}' of type ${typeof input}`); - } - - return [encode, decode] as const; -} - -/** - * Given the exploded parameters of a proto enum (i.e. short keys, prefix, and short key of the - * unspecified value), make a type that _exactly_ corresponds to the const object of strings enum, - * e.g. the type that the developer is expected to write. - * - * For example, for coresdk.child_workflow.ParentClosePolicy, this evaluates to: - * - * { - * TERMINATE: "TERMINATE"; - * ABANDON: "ABANDON"; - * REQUEST_CANCEL: "REQUEST_CANCEL"; - * - * PARENT_CLOSE_POLICY_TERMINATE?: "TERMINATE"; - * PARENT_CLOSE_POLICY_ABANDON?: "ABANDON"; - * PARENT_CLOSE_POLICY_REQUEST_CANCEL?: "REQUEST_CANCEL"; - * - * PARENT_CLOSE_POLICY_UNSPECIFIED?: undefined; - * } - */ -type ProtoConstObjectOfStringsEnum< - ShortStringEnumKey extends string, - Prefix extends string, - Unspecified, // e.g. 'UNSPECIFIED' -> = UnionToIntersection< - | { - // e.g.: "TERMINATE": "TERMINATE" - readonly [k in ShortStringEnumKey]: k; - } - | { - [k in ShortStringEnumKey]: Prefix extends '' - ? object - : { - // e.g.: "PARENT_CLOSE_POLICY_TERMINATE"?: "TERMINATE" - readonly [kk in `${Prefix}${k}`]?: k; - }; - }[ShortStringEnumKey] - | (Unspecified extends string - ? { - // e.g.: "PARENT_CLOSE_POLICY_UNSPECIFIED"?: undefined - [k in `${Prefix}${Unspecified}`]?: undefined; - } - : object) - | (Unspecified extends string - ? { - // e.g.: "UNSPECIFIED"?: undefined - [k in `${Unspecified}`]?: undefined; - } - : object) ->; - -/** - * Given the exploded parameters of a proto enum (i.e. short keys, prefix, and short key of the - * unspecified value), make a type that _exactly_ corresponds to the mapping table that the user is - * expected to provide. - * - * For example, for coresdk.child_workflow.ParentClosePolicy, this evaluates to: - * - * { - * UNSPECIFIED: 0, - * TERMINATE: 1, - * ABANDON: 2, - * REQUEST_CANCEL: 3, - * } - */ -type ProtoEnumToConstObjectOfStringMapTable< - _StringEnum extends ProtoConstObjectOfStringsEnum, - ProtoEnumValue extends number, - ProtoEnum extends { [k in ProtoEnumKey]: ProtoEnumValue }, - ProtoEnumKey extends `${Prefix}${string}`, - Prefix extends string, - Unspecified, - ShortStringEnumKey extends RemovePrefix, -> = UnionToIntersection< - { - [k in ProtoEnumKey]: { - [kk in RemovePrefix]: ProtoEnum[k] extends number ? ProtoEnum[k] : never; - }; - }[ProtoEnumKey] ->; diff --git a/node_modules/@temporalio/common/src/internal-workflow/index.ts b/node_modules/@temporalio/common/src/internal-workflow/index.ts deleted file mode 100644 index 3b95782..0000000 --- a/node_modules/@temporalio/common/src/internal-workflow/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './enums-helpers'; -export { - filterNullAndUndefined, - mergeObjects, - // ts-prune-ignore-next - deepMerge, -} from './objects-helpers'; diff --git a/node_modules/@temporalio/common/src/internal-workflow/objects-helpers.ts b/node_modules/@temporalio/common/src/internal-workflow/objects-helpers.ts deleted file mode 100644 index a1659e3..0000000 --- a/node_modules/@temporalio/common/src/internal-workflow/objects-helpers.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Helper to prevent `undefined` and `null` values overriding defaults when merging maps. - */ -export function filterNullAndUndefined>(obj: T): T { - return Object.fromEntries(Object.entries(obj).filter(([_k, v]) => v != null)) as any; -} - -/** - * Merge two objects, possibly removing keys. - * - * More specifically: - * - Any key/value pair in `delta` overrides the corresponding key/value pair in `original`; - * - A key present in `delta` with value `undefined` removes the key from the resulting object; - * - If `original` is `undefined` or empty, return `delta`; - * - If `delta` is `undefined` or empty, return `original` (or undefined if `original` is also undefined); - * - If there are no changes, then return `original`. - */ -export function mergeObjects>(original: T, delta: T | undefined): T; -export function mergeObjects>( - original: T | undefined, - delta: T | undefined -): T | undefined { - if (original == null) return delta; - if (delta == null) return original; - - const merged: Record = { ...original }; - let changed = false; - for (const [k, v] of Object.entries(delta)) { - if (v !== merged[k]) { - if (v == null) delete merged[k]; - else merged[k] = v; - changed = true; - } - } - - return changed ? (merged as T) : original; -} - -function isObject(item: any): item is Record { - return item && typeof item === 'object' && !Array.isArray(item); -} - -/** - * Recursively merges two objects, returning a new object. - * - * Properties from `source` will overwrite properties on `target`. - * Nested objects are merged recursively. - * - * Object fields in the returned object are references, as in, - * the returned object is not completely fresh. - */ -export function deepMerge>(target: T, source: Partial): T { - const output = { ...target }; - - if (isObject(target) && isObject(source)) { - for (const key of Object.keys(source)) { - const sourceValue = source[key]; - if (isObject(sourceValue) && key in target && isObject(target[key] as any)) { - output[key as keyof T] = deepMerge(target[key], sourceValue); - } else { - (output as any)[key] = sourceValue; - } - } - } - - return output; -} diff --git a/node_modules/@temporalio/common/src/logger.ts b/node_modules/@temporalio/common/src/logger.ts deleted file mode 100644 index 401c5c2..0000000 --- a/node_modules/@temporalio/common/src/logger.ts +++ /dev/null @@ -1,169 +0,0 @@ -import { filterNullAndUndefined, mergeObjects } from './internal-workflow'; - -export type LogLevel = 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR'; - -export type LogMetadata = Record; - -/** - * Implement this interface in order to customize worker logging - */ -export interface Logger { - log(level: LogLevel, message: string, meta?: LogMetadata): any; - trace(message: string, meta?: LogMetadata): any; - debug(message: string, meta?: LogMetadata): any; - info(message: string, meta?: LogMetadata): any; - warn(message: string, meta?: LogMetadata): any; - error(message: string, meta?: LogMetadata): any; -} - -/** - * Possible values of the `sdkComponent` meta attributes on log messages. This - * attribute indicates which subsystem emitted the log message; this may for - * example be used to implement fine-grained filtering of log messages. - * - * Note that there is no guarantee that this list will remain stable in the - * future; values may be added or removed, and messages that are currently - * emitted with some `sdkComponent` value may use a different value in the future. - */ -export enum SdkComponent { - /** - * Component name for messages emited from Workflow code, using the {@link Workflow context logger|workflow.log}. - * The SDK itself never publishes messages with this component name. - */ - workflow = 'workflow', - - /** - * Component name for messages emited from an activity, using the {@link activity context logger|Context.log}. - * The SDK itself never publishes messages with this component name. - */ - activity = 'activity', - - /** - * Component name for messages emited from a Nexus Operation Handler, using the Nexus context logger. - * The SDK itself never publishes messages with this component name. - */ - nexus = 'nexus', - - /** - * Component name for messages emited from a Temporal Worker instance. - * - * This notably includes: - * - Issues with Worker or runtime configuration, or the JS execution environment; - * - Worker's, Activity's, and Workflow's lifecycle events; - * - Workflow Activation and Activity Task processing events; - * - Workflow bundling messages; - * - Sink processing issues. - */ - worker = 'worker', - - /** - * Component name for all messages emitted by the Rust Core SDK library. - */ - core = 'core', -} - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * @internal - * @hidden - */ -export type LogMetaOrFunc = LogMetadata | (() => LogMetadata); - -/** - * A logger implementation that adds metadata before delegating calls to a parent logger. - * - * @internal - * @hidden - */ -export class LoggerWithComposedMetadata implements Logger { - /** - * Return a {@link Logger} that adds metadata before delegating calls to a parent logger. - * - * New metadata may either be specified statically as a delta object, or as a function evaluated - * every time a log is emitted that will return a delta object. - * - * Some optimizations are performed to avoid creating unnecessary objects and to keep runtime - * overhead associated with resolving metadata as low as possible. - */ - public static compose(logger: Logger, metaOrFunc: LogMetaOrFunc): Logger { - // Flatten recursive LoggerWithComposedMetadata instances - if (logger instanceof LoggerWithComposedMetadata) { - const contributors = appendToChain(logger.contributors, metaOrFunc); - // If the new contributor results in no actual change to the chain, then we don't need a new logger - if (contributors === undefined) return logger; - return new LoggerWithComposedMetadata(logger.parentLogger, contributors); - } else { - const contributors = appendToChain(undefined, metaOrFunc); - if (contributors === undefined) return logger; - return new LoggerWithComposedMetadata(logger, contributors); - } - } - - constructor( - private readonly parentLogger: Logger, - private readonly contributors: LogMetaOrFunc[] - ) {} - - log(level: LogLevel, message: string, extraMeta?: LogMetadata): void { - this.parentLogger.log(level, message, resolveMetadata(this.contributors, extraMeta)); - } - - trace(message: string, extraMeta?: LogMetadata): void { - this.parentLogger.trace(message, resolveMetadata(this.contributors, extraMeta)); - } - - debug(message: string, extraMeta?: LogMetadata): void { - this.parentLogger.debug(message, resolveMetadata(this.contributors, extraMeta)); - } - - info(message: string, extraMeta?: LogMetadata): void { - this.parentLogger.info(message, resolveMetadata(this.contributors, extraMeta)); - } - - warn(message: string, extraMeta?: LogMetadata): void { - this.parentLogger.warn(message, resolveMetadata(this.contributors, extraMeta)); - } - - error(message: string, extraMeta?: LogMetadata): void { - this.parentLogger.error(message, resolveMetadata(this.contributors, extraMeta)); - } -} - -function resolveMetadata(contributors: LogMetaOrFunc[], extraMeta?: LogMetadata): LogMetadata { - const resolved = {}; - for (const contributor of contributors) { - Object.assign(resolved, typeof contributor === 'function' ? contributor() : contributor); - } - Object.assign(resolved, extraMeta); - return filterNullAndUndefined(resolved); -} - -/** - * Append a metadata contributor to the chain, merging it with the former last contributor if both are plain objects - */ -function appendToChain( - existingContributors: LogMetaOrFunc[] | undefined, - newContributor: LogMetaOrFunc -): LogMetaOrFunc[] | undefined { - // If the new contributor is an empty object, then it results in no actual change to the chain - if (typeof newContributor === 'object' && Object.keys(newContributor).length === 0) { - return existingContributors; - } - - // If existing chain is empty, then the new contributor is the chain - if (existingContributors == null || existingContributors.length === 0) { - return [newContributor]; - } - - // If both last contributor and new contributor are plain objects, merge them to a single object. - const last = existingContributors[existingContributors.length - 1]; - if (typeof last === 'object' && typeof newContributor === 'object') { - const merged = mergeObjects(last, newContributor); - if (merged === last) return existingContributors; - return [...existingContributors.slice(0, -1), merged]; - } - - // Otherwise, just append the new contributor to the chain. - return [...existingContributors, newContributor]; -} diff --git a/node_modules/@temporalio/common/src/metrics.ts b/node_modules/@temporalio/common/src/metrics.ts deleted file mode 100644 index 92a7788..0000000 --- a/node_modules/@temporalio/common/src/metrics.ts +++ /dev/null @@ -1,485 +0,0 @@ -import { filterNullAndUndefined, mergeObjects } from './internal-workflow'; - -/** - * A meter for creating metrics to record values on. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export interface MetricMeter { - /** - * Create a new counter metric that supports adding values. - * - * @param name Name for the counter metric. - * @param unit Unit for the counter metric. Optional. - * @param description Description for the counter metric. Optional. - */ - createCounter(name: string, unit?: string, description?: string): MetricCounter; - - /** - * Create a new histogram metric that supports recording values. - * - * @param name Name for the histogram metric. - * @param valueType Type of value to record. Defaults to `int`. - * @param unit Unit for the histogram metric. Optional. - * @param description Description for the histogram metric. Optional. - */ - createHistogram( - name: string, - valueType?: NumericMetricValueType, - unit?: string, - description?: string - ): MetricHistogram; - - /** - * Create a new gauge metric that supports setting values. - * - * @param name Name for the gauge metric. - * @param valueType Type of value to set. Defaults to `int`. - * @param unit Unit for the gauge metric. Optional. - * @param description Description for the gauge metric. Optional. - */ - createGauge(name: string, valueType?: NumericMetricValueType, unit?: string, description?: string): MetricGauge; - - /** - * Return a clone of this meter, with additional tags. All metrics created off the meter will - * have the tags. - * - * @param tags Tags to append. - */ - withTags(tags: MetricTags): MetricMeter; -} - -/** - * Base interface for all metrics. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export interface Metric { - /** - * The name of the metric. - */ - name: string; - - /** - * The unit of the metric, if any. - */ - unit?: string; - - /** - * The description of the metric, if any. - */ - description?: string; - - /** - * The kind of the metric (e.g. `counter`, `histogram`, `gauge`). - */ - kind: MetricKind; - - /** - * The type of value recorded by the metric. Either `int` or `float`. - */ - valueType: NumericMetricValueType; -} - -/** - * Tags to be attached to some metrics. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export type MetricTags = Record; - -/** - * Type of numerical values recorded by a metric. - * - * Note that this represents the _configuration_ of the metric; however, since JavaScript doesn't - * have different runtime representation for integers and floats, the actual value type is always - * a JS 'number'. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export type NumericMetricValueType = 'int' | 'float'; - -/** - * The kind of a metric. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export type MetricKind = 'counter' | 'histogram' | 'gauge'; - -/** - * A metric that supports adding values as a counter. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export interface MetricCounter extends Metric { - /** - * Add the given value to the counter. - * - * @param value Value to add. - * @param extraTags Extra tags if any. - */ - add(value: number, extraTags?: MetricTags): void; - - /** - * Return a clone of this counter, with additional tags. - * - * @param tags Tags to append to existing tags. - */ - withTags(tags: MetricTags): MetricCounter; - - kind: 'counter'; - valueType: 'int'; -} - -/** - * A metric that supports recording values on a histogram. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export interface MetricHistogram extends Metric { - /** - * Record the given value on the histogram. - * - * @param value Value to record. Must be a non-negative number. Value will be casted to the given - * {@link valueType}. Loss of precision may occur if the value is not already of the - * correct type. - * @param extraTags Extra tags if any. - */ - record(value: number, extraTags?: MetricTags): void; - - /** - * Return a clone of this histogram, with additional tags. - * - * @param tags Tags to append to existing tags. - */ - withTags(tags: MetricTags): MetricHistogram; - - kind: 'histogram'; -} - -/** - * A metric that supports setting values. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -export interface MetricGauge extends Metric { - /** - * Set the given value on the gauge. - * - * @param value Value to set. - * @param extraTags Extra tags if any. - */ - set(value: number, extraTags?: MetricTags): void; - - /** - * Return a clone of this gauge, with additional tags. - * - * @param tags Tags to append to existing tags. - */ - withTags(tags: MetricTags): MetricGauge; - - kind: 'gauge'; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * A meter implementation that does nothing. - */ -class NoopMetricMeter implements MetricMeter { - createCounter(name: string, unit?: string, description?: string): MetricCounter { - return { - name, - unit, - description, - - kind: 'counter', - valueType: 'int', - - add(_value, _extraTags) {}, - - withTags(_extraTags) { - return this; - }, - }; - } - - createHistogram( - name: string, - valueType: NumericMetricValueType = 'int', - unit?: string, - description?: string - ): MetricHistogram { - return { - name, - unit, - description, - - kind: 'histogram', - valueType, - - record(_value, _extraTags) {}, - - withTags(_extraTags) { - return this; - }, - }; - } - - createGauge( - name: string, - valueType: NumericMetricValueType = 'int', - unit?: string, - description?: string - ): MetricGauge { - return { - name, - unit, - description, - - kind: 'gauge', - valueType, - - set(_value, _extraTags) {}, - - withTags(_extraTags) { - return this; - }, - }; - } - - withTags(_extraTags: MetricTags): MetricMeter { - return this; - } -} - -export const noopMetricMeter = new NoopMetricMeter(); - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -export type MetricTagsOrFunc = MetricTags | (() => MetricTags); - -/** - * A meter implementation that adds tags before delegating calls to a parent meter. - * - * @experimental The Metric API is an experimental feature and may be subject to change. - * @internal - * @hidden - */ -export class MetricMeterWithComposedTags implements MetricMeter { - /** - * Return a {@link MetricMeter} that adds tags before delegating calls to a parent meter. - * - * New tags may either be specified statically as a delta object, or as a function evaluated - * every time a metric is recorded that will return a delta object. - * - * Some optimizations are performed to avoid creating unnecessary objects and to keep runtime - * overhead associated with resolving tags as low as possible. - * - * @param meter The parent meter to delegate calls to. - * @param tagsOrFunc New tags may either be specified statically as a delta object, or as a function - * evaluated every time a metric is recorded that will return a delta object. - * @param force if `true`, then a `MetricMeterWithComposedTags` will be created even if there - * is no tags to add. This is useful to add tags support to an underlying meter - * implementation that does not support tags directly. - */ - public static compose(meter: MetricMeter, tagsOrFunc: MetricTagsOrFunc, force: boolean = false): MetricMeter { - if (meter instanceof MetricMeterWithComposedTags) { - const contributors = appendToChain(meter.contributors, tagsOrFunc); - // If the new contributor results in no actual change to the chain, then we don't need a new meter - if (contributors === undefined && !force) return meter; - return new MetricMeterWithComposedTags(meter.parentMeter, contributors ?? []); - } else { - const contributors = appendToChain(undefined, tagsOrFunc); - if (contributors === undefined && !force) return meter; - return new MetricMeterWithComposedTags(meter, contributors ?? []); - } - } - - private constructor( - private readonly parentMeter: MetricMeter, - private readonly contributors: MetricTagsOrFunc[] - ) {} - - createCounter(name: string, unit?: string, description?: string): MetricCounter { - const parentCounter = this.parentMeter.createCounter(name, unit, description); - return new MetricCounterWithComposedTags(parentCounter, this.contributors); - } - - createHistogram( - name: string, - valueType: NumericMetricValueType = 'int', - unit?: string, - description?: string - ): MetricHistogram { - const parentHistogram = this.parentMeter.createHistogram(name, valueType, unit, description); - return new MetricHistogramWithComposedTags(parentHistogram, this.contributors); - } - - createGauge( - name: string, - valueType: NumericMetricValueType = 'int', - unit?: string, - description?: string - ): MetricGauge { - const parentGauge = this.parentMeter.createGauge(name, valueType, unit, description); - return new MetricGaugeWithComposedTags(parentGauge, this.contributors); - } - - withTags(tags: MetricTags): MetricMeter { - return MetricMeterWithComposedTags.compose(this, tags); - } -} - -/** - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -class MetricCounterWithComposedTags implements MetricCounter { - public readonly kind = 'counter'; - public readonly valueType = 'int'; - - constructor( - private parentCounter: MetricCounter, - private contributors: MetricTagsOrFunc[] - ) {} - - add(value: number, extraTags?: MetricTags | undefined): void { - this.parentCounter.add(value, resolveTags(this.contributors, extraTags)); - } - - withTags(extraTags: MetricTags): MetricCounter { - const contributors = appendToChain(this.contributors, extraTags); - if (contributors === undefined) return this; - return new MetricCounterWithComposedTags(this.parentCounter, contributors); - } - - get name(): string { - return this.parentCounter.name; - } - - get unit(): string | undefined { - return this.parentCounter.unit; - } - - get description(): string | undefined { - return this.parentCounter.description; - } -} - -/** - * @experimental The Metric API is an experimental feature and may be subject to change. - */ -class MetricHistogramWithComposedTags implements MetricHistogram { - public readonly kind = 'histogram'; - - constructor( - private parentHistogram: MetricHistogram, - private contributors: MetricTagsOrFunc[] - ) {} - - record(value: number, extraTags?: MetricTags): void { - this.parentHistogram.record(value, resolveTags(this.contributors, extraTags)); - } - - withTags(extraTags: MetricTags): MetricHistogram { - const contributors = appendToChain(this.contributors, extraTags); - if (contributors === undefined) return this; - return new MetricHistogramWithComposedTags(this.parentHistogram, contributors); - } - - get name(): string { - return this.parentHistogram.name; - } - - get valueType(): NumericMetricValueType { - return this.parentHistogram.valueType; - } - - get unit(): string | undefined { - return this.parentHistogram.unit; - } - - get description(): string | undefined { - return this.parentHistogram.description; - } -} - -/** - * @internal - * @hidden - */ -class MetricGaugeWithComposedTags implements MetricGauge { - public readonly kind = 'gauge'; - - constructor( - private parentGauge: MetricGauge, - private contributors: MetricTagsOrFunc[] - ) {} - - set(value: number, extraTags?: MetricTags): void { - this.parentGauge.set(value, resolveTags(this.contributors, extraTags)); - } - - withTags(extraTags: MetricTags): MetricGauge { - const contributors = appendToChain(this.contributors, extraTags); - if (contributors === undefined) return this; - return new MetricGaugeWithComposedTags(this.parentGauge, contributors); - } - - get name(): string { - return this.parentGauge.name; - } - - get valueType(): NumericMetricValueType { - return this.parentGauge.valueType; - } - - get unit(): string | undefined { - return this.parentGauge.unit; - } - - get description(): string | undefined { - return this.parentGauge.description; - } -} - -function resolveTags(contributors: MetricTagsOrFunc[], extraTags?: MetricTags): MetricTags { - const resolved = {}; - for (const contributor of contributors) { - Object.assign(resolved, typeof contributor === 'function' ? contributor() : contributor); - } - Object.assign(resolved, extraTags); - return filterNullAndUndefined(resolved); -} - -/** - * Append a tags contributor to the chain, merging it with the former last contributor if possible. - * - * If appending the new contributor results in no actual change to the chain of contributors, return - * `existingContributors`; in that case, the caller should avoid creating a new object if possible. - */ -function appendToChain( - existingContributors: MetricTagsOrFunc[] | undefined, - newContributor: MetricTagsOrFunc -): MetricTagsOrFunc[] | undefined { - // If the new contributor is an empty object, then it results in no actual change to the chain - if (typeof newContributor === 'object' && Object.keys(newContributor).length === 0) { - return existingContributors; - } - - // If existing chain is empty, then the new contributor is the chain - if (existingContributors == null || existingContributors.length === 0) { - return [newContributor]; - } - - // If both last contributor and new contributor are plain objects, merge them to a single object. - const last = existingContributors[existingContributors.length - 1]; - if (typeof last === 'object' && typeof newContributor === 'object') { - const merged = mergeObjects(last, newContributor); - if (merged === last) return existingContributors; - return [...existingContributors.slice(0, -1), merged!]; - } - - // Otherwise, just append the new contributor to the chain. - return [...existingContributors, newContributor]; -} diff --git a/node_modules/@temporalio/common/src/priority.ts b/node_modules/@temporalio/common/src/priority.ts deleted file mode 100644 index 72e927e..0000000 --- a/node_modules/@temporalio/common/src/priority.ts +++ /dev/null @@ -1,87 +0,0 @@ -import type { temporal } from '@temporalio/proto'; - -/** - * Priority contains metadata that controls relative ordering of task processing when tasks are - * backlogged in a queue. Initially, Priority will be used in activity and workflow task queues, - * which are typically where backlogs exist. - * Priority is (for now) attached to workflows and activities. Activities and child workflows - * inherit Priority from the workflow that created them, but may override fields when they are - * started or modified. For each field of a Priority on an activity/workflow, not present or equal - * to zero/empty string means to inherit the value from the calling workflow, or if there is no - * calling workflow, then use the default (documented on the field). - * The overall semantics of Priority are: - * 1. First, consider "priority_key": lower number goes first. - * 2. Then, consider fairness: the fairness mechanism attempts to dispatch tasks for a given key in - * proportion to its weight. - */ -export interface Priority { - /** - * Priority key is a positive integer from 1 to n, where smaller integers - * correspond to higher priorities (tasks run sooner). In general, tasks in - * a queue should be processed in close to priority order, although small - * deviations are possible. - * - * The maximum priority value (minimum priority) is determined by server configuration, and - * defaults to 5. - * - * The default priority is (min+max)/2. With the default max of 5 and min of 1, that comes out to 3. - */ - priorityKey?: number; - - /** - * FairnessKey is a short string that's used as a key for a fairness - * balancing mechanism. It may correspond to a tenant id, or to a fixed - * string like "high" or "low". The default is the empty string. - * - * The fairness mechanism attempts to dispatch tasks for a given key in - * proportion to its weight. For example, using a thousand distinct tenant - * ids, each with a weight of 1.0 (the default) will result in each tenant - * getting a roughly equal share of task dispatch throughput. - * - * Fairness keys are limited to 64 bytes. - */ - fairnessKey?: string; - - /** - * FairnessWeight for a task can come from multiple sources for - * flexibility. From highest to lowest precedence: - * 1. Weights for a small set of keys can be overridden in task queue - * configuration with an API. - * 2. It can be attached to the workflow/activity in this field. - * 3. The default weight of 1.0 will be used. - * - * Weight values are clamped to the range [0.001, 1000]. - */ - fairnessWeight?: number; -} - -/** - * Turn a proto compatible Priority into a TS Priority - */ -export function decodePriority(priority?: temporal.api.common.v1.IPriority | null): Priority { - return { - priorityKey: priority?.priorityKey ?? undefined, - fairnessKey: priority?.fairnessKey ?? undefined, - fairnessWeight: priority?.fairnessWeight ?? undefined, - }; -} - -/** - * Turn a TS Priority into a proto compatible Priority - */ -export function compilePriority(priority: Priority): temporal.api.common.v1.IPriority { - if (priority.priorityKey !== undefined && priority.priorityKey !== null) { - if (!Number.isInteger(priority.priorityKey)) { - throw new TypeError('priorityKey must be an integer'); - } - if (priority.priorityKey < 0) { - throw new RangeError('priorityKey must be a positive integer'); - } - } - - return { - priorityKey: priority.priorityKey ?? 0, - fairnessKey: priority.fairnessKey ?? '', - fairnessWeight: priority.fairnessWeight ?? 0, - }; -} diff --git a/node_modules/@temporalio/common/src/proto-utils.ts b/node_modules/@temporalio/common/src/proto-utils.ts deleted file mode 100644 index f54d170..0000000 --- a/node_modules/@temporalio/common/src/proto-utils.ts +++ /dev/null @@ -1,153 +0,0 @@ -import { fromProto3JSON, toProto3JSON } from 'proto3-json-serializer'; -import * as proto from '@temporalio/proto'; -import { patchProtobufRoot } from '@temporalio/proto/lib/patch-protobuf-root'; - -export type History = proto.temporal.api.history.v1.IHistory; -export type Payload = proto.temporal.api.common.v1.IPayload; - -/** - * JSON representation of Temporal's {@link Payload} protobuf object - */ -export interface JSONPayload { - /** - * Mapping of key to base64 encoded value - */ - metadata?: Record | null; - /** - * base64 encoded value - */ - data?: string | null; -} - -// Cast to any because the generated proto module types are missing the lookupType method -const patched = patchProtobufRoot(proto) as any; -const historyType = patched.lookupType('temporal.api.history.v1.History'); -const payloadType = patched.lookupType('temporal.api.common.v1.Payload'); - -/** - * Convert a proto JSON representation of History to a valid History object - */ -export function historyFromJSON(history: unknown): History { - function pascalCaseToConstantCase(s: string) { - return s.replace(/[^\b][A-Z]/g, (m) => `${m[0]}_${m[1]}`).toUpperCase(); - } - - function fixEnumValue>(obj: O, attr: keyof O, prefix: string) { - return ( - obj[attr] && { - [attr]: obj[attr].startsWith(prefix) ? obj[attr] : `${prefix}_${pascalCaseToConstantCase(obj[attr])}`, - } - ); - } - - // fromProto3JSON doesn't allow null values on 'bytes' fields. This turns out to be a problem for payloads. - // Recursively descend on objects and array, and fix in-place any payload that has a null data field - function fixPayloads(e: T): T { - function isPayload(p: any): p is JSONPayload { - return p && typeof p === 'object' && 'metadata' in p && 'data' in p; - } - - if (e && typeof e === 'object') { - if (isPayload(e)) { - if (e.data === null) { - const { data: _data, ...rest } = e; - return rest as T; - } - return e; - } - if (Array.isArray(e)) return e.map(fixPayloads) as T; - return Object.fromEntries(Object.entries(e as object).map(([k, v]) => [k, fixPayloads(v)])) as T; - } - return e; - } - - function fixHistoryEvent(e: Record) { - const type = Object.keys(e).find((k) => k.endsWith('EventAttributes')); - if (!type) { - throw new TypeError(`Missing attributes in history event: ${JSON.stringify(e)}`); - } - - // Fix payloads with null data - e = fixPayloads(e); - - return { - ...e, - ...fixEnumValue(e, 'eventType', 'EVENT_TYPE'), - [type]: { - ...e[type], - ...(e[type].taskQueue && { - taskQueue: { ...e[type].taskQueue, ...fixEnumValue(e[type].taskQueue, 'kind', 'TASK_QUEUE_KIND') }, - }), - ...fixEnumValue(e[type], 'parentClosePolicy', 'PARENT_CLOSE_POLICY'), - ...fixEnumValue(e[type], 'workflowIdReusePolicy', 'WORKFLOW_ID_REUSE_POLICY'), - ...fixEnumValue(e[type], 'initiator', 'CONTINUE_AS_NEW_INITIATOR'), - ...fixEnumValue(e[type], 'retryState', 'RETRY_STATE'), - ...(e[type].childWorkflowExecutionFailureInfo && { - childWorkflowExecutionFailureInfo: { - ...e[type].childWorkflowExecutionFailureInfo, - ...fixEnumValue(e[type].childWorkflowExecutionFailureInfo, 'retryState', 'RETRY_STATE'), - }, - }), - }, - }; - } - - function fixHistory(h: Record) { - return { - events: h.events.map(fixHistoryEvent), - }; - } - - if (typeof history !== 'object' || history == null || !Array.isArray((history as any).events)) { - throw new TypeError('Invalid history, expected an object with an array of events'); - } - const loaded = fromProto3JSON(historyType, fixHistory(history)); - if (loaded === null) { - throw new TypeError('Invalid history'); - } - return loaded as any; -} - -/** - * Convert an History object, e.g. as returned by `WorkflowClient.list().withHistory()`, to a JSON - * string that adheres to the same norm as JSON history files produced by other Temporal tools. - */ -export function historyToJSON(history: History): string { - const protoJson = toProto3JSON(proto.temporal.api.history.v1.History.fromObject(history) as any); - return JSON.stringify(fixBuffers(protoJson), null, 2); -} - -/** - * toProto3JSON doesn't correctly handle some of our "bytes" fields, passing them untouched to the - * output, after which JSON.stringify() would convert them to an array of numbers. As a workaround, - * recursively walk the object and convert all Buffer instances to base64 strings. Note this only - * works on proto3-json-serializer v2.0.0. v2.0.2 throws an error before we even get the chance - * to fix the buffers. See https://github.com/googleapis/proto3-json-serializer-nodejs/issues/103. - */ -export function fixBuffers(e: T): T { - if (e && typeof e === 'object') { - if (e instanceof Buffer) return e.toString('base64') as any; - if (e instanceof Uint8Array) return Buffer.from(e).toString('base64') as any; - if (Array.isArray(e)) return e.map(fixBuffers) as T; - return Object.fromEntries(Object.entries(e as object).map(([k, v]) => [k, fixBuffers(v)])) as T; - } - return e; -} - -/** - * Convert from protobuf payload to JSON - */ -export function payloadToJSON(payload: Payload): JSONPayload { - return fixBuffers(toProto3JSON(patched.temporal.api.common.v1.Payload.create(payload))) as any; -} - -/** - * Convert from JSON to protobuf payload - */ -export function JSONToPayload(json: JSONPayload): Payload { - const loaded = fromProto3JSON(payloadType, json as any); - if (loaded === null) { - throw new TypeError('Invalid payload'); - } - return loaded as any; -} diff --git a/node_modules/@temporalio/common/src/protobufs.ts b/node_modules/@temporalio/common/src/protobufs.ts deleted file mode 100644 index b04a189..0000000 --- a/node_modules/@temporalio/common/src/protobufs.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Entry point for classes and utilities related to using - * {@link https://docs.temporal.io/typescript/data-converters#protobufs | Protobufs} for serialization. - * - * Import from `@temporalio/common/lib/protobufs`, for example: - * - * ``` - * import { patchProtobufRoot } from '@temporalio/common/lib/protobufs'; - * ``` - * @module - */ - -// Don't export from index, so we save space in Workflow bundles of users who don't use Protobufs -export * from './converter/protobuf-payload-converters'; -export { patchProtobufRoot } from '@temporalio/proto/lib/patch-protobuf-root'; diff --git a/node_modules/@temporalio/common/src/reserved.ts b/node_modules/@temporalio/common/src/reserved.ts deleted file mode 100644 index 8e43be3..0000000 --- a/node_modules/@temporalio/common/src/reserved.ts +++ /dev/null @@ -1,26 +0,0 @@ -export const TEMPORAL_RESERVED_PREFIX = '__temporal_'; -export const STACK_TRACE_QUERY_NAME = '__stack_trace'; -export const ENHANCED_STACK_TRACE_QUERY_NAME = '__enhanced_stack_trace'; - -/** - * Valid entity types that can be checked for reserved name violations - */ -export type ReservedNameEntityType = 'query' | 'signal' | 'update' | 'activity' | 'task queue' | 'sink' | 'workflow'; - -/** - * Validates if the provided name contains any reserved prefixes or matches any reserved names. - * Throws a TypeError if validation fails, with a specific message indicating whether the issue - * is with a reserved prefix or an exact match to a reserved name. - * - * @param type The entity type being checked - * @param name The name to check against reserved prefixes/names - */ -export function throwIfReservedName(type: ReservedNameEntityType, name: string): void { - if (name.startsWith(TEMPORAL_RESERVED_PREFIX)) { - throw new TypeError(`Cannot use ${type} name: '${name}', with reserved prefix: '${TEMPORAL_RESERVED_PREFIX}'`); - } - - if (name === STACK_TRACE_QUERY_NAME || name === ENHANCED_STACK_TRACE_QUERY_NAME) { - throw new TypeError(`Cannot use ${type} name: '${name}', which is a reserved name`); - } -} diff --git a/node_modules/@temporalio/common/src/retry-policy.ts b/node_modules/@temporalio/common/src/retry-policy.ts deleted file mode 100644 index 795d711..0000000 --- a/node_modules/@temporalio/common/src/retry-policy.ts +++ /dev/null @@ -1,101 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -import { ValueError } from './errors'; -import { Duration, msOptionalToNumber, msOptionalToTs, msToNumber, msToTs, optionalTsToMs } from './time'; - -/** - * Options for retrying Workflows and Activities - */ -export interface RetryPolicy { - /** - * Coefficient used to calculate the next retry interval. - * The next retry interval is previous interval multiplied by this coefficient. - * @minimum 1 - * @default 2 - */ - backoffCoefficient?: number; - /** - * Interval of the first retry. - * If coefficient is 1 then it is used for all retries - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - * @default 1 second - */ - initialInterval?: Duration; - /** - * Maximum number of attempts. When exceeded, retries stop (even if {@link ActivityOptions.scheduleToCloseTimeout} - * hasn't been reached). - * - * @default Infinity - */ - maximumAttempts?: number; - /** - * Maximum interval between retries. - * Exponential backoff leads to interval increase. - * This value is the cap of the increase. - * - * @default 100x of {@link initialInterval} - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - maximumInterval?: Duration; - - /** - * List of application failures types to not retry. - */ - nonRetryableErrorTypes?: string[]; -} - -/** - * Turn a TS RetryPolicy into a proto compatible RetryPolicy - */ -export function compileRetryPolicy(retryPolicy: RetryPolicy): temporal.api.common.v1.IRetryPolicy { - if (retryPolicy.backoffCoefficient != null && retryPolicy.backoffCoefficient <= 0) { - throw new ValueError('RetryPolicy.backoffCoefficient must be greater than 0'); - } - if (retryPolicy.maximumAttempts != null) { - if (retryPolicy.maximumAttempts === Number.POSITIVE_INFINITY) { - // drop field (Infinity is the default) - const { maximumAttempts: _, ...without } = retryPolicy; - retryPolicy = without; - } else if (retryPolicy.maximumAttempts <= 0) { - throw new ValueError('RetryPolicy.maximumAttempts must be a positive integer'); - } else if (!Number.isInteger(retryPolicy.maximumAttempts)) { - throw new ValueError('RetryPolicy.maximumAttempts must be an integer'); - } - } - const maximumInterval = msOptionalToNumber(retryPolicy.maximumInterval); - const initialInterval = msToNumber(retryPolicy.initialInterval ?? 1000); - if (maximumInterval === 0) { - throw new ValueError('RetryPolicy.maximumInterval cannot be 0'); - } - if (initialInterval === 0) { - throw new ValueError('RetryPolicy.initialInterval cannot be 0'); - } - if (maximumInterval != null && maximumInterval < initialInterval) { - throw new ValueError('RetryPolicy.maximumInterval cannot be less than its initialInterval'); - } - return { - maximumAttempts: retryPolicy.maximumAttempts, - initialInterval: msToTs(initialInterval), - maximumInterval: msOptionalToTs(maximumInterval), - backoffCoefficient: retryPolicy.backoffCoefficient, - nonRetryableErrorTypes: retryPolicy.nonRetryableErrorTypes, - }; -} - -/** - * Turn a proto compatible RetryPolicy into a TS RetryPolicy - */ -export function decompileRetryPolicy( - retryPolicy?: temporal.api.common.v1.IRetryPolicy | null -): RetryPolicy | undefined { - if (!retryPolicy) { - return undefined; - } - - return { - backoffCoefficient: retryPolicy.backoffCoefficient ?? undefined, - maximumAttempts: retryPolicy.maximumAttempts ?? undefined, - maximumInterval: optionalTsToMs(retryPolicy.maximumInterval), - initialInterval: optionalTsToMs(retryPolicy.initialInterval), - nonRetryableErrorTypes: retryPolicy.nonRetryableErrorTypes ?? undefined, - }; -} diff --git a/node_modules/@temporalio/common/src/search-attributes.ts b/node_modules/@temporalio/common/src/search-attributes.ts deleted file mode 100644 index 152d752..0000000 --- a/node_modules/@temporalio/common/src/search-attributes.ts +++ /dev/null @@ -1,300 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -import { makeProtoEnumConverters } from './internal-workflow'; - -/** @deprecated: Use {@link TypedSearchAttributes} instead */ -export type SearchAttributeValueOrReadonly = SearchAttributeValue | Readonly | undefined; // eslint-disable-line @typescript-eslint/no-deprecated -/** @deprecated: Use {@link TypedSearchAttributes} instead */ -export type SearchAttributes = Record; // eslint-disable-line @typescript-eslint/no-deprecated -/** @deprecated: Use {@link TypedSearchAttributes} instead */ -export type SearchAttributeValue = string[] | number[] | boolean[] | Date[]; - -export const SearchAttributeType = { - TEXT: 'TEXT', - KEYWORD: 'KEYWORD', - INT: 'INT', - DOUBLE: 'DOUBLE', - BOOL: 'BOOL', - DATETIME: 'DATETIME', - KEYWORD_LIST: 'KEYWORD_LIST', -} as const; -export type SearchAttributeType = (typeof SearchAttributeType)[keyof typeof SearchAttributeType]; - -// Note: encodeSearchAttributeIndexedValueType exported for use in tests to register search attributes -// ts-prune-ignore-next -export const [encodeSearchAttributeIndexedValueType, _] = makeProtoEnumConverters< - temporal.api.enums.v1.IndexedValueType, - typeof temporal.api.enums.v1.IndexedValueType, - keyof typeof temporal.api.enums.v1.IndexedValueType, - typeof SearchAttributeType, - 'INDEXED_VALUE_TYPE_' ->( - { - [SearchAttributeType.TEXT]: 1, - [SearchAttributeType.KEYWORD]: 2, - [SearchAttributeType.INT]: 3, - [SearchAttributeType.DOUBLE]: 4, - [SearchAttributeType.BOOL]: 5, - [SearchAttributeType.DATETIME]: 6, - [SearchAttributeType.KEYWORD_LIST]: 7, - UNSPECIFIED: 0, - } as const, - 'INDEXED_VALUE_TYPE_' -); - -interface IndexedValueTypeMapping { - TEXT: string; - KEYWORD: string; - INT: number; - DOUBLE: number; - BOOL: boolean; - DATETIME: Date; - KEYWORD_LIST: string[]; -} - -export function isValidValueForType( - type: T, - value: unknown -): value is IndexedValueTypeMapping[T] { - switch (type) { - case SearchAttributeType.TEXT: - case SearchAttributeType.KEYWORD: - return typeof value === 'string'; - case SearchAttributeType.INT: - return Number.isInteger(value); - case SearchAttributeType.DOUBLE: - return typeof value === 'number'; - case SearchAttributeType.BOOL: - return typeof value === 'boolean'; - case SearchAttributeType.DATETIME: - return value instanceof Date; - case SearchAttributeType.KEYWORD_LIST: - return Array.isArray(value) && value.every((item) => typeof item === 'string'); - default: - return false; - } -} - -export interface SearchAttributeKey { - name: string; - type: T; -} - -export function defineSearchAttributeKey(name: string, type: T): SearchAttributeKey { - return { name, type }; -} - -class BaseSearchAttributeValue { - private readonly _type: T; - private readonly _value: V; - - constructor(type: T, value: V) { - this._type = type; - this._value = value; - } - - get type(): T { - return this._type; - } - - get value(): V { - return this._value; - } -} - -// Internal type for class private data. -// Exported for use in payload conversion. -export class TypedSearchAttributeValue extends BaseSearchAttributeValue {} -// ts-prune-ignore-next -export class TypedSearchAttributeUpdateValue extends BaseSearchAttributeValue< - T, - IndexedValueTypeMapping[T] | null -> {} - -export type SearchAttributePair = { - [T in SearchAttributeType]: { key: SearchAttributeKey; value: IndexedValueTypeMapping[T] }; -}[SearchAttributeType]; - -export type SearchAttributeUpdatePair = { - [T in SearchAttributeType]: { key: SearchAttributeKey; value: IndexedValueTypeMapping[T] | null }; -}[SearchAttributeType]; - -export class TypedSearchAttributes { - private searchAttributes: Record> = {}; - - constructor(initialAttributes?: SearchAttributePair[]) { - if (initialAttributes === undefined) return; - for (const pair of initialAttributes) { - if (pair.key.name in this.searchAttributes) { - throw new Error(`Duplicate search attribute key: ${pair.key.name}`); - } - this.searchAttributes[pair.key.name] = new TypedSearchAttributeValue(pair.key.type, pair.value); - } - } - - get(key: SearchAttributeKey): IndexedValueTypeMapping[T] | undefined { - const attr = this.searchAttributes[key.name]; - // Key not found or type mismatch. - if (attr === undefined || !isValidValueForType(key.type, attr.value)) { - return undefined; - } - return attr.value; - } - - /** Returns a deep copy of the given TypedSearchAttributes instance */ - copy(): TypedSearchAttributes { - const state: Record> = {}; - - for (const [key, attr] of Object.entries(this.searchAttributes)) { - // Create a new instance with the same properties - let value = attr.value; - // For non-primitive types, create a deep copy - if (attr.value instanceof Date) { - value = new Date(attr.value); - } else if (Array.isArray(attr.value)) { - value = [...attr.value]; - } - state[key] = new TypedSearchAttributeValue(attr.type, value); - } - - // Create return value with manually assigned state. - const res = new TypedSearchAttributes(); - res.searchAttributes = state; - return res; - } - - /** - * @hidden - * Return JSON representation of this class as SearchAttributePair[] - * Default toJSON method is not used because it's JSON representation includes private state. - */ - toJSON(): SearchAttributePair[] { - return this.getAll(); - } - - /** Returns a copy of the current TypedSearchAttributes instance with the updated attributes. */ - updateCopy(updates: SearchAttributeUpdatePair[]): TypedSearchAttributes { - // Create a deep copy of the current instance. - const res = this.copy(); - // Apply updates. - res.update(updates); - return res; - } - - // Performs direct mutation on the current instance. - private update(updates: SearchAttributeUpdatePair[]) { - // Apply updates. - for (const pair of updates) { - // Delete attribute. - if (pair.value === null) { - // Delete only if the update matches a key and type. - const attrVal = this.searchAttributes[pair.key.name]; - if (attrVal && attrVal.type === pair.key.type) { - delete this.searchAttributes[pair.key.name]; - } - continue; - } - // Add or update attribute. - this.searchAttributes[pair.key.name] = new TypedSearchAttributeValue(pair.key.type, pair.value); - } - } - - getAll(): SearchAttributePair[] { - const res: SearchAttributePair[] = []; - for (const [key, attr] of Object.entries(this.searchAttributes)) { - const attrKey = { name: key, type: attr.type }; - // Sanity check, should always be legal. - if (isValidValueForType(attrKey.type, attr.value)) { - res.push({ key: attrKey, value: attr.value } as SearchAttributePair); - } - } - return res; - } - - static getKeyFromUntyped( - key: string, - value: SearchAttributeValueOrReadonly // eslint-disable-line @typescript-eslint/no-deprecated - ): SearchAttributeKey | undefined { - if (value == null) { - return; - } - - // Unpack single-element arrays. - const val = value.length === 1 ? value[0] : value; - switch (typeof val) { - case 'string': - // Check if val is an ISO string, if so, return a DATETIME key. - if (!isNaN(Date.parse(val)) && Date.parse(val) === new Date(val).getTime()) { - return { name: key, type: SearchAttributeType.DATETIME }; - } - return { name: key, type: SearchAttributeType.TEXT }; - case 'number': - return { - name: key, - type: Number.isInteger(val) ? SearchAttributeType.INT : SearchAttributeType.DOUBLE, - }; - case 'boolean': - return { name: key, type: SearchAttributeType.BOOL }; - case 'object': - if (val instanceof Date) { - return { name: key, type: SearchAttributeType.DATETIME }; - } - if (Array.isArray(val) && val.every((item) => typeof item === 'string')) { - return { name: key, type: SearchAttributeType.KEYWORD_LIST }; - } - return; - default: - return; - } - } - - static toMetadataType(type: SearchAttributeType): string { - switch (type) { - case SearchAttributeType.TEXT: - return 'Text'; - case SearchAttributeType.KEYWORD: - return 'Keyword'; - case SearchAttributeType.INT: - return 'Int'; - case SearchAttributeType.DOUBLE: - return 'Double'; - case SearchAttributeType.BOOL: - return 'Bool'; - case SearchAttributeType.DATETIME: - return 'Datetime'; - case SearchAttributeType.KEYWORD_LIST: - return 'KeywordList'; - default: - throw new Error(`Unknown search attribute type: ${type}`); - } - } - - static toSearchAttributeType(type: string): SearchAttributeType | undefined { - // The type metadata is usually in PascalCase (e.g. "KeywordList") but in - // rare cases may be in SCREAMING_SNAKE_CASE (e.g. "INDEXED_VALUE_TYPE_KEYWORD_LIST"). - switch (type) { - case 'Text': - case 'INDEXED_VALUE_TYPE_TEXT': - return SearchAttributeType.TEXT; - case 'Keyword': - case 'INDEXED_VALUE_TYPE_KEYWORD': - return SearchAttributeType.KEYWORD; - case 'Int': - case 'INDEXED_VALUE_TYPE_INT': - return SearchAttributeType.INT; - case 'Double': - case 'INDEXED_VALUE_TYPE_DOUBLE': - return SearchAttributeType.DOUBLE; - case 'Bool': - case 'INDEXED_VALUE_TYPE_BOOL': - return SearchAttributeType.BOOL; - case 'Datetime': - case 'INDEXED_VALUE_TYPE_DATETIME': - return SearchAttributeType.DATETIME; - case 'KeywordList': - case 'INDEXED_VALUE_TYPE_KEYWORD_LIST': - return SearchAttributeType.KEYWORD_LIST; - default: - return; - } - } -} diff --git a/node_modules/@temporalio/common/src/time.ts b/node_modules/@temporalio/common/src/time.ts deleted file mode 100644 index 9dcf0d7..0000000 --- a/node_modules/@temporalio/common/src/time.ts +++ /dev/null @@ -1,115 +0,0 @@ -import Long from 'long'; -import ms, { StringValue } from 'ms'; -import type { google } from '@temporalio/proto'; -import { ValueError } from './errors'; - -// NOTE: these are the same interface in JS -// google.protobuf.IDuration; -// google.protobuf.ITimestamp; -// The conversion functions below should work for both - -export type Timestamp = google.protobuf.ITimestamp; - -/** - * A duration, expressed either as a number of milliseconds, or as a {@link https://www.npmjs.com/package/ms | ms-formatted string}. - */ -export type Duration = StringValue | number; - -export type { StringValue } from 'ms'; - -/** - * Lossy conversion function from Timestamp to number due to possible overflow. - * If ts is null or undefined returns undefined. - */ -export function optionalTsToMs(ts: Timestamp | null | undefined): number | undefined { - if (ts === undefined || ts === null) { - return undefined; - } - return tsToMs(ts); -} - -/** - * Lossy conversion function from Timestamp to number due to possible overflow. - * If ts is null or undefined, throws a TypeError, with error message including the name of the field. - */ -export function requiredTsToMs(ts: Timestamp | null | undefined, fieldName: string): number { - if (ts === undefined || ts === null) { - throw new TypeError(`Expected ${fieldName} to be a timestamp, got ${ts}`); - } - return tsToMs(ts); -} - -/** - * Lossy conversion function from Timestamp to number due to possible overflow - */ -export function tsToMs(ts: Timestamp | null | undefined): number { - if (ts === undefined || ts === null) { - throw new Error(`Expected timestamp, got ${ts}`); - } - const { seconds, nanos } = ts; - return (seconds || Long.UZERO) - .mul(1000) - .add(Math.floor((nanos || 0) / 1000000)) - .toNumber(); -} - -export function msNumberToTs(millis: number): Timestamp { - const seconds = Math.floor(millis / 1000); - const nanos = (millis % 1000) * 1000000; - if (Number.isNaN(seconds) || Number.isNaN(nanos)) { - throw new ValueError(`Invalid millis ${millis}`); - } - return { seconds: Long.fromNumber(seconds), nanos }; -} - -export function msToTs(str: Duration): Timestamp { - return msNumberToTs(msToNumber(str)); -} - -export function msOptionalToTs(str: Duration | undefined | null): Timestamp | undefined { - return str ? msToTs(str) : undefined; -} - -export function msOptionalToNumber(val: Duration | undefined): number | undefined { - if (val === undefined) return undefined; - return msToNumber(val); -} - -export function msToNumber(val: Duration): number { - if (typeof val === 'number') { - return val; - } - return msWithValidation(val); -} - -function msWithValidation(str: StringValue): number { - const millis = ms(str); - if (millis == null || isNaN(millis)) { - throw new TypeError(`Invalid duration string: '${str}'`); - } - return millis; -} - -export function tsToDate(ts: Timestamp): Date { - return new Date(tsToMs(ts)); -} - -// ts-prune-ignore-next -export function requiredTsToDate(ts: Timestamp | null | undefined, fieldName: string): Date { - return new Date(requiredTsToMs(ts, fieldName)); -} - -export function optionalTsToDate(ts: Timestamp | null | undefined): Date | undefined { - if (ts === undefined || ts === null) { - return undefined; - } - return new Date(tsToMs(ts)); -} - -// ts-prune-ignore-next (imported via schedule-helpers.ts) -export function optionalDateToTs(date: Date | null | undefined): Timestamp | undefined { - if (date === undefined || date === null) { - return undefined; - } - return msToTs(date.getTime()); -} diff --git a/node_modules/@temporalio/common/src/type-helpers.ts b/node_modules/@temporalio/common/src/type-helpers.ts deleted file mode 100644 index 569236b..0000000 --- a/node_modules/@temporalio/common/src/type-helpers.ts +++ /dev/null @@ -1,231 +0,0 @@ -export type NonNullableObject = { [P in keyof T]-?: NonNullable }; - -/** Shorthand alias */ -export type AnyFunc = (...args: any[]) => any; - -/** A tuple without its last element */ -export type OmitLast = T extends [...infer REST, any] ? REST : never; - -/** F with all arguments but the last */ -export type OmitLastParam = (...args: OmitLast>) => ReturnType; - -export type OmitFirst = T extends [any, ...infer REST] ? REST : never; - -export type OmitFirstParam = T extends (...args: any[]) => any - ? (...args: OmitFirst>) => ReturnType - : never; - -/** Require that T has at least one of the provided properties defined */ -export type RequireAtLeastOne = Pick> & - { - [K in Keys]-?: Required> & Partial>>; - }[Keys]; - -/** Verify that an type _Copy extends _Orig */ -export function checkExtends<_Orig, _Copy extends _Orig>(): void { - // noop, just type check -} - -export type Replace = Omit & New; - -// From https://github.com/sindresorhus/type-fest/blob/main/source/union-to-intersection.d.ts -// MIT or CC0-1.0 — It is meant to be copied into your codebase rather than being used as a dependency. -export type UnionToIntersection = - // `extends unknown` is always going to be the case and is used to convert the `Union` into a - // [distributive conditional type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types). - ( - Union extends unknown - ? // The union type is used as the only argument to a function since the union - // of function arguments is an intersection. - (distributedUnion: Union) => void - : // This won't happen. - never - ) extends // Infer the `Intersection` type since TypeScript represents the positional - // arguments of unions of functions as an intersection of the union. - (mergedIntersection: infer Intersection) => void - ? // The `& Union` is to allow indexing by the resulting type - Intersection & Union - : never; - -type IsEqual = (() => G extends A ? 1 : 2) extends () => G extends B ? 1 : 2 ? true : false; - -type Primitive = null | undefined | string | number | boolean | symbol | bigint; - -type IsNull = [T] extends [null] ? true : false; - -type IsUnknown = unknown extends T // `T` can be `unknown` or `any` - ? IsNull extends false // `any` can be `null`, but `unknown` can't be - ? true - : false - : false; - -type ObjectValue = K extends keyof T - ? T[K] - : ToString extends keyof T - ? T[ToString] - : K extends `${infer NumberK extends number}` - ? NumberK extends keyof T - ? T[NumberK] - : never - : never; - -type ToString = T extends string | number ? `${T}` : never; - -type KeysOfUnion = ObjectType extends unknown ? keyof ObjectType : never; - -type ArrayElement = T extends readonly unknown[] ? T[0] : never; - -type ExactObject = { - [Key in keyof ParameterType]: Exact>; -} & Record>, never>; - -export type Exact = - // Before distributing, check if the two types are equal and if so, return the parameter type immediately - IsEqual extends true - ? ParameterType - : // If the parameter is a primitive, return it as is immediately to avoid it being converted to a complex type - ParameterType extends Primitive - ? ParameterType - : // If the parameter is an unknown, return it as is immediately to avoid it being converted to a complex type - IsUnknown extends true - ? unknown - : // If the parameter is a Function, return it as is because this type is not capable of handling function, leave it to TypeScript - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - ParameterType extends Function - ? ParameterType - : // Convert union of array to array of union: A[] & B[] => (A & B)[] - ParameterType extends unknown[] - ? Array, ArrayElement>> - : // In TypeScript, Array is a subtype of ReadonlyArray, so always test Array before ReadonlyArray. - ParameterType extends readonly unknown[] - ? ReadonlyArray, ArrayElement>> - : ExactObject; -// End of borrow from https://github.com/sindresorhus/type-fest/blob/main/source/union-to-intersection.d.ts - -export type RemovePrefix = { - [k in Keys]: k extends `${Prefix}${infer Suffix}` ? Suffix : never; -}[Keys]; - -export function isRecord(value: unknown): value is Record { - return typeof value === 'object' && value !== null; -} - -export function hasOwnProperty, Y extends PropertyKey>( - record: X, - prop: Y -): record is X & Record { - return prop in record; -} - -export function hasOwnProperties, Y extends PropertyKey>( - record: X, - props: Y[] -): record is X & Record { - return props.every((prop) => prop in record); -} - -export function isError(error: unknown): error is Error { - return ( - isRecord(error) && - typeof error.name === 'string' && - typeof error.message === 'string' && - (error.stack == null || typeof error.stack === 'string') - ); -} - -export function isAbortError(error: unknown): error is Error & { name: 'AbortError' } { - return isError(error) && error.name === 'AbortError'; -} - -/** - * Get `error.message` (or `undefined` if not present) - */ -export function errorMessage(error: unknown): string | undefined { - if (isError(error)) { - return error.message; - } else if (typeof error === 'string') { - return error; - } - return undefined; -} - -interface ErrorWithCode { - code: string; -} - -function isErrorWithCode(error: unknown): error is ErrorWithCode { - return isRecord(error) && typeof error.code === 'string'; -} - -/** - * Get `error.code` (or `undefined` if not present) - */ -export function errorCode(error: unknown): string | undefined { - if (isErrorWithCode(error)) { - return error.code; - } - - return undefined; -} - -/** - * Asserts that some type is the never type - */ -export function assertNever(msg: string, x: never): never { - throw new TypeError(msg + ': ' + x); -} - -export type Class = { - new (...args: any[]): E; - prototype: E; -}; - -/** - * A decorator to be used on error classes. It adds the 'name' property AND provides a custom - * 'instanceof' handler that works correctly across execution contexts. - * - * ### Details ### - * - * According to the EcmaScript's spec, the default behavior of JavaScript's `x instanceof Y` operator is to walk up the - * prototype chain of object 'x', checking if any constructor in that hierarchy is _exactly the same object_ as the - * constructor function 'Y'. - * - * Unfortunately, it happens in various situations that different constructor function objects get created for what - * appears to be the very same class. This leads to surprising behavior where `instanceof` returns false though it is - * known that the object is indeed an instance of that class. One particular case where this happens is when constructor - * 'Y' belongs to a different realm than the constuctor with which 'x' was instantiated. Another case is when two copies - * of the same library gets loaded in the same realm. - * - * In practice, this tends to cause issues when crossing the workflow-sandboxing boundary (since Node's vm module - * really creates new execution realms), as well as when running tests using Jest (see https://github.com/jestjs/jest/issues/2549 - * for some details on that one). - * - * This function injects a custom 'instanceof' handler into the prototype of 'clazz', which is both cross-realm safe and - * cross-copies-of-the-same-lib safe. It works by adding a special symbol property to the prototype of 'clazz', and then - * checking for the presence of that symbol. - */ -export function SymbolBasedInstanceOfError(markerName: string): (clazz: Class) => void { - return (clazz: Class): void => { - const marker = Symbol.for(`__temporal_is${markerName}`); - - Object.defineProperty(clazz.prototype, 'name', { value: markerName, enumerable: true }); - Object.defineProperty(clazz.prototype, marker, { value: true, enumerable: false }); - Object.defineProperty(clazz, Symbol.hasInstance, { - // eslint-disable-next-line object-shorthand - value: function (this: any, error: object): boolean { - if (this === clazz) { - return isRecord(error) && (error as any)[marker] === true; - } else { - // 'this' must be a _subclass_ of clazz that doesn't redefined [Symbol.hasInstance], so that it inherited - // from clazz's [Symbol.hasInstance]. If we don't handle this particular situation, then - // `x instanceof SubclassOfParent` would return true for any instance of 'Parent', which is clearly wrong. - // - // Ideally, it'd be preferable to avoid this case entirely, by making sure that all subclasses of 'clazz' - // redefine [Symbol.hasInstance], but we can't enforce that. We therefore fallback to the default instanceof - // behavior (which is NOT cross-realm safe). - return this.prototype.isPrototypeOf(error); // eslint-disable-line no-prototype-builtins - } - }, - }); - }; -} diff --git a/node_modules/@temporalio/common/src/user-metadata.ts b/node_modules/@temporalio/common/src/user-metadata.ts deleted file mode 100644 index 8c5246e..0000000 --- a/node_modules/@temporalio/common/src/user-metadata.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -import { convertOptionalToPayload, PayloadConverter } from './converter/payload-converter'; - -/** - * User metadata that can be attached to workflow commands. - */ -export interface UserMetadata { - /** @experimental A fixed, single line summary of the command's purpose */ - staticSummary?: string; - /** @experimental Fixed additional details about the command for longer-text description, can span multiple lines */ - staticDetails?: string; -} - -export function userMetadataToPayload( - payloadConverter: PayloadConverter, - staticSummary: string | undefined, - staticDetails: string | undefined -): temporal.api.sdk.v1.IUserMetadata | undefined { - if (staticSummary == null && staticDetails == null) return undefined; - - const summary = convertOptionalToPayload(payloadConverter, staticSummary); - const details = convertOptionalToPayload(payloadConverter, staticDetails); - - if (summary == null && details == null) return undefined; - - return { summary, details }; -} diff --git a/node_modules/@temporalio/common/src/versioning-intent-enum.ts b/node_modules/@temporalio/common/src/versioning-intent-enum.ts deleted file mode 100644 index c2a8a3a..0000000 --- a/node_modules/@temporalio/common/src/versioning-intent-enum.ts +++ /dev/null @@ -1,37 +0,0 @@ -import type { coresdk } from '@temporalio/proto'; -import type { VersioningIntent as VersioningIntentString } from './versioning-intent'; -import { assertNever, checkExtends } from './type-helpers'; - -/* eslint-disable @typescript-eslint/no-deprecated */ - -// Avoid importing the proto implementation to reduce workflow bundle size -// Copied from coresdk.common.VersioningIntent -/** - * Protobuf enum representation of {@link VersioningIntentString}. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export enum VersioningIntent { - UNSPECIFIED = 0, - COMPATIBLE = 1, - DEFAULT = 2, -} - -checkExtends(); -checkExtends(); - -/** - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export function versioningIntentToProto(intent: VersioningIntentString | undefined): VersioningIntent { - switch (intent) { - case 'DEFAULT': - return VersioningIntent.DEFAULT; - case 'COMPATIBLE': - return VersioningIntent.COMPATIBLE; - case undefined: - return VersioningIntent.UNSPECIFIED; - default: - assertNever('Unexpected VersioningIntent', intent); - } -} diff --git a/node_modules/@temporalio/common/src/versioning-intent.ts b/node_modules/@temporalio/common/src/versioning-intent.ts deleted file mode 100644 index eb305b8..0000000 --- a/node_modules/@temporalio/common/src/versioning-intent.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Indicates whether the user intends certain commands to be run on a compatible worker Build Id version or not. - * - * `COMPATIBLE` indicates that the command should run on a worker with compatible version if possible. It may not be - * possible if the target task queue does not also have knowledge of the current worker's Build Id. - * - * `DEFAULT` indicates that the command should run on the target task queue's current overall-default Build Id. - * - * Where this type is accepted optionally, an unset value indicates that the SDK should choose the most sensible default - * behavior for the type of command, accounting for whether the command will be run on the same task queue as the - * current worker. The default behavior for starting Workflows is `DEFAULT`. The default behavior for Workflows starting - * Activities, starting Child Workflows, or Continuing As New is `COMPATIBLE`. - * - * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments - */ -export type VersioningIntent = 'COMPATIBLE' | 'DEFAULT'; diff --git a/node_modules/@temporalio/common/src/worker-deployments.ts b/node_modules/@temporalio/common/src/worker-deployments.ts deleted file mode 100644 index 72dd5af..0000000 --- a/node_modules/@temporalio/common/src/worker-deployments.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -import { makeProtoEnumConverters } from './internal-workflow'; - -/** - * Represents the version of a specific worker deployment. - */ -export interface WorkerDeploymentVersion { - readonly buildId: string; - readonly deploymentName: string; -} - -/** - * @returns The canonical representation of a deployment version, which is a string in the format - * `deploymentName.buildId`. - */ -export function toCanonicalString(version: WorkerDeploymentVersion): string { - return `${version.deploymentName}.${version.buildId}`; -} - -/** - * Specifies when a workflow might move from a worker of one Build Id to another. - * - * * 'PINNED' - The workflow will be pinned to the current Build ID unless manually moved. - * * 'AUTO_UPGRADE' - The workflow will automatically move to the latest version (default Build ID - * of the task queue) when the next task is dispatched. - */ -export const VersioningBehavior = { - PINNED: 'PINNED', - AUTO_UPGRADE: 'AUTO_UPGRADE', -} as const; -export type VersioningBehavior = (typeof VersioningBehavior)[keyof typeof VersioningBehavior]; - -export const [encodeVersioningBehavior, decodeVersioningBehavior] = makeProtoEnumConverters< - temporal.api.enums.v1.VersioningBehavior, - typeof temporal.api.enums.v1.VersioningBehavior, - keyof typeof temporal.api.enums.v1.VersioningBehavior, - typeof VersioningBehavior, - 'VERSIONING_BEHAVIOR_' ->( - { - [VersioningBehavior.PINNED]: 1, - [VersioningBehavior.AUTO_UPGRADE]: 2, - UNSPECIFIED: 0, - } as const, - 'VERSIONING_BEHAVIOR_' -); - -/** - * Represents versioning overrides. For example, when starting workflows. - */ -export type VersioningOverride = PinnedVersioningOverride | 'AUTO_UPGRADE'; - -/** - * Workflow will be pinned to a specific deployment version. - */ -export interface PinnedVersioningOverride { - /** - * The worker deployment version to pin the workflow to. - */ - pinnedTo: WorkerDeploymentVersion; -} - -/** - * The workflow will auto-upgrade to the current deployment version on the next workflow task. - */ -export type AutoUpgradeVersioningOverride = 'AUTO_UPGRADE'; - -/** - * Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain. - * - * AUTO_UPGRADE - Start the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at - * start-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever - * Versioning Behavior the workflow is annotated with in the workflow code. - * - * Note that if the previous workflow had a Pinned override, that override will be inherited by the - * new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new - * command. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade - * behavior, the base version of the new run will be the Target Version as described above, but the - * effective version will be whatever is specified by the Versioning Override until the override is removed. - * - * @experimental Versioning semantics with continue-as-new are experimental and may change in the future. - */ -export const InitialVersioningBehavior = { - AUTO_UPGRADE: 'AUTO_UPGRADE', -} as const; -export type InitialVersioningBehavior = (typeof InitialVersioningBehavior)[keyof typeof InitialVersioningBehavior]; - -export const [encodeInitialVersioningBehavior, decodeInitialVersioningBehavior] = makeProtoEnumConverters< - temporal.api.enums.v1.ContinueAsNewVersioningBehavior, - typeof temporal.api.enums.v1.ContinueAsNewVersioningBehavior, - keyof typeof temporal.api.enums.v1.ContinueAsNewVersioningBehavior, - typeof InitialVersioningBehavior, - 'CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_' ->( - { - [InitialVersioningBehavior.AUTO_UPGRADE]: 1, - UNSPECIFIED: 0, - } as const, - 'CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_' -); diff --git a/node_modules/@temporalio/common/src/workflow-definition-options.ts b/node_modules/@temporalio/common/src/workflow-definition-options.ts deleted file mode 100644 index 19cf53d..0000000 --- a/node_modules/@temporalio/common/src/workflow-definition-options.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { VersioningBehavior } from './worker-deployments'; - -/** - * Options that can be used when defining a workflow via {@link setWorkflowOptions}. - */ -export interface WorkflowDefinitionOptions { - versioningBehavior?: VersioningBehavior; -} - -type AsyncFunction = (...args: Args) => Promise; -export type WorkflowDefinitionOptionsOrGetter = WorkflowDefinitionOptions | (() => WorkflowDefinitionOptions); - -/** - * @internal - * @hidden - * A workflow function that has been defined with options from {@link WorkflowDefinitionOptions}. - */ -export interface WorkflowFunctionWithOptions extends AsyncFunction { - workflowDefinitionOptions: WorkflowDefinitionOptionsOrGetter; -} diff --git a/node_modules/@temporalio/common/src/workflow-handle.ts b/node_modules/@temporalio/common/src/workflow-handle.ts deleted file mode 100644 index 3ef18c2..0000000 --- a/node_modules/@temporalio/common/src/workflow-handle.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Workflow, WorkflowResultType, SignalDefinition } from './interfaces'; - -/** - * Base WorkflowHandle interface, extended in workflow and client libs. - * - * Transforms a workflow interface `T` into a client interface. - */ -export interface BaseWorkflowHandle { - /** - * Promise that resolves when Workflow execution completes - */ - result(): Promise>; - - /** - * Signal a running Workflow. - * - * @param def a signal definition as returned from {@link defineSignal} - * - * @example - * ```ts - * await handle.signal(incrementSignal, 3); - * ``` - */ - signal( - def: SignalDefinition | string, - ...args: Args - ): Promise; - - /** - * The workflowId of the current Workflow - */ - readonly workflowId: string; -} diff --git a/node_modules/@temporalio/common/src/workflow-options.ts b/node_modules/@temporalio/common/src/workflow-options.ts deleted file mode 100644 index 031aa81..0000000 --- a/node_modules/@temporalio/common/src/workflow-options.ts +++ /dev/null @@ -1,273 +0,0 @@ -import type { temporal } from '@temporalio/proto'; -import { Workflow } from './interfaces'; -import { RetryPolicy } from './retry-policy'; -import { Duration } from './time'; -import { makeProtoEnumConverters } from './internal-workflow'; -import { SearchAttributePair, SearchAttributes, TypedSearchAttributes } from './search-attributes'; -import { Priority } from './priority'; -import { WorkflowFunctionWithOptions } from './workflow-definition-options'; - -/** - * Defines what happens when trying to start a Workflow with the same ID as a *Closed* Workflow. - * - * See {@link WorkflowOptions.workflowIdConflictPolicy} for what happens when trying to start a - * Workflow with the same ID as a *Running* Workflow. - * - * Concept: {@link https://docs.temporal.io/concepts/what-is-a-workflow-id-reuse-policy/ | Workflow Id Reuse Policy} - * - * *Note: It is not possible to have two actively running Workflows with the same ID.* - * - */ -export const WorkflowIdReusePolicy = { - /** - * The Workflow can be started if the previous Workflow is in a Closed state. - * @default - */ - ALLOW_DUPLICATE: 'ALLOW_DUPLICATE', - - /** - * The Workflow can be started if the previous Workflow is in a Closed state that is not Completed. - */ - ALLOW_DUPLICATE_FAILED_ONLY: 'ALLOW_DUPLICATE_FAILED_ONLY', - - /** - * The Workflow cannot be started. - */ - REJECT_DUPLICATE: 'REJECT_DUPLICATE', - - /** - * Terminate the current Workflow if one is already running; otherwise allow reusing the Workflow ID. - * - * @deprecated Use {@link WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE} instead, and - * set `WorkflowOptions.workflowIdConflictPolicy` to - * {@link WorkflowIdConflictPolicy.WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING}. - * When using this option, `WorkflowOptions.workflowIdConflictPolicy` must be left unspecified. - */ - TERMINATE_IF_RUNNING: 'TERMINATE_IF_RUNNING', - - /// Anything below this line has been deprecated - - /** - * No need to use this. If a `WorkflowIdReusePolicy` is set to this, or is not set at all, the default value will be used. - * - * @deprecated Either leave property `undefined`, or use {@link ALLOW_DUPLICATE} instead. - */ - WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED: undefined, - - /** @deprecated Use {@link ALLOW_DUPLICATE} instead. */ - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE: 'ALLOW_DUPLICATE', - - /** @deprecated Use {@link ALLOW_DUPLICATE_FAILED_ONLY} instead. */ - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY: 'ALLOW_DUPLICATE_FAILED_ONLY', - - /** @deprecated Use {@link REJECT_DUPLICATE} instead. */ - WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE: 'REJECT_DUPLICATE', - - /** @deprecated Use {@link TERMINATE_IF_RUNNING} instead. */ - WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING: 'TERMINATE_IF_RUNNING', -} as const; -export type WorkflowIdReusePolicy = (typeof WorkflowIdReusePolicy)[keyof typeof WorkflowIdReusePolicy]; - -export const [encodeWorkflowIdReusePolicy, decodeWorkflowIdReusePolicy] = makeProtoEnumConverters< - temporal.api.enums.v1.WorkflowIdReusePolicy, - typeof temporal.api.enums.v1.WorkflowIdReusePolicy, - keyof typeof temporal.api.enums.v1.WorkflowIdReusePolicy, - typeof WorkflowIdReusePolicy, - 'WORKFLOW_ID_REUSE_POLICY_' ->( - { - [WorkflowIdReusePolicy.ALLOW_DUPLICATE]: 1, - [WorkflowIdReusePolicy.ALLOW_DUPLICATE_FAILED_ONLY]: 2, - [WorkflowIdReusePolicy.REJECT_DUPLICATE]: 3, - [WorkflowIdReusePolicy.TERMINATE_IF_RUNNING]: 4, // eslint-disable-line @typescript-eslint/no-deprecated - UNSPECIFIED: 0, - } as const, - 'WORKFLOW_ID_REUSE_POLICY_' -); - -/** - * Defines what happens when trying to start a Workflow with the same ID as a *Running* Workflow. - * - * See {@link WorkflowOptions.workflowIdReusePolicy} for what happens when trying to start a Workflow - * with the same ID as a *Closed* Workflow. - * - * *Note: It is never possible to have two _actively running_ Workflows with the same ID.* - */ -export const WorkflowIdConflictPolicy = { - /** - * Do not start a new Workflow. Instead raise a `WorkflowExecutionAlreadyStartedError`. - */ - FAIL: 'FAIL', - - /** - * Do not start a new Workflow. Instead return a Workflow Handle for the already Running Workflow. - */ - USE_EXISTING: 'USE_EXISTING', - - /** - * Start a new Workflow, terminating the current workflow if one is already running. - */ - TERMINATE_EXISTING: 'TERMINATE_EXISTING', -} as const; -export type WorkflowIdConflictPolicy = (typeof WorkflowIdConflictPolicy)[keyof typeof WorkflowIdConflictPolicy]; - -export const [encodeWorkflowIdConflictPolicy, decodeWorkflowIdConflictPolicy] = makeProtoEnumConverters< - temporal.api.enums.v1.WorkflowIdConflictPolicy, - typeof temporal.api.enums.v1.WorkflowIdConflictPolicy, - keyof typeof temporal.api.enums.v1.WorkflowIdConflictPolicy, - typeof WorkflowIdConflictPolicy, - 'WORKFLOW_ID_CONFLICT_POLICY_' ->( - { - [WorkflowIdConflictPolicy.FAIL]: 1, - [WorkflowIdConflictPolicy.USE_EXISTING]: 2, - [WorkflowIdConflictPolicy.TERMINATE_EXISTING]: 3, - UNSPECIFIED: 0, - } as const, - 'WORKFLOW_ID_CONFLICT_POLICY_' -); - -export interface BaseWorkflowOptions { - /** - * Defines what happens when trying to start a Workflow with the same ID as a *Closed* Workflow. - * - * *Note: It is not possible to have two actively running Workflows with the same ID.* - * - * @default WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE - */ - workflowIdReusePolicy?: WorkflowIdReusePolicy; - - /** - * Defines what happens when trying to start a Workflow with the same ID as a *Running* Workflow. - * - * *Note: It is not possible to have two actively running Workflows with the same ID.* - * - * @default WorkflowIdConflictPolicy.WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED - */ - workflowIdConflictPolicy?: WorkflowIdConflictPolicy; - - /** - * Controls how a Workflow Execution is retried. - * - * By default, Workflow Executions are not retried. Do not override this behavior unless you know what you're doing. - * {@link https://docs.temporal.io/concepts/what-is-a-retry-policy/ | More information}. - */ - retry?: RetryPolicy; - - /** - * Optional cron schedule for Workflow. If a cron schedule is specified, the Workflow will run as a cron based on the - * schedule. The scheduling will be based on UTC time. The schedule for the next run only happens after the current - * run is completed/failed/timeout. If a RetryPolicy is also supplied, and the Workflow failed or timed out, the - * Workflow will be retried based on the retry policy. While the Workflow is retrying, it won't schedule its next run. - * If the next schedule is due while the Workflow is running (or retrying), then it will skip that schedule. Cron - * Workflow will not stop until it is terminated or cancelled (by returning temporal.CanceledError). - * https://crontab.guru/ is useful for testing your cron expressions. - */ - cronSchedule?: string; - - /** - * Specifies additional non-indexed information to attach to the Workflow Execution. The values can be anything that - * is serializable by {@link DataConverter}. - */ - memo?: Record; - - /** - * Specifies additional indexed information to attach to the Workflow Execution. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom data converter is provided. - * - * @deprecated Use {@link typedSearchAttributes} instead. - */ - searchAttributes?: SearchAttributes; // eslint-disable-line @typescript-eslint/no-deprecated - - /** - * Specifies additional indexed information to attach to the Workflow Execution. More info: - * https://docs.temporal.io/docs/typescript/search-attributes - * - * Values are always converted using {@link JsonPayloadConverter}, even when a custom data converter is provided. - * Note that search attributes are not encoded, as such, do not include any sensitive information. - * - * If both {@link searchAttributes} and {@link typedSearchAttributes} are provided, conflicting keys will be overwritten - * by {@link typedSearchAttributes}. - */ - typedSearchAttributes?: SearchAttributePair[] | TypedSearchAttributes; - - /** - * General fixed details for this workflow execution that may appear in UI/CLI. - * This can be in Temporal markdown format and can span multiple lines. - * - * @experimental User metadata is a new API and susceptible to change. - */ - staticDetails?: string; - /** - * A single-line fixed summary for this workflow execution that may appear in the UI/CLI. - * This can be in single-line Temporal markdown format. - * - * @experimental User metadata is a new API and susceptible to change. - */ - staticSummary?: string; - - /** - * Priority of a workflow - */ - priority?: Priority; -} - -export type WithWorkflowArgs = T & - (Parameters extends [any, ...any[]] - ? { - /** - * Arguments to pass to the Workflow - */ - args: Parameters | Readonly>; - } - : { - /** - * Arguments to pass to the Workflow - */ - args?: Parameters | Readonly>; - }); - -export interface WorkflowDurationOptions { - /** - * The time after which workflow run is automatically terminated by Temporal service. Do not - * rely on run timeout for business level timeouts. It is preferred to use in workflow timers - * for this purpose. - * - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - workflowRunTimeout?: Duration; - - /** - * - * The time after which workflow execution (which includes run retries and continue as new) is - * automatically terminated by Temporal service. Do not rely on execution timeout for business - * level timeouts. It is preferred to use in workflow timers for this purpose. - * - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - workflowExecutionTimeout?: Duration; - - /** - * Maximum execution time of a single workflow task. Default is 10 seconds. - * - * @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string} - */ - workflowTaskTimeout?: Duration; -} - -export type CommonWorkflowOptions = BaseWorkflowOptions & WorkflowDurationOptions; - -export function extractWorkflowType( - workflowTypeOrFunc: string | T | WorkflowFunctionWithOptions -): string { - if (typeof workflowTypeOrFunc === 'string') return workflowTypeOrFunc as string; - if (typeof workflowTypeOrFunc === 'function') { - if (workflowTypeOrFunc?.name) return workflowTypeOrFunc.name; - throw new TypeError('Invalid workflow type: the workflow function is anonymous'); - } - throw new TypeError( - `Invalid workflow type: expected either a string or a function, got '${typeof workflowTypeOrFunc}'` - ); -} diff --git a/node_modules/@temporalio/proto/LICENSE b/node_modules/@temporalio/proto/LICENSE deleted file mode 100644 index 7c6bbca..0000000 --- a/node_modules/@temporalio/proto/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2021-2025 Temporal Technologies Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@temporalio/proto/README.md b/node_modules/@temporalio/proto/README.md deleted file mode 100644 index c83426d..0000000 --- a/node_modules/@temporalio/proto/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# `@temporalio/proto` - -[![NPM](https://img.shields.io/npm/v/@temporalio/proto?style=for-the-badge)](https://www.npmjs.com/package/@temporalio/proto) - -Part of [Temporal](https://temporal.io)'s TypeScript SDK (see [docs](https://docs.temporal.io/typescript/introduction/) and [samples](https://github.com/temporalio/samples-typescript)). - -You should usually not be using this package directly. Instead use: - -- [`@temporalio/client`](https://typescript.temporal.io/api/namespaces/client) -- [`@temporalio/worker`](https://typescript.temporal.io/api/namespaces/worker) -- [`@temporalio/workflow`](https://typescript.temporal.io/api/namespaces/workflow) -- [`@temporalio/activity`](https://typescript.temporal.io/api/namespaces/activity) diff --git a/node_modules/@temporalio/proto/lib/patch-protobuf-root.d.ts b/node_modules/@temporalio/proto/lib/patch-protobuf-root.d.ts deleted file mode 100644 index b5b29da..0000000 --- a/node_modules/@temporalio/proto/lib/patch-protobuf-root.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Create a version of `root` with non-nested namespaces to match the generated types. - * For more information, see: - * https://github.com/temporalio/sdk-typescript/blob/main/docs/protobuf-libraries.md#current-solution - * @param root Generated by `pbjs -t json-module -w commonjs -o json-module.js *.proto` - * @returns A new patched `root` - */ -export declare function patchProtobufRoot>(root: T): T; diff --git a/node_modules/@temporalio/proto/lib/patch-protobuf-root.js b/node_modules/@temporalio/proto/lib/patch-protobuf-root.js deleted file mode 100644 index fa7b6cc..0000000 --- a/node_modules/@temporalio/proto/lib/patch-protobuf-root.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.patchProtobufRoot = patchProtobufRoot; -const ROOT_PROPS = [ - 'options', - 'parsedOptions', - 'name', - 'parent', - 'resolved', - 'comment', - 'filename', - 'nested', - '_nestedArray', -]; -/** - * Create a version of `root` with non-nested namespaces to match the generated types. - * For more information, see: - * https://github.com/temporalio/sdk-typescript/blob/main/docs/protobuf-libraries.md#current-solution - * @param root Generated by `pbjs -t json-module -w commonjs -o json-module.js *.proto` - * @returns A new patched `root` - */ -function patchProtobufRoot(root) { - return _patchProtobufRoot(root); -} -function _patchProtobufRoot(root, name) { - const newRoot = new root.constructor(isNamespace(root) ? name : {}); - for (const key in root) { - newRoot[key] = root[key]; - } - if (isRecord(root.nested)) { - for (const typeOrNamespace in root.nested) { - const value = root.nested[typeOrNamespace]; - if (ROOT_PROPS.includes(typeOrNamespace)) { - console.log(`patchProtobufRoot warning: overriding property '${typeOrNamespace}' that is used by protobufjs with the '${typeOrNamespace}' protobuf ${isNamespace(value) ? 'namespace' : 'type'}. This may result in protobufjs not working property.`); - } - if (isNamespace(value)) { - newRoot[typeOrNamespace] = _patchProtobufRoot(value, typeOrNamespace); - } - else if (isType(value)) { - newRoot[typeOrNamespace] = value; - } - } - } - return newRoot; -} -function isType(value) { - // constructor.name may get mangled by minifiers; thanksfuly protobufjs also sets a constructor.className property - return isRecord(value) && value.constructor.className === 'Type'; -} -function isNamespace(value) { - // constructor.name may get mangled by minifiers; thanksfuly protobufjs also sets a constructor.className property - return isRecord(value) && value.constructor.className === 'Namespace'; -} -// Duplicate from type-helpers instead of importing in order to avoid circular dependency -function isRecord(value) { - return typeof value === 'object' && value !== null; -} -//# sourceMappingURL=patch-protobuf-root.js.map \ No newline at end of file diff --git a/node_modules/@temporalio/proto/lib/patch-protobuf-root.js.map b/node_modules/@temporalio/proto/lib/patch-protobuf-root.js.map deleted file mode 100644 index 021f135..0000000 --- a/node_modules/@temporalio/proto/lib/patch-protobuf-root.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"patch-protobuf-root.js","sourceRoot":"","sources":["../src/patch-protobuf-root.ts"],"names":[],"mappings":";;AAmBA,8CAEC;AArBD,MAAM,UAAU,GAAG;IACjB,SAAS;IACT,eAAe;IACf,MAAM;IACN,QAAQ;IACR,UAAU;IACV,SAAS;IACT,UAAU;IACV,QAAQ;IACR,cAAc;CACf,CAAC;AAEF;;;;;;GAMG;AACH,SAAgB,iBAAiB,CAAoC,IAAO;IAC1E,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,kBAAkB,CAAoC,IAAO,EAAE,IAAa;IACnF,MAAM,OAAO,GAAG,IAAK,IAAI,CAAC,WAAmB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC7E,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,KAAK,MAAM,eAAe,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;YAC3C,IAAI,UAAU,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;gBACzC,OAAO,CAAC,GAAG,CACT,mDAAmD,eAAe,0CAA0C,eAAe,cACzH,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MACrC,uDAAuD,CACxD,CAAC;YACJ,CAAC;YAED,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;gBACvB,OAAO,CAAC,eAAe,CAAC,GAAG,kBAAkB,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;YACxE,CAAC;iBAAM,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzB,OAAO,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;YACnC,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAKD,SAAS,MAAM,CAAC,KAAc;IAC5B,kHAAkH;IAClH,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAK,KAAK,CAAC,WAAmB,CAAC,SAAS,KAAK,MAAM,CAAC;AAC5E,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,kHAAkH;IAClH,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAK,KAAK,CAAC,WAAmB,CAAC,SAAS,KAAK,WAAW,CAAC;AACjF,CAAC;AAED,yFAAyF;AACzF,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/@temporalio/proto/package.json b/node_modules/@temporalio/proto/package.json deleted file mode 100644 index 2cf3cef..0000000 --- a/node_modules/@temporalio/proto/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "@temporalio/proto", - "version": "1.16.2", - "description": "Temporal.io SDK compiled protobuf definitions", - "main": "protos/index.js", - "types": "protos/index.d.ts", - "files": [ - "protos/", - "src/", - "lib/" - ], - "keywords": [ - "temporal", - "workflow", - "isolate" - ], - "author": "Temporal Technologies Inc. ", - "license": "MIT", - "dependencies": { - "long": "^5.2.3", - "protobufjs": "^7.2.5" - }, - "devDependencies": { - "glob": "^10.3.10", - "protobufjs-cli": "^1.1.2" - }, - "bugs": { - "url": "https://github.com/temporalio/sdk-typescript/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/temporalio/sdk-typescript.git", - "directory": "packages/proto" - }, - "homepage": "https://github.com/temporalio/sdk-typescript/tree/main/packages/proto", - "publishConfig": { - "access": "public" - }, - "engines": { - "node": ">= 20.0.0" - }, - "scripts": { - "build": "tsx ./scripts/compile-proto.ts" - } -} \ No newline at end of file diff --git a/node_modules/@temporalio/proto/protos/index.d.ts b/node_modules/@temporalio/proto/protos/index.d.ts deleted file mode 100644 index 8405bc0..0000000 --- a/node_modules/@temporalio/proto/protos/index.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * This package contains code generated from the Temporal `sdk-core` protobuf definitions using [protobufjs](https://www.npmjs.com/package/protobufjs), it is used by the Temporal worker and client packages. - * - * You will most likely never import this package directly. - * - * ### Core SDK API - * - * [Core SDK](https://github.com/temporalio/sdk-core) interfaces can be accessed in the `coresdk` namespace. - * - * ```ts - * import { coresdk } from '@temporalio/proto'; - * const activityTask: coresdk.activity_task.IActivityTask = { ... }; - * ``` - * - * The source protos are in the [sdk-core repo](https://github.com/temporalio/sdk-core/tree/ts-release/protos/local/temporal/sdk/core), for example [`ActivityTask` in `activity_task.proto`](https://github.com/temporalio/sdk-core/blob/85454935e39f789aaaa81f8a05773f8e2cdbcde2/protos/local/temporal/sdk/core/activity_task/activity_task.proto#L12). - * - * ### Temporal Service API - * - * Temporal API interfaces - used to communicate with the Temporal service - can be accessed in the `temporal` namespace. - * - * ```ts - * import { temporal } from '@temporalio/proto'; - * const retryPolicy: temporal.api.common.v1.IRetryPolicy = { ... }; - * ``` - * - * The source protos are in [sdk-core/protos/api_upstream/temporal/api/](https://github.com/temporalio/sdk-core/tree/ts-release/protos/api_upstream/temporal/api), for example [`RetryPolicy` in `temporal/api/common/v1/message.proto`](https://github.com/temporalio/sdk-core/blob/85454935e39f789aaaa81f8a05773f8e2cdbcde2/protos/api_upstream/temporal/api/common/v1/message.proto#L96). - * - * The gRPC service methods are documented in the proto comments and in the corresponding [`Temporal CLI` docs](https://docs.temporal.io/cli/). - * @module - */ - -export * from './root'; diff --git a/node_modules/@temporalio/proto/protos/index.js b/node_modules/@temporalio/proto/protos/index.js deleted file mode 100644 index 99fd1b3..0000000 --- a/node_modules/@temporalio/proto/protos/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./root'); diff --git a/node_modules/@temporalio/proto/protos/json-module.js b/node_modules/@temporalio/proto/protos/json-module.js deleted file mode 100644 index 2dcb70e..0000000 --- a/node_modules/@temporalio/proto/protos/json-module.js +++ /dev/null @@ -1,22713 +0,0 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -"use strict"; - -var $protobuf = require("protobufjs/light"); - -var $root = ($protobuf.roots.__temporal || ($protobuf.roots.__temporal = new $protobuf.Root())) -.addJSON({ - coresdk: { - options: { - ruby_package: "Temporalio::Internal::Bridge::Api::CoreInterface" - }, - nested: { - ActivityHeartbeat: { - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - details: { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 2 - } - } - }, - ActivityTaskCompletion: { - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - result: { - type: "activity_result.ActivityExecutionResult", - id: 2 - } - } - }, - WorkflowSlotInfo: { - fields: { - workflowType: { - type: "string", - id: 1 - }, - isSticky: { - type: "bool", - id: 2 - } - } - }, - ActivitySlotInfo: { - fields: { - activityType: { - type: "string", - id: 1 - } - } - }, - LocalActivitySlotInfo: { - fields: { - activityType: { - type: "string", - id: 1 - } - } - }, - NexusSlotInfo: { - fields: { - service: { - type: "string", - id: 1 - }, - operation: { - type: "string", - id: 2 - } - } - }, - NamespaceInfo: { - fields: { - limits: { - type: "Limits", - id: 1 - } - }, - nested: { - Limits: { - fields: { - blobSizeLimitError: { - type: "int64", - id: 1 - }, - memoSizeLimitError: { - type: "int64", - id: 2 - } - } - } - } - }, - activity_result: { - options: { - ruby_package: "Temporalio::Internal::Bridge::Api::ActivityResult" - }, - nested: { - ActivityExecutionResult: { - oneofs: { - status: { - oneof: [ - "completed", - "failed", - "cancelled", - "willCompleteAsync" - ] - } - }, - fields: { - completed: { - type: "Success", - id: 1 - }, - failed: { - type: "Failure", - id: 2 - }, - cancelled: { - type: "Cancellation", - id: 3 - }, - willCompleteAsync: { - type: "WillCompleteAsync", - id: 4 - } - } - }, - ActivityResolution: { - oneofs: { - status: { - oneof: [ - "completed", - "failed", - "cancelled", - "backoff" - ] - } - }, - fields: { - completed: { - type: "Success", - id: 1 - }, - failed: { - type: "Failure", - id: 2 - }, - cancelled: { - type: "Cancellation", - id: 3 - }, - backoff: { - type: "DoBackoff", - id: 4 - } - } - }, - Success: { - fields: { - result: { - type: "temporal.api.common.v1.Payload", - id: 1 - } - } - }, - Failure: { - fields: { - failure: { - type: "temporal.api.failure.v1.Failure", - id: 1 - } - } - }, - Cancellation: { - fields: { - failure: { - type: "temporal.api.failure.v1.Failure", - id: 1 - } - } - }, - WillCompleteAsync: { - fields: {} - }, - DoBackoff: { - fields: { - attempt: { - type: "uint32", - id: 1 - }, - backoffDuration: { - type: "google.protobuf.Duration", - id: 2 - }, - originalScheduleTime: { - type: "google.protobuf.Timestamp", - id: 3 - } - } - } - } - }, - activity_task: { - options: { - ruby_package: "Temporalio::Internal::Bridge::Api::ActivityTask" - }, - nested: { - ActivityTask: { - oneofs: { - variant: { - oneof: [ - "start", - "cancel" - ] - } - }, - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - start: { - type: "Start", - id: 3 - }, - cancel: { - type: "Cancel", - id: 4 - } - } - }, - Start: { - fields: { - workflowNamespace: { - type: "string", - id: 1 - }, - workflowType: { - type: "string", - id: 2 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 3 - }, - activityId: { - type: "string", - id: 4 - }, - activityType: { - type: "string", - id: 5 - }, - headerFields: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 6 - }, - input: { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 7 - }, - heartbeatDetails: { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 8 - }, - scheduledTime: { - type: "google.protobuf.Timestamp", - id: 9 - }, - currentAttemptScheduledTime: { - type: "google.protobuf.Timestamp", - id: 10 - }, - startedTime: { - type: "google.protobuf.Timestamp", - id: 11 - }, - attempt: { - type: "uint32", - id: 12 - }, - scheduleToCloseTimeout: { - type: "google.protobuf.Duration", - id: 13 - }, - startToCloseTimeout: { - type: "google.protobuf.Duration", - id: 14 - }, - heartbeatTimeout: { - type: "google.protobuf.Duration", - id: 15 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 16 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 18 - }, - isLocal: { - type: "bool", - id: 17 - } - } - }, - Cancel: { - fields: { - reason: { - type: "ActivityCancelReason", - id: 1 - }, - details: { - type: "ActivityCancellationDetails", - id: 2 - } - } - }, - ActivityCancellationDetails: { - fields: { - isNotFound: { - type: "bool", - id: 1 - }, - isCancelled: { - type: "bool", - id: 2 - }, - isPaused: { - type: "bool", - id: 3 - }, - isTimedOut: { - type: "bool", - id: 4 - }, - isWorkerShutdown: { - type: "bool", - id: 5 - }, - isReset: { - type: "bool", - id: 6 - } - } - }, - ActivityCancelReason: { - values: { - NOT_FOUND: 0, - CANCELLED: 1, - TIMED_OUT: 2, - WORKER_SHUTDOWN: 3, - PAUSED: 4, - RESET: 5 - } - } - } - }, - common: { - options: { - ruby_package: "Temporalio::Internal::Bridge::Api::Common" - }, - nested: { - NamespacedWorkflowExecution: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowId: { - type: "string", - id: 2 - }, - runId: { - type: "string", - id: 3 - } - } - }, - VersioningIntent: { - values: { - UNSPECIFIED: 0, - COMPATIBLE: 1, - DEFAULT: 2 - } - }, - WorkerDeploymentVersion: { - fields: { - deploymentName: { - type: "string", - id: 1 - }, - buildId: { - type: "string", - id: 2 - } - } - } - } - }, - external_data: { - options: { - ruby_package: "Temporalio::Internal::Bridge::Api::ExternalData" - }, - nested: { - LocalActivityMarkerData: { - fields: { - seq: { - type: "uint32", - id: 1 - }, - attempt: { - type: "uint32", - id: 2 - }, - activityId: { - type: "string", - id: 3 - }, - activityType: { - type: "string", - id: 4 - }, - completeTime: { - type: "google.protobuf.Timestamp", - id: 5 - }, - backoff: { - type: "google.protobuf.Duration", - id: 6 - }, - originalScheduleTime: { - type: "google.protobuf.Timestamp", - id: 7 - } - } - }, - PatchedMarkerData: { - fields: { - id: { - type: "string", - id: 1 - }, - deprecated: { - type: "bool", - id: 2 - } - } - } - } - }, - workflow_activation: { - options: { - ruby_package: "Temporalio::Internal::Bridge::Api::WorkflowActivation" - }, - nested: { - WorkflowActivation: { - fields: { - runId: { - type: "string", - id: 1 - }, - timestamp: { - type: "google.protobuf.Timestamp", - id: 2 - }, - isReplaying: { - type: "bool", - id: 3 - }, - historyLength: { - type: "uint32", - id: 4 - }, - jobs: { - rule: "repeated", - type: "WorkflowActivationJob", - id: 5 - }, - availableInternalFlags: { - rule: "repeated", - type: "uint32", - id: 6 - }, - historySizeBytes: { - type: "uint64", - id: 7 - }, - continueAsNewSuggested: { - type: "bool", - id: 8 - }, - deploymentVersionForCurrentTask: { - type: "common.WorkerDeploymentVersion", - id: 9 - }, - lastSdkVersion: { - type: "string", - id: 10 - }, - suggestContinueAsNewReasons: { - rule: "repeated", - type: "temporal.api.enums.v1.SuggestContinueAsNewReason", - id: 11 - }, - targetWorkerDeploymentVersionChanged: { - type: "bool", - id: 12 - } - } - }, - WorkflowActivationJob: { - oneofs: { - variant: { - oneof: [ - "initializeWorkflow", - "fireTimer", - "updateRandomSeed", - "queryWorkflow", - "cancelWorkflow", - "signalWorkflow", - "resolveActivity", - "notifyHasPatch", - "resolveChildWorkflowExecutionStart", - "resolveChildWorkflowExecution", - "resolveSignalExternalWorkflow", - "resolveRequestCancelExternalWorkflow", - "doUpdate", - "resolveNexusOperationStart", - "resolveNexusOperation", - "removeFromCache" - ] - } - }, - fields: { - initializeWorkflow: { - type: "InitializeWorkflow", - id: 1 - }, - fireTimer: { - type: "FireTimer", - id: 2 - }, - updateRandomSeed: { - type: "UpdateRandomSeed", - id: 4 - }, - queryWorkflow: { - type: "QueryWorkflow", - id: 5 - }, - cancelWorkflow: { - type: "CancelWorkflow", - id: 6 - }, - signalWorkflow: { - type: "SignalWorkflow", - id: 7 - }, - resolveActivity: { - type: "ResolveActivity", - id: 8 - }, - notifyHasPatch: { - type: "NotifyHasPatch", - id: 9 - }, - resolveChildWorkflowExecutionStart: { - type: "ResolveChildWorkflowExecutionStart", - id: 10 - }, - resolveChildWorkflowExecution: { - type: "ResolveChildWorkflowExecution", - id: 11 - }, - resolveSignalExternalWorkflow: { - type: "ResolveSignalExternalWorkflow", - id: 12 - }, - resolveRequestCancelExternalWorkflow: { - type: "ResolveRequestCancelExternalWorkflow", - id: 13 - }, - doUpdate: { - type: "DoUpdate", - id: 14 - }, - resolveNexusOperationStart: { - type: "ResolveNexusOperationStart", - id: 15 - }, - resolveNexusOperation: { - type: "ResolveNexusOperation", - id: 16 - }, - removeFromCache: { - type: "RemoveFromCache", - id: 50 - } - } - }, - InitializeWorkflow: { - fields: { - workflowType: { - type: "string", - id: 1 - }, - workflowId: { - type: "string", - id: 2 - }, - "arguments": { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 3 - }, - randomnessSeed: { - type: "uint64", - id: 4 - }, - headers: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 5 - }, - identity: { - type: "string", - id: 6 - }, - parentWorkflowInfo: { - type: "common.NamespacedWorkflowExecution", - id: 7 - }, - workflowExecutionTimeout: { - type: "google.protobuf.Duration", - id: 8 - }, - workflowRunTimeout: { - type: "google.protobuf.Duration", - id: 9 - }, - workflowTaskTimeout: { - type: "google.protobuf.Duration", - id: 10 - }, - continuedFromExecutionRunId: { - type: "string", - id: 11 - }, - continuedInitiator: { - type: "temporal.api.enums.v1.ContinueAsNewInitiator", - id: 12 - }, - continuedFailure: { - type: "temporal.api.failure.v1.Failure", - id: 13 - }, - lastCompletionResult: { - type: "temporal.api.common.v1.Payloads", - id: 14 - }, - firstExecutionRunId: { - type: "string", - id: 15 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 16 - }, - attempt: { - type: "int32", - id: 17 - }, - cronSchedule: { - type: "string", - id: 18 - }, - workflowExecutionExpirationTime: { - type: "google.protobuf.Timestamp", - id: 19 - }, - cronScheduleToScheduleInterval: { - type: "google.protobuf.Duration", - id: 20 - }, - memo: { - type: "temporal.api.common.v1.Memo", - id: 21 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 22 - }, - startTime: { - type: "google.protobuf.Timestamp", - id: 23 - }, - rootWorkflow: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 24 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 25 - } - } - }, - FireTimer: { - fields: { - seq: { - type: "uint32", - id: 1 - } - } - }, - ResolveActivity: { - fields: { - seq: { - type: "uint32", - id: 1 - }, - result: { - type: "activity_result.ActivityResolution", - id: 2 - }, - isLocal: { - type: "bool", - id: 3 - } - } - }, - ResolveChildWorkflowExecutionStart: { - oneofs: { - status: { - oneof: [ - "succeeded", - "failed", - "cancelled" - ] - } - }, - fields: { - seq: { - type: "uint32", - id: 1 - }, - succeeded: { - type: "ResolveChildWorkflowExecutionStartSuccess", - id: 2 - }, - failed: { - type: "ResolveChildWorkflowExecutionStartFailure", - id: 3 - }, - cancelled: { - type: "ResolveChildWorkflowExecutionStartCancelled", - id: 4 - } - } - }, - ResolveChildWorkflowExecutionStartSuccess: { - fields: { - runId: { - type: "string", - id: 1 - } - } - }, - ResolveChildWorkflowExecutionStartFailure: { - fields: { - workflowId: { - type: "string", - id: 1 - }, - workflowType: { - type: "string", - id: 2 - }, - cause: { - type: "child_workflow.StartChildWorkflowExecutionFailedCause", - id: 3 - } - } - }, - ResolveChildWorkflowExecutionStartCancelled: { - fields: { - failure: { - type: "temporal.api.failure.v1.Failure", - id: 1 - } - } - }, - ResolveChildWorkflowExecution: { - fields: { - seq: { - type: "uint32", - id: 1 - }, - result: { - type: "child_workflow.ChildWorkflowResult", - id: 2 - } - } - }, - UpdateRandomSeed: { - fields: { - randomnessSeed: { - type: "uint64", - id: 1 - } - } - }, - QueryWorkflow: { - fields: { - queryId: { - type: "string", - id: 1 - }, - queryType: { - type: "string", - id: 2 - }, - "arguments": { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 3 - }, - headers: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 5 - } - } - }, - CancelWorkflow: { - fields: { - reason: { - type: "string", - id: 1 - } - } - }, - SignalWorkflow: { - fields: { - signalName: { - type: "string", - id: 1 - }, - input: { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - headers: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 5 - } - } - }, - NotifyHasPatch: { - fields: { - patchId: { - type: "string", - id: 1 - } - } - }, - ResolveSignalExternalWorkflow: { - fields: { - seq: { - type: "uint32", - id: 1 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 2 - } - } - }, - ResolveRequestCancelExternalWorkflow: { - fields: { - seq: { - type: "uint32", - id: 1 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 2 - } - } - }, - DoUpdate: { - fields: { - id: { - type: "string", - id: 1 - }, - protocolInstanceId: { - type: "string", - id: 2 - }, - name: { - type: "string", - id: 3 - }, - input: { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 4 - }, - headers: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 5 - }, - meta: { - type: "temporal.api.update.v1.Meta", - id: 6 - }, - runValidator: { - type: "bool", - id: 7 - } - } - }, - ResolveNexusOperationStart: { - oneofs: { - status: { - oneof: [ - "operationToken", - "startedSync", - "failed" - ] - } - }, - fields: { - seq: { - type: "uint32", - id: 1 - }, - operationToken: { - type: "string", - id: 2 - }, - startedSync: { - type: "bool", - id: 3 - }, - failed: { - type: "temporal.api.failure.v1.Failure", - id: 4 - } - } - }, - ResolveNexusOperation: { - fields: { - seq: { - type: "uint32", - id: 1 - }, - result: { - type: "nexus.NexusOperationResult", - id: 2 - } - } - }, - RemoveFromCache: { - fields: { - message: { - type: "string", - id: 1 - }, - reason: { - type: "EvictionReason", - id: 2 - } - }, - nested: { - EvictionReason: { - values: { - UNSPECIFIED: 0, - CACHE_FULL: 1, - CACHE_MISS: 2, - NONDETERMINISM: 3, - LANG_FAIL: 4, - LANG_REQUESTED: 5, - TASK_NOT_FOUND: 6, - UNHANDLED_COMMAND: 7, - FATAL: 8, - PAGINATION_OR_HISTORY_FETCH: 9, - WORKFLOW_EXECUTION_ENDING: 10 - } - } - } - } - } - }, - child_workflow: { - options: { - ruby_package: "Temporalio::Internal::Bridge::Api::ChildWorkflow" - }, - nested: { - ChildWorkflowResult: { - oneofs: { - status: { - oneof: [ - "completed", - "failed", - "cancelled" - ] - } - }, - fields: { - completed: { - type: "Success", - id: 1 - }, - failed: { - type: "Failure", - id: 2 - }, - cancelled: { - type: "Cancellation", - id: 3 - } - } - }, - Success: { - fields: { - result: { - type: "temporal.api.common.v1.Payload", - id: 1 - } - } - }, - Failure: { - fields: { - failure: { - type: "temporal.api.failure.v1.Failure", - id: 1 - } - } - }, - Cancellation: { - fields: { - failure: { - type: "temporal.api.failure.v1.Failure", - id: 1 - } - } - }, - ParentClosePolicy: { - values: { - PARENT_CLOSE_POLICY_UNSPECIFIED: 0, - PARENT_CLOSE_POLICY_TERMINATE: 1, - PARENT_CLOSE_POLICY_ABANDON: 2, - PARENT_CLOSE_POLICY_REQUEST_CANCEL: 3 - } - }, - StartChildWorkflowExecutionFailedCause: { - values: { - START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED: 0, - START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS: 1 - } - }, - ChildWorkflowCancellationType: { - values: { - ABANDON: 0, - TRY_CANCEL: 1, - WAIT_CANCELLATION_COMPLETED: 2, - WAIT_CANCELLATION_REQUESTED: 3 - } - } - } - }, - nexus: { - options: { - ruby_package: "Temporalio::Internal::Bridge::Api::Nexus" - }, - nested: { - NexusOperationResult: { - oneofs: { - status: { - oneof: [ - "completed", - "failed", - "cancelled", - "timedOut" - ] - } - }, - fields: { - completed: { - type: "temporal.api.common.v1.Payload", - id: 1 - }, - failed: { - type: "temporal.api.failure.v1.Failure", - id: 2 - }, - cancelled: { - type: "temporal.api.failure.v1.Failure", - id: 3 - }, - timedOut: { - type: "temporal.api.failure.v1.Failure", - id: 4 - } - } - }, - NexusTaskCompletion: { - oneofs: { - status: { - oneof: [ - "completed", - "error", - "ackCancel", - "failure" - ] - } - }, - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - completed: { - type: "temporal.api.nexus.v1.Response", - id: 2 - }, - error: { - type: "temporal.api.nexus.v1.HandlerError", - id: 3, - options: { - deprecated: true - } - }, - ackCancel: { - type: "bool", - id: 4 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 5 - } - } - }, - NexusTask: { - oneofs: { - variant: { - oneof: [ - "task", - "cancelTask" - ] - } - }, - fields: { - task: { - type: "temporal.api.workflowservice.v1.PollNexusTaskQueueResponse", - id: 1 - }, - cancelTask: { - type: "CancelNexusTask", - id: 2 - }, - requestDeadline: { - type: "google.protobuf.Timestamp", - id: 3 - } - } - }, - CancelNexusTask: { - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - reason: { - type: "NexusTaskCancelReason", - id: 2 - } - } - }, - NexusTaskCancelReason: { - values: { - TIMED_OUT: 0, - WORKER_SHUTDOWN: 1 - } - }, - NexusOperationCancellationType: { - values: { - WAIT_CANCELLATION_COMPLETED: 0, - ABANDON: 1, - TRY_CANCEL: 2, - WAIT_CANCELLATION_REQUESTED: 3 - } - } - } - }, - workflow_commands: { - options: { - ruby_package: "Temporalio::Internal::Bridge::Api::WorkflowCommands" - }, - nested: { - WorkflowCommand: { - oneofs: { - variant: { - oneof: [ - "startTimer", - "scheduleActivity", - "respondToQuery", - "requestCancelActivity", - "cancelTimer", - "completeWorkflowExecution", - "failWorkflowExecution", - "continueAsNewWorkflowExecution", - "cancelWorkflowExecution", - "setPatchMarker", - "startChildWorkflowExecution", - "cancelChildWorkflowExecution", - "requestCancelExternalWorkflowExecution", - "signalExternalWorkflowExecution", - "cancelSignalWorkflow", - "scheduleLocalActivity", - "requestCancelLocalActivity", - "upsertWorkflowSearchAttributes", - "modifyWorkflowProperties", - "updateResponse", - "scheduleNexusOperation", - "requestCancelNexusOperation" - ] - } - }, - fields: { - userMetadata: { - type: "temporal.api.sdk.v1.UserMetadata", - id: 100 - }, - startTimer: { - type: "StartTimer", - id: 1 - }, - scheduleActivity: { - type: "ScheduleActivity", - id: 2 - }, - respondToQuery: { - type: "QueryResult", - id: 3 - }, - requestCancelActivity: { - type: "RequestCancelActivity", - id: 4 - }, - cancelTimer: { - type: "CancelTimer", - id: 5 - }, - completeWorkflowExecution: { - type: "CompleteWorkflowExecution", - id: 6 - }, - failWorkflowExecution: { - type: "FailWorkflowExecution", - id: 7 - }, - continueAsNewWorkflowExecution: { - type: "ContinueAsNewWorkflowExecution", - id: 8 - }, - cancelWorkflowExecution: { - type: "CancelWorkflowExecution", - id: 9 - }, - setPatchMarker: { - type: "SetPatchMarker", - id: 10 - }, - startChildWorkflowExecution: { - type: "StartChildWorkflowExecution", - id: 11 - }, - cancelChildWorkflowExecution: { - type: "CancelChildWorkflowExecution", - id: 12 - }, - requestCancelExternalWorkflowExecution: { - type: "RequestCancelExternalWorkflowExecution", - id: 13 - }, - signalExternalWorkflowExecution: { - type: "SignalExternalWorkflowExecution", - id: 14 - }, - cancelSignalWorkflow: { - type: "CancelSignalWorkflow", - id: 15 - }, - scheduleLocalActivity: { - type: "ScheduleLocalActivity", - id: 16 - }, - requestCancelLocalActivity: { - type: "RequestCancelLocalActivity", - id: 17 - }, - upsertWorkflowSearchAttributes: { - type: "UpsertWorkflowSearchAttributes", - id: 18 - }, - modifyWorkflowProperties: { - type: "ModifyWorkflowProperties", - id: 19 - }, - updateResponse: { - type: "UpdateResponse", - id: 20 - }, - scheduleNexusOperation: { - type: "ScheduleNexusOperation", - id: 21 - }, - requestCancelNexusOperation: { - type: "RequestCancelNexusOperation", - id: 22 - } - } - }, - StartTimer: { - fields: { - seq: { - type: "uint32", - id: 1 - }, - startToFireTimeout: { - type: "google.protobuf.Duration", - id: 2 - } - } - }, - CancelTimer: { - fields: { - seq: { - type: "uint32", - id: 1 - } - } - }, - ScheduleActivity: { - fields: { - seq: { - type: "uint32", - id: 1 - }, - activityId: { - type: "string", - id: 2 - }, - activityType: { - type: "string", - id: 3 - }, - taskQueue: { - type: "string", - id: 5 - }, - headers: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 6 - }, - "arguments": { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 7 - }, - scheduleToCloseTimeout: { - type: "google.protobuf.Duration", - id: 8 - }, - scheduleToStartTimeout: { - type: "google.protobuf.Duration", - id: 9 - }, - startToCloseTimeout: { - type: "google.protobuf.Duration", - id: 10 - }, - heartbeatTimeout: { - type: "google.protobuf.Duration", - id: 11 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 12 - }, - cancellationType: { - type: "ActivityCancellationType", - id: 13 - }, - doNotEagerlyExecute: { - type: "bool", - id: 14 - }, - versioningIntent: { - type: "coresdk.common.VersioningIntent", - id: 15 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 16 - } - } - }, - ScheduleLocalActivity: { - fields: { - seq: { - type: "uint32", - id: 1 - }, - activityId: { - type: "string", - id: 2 - }, - activityType: { - type: "string", - id: 3 - }, - attempt: { - type: "uint32", - id: 4 - }, - originalScheduleTime: { - type: "google.protobuf.Timestamp", - id: 5 - }, - headers: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 6 - }, - "arguments": { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 7 - }, - scheduleToCloseTimeout: { - type: "google.protobuf.Duration", - id: 8 - }, - scheduleToStartTimeout: { - type: "google.protobuf.Duration", - id: 9 - }, - startToCloseTimeout: { - type: "google.protobuf.Duration", - id: 10 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 11 - }, - localRetryThreshold: { - type: "google.protobuf.Duration", - id: 12 - }, - cancellationType: { - type: "ActivityCancellationType", - id: 13 - } - } - }, - ActivityCancellationType: { - values: { - TRY_CANCEL: 0, - WAIT_CANCELLATION_COMPLETED: 1, - ABANDON: 2 - } - }, - RequestCancelActivity: { - fields: { - seq: { - type: "uint32", - id: 1 - } - } - }, - RequestCancelLocalActivity: { - fields: { - seq: { - type: "uint32", - id: 1 - } - } - }, - QueryResult: { - oneofs: { - variant: { - oneof: [ - "succeeded", - "failed" - ] - } - }, - fields: { - queryId: { - type: "string", - id: 1 - }, - succeeded: { - type: "QuerySuccess", - id: 2 - }, - failed: { - type: "temporal.api.failure.v1.Failure", - id: 3 - } - } - }, - QuerySuccess: { - fields: { - response: { - type: "temporal.api.common.v1.Payload", - id: 1 - } - } - }, - CompleteWorkflowExecution: { - fields: { - result: { - type: "temporal.api.common.v1.Payload", - id: 1 - } - } - }, - FailWorkflowExecution: { - fields: { - failure: { - type: "temporal.api.failure.v1.Failure", - id: 1 - } - } - }, - ContinueAsNewWorkflowExecution: { - fields: { - workflowType: { - type: "string", - id: 1 - }, - taskQueue: { - type: "string", - id: 2 - }, - "arguments": { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 3 - }, - workflowRunTimeout: { - type: "google.protobuf.Duration", - id: 4 - }, - workflowTaskTimeout: { - type: "google.protobuf.Duration", - id: 5 - }, - memo: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 6 - }, - headers: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 7 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 8 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 9 - }, - versioningIntent: { - type: "coresdk.common.VersioningIntent", - id: 10 - }, - initialVersioningBehavior: { - type: "temporal.api.enums.v1.ContinueAsNewVersioningBehavior", - id: 11 - } - } - }, - CancelWorkflowExecution: { - fields: {} - }, - SetPatchMarker: { - fields: { - patchId: { - type: "string", - id: 1 - }, - deprecated: { - type: "bool", - id: 2 - } - } - }, - StartChildWorkflowExecution: { - fields: { - seq: { - type: "uint32", - id: 1 - }, - namespace: { - type: "string", - id: 2 - }, - workflowId: { - type: "string", - id: 3 - }, - workflowType: { - type: "string", - id: 4 - }, - taskQueue: { - type: "string", - id: 5 - }, - input: { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 6 - }, - workflowExecutionTimeout: { - type: "google.protobuf.Duration", - id: 7 - }, - workflowRunTimeout: { - type: "google.protobuf.Duration", - id: 8 - }, - workflowTaskTimeout: { - type: "google.protobuf.Duration", - id: 9 - }, - parentClosePolicy: { - type: "child_workflow.ParentClosePolicy", - id: 10 - }, - workflowIdReusePolicy: { - type: "temporal.api.enums.v1.WorkflowIdReusePolicy", - id: 12 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 13 - }, - cronSchedule: { - type: "string", - id: 14 - }, - headers: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 15 - }, - memo: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 16 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 17 - }, - cancellationType: { - type: "child_workflow.ChildWorkflowCancellationType", - id: 18 - }, - versioningIntent: { - type: "coresdk.common.VersioningIntent", - id: 19 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 20 - } - } - }, - CancelChildWorkflowExecution: { - fields: { - childWorkflowSeq: { - type: "uint32", - id: 1 - }, - reason: { - type: "string", - id: 2 - } - } - }, - RequestCancelExternalWorkflowExecution: { - fields: { - seq: { - type: "uint32", - id: 1 - }, - workflowExecution: { - type: "common.NamespacedWorkflowExecution", - id: 2 - }, - reason: { - type: "string", - id: 3 - } - } - }, - SignalExternalWorkflowExecution: { - oneofs: { - target: { - oneof: [ - "workflowExecution", - "childWorkflowId" - ] - } - }, - fields: { - seq: { - type: "uint32", - id: 1 - }, - workflowExecution: { - type: "common.NamespacedWorkflowExecution", - id: 2 - }, - childWorkflowId: { - type: "string", - id: 3 - }, - signalName: { - type: "string", - id: 4 - }, - args: { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 5 - }, - headers: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 6 - } - } - }, - CancelSignalWorkflow: { - fields: { - seq: { - type: "uint32", - id: 1 - } - } - }, - UpsertWorkflowSearchAttributes: { - fields: { - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 1 - } - } - }, - ModifyWorkflowProperties: { - fields: { - upsertedMemo: { - type: "temporal.api.common.v1.Memo", - id: 1 - } - } - }, - UpdateResponse: { - oneofs: { - response: { - oneof: [ - "accepted", - "rejected", - "completed" - ] - } - }, - fields: { - protocolInstanceId: { - type: "string", - id: 1 - }, - accepted: { - type: "google.protobuf.Empty", - id: 2 - }, - rejected: { - type: "temporal.api.failure.v1.Failure", - id: 3 - }, - completed: { - type: "temporal.api.common.v1.Payload", - id: 4 - } - } - }, - ScheduleNexusOperation: { - fields: { - seq: { - type: "uint32", - id: 1 - }, - endpoint: { - type: "string", - id: 2 - }, - service: { - type: "string", - id: 3 - }, - operation: { - type: "string", - id: 4 - }, - input: { - type: "temporal.api.common.v1.Payload", - id: 5 - }, - scheduleToCloseTimeout: { - type: "google.protobuf.Duration", - id: 6 - }, - nexusHeader: { - keyType: "string", - type: "string", - id: 7 - }, - cancellationType: { - type: "nexus.NexusOperationCancellationType", - id: 8 - }, - scheduleToStartTimeout: { - type: "google.protobuf.Duration", - id: 9 - }, - startToCloseTimeout: { - type: "google.protobuf.Duration", - id: 10 - } - } - }, - RequestCancelNexusOperation: { - fields: { - seq: { - type: "uint32", - id: 1 - } - } - } - } - }, - workflow_completion: { - options: { - ruby_package: "Temporalio::Internal::Bridge::Api::WorkflowCompletion" - }, - nested: { - WorkflowActivationCompletion: { - oneofs: { - status: { - oneof: [ - "successful", - "failed" - ] - } - }, - fields: { - runId: { - type: "string", - id: 1 - }, - successful: { - type: "Success", - id: 2 - }, - failed: { - type: "Failure", - id: 3 - } - } - }, - Success: { - fields: { - commands: { - rule: "repeated", - type: "workflow_commands.WorkflowCommand", - id: 1 - }, - usedInternalFlags: { - rule: "repeated", - type: "uint32", - id: 6 - }, - versioningBehavior: { - type: "temporal.api.enums.v1.VersioningBehavior", - id: 7 - } - } - }, - Failure: { - fields: { - failure: { - type: "temporal.api.failure.v1.Failure", - id: 1 - }, - forceCause: { - type: "temporal.api.enums.v1.WorkflowTaskFailedCause", - id: 2 - } - } - } - } - } - } - }, - temporal: { - nested: { - api: { - nested: { - common: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/common/v1;common", - java_package: "io.temporal.api.common.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Common::V1", - csharp_namespace: "Temporalio.Api.Common.V1" - }, - nested: { - DataBlob: { - fields: { - encodingType: { - type: "temporal.api.enums.v1.EncodingType", - id: 1 - }, - data: { - type: "bytes", - id: 2 - } - } - }, - Payloads: { - fields: { - payloads: { - rule: "repeated", - type: "Payload", - id: 1 - } - } - }, - Payload: { - fields: { - metadata: { - keyType: "string", - type: "bytes", - id: 1 - }, - data: { - type: "bytes", - id: 2 - }, - externalPayloads: { - rule: "repeated", - type: "ExternalPayloadDetails", - id: 3 - } - }, - nested: { - ExternalPayloadDetails: { - fields: { - sizeBytes: { - type: "int64", - id: 1 - } - } - } - } - }, - SearchAttributes: { - fields: { - indexedFields: { - keyType: "string", - type: "Payload", - id: 1 - } - } - }, - Memo: { - fields: { - fields: { - keyType: "string", - type: "Payload", - id: 1 - } - } - }, - Header: { - fields: { - fields: { - keyType: "string", - type: "Payload", - id: 1 - } - } - }, - WorkflowExecution: { - fields: { - workflowId: { - type: "string", - id: 1 - }, - runId: { - type: "string", - id: 2 - } - } - }, - WorkflowType: { - fields: { - name: { - type: "string", - id: 1 - } - } - }, - ActivityType: { - fields: { - name: { - type: "string", - id: 1 - } - } - }, - RetryPolicy: { - fields: { - initialInterval: { - type: "google.protobuf.Duration", - id: 1 - }, - backoffCoefficient: { - type: "double", - id: 2 - }, - maximumInterval: { - type: "google.protobuf.Duration", - id: 3 - }, - maximumAttempts: { - type: "int32", - id: 4 - }, - nonRetryableErrorTypes: { - rule: "repeated", - type: "string", - id: 5 - } - } - }, - MeteringMetadata: { - fields: { - nonfirstLocalActivityExecutionAttempts: { - type: "uint32", - id: 13 - } - } - }, - WorkerVersionStamp: { - fields: { - buildId: { - type: "string", - id: 1 - }, - useVersioning: { - type: "bool", - id: 3 - } - } - }, - WorkerVersionCapabilities: { - fields: { - buildId: { - type: "string", - id: 1 - }, - useVersioning: { - type: "bool", - id: 2 - }, - deploymentSeriesName: { - type: "string", - id: 4 - } - } - }, - ResetOptions: { - oneofs: { - target: { - oneof: [ - "firstWorkflowTask", - "lastWorkflowTask", - "workflowTaskId", - "buildId" - ] - } - }, - fields: { - firstWorkflowTask: { - type: "google.protobuf.Empty", - id: 1 - }, - lastWorkflowTask: { - type: "google.protobuf.Empty", - id: 2 - }, - workflowTaskId: { - type: "int64", - id: 3 - }, - buildId: { - type: "string", - id: 4 - }, - resetReapplyType: { - type: "temporal.api.enums.v1.ResetReapplyType", - id: 10, - options: { - deprecated: true - } - }, - currentRunOnly: { - type: "bool", - id: 11 - }, - resetReapplyExcludeTypes: { - rule: "repeated", - type: "temporal.api.enums.v1.ResetReapplyExcludeType", - id: 12 - } - } - }, - Callback: { - oneofs: { - variant: { - oneof: [ - "nexus", - "internal" - ] - } - }, - fields: { - nexus: { - type: "Nexus", - id: 2 - }, - internal: { - type: "Internal", - id: 3 - }, - links: { - rule: "repeated", - type: "Link", - id: 100 - } - }, - reserved: [ - [ - 1, - 1 - ] - ], - nested: { - Nexus: { - fields: { - url: { - type: "string", - id: 1 - }, - header: { - keyType: "string", - type: "string", - id: 2 - } - } - }, - Internal: { - fields: { - data: { - type: "bytes", - id: 1 - } - } - } - } - }, - Link: { - oneofs: { - variant: { - oneof: [ - "workflowEvent", - "batchJob" - ] - } - }, - fields: { - workflowEvent: { - type: "WorkflowEvent", - id: 1 - }, - batchJob: { - type: "BatchJob", - id: 2 - } - }, - nested: { - WorkflowEvent: { - oneofs: { - reference: { - oneof: [ - "eventRef", - "requestIdRef" - ] - } - }, - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowId: { - type: "string", - id: 2 - }, - runId: { - type: "string", - id: 3 - }, - eventRef: { - type: "EventReference", - id: 100 - }, - requestIdRef: { - type: "RequestIdReference", - id: 101 - } - }, - nested: { - EventReference: { - fields: { - eventId: { - type: "int64", - id: 1 - }, - eventType: { - type: "temporal.api.enums.v1.EventType", - id: 2 - } - } - }, - RequestIdReference: { - fields: { - requestId: { - type: "string", - id: 1 - }, - eventType: { - type: "temporal.api.enums.v1.EventType", - id: 2 - } - } - } - } - }, - BatchJob: { - fields: { - jobId: { - type: "string", - id: 1 - } - } - } - } - }, - Priority: { - fields: { - priorityKey: { - type: "int32", - id: 1 - }, - fairnessKey: { - type: "string", - id: 2 - }, - fairnessWeight: { - type: "float", - id: 3 - } - } - }, - WorkerSelector: { - oneofs: { - selector: { - oneof: [ - "workerInstanceKey" - ] - } - }, - fields: { - workerInstanceKey: { - type: "string", - id: 1 - } - } - } - } - } - } - }, - enums: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/enums/v1;enums", - java_package: "io.temporal.api.enums.v1", - java_multiple_files: true, - java_outer_classname: "ScheduleProto", - ruby_package: "Temporalio::Api::Enums::V1", - csharp_namespace: "Temporalio.Api.Enums.V1" - }, - nested: { - EncodingType: { - values: { - ENCODING_TYPE_UNSPECIFIED: 0, - ENCODING_TYPE_PROTO3: 1, - ENCODING_TYPE_JSON: 2 - } - }, - IndexedValueType: { - values: { - INDEXED_VALUE_TYPE_UNSPECIFIED: 0, - INDEXED_VALUE_TYPE_TEXT: 1, - INDEXED_VALUE_TYPE_KEYWORD: 2, - INDEXED_VALUE_TYPE_INT: 3, - INDEXED_VALUE_TYPE_DOUBLE: 4, - INDEXED_VALUE_TYPE_BOOL: 5, - INDEXED_VALUE_TYPE_DATETIME: 6, - INDEXED_VALUE_TYPE_KEYWORD_LIST: 7 - } - }, - Severity: { - values: { - SEVERITY_UNSPECIFIED: 0, - SEVERITY_HIGH: 1, - SEVERITY_MEDIUM: 2, - SEVERITY_LOW: 3 - } - }, - CallbackState: { - values: { - CALLBACK_STATE_UNSPECIFIED: 0, - CALLBACK_STATE_STANDBY: 1, - CALLBACK_STATE_SCHEDULED: 2, - CALLBACK_STATE_BACKING_OFF: 3, - CALLBACK_STATE_FAILED: 4, - CALLBACK_STATE_SUCCEEDED: 5, - CALLBACK_STATE_BLOCKED: 6 - } - }, - PendingNexusOperationState: { - values: { - PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED: 0, - PENDING_NEXUS_OPERATION_STATE_SCHEDULED: 1, - PENDING_NEXUS_OPERATION_STATE_BACKING_OFF: 2, - PENDING_NEXUS_OPERATION_STATE_STARTED: 3, - PENDING_NEXUS_OPERATION_STATE_BLOCKED: 4 - } - }, - NexusOperationCancellationState: { - values: { - NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED: 0, - NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED: 1, - NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF: 2, - NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED: 3, - NEXUS_OPERATION_CANCELLATION_STATE_FAILED: 4, - NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT: 5, - NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED: 6 - } - }, - WorkflowRuleActionScope: { - values: { - WORKFLOW_RULE_ACTION_SCOPE_UNSPECIFIED: 0, - WORKFLOW_RULE_ACTION_SCOPE_WORKFLOW: 1, - WORKFLOW_RULE_ACTION_SCOPE_ACTIVITY: 2 - } - }, - ApplicationErrorCategory: { - values: { - APPLICATION_ERROR_CATEGORY_UNSPECIFIED: 0, - APPLICATION_ERROR_CATEGORY_BENIGN: 1 - } - }, - WorkerStatus: { - values: { - WORKER_STATUS_UNSPECIFIED: 0, - WORKER_STATUS_RUNNING: 1, - WORKER_STATUS_SHUTTING_DOWN: 2, - WORKER_STATUS_SHUTDOWN: 3 - } - }, - EventType: { - values: { - EVENT_TYPE_UNSPECIFIED: 0, - EVENT_TYPE_WORKFLOW_EXECUTION_STARTED: 1, - EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED: 2, - EVENT_TYPE_WORKFLOW_EXECUTION_FAILED: 3, - EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT: 4, - EVENT_TYPE_WORKFLOW_TASK_SCHEDULED: 5, - EVENT_TYPE_WORKFLOW_TASK_STARTED: 6, - EVENT_TYPE_WORKFLOW_TASK_COMPLETED: 7, - EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT: 8, - EVENT_TYPE_WORKFLOW_TASK_FAILED: 9, - EVENT_TYPE_ACTIVITY_TASK_SCHEDULED: 10, - EVENT_TYPE_ACTIVITY_TASK_STARTED: 11, - EVENT_TYPE_ACTIVITY_TASK_COMPLETED: 12, - EVENT_TYPE_ACTIVITY_TASK_FAILED: 13, - EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT: 14, - EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED: 15, - EVENT_TYPE_ACTIVITY_TASK_CANCELED: 16, - EVENT_TYPE_TIMER_STARTED: 17, - EVENT_TYPE_TIMER_FIRED: 18, - EVENT_TYPE_TIMER_CANCELED: 19, - EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED: 20, - EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED: 21, - EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED: 22, - EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED: 23, - EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED: 24, - EVENT_TYPE_MARKER_RECORDED: 25, - EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED: 26, - EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED: 27, - EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW: 28, - EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED: 29, - EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED: 30, - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED: 31, - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED: 32, - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED: 33, - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED: 34, - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT: 35, - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED: 36, - EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED: 37, - EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED: 38, - EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED: 39, - EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES: 40, - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED: 47, - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED: 41, - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED: 42, - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED: 43, - EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY: 44, - EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY: 45, - EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED: 46, - EVENT_TYPE_NEXUS_OPERATION_SCHEDULED: 48, - EVENT_TYPE_NEXUS_OPERATION_STARTED: 49, - EVENT_TYPE_NEXUS_OPERATION_COMPLETED: 50, - EVENT_TYPE_NEXUS_OPERATION_FAILED: 51, - EVENT_TYPE_NEXUS_OPERATION_CANCELED: 52, - EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT: 53, - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED: 54, - EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED: 55, - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED: 56, - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED: 57, - EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED: 58, - EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED: 59 - } - }, - ResetReapplyExcludeType: { - valuesOptions: { - RESET_REAPPLY_EXCLUDE_TYPE_CANCEL_REQUEST: { - deprecated: true - } - }, - values: { - RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED: 0, - RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL: 1, - RESET_REAPPLY_EXCLUDE_TYPE_UPDATE: 2, - RESET_REAPPLY_EXCLUDE_TYPE_NEXUS: 3, - RESET_REAPPLY_EXCLUDE_TYPE_CANCEL_REQUEST: 4 - } - }, - ResetReapplyType: { - values: { - RESET_REAPPLY_TYPE_UNSPECIFIED: 0, - RESET_REAPPLY_TYPE_SIGNAL: 1, - RESET_REAPPLY_TYPE_NONE: 2, - RESET_REAPPLY_TYPE_ALL_ELIGIBLE: 3 - } - }, - ResetType: { - values: { - RESET_TYPE_UNSPECIFIED: 0, - RESET_TYPE_FIRST_WORKFLOW_TASK: 1, - RESET_TYPE_LAST_WORKFLOW_TASK: 2 - } - }, - WorkflowIdReusePolicy: { - valuesOptions: { - WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING: { - deprecated: true - } - }, - values: { - WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED: 0, - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE: 1, - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY: 2, - WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE: 3, - WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING: 4 - } - }, - WorkflowIdConflictPolicy: { - values: { - WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED: 0, - WORKFLOW_ID_CONFLICT_POLICY_FAIL: 1, - WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING: 2, - WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING: 3 - } - }, - ParentClosePolicy: { - values: { - PARENT_CLOSE_POLICY_UNSPECIFIED: 0, - PARENT_CLOSE_POLICY_TERMINATE: 1, - PARENT_CLOSE_POLICY_ABANDON: 2, - PARENT_CLOSE_POLICY_REQUEST_CANCEL: 3 - } - }, - ContinueAsNewInitiator: { - values: { - CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED: 0, - CONTINUE_AS_NEW_INITIATOR_WORKFLOW: 1, - CONTINUE_AS_NEW_INITIATOR_RETRY: 2, - CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE: 3 - } - }, - WorkflowExecutionStatus: { - values: { - WORKFLOW_EXECUTION_STATUS_UNSPECIFIED: 0, - WORKFLOW_EXECUTION_STATUS_RUNNING: 1, - WORKFLOW_EXECUTION_STATUS_COMPLETED: 2, - WORKFLOW_EXECUTION_STATUS_FAILED: 3, - WORKFLOW_EXECUTION_STATUS_CANCELED: 4, - WORKFLOW_EXECUTION_STATUS_TERMINATED: 5, - WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW: 6, - WORKFLOW_EXECUTION_STATUS_TIMED_OUT: 7, - WORKFLOW_EXECUTION_STATUS_PAUSED: 8 - } - }, - PendingActivityState: { - values: { - PENDING_ACTIVITY_STATE_UNSPECIFIED: 0, - PENDING_ACTIVITY_STATE_SCHEDULED: 1, - PENDING_ACTIVITY_STATE_STARTED: 2, - PENDING_ACTIVITY_STATE_CANCEL_REQUESTED: 3, - PENDING_ACTIVITY_STATE_PAUSED: 4, - PENDING_ACTIVITY_STATE_PAUSE_REQUESTED: 5 - } - }, - PendingWorkflowTaskState: { - values: { - PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED: 0, - PENDING_WORKFLOW_TASK_STATE_SCHEDULED: 1, - PENDING_WORKFLOW_TASK_STATE_STARTED: 2 - } - }, - HistoryEventFilterType: { - values: { - HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED: 0, - HISTORY_EVENT_FILTER_TYPE_ALL_EVENT: 1, - HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT: 2 - } - }, - RetryState: { - values: { - RETRY_STATE_UNSPECIFIED: 0, - RETRY_STATE_IN_PROGRESS: 1, - RETRY_STATE_NON_RETRYABLE_FAILURE: 2, - RETRY_STATE_TIMEOUT: 3, - RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED: 4, - RETRY_STATE_RETRY_POLICY_NOT_SET: 5, - RETRY_STATE_INTERNAL_SERVER_ERROR: 6, - RETRY_STATE_CANCEL_REQUESTED: 7 - } - }, - TimeoutType: { - values: { - TIMEOUT_TYPE_UNSPECIFIED: 0, - TIMEOUT_TYPE_START_TO_CLOSE: 1, - TIMEOUT_TYPE_SCHEDULE_TO_START: 2, - TIMEOUT_TYPE_SCHEDULE_TO_CLOSE: 3, - TIMEOUT_TYPE_HEARTBEAT: 4 - } - }, - VersioningBehavior: { - values: { - VERSIONING_BEHAVIOR_UNSPECIFIED: 0, - VERSIONING_BEHAVIOR_PINNED: 1, - VERSIONING_BEHAVIOR_AUTO_UPGRADE: 2 - } - }, - ContinueAsNewVersioningBehavior: { - values: { - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED: 0, - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE: 1 - } - }, - SuggestContinueAsNewReason: { - values: { - SUGGEST_CONTINUE_AS_NEW_REASON_UNSPECIFIED: 0, - SUGGEST_CONTINUE_AS_NEW_REASON_HISTORY_SIZE_TOO_LARGE: 1, - SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_HISTORY_EVENTS: 2, - SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_UPDATES: 3 - }, - reserved: [ - [ - 4, - 4 - ], - "SUGGEST_CONTINUE_AS_NEW_REASON_TARGET_WORKER_DEPLOYMENT_VERSION_CHANGED" - ] - }, - NexusHandlerErrorRetryBehavior: { - values: { - NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_UNSPECIFIED: 0, - NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_RETRYABLE: 1, - NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE: 2 - } - }, - UpdateWorkflowExecutionLifecycleStage: { - values: { - UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED: 0, - UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED: 1, - UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED: 2, - UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED: 3 - } - }, - UpdateAdmittedEventOrigin: { - values: { - UPDATE_ADMITTED_EVENT_ORIGIN_UNSPECIFIED: 0, - UPDATE_ADMITTED_EVENT_ORIGIN_REAPPLY: 1 - } - }, - BatchOperationType: { - values: { - BATCH_OPERATION_TYPE_UNSPECIFIED: 0, - BATCH_OPERATION_TYPE_TERMINATE: 1, - BATCH_OPERATION_TYPE_CANCEL: 2, - BATCH_OPERATION_TYPE_SIGNAL: 3, - BATCH_OPERATION_TYPE_DELETE: 4, - BATCH_OPERATION_TYPE_RESET: 5, - BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS: 6, - BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY: 7, - BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS: 8, - BATCH_OPERATION_TYPE_RESET_ACTIVITY: 9 - } - }, - BatchOperationState: { - values: { - BATCH_OPERATION_STATE_UNSPECIFIED: 0, - BATCH_OPERATION_STATE_RUNNING: 1, - BATCH_OPERATION_STATE_COMPLETED: 2, - BATCH_OPERATION_STATE_FAILED: 3 - } - }, - NamespaceState: { - values: { - NAMESPACE_STATE_UNSPECIFIED: 0, - NAMESPACE_STATE_REGISTERED: 1, - NAMESPACE_STATE_DEPRECATED: 2, - NAMESPACE_STATE_DELETED: 3 - } - }, - ArchivalState: { - values: { - ARCHIVAL_STATE_UNSPECIFIED: 0, - ARCHIVAL_STATE_DISABLED: 1, - ARCHIVAL_STATE_ENABLED: 2 - } - }, - ReplicationState: { - values: { - REPLICATION_STATE_UNSPECIFIED: 0, - REPLICATION_STATE_NORMAL: 1, - REPLICATION_STATE_HANDOVER: 2 - } - }, - WorkflowTaskFailedCause: { - values: { - WORKFLOW_TASK_FAILED_CAUSE_UNSPECIFIED: 0, - WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_COMMAND: 1, - WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES: 2, - WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES: 3, - WORKFLOW_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES: 4, - WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES: 5, - WORKFLOW_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES: 6, - WORKFLOW_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES: 7, - WORKFLOW_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES: 8, - WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES: 9, - WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES: 10, - WORKFLOW_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES: 11, - WORKFLOW_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID: 12, - WORKFLOW_TASK_FAILED_CAUSE_RESET_STICKY_TASK_QUEUE: 13, - WORKFLOW_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE: 14, - WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES: 15, - WORKFLOW_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES: 16, - WORKFLOW_TASK_FAILED_CAUSE_FORCE_CLOSE_COMMAND: 17, - WORKFLOW_TASK_FAILED_CAUSE_FAILOVER_CLOSE_COMMAND: 18, - WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE: 19, - WORKFLOW_TASK_FAILED_CAUSE_RESET_WORKFLOW: 20, - WORKFLOW_TASK_FAILED_CAUSE_BAD_BINARY: 21, - WORKFLOW_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID: 22, - WORKFLOW_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES: 23, - WORKFLOW_TASK_FAILED_CAUSE_NON_DETERMINISTIC_ERROR: 24, - WORKFLOW_TASK_FAILED_CAUSE_BAD_MODIFY_WORKFLOW_PROPERTIES_ATTRIBUTES: 25, - WORKFLOW_TASK_FAILED_CAUSE_PENDING_CHILD_WORKFLOWS_LIMIT_EXCEEDED: 26, - WORKFLOW_TASK_FAILED_CAUSE_PENDING_ACTIVITIES_LIMIT_EXCEEDED: 27, - WORKFLOW_TASK_FAILED_CAUSE_PENDING_SIGNALS_LIMIT_EXCEEDED: 28, - WORKFLOW_TASK_FAILED_CAUSE_PENDING_REQUEST_CANCEL_LIMIT_EXCEEDED: 29, - WORKFLOW_TASK_FAILED_CAUSE_BAD_UPDATE_WORKFLOW_EXECUTION_MESSAGE: 30, - WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_UPDATE: 31, - WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_NEXUS_OPERATION_ATTRIBUTES: 32, - WORKFLOW_TASK_FAILED_CAUSE_PENDING_NEXUS_OPERATIONS_LIMIT_EXCEEDED: 33, - WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_NEXUS_OPERATION_ATTRIBUTES: 34, - WORKFLOW_TASK_FAILED_CAUSE_FEATURE_DISABLED: 35, - WORKFLOW_TASK_FAILED_CAUSE_GRPC_MESSAGE_TOO_LARGE: 36, - WORKFLOW_TASK_FAILED_CAUSE_PAYLOADS_TOO_LARGE: 37 - } - }, - StartChildWorkflowExecutionFailedCause: { - values: { - START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED: 0, - START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS: 1, - START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND: 2 - } - }, - CancelExternalWorkflowExecutionFailedCause: { - values: { - CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED: 0, - CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND: 1, - CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND: 2 - } - }, - SignalExternalWorkflowExecutionFailedCause: { - values: { - SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED: 0, - SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND: 1, - SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND: 2, - SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_SIGNAL_COUNT_LIMIT_EXCEEDED: 3 - } - }, - ResourceExhaustedCause: { - values: { - RESOURCE_EXHAUSTED_CAUSE_UNSPECIFIED: 0, - RESOURCE_EXHAUSTED_CAUSE_RPS_LIMIT: 1, - RESOURCE_EXHAUSTED_CAUSE_CONCURRENT_LIMIT: 2, - RESOURCE_EXHAUSTED_CAUSE_SYSTEM_OVERLOADED: 3, - RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_LIMIT: 4, - RESOURCE_EXHAUSTED_CAUSE_BUSY_WORKFLOW: 5, - RESOURCE_EXHAUSTED_CAUSE_APS_LIMIT: 6, - RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_STORAGE_LIMIT: 7, - RESOURCE_EXHAUSTED_CAUSE_CIRCUIT_BREAKER_OPEN: 8, - RESOURCE_EXHAUSTED_CAUSE_OPS_LIMIT: 9, - RESOURCE_EXHAUSTED_CAUSE_WORKER_DEPLOYMENT_LIMITS: 10 - } - }, - ResourceExhaustedScope: { - values: { - RESOURCE_EXHAUSTED_SCOPE_UNSPECIFIED: 0, - RESOURCE_EXHAUSTED_SCOPE_NAMESPACE: 1, - RESOURCE_EXHAUSTED_SCOPE_SYSTEM: 2 - } - }, - QueryResultType: { - values: { - QUERY_RESULT_TYPE_UNSPECIFIED: 0, - QUERY_RESULT_TYPE_ANSWERED: 1, - QUERY_RESULT_TYPE_FAILED: 2 - } - }, - QueryRejectCondition: { - values: { - QUERY_REJECT_CONDITION_UNSPECIFIED: 0, - QUERY_REJECT_CONDITION_NONE: 1, - QUERY_REJECT_CONDITION_NOT_OPEN: 2, - QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY: 3 - } - }, - TaskQueueKind: { - values: { - TASK_QUEUE_KIND_UNSPECIFIED: 0, - TASK_QUEUE_KIND_NORMAL: 1, - TASK_QUEUE_KIND_STICKY: 2 - } - }, - TaskQueueType: { - values: { - TASK_QUEUE_TYPE_UNSPECIFIED: 0, - TASK_QUEUE_TYPE_WORKFLOW: 1, - TASK_QUEUE_TYPE_ACTIVITY: 2, - TASK_QUEUE_TYPE_NEXUS: 3 - } - }, - TaskReachability: { - values: { - TASK_REACHABILITY_UNSPECIFIED: 0, - TASK_REACHABILITY_NEW_WORKFLOWS: 1, - TASK_REACHABILITY_EXISTING_WORKFLOWS: 2, - TASK_REACHABILITY_OPEN_WORKFLOWS: 3, - TASK_REACHABILITY_CLOSED_WORKFLOWS: 4 - } - }, - BuildIdTaskReachability: { - values: { - BUILD_ID_TASK_REACHABILITY_UNSPECIFIED: 0, - BUILD_ID_TASK_REACHABILITY_REACHABLE: 1, - BUILD_ID_TASK_REACHABILITY_CLOSED_WORKFLOWS_ONLY: 2, - BUILD_ID_TASK_REACHABILITY_UNREACHABLE: 3 - } - }, - DescribeTaskQueueMode: { - values: { - DESCRIBE_TASK_QUEUE_MODE_UNSPECIFIED: 0, - DESCRIBE_TASK_QUEUE_MODE_ENHANCED: 1 - } - }, - RateLimitSource: { - values: { - RATE_LIMIT_SOURCE_UNSPECIFIED: 0, - RATE_LIMIT_SOURCE_API: 1, - RATE_LIMIT_SOURCE_WORKER: 2, - RATE_LIMIT_SOURCE_SYSTEM: 3 - } - }, - RoutingConfigUpdateState: { - values: { - ROUTING_CONFIG_UPDATE_STATE_UNSPECIFIED: 0, - ROUTING_CONFIG_UPDATE_STATE_IN_PROGRESS: 1, - ROUTING_CONFIG_UPDATE_STATE_COMPLETED: 2 - } - }, - DeploymentReachability: { - values: { - DEPLOYMENT_REACHABILITY_UNSPECIFIED: 0, - DEPLOYMENT_REACHABILITY_REACHABLE: 1, - DEPLOYMENT_REACHABILITY_CLOSED_WORKFLOWS_ONLY: 2, - DEPLOYMENT_REACHABILITY_UNREACHABLE: 3 - } - }, - VersionDrainageStatus: { - values: { - VERSION_DRAINAGE_STATUS_UNSPECIFIED: 0, - VERSION_DRAINAGE_STATUS_DRAINING: 1, - VERSION_DRAINAGE_STATUS_DRAINED: 2 - } - }, - WorkerVersioningMode: { - values: { - WORKER_VERSIONING_MODE_UNSPECIFIED: 0, - WORKER_VERSIONING_MODE_UNVERSIONED: 1, - WORKER_VERSIONING_MODE_VERSIONED: 2 - } - }, - WorkerDeploymentVersionStatus: { - values: { - WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED: 0, - WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE: 1, - WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT: 2, - WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING: 3, - WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING: 4, - WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED: 5 - } - }, - ActivityExecutionStatus: { - values: { - ACTIVITY_EXECUTION_STATUS_UNSPECIFIED: 0, - ACTIVITY_EXECUTION_STATUS_RUNNING: 1, - ACTIVITY_EXECUTION_STATUS_COMPLETED: 2, - ACTIVITY_EXECUTION_STATUS_FAILED: 3, - ACTIVITY_EXECUTION_STATUS_CANCELED: 4, - ACTIVITY_EXECUTION_STATUS_TERMINATED: 5, - ACTIVITY_EXECUTION_STATUS_TIMED_OUT: 6 - } - }, - ActivityIdReusePolicy: { - values: { - ACTIVITY_ID_REUSE_POLICY_UNSPECIFIED: 0, - ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE: 1, - ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY: 2, - ACTIVITY_ID_REUSE_POLICY_REJECT_DUPLICATE: 3 - } - }, - ActivityIdConflictPolicy: { - values: { - ACTIVITY_ID_CONFLICT_POLICY_UNSPECIFIED: 0, - ACTIVITY_ID_CONFLICT_POLICY_FAIL: 1, - ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING: 2 - } - }, - CommandType: { - values: { - COMMAND_TYPE_UNSPECIFIED: 0, - COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK: 1, - COMMAND_TYPE_REQUEST_CANCEL_ACTIVITY_TASK: 2, - COMMAND_TYPE_START_TIMER: 3, - COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION: 4, - COMMAND_TYPE_FAIL_WORKFLOW_EXECUTION: 5, - COMMAND_TYPE_CANCEL_TIMER: 6, - COMMAND_TYPE_CANCEL_WORKFLOW_EXECUTION: 7, - COMMAND_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION: 8, - COMMAND_TYPE_RECORD_MARKER: 9, - COMMAND_TYPE_CONTINUE_AS_NEW_WORKFLOW_EXECUTION: 10, - COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION: 11, - COMMAND_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION: 12, - COMMAND_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES: 13, - COMMAND_TYPE_PROTOCOL_MESSAGE: 14, - COMMAND_TYPE_MODIFY_WORKFLOW_PROPERTIES: 16, - COMMAND_TYPE_SCHEDULE_NEXUS_OPERATION: 17, - COMMAND_TYPE_REQUEST_CANCEL_NEXUS_OPERATION: 18 - } - }, - ScheduleOverlapPolicy: { - values: { - SCHEDULE_OVERLAP_POLICY_UNSPECIFIED: 0, - SCHEDULE_OVERLAP_POLICY_SKIP: 1, - SCHEDULE_OVERLAP_POLICY_BUFFER_ONE: 2, - SCHEDULE_OVERLAP_POLICY_BUFFER_ALL: 3, - SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER: 4, - SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER: 5, - SCHEDULE_OVERLAP_POLICY_ALLOW_ALL: 6 - } - } - } - } - } - }, - failure: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/failure/v1;failure", - java_package: "io.temporal.api.failure.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Failure::V1", - csharp_namespace: "Temporalio.Api.Failure.V1" - }, - nested: { - ApplicationFailureInfo: { - fields: { - type: { - type: "string", - id: 1 - }, - nonRetryable: { - type: "bool", - id: 2 - }, - details: { - type: "temporal.api.common.v1.Payloads", - id: 3 - }, - nextRetryDelay: { - type: "google.protobuf.Duration", - id: 4 - }, - category: { - type: "temporal.api.enums.v1.ApplicationErrorCategory", - id: 5 - } - } - }, - TimeoutFailureInfo: { - fields: { - timeoutType: { - type: "temporal.api.enums.v1.TimeoutType", - id: 1 - }, - lastHeartbeatDetails: { - type: "temporal.api.common.v1.Payloads", - id: 2 - } - } - }, - CanceledFailureInfo: { - fields: { - details: { - type: "temporal.api.common.v1.Payloads", - id: 1 - } - } - }, - TerminatedFailureInfo: { - fields: {} - }, - ServerFailureInfo: { - fields: { - nonRetryable: { - type: "bool", - id: 1 - } - } - }, - ResetWorkflowFailureInfo: { - fields: { - lastHeartbeatDetails: { - type: "temporal.api.common.v1.Payloads", - id: 1 - } - } - }, - ActivityFailureInfo: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - startedEventId: { - type: "int64", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - activityType: { - type: "temporal.api.common.v1.ActivityType", - id: 4 - }, - activityId: { - type: "string", - id: 5 - }, - retryState: { - type: "temporal.api.enums.v1.RetryState", - id: 6 - } - } - }, - ChildWorkflowExecutionFailureInfo: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 3 - }, - initiatedEventId: { - type: "int64", - id: 4 - }, - startedEventId: { - type: "int64", - id: 5 - }, - retryState: { - type: "temporal.api.enums.v1.RetryState", - id: 6 - } - } - }, - NexusOperationFailureInfo: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - endpoint: { - type: "string", - id: 2 - }, - service: { - type: "string", - id: 3 - }, - operation: { - type: "string", - id: 4 - }, - operationId: { - type: "string", - id: 5, - options: { - deprecated: true - } - }, - operationToken: { - type: "string", - id: 6 - } - } - }, - NexusHandlerFailureInfo: { - fields: { - type: { - type: "string", - id: 1 - }, - retryBehavior: { - type: "temporal.api.enums.v1.NexusHandlerErrorRetryBehavior", - id: 2 - } - } - }, - Failure: { - oneofs: { - failureInfo: { - oneof: [ - "applicationFailureInfo", - "timeoutFailureInfo", - "canceledFailureInfo", - "terminatedFailureInfo", - "serverFailureInfo", - "resetWorkflowFailureInfo", - "activityFailureInfo", - "childWorkflowExecutionFailureInfo", - "nexusOperationExecutionFailureInfo", - "nexusHandlerFailureInfo" - ] - } - }, - fields: { - message: { - type: "string", - id: 1 - }, - source: { - type: "string", - id: 2 - }, - stackTrace: { - type: "string", - id: 3 - }, - encodedAttributes: { - type: "temporal.api.common.v1.Payload", - id: 20 - }, - cause: { - type: "Failure", - id: 4 - }, - applicationFailureInfo: { - type: "ApplicationFailureInfo", - id: 5 - }, - timeoutFailureInfo: { - type: "TimeoutFailureInfo", - id: 6 - }, - canceledFailureInfo: { - type: "CanceledFailureInfo", - id: 7 - }, - terminatedFailureInfo: { - type: "TerminatedFailureInfo", - id: 8 - }, - serverFailureInfo: { - type: "ServerFailureInfo", - id: 9 - }, - resetWorkflowFailureInfo: { - type: "ResetWorkflowFailureInfo", - id: 10 - }, - activityFailureInfo: { - type: "ActivityFailureInfo", - id: 11 - }, - childWorkflowExecutionFailureInfo: { - type: "ChildWorkflowExecutionFailureInfo", - id: 12 - }, - nexusOperationExecutionFailureInfo: { - type: "NexusOperationFailureInfo", - id: 13 - }, - nexusHandlerFailureInfo: { - type: "NexusHandlerFailureInfo", - id: 14 - } - } - }, - MultiOperationExecutionAborted: { - fields: {} - } - } - } - } - }, - update: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/update/v1;update", - java_package: "io.temporal.api.update.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Update::V1", - csharp_namespace: "Temporalio.Api.Update.V1" - }, - nested: { - WaitPolicy: { - fields: { - lifecycleStage: { - type: "temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage", - id: 1 - } - } - }, - UpdateRef: { - fields: { - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 1 - }, - updateId: { - type: "string", - id: 2 - } - } - }, - Outcome: { - oneofs: { - value: { - oneof: [ - "success", - "failure" - ] - } - }, - fields: { - success: { - type: "temporal.api.common.v1.Payloads", - id: 1 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 2 - } - } - }, - Meta: { - fields: { - updateId: { - type: "string", - id: 1 - }, - identity: { - type: "string", - id: 2 - } - } - }, - Input: { - fields: { - header: { - type: "temporal.api.common.v1.Header", - id: 1 - }, - name: { - type: "string", - id: 2 - }, - args: { - type: "temporal.api.common.v1.Payloads", - id: 3 - } - } - }, - Request: { - fields: { - meta: { - type: "Meta", - id: 1 - }, - input: { - type: "Input", - id: 2 - } - } - }, - Rejection: { - fields: { - rejectedRequestMessageId: { - type: "string", - id: 1 - }, - rejectedRequestSequencingEventId: { - type: "int64", - id: 2 - }, - rejectedRequest: { - type: "Request", - id: 3 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 4 - } - } - }, - Acceptance: { - fields: { - acceptedRequestMessageId: { - type: "string", - id: 1 - }, - acceptedRequestSequencingEventId: { - type: "int64", - id: 2 - }, - acceptedRequest: { - type: "Request", - id: 3 - } - } - }, - Response: { - fields: { - meta: { - type: "Meta", - id: 1 - }, - outcome: { - type: "Outcome", - id: 2 - } - } - } - } - } - } - }, - nexus: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/nexus/v1;nexus", - java_package: "io.temporal.api.nexus.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Nexus::V1", - csharp_namespace: "Temporalio.Api.Nexus.V1" - }, - nested: { - Failure: { - fields: { - message: { - type: "string", - id: 1 - }, - stackTrace: { - type: "string", - id: 4 - }, - metadata: { - keyType: "string", - type: "string", - id: 2 - }, - details: { - type: "bytes", - id: 3 - }, - cause: { - type: "Failure", - id: 5 - } - } - }, - HandlerError: { - fields: { - errorType: { - type: "string", - id: 1 - }, - failure: { - type: "Failure", - id: 2 - }, - retryBehavior: { - type: "temporal.api.enums.v1.NexusHandlerErrorRetryBehavior", - id: 3 - } - } - }, - UnsuccessfulOperationError: { - fields: { - operationState: { - type: "string", - id: 1 - }, - failure: { - type: "Failure", - id: 2 - } - } - }, - Link: { - fields: { - url: { - type: "string", - id: 1 - }, - type: { - type: "string", - id: 2 - } - } - }, - StartOperationRequest: { - fields: { - service: { - type: "string", - id: 1 - }, - operation: { - type: "string", - id: 2 - }, - requestId: { - type: "string", - id: 3 - }, - callback: { - type: "string", - id: 4 - }, - payload: { - type: "temporal.api.common.v1.Payload", - id: 5 - }, - callbackHeader: { - keyType: "string", - type: "string", - id: 6 - }, - links: { - rule: "repeated", - type: "Link", - id: 7 - } - } - }, - CancelOperationRequest: { - fields: { - service: { - type: "string", - id: 1 - }, - operation: { - type: "string", - id: 2 - }, - operationId: { - type: "string", - id: 3, - options: { - deprecated: true - } - }, - operationToken: { - type: "string", - id: 4 - } - } - }, - Request: { - oneofs: { - variant: { - oneof: [ - "startOperation", - "cancelOperation" - ] - } - }, - fields: { - header: { - keyType: "string", - type: "string", - id: 1 - }, - scheduledTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - capabilities: { - type: "Capabilities", - id: 100 - }, - startOperation: { - type: "StartOperationRequest", - id: 3 - }, - cancelOperation: { - type: "CancelOperationRequest", - id: 4 - }, - endpoint: { - type: "string", - id: 10 - } - }, - nested: { - Capabilities: { - fields: { - temporalFailureResponses: { - type: "bool", - id: 1 - } - } - } - } - }, - StartOperationResponse: { - oneofs: { - variant: { - oneof: [ - "syncSuccess", - "asyncSuccess", - "operationError", - "failure" - ] - } - }, - fields: { - syncSuccess: { - type: "Sync", - id: 1 - }, - asyncSuccess: { - type: "Async", - id: 2 - }, - operationError: { - type: "UnsuccessfulOperationError", - id: 3, - options: { - deprecated: true - } - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 4 - } - }, - nested: { - Sync: { - fields: { - payload: { - type: "temporal.api.common.v1.Payload", - id: 1 - }, - links: { - rule: "repeated", - type: "Link", - id: 2 - } - } - }, - Async: { - fields: { - operationId: { - type: "string", - id: 1, - options: { - deprecated: true - } - }, - links: { - rule: "repeated", - type: "Link", - id: 2 - }, - operationToken: { - type: "string", - id: 3 - } - } - } - } - }, - CancelOperationResponse: { - fields: {} - }, - Response: { - oneofs: { - variant: { - oneof: [ - "startOperation", - "cancelOperation" - ] - } - }, - fields: { - startOperation: { - type: "StartOperationResponse", - id: 1 - }, - cancelOperation: { - type: "CancelOperationResponse", - id: 2 - } - } - }, - Endpoint: { - fields: { - version: { - type: "int64", - id: 1 - }, - id: { - type: "string", - id: 2 - }, - spec: { - type: "EndpointSpec", - id: 3 - }, - createdTime: { - type: "google.protobuf.Timestamp", - id: 4 - }, - lastModifiedTime: { - type: "google.protobuf.Timestamp", - id: 5 - }, - urlPrefix: { - type: "string", - id: 6 - } - } - }, - EndpointSpec: { - fields: { - name: { - type: "string", - id: 1 - }, - description: { - type: "temporal.api.common.v1.Payload", - id: 2 - }, - target: { - type: "EndpointTarget", - id: 3 - } - } - }, - EndpointTarget: { - oneofs: { - variant: { - oneof: [ - "worker", - "external" - ] - } - }, - fields: { - worker: { - type: "Worker", - id: 1 - }, - external: { - type: "External", - id: 2 - } - }, - nested: { - Worker: { - fields: { - namespace: { - type: "string", - id: 1 - }, - taskQueue: { - type: "string", - id: 2 - } - } - }, - External: { - fields: { - url: { - type: "string", - id: 1 - } - } - } - } - } - } - } - } - }, - workflowservice: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/workflowservice/v1;workflowservice", - java_package: "io.temporal.api.workflowservice.v1", - java_multiple_files: true, - java_outer_classname: "ServiceProto", - ruby_package: "Temporalio::Api::WorkflowService::V1", - csharp_namespace: "Temporalio.Api.WorkflowService.V1" - }, - nested: { - RegisterNamespaceRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - description: { - type: "string", - id: 2 - }, - ownerEmail: { - type: "string", - id: 3 - }, - workflowExecutionRetentionPeriod: { - type: "google.protobuf.Duration", - id: 4 - }, - clusters: { - rule: "repeated", - type: "temporal.api.replication.v1.ClusterReplicationConfig", - id: 5 - }, - activeClusterName: { - type: "string", - id: 6 - }, - data: { - keyType: "string", - type: "string", - id: 7 - }, - securityToken: { - type: "string", - id: 8 - }, - isGlobalNamespace: { - type: "bool", - id: 9 - }, - historyArchivalState: { - type: "temporal.api.enums.v1.ArchivalState", - id: 10 - }, - historyArchivalUri: { - type: "string", - id: 11 - }, - visibilityArchivalState: { - type: "temporal.api.enums.v1.ArchivalState", - id: 12 - }, - visibilityArchivalUri: { - type: "string", - id: 13 - } - } - }, - RegisterNamespaceResponse: { - fields: {} - }, - ListNamespacesRequest: { - fields: { - pageSize: { - type: "int32", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - }, - namespaceFilter: { - type: "temporal.api.namespace.v1.NamespaceFilter", - id: 3 - } - } - }, - ListNamespacesResponse: { - fields: { - namespaces: { - rule: "repeated", - type: "DescribeNamespaceResponse", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - } - } - }, - DescribeNamespaceRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - id: { - type: "string", - id: 2 - } - } - }, - DescribeNamespaceResponse: { - fields: { - namespaceInfo: { - type: "temporal.api.namespace.v1.NamespaceInfo", - id: 1 - }, - config: { - type: "temporal.api.namespace.v1.NamespaceConfig", - id: 2 - }, - replicationConfig: { - type: "temporal.api.replication.v1.NamespaceReplicationConfig", - id: 3 - }, - failoverVersion: { - type: "int64", - id: 4 - }, - isGlobalNamespace: { - type: "bool", - id: 5 - }, - failoverHistory: { - rule: "repeated", - type: "temporal.api.replication.v1.FailoverStatus", - id: 6 - } - } - }, - UpdateNamespaceRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - updateInfo: { - type: "temporal.api.namespace.v1.UpdateNamespaceInfo", - id: 2 - }, - config: { - type: "temporal.api.namespace.v1.NamespaceConfig", - id: 3 - }, - replicationConfig: { - type: "temporal.api.replication.v1.NamespaceReplicationConfig", - id: 4 - }, - securityToken: { - type: "string", - id: 5 - }, - deleteBadBinary: { - type: "string", - id: 6 - }, - promoteNamespace: { - type: "bool", - id: 7 - } - } - }, - UpdateNamespaceResponse: { - fields: { - namespaceInfo: { - type: "temporal.api.namespace.v1.NamespaceInfo", - id: 1 - }, - config: { - type: "temporal.api.namespace.v1.NamespaceConfig", - id: 2 - }, - replicationConfig: { - type: "temporal.api.replication.v1.NamespaceReplicationConfig", - id: 3 - }, - failoverVersion: { - type: "int64", - id: 4 - }, - isGlobalNamespace: { - type: "bool", - id: 5 - } - } - }, - DeprecateNamespaceRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - securityToken: { - type: "string", - id: 2 - } - } - }, - DeprecateNamespaceResponse: { - fields: {} - }, - StartWorkflowExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowId: { - type: "string", - id: 2 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 3 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 4 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 5 - }, - workflowExecutionTimeout: { - type: "google.protobuf.Duration", - id: 6 - }, - workflowRunTimeout: { - type: "google.protobuf.Duration", - id: 7 - }, - workflowTaskTimeout: { - type: "google.protobuf.Duration", - id: 8 - }, - identity: { - type: "string", - id: 9 - }, - requestId: { - type: "string", - id: 10 - }, - workflowIdReusePolicy: { - type: "temporal.api.enums.v1.WorkflowIdReusePolicy", - id: 11 - }, - workflowIdConflictPolicy: { - type: "temporal.api.enums.v1.WorkflowIdConflictPolicy", - id: 22 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 12 - }, - cronSchedule: { - type: "string", - id: 13 - }, - memo: { - type: "temporal.api.common.v1.Memo", - id: 14 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 15 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 16 - }, - requestEagerExecution: { - type: "bool", - id: 17 - }, - continuedFailure: { - type: "temporal.api.failure.v1.Failure", - id: 18 - }, - lastCompletionResult: { - type: "temporal.api.common.v1.Payloads", - id: 19 - }, - workflowStartDelay: { - type: "google.protobuf.Duration", - id: 20 - }, - completionCallbacks: { - rule: "repeated", - type: "temporal.api.common.v1.Callback", - id: 21 - }, - userMetadata: { - type: "temporal.api.sdk.v1.UserMetadata", - id: 23 - }, - links: { - rule: "repeated", - type: "temporal.api.common.v1.Link", - id: 24 - }, - versioningOverride: { - type: "temporal.api.workflow.v1.VersioningOverride", - id: 25 - }, - onConflictOptions: { - type: "temporal.api.workflow.v1.OnConflictOptions", - id: 26 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 27 - }, - eagerWorkerDeploymentOptions: { - type: "temporal.api.deployment.v1.WorkerDeploymentOptions", - id: 28 - } - } - }, - StartWorkflowExecutionResponse: { - fields: { - runId: { - type: "string", - id: 1 - }, - started: { - type: "bool", - id: 3 - }, - status: { - type: "temporal.api.enums.v1.WorkflowExecutionStatus", - id: 5 - }, - eagerWorkflowTask: { - type: "PollWorkflowTaskQueueResponse", - id: 2 - }, - link: { - type: "temporal.api.common.v1.Link", - id: 4 - } - } - }, - GetWorkflowExecutionHistoryRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - execution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - maximumPageSize: { - type: "int32", - id: 3 - }, - nextPageToken: { - type: "bytes", - id: 4 - }, - waitNewEvent: { - type: "bool", - id: 5 - }, - historyEventFilterType: { - type: "temporal.api.enums.v1.HistoryEventFilterType", - id: 6 - }, - skipArchival: { - type: "bool", - id: 7 - } - } - }, - GetWorkflowExecutionHistoryResponse: { - fields: { - history: { - type: "temporal.api.history.v1.History", - id: 1 - }, - rawHistory: { - rule: "repeated", - type: "temporal.api.common.v1.DataBlob", - id: 2 - }, - nextPageToken: { - type: "bytes", - id: 3 - }, - archived: { - type: "bool", - id: 4 - } - } - }, - GetWorkflowExecutionHistoryReverseRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - execution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - maximumPageSize: { - type: "int32", - id: 3 - }, - nextPageToken: { - type: "bytes", - id: 4 - } - } - }, - GetWorkflowExecutionHistoryReverseResponse: { - fields: { - history: { - type: "temporal.api.history.v1.History", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 3 - } - } - }, - PollWorkflowTaskQueueRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - workerInstanceKey: { - type: "string", - id: 8 - }, - binaryChecksum: { - type: "string", - id: 4, - options: { - deprecated: true - } - }, - workerVersionCapabilities: { - type: "temporal.api.common.v1.WorkerVersionCapabilities", - id: 5, - options: { - deprecated: true - } - }, - deploymentOptions: { - type: "temporal.api.deployment.v1.WorkerDeploymentOptions", - id: 6 - } - }, - reserved: [ - [ - 7, - 7 - ], - "worker_heartbeat" - ] - }, - PollWorkflowTaskQueueResponse: { - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 3 - }, - previousStartedEventId: { - type: "int64", - id: 4 - }, - startedEventId: { - type: "int64", - id: 5 - }, - attempt: { - type: "int32", - id: 6 - }, - backlogCountHint: { - type: "int64", - id: 7 - }, - history: { - type: "temporal.api.history.v1.History", - id: 8 - }, - nextPageToken: { - type: "bytes", - id: 9 - }, - query: { - type: "temporal.api.query.v1.WorkflowQuery", - id: 10 - }, - workflowExecutionTaskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 11 - }, - scheduledTime: { - type: "google.protobuf.Timestamp", - id: 12 - }, - startedTime: { - type: "google.protobuf.Timestamp", - id: 13 - }, - queries: { - keyType: "string", - type: "temporal.api.query.v1.WorkflowQuery", - id: 14 - }, - messages: { - rule: "repeated", - type: "temporal.api.protocol.v1.Message", - id: 15 - }, - pollerScalingDecision: { - type: "temporal.api.taskqueue.v1.PollerScalingDecision", - id: 16 - } - } - }, - RespondWorkflowTaskCompletedRequest: { - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - commands: { - rule: "repeated", - type: "temporal.api.command.v1.Command", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - stickyAttributes: { - type: "temporal.api.taskqueue.v1.StickyExecutionAttributes", - id: 4 - }, - returnNewWorkflowTask: { - type: "bool", - id: 5 - }, - forceCreateNewWorkflowTask: { - type: "bool", - id: 6 - }, - binaryChecksum: { - type: "string", - id: 7, - options: { - deprecated: true - } - }, - queryResults: { - keyType: "string", - type: "temporal.api.query.v1.WorkflowQueryResult", - id: 8 - }, - namespace: { - type: "string", - id: 9 - }, - workerVersionStamp: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 10, - options: { - deprecated: true - } - }, - messages: { - rule: "repeated", - type: "temporal.api.protocol.v1.Message", - id: 11 - }, - sdkMetadata: { - type: "temporal.api.sdk.v1.WorkflowTaskCompletedMetadata", - id: 12 - }, - meteringMetadata: { - type: "temporal.api.common.v1.MeteringMetadata", - id: 13 - }, - capabilities: { - type: "Capabilities", - id: 14 - }, - deployment: { - type: "temporal.api.deployment.v1.Deployment", - id: 15, - options: { - deprecated: true - } - }, - versioningBehavior: { - type: "temporal.api.enums.v1.VersioningBehavior", - id: 16 - }, - deploymentOptions: { - type: "temporal.api.deployment.v1.WorkerDeploymentOptions", - id: 17 - } - }, - nested: { - Capabilities: { - fields: { - discardSpeculativeWorkflowTaskWithEvents: { - type: "bool", - id: 1 - } - } - } - } - }, - RespondWorkflowTaskCompletedResponse: { - fields: { - workflowTask: { - type: "PollWorkflowTaskQueueResponse", - id: 1 - }, - activityTasks: { - rule: "repeated", - type: "PollActivityTaskQueueResponse", - id: 2 - }, - resetHistoryEventId: { - type: "int64", - id: 3 - } - } - }, - RespondWorkflowTaskFailedRequest: { - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - cause: { - type: "temporal.api.enums.v1.WorkflowTaskFailedCause", - id: 2 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 3 - }, - identity: { - type: "string", - id: 4 - }, - binaryChecksum: { - type: "string", - id: 5, - options: { - deprecated: true - } - }, - namespace: { - type: "string", - id: 6 - }, - messages: { - rule: "repeated", - type: "temporal.api.protocol.v1.Message", - id: 7 - }, - workerVersion: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 8, - options: { - deprecated: true - } - }, - deployment: { - type: "temporal.api.deployment.v1.Deployment", - id: 9, - options: { - deprecated: true - } - }, - deploymentOptions: { - type: "temporal.api.deployment.v1.WorkerDeploymentOptions", - id: 10 - } - } - }, - RespondWorkflowTaskFailedResponse: { - fields: {} - }, - PollActivityTaskQueueRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - workerInstanceKey: { - type: "string", - id: 8 - }, - taskQueueMetadata: { - type: "temporal.api.taskqueue.v1.TaskQueueMetadata", - id: 4 - }, - workerVersionCapabilities: { - type: "temporal.api.common.v1.WorkerVersionCapabilities", - id: 5, - options: { - deprecated: true - } - }, - deploymentOptions: { - type: "temporal.api.deployment.v1.WorkerDeploymentOptions", - id: 6 - } - }, - reserved: [ - [ - 7, - 7 - ], - "worker_heartbeat" - ] - }, - PollActivityTaskQueueResponse: { - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - workflowNamespace: { - type: "string", - id: 2 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 3 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 4 - }, - activityType: { - type: "temporal.api.common.v1.ActivityType", - id: 5 - }, - activityId: { - type: "string", - id: 6 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 7 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 8 - }, - heartbeatDetails: { - type: "temporal.api.common.v1.Payloads", - id: 9 - }, - scheduledTime: { - type: "google.protobuf.Timestamp", - id: 10 - }, - currentAttemptScheduledTime: { - type: "google.protobuf.Timestamp", - id: 11 - }, - startedTime: { - type: "google.protobuf.Timestamp", - id: 12 - }, - attempt: { - type: "int32", - id: 13 - }, - scheduleToCloseTimeout: { - type: "google.protobuf.Duration", - id: 14 - }, - startToCloseTimeout: { - type: "google.protobuf.Duration", - id: 15 - }, - heartbeatTimeout: { - type: "google.protobuf.Duration", - id: 16 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 17 - }, - pollerScalingDecision: { - type: "temporal.api.taskqueue.v1.PollerScalingDecision", - id: 18 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 19 - }, - activityRunId: { - type: "string", - id: 20 - } - } - }, - RecordActivityTaskHeartbeatRequest: { - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - details: { - type: "temporal.api.common.v1.Payloads", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - namespace: { - type: "string", - id: 4 - } - } - }, - RecordActivityTaskHeartbeatResponse: { - fields: { - cancelRequested: { - type: "bool", - id: 1 - }, - activityPaused: { - type: "bool", - id: 2 - }, - activityReset: { - type: "bool", - id: 3 - } - } - }, - RecordActivityTaskHeartbeatByIdRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowId: { - type: "string", - id: 2 - }, - runId: { - type: "string", - id: 3 - }, - activityId: { - type: "string", - id: 4 - }, - details: { - type: "temporal.api.common.v1.Payloads", - id: 5 - }, - identity: { - type: "string", - id: 6 - } - } - }, - RecordActivityTaskHeartbeatByIdResponse: { - fields: { - cancelRequested: { - type: "bool", - id: 1 - }, - activityPaused: { - type: "bool", - id: 2 - }, - activityReset: { - type: "bool", - id: 3 - } - } - }, - RespondActivityTaskCompletedRequest: { - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - result: { - type: "temporal.api.common.v1.Payloads", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - namespace: { - type: "string", - id: 4 - }, - workerVersion: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 5, - options: { - deprecated: true - } - }, - deployment: { - type: "temporal.api.deployment.v1.Deployment", - id: 6, - options: { - deprecated: true - } - }, - deploymentOptions: { - type: "temporal.api.deployment.v1.WorkerDeploymentOptions", - id: 7 - } - } - }, - RespondActivityTaskCompletedResponse: { - fields: {} - }, - RespondActivityTaskCompletedByIdRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowId: { - type: "string", - id: 2 - }, - runId: { - type: "string", - id: 3 - }, - activityId: { - type: "string", - id: 4 - }, - result: { - type: "temporal.api.common.v1.Payloads", - id: 5 - }, - identity: { - type: "string", - id: 6 - } - } - }, - RespondActivityTaskCompletedByIdResponse: { - fields: {} - }, - RespondActivityTaskFailedRequest: { - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - namespace: { - type: "string", - id: 4 - }, - lastHeartbeatDetails: { - type: "temporal.api.common.v1.Payloads", - id: 5 - }, - workerVersion: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 6, - options: { - deprecated: true - } - }, - deployment: { - type: "temporal.api.deployment.v1.Deployment", - id: 7, - options: { - deprecated: true - } - }, - deploymentOptions: { - type: "temporal.api.deployment.v1.WorkerDeploymentOptions", - id: 8 - } - } - }, - RespondActivityTaskFailedResponse: { - fields: { - failures: { - rule: "repeated", - type: "temporal.api.failure.v1.Failure", - id: 1 - } - } - }, - RespondActivityTaskFailedByIdRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowId: { - type: "string", - id: 2 - }, - runId: { - type: "string", - id: 3 - }, - activityId: { - type: "string", - id: 4 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 5 - }, - identity: { - type: "string", - id: 6 - }, - lastHeartbeatDetails: { - type: "temporal.api.common.v1.Payloads", - id: 7 - } - } - }, - RespondActivityTaskFailedByIdResponse: { - fields: { - failures: { - rule: "repeated", - type: "temporal.api.failure.v1.Failure", - id: 1 - } - } - }, - RespondActivityTaskCanceledRequest: { - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - details: { - type: "temporal.api.common.v1.Payloads", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - namespace: { - type: "string", - id: 4 - }, - workerVersion: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 5, - options: { - deprecated: true - } - }, - deployment: { - type: "temporal.api.deployment.v1.Deployment", - id: 6, - options: { - deprecated: true - } - }, - deploymentOptions: { - type: "temporal.api.deployment.v1.WorkerDeploymentOptions", - id: 7 - } - } - }, - RespondActivityTaskCanceledResponse: { - fields: {} - }, - RespondActivityTaskCanceledByIdRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowId: { - type: "string", - id: 2 - }, - runId: { - type: "string", - id: 3 - }, - activityId: { - type: "string", - id: 4 - }, - details: { - type: "temporal.api.common.v1.Payloads", - id: 5 - }, - identity: { - type: "string", - id: 6 - }, - deploymentOptions: { - type: "temporal.api.deployment.v1.WorkerDeploymentOptions", - id: 7 - } - } - }, - RespondActivityTaskCanceledByIdResponse: { - fields: {} - }, - RequestCancelWorkflowExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - requestId: { - type: "string", - id: 4 - }, - firstExecutionRunId: { - type: "string", - id: 5 - }, - reason: { - type: "string", - id: 6 - }, - links: { - rule: "repeated", - type: "temporal.api.common.v1.Link", - id: 7 - } - } - }, - RequestCancelWorkflowExecutionResponse: { - fields: {} - }, - SignalWorkflowExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - signalName: { - type: "string", - id: 3 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 4 - }, - identity: { - type: "string", - id: 5 - }, - requestId: { - type: "string", - id: 6 - }, - control: { - type: "string", - id: 7, - options: { - deprecated: true - } - }, - header: { - type: "temporal.api.common.v1.Header", - id: 8 - }, - links: { - rule: "repeated", - type: "temporal.api.common.v1.Link", - id: 10 - } - }, - reserved: [ - [ - 9, - 9 - ] - ] - }, - SignalWorkflowExecutionResponse: { - fields: {} - }, - SignalWithStartWorkflowExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowId: { - type: "string", - id: 2 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 3 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 4 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 5 - }, - workflowExecutionTimeout: { - type: "google.protobuf.Duration", - id: 6 - }, - workflowRunTimeout: { - type: "google.protobuf.Duration", - id: 7 - }, - workflowTaskTimeout: { - type: "google.protobuf.Duration", - id: 8 - }, - identity: { - type: "string", - id: 9 - }, - requestId: { - type: "string", - id: 10 - }, - workflowIdReusePolicy: { - type: "temporal.api.enums.v1.WorkflowIdReusePolicy", - id: 11 - }, - workflowIdConflictPolicy: { - type: "temporal.api.enums.v1.WorkflowIdConflictPolicy", - id: 22 - }, - signalName: { - type: "string", - id: 12 - }, - signalInput: { - type: "temporal.api.common.v1.Payloads", - id: 13 - }, - control: { - type: "string", - id: 14, - options: { - deprecated: true - } - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 15 - }, - cronSchedule: { - type: "string", - id: 16 - }, - memo: { - type: "temporal.api.common.v1.Memo", - id: 17 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 18 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 19 - }, - workflowStartDelay: { - type: "google.protobuf.Duration", - id: 20 - }, - userMetadata: { - type: "temporal.api.sdk.v1.UserMetadata", - id: 23 - }, - links: { - rule: "repeated", - type: "temporal.api.common.v1.Link", - id: 24 - }, - versioningOverride: { - type: "temporal.api.workflow.v1.VersioningOverride", - id: 25 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 26 - } - }, - reserved: [ - [ - 21, - 21 - ] - ] - }, - SignalWithStartWorkflowExecutionResponse: { - fields: { - runId: { - type: "string", - id: 1 - }, - started: { - type: "bool", - id: 2 - } - } - }, - ResetWorkflowExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - reason: { - type: "string", - id: 3 - }, - workflowTaskFinishEventId: { - type: "int64", - id: 4 - }, - requestId: { - type: "string", - id: 5 - }, - resetReapplyType: { - type: "temporal.api.enums.v1.ResetReapplyType", - id: 6, - options: { - deprecated: true - } - }, - resetReapplyExcludeTypes: { - rule: "repeated", - type: "temporal.api.enums.v1.ResetReapplyExcludeType", - id: 7 - }, - postResetOperations: { - rule: "repeated", - type: "temporal.api.workflow.v1.PostResetOperation", - id: 8 - }, - identity: { - type: "string", - id: 9 - } - } - }, - ResetWorkflowExecutionResponse: { - fields: { - runId: { - type: "string", - id: 1 - } - } - }, - TerminateWorkflowExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - reason: { - type: "string", - id: 3 - }, - details: { - type: "temporal.api.common.v1.Payloads", - id: 4 - }, - identity: { - type: "string", - id: 5 - }, - firstExecutionRunId: { - type: "string", - id: 6 - }, - links: { - rule: "repeated", - type: "temporal.api.common.v1.Link", - id: 7 - } - } - }, - TerminateWorkflowExecutionResponse: { - fields: {} - }, - DeleteWorkflowExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - } - } - }, - DeleteWorkflowExecutionResponse: { - fields: {} - }, - ListOpenWorkflowExecutionsRequest: { - oneofs: { - filters: { - oneof: [ - "executionFilter", - "typeFilter" - ] - } - }, - fields: { - namespace: { - type: "string", - id: 1 - }, - maximumPageSize: { - type: "int32", - id: 2 - }, - nextPageToken: { - type: "bytes", - id: 3 - }, - startTimeFilter: { - type: "temporal.api.filter.v1.StartTimeFilter", - id: 4 - }, - executionFilter: { - type: "temporal.api.filter.v1.WorkflowExecutionFilter", - id: 5 - }, - typeFilter: { - type: "temporal.api.filter.v1.WorkflowTypeFilter", - id: 6 - } - } - }, - ListOpenWorkflowExecutionsResponse: { - fields: { - executions: { - rule: "repeated", - type: "temporal.api.workflow.v1.WorkflowExecutionInfo", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - } - } - }, - ListClosedWorkflowExecutionsRequest: { - oneofs: { - filters: { - oneof: [ - "executionFilter", - "typeFilter", - "statusFilter" - ] - } - }, - fields: { - namespace: { - type: "string", - id: 1 - }, - maximumPageSize: { - type: "int32", - id: 2 - }, - nextPageToken: { - type: "bytes", - id: 3 - }, - startTimeFilter: { - type: "temporal.api.filter.v1.StartTimeFilter", - id: 4 - }, - executionFilter: { - type: "temporal.api.filter.v1.WorkflowExecutionFilter", - id: 5 - }, - typeFilter: { - type: "temporal.api.filter.v1.WorkflowTypeFilter", - id: 6 - }, - statusFilter: { - type: "temporal.api.filter.v1.StatusFilter", - id: 7 - } - } - }, - ListClosedWorkflowExecutionsResponse: { - fields: { - executions: { - rule: "repeated", - type: "temporal.api.workflow.v1.WorkflowExecutionInfo", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - } - } - }, - ListWorkflowExecutionsRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - pageSize: { - type: "int32", - id: 2 - }, - nextPageToken: { - type: "bytes", - id: 3 - }, - query: { - type: "string", - id: 4 - } - } - }, - ListWorkflowExecutionsResponse: { - fields: { - executions: { - rule: "repeated", - type: "temporal.api.workflow.v1.WorkflowExecutionInfo", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - } - } - }, - ListArchivedWorkflowExecutionsRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - pageSize: { - type: "int32", - id: 2 - }, - nextPageToken: { - type: "bytes", - id: 3 - }, - query: { - type: "string", - id: 4 - } - } - }, - ListArchivedWorkflowExecutionsResponse: { - fields: { - executions: { - rule: "repeated", - type: "temporal.api.workflow.v1.WorkflowExecutionInfo", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - } - } - }, - ScanWorkflowExecutionsRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - pageSize: { - type: "int32", - id: 2 - }, - nextPageToken: { - type: "bytes", - id: 3 - }, - query: { - type: "string", - id: 4 - } - } - }, - ScanWorkflowExecutionsResponse: { - fields: { - executions: { - rule: "repeated", - type: "temporal.api.workflow.v1.WorkflowExecutionInfo", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - } - } - }, - CountWorkflowExecutionsRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - query: { - type: "string", - id: 2 - } - } - }, - CountWorkflowExecutionsResponse: { - fields: { - count: { - type: "int64", - id: 1 - }, - groups: { - rule: "repeated", - type: "AggregationGroup", - id: 2 - } - }, - nested: { - AggregationGroup: { - fields: { - groupValues: { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 1 - }, - count: { - type: "int64", - id: 2 - } - } - } - } - }, - GetSearchAttributesRequest: { - fields: {} - }, - GetSearchAttributesResponse: { - fields: { - keys: { - keyType: "string", - type: "temporal.api.enums.v1.IndexedValueType", - id: 1 - } - } - }, - RespondQueryTaskCompletedRequest: { - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - completedType: { - type: "temporal.api.enums.v1.QueryResultType", - id: 2 - }, - queryResult: { - type: "temporal.api.common.v1.Payloads", - id: 3 - }, - errorMessage: { - type: "string", - id: 4 - }, - namespace: { - type: "string", - id: 6 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 7 - }, - cause: { - type: "temporal.api.enums.v1.WorkflowTaskFailedCause", - id: 8 - } - }, - reserved: [ - [ - 5, - 5 - ] - ] - }, - RespondQueryTaskCompletedResponse: { - fields: {} - }, - ResetStickyTaskQueueRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - execution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - } - } - }, - ResetStickyTaskQueueResponse: { - fields: {} - }, - ShutdownWorkerRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - stickyTaskQueue: { - type: "string", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - reason: { - type: "string", - id: 4 - }, - workerHeartbeat: { - type: "temporal.api.worker.v1.WorkerHeartbeat", - id: 5 - }, - workerInstanceKey: { - type: "string", - id: 6 - }, - taskQueue: { - type: "string", - id: 7 - }, - taskQueueTypes: { - rule: "repeated", - type: "temporal.api.enums.v1.TaskQueueType", - id: 8 - } - } - }, - ShutdownWorkerResponse: { - fields: {} - }, - QueryWorkflowRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - execution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - query: { - type: "temporal.api.query.v1.WorkflowQuery", - id: 3 - }, - queryRejectCondition: { - type: "temporal.api.enums.v1.QueryRejectCondition", - id: 4 - } - } - }, - QueryWorkflowResponse: { - fields: { - queryResult: { - type: "temporal.api.common.v1.Payloads", - id: 1 - }, - queryRejected: { - type: "temporal.api.query.v1.QueryRejected", - id: 2 - } - } - }, - DescribeWorkflowExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - execution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - } - } - }, - DescribeWorkflowExecutionResponse: { - fields: { - executionConfig: { - type: "temporal.api.workflow.v1.WorkflowExecutionConfig", - id: 1 - }, - workflowExecutionInfo: { - type: "temporal.api.workflow.v1.WorkflowExecutionInfo", - id: 2 - }, - pendingActivities: { - rule: "repeated", - type: "temporal.api.workflow.v1.PendingActivityInfo", - id: 3 - }, - pendingChildren: { - rule: "repeated", - type: "temporal.api.workflow.v1.PendingChildExecutionInfo", - id: 4 - }, - pendingWorkflowTask: { - type: "temporal.api.workflow.v1.PendingWorkflowTaskInfo", - id: 5 - }, - callbacks: { - rule: "repeated", - type: "temporal.api.workflow.v1.CallbackInfo", - id: 6 - }, - pendingNexusOperations: { - rule: "repeated", - type: "temporal.api.workflow.v1.PendingNexusOperationInfo", - id: 7 - }, - workflowExtendedInfo: { - type: "temporal.api.workflow.v1.WorkflowExecutionExtendedInfo", - id: 8 - } - } - }, - DescribeTaskQueueRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 2 - }, - taskQueueType: { - type: "temporal.api.enums.v1.TaskQueueType", - id: 3 - }, - reportStats: { - type: "bool", - id: 8 - }, - reportConfig: { - type: "bool", - id: 11 - }, - includeTaskQueueStatus: { - type: "bool", - id: 4, - options: { - deprecated: true - } - }, - apiMode: { - type: "temporal.api.enums.v1.DescribeTaskQueueMode", - id: 5, - options: { - deprecated: true - } - }, - versions: { - type: "temporal.api.taskqueue.v1.TaskQueueVersionSelection", - id: 6, - options: { - deprecated: true - } - }, - taskQueueTypes: { - rule: "repeated", - type: "temporal.api.enums.v1.TaskQueueType", - id: 7, - options: { - deprecated: true - } - }, - reportPollers: { - type: "bool", - id: 9, - options: { - deprecated: true - } - }, - reportTaskReachability: { - type: "bool", - id: 10, - options: { - deprecated: true - } - } - } - }, - DescribeTaskQueueResponse: { - fields: { - pollers: { - rule: "repeated", - type: "temporal.api.taskqueue.v1.PollerInfo", - id: 1 - }, - stats: { - type: "temporal.api.taskqueue.v1.TaskQueueStats", - id: 5 - }, - statsByPriorityKey: { - keyType: "int32", - type: "temporal.api.taskqueue.v1.TaskQueueStats", - id: 8 - }, - versioningInfo: { - type: "temporal.api.taskqueue.v1.TaskQueueVersioningInfo", - id: 4 - }, - config: { - type: "temporal.api.taskqueue.v1.TaskQueueConfig", - id: 6 - }, - effectiveRateLimit: { - type: "EffectiveRateLimit", - id: 7 - }, - taskQueueStatus: { - type: "temporal.api.taskqueue.v1.TaskQueueStatus", - id: 2, - options: { - deprecated: true - } - }, - versionsInfo: { - keyType: "string", - type: "temporal.api.taskqueue.v1.TaskQueueVersionInfo", - id: 3, - options: { - deprecated: true - } - } - }, - nested: { - EffectiveRateLimit: { - fields: { - requestsPerSecond: { - type: "float", - id: 1 - }, - rateLimitSource: { - type: "temporal.api.enums.v1.RateLimitSource", - id: 2 - } - } - } - } - }, - GetClusterInfoRequest: { - fields: {} - }, - GetClusterInfoResponse: { - fields: { - supportedClients: { - keyType: "string", - type: "string", - id: 1 - }, - serverVersion: { - type: "string", - id: 2 - }, - clusterId: { - type: "string", - id: 3 - }, - versionInfo: { - type: "temporal.api.version.v1.VersionInfo", - id: 4 - }, - clusterName: { - type: "string", - id: 5 - }, - historyShardCount: { - type: "int32", - id: 6 - }, - persistenceStore: { - type: "string", - id: 7 - }, - visibilityStore: { - type: "string", - id: 8 - }, - initialFailoverVersion: { - type: "int64", - id: 9 - }, - failoverVersionIncrement: { - type: "int64", - id: 10 - } - } - }, - GetSystemInfoRequest: { - fields: {} - }, - GetSystemInfoResponse: { - fields: { - serverVersion: { - type: "string", - id: 1 - }, - capabilities: { - type: "Capabilities", - id: 2 - } - }, - nested: { - Capabilities: { - fields: { - signalAndQueryHeader: { - type: "bool", - id: 1 - }, - internalErrorDifferentiation: { - type: "bool", - id: 2 - }, - activityFailureIncludeHeartbeat: { - type: "bool", - id: 3 - }, - supportsSchedules: { - type: "bool", - id: 4 - }, - encodedFailureAttributes: { - type: "bool", - id: 5 - }, - buildIdBasedVersioning: { - type: "bool", - id: 6 - }, - upsertMemo: { - type: "bool", - id: 7 - }, - eagerWorkflowStart: { - type: "bool", - id: 8 - }, - sdkMetadata: { - type: "bool", - id: 9 - }, - countGroupByExecutionStatus: { - type: "bool", - id: 10 - }, - nexus: { - type: "bool", - id: 11 - } - } - } - } - }, - ListTaskQueuePartitionsRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 2 - } - } - }, - ListTaskQueuePartitionsResponse: { - fields: { - activityTaskQueuePartitions: { - rule: "repeated", - type: "temporal.api.taskqueue.v1.TaskQueuePartitionMetadata", - id: 1 - }, - workflowTaskQueuePartitions: { - rule: "repeated", - type: "temporal.api.taskqueue.v1.TaskQueuePartitionMetadata", - id: 2 - } - } - }, - CreateScheduleRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - scheduleId: { - type: "string", - id: 2 - }, - schedule: { - type: "temporal.api.schedule.v1.Schedule", - id: 3 - }, - initialPatch: { - type: "temporal.api.schedule.v1.SchedulePatch", - id: 4 - }, - identity: { - type: "string", - id: 5 - }, - requestId: { - type: "string", - id: 6 - }, - memo: { - type: "temporal.api.common.v1.Memo", - id: 7 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 8 - } - } - }, - CreateScheduleResponse: { - fields: { - conflictToken: { - type: "bytes", - id: 1 - } - } - }, - DescribeScheduleRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - scheduleId: { - type: "string", - id: 2 - } - } - }, - DescribeScheduleResponse: { - fields: { - schedule: { - type: "temporal.api.schedule.v1.Schedule", - id: 1 - }, - info: { - type: "temporal.api.schedule.v1.ScheduleInfo", - id: 2 - }, - memo: { - type: "temporal.api.common.v1.Memo", - id: 3 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 4 - }, - conflictToken: { - type: "bytes", - id: 5 - } - } - }, - UpdateScheduleRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - scheduleId: { - type: "string", - id: 2 - }, - schedule: { - type: "temporal.api.schedule.v1.Schedule", - id: 3 - }, - conflictToken: { - type: "bytes", - id: 4 - }, - identity: { - type: "string", - id: 5 - }, - requestId: { - type: "string", - id: 6 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 7 - } - } - }, - UpdateScheduleResponse: { - fields: {} - }, - PatchScheduleRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - scheduleId: { - type: "string", - id: 2 - }, - patch: { - type: "temporal.api.schedule.v1.SchedulePatch", - id: 3 - }, - identity: { - type: "string", - id: 4 - }, - requestId: { - type: "string", - id: 5 - } - } - }, - PatchScheduleResponse: { - fields: {} - }, - ListScheduleMatchingTimesRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - scheduleId: { - type: "string", - id: 2 - }, - startTime: { - type: "google.protobuf.Timestamp", - id: 3 - }, - endTime: { - type: "google.protobuf.Timestamp", - id: 4 - } - } - }, - ListScheduleMatchingTimesResponse: { - fields: { - startTime: { - rule: "repeated", - type: "google.protobuf.Timestamp", - id: 1 - } - } - }, - DeleteScheduleRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - scheduleId: { - type: "string", - id: 2 - }, - identity: { - type: "string", - id: 3 - } - } - }, - DeleteScheduleResponse: { - fields: {} - }, - ListSchedulesRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - maximumPageSize: { - type: "int32", - id: 2 - }, - nextPageToken: { - type: "bytes", - id: 3 - }, - query: { - type: "string", - id: 4 - } - } - }, - ListSchedulesResponse: { - fields: { - schedules: { - rule: "repeated", - type: "temporal.api.schedule.v1.ScheduleListEntry", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - } - } - }, - CountSchedulesRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - query: { - type: "string", - id: 2 - } - } - }, - CountSchedulesResponse: { - fields: { - count: { - type: "int64", - id: 1 - }, - groups: { - rule: "repeated", - type: "AggregationGroup", - id: 2 - } - }, - nested: { - AggregationGroup: { - fields: { - groupValues: { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 1 - }, - count: { - type: "int64", - id: 2 - } - } - } - } - }, - UpdateWorkerBuildIdCompatibilityRequest: { - oneofs: { - operation: { - oneof: [ - "addNewBuildIdInNewDefaultSet", - "addNewCompatibleBuildId", - "promoteSetByBuildId", - "promoteBuildIdWithinSet", - "mergeSets" - ] - } - }, - fields: { - namespace: { - type: "string", - id: 1 - }, - taskQueue: { - type: "string", - id: 2 - }, - addNewBuildIdInNewDefaultSet: { - type: "string", - id: 3 - }, - addNewCompatibleBuildId: { - type: "AddNewCompatibleVersion", - id: 4 - }, - promoteSetByBuildId: { - type: "string", - id: 5 - }, - promoteBuildIdWithinSet: { - type: "string", - id: 6 - }, - mergeSets: { - type: "MergeSets", - id: 7 - } - }, - nested: { - AddNewCompatibleVersion: { - fields: { - newBuildId: { - type: "string", - id: 1 - }, - existingCompatibleBuildId: { - type: "string", - id: 2 - }, - makeSetDefault: { - type: "bool", - id: 3 - } - } - }, - MergeSets: { - fields: { - primarySetBuildId: { - type: "string", - id: 1 - }, - secondarySetBuildId: { - type: "string", - id: 2 - } - } - } - } - }, - UpdateWorkerBuildIdCompatibilityResponse: { - fields: {}, - reserved: [ - [ - 1, - 1 - ], - "version_set_id" - ] - }, - GetWorkerBuildIdCompatibilityRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - taskQueue: { - type: "string", - id: 2 - }, - maxSets: { - type: "int32", - id: 3 - } - } - }, - GetWorkerBuildIdCompatibilityResponse: { - fields: { - majorVersionSets: { - rule: "repeated", - type: "temporal.api.taskqueue.v1.CompatibleVersionSet", - id: 1 - } - } - }, - UpdateWorkerVersioningRulesRequest: { - oneofs: { - operation: { - oneof: [ - "insertAssignmentRule", - "replaceAssignmentRule", - "deleteAssignmentRule", - "addCompatibleRedirectRule", - "replaceCompatibleRedirectRule", - "deleteCompatibleRedirectRule", - "commitBuildId" - ] - } - }, - fields: { - namespace: { - type: "string", - id: 1 - }, - taskQueue: { - type: "string", - id: 2 - }, - conflictToken: { - type: "bytes", - id: 3 - }, - insertAssignmentRule: { - type: "InsertBuildIdAssignmentRule", - id: 4 - }, - replaceAssignmentRule: { - type: "ReplaceBuildIdAssignmentRule", - id: 5 - }, - deleteAssignmentRule: { - type: "DeleteBuildIdAssignmentRule", - id: 6 - }, - addCompatibleRedirectRule: { - type: "AddCompatibleBuildIdRedirectRule", - id: 7 - }, - replaceCompatibleRedirectRule: { - type: "ReplaceCompatibleBuildIdRedirectRule", - id: 8 - }, - deleteCompatibleRedirectRule: { - type: "DeleteCompatibleBuildIdRedirectRule", - id: 9 - }, - commitBuildId: { - type: "CommitBuildId", - id: 10 - } - }, - nested: { - InsertBuildIdAssignmentRule: { - fields: { - ruleIndex: { - type: "int32", - id: 1 - }, - rule: { - type: "temporal.api.taskqueue.v1.BuildIdAssignmentRule", - id: 2 - } - } - }, - ReplaceBuildIdAssignmentRule: { - fields: { - ruleIndex: { - type: "int32", - id: 1 - }, - rule: { - type: "temporal.api.taskqueue.v1.BuildIdAssignmentRule", - id: 2 - }, - force: { - type: "bool", - id: 3 - } - } - }, - DeleteBuildIdAssignmentRule: { - fields: { - ruleIndex: { - type: "int32", - id: 1 - }, - force: { - type: "bool", - id: 2 - } - } - }, - AddCompatibleBuildIdRedirectRule: { - fields: { - rule: { - type: "temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule", - id: 1 - } - } - }, - ReplaceCompatibleBuildIdRedirectRule: { - fields: { - rule: { - type: "temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule", - id: 1 - } - } - }, - DeleteCompatibleBuildIdRedirectRule: { - fields: { - sourceBuildId: { - type: "string", - id: 1 - } - } - }, - CommitBuildId: { - fields: { - targetBuildId: { - type: "string", - id: 1 - }, - force: { - type: "bool", - id: 2 - } - } - } - } - }, - UpdateWorkerVersioningRulesResponse: { - fields: { - assignmentRules: { - rule: "repeated", - type: "temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule", - id: 1 - }, - compatibleRedirectRules: { - rule: "repeated", - type: "temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule", - id: 2 - }, - conflictToken: { - type: "bytes", - id: 3 - } - } - }, - GetWorkerVersioningRulesRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - taskQueue: { - type: "string", - id: 2 - } - } - }, - GetWorkerVersioningRulesResponse: { - fields: { - assignmentRules: { - rule: "repeated", - type: "temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule", - id: 1 - }, - compatibleRedirectRules: { - rule: "repeated", - type: "temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule", - id: 2 - }, - conflictToken: { - type: "bytes", - id: 3 - } - } - }, - GetWorkerTaskReachabilityRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - buildIds: { - rule: "repeated", - type: "string", - id: 2 - }, - taskQueues: { - rule: "repeated", - type: "string", - id: 3 - }, - reachability: { - type: "temporal.api.enums.v1.TaskReachability", - id: 4 - } - } - }, - GetWorkerTaskReachabilityResponse: { - fields: { - buildIdReachability: { - rule: "repeated", - type: "temporal.api.taskqueue.v1.BuildIdReachability", - id: 1 - } - } - }, - UpdateWorkflowExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - firstExecutionRunId: { - type: "string", - id: 3 - }, - waitPolicy: { - type: "temporal.api.update.v1.WaitPolicy", - id: 4 - }, - request: { - type: "temporal.api.update.v1.Request", - id: 5 - } - } - }, - UpdateWorkflowExecutionResponse: { - fields: { - updateRef: { - type: "temporal.api.update.v1.UpdateRef", - id: 1 - }, - outcome: { - type: "temporal.api.update.v1.Outcome", - id: 2 - }, - stage: { - type: "temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage", - id: 3 - } - } - }, - StartBatchOperationRequest: { - oneofs: { - operation: { - oneof: [ - "terminationOperation", - "signalOperation", - "cancellationOperation", - "deletionOperation", - "resetOperation", - "updateWorkflowOptionsOperation", - "unpauseActivitiesOperation", - "resetActivitiesOperation", - "updateActivityOptionsOperation" - ] - } - }, - fields: { - namespace: { - type: "string", - id: 1 - }, - visibilityQuery: { - type: "string", - id: 2 - }, - jobId: { - type: "string", - id: 3 - }, - reason: { - type: "string", - id: 4 - }, - executions: { - rule: "repeated", - type: "temporal.api.common.v1.WorkflowExecution", - id: 5 - }, - maxOperationsPerSecond: { - type: "float", - id: 6 - }, - terminationOperation: { - type: "temporal.api.batch.v1.BatchOperationTermination", - id: 10 - }, - signalOperation: { - type: "temporal.api.batch.v1.BatchOperationSignal", - id: 11 - }, - cancellationOperation: { - type: "temporal.api.batch.v1.BatchOperationCancellation", - id: 12 - }, - deletionOperation: { - type: "temporal.api.batch.v1.BatchOperationDeletion", - id: 13 - }, - resetOperation: { - type: "temporal.api.batch.v1.BatchOperationReset", - id: 14 - }, - updateWorkflowOptionsOperation: { - type: "temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions", - id: 15 - }, - unpauseActivitiesOperation: { - type: "temporal.api.batch.v1.BatchOperationUnpauseActivities", - id: 16 - }, - resetActivitiesOperation: { - type: "temporal.api.batch.v1.BatchOperationResetActivities", - id: 17 - }, - updateActivityOptionsOperation: { - type: "temporal.api.batch.v1.BatchOperationUpdateActivityOptions", - id: 18 - } - } - }, - StartBatchOperationResponse: { - fields: {} - }, - StopBatchOperationRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - jobId: { - type: "string", - id: 2 - }, - reason: { - type: "string", - id: 3 - }, - identity: { - type: "string", - id: 4 - } - } - }, - StopBatchOperationResponse: { - fields: {} - }, - DescribeBatchOperationRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - jobId: { - type: "string", - id: 2 - } - } - }, - DescribeBatchOperationResponse: { - fields: { - operationType: { - type: "temporal.api.enums.v1.BatchOperationType", - id: 1 - }, - jobId: { - type: "string", - id: 2 - }, - state: { - type: "temporal.api.enums.v1.BatchOperationState", - id: 3 - }, - startTime: { - type: "google.protobuf.Timestamp", - id: 4 - }, - closeTime: { - type: "google.protobuf.Timestamp", - id: 5 - }, - totalOperationCount: { - type: "int64", - id: 6 - }, - completeOperationCount: { - type: "int64", - id: 7 - }, - failureOperationCount: { - type: "int64", - id: 8 - }, - identity: { - type: "string", - id: 9 - }, - reason: { - type: "string", - id: 10 - } - } - }, - ListBatchOperationsRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - pageSize: { - type: "int32", - id: 2 - }, - nextPageToken: { - type: "bytes", - id: 3 - } - } - }, - ListBatchOperationsResponse: { - fields: { - operationInfo: { - rule: "repeated", - type: "temporal.api.batch.v1.BatchOperationInfo", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - } - } - }, - PollWorkflowExecutionUpdateRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - updateRef: { - type: "temporal.api.update.v1.UpdateRef", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - waitPolicy: { - type: "temporal.api.update.v1.WaitPolicy", - id: 4 - } - } - }, - PollWorkflowExecutionUpdateResponse: { - fields: { - outcome: { - type: "temporal.api.update.v1.Outcome", - id: 1 - }, - stage: { - type: "temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage", - id: 2 - }, - updateRef: { - type: "temporal.api.update.v1.UpdateRef", - id: 3 - } - } - }, - PollNexusTaskQueueRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - identity: { - type: "string", - id: 2 - }, - workerInstanceKey: { - type: "string", - id: 8 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 3 - }, - workerVersionCapabilities: { - type: "temporal.api.common.v1.WorkerVersionCapabilities", - id: 4, - options: { - deprecated: true - } - }, - deploymentOptions: { - type: "temporal.api.deployment.v1.WorkerDeploymentOptions", - id: 6 - }, - workerHeartbeat: { - rule: "repeated", - type: "temporal.api.worker.v1.WorkerHeartbeat", - id: 7 - } - } - }, - PollNexusTaskQueueResponse: { - fields: { - taskToken: { - type: "bytes", - id: 1 - }, - request: { - type: "temporal.api.nexus.v1.Request", - id: 2 - }, - pollerScalingDecision: { - type: "temporal.api.taskqueue.v1.PollerScalingDecision", - id: 3 - } - } - }, - RespondNexusTaskCompletedRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - identity: { - type: "string", - id: 2 - }, - taskToken: { - type: "bytes", - id: 3 - }, - response: { - type: "temporal.api.nexus.v1.Response", - id: 4 - } - } - }, - RespondNexusTaskCompletedResponse: { - fields: {} - }, - RespondNexusTaskFailedRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - identity: { - type: "string", - id: 2 - }, - taskToken: { - type: "bytes", - id: 3 - }, - error: { - type: "temporal.api.nexus.v1.HandlerError", - id: 4, - options: { - deprecated: true - } - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 5 - } - } - }, - RespondNexusTaskFailedResponse: { - fields: {} - }, - ExecuteMultiOperationRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - operations: { - rule: "repeated", - type: "Operation", - id: 2 - } - }, - nested: { - Operation: { - oneofs: { - operation: { - oneof: [ - "startWorkflow", - "updateWorkflow" - ] - } - }, - fields: { - startWorkflow: { - type: "StartWorkflowExecutionRequest", - id: 1 - }, - updateWorkflow: { - type: "UpdateWorkflowExecutionRequest", - id: 2 - } - } - } - } - }, - ExecuteMultiOperationResponse: { - fields: { - responses: { - rule: "repeated", - type: "Response", - id: 1 - } - }, - nested: { - Response: { - oneofs: { - response: { - oneof: [ - "startWorkflow", - "updateWorkflow" - ] - } - }, - fields: { - startWorkflow: { - type: "StartWorkflowExecutionResponse", - id: 1 - }, - updateWorkflow: { - type: "UpdateWorkflowExecutionResponse", - id: 2 - } - } - } - } - }, - UpdateActivityOptionsRequest: { - oneofs: { - activity: { - oneof: [ - "id", - "type", - "matchAll" - ] - } - }, - fields: { - namespace: { - type: "string", - id: 1 - }, - execution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - activityOptions: { - type: "temporal.api.activity.v1.ActivityOptions", - id: 4 - }, - updateMask: { - type: "google.protobuf.FieldMask", - id: 5 - }, - id: { - type: "string", - id: 6 - }, - type: { - type: "string", - id: 7 - }, - matchAll: { - type: "bool", - id: 9 - }, - restoreOriginal: { - type: "bool", - id: 8 - } - } - }, - UpdateActivityOptionsResponse: { - fields: { - activityOptions: { - type: "temporal.api.activity.v1.ActivityOptions", - id: 1 - } - } - }, - PauseActivityRequest: { - oneofs: { - activity: { - oneof: [ - "id", - "type" - ] - } - }, - fields: { - namespace: { - type: "string", - id: 1 - }, - execution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - id: { - type: "string", - id: 4 - }, - type: { - type: "string", - id: 5 - }, - reason: { - type: "string", - id: 6 - } - } - }, - PauseActivityResponse: { - fields: {} - }, - UnpauseActivityRequest: { - oneofs: { - activity: { - oneof: [ - "id", - "type", - "unpauseAll" - ] - } - }, - fields: { - namespace: { - type: "string", - id: 1 - }, - execution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - id: { - type: "string", - id: 4 - }, - type: { - type: "string", - id: 5 - }, - unpauseAll: { - type: "bool", - id: 6 - }, - resetAttempts: { - type: "bool", - id: 7 - }, - resetHeartbeat: { - type: "bool", - id: 8 - }, - jitter: { - type: "google.protobuf.Duration", - id: 9 - } - } - }, - UnpauseActivityResponse: { - fields: {} - }, - ResetActivityRequest: { - oneofs: { - activity: { - oneof: [ - "id", - "type", - "matchAll" - ] - } - }, - fields: { - namespace: { - type: "string", - id: 1 - }, - execution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - id: { - type: "string", - id: 4 - }, - type: { - type: "string", - id: 5 - }, - matchAll: { - type: "bool", - id: 10 - }, - resetHeartbeat: { - type: "bool", - id: 6 - }, - keepPaused: { - type: "bool", - id: 7 - }, - jitter: { - type: "google.protobuf.Duration", - id: 8 - }, - restoreOriginalOptions: { - type: "bool", - id: 9 - } - } - }, - ResetActivityResponse: { - fields: {} - }, - UpdateWorkflowExecutionOptionsRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - workflowExecutionOptions: { - type: "temporal.api.workflow.v1.WorkflowExecutionOptions", - id: 3 - }, - updateMask: { - type: "google.protobuf.FieldMask", - id: 4 - }, - identity: { - type: "string", - id: 5 - } - } - }, - UpdateWorkflowExecutionOptionsResponse: { - fields: { - workflowExecutionOptions: { - type: "temporal.api.workflow.v1.WorkflowExecutionOptions", - id: 1 - } - } - }, - DescribeDeploymentRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - deployment: { - type: "deployment.v1.Deployment", - id: 2 - } - } - }, - DescribeDeploymentResponse: { - fields: { - deploymentInfo: { - type: "deployment.v1.DeploymentInfo", - id: 1 - } - } - }, - DescribeWorkerDeploymentVersionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - version: { - type: "string", - id: 2, - options: { - deprecated: true - } - }, - deploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 3 - }, - reportTaskQueueStats: { - type: "bool", - id: 4 - } - } - }, - DescribeWorkerDeploymentVersionResponse: { - fields: { - workerDeploymentVersionInfo: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersionInfo", - id: 1 - }, - versionTaskQueues: { - rule: "repeated", - type: "VersionTaskQueue", - id: 2 - } - }, - nested: { - VersionTaskQueue: { - fields: { - name: { - type: "string", - id: 1 - }, - type: { - type: "temporal.api.enums.v1.TaskQueueType", - id: 2 - }, - stats: { - type: "temporal.api.taskqueue.v1.TaskQueueStats", - id: 3 - }, - statsByPriorityKey: { - keyType: "int32", - type: "temporal.api.taskqueue.v1.TaskQueueStats", - id: 4 - } - } - } - } - }, - DescribeWorkerDeploymentRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - deploymentName: { - type: "string", - id: 2 - } - } - }, - DescribeWorkerDeploymentResponse: { - fields: { - conflictToken: { - type: "bytes", - id: 1 - }, - workerDeploymentInfo: { - type: "temporal.api.deployment.v1.WorkerDeploymentInfo", - id: 2 - } - } - }, - ListDeploymentsRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - pageSize: { - type: "int32", - id: 2 - }, - nextPageToken: { - type: "bytes", - id: 3 - }, - seriesName: { - type: "string", - id: 4 - } - } - }, - ListDeploymentsResponse: { - fields: { - nextPageToken: { - type: "bytes", - id: 1 - }, - deployments: { - rule: "repeated", - type: "temporal.api.deployment.v1.DeploymentListInfo", - id: 2 - } - } - }, - SetCurrentDeploymentRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - deployment: { - type: "temporal.api.deployment.v1.Deployment", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - updateMetadata: { - type: "temporal.api.deployment.v1.UpdateDeploymentMetadata", - id: 4 - } - } - }, - SetCurrentDeploymentResponse: { - fields: { - currentDeploymentInfo: { - type: "temporal.api.deployment.v1.DeploymentInfo", - id: 1 - }, - previousDeploymentInfo: { - type: "temporal.api.deployment.v1.DeploymentInfo", - id: 2 - } - } - }, - SetWorkerDeploymentCurrentVersionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - deploymentName: { - type: "string", - id: 2 - }, - version: { - type: "string", - id: 3, - options: { - deprecated: true - } - }, - buildId: { - type: "string", - id: 7 - }, - conflictToken: { - type: "bytes", - id: 4 - }, - identity: { - type: "string", - id: 5 - }, - ignoreMissingTaskQueues: { - type: "bool", - id: 6 - }, - allowNoPollers: { - type: "bool", - id: 9 - } - } - }, - SetWorkerDeploymentCurrentVersionResponse: { - fields: { - conflictToken: { - type: "bytes", - id: 1 - }, - previousVersion: { - type: "string", - id: 2, - options: { - deprecated: true - } - }, - previousDeploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 3, - options: { - deprecated: true - } - } - } - }, - SetWorkerDeploymentRampingVersionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - deploymentName: { - type: "string", - id: 2 - }, - version: { - type: "string", - id: 3, - options: { - deprecated: true - } - }, - buildId: { - type: "string", - id: 8 - }, - percentage: { - type: "float", - id: 4 - }, - conflictToken: { - type: "bytes", - id: 5 - }, - identity: { - type: "string", - id: 6 - }, - ignoreMissingTaskQueues: { - type: "bool", - id: 7 - }, - allowNoPollers: { - type: "bool", - id: 10 - } - } - }, - SetWorkerDeploymentRampingVersionResponse: { - fields: { - conflictToken: { - type: "bytes", - id: 1 - }, - previousVersion: { - type: "string", - id: 2, - options: { - deprecated: true - } - }, - previousDeploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 4, - options: { - deprecated: true - } - }, - previousPercentage: { - type: "float", - id: 3, - options: { - deprecated: true - } - } - } - }, - ListWorkerDeploymentsRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - pageSize: { - type: "int32", - id: 2 - }, - nextPageToken: { - type: "bytes", - id: 3 - } - } - }, - ListWorkerDeploymentsResponse: { - fields: { - nextPageToken: { - type: "bytes", - id: 1 - }, - workerDeployments: { - rule: "repeated", - type: "WorkerDeploymentSummary", - id: 2 - } - }, - nested: { - WorkerDeploymentSummary: { - fields: { - name: { - type: "string", - id: 1 - }, - createTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - routingConfig: { - type: "temporal.api.deployment.v1.RoutingConfig", - id: 3 - }, - latestVersionSummary: { - type: "temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary", - id: 4 - }, - currentVersionSummary: { - type: "temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary", - id: 5 - }, - rampingVersionSummary: { - type: "temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary", - id: 6 - } - } - } - } - }, - DeleteWorkerDeploymentVersionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - version: { - type: "string", - id: 2, - options: { - deprecated: true - } - }, - deploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 5 - }, - skipDrainage: { - type: "bool", - id: 3 - }, - identity: { - type: "string", - id: 4 - } - } - }, - DeleteWorkerDeploymentVersionResponse: { - fields: {} - }, - DeleteWorkerDeploymentRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - deploymentName: { - type: "string", - id: 2 - }, - identity: { - type: "string", - id: 3 - } - } - }, - DeleteWorkerDeploymentResponse: { - fields: {} - }, - UpdateWorkerDeploymentVersionMetadataRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - version: { - type: "string", - id: 2, - options: { - deprecated: true - } - }, - deploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 5 - }, - upsertEntries: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 3 - }, - removeEntries: { - rule: "repeated", - type: "string", - id: 4 - }, - identity: { - type: "string", - id: 6 - } - } - }, - UpdateWorkerDeploymentVersionMetadataResponse: { - fields: { - metadata: { - type: "temporal.api.deployment.v1.VersionMetadata", - id: 1 - } - } - }, - SetWorkerDeploymentManagerRequest: { - oneofs: { - newManagerIdentity: { - oneof: [ - "managerIdentity", - "self" - ] - } - }, - fields: { - namespace: { - type: "string", - id: 1 - }, - deploymentName: { - type: "string", - id: 2 - }, - managerIdentity: { - type: "string", - id: 3 - }, - self: { - type: "bool", - id: 4 - }, - conflictToken: { - type: "bytes", - id: 5 - }, - identity: { - type: "string", - id: 6 - } - } - }, - SetWorkerDeploymentManagerResponse: { - fields: { - conflictToken: { - type: "bytes", - id: 1 - }, - previousManagerIdentity: { - type: "string", - id: 2, - options: { - deprecated: true - } - } - } - }, - GetCurrentDeploymentRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - seriesName: { - type: "string", - id: 2 - } - } - }, - GetCurrentDeploymentResponse: { - fields: { - currentDeploymentInfo: { - type: "temporal.api.deployment.v1.DeploymentInfo", - id: 1 - } - } - }, - GetDeploymentReachabilityRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - deployment: { - type: "temporal.api.deployment.v1.Deployment", - id: 2 - } - } - }, - GetDeploymentReachabilityResponse: { - fields: { - deploymentInfo: { - type: "temporal.api.deployment.v1.DeploymentInfo", - id: 1 - }, - reachability: { - type: "enums.v1.DeploymentReachability", - id: 2 - }, - lastUpdateTime: { - type: "google.protobuf.Timestamp", - id: 3 - } - } - }, - CreateWorkflowRuleRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - spec: { - type: "temporal.api.rules.v1.WorkflowRuleSpec", - id: 2 - }, - forceScan: { - type: "bool", - id: 3 - }, - requestId: { - type: "string", - id: 4 - }, - identity: { - type: "string", - id: 5 - }, - description: { - type: "string", - id: 6 - } - } - }, - CreateWorkflowRuleResponse: { - fields: { - rule: { - type: "temporal.api.rules.v1.WorkflowRule", - id: 1 - }, - jobId: { - type: "string", - id: 2 - } - } - }, - DescribeWorkflowRuleRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - ruleId: { - type: "string", - id: 2 - } - } - }, - DescribeWorkflowRuleResponse: { - fields: { - rule: { - type: "temporal.api.rules.v1.WorkflowRule", - id: 1 - } - } - }, - DeleteWorkflowRuleRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - ruleId: { - type: "string", - id: 2 - } - } - }, - DeleteWorkflowRuleResponse: { - fields: {} - }, - ListWorkflowRulesRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - } - } - }, - ListWorkflowRulesResponse: { - fields: { - rules: { - rule: "repeated", - type: "temporal.api.rules.v1.WorkflowRule", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - } - } - }, - TriggerWorkflowRuleRequest: { - oneofs: { - rule: { - oneof: [ - "id", - "spec" - ] - } - }, - fields: { - namespace: { - type: "string", - id: 1 - }, - execution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - id: { - type: "string", - id: 4 - }, - spec: { - type: "temporal.api.rules.v1.WorkflowRuleSpec", - id: 5 - }, - identity: { - type: "string", - id: 3 - } - } - }, - TriggerWorkflowRuleResponse: { - fields: { - applied: { - type: "bool", - id: 1 - } - } - }, - RecordWorkerHeartbeatRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - identity: { - type: "string", - id: 2 - }, - workerHeartbeat: { - rule: "repeated", - type: "temporal.api.worker.v1.WorkerHeartbeat", - id: 3 - } - } - }, - RecordWorkerHeartbeatResponse: { - fields: {} - }, - ListWorkersRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - pageSize: { - type: "int32", - id: 2 - }, - nextPageToken: { - type: "bytes", - id: 3 - }, - query: { - type: "string", - id: 4 - } - } - }, - ListWorkersResponse: { - fields: { - workersInfo: { - rule: "repeated", - type: "temporal.api.worker.v1.WorkerInfo", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - } - } - }, - UpdateTaskQueueConfigRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - identity: { - type: "string", - id: 2 - }, - taskQueue: { - type: "string", - id: 3 - }, - taskQueueType: { - type: "temporal.api.enums.v1.TaskQueueType", - id: 4 - }, - updateQueueRateLimit: { - type: "RateLimitUpdate", - id: 5 - }, - updateFairnessKeyRateLimitDefault: { - type: "RateLimitUpdate", - id: 6 - }, - setFairnessWeightOverrides: { - keyType: "string", - type: "float", - id: 7 - }, - unsetFairnessWeightOverrides: { - rule: "repeated", - type: "string", - id: 8 - } - }, - nested: { - RateLimitUpdate: { - fields: { - rateLimit: { - type: "temporal.api.taskqueue.v1.RateLimit", - id: 1 - }, - reason: { - type: "string", - id: 2 - } - } - } - } - }, - UpdateTaskQueueConfigResponse: { - fields: { - config: { - type: "temporal.api.taskqueue.v1.TaskQueueConfig", - id: 1 - } - } - }, - FetchWorkerConfigRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - identity: { - type: "string", - id: 2 - }, - reason: { - type: "string", - id: 3 - }, - selector: { - type: "temporal.api.common.v1.WorkerSelector", - id: 6 - } - } - }, - FetchWorkerConfigResponse: { - fields: { - workerConfig: { - type: "temporal.api.sdk.v1.WorkerConfig", - id: 1 - } - } - }, - UpdateWorkerConfigRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - identity: { - type: "string", - id: 2 - }, - reason: { - type: "string", - id: 3 - }, - workerConfig: { - type: "temporal.api.sdk.v1.WorkerConfig", - id: 4 - }, - updateMask: { - type: "google.protobuf.FieldMask", - id: 5 - }, - selector: { - type: "temporal.api.common.v1.WorkerSelector", - id: 6 - } - } - }, - UpdateWorkerConfigResponse: { - oneofs: { - response: { - oneof: [ - "workerConfig" - ] - } - }, - fields: { - workerConfig: { - type: "temporal.api.sdk.v1.WorkerConfig", - id: 1 - } - } - }, - DescribeWorkerRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workerInstanceKey: { - type: "string", - id: 2 - } - } - }, - DescribeWorkerResponse: { - fields: { - workerInfo: { - type: "temporal.api.worker.v1.WorkerInfo", - id: 1 - } - } - }, - PauseWorkflowExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowId: { - type: "string", - id: 2 - }, - runId: { - type: "string", - id: 3 - }, - identity: { - type: "string", - id: 4 - }, - reason: { - type: "string", - id: 5 - }, - requestId: { - type: "string", - id: 6 - } - } - }, - PauseWorkflowExecutionResponse: { - fields: {} - }, - UnpauseWorkflowExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowId: { - type: "string", - id: 2 - }, - runId: { - type: "string", - id: 3 - }, - identity: { - type: "string", - id: 4 - }, - reason: { - type: "string", - id: 5 - }, - requestId: { - type: "string", - id: 6 - } - } - }, - UnpauseWorkflowExecutionResponse: { - fields: {} - }, - StartActivityExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - identity: { - type: "string", - id: 2 - }, - requestId: { - type: "string", - id: 3 - }, - activityId: { - type: "string", - id: 4 - }, - activityType: { - type: "temporal.api.common.v1.ActivityType", - id: 5 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 6 - }, - scheduleToCloseTimeout: { - type: "google.protobuf.Duration", - id: 7 - }, - scheduleToStartTimeout: { - type: "google.protobuf.Duration", - id: 8 - }, - startToCloseTimeout: { - type: "google.protobuf.Duration", - id: 9 - }, - heartbeatTimeout: { - type: "google.protobuf.Duration", - id: 10 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 11 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 12 - }, - idReusePolicy: { - type: "temporal.api.enums.v1.ActivityIdReusePolicy", - id: 13 - }, - idConflictPolicy: { - type: "temporal.api.enums.v1.ActivityIdConflictPolicy", - id: 14 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 15 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 16 - }, - userMetadata: { - type: "temporal.api.sdk.v1.UserMetadata", - id: 17 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 18 - } - } - }, - StartActivityExecutionResponse: { - fields: { - runId: { - type: "string", - id: 1 - }, - started: { - type: "bool", - id: 2 - } - } - }, - DescribeActivityExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - activityId: { - type: "string", - id: 2 - }, - runId: { - type: "string", - id: 3 - }, - includeInput: { - type: "bool", - id: 4 - }, - includeOutcome: { - type: "bool", - id: 5 - }, - longPollToken: { - type: "bytes", - id: 6 - } - } - }, - DescribeActivityExecutionResponse: { - fields: { - runId: { - type: "string", - id: 1 - }, - info: { - type: "temporal.api.activity.v1.ActivityExecutionInfo", - id: 2 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 3 - }, - outcome: { - type: "temporal.api.activity.v1.ActivityExecutionOutcome", - id: 4 - }, - longPollToken: { - type: "bytes", - id: 5 - } - } - }, - PollActivityExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - activityId: { - type: "string", - id: 2 - }, - runId: { - type: "string", - id: 3 - } - } - }, - PollActivityExecutionResponse: { - fields: { - runId: { - type: "string", - id: 1 - }, - outcome: { - type: "temporal.api.activity.v1.ActivityExecutionOutcome", - id: 2 - } - } - }, - ListActivityExecutionsRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - pageSize: { - type: "int32", - id: 2 - }, - nextPageToken: { - type: "bytes", - id: 3 - }, - query: { - type: "string", - id: 4 - } - } - }, - ListActivityExecutionsResponse: { - fields: { - executions: { - rule: "repeated", - type: "temporal.api.activity.v1.ActivityExecutionListInfo", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - } - } - }, - CountActivityExecutionsRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - query: { - type: "string", - id: 2 - } - } - }, - CountActivityExecutionsResponse: { - fields: { - count: { - type: "int64", - id: 1 - }, - groups: { - rule: "repeated", - type: "AggregationGroup", - id: 2 - } - }, - nested: { - AggregationGroup: { - fields: { - groupValues: { - rule: "repeated", - type: "temporal.api.common.v1.Payload", - id: 1 - }, - count: { - type: "int64", - id: 2 - } - } - } - } - }, - RequestCancelActivityExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - activityId: { - type: "string", - id: 2 - }, - runId: { - type: "string", - id: 3 - }, - identity: { - type: "string", - id: 4 - }, - requestId: { - type: "string", - id: 5 - }, - reason: { - type: "string", - id: 6 - } - } - }, - RequestCancelActivityExecutionResponse: { - fields: {} - }, - TerminateActivityExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - activityId: { - type: "string", - id: 2 - }, - runId: { - type: "string", - id: 3 - }, - identity: { - type: "string", - id: 4 - }, - requestId: { - type: "string", - id: 5 - }, - reason: { - type: "string", - id: 6 - } - } - }, - TerminateActivityExecutionResponse: { - fields: {} - }, - DeleteActivityExecutionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - activityId: { - type: "string", - id: 2 - }, - runId: { - type: "string", - id: 3 - } - } - }, - DeleteActivityExecutionResponse: { - fields: {} - }, - WorkflowService: { - methods: { - RegisterNamespace: { - requestType: "RegisterNamespaceRequest", - responseType: "RegisterNamespaceResponse", - options: { - "(google.api.http).post": "/cluster/namespaces", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cluster/namespaces", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces", - body: "*" - } - } - } - ] - }, - DescribeNamespace: { - requestType: "DescribeNamespaceRequest", - responseType: "DescribeNamespaceResponse", - options: { - "(google.api.http).get": "/cluster/namespaces/{namespace}", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cluster/namespaces/{namespace}", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}" - } - } - } - ] - }, - ListNamespaces: { - requestType: "ListNamespacesRequest", - responseType: "ListNamespacesResponse", - options: { - "(google.api.http).get": "/cluster/namespaces", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cluster/namespaces", - additional_bindings: { - get: "/api/v1/namespaces" - } - } - } - ] - }, - UpdateNamespace: { - requestType: "UpdateNamespaceRequest", - responseType: "UpdateNamespaceResponse", - options: { - "(google.api.http).post": "/cluster/namespaces/{namespace}/update", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/update", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cluster/namespaces/{namespace}/update", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/update", - body: "*" - } - } - } - ] - }, - DeprecateNamespace: { - requestType: "DeprecateNamespaceRequest", - responseType: "DeprecateNamespaceResponse" - }, - StartWorkflowExecution: { - requestType: "StartWorkflowExecutionRequest", - responseType: "StartWorkflowExecutionResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workflows/{workflow_id}", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{workflow_id}", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workflows/{workflow_id}", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}", - body: "*" - } - } - } - ] - }, - ExecuteMultiOperation: { - requestType: "ExecuteMultiOperationRequest", - responseType: "ExecuteMultiOperationResponse" - }, - GetWorkflowExecutionHistory: { - requestType: "GetWorkflowExecutionHistoryRequest", - responseType: "GetWorkflowExecutionHistoryResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/workflows/{execution.workflow_id}/history", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/workflows/{execution.workflow_id}/history", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history" - } - } - } - ] - }, - GetWorkflowExecutionHistoryReverse: { - requestType: "GetWorkflowExecutionHistoryReverseRequest", - responseType: "GetWorkflowExecutionHistoryReverseResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse" - } - } - } - ] - }, - PollWorkflowTaskQueue: { - requestType: "PollWorkflowTaskQueueRequest", - responseType: "PollWorkflowTaskQueueResponse" - }, - RespondWorkflowTaskCompleted: { - requestType: "RespondWorkflowTaskCompletedRequest", - responseType: "RespondWorkflowTaskCompletedResponse" - }, - RespondWorkflowTaskFailed: { - requestType: "RespondWorkflowTaskFailedRequest", - responseType: "RespondWorkflowTaskFailedResponse" - }, - PollActivityTaskQueue: { - requestType: "PollActivityTaskQueueRequest", - responseType: "PollActivityTaskQueueResponse" - }, - RecordActivityTaskHeartbeat: { - requestType: "RecordActivityTaskHeartbeatRequest", - responseType: "RecordActivityTaskHeartbeatResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activity-heartbeat", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/activity-heartbeat", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activity-heartbeat", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/activity-heartbeat", - body: "*" - } - } - } - ] - }, - RecordActivityTaskHeartbeatById: { - requestType: "RecordActivityTaskHeartbeatByIdRequest", - responseType: "RecordActivityTaskHeartbeatByIdResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activities/{activity_id}/heartbeat", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/heartbeat", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activities/{activity_id}/heartbeat", - body: "*", - additional_bindings: [ - { - post: "/api/v1/namespaces/{namespace}/activities/{activity_id}/heartbeat", - body: "*" - }, - { - post: "/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/heartbeat", - body: "*" - }, - { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/heartbeat", - body: "*" - } - ] - } - } - ] - }, - RespondActivityTaskCompleted: { - requestType: "RespondActivityTaskCompletedRequest", - responseType: "RespondActivityTaskCompletedResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activity-complete", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/activity-complete", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activity-complete", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/activity-complete", - body: "*" - } - } - } - ] - }, - RespondActivityTaskCompletedById: { - requestType: "RespondActivityTaskCompletedByIdRequest", - responseType: "RespondActivityTaskCompletedByIdResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activities/{activity_id}/complete", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/complete", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activities/{activity_id}/complete", - body: "*", - additional_bindings: [ - { - post: "/api/v1/namespaces/{namespace}/activities/{activity_id}/complete", - body: "*" - }, - { - post: "/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/complete", - body: "*" - }, - { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/complete", - body: "*" - } - ] - } - } - ] - }, - RespondActivityTaskFailed: { - requestType: "RespondActivityTaskFailedRequest", - responseType: "RespondActivityTaskFailedResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activity-fail", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/activity-fail", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activity-fail", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/activity-fail", - body: "*" - } - } - } - ] - }, - RespondActivityTaskFailedById: { - requestType: "RespondActivityTaskFailedByIdRequest", - responseType: "RespondActivityTaskFailedByIdResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activities/{activity_id}/fail", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/fail", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activities/{activity_id}/fail", - body: "*", - additional_bindings: [ - { - post: "/api/v1/namespaces/{namespace}/activities/{activity_id}/fail", - body: "*" - }, - { - post: "/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/fail", - body: "*" - }, - { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/fail", - body: "*" - } - ] - } - } - ] - }, - RespondActivityTaskCanceled: { - requestType: "RespondActivityTaskCanceledRequest", - responseType: "RespondActivityTaskCanceledResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activity-resolve-as-canceled", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/activity-resolve-as-canceled", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activity-resolve-as-canceled", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/activity-resolve-as-canceled", - body: "*" - } - } - } - ] - }, - RespondActivityTaskCanceledById: { - requestType: "RespondActivityTaskCanceledByIdRequest", - responseType: "RespondActivityTaskCanceledByIdResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activities/{activity_id}/resolve-as-canceled", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/resolve-as-canceled", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activities/{activity_id}/resolve-as-canceled", - body: "*", - additional_bindings: [ - { - post: "/api/v1/namespaces/{namespace}/activities/{activity_id}/resolve-as-canceled", - body: "*" - }, - { - post: "/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/resolve-as-canceled", - body: "*" - }, - { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/resolve-as-canceled", - body: "*" - } - ] - } - } - ] - }, - RequestCancelWorkflowExecution: { - requestType: "RequestCancelWorkflowExecutionRequest", - responseType: "RequestCancelWorkflowExecutionResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel", - body: "*" - } - } - } - ] - }, - SignalWorkflowExecution: { - requestType: "SignalWorkflowExecutionRequest", - responseType: "SignalWorkflowExecutionResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/signal/{signal_name}", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/signal/{signal_name}", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/signal/{signal_name}", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/signal/{signal_name}", - body: "*" - } - } - } - ] - }, - SignalWithStartWorkflowExecution: { - requestType: "SignalWithStartWorkflowExecutionRequest", - responseType: "SignalWithStartWorkflowExecutionResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workflows/{workflow_id}/signal-with-start/{signal_name}", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/signal-with-start/{signal_name}", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workflows/{workflow_id}/signal-with-start/{signal_name}", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/signal-with-start/{signal_name}", - body: "*" - } - } - } - ] - }, - ResetWorkflowExecution: { - requestType: "ResetWorkflowExecutionRequest", - responseType: "ResetWorkflowExecutionResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset", - body: "*" - } - } - } - ] - }, - TerminateWorkflowExecution: { - requestType: "TerminateWorkflowExecutionRequest", - responseType: "TerminateWorkflowExecutionResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/terminate", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/terminate", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/terminate", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/terminate", - body: "*" - } - } - } - ] - }, - DeleteWorkflowExecution: { - requestType: "DeleteWorkflowExecutionRequest", - responseType: "DeleteWorkflowExecutionResponse" - }, - ListOpenWorkflowExecutions: { - requestType: "ListOpenWorkflowExecutionsRequest", - responseType: "ListOpenWorkflowExecutionsResponse" - }, - ListClosedWorkflowExecutions: { - requestType: "ListClosedWorkflowExecutionsRequest", - responseType: "ListClosedWorkflowExecutionsResponse" - }, - ListWorkflowExecutions: { - requestType: "ListWorkflowExecutionsRequest", - responseType: "ListWorkflowExecutionsResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/workflows", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/workflows" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/workflows", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/workflows" - } - } - } - ] - }, - ListArchivedWorkflowExecutions: { - requestType: "ListArchivedWorkflowExecutionsRequest", - responseType: "ListArchivedWorkflowExecutionsResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/archived-workflows", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/archived-workflows" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/archived-workflows", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/archived-workflows" - } - } - } - ] - }, - ScanWorkflowExecutions: { - requestType: "ScanWorkflowExecutionsRequest", - responseType: "ScanWorkflowExecutionsResponse" - }, - CountWorkflowExecutions: { - requestType: "CountWorkflowExecutionsRequest", - responseType: "CountWorkflowExecutionsResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/workflow-count", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/workflow-count" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/workflow-count", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/workflow-count" - } - } - } - ] - }, - GetSearchAttributes: { - requestType: "GetSearchAttributesRequest", - responseType: "GetSearchAttributesResponse" - }, - RespondQueryTaskCompleted: { - requestType: "RespondQueryTaskCompletedRequest", - responseType: "RespondQueryTaskCompletedResponse" - }, - ResetStickyTaskQueue: { - requestType: "ResetStickyTaskQueueRequest", - responseType: "ResetStickyTaskQueueResponse" - }, - ShutdownWorker: { - requestType: "ShutdownWorkerRequest", - responseType: "ShutdownWorkerResponse" - }, - QueryWorkflow: { - requestType: "QueryWorkflowRequest", - responseType: "QueryWorkflowResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}", - body: "*" - } - } - } - ] - }, - DescribeWorkflowExecution: { - requestType: "DescribeWorkflowExecutionRequest", - responseType: "DescribeWorkflowExecutionResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/workflows/{execution.workflow_id}", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/workflows/{execution.workflow_id}", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}" - } - } - } - ] - }, - DescribeTaskQueue: { - requestType: "DescribeTaskQueueRequest", - responseType: "DescribeTaskQueueResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/task-queues/{task_queue.name}", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/task-queues/{task_queue.name}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/task-queues/{task_queue.name}", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/task-queues/{task_queue.name}" - } - } - } - ] - }, - GetClusterInfo: { - requestType: "GetClusterInfoRequest", - responseType: "GetClusterInfoResponse", - options: { - "(google.api.http).get": "/cluster", - "(google.api.http).additional_bindings.get": "/api/v1/cluster-info" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cluster", - additional_bindings: { - get: "/api/v1/cluster-info" - } - } - } - ] - }, - GetSystemInfo: { - requestType: "GetSystemInfoRequest", - responseType: "GetSystemInfoResponse", - options: { - "(google.api.http).get": "/system-info", - "(google.api.http).additional_bindings.get": "/api/v1/system-info" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/system-info", - additional_bindings: { - get: "/api/v1/system-info" - } - } - } - ] - }, - ListTaskQueuePartitions: { - requestType: "ListTaskQueuePartitionsRequest", - responseType: "ListTaskQueuePartitionsResponse" - }, - CreateSchedule: { - requestType: "CreateScheduleRequest", - responseType: "CreateScheduleResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/schedules/{schedule_id}", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/schedules/{schedule_id}", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/schedules/{schedule_id}", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/schedules/{schedule_id}", - body: "*" - } - } - } - ] - }, - DescribeSchedule: { - requestType: "DescribeScheduleRequest", - responseType: "DescribeScheduleResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/schedules/{schedule_id}", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/schedules/{schedule_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/schedules/{schedule_id}", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/schedules/{schedule_id}" - } - } - } - ] - }, - UpdateSchedule: { - requestType: "UpdateScheduleRequest", - responseType: "UpdateScheduleResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/schedules/{schedule_id}/update", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/schedules/{schedule_id}/update", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/schedules/{schedule_id}/update", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/schedules/{schedule_id}/update", - body: "*" - } - } - } - ] - }, - PatchSchedule: { - requestType: "PatchScheduleRequest", - responseType: "PatchScheduleResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/schedules/{schedule_id}/patch", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/schedules/{schedule_id}/patch", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/schedules/{schedule_id}/patch", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/schedules/{schedule_id}/patch", - body: "*" - } - } - } - ] - }, - ListScheduleMatchingTimes: { - requestType: "ListScheduleMatchingTimesRequest", - responseType: "ListScheduleMatchingTimesResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/schedules/{schedule_id}/matching-times", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/schedules/{schedule_id}/matching-times" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/schedules/{schedule_id}/matching-times", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/schedules/{schedule_id}/matching-times" - } - } - } - ] - }, - DeleteSchedule: { - requestType: "DeleteScheduleRequest", - responseType: "DeleteScheduleResponse", - options: { - "(google.api.http).delete": "/namespaces/{namespace}/schedules/{schedule_id}", - "(google.api.http).additional_bindings.delete": "/api/v1/namespaces/{namespace}/schedules/{schedule_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - "delete": "/namespaces/{namespace}/schedules/{schedule_id}", - additional_bindings: { - "delete": "/api/v1/namespaces/{namespace}/schedules/{schedule_id}" - } - } - } - ] - }, - ListSchedules: { - requestType: "ListSchedulesRequest", - responseType: "ListSchedulesResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/schedules", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/schedules" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/schedules", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/schedules" - } - } - } - ] - }, - CountSchedules: { - requestType: "CountSchedulesRequest", - responseType: "CountSchedulesResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/schedule-count", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/schedule-count" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/schedule-count", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/schedule-count" - } - } - } - ] - }, - UpdateWorkerBuildIdCompatibility: { - requestType: "UpdateWorkerBuildIdCompatibilityRequest", - responseType: "UpdateWorkerBuildIdCompatibilityResponse" - }, - GetWorkerBuildIdCompatibility: { - requestType: "GetWorkerBuildIdCompatibilityRequest", - responseType: "GetWorkerBuildIdCompatibilityResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/task-queues/{task_queue}/worker-build-id-compatibility", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/task-queues/{task_queue}/worker-build-id-compatibility" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/task-queues/{task_queue}/worker-build-id-compatibility", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/task-queues/{task_queue}/worker-build-id-compatibility" - } - } - } - ] - }, - UpdateWorkerVersioningRules: { - requestType: "UpdateWorkerVersioningRulesRequest", - responseType: "UpdateWorkerVersioningRulesResponse" - }, - GetWorkerVersioningRules: { - requestType: "GetWorkerVersioningRulesRequest", - responseType: "GetWorkerVersioningRulesResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/task-queues/{task_queue}/worker-versioning-rules", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/task-queues/{task_queue}/worker-versioning-rules" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/task-queues/{task_queue}/worker-versioning-rules", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/task-queues/{task_queue}/worker-versioning-rules" - } - } - } - ] - }, - GetWorkerTaskReachability: { - requestType: "GetWorkerTaskReachabilityRequest", - responseType: "GetWorkerTaskReachabilityResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/worker-task-reachability", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/worker-task-reachability" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/worker-task-reachability", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/worker-task-reachability" - } - } - } - ] - }, - DescribeDeployment: { - requestType: "DescribeDeploymentRequest", - responseType: "DescribeDeploymentResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}" - } - } - } - ] - }, - DescribeWorkerDeploymentVersion: { - requestType: "DescribeWorkerDeploymentVersionRequest", - responseType: "DescribeWorkerDeploymentVersionResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}" - } - } - } - ] - }, - ListDeployments: { - requestType: "ListDeploymentsRequest", - responseType: "ListDeploymentsResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/deployments", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/deployments" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/deployments", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/deployments" - } - } - } - ] - }, - GetDeploymentReachability: { - requestType: "GetDeploymentReachabilityRequest", - responseType: "GetDeploymentReachabilityResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}/reachability", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}/reachability" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}/reachability", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}/reachability" - } - } - } - ] - }, - GetCurrentDeployment: { - requestType: "GetCurrentDeploymentRequest", - responseType: "GetCurrentDeploymentResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/current-deployment/{series_name}", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/current-deployment/{series_name}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/current-deployment/{series_name}", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/current-deployment/{series_name}" - } - } - } - ] - }, - SetCurrentDeployment: { - requestType: "SetCurrentDeploymentRequest", - responseType: "SetCurrentDeploymentResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/current-deployment/{deployment.series_name}", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/current-deployment/{deployment.series_name}", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/current-deployment/{deployment.series_name}", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/current-deployment/{deployment.series_name}", - body: "*" - } - } - } - ] - }, - SetWorkerDeploymentCurrentVersion: { - requestType: "SetWorkerDeploymentCurrentVersionRequest", - responseType: "SetWorkerDeploymentCurrentVersionResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/worker-deployments/{deployment_name}/set-current-version", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}/set-current-version", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/worker-deployments/{deployment_name}/set-current-version", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}/set-current-version", - body: "*" - } - } - } - ] - }, - DescribeWorkerDeployment: { - requestType: "DescribeWorkerDeploymentRequest", - responseType: "DescribeWorkerDeploymentResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/worker-deployments/{deployment_name}", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/worker-deployments/{deployment_name}", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}" - } - } - } - ] - }, - DeleteWorkerDeployment: { - requestType: "DeleteWorkerDeploymentRequest", - responseType: "DeleteWorkerDeploymentResponse", - options: { - "(google.api.http).delete": "/namespaces/{namespace}/worker-deployments/{deployment_name}", - "(google.api.http).additional_bindings.delete": "/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}" - }, - parsedOptions: [ - { - "(google.api.http)": { - "delete": "/namespaces/{namespace}/worker-deployments/{deployment_name}", - additional_bindings: { - "delete": "/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}" - } - } - } - ] - }, - DeleteWorkerDeploymentVersion: { - requestType: "DeleteWorkerDeploymentVersionRequest", - responseType: "DeleteWorkerDeploymentVersionResponse", - options: { - "(google.api.http).delete": "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}", - "(google.api.http).additional_bindings.delete": "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - "delete": "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}", - additional_bindings: { - "delete": "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}" - } - } - } - ] - }, - SetWorkerDeploymentRampingVersion: { - requestType: "SetWorkerDeploymentRampingVersionRequest", - responseType: "SetWorkerDeploymentRampingVersionResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/worker-deployments/{deployment_name}/set-ramping-version", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}/set-ramping-version", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/worker-deployments/{deployment_name}/set-ramping-version", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}/set-ramping-version", - body: "*" - } - } - } - ] - }, - ListWorkerDeployments: { - requestType: "ListWorkerDeploymentsRequest", - responseType: "ListWorkerDeploymentsResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/worker-deployments", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/worker-deployments" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/worker-deployments", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/worker-deployments" - } - } - } - ] - }, - UpdateWorkerDeploymentVersionMetadata: { - requestType: "UpdateWorkerDeploymentVersionMetadataRequest", - responseType: "UpdateWorkerDeploymentVersionMetadataResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata", - body: "*" - } - } - } - ] - }, - SetWorkerDeploymentManager: { - requestType: "SetWorkerDeploymentManagerRequest", - responseType: "SetWorkerDeploymentManagerResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/worker-deployments/{deployment_name}/set-manager", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}/set-manager", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/worker-deployments/{deployment_name}/set-manager", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}/set-manager", - body: "*" - } - } - } - ] - }, - UpdateWorkflowExecution: { - requestType: "UpdateWorkflowExecutionRequest", - responseType: "UpdateWorkflowExecutionResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update/{request.input.name}", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update/{request.input.name}", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update/{request.input.name}", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update/{request.input.name}", - body: "*" - } - } - } - ] - }, - PollWorkflowExecutionUpdate: { - requestType: "PollWorkflowExecutionUpdateRequest", - responseType: "PollWorkflowExecutionUpdateResponse" - }, - StartBatchOperation: { - requestType: "StartBatchOperationRequest", - responseType: "StartBatchOperationResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/batch-operations/{job_id}", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/batch-operations/{job_id}", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/batch-operations/{job_id}", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/batch-operations/{job_id}", - body: "*" - } - } - } - ] - }, - StopBatchOperation: { - requestType: "StopBatchOperationRequest", - responseType: "StopBatchOperationResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/batch-operations/{job_id}/stop", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/batch-operations/{job_id}/stop", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/batch-operations/{job_id}/stop", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/batch-operations/{job_id}/stop", - body: "*" - } - } - } - ] - }, - DescribeBatchOperation: { - requestType: "DescribeBatchOperationRequest", - responseType: "DescribeBatchOperationResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/batch-operations/{job_id}", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/batch-operations/{job_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/batch-operations/{job_id}", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/batch-operations/{job_id}" - } - } - } - ] - }, - ListBatchOperations: { - requestType: "ListBatchOperationsRequest", - responseType: "ListBatchOperationsResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/batch-operations", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/batch-operations" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/batch-operations", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/batch-operations" - } - } - } - ] - }, - PollNexusTaskQueue: { - requestType: "PollNexusTaskQueueRequest", - responseType: "PollNexusTaskQueueResponse" - }, - RespondNexusTaskCompleted: { - requestType: "RespondNexusTaskCompletedRequest", - responseType: "RespondNexusTaskCompletedResponse" - }, - RespondNexusTaskFailed: { - requestType: "RespondNexusTaskFailedRequest", - responseType: "RespondNexusTaskFailedResponse" - }, - UpdateActivityOptions: { - requestType: "UpdateActivityOptionsRequest", - responseType: "UpdateActivityOptionsResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activities-deprecated/update-options", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/activities-deprecated/update-options", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activities-deprecated/update-options", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/activities-deprecated/update-options", - body: "*" - } - } - } - ] - }, - UpdateWorkflowExecutionOptions: { - requestType: "UpdateWorkflowExecutionOptionsRequest", - responseType: "UpdateWorkflowExecutionOptionsResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update-options", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update-options", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update-options", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update-options", - body: "*" - } - } - } - ] - }, - PauseActivity: { - requestType: "PauseActivityRequest", - responseType: "PauseActivityResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activities-deprecated/pause", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/activities-deprecated/pause", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activities-deprecated/pause", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/activities-deprecated/pause", - body: "*" - } - } - } - ] - }, - UnpauseActivity: { - requestType: "UnpauseActivityRequest", - responseType: "UnpauseActivityResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activities-deprecated/unpause", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/activities-deprecated/unpause", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activities-deprecated/unpause", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/activities-deprecated/unpause", - body: "*" - } - } - } - ] - }, - ResetActivity: { - requestType: "ResetActivityRequest", - responseType: "ResetActivityResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activities-deprecated/reset", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/activities-deprecated/reset", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activities-deprecated/reset", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/activities-deprecated/reset", - body: "*" - } - } - } - ] - }, - CreateWorkflowRule: { - requestType: "CreateWorkflowRuleRequest", - responseType: "CreateWorkflowRuleResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workflow-rules", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflow-rules", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workflow-rules", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workflow-rules", - body: "*" - } - } - } - ] - }, - DescribeWorkflowRule: { - requestType: "DescribeWorkflowRuleRequest", - responseType: "DescribeWorkflowRuleResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/workflow-rules/{rule_id}", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/workflow-rules/{rule_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/workflow-rules/{rule_id}", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/workflow-rules/{rule_id}" - } - } - } - ] - }, - DeleteWorkflowRule: { - requestType: "DeleteWorkflowRuleRequest", - responseType: "DeleteWorkflowRuleResponse", - options: { - "(google.api.http).delete": "/namespaces/{namespace}/workflow-rules/{rule_id}", - "(google.api.http).additional_bindings.delete": "/api/v1/namespaces/{namespace}/workflow-rules/{rule_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - "delete": "/namespaces/{namespace}/workflow-rules/{rule_id}", - additional_bindings: { - "delete": "/api/v1/namespaces/{namespace}/workflow-rules/{rule_id}" - } - } - } - ] - }, - ListWorkflowRules: { - requestType: "ListWorkflowRulesRequest", - responseType: "ListWorkflowRulesResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/workflow-rules", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/workflow-rules" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/workflow-rules", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/workflow-rules" - } - } - } - ] - }, - TriggerWorkflowRule: { - requestType: "TriggerWorkflowRuleRequest", - responseType: "TriggerWorkflowRuleResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workflows/{execution.workflow_id}/trigger-rule", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/trigger-rule", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workflows/{execution.workflow_id}/trigger-rule", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/trigger-rule", - body: "*" - } - } - } - ] - }, - RecordWorkerHeartbeat: { - requestType: "RecordWorkerHeartbeatRequest", - responseType: "RecordWorkerHeartbeatResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workers/heartbeat", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workers/heartbeat", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workers/heartbeat", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workers/heartbeat", - body: "*" - } - } - } - ] - }, - ListWorkers: { - requestType: "ListWorkersRequest", - responseType: "ListWorkersResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/workers", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/workers" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/workers", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/workers" - } - } - } - ] - }, - UpdateTaskQueueConfig: { - requestType: "UpdateTaskQueueConfigRequest", - responseType: "UpdateTaskQueueConfigResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/task-queues/{task_queue}/update-config", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/task-queues/{task_queue}/update-config", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/task-queues/{task_queue}/update-config", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/task-queues/{task_queue}/update-config", - body: "*" - } - } - } - ] - }, - FetchWorkerConfig: { - requestType: "FetchWorkerConfigRequest", - responseType: "FetchWorkerConfigResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workers/fetch-config", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workers/fetch-config", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workers/fetch-config", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workers/fetch-config", - body: "*" - } - } - } - ] - }, - UpdateWorkerConfig: { - requestType: "UpdateWorkerConfigRequest", - responseType: "UpdateWorkerConfigResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workers/update-config", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workers/update-config", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workers/update-config", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workers/update-config", - body: "*" - } - } - } - ] - }, - DescribeWorker: { - requestType: "DescribeWorkerRequest", - responseType: "DescribeWorkerResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/workers/describe/{worker_instance_key}", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/workers/describe/{worker_instance_key}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/workers/describe/{worker_instance_key}", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/workers/describe/{worker_instance_key}" - } - } - } - ] - }, - PauseWorkflowExecution: { - requestType: "PauseWorkflowExecutionRequest", - responseType: "PauseWorkflowExecutionResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workflows/{workflow_id}/pause", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/pause", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workflows/{workflow_id}/pause", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/pause", - body: "*" - } - } - } - ] - }, - UnpauseWorkflowExecution: { - requestType: "UnpauseWorkflowExecutionRequest", - responseType: "UnpauseWorkflowExecutionResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/workflows/{workflow_id}/unpause", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/unpause", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/workflows/{workflow_id}/unpause", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/unpause", - body: "*" - } - } - } - ] - }, - StartActivityExecution: { - requestType: "StartActivityExecutionRequest", - responseType: "StartActivityExecutionResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activities/{activity_id}", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/activities/{activity_id}", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activities/{activity_id}", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/activities/{activity_id}", - body: "*" - } - } - } - ] - }, - DescribeActivityExecution: { - requestType: "DescribeActivityExecutionRequest", - responseType: "DescribeActivityExecutionResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/activities/{activity_id}", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/activities/{activity_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/activities/{activity_id}", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/activities/{activity_id}" - } - } - } - ] - }, - PollActivityExecution: { - requestType: "PollActivityExecutionRequest", - responseType: "PollActivityExecutionResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/activities/{activity_id}/outcome", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/activities/{activity_id}/outcome" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/activities/{activity_id}/outcome", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/activities/{activity_id}/outcome" - } - } - } - ] - }, - ListActivityExecutions: { - requestType: "ListActivityExecutionsRequest", - responseType: "ListActivityExecutionsResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/activities", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/activities" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/activities", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/activities" - } - } - } - ] - }, - CountActivityExecutions: { - requestType: "CountActivityExecutionsRequest", - responseType: "CountActivityExecutionsResponse", - options: { - "(google.api.http).get": "/namespaces/{namespace}/activity-count", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/activity-count" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/namespaces/{namespace}/activity-count", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/activity-count" - } - } - } - ] - }, - RequestCancelActivityExecution: { - requestType: "RequestCancelActivityExecutionRequest", - responseType: "RequestCancelActivityExecutionResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activities/{activity_id}/cancel", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/activities/{activity_id}/cancel", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activities/{activity_id}/cancel", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/activities/{activity_id}/cancel", - body: "*" - } - } - } - ] - }, - TerminateActivityExecution: { - requestType: "TerminateActivityExecutionRequest", - responseType: "TerminateActivityExecutionResponse", - options: { - "(google.api.http).post": "/namespaces/{namespace}/activities/{activity_id}/terminate", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/namespaces/{namespace}/activities/{activity_id}/terminate", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/namespaces/{namespace}/activities/{activity_id}/terminate", - body: "*", - additional_bindings: { - post: "/api/v1/namespaces/{namespace}/activities/{activity_id}/terminate", - body: "*" - } - } - } - ] - }, - DeleteActivityExecution: { - requestType: "DeleteActivityExecutionRequest", - responseType: "DeleteActivityExecutionResponse" - } - } - } - } - } - } - }, - activity: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/activity/v1;activity", - java_package: "io.temporal.api.activity.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Activity::V1", - csharp_namespace: "Temporalio.Api.Activity.V1" - }, - nested: { - ActivityExecutionOutcome: { - oneofs: { - value: { - oneof: [ - "result", - "failure" - ] - } - }, - fields: { - result: { - type: "temporal.api.common.v1.Payloads", - id: 1 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 2 - } - } - }, - ActivityOptions: { - fields: { - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 1 - }, - scheduleToCloseTimeout: { - type: "google.protobuf.Duration", - id: 2 - }, - scheduleToStartTimeout: { - type: "google.protobuf.Duration", - id: 3 - }, - startToCloseTimeout: { - type: "google.protobuf.Duration", - id: 4 - }, - heartbeatTimeout: { - type: "google.protobuf.Duration", - id: 5 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 6 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 7 - } - } - }, - ActivityExecutionInfo: { - fields: { - activityId: { - type: "string", - id: 1 - }, - runId: { - type: "string", - id: 2 - }, - activityType: { - type: "temporal.api.common.v1.ActivityType", - id: 3 - }, - status: { - type: "temporal.api.enums.v1.ActivityExecutionStatus", - id: 4 - }, - runState: { - type: "temporal.api.enums.v1.PendingActivityState", - id: 5 - }, - taskQueue: { - type: "string", - id: 6 - }, - scheduleToCloseTimeout: { - type: "google.protobuf.Duration", - id: 7 - }, - scheduleToStartTimeout: { - type: "google.protobuf.Duration", - id: 8 - }, - startToCloseTimeout: { - type: "google.protobuf.Duration", - id: 9 - }, - heartbeatTimeout: { - type: "google.protobuf.Duration", - id: 10 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 11 - }, - heartbeatDetails: { - type: "temporal.api.common.v1.Payloads", - id: 12 - }, - lastHeartbeatTime: { - type: "google.protobuf.Timestamp", - id: 13 - }, - lastStartedTime: { - type: "google.protobuf.Timestamp", - id: 14 - }, - attempt: { - type: "int32", - id: 15 - }, - executionDuration: { - type: "google.protobuf.Duration", - id: 16 - }, - scheduleTime: { - type: "google.protobuf.Timestamp", - id: 17 - }, - expirationTime: { - type: "google.protobuf.Timestamp", - id: 18 - }, - closeTime: { - type: "google.protobuf.Timestamp", - id: 19 - }, - lastFailure: { - type: "temporal.api.failure.v1.Failure", - id: 20 - }, - lastWorkerIdentity: { - type: "string", - id: 21 - }, - currentRetryInterval: { - type: "google.protobuf.Duration", - id: 22 - }, - lastAttemptCompleteTime: { - type: "google.protobuf.Timestamp", - id: 23 - }, - nextAttemptScheduleTime: { - type: "google.protobuf.Timestamp", - id: 24 - }, - lastDeploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 25 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 26 - }, - stateTransitionCount: { - type: "int64", - id: 27 - }, - stateSizeBytes: { - type: "int64", - id: 28 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 29 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 30 - }, - userMetadata: { - type: "temporal.api.sdk.v1.UserMetadata", - id: 31 - }, - canceledReason: { - type: "string", - id: 32 - } - } - }, - ActivityExecutionListInfo: { - fields: { - activityId: { - type: "string", - id: 1 - }, - runId: { - type: "string", - id: 2 - }, - activityType: { - type: "temporal.api.common.v1.ActivityType", - id: 3 - }, - scheduleTime: { - type: "google.protobuf.Timestamp", - id: 4 - }, - closeTime: { - type: "google.protobuf.Timestamp", - id: 5 - }, - status: { - type: "temporal.api.enums.v1.ActivityExecutionStatus", - id: 6 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 7 - }, - taskQueue: { - type: "string", - id: 8 - }, - stateTransitionCount: { - type: "int64", - id: 9 - }, - stateSizeBytes: { - type: "int64", - id: 10 - }, - executionDuration: { - type: "google.protobuf.Duration", - id: 11 - } - } - } - } - } - } - }, - deployment: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/deployment/v1;deployment", - java_package: "io.temporal.api.deployment.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Deployment::V1", - csharp_namespace: "Temporalio.Api.Deployment.V1" - }, - nested: { - WorkerDeploymentOptions: { - fields: { - deploymentName: { - type: "string", - id: 1 - }, - buildId: { - type: "string", - id: 2 - }, - workerVersioningMode: { - type: "temporal.api.enums.v1.WorkerVersioningMode", - id: 3 - } - } - }, - Deployment: { - fields: { - seriesName: { - type: "string", - id: 1 - }, - buildId: { - type: "string", - id: 2 - } - } - }, - DeploymentInfo: { - fields: { - deployment: { - type: "Deployment", - id: 1 - }, - createTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - taskQueueInfos: { - rule: "repeated", - type: "TaskQueueInfo", - id: 3 - }, - metadata: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 4 - }, - isCurrent: { - type: "bool", - id: 5 - } - }, - nested: { - TaskQueueInfo: { - fields: { - name: { - type: "string", - id: 1 - }, - type: { - type: "temporal.api.enums.v1.TaskQueueType", - id: 2 - }, - firstPollerTime: { - type: "google.protobuf.Timestamp", - id: 3 - } - } - } - } - }, - UpdateDeploymentMetadata: { - fields: { - upsertEntries: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 1 - }, - removeEntries: { - rule: "repeated", - type: "string", - id: 2 - } - } - }, - DeploymentListInfo: { - fields: { - deployment: { - type: "deployment.v1.Deployment", - id: 1 - }, - createTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - isCurrent: { - type: "bool", - id: 3 - } - } - }, - WorkerDeploymentVersionInfo: { - fields: { - version: { - type: "string", - id: 1, - options: { - deprecated: true - } - }, - status: { - type: "temporal.api.enums.v1.WorkerDeploymentVersionStatus", - id: 14 - }, - deploymentVersion: { - type: "WorkerDeploymentVersion", - id: 11 - }, - deploymentName: { - type: "string", - id: 2 - }, - createTime: { - type: "google.protobuf.Timestamp", - id: 3 - }, - routingChangedTime: { - type: "google.protobuf.Timestamp", - id: 4 - }, - currentSinceTime: { - type: "google.protobuf.Timestamp", - id: 5 - }, - rampingSinceTime: { - type: "google.protobuf.Timestamp", - id: 6 - }, - firstActivationTime: { - type: "google.protobuf.Timestamp", - id: 12 - }, - lastCurrentTime: { - type: "google.protobuf.Timestamp", - id: 15 - }, - lastDeactivationTime: { - type: "google.protobuf.Timestamp", - id: 13 - }, - rampPercentage: { - type: "float", - id: 7 - }, - taskQueueInfos: { - rule: "repeated", - type: "VersionTaskQueueInfo", - id: 8 - }, - drainageInfo: { - type: "VersionDrainageInfo", - id: 9 - }, - metadata: { - type: "VersionMetadata", - id: 10 - } - }, - nested: { - VersionTaskQueueInfo: { - fields: { - name: { - type: "string", - id: 1 - }, - type: { - type: "temporal.api.enums.v1.TaskQueueType", - id: 2 - } - } - } - } - }, - VersionDrainageInfo: { - fields: { - status: { - type: "enums.v1.VersionDrainageStatus", - id: 1 - }, - lastChangedTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - lastCheckedTime: { - type: "google.protobuf.Timestamp", - id: 3 - } - } - }, - WorkerDeploymentInfo: { - fields: { - name: { - type: "string", - id: 1 - }, - versionSummaries: { - rule: "repeated", - type: "WorkerDeploymentVersionSummary", - id: 2 - }, - createTime: { - type: "google.protobuf.Timestamp", - id: 3 - }, - routingConfig: { - type: "RoutingConfig", - id: 4 - }, - lastModifierIdentity: { - type: "string", - id: 5 - }, - managerIdentity: { - type: "string", - id: 6 - }, - routingConfigUpdateState: { - type: "temporal.api.enums.v1.RoutingConfigUpdateState", - id: 7 - } - }, - nested: { - WorkerDeploymentVersionSummary: { - fields: { - version: { - type: "string", - id: 1, - options: { - deprecated: true - } - }, - status: { - type: "temporal.api.enums.v1.WorkerDeploymentVersionStatus", - id: 11 - }, - deploymentVersion: { - type: "WorkerDeploymentVersion", - id: 4 - }, - createTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - drainageStatus: { - type: "enums.v1.VersionDrainageStatus", - id: 3 - }, - drainageInfo: { - type: "VersionDrainageInfo", - id: 5 - }, - currentSinceTime: { - type: "google.protobuf.Timestamp", - id: 6 - }, - rampingSinceTime: { - type: "google.protobuf.Timestamp", - id: 7 - }, - routingUpdateTime: { - type: "google.protobuf.Timestamp", - id: 8 - }, - firstActivationTime: { - type: "google.protobuf.Timestamp", - id: 9 - }, - lastCurrentTime: { - type: "google.protobuf.Timestamp", - id: 12 - }, - lastDeactivationTime: { - type: "google.protobuf.Timestamp", - id: 10 - } - } - } - } - }, - WorkerDeploymentVersion: { - fields: { - buildId: { - type: "string", - id: 1 - }, - deploymentName: { - type: "string", - id: 2 - } - } - }, - VersionMetadata: { - fields: { - entries: { - keyType: "string", - type: "temporal.api.common.v1.Payload", - id: 1 - } - } - }, - RoutingConfig: { - fields: { - currentDeploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 7 - }, - currentVersion: { - type: "string", - id: 1, - options: { - deprecated: true - } - }, - rampingDeploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 9 - }, - rampingVersion: { - type: "string", - id: 2, - options: { - deprecated: true - } - }, - rampingVersionPercentage: { - type: "float", - id: 3 - }, - currentVersionChangedTime: { - type: "google.protobuf.Timestamp", - id: 4 - }, - rampingVersionChangedTime: { - type: "google.protobuf.Timestamp", - id: 5 - }, - rampingVersionPercentageChangedTime: { - type: "google.protobuf.Timestamp", - id: 6 - }, - revisionNumber: { - type: "int64", - id: 10 - } - } - }, - InheritedAutoUpgradeInfo: { - fields: { - sourceDeploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 1 - }, - sourceDeploymentRevisionNumber: { - type: "int64", - id: 2 - } - } - } - } - } - } - }, - taskqueue: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/taskqueue/v1;taskqueue", - java_package: "io.temporal.api.taskqueue.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::TaskQueue::V1", - csharp_namespace: "Temporalio.Api.TaskQueue.V1" - }, - nested: { - TaskQueue: { - fields: { - name: { - type: "string", - id: 1 - }, - kind: { - type: "temporal.api.enums.v1.TaskQueueKind", - id: 2 - }, - normalName: { - type: "string", - id: 3 - } - } - }, - TaskQueueMetadata: { - fields: { - maxTasksPerSecond: { - type: "google.protobuf.DoubleValue", - id: 1 - } - } - }, - TaskQueueVersioningInfo: { - fields: { - currentDeploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 7 - }, - currentVersion: { - type: "string", - id: 1, - options: { - deprecated: true - } - }, - rampingDeploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 9 - }, - rampingVersion: { - type: "string", - id: 2, - options: { - deprecated: true - } - }, - rampingVersionPercentage: { - type: "float", - id: 3 - }, - updateTime: { - type: "google.protobuf.Timestamp", - id: 4 - } - } - }, - TaskQueueVersionSelection: { - fields: { - buildIds: { - rule: "repeated", - type: "string", - id: 1 - }, - unversioned: { - type: "bool", - id: 2 - }, - allActive: { - type: "bool", - id: 3 - } - } - }, - TaskQueueVersionInfo: { - fields: { - typesInfo: { - keyType: "int32", - type: "TaskQueueTypeInfo", - id: 1 - }, - taskReachability: { - type: "temporal.api.enums.v1.BuildIdTaskReachability", - id: 2 - } - } - }, - TaskQueueTypeInfo: { - fields: { - pollers: { - rule: "repeated", - type: "PollerInfo", - id: 1 - }, - stats: { - type: "TaskQueueStats", - id: 2 - } - } - }, - TaskQueueStats: { - fields: { - approximateBacklogCount: { - type: "int64", - id: 1 - }, - approximateBacklogAge: { - type: "google.protobuf.Duration", - id: 2 - }, - tasksAddRate: { - type: "float", - id: 3 - }, - tasksDispatchRate: { - type: "float", - id: 4 - } - } - }, - TaskQueueStatus: { - fields: { - backlogCountHint: { - type: "int64", - id: 1 - }, - readLevel: { - type: "int64", - id: 2 - }, - ackLevel: { - type: "int64", - id: 3 - }, - ratePerSecond: { - type: "double", - id: 4 - }, - taskIdBlock: { - type: "TaskIdBlock", - id: 5 - } - } - }, - TaskIdBlock: { - fields: { - startId: { - type: "int64", - id: 1 - }, - endId: { - type: "int64", - id: 2 - } - } - }, - TaskQueuePartitionMetadata: { - fields: { - key: { - type: "string", - id: 1 - }, - ownerHostName: { - type: "string", - id: 2 - } - } - }, - PollerInfo: { - fields: { - lastAccessTime: { - type: "google.protobuf.Timestamp", - id: 1 - }, - identity: { - type: "string", - id: 2 - }, - ratePerSecond: { - type: "double", - id: 3 - }, - workerVersionCapabilities: { - type: "temporal.api.common.v1.WorkerVersionCapabilities", - id: 4, - options: { - deprecated: true - } - }, - deploymentOptions: { - type: "temporal.api.deployment.v1.WorkerDeploymentOptions", - id: 5 - } - } - }, - StickyExecutionAttributes: { - fields: { - workerTaskQueue: { - type: "TaskQueue", - id: 1 - }, - scheduleToStartTimeout: { - type: "google.protobuf.Duration", - id: 2 - } - } - }, - CompatibleVersionSet: { - fields: { - buildIds: { - rule: "repeated", - type: "string", - id: 1 - } - } - }, - TaskQueueReachability: { - fields: { - taskQueue: { - type: "string", - id: 1 - }, - reachability: { - rule: "repeated", - type: "temporal.api.enums.v1.TaskReachability", - id: 2 - } - } - }, - BuildIdReachability: { - fields: { - buildId: { - type: "string", - id: 1 - }, - taskQueueReachability: { - rule: "repeated", - type: "TaskQueueReachability", - id: 2 - } - } - }, - RampByPercentage: { - fields: { - rampPercentage: { - type: "float", - id: 1 - } - } - }, - BuildIdAssignmentRule: { - oneofs: { - ramp: { - oneof: [ - "percentageRamp" - ] - } - }, - fields: { - targetBuildId: { - type: "string", - id: 1 - }, - percentageRamp: { - type: "RampByPercentage", - id: 3 - } - } - }, - CompatibleBuildIdRedirectRule: { - fields: { - sourceBuildId: { - type: "string", - id: 1 - }, - targetBuildId: { - type: "string", - id: 2 - } - } - }, - TimestampedBuildIdAssignmentRule: { - fields: { - rule: { - type: "BuildIdAssignmentRule", - id: 1 - }, - createTime: { - type: "google.protobuf.Timestamp", - id: 2 - } - } - }, - TimestampedCompatibleBuildIdRedirectRule: { - fields: { - rule: { - type: "CompatibleBuildIdRedirectRule", - id: 1 - }, - createTime: { - type: "google.protobuf.Timestamp", - id: 2 - } - } - }, - PollerScalingDecision: { - fields: { - pollRequestDeltaSuggestion: { - type: "int32", - id: 1 - } - } - }, - RateLimit: { - fields: { - requestsPerSecond: { - type: "float", - id: 1 - } - } - }, - ConfigMetadata: { - fields: { - reason: { - type: "string", - id: 1 - }, - updateIdentity: { - type: "string", - id: 2 - }, - updateTime: { - type: "google.protobuf.Timestamp", - id: 3 - } - } - }, - RateLimitConfig: { - fields: { - rateLimit: { - type: "RateLimit", - id: 1 - }, - metadata: { - type: "ConfigMetadata", - id: 2 - } - } - }, - TaskQueueConfig: { - fields: { - queueRateLimit: { - type: "RateLimitConfig", - id: 1 - }, - fairnessKeysRateLimitDefault: { - type: "RateLimitConfig", - id: 2 - }, - fairnessWeightOverrides: { - keyType: "string", - type: "float", - id: 3 - } - } - } - } - } - } - }, - sdk: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/sdk/v1;sdk", - java_package: "io.temporal.api.sdk.v1", - java_multiple_files: true, - java_outer_classname: "WorkflowMetadataProto", - ruby_package: "Temporalio::Api::Sdk::V1", - csharp_namespace: "Temporalio.Api.Sdk.V1" - }, - nested: { - UserMetadata: { - fields: { - summary: { - type: "temporal.api.common.v1.Payload", - id: 1 - }, - details: { - type: "temporal.api.common.v1.Payload", - id: 2 - } - } - }, - WorkflowTaskCompletedMetadata: { - fields: { - coreUsedFlags: { - rule: "repeated", - type: "uint32", - id: 1 - }, - langUsedFlags: { - rule: "repeated", - type: "uint32", - id: 2 - }, - sdkName: { - type: "string", - id: 3 - }, - sdkVersion: { - type: "string", - id: 4 - } - } - }, - WorkerConfig: { - oneofs: { - pollerBehavior: { - oneof: [ - "simplePollerBehavior", - "autoscalingPollerBehavior" - ] - } - }, - fields: { - workflowCacheSize: { - type: "int32", - id: 1 - }, - simplePollerBehavior: { - type: "SimplePollerBehavior", - id: 2 - }, - autoscalingPollerBehavior: { - type: "AutoscalingPollerBehavior", - id: 3 - } - }, - nested: { - SimplePollerBehavior: { - fields: { - maxPollers: { - type: "int32", - id: 1 - } - } - }, - AutoscalingPollerBehavior: { - fields: { - minPollers: { - type: "int32", - id: 1 - }, - maxPollers: { - type: "int32", - id: 2 - }, - initialPollers: { - type: "int32", - id: 3 - } - } - } - } - }, - WorkflowMetadata: { - fields: { - definition: { - type: "WorkflowDefinition", - id: 1 - }, - currentDetails: { - type: "string", - id: 2 - } - } - }, - WorkflowDefinition: { - fields: { - type: { - type: "string", - id: 1 - }, - queryDefinitions: { - rule: "repeated", - type: "WorkflowInteractionDefinition", - id: 2 - }, - signalDefinitions: { - rule: "repeated", - type: "WorkflowInteractionDefinition", - id: 3 - }, - updateDefinitions: { - rule: "repeated", - type: "WorkflowInteractionDefinition", - id: 4 - } - } - }, - WorkflowInteractionDefinition: { - fields: { - name: { - type: "string", - id: 1 - }, - description: { - type: "string", - id: 2 - } - } - } - } - } - } - }, - history: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/history/v1;history", - java_package: "io.temporal.api.history.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::History::V1", - csharp_namespace: "Temporalio.Api.History.V1" - }, - nested: { - WorkflowExecutionStartedEventAttributes: { - fields: { - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 1 - }, - parentWorkflowNamespace: { - type: "string", - id: 2 - }, - parentWorkflowNamespaceId: { - type: "string", - id: 27 - }, - parentWorkflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 3 - }, - parentInitiatedEventId: { - type: "int64", - id: 4 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 5 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 6 - }, - workflowExecutionTimeout: { - type: "google.protobuf.Duration", - id: 7 - }, - workflowRunTimeout: { - type: "google.protobuf.Duration", - id: 8 - }, - workflowTaskTimeout: { - type: "google.protobuf.Duration", - id: 9 - }, - continuedExecutionRunId: { - type: "string", - id: 10 - }, - initiator: { - type: "temporal.api.enums.v1.ContinueAsNewInitiator", - id: 11 - }, - continuedFailure: { - type: "temporal.api.failure.v1.Failure", - id: 12 - }, - lastCompletionResult: { - type: "temporal.api.common.v1.Payloads", - id: 13 - }, - originalExecutionRunId: { - type: "string", - id: 14 - }, - identity: { - type: "string", - id: 15 - }, - firstExecutionRunId: { - type: "string", - id: 16 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 17 - }, - attempt: { - type: "int32", - id: 18 - }, - workflowExecutionExpirationTime: { - type: "google.protobuf.Timestamp", - id: 19 - }, - cronSchedule: { - type: "string", - id: 20 - }, - firstWorkflowTaskBackoff: { - type: "google.protobuf.Duration", - id: 21 - }, - memo: { - type: "temporal.api.common.v1.Memo", - id: 22 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 23 - }, - prevAutoResetPoints: { - type: "temporal.api.workflow.v1.ResetPoints", - id: 24 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 25 - }, - parentInitiatedEventVersion: { - type: "int64", - id: 26 - }, - workflowId: { - type: "string", - id: 28 - }, - sourceVersionStamp: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 29, - options: { - deprecated: true - } - }, - completionCallbacks: { - rule: "repeated", - type: "temporal.api.common.v1.Callback", - id: 30 - }, - rootWorkflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 31 - }, - inheritedBuildId: { - type: "string", - id: 32, - options: { - deprecated: true - } - }, - versioningOverride: { - type: "temporal.api.workflow.v1.VersioningOverride", - id: 33 - }, - parentPinnedWorkerDeploymentVersion: { - type: "string", - id: 34, - options: { - deprecated: true - } - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 35 - }, - inheritedPinnedVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 37 - }, - inheritedAutoUpgradeInfo: { - type: "temporal.api.deployment.v1.InheritedAutoUpgradeInfo", - id: 39 - }, - eagerExecutionAccepted: { - type: "bool", - id: 38 - } - }, - reserved: [ - [ - 36, - 36 - ], - "parent_pinned_deployment_version" - ] - }, - WorkflowExecutionCompletedEventAttributes: { - fields: { - result: { - type: "temporal.api.common.v1.Payloads", - id: 1 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 2 - }, - newExecutionRunId: { - type: "string", - id: 3 - } - } - }, - WorkflowExecutionFailedEventAttributes: { - fields: { - failure: { - type: "temporal.api.failure.v1.Failure", - id: 1 - }, - retryState: { - type: "temporal.api.enums.v1.RetryState", - id: 2 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 3 - }, - newExecutionRunId: { - type: "string", - id: 4 - } - } - }, - WorkflowExecutionTimedOutEventAttributes: { - fields: { - retryState: { - type: "temporal.api.enums.v1.RetryState", - id: 1 - }, - newExecutionRunId: { - type: "string", - id: 2 - } - } - }, - WorkflowExecutionContinuedAsNewEventAttributes: { - fields: { - newExecutionRunId: { - type: "string", - id: 1 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 2 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 3 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 4 - }, - workflowRunTimeout: { - type: "google.protobuf.Duration", - id: 5 - }, - workflowTaskTimeout: { - type: "google.protobuf.Duration", - id: 6 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 7 - }, - backoffStartInterval: { - type: "google.protobuf.Duration", - id: 8 - }, - initiator: { - type: "temporal.api.enums.v1.ContinueAsNewInitiator", - id: 9 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 10, - options: { - deprecated: true - } - }, - lastCompletionResult: { - type: "temporal.api.common.v1.Payloads", - id: 11 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 12 - }, - memo: { - type: "temporal.api.common.v1.Memo", - id: 13 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 14 - }, - inheritBuildId: { - type: "bool", - id: 15, - options: { - deprecated: true - } - }, - initialVersioningBehavior: { - type: "temporal.api.enums.v1.ContinueAsNewVersioningBehavior", - id: 16 - } - } - }, - WorkflowTaskScheduledEventAttributes: { - fields: { - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 1 - }, - startToCloseTimeout: { - type: "google.protobuf.Duration", - id: 2 - }, - attempt: { - type: "int32", - id: 3 - } - } - }, - WorkflowTaskStartedEventAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - identity: { - type: "string", - id: 2 - }, - requestId: { - type: "string", - id: 3 - }, - suggestContinueAsNew: { - type: "bool", - id: 4 - }, - suggestContinueAsNewReasons: { - rule: "repeated", - type: "temporal.api.enums.v1.SuggestContinueAsNewReason", - id: 8 - }, - targetWorkerDeploymentVersionChanged: { - type: "bool", - id: 9 - }, - historySizeBytes: { - type: "int64", - id: 5 - }, - workerVersion: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 6, - options: { - deprecated: true - } - }, - buildIdRedirectCounter: { - type: "int64", - id: 7, - options: { - deprecated: true - } - } - } - }, - WorkflowTaskCompletedEventAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - startedEventId: { - type: "int64", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - binaryChecksum: { - type: "string", - id: 4, - options: { - deprecated: true - } - }, - workerVersion: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 5, - options: { - deprecated: true - } - }, - sdkMetadata: { - type: "temporal.api.sdk.v1.WorkflowTaskCompletedMetadata", - id: 6 - }, - meteringMetadata: { - type: "temporal.api.common.v1.MeteringMetadata", - id: 13 - }, - deployment: { - type: "temporal.api.deployment.v1.Deployment", - id: 7, - options: { - deprecated: true - } - }, - versioningBehavior: { - type: "temporal.api.enums.v1.VersioningBehavior", - id: 8 - }, - workerDeploymentVersion: { - type: "string", - id: 9, - options: { - deprecated: true - } - }, - workerDeploymentName: { - type: "string", - id: 10 - }, - deploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 11 - } - } - }, - WorkflowTaskTimedOutEventAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - startedEventId: { - type: "int64", - id: 2 - }, - timeoutType: { - type: "temporal.api.enums.v1.TimeoutType", - id: 3 - } - } - }, - WorkflowTaskFailedEventAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - startedEventId: { - type: "int64", - id: 2 - }, - cause: { - type: "temporal.api.enums.v1.WorkflowTaskFailedCause", - id: 3 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 4 - }, - identity: { - type: "string", - id: 5 - }, - baseRunId: { - type: "string", - id: 6 - }, - newRunId: { - type: "string", - id: 7 - }, - forkEventVersion: { - type: "int64", - id: 8 - }, - binaryChecksum: { - type: "string", - id: 9, - options: { - deprecated: true - } - }, - workerVersion: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 10, - options: { - deprecated: true - } - } - } - }, - ActivityTaskScheduledEventAttributes: { - fields: { - activityId: { - type: "string", - id: 1 - }, - activityType: { - type: "temporal.api.common.v1.ActivityType", - id: 2 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 4 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 5 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 6 - }, - scheduleToCloseTimeout: { - type: "google.protobuf.Duration", - id: 7 - }, - scheduleToStartTimeout: { - type: "google.protobuf.Duration", - id: 8 - }, - startToCloseTimeout: { - type: "google.protobuf.Duration", - id: 9 - }, - heartbeatTimeout: { - type: "google.protobuf.Duration", - id: 10 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 11 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 12 - }, - useWorkflowBuildId: { - type: "bool", - id: 13, - options: { - deprecated: true - } - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 14 - } - }, - reserved: [ - [ - 3, - 3 - ] - ] - }, - ActivityTaskStartedEventAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - identity: { - type: "string", - id: 2 - }, - requestId: { - type: "string", - id: 3 - }, - attempt: { - type: "int32", - id: 4 - }, - lastFailure: { - type: "temporal.api.failure.v1.Failure", - id: 5 - }, - workerVersion: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 6, - options: { - deprecated: true - } - }, - buildIdRedirectCounter: { - type: "int64", - id: 7, - options: { - deprecated: true - } - } - } - }, - ActivityTaskCompletedEventAttributes: { - fields: { - result: { - type: "temporal.api.common.v1.Payloads", - id: 1 - }, - scheduledEventId: { - type: "int64", - id: 2 - }, - startedEventId: { - type: "int64", - id: 3 - }, - identity: { - type: "string", - id: 4 - }, - workerVersion: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 5, - options: { - deprecated: true - } - } - } - }, - ActivityTaskFailedEventAttributes: { - fields: { - failure: { - type: "temporal.api.failure.v1.Failure", - id: 1 - }, - scheduledEventId: { - type: "int64", - id: 2 - }, - startedEventId: { - type: "int64", - id: 3 - }, - identity: { - type: "string", - id: 4 - }, - retryState: { - type: "temporal.api.enums.v1.RetryState", - id: 5 - }, - workerVersion: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 6, - options: { - deprecated: true - } - } - } - }, - ActivityTaskTimedOutEventAttributes: { - fields: { - failure: { - type: "temporal.api.failure.v1.Failure", - id: 1 - }, - scheduledEventId: { - type: "int64", - id: 2 - }, - startedEventId: { - type: "int64", - id: 3 - }, - retryState: { - type: "temporal.api.enums.v1.RetryState", - id: 4 - } - } - }, - ActivityTaskCancelRequestedEventAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 2 - } - } - }, - ActivityTaskCanceledEventAttributes: { - fields: { - details: { - type: "temporal.api.common.v1.Payloads", - id: 1 - }, - latestCancelRequestedEventId: { - type: "int64", - id: 2 - }, - scheduledEventId: { - type: "int64", - id: 3 - }, - startedEventId: { - type: "int64", - id: 4 - }, - identity: { - type: "string", - id: 5 - }, - workerVersion: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 6, - options: { - deprecated: true - } - } - } - }, - TimerStartedEventAttributes: { - fields: { - timerId: { - type: "string", - id: 1 - }, - startToFireTimeout: { - type: "google.protobuf.Duration", - id: 2 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 3 - } - } - }, - TimerFiredEventAttributes: { - fields: { - timerId: { - type: "string", - id: 1 - }, - startedEventId: { - type: "int64", - id: 2 - } - } - }, - TimerCanceledEventAttributes: { - fields: { - timerId: { - type: "string", - id: 1 - }, - startedEventId: { - type: "int64", - id: 2 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 3 - }, - identity: { - type: "string", - id: 4 - } - } - }, - WorkflowExecutionCancelRequestedEventAttributes: { - fields: { - cause: { - type: "string", - id: 1 - }, - externalInitiatedEventId: { - type: "int64", - id: 2 - }, - externalWorkflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 3 - }, - identity: { - type: "string", - id: 4 - } - } - }, - WorkflowExecutionCanceledEventAttributes: { - fields: { - workflowTaskCompletedEventId: { - type: "int64", - id: 1 - }, - details: { - type: "temporal.api.common.v1.Payloads", - id: 2 - } - } - }, - MarkerRecordedEventAttributes: { - fields: { - markerName: { - type: "string", - id: 1 - }, - details: { - keyType: "string", - type: "temporal.api.common.v1.Payloads", - id: 2 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 3 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 4 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 5 - } - } - }, - WorkflowExecutionSignaledEventAttributes: { - fields: { - signalName: { - type: "string", - id: 1 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 2 - }, - identity: { - type: "string", - id: 3 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 4 - }, - skipGenerateWorkflowTask: { - type: "bool", - id: 5, - options: { - deprecated: true - } - }, - externalWorkflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 6 - } - } - }, - WorkflowExecutionTerminatedEventAttributes: { - fields: { - reason: { - type: "string", - id: 1 - }, - details: { - type: "temporal.api.common.v1.Payloads", - id: 2 - }, - identity: { - type: "string", - id: 3 - } - } - }, - RequestCancelExternalWorkflowExecutionInitiatedEventAttributes: { - fields: { - workflowTaskCompletedEventId: { - type: "int64", - id: 1 - }, - namespace: { - type: "string", - id: 2 - }, - namespaceId: { - type: "string", - id: 7 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 3 - }, - control: { - type: "string", - id: 4, - options: { - deprecated: true - } - }, - childWorkflowOnly: { - type: "bool", - id: 5 - }, - reason: { - type: "string", - id: 6 - } - } - }, - RequestCancelExternalWorkflowExecutionFailedEventAttributes: { - fields: { - cause: { - type: "temporal.api.enums.v1.CancelExternalWorkflowExecutionFailedCause", - id: 1 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 2 - }, - namespace: { - type: "string", - id: 3 - }, - namespaceId: { - type: "string", - id: 7 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 4 - }, - initiatedEventId: { - type: "int64", - id: 5 - }, - control: { - type: "string", - id: 6, - options: { - deprecated: true - } - } - } - }, - ExternalWorkflowExecutionCancelRequestedEventAttributes: { - fields: { - initiatedEventId: { - type: "int64", - id: 1 - }, - namespace: { - type: "string", - id: 2 - }, - namespaceId: { - type: "string", - id: 4 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 3 - } - } - }, - SignalExternalWorkflowExecutionInitiatedEventAttributes: { - fields: { - workflowTaskCompletedEventId: { - type: "int64", - id: 1 - }, - namespace: { - type: "string", - id: 2 - }, - namespaceId: { - type: "string", - id: 9 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 3 - }, - signalName: { - type: "string", - id: 4 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 5 - }, - control: { - type: "string", - id: 6, - options: { - deprecated: true - } - }, - childWorkflowOnly: { - type: "bool", - id: 7 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 8 - } - } - }, - SignalExternalWorkflowExecutionFailedEventAttributes: { - fields: { - cause: { - type: "temporal.api.enums.v1.SignalExternalWorkflowExecutionFailedCause", - id: 1 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 2 - }, - namespace: { - type: "string", - id: 3 - }, - namespaceId: { - type: "string", - id: 7 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 4 - }, - initiatedEventId: { - type: "int64", - id: 5 - }, - control: { - type: "string", - id: 6, - options: { - deprecated: true - } - } - } - }, - ExternalWorkflowExecutionSignaledEventAttributes: { - fields: { - initiatedEventId: { - type: "int64", - id: 1 - }, - namespace: { - type: "string", - id: 2 - }, - namespaceId: { - type: "string", - id: 5 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 3 - }, - control: { - type: "string", - id: 4, - options: { - deprecated: true - } - } - } - }, - UpsertWorkflowSearchAttributesEventAttributes: { - fields: { - workflowTaskCompletedEventId: { - type: "int64", - id: 1 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 2 - } - } - }, - WorkflowPropertiesModifiedEventAttributes: { - fields: { - workflowTaskCompletedEventId: { - type: "int64", - id: 1 - }, - upsertedMemo: { - type: "temporal.api.common.v1.Memo", - id: 2 - } - } - }, - StartChildWorkflowExecutionInitiatedEventAttributes: { - fields: { - namespace: { - type: "string", - id: 1 - }, - namespaceId: { - type: "string", - id: 18 - }, - workflowId: { - type: "string", - id: 2 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 3 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 4 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 5 - }, - workflowExecutionTimeout: { - type: "google.protobuf.Duration", - id: 6 - }, - workflowRunTimeout: { - type: "google.protobuf.Duration", - id: 7 - }, - workflowTaskTimeout: { - type: "google.protobuf.Duration", - id: 8 - }, - parentClosePolicy: { - type: "temporal.api.enums.v1.ParentClosePolicy", - id: 9 - }, - control: { - type: "string", - id: 10, - options: { - deprecated: true - } - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 11 - }, - workflowIdReusePolicy: { - type: "temporal.api.enums.v1.WorkflowIdReusePolicy", - id: 12 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 13 - }, - cronSchedule: { - type: "string", - id: 14 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 15 - }, - memo: { - type: "temporal.api.common.v1.Memo", - id: 16 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 17 - }, - inheritBuildId: { - type: "bool", - id: 19, - options: { - deprecated: true - } - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 20 - } - } - }, - StartChildWorkflowExecutionFailedEventAttributes: { - fields: { - namespace: { - type: "string", - id: 1 - }, - namespaceId: { - type: "string", - id: 8 - }, - workflowId: { - type: "string", - id: 2 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 3 - }, - cause: { - type: "temporal.api.enums.v1.StartChildWorkflowExecutionFailedCause", - id: 4 - }, - control: { - type: "string", - id: 5, - options: { - deprecated: true - } - }, - initiatedEventId: { - type: "int64", - id: 6 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 7 - } - } - }, - ChildWorkflowExecutionStartedEventAttributes: { - fields: { - namespace: { - type: "string", - id: 1 - }, - namespaceId: { - type: "string", - id: 6 - }, - initiatedEventId: { - type: "int64", - id: 2 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 3 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 4 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 5 - } - } - }, - ChildWorkflowExecutionCompletedEventAttributes: { - fields: { - result: { - type: "temporal.api.common.v1.Payloads", - id: 1 - }, - namespace: { - type: "string", - id: 2 - }, - namespaceId: { - type: "string", - id: 7 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 3 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 4 - }, - initiatedEventId: { - type: "int64", - id: 5 - }, - startedEventId: { - type: "int64", - id: 6 - } - } - }, - ChildWorkflowExecutionFailedEventAttributes: { - fields: { - failure: { - type: "temporal.api.failure.v1.Failure", - id: 1 - }, - namespace: { - type: "string", - id: 2 - }, - namespaceId: { - type: "string", - id: 8 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 3 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 4 - }, - initiatedEventId: { - type: "int64", - id: 5 - }, - startedEventId: { - type: "int64", - id: 6 - }, - retryState: { - type: "temporal.api.enums.v1.RetryState", - id: 7 - } - } - }, - ChildWorkflowExecutionCanceledEventAttributes: { - fields: { - details: { - type: "temporal.api.common.v1.Payloads", - id: 1 - }, - namespace: { - type: "string", - id: 2 - }, - namespaceId: { - type: "string", - id: 7 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 3 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 4 - }, - initiatedEventId: { - type: "int64", - id: 5 - }, - startedEventId: { - type: "int64", - id: 6 - } - } - }, - ChildWorkflowExecutionTimedOutEventAttributes: { - fields: { - namespace: { - type: "string", - id: 1 - }, - namespaceId: { - type: "string", - id: 7 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 3 - }, - initiatedEventId: { - type: "int64", - id: 4 - }, - startedEventId: { - type: "int64", - id: 5 - }, - retryState: { - type: "temporal.api.enums.v1.RetryState", - id: 6 - } - } - }, - ChildWorkflowExecutionTerminatedEventAttributes: { - fields: { - namespace: { - type: "string", - id: 1 - }, - namespaceId: { - type: "string", - id: 6 - }, - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 3 - }, - initiatedEventId: { - type: "int64", - id: 4 - }, - startedEventId: { - type: "int64", - id: 5 - } - } - }, - WorkflowExecutionOptionsUpdatedEventAttributes: { - fields: { - versioningOverride: { - type: "temporal.api.workflow.v1.VersioningOverride", - id: 1 - }, - unsetVersioningOverride: { - type: "bool", - id: 2 - }, - attachedRequestId: { - type: "string", - id: 3 - }, - attachedCompletionCallbacks: { - rule: "repeated", - type: "temporal.api.common.v1.Callback", - id: 4 - }, - identity: { - type: "string", - id: 5 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 6 - } - } - }, - WorkflowPropertiesModifiedExternallyEventAttributes: { - fields: { - newTaskQueue: { - type: "string", - id: 1 - }, - newWorkflowTaskTimeout: { - type: "google.protobuf.Duration", - id: 2 - }, - newWorkflowRunTimeout: { - type: "google.protobuf.Duration", - id: 3 - }, - newWorkflowExecutionTimeout: { - type: "google.protobuf.Duration", - id: 4 - }, - upsertedMemo: { - type: "temporal.api.common.v1.Memo", - id: 5 - } - } - }, - ActivityPropertiesModifiedExternallyEventAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - newRetryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 2 - } - } - }, - WorkflowExecutionUpdateAcceptedEventAttributes: { - fields: { - protocolInstanceId: { - type: "string", - id: 1 - }, - acceptedRequestMessageId: { - type: "string", - id: 2 - }, - acceptedRequestSequencingEventId: { - type: "int64", - id: 3 - }, - acceptedRequest: { - type: "temporal.api.update.v1.Request", - id: 4 - } - } - }, - WorkflowExecutionUpdateCompletedEventAttributes: { - fields: { - meta: { - type: "temporal.api.update.v1.Meta", - id: 1 - }, - acceptedEventId: { - type: "int64", - id: 3 - }, - outcome: { - type: "temporal.api.update.v1.Outcome", - id: 2 - } - } - }, - WorkflowExecutionUpdateRejectedEventAttributes: { - fields: { - protocolInstanceId: { - type: "string", - id: 1 - }, - rejectedRequestMessageId: { - type: "string", - id: 2 - }, - rejectedRequestSequencingEventId: { - type: "int64", - id: 3 - }, - rejectedRequest: { - type: "temporal.api.update.v1.Request", - id: 4 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 5 - } - } - }, - WorkflowExecutionUpdateAdmittedEventAttributes: { - fields: { - request: { - type: "temporal.api.update.v1.Request", - id: 1 - }, - origin: { - type: "temporal.api.enums.v1.UpdateAdmittedEventOrigin", - id: 2 - } - } - }, - WorkflowExecutionPausedEventAttributes: { - fields: { - identity: { - type: "string", - id: 1 - }, - reason: { - type: "string", - id: 2 - }, - requestId: { - type: "string", - id: 3 - } - } - }, - WorkflowExecutionUnpausedEventAttributes: { - fields: { - identity: { - type: "string", - id: 1 - }, - reason: { - type: "string", - id: 2 - }, - requestId: { - type: "string", - id: 3 - } - } - }, - NexusOperationScheduledEventAttributes: { - fields: { - endpoint: { - type: "string", - id: 1 - }, - service: { - type: "string", - id: 2 - }, - operation: { - type: "string", - id: 3 - }, - input: { - type: "temporal.api.common.v1.Payload", - id: 4 - }, - scheduleToCloseTimeout: { - type: "google.protobuf.Duration", - id: 5 - }, - nexusHeader: { - keyType: "string", - type: "string", - id: 6 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 7 - }, - requestId: { - type: "string", - id: 8 - }, - endpointId: { - type: "string", - id: 9 - }, - scheduleToStartTimeout: { - type: "google.protobuf.Duration", - id: 10 - }, - startToCloseTimeout: { - type: "google.protobuf.Duration", - id: 11 - } - } - }, - NexusOperationStartedEventAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - operationId: { - type: "string", - id: 3, - options: { - deprecated: true - } - }, - requestId: { - type: "string", - id: 4 - }, - operationToken: { - type: "string", - id: 5 - } - } - }, - NexusOperationCompletedEventAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - result: { - type: "temporal.api.common.v1.Payload", - id: 2 - }, - requestId: { - type: "string", - id: 3 - } - } - }, - NexusOperationFailedEventAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 2 - }, - requestId: { - type: "string", - id: 3 - } - } - }, - NexusOperationTimedOutEventAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 2 - }, - requestId: { - type: "string", - id: 3 - } - } - }, - NexusOperationCanceledEventAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 2 - }, - requestId: { - type: "string", - id: 3 - } - } - }, - NexusOperationCancelRequestedEventAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 2 - } - } - }, - NexusOperationCancelRequestCompletedEventAttributes: { - fields: { - requestedEventId: { - type: "int64", - id: 1 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 2 - }, - scheduledEventId: { - type: "int64", - id: 3 - } - } - }, - NexusOperationCancelRequestFailedEventAttributes: { - fields: { - requestedEventId: { - type: "int64", - id: 1 - }, - workflowTaskCompletedEventId: { - type: "int64", - id: 2 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 3 - }, - scheduledEventId: { - type: "int64", - id: 4 - } - } - }, - HistoryEvent: { - oneofs: { - attributes: { - oneof: [ - "workflowExecutionStartedEventAttributes", - "workflowExecutionCompletedEventAttributes", - "workflowExecutionFailedEventAttributes", - "workflowExecutionTimedOutEventAttributes", - "workflowTaskScheduledEventAttributes", - "workflowTaskStartedEventAttributes", - "workflowTaskCompletedEventAttributes", - "workflowTaskTimedOutEventAttributes", - "workflowTaskFailedEventAttributes", - "activityTaskScheduledEventAttributes", - "activityTaskStartedEventAttributes", - "activityTaskCompletedEventAttributes", - "activityTaskFailedEventAttributes", - "activityTaskTimedOutEventAttributes", - "timerStartedEventAttributes", - "timerFiredEventAttributes", - "activityTaskCancelRequestedEventAttributes", - "activityTaskCanceledEventAttributes", - "timerCanceledEventAttributes", - "markerRecordedEventAttributes", - "workflowExecutionSignaledEventAttributes", - "workflowExecutionTerminatedEventAttributes", - "workflowExecutionCancelRequestedEventAttributes", - "workflowExecutionCanceledEventAttributes", - "requestCancelExternalWorkflowExecutionInitiatedEventAttributes", - "requestCancelExternalWorkflowExecutionFailedEventAttributes", - "externalWorkflowExecutionCancelRequestedEventAttributes", - "workflowExecutionContinuedAsNewEventAttributes", - "startChildWorkflowExecutionInitiatedEventAttributes", - "startChildWorkflowExecutionFailedEventAttributes", - "childWorkflowExecutionStartedEventAttributes", - "childWorkflowExecutionCompletedEventAttributes", - "childWorkflowExecutionFailedEventAttributes", - "childWorkflowExecutionCanceledEventAttributes", - "childWorkflowExecutionTimedOutEventAttributes", - "childWorkflowExecutionTerminatedEventAttributes", - "signalExternalWorkflowExecutionInitiatedEventAttributes", - "signalExternalWorkflowExecutionFailedEventAttributes", - "externalWorkflowExecutionSignaledEventAttributes", - "upsertWorkflowSearchAttributesEventAttributes", - "workflowExecutionUpdateAcceptedEventAttributes", - "workflowExecutionUpdateRejectedEventAttributes", - "workflowExecutionUpdateCompletedEventAttributes", - "workflowPropertiesModifiedExternallyEventAttributes", - "activityPropertiesModifiedExternallyEventAttributes", - "workflowPropertiesModifiedEventAttributes", - "workflowExecutionUpdateAdmittedEventAttributes", - "nexusOperationScheduledEventAttributes", - "nexusOperationStartedEventAttributes", - "nexusOperationCompletedEventAttributes", - "nexusOperationFailedEventAttributes", - "nexusOperationCanceledEventAttributes", - "nexusOperationTimedOutEventAttributes", - "nexusOperationCancelRequestedEventAttributes", - "workflowExecutionOptionsUpdatedEventAttributes", - "nexusOperationCancelRequestCompletedEventAttributes", - "nexusOperationCancelRequestFailedEventAttributes", - "workflowExecutionPausedEventAttributes", - "workflowExecutionUnpausedEventAttributes" - ] - } - }, - fields: { - eventId: { - type: "int64", - id: 1 - }, - eventTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - eventType: { - type: "temporal.api.enums.v1.EventType", - id: 3 - }, - version: { - type: "int64", - id: 4 - }, - taskId: { - type: "int64", - id: 5 - }, - workerMayIgnore: { - type: "bool", - id: 300 - }, - userMetadata: { - type: "temporal.api.sdk.v1.UserMetadata", - id: 301 - }, - links: { - rule: "repeated", - type: "temporal.api.common.v1.Link", - id: 302 - }, - workflowExecutionStartedEventAttributes: { - type: "WorkflowExecutionStartedEventAttributes", - id: 6 - }, - workflowExecutionCompletedEventAttributes: { - type: "WorkflowExecutionCompletedEventAttributes", - id: 7 - }, - workflowExecutionFailedEventAttributes: { - type: "WorkflowExecutionFailedEventAttributes", - id: 8 - }, - workflowExecutionTimedOutEventAttributes: { - type: "WorkflowExecutionTimedOutEventAttributes", - id: 9 - }, - workflowTaskScheduledEventAttributes: { - type: "WorkflowTaskScheduledEventAttributes", - id: 10 - }, - workflowTaskStartedEventAttributes: { - type: "WorkflowTaskStartedEventAttributes", - id: 11 - }, - workflowTaskCompletedEventAttributes: { - type: "WorkflowTaskCompletedEventAttributes", - id: 12 - }, - workflowTaskTimedOutEventAttributes: { - type: "WorkflowTaskTimedOutEventAttributes", - id: 13 - }, - workflowTaskFailedEventAttributes: { - type: "WorkflowTaskFailedEventAttributes", - id: 14 - }, - activityTaskScheduledEventAttributes: { - type: "ActivityTaskScheduledEventAttributes", - id: 15 - }, - activityTaskStartedEventAttributes: { - type: "ActivityTaskStartedEventAttributes", - id: 16 - }, - activityTaskCompletedEventAttributes: { - type: "ActivityTaskCompletedEventAttributes", - id: 17 - }, - activityTaskFailedEventAttributes: { - type: "ActivityTaskFailedEventAttributes", - id: 18 - }, - activityTaskTimedOutEventAttributes: { - type: "ActivityTaskTimedOutEventAttributes", - id: 19 - }, - timerStartedEventAttributes: { - type: "TimerStartedEventAttributes", - id: 20 - }, - timerFiredEventAttributes: { - type: "TimerFiredEventAttributes", - id: 21 - }, - activityTaskCancelRequestedEventAttributes: { - type: "ActivityTaskCancelRequestedEventAttributes", - id: 22 - }, - activityTaskCanceledEventAttributes: { - type: "ActivityTaskCanceledEventAttributes", - id: 23 - }, - timerCanceledEventAttributes: { - type: "TimerCanceledEventAttributes", - id: 24 - }, - markerRecordedEventAttributes: { - type: "MarkerRecordedEventAttributes", - id: 25 - }, - workflowExecutionSignaledEventAttributes: { - type: "WorkflowExecutionSignaledEventAttributes", - id: 26 - }, - workflowExecutionTerminatedEventAttributes: { - type: "WorkflowExecutionTerminatedEventAttributes", - id: 27 - }, - workflowExecutionCancelRequestedEventAttributes: { - type: "WorkflowExecutionCancelRequestedEventAttributes", - id: 28 - }, - workflowExecutionCanceledEventAttributes: { - type: "WorkflowExecutionCanceledEventAttributes", - id: 29 - }, - requestCancelExternalWorkflowExecutionInitiatedEventAttributes: { - type: "RequestCancelExternalWorkflowExecutionInitiatedEventAttributes", - id: 30 - }, - requestCancelExternalWorkflowExecutionFailedEventAttributes: { - type: "RequestCancelExternalWorkflowExecutionFailedEventAttributes", - id: 31 - }, - externalWorkflowExecutionCancelRequestedEventAttributes: { - type: "ExternalWorkflowExecutionCancelRequestedEventAttributes", - id: 32 - }, - workflowExecutionContinuedAsNewEventAttributes: { - type: "WorkflowExecutionContinuedAsNewEventAttributes", - id: 33 - }, - startChildWorkflowExecutionInitiatedEventAttributes: { - type: "StartChildWorkflowExecutionInitiatedEventAttributes", - id: 34 - }, - startChildWorkflowExecutionFailedEventAttributes: { - type: "StartChildWorkflowExecutionFailedEventAttributes", - id: 35 - }, - childWorkflowExecutionStartedEventAttributes: { - type: "ChildWorkflowExecutionStartedEventAttributes", - id: 36 - }, - childWorkflowExecutionCompletedEventAttributes: { - type: "ChildWorkflowExecutionCompletedEventAttributes", - id: 37 - }, - childWorkflowExecutionFailedEventAttributes: { - type: "ChildWorkflowExecutionFailedEventAttributes", - id: 38 - }, - childWorkflowExecutionCanceledEventAttributes: { - type: "ChildWorkflowExecutionCanceledEventAttributes", - id: 39 - }, - childWorkflowExecutionTimedOutEventAttributes: { - type: "ChildWorkflowExecutionTimedOutEventAttributes", - id: 40 - }, - childWorkflowExecutionTerminatedEventAttributes: { - type: "ChildWorkflowExecutionTerminatedEventAttributes", - id: 41 - }, - signalExternalWorkflowExecutionInitiatedEventAttributes: { - type: "SignalExternalWorkflowExecutionInitiatedEventAttributes", - id: 42 - }, - signalExternalWorkflowExecutionFailedEventAttributes: { - type: "SignalExternalWorkflowExecutionFailedEventAttributes", - id: 43 - }, - externalWorkflowExecutionSignaledEventAttributes: { - type: "ExternalWorkflowExecutionSignaledEventAttributes", - id: 44 - }, - upsertWorkflowSearchAttributesEventAttributes: { - type: "UpsertWorkflowSearchAttributesEventAttributes", - id: 45 - }, - workflowExecutionUpdateAcceptedEventAttributes: { - type: "WorkflowExecutionUpdateAcceptedEventAttributes", - id: 46 - }, - workflowExecutionUpdateRejectedEventAttributes: { - type: "WorkflowExecutionUpdateRejectedEventAttributes", - id: 47 - }, - workflowExecutionUpdateCompletedEventAttributes: { - type: "WorkflowExecutionUpdateCompletedEventAttributes", - id: 48 - }, - workflowPropertiesModifiedExternallyEventAttributes: { - type: "WorkflowPropertiesModifiedExternallyEventAttributes", - id: 49 - }, - activityPropertiesModifiedExternallyEventAttributes: { - type: "ActivityPropertiesModifiedExternallyEventAttributes", - id: 50 - }, - workflowPropertiesModifiedEventAttributes: { - type: "WorkflowPropertiesModifiedEventAttributes", - id: 51 - }, - workflowExecutionUpdateAdmittedEventAttributes: { - type: "WorkflowExecutionUpdateAdmittedEventAttributes", - id: 52 - }, - nexusOperationScheduledEventAttributes: { - type: "NexusOperationScheduledEventAttributes", - id: 53 - }, - nexusOperationStartedEventAttributes: { - type: "NexusOperationStartedEventAttributes", - id: 54 - }, - nexusOperationCompletedEventAttributes: { - type: "NexusOperationCompletedEventAttributes", - id: 55 - }, - nexusOperationFailedEventAttributes: { - type: "NexusOperationFailedEventAttributes", - id: 56 - }, - nexusOperationCanceledEventAttributes: { - type: "NexusOperationCanceledEventAttributes", - id: 57 - }, - nexusOperationTimedOutEventAttributes: { - type: "NexusOperationTimedOutEventAttributes", - id: 58 - }, - nexusOperationCancelRequestedEventAttributes: { - type: "NexusOperationCancelRequestedEventAttributes", - id: 59 - }, - workflowExecutionOptionsUpdatedEventAttributes: { - type: "WorkflowExecutionOptionsUpdatedEventAttributes", - id: 60 - }, - nexusOperationCancelRequestCompletedEventAttributes: { - type: "NexusOperationCancelRequestCompletedEventAttributes", - id: 61 - }, - nexusOperationCancelRequestFailedEventAttributes: { - type: "NexusOperationCancelRequestFailedEventAttributes", - id: 62 - }, - workflowExecutionPausedEventAttributes: { - type: "WorkflowExecutionPausedEventAttributes", - id: 63 - }, - workflowExecutionUnpausedEventAttributes: { - type: "WorkflowExecutionUnpausedEventAttributes", - id: 64 - } - } - }, - History: { - fields: { - events: { - rule: "repeated", - type: "HistoryEvent", - id: 1 - } - } - } - } - } - } - }, - workflow: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/workflow/v1;workflow", - java_package: "io.temporal.api.workflow.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Workflow::V1", - csharp_namespace: "Temporalio.Api.Workflow.V1" - }, - nested: { - WorkflowExecutionInfo: { - fields: { - execution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 1 - }, - type: { - type: "temporal.api.common.v1.WorkflowType", - id: 2 - }, - startTime: { - type: "google.protobuf.Timestamp", - id: 3 - }, - closeTime: { - type: "google.protobuf.Timestamp", - id: 4 - }, - status: { - type: "temporal.api.enums.v1.WorkflowExecutionStatus", - id: 5 - }, - historyLength: { - type: "int64", - id: 6 - }, - parentNamespaceId: { - type: "string", - id: 7 - }, - parentExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 8 - }, - executionTime: { - type: "google.protobuf.Timestamp", - id: 9 - }, - memo: { - type: "temporal.api.common.v1.Memo", - id: 10 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 11 - }, - autoResetPoints: { - type: "ResetPoints", - id: 12 - }, - taskQueue: { - type: "string", - id: 13 - }, - stateTransitionCount: { - type: "int64", - id: 14 - }, - historySizeBytes: { - type: "int64", - id: 15 - }, - mostRecentWorkerVersionStamp: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 16, - options: { - deprecated: true - } - }, - executionDuration: { - type: "google.protobuf.Duration", - id: 17 - }, - rootExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 18 - }, - assignedBuildId: { - type: "string", - id: 19, - options: { - deprecated: true - } - }, - inheritedBuildId: { - type: "string", - id: 20, - options: { - deprecated: true - } - }, - firstRunId: { - type: "string", - id: 21 - }, - versioningInfo: { - type: "WorkflowExecutionVersioningInfo", - id: 22 - }, - workerDeploymentName: { - type: "string", - id: 23 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 24 - }, - externalPayloadSizeBytes: { - type: "int64", - id: 25 - }, - externalPayloadCount: { - type: "int64", - id: 26 - } - } - }, - WorkflowExecutionExtendedInfo: { - fields: { - executionExpirationTime: { - type: "google.protobuf.Timestamp", - id: 1 - }, - runExpirationTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - cancelRequested: { - type: "bool", - id: 3 - }, - lastResetTime: { - type: "google.protobuf.Timestamp", - id: 4 - }, - originalStartTime: { - type: "google.protobuf.Timestamp", - id: 5 - }, - resetRunId: { - type: "string", - id: 6 - }, - requestIdInfos: { - keyType: "string", - type: "RequestIdInfo", - id: 7 - }, - pauseInfo: { - type: "WorkflowExecutionPauseInfo", - id: 8 - } - } - }, - WorkflowExecutionVersioningInfo: { - fields: { - behavior: { - type: "temporal.api.enums.v1.VersioningBehavior", - id: 1 - }, - deployment: { - type: "temporal.api.deployment.v1.Deployment", - id: 2, - options: { - deprecated: true - } - }, - version: { - type: "string", - id: 5, - options: { - deprecated: true - } - }, - deploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 7 - }, - versioningOverride: { - type: "VersioningOverride", - id: 3 - }, - deploymentTransition: { - type: "DeploymentTransition", - id: 4, - options: { - deprecated: true - } - }, - versionTransition: { - type: "DeploymentVersionTransition", - id: 6 - }, - revisionNumber: { - type: "int64", - id: 8 - } - } - }, - DeploymentTransition: { - fields: { - deployment: { - type: "temporal.api.deployment.v1.Deployment", - id: 1 - } - } - }, - DeploymentVersionTransition: { - fields: { - version: { - type: "string", - id: 1, - options: { - deprecated: true - } - }, - deploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 2 - } - } - }, - WorkflowExecutionConfig: { - fields: { - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 1 - }, - workflowExecutionTimeout: { - type: "google.protobuf.Duration", - id: 2 - }, - workflowRunTimeout: { - type: "google.protobuf.Duration", - id: 3 - }, - defaultWorkflowTaskTimeout: { - type: "google.protobuf.Duration", - id: 4 - }, - userMetadata: { - type: "temporal.api.sdk.v1.UserMetadata", - id: 5 - } - } - }, - PendingActivityInfo: { - oneofs: { - assignedBuildId: { - oneof: [ - "useWorkflowBuildId", - "lastIndependentlyAssignedBuildId" - ] - } - }, - fields: { - activityId: { - type: "string", - id: 1 - }, - activityType: { - type: "temporal.api.common.v1.ActivityType", - id: 2 - }, - state: { - type: "temporal.api.enums.v1.PendingActivityState", - id: 3 - }, - heartbeatDetails: { - type: "temporal.api.common.v1.Payloads", - id: 4 - }, - lastHeartbeatTime: { - type: "google.protobuf.Timestamp", - id: 5 - }, - lastStartedTime: { - type: "google.protobuf.Timestamp", - id: 6 - }, - attempt: { - type: "int32", - id: 7 - }, - maximumAttempts: { - type: "int32", - id: 8 - }, - scheduledTime: { - type: "google.protobuf.Timestamp", - id: 9 - }, - expirationTime: { - type: "google.protobuf.Timestamp", - id: 10 - }, - lastFailure: { - type: "temporal.api.failure.v1.Failure", - id: 11 - }, - lastWorkerIdentity: { - type: "string", - id: 12 - }, - useWorkflowBuildId: { - type: "google.protobuf.Empty", - id: 13, - options: { - deprecated: true - } - }, - lastIndependentlyAssignedBuildId: { - type: "string", - id: 14, - options: { - deprecated: true - } - }, - lastWorkerVersionStamp: { - type: "temporal.api.common.v1.WorkerVersionStamp", - id: 15, - options: { - deprecated: true - } - }, - currentRetryInterval: { - type: "google.protobuf.Duration", - id: 16 - }, - lastAttemptCompleteTime: { - type: "google.protobuf.Timestamp", - id: 17 - }, - nextAttemptScheduleTime: { - type: "google.protobuf.Timestamp", - id: 18 - }, - paused: { - type: "bool", - id: 19 - }, - lastDeployment: { - type: "temporal.api.deployment.v1.Deployment", - id: 20, - options: { - deprecated: true - } - }, - lastWorkerDeploymentVersion: { - type: "string", - id: 21, - options: { - deprecated: true - } - }, - lastDeploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 25 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 22 - }, - pauseInfo: { - type: "PauseInfo", - id: 23 - }, - activityOptions: { - type: "temporal.api.activity.v1.ActivityOptions", - id: 24 - } - }, - nested: { - PauseInfo: { - oneofs: { - pausedBy: { - oneof: [ - "manual", - "rule" - ] - } - }, - fields: { - pauseTime: { - type: "google.protobuf.Timestamp", - id: 1 - }, - manual: { - type: "Manual", - id: 2 - }, - rule: { - type: "Rule", - id: 4 - } - }, - nested: { - Manual: { - fields: { - identity: { - type: "string", - id: 1 - }, - reason: { - type: "string", - id: 2 - } - } - }, - Rule: { - fields: { - ruleId: { - type: "string", - id: 1 - }, - identity: { - type: "string", - id: 2 - }, - reason: { - type: "string", - id: 3 - } - } - } - } - } - } - }, - PendingChildExecutionInfo: { - fields: { - workflowId: { - type: "string", - id: 1 - }, - runId: { - type: "string", - id: 2 - }, - workflowTypeName: { - type: "string", - id: 3 - }, - initiatedId: { - type: "int64", - id: 4 - }, - parentClosePolicy: { - type: "temporal.api.enums.v1.ParentClosePolicy", - id: 5 - } - } - }, - PendingWorkflowTaskInfo: { - fields: { - state: { - type: "temporal.api.enums.v1.PendingWorkflowTaskState", - id: 1 - }, - scheduledTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - originalScheduledTime: { - type: "google.protobuf.Timestamp", - id: 3 - }, - startedTime: { - type: "google.protobuf.Timestamp", - id: 4 - }, - attempt: { - type: "int32", - id: 5 - } - } - }, - ResetPoints: { - fields: { - points: { - rule: "repeated", - type: "ResetPointInfo", - id: 1 - } - } - }, - ResetPointInfo: { - fields: { - buildId: { - type: "string", - id: 7 - }, - binaryChecksum: { - type: "string", - id: 1, - options: { - deprecated: true - } - }, - runId: { - type: "string", - id: 2 - }, - firstWorkflowTaskCompletedId: { - type: "int64", - id: 3 - }, - createTime: { - type: "google.protobuf.Timestamp", - id: 4 - }, - expireTime: { - type: "google.protobuf.Timestamp", - id: 5 - }, - resettable: { - type: "bool", - id: 6 - } - } - }, - NewWorkflowExecutionInfo: { - fields: { - workflowId: { - type: "string", - id: 1 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 2 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 3 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 4 - }, - workflowExecutionTimeout: { - type: "google.protobuf.Duration", - id: 5 - }, - workflowRunTimeout: { - type: "google.protobuf.Duration", - id: 6 - }, - workflowTaskTimeout: { - type: "google.protobuf.Duration", - id: 7 - }, - workflowIdReusePolicy: { - type: "temporal.api.enums.v1.WorkflowIdReusePolicy", - id: 8 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 9 - }, - cronSchedule: { - type: "string", - id: 10 - }, - memo: { - type: "temporal.api.common.v1.Memo", - id: 11 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 12 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 13 - }, - userMetadata: { - type: "temporal.api.sdk.v1.UserMetadata", - id: 14 - }, - versioningOverride: { - type: "VersioningOverride", - id: 15 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 16 - } - } - }, - CallbackInfo: { - fields: { - callback: { - type: "temporal.api.common.v1.Callback", - id: 1 - }, - trigger: { - type: "Trigger", - id: 2 - }, - registrationTime: { - type: "google.protobuf.Timestamp", - id: 3 - }, - state: { - type: "temporal.api.enums.v1.CallbackState", - id: 4 - }, - attempt: { - type: "int32", - id: 5 - }, - lastAttemptCompleteTime: { - type: "google.protobuf.Timestamp", - id: 6 - }, - lastAttemptFailure: { - type: "temporal.api.failure.v1.Failure", - id: 7 - }, - nextAttemptScheduleTime: { - type: "google.protobuf.Timestamp", - id: 8 - }, - blockedReason: { - type: "string", - id: 9 - } - }, - nested: { - WorkflowClosed: { - fields: {} - }, - Trigger: { - oneofs: { - variant: { - oneof: [ - "workflowClosed" - ] - } - }, - fields: { - workflowClosed: { - type: "WorkflowClosed", - id: 1 - } - } - } - } - }, - PendingNexusOperationInfo: { - fields: { - endpoint: { - type: "string", - id: 1 - }, - service: { - type: "string", - id: 2 - }, - operation: { - type: "string", - id: 3 - }, - operationId: { - type: "string", - id: 4, - options: { - deprecated: true - } - }, - scheduleToCloseTimeout: { - type: "google.protobuf.Duration", - id: 5 - }, - scheduledTime: { - type: "google.protobuf.Timestamp", - id: 6 - }, - state: { - type: "temporal.api.enums.v1.PendingNexusOperationState", - id: 7 - }, - attempt: { - type: "int32", - id: 8 - }, - lastAttemptCompleteTime: { - type: "google.protobuf.Timestamp", - id: 9 - }, - lastAttemptFailure: { - type: "temporal.api.failure.v1.Failure", - id: 10 - }, - nextAttemptScheduleTime: { - type: "google.protobuf.Timestamp", - id: 11 - }, - cancellationInfo: { - type: "NexusOperationCancellationInfo", - id: 12 - }, - scheduledEventId: { - type: "int64", - id: 13 - }, - blockedReason: { - type: "string", - id: 14 - }, - operationToken: { - type: "string", - id: 15 - }, - scheduleToStartTimeout: { - type: "google.protobuf.Duration", - id: 16 - }, - startToCloseTimeout: { - type: "google.protobuf.Duration", - id: 17 - } - } - }, - NexusOperationCancellationInfo: { - fields: { - requestedTime: { - type: "google.protobuf.Timestamp", - id: 1 - }, - state: { - type: "temporal.api.enums.v1.NexusOperationCancellationState", - id: 2 - }, - attempt: { - type: "int32", - id: 3 - }, - lastAttemptCompleteTime: { - type: "google.protobuf.Timestamp", - id: 4 - }, - lastAttemptFailure: { - type: "temporal.api.failure.v1.Failure", - id: 5 - }, - nextAttemptScheduleTime: { - type: "google.protobuf.Timestamp", - id: 6 - }, - blockedReason: { - type: "string", - id: 7 - } - } - }, - WorkflowExecutionOptions: { - fields: { - versioningOverride: { - type: "VersioningOverride", - id: 1 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 2 - } - } - }, - VersioningOverride: { - oneofs: { - override: { - oneof: [ - "pinned", - "autoUpgrade" - ] - } - }, - fields: { - pinned: { - type: "PinnedOverride", - id: 3 - }, - autoUpgrade: { - type: "bool", - id: 4 - }, - behavior: { - type: "temporal.api.enums.v1.VersioningBehavior", - id: 1, - options: { - deprecated: true - } - }, - deployment: { - type: "temporal.api.deployment.v1.Deployment", - id: 2, - options: { - deprecated: true - } - }, - pinnedVersion: { - type: "string", - id: 9, - options: { - deprecated: true - } - } - }, - nested: { - PinnedOverride: { - fields: { - behavior: { - type: "PinnedOverrideBehavior", - id: 1 - }, - version: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 2 - } - } - }, - PinnedOverrideBehavior: { - values: { - PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED: 0, - PINNED_OVERRIDE_BEHAVIOR_PINNED: 1 - } - } - } - }, - OnConflictOptions: { - fields: { - attachRequestId: { - type: "bool", - id: 1 - }, - attachCompletionCallbacks: { - type: "bool", - id: 2 - }, - attachLinks: { - type: "bool", - id: 3 - } - } - }, - RequestIdInfo: { - fields: { - eventType: { - type: "temporal.api.enums.v1.EventType", - id: 1 - }, - eventId: { - type: "int64", - id: 2 - }, - buffered: { - type: "bool", - id: 3 - } - } - }, - PostResetOperation: { - oneofs: { - variant: { - oneof: [ - "signalWorkflow", - "updateWorkflowOptions" - ] - } - }, - fields: { - signalWorkflow: { - type: "SignalWorkflow", - id: 1 - }, - updateWorkflowOptions: { - type: "UpdateWorkflowOptions", - id: 2 - } - }, - nested: { - SignalWorkflow: { - fields: { - signalName: { - type: "string", - id: 1 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 2 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 3 - }, - links: { - rule: "repeated", - type: "temporal.api.common.v1.Link", - id: 4 - } - } - }, - UpdateWorkflowOptions: { - fields: { - workflowExecutionOptions: { - type: "temporal.api.workflow.v1.WorkflowExecutionOptions", - id: 1 - }, - updateMask: { - type: "google.protobuf.FieldMask", - id: 2 - } - } - } - } - }, - WorkflowExecutionPauseInfo: { - fields: { - identity: { - type: "string", - id: 1 - }, - pausedTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - reason: { - type: "string", - id: 3 - } - } - } - } - } - } - }, - command: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/command/v1;command", - java_package: "io.temporal.api.command.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Command::V1", - csharp_namespace: "Temporalio.Api.Command.V1" - }, - nested: { - ScheduleActivityTaskCommandAttributes: { - fields: { - activityId: { - type: "string", - id: 1 - }, - activityType: { - type: "temporal.api.common.v1.ActivityType", - id: 2 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 4 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 5 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 6 - }, - scheduleToCloseTimeout: { - type: "google.protobuf.Duration", - id: 7 - }, - scheduleToStartTimeout: { - type: "google.protobuf.Duration", - id: 8 - }, - startToCloseTimeout: { - type: "google.protobuf.Duration", - id: 9 - }, - heartbeatTimeout: { - type: "google.protobuf.Duration", - id: 10 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 11 - }, - requestEagerExecution: { - type: "bool", - id: 12 - }, - useWorkflowBuildId: { - type: "bool", - id: 13 - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 14 - } - }, - reserved: [ - [ - 3, - 3 - ] - ] - }, - RequestCancelActivityTaskCommandAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - } - } - }, - StartTimerCommandAttributes: { - fields: { - timerId: { - type: "string", - id: 1 - }, - startToFireTimeout: { - type: "google.protobuf.Duration", - id: 2 - } - } - }, - CompleteWorkflowExecutionCommandAttributes: { - fields: { - result: { - type: "temporal.api.common.v1.Payloads", - id: 1 - } - } - }, - FailWorkflowExecutionCommandAttributes: { - fields: { - failure: { - type: "temporal.api.failure.v1.Failure", - id: 1 - } - } - }, - CancelTimerCommandAttributes: { - fields: { - timerId: { - type: "string", - id: 1 - } - } - }, - CancelWorkflowExecutionCommandAttributes: { - fields: { - details: { - type: "temporal.api.common.v1.Payloads", - id: 1 - } - } - }, - RequestCancelExternalWorkflowExecutionCommandAttributes: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowId: { - type: "string", - id: 2 - }, - runId: { - type: "string", - id: 3 - }, - control: { - type: "string", - id: 4, - options: { - deprecated: true - } - }, - childWorkflowOnly: { - type: "bool", - id: 5 - }, - reason: { - type: "string", - id: 6 - } - } - }, - SignalExternalWorkflowExecutionCommandAttributes: { - fields: { - namespace: { - type: "string", - id: 1 - }, - execution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 2 - }, - signalName: { - type: "string", - id: 3 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 4 - }, - control: { - type: "string", - id: 5, - options: { - deprecated: true - } - }, - childWorkflowOnly: { - type: "bool", - id: 6 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 7 - } - } - }, - UpsertWorkflowSearchAttributesCommandAttributes: { - fields: { - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 1 - } - } - }, - ModifyWorkflowPropertiesCommandAttributes: { - fields: { - upsertedMemo: { - type: "temporal.api.common.v1.Memo", - id: 1 - } - } - }, - RecordMarkerCommandAttributes: { - fields: { - markerName: { - type: "string", - id: 1 - }, - details: { - keyType: "string", - type: "temporal.api.common.v1.Payloads", - id: 2 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 3 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 4 - } - } - }, - ContinueAsNewWorkflowExecutionCommandAttributes: { - fields: { - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 1 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 2 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 3 - }, - workflowRunTimeout: { - type: "google.protobuf.Duration", - id: 4 - }, - workflowTaskTimeout: { - type: "google.protobuf.Duration", - id: 5 - }, - backoffStartInterval: { - type: "google.protobuf.Duration", - id: 6 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 7 - }, - initiator: { - type: "temporal.api.enums.v1.ContinueAsNewInitiator", - id: 8 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 9 - }, - lastCompletionResult: { - type: "temporal.api.common.v1.Payloads", - id: 10 - }, - cronSchedule: { - type: "string", - id: 11 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 12 - }, - memo: { - type: "temporal.api.common.v1.Memo", - id: 13 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 14 - }, - inheritBuildId: { - type: "bool", - id: 15, - options: { - deprecated: true - } - }, - initialVersioningBehavior: { - type: "temporal.api.enums.v1.ContinueAsNewVersioningBehavior", - id: 16 - } - } - }, - StartChildWorkflowExecutionCommandAttributes: { - fields: { - namespace: { - type: "string", - id: 1 - }, - workflowId: { - type: "string", - id: 2 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 3 - }, - taskQueue: { - type: "temporal.api.taskqueue.v1.TaskQueue", - id: 4 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 5 - }, - workflowExecutionTimeout: { - type: "google.protobuf.Duration", - id: 6 - }, - workflowRunTimeout: { - type: "google.protobuf.Duration", - id: 7 - }, - workflowTaskTimeout: { - type: "google.protobuf.Duration", - id: 8 - }, - parentClosePolicy: { - type: "temporal.api.enums.v1.ParentClosePolicy", - id: 9 - }, - control: { - type: "string", - id: 10 - }, - workflowIdReusePolicy: { - type: "temporal.api.enums.v1.WorkflowIdReusePolicy", - id: 11 - }, - retryPolicy: { - type: "temporal.api.common.v1.RetryPolicy", - id: 12 - }, - cronSchedule: { - type: "string", - id: 13 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 14 - }, - memo: { - type: "temporal.api.common.v1.Memo", - id: 15 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 16 - }, - inheritBuildId: { - type: "bool", - id: 17, - options: { - deprecated: true - } - }, - priority: { - type: "temporal.api.common.v1.Priority", - id: 18 - } - } - }, - ProtocolMessageCommandAttributes: { - fields: { - messageId: { - type: "string", - id: 1 - } - } - }, - ScheduleNexusOperationCommandAttributes: { - fields: { - endpoint: { - type: "string", - id: 1 - }, - service: { - type: "string", - id: 2 - }, - operation: { - type: "string", - id: 3 - }, - input: { - type: "temporal.api.common.v1.Payload", - id: 4 - }, - scheduleToCloseTimeout: { - type: "google.protobuf.Duration", - id: 5 - }, - nexusHeader: { - keyType: "string", - type: "string", - id: 6 - }, - scheduleToStartTimeout: { - type: "google.protobuf.Duration", - id: 7 - }, - startToCloseTimeout: { - type: "google.protobuf.Duration", - id: 8 - } - } - }, - RequestCancelNexusOperationCommandAttributes: { - fields: { - scheduledEventId: { - type: "int64", - id: 1 - } - } - }, - Command: { - oneofs: { - attributes: { - oneof: [ - "scheduleActivityTaskCommandAttributes", - "startTimerCommandAttributes", - "completeWorkflowExecutionCommandAttributes", - "failWorkflowExecutionCommandAttributes", - "requestCancelActivityTaskCommandAttributes", - "cancelTimerCommandAttributes", - "cancelWorkflowExecutionCommandAttributes", - "requestCancelExternalWorkflowExecutionCommandAttributes", - "recordMarkerCommandAttributes", - "continueAsNewWorkflowExecutionCommandAttributes", - "startChildWorkflowExecutionCommandAttributes", - "signalExternalWorkflowExecutionCommandAttributes", - "upsertWorkflowSearchAttributesCommandAttributes", - "protocolMessageCommandAttributes", - "modifyWorkflowPropertiesCommandAttributes", - "scheduleNexusOperationCommandAttributes", - "requestCancelNexusOperationCommandAttributes" - ] - } - }, - fields: { - commandType: { - type: "temporal.api.enums.v1.CommandType", - id: 1 - }, - userMetadata: { - type: "temporal.api.sdk.v1.UserMetadata", - id: 301 - }, - scheduleActivityTaskCommandAttributes: { - type: "ScheduleActivityTaskCommandAttributes", - id: 2 - }, - startTimerCommandAttributes: { - type: "StartTimerCommandAttributes", - id: 3 - }, - completeWorkflowExecutionCommandAttributes: { - type: "CompleteWorkflowExecutionCommandAttributes", - id: 4 - }, - failWorkflowExecutionCommandAttributes: { - type: "FailWorkflowExecutionCommandAttributes", - id: 5 - }, - requestCancelActivityTaskCommandAttributes: { - type: "RequestCancelActivityTaskCommandAttributes", - id: 6 - }, - cancelTimerCommandAttributes: { - type: "CancelTimerCommandAttributes", - id: 7 - }, - cancelWorkflowExecutionCommandAttributes: { - type: "CancelWorkflowExecutionCommandAttributes", - id: 8 - }, - requestCancelExternalWorkflowExecutionCommandAttributes: { - type: "RequestCancelExternalWorkflowExecutionCommandAttributes", - id: 9 - }, - recordMarkerCommandAttributes: { - type: "RecordMarkerCommandAttributes", - id: 10 - }, - continueAsNewWorkflowExecutionCommandAttributes: { - type: "ContinueAsNewWorkflowExecutionCommandAttributes", - id: 11 - }, - startChildWorkflowExecutionCommandAttributes: { - type: "StartChildWorkflowExecutionCommandAttributes", - id: 12 - }, - signalExternalWorkflowExecutionCommandAttributes: { - type: "SignalExternalWorkflowExecutionCommandAttributes", - id: 13 - }, - upsertWorkflowSearchAttributesCommandAttributes: { - type: "UpsertWorkflowSearchAttributesCommandAttributes", - id: 14 - }, - protocolMessageCommandAttributes: { - type: "ProtocolMessageCommandAttributes", - id: 15 - }, - modifyWorkflowPropertiesCommandAttributes: { - type: "ModifyWorkflowPropertiesCommandAttributes", - id: 17 - }, - scheduleNexusOperationCommandAttributes: { - type: "ScheduleNexusOperationCommandAttributes", - id: 18 - }, - requestCancelNexusOperationCommandAttributes: { - type: "RequestCancelNexusOperationCommandAttributes", - id: 19 - } - } - } - } - } - } - }, - filter: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/filter/v1;filter", - java_package: "io.temporal.api.filter.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Filter::V1", - csharp_namespace: "Temporalio.Api.Filter.V1" - }, - nested: { - WorkflowExecutionFilter: { - fields: { - workflowId: { - type: "string", - id: 1 - }, - runId: { - type: "string", - id: 2 - } - } - }, - WorkflowTypeFilter: { - fields: { - name: { - type: "string", - id: 1 - } - } - }, - StartTimeFilter: { - fields: { - earliestTime: { - type: "google.protobuf.Timestamp", - id: 1 - }, - latestTime: { - type: "google.protobuf.Timestamp", - id: 2 - } - } - }, - StatusFilter: { - fields: { - status: { - type: "temporal.api.enums.v1.WorkflowExecutionStatus", - id: 1 - } - } - } - } - } - } - }, - protocol: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/protocol/v1;protocol", - java_package: "io.temporal.api.protocol.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Protocol::V1", - csharp_namespace: "Temporalio.Api.Protocol.V1" - }, - nested: { - Message: { - oneofs: { - sequencingId: { - oneof: [ - "eventId", - "commandIndex" - ] - } - }, - fields: { - id: { - type: "string", - id: 1 - }, - protocolInstanceId: { - type: "string", - id: 2 - }, - eventId: { - type: "int64", - id: 3 - }, - commandIndex: { - type: "int64", - id: 4 - }, - body: { - type: "google.protobuf.Any", - id: 5 - } - } - } - } - } - } - }, - namespace: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/namespace/v1;namespace", - java_package: "io.temporal.api.namespace.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Namespace::V1", - csharp_namespace: "Temporalio.Api.Namespace.V1" - }, - nested: { - NamespaceInfo: { - fields: { - name: { - type: "string", - id: 1 - }, - state: { - type: "temporal.api.enums.v1.NamespaceState", - id: 2 - }, - description: { - type: "string", - id: 3 - }, - ownerEmail: { - type: "string", - id: 4 - }, - data: { - keyType: "string", - type: "string", - id: 5 - }, - id: { - type: "string", - id: 6 - }, - capabilities: { - type: "Capabilities", - id: 7 - }, - limits: { - type: "Limits", - id: 8 - }, - supportsSchedules: { - type: "bool", - id: 100 - } - }, - nested: { - Capabilities: { - fields: { - eagerWorkflowStart: { - type: "bool", - id: 1 - }, - syncUpdate: { - type: "bool", - id: 2 - }, - asyncUpdate: { - type: "bool", - id: 3 - }, - workerHeartbeats: { - type: "bool", - id: 4 - }, - reportedProblemsSearchAttribute: { - type: "bool", - id: 5 - }, - workflowPause: { - type: "bool", - id: 6 - }, - standaloneActivities: { - type: "bool", - id: 7 - }, - workerPollCompleteOnShutdown: { - type: "bool", - id: 8 - } - } - }, - Limits: { - fields: { - blobSizeLimitError: { - type: "int64", - id: 1 - }, - memoSizeLimitError: { - type: "int64", - id: 2 - } - } - } - } - }, - NamespaceConfig: { - fields: { - workflowExecutionRetentionTtl: { - type: "google.protobuf.Duration", - id: 1 - }, - badBinaries: { - type: "BadBinaries", - id: 2 - }, - historyArchivalState: { - type: "temporal.api.enums.v1.ArchivalState", - id: 3 - }, - historyArchivalUri: { - type: "string", - id: 4 - }, - visibilityArchivalState: { - type: "temporal.api.enums.v1.ArchivalState", - id: 5 - }, - visibilityArchivalUri: { - type: "string", - id: 6 - }, - customSearchAttributeAliases: { - keyType: "string", - type: "string", - id: 7 - } - } - }, - BadBinaries: { - fields: { - binaries: { - keyType: "string", - type: "BadBinaryInfo", - id: 1 - } - } - }, - BadBinaryInfo: { - fields: { - reason: { - type: "string", - id: 1 - }, - operator: { - type: "string", - id: 2 - }, - createTime: { - type: "google.protobuf.Timestamp", - id: 3 - } - } - }, - UpdateNamespaceInfo: { - fields: { - description: { - type: "string", - id: 1 - }, - ownerEmail: { - type: "string", - id: 2 - }, - data: { - keyType: "string", - type: "string", - id: 3 - }, - state: { - type: "temporal.api.enums.v1.NamespaceState", - id: 4 - } - } - }, - NamespaceFilter: { - fields: { - includeDeleted: { - type: "bool", - id: 1 - } - } - } - } - } - } - }, - query: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/query/v1;query", - java_package: "io.temporal.api.query.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Query::V1", - csharp_namespace: "Temporalio.Api.Query.V1" - }, - nested: { - WorkflowQuery: { - fields: { - queryType: { - type: "string", - id: 1 - }, - queryArgs: { - type: "temporal.api.common.v1.Payloads", - id: 2 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 3 - } - } - }, - WorkflowQueryResult: { - fields: { - resultType: { - type: "temporal.api.enums.v1.QueryResultType", - id: 1 - }, - answer: { - type: "temporal.api.common.v1.Payloads", - id: 2 - }, - errorMessage: { - type: "string", - id: 3 - }, - failure: { - type: "temporal.api.failure.v1.Failure", - id: 4 - } - } - }, - QueryRejected: { - fields: { - status: { - type: "temporal.api.enums.v1.WorkflowExecutionStatus", - id: 1 - } - } - } - } - } - } - }, - replication: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/replication/v1;replication", - java_package: "io.temporal.api.replication.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Replication::V1", - csharp_namespace: "Temporalio.Api.Replication.V1" - }, - nested: { - ClusterReplicationConfig: { - fields: { - clusterName: { - type: "string", - id: 1 - } - } - }, - NamespaceReplicationConfig: { - fields: { - activeClusterName: { - type: "string", - id: 1 - }, - clusters: { - rule: "repeated", - type: "ClusterReplicationConfig", - id: 2 - }, - state: { - type: "temporal.api.enums.v1.ReplicationState", - id: 3 - } - } - }, - FailoverStatus: { - fields: { - failoverTime: { - type: "google.protobuf.Timestamp", - id: 1 - }, - failoverVersion: { - type: "int64", - id: 2 - } - } - } - } - } - } - }, - rules: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/rules/v1;rules", - java_package: "io.temporal.api.rules.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Rules::V1", - csharp_namespace: "Temporalio.Api.Rules.V1" - }, - nested: { - WorkflowRuleAction: { - oneofs: { - variant: { - oneof: [ - "activityPause" - ] - } - }, - fields: { - activityPause: { - type: "ActionActivityPause", - id: 1 - } - }, - nested: { - ActionActivityPause: { - fields: {} - } - } - }, - WorkflowRuleSpec: { - oneofs: { - trigger: { - oneof: [ - "activityStart" - ] - } - }, - fields: { - id: { - type: "string", - id: 1 - }, - activityStart: { - type: "ActivityStartingTrigger", - id: 2 - }, - visibilityQuery: { - type: "string", - id: 3 - }, - actions: { - rule: "repeated", - type: "WorkflowRuleAction", - id: 4 - }, - expirationTime: { - type: "google.protobuf.Timestamp", - id: 5 - } - }, - nested: { - ActivityStartingTrigger: { - fields: { - predicate: { - type: "string", - id: 1 - } - } - } - } - }, - WorkflowRule: { - fields: { - createTime: { - type: "google.protobuf.Timestamp", - id: 1 - }, - spec: { - type: "WorkflowRuleSpec", - id: 2 - }, - createdByIdentity: { - type: "string", - id: 3 - }, - description: { - type: "string", - id: 4 - } - } - } - } - } - } - }, - schedule: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/schedule/v1;schedule", - java_package: "io.temporal.api.schedule.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Schedule::V1", - csharp_namespace: "Temporalio.Api.Schedule.V1" - }, - nested: { - CalendarSpec: { - fields: { - second: { - type: "string", - id: 1 - }, - minute: { - type: "string", - id: 2 - }, - hour: { - type: "string", - id: 3 - }, - dayOfMonth: { - type: "string", - id: 4 - }, - month: { - type: "string", - id: 5 - }, - year: { - type: "string", - id: 6 - }, - dayOfWeek: { - type: "string", - id: 7 - }, - comment: { - type: "string", - id: 8 - } - } - }, - Range: { - fields: { - start: { - type: "int32", - id: 1 - }, - end: { - type: "int32", - id: 2 - }, - step: { - type: "int32", - id: 3 - } - } - }, - StructuredCalendarSpec: { - fields: { - second: { - rule: "repeated", - type: "Range", - id: 1 - }, - minute: { - rule: "repeated", - type: "Range", - id: 2 - }, - hour: { - rule: "repeated", - type: "Range", - id: 3 - }, - dayOfMonth: { - rule: "repeated", - type: "Range", - id: 4 - }, - month: { - rule: "repeated", - type: "Range", - id: 5 - }, - year: { - rule: "repeated", - type: "Range", - id: 6 - }, - dayOfWeek: { - rule: "repeated", - type: "Range", - id: 7 - }, - comment: { - type: "string", - id: 8 - } - } - }, - IntervalSpec: { - fields: { - interval: { - type: "google.protobuf.Duration", - id: 1 - }, - phase: { - type: "google.protobuf.Duration", - id: 2 - } - } - }, - ScheduleSpec: { - fields: { - structuredCalendar: { - rule: "repeated", - type: "StructuredCalendarSpec", - id: 7 - }, - cronString: { - rule: "repeated", - type: "string", - id: 8 - }, - calendar: { - rule: "repeated", - type: "CalendarSpec", - id: 1 - }, - interval: { - rule: "repeated", - type: "IntervalSpec", - id: 2 - }, - excludeCalendar: { - rule: "repeated", - type: "CalendarSpec", - id: 3, - options: { - deprecated: true - } - }, - excludeStructuredCalendar: { - rule: "repeated", - type: "StructuredCalendarSpec", - id: 9 - }, - startTime: { - type: "google.protobuf.Timestamp", - id: 4 - }, - endTime: { - type: "google.protobuf.Timestamp", - id: 5 - }, - jitter: { - type: "google.protobuf.Duration", - id: 6 - }, - timezoneName: { - type: "string", - id: 10 - }, - timezoneData: { - type: "bytes", - id: 11 - } - } - }, - SchedulePolicies: { - fields: { - overlapPolicy: { - type: "temporal.api.enums.v1.ScheduleOverlapPolicy", - id: 1 - }, - catchupWindow: { - type: "google.protobuf.Duration", - id: 2 - }, - pauseOnFailure: { - type: "bool", - id: 3 - }, - keepOriginalWorkflowId: { - type: "bool", - id: 4 - } - } - }, - ScheduleAction: { - oneofs: { - action: { - oneof: [ - "startWorkflow" - ] - } - }, - fields: { - startWorkflow: { - type: "temporal.api.workflow.v1.NewWorkflowExecutionInfo", - id: 1 - } - } - }, - ScheduleActionResult: { - fields: { - scheduleTime: { - type: "google.protobuf.Timestamp", - id: 1 - }, - actualTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - startWorkflowResult: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 11 - }, - startWorkflowStatus: { - type: "temporal.api.enums.v1.WorkflowExecutionStatus", - id: 12 - } - } - }, - ScheduleState: { - fields: { - notes: { - type: "string", - id: 1 - }, - paused: { - type: "bool", - id: 2 - }, - limitedActions: { - type: "bool", - id: 3 - }, - remainingActions: { - type: "int64", - id: 4 - } - } - }, - TriggerImmediatelyRequest: { - fields: { - overlapPolicy: { - type: "temporal.api.enums.v1.ScheduleOverlapPolicy", - id: 1 - }, - scheduledTime: { - type: "google.protobuf.Timestamp", - id: 2 - } - } - }, - BackfillRequest: { - fields: { - startTime: { - type: "google.protobuf.Timestamp", - id: 1 - }, - endTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - overlapPolicy: { - type: "temporal.api.enums.v1.ScheduleOverlapPolicy", - id: 3 - } - } - }, - SchedulePatch: { - fields: { - triggerImmediately: { - type: "TriggerImmediatelyRequest", - id: 1 - }, - backfillRequest: { - rule: "repeated", - type: "BackfillRequest", - id: 2 - }, - pause: { - type: "string", - id: 3 - }, - unpause: { - type: "string", - id: 4 - } - } - }, - ScheduleInfo: { - fields: { - actionCount: { - type: "int64", - id: 1 - }, - missedCatchupWindow: { - type: "int64", - id: 2 - }, - overlapSkipped: { - type: "int64", - id: 3 - }, - bufferDropped: { - type: "int64", - id: 10 - }, - bufferSize: { - type: "int64", - id: 11 - }, - runningWorkflows: { - rule: "repeated", - type: "temporal.api.common.v1.WorkflowExecution", - id: 9 - }, - recentActions: { - rule: "repeated", - type: "ScheduleActionResult", - id: 4 - }, - futureActionTimes: { - rule: "repeated", - type: "google.protobuf.Timestamp", - id: 5 - }, - createTime: { - type: "google.protobuf.Timestamp", - id: 6 - }, - updateTime: { - type: "google.protobuf.Timestamp", - id: 7 - }, - invalidScheduleError: { - type: "string", - id: 8, - options: { - deprecated: true - } - } - } - }, - Schedule: { - fields: { - spec: { - type: "ScheduleSpec", - id: 1 - }, - action: { - type: "ScheduleAction", - id: 2 - }, - policies: { - type: "SchedulePolicies", - id: 3 - }, - state: { - type: "ScheduleState", - id: 4 - } - } - }, - ScheduleListInfo: { - fields: { - spec: { - type: "ScheduleSpec", - id: 1 - }, - workflowType: { - type: "temporal.api.common.v1.WorkflowType", - id: 2 - }, - notes: { - type: "string", - id: 3 - }, - paused: { - type: "bool", - id: 4 - }, - recentActions: { - rule: "repeated", - type: "ScheduleActionResult", - id: 5 - }, - futureActionTimes: { - rule: "repeated", - type: "google.protobuf.Timestamp", - id: 6 - } - } - }, - ScheduleListEntry: { - fields: { - scheduleId: { - type: "string", - id: 1 - }, - memo: { - type: "temporal.api.common.v1.Memo", - id: 2 - }, - searchAttributes: { - type: "temporal.api.common.v1.SearchAttributes", - id: 3 - }, - info: { - type: "ScheduleListInfo", - id: 4 - } - } - } - } - } - } - }, - version: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/version/v1;version", - java_package: "io.temporal.api.version.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Version::V1", - csharp_namespace: "Temporalio.Api.Version.V1" - }, - nested: { - ReleaseInfo: { - fields: { - version: { - type: "string", - id: 1 - }, - releaseTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - notes: { - type: "string", - id: 3 - } - } - }, - Alert: { - fields: { - message: { - type: "string", - id: 1 - }, - severity: { - type: "temporal.api.enums.v1.Severity", - id: 2 - } - } - }, - VersionInfo: { - fields: { - current: { - type: "ReleaseInfo", - id: 1 - }, - recommended: { - type: "ReleaseInfo", - id: 2 - }, - instructions: { - type: "string", - id: 3 - }, - alerts: { - rule: "repeated", - type: "Alert", - id: 4 - }, - lastUpdateTime: { - type: "google.protobuf.Timestamp", - id: 5 - } - } - } - } - } - } - }, - batch: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/batch/v1;batch", - java_package: "io.temporal.api.batch.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Batch::V1", - csharp_namespace: "Temporalio.Api.Batch.V1" - }, - nested: { - BatchOperationInfo: { - fields: { - jobId: { - type: "string", - id: 1 - }, - state: { - type: "temporal.api.enums.v1.BatchOperationState", - id: 2 - }, - startTime: { - type: "google.protobuf.Timestamp", - id: 3 - }, - closeTime: { - type: "google.protobuf.Timestamp", - id: 4 - } - } - }, - BatchOperationTermination: { - fields: { - details: { - type: "temporal.api.common.v1.Payloads", - id: 1 - }, - identity: { - type: "string", - id: 2 - } - } - }, - BatchOperationSignal: { - fields: { - signal: { - type: "string", - id: 1 - }, - input: { - type: "temporal.api.common.v1.Payloads", - id: 2 - }, - header: { - type: "temporal.api.common.v1.Header", - id: 3 - }, - identity: { - type: "string", - id: 4 - } - } - }, - BatchOperationCancellation: { - fields: { - identity: { - type: "string", - id: 1 - } - } - }, - BatchOperationDeletion: { - fields: { - identity: { - type: "string", - id: 1 - } - } - }, - BatchOperationReset: { - fields: { - identity: { - type: "string", - id: 3 - }, - options: { - type: "temporal.api.common.v1.ResetOptions", - id: 4 - }, - resetType: { - type: "temporal.api.enums.v1.ResetType", - id: 1, - options: { - deprecated: true - } - }, - resetReapplyType: { - type: "temporal.api.enums.v1.ResetReapplyType", - id: 2, - options: { - deprecated: true - } - }, - postResetOperations: { - rule: "repeated", - type: "temporal.api.workflow.v1.PostResetOperation", - id: 5 - } - } - }, - BatchOperationUpdateWorkflowExecutionOptions: { - fields: { - identity: { - type: "string", - id: 1 - }, - workflowExecutionOptions: { - type: "temporal.api.workflow.v1.WorkflowExecutionOptions", - id: 2 - }, - updateMask: { - type: "google.protobuf.FieldMask", - id: 3 - } - } - }, - BatchOperationUnpauseActivities: { - oneofs: { - activity: { - oneof: [ - "type", - "matchAll" - ] - } - }, - fields: { - identity: { - type: "string", - id: 1 - }, - type: { - type: "string", - id: 2 - }, - matchAll: { - type: "bool", - id: 3 - }, - resetAttempts: { - type: "bool", - id: 4 - }, - resetHeartbeat: { - type: "bool", - id: 5 - }, - jitter: { - type: "google.protobuf.Duration", - id: 6 - } - } - }, - BatchOperationTriggerWorkflowRule: { - oneofs: { - rule: { - oneof: [ - "id", - "spec" - ] - } - }, - fields: { - identity: { - type: "string", - id: 1 - }, - id: { - type: "string", - id: 2 - }, - spec: { - type: "temporal.api.rules.v1.WorkflowRuleSpec", - id: 3 - } - } - }, - BatchOperationResetActivities: { - oneofs: { - activity: { - oneof: [ - "type", - "matchAll" - ] - } - }, - fields: { - identity: { - type: "string", - id: 1 - }, - type: { - type: "string", - id: 2 - }, - matchAll: { - type: "bool", - id: 3 - }, - resetAttempts: { - type: "bool", - id: 4 - }, - resetHeartbeat: { - type: "bool", - id: 5 - }, - keepPaused: { - type: "bool", - id: 6 - }, - jitter: { - type: "google.protobuf.Duration", - id: 7 - }, - restoreOriginalOptions: { - type: "bool", - id: 8 - } - } - }, - BatchOperationUpdateActivityOptions: { - oneofs: { - activity: { - oneof: [ - "type", - "matchAll" - ] - } - }, - fields: { - identity: { - type: "string", - id: 1 - }, - type: { - type: "string", - id: 2 - }, - matchAll: { - type: "bool", - id: 3 - }, - activityOptions: { - type: "temporal.api.activity.v1.ActivityOptions", - id: 4 - }, - updateMask: { - type: "google.protobuf.FieldMask", - id: 5 - }, - restoreOriginal: { - type: "bool", - id: 6 - } - } - } - } - } - } - }, - worker: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/worker/v1;worker", - java_package: "io.temporal.api.worker.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Worker::V1", - csharp_namespace: "Temporalio.Api.Worker.V1" - }, - nested: { - WorkerPollerInfo: { - fields: { - currentPollers: { - type: "int32", - id: 1 - }, - lastSuccessfulPollTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - isAutoscaling: { - type: "bool", - id: 3 - } - } - }, - WorkerSlotsInfo: { - fields: { - currentAvailableSlots: { - type: "int32", - id: 1 - }, - currentUsedSlots: { - type: "int32", - id: 2 - }, - slotSupplierKind: { - type: "string", - id: 3 - }, - totalProcessedTasks: { - type: "int32", - id: 4 - }, - totalFailedTasks: { - type: "int32", - id: 5 - }, - lastIntervalProcessedTasks: { - type: "int32", - id: 6 - }, - lastIntervalFailureTasks: { - type: "int32", - id: 7 - } - } - }, - WorkerHostInfo: { - fields: { - hostName: { - type: "string", - id: 1 - }, - workerGroupingKey: { - type: "string", - id: 5 - }, - processId: { - type: "string", - id: 2 - }, - currentHostCpuUsage: { - type: "float", - id: 3 - }, - currentHostMemUsage: { - type: "float", - id: 4 - } - } - }, - WorkerHeartbeat: { - fields: { - workerInstanceKey: { - type: "string", - id: 1 - }, - workerIdentity: { - type: "string", - id: 2 - }, - hostInfo: { - type: "WorkerHostInfo", - id: 3 - }, - taskQueue: { - type: "string", - id: 4 - }, - deploymentVersion: { - type: "temporal.api.deployment.v1.WorkerDeploymentVersion", - id: 5 - }, - sdkName: { - type: "string", - id: 6 - }, - sdkVersion: { - type: "string", - id: 7 - }, - status: { - type: "temporal.api.enums.v1.WorkerStatus", - id: 8 - }, - startTime: { - type: "google.protobuf.Timestamp", - id: 9 - }, - heartbeatTime: { - type: "google.protobuf.Timestamp", - id: 10 - }, - elapsedSinceLastHeartbeat: { - type: "google.protobuf.Duration", - id: 11 - }, - workflowTaskSlotsInfo: { - type: "WorkerSlotsInfo", - id: 12 - }, - activityTaskSlotsInfo: { - type: "WorkerSlotsInfo", - id: 13 - }, - nexusTaskSlotsInfo: { - type: "WorkerSlotsInfo", - id: 14 - }, - localActivitySlotsInfo: { - type: "WorkerSlotsInfo", - id: 15 - }, - workflowPollerInfo: { - type: "WorkerPollerInfo", - id: 16 - }, - workflowStickyPollerInfo: { - type: "WorkerPollerInfo", - id: 17 - }, - activityPollerInfo: { - type: "WorkerPollerInfo", - id: 18 - }, - nexusPollerInfo: { - type: "WorkerPollerInfo", - id: 19 - }, - totalStickyCacheHit: { - type: "int32", - id: 20 - }, - totalStickyCacheMiss: { - type: "int32", - id: 21 - }, - currentStickyCacheSize: { - type: "int32", - id: 22 - }, - plugins: { - rule: "repeated", - type: "PluginInfo", - id: 23 - } - } - }, - WorkerInfo: { - fields: { - workerHeartbeat: { - type: "WorkerHeartbeat", - id: 1 - } - } - }, - PluginInfo: { - fields: { - name: { - type: "string", - id: 1 - }, - version: { - type: "string", - id: 2 - } - } - } - } - } - } - }, - operatorservice: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/operatorservice/v1;operatorservice", - java_package: "io.temporal.api.operatorservice.v1", - java_multiple_files: true, - java_outer_classname: "RequestResponseProto", - ruby_package: "Temporalio::Api::OperatorService::V1", - csharp_namespace: "Temporalio.Api.OperatorService.V1" - }, - nested: { - OperatorService: { - methods: { - AddSearchAttributes: { - requestType: "AddSearchAttributesRequest", - responseType: "AddSearchAttributesResponse" - }, - RemoveSearchAttributes: { - requestType: "RemoveSearchAttributesRequest", - responseType: "RemoveSearchAttributesResponse" - }, - ListSearchAttributes: { - requestType: "ListSearchAttributesRequest", - responseType: "ListSearchAttributesResponse", - options: { - "(google.api.http).get": "/cluster/namespaces/{namespace}/search-attributes", - "(google.api.http).additional_bindings.get": "/api/v1/namespaces/{namespace}/search-attributes" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cluster/namespaces/{namespace}/search-attributes", - additional_bindings: { - get: "/api/v1/namespaces/{namespace}/search-attributes" - } - } - } - ] - }, - DeleteNamespace: { - requestType: "DeleteNamespaceRequest", - responseType: "DeleteNamespaceResponse" - }, - AddOrUpdateRemoteCluster: { - requestType: "AddOrUpdateRemoteClusterRequest", - responseType: "AddOrUpdateRemoteClusterResponse" - }, - RemoveRemoteCluster: { - requestType: "RemoveRemoteClusterRequest", - responseType: "RemoveRemoteClusterResponse" - }, - ListClusters: { - requestType: "ListClustersRequest", - responseType: "ListClustersResponse" - }, - GetNexusEndpoint: { - requestType: "GetNexusEndpointRequest", - responseType: "GetNexusEndpointResponse", - options: { - "(google.api.http).get": "/cluster/nexus/endpoints/{id}", - "(google.api.http).additional_bindings.get": "/api/v1/nexus/endpoints/{id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cluster/nexus/endpoints/{id}", - additional_bindings: { - get: "/api/v1/nexus/endpoints/{id}" - } - } - } - ] - }, - CreateNexusEndpoint: { - requestType: "CreateNexusEndpointRequest", - responseType: "CreateNexusEndpointResponse", - options: { - "(google.api.http).post": "/cluster/nexus/endpoints", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/nexus/endpoints", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cluster/nexus/endpoints", - body: "*", - additional_bindings: { - post: "/api/v1/nexus/endpoints", - body: "*" - } - } - } - ] - }, - UpdateNexusEndpoint: { - requestType: "UpdateNexusEndpointRequest", - responseType: "UpdateNexusEndpointResponse", - options: { - "(google.api.http).post": "/cluster/nexus/endpoints/{id}/update", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/api/v1/nexus/endpoints/{id}/update", - "(google.api.http).additional_bindings.body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cluster/nexus/endpoints/{id}/update", - body: "*", - additional_bindings: { - post: "/api/v1/nexus/endpoints/{id}/update", - body: "*" - } - } - } - ] - }, - DeleteNexusEndpoint: { - requestType: "DeleteNexusEndpointRequest", - responseType: "DeleteNexusEndpointResponse", - options: { - "(google.api.http).delete": "/cluster/nexus/endpoints/{id}", - "(google.api.http).additional_bindings.delete": "/api/v1/nexus/endpoints/{id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - "delete": "/cluster/nexus/endpoints/{id}", - additional_bindings: { - "delete": "/api/v1/nexus/endpoints/{id}" - } - } - } - ] - }, - ListNexusEndpoints: { - requestType: "ListNexusEndpointsRequest", - responseType: "ListNexusEndpointsResponse", - options: { - "(google.api.http).get": "/cluster/nexus/endpoints", - "(google.api.http).additional_bindings.get": "/api/v1/nexus/endpoints" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cluster/nexus/endpoints", - additional_bindings: { - get: "/api/v1/nexus/endpoints" - } - } - } - ] - } - } - }, - AddSearchAttributesRequest: { - fields: { - searchAttributes: { - keyType: "string", - type: "temporal.api.enums.v1.IndexedValueType", - id: 1 - }, - namespace: { - type: "string", - id: 2 - } - } - }, - AddSearchAttributesResponse: { - fields: {} - }, - RemoveSearchAttributesRequest: { - fields: { - searchAttributes: { - rule: "repeated", - type: "string", - id: 1 - }, - namespace: { - type: "string", - id: 2 - } - } - }, - RemoveSearchAttributesResponse: { - fields: {} - }, - ListSearchAttributesRequest: { - fields: { - namespace: { - type: "string", - id: 1 - } - } - }, - ListSearchAttributesResponse: { - fields: { - customAttributes: { - keyType: "string", - type: "temporal.api.enums.v1.IndexedValueType", - id: 1 - }, - systemAttributes: { - keyType: "string", - type: "temporal.api.enums.v1.IndexedValueType", - id: 2 - }, - storageSchema: { - keyType: "string", - type: "string", - id: 3 - } - } - }, - DeleteNamespaceRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - namespaceId: { - type: "string", - id: 2 - }, - namespaceDeleteDelay: { - type: "google.protobuf.Duration", - id: 3 - } - } - }, - DeleteNamespaceResponse: { - fields: { - deletedNamespace: { - type: "string", - id: 1 - } - } - }, - AddOrUpdateRemoteClusterRequest: { - fields: { - frontendAddress: { - type: "string", - id: 1 - }, - enableRemoteClusterConnection: { - type: "bool", - id: 2 - }, - frontendHttpAddress: { - type: "string", - id: 3 - }, - enableReplication: { - type: "bool", - id: 4 - } - } - }, - AddOrUpdateRemoteClusterResponse: { - fields: {} - }, - RemoveRemoteClusterRequest: { - fields: { - clusterName: { - type: "string", - id: 1 - } - } - }, - RemoveRemoteClusterResponse: { - fields: {} - }, - ListClustersRequest: { - fields: { - pageSize: { - type: "int32", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - } - } - }, - ListClustersResponse: { - fields: { - clusters: { - rule: "repeated", - type: "ClusterMetadata", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 4 - } - } - }, - ClusterMetadata: { - fields: { - clusterName: { - type: "string", - id: 1 - }, - clusterId: { - type: "string", - id: 2 - }, - address: { - type: "string", - id: 3 - }, - httpAddress: { - type: "string", - id: 7 - }, - initialFailoverVersion: { - type: "int64", - id: 4 - }, - historyShardCount: { - type: "int32", - id: 5 - }, - isConnectionEnabled: { - type: "bool", - id: 6 - }, - isReplicationEnabled: { - type: "bool", - id: 8 - } - } - }, - GetNexusEndpointRequest: { - fields: { - id: { - type: "string", - id: 1 - } - } - }, - GetNexusEndpointResponse: { - fields: { - endpoint: { - type: "temporal.api.nexus.v1.Endpoint", - id: 1 - } - } - }, - CreateNexusEndpointRequest: { - fields: { - spec: { - type: "temporal.api.nexus.v1.EndpointSpec", - id: 1 - } - } - }, - CreateNexusEndpointResponse: { - fields: { - endpoint: { - type: "temporal.api.nexus.v1.Endpoint", - id: 1 - } - } - }, - UpdateNexusEndpointRequest: { - fields: { - id: { - type: "string", - id: 1 - }, - version: { - type: "int64", - id: 2 - }, - spec: { - type: "temporal.api.nexus.v1.EndpointSpec", - id: 3 - } - } - }, - UpdateNexusEndpointResponse: { - fields: { - endpoint: { - type: "temporal.api.nexus.v1.Endpoint", - id: 1 - } - } - }, - DeleteNexusEndpointRequest: { - fields: { - id: { - type: "string", - id: 1 - }, - version: { - type: "int64", - id: 2 - } - } - }, - DeleteNexusEndpointResponse: { - fields: {} - }, - ListNexusEndpointsRequest: { - fields: { - pageSize: { - type: "int32", - id: 1 - }, - nextPageToken: { - type: "bytes", - id: 2 - }, - name: { - type: "string", - id: 3 - } - } - }, - ListNexusEndpointsResponse: { - fields: { - nextPageToken: { - type: "bytes", - id: 1 - }, - endpoints: { - rule: "repeated", - type: "temporal.api.nexus.v1.Endpoint", - id: 2 - } - } - } - } - } - } - }, - cloud: { - nested: { - cloudservice: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/cloud/cloudservice/v1;cloudservice", - java_package: "io.temporal.api.cloud.cloudservice.v1", - java_multiple_files: true, - java_outer_classname: "RequestResponseProto", - ruby_package: "Temporalio::Api::Cloud::CloudService::V1", - csharp_namespace: "Temporalio.Api.Cloud.CloudService.V1" - }, - nested: { - CloudService: { - methods: { - GetUsers: { - requestType: "GetUsersRequest", - responseType: "GetUsersResponse", - options: { - "(google.api.http).get": "/cloud/users" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/users" - } - } - ] - }, - GetUser: { - requestType: "GetUserRequest", - responseType: "GetUserResponse", - options: { - "(google.api.http).get": "/cloud/users/{user_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/users/{user_id}" - } - } - ] - }, - CreateUser: { - requestType: "CreateUserRequest", - responseType: "CreateUserResponse", - options: { - "(google.api.http).post": "/cloud/users", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/users", - body: "*" - } - } - ] - }, - UpdateUser: { - requestType: "UpdateUserRequest", - responseType: "UpdateUserResponse", - options: { - "(google.api.http).post": "/cloud/users/{user_id}", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/users/{user_id}", - body: "*" - } - } - ] - }, - DeleteUser: { - requestType: "DeleteUserRequest", - responseType: "DeleteUserResponse", - options: { - "(google.api.http).delete": "/cloud/users/{user_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - "delete": "/cloud/users/{user_id}" - } - } - ] - }, - SetUserNamespaceAccess: { - requestType: "SetUserNamespaceAccessRequest", - responseType: "SetUserNamespaceAccessResponse", - options: { - "(google.api.http).post": "/cloud/namespaces/{namespace}/users/{user_id}/access", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/namespaces/{namespace}/users/{user_id}/access", - body: "*" - } - } - ] - }, - GetAsyncOperation: { - requestType: "GetAsyncOperationRequest", - responseType: "GetAsyncOperationResponse", - options: { - "(google.api.http).get": "/cloud/operations/{async_operation_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/operations/{async_operation_id}" - } - } - ] - }, - CreateNamespace: { - requestType: "CreateNamespaceRequest", - responseType: "CreateNamespaceResponse", - options: { - "(google.api.http).post": "/cloud/namespaces", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/namespaces", - body: "*" - } - } - ] - }, - GetNamespaces: { - requestType: "GetNamespacesRequest", - responseType: "GetNamespacesResponse", - options: { - "(google.api.http).get": "/cloud/namespaces" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/namespaces" - } - } - ] - }, - GetNamespace: { - requestType: "GetNamespaceRequest", - responseType: "GetNamespaceResponse", - options: { - "(google.api.http).get": "/cloud/namespaces/{namespace}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/namespaces/{namespace}" - } - } - ] - }, - UpdateNamespace: { - requestType: "UpdateNamespaceRequest", - responseType: "UpdateNamespaceResponse", - options: { - "(google.api.http).post": "/cloud/namespaces/{namespace}", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/namespaces/{namespace}", - body: "*" - } - } - ] - }, - RenameCustomSearchAttribute: { - requestType: "RenameCustomSearchAttributeRequest", - responseType: "RenameCustomSearchAttributeResponse", - options: { - "(google.api.http).post": "/cloud/namespaces/{namespace}/rename-custom-search-attribute", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/namespaces/{namespace}/rename-custom-search-attribute", - body: "*" - } - } - ] - }, - DeleteNamespace: { - requestType: "DeleteNamespaceRequest", - responseType: "DeleteNamespaceResponse", - options: { - "(google.api.http).delete": "/cloud/namespaces/{namespace}" - }, - parsedOptions: [ - { - "(google.api.http)": { - "delete": "/cloud/namespaces/{namespace}" - } - } - ] - }, - FailoverNamespaceRegion: { - requestType: "FailoverNamespaceRegionRequest", - responseType: "FailoverNamespaceRegionResponse", - options: { - "(google.api.http).post": "/cloud/namespaces/{namespace}/failover-region", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/namespaces/{namespace}/failover-region", - body: "*" - } - } - ] - }, - AddNamespaceRegion: { - requestType: "AddNamespaceRegionRequest", - responseType: "AddNamespaceRegionResponse", - options: { - "(google.api.http).post": "/cloud/namespaces/{namespace}/add-region", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/namespaces/{namespace}/add-region", - body: "*" - } - } - ] - }, - DeleteNamespaceRegion: { - requestType: "DeleteNamespaceRegionRequest", - responseType: "DeleteNamespaceRegionResponse", - options: { - "(google.api.http).delete": "/cloud/namespaces/{namespace}/regions/{region}" - }, - parsedOptions: [ - { - "(google.api.http)": { - "delete": "/cloud/namespaces/{namespace}/regions/{region}" - } - } - ] - }, - GetRegions: { - requestType: "GetRegionsRequest", - responseType: "GetRegionsResponse", - options: { - "(google.api.http).get": "/cloud/regions" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/regions" - } - } - ] - }, - GetRegion: { - requestType: "GetRegionRequest", - responseType: "GetRegionResponse", - options: { - "(google.api.http).get": "/cloud/regions/{region}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/regions/{region}" - } - } - ] - }, - GetApiKeys: { - requestType: "GetApiKeysRequest", - responseType: "GetApiKeysResponse", - options: { - "(google.api.http).get": "/cloud/api-keys" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/api-keys" - } - } - ] - }, - GetApiKey: { - requestType: "GetApiKeyRequest", - responseType: "GetApiKeyResponse", - options: { - "(google.api.http).get": "/cloud/api-keys/{key_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/api-keys/{key_id}" - } - } - ] - }, - CreateApiKey: { - requestType: "CreateApiKeyRequest", - responseType: "CreateApiKeyResponse", - options: { - "(google.api.http).post": "/cloud/api-keys", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/api-keys", - body: "*" - } - } - ] - }, - UpdateApiKey: { - requestType: "UpdateApiKeyRequest", - responseType: "UpdateApiKeyResponse", - options: { - "(google.api.http).post": "/cloud/api-keys/{key_id}", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/api-keys/{key_id}", - body: "*" - } - } - ] - }, - DeleteApiKey: { - requestType: "DeleteApiKeyRequest", - responseType: "DeleteApiKeyResponse", - options: { - "(google.api.http).delete": "/cloud/api-keys/{key_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - "delete": "/cloud/api-keys/{key_id}" - } - } - ] - }, - GetNexusEndpoints: { - requestType: "GetNexusEndpointsRequest", - responseType: "GetNexusEndpointsResponse", - options: { - "(google.api.http).get": "/cloud/nexus/endpoints" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/nexus/endpoints" - } - } - ] - }, - GetNexusEndpoint: { - requestType: "GetNexusEndpointRequest", - responseType: "GetNexusEndpointResponse", - options: { - "(google.api.http).get": "/cloud/nexus/endpoints/{endpoint_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/nexus/endpoints/{endpoint_id}" - } - } - ] - }, - CreateNexusEndpoint: { - requestType: "CreateNexusEndpointRequest", - responseType: "CreateNexusEndpointResponse", - options: { - "(google.api.http).post": "/cloud/nexus/endpoints", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/nexus/endpoints", - body: "*" - } - } - ] - }, - UpdateNexusEndpoint: { - requestType: "UpdateNexusEndpointRequest", - responseType: "UpdateNexusEndpointResponse", - options: { - "(google.api.http).post": "/cloud/nexus/endpoints/{endpoint_id}", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/nexus/endpoints/{endpoint_id}", - body: "*" - } - } - ] - }, - DeleteNexusEndpoint: { - requestType: "DeleteNexusEndpointRequest", - responseType: "DeleteNexusEndpointResponse", - options: { - "(google.api.http).delete": "/cloud/nexus/endpoints/{endpoint_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - "delete": "/cloud/nexus/endpoints/{endpoint_id}" - } - } - ] - }, - GetUserGroups: { - requestType: "GetUserGroupsRequest", - responseType: "GetUserGroupsResponse", - options: { - "(google.api.http).get": "/cloud/user-groups" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/user-groups" - } - } - ] - }, - GetUserGroup: { - requestType: "GetUserGroupRequest", - responseType: "GetUserGroupResponse", - options: { - "(google.api.http).get": "/cloud/user-groups/{group_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/user-groups/{group_id}" - } - } - ] - }, - CreateUserGroup: { - requestType: "CreateUserGroupRequest", - responseType: "CreateUserGroupResponse", - options: { - "(google.api.http).post": "/cloud/user-groups", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/user-groups", - body: "*" - } - } - ] - }, - UpdateUserGroup: { - requestType: "UpdateUserGroupRequest", - responseType: "UpdateUserGroupResponse", - options: { - "(google.api.http).post": "/cloud/user-groups/{group_id}", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/user-groups/{group_id}", - body: "*" - } - } - ] - }, - DeleteUserGroup: { - requestType: "DeleteUserGroupRequest", - responseType: "DeleteUserGroupResponse", - options: { - "(google.api.http).delete": "/cloud/user-groups/{group_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - "delete": "/cloud/user-groups/{group_id}" - } - } - ] - }, - SetUserGroupNamespaceAccess: { - requestType: "SetUserGroupNamespaceAccessRequest", - responseType: "SetUserGroupNamespaceAccessResponse", - options: { - "(google.api.http).post": "/cloud/namespaces/{namespace}/user-groups/{group_id}/access", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/namespaces/{namespace}/user-groups/{group_id}/access", - body: "*" - } - } - ] - }, - AddUserGroupMember: { - requestType: "AddUserGroupMemberRequest", - responseType: "AddUserGroupMemberResponse", - options: { - "(google.api.http).post": "/cloud/user-groups/{group_id}/members", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/user-groups/{group_id}/members", - body: "*" - } - } - ] - }, - RemoveUserGroupMember: { - requestType: "RemoveUserGroupMemberRequest", - responseType: "RemoveUserGroupMemberResponse", - options: { - "(google.api.http).post": "/cloud/user-groups/{group_id}/remove-member", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/user-groups/{group_id}/remove-member", - body: "*" - } - } - ] - }, - GetUserGroupMembers: { - requestType: "GetUserGroupMembersRequest", - responseType: "GetUserGroupMembersResponse", - options: { - "(google.api.http).get": "/cloud/user-groups/{group_id}/members" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/user-groups/{group_id}/members" - } - } - ] - }, - CreateServiceAccount: { - requestType: "CreateServiceAccountRequest", - responseType: "CreateServiceAccountResponse", - options: { - "(google.api.http).post": "/cloud/service-accounts", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/service-accounts", - body: "*" - } - } - ] - }, - GetServiceAccount: { - requestType: "GetServiceAccountRequest", - responseType: "GetServiceAccountResponse", - options: { - "(google.api.http).get": "/cloud/service-accounts/{service_account_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/service-accounts/{service_account_id}" - } - } - ] - }, - GetServiceAccounts: { - requestType: "GetServiceAccountsRequest", - responseType: "GetServiceAccountsResponse", - options: { - "(google.api.http).get": "/cloud/service-accounts" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/service-accounts" - } - } - ] - }, - UpdateServiceAccount: { - requestType: "UpdateServiceAccountRequest", - responseType: "UpdateServiceAccountResponse", - options: { - "(google.api.http).post": "/cloud/service-accounts/{service_account_id}", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/service-accounts/{service_account_id}", - body: "*" - } - } - ] - }, - SetServiceAccountNamespaceAccess: { - requestType: "SetServiceAccountNamespaceAccessRequest", - responseType: "SetServiceAccountNamespaceAccessResponse", - options: { - "(google.api.http).post": "/cloud/namespaces/{namespace}/service-accounts/{service_account_id}/access", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/namespaces/{namespace}/service-accounts/{service_account_id}/access", - body: "*" - } - } - ] - }, - DeleteServiceAccount: { - requestType: "DeleteServiceAccountRequest", - responseType: "DeleteServiceAccountResponse", - options: { - "(google.api.http).delete": "/cloud/service-accounts/{service_account_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - "delete": "/cloud/service-accounts/{service_account_id}" - } - } - ] - }, - GetUsage: { - requestType: "GetUsageRequest", - responseType: "GetUsageResponse", - options: { - "(google.api.http).get": "/cloud/usage" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/usage" - } - } - ] - }, - GetAccount: { - requestType: "GetAccountRequest", - responseType: "GetAccountResponse", - options: { - "(google.api.http).get": "/cloud/account" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/account" - } - } - ] - }, - UpdateAccount: { - requestType: "UpdateAccountRequest", - responseType: "UpdateAccountResponse", - options: { - "(google.api.http).post": "/cloud/account", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/account", - body: "*" - } - } - ] - }, - CreateNamespaceExportSink: { - requestType: "CreateNamespaceExportSinkRequest", - responseType: "CreateNamespaceExportSinkResponse", - options: { - "(google.api.http).post": "/cloud/namespaces/{namespace}/export-sinks", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/namespaces/{namespace}/export-sinks", - body: "*" - } - } - ] - }, - GetNamespaceExportSink: { - requestType: "GetNamespaceExportSinkRequest", - responseType: "GetNamespaceExportSinkResponse", - options: { - "(google.api.http).get": "/cloud/namespaces/{namespace}/export-sinks/{name}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/namespaces/{namespace}/export-sinks/{name}" - } - } - ] - }, - GetNamespaceExportSinks: { - requestType: "GetNamespaceExportSinksRequest", - responseType: "GetNamespaceExportSinksResponse", - options: { - "(google.api.http).get": "/cloud/namespaces/{namespace}/export-sinks" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/namespaces/{namespace}/export-sinks" - } - } - ] - }, - UpdateNamespaceExportSink: { - requestType: "UpdateNamespaceExportSinkRequest", - responseType: "UpdateNamespaceExportSinkResponse", - options: { - "(google.api.http).post": "/cloud/namespaces/{namespace}/export-sinks/{spec.name}", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/namespaces/{namespace}/export-sinks/{spec.name}", - body: "*" - } - } - ] - }, - DeleteNamespaceExportSink: { - requestType: "DeleteNamespaceExportSinkRequest", - responseType: "DeleteNamespaceExportSinkResponse", - options: { - "(google.api.http).delete": "/cloud/namespaces/{namespace}/export-sinks/{name}" - }, - parsedOptions: [ - { - "(google.api.http)": { - "delete": "/cloud/namespaces/{namespace}/export-sinks/{name}" - } - } - ] - }, - ValidateNamespaceExportSink: { - requestType: "ValidateNamespaceExportSinkRequest", - responseType: "ValidateNamespaceExportSinkResponse", - options: { - "(google.api.http).post": "/cloud/namespaces/{namespace}/export-sinks/validate", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/namespaces/{namespace}/export-sinks/validate", - body: "*" - } - } - ] - }, - UpdateNamespaceTags: { - requestType: "UpdateNamespaceTagsRequest", - responseType: "UpdateNamespaceTagsResponse", - options: { - "(google.api.http).post": "/cloud/namespaces/{namespace}/update-tags", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/namespaces/{namespace}/update-tags", - body: "*" - } - } - ] - }, - CreateConnectivityRule: { - requestType: "CreateConnectivityRuleRequest", - responseType: "CreateConnectivityRuleResponse", - options: { - "(google.api.http).post": "/cloud/connectivity-rules", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/connectivity-rules", - body: "*" - } - } - ] - }, - GetConnectivityRule: { - requestType: "GetConnectivityRuleRequest", - responseType: "GetConnectivityRuleResponse", - options: { - "(google.api.http).get": "/cloud/connectivity-rules/{connectivity_rule_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/connectivity-rules/{connectivity_rule_id}" - } - } - ] - }, - GetConnectivityRules: { - requestType: "GetConnectivityRulesRequest", - responseType: "GetConnectivityRulesResponse", - options: { - "(google.api.http).get": "/cloud/connectivity-rules" - }, - parsedOptions: [ - { - "(google.api.http)": { - get: "/cloud/connectivity-rules" - } - } - ] - }, - DeleteConnectivityRule: { - requestType: "DeleteConnectivityRuleRequest", - responseType: "DeleteConnectivityRuleResponse", - options: { - "(google.api.http).delete": "/cloud/connectivity-rules/{connectivity_rule_id}" - }, - parsedOptions: [ - { - "(google.api.http)": { - "delete": "/cloud/connectivity-rules/{connectivity_rule_id}" - } - } - ] - }, - ValidateAccountAuditLogSink: { - requestType: "ValidateAccountAuditLogSinkRequest", - responseType: "ValidateAccountAuditLogSinkResponse", - options: { - "(google.api.http).post": "/cloud/account/audit-logs/sink/validate", - "(google.api.http).body": "*" - }, - parsedOptions: [ - { - "(google.api.http)": { - post: "/cloud/account/audit-logs/sink/validate", - body: "*" - } - } - ] - } - } - }, - GetUsersRequest: { - fields: { - pageSize: { - type: "int32", - id: 1 - }, - pageToken: { - type: "string", - id: 2 - }, - email: { - type: "string", - id: 3 - }, - namespace: { - type: "string", - id: 4 - } - } - }, - GetUsersResponse: { - fields: { - users: { - rule: "repeated", - type: "temporal.api.cloud.identity.v1.User", - id: 1 - }, - nextPageToken: { - type: "string", - id: 2 - } - } - }, - GetUserRequest: { - fields: { - userId: { - type: "string", - id: 1 - } - } - }, - GetUserResponse: { - fields: { - user: { - type: "temporal.api.cloud.identity.v1.User", - id: 1 - } - } - }, - CreateUserRequest: { - fields: { - spec: { - type: "temporal.api.cloud.identity.v1.UserSpec", - id: 1 - }, - asyncOperationId: { - type: "string", - id: 2 - } - } - }, - CreateUserResponse: { - fields: { - userId: { - type: "string", - id: 1 - }, - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 2 - } - } - }, - UpdateUserRequest: { - fields: { - userId: { - type: "string", - id: 1 - }, - spec: { - type: "temporal.api.cloud.identity.v1.UserSpec", - id: 2 - }, - resourceVersion: { - type: "string", - id: 3 - }, - asyncOperationId: { - type: "string", - id: 4 - } - } - }, - UpdateUserResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - DeleteUserRequest: { - fields: { - userId: { - type: "string", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - asyncOperationId: { - type: "string", - id: 3 - } - } - }, - DeleteUserResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - SetUserNamespaceAccessRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - userId: { - type: "string", - id: 2 - }, - access: { - type: "temporal.api.cloud.identity.v1.NamespaceAccess", - id: 3 - }, - resourceVersion: { - type: "string", - id: 4 - }, - asyncOperationId: { - type: "string", - id: 5 - } - } - }, - SetUserNamespaceAccessResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - GetAsyncOperationRequest: { - fields: { - asyncOperationId: { - type: "string", - id: 1 - } - } - }, - GetAsyncOperationResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - CreateNamespaceRequest: { - fields: { - spec: { - type: "temporal.api.cloud.namespace.v1.NamespaceSpec", - id: 2 - }, - asyncOperationId: { - type: "string", - id: 3 - }, - tags: { - keyType: "string", - type: "string", - id: 4 - } - } - }, - CreateNamespaceResponse: { - fields: { - namespace: { - type: "string", - id: 1 - }, - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 2 - } - } - }, - GetNamespacesRequest: { - fields: { - pageSize: { - type: "int32", - id: 1 - }, - pageToken: { - type: "string", - id: 2 - }, - name: { - type: "string", - id: 3 - } - } - }, - GetNamespacesResponse: { - fields: { - namespaces: { - rule: "repeated", - type: "temporal.api.cloud.namespace.v1.Namespace", - id: 1 - }, - nextPageToken: { - type: "string", - id: 2 - } - } - }, - GetNamespaceRequest: { - fields: { - namespace: { - type: "string", - id: 1 - } - } - }, - GetNamespaceResponse: { - fields: { - namespace: { - type: "temporal.api.cloud.namespace.v1.Namespace", - id: 1 - } - } - }, - UpdateNamespaceRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - spec: { - type: "temporal.api.cloud.namespace.v1.NamespaceSpec", - id: 2 - }, - resourceVersion: { - type: "string", - id: 3 - }, - asyncOperationId: { - type: "string", - id: 4 - } - } - }, - UpdateNamespaceResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - RenameCustomSearchAttributeRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - existingCustomSearchAttributeName: { - type: "string", - id: 2 - }, - newCustomSearchAttributeName: { - type: "string", - id: 3 - }, - resourceVersion: { - type: "string", - id: 4 - }, - asyncOperationId: { - type: "string", - id: 5 - } - } - }, - RenameCustomSearchAttributeResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - DeleteNamespaceRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - asyncOperationId: { - type: "string", - id: 3 - } - } - }, - DeleteNamespaceResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - FailoverNamespaceRegionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - region: { - type: "string", - id: 2 - }, - asyncOperationId: { - type: "string", - id: 3 - } - } - }, - FailoverNamespaceRegionResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - AddNamespaceRegionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - region: { - type: "string", - id: 2 - }, - resourceVersion: { - type: "string", - id: 3 - }, - asyncOperationId: { - type: "string", - id: 4 - } - } - }, - AddNamespaceRegionResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - DeleteNamespaceRegionRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - region: { - type: "string", - id: 2 - }, - resourceVersion: { - type: "string", - id: 3 - }, - asyncOperationId: { - type: "string", - id: 4 - } - } - }, - DeleteNamespaceRegionResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - GetRegionsRequest: { - fields: {} - }, - GetRegionsResponse: { - fields: { - regions: { - rule: "repeated", - type: "temporal.api.cloud.region.v1.Region", - id: 1 - } - } - }, - GetRegionRequest: { - fields: { - region: { - type: "string", - id: 1 - } - } - }, - GetRegionResponse: { - fields: { - region: { - type: "temporal.api.cloud.region.v1.Region", - id: 1 - } - } - }, - GetApiKeysRequest: { - fields: { - pageSize: { - type: "int32", - id: 1 - }, - pageToken: { - type: "string", - id: 2 - }, - ownerId: { - type: "string", - id: 3 - }, - ownerTypeDeprecated: { - type: "string", - id: 4, - options: { - deprecated: true - } - }, - ownerType: { - type: "temporal.api.cloud.identity.v1.OwnerType", - id: 5 - } - } - }, - GetApiKeysResponse: { - fields: { - apiKeys: { - rule: "repeated", - type: "temporal.api.cloud.identity.v1.ApiKey", - id: 1 - }, - nextPageToken: { - type: "string", - id: 2 - } - } - }, - GetApiKeyRequest: { - fields: { - keyId: { - type: "string", - id: 1 - } - } - }, - GetApiKeyResponse: { - fields: { - apiKey: { - type: "temporal.api.cloud.identity.v1.ApiKey", - id: 1 - } - } - }, - CreateApiKeyRequest: { - fields: { - spec: { - type: "temporal.api.cloud.identity.v1.ApiKeySpec", - id: 1 - }, - asyncOperationId: { - type: "string", - id: 2 - } - } - }, - CreateApiKeyResponse: { - fields: { - keyId: { - type: "string", - id: 1 - }, - token: { - type: "string", - id: 2 - }, - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 3 - } - } - }, - UpdateApiKeyRequest: { - fields: { - keyId: { - type: "string", - id: 1 - }, - spec: { - type: "temporal.api.cloud.identity.v1.ApiKeySpec", - id: 2 - }, - resourceVersion: { - type: "string", - id: 3 - }, - asyncOperationId: { - type: "string", - id: 4 - } - } - }, - UpdateApiKeyResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - DeleteApiKeyRequest: { - fields: { - keyId: { - type: "string", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - asyncOperationId: { - type: "string", - id: 3 - } - } - }, - DeleteApiKeyResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - GetNexusEndpointsRequest: { - fields: { - pageSize: { - type: "int32", - id: 1 - }, - pageToken: { - type: "string", - id: 2 - }, - targetNamespaceId: { - type: "string", - id: 3 - }, - targetTaskQueue: { - type: "string", - id: 4 - }, - name: { - type: "string", - id: 5 - } - } - }, - GetNexusEndpointsResponse: { - fields: { - endpoints: { - rule: "repeated", - type: "temporal.api.cloud.nexus.v1.Endpoint", - id: 1 - }, - nextPageToken: { - type: "string", - id: 2 - } - } - }, - GetNexusEndpointRequest: { - fields: { - endpointId: { - type: "string", - id: 1 - } - } - }, - GetNexusEndpointResponse: { - fields: { - endpoint: { - type: "temporal.api.cloud.nexus.v1.Endpoint", - id: 1 - } - } - }, - CreateNexusEndpointRequest: { - fields: { - spec: { - type: "temporal.api.cloud.nexus.v1.EndpointSpec", - id: 1 - }, - asyncOperationId: { - type: "string", - id: 2 - } - } - }, - CreateNexusEndpointResponse: { - fields: { - endpointId: { - type: "string", - id: 1 - }, - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 2 - } - } - }, - UpdateNexusEndpointRequest: { - fields: { - endpointId: { - type: "string", - id: 1 - }, - spec: { - type: "temporal.api.cloud.nexus.v1.EndpointSpec", - id: 2 - }, - resourceVersion: { - type: "string", - id: 3 - }, - asyncOperationId: { - type: "string", - id: 4 - } - } - }, - UpdateNexusEndpointResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - DeleteNexusEndpointRequest: { - fields: { - endpointId: { - type: "string", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - asyncOperationId: { - type: "string", - id: 3 - } - } - }, - DeleteNexusEndpointResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - GetUserGroupsRequest: { - fields: { - pageSize: { - type: "int32", - id: 1 - }, - pageToken: { - type: "string", - id: 2 - }, - namespace: { - type: "string", - id: 3 - }, - displayName: { - type: "string", - id: 4 - }, - googleGroup: { - type: "GoogleGroupFilter", - id: 5 - }, - scimGroup: { - type: "SCIMGroupFilter", - id: 6 - } - }, - nested: { - GoogleGroupFilter: { - fields: { - emailAddress: { - type: "string", - id: 1 - } - } - }, - SCIMGroupFilter: { - fields: { - idpId: { - type: "string", - id: 1 - } - } - } - } - }, - GetUserGroupsResponse: { - fields: { - groups: { - rule: "repeated", - type: "temporal.api.cloud.identity.v1.UserGroup", - id: 1 - }, - nextPageToken: { - type: "string", - id: 2 - } - } - }, - GetUserGroupRequest: { - fields: { - groupId: { - type: "string", - id: 1 - } - } - }, - GetUserGroupResponse: { - fields: { - group: { - type: "temporal.api.cloud.identity.v1.UserGroup", - id: 1 - } - } - }, - CreateUserGroupRequest: { - fields: { - spec: { - type: "temporal.api.cloud.identity.v1.UserGroupSpec", - id: 1 - }, - asyncOperationId: { - type: "string", - id: 2 - } - } - }, - CreateUserGroupResponse: { - fields: { - groupId: { - type: "string", - id: 1 - }, - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 2 - } - } - }, - UpdateUserGroupRequest: { - fields: { - groupId: { - type: "string", - id: 1 - }, - spec: { - type: "temporal.api.cloud.identity.v1.UserGroupSpec", - id: 2 - }, - resourceVersion: { - type: "string", - id: 3 - }, - asyncOperationId: { - type: "string", - id: 4 - } - } - }, - UpdateUserGroupResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - DeleteUserGroupRequest: { - fields: { - groupId: { - type: "string", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - asyncOperationId: { - type: "string", - id: 3 - } - } - }, - DeleteUserGroupResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - SetUserGroupNamespaceAccessRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - groupId: { - type: "string", - id: 2 - }, - access: { - type: "temporal.api.cloud.identity.v1.NamespaceAccess", - id: 3 - }, - resourceVersion: { - type: "string", - id: 4 - }, - asyncOperationId: { - type: "string", - id: 5 - } - } - }, - SetUserGroupNamespaceAccessResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - AddUserGroupMemberRequest: { - fields: { - groupId: { - type: "string", - id: 1 - }, - memberId: { - type: "temporal.api.cloud.identity.v1.UserGroupMemberId", - id: 2 - }, - asyncOperationId: { - type: "string", - id: 3 - } - } - }, - AddUserGroupMemberResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - RemoveUserGroupMemberRequest: { - fields: { - groupId: { - type: "string", - id: 1 - }, - memberId: { - type: "temporal.api.cloud.identity.v1.UserGroupMemberId", - id: 2 - }, - asyncOperationId: { - type: "string", - id: 3 - } - } - }, - RemoveUserGroupMemberResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - GetUserGroupMembersRequest: { - fields: { - pageSize: { - type: "int32", - id: 1 - }, - pageToken: { - type: "string", - id: 2 - }, - groupId: { - type: "string", - id: 3 - } - } - }, - GetUserGroupMembersResponse: { - fields: { - members: { - rule: "repeated", - type: "temporal.api.cloud.identity.v1.UserGroupMember", - id: 1 - }, - nextPageToken: { - type: "string", - id: 2 - } - } - }, - CreateServiceAccountRequest: { - fields: { - spec: { - type: "temporal.api.cloud.identity.v1.ServiceAccountSpec", - id: 1 - }, - asyncOperationId: { - type: "string", - id: 2 - } - } - }, - CreateServiceAccountResponse: { - fields: { - serviceAccountId: { - type: "string", - id: 1 - }, - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 2 - } - } - }, - GetServiceAccountRequest: { - fields: { - serviceAccountId: { - type: "string", - id: 1 - } - } - }, - GetServiceAccountResponse: { - fields: { - serviceAccount: { - type: "temporal.api.cloud.identity.v1.ServiceAccount", - id: 1 - } - } - }, - GetServiceAccountsRequest: { - fields: { - pageSize: { - type: "int32", - id: 1 - }, - pageToken: { - type: "string", - id: 2 - } - } - }, - GetServiceAccountsResponse: { - fields: { - serviceAccount: { - rule: "repeated", - type: "temporal.api.cloud.identity.v1.ServiceAccount", - id: 1 - }, - nextPageToken: { - type: "string", - id: 2 - } - } - }, - UpdateServiceAccountRequest: { - fields: { - serviceAccountId: { - type: "string", - id: 1 - }, - spec: { - type: "temporal.api.cloud.identity.v1.ServiceAccountSpec", - id: 2 - }, - resourceVersion: { - type: "string", - id: 3 - }, - asyncOperationId: { - type: "string", - id: 4 - } - } - }, - UpdateServiceAccountResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - SetServiceAccountNamespaceAccessRequest: { - fields: { - serviceAccountId: { - type: "string", - id: 1 - }, - namespace: { - type: "string", - id: 2 - }, - access: { - type: "temporal.api.cloud.identity.v1.NamespaceAccess", - id: 3 - }, - resourceVersion: { - type: "string", - id: 4 - }, - asyncOperationId: { - type: "string", - id: 5 - } - } - }, - SetServiceAccountNamespaceAccessResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - DeleteServiceAccountRequest: { - fields: { - serviceAccountId: { - type: "string", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - asyncOperationId: { - type: "string", - id: 3 - } - } - }, - DeleteServiceAccountResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - GetUsageRequest: { - fields: { - startTimeInclusive: { - type: "google.protobuf.Timestamp", - id: 1 - }, - endTimeExclusive: { - type: "google.protobuf.Timestamp", - id: 2 - }, - pageSize: { - type: "int32", - id: 3 - }, - pageToken: { - type: "string", - id: 4 - } - } - }, - GetUsageResponse: { - fields: { - summaries: { - rule: "repeated", - type: "temporal.api.cloud.usage.v1.Summary", - id: 1 - }, - nextPageToken: { - type: "string", - id: 2 - } - } - }, - GetAccountRequest: { - fields: {} - }, - GetAccountResponse: { - fields: { - account: { - type: "temporal.api.cloud.account.v1.Account", - id: 1 - } - } - }, - UpdateAccountRequest: { - fields: { - spec: { - type: "temporal.api.cloud.account.v1.AccountSpec", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - asyncOperationId: { - type: "string", - id: 3 - } - } - }, - UpdateAccountResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - CreateNamespaceExportSinkRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - spec: { - type: "temporal.api.cloud.namespace.v1.ExportSinkSpec", - id: 2 - }, - asyncOperationId: { - type: "string", - id: 3 - } - } - }, - CreateNamespaceExportSinkResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - GetNamespaceExportSinkRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - name: { - type: "string", - id: 2 - } - } - }, - GetNamespaceExportSinkResponse: { - fields: { - sink: { - type: "temporal.api.cloud.namespace.v1.ExportSink", - id: 1 - } - } - }, - GetNamespaceExportSinksRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - pageSize: { - type: "int32", - id: 2 - }, - pageToken: { - type: "string", - id: 3 - } - } - }, - GetNamespaceExportSinksResponse: { - fields: { - sinks: { - rule: "repeated", - type: "temporal.api.cloud.namespace.v1.ExportSink", - id: 1 - }, - nextPageToken: { - type: "string", - id: 2 - } - } - }, - UpdateNamespaceExportSinkRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - spec: { - type: "temporal.api.cloud.namespace.v1.ExportSinkSpec", - id: 2 - }, - resourceVersion: { - type: "string", - id: 3 - }, - asyncOperationId: { - type: "string", - id: 4 - } - } - }, - UpdateNamespaceExportSinkResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - DeleteNamespaceExportSinkRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - name: { - type: "string", - id: 2 - }, - resourceVersion: { - type: "string", - id: 3 - }, - asyncOperationId: { - type: "string", - id: 4 - } - } - }, - DeleteNamespaceExportSinkResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - ValidateNamespaceExportSinkRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - spec: { - type: "temporal.api.cloud.namespace.v1.ExportSinkSpec", - id: 2 - } - } - }, - ValidateNamespaceExportSinkResponse: { - fields: {} - }, - UpdateNamespaceTagsRequest: { - fields: { - namespace: { - type: "string", - id: 1 - }, - tagsToUpsert: { - keyType: "string", - type: "string", - id: 2 - }, - tagsToRemove: { - rule: "repeated", - type: "string", - id: 3 - }, - asyncOperationId: { - type: "string", - id: 4 - } - } - }, - UpdateNamespaceTagsResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - CreateConnectivityRuleRequest: { - fields: { - spec: { - type: "temporal.api.cloud.connectivityrule.v1.ConnectivityRuleSpec", - id: 1 - }, - asyncOperationId: { - type: "string", - id: 2 - } - } - }, - CreateConnectivityRuleResponse: { - fields: { - connectivityRuleId: { - type: "string", - id: 1 - }, - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 2 - } - } - }, - GetConnectivityRuleRequest: { - fields: { - connectivityRuleId: { - type: "string", - id: 1 - } - } - }, - GetConnectivityRuleResponse: { - fields: { - connectivityRule: { - type: "temporal.api.cloud.connectivityrule.v1.ConnectivityRule", - id: 1 - } - } - }, - GetConnectivityRulesRequest: { - fields: { - pageSize: { - type: "int32", - id: 1 - }, - pageToken: { - type: "string", - id: 2 - }, - namespace: { - type: "string", - id: 3 - } - } - }, - GetConnectivityRulesResponse: { - fields: { - connectivityRules: { - rule: "repeated", - type: "temporal.api.cloud.connectivityrule.v1.ConnectivityRule", - id: 1 - }, - nextPageToken: { - type: "string", - id: 2 - } - } - }, - DeleteConnectivityRuleRequest: { - fields: { - connectivityRuleId: { - type: "string", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - asyncOperationId: { - type: "string", - id: 3 - } - } - }, - DeleteConnectivityRuleResponse: { - fields: { - asyncOperation: { - type: "temporal.api.cloud.operation.v1.AsyncOperation", - id: 1 - } - } - }, - ValidateAccountAuditLogSinkRequest: { - fields: { - spec: { - type: "temporal.api.cloud.account.v1.AuditLogSinkSpec", - id: 1 - } - } - }, - ValidateAccountAuditLogSinkResponse: { - fields: {} - } - } - } - } - }, - operation: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/cloud/operation/v1;operation", - java_package: "io.temporal.api.cloud.operation.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Cloud::Operation::V1", - csharp_namespace: "Temporalio.Api.Cloud.Operation.V1" - }, - nested: { - AsyncOperation: { - fields: { - id: { - type: "string", - id: 1 - }, - stateDeprecated: { - type: "string", - id: 2, - options: { - deprecated: true - } - }, - state: { - type: "State", - id: 9 - }, - checkDuration: { - type: "google.protobuf.Duration", - id: 3 - }, - operationType: { - type: "string", - id: 4 - }, - operationInput: { - type: "google.protobuf.Any", - id: 5 - }, - failureReason: { - type: "string", - id: 6 - }, - startedTime: { - type: "google.protobuf.Timestamp", - id: 7 - }, - finishedTime: { - type: "google.protobuf.Timestamp", - id: 8 - } - }, - nested: { - State: { - values: { - STATE_UNSPECIFIED: 0, - STATE_PENDING: 1, - STATE_IN_PROGRESS: 2, - STATE_FAILED: 3, - STATE_CANCELLED: 4, - STATE_FULFILLED: 5, - STATE_REJECTED: 6 - } - } - } - } - } - } - } - }, - identity: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/cloud/identity/v1;identity", - java_package: "io.temporal.api.cloud.identity.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Cloud::Identity::V1", - csharp_namespace: "Temporalio.Api.Cloud.Identity.V1" - }, - nested: { - AccountAccess: { - fields: { - roleDeprecated: { - type: "string", - id: 1, - options: { - deprecated: true - } - }, - role: { - type: "Role", - id: 2 - } - }, - nested: { - Role: { - values: { - ROLE_UNSPECIFIED: 0, - ROLE_OWNER: 1, - ROLE_ADMIN: 2, - ROLE_DEVELOPER: 3, - ROLE_FINANCE_ADMIN: 4, - ROLE_READ: 5, - ROLE_METRICS_READ: 6 - } - } - } - }, - NamespaceAccess: { - fields: { - permissionDeprecated: { - type: "string", - id: 1, - options: { - deprecated: true - } - }, - permission: { - type: "Permission", - id: 2 - } - }, - nested: { - Permission: { - values: { - PERMISSION_UNSPECIFIED: 0, - PERMISSION_ADMIN: 1, - PERMISSION_WRITE: 2, - PERMISSION_READ: 3 - } - } - } - }, - OwnerType: { - values: { - OWNER_TYPE_UNSPECIFIED: 0, - OWNER_TYPE_USER: 1, - OWNER_TYPE_SERVICE_ACCOUNT: 2 - } - }, - Access: { - fields: { - accountAccess: { - type: "AccountAccess", - id: 1 - }, - namespaceAccesses: { - keyType: "string", - type: "NamespaceAccess", - id: 2 - } - } - }, - NamespaceScopedAccess: { - fields: { - namespace: { - type: "string", - id: 1 - }, - access: { - type: "NamespaceAccess", - id: 2 - } - } - }, - UserSpec: { - fields: { - email: { - type: "string", - id: 1 - }, - access: { - type: "Access", - id: 2 - } - } - }, - Invitation: { - fields: { - createdTime: { - type: "google.protobuf.Timestamp", - id: 1 - }, - expiredTime: { - type: "google.protobuf.Timestamp", - id: 2 - } - } - }, - User: { - fields: { - id: { - type: "string", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - spec: { - type: "UserSpec", - id: 3 - }, - stateDeprecated: { - type: "string", - id: 4, - options: { - deprecated: true - } - }, - state: { - type: "temporal.api.cloud.resource.v1.ResourceState", - id: 9 - }, - asyncOperationId: { - type: "string", - id: 5 - }, - invitation: { - type: "Invitation", - id: 6 - }, - createdTime: { - type: "google.protobuf.Timestamp", - id: 7 - }, - lastModifiedTime: { - type: "google.protobuf.Timestamp", - id: 8 - } - } - }, - GoogleGroupSpec: { - fields: { - emailAddress: { - type: "string", - id: 1 - } - } - }, - SCIMGroupSpec: { - fields: { - idpId: { - type: "string", - id: 1 - } - } - }, - CloudGroupSpec: { - fields: {} - }, - UserGroupSpec: { - oneofs: { - groupType: { - oneof: [ - "googleGroup", - "scimGroup", - "cloudGroup" - ] - } - }, - fields: { - displayName: { - type: "string", - id: 1 - }, - access: { - type: "Access", - id: 2 - }, - googleGroup: { - type: "GoogleGroupSpec", - id: 3 - }, - scimGroup: { - type: "SCIMGroupSpec", - id: 4 - }, - cloudGroup: { - type: "CloudGroupSpec", - id: 5 - } - } - }, - UserGroup: { - fields: { - id: { - type: "string", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - spec: { - type: "UserGroupSpec", - id: 3 - }, - stateDeprecated: { - type: "string", - id: 4, - options: { - deprecated: true - } - }, - state: { - type: "temporal.api.cloud.resource.v1.ResourceState", - id: 8 - }, - asyncOperationId: { - type: "string", - id: 5 - }, - createdTime: { - type: "google.protobuf.Timestamp", - id: 6 - }, - lastModifiedTime: { - type: "google.protobuf.Timestamp", - id: 7 - } - } - }, - UserGroupMemberId: { - oneofs: { - memberType: { - oneof: [ - "userId" - ] - } - }, - fields: { - userId: { - type: "string", - id: 1 - } - } - }, - UserGroupMember: { - fields: { - memberId: { - type: "UserGroupMemberId", - id: 1 - }, - createdTime: { - type: "google.protobuf.Timestamp", - id: 2 - } - } - }, - ServiceAccount: { - fields: { - id: { - type: "string", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - spec: { - type: "ServiceAccountSpec", - id: 3 - }, - stateDeprecated: { - type: "string", - id: 4, - options: { - deprecated: true - } - }, - state: { - type: "temporal.api.cloud.resource.v1.ResourceState", - id: 8 - }, - asyncOperationId: { - type: "string", - id: 5 - }, - createdTime: { - type: "google.protobuf.Timestamp", - id: 6 - }, - lastModifiedTime: { - type: "google.protobuf.Timestamp", - id: 7 - } - } - }, - ServiceAccountSpec: { - fields: { - name: { - type: "string", - id: 1 - }, - access: { - type: "Access", - id: 2 - }, - namespaceScopedAccess: { - type: "NamespaceScopedAccess", - id: 4 - }, - description: { - type: "string", - id: 3 - } - } - }, - ApiKey: { - fields: { - id: { - type: "string", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - spec: { - type: "ApiKeySpec", - id: 3 - }, - stateDeprecated: { - type: "string", - id: 4, - options: { - deprecated: true - } - }, - state: { - type: "temporal.api.cloud.resource.v1.ResourceState", - id: 8 - }, - asyncOperationId: { - type: "string", - id: 5 - }, - createdTime: { - type: "google.protobuf.Timestamp", - id: 6 - }, - lastModifiedTime: { - type: "google.protobuf.Timestamp", - id: 7 - } - } - }, - ApiKeySpec: { - fields: { - ownerId: { - type: "string", - id: 1 - }, - ownerTypeDeprecated: { - type: "string", - id: 2, - options: { - deprecated: true - } - }, - ownerType: { - type: "OwnerType", - id: 7 - }, - displayName: { - type: "string", - id: 3 - }, - description: { - type: "string", - id: 4 - }, - expiryTime: { - type: "google.protobuf.Timestamp", - id: 5 - }, - disabled: { - type: "bool", - id: 6 - } - } - } - } - } - } - }, - resource: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/cloud/resource/v1;resource", - java_package: "io.temporal.api.cloud.resource.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Cloud::Resource::V1", - csharp_namespace: "Temporalio.Api.Cloud.Resource.V1" - }, - nested: { - ResourceState: { - values: { - RESOURCE_STATE_UNSPECIFIED: 0, - RESOURCE_STATE_ACTIVATING: 1, - RESOURCE_STATE_ACTIVATION_FAILED: 2, - RESOURCE_STATE_ACTIVE: 3, - RESOURCE_STATE_UPDATING: 4, - RESOURCE_STATE_UPDATE_FAILED: 5, - RESOURCE_STATE_DELETING: 6, - RESOURCE_STATE_DELETE_FAILED: 7, - RESOURCE_STATE_DELETED: 8, - RESOURCE_STATE_SUSPENDED: 9, - RESOURCE_STATE_EXPIRED: 10 - } - } - } - } - } - }, - namespace: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/cloud/namespace/v1;namespace", - java_package: "io.temporal.api.cloud.namespace.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Cloud::Namespace::V1", - csharp_namespace: "Temporalio.Api.Cloud.Namespace.V1" - }, - nested: { - CertificateFilterSpec: { - fields: { - commonName: { - type: "string", - id: 1 - }, - organization: { - type: "string", - id: 2 - }, - organizationalUnit: { - type: "string", - id: 3 - }, - subjectAlternativeName: { - type: "string", - id: 4 - } - } - }, - MtlsAuthSpec: { - fields: { - acceptedClientCaDeprecated: { - type: "string", - id: 1 - }, - acceptedClientCa: { - type: "bytes", - id: 4 - }, - certificateFilters: { - rule: "repeated", - type: "CertificateFilterSpec", - id: 2 - }, - enabled: { - type: "bool", - id: 3 - } - } - }, - ApiKeyAuthSpec: { - fields: { - enabled: { - type: "bool", - id: 1 - } - } - }, - CodecServerSpec: { - fields: { - endpoint: { - type: "string", - id: 1 - }, - passAccessToken: { - type: "bool", - id: 2 - }, - includeCrossOriginCredentials: { - type: "bool", - id: 3 - }, - customErrorMessage: { - type: "CustomErrorMessage", - id: 4 - } - }, - nested: { - CustomErrorMessage: { - fields: { - "default": { - type: "ErrorMessage", - id: 1 - } - }, - nested: { - ErrorMessage: { - fields: { - message: { - type: "string", - id: 1 - }, - link: { - type: "string", - id: 2 - } - } - } - } - } - } - }, - LifecycleSpec: { - fields: { - enableDeleteProtection: { - type: "bool", - id: 1 - } - } - }, - HighAvailabilitySpec: { - fields: { - disableManagedFailover: { - type: "bool", - id: 1 - } - } - }, - NamespaceSpec: { - fields: { - name: { - type: "string", - id: 1 - }, - regions: { - rule: "repeated", - type: "string", - id: 2 - }, - retentionDays: { - type: "int32", - id: 3 - }, - mtlsAuth: { - type: "MtlsAuthSpec", - id: 4 - }, - apiKeyAuth: { - type: "ApiKeyAuthSpec", - id: 7 - }, - customSearchAttributes: { - keyType: "string", - type: "string", - id: 5, - options: { - deprecated: true - } - }, - searchAttributes: { - keyType: "string", - type: "SearchAttributeType", - id: 8 - }, - codecServer: { - type: "CodecServerSpec", - id: 6 - }, - lifecycle: { - type: "LifecycleSpec", - id: 9 - }, - highAvailability: { - type: "HighAvailabilitySpec", - id: 10 - }, - connectivityRuleIds: { - rule: "repeated", - type: "string", - id: 11 - } - }, - nested: { - SearchAttributeType: { - values: { - SEARCH_ATTRIBUTE_TYPE_UNSPECIFIED: 0, - SEARCH_ATTRIBUTE_TYPE_TEXT: 1, - SEARCH_ATTRIBUTE_TYPE_KEYWORD: 2, - SEARCH_ATTRIBUTE_TYPE_INT: 3, - SEARCH_ATTRIBUTE_TYPE_DOUBLE: 4, - SEARCH_ATTRIBUTE_TYPE_BOOL: 5, - SEARCH_ATTRIBUTE_TYPE_DATETIME: 6, - SEARCH_ATTRIBUTE_TYPE_KEYWORD_LIST: 7 - } - } - } - }, - Endpoints: { - fields: { - webAddress: { - type: "string", - id: 1 - }, - mtlsGrpcAddress: { - type: "string", - id: 2 - }, - grpcAddress: { - type: "string", - id: 3 - } - } - }, - Limits: { - fields: { - actionsPerSecondLimit: { - type: "int32", - id: 1 - } - } - }, - AWSPrivateLinkInfo: { - fields: { - allowedPrincipalArns: { - rule: "repeated", - type: "string", - id: 1 - }, - vpcEndpointServiceNames: { - rule: "repeated", - type: "string", - id: 2 - } - } - }, - PrivateConnectivity: { - fields: { - region: { - type: "string", - id: 1 - }, - awsPrivateLink: { - type: "AWSPrivateLinkInfo", - id: 2 - } - } - }, - Namespace: { - fields: { - namespace: { - type: "string", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - spec: { - type: "NamespaceSpec", - id: 3 - }, - stateDeprecated: { - type: "string", - id: 4, - options: { - deprecated: true - } - }, - state: { - type: "temporal.api.cloud.resource.v1.ResourceState", - id: 13 - }, - asyncOperationId: { - type: "string", - id: 5 - }, - endpoints: { - type: "Endpoints", - id: 6 - }, - activeRegion: { - type: "string", - id: 7 - }, - limits: { - type: "Limits", - id: 8 - }, - privateConnectivities: { - rule: "repeated", - type: "PrivateConnectivity", - id: 9 - }, - createdTime: { - type: "google.protobuf.Timestamp", - id: 10 - }, - lastModifiedTime: { - type: "google.protobuf.Timestamp", - id: 11 - }, - regionStatus: { - keyType: "string", - type: "NamespaceRegionStatus", - id: 12 - }, - connectivityRules: { - rule: "repeated", - type: "temporal.api.cloud.connectivityrule.v1.ConnectivityRule", - id: 14 - }, - tags: { - keyType: "string", - type: "string", - id: 15 - } - } - }, - NamespaceRegionStatus: { - fields: { - stateDeprecated: { - type: "string", - id: 1, - options: { - deprecated: true - } - }, - state: { - type: "State", - id: 3 - }, - asyncOperationId: { - type: "string", - id: 2 - } - }, - nested: { - State: { - values: { - STATE_UNSPECIFIED: 0, - STATE_ADDING: 1, - STATE_ACTIVE: 2, - STATE_PASSIVE: 3, - STATE_REMOVING: 4, - STATE_FAILED: 5 - } - } - } - }, - ExportSinkSpec: { - fields: { - name: { - type: "string", - id: 1 - }, - enabled: { - type: "bool", - id: 2 - }, - s3: { - type: "temporal.api.cloud.sink.v1.S3Spec", - id: 3 - }, - gcs: { - type: "temporal.api.cloud.sink.v1.GCSSpec", - id: 4 - } - } - }, - ExportSink: { - fields: { - name: { - type: "string", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - state: { - type: "temporal.api.cloud.resource.v1.ResourceState", - id: 3 - }, - spec: { - type: "ExportSinkSpec", - id: 4 - }, - health: { - type: "Health", - id: 5 - }, - errorMessage: { - type: "string", - id: 6 - }, - latestDataExportTime: { - type: "google.protobuf.Timestamp", - id: 7 - }, - lastHealthCheckTime: { - type: "google.protobuf.Timestamp", - id: 8 - } - }, - nested: { - Health: { - values: { - HEALTH_UNSPECIFIED: 0, - HEALTH_OK: 1, - HEALTH_ERROR_INTERNAL: 2, - HEALTH_ERROR_USER_CONFIGURATION: 3 - } - } - } - } - } - } - } - }, - sink: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/cloud/sink/v1;sink", - java_package: "io.temporal.api.cloud.sink.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Cloud::Sink::V1", - csharp_namespace: "Temporalio.Api.Cloud.Sink.V1" - }, - nested: { - S3Spec: { - fields: { - roleName: { - type: "string", - id: 1 - }, - bucketName: { - type: "string", - id: 2 - }, - region: { - type: "string", - id: 3 - }, - kmsArn: { - type: "string", - id: 4 - }, - awsAccountId: { - type: "string", - id: 5 - } - } - }, - GCSSpec: { - fields: { - saId: { - type: "string", - id: 1 - }, - bucketName: { - type: "string", - id: 2 - }, - gcpProjectId: { - type: "string", - id: 3 - }, - region: { - type: "string", - id: 4 - } - } - }, - KinesisSpec: { - fields: { - roleName: { - type: "string", - id: 1 - }, - destinationUri: { - type: "string", - id: 2 - }, - region: { - type: "string", - id: 3 - } - } - }, - PubSubSpec: { - fields: { - serviceAccountId: { - type: "string", - id: 1 - }, - topicName: { - type: "string", - id: 2 - }, - gcpProjectId: { - type: "string", - id: 3 - } - } - } - } - } - } - }, - connectivityrule: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/cloud/connectivityrule/v1;connectivityrule", - java_package: "io.temporal.api.cloud.connectivityrule.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Cloud::ConnectivityRule::V1", - csharp_namespace: "Temporalio.Api.Cloud.ConnectivityRule.V1" - }, - nested: { - ConnectivityRule: { - fields: { - id: { - type: "string", - id: 1 - }, - spec: { - type: "ConnectivityRuleSpec", - id: 2 - }, - resourceVersion: { - type: "string", - id: 4 - }, - state: { - type: "temporal.api.cloud.resource.v1.ResourceState", - id: 5 - }, - asyncOperationId: { - type: "string", - id: 6 - }, - createdTime: { - type: "google.protobuf.Timestamp", - id: 7 - } - }, - reserved: [ - [ - 3, - 3 - ] - ] - }, - ConnectivityRuleSpec: { - oneofs: { - connectionType: { - oneof: [ - "publicRule", - "privateRule" - ] - } - }, - fields: { - publicRule: { - type: "PublicConnectivityRule", - id: 1 - }, - privateRule: { - type: "PrivateConnectivityRule", - id: 2 - } - } - }, - PublicConnectivityRule: { - fields: {} - }, - PrivateConnectivityRule: { - fields: { - connectionId: { - type: "string", - id: 1 - }, - gcpProjectId: { - type: "string", - id: 2 - }, - region: { - type: "string", - id: 3 - } - }, - reserved: [ - [ - 4, - 4 - ] - ] - } - } - } - } - }, - nexus: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/cloud/nexus/v1;nexus", - java_package: "io.temporal.api.cloud.nexus.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Cloud::Nexus::V1", - csharp_namespace: "Temporalio.Api.Cloud.Nexus.V1" - }, - nested: { - EndpointSpec: { - fields: { - name: { - type: "string", - id: 1 - }, - targetSpec: { - type: "EndpointTargetSpec", - id: 2 - }, - policySpecs: { - rule: "repeated", - type: "EndpointPolicySpec", - id: 3 - }, - descriptionDeprecated: { - type: "string", - id: 4, - options: { - deprecated: true - } - }, - description: { - type: "temporal.api.common.v1.Payload", - id: 5 - } - } - }, - EndpointTargetSpec: { - oneofs: { - variant: { - oneof: [ - "workerTargetSpec" - ] - } - }, - fields: { - workerTargetSpec: { - type: "WorkerTargetSpec", - id: 1 - } - } - }, - WorkerTargetSpec: { - fields: { - namespaceId: { - type: "string", - id: 1 - }, - taskQueue: { - type: "string", - id: 2 - } - } - }, - EndpointPolicySpec: { - oneofs: { - variant: { - oneof: [ - "allowedCloudNamespacePolicySpec" - ] - } - }, - fields: { - allowedCloudNamespacePolicySpec: { - type: "AllowedCloudNamespacePolicySpec", - id: 1 - } - } - }, - AllowedCloudNamespacePolicySpec: { - fields: { - namespaceId: { - type: "string", - id: 1 - } - } - }, - Endpoint: { - fields: { - id: { - type: "string", - id: 1 - }, - resourceVersion: { - type: "string", - id: 2 - }, - spec: { - type: "EndpointSpec", - id: 3 - }, - state: { - type: "temporal.api.cloud.resource.v1.ResourceState", - id: 4 - }, - asyncOperationId: { - type: "string", - id: 5 - }, - createdTime: { - type: "google.protobuf.Timestamp", - id: 6 - }, - lastModifiedTime: { - type: "google.protobuf.Timestamp", - id: 7 - } - } - } - } - } - } - }, - region: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/cloud/region/v1;region", - java_package: "io.temporal.api.cloud.region.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Cloud::Region::V1", - csharp_namespace: "Temporalio.Api.Cloud.Region.V1" - }, - nested: { - Region: { - fields: { - id: { - type: "string", - id: 1 - }, - cloudProviderDeprecated: { - type: "string", - id: 2, - options: { - deprecated: true - } - }, - cloudProvider: { - type: "CloudProvider", - id: 5 - }, - cloudProviderRegion: { - type: "string", - id: 3 - }, - location: { - type: "string", - id: 4 - } - }, - nested: { - CloudProvider: { - values: { - CLOUD_PROVIDER_UNSPECIFIED: 0, - CLOUD_PROVIDER_AWS: 1, - CLOUD_PROVIDER_GCP: 2 - } - } - } - } - } - } - } - }, - account: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/cloud/account/v1;account", - java_package: "io.temporal.api.cloud.account.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Cloud::Account::V1", - csharp_namespace: "Temporalio.Api.Cloud.Account.V1" - }, - nested: { - MetricsSpec: { - fields: { - acceptedClientCa: { - type: "bytes", - id: 2 - } - } - }, - AccountSpec: { - fields: { - metrics: { - type: "MetricsSpec", - id: 1 - } - } - }, - Metrics: { - fields: { - uri: { - type: "string", - id: 1 - } - } - }, - Account: { - fields: { - id: { - type: "string", - id: 1 - }, - spec: { - type: "AccountSpec", - id: 2 - }, - resourceVersion: { - type: "string", - id: 3 - }, - state: { - type: "temporal.api.cloud.resource.v1.ResourceState", - id: 4 - }, - asyncOperationId: { - type: "string", - id: 5 - }, - metrics: { - type: "Metrics", - id: 6 - } - } - }, - AuditLogSinkSpec: { - oneofs: { - sinkType: { - oneof: [ - "kinesisSink", - "pubSubSink" - ] - } - }, - fields: { - name: { - type: "string", - id: 1 - }, - kinesisSink: { - type: "api.cloud.sink.v1.KinesisSpec", - id: 2 - }, - pubSubSink: { - type: "api.cloud.sink.v1.PubSubSpec", - id: 3 - }, - enabled: { - type: "bool", - id: 4 - } - } - } - } - } - } - }, - usage: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/cloud/usage/v1;usage", - java_package: "io.temporal.api.cloud.usage.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::Cloud::Usage::V1", - csharp_namespace: "Temporalio.Api.Cloud.Usage.V1" - }, - nested: { - Summary: { - fields: { - startTime: { - type: "google.protobuf.Timestamp", - id: 1 - }, - endTime: { - type: "google.protobuf.Timestamp", - id: 2 - }, - recordGroups: { - rule: "repeated", - type: "RecordGroup", - id: 3 - }, - incomplete: { - type: "bool", - id: 4 - } - } - }, - RecordGroup: { - fields: { - groupBys: { - rule: "repeated", - type: "GroupBy", - id: 1 - }, - records: { - rule: "repeated", - type: "Record", - id: 2 - } - } - }, - GroupBy: { - fields: { - key: { - type: "GroupByKey", - id: 1 - }, - value: { - type: "string", - id: 2 - } - } - }, - Record: { - fields: { - type: { - type: "RecordType", - id: 1 - }, - unit: { - type: "RecordUnit", - id: 2 - }, - value: { - type: "double", - id: 3 - } - } - }, - RecordType: { - values: { - RECORD_TYPE_UNSPECIFIED: 0, - RECORD_TYPE_ACTIONS: 1, - RECORD_TYPE_ACTIVE_STORAGE: 2, - RECORD_TYPE_RETAINED_STORAGE: 3 - } - }, - RecordUnit: { - values: { - RECORD_UNIT_UNSPECIFIED: 0, - RECORD_UNIT_NUMBER: 1, - RECORD_UNIT_BYTE_SECONDS: 2 - } - }, - GroupByKey: { - values: { - GROUP_BY_KEY_UNSPECIFIED: 0, - GROUP_BY_KEY_NAMESPACE: 1 - } - } - } - } - } - } - } - }, - errordetails: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/errordetails/v1;errordetails", - java_package: "io.temporal.api.errordetails.v1", - java_multiple_files: true, - java_outer_classname: "MessageProto", - ruby_package: "Temporalio::Api::ErrorDetails::V1", - csharp_namespace: "Temporalio.Api.ErrorDetails.V1" - }, - nested: { - NotFoundFailure: { - fields: { - currentCluster: { - type: "string", - id: 1 - }, - activeCluster: { - type: "string", - id: 2 - } - } - }, - WorkflowExecutionAlreadyStartedFailure: { - fields: { - startRequestId: { - type: "string", - id: 1 - }, - runId: { - type: "string", - id: 2 - } - } - }, - NamespaceNotActiveFailure: { - fields: { - namespace: { - type: "string", - id: 1 - }, - currentCluster: { - type: "string", - id: 2 - }, - activeCluster: { - type: "string", - id: 3 - } - } - }, - NamespaceUnavailableFailure: { - fields: { - namespace: { - type: "string", - id: 1 - } - } - }, - NamespaceInvalidStateFailure: { - fields: { - namespace: { - type: "string", - id: 1 - }, - state: { - type: "temporal.api.enums.v1.NamespaceState", - id: 2 - }, - allowedStates: { - rule: "repeated", - type: "temporal.api.enums.v1.NamespaceState", - id: 3 - } - } - }, - NamespaceNotFoundFailure: { - fields: { - namespace: { - type: "string", - id: 1 - } - } - }, - NamespaceAlreadyExistsFailure: { - fields: {} - }, - ClientVersionNotSupportedFailure: { - fields: { - clientVersion: { - type: "string", - id: 1 - }, - clientName: { - type: "string", - id: 2 - }, - supportedVersions: { - type: "string", - id: 3 - } - } - }, - ServerVersionNotSupportedFailure: { - fields: { - serverVersion: { - type: "string", - id: 1 - }, - clientSupportedServerVersions: { - type: "string", - id: 2 - } - } - }, - CancellationAlreadyRequestedFailure: { - fields: {} - }, - QueryFailedFailure: { - fields: { - failure: { - type: "temporal.api.failure.v1.Failure", - id: 1 - } - } - }, - PermissionDeniedFailure: { - fields: { - reason: { - type: "string", - id: 1 - } - } - }, - ResourceExhaustedFailure: { - fields: { - cause: { - type: "temporal.api.enums.v1.ResourceExhaustedCause", - id: 1 - }, - scope: { - type: "temporal.api.enums.v1.ResourceExhaustedScope", - id: 2 - } - } - }, - SystemWorkflowFailure: { - fields: { - workflowExecution: { - type: "temporal.api.common.v1.WorkflowExecution", - id: 1 - }, - workflowError: { - type: "string", - id: 2 - } - } - }, - WorkflowNotReadyFailure: { - fields: {} - }, - NewerBuildExistsFailure: { - fields: { - defaultBuildId: { - type: "string", - id: 1 - } - } - }, - MultiOperationExecutionFailure: { - fields: { - statuses: { - rule: "repeated", - type: "OperationStatus", - id: 1 - } - }, - nested: { - OperationStatus: { - fields: { - code: { - type: "int32", - id: 1 - }, - message: { - type: "string", - id: 2 - }, - details: { - rule: "repeated", - type: "google.protobuf.Any", - id: 3 - } - } - } - } - }, - ActivityExecutionAlreadyStartedFailure: { - fields: { - startRequestId: { - type: "string", - id: 1 - }, - runId: { - type: "string", - id: 2 - } - } - } - } - } - } - }, - testservice: { - nested: { - v1: { - options: { - go_package: "go.temporal.io/api/testservice/v1;testservice", - java_package: "io.temporal.api.testservice.v1", - java_multiple_files: true, - java_outer_classname: "ServiceProto", - ruby_package: "Temporalio::Api::TestService::V1", - csharp_namespace: "Temporalio.Api.TestService.V1" - }, - nested: { - LockTimeSkippingRequest: { - fields: {} - }, - LockTimeSkippingResponse: { - fields: {} - }, - UnlockTimeSkippingRequest: { - fields: {} - }, - UnlockTimeSkippingResponse: { - fields: {} - }, - SleepUntilRequest: { - fields: { - timestamp: { - type: "google.protobuf.Timestamp", - id: 1 - } - } - }, - SleepRequest: { - fields: { - duration: { - type: "google.protobuf.Duration", - id: 1 - } - } - }, - SleepResponse: { - fields: {} - }, - GetCurrentTimeResponse: { - fields: { - time: { - type: "google.protobuf.Timestamp", - id: 1 - } - } - }, - TestService: { - methods: { - LockTimeSkipping: { - requestType: "LockTimeSkippingRequest", - responseType: "LockTimeSkippingResponse" - }, - UnlockTimeSkipping: { - requestType: "UnlockTimeSkippingRequest", - responseType: "UnlockTimeSkippingResponse" - }, - Sleep: { - requestType: "SleepRequest", - responseType: "SleepResponse" - }, - SleepUntil: { - requestType: "SleepUntilRequest", - responseType: "SleepResponse" - }, - UnlockTimeSkippingWithSleep: { - requestType: "SleepRequest", - responseType: "SleepResponse" - }, - GetCurrentTime: { - requestType: "google.protobuf.Empty", - responseType: "GetCurrentTimeResponse" - } - } - } - } - } - } - } - } - } - } - }, - google: { - nested: { - protobuf: { - options: { - go_package: "google.golang.org/protobuf/types/descriptorpb", - java_package: "com.google.protobuf", - java_outer_classname: "DescriptorProtos", - csharp_namespace: "Google.Protobuf.Reflection", - objc_class_prefix: "GPB", - cc_enable_arenas: true, - optimize_for: "SPEED" - }, - nested: { - Duration: { - fields: { - seconds: { - type: "int64", - id: 1 - }, - nanos: { - type: "int32", - id: 2 - } - } - }, - Empty: { - fields: {} - }, - Timestamp: { - fields: { - seconds: { - type: "int64", - id: 1 - }, - nanos: { - type: "int32", - id: 2 - } - } - }, - DoubleValue: { - fields: { - value: { - type: "double", - id: 1 - } - } - }, - FloatValue: { - fields: { - value: { - type: "float", - id: 1 - } - } - }, - Int64Value: { - fields: { - value: { - type: "int64", - id: 1 - } - } - }, - UInt64Value: { - fields: { - value: { - type: "uint64", - id: 1 - } - } - }, - Int32Value: { - fields: { - value: { - type: "int32", - id: 1 - } - } - }, - UInt32Value: { - fields: { - value: { - type: "uint32", - id: 1 - } - } - }, - BoolValue: { - fields: { - value: { - type: "bool", - id: 1 - } - } - }, - StringValue: { - fields: { - value: { - type: "string", - id: 1 - } - } - }, - BytesValue: { - fields: { - value: { - type: "bytes", - id: 1 - } - } - }, - FieldMask: { - fields: { - paths: { - rule: "repeated", - type: "string", - id: 1 - } - } - }, - Any: { - fields: { - type_url: { - type: "string", - id: 1 - }, - value: { - type: "bytes", - id: 2 - } - } - }, - FileDescriptorSet: { - edition: "proto2", - fields: { - file: { - rule: "repeated", - type: "FileDescriptorProto", - id: 1 - } - } - }, - Edition: { - edition: "proto2", - values: { - EDITION_UNKNOWN: 0, - EDITION_PROTO2: 998, - EDITION_PROTO3: 999, - EDITION_2023: 1000, - EDITION_1_TEST_ONLY: 1, - EDITION_2_TEST_ONLY: 2, - EDITION_99997_TEST_ONLY: 99997, - EDITION_99998_TEST_ONLY: 99998, - EDITION_99999_TEST_ONLY: 99999 - } - }, - FileDescriptorProto: { - edition: "proto2", - fields: { - name: { - type: "string", - id: 1 - }, - "package": { - type: "string", - id: 2 - }, - dependency: { - rule: "repeated", - type: "string", - id: 3 - }, - publicDependency: { - rule: "repeated", - type: "int32", - id: 10 - }, - weakDependency: { - rule: "repeated", - type: "int32", - id: 11 - }, - messageType: { - rule: "repeated", - type: "DescriptorProto", - id: 4 - }, - enumType: { - rule: "repeated", - type: "EnumDescriptorProto", - id: 5 - }, - service: { - rule: "repeated", - type: "ServiceDescriptorProto", - id: 6 - }, - extension: { - rule: "repeated", - type: "FieldDescriptorProto", - id: 7 - }, - options: { - type: "FileOptions", - id: 8 - }, - sourceCodeInfo: { - type: "SourceCodeInfo", - id: 9 - }, - syntax: { - type: "string", - id: 12 - }, - edition: { - type: "Edition", - id: 14 - } - } - }, - DescriptorProto: { - edition: "proto2", - fields: { - name: { - type: "string", - id: 1 - }, - field: { - rule: "repeated", - type: "FieldDescriptorProto", - id: 2 - }, - extension: { - rule: "repeated", - type: "FieldDescriptorProto", - id: 6 - }, - nestedType: { - rule: "repeated", - type: "DescriptorProto", - id: 3 - }, - enumType: { - rule: "repeated", - type: "EnumDescriptorProto", - id: 4 - }, - extensionRange: { - rule: "repeated", - type: "ExtensionRange", - id: 5 - }, - oneofDecl: { - rule: "repeated", - type: "OneofDescriptorProto", - id: 8 - }, - options: { - type: "MessageOptions", - id: 7 - }, - reservedRange: { - rule: "repeated", - type: "ReservedRange", - id: 9 - }, - reservedName: { - rule: "repeated", - type: "string", - id: 10 - } - }, - nested: { - ExtensionRange: { - fields: { - start: { - type: "int32", - id: 1 - }, - end: { - type: "int32", - id: 2 - }, - options: { - type: "ExtensionRangeOptions", - id: 3 - } - } - }, - ReservedRange: { - fields: { - start: { - type: "int32", - id: 1 - }, - end: { - type: "int32", - id: 2 - } - } - } - } - }, - ExtensionRangeOptions: { - edition: "proto2", - fields: { - uninterpretedOption: { - rule: "repeated", - type: "UninterpretedOption", - id: 999 - }, - declaration: { - rule: "repeated", - type: "Declaration", - id: 2, - options: { - retention: "RETENTION_SOURCE" - } - }, - features: { - type: "FeatureSet", - id: 50 - }, - verification: { - type: "VerificationState", - id: 3, - options: { - "default": "UNVERIFIED" - } - } - }, - extensions: [ - [ - 1000, - 536870911 - ] - ], - nested: { - Declaration: { - fields: { - number: { - type: "int32", - id: 1 - }, - fullName: { - type: "string", - id: 2 - }, - type: { - type: "string", - id: 3 - }, - reserved: { - type: "bool", - id: 5 - }, - repeated: { - type: "bool", - id: 6 - } - }, - reserved: [ - [ - 4, - 4 - ] - ] - }, - VerificationState: { - values: { - DECLARATION: 0, - UNVERIFIED: 1 - } - } - } - }, - FieldDescriptorProto: { - edition: "proto2", - fields: { - name: { - type: "string", - id: 1 - }, - number: { - type: "int32", - id: 3 - }, - label: { - type: "Label", - id: 4 - }, - type: { - type: "Type", - id: 5 - }, - typeName: { - type: "string", - id: 6 - }, - extendee: { - type: "string", - id: 2 - }, - defaultValue: { - type: "string", - id: 7 - }, - oneofIndex: { - type: "int32", - id: 9 - }, - jsonName: { - type: "string", - id: 10 - }, - options: { - type: "FieldOptions", - id: 8 - }, - proto3Optional: { - type: "bool", - id: 17 - } - }, - nested: { - Type: { - values: { - TYPE_DOUBLE: 1, - TYPE_FLOAT: 2, - TYPE_INT64: 3, - TYPE_UINT64: 4, - TYPE_INT32: 5, - TYPE_FIXED64: 6, - TYPE_FIXED32: 7, - TYPE_BOOL: 8, - TYPE_STRING: 9, - TYPE_GROUP: 10, - TYPE_MESSAGE: 11, - TYPE_BYTES: 12, - TYPE_UINT32: 13, - TYPE_ENUM: 14, - TYPE_SFIXED32: 15, - TYPE_SFIXED64: 16, - TYPE_SINT32: 17, - TYPE_SINT64: 18 - } - }, - Label: { - values: { - LABEL_OPTIONAL: 1, - LABEL_REQUIRED: 2, - LABEL_REPEATED: 3 - } - } - } - }, - OneofDescriptorProto: { - edition: "proto2", - fields: { - name: { - type: "string", - id: 1 - }, - options: { - type: "OneofOptions", - id: 2 - } - } - }, - EnumDescriptorProto: { - edition: "proto2", - fields: { - name: { - type: "string", - id: 1 - }, - value: { - rule: "repeated", - type: "EnumValueDescriptorProto", - id: 2 - }, - options: { - type: "EnumOptions", - id: 3 - }, - reservedRange: { - rule: "repeated", - type: "EnumReservedRange", - id: 4 - }, - reservedName: { - rule: "repeated", - type: "string", - id: 5 - } - }, - nested: { - EnumReservedRange: { - fields: { - start: { - type: "int32", - id: 1 - }, - end: { - type: "int32", - id: 2 - } - } - } - } - }, - EnumValueDescriptorProto: { - edition: "proto2", - fields: { - name: { - type: "string", - id: 1 - }, - number: { - type: "int32", - id: 2 - }, - options: { - type: "EnumValueOptions", - id: 3 - } - } - }, - ServiceDescriptorProto: { - edition: "proto2", - fields: { - name: { - type: "string", - id: 1 - }, - method: { - rule: "repeated", - type: "MethodDescriptorProto", - id: 2 - }, - options: { - type: "ServiceOptions", - id: 3 - } - } - }, - MethodDescriptorProto: { - edition: "proto2", - fields: { - name: { - type: "string", - id: 1 - }, - inputType: { - type: "string", - id: 2 - }, - outputType: { - type: "string", - id: 3 - }, - options: { - type: "MethodOptions", - id: 4 - }, - clientStreaming: { - type: "bool", - id: 5, - options: { - "default": false - } - }, - serverStreaming: { - type: "bool", - id: 6, - options: { - "default": false - } - } - } - }, - FileOptions: { - edition: "proto2", - fields: { - javaPackage: { - type: "string", - id: 1 - }, - javaOuterClassname: { - type: "string", - id: 8 - }, - javaMultipleFiles: { - type: "bool", - id: 10, - options: { - "default": false - } - }, - javaGenerateEqualsAndHash: { - type: "bool", - id: 20, - options: { - deprecated: true - } - }, - javaStringCheckUtf8: { - type: "bool", - id: 27, - options: { - "default": false - } - }, - optimizeFor: { - type: "OptimizeMode", - id: 9, - options: { - "default": "SPEED" - } - }, - goPackage: { - type: "string", - id: 11 - }, - ccGenericServices: { - type: "bool", - id: 16, - options: { - "default": false - } - }, - javaGenericServices: { - type: "bool", - id: 17, - options: { - "default": false - } - }, - pyGenericServices: { - type: "bool", - id: 18, - options: { - "default": false - } - }, - phpGenericServices: { - type: "bool", - id: 42, - options: { - "default": false - } - }, - deprecated: { - type: "bool", - id: 23, - options: { - "default": false - } - }, - ccEnableArenas: { - type: "bool", - id: 31, - options: { - "default": true - } - }, - objcClassPrefix: { - type: "string", - id: 36 - }, - csharpNamespace: { - type: "string", - id: 37 - }, - swiftPrefix: { - type: "string", - id: 39 - }, - phpClassPrefix: { - type: "string", - id: 40 - }, - phpNamespace: { - type: "string", - id: 41 - }, - phpMetadataNamespace: { - type: "string", - id: 44 - }, - rubyPackage: { - type: "string", - id: 45 - }, - features: { - type: "FeatureSet", - id: 50 - }, - uninterpretedOption: { - rule: "repeated", - type: "UninterpretedOption", - id: 999 - } - }, - extensions: [ - [ - 1000, - 536870911 - ] - ], - reserved: [ - [ - 38, - 38 - ] - ], - nested: { - OptimizeMode: { - values: { - SPEED: 1, - CODE_SIZE: 2, - LITE_RUNTIME: 3 - } - } - } - }, - MessageOptions: { - edition: "proto2", - fields: { - messageSetWireFormat: { - type: "bool", - id: 1, - options: { - "default": false - } - }, - noStandardDescriptorAccessor: { - type: "bool", - id: 2, - options: { - "default": false - } - }, - deprecated: { - type: "bool", - id: 3, - options: { - "default": false - } - }, - mapEntry: { - type: "bool", - id: 7 - }, - deprecatedLegacyJsonFieldConflicts: { - type: "bool", - id: 11, - options: { - deprecated: true - } - }, - features: { - type: "FeatureSet", - id: 12 - }, - uninterpretedOption: { - rule: "repeated", - type: "UninterpretedOption", - id: 999 - } - }, - extensions: [ - [ - 1000, - 536870911 - ] - ], - reserved: [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - FieldOptions: { - edition: "proto2", - fields: { - ctype: { - type: "CType", - id: 1, - options: { - "default": "STRING" - } - }, - packed: { - type: "bool", - id: 2 - }, - jstype: { - type: "JSType", - id: 6, - options: { - "default": "JS_NORMAL" - } - }, - lazy: { - type: "bool", - id: 5, - options: { - "default": false - } - }, - unverifiedLazy: { - type: "bool", - id: 15, - options: { - "default": false - } - }, - deprecated: { - type: "bool", - id: 3, - options: { - "default": false - } - }, - weak: { - type: "bool", - id: 10, - options: { - "default": false - } - }, - debugRedact: { - type: "bool", - id: 16, - options: { - "default": false - } - }, - retention: { - type: "OptionRetention", - id: 17 - }, - targets: { - rule: "repeated", - type: "OptionTargetType", - id: 19 - }, - editionDefaults: { - rule: "repeated", - type: "EditionDefault", - id: 20 - }, - features: { - type: "FeatureSet", - id: 21 - }, - uninterpretedOption: { - rule: "repeated", - type: "UninterpretedOption", - id: 999 - } - }, - extensions: [ - [ - 1000, - 536870911 - ] - ], - reserved: [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - nested: { - CType: { - values: { - STRING: 0, - CORD: 1, - STRING_PIECE: 2 - } - }, - JSType: { - values: { - JS_NORMAL: 0, - JS_STRING: 1, - JS_NUMBER: 2 - } - }, - OptionRetention: { - values: { - RETENTION_UNKNOWN: 0, - RETENTION_RUNTIME: 1, - RETENTION_SOURCE: 2 - } - }, - OptionTargetType: { - values: { - TARGET_TYPE_UNKNOWN: 0, - TARGET_TYPE_FILE: 1, - TARGET_TYPE_EXTENSION_RANGE: 2, - TARGET_TYPE_MESSAGE: 3, - TARGET_TYPE_FIELD: 4, - TARGET_TYPE_ONEOF: 5, - TARGET_TYPE_ENUM: 6, - TARGET_TYPE_ENUM_ENTRY: 7, - TARGET_TYPE_SERVICE: 8, - TARGET_TYPE_METHOD: 9 - } - }, - EditionDefault: { - fields: { - edition: { - type: "Edition", - id: 3 - }, - value: { - type: "string", - id: 2 - } - } - } - } - }, - OneofOptions: { - edition: "proto2", - fields: { - features: { - type: "FeatureSet", - id: 1 - }, - uninterpretedOption: { - rule: "repeated", - type: "UninterpretedOption", - id: 999 - } - }, - extensions: [ - [ - 1000, - 536870911 - ] - ] - }, - EnumOptions: { - edition: "proto2", - fields: { - allowAlias: { - type: "bool", - id: 2 - }, - deprecated: { - type: "bool", - id: 3, - options: { - "default": false - } - }, - deprecatedLegacyJsonFieldConflicts: { - type: "bool", - id: 6, - options: { - deprecated: true - } - }, - features: { - type: "FeatureSet", - id: 7 - }, - uninterpretedOption: { - rule: "repeated", - type: "UninterpretedOption", - id: 999 - } - }, - extensions: [ - [ - 1000, - 536870911 - ] - ], - reserved: [ - [ - 5, - 5 - ] - ] - }, - EnumValueOptions: { - edition: "proto2", - fields: { - deprecated: { - type: "bool", - id: 1, - options: { - "default": false - } - }, - features: { - type: "FeatureSet", - id: 2 - }, - debugRedact: { - type: "bool", - id: 3, - options: { - "default": false - } - }, - uninterpretedOption: { - rule: "repeated", - type: "UninterpretedOption", - id: 999 - } - }, - extensions: [ - [ - 1000, - 536870911 - ] - ] - }, - ServiceOptions: { - edition: "proto2", - fields: { - features: { - type: "FeatureSet", - id: 34 - }, - deprecated: { - type: "bool", - id: 33, - options: { - "default": false - } - }, - uninterpretedOption: { - rule: "repeated", - type: "UninterpretedOption", - id: 999 - } - }, - extensions: [ - [ - 1000, - 536870911 - ] - ] - }, - MethodOptions: { - edition: "proto2", - fields: { - deprecated: { - type: "bool", - id: 33, - options: { - "default": false - } - }, - idempotencyLevel: { - type: "IdempotencyLevel", - id: 34, - options: { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - features: { - type: "FeatureSet", - id: 35 - }, - uninterpretedOption: { - rule: "repeated", - type: "UninterpretedOption", - id: 999 - } - }, - extensions: [ - [ - 1000, - 536870911 - ] - ], - nested: { - IdempotencyLevel: { - values: { - IDEMPOTENCY_UNKNOWN: 0, - NO_SIDE_EFFECTS: 1, - IDEMPOTENT: 2 - } - } - } - }, - UninterpretedOption: { - edition: "proto2", - fields: { - name: { - rule: "repeated", - type: "NamePart", - id: 2 - }, - identifierValue: { - type: "string", - id: 3 - }, - positiveIntValue: { - type: "uint64", - id: 4 - }, - negativeIntValue: { - type: "int64", - id: 5 - }, - doubleValue: { - type: "double", - id: 6 - }, - stringValue: { - type: "bytes", - id: 7 - }, - aggregateValue: { - type: "string", - id: 8 - } - }, - nested: { - NamePart: { - fields: { - namePart: { - rule: "required", - type: "string", - id: 1 - }, - isExtension: { - rule: "required", - type: "bool", - id: 2 - } - } - } - } - }, - FeatureSet: { - edition: "proto2", - fields: { - fieldPresence: { - type: "FieldPresence", - id: 1, - options: { - retention: "RETENTION_RUNTIME", - targets: "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - enumType: { - type: "EnumType", - id: 2, - options: { - retention: "RETENTION_RUNTIME", - targets: "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - repeatedFieldEncoding: { - type: "RepeatedFieldEncoding", - id: 3, - options: { - retention: "RETENTION_RUNTIME", - targets: "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - utf8Validation: { - type: "Utf8Validation", - id: 4, - options: { - retention: "RETENTION_RUNTIME", - targets: "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - messageEncoding: { - type: "MessageEncoding", - id: 5, - options: { - retention: "RETENTION_RUNTIME", - targets: "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - jsonFormat: { - type: "JsonFormat", - id: 6, - options: { - retention: "RETENTION_RUNTIME", - targets: "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - extensions: [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 9995, - 9999 - ] - ], - reserved: [ - [ - 999, - 999 - ] - ], - nested: { - FieldPresence: { - values: { - FIELD_PRESENCE_UNKNOWN: 0, - EXPLICIT: 1, - IMPLICIT: 2, - LEGACY_REQUIRED: 3 - } - }, - EnumType: { - values: { - ENUM_TYPE_UNKNOWN: 0, - OPEN: 1, - CLOSED: 2 - } - }, - RepeatedFieldEncoding: { - values: { - REPEATED_FIELD_ENCODING_UNKNOWN: 0, - PACKED: 1, - EXPANDED: 2 - } - }, - Utf8Validation: { - values: { - UTF8_VALIDATION_UNKNOWN: 0, - UNVERIFIED: 1, - VERIFY: 2 - } - }, - MessageEncoding: { - values: { - MESSAGE_ENCODING_UNKNOWN: 0, - LENGTH_PREFIXED: 1, - DELIMITED: 2 - } - }, - JsonFormat: { - values: { - JSON_FORMAT_UNKNOWN: 0, - ALLOW: 1, - LEGACY_BEST_EFFORT: 2 - } - } - } - }, - FeatureSetDefaults: { - edition: "proto2", - fields: { - defaults: { - rule: "repeated", - type: "FeatureSetEditionDefault", - id: 1 - }, - minimumEdition: { - type: "Edition", - id: 4 - }, - maximumEdition: { - type: "Edition", - id: 5 - } - }, - nested: { - FeatureSetEditionDefault: { - fields: { - edition: { - type: "Edition", - id: 3 - }, - features: { - type: "FeatureSet", - id: 2 - } - } - } - } - }, - SourceCodeInfo: { - edition: "proto2", - fields: { - location: { - rule: "repeated", - type: "Location", - id: 1 - } - }, - nested: { - Location: { - fields: { - path: { - rule: "repeated", - type: "int32", - id: 1, - options: { - packed: true - } - }, - span: { - rule: "repeated", - type: "int32", - id: 2, - options: { - packed: true - } - }, - leadingComments: { - type: "string", - id: 3 - }, - trailingComments: { - type: "string", - id: 4 - }, - leadingDetachedComments: { - rule: "repeated", - type: "string", - id: 6 - } - } - } - } - }, - GeneratedCodeInfo: { - edition: "proto2", - fields: { - annotation: { - rule: "repeated", - type: "Annotation", - id: 1 - } - }, - nested: { - Annotation: { - fields: { - path: { - rule: "repeated", - type: "int32", - id: 1, - options: { - packed: true - } - }, - sourceFile: { - type: "string", - id: 2 - }, - begin: { - type: "int32", - id: 3 - }, - end: { - type: "int32", - id: 4 - }, - semantic: { - type: "Semantic", - id: 5 - } - }, - nested: { - Semantic: { - values: { - NONE: 0, - SET: 1, - ALIAS: 2 - } - } - } - } - } - } - } - }, - api: { - options: { - go_package: "google.golang.org/genproto/googleapis/api/annotations;annotations", - java_multiple_files: true, - java_outer_classname: "HttpProto", - java_package: "com.google.api", - objc_class_prefix: "GAPI", - cc_enable_arenas: true - }, - nested: { - http: { - type: "HttpRule", - id: 72295728, - extend: "google.protobuf.MethodOptions" - }, - Http: { - fields: { - rules: { - rule: "repeated", - type: "HttpRule", - id: 1 - }, - fullyDecodeReservedExpansion: { - type: "bool", - id: 2 - } - } - }, - HttpRule: { - oneofs: { - pattern: { - oneof: [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - fields: { - selector: { - type: "string", - id: 1 - }, - get: { - type: "string", - id: 2 - }, - put: { - type: "string", - id: 3 - }, - post: { - type: "string", - id: 4 - }, - "delete": { - type: "string", - id: 5 - }, - patch: { - type: "string", - id: 6 - }, - custom: { - type: "CustomHttpPattern", - id: 8 - }, - body: { - type: "string", - id: 7 - }, - responseBody: { - type: "string", - id: 12 - }, - additionalBindings: { - rule: "repeated", - type: "HttpRule", - id: 11 - } - } - }, - CustomHttpPattern: { - fields: { - kind: { - type: "string", - id: 1 - }, - path: { - type: "string", - id: 2 - } - } - } - } - }, - rpc: { - options: { - cc_enable_arenas: true, - go_package: "google.golang.org/genproto/googleapis/rpc/status;status", - java_multiple_files: true, - java_outer_classname: "StatusProto", - java_package: "com.google.rpc", - objc_class_prefix: "RPC" - }, - nested: { - Status: { - fields: { - code: { - type: "int32", - id: 1 - }, - message: { - type: "string", - id: 2 - }, - details: { - rule: "repeated", - type: "google.protobuf.Any", - id: 3 - } - } - } - } - } - } - }, - grpc: { - nested: { - health: { - nested: { - v1: { - options: { - csharp_namespace: "Grpc.Health.V1", - go_package: "google.golang.org/grpc/health/grpc_health_v1", - java_multiple_files: true, - java_outer_classname: "HealthProto", - java_package: "io.grpc.health.v1" - }, - nested: { - HealthCheckRequest: { - fields: { - service: { - type: "string", - id: 1 - } - } - }, - HealthCheckResponse: { - fields: { - status: { - type: "ServingStatus", - id: 1 - } - }, - nested: { - ServingStatus: { - values: { - UNKNOWN: 0, - SERVING: 1, - NOT_SERVING: 2, - SERVICE_UNKNOWN: 3 - } - } - } - }, - Health: { - methods: { - Check: { - requestType: "HealthCheckRequest", - responseType: "HealthCheckResponse" - }, - Watch: { - requestType: "HealthCheckRequest", - responseType: "HealthCheckResponse", - responseStream: true - } - } - } - } - } - } - } - } - } -}); - -module.exports = $root; diff --git a/node_modules/@temporalio/proto/protos/root.d.ts b/node_modules/@temporalio/proto/protos/root.d.ts deleted file mode 100644 index 065b3ea..0000000 --- a/node_modules/@temporalio/proto/protos/root.d.ts +++ /dev/null @@ -1,108362 +0,0 @@ -import * as $protobuf from "protobufjs"; -import Long = require("long"); -/** Namespace coresdk. */ -export namespace coresdk { - - /** Properties of an ActivityHeartbeat. */ - interface IActivityHeartbeat { - - /** ActivityHeartbeat taskToken */ - taskToken?: (Uint8Array|null); - - /** ActivityHeartbeat details */ - details?: (temporal.api.common.v1.IPayload[]|null); - } - - /** A request as given to `record_activity_heartbeat` */ - class ActivityHeartbeat implements IActivityHeartbeat { - - /** - * Constructs a new ActivityHeartbeat. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.IActivityHeartbeat); - - /** ActivityHeartbeat taskToken. */ - public taskToken: Uint8Array; - - /** ActivityHeartbeat details. */ - public details: temporal.api.common.v1.IPayload[]; - - /** - * Creates a new ActivityHeartbeat instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityHeartbeat instance - */ - public static create(properties?: coresdk.IActivityHeartbeat): coresdk.ActivityHeartbeat; - - /** - * Encodes the specified ActivityHeartbeat message. Does not implicitly {@link coresdk.ActivityHeartbeat.verify|verify} messages. - * @param message ActivityHeartbeat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.IActivityHeartbeat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityHeartbeat message, length delimited. Does not implicitly {@link coresdk.ActivityHeartbeat.verify|verify} messages. - * @param message ActivityHeartbeat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.IActivityHeartbeat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityHeartbeat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityHeartbeat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.ActivityHeartbeat; - - /** - * Decodes an ActivityHeartbeat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityHeartbeat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.ActivityHeartbeat; - - /** - * Creates an ActivityHeartbeat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityHeartbeat - */ - public static fromObject(object: { [k: string]: any }): coresdk.ActivityHeartbeat; - - /** - * Creates a plain object from an ActivityHeartbeat message. Also converts values to other types if specified. - * @param message ActivityHeartbeat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.ActivityHeartbeat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityHeartbeat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityHeartbeat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityTaskCompletion. */ - interface IActivityTaskCompletion { - - /** ActivityTaskCompletion taskToken */ - taskToken?: (Uint8Array|null); - - /** ActivityTaskCompletion result */ - result?: (coresdk.activity_result.IActivityExecutionResult|null); - } - - /** A request as given to `complete_activity_task` */ - class ActivityTaskCompletion implements IActivityTaskCompletion { - - /** - * Constructs a new ActivityTaskCompletion. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.IActivityTaskCompletion); - - /** ActivityTaskCompletion taskToken. */ - public taskToken: Uint8Array; - - /** ActivityTaskCompletion result. */ - public result?: (coresdk.activity_result.IActivityExecutionResult|null); - - /** - * Creates a new ActivityTaskCompletion instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityTaskCompletion instance - */ - public static create(properties?: coresdk.IActivityTaskCompletion): coresdk.ActivityTaskCompletion; - - /** - * Encodes the specified ActivityTaskCompletion message. Does not implicitly {@link coresdk.ActivityTaskCompletion.verify|verify} messages. - * @param message ActivityTaskCompletion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.IActivityTaskCompletion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityTaskCompletion message, length delimited. Does not implicitly {@link coresdk.ActivityTaskCompletion.verify|verify} messages. - * @param message ActivityTaskCompletion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.IActivityTaskCompletion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityTaskCompletion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityTaskCompletion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.ActivityTaskCompletion; - - /** - * Decodes an ActivityTaskCompletion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityTaskCompletion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.ActivityTaskCompletion; - - /** - * Creates an ActivityTaskCompletion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityTaskCompletion - */ - public static fromObject(object: { [k: string]: any }): coresdk.ActivityTaskCompletion; - - /** - * Creates a plain object from an ActivityTaskCompletion message. Also converts values to other types if specified. - * @param message ActivityTaskCompletion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.ActivityTaskCompletion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityTaskCompletion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityTaskCompletion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowSlotInfo. */ - interface IWorkflowSlotInfo { - - /** WorkflowSlotInfo workflowType */ - workflowType?: (string|null); - - /** WorkflowSlotInfo isSticky */ - isSticky?: (boolean|null); - } - - /** Info about workflow task slot usage */ - class WorkflowSlotInfo implements IWorkflowSlotInfo { - - /** - * Constructs a new WorkflowSlotInfo. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.IWorkflowSlotInfo); - - /** WorkflowSlotInfo workflowType. */ - public workflowType: string; - - /** WorkflowSlotInfo isSticky. */ - public isSticky: boolean; - - /** - * Creates a new WorkflowSlotInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowSlotInfo instance - */ - public static create(properties?: coresdk.IWorkflowSlotInfo): coresdk.WorkflowSlotInfo; - - /** - * Encodes the specified WorkflowSlotInfo message. Does not implicitly {@link coresdk.WorkflowSlotInfo.verify|verify} messages. - * @param message WorkflowSlotInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.IWorkflowSlotInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowSlotInfo message, length delimited. Does not implicitly {@link coresdk.WorkflowSlotInfo.verify|verify} messages. - * @param message WorkflowSlotInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.IWorkflowSlotInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowSlotInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowSlotInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.WorkflowSlotInfo; - - /** - * Decodes a WorkflowSlotInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowSlotInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.WorkflowSlotInfo; - - /** - * Creates a WorkflowSlotInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowSlotInfo - */ - public static fromObject(object: { [k: string]: any }): coresdk.WorkflowSlotInfo; - - /** - * Creates a plain object from a WorkflowSlotInfo message. Also converts values to other types if specified. - * @param message WorkflowSlotInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.WorkflowSlotInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowSlotInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowSlotInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivitySlotInfo. */ - interface IActivitySlotInfo { - - /** ActivitySlotInfo activityType */ - activityType?: (string|null); - } - - /** Info about activity task slot usage */ - class ActivitySlotInfo implements IActivitySlotInfo { - - /** - * Constructs a new ActivitySlotInfo. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.IActivitySlotInfo); - - /** ActivitySlotInfo activityType. */ - public activityType: string; - - /** - * Creates a new ActivitySlotInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivitySlotInfo instance - */ - public static create(properties?: coresdk.IActivitySlotInfo): coresdk.ActivitySlotInfo; - - /** - * Encodes the specified ActivitySlotInfo message. Does not implicitly {@link coresdk.ActivitySlotInfo.verify|verify} messages. - * @param message ActivitySlotInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.IActivitySlotInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivitySlotInfo message, length delimited. Does not implicitly {@link coresdk.ActivitySlotInfo.verify|verify} messages. - * @param message ActivitySlotInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.IActivitySlotInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivitySlotInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivitySlotInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.ActivitySlotInfo; - - /** - * Decodes an ActivitySlotInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivitySlotInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.ActivitySlotInfo; - - /** - * Creates an ActivitySlotInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivitySlotInfo - */ - public static fromObject(object: { [k: string]: any }): coresdk.ActivitySlotInfo; - - /** - * Creates a plain object from an ActivitySlotInfo message. Also converts values to other types if specified. - * @param message ActivitySlotInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.ActivitySlotInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivitySlotInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivitySlotInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LocalActivitySlotInfo. */ - interface ILocalActivitySlotInfo { - - /** LocalActivitySlotInfo activityType */ - activityType?: (string|null); - } - - /** Info about local activity slot usage */ - class LocalActivitySlotInfo implements ILocalActivitySlotInfo { - - /** - * Constructs a new LocalActivitySlotInfo. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.ILocalActivitySlotInfo); - - /** LocalActivitySlotInfo activityType. */ - public activityType: string; - - /** - * Creates a new LocalActivitySlotInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns LocalActivitySlotInfo instance - */ - public static create(properties?: coresdk.ILocalActivitySlotInfo): coresdk.LocalActivitySlotInfo; - - /** - * Encodes the specified LocalActivitySlotInfo message. Does not implicitly {@link coresdk.LocalActivitySlotInfo.verify|verify} messages. - * @param message LocalActivitySlotInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.ILocalActivitySlotInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocalActivitySlotInfo message, length delimited. Does not implicitly {@link coresdk.LocalActivitySlotInfo.verify|verify} messages. - * @param message LocalActivitySlotInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.ILocalActivitySlotInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocalActivitySlotInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocalActivitySlotInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.LocalActivitySlotInfo; - - /** - * Decodes a LocalActivitySlotInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocalActivitySlotInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.LocalActivitySlotInfo; - - /** - * Creates a LocalActivitySlotInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocalActivitySlotInfo - */ - public static fromObject(object: { [k: string]: any }): coresdk.LocalActivitySlotInfo; - - /** - * Creates a plain object from a LocalActivitySlotInfo message. Also converts values to other types if specified. - * @param message LocalActivitySlotInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.LocalActivitySlotInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocalActivitySlotInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LocalActivitySlotInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusSlotInfo. */ - interface INexusSlotInfo { - - /** NexusSlotInfo service */ - service?: (string|null); - - /** NexusSlotInfo operation */ - operation?: (string|null); - } - - /** Info about nexus task slot usage */ - class NexusSlotInfo implements INexusSlotInfo { - - /** - * Constructs a new NexusSlotInfo. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.INexusSlotInfo); - - /** NexusSlotInfo service. */ - public service: string; - - /** NexusSlotInfo operation. */ - public operation: string; - - /** - * Creates a new NexusSlotInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusSlotInfo instance - */ - public static create(properties?: coresdk.INexusSlotInfo): coresdk.NexusSlotInfo; - - /** - * Encodes the specified NexusSlotInfo message. Does not implicitly {@link coresdk.NexusSlotInfo.verify|verify} messages. - * @param message NexusSlotInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.INexusSlotInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusSlotInfo message, length delimited. Does not implicitly {@link coresdk.NexusSlotInfo.verify|verify} messages. - * @param message NexusSlotInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.INexusSlotInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusSlotInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusSlotInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.NexusSlotInfo; - - /** - * Decodes a NexusSlotInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusSlotInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.NexusSlotInfo; - - /** - * Creates a NexusSlotInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusSlotInfo - */ - public static fromObject(object: { [k: string]: any }): coresdk.NexusSlotInfo; - - /** - * Creates a plain object from a NexusSlotInfo message. Also converts values to other types if specified. - * @param message NexusSlotInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.NexusSlotInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusSlotInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusSlotInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NamespaceInfo. */ - interface INamespaceInfo { - - /** Namespace configured limits */ - limits?: (coresdk.NamespaceInfo.ILimits|null); - } - - /** Info about a namespace */ - class NamespaceInfo implements INamespaceInfo { - - /** - * Constructs a new NamespaceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.INamespaceInfo); - - /** Namespace configured limits */ - public limits?: (coresdk.NamespaceInfo.ILimits|null); - - /** - * Creates a new NamespaceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespaceInfo instance - */ - public static create(properties?: coresdk.INamespaceInfo): coresdk.NamespaceInfo; - - /** - * Encodes the specified NamespaceInfo message. Does not implicitly {@link coresdk.NamespaceInfo.verify|verify} messages. - * @param message NamespaceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.INamespaceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespaceInfo message, length delimited. Does not implicitly {@link coresdk.NamespaceInfo.verify|verify} messages. - * @param message NamespaceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.INamespaceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespaceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespaceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.NamespaceInfo; - - /** - * Decodes a NamespaceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespaceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.NamespaceInfo; - - /** - * Creates a NamespaceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespaceInfo - */ - public static fromObject(object: { [k: string]: any }): coresdk.NamespaceInfo; - - /** - * Creates a plain object from a NamespaceInfo message. Also converts values to other types if specified. - * @param message NamespaceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.NamespaceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespaceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespaceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NamespaceInfo { - - /** Properties of a Limits. */ - interface ILimits { - - /** - * Maximum size in bytes for payload fields in workflow history events - * (e.g., workflow/activity inputs and results, failure details, signal payloads). - * When exceeded, the server will reject the operation with an error. - */ - blobSizeLimitError?: (Long|null); - - /** Maximum total memo size in bytes per workflow execution. */ - memoSizeLimitError?: (Long|null); - } - - /** Represents a Limits. */ - class Limits implements ILimits { - - /** - * Constructs a new Limits. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.NamespaceInfo.ILimits); - - /** - * Maximum size in bytes for payload fields in workflow history events - * (e.g., workflow/activity inputs and results, failure details, signal payloads). - * When exceeded, the server will reject the operation with an error. - */ - public blobSizeLimitError: Long; - - /** Maximum total memo size in bytes per workflow execution. */ - public memoSizeLimitError: Long; - - /** - * Creates a new Limits instance using the specified properties. - * @param [properties] Properties to set - * @returns Limits instance - */ - public static create(properties?: coresdk.NamespaceInfo.ILimits): coresdk.NamespaceInfo.Limits; - - /** - * Encodes the specified Limits message. Does not implicitly {@link coresdk.NamespaceInfo.Limits.verify|verify} messages. - * @param message Limits message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.NamespaceInfo.ILimits, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Limits message, length delimited. Does not implicitly {@link coresdk.NamespaceInfo.Limits.verify|verify} messages. - * @param message Limits message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.NamespaceInfo.ILimits, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Limits message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Limits - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.NamespaceInfo.Limits; - - /** - * Decodes a Limits message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Limits - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.NamespaceInfo.Limits; - - /** - * Creates a Limits message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Limits - */ - public static fromObject(object: { [k: string]: any }): coresdk.NamespaceInfo.Limits; - - /** - * Creates a plain object from a Limits message. Also converts values to other types if specified. - * @param message Limits - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.NamespaceInfo.Limits, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Limits to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Limits - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace activity_result. */ - namespace activity_result { - - /** Properties of an ActivityExecutionResult. */ - interface IActivityExecutionResult { - - /** ActivityExecutionResult completed */ - completed?: (coresdk.activity_result.ISuccess|null); - - /** ActivityExecutionResult failed */ - failed?: (coresdk.activity_result.IFailure|null); - - /** ActivityExecutionResult cancelled */ - cancelled?: (coresdk.activity_result.ICancellation|null); - - /** ActivityExecutionResult willCompleteAsync */ - willCompleteAsync?: (coresdk.activity_result.IWillCompleteAsync|null); - } - - /** Used to report activity completions to core */ - class ActivityExecutionResult implements IActivityExecutionResult { - - /** - * Constructs a new ActivityExecutionResult. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.activity_result.IActivityExecutionResult); - - /** ActivityExecutionResult completed. */ - public completed?: (coresdk.activity_result.ISuccess|null); - - /** ActivityExecutionResult failed. */ - public failed?: (coresdk.activity_result.IFailure|null); - - /** ActivityExecutionResult cancelled. */ - public cancelled?: (coresdk.activity_result.ICancellation|null); - - /** ActivityExecutionResult willCompleteAsync. */ - public willCompleteAsync?: (coresdk.activity_result.IWillCompleteAsync|null); - - /** ActivityExecutionResult status. */ - public status?: ("completed"|"failed"|"cancelled"|"willCompleteAsync"); - - /** - * Creates a new ActivityExecutionResult instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityExecutionResult instance - */ - public static create(properties?: coresdk.activity_result.IActivityExecutionResult): coresdk.activity_result.ActivityExecutionResult; - - /** - * Encodes the specified ActivityExecutionResult message. Does not implicitly {@link coresdk.activity_result.ActivityExecutionResult.verify|verify} messages. - * @param message ActivityExecutionResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.activity_result.IActivityExecutionResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityExecutionResult message, length delimited. Does not implicitly {@link coresdk.activity_result.ActivityExecutionResult.verify|verify} messages. - * @param message ActivityExecutionResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.activity_result.IActivityExecutionResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityExecutionResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityExecutionResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.activity_result.ActivityExecutionResult; - - /** - * Decodes an ActivityExecutionResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityExecutionResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.activity_result.ActivityExecutionResult; - - /** - * Creates an ActivityExecutionResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityExecutionResult - */ - public static fromObject(object: { [k: string]: any }): coresdk.activity_result.ActivityExecutionResult; - - /** - * Creates a plain object from an ActivityExecutionResult message. Also converts values to other types if specified. - * @param message ActivityExecutionResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.activity_result.ActivityExecutionResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityExecutionResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityExecutionResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityResolution. */ - interface IActivityResolution { - - /** ActivityResolution completed */ - completed?: (coresdk.activity_result.ISuccess|null); - - /** ActivityResolution failed */ - failed?: (coresdk.activity_result.IFailure|null); - - /** ActivityResolution cancelled */ - cancelled?: (coresdk.activity_result.ICancellation|null); - - /** ActivityResolution backoff */ - backoff?: (coresdk.activity_result.IDoBackoff|null); - } - - /** - * Used to report activity resolutions to lang. IE: This is what the activities are resolved with - * in the workflow. - */ - class ActivityResolution implements IActivityResolution { - - /** - * Constructs a new ActivityResolution. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.activity_result.IActivityResolution); - - /** ActivityResolution completed. */ - public completed?: (coresdk.activity_result.ISuccess|null); - - /** ActivityResolution failed. */ - public failed?: (coresdk.activity_result.IFailure|null); - - /** ActivityResolution cancelled. */ - public cancelled?: (coresdk.activity_result.ICancellation|null); - - /** ActivityResolution backoff. */ - public backoff?: (coresdk.activity_result.IDoBackoff|null); - - /** ActivityResolution status. */ - public status?: ("completed"|"failed"|"cancelled"|"backoff"); - - /** - * Creates a new ActivityResolution instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityResolution instance - */ - public static create(properties?: coresdk.activity_result.IActivityResolution): coresdk.activity_result.ActivityResolution; - - /** - * Encodes the specified ActivityResolution message. Does not implicitly {@link coresdk.activity_result.ActivityResolution.verify|verify} messages. - * @param message ActivityResolution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.activity_result.IActivityResolution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityResolution message, length delimited. Does not implicitly {@link coresdk.activity_result.ActivityResolution.verify|verify} messages. - * @param message ActivityResolution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.activity_result.IActivityResolution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityResolution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityResolution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.activity_result.ActivityResolution; - - /** - * Decodes an ActivityResolution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityResolution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.activity_result.ActivityResolution; - - /** - * Creates an ActivityResolution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityResolution - */ - public static fromObject(object: { [k: string]: any }): coresdk.activity_result.ActivityResolution; - - /** - * Creates a plain object from an ActivityResolution message. Also converts values to other types if specified. - * @param message ActivityResolution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.activity_result.ActivityResolution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityResolution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityResolution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Success. */ - interface ISuccess { - - /** Success result */ - result?: (temporal.api.common.v1.IPayload|null); - } - - /** Used to report successful completion either when executing or resolving */ - class Success implements ISuccess { - - /** - * Constructs a new Success. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.activity_result.ISuccess); - - /** Success result. */ - public result?: (temporal.api.common.v1.IPayload|null); - - /** - * Creates a new Success instance using the specified properties. - * @param [properties] Properties to set - * @returns Success instance - */ - public static create(properties?: coresdk.activity_result.ISuccess): coresdk.activity_result.Success; - - /** - * Encodes the specified Success message. Does not implicitly {@link coresdk.activity_result.Success.verify|verify} messages. - * @param message Success message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.activity_result.ISuccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Success message, length delimited. Does not implicitly {@link coresdk.activity_result.Success.verify|verify} messages. - * @param message Success message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.activity_result.ISuccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Success message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Success - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.activity_result.Success; - - /** - * Decodes a Success message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Success - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.activity_result.Success; - - /** - * Creates a Success message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Success - */ - public static fromObject(object: { [k: string]: any }): coresdk.activity_result.Success; - - /** - * Creates a plain object from a Success message. Also converts values to other types if specified. - * @param message Success - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.activity_result.Success, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Success to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Success - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Failure. */ - interface IFailure { - - /** Failure failure */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** Used to report activity failure either when executing or resolving */ - class Failure implements IFailure { - - /** - * Constructs a new Failure. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.activity_result.IFailure); - - /** Failure failure. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new Failure instance using the specified properties. - * @param [properties] Properties to set - * @returns Failure instance - */ - public static create(properties?: coresdk.activity_result.IFailure): coresdk.activity_result.Failure; - - /** - * Encodes the specified Failure message. Does not implicitly {@link coresdk.activity_result.Failure.verify|verify} messages. - * @param message Failure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.activity_result.IFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Failure message, length delimited. Does not implicitly {@link coresdk.activity_result.Failure.verify|verify} messages. - * @param message Failure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.activity_result.IFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Failure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.activity_result.Failure; - - /** - * Decodes a Failure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.activity_result.Failure; - - /** - * Creates a Failure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Failure - */ - public static fromObject(object: { [k: string]: any }): coresdk.activity_result.Failure; - - /** - * Creates a plain object from a Failure message. Also converts values to other types if specified. - * @param message Failure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.activity_result.Failure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Failure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Failure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Cancellation. */ - interface ICancellation { - - /** Cancellation failure */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** - * Used to report cancellation from both Core and Lang. - * When Lang reports a cancelled activity, it must put a CancelledFailure in the failure field. - * When Core reports a cancelled activity, it must put an ActivityFailure with CancelledFailure - * as the cause in the failure field. - */ - class Cancellation implements ICancellation { - - /** - * Constructs a new Cancellation. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.activity_result.ICancellation); - - /** Cancellation failure. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new Cancellation instance using the specified properties. - * @param [properties] Properties to set - * @returns Cancellation instance - */ - public static create(properties?: coresdk.activity_result.ICancellation): coresdk.activity_result.Cancellation; - - /** - * Encodes the specified Cancellation message. Does not implicitly {@link coresdk.activity_result.Cancellation.verify|verify} messages. - * @param message Cancellation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.activity_result.ICancellation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Cancellation message, length delimited. Does not implicitly {@link coresdk.activity_result.Cancellation.verify|verify} messages. - * @param message Cancellation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.activity_result.ICancellation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Cancellation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Cancellation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.activity_result.Cancellation; - - /** - * Decodes a Cancellation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Cancellation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.activity_result.Cancellation; - - /** - * Creates a Cancellation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Cancellation - */ - public static fromObject(object: { [k: string]: any }): coresdk.activity_result.Cancellation; - - /** - * Creates a plain object from a Cancellation message. Also converts values to other types if specified. - * @param message Cancellation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.activity_result.Cancellation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Cancellation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Cancellation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WillCompleteAsync. */ - interface IWillCompleteAsync { - } - - /** - * Used in ActivityExecutionResult to notify Core that this Activity will complete asynchronously. - * Core will forget about this Activity and free up resources used to track this Activity. - */ - class WillCompleteAsync implements IWillCompleteAsync { - - /** - * Constructs a new WillCompleteAsync. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.activity_result.IWillCompleteAsync); - - /** - * Creates a new WillCompleteAsync instance using the specified properties. - * @param [properties] Properties to set - * @returns WillCompleteAsync instance - */ - public static create(properties?: coresdk.activity_result.IWillCompleteAsync): coresdk.activity_result.WillCompleteAsync; - - /** - * Encodes the specified WillCompleteAsync message. Does not implicitly {@link coresdk.activity_result.WillCompleteAsync.verify|verify} messages. - * @param message WillCompleteAsync message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.activity_result.IWillCompleteAsync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WillCompleteAsync message, length delimited. Does not implicitly {@link coresdk.activity_result.WillCompleteAsync.verify|verify} messages. - * @param message WillCompleteAsync message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.activity_result.IWillCompleteAsync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WillCompleteAsync message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WillCompleteAsync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.activity_result.WillCompleteAsync; - - /** - * Decodes a WillCompleteAsync message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WillCompleteAsync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.activity_result.WillCompleteAsync; - - /** - * Creates a WillCompleteAsync message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WillCompleteAsync - */ - public static fromObject(object: { [k: string]: any }): coresdk.activity_result.WillCompleteAsync; - - /** - * Creates a plain object from a WillCompleteAsync message. Also converts values to other types if specified. - * @param message WillCompleteAsync - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.activity_result.WillCompleteAsync, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WillCompleteAsync to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WillCompleteAsync - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DoBackoff. */ - interface IDoBackoff { - - /** - * The attempt number that lang should provide when scheduling the retry. If the LA failed - * on attempt 4 and we told lang to back off with a timer, this number will be 5. - */ - attempt?: (number|null); - - /** DoBackoff backoffDuration */ - backoffDuration?: (google.protobuf.IDuration|null); - - /** - * The time the first attempt of this local activity was scheduled. Must be passed with attempt - * to the retry LA. - */ - originalScheduleTime?: (google.protobuf.ITimestamp|null); - } - - /** - * Issued when a local activity needs to retry but also wants to back off more than would be - * reasonable to WFT heartbeat for. Lang is expected to schedule a timer for the duration - * and then start a local activity of the same type & same inputs with the provided attempt number - * after the timer has elapsed. - * - * This exists because Core does not have a concept of starting commands by itself, they originate - * from lang. So expecting lang to start the timer / next pass of the activity fits more smoothly. - */ - class DoBackoff implements IDoBackoff { - - /** - * Constructs a new DoBackoff. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.activity_result.IDoBackoff); - - /** - * The attempt number that lang should provide when scheduling the retry. If the LA failed - * on attempt 4 and we told lang to back off with a timer, this number will be 5. - */ - public attempt: number; - - /** DoBackoff backoffDuration. */ - public backoffDuration?: (google.protobuf.IDuration|null); - - /** - * The time the first attempt of this local activity was scheduled. Must be passed with attempt - * to the retry LA. - */ - public originalScheduleTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new DoBackoff instance using the specified properties. - * @param [properties] Properties to set - * @returns DoBackoff instance - */ - public static create(properties?: coresdk.activity_result.IDoBackoff): coresdk.activity_result.DoBackoff; - - /** - * Encodes the specified DoBackoff message. Does not implicitly {@link coresdk.activity_result.DoBackoff.verify|verify} messages. - * @param message DoBackoff message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.activity_result.IDoBackoff, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DoBackoff message, length delimited. Does not implicitly {@link coresdk.activity_result.DoBackoff.verify|verify} messages. - * @param message DoBackoff message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.activity_result.IDoBackoff, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DoBackoff message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DoBackoff - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.activity_result.DoBackoff; - - /** - * Decodes a DoBackoff message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DoBackoff - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.activity_result.DoBackoff; - - /** - * Creates a DoBackoff message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DoBackoff - */ - public static fromObject(object: { [k: string]: any }): coresdk.activity_result.DoBackoff; - - /** - * Creates a plain object from a DoBackoff message. Also converts values to other types if specified. - * @param message DoBackoff - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.activity_result.DoBackoff, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DoBackoff to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DoBackoff - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace activity_task. */ - namespace activity_task { - - /** Properties of an ActivityTask. */ - interface IActivityTask { - - /** A unique identifier for this task */ - taskToken?: (Uint8Array|null); - - /** Start activity execution. */ - start?: (coresdk.activity_task.IStart|null); - - /** Attempt to cancel activity execution. */ - cancel?: (coresdk.activity_task.ICancel|null); - } - - /** Represents an ActivityTask. */ - class ActivityTask implements IActivityTask { - - /** - * Constructs a new ActivityTask. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.activity_task.IActivityTask); - - /** A unique identifier for this task */ - public taskToken: Uint8Array; - - /** Start activity execution. */ - public start?: (coresdk.activity_task.IStart|null); - - /** Attempt to cancel activity execution. */ - public cancel?: (coresdk.activity_task.ICancel|null); - - /** ActivityTask variant. */ - public variant?: ("start"|"cancel"); - - /** - * Creates a new ActivityTask instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityTask instance - */ - public static create(properties?: coresdk.activity_task.IActivityTask): coresdk.activity_task.ActivityTask; - - /** - * Encodes the specified ActivityTask message. Does not implicitly {@link coresdk.activity_task.ActivityTask.verify|verify} messages. - * @param message ActivityTask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.activity_task.IActivityTask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityTask message, length delimited. Does not implicitly {@link coresdk.activity_task.ActivityTask.verify|verify} messages. - * @param message ActivityTask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.activity_task.IActivityTask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityTask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.activity_task.ActivityTask; - - /** - * Decodes an ActivityTask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.activity_task.ActivityTask; - - /** - * Creates an ActivityTask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityTask - */ - public static fromObject(object: { [k: string]: any }): coresdk.activity_task.ActivityTask; - - /** - * Creates a plain object from an ActivityTask message. Also converts values to other types if specified. - * @param message ActivityTask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.activity_task.ActivityTask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityTask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityTask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Start. */ - interface IStart { - - /** The namespace the workflow lives in */ - workflowNamespace?: (string|null); - - /** The workflow's type name or function identifier */ - workflowType?: (string|null); - - /** The workflow execution which requested this activity */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The activity's ID */ - activityId?: (string|null); - - /** The activity's type name or function identifier */ - activityType?: (string|null); - - /** Start headerFields */ - headerFields?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - - /** Arguments to the activity */ - input?: (temporal.api.common.v1.IPayload[]|null); - - /** The last details that were recorded by a heartbeat when this task was generated */ - heartbeatDetails?: (temporal.api.common.v1.IPayload[]|null); - - /** When the task was *first* scheduled */ - scheduledTime?: (google.protobuf.ITimestamp|null); - - /** When this current attempt at the task was scheduled */ - currentAttemptScheduledTime?: (google.protobuf.ITimestamp|null); - - /** When this attempt was started, which is to say when core received it by polling. */ - startedTime?: (google.protobuf.ITimestamp|null); - - /** Start attempt */ - attempt?: (number|null); - - /** Timeout from the first schedule time to completion */ - scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Timeout from starting an attempt to reporting its result */ - startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** If set a heartbeat must be reported within this interval */ - heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** - * This is an actual retry policy the service uses. It can be different from the one provided - * (or not) during activity scheduling as the service can override the provided one in case its - * values are not specified or exceed configured system limits. - */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Priority of this activity. Local activities will always have this field set to the default. */ - priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Set to true if this is a local activity. Note that heartbeating does not apply to local - * activities. - */ - isLocal?: (boolean|null); - } - - /** Begin executing an activity */ - class Start implements IStart { - - /** - * Constructs a new Start. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.activity_task.IStart); - - /** The namespace the workflow lives in */ - public workflowNamespace: string; - - /** The workflow's type name or function identifier */ - public workflowType: string; - - /** The workflow execution which requested this activity */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The activity's ID */ - public activityId: string; - - /** The activity's type name or function identifier */ - public activityType: string; - - /** Start headerFields. */ - public headerFields: { [k: string]: temporal.api.common.v1.IPayload }; - - /** Arguments to the activity */ - public input: temporal.api.common.v1.IPayload[]; - - /** The last details that were recorded by a heartbeat when this task was generated */ - public heartbeatDetails: temporal.api.common.v1.IPayload[]; - - /** When the task was *first* scheduled */ - public scheduledTime?: (google.protobuf.ITimestamp|null); - - /** When this current attempt at the task was scheduled */ - public currentAttemptScheduledTime?: (google.protobuf.ITimestamp|null); - - /** When this attempt was started, which is to say when core received it by polling. */ - public startedTime?: (google.protobuf.ITimestamp|null); - - /** Start attempt. */ - public attempt: number; - - /** Timeout from the first schedule time to completion */ - public scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Timeout from starting an attempt to reporting its result */ - public startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** If set a heartbeat must be reported within this interval */ - public heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** - * This is an actual retry policy the service uses. It can be different from the one provided - * (or not) during activity scheduling as the service can override the provided one in case its - * values are not specified or exceed configured system limits. - */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Priority of this activity. Local activities will always have this field set to the default. */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Set to true if this is a local activity. Note that heartbeating does not apply to local - * activities. - */ - public isLocal: boolean; - - /** - * Creates a new Start instance using the specified properties. - * @param [properties] Properties to set - * @returns Start instance - */ - public static create(properties?: coresdk.activity_task.IStart): coresdk.activity_task.Start; - - /** - * Encodes the specified Start message. Does not implicitly {@link coresdk.activity_task.Start.verify|verify} messages. - * @param message Start message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.activity_task.IStart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Start message, length delimited. Does not implicitly {@link coresdk.activity_task.Start.verify|verify} messages. - * @param message Start message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.activity_task.IStart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Start message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Start - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.activity_task.Start; - - /** - * Decodes a Start message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Start - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.activity_task.Start; - - /** - * Creates a Start message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Start - */ - public static fromObject(object: { [k: string]: any }): coresdk.activity_task.Start; - - /** - * Creates a plain object from a Start message. Also converts values to other types if specified. - * @param message Start - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.activity_task.Start, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Start to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Start - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Cancel. */ - interface ICancel { - - /** Primary cancellation reason */ - reason?: (coresdk.activity_task.ActivityCancelReason|null); - - /** Activity cancellation details, surfaces all cancellation reasons. */ - details?: (coresdk.activity_task.IActivityCancellationDetails|null); - } - - /** Attempt to cancel a running activity */ - class Cancel implements ICancel { - - /** - * Constructs a new Cancel. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.activity_task.ICancel); - - /** Primary cancellation reason */ - public reason: coresdk.activity_task.ActivityCancelReason; - - /** Activity cancellation details, surfaces all cancellation reasons. */ - public details?: (coresdk.activity_task.IActivityCancellationDetails|null); - - /** - * Creates a new Cancel instance using the specified properties. - * @param [properties] Properties to set - * @returns Cancel instance - */ - public static create(properties?: coresdk.activity_task.ICancel): coresdk.activity_task.Cancel; - - /** - * Encodes the specified Cancel message. Does not implicitly {@link coresdk.activity_task.Cancel.verify|verify} messages. - * @param message Cancel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.activity_task.ICancel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Cancel message, length delimited. Does not implicitly {@link coresdk.activity_task.Cancel.verify|verify} messages. - * @param message Cancel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.activity_task.ICancel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Cancel message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Cancel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.activity_task.Cancel; - - /** - * Decodes a Cancel message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Cancel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.activity_task.Cancel; - - /** - * Creates a Cancel message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Cancel - */ - public static fromObject(object: { [k: string]: any }): coresdk.activity_task.Cancel; - - /** - * Creates a plain object from a Cancel message. Also converts values to other types if specified. - * @param message Cancel - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.activity_task.Cancel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Cancel to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Cancel - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityCancellationDetails. */ - interface IActivityCancellationDetails { - - /** ActivityCancellationDetails isNotFound */ - isNotFound?: (boolean|null); - - /** ActivityCancellationDetails isCancelled */ - isCancelled?: (boolean|null); - - /** ActivityCancellationDetails isPaused */ - isPaused?: (boolean|null); - - /** ActivityCancellationDetails isTimedOut */ - isTimedOut?: (boolean|null); - - /** ActivityCancellationDetails isWorkerShutdown */ - isWorkerShutdown?: (boolean|null); - - /** ActivityCancellationDetails isReset */ - isReset?: (boolean|null); - } - - /** Represents an ActivityCancellationDetails. */ - class ActivityCancellationDetails implements IActivityCancellationDetails { - - /** - * Constructs a new ActivityCancellationDetails. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.activity_task.IActivityCancellationDetails); - - /** ActivityCancellationDetails isNotFound. */ - public isNotFound: boolean; - - /** ActivityCancellationDetails isCancelled. */ - public isCancelled: boolean; - - /** ActivityCancellationDetails isPaused. */ - public isPaused: boolean; - - /** ActivityCancellationDetails isTimedOut. */ - public isTimedOut: boolean; - - /** ActivityCancellationDetails isWorkerShutdown. */ - public isWorkerShutdown: boolean; - - /** ActivityCancellationDetails isReset. */ - public isReset: boolean; - - /** - * Creates a new ActivityCancellationDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityCancellationDetails instance - */ - public static create(properties?: coresdk.activity_task.IActivityCancellationDetails): coresdk.activity_task.ActivityCancellationDetails; - - /** - * Encodes the specified ActivityCancellationDetails message. Does not implicitly {@link coresdk.activity_task.ActivityCancellationDetails.verify|verify} messages. - * @param message ActivityCancellationDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.activity_task.IActivityCancellationDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityCancellationDetails message, length delimited. Does not implicitly {@link coresdk.activity_task.ActivityCancellationDetails.verify|verify} messages. - * @param message ActivityCancellationDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.activity_task.IActivityCancellationDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityCancellationDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityCancellationDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.activity_task.ActivityCancellationDetails; - - /** - * Decodes an ActivityCancellationDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityCancellationDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.activity_task.ActivityCancellationDetails; - - /** - * Creates an ActivityCancellationDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityCancellationDetails - */ - public static fromObject(object: { [k: string]: any }): coresdk.activity_task.ActivityCancellationDetails; - - /** - * Creates a plain object from an ActivityCancellationDetails message. Also converts values to other types if specified. - * @param message ActivityCancellationDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.activity_task.ActivityCancellationDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityCancellationDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityCancellationDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** ActivityCancelReason enum. */ - enum ActivityCancelReason { - NOT_FOUND = 0, - CANCELLED = 1, - TIMED_OUT = 2, - WORKER_SHUTDOWN = 3, - PAUSED = 4, - RESET = 5 - } - } - - /** Namespace common. */ - namespace common { - - /** Properties of a NamespacedWorkflowExecution. */ - interface INamespacedWorkflowExecution { - - /** Namespace the workflow run is located in */ - namespace?: (string|null); - - /** Can never be empty */ - workflowId?: (string|null); - - /** May be empty if the most recent run of the workflow with the given ID is being targeted */ - runId?: (string|null); - } - - /** Identifying information about a particular workflow execution, including namespace */ - class NamespacedWorkflowExecution implements INamespacedWorkflowExecution { - - /** - * Constructs a new NamespacedWorkflowExecution. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.common.INamespacedWorkflowExecution); - - /** Namespace the workflow run is located in */ - public namespace: string; - - /** Can never be empty */ - public workflowId: string; - - /** May be empty if the most recent run of the workflow with the given ID is being targeted */ - public runId: string; - - /** - * Creates a new NamespacedWorkflowExecution instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespacedWorkflowExecution instance - */ - public static create(properties?: coresdk.common.INamespacedWorkflowExecution): coresdk.common.NamespacedWorkflowExecution; - - /** - * Encodes the specified NamespacedWorkflowExecution message. Does not implicitly {@link coresdk.common.NamespacedWorkflowExecution.verify|verify} messages. - * @param message NamespacedWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.common.INamespacedWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespacedWorkflowExecution message, length delimited. Does not implicitly {@link coresdk.common.NamespacedWorkflowExecution.verify|verify} messages. - * @param message NamespacedWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.common.INamespacedWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespacedWorkflowExecution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespacedWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.common.NamespacedWorkflowExecution; - - /** - * Decodes a NamespacedWorkflowExecution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespacedWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.common.NamespacedWorkflowExecution; - - /** - * Creates a NamespacedWorkflowExecution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespacedWorkflowExecution - */ - public static fromObject(object: { [k: string]: any }): coresdk.common.NamespacedWorkflowExecution; - - /** - * Creates a plain object from a NamespacedWorkflowExecution message. Also converts values to other types if specified. - * @param message NamespacedWorkflowExecution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.common.NamespacedWorkflowExecution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespacedWorkflowExecution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespacedWorkflowExecution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** - * An indication of user's intent concerning what Build ID versioning approach should be used for - * a specific command - */ - enum VersioningIntent { - UNSPECIFIED = 0, - COMPATIBLE = 1, - DEFAULT = 2 - } - - /** Properties of a WorkerDeploymentVersion. */ - interface IWorkerDeploymentVersion { - - /** WorkerDeploymentVersion deploymentName */ - deploymentName?: (string|null); - - /** WorkerDeploymentVersion buildId */ - buildId?: (string|null); - } - - /** Represents a WorkerDeploymentVersion. */ - class WorkerDeploymentVersion implements IWorkerDeploymentVersion { - - /** - * Constructs a new WorkerDeploymentVersion. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.common.IWorkerDeploymentVersion); - - /** WorkerDeploymentVersion deploymentName. */ - public deploymentName: string; - - /** WorkerDeploymentVersion buildId. */ - public buildId: string; - - /** - * Creates a new WorkerDeploymentVersion instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerDeploymentVersion instance - */ - public static create(properties?: coresdk.common.IWorkerDeploymentVersion): coresdk.common.WorkerDeploymentVersion; - - /** - * Encodes the specified WorkerDeploymentVersion message. Does not implicitly {@link coresdk.common.WorkerDeploymentVersion.verify|verify} messages. - * @param message WorkerDeploymentVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.common.IWorkerDeploymentVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerDeploymentVersion message, length delimited. Does not implicitly {@link coresdk.common.WorkerDeploymentVersion.verify|verify} messages. - * @param message WorkerDeploymentVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.common.IWorkerDeploymentVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerDeploymentVersion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerDeploymentVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.common.WorkerDeploymentVersion; - - /** - * Decodes a WorkerDeploymentVersion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerDeploymentVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.common.WorkerDeploymentVersion; - - /** - * Creates a WorkerDeploymentVersion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerDeploymentVersion - */ - public static fromObject(object: { [k: string]: any }): coresdk.common.WorkerDeploymentVersion; - - /** - * Creates a plain object from a WorkerDeploymentVersion message. Also converts values to other types if specified. - * @param message WorkerDeploymentVersion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.common.WorkerDeploymentVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerDeploymentVersion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerDeploymentVersion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace external_data. */ - namespace external_data { - - /** Properties of a LocalActivityMarkerData. */ - interface ILocalActivityMarkerData { - - /** LocalActivityMarkerData seq */ - seq?: (number|null); - - /** - * The number of attempts at execution before we recorded this result. Typically starts at 1, - * but it is possible to start at a higher number when backing off using a timer. - */ - attempt?: (number|null); - - /** LocalActivityMarkerData activityId */ - activityId?: (string|null); - - /** LocalActivityMarkerData activityType */ - activityType?: (string|null); - - /** - * You can think of this as "perceived completion time". It is the time the local activity thought - * it was when it completed. Which could be different from wall-clock time because of workflow - * replay. It's the WFT start time + the LA's runtime - */ - completeTime?: (google.protobuf.ITimestamp|null); - - /** - * If set, this local activity conceptually is retrying after the specified backoff. - * Implementation wise, they are really two different LA machines, but with the same type & input. - * The retry starts with an attempt number > 1. - */ - backoff?: (google.protobuf.IDuration|null); - - /** - * The time the LA was originally scheduled (wall clock time). This is used to track - * schedule-to-close timeouts when timer-based backoffs are used - */ - originalScheduleTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a LocalActivityMarkerData. */ - class LocalActivityMarkerData implements ILocalActivityMarkerData { - - /** - * Constructs a new LocalActivityMarkerData. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.external_data.ILocalActivityMarkerData); - - /** LocalActivityMarkerData seq. */ - public seq: number; - - /** - * The number of attempts at execution before we recorded this result. Typically starts at 1, - * but it is possible to start at a higher number when backing off using a timer. - */ - public attempt: number; - - /** LocalActivityMarkerData activityId. */ - public activityId: string; - - /** LocalActivityMarkerData activityType. */ - public activityType: string; - - /** - * You can think of this as "perceived completion time". It is the time the local activity thought - * it was when it completed. Which could be different from wall-clock time because of workflow - * replay. It's the WFT start time + the LA's runtime - */ - public completeTime?: (google.protobuf.ITimestamp|null); - - /** - * If set, this local activity conceptually is retrying after the specified backoff. - * Implementation wise, they are really two different LA machines, but with the same type & input. - * The retry starts with an attempt number > 1. - */ - public backoff?: (google.protobuf.IDuration|null); - - /** - * The time the LA was originally scheduled (wall clock time). This is used to track - * schedule-to-close timeouts when timer-based backoffs are used - */ - public originalScheduleTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new LocalActivityMarkerData instance using the specified properties. - * @param [properties] Properties to set - * @returns LocalActivityMarkerData instance - */ - public static create(properties?: coresdk.external_data.ILocalActivityMarkerData): coresdk.external_data.LocalActivityMarkerData; - - /** - * Encodes the specified LocalActivityMarkerData message. Does not implicitly {@link coresdk.external_data.LocalActivityMarkerData.verify|verify} messages. - * @param message LocalActivityMarkerData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.external_data.ILocalActivityMarkerData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocalActivityMarkerData message, length delimited. Does not implicitly {@link coresdk.external_data.LocalActivityMarkerData.verify|verify} messages. - * @param message LocalActivityMarkerData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.external_data.ILocalActivityMarkerData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocalActivityMarkerData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocalActivityMarkerData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.external_data.LocalActivityMarkerData; - - /** - * Decodes a LocalActivityMarkerData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocalActivityMarkerData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.external_data.LocalActivityMarkerData; - - /** - * Creates a LocalActivityMarkerData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocalActivityMarkerData - */ - public static fromObject(object: { [k: string]: any }): coresdk.external_data.LocalActivityMarkerData; - - /** - * Creates a plain object from a LocalActivityMarkerData message. Also converts values to other types if specified. - * @param message LocalActivityMarkerData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.external_data.LocalActivityMarkerData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocalActivityMarkerData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LocalActivityMarkerData - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PatchedMarkerData. */ - interface IPatchedMarkerData { - - /** The patch id */ - id?: (string|null); - - /** Whether or not the patch is marked deprecated. */ - deprecated?: (boolean|null); - } - - /** Represents a PatchedMarkerData. */ - class PatchedMarkerData implements IPatchedMarkerData { - - /** - * Constructs a new PatchedMarkerData. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.external_data.IPatchedMarkerData); - - /** The patch id */ - public id: string; - - /** Whether or not the patch is marked deprecated. */ - public deprecated: boolean; - - /** - * Creates a new PatchedMarkerData instance using the specified properties. - * @param [properties] Properties to set - * @returns PatchedMarkerData instance - */ - public static create(properties?: coresdk.external_data.IPatchedMarkerData): coresdk.external_data.PatchedMarkerData; - - /** - * Encodes the specified PatchedMarkerData message. Does not implicitly {@link coresdk.external_data.PatchedMarkerData.verify|verify} messages. - * @param message PatchedMarkerData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.external_data.IPatchedMarkerData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PatchedMarkerData message, length delimited. Does not implicitly {@link coresdk.external_data.PatchedMarkerData.verify|verify} messages. - * @param message PatchedMarkerData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.external_data.IPatchedMarkerData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PatchedMarkerData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PatchedMarkerData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.external_data.PatchedMarkerData; - - /** - * Decodes a PatchedMarkerData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PatchedMarkerData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.external_data.PatchedMarkerData; - - /** - * Creates a PatchedMarkerData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PatchedMarkerData - */ - public static fromObject(object: { [k: string]: any }): coresdk.external_data.PatchedMarkerData; - - /** - * Creates a plain object from a PatchedMarkerData message. Also converts values to other types if specified. - * @param message PatchedMarkerData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.external_data.PatchedMarkerData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PatchedMarkerData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PatchedMarkerData - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace workflow_activation. */ - namespace workflow_activation { - - /** Properties of a WorkflowActivation. */ - interface IWorkflowActivation { - - /** - * The id of the currently active run of the workflow. Also used as a cache key. There may - * only ever be one active workflow task (and hence activation) of a run at one time. - */ - runId?: (string|null); - - /** The current time as understood by the workflow, which is set by workflow task started events */ - timestamp?: (google.protobuf.ITimestamp|null); - - /** Whether or not the activation is replaying past events */ - isReplaying?: (boolean|null); - - /** - * Current history length as determined by the event id of the most recently processed event. - * This ensures that the number is always deterministic - */ - historyLength?: (number|null); - - /** The things to do upon activating the workflow */ - jobs?: (coresdk.workflow_activation.IWorkflowActivationJob[]|null); - - /** - * Internal flags which are available for use by lang. If `is_replaying` is false, all - * internal flags may be used. This is not a delta - all previously used flags always - * appear since this representation is cheap. - */ - availableInternalFlags?: (number[]|null); - - /** The history size in bytes as of the last WFT started event */ - historySizeBytes?: (Long|null); - - /** Set true if the most recent WFT started event had this suggestion */ - continueAsNewSuggested?: (boolean|null); - - /** - * Set to the deployment version of the worker that processed this task, - * which may be empty. During replay this version may not equal the version - * of the replaying worker. If not replaying and this worker has a defined - * Deployment Version, it will equal that. It will also be empty for - * evict-only activations. The deployment name may be empty, but not the - * build id, if this worker was using the deprecated Build ID-only - * feature(s). - */ - deploymentVersionForCurrentTask?: (coresdk.common.IWorkerDeploymentVersion|null); - - /** The last seen SDK version from the most recent WFT completed event */ - lastSdkVersion?: (string|null); - - /** - * Experimental. Optionally decide the versioning behavior that the first task of the new run should use. - * For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version - * of the previous run. - */ - suggestContinueAsNewReasons?: (temporal.api.enums.v1.SuggestContinueAsNewReason[]|null); - - /** - * True if Workflow's Target Worker Deployment Version is different from its Pinned Version and - * the workflow is Pinned. - * Experimental. - */ - targetWorkerDeploymentVersionChanged?: (boolean|null); - } - - /** - * An instruction to the lang sdk to run some workflow code, whether for the first time or from - * a cached state. - * - * ## Job ordering guarantees and semantics - * - * Core will, by default, order jobs within the activation as follows: - * 1. init workflow - * 2. patches - * 3. random-seed-updates - * 4. signals/updates - * 5. all others - * 6. local activity resolutions - * 7. queries - * 8. evictions - * - * This is because: - * * Patches are expected to apply to the entire activation - * * Signal and update handlers should be invoked before workflow routines are iterated. That is to - * say before the users' main workflow function and anything spawned by it is allowed to continue. - * * Local activities resolutions go after other normal jobs because while *not* replaying, they - * will always take longer than anything else that produces an immediate job (which is - * effectively instant). When *replaying* we need to scan ahead for LA markers so that we can - * resolve them in the same activation that they completed in when not replaying. However, doing - * so would, by default, put those resolutions *before* any other immediate jobs that happened - * in that same activation (prime example: cancelling not-wait-for-cancel activities). So, we do - * this to ensure the LA resolution happens after that cancel (or whatever else it may be) as it - * normally would have when executing. - * * Queries always go last (and, in fact, always come in their own activation) - * * Evictions also always come in their own activation - * - * Core does this reordering to ensure that langs observe jobs in the same order during replay as - * they would have during execution. However, in principle, this ordering is not necessary - * (excepting queries/evictions, which definitely must come last) if lang layers apply all jobs to - * state *first* (by resolving promises/futures, marking handlers to be invoked, etc as they iterate - * over the jobs) and then only *after* that is done, drive coroutines/threads/whatever. If - * execution works this way, then determinism is only impacted by the order routines are driven in - * (which must be stable based on lang implementation or convention), rather than the order jobs are - * processed. - * - * ## Evictions - * - * Evictions appear as an activations that contains only a `remove_from_cache` job. Such activations - * should not cause the workflow code to be invoked and may be responded to with an empty command - * list. - */ - class WorkflowActivation implements IWorkflowActivation { - - /** - * Constructs a new WorkflowActivation. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IWorkflowActivation); - - /** - * The id of the currently active run of the workflow. Also used as a cache key. There may - * only ever be one active workflow task (and hence activation) of a run at one time. - */ - public runId: string; - - /** The current time as understood by the workflow, which is set by workflow task started events */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** Whether or not the activation is replaying past events */ - public isReplaying: boolean; - - /** - * Current history length as determined by the event id of the most recently processed event. - * This ensures that the number is always deterministic - */ - public historyLength: number; - - /** The things to do upon activating the workflow */ - public jobs: coresdk.workflow_activation.IWorkflowActivationJob[]; - - /** - * Internal flags which are available for use by lang. If `is_replaying` is false, all - * internal flags may be used. This is not a delta - all previously used flags always - * appear since this representation is cheap. - */ - public availableInternalFlags: number[]; - - /** The history size in bytes as of the last WFT started event */ - public historySizeBytes: Long; - - /** Set true if the most recent WFT started event had this suggestion */ - public continueAsNewSuggested: boolean; - - /** - * Set to the deployment version of the worker that processed this task, - * which may be empty. During replay this version may not equal the version - * of the replaying worker. If not replaying and this worker has a defined - * Deployment Version, it will equal that. It will also be empty for - * evict-only activations. The deployment name may be empty, but not the - * build id, if this worker was using the deprecated Build ID-only - * feature(s). - */ - public deploymentVersionForCurrentTask?: (coresdk.common.IWorkerDeploymentVersion|null); - - /** The last seen SDK version from the most recent WFT completed event */ - public lastSdkVersion: string; - - /** - * Experimental. Optionally decide the versioning behavior that the first task of the new run should use. - * For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version - * of the previous run. - */ - public suggestContinueAsNewReasons: temporal.api.enums.v1.SuggestContinueAsNewReason[]; - - /** - * True if Workflow's Target Worker Deployment Version is different from its Pinned Version and - * the workflow is Pinned. - * Experimental. - */ - public targetWorkerDeploymentVersionChanged: boolean; - - /** - * Creates a new WorkflowActivation instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowActivation instance - */ - public static create(properties?: coresdk.workflow_activation.IWorkflowActivation): coresdk.workflow_activation.WorkflowActivation; - - /** - * Encodes the specified WorkflowActivation message. Does not implicitly {@link coresdk.workflow_activation.WorkflowActivation.verify|verify} messages. - * @param message WorkflowActivation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IWorkflowActivation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowActivation message, length delimited. Does not implicitly {@link coresdk.workflow_activation.WorkflowActivation.verify|verify} messages. - * @param message WorkflowActivation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IWorkflowActivation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowActivation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowActivation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.WorkflowActivation; - - /** - * Decodes a WorkflowActivation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowActivation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.WorkflowActivation; - - /** - * Creates a WorkflowActivation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowActivation - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.WorkflowActivation; - - /** - * Creates a plain object from a WorkflowActivation message. Also converts values to other types if specified. - * @param message WorkflowActivation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.WorkflowActivation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowActivation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowActivation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowActivationJob. */ - interface IWorkflowActivationJob { - - /** A workflow is starting, record all of the information from its start event */ - initializeWorkflow?: (coresdk.workflow_activation.IInitializeWorkflow|null); - - /** A timer has fired, allowing whatever was waiting on it (if anything) to proceed */ - fireTimer?: (coresdk.workflow_activation.IFireTimer|null); - - /** Workflow was reset. The randomness seed must be updated. */ - updateRandomSeed?: (coresdk.workflow_activation.IUpdateRandomSeed|null); - - /** - * A request to query the workflow was received. It is guaranteed that queries (one or more) - * always come in their own activation after other mutating jobs. - */ - queryWorkflow?: (coresdk.workflow_activation.IQueryWorkflow|null); - - /** A request to cancel the workflow was received. */ - cancelWorkflow?: (coresdk.workflow_activation.ICancelWorkflow|null); - - /** A request to signal the workflow was received. */ - signalWorkflow?: (coresdk.workflow_activation.ISignalWorkflow|null); - - /** An activity was resolved, result could be completed, failed or cancelled */ - resolveActivity?: (coresdk.workflow_activation.IResolveActivity|null); - - /** - * A patch marker has been detected and lang is being told that change exists. This - * job is strange in that it is sent pre-emptively to lang without any corresponding - * command being sent first. - */ - notifyHasPatch?: (coresdk.workflow_activation.INotifyHasPatch|null); - - /** A child workflow execution has started or failed to start */ - resolveChildWorkflowExecutionStart?: (coresdk.workflow_activation.IResolveChildWorkflowExecutionStart|null); - - /** A child workflow was resolved, result could be completed or failed */ - resolveChildWorkflowExecution?: (coresdk.workflow_activation.IResolveChildWorkflowExecution|null); - - /** An attempt to signal an external workflow resolved */ - resolveSignalExternalWorkflow?: (coresdk.workflow_activation.IResolveSignalExternalWorkflow|null); - - /** An attempt to cancel an external workflow resolved */ - resolveRequestCancelExternalWorkflow?: (coresdk.workflow_activation.IResolveRequestCancelExternalWorkflow|null); - - /** A request to handle a workflow update. */ - doUpdate?: (coresdk.workflow_activation.IDoUpdate|null); - - /** A nexus operation started. */ - resolveNexusOperationStart?: (coresdk.workflow_activation.IResolveNexusOperationStart|null); - - /** A nexus operation resolved. */ - resolveNexusOperation?: (coresdk.workflow_activation.IResolveNexusOperation|null); - - /** - * Remove the workflow identified by the [WorkflowActivation] containing this job from the - * cache after performing the activation. It is guaranteed that this will be the only job - * in the activation if present. - */ - removeFromCache?: (coresdk.workflow_activation.IRemoveFromCache|null); - } - - /** Represents a WorkflowActivationJob. */ - class WorkflowActivationJob implements IWorkflowActivationJob { - - /** - * Constructs a new WorkflowActivationJob. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IWorkflowActivationJob); - - /** A workflow is starting, record all of the information from its start event */ - public initializeWorkflow?: (coresdk.workflow_activation.IInitializeWorkflow|null); - - /** A timer has fired, allowing whatever was waiting on it (if anything) to proceed */ - public fireTimer?: (coresdk.workflow_activation.IFireTimer|null); - - /** Workflow was reset. The randomness seed must be updated. */ - public updateRandomSeed?: (coresdk.workflow_activation.IUpdateRandomSeed|null); - - /** - * A request to query the workflow was received. It is guaranteed that queries (one or more) - * always come in their own activation after other mutating jobs. - */ - public queryWorkflow?: (coresdk.workflow_activation.IQueryWorkflow|null); - - /** A request to cancel the workflow was received. */ - public cancelWorkflow?: (coresdk.workflow_activation.ICancelWorkflow|null); - - /** A request to signal the workflow was received. */ - public signalWorkflow?: (coresdk.workflow_activation.ISignalWorkflow|null); - - /** An activity was resolved, result could be completed, failed or cancelled */ - public resolveActivity?: (coresdk.workflow_activation.IResolveActivity|null); - - /** - * A patch marker has been detected and lang is being told that change exists. This - * job is strange in that it is sent pre-emptively to lang without any corresponding - * command being sent first. - */ - public notifyHasPatch?: (coresdk.workflow_activation.INotifyHasPatch|null); - - /** A child workflow execution has started or failed to start */ - public resolveChildWorkflowExecutionStart?: (coresdk.workflow_activation.IResolveChildWorkflowExecutionStart|null); - - /** A child workflow was resolved, result could be completed or failed */ - public resolveChildWorkflowExecution?: (coresdk.workflow_activation.IResolveChildWorkflowExecution|null); - - /** An attempt to signal an external workflow resolved */ - public resolveSignalExternalWorkflow?: (coresdk.workflow_activation.IResolveSignalExternalWorkflow|null); - - /** An attempt to cancel an external workflow resolved */ - public resolveRequestCancelExternalWorkflow?: (coresdk.workflow_activation.IResolveRequestCancelExternalWorkflow|null); - - /** A request to handle a workflow update. */ - public doUpdate?: (coresdk.workflow_activation.IDoUpdate|null); - - /** A nexus operation started. */ - public resolveNexusOperationStart?: (coresdk.workflow_activation.IResolveNexusOperationStart|null); - - /** A nexus operation resolved. */ - public resolveNexusOperation?: (coresdk.workflow_activation.IResolveNexusOperation|null); - - /** - * Remove the workflow identified by the [WorkflowActivation] containing this job from the - * cache after performing the activation. It is guaranteed that this will be the only job - * in the activation if present. - */ - public removeFromCache?: (coresdk.workflow_activation.IRemoveFromCache|null); - - /** WorkflowActivationJob variant. */ - public variant?: ("initializeWorkflow"|"fireTimer"|"updateRandomSeed"|"queryWorkflow"|"cancelWorkflow"|"signalWorkflow"|"resolveActivity"|"notifyHasPatch"|"resolveChildWorkflowExecutionStart"|"resolveChildWorkflowExecution"|"resolveSignalExternalWorkflow"|"resolveRequestCancelExternalWorkflow"|"doUpdate"|"resolveNexusOperationStart"|"resolveNexusOperation"|"removeFromCache"); - - /** - * Creates a new WorkflowActivationJob instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowActivationJob instance - */ - public static create(properties?: coresdk.workflow_activation.IWorkflowActivationJob): coresdk.workflow_activation.WorkflowActivationJob; - - /** - * Encodes the specified WorkflowActivationJob message. Does not implicitly {@link coresdk.workflow_activation.WorkflowActivationJob.verify|verify} messages. - * @param message WorkflowActivationJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IWorkflowActivationJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowActivationJob message, length delimited. Does not implicitly {@link coresdk.workflow_activation.WorkflowActivationJob.verify|verify} messages. - * @param message WorkflowActivationJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IWorkflowActivationJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowActivationJob message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowActivationJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.WorkflowActivationJob; - - /** - * Decodes a WorkflowActivationJob message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowActivationJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.WorkflowActivationJob; - - /** - * Creates a WorkflowActivationJob message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowActivationJob - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.WorkflowActivationJob; - - /** - * Creates a plain object from a WorkflowActivationJob message. Also converts values to other types if specified. - * @param message WorkflowActivationJob - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.WorkflowActivationJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowActivationJob to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowActivationJob - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InitializeWorkflow. */ - interface IInitializeWorkflow { - - /** The identifier the lang-specific sdk uses to execute workflow code */ - workflowType?: (string|null); - - /** The workflow id used on the temporal server */ - workflowId?: (string|null); - - /** Inputs to the workflow code */ - "arguments"?: (temporal.api.common.v1.IPayload[]|null); - - /** - * The seed must be used to initialize the random generator used by SDK. - * RandomSeedUpdatedAttributes are used to deliver seed updates. - */ - randomnessSeed?: (Long|null); - - /** Used to add metadata e.g. for tracing and auth, meant to be read and written to by interceptors. */ - headers?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - - /** Identity of the client who requested this execution */ - identity?: (string|null); - - /** If this workflow is a child, information about the parent */ - parentWorkflowInfo?: (coresdk.common.INamespacedWorkflowExecution|null); - - /** Total workflow execution timeout including retries and continue as new. */ - workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run. */ - workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** - * Run id of the previous workflow which continued-as-new or retired or cron executed into this - * workflow, if any. - */ - continuedFromExecutionRunId?: (string|null); - - /** If this workflow was a continuation, indicates the type of continuation. */ - continuedInitiator?: (temporal.api.enums.v1.ContinueAsNewInitiator|null); - - /** If this workflow was a continuation and that continuation failed, the details of that. */ - continuedFailure?: (temporal.api.failure.v1.IFailure|null); - - /** If this workflow was a continuation and that continuation completed, the details of that. */ - lastCompletionResult?: (temporal.api.common.v1.IPayloads|null); - - /** This is the very first run id the workflow ever had, following continuation chains. */ - firstExecutionRunId?: (string|null); - - /** This workflow's retry policy */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Starting at 1, the number of times we have tried to execute this workflow */ - attempt?: (number|null); - - /** If this workflow runs on a cron schedule, it will appear here */ - cronSchedule?: (string|null); - - /** - * The absolute time at which the workflow will be timed out. - * This is passed without change to the next run/retry of a workflow. - */ - workflowExecutionExpirationTime?: (google.protobuf.ITimestamp|null); - - /** - * For a cron workflow, this contains the amount of time between when this iteration of - * the cron workflow was scheduled and when it should run next per its cron_schedule. - */ - cronScheduleToScheduleInterval?: (google.protobuf.IDuration|null); - - /** User-defined memo */ - memo?: (temporal.api.common.v1.IMemo|null); - - /** Search attributes created/updated when this workflow was started */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** When the workflow execution started event was first written */ - startTime?: (google.protobuf.ITimestamp|null); - - /** - * Contains information about the root workflow execution. It is possible for the namespace to - * be different than this workflow if using OSS and cross-namespace children, but this - * information is not retained. Users should take care to track it by other means in such - * situations. - * - * The root workflow execution is defined as follows: - * 1. A workflow without parent workflow is its own root workflow. - * 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. - * - * See field in WorkflowExecutionStarted for more detail. - */ - rootWorkflow?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** Priority of this workflow execution */ - priority?: (temporal.api.common.v1.IPriority|null); - } - - /** Initialize a new workflow */ - class InitializeWorkflow implements IInitializeWorkflow { - - /** - * Constructs a new InitializeWorkflow. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IInitializeWorkflow); - - /** The identifier the lang-specific sdk uses to execute workflow code */ - public workflowType: string; - - /** The workflow id used on the temporal server */ - public workflowId: string; - - /** Inputs to the workflow code */ - public arguments: temporal.api.common.v1.IPayload[]; - - /** - * The seed must be used to initialize the random generator used by SDK. - * RandomSeedUpdatedAttributes are used to deliver seed updates. - */ - public randomnessSeed: Long; - - /** Used to add metadata e.g. for tracing and auth, meant to be read and written to by interceptors. */ - public headers: { [k: string]: temporal.api.common.v1.IPayload }; - - /** Identity of the client who requested this execution */ - public identity: string; - - /** If this workflow is a child, information about the parent */ - public parentWorkflowInfo?: (coresdk.common.INamespacedWorkflowExecution|null); - - /** Total workflow execution timeout including retries and continue as new. */ - public workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run. */ - public workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - public workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** - * Run id of the previous workflow which continued-as-new or retired or cron executed into this - * workflow, if any. - */ - public continuedFromExecutionRunId: string; - - /** If this workflow was a continuation, indicates the type of continuation. */ - public continuedInitiator: temporal.api.enums.v1.ContinueAsNewInitiator; - - /** If this workflow was a continuation and that continuation failed, the details of that. */ - public continuedFailure?: (temporal.api.failure.v1.IFailure|null); - - /** If this workflow was a continuation and that continuation completed, the details of that. */ - public lastCompletionResult?: (temporal.api.common.v1.IPayloads|null); - - /** This is the very first run id the workflow ever had, following continuation chains. */ - public firstExecutionRunId: string; - - /** This workflow's retry policy */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Starting at 1, the number of times we have tried to execute this workflow */ - public attempt: number; - - /** If this workflow runs on a cron schedule, it will appear here */ - public cronSchedule: string; - - /** - * The absolute time at which the workflow will be timed out. - * This is passed without change to the next run/retry of a workflow. - */ - public workflowExecutionExpirationTime?: (google.protobuf.ITimestamp|null); - - /** - * For a cron workflow, this contains the amount of time between when this iteration of - * the cron workflow was scheduled and when it should run next per its cron_schedule. - */ - public cronScheduleToScheduleInterval?: (google.protobuf.IDuration|null); - - /** User-defined memo */ - public memo?: (temporal.api.common.v1.IMemo|null); - - /** Search attributes created/updated when this workflow was started */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** When the workflow execution started event was first written */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** - * Contains information about the root workflow execution. It is possible for the namespace to - * be different than this workflow if using OSS and cross-namespace children, but this - * information is not retained. Users should take care to track it by other means in such - * situations. - * - * The root workflow execution is defined as follows: - * 1. A workflow without parent workflow is its own root workflow. - * 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. - * - * See field in WorkflowExecutionStarted for more detail. - */ - public rootWorkflow?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** Priority of this workflow execution */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Creates a new InitializeWorkflow instance using the specified properties. - * @param [properties] Properties to set - * @returns InitializeWorkflow instance - */ - public static create(properties?: coresdk.workflow_activation.IInitializeWorkflow): coresdk.workflow_activation.InitializeWorkflow; - - /** - * Encodes the specified InitializeWorkflow message. Does not implicitly {@link coresdk.workflow_activation.InitializeWorkflow.verify|verify} messages. - * @param message InitializeWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IInitializeWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitializeWorkflow message, length delimited. Does not implicitly {@link coresdk.workflow_activation.InitializeWorkflow.verify|verify} messages. - * @param message InitializeWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IInitializeWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitializeWorkflow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitializeWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.InitializeWorkflow; - - /** - * Decodes an InitializeWorkflow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitializeWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.InitializeWorkflow; - - /** - * Creates an InitializeWorkflow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitializeWorkflow - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.InitializeWorkflow; - - /** - * Creates a plain object from an InitializeWorkflow message. Also converts values to other types if specified. - * @param message InitializeWorkflow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.InitializeWorkflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitializeWorkflow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InitializeWorkflow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FireTimer. */ - interface IFireTimer { - - /** Sequence number as provided by lang in the corresponding StartTimer command */ - seq?: (number|null); - } - - /** Notify a workflow that a timer has fired */ - class FireTimer implements IFireTimer { - - /** - * Constructs a new FireTimer. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IFireTimer); - - /** Sequence number as provided by lang in the corresponding StartTimer command */ - public seq: number; - - /** - * Creates a new FireTimer instance using the specified properties. - * @param [properties] Properties to set - * @returns FireTimer instance - */ - public static create(properties?: coresdk.workflow_activation.IFireTimer): coresdk.workflow_activation.FireTimer; - - /** - * Encodes the specified FireTimer message. Does not implicitly {@link coresdk.workflow_activation.FireTimer.verify|verify} messages. - * @param message FireTimer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IFireTimer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FireTimer message, length delimited. Does not implicitly {@link coresdk.workflow_activation.FireTimer.verify|verify} messages. - * @param message FireTimer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IFireTimer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FireTimer message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FireTimer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.FireTimer; - - /** - * Decodes a FireTimer message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FireTimer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.FireTimer; - - /** - * Creates a FireTimer message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FireTimer - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.FireTimer; - - /** - * Creates a plain object from a FireTimer message. Also converts values to other types if specified. - * @param message FireTimer - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.FireTimer, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FireTimer to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FireTimer - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResolveActivity. */ - interface IResolveActivity { - - /** Sequence number as provided by lang in the corresponding ScheduleActivity command */ - seq?: (number|null); - - /** ResolveActivity result */ - result?: (coresdk.activity_result.IActivityResolution|null); - - /** - * Set to true if the resolution is for a local activity. This is used internally by Core and - * lang does not need to care about it. - */ - isLocal?: (boolean|null); - } - - /** Notify a workflow that an activity has been resolved */ - class ResolveActivity implements IResolveActivity { - - /** - * Constructs a new ResolveActivity. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IResolveActivity); - - /** Sequence number as provided by lang in the corresponding ScheduleActivity command */ - public seq: number; - - /** ResolveActivity result. */ - public result?: (coresdk.activity_result.IActivityResolution|null); - - /** - * Set to true if the resolution is for a local activity. This is used internally by Core and - * lang does not need to care about it. - */ - public isLocal: boolean; - - /** - * Creates a new ResolveActivity instance using the specified properties. - * @param [properties] Properties to set - * @returns ResolveActivity instance - */ - public static create(properties?: coresdk.workflow_activation.IResolveActivity): coresdk.workflow_activation.ResolveActivity; - - /** - * Encodes the specified ResolveActivity message. Does not implicitly {@link coresdk.workflow_activation.ResolveActivity.verify|verify} messages. - * @param message ResolveActivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IResolveActivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResolveActivity message, length delimited. Does not implicitly {@link coresdk.workflow_activation.ResolveActivity.verify|verify} messages. - * @param message ResolveActivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IResolveActivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResolveActivity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResolveActivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.ResolveActivity; - - /** - * Decodes a ResolveActivity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResolveActivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.ResolveActivity; - - /** - * Creates a ResolveActivity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResolveActivity - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.ResolveActivity; - - /** - * Creates a plain object from a ResolveActivity message. Also converts values to other types if specified. - * @param message ResolveActivity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.ResolveActivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResolveActivity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResolveActivity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResolveChildWorkflowExecutionStart. */ - interface IResolveChildWorkflowExecutionStart { - - /** Sequence number as provided by lang in the corresponding StartChildWorkflowExecution command */ - seq?: (number|null); - - /** ResolveChildWorkflowExecutionStart succeeded */ - succeeded?: (coresdk.workflow_activation.IResolveChildWorkflowExecutionStartSuccess|null); - - /** ResolveChildWorkflowExecutionStart failed */ - failed?: (coresdk.workflow_activation.IResolveChildWorkflowExecutionStartFailure|null); - - /** ResolveChildWorkflowExecutionStart cancelled */ - cancelled?: (coresdk.workflow_activation.IResolveChildWorkflowExecutionStartCancelled|null); - } - - /** - * Notify a workflow that a start child workflow execution request has succeeded, failed or was - * cancelled. - */ - class ResolveChildWorkflowExecutionStart implements IResolveChildWorkflowExecutionStart { - - /** - * Constructs a new ResolveChildWorkflowExecutionStart. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IResolveChildWorkflowExecutionStart); - - /** Sequence number as provided by lang in the corresponding StartChildWorkflowExecution command */ - public seq: number; - - /** ResolveChildWorkflowExecutionStart succeeded. */ - public succeeded?: (coresdk.workflow_activation.IResolveChildWorkflowExecutionStartSuccess|null); - - /** ResolveChildWorkflowExecutionStart failed. */ - public failed?: (coresdk.workflow_activation.IResolveChildWorkflowExecutionStartFailure|null); - - /** ResolveChildWorkflowExecutionStart cancelled. */ - public cancelled?: (coresdk.workflow_activation.IResolveChildWorkflowExecutionStartCancelled|null); - - /** ResolveChildWorkflowExecutionStart status. */ - public status?: ("succeeded"|"failed"|"cancelled"); - - /** - * Creates a new ResolveChildWorkflowExecutionStart instance using the specified properties. - * @param [properties] Properties to set - * @returns ResolveChildWorkflowExecutionStart instance - */ - public static create(properties?: coresdk.workflow_activation.IResolveChildWorkflowExecutionStart): coresdk.workflow_activation.ResolveChildWorkflowExecutionStart; - - /** - * Encodes the specified ResolveChildWorkflowExecutionStart message. Does not implicitly {@link coresdk.workflow_activation.ResolveChildWorkflowExecutionStart.verify|verify} messages. - * @param message ResolveChildWorkflowExecutionStart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IResolveChildWorkflowExecutionStart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResolveChildWorkflowExecutionStart message, length delimited. Does not implicitly {@link coresdk.workflow_activation.ResolveChildWorkflowExecutionStart.verify|verify} messages. - * @param message ResolveChildWorkflowExecutionStart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IResolveChildWorkflowExecutionStart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResolveChildWorkflowExecutionStart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResolveChildWorkflowExecutionStart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.ResolveChildWorkflowExecutionStart; - - /** - * Decodes a ResolveChildWorkflowExecutionStart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResolveChildWorkflowExecutionStart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.ResolveChildWorkflowExecutionStart; - - /** - * Creates a ResolveChildWorkflowExecutionStart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResolveChildWorkflowExecutionStart - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.ResolveChildWorkflowExecutionStart; - - /** - * Creates a plain object from a ResolveChildWorkflowExecutionStart message. Also converts values to other types if specified. - * @param message ResolveChildWorkflowExecutionStart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.ResolveChildWorkflowExecutionStart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResolveChildWorkflowExecutionStart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResolveChildWorkflowExecutionStart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResolveChildWorkflowExecutionStartSuccess. */ - interface IResolveChildWorkflowExecutionStartSuccess { - - /** ResolveChildWorkflowExecutionStartSuccess runId */ - runId?: (string|null); - } - - /** Simply pass the run_id to lang */ - class ResolveChildWorkflowExecutionStartSuccess implements IResolveChildWorkflowExecutionStartSuccess { - - /** - * Constructs a new ResolveChildWorkflowExecutionStartSuccess. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IResolveChildWorkflowExecutionStartSuccess); - - /** ResolveChildWorkflowExecutionStartSuccess runId. */ - public runId: string; - - /** - * Creates a new ResolveChildWorkflowExecutionStartSuccess instance using the specified properties. - * @param [properties] Properties to set - * @returns ResolveChildWorkflowExecutionStartSuccess instance - */ - public static create(properties?: coresdk.workflow_activation.IResolveChildWorkflowExecutionStartSuccess): coresdk.workflow_activation.ResolveChildWorkflowExecutionStartSuccess; - - /** - * Encodes the specified ResolveChildWorkflowExecutionStartSuccess message. Does not implicitly {@link coresdk.workflow_activation.ResolveChildWorkflowExecutionStartSuccess.verify|verify} messages. - * @param message ResolveChildWorkflowExecutionStartSuccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IResolveChildWorkflowExecutionStartSuccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResolveChildWorkflowExecutionStartSuccess message, length delimited. Does not implicitly {@link coresdk.workflow_activation.ResolveChildWorkflowExecutionStartSuccess.verify|verify} messages. - * @param message ResolveChildWorkflowExecutionStartSuccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IResolveChildWorkflowExecutionStartSuccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResolveChildWorkflowExecutionStartSuccess message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResolveChildWorkflowExecutionStartSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.ResolveChildWorkflowExecutionStartSuccess; - - /** - * Decodes a ResolveChildWorkflowExecutionStartSuccess message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResolveChildWorkflowExecutionStartSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.ResolveChildWorkflowExecutionStartSuccess; - - /** - * Creates a ResolveChildWorkflowExecutionStartSuccess message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResolveChildWorkflowExecutionStartSuccess - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.ResolveChildWorkflowExecutionStartSuccess; - - /** - * Creates a plain object from a ResolveChildWorkflowExecutionStartSuccess message. Also converts values to other types if specified. - * @param message ResolveChildWorkflowExecutionStartSuccess - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.ResolveChildWorkflowExecutionStartSuccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResolveChildWorkflowExecutionStartSuccess to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResolveChildWorkflowExecutionStartSuccess - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResolveChildWorkflowExecutionStartFailure. */ - interface IResolveChildWorkflowExecutionStartFailure { - - /** - * Lang should have this information but it's more convenient to pass it back - * for error construction on the lang side. - */ - workflowId?: (string|null); - - /** ResolveChildWorkflowExecutionStartFailure workflowType */ - workflowType?: (string|null); - - /** ResolveChildWorkflowExecutionStartFailure cause */ - cause?: (coresdk.child_workflow.StartChildWorkflowExecutionFailedCause|null); - } - - /** Provide lang the cause of failure */ - class ResolveChildWorkflowExecutionStartFailure implements IResolveChildWorkflowExecutionStartFailure { - - /** - * Constructs a new ResolveChildWorkflowExecutionStartFailure. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IResolveChildWorkflowExecutionStartFailure); - - /** - * Lang should have this information but it's more convenient to pass it back - * for error construction on the lang side. - */ - public workflowId: string; - - /** ResolveChildWorkflowExecutionStartFailure workflowType. */ - public workflowType: string; - - /** ResolveChildWorkflowExecutionStartFailure cause. */ - public cause: coresdk.child_workflow.StartChildWorkflowExecutionFailedCause; - - /** - * Creates a new ResolveChildWorkflowExecutionStartFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns ResolveChildWorkflowExecutionStartFailure instance - */ - public static create(properties?: coresdk.workflow_activation.IResolveChildWorkflowExecutionStartFailure): coresdk.workflow_activation.ResolveChildWorkflowExecutionStartFailure; - - /** - * Encodes the specified ResolveChildWorkflowExecutionStartFailure message. Does not implicitly {@link coresdk.workflow_activation.ResolveChildWorkflowExecutionStartFailure.verify|verify} messages. - * @param message ResolveChildWorkflowExecutionStartFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IResolveChildWorkflowExecutionStartFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResolveChildWorkflowExecutionStartFailure message, length delimited. Does not implicitly {@link coresdk.workflow_activation.ResolveChildWorkflowExecutionStartFailure.verify|verify} messages. - * @param message ResolveChildWorkflowExecutionStartFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IResolveChildWorkflowExecutionStartFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResolveChildWorkflowExecutionStartFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResolveChildWorkflowExecutionStartFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.ResolveChildWorkflowExecutionStartFailure; - - /** - * Decodes a ResolveChildWorkflowExecutionStartFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResolveChildWorkflowExecutionStartFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.ResolveChildWorkflowExecutionStartFailure; - - /** - * Creates a ResolveChildWorkflowExecutionStartFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResolveChildWorkflowExecutionStartFailure - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.ResolveChildWorkflowExecutionStartFailure; - - /** - * Creates a plain object from a ResolveChildWorkflowExecutionStartFailure message. Also converts values to other types if specified. - * @param message ResolveChildWorkflowExecutionStartFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.ResolveChildWorkflowExecutionStartFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResolveChildWorkflowExecutionStartFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResolveChildWorkflowExecutionStartFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResolveChildWorkflowExecutionStartCancelled. */ - interface IResolveChildWorkflowExecutionStartCancelled { - - /** ResolveChildWorkflowExecutionStartCancelled failure */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** - * `failure` should be ChildWorkflowFailure with cause set to CancelledFailure. - * The failure is constructed in core for lang's convenience. - */ - class ResolveChildWorkflowExecutionStartCancelled implements IResolveChildWorkflowExecutionStartCancelled { - - /** - * Constructs a new ResolveChildWorkflowExecutionStartCancelled. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IResolveChildWorkflowExecutionStartCancelled); - - /** ResolveChildWorkflowExecutionStartCancelled failure. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new ResolveChildWorkflowExecutionStartCancelled instance using the specified properties. - * @param [properties] Properties to set - * @returns ResolveChildWorkflowExecutionStartCancelled instance - */ - public static create(properties?: coresdk.workflow_activation.IResolveChildWorkflowExecutionStartCancelled): coresdk.workflow_activation.ResolveChildWorkflowExecutionStartCancelled; - - /** - * Encodes the specified ResolveChildWorkflowExecutionStartCancelled message. Does not implicitly {@link coresdk.workflow_activation.ResolveChildWorkflowExecutionStartCancelled.verify|verify} messages. - * @param message ResolveChildWorkflowExecutionStartCancelled message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IResolveChildWorkflowExecutionStartCancelled, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResolveChildWorkflowExecutionStartCancelled message, length delimited. Does not implicitly {@link coresdk.workflow_activation.ResolveChildWorkflowExecutionStartCancelled.verify|verify} messages. - * @param message ResolveChildWorkflowExecutionStartCancelled message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IResolveChildWorkflowExecutionStartCancelled, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResolveChildWorkflowExecutionStartCancelled message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResolveChildWorkflowExecutionStartCancelled - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.ResolveChildWorkflowExecutionStartCancelled; - - /** - * Decodes a ResolveChildWorkflowExecutionStartCancelled message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResolveChildWorkflowExecutionStartCancelled - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.ResolveChildWorkflowExecutionStartCancelled; - - /** - * Creates a ResolveChildWorkflowExecutionStartCancelled message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResolveChildWorkflowExecutionStartCancelled - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.ResolveChildWorkflowExecutionStartCancelled; - - /** - * Creates a plain object from a ResolveChildWorkflowExecutionStartCancelled message. Also converts values to other types if specified. - * @param message ResolveChildWorkflowExecutionStartCancelled - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.ResolveChildWorkflowExecutionStartCancelled, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResolveChildWorkflowExecutionStartCancelled to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResolveChildWorkflowExecutionStartCancelled - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResolveChildWorkflowExecution. */ - interface IResolveChildWorkflowExecution { - - /** Sequence number as provided by lang in the corresponding StartChildWorkflowExecution command */ - seq?: (number|null); - - /** ResolveChildWorkflowExecution result */ - result?: (coresdk.child_workflow.IChildWorkflowResult|null); - } - - /** Notify a workflow that a child workflow execution has been resolved */ - class ResolveChildWorkflowExecution implements IResolveChildWorkflowExecution { - - /** - * Constructs a new ResolveChildWorkflowExecution. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IResolveChildWorkflowExecution); - - /** Sequence number as provided by lang in the corresponding StartChildWorkflowExecution command */ - public seq: number; - - /** ResolveChildWorkflowExecution result. */ - public result?: (coresdk.child_workflow.IChildWorkflowResult|null); - - /** - * Creates a new ResolveChildWorkflowExecution instance using the specified properties. - * @param [properties] Properties to set - * @returns ResolveChildWorkflowExecution instance - */ - public static create(properties?: coresdk.workflow_activation.IResolveChildWorkflowExecution): coresdk.workflow_activation.ResolveChildWorkflowExecution; - - /** - * Encodes the specified ResolveChildWorkflowExecution message. Does not implicitly {@link coresdk.workflow_activation.ResolveChildWorkflowExecution.verify|verify} messages. - * @param message ResolveChildWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IResolveChildWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResolveChildWorkflowExecution message, length delimited. Does not implicitly {@link coresdk.workflow_activation.ResolveChildWorkflowExecution.verify|verify} messages. - * @param message ResolveChildWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IResolveChildWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResolveChildWorkflowExecution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResolveChildWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.ResolveChildWorkflowExecution; - - /** - * Decodes a ResolveChildWorkflowExecution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResolveChildWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.ResolveChildWorkflowExecution; - - /** - * Creates a ResolveChildWorkflowExecution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResolveChildWorkflowExecution - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.ResolveChildWorkflowExecution; - - /** - * Creates a plain object from a ResolveChildWorkflowExecution message. Also converts values to other types if specified. - * @param message ResolveChildWorkflowExecution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.ResolveChildWorkflowExecution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResolveChildWorkflowExecution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResolveChildWorkflowExecution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateRandomSeed. */ - interface IUpdateRandomSeed { - - /** UpdateRandomSeed randomnessSeed */ - randomnessSeed?: (Long|null); - } - - /** Update the workflow's random seed */ - class UpdateRandomSeed implements IUpdateRandomSeed { - - /** - * Constructs a new UpdateRandomSeed. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IUpdateRandomSeed); - - /** UpdateRandomSeed randomnessSeed. */ - public randomnessSeed: Long; - - /** - * Creates a new UpdateRandomSeed instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateRandomSeed instance - */ - public static create(properties?: coresdk.workflow_activation.IUpdateRandomSeed): coresdk.workflow_activation.UpdateRandomSeed; - - /** - * Encodes the specified UpdateRandomSeed message. Does not implicitly {@link coresdk.workflow_activation.UpdateRandomSeed.verify|verify} messages. - * @param message UpdateRandomSeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IUpdateRandomSeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateRandomSeed message, length delimited. Does not implicitly {@link coresdk.workflow_activation.UpdateRandomSeed.verify|verify} messages. - * @param message UpdateRandomSeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IUpdateRandomSeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateRandomSeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateRandomSeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.UpdateRandomSeed; - - /** - * Decodes an UpdateRandomSeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateRandomSeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.UpdateRandomSeed; - - /** - * Creates an UpdateRandomSeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateRandomSeed - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.UpdateRandomSeed; - - /** - * Creates a plain object from an UpdateRandomSeed message. Also converts values to other types if specified. - * @param message UpdateRandomSeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.UpdateRandomSeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateRandomSeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateRandomSeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QueryWorkflow. */ - interface IQueryWorkflow { - - /** - * For PollWFTResp `query` field, this will be set to the special value `legacy`. For the - * `queries` field, the server provides a unique identifier. If it is a `legacy` query, - * lang cannot issue any commands in response other than to answer the query. - */ - queryId?: (string|null); - - /** The query's function/method/etc name */ - queryType?: (string|null); - - /** QueryWorkflow arguments */ - "arguments"?: (temporal.api.common.v1.IPayload[]|null); - - /** Headers attached to the query */ - headers?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - } - - /** Query a workflow */ - class QueryWorkflow implements IQueryWorkflow { - - /** - * Constructs a new QueryWorkflow. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IQueryWorkflow); - - /** - * For PollWFTResp `query` field, this will be set to the special value `legacy`. For the - * `queries` field, the server provides a unique identifier. If it is a `legacy` query, - * lang cannot issue any commands in response other than to answer the query. - */ - public queryId: string; - - /** The query's function/method/etc name */ - public queryType: string; - - /** QueryWorkflow arguments. */ - public arguments: temporal.api.common.v1.IPayload[]; - - /** Headers attached to the query */ - public headers: { [k: string]: temporal.api.common.v1.IPayload }; - - /** - * Creates a new QueryWorkflow instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryWorkflow instance - */ - public static create(properties?: coresdk.workflow_activation.IQueryWorkflow): coresdk.workflow_activation.QueryWorkflow; - - /** - * Encodes the specified QueryWorkflow message. Does not implicitly {@link coresdk.workflow_activation.QueryWorkflow.verify|verify} messages. - * @param message QueryWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IQueryWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryWorkflow message, length delimited. Does not implicitly {@link coresdk.workflow_activation.QueryWorkflow.verify|verify} messages. - * @param message QueryWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IQueryWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryWorkflow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.QueryWorkflow; - - /** - * Decodes a QueryWorkflow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.QueryWorkflow; - - /** - * Creates a QueryWorkflow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryWorkflow - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.QueryWorkflow; - - /** - * Creates a plain object from a QueryWorkflow message. Also converts values to other types if specified. - * @param message QueryWorkflow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.QueryWorkflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryWorkflow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryWorkflow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelWorkflow. */ - interface ICancelWorkflow { - - /** User-specified reason the cancel request was issued */ - reason?: (string|null); - } - - /** Cancel a running workflow */ - class CancelWorkflow implements ICancelWorkflow { - - /** - * Constructs a new CancelWorkflow. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.ICancelWorkflow); - - /** User-specified reason the cancel request was issued */ - public reason: string; - - /** - * Creates a new CancelWorkflow instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelWorkflow instance - */ - public static create(properties?: coresdk.workflow_activation.ICancelWorkflow): coresdk.workflow_activation.CancelWorkflow; - - /** - * Encodes the specified CancelWorkflow message. Does not implicitly {@link coresdk.workflow_activation.CancelWorkflow.verify|verify} messages. - * @param message CancelWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.ICancelWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelWorkflow message, length delimited. Does not implicitly {@link coresdk.workflow_activation.CancelWorkflow.verify|verify} messages. - * @param message CancelWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.ICancelWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelWorkflow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.CancelWorkflow; - - /** - * Decodes a CancelWorkflow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.CancelWorkflow; - - /** - * Creates a CancelWorkflow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelWorkflow - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.CancelWorkflow; - - /** - * Creates a plain object from a CancelWorkflow message. Also converts values to other types if specified. - * @param message CancelWorkflow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.CancelWorkflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelWorkflow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelWorkflow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SignalWorkflow. */ - interface ISignalWorkflow { - - /** SignalWorkflow signalName */ - signalName?: (string|null); - - /** SignalWorkflow input */ - input?: (temporal.api.common.v1.IPayload[]|null); - - /** Identity of the sender of the signal */ - identity?: (string|null); - - /** Headers attached to the signal */ - headers?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - } - - /** Send a signal to a workflow */ - class SignalWorkflow implements ISignalWorkflow { - - /** - * Constructs a new SignalWorkflow. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.ISignalWorkflow); - - /** SignalWorkflow signalName. */ - public signalName: string; - - /** SignalWorkflow input. */ - public input: temporal.api.common.v1.IPayload[]; - - /** Identity of the sender of the signal */ - public identity: string; - - /** Headers attached to the signal */ - public headers: { [k: string]: temporal.api.common.v1.IPayload }; - - /** - * Creates a new SignalWorkflow instance using the specified properties. - * @param [properties] Properties to set - * @returns SignalWorkflow instance - */ - public static create(properties?: coresdk.workflow_activation.ISignalWorkflow): coresdk.workflow_activation.SignalWorkflow; - - /** - * Encodes the specified SignalWorkflow message. Does not implicitly {@link coresdk.workflow_activation.SignalWorkflow.verify|verify} messages. - * @param message SignalWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.ISignalWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignalWorkflow message, length delimited. Does not implicitly {@link coresdk.workflow_activation.SignalWorkflow.verify|verify} messages. - * @param message SignalWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.ISignalWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignalWorkflow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignalWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.SignalWorkflow; - - /** - * Decodes a SignalWorkflow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignalWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.SignalWorkflow; - - /** - * Creates a SignalWorkflow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignalWorkflow - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.SignalWorkflow; - - /** - * Creates a plain object from a SignalWorkflow message. Also converts values to other types if specified. - * @param message SignalWorkflow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.SignalWorkflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignalWorkflow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SignalWorkflow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NotifyHasPatch. */ - interface INotifyHasPatch { - - /** NotifyHasPatch patchId */ - patchId?: (string|null); - } - - /** - * Inform lang what the result of a call to `patched` or similar API should be -- this is always - * sent pre-emptively, so any time it is sent the change is present - */ - class NotifyHasPatch implements INotifyHasPatch { - - /** - * Constructs a new NotifyHasPatch. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.INotifyHasPatch); - - /** NotifyHasPatch patchId. */ - public patchId: string; - - /** - * Creates a new NotifyHasPatch instance using the specified properties. - * @param [properties] Properties to set - * @returns NotifyHasPatch instance - */ - public static create(properties?: coresdk.workflow_activation.INotifyHasPatch): coresdk.workflow_activation.NotifyHasPatch; - - /** - * Encodes the specified NotifyHasPatch message. Does not implicitly {@link coresdk.workflow_activation.NotifyHasPatch.verify|verify} messages. - * @param message NotifyHasPatch message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.INotifyHasPatch, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NotifyHasPatch message, length delimited. Does not implicitly {@link coresdk.workflow_activation.NotifyHasPatch.verify|verify} messages. - * @param message NotifyHasPatch message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.INotifyHasPatch, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NotifyHasPatch message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NotifyHasPatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.NotifyHasPatch; - - /** - * Decodes a NotifyHasPatch message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NotifyHasPatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.NotifyHasPatch; - - /** - * Creates a NotifyHasPatch message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NotifyHasPatch - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.NotifyHasPatch; - - /** - * Creates a plain object from a NotifyHasPatch message. Also converts values to other types if specified. - * @param message NotifyHasPatch - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.NotifyHasPatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NotifyHasPatch to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NotifyHasPatch - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResolveSignalExternalWorkflow. */ - interface IResolveSignalExternalWorkflow { - - /** - * Sequence number as provided by lang in the corresponding SignalExternalWorkflowExecution - * command - */ - seq?: (number|null); - - /** - * If populated, this signal either failed to be sent or was cancelled depending on failure - * type / info. - */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** Represents a ResolveSignalExternalWorkflow. */ - class ResolveSignalExternalWorkflow implements IResolveSignalExternalWorkflow { - - /** - * Constructs a new ResolveSignalExternalWorkflow. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IResolveSignalExternalWorkflow); - - /** - * Sequence number as provided by lang in the corresponding SignalExternalWorkflowExecution - * command - */ - public seq: number; - - /** - * If populated, this signal either failed to be sent or was cancelled depending on failure - * type / info. - */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new ResolveSignalExternalWorkflow instance using the specified properties. - * @param [properties] Properties to set - * @returns ResolveSignalExternalWorkflow instance - */ - public static create(properties?: coresdk.workflow_activation.IResolveSignalExternalWorkflow): coresdk.workflow_activation.ResolveSignalExternalWorkflow; - - /** - * Encodes the specified ResolveSignalExternalWorkflow message. Does not implicitly {@link coresdk.workflow_activation.ResolveSignalExternalWorkflow.verify|verify} messages. - * @param message ResolveSignalExternalWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IResolveSignalExternalWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResolveSignalExternalWorkflow message, length delimited. Does not implicitly {@link coresdk.workflow_activation.ResolveSignalExternalWorkflow.verify|verify} messages. - * @param message ResolveSignalExternalWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IResolveSignalExternalWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResolveSignalExternalWorkflow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResolveSignalExternalWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.ResolveSignalExternalWorkflow; - - /** - * Decodes a ResolveSignalExternalWorkflow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResolveSignalExternalWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.ResolveSignalExternalWorkflow; - - /** - * Creates a ResolveSignalExternalWorkflow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResolveSignalExternalWorkflow - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.ResolveSignalExternalWorkflow; - - /** - * Creates a plain object from a ResolveSignalExternalWorkflow message. Also converts values to other types if specified. - * @param message ResolveSignalExternalWorkflow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.ResolveSignalExternalWorkflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResolveSignalExternalWorkflow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResolveSignalExternalWorkflow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResolveRequestCancelExternalWorkflow. */ - interface IResolveRequestCancelExternalWorkflow { - - /** - * Sequence number as provided by lang in the corresponding - * RequestCancelExternalWorkflowExecution command - */ - seq?: (number|null); - - /** - * If populated, this signal either failed to be sent or was cancelled depending on failure - * type / info. - */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** Represents a ResolveRequestCancelExternalWorkflow. */ - class ResolveRequestCancelExternalWorkflow implements IResolveRequestCancelExternalWorkflow { - - /** - * Constructs a new ResolveRequestCancelExternalWorkflow. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IResolveRequestCancelExternalWorkflow); - - /** - * Sequence number as provided by lang in the corresponding - * RequestCancelExternalWorkflowExecution command - */ - public seq: number; - - /** - * If populated, this signal either failed to be sent or was cancelled depending on failure - * type / info. - */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new ResolveRequestCancelExternalWorkflow instance using the specified properties. - * @param [properties] Properties to set - * @returns ResolveRequestCancelExternalWorkflow instance - */ - public static create(properties?: coresdk.workflow_activation.IResolveRequestCancelExternalWorkflow): coresdk.workflow_activation.ResolveRequestCancelExternalWorkflow; - - /** - * Encodes the specified ResolveRequestCancelExternalWorkflow message. Does not implicitly {@link coresdk.workflow_activation.ResolveRequestCancelExternalWorkflow.verify|verify} messages. - * @param message ResolveRequestCancelExternalWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IResolveRequestCancelExternalWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResolveRequestCancelExternalWorkflow message, length delimited. Does not implicitly {@link coresdk.workflow_activation.ResolveRequestCancelExternalWorkflow.verify|verify} messages. - * @param message ResolveRequestCancelExternalWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IResolveRequestCancelExternalWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResolveRequestCancelExternalWorkflow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResolveRequestCancelExternalWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.ResolveRequestCancelExternalWorkflow; - - /** - * Decodes a ResolveRequestCancelExternalWorkflow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResolveRequestCancelExternalWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.ResolveRequestCancelExternalWorkflow; - - /** - * Creates a ResolveRequestCancelExternalWorkflow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResolveRequestCancelExternalWorkflow - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.ResolveRequestCancelExternalWorkflow; - - /** - * Creates a plain object from a ResolveRequestCancelExternalWorkflow message. Also converts values to other types if specified. - * @param message ResolveRequestCancelExternalWorkflow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.ResolveRequestCancelExternalWorkflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResolveRequestCancelExternalWorkflow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResolveRequestCancelExternalWorkflow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DoUpdate. */ - interface IDoUpdate { - - /** A workflow-unique identifier for this update */ - id?: (string|null); - - /** - * The protocol message instance ID - this is used to uniquely track the ID server side and - * internally. - */ - protocolInstanceId?: (string|null); - - /** The name of the update handler */ - name?: (string|null); - - /** The input to the update */ - input?: (temporal.api.common.v1.IPayload[]|null); - - /** Headers attached to the update */ - headers?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - - /** - * Remaining metadata associated with the update. The `update_id` field is stripped from here - * and moved to `id`, since it is guaranteed to be present. - */ - meta?: (temporal.api.update.v1.IMeta|null); - - /** - * If set true, lang must run the update's validator before running the handler. This will be - * set false during replay, since validation is not re-run during replay. - */ - runValidator?: (boolean|null); - } - - /** - * Lang is requested to invoke an update handler on the workflow. Lang should invoke the update - * validator first (if requested). If it accepts the update, immediately invoke the update handler. - * Lang must reply to the activation containing this job with an `UpdateResponse`. - */ - class DoUpdate implements IDoUpdate { - - /** - * Constructs a new DoUpdate. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IDoUpdate); - - /** A workflow-unique identifier for this update */ - public id: string; - - /** - * The protocol message instance ID - this is used to uniquely track the ID server side and - * internally. - */ - public protocolInstanceId: string; - - /** The name of the update handler */ - public name: string; - - /** The input to the update */ - public input: temporal.api.common.v1.IPayload[]; - - /** Headers attached to the update */ - public headers: { [k: string]: temporal.api.common.v1.IPayload }; - - /** - * Remaining metadata associated with the update. The `update_id` field is stripped from here - * and moved to `id`, since it is guaranteed to be present. - */ - public meta?: (temporal.api.update.v1.IMeta|null); - - /** - * If set true, lang must run the update's validator before running the handler. This will be - * set false during replay, since validation is not re-run during replay. - */ - public runValidator: boolean; - - /** - * Creates a new DoUpdate instance using the specified properties. - * @param [properties] Properties to set - * @returns DoUpdate instance - */ - public static create(properties?: coresdk.workflow_activation.IDoUpdate): coresdk.workflow_activation.DoUpdate; - - /** - * Encodes the specified DoUpdate message. Does not implicitly {@link coresdk.workflow_activation.DoUpdate.verify|verify} messages. - * @param message DoUpdate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IDoUpdate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DoUpdate message, length delimited. Does not implicitly {@link coresdk.workflow_activation.DoUpdate.verify|verify} messages. - * @param message DoUpdate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IDoUpdate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DoUpdate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DoUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.DoUpdate; - - /** - * Decodes a DoUpdate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DoUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.DoUpdate; - - /** - * Creates a DoUpdate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DoUpdate - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.DoUpdate; - - /** - * Creates a plain object from a DoUpdate message. Also converts values to other types if specified. - * @param message DoUpdate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.DoUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DoUpdate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DoUpdate - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResolveNexusOperationStart. */ - interface IResolveNexusOperationStart { - - /** Sequence number as provided by lang in the corresponding ScheduleNexusOperation command */ - seq?: (number|null); - - /** - * The operation started asynchronously. Contains a token that can be used to perform - * operations on the started operation by, ex, clients. A `ResolveNexusOperation` job will - * follow at some point. - */ - operationToken?: (string|null); - - /** - * If true the operation "started" but only because it's also already resolved. A - * `ResolveNexusOperation` job will be in the same activation. - */ - startedSync?: (boolean|null); - - /** - * The operation either failed to start, was cancelled before it started, timed out, or - * failed synchronously. Details are included inside the message. In this case, the - * subsequent ResolveNexusOperation will never be sent. - */ - failed?: (temporal.api.failure.v1.IFailure|null); - } - - /** Represents a ResolveNexusOperationStart. */ - class ResolveNexusOperationStart implements IResolveNexusOperationStart { - - /** - * Constructs a new ResolveNexusOperationStart. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IResolveNexusOperationStart); - - /** Sequence number as provided by lang in the corresponding ScheduleNexusOperation command */ - public seq: number; - - /** - * The operation started asynchronously. Contains a token that can be used to perform - * operations on the started operation by, ex, clients. A `ResolveNexusOperation` job will - * follow at some point. - */ - public operationToken?: (string|null); - - /** - * If true the operation "started" but only because it's also already resolved. A - * `ResolveNexusOperation` job will be in the same activation. - */ - public startedSync?: (boolean|null); - - /** - * The operation either failed to start, was cancelled before it started, timed out, or - * failed synchronously. Details are included inside the message. In this case, the - * subsequent ResolveNexusOperation will never be sent. - */ - public failed?: (temporal.api.failure.v1.IFailure|null); - - /** ResolveNexusOperationStart status. */ - public status?: ("operationToken"|"startedSync"|"failed"); - - /** - * Creates a new ResolveNexusOperationStart instance using the specified properties. - * @param [properties] Properties to set - * @returns ResolveNexusOperationStart instance - */ - public static create(properties?: coresdk.workflow_activation.IResolveNexusOperationStart): coresdk.workflow_activation.ResolveNexusOperationStart; - - /** - * Encodes the specified ResolveNexusOperationStart message. Does not implicitly {@link coresdk.workflow_activation.ResolveNexusOperationStart.verify|verify} messages. - * @param message ResolveNexusOperationStart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IResolveNexusOperationStart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResolveNexusOperationStart message, length delimited. Does not implicitly {@link coresdk.workflow_activation.ResolveNexusOperationStart.verify|verify} messages. - * @param message ResolveNexusOperationStart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IResolveNexusOperationStart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResolveNexusOperationStart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResolveNexusOperationStart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.ResolveNexusOperationStart; - - /** - * Decodes a ResolveNexusOperationStart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResolveNexusOperationStart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.ResolveNexusOperationStart; - - /** - * Creates a ResolveNexusOperationStart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResolveNexusOperationStart - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.ResolveNexusOperationStart; - - /** - * Creates a plain object from a ResolveNexusOperationStart message. Also converts values to other types if specified. - * @param message ResolveNexusOperationStart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.ResolveNexusOperationStart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResolveNexusOperationStart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResolveNexusOperationStart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResolveNexusOperation. */ - interface IResolveNexusOperation { - - /** Sequence number as provided by lang in the corresponding ScheduleNexusOperation command */ - seq?: (number|null); - - /** ResolveNexusOperation result */ - result?: (coresdk.nexus.INexusOperationResult|null); - } - - /** Represents a ResolveNexusOperation. */ - class ResolveNexusOperation implements IResolveNexusOperation { - - /** - * Constructs a new ResolveNexusOperation. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IResolveNexusOperation); - - /** Sequence number as provided by lang in the corresponding ScheduleNexusOperation command */ - public seq: number; - - /** ResolveNexusOperation result. */ - public result?: (coresdk.nexus.INexusOperationResult|null); - - /** - * Creates a new ResolveNexusOperation instance using the specified properties. - * @param [properties] Properties to set - * @returns ResolveNexusOperation instance - */ - public static create(properties?: coresdk.workflow_activation.IResolveNexusOperation): coresdk.workflow_activation.ResolveNexusOperation; - - /** - * Encodes the specified ResolveNexusOperation message. Does not implicitly {@link coresdk.workflow_activation.ResolveNexusOperation.verify|verify} messages. - * @param message ResolveNexusOperation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IResolveNexusOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResolveNexusOperation message, length delimited. Does not implicitly {@link coresdk.workflow_activation.ResolveNexusOperation.verify|verify} messages. - * @param message ResolveNexusOperation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IResolveNexusOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResolveNexusOperation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResolveNexusOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.ResolveNexusOperation; - - /** - * Decodes a ResolveNexusOperation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResolveNexusOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.ResolveNexusOperation; - - /** - * Creates a ResolveNexusOperation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResolveNexusOperation - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.ResolveNexusOperation; - - /** - * Creates a plain object from a ResolveNexusOperation message. Also converts values to other types if specified. - * @param message ResolveNexusOperation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.ResolveNexusOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResolveNexusOperation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResolveNexusOperation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemoveFromCache. */ - interface IRemoveFromCache { - - /** RemoveFromCache message */ - message?: (string|null); - - /** RemoveFromCache reason */ - reason?: (coresdk.workflow_activation.RemoveFromCache.EvictionReason|null); - } - - /** Represents a RemoveFromCache. */ - class RemoveFromCache implements IRemoveFromCache { - - /** - * Constructs a new RemoveFromCache. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_activation.IRemoveFromCache); - - /** RemoveFromCache message. */ - public message: string; - - /** RemoveFromCache reason. */ - public reason: coresdk.workflow_activation.RemoveFromCache.EvictionReason; - - /** - * Creates a new RemoveFromCache instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoveFromCache instance - */ - public static create(properties?: coresdk.workflow_activation.IRemoveFromCache): coresdk.workflow_activation.RemoveFromCache; - - /** - * Encodes the specified RemoveFromCache message. Does not implicitly {@link coresdk.workflow_activation.RemoveFromCache.verify|verify} messages. - * @param message RemoveFromCache message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_activation.IRemoveFromCache, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoveFromCache message, length delimited. Does not implicitly {@link coresdk.workflow_activation.RemoveFromCache.verify|verify} messages. - * @param message RemoveFromCache message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_activation.IRemoveFromCache, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoveFromCache message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoveFromCache - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.RemoveFromCache; - - /** - * Decodes a RemoveFromCache message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoveFromCache - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.RemoveFromCache; - - /** - * Creates a RemoveFromCache message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoveFromCache - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.RemoveFromCache; - - /** - * Creates a plain object from a RemoveFromCache message. Also converts values to other types if specified. - * @param message RemoveFromCache - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_activation.RemoveFromCache, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoveFromCache to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemoveFromCache - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace RemoveFromCache { - - /** EvictionReason enum. */ - enum EvictionReason { - UNSPECIFIED = 0, - CACHE_FULL = 1, - CACHE_MISS = 2, - NONDETERMINISM = 3, - LANG_FAIL = 4, - LANG_REQUESTED = 5, - TASK_NOT_FOUND = 6, - UNHANDLED_COMMAND = 7, - FATAL = 8, - PAGINATION_OR_HISTORY_FETCH = 9, - WORKFLOW_EXECUTION_ENDING = 10 - } - } - } - - /** Namespace child_workflow. */ - namespace child_workflow { - - /** Properties of a ChildWorkflowResult. */ - interface IChildWorkflowResult { - - /** ChildWorkflowResult completed */ - completed?: (coresdk.child_workflow.ISuccess|null); - - /** ChildWorkflowResult failed */ - failed?: (coresdk.child_workflow.IFailure|null); - - /** ChildWorkflowResult cancelled */ - cancelled?: (coresdk.child_workflow.ICancellation|null); - } - - /** Used by core to resolve child workflow executions. */ - class ChildWorkflowResult implements IChildWorkflowResult { - - /** - * Constructs a new ChildWorkflowResult. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.child_workflow.IChildWorkflowResult); - - /** ChildWorkflowResult completed. */ - public completed?: (coresdk.child_workflow.ISuccess|null); - - /** ChildWorkflowResult failed. */ - public failed?: (coresdk.child_workflow.IFailure|null); - - /** ChildWorkflowResult cancelled. */ - public cancelled?: (coresdk.child_workflow.ICancellation|null); - - /** ChildWorkflowResult status. */ - public status?: ("completed"|"failed"|"cancelled"); - - /** - * Creates a new ChildWorkflowResult instance using the specified properties. - * @param [properties] Properties to set - * @returns ChildWorkflowResult instance - */ - public static create(properties?: coresdk.child_workflow.IChildWorkflowResult): coresdk.child_workflow.ChildWorkflowResult; - - /** - * Encodes the specified ChildWorkflowResult message. Does not implicitly {@link coresdk.child_workflow.ChildWorkflowResult.verify|verify} messages. - * @param message ChildWorkflowResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.child_workflow.IChildWorkflowResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ChildWorkflowResult message, length delimited. Does not implicitly {@link coresdk.child_workflow.ChildWorkflowResult.verify|verify} messages. - * @param message ChildWorkflowResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.child_workflow.IChildWorkflowResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ChildWorkflowResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChildWorkflowResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.child_workflow.ChildWorkflowResult; - - /** - * Decodes a ChildWorkflowResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChildWorkflowResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.child_workflow.ChildWorkflowResult; - - /** - * Creates a ChildWorkflowResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChildWorkflowResult - */ - public static fromObject(object: { [k: string]: any }): coresdk.child_workflow.ChildWorkflowResult; - - /** - * Creates a plain object from a ChildWorkflowResult message. Also converts values to other types if specified. - * @param message ChildWorkflowResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.child_workflow.ChildWorkflowResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ChildWorkflowResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ChildWorkflowResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Success. */ - interface ISuccess { - - /** Success result */ - result?: (temporal.api.common.v1.IPayload|null); - } - - /** Used in ChildWorkflowResult to report successful completion. */ - class Success implements ISuccess { - - /** - * Constructs a new Success. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.child_workflow.ISuccess); - - /** Success result. */ - public result?: (temporal.api.common.v1.IPayload|null); - - /** - * Creates a new Success instance using the specified properties. - * @param [properties] Properties to set - * @returns Success instance - */ - public static create(properties?: coresdk.child_workflow.ISuccess): coresdk.child_workflow.Success; - - /** - * Encodes the specified Success message. Does not implicitly {@link coresdk.child_workflow.Success.verify|verify} messages. - * @param message Success message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.child_workflow.ISuccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Success message, length delimited. Does not implicitly {@link coresdk.child_workflow.Success.verify|verify} messages. - * @param message Success message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.child_workflow.ISuccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Success message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Success - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.child_workflow.Success; - - /** - * Decodes a Success message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Success - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.child_workflow.Success; - - /** - * Creates a Success message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Success - */ - public static fromObject(object: { [k: string]: any }): coresdk.child_workflow.Success; - - /** - * Creates a plain object from a Success message. Also converts values to other types if specified. - * @param message Success - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.child_workflow.Success, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Success to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Success - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Failure. */ - interface IFailure { - - /** Failure failure */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** - * Used in ChildWorkflowResult to report non successful outcomes such as - * application failures, timeouts, terminations, and cancellations. - */ - class Failure implements IFailure { - - /** - * Constructs a new Failure. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.child_workflow.IFailure); - - /** Failure failure. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new Failure instance using the specified properties. - * @param [properties] Properties to set - * @returns Failure instance - */ - public static create(properties?: coresdk.child_workflow.IFailure): coresdk.child_workflow.Failure; - - /** - * Encodes the specified Failure message. Does not implicitly {@link coresdk.child_workflow.Failure.verify|verify} messages. - * @param message Failure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.child_workflow.IFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Failure message, length delimited. Does not implicitly {@link coresdk.child_workflow.Failure.verify|verify} messages. - * @param message Failure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.child_workflow.IFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Failure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.child_workflow.Failure; - - /** - * Decodes a Failure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.child_workflow.Failure; - - /** - * Creates a Failure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Failure - */ - public static fromObject(object: { [k: string]: any }): coresdk.child_workflow.Failure; - - /** - * Creates a plain object from a Failure message. Also converts values to other types if specified. - * @param message Failure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.child_workflow.Failure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Failure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Failure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Cancellation. */ - interface ICancellation { - - /** Cancellation failure */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** - * Used in ChildWorkflowResult to report cancellation. - * Failure should be ChildWorkflowFailure with a CanceledFailure cause. - */ - class Cancellation implements ICancellation { - - /** - * Constructs a new Cancellation. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.child_workflow.ICancellation); - - /** Cancellation failure. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new Cancellation instance using the specified properties. - * @param [properties] Properties to set - * @returns Cancellation instance - */ - public static create(properties?: coresdk.child_workflow.ICancellation): coresdk.child_workflow.Cancellation; - - /** - * Encodes the specified Cancellation message. Does not implicitly {@link coresdk.child_workflow.Cancellation.verify|verify} messages. - * @param message Cancellation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.child_workflow.ICancellation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Cancellation message, length delimited. Does not implicitly {@link coresdk.child_workflow.Cancellation.verify|verify} messages. - * @param message Cancellation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.child_workflow.ICancellation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Cancellation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Cancellation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.child_workflow.Cancellation; - - /** - * Decodes a Cancellation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Cancellation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.child_workflow.Cancellation; - - /** - * Creates a Cancellation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Cancellation - */ - public static fromObject(object: { [k: string]: any }): coresdk.child_workflow.Cancellation; - - /** - * Creates a plain object from a Cancellation message. Also converts values to other types if specified. - * @param message Cancellation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.child_workflow.Cancellation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Cancellation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Cancellation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** - * Used by the service to determine the fate of a child workflow - * in case its parent is closed. - */ - enum ParentClosePolicy { - PARENT_CLOSE_POLICY_UNSPECIFIED = 0, - PARENT_CLOSE_POLICY_TERMINATE = 1, - PARENT_CLOSE_POLICY_ABANDON = 2, - PARENT_CLOSE_POLICY_REQUEST_CANCEL = 3 - } - - /** Possible causes of failure to start a child workflow */ - enum StartChildWorkflowExecutionFailedCause { - START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED = 0, - START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS = 1 - } - - /** Controls at which point to report back to lang when a child workflow is cancelled */ - enum ChildWorkflowCancellationType { - ABANDON = 0, - TRY_CANCEL = 1, - WAIT_CANCELLATION_COMPLETED = 2, - WAIT_CANCELLATION_REQUESTED = 3 - } - } - - /** Namespace nexus. */ - namespace nexus { - - /** Properties of a NexusOperationResult. */ - interface INexusOperationResult { - - /** NexusOperationResult completed */ - completed?: (temporal.api.common.v1.IPayload|null); - - /** NexusOperationResult failed */ - failed?: (temporal.api.failure.v1.IFailure|null); - - /** NexusOperationResult cancelled */ - cancelled?: (temporal.api.failure.v1.IFailure|null); - - /** NexusOperationResult timedOut */ - timedOut?: (temporal.api.failure.v1.IFailure|null); - } - - /** Used by core to resolve nexus operations. */ - class NexusOperationResult implements INexusOperationResult { - - /** - * Constructs a new NexusOperationResult. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.nexus.INexusOperationResult); - - /** NexusOperationResult completed. */ - public completed?: (temporal.api.common.v1.IPayload|null); - - /** NexusOperationResult failed. */ - public failed?: (temporal.api.failure.v1.IFailure|null); - - /** NexusOperationResult cancelled. */ - public cancelled?: (temporal.api.failure.v1.IFailure|null); - - /** NexusOperationResult timedOut. */ - public timedOut?: (temporal.api.failure.v1.IFailure|null); - - /** NexusOperationResult status. */ - public status?: ("completed"|"failed"|"cancelled"|"timedOut"); - - /** - * Creates a new NexusOperationResult instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusOperationResult instance - */ - public static create(properties?: coresdk.nexus.INexusOperationResult): coresdk.nexus.NexusOperationResult; - - /** - * Encodes the specified NexusOperationResult message. Does not implicitly {@link coresdk.nexus.NexusOperationResult.verify|verify} messages. - * @param message NexusOperationResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.nexus.INexusOperationResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusOperationResult message, length delimited. Does not implicitly {@link coresdk.nexus.NexusOperationResult.verify|verify} messages. - * @param message NexusOperationResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.nexus.INexusOperationResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusOperationResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusOperationResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.nexus.NexusOperationResult; - - /** - * Decodes a NexusOperationResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusOperationResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.nexus.NexusOperationResult; - - /** - * Creates a NexusOperationResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusOperationResult - */ - public static fromObject(object: { [k: string]: any }): coresdk.nexus.NexusOperationResult; - - /** - * Creates a plain object from a NexusOperationResult message. Also converts values to other types if specified. - * @param message NexusOperationResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.nexus.NexusOperationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusOperationResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusOperationResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusTaskCompletion. */ - interface INexusTaskCompletion { - - /** The unique identifier for this task provided in the poll response */ - taskToken?: (Uint8Array|null); - - /** - * The handler completed (successfully or not). Note that the response kind must match the - * request kind (start or cancel). - */ - completed?: (temporal.api.nexus.v1.IResponse|null); - - /** The handler could not complete the request for some reason. Deprecated, use failure. */ - error?: (temporal.api.nexus.v1.IHandlerError|null); - - /** - * The lang SDK acknowledges that it is responding to a `CancelNexusTask` and thus the - * response is irrelevant. This is not the only way to respond to a cancel, the other - * variants can still be used, but this variant should be used when the handler was aborted - * by cancellation. - */ - ackCancel?: (boolean|null); - - /** The handler could not complete the request for some reason. */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** A response to a Nexus task */ - class NexusTaskCompletion implements INexusTaskCompletion { - - /** - * Constructs a new NexusTaskCompletion. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.nexus.INexusTaskCompletion); - - /** The unique identifier for this task provided in the poll response */ - public taskToken: Uint8Array; - - /** - * The handler completed (successfully or not). Note that the response kind must match the - * request kind (start or cancel). - */ - public completed?: (temporal.api.nexus.v1.IResponse|null); - - /** The handler could not complete the request for some reason. Deprecated, use failure. */ - public error?: (temporal.api.nexus.v1.IHandlerError|null); - - /** - * The lang SDK acknowledges that it is responding to a `CancelNexusTask` and thus the - * response is irrelevant. This is not the only way to respond to a cancel, the other - * variants can still be used, but this variant should be used when the handler was aborted - * by cancellation. - */ - public ackCancel?: (boolean|null); - - /** The handler could not complete the request for some reason. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** NexusTaskCompletion status. */ - public status?: ("completed"|"error"|"ackCancel"|"failure"); - - /** - * Creates a new NexusTaskCompletion instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusTaskCompletion instance - */ - public static create(properties?: coresdk.nexus.INexusTaskCompletion): coresdk.nexus.NexusTaskCompletion; - - /** - * Encodes the specified NexusTaskCompletion message. Does not implicitly {@link coresdk.nexus.NexusTaskCompletion.verify|verify} messages. - * @param message NexusTaskCompletion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.nexus.INexusTaskCompletion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusTaskCompletion message, length delimited. Does not implicitly {@link coresdk.nexus.NexusTaskCompletion.verify|verify} messages. - * @param message NexusTaskCompletion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.nexus.INexusTaskCompletion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusTaskCompletion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusTaskCompletion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.nexus.NexusTaskCompletion; - - /** - * Decodes a NexusTaskCompletion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusTaskCompletion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.nexus.NexusTaskCompletion; - - /** - * Creates a NexusTaskCompletion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusTaskCompletion - */ - public static fromObject(object: { [k: string]: any }): coresdk.nexus.NexusTaskCompletion; - - /** - * Creates a plain object from a NexusTaskCompletion message. Also converts values to other types if specified. - * @param message NexusTaskCompletion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.nexus.NexusTaskCompletion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusTaskCompletion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusTaskCompletion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusTask. */ - interface INexusTask { - - /** A nexus task from server */ - task?: (temporal.api.workflowservice.v1.IPollNexusTaskQueueResponse|null); - - /** - * A request by Core to notify an in-progress operation handler that it should cancel. This - * is distinct from a `CancelOperationRequest` from the server, which results from the user - * requesting the cancellation of an operation. Handling this variant should result in - * something like cancelling a cancellation token given to the user's operation handler. - * - * These do not count as a separate task for the purposes of completing all issued tasks, - * but rather count as a sort of modification to the already-issued task which is being - * cancelled. - * - * EX: Core knows the nexus operation has timed out, and it does not make sense for the - * user's operation handler to continue doing work. - */ - cancelTask?: (coresdk.nexus.ICancelNexusTask|null); - - /** - * The deadline for this request, parsed from the "Request-Timeout" header. - * Only set when variant is `task` and the header was present with a valid value. - * Represented as an absolute timestamp. - */ - requestDeadline?: (google.protobuf.ITimestamp|null); - } - - /** Represents a NexusTask. */ - class NexusTask implements INexusTask { - - /** - * Constructs a new NexusTask. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.nexus.INexusTask); - - /** A nexus task from server */ - public task?: (temporal.api.workflowservice.v1.IPollNexusTaskQueueResponse|null); - - /** - * A request by Core to notify an in-progress operation handler that it should cancel. This - * is distinct from a `CancelOperationRequest` from the server, which results from the user - * requesting the cancellation of an operation. Handling this variant should result in - * something like cancelling a cancellation token given to the user's operation handler. - * - * These do not count as a separate task for the purposes of completing all issued tasks, - * but rather count as a sort of modification to the already-issued task which is being - * cancelled. - * - * EX: Core knows the nexus operation has timed out, and it does not make sense for the - * user's operation handler to continue doing work. - */ - public cancelTask?: (coresdk.nexus.ICancelNexusTask|null); - - /** - * The deadline for this request, parsed from the "Request-Timeout" header. - * Only set when variant is `task` and the header was present with a valid value. - * Represented as an absolute timestamp. - */ - public requestDeadline?: (google.protobuf.ITimestamp|null); - - /** NexusTask variant. */ - public variant?: ("task"|"cancelTask"); - - /** - * Creates a new NexusTask instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusTask instance - */ - public static create(properties?: coresdk.nexus.INexusTask): coresdk.nexus.NexusTask; - - /** - * Encodes the specified NexusTask message. Does not implicitly {@link coresdk.nexus.NexusTask.verify|verify} messages. - * @param message NexusTask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.nexus.INexusTask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusTask message, length delimited. Does not implicitly {@link coresdk.nexus.NexusTask.verify|verify} messages. - * @param message NexusTask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.nexus.INexusTask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusTask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.nexus.NexusTask; - - /** - * Decodes a NexusTask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.nexus.NexusTask; - - /** - * Creates a NexusTask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusTask - */ - public static fromObject(object: { [k: string]: any }): coresdk.nexus.NexusTask; - - /** - * Creates a plain object from a NexusTask message. Also converts values to other types if specified. - * @param message NexusTask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.nexus.NexusTask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusTask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusTask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelNexusTask. */ - interface ICancelNexusTask { - - /** The task token from the PollNexusTaskQueueResponse */ - taskToken?: (Uint8Array|null); - - /** Why Core is asking for this operation to be cancelled */ - reason?: (coresdk.nexus.NexusTaskCancelReason|null); - } - - /** Represents a CancelNexusTask. */ - class CancelNexusTask implements ICancelNexusTask { - - /** - * Constructs a new CancelNexusTask. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.nexus.ICancelNexusTask); - - /** The task token from the PollNexusTaskQueueResponse */ - public taskToken: Uint8Array; - - /** Why Core is asking for this operation to be cancelled */ - public reason: coresdk.nexus.NexusTaskCancelReason; - - /** - * Creates a new CancelNexusTask instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelNexusTask instance - */ - public static create(properties?: coresdk.nexus.ICancelNexusTask): coresdk.nexus.CancelNexusTask; - - /** - * Encodes the specified CancelNexusTask message. Does not implicitly {@link coresdk.nexus.CancelNexusTask.verify|verify} messages. - * @param message CancelNexusTask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.nexus.ICancelNexusTask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelNexusTask message, length delimited. Does not implicitly {@link coresdk.nexus.CancelNexusTask.verify|verify} messages. - * @param message CancelNexusTask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.nexus.ICancelNexusTask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelNexusTask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelNexusTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.nexus.CancelNexusTask; - - /** - * Decodes a CancelNexusTask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelNexusTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.nexus.CancelNexusTask; - - /** - * Creates a CancelNexusTask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelNexusTask - */ - public static fromObject(object: { [k: string]: any }): coresdk.nexus.CancelNexusTask; - - /** - * Creates a plain object from a CancelNexusTask message. Also converts values to other types if specified. - * @param message CancelNexusTask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.nexus.CancelNexusTask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelNexusTask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelNexusTask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** NexusTaskCancelReason enum. */ - enum NexusTaskCancelReason { - TIMED_OUT = 0, - WORKER_SHUTDOWN = 1 - } - - /** Controls at which point to report back to lang when a nexus operation is cancelled */ - enum NexusOperationCancellationType { - WAIT_CANCELLATION_COMPLETED = 0, - ABANDON = 1, - TRY_CANCEL = 2, - WAIT_CANCELLATION_REQUESTED = 3 - } - } - - /** Namespace workflow_commands. */ - namespace workflow_commands { - - /** Properties of a WorkflowCommand. */ - interface IWorkflowCommand { - - /** - * User metadata that may or may not be persisted into history depending on the command type. - * Lang layers are expected to expose the setting of the internals of this metadata on a - * per-command basis where applicable. - */ - userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** WorkflowCommand startTimer */ - startTimer?: (coresdk.workflow_commands.IStartTimer|null); - - /** WorkflowCommand scheduleActivity */ - scheduleActivity?: (coresdk.workflow_commands.IScheduleActivity|null); - - /** WorkflowCommand respondToQuery */ - respondToQuery?: (coresdk.workflow_commands.IQueryResult|null); - - /** WorkflowCommand requestCancelActivity */ - requestCancelActivity?: (coresdk.workflow_commands.IRequestCancelActivity|null); - - /** WorkflowCommand cancelTimer */ - cancelTimer?: (coresdk.workflow_commands.ICancelTimer|null); - - /** WorkflowCommand completeWorkflowExecution */ - completeWorkflowExecution?: (coresdk.workflow_commands.ICompleteWorkflowExecution|null); - - /** WorkflowCommand failWorkflowExecution */ - failWorkflowExecution?: (coresdk.workflow_commands.IFailWorkflowExecution|null); - - /** WorkflowCommand continueAsNewWorkflowExecution */ - continueAsNewWorkflowExecution?: (coresdk.workflow_commands.IContinueAsNewWorkflowExecution|null); - - /** WorkflowCommand cancelWorkflowExecution */ - cancelWorkflowExecution?: (coresdk.workflow_commands.ICancelWorkflowExecution|null); - - /** WorkflowCommand setPatchMarker */ - setPatchMarker?: (coresdk.workflow_commands.ISetPatchMarker|null); - - /** WorkflowCommand startChildWorkflowExecution */ - startChildWorkflowExecution?: (coresdk.workflow_commands.IStartChildWorkflowExecution|null); - - /** WorkflowCommand cancelChildWorkflowExecution */ - cancelChildWorkflowExecution?: (coresdk.workflow_commands.ICancelChildWorkflowExecution|null); - - /** WorkflowCommand requestCancelExternalWorkflowExecution */ - requestCancelExternalWorkflowExecution?: (coresdk.workflow_commands.IRequestCancelExternalWorkflowExecution|null); - - /** WorkflowCommand signalExternalWorkflowExecution */ - signalExternalWorkflowExecution?: (coresdk.workflow_commands.ISignalExternalWorkflowExecution|null); - - /** WorkflowCommand cancelSignalWorkflow */ - cancelSignalWorkflow?: (coresdk.workflow_commands.ICancelSignalWorkflow|null); - - /** WorkflowCommand scheduleLocalActivity */ - scheduleLocalActivity?: (coresdk.workflow_commands.IScheduleLocalActivity|null); - - /** WorkflowCommand requestCancelLocalActivity */ - requestCancelLocalActivity?: (coresdk.workflow_commands.IRequestCancelLocalActivity|null); - - /** WorkflowCommand upsertWorkflowSearchAttributes */ - upsertWorkflowSearchAttributes?: (coresdk.workflow_commands.IUpsertWorkflowSearchAttributes|null); - - /** WorkflowCommand modifyWorkflowProperties */ - modifyWorkflowProperties?: (coresdk.workflow_commands.IModifyWorkflowProperties|null); - - /** WorkflowCommand updateResponse */ - updateResponse?: (coresdk.workflow_commands.IUpdateResponse|null); - - /** WorkflowCommand scheduleNexusOperation */ - scheduleNexusOperation?: (coresdk.workflow_commands.IScheduleNexusOperation|null); - - /** WorkflowCommand requestCancelNexusOperation */ - requestCancelNexusOperation?: (coresdk.workflow_commands.IRequestCancelNexusOperation|null); - } - - /** Represents a WorkflowCommand. */ - class WorkflowCommand implements IWorkflowCommand { - - /** - * Constructs a new WorkflowCommand. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IWorkflowCommand); - - /** - * User metadata that may or may not be persisted into history depending on the command type. - * Lang layers are expected to expose the setting of the internals of this metadata on a - * per-command basis where applicable. - */ - public userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** WorkflowCommand startTimer. */ - public startTimer?: (coresdk.workflow_commands.IStartTimer|null); - - /** WorkflowCommand scheduleActivity. */ - public scheduleActivity?: (coresdk.workflow_commands.IScheduleActivity|null); - - /** WorkflowCommand respondToQuery. */ - public respondToQuery?: (coresdk.workflow_commands.IQueryResult|null); - - /** WorkflowCommand requestCancelActivity. */ - public requestCancelActivity?: (coresdk.workflow_commands.IRequestCancelActivity|null); - - /** WorkflowCommand cancelTimer. */ - public cancelTimer?: (coresdk.workflow_commands.ICancelTimer|null); - - /** WorkflowCommand completeWorkflowExecution. */ - public completeWorkflowExecution?: (coresdk.workflow_commands.ICompleteWorkflowExecution|null); - - /** WorkflowCommand failWorkflowExecution. */ - public failWorkflowExecution?: (coresdk.workflow_commands.IFailWorkflowExecution|null); - - /** WorkflowCommand continueAsNewWorkflowExecution. */ - public continueAsNewWorkflowExecution?: (coresdk.workflow_commands.IContinueAsNewWorkflowExecution|null); - - /** WorkflowCommand cancelWorkflowExecution. */ - public cancelWorkflowExecution?: (coresdk.workflow_commands.ICancelWorkflowExecution|null); - - /** WorkflowCommand setPatchMarker. */ - public setPatchMarker?: (coresdk.workflow_commands.ISetPatchMarker|null); - - /** WorkflowCommand startChildWorkflowExecution. */ - public startChildWorkflowExecution?: (coresdk.workflow_commands.IStartChildWorkflowExecution|null); - - /** WorkflowCommand cancelChildWorkflowExecution. */ - public cancelChildWorkflowExecution?: (coresdk.workflow_commands.ICancelChildWorkflowExecution|null); - - /** WorkflowCommand requestCancelExternalWorkflowExecution. */ - public requestCancelExternalWorkflowExecution?: (coresdk.workflow_commands.IRequestCancelExternalWorkflowExecution|null); - - /** WorkflowCommand signalExternalWorkflowExecution. */ - public signalExternalWorkflowExecution?: (coresdk.workflow_commands.ISignalExternalWorkflowExecution|null); - - /** WorkflowCommand cancelSignalWorkflow. */ - public cancelSignalWorkflow?: (coresdk.workflow_commands.ICancelSignalWorkflow|null); - - /** WorkflowCommand scheduleLocalActivity. */ - public scheduleLocalActivity?: (coresdk.workflow_commands.IScheduleLocalActivity|null); - - /** WorkflowCommand requestCancelLocalActivity. */ - public requestCancelLocalActivity?: (coresdk.workflow_commands.IRequestCancelLocalActivity|null); - - /** WorkflowCommand upsertWorkflowSearchAttributes. */ - public upsertWorkflowSearchAttributes?: (coresdk.workflow_commands.IUpsertWorkflowSearchAttributes|null); - - /** WorkflowCommand modifyWorkflowProperties. */ - public modifyWorkflowProperties?: (coresdk.workflow_commands.IModifyWorkflowProperties|null); - - /** WorkflowCommand updateResponse. */ - public updateResponse?: (coresdk.workflow_commands.IUpdateResponse|null); - - /** WorkflowCommand scheduleNexusOperation. */ - public scheduleNexusOperation?: (coresdk.workflow_commands.IScheduleNexusOperation|null); - - /** WorkflowCommand requestCancelNexusOperation. */ - public requestCancelNexusOperation?: (coresdk.workflow_commands.IRequestCancelNexusOperation|null); - - /** WorkflowCommand variant. */ - public variant?: ("startTimer"|"scheduleActivity"|"respondToQuery"|"requestCancelActivity"|"cancelTimer"|"completeWorkflowExecution"|"failWorkflowExecution"|"continueAsNewWorkflowExecution"|"cancelWorkflowExecution"|"setPatchMarker"|"startChildWorkflowExecution"|"cancelChildWorkflowExecution"|"requestCancelExternalWorkflowExecution"|"signalExternalWorkflowExecution"|"cancelSignalWorkflow"|"scheduleLocalActivity"|"requestCancelLocalActivity"|"upsertWorkflowSearchAttributes"|"modifyWorkflowProperties"|"updateResponse"|"scheduleNexusOperation"|"requestCancelNexusOperation"); - - /** - * Creates a new WorkflowCommand instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowCommand instance - */ - public static create(properties?: coresdk.workflow_commands.IWorkflowCommand): coresdk.workflow_commands.WorkflowCommand; - - /** - * Encodes the specified WorkflowCommand message. Does not implicitly {@link coresdk.workflow_commands.WorkflowCommand.verify|verify} messages. - * @param message WorkflowCommand message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IWorkflowCommand, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowCommand message, length delimited. Does not implicitly {@link coresdk.workflow_commands.WorkflowCommand.verify|verify} messages. - * @param message WorkflowCommand message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IWorkflowCommand, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowCommand message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowCommand - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.WorkflowCommand; - - /** - * Decodes a WorkflowCommand message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowCommand - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.WorkflowCommand; - - /** - * Creates a WorkflowCommand message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowCommand - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.WorkflowCommand; - - /** - * Creates a plain object from a WorkflowCommand message. Also converts values to other types if specified. - * @param message WorkflowCommand - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.WorkflowCommand, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowCommand to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowCommand - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartTimer. */ - interface IStartTimer { - - /** Lang's incremental sequence number, used as the operation identifier */ - seq?: (number|null); - - /** StartTimer startToFireTimeout */ - startToFireTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a StartTimer. */ - class StartTimer implements IStartTimer { - - /** - * Constructs a new StartTimer. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IStartTimer); - - /** Lang's incremental sequence number, used as the operation identifier */ - public seq: number; - - /** StartTimer startToFireTimeout. */ - public startToFireTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new StartTimer instance using the specified properties. - * @param [properties] Properties to set - * @returns StartTimer instance - */ - public static create(properties?: coresdk.workflow_commands.IStartTimer): coresdk.workflow_commands.StartTimer; - - /** - * Encodes the specified StartTimer message. Does not implicitly {@link coresdk.workflow_commands.StartTimer.verify|verify} messages. - * @param message StartTimer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IStartTimer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartTimer message, length delimited. Does not implicitly {@link coresdk.workflow_commands.StartTimer.verify|verify} messages. - * @param message StartTimer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IStartTimer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartTimer message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartTimer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.StartTimer; - - /** - * Decodes a StartTimer message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartTimer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.StartTimer; - - /** - * Creates a StartTimer message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartTimer - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.StartTimer; - - /** - * Creates a plain object from a StartTimer message. Also converts values to other types if specified. - * @param message StartTimer - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.StartTimer, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartTimer to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartTimer - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelTimer. */ - interface ICancelTimer { - - /** Lang's incremental sequence number as passed to `StartTimer` */ - seq?: (number|null); - } - - /** Represents a CancelTimer. */ - class CancelTimer implements ICancelTimer { - - /** - * Constructs a new CancelTimer. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.ICancelTimer); - - /** Lang's incremental sequence number as passed to `StartTimer` */ - public seq: number; - - /** - * Creates a new CancelTimer instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelTimer instance - */ - public static create(properties?: coresdk.workflow_commands.ICancelTimer): coresdk.workflow_commands.CancelTimer; - - /** - * Encodes the specified CancelTimer message. Does not implicitly {@link coresdk.workflow_commands.CancelTimer.verify|verify} messages. - * @param message CancelTimer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.ICancelTimer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelTimer message, length delimited. Does not implicitly {@link coresdk.workflow_commands.CancelTimer.verify|verify} messages. - * @param message CancelTimer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.ICancelTimer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelTimer message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelTimer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.CancelTimer; - - /** - * Decodes a CancelTimer message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelTimer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.CancelTimer; - - /** - * Creates a CancelTimer message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelTimer - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.CancelTimer; - - /** - * Creates a plain object from a CancelTimer message. Also converts values to other types if specified. - * @param message CancelTimer - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.CancelTimer, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelTimer to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelTimer - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScheduleActivity. */ - interface IScheduleActivity { - - /** Lang's incremental sequence number, used as the operation identifier */ - seq?: (number|null); - - /** ScheduleActivity activityId */ - activityId?: (string|null); - - /** ScheduleActivity activityType */ - activityType?: (string|null); - - /** The name of the task queue to place this activity request in */ - taskQueue?: (string|null); - - /** ScheduleActivity headers */ - headers?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - - /** Arguments/input to the activity. Called "input" upstream. */ - "arguments"?: (temporal.api.common.v1.IPayload[]|null); - - /** - * Indicates how long the caller is willing to wait for an activity completion. Limits how long - * retries will be attempted. Either this or start_to_close_timeout_seconds must be specified. - * When not specified defaults to the workflow execution timeout. - */ - scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Limits time an activity task can stay in a task queue before a worker picks it up. This - * timeout is always non retryable as all a retry would achieve is to put it back into the same - * queue. Defaults to schedule_to_close_timeout or workflow execution timeout if not specified. - */ - scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Maximum time an activity is allowed to execute after a pick up by a worker. This timeout is - * always retryable. Either this or schedule_to_close_timeout must be specified. - */ - startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Maximum time allowed between successful worker heartbeats. */ - heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** - * Activities are provided by a default retry policy controlled through the service dynamic - * configuration. Retries are happening up to schedule_to_close_timeout. To disable retries set - * retry_policy.maximum_attempts to 1. - */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Defines how the workflow will wait (or not) for cancellation of the activity to be confirmed */ - cancellationType?: (coresdk.workflow_commands.ActivityCancellationType|null); - - /** - * If set, the worker will not tell the service that it can immediately start executing this - * activity. When unset/default, workers will always attempt to do so if activity execution - * slots are available. - */ - doNotEagerlyExecute?: (boolean|null); - - /** Whether this activity should run on a worker with a compatible build id or not. */ - versioningIntent?: (coresdk.common.VersioningIntent|null); - - /** The Priority to use for this activity */ - priority?: (temporal.api.common.v1.IPriority|null); - } - - /** Represents a ScheduleActivity. */ - class ScheduleActivity implements IScheduleActivity { - - /** - * Constructs a new ScheduleActivity. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IScheduleActivity); - - /** Lang's incremental sequence number, used as the operation identifier */ - public seq: number; - - /** ScheduleActivity activityId. */ - public activityId: string; - - /** ScheduleActivity activityType. */ - public activityType: string; - - /** The name of the task queue to place this activity request in */ - public taskQueue: string; - - /** ScheduleActivity headers. */ - public headers: { [k: string]: temporal.api.common.v1.IPayload }; - - /** Arguments/input to the activity. Called "input" upstream. */ - public arguments: temporal.api.common.v1.IPayload[]; - - /** - * Indicates how long the caller is willing to wait for an activity completion. Limits how long - * retries will be attempted. Either this or start_to_close_timeout_seconds must be specified. - * When not specified defaults to the workflow execution timeout. - */ - public scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Limits time an activity task can stay in a task queue before a worker picks it up. This - * timeout is always non retryable as all a retry would achieve is to put it back into the same - * queue. Defaults to schedule_to_close_timeout or workflow execution timeout if not specified. - */ - public scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Maximum time an activity is allowed to execute after a pick up by a worker. This timeout is - * always retryable. Either this or schedule_to_close_timeout must be specified. - */ - public startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Maximum time allowed between successful worker heartbeats. */ - public heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** - * Activities are provided by a default retry policy controlled through the service dynamic - * configuration. Retries are happening up to schedule_to_close_timeout. To disable retries set - * retry_policy.maximum_attempts to 1. - */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Defines how the workflow will wait (or not) for cancellation of the activity to be confirmed */ - public cancellationType: coresdk.workflow_commands.ActivityCancellationType; - - /** - * If set, the worker will not tell the service that it can immediately start executing this - * activity. When unset/default, workers will always attempt to do so if activity execution - * slots are available. - */ - public doNotEagerlyExecute: boolean; - - /** Whether this activity should run on a worker with a compatible build id or not. */ - public versioningIntent: coresdk.common.VersioningIntent; - - /** The Priority to use for this activity */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Creates a new ScheduleActivity instance using the specified properties. - * @param [properties] Properties to set - * @returns ScheduleActivity instance - */ - public static create(properties?: coresdk.workflow_commands.IScheduleActivity): coresdk.workflow_commands.ScheduleActivity; - - /** - * Encodes the specified ScheduleActivity message. Does not implicitly {@link coresdk.workflow_commands.ScheduleActivity.verify|verify} messages. - * @param message ScheduleActivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IScheduleActivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduleActivity message, length delimited. Does not implicitly {@link coresdk.workflow_commands.ScheduleActivity.verify|verify} messages. - * @param message ScheduleActivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IScheduleActivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduleActivity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduleActivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.ScheduleActivity; - - /** - * Decodes a ScheduleActivity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduleActivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.ScheduleActivity; - - /** - * Creates a ScheduleActivity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduleActivity - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.ScheduleActivity; - - /** - * Creates a plain object from a ScheduleActivity message. Also converts values to other types if specified. - * @param message ScheduleActivity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.ScheduleActivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduleActivity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScheduleActivity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScheduleLocalActivity. */ - interface IScheduleLocalActivity { - - /** Lang's incremental sequence number, used as the operation identifier */ - seq?: (number|null); - - /** ScheduleLocalActivity activityId */ - activityId?: (string|null); - - /** ScheduleLocalActivity activityType */ - activityType?: (string|null); - - /** - * Local activities can start with a non-1 attempt, if lang has been told to backoff using - * a timer before retrying. It should pass the attempt number from a `DoBackoff` activity - * resolution. - */ - attempt?: (number|null); - - /** - * If this local activity is a retry (as per the attempt field) this needs to be the original - * scheduling time (as provided in `DoBackoff`) - */ - originalScheduleTime?: (google.protobuf.ITimestamp|null); - - /** ScheduleLocalActivity headers */ - headers?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - - /** Arguments/input to the activity. */ - "arguments"?: (temporal.api.common.v1.IPayload[]|null); - - /** - * Indicates how long the caller is willing to wait for local activity completion. Limits how - * long retries will be attempted. When not specified defaults to the workflow execution - * timeout (which may be unset). - */ - scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Limits time the local activity can idle internally before being executed. That can happen if - * the worker is currently at max concurrent local activity executions. This timeout is always - * non retryable as all a retry would achieve is to put it back into the same queue. Defaults - * to `schedule_to_close_timeout` if not specified and that is set. Must be <= - * `schedule_to_close_timeout` when set, otherwise, it will be clamped down. - */ - scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Maximum time the local activity is allowed to execute after the task is dispatched. This - * timeout is always retryable. Either or both of `schedule_to_close_timeout` and this must be - * specified. If set, this must be <= `schedule_to_close_timeout`, otherwise, it will be - * clamped down. - */ - startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Specify a retry policy for the local activity. By default local activities will be retried - * indefinitely. - */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** - * If the activity is retrying and backoff would exceed this value, lang will be told to - * schedule a timer and retry the activity after. Otherwise, backoff will happen internally in - * core. Defaults to 1 minute. - */ - localRetryThreshold?: (google.protobuf.IDuration|null); - - /** - * Defines how the workflow will wait (or not) for cancellation of the activity to be - * confirmed. Lang should default this to `WAIT_CANCELLATION_COMPLETED`, even though proto - * will default to `TRY_CANCEL` automatically. - */ - cancellationType?: (coresdk.workflow_commands.ActivityCancellationType|null); - } - - /** Represents a ScheduleLocalActivity. */ - class ScheduleLocalActivity implements IScheduleLocalActivity { - - /** - * Constructs a new ScheduleLocalActivity. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IScheduleLocalActivity); - - /** Lang's incremental sequence number, used as the operation identifier */ - public seq: number; - - /** ScheduleLocalActivity activityId. */ - public activityId: string; - - /** ScheduleLocalActivity activityType. */ - public activityType: string; - - /** - * Local activities can start with a non-1 attempt, if lang has been told to backoff using - * a timer before retrying. It should pass the attempt number from a `DoBackoff` activity - * resolution. - */ - public attempt: number; - - /** - * If this local activity is a retry (as per the attempt field) this needs to be the original - * scheduling time (as provided in `DoBackoff`) - */ - public originalScheduleTime?: (google.protobuf.ITimestamp|null); - - /** ScheduleLocalActivity headers. */ - public headers: { [k: string]: temporal.api.common.v1.IPayload }; - - /** Arguments/input to the activity. */ - public arguments: temporal.api.common.v1.IPayload[]; - - /** - * Indicates how long the caller is willing to wait for local activity completion. Limits how - * long retries will be attempted. When not specified defaults to the workflow execution - * timeout (which may be unset). - */ - public scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Limits time the local activity can idle internally before being executed. That can happen if - * the worker is currently at max concurrent local activity executions. This timeout is always - * non retryable as all a retry would achieve is to put it back into the same queue. Defaults - * to `schedule_to_close_timeout` if not specified and that is set. Must be <= - * `schedule_to_close_timeout` when set, otherwise, it will be clamped down. - */ - public scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Maximum time the local activity is allowed to execute after the task is dispatched. This - * timeout is always retryable. Either or both of `schedule_to_close_timeout` and this must be - * specified. If set, this must be <= `schedule_to_close_timeout`, otherwise, it will be - * clamped down. - */ - public startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Specify a retry policy for the local activity. By default local activities will be retried - * indefinitely. - */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** - * If the activity is retrying and backoff would exceed this value, lang will be told to - * schedule a timer and retry the activity after. Otherwise, backoff will happen internally in - * core. Defaults to 1 minute. - */ - public localRetryThreshold?: (google.protobuf.IDuration|null); - - /** - * Defines how the workflow will wait (or not) for cancellation of the activity to be - * confirmed. Lang should default this to `WAIT_CANCELLATION_COMPLETED`, even though proto - * will default to `TRY_CANCEL` automatically. - */ - public cancellationType: coresdk.workflow_commands.ActivityCancellationType; - - /** - * Creates a new ScheduleLocalActivity instance using the specified properties. - * @param [properties] Properties to set - * @returns ScheduleLocalActivity instance - */ - public static create(properties?: coresdk.workflow_commands.IScheduleLocalActivity): coresdk.workflow_commands.ScheduleLocalActivity; - - /** - * Encodes the specified ScheduleLocalActivity message. Does not implicitly {@link coresdk.workflow_commands.ScheduleLocalActivity.verify|verify} messages. - * @param message ScheduleLocalActivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IScheduleLocalActivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduleLocalActivity message, length delimited. Does not implicitly {@link coresdk.workflow_commands.ScheduleLocalActivity.verify|verify} messages. - * @param message ScheduleLocalActivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IScheduleLocalActivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduleLocalActivity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduleLocalActivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.ScheduleLocalActivity; - - /** - * Decodes a ScheduleLocalActivity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduleLocalActivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.ScheduleLocalActivity; - - /** - * Creates a ScheduleLocalActivity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduleLocalActivity - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.ScheduleLocalActivity; - - /** - * Creates a plain object from a ScheduleLocalActivity message. Also converts values to other types if specified. - * @param message ScheduleLocalActivity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.ScheduleLocalActivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduleLocalActivity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScheduleLocalActivity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** ActivityCancellationType enum. */ - enum ActivityCancellationType { - TRY_CANCEL = 0, - WAIT_CANCELLATION_COMPLETED = 1, - ABANDON = 2 - } - - /** Properties of a RequestCancelActivity. */ - interface IRequestCancelActivity { - - /** Lang's incremental sequence number as passed to `ScheduleActivity` */ - seq?: (number|null); - } - - /** Represents a RequestCancelActivity. */ - class RequestCancelActivity implements IRequestCancelActivity { - - /** - * Constructs a new RequestCancelActivity. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IRequestCancelActivity); - - /** Lang's incremental sequence number as passed to `ScheduleActivity` */ - public seq: number; - - /** - * Creates a new RequestCancelActivity instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestCancelActivity instance - */ - public static create(properties?: coresdk.workflow_commands.IRequestCancelActivity): coresdk.workflow_commands.RequestCancelActivity; - - /** - * Encodes the specified RequestCancelActivity message. Does not implicitly {@link coresdk.workflow_commands.RequestCancelActivity.verify|verify} messages. - * @param message RequestCancelActivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IRequestCancelActivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCancelActivity message, length delimited. Does not implicitly {@link coresdk.workflow_commands.RequestCancelActivity.verify|verify} messages. - * @param message RequestCancelActivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IRequestCancelActivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestCancelActivity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestCancelActivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.RequestCancelActivity; - - /** - * Decodes a RequestCancelActivity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestCancelActivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.RequestCancelActivity; - - /** - * Creates a RequestCancelActivity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCancelActivity - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.RequestCancelActivity; - - /** - * Creates a plain object from a RequestCancelActivity message. Also converts values to other types if specified. - * @param message RequestCancelActivity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.RequestCancelActivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCancelActivity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestCancelActivity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RequestCancelLocalActivity. */ - interface IRequestCancelLocalActivity { - - /** Lang's incremental sequence number as passed to `ScheduleLocalActivity` */ - seq?: (number|null); - } - - /** Represents a RequestCancelLocalActivity. */ - class RequestCancelLocalActivity implements IRequestCancelLocalActivity { - - /** - * Constructs a new RequestCancelLocalActivity. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IRequestCancelLocalActivity); - - /** Lang's incremental sequence number as passed to `ScheduleLocalActivity` */ - public seq: number; - - /** - * Creates a new RequestCancelLocalActivity instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestCancelLocalActivity instance - */ - public static create(properties?: coresdk.workflow_commands.IRequestCancelLocalActivity): coresdk.workflow_commands.RequestCancelLocalActivity; - - /** - * Encodes the specified RequestCancelLocalActivity message. Does not implicitly {@link coresdk.workflow_commands.RequestCancelLocalActivity.verify|verify} messages. - * @param message RequestCancelLocalActivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IRequestCancelLocalActivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCancelLocalActivity message, length delimited. Does not implicitly {@link coresdk.workflow_commands.RequestCancelLocalActivity.verify|verify} messages. - * @param message RequestCancelLocalActivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IRequestCancelLocalActivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestCancelLocalActivity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestCancelLocalActivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.RequestCancelLocalActivity; - - /** - * Decodes a RequestCancelLocalActivity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestCancelLocalActivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.RequestCancelLocalActivity; - - /** - * Creates a RequestCancelLocalActivity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCancelLocalActivity - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.RequestCancelLocalActivity; - - /** - * Creates a plain object from a RequestCancelLocalActivity message. Also converts values to other types if specified. - * @param message RequestCancelLocalActivity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.RequestCancelLocalActivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCancelLocalActivity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestCancelLocalActivity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QueryResult. */ - interface IQueryResult { - - /** Corresponds to the id provided in the activation job */ - queryId?: (string|null); - - /** QueryResult succeeded */ - succeeded?: (coresdk.workflow_commands.IQuerySuccess|null); - - /** QueryResult failed */ - failed?: (temporal.api.failure.v1.IFailure|null); - } - - /** Represents a QueryResult. */ - class QueryResult implements IQueryResult { - - /** - * Constructs a new QueryResult. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IQueryResult); - - /** Corresponds to the id provided in the activation job */ - public queryId: string; - - /** QueryResult succeeded. */ - public succeeded?: (coresdk.workflow_commands.IQuerySuccess|null); - - /** QueryResult failed. */ - public failed?: (temporal.api.failure.v1.IFailure|null); - - /** QueryResult variant. */ - public variant?: ("succeeded"|"failed"); - - /** - * Creates a new QueryResult instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryResult instance - */ - public static create(properties?: coresdk.workflow_commands.IQueryResult): coresdk.workflow_commands.QueryResult; - - /** - * Encodes the specified QueryResult message. Does not implicitly {@link coresdk.workflow_commands.QueryResult.verify|verify} messages. - * @param message QueryResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link coresdk.workflow_commands.QueryResult.verify|verify} messages. - * @param message QueryResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.QueryResult; - - /** - * Decodes a QueryResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.QueryResult; - - /** - * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryResult - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.QueryResult; - - /** - * Creates a plain object from a QueryResult message. Also converts values to other types if specified. - * @param message QueryResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.QueryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QuerySuccess. */ - interface IQuerySuccess { - - /** QuerySuccess response */ - response?: (temporal.api.common.v1.IPayload|null); - } - - /** Represents a QuerySuccess. */ - class QuerySuccess implements IQuerySuccess { - - /** - * Constructs a new QuerySuccess. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IQuerySuccess); - - /** QuerySuccess response. */ - public response?: (temporal.api.common.v1.IPayload|null); - - /** - * Creates a new QuerySuccess instance using the specified properties. - * @param [properties] Properties to set - * @returns QuerySuccess instance - */ - public static create(properties?: coresdk.workflow_commands.IQuerySuccess): coresdk.workflow_commands.QuerySuccess; - - /** - * Encodes the specified QuerySuccess message. Does not implicitly {@link coresdk.workflow_commands.QuerySuccess.verify|verify} messages. - * @param message QuerySuccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IQuerySuccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QuerySuccess message, length delimited. Does not implicitly {@link coresdk.workflow_commands.QuerySuccess.verify|verify} messages. - * @param message QuerySuccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IQuerySuccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QuerySuccess message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QuerySuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.QuerySuccess; - - /** - * Decodes a QuerySuccess message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuerySuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.QuerySuccess; - - /** - * Creates a QuerySuccess message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuerySuccess - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.QuerySuccess; - - /** - * Creates a plain object from a QuerySuccess message. Also converts values to other types if specified. - * @param message QuerySuccess - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.QuerySuccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QuerySuccess to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QuerySuccess - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CompleteWorkflowExecution. */ - interface ICompleteWorkflowExecution { - - /** CompleteWorkflowExecution result */ - result?: (temporal.api.common.v1.IPayload|null); - } - - /** Issued when the workflow completes successfully */ - class CompleteWorkflowExecution implements ICompleteWorkflowExecution { - - /** - * Constructs a new CompleteWorkflowExecution. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.ICompleteWorkflowExecution); - - /** CompleteWorkflowExecution result. */ - public result?: (temporal.api.common.v1.IPayload|null); - - /** - * Creates a new CompleteWorkflowExecution instance using the specified properties. - * @param [properties] Properties to set - * @returns CompleteWorkflowExecution instance - */ - public static create(properties?: coresdk.workflow_commands.ICompleteWorkflowExecution): coresdk.workflow_commands.CompleteWorkflowExecution; - - /** - * Encodes the specified CompleteWorkflowExecution message. Does not implicitly {@link coresdk.workflow_commands.CompleteWorkflowExecution.verify|verify} messages. - * @param message CompleteWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.ICompleteWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompleteWorkflowExecution message, length delimited. Does not implicitly {@link coresdk.workflow_commands.CompleteWorkflowExecution.verify|verify} messages. - * @param message CompleteWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.ICompleteWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompleteWorkflowExecution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompleteWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.CompleteWorkflowExecution; - - /** - * Decodes a CompleteWorkflowExecution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompleteWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.CompleteWorkflowExecution; - - /** - * Creates a CompleteWorkflowExecution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompleteWorkflowExecution - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.CompleteWorkflowExecution; - - /** - * Creates a plain object from a CompleteWorkflowExecution message. Also converts values to other types if specified. - * @param message CompleteWorkflowExecution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.CompleteWorkflowExecution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompleteWorkflowExecution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CompleteWorkflowExecution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FailWorkflowExecution. */ - interface IFailWorkflowExecution { - - /** FailWorkflowExecution failure */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** Issued when the workflow errors out */ - class FailWorkflowExecution implements IFailWorkflowExecution { - - /** - * Constructs a new FailWorkflowExecution. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IFailWorkflowExecution); - - /** FailWorkflowExecution failure. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new FailWorkflowExecution instance using the specified properties. - * @param [properties] Properties to set - * @returns FailWorkflowExecution instance - */ - public static create(properties?: coresdk.workflow_commands.IFailWorkflowExecution): coresdk.workflow_commands.FailWorkflowExecution; - - /** - * Encodes the specified FailWorkflowExecution message. Does not implicitly {@link coresdk.workflow_commands.FailWorkflowExecution.verify|verify} messages. - * @param message FailWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IFailWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FailWorkflowExecution message, length delimited. Does not implicitly {@link coresdk.workflow_commands.FailWorkflowExecution.verify|verify} messages. - * @param message FailWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IFailWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FailWorkflowExecution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FailWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.FailWorkflowExecution; - - /** - * Decodes a FailWorkflowExecution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FailWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.FailWorkflowExecution; - - /** - * Creates a FailWorkflowExecution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FailWorkflowExecution - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.FailWorkflowExecution; - - /** - * Creates a plain object from a FailWorkflowExecution message. Also converts values to other types if specified. - * @param message FailWorkflowExecution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.FailWorkflowExecution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FailWorkflowExecution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FailWorkflowExecution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ContinueAsNewWorkflowExecution. */ - interface IContinueAsNewWorkflowExecution { - - /** The identifier the lang-specific sdk uses to execute workflow code */ - workflowType?: (string|null); - - /** Task queue for the new workflow execution */ - taskQueue?: (string|null); - - /** - * Inputs to the workflow code. Should be specified. Will not re-use old arguments, as that - * typically wouldn't make any sense. - */ - "arguments"?: (temporal.api.common.v1.IPayload[]|null); - - /** Timeout for a single run of the new workflow. Will not re-use current workflow's value. */ - workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. Will not re-use current workflow's value. */ - workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** If set, the new workflow will have this memo. If unset, re-uses the current workflow's memo */ - memo?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - - /** - * If set, the new workflow will have these headers. Will *not* re-use current workflow's - * headers otherwise. - */ - headers?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - - /** - * If set, the new workflow will have these search attributes. If unset, re-uses the current - * workflow's search attributes. - */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * If set, the new workflow will have this retry policy. If unset, re-uses the current - * workflow's retry policy. - */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Whether the continued workflow should run on a worker with a compatible build id or not. */ - versioningIntent?: (coresdk.common.VersioningIntent|null); - - /** - * Experimental. Optionally decide the versioning behavior that the first task of the new run should use. - * For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version - * of the previous run. - */ - initialVersioningBehavior?: (temporal.api.enums.v1.ContinueAsNewVersioningBehavior|null); - } - - /** Continue the workflow as a new execution */ - class ContinueAsNewWorkflowExecution implements IContinueAsNewWorkflowExecution { - - /** - * Constructs a new ContinueAsNewWorkflowExecution. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IContinueAsNewWorkflowExecution); - - /** The identifier the lang-specific sdk uses to execute workflow code */ - public workflowType: string; - - /** Task queue for the new workflow execution */ - public taskQueue: string; - - /** - * Inputs to the workflow code. Should be specified. Will not re-use old arguments, as that - * typically wouldn't make any sense. - */ - public arguments: temporal.api.common.v1.IPayload[]; - - /** Timeout for a single run of the new workflow. Will not re-use current workflow's value. */ - public workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. Will not re-use current workflow's value. */ - public workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** If set, the new workflow will have this memo. If unset, re-uses the current workflow's memo */ - public memo: { [k: string]: temporal.api.common.v1.IPayload }; - - /** - * If set, the new workflow will have these headers. Will *not* re-use current workflow's - * headers otherwise. - */ - public headers: { [k: string]: temporal.api.common.v1.IPayload }; - - /** - * If set, the new workflow will have these search attributes. If unset, re-uses the current - * workflow's search attributes. - */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * If set, the new workflow will have this retry policy. If unset, re-uses the current - * workflow's retry policy. - */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Whether the continued workflow should run on a worker with a compatible build id or not. */ - public versioningIntent: coresdk.common.VersioningIntent; - - /** - * Experimental. Optionally decide the versioning behavior that the first task of the new run should use. - * For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version - * of the previous run. - */ - public initialVersioningBehavior: temporal.api.enums.v1.ContinueAsNewVersioningBehavior; - - /** - * Creates a new ContinueAsNewWorkflowExecution instance using the specified properties. - * @param [properties] Properties to set - * @returns ContinueAsNewWorkflowExecution instance - */ - public static create(properties?: coresdk.workflow_commands.IContinueAsNewWorkflowExecution): coresdk.workflow_commands.ContinueAsNewWorkflowExecution; - - /** - * Encodes the specified ContinueAsNewWorkflowExecution message. Does not implicitly {@link coresdk.workflow_commands.ContinueAsNewWorkflowExecution.verify|verify} messages. - * @param message ContinueAsNewWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IContinueAsNewWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContinueAsNewWorkflowExecution message, length delimited. Does not implicitly {@link coresdk.workflow_commands.ContinueAsNewWorkflowExecution.verify|verify} messages. - * @param message ContinueAsNewWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IContinueAsNewWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContinueAsNewWorkflowExecution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContinueAsNewWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.ContinueAsNewWorkflowExecution; - - /** - * Decodes a ContinueAsNewWorkflowExecution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContinueAsNewWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.ContinueAsNewWorkflowExecution; - - /** - * Creates a ContinueAsNewWorkflowExecution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContinueAsNewWorkflowExecution - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.ContinueAsNewWorkflowExecution; - - /** - * Creates a plain object from a ContinueAsNewWorkflowExecution message. Also converts values to other types if specified. - * @param message ContinueAsNewWorkflowExecution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.ContinueAsNewWorkflowExecution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContinueAsNewWorkflowExecution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ContinueAsNewWorkflowExecution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelWorkflowExecution. */ - interface ICancelWorkflowExecution { - } - - /** - * Indicate a workflow has completed as cancelled. Generally sent as a response to an activation - * containing a cancellation job. - */ - class CancelWorkflowExecution implements ICancelWorkflowExecution { - - /** - * Constructs a new CancelWorkflowExecution. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.ICancelWorkflowExecution); - - /** - * Creates a new CancelWorkflowExecution instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelWorkflowExecution instance - */ - public static create(properties?: coresdk.workflow_commands.ICancelWorkflowExecution): coresdk.workflow_commands.CancelWorkflowExecution; - - /** - * Encodes the specified CancelWorkflowExecution message. Does not implicitly {@link coresdk.workflow_commands.CancelWorkflowExecution.verify|verify} messages. - * @param message CancelWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.ICancelWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelWorkflowExecution message, length delimited. Does not implicitly {@link coresdk.workflow_commands.CancelWorkflowExecution.verify|verify} messages. - * @param message CancelWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.ICancelWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelWorkflowExecution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.CancelWorkflowExecution; - - /** - * Decodes a CancelWorkflowExecution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.CancelWorkflowExecution; - - /** - * Creates a CancelWorkflowExecution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelWorkflowExecution - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.CancelWorkflowExecution; - - /** - * Creates a plain object from a CancelWorkflowExecution message. Also converts values to other types if specified. - * @param message CancelWorkflowExecution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.CancelWorkflowExecution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelWorkflowExecution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelWorkflowExecution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPatchMarker. */ - interface ISetPatchMarker { - - /** - * A user-chosen identifier for this patch. If the same identifier is used in multiple places in - * the code, those places are considered to be versioned as one unit. IE: The check call will - * return the same result for all of them - */ - patchId?: (string|null); - - /** - * Can be set to true to indicate that branches using this change are being removed, and all - * future worker deployments will only have the "with change" code in them. - */ - deprecated?: (boolean|null); - } - - /** A request to set/check if a certain patch is present or not */ - class SetPatchMarker implements ISetPatchMarker { - - /** - * Constructs a new SetPatchMarker. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.ISetPatchMarker); - - /** - * A user-chosen identifier for this patch. If the same identifier is used in multiple places in - * the code, those places are considered to be versioned as one unit. IE: The check call will - * return the same result for all of them - */ - public patchId: string; - - /** - * Can be set to true to indicate that branches using this change are being removed, and all - * future worker deployments will only have the "with change" code in them. - */ - public deprecated: boolean; - - /** - * Creates a new SetPatchMarker instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPatchMarker instance - */ - public static create(properties?: coresdk.workflow_commands.ISetPatchMarker): coresdk.workflow_commands.SetPatchMarker; - - /** - * Encodes the specified SetPatchMarker message. Does not implicitly {@link coresdk.workflow_commands.SetPatchMarker.verify|verify} messages. - * @param message SetPatchMarker message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.ISetPatchMarker, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetPatchMarker message, length delimited. Does not implicitly {@link coresdk.workflow_commands.SetPatchMarker.verify|verify} messages. - * @param message SetPatchMarker message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.ISetPatchMarker, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetPatchMarker message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPatchMarker - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.SetPatchMarker; - - /** - * Decodes a SetPatchMarker message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPatchMarker - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.SetPatchMarker; - - /** - * Creates a SetPatchMarker message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPatchMarker - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.SetPatchMarker; - - /** - * Creates a plain object from a SetPatchMarker message. Also converts values to other types if specified. - * @param message SetPatchMarker - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.SetPatchMarker, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetPatchMarker to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPatchMarker - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartChildWorkflowExecution. */ - interface IStartChildWorkflowExecution { - - /** Lang's incremental sequence number, used as the operation identifier */ - seq?: (number|null); - - /** StartChildWorkflowExecution namespace */ - namespace?: (string|null); - - /** StartChildWorkflowExecution workflowId */ - workflowId?: (string|null); - - /** StartChildWorkflowExecution workflowType */ - workflowType?: (string|null); - - /** StartChildWorkflowExecution taskQueue */ - taskQueue?: (string|null); - - /** StartChildWorkflowExecution input */ - input?: (temporal.api.common.v1.IPayload[]|null); - - /** Total workflow execution timeout including retries and continue as new. */ - workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run. */ - workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** Default: PARENT_CLOSE_POLICY_TERMINATE. */ - parentClosePolicy?: (coresdk.child_workflow.ParentClosePolicy|null); - - /** - * string control = 11; (unused from StartChildWorkflowExecutionCommandAttributes) - * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. - */ - workflowIdReusePolicy?: (temporal.api.enums.v1.WorkflowIdReusePolicy|null); - - /** StartChildWorkflowExecution retryPolicy */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** StartChildWorkflowExecution cronSchedule */ - cronSchedule?: (string|null); - - /** Header fields */ - headers?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - - /** Memo fields */ - memo?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - - /** Search attributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** Defines behaviour of the underlying workflow when child workflow cancellation has been requested. */ - cancellationType?: (coresdk.child_workflow.ChildWorkflowCancellationType|null); - - /** Whether this child should run on a worker with a compatible build id or not. */ - versioningIntent?: (coresdk.common.VersioningIntent|null); - - /** The Priority to use for this activity */ - priority?: (temporal.api.common.v1.IPriority|null); - } - - /** Start a child workflow execution */ - class StartChildWorkflowExecution implements IStartChildWorkflowExecution { - - /** - * Constructs a new StartChildWorkflowExecution. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IStartChildWorkflowExecution); - - /** Lang's incremental sequence number, used as the operation identifier */ - public seq: number; - - /** StartChildWorkflowExecution namespace. */ - public namespace: string; - - /** StartChildWorkflowExecution workflowId. */ - public workflowId: string; - - /** StartChildWorkflowExecution workflowType. */ - public workflowType: string; - - /** StartChildWorkflowExecution taskQueue. */ - public taskQueue: string; - - /** StartChildWorkflowExecution input. */ - public input: temporal.api.common.v1.IPayload[]; - - /** Total workflow execution timeout including retries and continue as new. */ - public workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run. */ - public workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - public workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** Default: PARENT_CLOSE_POLICY_TERMINATE. */ - public parentClosePolicy: coresdk.child_workflow.ParentClosePolicy; - - /** - * string control = 11; (unused from StartChildWorkflowExecutionCommandAttributes) - * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. - */ - public workflowIdReusePolicy: temporal.api.enums.v1.WorkflowIdReusePolicy; - - /** StartChildWorkflowExecution retryPolicy. */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** StartChildWorkflowExecution cronSchedule. */ - public cronSchedule: string; - - /** Header fields */ - public headers: { [k: string]: temporal.api.common.v1.IPayload }; - - /** Memo fields */ - public memo: { [k: string]: temporal.api.common.v1.IPayload }; - - /** Search attributes */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** Defines behaviour of the underlying workflow when child workflow cancellation has been requested. */ - public cancellationType: coresdk.child_workflow.ChildWorkflowCancellationType; - - /** Whether this child should run on a worker with a compatible build id or not. */ - public versioningIntent: coresdk.common.VersioningIntent; - - /** The Priority to use for this activity */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Creates a new StartChildWorkflowExecution instance using the specified properties. - * @param [properties] Properties to set - * @returns StartChildWorkflowExecution instance - */ - public static create(properties?: coresdk.workflow_commands.IStartChildWorkflowExecution): coresdk.workflow_commands.StartChildWorkflowExecution; - - /** - * Encodes the specified StartChildWorkflowExecution message. Does not implicitly {@link coresdk.workflow_commands.StartChildWorkflowExecution.verify|verify} messages. - * @param message StartChildWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IStartChildWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartChildWorkflowExecution message, length delimited. Does not implicitly {@link coresdk.workflow_commands.StartChildWorkflowExecution.verify|verify} messages. - * @param message StartChildWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IStartChildWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartChildWorkflowExecution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartChildWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.StartChildWorkflowExecution; - - /** - * Decodes a StartChildWorkflowExecution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartChildWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.StartChildWorkflowExecution; - - /** - * Creates a StartChildWorkflowExecution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartChildWorkflowExecution - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.StartChildWorkflowExecution; - - /** - * Creates a plain object from a StartChildWorkflowExecution message. Also converts values to other types if specified. - * @param message StartChildWorkflowExecution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.StartChildWorkflowExecution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartChildWorkflowExecution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartChildWorkflowExecution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelChildWorkflowExecution. */ - interface ICancelChildWorkflowExecution { - - /** Sequence number as given to the `StartChildWorkflowExecution` command */ - childWorkflowSeq?: (number|null); - - /** A reason for the cancellation */ - reason?: (string|null); - } - - /** Cancel a child workflow */ - class CancelChildWorkflowExecution implements ICancelChildWorkflowExecution { - - /** - * Constructs a new CancelChildWorkflowExecution. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.ICancelChildWorkflowExecution); - - /** Sequence number as given to the `StartChildWorkflowExecution` command */ - public childWorkflowSeq: number; - - /** A reason for the cancellation */ - public reason: string; - - /** - * Creates a new CancelChildWorkflowExecution instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelChildWorkflowExecution instance - */ - public static create(properties?: coresdk.workflow_commands.ICancelChildWorkflowExecution): coresdk.workflow_commands.CancelChildWorkflowExecution; - - /** - * Encodes the specified CancelChildWorkflowExecution message. Does not implicitly {@link coresdk.workflow_commands.CancelChildWorkflowExecution.verify|verify} messages. - * @param message CancelChildWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.ICancelChildWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelChildWorkflowExecution message, length delimited. Does not implicitly {@link coresdk.workflow_commands.CancelChildWorkflowExecution.verify|verify} messages. - * @param message CancelChildWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.ICancelChildWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelChildWorkflowExecution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelChildWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.CancelChildWorkflowExecution; - - /** - * Decodes a CancelChildWorkflowExecution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelChildWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.CancelChildWorkflowExecution; - - /** - * Creates a CancelChildWorkflowExecution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelChildWorkflowExecution - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.CancelChildWorkflowExecution; - - /** - * Creates a plain object from a CancelChildWorkflowExecution message. Also converts values to other types if specified. - * @param message CancelChildWorkflowExecution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.CancelChildWorkflowExecution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelChildWorkflowExecution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelChildWorkflowExecution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RequestCancelExternalWorkflowExecution. */ - interface IRequestCancelExternalWorkflowExecution { - - /** Lang's incremental sequence number, used as the operation identifier */ - seq?: (number|null); - - /** The workflow instance being targeted */ - workflowExecution?: (coresdk.common.INamespacedWorkflowExecution|null); - - /** A reason for the cancellation */ - reason?: (string|null); - } - - /** - * Request cancellation of an external workflow execution. For cancellation of a child workflow, - * prefer `CancelChildWorkflowExecution` instead, as it guards against cancel-before-start issues. - */ - class RequestCancelExternalWorkflowExecution implements IRequestCancelExternalWorkflowExecution { - - /** - * Constructs a new RequestCancelExternalWorkflowExecution. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IRequestCancelExternalWorkflowExecution); - - /** Lang's incremental sequence number, used as the operation identifier */ - public seq: number; - - /** The workflow instance being targeted */ - public workflowExecution?: (coresdk.common.INamespacedWorkflowExecution|null); - - /** A reason for the cancellation */ - public reason: string; - - /** - * Creates a new RequestCancelExternalWorkflowExecution instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestCancelExternalWorkflowExecution instance - */ - public static create(properties?: coresdk.workflow_commands.IRequestCancelExternalWorkflowExecution): coresdk.workflow_commands.RequestCancelExternalWorkflowExecution; - - /** - * Encodes the specified RequestCancelExternalWorkflowExecution message. Does not implicitly {@link coresdk.workflow_commands.RequestCancelExternalWorkflowExecution.verify|verify} messages. - * @param message RequestCancelExternalWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IRequestCancelExternalWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCancelExternalWorkflowExecution message, length delimited. Does not implicitly {@link coresdk.workflow_commands.RequestCancelExternalWorkflowExecution.verify|verify} messages. - * @param message RequestCancelExternalWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IRequestCancelExternalWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestCancelExternalWorkflowExecution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestCancelExternalWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.RequestCancelExternalWorkflowExecution; - - /** - * Decodes a RequestCancelExternalWorkflowExecution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestCancelExternalWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.RequestCancelExternalWorkflowExecution; - - /** - * Creates a RequestCancelExternalWorkflowExecution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCancelExternalWorkflowExecution - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.RequestCancelExternalWorkflowExecution; - - /** - * Creates a plain object from a RequestCancelExternalWorkflowExecution message. Also converts values to other types if specified. - * @param message RequestCancelExternalWorkflowExecution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.RequestCancelExternalWorkflowExecution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCancelExternalWorkflowExecution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestCancelExternalWorkflowExecution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SignalExternalWorkflowExecution. */ - interface ISignalExternalWorkflowExecution { - - /** Lang's incremental sequence number, used as the operation identifier */ - seq?: (number|null); - - /** A specific workflow instance */ - workflowExecution?: (coresdk.common.INamespacedWorkflowExecution|null); - - /** The desired target must be a child of the issuing workflow, and this is its workflow id */ - childWorkflowId?: (string|null); - - /** Name of the signal handler */ - signalName?: (string|null); - - /** Arguments for the handler */ - args?: (temporal.api.common.v1.IPayload[]|null); - - /** Headers to attach to the signal */ - headers?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - } - - /** Send a signal to an external or child workflow */ - class SignalExternalWorkflowExecution implements ISignalExternalWorkflowExecution { - - /** - * Constructs a new SignalExternalWorkflowExecution. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.ISignalExternalWorkflowExecution); - - /** Lang's incremental sequence number, used as the operation identifier */ - public seq: number; - - /** A specific workflow instance */ - public workflowExecution?: (coresdk.common.INamespacedWorkflowExecution|null); - - /** The desired target must be a child of the issuing workflow, and this is its workflow id */ - public childWorkflowId?: (string|null); - - /** Name of the signal handler */ - public signalName: string; - - /** Arguments for the handler */ - public args: temporal.api.common.v1.IPayload[]; - - /** Headers to attach to the signal */ - public headers: { [k: string]: temporal.api.common.v1.IPayload }; - - /** What workflow is being targeted */ - public target?: ("workflowExecution"|"childWorkflowId"); - - /** - * Creates a new SignalExternalWorkflowExecution instance using the specified properties. - * @param [properties] Properties to set - * @returns SignalExternalWorkflowExecution instance - */ - public static create(properties?: coresdk.workflow_commands.ISignalExternalWorkflowExecution): coresdk.workflow_commands.SignalExternalWorkflowExecution; - - /** - * Encodes the specified SignalExternalWorkflowExecution message. Does not implicitly {@link coresdk.workflow_commands.SignalExternalWorkflowExecution.verify|verify} messages. - * @param message SignalExternalWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.ISignalExternalWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignalExternalWorkflowExecution message, length delimited. Does not implicitly {@link coresdk.workflow_commands.SignalExternalWorkflowExecution.verify|verify} messages. - * @param message SignalExternalWorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.ISignalExternalWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignalExternalWorkflowExecution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignalExternalWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.SignalExternalWorkflowExecution; - - /** - * Decodes a SignalExternalWorkflowExecution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignalExternalWorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.SignalExternalWorkflowExecution; - - /** - * Creates a SignalExternalWorkflowExecution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignalExternalWorkflowExecution - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.SignalExternalWorkflowExecution; - - /** - * Creates a plain object from a SignalExternalWorkflowExecution message. Also converts values to other types if specified. - * @param message SignalExternalWorkflowExecution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.SignalExternalWorkflowExecution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignalExternalWorkflowExecution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SignalExternalWorkflowExecution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelSignalWorkflow. */ - interface ICancelSignalWorkflow { - - /** Lang's incremental sequence number as passed to `SignalExternalWorkflowExecution` */ - seq?: (number|null); - } - - /** Can be used to cancel not-already-sent `SignalExternalWorkflowExecution` commands */ - class CancelSignalWorkflow implements ICancelSignalWorkflow { - - /** - * Constructs a new CancelSignalWorkflow. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.ICancelSignalWorkflow); - - /** Lang's incremental sequence number as passed to `SignalExternalWorkflowExecution` */ - public seq: number; - - /** - * Creates a new CancelSignalWorkflow instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelSignalWorkflow instance - */ - public static create(properties?: coresdk.workflow_commands.ICancelSignalWorkflow): coresdk.workflow_commands.CancelSignalWorkflow; - - /** - * Encodes the specified CancelSignalWorkflow message. Does not implicitly {@link coresdk.workflow_commands.CancelSignalWorkflow.verify|verify} messages. - * @param message CancelSignalWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.ICancelSignalWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelSignalWorkflow message, length delimited. Does not implicitly {@link coresdk.workflow_commands.CancelSignalWorkflow.verify|verify} messages. - * @param message CancelSignalWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.ICancelSignalWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelSignalWorkflow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelSignalWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.CancelSignalWorkflow; - - /** - * Decodes a CancelSignalWorkflow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelSignalWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.CancelSignalWorkflow; - - /** - * Creates a CancelSignalWorkflow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelSignalWorkflow - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.CancelSignalWorkflow; - - /** - * Creates a plain object from a CancelSignalWorkflow message. Also converts values to other types if specified. - * @param message CancelSignalWorkflow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.CancelSignalWorkflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelSignalWorkflow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelSignalWorkflow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpsertWorkflowSearchAttributes. */ - interface IUpsertWorkflowSearchAttributes { - - /** - * SearchAttributes to upsert. The indexed_fields map will be merged with existing search - * attributes, with these values taking precedence. - */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - } - - /** Represents an UpsertWorkflowSearchAttributes. */ - class UpsertWorkflowSearchAttributes implements IUpsertWorkflowSearchAttributes { - - /** - * Constructs a new UpsertWorkflowSearchAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IUpsertWorkflowSearchAttributes); - - /** - * SearchAttributes to upsert. The indexed_fields map will be merged with existing search - * attributes, with these values taking precedence. - */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * Creates a new UpsertWorkflowSearchAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns UpsertWorkflowSearchAttributes instance - */ - public static create(properties?: coresdk.workflow_commands.IUpsertWorkflowSearchAttributes): coresdk.workflow_commands.UpsertWorkflowSearchAttributes; - - /** - * Encodes the specified UpsertWorkflowSearchAttributes message. Does not implicitly {@link coresdk.workflow_commands.UpsertWorkflowSearchAttributes.verify|verify} messages. - * @param message UpsertWorkflowSearchAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IUpsertWorkflowSearchAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpsertWorkflowSearchAttributes message, length delimited. Does not implicitly {@link coresdk.workflow_commands.UpsertWorkflowSearchAttributes.verify|verify} messages. - * @param message UpsertWorkflowSearchAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IUpsertWorkflowSearchAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpsertWorkflowSearchAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpsertWorkflowSearchAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.UpsertWorkflowSearchAttributes; - - /** - * Decodes an UpsertWorkflowSearchAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpsertWorkflowSearchAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.UpsertWorkflowSearchAttributes; - - /** - * Creates an UpsertWorkflowSearchAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpsertWorkflowSearchAttributes - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.UpsertWorkflowSearchAttributes; - - /** - * Creates a plain object from an UpsertWorkflowSearchAttributes message. Also converts values to other types if specified. - * @param message UpsertWorkflowSearchAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.UpsertWorkflowSearchAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpsertWorkflowSearchAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpsertWorkflowSearchAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ModifyWorkflowProperties. */ - interface IModifyWorkflowProperties { - - /** - * If set, update the workflow memo with the provided values. The values will be merged with - * the existing memo. If the user wants to delete values, a default/empty Payload should be - * used as the value for the key being deleted. - */ - upsertedMemo?: (temporal.api.common.v1.IMemo|null); - } - - /** Represents a ModifyWorkflowProperties. */ - class ModifyWorkflowProperties implements IModifyWorkflowProperties { - - /** - * Constructs a new ModifyWorkflowProperties. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IModifyWorkflowProperties); - - /** - * If set, update the workflow memo with the provided values. The values will be merged with - * the existing memo. If the user wants to delete values, a default/empty Payload should be - * used as the value for the key being deleted. - */ - public upsertedMemo?: (temporal.api.common.v1.IMemo|null); - - /** - * Creates a new ModifyWorkflowProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns ModifyWorkflowProperties instance - */ - public static create(properties?: coresdk.workflow_commands.IModifyWorkflowProperties): coresdk.workflow_commands.ModifyWorkflowProperties; - - /** - * Encodes the specified ModifyWorkflowProperties message. Does not implicitly {@link coresdk.workflow_commands.ModifyWorkflowProperties.verify|verify} messages. - * @param message ModifyWorkflowProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IModifyWorkflowProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModifyWorkflowProperties message, length delimited. Does not implicitly {@link coresdk.workflow_commands.ModifyWorkflowProperties.verify|verify} messages. - * @param message ModifyWorkflowProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IModifyWorkflowProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModifyWorkflowProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ModifyWorkflowProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.ModifyWorkflowProperties; - - /** - * Decodes a ModifyWorkflowProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModifyWorkflowProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.ModifyWorkflowProperties; - - /** - * Creates a ModifyWorkflowProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModifyWorkflowProperties - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.ModifyWorkflowProperties; - - /** - * Creates a plain object from a ModifyWorkflowProperties message. Also converts values to other types if specified. - * @param message ModifyWorkflowProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.ModifyWorkflowProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModifyWorkflowProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ModifyWorkflowProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateResponse. */ - interface IUpdateResponse { - - /** The protocol message instance ID */ - protocolInstanceId?: (string|null); - - /** - * Must be sent if the update's validator has passed (or lang was not asked to run it, and - * thus should be considered already-accepted, allowing lang to always send the same - * sequence on replay). - */ - accepted?: (google.protobuf.IEmpty|null); - - /** - * Must be sent if the update's validator does not pass, or after acceptance if the update - * handler fails. - */ - rejected?: (temporal.api.failure.v1.IFailure|null); - - /** Must be sent once the update handler completes successfully. */ - completed?: (temporal.api.common.v1.IPayload|null); - } - - /** - * A reply to a `DoUpdate` job - lang must run the update's validator if told to, and then - * immediately run the handler, if the update was accepted. - * - * There must always be an accepted or rejected response immediately, in the same activation as - * this job, to indicate the result of the validator. Accepted for ran and accepted or skipped, or - * rejected for rejected. - * - * Then, in the same or any subsequent activation, after the update handler has completed, respond - * with completed or rejected as appropriate for the result of the handler. - */ - class UpdateResponse implements IUpdateResponse { - - /** - * Constructs a new UpdateResponse. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IUpdateResponse); - - /** The protocol message instance ID */ - public protocolInstanceId: string; - - /** - * Must be sent if the update's validator has passed (or lang was not asked to run it, and - * thus should be considered already-accepted, allowing lang to always send the same - * sequence on replay). - */ - public accepted?: (google.protobuf.IEmpty|null); - - /** - * Must be sent if the update's validator does not pass, or after acceptance if the update - * handler fails. - */ - public rejected?: (temporal.api.failure.v1.IFailure|null); - - /** Must be sent once the update handler completes successfully. */ - public completed?: (temporal.api.common.v1.IPayload|null); - - /** UpdateResponse response. */ - public response?: ("accepted"|"rejected"|"completed"); - - /** - * Creates a new UpdateResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateResponse instance - */ - public static create(properties?: coresdk.workflow_commands.IUpdateResponse): coresdk.workflow_commands.UpdateResponse; - - /** - * Encodes the specified UpdateResponse message. Does not implicitly {@link coresdk.workflow_commands.UpdateResponse.verify|verify} messages. - * @param message UpdateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IUpdateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateResponse message, length delimited. Does not implicitly {@link coresdk.workflow_commands.UpdateResponse.verify|verify} messages. - * @param message UpdateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IUpdateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.UpdateResponse; - - /** - * Decodes an UpdateResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.UpdateResponse; - - /** - * Creates an UpdateResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateResponse - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.UpdateResponse; - - /** - * Creates a plain object from an UpdateResponse message. Also converts values to other types if specified. - * @param message UpdateResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.UpdateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScheduleNexusOperation. */ - interface IScheduleNexusOperation { - - /** Lang's incremental sequence number, used as the operation identifier */ - seq?: (number|null); - - /** Endpoint name, must exist in the endpoint registry or this command will fail. */ - endpoint?: (string|null); - - /** Service name. */ - service?: (string|null); - - /** Operation name. */ - operation?: (string|null); - - /** - * Input for the operation. The server converts this into Nexus request content and the - * appropriate content headers internally when sending the StartOperation request. On the - * handler side, if it is also backed by Temporal, the content is transformed back to the - * original Payload sent in this command. - */ - input?: (temporal.api.common.v1.IPayload|null); - - /** - * Schedule-to-close timeout for this operation. - * Indicates how long the caller is willing to wait for operation completion. - * Calls are retried internally by the server. - */ - scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Header to attach to the Nexus request. - * Users are responsible for encrypting sensitive data in this header as it is stored in - * workflow history and transmitted to external services as-is. This is useful for propagating - * tracing information. Note these headers are not the same as Temporal headers on internal - * activities and child workflows, these are transmitted to Nexus operations that may be - * external and are not traditional payloads. - */ - nexusHeader?: ({ [k: string]: string }|null); - - /** Defines behaviour of the underlying nexus operation when operation cancellation has been requested. */ - cancellationType?: (coresdk.nexus.NexusOperationCancellationType|null); - - /** - * Schedule-to-start timeout for this operation. - * Indicates how long the caller is willing to wait for the operation to be started (or completed if synchronous) - * by the handler. If the operation is not started within this timeout, it will fail with - * TIMEOUT_TYPE_SCHEDULE_TO_START. - * If not set or zero, no schedule-to-start timeout is enforced. - */ - scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Start-to-close timeout for this operation. - * Indicates how long the caller is willing to wait for an asynchronous operation to complete after it has been - * started. If the operation does not complete within this timeout after starting, it will fail with - * TIMEOUT_TYPE_START_TO_CLOSE. - * Only applies to asynchronous operations. Synchronous operations ignore this timeout. - * If not set or zero, no start-to-close timeout is enforced. - */ - startToCloseTimeout?: (google.protobuf.IDuration|null); - } - - /** A request to begin a Nexus operation */ - class ScheduleNexusOperation implements IScheduleNexusOperation { - - /** - * Constructs a new ScheduleNexusOperation. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IScheduleNexusOperation); - - /** Lang's incremental sequence number, used as the operation identifier */ - public seq: number; - - /** Endpoint name, must exist in the endpoint registry or this command will fail. */ - public endpoint: string; - - /** Service name. */ - public service: string; - - /** Operation name. */ - public operation: string; - - /** - * Input for the operation. The server converts this into Nexus request content and the - * appropriate content headers internally when sending the StartOperation request. On the - * handler side, if it is also backed by Temporal, the content is transformed back to the - * original Payload sent in this command. - */ - public input?: (temporal.api.common.v1.IPayload|null); - - /** - * Schedule-to-close timeout for this operation. - * Indicates how long the caller is willing to wait for operation completion. - * Calls are retried internally by the server. - */ - public scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Header to attach to the Nexus request. - * Users are responsible for encrypting sensitive data in this header as it is stored in - * workflow history and transmitted to external services as-is. This is useful for propagating - * tracing information. Note these headers are not the same as Temporal headers on internal - * activities and child workflows, these are transmitted to Nexus operations that may be - * external and are not traditional payloads. - */ - public nexusHeader: { [k: string]: string }; - - /** Defines behaviour of the underlying nexus operation when operation cancellation has been requested. */ - public cancellationType: coresdk.nexus.NexusOperationCancellationType; - - /** - * Schedule-to-start timeout for this operation. - * Indicates how long the caller is willing to wait for the operation to be started (or completed if synchronous) - * by the handler. If the operation is not started within this timeout, it will fail with - * TIMEOUT_TYPE_SCHEDULE_TO_START. - * If not set or zero, no schedule-to-start timeout is enforced. - */ - public scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Start-to-close timeout for this operation. - * Indicates how long the caller is willing to wait for an asynchronous operation to complete after it has been - * started. If the operation does not complete within this timeout after starting, it will fail with - * TIMEOUT_TYPE_START_TO_CLOSE. - * Only applies to asynchronous operations. Synchronous operations ignore this timeout. - * If not set or zero, no start-to-close timeout is enforced. - */ - public startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new ScheduleNexusOperation instance using the specified properties. - * @param [properties] Properties to set - * @returns ScheduleNexusOperation instance - */ - public static create(properties?: coresdk.workflow_commands.IScheduleNexusOperation): coresdk.workflow_commands.ScheduleNexusOperation; - - /** - * Encodes the specified ScheduleNexusOperation message. Does not implicitly {@link coresdk.workflow_commands.ScheduleNexusOperation.verify|verify} messages. - * @param message ScheduleNexusOperation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IScheduleNexusOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduleNexusOperation message, length delimited. Does not implicitly {@link coresdk.workflow_commands.ScheduleNexusOperation.verify|verify} messages. - * @param message ScheduleNexusOperation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IScheduleNexusOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduleNexusOperation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduleNexusOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.ScheduleNexusOperation; - - /** - * Decodes a ScheduleNexusOperation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduleNexusOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.ScheduleNexusOperation; - - /** - * Creates a ScheduleNexusOperation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduleNexusOperation - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.ScheduleNexusOperation; - - /** - * Creates a plain object from a ScheduleNexusOperation message. Also converts values to other types if specified. - * @param message ScheduleNexusOperation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.ScheduleNexusOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduleNexusOperation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScheduleNexusOperation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RequestCancelNexusOperation. */ - interface IRequestCancelNexusOperation { - - /** Lang's incremental sequence number as passed to `ScheduleNexusOperation` */ - seq?: (number|null); - } - - /** Request cancellation of a nexus operation started via `ScheduleNexusOperation` */ - class RequestCancelNexusOperation implements IRequestCancelNexusOperation { - - /** - * Constructs a new RequestCancelNexusOperation. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_commands.IRequestCancelNexusOperation); - - /** Lang's incremental sequence number as passed to `ScheduleNexusOperation` */ - public seq: number; - - /** - * Creates a new RequestCancelNexusOperation instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestCancelNexusOperation instance - */ - public static create(properties?: coresdk.workflow_commands.IRequestCancelNexusOperation): coresdk.workflow_commands.RequestCancelNexusOperation; - - /** - * Encodes the specified RequestCancelNexusOperation message. Does not implicitly {@link coresdk.workflow_commands.RequestCancelNexusOperation.verify|verify} messages. - * @param message RequestCancelNexusOperation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_commands.IRequestCancelNexusOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCancelNexusOperation message, length delimited. Does not implicitly {@link coresdk.workflow_commands.RequestCancelNexusOperation.verify|verify} messages. - * @param message RequestCancelNexusOperation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_commands.IRequestCancelNexusOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestCancelNexusOperation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestCancelNexusOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_commands.RequestCancelNexusOperation; - - /** - * Decodes a RequestCancelNexusOperation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestCancelNexusOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_commands.RequestCancelNexusOperation; - - /** - * Creates a RequestCancelNexusOperation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCancelNexusOperation - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_commands.RequestCancelNexusOperation; - - /** - * Creates a plain object from a RequestCancelNexusOperation message. Also converts values to other types if specified. - * @param message RequestCancelNexusOperation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_commands.RequestCancelNexusOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCancelNexusOperation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestCancelNexusOperation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace workflow_completion. */ - namespace workflow_completion { - - /** Properties of a WorkflowActivationCompletion. */ - interface IWorkflowActivationCompletion { - - /** The run id from the workflow activation you are completing */ - runId?: (string|null); - - /** WorkflowActivationCompletion successful */ - successful?: (coresdk.workflow_completion.ISuccess|null); - - /** WorkflowActivationCompletion failed */ - failed?: (coresdk.workflow_completion.IFailure|null); - } - - /** Result of a single workflow activation, reported from lang to core */ - class WorkflowActivationCompletion implements IWorkflowActivationCompletion { - - /** - * Constructs a new WorkflowActivationCompletion. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_completion.IWorkflowActivationCompletion); - - /** The run id from the workflow activation you are completing */ - public runId: string; - - /** WorkflowActivationCompletion successful. */ - public successful?: (coresdk.workflow_completion.ISuccess|null); - - /** WorkflowActivationCompletion failed. */ - public failed?: (coresdk.workflow_completion.IFailure|null); - - /** WorkflowActivationCompletion status. */ - public status?: ("successful"|"failed"); - - /** - * Creates a new WorkflowActivationCompletion instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowActivationCompletion instance - */ - public static create(properties?: coresdk.workflow_completion.IWorkflowActivationCompletion): coresdk.workflow_completion.WorkflowActivationCompletion; - - /** - * Encodes the specified WorkflowActivationCompletion message. Does not implicitly {@link coresdk.workflow_completion.WorkflowActivationCompletion.verify|verify} messages. - * @param message WorkflowActivationCompletion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_completion.IWorkflowActivationCompletion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowActivationCompletion message, length delimited. Does not implicitly {@link coresdk.workflow_completion.WorkflowActivationCompletion.verify|verify} messages. - * @param message WorkflowActivationCompletion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_completion.IWorkflowActivationCompletion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowActivationCompletion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowActivationCompletion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_completion.WorkflowActivationCompletion; - - /** - * Decodes a WorkflowActivationCompletion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowActivationCompletion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_completion.WorkflowActivationCompletion; - - /** - * Creates a WorkflowActivationCompletion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowActivationCompletion - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_completion.WorkflowActivationCompletion; - - /** - * Creates a plain object from a WorkflowActivationCompletion message. Also converts values to other types if specified. - * @param message WorkflowActivationCompletion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_completion.WorkflowActivationCompletion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowActivationCompletion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowActivationCompletion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Success. */ - interface ISuccess { - - /** A list of commands to send back to the temporal server */ - commands?: (coresdk.workflow_commands.IWorkflowCommand[]|null); - - /** Any internal flags which the lang SDK used in the processing of this activation */ - usedInternalFlags?: (number[]|null); - - /** The versioning behavior this workflow is currently using */ - versioningBehavior?: (temporal.api.enums.v1.VersioningBehavior|null); - } - - /** Successful workflow activation with a list of commands generated by the workflow execution */ - class Success implements ISuccess { - - /** - * Constructs a new Success. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_completion.ISuccess); - - /** A list of commands to send back to the temporal server */ - public commands: coresdk.workflow_commands.IWorkflowCommand[]; - - /** Any internal flags which the lang SDK used in the processing of this activation */ - public usedInternalFlags: number[]; - - /** The versioning behavior this workflow is currently using */ - public versioningBehavior: temporal.api.enums.v1.VersioningBehavior; - - /** - * Creates a new Success instance using the specified properties. - * @param [properties] Properties to set - * @returns Success instance - */ - public static create(properties?: coresdk.workflow_completion.ISuccess): coresdk.workflow_completion.Success; - - /** - * Encodes the specified Success message. Does not implicitly {@link coresdk.workflow_completion.Success.verify|verify} messages. - * @param message Success message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_completion.ISuccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Success message, length delimited. Does not implicitly {@link coresdk.workflow_completion.Success.verify|verify} messages. - * @param message Success message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_completion.ISuccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Success message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Success - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_completion.Success; - - /** - * Decodes a Success message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Success - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_completion.Success; - - /** - * Creates a Success message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Success - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_completion.Success; - - /** - * Creates a plain object from a Success message. Also converts values to other types if specified. - * @param message Success - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_completion.Success, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Success to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Success - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Failure. */ - interface IFailure { - - /** Failure failure */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** Forces overriding the WFT failure cause */ - forceCause?: (temporal.api.enums.v1.WorkflowTaskFailedCause|null); - } - - /** Failure to activate or execute a workflow */ - class Failure implements IFailure { - - /** - * Constructs a new Failure. - * @param [properties] Properties to set - */ - constructor(properties?: coresdk.workflow_completion.IFailure); - - /** Failure failure. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** Forces overriding the WFT failure cause */ - public forceCause: temporal.api.enums.v1.WorkflowTaskFailedCause; - - /** - * Creates a new Failure instance using the specified properties. - * @param [properties] Properties to set - * @returns Failure instance - */ - public static create(properties?: coresdk.workflow_completion.IFailure): coresdk.workflow_completion.Failure; - - /** - * Encodes the specified Failure message. Does not implicitly {@link coresdk.workflow_completion.Failure.verify|verify} messages. - * @param message Failure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: coresdk.workflow_completion.IFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Failure message, length delimited. Does not implicitly {@link coresdk.workflow_completion.Failure.verify|verify} messages. - * @param message Failure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: coresdk.workflow_completion.IFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Failure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_completion.Failure; - - /** - * Decodes a Failure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_completion.Failure; - - /** - * Creates a Failure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Failure - */ - public static fromObject(object: { [k: string]: any }): coresdk.workflow_completion.Failure; - - /** - * Creates a plain object from a Failure message. Also converts values to other types if specified. - * @param message Failure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: coresdk.workflow_completion.Failure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Failure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Failure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} - -/** Namespace temporal. */ -export namespace temporal { - - /** Namespace api. */ - namespace api { - - /** Namespace common. */ - namespace common { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a DataBlob. */ - interface IDataBlob { - - /** DataBlob encodingType */ - encodingType?: (temporal.api.enums.v1.EncodingType|null); - - /** DataBlob data */ - data?: (Uint8Array|null); - } - - /** Represents a DataBlob. */ - class DataBlob implements IDataBlob { - - /** - * Constructs a new DataBlob. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IDataBlob); - - /** DataBlob encodingType. */ - public encodingType: temporal.api.enums.v1.EncodingType; - - /** DataBlob data. */ - public data: Uint8Array; - - /** - * Creates a new DataBlob instance using the specified properties. - * @param [properties] Properties to set - * @returns DataBlob instance - */ - public static create(properties?: temporal.api.common.v1.IDataBlob): temporal.api.common.v1.DataBlob; - - /** - * Encodes the specified DataBlob message. Does not implicitly {@link temporal.api.common.v1.DataBlob.verify|verify} messages. - * @param message DataBlob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IDataBlob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataBlob message, length delimited. Does not implicitly {@link temporal.api.common.v1.DataBlob.verify|verify} messages. - * @param message DataBlob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IDataBlob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataBlob message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataBlob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.DataBlob; - - /** - * Decodes a DataBlob message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataBlob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.DataBlob; - - /** - * Creates a DataBlob message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataBlob - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.DataBlob; - - /** - * Creates a plain object from a DataBlob message. Also converts values to other types if specified. - * @param message DataBlob - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.DataBlob, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataBlob to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataBlob - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Payloads. */ - interface IPayloads { - - /** Payloads payloads */ - payloads?: (temporal.api.common.v1.IPayload[]|null); - } - - /** See `Payload` */ - class Payloads implements IPayloads { - - /** - * Constructs a new Payloads. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IPayloads); - - /** Payloads payloads. */ - public payloads: temporal.api.common.v1.IPayload[]; - - /** - * Creates a new Payloads instance using the specified properties. - * @param [properties] Properties to set - * @returns Payloads instance - */ - public static create(properties?: temporal.api.common.v1.IPayloads): temporal.api.common.v1.Payloads; - - /** - * Encodes the specified Payloads message. Does not implicitly {@link temporal.api.common.v1.Payloads.verify|verify} messages. - * @param message Payloads message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IPayloads, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Payloads message, length delimited. Does not implicitly {@link temporal.api.common.v1.Payloads.verify|verify} messages. - * @param message Payloads message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IPayloads, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Payloads message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Payloads - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.Payloads; - - /** - * Decodes a Payloads message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Payloads - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.Payloads; - - /** - * Creates a Payloads message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Payloads - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.Payloads; - - /** - * Creates a plain object from a Payloads message. Also converts values to other types if specified. - * @param message Payloads - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.Payloads, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Payloads to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Payloads - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Payload. */ - interface IPayload { - - /** Payload metadata */ - metadata?: ({ [k: string]: Uint8Array }|null); - - /** Payload data */ - data?: (Uint8Array|null); - - /** Details about externally stored payloads associated with this payload. */ - externalPayloads?: (temporal.api.common.v1.Payload.IExternalPayloadDetails[]|null); - } - - /** - * Represents some binary (byte array) data (ex: activity input parameters or workflow result) with - * metadata which describes this binary data (format, encoding, encryption, etc). Serialization - * of the data may be user-defined. - */ - class Payload implements IPayload { - - /** - * Constructs a new Payload. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IPayload); - - /** Payload metadata. */ - public metadata: { [k: string]: Uint8Array }; - - /** Payload data. */ - public data: Uint8Array; - - /** Details about externally stored payloads associated with this payload. */ - public externalPayloads: temporal.api.common.v1.Payload.IExternalPayloadDetails[]; - - /** - * Creates a new Payload instance using the specified properties. - * @param [properties] Properties to set - * @returns Payload instance - */ - public static create(properties?: temporal.api.common.v1.IPayload): temporal.api.common.v1.Payload; - - /** - * Encodes the specified Payload message. Does not implicitly {@link temporal.api.common.v1.Payload.verify|verify} messages. - * @param message Payload message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IPayload, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Payload message, length delimited. Does not implicitly {@link temporal.api.common.v1.Payload.verify|verify} messages. - * @param message Payload message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IPayload, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Payload message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Payload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.Payload; - - /** - * Decodes a Payload message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Payload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.Payload; - - /** - * Creates a Payload message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Payload - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.Payload; - - /** - * Creates a plain object from a Payload message. Also converts values to other types if specified. - * @param message Payload - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.Payload, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Payload to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Payload - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Payload { - - /** Properties of an ExternalPayloadDetails. */ - interface IExternalPayloadDetails { - - /** Size in bytes of the externally stored payload */ - sizeBytes?: (Long|null); - } - - /** Describes an externally stored object referenced by this payload. */ - class ExternalPayloadDetails implements IExternalPayloadDetails { - - /** - * Constructs a new ExternalPayloadDetails. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.Payload.IExternalPayloadDetails); - - /** Size in bytes of the externally stored payload */ - public sizeBytes: Long; - - /** - * Creates a new ExternalPayloadDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ExternalPayloadDetails instance - */ - public static create(properties?: temporal.api.common.v1.Payload.IExternalPayloadDetails): temporal.api.common.v1.Payload.ExternalPayloadDetails; - - /** - * Encodes the specified ExternalPayloadDetails message. Does not implicitly {@link temporal.api.common.v1.Payload.ExternalPayloadDetails.verify|verify} messages. - * @param message ExternalPayloadDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.Payload.IExternalPayloadDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExternalPayloadDetails message, length delimited. Does not implicitly {@link temporal.api.common.v1.Payload.ExternalPayloadDetails.verify|verify} messages. - * @param message ExternalPayloadDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.Payload.IExternalPayloadDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExternalPayloadDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExternalPayloadDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.Payload.ExternalPayloadDetails; - - /** - * Decodes an ExternalPayloadDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExternalPayloadDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.Payload.ExternalPayloadDetails; - - /** - * Creates an ExternalPayloadDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExternalPayloadDetails - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.Payload.ExternalPayloadDetails; - - /** - * Creates a plain object from an ExternalPayloadDetails message. Also converts values to other types if specified. - * @param message ExternalPayloadDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.Payload.ExternalPayloadDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExternalPayloadDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExternalPayloadDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SearchAttributes. */ - interface ISearchAttributes { - - /** SearchAttributes indexedFields */ - indexedFields?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - } - - /** - * A user-defined set of *indexed* fields that are used/exposed when listing/searching workflows. - * The payload is not serialized in a user-defined way. - */ - class SearchAttributes implements ISearchAttributes { - - /** - * Constructs a new SearchAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.ISearchAttributes); - - /** SearchAttributes indexedFields. */ - public indexedFields: { [k: string]: temporal.api.common.v1.IPayload }; - - /** - * Creates a new SearchAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchAttributes instance - */ - public static create(properties?: temporal.api.common.v1.ISearchAttributes): temporal.api.common.v1.SearchAttributes; - - /** - * Encodes the specified SearchAttributes message. Does not implicitly {@link temporal.api.common.v1.SearchAttributes.verify|verify} messages. - * @param message SearchAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.ISearchAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchAttributes message, length delimited. Does not implicitly {@link temporal.api.common.v1.SearchAttributes.verify|verify} messages. - * @param message SearchAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.ISearchAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.SearchAttributes; - - /** - * Decodes a SearchAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.SearchAttributes; - - /** - * Creates a SearchAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.SearchAttributes; - - /** - * Creates a plain object from a SearchAttributes message. Also converts values to other types if specified. - * @param message SearchAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.SearchAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Memo. */ - interface IMemo { - - /** Memo fields */ - fields?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - } - - /** A user-defined set of *unindexed* fields that are exposed when listing/searching workflows */ - class Memo implements IMemo { - - /** - * Constructs a new Memo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IMemo); - - /** Memo fields. */ - public fields: { [k: string]: temporal.api.common.v1.IPayload }; - - /** - * Creates a new Memo instance using the specified properties. - * @param [properties] Properties to set - * @returns Memo instance - */ - public static create(properties?: temporal.api.common.v1.IMemo): temporal.api.common.v1.Memo; - - /** - * Encodes the specified Memo message. Does not implicitly {@link temporal.api.common.v1.Memo.verify|verify} messages. - * @param message Memo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IMemo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Memo message, length delimited. Does not implicitly {@link temporal.api.common.v1.Memo.verify|verify} messages. - * @param message Memo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IMemo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Memo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Memo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.Memo; - - /** - * Decodes a Memo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Memo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.Memo; - - /** - * Creates a Memo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Memo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.Memo; - - /** - * Creates a plain object from a Memo message. Also converts values to other types if specified. - * @param message Memo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.Memo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Memo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Memo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Header. */ - interface IHeader { - - /** Header fields */ - fields?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - } - - /** - * Contains metadata that can be attached to a variety of requests, like starting a workflow, and - * can be propagated between, for example, workflows and activities. - */ - class Header implements IHeader { - - /** - * Constructs a new Header. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IHeader); - - /** Header fields. */ - public fields: { [k: string]: temporal.api.common.v1.IPayload }; - - /** - * Creates a new Header instance using the specified properties. - * @param [properties] Properties to set - * @returns Header instance - */ - public static create(properties?: temporal.api.common.v1.IHeader): temporal.api.common.v1.Header; - - /** - * Encodes the specified Header message. Does not implicitly {@link temporal.api.common.v1.Header.verify|verify} messages. - * @param message Header message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link temporal.api.common.v1.Header.verify|verify} messages. - * @param message Header message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Header message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Header - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.Header; - - /** - * Decodes a Header message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Header - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.Header; - - /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Header - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.Header; - - /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @param message Header - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.Header, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Header to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Header - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecution. */ - interface IWorkflowExecution { - - /** WorkflowExecution workflowId */ - workflowId?: (string|null); - - /** WorkflowExecution runId */ - runId?: (string|null); - } - - /** - * Identifies a specific workflow within a namespace. Practically speaking, because run_id is a - * uuid, a workflow execution is globally unique. Note that many commands allow specifying an empty - * run id as a way of saying "target the latest run of the workflow". - */ - class WorkflowExecution implements IWorkflowExecution { - - /** - * Constructs a new WorkflowExecution. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IWorkflowExecution); - - /** WorkflowExecution workflowId. */ - public workflowId: string; - - /** WorkflowExecution runId. */ - public runId: string; - - /** - * Creates a new WorkflowExecution instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecution instance - */ - public static create(properties?: temporal.api.common.v1.IWorkflowExecution): temporal.api.common.v1.WorkflowExecution; - - /** - * Encodes the specified WorkflowExecution message. Does not implicitly {@link temporal.api.common.v1.WorkflowExecution.verify|verify} messages. - * @param message WorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecution message, length delimited. Does not implicitly {@link temporal.api.common.v1.WorkflowExecution.verify|verify} messages. - * @param message WorkflowExecution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IWorkflowExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.WorkflowExecution; - - /** - * Decodes a WorkflowExecution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.WorkflowExecution; - - /** - * Creates a WorkflowExecution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecution - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.WorkflowExecution; - - /** - * Creates a plain object from a WorkflowExecution message. Also converts values to other types if specified. - * @param message WorkflowExecution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.WorkflowExecution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowType. */ - interface IWorkflowType { - - /** WorkflowType name */ - name?: (string|null); - } - - /** - * Represents the identifier used by a workflow author to define the workflow. Typically, the - * name of a function. This is sometimes referred to as the workflow's "name" - */ - class WorkflowType implements IWorkflowType { - - /** - * Constructs a new WorkflowType. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IWorkflowType); - - /** WorkflowType name. */ - public name: string; - - /** - * Creates a new WorkflowType instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowType instance - */ - public static create(properties?: temporal.api.common.v1.IWorkflowType): temporal.api.common.v1.WorkflowType; - - /** - * Encodes the specified WorkflowType message. Does not implicitly {@link temporal.api.common.v1.WorkflowType.verify|verify} messages. - * @param message WorkflowType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IWorkflowType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowType message, length delimited. Does not implicitly {@link temporal.api.common.v1.WorkflowType.verify|verify} messages. - * @param message WorkflowType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IWorkflowType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowType message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.WorkflowType; - - /** - * Decodes a WorkflowType message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.WorkflowType; - - /** - * Creates a WorkflowType message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowType - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.WorkflowType; - - /** - * Creates a plain object from a WorkflowType message. Also converts values to other types if specified. - * @param message WorkflowType - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.WorkflowType, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowType to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowType - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityType. */ - interface IActivityType { - - /** ActivityType name */ - name?: (string|null); - } - - /** - * Represents the identifier used by a activity author to define the activity. Typically, the - * name of a function. This is sometimes referred to as the activity's "name" - */ - class ActivityType implements IActivityType { - - /** - * Constructs a new ActivityType. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IActivityType); - - /** ActivityType name. */ - public name: string; - - /** - * Creates a new ActivityType instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityType instance - */ - public static create(properties?: temporal.api.common.v1.IActivityType): temporal.api.common.v1.ActivityType; - - /** - * Encodes the specified ActivityType message. Does not implicitly {@link temporal.api.common.v1.ActivityType.verify|verify} messages. - * @param message ActivityType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IActivityType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityType message, length delimited. Does not implicitly {@link temporal.api.common.v1.ActivityType.verify|verify} messages. - * @param message ActivityType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IActivityType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityType message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.ActivityType; - - /** - * Decodes an ActivityType message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.ActivityType; - - /** - * Creates an ActivityType message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityType - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.ActivityType; - - /** - * Creates a plain object from an ActivityType message. Also converts values to other types if specified. - * @param message ActivityType - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.ActivityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityType to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityType - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RetryPolicy. */ - interface IRetryPolicy { - - /** Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries. */ - initialInterval?: (google.protobuf.IDuration|null); - - /** - * Coefficient used to calculate the next retry interval. - * The next retry interval is previous interval multiplied by the coefficient. - * Must be 1 or larger. - */ - backoffCoefficient?: (number|null); - - /** - * Maximum interval between retries. Exponential backoff leads to interval increase. - * This value is the cap of the increase. Default is 100x of the initial interval. - */ - maximumInterval?: (google.protobuf.IDuration|null); - - /** - * Maximum number of attempts. When exceeded the retries stop even if not expired yet. - * 1 disables retries. 0 means unlimited (up to the timeouts) - */ - maximumAttempts?: (number|null); - - /** - * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that - * this is not a substring match, the error *type* (not message) must match exactly. - */ - nonRetryableErrorTypes?: (string[]|null); - } - - /** How retries ought to be handled, usable by both workflows and activities */ - class RetryPolicy implements IRetryPolicy { - - /** - * Constructs a new RetryPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IRetryPolicy); - - /** Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries. */ - public initialInterval?: (google.protobuf.IDuration|null); - - /** - * Coefficient used to calculate the next retry interval. - * The next retry interval is previous interval multiplied by the coefficient. - * Must be 1 or larger. - */ - public backoffCoefficient: number; - - /** - * Maximum interval between retries. Exponential backoff leads to interval increase. - * This value is the cap of the increase. Default is 100x of the initial interval. - */ - public maximumInterval?: (google.protobuf.IDuration|null); - - /** - * Maximum number of attempts. When exceeded the retries stop even if not expired yet. - * 1 disables retries. 0 means unlimited (up to the timeouts) - */ - public maximumAttempts: number; - - /** - * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that - * this is not a substring match, the error *type* (not message) must match exactly. - */ - public nonRetryableErrorTypes: string[]; - - /** - * Creates a new RetryPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns RetryPolicy instance - */ - public static create(properties?: temporal.api.common.v1.IRetryPolicy): temporal.api.common.v1.RetryPolicy; - - /** - * Encodes the specified RetryPolicy message. Does not implicitly {@link temporal.api.common.v1.RetryPolicy.verify|verify} messages. - * @param message RetryPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IRetryPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RetryPolicy message, length delimited. Does not implicitly {@link temporal.api.common.v1.RetryPolicy.verify|verify} messages. - * @param message RetryPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IRetryPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RetryPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RetryPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.RetryPolicy; - - /** - * Decodes a RetryPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RetryPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.RetryPolicy; - - /** - * Creates a RetryPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RetryPolicy - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.RetryPolicy; - - /** - * Creates a plain object from a RetryPolicy message. Also converts values to other types if specified. - * @param message RetryPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.RetryPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RetryPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RetryPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MeteringMetadata. */ - interface IMeteringMetadata { - - /** - * Count of local activities which have begun an execution attempt during this workflow task, - * and whose first attempt occurred in some previous task. This is used for metering - * purposes, and does not affect workflow state. - * - * (-- api-linter: core::0141::forbidden-types=disabled - * aip.dev/not-precedent: Negative values make no sense to represent. --) - */ - nonfirstLocalActivityExecutionAttempts?: (number|null); - } - - /** Metadata relevant for metering purposes */ - class MeteringMetadata implements IMeteringMetadata { - - /** - * Constructs a new MeteringMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IMeteringMetadata); - - /** - * Count of local activities which have begun an execution attempt during this workflow task, - * and whose first attempt occurred in some previous task. This is used for metering - * purposes, and does not affect workflow state. - * - * (-- api-linter: core::0141::forbidden-types=disabled - * aip.dev/not-precedent: Negative values make no sense to represent. --) - */ - public nonfirstLocalActivityExecutionAttempts: number; - - /** - * Creates a new MeteringMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns MeteringMetadata instance - */ - public static create(properties?: temporal.api.common.v1.IMeteringMetadata): temporal.api.common.v1.MeteringMetadata; - - /** - * Encodes the specified MeteringMetadata message. Does not implicitly {@link temporal.api.common.v1.MeteringMetadata.verify|verify} messages. - * @param message MeteringMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IMeteringMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MeteringMetadata message, length delimited. Does not implicitly {@link temporal.api.common.v1.MeteringMetadata.verify|verify} messages. - * @param message MeteringMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IMeteringMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MeteringMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MeteringMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.MeteringMetadata; - - /** - * Decodes a MeteringMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MeteringMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.MeteringMetadata; - - /** - * Creates a MeteringMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MeteringMetadata - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.MeteringMetadata; - - /** - * Creates a plain object from a MeteringMetadata message. Also converts values to other types if specified. - * @param message MeteringMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.MeteringMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MeteringMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MeteringMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerVersionStamp. */ - interface IWorkerVersionStamp { - - /** - * An opaque whole-worker identifier. Replaces the deprecated `binary_checksum` field when this - * message is included in requests which previously used that. - */ - buildId?: (string|null); - - /** - * If set, the worker is opting in to worker versioning. Otherwise, this is used only as a - * marker for workflow reset points and the BuildIDs search attribute. - */ - useVersioning?: (boolean|null); - } - - /** - * Deprecated. This message is replaced with `Deployment` and `VersioningBehavior`. - * Identifies the version(s) of a worker that processed a task - */ - class WorkerVersionStamp implements IWorkerVersionStamp { - - /** - * Constructs a new WorkerVersionStamp. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IWorkerVersionStamp); - - /** - * An opaque whole-worker identifier. Replaces the deprecated `binary_checksum` field when this - * message is included in requests which previously used that. - */ - public buildId: string; - - /** - * If set, the worker is opting in to worker versioning. Otherwise, this is used only as a - * marker for workflow reset points and the BuildIDs search attribute. - */ - public useVersioning: boolean; - - /** - * Creates a new WorkerVersionStamp instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerVersionStamp instance - */ - public static create(properties?: temporal.api.common.v1.IWorkerVersionStamp): temporal.api.common.v1.WorkerVersionStamp; - - /** - * Encodes the specified WorkerVersionStamp message. Does not implicitly {@link temporal.api.common.v1.WorkerVersionStamp.verify|verify} messages. - * @param message WorkerVersionStamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IWorkerVersionStamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerVersionStamp message, length delimited. Does not implicitly {@link temporal.api.common.v1.WorkerVersionStamp.verify|verify} messages. - * @param message WorkerVersionStamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IWorkerVersionStamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerVersionStamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerVersionStamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.WorkerVersionStamp; - - /** - * Decodes a WorkerVersionStamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerVersionStamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.WorkerVersionStamp; - - /** - * Creates a WorkerVersionStamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerVersionStamp - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.WorkerVersionStamp; - - /** - * Creates a plain object from a WorkerVersionStamp message. Also converts values to other types if specified. - * @param message WorkerVersionStamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.WorkerVersionStamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerVersionStamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerVersionStamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerVersionCapabilities. */ - interface IWorkerVersionCapabilities { - - /** An opaque whole-worker identifier */ - buildId?: (string|null); - - /** - * If set, the worker is opting in to worker versioning, and wishes to only receive appropriate - * tasks. - */ - useVersioning?: (boolean|null); - - /** Must be sent if user has set a deployment series name (versioning-3). */ - deploymentSeriesName?: (string|null); - } - - /** - * Identifies the version that a worker is compatible with when polling or identifying itself, - * and whether or not this worker is opting into the build-id based versioning feature. This is - * used by matching to determine which workers ought to receive what tasks. - * Deprecated. Use WorkerDeploymentOptions instead. - */ - class WorkerVersionCapabilities implements IWorkerVersionCapabilities { - - /** - * Constructs a new WorkerVersionCapabilities. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IWorkerVersionCapabilities); - - /** An opaque whole-worker identifier */ - public buildId: string; - - /** - * If set, the worker is opting in to worker versioning, and wishes to only receive appropriate - * tasks. - */ - public useVersioning: boolean; - - /** Must be sent if user has set a deployment series name (versioning-3). */ - public deploymentSeriesName: string; - - /** - * Creates a new WorkerVersionCapabilities instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerVersionCapabilities instance - */ - public static create(properties?: temporal.api.common.v1.IWorkerVersionCapabilities): temporal.api.common.v1.WorkerVersionCapabilities; - - /** - * Encodes the specified WorkerVersionCapabilities message. Does not implicitly {@link temporal.api.common.v1.WorkerVersionCapabilities.verify|verify} messages. - * @param message WorkerVersionCapabilities message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IWorkerVersionCapabilities, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerVersionCapabilities message, length delimited. Does not implicitly {@link temporal.api.common.v1.WorkerVersionCapabilities.verify|verify} messages. - * @param message WorkerVersionCapabilities message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IWorkerVersionCapabilities, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerVersionCapabilities message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerVersionCapabilities - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.WorkerVersionCapabilities; - - /** - * Decodes a WorkerVersionCapabilities message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerVersionCapabilities - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.WorkerVersionCapabilities; - - /** - * Creates a WorkerVersionCapabilities message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerVersionCapabilities - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.WorkerVersionCapabilities; - - /** - * Creates a plain object from a WorkerVersionCapabilities message. Also converts values to other types if specified. - * @param message WorkerVersionCapabilities - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.WorkerVersionCapabilities, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerVersionCapabilities to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerVersionCapabilities - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResetOptions. */ - interface IResetOptions { - - /** Resets to the first workflow task completed or started event. */ - firstWorkflowTask?: (google.protobuf.IEmpty|null); - - /** Resets to the last workflow task completed or started event. */ - lastWorkflowTask?: (google.protobuf.IEmpty|null); - - /** - * The id of a specific `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or - * `WORKFLOW_TASK_STARTED` event to reset to. - * Note that this option doesn't make sense when used as part of a batch request. - */ - workflowTaskId?: (Long|null); - - /** - * Resets to the first workflow task processed by this build id. - * If the workflow was not processed by the build id, or the workflow task can't be - * determined, no reset will be performed. - * Note that by default, this reset is allowed to be to a prior run in a chain of - * continue-as-new. - */ - buildId?: (string|null); - - /** - * Deprecated. Use `options`. - * Default: RESET_REAPPLY_TYPE_SIGNAL - */ - resetReapplyType?: (temporal.api.enums.v1.ResetReapplyType|null); - - /** - * If true, limit the reset to only within the current run. (Applies to build_id targets and - * possibly others in the future.) - */ - currentRunOnly?: (boolean|null); - - /** Event types not to be reapplied */ - resetReapplyExcludeTypes?: (temporal.api.enums.v1.ResetReapplyExcludeType[]|null); - } - - /** - * Describes where and how to reset a workflow, used for batch reset currently - * and may be used for single-workflow reset later. - */ - class ResetOptions implements IResetOptions { - - /** - * Constructs a new ResetOptions. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IResetOptions); - - /** Resets to the first workflow task completed or started event. */ - public firstWorkflowTask?: (google.protobuf.IEmpty|null); - - /** Resets to the last workflow task completed or started event. */ - public lastWorkflowTask?: (google.protobuf.IEmpty|null); - - /** - * The id of a specific `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or - * `WORKFLOW_TASK_STARTED` event to reset to. - * Note that this option doesn't make sense when used as part of a batch request. - */ - public workflowTaskId?: (Long|null); - - /** - * Resets to the first workflow task processed by this build id. - * If the workflow was not processed by the build id, or the workflow task can't be - * determined, no reset will be performed. - * Note that by default, this reset is allowed to be to a prior run in a chain of - * continue-as-new. - */ - public buildId?: (string|null); - - /** - * Deprecated. Use `options`. - * Default: RESET_REAPPLY_TYPE_SIGNAL - */ - public resetReapplyType: temporal.api.enums.v1.ResetReapplyType; - - /** - * If true, limit the reset to only within the current run. (Applies to build_id targets and - * possibly others in the future.) - */ - public currentRunOnly: boolean; - - /** Event types not to be reapplied */ - public resetReapplyExcludeTypes: temporal.api.enums.v1.ResetReapplyExcludeType[]; - - /** Which workflow task to reset to. */ - public target?: ("firstWorkflowTask"|"lastWorkflowTask"|"workflowTaskId"|"buildId"); - - /** - * Creates a new ResetOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetOptions instance - */ - public static create(properties?: temporal.api.common.v1.IResetOptions): temporal.api.common.v1.ResetOptions; - - /** - * Encodes the specified ResetOptions message. Does not implicitly {@link temporal.api.common.v1.ResetOptions.verify|verify} messages. - * @param message ResetOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IResetOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetOptions message, length delimited. Does not implicitly {@link temporal.api.common.v1.ResetOptions.verify|verify} messages. - * @param message ResetOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IResetOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.ResetOptions; - - /** - * Decodes a ResetOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.ResetOptions; - - /** - * Creates a ResetOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetOptions - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.ResetOptions; - - /** - * Creates a plain object from a ResetOptions message. Also converts values to other types if specified. - * @param message ResetOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.ResetOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Callback. */ - interface ICallback { - - /** Callback nexus */ - nexus?: (temporal.api.common.v1.Callback.INexus|null); - - /** Callback internal */ - internal?: (temporal.api.common.v1.Callback.IInternal|null); - - /** - * Links associated with the callback. It can be used to link to underlying resources of the - * callback. - */ - links?: (temporal.api.common.v1.ILink[]|null); - } - - /** Callback to attach to various events in the system, e.g. workflow run completion. */ - class Callback implements ICallback { - - /** - * Constructs a new Callback. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.ICallback); - - /** Callback nexus. */ - public nexus?: (temporal.api.common.v1.Callback.INexus|null); - - /** Callback internal. */ - public internal?: (temporal.api.common.v1.Callback.IInternal|null); - - /** - * Links associated with the callback. It can be used to link to underlying resources of the - * callback. - */ - public links: temporal.api.common.v1.ILink[]; - - /** Callback variant. */ - public variant?: ("nexus"|"internal"); - - /** - * Creates a new Callback instance using the specified properties. - * @param [properties] Properties to set - * @returns Callback instance - */ - public static create(properties?: temporal.api.common.v1.ICallback): temporal.api.common.v1.Callback; - - /** - * Encodes the specified Callback message. Does not implicitly {@link temporal.api.common.v1.Callback.verify|verify} messages. - * @param message Callback message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.ICallback, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Callback message, length delimited. Does not implicitly {@link temporal.api.common.v1.Callback.verify|verify} messages. - * @param message Callback message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.ICallback, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Callback message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Callback - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.Callback; - - /** - * Decodes a Callback message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Callback - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.Callback; - - /** - * Creates a Callback message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Callback - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.Callback; - - /** - * Creates a plain object from a Callback message. Also converts values to other types if specified. - * @param message Callback - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.Callback, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Callback to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Callback - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Callback { - - /** Properties of a Nexus. */ - interface INexus { - - /** Callback URL. */ - url?: (string|null); - - /** Header to attach to callback request. */ - header?: ({ [k: string]: string }|null); - } - - /** Represents a Nexus. */ - class Nexus implements INexus { - - /** - * Constructs a new Nexus. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.Callback.INexus); - - /** Callback URL. */ - public url: string; - - /** Header to attach to callback request. */ - public header: { [k: string]: string }; - - /** - * Creates a new Nexus instance using the specified properties. - * @param [properties] Properties to set - * @returns Nexus instance - */ - public static create(properties?: temporal.api.common.v1.Callback.INexus): temporal.api.common.v1.Callback.Nexus; - - /** - * Encodes the specified Nexus message. Does not implicitly {@link temporal.api.common.v1.Callback.Nexus.verify|verify} messages. - * @param message Nexus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.Callback.INexus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Nexus message, length delimited. Does not implicitly {@link temporal.api.common.v1.Callback.Nexus.verify|verify} messages. - * @param message Nexus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.Callback.INexus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Nexus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Nexus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.Callback.Nexus; - - /** - * Decodes a Nexus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Nexus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.Callback.Nexus; - - /** - * Creates a Nexus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Nexus - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.Callback.Nexus; - - /** - * Creates a plain object from a Nexus message. Also converts values to other types if specified. - * @param message Nexus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.Callback.Nexus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Nexus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Nexus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Internal. */ - interface IInternal { - - /** Opaque internal data. */ - data?: (Uint8Array|null); - } - - /** - * Callbacks to be delivered internally within the system. - * This variant is not settable in the API and will be rejected by the service with an INVALID_ARGUMENT error. - * The only reason that this is exposed is because callbacks are replicated across clusters via the - * WorkflowExecutionStarted event, which is defined in the public API. - */ - class Internal implements IInternal { - - /** - * Constructs a new Internal. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.Callback.IInternal); - - /** Opaque internal data. */ - public data: Uint8Array; - - /** - * Creates a new Internal instance using the specified properties. - * @param [properties] Properties to set - * @returns Internal instance - */ - public static create(properties?: temporal.api.common.v1.Callback.IInternal): temporal.api.common.v1.Callback.Internal; - - /** - * Encodes the specified Internal message. Does not implicitly {@link temporal.api.common.v1.Callback.Internal.verify|verify} messages. - * @param message Internal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.Callback.IInternal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Internal message, length delimited. Does not implicitly {@link temporal.api.common.v1.Callback.Internal.verify|verify} messages. - * @param message Internal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.Callback.IInternal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Internal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Internal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.Callback.Internal; - - /** - * Decodes an Internal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Internal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.Callback.Internal; - - /** - * Creates an Internal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Internal - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.Callback.Internal; - - /** - * Creates a plain object from an Internal message. Also converts values to other types if specified. - * @param message Internal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.Callback.Internal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Internal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Internal - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a Link. */ - interface ILink { - - /** Link workflowEvent */ - workflowEvent?: (temporal.api.common.v1.Link.IWorkflowEvent|null); - - /** Link batchJob */ - batchJob?: (temporal.api.common.v1.Link.IBatchJob|null); - } - - /** - * Link can be associated with history events. It might contain information about an external entity - * related to the history event. For example, workflow A makes a Nexus call that starts workflow B: - * in this case, a history event in workflow A could contain a Link to the workflow started event in - * workflow B, and vice-versa. - */ - class Link implements ILink { - - /** - * Constructs a new Link. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.ILink); - - /** Link workflowEvent. */ - public workflowEvent?: (temporal.api.common.v1.Link.IWorkflowEvent|null); - - /** Link batchJob. */ - public batchJob?: (temporal.api.common.v1.Link.IBatchJob|null); - - /** Link variant. */ - public variant?: ("workflowEvent"|"batchJob"); - - /** - * Creates a new Link instance using the specified properties. - * @param [properties] Properties to set - * @returns Link instance - */ - public static create(properties?: temporal.api.common.v1.ILink): temporal.api.common.v1.Link; - - /** - * Encodes the specified Link message. Does not implicitly {@link temporal.api.common.v1.Link.verify|verify} messages. - * @param message Link message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.ILink, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Link message, length delimited. Does not implicitly {@link temporal.api.common.v1.Link.verify|verify} messages. - * @param message Link message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.ILink, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Link message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Link - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.Link; - - /** - * Decodes a Link message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Link - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.Link; - - /** - * Creates a Link message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Link - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.Link; - - /** - * Creates a plain object from a Link message. Also converts values to other types if specified. - * @param message Link - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.Link, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Link to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Link - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Link { - - /** Properties of a WorkflowEvent. */ - interface IWorkflowEvent { - - /** WorkflowEvent namespace */ - namespace?: (string|null); - - /** WorkflowEvent workflowId */ - workflowId?: (string|null); - - /** WorkflowEvent runId */ - runId?: (string|null); - - /** WorkflowEvent eventRef */ - eventRef?: (temporal.api.common.v1.Link.WorkflowEvent.IEventReference|null); - - /** WorkflowEvent requestIdRef */ - requestIdRef?: (temporal.api.common.v1.Link.WorkflowEvent.IRequestIdReference|null); - } - - /** Represents a WorkflowEvent. */ - class WorkflowEvent implements IWorkflowEvent { - - /** - * Constructs a new WorkflowEvent. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.Link.IWorkflowEvent); - - /** WorkflowEvent namespace. */ - public namespace: string; - - /** WorkflowEvent workflowId. */ - public workflowId: string; - - /** WorkflowEvent runId. */ - public runId: string; - - /** WorkflowEvent eventRef. */ - public eventRef?: (temporal.api.common.v1.Link.WorkflowEvent.IEventReference|null); - - /** WorkflowEvent requestIdRef. */ - public requestIdRef?: (temporal.api.common.v1.Link.WorkflowEvent.IRequestIdReference|null); - - /** - * Additional information about the workflow event. - * Eg: the caller workflow can send the history event details that made the Nexus call. - */ - public reference?: ("eventRef"|"requestIdRef"); - - /** - * Creates a new WorkflowEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowEvent instance - */ - public static create(properties?: temporal.api.common.v1.Link.IWorkflowEvent): temporal.api.common.v1.Link.WorkflowEvent; - - /** - * Encodes the specified WorkflowEvent message. Does not implicitly {@link temporal.api.common.v1.Link.WorkflowEvent.verify|verify} messages. - * @param message WorkflowEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.Link.IWorkflowEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowEvent message, length delimited. Does not implicitly {@link temporal.api.common.v1.Link.WorkflowEvent.verify|verify} messages. - * @param message WorkflowEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.Link.IWorkflowEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.Link.WorkflowEvent; - - /** - * Decodes a WorkflowEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.Link.WorkflowEvent; - - /** - * Creates a WorkflowEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowEvent - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.Link.WorkflowEvent; - - /** - * Creates a plain object from a WorkflowEvent message. Also converts values to other types if specified. - * @param message WorkflowEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.Link.WorkflowEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WorkflowEvent { - - /** Properties of an EventReference. */ - interface IEventReference { - - /** EventReference eventId */ - eventId?: (Long|null); - - /** EventReference eventType */ - eventType?: (temporal.api.enums.v1.EventType|null); - } - - /** EventReference is a direct reference to a history event through the event ID. */ - class EventReference implements IEventReference { - - /** - * Constructs a new EventReference. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.Link.WorkflowEvent.IEventReference); - - /** EventReference eventId. */ - public eventId: Long; - - /** EventReference eventType. */ - public eventType: temporal.api.enums.v1.EventType; - - /** - * Creates a new EventReference instance using the specified properties. - * @param [properties] Properties to set - * @returns EventReference instance - */ - public static create(properties?: temporal.api.common.v1.Link.WorkflowEvent.IEventReference): temporal.api.common.v1.Link.WorkflowEvent.EventReference; - - /** - * Encodes the specified EventReference message. Does not implicitly {@link temporal.api.common.v1.Link.WorkflowEvent.EventReference.verify|verify} messages. - * @param message EventReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.Link.WorkflowEvent.IEventReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EventReference message, length delimited. Does not implicitly {@link temporal.api.common.v1.Link.WorkflowEvent.EventReference.verify|verify} messages. - * @param message EventReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.Link.WorkflowEvent.IEventReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EventReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EventReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.Link.WorkflowEvent.EventReference; - - /** - * Decodes an EventReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EventReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.Link.WorkflowEvent.EventReference; - - /** - * Creates an EventReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EventReference - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.Link.WorkflowEvent.EventReference; - - /** - * Creates a plain object from an EventReference message. Also converts values to other types if specified. - * @param message EventReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.Link.WorkflowEvent.EventReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EventReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EventReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RequestIdReference. */ - interface IRequestIdReference { - - /** RequestIdReference requestId */ - requestId?: (string|null); - - /** RequestIdReference eventType */ - eventType?: (temporal.api.enums.v1.EventType|null); - } - - /** RequestIdReference is a indirect reference to a history event through the request ID. */ - class RequestIdReference implements IRequestIdReference { - - /** - * Constructs a new RequestIdReference. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.Link.WorkflowEvent.IRequestIdReference); - - /** RequestIdReference requestId. */ - public requestId: string; - - /** RequestIdReference eventType. */ - public eventType: temporal.api.enums.v1.EventType; - - /** - * Creates a new RequestIdReference instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestIdReference instance - */ - public static create(properties?: temporal.api.common.v1.Link.WorkflowEvent.IRequestIdReference): temporal.api.common.v1.Link.WorkflowEvent.RequestIdReference; - - /** - * Encodes the specified RequestIdReference message. Does not implicitly {@link temporal.api.common.v1.Link.WorkflowEvent.RequestIdReference.verify|verify} messages. - * @param message RequestIdReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.Link.WorkflowEvent.IRequestIdReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestIdReference message, length delimited. Does not implicitly {@link temporal.api.common.v1.Link.WorkflowEvent.RequestIdReference.verify|verify} messages. - * @param message RequestIdReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.Link.WorkflowEvent.IRequestIdReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestIdReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestIdReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.Link.WorkflowEvent.RequestIdReference; - - /** - * Decodes a RequestIdReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestIdReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.Link.WorkflowEvent.RequestIdReference; - - /** - * Creates a RequestIdReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestIdReference - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.Link.WorkflowEvent.RequestIdReference; - - /** - * Creates a plain object from a RequestIdReference message. Also converts values to other types if specified. - * @param message RequestIdReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.Link.WorkflowEvent.RequestIdReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestIdReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestIdReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a BatchJob. */ - interface IBatchJob { - - /** BatchJob jobId */ - jobId?: (string|null); - } - - /** - * A link to a built-in batch job. - * Batch jobs can be used to perform operations on a set of workflows (e.g. terminate, signal, cancel, etc). - * This link can be put on workflow history events generated by actions taken by a batch job. - */ - class BatchJob implements IBatchJob { - - /** - * Constructs a new BatchJob. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.Link.IBatchJob); - - /** BatchJob jobId. */ - public jobId: string; - - /** - * Creates a new BatchJob instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchJob instance - */ - public static create(properties?: temporal.api.common.v1.Link.IBatchJob): temporal.api.common.v1.Link.BatchJob; - - /** - * Encodes the specified BatchJob message. Does not implicitly {@link temporal.api.common.v1.Link.BatchJob.verify|verify} messages. - * @param message BatchJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.Link.IBatchJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchJob message, length delimited. Does not implicitly {@link temporal.api.common.v1.Link.BatchJob.verify|verify} messages. - * @param message BatchJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.Link.IBatchJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchJob message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.Link.BatchJob; - - /** - * Decodes a BatchJob message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.Link.BatchJob; - - /** - * Creates a BatchJob message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchJob - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.Link.BatchJob; - - /** - * Creates a plain object from a BatchJob message. Also converts values to other types if specified. - * @param message BatchJob - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.Link.BatchJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchJob to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchJob - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a Priority. */ - interface IPriority { - - /** - * Priority key is a positive integer from 1 to n, where smaller integers - * correspond to higher priorities (tasks run sooner). In general, tasks in - * a queue should be processed in close to priority order, although small - * deviations are possible. - * - * The maximum priority value (minimum priority) is determined by server - * configuration, and defaults to 5. - * - * If priority is not present (or zero), then the effective priority will be - * the default priority, which is calculated by (min+max)/2. With the - * default max of 5, and min of 1, that comes out to 3. - */ - priorityKey?: (number|null); - - /** - * Fairness key is a short string that's used as a key for a fairness - * balancing mechanism. It may correspond to a tenant id, or to a fixed - * string like "high" or "low". The default is the empty string. - * - * The fairness mechanism attempts to dispatch tasks for a given key in - * proportion to its weight. For example, using a thousand distinct tenant - * ids, each with a weight of 1.0 (the default) will result in each tenant - * getting a roughly equal share of task dispatch throughput. - * - * (Note: this does not imply equal share of worker capacity! Fairness - * decisions are made based on queue statistics, not - * current worker load.) - * - * As another example, using keys "high" and "low" with weight 9.0 and 1.0 - * respectively will prefer dispatching "high" tasks over "low" tasks at a - * 9:1 ratio, while allowing either key to use all worker capacity if the - * other is not present. - * - * All fairness mechanisms, including rate limits, are best-effort and - * probabilistic. The results may not match what a "perfect" algorithm with - * infinite resources would produce. The more unique keys are used, the less - * accurate the results will be. - * - * Fairness keys are limited to 64 bytes. - */ - fairnessKey?: (string|null); - - /** - * Fairness weight for a task can come from multiple sources for - * flexibility. From highest to lowest precedence: - * 1. Weights for a small set of keys can be overridden in task queue - * configuration with an API. - * 2. It can be attached to the workflow/activity in this field. - * 3. The default weight of 1.0 will be used. - * - * Weight values are clamped to the range [0.001, 1000]. - */ - fairnessWeight?: (number|null); - } - - /** - * Priority contains metadata that controls relative ordering of task processing - * when tasks are backed up in a queue. Initially, Priority will be used in - * matching (workflow and activity) task queues. Later it may be used in history - * task queues and in rate limiting decisions. - * - * Priority is attached to workflows and activities. By default, activities - * inherit Priority from the workflow that created them, but may override fields - * when an activity is started or modified. - * - * Despite being named "Priority", this message also contains fields that - * control "fairness" mechanisms. - * - * For all fields, the field not present or equal to zero/empty string means to - * inherit the value from the calling workflow, or if there is no calling - * workflow, then use the default value. - * - * For all fields other than fairness_key, the zero value isn't meaningful so - * there's no confusion between inherit/default and a meaningful value. For - * fairness_key, the empty string will be interpreted as "inherit". This means - * that if a workflow has a non-empty fairness key, you can't override the - * fairness key of its activity to the empty string. - * - * The overall semantics of Priority are: - * 1. First, consider "priority": higher priority (lower number) goes first. - * 2. Then, consider fairness: try to dispatch tasks for different fairness keys - * in proportion to their weight. - * - * Applications may use any subset of mechanisms that are useful to them and - * leave the other fields to use default values. - * - * Not all queues in the system may support the "full" semantics of all priority - * fields. (Currently only support in matching task queues is planned.) - */ - class Priority implements IPriority { - - /** - * Constructs a new Priority. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IPriority); - - /** - * Priority key is a positive integer from 1 to n, where smaller integers - * correspond to higher priorities (tasks run sooner). In general, tasks in - * a queue should be processed in close to priority order, although small - * deviations are possible. - * - * The maximum priority value (minimum priority) is determined by server - * configuration, and defaults to 5. - * - * If priority is not present (or zero), then the effective priority will be - * the default priority, which is calculated by (min+max)/2. With the - * default max of 5, and min of 1, that comes out to 3. - */ - public priorityKey: number; - - /** - * Fairness key is a short string that's used as a key for a fairness - * balancing mechanism. It may correspond to a tenant id, or to a fixed - * string like "high" or "low". The default is the empty string. - * - * The fairness mechanism attempts to dispatch tasks for a given key in - * proportion to its weight. For example, using a thousand distinct tenant - * ids, each with a weight of 1.0 (the default) will result in each tenant - * getting a roughly equal share of task dispatch throughput. - * - * (Note: this does not imply equal share of worker capacity! Fairness - * decisions are made based on queue statistics, not - * current worker load.) - * - * As another example, using keys "high" and "low" with weight 9.0 and 1.0 - * respectively will prefer dispatching "high" tasks over "low" tasks at a - * 9:1 ratio, while allowing either key to use all worker capacity if the - * other is not present. - * - * All fairness mechanisms, including rate limits, are best-effort and - * probabilistic. The results may not match what a "perfect" algorithm with - * infinite resources would produce. The more unique keys are used, the less - * accurate the results will be. - * - * Fairness keys are limited to 64 bytes. - */ - public fairnessKey: string; - - /** - * Fairness weight for a task can come from multiple sources for - * flexibility. From highest to lowest precedence: - * 1. Weights for a small set of keys can be overridden in task queue - * configuration with an API. - * 2. It can be attached to the workflow/activity in this field. - * 3. The default weight of 1.0 will be used. - * - * Weight values are clamped to the range [0.001, 1000]. - */ - public fairnessWeight: number; - - /** - * Creates a new Priority instance using the specified properties. - * @param [properties] Properties to set - * @returns Priority instance - */ - public static create(properties?: temporal.api.common.v1.IPriority): temporal.api.common.v1.Priority; - - /** - * Encodes the specified Priority message. Does not implicitly {@link temporal.api.common.v1.Priority.verify|verify} messages. - * @param message Priority message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IPriority, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Priority message, length delimited. Does not implicitly {@link temporal.api.common.v1.Priority.verify|verify} messages. - * @param message Priority message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IPriority, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Priority message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Priority - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.Priority; - - /** - * Decodes a Priority message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Priority - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.Priority; - - /** - * Creates a Priority message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Priority - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.Priority; - - /** - * Creates a plain object from a Priority message. Also converts values to other types if specified. - * @param message Priority - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.Priority, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Priority to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Priority - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerSelector. */ - interface IWorkerSelector { - - /** Worker instance key to which the command should be sent. */ - workerInstanceKey?: (string|null); - } - - /** - * This is used to send commands to a specific worker or a group of workers. - * Right now, it is used to send commands to a specific worker instance. - * Will be extended to be able to send command to multiple workers. - */ - class WorkerSelector implements IWorkerSelector { - - /** - * Constructs a new WorkerSelector. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.common.v1.IWorkerSelector); - - /** Worker instance key to which the command should be sent. */ - public workerInstanceKey?: (string|null); - - /** - * Options are: - * - query (will be used as query to ListWorkers, same format as in ListWorkersRequest.query) - * - task queue (just a shortcut. Same as query=' "TaskQueue"="my-task-queue" ') - * - etc. - * All but 'query' are shortcuts, can be replaced with a query, but it is not convenient. - * string query = 5; - * string task_queue = 6; - * ... - */ - public selector?: "workerInstanceKey"; - - /** - * Creates a new WorkerSelector instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerSelector instance - */ - public static create(properties?: temporal.api.common.v1.IWorkerSelector): temporal.api.common.v1.WorkerSelector; - - /** - * Encodes the specified WorkerSelector message. Does not implicitly {@link temporal.api.common.v1.WorkerSelector.verify|verify} messages. - * @param message WorkerSelector message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.common.v1.IWorkerSelector, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerSelector message, length delimited. Does not implicitly {@link temporal.api.common.v1.WorkerSelector.verify|verify} messages. - * @param message WorkerSelector message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.common.v1.IWorkerSelector, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerSelector message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerSelector - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.common.v1.WorkerSelector; - - /** - * Decodes a WorkerSelector message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerSelector - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.common.v1.WorkerSelector; - - /** - * Creates a WorkerSelector message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerSelector - */ - public static fromObject(object: { [k: string]: any }): temporal.api.common.v1.WorkerSelector; - - /** - * Creates a plain object from a WorkerSelector message. Also converts values to other types if specified. - * @param message WorkerSelector - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.common.v1.WorkerSelector, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerSelector to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerSelector - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace enums. */ - namespace enums { - - /** Namespace v1. */ - namespace v1 { - - /** EncodingType enum. */ - enum EncodingType { - ENCODING_TYPE_UNSPECIFIED = 0, - ENCODING_TYPE_PROTO3 = 1, - ENCODING_TYPE_JSON = 2 - } - - /** IndexedValueType enum. */ - enum IndexedValueType { - INDEXED_VALUE_TYPE_UNSPECIFIED = 0, - INDEXED_VALUE_TYPE_TEXT = 1, - INDEXED_VALUE_TYPE_KEYWORD = 2, - INDEXED_VALUE_TYPE_INT = 3, - INDEXED_VALUE_TYPE_DOUBLE = 4, - INDEXED_VALUE_TYPE_BOOL = 5, - INDEXED_VALUE_TYPE_DATETIME = 6, - INDEXED_VALUE_TYPE_KEYWORD_LIST = 7 - } - - /** Severity enum. */ - enum Severity { - SEVERITY_UNSPECIFIED = 0, - SEVERITY_HIGH = 1, - SEVERITY_MEDIUM = 2, - SEVERITY_LOW = 3 - } - - /** State of a callback. */ - enum CallbackState { - CALLBACK_STATE_UNSPECIFIED = 0, - CALLBACK_STATE_STANDBY = 1, - CALLBACK_STATE_SCHEDULED = 2, - CALLBACK_STATE_BACKING_OFF = 3, - CALLBACK_STATE_FAILED = 4, - CALLBACK_STATE_SUCCEEDED = 5, - CALLBACK_STATE_BLOCKED = 6 - } - - /** State of a pending Nexus operation. */ - enum PendingNexusOperationState { - PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED = 0, - PENDING_NEXUS_OPERATION_STATE_SCHEDULED = 1, - PENDING_NEXUS_OPERATION_STATE_BACKING_OFF = 2, - PENDING_NEXUS_OPERATION_STATE_STARTED = 3, - PENDING_NEXUS_OPERATION_STATE_BLOCKED = 4 - } - - /** State of a Nexus operation cancellation. */ - enum NexusOperationCancellationState { - NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED = 0, - NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED = 1, - NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF = 2, - NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED = 3, - NEXUS_OPERATION_CANCELLATION_STATE_FAILED = 4, - NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT = 5, - NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED = 6 - } - - /** WorkflowRuleActionScope enum. */ - enum WorkflowRuleActionScope { - WORKFLOW_RULE_ACTION_SCOPE_UNSPECIFIED = 0, - WORKFLOW_RULE_ACTION_SCOPE_WORKFLOW = 1, - WORKFLOW_RULE_ACTION_SCOPE_ACTIVITY = 2 - } - - /** ApplicationErrorCategory enum. */ - enum ApplicationErrorCategory { - APPLICATION_ERROR_CATEGORY_UNSPECIFIED = 0, - APPLICATION_ERROR_CATEGORY_BENIGN = 1 - } - - /** - * (-- api-linter: core::0216::synonyms=disabled - * aip.dev/not-precedent: It seems we have both state and status, and status is a better fit for workers. --) - */ - enum WorkerStatus { - WORKER_STATUS_UNSPECIFIED = 0, - WORKER_STATUS_RUNNING = 1, - WORKER_STATUS_SHUTTING_DOWN = 2, - WORKER_STATUS_SHUTDOWN = 3 - } - - /** Whenever this list of events is changed do change the function shouldBufferEvent in mutableStateBuilder.go to make sure to do the correct event ordering */ - enum EventType { - EVENT_TYPE_UNSPECIFIED = 0, - EVENT_TYPE_WORKFLOW_EXECUTION_STARTED = 1, - EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED = 2, - EVENT_TYPE_WORKFLOW_EXECUTION_FAILED = 3, - EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT = 4, - EVENT_TYPE_WORKFLOW_TASK_SCHEDULED = 5, - EVENT_TYPE_WORKFLOW_TASK_STARTED = 6, - EVENT_TYPE_WORKFLOW_TASK_COMPLETED = 7, - EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT = 8, - EVENT_TYPE_WORKFLOW_TASK_FAILED = 9, - EVENT_TYPE_ACTIVITY_TASK_SCHEDULED = 10, - EVENT_TYPE_ACTIVITY_TASK_STARTED = 11, - EVENT_TYPE_ACTIVITY_TASK_COMPLETED = 12, - EVENT_TYPE_ACTIVITY_TASK_FAILED = 13, - EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT = 14, - EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED = 15, - EVENT_TYPE_ACTIVITY_TASK_CANCELED = 16, - EVENT_TYPE_TIMER_STARTED = 17, - EVENT_TYPE_TIMER_FIRED = 18, - EVENT_TYPE_TIMER_CANCELED = 19, - EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED = 20, - EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED = 21, - EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED = 22, - EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED = 23, - EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED = 24, - EVENT_TYPE_MARKER_RECORDED = 25, - EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED = 26, - EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED = 27, - EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW = 28, - EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED = 29, - EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED = 30, - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED = 31, - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED = 32, - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED = 33, - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED = 34, - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT = 35, - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED = 36, - EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED = 37, - EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED = 38, - EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED = 39, - EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES = 40, - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED = 47, - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED = 41, - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED = 42, - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED = 43, - EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY = 44, - EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY = 45, - EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED = 46, - EVENT_TYPE_NEXUS_OPERATION_SCHEDULED = 48, - EVENT_TYPE_NEXUS_OPERATION_STARTED = 49, - EVENT_TYPE_NEXUS_OPERATION_COMPLETED = 50, - EVENT_TYPE_NEXUS_OPERATION_FAILED = 51, - EVENT_TYPE_NEXUS_OPERATION_CANCELED = 52, - EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT = 53, - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED = 54, - EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED = 55, - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED = 56, - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED = 57, - EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED = 58, - EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED = 59 - } - - /** Event types to exclude when reapplying events beyond the reset point. */ - enum ResetReapplyExcludeType { - RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED = 0, - RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL = 1, - RESET_REAPPLY_EXCLUDE_TYPE_UPDATE = 2, - RESET_REAPPLY_EXCLUDE_TYPE_NEXUS = 3, - RESET_REAPPLY_EXCLUDE_TYPE_CANCEL_REQUEST = 4 - } - - /** - * Deprecated: applications should use ResetReapplyExcludeType to specify - * exclusions from this set, and new event types should be added to ResetReapplyExcludeType - * instead of here. - */ - enum ResetReapplyType { - RESET_REAPPLY_TYPE_UNSPECIFIED = 0, - RESET_REAPPLY_TYPE_SIGNAL = 1, - RESET_REAPPLY_TYPE_NONE = 2, - RESET_REAPPLY_TYPE_ALL_ELIGIBLE = 3 - } - - /** Deprecated, see temporal.api.common.v1.ResetOptions. */ - enum ResetType { - RESET_TYPE_UNSPECIFIED = 0, - RESET_TYPE_FIRST_WORKFLOW_TASK = 1, - RESET_TYPE_LAST_WORKFLOW_TASK = 2 - } - - /** - * Defines whether to allow re-using a workflow id from a previously *closed* workflow. - * If the request is denied, the server returns a `WorkflowExecutionAlreadyStartedFailure` error. - * - * See `WorkflowIdConflictPolicy` for handling workflow id duplication with a *running* workflow. - */ - enum WorkflowIdReusePolicy { - WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED = 0, - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE = 1, - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY = 2, - WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE = 3, - WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING = 4 - } - - /** - * Defines what to do when trying to start a workflow with the same workflow id as a *running* workflow. - * Note that it is *never* valid to have two actively running instances of the same workflow id. - * - * See `WorkflowIdReusePolicy` for handling workflow id duplication with a *closed* workflow. - */ - enum WorkflowIdConflictPolicy { - WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED = 0, - WORKFLOW_ID_CONFLICT_POLICY_FAIL = 1, - WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING = 2, - WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING = 3 - } - - /** Defines how child workflows will react to their parent completing */ - enum ParentClosePolicy { - PARENT_CLOSE_POLICY_UNSPECIFIED = 0, - PARENT_CLOSE_POLICY_TERMINATE = 1, - PARENT_CLOSE_POLICY_ABANDON = 2, - PARENT_CLOSE_POLICY_REQUEST_CANCEL = 3 - } - - /** ContinueAsNewInitiator enum. */ - enum ContinueAsNewInitiator { - CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED = 0, - CONTINUE_AS_NEW_INITIATOR_WORKFLOW = 1, - CONTINUE_AS_NEW_INITIATOR_RETRY = 2, - CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE = 3 - } - - /** - * (-- api-linter: core::0216::synonyms=disabled - * aip.dev/not-precedent: There is WorkflowExecutionState already in another package. --) - */ - enum WorkflowExecutionStatus { - WORKFLOW_EXECUTION_STATUS_UNSPECIFIED = 0, - WORKFLOW_EXECUTION_STATUS_RUNNING = 1, - WORKFLOW_EXECUTION_STATUS_COMPLETED = 2, - WORKFLOW_EXECUTION_STATUS_FAILED = 3, - WORKFLOW_EXECUTION_STATUS_CANCELED = 4, - WORKFLOW_EXECUTION_STATUS_TERMINATED = 5, - WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW = 6, - WORKFLOW_EXECUTION_STATUS_TIMED_OUT = 7, - WORKFLOW_EXECUTION_STATUS_PAUSED = 8 - } - - /** PendingActivityState enum. */ - enum PendingActivityState { - PENDING_ACTIVITY_STATE_UNSPECIFIED = 0, - PENDING_ACTIVITY_STATE_SCHEDULED = 1, - PENDING_ACTIVITY_STATE_STARTED = 2, - PENDING_ACTIVITY_STATE_CANCEL_REQUESTED = 3, - PENDING_ACTIVITY_STATE_PAUSED = 4, - PENDING_ACTIVITY_STATE_PAUSE_REQUESTED = 5 - } - - /** PendingWorkflowTaskState enum. */ - enum PendingWorkflowTaskState { - PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED = 0, - PENDING_WORKFLOW_TASK_STATE_SCHEDULED = 1, - PENDING_WORKFLOW_TASK_STATE_STARTED = 2 - } - - /** HistoryEventFilterType enum. */ - enum HistoryEventFilterType { - HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED = 0, - HISTORY_EVENT_FILTER_TYPE_ALL_EVENT = 1, - HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT = 2 - } - - /** RetryState enum. */ - enum RetryState { - RETRY_STATE_UNSPECIFIED = 0, - RETRY_STATE_IN_PROGRESS = 1, - RETRY_STATE_NON_RETRYABLE_FAILURE = 2, - RETRY_STATE_TIMEOUT = 3, - RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED = 4, - RETRY_STATE_RETRY_POLICY_NOT_SET = 5, - RETRY_STATE_INTERNAL_SERVER_ERROR = 6, - RETRY_STATE_CANCEL_REQUESTED = 7 - } - - /** TimeoutType enum. */ - enum TimeoutType { - TIMEOUT_TYPE_UNSPECIFIED = 0, - TIMEOUT_TYPE_START_TO_CLOSE = 1, - TIMEOUT_TYPE_SCHEDULE_TO_START = 2, - TIMEOUT_TYPE_SCHEDULE_TO_CLOSE = 3, - TIMEOUT_TYPE_HEARTBEAT = 4 - } - - /** - * Versioning Behavior specifies if and how a workflow execution moves between Worker Deployment - * Versions. The Versioning Behavior of a workflow execution is typically specified by the worker - * who completes the first task of the execution, but is also overridable manually for new and - * existing workflows (see VersioningOverride). - * Experimental. Worker Deployments are experimental and might significantly change in the future. - */ - enum VersioningBehavior { - VERSIONING_BEHAVIOR_UNSPECIFIED = 0, - VERSIONING_BEHAVIOR_PINNED = 1, - VERSIONING_BEHAVIOR_AUTO_UPGRADE = 2 - } - - /** Experimental. Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain. */ - enum ContinueAsNewVersioningBehavior { - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED = 0, - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE = 1 - } - - /** SuggestContinueAsNewReason specifies why SuggestContinueAsNew is true. */ - enum SuggestContinueAsNewReason { - SUGGEST_CONTINUE_AS_NEW_REASON_UNSPECIFIED = 0, - SUGGEST_CONTINUE_AS_NEW_REASON_HISTORY_SIZE_TOO_LARGE = 1, - SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_HISTORY_EVENTS = 2, - SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_UPDATES = 3 - } - - /** - * NexusHandlerErrorRetryBehavior allows nexus handlers to explicity set the retry behavior of a HandlerError. If not - * specified, retry behavior is determined from the error type. For example internal errors are not retryable by default - * unless specified otherwise. - */ - enum NexusHandlerErrorRetryBehavior { - NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_UNSPECIFIED = 0, - NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_RETRYABLE = 1, - NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE = 2 - } - - /** - * UpdateWorkflowExecutionLifecycleStage is specified by clients invoking - * Workflow Updates and used to indicate to the server how long the - * client wishes to wait for a return value from the API. If any value other - * than UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED is sent by the - * client then the API will complete before the Update is finished and will - * return a handle to the running Update so that it can later be polled for - * completion. - * If specified stage wasn't reached before server timeout, server returns - * actual stage reached. - */ - enum UpdateWorkflowExecutionLifecycleStage { - UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED = 0, - UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED = 1, - UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED = 2, - UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED = 3 - } - - /** - * Records why a WorkflowExecutionUpdateAdmittedEvent was written to history. - * Note that not all admitted Updates result in this event. - */ - enum UpdateAdmittedEventOrigin { - UPDATE_ADMITTED_EVENT_ORIGIN_UNSPECIFIED = 0, - UPDATE_ADMITTED_EVENT_ORIGIN_REAPPLY = 1 - } - - /** BatchOperationType enum. */ - enum BatchOperationType { - BATCH_OPERATION_TYPE_UNSPECIFIED = 0, - BATCH_OPERATION_TYPE_TERMINATE = 1, - BATCH_OPERATION_TYPE_CANCEL = 2, - BATCH_OPERATION_TYPE_SIGNAL = 3, - BATCH_OPERATION_TYPE_DELETE = 4, - BATCH_OPERATION_TYPE_RESET = 5, - BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS = 6, - BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY = 7, - BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS = 8, - BATCH_OPERATION_TYPE_RESET_ACTIVITY = 9 - } - - /** BatchOperationState enum. */ - enum BatchOperationState { - BATCH_OPERATION_STATE_UNSPECIFIED = 0, - BATCH_OPERATION_STATE_RUNNING = 1, - BATCH_OPERATION_STATE_COMPLETED = 2, - BATCH_OPERATION_STATE_FAILED = 3 - } - - /** NamespaceState enum. */ - enum NamespaceState { - NAMESPACE_STATE_UNSPECIFIED = 0, - NAMESPACE_STATE_REGISTERED = 1, - NAMESPACE_STATE_DEPRECATED = 2, - NAMESPACE_STATE_DELETED = 3 - } - - /** ArchivalState enum. */ - enum ArchivalState { - ARCHIVAL_STATE_UNSPECIFIED = 0, - ARCHIVAL_STATE_DISABLED = 1, - ARCHIVAL_STATE_ENABLED = 2 - } - - /** ReplicationState enum. */ - enum ReplicationState { - REPLICATION_STATE_UNSPECIFIED = 0, - REPLICATION_STATE_NORMAL = 1, - REPLICATION_STATE_HANDOVER = 2 - } - - /** - * Workflow tasks can fail for various reasons. Note that some of these reasons can only originate - * from the server, and some of them can only originate from the SDK/worker. - */ - enum WorkflowTaskFailedCause { - WORKFLOW_TASK_FAILED_CAUSE_UNSPECIFIED = 0, - WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_COMMAND = 1, - WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES = 2, - WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES = 3, - WORKFLOW_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES = 4, - WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES = 5, - WORKFLOW_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES = 6, - WORKFLOW_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES = 7, - WORKFLOW_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES = 8, - WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES = 9, - WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES = 10, - WORKFLOW_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES = 11, - WORKFLOW_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID = 12, - WORKFLOW_TASK_FAILED_CAUSE_RESET_STICKY_TASK_QUEUE = 13, - WORKFLOW_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE = 14, - WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES = 15, - WORKFLOW_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES = 16, - WORKFLOW_TASK_FAILED_CAUSE_FORCE_CLOSE_COMMAND = 17, - WORKFLOW_TASK_FAILED_CAUSE_FAILOVER_CLOSE_COMMAND = 18, - WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE = 19, - WORKFLOW_TASK_FAILED_CAUSE_RESET_WORKFLOW = 20, - WORKFLOW_TASK_FAILED_CAUSE_BAD_BINARY = 21, - WORKFLOW_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID = 22, - WORKFLOW_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES = 23, - WORKFLOW_TASK_FAILED_CAUSE_NON_DETERMINISTIC_ERROR = 24, - WORKFLOW_TASK_FAILED_CAUSE_BAD_MODIFY_WORKFLOW_PROPERTIES_ATTRIBUTES = 25, - WORKFLOW_TASK_FAILED_CAUSE_PENDING_CHILD_WORKFLOWS_LIMIT_EXCEEDED = 26, - WORKFLOW_TASK_FAILED_CAUSE_PENDING_ACTIVITIES_LIMIT_EXCEEDED = 27, - WORKFLOW_TASK_FAILED_CAUSE_PENDING_SIGNALS_LIMIT_EXCEEDED = 28, - WORKFLOW_TASK_FAILED_CAUSE_PENDING_REQUEST_CANCEL_LIMIT_EXCEEDED = 29, - WORKFLOW_TASK_FAILED_CAUSE_BAD_UPDATE_WORKFLOW_EXECUTION_MESSAGE = 30, - WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_UPDATE = 31, - WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_NEXUS_OPERATION_ATTRIBUTES = 32, - WORKFLOW_TASK_FAILED_CAUSE_PENDING_NEXUS_OPERATIONS_LIMIT_EXCEEDED = 33, - WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_NEXUS_OPERATION_ATTRIBUTES = 34, - WORKFLOW_TASK_FAILED_CAUSE_FEATURE_DISABLED = 35, - WORKFLOW_TASK_FAILED_CAUSE_GRPC_MESSAGE_TOO_LARGE = 36, - WORKFLOW_TASK_FAILED_CAUSE_PAYLOADS_TOO_LARGE = 37 - } - - /** StartChildWorkflowExecutionFailedCause enum. */ - enum StartChildWorkflowExecutionFailedCause { - START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED = 0, - START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS = 1, - START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND = 2 - } - - /** CancelExternalWorkflowExecutionFailedCause enum. */ - enum CancelExternalWorkflowExecutionFailedCause { - CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED = 0, - CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND = 1, - CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND = 2 - } - - /** SignalExternalWorkflowExecutionFailedCause enum. */ - enum SignalExternalWorkflowExecutionFailedCause { - SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED = 0, - SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND = 1, - SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND = 2, - SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_SIGNAL_COUNT_LIMIT_EXCEEDED = 3 - } - - /** ResourceExhaustedCause enum. */ - enum ResourceExhaustedCause { - RESOURCE_EXHAUSTED_CAUSE_UNSPECIFIED = 0, - RESOURCE_EXHAUSTED_CAUSE_RPS_LIMIT = 1, - RESOURCE_EXHAUSTED_CAUSE_CONCURRENT_LIMIT = 2, - RESOURCE_EXHAUSTED_CAUSE_SYSTEM_OVERLOADED = 3, - RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_LIMIT = 4, - RESOURCE_EXHAUSTED_CAUSE_BUSY_WORKFLOW = 5, - RESOURCE_EXHAUSTED_CAUSE_APS_LIMIT = 6, - RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_STORAGE_LIMIT = 7, - RESOURCE_EXHAUSTED_CAUSE_CIRCUIT_BREAKER_OPEN = 8, - RESOURCE_EXHAUSTED_CAUSE_OPS_LIMIT = 9, - RESOURCE_EXHAUSTED_CAUSE_WORKER_DEPLOYMENT_LIMITS = 10 - } - - /** ResourceExhaustedScope enum. */ - enum ResourceExhaustedScope { - RESOURCE_EXHAUSTED_SCOPE_UNSPECIFIED = 0, - RESOURCE_EXHAUSTED_SCOPE_NAMESPACE = 1, - RESOURCE_EXHAUSTED_SCOPE_SYSTEM = 2 - } - - /** QueryResultType enum. */ - enum QueryResultType { - QUERY_RESULT_TYPE_UNSPECIFIED = 0, - QUERY_RESULT_TYPE_ANSWERED = 1, - QUERY_RESULT_TYPE_FAILED = 2 - } - - /** QueryRejectCondition enum. */ - enum QueryRejectCondition { - QUERY_REJECT_CONDITION_UNSPECIFIED = 0, - QUERY_REJECT_CONDITION_NONE = 1, - QUERY_REJECT_CONDITION_NOT_OPEN = 2, - QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY = 3 - } - - /** TaskQueueKind enum. */ - enum TaskQueueKind { - TASK_QUEUE_KIND_UNSPECIFIED = 0, - TASK_QUEUE_KIND_NORMAL = 1, - TASK_QUEUE_KIND_STICKY = 2 - } - - /** TaskQueueType enum. */ - enum TaskQueueType { - TASK_QUEUE_TYPE_UNSPECIFIED = 0, - TASK_QUEUE_TYPE_WORKFLOW = 1, - TASK_QUEUE_TYPE_ACTIVITY = 2, - TASK_QUEUE_TYPE_NEXUS = 3 - } - - /** - * Specifies which category of tasks may reach a worker on a versioned task queue. - * Used both in a reachability query and its response. - * Deprecated. - */ - enum TaskReachability { - TASK_REACHABILITY_UNSPECIFIED = 0, - TASK_REACHABILITY_NEW_WORKFLOWS = 1, - TASK_REACHABILITY_EXISTING_WORKFLOWS = 2, - TASK_REACHABILITY_OPEN_WORKFLOWS = 3, - TASK_REACHABILITY_CLOSED_WORKFLOWS = 4 - } - - /** - * Specifies which category of tasks may reach a versioned worker of a certain Build ID. - * - * Task Reachability is eventually consistent; there may be a delay (up to few minutes) until it - * converges to the most accurate value but it is designed in a way to take the more conservative - * side until it converges. For example REACHABLE is more conservative than CLOSED_WORKFLOWS_ONLY. - * - * Note: future activities who inherit their workflow's Build ID but not its Task Queue will not be - * accounted for reachability as server cannot know if they'll happen as they do not use - * assignment rules of their Task Queue. Same goes for Child Workflows or Continue-As-New Workflows - * who inherit the parent/previous workflow's Build ID but not its Task Queue. In those cases, make - * sure to query reachability for the parent/previous workflow's Task Queue as well. - */ - enum BuildIdTaskReachability { - BUILD_ID_TASK_REACHABILITY_UNSPECIFIED = 0, - BUILD_ID_TASK_REACHABILITY_REACHABLE = 1, - BUILD_ID_TASK_REACHABILITY_CLOSED_WORKFLOWS_ONLY = 2, - BUILD_ID_TASK_REACHABILITY_UNREACHABLE = 3 - } - - /** DescribeTaskQueueMode enum. */ - enum DescribeTaskQueueMode { - DESCRIBE_TASK_QUEUE_MODE_UNSPECIFIED = 0, - DESCRIBE_TASK_QUEUE_MODE_ENHANCED = 1 - } - - /** Source for the effective rate limit. */ - enum RateLimitSource { - RATE_LIMIT_SOURCE_UNSPECIFIED = 0, - RATE_LIMIT_SOURCE_API = 1, - RATE_LIMIT_SOURCE_WORKER = 2, - RATE_LIMIT_SOURCE_SYSTEM = 3 - } - - /** - * Indicates whether a change to the Routing Config has been - * propagated to all relevant Task Queues and their partitions. - */ - enum RoutingConfigUpdateState { - ROUTING_CONFIG_UPDATE_STATE_UNSPECIFIED = 0, - ROUTING_CONFIG_UPDATE_STATE_IN_PROGRESS = 1, - ROUTING_CONFIG_UPDATE_STATE_COMPLETED = 2 - } - - /** - * Specify the reachability level for a deployment so users can decide if it is time to - * decommission the deployment. - */ - enum DeploymentReachability { - DEPLOYMENT_REACHABILITY_UNSPECIFIED = 0, - DEPLOYMENT_REACHABILITY_REACHABLE = 1, - DEPLOYMENT_REACHABILITY_CLOSED_WORKFLOWS_ONLY = 2, - DEPLOYMENT_REACHABILITY_UNREACHABLE = 3 - } - - /** - * (-- api-linter: core::0216::synonyms=disabled - * aip.dev/not-precedent: Call this status because it is . --) - * Specify the drainage status for a Worker Deployment Version so users can decide whether they - * can safely decommission the version. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - */ - enum VersionDrainageStatus { - VERSION_DRAINAGE_STATUS_UNSPECIFIED = 0, - VERSION_DRAINAGE_STATUS_DRAINING = 1, - VERSION_DRAINAGE_STATUS_DRAINED = 2 - } - - /** - * Versioning Mode of a worker is set by the app developer in the worker code, and specifies the - * behavior of the system in the following related aspects: - * - Whether or not Temporal Server considers this worker's version (Build ID) when dispatching - * tasks to it. - * - Whether or not the workflows processed by this worker are versioned using the worker's version. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - */ - enum WorkerVersioningMode { - WORKER_VERSIONING_MODE_UNSPECIFIED = 0, - WORKER_VERSIONING_MODE_UNVERSIONED = 1, - WORKER_VERSIONING_MODE_VERSIONED = 2 - } - - /** - * (-- api-linter: core::0216::synonyms=disabled - * aip.dev/not-precedent: Call this status because it is . --) - * Specify the status of a Worker Deployment Version. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - */ - enum WorkerDeploymentVersionStatus { - WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED = 0, - WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE = 1, - WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT = 2, - WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING = 3, - WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING = 4, - WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED = 5 - } - - /** - * Status of a standalone activity. - * The status is updated once, when the activity is originally scheduled, and again when the activity reaches a terminal - * status. - * (-- api-linter: core::0216::synonyms=disabled - * aip.dev/not-precedent: Named consistently with WorkflowExecutionStatus. --) - */ - enum ActivityExecutionStatus { - ACTIVITY_EXECUTION_STATUS_UNSPECIFIED = 0, - ACTIVITY_EXECUTION_STATUS_RUNNING = 1, - ACTIVITY_EXECUTION_STATUS_COMPLETED = 2, - ACTIVITY_EXECUTION_STATUS_FAILED = 3, - ACTIVITY_EXECUTION_STATUS_CANCELED = 4, - ACTIVITY_EXECUTION_STATUS_TERMINATED = 5, - ACTIVITY_EXECUTION_STATUS_TIMED_OUT = 6 - } - - /** - * Defines whether to allow re-using an activity ID from a previously *closed* activity. - * If the request is denied, the server returns an `ActivityExecutionAlreadyStarted` error. - * - * See `ActivityIdConflictPolicy` for handling ID duplication with a *running* activity. - */ - enum ActivityIdReusePolicy { - ACTIVITY_ID_REUSE_POLICY_UNSPECIFIED = 0, - ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE = 1, - ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY = 2, - ACTIVITY_ID_REUSE_POLICY_REJECT_DUPLICATE = 3 - } - - /** - * Defines what to do when trying to start an activity with the same ID as a *running* activity. - * Note that it is *never* valid to have two running instances of the same activity ID. - * - * See `ActivityIdReusePolicy` for handling activity ID duplication with a *closed* activity. - */ - enum ActivityIdConflictPolicy { - ACTIVITY_ID_CONFLICT_POLICY_UNSPECIFIED = 0, - ACTIVITY_ID_CONFLICT_POLICY_FAIL = 1, - ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING = 2 - } - - /** Whenever this list of command types is changed do change the function shouldBufferEvent in mutableStateBuilder.go to make sure to do the correct event ordering. */ - enum CommandType { - COMMAND_TYPE_UNSPECIFIED = 0, - COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK = 1, - COMMAND_TYPE_REQUEST_CANCEL_ACTIVITY_TASK = 2, - COMMAND_TYPE_START_TIMER = 3, - COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION = 4, - COMMAND_TYPE_FAIL_WORKFLOW_EXECUTION = 5, - COMMAND_TYPE_CANCEL_TIMER = 6, - COMMAND_TYPE_CANCEL_WORKFLOW_EXECUTION = 7, - COMMAND_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION = 8, - COMMAND_TYPE_RECORD_MARKER = 9, - COMMAND_TYPE_CONTINUE_AS_NEW_WORKFLOW_EXECUTION = 10, - COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION = 11, - COMMAND_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION = 12, - COMMAND_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES = 13, - COMMAND_TYPE_PROTOCOL_MESSAGE = 14, - COMMAND_TYPE_MODIFY_WORKFLOW_PROPERTIES = 16, - COMMAND_TYPE_SCHEDULE_NEXUS_OPERATION = 17, - COMMAND_TYPE_REQUEST_CANCEL_NEXUS_OPERATION = 18 - } - - /** - * ScheduleOverlapPolicy controls what happens when a workflow would be started - * by a schedule, and is already running. - */ - enum ScheduleOverlapPolicy { - SCHEDULE_OVERLAP_POLICY_UNSPECIFIED = 0, - SCHEDULE_OVERLAP_POLICY_SKIP = 1, - SCHEDULE_OVERLAP_POLICY_BUFFER_ONE = 2, - SCHEDULE_OVERLAP_POLICY_BUFFER_ALL = 3, - SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER = 4, - SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER = 5, - SCHEDULE_OVERLAP_POLICY_ALLOW_ALL = 6 - } - } - } - - /** Namespace failure. */ - namespace failure { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of an ApplicationFailureInfo. */ - interface IApplicationFailureInfo { - - /** ApplicationFailureInfo type */ - type?: (string|null); - - /** ApplicationFailureInfo nonRetryable */ - nonRetryable?: (boolean|null); - - /** ApplicationFailureInfo details */ - details?: (temporal.api.common.v1.IPayloads|null); - - /** - * next_retry_delay can be used by the client to override the activity - * retry interval calculated by the retry policy. Retry attempts will - * still be subject to the maximum retries limit and total time limit - * defined by the policy. - */ - nextRetryDelay?: (google.protobuf.IDuration|null); - - /** ApplicationFailureInfo category */ - category?: (temporal.api.enums.v1.ApplicationErrorCategory|null); - } - - /** Represents an ApplicationFailureInfo. */ - class ApplicationFailureInfo implements IApplicationFailureInfo { - - /** - * Constructs a new ApplicationFailureInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.failure.v1.IApplicationFailureInfo); - - /** ApplicationFailureInfo type. */ - public type: string; - - /** ApplicationFailureInfo nonRetryable. */ - public nonRetryable: boolean; - - /** ApplicationFailureInfo details. */ - public details?: (temporal.api.common.v1.IPayloads|null); - - /** - * next_retry_delay can be used by the client to override the activity - * retry interval calculated by the retry policy. Retry attempts will - * still be subject to the maximum retries limit and total time limit - * defined by the policy. - */ - public nextRetryDelay?: (google.protobuf.IDuration|null); - - /** ApplicationFailureInfo category. */ - public category: temporal.api.enums.v1.ApplicationErrorCategory; - - /** - * Creates a new ApplicationFailureInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ApplicationFailureInfo instance - */ - public static create(properties?: temporal.api.failure.v1.IApplicationFailureInfo): temporal.api.failure.v1.ApplicationFailureInfo; - - /** - * Encodes the specified ApplicationFailureInfo message. Does not implicitly {@link temporal.api.failure.v1.ApplicationFailureInfo.verify|verify} messages. - * @param message ApplicationFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.failure.v1.IApplicationFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ApplicationFailureInfo message, length delimited. Does not implicitly {@link temporal.api.failure.v1.ApplicationFailureInfo.verify|verify} messages. - * @param message ApplicationFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.failure.v1.IApplicationFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ApplicationFailureInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ApplicationFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.failure.v1.ApplicationFailureInfo; - - /** - * Decodes an ApplicationFailureInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ApplicationFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.failure.v1.ApplicationFailureInfo; - - /** - * Creates an ApplicationFailureInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ApplicationFailureInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.failure.v1.ApplicationFailureInfo; - - /** - * Creates a plain object from an ApplicationFailureInfo message. Also converts values to other types if specified. - * @param message ApplicationFailureInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.failure.v1.ApplicationFailureInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ApplicationFailureInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ApplicationFailureInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TimeoutFailureInfo. */ - interface ITimeoutFailureInfo { - - /** TimeoutFailureInfo timeoutType */ - timeoutType?: (temporal.api.enums.v1.TimeoutType|null); - - /** TimeoutFailureInfo lastHeartbeatDetails */ - lastHeartbeatDetails?: (temporal.api.common.v1.IPayloads|null); - } - - /** Represents a TimeoutFailureInfo. */ - class TimeoutFailureInfo implements ITimeoutFailureInfo { - - /** - * Constructs a new TimeoutFailureInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.failure.v1.ITimeoutFailureInfo); - - /** TimeoutFailureInfo timeoutType. */ - public timeoutType: temporal.api.enums.v1.TimeoutType; - - /** TimeoutFailureInfo lastHeartbeatDetails. */ - public lastHeartbeatDetails?: (temporal.api.common.v1.IPayloads|null); - - /** - * Creates a new TimeoutFailureInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns TimeoutFailureInfo instance - */ - public static create(properties?: temporal.api.failure.v1.ITimeoutFailureInfo): temporal.api.failure.v1.TimeoutFailureInfo; - - /** - * Encodes the specified TimeoutFailureInfo message. Does not implicitly {@link temporal.api.failure.v1.TimeoutFailureInfo.verify|verify} messages. - * @param message TimeoutFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.failure.v1.ITimeoutFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimeoutFailureInfo message, length delimited. Does not implicitly {@link temporal.api.failure.v1.TimeoutFailureInfo.verify|verify} messages. - * @param message TimeoutFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.failure.v1.ITimeoutFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimeoutFailureInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimeoutFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.failure.v1.TimeoutFailureInfo; - - /** - * Decodes a TimeoutFailureInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimeoutFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.failure.v1.TimeoutFailureInfo; - - /** - * Creates a TimeoutFailureInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimeoutFailureInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.failure.v1.TimeoutFailureInfo; - - /** - * Creates a plain object from a TimeoutFailureInfo message. Also converts values to other types if specified. - * @param message TimeoutFailureInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.failure.v1.TimeoutFailureInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimeoutFailureInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TimeoutFailureInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CanceledFailureInfo. */ - interface ICanceledFailureInfo { - - /** CanceledFailureInfo details */ - details?: (temporal.api.common.v1.IPayloads|null); - } - - /** Represents a CanceledFailureInfo. */ - class CanceledFailureInfo implements ICanceledFailureInfo { - - /** - * Constructs a new CanceledFailureInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.failure.v1.ICanceledFailureInfo); - - /** CanceledFailureInfo details. */ - public details?: (temporal.api.common.v1.IPayloads|null); - - /** - * Creates a new CanceledFailureInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CanceledFailureInfo instance - */ - public static create(properties?: temporal.api.failure.v1.ICanceledFailureInfo): temporal.api.failure.v1.CanceledFailureInfo; - - /** - * Encodes the specified CanceledFailureInfo message. Does not implicitly {@link temporal.api.failure.v1.CanceledFailureInfo.verify|verify} messages. - * @param message CanceledFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.failure.v1.ICanceledFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CanceledFailureInfo message, length delimited. Does not implicitly {@link temporal.api.failure.v1.CanceledFailureInfo.verify|verify} messages. - * @param message CanceledFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.failure.v1.ICanceledFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CanceledFailureInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CanceledFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.failure.v1.CanceledFailureInfo; - - /** - * Decodes a CanceledFailureInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CanceledFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.failure.v1.CanceledFailureInfo; - - /** - * Creates a CanceledFailureInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CanceledFailureInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.failure.v1.CanceledFailureInfo; - - /** - * Creates a plain object from a CanceledFailureInfo message. Also converts values to other types if specified. - * @param message CanceledFailureInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.failure.v1.CanceledFailureInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CanceledFailureInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CanceledFailureInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TerminatedFailureInfo. */ - interface ITerminatedFailureInfo { - } - - /** Represents a TerminatedFailureInfo. */ - class TerminatedFailureInfo implements ITerminatedFailureInfo { - - /** - * Constructs a new TerminatedFailureInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.failure.v1.ITerminatedFailureInfo); - - /** - * Creates a new TerminatedFailureInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns TerminatedFailureInfo instance - */ - public static create(properties?: temporal.api.failure.v1.ITerminatedFailureInfo): temporal.api.failure.v1.TerminatedFailureInfo; - - /** - * Encodes the specified TerminatedFailureInfo message. Does not implicitly {@link temporal.api.failure.v1.TerminatedFailureInfo.verify|verify} messages. - * @param message TerminatedFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.failure.v1.ITerminatedFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TerminatedFailureInfo message, length delimited. Does not implicitly {@link temporal.api.failure.v1.TerminatedFailureInfo.verify|verify} messages. - * @param message TerminatedFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.failure.v1.ITerminatedFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TerminatedFailureInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TerminatedFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.failure.v1.TerminatedFailureInfo; - - /** - * Decodes a TerminatedFailureInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TerminatedFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.failure.v1.TerminatedFailureInfo; - - /** - * Creates a TerminatedFailureInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TerminatedFailureInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.failure.v1.TerminatedFailureInfo; - - /** - * Creates a plain object from a TerminatedFailureInfo message. Also converts values to other types if specified. - * @param message TerminatedFailureInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.failure.v1.TerminatedFailureInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TerminatedFailureInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TerminatedFailureInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServerFailureInfo. */ - interface IServerFailureInfo { - - /** ServerFailureInfo nonRetryable */ - nonRetryable?: (boolean|null); - } - - /** Represents a ServerFailureInfo. */ - class ServerFailureInfo implements IServerFailureInfo { - - /** - * Constructs a new ServerFailureInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.failure.v1.IServerFailureInfo); - - /** ServerFailureInfo nonRetryable. */ - public nonRetryable: boolean; - - /** - * Creates a new ServerFailureInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ServerFailureInfo instance - */ - public static create(properties?: temporal.api.failure.v1.IServerFailureInfo): temporal.api.failure.v1.ServerFailureInfo; - - /** - * Encodes the specified ServerFailureInfo message. Does not implicitly {@link temporal.api.failure.v1.ServerFailureInfo.verify|verify} messages. - * @param message ServerFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.failure.v1.IServerFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServerFailureInfo message, length delimited. Does not implicitly {@link temporal.api.failure.v1.ServerFailureInfo.verify|verify} messages. - * @param message ServerFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.failure.v1.IServerFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServerFailureInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServerFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.failure.v1.ServerFailureInfo; - - /** - * Decodes a ServerFailureInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServerFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.failure.v1.ServerFailureInfo; - - /** - * Creates a ServerFailureInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServerFailureInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.failure.v1.ServerFailureInfo; - - /** - * Creates a plain object from a ServerFailureInfo message. Also converts values to other types if specified. - * @param message ServerFailureInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.failure.v1.ServerFailureInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServerFailureInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServerFailureInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResetWorkflowFailureInfo. */ - interface IResetWorkflowFailureInfo { - - /** ResetWorkflowFailureInfo lastHeartbeatDetails */ - lastHeartbeatDetails?: (temporal.api.common.v1.IPayloads|null); - } - - /** Represents a ResetWorkflowFailureInfo. */ - class ResetWorkflowFailureInfo implements IResetWorkflowFailureInfo { - - /** - * Constructs a new ResetWorkflowFailureInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.failure.v1.IResetWorkflowFailureInfo); - - /** ResetWorkflowFailureInfo lastHeartbeatDetails. */ - public lastHeartbeatDetails?: (temporal.api.common.v1.IPayloads|null); - - /** - * Creates a new ResetWorkflowFailureInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetWorkflowFailureInfo instance - */ - public static create(properties?: temporal.api.failure.v1.IResetWorkflowFailureInfo): temporal.api.failure.v1.ResetWorkflowFailureInfo; - - /** - * Encodes the specified ResetWorkflowFailureInfo message. Does not implicitly {@link temporal.api.failure.v1.ResetWorkflowFailureInfo.verify|verify} messages. - * @param message ResetWorkflowFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.failure.v1.IResetWorkflowFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetWorkflowFailureInfo message, length delimited. Does not implicitly {@link temporal.api.failure.v1.ResetWorkflowFailureInfo.verify|verify} messages. - * @param message ResetWorkflowFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.failure.v1.IResetWorkflowFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetWorkflowFailureInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetWorkflowFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.failure.v1.ResetWorkflowFailureInfo; - - /** - * Decodes a ResetWorkflowFailureInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetWorkflowFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.failure.v1.ResetWorkflowFailureInfo; - - /** - * Creates a ResetWorkflowFailureInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetWorkflowFailureInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.failure.v1.ResetWorkflowFailureInfo; - - /** - * Creates a plain object from a ResetWorkflowFailureInfo message. Also converts values to other types if specified. - * @param message ResetWorkflowFailureInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.failure.v1.ResetWorkflowFailureInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetWorkflowFailureInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetWorkflowFailureInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityFailureInfo. */ - interface IActivityFailureInfo { - - /** ActivityFailureInfo scheduledEventId */ - scheduledEventId?: (Long|null); - - /** ActivityFailureInfo startedEventId */ - startedEventId?: (Long|null); - - /** ActivityFailureInfo identity */ - identity?: (string|null); - - /** ActivityFailureInfo activityType */ - activityType?: (temporal.api.common.v1.IActivityType|null); - - /** ActivityFailureInfo activityId */ - activityId?: (string|null); - - /** ActivityFailureInfo retryState */ - retryState?: (temporal.api.enums.v1.RetryState|null); - } - - /** Represents an ActivityFailureInfo. */ - class ActivityFailureInfo implements IActivityFailureInfo { - - /** - * Constructs a new ActivityFailureInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.failure.v1.IActivityFailureInfo); - - /** ActivityFailureInfo scheduledEventId. */ - public scheduledEventId: Long; - - /** ActivityFailureInfo startedEventId. */ - public startedEventId: Long; - - /** ActivityFailureInfo identity. */ - public identity: string; - - /** ActivityFailureInfo activityType. */ - public activityType?: (temporal.api.common.v1.IActivityType|null); - - /** ActivityFailureInfo activityId. */ - public activityId: string; - - /** ActivityFailureInfo retryState. */ - public retryState: temporal.api.enums.v1.RetryState; - - /** - * Creates a new ActivityFailureInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityFailureInfo instance - */ - public static create(properties?: temporal.api.failure.v1.IActivityFailureInfo): temporal.api.failure.v1.ActivityFailureInfo; - - /** - * Encodes the specified ActivityFailureInfo message. Does not implicitly {@link temporal.api.failure.v1.ActivityFailureInfo.verify|verify} messages. - * @param message ActivityFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.failure.v1.IActivityFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityFailureInfo message, length delimited. Does not implicitly {@link temporal.api.failure.v1.ActivityFailureInfo.verify|verify} messages. - * @param message ActivityFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.failure.v1.IActivityFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityFailureInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.failure.v1.ActivityFailureInfo; - - /** - * Decodes an ActivityFailureInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.failure.v1.ActivityFailureInfo; - - /** - * Creates an ActivityFailureInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityFailureInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.failure.v1.ActivityFailureInfo; - - /** - * Creates a plain object from an ActivityFailureInfo message. Also converts values to other types if specified. - * @param message ActivityFailureInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.failure.v1.ActivityFailureInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityFailureInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityFailureInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ChildWorkflowExecutionFailureInfo. */ - interface IChildWorkflowExecutionFailureInfo { - - /** ChildWorkflowExecutionFailureInfo namespace */ - namespace?: (string|null); - - /** ChildWorkflowExecutionFailureInfo workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ChildWorkflowExecutionFailureInfo workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** ChildWorkflowExecutionFailureInfo initiatedEventId */ - initiatedEventId?: (Long|null); - - /** ChildWorkflowExecutionFailureInfo startedEventId */ - startedEventId?: (Long|null); - - /** ChildWorkflowExecutionFailureInfo retryState */ - retryState?: (temporal.api.enums.v1.RetryState|null); - } - - /** Represents a ChildWorkflowExecutionFailureInfo. */ - class ChildWorkflowExecutionFailureInfo implements IChildWorkflowExecutionFailureInfo { - - /** - * Constructs a new ChildWorkflowExecutionFailureInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.failure.v1.IChildWorkflowExecutionFailureInfo); - - /** ChildWorkflowExecutionFailureInfo namespace. */ - public namespace: string; - - /** ChildWorkflowExecutionFailureInfo workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ChildWorkflowExecutionFailureInfo workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** ChildWorkflowExecutionFailureInfo initiatedEventId. */ - public initiatedEventId: Long; - - /** ChildWorkflowExecutionFailureInfo startedEventId. */ - public startedEventId: Long; - - /** ChildWorkflowExecutionFailureInfo retryState. */ - public retryState: temporal.api.enums.v1.RetryState; - - /** - * Creates a new ChildWorkflowExecutionFailureInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ChildWorkflowExecutionFailureInfo instance - */ - public static create(properties?: temporal.api.failure.v1.IChildWorkflowExecutionFailureInfo): temporal.api.failure.v1.ChildWorkflowExecutionFailureInfo; - - /** - * Encodes the specified ChildWorkflowExecutionFailureInfo message. Does not implicitly {@link temporal.api.failure.v1.ChildWorkflowExecutionFailureInfo.verify|verify} messages. - * @param message ChildWorkflowExecutionFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.failure.v1.IChildWorkflowExecutionFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ChildWorkflowExecutionFailureInfo message, length delimited. Does not implicitly {@link temporal.api.failure.v1.ChildWorkflowExecutionFailureInfo.verify|verify} messages. - * @param message ChildWorkflowExecutionFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.failure.v1.IChildWorkflowExecutionFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ChildWorkflowExecutionFailureInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChildWorkflowExecutionFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.failure.v1.ChildWorkflowExecutionFailureInfo; - - /** - * Decodes a ChildWorkflowExecutionFailureInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChildWorkflowExecutionFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.failure.v1.ChildWorkflowExecutionFailureInfo; - - /** - * Creates a ChildWorkflowExecutionFailureInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChildWorkflowExecutionFailureInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.failure.v1.ChildWorkflowExecutionFailureInfo; - - /** - * Creates a plain object from a ChildWorkflowExecutionFailureInfo message. Also converts values to other types if specified. - * @param message ChildWorkflowExecutionFailureInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.failure.v1.ChildWorkflowExecutionFailureInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ChildWorkflowExecutionFailureInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ChildWorkflowExecutionFailureInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusOperationFailureInfo. */ - interface INexusOperationFailureInfo { - - /** The NexusOperationScheduled event ID. */ - scheduledEventId?: (Long|null); - - /** Endpoint name. */ - endpoint?: (string|null); - - /** Service name. */ - service?: (string|null); - - /** Operation name. */ - operation?: (string|null); - - /** - * Operation ID - may be empty if the operation completed synchronously. - * - * Deprecated. Renamed to operation_token. - */ - operationId?: (string|null); - - /** Operation token - may be empty if the operation completed synchronously. */ - operationToken?: (string|null); - } - - /** Representation of the Temporal SDK NexusOperationError object that is returned to workflow callers. */ - class NexusOperationFailureInfo implements INexusOperationFailureInfo { - - /** - * Constructs a new NexusOperationFailureInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.failure.v1.INexusOperationFailureInfo); - - /** The NexusOperationScheduled event ID. */ - public scheduledEventId: Long; - - /** Endpoint name. */ - public endpoint: string; - - /** Service name. */ - public service: string; - - /** Operation name. */ - public operation: string; - - /** - * Operation ID - may be empty if the operation completed synchronously. - * - * Deprecated. Renamed to operation_token. - */ - public operationId: string; - - /** Operation token - may be empty if the operation completed synchronously. */ - public operationToken: string; - - /** - * Creates a new NexusOperationFailureInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusOperationFailureInfo instance - */ - public static create(properties?: temporal.api.failure.v1.INexusOperationFailureInfo): temporal.api.failure.v1.NexusOperationFailureInfo; - - /** - * Encodes the specified NexusOperationFailureInfo message. Does not implicitly {@link temporal.api.failure.v1.NexusOperationFailureInfo.verify|verify} messages. - * @param message NexusOperationFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.failure.v1.INexusOperationFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusOperationFailureInfo message, length delimited. Does not implicitly {@link temporal.api.failure.v1.NexusOperationFailureInfo.verify|verify} messages. - * @param message NexusOperationFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.failure.v1.INexusOperationFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusOperationFailureInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusOperationFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.failure.v1.NexusOperationFailureInfo; - - /** - * Decodes a NexusOperationFailureInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusOperationFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.failure.v1.NexusOperationFailureInfo; - - /** - * Creates a NexusOperationFailureInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusOperationFailureInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.failure.v1.NexusOperationFailureInfo; - - /** - * Creates a plain object from a NexusOperationFailureInfo message. Also converts values to other types if specified. - * @param message NexusOperationFailureInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.failure.v1.NexusOperationFailureInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusOperationFailureInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusOperationFailureInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusHandlerFailureInfo. */ - interface INexusHandlerFailureInfo { - - /** - * The Nexus error type as defined in the spec: - * https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors. - */ - type?: (string|null); - - /** Retry behavior, defaults to the retry behavior of the error type as defined in the spec. */ - retryBehavior?: (temporal.api.enums.v1.NexusHandlerErrorRetryBehavior|null); - } - - /** Represents a NexusHandlerFailureInfo. */ - class NexusHandlerFailureInfo implements INexusHandlerFailureInfo { - - /** - * Constructs a new NexusHandlerFailureInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.failure.v1.INexusHandlerFailureInfo); - - /** - * The Nexus error type as defined in the spec: - * https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors. - */ - public type: string; - - /** Retry behavior, defaults to the retry behavior of the error type as defined in the spec. */ - public retryBehavior: temporal.api.enums.v1.NexusHandlerErrorRetryBehavior; - - /** - * Creates a new NexusHandlerFailureInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusHandlerFailureInfo instance - */ - public static create(properties?: temporal.api.failure.v1.INexusHandlerFailureInfo): temporal.api.failure.v1.NexusHandlerFailureInfo; - - /** - * Encodes the specified NexusHandlerFailureInfo message. Does not implicitly {@link temporal.api.failure.v1.NexusHandlerFailureInfo.verify|verify} messages. - * @param message NexusHandlerFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.failure.v1.INexusHandlerFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusHandlerFailureInfo message, length delimited. Does not implicitly {@link temporal.api.failure.v1.NexusHandlerFailureInfo.verify|verify} messages. - * @param message NexusHandlerFailureInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.failure.v1.INexusHandlerFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusHandlerFailureInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusHandlerFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.failure.v1.NexusHandlerFailureInfo; - - /** - * Decodes a NexusHandlerFailureInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusHandlerFailureInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.failure.v1.NexusHandlerFailureInfo; - - /** - * Creates a NexusHandlerFailureInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusHandlerFailureInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.failure.v1.NexusHandlerFailureInfo; - - /** - * Creates a plain object from a NexusHandlerFailureInfo message. Also converts values to other types if specified. - * @param message NexusHandlerFailureInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.failure.v1.NexusHandlerFailureInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusHandlerFailureInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusHandlerFailureInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Failure. */ - interface IFailure { - - /** Failure message */ - message?: (string|null); - - /** - * The source this Failure originated in, e.g. TypeScriptSDK / JavaSDK - * In some SDKs this is used to rehydrate the stack trace into an exception object. - */ - source?: (string|null); - - /** Failure stackTrace */ - stackTrace?: (string|null); - - /** - * Alternative way to supply `message` and `stack_trace` and possibly other attributes, used for encryption of - * errors originating in user code which might contain sensitive information. - * The `encoded_attributes` Payload could represent any serializable object, e.g. JSON object or a `Failure` proto - * message. - * - * SDK authors: - * - The SDK should provide a default `encodeFailureAttributes` and `decodeFailureAttributes` implementation that: - * - Uses a JSON object to represent `{ message, stack_trace }`. - * - Overwrites the original message with "Encoded failure" to indicate that more information could be extracted. - * - Overwrites the original stack_trace with an empty string. - * - The resulting JSON object is converted to Payload using the default PayloadConverter and should be processed - * by the user-provided PayloadCodec - * - * - If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes. - * (-- api-linter: core::0203::optional=disabled --) - */ - encodedAttributes?: (temporal.api.common.v1.IPayload|null); - - /** Failure cause */ - cause?: (temporal.api.failure.v1.IFailure|null); - - /** Failure applicationFailureInfo */ - applicationFailureInfo?: (temporal.api.failure.v1.IApplicationFailureInfo|null); - - /** Failure timeoutFailureInfo */ - timeoutFailureInfo?: (temporal.api.failure.v1.ITimeoutFailureInfo|null); - - /** Failure canceledFailureInfo */ - canceledFailureInfo?: (temporal.api.failure.v1.ICanceledFailureInfo|null); - - /** Failure terminatedFailureInfo */ - terminatedFailureInfo?: (temporal.api.failure.v1.ITerminatedFailureInfo|null); - - /** Failure serverFailureInfo */ - serverFailureInfo?: (temporal.api.failure.v1.IServerFailureInfo|null); - - /** Failure resetWorkflowFailureInfo */ - resetWorkflowFailureInfo?: (temporal.api.failure.v1.IResetWorkflowFailureInfo|null); - - /** Failure activityFailureInfo */ - activityFailureInfo?: (temporal.api.failure.v1.IActivityFailureInfo|null); - - /** Failure childWorkflowExecutionFailureInfo */ - childWorkflowExecutionFailureInfo?: (temporal.api.failure.v1.IChildWorkflowExecutionFailureInfo|null); - - /** Failure nexusOperationExecutionFailureInfo */ - nexusOperationExecutionFailureInfo?: (temporal.api.failure.v1.INexusOperationFailureInfo|null); - - /** Failure nexusHandlerFailureInfo */ - nexusHandlerFailureInfo?: (temporal.api.failure.v1.INexusHandlerFailureInfo|null); - } - - /** Represents a Failure. */ - class Failure implements IFailure { - - /** - * Constructs a new Failure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.failure.v1.IFailure); - - /** Failure message. */ - public message: string; - - /** - * The source this Failure originated in, e.g. TypeScriptSDK / JavaSDK - * In some SDKs this is used to rehydrate the stack trace into an exception object. - */ - public source: string; - - /** Failure stackTrace. */ - public stackTrace: string; - - /** - * Alternative way to supply `message` and `stack_trace` and possibly other attributes, used for encryption of - * errors originating in user code which might contain sensitive information. - * The `encoded_attributes` Payload could represent any serializable object, e.g. JSON object or a `Failure` proto - * message. - * - * SDK authors: - * - The SDK should provide a default `encodeFailureAttributes` and `decodeFailureAttributes` implementation that: - * - Uses a JSON object to represent `{ message, stack_trace }`. - * - Overwrites the original message with "Encoded failure" to indicate that more information could be extracted. - * - Overwrites the original stack_trace with an empty string. - * - The resulting JSON object is converted to Payload using the default PayloadConverter and should be processed - * by the user-provided PayloadCodec - * - * - If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes. - * (-- api-linter: core::0203::optional=disabled --) - */ - public encodedAttributes?: (temporal.api.common.v1.IPayload|null); - - /** Failure cause. */ - public cause?: (temporal.api.failure.v1.IFailure|null); - - /** Failure applicationFailureInfo. */ - public applicationFailureInfo?: (temporal.api.failure.v1.IApplicationFailureInfo|null); - - /** Failure timeoutFailureInfo. */ - public timeoutFailureInfo?: (temporal.api.failure.v1.ITimeoutFailureInfo|null); - - /** Failure canceledFailureInfo. */ - public canceledFailureInfo?: (temporal.api.failure.v1.ICanceledFailureInfo|null); - - /** Failure terminatedFailureInfo. */ - public terminatedFailureInfo?: (temporal.api.failure.v1.ITerminatedFailureInfo|null); - - /** Failure serverFailureInfo. */ - public serverFailureInfo?: (temporal.api.failure.v1.IServerFailureInfo|null); - - /** Failure resetWorkflowFailureInfo. */ - public resetWorkflowFailureInfo?: (temporal.api.failure.v1.IResetWorkflowFailureInfo|null); - - /** Failure activityFailureInfo. */ - public activityFailureInfo?: (temporal.api.failure.v1.IActivityFailureInfo|null); - - /** Failure childWorkflowExecutionFailureInfo. */ - public childWorkflowExecutionFailureInfo?: (temporal.api.failure.v1.IChildWorkflowExecutionFailureInfo|null); - - /** Failure nexusOperationExecutionFailureInfo. */ - public nexusOperationExecutionFailureInfo?: (temporal.api.failure.v1.INexusOperationFailureInfo|null); - - /** Failure nexusHandlerFailureInfo. */ - public nexusHandlerFailureInfo?: (temporal.api.failure.v1.INexusHandlerFailureInfo|null); - - /** Failure failureInfo. */ - public failureInfo?: ("applicationFailureInfo"|"timeoutFailureInfo"|"canceledFailureInfo"|"terminatedFailureInfo"|"serverFailureInfo"|"resetWorkflowFailureInfo"|"activityFailureInfo"|"childWorkflowExecutionFailureInfo"|"nexusOperationExecutionFailureInfo"|"nexusHandlerFailureInfo"); - - /** - * Creates a new Failure instance using the specified properties. - * @param [properties] Properties to set - * @returns Failure instance - */ - public static create(properties?: temporal.api.failure.v1.IFailure): temporal.api.failure.v1.Failure; - - /** - * Encodes the specified Failure message. Does not implicitly {@link temporal.api.failure.v1.Failure.verify|verify} messages. - * @param message Failure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.failure.v1.IFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Failure message, length delimited. Does not implicitly {@link temporal.api.failure.v1.Failure.verify|verify} messages. - * @param message Failure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.failure.v1.IFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Failure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.failure.v1.Failure; - - /** - * Decodes a Failure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.failure.v1.Failure; - - /** - * Creates a Failure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Failure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.failure.v1.Failure; - - /** - * Creates a plain object from a Failure message. Also converts values to other types if specified. - * @param message Failure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.failure.v1.Failure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Failure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Failure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MultiOperationExecutionAborted. */ - interface IMultiOperationExecutionAborted { - } - - /** Represents a MultiOperationExecutionAborted. */ - class MultiOperationExecutionAborted implements IMultiOperationExecutionAborted { - - /** - * Constructs a new MultiOperationExecutionAborted. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.failure.v1.IMultiOperationExecutionAborted); - - /** - * Creates a new MultiOperationExecutionAborted instance using the specified properties. - * @param [properties] Properties to set - * @returns MultiOperationExecutionAborted instance - */ - public static create(properties?: temporal.api.failure.v1.IMultiOperationExecutionAborted): temporal.api.failure.v1.MultiOperationExecutionAborted; - - /** - * Encodes the specified MultiOperationExecutionAborted message. Does not implicitly {@link temporal.api.failure.v1.MultiOperationExecutionAborted.verify|verify} messages. - * @param message MultiOperationExecutionAborted message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.failure.v1.IMultiOperationExecutionAborted, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MultiOperationExecutionAborted message, length delimited. Does not implicitly {@link temporal.api.failure.v1.MultiOperationExecutionAborted.verify|verify} messages. - * @param message MultiOperationExecutionAborted message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.failure.v1.IMultiOperationExecutionAborted, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MultiOperationExecutionAborted message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MultiOperationExecutionAborted - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.failure.v1.MultiOperationExecutionAborted; - - /** - * Decodes a MultiOperationExecutionAborted message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MultiOperationExecutionAborted - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.failure.v1.MultiOperationExecutionAborted; - - /** - * Creates a MultiOperationExecutionAborted message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MultiOperationExecutionAborted - */ - public static fromObject(object: { [k: string]: any }): temporal.api.failure.v1.MultiOperationExecutionAborted; - - /** - * Creates a plain object from a MultiOperationExecutionAborted message. Also converts values to other types if specified. - * @param message MultiOperationExecutionAborted - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.failure.v1.MultiOperationExecutionAborted, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MultiOperationExecutionAborted to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MultiOperationExecutionAborted - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace update. */ - namespace update { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a WaitPolicy. */ - interface IWaitPolicy { - - /** - * Indicates the Update lifecycle stage that the Update must reach before - * API call is returned. - * NOTE: This field works together with API call timeout which is limited by - * server timeout (maximum wait time). If server timeout is expired before - * user specified timeout, API call returns even if specified stage is not reached. - */ - lifecycleStage?: (temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage|null); - } - - /** Specifies client's intent to wait for Update results. */ - class WaitPolicy implements IWaitPolicy { - - /** - * Constructs a new WaitPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.update.v1.IWaitPolicy); - - /** - * Indicates the Update lifecycle stage that the Update must reach before - * API call is returned. - * NOTE: This field works together with API call timeout which is limited by - * server timeout (maximum wait time). If server timeout is expired before - * user specified timeout, API call returns even if specified stage is not reached. - */ - public lifecycleStage: temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage; - - /** - * Creates a new WaitPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns WaitPolicy instance - */ - public static create(properties?: temporal.api.update.v1.IWaitPolicy): temporal.api.update.v1.WaitPolicy; - - /** - * Encodes the specified WaitPolicy message. Does not implicitly {@link temporal.api.update.v1.WaitPolicy.verify|verify} messages. - * @param message WaitPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.update.v1.IWaitPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WaitPolicy message, length delimited. Does not implicitly {@link temporal.api.update.v1.WaitPolicy.verify|verify} messages. - * @param message WaitPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.update.v1.IWaitPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WaitPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WaitPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.update.v1.WaitPolicy; - - /** - * Decodes a WaitPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WaitPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.update.v1.WaitPolicy; - - /** - * Creates a WaitPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WaitPolicy - */ - public static fromObject(object: { [k: string]: any }): temporal.api.update.v1.WaitPolicy; - - /** - * Creates a plain object from a WaitPolicy message. Also converts values to other types if specified. - * @param message WaitPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.update.v1.WaitPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WaitPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WaitPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateRef. */ - interface IUpdateRef { - - /** UpdateRef workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** UpdateRef updateId */ - updateId?: (string|null); - } - - /** The data needed by a client to refer to a previously invoked Workflow Update. */ - class UpdateRef implements IUpdateRef { - - /** - * Constructs a new UpdateRef. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.update.v1.IUpdateRef); - - /** UpdateRef workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** UpdateRef updateId. */ - public updateId: string; - - /** - * Creates a new UpdateRef instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateRef instance - */ - public static create(properties?: temporal.api.update.v1.IUpdateRef): temporal.api.update.v1.UpdateRef; - - /** - * Encodes the specified UpdateRef message. Does not implicitly {@link temporal.api.update.v1.UpdateRef.verify|verify} messages. - * @param message UpdateRef message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.update.v1.IUpdateRef, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateRef message, length delimited. Does not implicitly {@link temporal.api.update.v1.UpdateRef.verify|verify} messages. - * @param message UpdateRef message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.update.v1.IUpdateRef, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateRef message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateRef - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.update.v1.UpdateRef; - - /** - * Decodes an UpdateRef message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateRef - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.update.v1.UpdateRef; - - /** - * Creates an UpdateRef message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateRef - */ - public static fromObject(object: { [k: string]: any }): temporal.api.update.v1.UpdateRef; - - /** - * Creates a plain object from an UpdateRef message. Also converts values to other types if specified. - * @param message UpdateRef - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.update.v1.UpdateRef, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateRef to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateRef - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Outcome. */ - interface IOutcome { - - /** Outcome success */ - success?: (temporal.api.common.v1.IPayloads|null); - - /** Outcome failure */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** The outcome of a Workflow Update: success or failure. */ - class Outcome implements IOutcome { - - /** - * Constructs a new Outcome. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.update.v1.IOutcome); - - /** Outcome success. */ - public success?: (temporal.api.common.v1.IPayloads|null); - - /** Outcome failure. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** Outcome value. */ - public value?: ("success"|"failure"); - - /** - * Creates a new Outcome instance using the specified properties. - * @param [properties] Properties to set - * @returns Outcome instance - */ - public static create(properties?: temporal.api.update.v1.IOutcome): temporal.api.update.v1.Outcome; - - /** - * Encodes the specified Outcome message. Does not implicitly {@link temporal.api.update.v1.Outcome.verify|verify} messages. - * @param message Outcome message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.update.v1.IOutcome, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Outcome message, length delimited. Does not implicitly {@link temporal.api.update.v1.Outcome.verify|verify} messages. - * @param message Outcome message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.update.v1.IOutcome, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Outcome message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Outcome - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.update.v1.Outcome; - - /** - * Decodes an Outcome message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Outcome - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.update.v1.Outcome; - - /** - * Creates an Outcome message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Outcome - */ - public static fromObject(object: { [k: string]: any }): temporal.api.update.v1.Outcome; - - /** - * Creates a plain object from an Outcome message. Also converts values to other types if specified. - * @param message Outcome - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.update.v1.Outcome, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Outcome to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Outcome - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Meta. */ - interface IMeta { - - /** An ID with workflow-scoped uniqueness for this Update. */ - updateId?: (string|null); - - /** A string identifying the agent that requested this Update. */ - identity?: (string|null); - } - - /** Metadata about a Workflow Update. */ - class Meta implements IMeta { - - /** - * Constructs a new Meta. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.update.v1.IMeta); - - /** An ID with workflow-scoped uniqueness for this Update. */ - public updateId: string; - - /** A string identifying the agent that requested this Update. */ - public identity: string; - - /** - * Creates a new Meta instance using the specified properties. - * @param [properties] Properties to set - * @returns Meta instance - */ - public static create(properties?: temporal.api.update.v1.IMeta): temporal.api.update.v1.Meta; - - /** - * Encodes the specified Meta message. Does not implicitly {@link temporal.api.update.v1.Meta.verify|verify} messages. - * @param message Meta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.update.v1.IMeta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Meta message, length delimited. Does not implicitly {@link temporal.api.update.v1.Meta.verify|verify} messages. - * @param message Meta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.update.v1.IMeta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Meta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Meta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.update.v1.Meta; - - /** - * Decodes a Meta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Meta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.update.v1.Meta; - - /** - * Creates a Meta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Meta - */ - public static fromObject(object: { [k: string]: any }): temporal.api.update.v1.Meta; - - /** - * Creates a plain object from a Meta message. Also converts values to other types if specified. - * @param message Meta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.update.v1.Meta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Meta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Meta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Input. */ - interface IInput { - - /** - * Headers that are passed with the Update from the requesting entity. - * These can include things like auth or tracing tokens. - */ - header?: (temporal.api.common.v1.IHeader|null); - - /** The name of the Update handler to invoke on the target Workflow. */ - name?: (string|null); - - /** The arguments to pass to the named Update handler. */ - args?: (temporal.api.common.v1.IPayloads|null); - } - - /** Represents an Input. */ - class Input implements IInput { - - /** - * Constructs a new Input. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.update.v1.IInput); - - /** - * Headers that are passed with the Update from the requesting entity. - * These can include things like auth or tracing tokens. - */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** The name of the Update handler to invoke on the target Workflow. */ - public name: string; - - /** The arguments to pass to the named Update handler. */ - public args?: (temporal.api.common.v1.IPayloads|null); - - /** - * Creates a new Input instance using the specified properties. - * @param [properties] Properties to set - * @returns Input instance - */ - public static create(properties?: temporal.api.update.v1.IInput): temporal.api.update.v1.Input; - - /** - * Encodes the specified Input message. Does not implicitly {@link temporal.api.update.v1.Input.verify|verify} messages. - * @param message Input message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.update.v1.IInput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Input message, length delimited. Does not implicitly {@link temporal.api.update.v1.Input.verify|verify} messages. - * @param message Input message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.update.v1.IInput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Input message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Input - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.update.v1.Input; - - /** - * Decodes an Input message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Input - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.update.v1.Input; - - /** - * Creates an Input message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Input - */ - public static fromObject(object: { [k: string]: any }): temporal.api.update.v1.Input; - - /** - * Creates a plain object from an Input message. Also converts values to other types if specified. - * @param message Input - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.update.v1.Input, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Input to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Input - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Request. */ - interface IRequest { - - /** Request meta */ - meta?: (temporal.api.update.v1.IMeta|null); - - /** Request input */ - input?: (temporal.api.update.v1.IInput|null); - } - - /** The client request that triggers a Workflow Update. */ - class Request implements IRequest { - - /** - * Constructs a new Request. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.update.v1.IRequest); - - /** Request meta. */ - public meta?: (temporal.api.update.v1.IMeta|null); - - /** Request input. */ - public input?: (temporal.api.update.v1.IInput|null); - - /** - * Creates a new Request instance using the specified properties. - * @param [properties] Properties to set - * @returns Request instance - */ - public static create(properties?: temporal.api.update.v1.IRequest): temporal.api.update.v1.Request; - - /** - * Encodes the specified Request message. Does not implicitly {@link temporal.api.update.v1.Request.verify|verify} messages. - * @param message Request message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.update.v1.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Request message, length delimited. Does not implicitly {@link temporal.api.update.v1.Request.verify|verify} messages. - * @param message Request message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.update.v1.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Request message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Request - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.update.v1.Request; - - /** - * Decodes a Request message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Request - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.update.v1.Request; - - /** - * Creates a Request message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Request - */ - public static fromObject(object: { [k: string]: any }): temporal.api.update.v1.Request; - - /** - * Creates a plain object from a Request message. Also converts values to other types if specified. - * @param message Request - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.update.v1.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Request to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Request - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Rejection. */ - interface IRejection { - - /** Rejection rejectedRequestMessageId */ - rejectedRequestMessageId?: (string|null); - - /** Rejection rejectedRequestSequencingEventId */ - rejectedRequestSequencingEventId?: (Long|null); - - /** Rejection rejectedRequest */ - rejectedRequest?: (temporal.api.update.v1.IRequest|null); - - /** Rejection failure */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** An Update protocol message indicating that a Workflow Update has been rejected. */ - class Rejection implements IRejection { - - /** - * Constructs a new Rejection. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.update.v1.IRejection); - - /** Rejection rejectedRequestMessageId. */ - public rejectedRequestMessageId: string; - - /** Rejection rejectedRequestSequencingEventId. */ - public rejectedRequestSequencingEventId: Long; - - /** Rejection rejectedRequest. */ - public rejectedRequest?: (temporal.api.update.v1.IRequest|null); - - /** Rejection failure. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new Rejection instance using the specified properties. - * @param [properties] Properties to set - * @returns Rejection instance - */ - public static create(properties?: temporal.api.update.v1.IRejection): temporal.api.update.v1.Rejection; - - /** - * Encodes the specified Rejection message. Does not implicitly {@link temporal.api.update.v1.Rejection.verify|verify} messages. - * @param message Rejection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.update.v1.IRejection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Rejection message, length delimited. Does not implicitly {@link temporal.api.update.v1.Rejection.verify|verify} messages. - * @param message Rejection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.update.v1.IRejection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Rejection message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Rejection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.update.v1.Rejection; - - /** - * Decodes a Rejection message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Rejection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.update.v1.Rejection; - - /** - * Creates a Rejection message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Rejection - */ - public static fromObject(object: { [k: string]: any }): temporal.api.update.v1.Rejection; - - /** - * Creates a plain object from a Rejection message. Also converts values to other types if specified. - * @param message Rejection - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.update.v1.Rejection, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Rejection to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Rejection - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Acceptance. */ - interface IAcceptance { - - /** Acceptance acceptedRequestMessageId */ - acceptedRequestMessageId?: (string|null); - - /** Acceptance acceptedRequestSequencingEventId */ - acceptedRequestSequencingEventId?: (Long|null); - - /** Acceptance acceptedRequest */ - acceptedRequest?: (temporal.api.update.v1.IRequest|null); - } - - /** - * An Update protocol message indicating that a Workflow Update has - * been accepted (i.e. passed the worker-side validation phase). - */ - class Acceptance implements IAcceptance { - - /** - * Constructs a new Acceptance. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.update.v1.IAcceptance); - - /** Acceptance acceptedRequestMessageId. */ - public acceptedRequestMessageId: string; - - /** Acceptance acceptedRequestSequencingEventId. */ - public acceptedRequestSequencingEventId: Long; - - /** Acceptance acceptedRequest. */ - public acceptedRequest?: (temporal.api.update.v1.IRequest|null); - - /** - * Creates a new Acceptance instance using the specified properties. - * @param [properties] Properties to set - * @returns Acceptance instance - */ - public static create(properties?: temporal.api.update.v1.IAcceptance): temporal.api.update.v1.Acceptance; - - /** - * Encodes the specified Acceptance message. Does not implicitly {@link temporal.api.update.v1.Acceptance.verify|verify} messages. - * @param message Acceptance message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.update.v1.IAcceptance, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Acceptance message, length delimited. Does not implicitly {@link temporal.api.update.v1.Acceptance.verify|verify} messages. - * @param message Acceptance message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.update.v1.IAcceptance, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Acceptance message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Acceptance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.update.v1.Acceptance; - - /** - * Decodes an Acceptance message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Acceptance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.update.v1.Acceptance; - - /** - * Creates an Acceptance message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Acceptance - */ - public static fromObject(object: { [k: string]: any }): temporal.api.update.v1.Acceptance; - - /** - * Creates a plain object from an Acceptance message. Also converts values to other types if specified. - * @param message Acceptance - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.update.v1.Acceptance, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Acceptance to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Acceptance - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Response. */ - interface IResponse { - - /** Response meta */ - meta?: (temporal.api.update.v1.IMeta|null); - - /** Response outcome */ - outcome?: (temporal.api.update.v1.IOutcome|null); - } - - /** - * An Update protocol message indicating that a Workflow Update has - * completed with the contained outcome. - */ - class Response implements IResponse { - - /** - * Constructs a new Response. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.update.v1.IResponse); - - /** Response meta. */ - public meta?: (temporal.api.update.v1.IMeta|null); - - /** Response outcome. */ - public outcome?: (temporal.api.update.v1.IOutcome|null); - - /** - * Creates a new Response instance using the specified properties. - * @param [properties] Properties to set - * @returns Response instance - */ - public static create(properties?: temporal.api.update.v1.IResponse): temporal.api.update.v1.Response; - - /** - * Encodes the specified Response message. Does not implicitly {@link temporal.api.update.v1.Response.verify|verify} messages. - * @param message Response message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.update.v1.IResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Response message, length delimited. Does not implicitly {@link temporal.api.update.v1.Response.verify|verify} messages. - * @param message Response message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.update.v1.IResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Response message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Response - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.update.v1.Response; - - /** - * Decodes a Response message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Response - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.update.v1.Response; - - /** - * Creates a Response message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Response - */ - public static fromObject(object: { [k: string]: any }): temporal.api.update.v1.Response; - - /** - * Creates a plain object from a Response message. Also converts values to other types if specified. - * @param message Response - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.update.v1.Response, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Response to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Response - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace nexus. */ - namespace nexus { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a Failure. */ - interface IFailure { - - /** Failure message */ - message?: (string|null); - - /** Failure stackTrace */ - stackTrace?: (string|null); - - /** Failure metadata */ - metadata?: ({ [k: string]: string }|null); - - /** UTF-8 encoded JSON serializable details. */ - details?: (Uint8Array|null); - - /** Failure cause */ - cause?: (temporal.api.nexus.v1.IFailure|null); - } - - /** - * A general purpose failure message. - * See: https://github.com/nexus-rpc/api/blob/main/SPEC.md#failure - */ - class Failure implements IFailure { - - /** - * Constructs a new Failure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.IFailure); - - /** Failure message. */ - public message: string; - - /** Failure stackTrace. */ - public stackTrace: string; - - /** Failure metadata. */ - public metadata: { [k: string]: string }; - - /** UTF-8 encoded JSON serializable details. */ - public details: Uint8Array; - - /** Failure cause. */ - public cause?: (temporal.api.nexus.v1.IFailure|null); - - /** - * Creates a new Failure instance using the specified properties. - * @param [properties] Properties to set - * @returns Failure instance - */ - public static create(properties?: temporal.api.nexus.v1.IFailure): temporal.api.nexus.v1.Failure; - - /** - * Encodes the specified Failure message. Does not implicitly {@link temporal.api.nexus.v1.Failure.verify|verify} messages. - * @param message Failure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.IFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Failure message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.Failure.verify|verify} messages. - * @param message Failure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.IFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Failure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.Failure; - - /** - * Decodes a Failure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.Failure; - - /** - * Creates a Failure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Failure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.Failure; - - /** - * Creates a plain object from a Failure message. Also converts values to other types if specified. - * @param message Failure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.Failure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Failure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Failure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HandlerError. */ - interface IHandlerError { - - /** See https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors. */ - errorType?: (string|null); - - /** HandlerError failure */ - failure?: (temporal.api.nexus.v1.IFailure|null); - - /** Retry behavior, defaults to the retry behavior of the error type as defined in the spec. */ - retryBehavior?: (temporal.api.enums.v1.NexusHandlerErrorRetryBehavior|null); - } - - /** Represents a HandlerError. */ - class HandlerError implements IHandlerError { - - /** - * Constructs a new HandlerError. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.IHandlerError); - - /** See https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors. */ - public errorType: string; - - /** HandlerError failure. */ - public failure?: (temporal.api.nexus.v1.IFailure|null); - - /** Retry behavior, defaults to the retry behavior of the error type as defined in the spec. */ - public retryBehavior: temporal.api.enums.v1.NexusHandlerErrorRetryBehavior; - - /** - * Creates a new HandlerError instance using the specified properties. - * @param [properties] Properties to set - * @returns HandlerError instance - */ - public static create(properties?: temporal.api.nexus.v1.IHandlerError): temporal.api.nexus.v1.HandlerError; - - /** - * Encodes the specified HandlerError message. Does not implicitly {@link temporal.api.nexus.v1.HandlerError.verify|verify} messages. - * @param message HandlerError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.IHandlerError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HandlerError message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.HandlerError.verify|verify} messages. - * @param message HandlerError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.IHandlerError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HandlerError message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HandlerError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.HandlerError; - - /** - * Decodes a HandlerError message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HandlerError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.HandlerError; - - /** - * Creates a HandlerError message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HandlerError - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.HandlerError; - - /** - * Creates a plain object from a HandlerError message. Also converts values to other types if specified. - * @param message HandlerError - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.HandlerError, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HandlerError to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HandlerError - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UnsuccessfulOperationError. */ - interface IUnsuccessfulOperationError { - - /** See https://github.com/nexus-rpc/api/blob/main/SPEC.md#operationinfo. */ - operationState?: (string|null); - - /** UnsuccessfulOperationError failure */ - failure?: (temporal.api.nexus.v1.IFailure|null); - } - - /** Represents an UnsuccessfulOperationError. */ - class UnsuccessfulOperationError implements IUnsuccessfulOperationError { - - /** - * Constructs a new UnsuccessfulOperationError. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.IUnsuccessfulOperationError); - - /** See https://github.com/nexus-rpc/api/blob/main/SPEC.md#operationinfo. */ - public operationState: string; - - /** UnsuccessfulOperationError failure. */ - public failure?: (temporal.api.nexus.v1.IFailure|null); - - /** - * Creates a new UnsuccessfulOperationError instance using the specified properties. - * @param [properties] Properties to set - * @returns UnsuccessfulOperationError instance - */ - public static create(properties?: temporal.api.nexus.v1.IUnsuccessfulOperationError): temporal.api.nexus.v1.UnsuccessfulOperationError; - - /** - * Encodes the specified UnsuccessfulOperationError message. Does not implicitly {@link temporal.api.nexus.v1.UnsuccessfulOperationError.verify|verify} messages. - * @param message UnsuccessfulOperationError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.IUnsuccessfulOperationError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnsuccessfulOperationError message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.UnsuccessfulOperationError.verify|verify} messages. - * @param message UnsuccessfulOperationError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.IUnsuccessfulOperationError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnsuccessfulOperationError message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnsuccessfulOperationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.UnsuccessfulOperationError; - - /** - * Decodes an UnsuccessfulOperationError message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnsuccessfulOperationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.UnsuccessfulOperationError; - - /** - * Creates an UnsuccessfulOperationError message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnsuccessfulOperationError - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.UnsuccessfulOperationError; - - /** - * Creates a plain object from an UnsuccessfulOperationError message. Also converts values to other types if specified. - * @param message UnsuccessfulOperationError - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.UnsuccessfulOperationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnsuccessfulOperationError to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UnsuccessfulOperationError - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Link. */ - interface ILink { - - /** See https://github.com/nexus-rpc/api/blob/main/SPEC.md#links. */ - url?: (string|null); - - /** Link type */ - type?: (string|null); - } - - /** Represents a Link. */ - class Link implements ILink { - - /** - * Constructs a new Link. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.ILink); - - /** See https://github.com/nexus-rpc/api/blob/main/SPEC.md#links. */ - public url: string; - - /** Link type. */ - public type: string; - - /** - * Creates a new Link instance using the specified properties. - * @param [properties] Properties to set - * @returns Link instance - */ - public static create(properties?: temporal.api.nexus.v1.ILink): temporal.api.nexus.v1.Link; - - /** - * Encodes the specified Link message. Does not implicitly {@link temporal.api.nexus.v1.Link.verify|verify} messages. - * @param message Link message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.ILink, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Link message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.Link.verify|verify} messages. - * @param message Link message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.ILink, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Link message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Link - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.Link; - - /** - * Decodes a Link message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Link - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.Link; - - /** - * Creates a Link message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Link - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.Link; - - /** - * Creates a plain object from a Link message. Also converts values to other types if specified. - * @param message Link - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.Link, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Link to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Link - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartOperationRequest. */ - interface IStartOperationRequest { - - /** Name of service to start the operation in. */ - service?: (string|null); - - /** Type of operation to start. */ - operation?: (string|null); - - /** A request ID that can be used as an idempotentency key. */ - requestId?: (string|null); - - /** Callback URL to call upon completion if the started operation is async. */ - callback?: (string|null); - - /** Full request body from the incoming HTTP request. */ - payload?: (temporal.api.common.v1.IPayload|null); - - /** Header that is expected to be attached to the callback request when the operation completes. */ - callbackHeader?: ({ [k: string]: string }|null); - - /** Links contain caller information and can be attached to the operations started by the handler. */ - links?: (temporal.api.nexus.v1.ILink[]|null); - } - - /** A request to start an operation. */ - class StartOperationRequest implements IStartOperationRequest { - - /** - * Constructs a new StartOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.IStartOperationRequest); - - /** Name of service to start the operation in. */ - public service: string; - - /** Type of operation to start. */ - public operation: string; - - /** A request ID that can be used as an idempotentency key. */ - public requestId: string; - - /** Callback URL to call upon completion if the started operation is async. */ - public callback: string; - - /** Full request body from the incoming HTTP request. */ - public payload?: (temporal.api.common.v1.IPayload|null); - - /** Header that is expected to be attached to the callback request when the operation completes. */ - public callbackHeader: { [k: string]: string }; - - /** Links contain caller information and can be attached to the operations started by the handler. */ - public links: temporal.api.nexus.v1.ILink[]; - - /** - * Creates a new StartOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StartOperationRequest instance - */ - public static create(properties?: temporal.api.nexus.v1.IStartOperationRequest): temporal.api.nexus.v1.StartOperationRequest; - - /** - * Encodes the specified StartOperationRequest message. Does not implicitly {@link temporal.api.nexus.v1.StartOperationRequest.verify|verify} messages. - * @param message StartOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.IStartOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartOperationRequest message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.StartOperationRequest.verify|verify} messages. - * @param message StartOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.IStartOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.StartOperationRequest; - - /** - * Decodes a StartOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.StartOperationRequest; - - /** - * Creates a StartOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartOperationRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.StartOperationRequest; - - /** - * Creates a plain object from a StartOperationRequest message. Also converts values to other types if specified. - * @param message StartOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.StartOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelOperationRequest. */ - interface ICancelOperationRequest { - - /** Service name. */ - service?: (string|null); - - /** Type of operation to cancel. */ - operation?: (string|null); - - /** - * Operation ID as originally generated by a Handler. - * - * Deprecated. Renamed to operation_token. - */ - operationId?: (string|null); - - /** Operation token as originally generated by a Handler. */ - operationToken?: (string|null); - } - - /** A request to cancel an operation. */ - class CancelOperationRequest implements ICancelOperationRequest { - - /** - * Constructs a new CancelOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.ICancelOperationRequest); - - /** Service name. */ - public service: string; - - /** Type of operation to cancel. */ - public operation: string; - - /** - * Operation ID as originally generated by a Handler. - * - * Deprecated. Renamed to operation_token. - */ - public operationId: string; - - /** Operation token as originally generated by a Handler. */ - public operationToken: string; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelOperationRequest instance - */ - public static create(properties?: temporal.api.nexus.v1.ICancelOperationRequest): temporal.api.nexus.v1.CancelOperationRequest; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link temporal.api.nexus.v1.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.CancelOperationRequest; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.CancelOperationRequest; - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelOperationRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.CancelOperationRequest; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @param message CancelOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Request. */ - interface IRequest { - - /** - * Headers extracted from the original request in the Temporal frontend. - * When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values. - */ - header?: ({ [k: string]: string }|null); - - /** - * The timestamp when the request was scheduled in the frontend. - * (-- api-linter: core::0142::time-field-names=disabled - * aip.dev/not-precedent: Not following linter rules. --) - */ - scheduledTime?: (google.protobuf.ITimestamp|null); - - /** Request capabilities */ - capabilities?: (temporal.api.nexus.v1.Request.ICapabilities|null); - - /** Request startOperation */ - startOperation?: (temporal.api.nexus.v1.IStartOperationRequest|null); - - /** Request cancelOperation */ - cancelOperation?: (temporal.api.nexus.v1.ICancelOperationRequest|null); - - /** - * The endpoint this request was addressed to before forwarding to the worker. - * Supported from server version 1.30.0. - */ - endpoint?: (string|null); - } - - /** A Nexus request. */ - class Request implements IRequest { - - /** - * Constructs a new Request. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.IRequest); - - /** - * Headers extracted from the original request in the Temporal frontend. - * When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values. - */ - public header: { [k: string]: string }; - - /** - * The timestamp when the request was scheduled in the frontend. - * (-- api-linter: core::0142::time-field-names=disabled - * aip.dev/not-precedent: Not following linter rules. --) - */ - public scheduledTime?: (google.protobuf.ITimestamp|null); - - /** Request capabilities. */ - public capabilities?: (temporal.api.nexus.v1.Request.ICapabilities|null); - - /** Request startOperation. */ - public startOperation?: (temporal.api.nexus.v1.IStartOperationRequest|null); - - /** Request cancelOperation. */ - public cancelOperation?: (temporal.api.nexus.v1.ICancelOperationRequest|null); - - /** - * The endpoint this request was addressed to before forwarding to the worker. - * Supported from server version 1.30.0. - */ - public endpoint: string; - - /** Request variant. */ - public variant?: ("startOperation"|"cancelOperation"); - - /** - * Creates a new Request instance using the specified properties. - * @param [properties] Properties to set - * @returns Request instance - */ - public static create(properties?: temporal.api.nexus.v1.IRequest): temporal.api.nexus.v1.Request; - - /** - * Encodes the specified Request message. Does not implicitly {@link temporal.api.nexus.v1.Request.verify|verify} messages. - * @param message Request message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Request message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.Request.verify|verify} messages. - * @param message Request message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Request message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Request - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.Request; - - /** - * Decodes a Request message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Request - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.Request; - - /** - * Creates a Request message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Request - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.Request; - - /** - * Creates a plain object from a Request message. Also converts values to other types if specified. - * @param message Request - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Request to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Request - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Request { - - /** Properties of a Capabilities. */ - interface ICapabilities { - - /** - * If set, handlers may use temporal.api.failure.v1.Failure instances to return failures to the server. - * This also allows handler and operation errors to have their own messages and stack traces. - */ - temporalFailureResponses?: (boolean|null); - } - - /** Represents a Capabilities. */ - class Capabilities implements ICapabilities { - - /** - * Constructs a new Capabilities. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.Request.ICapabilities); - - /** - * If set, handlers may use temporal.api.failure.v1.Failure instances to return failures to the server. - * This also allows handler and operation errors to have their own messages and stack traces. - */ - public temporalFailureResponses: boolean; - - /** - * Creates a new Capabilities instance using the specified properties. - * @param [properties] Properties to set - * @returns Capabilities instance - */ - public static create(properties?: temporal.api.nexus.v1.Request.ICapabilities): temporal.api.nexus.v1.Request.Capabilities; - - /** - * Encodes the specified Capabilities message. Does not implicitly {@link temporal.api.nexus.v1.Request.Capabilities.verify|verify} messages. - * @param message Capabilities message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.Request.ICapabilities, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Capabilities message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.Request.Capabilities.verify|verify} messages. - * @param message Capabilities message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.Request.ICapabilities, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Capabilities message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Capabilities - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.Request.Capabilities; - - /** - * Decodes a Capabilities message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Capabilities - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.Request.Capabilities; - - /** - * Creates a Capabilities message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Capabilities - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.Request.Capabilities; - - /** - * Creates a plain object from a Capabilities message. Also converts values to other types if specified. - * @param message Capabilities - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.Request.Capabilities, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Capabilities to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Capabilities - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a StartOperationResponse. */ - interface IStartOperationResponse { - - /** StartOperationResponse syncSuccess */ - syncSuccess?: (temporal.api.nexus.v1.StartOperationResponse.ISync|null); - - /** StartOperationResponse asyncSuccess */ - asyncSuccess?: (temporal.api.nexus.v1.StartOperationResponse.IAsync|null); - - /** - * The operation completed unsuccessfully (failed or canceled). - * Deprecated. Use the failure variant instead. - */ - operationError?: (temporal.api.nexus.v1.IUnsuccessfulOperationError|null); - - /** - * The operation completed unsuccessfully (failed or canceled). - * Failure object must contain an ApplicationFailureInfo or CanceledFailureInfo object. - */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** Response variant for StartOperationRequest. */ - class StartOperationResponse implements IStartOperationResponse { - - /** - * Constructs a new StartOperationResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.IStartOperationResponse); - - /** StartOperationResponse syncSuccess. */ - public syncSuccess?: (temporal.api.nexus.v1.StartOperationResponse.ISync|null); - - /** StartOperationResponse asyncSuccess. */ - public asyncSuccess?: (temporal.api.nexus.v1.StartOperationResponse.IAsync|null); - - /** - * The operation completed unsuccessfully (failed or canceled). - * Deprecated. Use the failure variant instead. - */ - public operationError?: (temporal.api.nexus.v1.IUnsuccessfulOperationError|null); - - /** - * The operation completed unsuccessfully (failed or canceled). - * Failure object must contain an ApplicationFailureInfo or CanceledFailureInfo object. - */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** StartOperationResponse variant. */ - public variant?: ("syncSuccess"|"asyncSuccess"|"operationError"|"failure"); - - /** - * Creates a new StartOperationResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StartOperationResponse instance - */ - public static create(properties?: temporal.api.nexus.v1.IStartOperationResponse): temporal.api.nexus.v1.StartOperationResponse; - - /** - * Encodes the specified StartOperationResponse message. Does not implicitly {@link temporal.api.nexus.v1.StartOperationResponse.verify|verify} messages. - * @param message StartOperationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.IStartOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartOperationResponse message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.StartOperationResponse.verify|verify} messages. - * @param message StartOperationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.IStartOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartOperationResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartOperationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.StartOperationResponse; - - /** - * Decodes a StartOperationResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartOperationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.StartOperationResponse; - - /** - * Creates a StartOperationResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartOperationResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.StartOperationResponse; - - /** - * Creates a plain object from a StartOperationResponse message. Also converts values to other types if specified. - * @param message StartOperationResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.StartOperationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartOperationResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartOperationResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace StartOperationResponse { - - /** Properties of a Sync. */ - interface ISync { - - /** Sync payload */ - payload?: (temporal.api.common.v1.IPayload|null); - - /** Sync links */ - links?: (temporal.api.nexus.v1.ILink[]|null); - } - - /** An operation completed successfully. */ - class Sync implements ISync { - - /** - * Constructs a new Sync. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.StartOperationResponse.ISync); - - /** Sync payload. */ - public payload?: (temporal.api.common.v1.IPayload|null); - - /** Sync links. */ - public links: temporal.api.nexus.v1.ILink[]; - - /** - * Creates a new Sync instance using the specified properties. - * @param [properties] Properties to set - * @returns Sync instance - */ - public static create(properties?: temporal.api.nexus.v1.StartOperationResponse.ISync): temporal.api.nexus.v1.StartOperationResponse.Sync; - - /** - * Encodes the specified Sync message. Does not implicitly {@link temporal.api.nexus.v1.StartOperationResponse.Sync.verify|verify} messages. - * @param message Sync message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.StartOperationResponse.ISync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Sync message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.StartOperationResponse.Sync.verify|verify} messages. - * @param message Sync message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.StartOperationResponse.ISync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Sync message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Sync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.StartOperationResponse.Sync; - - /** - * Decodes a Sync message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Sync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.StartOperationResponse.Sync; - - /** - * Creates a Sync message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Sync - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.StartOperationResponse.Sync; - - /** - * Creates a plain object from a Sync message. Also converts values to other types if specified. - * @param message Sync - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.StartOperationResponse.Sync, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Sync to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Sync - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Async. */ - interface IAsync { - - /** Deprecated. Renamed to operation_token. */ - operationId?: (string|null); - - /** Async links */ - links?: (temporal.api.nexus.v1.ILink[]|null); - - /** Async operationToken */ - operationToken?: (string|null); - } - - /** - * The operation will complete asynchronously. - * The returned ID can be used to reference this operation. - */ - class Async implements IAsync { - - /** - * Constructs a new Async. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.StartOperationResponse.IAsync); - - /** Deprecated. Renamed to operation_token. */ - public operationId: string; - - /** Async links. */ - public links: temporal.api.nexus.v1.ILink[]; - - /** Async operationToken. */ - public operationToken: string; - - /** - * Creates a new Async instance using the specified properties. - * @param [properties] Properties to set - * @returns Async instance - */ - public static create(properties?: temporal.api.nexus.v1.StartOperationResponse.IAsync): temporal.api.nexus.v1.StartOperationResponse.Async; - - /** - * Encodes the specified Async message. Does not implicitly {@link temporal.api.nexus.v1.StartOperationResponse.Async.verify|verify} messages. - * @param message Async message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.StartOperationResponse.IAsync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Async message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.StartOperationResponse.Async.verify|verify} messages. - * @param message Async message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.StartOperationResponse.IAsync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Async message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Async - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.StartOperationResponse.Async; - - /** - * Decodes an Async message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Async - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.StartOperationResponse.Async; - - /** - * Creates an Async message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Async - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.StartOperationResponse.Async; - - /** - * Creates a plain object from an Async message. Also converts values to other types if specified. - * @param message Async - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.StartOperationResponse.Async, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Async to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Async - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CancelOperationResponse. */ - interface ICancelOperationResponse { - } - - /** Response variant for CancelOperationRequest. */ - class CancelOperationResponse implements ICancelOperationResponse { - - /** - * Constructs a new CancelOperationResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.ICancelOperationResponse); - - /** - * Creates a new CancelOperationResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelOperationResponse instance - */ - public static create(properties?: temporal.api.nexus.v1.ICancelOperationResponse): temporal.api.nexus.v1.CancelOperationResponse; - - /** - * Encodes the specified CancelOperationResponse message. Does not implicitly {@link temporal.api.nexus.v1.CancelOperationResponse.verify|verify} messages. - * @param message CancelOperationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.ICancelOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelOperationResponse message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.CancelOperationResponse.verify|verify} messages. - * @param message CancelOperationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.ICancelOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelOperationResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelOperationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.CancelOperationResponse; - - /** - * Decodes a CancelOperationResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelOperationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.CancelOperationResponse; - - /** - * Creates a CancelOperationResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelOperationResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.CancelOperationResponse; - - /** - * Creates a plain object from a CancelOperationResponse message. Also converts values to other types if specified. - * @param message CancelOperationResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.CancelOperationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelOperationResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelOperationResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Response. */ - interface IResponse { - - /** Response startOperation */ - startOperation?: (temporal.api.nexus.v1.IStartOperationResponse|null); - - /** Response cancelOperation */ - cancelOperation?: (temporal.api.nexus.v1.ICancelOperationResponse|null); - } - - /** A response indicating that the handler has successfully processed a request. */ - class Response implements IResponse { - - /** - * Constructs a new Response. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.IResponse); - - /** Response startOperation. */ - public startOperation?: (temporal.api.nexus.v1.IStartOperationResponse|null); - - /** Response cancelOperation. */ - public cancelOperation?: (temporal.api.nexus.v1.ICancelOperationResponse|null); - - /** Variant must correlate to the corresponding Request's variant. */ - public variant?: ("startOperation"|"cancelOperation"); - - /** - * Creates a new Response instance using the specified properties. - * @param [properties] Properties to set - * @returns Response instance - */ - public static create(properties?: temporal.api.nexus.v1.IResponse): temporal.api.nexus.v1.Response; - - /** - * Encodes the specified Response message. Does not implicitly {@link temporal.api.nexus.v1.Response.verify|verify} messages. - * @param message Response message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.IResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Response message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.Response.verify|verify} messages. - * @param message Response message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.IResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Response message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Response - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.Response; - - /** - * Decodes a Response message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Response - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.Response; - - /** - * Creates a Response message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Response - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.Response; - - /** - * Creates a plain object from a Response message. Also converts values to other types if specified. - * @param message Response - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.Response, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Response to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Response - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Endpoint. */ - interface IEndpoint { - - /** Data version for this endpoint, incremented for every update issued via the UpdateNexusEndpoint API. */ - version?: (Long|null); - - /** Unique server-generated endpoint ID. */ - id?: (string|null); - - /** Spec for the endpoint. */ - spec?: (temporal.api.nexus.v1.IEndpointSpec|null); - - /** - * The date and time when the endpoint was created. - * (-- api-linter: core::0142::time-field-names=disabled - * aip.dev/not-precedent: Not following linter rules. --) - */ - createdTime?: (google.protobuf.ITimestamp|null); - - /** - * The date and time when the endpoint was last modified. - * Will not be set if the endpoint has never been modified. - * (-- api-linter: core::0142::time-field-names=disabled - * aip.dev/not-precedent: Not following linter rules. --) - */ - lastModifiedTime?: (google.protobuf.ITimestamp|null); - - /** - * Server exposed URL prefix for invocation of operations on this endpoint. - * This doesn't include the protocol, hostname or port as the server does not know how it should be accessed - * publicly. The URL is stable in the face of endpoint renames. - */ - urlPrefix?: (string|null); - } - - /** A cluster-global binding from an endpoint ID to a target for dispatching incoming Nexus requests. */ - class Endpoint implements IEndpoint { - - /** - * Constructs a new Endpoint. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.IEndpoint); - - /** Data version for this endpoint, incremented for every update issued via the UpdateNexusEndpoint API. */ - public version: Long; - - /** Unique server-generated endpoint ID. */ - public id: string; - - /** Spec for the endpoint. */ - public spec?: (temporal.api.nexus.v1.IEndpointSpec|null); - - /** - * The date and time when the endpoint was created. - * (-- api-linter: core::0142::time-field-names=disabled - * aip.dev/not-precedent: Not following linter rules. --) - */ - public createdTime?: (google.protobuf.ITimestamp|null); - - /** - * The date and time when the endpoint was last modified. - * Will not be set if the endpoint has never been modified. - * (-- api-linter: core::0142::time-field-names=disabled - * aip.dev/not-precedent: Not following linter rules. --) - */ - public lastModifiedTime?: (google.protobuf.ITimestamp|null); - - /** - * Server exposed URL prefix for invocation of operations on this endpoint. - * This doesn't include the protocol, hostname or port as the server does not know how it should be accessed - * publicly. The URL is stable in the face of endpoint renames. - */ - public urlPrefix: string; - - /** - * Creates a new Endpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns Endpoint instance - */ - public static create(properties?: temporal.api.nexus.v1.IEndpoint): temporal.api.nexus.v1.Endpoint; - - /** - * Encodes the specified Endpoint message. Does not implicitly {@link temporal.api.nexus.v1.Endpoint.verify|verify} messages. - * @param message Endpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.Endpoint.verify|verify} messages. - * @param message Endpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Endpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.Endpoint; - - /** - * Decodes an Endpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.Endpoint; - - /** - * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Endpoint - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.Endpoint; - - /** - * Creates a plain object from an Endpoint message. Also converts values to other types if specified. - * @param message Endpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.Endpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Endpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Endpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EndpointSpec. */ - interface IEndpointSpec { - - /** - * Endpoint name, unique for this cluster. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. - * Renaming an endpoint breaks all workflow callers that reference this endpoint, causing operations to fail. - */ - name?: (string|null); - - /** - * Markdown description serialized as a single JSON string. - * If the Payload is encrypted, the UI and CLI may decrypt with the configured codec server endpoint. - * By default, the server enforces a limit of 20,000 bytes for this entire payload. - */ - description?: (temporal.api.common.v1.IPayload|null); - - /** Target to route requests to. */ - target?: (temporal.api.nexus.v1.IEndpointTarget|null); - } - - /** Contains mutable fields for an Endpoint. */ - class EndpointSpec implements IEndpointSpec { - - /** - * Constructs a new EndpointSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.IEndpointSpec); - - /** - * Endpoint name, unique for this cluster. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. - * Renaming an endpoint breaks all workflow callers that reference this endpoint, causing operations to fail. - */ - public name: string; - - /** - * Markdown description serialized as a single JSON string. - * If the Payload is encrypted, the UI and CLI may decrypt with the configured codec server endpoint. - * By default, the server enforces a limit of 20,000 bytes for this entire payload. - */ - public description?: (temporal.api.common.v1.IPayload|null); - - /** Target to route requests to. */ - public target?: (temporal.api.nexus.v1.IEndpointTarget|null); - - /** - * Creates a new EndpointSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns EndpointSpec instance - */ - public static create(properties?: temporal.api.nexus.v1.IEndpointSpec): temporal.api.nexus.v1.EndpointSpec; - - /** - * Encodes the specified EndpointSpec message. Does not implicitly {@link temporal.api.nexus.v1.EndpointSpec.verify|verify} messages. - * @param message EndpointSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.IEndpointSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EndpointSpec message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.EndpointSpec.verify|verify} messages. - * @param message EndpointSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.IEndpointSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EndpointSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EndpointSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.EndpointSpec; - - /** - * Decodes an EndpointSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EndpointSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.EndpointSpec; - - /** - * Creates an EndpointSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EndpointSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.EndpointSpec; - - /** - * Creates a plain object from an EndpointSpec message. Also converts values to other types if specified. - * @param message EndpointSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.EndpointSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EndpointSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EndpointSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EndpointTarget. */ - interface IEndpointTarget { - - /** EndpointTarget worker */ - worker?: (temporal.api.nexus.v1.EndpointTarget.IWorker|null); - - /** EndpointTarget external */ - external?: (temporal.api.nexus.v1.EndpointTarget.IExternal|null); - } - - /** Target to route requests to. */ - class EndpointTarget implements IEndpointTarget { - - /** - * Constructs a new EndpointTarget. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.IEndpointTarget); - - /** EndpointTarget worker. */ - public worker?: (temporal.api.nexus.v1.EndpointTarget.IWorker|null); - - /** EndpointTarget external. */ - public external?: (temporal.api.nexus.v1.EndpointTarget.IExternal|null); - - /** EndpointTarget variant. */ - public variant?: ("worker"|"external"); - - /** - * Creates a new EndpointTarget instance using the specified properties. - * @param [properties] Properties to set - * @returns EndpointTarget instance - */ - public static create(properties?: temporal.api.nexus.v1.IEndpointTarget): temporal.api.nexus.v1.EndpointTarget; - - /** - * Encodes the specified EndpointTarget message. Does not implicitly {@link temporal.api.nexus.v1.EndpointTarget.verify|verify} messages. - * @param message EndpointTarget message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.IEndpointTarget, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EndpointTarget message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.EndpointTarget.verify|verify} messages. - * @param message EndpointTarget message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.IEndpointTarget, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EndpointTarget message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EndpointTarget - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.EndpointTarget; - - /** - * Decodes an EndpointTarget message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EndpointTarget - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.EndpointTarget; - - /** - * Creates an EndpointTarget message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EndpointTarget - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.EndpointTarget; - - /** - * Creates a plain object from an EndpointTarget message. Also converts values to other types if specified. - * @param message EndpointTarget - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.EndpointTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EndpointTarget to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EndpointTarget - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EndpointTarget { - - /** Properties of a Worker. */ - interface IWorker { - - /** Namespace to route requests to. */ - namespace?: (string|null); - - /** Nexus task queue to route requests to. */ - taskQueue?: (string|null); - } - - /** Target a worker polling on a Nexus task queue in a specific namespace. */ - class Worker implements IWorker { - - /** - * Constructs a new Worker. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.EndpointTarget.IWorker); - - /** Namespace to route requests to. */ - public namespace: string; - - /** Nexus task queue to route requests to. */ - public taskQueue: string; - - /** - * Creates a new Worker instance using the specified properties. - * @param [properties] Properties to set - * @returns Worker instance - */ - public static create(properties?: temporal.api.nexus.v1.EndpointTarget.IWorker): temporal.api.nexus.v1.EndpointTarget.Worker; - - /** - * Encodes the specified Worker message. Does not implicitly {@link temporal.api.nexus.v1.EndpointTarget.Worker.verify|verify} messages. - * @param message Worker message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.EndpointTarget.IWorker, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Worker message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.EndpointTarget.Worker.verify|verify} messages. - * @param message Worker message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.EndpointTarget.IWorker, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Worker message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Worker - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.EndpointTarget.Worker; - - /** - * Decodes a Worker message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Worker - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.EndpointTarget.Worker; - - /** - * Creates a Worker message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Worker - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.EndpointTarget.Worker; - - /** - * Creates a plain object from a Worker message. Also converts values to other types if specified. - * @param message Worker - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.EndpointTarget.Worker, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Worker to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Worker - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an External. */ - interface IExternal { - - /** URL to call. */ - url?: (string|null); - } - - /** - * Target an external server by URL. - * At a later point, this will support providing credentials, in the meantime, an http.RoundTripper can be injected - * into the server to modify the request. - */ - class External implements IExternal { - - /** - * Constructs a new External. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.nexus.v1.EndpointTarget.IExternal); - - /** URL to call. */ - public url: string; - - /** - * Creates a new External instance using the specified properties. - * @param [properties] Properties to set - * @returns External instance - */ - public static create(properties?: temporal.api.nexus.v1.EndpointTarget.IExternal): temporal.api.nexus.v1.EndpointTarget.External; - - /** - * Encodes the specified External message. Does not implicitly {@link temporal.api.nexus.v1.EndpointTarget.External.verify|verify} messages. - * @param message External message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.nexus.v1.EndpointTarget.IExternal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified External message, length delimited. Does not implicitly {@link temporal.api.nexus.v1.EndpointTarget.External.verify|verify} messages. - * @param message External message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.nexus.v1.EndpointTarget.IExternal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an External message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns External - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.nexus.v1.EndpointTarget.External; - - /** - * Decodes an External message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns External - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.nexus.v1.EndpointTarget.External; - - /** - * Creates an External message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns External - */ - public static fromObject(object: { [k: string]: any }): temporal.api.nexus.v1.EndpointTarget.External; - - /** - * Creates a plain object from an External message. Also converts values to other types if specified. - * @param message External - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.nexus.v1.EndpointTarget.External, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this External to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for External - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - - /** Namespace workflowservice. */ - namespace workflowservice { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a RegisterNamespaceRequest. */ - interface IRegisterNamespaceRequest { - - /** RegisterNamespaceRequest namespace */ - namespace?: (string|null); - - /** RegisterNamespaceRequest description */ - description?: (string|null); - - /** RegisterNamespaceRequest ownerEmail */ - ownerEmail?: (string|null); - - /** RegisterNamespaceRequest workflowExecutionRetentionPeriod */ - workflowExecutionRetentionPeriod?: (google.protobuf.IDuration|null); - - /** RegisterNamespaceRequest clusters */ - clusters?: (temporal.api.replication.v1.IClusterReplicationConfig[]|null); - - /** RegisterNamespaceRequest activeClusterName */ - activeClusterName?: (string|null); - - /** A key-value map for any customized purpose. */ - data?: ({ [k: string]: string }|null); - - /** RegisterNamespaceRequest securityToken */ - securityToken?: (string|null); - - /** RegisterNamespaceRequest isGlobalNamespace */ - isGlobalNamespace?: (boolean|null); - - /** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ - historyArchivalState?: (temporal.api.enums.v1.ArchivalState|null); - - /** RegisterNamespaceRequest historyArchivalUri */ - historyArchivalUri?: (string|null); - - /** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ - visibilityArchivalState?: (temporal.api.enums.v1.ArchivalState|null); - - /** RegisterNamespaceRequest visibilityArchivalUri */ - visibilityArchivalUri?: (string|null); - } - - /** Represents a RegisterNamespaceRequest. */ - class RegisterNamespaceRequest implements IRegisterNamespaceRequest { - - /** - * Constructs a new RegisterNamespaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRegisterNamespaceRequest); - - /** RegisterNamespaceRequest namespace. */ - public namespace: string; - - /** RegisterNamespaceRequest description. */ - public description: string; - - /** RegisterNamespaceRequest ownerEmail. */ - public ownerEmail: string; - - /** RegisterNamespaceRequest workflowExecutionRetentionPeriod. */ - public workflowExecutionRetentionPeriod?: (google.protobuf.IDuration|null); - - /** RegisterNamespaceRequest clusters. */ - public clusters: temporal.api.replication.v1.IClusterReplicationConfig[]; - - /** RegisterNamespaceRequest activeClusterName. */ - public activeClusterName: string; - - /** A key-value map for any customized purpose. */ - public data: { [k: string]: string }; - - /** RegisterNamespaceRequest securityToken. */ - public securityToken: string; - - /** RegisterNamespaceRequest isGlobalNamespace. */ - public isGlobalNamespace: boolean; - - /** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ - public historyArchivalState: temporal.api.enums.v1.ArchivalState; - - /** RegisterNamespaceRequest historyArchivalUri. */ - public historyArchivalUri: string; - - /** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ - public visibilityArchivalState: temporal.api.enums.v1.ArchivalState; - - /** RegisterNamespaceRequest visibilityArchivalUri. */ - public visibilityArchivalUri: string; - - /** - * Creates a new RegisterNamespaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RegisterNamespaceRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRegisterNamespaceRequest): temporal.api.workflowservice.v1.RegisterNamespaceRequest; - - /** - * Encodes the specified RegisterNamespaceRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RegisterNamespaceRequest.verify|verify} messages. - * @param message RegisterNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRegisterNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RegisterNamespaceRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RegisterNamespaceRequest.verify|verify} messages. - * @param message RegisterNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRegisterNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RegisterNamespaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RegisterNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RegisterNamespaceRequest; - - /** - * Decodes a RegisterNamespaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RegisterNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RegisterNamespaceRequest; - - /** - * Creates a RegisterNamespaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RegisterNamespaceRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RegisterNamespaceRequest; - - /** - * Creates a plain object from a RegisterNamespaceRequest message. Also converts values to other types if specified. - * @param message RegisterNamespaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RegisterNamespaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RegisterNamespaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RegisterNamespaceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RegisterNamespaceResponse. */ - interface IRegisterNamespaceResponse { - } - - /** Represents a RegisterNamespaceResponse. */ - class RegisterNamespaceResponse implements IRegisterNamespaceResponse { - - /** - * Constructs a new RegisterNamespaceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRegisterNamespaceResponse); - - /** - * Creates a new RegisterNamespaceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RegisterNamespaceResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRegisterNamespaceResponse): temporal.api.workflowservice.v1.RegisterNamespaceResponse; - - /** - * Encodes the specified RegisterNamespaceResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RegisterNamespaceResponse.verify|verify} messages. - * @param message RegisterNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRegisterNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RegisterNamespaceResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RegisterNamespaceResponse.verify|verify} messages. - * @param message RegisterNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRegisterNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RegisterNamespaceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RegisterNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RegisterNamespaceResponse; - - /** - * Decodes a RegisterNamespaceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RegisterNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RegisterNamespaceResponse; - - /** - * Creates a RegisterNamespaceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RegisterNamespaceResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RegisterNamespaceResponse; - - /** - * Creates a plain object from a RegisterNamespaceResponse message. Also converts values to other types if specified. - * @param message RegisterNamespaceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RegisterNamespaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RegisterNamespaceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RegisterNamespaceResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListNamespacesRequest. */ - interface IListNamespacesRequest { - - /** ListNamespacesRequest pageSize */ - pageSize?: (number|null); - - /** ListNamespacesRequest nextPageToken */ - nextPageToken?: (Uint8Array|null); - - /** ListNamespacesRequest namespaceFilter */ - namespaceFilter?: (temporal.api.namespace.v1.INamespaceFilter|null); - } - - /** Represents a ListNamespacesRequest. */ - class ListNamespacesRequest implements IListNamespacesRequest { - - /** - * Constructs a new ListNamespacesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListNamespacesRequest); - - /** ListNamespacesRequest pageSize. */ - public pageSize: number; - - /** ListNamespacesRequest nextPageToken. */ - public nextPageToken: Uint8Array; - - /** ListNamespacesRequest namespaceFilter. */ - public namespaceFilter?: (temporal.api.namespace.v1.INamespaceFilter|null); - - /** - * Creates a new ListNamespacesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNamespacesRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListNamespacesRequest): temporal.api.workflowservice.v1.ListNamespacesRequest; - - /** - * Encodes the specified ListNamespacesRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ListNamespacesRequest.verify|verify} messages. - * @param message ListNamespacesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListNamespacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListNamespacesRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListNamespacesRequest.verify|verify} messages. - * @param message ListNamespacesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListNamespacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListNamespacesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListNamespacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListNamespacesRequest; - - /** - * Decodes a ListNamespacesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNamespacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListNamespacesRequest; - - /** - * Creates a ListNamespacesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListNamespacesRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListNamespacesRequest; - - /** - * Creates a plain object from a ListNamespacesRequest message. Also converts values to other types if specified. - * @param message ListNamespacesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListNamespacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListNamespacesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListNamespacesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListNamespacesResponse. */ - interface IListNamespacesResponse { - - /** ListNamespacesResponse namespaces */ - namespaces?: (temporal.api.workflowservice.v1.IDescribeNamespaceResponse[]|null); - - /** ListNamespacesResponse nextPageToken */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListNamespacesResponse. */ - class ListNamespacesResponse implements IListNamespacesResponse { - - /** - * Constructs a new ListNamespacesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListNamespacesResponse); - - /** ListNamespacesResponse namespaces. */ - public namespaces: temporal.api.workflowservice.v1.IDescribeNamespaceResponse[]; - - /** ListNamespacesResponse nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListNamespacesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNamespacesResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListNamespacesResponse): temporal.api.workflowservice.v1.ListNamespacesResponse; - - /** - * Encodes the specified ListNamespacesResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ListNamespacesResponse.verify|verify} messages. - * @param message ListNamespacesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListNamespacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListNamespacesResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListNamespacesResponse.verify|verify} messages. - * @param message ListNamespacesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListNamespacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListNamespacesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListNamespacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListNamespacesResponse; - - /** - * Decodes a ListNamespacesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNamespacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListNamespacesResponse; - - /** - * Creates a ListNamespacesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListNamespacesResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListNamespacesResponse; - - /** - * Creates a plain object from a ListNamespacesResponse message. Also converts values to other types if specified. - * @param message ListNamespacesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListNamespacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListNamespacesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListNamespacesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeNamespaceRequest. */ - interface IDescribeNamespaceRequest { - - /** DescribeNamespaceRequest namespace */ - namespace?: (string|null); - - /** DescribeNamespaceRequest id */ - id?: (string|null); - } - - /** Represents a DescribeNamespaceRequest. */ - class DescribeNamespaceRequest implements IDescribeNamespaceRequest { - - /** - * Constructs a new DescribeNamespaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeNamespaceRequest); - - /** DescribeNamespaceRequest namespace. */ - public namespace: string; - - /** DescribeNamespaceRequest id. */ - public id: string; - - /** - * Creates a new DescribeNamespaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeNamespaceRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeNamespaceRequest): temporal.api.workflowservice.v1.DescribeNamespaceRequest; - - /** - * Encodes the specified DescribeNamespaceRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeNamespaceRequest.verify|verify} messages. - * @param message DescribeNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeNamespaceRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeNamespaceRequest.verify|verify} messages. - * @param message DescribeNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeNamespaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeNamespaceRequest; - - /** - * Decodes a DescribeNamespaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeNamespaceRequest; - - /** - * Creates a DescribeNamespaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeNamespaceRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeNamespaceRequest; - - /** - * Creates a plain object from a DescribeNamespaceRequest message. Also converts values to other types if specified. - * @param message DescribeNamespaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeNamespaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeNamespaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeNamespaceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeNamespaceResponse. */ - interface IDescribeNamespaceResponse { - - /** DescribeNamespaceResponse namespaceInfo */ - namespaceInfo?: (temporal.api.namespace.v1.INamespaceInfo|null); - - /** DescribeNamespaceResponse config */ - config?: (temporal.api.namespace.v1.INamespaceConfig|null); - - /** DescribeNamespaceResponse replicationConfig */ - replicationConfig?: (temporal.api.replication.v1.INamespaceReplicationConfig|null); - - /** DescribeNamespaceResponse failoverVersion */ - failoverVersion?: (Long|null); - - /** DescribeNamespaceResponse isGlobalNamespace */ - isGlobalNamespace?: (boolean|null); - - /** - * Contains the historical state of failover_versions for the cluster, truncated to contain only the last N - * states to ensure that the list does not grow unbounded. - */ - failoverHistory?: (temporal.api.replication.v1.IFailoverStatus[]|null); - } - - /** Represents a DescribeNamespaceResponse. */ - class DescribeNamespaceResponse implements IDescribeNamespaceResponse { - - /** - * Constructs a new DescribeNamespaceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeNamespaceResponse); - - /** DescribeNamespaceResponse namespaceInfo. */ - public namespaceInfo?: (temporal.api.namespace.v1.INamespaceInfo|null); - - /** DescribeNamespaceResponse config. */ - public config?: (temporal.api.namespace.v1.INamespaceConfig|null); - - /** DescribeNamespaceResponse replicationConfig. */ - public replicationConfig?: (temporal.api.replication.v1.INamespaceReplicationConfig|null); - - /** DescribeNamespaceResponse failoverVersion. */ - public failoverVersion: Long; - - /** DescribeNamespaceResponse isGlobalNamespace. */ - public isGlobalNamespace: boolean; - - /** - * Contains the historical state of failover_versions for the cluster, truncated to contain only the last N - * states to ensure that the list does not grow unbounded. - */ - public failoverHistory: temporal.api.replication.v1.IFailoverStatus[]; - - /** - * Creates a new DescribeNamespaceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeNamespaceResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeNamespaceResponse): temporal.api.workflowservice.v1.DescribeNamespaceResponse; - - /** - * Encodes the specified DescribeNamespaceResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeNamespaceResponse.verify|verify} messages. - * @param message DescribeNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeNamespaceResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeNamespaceResponse.verify|verify} messages. - * @param message DescribeNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeNamespaceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeNamespaceResponse; - - /** - * Decodes a DescribeNamespaceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeNamespaceResponse; - - /** - * Creates a DescribeNamespaceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeNamespaceResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeNamespaceResponse; - - /** - * Creates a plain object from a DescribeNamespaceResponse message. Also converts values to other types if specified. - * @param message DescribeNamespaceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeNamespaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeNamespaceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeNamespaceResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNamespaceRequest. */ - interface IUpdateNamespaceRequest { - - /** UpdateNamespaceRequest namespace */ - namespace?: (string|null); - - /** UpdateNamespaceRequest updateInfo */ - updateInfo?: (temporal.api.namespace.v1.IUpdateNamespaceInfo|null); - - /** UpdateNamespaceRequest config */ - config?: (temporal.api.namespace.v1.INamespaceConfig|null); - - /** UpdateNamespaceRequest replicationConfig */ - replicationConfig?: (temporal.api.replication.v1.INamespaceReplicationConfig|null); - - /** UpdateNamespaceRequest securityToken */ - securityToken?: (string|null); - - /** UpdateNamespaceRequest deleteBadBinary */ - deleteBadBinary?: (string|null); - - /** promote local namespace to global namespace. Ignored if namespace is already global namespace. */ - promoteNamespace?: (boolean|null); - } - - /** Represents an UpdateNamespaceRequest. */ - class UpdateNamespaceRequest implements IUpdateNamespaceRequest { - - /** - * Constructs a new UpdateNamespaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateNamespaceRequest); - - /** UpdateNamespaceRequest namespace. */ - public namespace: string; - - /** UpdateNamespaceRequest updateInfo. */ - public updateInfo?: (temporal.api.namespace.v1.IUpdateNamespaceInfo|null); - - /** UpdateNamespaceRequest config. */ - public config?: (temporal.api.namespace.v1.INamespaceConfig|null); - - /** UpdateNamespaceRequest replicationConfig. */ - public replicationConfig?: (temporal.api.replication.v1.INamespaceReplicationConfig|null); - - /** UpdateNamespaceRequest securityToken. */ - public securityToken: string; - - /** UpdateNamespaceRequest deleteBadBinary. */ - public deleteBadBinary: string; - - /** promote local namespace to global namespace. Ignored if namespace is already global namespace. */ - public promoteNamespace: boolean; - - /** - * Creates a new UpdateNamespaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNamespaceRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateNamespaceRequest): temporal.api.workflowservice.v1.UpdateNamespaceRequest; - - /** - * Encodes the specified UpdateNamespaceRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateNamespaceRequest.verify|verify} messages. - * @param message UpdateNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNamespaceRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateNamespaceRequest.verify|verify} messages. - * @param message UpdateNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNamespaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateNamespaceRequest; - - /** - * Decodes an UpdateNamespaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateNamespaceRequest; - - /** - * Creates an UpdateNamespaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNamespaceRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateNamespaceRequest; - - /** - * Creates a plain object from an UpdateNamespaceRequest message. Also converts values to other types if specified. - * @param message UpdateNamespaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateNamespaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNamespaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNamespaceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNamespaceResponse. */ - interface IUpdateNamespaceResponse { - - /** UpdateNamespaceResponse namespaceInfo */ - namespaceInfo?: (temporal.api.namespace.v1.INamespaceInfo|null); - - /** UpdateNamespaceResponse config */ - config?: (temporal.api.namespace.v1.INamespaceConfig|null); - - /** UpdateNamespaceResponse replicationConfig */ - replicationConfig?: (temporal.api.replication.v1.INamespaceReplicationConfig|null); - - /** UpdateNamespaceResponse failoverVersion */ - failoverVersion?: (Long|null); - - /** UpdateNamespaceResponse isGlobalNamespace */ - isGlobalNamespace?: (boolean|null); - } - - /** Represents an UpdateNamespaceResponse. */ - class UpdateNamespaceResponse implements IUpdateNamespaceResponse { - - /** - * Constructs a new UpdateNamespaceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateNamespaceResponse); - - /** UpdateNamespaceResponse namespaceInfo. */ - public namespaceInfo?: (temporal.api.namespace.v1.INamespaceInfo|null); - - /** UpdateNamespaceResponse config. */ - public config?: (temporal.api.namespace.v1.INamespaceConfig|null); - - /** UpdateNamespaceResponse replicationConfig. */ - public replicationConfig?: (temporal.api.replication.v1.INamespaceReplicationConfig|null); - - /** UpdateNamespaceResponse failoverVersion. */ - public failoverVersion: Long; - - /** UpdateNamespaceResponse isGlobalNamespace. */ - public isGlobalNamespace: boolean; - - /** - * Creates a new UpdateNamespaceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNamespaceResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateNamespaceResponse): temporal.api.workflowservice.v1.UpdateNamespaceResponse; - - /** - * Encodes the specified UpdateNamespaceResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateNamespaceResponse.verify|verify} messages. - * @param message UpdateNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNamespaceResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateNamespaceResponse.verify|verify} messages. - * @param message UpdateNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNamespaceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateNamespaceResponse; - - /** - * Decodes an UpdateNamespaceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateNamespaceResponse; - - /** - * Creates an UpdateNamespaceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNamespaceResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateNamespaceResponse; - - /** - * Creates a plain object from an UpdateNamespaceResponse message. Also converts values to other types if specified. - * @param message UpdateNamespaceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateNamespaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNamespaceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNamespaceResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeprecateNamespaceRequest. */ - interface IDeprecateNamespaceRequest { - - /** DeprecateNamespaceRequest namespace */ - namespace?: (string|null); - - /** DeprecateNamespaceRequest securityToken */ - securityToken?: (string|null); - } - - /** Deprecated. */ - class DeprecateNamespaceRequest implements IDeprecateNamespaceRequest { - - /** - * Constructs a new DeprecateNamespaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDeprecateNamespaceRequest); - - /** DeprecateNamespaceRequest namespace. */ - public namespace: string; - - /** DeprecateNamespaceRequest securityToken. */ - public securityToken: string; - - /** - * Creates a new DeprecateNamespaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeprecateNamespaceRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDeprecateNamespaceRequest): temporal.api.workflowservice.v1.DeprecateNamespaceRequest; - - /** - * Encodes the specified DeprecateNamespaceRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DeprecateNamespaceRequest.verify|verify} messages. - * @param message DeprecateNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDeprecateNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeprecateNamespaceRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DeprecateNamespaceRequest.verify|verify} messages. - * @param message DeprecateNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDeprecateNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeprecateNamespaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeprecateNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DeprecateNamespaceRequest; - - /** - * Decodes a DeprecateNamespaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeprecateNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DeprecateNamespaceRequest; - - /** - * Creates a DeprecateNamespaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeprecateNamespaceRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DeprecateNamespaceRequest; - - /** - * Creates a plain object from a DeprecateNamespaceRequest message. Also converts values to other types if specified. - * @param message DeprecateNamespaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DeprecateNamespaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeprecateNamespaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeprecateNamespaceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeprecateNamespaceResponse. */ - interface IDeprecateNamespaceResponse { - } - - /** Deprecated. */ - class DeprecateNamespaceResponse implements IDeprecateNamespaceResponse { - - /** - * Constructs a new DeprecateNamespaceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDeprecateNamespaceResponse); - - /** - * Creates a new DeprecateNamespaceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeprecateNamespaceResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDeprecateNamespaceResponse): temporal.api.workflowservice.v1.DeprecateNamespaceResponse; - - /** - * Encodes the specified DeprecateNamespaceResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DeprecateNamespaceResponse.verify|verify} messages. - * @param message DeprecateNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDeprecateNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeprecateNamespaceResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DeprecateNamespaceResponse.verify|verify} messages. - * @param message DeprecateNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDeprecateNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeprecateNamespaceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeprecateNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DeprecateNamespaceResponse; - - /** - * Decodes a DeprecateNamespaceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeprecateNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DeprecateNamespaceResponse; - - /** - * Creates a DeprecateNamespaceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeprecateNamespaceResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DeprecateNamespaceResponse; - - /** - * Creates a plain object from a DeprecateNamespaceResponse message. Also converts values to other types if specified. - * @param message DeprecateNamespaceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DeprecateNamespaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeprecateNamespaceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeprecateNamespaceResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartWorkflowExecutionRequest. */ - interface IStartWorkflowExecutionRequest { - - /** StartWorkflowExecutionRequest namespace */ - namespace?: (string|null); - - /** StartWorkflowExecutionRequest workflowId */ - workflowId?: (string|null); - - /** StartWorkflowExecutionRequest workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** StartWorkflowExecutionRequest taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** Serialized arguments to the workflow. These are passed as arguments to the workflow function. */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** Total workflow execution timeout including retries and continue as new. */ - workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run. */ - workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** The identity of the client who initiated this request */ - identity?: (string|null); - - /** A unique identifier for this start request. Typically UUIDv4. */ - requestId?: (string|null); - - /** - * Defines whether to allow re-using the workflow id from a previously *closed* workflow. - * The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. - * - * See `workflow_id_conflict_policy` for handling a workflow id duplication with a *running* workflow. - */ - workflowIdReusePolicy?: (temporal.api.enums.v1.WorkflowIdReusePolicy|null); - - /** - * Defines how to resolve a workflow id conflict with a *running* workflow. - * The default policy is WORKFLOW_ID_CONFLICT_POLICY_FAIL. - * - * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. - */ - workflowIdConflictPolicy?: (temporal.api.enums.v1.WorkflowIdConflictPolicy|null); - - /** The retry policy for the workflow. Will never exceed `workflow_execution_timeout`. */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ */ - cronSchedule?: (string|null); - - /** StartWorkflowExecutionRequest memo */ - memo?: (temporal.api.common.v1.IMemo|null); - - /** StartWorkflowExecutionRequest searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** StartWorkflowExecutionRequest header */ - header?: (temporal.api.common.v1.IHeader|null); - - /** - * Request to get the first workflow task inline in the response bypassing matching service and worker polling. - * If set to `true` the caller is expected to have a worker available and capable of processing the task. - * The returned task will be marked as started and is expected to be completed by the specified - * `workflow_task_timeout`. - */ - requestEagerExecution?: (boolean|null); - - /** - * These values will be available as ContinuedFailure and LastCompletionResult in the - * WorkflowExecutionStarted event and through SDKs. The are currently only used by the - * server itself (for the schedules feature) and are not intended to be exposed in - * StartWorkflowExecution. - */ - continuedFailure?: (temporal.api.failure.v1.IFailure|null); - - /** StartWorkflowExecutionRequest lastCompletionResult */ - lastCompletionResult?: (temporal.api.common.v1.IPayloads|null); - - /** - * Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. - * If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest - * of the delay will be ignored. - */ - workflowStartDelay?: (google.protobuf.IDuration|null); - - /** - * Callbacks to be called by the server when this workflow reaches a terminal state. - * If the workflow continues-as-new, these callbacks will be carried over to the new execution. - * Callback addresses must be whitelisted in the server's dynamic configuration. - */ - completionCallbacks?: (temporal.api.common.v1.ICallback[]|null); - - /** - * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo - * for use by user interfaces to display the fixed as-of-start summary and details of the - * workflow. - */ - userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** Links to be associated with the workflow. */ - links?: (temporal.api.common.v1.ILink[]|null); - - /** - * If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. - * To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions. - */ - versioningOverride?: (temporal.api.workflow.v1.IVersioningOverride|null); - - /** - * Defines actions to be done to the existing running workflow when the conflict policy - * WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING is used. If not set (ie., nil value) or set to a - * empty object (ie., all options with default value), it won't do anything to the existing - * running workflow. If set, it will add a history event to the running workflow. - */ - onConflictOptions?: (temporal.api.workflow.v1.IOnConflictOptions|null); - - /** Priority metadata */ - priority?: (temporal.api.common.v1.IPriority|null); - - /** Deployment Options of the worker who will process the eager task. Passed when `request_eager_execution=true`. */ - eagerWorkerDeploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - } - - /** Represents a StartWorkflowExecutionRequest. */ - class StartWorkflowExecutionRequest implements IStartWorkflowExecutionRequest { - - /** - * Constructs a new StartWorkflowExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IStartWorkflowExecutionRequest); - - /** StartWorkflowExecutionRequest namespace. */ - public namespace: string; - - /** StartWorkflowExecutionRequest workflowId. */ - public workflowId: string; - - /** StartWorkflowExecutionRequest workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** StartWorkflowExecutionRequest taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** Serialized arguments to the workflow. These are passed as arguments to the workflow function. */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** Total workflow execution timeout including retries and continue as new. */ - public workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run. */ - public workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - public workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** The identity of the client who initiated this request */ - public identity: string; - - /** A unique identifier for this start request. Typically UUIDv4. */ - public requestId: string; - - /** - * Defines whether to allow re-using the workflow id from a previously *closed* workflow. - * The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. - * - * See `workflow_id_conflict_policy` for handling a workflow id duplication with a *running* workflow. - */ - public workflowIdReusePolicy: temporal.api.enums.v1.WorkflowIdReusePolicy; - - /** - * Defines how to resolve a workflow id conflict with a *running* workflow. - * The default policy is WORKFLOW_ID_CONFLICT_POLICY_FAIL. - * - * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. - */ - public workflowIdConflictPolicy: temporal.api.enums.v1.WorkflowIdConflictPolicy; - - /** The retry policy for the workflow. Will never exceed `workflow_execution_timeout`. */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ */ - public cronSchedule: string; - - /** StartWorkflowExecutionRequest memo. */ - public memo?: (temporal.api.common.v1.IMemo|null); - - /** StartWorkflowExecutionRequest searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** StartWorkflowExecutionRequest header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** - * Request to get the first workflow task inline in the response bypassing matching service and worker polling. - * If set to `true` the caller is expected to have a worker available and capable of processing the task. - * The returned task will be marked as started and is expected to be completed by the specified - * `workflow_task_timeout`. - */ - public requestEagerExecution: boolean; - - /** - * These values will be available as ContinuedFailure and LastCompletionResult in the - * WorkflowExecutionStarted event and through SDKs. The are currently only used by the - * server itself (for the schedules feature) and are not intended to be exposed in - * StartWorkflowExecution. - */ - public continuedFailure?: (temporal.api.failure.v1.IFailure|null); - - /** StartWorkflowExecutionRequest lastCompletionResult. */ - public lastCompletionResult?: (temporal.api.common.v1.IPayloads|null); - - /** - * Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. - * If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest - * of the delay will be ignored. - */ - public workflowStartDelay?: (google.protobuf.IDuration|null); - - /** - * Callbacks to be called by the server when this workflow reaches a terminal state. - * If the workflow continues-as-new, these callbacks will be carried over to the new execution. - * Callback addresses must be whitelisted in the server's dynamic configuration. - */ - public completionCallbacks: temporal.api.common.v1.ICallback[]; - - /** - * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo - * for use by user interfaces to display the fixed as-of-start summary and details of the - * workflow. - */ - public userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** Links to be associated with the workflow. */ - public links: temporal.api.common.v1.ILink[]; - - /** - * If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. - * To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions. - */ - public versioningOverride?: (temporal.api.workflow.v1.IVersioningOverride|null); - - /** - * Defines actions to be done to the existing running workflow when the conflict policy - * WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING is used. If not set (ie., nil value) or set to a - * empty object (ie., all options with default value), it won't do anything to the existing - * running workflow. If set, it will add a history event to the running workflow. - */ - public onConflictOptions?: (temporal.api.workflow.v1.IOnConflictOptions|null); - - /** Priority metadata */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** Deployment Options of the worker who will process the eager task. Passed when `request_eager_execution=true`. */ - public eagerWorkerDeploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - - /** - * Creates a new StartWorkflowExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StartWorkflowExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IStartWorkflowExecutionRequest): temporal.api.workflowservice.v1.StartWorkflowExecutionRequest; - - /** - * Encodes the specified StartWorkflowExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.StartWorkflowExecutionRequest.verify|verify} messages. - * @param message StartWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IStartWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartWorkflowExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.StartWorkflowExecutionRequest.verify|verify} messages. - * @param message StartWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IStartWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartWorkflowExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.StartWorkflowExecutionRequest; - - /** - * Decodes a StartWorkflowExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.StartWorkflowExecutionRequest; - - /** - * Creates a StartWorkflowExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartWorkflowExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.StartWorkflowExecutionRequest; - - /** - * Creates a plain object from a StartWorkflowExecutionRequest message. Also converts values to other types if specified. - * @param message StartWorkflowExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.StartWorkflowExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartWorkflowExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartWorkflowExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartWorkflowExecutionResponse. */ - interface IStartWorkflowExecutionResponse { - - /** The run id of the workflow that was started - or used (via WorkflowIdConflictPolicy USE_EXISTING). */ - runId?: (string|null); - - /** If true, a new workflow was started. */ - started?: (boolean|null); - - /** - * Current execution status of the workflow. Typically remains WORKFLOW_EXECUTION_STATUS_RUNNING - * unless a de-dupe occurs or in specific scenarios handled within the ExecuteMultiOperation (refer to its docs). - */ - status?: (temporal.api.enums.v1.WorkflowExecutionStatus|null); - - /** - * When `request_eager_execution` is set on the `StartWorkflowExecutionRequest`, the server - if supported - will - * return the first workflow task to be eagerly executed. - * The caller is expected to have a worker available to process the task. - */ - eagerWorkflowTask?: (temporal.api.workflowservice.v1.IPollWorkflowTaskQueueResponse|null); - - /** Link to the workflow event. */ - link?: (temporal.api.common.v1.ILink|null); - } - - /** Represents a StartWorkflowExecutionResponse. */ - class StartWorkflowExecutionResponse implements IStartWorkflowExecutionResponse { - - /** - * Constructs a new StartWorkflowExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IStartWorkflowExecutionResponse); - - /** The run id of the workflow that was started - or used (via WorkflowIdConflictPolicy USE_EXISTING). */ - public runId: string; - - /** If true, a new workflow was started. */ - public started: boolean; - - /** - * Current execution status of the workflow. Typically remains WORKFLOW_EXECUTION_STATUS_RUNNING - * unless a de-dupe occurs or in specific scenarios handled within the ExecuteMultiOperation (refer to its docs). - */ - public status: temporal.api.enums.v1.WorkflowExecutionStatus; - - /** - * When `request_eager_execution` is set on the `StartWorkflowExecutionRequest`, the server - if supported - will - * return the first workflow task to be eagerly executed. - * The caller is expected to have a worker available to process the task. - */ - public eagerWorkflowTask?: (temporal.api.workflowservice.v1.IPollWorkflowTaskQueueResponse|null); - - /** Link to the workflow event. */ - public link?: (temporal.api.common.v1.ILink|null); - - /** - * Creates a new StartWorkflowExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StartWorkflowExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IStartWorkflowExecutionResponse): temporal.api.workflowservice.v1.StartWorkflowExecutionResponse; - - /** - * Encodes the specified StartWorkflowExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.StartWorkflowExecutionResponse.verify|verify} messages. - * @param message StartWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IStartWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartWorkflowExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.StartWorkflowExecutionResponse.verify|verify} messages. - * @param message StartWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IStartWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartWorkflowExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.StartWorkflowExecutionResponse; - - /** - * Decodes a StartWorkflowExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.StartWorkflowExecutionResponse; - - /** - * Creates a StartWorkflowExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartWorkflowExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.StartWorkflowExecutionResponse; - - /** - * Creates a plain object from a StartWorkflowExecutionResponse message. Also converts values to other types if specified. - * @param message StartWorkflowExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.StartWorkflowExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartWorkflowExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartWorkflowExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetWorkflowExecutionHistoryRequest. */ - interface IGetWorkflowExecutionHistoryRequest { - - /** GetWorkflowExecutionHistoryRequest namespace */ - namespace?: (string|null); - - /** GetWorkflowExecutionHistoryRequest execution */ - execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** GetWorkflowExecutionHistoryRequest maximumPageSize */ - maximumPageSize?: (number|null); - - /** - * If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of - * these, it should be passed here to fetch the next page. - */ - nextPageToken?: (Uint8Array|null); - - /** - * If set to true, the RPC call will not resolve until there is a new event which matches - * the `history_event_filter_type`, or a timeout is hit. - */ - waitNewEvent?: (boolean|null); - - /** - * Filter returned events such that they match the specified filter type. - * Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT. - */ - historyEventFilterType?: (temporal.api.enums.v1.HistoryEventFilterType|null); - - /** GetWorkflowExecutionHistoryRequest skipArchival */ - skipArchival?: (boolean|null); - } - - /** Represents a GetWorkflowExecutionHistoryRequest. */ - class GetWorkflowExecutionHistoryRequest implements IGetWorkflowExecutionHistoryRequest { - - /** - * Constructs a new GetWorkflowExecutionHistoryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryRequest); - - /** GetWorkflowExecutionHistoryRequest namespace. */ - public namespace: string; - - /** GetWorkflowExecutionHistoryRequest execution. */ - public execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** GetWorkflowExecutionHistoryRequest maximumPageSize. */ - public maximumPageSize: number; - - /** - * If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of - * these, it should be passed here to fetch the next page. - */ - public nextPageToken: Uint8Array; - - /** - * If set to true, the RPC call will not resolve until there is a new event which matches - * the `history_event_filter_type`, or a timeout is hit. - */ - public waitNewEvent: boolean; - - /** - * Filter returned events such that they match the specified filter type. - * Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT. - */ - public historyEventFilterType: temporal.api.enums.v1.HistoryEventFilterType; - - /** GetWorkflowExecutionHistoryRequest skipArchival. */ - public skipArchival: boolean; - - /** - * Creates a new GetWorkflowExecutionHistoryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetWorkflowExecutionHistoryRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryRequest): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest; - - /** - * Encodes the specified GetWorkflowExecutionHistoryRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest.verify|verify} messages. - * @param message GetWorkflowExecutionHistoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetWorkflowExecutionHistoryRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest.verify|verify} messages. - * @param message GetWorkflowExecutionHistoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetWorkflowExecutionHistoryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetWorkflowExecutionHistoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest; - - /** - * Decodes a GetWorkflowExecutionHistoryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetWorkflowExecutionHistoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest; - - /** - * Creates a GetWorkflowExecutionHistoryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetWorkflowExecutionHistoryRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest; - - /** - * Creates a plain object from a GetWorkflowExecutionHistoryRequest message. Also converts values to other types if specified. - * @param message GetWorkflowExecutionHistoryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetWorkflowExecutionHistoryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetWorkflowExecutionHistoryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetWorkflowExecutionHistoryResponse. */ - interface IGetWorkflowExecutionHistoryResponse { - - /** GetWorkflowExecutionHistoryResponse history */ - history?: (temporal.api.history.v1.IHistory|null); - - /** - * Raw history is an alternate representation of history that may be returned if configured on - * the frontend. This is not supported by all SDKs. Either this or `history` will be set. - */ - rawHistory?: (temporal.api.common.v1.IDataBlob[]|null); - - /** Will be set if there are more history events than were included in this response */ - nextPageToken?: (Uint8Array|null); - - /** GetWorkflowExecutionHistoryResponse archived */ - archived?: (boolean|null); - } - - /** Represents a GetWorkflowExecutionHistoryResponse. */ - class GetWorkflowExecutionHistoryResponse implements IGetWorkflowExecutionHistoryResponse { - - /** - * Constructs a new GetWorkflowExecutionHistoryResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryResponse); - - /** GetWorkflowExecutionHistoryResponse history. */ - public history?: (temporal.api.history.v1.IHistory|null); - - /** - * Raw history is an alternate representation of history that may be returned if configured on - * the frontend. This is not supported by all SDKs. Either this or `history` will be set. - */ - public rawHistory: temporal.api.common.v1.IDataBlob[]; - - /** Will be set if there are more history events than were included in this response */ - public nextPageToken: Uint8Array; - - /** GetWorkflowExecutionHistoryResponse archived. */ - public archived: boolean; - - /** - * Creates a new GetWorkflowExecutionHistoryResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetWorkflowExecutionHistoryResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryResponse): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse; - - /** - * Encodes the specified GetWorkflowExecutionHistoryResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse.verify|verify} messages. - * @param message GetWorkflowExecutionHistoryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetWorkflowExecutionHistoryResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse.verify|verify} messages. - * @param message GetWorkflowExecutionHistoryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetWorkflowExecutionHistoryResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetWorkflowExecutionHistoryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse; - - /** - * Decodes a GetWorkflowExecutionHistoryResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetWorkflowExecutionHistoryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse; - - /** - * Creates a GetWorkflowExecutionHistoryResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetWorkflowExecutionHistoryResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse; - - /** - * Creates a plain object from a GetWorkflowExecutionHistoryResponse message. Also converts values to other types if specified. - * @param message GetWorkflowExecutionHistoryResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetWorkflowExecutionHistoryResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetWorkflowExecutionHistoryResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetWorkflowExecutionHistoryReverseRequest. */ - interface IGetWorkflowExecutionHistoryReverseRequest { - - /** GetWorkflowExecutionHistoryReverseRequest namespace */ - namespace?: (string|null); - - /** GetWorkflowExecutionHistoryReverseRequest execution */ - execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** GetWorkflowExecutionHistoryReverseRequest maximumPageSize */ - maximumPageSize?: (number|null); - - /** GetWorkflowExecutionHistoryReverseRequest nextPageToken */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a GetWorkflowExecutionHistoryReverseRequest. */ - class GetWorkflowExecutionHistoryReverseRequest implements IGetWorkflowExecutionHistoryReverseRequest { - - /** - * Constructs a new GetWorkflowExecutionHistoryReverseRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryReverseRequest); - - /** GetWorkflowExecutionHistoryReverseRequest namespace. */ - public namespace: string; - - /** GetWorkflowExecutionHistoryReverseRequest execution. */ - public execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** GetWorkflowExecutionHistoryReverseRequest maximumPageSize. */ - public maximumPageSize: number; - - /** GetWorkflowExecutionHistoryReverseRequest nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new GetWorkflowExecutionHistoryReverseRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetWorkflowExecutionHistoryReverseRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryReverseRequest): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseRequest; - - /** - * Encodes the specified GetWorkflowExecutionHistoryReverseRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseRequest.verify|verify} messages. - * @param message GetWorkflowExecutionHistoryReverseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryReverseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetWorkflowExecutionHistoryReverseRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseRequest.verify|verify} messages. - * @param message GetWorkflowExecutionHistoryReverseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryReverseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetWorkflowExecutionHistoryReverseRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetWorkflowExecutionHistoryReverseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseRequest; - - /** - * Decodes a GetWorkflowExecutionHistoryReverseRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetWorkflowExecutionHistoryReverseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseRequest; - - /** - * Creates a GetWorkflowExecutionHistoryReverseRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetWorkflowExecutionHistoryReverseRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseRequest; - - /** - * Creates a plain object from a GetWorkflowExecutionHistoryReverseRequest message. Also converts values to other types if specified. - * @param message GetWorkflowExecutionHistoryReverseRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetWorkflowExecutionHistoryReverseRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetWorkflowExecutionHistoryReverseRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetWorkflowExecutionHistoryReverseResponse. */ - interface IGetWorkflowExecutionHistoryReverseResponse { - - /** GetWorkflowExecutionHistoryReverseResponse history */ - history?: (temporal.api.history.v1.IHistory|null); - - /** Will be set if there are more history events than were included in this response */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a GetWorkflowExecutionHistoryReverseResponse. */ - class GetWorkflowExecutionHistoryReverseResponse implements IGetWorkflowExecutionHistoryReverseResponse { - - /** - * Constructs a new GetWorkflowExecutionHistoryReverseResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryReverseResponse); - - /** GetWorkflowExecutionHistoryReverseResponse history. */ - public history?: (temporal.api.history.v1.IHistory|null); - - /** Will be set if there are more history events than were included in this response */ - public nextPageToken: Uint8Array; - - /** - * Creates a new GetWorkflowExecutionHistoryReverseResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetWorkflowExecutionHistoryReverseResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryReverseResponse): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse; - - /** - * Encodes the specified GetWorkflowExecutionHistoryReverseResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse.verify|verify} messages. - * @param message GetWorkflowExecutionHistoryReverseResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryReverseResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetWorkflowExecutionHistoryReverseResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse.verify|verify} messages. - * @param message GetWorkflowExecutionHistoryReverseResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryReverseResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetWorkflowExecutionHistoryReverseResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetWorkflowExecutionHistoryReverseResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse; - - /** - * Decodes a GetWorkflowExecutionHistoryReverseResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetWorkflowExecutionHistoryReverseResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse; - - /** - * Creates a GetWorkflowExecutionHistoryReverseResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetWorkflowExecutionHistoryReverseResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse; - - /** - * Creates a plain object from a GetWorkflowExecutionHistoryReverseResponse message. Also converts values to other types if specified. - * @param message GetWorkflowExecutionHistoryReverseResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetWorkflowExecutionHistoryReverseResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetWorkflowExecutionHistoryReverseResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollWorkflowTaskQueueRequest. */ - interface IPollWorkflowTaskQueueRequest { - - /** PollWorkflowTaskQueueRequest namespace */ - namespace?: (string|null); - - /** PollWorkflowTaskQueueRequest taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** The identity of the worker/client who is polling this task queue */ - identity?: (string|null); - - /** - * A unique key for this worker instance, used for tracking worker lifecycle. - * This is guaranteed to be unique, whereas identity is not guaranteed to be unique. - */ - workerInstanceKey?: (string|null); - - /** - * Deprecated. Use deployment_options instead. - * Each worker process should provide an ID unique to the specific set of code it is running - * "checksum" in this field name isn't very accurate, it should be though of as an id. - */ - binaryChecksum?: (string|null); - - /** - * Deprecated. Use deployment_options instead. - * Information about this worker's build identifier and if it is choosing to use the versioning - * feature. See the `WorkerVersionCapabilities` docstring for more. - */ - workerVersionCapabilities?: (temporal.api.common.v1.IWorkerVersionCapabilities|null); - - /** - * Worker deployment options that user has set in the worker. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - */ - deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - } - - /** Represents a PollWorkflowTaskQueueRequest. */ - class PollWorkflowTaskQueueRequest implements IPollWorkflowTaskQueueRequest { - - /** - * Constructs a new PollWorkflowTaskQueueRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPollWorkflowTaskQueueRequest); - - /** PollWorkflowTaskQueueRequest namespace. */ - public namespace: string; - - /** PollWorkflowTaskQueueRequest taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** The identity of the worker/client who is polling this task queue */ - public identity: string; - - /** - * A unique key for this worker instance, used for tracking worker lifecycle. - * This is guaranteed to be unique, whereas identity is not guaranteed to be unique. - */ - public workerInstanceKey: string; - - /** - * Deprecated. Use deployment_options instead. - * Each worker process should provide an ID unique to the specific set of code it is running - * "checksum" in this field name isn't very accurate, it should be though of as an id. - */ - public binaryChecksum: string; - - /** - * Deprecated. Use deployment_options instead. - * Information about this worker's build identifier and if it is choosing to use the versioning - * feature. See the `WorkerVersionCapabilities` docstring for more. - */ - public workerVersionCapabilities?: (temporal.api.common.v1.IWorkerVersionCapabilities|null); - - /** - * Worker deployment options that user has set in the worker. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - */ - public deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - - /** - * Creates a new PollWorkflowTaskQueueRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PollWorkflowTaskQueueRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPollWorkflowTaskQueueRequest): temporal.api.workflowservice.v1.PollWorkflowTaskQueueRequest; - - /** - * Encodes the specified PollWorkflowTaskQueueRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.PollWorkflowTaskQueueRequest.verify|verify} messages. - * @param message PollWorkflowTaskQueueRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPollWorkflowTaskQueueRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollWorkflowTaskQueueRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PollWorkflowTaskQueueRequest.verify|verify} messages. - * @param message PollWorkflowTaskQueueRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPollWorkflowTaskQueueRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollWorkflowTaskQueueRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollWorkflowTaskQueueRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PollWorkflowTaskQueueRequest; - - /** - * Decodes a PollWorkflowTaskQueueRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollWorkflowTaskQueueRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PollWorkflowTaskQueueRequest; - - /** - * Creates a PollWorkflowTaskQueueRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollWorkflowTaskQueueRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PollWorkflowTaskQueueRequest; - - /** - * Creates a plain object from a PollWorkflowTaskQueueRequest message. Also converts values to other types if specified. - * @param message PollWorkflowTaskQueueRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PollWorkflowTaskQueueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollWorkflowTaskQueueRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollWorkflowTaskQueueRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollWorkflowTaskQueueResponse. */ - interface IPollWorkflowTaskQueueResponse { - - /** A unique identifier for this task */ - taskToken?: (Uint8Array|null); - - /** PollWorkflowTaskQueueResponse workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** PollWorkflowTaskQueueResponse workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** - * The last workflow task started event which was processed by some worker for this execution. - * Will be zero if no task has ever started. - */ - previousStartedEventId?: (Long|null); - - /** - * The id of the most recent workflow task started event, which will have been generated as a - * result of this poll request being served. Will be zero if the task - * does not contain any events which would advance history (no new WFT started). - * Currently this can happen for queries. - */ - startedEventId?: (Long|null); - - /** Starting at 1, the number of attempts to complete this task by any worker. */ - attempt?: (number|null); - - /** - * A hint that there are more tasks already present in this task queue - * partition. Can be used to prioritize draining a sticky queue. - * - * Specifically, the returned number is the number of tasks remaining in - * the in-memory buffer for this partition, which is currently capped at - * 1000. Because sticky queues only have one partition, this number is - * more useful when draining them. Normal queues, typically having more than one - * partition, will return a number representing only some portion of the - * overall backlog. Subsequent RPCs may not hit the same partition as - * this call. - */ - backlogCountHint?: (Long|null); - - /** - * The history for this workflow, which will either be complete or partial. Partial histories - * are sent to workers who have signaled that they are using a sticky queue when completing - * a workflow task. - */ - history?: (temporal.api.history.v1.IHistory|null); - - /** - * Will be set if there are more history events than were included in this response. Such events - * should be fetched via `GetWorkflowExecutionHistory`. - */ - nextPageToken?: (Uint8Array|null); - - /** - * Legacy queries appear in this field. The query must be responded to via - * `RespondQueryTaskCompleted`. If the workflow is already closed (queries are permitted on - * closed workflows) then the `history` field will be populated with the entire history. It - * may also be populated if this task originates on a non-sticky queue. - */ - query?: (temporal.api.query.v1.IWorkflowQuery|null); - - /** - * The task queue this task originated from, which will always be the original non-sticky name - * for the queue, even if this response came from polling a sticky queue. - */ - workflowExecutionTaskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** When this task was scheduled by the server */ - scheduledTime?: (google.protobuf.ITimestamp|null); - - /** When the current workflow task started event was generated, meaning the current attempt. */ - startedTime?: (google.protobuf.ITimestamp|null); - - /** - * Queries that should be executed after applying the history in this task. Responses should be - * attached to `RespondWorkflowTaskCompletedRequest::query_results` - */ - queries?: ({ [k: string]: temporal.api.query.v1.IWorkflowQuery }|null); - - /** Protocol messages piggybacking on a WFT as a transport */ - messages?: (temporal.api.protocol.v1.IMessage[]|null); - - /** Server-advised information the SDK may use to adjust its poller count. */ - pollerScalingDecision?: (temporal.api.taskqueue.v1.IPollerScalingDecision|null); - } - - /** Represents a PollWorkflowTaskQueueResponse. */ - class PollWorkflowTaskQueueResponse implements IPollWorkflowTaskQueueResponse { - - /** - * Constructs a new PollWorkflowTaskQueueResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPollWorkflowTaskQueueResponse); - - /** A unique identifier for this task */ - public taskToken: Uint8Array; - - /** PollWorkflowTaskQueueResponse workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** PollWorkflowTaskQueueResponse workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** - * The last workflow task started event which was processed by some worker for this execution. - * Will be zero if no task has ever started. - */ - public previousStartedEventId: Long; - - /** - * The id of the most recent workflow task started event, which will have been generated as a - * result of this poll request being served. Will be zero if the task - * does not contain any events which would advance history (no new WFT started). - * Currently this can happen for queries. - */ - public startedEventId: Long; - - /** Starting at 1, the number of attempts to complete this task by any worker. */ - public attempt: number; - - /** - * A hint that there are more tasks already present in this task queue - * partition. Can be used to prioritize draining a sticky queue. - * - * Specifically, the returned number is the number of tasks remaining in - * the in-memory buffer for this partition, which is currently capped at - * 1000. Because sticky queues only have one partition, this number is - * more useful when draining them. Normal queues, typically having more than one - * partition, will return a number representing only some portion of the - * overall backlog. Subsequent RPCs may not hit the same partition as - * this call. - */ - public backlogCountHint: Long; - - /** - * The history for this workflow, which will either be complete or partial. Partial histories - * are sent to workers who have signaled that they are using a sticky queue when completing - * a workflow task. - */ - public history?: (temporal.api.history.v1.IHistory|null); - - /** - * Will be set if there are more history events than were included in this response. Such events - * should be fetched via `GetWorkflowExecutionHistory`. - */ - public nextPageToken: Uint8Array; - - /** - * Legacy queries appear in this field. The query must be responded to via - * `RespondQueryTaskCompleted`. If the workflow is already closed (queries are permitted on - * closed workflows) then the `history` field will be populated with the entire history. It - * may also be populated if this task originates on a non-sticky queue. - */ - public query?: (temporal.api.query.v1.IWorkflowQuery|null); - - /** - * The task queue this task originated from, which will always be the original non-sticky name - * for the queue, even if this response came from polling a sticky queue. - */ - public workflowExecutionTaskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** When this task was scheduled by the server */ - public scheduledTime?: (google.protobuf.ITimestamp|null); - - /** When the current workflow task started event was generated, meaning the current attempt. */ - public startedTime?: (google.protobuf.ITimestamp|null); - - /** - * Queries that should be executed after applying the history in this task. Responses should be - * attached to `RespondWorkflowTaskCompletedRequest::query_results` - */ - public queries: { [k: string]: temporal.api.query.v1.IWorkflowQuery }; - - /** Protocol messages piggybacking on a WFT as a transport */ - public messages: temporal.api.protocol.v1.IMessage[]; - - /** Server-advised information the SDK may use to adjust its poller count. */ - public pollerScalingDecision?: (temporal.api.taskqueue.v1.IPollerScalingDecision|null); - - /** - * Creates a new PollWorkflowTaskQueueResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PollWorkflowTaskQueueResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPollWorkflowTaskQueueResponse): temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse; - - /** - * Encodes the specified PollWorkflowTaskQueueResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse.verify|verify} messages. - * @param message PollWorkflowTaskQueueResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPollWorkflowTaskQueueResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollWorkflowTaskQueueResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse.verify|verify} messages. - * @param message PollWorkflowTaskQueueResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPollWorkflowTaskQueueResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollWorkflowTaskQueueResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollWorkflowTaskQueueResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse; - - /** - * Decodes a PollWorkflowTaskQueueResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollWorkflowTaskQueueResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse; - - /** - * Creates a PollWorkflowTaskQueueResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollWorkflowTaskQueueResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse; - - /** - * Creates a plain object from a PollWorkflowTaskQueueResponse message. Also converts values to other types if specified. - * @param message PollWorkflowTaskQueueResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollWorkflowTaskQueueResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollWorkflowTaskQueueResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondWorkflowTaskCompletedRequest. */ - interface IRespondWorkflowTaskCompletedRequest { - - /** The task token as received in `PollWorkflowTaskQueueResponse` */ - taskToken?: (Uint8Array|null); - - /** A list of commands generated when driving the workflow code in response to the new task */ - commands?: (temporal.api.command.v1.ICommand[]|null); - - /** The identity of the worker/client */ - identity?: (string|null); - - /** - * May be set by workers to indicate that the worker desires future tasks to be provided with - * incremental history on a sticky queue. - */ - stickyAttributes?: (temporal.api.taskqueue.v1.IStickyExecutionAttributes|null); - - /** - * If set, the worker wishes to immediately receive the next workflow task as a response to - * this completion. This can save on polling round-trips. - */ - returnNewWorkflowTask?: (boolean|null); - - /** - * Can be used to *force* creation of a new workflow task, even if no commands have resolved or - * one would not otherwise have been generated. This is used when the worker knows it is doing - * something useful, but cannot complete it within the workflow task timeout. Local activities - * which run for longer than the task timeout being the prime example. - */ - forceCreateNewWorkflowTask?: (boolean|null); - - /** - * Deprecated. Use `deployment_options` instead. - * Worker process' unique binary id - */ - binaryChecksum?: (string|null); - - /** Responses to the `queries` field in the task being responded to */ - queryResults?: ({ [k: string]: temporal.api.query.v1.IWorkflowQueryResult }|null); - - /** RespondWorkflowTaskCompletedRequest namespace */ - namespace?: (string|null); - - /** - * Version info of the worker who processed this task. This message's `build_id` field should - * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` - * field to true. See message docstrings for more. - * Deprecated. Use `deployment_options` and `versioning_behavior` instead. - */ - workerVersionStamp?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** Protocol messages piggybacking on a WFT as a transport */ - messages?: (temporal.api.protocol.v1.IMessage[]|null); - - /** - * Data the SDK wishes to record for itself, but server need not interpret, and does not - * directly impact workflow state. - */ - sdkMetadata?: (temporal.api.sdk.v1.IWorkflowTaskCompletedMetadata|null); - - /** Local usage data collected for metering */ - meteringMetadata?: (temporal.api.common.v1.IMeteringMetadata|null); - - /** All capabilities the SDK supports. */ - capabilities?: (temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.ICapabilities|null); - - /** - * Deployment info of the worker that completed this task. Must be present if user has set - * `WorkerDeploymentOptions` regardless of versioning being enabled or not. - * Deprecated. Replaced with `deployment_options`. - */ - deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** - * Versioning behavior of this workflow execution as set on the worker that completed this task. - * UNSPECIFIED means versioning is not enabled in the worker. - */ - versioningBehavior?: (temporal.api.enums.v1.VersioningBehavior|null); - - /** Worker deployment options that user has set in the worker. */ - deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - } - - /** Represents a RespondWorkflowTaskCompletedRequest. */ - class RespondWorkflowTaskCompletedRequest implements IRespondWorkflowTaskCompletedRequest { - - /** - * Constructs a new RespondWorkflowTaskCompletedRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondWorkflowTaskCompletedRequest); - - /** The task token as received in `PollWorkflowTaskQueueResponse` */ - public taskToken: Uint8Array; - - /** A list of commands generated when driving the workflow code in response to the new task */ - public commands: temporal.api.command.v1.ICommand[]; - - /** The identity of the worker/client */ - public identity: string; - - /** - * May be set by workers to indicate that the worker desires future tasks to be provided with - * incremental history on a sticky queue. - */ - public stickyAttributes?: (temporal.api.taskqueue.v1.IStickyExecutionAttributes|null); - - /** - * If set, the worker wishes to immediately receive the next workflow task as a response to - * this completion. This can save on polling round-trips. - */ - public returnNewWorkflowTask: boolean; - - /** - * Can be used to *force* creation of a new workflow task, even if no commands have resolved or - * one would not otherwise have been generated. This is used when the worker knows it is doing - * something useful, but cannot complete it within the workflow task timeout. Local activities - * which run for longer than the task timeout being the prime example. - */ - public forceCreateNewWorkflowTask: boolean; - - /** - * Deprecated. Use `deployment_options` instead. - * Worker process' unique binary id - */ - public binaryChecksum: string; - - /** Responses to the `queries` field in the task being responded to */ - public queryResults: { [k: string]: temporal.api.query.v1.IWorkflowQueryResult }; - - /** RespondWorkflowTaskCompletedRequest namespace. */ - public namespace: string; - - /** - * Version info of the worker who processed this task. This message's `build_id` field should - * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` - * field to true. See message docstrings for more. - * Deprecated. Use `deployment_options` and `versioning_behavior` instead. - */ - public workerVersionStamp?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** Protocol messages piggybacking on a WFT as a transport */ - public messages: temporal.api.protocol.v1.IMessage[]; - - /** - * Data the SDK wishes to record for itself, but server need not interpret, and does not - * directly impact workflow state. - */ - public sdkMetadata?: (temporal.api.sdk.v1.IWorkflowTaskCompletedMetadata|null); - - /** Local usage data collected for metering */ - public meteringMetadata?: (temporal.api.common.v1.IMeteringMetadata|null); - - /** All capabilities the SDK supports. */ - public capabilities?: (temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.ICapabilities|null); - - /** - * Deployment info of the worker that completed this task. Must be present if user has set - * `WorkerDeploymentOptions` regardless of versioning being enabled or not. - * Deprecated. Replaced with `deployment_options`. - */ - public deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** - * Versioning behavior of this workflow execution as set on the worker that completed this task. - * UNSPECIFIED means versioning is not enabled in the worker. - */ - public versioningBehavior: temporal.api.enums.v1.VersioningBehavior; - - /** Worker deployment options that user has set in the worker. */ - public deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - - /** - * Creates a new RespondWorkflowTaskCompletedRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondWorkflowTaskCompletedRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondWorkflowTaskCompletedRequest): temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest; - - /** - * Encodes the specified RespondWorkflowTaskCompletedRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.verify|verify} messages. - * @param message RespondWorkflowTaskCompletedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondWorkflowTaskCompletedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondWorkflowTaskCompletedRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.verify|verify} messages. - * @param message RespondWorkflowTaskCompletedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondWorkflowTaskCompletedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondWorkflowTaskCompletedRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondWorkflowTaskCompletedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest; - - /** - * Decodes a RespondWorkflowTaskCompletedRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondWorkflowTaskCompletedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest; - - /** - * Creates a RespondWorkflowTaskCompletedRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondWorkflowTaskCompletedRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest; - - /** - * Creates a plain object from a RespondWorkflowTaskCompletedRequest message. Also converts values to other types if specified. - * @param message RespondWorkflowTaskCompletedRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondWorkflowTaskCompletedRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondWorkflowTaskCompletedRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace RespondWorkflowTaskCompletedRequest { - - /** Properties of a Capabilities. */ - interface ICapabilities { - - /** - * True if the SDK can handle speculative workflow task with command events. If true, the - * server may choose, at its discretion, to discard a speculative workflow task even if that - * speculative task included command events the SDK had not previously processed. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "with" used to describe the workflow task. --) - */ - discardSpeculativeWorkflowTaskWithEvents?: (boolean|null); - } - - /** SDK capability details. */ - class Capabilities implements ICapabilities { - - /** - * Constructs a new Capabilities. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.ICapabilities); - - /** - * True if the SDK can handle speculative workflow task with command events. If true, the - * server may choose, at its discretion, to discard a speculative workflow task even if that - * speculative task included command events the SDK had not previously processed. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "with" used to describe the workflow task. --) - */ - public discardSpeculativeWorkflowTaskWithEvents: boolean; - - /** - * Creates a new Capabilities instance using the specified properties. - * @param [properties] Properties to set - * @returns Capabilities instance - */ - public static create(properties?: temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.ICapabilities): temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.Capabilities; - - /** - * Encodes the specified Capabilities message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.Capabilities.verify|verify} messages. - * @param message Capabilities message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.ICapabilities, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Capabilities message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.Capabilities.verify|verify} messages. - * @param message Capabilities message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.ICapabilities, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Capabilities message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Capabilities - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.Capabilities; - - /** - * Decodes a Capabilities message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Capabilities - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.Capabilities; - - /** - * Creates a Capabilities message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Capabilities - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.Capabilities; - - /** - * Creates a plain object from a Capabilities message. Also converts values to other types if specified. - * @param message Capabilities - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.Capabilities, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Capabilities to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Capabilities - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a RespondWorkflowTaskCompletedResponse. */ - interface IRespondWorkflowTaskCompletedResponse { - - /** See `RespondWorkflowTaskCompletedResponse::return_new_workflow_task` */ - workflowTask?: (temporal.api.workflowservice.v1.IPollWorkflowTaskQueueResponse|null); - - /** See `ScheduleActivityTaskCommandAttributes::request_eager_execution` */ - activityTasks?: (temporal.api.workflowservice.v1.IPollActivityTaskQueueResponse[]|null); - - /** - * If non zero, indicates the server has discarded the workflow task that was being responded to. - * Will be the event ID of the last workflow task started event in the history before the new workflow task. - * Server is only expected to discard a workflow task if it could not have modified the workflow state. - */ - resetHistoryEventId?: (Long|null); - } - - /** Represents a RespondWorkflowTaskCompletedResponse. */ - class RespondWorkflowTaskCompletedResponse implements IRespondWorkflowTaskCompletedResponse { - - /** - * Constructs a new RespondWorkflowTaskCompletedResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondWorkflowTaskCompletedResponse); - - /** See `RespondWorkflowTaskCompletedResponse::return_new_workflow_task` */ - public workflowTask?: (temporal.api.workflowservice.v1.IPollWorkflowTaskQueueResponse|null); - - /** See `ScheduleActivityTaskCommandAttributes::request_eager_execution` */ - public activityTasks: temporal.api.workflowservice.v1.IPollActivityTaskQueueResponse[]; - - /** - * If non zero, indicates the server has discarded the workflow task that was being responded to. - * Will be the event ID of the last workflow task started event in the history before the new workflow task. - * Server is only expected to discard a workflow task if it could not have modified the workflow state. - */ - public resetHistoryEventId: Long; - - /** - * Creates a new RespondWorkflowTaskCompletedResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondWorkflowTaskCompletedResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondWorkflowTaskCompletedResponse): temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse; - - /** - * Encodes the specified RespondWorkflowTaskCompletedResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse.verify|verify} messages. - * @param message RespondWorkflowTaskCompletedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondWorkflowTaskCompletedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondWorkflowTaskCompletedResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse.verify|verify} messages. - * @param message RespondWorkflowTaskCompletedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondWorkflowTaskCompletedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondWorkflowTaskCompletedResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondWorkflowTaskCompletedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse; - - /** - * Decodes a RespondWorkflowTaskCompletedResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondWorkflowTaskCompletedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse; - - /** - * Creates a RespondWorkflowTaskCompletedResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondWorkflowTaskCompletedResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse; - - /** - * Creates a plain object from a RespondWorkflowTaskCompletedResponse message. Also converts values to other types if specified. - * @param message RespondWorkflowTaskCompletedResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondWorkflowTaskCompletedResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondWorkflowTaskCompletedResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondWorkflowTaskFailedRequest. */ - interface IRespondWorkflowTaskFailedRequest { - - /** The task token as received in `PollWorkflowTaskQueueResponse` */ - taskToken?: (Uint8Array|null); - - /** - * Why did the task fail? It's important to note that many of the variants in this enum cannot - * apply to worker responses. See the type's doc for more. - */ - cause?: (temporal.api.enums.v1.WorkflowTaskFailedCause|null); - - /** Failure details */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** The identity of the worker/client */ - identity?: (string|null); - - /** - * Deprecated. Use `deployment_options` instead. - * Worker process' unique binary id - */ - binaryChecksum?: (string|null); - - /** RespondWorkflowTaskFailedRequest namespace */ - namespace?: (string|null); - - /** Protocol messages piggybacking on a WFT as a transport */ - messages?: (temporal.api.protocol.v1.IMessage[]|null); - - /** - * Version info of the worker who processed this task. This message's `build_id` field should - * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` - * field to true. See message docstrings for more. - * Deprecated. Use `deployment_options` instead. - */ - workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Deployment info of the worker that completed this task. Must be present if user has set - * `WorkerDeploymentOptions` regardless of versioning being enabled or not. - * Deprecated. Replaced with `deployment_options`. - */ - deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** Worker deployment options that user has set in the worker. */ - deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - } - - /** Represents a RespondWorkflowTaskFailedRequest. */ - class RespondWorkflowTaskFailedRequest implements IRespondWorkflowTaskFailedRequest { - - /** - * Constructs a new RespondWorkflowTaskFailedRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondWorkflowTaskFailedRequest); - - /** The task token as received in `PollWorkflowTaskQueueResponse` */ - public taskToken: Uint8Array; - - /** - * Why did the task fail? It's important to note that many of the variants in this enum cannot - * apply to worker responses. See the type's doc for more. - */ - public cause: temporal.api.enums.v1.WorkflowTaskFailedCause; - - /** Failure details */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** The identity of the worker/client */ - public identity: string; - - /** - * Deprecated. Use `deployment_options` instead. - * Worker process' unique binary id - */ - public binaryChecksum: string; - - /** RespondWorkflowTaskFailedRequest namespace. */ - public namespace: string; - - /** Protocol messages piggybacking on a WFT as a transport */ - public messages: temporal.api.protocol.v1.IMessage[]; - - /** - * Version info of the worker who processed this task. This message's `build_id` field should - * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` - * field to true. See message docstrings for more. - * Deprecated. Use `deployment_options` instead. - */ - public workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Deployment info of the worker that completed this task. Must be present if user has set - * `WorkerDeploymentOptions` regardless of versioning being enabled or not. - * Deprecated. Replaced with `deployment_options`. - */ - public deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** Worker deployment options that user has set in the worker. */ - public deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - - /** - * Creates a new RespondWorkflowTaskFailedRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondWorkflowTaskFailedRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondWorkflowTaskFailedRequest): temporal.api.workflowservice.v1.RespondWorkflowTaskFailedRequest; - - /** - * Encodes the specified RespondWorkflowTaskFailedRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondWorkflowTaskFailedRequest.verify|verify} messages. - * @param message RespondWorkflowTaskFailedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondWorkflowTaskFailedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondWorkflowTaskFailedRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondWorkflowTaskFailedRequest.verify|verify} messages. - * @param message RespondWorkflowTaskFailedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondWorkflowTaskFailedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondWorkflowTaskFailedRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondWorkflowTaskFailedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondWorkflowTaskFailedRequest; - - /** - * Decodes a RespondWorkflowTaskFailedRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondWorkflowTaskFailedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondWorkflowTaskFailedRequest; - - /** - * Creates a RespondWorkflowTaskFailedRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondWorkflowTaskFailedRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondWorkflowTaskFailedRequest; - - /** - * Creates a plain object from a RespondWorkflowTaskFailedRequest message. Also converts values to other types if specified. - * @param message RespondWorkflowTaskFailedRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondWorkflowTaskFailedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondWorkflowTaskFailedRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondWorkflowTaskFailedRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondWorkflowTaskFailedResponse. */ - interface IRespondWorkflowTaskFailedResponse { - } - - /** Represents a RespondWorkflowTaskFailedResponse. */ - class RespondWorkflowTaskFailedResponse implements IRespondWorkflowTaskFailedResponse { - - /** - * Constructs a new RespondWorkflowTaskFailedResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondWorkflowTaskFailedResponse); - - /** - * Creates a new RespondWorkflowTaskFailedResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondWorkflowTaskFailedResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondWorkflowTaskFailedResponse): temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse; - - /** - * Encodes the specified RespondWorkflowTaskFailedResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse.verify|verify} messages. - * @param message RespondWorkflowTaskFailedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondWorkflowTaskFailedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondWorkflowTaskFailedResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse.verify|verify} messages. - * @param message RespondWorkflowTaskFailedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondWorkflowTaskFailedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondWorkflowTaskFailedResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondWorkflowTaskFailedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse; - - /** - * Decodes a RespondWorkflowTaskFailedResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondWorkflowTaskFailedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse; - - /** - * Creates a RespondWorkflowTaskFailedResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondWorkflowTaskFailedResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse; - - /** - * Creates a plain object from a RespondWorkflowTaskFailedResponse message. Also converts values to other types if specified. - * @param message RespondWorkflowTaskFailedResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondWorkflowTaskFailedResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondWorkflowTaskFailedResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollActivityTaskQueueRequest. */ - interface IPollActivityTaskQueueRequest { - - /** PollActivityTaskQueueRequest namespace */ - namespace?: (string|null); - - /** PollActivityTaskQueueRequest taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** The identity of the worker/client */ - identity?: (string|null); - - /** - * A unique key for this worker instance, used for tracking worker lifecycle. - * This is guaranteed to be unique, whereas identity is not guaranteed to be unique. - */ - workerInstanceKey?: (string|null); - - /** PollActivityTaskQueueRequest taskQueueMetadata */ - taskQueueMetadata?: (temporal.api.taskqueue.v1.ITaskQueueMetadata|null); - - /** - * Information about this worker's build identifier and if it is choosing to use the versioning - * feature. See the `WorkerVersionCapabilities` docstring for more. - * Deprecated. Replaced by deployment_options. - */ - workerVersionCapabilities?: (temporal.api.common.v1.IWorkerVersionCapabilities|null); - - /** Worker deployment options that user has set in the worker. */ - deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - } - - /** Represents a PollActivityTaskQueueRequest. */ - class PollActivityTaskQueueRequest implements IPollActivityTaskQueueRequest { - - /** - * Constructs a new PollActivityTaskQueueRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPollActivityTaskQueueRequest); - - /** PollActivityTaskQueueRequest namespace. */ - public namespace: string; - - /** PollActivityTaskQueueRequest taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** The identity of the worker/client */ - public identity: string; - - /** - * A unique key for this worker instance, used for tracking worker lifecycle. - * This is guaranteed to be unique, whereas identity is not guaranteed to be unique. - */ - public workerInstanceKey: string; - - /** PollActivityTaskQueueRequest taskQueueMetadata. */ - public taskQueueMetadata?: (temporal.api.taskqueue.v1.ITaskQueueMetadata|null); - - /** - * Information about this worker's build identifier and if it is choosing to use the versioning - * feature. See the `WorkerVersionCapabilities` docstring for more. - * Deprecated. Replaced by deployment_options. - */ - public workerVersionCapabilities?: (temporal.api.common.v1.IWorkerVersionCapabilities|null); - - /** Worker deployment options that user has set in the worker. */ - public deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - - /** - * Creates a new PollActivityTaskQueueRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PollActivityTaskQueueRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPollActivityTaskQueueRequest): temporal.api.workflowservice.v1.PollActivityTaskQueueRequest; - - /** - * Encodes the specified PollActivityTaskQueueRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.PollActivityTaskQueueRequest.verify|verify} messages. - * @param message PollActivityTaskQueueRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPollActivityTaskQueueRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollActivityTaskQueueRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PollActivityTaskQueueRequest.verify|verify} messages. - * @param message PollActivityTaskQueueRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPollActivityTaskQueueRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollActivityTaskQueueRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollActivityTaskQueueRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PollActivityTaskQueueRequest; - - /** - * Decodes a PollActivityTaskQueueRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollActivityTaskQueueRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PollActivityTaskQueueRequest; - - /** - * Creates a PollActivityTaskQueueRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollActivityTaskQueueRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PollActivityTaskQueueRequest; - - /** - * Creates a plain object from a PollActivityTaskQueueRequest message. Also converts values to other types if specified. - * @param message PollActivityTaskQueueRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PollActivityTaskQueueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollActivityTaskQueueRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollActivityTaskQueueRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollActivityTaskQueueResponse. */ - interface IPollActivityTaskQueueResponse { - - /** A unique identifier for this task */ - taskToken?: (Uint8Array|null); - - /** - * The namespace of the activity. If this is a workflow activity then this is the namespace of - * the workflow also. If this is a standalone activity then the name of this field is - * misleading, but retained for compatibility with workflow activities. - */ - workflowNamespace?: (string|null); - - /** Type of the requesting workflow (if this is a workflow activity). */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** Execution info of the requesting workflow (if this is a workflow activity) */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** PollActivityTaskQueueResponse activityType */ - activityType?: (temporal.api.common.v1.IActivityType|null); - - /** - * The autogenerated or user specified identifier of this activity. Can be used to complete the - * activity via `RespondActivityTaskCompletedById`. May be re-used as long as the last usage - * has resolved, but unique IDs for every activity invocation is a good idea. - * Note that only a workflow activity ID may be autogenerated. - */ - activityId?: (string|null); - - /** - * Headers specified by the scheduling workflow. Commonly used to propagate contextual info - * from the workflow to its activities. For example, tracing contexts. - */ - header?: (temporal.api.common.v1.IHeader|null); - - /** Arguments to the activity invocation */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** - * Details of the last heartbeat that was recorded for this activity as of the time this task - * was delivered. - */ - heartbeatDetails?: (temporal.api.common.v1.IPayloads|null); - - /** When was this task first scheduled */ - scheduledTime?: (google.protobuf.ITimestamp|null); - - /** When was this task attempt scheduled */ - currentAttemptScheduledTime?: (google.protobuf.ITimestamp|null); - - /** When was this task started (this attempt) */ - startedTime?: (google.protobuf.ITimestamp|null); - - /** Starting at 1, the number of attempts to perform this activity */ - attempt?: (number|null); - - /** - * First scheduled -> final result reported timeout - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Current attempt start -> final result reported timeout - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Window within which the activity must report a heartbeat, or be timed out. */ - heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** - * This is the retry policy the service uses which may be different from the one provided - * (or not) during activity scheduling. The service can override the provided one if some - * values are not specified or exceed configured system limits. - */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Server-advised information the SDK may use to adjust its poller count. */ - pollerScalingDecision?: (temporal.api.taskqueue.v1.IPollerScalingDecision|null); - - /** Priority metadata */ - priority?: (temporal.api.common.v1.IPriority|null); - - /** The run ID of the activity execution, only set for standalone activities. */ - activityRunId?: (string|null); - } - - /** Represents a PollActivityTaskQueueResponse. */ - class PollActivityTaskQueueResponse implements IPollActivityTaskQueueResponse { - - /** - * Constructs a new PollActivityTaskQueueResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPollActivityTaskQueueResponse); - - /** A unique identifier for this task */ - public taskToken: Uint8Array; - - /** - * The namespace of the activity. If this is a workflow activity then this is the namespace of - * the workflow also. If this is a standalone activity then the name of this field is - * misleading, but retained for compatibility with workflow activities. - */ - public workflowNamespace: string; - - /** Type of the requesting workflow (if this is a workflow activity). */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** Execution info of the requesting workflow (if this is a workflow activity) */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** PollActivityTaskQueueResponse activityType. */ - public activityType?: (temporal.api.common.v1.IActivityType|null); - - /** - * The autogenerated or user specified identifier of this activity. Can be used to complete the - * activity via `RespondActivityTaskCompletedById`. May be re-used as long as the last usage - * has resolved, but unique IDs for every activity invocation is a good idea. - * Note that only a workflow activity ID may be autogenerated. - */ - public activityId: string; - - /** - * Headers specified by the scheduling workflow. Commonly used to propagate contextual info - * from the workflow to its activities. For example, tracing contexts. - */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** Arguments to the activity invocation */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** - * Details of the last heartbeat that was recorded for this activity as of the time this task - * was delivered. - */ - public heartbeatDetails?: (temporal.api.common.v1.IPayloads|null); - - /** When was this task first scheduled */ - public scheduledTime?: (google.protobuf.ITimestamp|null); - - /** When was this task attempt scheduled */ - public currentAttemptScheduledTime?: (google.protobuf.ITimestamp|null); - - /** When was this task started (this attempt) */ - public startedTime?: (google.protobuf.ITimestamp|null); - - /** Starting at 1, the number of attempts to perform this activity */ - public attempt: number; - - /** - * First scheduled -> final result reported timeout - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Current attempt start -> final result reported timeout - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Window within which the activity must report a heartbeat, or be timed out. */ - public heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** - * This is the retry policy the service uses which may be different from the one provided - * (or not) during activity scheduling. The service can override the provided one if some - * values are not specified or exceed configured system limits. - */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Server-advised information the SDK may use to adjust its poller count. */ - public pollerScalingDecision?: (temporal.api.taskqueue.v1.IPollerScalingDecision|null); - - /** Priority metadata */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** The run ID of the activity execution, only set for standalone activities. */ - public activityRunId: string; - - /** - * Creates a new PollActivityTaskQueueResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PollActivityTaskQueueResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPollActivityTaskQueueResponse): temporal.api.workflowservice.v1.PollActivityTaskQueueResponse; - - /** - * Encodes the specified PollActivityTaskQueueResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.PollActivityTaskQueueResponse.verify|verify} messages. - * @param message PollActivityTaskQueueResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPollActivityTaskQueueResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollActivityTaskQueueResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PollActivityTaskQueueResponse.verify|verify} messages. - * @param message PollActivityTaskQueueResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPollActivityTaskQueueResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollActivityTaskQueueResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollActivityTaskQueueResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PollActivityTaskQueueResponse; - - /** - * Decodes a PollActivityTaskQueueResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollActivityTaskQueueResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PollActivityTaskQueueResponse; - - /** - * Creates a PollActivityTaskQueueResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollActivityTaskQueueResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PollActivityTaskQueueResponse; - - /** - * Creates a plain object from a PollActivityTaskQueueResponse message. Also converts values to other types if specified. - * @param message PollActivityTaskQueueResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PollActivityTaskQueueResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollActivityTaskQueueResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollActivityTaskQueueResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RecordActivityTaskHeartbeatRequest. */ - interface IRecordActivityTaskHeartbeatRequest { - - /** The task token as received in `PollActivityTaskQueueResponse` */ - taskToken?: (Uint8Array|null); - - /** Arbitrary data, of which the most recent call is kept, to store for this activity */ - details?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - identity?: (string|null); - - /** RecordActivityTaskHeartbeatRequest namespace */ - namespace?: (string|null); - } - - /** Represents a RecordActivityTaskHeartbeatRequest. */ - class RecordActivityTaskHeartbeatRequest implements IRecordActivityTaskHeartbeatRequest { - - /** - * Constructs a new RecordActivityTaskHeartbeatRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatRequest); - - /** The task token as received in `PollActivityTaskQueueResponse` */ - public taskToken: Uint8Array; - - /** Arbitrary data, of which the most recent call is kept, to store for this activity */ - public details?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - public identity: string; - - /** RecordActivityTaskHeartbeatRequest namespace. */ - public namespace: string; - - /** - * Creates a new RecordActivityTaskHeartbeatRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RecordActivityTaskHeartbeatRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatRequest): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest; - - /** - * Encodes the specified RecordActivityTaskHeartbeatRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest.verify|verify} messages. - * @param message RecordActivityTaskHeartbeatRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecordActivityTaskHeartbeatRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest.verify|verify} messages. - * @param message RecordActivityTaskHeartbeatRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecordActivityTaskHeartbeatRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecordActivityTaskHeartbeatRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest; - - /** - * Decodes a RecordActivityTaskHeartbeatRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecordActivityTaskHeartbeatRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest; - - /** - * Creates a RecordActivityTaskHeartbeatRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecordActivityTaskHeartbeatRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest; - - /** - * Creates a plain object from a RecordActivityTaskHeartbeatRequest message. Also converts values to other types if specified. - * @param message RecordActivityTaskHeartbeatRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecordActivityTaskHeartbeatRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RecordActivityTaskHeartbeatRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RecordActivityTaskHeartbeatResponse. */ - interface IRecordActivityTaskHeartbeatResponse { - - /** - * Will be set to true if the activity has been asked to cancel itself. The SDK should then - * notify the activity of cancellation if it is still running. - */ - cancelRequested?: (boolean|null); - - /** Will be set to true if the activity is paused. */ - activityPaused?: (boolean|null); - - /** - * Will be set to true if the activity was reset. - * Applies only to the current run. - */ - activityReset?: (boolean|null); - } - - /** Represents a RecordActivityTaskHeartbeatResponse. */ - class RecordActivityTaskHeartbeatResponse implements IRecordActivityTaskHeartbeatResponse { - - /** - * Constructs a new RecordActivityTaskHeartbeatResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatResponse); - - /** - * Will be set to true if the activity has been asked to cancel itself. The SDK should then - * notify the activity of cancellation if it is still running. - */ - public cancelRequested: boolean; - - /** Will be set to true if the activity is paused. */ - public activityPaused: boolean; - - /** - * Will be set to true if the activity was reset. - * Applies only to the current run. - */ - public activityReset: boolean; - - /** - * Creates a new RecordActivityTaskHeartbeatResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RecordActivityTaskHeartbeatResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatResponse): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse; - - /** - * Encodes the specified RecordActivityTaskHeartbeatResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse.verify|verify} messages. - * @param message RecordActivityTaskHeartbeatResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecordActivityTaskHeartbeatResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse.verify|verify} messages. - * @param message RecordActivityTaskHeartbeatResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecordActivityTaskHeartbeatResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecordActivityTaskHeartbeatResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse; - - /** - * Decodes a RecordActivityTaskHeartbeatResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecordActivityTaskHeartbeatResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse; - - /** - * Creates a RecordActivityTaskHeartbeatResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecordActivityTaskHeartbeatResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse; - - /** - * Creates a plain object from a RecordActivityTaskHeartbeatResponse message. Also converts values to other types if specified. - * @param message RecordActivityTaskHeartbeatResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecordActivityTaskHeartbeatResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RecordActivityTaskHeartbeatResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RecordActivityTaskHeartbeatByIdRequest. */ - interface IRecordActivityTaskHeartbeatByIdRequest { - - /** Namespace of the workflow which scheduled this activity */ - namespace?: (string|null); - - /** Id of the workflow which scheduled this activity, leave empty to target a standalone activity */ - workflowId?: (string|null); - - /** - * For a workflow activity - the run ID of the workflow which scheduled this activity. - * For a standalone activity - the run ID of the activity. - */ - runId?: (string|null); - - /** Id of the activity we're heartbeating */ - activityId?: (string|null); - - /** Arbitrary data, of which the most recent call is kept, to store for this activity */ - details?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - identity?: (string|null); - } - - /** Represents a RecordActivityTaskHeartbeatByIdRequest. */ - class RecordActivityTaskHeartbeatByIdRequest implements IRecordActivityTaskHeartbeatByIdRequest { - - /** - * Constructs a new RecordActivityTaskHeartbeatByIdRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatByIdRequest); - - /** Namespace of the workflow which scheduled this activity */ - public namespace: string; - - /** Id of the workflow which scheduled this activity, leave empty to target a standalone activity */ - public workflowId: string; - - /** - * For a workflow activity - the run ID of the workflow which scheduled this activity. - * For a standalone activity - the run ID of the activity. - */ - public runId: string; - - /** Id of the activity we're heartbeating */ - public activityId: string; - - /** Arbitrary data, of which the most recent call is kept, to store for this activity */ - public details?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - public identity: string; - - /** - * Creates a new RecordActivityTaskHeartbeatByIdRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RecordActivityTaskHeartbeatByIdRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatByIdRequest): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest; - - /** - * Encodes the specified RecordActivityTaskHeartbeatByIdRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest.verify|verify} messages. - * @param message RecordActivityTaskHeartbeatByIdRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatByIdRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecordActivityTaskHeartbeatByIdRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest.verify|verify} messages. - * @param message RecordActivityTaskHeartbeatByIdRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatByIdRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecordActivityTaskHeartbeatByIdRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecordActivityTaskHeartbeatByIdRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest; - - /** - * Decodes a RecordActivityTaskHeartbeatByIdRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecordActivityTaskHeartbeatByIdRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest; - - /** - * Creates a RecordActivityTaskHeartbeatByIdRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecordActivityTaskHeartbeatByIdRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest; - - /** - * Creates a plain object from a RecordActivityTaskHeartbeatByIdRequest message. Also converts values to other types if specified. - * @param message RecordActivityTaskHeartbeatByIdRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecordActivityTaskHeartbeatByIdRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RecordActivityTaskHeartbeatByIdRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RecordActivityTaskHeartbeatByIdResponse. */ - interface IRecordActivityTaskHeartbeatByIdResponse { - - /** - * Will be set to true if the activity has been asked to cancel itself. The SDK should then - * notify the activity of cancellation if it is still running. - */ - cancelRequested?: (boolean|null); - - /** Will be set to true if the activity is paused. */ - activityPaused?: (boolean|null); - - /** - * Will be set to true if the activity was reset. - * Applies only to the current run. - */ - activityReset?: (boolean|null); - } - - /** Represents a RecordActivityTaskHeartbeatByIdResponse. */ - class RecordActivityTaskHeartbeatByIdResponse implements IRecordActivityTaskHeartbeatByIdResponse { - - /** - * Constructs a new RecordActivityTaskHeartbeatByIdResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatByIdResponse); - - /** - * Will be set to true if the activity has been asked to cancel itself. The SDK should then - * notify the activity of cancellation if it is still running. - */ - public cancelRequested: boolean; - - /** Will be set to true if the activity is paused. */ - public activityPaused: boolean; - - /** - * Will be set to true if the activity was reset. - * Applies only to the current run. - */ - public activityReset: boolean; - - /** - * Creates a new RecordActivityTaskHeartbeatByIdResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RecordActivityTaskHeartbeatByIdResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatByIdResponse): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse; - - /** - * Encodes the specified RecordActivityTaskHeartbeatByIdResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse.verify|verify} messages. - * @param message RecordActivityTaskHeartbeatByIdResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatByIdResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecordActivityTaskHeartbeatByIdResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse.verify|verify} messages. - * @param message RecordActivityTaskHeartbeatByIdResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatByIdResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecordActivityTaskHeartbeatByIdResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecordActivityTaskHeartbeatByIdResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse; - - /** - * Decodes a RecordActivityTaskHeartbeatByIdResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecordActivityTaskHeartbeatByIdResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse; - - /** - * Creates a RecordActivityTaskHeartbeatByIdResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecordActivityTaskHeartbeatByIdResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse; - - /** - * Creates a plain object from a RecordActivityTaskHeartbeatByIdResponse message. Also converts values to other types if specified. - * @param message RecordActivityTaskHeartbeatByIdResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecordActivityTaskHeartbeatByIdResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RecordActivityTaskHeartbeatByIdResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondActivityTaskCompletedRequest. */ - interface IRespondActivityTaskCompletedRequest { - - /** The task token as received in `PollActivityTaskQueueResponse` */ - taskToken?: (Uint8Array|null); - - /** The result of successfully executing the activity */ - result?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - identity?: (string|null); - - /** RespondActivityTaskCompletedRequest namespace */ - namespace?: (string|null); - - /** - * Version info of the worker who processed this task. This message's `build_id` field should - * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` - * field to true. See message docstrings for more. - * Deprecated. Use `deployment_options` instead. - */ - workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Deployment info of the worker that completed this task. Must be present if user has set - * `WorkerDeploymentOptions` regardless of versioning being enabled or not. - * Deprecated. Replaced with `deployment_options`. - */ - deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** Worker deployment options that user has set in the worker. */ - deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - } - - /** Represents a RespondActivityTaskCompletedRequest. */ - class RespondActivityTaskCompletedRequest implements IRespondActivityTaskCompletedRequest { - - /** - * Constructs a new RespondActivityTaskCompletedRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedRequest); - - /** The task token as received in `PollActivityTaskQueueResponse` */ - public taskToken: Uint8Array; - - /** The result of successfully executing the activity */ - public result?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - public identity: string; - - /** RespondActivityTaskCompletedRequest namespace. */ - public namespace: string; - - /** - * Version info of the worker who processed this task. This message's `build_id` field should - * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` - * field to true. See message docstrings for more. - * Deprecated. Use `deployment_options` instead. - */ - public workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Deployment info of the worker that completed this task. Must be present if user has set - * `WorkerDeploymentOptions` regardless of versioning being enabled or not. - * Deprecated. Replaced with `deployment_options`. - */ - public deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** Worker deployment options that user has set in the worker. */ - public deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - - /** - * Creates a new RespondActivityTaskCompletedRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondActivityTaskCompletedRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedRequest): temporal.api.workflowservice.v1.RespondActivityTaskCompletedRequest; - - /** - * Encodes the specified RespondActivityTaskCompletedRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCompletedRequest.verify|verify} messages. - * @param message RespondActivityTaskCompletedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondActivityTaskCompletedRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCompletedRequest.verify|verify} messages. - * @param message RespondActivityTaskCompletedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondActivityTaskCompletedRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondActivityTaskCompletedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondActivityTaskCompletedRequest; - - /** - * Decodes a RespondActivityTaskCompletedRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondActivityTaskCompletedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondActivityTaskCompletedRequest; - - /** - * Creates a RespondActivityTaskCompletedRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondActivityTaskCompletedRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondActivityTaskCompletedRequest; - - /** - * Creates a plain object from a RespondActivityTaskCompletedRequest message. Also converts values to other types if specified. - * @param message RespondActivityTaskCompletedRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondActivityTaskCompletedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondActivityTaskCompletedRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondActivityTaskCompletedRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondActivityTaskCompletedResponse. */ - interface IRespondActivityTaskCompletedResponse { - } - - /** Represents a RespondActivityTaskCompletedResponse. */ - class RespondActivityTaskCompletedResponse implements IRespondActivityTaskCompletedResponse { - - /** - * Constructs a new RespondActivityTaskCompletedResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedResponse); - - /** - * Creates a new RespondActivityTaskCompletedResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondActivityTaskCompletedResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedResponse): temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse; - - /** - * Encodes the specified RespondActivityTaskCompletedResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse.verify|verify} messages. - * @param message RespondActivityTaskCompletedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondActivityTaskCompletedResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse.verify|verify} messages. - * @param message RespondActivityTaskCompletedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondActivityTaskCompletedResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondActivityTaskCompletedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse; - - /** - * Decodes a RespondActivityTaskCompletedResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondActivityTaskCompletedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse; - - /** - * Creates a RespondActivityTaskCompletedResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondActivityTaskCompletedResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse; - - /** - * Creates a plain object from a RespondActivityTaskCompletedResponse message. Also converts values to other types if specified. - * @param message RespondActivityTaskCompletedResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondActivityTaskCompletedResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondActivityTaskCompletedResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondActivityTaskCompletedByIdRequest. */ - interface IRespondActivityTaskCompletedByIdRequest { - - /** Namespace of the workflow which scheduled this activity */ - namespace?: (string|null); - - /** Id of the workflow which scheduled this activity, leave empty to target a standalone activity */ - workflowId?: (string|null); - - /** - * For a workflow activity - the run ID of the workflow which scheduled this activity. - * For a standalone activity - the run ID of the activity. - */ - runId?: (string|null); - - /** Id of the activity to complete */ - activityId?: (string|null); - - /** The serialized result of activity execution */ - result?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - identity?: (string|null); - } - - /** Represents a RespondActivityTaskCompletedByIdRequest. */ - class RespondActivityTaskCompletedByIdRequest implements IRespondActivityTaskCompletedByIdRequest { - - /** - * Constructs a new RespondActivityTaskCompletedByIdRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedByIdRequest); - - /** Namespace of the workflow which scheduled this activity */ - public namespace: string; - - /** Id of the workflow which scheduled this activity, leave empty to target a standalone activity */ - public workflowId: string; - - /** - * For a workflow activity - the run ID of the workflow which scheduled this activity. - * For a standalone activity - the run ID of the activity. - */ - public runId: string; - - /** Id of the activity to complete */ - public activityId: string; - - /** The serialized result of activity execution */ - public result?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - public identity: string; - - /** - * Creates a new RespondActivityTaskCompletedByIdRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondActivityTaskCompletedByIdRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedByIdRequest): temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest; - - /** - * Encodes the specified RespondActivityTaskCompletedByIdRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest.verify|verify} messages. - * @param message RespondActivityTaskCompletedByIdRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedByIdRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondActivityTaskCompletedByIdRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest.verify|verify} messages. - * @param message RespondActivityTaskCompletedByIdRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedByIdRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondActivityTaskCompletedByIdRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondActivityTaskCompletedByIdRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest; - - /** - * Decodes a RespondActivityTaskCompletedByIdRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondActivityTaskCompletedByIdRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest; - - /** - * Creates a RespondActivityTaskCompletedByIdRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondActivityTaskCompletedByIdRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest; - - /** - * Creates a plain object from a RespondActivityTaskCompletedByIdRequest message. Also converts values to other types if specified. - * @param message RespondActivityTaskCompletedByIdRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondActivityTaskCompletedByIdRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondActivityTaskCompletedByIdRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondActivityTaskCompletedByIdResponse. */ - interface IRespondActivityTaskCompletedByIdResponse { - } - - /** Represents a RespondActivityTaskCompletedByIdResponse. */ - class RespondActivityTaskCompletedByIdResponse implements IRespondActivityTaskCompletedByIdResponse { - - /** - * Constructs a new RespondActivityTaskCompletedByIdResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedByIdResponse); - - /** - * Creates a new RespondActivityTaskCompletedByIdResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondActivityTaskCompletedByIdResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedByIdResponse): temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse; - - /** - * Encodes the specified RespondActivityTaskCompletedByIdResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse.verify|verify} messages. - * @param message RespondActivityTaskCompletedByIdResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedByIdResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondActivityTaskCompletedByIdResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse.verify|verify} messages. - * @param message RespondActivityTaskCompletedByIdResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedByIdResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondActivityTaskCompletedByIdResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondActivityTaskCompletedByIdResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse; - - /** - * Decodes a RespondActivityTaskCompletedByIdResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondActivityTaskCompletedByIdResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse; - - /** - * Creates a RespondActivityTaskCompletedByIdResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondActivityTaskCompletedByIdResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse; - - /** - * Creates a plain object from a RespondActivityTaskCompletedByIdResponse message. Also converts values to other types if specified. - * @param message RespondActivityTaskCompletedByIdResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondActivityTaskCompletedByIdResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondActivityTaskCompletedByIdResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondActivityTaskFailedRequest. */ - interface IRespondActivityTaskFailedRequest { - - /** The task token as received in `PollActivityTaskQueueResponse` */ - taskToken?: (Uint8Array|null); - - /** Detailed failure information */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** The identity of the worker/client */ - identity?: (string|null); - - /** RespondActivityTaskFailedRequest namespace */ - namespace?: (string|null); - - /** Additional details to be stored as last activity heartbeat */ - lastHeartbeatDetails?: (temporal.api.common.v1.IPayloads|null); - - /** - * Version info of the worker who processed this task. This message's `build_id` field should - * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` - * field to true. See message docstrings for more. - * Deprecated. Use `deployment_options` instead. - */ - workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Deployment info of the worker that completed this task. Must be present if user has set - * `WorkerDeploymentOptions` regardless of versioning being enabled or not. - * Deprecated. Replaced with `deployment_options`. - */ - deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** Worker deployment options that user has set in the worker. */ - deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - } - - /** Represents a RespondActivityTaskFailedRequest. */ - class RespondActivityTaskFailedRequest implements IRespondActivityTaskFailedRequest { - - /** - * Constructs a new RespondActivityTaskFailedRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskFailedRequest); - - /** The task token as received in `PollActivityTaskQueueResponse` */ - public taskToken: Uint8Array; - - /** Detailed failure information */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** The identity of the worker/client */ - public identity: string; - - /** RespondActivityTaskFailedRequest namespace. */ - public namespace: string; - - /** Additional details to be stored as last activity heartbeat */ - public lastHeartbeatDetails?: (temporal.api.common.v1.IPayloads|null); - - /** - * Version info of the worker who processed this task. This message's `build_id` field should - * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` - * field to true. See message docstrings for more. - * Deprecated. Use `deployment_options` instead. - */ - public workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Deployment info of the worker that completed this task. Must be present if user has set - * `WorkerDeploymentOptions` regardless of versioning being enabled or not. - * Deprecated. Replaced with `deployment_options`. - */ - public deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** Worker deployment options that user has set in the worker. */ - public deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - - /** - * Creates a new RespondActivityTaskFailedRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondActivityTaskFailedRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskFailedRequest): temporal.api.workflowservice.v1.RespondActivityTaskFailedRequest; - - /** - * Encodes the specified RespondActivityTaskFailedRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskFailedRequest.verify|verify} messages. - * @param message RespondActivityTaskFailedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondActivityTaskFailedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondActivityTaskFailedRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskFailedRequest.verify|verify} messages. - * @param message RespondActivityTaskFailedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondActivityTaskFailedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondActivityTaskFailedRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondActivityTaskFailedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondActivityTaskFailedRequest; - - /** - * Decodes a RespondActivityTaskFailedRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondActivityTaskFailedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondActivityTaskFailedRequest; - - /** - * Creates a RespondActivityTaskFailedRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondActivityTaskFailedRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondActivityTaskFailedRequest; - - /** - * Creates a plain object from a RespondActivityTaskFailedRequest message. Also converts values to other types if specified. - * @param message RespondActivityTaskFailedRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondActivityTaskFailedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondActivityTaskFailedRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondActivityTaskFailedRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondActivityTaskFailedResponse. */ - interface IRespondActivityTaskFailedResponse { - - /** - * Server validation failures could include - * last_heartbeat_details payload is too large, request failure is too large - */ - failures?: (temporal.api.failure.v1.IFailure[]|null); - } - - /** Represents a RespondActivityTaskFailedResponse. */ - class RespondActivityTaskFailedResponse implements IRespondActivityTaskFailedResponse { - - /** - * Constructs a new RespondActivityTaskFailedResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskFailedResponse); - - /** - * Server validation failures could include - * last_heartbeat_details payload is too large, request failure is too large - */ - public failures: temporal.api.failure.v1.IFailure[]; - - /** - * Creates a new RespondActivityTaskFailedResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondActivityTaskFailedResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskFailedResponse): temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse; - - /** - * Encodes the specified RespondActivityTaskFailedResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse.verify|verify} messages. - * @param message RespondActivityTaskFailedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondActivityTaskFailedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondActivityTaskFailedResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse.verify|verify} messages. - * @param message RespondActivityTaskFailedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondActivityTaskFailedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondActivityTaskFailedResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondActivityTaskFailedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse; - - /** - * Decodes a RespondActivityTaskFailedResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondActivityTaskFailedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse; - - /** - * Creates a RespondActivityTaskFailedResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondActivityTaskFailedResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse; - - /** - * Creates a plain object from a RespondActivityTaskFailedResponse message. Also converts values to other types if specified. - * @param message RespondActivityTaskFailedResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondActivityTaskFailedResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondActivityTaskFailedResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondActivityTaskFailedByIdRequest. */ - interface IRespondActivityTaskFailedByIdRequest { - - /** Namespace of the workflow which scheduled this activity */ - namespace?: (string|null); - - /** Id of the workflow which scheduled this activity, leave empty to target a standalone activity */ - workflowId?: (string|null); - - /** - * For a workflow activity - the run ID of the workflow which scheduled this activity. - * For a standalone activity - the run ID of the activity. - */ - runId?: (string|null); - - /** Id of the activity to fail */ - activityId?: (string|null); - - /** Detailed failure information */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** The identity of the worker/client */ - identity?: (string|null); - - /** Additional details to be stored as last activity heartbeat */ - lastHeartbeatDetails?: (temporal.api.common.v1.IPayloads|null); - } - - /** Represents a RespondActivityTaskFailedByIdRequest. */ - class RespondActivityTaskFailedByIdRequest implements IRespondActivityTaskFailedByIdRequest { - - /** - * Constructs a new RespondActivityTaskFailedByIdRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskFailedByIdRequest); - - /** Namespace of the workflow which scheduled this activity */ - public namespace: string; - - /** Id of the workflow which scheduled this activity, leave empty to target a standalone activity */ - public workflowId: string; - - /** - * For a workflow activity - the run ID of the workflow which scheduled this activity. - * For a standalone activity - the run ID of the activity. - */ - public runId: string; - - /** Id of the activity to fail */ - public activityId: string; - - /** Detailed failure information */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** The identity of the worker/client */ - public identity: string; - - /** Additional details to be stored as last activity heartbeat */ - public lastHeartbeatDetails?: (temporal.api.common.v1.IPayloads|null); - - /** - * Creates a new RespondActivityTaskFailedByIdRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondActivityTaskFailedByIdRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskFailedByIdRequest): temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest; - - /** - * Encodes the specified RespondActivityTaskFailedByIdRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest.verify|verify} messages. - * @param message RespondActivityTaskFailedByIdRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondActivityTaskFailedByIdRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondActivityTaskFailedByIdRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest.verify|verify} messages. - * @param message RespondActivityTaskFailedByIdRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondActivityTaskFailedByIdRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondActivityTaskFailedByIdRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondActivityTaskFailedByIdRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest; - - /** - * Decodes a RespondActivityTaskFailedByIdRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondActivityTaskFailedByIdRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest; - - /** - * Creates a RespondActivityTaskFailedByIdRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondActivityTaskFailedByIdRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest; - - /** - * Creates a plain object from a RespondActivityTaskFailedByIdRequest message. Also converts values to other types if specified. - * @param message RespondActivityTaskFailedByIdRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondActivityTaskFailedByIdRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondActivityTaskFailedByIdRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondActivityTaskFailedByIdResponse. */ - interface IRespondActivityTaskFailedByIdResponse { - - /** - * Server validation failures could include - * last_heartbeat_details payload is too large, request failure is too large - */ - failures?: (temporal.api.failure.v1.IFailure[]|null); - } - - /** Represents a RespondActivityTaskFailedByIdResponse. */ - class RespondActivityTaskFailedByIdResponse implements IRespondActivityTaskFailedByIdResponse { - - /** - * Constructs a new RespondActivityTaskFailedByIdResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskFailedByIdResponse); - - /** - * Server validation failures could include - * last_heartbeat_details payload is too large, request failure is too large - */ - public failures: temporal.api.failure.v1.IFailure[]; - - /** - * Creates a new RespondActivityTaskFailedByIdResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondActivityTaskFailedByIdResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskFailedByIdResponse): temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse; - - /** - * Encodes the specified RespondActivityTaskFailedByIdResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse.verify|verify} messages. - * @param message RespondActivityTaskFailedByIdResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondActivityTaskFailedByIdResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondActivityTaskFailedByIdResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse.verify|verify} messages. - * @param message RespondActivityTaskFailedByIdResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondActivityTaskFailedByIdResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondActivityTaskFailedByIdResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondActivityTaskFailedByIdResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse; - - /** - * Decodes a RespondActivityTaskFailedByIdResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondActivityTaskFailedByIdResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse; - - /** - * Creates a RespondActivityTaskFailedByIdResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondActivityTaskFailedByIdResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse; - - /** - * Creates a plain object from a RespondActivityTaskFailedByIdResponse message. Also converts values to other types if specified. - * @param message RespondActivityTaskFailedByIdResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondActivityTaskFailedByIdResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondActivityTaskFailedByIdResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondActivityTaskCanceledRequest. */ - interface IRespondActivityTaskCanceledRequest { - - /** The task token as received in `PollActivityTaskQueueResponse` */ - taskToken?: (Uint8Array|null); - - /** Serialized additional information to attach to the cancellation */ - details?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - identity?: (string|null); - - /** RespondActivityTaskCanceledRequest namespace */ - namespace?: (string|null); - - /** - * Version info of the worker who processed this task. This message's `build_id` field should - * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` - * field to true. See message docstrings for more. - * Deprecated. Use `deployment_options` instead. - */ - workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Deployment info of the worker that completed this task. Must be present if user has set - * `WorkerDeploymentOptions` regardless of versioning being enabled or not. - * Deprecated. Replaced with `deployment_options`. - */ - deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** Worker deployment options that user has set in the worker. */ - deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - } - - /** Represents a RespondActivityTaskCanceledRequest. */ - class RespondActivityTaskCanceledRequest implements IRespondActivityTaskCanceledRequest { - - /** - * Constructs a new RespondActivityTaskCanceledRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledRequest); - - /** The task token as received in `PollActivityTaskQueueResponse` */ - public taskToken: Uint8Array; - - /** Serialized additional information to attach to the cancellation */ - public details?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - public identity: string; - - /** RespondActivityTaskCanceledRequest namespace. */ - public namespace: string; - - /** - * Version info of the worker who processed this task. This message's `build_id` field should - * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` - * field to true. See message docstrings for more. - * Deprecated. Use `deployment_options` instead. - */ - public workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Deployment info of the worker that completed this task. Must be present if user has set - * `WorkerDeploymentOptions` regardless of versioning being enabled or not. - * Deprecated. Replaced with `deployment_options`. - */ - public deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** Worker deployment options that user has set in the worker. */ - public deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - - /** - * Creates a new RespondActivityTaskCanceledRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondActivityTaskCanceledRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledRequest): temporal.api.workflowservice.v1.RespondActivityTaskCanceledRequest; - - /** - * Encodes the specified RespondActivityTaskCanceledRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCanceledRequest.verify|verify} messages. - * @param message RespondActivityTaskCanceledRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondActivityTaskCanceledRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCanceledRequest.verify|verify} messages. - * @param message RespondActivityTaskCanceledRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondActivityTaskCanceledRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondActivityTaskCanceledRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondActivityTaskCanceledRequest; - - /** - * Decodes a RespondActivityTaskCanceledRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondActivityTaskCanceledRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondActivityTaskCanceledRequest; - - /** - * Creates a RespondActivityTaskCanceledRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondActivityTaskCanceledRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondActivityTaskCanceledRequest; - - /** - * Creates a plain object from a RespondActivityTaskCanceledRequest message. Also converts values to other types if specified. - * @param message RespondActivityTaskCanceledRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondActivityTaskCanceledRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondActivityTaskCanceledRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondActivityTaskCanceledRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondActivityTaskCanceledResponse. */ - interface IRespondActivityTaskCanceledResponse { - } - - /** Represents a RespondActivityTaskCanceledResponse. */ - class RespondActivityTaskCanceledResponse implements IRespondActivityTaskCanceledResponse { - - /** - * Constructs a new RespondActivityTaskCanceledResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledResponse); - - /** - * Creates a new RespondActivityTaskCanceledResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondActivityTaskCanceledResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledResponse): temporal.api.workflowservice.v1.RespondActivityTaskCanceledResponse; - - /** - * Encodes the specified RespondActivityTaskCanceledResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCanceledResponse.verify|verify} messages. - * @param message RespondActivityTaskCanceledResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondActivityTaskCanceledResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCanceledResponse.verify|verify} messages. - * @param message RespondActivityTaskCanceledResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondActivityTaskCanceledResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondActivityTaskCanceledResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondActivityTaskCanceledResponse; - - /** - * Decodes a RespondActivityTaskCanceledResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondActivityTaskCanceledResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondActivityTaskCanceledResponse; - - /** - * Creates a RespondActivityTaskCanceledResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondActivityTaskCanceledResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondActivityTaskCanceledResponse; - - /** - * Creates a plain object from a RespondActivityTaskCanceledResponse message. Also converts values to other types if specified. - * @param message RespondActivityTaskCanceledResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondActivityTaskCanceledResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondActivityTaskCanceledResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondActivityTaskCanceledResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondActivityTaskCanceledByIdRequest. */ - interface IRespondActivityTaskCanceledByIdRequest { - - /** Namespace of the workflow which scheduled this activity */ - namespace?: (string|null); - - /** Id of the workflow which scheduled this activity, leave empty to target a standalone activity */ - workflowId?: (string|null); - - /** - * For a workflow activity - the run ID of the workflow which scheduled this activity. - * For a standalone activity - the run ID of the activity. - */ - runId?: (string|null); - - /** Id of the activity to confirm is cancelled */ - activityId?: (string|null); - - /** Serialized additional information to attach to the cancellation */ - details?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - identity?: (string|null); - - /** Worker deployment options that user has set in the worker. */ - deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - } - - /** Represents a RespondActivityTaskCanceledByIdRequest. */ - class RespondActivityTaskCanceledByIdRequest implements IRespondActivityTaskCanceledByIdRequest { - - /** - * Constructs a new RespondActivityTaskCanceledByIdRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledByIdRequest); - - /** Namespace of the workflow which scheduled this activity */ - public namespace: string; - - /** Id of the workflow which scheduled this activity, leave empty to target a standalone activity */ - public workflowId: string; - - /** - * For a workflow activity - the run ID of the workflow which scheduled this activity. - * For a standalone activity - the run ID of the activity. - */ - public runId: string; - - /** Id of the activity to confirm is cancelled */ - public activityId: string; - - /** Serialized additional information to attach to the cancellation */ - public details?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - public identity: string; - - /** Worker deployment options that user has set in the worker. */ - public deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - - /** - * Creates a new RespondActivityTaskCanceledByIdRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondActivityTaskCanceledByIdRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledByIdRequest): temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest; - - /** - * Encodes the specified RespondActivityTaskCanceledByIdRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest.verify|verify} messages. - * @param message RespondActivityTaskCanceledByIdRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledByIdRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondActivityTaskCanceledByIdRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest.verify|verify} messages. - * @param message RespondActivityTaskCanceledByIdRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledByIdRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondActivityTaskCanceledByIdRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondActivityTaskCanceledByIdRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest; - - /** - * Decodes a RespondActivityTaskCanceledByIdRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondActivityTaskCanceledByIdRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest; - - /** - * Creates a RespondActivityTaskCanceledByIdRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondActivityTaskCanceledByIdRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest; - - /** - * Creates a plain object from a RespondActivityTaskCanceledByIdRequest message. Also converts values to other types if specified. - * @param message RespondActivityTaskCanceledByIdRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondActivityTaskCanceledByIdRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondActivityTaskCanceledByIdRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondActivityTaskCanceledByIdResponse. */ - interface IRespondActivityTaskCanceledByIdResponse { - } - - /** Represents a RespondActivityTaskCanceledByIdResponse. */ - class RespondActivityTaskCanceledByIdResponse implements IRespondActivityTaskCanceledByIdResponse { - - /** - * Constructs a new RespondActivityTaskCanceledByIdResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledByIdResponse); - - /** - * Creates a new RespondActivityTaskCanceledByIdResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondActivityTaskCanceledByIdResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledByIdResponse): temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdResponse; - - /** - * Encodes the specified RespondActivityTaskCanceledByIdResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdResponse.verify|verify} messages. - * @param message RespondActivityTaskCanceledByIdResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledByIdResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondActivityTaskCanceledByIdResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdResponse.verify|verify} messages. - * @param message RespondActivityTaskCanceledByIdResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledByIdResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondActivityTaskCanceledByIdResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondActivityTaskCanceledByIdResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdResponse; - - /** - * Decodes a RespondActivityTaskCanceledByIdResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondActivityTaskCanceledByIdResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdResponse; - - /** - * Creates a RespondActivityTaskCanceledByIdResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondActivityTaskCanceledByIdResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdResponse; - - /** - * Creates a plain object from a RespondActivityTaskCanceledByIdResponse message. Also converts values to other types if specified. - * @param message RespondActivityTaskCanceledByIdResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondActivityTaskCanceledByIdResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondActivityTaskCanceledByIdResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RequestCancelWorkflowExecutionRequest. */ - interface IRequestCancelWorkflowExecutionRequest { - - /** RequestCancelWorkflowExecutionRequest namespace */ - namespace?: (string|null); - - /** RequestCancelWorkflowExecutionRequest workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The identity of the worker/client */ - identity?: (string|null); - - /** Used to de-dupe cancellation requests */ - requestId?: (string|null); - - /** - * If set, this call will error if the most recent (if no run id is set on - * `workflow_execution`), or specified (if it is) workflow execution is not part of the same - * execution chain as this id. - */ - firstExecutionRunId?: (string|null); - - /** Reason for requesting the cancellation */ - reason?: (string|null); - - /** Links to be associated with the WorkflowExecutionCanceled event. */ - links?: (temporal.api.common.v1.ILink[]|null); - } - - /** Represents a RequestCancelWorkflowExecutionRequest. */ - class RequestCancelWorkflowExecutionRequest implements IRequestCancelWorkflowExecutionRequest { - - /** - * Constructs a new RequestCancelWorkflowExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRequestCancelWorkflowExecutionRequest); - - /** RequestCancelWorkflowExecutionRequest namespace. */ - public namespace: string; - - /** RequestCancelWorkflowExecutionRequest workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The identity of the worker/client */ - public identity: string; - - /** Used to de-dupe cancellation requests */ - public requestId: string; - - /** - * If set, this call will error if the most recent (if no run id is set on - * `workflow_execution`), or specified (if it is) workflow execution is not part of the same - * execution chain as this id. - */ - public firstExecutionRunId: string; - - /** Reason for requesting the cancellation */ - public reason: string; - - /** Links to be associated with the WorkflowExecutionCanceled event. */ - public links: temporal.api.common.v1.ILink[]; - - /** - * Creates a new RequestCancelWorkflowExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestCancelWorkflowExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRequestCancelWorkflowExecutionRequest): temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest; - - /** - * Encodes the specified RequestCancelWorkflowExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest.verify|verify} messages. - * @param message RequestCancelWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRequestCancelWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCancelWorkflowExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest.verify|verify} messages. - * @param message RequestCancelWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRequestCancelWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestCancelWorkflowExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestCancelWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest; - - /** - * Decodes a RequestCancelWorkflowExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestCancelWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest; - - /** - * Creates a RequestCancelWorkflowExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCancelWorkflowExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest; - - /** - * Creates a plain object from a RequestCancelWorkflowExecutionRequest message. Also converts values to other types if specified. - * @param message RequestCancelWorkflowExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCancelWorkflowExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestCancelWorkflowExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RequestCancelWorkflowExecutionResponse. */ - interface IRequestCancelWorkflowExecutionResponse { - } - - /** Represents a RequestCancelWorkflowExecutionResponse. */ - class RequestCancelWorkflowExecutionResponse implements IRequestCancelWorkflowExecutionResponse { - - /** - * Constructs a new RequestCancelWorkflowExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRequestCancelWorkflowExecutionResponse); - - /** - * Creates a new RequestCancelWorkflowExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestCancelWorkflowExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRequestCancelWorkflowExecutionResponse): temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionResponse; - - /** - * Encodes the specified RequestCancelWorkflowExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionResponse.verify|verify} messages. - * @param message RequestCancelWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRequestCancelWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCancelWorkflowExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionResponse.verify|verify} messages. - * @param message RequestCancelWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRequestCancelWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestCancelWorkflowExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestCancelWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionResponse; - - /** - * Decodes a RequestCancelWorkflowExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestCancelWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionResponse; - - /** - * Creates a RequestCancelWorkflowExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCancelWorkflowExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionResponse; - - /** - * Creates a plain object from a RequestCancelWorkflowExecutionResponse message. Also converts values to other types if specified. - * @param message RequestCancelWorkflowExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCancelWorkflowExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestCancelWorkflowExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SignalWorkflowExecutionRequest. */ - interface ISignalWorkflowExecutionRequest { - - /** SignalWorkflowExecutionRequest namespace */ - namespace?: (string|null); - - /** SignalWorkflowExecutionRequest workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The workflow author-defined name of the signal to send to the workflow */ - signalName?: (string|null); - - /** Serialized value(s) to provide with the signal */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - identity?: (string|null); - - /** Used to de-dupe sent signals */ - requestId?: (string|null); - - /** Deprecated. */ - control?: (string|null); - - /** - * Headers that are passed with the signal to the processing workflow. - * These can include things like auth or tracing tokens. - */ - header?: (temporal.api.common.v1.IHeader|null); - - /** Links to be associated with the WorkflowExecutionSignaled event. */ - links?: (temporal.api.common.v1.ILink[]|null); - } - - /** - * Keep the parameters in sync with: - * - temporal.api.batch.v1.BatchOperationSignal. - * - temporal.api.workflow.v1.PostResetOperation.SignalWorkflow. - */ - class SignalWorkflowExecutionRequest implements ISignalWorkflowExecutionRequest { - - /** - * Constructs a new SignalWorkflowExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ISignalWorkflowExecutionRequest); - - /** SignalWorkflowExecutionRequest namespace. */ - public namespace: string; - - /** SignalWorkflowExecutionRequest workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The workflow author-defined name of the signal to send to the workflow */ - public signalName: string; - - /** Serialized value(s) to provide with the signal */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - public identity: string; - - /** Used to de-dupe sent signals */ - public requestId: string; - - /** Deprecated. */ - public control: string; - - /** - * Headers that are passed with the signal to the processing workflow. - * These can include things like auth or tracing tokens. - */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** Links to be associated with the WorkflowExecutionSignaled event. */ - public links: temporal.api.common.v1.ILink[]; - - /** - * Creates a new SignalWorkflowExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SignalWorkflowExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ISignalWorkflowExecutionRequest): temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest; - - /** - * Encodes the specified SignalWorkflowExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest.verify|verify} messages. - * @param message SignalWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ISignalWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignalWorkflowExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest.verify|verify} messages. - * @param message SignalWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ISignalWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignalWorkflowExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignalWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest; - - /** - * Decodes a SignalWorkflowExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignalWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest; - - /** - * Creates a SignalWorkflowExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignalWorkflowExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest; - - /** - * Creates a plain object from a SignalWorkflowExecutionRequest message. Also converts values to other types if specified. - * @param message SignalWorkflowExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignalWorkflowExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SignalWorkflowExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SignalWorkflowExecutionResponse. */ - interface ISignalWorkflowExecutionResponse { - } - - /** Represents a SignalWorkflowExecutionResponse. */ - class SignalWorkflowExecutionResponse implements ISignalWorkflowExecutionResponse { - - /** - * Constructs a new SignalWorkflowExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ISignalWorkflowExecutionResponse); - - /** - * Creates a new SignalWorkflowExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SignalWorkflowExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ISignalWorkflowExecutionResponse): temporal.api.workflowservice.v1.SignalWorkflowExecutionResponse; - - /** - * Encodes the specified SignalWorkflowExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.SignalWorkflowExecutionResponse.verify|verify} messages. - * @param message SignalWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ISignalWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignalWorkflowExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.SignalWorkflowExecutionResponse.verify|verify} messages. - * @param message SignalWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ISignalWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignalWorkflowExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignalWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.SignalWorkflowExecutionResponse; - - /** - * Decodes a SignalWorkflowExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignalWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.SignalWorkflowExecutionResponse; - - /** - * Creates a SignalWorkflowExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignalWorkflowExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.SignalWorkflowExecutionResponse; - - /** - * Creates a plain object from a SignalWorkflowExecutionResponse message. Also converts values to other types if specified. - * @param message SignalWorkflowExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.SignalWorkflowExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignalWorkflowExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SignalWorkflowExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SignalWithStartWorkflowExecutionRequest. */ - interface ISignalWithStartWorkflowExecutionRequest { - - /** SignalWithStartWorkflowExecutionRequest namespace */ - namespace?: (string|null); - - /** SignalWithStartWorkflowExecutionRequest workflowId */ - workflowId?: (string|null); - - /** SignalWithStartWorkflowExecutionRequest workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** The task queue to start this workflow on, if it will be started */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** Serialized arguments to the workflow. These are passed as arguments to the workflow function. */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** Total workflow execution timeout including retries and continue as new */ - workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run */ - workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task */ - workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** The identity of the worker/client */ - identity?: (string|null); - - /** Used to de-dupe signal w/ start requests */ - requestId?: (string|null); - - /** - * Defines whether to allow re-using the workflow id from a previously *closed* workflow. - * The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. - * - * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *running* workflow. - */ - workflowIdReusePolicy?: (temporal.api.enums.v1.WorkflowIdReusePolicy|null); - - /** - * Defines how to resolve a workflow id conflict with a *running* workflow. - * The default policy is WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING. - * Note that WORKFLOW_ID_CONFLICT_POLICY_FAIL is an invalid option. - * - * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. - */ - workflowIdConflictPolicy?: (temporal.api.enums.v1.WorkflowIdConflictPolicy|null); - - /** The workflow author-defined name of the signal to send to the workflow */ - signalName?: (string|null); - - /** Serialized value(s) to provide with the signal */ - signalInput?: (temporal.api.common.v1.IPayloads|null); - - /** Deprecated. */ - control?: (string|null); - - /** Retry policy for the workflow */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ */ - cronSchedule?: (string|null); - - /** SignalWithStartWorkflowExecutionRequest memo */ - memo?: (temporal.api.common.v1.IMemo|null); - - /** SignalWithStartWorkflowExecutionRequest searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** SignalWithStartWorkflowExecutionRequest header */ - header?: (temporal.api.common.v1.IHeader|null); - - /** - * Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. - * Note that the signal will be delivered with the first workflow task. If the workflow gets - * another SignalWithStartWorkflow before the delay a workflow task will be dispatched immediately - * and the rest of the delay period will be ignored, even if that request also had a delay. - * Signal via SignalWorkflowExecution will not unblock the workflow. - */ - workflowStartDelay?: (google.protobuf.IDuration|null); - - /** - * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo - * for use by user interfaces to display the fixed as-of-start summary and details of the - * workflow. - */ - userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** Links to be associated with the WorkflowExecutionStarted and WorkflowExecutionSignaled events. */ - links?: (temporal.api.common.v1.ILink[]|null); - - /** - * If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. - * To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions. - */ - versioningOverride?: (temporal.api.workflow.v1.IVersioningOverride|null); - - /** Priority metadata */ - priority?: (temporal.api.common.v1.IPriority|null); - } - - /** Represents a SignalWithStartWorkflowExecutionRequest. */ - class SignalWithStartWorkflowExecutionRequest implements ISignalWithStartWorkflowExecutionRequest { - - /** - * Constructs a new SignalWithStartWorkflowExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ISignalWithStartWorkflowExecutionRequest); - - /** SignalWithStartWorkflowExecutionRequest namespace. */ - public namespace: string; - - /** SignalWithStartWorkflowExecutionRequest workflowId. */ - public workflowId: string; - - /** SignalWithStartWorkflowExecutionRequest workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** The task queue to start this workflow on, if it will be started */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** Serialized arguments to the workflow. These are passed as arguments to the workflow function. */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** Total workflow execution timeout including retries and continue as new */ - public workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run */ - public workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task */ - public workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** The identity of the worker/client */ - public identity: string; - - /** Used to de-dupe signal w/ start requests */ - public requestId: string; - - /** - * Defines whether to allow re-using the workflow id from a previously *closed* workflow. - * The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. - * - * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *running* workflow. - */ - public workflowIdReusePolicy: temporal.api.enums.v1.WorkflowIdReusePolicy; - - /** - * Defines how to resolve a workflow id conflict with a *running* workflow. - * The default policy is WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING. - * Note that WORKFLOW_ID_CONFLICT_POLICY_FAIL is an invalid option. - * - * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. - */ - public workflowIdConflictPolicy: temporal.api.enums.v1.WorkflowIdConflictPolicy; - - /** The workflow author-defined name of the signal to send to the workflow */ - public signalName: string; - - /** Serialized value(s) to provide with the signal */ - public signalInput?: (temporal.api.common.v1.IPayloads|null); - - /** Deprecated. */ - public control: string; - - /** Retry policy for the workflow */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ */ - public cronSchedule: string; - - /** SignalWithStartWorkflowExecutionRequest memo. */ - public memo?: (temporal.api.common.v1.IMemo|null); - - /** SignalWithStartWorkflowExecutionRequest searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** SignalWithStartWorkflowExecutionRequest header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** - * Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. - * Note that the signal will be delivered with the first workflow task. If the workflow gets - * another SignalWithStartWorkflow before the delay a workflow task will be dispatched immediately - * and the rest of the delay period will be ignored, even if that request also had a delay. - * Signal via SignalWorkflowExecution will not unblock the workflow. - */ - public workflowStartDelay?: (google.protobuf.IDuration|null); - - /** - * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo - * for use by user interfaces to display the fixed as-of-start summary and details of the - * workflow. - */ - public userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** Links to be associated with the WorkflowExecutionStarted and WorkflowExecutionSignaled events. */ - public links: temporal.api.common.v1.ILink[]; - - /** - * If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. - * To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions. - */ - public versioningOverride?: (temporal.api.workflow.v1.IVersioningOverride|null); - - /** Priority metadata */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Creates a new SignalWithStartWorkflowExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SignalWithStartWorkflowExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ISignalWithStartWorkflowExecutionRequest): temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest; - - /** - * Encodes the specified SignalWithStartWorkflowExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest.verify|verify} messages. - * @param message SignalWithStartWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ISignalWithStartWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignalWithStartWorkflowExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest.verify|verify} messages. - * @param message SignalWithStartWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ISignalWithStartWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignalWithStartWorkflowExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignalWithStartWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest; - - /** - * Decodes a SignalWithStartWorkflowExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignalWithStartWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest; - - /** - * Creates a SignalWithStartWorkflowExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignalWithStartWorkflowExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest; - - /** - * Creates a plain object from a SignalWithStartWorkflowExecutionRequest message. Also converts values to other types if specified. - * @param message SignalWithStartWorkflowExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignalWithStartWorkflowExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SignalWithStartWorkflowExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SignalWithStartWorkflowExecutionResponse. */ - interface ISignalWithStartWorkflowExecutionResponse { - - /** The run id of the workflow that was started - or just signaled, if it was already running. */ - runId?: (string|null); - - /** If true, a new workflow was started. */ - started?: (boolean|null); - } - - /** Represents a SignalWithStartWorkflowExecutionResponse. */ - class SignalWithStartWorkflowExecutionResponse implements ISignalWithStartWorkflowExecutionResponse { - - /** - * Constructs a new SignalWithStartWorkflowExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ISignalWithStartWorkflowExecutionResponse); - - /** The run id of the workflow that was started - or just signaled, if it was already running. */ - public runId: string; - - /** If true, a new workflow was started. */ - public started: boolean; - - /** - * Creates a new SignalWithStartWorkflowExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SignalWithStartWorkflowExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ISignalWithStartWorkflowExecutionResponse): temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse; - - /** - * Encodes the specified SignalWithStartWorkflowExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse.verify|verify} messages. - * @param message SignalWithStartWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ISignalWithStartWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignalWithStartWorkflowExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse.verify|verify} messages. - * @param message SignalWithStartWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ISignalWithStartWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignalWithStartWorkflowExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignalWithStartWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse; - - /** - * Decodes a SignalWithStartWorkflowExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignalWithStartWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse; - - /** - * Creates a SignalWithStartWorkflowExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignalWithStartWorkflowExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse; - - /** - * Creates a plain object from a SignalWithStartWorkflowExecutionResponse message. Also converts values to other types if specified. - * @param message SignalWithStartWorkflowExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignalWithStartWorkflowExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SignalWithStartWorkflowExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResetWorkflowExecutionRequest. */ - interface IResetWorkflowExecutionRequest { - - /** ResetWorkflowExecutionRequest namespace */ - namespace?: (string|null); - - /** - * The workflow to reset. If this contains a run ID then the workflow will be reset back to the - * provided event ID in that run. Otherwise it will be reset to the provided event ID in the - * current run. In all cases the current run will be terminated and a new run started. - */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ResetWorkflowExecutionRequest reason */ - reason?: (string|null); - - /** - * The id of a `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or - * `WORKFLOW_TASK_STARTED` event to reset to. - */ - workflowTaskFinishEventId?: (Long|null); - - /** Used to de-dupe reset requests */ - requestId?: (string|null); - - /** - * Deprecated. Use `options`. - * Default: RESET_REAPPLY_TYPE_SIGNAL - */ - resetReapplyType?: (temporal.api.enums.v1.ResetReapplyType|null); - - /** Event types not to be reapplied */ - resetReapplyExcludeTypes?: (temporal.api.enums.v1.ResetReapplyExcludeType[]|null); - - /** - * Operations to perform after the workflow has been reset. These operations will be applied - * to the *new* run of the workflow execution in the order they are provided. - * All operations are applied to the workflow before the first new workflow task is generated - */ - postResetOperations?: (temporal.api.workflow.v1.IPostResetOperation[]|null); - - /** The identity of the worker/client */ - identity?: (string|null); - } - - /** Represents a ResetWorkflowExecutionRequest. */ - class ResetWorkflowExecutionRequest implements IResetWorkflowExecutionRequest { - - /** - * Constructs a new ResetWorkflowExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IResetWorkflowExecutionRequest); - - /** ResetWorkflowExecutionRequest namespace. */ - public namespace: string; - - /** - * The workflow to reset. If this contains a run ID then the workflow will be reset back to the - * provided event ID in that run. Otherwise it will be reset to the provided event ID in the - * current run. In all cases the current run will be terminated and a new run started. - */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ResetWorkflowExecutionRequest reason. */ - public reason: string; - - /** - * The id of a `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or - * `WORKFLOW_TASK_STARTED` event to reset to. - */ - public workflowTaskFinishEventId: Long; - - /** Used to de-dupe reset requests */ - public requestId: string; - - /** - * Deprecated. Use `options`. - * Default: RESET_REAPPLY_TYPE_SIGNAL - */ - public resetReapplyType: temporal.api.enums.v1.ResetReapplyType; - - /** Event types not to be reapplied */ - public resetReapplyExcludeTypes: temporal.api.enums.v1.ResetReapplyExcludeType[]; - - /** - * Operations to perform after the workflow has been reset. These operations will be applied - * to the *new* run of the workflow execution in the order they are provided. - * All operations are applied to the workflow before the first new workflow task is generated - */ - public postResetOperations: temporal.api.workflow.v1.IPostResetOperation[]; - - /** The identity of the worker/client */ - public identity: string; - - /** - * Creates a new ResetWorkflowExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetWorkflowExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IResetWorkflowExecutionRequest): temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest; - - /** - * Encodes the specified ResetWorkflowExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest.verify|verify} messages. - * @param message ResetWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IResetWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetWorkflowExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest.verify|verify} messages. - * @param message ResetWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IResetWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetWorkflowExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest; - - /** - * Decodes a ResetWorkflowExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest; - - /** - * Creates a ResetWorkflowExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetWorkflowExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest; - - /** - * Creates a plain object from a ResetWorkflowExecutionRequest message. Also converts values to other types if specified. - * @param message ResetWorkflowExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetWorkflowExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetWorkflowExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResetWorkflowExecutionResponse. */ - interface IResetWorkflowExecutionResponse { - - /** ResetWorkflowExecutionResponse runId */ - runId?: (string|null); - } - - /** Represents a ResetWorkflowExecutionResponse. */ - class ResetWorkflowExecutionResponse implements IResetWorkflowExecutionResponse { - - /** - * Constructs a new ResetWorkflowExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IResetWorkflowExecutionResponse); - - /** ResetWorkflowExecutionResponse runId. */ - public runId: string; - - /** - * Creates a new ResetWorkflowExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetWorkflowExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IResetWorkflowExecutionResponse): temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse; - - /** - * Encodes the specified ResetWorkflowExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse.verify|verify} messages. - * @param message ResetWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IResetWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetWorkflowExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse.verify|verify} messages. - * @param message ResetWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IResetWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetWorkflowExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse; - - /** - * Decodes a ResetWorkflowExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse; - - /** - * Creates a ResetWorkflowExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetWorkflowExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse; - - /** - * Creates a plain object from a ResetWorkflowExecutionResponse message. Also converts values to other types if specified. - * @param message ResetWorkflowExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetWorkflowExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetWorkflowExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TerminateWorkflowExecutionRequest. */ - interface ITerminateWorkflowExecutionRequest { - - /** TerminateWorkflowExecutionRequest namespace */ - namespace?: (string|null); - - /** TerminateWorkflowExecutionRequest workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** TerminateWorkflowExecutionRequest reason */ - reason?: (string|null); - - /** Serialized additional information to attach to the termination event */ - details?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - identity?: (string|null); - - /** - * If set, this call will error if the most recent (if no run id is set on - * `workflow_execution`), or specified (if it is) workflow execution is not part of the same - * execution chain as this id. - */ - firstExecutionRunId?: (string|null); - - /** Links to be associated with the WorkflowExecutionTerminated event. */ - links?: (temporal.api.common.v1.ILink[]|null); - } - - /** Represents a TerminateWorkflowExecutionRequest. */ - class TerminateWorkflowExecutionRequest implements ITerminateWorkflowExecutionRequest { - - /** - * Constructs a new TerminateWorkflowExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ITerminateWorkflowExecutionRequest); - - /** TerminateWorkflowExecutionRequest namespace. */ - public namespace: string; - - /** TerminateWorkflowExecutionRequest workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** TerminateWorkflowExecutionRequest reason. */ - public reason: string; - - /** Serialized additional information to attach to the termination event */ - public details?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - public identity: string; - - /** - * If set, this call will error if the most recent (if no run id is set on - * `workflow_execution`), or specified (if it is) workflow execution is not part of the same - * execution chain as this id. - */ - public firstExecutionRunId: string; - - /** Links to be associated with the WorkflowExecutionTerminated event. */ - public links: temporal.api.common.v1.ILink[]; - - /** - * Creates a new TerminateWorkflowExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TerminateWorkflowExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ITerminateWorkflowExecutionRequest): temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest; - - /** - * Encodes the specified TerminateWorkflowExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest.verify|verify} messages. - * @param message TerminateWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ITerminateWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TerminateWorkflowExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest.verify|verify} messages. - * @param message TerminateWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ITerminateWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TerminateWorkflowExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TerminateWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest; - - /** - * Decodes a TerminateWorkflowExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TerminateWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest; - - /** - * Creates a TerminateWorkflowExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TerminateWorkflowExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest; - - /** - * Creates a plain object from a TerminateWorkflowExecutionRequest message. Also converts values to other types if specified. - * @param message TerminateWorkflowExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TerminateWorkflowExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TerminateWorkflowExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TerminateWorkflowExecutionResponse. */ - interface ITerminateWorkflowExecutionResponse { - } - - /** Represents a TerminateWorkflowExecutionResponse. */ - class TerminateWorkflowExecutionResponse implements ITerminateWorkflowExecutionResponse { - - /** - * Constructs a new TerminateWorkflowExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ITerminateWorkflowExecutionResponse); - - /** - * Creates a new TerminateWorkflowExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns TerminateWorkflowExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ITerminateWorkflowExecutionResponse): temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse; - - /** - * Encodes the specified TerminateWorkflowExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse.verify|verify} messages. - * @param message TerminateWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ITerminateWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TerminateWorkflowExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse.verify|verify} messages. - * @param message TerminateWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ITerminateWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TerminateWorkflowExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TerminateWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse; - - /** - * Decodes a TerminateWorkflowExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TerminateWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse; - - /** - * Creates a TerminateWorkflowExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TerminateWorkflowExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse; - - /** - * Creates a plain object from a TerminateWorkflowExecutionResponse message. Also converts values to other types if specified. - * @param message TerminateWorkflowExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TerminateWorkflowExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TerminateWorkflowExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteWorkflowExecutionRequest. */ - interface IDeleteWorkflowExecutionRequest { - - /** DeleteWorkflowExecutionRequest namespace */ - namespace?: (string|null); - - /** Workflow Execution to delete. If run_id is not specified, the latest one is used. */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - } - - /** Represents a DeleteWorkflowExecutionRequest. */ - class DeleteWorkflowExecutionRequest implements IDeleteWorkflowExecutionRequest { - - /** - * Constructs a new DeleteWorkflowExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDeleteWorkflowExecutionRequest); - - /** DeleteWorkflowExecutionRequest namespace. */ - public namespace: string; - - /** Workflow Execution to delete. If run_id is not specified, the latest one is used. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * Creates a new DeleteWorkflowExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteWorkflowExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDeleteWorkflowExecutionRequest): temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest; - - /** - * Encodes the specified DeleteWorkflowExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest.verify|verify} messages. - * @param message DeleteWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDeleteWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteWorkflowExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest.verify|verify} messages. - * @param message DeleteWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDeleteWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteWorkflowExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest; - - /** - * Decodes a DeleteWorkflowExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest; - - /** - * Creates a DeleteWorkflowExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteWorkflowExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest; - - /** - * Creates a plain object from a DeleteWorkflowExecutionRequest message. Also converts values to other types if specified. - * @param message DeleteWorkflowExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteWorkflowExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteWorkflowExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteWorkflowExecutionResponse. */ - interface IDeleteWorkflowExecutionResponse { - } - - /** Represents a DeleteWorkflowExecutionResponse. */ - class DeleteWorkflowExecutionResponse implements IDeleteWorkflowExecutionResponse { - - /** - * Constructs a new DeleteWorkflowExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDeleteWorkflowExecutionResponse); - - /** - * Creates a new DeleteWorkflowExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteWorkflowExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDeleteWorkflowExecutionResponse): temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse; - - /** - * Encodes the specified DeleteWorkflowExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse.verify|verify} messages. - * @param message DeleteWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDeleteWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteWorkflowExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse.verify|verify} messages. - * @param message DeleteWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDeleteWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteWorkflowExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse; - - /** - * Decodes a DeleteWorkflowExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse; - - /** - * Creates a DeleteWorkflowExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteWorkflowExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse; - - /** - * Creates a plain object from a DeleteWorkflowExecutionResponse message. Also converts values to other types if specified. - * @param message DeleteWorkflowExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteWorkflowExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteWorkflowExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOpenWorkflowExecutionsRequest. */ - interface IListOpenWorkflowExecutionsRequest { - - /** ListOpenWorkflowExecutionsRequest namespace */ - namespace?: (string|null); - - /** ListOpenWorkflowExecutionsRequest maximumPageSize */ - maximumPageSize?: (number|null); - - /** ListOpenWorkflowExecutionsRequest nextPageToken */ - nextPageToken?: (Uint8Array|null); - - /** ListOpenWorkflowExecutionsRequest startTimeFilter */ - startTimeFilter?: (temporal.api.filter.v1.IStartTimeFilter|null); - - /** ListOpenWorkflowExecutionsRequest executionFilter */ - executionFilter?: (temporal.api.filter.v1.IWorkflowExecutionFilter|null); - - /** ListOpenWorkflowExecutionsRequest typeFilter */ - typeFilter?: (temporal.api.filter.v1.IWorkflowTypeFilter|null); - } - - /** Represents a ListOpenWorkflowExecutionsRequest. */ - class ListOpenWorkflowExecutionsRequest implements IListOpenWorkflowExecutionsRequest { - - /** - * Constructs a new ListOpenWorkflowExecutionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListOpenWorkflowExecutionsRequest); - - /** ListOpenWorkflowExecutionsRequest namespace. */ - public namespace: string; - - /** ListOpenWorkflowExecutionsRequest maximumPageSize. */ - public maximumPageSize: number; - - /** ListOpenWorkflowExecutionsRequest nextPageToken. */ - public nextPageToken: Uint8Array; - - /** ListOpenWorkflowExecutionsRequest startTimeFilter. */ - public startTimeFilter?: (temporal.api.filter.v1.IStartTimeFilter|null); - - /** ListOpenWorkflowExecutionsRequest executionFilter. */ - public executionFilter?: (temporal.api.filter.v1.IWorkflowExecutionFilter|null); - - /** ListOpenWorkflowExecutionsRequest typeFilter. */ - public typeFilter?: (temporal.api.filter.v1.IWorkflowTypeFilter|null); - - /** ListOpenWorkflowExecutionsRequest filters. */ - public filters?: ("executionFilter"|"typeFilter"); - - /** - * Creates a new ListOpenWorkflowExecutionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOpenWorkflowExecutionsRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListOpenWorkflowExecutionsRequest): temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest; - - /** - * Encodes the specified ListOpenWorkflowExecutionsRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest.verify|verify} messages. - * @param message ListOpenWorkflowExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListOpenWorkflowExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOpenWorkflowExecutionsRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest.verify|verify} messages. - * @param message ListOpenWorkflowExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListOpenWorkflowExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOpenWorkflowExecutionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOpenWorkflowExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest; - - /** - * Decodes a ListOpenWorkflowExecutionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOpenWorkflowExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest; - - /** - * Creates a ListOpenWorkflowExecutionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOpenWorkflowExecutionsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest; - - /** - * Creates a plain object from a ListOpenWorkflowExecutionsRequest message. Also converts values to other types if specified. - * @param message ListOpenWorkflowExecutionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOpenWorkflowExecutionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOpenWorkflowExecutionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOpenWorkflowExecutionsResponse. */ - interface IListOpenWorkflowExecutionsResponse { - - /** ListOpenWorkflowExecutionsResponse executions */ - executions?: (temporal.api.workflow.v1.IWorkflowExecutionInfo[]|null); - - /** ListOpenWorkflowExecutionsResponse nextPageToken */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListOpenWorkflowExecutionsResponse. */ - class ListOpenWorkflowExecutionsResponse implements IListOpenWorkflowExecutionsResponse { - - /** - * Constructs a new ListOpenWorkflowExecutionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListOpenWorkflowExecutionsResponse); - - /** ListOpenWorkflowExecutionsResponse executions. */ - public executions: temporal.api.workflow.v1.IWorkflowExecutionInfo[]; - - /** ListOpenWorkflowExecutionsResponse nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListOpenWorkflowExecutionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOpenWorkflowExecutionsResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListOpenWorkflowExecutionsResponse): temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse; - - /** - * Encodes the specified ListOpenWorkflowExecutionsResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse.verify|verify} messages. - * @param message ListOpenWorkflowExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListOpenWorkflowExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOpenWorkflowExecutionsResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse.verify|verify} messages. - * @param message ListOpenWorkflowExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListOpenWorkflowExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOpenWorkflowExecutionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOpenWorkflowExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse; - - /** - * Decodes a ListOpenWorkflowExecutionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOpenWorkflowExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse; - - /** - * Creates a ListOpenWorkflowExecutionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOpenWorkflowExecutionsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse; - - /** - * Creates a plain object from a ListOpenWorkflowExecutionsResponse message. Also converts values to other types if specified. - * @param message ListOpenWorkflowExecutionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOpenWorkflowExecutionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOpenWorkflowExecutionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListClosedWorkflowExecutionsRequest. */ - interface IListClosedWorkflowExecutionsRequest { - - /** ListClosedWorkflowExecutionsRequest namespace */ - namespace?: (string|null); - - /** ListClosedWorkflowExecutionsRequest maximumPageSize */ - maximumPageSize?: (number|null); - - /** ListClosedWorkflowExecutionsRequest nextPageToken */ - nextPageToken?: (Uint8Array|null); - - /** ListClosedWorkflowExecutionsRequest startTimeFilter */ - startTimeFilter?: (temporal.api.filter.v1.IStartTimeFilter|null); - - /** ListClosedWorkflowExecutionsRequest executionFilter */ - executionFilter?: (temporal.api.filter.v1.IWorkflowExecutionFilter|null); - - /** ListClosedWorkflowExecutionsRequest typeFilter */ - typeFilter?: (temporal.api.filter.v1.IWorkflowTypeFilter|null); - - /** ListClosedWorkflowExecutionsRequest statusFilter */ - statusFilter?: (temporal.api.filter.v1.IStatusFilter|null); - } - - /** Represents a ListClosedWorkflowExecutionsRequest. */ - class ListClosedWorkflowExecutionsRequest implements IListClosedWorkflowExecutionsRequest { - - /** - * Constructs a new ListClosedWorkflowExecutionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListClosedWorkflowExecutionsRequest); - - /** ListClosedWorkflowExecutionsRequest namespace. */ - public namespace: string; - - /** ListClosedWorkflowExecutionsRequest maximumPageSize. */ - public maximumPageSize: number; - - /** ListClosedWorkflowExecutionsRequest nextPageToken. */ - public nextPageToken: Uint8Array; - - /** ListClosedWorkflowExecutionsRequest startTimeFilter. */ - public startTimeFilter?: (temporal.api.filter.v1.IStartTimeFilter|null); - - /** ListClosedWorkflowExecutionsRequest executionFilter. */ - public executionFilter?: (temporal.api.filter.v1.IWorkflowExecutionFilter|null); - - /** ListClosedWorkflowExecutionsRequest typeFilter. */ - public typeFilter?: (temporal.api.filter.v1.IWorkflowTypeFilter|null); - - /** ListClosedWorkflowExecutionsRequest statusFilter. */ - public statusFilter?: (temporal.api.filter.v1.IStatusFilter|null); - - /** ListClosedWorkflowExecutionsRequest filters. */ - public filters?: ("executionFilter"|"typeFilter"|"statusFilter"); - - /** - * Creates a new ListClosedWorkflowExecutionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListClosedWorkflowExecutionsRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListClosedWorkflowExecutionsRequest): temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsRequest; - - /** - * Encodes the specified ListClosedWorkflowExecutionsRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsRequest.verify|verify} messages. - * @param message ListClosedWorkflowExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListClosedWorkflowExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListClosedWorkflowExecutionsRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsRequest.verify|verify} messages. - * @param message ListClosedWorkflowExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListClosedWorkflowExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListClosedWorkflowExecutionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListClosedWorkflowExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsRequest; - - /** - * Decodes a ListClosedWorkflowExecutionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListClosedWorkflowExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsRequest; - - /** - * Creates a ListClosedWorkflowExecutionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListClosedWorkflowExecutionsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsRequest; - - /** - * Creates a plain object from a ListClosedWorkflowExecutionsRequest message. Also converts values to other types if specified. - * @param message ListClosedWorkflowExecutionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListClosedWorkflowExecutionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListClosedWorkflowExecutionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListClosedWorkflowExecutionsResponse. */ - interface IListClosedWorkflowExecutionsResponse { - - /** ListClosedWorkflowExecutionsResponse executions */ - executions?: (temporal.api.workflow.v1.IWorkflowExecutionInfo[]|null); - - /** ListClosedWorkflowExecutionsResponse nextPageToken */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListClosedWorkflowExecutionsResponse. */ - class ListClosedWorkflowExecutionsResponse implements IListClosedWorkflowExecutionsResponse { - - /** - * Constructs a new ListClosedWorkflowExecutionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListClosedWorkflowExecutionsResponse); - - /** ListClosedWorkflowExecutionsResponse executions. */ - public executions: temporal.api.workflow.v1.IWorkflowExecutionInfo[]; - - /** ListClosedWorkflowExecutionsResponse nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListClosedWorkflowExecutionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListClosedWorkflowExecutionsResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListClosedWorkflowExecutionsResponse): temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse; - - /** - * Encodes the specified ListClosedWorkflowExecutionsResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse.verify|verify} messages. - * @param message ListClosedWorkflowExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListClosedWorkflowExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListClosedWorkflowExecutionsResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse.verify|verify} messages. - * @param message ListClosedWorkflowExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListClosedWorkflowExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListClosedWorkflowExecutionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListClosedWorkflowExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse; - - /** - * Decodes a ListClosedWorkflowExecutionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListClosedWorkflowExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse; - - /** - * Creates a ListClosedWorkflowExecutionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListClosedWorkflowExecutionsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse; - - /** - * Creates a plain object from a ListClosedWorkflowExecutionsResponse message. Also converts values to other types if specified. - * @param message ListClosedWorkflowExecutionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListClosedWorkflowExecutionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListClosedWorkflowExecutionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListWorkflowExecutionsRequest. */ - interface IListWorkflowExecutionsRequest { - - /** ListWorkflowExecutionsRequest namespace */ - namespace?: (string|null); - - /** ListWorkflowExecutionsRequest pageSize */ - pageSize?: (number|null); - - /** ListWorkflowExecutionsRequest nextPageToken */ - nextPageToken?: (Uint8Array|null); - - /** ListWorkflowExecutionsRequest query */ - query?: (string|null); - } - - /** Represents a ListWorkflowExecutionsRequest. */ - class ListWorkflowExecutionsRequest implements IListWorkflowExecutionsRequest { - - /** - * Constructs a new ListWorkflowExecutionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListWorkflowExecutionsRequest); - - /** ListWorkflowExecutionsRequest namespace. */ - public namespace: string; - - /** ListWorkflowExecutionsRequest pageSize. */ - public pageSize: number; - - /** ListWorkflowExecutionsRequest nextPageToken. */ - public nextPageToken: Uint8Array; - - /** ListWorkflowExecutionsRequest query. */ - public query: string; - - /** - * Creates a new ListWorkflowExecutionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListWorkflowExecutionsRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListWorkflowExecutionsRequest): temporal.api.workflowservice.v1.ListWorkflowExecutionsRequest; - - /** - * Encodes the specified ListWorkflowExecutionsRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkflowExecutionsRequest.verify|verify} messages. - * @param message ListWorkflowExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListWorkflowExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListWorkflowExecutionsRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkflowExecutionsRequest.verify|verify} messages. - * @param message ListWorkflowExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListWorkflowExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListWorkflowExecutionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListWorkflowExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListWorkflowExecutionsRequest; - - /** - * Decodes a ListWorkflowExecutionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListWorkflowExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListWorkflowExecutionsRequest; - - /** - * Creates a ListWorkflowExecutionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListWorkflowExecutionsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListWorkflowExecutionsRequest; - - /** - * Creates a plain object from a ListWorkflowExecutionsRequest message. Also converts values to other types if specified. - * @param message ListWorkflowExecutionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListWorkflowExecutionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListWorkflowExecutionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListWorkflowExecutionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListWorkflowExecutionsResponse. */ - interface IListWorkflowExecutionsResponse { - - /** ListWorkflowExecutionsResponse executions */ - executions?: (temporal.api.workflow.v1.IWorkflowExecutionInfo[]|null); - - /** ListWorkflowExecutionsResponse nextPageToken */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListWorkflowExecutionsResponse. */ - class ListWorkflowExecutionsResponse implements IListWorkflowExecutionsResponse { - - /** - * Constructs a new ListWorkflowExecutionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListWorkflowExecutionsResponse); - - /** ListWorkflowExecutionsResponse executions. */ - public executions: temporal.api.workflow.v1.IWorkflowExecutionInfo[]; - - /** ListWorkflowExecutionsResponse nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListWorkflowExecutionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListWorkflowExecutionsResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListWorkflowExecutionsResponse): temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse; - - /** - * Encodes the specified ListWorkflowExecutionsResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse.verify|verify} messages. - * @param message ListWorkflowExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListWorkflowExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListWorkflowExecutionsResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse.verify|verify} messages. - * @param message ListWorkflowExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListWorkflowExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListWorkflowExecutionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListWorkflowExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse; - - /** - * Decodes a ListWorkflowExecutionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListWorkflowExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse; - - /** - * Creates a ListWorkflowExecutionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListWorkflowExecutionsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse; - - /** - * Creates a plain object from a ListWorkflowExecutionsResponse message. Also converts values to other types if specified. - * @param message ListWorkflowExecutionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListWorkflowExecutionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListWorkflowExecutionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListArchivedWorkflowExecutionsRequest. */ - interface IListArchivedWorkflowExecutionsRequest { - - /** ListArchivedWorkflowExecutionsRequest namespace */ - namespace?: (string|null); - - /** ListArchivedWorkflowExecutionsRequest pageSize */ - pageSize?: (number|null); - - /** ListArchivedWorkflowExecutionsRequest nextPageToken */ - nextPageToken?: (Uint8Array|null); - - /** ListArchivedWorkflowExecutionsRequest query */ - query?: (string|null); - } - - /** Represents a ListArchivedWorkflowExecutionsRequest. */ - class ListArchivedWorkflowExecutionsRequest implements IListArchivedWorkflowExecutionsRequest { - - /** - * Constructs a new ListArchivedWorkflowExecutionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListArchivedWorkflowExecutionsRequest); - - /** ListArchivedWorkflowExecutionsRequest namespace. */ - public namespace: string; - - /** ListArchivedWorkflowExecutionsRequest pageSize. */ - public pageSize: number; - - /** ListArchivedWorkflowExecutionsRequest nextPageToken. */ - public nextPageToken: Uint8Array; - - /** ListArchivedWorkflowExecutionsRequest query. */ - public query: string; - - /** - * Creates a new ListArchivedWorkflowExecutionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListArchivedWorkflowExecutionsRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListArchivedWorkflowExecutionsRequest): temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest; - - /** - * Encodes the specified ListArchivedWorkflowExecutionsRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest.verify|verify} messages. - * @param message ListArchivedWorkflowExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListArchivedWorkflowExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListArchivedWorkflowExecutionsRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest.verify|verify} messages. - * @param message ListArchivedWorkflowExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListArchivedWorkflowExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListArchivedWorkflowExecutionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListArchivedWorkflowExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest; - - /** - * Decodes a ListArchivedWorkflowExecutionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListArchivedWorkflowExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest; - - /** - * Creates a ListArchivedWorkflowExecutionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListArchivedWorkflowExecutionsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest; - - /** - * Creates a plain object from a ListArchivedWorkflowExecutionsRequest message. Also converts values to other types if specified. - * @param message ListArchivedWorkflowExecutionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListArchivedWorkflowExecutionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListArchivedWorkflowExecutionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListArchivedWorkflowExecutionsResponse. */ - interface IListArchivedWorkflowExecutionsResponse { - - /** ListArchivedWorkflowExecutionsResponse executions */ - executions?: (temporal.api.workflow.v1.IWorkflowExecutionInfo[]|null); - - /** ListArchivedWorkflowExecutionsResponse nextPageToken */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListArchivedWorkflowExecutionsResponse. */ - class ListArchivedWorkflowExecutionsResponse implements IListArchivedWorkflowExecutionsResponse { - - /** - * Constructs a new ListArchivedWorkflowExecutionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListArchivedWorkflowExecutionsResponse); - - /** ListArchivedWorkflowExecutionsResponse executions. */ - public executions: temporal.api.workflow.v1.IWorkflowExecutionInfo[]; - - /** ListArchivedWorkflowExecutionsResponse nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListArchivedWorkflowExecutionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListArchivedWorkflowExecutionsResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListArchivedWorkflowExecutionsResponse): temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse; - - /** - * Encodes the specified ListArchivedWorkflowExecutionsResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse.verify|verify} messages. - * @param message ListArchivedWorkflowExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListArchivedWorkflowExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListArchivedWorkflowExecutionsResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse.verify|verify} messages. - * @param message ListArchivedWorkflowExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListArchivedWorkflowExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListArchivedWorkflowExecutionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListArchivedWorkflowExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse; - - /** - * Decodes a ListArchivedWorkflowExecutionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListArchivedWorkflowExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse; - - /** - * Creates a ListArchivedWorkflowExecutionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListArchivedWorkflowExecutionsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse; - - /** - * Creates a plain object from a ListArchivedWorkflowExecutionsResponse message. Also converts values to other types if specified. - * @param message ListArchivedWorkflowExecutionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListArchivedWorkflowExecutionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListArchivedWorkflowExecutionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScanWorkflowExecutionsRequest. */ - interface IScanWorkflowExecutionsRequest { - - /** ScanWorkflowExecutionsRequest namespace */ - namespace?: (string|null); - - /** ScanWorkflowExecutionsRequest pageSize */ - pageSize?: (number|null); - - /** ScanWorkflowExecutionsRequest nextPageToken */ - nextPageToken?: (Uint8Array|null); - - /** ScanWorkflowExecutionsRequest query */ - query?: (string|null); - } - - /** Deprecated: Use with `ListWorkflowExecutions`. */ - class ScanWorkflowExecutionsRequest implements IScanWorkflowExecutionsRequest { - - /** - * Constructs a new ScanWorkflowExecutionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IScanWorkflowExecutionsRequest); - - /** ScanWorkflowExecutionsRequest namespace. */ - public namespace: string; - - /** ScanWorkflowExecutionsRequest pageSize. */ - public pageSize: number; - - /** ScanWorkflowExecutionsRequest nextPageToken. */ - public nextPageToken: Uint8Array; - - /** ScanWorkflowExecutionsRequest query. */ - public query: string; - - /** - * Creates a new ScanWorkflowExecutionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ScanWorkflowExecutionsRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IScanWorkflowExecutionsRequest): temporal.api.workflowservice.v1.ScanWorkflowExecutionsRequest; - - /** - * Encodes the specified ScanWorkflowExecutionsRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ScanWorkflowExecutionsRequest.verify|verify} messages. - * @param message ScanWorkflowExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IScanWorkflowExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScanWorkflowExecutionsRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ScanWorkflowExecutionsRequest.verify|verify} messages. - * @param message ScanWorkflowExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IScanWorkflowExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScanWorkflowExecutionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScanWorkflowExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ScanWorkflowExecutionsRequest; - - /** - * Decodes a ScanWorkflowExecutionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScanWorkflowExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ScanWorkflowExecutionsRequest; - - /** - * Creates a ScanWorkflowExecutionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScanWorkflowExecutionsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ScanWorkflowExecutionsRequest; - - /** - * Creates a plain object from a ScanWorkflowExecutionsRequest message. Also converts values to other types if specified. - * @param message ScanWorkflowExecutionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ScanWorkflowExecutionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScanWorkflowExecutionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScanWorkflowExecutionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScanWorkflowExecutionsResponse. */ - interface IScanWorkflowExecutionsResponse { - - /** ScanWorkflowExecutionsResponse executions */ - executions?: (temporal.api.workflow.v1.IWorkflowExecutionInfo[]|null); - - /** ScanWorkflowExecutionsResponse nextPageToken */ - nextPageToken?: (Uint8Array|null); - } - - /** Deprecated: Use with `ListWorkflowExecutions`. */ - class ScanWorkflowExecutionsResponse implements IScanWorkflowExecutionsResponse { - - /** - * Constructs a new ScanWorkflowExecutionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IScanWorkflowExecutionsResponse); - - /** ScanWorkflowExecutionsResponse executions. */ - public executions: temporal.api.workflow.v1.IWorkflowExecutionInfo[]; - - /** ScanWorkflowExecutionsResponse nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ScanWorkflowExecutionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ScanWorkflowExecutionsResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IScanWorkflowExecutionsResponse): temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse; - - /** - * Encodes the specified ScanWorkflowExecutionsResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse.verify|verify} messages. - * @param message ScanWorkflowExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IScanWorkflowExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScanWorkflowExecutionsResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse.verify|verify} messages. - * @param message ScanWorkflowExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IScanWorkflowExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScanWorkflowExecutionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScanWorkflowExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse; - - /** - * Decodes a ScanWorkflowExecutionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScanWorkflowExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse; - - /** - * Creates a ScanWorkflowExecutionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScanWorkflowExecutionsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse; - - /** - * Creates a plain object from a ScanWorkflowExecutionsResponse message. Also converts values to other types if specified. - * @param message ScanWorkflowExecutionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScanWorkflowExecutionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScanWorkflowExecutionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CountWorkflowExecutionsRequest. */ - interface ICountWorkflowExecutionsRequest { - - /** CountWorkflowExecutionsRequest namespace */ - namespace?: (string|null); - - /** CountWorkflowExecutionsRequest query */ - query?: (string|null); - } - - /** Represents a CountWorkflowExecutionsRequest. */ - class CountWorkflowExecutionsRequest implements ICountWorkflowExecutionsRequest { - - /** - * Constructs a new CountWorkflowExecutionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ICountWorkflowExecutionsRequest); - - /** CountWorkflowExecutionsRequest namespace. */ - public namespace: string; - - /** CountWorkflowExecutionsRequest query. */ - public query: string; - - /** - * Creates a new CountWorkflowExecutionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CountWorkflowExecutionsRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ICountWorkflowExecutionsRequest): temporal.api.workflowservice.v1.CountWorkflowExecutionsRequest; - - /** - * Encodes the specified CountWorkflowExecutionsRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.CountWorkflowExecutionsRequest.verify|verify} messages. - * @param message CountWorkflowExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ICountWorkflowExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CountWorkflowExecutionsRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.CountWorkflowExecutionsRequest.verify|verify} messages. - * @param message CountWorkflowExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ICountWorkflowExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CountWorkflowExecutionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CountWorkflowExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.CountWorkflowExecutionsRequest; - - /** - * Decodes a CountWorkflowExecutionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CountWorkflowExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.CountWorkflowExecutionsRequest; - - /** - * Creates a CountWorkflowExecutionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CountWorkflowExecutionsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.CountWorkflowExecutionsRequest; - - /** - * Creates a plain object from a CountWorkflowExecutionsRequest message. Also converts values to other types if specified. - * @param message CountWorkflowExecutionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.CountWorkflowExecutionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CountWorkflowExecutionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CountWorkflowExecutionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CountWorkflowExecutionsResponse. */ - interface ICountWorkflowExecutionsResponse { - - /** - * If `query` is not grouping by any field, the count is an approximate number - * of workflows that matches the query. - * If `query` is grouping by a field, the count is simply the sum of the counts - * of the groups returned in the response. This number can be smaller than the - * total number of workflows matching the query. - */ - count?: (Long|null); - - /** - * `groups` contains the groups if the request is grouping by a field. - * The list might not be complete, and the counts of each group is approximate. - */ - groups?: (temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.IAggregationGroup[]|null); - } - - /** Represents a CountWorkflowExecutionsResponse. */ - class CountWorkflowExecutionsResponse implements ICountWorkflowExecutionsResponse { - - /** - * Constructs a new CountWorkflowExecutionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ICountWorkflowExecutionsResponse); - - /** - * If `query` is not grouping by any field, the count is an approximate number - * of workflows that matches the query. - * If `query` is grouping by a field, the count is simply the sum of the counts - * of the groups returned in the response. This number can be smaller than the - * total number of workflows matching the query. - */ - public count: Long; - - /** - * `groups` contains the groups if the request is grouping by a field. - * The list might not be complete, and the counts of each group is approximate. - */ - public groups: temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.IAggregationGroup[]; - - /** - * Creates a new CountWorkflowExecutionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CountWorkflowExecutionsResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ICountWorkflowExecutionsResponse): temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse; - - /** - * Encodes the specified CountWorkflowExecutionsResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.verify|verify} messages. - * @param message CountWorkflowExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ICountWorkflowExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CountWorkflowExecutionsResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.verify|verify} messages. - * @param message CountWorkflowExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ICountWorkflowExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CountWorkflowExecutionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CountWorkflowExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse; - - /** - * Decodes a CountWorkflowExecutionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CountWorkflowExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse; - - /** - * Creates a CountWorkflowExecutionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CountWorkflowExecutionsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse; - - /** - * Creates a plain object from a CountWorkflowExecutionsResponse message. Also converts values to other types if specified. - * @param message CountWorkflowExecutionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CountWorkflowExecutionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CountWorkflowExecutionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CountWorkflowExecutionsResponse { - - /** Properties of an AggregationGroup. */ - interface IAggregationGroup { - - /** AggregationGroup groupValues */ - groupValues?: (temporal.api.common.v1.IPayload[]|null); - - /** AggregationGroup count */ - count?: (Long|null); - } - - /** Represents an AggregationGroup. */ - class AggregationGroup implements IAggregationGroup { - - /** - * Constructs a new AggregationGroup. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.IAggregationGroup); - - /** AggregationGroup groupValues. */ - public groupValues: temporal.api.common.v1.IPayload[]; - - /** AggregationGroup count. */ - public count: Long; - - /** - * Creates a new AggregationGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns AggregationGroup instance - */ - public static create(properties?: temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.IAggregationGroup): temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup; - - /** - * Encodes the specified AggregationGroup message. Does not implicitly {@link temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup.verify|verify} messages. - * @param message AggregationGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.IAggregationGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AggregationGroup message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup.verify|verify} messages. - * @param message AggregationGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.IAggregationGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AggregationGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AggregationGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup; - - /** - * Decodes an AggregationGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AggregationGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup; - - /** - * Creates an AggregationGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AggregationGroup - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup; - - /** - * Creates a plain object from an AggregationGroup message. Also converts values to other types if specified. - * @param message AggregationGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AggregationGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AggregationGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GetSearchAttributesRequest. */ - interface IGetSearchAttributesRequest { - } - - /** Represents a GetSearchAttributesRequest. */ - class GetSearchAttributesRequest implements IGetSearchAttributesRequest { - - /** - * Constructs a new GetSearchAttributesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetSearchAttributesRequest); - - /** - * Creates a new GetSearchAttributesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSearchAttributesRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetSearchAttributesRequest): temporal.api.workflowservice.v1.GetSearchAttributesRequest; - - /** - * Encodes the specified GetSearchAttributesRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.GetSearchAttributesRequest.verify|verify} messages. - * @param message GetSearchAttributesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetSearchAttributesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSearchAttributesRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetSearchAttributesRequest.verify|verify} messages. - * @param message GetSearchAttributesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetSearchAttributesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSearchAttributesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSearchAttributesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetSearchAttributesRequest; - - /** - * Decodes a GetSearchAttributesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSearchAttributesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetSearchAttributesRequest; - - /** - * Creates a GetSearchAttributesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSearchAttributesRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetSearchAttributesRequest; - - /** - * Creates a plain object from a GetSearchAttributesRequest message. Also converts values to other types if specified. - * @param message GetSearchAttributesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetSearchAttributesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSearchAttributesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetSearchAttributesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetSearchAttributesResponse. */ - interface IGetSearchAttributesResponse { - - /** GetSearchAttributesResponse keys */ - keys?: ({ [k: string]: temporal.api.enums.v1.IndexedValueType }|null); - } - - /** Represents a GetSearchAttributesResponse. */ - class GetSearchAttributesResponse implements IGetSearchAttributesResponse { - - /** - * Constructs a new GetSearchAttributesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetSearchAttributesResponse); - - /** GetSearchAttributesResponse keys. */ - public keys: { [k: string]: temporal.api.enums.v1.IndexedValueType }; - - /** - * Creates a new GetSearchAttributesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSearchAttributesResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetSearchAttributesResponse): temporal.api.workflowservice.v1.GetSearchAttributesResponse; - - /** - * Encodes the specified GetSearchAttributesResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.GetSearchAttributesResponse.verify|verify} messages. - * @param message GetSearchAttributesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetSearchAttributesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSearchAttributesResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetSearchAttributesResponse.verify|verify} messages. - * @param message GetSearchAttributesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetSearchAttributesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSearchAttributesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSearchAttributesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetSearchAttributesResponse; - - /** - * Decodes a GetSearchAttributesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSearchAttributesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetSearchAttributesResponse; - - /** - * Creates a GetSearchAttributesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSearchAttributesResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetSearchAttributesResponse; - - /** - * Creates a plain object from a GetSearchAttributesResponse message. Also converts values to other types if specified. - * @param message GetSearchAttributesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetSearchAttributesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSearchAttributesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetSearchAttributesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondQueryTaskCompletedRequest. */ - interface IRespondQueryTaskCompletedRequest { - - /** RespondQueryTaskCompletedRequest taskToken */ - taskToken?: (Uint8Array|null); - - /** RespondQueryTaskCompletedRequest completedType */ - completedType?: (temporal.api.enums.v1.QueryResultType|null); - - /** - * The result of the query. - * Mutually exclusive with `error_message` and `failure`. Set when the query succeeds. - */ - queryResult?: (temporal.api.common.v1.IPayloads|null); - - /** - * A plain error message that must be set if completed_type is QUERY_RESULT_TYPE_FAILED. - * SDKs should also fill in the more complete `failure` field to provide the full context and - * support encryption of failure information. - * `error_message` will be duplicated if the `failure` field is present to support callers - * that pre-date the addition of that field, regardless of whether or not a custom failure - * converter is used. - * Mutually exclusive with `query_result`. Set when the query fails. - */ - errorMessage?: (string|null); - - /** RespondQueryTaskCompletedRequest namespace */ - namespace?: (string|null); - - /** - * The full reason for this query failure. This field is newer than `error_message` and can be - * encoded by the SDK's failure converter to support E2E encryption of messages and stack - * traces. - * Mutually exclusive with `query_result`. Set when the query fails. - */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Why did the task fail? It's important to note that many of the variants in this enum cannot - * apply to worker responses. See the type's doc for more. - */ - cause?: (temporal.api.enums.v1.WorkflowTaskFailedCause|null); - } - - /** Represents a RespondQueryTaskCompletedRequest. */ - class RespondQueryTaskCompletedRequest implements IRespondQueryTaskCompletedRequest { - - /** - * Constructs a new RespondQueryTaskCompletedRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondQueryTaskCompletedRequest); - - /** RespondQueryTaskCompletedRequest taskToken. */ - public taskToken: Uint8Array; - - /** RespondQueryTaskCompletedRequest completedType. */ - public completedType: temporal.api.enums.v1.QueryResultType; - - /** - * The result of the query. - * Mutually exclusive with `error_message` and `failure`. Set when the query succeeds. - */ - public queryResult?: (temporal.api.common.v1.IPayloads|null); - - /** - * A plain error message that must be set if completed_type is QUERY_RESULT_TYPE_FAILED. - * SDKs should also fill in the more complete `failure` field to provide the full context and - * support encryption of failure information. - * `error_message` will be duplicated if the `failure` field is present to support callers - * that pre-date the addition of that field, regardless of whether or not a custom failure - * converter is used. - * Mutually exclusive with `query_result`. Set when the query fails. - */ - public errorMessage: string; - - /** RespondQueryTaskCompletedRequest namespace. */ - public namespace: string; - - /** - * The full reason for this query failure. This field is newer than `error_message` and can be - * encoded by the SDK's failure converter to support E2E encryption of messages and stack - * traces. - * Mutually exclusive with `query_result`. Set when the query fails. - */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Why did the task fail? It's important to note that many of the variants in this enum cannot - * apply to worker responses. See the type's doc for more. - */ - public cause: temporal.api.enums.v1.WorkflowTaskFailedCause; - - /** - * Creates a new RespondQueryTaskCompletedRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondQueryTaskCompletedRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondQueryTaskCompletedRequest): temporal.api.workflowservice.v1.RespondQueryTaskCompletedRequest; - - /** - * Encodes the specified RespondQueryTaskCompletedRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondQueryTaskCompletedRequest.verify|verify} messages. - * @param message RespondQueryTaskCompletedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondQueryTaskCompletedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondQueryTaskCompletedRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondQueryTaskCompletedRequest.verify|verify} messages. - * @param message RespondQueryTaskCompletedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondQueryTaskCompletedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondQueryTaskCompletedRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondQueryTaskCompletedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondQueryTaskCompletedRequest; - - /** - * Decodes a RespondQueryTaskCompletedRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondQueryTaskCompletedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondQueryTaskCompletedRequest; - - /** - * Creates a RespondQueryTaskCompletedRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondQueryTaskCompletedRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondQueryTaskCompletedRequest; - - /** - * Creates a plain object from a RespondQueryTaskCompletedRequest message. Also converts values to other types if specified. - * @param message RespondQueryTaskCompletedRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondQueryTaskCompletedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondQueryTaskCompletedRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondQueryTaskCompletedRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondQueryTaskCompletedResponse. */ - interface IRespondQueryTaskCompletedResponse { - } - - /** Represents a RespondQueryTaskCompletedResponse. */ - class RespondQueryTaskCompletedResponse implements IRespondQueryTaskCompletedResponse { - - /** - * Constructs a new RespondQueryTaskCompletedResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondQueryTaskCompletedResponse); - - /** - * Creates a new RespondQueryTaskCompletedResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondQueryTaskCompletedResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondQueryTaskCompletedResponse): temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse; - - /** - * Encodes the specified RespondQueryTaskCompletedResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse.verify|verify} messages. - * @param message RespondQueryTaskCompletedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondQueryTaskCompletedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondQueryTaskCompletedResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse.verify|verify} messages. - * @param message RespondQueryTaskCompletedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondQueryTaskCompletedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondQueryTaskCompletedResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondQueryTaskCompletedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse; - - /** - * Decodes a RespondQueryTaskCompletedResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondQueryTaskCompletedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse; - - /** - * Creates a RespondQueryTaskCompletedResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondQueryTaskCompletedResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse; - - /** - * Creates a plain object from a RespondQueryTaskCompletedResponse message. Also converts values to other types if specified. - * @param message RespondQueryTaskCompletedResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondQueryTaskCompletedResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondQueryTaskCompletedResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResetStickyTaskQueueRequest. */ - interface IResetStickyTaskQueueRequest { - - /** ResetStickyTaskQueueRequest namespace */ - namespace?: (string|null); - - /** ResetStickyTaskQueueRequest execution */ - execution?: (temporal.api.common.v1.IWorkflowExecution|null); - } - - /** Represents a ResetStickyTaskQueueRequest. */ - class ResetStickyTaskQueueRequest implements IResetStickyTaskQueueRequest { - - /** - * Constructs a new ResetStickyTaskQueueRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IResetStickyTaskQueueRequest); - - /** ResetStickyTaskQueueRequest namespace. */ - public namespace: string; - - /** ResetStickyTaskQueueRequest execution. */ - public execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * Creates a new ResetStickyTaskQueueRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetStickyTaskQueueRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IResetStickyTaskQueueRequest): temporal.api.workflowservice.v1.ResetStickyTaskQueueRequest; - - /** - * Encodes the specified ResetStickyTaskQueueRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ResetStickyTaskQueueRequest.verify|verify} messages. - * @param message ResetStickyTaskQueueRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IResetStickyTaskQueueRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetStickyTaskQueueRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ResetStickyTaskQueueRequest.verify|verify} messages. - * @param message ResetStickyTaskQueueRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IResetStickyTaskQueueRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetStickyTaskQueueRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetStickyTaskQueueRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ResetStickyTaskQueueRequest; - - /** - * Decodes a ResetStickyTaskQueueRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetStickyTaskQueueRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ResetStickyTaskQueueRequest; - - /** - * Creates a ResetStickyTaskQueueRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetStickyTaskQueueRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ResetStickyTaskQueueRequest; - - /** - * Creates a plain object from a ResetStickyTaskQueueRequest message. Also converts values to other types if specified. - * @param message ResetStickyTaskQueueRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ResetStickyTaskQueueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetStickyTaskQueueRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetStickyTaskQueueRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResetStickyTaskQueueResponse. */ - interface IResetStickyTaskQueueResponse { - } - - /** Represents a ResetStickyTaskQueueResponse. */ - class ResetStickyTaskQueueResponse implements IResetStickyTaskQueueResponse { - - /** - * Constructs a new ResetStickyTaskQueueResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IResetStickyTaskQueueResponse); - - /** - * Creates a new ResetStickyTaskQueueResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetStickyTaskQueueResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IResetStickyTaskQueueResponse): temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse; - - /** - * Encodes the specified ResetStickyTaskQueueResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse.verify|verify} messages. - * @param message ResetStickyTaskQueueResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IResetStickyTaskQueueResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetStickyTaskQueueResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse.verify|verify} messages. - * @param message ResetStickyTaskQueueResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IResetStickyTaskQueueResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetStickyTaskQueueResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetStickyTaskQueueResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse; - - /** - * Decodes a ResetStickyTaskQueueResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetStickyTaskQueueResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse; - - /** - * Creates a ResetStickyTaskQueueResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetStickyTaskQueueResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse; - - /** - * Creates a plain object from a ResetStickyTaskQueueResponse message. Also converts values to other types if specified. - * @param message ResetStickyTaskQueueResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetStickyTaskQueueResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetStickyTaskQueueResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShutdownWorkerRequest. */ - interface IShutdownWorkerRequest { - - /** ShutdownWorkerRequest namespace */ - namespace?: (string|null); - - /** - * sticky_task_queue may not always be populated. We want to ensure all workers - * send a shutdown request to update worker state for heartbeating, as well - * as cancel pending poll calls early, instead of waiting for timeouts. - */ - stickyTaskQueue?: (string|null); - - /** ShutdownWorkerRequest identity */ - identity?: (string|null); - - /** ShutdownWorkerRequest reason */ - reason?: (string|null); - - /** ShutdownWorkerRequest workerHeartbeat */ - workerHeartbeat?: (temporal.api.worker.v1.IWorkerHeartbeat|null); - - /** - * Technically this is also sent in the WorkerHeartbeat, but - * since worker heartbeating can be turned off, this needs - * to be a separate, top-level field. - */ - workerInstanceKey?: (string|null); - - /** - * Task queue name the worker is polling on. This allows server to cancel - * all outstanding poll RPC calls from SDK. This avoids a race condition that - * can lead to tasks being lost. - */ - taskQueue?: (string|null); - - /** - * Task queue types that help server cancel outstanding poll RPC - * calls from SDK. This avoids a race condition that can lead to tasks being lost. - */ - taskQueueTypes?: (temporal.api.enums.v1.TaskQueueType[]|null); - } - - /** Represents a ShutdownWorkerRequest. */ - class ShutdownWorkerRequest implements IShutdownWorkerRequest { - - /** - * Constructs a new ShutdownWorkerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IShutdownWorkerRequest); - - /** ShutdownWorkerRequest namespace. */ - public namespace: string; - - /** - * sticky_task_queue may not always be populated. We want to ensure all workers - * send a shutdown request to update worker state for heartbeating, as well - * as cancel pending poll calls early, instead of waiting for timeouts. - */ - public stickyTaskQueue: string; - - /** ShutdownWorkerRequest identity. */ - public identity: string; - - /** ShutdownWorkerRequest reason. */ - public reason: string; - - /** ShutdownWorkerRequest workerHeartbeat. */ - public workerHeartbeat?: (temporal.api.worker.v1.IWorkerHeartbeat|null); - - /** - * Technically this is also sent in the WorkerHeartbeat, but - * since worker heartbeating can be turned off, this needs - * to be a separate, top-level field. - */ - public workerInstanceKey: string; - - /** - * Task queue name the worker is polling on. This allows server to cancel - * all outstanding poll RPC calls from SDK. This avoids a race condition that - * can lead to tasks being lost. - */ - public taskQueue: string; - - /** - * Task queue types that help server cancel outstanding poll RPC - * calls from SDK. This avoids a race condition that can lead to tasks being lost. - */ - public taskQueueTypes: temporal.api.enums.v1.TaskQueueType[]; - - /** - * Creates a new ShutdownWorkerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ShutdownWorkerRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IShutdownWorkerRequest): temporal.api.workflowservice.v1.ShutdownWorkerRequest; - - /** - * Encodes the specified ShutdownWorkerRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ShutdownWorkerRequest.verify|verify} messages. - * @param message ShutdownWorkerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IShutdownWorkerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShutdownWorkerRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ShutdownWorkerRequest.verify|verify} messages. - * @param message ShutdownWorkerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IShutdownWorkerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShutdownWorkerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShutdownWorkerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ShutdownWorkerRequest; - - /** - * Decodes a ShutdownWorkerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShutdownWorkerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ShutdownWorkerRequest; - - /** - * Creates a ShutdownWorkerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShutdownWorkerRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ShutdownWorkerRequest; - - /** - * Creates a plain object from a ShutdownWorkerRequest message. Also converts values to other types if specified. - * @param message ShutdownWorkerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ShutdownWorkerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShutdownWorkerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShutdownWorkerRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShutdownWorkerResponse. */ - interface IShutdownWorkerResponse { - } - - /** Represents a ShutdownWorkerResponse. */ - class ShutdownWorkerResponse implements IShutdownWorkerResponse { - - /** - * Constructs a new ShutdownWorkerResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IShutdownWorkerResponse); - - /** - * Creates a new ShutdownWorkerResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ShutdownWorkerResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IShutdownWorkerResponse): temporal.api.workflowservice.v1.ShutdownWorkerResponse; - - /** - * Encodes the specified ShutdownWorkerResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ShutdownWorkerResponse.verify|verify} messages. - * @param message ShutdownWorkerResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IShutdownWorkerResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShutdownWorkerResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ShutdownWorkerResponse.verify|verify} messages. - * @param message ShutdownWorkerResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IShutdownWorkerResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShutdownWorkerResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShutdownWorkerResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ShutdownWorkerResponse; - - /** - * Decodes a ShutdownWorkerResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShutdownWorkerResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ShutdownWorkerResponse; - - /** - * Creates a ShutdownWorkerResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShutdownWorkerResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ShutdownWorkerResponse; - - /** - * Creates a plain object from a ShutdownWorkerResponse message. Also converts values to other types if specified. - * @param message ShutdownWorkerResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ShutdownWorkerResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShutdownWorkerResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShutdownWorkerResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QueryWorkflowRequest. */ - interface IQueryWorkflowRequest { - - /** QueryWorkflowRequest namespace */ - namespace?: (string|null); - - /** QueryWorkflowRequest execution */ - execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** QueryWorkflowRequest query */ - query?: (temporal.api.query.v1.IWorkflowQuery|null); - - /** - * QueryRejectCondition can used to reject the query if workflow state does not satisfy condition. - * Default: QUERY_REJECT_CONDITION_NONE. - */ - queryRejectCondition?: (temporal.api.enums.v1.QueryRejectCondition|null); - } - - /** Represents a QueryWorkflowRequest. */ - class QueryWorkflowRequest implements IQueryWorkflowRequest { - - /** - * Constructs a new QueryWorkflowRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IQueryWorkflowRequest); - - /** QueryWorkflowRequest namespace. */ - public namespace: string; - - /** QueryWorkflowRequest execution. */ - public execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** QueryWorkflowRequest query. */ - public query?: (temporal.api.query.v1.IWorkflowQuery|null); - - /** - * QueryRejectCondition can used to reject the query if workflow state does not satisfy condition. - * Default: QUERY_REJECT_CONDITION_NONE. - */ - public queryRejectCondition: temporal.api.enums.v1.QueryRejectCondition; - - /** - * Creates a new QueryWorkflowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryWorkflowRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IQueryWorkflowRequest): temporal.api.workflowservice.v1.QueryWorkflowRequest; - - /** - * Encodes the specified QueryWorkflowRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.QueryWorkflowRequest.verify|verify} messages. - * @param message QueryWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IQueryWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryWorkflowRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.QueryWorkflowRequest.verify|verify} messages. - * @param message QueryWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IQueryWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryWorkflowRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.QueryWorkflowRequest; - - /** - * Decodes a QueryWorkflowRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.QueryWorkflowRequest; - - /** - * Creates a QueryWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryWorkflowRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.QueryWorkflowRequest; - - /** - * Creates a plain object from a QueryWorkflowRequest message. Also converts values to other types if specified. - * @param message QueryWorkflowRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.QueryWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryWorkflowRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryWorkflowRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QueryWorkflowResponse. */ - interface IQueryWorkflowResponse { - - /** QueryWorkflowResponse queryResult */ - queryResult?: (temporal.api.common.v1.IPayloads|null); - - /** QueryWorkflowResponse queryRejected */ - queryRejected?: (temporal.api.query.v1.IQueryRejected|null); - } - - /** Represents a QueryWorkflowResponse. */ - class QueryWorkflowResponse implements IQueryWorkflowResponse { - - /** - * Constructs a new QueryWorkflowResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IQueryWorkflowResponse); - - /** QueryWorkflowResponse queryResult. */ - public queryResult?: (temporal.api.common.v1.IPayloads|null); - - /** QueryWorkflowResponse queryRejected. */ - public queryRejected?: (temporal.api.query.v1.IQueryRejected|null); - - /** - * Creates a new QueryWorkflowResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryWorkflowResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IQueryWorkflowResponse): temporal.api.workflowservice.v1.QueryWorkflowResponse; - - /** - * Encodes the specified QueryWorkflowResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.QueryWorkflowResponse.verify|verify} messages. - * @param message QueryWorkflowResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IQueryWorkflowResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryWorkflowResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.QueryWorkflowResponse.verify|verify} messages. - * @param message QueryWorkflowResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IQueryWorkflowResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryWorkflowResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryWorkflowResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.QueryWorkflowResponse; - - /** - * Decodes a QueryWorkflowResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryWorkflowResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.QueryWorkflowResponse; - - /** - * Creates a QueryWorkflowResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryWorkflowResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.QueryWorkflowResponse; - - /** - * Creates a plain object from a QueryWorkflowResponse message. Also converts values to other types if specified. - * @param message QueryWorkflowResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.QueryWorkflowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryWorkflowResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryWorkflowResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeWorkflowExecutionRequest. */ - interface IDescribeWorkflowExecutionRequest { - - /** DescribeWorkflowExecutionRequest namespace */ - namespace?: (string|null); - - /** DescribeWorkflowExecutionRequest execution */ - execution?: (temporal.api.common.v1.IWorkflowExecution|null); - } - - /** Represents a DescribeWorkflowExecutionRequest. */ - class DescribeWorkflowExecutionRequest implements IDescribeWorkflowExecutionRequest { - - /** - * Constructs a new DescribeWorkflowExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeWorkflowExecutionRequest); - - /** DescribeWorkflowExecutionRequest namespace. */ - public namespace: string; - - /** DescribeWorkflowExecutionRequest execution. */ - public execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * Creates a new DescribeWorkflowExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeWorkflowExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeWorkflowExecutionRequest): temporal.api.workflowservice.v1.DescribeWorkflowExecutionRequest; - - /** - * Encodes the specified DescribeWorkflowExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkflowExecutionRequest.verify|verify} messages. - * @param message DescribeWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeWorkflowExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkflowExecutionRequest.verify|verify} messages. - * @param message DescribeWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeWorkflowExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeWorkflowExecutionRequest; - - /** - * Decodes a DescribeWorkflowExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeWorkflowExecutionRequest; - - /** - * Creates a DescribeWorkflowExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeWorkflowExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeWorkflowExecutionRequest; - - /** - * Creates a plain object from a DescribeWorkflowExecutionRequest message. Also converts values to other types if specified. - * @param message DescribeWorkflowExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeWorkflowExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeWorkflowExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeWorkflowExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeWorkflowExecutionResponse. */ - interface IDescribeWorkflowExecutionResponse { - - /** DescribeWorkflowExecutionResponse executionConfig */ - executionConfig?: (temporal.api.workflow.v1.IWorkflowExecutionConfig|null); - - /** DescribeWorkflowExecutionResponse workflowExecutionInfo */ - workflowExecutionInfo?: (temporal.api.workflow.v1.IWorkflowExecutionInfo|null); - - /** DescribeWorkflowExecutionResponse pendingActivities */ - pendingActivities?: (temporal.api.workflow.v1.IPendingActivityInfo[]|null); - - /** DescribeWorkflowExecutionResponse pendingChildren */ - pendingChildren?: (temporal.api.workflow.v1.IPendingChildExecutionInfo[]|null); - - /** DescribeWorkflowExecutionResponse pendingWorkflowTask */ - pendingWorkflowTask?: (temporal.api.workflow.v1.IPendingWorkflowTaskInfo|null); - - /** DescribeWorkflowExecutionResponse callbacks */ - callbacks?: (temporal.api.workflow.v1.ICallbackInfo[]|null); - - /** DescribeWorkflowExecutionResponse pendingNexusOperations */ - pendingNexusOperations?: (temporal.api.workflow.v1.IPendingNexusOperationInfo[]|null); - - /** DescribeWorkflowExecutionResponse workflowExtendedInfo */ - workflowExtendedInfo?: (temporal.api.workflow.v1.IWorkflowExecutionExtendedInfo|null); - } - - /** Represents a DescribeWorkflowExecutionResponse. */ - class DescribeWorkflowExecutionResponse implements IDescribeWorkflowExecutionResponse { - - /** - * Constructs a new DescribeWorkflowExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeWorkflowExecutionResponse); - - /** DescribeWorkflowExecutionResponse executionConfig. */ - public executionConfig?: (temporal.api.workflow.v1.IWorkflowExecutionConfig|null); - - /** DescribeWorkflowExecutionResponse workflowExecutionInfo. */ - public workflowExecutionInfo?: (temporal.api.workflow.v1.IWorkflowExecutionInfo|null); - - /** DescribeWorkflowExecutionResponse pendingActivities. */ - public pendingActivities: temporal.api.workflow.v1.IPendingActivityInfo[]; - - /** DescribeWorkflowExecutionResponse pendingChildren. */ - public pendingChildren: temporal.api.workflow.v1.IPendingChildExecutionInfo[]; - - /** DescribeWorkflowExecutionResponse pendingWorkflowTask. */ - public pendingWorkflowTask?: (temporal.api.workflow.v1.IPendingWorkflowTaskInfo|null); - - /** DescribeWorkflowExecutionResponse callbacks. */ - public callbacks: temporal.api.workflow.v1.ICallbackInfo[]; - - /** DescribeWorkflowExecutionResponse pendingNexusOperations. */ - public pendingNexusOperations: temporal.api.workflow.v1.IPendingNexusOperationInfo[]; - - /** DescribeWorkflowExecutionResponse workflowExtendedInfo. */ - public workflowExtendedInfo?: (temporal.api.workflow.v1.IWorkflowExecutionExtendedInfo|null); - - /** - * Creates a new DescribeWorkflowExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeWorkflowExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeWorkflowExecutionResponse): temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse; - - /** - * Encodes the specified DescribeWorkflowExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse.verify|verify} messages. - * @param message DescribeWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeWorkflowExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse.verify|verify} messages. - * @param message DescribeWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeWorkflowExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse; - - /** - * Decodes a DescribeWorkflowExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse; - - /** - * Creates a DescribeWorkflowExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeWorkflowExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse; - - /** - * Creates a plain object from a DescribeWorkflowExecutionResponse message. Also converts values to other types if specified. - * @param message DescribeWorkflowExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeWorkflowExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeWorkflowExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeTaskQueueRequest. */ - interface IDescribeTaskQueueRequest { - - /** DescribeTaskQueueRequest namespace */ - namespace?: (string|null); - - /** Sticky queues are not supported in deprecated ENHANCED mode. */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** - * If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used. - * Only supported in default mode (use `task_queue_types` in ENHANCED mode instead). - */ - taskQueueType?: (temporal.api.enums.v1.TaskQueueType|null); - - /** Report stats for the requested task queue type(s). */ - reportStats?: (boolean|null); - - /** Report Task Queue Config */ - reportConfig?: (boolean|null); - - /** - * Deprecated, use `report_stats` instead. - * If true, the task queue status will be included in the response. - */ - includeTaskQueueStatus?: (boolean|null); - - /** - * Deprecated. ENHANCED mode is also being deprecated. - * Select the API mode to use for this request: DEFAULT mode (if unset) or ENHANCED mode. - * Consult the documentation for each field to understand which mode it is supported in. - */ - apiMode?: (temporal.api.enums.v1.DescribeTaskQueueMode|null); - - /** - * Deprecated (as part of the ENHANCED mode deprecation). - * Optional. If not provided, the result for the default Build ID will be returned. The default Build ID is the one - * mentioned in the first unconditional Assignment Rule. If there is no default Build ID, the result for the - * unversioned queue will be returned. - * (-- api-linter: core::0140::prepositions --) - */ - versions?: (temporal.api.taskqueue.v1.ITaskQueueVersionSelection|null); - - /** - * Deprecated (as part of the ENHANCED mode deprecation). - * Task queue types to report info about. If not specified, all types are considered. - */ - taskQueueTypes?: (temporal.api.enums.v1.TaskQueueType[]|null); - - /** - * Deprecated (as part of the ENHANCED mode deprecation). - * Report list of pollers for requested task queue types and versions. - */ - reportPollers?: (boolean|null); - - /** - * Deprecated (as part of the ENHANCED mode deprecation). - * Report task reachability for the requested versions and all task types (task reachability is not reported - * per task type). - */ - reportTaskReachability?: (boolean|null); - } - - /** - * (-- api-linter: core::0203::optional=disabled - * aip.dev/not-precedent: field_behavior annotation not available in our gogo fork --) - */ - class DescribeTaskQueueRequest implements IDescribeTaskQueueRequest { - - /** - * Constructs a new DescribeTaskQueueRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeTaskQueueRequest); - - /** DescribeTaskQueueRequest namespace. */ - public namespace: string; - - /** Sticky queues are not supported in deprecated ENHANCED mode. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** - * If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used. - * Only supported in default mode (use `task_queue_types` in ENHANCED mode instead). - */ - public taskQueueType: temporal.api.enums.v1.TaskQueueType; - - /** Report stats for the requested task queue type(s). */ - public reportStats: boolean; - - /** Report Task Queue Config */ - public reportConfig: boolean; - - /** - * Deprecated, use `report_stats` instead. - * If true, the task queue status will be included in the response. - */ - public includeTaskQueueStatus: boolean; - - /** - * Deprecated. ENHANCED mode is also being deprecated. - * Select the API mode to use for this request: DEFAULT mode (if unset) or ENHANCED mode. - * Consult the documentation for each field to understand which mode it is supported in. - */ - public apiMode: temporal.api.enums.v1.DescribeTaskQueueMode; - - /** - * Deprecated (as part of the ENHANCED mode deprecation). - * Optional. If not provided, the result for the default Build ID will be returned. The default Build ID is the one - * mentioned in the first unconditional Assignment Rule. If there is no default Build ID, the result for the - * unversioned queue will be returned. - * (-- api-linter: core::0140::prepositions --) - */ - public versions?: (temporal.api.taskqueue.v1.ITaskQueueVersionSelection|null); - - /** - * Deprecated (as part of the ENHANCED mode deprecation). - * Task queue types to report info about. If not specified, all types are considered. - */ - public taskQueueTypes: temporal.api.enums.v1.TaskQueueType[]; - - /** - * Deprecated (as part of the ENHANCED mode deprecation). - * Report list of pollers for requested task queue types and versions. - */ - public reportPollers: boolean; - - /** - * Deprecated (as part of the ENHANCED mode deprecation). - * Report task reachability for the requested versions and all task types (task reachability is not reported - * per task type). - */ - public reportTaskReachability: boolean; - - /** - * Creates a new DescribeTaskQueueRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeTaskQueueRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeTaskQueueRequest): temporal.api.workflowservice.v1.DescribeTaskQueueRequest; - - /** - * Encodes the specified DescribeTaskQueueRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeTaskQueueRequest.verify|verify} messages. - * @param message DescribeTaskQueueRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeTaskQueueRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeTaskQueueRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeTaskQueueRequest.verify|verify} messages. - * @param message DescribeTaskQueueRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeTaskQueueRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeTaskQueueRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeTaskQueueRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeTaskQueueRequest; - - /** - * Decodes a DescribeTaskQueueRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeTaskQueueRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeTaskQueueRequest; - - /** - * Creates a DescribeTaskQueueRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeTaskQueueRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeTaskQueueRequest; - - /** - * Creates a plain object from a DescribeTaskQueueRequest message. Also converts values to other types if specified. - * @param message DescribeTaskQueueRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeTaskQueueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeTaskQueueRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeTaskQueueRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeTaskQueueResponse. */ - interface IDescribeTaskQueueResponse { - - /** DescribeTaskQueueResponse pollers */ - pollers?: (temporal.api.taskqueue.v1.IPollerInfo[]|null); - - /** - * Statistics for the task queue. - * Only set if `report_stats` is set on the request. - */ - stats?: (temporal.api.taskqueue.v1.ITaskQueueStats|null); - - /** - * Task queue stats breakdown by priority key. Only contains actively used priority keys. - * Only set if `report_stats` is set on the request. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "by" is used to clarify the keys and values. --) - */ - statsByPriorityKey?: ({ [k: string]: temporal.api.taskqueue.v1.ITaskQueueStats }|null); - - /** - * Specifies which Worker Deployment Version(s) Server routes this Task Queue's tasks to. - * When not present, it means the tasks are routed to Unversioned workers (workers with - * UNVERSIONED or unspecified WorkerVersioningMode.) - * Task Queue Versioning info is updated indirectly by calling SetWorkerDeploymentCurrentVersion - * and SetWorkerDeploymentRampingVersion on Worker Deployments. - * Note: This information is not relevant to Pinned workflow executions and their activities as - * they are always routed to their Pinned Deployment Version. However, new workflow executions - * are typically not Pinned until they complete their first task (unless they are started with - * a Pinned VersioningOverride or are Child Workflows of a Pinned parent). - */ - versioningInfo?: (temporal.api.taskqueue.v1.ITaskQueueVersioningInfo|null); - - /** Only populated if report_task_queue_config is set to true. */ - config?: (temporal.api.taskqueue.v1.ITaskQueueConfig|null); - - /** DescribeTaskQueueResponse effectiveRateLimit */ - effectiveRateLimit?: (temporal.api.workflowservice.v1.DescribeTaskQueueResponse.IEffectiveRateLimit|null); - - /** - * Deprecated. - * Status of the task queue. Only populated when `include_task_queue_status` is set to true in the request. - */ - taskQueueStatus?: (temporal.api.taskqueue.v1.ITaskQueueStatus|null); - - /** - * Deprecated. - * Only returned in ENHANCED mode. - * This map contains Task Queue information for each Build ID. Empty string as key value means unversioned. - */ - versionsInfo?: ({ [k: string]: temporal.api.taskqueue.v1.ITaskQueueVersionInfo }|null); - } - - /** Represents a DescribeTaskQueueResponse. */ - class DescribeTaskQueueResponse implements IDescribeTaskQueueResponse { - - /** - * Constructs a new DescribeTaskQueueResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeTaskQueueResponse); - - /** DescribeTaskQueueResponse pollers. */ - public pollers: temporal.api.taskqueue.v1.IPollerInfo[]; - - /** - * Statistics for the task queue. - * Only set if `report_stats` is set on the request. - */ - public stats?: (temporal.api.taskqueue.v1.ITaskQueueStats|null); - - /** - * Task queue stats breakdown by priority key. Only contains actively used priority keys. - * Only set if `report_stats` is set on the request. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "by" is used to clarify the keys and values. --) - */ - public statsByPriorityKey: { [k: string]: temporal.api.taskqueue.v1.ITaskQueueStats }; - - /** - * Specifies which Worker Deployment Version(s) Server routes this Task Queue's tasks to. - * When not present, it means the tasks are routed to Unversioned workers (workers with - * UNVERSIONED or unspecified WorkerVersioningMode.) - * Task Queue Versioning info is updated indirectly by calling SetWorkerDeploymentCurrentVersion - * and SetWorkerDeploymentRampingVersion on Worker Deployments. - * Note: This information is not relevant to Pinned workflow executions and their activities as - * they are always routed to their Pinned Deployment Version. However, new workflow executions - * are typically not Pinned until they complete their first task (unless they are started with - * a Pinned VersioningOverride or are Child Workflows of a Pinned parent). - */ - public versioningInfo?: (temporal.api.taskqueue.v1.ITaskQueueVersioningInfo|null); - - /** Only populated if report_task_queue_config is set to true. */ - public config?: (temporal.api.taskqueue.v1.ITaskQueueConfig|null); - - /** DescribeTaskQueueResponse effectiveRateLimit. */ - public effectiveRateLimit?: (temporal.api.workflowservice.v1.DescribeTaskQueueResponse.IEffectiveRateLimit|null); - - /** - * Deprecated. - * Status of the task queue. Only populated when `include_task_queue_status` is set to true in the request. - */ - public taskQueueStatus?: (temporal.api.taskqueue.v1.ITaskQueueStatus|null); - - /** - * Deprecated. - * Only returned in ENHANCED mode. - * This map contains Task Queue information for each Build ID. Empty string as key value means unversioned. - */ - public versionsInfo: { [k: string]: temporal.api.taskqueue.v1.ITaskQueueVersionInfo }; - - /** - * Creates a new DescribeTaskQueueResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeTaskQueueResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeTaskQueueResponse): temporal.api.workflowservice.v1.DescribeTaskQueueResponse; - - /** - * Encodes the specified DescribeTaskQueueResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeTaskQueueResponse.verify|verify} messages. - * @param message DescribeTaskQueueResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeTaskQueueResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeTaskQueueResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeTaskQueueResponse.verify|verify} messages. - * @param message DescribeTaskQueueResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeTaskQueueResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeTaskQueueResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeTaskQueueResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeTaskQueueResponse; - - /** - * Decodes a DescribeTaskQueueResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeTaskQueueResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeTaskQueueResponse; - - /** - * Creates a DescribeTaskQueueResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeTaskQueueResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeTaskQueueResponse; - - /** - * Creates a plain object from a DescribeTaskQueueResponse message. Also converts values to other types if specified. - * @param message DescribeTaskQueueResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeTaskQueueResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeTaskQueueResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeTaskQueueResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescribeTaskQueueResponse { - - /** Properties of an EffectiveRateLimit. */ - interface IEffectiveRateLimit { - - /** The effective rate limit for the task queue. */ - requestsPerSecond?: (number|null); - - /** - * Source of the RateLimit Configuration,which can be one of the following values: - * - SOURCE_API: The rate limit that is set via the TaskQueueConfig api. - * - SOURCE_WORKER: The rate limit is the value set using the workerOptions in TaskQueueActivitiesPerSecond. - * - SOURCE_SYSTEM: The rate limit is the default value set by the system - */ - rateLimitSource?: (temporal.api.enums.v1.RateLimitSource|null); - } - - /** Represents an EffectiveRateLimit. */ - class EffectiveRateLimit implements IEffectiveRateLimit { - - /** - * Constructs a new EffectiveRateLimit. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.DescribeTaskQueueResponse.IEffectiveRateLimit); - - /** The effective rate limit for the task queue. */ - public requestsPerSecond: number; - - /** - * Source of the RateLimit Configuration,which can be one of the following values: - * - SOURCE_API: The rate limit that is set via the TaskQueueConfig api. - * - SOURCE_WORKER: The rate limit is the value set using the workerOptions in TaskQueueActivitiesPerSecond. - * - SOURCE_SYSTEM: The rate limit is the default value set by the system - */ - public rateLimitSource: temporal.api.enums.v1.RateLimitSource; - - /** - * Creates a new EffectiveRateLimit instance using the specified properties. - * @param [properties] Properties to set - * @returns EffectiveRateLimit instance - */ - public static create(properties?: temporal.api.workflowservice.v1.DescribeTaskQueueResponse.IEffectiveRateLimit): temporal.api.workflowservice.v1.DescribeTaskQueueResponse.EffectiveRateLimit; - - /** - * Encodes the specified EffectiveRateLimit message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeTaskQueueResponse.EffectiveRateLimit.verify|verify} messages. - * @param message EffectiveRateLimit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.DescribeTaskQueueResponse.IEffectiveRateLimit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EffectiveRateLimit message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeTaskQueueResponse.EffectiveRateLimit.verify|verify} messages. - * @param message EffectiveRateLimit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.DescribeTaskQueueResponse.IEffectiveRateLimit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EffectiveRateLimit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EffectiveRateLimit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeTaskQueueResponse.EffectiveRateLimit; - - /** - * Decodes an EffectiveRateLimit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EffectiveRateLimit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeTaskQueueResponse.EffectiveRateLimit; - - /** - * Creates an EffectiveRateLimit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EffectiveRateLimit - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeTaskQueueResponse.EffectiveRateLimit; - - /** - * Creates a plain object from an EffectiveRateLimit message. Also converts values to other types if specified. - * @param message EffectiveRateLimit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeTaskQueueResponse.EffectiveRateLimit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EffectiveRateLimit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EffectiveRateLimit - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GetClusterInfoRequest. */ - interface IGetClusterInfoRequest { - } - - /** Represents a GetClusterInfoRequest. */ - class GetClusterInfoRequest implements IGetClusterInfoRequest { - - /** - * Constructs a new GetClusterInfoRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetClusterInfoRequest); - - /** - * Creates a new GetClusterInfoRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetClusterInfoRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetClusterInfoRequest): temporal.api.workflowservice.v1.GetClusterInfoRequest; - - /** - * Encodes the specified GetClusterInfoRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.GetClusterInfoRequest.verify|verify} messages. - * @param message GetClusterInfoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetClusterInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetClusterInfoRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetClusterInfoRequest.verify|verify} messages. - * @param message GetClusterInfoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetClusterInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetClusterInfoRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetClusterInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetClusterInfoRequest; - - /** - * Decodes a GetClusterInfoRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetClusterInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetClusterInfoRequest; - - /** - * Creates a GetClusterInfoRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetClusterInfoRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetClusterInfoRequest; - - /** - * Creates a plain object from a GetClusterInfoRequest message. Also converts values to other types if specified. - * @param message GetClusterInfoRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetClusterInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetClusterInfoRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetClusterInfoRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetClusterInfoResponse. */ - interface IGetClusterInfoResponse { - - /** - * Key is client name i.e "temporal-go", "temporal-java", or "temporal-cli". - * Value is ranges of supported versions of this client i.e ">1.1.1 <=1.4.0 || ^5.0.0". - */ - supportedClients?: ({ [k: string]: string }|null); - - /** GetClusterInfoResponse serverVersion */ - serverVersion?: (string|null); - - /** GetClusterInfoResponse clusterId */ - clusterId?: (string|null); - - /** GetClusterInfoResponse versionInfo */ - versionInfo?: (temporal.api.version.v1.IVersionInfo|null); - - /** GetClusterInfoResponse clusterName */ - clusterName?: (string|null); - - /** GetClusterInfoResponse historyShardCount */ - historyShardCount?: (number|null); - - /** GetClusterInfoResponse persistenceStore */ - persistenceStore?: (string|null); - - /** GetClusterInfoResponse visibilityStore */ - visibilityStore?: (string|null); - - /** GetClusterInfoResponse initialFailoverVersion */ - initialFailoverVersion?: (Long|null); - - /** GetClusterInfoResponse failoverVersionIncrement */ - failoverVersionIncrement?: (Long|null); - } - - /** GetClusterInfoResponse contains information about Temporal cluster. */ - class GetClusterInfoResponse implements IGetClusterInfoResponse { - - /** - * Constructs a new GetClusterInfoResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetClusterInfoResponse); - - /** - * Key is client name i.e "temporal-go", "temporal-java", or "temporal-cli". - * Value is ranges of supported versions of this client i.e ">1.1.1 <=1.4.0 || ^5.0.0". - */ - public supportedClients: { [k: string]: string }; - - /** GetClusterInfoResponse serverVersion. */ - public serverVersion: string; - - /** GetClusterInfoResponse clusterId. */ - public clusterId: string; - - /** GetClusterInfoResponse versionInfo. */ - public versionInfo?: (temporal.api.version.v1.IVersionInfo|null); - - /** GetClusterInfoResponse clusterName. */ - public clusterName: string; - - /** GetClusterInfoResponse historyShardCount. */ - public historyShardCount: number; - - /** GetClusterInfoResponse persistenceStore. */ - public persistenceStore: string; - - /** GetClusterInfoResponse visibilityStore. */ - public visibilityStore: string; - - /** GetClusterInfoResponse initialFailoverVersion. */ - public initialFailoverVersion: Long; - - /** GetClusterInfoResponse failoverVersionIncrement. */ - public failoverVersionIncrement: Long; - - /** - * Creates a new GetClusterInfoResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetClusterInfoResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetClusterInfoResponse): temporal.api.workflowservice.v1.GetClusterInfoResponse; - - /** - * Encodes the specified GetClusterInfoResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.GetClusterInfoResponse.verify|verify} messages. - * @param message GetClusterInfoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetClusterInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetClusterInfoResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetClusterInfoResponse.verify|verify} messages. - * @param message GetClusterInfoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetClusterInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetClusterInfoResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetClusterInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetClusterInfoResponse; - - /** - * Decodes a GetClusterInfoResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetClusterInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetClusterInfoResponse; - - /** - * Creates a GetClusterInfoResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetClusterInfoResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetClusterInfoResponse; - - /** - * Creates a plain object from a GetClusterInfoResponse message. Also converts values to other types if specified. - * @param message GetClusterInfoResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetClusterInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetClusterInfoResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetClusterInfoResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetSystemInfoRequest. */ - interface IGetSystemInfoRequest { - } - - /** Represents a GetSystemInfoRequest. */ - class GetSystemInfoRequest implements IGetSystemInfoRequest { - - /** - * Constructs a new GetSystemInfoRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetSystemInfoRequest); - - /** - * Creates a new GetSystemInfoRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSystemInfoRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetSystemInfoRequest): temporal.api.workflowservice.v1.GetSystemInfoRequest; - - /** - * Encodes the specified GetSystemInfoRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.GetSystemInfoRequest.verify|verify} messages. - * @param message GetSystemInfoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetSystemInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSystemInfoRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetSystemInfoRequest.verify|verify} messages. - * @param message GetSystemInfoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetSystemInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSystemInfoRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSystemInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetSystemInfoRequest; - - /** - * Decodes a GetSystemInfoRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSystemInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetSystemInfoRequest; - - /** - * Creates a GetSystemInfoRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSystemInfoRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetSystemInfoRequest; - - /** - * Creates a plain object from a GetSystemInfoRequest message. Also converts values to other types if specified. - * @param message GetSystemInfoRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetSystemInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSystemInfoRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetSystemInfoRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetSystemInfoResponse. */ - interface IGetSystemInfoResponse { - - /** Version of the server. */ - serverVersion?: (string|null); - - /** All capabilities the system supports. */ - capabilities?: (temporal.api.workflowservice.v1.GetSystemInfoResponse.ICapabilities|null); - } - - /** Represents a GetSystemInfoResponse. */ - class GetSystemInfoResponse implements IGetSystemInfoResponse { - - /** - * Constructs a new GetSystemInfoResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetSystemInfoResponse); - - /** Version of the server. */ - public serverVersion: string; - - /** All capabilities the system supports. */ - public capabilities?: (temporal.api.workflowservice.v1.GetSystemInfoResponse.ICapabilities|null); - - /** - * Creates a new GetSystemInfoResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSystemInfoResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetSystemInfoResponse): temporal.api.workflowservice.v1.GetSystemInfoResponse; - - /** - * Encodes the specified GetSystemInfoResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.GetSystemInfoResponse.verify|verify} messages. - * @param message GetSystemInfoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetSystemInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSystemInfoResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetSystemInfoResponse.verify|verify} messages. - * @param message GetSystemInfoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetSystemInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSystemInfoResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSystemInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetSystemInfoResponse; - - /** - * Decodes a GetSystemInfoResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSystemInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetSystemInfoResponse; - - /** - * Creates a GetSystemInfoResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSystemInfoResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetSystemInfoResponse; - - /** - * Creates a plain object from a GetSystemInfoResponse message. Also converts values to other types if specified. - * @param message GetSystemInfoResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetSystemInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSystemInfoResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetSystemInfoResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GetSystemInfoResponse { - - /** Properties of a Capabilities. */ - interface ICapabilities { - - /** True if signal and query headers are supported. */ - signalAndQueryHeader?: (boolean|null); - - /** - * True if internal errors are differentiated from other types of errors for purposes of - * retrying non-internal errors. - * - * When unset/false, clients retry all failures. When true, clients should only retry - * non-internal errors. - */ - internalErrorDifferentiation?: (boolean|null); - - /** True if RespondActivityTaskFailed API supports including heartbeat details */ - activityFailureIncludeHeartbeat?: (boolean|null); - - /** Supports scheduled workflow features. */ - supportsSchedules?: (boolean|null); - - /** True if server uses protos that include temporal.api.failure.v1.Failure.encoded_attributes */ - encodedFailureAttributes?: (boolean|null); - - /** - * True if server supports dispatching Workflow and Activity tasks based on a worker's build_id - * (see: - * https://github.com/temporalio/proposals/blob/a123af3b559f43db16ea6dd31870bfb754c4dc5e/versioning/worker-versions.md) - */ - buildIdBasedVersioning?: (boolean|null); - - /** True if server supports upserting workflow memo */ - upsertMemo?: (boolean|null); - - /** True if server supports eager workflow task dispatching for the StartWorkflowExecution API */ - eagerWorkflowStart?: (boolean|null); - - /** - * True if the server knows about the sdk metadata field on WFT completions and will record - * it in history - */ - sdkMetadata?: (boolean|null); - - /** - * True if the server supports count group by execution status - * (-- api-linter: core::0140::prepositions=disabled --) - */ - countGroupByExecutionStatus?: (boolean|null); - - /** - * True if the server supports Nexus operations. - * This flag is dependent both on server version and for Nexus to be enabled via server configuration. - */ - nexus?: (boolean|null); - } - - /** System capability details. */ - class Capabilities implements ICapabilities { - - /** - * Constructs a new Capabilities. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.GetSystemInfoResponse.ICapabilities); - - /** True if signal and query headers are supported. */ - public signalAndQueryHeader: boolean; - - /** - * True if internal errors are differentiated from other types of errors for purposes of - * retrying non-internal errors. - * - * When unset/false, clients retry all failures. When true, clients should only retry - * non-internal errors. - */ - public internalErrorDifferentiation: boolean; - - /** True if RespondActivityTaskFailed API supports including heartbeat details */ - public activityFailureIncludeHeartbeat: boolean; - - /** Supports scheduled workflow features. */ - public supportsSchedules: boolean; - - /** True if server uses protos that include temporal.api.failure.v1.Failure.encoded_attributes */ - public encodedFailureAttributes: boolean; - - /** - * True if server supports dispatching Workflow and Activity tasks based on a worker's build_id - * (see: - * https://github.com/temporalio/proposals/blob/a123af3b559f43db16ea6dd31870bfb754c4dc5e/versioning/worker-versions.md) - */ - public buildIdBasedVersioning: boolean; - - /** True if server supports upserting workflow memo */ - public upsertMemo: boolean; - - /** True if server supports eager workflow task dispatching for the StartWorkflowExecution API */ - public eagerWorkflowStart: boolean; - - /** - * True if the server knows about the sdk metadata field on WFT completions and will record - * it in history - */ - public sdkMetadata: boolean; - - /** - * True if the server supports count group by execution status - * (-- api-linter: core::0140::prepositions=disabled --) - */ - public countGroupByExecutionStatus: boolean; - - /** - * True if the server supports Nexus operations. - * This flag is dependent both on server version and for Nexus to be enabled via server configuration. - */ - public nexus: boolean; - - /** - * Creates a new Capabilities instance using the specified properties. - * @param [properties] Properties to set - * @returns Capabilities instance - */ - public static create(properties?: temporal.api.workflowservice.v1.GetSystemInfoResponse.ICapabilities): temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities; - - /** - * Encodes the specified Capabilities message. Does not implicitly {@link temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities.verify|verify} messages. - * @param message Capabilities message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.GetSystemInfoResponse.ICapabilities, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Capabilities message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities.verify|verify} messages. - * @param message Capabilities message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.GetSystemInfoResponse.ICapabilities, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Capabilities message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Capabilities - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities; - - /** - * Decodes a Capabilities message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Capabilities - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities; - - /** - * Creates a Capabilities message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Capabilities - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities; - - /** - * Creates a plain object from a Capabilities message. Also converts values to other types if specified. - * @param message Capabilities - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Capabilities to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Capabilities - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ListTaskQueuePartitionsRequest. */ - interface IListTaskQueuePartitionsRequest { - - /** ListTaskQueuePartitionsRequest namespace */ - namespace?: (string|null); - - /** ListTaskQueuePartitionsRequest taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - } - - /** Represents a ListTaskQueuePartitionsRequest. */ - class ListTaskQueuePartitionsRequest implements IListTaskQueuePartitionsRequest { - - /** - * Constructs a new ListTaskQueuePartitionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListTaskQueuePartitionsRequest); - - /** ListTaskQueuePartitionsRequest namespace. */ - public namespace: string; - - /** ListTaskQueuePartitionsRequest taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** - * Creates a new ListTaskQueuePartitionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTaskQueuePartitionsRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListTaskQueuePartitionsRequest): temporal.api.workflowservice.v1.ListTaskQueuePartitionsRequest; - - /** - * Encodes the specified ListTaskQueuePartitionsRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ListTaskQueuePartitionsRequest.verify|verify} messages. - * @param message ListTaskQueuePartitionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListTaskQueuePartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTaskQueuePartitionsRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListTaskQueuePartitionsRequest.verify|verify} messages. - * @param message ListTaskQueuePartitionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListTaskQueuePartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTaskQueuePartitionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTaskQueuePartitionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListTaskQueuePartitionsRequest; - - /** - * Decodes a ListTaskQueuePartitionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTaskQueuePartitionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListTaskQueuePartitionsRequest; - - /** - * Creates a ListTaskQueuePartitionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTaskQueuePartitionsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListTaskQueuePartitionsRequest; - - /** - * Creates a plain object from a ListTaskQueuePartitionsRequest message. Also converts values to other types if specified. - * @param message ListTaskQueuePartitionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListTaskQueuePartitionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTaskQueuePartitionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTaskQueuePartitionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTaskQueuePartitionsResponse. */ - interface IListTaskQueuePartitionsResponse { - - /** ListTaskQueuePartitionsResponse activityTaskQueuePartitions */ - activityTaskQueuePartitions?: (temporal.api.taskqueue.v1.ITaskQueuePartitionMetadata[]|null); - - /** ListTaskQueuePartitionsResponse workflowTaskQueuePartitions */ - workflowTaskQueuePartitions?: (temporal.api.taskqueue.v1.ITaskQueuePartitionMetadata[]|null); - } - - /** Represents a ListTaskQueuePartitionsResponse. */ - class ListTaskQueuePartitionsResponse implements IListTaskQueuePartitionsResponse { - - /** - * Constructs a new ListTaskQueuePartitionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListTaskQueuePartitionsResponse); - - /** ListTaskQueuePartitionsResponse activityTaskQueuePartitions. */ - public activityTaskQueuePartitions: temporal.api.taskqueue.v1.ITaskQueuePartitionMetadata[]; - - /** ListTaskQueuePartitionsResponse workflowTaskQueuePartitions. */ - public workflowTaskQueuePartitions: temporal.api.taskqueue.v1.ITaskQueuePartitionMetadata[]; - - /** - * Creates a new ListTaskQueuePartitionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTaskQueuePartitionsResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListTaskQueuePartitionsResponse): temporal.api.workflowservice.v1.ListTaskQueuePartitionsResponse; - - /** - * Encodes the specified ListTaskQueuePartitionsResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ListTaskQueuePartitionsResponse.verify|verify} messages. - * @param message ListTaskQueuePartitionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListTaskQueuePartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTaskQueuePartitionsResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListTaskQueuePartitionsResponse.verify|verify} messages. - * @param message ListTaskQueuePartitionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListTaskQueuePartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTaskQueuePartitionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTaskQueuePartitionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListTaskQueuePartitionsResponse; - - /** - * Decodes a ListTaskQueuePartitionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTaskQueuePartitionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListTaskQueuePartitionsResponse; - - /** - * Creates a ListTaskQueuePartitionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTaskQueuePartitionsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListTaskQueuePartitionsResponse; - - /** - * Creates a plain object from a ListTaskQueuePartitionsResponse message. Also converts values to other types if specified. - * @param message ListTaskQueuePartitionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListTaskQueuePartitionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTaskQueuePartitionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTaskQueuePartitionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateScheduleRequest. */ - interface ICreateScheduleRequest { - - /** The namespace the schedule should be created in. */ - namespace?: (string|null); - - /** The id of the new schedule. */ - scheduleId?: (string|null); - - /** The schedule spec, policies, action, and initial state. */ - schedule?: (temporal.api.schedule.v1.ISchedule|null); - - /** Optional initial patch (e.g. to run the action once immediately). */ - initialPatch?: (temporal.api.schedule.v1.ISchedulePatch|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - - /** A unique identifier for this create request for idempotence. Typically UUIDv4. */ - requestId?: (string|null); - - /** Memo and search attributes to attach to the schedule itself. */ - memo?: (temporal.api.common.v1.IMemo|null); - - /** CreateScheduleRequest searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - } - - /** - * (-- api-linter: core::0203::optional=disabled - * aip.dev/not-precedent: field_behavior annotation not available in our gogo fork --) - */ - class CreateScheduleRequest implements ICreateScheduleRequest { - - /** - * Constructs a new CreateScheduleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ICreateScheduleRequest); - - /** The namespace the schedule should be created in. */ - public namespace: string; - - /** The id of the new schedule. */ - public scheduleId: string; - - /** The schedule spec, policies, action, and initial state. */ - public schedule?: (temporal.api.schedule.v1.ISchedule|null); - - /** Optional initial patch (e.g. to run the action once immediately). */ - public initialPatch?: (temporal.api.schedule.v1.ISchedulePatch|null); - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** A unique identifier for this create request for idempotence. Typically UUIDv4. */ - public requestId: string; - - /** Memo and search attributes to attach to the schedule itself. */ - public memo?: (temporal.api.common.v1.IMemo|null); - - /** CreateScheduleRequest searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * Creates a new CreateScheduleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateScheduleRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ICreateScheduleRequest): temporal.api.workflowservice.v1.CreateScheduleRequest; - - /** - * Encodes the specified CreateScheduleRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.CreateScheduleRequest.verify|verify} messages. - * @param message CreateScheduleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ICreateScheduleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateScheduleRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.CreateScheduleRequest.verify|verify} messages. - * @param message CreateScheduleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ICreateScheduleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateScheduleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateScheduleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.CreateScheduleRequest; - - /** - * Decodes a CreateScheduleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateScheduleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.CreateScheduleRequest; - - /** - * Creates a CreateScheduleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateScheduleRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.CreateScheduleRequest; - - /** - * Creates a plain object from a CreateScheduleRequest message. Also converts values to other types if specified. - * @param message CreateScheduleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.CreateScheduleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateScheduleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateScheduleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateScheduleResponse. */ - interface ICreateScheduleResponse { - - /** CreateScheduleResponse conflictToken */ - conflictToken?: (Uint8Array|null); - } - - /** Represents a CreateScheduleResponse. */ - class CreateScheduleResponse implements ICreateScheduleResponse { - - /** - * Constructs a new CreateScheduleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ICreateScheduleResponse); - - /** CreateScheduleResponse conflictToken. */ - public conflictToken: Uint8Array; - - /** - * Creates a new CreateScheduleResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateScheduleResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ICreateScheduleResponse): temporal.api.workflowservice.v1.CreateScheduleResponse; - - /** - * Encodes the specified CreateScheduleResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.CreateScheduleResponse.verify|verify} messages. - * @param message CreateScheduleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ICreateScheduleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateScheduleResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.CreateScheduleResponse.verify|verify} messages. - * @param message CreateScheduleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ICreateScheduleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateScheduleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateScheduleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.CreateScheduleResponse; - - /** - * Decodes a CreateScheduleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateScheduleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.CreateScheduleResponse; - - /** - * Creates a CreateScheduleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateScheduleResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.CreateScheduleResponse; - - /** - * Creates a plain object from a CreateScheduleResponse message. Also converts values to other types if specified. - * @param message CreateScheduleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.CreateScheduleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateScheduleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateScheduleResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeScheduleRequest. */ - interface IDescribeScheduleRequest { - - /** The namespace of the schedule to describe. */ - namespace?: (string|null); - - /** The id of the schedule to describe. */ - scheduleId?: (string|null); - } - - /** Represents a DescribeScheduleRequest. */ - class DescribeScheduleRequest implements IDescribeScheduleRequest { - - /** - * Constructs a new DescribeScheduleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeScheduleRequest); - - /** The namespace of the schedule to describe. */ - public namespace: string; - - /** The id of the schedule to describe. */ - public scheduleId: string; - - /** - * Creates a new DescribeScheduleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeScheduleRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeScheduleRequest): temporal.api.workflowservice.v1.DescribeScheduleRequest; - - /** - * Encodes the specified DescribeScheduleRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeScheduleRequest.verify|verify} messages. - * @param message DescribeScheduleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeScheduleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeScheduleRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeScheduleRequest.verify|verify} messages. - * @param message DescribeScheduleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeScheduleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeScheduleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeScheduleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeScheduleRequest; - - /** - * Decodes a DescribeScheduleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeScheduleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeScheduleRequest; - - /** - * Creates a DescribeScheduleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeScheduleRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeScheduleRequest; - - /** - * Creates a plain object from a DescribeScheduleRequest message. Also converts values to other types if specified. - * @param message DescribeScheduleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeScheduleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeScheduleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeScheduleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeScheduleResponse. */ - interface IDescribeScheduleResponse { - - /** - * The complete current schedule details. This may not match the schedule as - * created because: - * - some types of schedule specs may get compiled into others (e.g. - * CronString into StructuredCalendarSpec) - * - some unspecified fields may be replaced by defaults - * - some fields in the state are modified automatically - * - the schedule may have been modified by UpdateSchedule or PatchSchedule - */ - schedule?: (temporal.api.schedule.v1.ISchedule|null); - - /** Extra schedule state info. */ - info?: (temporal.api.schedule.v1.IScheduleInfo|null); - - /** The memo and search attributes that the schedule was created with. */ - memo?: (temporal.api.common.v1.IMemo|null); - - /** DescribeScheduleResponse searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * This value can be passed back to UpdateSchedule to ensure that the - * schedule was not modified between a Describe and an Update, which could - * lead to lost updates and other confusion. - */ - conflictToken?: (Uint8Array|null); - } - - /** Represents a DescribeScheduleResponse. */ - class DescribeScheduleResponse implements IDescribeScheduleResponse { - - /** - * Constructs a new DescribeScheduleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeScheduleResponse); - - /** - * The complete current schedule details. This may not match the schedule as - * created because: - * - some types of schedule specs may get compiled into others (e.g. - * CronString into StructuredCalendarSpec) - * - some unspecified fields may be replaced by defaults - * - some fields in the state are modified automatically - * - the schedule may have been modified by UpdateSchedule or PatchSchedule - */ - public schedule?: (temporal.api.schedule.v1.ISchedule|null); - - /** Extra schedule state info. */ - public info?: (temporal.api.schedule.v1.IScheduleInfo|null); - - /** The memo and search attributes that the schedule was created with. */ - public memo?: (temporal.api.common.v1.IMemo|null); - - /** DescribeScheduleResponse searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * This value can be passed back to UpdateSchedule to ensure that the - * schedule was not modified between a Describe and an Update, which could - * lead to lost updates and other confusion. - */ - public conflictToken: Uint8Array; - - /** - * Creates a new DescribeScheduleResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeScheduleResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeScheduleResponse): temporal.api.workflowservice.v1.DescribeScheduleResponse; - - /** - * Encodes the specified DescribeScheduleResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeScheduleResponse.verify|verify} messages. - * @param message DescribeScheduleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeScheduleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeScheduleResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeScheduleResponse.verify|verify} messages. - * @param message DescribeScheduleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeScheduleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeScheduleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeScheduleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeScheduleResponse; - - /** - * Decodes a DescribeScheduleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeScheduleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeScheduleResponse; - - /** - * Creates a DescribeScheduleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeScheduleResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeScheduleResponse; - - /** - * Creates a plain object from a DescribeScheduleResponse message. Also converts values to other types if specified. - * @param message DescribeScheduleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeScheduleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeScheduleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeScheduleResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateScheduleRequest. */ - interface IUpdateScheduleRequest { - - /** The namespace of the schedule to update. */ - namespace?: (string|null); - - /** The id of the schedule to update. */ - scheduleId?: (string|null); - - /** - * The new schedule. The four main fields of the schedule (spec, action, - * policies, state) are replaced completely by the values in this message. - */ - schedule?: (temporal.api.schedule.v1.ISchedule|null); - - /** - * This can be the value of conflict_token from a DescribeScheduleResponse, - * which will cause this request to fail if the schedule has been modified - * between the Describe and this Update. - * If missing, the schedule will be updated unconditionally. - */ - conflictToken?: (Uint8Array|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - - /** A unique identifier for this update request for idempotence. Typically UUIDv4. */ - requestId?: (string|null); - - /** - * Schedule search attributes to be updated. - * Do not set this field if you do not want to update the search attributes. - * A non-null empty object will set the search attributes to an empty map. - * Note: you cannot only update the search attributes with `UpdateScheduleRequest`, - * you must also set the `schedule` field; otherwise, it will unset the schedule. - */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - } - - /** Represents an UpdateScheduleRequest. */ - class UpdateScheduleRequest implements IUpdateScheduleRequest { - - /** - * Constructs a new UpdateScheduleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateScheduleRequest); - - /** The namespace of the schedule to update. */ - public namespace: string; - - /** The id of the schedule to update. */ - public scheduleId: string; - - /** - * The new schedule. The four main fields of the schedule (spec, action, - * policies, state) are replaced completely by the values in this message. - */ - public schedule?: (temporal.api.schedule.v1.ISchedule|null); - - /** - * This can be the value of conflict_token from a DescribeScheduleResponse, - * which will cause this request to fail if the schedule has been modified - * between the Describe and this Update. - * If missing, the schedule will be updated unconditionally. - */ - public conflictToken: Uint8Array; - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** A unique identifier for this update request for idempotence. Typically UUIDv4. */ - public requestId: string; - - /** - * Schedule search attributes to be updated. - * Do not set this field if you do not want to update the search attributes. - * A non-null empty object will set the search attributes to an empty map. - * Note: you cannot only update the search attributes with `UpdateScheduleRequest`, - * you must also set the `schedule` field; otherwise, it will unset the schedule. - */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * Creates a new UpdateScheduleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateScheduleRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateScheduleRequest): temporal.api.workflowservice.v1.UpdateScheduleRequest; - - /** - * Encodes the specified UpdateScheduleRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateScheduleRequest.verify|verify} messages. - * @param message UpdateScheduleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateScheduleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateScheduleRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateScheduleRequest.verify|verify} messages. - * @param message UpdateScheduleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateScheduleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateScheduleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateScheduleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateScheduleRequest; - - /** - * Decodes an UpdateScheduleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateScheduleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateScheduleRequest; - - /** - * Creates an UpdateScheduleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateScheduleRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateScheduleRequest; - - /** - * Creates a plain object from an UpdateScheduleRequest message. Also converts values to other types if specified. - * @param message UpdateScheduleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateScheduleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateScheduleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateScheduleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateScheduleResponse. */ - interface IUpdateScheduleResponse { - } - - /** Represents an UpdateScheduleResponse. */ - class UpdateScheduleResponse implements IUpdateScheduleResponse { - - /** - * Constructs a new UpdateScheduleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateScheduleResponse); - - /** - * Creates a new UpdateScheduleResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateScheduleResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateScheduleResponse): temporal.api.workflowservice.v1.UpdateScheduleResponse; - - /** - * Encodes the specified UpdateScheduleResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateScheduleResponse.verify|verify} messages. - * @param message UpdateScheduleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateScheduleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateScheduleResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateScheduleResponse.verify|verify} messages. - * @param message UpdateScheduleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateScheduleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateScheduleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateScheduleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateScheduleResponse; - - /** - * Decodes an UpdateScheduleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateScheduleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateScheduleResponse; - - /** - * Creates an UpdateScheduleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateScheduleResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateScheduleResponse; - - /** - * Creates a plain object from an UpdateScheduleResponse message. Also converts values to other types if specified. - * @param message UpdateScheduleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateScheduleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateScheduleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateScheduleResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PatchScheduleRequest. */ - interface IPatchScheduleRequest { - - /** The namespace of the schedule to patch. */ - namespace?: (string|null); - - /** The id of the schedule to patch. */ - scheduleId?: (string|null); - - /** PatchScheduleRequest patch */ - patch?: (temporal.api.schedule.v1.ISchedulePatch|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - - /** A unique identifier for this update request for idempotence. Typically UUIDv4. */ - requestId?: (string|null); - } - - /** Represents a PatchScheduleRequest. */ - class PatchScheduleRequest implements IPatchScheduleRequest { - - /** - * Constructs a new PatchScheduleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPatchScheduleRequest); - - /** The namespace of the schedule to patch. */ - public namespace: string; - - /** The id of the schedule to patch. */ - public scheduleId: string; - - /** PatchScheduleRequest patch. */ - public patch?: (temporal.api.schedule.v1.ISchedulePatch|null); - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** A unique identifier for this update request for idempotence. Typically UUIDv4. */ - public requestId: string; - - /** - * Creates a new PatchScheduleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PatchScheduleRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPatchScheduleRequest): temporal.api.workflowservice.v1.PatchScheduleRequest; - - /** - * Encodes the specified PatchScheduleRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.PatchScheduleRequest.verify|verify} messages. - * @param message PatchScheduleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPatchScheduleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PatchScheduleRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PatchScheduleRequest.verify|verify} messages. - * @param message PatchScheduleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPatchScheduleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PatchScheduleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PatchScheduleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PatchScheduleRequest; - - /** - * Decodes a PatchScheduleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PatchScheduleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PatchScheduleRequest; - - /** - * Creates a PatchScheduleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PatchScheduleRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PatchScheduleRequest; - - /** - * Creates a plain object from a PatchScheduleRequest message. Also converts values to other types if specified. - * @param message PatchScheduleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PatchScheduleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PatchScheduleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PatchScheduleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PatchScheduleResponse. */ - interface IPatchScheduleResponse { - } - - /** Represents a PatchScheduleResponse. */ - class PatchScheduleResponse implements IPatchScheduleResponse { - - /** - * Constructs a new PatchScheduleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPatchScheduleResponse); - - /** - * Creates a new PatchScheduleResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PatchScheduleResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPatchScheduleResponse): temporal.api.workflowservice.v1.PatchScheduleResponse; - - /** - * Encodes the specified PatchScheduleResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.PatchScheduleResponse.verify|verify} messages. - * @param message PatchScheduleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPatchScheduleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PatchScheduleResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PatchScheduleResponse.verify|verify} messages. - * @param message PatchScheduleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPatchScheduleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PatchScheduleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PatchScheduleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PatchScheduleResponse; - - /** - * Decodes a PatchScheduleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PatchScheduleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PatchScheduleResponse; - - /** - * Creates a PatchScheduleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PatchScheduleResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PatchScheduleResponse; - - /** - * Creates a plain object from a PatchScheduleResponse message. Also converts values to other types if specified. - * @param message PatchScheduleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PatchScheduleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PatchScheduleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PatchScheduleResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListScheduleMatchingTimesRequest. */ - interface IListScheduleMatchingTimesRequest { - - /** The namespace of the schedule to query. */ - namespace?: (string|null); - - /** The id of the schedule to query. */ - scheduleId?: (string|null); - - /** Time range to query. */ - startTime?: (google.protobuf.ITimestamp|null); - - /** ListScheduleMatchingTimesRequest endTime */ - endTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a ListScheduleMatchingTimesRequest. */ - class ListScheduleMatchingTimesRequest implements IListScheduleMatchingTimesRequest { - - /** - * Constructs a new ListScheduleMatchingTimesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListScheduleMatchingTimesRequest); - - /** The namespace of the schedule to query. */ - public namespace: string; - - /** The id of the schedule to query. */ - public scheduleId: string; - - /** Time range to query. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** ListScheduleMatchingTimesRequest endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new ListScheduleMatchingTimesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListScheduleMatchingTimesRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListScheduleMatchingTimesRequest): temporal.api.workflowservice.v1.ListScheduleMatchingTimesRequest; - - /** - * Encodes the specified ListScheduleMatchingTimesRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ListScheduleMatchingTimesRequest.verify|verify} messages. - * @param message ListScheduleMatchingTimesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListScheduleMatchingTimesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListScheduleMatchingTimesRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListScheduleMatchingTimesRequest.verify|verify} messages. - * @param message ListScheduleMatchingTimesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListScheduleMatchingTimesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListScheduleMatchingTimesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListScheduleMatchingTimesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListScheduleMatchingTimesRequest; - - /** - * Decodes a ListScheduleMatchingTimesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListScheduleMatchingTimesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListScheduleMatchingTimesRequest; - - /** - * Creates a ListScheduleMatchingTimesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListScheduleMatchingTimesRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListScheduleMatchingTimesRequest; - - /** - * Creates a plain object from a ListScheduleMatchingTimesRequest message. Also converts values to other types if specified. - * @param message ListScheduleMatchingTimesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListScheduleMatchingTimesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListScheduleMatchingTimesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListScheduleMatchingTimesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListScheduleMatchingTimesResponse. */ - interface IListScheduleMatchingTimesResponse { - - /** ListScheduleMatchingTimesResponse startTime */ - startTime?: (google.protobuf.ITimestamp[]|null); - } - - /** Represents a ListScheduleMatchingTimesResponse. */ - class ListScheduleMatchingTimesResponse implements IListScheduleMatchingTimesResponse { - - /** - * Constructs a new ListScheduleMatchingTimesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListScheduleMatchingTimesResponse); - - /** ListScheduleMatchingTimesResponse startTime. */ - public startTime: google.protobuf.ITimestamp[]; - - /** - * Creates a new ListScheduleMatchingTimesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListScheduleMatchingTimesResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListScheduleMatchingTimesResponse): temporal.api.workflowservice.v1.ListScheduleMatchingTimesResponse; - - /** - * Encodes the specified ListScheduleMatchingTimesResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ListScheduleMatchingTimesResponse.verify|verify} messages. - * @param message ListScheduleMatchingTimesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListScheduleMatchingTimesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListScheduleMatchingTimesResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListScheduleMatchingTimesResponse.verify|verify} messages. - * @param message ListScheduleMatchingTimesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListScheduleMatchingTimesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListScheduleMatchingTimesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListScheduleMatchingTimesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListScheduleMatchingTimesResponse; - - /** - * Decodes a ListScheduleMatchingTimesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListScheduleMatchingTimesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListScheduleMatchingTimesResponse; - - /** - * Creates a ListScheduleMatchingTimesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListScheduleMatchingTimesResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListScheduleMatchingTimesResponse; - - /** - * Creates a plain object from a ListScheduleMatchingTimesResponse message. Also converts values to other types if specified. - * @param message ListScheduleMatchingTimesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListScheduleMatchingTimesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListScheduleMatchingTimesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListScheduleMatchingTimesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteScheduleRequest. */ - interface IDeleteScheduleRequest { - - /** The namespace of the schedule to delete. */ - namespace?: (string|null); - - /** The id of the schedule to delete. */ - scheduleId?: (string|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - } - - /** Represents a DeleteScheduleRequest. */ - class DeleteScheduleRequest implements IDeleteScheduleRequest { - - /** - * Constructs a new DeleteScheduleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDeleteScheduleRequest); - - /** The namespace of the schedule to delete. */ - public namespace: string; - - /** The id of the schedule to delete. */ - public scheduleId: string; - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** - * Creates a new DeleteScheduleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteScheduleRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDeleteScheduleRequest): temporal.api.workflowservice.v1.DeleteScheduleRequest; - - /** - * Encodes the specified DeleteScheduleRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteScheduleRequest.verify|verify} messages. - * @param message DeleteScheduleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDeleteScheduleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteScheduleRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteScheduleRequest.verify|verify} messages. - * @param message DeleteScheduleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDeleteScheduleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteScheduleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteScheduleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DeleteScheduleRequest; - - /** - * Decodes a DeleteScheduleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteScheduleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DeleteScheduleRequest; - - /** - * Creates a DeleteScheduleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteScheduleRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DeleteScheduleRequest; - - /** - * Creates a plain object from a DeleteScheduleRequest message. Also converts values to other types if specified. - * @param message DeleteScheduleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DeleteScheduleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteScheduleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteScheduleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteScheduleResponse. */ - interface IDeleteScheduleResponse { - } - - /** Represents a DeleteScheduleResponse. */ - class DeleteScheduleResponse implements IDeleteScheduleResponse { - - /** - * Constructs a new DeleteScheduleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDeleteScheduleResponse); - - /** - * Creates a new DeleteScheduleResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteScheduleResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDeleteScheduleResponse): temporal.api.workflowservice.v1.DeleteScheduleResponse; - - /** - * Encodes the specified DeleteScheduleResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteScheduleResponse.verify|verify} messages. - * @param message DeleteScheduleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDeleteScheduleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteScheduleResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteScheduleResponse.verify|verify} messages. - * @param message DeleteScheduleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDeleteScheduleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteScheduleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteScheduleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DeleteScheduleResponse; - - /** - * Decodes a DeleteScheduleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteScheduleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DeleteScheduleResponse; - - /** - * Creates a DeleteScheduleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteScheduleResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DeleteScheduleResponse; - - /** - * Creates a plain object from a DeleteScheduleResponse message. Also converts values to other types if specified. - * @param message DeleteScheduleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DeleteScheduleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteScheduleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteScheduleResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSchedulesRequest. */ - interface IListSchedulesRequest { - - /** The namespace to list schedules in. */ - namespace?: (string|null); - - /** How many to return at once. */ - maximumPageSize?: (number|null); - - /** Token to get the next page of results. */ - nextPageToken?: (Uint8Array|null); - - /** Query to filter schedules. */ - query?: (string|null); - } - - /** Represents a ListSchedulesRequest. */ - class ListSchedulesRequest implements IListSchedulesRequest { - - /** - * Constructs a new ListSchedulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListSchedulesRequest); - - /** The namespace to list schedules in. */ - public namespace: string; - - /** How many to return at once. */ - public maximumPageSize: number; - - /** Token to get the next page of results. */ - public nextPageToken: Uint8Array; - - /** Query to filter schedules. */ - public query: string; - - /** - * Creates a new ListSchedulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSchedulesRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListSchedulesRequest): temporal.api.workflowservice.v1.ListSchedulesRequest; - - /** - * Encodes the specified ListSchedulesRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ListSchedulesRequest.verify|verify} messages. - * @param message ListSchedulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListSchedulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSchedulesRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListSchedulesRequest.verify|verify} messages. - * @param message ListSchedulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListSchedulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSchedulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSchedulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListSchedulesRequest; - - /** - * Decodes a ListSchedulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSchedulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListSchedulesRequest; - - /** - * Creates a ListSchedulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSchedulesRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListSchedulesRequest; - - /** - * Creates a plain object from a ListSchedulesRequest message. Also converts values to other types if specified. - * @param message ListSchedulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListSchedulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSchedulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSchedulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSchedulesResponse. */ - interface IListSchedulesResponse { - - /** ListSchedulesResponse schedules */ - schedules?: (temporal.api.schedule.v1.IScheduleListEntry[]|null); - - /** ListSchedulesResponse nextPageToken */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListSchedulesResponse. */ - class ListSchedulesResponse implements IListSchedulesResponse { - - /** - * Constructs a new ListSchedulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListSchedulesResponse); - - /** ListSchedulesResponse schedules. */ - public schedules: temporal.api.schedule.v1.IScheduleListEntry[]; - - /** ListSchedulesResponse nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListSchedulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSchedulesResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListSchedulesResponse): temporal.api.workflowservice.v1.ListSchedulesResponse; - - /** - * Encodes the specified ListSchedulesResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ListSchedulesResponse.verify|verify} messages. - * @param message ListSchedulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListSchedulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSchedulesResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListSchedulesResponse.verify|verify} messages. - * @param message ListSchedulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListSchedulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSchedulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSchedulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListSchedulesResponse; - - /** - * Decodes a ListSchedulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSchedulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListSchedulesResponse; - - /** - * Creates a ListSchedulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSchedulesResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListSchedulesResponse; - - /** - * Creates a plain object from a ListSchedulesResponse message. Also converts values to other types if specified. - * @param message ListSchedulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListSchedulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSchedulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSchedulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CountSchedulesRequest. */ - interface ICountSchedulesRequest { - - /** CountSchedulesRequest namespace */ - namespace?: (string|null); - - /** Visibility query, see https://docs.temporal.io/list-filter for the syntax. */ - query?: (string|null); - } - - /** Represents a CountSchedulesRequest. */ - class CountSchedulesRequest implements ICountSchedulesRequest { - - /** - * Constructs a new CountSchedulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ICountSchedulesRequest); - - /** CountSchedulesRequest namespace. */ - public namespace: string; - - /** Visibility query, see https://docs.temporal.io/list-filter for the syntax. */ - public query: string; - - /** - * Creates a new CountSchedulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CountSchedulesRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ICountSchedulesRequest): temporal.api.workflowservice.v1.CountSchedulesRequest; - - /** - * Encodes the specified CountSchedulesRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.CountSchedulesRequest.verify|verify} messages. - * @param message CountSchedulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ICountSchedulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CountSchedulesRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.CountSchedulesRequest.verify|verify} messages. - * @param message CountSchedulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ICountSchedulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CountSchedulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CountSchedulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.CountSchedulesRequest; - - /** - * Decodes a CountSchedulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CountSchedulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.CountSchedulesRequest; - - /** - * Creates a CountSchedulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CountSchedulesRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.CountSchedulesRequest; - - /** - * Creates a plain object from a CountSchedulesRequest message. Also converts values to other types if specified. - * @param message CountSchedulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.CountSchedulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CountSchedulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CountSchedulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CountSchedulesResponse. */ - interface ICountSchedulesResponse { - - /** - * If `query` is not grouping by any field, the count is an approximate number - * of schedules that match the query. - * If `query` is grouping by a field, the count is simply the sum of the counts - * of the groups returned in the response. This number can be smaller than the - * total number of schedules matching the query. - */ - count?: (Long|null); - - /** - * Contains the groups if the request is grouping by a field. - * The list might not be complete, and the counts of each group is approximate. - */ - groups?: (temporal.api.workflowservice.v1.CountSchedulesResponse.IAggregationGroup[]|null); - } - - /** Represents a CountSchedulesResponse. */ - class CountSchedulesResponse implements ICountSchedulesResponse { - - /** - * Constructs a new CountSchedulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ICountSchedulesResponse); - - /** - * If `query` is not grouping by any field, the count is an approximate number - * of schedules that match the query. - * If `query` is grouping by a field, the count is simply the sum of the counts - * of the groups returned in the response. This number can be smaller than the - * total number of schedules matching the query. - */ - public count: Long; - - /** - * Contains the groups if the request is grouping by a field. - * The list might not be complete, and the counts of each group is approximate. - */ - public groups: temporal.api.workflowservice.v1.CountSchedulesResponse.IAggregationGroup[]; - - /** - * Creates a new CountSchedulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CountSchedulesResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ICountSchedulesResponse): temporal.api.workflowservice.v1.CountSchedulesResponse; - - /** - * Encodes the specified CountSchedulesResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.CountSchedulesResponse.verify|verify} messages. - * @param message CountSchedulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ICountSchedulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CountSchedulesResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.CountSchedulesResponse.verify|verify} messages. - * @param message CountSchedulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ICountSchedulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CountSchedulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CountSchedulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.CountSchedulesResponse; - - /** - * Decodes a CountSchedulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CountSchedulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.CountSchedulesResponse; - - /** - * Creates a CountSchedulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CountSchedulesResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.CountSchedulesResponse; - - /** - * Creates a plain object from a CountSchedulesResponse message. Also converts values to other types if specified. - * @param message CountSchedulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.CountSchedulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CountSchedulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CountSchedulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CountSchedulesResponse { - - /** Properties of an AggregationGroup. */ - interface IAggregationGroup { - - /** AggregationGroup groupValues */ - groupValues?: (temporal.api.common.v1.IPayload[]|null); - - /** AggregationGroup count */ - count?: (Long|null); - } - - /** Represents an AggregationGroup. */ - class AggregationGroup implements IAggregationGroup { - - /** - * Constructs a new AggregationGroup. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.CountSchedulesResponse.IAggregationGroup); - - /** AggregationGroup groupValues. */ - public groupValues: temporal.api.common.v1.IPayload[]; - - /** AggregationGroup count. */ - public count: Long; - - /** - * Creates a new AggregationGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns AggregationGroup instance - */ - public static create(properties?: temporal.api.workflowservice.v1.CountSchedulesResponse.IAggregationGroup): temporal.api.workflowservice.v1.CountSchedulesResponse.AggregationGroup; - - /** - * Encodes the specified AggregationGroup message. Does not implicitly {@link temporal.api.workflowservice.v1.CountSchedulesResponse.AggregationGroup.verify|verify} messages. - * @param message AggregationGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.CountSchedulesResponse.IAggregationGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AggregationGroup message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.CountSchedulesResponse.AggregationGroup.verify|verify} messages. - * @param message AggregationGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.CountSchedulesResponse.IAggregationGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AggregationGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AggregationGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.CountSchedulesResponse.AggregationGroup; - - /** - * Decodes an AggregationGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AggregationGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.CountSchedulesResponse.AggregationGroup; - - /** - * Creates an AggregationGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AggregationGroup - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.CountSchedulesResponse.AggregationGroup; - - /** - * Creates a plain object from an AggregationGroup message. Also converts values to other types if specified. - * @param message AggregationGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.CountSchedulesResponse.AggregationGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AggregationGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AggregationGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an UpdateWorkerBuildIdCompatibilityRequest. */ - interface IUpdateWorkerBuildIdCompatibilityRequest { - - /** UpdateWorkerBuildIdCompatibilityRequest namespace */ - namespace?: (string|null); - - /** - * Must be set, the task queue to apply changes to. Because all workers on a given task queue - * must have the same set of workflow & activity implementations, there is no reason to specify - * a task queue type here. - */ - taskQueue?: (string|null); - - /** - * A new build id. This operation will create a new set which will be the new overall - * default version for the queue, with this id as its only member. This new set is - * incompatible with all previous sets/versions. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: In makes perfect sense here. --) - */ - addNewBuildIdInNewDefaultSet?: (string|null); - - /** Adds a new id to an existing compatible set, see sub-message definition for more. */ - addNewCompatibleBuildId?: (temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.IAddNewCompatibleVersion|null); - - /** - * Promote an existing set to be the current default (if it isn't already) by targeting - * an existing build id within it. This field's value is the extant build id. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: Names are hard. --) - */ - promoteSetByBuildId?: (string|null); - - /** - * Promote an existing build id within some set to be the current default for that set. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: Within makes perfect sense here. --) - */ - promoteBuildIdWithinSet?: (string|null); - - /** - * Merge two existing sets together, thus declaring all build IDs in both sets compatible - * with one another. The primary set's default will become the default for the merged set. - * This is useful if you've accidentally declared a new ID as incompatible you meant to - * declare as compatible. The unusual case of incomplete replication during failover could - * also result in a split set, which this operation can repair. - */ - mergeSets?: (temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.IMergeSets|null); - } - - /** [cleanup-wv-pre-release] */ - class UpdateWorkerBuildIdCompatibilityRequest implements IUpdateWorkerBuildIdCompatibilityRequest { - - /** - * Constructs a new UpdateWorkerBuildIdCompatibilityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateWorkerBuildIdCompatibilityRequest); - - /** UpdateWorkerBuildIdCompatibilityRequest namespace. */ - public namespace: string; - - /** - * Must be set, the task queue to apply changes to. Because all workers on a given task queue - * must have the same set of workflow & activity implementations, there is no reason to specify - * a task queue type here. - */ - public taskQueue: string; - - /** - * A new build id. This operation will create a new set which will be the new overall - * default version for the queue, with this id as its only member. This new set is - * incompatible with all previous sets/versions. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: In makes perfect sense here. --) - */ - public addNewBuildIdInNewDefaultSet?: (string|null); - - /** Adds a new id to an existing compatible set, see sub-message definition for more. */ - public addNewCompatibleBuildId?: (temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.IAddNewCompatibleVersion|null); - - /** - * Promote an existing set to be the current default (if it isn't already) by targeting - * an existing build id within it. This field's value is the extant build id. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: Names are hard. --) - */ - public promoteSetByBuildId?: (string|null); - - /** - * Promote an existing build id within some set to be the current default for that set. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: Within makes perfect sense here. --) - */ - public promoteBuildIdWithinSet?: (string|null); - - /** - * Merge two existing sets together, thus declaring all build IDs in both sets compatible - * with one another. The primary set's default will become the default for the merged set. - * This is useful if you've accidentally declared a new ID as incompatible you meant to - * declare as compatible. The unusual case of incomplete replication during failover could - * also result in a split set, which this operation can repair. - */ - public mergeSets?: (temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.IMergeSets|null); - - /** UpdateWorkerBuildIdCompatibilityRequest operation. */ - public operation?: ("addNewBuildIdInNewDefaultSet"|"addNewCompatibleBuildId"|"promoteSetByBuildId"|"promoteBuildIdWithinSet"|"mergeSets"); - - /** - * Creates a new UpdateWorkerBuildIdCompatibilityRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateWorkerBuildIdCompatibilityRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateWorkerBuildIdCompatibilityRequest): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest; - - /** - * Encodes the specified UpdateWorkerBuildIdCompatibilityRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.verify|verify} messages. - * @param message UpdateWorkerBuildIdCompatibilityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateWorkerBuildIdCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateWorkerBuildIdCompatibilityRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.verify|verify} messages. - * @param message UpdateWorkerBuildIdCompatibilityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateWorkerBuildIdCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateWorkerBuildIdCompatibilityRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateWorkerBuildIdCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest; - - /** - * Decodes an UpdateWorkerBuildIdCompatibilityRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateWorkerBuildIdCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest; - - /** - * Creates an UpdateWorkerBuildIdCompatibilityRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateWorkerBuildIdCompatibilityRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest; - - /** - * Creates a plain object from an UpdateWorkerBuildIdCompatibilityRequest message. Also converts values to other types if specified. - * @param message UpdateWorkerBuildIdCompatibilityRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateWorkerBuildIdCompatibilityRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateWorkerBuildIdCompatibilityRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UpdateWorkerBuildIdCompatibilityRequest { - - /** Properties of an AddNewCompatibleVersion. */ - interface IAddNewCompatibleVersion { - - /** A new id to be added to an existing compatible set. */ - newBuildId?: (string|null); - - /** - * A build id which must already exist in the version sets known by the task queue. The new - * id will be stored in the set containing this id, marking it as compatible with - * the versions within. - */ - existingCompatibleBuildId?: (string|null); - - /** - * When set, establishes the compatible set being targeted as the overall default for the - * queue. If a different set was the current default, the targeted set will replace it as - * the new default. - */ - makeSetDefault?: (boolean|null); - } - - /** Represents an AddNewCompatibleVersion. */ - class AddNewCompatibleVersion implements IAddNewCompatibleVersion { - - /** - * Constructs a new AddNewCompatibleVersion. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.IAddNewCompatibleVersion); - - /** A new id to be added to an existing compatible set. */ - public newBuildId: string; - - /** - * A build id which must already exist in the version sets known by the task queue. The new - * id will be stored in the set containing this id, marking it as compatible with - * the versions within. - */ - public existingCompatibleBuildId: string; - - /** - * When set, establishes the compatible set being targeted as the overall default for the - * queue. If a different set was the current default, the targeted set will replace it as - * the new default. - */ - public makeSetDefault: boolean; - - /** - * Creates a new AddNewCompatibleVersion instance using the specified properties. - * @param [properties] Properties to set - * @returns AddNewCompatibleVersion instance - */ - public static create(properties?: temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.IAddNewCompatibleVersion): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion; - - /** - * Encodes the specified AddNewCompatibleVersion message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion.verify|verify} messages. - * @param message AddNewCompatibleVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.IAddNewCompatibleVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddNewCompatibleVersion message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion.verify|verify} messages. - * @param message AddNewCompatibleVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.IAddNewCompatibleVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddNewCompatibleVersion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddNewCompatibleVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion; - - /** - * Decodes an AddNewCompatibleVersion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddNewCompatibleVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion; - - /** - * Creates an AddNewCompatibleVersion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddNewCompatibleVersion - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion; - - /** - * Creates a plain object from an AddNewCompatibleVersion message. Also converts values to other types if specified. - * @param message AddNewCompatibleVersion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddNewCompatibleVersion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddNewCompatibleVersion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MergeSets. */ - interface IMergeSets { - - /** A build ID in the set whose default will become the merged set default */ - primarySetBuildId?: (string|null); - - /** A build ID in the set which will be merged into the primary set */ - secondarySetBuildId?: (string|null); - } - - /** Represents a MergeSets. */ - class MergeSets implements IMergeSets { - - /** - * Constructs a new MergeSets. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.IMergeSets); - - /** A build ID in the set whose default will become the merged set default */ - public primarySetBuildId: string; - - /** A build ID in the set which will be merged into the primary set */ - public secondarySetBuildId: string; - - /** - * Creates a new MergeSets instance using the specified properties. - * @param [properties] Properties to set - * @returns MergeSets instance - */ - public static create(properties?: temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.IMergeSets): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSets; - - /** - * Encodes the specified MergeSets message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSets.verify|verify} messages. - * @param message MergeSets message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.IMergeSets, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MergeSets message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSets.verify|verify} messages. - * @param message MergeSets message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.IMergeSets, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MergeSets message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MergeSets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSets; - - /** - * Decodes a MergeSets message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MergeSets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSets; - - /** - * Creates a MergeSets message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MergeSets - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSets; - - /** - * Creates a plain object from a MergeSets message. Also converts values to other types if specified. - * @param message MergeSets - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSets, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MergeSets to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MergeSets - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an UpdateWorkerBuildIdCompatibilityResponse. */ - interface IUpdateWorkerBuildIdCompatibilityResponse { - } - - /** [cleanup-wv-pre-release] */ - class UpdateWorkerBuildIdCompatibilityResponse implements IUpdateWorkerBuildIdCompatibilityResponse { - - /** - * Constructs a new UpdateWorkerBuildIdCompatibilityResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateWorkerBuildIdCompatibilityResponse); - - /** - * Creates a new UpdateWorkerBuildIdCompatibilityResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateWorkerBuildIdCompatibilityResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateWorkerBuildIdCompatibilityResponse): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse; - - /** - * Encodes the specified UpdateWorkerBuildIdCompatibilityResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse.verify|verify} messages. - * @param message UpdateWorkerBuildIdCompatibilityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateWorkerBuildIdCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateWorkerBuildIdCompatibilityResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse.verify|verify} messages. - * @param message UpdateWorkerBuildIdCompatibilityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateWorkerBuildIdCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateWorkerBuildIdCompatibilityResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateWorkerBuildIdCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse; - - /** - * Decodes an UpdateWorkerBuildIdCompatibilityResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateWorkerBuildIdCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse; - - /** - * Creates an UpdateWorkerBuildIdCompatibilityResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateWorkerBuildIdCompatibilityResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse; - - /** - * Creates a plain object from an UpdateWorkerBuildIdCompatibilityResponse message. Also converts values to other types if specified. - * @param message UpdateWorkerBuildIdCompatibilityResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateWorkerBuildIdCompatibilityResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateWorkerBuildIdCompatibilityResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetWorkerBuildIdCompatibilityRequest. */ - interface IGetWorkerBuildIdCompatibilityRequest { - - /** GetWorkerBuildIdCompatibilityRequest namespace */ - namespace?: (string|null); - - /** Must be set, the task queue to interrogate about worker id compatibility. */ - taskQueue?: (string|null); - - /** - * Limits how many compatible sets will be returned. Specify 1 to only return the current - * default major version set. 0 returns all sets. - */ - maxSets?: (number|null); - } - - /** [cleanup-wv-pre-release] */ - class GetWorkerBuildIdCompatibilityRequest implements IGetWorkerBuildIdCompatibilityRequest { - - /** - * Constructs a new GetWorkerBuildIdCompatibilityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetWorkerBuildIdCompatibilityRequest); - - /** GetWorkerBuildIdCompatibilityRequest namespace. */ - public namespace: string; - - /** Must be set, the task queue to interrogate about worker id compatibility. */ - public taskQueue: string; - - /** - * Limits how many compatible sets will be returned. Specify 1 to only return the current - * default major version set. 0 returns all sets. - */ - public maxSets: number; - - /** - * Creates a new GetWorkerBuildIdCompatibilityRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetWorkerBuildIdCompatibilityRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetWorkerBuildIdCompatibilityRequest): temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest; - - /** - * Encodes the specified GetWorkerBuildIdCompatibilityRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest.verify|verify} messages. - * @param message GetWorkerBuildIdCompatibilityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetWorkerBuildIdCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetWorkerBuildIdCompatibilityRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest.verify|verify} messages. - * @param message GetWorkerBuildIdCompatibilityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetWorkerBuildIdCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetWorkerBuildIdCompatibilityRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetWorkerBuildIdCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest; - - /** - * Decodes a GetWorkerBuildIdCompatibilityRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetWorkerBuildIdCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest; - - /** - * Creates a GetWorkerBuildIdCompatibilityRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetWorkerBuildIdCompatibilityRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest; - - /** - * Creates a plain object from a GetWorkerBuildIdCompatibilityRequest message. Also converts values to other types if specified. - * @param message GetWorkerBuildIdCompatibilityRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetWorkerBuildIdCompatibilityRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetWorkerBuildIdCompatibilityRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetWorkerBuildIdCompatibilityResponse. */ - interface IGetWorkerBuildIdCompatibilityResponse { - - /** - * Major version sets, in order from oldest to newest. The last element of the list will always - * be the current default major version. IE: New workflows will target the most recent version - * in that version set. - * - * There may be fewer sets returned than exist, if the request chose to limit this response. - */ - majorVersionSets?: (temporal.api.taskqueue.v1.ICompatibleVersionSet[]|null); - } - - /** [cleanup-wv-pre-release] */ - class GetWorkerBuildIdCompatibilityResponse implements IGetWorkerBuildIdCompatibilityResponse { - - /** - * Constructs a new GetWorkerBuildIdCompatibilityResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetWorkerBuildIdCompatibilityResponse); - - /** - * Major version sets, in order from oldest to newest. The last element of the list will always - * be the current default major version. IE: New workflows will target the most recent version - * in that version set. - * - * There may be fewer sets returned than exist, if the request chose to limit this response. - */ - public majorVersionSets: temporal.api.taskqueue.v1.ICompatibleVersionSet[]; - - /** - * Creates a new GetWorkerBuildIdCompatibilityResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetWorkerBuildIdCompatibilityResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetWorkerBuildIdCompatibilityResponse): temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse; - - /** - * Encodes the specified GetWorkerBuildIdCompatibilityResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse.verify|verify} messages. - * @param message GetWorkerBuildIdCompatibilityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetWorkerBuildIdCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetWorkerBuildIdCompatibilityResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse.verify|verify} messages. - * @param message GetWorkerBuildIdCompatibilityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetWorkerBuildIdCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetWorkerBuildIdCompatibilityResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetWorkerBuildIdCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse; - - /** - * Decodes a GetWorkerBuildIdCompatibilityResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetWorkerBuildIdCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse; - - /** - * Creates a GetWorkerBuildIdCompatibilityResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetWorkerBuildIdCompatibilityResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse; - - /** - * Creates a plain object from a GetWorkerBuildIdCompatibilityResponse message. Also converts values to other types if specified. - * @param message GetWorkerBuildIdCompatibilityResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetWorkerBuildIdCompatibilityResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetWorkerBuildIdCompatibilityResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateWorkerVersioningRulesRequest. */ - interface IUpdateWorkerVersioningRulesRequest { - - /** UpdateWorkerVersioningRulesRequest namespace */ - namespace?: (string|null); - - /** UpdateWorkerVersioningRulesRequest taskQueue */ - taskQueue?: (string|null); - - /** - * A valid conflict_token can be taken from the previous - * ListWorkerVersioningRulesResponse or UpdateWorkerVersioningRulesResponse. - * An invalid token will cause this request to fail, ensuring that if the rules - * for this Task Queue have been modified between the previous and current - * operation, the request will fail instead of causing an unpredictable mutation. - */ - conflictToken?: (Uint8Array|null); - - /** UpdateWorkerVersioningRulesRequest insertAssignmentRule */ - insertAssignmentRule?: (temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IInsertBuildIdAssignmentRule|null); - - /** UpdateWorkerVersioningRulesRequest replaceAssignmentRule */ - replaceAssignmentRule?: (temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IReplaceBuildIdAssignmentRule|null); - - /** UpdateWorkerVersioningRulesRequest deleteAssignmentRule */ - deleteAssignmentRule?: (temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IDeleteBuildIdAssignmentRule|null); - - /** UpdateWorkerVersioningRulesRequest addCompatibleRedirectRule */ - addCompatibleRedirectRule?: (temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IAddCompatibleBuildIdRedirectRule|null); - - /** UpdateWorkerVersioningRulesRequest replaceCompatibleRedirectRule */ - replaceCompatibleRedirectRule?: (temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IReplaceCompatibleBuildIdRedirectRule|null); - - /** UpdateWorkerVersioningRulesRequest deleteCompatibleRedirectRule */ - deleteCompatibleRedirectRule?: (temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IDeleteCompatibleBuildIdRedirectRule|null); - - /** UpdateWorkerVersioningRulesRequest commitBuildId */ - commitBuildId?: (temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ICommitBuildId|null); - } - - /** - * (-- api-linter: core::0134::request-mask-required=disabled - * aip.dev/not-precedent: UpdateNamespace RPC doesn't follow Google API format. --) - * (-- api-linter: core::0134::request-resource-required=disabled - * aip.dev/not-precedent: GetWorkerBuildIdCompatibilityRequest RPC doesn't follow Google API format. --) - * [cleanup-wv-pre-release] - */ - class UpdateWorkerVersioningRulesRequest implements IUpdateWorkerVersioningRulesRequest { - - /** - * Constructs a new UpdateWorkerVersioningRulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateWorkerVersioningRulesRequest); - - /** UpdateWorkerVersioningRulesRequest namespace. */ - public namespace: string; - - /** UpdateWorkerVersioningRulesRequest taskQueue. */ - public taskQueue: string; - - /** - * A valid conflict_token can be taken from the previous - * ListWorkerVersioningRulesResponse or UpdateWorkerVersioningRulesResponse. - * An invalid token will cause this request to fail, ensuring that if the rules - * for this Task Queue have been modified between the previous and current - * operation, the request will fail instead of causing an unpredictable mutation. - */ - public conflictToken: Uint8Array; - - /** UpdateWorkerVersioningRulesRequest insertAssignmentRule. */ - public insertAssignmentRule?: (temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IInsertBuildIdAssignmentRule|null); - - /** UpdateWorkerVersioningRulesRequest replaceAssignmentRule. */ - public replaceAssignmentRule?: (temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IReplaceBuildIdAssignmentRule|null); - - /** UpdateWorkerVersioningRulesRequest deleteAssignmentRule. */ - public deleteAssignmentRule?: (temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IDeleteBuildIdAssignmentRule|null); - - /** UpdateWorkerVersioningRulesRequest addCompatibleRedirectRule. */ - public addCompatibleRedirectRule?: (temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IAddCompatibleBuildIdRedirectRule|null); - - /** UpdateWorkerVersioningRulesRequest replaceCompatibleRedirectRule. */ - public replaceCompatibleRedirectRule?: (temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IReplaceCompatibleBuildIdRedirectRule|null); - - /** UpdateWorkerVersioningRulesRequest deleteCompatibleRedirectRule. */ - public deleteCompatibleRedirectRule?: (temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IDeleteCompatibleBuildIdRedirectRule|null); - - /** UpdateWorkerVersioningRulesRequest commitBuildId. */ - public commitBuildId?: (temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ICommitBuildId|null); - - /** UpdateWorkerVersioningRulesRequest operation. */ - public operation?: ("insertAssignmentRule"|"replaceAssignmentRule"|"deleteAssignmentRule"|"addCompatibleRedirectRule"|"replaceCompatibleRedirectRule"|"deleteCompatibleRedirectRule"|"commitBuildId"); - - /** - * Creates a new UpdateWorkerVersioningRulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateWorkerVersioningRulesRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateWorkerVersioningRulesRequest): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest; - - /** - * Encodes the specified UpdateWorkerVersioningRulesRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.verify|verify} messages. - * @param message UpdateWorkerVersioningRulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateWorkerVersioningRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateWorkerVersioningRulesRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.verify|verify} messages. - * @param message UpdateWorkerVersioningRulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateWorkerVersioningRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateWorkerVersioningRulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateWorkerVersioningRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest; - - /** - * Decodes an UpdateWorkerVersioningRulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateWorkerVersioningRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest; - - /** - * Creates an UpdateWorkerVersioningRulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateWorkerVersioningRulesRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest; - - /** - * Creates a plain object from an UpdateWorkerVersioningRulesRequest message. Also converts values to other types if specified. - * @param message UpdateWorkerVersioningRulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateWorkerVersioningRulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateWorkerVersioningRulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UpdateWorkerVersioningRulesRequest { - - /** Properties of an InsertBuildIdAssignmentRule. */ - interface IInsertBuildIdAssignmentRule { - - /** - * Use this option to insert the rule in a particular index. By - * default, the new rule is inserted at the beginning of the list - * (index 0). If the given index is too larger the rule will be - * inserted at the end of the list. - */ - ruleIndex?: (number|null); - - /** InsertBuildIdAssignmentRule rule */ - rule?: (temporal.api.taskqueue.v1.IBuildIdAssignmentRule|null); - } - - /** - * Inserts the rule to the list of assignment rules for this Task Queue. - * The rules are evaluated in order, starting from index 0. The first - * applicable rule will be applied and the rest will be ignored. - */ - class InsertBuildIdAssignmentRule implements IInsertBuildIdAssignmentRule { - - /** - * Constructs a new InsertBuildIdAssignmentRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IInsertBuildIdAssignmentRule); - - /** - * Use this option to insert the rule in a particular index. By - * default, the new rule is inserted at the beginning of the list - * (index 0). If the given index is too larger the rule will be - * inserted at the end of the list. - */ - public ruleIndex: number; - - /** InsertBuildIdAssignmentRule rule. */ - public rule?: (temporal.api.taskqueue.v1.IBuildIdAssignmentRule|null); - - /** - * Creates a new InsertBuildIdAssignmentRule instance using the specified properties. - * @param [properties] Properties to set - * @returns InsertBuildIdAssignmentRule instance - */ - public static create(properties?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IInsertBuildIdAssignmentRule): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRule; - - /** - * Encodes the specified InsertBuildIdAssignmentRule message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRule.verify|verify} messages. - * @param message InsertBuildIdAssignmentRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IInsertBuildIdAssignmentRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InsertBuildIdAssignmentRule message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRule.verify|verify} messages. - * @param message InsertBuildIdAssignmentRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IInsertBuildIdAssignmentRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InsertBuildIdAssignmentRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InsertBuildIdAssignmentRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRule; - - /** - * Decodes an InsertBuildIdAssignmentRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InsertBuildIdAssignmentRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRule; - - /** - * Creates an InsertBuildIdAssignmentRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InsertBuildIdAssignmentRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRule; - - /** - * Creates a plain object from an InsertBuildIdAssignmentRule message. Also converts values to other types if specified. - * @param message InsertBuildIdAssignmentRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InsertBuildIdAssignmentRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InsertBuildIdAssignmentRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReplaceBuildIdAssignmentRule. */ - interface IReplaceBuildIdAssignmentRule { - - /** ReplaceBuildIdAssignmentRule ruleIndex */ - ruleIndex?: (number|null); - - /** ReplaceBuildIdAssignmentRule rule */ - rule?: (temporal.api.taskqueue.v1.IBuildIdAssignmentRule|null); - - /** - * By default presence of one unconditional rule is enforced, otherwise - * the replace operation will be rejected. Set `force` to true to - * bypass this validation. An unconditional assignment rule: - * - Has no hint filter - * - Has no ramp - */ - force?: (boolean|null); - } - - /** Replaces the assignment rule at a given index. */ - class ReplaceBuildIdAssignmentRule implements IReplaceBuildIdAssignmentRule { - - /** - * Constructs a new ReplaceBuildIdAssignmentRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IReplaceBuildIdAssignmentRule); - - /** ReplaceBuildIdAssignmentRule ruleIndex. */ - public ruleIndex: number; - - /** ReplaceBuildIdAssignmentRule rule. */ - public rule?: (temporal.api.taskqueue.v1.IBuildIdAssignmentRule|null); - - /** - * By default presence of one unconditional rule is enforced, otherwise - * the replace operation will be rejected. Set `force` to true to - * bypass this validation. An unconditional assignment rule: - * - Has no hint filter - * - Has no ramp - */ - public force: boolean; - - /** - * Creates a new ReplaceBuildIdAssignmentRule instance using the specified properties. - * @param [properties] Properties to set - * @returns ReplaceBuildIdAssignmentRule instance - */ - public static create(properties?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IReplaceBuildIdAssignmentRule): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRule; - - /** - * Encodes the specified ReplaceBuildIdAssignmentRule message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRule.verify|verify} messages. - * @param message ReplaceBuildIdAssignmentRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IReplaceBuildIdAssignmentRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReplaceBuildIdAssignmentRule message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRule.verify|verify} messages. - * @param message ReplaceBuildIdAssignmentRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IReplaceBuildIdAssignmentRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReplaceBuildIdAssignmentRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReplaceBuildIdAssignmentRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRule; - - /** - * Decodes a ReplaceBuildIdAssignmentRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReplaceBuildIdAssignmentRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRule; - - /** - * Creates a ReplaceBuildIdAssignmentRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReplaceBuildIdAssignmentRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRule; - - /** - * Creates a plain object from a ReplaceBuildIdAssignmentRule message. Also converts values to other types if specified. - * @param message ReplaceBuildIdAssignmentRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReplaceBuildIdAssignmentRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReplaceBuildIdAssignmentRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteBuildIdAssignmentRule. */ - interface IDeleteBuildIdAssignmentRule { - - /** DeleteBuildIdAssignmentRule ruleIndex */ - ruleIndex?: (number|null); - - /** - * By default presence of one unconditional rule is enforced, otherwise - * the delete operation will be rejected. Set `force` to true to - * bypass this validation. An unconditional assignment rule: - * - Has no hint filter - * - Has no ramp - */ - force?: (boolean|null); - } - - /** Represents a DeleteBuildIdAssignmentRule. */ - class DeleteBuildIdAssignmentRule implements IDeleteBuildIdAssignmentRule { - - /** - * Constructs a new DeleteBuildIdAssignmentRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IDeleteBuildIdAssignmentRule); - - /** DeleteBuildIdAssignmentRule ruleIndex. */ - public ruleIndex: number; - - /** - * By default presence of one unconditional rule is enforced, otherwise - * the delete operation will be rejected. Set `force` to true to - * bypass this validation. An unconditional assignment rule: - * - Has no hint filter - * - Has no ramp - */ - public force: boolean; - - /** - * Creates a new DeleteBuildIdAssignmentRule instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBuildIdAssignmentRule instance - */ - public static create(properties?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IDeleteBuildIdAssignmentRule): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRule; - - /** - * Encodes the specified DeleteBuildIdAssignmentRule message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRule.verify|verify} messages. - * @param message DeleteBuildIdAssignmentRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IDeleteBuildIdAssignmentRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBuildIdAssignmentRule message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRule.verify|verify} messages. - * @param message DeleteBuildIdAssignmentRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IDeleteBuildIdAssignmentRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteBuildIdAssignmentRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteBuildIdAssignmentRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRule; - - /** - * Decodes a DeleteBuildIdAssignmentRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteBuildIdAssignmentRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRule; - - /** - * Creates a DeleteBuildIdAssignmentRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteBuildIdAssignmentRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRule; - - /** - * Creates a plain object from a DeleteBuildIdAssignmentRule message. Also converts values to other types if specified. - * @param message DeleteBuildIdAssignmentRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteBuildIdAssignmentRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteBuildIdAssignmentRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddCompatibleBuildIdRedirectRule. */ - interface IAddCompatibleBuildIdRedirectRule { - - /** AddCompatibleBuildIdRedirectRule rule */ - rule?: (temporal.api.taskqueue.v1.ICompatibleBuildIdRedirectRule|null); - } - - /** - * Adds the rule to the list of redirect rules for this Task Queue. There - * can be at most one redirect rule for each distinct Source Build ID. - */ - class AddCompatibleBuildIdRedirectRule implements IAddCompatibleBuildIdRedirectRule { - - /** - * Constructs a new AddCompatibleBuildIdRedirectRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IAddCompatibleBuildIdRedirectRule); - - /** AddCompatibleBuildIdRedirectRule rule. */ - public rule?: (temporal.api.taskqueue.v1.ICompatibleBuildIdRedirectRule|null); - - /** - * Creates a new AddCompatibleBuildIdRedirectRule instance using the specified properties. - * @param [properties] Properties to set - * @returns AddCompatibleBuildIdRedirectRule instance - */ - public static create(properties?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IAddCompatibleBuildIdRedirectRule): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRule; - - /** - * Encodes the specified AddCompatibleBuildIdRedirectRule message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRule.verify|verify} messages. - * @param message AddCompatibleBuildIdRedirectRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IAddCompatibleBuildIdRedirectRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddCompatibleBuildIdRedirectRule message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRule.verify|verify} messages. - * @param message AddCompatibleBuildIdRedirectRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IAddCompatibleBuildIdRedirectRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddCompatibleBuildIdRedirectRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddCompatibleBuildIdRedirectRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRule; - - /** - * Decodes an AddCompatibleBuildIdRedirectRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddCompatibleBuildIdRedirectRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRule; - - /** - * Creates an AddCompatibleBuildIdRedirectRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddCompatibleBuildIdRedirectRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRule; - - /** - * Creates a plain object from an AddCompatibleBuildIdRedirectRule message. Also converts values to other types if specified. - * @param message AddCompatibleBuildIdRedirectRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddCompatibleBuildIdRedirectRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddCompatibleBuildIdRedirectRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReplaceCompatibleBuildIdRedirectRule. */ - interface IReplaceCompatibleBuildIdRedirectRule { - - /** ReplaceCompatibleBuildIdRedirectRule rule */ - rule?: (temporal.api.taskqueue.v1.ICompatibleBuildIdRedirectRule|null); - } - - /** Replaces the routing rule with the given source Build ID. */ - class ReplaceCompatibleBuildIdRedirectRule implements IReplaceCompatibleBuildIdRedirectRule { - - /** - * Constructs a new ReplaceCompatibleBuildIdRedirectRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IReplaceCompatibleBuildIdRedirectRule); - - /** ReplaceCompatibleBuildIdRedirectRule rule. */ - public rule?: (temporal.api.taskqueue.v1.ICompatibleBuildIdRedirectRule|null); - - /** - * Creates a new ReplaceCompatibleBuildIdRedirectRule instance using the specified properties. - * @param [properties] Properties to set - * @returns ReplaceCompatibleBuildIdRedirectRule instance - */ - public static create(properties?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IReplaceCompatibleBuildIdRedirectRule): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRule; - - /** - * Encodes the specified ReplaceCompatibleBuildIdRedirectRule message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRule.verify|verify} messages. - * @param message ReplaceCompatibleBuildIdRedirectRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IReplaceCompatibleBuildIdRedirectRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReplaceCompatibleBuildIdRedirectRule message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRule.verify|verify} messages. - * @param message ReplaceCompatibleBuildIdRedirectRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IReplaceCompatibleBuildIdRedirectRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReplaceCompatibleBuildIdRedirectRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReplaceCompatibleBuildIdRedirectRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRule; - - /** - * Decodes a ReplaceCompatibleBuildIdRedirectRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReplaceCompatibleBuildIdRedirectRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRule; - - /** - * Creates a ReplaceCompatibleBuildIdRedirectRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReplaceCompatibleBuildIdRedirectRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRule; - - /** - * Creates a plain object from a ReplaceCompatibleBuildIdRedirectRule message. Also converts values to other types if specified. - * @param message ReplaceCompatibleBuildIdRedirectRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReplaceCompatibleBuildIdRedirectRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReplaceCompatibleBuildIdRedirectRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteCompatibleBuildIdRedirectRule. */ - interface IDeleteCompatibleBuildIdRedirectRule { - - /** DeleteCompatibleBuildIdRedirectRule sourceBuildId */ - sourceBuildId?: (string|null); - } - - /** Represents a DeleteCompatibleBuildIdRedirectRule. */ - class DeleteCompatibleBuildIdRedirectRule implements IDeleteCompatibleBuildIdRedirectRule { - - /** - * Constructs a new DeleteCompatibleBuildIdRedirectRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IDeleteCompatibleBuildIdRedirectRule); - - /** DeleteCompatibleBuildIdRedirectRule sourceBuildId. */ - public sourceBuildId: string; - - /** - * Creates a new DeleteCompatibleBuildIdRedirectRule instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteCompatibleBuildIdRedirectRule instance - */ - public static create(properties?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IDeleteCompatibleBuildIdRedirectRule): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRule; - - /** - * Encodes the specified DeleteCompatibleBuildIdRedirectRule message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRule.verify|verify} messages. - * @param message DeleteCompatibleBuildIdRedirectRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IDeleteCompatibleBuildIdRedirectRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteCompatibleBuildIdRedirectRule message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRule.verify|verify} messages. - * @param message DeleteCompatibleBuildIdRedirectRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.IDeleteCompatibleBuildIdRedirectRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteCompatibleBuildIdRedirectRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteCompatibleBuildIdRedirectRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRule; - - /** - * Decodes a DeleteCompatibleBuildIdRedirectRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteCompatibleBuildIdRedirectRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRule; - - /** - * Creates a DeleteCompatibleBuildIdRedirectRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteCompatibleBuildIdRedirectRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRule; - - /** - * Creates a plain object from a DeleteCompatibleBuildIdRedirectRule message. Also converts values to other types if specified. - * @param message DeleteCompatibleBuildIdRedirectRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteCompatibleBuildIdRedirectRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteCompatibleBuildIdRedirectRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommitBuildId. */ - interface ICommitBuildId { - - /** CommitBuildId targetBuildId */ - targetBuildId?: (string|null); - - /** - * To prevent committing invalid Build IDs, we reject the request if no - * pollers has been seen recently for this Build ID. Use the `force` - * option to disable this validation. - */ - force?: (boolean|null); - } - - /** - * This command is intended to be used to complete the rollout of a Build - * ID and cleanup unnecessary rules possibly created during a gradual - * rollout. Specifically, this command will make the following changes - * atomically: - * 1. Adds an assignment rule (with full ramp) for the target Build ID at - * the end of the list. - * 2. Removes all previously added assignment rules to the given target - * Build ID (if any). - * 3. Removes any fully-ramped assignment rule for other Build IDs. - */ - class CommitBuildId implements ICommitBuildId { - - /** - * Constructs a new CommitBuildId. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ICommitBuildId); - - /** CommitBuildId targetBuildId. */ - public targetBuildId: string; - - /** - * To prevent committing invalid Build IDs, we reject the request if no - * pollers has been seen recently for this Build ID. Use the `force` - * option to disable this validation. - */ - public force: boolean; - - /** - * Creates a new CommitBuildId instance using the specified properties. - * @param [properties] Properties to set - * @returns CommitBuildId instance - */ - public static create(properties?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ICommitBuildId): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildId; - - /** - * Encodes the specified CommitBuildId message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildId.verify|verify} messages. - * @param message CommitBuildId message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ICommitBuildId, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommitBuildId message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildId.verify|verify} messages. - * @param message CommitBuildId message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ICommitBuildId, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommitBuildId message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommitBuildId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildId; - - /** - * Decodes a CommitBuildId message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommitBuildId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildId; - - /** - * Creates a CommitBuildId message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommitBuildId - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildId; - - /** - * Creates a plain object from a CommitBuildId message. Also converts values to other types if specified. - * @param message CommitBuildId - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildId, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommitBuildId to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommitBuildId - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an UpdateWorkerVersioningRulesResponse. */ - interface IUpdateWorkerVersioningRulesResponse { - - /** UpdateWorkerVersioningRulesResponse assignmentRules */ - assignmentRules?: (temporal.api.taskqueue.v1.ITimestampedBuildIdAssignmentRule[]|null); - - /** UpdateWorkerVersioningRulesResponse compatibleRedirectRules */ - compatibleRedirectRules?: (temporal.api.taskqueue.v1.ITimestampedCompatibleBuildIdRedirectRule[]|null); - - /** - * This value can be passed back to UpdateWorkerVersioningRulesRequest to - * ensure that the rules were not modified between the two updates, which - * could lead to lost updates and other confusion. - */ - conflictToken?: (Uint8Array|null); - } - - /** [cleanup-wv-pre-release] */ - class UpdateWorkerVersioningRulesResponse implements IUpdateWorkerVersioningRulesResponse { - - /** - * Constructs a new UpdateWorkerVersioningRulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateWorkerVersioningRulesResponse); - - /** UpdateWorkerVersioningRulesResponse assignmentRules. */ - public assignmentRules: temporal.api.taskqueue.v1.ITimestampedBuildIdAssignmentRule[]; - - /** UpdateWorkerVersioningRulesResponse compatibleRedirectRules. */ - public compatibleRedirectRules: temporal.api.taskqueue.v1.ITimestampedCompatibleBuildIdRedirectRule[]; - - /** - * This value can be passed back to UpdateWorkerVersioningRulesRequest to - * ensure that the rules were not modified between the two updates, which - * could lead to lost updates and other confusion. - */ - public conflictToken: Uint8Array; - - /** - * Creates a new UpdateWorkerVersioningRulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateWorkerVersioningRulesResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateWorkerVersioningRulesResponse): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesResponse; - - /** - * Encodes the specified UpdateWorkerVersioningRulesResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesResponse.verify|verify} messages. - * @param message UpdateWorkerVersioningRulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateWorkerVersioningRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateWorkerVersioningRulesResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesResponse.verify|verify} messages. - * @param message UpdateWorkerVersioningRulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateWorkerVersioningRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateWorkerVersioningRulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateWorkerVersioningRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesResponse; - - /** - * Decodes an UpdateWorkerVersioningRulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateWorkerVersioningRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesResponse; - - /** - * Creates an UpdateWorkerVersioningRulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateWorkerVersioningRulesResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesResponse; - - /** - * Creates a plain object from an UpdateWorkerVersioningRulesResponse message. Also converts values to other types if specified. - * @param message UpdateWorkerVersioningRulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateWorkerVersioningRulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateWorkerVersioningRulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetWorkerVersioningRulesRequest. */ - interface IGetWorkerVersioningRulesRequest { - - /** GetWorkerVersioningRulesRequest namespace */ - namespace?: (string|null); - - /** GetWorkerVersioningRulesRequest taskQueue */ - taskQueue?: (string|null); - } - - /** [cleanup-wv-pre-release] */ - class GetWorkerVersioningRulesRequest implements IGetWorkerVersioningRulesRequest { - - /** - * Constructs a new GetWorkerVersioningRulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetWorkerVersioningRulesRequest); - - /** GetWorkerVersioningRulesRequest namespace. */ - public namespace: string; - - /** GetWorkerVersioningRulesRequest taskQueue. */ - public taskQueue: string; - - /** - * Creates a new GetWorkerVersioningRulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetWorkerVersioningRulesRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetWorkerVersioningRulesRequest): temporal.api.workflowservice.v1.GetWorkerVersioningRulesRequest; - - /** - * Encodes the specified GetWorkerVersioningRulesRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkerVersioningRulesRequest.verify|verify} messages. - * @param message GetWorkerVersioningRulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetWorkerVersioningRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetWorkerVersioningRulesRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkerVersioningRulesRequest.verify|verify} messages. - * @param message GetWorkerVersioningRulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetWorkerVersioningRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetWorkerVersioningRulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetWorkerVersioningRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetWorkerVersioningRulesRequest; - - /** - * Decodes a GetWorkerVersioningRulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetWorkerVersioningRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetWorkerVersioningRulesRequest; - - /** - * Creates a GetWorkerVersioningRulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetWorkerVersioningRulesRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetWorkerVersioningRulesRequest; - - /** - * Creates a plain object from a GetWorkerVersioningRulesRequest message. Also converts values to other types if specified. - * @param message GetWorkerVersioningRulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetWorkerVersioningRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetWorkerVersioningRulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetWorkerVersioningRulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetWorkerVersioningRulesResponse. */ - interface IGetWorkerVersioningRulesResponse { - - /** GetWorkerVersioningRulesResponse assignmentRules */ - assignmentRules?: (temporal.api.taskqueue.v1.ITimestampedBuildIdAssignmentRule[]|null); - - /** GetWorkerVersioningRulesResponse compatibleRedirectRules */ - compatibleRedirectRules?: (temporal.api.taskqueue.v1.ITimestampedCompatibleBuildIdRedirectRule[]|null); - - /** - * This value can be passed back to UpdateWorkerVersioningRulesRequest to - * ensure that the rules were not modified between this List and the Update, - * which could lead to lost updates and other confusion. - */ - conflictToken?: (Uint8Array|null); - } - - /** [cleanup-wv-pre-release] */ - class GetWorkerVersioningRulesResponse implements IGetWorkerVersioningRulesResponse { - - /** - * Constructs a new GetWorkerVersioningRulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetWorkerVersioningRulesResponse); - - /** GetWorkerVersioningRulesResponse assignmentRules. */ - public assignmentRules: temporal.api.taskqueue.v1.ITimestampedBuildIdAssignmentRule[]; - - /** GetWorkerVersioningRulesResponse compatibleRedirectRules. */ - public compatibleRedirectRules: temporal.api.taskqueue.v1.ITimestampedCompatibleBuildIdRedirectRule[]; - - /** - * This value can be passed back to UpdateWorkerVersioningRulesRequest to - * ensure that the rules were not modified between this List and the Update, - * which could lead to lost updates and other confusion. - */ - public conflictToken: Uint8Array; - - /** - * Creates a new GetWorkerVersioningRulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetWorkerVersioningRulesResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetWorkerVersioningRulesResponse): temporal.api.workflowservice.v1.GetWorkerVersioningRulesResponse; - - /** - * Encodes the specified GetWorkerVersioningRulesResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkerVersioningRulesResponse.verify|verify} messages. - * @param message GetWorkerVersioningRulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetWorkerVersioningRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetWorkerVersioningRulesResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkerVersioningRulesResponse.verify|verify} messages. - * @param message GetWorkerVersioningRulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetWorkerVersioningRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetWorkerVersioningRulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetWorkerVersioningRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetWorkerVersioningRulesResponse; - - /** - * Decodes a GetWorkerVersioningRulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetWorkerVersioningRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetWorkerVersioningRulesResponse; - - /** - * Creates a GetWorkerVersioningRulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetWorkerVersioningRulesResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetWorkerVersioningRulesResponse; - - /** - * Creates a plain object from a GetWorkerVersioningRulesResponse message. Also converts values to other types if specified. - * @param message GetWorkerVersioningRulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetWorkerVersioningRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetWorkerVersioningRulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetWorkerVersioningRulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetWorkerTaskReachabilityRequest. */ - interface IGetWorkerTaskReachabilityRequest { - - /** GetWorkerTaskReachabilityRequest namespace */ - namespace?: (string|null); - - /** - * Build ids to retrieve reachability for. An empty string will be interpreted as an unversioned worker. - * The number of build ids that can be queried in a single API call is limited. - * Open source users can adjust this limit by setting the server's dynamic config value for - * `limit.reachabilityQueryBuildIds` with the caveat that this call can strain the visibility store. - */ - buildIds?: (string[]|null); - - /** - * Task queues to retrieve reachability for. Leave this empty to query for all task queues associated with given - * build ids in the namespace. - * Must specify at least one task queue if querying for an unversioned worker. - * The number of task queues that the server will fetch reachability information for is limited. - * See the `GetWorkerTaskReachabilityResponse` documentation for more information. - */ - taskQueues?: (string[]|null); - - /** - * Type of reachability to query for. - * `TASK_REACHABILITY_NEW_WORKFLOWS` is always returned in the response. - * Use `TASK_REACHABILITY_EXISTING_WORKFLOWS` if your application needs to respond to queries on closed workflows. - * Otherwise, use `TASK_REACHABILITY_OPEN_WORKFLOWS`. Default is `TASK_REACHABILITY_EXISTING_WORKFLOWS` if left - * unspecified. - * See the TaskReachability docstring for information about each enum variant. - */ - reachability?: (temporal.api.enums.v1.TaskReachability|null); - } - - /** - * [cleanup-wv-pre-release] - * Deprecated. Use `DescribeTaskQueue`. - */ - class GetWorkerTaskReachabilityRequest implements IGetWorkerTaskReachabilityRequest { - - /** - * Constructs a new GetWorkerTaskReachabilityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetWorkerTaskReachabilityRequest); - - /** GetWorkerTaskReachabilityRequest namespace. */ - public namespace: string; - - /** - * Build ids to retrieve reachability for. An empty string will be interpreted as an unversioned worker. - * The number of build ids that can be queried in a single API call is limited. - * Open source users can adjust this limit by setting the server's dynamic config value for - * `limit.reachabilityQueryBuildIds` with the caveat that this call can strain the visibility store. - */ - public buildIds: string[]; - - /** - * Task queues to retrieve reachability for. Leave this empty to query for all task queues associated with given - * build ids in the namespace. - * Must specify at least one task queue if querying for an unversioned worker. - * The number of task queues that the server will fetch reachability information for is limited. - * See the `GetWorkerTaskReachabilityResponse` documentation for more information. - */ - public taskQueues: string[]; - - /** - * Type of reachability to query for. - * `TASK_REACHABILITY_NEW_WORKFLOWS` is always returned in the response. - * Use `TASK_REACHABILITY_EXISTING_WORKFLOWS` if your application needs to respond to queries on closed workflows. - * Otherwise, use `TASK_REACHABILITY_OPEN_WORKFLOWS`. Default is `TASK_REACHABILITY_EXISTING_WORKFLOWS` if left - * unspecified. - * See the TaskReachability docstring for information about each enum variant. - */ - public reachability: temporal.api.enums.v1.TaskReachability; - - /** - * Creates a new GetWorkerTaskReachabilityRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetWorkerTaskReachabilityRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetWorkerTaskReachabilityRequest): temporal.api.workflowservice.v1.GetWorkerTaskReachabilityRequest; - - /** - * Encodes the specified GetWorkerTaskReachabilityRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkerTaskReachabilityRequest.verify|verify} messages. - * @param message GetWorkerTaskReachabilityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetWorkerTaskReachabilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetWorkerTaskReachabilityRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkerTaskReachabilityRequest.verify|verify} messages. - * @param message GetWorkerTaskReachabilityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetWorkerTaskReachabilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetWorkerTaskReachabilityRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetWorkerTaskReachabilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetWorkerTaskReachabilityRequest; - - /** - * Decodes a GetWorkerTaskReachabilityRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetWorkerTaskReachabilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetWorkerTaskReachabilityRequest; - - /** - * Creates a GetWorkerTaskReachabilityRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetWorkerTaskReachabilityRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetWorkerTaskReachabilityRequest; - - /** - * Creates a plain object from a GetWorkerTaskReachabilityRequest message. Also converts values to other types if specified. - * @param message GetWorkerTaskReachabilityRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetWorkerTaskReachabilityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetWorkerTaskReachabilityRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetWorkerTaskReachabilityRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetWorkerTaskReachabilityResponse. */ - interface IGetWorkerTaskReachabilityResponse { - - /** - * Task reachability, broken down by build id and then task queue. - * When requesting a large number of task queues or all task queues associated with the given build ids in a - * namespace, all task queues will be listed in the response but some of them may not contain reachability - * information due to a server enforced limit. When reaching the limit, task queues that reachability information - * could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue - * another call to get the reachability for those task queues. - * - * Open source users can adjust this limit by setting the server's dynamic config value for - * `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. - */ - buildIdReachability?: (temporal.api.taskqueue.v1.IBuildIdReachability[]|null); - } - - /** - * [cleanup-wv-pre-release] - * Deprecated. Use `DescribeTaskQueue`. - */ - class GetWorkerTaskReachabilityResponse implements IGetWorkerTaskReachabilityResponse { - - /** - * Constructs a new GetWorkerTaskReachabilityResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetWorkerTaskReachabilityResponse); - - /** - * Task reachability, broken down by build id and then task queue. - * When requesting a large number of task queues or all task queues associated with the given build ids in a - * namespace, all task queues will be listed in the response but some of them may not contain reachability - * information due to a server enforced limit. When reaching the limit, task queues that reachability information - * could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue - * another call to get the reachability for those task queues. - * - * Open source users can adjust this limit by setting the server's dynamic config value for - * `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. - */ - public buildIdReachability: temporal.api.taskqueue.v1.IBuildIdReachability[]; - - /** - * Creates a new GetWorkerTaskReachabilityResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetWorkerTaskReachabilityResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetWorkerTaskReachabilityResponse): temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse; - - /** - * Encodes the specified GetWorkerTaskReachabilityResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse.verify|verify} messages. - * @param message GetWorkerTaskReachabilityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetWorkerTaskReachabilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetWorkerTaskReachabilityResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse.verify|verify} messages. - * @param message GetWorkerTaskReachabilityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetWorkerTaskReachabilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetWorkerTaskReachabilityResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetWorkerTaskReachabilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse; - - /** - * Decodes a GetWorkerTaskReachabilityResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetWorkerTaskReachabilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse; - - /** - * Creates a GetWorkerTaskReachabilityResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetWorkerTaskReachabilityResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse; - - /** - * Creates a plain object from a GetWorkerTaskReachabilityResponse message. Also converts values to other types if specified. - * @param message GetWorkerTaskReachabilityResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetWorkerTaskReachabilityResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetWorkerTaskReachabilityResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateWorkflowExecutionRequest. */ - interface IUpdateWorkflowExecutionRequest { - - /** The namespace name of the target Workflow. */ - namespace?: (string|null); - - /** - * The target Workflow Id and (optionally) a specific Run Id thereof. - * (-- api-linter: core::0203::optional=disabled - * aip.dev/not-precedent: false positive triggered by the word "optional" --) - */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * If set, this call will error if the most recent (if no Run Id is set on - * `workflow_execution`), or specified (if it is) Workflow Execution is not - * part of the same execution chain as this Id. - */ - firstExecutionRunId?: (string|null); - - /** - * Specifies client's intent to wait for Update results. - * NOTE: This field works together with API call timeout which is limited by - * server timeout (maximum wait time). If server timeout is expired before - * user specified timeout, API call returns even if specified stage is not reached. - * Actual reached stage will be included in the response. - */ - waitPolicy?: (temporal.api.update.v1.IWaitPolicy|null); - - /** - * The request information that will be delivered all the way down to the - * Workflow Execution. - */ - request?: (temporal.api.update.v1.IRequest|null); - } - - /** - * (-- api-linter: core::0134=disabled - * aip.dev/not-precedent: Update RPCs don't follow Google API format. --) - */ - class UpdateWorkflowExecutionRequest implements IUpdateWorkflowExecutionRequest { - - /** - * Constructs a new UpdateWorkflowExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionRequest); - - /** The namespace name of the target Workflow. */ - public namespace: string; - - /** - * The target Workflow Id and (optionally) a specific Run Id thereof. - * (-- api-linter: core::0203::optional=disabled - * aip.dev/not-precedent: false positive triggered by the word "optional" --) - */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * If set, this call will error if the most recent (if no Run Id is set on - * `workflow_execution`), or specified (if it is) Workflow Execution is not - * part of the same execution chain as this Id. - */ - public firstExecutionRunId: string; - - /** - * Specifies client's intent to wait for Update results. - * NOTE: This field works together with API call timeout which is limited by - * server timeout (maximum wait time). If server timeout is expired before - * user specified timeout, API call returns even if specified stage is not reached. - * Actual reached stage will be included in the response. - */ - public waitPolicy?: (temporal.api.update.v1.IWaitPolicy|null); - - /** - * The request information that will be delivered all the way down to the - * Workflow Execution. - */ - public request?: (temporal.api.update.v1.IRequest|null); - - /** - * Creates a new UpdateWorkflowExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateWorkflowExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionRequest): temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest; - - /** - * Encodes the specified UpdateWorkflowExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest.verify|verify} messages. - * @param message UpdateWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateWorkflowExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest.verify|verify} messages. - * @param message UpdateWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateWorkflowExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest; - - /** - * Decodes an UpdateWorkflowExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest; - - /** - * Creates an UpdateWorkflowExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateWorkflowExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest; - - /** - * Creates a plain object from an UpdateWorkflowExecutionRequest message. Also converts values to other types if specified. - * @param message UpdateWorkflowExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateWorkflowExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateWorkflowExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateWorkflowExecutionResponse. */ - interface IUpdateWorkflowExecutionResponse { - - /** Enough information for subsequent poll calls if needed. Never null. */ - updateRef?: (temporal.api.update.v1.IUpdateRef|null); - - /** - * The outcome of the Update if and only if the Workflow Update - * has completed. If this response is being returned before the Update has - * completed then this field will not be set. - */ - outcome?: (temporal.api.update.v1.IOutcome|null); - - /** - * The most advanced lifecycle stage that the Update is known to have - * reached, where lifecycle stages are ordered - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED < - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED < - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED < - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED. - * UNSPECIFIED will be returned if and only if the server's maximum wait - * time was reached before the Update reached the stage specified in the - * request WaitPolicy, and before the context deadline expired; clients may - * may then retry the call as needed. - */ - stage?: (temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage|null); - } - - /** Represents an UpdateWorkflowExecutionResponse. */ - class UpdateWorkflowExecutionResponse implements IUpdateWorkflowExecutionResponse { - - /** - * Constructs a new UpdateWorkflowExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionResponse); - - /** Enough information for subsequent poll calls if needed. Never null. */ - public updateRef?: (temporal.api.update.v1.IUpdateRef|null); - - /** - * The outcome of the Update if and only if the Workflow Update - * has completed. If this response is being returned before the Update has - * completed then this field will not be set. - */ - public outcome?: (temporal.api.update.v1.IOutcome|null); - - /** - * The most advanced lifecycle stage that the Update is known to have - * reached, where lifecycle stages are ordered - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED < - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED < - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED < - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED. - * UNSPECIFIED will be returned if and only if the server's maximum wait - * time was reached before the Update reached the stage specified in the - * request WaitPolicy, and before the context deadline expired; clients may - * may then retry the call as needed. - */ - public stage: temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage; - - /** - * Creates a new UpdateWorkflowExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateWorkflowExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionResponse): temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse; - - /** - * Encodes the specified UpdateWorkflowExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse.verify|verify} messages. - * @param message UpdateWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateWorkflowExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse.verify|verify} messages. - * @param message UpdateWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateWorkflowExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse; - - /** - * Decodes an UpdateWorkflowExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse; - - /** - * Creates an UpdateWorkflowExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateWorkflowExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse; - - /** - * Creates a plain object from an UpdateWorkflowExecutionResponse message. Also converts values to other types if specified. - * @param message UpdateWorkflowExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateWorkflowExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateWorkflowExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartBatchOperationRequest. */ - interface IStartBatchOperationRequest { - - /** Namespace that contains the batch operation */ - namespace?: (string|null); - - /** - * Visibility query defines the the group of workflow to apply the batch operation - * This field and `executions` are mutually exclusive - */ - visibilityQuery?: (string|null); - - /** Job ID defines the unique ID for the batch job */ - jobId?: (string|null); - - /** Reason to perform the batch operation */ - reason?: (string|null); - - /** - * Executions to apply the batch operation - * This field and `visibility_query` are mutually exclusive - */ - executions?: (temporal.api.common.v1.IWorkflowExecution[]|null); - - /** - * Limit for the number of operations processed per second within this batch. - * Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system - * overload and minimize potential delays in executing ongoing tasks for user workers. - * Note that when no explicit limit is provided, the server will operate according to its limit defined by the - * dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the - * server's configured limit. - */ - maxOperationsPerSecond?: (number|null); - - /** StartBatchOperationRequest terminationOperation */ - terminationOperation?: (temporal.api.batch.v1.IBatchOperationTermination|null); - - /** StartBatchOperationRequest signalOperation */ - signalOperation?: (temporal.api.batch.v1.IBatchOperationSignal|null); - - /** StartBatchOperationRequest cancellationOperation */ - cancellationOperation?: (temporal.api.batch.v1.IBatchOperationCancellation|null); - - /** StartBatchOperationRequest deletionOperation */ - deletionOperation?: (temporal.api.batch.v1.IBatchOperationDeletion|null); - - /** StartBatchOperationRequest resetOperation */ - resetOperation?: (temporal.api.batch.v1.IBatchOperationReset|null); - - /** StartBatchOperationRequest updateWorkflowOptionsOperation */ - updateWorkflowOptionsOperation?: (temporal.api.batch.v1.IBatchOperationUpdateWorkflowExecutionOptions|null); - - /** StartBatchOperationRequest unpauseActivitiesOperation */ - unpauseActivitiesOperation?: (temporal.api.batch.v1.IBatchOperationUnpauseActivities|null); - - /** StartBatchOperationRequest resetActivitiesOperation */ - resetActivitiesOperation?: (temporal.api.batch.v1.IBatchOperationResetActivities|null); - - /** StartBatchOperationRequest updateActivityOptionsOperation */ - updateActivityOptionsOperation?: (temporal.api.batch.v1.IBatchOperationUpdateActivityOptions|null); - } - - /** Represents a StartBatchOperationRequest. */ - class StartBatchOperationRequest implements IStartBatchOperationRequest { - - /** - * Constructs a new StartBatchOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IStartBatchOperationRequest); - - /** Namespace that contains the batch operation */ - public namespace: string; - - /** - * Visibility query defines the the group of workflow to apply the batch operation - * This field and `executions` are mutually exclusive - */ - public visibilityQuery: string; - - /** Job ID defines the unique ID for the batch job */ - public jobId: string; - - /** Reason to perform the batch operation */ - public reason: string; - - /** - * Executions to apply the batch operation - * This field and `visibility_query` are mutually exclusive - */ - public executions: temporal.api.common.v1.IWorkflowExecution[]; - - /** - * Limit for the number of operations processed per second within this batch. - * Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system - * overload and minimize potential delays in executing ongoing tasks for user workers. - * Note that when no explicit limit is provided, the server will operate according to its limit defined by the - * dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the - * server's configured limit. - */ - public maxOperationsPerSecond: number; - - /** StartBatchOperationRequest terminationOperation. */ - public terminationOperation?: (temporal.api.batch.v1.IBatchOperationTermination|null); - - /** StartBatchOperationRequest signalOperation. */ - public signalOperation?: (temporal.api.batch.v1.IBatchOperationSignal|null); - - /** StartBatchOperationRequest cancellationOperation. */ - public cancellationOperation?: (temporal.api.batch.v1.IBatchOperationCancellation|null); - - /** StartBatchOperationRequest deletionOperation. */ - public deletionOperation?: (temporal.api.batch.v1.IBatchOperationDeletion|null); - - /** StartBatchOperationRequest resetOperation. */ - public resetOperation?: (temporal.api.batch.v1.IBatchOperationReset|null); - - /** StartBatchOperationRequest updateWorkflowOptionsOperation. */ - public updateWorkflowOptionsOperation?: (temporal.api.batch.v1.IBatchOperationUpdateWorkflowExecutionOptions|null); - - /** StartBatchOperationRequest unpauseActivitiesOperation. */ - public unpauseActivitiesOperation?: (temporal.api.batch.v1.IBatchOperationUnpauseActivities|null); - - /** StartBatchOperationRequest resetActivitiesOperation. */ - public resetActivitiesOperation?: (temporal.api.batch.v1.IBatchOperationResetActivities|null); - - /** StartBatchOperationRequest updateActivityOptionsOperation. */ - public updateActivityOptionsOperation?: (temporal.api.batch.v1.IBatchOperationUpdateActivityOptions|null); - - /** Operation input */ - public operation?: ("terminationOperation"|"signalOperation"|"cancellationOperation"|"deletionOperation"|"resetOperation"|"updateWorkflowOptionsOperation"|"unpauseActivitiesOperation"|"resetActivitiesOperation"|"updateActivityOptionsOperation"); - - /** - * Creates a new StartBatchOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StartBatchOperationRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IStartBatchOperationRequest): temporal.api.workflowservice.v1.StartBatchOperationRequest; - - /** - * Encodes the specified StartBatchOperationRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.StartBatchOperationRequest.verify|verify} messages. - * @param message StartBatchOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IStartBatchOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartBatchOperationRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.StartBatchOperationRequest.verify|verify} messages. - * @param message StartBatchOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IStartBatchOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartBatchOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartBatchOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.StartBatchOperationRequest; - - /** - * Decodes a StartBatchOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartBatchOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.StartBatchOperationRequest; - - /** - * Creates a StartBatchOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartBatchOperationRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.StartBatchOperationRequest; - - /** - * Creates a plain object from a StartBatchOperationRequest message. Also converts values to other types if specified. - * @param message StartBatchOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.StartBatchOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartBatchOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartBatchOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartBatchOperationResponse. */ - interface IStartBatchOperationResponse { - } - - /** Represents a StartBatchOperationResponse. */ - class StartBatchOperationResponse implements IStartBatchOperationResponse { - - /** - * Constructs a new StartBatchOperationResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IStartBatchOperationResponse); - - /** - * Creates a new StartBatchOperationResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StartBatchOperationResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IStartBatchOperationResponse): temporal.api.workflowservice.v1.StartBatchOperationResponse; - - /** - * Encodes the specified StartBatchOperationResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.StartBatchOperationResponse.verify|verify} messages. - * @param message StartBatchOperationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IStartBatchOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartBatchOperationResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.StartBatchOperationResponse.verify|verify} messages. - * @param message StartBatchOperationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IStartBatchOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartBatchOperationResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartBatchOperationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.StartBatchOperationResponse; - - /** - * Decodes a StartBatchOperationResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartBatchOperationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.StartBatchOperationResponse; - - /** - * Creates a StartBatchOperationResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartBatchOperationResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.StartBatchOperationResponse; - - /** - * Creates a plain object from a StartBatchOperationResponse message. Also converts values to other types if specified. - * @param message StartBatchOperationResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.StartBatchOperationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartBatchOperationResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartBatchOperationResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StopBatchOperationRequest. */ - interface IStopBatchOperationRequest { - - /** Namespace that contains the batch operation */ - namespace?: (string|null); - - /** Batch job id */ - jobId?: (string|null); - - /** Reason to stop a batch operation */ - reason?: (string|null); - - /** Identity of the operator */ - identity?: (string|null); - } - - /** Represents a StopBatchOperationRequest. */ - class StopBatchOperationRequest implements IStopBatchOperationRequest { - - /** - * Constructs a new StopBatchOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IStopBatchOperationRequest); - - /** Namespace that contains the batch operation */ - public namespace: string; - - /** Batch job id */ - public jobId: string; - - /** Reason to stop a batch operation */ - public reason: string; - - /** Identity of the operator */ - public identity: string; - - /** - * Creates a new StopBatchOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StopBatchOperationRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IStopBatchOperationRequest): temporal.api.workflowservice.v1.StopBatchOperationRequest; - - /** - * Encodes the specified StopBatchOperationRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.StopBatchOperationRequest.verify|verify} messages. - * @param message StopBatchOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IStopBatchOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopBatchOperationRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.StopBatchOperationRequest.verify|verify} messages. - * @param message StopBatchOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IStopBatchOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopBatchOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopBatchOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.StopBatchOperationRequest; - - /** - * Decodes a StopBatchOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopBatchOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.StopBatchOperationRequest; - - /** - * Creates a StopBatchOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopBatchOperationRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.StopBatchOperationRequest; - - /** - * Creates a plain object from a StopBatchOperationRequest message. Also converts values to other types if specified. - * @param message StopBatchOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.StopBatchOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopBatchOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StopBatchOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StopBatchOperationResponse. */ - interface IStopBatchOperationResponse { - } - - /** Represents a StopBatchOperationResponse. */ - class StopBatchOperationResponse implements IStopBatchOperationResponse { - - /** - * Constructs a new StopBatchOperationResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IStopBatchOperationResponse); - - /** - * Creates a new StopBatchOperationResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StopBatchOperationResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IStopBatchOperationResponse): temporal.api.workflowservice.v1.StopBatchOperationResponse; - - /** - * Encodes the specified StopBatchOperationResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.StopBatchOperationResponse.verify|verify} messages. - * @param message StopBatchOperationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IStopBatchOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopBatchOperationResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.StopBatchOperationResponse.verify|verify} messages. - * @param message StopBatchOperationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IStopBatchOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopBatchOperationResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopBatchOperationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.StopBatchOperationResponse; - - /** - * Decodes a StopBatchOperationResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopBatchOperationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.StopBatchOperationResponse; - - /** - * Creates a StopBatchOperationResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopBatchOperationResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.StopBatchOperationResponse; - - /** - * Creates a plain object from a StopBatchOperationResponse message. Also converts values to other types if specified. - * @param message StopBatchOperationResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.StopBatchOperationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopBatchOperationResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StopBatchOperationResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeBatchOperationRequest. */ - interface IDescribeBatchOperationRequest { - - /** Namespace that contains the batch operation */ - namespace?: (string|null); - - /** Batch job id */ - jobId?: (string|null); - } - - /** Represents a DescribeBatchOperationRequest. */ - class DescribeBatchOperationRequest implements IDescribeBatchOperationRequest { - - /** - * Constructs a new DescribeBatchOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeBatchOperationRequest); - - /** Namespace that contains the batch operation */ - public namespace: string; - - /** Batch job id */ - public jobId: string; - - /** - * Creates a new DescribeBatchOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeBatchOperationRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeBatchOperationRequest): temporal.api.workflowservice.v1.DescribeBatchOperationRequest; - - /** - * Encodes the specified DescribeBatchOperationRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeBatchOperationRequest.verify|verify} messages. - * @param message DescribeBatchOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeBatchOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeBatchOperationRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeBatchOperationRequest.verify|verify} messages. - * @param message DescribeBatchOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeBatchOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeBatchOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeBatchOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeBatchOperationRequest; - - /** - * Decodes a DescribeBatchOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeBatchOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeBatchOperationRequest; - - /** - * Creates a DescribeBatchOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeBatchOperationRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeBatchOperationRequest; - - /** - * Creates a plain object from a DescribeBatchOperationRequest message. Also converts values to other types if specified. - * @param message DescribeBatchOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeBatchOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeBatchOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeBatchOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeBatchOperationResponse. */ - interface IDescribeBatchOperationResponse { - - /** Batch operation type */ - operationType?: (temporal.api.enums.v1.BatchOperationType|null); - - /** Batch job ID */ - jobId?: (string|null); - - /** Batch operation state */ - state?: (temporal.api.enums.v1.BatchOperationState|null); - - /** Batch operation start time */ - startTime?: (google.protobuf.ITimestamp|null); - - /** Batch operation close time */ - closeTime?: (google.protobuf.ITimestamp|null); - - /** Total operation count */ - totalOperationCount?: (Long|null); - - /** Complete operation count */ - completeOperationCount?: (Long|null); - - /** Failure operation count */ - failureOperationCount?: (Long|null); - - /** Identity indicates the operator identity */ - identity?: (string|null); - - /** Reason indicates the reason to stop a operation */ - reason?: (string|null); - } - - /** Represents a DescribeBatchOperationResponse. */ - class DescribeBatchOperationResponse implements IDescribeBatchOperationResponse { - - /** - * Constructs a new DescribeBatchOperationResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeBatchOperationResponse); - - /** Batch operation type */ - public operationType: temporal.api.enums.v1.BatchOperationType; - - /** Batch job ID */ - public jobId: string; - - /** Batch operation state */ - public state: temporal.api.enums.v1.BatchOperationState; - - /** Batch operation start time */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** Batch operation close time */ - public closeTime?: (google.protobuf.ITimestamp|null); - - /** Total operation count */ - public totalOperationCount: Long; - - /** Complete operation count */ - public completeOperationCount: Long; - - /** Failure operation count */ - public failureOperationCount: Long; - - /** Identity indicates the operator identity */ - public identity: string; - - /** Reason indicates the reason to stop a operation */ - public reason: string; - - /** - * Creates a new DescribeBatchOperationResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeBatchOperationResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeBatchOperationResponse): temporal.api.workflowservice.v1.DescribeBatchOperationResponse; - - /** - * Encodes the specified DescribeBatchOperationResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeBatchOperationResponse.verify|verify} messages. - * @param message DescribeBatchOperationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeBatchOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeBatchOperationResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeBatchOperationResponse.verify|verify} messages. - * @param message DescribeBatchOperationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeBatchOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeBatchOperationResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeBatchOperationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeBatchOperationResponse; - - /** - * Decodes a DescribeBatchOperationResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeBatchOperationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeBatchOperationResponse; - - /** - * Creates a DescribeBatchOperationResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeBatchOperationResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeBatchOperationResponse; - - /** - * Creates a plain object from a DescribeBatchOperationResponse message. Also converts values to other types if specified. - * @param message DescribeBatchOperationResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeBatchOperationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeBatchOperationResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeBatchOperationResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBatchOperationsRequest. */ - interface IListBatchOperationsRequest { - - /** Namespace that contains the batch operation */ - namespace?: (string|null); - - /** List page size */ - pageSize?: (number|null); - - /** Next page token */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListBatchOperationsRequest. */ - class ListBatchOperationsRequest implements IListBatchOperationsRequest { - - /** - * Constructs a new ListBatchOperationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListBatchOperationsRequest); - - /** Namespace that contains the batch operation */ - public namespace: string; - - /** List page size */ - public pageSize: number; - - /** Next page token */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListBatchOperationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBatchOperationsRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListBatchOperationsRequest): temporal.api.workflowservice.v1.ListBatchOperationsRequest; - - /** - * Encodes the specified ListBatchOperationsRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ListBatchOperationsRequest.verify|verify} messages. - * @param message ListBatchOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListBatchOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBatchOperationsRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListBatchOperationsRequest.verify|verify} messages. - * @param message ListBatchOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListBatchOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBatchOperationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBatchOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListBatchOperationsRequest; - - /** - * Decodes a ListBatchOperationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBatchOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListBatchOperationsRequest; - - /** - * Creates a ListBatchOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBatchOperationsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListBatchOperationsRequest; - - /** - * Creates a plain object from a ListBatchOperationsRequest message. Also converts values to other types if specified. - * @param message ListBatchOperationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListBatchOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBatchOperationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBatchOperationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBatchOperationsResponse. */ - interface IListBatchOperationsResponse { - - /** BatchOperationInfo contains the basic info about batch operation */ - operationInfo?: (temporal.api.batch.v1.IBatchOperationInfo[]|null); - - /** ListBatchOperationsResponse nextPageToken */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListBatchOperationsResponse. */ - class ListBatchOperationsResponse implements IListBatchOperationsResponse { - - /** - * Constructs a new ListBatchOperationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListBatchOperationsResponse); - - /** BatchOperationInfo contains the basic info about batch operation */ - public operationInfo: temporal.api.batch.v1.IBatchOperationInfo[]; - - /** ListBatchOperationsResponse nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListBatchOperationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBatchOperationsResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListBatchOperationsResponse): temporal.api.workflowservice.v1.ListBatchOperationsResponse; - - /** - * Encodes the specified ListBatchOperationsResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ListBatchOperationsResponse.verify|verify} messages. - * @param message ListBatchOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListBatchOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBatchOperationsResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListBatchOperationsResponse.verify|verify} messages. - * @param message ListBatchOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListBatchOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBatchOperationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBatchOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListBatchOperationsResponse; - - /** - * Decodes a ListBatchOperationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBatchOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListBatchOperationsResponse; - - /** - * Creates a ListBatchOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBatchOperationsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListBatchOperationsResponse; - - /** - * Creates a plain object from a ListBatchOperationsResponse message. Also converts values to other types if specified. - * @param message ListBatchOperationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListBatchOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBatchOperationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBatchOperationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollWorkflowExecutionUpdateRequest. */ - interface IPollWorkflowExecutionUpdateRequest { - - /** - * The namespace of the Workflow Execution to which the Update was - * originally issued. - */ - namespace?: (string|null); - - /** The Update reference returned in the initial UpdateWorkflowExecutionResponse. */ - updateRef?: (temporal.api.update.v1.IUpdateRef|null); - - /** The identity of the worker/client who is polling this Update outcome. */ - identity?: (string|null); - - /** - * Specifies client's intent to wait for Update results. - * Omit to request a non-blocking poll. - */ - waitPolicy?: (temporal.api.update.v1.IWaitPolicy|null); - } - - /** Represents a PollWorkflowExecutionUpdateRequest. */ - class PollWorkflowExecutionUpdateRequest implements IPollWorkflowExecutionUpdateRequest { - - /** - * Constructs a new PollWorkflowExecutionUpdateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPollWorkflowExecutionUpdateRequest); - - /** - * The namespace of the Workflow Execution to which the Update was - * originally issued. - */ - public namespace: string; - - /** The Update reference returned in the initial UpdateWorkflowExecutionResponse. */ - public updateRef?: (temporal.api.update.v1.IUpdateRef|null); - - /** The identity of the worker/client who is polling this Update outcome. */ - public identity: string; - - /** - * Specifies client's intent to wait for Update results. - * Omit to request a non-blocking poll. - */ - public waitPolicy?: (temporal.api.update.v1.IWaitPolicy|null); - - /** - * Creates a new PollWorkflowExecutionUpdateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PollWorkflowExecutionUpdateRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPollWorkflowExecutionUpdateRequest): temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest; - - /** - * Encodes the specified PollWorkflowExecutionUpdateRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest.verify|verify} messages. - * @param message PollWorkflowExecutionUpdateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPollWorkflowExecutionUpdateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollWorkflowExecutionUpdateRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest.verify|verify} messages. - * @param message PollWorkflowExecutionUpdateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPollWorkflowExecutionUpdateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollWorkflowExecutionUpdateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollWorkflowExecutionUpdateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest; - - /** - * Decodes a PollWorkflowExecutionUpdateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollWorkflowExecutionUpdateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest; - - /** - * Creates a PollWorkflowExecutionUpdateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollWorkflowExecutionUpdateRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest; - - /** - * Creates a plain object from a PollWorkflowExecutionUpdateRequest message. Also converts values to other types if specified. - * @param message PollWorkflowExecutionUpdateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollWorkflowExecutionUpdateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollWorkflowExecutionUpdateRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollWorkflowExecutionUpdateResponse. */ - interface IPollWorkflowExecutionUpdateResponse { - - /** - * The outcome of the update if and only if the update has completed. If - * this response is being returned before the update has completed (e.g. due - * to the specification of a wait policy that only waits on - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED) then this field will - * not be set. - */ - outcome?: (temporal.api.update.v1.IOutcome|null); - - /** - * The most advanced lifecycle stage that the Update is known to have - * reached, where lifecycle stages are ordered - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED < - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED < - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED < - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED. - * UNSPECIFIED will be returned if and only if the server's maximum wait - * time was reached before the Update reached the stage specified in the - * request WaitPolicy, and before the context deadline expired; clients may - * may then retry the call as needed. - */ - stage?: (temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage|null); - - /** Sufficient information to address this Update. */ - updateRef?: (temporal.api.update.v1.IUpdateRef|null); - } - - /** Represents a PollWorkflowExecutionUpdateResponse. */ - class PollWorkflowExecutionUpdateResponse implements IPollWorkflowExecutionUpdateResponse { - - /** - * Constructs a new PollWorkflowExecutionUpdateResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPollWorkflowExecutionUpdateResponse); - - /** - * The outcome of the update if and only if the update has completed. If - * this response is being returned before the update has completed (e.g. due - * to the specification of a wait policy that only waits on - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED) then this field will - * not be set. - */ - public outcome?: (temporal.api.update.v1.IOutcome|null); - - /** - * The most advanced lifecycle stage that the Update is known to have - * reached, where lifecycle stages are ordered - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED < - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED < - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED < - * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED. - * UNSPECIFIED will be returned if and only if the server's maximum wait - * time was reached before the Update reached the stage specified in the - * request WaitPolicy, and before the context deadline expired; clients may - * may then retry the call as needed. - */ - public stage: temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage; - - /** Sufficient information to address this Update. */ - public updateRef?: (temporal.api.update.v1.IUpdateRef|null); - - /** - * Creates a new PollWorkflowExecutionUpdateResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PollWorkflowExecutionUpdateResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPollWorkflowExecutionUpdateResponse): temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse; - - /** - * Encodes the specified PollWorkflowExecutionUpdateResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse.verify|verify} messages. - * @param message PollWorkflowExecutionUpdateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPollWorkflowExecutionUpdateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollWorkflowExecutionUpdateResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse.verify|verify} messages. - * @param message PollWorkflowExecutionUpdateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPollWorkflowExecutionUpdateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollWorkflowExecutionUpdateResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollWorkflowExecutionUpdateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse; - - /** - * Decodes a PollWorkflowExecutionUpdateResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollWorkflowExecutionUpdateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse; - - /** - * Creates a PollWorkflowExecutionUpdateResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollWorkflowExecutionUpdateResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse; - - /** - * Creates a plain object from a PollWorkflowExecutionUpdateResponse message. Also converts values to other types if specified. - * @param message PollWorkflowExecutionUpdateResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollWorkflowExecutionUpdateResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollWorkflowExecutionUpdateResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollNexusTaskQueueRequest. */ - interface IPollNexusTaskQueueRequest { - - /** PollNexusTaskQueueRequest namespace */ - namespace?: (string|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - - /** - * A unique key for this worker instance, used for tracking worker lifecycle. - * This is guaranteed to be unique, whereas identity is not guaranteed to be unique. - */ - workerInstanceKey?: (string|null); - - /** PollNexusTaskQueueRequest taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** - * Information about this worker's build identifier and if it is choosing to use the versioning - * feature. See the `WorkerVersionCapabilities` docstring for more. - * Deprecated. Replaced by deployment_options. - */ - workerVersionCapabilities?: (temporal.api.common.v1.IWorkerVersionCapabilities|null); - - /** Worker deployment options that user has set in the worker. */ - deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - - /** Worker info to be sent to the server. */ - workerHeartbeat?: (temporal.api.worker.v1.IWorkerHeartbeat[]|null); - } - - /** Represents a PollNexusTaskQueueRequest. */ - class PollNexusTaskQueueRequest implements IPollNexusTaskQueueRequest { - - /** - * Constructs a new PollNexusTaskQueueRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPollNexusTaskQueueRequest); - - /** PollNexusTaskQueueRequest namespace. */ - public namespace: string; - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** - * A unique key for this worker instance, used for tracking worker lifecycle. - * This is guaranteed to be unique, whereas identity is not guaranteed to be unique. - */ - public workerInstanceKey: string; - - /** PollNexusTaskQueueRequest taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** - * Information about this worker's build identifier and if it is choosing to use the versioning - * feature. See the `WorkerVersionCapabilities` docstring for more. - * Deprecated. Replaced by deployment_options. - */ - public workerVersionCapabilities?: (temporal.api.common.v1.IWorkerVersionCapabilities|null); - - /** Worker deployment options that user has set in the worker. */ - public deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - - /** Worker info to be sent to the server. */ - public workerHeartbeat: temporal.api.worker.v1.IWorkerHeartbeat[]; - - /** - * Creates a new PollNexusTaskQueueRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PollNexusTaskQueueRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPollNexusTaskQueueRequest): temporal.api.workflowservice.v1.PollNexusTaskQueueRequest; - - /** - * Encodes the specified PollNexusTaskQueueRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.PollNexusTaskQueueRequest.verify|verify} messages. - * @param message PollNexusTaskQueueRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPollNexusTaskQueueRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollNexusTaskQueueRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PollNexusTaskQueueRequest.verify|verify} messages. - * @param message PollNexusTaskQueueRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPollNexusTaskQueueRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollNexusTaskQueueRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollNexusTaskQueueRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PollNexusTaskQueueRequest; - - /** - * Decodes a PollNexusTaskQueueRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollNexusTaskQueueRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PollNexusTaskQueueRequest; - - /** - * Creates a PollNexusTaskQueueRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollNexusTaskQueueRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PollNexusTaskQueueRequest; - - /** - * Creates a plain object from a PollNexusTaskQueueRequest message. Also converts values to other types if specified. - * @param message PollNexusTaskQueueRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PollNexusTaskQueueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollNexusTaskQueueRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollNexusTaskQueueRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollNexusTaskQueueResponse. */ - interface IPollNexusTaskQueueResponse { - - /** An opaque unique identifier for this task for correlating a completion request the embedded request. */ - taskToken?: (Uint8Array|null); - - /** Embedded request as translated from the incoming frontend request. */ - request?: (temporal.api.nexus.v1.IRequest|null); - - /** Server-advised information the SDK may use to adjust its poller count. */ - pollerScalingDecision?: (temporal.api.taskqueue.v1.IPollerScalingDecision|null); - } - - /** Represents a PollNexusTaskQueueResponse. */ - class PollNexusTaskQueueResponse implements IPollNexusTaskQueueResponse { - - /** - * Constructs a new PollNexusTaskQueueResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPollNexusTaskQueueResponse); - - /** An opaque unique identifier for this task for correlating a completion request the embedded request. */ - public taskToken: Uint8Array; - - /** Embedded request as translated from the incoming frontend request. */ - public request?: (temporal.api.nexus.v1.IRequest|null); - - /** Server-advised information the SDK may use to adjust its poller count. */ - public pollerScalingDecision?: (temporal.api.taskqueue.v1.IPollerScalingDecision|null); - - /** - * Creates a new PollNexusTaskQueueResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PollNexusTaskQueueResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPollNexusTaskQueueResponse): temporal.api.workflowservice.v1.PollNexusTaskQueueResponse; - - /** - * Encodes the specified PollNexusTaskQueueResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.PollNexusTaskQueueResponse.verify|verify} messages. - * @param message PollNexusTaskQueueResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPollNexusTaskQueueResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollNexusTaskQueueResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PollNexusTaskQueueResponse.verify|verify} messages. - * @param message PollNexusTaskQueueResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPollNexusTaskQueueResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollNexusTaskQueueResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollNexusTaskQueueResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PollNexusTaskQueueResponse; - - /** - * Decodes a PollNexusTaskQueueResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollNexusTaskQueueResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PollNexusTaskQueueResponse; - - /** - * Creates a PollNexusTaskQueueResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollNexusTaskQueueResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PollNexusTaskQueueResponse; - - /** - * Creates a plain object from a PollNexusTaskQueueResponse message. Also converts values to other types if specified. - * @param message PollNexusTaskQueueResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PollNexusTaskQueueResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollNexusTaskQueueResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollNexusTaskQueueResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondNexusTaskCompletedRequest. */ - interface IRespondNexusTaskCompletedRequest { - - /** RespondNexusTaskCompletedRequest namespace */ - namespace?: (string|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - - /** A unique identifier for this task as received via a poll response. */ - taskToken?: (Uint8Array|null); - - /** Embedded response to be translated into a frontend response. */ - response?: (temporal.api.nexus.v1.IResponse|null); - } - - /** Represents a RespondNexusTaskCompletedRequest. */ - class RespondNexusTaskCompletedRequest implements IRespondNexusTaskCompletedRequest { - - /** - * Constructs a new RespondNexusTaskCompletedRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondNexusTaskCompletedRequest); - - /** RespondNexusTaskCompletedRequest namespace. */ - public namespace: string; - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** A unique identifier for this task as received via a poll response. */ - public taskToken: Uint8Array; - - /** Embedded response to be translated into a frontend response. */ - public response?: (temporal.api.nexus.v1.IResponse|null); - - /** - * Creates a new RespondNexusTaskCompletedRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondNexusTaskCompletedRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondNexusTaskCompletedRequest): temporal.api.workflowservice.v1.RespondNexusTaskCompletedRequest; - - /** - * Encodes the specified RespondNexusTaskCompletedRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondNexusTaskCompletedRequest.verify|verify} messages. - * @param message RespondNexusTaskCompletedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondNexusTaskCompletedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondNexusTaskCompletedRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondNexusTaskCompletedRequest.verify|verify} messages. - * @param message RespondNexusTaskCompletedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondNexusTaskCompletedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondNexusTaskCompletedRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondNexusTaskCompletedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondNexusTaskCompletedRequest; - - /** - * Decodes a RespondNexusTaskCompletedRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondNexusTaskCompletedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondNexusTaskCompletedRequest; - - /** - * Creates a RespondNexusTaskCompletedRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondNexusTaskCompletedRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondNexusTaskCompletedRequest; - - /** - * Creates a plain object from a RespondNexusTaskCompletedRequest message. Also converts values to other types if specified. - * @param message RespondNexusTaskCompletedRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondNexusTaskCompletedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondNexusTaskCompletedRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondNexusTaskCompletedRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondNexusTaskCompletedResponse. */ - interface IRespondNexusTaskCompletedResponse { - } - - /** Represents a RespondNexusTaskCompletedResponse. */ - class RespondNexusTaskCompletedResponse implements IRespondNexusTaskCompletedResponse { - - /** - * Constructs a new RespondNexusTaskCompletedResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondNexusTaskCompletedResponse); - - /** - * Creates a new RespondNexusTaskCompletedResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondNexusTaskCompletedResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondNexusTaskCompletedResponse): temporal.api.workflowservice.v1.RespondNexusTaskCompletedResponse; - - /** - * Encodes the specified RespondNexusTaskCompletedResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondNexusTaskCompletedResponse.verify|verify} messages. - * @param message RespondNexusTaskCompletedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondNexusTaskCompletedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondNexusTaskCompletedResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondNexusTaskCompletedResponse.verify|verify} messages. - * @param message RespondNexusTaskCompletedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondNexusTaskCompletedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondNexusTaskCompletedResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondNexusTaskCompletedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondNexusTaskCompletedResponse; - - /** - * Decodes a RespondNexusTaskCompletedResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondNexusTaskCompletedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondNexusTaskCompletedResponse; - - /** - * Creates a RespondNexusTaskCompletedResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondNexusTaskCompletedResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondNexusTaskCompletedResponse; - - /** - * Creates a plain object from a RespondNexusTaskCompletedResponse message. Also converts values to other types if specified. - * @param message RespondNexusTaskCompletedResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondNexusTaskCompletedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondNexusTaskCompletedResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondNexusTaskCompletedResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondNexusTaskFailedRequest. */ - interface IRespondNexusTaskFailedRequest { - - /** RespondNexusTaskFailedRequest namespace */ - namespace?: (string|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - - /** A unique identifier for this task. */ - taskToken?: (Uint8Array|null); - - /** Deprecated. Use the failure field instead. */ - error?: (temporal.api.nexus.v1.IHandlerError|null); - - /** The error the handler failed with. Must contain a NexusHandlerFailureInfo object. */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** Represents a RespondNexusTaskFailedRequest. */ - class RespondNexusTaskFailedRequest implements IRespondNexusTaskFailedRequest { - - /** - * Constructs a new RespondNexusTaskFailedRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondNexusTaskFailedRequest); - - /** RespondNexusTaskFailedRequest namespace. */ - public namespace: string; - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** A unique identifier for this task. */ - public taskToken: Uint8Array; - - /** Deprecated. Use the failure field instead. */ - public error?: (temporal.api.nexus.v1.IHandlerError|null); - - /** The error the handler failed with. Must contain a NexusHandlerFailureInfo object. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new RespondNexusTaskFailedRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondNexusTaskFailedRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondNexusTaskFailedRequest): temporal.api.workflowservice.v1.RespondNexusTaskFailedRequest; - - /** - * Encodes the specified RespondNexusTaskFailedRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondNexusTaskFailedRequest.verify|verify} messages. - * @param message RespondNexusTaskFailedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondNexusTaskFailedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondNexusTaskFailedRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondNexusTaskFailedRequest.verify|verify} messages. - * @param message RespondNexusTaskFailedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondNexusTaskFailedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondNexusTaskFailedRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondNexusTaskFailedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondNexusTaskFailedRequest; - - /** - * Decodes a RespondNexusTaskFailedRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondNexusTaskFailedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondNexusTaskFailedRequest; - - /** - * Creates a RespondNexusTaskFailedRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondNexusTaskFailedRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondNexusTaskFailedRequest; - - /** - * Creates a plain object from a RespondNexusTaskFailedRequest message. Also converts values to other types if specified. - * @param message RespondNexusTaskFailedRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondNexusTaskFailedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondNexusTaskFailedRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondNexusTaskFailedRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RespondNexusTaskFailedResponse. */ - interface IRespondNexusTaskFailedResponse { - } - - /** Represents a RespondNexusTaskFailedResponse. */ - class RespondNexusTaskFailedResponse implements IRespondNexusTaskFailedResponse { - - /** - * Constructs a new RespondNexusTaskFailedResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRespondNexusTaskFailedResponse); - - /** - * Creates a new RespondNexusTaskFailedResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RespondNexusTaskFailedResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRespondNexusTaskFailedResponse): temporal.api.workflowservice.v1.RespondNexusTaskFailedResponse; - - /** - * Encodes the specified RespondNexusTaskFailedResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RespondNexusTaskFailedResponse.verify|verify} messages. - * @param message RespondNexusTaskFailedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRespondNexusTaskFailedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RespondNexusTaskFailedResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RespondNexusTaskFailedResponse.verify|verify} messages. - * @param message RespondNexusTaskFailedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRespondNexusTaskFailedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RespondNexusTaskFailedResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RespondNexusTaskFailedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RespondNexusTaskFailedResponse; - - /** - * Decodes a RespondNexusTaskFailedResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RespondNexusTaskFailedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RespondNexusTaskFailedResponse; - - /** - * Creates a RespondNexusTaskFailedResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RespondNexusTaskFailedResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RespondNexusTaskFailedResponse; - - /** - * Creates a plain object from a RespondNexusTaskFailedResponse message. Also converts values to other types if specified. - * @param message RespondNexusTaskFailedResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RespondNexusTaskFailedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RespondNexusTaskFailedResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RespondNexusTaskFailedResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExecuteMultiOperationRequest. */ - interface IExecuteMultiOperationRequest { - - /** ExecuteMultiOperationRequest namespace */ - namespace?: (string|null); - - /** - * List of operations to execute within a single workflow. - * - * Preconditions: - * - The list of operations must not be empty. - * - The workflow ids must match across operations. - * - The only valid list of operations at this time is [StartWorkflow, UpdateWorkflow], in this order. - * - * Note that additional operation-specific restrictions have to be considered. - */ - operations?: (temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.IOperation[]|null); - } - - /** Represents an ExecuteMultiOperationRequest. */ - class ExecuteMultiOperationRequest implements IExecuteMultiOperationRequest { - - /** - * Constructs a new ExecuteMultiOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IExecuteMultiOperationRequest); - - /** ExecuteMultiOperationRequest namespace. */ - public namespace: string; - - /** - * List of operations to execute within a single workflow. - * - * Preconditions: - * - The list of operations must not be empty. - * - The workflow ids must match across operations. - * - The only valid list of operations at this time is [StartWorkflow, UpdateWorkflow], in this order. - * - * Note that additional operation-specific restrictions have to be considered. - */ - public operations: temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.IOperation[]; - - /** - * Creates a new ExecuteMultiOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteMultiOperationRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IExecuteMultiOperationRequest): temporal.api.workflowservice.v1.ExecuteMultiOperationRequest; - - /** - * Encodes the specified ExecuteMultiOperationRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.verify|verify} messages. - * @param message ExecuteMultiOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IExecuteMultiOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteMultiOperationRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.verify|verify} messages. - * @param message ExecuteMultiOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IExecuteMultiOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteMultiOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteMultiOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ExecuteMultiOperationRequest; - - /** - * Decodes an ExecuteMultiOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteMultiOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ExecuteMultiOperationRequest; - - /** - * Creates an ExecuteMultiOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteMultiOperationRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ExecuteMultiOperationRequest; - - /** - * Creates a plain object from an ExecuteMultiOperationRequest message. Also converts values to other types if specified. - * @param message ExecuteMultiOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ExecuteMultiOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteMultiOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecuteMultiOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExecuteMultiOperationRequest { - - /** Properties of an Operation. */ - interface IOperation { - - /** - * Additional restrictions: - * - setting `cron_schedule` is invalid - * - setting `request_eager_execution` is invalid - * - setting `workflow_start_delay` is invalid - */ - startWorkflow?: (temporal.api.workflowservice.v1.IStartWorkflowExecutionRequest|null); - - /** - * Additional restrictions: - * - setting `first_execution_run_id` is invalid - * - setting `workflow_execution.run_id` is invalid - */ - updateWorkflow?: (temporal.api.workflowservice.v1.IUpdateWorkflowExecutionRequest|null); - } - - /** Represents an Operation. */ - class Operation implements IOperation { - - /** - * Constructs a new Operation. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.IOperation); - - /** - * Additional restrictions: - * - setting `cron_schedule` is invalid - * - setting `request_eager_execution` is invalid - * - setting `workflow_start_delay` is invalid - */ - public startWorkflow?: (temporal.api.workflowservice.v1.IStartWorkflowExecutionRequest|null); - - /** - * Additional restrictions: - * - setting `first_execution_run_id` is invalid - * - setting `workflow_execution.run_id` is invalid - */ - public updateWorkflow?: (temporal.api.workflowservice.v1.IUpdateWorkflowExecutionRequest|null); - - /** Operation operation. */ - public operation?: ("startWorkflow"|"updateWorkflow"); - - /** - * Creates a new Operation instance using the specified properties. - * @param [properties] Properties to set - * @returns Operation instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.IOperation): temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation; - - /** - * Encodes the specified Operation message. Does not implicitly {@link temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation; - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Operation - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @param message Operation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Operation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Operation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExecuteMultiOperationResponse. */ - interface IExecuteMultiOperationResponse { - - /** ExecuteMultiOperationResponse responses */ - responses?: (temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.IResponse[]|null); - } - - /** - * IMPORTANT: For [StartWorkflow, UpdateWorkflow] combination ("Update-with-Start") when both - * 1. the workflow update for the requested update ID has already completed, and - * 2. the workflow for the requested workflow ID has already been closed, - * then you'll receive - * - an update response containing the update's outcome, and - * - a start response with a `status` field that reflects the workflow's current state. - */ - class ExecuteMultiOperationResponse implements IExecuteMultiOperationResponse { - - /** - * Constructs a new ExecuteMultiOperationResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IExecuteMultiOperationResponse); - - /** ExecuteMultiOperationResponse responses. */ - public responses: temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.IResponse[]; - - /** - * Creates a new ExecuteMultiOperationResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteMultiOperationResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IExecuteMultiOperationResponse): temporal.api.workflowservice.v1.ExecuteMultiOperationResponse; - - /** - * Encodes the specified ExecuteMultiOperationResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.verify|verify} messages. - * @param message ExecuteMultiOperationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IExecuteMultiOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteMultiOperationResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.verify|verify} messages. - * @param message ExecuteMultiOperationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IExecuteMultiOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteMultiOperationResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteMultiOperationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ExecuteMultiOperationResponse; - - /** - * Decodes an ExecuteMultiOperationResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteMultiOperationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ExecuteMultiOperationResponse; - - /** - * Creates an ExecuteMultiOperationResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteMultiOperationResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ExecuteMultiOperationResponse; - - /** - * Creates a plain object from an ExecuteMultiOperationResponse message. Also converts values to other types if specified. - * @param message ExecuteMultiOperationResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ExecuteMultiOperationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteMultiOperationResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecuteMultiOperationResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExecuteMultiOperationResponse { - - /** Properties of a Response. */ - interface IResponse { - - /** Response startWorkflow */ - startWorkflow?: (temporal.api.workflowservice.v1.IStartWorkflowExecutionResponse|null); - - /** Response updateWorkflow */ - updateWorkflow?: (temporal.api.workflowservice.v1.IUpdateWorkflowExecutionResponse|null); - } - - /** Represents a Response. */ - class Response implements IResponse { - - /** - * Constructs a new Response. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.IResponse); - - /** Response startWorkflow. */ - public startWorkflow?: (temporal.api.workflowservice.v1.IStartWorkflowExecutionResponse|null); - - /** Response updateWorkflow. */ - public updateWorkflow?: (temporal.api.workflowservice.v1.IUpdateWorkflowExecutionResponse|null); - - /** Response response. */ - public response?: ("startWorkflow"|"updateWorkflow"); - - /** - * Creates a new Response instance using the specified properties. - * @param [properties] Properties to set - * @returns Response instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.IResponse): temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response; - - /** - * Encodes the specified Response message. Does not implicitly {@link temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response.verify|verify} messages. - * @param message Response message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.IResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Response message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response.verify|verify} messages. - * @param message Response message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.IResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Response message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Response - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response; - - /** - * Decodes a Response message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Response - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response; - - /** - * Creates a Response message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Response - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response; - - /** - * Creates a plain object from a Response message. Also converts values to other types if specified. - * @param message Response - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Response to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Response - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an UpdateActivityOptionsRequest. */ - interface IUpdateActivityOptionsRequest { - - /** Namespace of the workflow which scheduled this activity */ - namespace?: (string|null); - - /** Execution info of the workflow which scheduled this activity */ - execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The identity of the client who initiated this request */ - identity?: (string|null); - - /** Activity options. Partial updates are accepted and controlled by update_mask */ - activityOptions?: (temporal.api.activity.v1.IActivityOptions|null); - - /** Controls which fields from `activity_options` will be applied */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** Only activity with this ID will be updated. */ - id?: (string|null); - - /** Update all running activities of this type. */ - type?: (string|null); - - /** Update all running activities. */ - matchAll?: (boolean|null); - - /** - * If set, the activity options will be restored to the default. - * Default options are then options activity was created with. - * They are part of the first SCHEDULE event. - * This flag cannot be combined with any other option; if you supply - * restore_original together with other options, the request will be rejected. - */ - restoreOriginal?: (boolean|null); - } - - /** NOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions */ - class UpdateActivityOptionsRequest implements IUpdateActivityOptionsRequest { - - /** - * Constructs a new UpdateActivityOptionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateActivityOptionsRequest); - - /** Namespace of the workflow which scheduled this activity */ - public namespace: string; - - /** Execution info of the workflow which scheduled this activity */ - public execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The identity of the client who initiated this request */ - public identity: string; - - /** Activity options. Partial updates are accepted and controlled by update_mask */ - public activityOptions?: (temporal.api.activity.v1.IActivityOptions|null); - - /** Controls which fields from `activity_options` will be applied */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** Only activity with this ID will be updated. */ - public id?: (string|null); - - /** Update all running activities of this type. */ - public type?: (string|null); - - /** Update all running activities. */ - public matchAll?: (boolean|null); - - /** - * If set, the activity options will be restored to the default. - * Default options are then options activity was created with. - * They are part of the first SCHEDULE event. - * This flag cannot be combined with any other option; if you supply - * restore_original together with other options, the request will be rejected. - */ - public restoreOriginal: boolean; - - /** either activity id, activity type or update_all must be provided */ - public activity?: ("id"|"type"|"matchAll"); - - /** - * Creates a new UpdateActivityOptionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateActivityOptionsRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateActivityOptionsRequest): temporal.api.workflowservice.v1.UpdateActivityOptionsRequest; - - /** - * Encodes the specified UpdateActivityOptionsRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateActivityOptionsRequest.verify|verify} messages. - * @param message UpdateActivityOptionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateActivityOptionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateActivityOptionsRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateActivityOptionsRequest.verify|verify} messages. - * @param message UpdateActivityOptionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateActivityOptionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateActivityOptionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateActivityOptionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateActivityOptionsRequest; - - /** - * Decodes an UpdateActivityOptionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateActivityOptionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateActivityOptionsRequest; - - /** - * Creates an UpdateActivityOptionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateActivityOptionsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateActivityOptionsRequest; - - /** - * Creates a plain object from an UpdateActivityOptionsRequest message. Also converts values to other types if specified. - * @param message UpdateActivityOptionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateActivityOptionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateActivityOptionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateActivityOptionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateActivityOptionsResponse. */ - interface IUpdateActivityOptionsResponse { - - /** Activity options after an update */ - activityOptions?: (temporal.api.activity.v1.IActivityOptions|null); - } - - /** Represents an UpdateActivityOptionsResponse. */ - class UpdateActivityOptionsResponse implements IUpdateActivityOptionsResponse { - - /** - * Constructs a new UpdateActivityOptionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateActivityOptionsResponse); - - /** Activity options after an update */ - public activityOptions?: (temporal.api.activity.v1.IActivityOptions|null); - - /** - * Creates a new UpdateActivityOptionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateActivityOptionsResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateActivityOptionsResponse): temporal.api.workflowservice.v1.UpdateActivityOptionsResponse; - - /** - * Encodes the specified UpdateActivityOptionsResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateActivityOptionsResponse.verify|verify} messages. - * @param message UpdateActivityOptionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateActivityOptionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateActivityOptionsResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateActivityOptionsResponse.verify|verify} messages. - * @param message UpdateActivityOptionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateActivityOptionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateActivityOptionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateActivityOptionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateActivityOptionsResponse; - - /** - * Decodes an UpdateActivityOptionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateActivityOptionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateActivityOptionsResponse; - - /** - * Creates an UpdateActivityOptionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateActivityOptionsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateActivityOptionsResponse; - - /** - * Creates a plain object from an UpdateActivityOptionsResponse message. Also converts values to other types if specified. - * @param message UpdateActivityOptionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateActivityOptionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateActivityOptionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateActivityOptionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PauseActivityRequest. */ - interface IPauseActivityRequest { - - /** Namespace of the workflow which scheduled this activity. */ - namespace?: (string|null); - - /** Execution info of the workflow which scheduled this activity */ - execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - - /** Only the activity with this ID will be paused. */ - id?: (string|null); - - /** - * Pause all running activities of this type. - * Note: Experimental - the behavior of pause by activity type might change in a future release. - */ - type?: (string|null); - - /** Reason to pause the activity. */ - reason?: (string|null); - } - - /** Represents a PauseActivityRequest. */ - class PauseActivityRequest implements IPauseActivityRequest { - - /** - * Constructs a new PauseActivityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPauseActivityRequest); - - /** Namespace of the workflow which scheduled this activity. */ - public namespace: string; - - /** Execution info of the workflow which scheduled this activity */ - public execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** Only the activity with this ID will be paused. */ - public id?: (string|null); - - /** - * Pause all running activities of this type. - * Note: Experimental - the behavior of pause by activity type might change in a future release. - */ - public type?: (string|null); - - /** Reason to pause the activity. */ - public reason: string; - - /** either activity id or activity type must be provided */ - public activity?: ("id"|"type"); - - /** - * Creates a new PauseActivityRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PauseActivityRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPauseActivityRequest): temporal.api.workflowservice.v1.PauseActivityRequest; - - /** - * Encodes the specified PauseActivityRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.PauseActivityRequest.verify|verify} messages. - * @param message PauseActivityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPauseActivityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PauseActivityRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PauseActivityRequest.verify|verify} messages. - * @param message PauseActivityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPauseActivityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PauseActivityRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PauseActivityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PauseActivityRequest; - - /** - * Decodes a PauseActivityRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PauseActivityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PauseActivityRequest; - - /** - * Creates a PauseActivityRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PauseActivityRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PauseActivityRequest; - - /** - * Creates a plain object from a PauseActivityRequest message. Also converts values to other types if specified. - * @param message PauseActivityRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PauseActivityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PauseActivityRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PauseActivityRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PauseActivityResponse. */ - interface IPauseActivityResponse { - } - - /** Represents a PauseActivityResponse. */ - class PauseActivityResponse implements IPauseActivityResponse { - - /** - * Constructs a new PauseActivityResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPauseActivityResponse); - - /** - * Creates a new PauseActivityResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PauseActivityResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPauseActivityResponse): temporal.api.workflowservice.v1.PauseActivityResponse; - - /** - * Encodes the specified PauseActivityResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.PauseActivityResponse.verify|verify} messages. - * @param message PauseActivityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPauseActivityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PauseActivityResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PauseActivityResponse.verify|verify} messages. - * @param message PauseActivityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPauseActivityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PauseActivityResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PauseActivityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PauseActivityResponse; - - /** - * Decodes a PauseActivityResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PauseActivityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PauseActivityResponse; - - /** - * Creates a PauseActivityResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PauseActivityResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PauseActivityResponse; - - /** - * Creates a plain object from a PauseActivityResponse message. Also converts values to other types if specified. - * @param message PauseActivityResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PauseActivityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PauseActivityResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PauseActivityResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UnpauseActivityRequest. */ - interface IUnpauseActivityRequest { - - /** Namespace of the workflow which scheduled this activity. */ - namespace?: (string|null); - - /** Execution info of the workflow which scheduled this activity */ - execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - - /** Only the activity with this ID will be unpaused. */ - id?: (string|null); - - /** Unpause all running activities with of this type. */ - type?: (string|null); - - /** Unpause all running activities. */ - unpauseAll?: (boolean|null); - - /** Providing this flag will also reset the number of attempts. */ - resetAttempts?: (boolean|null); - - /** Providing this flag will also reset the heartbeat details. */ - resetHeartbeat?: (boolean|null); - - /** If set, the activity will start at a random time within the specified jitter duration. */ - jitter?: (google.protobuf.IDuration|null); - } - - /** Represents an UnpauseActivityRequest. */ - class UnpauseActivityRequest implements IUnpauseActivityRequest { - - /** - * Constructs a new UnpauseActivityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUnpauseActivityRequest); - - /** Namespace of the workflow which scheduled this activity. */ - public namespace: string; - - /** Execution info of the workflow which scheduled this activity */ - public execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** Only the activity with this ID will be unpaused. */ - public id?: (string|null); - - /** Unpause all running activities with of this type. */ - public type?: (string|null); - - /** Unpause all running activities. */ - public unpauseAll?: (boolean|null); - - /** Providing this flag will also reset the number of attempts. */ - public resetAttempts: boolean; - - /** Providing this flag will also reset the heartbeat details. */ - public resetHeartbeat: boolean; - - /** If set, the activity will start at a random time within the specified jitter duration. */ - public jitter?: (google.protobuf.IDuration|null); - - /** either activity id or activity type must be provided */ - public activity?: ("id"|"type"|"unpauseAll"); - - /** - * Creates a new UnpauseActivityRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UnpauseActivityRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUnpauseActivityRequest): temporal.api.workflowservice.v1.UnpauseActivityRequest; - - /** - * Encodes the specified UnpauseActivityRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.UnpauseActivityRequest.verify|verify} messages. - * @param message UnpauseActivityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUnpauseActivityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnpauseActivityRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UnpauseActivityRequest.verify|verify} messages. - * @param message UnpauseActivityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUnpauseActivityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnpauseActivityRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnpauseActivityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UnpauseActivityRequest; - - /** - * Decodes an UnpauseActivityRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnpauseActivityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UnpauseActivityRequest; - - /** - * Creates an UnpauseActivityRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnpauseActivityRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UnpauseActivityRequest; - - /** - * Creates a plain object from an UnpauseActivityRequest message. Also converts values to other types if specified. - * @param message UnpauseActivityRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UnpauseActivityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnpauseActivityRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UnpauseActivityRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UnpauseActivityResponse. */ - interface IUnpauseActivityResponse { - } - - /** Represents an UnpauseActivityResponse. */ - class UnpauseActivityResponse implements IUnpauseActivityResponse { - - /** - * Constructs a new UnpauseActivityResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUnpauseActivityResponse); - - /** - * Creates a new UnpauseActivityResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UnpauseActivityResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUnpauseActivityResponse): temporal.api.workflowservice.v1.UnpauseActivityResponse; - - /** - * Encodes the specified UnpauseActivityResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.UnpauseActivityResponse.verify|verify} messages. - * @param message UnpauseActivityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUnpauseActivityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnpauseActivityResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UnpauseActivityResponse.verify|verify} messages. - * @param message UnpauseActivityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUnpauseActivityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnpauseActivityResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnpauseActivityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UnpauseActivityResponse; - - /** - * Decodes an UnpauseActivityResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnpauseActivityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UnpauseActivityResponse; - - /** - * Creates an UnpauseActivityResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnpauseActivityResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UnpauseActivityResponse; - - /** - * Creates a plain object from an UnpauseActivityResponse message. Also converts values to other types if specified. - * @param message UnpauseActivityResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UnpauseActivityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnpauseActivityResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UnpauseActivityResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResetActivityRequest. */ - interface IResetActivityRequest { - - /** Namespace of the workflow which scheduled this activity. */ - namespace?: (string|null); - - /** Execution info of the workflow which scheduled this activity */ - execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - - /** Only activity with this ID will be reset. */ - id?: (string|null); - - /** Reset all running activities with of this type. */ - type?: (string|null); - - /** Reset all running activities. */ - matchAll?: (boolean|null); - - /** - * Indicates that activity should reset heartbeat details. - * This flag will be applied only to the new instance of the activity. - */ - resetHeartbeat?: (boolean|null); - - /** If activity is paused, it will remain paused after reset */ - keepPaused?: (boolean|null); - - /** - * If set, and activity is in backoff, the activity will start at a random time within the specified jitter duration. - * (unless it is paused and keep_paused is set) - */ - jitter?: (google.protobuf.IDuration|null); - - /** - * If set, the activity options will be restored to the defaults. - * Default options are then options activity was created with. - * They are part of the first SCHEDULE event. - */ - restoreOriginalOptions?: (boolean|null); - } - - /** NOTE: keep in sync with temporal.api.batch.v1.BatchOperationResetActivities */ - class ResetActivityRequest implements IResetActivityRequest { - - /** - * Constructs a new ResetActivityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IResetActivityRequest); - - /** Namespace of the workflow which scheduled this activity. */ - public namespace: string; - - /** Execution info of the workflow which scheduled this activity */ - public execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** Only activity with this ID will be reset. */ - public id?: (string|null); - - /** Reset all running activities with of this type. */ - public type?: (string|null); - - /** Reset all running activities. */ - public matchAll?: (boolean|null); - - /** - * Indicates that activity should reset heartbeat details. - * This flag will be applied only to the new instance of the activity. - */ - public resetHeartbeat: boolean; - - /** If activity is paused, it will remain paused after reset */ - public keepPaused: boolean; - - /** - * If set, and activity is in backoff, the activity will start at a random time within the specified jitter duration. - * (unless it is paused and keep_paused is set) - */ - public jitter?: (google.protobuf.IDuration|null); - - /** - * If set, the activity options will be restored to the defaults. - * Default options are then options activity was created with. - * They are part of the first SCHEDULE event. - */ - public restoreOriginalOptions: boolean; - - /** either activity id, activity type or update_all must be provided */ - public activity?: ("id"|"type"|"matchAll"); - - /** - * Creates a new ResetActivityRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetActivityRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IResetActivityRequest): temporal.api.workflowservice.v1.ResetActivityRequest; - - /** - * Encodes the specified ResetActivityRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ResetActivityRequest.verify|verify} messages. - * @param message ResetActivityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IResetActivityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetActivityRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ResetActivityRequest.verify|verify} messages. - * @param message ResetActivityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IResetActivityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetActivityRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetActivityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ResetActivityRequest; - - /** - * Decodes a ResetActivityRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetActivityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ResetActivityRequest; - - /** - * Creates a ResetActivityRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetActivityRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ResetActivityRequest; - - /** - * Creates a plain object from a ResetActivityRequest message. Also converts values to other types if specified. - * @param message ResetActivityRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ResetActivityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetActivityRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetActivityRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResetActivityResponse. */ - interface IResetActivityResponse { - } - - /** Represents a ResetActivityResponse. */ - class ResetActivityResponse implements IResetActivityResponse { - - /** - * Constructs a new ResetActivityResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IResetActivityResponse); - - /** - * Creates a new ResetActivityResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetActivityResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IResetActivityResponse): temporal.api.workflowservice.v1.ResetActivityResponse; - - /** - * Encodes the specified ResetActivityResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ResetActivityResponse.verify|verify} messages. - * @param message ResetActivityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IResetActivityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetActivityResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ResetActivityResponse.verify|verify} messages. - * @param message ResetActivityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IResetActivityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetActivityResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetActivityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ResetActivityResponse; - - /** - * Decodes a ResetActivityResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetActivityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ResetActivityResponse; - - /** - * Creates a ResetActivityResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetActivityResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ResetActivityResponse; - - /** - * Creates a plain object from a ResetActivityResponse message. Also converts values to other types if specified. - * @param message ResetActivityResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ResetActivityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetActivityResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetActivityResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateWorkflowExecutionOptionsRequest. */ - interface IUpdateWorkflowExecutionOptionsRequest { - - /** The namespace name of the target Workflow. */ - namespace?: (string|null); - - /** - * The target Workflow Id and (optionally) a specific Run Id thereof. - * (-- api-linter: core::0203::optional=disabled - * aip.dev/not-precedent: false positive triggered by the word "optional" --) - */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** Workflow Execution options. Partial updates are accepted and controlled by update_mask. */ - workflowExecutionOptions?: (temporal.api.workflow.v1.IWorkflowExecutionOptions|null); - - /** - * Controls which fields from `workflow_execution_options` will be applied. - * To unset a field, set it to null and use the update mask to indicate that it should be mutated. - */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** Optional. The identity of the client who initiated this request. */ - identity?: (string|null); - } - - /** - * Keep the parameters in sync with: - * - temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions. - * - temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions. - */ - class UpdateWorkflowExecutionOptionsRequest implements IUpdateWorkflowExecutionOptionsRequest { - - /** - * Constructs a new UpdateWorkflowExecutionOptionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionOptionsRequest); - - /** The namespace name of the target Workflow. */ - public namespace: string; - - /** - * The target Workflow Id and (optionally) a specific Run Id thereof. - * (-- api-linter: core::0203::optional=disabled - * aip.dev/not-precedent: false positive triggered by the word "optional" --) - */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** Workflow Execution options. Partial updates are accepted and controlled by update_mask. */ - public workflowExecutionOptions?: (temporal.api.workflow.v1.IWorkflowExecutionOptions|null); - - /** - * Controls which fields from `workflow_execution_options` will be applied. - * To unset a field, set it to null and use the update mask to indicate that it should be mutated. - */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** Optional. The identity of the client who initiated this request. */ - public identity: string; - - /** - * Creates a new UpdateWorkflowExecutionOptionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateWorkflowExecutionOptionsRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionOptionsRequest): temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest; - - /** - * Encodes the specified UpdateWorkflowExecutionOptionsRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest.verify|verify} messages. - * @param message UpdateWorkflowExecutionOptionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionOptionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateWorkflowExecutionOptionsRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest.verify|verify} messages. - * @param message UpdateWorkflowExecutionOptionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionOptionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateWorkflowExecutionOptionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateWorkflowExecutionOptionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest; - - /** - * Decodes an UpdateWorkflowExecutionOptionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateWorkflowExecutionOptionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest; - - /** - * Creates an UpdateWorkflowExecutionOptionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateWorkflowExecutionOptionsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest; - - /** - * Creates a plain object from an UpdateWorkflowExecutionOptionsRequest message. Also converts values to other types if specified. - * @param message UpdateWorkflowExecutionOptionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateWorkflowExecutionOptionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateWorkflowExecutionOptionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateWorkflowExecutionOptionsResponse. */ - interface IUpdateWorkflowExecutionOptionsResponse { - - /** Workflow Execution options after update. */ - workflowExecutionOptions?: (temporal.api.workflow.v1.IWorkflowExecutionOptions|null); - } - - /** Represents an UpdateWorkflowExecutionOptionsResponse. */ - class UpdateWorkflowExecutionOptionsResponse implements IUpdateWorkflowExecutionOptionsResponse { - - /** - * Constructs a new UpdateWorkflowExecutionOptionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionOptionsResponse); - - /** Workflow Execution options after update. */ - public workflowExecutionOptions?: (temporal.api.workflow.v1.IWorkflowExecutionOptions|null); - - /** - * Creates a new UpdateWorkflowExecutionOptionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateWorkflowExecutionOptionsResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionOptionsResponse): temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsResponse; - - /** - * Encodes the specified UpdateWorkflowExecutionOptionsResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsResponse.verify|verify} messages. - * @param message UpdateWorkflowExecutionOptionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionOptionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateWorkflowExecutionOptionsResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsResponse.verify|verify} messages. - * @param message UpdateWorkflowExecutionOptionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionOptionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateWorkflowExecutionOptionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateWorkflowExecutionOptionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsResponse; - - /** - * Decodes an UpdateWorkflowExecutionOptionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateWorkflowExecutionOptionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsResponse; - - /** - * Creates an UpdateWorkflowExecutionOptionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateWorkflowExecutionOptionsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsResponse; - - /** - * Creates a plain object from an UpdateWorkflowExecutionOptionsResponse message. Also converts values to other types if specified. - * @param message UpdateWorkflowExecutionOptionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateWorkflowExecutionOptionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateWorkflowExecutionOptionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeDeploymentRequest. */ - interface IDescribeDeploymentRequest { - - /** DescribeDeploymentRequest namespace */ - namespace?: (string|null); - - /** DescribeDeploymentRequest deployment */ - deployment?: (temporal.api.deployment.v1.IDeployment|null); - } - - /** [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later */ - class DescribeDeploymentRequest implements IDescribeDeploymentRequest { - - /** - * Constructs a new DescribeDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeDeploymentRequest); - - /** DescribeDeploymentRequest namespace. */ - public namespace: string; - - /** DescribeDeploymentRequest deployment. */ - public deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** - * Creates a new DescribeDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeDeploymentRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeDeploymentRequest): temporal.api.workflowservice.v1.DescribeDeploymentRequest; - - /** - * Encodes the specified DescribeDeploymentRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeDeploymentRequest.verify|verify} messages. - * @param message DescribeDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeDeploymentRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeDeploymentRequest.verify|verify} messages. - * @param message DescribeDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeDeploymentRequest; - - /** - * Decodes a DescribeDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeDeploymentRequest; - - /** - * Creates a DescribeDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeDeploymentRequest; - - /** - * Creates a plain object from a DescribeDeploymentRequest message. Also converts values to other types if specified. - * @param message DescribeDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeDeploymentResponse. */ - interface IDescribeDeploymentResponse { - - /** DescribeDeploymentResponse deploymentInfo */ - deploymentInfo?: (temporal.api.deployment.v1.IDeploymentInfo|null); - } - - /** [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later */ - class DescribeDeploymentResponse implements IDescribeDeploymentResponse { - - /** - * Constructs a new DescribeDeploymentResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeDeploymentResponse); - - /** DescribeDeploymentResponse deploymentInfo. */ - public deploymentInfo?: (temporal.api.deployment.v1.IDeploymentInfo|null); - - /** - * Creates a new DescribeDeploymentResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeDeploymentResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeDeploymentResponse): temporal.api.workflowservice.v1.DescribeDeploymentResponse; - - /** - * Encodes the specified DescribeDeploymentResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeDeploymentResponse.verify|verify} messages. - * @param message DescribeDeploymentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeDeploymentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeDeploymentResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeDeploymentResponse.verify|verify} messages. - * @param message DescribeDeploymentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeDeploymentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeDeploymentResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeDeploymentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeDeploymentResponse; - - /** - * Decodes a DescribeDeploymentResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeDeploymentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeDeploymentResponse; - - /** - * Creates a DescribeDeploymentResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeDeploymentResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeDeploymentResponse; - - /** - * Creates a plain object from a DescribeDeploymentResponse message. Also converts values to other types if specified. - * @param message DescribeDeploymentResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeDeploymentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeDeploymentResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeDeploymentResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeWorkerDeploymentVersionRequest. */ - interface IDescribeWorkerDeploymentVersionRequest { - - /** DescribeWorkerDeploymentVersionRequest namespace */ - namespace?: (string|null); - - /** Deprecated. Use `deployment_version`. */ - version?: (string|null); - - /** Required. */ - deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** Report stats for task queues which have been polled by this version. */ - reportTaskQueueStats?: (boolean|null); - } - - /** Represents a DescribeWorkerDeploymentVersionRequest. */ - class DescribeWorkerDeploymentVersionRequest implements IDescribeWorkerDeploymentVersionRequest { - - /** - * Constructs a new DescribeWorkerDeploymentVersionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentVersionRequest); - - /** DescribeWorkerDeploymentVersionRequest namespace. */ - public namespace: string; - - /** Deprecated. Use `deployment_version`. */ - public version: string; - - /** Required. */ - public deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** Report stats for task queues which have been polled by this version. */ - public reportTaskQueueStats: boolean; - - /** - * Creates a new DescribeWorkerDeploymentVersionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeWorkerDeploymentVersionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentVersionRequest): temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionRequest; - - /** - * Encodes the specified DescribeWorkerDeploymentVersionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionRequest.verify|verify} messages. - * @param message DescribeWorkerDeploymentVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeWorkerDeploymentVersionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionRequest.verify|verify} messages. - * @param message DescribeWorkerDeploymentVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeWorkerDeploymentVersionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeWorkerDeploymentVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionRequest; - - /** - * Decodes a DescribeWorkerDeploymentVersionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeWorkerDeploymentVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionRequest; - - /** - * Creates a DescribeWorkerDeploymentVersionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeWorkerDeploymentVersionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionRequest; - - /** - * Creates a plain object from a DescribeWorkerDeploymentVersionRequest message. Also converts values to other types if specified. - * @param message DescribeWorkerDeploymentVersionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeWorkerDeploymentVersionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeWorkerDeploymentVersionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeWorkerDeploymentVersionResponse. */ - interface IDescribeWorkerDeploymentVersionResponse { - - /** DescribeWorkerDeploymentVersionResponse workerDeploymentVersionInfo */ - workerDeploymentVersionInfo?: (temporal.api.deployment.v1.IWorkerDeploymentVersionInfo|null); - - /** All the Task Queues that have ever polled from this Deployment version. */ - versionTaskQueues?: (temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.IVersionTaskQueue[]|null); - } - - /** Represents a DescribeWorkerDeploymentVersionResponse. */ - class DescribeWorkerDeploymentVersionResponse implements IDescribeWorkerDeploymentVersionResponse { - - /** - * Constructs a new DescribeWorkerDeploymentVersionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentVersionResponse); - - /** DescribeWorkerDeploymentVersionResponse workerDeploymentVersionInfo. */ - public workerDeploymentVersionInfo?: (temporal.api.deployment.v1.IWorkerDeploymentVersionInfo|null); - - /** All the Task Queues that have ever polled from this Deployment version. */ - public versionTaskQueues: temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.IVersionTaskQueue[]; - - /** - * Creates a new DescribeWorkerDeploymentVersionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeWorkerDeploymentVersionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentVersionResponse): temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse; - - /** - * Encodes the specified DescribeWorkerDeploymentVersionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.verify|verify} messages. - * @param message DescribeWorkerDeploymentVersionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeWorkerDeploymentVersionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.verify|verify} messages. - * @param message DescribeWorkerDeploymentVersionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeWorkerDeploymentVersionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeWorkerDeploymentVersionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse; - - /** - * Decodes a DescribeWorkerDeploymentVersionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeWorkerDeploymentVersionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse; - - /** - * Creates a DescribeWorkerDeploymentVersionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeWorkerDeploymentVersionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse; - - /** - * Creates a plain object from a DescribeWorkerDeploymentVersionResponse message. Also converts values to other types if specified. - * @param message DescribeWorkerDeploymentVersionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeWorkerDeploymentVersionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeWorkerDeploymentVersionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescribeWorkerDeploymentVersionResponse { - - /** Properties of a VersionTaskQueue. */ - interface IVersionTaskQueue { - - /** VersionTaskQueue name */ - name?: (string|null); - - /** VersionTaskQueue type */ - type?: (temporal.api.enums.v1.TaskQueueType|null); - - /** Only set if `report_task_queue_stats` is set on the request. */ - stats?: (temporal.api.taskqueue.v1.ITaskQueueStats|null); - - /** - * Task queue stats breakdown by priority key. Only contains actively used priority keys. - * Only set if `report_task_queue_stats` is set to true in the request. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "by" is used to clarify the key. --) - */ - statsByPriorityKey?: ({ [k: string]: temporal.api.taskqueue.v1.ITaskQueueStats }|null); - } - - /** (-- api-linter: core::0123::resource-annotation=disabled --) */ - class VersionTaskQueue implements IVersionTaskQueue { - - /** - * Constructs a new VersionTaskQueue. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.IVersionTaskQueue); - - /** VersionTaskQueue name. */ - public name: string; - - /** VersionTaskQueue type. */ - public type: temporal.api.enums.v1.TaskQueueType; - - /** Only set if `report_task_queue_stats` is set on the request. */ - public stats?: (temporal.api.taskqueue.v1.ITaskQueueStats|null); - - /** - * Task queue stats breakdown by priority key. Only contains actively used priority keys. - * Only set if `report_task_queue_stats` is set to true in the request. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "by" is used to clarify the key. --) - */ - public statsByPriorityKey: { [k: string]: temporal.api.taskqueue.v1.ITaskQueueStats }; - - /** - * Creates a new VersionTaskQueue instance using the specified properties. - * @param [properties] Properties to set - * @returns VersionTaskQueue instance - */ - public static create(properties?: temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.IVersionTaskQueue): temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.VersionTaskQueue; - - /** - * Encodes the specified VersionTaskQueue message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.VersionTaskQueue.verify|verify} messages. - * @param message VersionTaskQueue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.IVersionTaskQueue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VersionTaskQueue message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.VersionTaskQueue.verify|verify} messages. - * @param message VersionTaskQueue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.IVersionTaskQueue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VersionTaskQueue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VersionTaskQueue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.VersionTaskQueue; - - /** - * Decodes a VersionTaskQueue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VersionTaskQueue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.VersionTaskQueue; - - /** - * Creates a VersionTaskQueue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VersionTaskQueue - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.VersionTaskQueue; - - /** - * Creates a plain object from a VersionTaskQueue message. Also converts values to other types if specified. - * @param message VersionTaskQueue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.VersionTaskQueue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VersionTaskQueue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VersionTaskQueue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a DescribeWorkerDeploymentRequest. */ - interface IDescribeWorkerDeploymentRequest { - - /** DescribeWorkerDeploymentRequest namespace */ - namespace?: (string|null); - - /** DescribeWorkerDeploymentRequest deploymentName */ - deploymentName?: (string|null); - } - - /** Represents a DescribeWorkerDeploymentRequest. */ - class DescribeWorkerDeploymentRequest implements IDescribeWorkerDeploymentRequest { - - /** - * Constructs a new DescribeWorkerDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentRequest); - - /** DescribeWorkerDeploymentRequest namespace. */ - public namespace: string; - - /** DescribeWorkerDeploymentRequest deploymentName. */ - public deploymentName: string; - - /** - * Creates a new DescribeWorkerDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeWorkerDeploymentRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentRequest): temporal.api.workflowservice.v1.DescribeWorkerDeploymentRequest; - - /** - * Encodes the specified DescribeWorkerDeploymentRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkerDeploymentRequest.verify|verify} messages. - * @param message DescribeWorkerDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeWorkerDeploymentRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkerDeploymentRequest.verify|verify} messages. - * @param message DescribeWorkerDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeWorkerDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeWorkerDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeWorkerDeploymentRequest; - - /** - * Decodes a DescribeWorkerDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeWorkerDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeWorkerDeploymentRequest; - - /** - * Creates a DescribeWorkerDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeWorkerDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeWorkerDeploymentRequest; - - /** - * Creates a plain object from a DescribeWorkerDeploymentRequest message. Also converts values to other types if specified. - * @param message DescribeWorkerDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeWorkerDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeWorkerDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeWorkerDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeWorkerDeploymentResponse. */ - interface IDescribeWorkerDeploymentResponse { - - /** - * This value is returned so that it can be optionally passed to APIs - * that write to the Worker Deployment state to ensure that the state - * did not change between this read and a future write. - */ - conflictToken?: (Uint8Array|null); - - /** DescribeWorkerDeploymentResponse workerDeploymentInfo */ - workerDeploymentInfo?: (temporal.api.deployment.v1.IWorkerDeploymentInfo|null); - } - - /** Represents a DescribeWorkerDeploymentResponse. */ - class DescribeWorkerDeploymentResponse implements IDescribeWorkerDeploymentResponse { - - /** - * Constructs a new DescribeWorkerDeploymentResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentResponse); - - /** - * This value is returned so that it can be optionally passed to APIs - * that write to the Worker Deployment state to ensure that the state - * did not change between this read and a future write. - */ - public conflictToken: Uint8Array; - - /** DescribeWorkerDeploymentResponse workerDeploymentInfo. */ - public workerDeploymentInfo?: (temporal.api.deployment.v1.IWorkerDeploymentInfo|null); - - /** - * Creates a new DescribeWorkerDeploymentResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeWorkerDeploymentResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentResponse): temporal.api.workflowservice.v1.DescribeWorkerDeploymentResponse; - - /** - * Encodes the specified DescribeWorkerDeploymentResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkerDeploymentResponse.verify|verify} messages. - * @param message DescribeWorkerDeploymentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeWorkerDeploymentResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkerDeploymentResponse.verify|verify} messages. - * @param message DescribeWorkerDeploymentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeWorkerDeploymentResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeWorkerDeploymentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeWorkerDeploymentResponse; - - /** - * Decodes a DescribeWorkerDeploymentResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeWorkerDeploymentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeWorkerDeploymentResponse; - - /** - * Creates a DescribeWorkerDeploymentResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeWorkerDeploymentResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeWorkerDeploymentResponse; - - /** - * Creates a plain object from a DescribeWorkerDeploymentResponse message. Also converts values to other types if specified. - * @param message DescribeWorkerDeploymentResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeWorkerDeploymentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeWorkerDeploymentResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeWorkerDeploymentResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDeploymentsRequest. */ - interface IListDeploymentsRequest { - - /** ListDeploymentsRequest namespace */ - namespace?: (string|null); - - /** ListDeploymentsRequest pageSize */ - pageSize?: (number|null); - - /** ListDeploymentsRequest nextPageToken */ - nextPageToken?: (Uint8Array|null); - - /** Optional. Use to filter based on exact series name match. */ - seriesName?: (string|null); - } - - /** [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later */ - class ListDeploymentsRequest implements IListDeploymentsRequest { - - /** - * Constructs a new ListDeploymentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListDeploymentsRequest); - - /** ListDeploymentsRequest namespace. */ - public namespace: string; - - /** ListDeploymentsRequest pageSize. */ - public pageSize: number; - - /** ListDeploymentsRequest nextPageToken. */ - public nextPageToken: Uint8Array; - - /** Optional. Use to filter based on exact series name match. */ - public seriesName: string; - - /** - * Creates a new ListDeploymentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDeploymentsRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListDeploymentsRequest): temporal.api.workflowservice.v1.ListDeploymentsRequest; - - /** - * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ListDeploymentsRequest.verify|verify} messages. - * @param message ListDeploymentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListDeploymentsRequest.verify|verify} messages. - * @param message ListDeploymentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListDeploymentsRequest; - - /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListDeploymentsRequest; - - /** - * Creates a ListDeploymentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDeploymentsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListDeploymentsRequest; - - /** - * Creates a plain object from a ListDeploymentsRequest message. Also converts values to other types if specified. - * @param message ListDeploymentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDeploymentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDeploymentsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDeploymentsResponse. */ - interface IListDeploymentsResponse { - - /** ListDeploymentsResponse nextPageToken */ - nextPageToken?: (Uint8Array|null); - - /** ListDeploymentsResponse deployments */ - deployments?: (temporal.api.deployment.v1.IDeploymentListInfo[]|null); - } - - /** [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later */ - class ListDeploymentsResponse implements IListDeploymentsResponse { - - /** - * Constructs a new ListDeploymentsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListDeploymentsResponse); - - /** ListDeploymentsResponse nextPageToken. */ - public nextPageToken: Uint8Array; - - /** ListDeploymentsResponse deployments. */ - public deployments: temporal.api.deployment.v1.IDeploymentListInfo[]; - - /** - * Creates a new ListDeploymentsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDeploymentsResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListDeploymentsResponse): temporal.api.workflowservice.v1.ListDeploymentsResponse; - - /** - * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ListDeploymentsResponse.verify|verify} messages. - * @param message ListDeploymentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDeploymentsResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListDeploymentsResponse.verify|verify} messages. - * @param message ListDeploymentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDeploymentsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListDeploymentsResponse; - - /** - * Decodes a ListDeploymentsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListDeploymentsResponse; - - /** - * Creates a ListDeploymentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDeploymentsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListDeploymentsResponse; - - /** - * Creates a plain object from a ListDeploymentsResponse message. Also converts values to other types if specified. - * @param message ListDeploymentsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDeploymentsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDeploymentsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetCurrentDeploymentRequest. */ - interface ISetCurrentDeploymentRequest { - - /** SetCurrentDeploymentRequest namespace */ - namespace?: (string|null); - - /** SetCurrentDeploymentRequest deployment */ - deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** Optional. The identity of the client who initiated this request. */ - identity?: (string|null); - - /** - * Optional. Use to add or remove user-defined metadata entries. Metadata entries are exposed - * when describing a deployment. It is a good place for information such as operator name, - * links to internal deployment pipelines, etc. - */ - updateMetadata?: (temporal.api.deployment.v1.IUpdateDeploymentMetadata|null); - } - - /** [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later */ - class SetCurrentDeploymentRequest implements ISetCurrentDeploymentRequest { - - /** - * Constructs a new SetCurrentDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ISetCurrentDeploymentRequest); - - /** SetCurrentDeploymentRequest namespace. */ - public namespace: string; - - /** SetCurrentDeploymentRequest deployment. */ - public deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** Optional. The identity of the client who initiated this request. */ - public identity: string; - - /** - * Optional. Use to add or remove user-defined metadata entries. Metadata entries are exposed - * when describing a deployment. It is a good place for information such as operator name, - * links to internal deployment pipelines, etc. - */ - public updateMetadata?: (temporal.api.deployment.v1.IUpdateDeploymentMetadata|null); - - /** - * Creates a new SetCurrentDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetCurrentDeploymentRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ISetCurrentDeploymentRequest): temporal.api.workflowservice.v1.SetCurrentDeploymentRequest; - - /** - * Encodes the specified SetCurrentDeploymentRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.SetCurrentDeploymentRequest.verify|verify} messages. - * @param message SetCurrentDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ISetCurrentDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetCurrentDeploymentRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.SetCurrentDeploymentRequest.verify|verify} messages. - * @param message SetCurrentDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ISetCurrentDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetCurrentDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetCurrentDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.SetCurrentDeploymentRequest; - - /** - * Decodes a SetCurrentDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetCurrentDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.SetCurrentDeploymentRequest; - - /** - * Creates a SetCurrentDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetCurrentDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.SetCurrentDeploymentRequest; - - /** - * Creates a plain object from a SetCurrentDeploymentRequest message. Also converts values to other types if specified. - * @param message SetCurrentDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.SetCurrentDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetCurrentDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetCurrentDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetCurrentDeploymentResponse. */ - interface ISetCurrentDeploymentResponse { - - /** SetCurrentDeploymentResponse currentDeploymentInfo */ - currentDeploymentInfo?: (temporal.api.deployment.v1.IDeploymentInfo|null); - - /** Info of the deployment that was current before executing this operation. */ - previousDeploymentInfo?: (temporal.api.deployment.v1.IDeploymentInfo|null); - } - - /** [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later */ - class SetCurrentDeploymentResponse implements ISetCurrentDeploymentResponse { - - /** - * Constructs a new SetCurrentDeploymentResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ISetCurrentDeploymentResponse); - - /** SetCurrentDeploymentResponse currentDeploymentInfo. */ - public currentDeploymentInfo?: (temporal.api.deployment.v1.IDeploymentInfo|null); - - /** Info of the deployment that was current before executing this operation. */ - public previousDeploymentInfo?: (temporal.api.deployment.v1.IDeploymentInfo|null); - - /** - * Creates a new SetCurrentDeploymentResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SetCurrentDeploymentResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ISetCurrentDeploymentResponse): temporal.api.workflowservice.v1.SetCurrentDeploymentResponse; - - /** - * Encodes the specified SetCurrentDeploymentResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.SetCurrentDeploymentResponse.verify|verify} messages. - * @param message SetCurrentDeploymentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ISetCurrentDeploymentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetCurrentDeploymentResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.SetCurrentDeploymentResponse.verify|verify} messages. - * @param message SetCurrentDeploymentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ISetCurrentDeploymentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetCurrentDeploymentResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetCurrentDeploymentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.SetCurrentDeploymentResponse; - - /** - * Decodes a SetCurrentDeploymentResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetCurrentDeploymentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.SetCurrentDeploymentResponse; - - /** - * Creates a SetCurrentDeploymentResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetCurrentDeploymentResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.SetCurrentDeploymentResponse; - - /** - * Creates a plain object from a SetCurrentDeploymentResponse message. Also converts values to other types if specified. - * @param message SetCurrentDeploymentResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.SetCurrentDeploymentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetCurrentDeploymentResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetCurrentDeploymentResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetWorkerDeploymentCurrentVersionRequest. */ - interface ISetWorkerDeploymentCurrentVersionRequest { - - /** SetWorkerDeploymentCurrentVersionRequest namespace */ - namespace?: (string|null); - - /** SetWorkerDeploymentCurrentVersionRequest deploymentName */ - deploymentName?: (string|null); - - /** Deprecated. Use `build_id`. */ - version?: (string|null); - - /** - * The build id of the Version that you want to set as Current. - * Pass an empty value to set the Current Version to nil. - * A nil Current Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - */ - buildId?: (string|null); - - /** - * Optional. This can be the value of conflict_token from a Describe, or another Worker - * Deployment API. Passing a non-nil conflict token will cause this request to fail if the - * Deployment's configuration has been modified between the API call that generated the - * token and this one. - */ - conflictToken?: (Uint8Array|null); - - /** Optional. The identity of the client who initiated this request. */ - identity?: (string|null); - - /** - * Optional. By default this request would be rejected if not all the expected Task Queues are - * being polled by the new Version, to protect against accidental removal of Task Queues, or - * worker health issues. Pass `true` here to bypass this protection. - * The set of expected Task Queues is the set of all the Task Queues that were ever poller by - * the existing Current Version of the Deployment, with the following exclusions: - * - Task Queues that are not used anymore (inferred by having empty backlog and a task - * add_rate of 0.) - * - Task Queues that are moved to another Worker Deployment (inferred by the Task Queue - * having a different Current Version than the Current Version of this deployment.) - * WARNING: Do not set this flag unless you are sure that the missing task queue pollers are not - * needed. If the request is unexpectedly rejected due to missing pollers, then that means the - * pollers have not reached to the server yet. Only set this if you expect those pollers to - * never arrive. - */ - ignoreMissingTaskQueues?: (boolean|null); - - /** - * Optional. By default this request will be rejected if no pollers have been seen for the proposed - * Current Version, in order to protect users from routing tasks to pollers that do not exist, leading - * to possible timeouts. Pass `true` here to bypass this protection. - */ - allowNoPollers?: (boolean|null); - } - - /** Set/unset the Current Version of a Worker Deployment. */ - class SetWorkerDeploymentCurrentVersionRequest implements ISetWorkerDeploymentCurrentVersionRequest { - - /** - * Constructs a new SetWorkerDeploymentCurrentVersionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ISetWorkerDeploymentCurrentVersionRequest); - - /** SetWorkerDeploymentCurrentVersionRequest namespace. */ - public namespace: string; - - /** SetWorkerDeploymentCurrentVersionRequest deploymentName. */ - public deploymentName: string; - - /** Deprecated. Use `build_id`. */ - public version: string; - - /** - * The build id of the Version that you want to set as Current. - * Pass an empty value to set the Current Version to nil. - * A nil Current Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - */ - public buildId: string; - - /** - * Optional. This can be the value of conflict_token from a Describe, or another Worker - * Deployment API. Passing a non-nil conflict token will cause this request to fail if the - * Deployment's configuration has been modified between the API call that generated the - * token and this one. - */ - public conflictToken: Uint8Array; - - /** Optional. The identity of the client who initiated this request. */ - public identity: string; - - /** - * Optional. By default this request would be rejected if not all the expected Task Queues are - * being polled by the new Version, to protect against accidental removal of Task Queues, or - * worker health issues. Pass `true` here to bypass this protection. - * The set of expected Task Queues is the set of all the Task Queues that were ever poller by - * the existing Current Version of the Deployment, with the following exclusions: - * - Task Queues that are not used anymore (inferred by having empty backlog and a task - * add_rate of 0.) - * - Task Queues that are moved to another Worker Deployment (inferred by the Task Queue - * having a different Current Version than the Current Version of this deployment.) - * WARNING: Do not set this flag unless you are sure that the missing task queue pollers are not - * needed. If the request is unexpectedly rejected due to missing pollers, then that means the - * pollers have not reached to the server yet. Only set this if you expect those pollers to - * never arrive. - */ - public ignoreMissingTaskQueues: boolean; - - /** - * Optional. By default this request will be rejected if no pollers have been seen for the proposed - * Current Version, in order to protect users from routing tasks to pollers that do not exist, leading - * to possible timeouts. Pass `true` here to bypass this protection. - */ - public allowNoPollers: boolean; - - /** - * Creates a new SetWorkerDeploymentCurrentVersionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetWorkerDeploymentCurrentVersionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ISetWorkerDeploymentCurrentVersionRequest): temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionRequest; - - /** - * Encodes the specified SetWorkerDeploymentCurrentVersionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionRequest.verify|verify} messages. - * @param message SetWorkerDeploymentCurrentVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ISetWorkerDeploymentCurrentVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetWorkerDeploymentCurrentVersionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionRequest.verify|verify} messages. - * @param message SetWorkerDeploymentCurrentVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ISetWorkerDeploymentCurrentVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetWorkerDeploymentCurrentVersionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetWorkerDeploymentCurrentVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionRequest; - - /** - * Decodes a SetWorkerDeploymentCurrentVersionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetWorkerDeploymentCurrentVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionRequest; - - /** - * Creates a SetWorkerDeploymentCurrentVersionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetWorkerDeploymentCurrentVersionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionRequest; - - /** - * Creates a plain object from a SetWorkerDeploymentCurrentVersionRequest message. Also converts values to other types if specified. - * @param message SetWorkerDeploymentCurrentVersionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetWorkerDeploymentCurrentVersionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetWorkerDeploymentCurrentVersionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetWorkerDeploymentCurrentVersionResponse. */ - interface ISetWorkerDeploymentCurrentVersionResponse { - - /** - * This value is returned so that it can be optionally passed to APIs - * that write to the Worker Deployment state to ensure that the state - * did not change between this API call and a future write. - */ - conflictToken?: (Uint8Array|null); - - /** Deprecated. Use `previous_deployment_version`. */ - previousVersion?: (string|null); - - /** - * The version that was current before executing this operation. - * Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the - * Current version info before calling this API. By passing the `conflict_token` got from the - * `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes - * between the two calls. - */ - previousDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - } - - /** Represents a SetWorkerDeploymentCurrentVersionResponse. */ - class SetWorkerDeploymentCurrentVersionResponse implements ISetWorkerDeploymentCurrentVersionResponse { - - /** - * Constructs a new SetWorkerDeploymentCurrentVersionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ISetWorkerDeploymentCurrentVersionResponse); - - /** - * This value is returned so that it can be optionally passed to APIs - * that write to the Worker Deployment state to ensure that the state - * did not change between this API call and a future write. - */ - public conflictToken: Uint8Array; - - /** Deprecated. Use `previous_deployment_version`. */ - public previousVersion: string; - - /** - * The version that was current before executing this operation. - * Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the - * Current version info before calling this API. By passing the `conflict_token` got from the - * `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes - * between the two calls. - */ - public previousDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** - * Creates a new SetWorkerDeploymentCurrentVersionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SetWorkerDeploymentCurrentVersionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ISetWorkerDeploymentCurrentVersionResponse): temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionResponse; - - /** - * Encodes the specified SetWorkerDeploymentCurrentVersionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionResponse.verify|verify} messages. - * @param message SetWorkerDeploymentCurrentVersionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ISetWorkerDeploymentCurrentVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetWorkerDeploymentCurrentVersionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionResponse.verify|verify} messages. - * @param message SetWorkerDeploymentCurrentVersionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ISetWorkerDeploymentCurrentVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetWorkerDeploymentCurrentVersionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetWorkerDeploymentCurrentVersionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionResponse; - - /** - * Decodes a SetWorkerDeploymentCurrentVersionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetWorkerDeploymentCurrentVersionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionResponse; - - /** - * Creates a SetWorkerDeploymentCurrentVersionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetWorkerDeploymentCurrentVersionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionResponse; - - /** - * Creates a plain object from a SetWorkerDeploymentCurrentVersionResponse message. Also converts values to other types if specified. - * @param message SetWorkerDeploymentCurrentVersionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetWorkerDeploymentCurrentVersionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetWorkerDeploymentCurrentVersionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetWorkerDeploymentRampingVersionRequest. */ - interface ISetWorkerDeploymentRampingVersionRequest { - - /** SetWorkerDeploymentRampingVersionRequest namespace */ - namespace?: (string|null); - - /** SetWorkerDeploymentRampingVersionRequest deploymentName */ - deploymentName?: (string|null); - - /** Deprecated. Use `build_id`. */ - version?: (string|null); - - /** - * The build id of the Version that you want to ramp traffic to. - * Pass an empty value to set the Ramping Version to nil. - * A nil Ramping Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - */ - buildId?: (string|null); - - /** Ramp percentage to set. Valid range: [0,100]. */ - percentage?: (number|null); - - /** - * Optional. This can be the value of conflict_token from a Describe, or another Worker - * Deployment API. Passing a non-nil conflict token will cause this request to fail if the - * Deployment's configuration has been modified between the API call that generated the - * token and this one. - */ - conflictToken?: (Uint8Array|null); - - /** Optional. The identity of the client who initiated this request. */ - identity?: (string|null); - - /** - * Optional. By default this request would be rejected if not all the expected Task Queues are - * being polled by the new Version, to protect against accidental removal of Task Queues, or - * worker health issues. Pass `true` here to bypass this protection. - * The set of expected Task Queues equals to all the Task Queues ever polled from the existing - * Current Version of the Deployment, with the following exclusions: - * - Task Queues that are not used anymore (inferred by having empty backlog and a task - * add_rate of 0.) - * - Task Queues that are moved to another Worker Deployment (inferred by the Task Queue - * having a different Current Version than the Current Version of this deployment.) - * WARNING: Do not set this flag unless you are sure that the missing task queue poller are not - * needed. If the request is unexpectedly rejected due to missing pollers, then that means the - * pollers have not reached to the server yet. Only set this if you expect those pollers to - * never arrive. - * Note: this check only happens when the ramping version is about to change, not every time - * that the percentage changes. Also note that the check is against the deployment's Current - * Version, not the previous Ramping Version. - */ - ignoreMissingTaskQueues?: (boolean|null); - - /** - * Optional. By default this request will be rejected if no pollers have been seen for the proposed - * Current Version, in order to protect users from routing tasks to pollers that do not exist, leading - * to possible timeouts. Pass `true` here to bypass this protection. - */ - allowNoPollers?: (boolean|null); - } - - /** Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. */ - class SetWorkerDeploymentRampingVersionRequest implements ISetWorkerDeploymentRampingVersionRequest { - - /** - * Constructs a new SetWorkerDeploymentRampingVersionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ISetWorkerDeploymentRampingVersionRequest); - - /** SetWorkerDeploymentRampingVersionRequest namespace. */ - public namespace: string; - - /** SetWorkerDeploymentRampingVersionRequest deploymentName. */ - public deploymentName: string; - - /** Deprecated. Use `build_id`. */ - public version: string; - - /** - * The build id of the Version that you want to ramp traffic to. - * Pass an empty value to set the Ramping Version to nil. - * A nil Ramping Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - */ - public buildId: string; - - /** Ramp percentage to set. Valid range: [0,100]. */ - public percentage: number; - - /** - * Optional. This can be the value of conflict_token from a Describe, or another Worker - * Deployment API. Passing a non-nil conflict token will cause this request to fail if the - * Deployment's configuration has been modified between the API call that generated the - * token and this one. - */ - public conflictToken: Uint8Array; - - /** Optional. The identity of the client who initiated this request. */ - public identity: string; - - /** - * Optional. By default this request would be rejected if not all the expected Task Queues are - * being polled by the new Version, to protect against accidental removal of Task Queues, or - * worker health issues. Pass `true` here to bypass this protection. - * The set of expected Task Queues equals to all the Task Queues ever polled from the existing - * Current Version of the Deployment, with the following exclusions: - * - Task Queues that are not used anymore (inferred by having empty backlog and a task - * add_rate of 0.) - * - Task Queues that are moved to another Worker Deployment (inferred by the Task Queue - * having a different Current Version than the Current Version of this deployment.) - * WARNING: Do not set this flag unless you are sure that the missing task queue poller are not - * needed. If the request is unexpectedly rejected due to missing pollers, then that means the - * pollers have not reached to the server yet. Only set this if you expect those pollers to - * never arrive. - * Note: this check only happens when the ramping version is about to change, not every time - * that the percentage changes. Also note that the check is against the deployment's Current - * Version, not the previous Ramping Version. - */ - public ignoreMissingTaskQueues: boolean; - - /** - * Optional. By default this request will be rejected if no pollers have been seen for the proposed - * Current Version, in order to protect users from routing tasks to pollers that do not exist, leading - * to possible timeouts. Pass `true` here to bypass this protection. - */ - public allowNoPollers: boolean; - - /** - * Creates a new SetWorkerDeploymentRampingVersionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetWorkerDeploymentRampingVersionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ISetWorkerDeploymentRampingVersionRequest): temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionRequest; - - /** - * Encodes the specified SetWorkerDeploymentRampingVersionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionRequest.verify|verify} messages. - * @param message SetWorkerDeploymentRampingVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ISetWorkerDeploymentRampingVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetWorkerDeploymentRampingVersionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionRequest.verify|verify} messages. - * @param message SetWorkerDeploymentRampingVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ISetWorkerDeploymentRampingVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetWorkerDeploymentRampingVersionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetWorkerDeploymentRampingVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionRequest; - - /** - * Decodes a SetWorkerDeploymentRampingVersionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetWorkerDeploymentRampingVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionRequest; - - /** - * Creates a SetWorkerDeploymentRampingVersionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetWorkerDeploymentRampingVersionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionRequest; - - /** - * Creates a plain object from a SetWorkerDeploymentRampingVersionRequest message. Also converts values to other types if specified. - * @param message SetWorkerDeploymentRampingVersionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetWorkerDeploymentRampingVersionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetWorkerDeploymentRampingVersionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetWorkerDeploymentRampingVersionResponse. */ - interface ISetWorkerDeploymentRampingVersionResponse { - - /** - * This value is returned so that it can be optionally passed to APIs - * that write to the Worker Deployment state to ensure that the state - * did not change between this API call and a future write. - */ - conflictToken?: (Uint8Array|null); - - /** Deprecated. Use `previous_deployment_version`. */ - previousVersion?: (string|null); - - /** - * The version that was ramping before executing this operation. - * Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the - * Ramping version info before calling this API. By passing the `conflict_token` got from the - * `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes - * between the two calls. - */ - previousDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** - * The ramping version percentage before executing this operation. - * Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the - * Ramping version info before calling this API. By passing the `conflict_token` got from the - * `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes - * between the two calls. - */ - previousPercentage?: (number|null); - } - - /** Represents a SetWorkerDeploymentRampingVersionResponse. */ - class SetWorkerDeploymentRampingVersionResponse implements ISetWorkerDeploymentRampingVersionResponse { - - /** - * Constructs a new SetWorkerDeploymentRampingVersionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ISetWorkerDeploymentRampingVersionResponse); - - /** - * This value is returned so that it can be optionally passed to APIs - * that write to the Worker Deployment state to ensure that the state - * did not change between this API call and a future write. - */ - public conflictToken: Uint8Array; - - /** Deprecated. Use `previous_deployment_version`. */ - public previousVersion: string; - - /** - * The version that was ramping before executing this operation. - * Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the - * Ramping version info before calling this API. By passing the `conflict_token` got from the - * `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes - * between the two calls. - */ - public previousDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** - * The ramping version percentage before executing this operation. - * Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the - * Ramping version info before calling this API. By passing the `conflict_token` got from the - * `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes - * between the two calls. - */ - public previousPercentage: number; - - /** - * Creates a new SetWorkerDeploymentRampingVersionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SetWorkerDeploymentRampingVersionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ISetWorkerDeploymentRampingVersionResponse): temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionResponse; - - /** - * Encodes the specified SetWorkerDeploymentRampingVersionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionResponse.verify|verify} messages. - * @param message SetWorkerDeploymentRampingVersionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ISetWorkerDeploymentRampingVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetWorkerDeploymentRampingVersionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionResponse.verify|verify} messages. - * @param message SetWorkerDeploymentRampingVersionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ISetWorkerDeploymentRampingVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetWorkerDeploymentRampingVersionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetWorkerDeploymentRampingVersionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionResponse; - - /** - * Decodes a SetWorkerDeploymentRampingVersionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetWorkerDeploymentRampingVersionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionResponse; - - /** - * Creates a SetWorkerDeploymentRampingVersionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetWorkerDeploymentRampingVersionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionResponse; - - /** - * Creates a plain object from a SetWorkerDeploymentRampingVersionResponse message. Also converts values to other types if specified. - * @param message SetWorkerDeploymentRampingVersionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetWorkerDeploymentRampingVersionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetWorkerDeploymentRampingVersionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListWorkerDeploymentsRequest. */ - interface IListWorkerDeploymentsRequest { - - /** ListWorkerDeploymentsRequest namespace */ - namespace?: (string|null); - - /** ListWorkerDeploymentsRequest pageSize */ - pageSize?: (number|null); - - /** ListWorkerDeploymentsRequest nextPageToken */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListWorkerDeploymentsRequest. */ - class ListWorkerDeploymentsRequest implements IListWorkerDeploymentsRequest { - - /** - * Constructs a new ListWorkerDeploymentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListWorkerDeploymentsRequest); - - /** ListWorkerDeploymentsRequest namespace. */ - public namespace: string; - - /** ListWorkerDeploymentsRequest pageSize. */ - public pageSize: number; - - /** ListWorkerDeploymentsRequest nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListWorkerDeploymentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListWorkerDeploymentsRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListWorkerDeploymentsRequest): temporal.api.workflowservice.v1.ListWorkerDeploymentsRequest; - - /** - * Encodes the specified ListWorkerDeploymentsRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkerDeploymentsRequest.verify|verify} messages. - * @param message ListWorkerDeploymentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListWorkerDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListWorkerDeploymentsRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkerDeploymentsRequest.verify|verify} messages. - * @param message ListWorkerDeploymentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListWorkerDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListWorkerDeploymentsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListWorkerDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListWorkerDeploymentsRequest; - - /** - * Decodes a ListWorkerDeploymentsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListWorkerDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListWorkerDeploymentsRequest; - - /** - * Creates a ListWorkerDeploymentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListWorkerDeploymentsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListWorkerDeploymentsRequest; - - /** - * Creates a plain object from a ListWorkerDeploymentsRequest message. Also converts values to other types if specified. - * @param message ListWorkerDeploymentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListWorkerDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListWorkerDeploymentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListWorkerDeploymentsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListWorkerDeploymentsResponse. */ - interface IListWorkerDeploymentsResponse { - - /** ListWorkerDeploymentsResponse nextPageToken */ - nextPageToken?: (Uint8Array|null); - - /** The list of worker deployments. */ - workerDeployments?: (temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.IWorkerDeploymentSummary[]|null); - } - - /** Represents a ListWorkerDeploymentsResponse. */ - class ListWorkerDeploymentsResponse implements IListWorkerDeploymentsResponse { - - /** - * Constructs a new ListWorkerDeploymentsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListWorkerDeploymentsResponse); - - /** ListWorkerDeploymentsResponse nextPageToken. */ - public nextPageToken: Uint8Array; - - /** The list of worker deployments. */ - public workerDeployments: temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.IWorkerDeploymentSummary[]; - - /** - * Creates a new ListWorkerDeploymentsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListWorkerDeploymentsResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListWorkerDeploymentsResponse): temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse; - - /** - * Encodes the specified ListWorkerDeploymentsResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.verify|verify} messages. - * @param message ListWorkerDeploymentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListWorkerDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListWorkerDeploymentsResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.verify|verify} messages. - * @param message ListWorkerDeploymentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListWorkerDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListWorkerDeploymentsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListWorkerDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse; - - /** - * Decodes a ListWorkerDeploymentsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListWorkerDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse; - - /** - * Creates a ListWorkerDeploymentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListWorkerDeploymentsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse; - - /** - * Creates a plain object from a ListWorkerDeploymentsResponse message. Also converts values to other types if specified. - * @param message ListWorkerDeploymentsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListWorkerDeploymentsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListWorkerDeploymentsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ListWorkerDeploymentsResponse { - - /** Properties of a WorkerDeploymentSummary. */ - interface IWorkerDeploymentSummary { - - /** WorkerDeploymentSummary name */ - name?: (string|null); - - /** WorkerDeploymentSummary createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** WorkerDeploymentSummary routingConfig */ - routingConfig?: (temporal.api.deployment.v1.IRoutingConfig|null); - - /** Summary of the version that was added most recently in the Worker Deployment. */ - latestVersionSummary?: (temporal.api.deployment.v1.WorkerDeploymentInfo.IWorkerDeploymentVersionSummary|null); - - /** Summary of the current version of the Worker Deployment. */ - currentVersionSummary?: (temporal.api.deployment.v1.WorkerDeploymentInfo.IWorkerDeploymentVersionSummary|null); - - /** Summary of the ramping version of the Worker Deployment. */ - rampingVersionSummary?: (temporal.api.deployment.v1.WorkerDeploymentInfo.IWorkerDeploymentVersionSummary|null); - } - - /** - * (-- api-linter: core::0123::resource-annotation=disabled --) - * A subset of WorkerDeploymentInfo - */ - class WorkerDeploymentSummary implements IWorkerDeploymentSummary { - - /** - * Constructs a new WorkerDeploymentSummary. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.IWorkerDeploymentSummary); - - /** WorkerDeploymentSummary name. */ - public name: string; - - /** WorkerDeploymentSummary createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** WorkerDeploymentSummary routingConfig. */ - public routingConfig?: (temporal.api.deployment.v1.IRoutingConfig|null); - - /** Summary of the version that was added most recently in the Worker Deployment. */ - public latestVersionSummary?: (temporal.api.deployment.v1.WorkerDeploymentInfo.IWorkerDeploymentVersionSummary|null); - - /** Summary of the current version of the Worker Deployment. */ - public currentVersionSummary?: (temporal.api.deployment.v1.WorkerDeploymentInfo.IWorkerDeploymentVersionSummary|null); - - /** Summary of the ramping version of the Worker Deployment. */ - public rampingVersionSummary?: (temporal.api.deployment.v1.WorkerDeploymentInfo.IWorkerDeploymentVersionSummary|null); - - /** - * Creates a new WorkerDeploymentSummary instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerDeploymentSummary instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.IWorkerDeploymentSummary): temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.WorkerDeploymentSummary; - - /** - * Encodes the specified WorkerDeploymentSummary message. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.WorkerDeploymentSummary.verify|verify} messages. - * @param message WorkerDeploymentSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.IWorkerDeploymentSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerDeploymentSummary message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.WorkerDeploymentSummary.verify|verify} messages. - * @param message WorkerDeploymentSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.IWorkerDeploymentSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerDeploymentSummary message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerDeploymentSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.WorkerDeploymentSummary; - - /** - * Decodes a WorkerDeploymentSummary message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerDeploymentSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.WorkerDeploymentSummary; - - /** - * Creates a WorkerDeploymentSummary message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerDeploymentSummary - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.WorkerDeploymentSummary; - - /** - * Creates a plain object from a WorkerDeploymentSummary message. Also converts values to other types if specified. - * @param message WorkerDeploymentSummary - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.WorkerDeploymentSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerDeploymentSummary to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerDeploymentSummary - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a DeleteWorkerDeploymentVersionRequest. */ - interface IDeleteWorkerDeploymentVersionRequest { - - /** DeleteWorkerDeploymentVersionRequest namespace */ - namespace?: (string|null); - - /** Deprecated. Use `deployment_version`. */ - version?: (string|null); - - /** Required. */ - deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** - * Pass to force deletion even if the Version is draining. In this case the open pinned - * workflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions. - */ - skipDrainage?: (boolean|null); - - /** Optional. The identity of the client who initiated this request. */ - identity?: (string|null); - } - - /** - * Used for manual deletion of Versions. User can delete a Version only when all the - * following conditions are met: - * - It is not the Current or Ramping Version of its Deployment. - * - It has no active pollers (none of the task queues in the Version have pollers) - * - It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition - * can be skipped by passing `skip-drainage=true`. - */ - class DeleteWorkerDeploymentVersionRequest implements IDeleteWorkerDeploymentVersionRequest { - - /** - * Constructs a new DeleteWorkerDeploymentVersionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentVersionRequest); - - /** DeleteWorkerDeploymentVersionRequest namespace. */ - public namespace: string; - - /** Deprecated. Use `deployment_version`. */ - public version: string; - - /** Required. */ - public deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** - * Pass to force deletion even if the Version is draining. In this case the open pinned - * workflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions. - */ - public skipDrainage: boolean; - - /** Optional. The identity of the client who initiated this request. */ - public identity: string; - - /** - * Creates a new DeleteWorkerDeploymentVersionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteWorkerDeploymentVersionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentVersionRequest): temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionRequest; - - /** - * Encodes the specified DeleteWorkerDeploymentVersionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionRequest.verify|verify} messages. - * @param message DeleteWorkerDeploymentVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteWorkerDeploymentVersionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionRequest.verify|verify} messages. - * @param message DeleteWorkerDeploymentVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteWorkerDeploymentVersionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteWorkerDeploymentVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionRequest; - - /** - * Decodes a DeleteWorkerDeploymentVersionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteWorkerDeploymentVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionRequest; - - /** - * Creates a DeleteWorkerDeploymentVersionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteWorkerDeploymentVersionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionRequest; - - /** - * Creates a plain object from a DeleteWorkerDeploymentVersionRequest message. Also converts values to other types if specified. - * @param message DeleteWorkerDeploymentVersionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteWorkerDeploymentVersionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteWorkerDeploymentVersionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteWorkerDeploymentVersionResponse. */ - interface IDeleteWorkerDeploymentVersionResponse { - } - - /** Represents a DeleteWorkerDeploymentVersionResponse. */ - class DeleteWorkerDeploymentVersionResponse implements IDeleteWorkerDeploymentVersionResponse { - - /** - * Constructs a new DeleteWorkerDeploymentVersionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentVersionResponse); - - /** - * Creates a new DeleteWorkerDeploymentVersionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteWorkerDeploymentVersionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentVersionResponse): temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionResponse; - - /** - * Encodes the specified DeleteWorkerDeploymentVersionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionResponse.verify|verify} messages. - * @param message DeleteWorkerDeploymentVersionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteWorkerDeploymentVersionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionResponse.verify|verify} messages. - * @param message DeleteWorkerDeploymentVersionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteWorkerDeploymentVersionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteWorkerDeploymentVersionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionResponse; - - /** - * Decodes a DeleteWorkerDeploymentVersionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteWorkerDeploymentVersionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionResponse; - - /** - * Creates a DeleteWorkerDeploymentVersionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteWorkerDeploymentVersionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionResponse; - - /** - * Creates a plain object from a DeleteWorkerDeploymentVersionResponse message. Also converts values to other types if specified. - * @param message DeleteWorkerDeploymentVersionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteWorkerDeploymentVersionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteWorkerDeploymentVersionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteWorkerDeploymentRequest. */ - interface IDeleteWorkerDeploymentRequest { - - /** DeleteWorkerDeploymentRequest namespace */ - namespace?: (string|null); - - /** DeleteWorkerDeploymentRequest deploymentName */ - deploymentName?: (string|null); - - /** Optional. The identity of the client who initiated this request. */ - identity?: (string|null); - } - - /** - * Deletes records of (an old) Deployment. A deployment can only be deleted if - * it has no Version in it. - */ - class DeleteWorkerDeploymentRequest implements IDeleteWorkerDeploymentRequest { - - /** - * Constructs a new DeleteWorkerDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentRequest); - - /** DeleteWorkerDeploymentRequest namespace. */ - public namespace: string; - - /** DeleteWorkerDeploymentRequest deploymentName. */ - public deploymentName: string; - - /** Optional. The identity of the client who initiated this request. */ - public identity: string; - - /** - * Creates a new DeleteWorkerDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteWorkerDeploymentRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentRequest): temporal.api.workflowservice.v1.DeleteWorkerDeploymentRequest; - - /** - * Encodes the specified DeleteWorkerDeploymentRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkerDeploymentRequest.verify|verify} messages. - * @param message DeleteWorkerDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteWorkerDeploymentRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkerDeploymentRequest.verify|verify} messages. - * @param message DeleteWorkerDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteWorkerDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteWorkerDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DeleteWorkerDeploymentRequest; - - /** - * Decodes a DeleteWorkerDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteWorkerDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DeleteWorkerDeploymentRequest; - - /** - * Creates a DeleteWorkerDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteWorkerDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DeleteWorkerDeploymentRequest; - - /** - * Creates a plain object from a DeleteWorkerDeploymentRequest message. Also converts values to other types if specified. - * @param message DeleteWorkerDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DeleteWorkerDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteWorkerDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteWorkerDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteWorkerDeploymentResponse. */ - interface IDeleteWorkerDeploymentResponse { - } - - /** Represents a DeleteWorkerDeploymentResponse. */ - class DeleteWorkerDeploymentResponse implements IDeleteWorkerDeploymentResponse { - - /** - * Constructs a new DeleteWorkerDeploymentResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentResponse); - - /** - * Creates a new DeleteWorkerDeploymentResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteWorkerDeploymentResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentResponse): temporal.api.workflowservice.v1.DeleteWorkerDeploymentResponse; - - /** - * Encodes the specified DeleteWorkerDeploymentResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkerDeploymentResponse.verify|verify} messages. - * @param message DeleteWorkerDeploymentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteWorkerDeploymentResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkerDeploymentResponse.verify|verify} messages. - * @param message DeleteWorkerDeploymentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteWorkerDeploymentResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteWorkerDeploymentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DeleteWorkerDeploymentResponse; - - /** - * Decodes a DeleteWorkerDeploymentResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteWorkerDeploymentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DeleteWorkerDeploymentResponse; - - /** - * Creates a DeleteWorkerDeploymentResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteWorkerDeploymentResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DeleteWorkerDeploymentResponse; - - /** - * Creates a plain object from a DeleteWorkerDeploymentResponse message. Also converts values to other types if specified. - * @param message DeleteWorkerDeploymentResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DeleteWorkerDeploymentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteWorkerDeploymentResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteWorkerDeploymentResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateWorkerDeploymentVersionMetadataRequest. */ - interface IUpdateWorkerDeploymentVersionMetadataRequest { - - /** UpdateWorkerDeploymentVersionMetadataRequest namespace */ - namespace?: (string|null); - - /** Deprecated. Use `deployment_version`. */ - version?: (string|null); - - /** Required. */ - deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** UpdateWorkerDeploymentVersionMetadataRequest upsertEntries */ - upsertEntries?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - - /** List of keys to remove from the metadata. */ - removeEntries?: (string[]|null); - - /** Optional. The identity of the client who initiated this request. */ - identity?: (string|null); - } - - /** Used to update the user-defined metadata of a Worker Deployment Version. */ - class UpdateWorkerDeploymentVersionMetadataRequest implements IUpdateWorkerDeploymentVersionMetadataRequest { - - /** - * Constructs a new UpdateWorkerDeploymentVersionMetadataRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateWorkerDeploymentVersionMetadataRequest); - - /** UpdateWorkerDeploymentVersionMetadataRequest namespace. */ - public namespace: string; - - /** Deprecated. Use `deployment_version`. */ - public version: string; - - /** Required. */ - public deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** UpdateWorkerDeploymentVersionMetadataRequest upsertEntries. */ - public upsertEntries: { [k: string]: temporal.api.common.v1.IPayload }; - - /** List of keys to remove from the metadata. */ - public removeEntries: string[]; - - /** Optional. The identity of the client who initiated this request. */ - public identity: string; - - /** - * Creates a new UpdateWorkerDeploymentVersionMetadataRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateWorkerDeploymentVersionMetadataRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateWorkerDeploymentVersionMetadataRequest): temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataRequest; - - /** - * Encodes the specified UpdateWorkerDeploymentVersionMetadataRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataRequest.verify|verify} messages. - * @param message UpdateWorkerDeploymentVersionMetadataRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateWorkerDeploymentVersionMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateWorkerDeploymentVersionMetadataRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataRequest.verify|verify} messages. - * @param message UpdateWorkerDeploymentVersionMetadataRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateWorkerDeploymentVersionMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateWorkerDeploymentVersionMetadataRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateWorkerDeploymentVersionMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataRequest; - - /** - * Decodes an UpdateWorkerDeploymentVersionMetadataRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateWorkerDeploymentVersionMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataRequest; - - /** - * Creates an UpdateWorkerDeploymentVersionMetadataRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateWorkerDeploymentVersionMetadataRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataRequest; - - /** - * Creates a plain object from an UpdateWorkerDeploymentVersionMetadataRequest message. Also converts values to other types if specified. - * @param message UpdateWorkerDeploymentVersionMetadataRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateWorkerDeploymentVersionMetadataRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateWorkerDeploymentVersionMetadataRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateWorkerDeploymentVersionMetadataResponse. */ - interface IUpdateWorkerDeploymentVersionMetadataResponse { - - /** Full metadata after performing the update. */ - metadata?: (temporal.api.deployment.v1.IVersionMetadata|null); - } - - /** Represents an UpdateWorkerDeploymentVersionMetadataResponse. */ - class UpdateWorkerDeploymentVersionMetadataResponse implements IUpdateWorkerDeploymentVersionMetadataResponse { - - /** - * Constructs a new UpdateWorkerDeploymentVersionMetadataResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateWorkerDeploymentVersionMetadataResponse); - - /** Full metadata after performing the update. */ - public metadata?: (temporal.api.deployment.v1.IVersionMetadata|null); - - /** - * Creates a new UpdateWorkerDeploymentVersionMetadataResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateWorkerDeploymentVersionMetadataResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateWorkerDeploymentVersionMetadataResponse): temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataResponse; - - /** - * Encodes the specified UpdateWorkerDeploymentVersionMetadataResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataResponse.verify|verify} messages. - * @param message UpdateWorkerDeploymentVersionMetadataResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateWorkerDeploymentVersionMetadataResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateWorkerDeploymentVersionMetadataResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataResponse.verify|verify} messages. - * @param message UpdateWorkerDeploymentVersionMetadataResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateWorkerDeploymentVersionMetadataResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateWorkerDeploymentVersionMetadataResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateWorkerDeploymentVersionMetadataResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataResponse; - - /** - * Decodes an UpdateWorkerDeploymentVersionMetadataResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateWorkerDeploymentVersionMetadataResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataResponse; - - /** - * Creates an UpdateWorkerDeploymentVersionMetadataResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateWorkerDeploymentVersionMetadataResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataResponse; - - /** - * Creates a plain object from an UpdateWorkerDeploymentVersionMetadataResponse message. Also converts values to other types if specified. - * @param message UpdateWorkerDeploymentVersionMetadataResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateWorkerDeploymentVersionMetadataResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateWorkerDeploymentVersionMetadataResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetWorkerDeploymentManagerRequest. */ - interface ISetWorkerDeploymentManagerRequest { - - /** SetWorkerDeploymentManagerRequest namespace */ - namespace?: (string|null); - - /** SetWorkerDeploymentManagerRequest deploymentName */ - deploymentName?: (string|null); - - /** - * Arbitrary value for `manager_identity`. - * Empty will unset the field. - */ - managerIdentity?: (string|null); - - /** True will set `manager_identity` to `identity`. */ - self?: (boolean|null); - - /** - * Optional. This can be the value of conflict_token from a Describe, or another Worker - * Deployment API. Passing a non-nil conflict token will cause this request to fail if the - * Deployment's configuration has been modified between the API call that generated the - * token and this one. - */ - conflictToken?: (Uint8Array|null); - - /** Required. The identity of the client who initiated this request. */ - identity?: (string|null); - } - - /** Update the ManagerIdentity of a Worker Deployment. */ - class SetWorkerDeploymentManagerRequest implements ISetWorkerDeploymentManagerRequest { - - /** - * Constructs a new SetWorkerDeploymentManagerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ISetWorkerDeploymentManagerRequest); - - /** SetWorkerDeploymentManagerRequest namespace. */ - public namespace: string; - - /** SetWorkerDeploymentManagerRequest deploymentName. */ - public deploymentName: string; - - /** - * Arbitrary value for `manager_identity`. - * Empty will unset the field. - */ - public managerIdentity?: (string|null); - - /** True will set `manager_identity` to `identity`. */ - public self?: (boolean|null); - - /** - * Optional. This can be the value of conflict_token from a Describe, or another Worker - * Deployment API. Passing a non-nil conflict token will cause this request to fail if the - * Deployment's configuration has been modified between the API call that generated the - * token and this one. - */ - public conflictToken: Uint8Array; - - /** Required. The identity of the client who initiated this request. */ - public identity: string; - - /** SetWorkerDeploymentManagerRequest newManagerIdentity. */ - public newManagerIdentity?: ("managerIdentity"|"self"); - - /** - * Creates a new SetWorkerDeploymentManagerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetWorkerDeploymentManagerRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ISetWorkerDeploymentManagerRequest): temporal.api.workflowservice.v1.SetWorkerDeploymentManagerRequest; - - /** - * Encodes the specified SetWorkerDeploymentManagerRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.SetWorkerDeploymentManagerRequest.verify|verify} messages. - * @param message SetWorkerDeploymentManagerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ISetWorkerDeploymentManagerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetWorkerDeploymentManagerRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.SetWorkerDeploymentManagerRequest.verify|verify} messages. - * @param message SetWorkerDeploymentManagerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ISetWorkerDeploymentManagerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetWorkerDeploymentManagerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetWorkerDeploymentManagerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.SetWorkerDeploymentManagerRequest; - - /** - * Decodes a SetWorkerDeploymentManagerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetWorkerDeploymentManagerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.SetWorkerDeploymentManagerRequest; - - /** - * Creates a SetWorkerDeploymentManagerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetWorkerDeploymentManagerRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.SetWorkerDeploymentManagerRequest; - - /** - * Creates a plain object from a SetWorkerDeploymentManagerRequest message. Also converts values to other types if specified. - * @param message SetWorkerDeploymentManagerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.SetWorkerDeploymentManagerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetWorkerDeploymentManagerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetWorkerDeploymentManagerRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetWorkerDeploymentManagerResponse. */ - interface ISetWorkerDeploymentManagerResponse { - - /** - * This value is returned so that it can be optionally passed to APIs - * that write to the Worker Deployment state to ensure that the state - * did not change between this API call and a future write. - */ - conflictToken?: (Uint8Array|null); - - /** - * What the `manager_identity` field was before this change. - * Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the - * manager identity before calling this API. By passing the `conflict_token` got from the - * `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes - * between the two calls. - */ - previousManagerIdentity?: (string|null); - } - - /** Represents a SetWorkerDeploymentManagerResponse. */ - class SetWorkerDeploymentManagerResponse implements ISetWorkerDeploymentManagerResponse { - - /** - * Constructs a new SetWorkerDeploymentManagerResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ISetWorkerDeploymentManagerResponse); - - /** - * This value is returned so that it can be optionally passed to APIs - * that write to the Worker Deployment state to ensure that the state - * did not change between this API call and a future write. - */ - public conflictToken: Uint8Array; - - /** - * What the `manager_identity` field was before this change. - * Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the - * manager identity before calling this API. By passing the `conflict_token` got from the - * `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes - * between the two calls. - */ - public previousManagerIdentity: string; - - /** - * Creates a new SetWorkerDeploymentManagerResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SetWorkerDeploymentManagerResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ISetWorkerDeploymentManagerResponse): temporal.api.workflowservice.v1.SetWorkerDeploymentManagerResponse; - - /** - * Encodes the specified SetWorkerDeploymentManagerResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.SetWorkerDeploymentManagerResponse.verify|verify} messages. - * @param message SetWorkerDeploymentManagerResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ISetWorkerDeploymentManagerResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetWorkerDeploymentManagerResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.SetWorkerDeploymentManagerResponse.verify|verify} messages. - * @param message SetWorkerDeploymentManagerResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ISetWorkerDeploymentManagerResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetWorkerDeploymentManagerResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetWorkerDeploymentManagerResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.SetWorkerDeploymentManagerResponse; - - /** - * Decodes a SetWorkerDeploymentManagerResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetWorkerDeploymentManagerResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.SetWorkerDeploymentManagerResponse; - - /** - * Creates a SetWorkerDeploymentManagerResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetWorkerDeploymentManagerResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.SetWorkerDeploymentManagerResponse; - - /** - * Creates a plain object from a SetWorkerDeploymentManagerResponse message. Also converts values to other types if specified. - * @param message SetWorkerDeploymentManagerResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.SetWorkerDeploymentManagerResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetWorkerDeploymentManagerResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetWorkerDeploymentManagerResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetCurrentDeploymentRequest. */ - interface IGetCurrentDeploymentRequest { - - /** GetCurrentDeploymentRequest namespace */ - namespace?: (string|null); - - /** GetCurrentDeploymentRequest seriesName */ - seriesName?: (string|null); - } - - /** - * Returns the Current Deployment of a deployment series. - * [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later - */ - class GetCurrentDeploymentRequest implements IGetCurrentDeploymentRequest { - - /** - * Constructs a new GetCurrentDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetCurrentDeploymentRequest); - - /** GetCurrentDeploymentRequest namespace. */ - public namespace: string; - - /** GetCurrentDeploymentRequest seriesName. */ - public seriesName: string; - - /** - * Creates a new GetCurrentDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetCurrentDeploymentRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetCurrentDeploymentRequest): temporal.api.workflowservice.v1.GetCurrentDeploymentRequest; - - /** - * Encodes the specified GetCurrentDeploymentRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.GetCurrentDeploymentRequest.verify|verify} messages. - * @param message GetCurrentDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetCurrentDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetCurrentDeploymentRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetCurrentDeploymentRequest.verify|verify} messages. - * @param message GetCurrentDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetCurrentDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetCurrentDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetCurrentDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetCurrentDeploymentRequest; - - /** - * Decodes a GetCurrentDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetCurrentDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetCurrentDeploymentRequest; - - /** - * Creates a GetCurrentDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetCurrentDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetCurrentDeploymentRequest; - - /** - * Creates a plain object from a GetCurrentDeploymentRequest message. Also converts values to other types if specified. - * @param message GetCurrentDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetCurrentDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetCurrentDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetCurrentDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetCurrentDeploymentResponse. */ - interface IGetCurrentDeploymentResponse { - - /** GetCurrentDeploymentResponse currentDeploymentInfo */ - currentDeploymentInfo?: (temporal.api.deployment.v1.IDeploymentInfo|null); - } - - /** [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later */ - class GetCurrentDeploymentResponse implements IGetCurrentDeploymentResponse { - - /** - * Constructs a new GetCurrentDeploymentResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetCurrentDeploymentResponse); - - /** GetCurrentDeploymentResponse currentDeploymentInfo. */ - public currentDeploymentInfo?: (temporal.api.deployment.v1.IDeploymentInfo|null); - - /** - * Creates a new GetCurrentDeploymentResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetCurrentDeploymentResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetCurrentDeploymentResponse): temporal.api.workflowservice.v1.GetCurrentDeploymentResponse; - - /** - * Encodes the specified GetCurrentDeploymentResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.GetCurrentDeploymentResponse.verify|verify} messages. - * @param message GetCurrentDeploymentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetCurrentDeploymentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetCurrentDeploymentResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetCurrentDeploymentResponse.verify|verify} messages. - * @param message GetCurrentDeploymentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetCurrentDeploymentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetCurrentDeploymentResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetCurrentDeploymentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetCurrentDeploymentResponse; - - /** - * Decodes a GetCurrentDeploymentResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetCurrentDeploymentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetCurrentDeploymentResponse; - - /** - * Creates a GetCurrentDeploymentResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetCurrentDeploymentResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetCurrentDeploymentResponse; - - /** - * Creates a plain object from a GetCurrentDeploymentResponse message. Also converts values to other types if specified. - * @param message GetCurrentDeploymentResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetCurrentDeploymentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetCurrentDeploymentResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetCurrentDeploymentResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetDeploymentReachabilityRequest. */ - interface IGetDeploymentReachabilityRequest { - - /** GetDeploymentReachabilityRequest namespace */ - namespace?: (string|null); - - /** GetDeploymentReachabilityRequest deployment */ - deployment?: (temporal.api.deployment.v1.IDeployment|null); - } - - /** [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later */ - class GetDeploymentReachabilityRequest implements IGetDeploymentReachabilityRequest { - - /** - * Constructs a new GetDeploymentReachabilityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetDeploymentReachabilityRequest); - - /** GetDeploymentReachabilityRequest namespace. */ - public namespace: string; - - /** GetDeploymentReachabilityRequest deployment. */ - public deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** - * Creates a new GetDeploymentReachabilityRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetDeploymentReachabilityRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetDeploymentReachabilityRequest): temporal.api.workflowservice.v1.GetDeploymentReachabilityRequest; - - /** - * Encodes the specified GetDeploymentReachabilityRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.GetDeploymentReachabilityRequest.verify|verify} messages. - * @param message GetDeploymentReachabilityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetDeploymentReachabilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetDeploymentReachabilityRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetDeploymentReachabilityRequest.verify|verify} messages. - * @param message GetDeploymentReachabilityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetDeploymentReachabilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetDeploymentReachabilityRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetDeploymentReachabilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetDeploymentReachabilityRequest; - - /** - * Decodes a GetDeploymentReachabilityRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetDeploymentReachabilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetDeploymentReachabilityRequest; - - /** - * Creates a GetDeploymentReachabilityRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDeploymentReachabilityRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetDeploymentReachabilityRequest; - - /** - * Creates a plain object from a GetDeploymentReachabilityRequest message. Also converts values to other types if specified. - * @param message GetDeploymentReachabilityRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetDeploymentReachabilityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetDeploymentReachabilityRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetDeploymentReachabilityRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetDeploymentReachabilityResponse. */ - interface IGetDeploymentReachabilityResponse { - - /** GetDeploymentReachabilityResponse deploymentInfo */ - deploymentInfo?: (temporal.api.deployment.v1.IDeploymentInfo|null); - - /** GetDeploymentReachabilityResponse reachability */ - reachability?: (temporal.api.enums.v1.DeploymentReachability|null); - - /** - * Reachability level might come from server cache. This timestamp specifies when the value - * was actually calculated. - */ - lastUpdateTime?: (google.protobuf.ITimestamp|null); - } - - /** [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later */ - class GetDeploymentReachabilityResponse implements IGetDeploymentReachabilityResponse { - - /** - * Constructs a new GetDeploymentReachabilityResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IGetDeploymentReachabilityResponse); - - /** GetDeploymentReachabilityResponse deploymentInfo. */ - public deploymentInfo?: (temporal.api.deployment.v1.IDeploymentInfo|null); - - /** GetDeploymentReachabilityResponse reachability. */ - public reachability: temporal.api.enums.v1.DeploymentReachability; - - /** - * Reachability level might come from server cache. This timestamp specifies when the value - * was actually calculated. - */ - public lastUpdateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new GetDeploymentReachabilityResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetDeploymentReachabilityResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IGetDeploymentReachabilityResponse): temporal.api.workflowservice.v1.GetDeploymentReachabilityResponse; - - /** - * Encodes the specified GetDeploymentReachabilityResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.GetDeploymentReachabilityResponse.verify|verify} messages. - * @param message GetDeploymentReachabilityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IGetDeploymentReachabilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetDeploymentReachabilityResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.GetDeploymentReachabilityResponse.verify|verify} messages. - * @param message GetDeploymentReachabilityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IGetDeploymentReachabilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetDeploymentReachabilityResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetDeploymentReachabilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.GetDeploymentReachabilityResponse; - - /** - * Decodes a GetDeploymentReachabilityResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetDeploymentReachabilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.GetDeploymentReachabilityResponse; - - /** - * Creates a GetDeploymentReachabilityResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDeploymentReachabilityResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.GetDeploymentReachabilityResponse; - - /** - * Creates a plain object from a GetDeploymentReachabilityResponse message. Also converts values to other types if specified. - * @param message GetDeploymentReachabilityResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.GetDeploymentReachabilityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetDeploymentReachabilityResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetDeploymentReachabilityResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateWorkflowRuleRequest. */ - interface ICreateWorkflowRuleRequest { - - /** CreateWorkflowRuleRequest namespace */ - namespace?: (string|null); - - /** The rule specification . */ - spec?: (temporal.api.rules.v1.IWorkflowRuleSpec|null); - - /** - * If true, the rule will be applied to the currently running workflows via batch job. - * If not set , the rule will only be applied when triggering condition is satisfied. - * visibility_query in the rule will be used to select the workflows to apply the rule to. - */ - forceScan?: (boolean|null); - - /** Used to de-dupe requests. Typically should be UUID. */ - requestId?: (string|null); - - /** Identity of the actor who created the rule. Will be stored with the rule. */ - identity?: (string|null); - - /** Rule description.Will be stored with the rule. */ - description?: (string|null); - } - - /** Represents a CreateWorkflowRuleRequest. */ - class CreateWorkflowRuleRequest implements ICreateWorkflowRuleRequest { - - /** - * Constructs a new CreateWorkflowRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ICreateWorkflowRuleRequest); - - /** CreateWorkflowRuleRequest namespace. */ - public namespace: string; - - /** The rule specification . */ - public spec?: (temporal.api.rules.v1.IWorkflowRuleSpec|null); - - /** - * If true, the rule will be applied to the currently running workflows via batch job. - * If not set , the rule will only be applied when triggering condition is satisfied. - * visibility_query in the rule will be used to select the workflows to apply the rule to. - */ - public forceScan: boolean; - - /** Used to de-dupe requests. Typically should be UUID. */ - public requestId: string; - - /** Identity of the actor who created the rule. Will be stored with the rule. */ - public identity: string; - - /** Rule description.Will be stored with the rule. */ - public description: string; - - /** - * Creates a new CreateWorkflowRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateWorkflowRuleRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ICreateWorkflowRuleRequest): temporal.api.workflowservice.v1.CreateWorkflowRuleRequest; - - /** - * Encodes the specified CreateWorkflowRuleRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.CreateWorkflowRuleRequest.verify|verify} messages. - * @param message CreateWorkflowRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ICreateWorkflowRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateWorkflowRuleRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.CreateWorkflowRuleRequest.verify|verify} messages. - * @param message CreateWorkflowRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ICreateWorkflowRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateWorkflowRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateWorkflowRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.CreateWorkflowRuleRequest; - - /** - * Decodes a CreateWorkflowRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateWorkflowRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.CreateWorkflowRuleRequest; - - /** - * Creates a CreateWorkflowRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateWorkflowRuleRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.CreateWorkflowRuleRequest; - - /** - * Creates a plain object from a CreateWorkflowRuleRequest message. Also converts values to other types if specified. - * @param message CreateWorkflowRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.CreateWorkflowRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateWorkflowRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateWorkflowRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateWorkflowRuleResponse. */ - interface ICreateWorkflowRuleResponse { - - /** Created rule. */ - rule?: (temporal.api.rules.v1.IWorkflowRule|null); - - /** Batch Job ID if force-scan flag was provided. Otherwise empty. */ - jobId?: (string|null); - } - - /** Represents a CreateWorkflowRuleResponse. */ - class CreateWorkflowRuleResponse implements ICreateWorkflowRuleResponse { - - /** - * Constructs a new CreateWorkflowRuleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ICreateWorkflowRuleResponse); - - /** Created rule. */ - public rule?: (temporal.api.rules.v1.IWorkflowRule|null); - - /** Batch Job ID if force-scan flag was provided. Otherwise empty. */ - public jobId: string; - - /** - * Creates a new CreateWorkflowRuleResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateWorkflowRuleResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ICreateWorkflowRuleResponse): temporal.api.workflowservice.v1.CreateWorkflowRuleResponse; - - /** - * Encodes the specified CreateWorkflowRuleResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.CreateWorkflowRuleResponse.verify|verify} messages. - * @param message CreateWorkflowRuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ICreateWorkflowRuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateWorkflowRuleResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.CreateWorkflowRuleResponse.verify|verify} messages. - * @param message CreateWorkflowRuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ICreateWorkflowRuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateWorkflowRuleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateWorkflowRuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.CreateWorkflowRuleResponse; - - /** - * Decodes a CreateWorkflowRuleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateWorkflowRuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.CreateWorkflowRuleResponse; - - /** - * Creates a CreateWorkflowRuleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateWorkflowRuleResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.CreateWorkflowRuleResponse; - - /** - * Creates a plain object from a CreateWorkflowRuleResponse message. Also converts values to other types if specified. - * @param message CreateWorkflowRuleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.CreateWorkflowRuleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateWorkflowRuleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateWorkflowRuleResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeWorkflowRuleRequest. */ - interface IDescribeWorkflowRuleRequest { - - /** DescribeWorkflowRuleRequest namespace */ - namespace?: (string|null); - - /** User-specified ID of the rule to read. Unique within the namespace. */ - ruleId?: (string|null); - } - - /** Represents a DescribeWorkflowRuleRequest. */ - class DescribeWorkflowRuleRequest implements IDescribeWorkflowRuleRequest { - - /** - * Constructs a new DescribeWorkflowRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeWorkflowRuleRequest); - - /** DescribeWorkflowRuleRequest namespace. */ - public namespace: string; - - /** User-specified ID of the rule to read. Unique within the namespace. */ - public ruleId: string; - - /** - * Creates a new DescribeWorkflowRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeWorkflowRuleRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeWorkflowRuleRequest): temporal.api.workflowservice.v1.DescribeWorkflowRuleRequest; - - /** - * Encodes the specified DescribeWorkflowRuleRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkflowRuleRequest.verify|verify} messages. - * @param message DescribeWorkflowRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeWorkflowRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeWorkflowRuleRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkflowRuleRequest.verify|verify} messages. - * @param message DescribeWorkflowRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeWorkflowRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeWorkflowRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeWorkflowRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeWorkflowRuleRequest; - - /** - * Decodes a DescribeWorkflowRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeWorkflowRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeWorkflowRuleRequest; - - /** - * Creates a DescribeWorkflowRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeWorkflowRuleRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeWorkflowRuleRequest; - - /** - * Creates a plain object from a DescribeWorkflowRuleRequest message. Also converts values to other types if specified. - * @param message DescribeWorkflowRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeWorkflowRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeWorkflowRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeWorkflowRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeWorkflowRuleResponse. */ - interface IDescribeWorkflowRuleResponse { - - /** The rule that was read. */ - rule?: (temporal.api.rules.v1.IWorkflowRule|null); - } - - /** Represents a DescribeWorkflowRuleResponse. */ - class DescribeWorkflowRuleResponse implements IDescribeWorkflowRuleResponse { - - /** - * Constructs a new DescribeWorkflowRuleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeWorkflowRuleResponse); - - /** The rule that was read. */ - public rule?: (temporal.api.rules.v1.IWorkflowRule|null); - - /** - * Creates a new DescribeWorkflowRuleResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeWorkflowRuleResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeWorkflowRuleResponse): temporal.api.workflowservice.v1.DescribeWorkflowRuleResponse; - - /** - * Encodes the specified DescribeWorkflowRuleResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkflowRuleResponse.verify|verify} messages. - * @param message DescribeWorkflowRuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeWorkflowRuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeWorkflowRuleResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkflowRuleResponse.verify|verify} messages. - * @param message DescribeWorkflowRuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeWorkflowRuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeWorkflowRuleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeWorkflowRuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeWorkflowRuleResponse; - - /** - * Decodes a DescribeWorkflowRuleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeWorkflowRuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeWorkflowRuleResponse; - - /** - * Creates a DescribeWorkflowRuleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeWorkflowRuleResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeWorkflowRuleResponse; - - /** - * Creates a plain object from a DescribeWorkflowRuleResponse message. Also converts values to other types if specified. - * @param message DescribeWorkflowRuleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeWorkflowRuleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeWorkflowRuleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeWorkflowRuleResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteWorkflowRuleRequest. */ - interface IDeleteWorkflowRuleRequest { - - /** DeleteWorkflowRuleRequest namespace */ - namespace?: (string|null); - - /** ID of the rule to delete. Unique within the namespace. */ - ruleId?: (string|null); - } - - /** Represents a DeleteWorkflowRuleRequest. */ - class DeleteWorkflowRuleRequest implements IDeleteWorkflowRuleRequest { - - /** - * Constructs a new DeleteWorkflowRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDeleteWorkflowRuleRequest); - - /** DeleteWorkflowRuleRequest namespace. */ - public namespace: string; - - /** ID of the rule to delete. Unique within the namespace. */ - public ruleId: string; - - /** - * Creates a new DeleteWorkflowRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteWorkflowRuleRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDeleteWorkflowRuleRequest): temporal.api.workflowservice.v1.DeleteWorkflowRuleRequest; - - /** - * Encodes the specified DeleteWorkflowRuleRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkflowRuleRequest.verify|verify} messages. - * @param message DeleteWorkflowRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDeleteWorkflowRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteWorkflowRuleRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkflowRuleRequest.verify|verify} messages. - * @param message DeleteWorkflowRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDeleteWorkflowRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteWorkflowRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteWorkflowRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DeleteWorkflowRuleRequest; - - /** - * Decodes a DeleteWorkflowRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteWorkflowRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DeleteWorkflowRuleRequest; - - /** - * Creates a DeleteWorkflowRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteWorkflowRuleRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DeleteWorkflowRuleRequest; - - /** - * Creates a plain object from a DeleteWorkflowRuleRequest message. Also converts values to other types if specified. - * @param message DeleteWorkflowRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DeleteWorkflowRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteWorkflowRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteWorkflowRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteWorkflowRuleResponse. */ - interface IDeleteWorkflowRuleResponse { - } - - /** Represents a DeleteWorkflowRuleResponse. */ - class DeleteWorkflowRuleResponse implements IDeleteWorkflowRuleResponse { - - /** - * Constructs a new DeleteWorkflowRuleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDeleteWorkflowRuleResponse); - - /** - * Creates a new DeleteWorkflowRuleResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteWorkflowRuleResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDeleteWorkflowRuleResponse): temporal.api.workflowservice.v1.DeleteWorkflowRuleResponse; - - /** - * Encodes the specified DeleteWorkflowRuleResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkflowRuleResponse.verify|verify} messages. - * @param message DeleteWorkflowRuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDeleteWorkflowRuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteWorkflowRuleResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteWorkflowRuleResponse.verify|verify} messages. - * @param message DeleteWorkflowRuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDeleteWorkflowRuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteWorkflowRuleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteWorkflowRuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DeleteWorkflowRuleResponse; - - /** - * Decodes a DeleteWorkflowRuleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteWorkflowRuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DeleteWorkflowRuleResponse; - - /** - * Creates a DeleteWorkflowRuleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteWorkflowRuleResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DeleteWorkflowRuleResponse; - - /** - * Creates a plain object from a DeleteWorkflowRuleResponse message. Also converts values to other types if specified. - * @param message DeleteWorkflowRuleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DeleteWorkflowRuleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteWorkflowRuleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteWorkflowRuleResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListWorkflowRulesRequest. */ - interface IListWorkflowRulesRequest { - - /** ListWorkflowRulesRequest namespace */ - namespace?: (string|null); - - /** ListWorkflowRulesRequest nextPageToken */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListWorkflowRulesRequest. */ - class ListWorkflowRulesRequest implements IListWorkflowRulesRequest { - - /** - * Constructs a new ListWorkflowRulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListWorkflowRulesRequest); - - /** ListWorkflowRulesRequest namespace. */ - public namespace: string; - - /** ListWorkflowRulesRequest nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListWorkflowRulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListWorkflowRulesRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListWorkflowRulesRequest): temporal.api.workflowservice.v1.ListWorkflowRulesRequest; - - /** - * Encodes the specified ListWorkflowRulesRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkflowRulesRequest.verify|verify} messages. - * @param message ListWorkflowRulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListWorkflowRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListWorkflowRulesRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkflowRulesRequest.verify|verify} messages. - * @param message ListWorkflowRulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListWorkflowRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListWorkflowRulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListWorkflowRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListWorkflowRulesRequest; - - /** - * Decodes a ListWorkflowRulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListWorkflowRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListWorkflowRulesRequest; - - /** - * Creates a ListWorkflowRulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListWorkflowRulesRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListWorkflowRulesRequest; - - /** - * Creates a plain object from a ListWorkflowRulesRequest message. Also converts values to other types if specified. - * @param message ListWorkflowRulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListWorkflowRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListWorkflowRulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListWorkflowRulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListWorkflowRulesResponse. */ - interface IListWorkflowRulesResponse { - - /** ListWorkflowRulesResponse rules */ - rules?: (temporal.api.rules.v1.IWorkflowRule[]|null); - - /** ListWorkflowRulesResponse nextPageToken */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListWorkflowRulesResponse. */ - class ListWorkflowRulesResponse implements IListWorkflowRulesResponse { - - /** - * Constructs a new ListWorkflowRulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListWorkflowRulesResponse); - - /** ListWorkflowRulesResponse rules. */ - public rules: temporal.api.rules.v1.IWorkflowRule[]; - - /** ListWorkflowRulesResponse nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListWorkflowRulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListWorkflowRulesResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListWorkflowRulesResponse): temporal.api.workflowservice.v1.ListWorkflowRulesResponse; - - /** - * Encodes the specified ListWorkflowRulesResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkflowRulesResponse.verify|verify} messages. - * @param message ListWorkflowRulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListWorkflowRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListWorkflowRulesResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkflowRulesResponse.verify|verify} messages. - * @param message ListWorkflowRulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListWorkflowRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListWorkflowRulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListWorkflowRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListWorkflowRulesResponse; - - /** - * Decodes a ListWorkflowRulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListWorkflowRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListWorkflowRulesResponse; - - /** - * Creates a ListWorkflowRulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListWorkflowRulesResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListWorkflowRulesResponse; - - /** - * Creates a plain object from a ListWorkflowRulesResponse message. Also converts values to other types if specified. - * @param message ListWorkflowRulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListWorkflowRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListWorkflowRulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListWorkflowRulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TriggerWorkflowRuleRequest. */ - interface ITriggerWorkflowRuleRequest { - - /** TriggerWorkflowRuleRequest namespace */ - namespace?: (string|null); - - /** Execution info of the workflow which scheduled this activity */ - execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** TriggerWorkflowRuleRequest id */ - id?: (string|null); - - /** Note: Rule ID and expiration date are not used in the trigger request. */ - spec?: (temporal.api.rules.v1.IWorkflowRuleSpec|null); - - /** The identity of the client who initiated this request */ - identity?: (string|null); - } - - /** Represents a TriggerWorkflowRuleRequest. */ - class TriggerWorkflowRuleRequest implements ITriggerWorkflowRuleRequest { - - /** - * Constructs a new TriggerWorkflowRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ITriggerWorkflowRuleRequest); - - /** TriggerWorkflowRuleRequest namespace. */ - public namespace: string; - - /** Execution info of the workflow which scheduled this activity */ - public execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** TriggerWorkflowRuleRequest id. */ - public id?: (string|null); - - /** Note: Rule ID and expiration date are not used in the trigger request. */ - public spec?: (temporal.api.rules.v1.IWorkflowRuleSpec|null); - - /** The identity of the client who initiated this request */ - public identity: string; - - /** Either provide id of existing rule, or rule specification */ - public rule?: ("id"|"spec"); - - /** - * Creates a new TriggerWorkflowRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TriggerWorkflowRuleRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ITriggerWorkflowRuleRequest): temporal.api.workflowservice.v1.TriggerWorkflowRuleRequest; - - /** - * Encodes the specified TriggerWorkflowRuleRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.TriggerWorkflowRuleRequest.verify|verify} messages. - * @param message TriggerWorkflowRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ITriggerWorkflowRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TriggerWorkflowRuleRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.TriggerWorkflowRuleRequest.verify|verify} messages. - * @param message TriggerWorkflowRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ITriggerWorkflowRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TriggerWorkflowRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TriggerWorkflowRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.TriggerWorkflowRuleRequest; - - /** - * Decodes a TriggerWorkflowRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TriggerWorkflowRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.TriggerWorkflowRuleRequest; - - /** - * Creates a TriggerWorkflowRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TriggerWorkflowRuleRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.TriggerWorkflowRuleRequest; - - /** - * Creates a plain object from a TriggerWorkflowRuleRequest message. Also converts values to other types if specified. - * @param message TriggerWorkflowRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.TriggerWorkflowRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TriggerWorkflowRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TriggerWorkflowRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TriggerWorkflowRuleResponse. */ - interface ITriggerWorkflowRuleResponse { - - /** True is the rule was applied, based on the rule conditions (predicate/visibility_query). */ - applied?: (boolean|null); - } - - /** Represents a TriggerWorkflowRuleResponse. */ - class TriggerWorkflowRuleResponse implements ITriggerWorkflowRuleResponse { - - /** - * Constructs a new TriggerWorkflowRuleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ITriggerWorkflowRuleResponse); - - /** True is the rule was applied, based on the rule conditions (predicate/visibility_query). */ - public applied: boolean; - - /** - * Creates a new TriggerWorkflowRuleResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns TriggerWorkflowRuleResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ITriggerWorkflowRuleResponse): temporal.api.workflowservice.v1.TriggerWorkflowRuleResponse; - - /** - * Encodes the specified TriggerWorkflowRuleResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.TriggerWorkflowRuleResponse.verify|verify} messages. - * @param message TriggerWorkflowRuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ITriggerWorkflowRuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TriggerWorkflowRuleResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.TriggerWorkflowRuleResponse.verify|verify} messages. - * @param message TriggerWorkflowRuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ITriggerWorkflowRuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TriggerWorkflowRuleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TriggerWorkflowRuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.TriggerWorkflowRuleResponse; - - /** - * Decodes a TriggerWorkflowRuleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TriggerWorkflowRuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.TriggerWorkflowRuleResponse; - - /** - * Creates a TriggerWorkflowRuleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TriggerWorkflowRuleResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.TriggerWorkflowRuleResponse; - - /** - * Creates a plain object from a TriggerWorkflowRuleResponse message. Also converts values to other types if specified. - * @param message TriggerWorkflowRuleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.TriggerWorkflowRuleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TriggerWorkflowRuleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TriggerWorkflowRuleResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RecordWorkerHeartbeatRequest. */ - interface IRecordWorkerHeartbeatRequest { - - /** Namespace this worker belongs to. */ - namespace?: (string|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - - /** RecordWorkerHeartbeatRequest workerHeartbeat */ - workerHeartbeat?: (temporal.api.worker.v1.IWorkerHeartbeat[]|null); - } - - /** Represents a RecordWorkerHeartbeatRequest. */ - class RecordWorkerHeartbeatRequest implements IRecordWorkerHeartbeatRequest { - - /** - * Constructs a new RecordWorkerHeartbeatRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRecordWorkerHeartbeatRequest); - - /** Namespace this worker belongs to. */ - public namespace: string; - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** RecordWorkerHeartbeatRequest workerHeartbeat. */ - public workerHeartbeat: temporal.api.worker.v1.IWorkerHeartbeat[]; - - /** - * Creates a new RecordWorkerHeartbeatRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RecordWorkerHeartbeatRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRecordWorkerHeartbeatRequest): temporal.api.workflowservice.v1.RecordWorkerHeartbeatRequest; - - /** - * Encodes the specified RecordWorkerHeartbeatRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RecordWorkerHeartbeatRequest.verify|verify} messages. - * @param message RecordWorkerHeartbeatRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRecordWorkerHeartbeatRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecordWorkerHeartbeatRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RecordWorkerHeartbeatRequest.verify|verify} messages. - * @param message RecordWorkerHeartbeatRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRecordWorkerHeartbeatRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecordWorkerHeartbeatRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecordWorkerHeartbeatRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RecordWorkerHeartbeatRequest; - - /** - * Decodes a RecordWorkerHeartbeatRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecordWorkerHeartbeatRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RecordWorkerHeartbeatRequest; - - /** - * Creates a RecordWorkerHeartbeatRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecordWorkerHeartbeatRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RecordWorkerHeartbeatRequest; - - /** - * Creates a plain object from a RecordWorkerHeartbeatRequest message. Also converts values to other types if specified. - * @param message RecordWorkerHeartbeatRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RecordWorkerHeartbeatRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecordWorkerHeartbeatRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RecordWorkerHeartbeatRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RecordWorkerHeartbeatResponse. */ - interface IRecordWorkerHeartbeatResponse { - } - - /** Represents a RecordWorkerHeartbeatResponse. */ - class RecordWorkerHeartbeatResponse implements IRecordWorkerHeartbeatResponse { - - /** - * Constructs a new RecordWorkerHeartbeatResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRecordWorkerHeartbeatResponse); - - /** - * Creates a new RecordWorkerHeartbeatResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RecordWorkerHeartbeatResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRecordWorkerHeartbeatResponse): temporal.api.workflowservice.v1.RecordWorkerHeartbeatResponse; - - /** - * Encodes the specified RecordWorkerHeartbeatResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RecordWorkerHeartbeatResponse.verify|verify} messages. - * @param message RecordWorkerHeartbeatResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRecordWorkerHeartbeatResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecordWorkerHeartbeatResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RecordWorkerHeartbeatResponse.verify|verify} messages. - * @param message RecordWorkerHeartbeatResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRecordWorkerHeartbeatResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecordWorkerHeartbeatResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecordWorkerHeartbeatResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RecordWorkerHeartbeatResponse; - - /** - * Decodes a RecordWorkerHeartbeatResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecordWorkerHeartbeatResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RecordWorkerHeartbeatResponse; - - /** - * Creates a RecordWorkerHeartbeatResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecordWorkerHeartbeatResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RecordWorkerHeartbeatResponse; - - /** - * Creates a plain object from a RecordWorkerHeartbeatResponse message. Also converts values to other types if specified. - * @param message RecordWorkerHeartbeatResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RecordWorkerHeartbeatResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecordWorkerHeartbeatResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RecordWorkerHeartbeatResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListWorkersRequest. */ - interface IListWorkersRequest { - - /** ListWorkersRequest namespace */ - namespace?: (string|null); - - /** ListWorkersRequest pageSize */ - pageSize?: (number|null); - - /** ListWorkersRequest nextPageToken */ - nextPageToken?: (Uint8Array|null); - - /** - * `query` in ListWorkers is used to filter workers based on worker status info. - * The following worker status attributes are expected are supported as part of the query: - * WorkerInstanceKey - * WorkerIdentity - * HostName - * TaskQueue - * DeploymentName - * BuildId - * SdkName - * SdkVersion - * StartTime - * LastHeartbeatTime - * Status - * Currently metrics are not supported as a part of ListWorkers query. - */ - query?: (string|null); - } - - /** Represents a ListWorkersRequest. */ - class ListWorkersRequest implements IListWorkersRequest { - - /** - * Constructs a new ListWorkersRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListWorkersRequest); - - /** ListWorkersRequest namespace. */ - public namespace: string; - - /** ListWorkersRequest pageSize. */ - public pageSize: number; - - /** ListWorkersRequest nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * `query` in ListWorkers is used to filter workers based on worker status info. - * The following worker status attributes are expected are supported as part of the query: - * * WorkerInstanceKey - * * WorkerIdentity - * * HostName - * * TaskQueue - * * DeploymentName - * * BuildId - * * SdkName - * * SdkVersion - * * StartTime - * * LastHeartbeatTime - * * Status - * Currently metrics are not supported as a part of ListWorkers query. - */ - public query: string; - - /** - * Creates a new ListWorkersRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListWorkersRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListWorkersRequest): temporal.api.workflowservice.v1.ListWorkersRequest; - - /** - * Encodes the specified ListWorkersRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkersRequest.verify|verify} messages. - * @param message ListWorkersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListWorkersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListWorkersRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkersRequest.verify|verify} messages. - * @param message ListWorkersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListWorkersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListWorkersRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListWorkersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListWorkersRequest; - - /** - * Decodes a ListWorkersRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListWorkersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListWorkersRequest; - - /** - * Creates a ListWorkersRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListWorkersRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListWorkersRequest; - - /** - * Creates a plain object from a ListWorkersRequest message. Also converts values to other types if specified. - * @param message ListWorkersRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListWorkersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListWorkersRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListWorkersRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListWorkersResponse. */ - interface IListWorkersResponse { - - /** ListWorkersResponse workersInfo */ - workersInfo?: (temporal.api.worker.v1.IWorkerInfo[]|null); - - /** Next page token */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListWorkersResponse. */ - class ListWorkersResponse implements IListWorkersResponse { - - /** - * Constructs a new ListWorkersResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListWorkersResponse); - - /** ListWorkersResponse workersInfo. */ - public workersInfo: temporal.api.worker.v1.IWorkerInfo[]; - - /** Next page token */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListWorkersResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListWorkersResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListWorkersResponse): temporal.api.workflowservice.v1.ListWorkersResponse; - - /** - * Encodes the specified ListWorkersResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkersResponse.verify|verify} messages. - * @param message ListWorkersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListWorkersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListWorkersResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListWorkersResponse.verify|verify} messages. - * @param message ListWorkersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListWorkersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListWorkersResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListWorkersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListWorkersResponse; - - /** - * Decodes a ListWorkersResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListWorkersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListWorkersResponse; - - /** - * Creates a ListWorkersResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListWorkersResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListWorkersResponse; - - /** - * Creates a plain object from a ListWorkersResponse message. Also converts values to other types if specified. - * @param message ListWorkersResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListWorkersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListWorkersResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListWorkersResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateTaskQueueConfigRequest. */ - interface IUpdateTaskQueueConfigRequest { - - /** UpdateTaskQueueConfigRequest namespace */ - namespace?: (string|null); - - /** UpdateTaskQueueConfigRequest identity */ - identity?: (string|null); - - /** Selects the task queue to update. */ - taskQueue?: (string|null); - - /** UpdateTaskQueueConfigRequest taskQueueType */ - taskQueueType?: (temporal.api.enums.v1.TaskQueueType|null); - - /** - * Update to queue-wide rate limit. - * If not set, this configuration is unchanged. - * NOTE: A limit set by the worker is overriden; and restored again when reset. - * If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit. - */ - updateQueueRateLimit?: (temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.IRateLimitUpdate|null); - - /** - * Update to the default fairness key rate limit. - * If not set, this configuration is unchanged. - * If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit. - */ - updateFairnessKeyRateLimitDefault?: (temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.IRateLimitUpdate|null); - - /** - * If set, overrides the fairness weight for each specified fairness key. - * Fairness keys not listed in this map will keep their existing overrides (if any). - */ - setFairnessWeightOverrides?: ({ [k: string]: number }|null); - - /** - * If set, removes any existing fairness weight overrides for each specified fairness key. - * Fairness weights for corresponding keys fall back to the values set during task creation (if any), - * or to the default weight of 1.0. - */ - unsetFairnessWeightOverrides?: (string[]|null); - } - - /** Represents an UpdateTaskQueueConfigRequest. */ - class UpdateTaskQueueConfigRequest implements IUpdateTaskQueueConfigRequest { - - /** - * Constructs a new UpdateTaskQueueConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateTaskQueueConfigRequest); - - /** UpdateTaskQueueConfigRequest namespace. */ - public namespace: string; - - /** UpdateTaskQueueConfigRequest identity. */ - public identity: string; - - /** Selects the task queue to update. */ - public taskQueue: string; - - /** UpdateTaskQueueConfigRequest taskQueueType. */ - public taskQueueType: temporal.api.enums.v1.TaskQueueType; - - /** - * Update to queue-wide rate limit. - * If not set, this configuration is unchanged. - * NOTE: A limit set by the worker is overriden; and restored again when reset. - * If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit. - */ - public updateQueueRateLimit?: (temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.IRateLimitUpdate|null); - - /** - * Update to the default fairness key rate limit. - * If not set, this configuration is unchanged. - * If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit. - */ - public updateFairnessKeyRateLimitDefault?: (temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.IRateLimitUpdate|null); - - /** - * If set, overrides the fairness weight for each specified fairness key. - * Fairness keys not listed in this map will keep their existing overrides (if any). - */ - public setFairnessWeightOverrides: { [k: string]: number }; - - /** - * If set, removes any existing fairness weight overrides for each specified fairness key. - * Fairness weights for corresponding keys fall back to the values set during task creation (if any), - * or to the default weight of 1.0. - */ - public unsetFairnessWeightOverrides: string[]; - - /** - * Creates a new UpdateTaskQueueConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTaskQueueConfigRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateTaskQueueConfigRequest): temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest; - - /** - * Encodes the specified UpdateTaskQueueConfigRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.verify|verify} messages. - * @param message UpdateTaskQueueConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateTaskQueueConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateTaskQueueConfigRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.verify|verify} messages. - * @param message UpdateTaskQueueConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateTaskQueueConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateTaskQueueConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTaskQueueConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest; - - /** - * Decodes an UpdateTaskQueueConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTaskQueueConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest; - - /** - * Creates an UpdateTaskQueueConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTaskQueueConfigRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest; - - /** - * Creates a plain object from an UpdateTaskQueueConfigRequest message. Also converts values to other types if specified. - * @param message UpdateTaskQueueConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateTaskQueueConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateTaskQueueConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UpdateTaskQueueConfigRequest { - - /** Properties of a RateLimitUpdate. */ - interface IRateLimitUpdate { - - /** Rate Limit to be updated */ - rateLimit?: (temporal.api.taskqueue.v1.IRateLimit|null); - - /** Reason for why the rate limit was set. */ - reason?: (string|null); - } - - /** Represents a RateLimitUpdate. */ - class RateLimitUpdate implements IRateLimitUpdate { - - /** - * Constructs a new RateLimitUpdate. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.IRateLimitUpdate); - - /** Rate Limit to be updated */ - public rateLimit?: (temporal.api.taskqueue.v1.IRateLimit|null); - - /** Reason for why the rate limit was set. */ - public reason: string; - - /** - * Creates a new RateLimitUpdate instance using the specified properties. - * @param [properties] Properties to set - * @returns RateLimitUpdate instance - */ - public static create(properties?: temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.IRateLimitUpdate): temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate; - - /** - * Encodes the specified RateLimitUpdate message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate.verify|verify} messages. - * @param message RateLimitUpdate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.IRateLimitUpdate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RateLimitUpdate message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate.verify|verify} messages. - * @param message RateLimitUpdate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.IRateLimitUpdate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RateLimitUpdate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RateLimitUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate; - - /** - * Decodes a RateLimitUpdate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RateLimitUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate; - - /** - * Creates a RateLimitUpdate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RateLimitUpdate - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate; - - /** - * Creates a plain object from a RateLimitUpdate message. Also converts values to other types if specified. - * @param message RateLimitUpdate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RateLimitUpdate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RateLimitUpdate - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an UpdateTaskQueueConfigResponse. */ - interface IUpdateTaskQueueConfigResponse { - - /** UpdateTaskQueueConfigResponse config */ - config?: (temporal.api.taskqueue.v1.ITaskQueueConfig|null); - } - - /** Represents an UpdateTaskQueueConfigResponse. */ - class UpdateTaskQueueConfigResponse implements IUpdateTaskQueueConfigResponse { - - /** - * Constructs a new UpdateTaskQueueConfigResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateTaskQueueConfigResponse); - - /** UpdateTaskQueueConfigResponse config. */ - public config?: (temporal.api.taskqueue.v1.ITaskQueueConfig|null); - - /** - * Creates a new UpdateTaskQueueConfigResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTaskQueueConfigResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateTaskQueueConfigResponse): temporal.api.workflowservice.v1.UpdateTaskQueueConfigResponse; - - /** - * Encodes the specified UpdateTaskQueueConfigResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateTaskQueueConfigResponse.verify|verify} messages. - * @param message UpdateTaskQueueConfigResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateTaskQueueConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateTaskQueueConfigResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateTaskQueueConfigResponse.verify|verify} messages. - * @param message UpdateTaskQueueConfigResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateTaskQueueConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateTaskQueueConfigResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTaskQueueConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateTaskQueueConfigResponse; - - /** - * Decodes an UpdateTaskQueueConfigResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTaskQueueConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateTaskQueueConfigResponse; - - /** - * Creates an UpdateTaskQueueConfigResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTaskQueueConfigResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateTaskQueueConfigResponse; - - /** - * Creates a plain object from an UpdateTaskQueueConfigResponse message. Also converts values to other types if specified. - * @param message UpdateTaskQueueConfigResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateTaskQueueConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateTaskQueueConfigResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateTaskQueueConfigResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchWorkerConfigRequest. */ - interface IFetchWorkerConfigRequest { - - /** Namespace this worker belongs to. */ - namespace?: (string|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - - /** Reason for sending worker command, can be used for audit purpose. */ - reason?: (string|null); - - /** - * Defines which workers should receive this command. - * only single worker is supported at this time. - */ - selector?: (temporal.api.common.v1.IWorkerSelector|null); - } - - /** Represents a FetchWorkerConfigRequest. */ - class FetchWorkerConfigRequest implements IFetchWorkerConfigRequest { - - /** - * Constructs a new FetchWorkerConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IFetchWorkerConfigRequest); - - /** Namespace this worker belongs to. */ - public namespace: string; - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** Reason for sending worker command, can be used for audit purpose. */ - public reason: string; - - /** - * Defines which workers should receive this command. - * only single worker is supported at this time. - */ - public selector?: (temporal.api.common.v1.IWorkerSelector|null); - - /** - * Creates a new FetchWorkerConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchWorkerConfigRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IFetchWorkerConfigRequest): temporal.api.workflowservice.v1.FetchWorkerConfigRequest; - - /** - * Encodes the specified FetchWorkerConfigRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.FetchWorkerConfigRequest.verify|verify} messages. - * @param message FetchWorkerConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IFetchWorkerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchWorkerConfigRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.FetchWorkerConfigRequest.verify|verify} messages. - * @param message FetchWorkerConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IFetchWorkerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchWorkerConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchWorkerConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.FetchWorkerConfigRequest; - - /** - * Decodes a FetchWorkerConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchWorkerConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.FetchWorkerConfigRequest; - - /** - * Creates a FetchWorkerConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchWorkerConfigRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.FetchWorkerConfigRequest; - - /** - * Creates a plain object from a FetchWorkerConfigRequest message. Also converts values to other types if specified. - * @param message FetchWorkerConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.FetchWorkerConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchWorkerConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchWorkerConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchWorkerConfigResponse. */ - interface IFetchWorkerConfigResponse { - - /** The worker configuration. */ - workerConfig?: (temporal.api.sdk.v1.IWorkerConfig|null); - } - - /** Represents a FetchWorkerConfigResponse. */ - class FetchWorkerConfigResponse implements IFetchWorkerConfigResponse { - - /** - * Constructs a new FetchWorkerConfigResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IFetchWorkerConfigResponse); - - /** The worker configuration. */ - public workerConfig?: (temporal.api.sdk.v1.IWorkerConfig|null); - - /** - * Creates a new FetchWorkerConfigResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchWorkerConfigResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IFetchWorkerConfigResponse): temporal.api.workflowservice.v1.FetchWorkerConfigResponse; - - /** - * Encodes the specified FetchWorkerConfigResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.FetchWorkerConfigResponse.verify|verify} messages. - * @param message FetchWorkerConfigResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IFetchWorkerConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchWorkerConfigResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.FetchWorkerConfigResponse.verify|verify} messages. - * @param message FetchWorkerConfigResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IFetchWorkerConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchWorkerConfigResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchWorkerConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.FetchWorkerConfigResponse; - - /** - * Decodes a FetchWorkerConfigResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchWorkerConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.FetchWorkerConfigResponse; - - /** - * Creates a FetchWorkerConfigResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchWorkerConfigResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.FetchWorkerConfigResponse; - - /** - * Creates a plain object from a FetchWorkerConfigResponse message. Also converts values to other types if specified. - * @param message FetchWorkerConfigResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.FetchWorkerConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchWorkerConfigResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchWorkerConfigResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateWorkerConfigRequest. */ - interface IUpdateWorkerConfigRequest { - - /** Namespace this worker belongs to. */ - namespace?: (string|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - - /** Reason for sending worker command, can be used for audit purpose. */ - reason?: (string|null); - - /** - * Partial updates are accepted and controlled by update_mask. - * The worker configuration to set. - */ - workerConfig?: (temporal.api.sdk.v1.IWorkerConfig|null); - - /** Controls which fields from `worker_config` will be applied */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** Defines which workers should receive this command. */ - selector?: (temporal.api.common.v1.IWorkerSelector|null); - } - - /** Represents an UpdateWorkerConfigRequest. */ - class UpdateWorkerConfigRequest implements IUpdateWorkerConfigRequest { - - /** - * Constructs a new UpdateWorkerConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateWorkerConfigRequest); - - /** Namespace this worker belongs to. */ - public namespace: string; - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** Reason for sending worker command, can be used for audit purpose. */ - public reason: string; - - /** - * Partial updates are accepted and controlled by update_mask. - * The worker configuration to set. - */ - public workerConfig?: (temporal.api.sdk.v1.IWorkerConfig|null); - - /** Controls which fields from `worker_config` will be applied */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** Defines which workers should receive this command. */ - public selector?: (temporal.api.common.v1.IWorkerSelector|null); - - /** - * Creates a new UpdateWorkerConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateWorkerConfigRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateWorkerConfigRequest): temporal.api.workflowservice.v1.UpdateWorkerConfigRequest; - - /** - * Encodes the specified UpdateWorkerConfigRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerConfigRequest.verify|verify} messages. - * @param message UpdateWorkerConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateWorkerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateWorkerConfigRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerConfigRequest.verify|verify} messages. - * @param message UpdateWorkerConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateWorkerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateWorkerConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateWorkerConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerConfigRequest; - - /** - * Decodes an UpdateWorkerConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateWorkerConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerConfigRequest; - - /** - * Creates an UpdateWorkerConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateWorkerConfigRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerConfigRequest; - - /** - * Creates a plain object from an UpdateWorkerConfigRequest message. Also converts values to other types if specified. - * @param message UpdateWorkerConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateWorkerConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateWorkerConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateWorkerConfigResponse. */ - interface IUpdateWorkerConfigResponse { - - /** The worker configuration. Will be returned if the command was sent to a single worker. */ - workerConfig?: (temporal.api.sdk.v1.IWorkerConfig|null); - } - - /** Represents an UpdateWorkerConfigResponse. */ - class UpdateWorkerConfigResponse implements IUpdateWorkerConfigResponse { - - /** - * Constructs a new UpdateWorkerConfigResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUpdateWorkerConfigResponse); - - /** The worker configuration. Will be returned if the command was sent to a single worker. */ - public workerConfig?: (temporal.api.sdk.v1.IWorkerConfig|null); - - /** UpdateWorkerConfigResponse response. */ - public response?: "workerConfig"; - - /** - * Creates a new UpdateWorkerConfigResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateWorkerConfigResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUpdateWorkerConfigResponse): temporal.api.workflowservice.v1.UpdateWorkerConfigResponse; - - /** - * Encodes the specified UpdateWorkerConfigResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerConfigResponse.verify|verify} messages. - * @param message UpdateWorkerConfigResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUpdateWorkerConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateWorkerConfigResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UpdateWorkerConfigResponse.verify|verify} messages. - * @param message UpdateWorkerConfigResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUpdateWorkerConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateWorkerConfigResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateWorkerConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UpdateWorkerConfigResponse; - - /** - * Decodes an UpdateWorkerConfigResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateWorkerConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UpdateWorkerConfigResponse; - - /** - * Creates an UpdateWorkerConfigResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateWorkerConfigResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UpdateWorkerConfigResponse; - - /** - * Creates a plain object from an UpdateWorkerConfigResponse message. Also converts values to other types if specified. - * @param message UpdateWorkerConfigResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UpdateWorkerConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateWorkerConfigResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateWorkerConfigResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeWorkerRequest. */ - interface IDescribeWorkerRequest { - - /** Namespace this worker belongs to. */ - namespace?: (string|null); - - /** Worker instance key to describe. */ - workerInstanceKey?: (string|null); - } - - /** Represents a DescribeWorkerRequest. */ - class DescribeWorkerRequest implements IDescribeWorkerRequest { - - /** - * Constructs a new DescribeWorkerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeWorkerRequest); - - /** Namespace this worker belongs to. */ - public namespace: string; - - /** Worker instance key to describe. */ - public workerInstanceKey: string; - - /** - * Creates a new DescribeWorkerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeWorkerRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeWorkerRequest): temporal.api.workflowservice.v1.DescribeWorkerRequest; - - /** - * Encodes the specified DescribeWorkerRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkerRequest.verify|verify} messages. - * @param message DescribeWorkerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeWorkerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeWorkerRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkerRequest.verify|verify} messages. - * @param message DescribeWorkerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeWorkerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeWorkerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeWorkerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeWorkerRequest; - - /** - * Decodes a DescribeWorkerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeWorkerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeWorkerRequest; - - /** - * Creates a DescribeWorkerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeWorkerRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeWorkerRequest; - - /** - * Creates a plain object from a DescribeWorkerRequest message. Also converts values to other types if specified. - * @param message DescribeWorkerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeWorkerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeWorkerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeWorkerRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeWorkerResponse. */ - interface IDescribeWorkerResponse { - - /** DescribeWorkerResponse workerInfo */ - workerInfo?: (temporal.api.worker.v1.IWorkerInfo|null); - } - - /** Represents a DescribeWorkerResponse. */ - class DescribeWorkerResponse implements IDescribeWorkerResponse { - - /** - * Constructs a new DescribeWorkerResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeWorkerResponse); - - /** DescribeWorkerResponse workerInfo. */ - public workerInfo?: (temporal.api.worker.v1.IWorkerInfo|null); - - /** - * Creates a new DescribeWorkerResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeWorkerResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeWorkerResponse): temporal.api.workflowservice.v1.DescribeWorkerResponse; - - /** - * Encodes the specified DescribeWorkerResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkerResponse.verify|verify} messages. - * @param message DescribeWorkerResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeWorkerResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeWorkerResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeWorkerResponse.verify|verify} messages. - * @param message DescribeWorkerResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeWorkerResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeWorkerResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeWorkerResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeWorkerResponse; - - /** - * Decodes a DescribeWorkerResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeWorkerResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeWorkerResponse; - - /** - * Creates a DescribeWorkerResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeWorkerResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeWorkerResponse; - - /** - * Creates a plain object from a DescribeWorkerResponse message. Also converts values to other types if specified. - * @param message DescribeWorkerResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeWorkerResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeWorkerResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeWorkerResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PauseWorkflowExecutionRequest. */ - interface IPauseWorkflowExecutionRequest { - - /** Namespace of the workflow to pause. */ - namespace?: (string|null); - - /** ID of the workflow execution to be paused. Required. */ - workflowId?: (string|null); - - /** Run ID of the workflow execution to be paused. Optional. If not provided, the current run of the workflow will be paused. */ - runId?: (string|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - - /** Reason to pause the workflow execution. */ - reason?: (string|null); - - /** A unique identifier for this pause request for idempotence. Typically UUIDv4. */ - requestId?: (string|null); - } - - /** Request to pause a workflow execution. */ - class PauseWorkflowExecutionRequest implements IPauseWorkflowExecutionRequest { - - /** - * Constructs a new PauseWorkflowExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPauseWorkflowExecutionRequest); - - /** Namespace of the workflow to pause. */ - public namespace: string; - - /** ID of the workflow execution to be paused. Required. */ - public workflowId: string; - - /** Run ID of the workflow execution to be paused. Optional. If not provided, the current run of the workflow will be paused. */ - public runId: string; - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** Reason to pause the workflow execution. */ - public reason: string; - - /** A unique identifier for this pause request for idempotence. Typically UUIDv4. */ - public requestId: string; - - /** - * Creates a new PauseWorkflowExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PauseWorkflowExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPauseWorkflowExecutionRequest): temporal.api.workflowservice.v1.PauseWorkflowExecutionRequest; - - /** - * Encodes the specified PauseWorkflowExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.PauseWorkflowExecutionRequest.verify|verify} messages. - * @param message PauseWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPauseWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PauseWorkflowExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PauseWorkflowExecutionRequest.verify|verify} messages. - * @param message PauseWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPauseWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PauseWorkflowExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PauseWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PauseWorkflowExecutionRequest; - - /** - * Decodes a PauseWorkflowExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PauseWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PauseWorkflowExecutionRequest; - - /** - * Creates a PauseWorkflowExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PauseWorkflowExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PauseWorkflowExecutionRequest; - - /** - * Creates a plain object from a PauseWorkflowExecutionRequest message. Also converts values to other types if specified. - * @param message PauseWorkflowExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PauseWorkflowExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PauseWorkflowExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PauseWorkflowExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PauseWorkflowExecutionResponse. */ - interface IPauseWorkflowExecutionResponse { - } - - /** Response to a successful PauseWorkflowExecution request. */ - class PauseWorkflowExecutionResponse implements IPauseWorkflowExecutionResponse { - - /** - * Constructs a new PauseWorkflowExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPauseWorkflowExecutionResponse); - - /** - * Creates a new PauseWorkflowExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PauseWorkflowExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPauseWorkflowExecutionResponse): temporal.api.workflowservice.v1.PauseWorkflowExecutionResponse; - - /** - * Encodes the specified PauseWorkflowExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.PauseWorkflowExecutionResponse.verify|verify} messages. - * @param message PauseWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPauseWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PauseWorkflowExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PauseWorkflowExecutionResponse.verify|verify} messages. - * @param message PauseWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPauseWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PauseWorkflowExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PauseWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PauseWorkflowExecutionResponse; - - /** - * Decodes a PauseWorkflowExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PauseWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PauseWorkflowExecutionResponse; - - /** - * Creates a PauseWorkflowExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PauseWorkflowExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PauseWorkflowExecutionResponse; - - /** - * Creates a plain object from a PauseWorkflowExecutionResponse message. Also converts values to other types if specified. - * @param message PauseWorkflowExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PauseWorkflowExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PauseWorkflowExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PauseWorkflowExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UnpauseWorkflowExecutionRequest. */ - interface IUnpauseWorkflowExecutionRequest { - - /** Namespace of the workflow to unpause. */ - namespace?: (string|null); - - /** ID of the workflow execution to be paused. Required. */ - workflowId?: (string|null); - - /** Run ID of the workflow execution to be paused. Optional. If not provided, the current run of the workflow will be paused. */ - runId?: (string|null); - - /** The identity of the client who initiated this request. */ - identity?: (string|null); - - /** Reason to unpause the workflow execution. */ - reason?: (string|null); - - /** A unique identifier for this unpause request for idempotence. Typically UUIDv4. */ - requestId?: (string|null); - } - - /** Represents an UnpauseWorkflowExecutionRequest. */ - class UnpauseWorkflowExecutionRequest implements IUnpauseWorkflowExecutionRequest { - - /** - * Constructs a new UnpauseWorkflowExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUnpauseWorkflowExecutionRequest); - - /** Namespace of the workflow to unpause. */ - public namespace: string; - - /** ID of the workflow execution to be paused. Required. */ - public workflowId: string; - - /** Run ID of the workflow execution to be paused. Optional. If not provided, the current run of the workflow will be paused. */ - public runId: string; - - /** The identity of the client who initiated this request. */ - public identity: string; - - /** Reason to unpause the workflow execution. */ - public reason: string; - - /** A unique identifier for this unpause request for idempotence. Typically UUIDv4. */ - public requestId: string; - - /** - * Creates a new UnpauseWorkflowExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UnpauseWorkflowExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUnpauseWorkflowExecutionRequest): temporal.api.workflowservice.v1.UnpauseWorkflowExecutionRequest; - - /** - * Encodes the specified UnpauseWorkflowExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.UnpauseWorkflowExecutionRequest.verify|verify} messages. - * @param message UnpauseWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUnpauseWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnpauseWorkflowExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UnpauseWorkflowExecutionRequest.verify|verify} messages. - * @param message UnpauseWorkflowExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUnpauseWorkflowExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnpauseWorkflowExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnpauseWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UnpauseWorkflowExecutionRequest; - - /** - * Decodes an UnpauseWorkflowExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnpauseWorkflowExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UnpauseWorkflowExecutionRequest; - - /** - * Creates an UnpauseWorkflowExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnpauseWorkflowExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UnpauseWorkflowExecutionRequest; - - /** - * Creates a plain object from an UnpauseWorkflowExecutionRequest message. Also converts values to other types if specified. - * @param message UnpauseWorkflowExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UnpauseWorkflowExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnpauseWorkflowExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UnpauseWorkflowExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UnpauseWorkflowExecutionResponse. */ - interface IUnpauseWorkflowExecutionResponse { - } - - /** Response to a successful UnpauseWorkflowExecution request. */ - class UnpauseWorkflowExecutionResponse implements IUnpauseWorkflowExecutionResponse { - - /** - * Constructs a new UnpauseWorkflowExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IUnpauseWorkflowExecutionResponse); - - /** - * Creates a new UnpauseWorkflowExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UnpauseWorkflowExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IUnpauseWorkflowExecutionResponse): temporal.api.workflowservice.v1.UnpauseWorkflowExecutionResponse; - - /** - * Encodes the specified UnpauseWorkflowExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.UnpauseWorkflowExecutionResponse.verify|verify} messages. - * @param message UnpauseWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IUnpauseWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnpauseWorkflowExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.UnpauseWorkflowExecutionResponse.verify|verify} messages. - * @param message UnpauseWorkflowExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IUnpauseWorkflowExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnpauseWorkflowExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnpauseWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.UnpauseWorkflowExecutionResponse; - - /** - * Decodes an UnpauseWorkflowExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnpauseWorkflowExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.UnpauseWorkflowExecutionResponse; - - /** - * Creates an UnpauseWorkflowExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnpauseWorkflowExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.UnpauseWorkflowExecutionResponse; - - /** - * Creates a plain object from an UnpauseWorkflowExecutionResponse message. Also converts values to other types if specified. - * @param message UnpauseWorkflowExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.UnpauseWorkflowExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnpauseWorkflowExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UnpauseWorkflowExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartActivityExecutionRequest. */ - interface IStartActivityExecutionRequest { - - /** StartActivityExecutionRequest namespace */ - namespace?: (string|null); - - /** The identity of the client who initiated this request */ - identity?: (string|null); - - /** A unique identifier for this start request. Typically UUIDv4. */ - requestId?: (string|null); - - /** - * Identifier for this activity. Required. This identifier should be meaningful in the user's - * own system. It must be unique among activities in the same namespace, subject to the rules - * imposed by id_reuse_policy and id_conflict_policy. - */ - activityId?: (string|null); - - /** The type of the activity, a string that corresponds to a registered activity on a worker. */ - activityType?: (temporal.api.common.v1.IActivityType|null); - - /** Task queue to schedule this activity on. */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** - * Indicates how long the caller is willing to wait for an activity completion. Limits how long - * retries will be attempted. Either this or `start_to_close_timeout` must be specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Limits time an activity task can stay in a task queue before a worker picks it up. This - * timeout is always non retryable, as all a retry would achieve is to put it back into the same - * queue. Defaults to `schedule_to_close_timeout` if not specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Maximum time an activity is allowed to execute after being picked up by a worker. This - * timeout is always retryable. Either this or `schedule_to_close_timeout` must be - * specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Maximum permitted time between successful worker heartbeats. */ - heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** The retry policy for the activity. Will never exceed `schedule_to_close_timeout`. */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Serialized arguments to the activity. These are passed as arguments to the activity function. */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** - * Defines whether to allow re-using the activity id from a previously *closed* activity. - * The default policy is ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE. - */ - idReusePolicy?: (temporal.api.enums.v1.ActivityIdReusePolicy|null); - - /** - * Defines how to resolve an activity id conflict with a *running* activity. - * The default policy is ACTIVITY_ID_CONFLICT_POLICY_FAIL. - */ - idConflictPolicy?: (temporal.api.enums.v1.ActivityIdConflictPolicy|null); - - /** Search attributes for indexing. */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** Header for context propagation and tracing purposes. */ - header?: (temporal.api.common.v1.IHeader|null); - - /** Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity. */ - userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** Priority metadata. */ - priority?: (temporal.api.common.v1.IPriority|null); - } - - /** Represents a StartActivityExecutionRequest. */ - class StartActivityExecutionRequest implements IStartActivityExecutionRequest { - - /** - * Constructs a new StartActivityExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IStartActivityExecutionRequest); - - /** StartActivityExecutionRequest namespace. */ - public namespace: string; - - /** The identity of the client who initiated this request */ - public identity: string; - - /** A unique identifier for this start request. Typically UUIDv4. */ - public requestId: string; - - /** - * Identifier for this activity. Required. This identifier should be meaningful in the user's - * own system. It must be unique among activities in the same namespace, subject to the rules - * imposed by id_reuse_policy and id_conflict_policy. - */ - public activityId: string; - - /** The type of the activity, a string that corresponds to a registered activity on a worker. */ - public activityType?: (temporal.api.common.v1.IActivityType|null); - - /** Task queue to schedule this activity on. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** - * Indicates how long the caller is willing to wait for an activity completion. Limits how long - * retries will be attempted. Either this or `start_to_close_timeout` must be specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Limits time an activity task can stay in a task queue before a worker picks it up. This - * timeout is always non retryable, as all a retry would achieve is to put it back into the same - * queue. Defaults to `schedule_to_close_timeout` if not specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Maximum time an activity is allowed to execute after being picked up by a worker. This - * timeout is always retryable. Either this or `schedule_to_close_timeout` must be - * specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Maximum permitted time between successful worker heartbeats. */ - public heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** The retry policy for the activity. Will never exceed `schedule_to_close_timeout`. */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Serialized arguments to the activity. These are passed as arguments to the activity function. */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** - * Defines whether to allow re-using the activity id from a previously *closed* activity. - * The default policy is ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE. - */ - public idReusePolicy: temporal.api.enums.v1.ActivityIdReusePolicy; - - /** - * Defines how to resolve an activity id conflict with a *running* activity. - * The default policy is ACTIVITY_ID_CONFLICT_POLICY_FAIL. - */ - public idConflictPolicy: temporal.api.enums.v1.ActivityIdConflictPolicy; - - /** Search attributes for indexing. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** Header for context propagation and tracing purposes. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity. */ - public userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** Priority metadata. */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Creates a new StartActivityExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StartActivityExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IStartActivityExecutionRequest): temporal.api.workflowservice.v1.StartActivityExecutionRequest; - - /** - * Encodes the specified StartActivityExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.StartActivityExecutionRequest.verify|verify} messages. - * @param message StartActivityExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IStartActivityExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartActivityExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.StartActivityExecutionRequest.verify|verify} messages. - * @param message StartActivityExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IStartActivityExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartActivityExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartActivityExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.StartActivityExecutionRequest; - - /** - * Decodes a StartActivityExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartActivityExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.StartActivityExecutionRequest; - - /** - * Creates a StartActivityExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartActivityExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.StartActivityExecutionRequest; - - /** - * Creates a plain object from a StartActivityExecutionRequest message. Also converts values to other types if specified. - * @param message StartActivityExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.StartActivityExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartActivityExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartActivityExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartActivityExecutionResponse. */ - interface IStartActivityExecutionResponse { - - /** The run ID of the activity that was started - or used (via ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING). */ - runId?: (string|null); - - /** If true, a new activity was started. */ - started?: (boolean|null); - } - - /** Represents a StartActivityExecutionResponse. */ - class StartActivityExecutionResponse implements IStartActivityExecutionResponse { - - /** - * Constructs a new StartActivityExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IStartActivityExecutionResponse); - - /** The run ID of the activity that was started - or used (via ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING). */ - public runId: string; - - /** If true, a new activity was started. */ - public started: boolean; - - /** - * Creates a new StartActivityExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StartActivityExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IStartActivityExecutionResponse): temporal.api.workflowservice.v1.StartActivityExecutionResponse; - - /** - * Encodes the specified StartActivityExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.StartActivityExecutionResponse.verify|verify} messages. - * @param message StartActivityExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IStartActivityExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartActivityExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.StartActivityExecutionResponse.verify|verify} messages. - * @param message StartActivityExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IStartActivityExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartActivityExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartActivityExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.StartActivityExecutionResponse; - - /** - * Decodes a StartActivityExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartActivityExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.StartActivityExecutionResponse; - - /** - * Creates a StartActivityExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartActivityExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.StartActivityExecutionResponse; - - /** - * Creates a plain object from a StartActivityExecutionResponse message. Also converts values to other types if specified. - * @param message StartActivityExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.StartActivityExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartActivityExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartActivityExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeActivityExecutionRequest. */ - interface IDescribeActivityExecutionRequest { - - /** DescribeActivityExecutionRequest namespace */ - namespace?: (string|null); - - /** DescribeActivityExecutionRequest activityId */ - activityId?: (string|null); - - /** Activity run ID. If empty the request targets the latest run. */ - runId?: (string|null); - - /** Include the input field in the response. */ - includeInput?: (boolean|null); - - /** Include the outcome (result/failure) in the response if the activity has completed. */ - includeOutcome?: (boolean|null); - - /** - * Token from a previous DescribeActivityExecutionResponse. If present, long-poll until activity - * state changes from the state encoded in this token. If absent, return current state immediately. - * If present, run_id must also be present. - * Note that activity state may change multiple times between requests, therefore it is not - * guaranteed that a client making a sequence of long-poll requests will see a complete - * sequence of state changes. - */ - longPollToken?: (Uint8Array|null); - } - - /** Represents a DescribeActivityExecutionRequest. */ - class DescribeActivityExecutionRequest implements IDescribeActivityExecutionRequest { - - /** - * Constructs a new DescribeActivityExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeActivityExecutionRequest); - - /** DescribeActivityExecutionRequest namespace. */ - public namespace: string; - - /** DescribeActivityExecutionRequest activityId. */ - public activityId: string; - - /** Activity run ID. If empty the request targets the latest run. */ - public runId: string; - - /** Include the input field in the response. */ - public includeInput: boolean; - - /** Include the outcome (result/failure) in the response if the activity has completed. */ - public includeOutcome: boolean; - - /** - * Token from a previous DescribeActivityExecutionResponse. If present, long-poll until activity - * state changes from the state encoded in this token. If absent, return current state immediately. - * If present, run_id must also be present. - * Note that activity state may change multiple times between requests, therefore it is not - * guaranteed that a client making a sequence of long-poll requests will see a complete - * sequence of state changes. - */ - public longPollToken: Uint8Array; - - /** - * Creates a new DescribeActivityExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeActivityExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeActivityExecutionRequest): temporal.api.workflowservice.v1.DescribeActivityExecutionRequest; - - /** - * Encodes the specified DescribeActivityExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeActivityExecutionRequest.verify|verify} messages. - * @param message DescribeActivityExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeActivityExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeActivityExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeActivityExecutionRequest.verify|verify} messages. - * @param message DescribeActivityExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeActivityExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeActivityExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeActivityExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeActivityExecutionRequest; - - /** - * Decodes a DescribeActivityExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeActivityExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeActivityExecutionRequest; - - /** - * Creates a DescribeActivityExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeActivityExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeActivityExecutionRequest; - - /** - * Creates a plain object from a DescribeActivityExecutionRequest message. Also converts values to other types if specified. - * @param message DescribeActivityExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeActivityExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeActivityExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeActivityExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescribeActivityExecutionResponse. */ - interface IDescribeActivityExecutionResponse { - - /** The run ID of the activity, useful when run_id was not specified in the request. */ - runId?: (string|null); - - /** Information about the activity execution. */ - info?: (temporal.api.activity.v1.IActivityExecutionInfo|null); - - /** - * Serialized activity input, passed as arguments to the activity function. - * Only set if include_input was true in the request. - */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** Only set if the activity is completed and include_outcome was true in the request. */ - outcome?: (temporal.api.activity.v1.IActivityExecutionOutcome|null); - - /** Token for follow-on long-poll requests. Absent only if the activity is complete. */ - longPollToken?: (Uint8Array|null); - } - - /** Represents a DescribeActivityExecutionResponse. */ - class DescribeActivityExecutionResponse implements IDescribeActivityExecutionResponse { - - /** - * Constructs a new DescribeActivityExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDescribeActivityExecutionResponse); - - /** The run ID of the activity, useful when run_id was not specified in the request. */ - public runId: string; - - /** Information about the activity execution. */ - public info?: (temporal.api.activity.v1.IActivityExecutionInfo|null); - - /** - * Serialized activity input, passed as arguments to the activity function. - * Only set if include_input was true in the request. - */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** Only set if the activity is completed and include_outcome was true in the request. */ - public outcome?: (temporal.api.activity.v1.IActivityExecutionOutcome|null); - - /** Token for follow-on long-poll requests. Absent only if the activity is complete. */ - public longPollToken: Uint8Array; - - /** - * Creates a new DescribeActivityExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DescribeActivityExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDescribeActivityExecutionResponse): temporal.api.workflowservice.v1.DescribeActivityExecutionResponse; - - /** - * Encodes the specified DescribeActivityExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeActivityExecutionResponse.verify|verify} messages. - * @param message DescribeActivityExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDescribeActivityExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescribeActivityExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DescribeActivityExecutionResponse.verify|verify} messages. - * @param message DescribeActivityExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDescribeActivityExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescribeActivityExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescribeActivityExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DescribeActivityExecutionResponse; - - /** - * Decodes a DescribeActivityExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescribeActivityExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DescribeActivityExecutionResponse; - - /** - * Creates a DescribeActivityExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescribeActivityExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DescribeActivityExecutionResponse; - - /** - * Creates a plain object from a DescribeActivityExecutionResponse message. Also converts values to other types if specified. - * @param message DescribeActivityExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DescribeActivityExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescribeActivityExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescribeActivityExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollActivityExecutionRequest. */ - interface IPollActivityExecutionRequest { - - /** PollActivityExecutionRequest namespace */ - namespace?: (string|null); - - /** PollActivityExecutionRequest activityId */ - activityId?: (string|null); - - /** Activity run ID. If empty the request targets the latest run. */ - runId?: (string|null); - } - - /** Represents a PollActivityExecutionRequest. */ - class PollActivityExecutionRequest implements IPollActivityExecutionRequest { - - /** - * Constructs a new PollActivityExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPollActivityExecutionRequest); - - /** PollActivityExecutionRequest namespace. */ - public namespace: string; - - /** PollActivityExecutionRequest activityId. */ - public activityId: string; - - /** Activity run ID. If empty the request targets the latest run. */ - public runId: string; - - /** - * Creates a new PollActivityExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PollActivityExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPollActivityExecutionRequest): temporal.api.workflowservice.v1.PollActivityExecutionRequest; - - /** - * Encodes the specified PollActivityExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.PollActivityExecutionRequest.verify|verify} messages. - * @param message PollActivityExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPollActivityExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollActivityExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PollActivityExecutionRequest.verify|verify} messages. - * @param message PollActivityExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPollActivityExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollActivityExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollActivityExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PollActivityExecutionRequest; - - /** - * Decodes a PollActivityExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollActivityExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PollActivityExecutionRequest; - - /** - * Creates a PollActivityExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollActivityExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PollActivityExecutionRequest; - - /** - * Creates a plain object from a PollActivityExecutionRequest message. Also converts values to other types if specified. - * @param message PollActivityExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PollActivityExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollActivityExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollActivityExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollActivityExecutionResponse. */ - interface IPollActivityExecutionResponse { - - /** The run ID of the activity, useful when run_id was not specified in the request. */ - runId?: (string|null); - - /** PollActivityExecutionResponse outcome */ - outcome?: (temporal.api.activity.v1.IActivityExecutionOutcome|null); - } - - /** Represents a PollActivityExecutionResponse. */ - class PollActivityExecutionResponse implements IPollActivityExecutionResponse { - - /** - * Constructs a new PollActivityExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IPollActivityExecutionResponse); - - /** The run ID of the activity, useful when run_id was not specified in the request. */ - public runId: string; - - /** PollActivityExecutionResponse outcome. */ - public outcome?: (temporal.api.activity.v1.IActivityExecutionOutcome|null); - - /** - * Creates a new PollActivityExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PollActivityExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IPollActivityExecutionResponse): temporal.api.workflowservice.v1.PollActivityExecutionResponse; - - /** - * Encodes the specified PollActivityExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.PollActivityExecutionResponse.verify|verify} messages. - * @param message PollActivityExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IPollActivityExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollActivityExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.PollActivityExecutionResponse.verify|verify} messages. - * @param message PollActivityExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IPollActivityExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollActivityExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollActivityExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.PollActivityExecutionResponse; - - /** - * Decodes a PollActivityExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollActivityExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.PollActivityExecutionResponse; - - /** - * Creates a PollActivityExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollActivityExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.PollActivityExecutionResponse; - - /** - * Creates a plain object from a PollActivityExecutionResponse message. Also converts values to other types if specified. - * @param message PollActivityExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.PollActivityExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollActivityExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollActivityExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListActivityExecutionsRequest. */ - interface IListActivityExecutionsRequest { - - /** ListActivityExecutionsRequest namespace */ - namespace?: (string|null); - - /** Max number of executions to return per page. */ - pageSize?: (number|null); - - /** Token returned in ListActivityExecutionsResponse. */ - nextPageToken?: (Uint8Array|null); - - /** Visibility query, see https://docs.temporal.io/list-filter for the syntax. */ - query?: (string|null); - } - - /** Represents a ListActivityExecutionsRequest. */ - class ListActivityExecutionsRequest implements IListActivityExecutionsRequest { - - /** - * Constructs a new ListActivityExecutionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListActivityExecutionsRequest); - - /** ListActivityExecutionsRequest namespace. */ - public namespace: string; - - /** Max number of executions to return per page. */ - public pageSize: number; - - /** Token returned in ListActivityExecutionsResponse. */ - public nextPageToken: Uint8Array; - - /** Visibility query, see https://docs.temporal.io/list-filter for the syntax. */ - public query: string; - - /** - * Creates a new ListActivityExecutionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListActivityExecutionsRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListActivityExecutionsRequest): temporal.api.workflowservice.v1.ListActivityExecutionsRequest; - - /** - * Encodes the specified ListActivityExecutionsRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.ListActivityExecutionsRequest.verify|verify} messages. - * @param message ListActivityExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListActivityExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListActivityExecutionsRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListActivityExecutionsRequest.verify|verify} messages. - * @param message ListActivityExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListActivityExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListActivityExecutionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListActivityExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListActivityExecutionsRequest; - - /** - * Decodes a ListActivityExecutionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListActivityExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListActivityExecutionsRequest; - - /** - * Creates a ListActivityExecutionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListActivityExecutionsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListActivityExecutionsRequest; - - /** - * Creates a plain object from a ListActivityExecutionsRequest message. Also converts values to other types if specified. - * @param message ListActivityExecutionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListActivityExecutionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListActivityExecutionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListActivityExecutionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListActivityExecutionsResponse. */ - interface IListActivityExecutionsResponse { - - /** ListActivityExecutionsResponse executions */ - executions?: (temporal.api.activity.v1.IActivityExecutionListInfo[]|null); - - /** Token to use to fetch the next page. If empty, there is no next page. */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListActivityExecutionsResponse. */ - class ListActivityExecutionsResponse implements IListActivityExecutionsResponse { - - /** - * Constructs a new ListActivityExecutionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IListActivityExecutionsResponse); - - /** ListActivityExecutionsResponse executions. */ - public executions: temporal.api.activity.v1.IActivityExecutionListInfo[]; - - /** Token to use to fetch the next page. If empty, there is no next page. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListActivityExecutionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListActivityExecutionsResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IListActivityExecutionsResponse): temporal.api.workflowservice.v1.ListActivityExecutionsResponse; - - /** - * Encodes the specified ListActivityExecutionsResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.ListActivityExecutionsResponse.verify|verify} messages. - * @param message ListActivityExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IListActivityExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListActivityExecutionsResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.ListActivityExecutionsResponse.verify|verify} messages. - * @param message ListActivityExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IListActivityExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListActivityExecutionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListActivityExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.ListActivityExecutionsResponse; - - /** - * Decodes a ListActivityExecutionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListActivityExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.ListActivityExecutionsResponse; - - /** - * Creates a ListActivityExecutionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListActivityExecutionsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.ListActivityExecutionsResponse; - - /** - * Creates a plain object from a ListActivityExecutionsResponse message. Also converts values to other types if specified. - * @param message ListActivityExecutionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.ListActivityExecutionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListActivityExecutionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListActivityExecutionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CountActivityExecutionsRequest. */ - interface ICountActivityExecutionsRequest { - - /** CountActivityExecutionsRequest namespace */ - namespace?: (string|null); - - /** Visibility query, see https://docs.temporal.io/list-filter for the syntax. */ - query?: (string|null); - } - - /** Represents a CountActivityExecutionsRequest. */ - class CountActivityExecutionsRequest implements ICountActivityExecutionsRequest { - - /** - * Constructs a new CountActivityExecutionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ICountActivityExecutionsRequest); - - /** CountActivityExecutionsRequest namespace. */ - public namespace: string; - - /** Visibility query, see https://docs.temporal.io/list-filter for the syntax. */ - public query: string; - - /** - * Creates a new CountActivityExecutionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CountActivityExecutionsRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ICountActivityExecutionsRequest): temporal.api.workflowservice.v1.CountActivityExecutionsRequest; - - /** - * Encodes the specified CountActivityExecutionsRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.CountActivityExecutionsRequest.verify|verify} messages. - * @param message CountActivityExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ICountActivityExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CountActivityExecutionsRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.CountActivityExecutionsRequest.verify|verify} messages. - * @param message CountActivityExecutionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ICountActivityExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CountActivityExecutionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CountActivityExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.CountActivityExecutionsRequest; - - /** - * Decodes a CountActivityExecutionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CountActivityExecutionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.CountActivityExecutionsRequest; - - /** - * Creates a CountActivityExecutionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CountActivityExecutionsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.CountActivityExecutionsRequest; - - /** - * Creates a plain object from a CountActivityExecutionsRequest message. Also converts values to other types if specified. - * @param message CountActivityExecutionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.CountActivityExecutionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CountActivityExecutionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CountActivityExecutionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CountActivityExecutionsResponse. */ - interface ICountActivityExecutionsResponse { - - /** - * If `query` is not grouping by any field, the count is an approximate number - * of activities that match the query. - * If `query` is grouping by a field, the count is simply the sum of the counts - * of the groups returned in the response. This number can be smaller than the - * total number of activities matching the query. - */ - count?: (Long|null); - - /** - * Contains the groups if the request is grouping by a field. - * The list might not be complete, and the counts of each group is approximate. - */ - groups?: (temporal.api.workflowservice.v1.CountActivityExecutionsResponse.IAggregationGroup[]|null); - } - - /** Represents a CountActivityExecutionsResponse. */ - class CountActivityExecutionsResponse implements ICountActivityExecutionsResponse { - - /** - * Constructs a new CountActivityExecutionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ICountActivityExecutionsResponse); - - /** - * If `query` is not grouping by any field, the count is an approximate number - * of activities that match the query. - * If `query` is grouping by a field, the count is simply the sum of the counts - * of the groups returned in the response. This number can be smaller than the - * total number of activities matching the query. - */ - public count: Long; - - /** - * Contains the groups if the request is grouping by a field. - * The list might not be complete, and the counts of each group is approximate. - */ - public groups: temporal.api.workflowservice.v1.CountActivityExecutionsResponse.IAggregationGroup[]; - - /** - * Creates a new CountActivityExecutionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CountActivityExecutionsResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ICountActivityExecutionsResponse): temporal.api.workflowservice.v1.CountActivityExecutionsResponse; - - /** - * Encodes the specified CountActivityExecutionsResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.CountActivityExecutionsResponse.verify|verify} messages. - * @param message CountActivityExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ICountActivityExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CountActivityExecutionsResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.CountActivityExecutionsResponse.verify|verify} messages. - * @param message CountActivityExecutionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ICountActivityExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CountActivityExecutionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CountActivityExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.CountActivityExecutionsResponse; - - /** - * Decodes a CountActivityExecutionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CountActivityExecutionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.CountActivityExecutionsResponse; - - /** - * Creates a CountActivityExecutionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CountActivityExecutionsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.CountActivityExecutionsResponse; - - /** - * Creates a plain object from a CountActivityExecutionsResponse message. Also converts values to other types if specified. - * @param message CountActivityExecutionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.CountActivityExecutionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CountActivityExecutionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CountActivityExecutionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CountActivityExecutionsResponse { - - /** Properties of an AggregationGroup. */ - interface IAggregationGroup { - - /** AggregationGroup groupValues */ - groupValues?: (temporal.api.common.v1.IPayload[]|null); - - /** AggregationGroup count */ - count?: (Long|null); - } - - /** Represents an AggregationGroup. */ - class AggregationGroup implements IAggregationGroup { - - /** - * Constructs a new AggregationGroup. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.CountActivityExecutionsResponse.IAggregationGroup); - - /** AggregationGroup groupValues. */ - public groupValues: temporal.api.common.v1.IPayload[]; - - /** AggregationGroup count. */ - public count: Long; - - /** - * Creates a new AggregationGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns AggregationGroup instance - */ - public static create(properties?: temporal.api.workflowservice.v1.CountActivityExecutionsResponse.IAggregationGroup): temporal.api.workflowservice.v1.CountActivityExecutionsResponse.AggregationGroup; - - /** - * Encodes the specified AggregationGroup message. Does not implicitly {@link temporal.api.workflowservice.v1.CountActivityExecutionsResponse.AggregationGroup.verify|verify} messages. - * @param message AggregationGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.CountActivityExecutionsResponse.IAggregationGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AggregationGroup message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.CountActivityExecutionsResponse.AggregationGroup.verify|verify} messages. - * @param message AggregationGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.CountActivityExecutionsResponse.IAggregationGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AggregationGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AggregationGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.CountActivityExecutionsResponse.AggregationGroup; - - /** - * Decodes an AggregationGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AggregationGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.CountActivityExecutionsResponse.AggregationGroup; - - /** - * Creates an AggregationGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AggregationGroup - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.CountActivityExecutionsResponse.AggregationGroup; - - /** - * Creates a plain object from an AggregationGroup message. Also converts values to other types if specified. - * @param message AggregationGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.CountActivityExecutionsResponse.AggregationGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AggregationGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AggregationGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a RequestCancelActivityExecutionRequest. */ - interface IRequestCancelActivityExecutionRequest { - - /** RequestCancelActivityExecutionRequest namespace */ - namespace?: (string|null); - - /** RequestCancelActivityExecutionRequest activityId */ - activityId?: (string|null); - - /** Activity run ID, targets the latest run if run_id is empty. */ - runId?: (string|null); - - /** The identity of the worker/client. */ - identity?: (string|null); - - /** Used to de-dupe cancellation requests. */ - requestId?: (string|null); - - /** - * Reason for requesting the cancellation, recorded and available via the PollActivityExecution API. - * Not propagated to a worker if an activity attempt is currently running. - */ - reason?: (string|null); - } - - /** Represents a RequestCancelActivityExecutionRequest. */ - class RequestCancelActivityExecutionRequest implements IRequestCancelActivityExecutionRequest { - - /** - * Constructs a new RequestCancelActivityExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRequestCancelActivityExecutionRequest); - - /** RequestCancelActivityExecutionRequest namespace. */ - public namespace: string; - - /** RequestCancelActivityExecutionRequest activityId. */ - public activityId: string; - - /** Activity run ID, targets the latest run if run_id is empty. */ - public runId: string; - - /** The identity of the worker/client. */ - public identity: string; - - /** Used to de-dupe cancellation requests. */ - public requestId: string; - - /** - * Reason for requesting the cancellation, recorded and available via the PollActivityExecution API. - * Not propagated to a worker if an activity attempt is currently running. - */ - public reason: string; - - /** - * Creates a new RequestCancelActivityExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestCancelActivityExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRequestCancelActivityExecutionRequest): temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest; - - /** - * Encodes the specified RequestCancelActivityExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest.verify|verify} messages. - * @param message RequestCancelActivityExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRequestCancelActivityExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCancelActivityExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest.verify|verify} messages. - * @param message RequestCancelActivityExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRequestCancelActivityExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestCancelActivityExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestCancelActivityExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest; - - /** - * Decodes a RequestCancelActivityExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestCancelActivityExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest; - - /** - * Creates a RequestCancelActivityExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCancelActivityExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest; - - /** - * Creates a plain object from a RequestCancelActivityExecutionRequest message. Also converts values to other types if specified. - * @param message RequestCancelActivityExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCancelActivityExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestCancelActivityExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RequestCancelActivityExecutionResponse. */ - interface IRequestCancelActivityExecutionResponse { - } - - /** Represents a RequestCancelActivityExecutionResponse. */ - class RequestCancelActivityExecutionResponse implements IRequestCancelActivityExecutionResponse { - - /** - * Constructs a new RequestCancelActivityExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IRequestCancelActivityExecutionResponse); - - /** - * Creates a new RequestCancelActivityExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestCancelActivityExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IRequestCancelActivityExecutionResponse): temporal.api.workflowservice.v1.RequestCancelActivityExecutionResponse; - - /** - * Encodes the specified RequestCancelActivityExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.RequestCancelActivityExecutionResponse.verify|verify} messages. - * @param message RequestCancelActivityExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IRequestCancelActivityExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCancelActivityExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.RequestCancelActivityExecutionResponse.verify|verify} messages. - * @param message RequestCancelActivityExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IRequestCancelActivityExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestCancelActivityExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestCancelActivityExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.RequestCancelActivityExecutionResponse; - - /** - * Decodes a RequestCancelActivityExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestCancelActivityExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.RequestCancelActivityExecutionResponse; - - /** - * Creates a RequestCancelActivityExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCancelActivityExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.RequestCancelActivityExecutionResponse; - - /** - * Creates a plain object from a RequestCancelActivityExecutionResponse message. Also converts values to other types if specified. - * @param message RequestCancelActivityExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.RequestCancelActivityExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCancelActivityExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestCancelActivityExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TerminateActivityExecutionRequest. */ - interface ITerminateActivityExecutionRequest { - - /** TerminateActivityExecutionRequest namespace */ - namespace?: (string|null); - - /** TerminateActivityExecutionRequest activityId */ - activityId?: (string|null); - - /** Activity run ID, targets the latest run if run_id is empty. */ - runId?: (string|null); - - /** The identity of the worker/client. */ - identity?: (string|null); - - /** Used to de-dupe termination requests. */ - requestId?: (string|null); - - /** Reason for requesting the termination, recorded in in the activity's result failure outcome. */ - reason?: (string|null); - } - - /** Represents a TerminateActivityExecutionRequest. */ - class TerminateActivityExecutionRequest implements ITerminateActivityExecutionRequest { - - /** - * Constructs a new TerminateActivityExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ITerminateActivityExecutionRequest); - - /** TerminateActivityExecutionRequest namespace. */ - public namespace: string; - - /** TerminateActivityExecutionRequest activityId. */ - public activityId: string; - - /** Activity run ID, targets the latest run if run_id is empty. */ - public runId: string; - - /** The identity of the worker/client. */ - public identity: string; - - /** Used to de-dupe termination requests. */ - public requestId: string; - - /** Reason for requesting the termination, recorded in in the activity's result failure outcome. */ - public reason: string; - - /** - * Creates a new TerminateActivityExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TerminateActivityExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ITerminateActivityExecutionRequest): temporal.api.workflowservice.v1.TerminateActivityExecutionRequest; - - /** - * Encodes the specified TerminateActivityExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.TerminateActivityExecutionRequest.verify|verify} messages. - * @param message TerminateActivityExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ITerminateActivityExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TerminateActivityExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.TerminateActivityExecutionRequest.verify|verify} messages. - * @param message TerminateActivityExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ITerminateActivityExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TerminateActivityExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TerminateActivityExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.TerminateActivityExecutionRequest; - - /** - * Decodes a TerminateActivityExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TerminateActivityExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.TerminateActivityExecutionRequest; - - /** - * Creates a TerminateActivityExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TerminateActivityExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.TerminateActivityExecutionRequest; - - /** - * Creates a plain object from a TerminateActivityExecutionRequest message. Also converts values to other types if specified. - * @param message TerminateActivityExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.TerminateActivityExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TerminateActivityExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TerminateActivityExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TerminateActivityExecutionResponse. */ - interface ITerminateActivityExecutionResponse { - } - - /** Represents a TerminateActivityExecutionResponse. */ - class TerminateActivityExecutionResponse implements ITerminateActivityExecutionResponse { - - /** - * Constructs a new TerminateActivityExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.ITerminateActivityExecutionResponse); - - /** - * Creates a new TerminateActivityExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns TerminateActivityExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.ITerminateActivityExecutionResponse): temporal.api.workflowservice.v1.TerminateActivityExecutionResponse; - - /** - * Encodes the specified TerminateActivityExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.TerminateActivityExecutionResponse.verify|verify} messages. - * @param message TerminateActivityExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.ITerminateActivityExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TerminateActivityExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.TerminateActivityExecutionResponse.verify|verify} messages. - * @param message TerminateActivityExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.ITerminateActivityExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TerminateActivityExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TerminateActivityExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.TerminateActivityExecutionResponse; - - /** - * Decodes a TerminateActivityExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TerminateActivityExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.TerminateActivityExecutionResponse; - - /** - * Creates a TerminateActivityExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TerminateActivityExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.TerminateActivityExecutionResponse; - - /** - * Creates a plain object from a TerminateActivityExecutionResponse message. Also converts values to other types if specified. - * @param message TerminateActivityExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.TerminateActivityExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TerminateActivityExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TerminateActivityExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteActivityExecutionRequest. */ - interface IDeleteActivityExecutionRequest { - - /** DeleteActivityExecutionRequest namespace */ - namespace?: (string|null); - - /** DeleteActivityExecutionRequest activityId */ - activityId?: (string|null); - - /** Activity run ID, targets the latest run if run_id is empty. */ - runId?: (string|null); - } - - /** Represents a DeleteActivityExecutionRequest. */ - class DeleteActivityExecutionRequest implements IDeleteActivityExecutionRequest { - - /** - * Constructs a new DeleteActivityExecutionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDeleteActivityExecutionRequest); - - /** DeleteActivityExecutionRequest namespace. */ - public namespace: string; - - /** DeleteActivityExecutionRequest activityId. */ - public activityId: string; - - /** Activity run ID, targets the latest run if run_id is empty. */ - public runId: string; - - /** - * Creates a new DeleteActivityExecutionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteActivityExecutionRequest instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDeleteActivityExecutionRequest): temporal.api.workflowservice.v1.DeleteActivityExecutionRequest; - - /** - * Encodes the specified DeleteActivityExecutionRequest message. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteActivityExecutionRequest.verify|verify} messages. - * @param message DeleteActivityExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDeleteActivityExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteActivityExecutionRequest message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteActivityExecutionRequest.verify|verify} messages. - * @param message DeleteActivityExecutionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDeleteActivityExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteActivityExecutionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteActivityExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DeleteActivityExecutionRequest; - - /** - * Decodes a DeleteActivityExecutionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteActivityExecutionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DeleteActivityExecutionRequest; - - /** - * Creates a DeleteActivityExecutionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteActivityExecutionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DeleteActivityExecutionRequest; - - /** - * Creates a plain object from a DeleteActivityExecutionRequest message. Also converts values to other types if specified. - * @param message DeleteActivityExecutionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DeleteActivityExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteActivityExecutionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteActivityExecutionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteActivityExecutionResponse. */ - interface IDeleteActivityExecutionResponse { - } - - /** Represents a DeleteActivityExecutionResponse. */ - class DeleteActivityExecutionResponse implements IDeleteActivityExecutionResponse { - - /** - * Constructs a new DeleteActivityExecutionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflowservice.v1.IDeleteActivityExecutionResponse); - - /** - * Creates a new DeleteActivityExecutionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteActivityExecutionResponse instance - */ - public static create(properties?: temporal.api.workflowservice.v1.IDeleteActivityExecutionResponse): temporal.api.workflowservice.v1.DeleteActivityExecutionResponse; - - /** - * Encodes the specified DeleteActivityExecutionResponse message. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteActivityExecutionResponse.verify|verify} messages. - * @param message DeleteActivityExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflowservice.v1.IDeleteActivityExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteActivityExecutionResponse message, length delimited. Does not implicitly {@link temporal.api.workflowservice.v1.DeleteActivityExecutionResponse.verify|verify} messages. - * @param message DeleteActivityExecutionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflowservice.v1.IDeleteActivityExecutionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteActivityExecutionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteActivityExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflowservice.v1.DeleteActivityExecutionResponse; - - /** - * Decodes a DeleteActivityExecutionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteActivityExecutionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflowservice.v1.DeleteActivityExecutionResponse; - - /** - * Creates a DeleteActivityExecutionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteActivityExecutionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflowservice.v1.DeleteActivityExecutionResponse; - - /** - * Creates a plain object from a DeleteActivityExecutionResponse message. Also converts values to other types if specified. - * @param message DeleteActivityExecutionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflowservice.v1.DeleteActivityExecutionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteActivityExecutionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteActivityExecutionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** - * WorkflowService API defines how Temporal SDKs and other clients interact with the Temporal server - * to create and interact with workflows and activities. - * - * Users are expected to call `StartWorkflowExecution` to create a new workflow execution. - * - * To drive workflows, a worker using a Temporal SDK must exist which regularly polls for workflow - * and activity tasks from the service. For each workflow task, the sdk must process the - * (incremental or complete) event history and respond back with any newly generated commands. - * - * For each activity task, the worker is expected to execute the user's code which implements that - * activity, responding with completion or failure. - */ - class WorkflowService extends $protobuf.rpc.Service { - - /** - * Constructs a new WorkflowService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new WorkflowService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): WorkflowService; - - /** - * RegisterNamespace creates a new namespace which can be used as a container for all resources. - * - * A Namespace is a top level entity within Temporal, and is used as a container for resources - * like workflow executions, task queues, etc. A Namespace acts as a sandbox and provides - * isolation for all resources within the namespace. All resources belongs to exactly one - * namespace. - * @param request RegisterNamespaceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RegisterNamespaceResponse - */ - public registerNamespace(request: temporal.api.workflowservice.v1.IRegisterNamespaceRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RegisterNamespaceCallback): void; - - /** - * RegisterNamespace creates a new namespace which can be used as a container for all resources. - * - * A Namespace is a top level entity within Temporal, and is used as a container for resources - * like workflow executions, task queues, etc. A Namespace acts as a sandbox and provides - * isolation for all resources within the namespace. All resources belongs to exactly one - * namespace. - * @param request RegisterNamespaceRequest message or plain object - * @returns Promise - */ - public registerNamespace(request: temporal.api.workflowservice.v1.IRegisterNamespaceRequest): Promise; - - /** - * DescribeNamespace returns the information and configuration for a registered namespace. - * @param request DescribeNamespaceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DescribeNamespaceResponse - */ - public describeNamespace(request: temporal.api.workflowservice.v1.IDescribeNamespaceRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DescribeNamespaceCallback): void; - - /** - * DescribeNamespace returns the information and configuration for a registered namespace. - * @param request DescribeNamespaceRequest message or plain object - * @returns Promise - */ - public describeNamespace(request: temporal.api.workflowservice.v1.IDescribeNamespaceRequest): Promise; - - /** - * ListNamespaces returns the information and configuration for all namespaces. - * @param request ListNamespacesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListNamespacesResponse - */ - public listNamespaces(request: temporal.api.workflowservice.v1.IListNamespacesRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ListNamespacesCallback): void; - - /** - * ListNamespaces returns the information and configuration for all namespaces. - * @param request ListNamespacesRequest message or plain object - * @returns Promise - */ - public listNamespaces(request: temporal.api.workflowservice.v1.IListNamespacesRequest): Promise; - - /** - * UpdateNamespace is used to update the information and configuration of a registered - * namespace. - * @param request UpdateNamespaceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateNamespaceResponse - */ - public updateNamespace(request: temporal.api.workflowservice.v1.IUpdateNamespaceRequest, callback: temporal.api.workflowservice.v1.WorkflowService.UpdateNamespaceCallback): void; - - /** - * UpdateNamespace is used to update the information and configuration of a registered - * namespace. - * @param request UpdateNamespaceRequest message or plain object - * @returns Promise - */ - public updateNamespace(request: temporal.api.workflowservice.v1.IUpdateNamespaceRequest): Promise; - - /** - * DeprecateNamespace is used to update the state of a registered namespace to DEPRECATED. - * - * Once the namespace is deprecated it cannot be used to start new workflow executions. Existing - * workflow executions will continue to run on deprecated namespaces. - * Deprecated. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: Deprecated --) - * @param request DeprecateNamespaceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeprecateNamespaceResponse - */ - public deprecateNamespace(request: temporal.api.workflowservice.v1.IDeprecateNamespaceRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DeprecateNamespaceCallback): void; - - /** - * DeprecateNamespace is used to update the state of a registered namespace to DEPRECATED. - * - * Once the namespace is deprecated it cannot be used to start new workflow executions. Existing - * workflow executions will continue to run on deprecated namespaces. - * Deprecated. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: Deprecated --) - * @param request DeprecateNamespaceRequest message or plain object - * @returns Promise - */ - public deprecateNamespace(request: temporal.api.workflowservice.v1.IDeprecateNamespaceRequest): Promise; - - /** - * StartWorkflowExecution starts a new workflow execution. - * - * It will create the execution with a `WORKFLOW_EXECUTION_STARTED` event in its history and - * also schedule the first workflow task. Returns `WorkflowExecutionAlreadyStarted`, if an - * instance already exists with same workflow id. - * @param request StartWorkflowExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StartWorkflowExecutionResponse - */ - public startWorkflowExecution(request: temporal.api.workflowservice.v1.IStartWorkflowExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.StartWorkflowExecutionCallback): void; - - /** - * StartWorkflowExecution starts a new workflow execution. - * - * It will create the execution with a `WORKFLOW_EXECUTION_STARTED` event in its history and - * also schedule the first workflow task. Returns `WorkflowExecutionAlreadyStarted`, if an - * instance already exists with same workflow id. - * @param request StartWorkflowExecutionRequest message or plain object - * @returns Promise - */ - public startWorkflowExecution(request: temporal.api.workflowservice.v1.IStartWorkflowExecutionRequest): Promise; - - /** - * ExecuteMultiOperation executes multiple operations within a single workflow. - * - * Operations are started atomically, meaning if *any* operation fails to be started, none are, - * and the request fails. Upon start, the API returns only when *all* operations have a response. - * - * Upon failure, it returns `MultiOperationExecutionFailure` where the status code - * equals the status code of the *first* operation that failed to be started. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: To be exposed over HTTP in the future. --) - * @param request ExecuteMultiOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ExecuteMultiOperationResponse - */ - public executeMultiOperation(request: temporal.api.workflowservice.v1.IExecuteMultiOperationRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ExecuteMultiOperationCallback): void; - - /** - * ExecuteMultiOperation executes multiple operations within a single workflow. - * - * Operations are started atomically, meaning if *any* operation fails to be started, none are, - * and the request fails. Upon start, the API returns only when *all* operations have a response. - * - * Upon failure, it returns `MultiOperationExecutionFailure` where the status code - * equals the status code of the *first* operation that failed to be started. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: To be exposed over HTTP in the future. --) - * @param request ExecuteMultiOperationRequest message or plain object - * @returns Promise - */ - public executeMultiOperation(request: temporal.api.workflowservice.v1.IExecuteMultiOperationRequest): Promise; - - /** - * GetWorkflowExecutionHistory returns the history of specified workflow execution. Fails with - * `NotFound` if the specified workflow execution is unknown to the service. - * @param request GetWorkflowExecutionHistoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetWorkflowExecutionHistoryResponse - */ - public getWorkflowExecutionHistory(request: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryRequest, callback: temporal.api.workflowservice.v1.WorkflowService.GetWorkflowExecutionHistoryCallback): void; - - /** - * GetWorkflowExecutionHistory returns the history of specified workflow execution. Fails with - * `NotFound` if the specified workflow execution is unknown to the service. - * @param request GetWorkflowExecutionHistoryRequest message or plain object - * @returns Promise - */ - public getWorkflowExecutionHistory(request: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryRequest): Promise; - - /** - * GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse - * order (starting from last event). Fails with`NotFound` if the specified workflow execution is - * unknown to the service. - * @param request GetWorkflowExecutionHistoryReverseRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetWorkflowExecutionHistoryReverseResponse - */ - public getWorkflowExecutionHistoryReverse(request: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryReverseRequest, callback: temporal.api.workflowservice.v1.WorkflowService.GetWorkflowExecutionHistoryReverseCallback): void; - - /** - * GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse - * order (starting from last event). Fails with`NotFound` if the specified workflow execution is - * unknown to the service. - * @param request GetWorkflowExecutionHistoryReverseRequest message or plain object - * @returns Promise - */ - public getWorkflowExecutionHistoryReverse(request: temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryReverseRequest): Promise; - - /** - * PollWorkflowTaskQueue is called by workers to make progress on workflows. - * - * A WorkflowTask is dispatched to callers for active workflow executions with pending workflow - * tasks. The worker is expected to call `RespondWorkflowTaskCompleted` when it is done - * processing the task. The service will create a `WorkflowTaskStarted` event in the history for - * this task before handing it to the worker. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request PollWorkflowTaskQueueRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PollWorkflowTaskQueueResponse - */ - public pollWorkflowTaskQueue(request: temporal.api.workflowservice.v1.IPollWorkflowTaskQueueRequest, callback: temporal.api.workflowservice.v1.WorkflowService.PollWorkflowTaskQueueCallback): void; - - /** - * PollWorkflowTaskQueue is called by workers to make progress on workflows. - * - * A WorkflowTask is dispatched to callers for active workflow executions with pending workflow - * tasks. The worker is expected to call `RespondWorkflowTaskCompleted` when it is done - * processing the task. The service will create a `WorkflowTaskStarted` event in the history for - * this task before handing it to the worker. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request PollWorkflowTaskQueueRequest message or plain object - * @returns Promise - */ - public pollWorkflowTaskQueue(request: temporal.api.workflowservice.v1.IPollWorkflowTaskQueueRequest): Promise; - - /** - * RespondWorkflowTaskCompleted is called by workers to successfully complete workflow tasks - * they received from `PollWorkflowTaskQueue`. - * - * Completing a WorkflowTask will write a `WORKFLOW_TASK_COMPLETED` event to the workflow's - * history, along with events corresponding to whatever commands the SDK generated while - * executing the task (ex timer started, activity task scheduled, etc). - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request RespondWorkflowTaskCompletedRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RespondWorkflowTaskCompletedResponse - */ - public respondWorkflowTaskCompleted(request: temporal.api.workflowservice.v1.IRespondWorkflowTaskCompletedRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RespondWorkflowTaskCompletedCallback): void; - - /** - * RespondWorkflowTaskCompleted is called by workers to successfully complete workflow tasks - * they received from `PollWorkflowTaskQueue`. - * - * Completing a WorkflowTask will write a `WORKFLOW_TASK_COMPLETED` event to the workflow's - * history, along with events corresponding to whatever commands the SDK generated while - * executing the task (ex timer started, activity task scheduled, etc). - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request RespondWorkflowTaskCompletedRequest message or plain object - * @returns Promise - */ - public respondWorkflowTaskCompleted(request: temporal.api.workflowservice.v1.IRespondWorkflowTaskCompletedRequest): Promise; - - /** - * RespondWorkflowTaskFailed is called by workers to indicate the processing of a workflow task - * failed. - * - * This results in a `WORKFLOW_TASK_FAILED` event written to the history, and a new workflow - * task will be scheduled. This API can be used to report unhandled failures resulting from - * applying the workflow task. - * - * Temporal will only append first WorkflowTaskFailed event to the history of workflow execution - * for consecutive failures. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request RespondWorkflowTaskFailedRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RespondWorkflowTaskFailedResponse - */ - public respondWorkflowTaskFailed(request: temporal.api.workflowservice.v1.IRespondWorkflowTaskFailedRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RespondWorkflowTaskFailedCallback): void; - - /** - * RespondWorkflowTaskFailed is called by workers to indicate the processing of a workflow task - * failed. - * - * This results in a `WORKFLOW_TASK_FAILED` event written to the history, and a new workflow - * task will be scheduled. This API can be used to report unhandled failures resulting from - * applying the workflow task. - * - * Temporal will only append first WorkflowTaskFailed event to the history of workflow execution - * for consecutive failures. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request RespondWorkflowTaskFailedRequest message or plain object - * @returns Promise - */ - public respondWorkflowTaskFailed(request: temporal.api.workflowservice.v1.IRespondWorkflowTaskFailedRequest): Promise; - - /** - * PollActivityTaskQueue is called by workers to process activity tasks from a specific task - * queue. - * - * The worker is expected to call one of the `RespondActivityTaskXXX` methods when it is done - * processing the task. - * - * An activity task is dispatched whenever a `SCHEDULE_ACTIVITY_TASK` command is produced during - * workflow execution. An in memory `ACTIVITY_TASK_STARTED` event is written to mutable state - * before the task is dispatched to the worker. The started event, and the final event - * (`ACTIVITY_TASK_COMPLETED` / `ACTIVITY_TASK_FAILED` / `ACTIVITY_TASK_TIMED_OUT`) will both be - * written permanently to Workflow execution history when Activity is finished. This is done to - * avoid writing many events in the case of a failure/retry loop. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request PollActivityTaskQueueRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PollActivityTaskQueueResponse - */ - public pollActivityTaskQueue(request: temporal.api.workflowservice.v1.IPollActivityTaskQueueRequest, callback: temporal.api.workflowservice.v1.WorkflowService.PollActivityTaskQueueCallback): void; - - /** - * PollActivityTaskQueue is called by workers to process activity tasks from a specific task - * queue. - * - * The worker is expected to call one of the `RespondActivityTaskXXX` methods when it is done - * processing the task. - * - * An activity task is dispatched whenever a `SCHEDULE_ACTIVITY_TASK` command is produced during - * workflow execution. An in memory `ACTIVITY_TASK_STARTED` event is written to mutable state - * before the task is dispatched to the worker. The started event, and the final event - * (`ACTIVITY_TASK_COMPLETED` / `ACTIVITY_TASK_FAILED` / `ACTIVITY_TASK_TIMED_OUT`) will both be - * written permanently to Workflow execution history when Activity is finished. This is done to - * avoid writing many events in the case of a failure/retry loop. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request PollActivityTaskQueueRequest message or plain object - * @returns Promise - */ - public pollActivityTaskQueue(request: temporal.api.workflowservice.v1.IPollActivityTaskQueueRequest): Promise; - - /** - * RecordActivityTaskHeartbeat is optionally called by workers while they execute activities. - * - * If a worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task, - * then the current attempt times out. Depending on RetryPolicy, this may trigger a retry or - * time out the activity. - * - * For workflow activities, an `ACTIVITY_TASK_TIMED_OUT` event will be written to the workflow - * history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in such situations, - * in that event, the SDK should request cancellation of the activity. - * - * The request may contain response `details` which will be persisted by the server and may be - * used by the activity to checkpoint progress. The `cancel_requested` field in the response - * indicates whether cancellation has been requested for the activity. - * @param request RecordActivityTaskHeartbeatRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RecordActivityTaskHeartbeatResponse - */ - public recordActivityTaskHeartbeat(request: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RecordActivityTaskHeartbeatCallback): void; - - /** - * RecordActivityTaskHeartbeat is optionally called by workers while they execute activities. - * - * If a worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task, - * then the current attempt times out. Depending on RetryPolicy, this may trigger a retry or - * time out the activity. - * - * For workflow activities, an `ACTIVITY_TASK_TIMED_OUT` event will be written to the workflow - * history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in such situations, - * in that event, the SDK should request cancellation of the activity. - * - * The request may contain response `details` which will be persisted by the server and may be - * used by the activity to checkpoint progress. The `cancel_requested` field in the response - * indicates whether cancellation has been requested for the activity. - * @param request RecordActivityTaskHeartbeatRequest message or plain object - * @returns Promise - */ - public recordActivityTaskHeartbeat(request: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatRequest): Promise; - - /** - * See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by - * namespace/workflow id/activity id instead of task token. - * - * (-- api-linter: core::0136::prepositions=disabled - * aip.dev/not-precedent: "By" is used to indicate request type. --) - * @param request RecordActivityTaskHeartbeatByIdRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RecordActivityTaskHeartbeatByIdResponse - */ - public recordActivityTaskHeartbeatById(request: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatByIdRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RecordActivityTaskHeartbeatByIdCallback): void; - - /** - * See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by - * namespace/workflow id/activity id instead of task token. - * - * (-- api-linter: core::0136::prepositions=disabled - * aip.dev/not-precedent: "By" is used to indicate request type. --) - * @param request RecordActivityTaskHeartbeatByIdRequest message or plain object - * @returns Promise - */ - public recordActivityTaskHeartbeatById(request: temporal.api.workflowservice.v1.IRecordActivityTaskHeartbeatByIdRequest): Promise; - - /** - * RespondActivityTaskCompleted is called by workers when they successfully complete an activity - * task. - * - * For workflow activities, this results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history - * and a new workflow task created for the workflow. Fails with `NotFound` if the task token is - * no longer valid due to activity timeout, already being completed, or never having existed. - * @param request RespondActivityTaskCompletedRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RespondActivityTaskCompletedResponse - */ - public respondActivityTaskCompleted(request: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RespondActivityTaskCompletedCallback): void; - - /** - * RespondActivityTaskCompleted is called by workers when they successfully complete an activity - * task. - * - * For workflow activities, this results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history - * and a new workflow task created for the workflow. Fails with `NotFound` if the task token is - * no longer valid due to activity timeout, already being completed, or never having existed. - * @param request RespondActivityTaskCompletedRequest message or plain object - * @returns Promise - */ - public respondActivityTaskCompleted(request: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedRequest): Promise; - - /** - * See `RespondActivityTaskCompleted`. This version allows clients to record completions by - * namespace/workflow id/activity id instead of task token. - * - * (-- api-linter: core::0136::prepositions=disabled - * aip.dev/not-precedent: "By" is used to indicate request type. --) - * @param request RespondActivityTaskCompletedByIdRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RespondActivityTaskCompletedByIdResponse - */ - public respondActivityTaskCompletedById(request: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedByIdRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RespondActivityTaskCompletedByIdCallback): void; - - /** - * See `RespondActivityTaskCompleted`. This version allows clients to record completions by - * namespace/workflow id/activity id instead of task token. - * - * (-- api-linter: core::0136::prepositions=disabled - * aip.dev/not-precedent: "By" is used to indicate request type. --) - * @param request RespondActivityTaskCompletedByIdRequest message or plain object - * @returns Promise - */ - public respondActivityTaskCompletedById(request: temporal.api.workflowservice.v1.IRespondActivityTaskCompletedByIdRequest): Promise; - - /** - * RespondActivityTaskFailed is called by workers when processing an activity task fails. - * - * This results in a new `ACTIVITY_TASK_FAILED` event being written to the workflow history and - * a new workflow task created for the workflow. Fails with `NotFound` if the task token is no - * longer valid due to activity timeout, already being completed, or never having existed. - * @param request RespondActivityTaskFailedRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RespondActivityTaskFailedResponse - */ - public respondActivityTaskFailed(request: temporal.api.workflowservice.v1.IRespondActivityTaskFailedRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RespondActivityTaskFailedCallback): void; - - /** - * RespondActivityTaskFailed is called by workers when processing an activity task fails. - * - * This results in a new `ACTIVITY_TASK_FAILED` event being written to the workflow history and - * a new workflow task created for the workflow. Fails with `NotFound` if the task token is no - * longer valid due to activity timeout, already being completed, or never having existed. - * @param request RespondActivityTaskFailedRequest message or plain object - * @returns Promise - */ - public respondActivityTaskFailed(request: temporal.api.workflowservice.v1.IRespondActivityTaskFailedRequest): Promise; - - /** - * See `RecordActivityTaskFailed`. This version allows clients to record failures by - * namespace/workflow id/activity id instead of task token. - * - * (-- api-linter: core::0136::prepositions=disabled - * aip.dev/not-precedent: "By" is used to indicate request type. --) - * @param request RespondActivityTaskFailedByIdRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RespondActivityTaskFailedByIdResponse - */ - public respondActivityTaskFailedById(request: temporal.api.workflowservice.v1.IRespondActivityTaskFailedByIdRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RespondActivityTaskFailedByIdCallback): void; - - /** - * See `RecordActivityTaskFailed`. This version allows clients to record failures by - * namespace/workflow id/activity id instead of task token. - * - * (-- api-linter: core::0136::prepositions=disabled - * aip.dev/not-precedent: "By" is used to indicate request type. --) - * @param request RespondActivityTaskFailedByIdRequest message or plain object - * @returns Promise - */ - public respondActivityTaskFailedById(request: temporal.api.workflowservice.v1.IRespondActivityTaskFailedByIdRequest): Promise; - - /** - * RespondActivityTaskFailed is called by workers when processing an activity task fails. - * - * For workflow activities, this results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history - * and a new workflow task created for the workflow. Fails with `NotFound` if the task token is - * no longer valid due to activity timeout, already being completed, or never having existed. - * @param request RespondActivityTaskCanceledRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RespondActivityTaskCanceledResponse - */ - public respondActivityTaskCanceled(request: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RespondActivityTaskCanceledCallback): void; - - /** - * RespondActivityTaskFailed is called by workers when processing an activity task fails. - * - * For workflow activities, this results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history - * and a new workflow task created for the workflow. Fails with `NotFound` if the task token is - * no longer valid due to activity timeout, already being completed, or never having existed. - * @param request RespondActivityTaskCanceledRequest message or plain object - * @returns Promise - */ - public respondActivityTaskCanceled(request: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledRequest): Promise; - - /** - * See `RespondActivityTaskCanceled`. This version allows clients to record failures by - * namespace/workflow id/activity id instead of task token. - * - * (-- api-linter: core::0136::prepositions=disabled - * aip.dev/not-precedent: "By" is used to indicate request type. --) - * @param request RespondActivityTaskCanceledByIdRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RespondActivityTaskCanceledByIdResponse - */ - public respondActivityTaskCanceledById(request: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledByIdRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RespondActivityTaskCanceledByIdCallback): void; - - /** - * See `RespondActivityTaskCanceled`. This version allows clients to record failures by - * namespace/workflow id/activity id instead of task token. - * - * (-- api-linter: core::0136::prepositions=disabled - * aip.dev/not-precedent: "By" is used to indicate request type. --) - * @param request RespondActivityTaskCanceledByIdRequest message or plain object - * @returns Promise - */ - public respondActivityTaskCanceledById(request: temporal.api.workflowservice.v1.IRespondActivityTaskCanceledByIdRequest): Promise; - - /** - * RequestCancelWorkflowExecution is called by workers when they want to request cancellation of - * a workflow execution. - * - * This results in a new `WORKFLOW_EXECUTION_CANCEL_REQUESTED` event being written to the - * workflow history and a new workflow task created for the workflow. It returns success if the requested - * workflow is already closed. It fails with 'NotFound' if the requested workflow doesn't exist. - * @param request RequestCancelWorkflowExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RequestCancelWorkflowExecutionResponse - */ - public requestCancelWorkflowExecution(request: temporal.api.workflowservice.v1.IRequestCancelWorkflowExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RequestCancelWorkflowExecutionCallback): void; - - /** - * RequestCancelWorkflowExecution is called by workers when they want to request cancellation of - * a workflow execution. - * - * This results in a new `WORKFLOW_EXECUTION_CANCEL_REQUESTED` event being written to the - * workflow history and a new workflow task created for the workflow. It returns success if the requested - * workflow is already closed. It fails with 'NotFound' if the requested workflow doesn't exist. - * @param request RequestCancelWorkflowExecutionRequest message or plain object - * @returns Promise - */ - public requestCancelWorkflowExecution(request: temporal.api.workflowservice.v1.IRequestCancelWorkflowExecutionRequest): Promise; - - /** - * SignalWorkflowExecution is used to send a signal to a running workflow execution. - * - * This results in a `WORKFLOW_EXECUTION_SIGNALED` event recorded in the history and a workflow - * task being created for the execution. - * @param request SignalWorkflowExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SignalWorkflowExecutionResponse - */ - public signalWorkflowExecution(request: temporal.api.workflowservice.v1.ISignalWorkflowExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.SignalWorkflowExecutionCallback): void; - - /** - * SignalWorkflowExecution is used to send a signal to a running workflow execution. - * - * This results in a `WORKFLOW_EXECUTION_SIGNALED` event recorded in the history and a workflow - * task being created for the execution. - * @param request SignalWorkflowExecutionRequest message or plain object - * @returns Promise - */ - public signalWorkflowExecution(request: temporal.api.workflowservice.v1.ISignalWorkflowExecutionRequest): Promise; - - /** - * SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if - * it isn't yet started. - * - * If the workflow is running, a `WORKFLOW_EXECUTION_SIGNALED` event is recorded in the history - * and a workflow task is generated. - * - * If the workflow is not running or not found, then the workflow is created with - * `WORKFLOW_EXECUTION_STARTED` and `WORKFLOW_EXECUTION_SIGNALED` events in its history, and a - * workflow task is generated. - * - * (-- api-linter: core::0136::prepositions=disabled - * aip.dev/not-precedent: "With" is used to indicate combined operation. --) - * @param request SignalWithStartWorkflowExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SignalWithStartWorkflowExecutionResponse - */ - public signalWithStartWorkflowExecution(request: temporal.api.workflowservice.v1.ISignalWithStartWorkflowExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.SignalWithStartWorkflowExecutionCallback): void; - - /** - * SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if - * it isn't yet started. - * - * If the workflow is running, a `WORKFLOW_EXECUTION_SIGNALED` event is recorded in the history - * and a workflow task is generated. - * - * If the workflow is not running or not found, then the workflow is created with - * `WORKFLOW_EXECUTION_STARTED` and `WORKFLOW_EXECUTION_SIGNALED` events in its history, and a - * workflow task is generated. - * - * (-- api-linter: core::0136::prepositions=disabled - * aip.dev/not-precedent: "With" is used to indicate combined operation. --) - * @param request SignalWithStartWorkflowExecutionRequest message or plain object - * @returns Promise - */ - public signalWithStartWorkflowExecution(request: temporal.api.workflowservice.v1.ISignalWithStartWorkflowExecutionRequest): Promise; - - /** - * ResetWorkflowExecution will reset an existing workflow execution to a specified - * `WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current - * execution instance. "Exclusive" means the identified completed event itself is not replayed - * in the reset history; the preceding `WORKFLOW_TASK_STARTED` event remains and will be marked as failed - * immediately, and a new workflow task will be scheduled to retry it. - * @param request ResetWorkflowExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ResetWorkflowExecutionResponse - */ - public resetWorkflowExecution(request: temporal.api.workflowservice.v1.IResetWorkflowExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ResetWorkflowExecutionCallback): void; - - /** - * ResetWorkflowExecution will reset an existing workflow execution to a specified - * `WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current - * execution instance. "Exclusive" means the identified completed event itself is not replayed - * in the reset history; the preceding `WORKFLOW_TASK_STARTED` event remains and will be marked as failed - * immediately, and a new workflow task will be scheduled to retry it. - * @param request ResetWorkflowExecutionRequest message or plain object - * @returns Promise - */ - public resetWorkflowExecution(request: temporal.api.workflowservice.v1.IResetWorkflowExecutionRequest): Promise; - - /** - * TerminateWorkflowExecution terminates an existing workflow execution by recording a - * `WORKFLOW_EXECUTION_TERMINATED` event in the history and immediately terminating the - * execution instance. - * @param request TerminateWorkflowExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TerminateWorkflowExecutionResponse - */ - public terminateWorkflowExecution(request: temporal.api.workflowservice.v1.ITerminateWorkflowExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.TerminateWorkflowExecutionCallback): void; - - /** - * TerminateWorkflowExecution terminates an existing workflow execution by recording a - * `WORKFLOW_EXECUTION_TERMINATED` event in the history and immediately terminating the - * execution instance. - * @param request TerminateWorkflowExecutionRequest message or plain object - * @returns Promise - */ - public terminateWorkflowExecution(request: temporal.api.workflowservice.v1.ITerminateWorkflowExecutionRequest): Promise; - - /** - * DeleteWorkflowExecution asynchronously deletes a specific Workflow Execution (when - * WorkflowExecution.run_id is provided) or the latest Workflow Execution (when - * WorkflowExecution.run_id is not provided). If the Workflow Execution is Running, it will be - * terminated before deletion. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: Workflow deletion not exposed to HTTP, users should use cancel or terminate. --) - * @param request DeleteWorkflowExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteWorkflowExecutionResponse - */ - public deleteWorkflowExecution(request: temporal.api.workflowservice.v1.IDeleteWorkflowExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DeleteWorkflowExecutionCallback): void; - - /** - * DeleteWorkflowExecution asynchronously deletes a specific Workflow Execution (when - * WorkflowExecution.run_id is provided) or the latest Workflow Execution (when - * WorkflowExecution.run_id is not provided). If the Workflow Execution is Running, it will be - * terminated before deletion. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: Workflow deletion not exposed to HTTP, users should use cancel or terminate. --) - * @param request DeleteWorkflowExecutionRequest message or plain object - * @returns Promise - */ - public deleteWorkflowExecution(request: temporal.api.workflowservice.v1.IDeleteWorkflowExecutionRequest): Promise; - - /** - * ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific namespace. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) - * @param request ListOpenWorkflowExecutionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOpenWorkflowExecutionsResponse - */ - public listOpenWorkflowExecutions(request: temporal.api.workflowservice.v1.IListOpenWorkflowExecutionsRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ListOpenWorkflowExecutionsCallback): void; - - /** - * ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific namespace. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) - * @param request ListOpenWorkflowExecutionsRequest message or plain object - * @returns Promise - */ - public listOpenWorkflowExecutions(request: temporal.api.workflowservice.v1.IListOpenWorkflowExecutionsRequest): Promise; - - /** - * ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific namespace. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) - * @param request ListClosedWorkflowExecutionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListClosedWorkflowExecutionsResponse - */ - public listClosedWorkflowExecutions(request: temporal.api.workflowservice.v1.IListClosedWorkflowExecutionsRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ListClosedWorkflowExecutionsCallback): void; - - /** - * ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific namespace. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) - * @param request ListClosedWorkflowExecutionsRequest message or plain object - * @returns Promise - */ - public listClosedWorkflowExecutions(request: temporal.api.workflowservice.v1.IListClosedWorkflowExecutionsRequest): Promise; - - /** - * ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace. - * @param request ListWorkflowExecutionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListWorkflowExecutionsResponse - */ - public listWorkflowExecutions(request: temporal.api.workflowservice.v1.IListWorkflowExecutionsRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ListWorkflowExecutionsCallback): void; - - /** - * ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace. - * @param request ListWorkflowExecutionsRequest message or plain object - * @returns Promise - */ - public listWorkflowExecutions(request: temporal.api.workflowservice.v1.IListWorkflowExecutionsRequest): Promise; - - /** - * ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace. - * @param request ListArchivedWorkflowExecutionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListArchivedWorkflowExecutionsResponse - */ - public listArchivedWorkflowExecutions(request: temporal.api.workflowservice.v1.IListArchivedWorkflowExecutionsRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ListArchivedWorkflowExecutionsCallback): void; - - /** - * ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace. - * @param request ListArchivedWorkflowExecutionsRequest message or plain object - * @returns Promise - */ - public listArchivedWorkflowExecutions(request: temporal.api.workflowservice.v1.IListArchivedWorkflowExecutionsRequest): Promise; - - /** - * ScanWorkflowExecutions _was_ a visibility API to list large amount of workflow executions in a specific namespace without order. - * It has since been deprecated in favor of `ListWorkflowExecutions` and rewritten to use `ListWorkflowExecutions` internally. - * - * Deprecated: Replaced with `ListWorkflowExecutions`. - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) - * @param request ScanWorkflowExecutionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ScanWorkflowExecutionsResponse - */ - public scanWorkflowExecutions(request: temporal.api.workflowservice.v1.IScanWorkflowExecutionsRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ScanWorkflowExecutionsCallback): void; - - /** - * ScanWorkflowExecutions _was_ a visibility API to list large amount of workflow executions in a specific namespace without order. - * It has since been deprecated in favor of `ListWorkflowExecutions` and rewritten to use `ListWorkflowExecutions` internally. - * - * Deprecated: Replaced with `ListWorkflowExecutions`. - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) - * @param request ScanWorkflowExecutionsRequest message or plain object - * @returns Promise - */ - public scanWorkflowExecutions(request: temporal.api.workflowservice.v1.IScanWorkflowExecutionsRequest): Promise; - - /** - * CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace. - * @param request CountWorkflowExecutionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CountWorkflowExecutionsResponse - */ - public countWorkflowExecutions(request: temporal.api.workflowservice.v1.ICountWorkflowExecutionsRequest, callback: temporal.api.workflowservice.v1.WorkflowService.CountWorkflowExecutionsCallback): void; - - /** - * CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace. - * @param request CountWorkflowExecutionsRequest message or plain object - * @returns Promise - */ - public countWorkflowExecutions(request: temporal.api.workflowservice.v1.ICountWorkflowExecutionsRequest): Promise; - - /** - * GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose this search attribute API to HTTP (but may expose on OperatorService). --) - * @param request GetSearchAttributesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetSearchAttributesResponse - */ - public getSearchAttributes(request: temporal.api.workflowservice.v1.IGetSearchAttributesRequest, callback: temporal.api.workflowservice.v1.WorkflowService.GetSearchAttributesCallback): void; - - /** - * GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose this search attribute API to HTTP (but may expose on OperatorService). --) - * @param request GetSearchAttributesRequest message or plain object - * @returns Promise - */ - public getSearchAttributes(request: temporal.api.workflowservice.v1.IGetSearchAttributesRequest): Promise; - - /** - * RespondQueryTaskCompleted is called by workers to complete queries which were delivered on - * the `query` (not `queries`) field of a `PollWorkflowTaskQueueResponse`. - * - * Completing the query will unblock the corresponding client call to `QueryWorkflow` and return - * the query result a response. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request RespondQueryTaskCompletedRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RespondQueryTaskCompletedResponse - */ - public respondQueryTaskCompleted(request: temporal.api.workflowservice.v1.IRespondQueryTaskCompletedRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RespondQueryTaskCompletedCallback): void; - - /** - * RespondQueryTaskCompleted is called by workers to complete queries which were delivered on - * the `query` (not `queries`) field of a `PollWorkflowTaskQueueResponse`. - * - * Completing the query will unblock the corresponding client call to `QueryWorkflow` and return - * the query result a response. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request RespondQueryTaskCompletedRequest message or plain object - * @returns Promise - */ - public respondQueryTaskCompleted(request: temporal.api.workflowservice.v1.IRespondQueryTaskCompletedRequest): Promise; - - /** - * ResetStickyTaskQueue resets the sticky task queue related information in the mutable state of - * a given workflow. This is prudent for workers to perform if a workflow has been paged out of - * their cache. - * - * Things cleared are: - * 1. StickyTaskQueue - * 2. StickyScheduleToStartTimeout - * - * When possible, ShutdownWorker should be preferred over - * ResetStickyTaskQueue (particularly when a worker is shutting down or - * cycling). - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request ResetStickyTaskQueueRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ResetStickyTaskQueueResponse - */ - public resetStickyTaskQueue(request: temporal.api.workflowservice.v1.IResetStickyTaskQueueRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ResetStickyTaskQueueCallback): void; - - /** - * ResetStickyTaskQueue resets the sticky task queue related information in the mutable state of - * a given workflow. This is prudent for workers to perform if a workflow has been paged out of - * their cache. - * - * Things cleared are: - * 1. StickyTaskQueue - * 2. StickyScheduleToStartTimeout - * - * When possible, ShutdownWorker should be preferred over - * ResetStickyTaskQueue (particularly when a worker is shutting down or - * cycling). - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request ResetStickyTaskQueueRequest message or plain object - * @returns Promise - */ - public resetStickyTaskQueue(request: temporal.api.workflowservice.v1.IResetStickyTaskQueueRequest): Promise; - - /** - * ShutdownWorker is used to indicate that the given sticky task - * queue is no longer being polled by its worker. Following the completion of - * ShutdownWorker, newly-added workflow tasks will instead be placed - * in the normal task queue, eligible for any worker to pick up. - * - * ShutdownWorker should be called by workers while shutting down, - * after they've shut down their pollers. If another sticky poll - * request is issued, the sticky task queue will be revived. - * - * As of Temporal Server v1.25.0, ShutdownWorker hasn't yet been implemented. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request ShutdownWorkerRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ShutdownWorkerResponse - */ - public shutdownWorker(request: temporal.api.workflowservice.v1.IShutdownWorkerRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ShutdownWorkerCallback): void; - - /** - * ShutdownWorker is used to indicate that the given sticky task - * queue is no longer being polled by its worker. Following the completion of - * ShutdownWorker, newly-added workflow tasks will instead be placed - * in the normal task queue, eligible for any worker to pick up. - * - * ShutdownWorker should be called by workers while shutting down, - * after they've shut down their pollers. If another sticky poll - * request is issued, the sticky task queue will be revived. - * - * As of Temporal Server v1.25.0, ShutdownWorker hasn't yet been implemented. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request ShutdownWorkerRequest message or plain object - * @returns Promise - */ - public shutdownWorker(request: temporal.api.workflowservice.v1.IShutdownWorkerRequest): Promise; - - /** - * QueryWorkflow requests a query be executed for a specified workflow execution. - * @param request QueryWorkflowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryWorkflowResponse - */ - public queryWorkflow(request: temporal.api.workflowservice.v1.IQueryWorkflowRequest, callback: temporal.api.workflowservice.v1.WorkflowService.QueryWorkflowCallback): void; - - /** - * QueryWorkflow requests a query be executed for a specified workflow execution. - * @param request QueryWorkflowRequest message or plain object - * @returns Promise - */ - public queryWorkflow(request: temporal.api.workflowservice.v1.IQueryWorkflowRequest): Promise; - - /** - * DescribeWorkflowExecution returns information about the specified workflow execution. - * @param request DescribeWorkflowExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DescribeWorkflowExecutionResponse - */ - public describeWorkflowExecution(request: temporal.api.workflowservice.v1.IDescribeWorkflowExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DescribeWorkflowExecutionCallback): void; - - /** - * DescribeWorkflowExecution returns information about the specified workflow execution. - * @param request DescribeWorkflowExecutionRequest message or plain object - * @returns Promise - */ - public describeWorkflowExecution(request: temporal.api.workflowservice.v1.IDescribeWorkflowExecutionRequest): Promise; - - /** - * DescribeTaskQueue returns the following information about the target task queue, broken down by Build ID: - * - List of pollers - * - Workflow Reachability status - * - Backlog info for Workflow and/or Activity tasks - * @param request DescribeTaskQueueRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DescribeTaskQueueResponse - */ - public describeTaskQueue(request: temporal.api.workflowservice.v1.IDescribeTaskQueueRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DescribeTaskQueueCallback): void; - - /** - * DescribeTaskQueue returns the following information about the target task queue, broken down by Build ID: - * - List of pollers - * - Workflow Reachability status - * - Backlog info for Workflow and/or Activity tasks - * @param request DescribeTaskQueueRequest message or plain object - * @returns Promise - */ - public describeTaskQueue(request: temporal.api.workflowservice.v1.IDescribeTaskQueueRequest): Promise; - - /** - * GetClusterInfo returns information about temporal cluster - * @param request GetClusterInfoRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetClusterInfoResponse - */ - public getClusterInfo(request: temporal.api.workflowservice.v1.IGetClusterInfoRequest, callback: temporal.api.workflowservice.v1.WorkflowService.GetClusterInfoCallback): void; - - /** - * GetClusterInfo returns information about temporal cluster - * @param request GetClusterInfoRequest message or plain object - * @returns Promise - */ - public getClusterInfo(request: temporal.api.workflowservice.v1.IGetClusterInfoRequest): Promise; - - /** - * GetSystemInfo returns information about the system. - * @param request GetSystemInfoRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetSystemInfoResponse - */ - public getSystemInfo(request: temporal.api.workflowservice.v1.IGetSystemInfoRequest, callback: temporal.api.workflowservice.v1.WorkflowService.GetSystemInfoCallback): void; - - /** - * GetSystemInfo returns information about the system. - * @param request GetSystemInfoRequest message or plain object - * @returns Promise - */ - public getSystemInfo(request: temporal.api.workflowservice.v1.IGetSystemInfoRequest): Promise; - - /** - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose this low-level API to HTTP. --) - * @param request ListTaskQueuePartitionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTaskQueuePartitionsResponse - */ - public listTaskQueuePartitions(request: temporal.api.workflowservice.v1.IListTaskQueuePartitionsRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ListTaskQueuePartitionsCallback): void; - - /** - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose this low-level API to HTTP. --) - * @param request ListTaskQueuePartitionsRequest message or plain object - * @returns Promise - */ - public listTaskQueuePartitions(request: temporal.api.workflowservice.v1.IListTaskQueuePartitionsRequest): Promise; - - /** - * Creates a new schedule. - * @param request CreateScheduleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CreateScheduleResponse - */ - public createSchedule(request: temporal.api.workflowservice.v1.ICreateScheduleRequest, callback: temporal.api.workflowservice.v1.WorkflowService.CreateScheduleCallback): void; - - /** - * Creates a new schedule. - * @param request CreateScheduleRequest message or plain object - * @returns Promise - */ - public createSchedule(request: temporal.api.workflowservice.v1.ICreateScheduleRequest): Promise; - - /** - * Returns the schedule description and current state of an existing schedule. - * @param request DescribeScheduleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DescribeScheduleResponse - */ - public describeSchedule(request: temporal.api.workflowservice.v1.IDescribeScheduleRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DescribeScheduleCallback): void; - - /** - * Returns the schedule description and current state of an existing schedule. - * @param request DescribeScheduleRequest message or plain object - * @returns Promise - */ - public describeSchedule(request: temporal.api.workflowservice.v1.IDescribeScheduleRequest): Promise; - - /** - * Changes the configuration or state of an existing schedule. - * @param request UpdateScheduleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateScheduleResponse - */ - public updateSchedule(request: temporal.api.workflowservice.v1.IUpdateScheduleRequest, callback: temporal.api.workflowservice.v1.WorkflowService.UpdateScheduleCallback): void; - - /** - * Changes the configuration or state of an existing schedule. - * @param request UpdateScheduleRequest message or plain object - * @returns Promise - */ - public updateSchedule(request: temporal.api.workflowservice.v1.IUpdateScheduleRequest): Promise; - - /** - * Makes a specific change to a schedule or triggers an immediate action. - * @param request PatchScheduleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PatchScheduleResponse - */ - public patchSchedule(request: temporal.api.workflowservice.v1.IPatchScheduleRequest, callback: temporal.api.workflowservice.v1.WorkflowService.PatchScheduleCallback): void; - - /** - * Makes a specific change to a schedule or triggers an immediate action. - * @param request PatchScheduleRequest message or plain object - * @returns Promise - */ - public patchSchedule(request: temporal.api.workflowservice.v1.IPatchScheduleRequest): Promise; - - /** - * Lists matching times within a range. - * @param request ListScheduleMatchingTimesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListScheduleMatchingTimesResponse - */ - public listScheduleMatchingTimes(request: temporal.api.workflowservice.v1.IListScheduleMatchingTimesRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ListScheduleMatchingTimesCallback): void; - - /** - * Lists matching times within a range. - * @param request ListScheduleMatchingTimesRequest message or plain object - * @returns Promise - */ - public listScheduleMatchingTimes(request: temporal.api.workflowservice.v1.IListScheduleMatchingTimesRequest): Promise; - - /** - * Deletes a schedule, removing it from the system. - * @param request DeleteScheduleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteScheduleResponse - */ - public deleteSchedule(request: temporal.api.workflowservice.v1.IDeleteScheduleRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DeleteScheduleCallback): void; - - /** - * Deletes a schedule, removing it from the system. - * @param request DeleteScheduleRequest message or plain object - * @returns Promise - */ - public deleteSchedule(request: temporal.api.workflowservice.v1.IDeleteScheduleRequest): Promise; - - /** - * List all schedules in a namespace. - * @param request ListSchedulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSchedulesResponse - */ - public listSchedules(request: temporal.api.workflowservice.v1.IListSchedulesRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ListSchedulesCallback): void; - - /** - * List all schedules in a namespace. - * @param request ListSchedulesRequest message or plain object - * @returns Promise - */ - public listSchedules(request: temporal.api.workflowservice.v1.IListSchedulesRequest): Promise; - - /** - * CountSchedules is a visibility API to count schedules in a specific namespace. - * @param request CountSchedulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CountSchedulesResponse - */ - public countSchedules(request: temporal.api.workflowservice.v1.ICountSchedulesRequest, callback: temporal.api.workflowservice.v1.WorkflowService.CountSchedulesCallback): void; - - /** - * CountSchedules is a visibility API to count schedules in a specific namespace. - * @param request CountSchedulesRequest message or plain object - * @returns Promise - */ - public countSchedules(request: temporal.api.workflowservice.v1.ICountSchedulesRequest): Promise; - - /** - * Deprecated. Use `UpdateWorkerVersioningRules`. - * - * Allows users to specify sets of worker build id versions on a per task queue basis. Versions - * are ordered, and may be either compatible with some extant version, or a new incompatible - * version, forming sets of ids which are incompatible with each other, but whose contained - * members are compatible with one another. - * - * A single build id may be mapped to multiple task queues using this API for cases where a single process hosts - * multiple workers. - * - * To query which workers can be retired, use the `GetWorkerTaskReachability` API. - * - * NOTE: The number of task queues mapped to a single build id is limited by the `limit.taskQueuesPerBuildId` - * (default is 20), if this limit is exceeded this API will error with a FailedPrecondition. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do yet expose versioning API to HTTP. --) - * @param request UpdateWorkerBuildIdCompatibilityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateWorkerBuildIdCompatibilityResponse - */ - public updateWorkerBuildIdCompatibility(request: temporal.api.workflowservice.v1.IUpdateWorkerBuildIdCompatibilityRequest, callback: temporal.api.workflowservice.v1.WorkflowService.UpdateWorkerBuildIdCompatibilityCallback): void; - - /** - * Deprecated. Use `UpdateWorkerVersioningRules`. - * - * Allows users to specify sets of worker build id versions on a per task queue basis. Versions - * are ordered, and may be either compatible with some extant version, or a new incompatible - * version, forming sets of ids which are incompatible with each other, but whose contained - * members are compatible with one another. - * - * A single build id may be mapped to multiple task queues using this API for cases where a single process hosts - * multiple workers. - * - * To query which workers can be retired, use the `GetWorkerTaskReachability` API. - * - * NOTE: The number of task queues mapped to a single build id is limited by the `limit.taskQueuesPerBuildId` - * (default is 20), if this limit is exceeded this API will error with a FailedPrecondition. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do yet expose versioning API to HTTP. --) - * @param request UpdateWorkerBuildIdCompatibilityRequest message or plain object - * @returns Promise - */ - public updateWorkerBuildIdCompatibility(request: temporal.api.workflowservice.v1.IUpdateWorkerBuildIdCompatibilityRequest): Promise; - - /** - * Deprecated. Use `GetWorkerVersioningRules`. - * Fetches the worker build id versioning sets for a task queue. - * @param request GetWorkerBuildIdCompatibilityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetWorkerBuildIdCompatibilityResponse - */ - public getWorkerBuildIdCompatibility(request: temporal.api.workflowservice.v1.IGetWorkerBuildIdCompatibilityRequest, callback: temporal.api.workflowservice.v1.WorkflowService.GetWorkerBuildIdCompatibilityCallback): void; - - /** - * Deprecated. Use `GetWorkerVersioningRules`. - * Fetches the worker build id versioning sets for a task queue. - * @param request GetWorkerBuildIdCompatibilityRequest message or plain object - * @returns Promise - */ - public getWorkerBuildIdCompatibility(request: temporal.api.workflowservice.v1.IGetWorkerBuildIdCompatibilityRequest): Promise; - - /** - * Use this API to manage Worker Versioning Rules for a given Task Queue. There are two types of - * rules: Build ID Assignment rules and Compatible Build ID Redirect rules. - * - * Assignment rules determine how to assign new executions to a Build IDs. Their primary - * use case is to specify the latest Build ID but they have powerful features for gradual rollout - * of a new Build ID. - * - * Once a workflow execution is assigned to a Build ID and it completes its first Workflow Task, - * the workflow stays on the assigned Build ID regardless of changes in assignment rules. This - * eliminates the need for compatibility between versions when you only care about using the new - * version for new workflows and let existing workflows finish in their own version. - * - * Activities, Child Workflows and Continue-as-New executions have the option to inherit the - * Build ID of their parent/previous workflow or use the latest assignment rules to independently - * select a Build ID. - * - * Redirect rules should only be used when you want to move workflows and activities assigned to - * one Build ID (source) to another compatible Build ID (target). You are responsible to make sure - * the target Build ID of a redirect rule is able to process event histories made by the source - * Build ID by using [Patching](https://docs.temporal.io/workflows#patching) or other means. - * - * WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do yet expose versioning API to HTTP. --) - * @param request UpdateWorkerVersioningRulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateWorkerVersioningRulesResponse - */ - public updateWorkerVersioningRules(request: temporal.api.workflowservice.v1.IUpdateWorkerVersioningRulesRequest, callback: temporal.api.workflowservice.v1.WorkflowService.UpdateWorkerVersioningRulesCallback): void; - - /** - * Use this API to manage Worker Versioning Rules for a given Task Queue. There are two types of - * rules: Build ID Assignment rules and Compatible Build ID Redirect rules. - * - * Assignment rules determine how to assign new executions to a Build IDs. Their primary - * use case is to specify the latest Build ID but they have powerful features for gradual rollout - * of a new Build ID. - * - * Once a workflow execution is assigned to a Build ID and it completes its first Workflow Task, - * the workflow stays on the assigned Build ID regardless of changes in assignment rules. This - * eliminates the need for compatibility between versions when you only care about using the new - * version for new workflows and let existing workflows finish in their own version. - * - * Activities, Child Workflows and Continue-as-New executions have the option to inherit the - * Build ID of their parent/previous workflow or use the latest assignment rules to independently - * select a Build ID. - * - * Redirect rules should only be used when you want to move workflows and activities assigned to - * one Build ID (source) to another compatible Build ID (target). You are responsible to make sure - * the target Build ID of a redirect rule is able to process event histories made by the source - * Build ID by using [Patching](https://docs.temporal.io/workflows#patching) or other means. - * - * WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do yet expose versioning API to HTTP. --) - * @param request UpdateWorkerVersioningRulesRequest message or plain object - * @returns Promise - */ - public updateWorkerVersioningRules(request: temporal.api.workflowservice.v1.IUpdateWorkerVersioningRulesRequest): Promise; - - /** - * Fetches the Build ID assignment and redirect rules for a Task Queue. - * WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. - * @param request GetWorkerVersioningRulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetWorkerVersioningRulesResponse - */ - public getWorkerVersioningRules(request: temporal.api.workflowservice.v1.IGetWorkerVersioningRulesRequest, callback: temporal.api.workflowservice.v1.WorkflowService.GetWorkerVersioningRulesCallback): void; - - /** - * Fetches the Build ID assignment and redirect rules for a Task Queue. - * WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. - * @param request GetWorkerVersioningRulesRequest message or plain object - * @returns Promise - */ - public getWorkerVersioningRules(request: temporal.api.workflowservice.v1.IGetWorkerVersioningRulesRequest): Promise; - - /** - * Deprecated. Use `DescribeTaskQueue`. - * - * Fetches task reachability to determine whether a worker may be retired. - * The request may specify task queues to query for or let the server fetch all task queues mapped to the given - * build IDs. - * - * When requesting a large number of task queues or all task queues associated with the given build ids in a - * namespace, all task queues will be listed in the response but some of them may not contain reachability - * information due to a server enforced limit. When reaching the limit, task queues that reachability information - * could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue - * another call to get the reachability for those task queues. - * - * Open source users can adjust this limit by setting the server's dynamic config value for - * `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. - * @param request GetWorkerTaskReachabilityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetWorkerTaskReachabilityResponse - */ - public getWorkerTaskReachability(request: temporal.api.workflowservice.v1.IGetWorkerTaskReachabilityRequest, callback: temporal.api.workflowservice.v1.WorkflowService.GetWorkerTaskReachabilityCallback): void; - - /** - * Deprecated. Use `DescribeTaskQueue`. - * - * Fetches task reachability to determine whether a worker may be retired. - * The request may specify task queues to query for or let the server fetch all task queues mapped to the given - * build IDs. - * - * When requesting a large number of task queues or all task queues associated with the given build ids in a - * namespace, all task queues will be listed in the response but some of them may not contain reachability - * information due to a server enforced limit. When reaching the limit, task queues that reachability information - * could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue - * another call to get the reachability for those task queues. - * - * Open source users can adjust this limit by setting the server's dynamic config value for - * `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. - * @param request GetWorkerTaskReachabilityRequest message or plain object - * @returns Promise - */ - public getWorkerTaskReachability(request: temporal.api.workflowservice.v1.IGetWorkerTaskReachabilityRequest): Promise; - - /** - * Describes a worker deployment. - * Experimental. This API might significantly change or be removed in a future release. - * Deprecated. Replaced with `DescribeWorkerDeploymentVersion`. - * @param request DescribeDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DescribeDeploymentResponse - */ - public describeDeployment(request: temporal.api.workflowservice.v1.IDescribeDeploymentRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DescribeDeploymentCallback): void; - - /** - * Describes a worker deployment. - * Experimental. This API might significantly change or be removed in a future release. - * Deprecated. Replaced with `DescribeWorkerDeploymentVersion`. - * @param request DescribeDeploymentRequest message or plain object - * @returns Promise - */ - public describeDeployment(request: temporal.api.workflowservice.v1.IDescribeDeploymentRequest): Promise; - - /** - * Describes a worker deployment version. - * Experimental. This API might significantly change or be removed in a future release. - * @param request DescribeWorkerDeploymentVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DescribeWorkerDeploymentVersionResponse - */ - public describeWorkerDeploymentVersion(request: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentVersionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DescribeWorkerDeploymentVersionCallback): void; - - /** - * Describes a worker deployment version. - * Experimental. This API might significantly change or be removed in a future release. - * @param request DescribeWorkerDeploymentVersionRequest message or plain object - * @returns Promise - */ - public describeWorkerDeploymentVersion(request: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentVersionRequest): Promise; - - /** - * Lists worker deployments in the namespace. Optionally can filter based on deployment series - * name. - * Experimental. This API might significantly change or be removed in a future release. - * Deprecated. Replaced with `ListWorkerDeployments`. - * @param request ListDeploymentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDeploymentsResponse - */ - public listDeployments(request: temporal.api.workflowservice.v1.IListDeploymentsRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ListDeploymentsCallback): void; - - /** - * Lists worker deployments in the namespace. Optionally can filter based on deployment series - * name. - * Experimental. This API might significantly change or be removed in a future release. - * Deprecated. Replaced with `ListWorkerDeployments`. - * @param request ListDeploymentsRequest message or plain object - * @returns Promise - */ - public listDeployments(request: temporal.api.workflowservice.v1.IListDeploymentsRequest): Promise; - - /** - * Returns the reachability level of a worker deployment to help users decide when it is time - * to decommission a deployment. Reachability level is calculated based on the deployment's - * `status` and existing workflows that depend on the given deployment for their execution. - * Calculating reachability is relatively expensive. Therefore, server might return a recently - * cached value. In such a case, the `last_update_time` will inform you about the actual - * reachability calculation time. - * Experimental. This API might significantly change or be removed in a future release. - * Deprecated. Replaced with `DrainageInfo` returned by `DescribeWorkerDeploymentVersion`. - * @param request GetDeploymentReachabilityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetDeploymentReachabilityResponse - */ - public getDeploymentReachability(request: temporal.api.workflowservice.v1.IGetDeploymentReachabilityRequest, callback: temporal.api.workflowservice.v1.WorkflowService.GetDeploymentReachabilityCallback): void; - - /** - * Returns the reachability level of a worker deployment to help users decide when it is time - * to decommission a deployment. Reachability level is calculated based on the deployment's - * `status` and existing workflows that depend on the given deployment for their execution. - * Calculating reachability is relatively expensive. Therefore, server might return a recently - * cached value. In such a case, the `last_update_time` will inform you about the actual - * reachability calculation time. - * Experimental. This API might significantly change or be removed in a future release. - * Deprecated. Replaced with `DrainageInfo` returned by `DescribeWorkerDeploymentVersion`. - * @param request GetDeploymentReachabilityRequest message or plain object - * @returns Promise - */ - public getDeploymentReachability(request: temporal.api.workflowservice.v1.IGetDeploymentReachabilityRequest): Promise; - - /** - * Returns the current deployment (and its info) for a given deployment series. - * Experimental. This API might significantly change or be removed in a future release. - * Deprecated. Replaced by `current_version` returned by `DescribeWorkerDeployment`. - * @param request GetCurrentDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetCurrentDeploymentResponse - */ - public getCurrentDeployment(request: temporal.api.workflowservice.v1.IGetCurrentDeploymentRequest, callback: temporal.api.workflowservice.v1.WorkflowService.GetCurrentDeploymentCallback): void; - - /** - * Returns the current deployment (and its info) for a given deployment series. - * Experimental. This API might significantly change or be removed in a future release. - * Deprecated. Replaced by `current_version` returned by `DescribeWorkerDeployment`. - * @param request GetCurrentDeploymentRequest message or plain object - * @returns Promise - */ - public getCurrentDeployment(request: temporal.api.workflowservice.v1.IGetCurrentDeploymentRequest): Promise; - - /** - * Sets a deployment as the current deployment for its deployment series. Can optionally update - * the metadata of the deployment as well. - * Experimental. This API might significantly change or be removed in a future release. - * Deprecated. Replaced by `SetWorkerDeploymentCurrentVersion`. - * @param request SetCurrentDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SetCurrentDeploymentResponse - */ - public setCurrentDeployment(request: temporal.api.workflowservice.v1.ISetCurrentDeploymentRequest, callback: temporal.api.workflowservice.v1.WorkflowService.SetCurrentDeploymentCallback): void; - - /** - * Sets a deployment as the current deployment for its deployment series. Can optionally update - * the metadata of the deployment as well. - * Experimental. This API might significantly change or be removed in a future release. - * Deprecated. Replaced by `SetWorkerDeploymentCurrentVersion`. - * @param request SetCurrentDeploymentRequest message or plain object - * @returns Promise - */ - public setCurrentDeployment(request: temporal.api.workflowservice.v1.ISetCurrentDeploymentRequest): Promise; - - /** - * Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping - * Version if it is the Version being set as Current. - * Experimental. This API might significantly change or be removed in a future release. - * @param request SetWorkerDeploymentCurrentVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SetWorkerDeploymentCurrentVersionResponse - */ - public setWorkerDeploymentCurrentVersion(request: temporal.api.workflowservice.v1.ISetWorkerDeploymentCurrentVersionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.SetWorkerDeploymentCurrentVersionCallback): void; - - /** - * Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping - * Version if it is the Version being set as Current. - * Experimental. This API might significantly change or be removed in a future release. - * @param request SetWorkerDeploymentCurrentVersionRequest message or plain object - * @returns Promise - */ - public setWorkerDeploymentCurrentVersion(request: temporal.api.workflowservice.v1.ISetWorkerDeploymentCurrentVersionRequest): Promise; - - /** - * Describes a Worker Deployment. - * Experimental. This API might significantly change or be removed in a future release. - * @param request DescribeWorkerDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DescribeWorkerDeploymentResponse - */ - public describeWorkerDeployment(request: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DescribeWorkerDeploymentCallback): void; - - /** - * Describes a Worker Deployment. - * Experimental. This API might significantly change or be removed in a future release. - * @param request DescribeWorkerDeploymentRequest message or plain object - * @returns Promise - */ - public describeWorkerDeployment(request: temporal.api.workflowservice.v1.IDescribeWorkerDeploymentRequest): Promise; - - /** - * Deletes records of (an old) Deployment. A deployment can only be deleted if - * it has no Version in it. - * Experimental. This API might significantly change or be removed in a future release. - * @param request DeleteWorkerDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteWorkerDeploymentResponse - */ - public deleteWorkerDeployment(request: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DeleteWorkerDeploymentCallback): void; - - /** - * Deletes records of (an old) Deployment. A deployment can only be deleted if - * it has no Version in it. - * Experimental. This API might significantly change or be removed in a future release. - * @param request DeleteWorkerDeploymentRequest message or plain object - * @returns Promise - */ - public deleteWorkerDeployment(request: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentRequest): Promise; - - /** - * Used for manual deletion of Versions. User can delete a Version only when all the - * following conditions are met: - * - It is not the Current or Ramping Version of its Deployment. - * - It has no active pollers (none of the task queues in the Version have pollers) - * - It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition - * can be skipped by passing `skip-drainage=true`. - * Experimental. This API might significantly change or be removed in a future release. - * @param request DeleteWorkerDeploymentVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteWorkerDeploymentVersionResponse - */ - public deleteWorkerDeploymentVersion(request: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentVersionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DeleteWorkerDeploymentVersionCallback): void; - - /** - * Used for manual deletion of Versions. User can delete a Version only when all the - * following conditions are met: - * - It is not the Current or Ramping Version of its Deployment. - * - It has no active pollers (none of the task queues in the Version have pollers) - * - It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition - * can be skipped by passing `skip-drainage=true`. - * Experimental. This API might significantly change or be removed in a future release. - * @param request DeleteWorkerDeploymentVersionRequest message or plain object - * @returns Promise - */ - public deleteWorkerDeploymentVersion(request: temporal.api.workflowservice.v1.IDeleteWorkerDeploymentVersionRequest): Promise; - - /** - * Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for - * gradual ramp to unversioned workers too. - * Experimental. This API might significantly change or be removed in a future release. - * @param request SetWorkerDeploymentRampingVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SetWorkerDeploymentRampingVersionResponse - */ - public setWorkerDeploymentRampingVersion(request: temporal.api.workflowservice.v1.ISetWorkerDeploymentRampingVersionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.SetWorkerDeploymentRampingVersionCallback): void; - - /** - * Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for - * gradual ramp to unversioned workers too. - * Experimental. This API might significantly change or be removed in a future release. - * @param request SetWorkerDeploymentRampingVersionRequest message or plain object - * @returns Promise - */ - public setWorkerDeploymentRampingVersion(request: temporal.api.workflowservice.v1.ISetWorkerDeploymentRampingVersionRequest): Promise; - - /** - * Lists all Worker Deployments that are tracked in the Namespace. - * Experimental. This API might significantly change or be removed in a future release. - * @param request ListWorkerDeploymentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListWorkerDeploymentsResponse - */ - public listWorkerDeployments(request: temporal.api.workflowservice.v1.IListWorkerDeploymentsRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ListWorkerDeploymentsCallback): void; - - /** - * Lists all Worker Deployments that are tracked in the Namespace. - * Experimental. This API might significantly change or be removed in a future release. - * @param request ListWorkerDeploymentsRequest message or plain object - * @returns Promise - */ - public listWorkerDeployments(request: temporal.api.workflowservice.v1.IListWorkerDeploymentsRequest): Promise; - - /** - * Updates the user-given metadata attached to a Worker Deployment Version. - * Experimental. This API might significantly change or be removed in a future release. - * @param request UpdateWorkerDeploymentVersionMetadataRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateWorkerDeploymentVersionMetadataResponse - */ - public updateWorkerDeploymentVersionMetadata(request: temporal.api.workflowservice.v1.IUpdateWorkerDeploymentVersionMetadataRequest, callback: temporal.api.workflowservice.v1.WorkflowService.UpdateWorkerDeploymentVersionMetadataCallback): void; - - /** - * Updates the user-given metadata attached to a Worker Deployment Version. - * Experimental. This API might significantly change or be removed in a future release. - * @param request UpdateWorkerDeploymentVersionMetadataRequest message or plain object - * @returns Promise - */ - public updateWorkerDeploymentVersionMetadata(request: temporal.api.workflowservice.v1.IUpdateWorkerDeploymentVersionMetadataRequest): Promise; - - /** - * Set/unset the ManagerIdentity of a Worker Deployment. - * Experimental. This API might significantly change or be removed in a future release. - * @param request SetWorkerDeploymentManagerRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SetWorkerDeploymentManagerResponse - */ - public setWorkerDeploymentManager(request: temporal.api.workflowservice.v1.ISetWorkerDeploymentManagerRequest, callback: temporal.api.workflowservice.v1.WorkflowService.SetWorkerDeploymentManagerCallback): void; - - /** - * Set/unset the ManagerIdentity of a Worker Deployment. - * Experimental. This API might significantly change or be removed in a future release. - * @param request SetWorkerDeploymentManagerRequest message or plain object - * @returns Promise - */ - public setWorkerDeploymentManager(request: temporal.api.workflowservice.v1.ISetWorkerDeploymentManagerRequest): Promise; - - /** - * Invokes the specified Update function on user Workflow code. - * @param request UpdateWorkflowExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateWorkflowExecutionResponse - */ - public updateWorkflowExecution(request: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.UpdateWorkflowExecutionCallback): void; - - /** - * Invokes the specified Update function on user Workflow code. - * @param request UpdateWorkflowExecutionRequest message or plain object - * @returns Promise - */ - public updateWorkflowExecution(request: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionRequest): Promise; - - /** - * Polls a Workflow Execution for the outcome of a Workflow Update - * previously issued through the UpdateWorkflowExecution RPC. The effective - * timeout on this call will be shorter of the the caller-supplied gRPC - * timeout and the server's configured long-poll timeout. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We don't expose update polling API to HTTP in favor of a potential future non-blocking form. --) - * @param request PollWorkflowExecutionUpdateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PollWorkflowExecutionUpdateResponse - */ - public pollWorkflowExecutionUpdate(request: temporal.api.workflowservice.v1.IPollWorkflowExecutionUpdateRequest, callback: temporal.api.workflowservice.v1.WorkflowService.PollWorkflowExecutionUpdateCallback): void; - - /** - * Polls a Workflow Execution for the outcome of a Workflow Update - * previously issued through the UpdateWorkflowExecution RPC. The effective - * timeout on this call will be shorter of the the caller-supplied gRPC - * timeout and the server's configured long-poll timeout. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We don't expose update polling API to HTTP in favor of a potential future non-blocking form. --) - * @param request PollWorkflowExecutionUpdateRequest message or plain object - * @returns Promise - */ - public pollWorkflowExecutionUpdate(request: temporal.api.workflowservice.v1.IPollWorkflowExecutionUpdateRequest): Promise; - - /** - * StartBatchOperation starts a new batch operation - * @param request StartBatchOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StartBatchOperationResponse - */ - public startBatchOperation(request: temporal.api.workflowservice.v1.IStartBatchOperationRequest, callback: temporal.api.workflowservice.v1.WorkflowService.StartBatchOperationCallback): void; - - /** - * StartBatchOperation starts a new batch operation - * @param request StartBatchOperationRequest message or plain object - * @returns Promise - */ - public startBatchOperation(request: temporal.api.workflowservice.v1.IStartBatchOperationRequest): Promise; - - /** - * StopBatchOperation stops a batch operation - * @param request StopBatchOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StopBatchOperationResponse - */ - public stopBatchOperation(request: temporal.api.workflowservice.v1.IStopBatchOperationRequest, callback: temporal.api.workflowservice.v1.WorkflowService.StopBatchOperationCallback): void; - - /** - * StopBatchOperation stops a batch operation - * @param request StopBatchOperationRequest message or plain object - * @returns Promise - */ - public stopBatchOperation(request: temporal.api.workflowservice.v1.IStopBatchOperationRequest): Promise; - - /** - * DescribeBatchOperation returns the information about a batch operation - * @param request DescribeBatchOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DescribeBatchOperationResponse - */ - public describeBatchOperation(request: temporal.api.workflowservice.v1.IDescribeBatchOperationRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DescribeBatchOperationCallback): void; - - /** - * DescribeBatchOperation returns the information about a batch operation - * @param request DescribeBatchOperationRequest message or plain object - * @returns Promise - */ - public describeBatchOperation(request: temporal.api.workflowservice.v1.IDescribeBatchOperationRequest): Promise; - - /** - * ListBatchOperations returns a list of batch operations - * @param request ListBatchOperationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBatchOperationsResponse - */ - public listBatchOperations(request: temporal.api.workflowservice.v1.IListBatchOperationsRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ListBatchOperationsCallback): void; - - /** - * ListBatchOperations returns a list of batch operations - * @param request ListBatchOperationsRequest message or plain object - * @returns Promise - */ - public listBatchOperations(request: temporal.api.workflowservice.v1.IListBatchOperationsRequest): Promise; - - /** - * PollNexusTaskQueue is a long poll call used by workers to receive Nexus tasks. - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request PollNexusTaskQueueRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PollNexusTaskQueueResponse - */ - public pollNexusTaskQueue(request: temporal.api.workflowservice.v1.IPollNexusTaskQueueRequest, callback: temporal.api.workflowservice.v1.WorkflowService.PollNexusTaskQueueCallback): void; - - /** - * PollNexusTaskQueue is a long poll call used by workers to receive Nexus tasks. - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request PollNexusTaskQueueRequest message or plain object - * @returns Promise - */ - public pollNexusTaskQueue(request: temporal.api.workflowservice.v1.IPollNexusTaskQueueRequest): Promise; - - /** - * RespondNexusTaskCompleted is called by workers to respond to Nexus tasks received via PollNexusTaskQueue. - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request RespondNexusTaskCompletedRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RespondNexusTaskCompletedResponse - */ - public respondNexusTaskCompleted(request: temporal.api.workflowservice.v1.IRespondNexusTaskCompletedRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RespondNexusTaskCompletedCallback): void; - - /** - * RespondNexusTaskCompleted is called by workers to respond to Nexus tasks received via PollNexusTaskQueue. - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request RespondNexusTaskCompletedRequest message or plain object - * @returns Promise - */ - public respondNexusTaskCompleted(request: temporal.api.workflowservice.v1.IRespondNexusTaskCompletedRequest): Promise; - - /** - * RespondNexusTaskFailed is called by workers to fail Nexus tasks received via PollNexusTaskQueue. - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request RespondNexusTaskFailedRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RespondNexusTaskFailedResponse - */ - public respondNexusTaskFailed(request: temporal.api.workflowservice.v1.IRespondNexusTaskFailedRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RespondNexusTaskFailedCallback): void; - - /** - * RespondNexusTaskFailed is called by workers to fail Nexus tasks received via PollNexusTaskQueue. - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: We do not expose worker API to HTTP. --) - * @param request RespondNexusTaskFailedRequest message or plain object - * @returns Promise - */ - public respondNexusTaskFailed(request: temporal.api.workflowservice.v1.IRespondNexusTaskFailedRequest): Promise; - - /** - * UpdateActivityOptions is called by the client to update the options of an activity by its ID or type. - * If there are multiple pending activities of the provided type - all of them will be updated. - * This API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and - * structured to work well for standalone activities. - * @param request UpdateActivityOptionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateActivityOptionsResponse - */ - public updateActivityOptions(request: temporal.api.workflowservice.v1.IUpdateActivityOptionsRequest, callback: temporal.api.workflowservice.v1.WorkflowService.UpdateActivityOptionsCallback): void; - - /** - * UpdateActivityOptions is called by the client to update the options of an activity by its ID or type. - * If there are multiple pending activities of the provided type - all of them will be updated. - * This API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and - * structured to work well for standalone activities. - * @param request UpdateActivityOptionsRequest message or plain object - * @returns Promise - */ - public updateActivityOptions(request: temporal.api.workflowservice.v1.IUpdateActivityOptionsRequest): Promise; - - /** - * UpdateWorkflowExecutionOptions partially updates the WorkflowExecutionOptions of an existing workflow execution. - * @param request UpdateWorkflowExecutionOptionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateWorkflowExecutionOptionsResponse - */ - public updateWorkflowExecutionOptions(request: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionOptionsRequest, callback: temporal.api.workflowservice.v1.WorkflowService.UpdateWorkflowExecutionOptionsCallback): void; - - /** - * UpdateWorkflowExecutionOptions partially updates the WorkflowExecutionOptions of an existing workflow execution. - * @param request UpdateWorkflowExecutionOptionsRequest message or plain object - * @returns Promise - */ - public updateWorkflowExecutionOptions(request: temporal.api.workflowservice.v1.IUpdateWorkflowExecutionOptionsRequest): Promise; - - /** - * PauseActivity pauses the execution of an activity specified by its ID or type. - * If there are multiple pending activities of the provided type - all of them will be paused - * - * Pausing an activity means: - * - If the activity is currently waiting for a retry or is running and subsequently fails, - * it will not be rescheduled until it is unpaused. - * - If the activity is already paused, calling this method will have no effect. - * - If the activity is running and finishes successfully, the activity will be completed. - * - If the activity is running and finishes with failure: - * * if there is no retry left - the activity will be completed. - * * if there are more retries left - the activity will be paused. - * For long-running activities: - * - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. - * - The activity should respond to the cancellation accordingly. - * - * Returns a `NotFound` error if there is no pending activity with the provided ID or type - * This API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and - * structured to work well for standalone activities. - * @param request PauseActivityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PauseActivityResponse - */ - public pauseActivity(request: temporal.api.workflowservice.v1.IPauseActivityRequest, callback: temporal.api.workflowservice.v1.WorkflowService.PauseActivityCallback): void; - - /** - * PauseActivity pauses the execution of an activity specified by its ID or type. - * If there are multiple pending activities of the provided type - all of them will be paused - * - * Pausing an activity means: - * - If the activity is currently waiting for a retry or is running and subsequently fails, - * it will not be rescheduled until it is unpaused. - * - If the activity is already paused, calling this method will have no effect. - * - If the activity is running and finishes successfully, the activity will be completed. - * - If the activity is running and finishes with failure: - * * if there is no retry left - the activity will be completed. - * * if there are more retries left - the activity will be paused. - * For long-running activities: - * - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. - * - The activity should respond to the cancellation accordingly. - * - * Returns a `NotFound` error if there is no pending activity with the provided ID or type - * This API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and - * structured to work well for standalone activities. - * @param request PauseActivityRequest message or plain object - * @returns Promise - */ - public pauseActivity(request: temporal.api.workflowservice.v1.IPauseActivityRequest): Promise; - - /** - * UnpauseActivity unpauses the execution of an activity specified by its ID or type. - * If there are multiple pending activities of the provided type - all of them will be unpaused. - * - * If activity is not paused, this call will have no effect. - * If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). - * Once the activity is unpaused, all timeout timers will be regenerated. - * - * Flags: - * 'jitter': the activity will be scheduled at a random time within the jitter duration. - * 'reset_attempts': the number of attempts will be reset. - * 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. - * - * Returns a `NotFound` error if there is no pending activity with the provided ID or type - * This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and - * structured to work well for standalone activities. - * @param request UnpauseActivityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UnpauseActivityResponse - */ - public unpauseActivity(request: temporal.api.workflowservice.v1.IUnpauseActivityRequest, callback: temporal.api.workflowservice.v1.WorkflowService.UnpauseActivityCallback): void; - - /** - * UnpauseActivity unpauses the execution of an activity specified by its ID or type. - * If there are multiple pending activities of the provided type - all of them will be unpaused. - * - * If activity is not paused, this call will have no effect. - * If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). - * Once the activity is unpaused, all timeout timers will be regenerated. - * - * Flags: - * 'jitter': the activity will be scheduled at a random time within the jitter duration. - * 'reset_attempts': the number of attempts will be reset. - * 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. - * - * Returns a `NotFound` error if there is no pending activity with the provided ID or type - * This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and - * structured to work well for standalone activities. - * @param request UnpauseActivityRequest message or plain object - * @returns Promise - */ - public unpauseActivity(request: temporal.api.workflowservice.v1.IUnpauseActivityRequest): Promise; - - /** - * ResetActivity resets the execution of an activity specified by its ID or type. - * If there are multiple pending activities of the provided type - all of them will be reset. - * - * Resetting an activity means: - * * number of attempts will be reset to 0. - * * activity timeouts will be reset. - * * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: - * it will be scheduled immediately (* see 'jitter' flag), - * - * Flags: - * - * 'jitter': the activity will be scheduled at a random time within the jitter duration. - * If the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided. - * 'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset. - * 'keep_paused': if the activity is paused, it will remain paused. - * - * Returns a `NotFound` error if there is no pending activity with the provided ID or type. - * This API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and - * structured to work well for standalone activities. - * @param request ResetActivityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ResetActivityResponse - */ - public resetActivity(request: temporal.api.workflowservice.v1.IResetActivityRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ResetActivityCallback): void; - - /** - * ResetActivity resets the execution of an activity specified by its ID or type. - * If there are multiple pending activities of the provided type - all of them will be reset. - * - * Resetting an activity means: - * * number of attempts will be reset to 0. - * * activity timeouts will be reset. - * * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: - * it will be scheduled immediately (* see 'jitter' flag), - * - * Flags: - * - * 'jitter': the activity will be scheduled at a random time within the jitter duration. - * If the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided. - * 'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset. - * 'keep_paused': if the activity is paused, it will remain paused. - * - * Returns a `NotFound` error if there is no pending activity with the provided ID or type. - * This API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and - * structured to work well for standalone activities. - * @param request ResetActivityRequest message or plain object - * @returns Promise - */ - public resetActivity(request: temporal.api.workflowservice.v1.IResetActivityRequest): Promise; - - /** - * Create a new workflow rule. The rules are used to control the workflow execution. - * The rule will be applied to all running and new workflows in the namespace. - * If the rule with such ID already exist this call will fail - * Note: the rules are part of namespace configuration and will be stored in the namespace config. - * Namespace config is eventually consistent. - * @param request CreateWorkflowRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CreateWorkflowRuleResponse - */ - public createWorkflowRule(request: temporal.api.workflowservice.v1.ICreateWorkflowRuleRequest, callback: temporal.api.workflowservice.v1.WorkflowService.CreateWorkflowRuleCallback): void; - - /** - * Create a new workflow rule. The rules are used to control the workflow execution. - * The rule will be applied to all running and new workflows in the namespace. - * If the rule with such ID already exist this call will fail - * Note: the rules are part of namespace configuration and will be stored in the namespace config. - * Namespace config is eventually consistent. - * @param request CreateWorkflowRuleRequest message or plain object - * @returns Promise - */ - public createWorkflowRule(request: temporal.api.workflowservice.v1.ICreateWorkflowRuleRequest): Promise; - - /** - * DescribeWorkflowRule return the rule specification for existing rule id. - * If there is no rule with such id - NOT FOUND error will be returned. - * @param request DescribeWorkflowRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DescribeWorkflowRuleResponse - */ - public describeWorkflowRule(request: temporal.api.workflowservice.v1.IDescribeWorkflowRuleRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DescribeWorkflowRuleCallback): void; - - /** - * DescribeWorkflowRule return the rule specification for existing rule id. - * If there is no rule with such id - NOT FOUND error will be returned. - * @param request DescribeWorkflowRuleRequest message or plain object - * @returns Promise - */ - public describeWorkflowRule(request: temporal.api.workflowservice.v1.IDescribeWorkflowRuleRequest): Promise; - - /** - * Delete rule by rule id - * @param request DeleteWorkflowRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteWorkflowRuleResponse - */ - public deleteWorkflowRule(request: temporal.api.workflowservice.v1.IDeleteWorkflowRuleRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DeleteWorkflowRuleCallback): void; - - /** - * Delete rule by rule id - * @param request DeleteWorkflowRuleRequest message or plain object - * @returns Promise - */ - public deleteWorkflowRule(request: temporal.api.workflowservice.v1.IDeleteWorkflowRuleRequest): Promise; - - /** - * Return all namespace workflow rules - * @param request ListWorkflowRulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListWorkflowRulesResponse - */ - public listWorkflowRules(request: temporal.api.workflowservice.v1.IListWorkflowRulesRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ListWorkflowRulesCallback): void; - - /** - * Return all namespace workflow rules - * @param request ListWorkflowRulesRequest message or plain object - * @returns Promise - */ - public listWorkflowRules(request: temporal.api.workflowservice.v1.IListWorkflowRulesRequest): Promise; - - /** - * TriggerWorkflowRule allows to: - * * trigger existing rule for a specific workflow execution; - * * trigger rule for a specific workflow execution without creating a rule; - * This is useful for one-off operations. - * @param request TriggerWorkflowRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TriggerWorkflowRuleResponse - */ - public triggerWorkflowRule(request: temporal.api.workflowservice.v1.ITriggerWorkflowRuleRequest, callback: temporal.api.workflowservice.v1.WorkflowService.TriggerWorkflowRuleCallback): void; - - /** - * TriggerWorkflowRule allows to: - * * trigger existing rule for a specific workflow execution; - * * trigger rule for a specific workflow execution without creating a rule; - * This is useful for one-off operations. - * @param request TriggerWorkflowRuleRequest message or plain object - * @returns Promise - */ - public triggerWorkflowRule(request: temporal.api.workflowservice.v1.ITriggerWorkflowRuleRequest): Promise; - - /** - * WorkerHeartbeat receive heartbeat request from the worker. - * @param request RecordWorkerHeartbeatRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RecordWorkerHeartbeatResponse - */ - public recordWorkerHeartbeat(request: temporal.api.workflowservice.v1.IRecordWorkerHeartbeatRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RecordWorkerHeartbeatCallback): void; - - /** - * WorkerHeartbeat receive heartbeat request from the worker. - * @param request RecordWorkerHeartbeatRequest message or plain object - * @returns Promise - */ - public recordWorkerHeartbeat(request: temporal.api.workflowservice.v1.IRecordWorkerHeartbeatRequest): Promise; - - /** - * ListWorkers is a visibility API to list worker status information in a specific namespace. - * @param request ListWorkersRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListWorkersResponse - */ - public listWorkers(request: temporal.api.workflowservice.v1.IListWorkersRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ListWorkersCallback): void; - - /** - * ListWorkers is a visibility API to list worker status information in a specific namespace. - * @param request ListWorkersRequest message or plain object - * @returns Promise - */ - public listWorkers(request: temporal.api.workflowservice.v1.IListWorkersRequest): Promise; - - /** - * Updates task queue configuration. - * For the overall queue rate limit: the rate limit set by this api overrides the worker-set rate limit, - * which uncouples the rate limit from the worker lifecycle. - * If the overall queue rate limit is unset, the worker-set rate limit takes effect. - * @param request UpdateTaskQueueConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateTaskQueueConfigResponse - */ - public updateTaskQueueConfig(request: temporal.api.workflowservice.v1.IUpdateTaskQueueConfigRequest, callback: temporal.api.workflowservice.v1.WorkflowService.UpdateTaskQueueConfigCallback): void; - - /** - * Updates task queue configuration. - * For the overall queue rate limit: the rate limit set by this api overrides the worker-set rate limit, - * which uncouples the rate limit from the worker lifecycle. - * If the overall queue rate limit is unset, the worker-set rate limit takes effect. - * @param request UpdateTaskQueueConfigRequest message or plain object - * @returns Promise - */ - public updateTaskQueueConfig(request: temporal.api.workflowservice.v1.IUpdateTaskQueueConfigRequest): Promise; - - /** - * FetchWorkerConfig returns the worker configuration for a specific worker. - * @param request FetchWorkerConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FetchWorkerConfigResponse - */ - public fetchWorkerConfig(request: temporal.api.workflowservice.v1.IFetchWorkerConfigRequest, callback: temporal.api.workflowservice.v1.WorkflowService.FetchWorkerConfigCallback): void; - - /** - * FetchWorkerConfig returns the worker configuration for a specific worker. - * @param request FetchWorkerConfigRequest message or plain object - * @returns Promise - */ - public fetchWorkerConfig(request: temporal.api.workflowservice.v1.IFetchWorkerConfigRequest): Promise; - - /** - * UpdateWorkerConfig updates the worker configuration of one or more workers. - * Can be used to partially update the worker configuration. - * Can be used to update the configuration of multiple workers. - * @param request UpdateWorkerConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateWorkerConfigResponse - */ - public updateWorkerConfig(request: temporal.api.workflowservice.v1.IUpdateWorkerConfigRequest, callback: temporal.api.workflowservice.v1.WorkflowService.UpdateWorkerConfigCallback): void; - - /** - * UpdateWorkerConfig updates the worker configuration of one or more workers. - * Can be used to partially update the worker configuration. - * Can be used to update the configuration of multiple workers. - * @param request UpdateWorkerConfigRequest message or plain object - * @returns Promise - */ - public updateWorkerConfig(request: temporal.api.workflowservice.v1.IUpdateWorkerConfigRequest): Promise; - - /** - * DescribeWorker returns information about the specified worker. - * @param request DescribeWorkerRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DescribeWorkerResponse - */ - public describeWorker(request: temporal.api.workflowservice.v1.IDescribeWorkerRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DescribeWorkerCallback): void; - - /** - * DescribeWorker returns information about the specified worker. - * @param request DescribeWorkerRequest message or plain object - * @returns Promise - */ - public describeWorker(request: temporal.api.workflowservice.v1.IDescribeWorkerRequest): Promise; - - /** - * Note: This is an experimental API and the behavior may change in a future release. - * PauseWorkflowExecution pauses the workflow execution specified in the request. Pausing a workflow execution results in - * - The workflow execution status changes to `PAUSED` and a new WORKFLOW_EXECUTION_PAUSED event is added to the history - * - No new workflow tasks or activity tasks are dispatched. - * - Any workflow task currently executing on the worker will be allowed to complete. - * - Any activity task currently executing will be paused. - * - All server-side events will continue to be processed by the server. - * - Queries & Updates on a paused workflow will be rejected. - * @param request PauseWorkflowExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PauseWorkflowExecutionResponse - */ - public pauseWorkflowExecution(request: temporal.api.workflowservice.v1.IPauseWorkflowExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.PauseWorkflowExecutionCallback): void; - - /** - * Note: This is an experimental API and the behavior may change in a future release. - * PauseWorkflowExecution pauses the workflow execution specified in the request. Pausing a workflow execution results in - * - The workflow execution status changes to `PAUSED` and a new WORKFLOW_EXECUTION_PAUSED event is added to the history - * - No new workflow tasks or activity tasks are dispatched. - * - Any workflow task currently executing on the worker will be allowed to complete. - * - Any activity task currently executing will be paused. - * - All server-side events will continue to be processed by the server. - * - Queries & Updates on a paused workflow will be rejected. - * @param request PauseWorkflowExecutionRequest message or plain object - * @returns Promise - */ - public pauseWorkflowExecution(request: temporal.api.workflowservice.v1.IPauseWorkflowExecutionRequest): Promise; - - /** - * Note: This is an experimental API and the behavior may change in a future release. - * UnpauseWorkflowExecution unpauses a previously paused workflow execution specified in the request. - * Unpausing a workflow execution results in - * - The workflow execution status changes to `RUNNING` and a new WORKFLOW_EXECUTION_UNPAUSED event is added to the history - * - Workflow tasks and activity tasks are resumed. - * @param request UnpauseWorkflowExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UnpauseWorkflowExecutionResponse - */ - public unpauseWorkflowExecution(request: temporal.api.workflowservice.v1.IUnpauseWorkflowExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.UnpauseWorkflowExecutionCallback): void; - - /** - * Note: This is an experimental API and the behavior may change in a future release. - * UnpauseWorkflowExecution unpauses a previously paused workflow execution specified in the request. - * Unpausing a workflow execution results in - * - The workflow execution status changes to `RUNNING` and a new WORKFLOW_EXECUTION_UNPAUSED event is added to the history - * - Workflow tasks and activity tasks are resumed. - * @param request UnpauseWorkflowExecutionRequest message or plain object - * @returns Promise - */ - public unpauseWorkflowExecution(request: temporal.api.workflowservice.v1.IUnpauseWorkflowExecutionRequest): Promise; - - /** - * StartActivityExecution starts a new activity execution. - * - * Returns an `ActivityExecutionAlreadyStarted` error if an instance already exists with same activity ID in this namespace - * unless permitted by the specified ID conflict policy. - * @param request StartActivityExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StartActivityExecutionResponse - */ - public startActivityExecution(request: temporal.api.workflowservice.v1.IStartActivityExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.StartActivityExecutionCallback): void; - - /** - * StartActivityExecution starts a new activity execution. - * - * Returns an `ActivityExecutionAlreadyStarted` error if an instance already exists with same activity ID in this namespace - * unless permitted by the specified ID conflict policy. - * @param request StartActivityExecutionRequest message or plain object - * @returns Promise - */ - public startActivityExecution(request: temporal.api.workflowservice.v1.IStartActivityExecutionRequest): Promise; - - /** - * DescribeActivityExecution returns information about an activity execution. - * It can be used to: - * - Get current activity info without waiting - * - Long-poll for next state change and return new activity info - * Response can optionally include activity input or outcome (if the activity has completed). - * @param request DescribeActivityExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DescribeActivityExecutionResponse - */ - public describeActivityExecution(request: temporal.api.workflowservice.v1.IDescribeActivityExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DescribeActivityExecutionCallback): void; - - /** - * DescribeActivityExecution returns information about an activity execution. - * It can be used to: - * - Get current activity info without waiting - * - Long-poll for next state change and return new activity info - * Response can optionally include activity input or outcome (if the activity has completed). - * @param request DescribeActivityExecutionRequest message or plain object - * @returns Promise - */ - public describeActivityExecution(request: temporal.api.workflowservice.v1.IDescribeActivityExecutionRequest): Promise; - - /** - * PollActivityExecution long-polls for an activity execution to complete and returns the - * outcome (result or failure). - * @param request PollActivityExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PollActivityExecutionResponse - */ - public pollActivityExecution(request: temporal.api.workflowservice.v1.IPollActivityExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.PollActivityExecutionCallback): void; - - /** - * PollActivityExecution long-polls for an activity execution to complete and returns the - * outcome (result or failure). - * @param request PollActivityExecutionRequest message or plain object - * @returns Promise - */ - public pollActivityExecution(request: temporal.api.workflowservice.v1.IPollActivityExecutionRequest): Promise; - - /** - * ListActivityExecutions is a visibility API to list activity executions in a specific namespace. - * @param request ListActivityExecutionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListActivityExecutionsResponse - */ - public listActivityExecutions(request: temporal.api.workflowservice.v1.IListActivityExecutionsRequest, callback: temporal.api.workflowservice.v1.WorkflowService.ListActivityExecutionsCallback): void; - - /** - * ListActivityExecutions is a visibility API to list activity executions in a specific namespace. - * @param request ListActivityExecutionsRequest message or plain object - * @returns Promise - */ - public listActivityExecutions(request: temporal.api.workflowservice.v1.IListActivityExecutionsRequest): Promise; - - /** - * CountActivityExecutions is a visibility API to count activity executions in a specific namespace. - * @param request CountActivityExecutionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CountActivityExecutionsResponse - */ - public countActivityExecutions(request: temporal.api.workflowservice.v1.ICountActivityExecutionsRequest, callback: temporal.api.workflowservice.v1.WorkflowService.CountActivityExecutionsCallback): void; - - /** - * CountActivityExecutions is a visibility API to count activity executions in a specific namespace. - * @param request CountActivityExecutionsRequest message or plain object - * @returns Promise - */ - public countActivityExecutions(request: temporal.api.workflowservice.v1.ICountActivityExecutionsRequest): Promise; - - /** - * RequestCancelActivityExecution requests cancellation of an activity execution. - * - * Cancellation is cooperative: this call records the request, but the activity must detect and - * acknowledge it for the activity to reach CANCELED status. The cancellation signal is - * delivered via `cancel_requested` in the heartbeat response; SDKs surface this via - * language-idiomatic mechanisms (context cancellation, exceptions, abort signals). - * @param request RequestCancelActivityExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RequestCancelActivityExecutionResponse - */ - public requestCancelActivityExecution(request: temporal.api.workflowservice.v1.IRequestCancelActivityExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.RequestCancelActivityExecutionCallback): void; - - /** - * RequestCancelActivityExecution requests cancellation of an activity execution. - * - * Cancellation is cooperative: this call records the request, but the activity must detect and - * acknowledge it for the activity to reach CANCELED status. The cancellation signal is - * delivered via `cancel_requested` in the heartbeat response; SDKs surface this via - * language-idiomatic mechanisms (context cancellation, exceptions, abort signals). - * @param request RequestCancelActivityExecutionRequest message or plain object - * @returns Promise - */ - public requestCancelActivityExecution(request: temporal.api.workflowservice.v1.IRequestCancelActivityExecutionRequest): Promise; - - /** - * TerminateActivityExecution terminates an existing activity execution immediately. - * - * Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a - * running attempt. - * @param request TerminateActivityExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TerminateActivityExecutionResponse - */ - public terminateActivityExecution(request: temporal.api.workflowservice.v1.ITerminateActivityExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.TerminateActivityExecutionCallback): void; - - /** - * TerminateActivityExecution terminates an existing activity execution immediately. - * - * Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a - * running attempt. - * @param request TerminateActivityExecutionRequest message or plain object - * @returns Promise - */ - public terminateActivityExecution(request: temporal.api.workflowservice.v1.ITerminateActivityExecutionRequest): Promise; - - /** - * DeleteActivityExecution asynchronously deletes a specific activity execution (when - * ActivityExecution.run_id is provided) or the latest activity execution (when - * ActivityExecution.run_id is not provided). If the activity Execution is running, it will be - * terminated before deletion. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: Activity deletion not exposed to HTTP, users should use cancel or terminate. --) - * @param request DeleteActivityExecutionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteActivityExecutionResponse - */ - public deleteActivityExecution(request: temporal.api.workflowservice.v1.IDeleteActivityExecutionRequest, callback: temporal.api.workflowservice.v1.WorkflowService.DeleteActivityExecutionCallback): void; - - /** - * DeleteActivityExecution asynchronously deletes a specific activity execution (when - * ActivityExecution.run_id is provided) or the latest activity execution (when - * ActivityExecution.run_id is not provided). If the activity Execution is running, it will be - * terminated before deletion. - * - * (-- api-linter: core::0127::http-annotation=disabled - * aip.dev/not-precedent: Activity deletion not exposed to HTTP, users should use cancel or terminate. --) - * @param request DeleteActivityExecutionRequest message or plain object - * @returns Promise - */ - public deleteActivityExecution(request: temporal.api.workflowservice.v1.IDeleteActivityExecutionRequest): Promise; - } - - namespace WorkflowService { - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#registerNamespace}. - * @param error Error, if any - * @param [response] RegisterNamespaceResponse - */ - type RegisterNamespaceCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RegisterNamespaceResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#describeNamespace}. - * @param error Error, if any - * @param [response] DescribeNamespaceResponse - */ - type DescribeNamespaceCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DescribeNamespaceResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#listNamespaces}. - * @param error Error, if any - * @param [response] ListNamespacesResponse - */ - type ListNamespacesCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ListNamespacesResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#updateNamespace}. - * @param error Error, if any - * @param [response] UpdateNamespaceResponse - */ - type UpdateNamespaceCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.UpdateNamespaceResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#deprecateNamespace}. - * @param error Error, if any - * @param [response] DeprecateNamespaceResponse - */ - type DeprecateNamespaceCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DeprecateNamespaceResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#startWorkflowExecution}. - * @param error Error, if any - * @param [response] StartWorkflowExecutionResponse - */ - type StartWorkflowExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.StartWorkflowExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#executeMultiOperation}. - * @param error Error, if any - * @param [response] ExecuteMultiOperationResponse - */ - type ExecuteMultiOperationCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ExecuteMultiOperationResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#getWorkflowExecutionHistory}. - * @param error Error, if any - * @param [response] GetWorkflowExecutionHistoryResponse - */ - type GetWorkflowExecutionHistoryCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#getWorkflowExecutionHistoryReverse}. - * @param error Error, if any - * @param [response] GetWorkflowExecutionHistoryReverseResponse - */ - type GetWorkflowExecutionHistoryReverseCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#pollWorkflowTaskQueue}. - * @param error Error, if any - * @param [response] PollWorkflowTaskQueueResponse - */ - type PollWorkflowTaskQueueCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#respondWorkflowTaskCompleted}. - * @param error Error, if any - * @param [response] RespondWorkflowTaskCompletedResponse - */ - type RespondWorkflowTaskCompletedCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#respondWorkflowTaskFailed}. - * @param error Error, if any - * @param [response] RespondWorkflowTaskFailedResponse - */ - type RespondWorkflowTaskFailedCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#pollActivityTaskQueue}. - * @param error Error, if any - * @param [response] PollActivityTaskQueueResponse - */ - type PollActivityTaskQueueCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.PollActivityTaskQueueResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#recordActivityTaskHeartbeat}. - * @param error Error, if any - * @param [response] RecordActivityTaskHeartbeatResponse - */ - type RecordActivityTaskHeartbeatCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#recordActivityTaskHeartbeatById}. - * @param error Error, if any - * @param [response] RecordActivityTaskHeartbeatByIdResponse - */ - type RecordActivityTaskHeartbeatByIdCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#respondActivityTaskCompleted}. - * @param error Error, if any - * @param [response] RespondActivityTaskCompletedResponse - */ - type RespondActivityTaskCompletedCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#respondActivityTaskCompletedById}. - * @param error Error, if any - * @param [response] RespondActivityTaskCompletedByIdResponse - */ - type RespondActivityTaskCompletedByIdCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#respondActivityTaskFailed}. - * @param error Error, if any - * @param [response] RespondActivityTaskFailedResponse - */ - type RespondActivityTaskFailedCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#respondActivityTaskFailedById}. - * @param error Error, if any - * @param [response] RespondActivityTaskFailedByIdResponse - */ - type RespondActivityTaskFailedByIdCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#respondActivityTaskCanceled}. - * @param error Error, if any - * @param [response] RespondActivityTaskCanceledResponse - */ - type RespondActivityTaskCanceledCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RespondActivityTaskCanceledResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#respondActivityTaskCanceledById}. - * @param error Error, if any - * @param [response] RespondActivityTaskCanceledByIdResponse - */ - type RespondActivityTaskCanceledByIdCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#requestCancelWorkflowExecution}. - * @param error Error, if any - * @param [response] RequestCancelWorkflowExecutionResponse - */ - type RequestCancelWorkflowExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#signalWorkflowExecution}. - * @param error Error, if any - * @param [response] SignalWorkflowExecutionResponse - */ - type SignalWorkflowExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.SignalWorkflowExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#signalWithStartWorkflowExecution}. - * @param error Error, if any - * @param [response] SignalWithStartWorkflowExecutionResponse - */ - type SignalWithStartWorkflowExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#resetWorkflowExecution}. - * @param error Error, if any - * @param [response] ResetWorkflowExecutionResponse - */ - type ResetWorkflowExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#terminateWorkflowExecution}. - * @param error Error, if any - * @param [response] TerminateWorkflowExecutionResponse - */ - type TerminateWorkflowExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#deleteWorkflowExecution}. - * @param error Error, if any - * @param [response] DeleteWorkflowExecutionResponse - */ - type DeleteWorkflowExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#listOpenWorkflowExecutions}. - * @param error Error, if any - * @param [response] ListOpenWorkflowExecutionsResponse - */ - type ListOpenWorkflowExecutionsCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#listClosedWorkflowExecutions}. - * @param error Error, if any - * @param [response] ListClosedWorkflowExecutionsResponse - */ - type ListClosedWorkflowExecutionsCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#listWorkflowExecutions}. - * @param error Error, if any - * @param [response] ListWorkflowExecutionsResponse - */ - type ListWorkflowExecutionsCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#listArchivedWorkflowExecutions}. - * @param error Error, if any - * @param [response] ListArchivedWorkflowExecutionsResponse - */ - type ListArchivedWorkflowExecutionsCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#scanWorkflowExecutions}. - * @param error Error, if any - * @param [response] ScanWorkflowExecutionsResponse - */ - type ScanWorkflowExecutionsCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#countWorkflowExecutions}. - * @param error Error, if any - * @param [response] CountWorkflowExecutionsResponse - */ - type CountWorkflowExecutionsCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#getSearchAttributes}. - * @param error Error, if any - * @param [response] GetSearchAttributesResponse - */ - type GetSearchAttributesCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.GetSearchAttributesResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#respondQueryTaskCompleted}. - * @param error Error, if any - * @param [response] RespondQueryTaskCompletedResponse - */ - type RespondQueryTaskCompletedCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#resetStickyTaskQueue}. - * @param error Error, if any - * @param [response] ResetStickyTaskQueueResponse - */ - type ResetStickyTaskQueueCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#shutdownWorker}. - * @param error Error, if any - * @param [response] ShutdownWorkerResponse - */ - type ShutdownWorkerCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ShutdownWorkerResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#queryWorkflow}. - * @param error Error, if any - * @param [response] QueryWorkflowResponse - */ - type QueryWorkflowCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.QueryWorkflowResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#describeWorkflowExecution}. - * @param error Error, if any - * @param [response] DescribeWorkflowExecutionResponse - */ - type DescribeWorkflowExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#describeTaskQueue}. - * @param error Error, if any - * @param [response] DescribeTaskQueueResponse - */ - type DescribeTaskQueueCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DescribeTaskQueueResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#getClusterInfo}. - * @param error Error, if any - * @param [response] GetClusterInfoResponse - */ - type GetClusterInfoCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.GetClusterInfoResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#getSystemInfo}. - * @param error Error, if any - * @param [response] GetSystemInfoResponse - */ - type GetSystemInfoCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.GetSystemInfoResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#listTaskQueuePartitions}. - * @param error Error, if any - * @param [response] ListTaskQueuePartitionsResponse - */ - type ListTaskQueuePartitionsCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ListTaskQueuePartitionsResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#createSchedule}. - * @param error Error, if any - * @param [response] CreateScheduleResponse - */ - type CreateScheduleCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.CreateScheduleResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#describeSchedule}. - * @param error Error, if any - * @param [response] DescribeScheduleResponse - */ - type DescribeScheduleCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DescribeScheduleResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#updateSchedule}. - * @param error Error, if any - * @param [response] UpdateScheduleResponse - */ - type UpdateScheduleCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.UpdateScheduleResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#patchSchedule}. - * @param error Error, if any - * @param [response] PatchScheduleResponse - */ - type PatchScheduleCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.PatchScheduleResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#listScheduleMatchingTimes}. - * @param error Error, if any - * @param [response] ListScheduleMatchingTimesResponse - */ - type ListScheduleMatchingTimesCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ListScheduleMatchingTimesResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#deleteSchedule}. - * @param error Error, if any - * @param [response] DeleteScheduleResponse - */ - type DeleteScheduleCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DeleteScheduleResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#listSchedules}. - * @param error Error, if any - * @param [response] ListSchedulesResponse - */ - type ListSchedulesCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ListSchedulesResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#countSchedules}. - * @param error Error, if any - * @param [response] CountSchedulesResponse - */ - type CountSchedulesCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.CountSchedulesResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#updateWorkerBuildIdCompatibility}. - * @param error Error, if any - * @param [response] UpdateWorkerBuildIdCompatibilityResponse - */ - type UpdateWorkerBuildIdCompatibilityCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#getWorkerBuildIdCompatibility}. - * @param error Error, if any - * @param [response] GetWorkerBuildIdCompatibilityResponse - */ - type GetWorkerBuildIdCompatibilityCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#updateWorkerVersioningRules}. - * @param error Error, if any - * @param [response] UpdateWorkerVersioningRulesResponse - */ - type UpdateWorkerVersioningRulesCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#getWorkerVersioningRules}. - * @param error Error, if any - * @param [response] GetWorkerVersioningRulesResponse - */ - type GetWorkerVersioningRulesCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.GetWorkerVersioningRulesResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#getWorkerTaskReachability}. - * @param error Error, if any - * @param [response] GetWorkerTaskReachabilityResponse - */ - type GetWorkerTaskReachabilityCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#describeDeployment}. - * @param error Error, if any - * @param [response] DescribeDeploymentResponse - */ - type DescribeDeploymentCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DescribeDeploymentResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#describeWorkerDeploymentVersion}. - * @param error Error, if any - * @param [response] DescribeWorkerDeploymentVersionResponse - */ - type DescribeWorkerDeploymentVersionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#listDeployments}. - * @param error Error, if any - * @param [response] ListDeploymentsResponse - */ - type ListDeploymentsCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ListDeploymentsResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#getDeploymentReachability}. - * @param error Error, if any - * @param [response] GetDeploymentReachabilityResponse - */ - type GetDeploymentReachabilityCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.GetDeploymentReachabilityResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#getCurrentDeployment}. - * @param error Error, if any - * @param [response] GetCurrentDeploymentResponse - */ - type GetCurrentDeploymentCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.GetCurrentDeploymentResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#setCurrentDeployment}. - * @param error Error, if any - * @param [response] SetCurrentDeploymentResponse - */ - type SetCurrentDeploymentCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.SetCurrentDeploymentResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#setWorkerDeploymentCurrentVersion}. - * @param error Error, if any - * @param [response] SetWorkerDeploymentCurrentVersionResponse - */ - type SetWorkerDeploymentCurrentVersionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#describeWorkerDeployment}. - * @param error Error, if any - * @param [response] DescribeWorkerDeploymentResponse - */ - type DescribeWorkerDeploymentCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DescribeWorkerDeploymentResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#deleteWorkerDeployment}. - * @param error Error, if any - * @param [response] DeleteWorkerDeploymentResponse - */ - type DeleteWorkerDeploymentCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DeleteWorkerDeploymentResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#deleteWorkerDeploymentVersion}. - * @param error Error, if any - * @param [response] DeleteWorkerDeploymentVersionResponse - */ - type DeleteWorkerDeploymentVersionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#setWorkerDeploymentRampingVersion}. - * @param error Error, if any - * @param [response] SetWorkerDeploymentRampingVersionResponse - */ - type SetWorkerDeploymentRampingVersionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#listWorkerDeployments}. - * @param error Error, if any - * @param [response] ListWorkerDeploymentsResponse - */ - type ListWorkerDeploymentsCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#updateWorkerDeploymentVersionMetadata}. - * @param error Error, if any - * @param [response] UpdateWorkerDeploymentVersionMetadataResponse - */ - type UpdateWorkerDeploymentVersionMetadataCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#setWorkerDeploymentManager}. - * @param error Error, if any - * @param [response] SetWorkerDeploymentManagerResponse - */ - type SetWorkerDeploymentManagerCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.SetWorkerDeploymentManagerResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#updateWorkflowExecution}. - * @param error Error, if any - * @param [response] UpdateWorkflowExecutionResponse - */ - type UpdateWorkflowExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#pollWorkflowExecutionUpdate}. - * @param error Error, if any - * @param [response] PollWorkflowExecutionUpdateResponse - */ - type PollWorkflowExecutionUpdateCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#startBatchOperation}. - * @param error Error, if any - * @param [response] StartBatchOperationResponse - */ - type StartBatchOperationCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.StartBatchOperationResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#stopBatchOperation}. - * @param error Error, if any - * @param [response] StopBatchOperationResponse - */ - type StopBatchOperationCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.StopBatchOperationResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#describeBatchOperation}. - * @param error Error, if any - * @param [response] DescribeBatchOperationResponse - */ - type DescribeBatchOperationCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DescribeBatchOperationResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#listBatchOperations}. - * @param error Error, if any - * @param [response] ListBatchOperationsResponse - */ - type ListBatchOperationsCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ListBatchOperationsResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#pollNexusTaskQueue}. - * @param error Error, if any - * @param [response] PollNexusTaskQueueResponse - */ - type PollNexusTaskQueueCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.PollNexusTaskQueueResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#respondNexusTaskCompleted}. - * @param error Error, if any - * @param [response] RespondNexusTaskCompletedResponse - */ - type RespondNexusTaskCompletedCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RespondNexusTaskCompletedResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#respondNexusTaskFailed}. - * @param error Error, if any - * @param [response] RespondNexusTaskFailedResponse - */ - type RespondNexusTaskFailedCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RespondNexusTaskFailedResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#updateActivityOptions}. - * @param error Error, if any - * @param [response] UpdateActivityOptionsResponse - */ - type UpdateActivityOptionsCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.UpdateActivityOptionsResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#updateWorkflowExecutionOptions}. - * @param error Error, if any - * @param [response] UpdateWorkflowExecutionOptionsResponse - */ - type UpdateWorkflowExecutionOptionsCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#pauseActivity}. - * @param error Error, if any - * @param [response] PauseActivityResponse - */ - type PauseActivityCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.PauseActivityResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#unpauseActivity}. - * @param error Error, if any - * @param [response] UnpauseActivityResponse - */ - type UnpauseActivityCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.UnpauseActivityResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#resetActivity}. - * @param error Error, if any - * @param [response] ResetActivityResponse - */ - type ResetActivityCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ResetActivityResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#createWorkflowRule}. - * @param error Error, if any - * @param [response] CreateWorkflowRuleResponse - */ - type CreateWorkflowRuleCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.CreateWorkflowRuleResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#describeWorkflowRule}. - * @param error Error, if any - * @param [response] DescribeWorkflowRuleResponse - */ - type DescribeWorkflowRuleCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DescribeWorkflowRuleResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#deleteWorkflowRule}. - * @param error Error, if any - * @param [response] DeleteWorkflowRuleResponse - */ - type DeleteWorkflowRuleCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DeleteWorkflowRuleResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#listWorkflowRules}. - * @param error Error, if any - * @param [response] ListWorkflowRulesResponse - */ - type ListWorkflowRulesCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ListWorkflowRulesResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#triggerWorkflowRule}. - * @param error Error, if any - * @param [response] TriggerWorkflowRuleResponse - */ - type TriggerWorkflowRuleCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.TriggerWorkflowRuleResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#recordWorkerHeartbeat}. - * @param error Error, if any - * @param [response] RecordWorkerHeartbeatResponse - */ - type RecordWorkerHeartbeatCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RecordWorkerHeartbeatResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#listWorkers}. - * @param error Error, if any - * @param [response] ListWorkersResponse - */ - type ListWorkersCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ListWorkersResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#updateTaskQueueConfig}. - * @param error Error, if any - * @param [response] UpdateTaskQueueConfigResponse - */ - type UpdateTaskQueueConfigCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.UpdateTaskQueueConfigResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#fetchWorkerConfig}. - * @param error Error, if any - * @param [response] FetchWorkerConfigResponse - */ - type FetchWorkerConfigCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.FetchWorkerConfigResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#updateWorkerConfig}. - * @param error Error, if any - * @param [response] UpdateWorkerConfigResponse - */ - type UpdateWorkerConfigCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.UpdateWorkerConfigResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#describeWorker}. - * @param error Error, if any - * @param [response] DescribeWorkerResponse - */ - type DescribeWorkerCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DescribeWorkerResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#pauseWorkflowExecution}. - * @param error Error, if any - * @param [response] PauseWorkflowExecutionResponse - */ - type PauseWorkflowExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.PauseWorkflowExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#unpauseWorkflowExecution}. - * @param error Error, if any - * @param [response] UnpauseWorkflowExecutionResponse - */ - type UnpauseWorkflowExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.UnpauseWorkflowExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#startActivityExecution}. - * @param error Error, if any - * @param [response] StartActivityExecutionResponse - */ - type StartActivityExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.StartActivityExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#describeActivityExecution}. - * @param error Error, if any - * @param [response] DescribeActivityExecutionResponse - */ - type DescribeActivityExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DescribeActivityExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#pollActivityExecution}. - * @param error Error, if any - * @param [response] PollActivityExecutionResponse - */ - type PollActivityExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.PollActivityExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#listActivityExecutions}. - * @param error Error, if any - * @param [response] ListActivityExecutionsResponse - */ - type ListActivityExecutionsCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.ListActivityExecutionsResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#countActivityExecutions}. - * @param error Error, if any - * @param [response] CountActivityExecutionsResponse - */ - type CountActivityExecutionsCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.CountActivityExecutionsResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#requestCancelActivityExecution}. - * @param error Error, if any - * @param [response] RequestCancelActivityExecutionResponse - */ - type RequestCancelActivityExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.RequestCancelActivityExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#terminateActivityExecution}. - * @param error Error, if any - * @param [response] TerminateActivityExecutionResponse - */ - type TerminateActivityExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.TerminateActivityExecutionResponse) => void; - - /** - * Callback as used by {@link temporal.api.workflowservice.v1.WorkflowService#deleteActivityExecution}. - * @param error Error, if any - * @param [response] DeleteActivityExecutionResponse - */ - type DeleteActivityExecutionCallback = (error: (Error|null), response?: temporal.api.workflowservice.v1.DeleteActivityExecutionResponse) => void; - } - } - } - - /** Namespace activity. */ - namespace activity { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of an ActivityExecutionOutcome. */ - interface IActivityExecutionOutcome { - - /** The result if the activity completed successfully. */ - result?: (temporal.api.common.v1.IPayloads|null); - - /** The failure if the activity completed unsuccessfully. */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** The outcome of a completed activity execution: either a successful result or a failure. */ - class ActivityExecutionOutcome implements IActivityExecutionOutcome { - - /** - * Constructs a new ActivityExecutionOutcome. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.activity.v1.IActivityExecutionOutcome); - - /** The result if the activity completed successfully. */ - public result?: (temporal.api.common.v1.IPayloads|null); - - /** The failure if the activity completed unsuccessfully. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** ActivityExecutionOutcome value. */ - public value?: ("result"|"failure"); - - /** - * Creates a new ActivityExecutionOutcome instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityExecutionOutcome instance - */ - public static create(properties?: temporal.api.activity.v1.IActivityExecutionOutcome): temporal.api.activity.v1.ActivityExecutionOutcome; - - /** - * Encodes the specified ActivityExecutionOutcome message. Does not implicitly {@link temporal.api.activity.v1.ActivityExecutionOutcome.verify|verify} messages. - * @param message ActivityExecutionOutcome message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.activity.v1.IActivityExecutionOutcome, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityExecutionOutcome message, length delimited. Does not implicitly {@link temporal.api.activity.v1.ActivityExecutionOutcome.verify|verify} messages. - * @param message ActivityExecutionOutcome message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.activity.v1.IActivityExecutionOutcome, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityExecutionOutcome message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityExecutionOutcome - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.activity.v1.ActivityExecutionOutcome; - - /** - * Decodes an ActivityExecutionOutcome message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityExecutionOutcome - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.activity.v1.ActivityExecutionOutcome; - - /** - * Creates an ActivityExecutionOutcome message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityExecutionOutcome - */ - public static fromObject(object: { [k: string]: any }): temporal.api.activity.v1.ActivityExecutionOutcome; - - /** - * Creates a plain object from an ActivityExecutionOutcome message. Also converts values to other types if specified. - * @param message ActivityExecutionOutcome - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.activity.v1.ActivityExecutionOutcome, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityExecutionOutcome to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityExecutionOutcome - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityOptions. */ - interface IActivityOptions { - - /** ActivityOptions taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** - * Indicates how long the caller is willing to wait for an activity completion. Limits how long - * retries will be attempted. Either this or `start_to_close_timeout` must be specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Limits time an activity task can stay in a task queue before a worker picks it up. This - * timeout is always non retryable, as all a retry would achieve is to put it back into the same - * queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not - * specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Maximum time an activity is allowed to execute after being picked up by a worker. This - * timeout is always retryable. Either this or `schedule_to_close_timeout` must be - * specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Maximum permitted time between successful worker heartbeats. */ - heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** The retry policy for the activity. Will never exceed `schedule_to_close_timeout`. */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** - * Priority metadata. If this message is not present, or any fields are not - * present, they inherit the values from the workflow. - */ - priority?: (temporal.api.common.v1.IPriority|null); - } - - /** Represents an ActivityOptions. */ - class ActivityOptions implements IActivityOptions { - - /** - * Constructs a new ActivityOptions. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.activity.v1.IActivityOptions); - - /** ActivityOptions taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** - * Indicates how long the caller is willing to wait for an activity completion. Limits how long - * retries will be attempted. Either this or `start_to_close_timeout` must be specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Limits time an activity task can stay in a task queue before a worker picks it up. This - * timeout is always non retryable, as all a retry would achieve is to put it back into the same - * queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not - * specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Maximum time an activity is allowed to execute after being picked up by a worker. This - * timeout is always retryable. Either this or `schedule_to_close_timeout` must be - * specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Maximum permitted time between successful worker heartbeats. */ - public heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** The retry policy for the activity. Will never exceed `schedule_to_close_timeout`. */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** - * Priority metadata. If this message is not present, or any fields are not - * present, they inherit the values from the workflow. - */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Creates a new ActivityOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityOptions instance - */ - public static create(properties?: temporal.api.activity.v1.IActivityOptions): temporal.api.activity.v1.ActivityOptions; - - /** - * Encodes the specified ActivityOptions message. Does not implicitly {@link temporal.api.activity.v1.ActivityOptions.verify|verify} messages. - * @param message ActivityOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.activity.v1.IActivityOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityOptions message, length delimited. Does not implicitly {@link temporal.api.activity.v1.ActivityOptions.verify|verify} messages. - * @param message ActivityOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.activity.v1.IActivityOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.activity.v1.ActivityOptions; - - /** - * Decodes an ActivityOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.activity.v1.ActivityOptions; - - /** - * Creates an ActivityOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityOptions - */ - public static fromObject(object: { [k: string]: any }): temporal.api.activity.v1.ActivityOptions; - - /** - * Creates a plain object from an ActivityOptions message. Also converts values to other types if specified. - * @param message ActivityOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.activity.v1.ActivityOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityExecutionInfo. */ - interface IActivityExecutionInfo { - - /** Unique identifier of this activity within its namespace along with run ID (below). */ - activityId?: (string|null); - - /** ActivityExecutionInfo runId */ - runId?: (string|null); - - /** The type of the activity, a string that maps to a registered activity on a worker. */ - activityType?: (temporal.api.common.v1.IActivityType|null); - - /** A general status for this activity, indicates whether it is currently running or in one of the terminal statuses. */ - status?: (temporal.api.enums.v1.ActivityExecutionStatus|null); - - /** More detailed breakdown of ACTIVITY_EXECUTION_STATUS_RUNNING. */ - runState?: (temporal.api.enums.v1.PendingActivityState|null); - - /** ActivityExecutionInfo taskQueue */ - taskQueue?: (string|null); - - /** - * Indicates how long the caller is willing to wait for an activity completion. Limits how long - * retries will be attempted. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Limits time an activity task can stay in a task queue before a worker picks it up. This - * timeout is always non retryable, as all a retry would achieve is to put it back into the same - * queue. Defaults to `schedule_to_close_timeout`. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Maximum time a single activity attempt is allowed to execute after being picked up by a worker. This - * timeout is always retryable. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Maximum permitted time between successful worker heartbeats. */ - heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** The retry policy for the activity. Will never exceed `schedule_to_close_timeout`. */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Details provided in the last recorded activity heartbeat. */ - heartbeatDetails?: (temporal.api.common.v1.IPayloads|null); - - /** Time the last heartbeat was recorded. */ - lastHeartbeatTime?: (google.protobuf.ITimestamp|null); - - /** Time the last attempt was started. */ - lastStartedTime?: (google.protobuf.ITimestamp|null); - - /** The attempt this activity is currently on. Incremented each time a new attempt is scheduled. */ - attempt?: (number|null); - - /** How long this activity has been running for, including all attempts and backoff between attempts. */ - executionDuration?: (google.protobuf.IDuration|null); - - /** Time the activity was originally scheduled via a StartActivityExecution request. */ - scheduleTime?: (google.protobuf.ITimestamp|null); - - /** Scheduled time + schedule to close timeout. */ - expirationTime?: (google.protobuf.ITimestamp|null); - - /** Time when the activity transitioned to a closed state. */ - closeTime?: (google.protobuf.ITimestamp|null); - - /** Failure details from the last failed attempt. */ - lastFailure?: (temporal.api.failure.v1.IFailure|null); - - /** ActivityExecutionInfo lastWorkerIdentity */ - lastWorkerIdentity?: (string|null); - - /** - * Time from the last attempt failure to the next activity retry. - * If the activity is currently running, this represents the next retry interval in case the attempt fails. - * If activity is currently backing off between attempt, this represents the current retry interval. - * If there is no next retry allowed, this field will be null. - * This interval is typically calculated from the specified retry policy, but may be modified if an activity fails - * with a retryable application failure specifying a retry delay. - */ - currentRetryInterval?: (google.protobuf.IDuration|null); - - /** The time when the last activity attempt completed. If activity has not been completed yet, it will be null. */ - lastAttemptCompleteTime?: (google.protobuf.ITimestamp|null); - - /** - * The time when the next activity attempt will be scheduled. - * If activity is currently scheduled or started, this field will be null. - */ - nextAttemptScheduleTime?: (google.protobuf.ITimestamp|null); - - /** - * The Worker Deployment Version this activity was dispatched to most recently. - * If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker. - */ - lastDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** Priority metadata. */ - priority?: (temporal.api.common.v1.IPriority|null); - - /** Incremented each time the activity's state is mutated in persistence. */ - stateTransitionCount?: (Long|null); - - /** Updated once on scheduled and once on terminal status. */ - stateSizeBytes?: (Long|null); - - /** ActivityExecutionInfo searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** ActivityExecutionInfo header */ - header?: (temporal.api.common.v1.IHeader|null); - - /** Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity. */ - userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** Set if activity cancelation was requested. */ - canceledReason?: (string|null); - } - - /** Information about a standalone activity. */ - class ActivityExecutionInfo implements IActivityExecutionInfo { - - /** - * Constructs a new ActivityExecutionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.activity.v1.IActivityExecutionInfo); - - /** Unique identifier of this activity within its namespace along with run ID (below). */ - public activityId: string; - - /** ActivityExecutionInfo runId. */ - public runId: string; - - /** The type of the activity, a string that maps to a registered activity on a worker. */ - public activityType?: (temporal.api.common.v1.IActivityType|null); - - /** A general status for this activity, indicates whether it is currently running or in one of the terminal statuses. */ - public status: temporal.api.enums.v1.ActivityExecutionStatus; - - /** More detailed breakdown of ACTIVITY_EXECUTION_STATUS_RUNNING. */ - public runState: temporal.api.enums.v1.PendingActivityState; - - /** ActivityExecutionInfo taskQueue. */ - public taskQueue: string; - - /** - * Indicates how long the caller is willing to wait for an activity completion. Limits how long - * retries will be attempted. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Limits time an activity task can stay in a task queue before a worker picks it up. This - * timeout is always non retryable, as all a retry would achieve is to put it back into the same - * queue. Defaults to `schedule_to_close_timeout`. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Maximum time a single activity attempt is allowed to execute after being picked up by a worker. This - * timeout is always retryable. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Maximum permitted time between successful worker heartbeats. */ - public heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** The retry policy for the activity. Will never exceed `schedule_to_close_timeout`. */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Details provided in the last recorded activity heartbeat. */ - public heartbeatDetails?: (temporal.api.common.v1.IPayloads|null); - - /** Time the last heartbeat was recorded. */ - public lastHeartbeatTime?: (google.protobuf.ITimestamp|null); - - /** Time the last attempt was started. */ - public lastStartedTime?: (google.protobuf.ITimestamp|null); - - /** The attempt this activity is currently on. Incremented each time a new attempt is scheduled. */ - public attempt: number; - - /** How long this activity has been running for, including all attempts and backoff between attempts. */ - public executionDuration?: (google.protobuf.IDuration|null); - - /** Time the activity was originally scheduled via a StartActivityExecution request. */ - public scheduleTime?: (google.protobuf.ITimestamp|null); - - /** Scheduled time + schedule to close timeout. */ - public expirationTime?: (google.protobuf.ITimestamp|null); - - /** Time when the activity transitioned to a closed state. */ - public closeTime?: (google.protobuf.ITimestamp|null); - - /** Failure details from the last failed attempt. */ - public lastFailure?: (temporal.api.failure.v1.IFailure|null); - - /** ActivityExecutionInfo lastWorkerIdentity. */ - public lastWorkerIdentity: string; - - /** - * Time from the last attempt failure to the next activity retry. - * If the activity is currently running, this represents the next retry interval in case the attempt fails. - * If activity is currently backing off between attempt, this represents the current retry interval. - * If there is no next retry allowed, this field will be null. - * This interval is typically calculated from the specified retry policy, but may be modified if an activity fails - * with a retryable application failure specifying a retry delay. - */ - public currentRetryInterval?: (google.protobuf.IDuration|null); - - /** The time when the last activity attempt completed. If activity has not been completed yet, it will be null. */ - public lastAttemptCompleteTime?: (google.protobuf.ITimestamp|null); - - /** - * The time when the next activity attempt will be scheduled. - * If activity is currently scheduled or started, this field will be null. - */ - public nextAttemptScheduleTime?: (google.protobuf.ITimestamp|null); - - /** - * The Worker Deployment Version this activity was dispatched to most recently. - * If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker. - */ - public lastDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** Priority metadata. */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** Incremented each time the activity's state is mutated in persistence. */ - public stateTransitionCount: Long; - - /** Updated once on scheduled and once on terminal status. */ - public stateSizeBytes: Long; - - /** ActivityExecutionInfo searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** ActivityExecutionInfo header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity. */ - public userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** Set if activity cancelation was requested. */ - public canceledReason: string; - - /** - * Creates a new ActivityExecutionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityExecutionInfo instance - */ - public static create(properties?: temporal.api.activity.v1.IActivityExecutionInfo): temporal.api.activity.v1.ActivityExecutionInfo; - - /** - * Encodes the specified ActivityExecutionInfo message. Does not implicitly {@link temporal.api.activity.v1.ActivityExecutionInfo.verify|verify} messages. - * @param message ActivityExecutionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.activity.v1.IActivityExecutionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityExecutionInfo message, length delimited. Does not implicitly {@link temporal.api.activity.v1.ActivityExecutionInfo.verify|verify} messages. - * @param message ActivityExecutionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.activity.v1.IActivityExecutionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityExecutionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityExecutionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.activity.v1.ActivityExecutionInfo; - - /** - * Decodes an ActivityExecutionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityExecutionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.activity.v1.ActivityExecutionInfo; - - /** - * Creates an ActivityExecutionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityExecutionInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.activity.v1.ActivityExecutionInfo; - - /** - * Creates a plain object from an ActivityExecutionInfo message. Also converts values to other types if specified. - * @param message ActivityExecutionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.activity.v1.ActivityExecutionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityExecutionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityExecutionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityExecutionListInfo. */ - interface IActivityExecutionListInfo { - - /** A unique identifier of this activity within its namespace along with run ID (below). */ - activityId?: (string|null); - - /** The run ID of the standalone activity. */ - runId?: (string|null); - - /** The type of the activity, a string that maps to a registered activity on a worker. */ - activityType?: (temporal.api.common.v1.IActivityType|null); - - /** Time the activity was originally scheduled via a StartActivityExecution request. */ - scheduleTime?: (google.protobuf.ITimestamp|null); - - /** If the activity is in a terminal status, this field represents the time the activity transitioned to that status. */ - closeTime?: (google.protobuf.ITimestamp|null); - - /** - * Only scheduled and terminal statuses appear here. More detailed information in PendingActivityInfo but not - * available in the list response. - */ - status?: (temporal.api.enums.v1.ActivityExecutionStatus|null); - - /** Search attributes from the start request. */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** The task queue this activity was scheduled on when it was originally started, updated on activity options update. */ - taskQueue?: (string|null); - - /** Updated on terminal status. */ - stateTransitionCount?: (Long|null); - - /** Updated once on scheduled and once on terminal status. */ - stateSizeBytes?: (Long|null); - - /** - * The difference between close time and scheduled time. - * This field is only populated if the activity is closed. - */ - executionDuration?: (google.protobuf.IDuration|null); - } - - /** - * Limited activity information returned in the list response. - * When adding fields here, ensure that it is also present in ActivityExecutionInfo (note that it - * may already be present in ActivityExecutionInfo but not at the top-level). - */ - class ActivityExecutionListInfo implements IActivityExecutionListInfo { - - /** - * Constructs a new ActivityExecutionListInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.activity.v1.IActivityExecutionListInfo); - - /** A unique identifier of this activity within its namespace along with run ID (below). */ - public activityId: string; - - /** The run ID of the standalone activity. */ - public runId: string; - - /** The type of the activity, a string that maps to a registered activity on a worker. */ - public activityType?: (temporal.api.common.v1.IActivityType|null); - - /** Time the activity was originally scheduled via a StartActivityExecution request. */ - public scheduleTime?: (google.protobuf.ITimestamp|null); - - /** If the activity is in a terminal status, this field represents the time the activity transitioned to that status. */ - public closeTime?: (google.protobuf.ITimestamp|null); - - /** - * Only scheduled and terminal statuses appear here. More detailed information in PendingActivityInfo but not - * available in the list response. - */ - public status: temporal.api.enums.v1.ActivityExecutionStatus; - - /** Search attributes from the start request. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** The task queue this activity was scheduled on when it was originally started, updated on activity options update. */ - public taskQueue: string; - - /** Updated on terminal status. */ - public stateTransitionCount: Long; - - /** Updated once on scheduled and once on terminal status. */ - public stateSizeBytes: Long; - - /** - * The difference between close time and scheduled time. - * This field is only populated if the activity is closed. - */ - public executionDuration?: (google.protobuf.IDuration|null); - - /** - * Creates a new ActivityExecutionListInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityExecutionListInfo instance - */ - public static create(properties?: temporal.api.activity.v1.IActivityExecutionListInfo): temporal.api.activity.v1.ActivityExecutionListInfo; - - /** - * Encodes the specified ActivityExecutionListInfo message. Does not implicitly {@link temporal.api.activity.v1.ActivityExecutionListInfo.verify|verify} messages. - * @param message ActivityExecutionListInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.activity.v1.IActivityExecutionListInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityExecutionListInfo message, length delimited. Does not implicitly {@link temporal.api.activity.v1.ActivityExecutionListInfo.verify|verify} messages. - * @param message ActivityExecutionListInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.activity.v1.IActivityExecutionListInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityExecutionListInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityExecutionListInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.activity.v1.ActivityExecutionListInfo; - - /** - * Decodes an ActivityExecutionListInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityExecutionListInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.activity.v1.ActivityExecutionListInfo; - - /** - * Creates an ActivityExecutionListInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityExecutionListInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.activity.v1.ActivityExecutionListInfo; - - /** - * Creates a plain object from an ActivityExecutionListInfo message. Also converts values to other types if specified. - * @param message ActivityExecutionListInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.activity.v1.ActivityExecutionListInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityExecutionListInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityExecutionListInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace deployment. */ - namespace deployment { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a WorkerDeploymentOptions. */ - interface IWorkerDeploymentOptions { - - /** Required when `worker_versioning_mode==VERSIONED`. */ - deploymentName?: (string|null); - - /** - * The Build ID of the worker. Required when `worker_versioning_mode==VERSIONED`, in which case, - * the worker will be part of a Deployment Version. - */ - buildId?: (string|null); - - /** - * Required. Versioning Mode for this worker. Must be the same for all workers with the - * same `deployment_name` and `build_id` combination, across all Task Queues. - * When `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version. - */ - workerVersioningMode?: (temporal.api.enums.v1.WorkerVersioningMode|null); - } - - /** - * Worker Deployment options set in SDK that need to be sent to server in every poll. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - */ - class WorkerDeploymentOptions implements IWorkerDeploymentOptions { - - /** - * Constructs a new WorkerDeploymentOptions. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.IWorkerDeploymentOptions); - - /** Required when `worker_versioning_mode==VERSIONED`. */ - public deploymentName: string; - - /** - * The Build ID of the worker. Required when `worker_versioning_mode==VERSIONED`, in which case, - * the worker will be part of a Deployment Version. - */ - public buildId: string; - - /** - * Required. Versioning Mode for this worker. Must be the same for all workers with the - * same `deployment_name` and `build_id` combination, across all Task Queues. - * When `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version. - */ - public workerVersioningMode: temporal.api.enums.v1.WorkerVersioningMode; - - /** - * Creates a new WorkerDeploymentOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerDeploymentOptions instance - */ - public static create(properties?: temporal.api.deployment.v1.IWorkerDeploymentOptions): temporal.api.deployment.v1.WorkerDeploymentOptions; - - /** - * Encodes the specified WorkerDeploymentOptions message. Does not implicitly {@link temporal.api.deployment.v1.WorkerDeploymentOptions.verify|verify} messages. - * @param message WorkerDeploymentOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.IWorkerDeploymentOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerDeploymentOptions message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.WorkerDeploymentOptions.verify|verify} messages. - * @param message WorkerDeploymentOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.IWorkerDeploymentOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerDeploymentOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerDeploymentOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.WorkerDeploymentOptions; - - /** - * Decodes a WorkerDeploymentOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerDeploymentOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.WorkerDeploymentOptions; - - /** - * Creates a WorkerDeploymentOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerDeploymentOptions - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.WorkerDeploymentOptions; - - /** - * Creates a plain object from a WorkerDeploymentOptions message. Also converts values to other types if specified. - * @param message WorkerDeploymentOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.WorkerDeploymentOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerDeploymentOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerDeploymentOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Deployment. */ - interface IDeployment { - - /** - * Different versions of the same worker service/application are related together by having a - * shared series name. - * Out of all deployments of a series, one can be designated as the current deployment, which - * receives new workflow executions and new tasks of workflows with - * `VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior. - */ - seriesName?: (string|null); - - /** - * Build ID changes with each version of the worker when the worker program code and/or config - * changes. - */ - buildId?: (string|null); - } - - /** - * `Deployment` identifies a deployment of Temporal workers. The combination of deployment series - * name + build ID serves as the identifier. User can use `WorkerDeploymentOptions` in their worker - * programs to specify these values. - * Deprecated. - */ - class Deployment implements IDeployment { - - /** - * Constructs a new Deployment. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.IDeployment); - - /** - * Different versions of the same worker service/application are related together by having a - * shared series name. - * Out of all deployments of a series, one can be designated as the current deployment, which - * receives new workflow executions and new tasks of workflows with - * `VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior. - */ - public seriesName: string; - - /** - * Build ID changes with each version of the worker when the worker program code and/or config - * changes. - */ - public buildId: string; - - /** - * Creates a new Deployment instance using the specified properties. - * @param [properties] Properties to set - * @returns Deployment instance - */ - public static create(properties?: temporal.api.deployment.v1.IDeployment): temporal.api.deployment.v1.Deployment; - - /** - * Encodes the specified Deployment message. Does not implicitly {@link temporal.api.deployment.v1.Deployment.verify|verify} messages. - * @param message Deployment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.IDeployment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Deployment message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.Deployment.verify|verify} messages. - * @param message Deployment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.IDeployment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Deployment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Deployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.Deployment; - - /** - * Decodes a Deployment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Deployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.Deployment; - - /** - * Creates a Deployment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Deployment - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.Deployment; - - /** - * Creates a plain object from a Deployment message. Also converts values to other types if specified. - * @param message Deployment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.Deployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Deployment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Deployment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeploymentInfo. */ - interface IDeploymentInfo { - - /** DeploymentInfo deployment */ - deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** DeploymentInfo createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** DeploymentInfo taskQueueInfos */ - taskQueueInfos?: (temporal.api.deployment.v1.DeploymentInfo.ITaskQueueInfo[]|null); - - /** - * A user-defined set of key-values. Can be updated as part of write operations to the - * deployment, such as `SetCurrentDeployment`. - */ - metadata?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - - /** If this deployment is the current deployment of its deployment series. */ - isCurrent?: (boolean|null); - } - - /** - * `DeploymentInfo` holds information about a deployment. Deployment information is tracked - * automatically by server as soon as the first poll from that deployment reaches the server. There - * can be multiple task queue workers in a single deployment which are listed in this message. - * Deprecated. - */ - class DeploymentInfo implements IDeploymentInfo { - - /** - * Constructs a new DeploymentInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.IDeploymentInfo); - - /** DeploymentInfo deployment. */ - public deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** DeploymentInfo createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** DeploymentInfo taskQueueInfos. */ - public taskQueueInfos: temporal.api.deployment.v1.DeploymentInfo.ITaskQueueInfo[]; - - /** - * A user-defined set of key-values. Can be updated as part of write operations to the - * deployment, such as `SetCurrentDeployment`. - */ - public metadata: { [k: string]: temporal.api.common.v1.IPayload }; - - /** If this deployment is the current deployment of its deployment series. */ - public isCurrent: boolean; - - /** - * Creates a new DeploymentInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns DeploymentInfo instance - */ - public static create(properties?: temporal.api.deployment.v1.IDeploymentInfo): temporal.api.deployment.v1.DeploymentInfo; - - /** - * Encodes the specified DeploymentInfo message. Does not implicitly {@link temporal.api.deployment.v1.DeploymentInfo.verify|verify} messages. - * @param message DeploymentInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.IDeploymentInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeploymentInfo message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.DeploymentInfo.verify|verify} messages. - * @param message DeploymentInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.IDeploymentInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeploymentInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeploymentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.DeploymentInfo; - - /** - * Decodes a DeploymentInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeploymentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.DeploymentInfo; - - /** - * Creates a DeploymentInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeploymentInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.DeploymentInfo; - - /** - * Creates a plain object from a DeploymentInfo message. Also converts values to other types if specified. - * @param message DeploymentInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.DeploymentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeploymentInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeploymentInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DeploymentInfo { - - /** Properties of a TaskQueueInfo. */ - interface ITaskQueueInfo { - - /** TaskQueueInfo name */ - name?: (string|null); - - /** TaskQueueInfo type */ - type?: (temporal.api.enums.v1.TaskQueueType|null); - - /** When server saw the first poller for this task queue in this deployment. */ - firstPollerTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a TaskQueueInfo. */ - class TaskQueueInfo implements ITaskQueueInfo { - - /** - * Constructs a new TaskQueueInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.DeploymentInfo.ITaskQueueInfo); - - /** TaskQueueInfo name. */ - public name: string; - - /** TaskQueueInfo type. */ - public type: temporal.api.enums.v1.TaskQueueType; - - /** When server saw the first poller for this task queue in this deployment. */ - public firstPollerTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new TaskQueueInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskQueueInfo instance - */ - public static create(properties?: temporal.api.deployment.v1.DeploymentInfo.ITaskQueueInfo): temporal.api.deployment.v1.DeploymentInfo.TaskQueueInfo; - - /** - * Encodes the specified TaskQueueInfo message. Does not implicitly {@link temporal.api.deployment.v1.DeploymentInfo.TaskQueueInfo.verify|verify} messages. - * @param message TaskQueueInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.DeploymentInfo.ITaskQueueInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskQueueInfo message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.DeploymentInfo.TaskQueueInfo.verify|verify} messages. - * @param message TaskQueueInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.DeploymentInfo.ITaskQueueInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskQueueInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskQueueInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.DeploymentInfo.TaskQueueInfo; - - /** - * Decodes a TaskQueueInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskQueueInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.DeploymentInfo.TaskQueueInfo; - - /** - * Creates a TaskQueueInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskQueueInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.DeploymentInfo.TaskQueueInfo; - - /** - * Creates a plain object from a TaskQueueInfo message. Also converts values to other types if specified. - * @param message TaskQueueInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.DeploymentInfo.TaskQueueInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskQueueInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskQueueInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an UpdateDeploymentMetadata. */ - interface IUpdateDeploymentMetadata { - - /** UpdateDeploymentMetadata upsertEntries */ - upsertEntries?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - - /** List of keys to remove from the metadata. */ - removeEntries?: (string[]|null); - } - - /** - * Used as part of Deployment write APIs to update metadata attached to a deployment. - * Deprecated. - */ - class UpdateDeploymentMetadata implements IUpdateDeploymentMetadata { - - /** - * Constructs a new UpdateDeploymentMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.IUpdateDeploymentMetadata); - - /** UpdateDeploymentMetadata upsertEntries. */ - public upsertEntries: { [k: string]: temporal.api.common.v1.IPayload }; - - /** List of keys to remove from the metadata. */ - public removeEntries: string[]; - - /** - * Creates a new UpdateDeploymentMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateDeploymentMetadata instance - */ - public static create(properties?: temporal.api.deployment.v1.IUpdateDeploymentMetadata): temporal.api.deployment.v1.UpdateDeploymentMetadata; - - /** - * Encodes the specified UpdateDeploymentMetadata message. Does not implicitly {@link temporal.api.deployment.v1.UpdateDeploymentMetadata.verify|verify} messages. - * @param message UpdateDeploymentMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.IUpdateDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateDeploymentMetadata message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.UpdateDeploymentMetadata.verify|verify} messages. - * @param message UpdateDeploymentMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.IUpdateDeploymentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateDeploymentMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateDeploymentMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.UpdateDeploymentMetadata; - - /** - * Decodes an UpdateDeploymentMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateDeploymentMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.UpdateDeploymentMetadata; - - /** - * Creates an UpdateDeploymentMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateDeploymentMetadata - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.UpdateDeploymentMetadata; - - /** - * Creates a plain object from an UpdateDeploymentMetadata message. Also converts values to other types if specified. - * @param message UpdateDeploymentMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.UpdateDeploymentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateDeploymentMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateDeploymentMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeploymentListInfo. */ - interface IDeploymentListInfo { - - /** DeploymentListInfo deployment */ - deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** DeploymentListInfo createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** If this deployment is the current deployment of its deployment series. */ - isCurrent?: (boolean|null); - } - - /** - * DeploymentListInfo is an abbreviated set of fields from DeploymentInfo that's returned in - * ListDeployments. - * Deprecated. - */ - class DeploymentListInfo implements IDeploymentListInfo { - - /** - * Constructs a new DeploymentListInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.IDeploymentListInfo); - - /** DeploymentListInfo deployment. */ - public deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** DeploymentListInfo createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** If this deployment is the current deployment of its deployment series. */ - public isCurrent: boolean; - - /** - * Creates a new DeploymentListInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns DeploymentListInfo instance - */ - public static create(properties?: temporal.api.deployment.v1.IDeploymentListInfo): temporal.api.deployment.v1.DeploymentListInfo; - - /** - * Encodes the specified DeploymentListInfo message. Does not implicitly {@link temporal.api.deployment.v1.DeploymentListInfo.verify|verify} messages. - * @param message DeploymentListInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.IDeploymentListInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeploymentListInfo message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.DeploymentListInfo.verify|verify} messages. - * @param message DeploymentListInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.IDeploymentListInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeploymentListInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeploymentListInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.DeploymentListInfo; - - /** - * Decodes a DeploymentListInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeploymentListInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.DeploymentListInfo; - - /** - * Creates a DeploymentListInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeploymentListInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.DeploymentListInfo; - - /** - * Creates a plain object from a DeploymentListInfo message. Also converts values to other types if specified. - * @param message DeploymentListInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.DeploymentListInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeploymentListInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeploymentListInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerDeploymentVersionInfo. */ - interface IWorkerDeploymentVersionInfo { - - /** Deprecated. Use `deployment_version`. */ - version?: (string|null); - - /** The status of the Worker Deployment Version. */ - status?: (temporal.api.enums.v1.WorkerDeploymentVersionStatus|null); - - /** Required. */ - deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** WorkerDeploymentVersionInfo deploymentName */ - deploymentName?: (string|null); - - /** WorkerDeploymentVersionInfo createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Last time `current_since_time`, `ramping_since_time, or `ramp_percentage` of this version changed. */ - routingChangedTime?: (google.protobuf.ITimestamp|null); - - /** - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) - * Unset if not current. - */ - currentSinceTime?: (google.protobuf.ITimestamp|null); - - /** - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) - * Unset if not ramping. Updated when the version first starts ramping, not on each ramp change. - */ - rampingSinceTime?: (google.protobuf.ITimestamp|null); - - /** Timestamp when this version first became current or ramping. */ - firstActivationTime?: (google.protobuf.ITimestamp|null); - - /** - * Timestamp when this version last became current. - * Can be used to determine whether a version has ever been Current. - */ - lastCurrentTime?: (google.protobuf.ITimestamp|null); - - /** - * Timestamp when this version last stopped being current or ramping. - * Cleared if the version becomes current or ramping again. - */ - lastDeactivationTime?: (google.protobuf.ITimestamp|null); - - /** - * Range: [0, 100]. Must be zero if the version is not ramping (i.e. `ramping_since_time` is nil). - * Can be in the range [0, 100] if the version is ramping. - */ - rampPercentage?: (number|null); - - /** - * All the Task Queues that have ever polled from this Deployment version. - * Deprecated. Use `version_task_queues` in DescribeWorkerDeploymentVersionResponse instead. - */ - taskQueueInfos?: (temporal.api.deployment.v1.WorkerDeploymentVersionInfo.IVersionTaskQueueInfo[]|null); - - /** - * Helps user determine when it is safe to decommission the workers of this - * Version. Not present when version is current or ramping. - * Current limitations: - * - Not supported for Unversioned mode. - * - Periodically refreshed, may have delays up to few minutes (consult the - * last_checked_time value). - * - Refreshed only when version is not current or ramping AND the status is not - * "drained" yet. - * - Once the status is changed to "drained", it is not changed until the Version - * becomes Current or Ramping again, at which time the drainage info is cleared. - * This means if the Version is "drained" but new workflows are sent to it via - * Pinned Versioning Override, the status does not account for those Pinned-override - * executions and remains "drained". - */ - drainageInfo?: (temporal.api.deployment.v1.IVersionDrainageInfo|null); - - /** Arbitrary user-provided metadata attached to this version. */ - metadata?: (temporal.api.deployment.v1.IVersionMetadata|null); - } - - /** - * A Worker Deployment Version (Version, for short) represents all workers of the same - * code and config within a Deployment. Workers of the same Version are expected to - * behave exactly the same so when executions move between them there are no - * non-determinism issues. - * Worker Deployment Versions are created in Temporal server automatically when - * their first poller arrives to the server. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - */ - class WorkerDeploymentVersionInfo implements IWorkerDeploymentVersionInfo { - - /** - * Constructs a new WorkerDeploymentVersionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.IWorkerDeploymentVersionInfo); - - /** Deprecated. Use `deployment_version`. */ - public version: string; - - /** The status of the Worker Deployment Version. */ - public status: temporal.api.enums.v1.WorkerDeploymentVersionStatus; - - /** Required. */ - public deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** WorkerDeploymentVersionInfo deploymentName. */ - public deploymentName: string; - - /** WorkerDeploymentVersionInfo createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Last time `current_since_time`, `ramping_since_time, or `ramp_percentage` of this version changed. */ - public routingChangedTime?: (google.protobuf.ITimestamp|null); - - /** - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) - * Unset if not current. - */ - public currentSinceTime?: (google.protobuf.ITimestamp|null); - - /** - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) - * Unset if not ramping. Updated when the version first starts ramping, not on each ramp change. - */ - public rampingSinceTime?: (google.protobuf.ITimestamp|null); - - /** Timestamp when this version first became current or ramping. */ - public firstActivationTime?: (google.protobuf.ITimestamp|null); - - /** - * Timestamp when this version last became current. - * Can be used to determine whether a version has ever been Current. - */ - public lastCurrentTime?: (google.protobuf.ITimestamp|null); - - /** - * Timestamp when this version last stopped being current or ramping. - * Cleared if the version becomes current or ramping again. - */ - public lastDeactivationTime?: (google.protobuf.ITimestamp|null); - - /** - * Range: [0, 100]. Must be zero if the version is not ramping (i.e. `ramping_since_time` is nil). - * Can be in the range [0, 100] if the version is ramping. - */ - public rampPercentage: number; - - /** - * All the Task Queues that have ever polled from this Deployment version. - * Deprecated. Use `version_task_queues` in DescribeWorkerDeploymentVersionResponse instead. - */ - public taskQueueInfos: temporal.api.deployment.v1.WorkerDeploymentVersionInfo.IVersionTaskQueueInfo[]; - - /** - * Helps user determine when it is safe to decommission the workers of this - * Version. Not present when version is current or ramping. - * Current limitations: - * - Not supported for Unversioned mode. - * - Periodically refreshed, may have delays up to few minutes (consult the - * last_checked_time value). - * - Refreshed only when version is not current or ramping AND the status is not - * "drained" yet. - * - Once the status is changed to "drained", it is not changed until the Version - * becomes Current or Ramping again, at which time the drainage info is cleared. - * This means if the Version is "drained" but new workflows are sent to it via - * Pinned Versioning Override, the status does not account for those Pinned-override - * executions and remains "drained". - */ - public drainageInfo?: (temporal.api.deployment.v1.IVersionDrainageInfo|null); - - /** Arbitrary user-provided metadata attached to this version. */ - public metadata?: (temporal.api.deployment.v1.IVersionMetadata|null); - - /** - * Creates a new WorkerDeploymentVersionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerDeploymentVersionInfo instance - */ - public static create(properties?: temporal.api.deployment.v1.IWorkerDeploymentVersionInfo): temporal.api.deployment.v1.WorkerDeploymentVersionInfo; - - /** - * Encodes the specified WorkerDeploymentVersionInfo message. Does not implicitly {@link temporal.api.deployment.v1.WorkerDeploymentVersionInfo.verify|verify} messages. - * @param message WorkerDeploymentVersionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.IWorkerDeploymentVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerDeploymentVersionInfo message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.WorkerDeploymentVersionInfo.verify|verify} messages. - * @param message WorkerDeploymentVersionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.IWorkerDeploymentVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerDeploymentVersionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerDeploymentVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.WorkerDeploymentVersionInfo; - - /** - * Decodes a WorkerDeploymentVersionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerDeploymentVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.WorkerDeploymentVersionInfo; - - /** - * Creates a WorkerDeploymentVersionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerDeploymentVersionInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.WorkerDeploymentVersionInfo; - - /** - * Creates a plain object from a WorkerDeploymentVersionInfo message. Also converts values to other types if specified. - * @param message WorkerDeploymentVersionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.WorkerDeploymentVersionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerDeploymentVersionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerDeploymentVersionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WorkerDeploymentVersionInfo { - - /** Properties of a VersionTaskQueueInfo. */ - interface IVersionTaskQueueInfo { - - /** VersionTaskQueueInfo name */ - name?: (string|null); - - /** VersionTaskQueueInfo type */ - type?: (temporal.api.enums.v1.TaskQueueType|null); - } - - /** Represents a VersionTaskQueueInfo. */ - class VersionTaskQueueInfo implements IVersionTaskQueueInfo { - - /** - * Constructs a new VersionTaskQueueInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.WorkerDeploymentVersionInfo.IVersionTaskQueueInfo); - - /** VersionTaskQueueInfo name. */ - public name: string; - - /** VersionTaskQueueInfo type. */ - public type: temporal.api.enums.v1.TaskQueueType; - - /** - * Creates a new VersionTaskQueueInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VersionTaskQueueInfo instance - */ - public static create(properties?: temporal.api.deployment.v1.WorkerDeploymentVersionInfo.IVersionTaskQueueInfo): temporal.api.deployment.v1.WorkerDeploymentVersionInfo.VersionTaskQueueInfo; - - /** - * Encodes the specified VersionTaskQueueInfo message. Does not implicitly {@link temporal.api.deployment.v1.WorkerDeploymentVersionInfo.VersionTaskQueueInfo.verify|verify} messages. - * @param message VersionTaskQueueInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.WorkerDeploymentVersionInfo.IVersionTaskQueueInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VersionTaskQueueInfo message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.WorkerDeploymentVersionInfo.VersionTaskQueueInfo.verify|verify} messages. - * @param message VersionTaskQueueInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.WorkerDeploymentVersionInfo.IVersionTaskQueueInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VersionTaskQueueInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VersionTaskQueueInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.WorkerDeploymentVersionInfo.VersionTaskQueueInfo; - - /** - * Decodes a VersionTaskQueueInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VersionTaskQueueInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.WorkerDeploymentVersionInfo.VersionTaskQueueInfo; - - /** - * Creates a VersionTaskQueueInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VersionTaskQueueInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.WorkerDeploymentVersionInfo.VersionTaskQueueInfo; - - /** - * Creates a plain object from a VersionTaskQueueInfo message. Also converts values to other types if specified. - * @param message VersionTaskQueueInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.WorkerDeploymentVersionInfo.VersionTaskQueueInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VersionTaskQueueInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VersionTaskQueueInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a VersionDrainageInfo. */ - interface IVersionDrainageInfo { - - /** - * Set to DRAINING when the version first stops accepting new executions (is no longer current or ramping). - * Set to DRAINED when no more open pinned workflows exist on this version. - */ - status?: (temporal.api.enums.v1.VersionDrainageStatus|null); - - /** Last time the drainage status changed. */ - lastChangedTime?: (google.protobuf.ITimestamp|null); - - /** Last time the system checked for drainage of this version. */ - lastCheckedTime?: (google.protobuf.ITimestamp|null); - } - - /** - * Information about workflow drainage to help the user determine when it is safe - * to decommission a Version. Not present while version is current or ramping. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - */ - class VersionDrainageInfo implements IVersionDrainageInfo { - - /** - * Constructs a new VersionDrainageInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.IVersionDrainageInfo); - - /** - * Set to DRAINING when the version first stops accepting new executions (is no longer current or ramping). - * Set to DRAINED when no more open pinned workflows exist on this version. - */ - public status: temporal.api.enums.v1.VersionDrainageStatus; - - /** Last time the drainage status changed. */ - public lastChangedTime?: (google.protobuf.ITimestamp|null); - - /** Last time the system checked for drainage of this version. */ - public lastCheckedTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new VersionDrainageInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VersionDrainageInfo instance - */ - public static create(properties?: temporal.api.deployment.v1.IVersionDrainageInfo): temporal.api.deployment.v1.VersionDrainageInfo; - - /** - * Encodes the specified VersionDrainageInfo message. Does not implicitly {@link temporal.api.deployment.v1.VersionDrainageInfo.verify|verify} messages. - * @param message VersionDrainageInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.IVersionDrainageInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VersionDrainageInfo message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.VersionDrainageInfo.verify|verify} messages. - * @param message VersionDrainageInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.IVersionDrainageInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VersionDrainageInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VersionDrainageInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.VersionDrainageInfo; - - /** - * Decodes a VersionDrainageInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VersionDrainageInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.VersionDrainageInfo; - - /** - * Creates a VersionDrainageInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VersionDrainageInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.VersionDrainageInfo; - - /** - * Creates a plain object from a VersionDrainageInfo message. Also converts values to other types if specified. - * @param message VersionDrainageInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.VersionDrainageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VersionDrainageInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VersionDrainageInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerDeploymentInfo. */ - interface IWorkerDeploymentInfo { - - /** Identifies a Worker Deployment. Must be unique within the namespace. */ - name?: (string|null); - - /** - * Deployment Versions that are currently tracked in this Deployment. A DeploymentVersion will be - * cleaned up automatically if all the following conditions meet: - * - It does not receive new executions (is not current or ramping) - * - It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status) - * - It is drained (see WorkerDeploymentVersionInfo.drainage_status) - */ - versionSummaries?: (temporal.api.deployment.v1.WorkerDeploymentInfo.IWorkerDeploymentVersionSummary[]|null); - - /** WorkerDeploymentInfo createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** WorkerDeploymentInfo routingConfig */ - routingConfig?: (temporal.api.deployment.v1.IRoutingConfig|null); - - /** - * Identity of the last client who modified the configuration of this Deployment. Set to the - * `identity` value sent by APIs such as `SetWorkerDeploymentCurrentVersion` and - * `SetWorkerDeploymentRampingVersion`. - */ - lastModifierIdentity?: (string|null); - - /** - * Identity of the client that has the exclusive right to make changes to this Worker Deployment. - * Empty by default. - * If this is set, clients whose identity does not match `manager_identity` will not be able to make changes - * to this Worker Deployment. They can either set their own identity as the manager or unset the field to proceed. - */ - managerIdentity?: (string|null); - - /** - * Indicates whether the routing_config has been fully propagated to all - * relevant task queues and their partitions. - */ - routingConfigUpdateState?: (temporal.api.enums.v1.RoutingConfigUpdateState|null); - } - - /** - * A Worker Deployment (Deployment, for short) represents all workers serving - * a shared set of Task Queues. Typically, a Deployment represents one service or - * application. - * A Deployment contains multiple Deployment Versions, each representing a different - * version of workers. (see documentation of WorkerDeploymentVersionInfo) - * Deployment records are created in Temporal server automatically when their - * first poller arrives to the server. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - */ - class WorkerDeploymentInfo implements IWorkerDeploymentInfo { - - /** - * Constructs a new WorkerDeploymentInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.IWorkerDeploymentInfo); - - /** Identifies a Worker Deployment. Must be unique within the namespace. */ - public name: string; - - /** - * Deployment Versions that are currently tracked in this Deployment. A DeploymentVersion will be - * cleaned up automatically if all the following conditions meet: - * - It does not receive new executions (is not current or ramping) - * - It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status) - * - It is drained (see WorkerDeploymentVersionInfo.drainage_status) - */ - public versionSummaries: temporal.api.deployment.v1.WorkerDeploymentInfo.IWorkerDeploymentVersionSummary[]; - - /** WorkerDeploymentInfo createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** WorkerDeploymentInfo routingConfig. */ - public routingConfig?: (temporal.api.deployment.v1.IRoutingConfig|null); - - /** - * Identity of the last client who modified the configuration of this Deployment. Set to the - * `identity` value sent by APIs such as `SetWorkerDeploymentCurrentVersion` and - * `SetWorkerDeploymentRampingVersion`. - */ - public lastModifierIdentity: string; - - /** - * Identity of the client that has the exclusive right to make changes to this Worker Deployment. - * Empty by default. - * If this is set, clients whose identity does not match `manager_identity` will not be able to make changes - * to this Worker Deployment. They can either set their own identity as the manager or unset the field to proceed. - */ - public managerIdentity: string; - - /** - * Indicates whether the routing_config has been fully propagated to all - * relevant task queues and their partitions. - */ - public routingConfigUpdateState: temporal.api.enums.v1.RoutingConfigUpdateState; - - /** - * Creates a new WorkerDeploymentInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerDeploymentInfo instance - */ - public static create(properties?: temporal.api.deployment.v1.IWorkerDeploymentInfo): temporal.api.deployment.v1.WorkerDeploymentInfo; - - /** - * Encodes the specified WorkerDeploymentInfo message. Does not implicitly {@link temporal.api.deployment.v1.WorkerDeploymentInfo.verify|verify} messages. - * @param message WorkerDeploymentInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.IWorkerDeploymentInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerDeploymentInfo message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.WorkerDeploymentInfo.verify|verify} messages. - * @param message WorkerDeploymentInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.IWorkerDeploymentInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerDeploymentInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerDeploymentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.WorkerDeploymentInfo; - - /** - * Decodes a WorkerDeploymentInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerDeploymentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.WorkerDeploymentInfo; - - /** - * Creates a WorkerDeploymentInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerDeploymentInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.WorkerDeploymentInfo; - - /** - * Creates a plain object from a WorkerDeploymentInfo message. Also converts values to other types if specified. - * @param message WorkerDeploymentInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.WorkerDeploymentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerDeploymentInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerDeploymentInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WorkerDeploymentInfo { - - /** Properties of a WorkerDeploymentVersionSummary. */ - interface IWorkerDeploymentVersionSummary { - - /** Deprecated. Use `deployment_version`. */ - version?: (string|null); - - /** The status of the Worker Deployment Version. */ - status?: (temporal.api.enums.v1.WorkerDeploymentVersionStatus|null); - - /** Required. */ - deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** WorkerDeploymentVersionSummary createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Deprecated. Use `drainage_info` instead. */ - drainageStatus?: (temporal.api.enums.v1.VersionDrainageStatus|null); - - /** - * Information about workflow drainage to help the user determine when it is safe - * to decommission a Version. Not present while version is current or ramping - */ - drainageInfo?: (temporal.api.deployment.v1.IVersionDrainageInfo|null); - - /** - * Unset if not current. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) - */ - currentSinceTime?: (google.protobuf.ITimestamp|null); - - /** - * Unset if not ramping. Updated when the version first starts ramping, not on each ramp change. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) - */ - rampingSinceTime?: (google.protobuf.ITimestamp|null); - - /** Last time `current_since_time`, `ramping_since_time, or `ramp_percentage` of this version changed. */ - routingUpdateTime?: (google.protobuf.ITimestamp|null); - - /** Timestamp when this version first became current or ramping. */ - firstActivationTime?: (google.protobuf.ITimestamp|null); - - /** - * Timestamp when this version last became current. - * Can be used to determine whether a version has ever been Current. - */ - lastCurrentTime?: (google.protobuf.ITimestamp|null); - - /** - * Timestamp when this version last stopped being current or ramping. - * Cleared if the version becomes current or ramping again. - */ - lastDeactivationTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a WorkerDeploymentVersionSummary. */ - class WorkerDeploymentVersionSummary implements IWorkerDeploymentVersionSummary { - - /** - * Constructs a new WorkerDeploymentVersionSummary. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.WorkerDeploymentInfo.IWorkerDeploymentVersionSummary); - - /** Deprecated. Use `deployment_version`. */ - public version: string; - - /** The status of the Worker Deployment Version. */ - public status: temporal.api.enums.v1.WorkerDeploymentVersionStatus; - - /** Required. */ - public deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** WorkerDeploymentVersionSummary createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Deprecated. Use `drainage_info` instead. */ - public drainageStatus: temporal.api.enums.v1.VersionDrainageStatus; - - /** - * Information about workflow drainage to help the user determine when it is safe - * to decommission a Version. Not present while version is current or ramping - */ - public drainageInfo?: (temporal.api.deployment.v1.IVersionDrainageInfo|null); - - /** - * Unset if not current. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) - */ - public currentSinceTime?: (google.protobuf.ITimestamp|null); - - /** - * Unset if not ramping. Updated when the version first starts ramping, not on each ramp change. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) - */ - public rampingSinceTime?: (google.protobuf.ITimestamp|null); - - /** Last time `current_since_time`, `ramping_since_time, or `ramp_percentage` of this version changed. */ - public routingUpdateTime?: (google.protobuf.ITimestamp|null); - - /** Timestamp when this version first became current or ramping. */ - public firstActivationTime?: (google.protobuf.ITimestamp|null); - - /** - * Timestamp when this version last became current. - * Can be used to determine whether a version has ever been Current. - */ - public lastCurrentTime?: (google.protobuf.ITimestamp|null); - - /** - * Timestamp when this version last stopped being current or ramping. - * Cleared if the version becomes current or ramping again. - */ - public lastDeactivationTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new WorkerDeploymentVersionSummary instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerDeploymentVersionSummary instance - */ - public static create(properties?: temporal.api.deployment.v1.WorkerDeploymentInfo.IWorkerDeploymentVersionSummary): temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary; - - /** - * Encodes the specified WorkerDeploymentVersionSummary message. Does not implicitly {@link temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary.verify|verify} messages. - * @param message WorkerDeploymentVersionSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.WorkerDeploymentInfo.IWorkerDeploymentVersionSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerDeploymentVersionSummary message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary.verify|verify} messages. - * @param message WorkerDeploymentVersionSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.WorkerDeploymentInfo.IWorkerDeploymentVersionSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerDeploymentVersionSummary message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerDeploymentVersionSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary; - - /** - * Decodes a WorkerDeploymentVersionSummary message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerDeploymentVersionSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary; - - /** - * Creates a WorkerDeploymentVersionSummary message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerDeploymentVersionSummary - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary; - - /** - * Creates a plain object from a WorkerDeploymentVersionSummary message. Also converts values to other types if specified. - * @param message WorkerDeploymentVersionSummary - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerDeploymentVersionSummary to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerDeploymentVersionSummary - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a WorkerDeploymentVersion. */ - interface IWorkerDeploymentVersion { - - /** - * A unique identifier for this Version within the Deployment it is a part of. - * Not necessarily unique within the namespace. - * The combination of `deployment_name` and `build_id` uniquely identifies this - * Version within the namespace, because Deployment names are unique within a namespace. - */ - buildId?: (string|null); - - /** Identifies the Worker Deployment this Version is part of. */ - deploymentName?: (string|null); - } - - /** - * A Worker Deployment Version (Version, for short) represents a - * version of workers within a Worker Deployment. (see documentation of WorkerDeploymentVersionInfo) - * Version records are created in Temporal server automatically when their - * first poller arrives to the server. - * Experimental. Worker Deployment Versions are experimental and might significantly change in the future. - */ - class WorkerDeploymentVersion implements IWorkerDeploymentVersion { - - /** - * Constructs a new WorkerDeploymentVersion. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.IWorkerDeploymentVersion); - - /** - * A unique identifier for this Version within the Deployment it is a part of. - * Not necessarily unique within the namespace. - * The combination of `deployment_name` and `build_id` uniquely identifies this - * Version within the namespace, because Deployment names are unique within a namespace. - */ - public buildId: string; - - /** Identifies the Worker Deployment this Version is part of. */ - public deploymentName: string; - - /** - * Creates a new WorkerDeploymentVersion instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerDeploymentVersion instance - */ - public static create(properties?: temporal.api.deployment.v1.IWorkerDeploymentVersion): temporal.api.deployment.v1.WorkerDeploymentVersion; - - /** - * Encodes the specified WorkerDeploymentVersion message. Does not implicitly {@link temporal.api.deployment.v1.WorkerDeploymentVersion.verify|verify} messages. - * @param message WorkerDeploymentVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.IWorkerDeploymentVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerDeploymentVersion message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.WorkerDeploymentVersion.verify|verify} messages. - * @param message WorkerDeploymentVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.IWorkerDeploymentVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerDeploymentVersion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerDeploymentVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.WorkerDeploymentVersion; - - /** - * Decodes a WorkerDeploymentVersion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerDeploymentVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.WorkerDeploymentVersion; - - /** - * Creates a WorkerDeploymentVersion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerDeploymentVersion - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.WorkerDeploymentVersion; - - /** - * Creates a plain object from a WorkerDeploymentVersion message. Also converts values to other types if specified. - * @param message WorkerDeploymentVersion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.WorkerDeploymentVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerDeploymentVersion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerDeploymentVersion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VersionMetadata. */ - interface IVersionMetadata { - - /** Arbitrary key-values. */ - entries?: ({ [k: string]: temporal.api.common.v1.IPayload }|null); - } - - /** Represents a VersionMetadata. */ - class VersionMetadata implements IVersionMetadata { - - /** - * Constructs a new VersionMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.IVersionMetadata); - - /** Arbitrary key-values. */ - public entries: { [k: string]: temporal.api.common.v1.IPayload }; - - /** - * Creates a new VersionMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns VersionMetadata instance - */ - public static create(properties?: temporal.api.deployment.v1.IVersionMetadata): temporal.api.deployment.v1.VersionMetadata; - - /** - * Encodes the specified VersionMetadata message. Does not implicitly {@link temporal.api.deployment.v1.VersionMetadata.verify|verify} messages. - * @param message VersionMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.IVersionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VersionMetadata message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.VersionMetadata.verify|verify} messages. - * @param message VersionMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.IVersionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VersionMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VersionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.VersionMetadata; - - /** - * Decodes a VersionMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VersionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.VersionMetadata; - - /** - * Creates a VersionMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VersionMetadata - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.VersionMetadata; - - /** - * Creates a plain object from a VersionMetadata message. Also converts values to other types if specified. - * @param message VersionMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.VersionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VersionMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VersionMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RoutingConfig. */ - interface IRoutingConfig { - - /** - * Specifies which Deployment Version should receive new workflow executions and tasks of - * existing unversioned or AutoUpgrade workflows. - * Nil value means no Version in this Deployment (except Ramping Version, if present) receives traffic other than tasks of previously Pinned workflows. In absence of a Current Version, remaining traffic after any ramp (if set) goes to unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.). - * Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage - * is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`). - */ - currentDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** Deprecated. Use `current_deployment_version`. */ - currentVersion?: (string|null); - - /** - * When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version. - * Must always be different from `current_deployment_version` unless both are nil. - * Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - * Note that it is possible to ramp from one Version to another Version, or from unversioned - * workers to a particular Version, or from a particular Version to unversioned workers. - */ - rampingDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** Deprecated. Use `ramping_deployment_version`. */ - rampingVersion?: (string|null); - - /** - * Percentage of tasks that are routed to the Ramping Version instead of the Current Version. - * Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but - * not yet "promoted" to be the Current Version, likely due to pending validations. - * A 0% value means the Ramping Version is receiving no traffic. - */ - rampingVersionPercentage?: (number|null); - - /** Last time current version was changed. */ - currentVersionChangedTime?: (google.protobuf.ITimestamp|null); - - /** Last time ramping version was changed. Not updated if only the ramp percentage changes. */ - rampingVersionChangedTime?: (google.protobuf.ITimestamp|null); - - /** - * Last time ramping version percentage was changed. - * If ramping version is changed, this is also updated, even if the percentage stays the same. - */ - rampingVersionPercentageChangedTime?: (google.protobuf.ITimestamp|null); - - /** - * Monotonically increasing value which is incremented on every mutation - * to any field of this message to achieve eventual consistency between task queues and their partitions. - */ - revisionNumber?: (Long|null); - } - - /** Represents a RoutingConfig. */ - class RoutingConfig implements IRoutingConfig { - - /** - * Constructs a new RoutingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.IRoutingConfig); - - /** - * Specifies which Deployment Version should receive new workflow executions and tasks of - * existing unversioned or AutoUpgrade workflows. - * Nil value means no Version in this Deployment (except Ramping Version, if present) receives traffic other than tasks of previously Pinned workflows. In absence of a Current Version, remaining traffic after any ramp (if set) goes to unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.). - * Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage - * is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`). - */ - public currentDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** Deprecated. Use `current_deployment_version`. */ - public currentVersion: string; - - /** - * When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version. - * Must always be different from `current_deployment_version` unless both are nil. - * Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - * Note that it is possible to ramp from one Version to another Version, or from unversioned - * workers to a particular Version, or from a particular Version to unversioned workers. - */ - public rampingDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** Deprecated. Use `ramping_deployment_version`. */ - public rampingVersion: string; - - /** - * Percentage of tasks that are routed to the Ramping Version instead of the Current Version. - * Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but - * not yet "promoted" to be the Current Version, likely due to pending validations. - * A 0% value means the Ramping Version is receiving no traffic. - */ - public rampingVersionPercentage: number; - - /** Last time current version was changed. */ - public currentVersionChangedTime?: (google.protobuf.ITimestamp|null); - - /** Last time ramping version was changed. Not updated if only the ramp percentage changes. */ - public rampingVersionChangedTime?: (google.protobuf.ITimestamp|null); - - /** - * Last time ramping version percentage was changed. - * If ramping version is changed, this is also updated, even if the percentage stays the same. - */ - public rampingVersionPercentageChangedTime?: (google.protobuf.ITimestamp|null); - - /** - * Monotonically increasing value which is incremented on every mutation - * to any field of this message to achieve eventual consistency between task queues and their partitions. - */ - public revisionNumber: Long; - - /** - * Creates a new RoutingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns RoutingConfig instance - */ - public static create(properties?: temporal.api.deployment.v1.IRoutingConfig): temporal.api.deployment.v1.RoutingConfig; - - /** - * Encodes the specified RoutingConfig message. Does not implicitly {@link temporal.api.deployment.v1.RoutingConfig.verify|verify} messages. - * @param message RoutingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.IRoutingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RoutingConfig message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.RoutingConfig.verify|verify} messages. - * @param message RoutingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.IRoutingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RoutingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RoutingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.RoutingConfig; - - /** - * Decodes a RoutingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RoutingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.RoutingConfig; - - /** - * Creates a RoutingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RoutingConfig - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.RoutingConfig; - - /** - * Creates a plain object from a RoutingConfig message. Also converts values to other types if specified. - * @param message RoutingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.RoutingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RoutingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RoutingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InheritedAutoUpgradeInfo. */ - interface IInheritedAutoUpgradeInfo { - - /** The source deployment version of the parent/previous workflow. */ - sourceDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** The revision number of the source deployment version of the parent/previous workflow. */ - sourceDeploymentRevisionNumber?: (Long|null); - } - - /** - * Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version - * to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior. - */ - class InheritedAutoUpgradeInfo implements IInheritedAutoUpgradeInfo { - - /** - * Constructs a new InheritedAutoUpgradeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.deployment.v1.IInheritedAutoUpgradeInfo); - - /** The source deployment version of the parent/previous workflow. */ - public sourceDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** The revision number of the source deployment version of the parent/previous workflow. */ - public sourceDeploymentRevisionNumber: Long; - - /** - * Creates a new InheritedAutoUpgradeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns InheritedAutoUpgradeInfo instance - */ - public static create(properties?: temporal.api.deployment.v1.IInheritedAutoUpgradeInfo): temporal.api.deployment.v1.InheritedAutoUpgradeInfo; - - /** - * Encodes the specified InheritedAutoUpgradeInfo message. Does not implicitly {@link temporal.api.deployment.v1.InheritedAutoUpgradeInfo.verify|verify} messages. - * @param message InheritedAutoUpgradeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.deployment.v1.IInheritedAutoUpgradeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InheritedAutoUpgradeInfo message, length delimited. Does not implicitly {@link temporal.api.deployment.v1.InheritedAutoUpgradeInfo.verify|verify} messages. - * @param message InheritedAutoUpgradeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.deployment.v1.IInheritedAutoUpgradeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InheritedAutoUpgradeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InheritedAutoUpgradeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.deployment.v1.InheritedAutoUpgradeInfo; - - /** - * Decodes an InheritedAutoUpgradeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InheritedAutoUpgradeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.deployment.v1.InheritedAutoUpgradeInfo; - - /** - * Creates an InheritedAutoUpgradeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InheritedAutoUpgradeInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.deployment.v1.InheritedAutoUpgradeInfo; - - /** - * Creates a plain object from an InheritedAutoUpgradeInfo message. Also converts values to other types if specified. - * @param message InheritedAutoUpgradeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.deployment.v1.InheritedAutoUpgradeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InheritedAutoUpgradeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InheritedAutoUpgradeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace taskqueue. */ - namespace taskqueue { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a TaskQueue. */ - interface ITaskQueue { - - /** TaskQueue name */ - name?: (string|null); - - /** Default: TASK_QUEUE_KIND_NORMAL. */ - kind?: (temporal.api.enums.v1.TaskQueueKind|null); - - /** - * Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of - * the normal task queue that the sticky worker is running on. - */ - normalName?: (string|null); - } - - /** See https://docs.temporal.io/docs/concepts/task-queues/ */ - class TaskQueue implements ITaskQueue { - - /** - * Constructs a new TaskQueue. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ITaskQueue); - - /** TaskQueue name. */ - public name: string; - - /** Default: TASK_QUEUE_KIND_NORMAL. */ - public kind: temporal.api.enums.v1.TaskQueueKind; - - /** - * Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of - * the normal task queue that the sticky worker is running on. - */ - public normalName: string; - - /** - * Creates a new TaskQueue instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskQueue instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ITaskQueue): temporal.api.taskqueue.v1.TaskQueue; - - /** - * Encodes the specified TaskQueue message. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueue.verify|verify} messages. - * @param message TaskQueue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ITaskQueue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskQueue message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueue.verify|verify} messages. - * @param message TaskQueue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ITaskQueue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskQueue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskQueue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.TaskQueue; - - /** - * Decodes a TaskQueue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskQueue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.TaskQueue; - - /** - * Creates a TaskQueue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskQueue - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.TaskQueue; - - /** - * Creates a plain object from a TaskQueue message. Also converts values to other types if specified. - * @param message TaskQueue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.TaskQueue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskQueue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskQueue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskQueueMetadata. */ - interface ITaskQueueMetadata { - - /** Allows throttling dispatch of tasks from this queue */ - maxTasksPerSecond?: (google.protobuf.IDoubleValue|null); - } - - /** Only applies to activity task queues */ - class TaskQueueMetadata implements ITaskQueueMetadata { - - /** - * Constructs a new TaskQueueMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ITaskQueueMetadata); - - /** Allows throttling dispatch of tasks from this queue */ - public maxTasksPerSecond?: (google.protobuf.IDoubleValue|null); - - /** - * Creates a new TaskQueueMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskQueueMetadata instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ITaskQueueMetadata): temporal.api.taskqueue.v1.TaskQueueMetadata; - - /** - * Encodes the specified TaskQueueMetadata message. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueMetadata.verify|verify} messages. - * @param message TaskQueueMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ITaskQueueMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskQueueMetadata message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueMetadata.verify|verify} messages. - * @param message TaskQueueMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ITaskQueueMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskQueueMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskQueueMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.TaskQueueMetadata; - - /** - * Decodes a TaskQueueMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskQueueMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.TaskQueueMetadata; - - /** - * Creates a TaskQueueMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskQueueMetadata - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.TaskQueueMetadata; - - /** - * Creates a plain object from a TaskQueueMetadata message. Also converts values to other types if specified. - * @param message TaskQueueMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.TaskQueueMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskQueueMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskQueueMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskQueueVersioningInfo. */ - interface ITaskQueueVersioningInfo { - - /** - * Specifies which Deployment Version should receive new workflow executions and tasks of - * existing unversioned or AutoUpgrade workflows. - * Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - * Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage - * is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`). - */ - currentDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** Deprecated. Use `current_deployment_version`. */ - currentVersion?: (string|null); - - /** - * When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version. - * Must always be different from `current_deployment_version` unless both are nil. - * Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - * Note that it is possible to ramp from one Version to another Version, or from unversioned - * workers to a particular Version, or from a particular Version to unversioned workers. - */ - rampingDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** Deprecated. Use `ramping_deployment_version`. */ - rampingVersion?: (string|null); - - /** - * Percentage of tasks that are routed to the Ramping Version instead of the Current Version. - * Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but - * not yet "promoted" to be the Current Version, likely due to pending validations. - * A 0% value means the Ramping Version is receiving no traffic. - */ - rampingVersionPercentage?: (number|null); - - /** Last time versioning information of this Task Queue changed. */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Experimental. Worker Deployments are experimental and might significantly change in the future. */ - class TaskQueueVersioningInfo implements ITaskQueueVersioningInfo { - - /** - * Constructs a new TaskQueueVersioningInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ITaskQueueVersioningInfo); - - /** - * Specifies which Deployment Version should receive new workflow executions and tasks of - * existing unversioned or AutoUpgrade workflows. - * Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - * Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage - * is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`). - */ - public currentDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** Deprecated. Use `current_deployment_version`. */ - public currentVersion: string; - - /** - * When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version. - * Must always be different from `current_deployment_version` unless both are nil. - * Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - * Note that it is possible to ramp from one Version to another Version, or from unversioned - * workers to a particular Version, or from a particular Version to unversioned workers. - */ - public rampingDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** Deprecated. Use `ramping_deployment_version`. */ - public rampingVersion: string; - - /** - * Percentage of tasks that are routed to the Ramping Version instead of the Current Version. - * Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but - * not yet "promoted" to be the Current Version, likely due to pending validations. - * A 0% value means the Ramping Version is receiving no traffic. - */ - public rampingVersionPercentage: number; - - /** Last time versioning information of this Task Queue changed. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new TaskQueueVersioningInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskQueueVersioningInfo instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ITaskQueueVersioningInfo): temporal.api.taskqueue.v1.TaskQueueVersioningInfo; - - /** - * Encodes the specified TaskQueueVersioningInfo message. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueVersioningInfo.verify|verify} messages. - * @param message TaskQueueVersioningInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ITaskQueueVersioningInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskQueueVersioningInfo message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueVersioningInfo.verify|verify} messages. - * @param message TaskQueueVersioningInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ITaskQueueVersioningInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskQueueVersioningInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskQueueVersioningInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.TaskQueueVersioningInfo; - - /** - * Decodes a TaskQueueVersioningInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskQueueVersioningInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.TaskQueueVersioningInfo; - - /** - * Creates a TaskQueueVersioningInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskQueueVersioningInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.TaskQueueVersioningInfo; - - /** - * Creates a plain object from a TaskQueueVersioningInfo message. Also converts values to other types if specified. - * @param message TaskQueueVersioningInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.TaskQueueVersioningInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskQueueVersioningInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskQueueVersioningInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskQueueVersionSelection. */ - interface ITaskQueueVersionSelection { - - /** Include specific Build IDs. */ - buildIds?: (string[]|null); - - /** Include the unversioned queue. */ - unversioned?: (boolean|null); - - /** - * Include all active versions. A version is considered active if, in the last few minutes, - * it has had new tasks or polls, or it has been the subject of certain task queue API calls. - */ - allActive?: (boolean|null); - } - - /** Used for specifying versions the caller is interested in. */ - class TaskQueueVersionSelection implements ITaskQueueVersionSelection { - - /** - * Constructs a new TaskQueueVersionSelection. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ITaskQueueVersionSelection); - - /** Include specific Build IDs. */ - public buildIds: string[]; - - /** Include the unversioned queue. */ - public unversioned: boolean; - - /** - * Include all active versions. A version is considered active if, in the last few minutes, - * it has had new tasks or polls, or it has been the subject of certain task queue API calls. - */ - public allActive: boolean; - - /** - * Creates a new TaskQueueVersionSelection instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskQueueVersionSelection instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ITaskQueueVersionSelection): temporal.api.taskqueue.v1.TaskQueueVersionSelection; - - /** - * Encodes the specified TaskQueueVersionSelection message. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueVersionSelection.verify|verify} messages. - * @param message TaskQueueVersionSelection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ITaskQueueVersionSelection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskQueueVersionSelection message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueVersionSelection.verify|verify} messages. - * @param message TaskQueueVersionSelection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ITaskQueueVersionSelection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskQueueVersionSelection message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskQueueVersionSelection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.TaskQueueVersionSelection; - - /** - * Decodes a TaskQueueVersionSelection message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskQueueVersionSelection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.TaskQueueVersionSelection; - - /** - * Creates a TaskQueueVersionSelection message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskQueueVersionSelection - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.TaskQueueVersionSelection; - - /** - * Creates a plain object from a TaskQueueVersionSelection message. Also converts values to other types if specified. - * @param message TaskQueueVersionSelection - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.TaskQueueVersionSelection, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskQueueVersionSelection to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskQueueVersionSelection - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskQueueVersionInfo. */ - interface ITaskQueueVersionInfo { - - /** Task Queue info per Task Type. Key is the numerical value of the temporal.api.enums.v1.TaskQueueType enum. */ - typesInfo?: ({ [k: string]: temporal.api.taskqueue.v1.ITaskQueueTypeInfo }|null); - - /** - * Task Reachability is eventually consistent; there may be a delay until it converges to the most - * accurate value but it is designed in a way to take the more conservative side until it converges. - * For example REACHABLE is more conservative than CLOSED_WORKFLOWS_ONLY. - * - * Note: future activities who inherit their workflow's Build ID but not its Task Queue will not be - * accounted for reachability as server cannot know if they'll happen as they do not use - * assignment rules of their Task Queue. Same goes for Child Workflows or Continue-As-New Workflows - * who inherit the parent/previous workflow's Build ID but not its Task Queue. In those cases, make - * sure to query reachability for the parent/previous workflow's Task Queue as well. - */ - taskReachability?: (temporal.api.enums.v1.BuildIdTaskReachability|null); - } - - /** Represents a TaskQueueVersionInfo. */ - class TaskQueueVersionInfo implements ITaskQueueVersionInfo { - - /** - * Constructs a new TaskQueueVersionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ITaskQueueVersionInfo); - - /** Task Queue info per Task Type. Key is the numerical value of the temporal.api.enums.v1.TaskQueueType enum. */ - public typesInfo: { [k: string]: temporal.api.taskqueue.v1.ITaskQueueTypeInfo }; - - /** - * Task Reachability is eventually consistent; there may be a delay until it converges to the most - * accurate value but it is designed in a way to take the more conservative side until it converges. - * For example REACHABLE is more conservative than CLOSED_WORKFLOWS_ONLY. - * - * Note: future activities who inherit their workflow's Build ID but not its Task Queue will not be - * accounted for reachability as server cannot know if they'll happen as they do not use - * assignment rules of their Task Queue. Same goes for Child Workflows or Continue-As-New Workflows - * who inherit the parent/previous workflow's Build ID but not its Task Queue. In those cases, make - * sure to query reachability for the parent/previous workflow's Task Queue as well. - */ - public taskReachability: temporal.api.enums.v1.BuildIdTaskReachability; - - /** - * Creates a new TaskQueueVersionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskQueueVersionInfo instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ITaskQueueVersionInfo): temporal.api.taskqueue.v1.TaskQueueVersionInfo; - - /** - * Encodes the specified TaskQueueVersionInfo message. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueVersionInfo.verify|verify} messages. - * @param message TaskQueueVersionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ITaskQueueVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskQueueVersionInfo message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueVersionInfo.verify|verify} messages. - * @param message TaskQueueVersionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ITaskQueueVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskQueueVersionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskQueueVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.TaskQueueVersionInfo; - - /** - * Decodes a TaskQueueVersionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskQueueVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.TaskQueueVersionInfo; - - /** - * Creates a TaskQueueVersionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskQueueVersionInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.TaskQueueVersionInfo; - - /** - * Creates a plain object from a TaskQueueVersionInfo message. Also converts values to other types if specified. - * @param message TaskQueueVersionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.TaskQueueVersionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskQueueVersionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskQueueVersionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskQueueTypeInfo. */ - interface ITaskQueueTypeInfo { - - /** Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID. */ - pollers?: (temporal.api.taskqueue.v1.IPollerInfo[]|null); - - /** TaskQueueTypeInfo stats */ - stats?: (temporal.api.taskqueue.v1.ITaskQueueStats|null); - } - - /** Represents a TaskQueueTypeInfo. */ - class TaskQueueTypeInfo implements ITaskQueueTypeInfo { - - /** - * Constructs a new TaskQueueTypeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ITaskQueueTypeInfo); - - /** Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID. */ - public pollers: temporal.api.taskqueue.v1.IPollerInfo[]; - - /** TaskQueueTypeInfo stats. */ - public stats?: (temporal.api.taskqueue.v1.ITaskQueueStats|null); - - /** - * Creates a new TaskQueueTypeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskQueueTypeInfo instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ITaskQueueTypeInfo): temporal.api.taskqueue.v1.TaskQueueTypeInfo; - - /** - * Encodes the specified TaskQueueTypeInfo message. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueTypeInfo.verify|verify} messages. - * @param message TaskQueueTypeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ITaskQueueTypeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskQueueTypeInfo message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueTypeInfo.verify|verify} messages. - * @param message TaskQueueTypeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ITaskQueueTypeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskQueueTypeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskQueueTypeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.TaskQueueTypeInfo; - - /** - * Decodes a TaskQueueTypeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskQueueTypeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.TaskQueueTypeInfo; - - /** - * Creates a TaskQueueTypeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskQueueTypeInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.TaskQueueTypeInfo; - - /** - * Creates a plain object from a TaskQueueTypeInfo message. Also converts values to other types if specified. - * @param message TaskQueueTypeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.TaskQueueTypeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskQueueTypeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskQueueTypeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskQueueStats. */ - interface ITaskQueueStats { - - /** - * The approximate number of tasks backlogged in this task queue. May count expired tasks but eventually - * converges to the right value. Can be relied upon for scaling decisions. - * - * Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because - * those tasks only remain valid for a few seconds, the inaccuracy becomes less significant as the backlog size - * grows. - */ - approximateBacklogCount?: (Long|null); - - /** - * Approximate age of the oldest task in the backlog based on the creation time of the task at the head of - * the queue. Can be relied upon for scaling decisions. - * - * Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because - * those tasks only remain valid for a few seconds, they should not affect the result when backlog is older than - * few seconds. - */ - approximateBacklogAge?: (google.protobuf.IDuration|null); - - /** - * The approximate tasks per second added to the task queue, averaging the last 30 seconds. These includes tasks - * whether or not they were added to/dispatched from the backlog or they were dispatched immediately without going - * to the backlog (sync-matched). - * - * The difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which - * backlog grows/shrinks. - * - * Note: the actual tasks delivered to the workers may significantly be higher than the numbers reported by - * tasks_add_rate, because: - * - Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is - * enable for activities by default in the latest SDKs. - * - Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each - * workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific - * worker instance. - */ - tasksAddRate?: (number|null); - - /** - * The approximate tasks per second dispatched from the task queue, averaging the last 30 seconds. These includes - * tasks whether or not they were added to/dispatched from the backlog or they were dispatched immediately without - * going to the backlog (sync-matched). - * - * The difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which - * backlog grows/shrinks. - * - * Note: the actual tasks delivered to the workers may significantly be higher than the numbers reported by - * tasks_dispatch_rate, because: - * - Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is - * enable for activities by default in the latest SDKs. - * - Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each - * workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific - * worker instance. - */ - tasksDispatchRate?: (number|null); - } - - /** - * TaskQueueStats contains statistics about task queue backlog and activity. - * - * For workflow task queue type, this result is partial because tasks sent to sticky queues are not included. Read - * comments above each metric to understand the impact of sticky queue exclusion on that metric accuracy. - */ - class TaskQueueStats implements ITaskQueueStats { - - /** - * Constructs a new TaskQueueStats. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ITaskQueueStats); - - /** - * The approximate number of tasks backlogged in this task queue. May count expired tasks but eventually - * converges to the right value. Can be relied upon for scaling decisions. - * - * Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because - * those tasks only remain valid for a few seconds, the inaccuracy becomes less significant as the backlog size - * grows. - */ - public approximateBacklogCount: Long; - - /** - * Approximate age of the oldest task in the backlog based on the creation time of the task at the head of - * the queue. Can be relied upon for scaling decisions. - * - * Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because - * those tasks only remain valid for a few seconds, they should not affect the result when backlog is older than - * few seconds. - */ - public approximateBacklogAge?: (google.protobuf.IDuration|null); - - /** - * The approximate tasks per second added to the task queue, averaging the last 30 seconds. These includes tasks - * whether or not they were added to/dispatched from the backlog or they were dispatched immediately without going - * to the backlog (sync-matched). - * - * The difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which - * backlog grows/shrinks. - * - * Note: the actual tasks delivered to the workers may significantly be higher than the numbers reported by - * tasks_add_rate, because: - * - Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is - * enable for activities by default in the latest SDKs. - * - Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each - * workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific - * worker instance. - */ - public tasksAddRate: number; - - /** - * The approximate tasks per second dispatched from the task queue, averaging the last 30 seconds. These includes - * tasks whether or not they were added to/dispatched from the backlog or they were dispatched immediately without - * going to the backlog (sync-matched). - * - * The difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which - * backlog grows/shrinks. - * - * Note: the actual tasks delivered to the workers may significantly be higher than the numbers reported by - * tasks_dispatch_rate, because: - * - Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is - * enable for activities by default in the latest SDKs. - * - Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each - * workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific - * worker instance. - */ - public tasksDispatchRate: number; - - /** - * Creates a new TaskQueueStats instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskQueueStats instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ITaskQueueStats): temporal.api.taskqueue.v1.TaskQueueStats; - - /** - * Encodes the specified TaskQueueStats message. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueStats.verify|verify} messages. - * @param message TaskQueueStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ITaskQueueStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskQueueStats message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueStats.verify|verify} messages. - * @param message TaskQueueStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ITaskQueueStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskQueueStats message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskQueueStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.TaskQueueStats; - - /** - * Decodes a TaskQueueStats message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskQueueStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.TaskQueueStats; - - /** - * Creates a TaskQueueStats message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskQueueStats - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.TaskQueueStats; - - /** - * Creates a plain object from a TaskQueueStats message. Also converts values to other types if specified. - * @param message TaskQueueStats - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.TaskQueueStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskQueueStats to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskQueueStats - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskQueueStatus. */ - interface ITaskQueueStatus { - - /** TaskQueueStatus backlogCountHint */ - backlogCountHint?: (Long|null); - - /** TaskQueueStatus readLevel */ - readLevel?: (Long|null); - - /** TaskQueueStatus ackLevel */ - ackLevel?: (Long|null); - - /** TaskQueueStatus ratePerSecond */ - ratePerSecond?: (number|null); - - /** TaskQueueStatus taskIdBlock */ - taskIdBlock?: (temporal.api.taskqueue.v1.ITaskIdBlock|null); - } - - /** Deprecated. Use `InternalTaskQueueStatus`. This is kept until `DescribeTaskQueue` supports legacy behavior. */ - class TaskQueueStatus implements ITaskQueueStatus { - - /** - * Constructs a new TaskQueueStatus. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ITaskQueueStatus); - - /** TaskQueueStatus backlogCountHint. */ - public backlogCountHint: Long; - - /** TaskQueueStatus readLevel. */ - public readLevel: Long; - - /** TaskQueueStatus ackLevel. */ - public ackLevel: Long; - - /** TaskQueueStatus ratePerSecond. */ - public ratePerSecond: number; - - /** TaskQueueStatus taskIdBlock. */ - public taskIdBlock?: (temporal.api.taskqueue.v1.ITaskIdBlock|null); - - /** - * Creates a new TaskQueueStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskQueueStatus instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ITaskQueueStatus): temporal.api.taskqueue.v1.TaskQueueStatus; - - /** - * Encodes the specified TaskQueueStatus message. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueStatus.verify|verify} messages. - * @param message TaskQueueStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ITaskQueueStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskQueueStatus message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueStatus.verify|verify} messages. - * @param message TaskQueueStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ITaskQueueStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskQueueStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskQueueStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.TaskQueueStatus; - - /** - * Decodes a TaskQueueStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskQueueStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.TaskQueueStatus; - - /** - * Creates a TaskQueueStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskQueueStatus - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.TaskQueueStatus; - - /** - * Creates a plain object from a TaskQueueStatus message. Also converts values to other types if specified. - * @param message TaskQueueStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.TaskQueueStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskQueueStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskQueueStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskIdBlock. */ - interface ITaskIdBlock { - - /** TaskIdBlock startId */ - startId?: (Long|null); - - /** TaskIdBlock endId */ - endId?: (Long|null); - } - - /** Represents a TaskIdBlock. */ - class TaskIdBlock implements ITaskIdBlock { - - /** - * Constructs a new TaskIdBlock. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ITaskIdBlock); - - /** TaskIdBlock startId. */ - public startId: Long; - - /** TaskIdBlock endId. */ - public endId: Long; - - /** - * Creates a new TaskIdBlock instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskIdBlock instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ITaskIdBlock): temporal.api.taskqueue.v1.TaskIdBlock; - - /** - * Encodes the specified TaskIdBlock message. Does not implicitly {@link temporal.api.taskqueue.v1.TaskIdBlock.verify|verify} messages. - * @param message TaskIdBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ITaskIdBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskIdBlock message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.TaskIdBlock.verify|verify} messages. - * @param message TaskIdBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ITaskIdBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskIdBlock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskIdBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.TaskIdBlock; - - /** - * Decodes a TaskIdBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskIdBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.TaskIdBlock; - - /** - * Creates a TaskIdBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskIdBlock - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.TaskIdBlock; - - /** - * Creates a plain object from a TaskIdBlock message. Also converts values to other types if specified. - * @param message TaskIdBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.TaskIdBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskIdBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskIdBlock - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskQueuePartitionMetadata. */ - interface ITaskQueuePartitionMetadata { - - /** TaskQueuePartitionMetadata key */ - key?: (string|null); - - /** TaskQueuePartitionMetadata ownerHostName */ - ownerHostName?: (string|null); - } - - /** Represents a TaskQueuePartitionMetadata. */ - class TaskQueuePartitionMetadata implements ITaskQueuePartitionMetadata { - - /** - * Constructs a new TaskQueuePartitionMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ITaskQueuePartitionMetadata); - - /** TaskQueuePartitionMetadata key. */ - public key: string; - - /** TaskQueuePartitionMetadata ownerHostName. */ - public ownerHostName: string; - - /** - * Creates a new TaskQueuePartitionMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskQueuePartitionMetadata instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ITaskQueuePartitionMetadata): temporal.api.taskqueue.v1.TaskQueuePartitionMetadata; - - /** - * Encodes the specified TaskQueuePartitionMetadata message. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueuePartitionMetadata.verify|verify} messages. - * @param message TaskQueuePartitionMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ITaskQueuePartitionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskQueuePartitionMetadata message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueuePartitionMetadata.verify|verify} messages. - * @param message TaskQueuePartitionMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ITaskQueuePartitionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskQueuePartitionMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskQueuePartitionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.TaskQueuePartitionMetadata; - - /** - * Decodes a TaskQueuePartitionMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskQueuePartitionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.TaskQueuePartitionMetadata; - - /** - * Creates a TaskQueuePartitionMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskQueuePartitionMetadata - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.TaskQueuePartitionMetadata; - - /** - * Creates a plain object from a TaskQueuePartitionMetadata message. Also converts values to other types if specified. - * @param message TaskQueuePartitionMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.TaskQueuePartitionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskQueuePartitionMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskQueuePartitionMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollerInfo. */ - interface IPollerInfo { - - /** PollerInfo lastAccessTime */ - lastAccessTime?: (google.protobuf.ITimestamp|null); - - /** PollerInfo identity */ - identity?: (string|null); - - /** PollerInfo ratePerSecond */ - ratePerSecond?: (number|null); - - /** - * If a worker has opted into the worker versioning feature while polling, its capabilities will - * appear here. - * Deprecated. Replaced by deployment_options. - */ - workerVersionCapabilities?: (temporal.api.common.v1.IWorkerVersionCapabilities|null); - - /** Worker deployment options that SDK sent to server. */ - deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - } - - /** Represents a PollerInfo. */ - class PollerInfo implements IPollerInfo { - - /** - * Constructs a new PollerInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.IPollerInfo); - - /** PollerInfo lastAccessTime. */ - public lastAccessTime?: (google.protobuf.ITimestamp|null); - - /** PollerInfo identity. */ - public identity: string; - - /** PollerInfo ratePerSecond. */ - public ratePerSecond: number; - - /** - * If a worker has opted into the worker versioning feature while polling, its capabilities will - * appear here. - * Deprecated. Replaced by deployment_options. - */ - public workerVersionCapabilities?: (temporal.api.common.v1.IWorkerVersionCapabilities|null); - - /** Worker deployment options that SDK sent to server. */ - public deploymentOptions?: (temporal.api.deployment.v1.IWorkerDeploymentOptions|null); - - /** - * Creates a new PollerInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns PollerInfo instance - */ - public static create(properties?: temporal.api.taskqueue.v1.IPollerInfo): temporal.api.taskqueue.v1.PollerInfo; - - /** - * Encodes the specified PollerInfo message. Does not implicitly {@link temporal.api.taskqueue.v1.PollerInfo.verify|verify} messages. - * @param message PollerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.IPollerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollerInfo message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.PollerInfo.verify|verify} messages. - * @param message PollerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.IPollerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollerInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.PollerInfo; - - /** - * Decodes a PollerInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.PollerInfo; - - /** - * Creates a PollerInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollerInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.PollerInfo; - - /** - * Creates a plain object from a PollerInfo message. Also converts values to other types if specified. - * @param message PollerInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.PollerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollerInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollerInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StickyExecutionAttributes. */ - interface IStickyExecutionAttributes { - - /** StickyExecutionAttributes workerTaskQueue */ - workerTaskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToStartTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a StickyExecutionAttributes. */ - class StickyExecutionAttributes implements IStickyExecutionAttributes { - - /** - * Constructs a new StickyExecutionAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.IStickyExecutionAttributes); - - /** StickyExecutionAttributes workerTaskQueue. */ - public workerTaskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new StickyExecutionAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns StickyExecutionAttributes instance - */ - public static create(properties?: temporal.api.taskqueue.v1.IStickyExecutionAttributes): temporal.api.taskqueue.v1.StickyExecutionAttributes; - - /** - * Encodes the specified StickyExecutionAttributes message. Does not implicitly {@link temporal.api.taskqueue.v1.StickyExecutionAttributes.verify|verify} messages. - * @param message StickyExecutionAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.IStickyExecutionAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StickyExecutionAttributes message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.StickyExecutionAttributes.verify|verify} messages. - * @param message StickyExecutionAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.IStickyExecutionAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StickyExecutionAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StickyExecutionAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.StickyExecutionAttributes; - - /** - * Decodes a StickyExecutionAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StickyExecutionAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.StickyExecutionAttributes; - - /** - * Creates a StickyExecutionAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StickyExecutionAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.StickyExecutionAttributes; - - /** - * Creates a plain object from a StickyExecutionAttributes message. Also converts values to other types if specified. - * @param message StickyExecutionAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.StickyExecutionAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StickyExecutionAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StickyExecutionAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CompatibleVersionSet. */ - interface ICompatibleVersionSet { - - /** All the compatible versions, unordered, except for the last element, which is considered the set "default". */ - buildIds?: (string[]|null); - } - - /** - * Used by the worker versioning APIs, represents an unordered set of one or more versions which are - * considered to be compatible with each other. Currently the versions are always worker build IDs. - */ - class CompatibleVersionSet implements ICompatibleVersionSet { - - /** - * Constructs a new CompatibleVersionSet. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ICompatibleVersionSet); - - /** All the compatible versions, unordered, except for the last element, which is considered the set "default". */ - public buildIds: string[]; - - /** - * Creates a new CompatibleVersionSet instance using the specified properties. - * @param [properties] Properties to set - * @returns CompatibleVersionSet instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ICompatibleVersionSet): temporal.api.taskqueue.v1.CompatibleVersionSet; - - /** - * Encodes the specified CompatibleVersionSet message. Does not implicitly {@link temporal.api.taskqueue.v1.CompatibleVersionSet.verify|verify} messages. - * @param message CompatibleVersionSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ICompatibleVersionSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompatibleVersionSet message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.CompatibleVersionSet.verify|verify} messages. - * @param message CompatibleVersionSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ICompatibleVersionSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompatibleVersionSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompatibleVersionSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.CompatibleVersionSet; - - /** - * Decodes a CompatibleVersionSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompatibleVersionSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.CompatibleVersionSet; - - /** - * Creates a CompatibleVersionSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompatibleVersionSet - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.CompatibleVersionSet; - - /** - * Creates a plain object from a CompatibleVersionSet message. Also converts values to other types if specified. - * @param message CompatibleVersionSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.CompatibleVersionSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompatibleVersionSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CompatibleVersionSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskQueueReachability. */ - interface ITaskQueueReachability { - - /** TaskQueueReachability taskQueue */ - taskQueue?: (string|null); - - /** - * Task reachability for a worker in a single task queue. - * See the TaskReachability docstring for information about each enum variant. - * If reachability is empty, this worker is considered unreachable in this task queue. - */ - reachability?: (temporal.api.enums.v1.TaskReachability[]|null); - } - - /** Reachability of tasks for a worker on a single task queue. */ - class TaskQueueReachability implements ITaskQueueReachability { - - /** - * Constructs a new TaskQueueReachability. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ITaskQueueReachability); - - /** TaskQueueReachability taskQueue. */ - public taskQueue: string; - - /** - * Task reachability for a worker in a single task queue. - * See the TaskReachability docstring for information about each enum variant. - * If reachability is empty, this worker is considered unreachable in this task queue. - */ - public reachability: temporal.api.enums.v1.TaskReachability[]; - - /** - * Creates a new TaskQueueReachability instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskQueueReachability instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ITaskQueueReachability): temporal.api.taskqueue.v1.TaskQueueReachability; - - /** - * Encodes the specified TaskQueueReachability message. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueReachability.verify|verify} messages. - * @param message TaskQueueReachability message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ITaskQueueReachability, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskQueueReachability message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueReachability.verify|verify} messages. - * @param message TaskQueueReachability message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ITaskQueueReachability, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskQueueReachability message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskQueueReachability - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.TaskQueueReachability; - - /** - * Decodes a TaskQueueReachability message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskQueueReachability - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.TaskQueueReachability; - - /** - * Creates a TaskQueueReachability message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskQueueReachability - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.TaskQueueReachability; - - /** - * Creates a plain object from a TaskQueueReachability message. Also converts values to other types if specified. - * @param message TaskQueueReachability - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.TaskQueueReachability, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskQueueReachability to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskQueueReachability - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BuildIdReachability. */ - interface IBuildIdReachability { - - /** A build id or empty if unversioned. */ - buildId?: (string|null); - - /** Reachability per task queue. */ - taskQueueReachability?: (temporal.api.taskqueue.v1.ITaskQueueReachability[]|null); - } - - /** Reachability of tasks for a worker by build id, in one or more task queues. */ - class BuildIdReachability implements IBuildIdReachability { - - /** - * Constructs a new BuildIdReachability. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.IBuildIdReachability); - - /** A build id or empty if unversioned. */ - public buildId: string; - - /** Reachability per task queue. */ - public taskQueueReachability: temporal.api.taskqueue.v1.ITaskQueueReachability[]; - - /** - * Creates a new BuildIdReachability instance using the specified properties. - * @param [properties] Properties to set - * @returns BuildIdReachability instance - */ - public static create(properties?: temporal.api.taskqueue.v1.IBuildIdReachability): temporal.api.taskqueue.v1.BuildIdReachability; - - /** - * Encodes the specified BuildIdReachability message. Does not implicitly {@link temporal.api.taskqueue.v1.BuildIdReachability.verify|verify} messages. - * @param message BuildIdReachability message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.IBuildIdReachability, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BuildIdReachability message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.BuildIdReachability.verify|verify} messages. - * @param message BuildIdReachability message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.IBuildIdReachability, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BuildIdReachability message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BuildIdReachability - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.BuildIdReachability; - - /** - * Decodes a BuildIdReachability message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BuildIdReachability - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.BuildIdReachability; - - /** - * Creates a BuildIdReachability message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BuildIdReachability - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.BuildIdReachability; - - /** - * Creates a plain object from a BuildIdReachability message. Also converts values to other types if specified. - * @param message BuildIdReachability - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.BuildIdReachability, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BuildIdReachability to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BuildIdReachability - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RampByPercentage. */ - interface IRampByPercentage { - - /** Acceptable range is [0,100). */ - rampPercentage?: (number|null); - } - - /** Represents a RampByPercentage. */ - class RampByPercentage implements IRampByPercentage { - - /** - * Constructs a new RampByPercentage. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.IRampByPercentage); - - /** Acceptable range is [0,100). */ - public rampPercentage: number; - - /** - * Creates a new RampByPercentage instance using the specified properties. - * @param [properties] Properties to set - * @returns RampByPercentage instance - */ - public static create(properties?: temporal.api.taskqueue.v1.IRampByPercentage): temporal.api.taskqueue.v1.RampByPercentage; - - /** - * Encodes the specified RampByPercentage message. Does not implicitly {@link temporal.api.taskqueue.v1.RampByPercentage.verify|verify} messages. - * @param message RampByPercentage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.IRampByPercentage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RampByPercentage message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.RampByPercentage.verify|verify} messages. - * @param message RampByPercentage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.IRampByPercentage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RampByPercentage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RampByPercentage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.RampByPercentage; - - /** - * Decodes a RampByPercentage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RampByPercentage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.RampByPercentage; - - /** - * Creates a RampByPercentage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RampByPercentage - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.RampByPercentage; - - /** - * Creates a plain object from a RampByPercentage message. Also converts values to other types if specified. - * @param message RampByPercentage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.RampByPercentage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RampByPercentage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RampByPercentage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BuildIdAssignmentRule. */ - interface IBuildIdAssignmentRule { - - /** BuildIdAssignmentRule targetBuildId */ - targetBuildId?: (string|null); - - /** - * This ramp is useful for gradual Blue/Green deployments (and similar) - * where you want to send a certain portion of the traffic to the target - * Build ID. - */ - percentageRamp?: (temporal.api.taskqueue.v1.IRampByPercentage|null); - } - - /** - * Assignment rules are applied to *new* Workflow and Activity executions at - * schedule time to assign them to a Build ID. - * - * Assignment rules will not be used in the following cases: - * - Child Workflows or Continue-As-New Executions who inherit their - * parent/previous Workflow's assigned Build ID (by setting the - * `inherit_build_id` flag - default behavior in SDKs when the same Task Queue - * is used.) - * - An Activity that inherits the assigned Build ID of its Workflow (by - * setting the `use_workflow_build_id` flag - default behavior in SDKs - * when the same Task Queue is used.) - * - * In absence of (applicable) redirect rules (`CompatibleBuildIdRedirectRule`s) - * the task will be dispatched to Workers of the Build ID determined by the - * assignment rules (or inherited). Otherwise, the final Build ID will be - * determined by the redirect rules. - * - * Once a Workflow completes its first Workflow Task in a particular Build ID it - * stays in that Build ID regardless of changes to assignment rules. Redirect - * rules can be used to move the workflow to another compatible Build ID. - * - * When using Worker Versioning on a Task Queue, in the steady state, - * there should typically be a single assignment rule to send all new executions - * to the latest Build ID. Existence of at least one such "unconditional" - * rule at all times is enforces by the system, unless the `force` flag is used - * by the user when replacing/deleting these rules (for exceptional cases). - * - * During a deployment, one or more additional rules can be added to assign a - * subset of the tasks to a new Build ID based on a "ramp percentage". - * - * When there are multiple assignment rules for a Task Queue, the rules are - * evaluated in order, starting from index 0. The first applicable rule will be - * applied and the rest will be ignored. - * - * In the event that no assignment rule is applicable on a task (or the Task - * Queue is simply not versioned), the tasks will be dispatched to an - * unversioned Worker. - */ - class BuildIdAssignmentRule implements IBuildIdAssignmentRule { - - /** - * Constructs a new BuildIdAssignmentRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.IBuildIdAssignmentRule); - - /** BuildIdAssignmentRule targetBuildId. */ - public targetBuildId: string; - - /** - * This ramp is useful for gradual Blue/Green deployments (and similar) - * where you want to send a certain portion of the traffic to the target - * Build ID. - */ - public percentageRamp?: (temporal.api.taskqueue.v1.IRampByPercentage|null); - - /** - * If a ramp is provided, this rule will be applied only to a sample of - * tasks according to the provided percentage. - * This option can be used only on "terminal" Build IDs (the ones not used - * as source in any redirect rules). - */ - public ramp?: "percentageRamp"; - - /** - * Creates a new BuildIdAssignmentRule instance using the specified properties. - * @param [properties] Properties to set - * @returns BuildIdAssignmentRule instance - */ - public static create(properties?: temporal.api.taskqueue.v1.IBuildIdAssignmentRule): temporal.api.taskqueue.v1.BuildIdAssignmentRule; - - /** - * Encodes the specified BuildIdAssignmentRule message. Does not implicitly {@link temporal.api.taskqueue.v1.BuildIdAssignmentRule.verify|verify} messages. - * @param message BuildIdAssignmentRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.IBuildIdAssignmentRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BuildIdAssignmentRule message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.BuildIdAssignmentRule.verify|verify} messages. - * @param message BuildIdAssignmentRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.IBuildIdAssignmentRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BuildIdAssignmentRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BuildIdAssignmentRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.BuildIdAssignmentRule; - - /** - * Decodes a BuildIdAssignmentRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BuildIdAssignmentRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.BuildIdAssignmentRule; - - /** - * Creates a BuildIdAssignmentRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BuildIdAssignmentRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.BuildIdAssignmentRule; - - /** - * Creates a plain object from a BuildIdAssignmentRule message. Also converts values to other types if specified. - * @param message BuildIdAssignmentRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.BuildIdAssignmentRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BuildIdAssignmentRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BuildIdAssignmentRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CompatibleBuildIdRedirectRule. */ - interface ICompatibleBuildIdRedirectRule { - - /** CompatibleBuildIdRedirectRule sourceBuildId */ - sourceBuildId?: (string|null); - - /** - * Target Build ID must be compatible with the Source Build ID; that is it - * must be able to process event histories made by the Source Build ID by - * using [Patching](https://docs.temporal.io/workflows#patching) or other - * means. - */ - targetBuildId?: (string|null); - } - - /** - * These rules apply to tasks assigned to a particular Build ID - * (`source_build_id`) to redirect them to another *compatible* Build ID - * (`target_build_id`). - * - * It is user's responsibility to ensure that the target Build ID is compatible - * with the source Build ID (e.g. by using the Patching API). - * - * Most deployments are not expected to need these rules, however following - * situations can greatly benefit from redirects: - * - Need to move long-running Workflow Executions from an old Build ID to a - * newer one. - * - Need to hotfix some broken or stuck Workflow Executions. - * - * In steady state, redirect rules are beneficial when dealing with old - * Executions ran on now-decommissioned Build IDs: - * - To redirecting the Workflow Queries to the current (compatible) Build ID. - * - To be able to Reset an old Execution so it can run on the current - * (compatible) Build ID. - * - * Redirect rules can be chained. - */ - class CompatibleBuildIdRedirectRule implements ICompatibleBuildIdRedirectRule { - - /** - * Constructs a new CompatibleBuildIdRedirectRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ICompatibleBuildIdRedirectRule); - - /** CompatibleBuildIdRedirectRule sourceBuildId. */ - public sourceBuildId: string; - - /** - * Target Build ID must be compatible with the Source Build ID; that is it - * must be able to process event histories made by the Source Build ID by - * using [Patching](https://docs.temporal.io/workflows#patching) or other - * means. - */ - public targetBuildId: string; - - /** - * Creates a new CompatibleBuildIdRedirectRule instance using the specified properties. - * @param [properties] Properties to set - * @returns CompatibleBuildIdRedirectRule instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ICompatibleBuildIdRedirectRule): temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule; - - /** - * Encodes the specified CompatibleBuildIdRedirectRule message. Does not implicitly {@link temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule.verify|verify} messages. - * @param message CompatibleBuildIdRedirectRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ICompatibleBuildIdRedirectRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompatibleBuildIdRedirectRule message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule.verify|verify} messages. - * @param message CompatibleBuildIdRedirectRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ICompatibleBuildIdRedirectRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompatibleBuildIdRedirectRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompatibleBuildIdRedirectRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule; - - /** - * Decodes a CompatibleBuildIdRedirectRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompatibleBuildIdRedirectRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule; - - /** - * Creates a CompatibleBuildIdRedirectRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompatibleBuildIdRedirectRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule; - - /** - * Creates a plain object from a CompatibleBuildIdRedirectRule message. Also converts values to other types if specified. - * @param message CompatibleBuildIdRedirectRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompatibleBuildIdRedirectRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CompatibleBuildIdRedirectRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TimestampedBuildIdAssignmentRule. */ - interface ITimestampedBuildIdAssignmentRule { - - /** TimestampedBuildIdAssignmentRule rule */ - rule?: (temporal.api.taskqueue.v1.IBuildIdAssignmentRule|null); - - /** TimestampedBuildIdAssignmentRule createTime */ - createTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a TimestampedBuildIdAssignmentRule. */ - class TimestampedBuildIdAssignmentRule implements ITimestampedBuildIdAssignmentRule { - - /** - * Constructs a new TimestampedBuildIdAssignmentRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ITimestampedBuildIdAssignmentRule); - - /** TimestampedBuildIdAssignmentRule rule. */ - public rule?: (temporal.api.taskqueue.v1.IBuildIdAssignmentRule|null); - - /** TimestampedBuildIdAssignmentRule createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new TimestampedBuildIdAssignmentRule instance using the specified properties. - * @param [properties] Properties to set - * @returns TimestampedBuildIdAssignmentRule instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ITimestampedBuildIdAssignmentRule): temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule; - - /** - * Encodes the specified TimestampedBuildIdAssignmentRule message. Does not implicitly {@link temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule.verify|verify} messages. - * @param message TimestampedBuildIdAssignmentRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ITimestampedBuildIdAssignmentRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimestampedBuildIdAssignmentRule message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule.verify|verify} messages. - * @param message TimestampedBuildIdAssignmentRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ITimestampedBuildIdAssignmentRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimestampedBuildIdAssignmentRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimestampedBuildIdAssignmentRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule; - - /** - * Decodes a TimestampedBuildIdAssignmentRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimestampedBuildIdAssignmentRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule; - - /** - * Creates a TimestampedBuildIdAssignmentRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimestampedBuildIdAssignmentRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule; - - /** - * Creates a plain object from a TimestampedBuildIdAssignmentRule message. Also converts values to other types if specified. - * @param message TimestampedBuildIdAssignmentRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimestampedBuildIdAssignmentRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TimestampedBuildIdAssignmentRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TimestampedCompatibleBuildIdRedirectRule. */ - interface ITimestampedCompatibleBuildIdRedirectRule { - - /** TimestampedCompatibleBuildIdRedirectRule rule */ - rule?: (temporal.api.taskqueue.v1.ICompatibleBuildIdRedirectRule|null); - - /** TimestampedCompatibleBuildIdRedirectRule createTime */ - createTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a TimestampedCompatibleBuildIdRedirectRule. */ - class TimestampedCompatibleBuildIdRedirectRule implements ITimestampedCompatibleBuildIdRedirectRule { - - /** - * Constructs a new TimestampedCompatibleBuildIdRedirectRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ITimestampedCompatibleBuildIdRedirectRule); - - /** TimestampedCompatibleBuildIdRedirectRule rule. */ - public rule?: (temporal.api.taskqueue.v1.ICompatibleBuildIdRedirectRule|null); - - /** TimestampedCompatibleBuildIdRedirectRule createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new TimestampedCompatibleBuildIdRedirectRule instance using the specified properties. - * @param [properties] Properties to set - * @returns TimestampedCompatibleBuildIdRedirectRule instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ITimestampedCompatibleBuildIdRedirectRule): temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule; - - /** - * Encodes the specified TimestampedCompatibleBuildIdRedirectRule message. Does not implicitly {@link temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule.verify|verify} messages. - * @param message TimestampedCompatibleBuildIdRedirectRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ITimestampedCompatibleBuildIdRedirectRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimestampedCompatibleBuildIdRedirectRule message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule.verify|verify} messages. - * @param message TimestampedCompatibleBuildIdRedirectRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ITimestampedCompatibleBuildIdRedirectRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimestampedCompatibleBuildIdRedirectRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimestampedCompatibleBuildIdRedirectRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule; - - /** - * Decodes a TimestampedCompatibleBuildIdRedirectRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimestampedCompatibleBuildIdRedirectRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule; - - /** - * Creates a TimestampedCompatibleBuildIdRedirectRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimestampedCompatibleBuildIdRedirectRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule; - - /** - * Creates a plain object from a TimestampedCompatibleBuildIdRedirectRule message. Also converts values to other types if specified. - * @param message TimestampedCompatibleBuildIdRedirectRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimestampedCompatibleBuildIdRedirectRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TimestampedCompatibleBuildIdRedirectRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollerScalingDecision. */ - interface IPollerScalingDecision { - - /** - * How many poll requests to suggest should be added or removed, if any. As of now, server only - * scales up or down by 1. However, SDKs should allow for other values (while staying within - * defined min/max). - * - * The SDK is free to ignore this suggestion, EX: making more polls would not make sense because - * all slots are already occupied. - */ - pollRequestDeltaSuggestion?: (number|null); - } - - /** - * Attached to task responses to give hints to the SDK about how it may adjust its number of - * pollers. - */ - class PollerScalingDecision implements IPollerScalingDecision { - - /** - * Constructs a new PollerScalingDecision. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.IPollerScalingDecision); - - /** - * How many poll requests to suggest should be added or removed, if any. As of now, server only - * scales up or down by 1. However, SDKs should allow for other values (while staying within - * defined min/max). - * - * The SDK is free to ignore this suggestion, EX: making more polls would not make sense because - * all slots are already occupied. - */ - public pollRequestDeltaSuggestion: number; - - /** - * Creates a new PollerScalingDecision instance using the specified properties. - * @param [properties] Properties to set - * @returns PollerScalingDecision instance - */ - public static create(properties?: temporal.api.taskqueue.v1.IPollerScalingDecision): temporal.api.taskqueue.v1.PollerScalingDecision; - - /** - * Encodes the specified PollerScalingDecision message. Does not implicitly {@link temporal.api.taskqueue.v1.PollerScalingDecision.verify|verify} messages. - * @param message PollerScalingDecision message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.IPollerScalingDecision, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollerScalingDecision message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.PollerScalingDecision.verify|verify} messages. - * @param message PollerScalingDecision message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.IPollerScalingDecision, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollerScalingDecision message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollerScalingDecision - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.PollerScalingDecision; - - /** - * Decodes a PollerScalingDecision message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollerScalingDecision - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.PollerScalingDecision; - - /** - * Creates a PollerScalingDecision message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollerScalingDecision - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.PollerScalingDecision; - - /** - * Creates a plain object from a PollerScalingDecision message. Also converts values to other types if specified. - * @param message PollerScalingDecision - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.PollerScalingDecision, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollerScalingDecision to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollerScalingDecision - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RateLimit. */ - interface IRateLimit { - - /** Zero is a valid rate limit. */ - requestsPerSecond?: (number|null); - } - - /** Represents a RateLimit. */ - class RateLimit implements IRateLimit { - - /** - * Constructs a new RateLimit. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.IRateLimit); - - /** Zero is a valid rate limit. */ - public requestsPerSecond: number; - - /** - * Creates a new RateLimit instance using the specified properties. - * @param [properties] Properties to set - * @returns RateLimit instance - */ - public static create(properties?: temporal.api.taskqueue.v1.IRateLimit): temporal.api.taskqueue.v1.RateLimit; - - /** - * Encodes the specified RateLimit message. Does not implicitly {@link temporal.api.taskqueue.v1.RateLimit.verify|verify} messages. - * @param message RateLimit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.IRateLimit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RateLimit message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.RateLimit.verify|verify} messages. - * @param message RateLimit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.IRateLimit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RateLimit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RateLimit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.RateLimit; - - /** - * Decodes a RateLimit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RateLimit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.RateLimit; - - /** - * Creates a RateLimit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RateLimit - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.RateLimit; - - /** - * Creates a plain object from a RateLimit message. Also converts values to other types if specified. - * @param message RateLimit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.RateLimit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RateLimit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RateLimit - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ConfigMetadata. */ - interface IConfigMetadata { - - /** Reason for why the config was set. */ - reason?: (string|null); - - /** - * Identity of the last updater. - * Set by the request's identity field. - */ - updateIdentity?: (string|null); - - /** Time of the last update. */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a ConfigMetadata. */ - class ConfigMetadata implements IConfigMetadata { - - /** - * Constructs a new ConfigMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.IConfigMetadata); - - /** Reason for why the config was set. */ - public reason: string; - - /** - * Identity of the last updater. - * Set by the request's identity field. - */ - public updateIdentity: string; - - /** Time of the last update. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new ConfigMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfigMetadata instance - */ - public static create(properties?: temporal.api.taskqueue.v1.IConfigMetadata): temporal.api.taskqueue.v1.ConfigMetadata; - - /** - * Encodes the specified ConfigMetadata message. Does not implicitly {@link temporal.api.taskqueue.v1.ConfigMetadata.verify|verify} messages. - * @param message ConfigMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.IConfigMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfigMetadata message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.ConfigMetadata.verify|verify} messages. - * @param message ConfigMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.IConfigMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfigMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfigMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.ConfigMetadata; - - /** - * Decodes a ConfigMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfigMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.ConfigMetadata; - - /** - * Creates a ConfigMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfigMetadata - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.ConfigMetadata; - - /** - * Creates a plain object from a ConfigMetadata message. Also converts values to other types if specified. - * @param message ConfigMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.ConfigMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfigMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConfigMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RateLimitConfig. */ - interface IRateLimitConfig { - - /** RateLimitConfig rateLimit */ - rateLimit?: (temporal.api.taskqueue.v1.IRateLimit|null); - - /** RateLimitConfig metadata */ - metadata?: (temporal.api.taskqueue.v1.IConfigMetadata|null); - } - - /** Represents a RateLimitConfig. */ - class RateLimitConfig implements IRateLimitConfig { - - /** - * Constructs a new RateLimitConfig. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.IRateLimitConfig); - - /** RateLimitConfig rateLimit. */ - public rateLimit?: (temporal.api.taskqueue.v1.IRateLimit|null); - - /** RateLimitConfig metadata. */ - public metadata?: (temporal.api.taskqueue.v1.IConfigMetadata|null); - - /** - * Creates a new RateLimitConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns RateLimitConfig instance - */ - public static create(properties?: temporal.api.taskqueue.v1.IRateLimitConfig): temporal.api.taskqueue.v1.RateLimitConfig; - - /** - * Encodes the specified RateLimitConfig message. Does not implicitly {@link temporal.api.taskqueue.v1.RateLimitConfig.verify|verify} messages. - * @param message RateLimitConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.IRateLimitConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RateLimitConfig message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.RateLimitConfig.verify|verify} messages. - * @param message RateLimitConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.IRateLimitConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RateLimitConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RateLimitConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.RateLimitConfig; - - /** - * Decodes a RateLimitConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RateLimitConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.RateLimitConfig; - - /** - * Creates a RateLimitConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RateLimitConfig - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.RateLimitConfig; - - /** - * Creates a plain object from a RateLimitConfig message. Also converts values to other types if specified. - * @param message RateLimitConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.RateLimitConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RateLimitConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RateLimitConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskQueueConfig. */ - interface ITaskQueueConfig { - - /** Unless modified, this is the system-defined rate limit. */ - queueRateLimit?: (temporal.api.taskqueue.v1.IRateLimitConfig|null); - - /** If set, each individual fairness key will be limited to this rate, scaled by the weight of the fairness key. */ - fairnessKeysRateLimitDefault?: (temporal.api.taskqueue.v1.IRateLimitConfig|null); - - /** If set, overrides the fairness weights for the corresponding fairness keys. */ - fairnessWeightOverrides?: ({ [k: string]: number }|null); - } - - /** Represents a TaskQueueConfig. */ - class TaskQueueConfig implements ITaskQueueConfig { - - /** - * Constructs a new TaskQueueConfig. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.taskqueue.v1.ITaskQueueConfig); - - /** Unless modified, this is the system-defined rate limit. */ - public queueRateLimit?: (temporal.api.taskqueue.v1.IRateLimitConfig|null); - - /** If set, each individual fairness key will be limited to this rate, scaled by the weight of the fairness key. */ - public fairnessKeysRateLimitDefault?: (temporal.api.taskqueue.v1.IRateLimitConfig|null); - - /** If set, overrides the fairness weights for the corresponding fairness keys. */ - public fairnessWeightOverrides: { [k: string]: number }; - - /** - * Creates a new TaskQueueConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskQueueConfig instance - */ - public static create(properties?: temporal.api.taskqueue.v1.ITaskQueueConfig): temporal.api.taskqueue.v1.TaskQueueConfig; - - /** - * Encodes the specified TaskQueueConfig message. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueConfig.verify|verify} messages. - * @param message TaskQueueConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.taskqueue.v1.ITaskQueueConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskQueueConfig message, length delimited. Does not implicitly {@link temporal.api.taskqueue.v1.TaskQueueConfig.verify|verify} messages. - * @param message TaskQueueConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.taskqueue.v1.ITaskQueueConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskQueueConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskQueueConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.taskqueue.v1.TaskQueueConfig; - - /** - * Decodes a TaskQueueConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskQueueConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.taskqueue.v1.TaskQueueConfig; - - /** - * Creates a TaskQueueConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskQueueConfig - */ - public static fromObject(object: { [k: string]: any }): temporal.api.taskqueue.v1.TaskQueueConfig; - - /** - * Creates a plain object from a TaskQueueConfig message. Also converts values to other types if specified. - * @param message TaskQueueConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.taskqueue.v1.TaskQueueConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskQueueConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskQueueConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace sdk. */ - namespace sdk { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a UserMetadata. */ - interface IUserMetadata { - - /** - * Short-form text that provides a summary. This payload should be a "json/plain"-encoded payload - * that is a single JSON string for use in user interfaces. User interface formatting may not - * apply to this text when used in "title" situations. The payload data section is limited to 400 - * bytes by default. - */ - summary?: (temporal.api.common.v1.IPayload|null); - - /** - * Long-form text that provides details. This payload should be a "json/plain"-encoded payload - * that is a single JSON string for use in user interfaces. User interface formatting may apply to - * this text in common use. The payload data section is limited to 20000 bytes by default. - */ - details?: (temporal.api.common.v1.IPayload|null); - } - - /** Information a user can set, often for use by user interfaces. */ - class UserMetadata implements IUserMetadata { - - /** - * Constructs a new UserMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.sdk.v1.IUserMetadata); - - /** - * Short-form text that provides a summary. This payload should be a "json/plain"-encoded payload - * that is a single JSON string for use in user interfaces. User interface formatting may not - * apply to this text when used in "title" situations. The payload data section is limited to 400 - * bytes by default. - */ - public summary?: (temporal.api.common.v1.IPayload|null); - - /** - * Long-form text that provides details. This payload should be a "json/plain"-encoded payload - * that is a single JSON string for use in user interfaces. User interface formatting may apply to - * this text in common use. The payload data section is limited to 20000 bytes by default. - */ - public details?: (temporal.api.common.v1.IPayload|null); - - /** - * Creates a new UserMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns UserMetadata instance - */ - public static create(properties?: temporal.api.sdk.v1.IUserMetadata): temporal.api.sdk.v1.UserMetadata; - - /** - * Encodes the specified UserMetadata message. Does not implicitly {@link temporal.api.sdk.v1.UserMetadata.verify|verify} messages. - * @param message UserMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.sdk.v1.IUserMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserMetadata message, length delimited. Does not implicitly {@link temporal.api.sdk.v1.UserMetadata.verify|verify} messages. - * @param message UserMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.sdk.v1.IUserMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.sdk.v1.UserMetadata; - - /** - * Decodes a UserMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.sdk.v1.UserMetadata; - - /** - * Creates a UserMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserMetadata - */ - public static fromObject(object: { [k: string]: any }): temporal.api.sdk.v1.UserMetadata; - - /** - * Creates a plain object from a UserMetadata message. Also converts values to other types if specified. - * @param message UserMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.sdk.v1.UserMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowTaskCompletedMetadata. */ - interface IWorkflowTaskCompletedMetadata { - - /** - * Internal flags used by the core SDK. SDKs using flags must comply with the following behavior: - * - * During replay: - * If a flag is not recognized (value is too high or not defined), it must fail the workflow - * task. - * If a flag is recognized, it is stored in a set of used flags for the run. Code checks for - * that flag during and after this WFT are allowed to assume that the flag is present. - * If a code check for a flag does not find the flag in the set of used flags, it must take - * the branch corresponding to the absence of that flag. - * - * During non-replay execution of new WFTs: - * The SDK is free to use all flags it knows about. It must record any newly-used (IE: not - * previously recorded) flags when completing the WFT. - * - * SDKs which are too old to even know about this field at all are considered to produce - * undefined behavior if they replay workflows which used this mechanism. - * - * (-- api-linter: core::0141::forbidden-types=disabled - * aip.dev/not-precedent: These really shouldn't have negative values. --) - */ - coreUsedFlags?: (number[]|null); - - /** - * Flags used by the SDK lang. No attempt is made to distinguish between different SDK languages - * here as processing a workflow with a different language than the one which authored it is - * already undefined behavior. See `core_used_patches` for more. - * - * (-- api-linter: core::0141::forbidden-types=disabled - * aip.dev/not-precedent: These really shouldn't have negative values. --) - */ - langUsedFlags?: (number[]|null); - - /** - * Name of the SDK that processed the task. This is usually something like "temporal-go" and is - * usually the same as client-name gRPC header. This should only be set if its value changed - * since the last time recorded on the workflow (or be set on the first task). - * - * (-- api-linter: core::0122::name-suffix=disabled - * aip.dev/not-precedent: We're ok with a name suffix here. --) - */ - sdkName?: (string|null); - - /** - * Version of the SDK that processed the task. This is usually something like "1.20.0" and is - * usually the same as client-version gRPC header. This should only be set if its value changed - * since the last time recorded on the workflow (or be set on the first task). - */ - sdkVersion?: (string|null); - } - - /** Represents a WorkflowTaskCompletedMetadata. */ - class WorkflowTaskCompletedMetadata implements IWorkflowTaskCompletedMetadata { - - /** - * Constructs a new WorkflowTaskCompletedMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.sdk.v1.IWorkflowTaskCompletedMetadata); - - /** - * Internal flags used by the core SDK. SDKs using flags must comply with the following behavior: - * - * During replay: - * * If a flag is not recognized (value is too high or not defined), it must fail the workflow - * task. - * * If a flag is recognized, it is stored in a set of used flags for the run. Code checks for - * that flag during and after this WFT are allowed to assume that the flag is present. - * * If a code check for a flag does not find the flag in the set of used flags, it must take - * the branch corresponding to the absence of that flag. - * - * During non-replay execution of new WFTs: - * * The SDK is free to use all flags it knows about. It must record any newly-used (IE: not - * previously recorded) flags when completing the WFT. - * - * SDKs which are too old to even know about this field at all are considered to produce - * undefined behavior if they replay workflows which used this mechanism. - * - * (-- api-linter: core::0141::forbidden-types=disabled - * aip.dev/not-precedent: These really shouldn't have negative values. --) - */ - public coreUsedFlags: number[]; - - /** - * Flags used by the SDK lang. No attempt is made to distinguish between different SDK languages - * here as processing a workflow with a different language than the one which authored it is - * already undefined behavior. See `core_used_patches` for more. - * - * (-- api-linter: core::0141::forbidden-types=disabled - * aip.dev/not-precedent: These really shouldn't have negative values. --) - */ - public langUsedFlags: number[]; - - /** - * Name of the SDK that processed the task. This is usually something like "temporal-go" and is - * usually the same as client-name gRPC header. This should only be set if its value changed - * since the last time recorded on the workflow (or be set on the first task). - * - * (-- api-linter: core::0122::name-suffix=disabled - * aip.dev/not-precedent: We're ok with a name suffix here. --) - */ - public sdkName: string; - - /** - * Version of the SDK that processed the task. This is usually something like "1.20.0" and is - * usually the same as client-version gRPC header. This should only be set if its value changed - * since the last time recorded on the workflow (or be set on the first task). - */ - public sdkVersion: string; - - /** - * Creates a new WorkflowTaskCompletedMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowTaskCompletedMetadata instance - */ - public static create(properties?: temporal.api.sdk.v1.IWorkflowTaskCompletedMetadata): temporal.api.sdk.v1.WorkflowTaskCompletedMetadata; - - /** - * Encodes the specified WorkflowTaskCompletedMetadata message. Does not implicitly {@link temporal.api.sdk.v1.WorkflowTaskCompletedMetadata.verify|verify} messages. - * @param message WorkflowTaskCompletedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.sdk.v1.IWorkflowTaskCompletedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowTaskCompletedMetadata message, length delimited. Does not implicitly {@link temporal.api.sdk.v1.WorkflowTaskCompletedMetadata.verify|verify} messages. - * @param message WorkflowTaskCompletedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.sdk.v1.IWorkflowTaskCompletedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowTaskCompletedMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowTaskCompletedMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.sdk.v1.WorkflowTaskCompletedMetadata; - - /** - * Decodes a WorkflowTaskCompletedMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowTaskCompletedMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.sdk.v1.WorkflowTaskCompletedMetadata; - - /** - * Creates a WorkflowTaskCompletedMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowTaskCompletedMetadata - */ - public static fromObject(object: { [k: string]: any }): temporal.api.sdk.v1.WorkflowTaskCompletedMetadata; - - /** - * Creates a plain object from a WorkflowTaskCompletedMetadata message. Also converts values to other types if specified. - * @param message WorkflowTaskCompletedMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.sdk.v1.WorkflowTaskCompletedMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowTaskCompletedMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowTaskCompletedMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerConfig. */ - interface IWorkerConfig { - - /** WorkerConfig workflowCacheSize */ - workflowCacheSize?: (number|null); - - /** WorkerConfig simplePollerBehavior */ - simplePollerBehavior?: (temporal.api.sdk.v1.WorkerConfig.ISimplePollerBehavior|null); - - /** WorkerConfig autoscalingPollerBehavior */ - autoscalingPollerBehavior?: (temporal.api.sdk.v1.WorkerConfig.IAutoscalingPollerBehavior|null); - } - - /** Represents a WorkerConfig. */ - class WorkerConfig implements IWorkerConfig { - - /** - * Constructs a new WorkerConfig. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.sdk.v1.IWorkerConfig); - - /** WorkerConfig workflowCacheSize. */ - public workflowCacheSize: number; - - /** WorkerConfig simplePollerBehavior. */ - public simplePollerBehavior?: (temporal.api.sdk.v1.WorkerConfig.ISimplePollerBehavior|null); - - /** WorkerConfig autoscalingPollerBehavior. */ - public autoscalingPollerBehavior?: (temporal.api.sdk.v1.WorkerConfig.IAutoscalingPollerBehavior|null); - - /** WorkerConfig pollerBehavior. */ - public pollerBehavior?: ("simplePollerBehavior"|"autoscalingPollerBehavior"); - - /** - * Creates a new WorkerConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerConfig instance - */ - public static create(properties?: temporal.api.sdk.v1.IWorkerConfig): temporal.api.sdk.v1.WorkerConfig; - - /** - * Encodes the specified WorkerConfig message. Does not implicitly {@link temporal.api.sdk.v1.WorkerConfig.verify|verify} messages. - * @param message WorkerConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.sdk.v1.IWorkerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerConfig message, length delimited. Does not implicitly {@link temporal.api.sdk.v1.WorkerConfig.verify|verify} messages. - * @param message WorkerConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.sdk.v1.IWorkerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.sdk.v1.WorkerConfig; - - /** - * Decodes a WorkerConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.sdk.v1.WorkerConfig; - - /** - * Creates a WorkerConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerConfig - */ - public static fromObject(object: { [k: string]: any }): temporal.api.sdk.v1.WorkerConfig; - - /** - * Creates a plain object from a WorkerConfig message. Also converts values to other types if specified. - * @param message WorkerConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.sdk.v1.WorkerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WorkerConfig { - - /** Properties of a SimplePollerBehavior. */ - interface ISimplePollerBehavior { - - /** SimplePollerBehavior maxPollers */ - maxPollers?: (number|null); - } - - /** Represents a SimplePollerBehavior. */ - class SimplePollerBehavior implements ISimplePollerBehavior { - - /** - * Constructs a new SimplePollerBehavior. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.sdk.v1.WorkerConfig.ISimplePollerBehavior); - - /** SimplePollerBehavior maxPollers. */ - public maxPollers: number; - - /** - * Creates a new SimplePollerBehavior instance using the specified properties. - * @param [properties] Properties to set - * @returns SimplePollerBehavior instance - */ - public static create(properties?: temporal.api.sdk.v1.WorkerConfig.ISimplePollerBehavior): temporal.api.sdk.v1.WorkerConfig.SimplePollerBehavior; - - /** - * Encodes the specified SimplePollerBehavior message. Does not implicitly {@link temporal.api.sdk.v1.WorkerConfig.SimplePollerBehavior.verify|verify} messages. - * @param message SimplePollerBehavior message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.sdk.v1.WorkerConfig.ISimplePollerBehavior, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SimplePollerBehavior message, length delimited. Does not implicitly {@link temporal.api.sdk.v1.WorkerConfig.SimplePollerBehavior.verify|verify} messages. - * @param message SimplePollerBehavior message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.sdk.v1.WorkerConfig.ISimplePollerBehavior, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SimplePollerBehavior message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SimplePollerBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.sdk.v1.WorkerConfig.SimplePollerBehavior; - - /** - * Decodes a SimplePollerBehavior message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SimplePollerBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.sdk.v1.WorkerConfig.SimplePollerBehavior; - - /** - * Creates a SimplePollerBehavior message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SimplePollerBehavior - */ - public static fromObject(object: { [k: string]: any }): temporal.api.sdk.v1.WorkerConfig.SimplePollerBehavior; - - /** - * Creates a plain object from a SimplePollerBehavior message. Also converts values to other types if specified. - * @param message SimplePollerBehavior - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.sdk.v1.WorkerConfig.SimplePollerBehavior, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SimplePollerBehavior to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SimplePollerBehavior - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AutoscalingPollerBehavior. */ - interface IAutoscalingPollerBehavior { - - /** - * At least this many poll calls will always be attempted (assuming slots are available). - * Cannot be zero. - */ - minPollers?: (number|null); - - /** At most this many poll calls will ever be open at once. Must be >= `minimum`. */ - maxPollers?: (number|null); - - /** - * This many polls will be attempted initially before scaling kicks in. Must be between - * `minimum` and `maximum`. - */ - initialPollers?: (number|null); - } - - /** Represents an AutoscalingPollerBehavior. */ - class AutoscalingPollerBehavior implements IAutoscalingPollerBehavior { - - /** - * Constructs a new AutoscalingPollerBehavior. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.sdk.v1.WorkerConfig.IAutoscalingPollerBehavior); - - /** - * At least this many poll calls will always be attempted (assuming slots are available). - * Cannot be zero. - */ - public minPollers: number; - - /** At most this many poll calls will ever be open at once. Must be >= `minimum`. */ - public maxPollers: number; - - /** - * This many polls will be attempted initially before scaling kicks in. Must be between - * `minimum` and `maximum`. - */ - public initialPollers: number; - - /** - * Creates a new AutoscalingPollerBehavior instance using the specified properties. - * @param [properties] Properties to set - * @returns AutoscalingPollerBehavior instance - */ - public static create(properties?: temporal.api.sdk.v1.WorkerConfig.IAutoscalingPollerBehavior): temporal.api.sdk.v1.WorkerConfig.AutoscalingPollerBehavior; - - /** - * Encodes the specified AutoscalingPollerBehavior message. Does not implicitly {@link temporal.api.sdk.v1.WorkerConfig.AutoscalingPollerBehavior.verify|verify} messages. - * @param message AutoscalingPollerBehavior message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.sdk.v1.WorkerConfig.IAutoscalingPollerBehavior, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AutoscalingPollerBehavior message, length delimited. Does not implicitly {@link temporal.api.sdk.v1.WorkerConfig.AutoscalingPollerBehavior.verify|verify} messages. - * @param message AutoscalingPollerBehavior message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.sdk.v1.WorkerConfig.IAutoscalingPollerBehavior, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AutoscalingPollerBehavior message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutoscalingPollerBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.sdk.v1.WorkerConfig.AutoscalingPollerBehavior; - - /** - * Decodes an AutoscalingPollerBehavior message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutoscalingPollerBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.sdk.v1.WorkerConfig.AutoscalingPollerBehavior; - - /** - * Creates an AutoscalingPollerBehavior message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutoscalingPollerBehavior - */ - public static fromObject(object: { [k: string]: any }): temporal.api.sdk.v1.WorkerConfig.AutoscalingPollerBehavior; - - /** - * Creates a plain object from an AutoscalingPollerBehavior message. Also converts values to other types if specified. - * @param message AutoscalingPollerBehavior - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.sdk.v1.WorkerConfig.AutoscalingPollerBehavior, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AutoscalingPollerBehavior to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AutoscalingPollerBehavior - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a WorkflowMetadata. */ - interface IWorkflowMetadata { - - /** Metadata provided at declaration or creation time. */ - definition?: (temporal.api.sdk.v1.IWorkflowDefinition|null); - - /** - * Current long-form details of the workflow's state. This is used by user interfaces to show - * long-form text. This text may be formatted by the user interface. - */ - currentDetails?: (string|null); - } - - /** The name of the query to retrieve this information is `__temporal_workflow_metadata`. */ - class WorkflowMetadata implements IWorkflowMetadata { - - /** - * Constructs a new WorkflowMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.sdk.v1.IWorkflowMetadata); - - /** Metadata provided at declaration or creation time. */ - public definition?: (temporal.api.sdk.v1.IWorkflowDefinition|null); - - /** - * Current long-form details of the workflow's state. This is used by user interfaces to show - * long-form text. This text may be formatted by the user interface. - */ - public currentDetails: string; - - /** - * Creates a new WorkflowMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowMetadata instance - */ - public static create(properties?: temporal.api.sdk.v1.IWorkflowMetadata): temporal.api.sdk.v1.WorkflowMetadata; - - /** - * Encodes the specified WorkflowMetadata message. Does not implicitly {@link temporal.api.sdk.v1.WorkflowMetadata.verify|verify} messages. - * @param message WorkflowMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.sdk.v1.IWorkflowMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowMetadata message, length delimited. Does not implicitly {@link temporal.api.sdk.v1.WorkflowMetadata.verify|verify} messages. - * @param message WorkflowMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.sdk.v1.IWorkflowMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.sdk.v1.WorkflowMetadata; - - /** - * Decodes a WorkflowMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.sdk.v1.WorkflowMetadata; - - /** - * Creates a WorkflowMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowMetadata - */ - public static fromObject(object: { [k: string]: any }): temporal.api.sdk.v1.WorkflowMetadata; - - /** - * Creates a plain object from a WorkflowMetadata message. Also converts values to other types if specified. - * @param message WorkflowMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.sdk.v1.WorkflowMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowDefinition. */ - interface IWorkflowDefinition { - - /** - * A name scoped by the task queue that maps to this workflow definition. - * If missing, this workflow is a dynamic workflow. - */ - type?: (string|null); - - /** Query definitions, sorted by name. */ - queryDefinitions?: (temporal.api.sdk.v1.IWorkflowInteractionDefinition[]|null); - - /** Signal definitions, sorted by name. */ - signalDefinitions?: (temporal.api.sdk.v1.IWorkflowInteractionDefinition[]|null); - - /** Update definitions, sorted by name. */ - updateDefinitions?: (temporal.api.sdk.v1.IWorkflowInteractionDefinition[]|null); - } - - /** (-- api-linter: core::0203::optional=disabled --) */ - class WorkflowDefinition implements IWorkflowDefinition { - - /** - * Constructs a new WorkflowDefinition. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.sdk.v1.IWorkflowDefinition); - - /** - * A name scoped by the task queue that maps to this workflow definition. - * If missing, this workflow is a dynamic workflow. - */ - public type: string; - - /** Query definitions, sorted by name. */ - public queryDefinitions: temporal.api.sdk.v1.IWorkflowInteractionDefinition[]; - - /** Signal definitions, sorted by name. */ - public signalDefinitions: temporal.api.sdk.v1.IWorkflowInteractionDefinition[]; - - /** Update definitions, sorted by name. */ - public updateDefinitions: temporal.api.sdk.v1.IWorkflowInteractionDefinition[]; - - /** - * Creates a new WorkflowDefinition instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowDefinition instance - */ - public static create(properties?: temporal.api.sdk.v1.IWorkflowDefinition): temporal.api.sdk.v1.WorkflowDefinition; - - /** - * Encodes the specified WorkflowDefinition message. Does not implicitly {@link temporal.api.sdk.v1.WorkflowDefinition.verify|verify} messages. - * @param message WorkflowDefinition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.sdk.v1.IWorkflowDefinition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowDefinition message, length delimited. Does not implicitly {@link temporal.api.sdk.v1.WorkflowDefinition.verify|verify} messages. - * @param message WorkflowDefinition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.sdk.v1.IWorkflowDefinition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowDefinition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.sdk.v1.WorkflowDefinition; - - /** - * Decodes a WorkflowDefinition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.sdk.v1.WorkflowDefinition; - - /** - * Creates a WorkflowDefinition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowDefinition - */ - public static fromObject(object: { [k: string]: any }): temporal.api.sdk.v1.WorkflowDefinition; - - /** - * Creates a plain object from a WorkflowDefinition message. Also converts values to other types if specified. - * @param message WorkflowDefinition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.sdk.v1.WorkflowDefinition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowDefinition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowDefinition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowInteractionDefinition. */ - interface IWorkflowInteractionDefinition { - - /** - * An optional name for the handler. If missing, it represents - * a dynamic handler that processes any interactions not handled by others. - * There is at most one dynamic handler per workflow and interaction kind. - */ - name?: (string|null); - - /** - * An optional interaction description provided by the application. - * By convention, external tools may interpret its first part, - * i.e., ending with a line break, as a summary of the description. - */ - description?: (string|null); - } - - /** - * (-- api-linter: core::0123::resource-annotation=disabled - * aip.dev/not-precedent: The `name` field is optional. --) - * (-- api-linter: core::0203::optional=disabled --) - */ - class WorkflowInteractionDefinition implements IWorkflowInteractionDefinition { - - /** - * Constructs a new WorkflowInteractionDefinition. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.sdk.v1.IWorkflowInteractionDefinition); - - /** - * An optional name for the handler. If missing, it represents - * a dynamic handler that processes any interactions not handled by others. - * There is at most one dynamic handler per workflow and interaction kind. - */ - public name: string; - - /** - * An optional interaction description provided by the application. - * By convention, external tools may interpret its first part, - * i.e., ending with a line break, as a summary of the description. - */ - public description: string; - - /** - * Creates a new WorkflowInteractionDefinition instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowInteractionDefinition instance - */ - public static create(properties?: temporal.api.sdk.v1.IWorkflowInteractionDefinition): temporal.api.sdk.v1.WorkflowInteractionDefinition; - - /** - * Encodes the specified WorkflowInteractionDefinition message. Does not implicitly {@link temporal.api.sdk.v1.WorkflowInteractionDefinition.verify|verify} messages. - * @param message WorkflowInteractionDefinition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.sdk.v1.IWorkflowInteractionDefinition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowInteractionDefinition message, length delimited. Does not implicitly {@link temporal.api.sdk.v1.WorkflowInteractionDefinition.verify|verify} messages. - * @param message WorkflowInteractionDefinition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.sdk.v1.IWorkflowInteractionDefinition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowInteractionDefinition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowInteractionDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.sdk.v1.WorkflowInteractionDefinition; - - /** - * Decodes a WorkflowInteractionDefinition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowInteractionDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.sdk.v1.WorkflowInteractionDefinition; - - /** - * Creates a WorkflowInteractionDefinition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowInteractionDefinition - */ - public static fromObject(object: { [k: string]: any }): temporal.api.sdk.v1.WorkflowInteractionDefinition; - - /** - * Creates a plain object from a WorkflowInteractionDefinition message. Also converts values to other types if specified. - * @param message WorkflowInteractionDefinition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.sdk.v1.WorkflowInteractionDefinition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowInteractionDefinition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowInteractionDefinition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace history. */ - namespace history { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a WorkflowExecutionStartedEventAttributes. */ - interface IWorkflowExecutionStartedEventAttributes { - - /** WorkflowExecutionStartedEventAttributes workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** - * If this workflow is a child, the namespace our parent lives in. - * SDKs and UI tools should use `parent_workflow_namespace` field but server must use `parent_workflow_namespace_id` only. - */ - parentWorkflowNamespace?: (string|null); - - /** WorkflowExecutionStartedEventAttributes parentWorkflowNamespaceId */ - parentWorkflowNamespaceId?: (string|null); - - /** - * Contains information about parent workflow execution that initiated the child workflow these attributes belong to. - * If the workflow these attributes belong to is not a child workflow of any other execution, this field will not be populated. - */ - parentWorkflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** EventID of the child execution initiated event in parent workflow */ - parentInitiatedEventId?: (Long|null); - - /** WorkflowExecutionStartedEventAttributes taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** SDK will deserialize this and provide it as arguments to the workflow function */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** Total workflow execution timeout including retries and continue as new. */ - workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run. */ - workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** - * Run id of the previous workflow which continued-as-new or retried or cron executed into this - * workflow. - */ - continuedExecutionRunId?: (string|null); - - /** WorkflowExecutionStartedEventAttributes initiator */ - initiator?: (temporal.api.enums.v1.ContinueAsNewInitiator|null); - - /** WorkflowExecutionStartedEventAttributes continuedFailure */ - continuedFailure?: (temporal.api.failure.v1.IFailure|null); - - /** WorkflowExecutionStartedEventAttributes lastCompletionResult */ - lastCompletionResult?: (temporal.api.common.v1.IPayloads|null); - - /** - * This is the run id when the WorkflowExecutionStarted event was written. - * A workflow reset changes the execution run_id, but preserves this field. - */ - originalExecutionRunId?: (string|null); - - /** Identity of the client who requested this execution */ - identity?: (string|null); - - /** - * This is the very first runId along the chain of ContinueAsNew, Retry, Cron and Reset. - * Used to identify a chain. - */ - firstExecutionRunId?: (string|null); - - /** WorkflowExecutionStartedEventAttributes retryPolicy */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Starting at 1, the number of times we have tried to execute this workflow */ - attempt?: (number|null); - - /** - * The absolute time at which the workflow will be timed out. - * This is passed without change to the next run/retry of a workflow. - */ - workflowExecutionExpirationTime?: (google.protobuf.ITimestamp|null); - - /** If this workflow runs on a cron schedule, it will appear here */ - cronSchedule?: (string|null); - - /** - * For a cron workflow, this contains the amount of time between when this iteration of - * the cron workflow was scheduled and when it should run next per its cron_schedule. - */ - firstWorkflowTaskBackoff?: (google.protobuf.IDuration|null); - - /** WorkflowExecutionStartedEventAttributes memo */ - memo?: (temporal.api.common.v1.IMemo|null); - - /** WorkflowExecutionStartedEventAttributes searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** WorkflowExecutionStartedEventAttributes prevAutoResetPoints */ - prevAutoResetPoints?: (temporal.api.workflow.v1.IResetPoints|null); - - /** WorkflowExecutionStartedEventAttributes header */ - header?: (temporal.api.common.v1.IHeader|null); - - /** - * Version of the child execution initiated event in parent workflow - * It should be used together with parent_initiated_event_id to identify - * a child initiated event for global namespace - */ - parentInitiatedEventVersion?: (Long|null); - - /** This field is new in 1.21. */ - workflowId?: (string|null); - - /** - * If this workflow intends to use anything other than the current overall default version for - * the queue, then we include it here. - * Deprecated. [cleanup-experimental-wv] - */ - sourceVersionStamp?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** Completion callbacks attached when this workflow was started. */ - completionCallbacks?: (temporal.api.common.v1.ICallback[]|null); - - /** - * Contains information about the root workflow execution. - * The root workflow execution is defined as follows: - * 1. A workflow without parent workflow is its own root workflow. - * 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. - * When the workflow is its own root workflow, then root_workflow_execution is nil. - * Note: workflows continued as new or reseted may or may not have parents, check examples below. - * - * Examples: - * Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3. - * - The root workflow of all three workflows is W1. - * - W1 has root_workflow_execution set to nil. - * - W2 and W3 have root_workflow_execution set to W1. - * Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3. - * - The root workflow of all three workflows is W1. - * - W1 has root_workflow_execution set to nil. - * - W2 and W3 have root_workflow_execution set to W1. - * Scenario 3: Workflow W1 continued as new W2. - * - The root workflow of W1 is W1 and the root workflow of W2 is W2. - * - W1 and W2 have root_workflow_execution set to nil. - * Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3 - * - The root workflow of all three workflows is W1. - * - W1 has root_workflow_execution set to nil. - * - W2 and W3 have root_workflow_execution set to W1. - * Scenario 5: Workflow W1 is reseted, creating W2. - * - The root workflow of W1 is W1 and the root workflow of W2 is W2. - * - W1 and W2 have root_workflow_execution set to nil. - */ - rootWorkflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * When present, this execution is assigned to the build ID of its parent or previous execution. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - inheritedBuildId?: (string|null); - - /** - * Versioning override applied to this workflow when it was started. - * Children, crons, retries, and continue-as-new will inherit source run's override if pinned - * and if the new workflow's Task Queue belongs to the override version. - */ - versioningOverride?: (temporal.api.workflow.v1.IVersioningOverride|null); - - /** - * When present, it means this is a child workflow of a parent that is Pinned to this Worker - * Deployment Version. In this case, child workflow will start as Pinned to this Version instead - * of starting on the Current Version of its Task Queue. - * This is set only if the child workflow is starting on a Task Queue belonging to the same - * Worker Deployment Version. - * Deprecated. Use `parent_versioning_info`. - */ - parentPinnedWorkerDeploymentVersion?: (string|null); - - /** Priority metadata */ - priority?: (temporal.api.common.v1.IPriority|null); - - /** - * If present, the new workflow should start on this version with pinned base behavior. - * Child of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version. - * - * A new run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the - * new run's Task Queue belongs to that version. - * - * A new run initiated by workflow Cron will never inherit. - * - * A new run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time - * of retry, and the retried run inherited a pinned version when it started (ie. it is a child of a pinned - * parent, or a CaN of a pinned run, and is running on a Task Queue in the inherited version). - * - * Pinned override is inherited if Task Queue of new run is compatible with the override version. - * Override is inherited separately and takes precedence over inherited base version. - * - * Note: This field is mutually exclusive with inherited_auto_upgrade_info. - * Additionaly, versioning_override, if present, overrides this field during routing decisions. - */ - inheritedPinnedVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** - * If present, the new workflow begins with AutoUpgrade behavior. Before dispatching the - * first workflow task, this field is set to the deployment version on which the parent/ - * previous run was operating. This inheritance only happens when the task queues belong to - * the same deployment version. The first workflow task will then be dispatched to either - * this inherited deployment version, or the current deployment version of the task queue's - * Deployment. After the first workflow task, the effective behavior depends on worker-sent - * values in subsequent workflow tasks. - * - * Inheritance rules: - * - ContinueAsNew and child workflows: inherit AutoUpgrade behavior and deployment version - * - Cron: never inherits - * - Retry: inherits only if the retried run is effectively AutoUpgrade at the time of - * retry, and inherited AutoUpgrade behavior when it started (i.e. it is a child of an - * AutoUpgrade parent or ContinueAsNew of an AutoUpgrade run, running on the same - * deployment as the parent/previous run) - * - * Additional notes: - * - This field is mutually exclusive with `inherited_pinned_version`. - * - `versioning_override`, if present, overrides this field during routing decisions. - * - SDK implementations do not interact with this field and is only used internally by - * the server to ensure task routing correctness. - */ - inheritedAutoUpgradeInfo?: (temporal.api.deployment.v1.IInheritedAutoUpgradeInfo|null); - - /** - * A boolean indicating whether the SDK has asked to eagerly execute the first workflow task for this workflow and - * eager execution was accepted by the server. - * Only populated by server with version >= 1.29.0. - */ - eagerExecutionAccepted?: (boolean|null); - } - - /** Always the first event in workflow history */ - class WorkflowExecutionStartedEventAttributes implements IWorkflowExecutionStartedEventAttributes { - - /** - * Constructs a new WorkflowExecutionStartedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionStartedEventAttributes); - - /** WorkflowExecutionStartedEventAttributes workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** - * If this workflow is a child, the namespace our parent lives in. - * SDKs and UI tools should use `parent_workflow_namespace` field but server must use `parent_workflow_namespace_id` only. - */ - public parentWorkflowNamespace: string; - - /** WorkflowExecutionStartedEventAttributes parentWorkflowNamespaceId. */ - public parentWorkflowNamespaceId: string; - - /** - * Contains information about parent workflow execution that initiated the child workflow these attributes belong to. - * If the workflow these attributes belong to is not a child workflow of any other execution, this field will not be populated. - */ - public parentWorkflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** EventID of the child execution initiated event in parent workflow */ - public parentInitiatedEventId: Long; - - /** WorkflowExecutionStartedEventAttributes taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** SDK will deserialize this and provide it as arguments to the workflow function */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** Total workflow execution timeout including retries and continue as new. */ - public workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run. */ - public workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - public workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** - * Run id of the previous workflow which continued-as-new or retried or cron executed into this - * workflow. - */ - public continuedExecutionRunId: string; - - /** WorkflowExecutionStartedEventAttributes initiator. */ - public initiator: temporal.api.enums.v1.ContinueAsNewInitiator; - - /** WorkflowExecutionStartedEventAttributes continuedFailure. */ - public continuedFailure?: (temporal.api.failure.v1.IFailure|null); - - /** WorkflowExecutionStartedEventAttributes lastCompletionResult. */ - public lastCompletionResult?: (temporal.api.common.v1.IPayloads|null); - - /** - * This is the run id when the WorkflowExecutionStarted event was written. - * A workflow reset changes the execution run_id, but preserves this field. - */ - public originalExecutionRunId: string; - - /** Identity of the client who requested this execution */ - public identity: string; - - /** - * This is the very first runId along the chain of ContinueAsNew, Retry, Cron and Reset. - * Used to identify a chain. - */ - public firstExecutionRunId: string; - - /** WorkflowExecutionStartedEventAttributes retryPolicy. */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Starting at 1, the number of times we have tried to execute this workflow */ - public attempt: number; - - /** - * The absolute time at which the workflow will be timed out. - * This is passed without change to the next run/retry of a workflow. - */ - public workflowExecutionExpirationTime?: (google.protobuf.ITimestamp|null); - - /** If this workflow runs on a cron schedule, it will appear here */ - public cronSchedule: string; - - /** - * For a cron workflow, this contains the amount of time between when this iteration of - * the cron workflow was scheduled and when it should run next per its cron_schedule. - */ - public firstWorkflowTaskBackoff?: (google.protobuf.IDuration|null); - - /** WorkflowExecutionStartedEventAttributes memo. */ - public memo?: (temporal.api.common.v1.IMemo|null); - - /** WorkflowExecutionStartedEventAttributes searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** WorkflowExecutionStartedEventAttributes prevAutoResetPoints. */ - public prevAutoResetPoints?: (temporal.api.workflow.v1.IResetPoints|null); - - /** WorkflowExecutionStartedEventAttributes header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** - * Version of the child execution initiated event in parent workflow - * It should be used together with parent_initiated_event_id to identify - * a child initiated event for global namespace - */ - public parentInitiatedEventVersion: Long; - - /** This field is new in 1.21. */ - public workflowId: string; - - /** - * If this workflow intends to use anything other than the current overall default version for - * the queue, then we include it here. - * Deprecated. [cleanup-experimental-wv] - */ - public sourceVersionStamp?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** Completion callbacks attached when this workflow was started. */ - public completionCallbacks: temporal.api.common.v1.ICallback[]; - - /** - * Contains information about the root workflow execution. - * The root workflow execution is defined as follows: - * 1. A workflow without parent workflow is its own root workflow. - * 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. - * When the workflow is its own root workflow, then root_workflow_execution is nil. - * Note: workflows continued as new or reseted may or may not have parents, check examples below. - * - * Examples: - * Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3. - * - The root workflow of all three workflows is W1. - * - W1 has root_workflow_execution set to nil. - * - W2 and W3 have root_workflow_execution set to W1. - * Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3. - * - The root workflow of all three workflows is W1. - * - W1 has root_workflow_execution set to nil. - * - W2 and W3 have root_workflow_execution set to W1. - * Scenario 3: Workflow W1 continued as new W2. - * - The root workflow of W1 is W1 and the root workflow of W2 is W2. - * - W1 and W2 have root_workflow_execution set to nil. - * Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3 - * - The root workflow of all three workflows is W1. - * - W1 has root_workflow_execution set to nil. - * - W2 and W3 have root_workflow_execution set to W1. - * Scenario 5: Workflow W1 is reseted, creating W2. - * - The root workflow of W1 is W1 and the root workflow of W2 is W2. - * - W1 and W2 have root_workflow_execution set to nil. - */ - public rootWorkflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * When present, this execution is assigned to the build ID of its parent or previous execution. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public inheritedBuildId: string; - - /** - * Versioning override applied to this workflow when it was started. - * Children, crons, retries, and continue-as-new will inherit source run's override if pinned - * and if the new workflow's Task Queue belongs to the override version. - */ - public versioningOverride?: (temporal.api.workflow.v1.IVersioningOverride|null); - - /** - * When present, it means this is a child workflow of a parent that is Pinned to this Worker - * Deployment Version. In this case, child workflow will start as Pinned to this Version instead - * of starting on the Current Version of its Task Queue. - * This is set only if the child workflow is starting on a Task Queue belonging to the same - * Worker Deployment Version. - * Deprecated. Use `parent_versioning_info`. - */ - public parentPinnedWorkerDeploymentVersion: string; - - /** Priority metadata */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * If present, the new workflow should start on this version with pinned base behavior. - * Child of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version. - * - * A new run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the - * new run's Task Queue belongs to that version. - * - * A new run initiated by workflow Cron will never inherit. - * - * A new run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time - * of retry, and the retried run inherited a pinned version when it started (ie. it is a child of a pinned - * parent, or a CaN of a pinned run, and is running on a Task Queue in the inherited version). - * - * Pinned override is inherited if Task Queue of new run is compatible with the override version. - * Override is inherited separately and takes precedence over inherited base version. - * - * Note: This field is mutually exclusive with inherited_auto_upgrade_info. - * Additionaly, versioning_override, if present, overrides this field during routing decisions. - */ - public inheritedPinnedVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** - * If present, the new workflow begins with AutoUpgrade behavior. Before dispatching the - * first workflow task, this field is set to the deployment version on which the parent/ - * previous run was operating. This inheritance only happens when the task queues belong to - * the same deployment version. The first workflow task will then be dispatched to either - * this inherited deployment version, or the current deployment version of the task queue's - * Deployment. After the first workflow task, the effective behavior depends on worker-sent - * values in subsequent workflow tasks. - * - * Inheritance rules: - * - ContinueAsNew and child workflows: inherit AutoUpgrade behavior and deployment version - * - Cron: never inherits - * - Retry: inherits only if the retried run is effectively AutoUpgrade at the time of - * retry, and inherited AutoUpgrade behavior when it started (i.e. it is a child of an - * AutoUpgrade parent or ContinueAsNew of an AutoUpgrade run, running on the same - * deployment as the parent/previous run) - * - * Additional notes: - * - This field is mutually exclusive with `inherited_pinned_version`. - * - `versioning_override`, if present, overrides this field during routing decisions. - * - SDK implementations do not interact with this field and is only used internally by - * the server to ensure task routing correctness. - */ - public inheritedAutoUpgradeInfo?: (temporal.api.deployment.v1.IInheritedAutoUpgradeInfo|null); - - /** - * A boolean indicating whether the SDK has asked to eagerly execute the first workflow task for this workflow and - * eager execution was accepted by the server. - * Only populated by server with version >= 1.29.0. - */ - public eagerExecutionAccepted: boolean; - - /** - * Creates a new WorkflowExecutionStartedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionStartedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionStartedEventAttributes): temporal.api.history.v1.WorkflowExecutionStartedEventAttributes; - - /** - * Encodes the specified WorkflowExecutionStartedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionStartedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionStartedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionStartedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionStartedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionStartedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionStartedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionStartedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionStartedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionStartedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionStartedEventAttributes; - - /** - * Decodes a WorkflowExecutionStartedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionStartedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionStartedEventAttributes; - - /** - * Creates a WorkflowExecutionStartedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionStartedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionStartedEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionStartedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionStartedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionStartedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionStartedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionStartedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionCompletedEventAttributes. */ - interface IWorkflowExecutionCompletedEventAttributes { - - /** Serialized result of workflow completion (ie: The return value of the workflow function) */ - result?: (temporal.api.common.v1.IPayloads|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - - /** If another run is started by cron, this contains the new run id. */ - newExecutionRunId?: (string|null); - } - - /** Represents a WorkflowExecutionCompletedEventAttributes. */ - class WorkflowExecutionCompletedEventAttributes implements IWorkflowExecutionCompletedEventAttributes { - - /** - * Constructs a new WorkflowExecutionCompletedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionCompletedEventAttributes); - - /** Serialized result of workflow completion (ie: The return value of the workflow function) */ - public result?: (temporal.api.common.v1.IPayloads|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** If another run is started by cron, this contains the new run id. */ - public newExecutionRunId: string; - - /** - * Creates a new WorkflowExecutionCompletedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionCompletedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionCompletedEventAttributes): temporal.api.history.v1.WorkflowExecutionCompletedEventAttributes; - - /** - * Encodes the specified WorkflowExecutionCompletedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionCompletedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionCompletedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionCompletedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionCompletedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionCompletedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionCompletedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionCompletedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionCompletedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionCompletedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionCompletedEventAttributes; - - /** - * Decodes a WorkflowExecutionCompletedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionCompletedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionCompletedEventAttributes; - - /** - * Creates a WorkflowExecutionCompletedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionCompletedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionCompletedEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionCompletedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionCompletedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionCompletedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionCompletedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionCompletedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionFailedEventAttributes. */ - interface IWorkflowExecutionFailedEventAttributes { - - /** Serialized result of workflow failure (ex: An exception thrown, or error returned) */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** WorkflowExecutionFailedEventAttributes retryState */ - retryState?: (temporal.api.enums.v1.RetryState|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - - /** If another run is started by cron or retry, this contains the new run id. */ - newExecutionRunId?: (string|null); - } - - /** Represents a WorkflowExecutionFailedEventAttributes. */ - class WorkflowExecutionFailedEventAttributes implements IWorkflowExecutionFailedEventAttributes { - - /** - * Constructs a new WorkflowExecutionFailedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionFailedEventAttributes); - - /** Serialized result of workflow failure (ex: An exception thrown, or error returned) */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** WorkflowExecutionFailedEventAttributes retryState. */ - public retryState: temporal.api.enums.v1.RetryState; - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** If another run is started by cron or retry, this contains the new run id. */ - public newExecutionRunId: string; - - /** - * Creates a new WorkflowExecutionFailedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionFailedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionFailedEventAttributes): temporal.api.history.v1.WorkflowExecutionFailedEventAttributes; - - /** - * Encodes the specified WorkflowExecutionFailedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionFailedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionFailedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionFailedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionFailedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionFailedEventAttributes; - - /** - * Decodes a WorkflowExecutionFailedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionFailedEventAttributes; - - /** - * Creates a WorkflowExecutionFailedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionFailedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionFailedEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionFailedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionFailedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionFailedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionFailedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionFailedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionTimedOutEventAttributes. */ - interface IWorkflowExecutionTimedOutEventAttributes { - - /** WorkflowExecutionTimedOutEventAttributes retryState */ - retryState?: (temporal.api.enums.v1.RetryState|null); - - /** If another run is started by cron or retry, this contains the new run id. */ - newExecutionRunId?: (string|null); - } - - /** Represents a WorkflowExecutionTimedOutEventAttributes. */ - class WorkflowExecutionTimedOutEventAttributes implements IWorkflowExecutionTimedOutEventAttributes { - - /** - * Constructs a new WorkflowExecutionTimedOutEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionTimedOutEventAttributes); - - /** WorkflowExecutionTimedOutEventAttributes retryState. */ - public retryState: temporal.api.enums.v1.RetryState; - - /** If another run is started by cron or retry, this contains the new run id. */ - public newExecutionRunId: string; - - /** - * Creates a new WorkflowExecutionTimedOutEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionTimedOutEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionTimedOutEventAttributes): temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributes; - - /** - * Encodes the specified WorkflowExecutionTimedOutEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionTimedOutEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionTimedOutEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionTimedOutEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionTimedOutEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionTimedOutEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionTimedOutEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionTimedOutEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributes; - - /** - * Decodes a WorkflowExecutionTimedOutEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionTimedOutEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributes; - - /** - * Creates a WorkflowExecutionTimedOutEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionTimedOutEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionTimedOutEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionTimedOutEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionTimedOutEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionTimedOutEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionContinuedAsNewEventAttributes. */ - interface IWorkflowExecutionContinuedAsNewEventAttributes { - - /** The run ID of the new workflow started by this continue-as-new */ - newExecutionRunId?: (string|null); - - /** WorkflowExecutionContinuedAsNewEventAttributes workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** WorkflowExecutionContinuedAsNewEventAttributes taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** WorkflowExecutionContinuedAsNewEventAttributes input */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** Timeout of a single workflow run. */ - workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - - /** - * How long the server will wait before scheduling the first workflow task for the new run. - * Used for cron, retry, and other continue-as-new cases that server may enforce some minimal - * delay between new runs for system protection purpose. - */ - backoffStartInterval?: (google.protobuf.IDuration|null); - - /** WorkflowExecutionContinuedAsNewEventAttributes initiator */ - initiator?: (temporal.api.enums.v1.ContinueAsNewInitiator|null); - - /** - * Deprecated. If a workflow's retry policy would cause a new run to start when the current one - * has failed, this field would be populated with that failure. Now (when supported by server - * and sdk) the final event will be `WORKFLOW_EXECUTION_FAILED` with `new_execution_run_id` set. - */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * The result from the most recent completed run of this workflow. The SDK surfaces this to the - * new run via APIs such as `GetLastCompletionResult`. - */ - lastCompletionResult?: (temporal.api.common.v1.IPayloads|null); - - /** WorkflowExecutionContinuedAsNewEventAttributes header */ - header?: (temporal.api.common.v1.IHeader|null); - - /** WorkflowExecutionContinuedAsNewEventAttributes memo */ - memo?: (temporal.api.common.v1.IMemo|null); - - /** WorkflowExecutionContinuedAsNewEventAttributes searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * If this is set, the new execution inherits the Build ID of the current execution. Otherwise, - * the assignment rules will be used to independently assign a Build ID to the new execution. - * Deprecated. Only considered for versioning v0.2. - */ - inheritBuildId?: (boolean|null); - - /** - * Experimental. Optionally decide the versioning behavior that the first task of the new run should use. - * For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version - * of the previous run. - */ - initialVersioningBehavior?: (temporal.api.enums.v1.ContinueAsNewVersioningBehavior|null); - } - - /** Represents a WorkflowExecutionContinuedAsNewEventAttributes. */ - class WorkflowExecutionContinuedAsNewEventAttributes implements IWorkflowExecutionContinuedAsNewEventAttributes { - - /** - * Constructs a new WorkflowExecutionContinuedAsNewEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionContinuedAsNewEventAttributes); - - /** The run ID of the new workflow started by this continue-as-new */ - public newExecutionRunId: string; - - /** WorkflowExecutionContinuedAsNewEventAttributes workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** WorkflowExecutionContinuedAsNewEventAttributes taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** WorkflowExecutionContinuedAsNewEventAttributes input. */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** Timeout of a single workflow run. */ - public workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - public workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** - * How long the server will wait before scheduling the first workflow task for the new run. - * Used for cron, retry, and other continue-as-new cases that server may enforce some minimal - * delay between new runs for system protection purpose. - */ - public backoffStartInterval?: (google.protobuf.IDuration|null); - - /** WorkflowExecutionContinuedAsNewEventAttributes initiator. */ - public initiator: temporal.api.enums.v1.ContinueAsNewInitiator; - - /** - * Deprecated. If a workflow's retry policy would cause a new run to start when the current one - * has failed, this field would be populated with that failure. Now (when supported by server - * and sdk) the final event will be `WORKFLOW_EXECUTION_FAILED` with `new_execution_run_id` set. - */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * The result from the most recent completed run of this workflow. The SDK surfaces this to the - * new run via APIs such as `GetLastCompletionResult`. - */ - public lastCompletionResult?: (temporal.api.common.v1.IPayloads|null); - - /** WorkflowExecutionContinuedAsNewEventAttributes header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** WorkflowExecutionContinuedAsNewEventAttributes memo. */ - public memo?: (temporal.api.common.v1.IMemo|null); - - /** WorkflowExecutionContinuedAsNewEventAttributes searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * If this is set, the new execution inherits the Build ID of the current execution. Otherwise, - * the assignment rules will be used to independently assign a Build ID to the new execution. - * Deprecated. Only considered for versioning v0.2. - */ - public inheritBuildId: boolean; - - /** - * Experimental. Optionally decide the versioning behavior that the first task of the new run should use. - * For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version - * of the previous run. - */ - public initialVersioningBehavior: temporal.api.enums.v1.ContinueAsNewVersioningBehavior; - - /** - * Creates a new WorkflowExecutionContinuedAsNewEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionContinuedAsNewEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionContinuedAsNewEventAttributes): temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributes; - - /** - * Encodes the specified WorkflowExecutionContinuedAsNewEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionContinuedAsNewEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionContinuedAsNewEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionContinuedAsNewEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionContinuedAsNewEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionContinuedAsNewEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionContinuedAsNewEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionContinuedAsNewEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributes; - - /** - * Decodes a WorkflowExecutionContinuedAsNewEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionContinuedAsNewEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributes; - - /** - * Creates a WorkflowExecutionContinuedAsNewEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionContinuedAsNewEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionContinuedAsNewEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionContinuedAsNewEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionContinuedAsNewEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionContinuedAsNewEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowTaskScheduledEventAttributes. */ - interface IWorkflowTaskScheduledEventAttributes { - - /** The task queue this workflow task was enqueued in, which could be a normal or sticky queue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** - * How long the worker has to process this task once receiving it before it times out - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Starting at 1, how many attempts there have been to complete this task */ - attempt?: (number|null); - } - - /** Represents a WorkflowTaskScheduledEventAttributes. */ - class WorkflowTaskScheduledEventAttributes implements IWorkflowTaskScheduledEventAttributes { - - /** - * Constructs a new WorkflowTaskScheduledEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowTaskScheduledEventAttributes); - - /** The task queue this workflow task was enqueued in, which could be a normal or sticky queue */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** - * How long the worker has to process this task once receiving it before it times out - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Starting at 1, how many attempts there have been to complete this task */ - public attempt: number; - - /** - * Creates a new WorkflowTaskScheduledEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowTaskScheduledEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowTaskScheduledEventAttributes): temporal.api.history.v1.WorkflowTaskScheduledEventAttributes; - - /** - * Encodes the specified WorkflowTaskScheduledEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowTaskScheduledEventAttributes.verify|verify} messages. - * @param message WorkflowTaskScheduledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowTaskScheduledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowTaskScheduledEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowTaskScheduledEventAttributes.verify|verify} messages. - * @param message WorkflowTaskScheduledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowTaskScheduledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowTaskScheduledEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowTaskScheduledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowTaskScheduledEventAttributes; - - /** - * Decodes a WorkflowTaskScheduledEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowTaskScheduledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowTaskScheduledEventAttributes; - - /** - * Creates a WorkflowTaskScheduledEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowTaskScheduledEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowTaskScheduledEventAttributes; - - /** - * Creates a plain object from a WorkflowTaskScheduledEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowTaskScheduledEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowTaskScheduledEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowTaskScheduledEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowTaskScheduledEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowTaskStartedEventAttributes. */ - interface IWorkflowTaskStartedEventAttributes { - - /** The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to */ - scheduledEventId?: (Long|null); - - /** Identity of the worker who picked up this task */ - identity?: (string|null); - - /** - * This field is populated from the RecordWorkflowTaskStartedRequest. Matching service would - * set the request_id on the RecordWorkflowTaskStartedRequest to a new UUID. This is useful - * in case a RecordWorkflowTaskStarted call succeed but matching doesn't get that response, - * so matching could retry and history service would return success if the request_id matches. - * In that case, matching will continue to deliver the task to worker. Without this field, history - * service would return AlreadyStarted error, and matching would drop the task. - */ - requestId?: (string|null); - - /** True if this workflow should continue-as-new soon. See `suggest_continue_as_new_reasons` for why. */ - suggestContinueAsNew?: (boolean|null); - - /** - * The reason(s) that suggest_continue_as_new is true, if it is. - * Unset if suggest_continue_as_new is false. - */ - suggestContinueAsNewReasons?: (temporal.api.enums.v1.SuggestContinueAsNewReason[]|null); - - /** - * True if Workflow's Target Worker Deployment Version is different from its Pinned Version and - * the workflow is Pinned. - * Experimental. - */ - targetWorkerDeploymentVersionChanged?: (boolean|null); - - /** - * Total history size in bytes, which the workflow might use to decide when to - * continue-as-new regardless of the suggestion. Note that history event count is - * just the event id of this event, so we don't include it explicitly here. - */ - historySizeBytes?: (Long|null); - - /** - * Version info of the worker to whom this task was dispatched. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Used by server internally to properly reapply build ID redirects to an execution - * when rebuilding it from events. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - buildIdRedirectCounter?: (Long|null); - } - - /** Represents a WorkflowTaskStartedEventAttributes. */ - class WorkflowTaskStartedEventAttributes implements IWorkflowTaskStartedEventAttributes { - - /** - * Constructs a new WorkflowTaskStartedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowTaskStartedEventAttributes); - - /** The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to */ - public scheduledEventId: Long; - - /** Identity of the worker who picked up this task */ - public identity: string; - - /** - * This field is populated from the RecordWorkflowTaskStartedRequest. Matching service would - * set the request_id on the RecordWorkflowTaskStartedRequest to a new UUID. This is useful - * in case a RecordWorkflowTaskStarted call succeed but matching doesn't get that response, - * so matching could retry and history service would return success if the request_id matches. - * In that case, matching will continue to deliver the task to worker. Without this field, history - * service would return AlreadyStarted error, and matching would drop the task. - */ - public requestId: string; - - /** True if this workflow should continue-as-new soon. See `suggest_continue_as_new_reasons` for why. */ - public suggestContinueAsNew: boolean; - - /** - * The reason(s) that suggest_continue_as_new is true, if it is. - * Unset if suggest_continue_as_new is false. - */ - public suggestContinueAsNewReasons: temporal.api.enums.v1.SuggestContinueAsNewReason[]; - - /** - * True if Workflow's Target Worker Deployment Version is different from its Pinned Version and - * the workflow is Pinned. - * Experimental. - */ - public targetWorkerDeploymentVersionChanged: boolean; - - /** - * Total history size in bytes, which the workflow might use to decide when to - * continue-as-new regardless of the suggestion. Note that history event count is - * just the event id of this event, so we don't include it explicitly here. - */ - public historySizeBytes: Long; - - /** - * Version info of the worker to whom this task was dispatched. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Used by server internally to properly reapply build ID redirects to an execution - * when rebuilding it from events. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public buildIdRedirectCounter: Long; - - /** - * Creates a new WorkflowTaskStartedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowTaskStartedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowTaskStartedEventAttributes): temporal.api.history.v1.WorkflowTaskStartedEventAttributes; - - /** - * Encodes the specified WorkflowTaskStartedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowTaskStartedEventAttributes.verify|verify} messages. - * @param message WorkflowTaskStartedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowTaskStartedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowTaskStartedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowTaskStartedEventAttributes.verify|verify} messages. - * @param message WorkflowTaskStartedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowTaskStartedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowTaskStartedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowTaskStartedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowTaskStartedEventAttributes; - - /** - * Decodes a WorkflowTaskStartedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowTaskStartedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowTaskStartedEventAttributes; - - /** - * Creates a WorkflowTaskStartedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowTaskStartedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowTaskStartedEventAttributes; - - /** - * Creates a plain object from a WorkflowTaskStartedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowTaskStartedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowTaskStartedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowTaskStartedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowTaskStartedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowTaskCompletedEventAttributes. */ - interface IWorkflowTaskCompletedEventAttributes { - - /** The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to */ - scheduledEventId?: (Long|null); - - /** The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to */ - startedEventId?: (Long|null); - - /** Identity of the worker who completed this task */ - identity?: (string|null); - - /** - * Binary ID of the worker who completed this task - * Deprecated. Replaced with `deployment_version`. - */ - binaryChecksum?: (string|null); - - /** - * Version info of the worker who processed this workflow task. If present, the `build_id` field - * within is also used as `binary_checksum`, which may be omitted in that case (it may also be - * populated to preserve compatibility). - * Deprecated. Use `deployment_version` and `versioning_behavior` instead. - */ - workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Data the SDK wishes to record for itself, but server need not interpret, and does not - * directly impact workflow state. - */ - sdkMetadata?: (temporal.api.sdk.v1.IWorkflowTaskCompletedMetadata|null); - - /** Local usage data sent during workflow task completion and recorded here for posterity */ - meteringMetadata?: (temporal.api.common.v1.IMeteringMetadata|null); - - /** - * The deployment that completed this task. May or may not be set for unversioned workers, - * depending on whether a value is sent by the SDK. This value updates workflow execution's - * `versioning_info.deployment`. - * Deprecated. Replaced with `deployment_version`. - */ - deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** - * Versioning behavior sent by the worker that completed this task for this particular workflow - * execution. UNSPECIFIED means the task was completed by an unversioned worker. This value - * updates workflow execution's `versioning_info.behavior`. - */ - versioningBehavior?: (temporal.api.enums.v1.VersioningBehavior|null); - - /** - * The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` - * is set. This value updates workflow execution's `versioning_info.version`. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - * Deprecated. Replaced with `deployment_version`. - */ - workerDeploymentVersion?: (string|null); - - /** - * The name of Worker Deployment that completed this task. Must be set if `versioning_behavior` - * is set. This value updates workflow execution's `worker_deployment_name`. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - */ - workerDeploymentName?: (string|null); - - /** - * The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` - * is set. This value updates workflow execution's `versioning_info.deployment_version`. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - */ - deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - } - - /** Represents a WorkflowTaskCompletedEventAttributes. */ - class WorkflowTaskCompletedEventAttributes implements IWorkflowTaskCompletedEventAttributes { - - /** - * Constructs a new WorkflowTaskCompletedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowTaskCompletedEventAttributes); - - /** The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to */ - public scheduledEventId: Long; - - /** The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to */ - public startedEventId: Long; - - /** Identity of the worker who completed this task */ - public identity: string; - - /** - * Binary ID of the worker who completed this task - * Deprecated. Replaced with `deployment_version`. - */ - public binaryChecksum: string; - - /** - * Version info of the worker who processed this workflow task. If present, the `build_id` field - * within is also used as `binary_checksum`, which may be omitted in that case (it may also be - * populated to preserve compatibility). - * Deprecated. Use `deployment_version` and `versioning_behavior` instead. - */ - public workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Data the SDK wishes to record for itself, but server need not interpret, and does not - * directly impact workflow state. - */ - public sdkMetadata?: (temporal.api.sdk.v1.IWorkflowTaskCompletedMetadata|null); - - /** Local usage data sent during workflow task completion and recorded here for posterity */ - public meteringMetadata?: (temporal.api.common.v1.IMeteringMetadata|null); - - /** - * The deployment that completed this task. May or may not be set for unversioned workers, - * depending on whether a value is sent by the SDK. This value updates workflow execution's - * `versioning_info.deployment`. - * Deprecated. Replaced with `deployment_version`. - */ - public deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** - * Versioning behavior sent by the worker that completed this task for this particular workflow - * execution. UNSPECIFIED means the task was completed by an unversioned worker. This value - * updates workflow execution's `versioning_info.behavior`. - */ - public versioningBehavior: temporal.api.enums.v1.VersioningBehavior; - - /** - * The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` - * is set. This value updates workflow execution's `versioning_info.version`. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - * Deprecated. Replaced with `deployment_version`. - */ - public workerDeploymentVersion: string; - - /** - * The name of Worker Deployment that completed this task. Must be set if `versioning_behavior` - * is set. This value updates workflow execution's `worker_deployment_name`. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - */ - public workerDeploymentName: string; - - /** - * The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` - * is set. This value updates workflow execution's `versioning_info.deployment_version`. - * Experimental. Worker Deployments are experimental and might significantly change in the future. - */ - public deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** - * Creates a new WorkflowTaskCompletedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowTaskCompletedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowTaskCompletedEventAttributes): temporal.api.history.v1.WorkflowTaskCompletedEventAttributes; - - /** - * Encodes the specified WorkflowTaskCompletedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowTaskCompletedEventAttributes.verify|verify} messages. - * @param message WorkflowTaskCompletedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowTaskCompletedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowTaskCompletedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowTaskCompletedEventAttributes.verify|verify} messages. - * @param message WorkflowTaskCompletedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowTaskCompletedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowTaskCompletedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowTaskCompletedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowTaskCompletedEventAttributes; - - /** - * Decodes a WorkflowTaskCompletedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowTaskCompletedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowTaskCompletedEventAttributes; - - /** - * Creates a WorkflowTaskCompletedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowTaskCompletedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowTaskCompletedEventAttributes; - - /** - * Creates a plain object from a WorkflowTaskCompletedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowTaskCompletedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowTaskCompletedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowTaskCompletedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowTaskCompletedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowTaskTimedOutEventAttributes. */ - interface IWorkflowTaskTimedOutEventAttributes { - - /** The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to */ - scheduledEventId?: (Long|null); - - /** The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to */ - startedEventId?: (Long|null); - - /** WorkflowTaskTimedOutEventAttributes timeoutType */ - timeoutType?: (temporal.api.enums.v1.TimeoutType|null); - } - - /** Represents a WorkflowTaskTimedOutEventAttributes. */ - class WorkflowTaskTimedOutEventAttributes implements IWorkflowTaskTimedOutEventAttributes { - - /** - * Constructs a new WorkflowTaskTimedOutEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowTaskTimedOutEventAttributes); - - /** The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to */ - public scheduledEventId: Long; - - /** The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to */ - public startedEventId: Long; - - /** WorkflowTaskTimedOutEventAttributes timeoutType. */ - public timeoutType: temporal.api.enums.v1.TimeoutType; - - /** - * Creates a new WorkflowTaskTimedOutEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowTaskTimedOutEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowTaskTimedOutEventAttributes): temporal.api.history.v1.WorkflowTaskTimedOutEventAttributes; - - /** - * Encodes the specified WorkflowTaskTimedOutEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowTaskTimedOutEventAttributes.verify|verify} messages. - * @param message WorkflowTaskTimedOutEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowTaskTimedOutEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowTaskTimedOutEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowTaskTimedOutEventAttributes.verify|verify} messages. - * @param message WorkflowTaskTimedOutEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowTaskTimedOutEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowTaskTimedOutEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowTaskTimedOutEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowTaskTimedOutEventAttributes; - - /** - * Decodes a WorkflowTaskTimedOutEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowTaskTimedOutEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowTaskTimedOutEventAttributes; - - /** - * Creates a WorkflowTaskTimedOutEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowTaskTimedOutEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowTaskTimedOutEventAttributes; - - /** - * Creates a plain object from a WorkflowTaskTimedOutEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowTaskTimedOutEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowTaskTimedOutEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowTaskTimedOutEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowTaskTimedOutEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowTaskFailedEventAttributes. */ - interface IWorkflowTaskFailedEventAttributes { - - /** The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to */ - scheduledEventId?: (Long|null); - - /** The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to */ - startedEventId?: (Long|null); - - /** WorkflowTaskFailedEventAttributes cause */ - cause?: (temporal.api.enums.v1.WorkflowTaskFailedCause|null); - - /** The failure details */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * If a worker explicitly failed this task, this field contains the worker's identity. - * When the server generates the failure internally this field is set as 'history-service'. - */ - identity?: (string|null); - - /** The original run id of the workflow. For reset workflow. */ - baseRunId?: (string|null); - - /** If the workflow is being reset, the new run id. */ - newRunId?: (string|null); - - /** - * Version of the event where the history branch was forked. Used by multi-cluster replication - * during resets to identify the correct history branch. - */ - forkEventVersion?: (Long|null); - - /** - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - * If a worker explicitly failed this task, its binary id - */ - binaryChecksum?: (string|null); - - /** - * Version info of the worker who processed this workflow task. If present, the `build_id` field - * within is also used as `binary_checksum`, which may be omitted in that case (it may also be - * populated to preserve compatibility). - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - } - - /** Represents a WorkflowTaskFailedEventAttributes. */ - class WorkflowTaskFailedEventAttributes implements IWorkflowTaskFailedEventAttributes { - - /** - * Constructs a new WorkflowTaskFailedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowTaskFailedEventAttributes); - - /** The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to */ - public scheduledEventId: Long; - - /** The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to */ - public startedEventId: Long; - - /** WorkflowTaskFailedEventAttributes cause. */ - public cause: temporal.api.enums.v1.WorkflowTaskFailedCause; - - /** The failure details */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * If a worker explicitly failed this task, this field contains the worker's identity. - * When the server generates the failure internally this field is set as 'history-service'. - */ - public identity: string; - - /** The original run id of the workflow. For reset workflow. */ - public baseRunId: string; - - /** If the workflow is being reset, the new run id. */ - public newRunId: string; - - /** - * Version of the event where the history branch was forked. Used by multi-cluster replication - * during resets to identify the correct history branch. - */ - public forkEventVersion: Long; - - /** - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - * If a worker explicitly failed this task, its binary id - */ - public binaryChecksum: string; - - /** - * Version info of the worker who processed this workflow task. If present, the `build_id` field - * within is also used as `binary_checksum`, which may be omitted in that case (it may also be - * populated to preserve compatibility). - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Creates a new WorkflowTaskFailedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowTaskFailedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowTaskFailedEventAttributes): temporal.api.history.v1.WorkflowTaskFailedEventAttributes; - - /** - * Encodes the specified WorkflowTaskFailedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowTaskFailedEventAttributes.verify|verify} messages. - * @param message WorkflowTaskFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowTaskFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowTaskFailedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowTaskFailedEventAttributes.verify|verify} messages. - * @param message WorkflowTaskFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowTaskFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowTaskFailedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowTaskFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowTaskFailedEventAttributes; - - /** - * Decodes a WorkflowTaskFailedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowTaskFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowTaskFailedEventAttributes; - - /** - * Creates a WorkflowTaskFailedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowTaskFailedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowTaskFailedEventAttributes; - - /** - * Creates a plain object from a WorkflowTaskFailedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowTaskFailedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowTaskFailedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowTaskFailedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowTaskFailedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityTaskScheduledEventAttributes. */ - interface IActivityTaskScheduledEventAttributes { - - /** The worker/user assigned identifier for the activity */ - activityId?: (string|null); - - /** ActivityTaskScheduledEventAttributes activityType */ - activityType?: (temporal.api.common.v1.IActivityType|null); - - /** ActivityTaskScheduledEventAttributes taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** ActivityTaskScheduledEventAttributes header */ - header?: (temporal.api.common.v1.IHeader|null); - - /** ActivityTaskScheduledEventAttributes input */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** - * Indicates how long the caller is willing to wait for an activity completion. Limits how long - * retries will be attempted. Either this or `start_to_close_timeout` must be specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Limits time an activity task can stay in a task queue before a worker picks it up. This - * timeout is always non retryable, as all a retry would achieve is to put it back into the same - * queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not - * specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Maximum time an activity is allowed to execute after being picked up by a worker. This - * timeout is always retryable. Either this or `schedule_to_close_timeout` must be - * specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Maximum permitted time between successful worker heartbeats. */ - heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - - /** - * Activities are assigned a default retry policy controlled by the service's dynamic - * configuration. Retries will happen up to `schedule_to_close_timeout`. To disable retries set - * retry_policy.maximum_attempts to 1. - */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** - * If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, - * Assignment rules of the activity's Task Queue will be used to determine the Build ID. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - useWorkflowBuildId?: (boolean|null); - - /** - * Priority metadata. If this message is not present, or any fields are not - * present, they inherit the values from the workflow. - */ - priority?: (temporal.api.common.v1.IPriority|null); - } - - /** Represents an ActivityTaskScheduledEventAttributes. */ - class ActivityTaskScheduledEventAttributes implements IActivityTaskScheduledEventAttributes { - - /** - * Constructs a new ActivityTaskScheduledEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IActivityTaskScheduledEventAttributes); - - /** The worker/user assigned identifier for the activity */ - public activityId: string; - - /** ActivityTaskScheduledEventAttributes activityType. */ - public activityType?: (temporal.api.common.v1.IActivityType|null); - - /** ActivityTaskScheduledEventAttributes taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** ActivityTaskScheduledEventAttributes header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** ActivityTaskScheduledEventAttributes input. */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** - * Indicates how long the caller is willing to wait for an activity completion. Limits how long - * retries will be attempted. Either this or `start_to_close_timeout` must be specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Limits time an activity task can stay in a task queue before a worker picks it up. This - * timeout is always non retryable, as all a retry would achieve is to put it back into the same - * queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not - * specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Maximum time an activity is allowed to execute after being picked up by a worker. This - * timeout is always retryable. Either this or `schedule_to_close_timeout` must be - * specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Maximum permitted time between successful worker heartbeats. */ - public heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** - * Activities are assigned a default retry policy controlled by the service's dynamic - * configuration. Retries will happen up to `schedule_to_close_timeout`. To disable retries set - * retry_policy.maximum_attempts to 1. - */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** - * If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, - * Assignment rules of the activity's Task Queue will be used to determine the Build ID. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public useWorkflowBuildId: boolean; - - /** - * Priority metadata. If this message is not present, or any fields are not - * present, they inherit the values from the workflow. - */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Creates a new ActivityTaskScheduledEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityTaskScheduledEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IActivityTaskScheduledEventAttributes): temporal.api.history.v1.ActivityTaskScheduledEventAttributes; - - /** - * Encodes the specified ActivityTaskScheduledEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ActivityTaskScheduledEventAttributes.verify|verify} messages. - * @param message ActivityTaskScheduledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IActivityTaskScheduledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityTaskScheduledEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ActivityTaskScheduledEventAttributes.verify|verify} messages. - * @param message ActivityTaskScheduledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IActivityTaskScheduledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityTaskScheduledEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityTaskScheduledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ActivityTaskScheduledEventAttributes; - - /** - * Decodes an ActivityTaskScheduledEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityTaskScheduledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ActivityTaskScheduledEventAttributes; - - /** - * Creates an ActivityTaskScheduledEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityTaskScheduledEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ActivityTaskScheduledEventAttributes; - - /** - * Creates a plain object from an ActivityTaskScheduledEventAttributes message. Also converts values to other types if specified. - * @param message ActivityTaskScheduledEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ActivityTaskScheduledEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityTaskScheduledEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityTaskScheduledEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityTaskStartedEventAttributes. */ - interface IActivityTaskStartedEventAttributes { - - /** The id of the `ACTIVITY_TASK_SCHEDULED` event this task corresponds to */ - scheduledEventId?: (Long|null); - - /** id of the worker that picked up this task */ - identity?: (string|null); - - /** - * This field is populated from the RecordActivityTaskStartedRequest. Matching service would - * set the request_id on the RecordActivityTaskStartedRequest to a new UUID. This is useful - * in case a RecordActivityTaskStarted call succeed but matching doesn't get that response, - * so matching could retry and history service would return success if the request_id matches. - * In that case, matching will continue to deliver the task to worker. Without this field, history - * service would return AlreadyStarted error, and matching would drop the task. - */ - requestId?: (string|null); - - /** Starting at 1, the number of times this task has been attempted */ - attempt?: (number|null); - - /** - * Will be set to the most recent failure details, if this task has previously failed and then - * been retried. - */ - lastFailure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Version info of the worker to whom this task was dispatched. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Used by server internally to properly reapply build ID redirects to an execution - * when rebuilding it from events. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - buildIdRedirectCounter?: (Long|null); - } - - /** Represents an ActivityTaskStartedEventAttributes. */ - class ActivityTaskStartedEventAttributes implements IActivityTaskStartedEventAttributes { - - /** - * Constructs a new ActivityTaskStartedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IActivityTaskStartedEventAttributes); - - /** The id of the `ACTIVITY_TASK_SCHEDULED` event this task corresponds to */ - public scheduledEventId: Long; - - /** id of the worker that picked up this task */ - public identity: string; - - /** - * This field is populated from the RecordActivityTaskStartedRequest. Matching service would - * set the request_id on the RecordActivityTaskStartedRequest to a new UUID. This is useful - * in case a RecordActivityTaskStarted call succeed but matching doesn't get that response, - * so matching could retry and history service would return success if the request_id matches. - * In that case, matching will continue to deliver the task to worker. Without this field, history - * service would return AlreadyStarted error, and matching would drop the task. - */ - public requestId: string; - - /** Starting at 1, the number of times this task has been attempted */ - public attempt: number; - - /** - * Will be set to the most recent failure details, if this task has previously failed and then - * been retried. - */ - public lastFailure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Version info of the worker to whom this task was dispatched. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Used by server internally to properly reapply build ID redirects to an execution - * when rebuilding it from events. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public buildIdRedirectCounter: Long; - - /** - * Creates a new ActivityTaskStartedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityTaskStartedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IActivityTaskStartedEventAttributes): temporal.api.history.v1.ActivityTaskStartedEventAttributes; - - /** - * Encodes the specified ActivityTaskStartedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ActivityTaskStartedEventAttributes.verify|verify} messages. - * @param message ActivityTaskStartedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IActivityTaskStartedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityTaskStartedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ActivityTaskStartedEventAttributes.verify|verify} messages. - * @param message ActivityTaskStartedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IActivityTaskStartedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityTaskStartedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityTaskStartedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ActivityTaskStartedEventAttributes; - - /** - * Decodes an ActivityTaskStartedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityTaskStartedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ActivityTaskStartedEventAttributes; - - /** - * Creates an ActivityTaskStartedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityTaskStartedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ActivityTaskStartedEventAttributes; - - /** - * Creates a plain object from an ActivityTaskStartedEventAttributes message. Also converts values to other types if specified. - * @param message ActivityTaskStartedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ActivityTaskStartedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityTaskStartedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityTaskStartedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityTaskCompletedEventAttributes. */ - interface IActivityTaskCompletedEventAttributes { - - /** Serialized results of the activity. IE: The return value of the activity function */ - result?: (temporal.api.common.v1.IPayloads|null); - - /** The id of the `ACTIVITY_TASK_SCHEDULED` event this completion corresponds to */ - scheduledEventId?: (Long|null); - - /** The id of the `ACTIVITY_TASK_STARTED` event this completion corresponds to */ - startedEventId?: (Long|null); - - /** id of the worker that completed this task */ - identity?: (string|null); - - /** - * Version info of the worker who processed this workflow task. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - } - - /** Represents an ActivityTaskCompletedEventAttributes. */ - class ActivityTaskCompletedEventAttributes implements IActivityTaskCompletedEventAttributes { - - /** - * Constructs a new ActivityTaskCompletedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IActivityTaskCompletedEventAttributes); - - /** Serialized results of the activity. IE: The return value of the activity function */ - public result?: (temporal.api.common.v1.IPayloads|null); - - /** The id of the `ACTIVITY_TASK_SCHEDULED` event this completion corresponds to */ - public scheduledEventId: Long; - - /** The id of the `ACTIVITY_TASK_STARTED` event this completion corresponds to */ - public startedEventId: Long; - - /** id of the worker that completed this task */ - public identity: string; - - /** - * Version info of the worker who processed this workflow task. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Creates a new ActivityTaskCompletedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityTaskCompletedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IActivityTaskCompletedEventAttributes): temporal.api.history.v1.ActivityTaskCompletedEventAttributes; - - /** - * Encodes the specified ActivityTaskCompletedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ActivityTaskCompletedEventAttributes.verify|verify} messages. - * @param message ActivityTaskCompletedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IActivityTaskCompletedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityTaskCompletedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ActivityTaskCompletedEventAttributes.verify|verify} messages. - * @param message ActivityTaskCompletedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IActivityTaskCompletedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityTaskCompletedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityTaskCompletedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ActivityTaskCompletedEventAttributes; - - /** - * Decodes an ActivityTaskCompletedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityTaskCompletedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ActivityTaskCompletedEventAttributes; - - /** - * Creates an ActivityTaskCompletedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityTaskCompletedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ActivityTaskCompletedEventAttributes; - - /** - * Creates a plain object from an ActivityTaskCompletedEventAttributes message. Also converts values to other types if specified. - * @param message ActivityTaskCompletedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ActivityTaskCompletedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityTaskCompletedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityTaskCompletedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityTaskFailedEventAttributes. */ - interface IActivityTaskFailedEventAttributes { - - /** Failure details */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** The id of the `ACTIVITY_TASK_SCHEDULED` event this failure corresponds to */ - scheduledEventId?: (Long|null); - - /** The id of the `ACTIVITY_TASK_STARTED` event this failure corresponds to */ - startedEventId?: (Long|null); - - /** id of the worker that failed this task */ - identity?: (string|null); - - /** ActivityTaskFailedEventAttributes retryState */ - retryState?: (temporal.api.enums.v1.RetryState|null); - - /** - * Version info of the worker who processed this workflow task. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - } - - /** Represents an ActivityTaskFailedEventAttributes. */ - class ActivityTaskFailedEventAttributes implements IActivityTaskFailedEventAttributes { - - /** - * Constructs a new ActivityTaskFailedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IActivityTaskFailedEventAttributes); - - /** Failure details */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** The id of the `ACTIVITY_TASK_SCHEDULED` event this failure corresponds to */ - public scheduledEventId: Long; - - /** The id of the `ACTIVITY_TASK_STARTED` event this failure corresponds to */ - public startedEventId: Long; - - /** id of the worker that failed this task */ - public identity: string; - - /** ActivityTaskFailedEventAttributes retryState. */ - public retryState: temporal.api.enums.v1.RetryState; - - /** - * Version info of the worker who processed this workflow task. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Creates a new ActivityTaskFailedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityTaskFailedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IActivityTaskFailedEventAttributes): temporal.api.history.v1.ActivityTaskFailedEventAttributes; - - /** - * Encodes the specified ActivityTaskFailedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ActivityTaskFailedEventAttributes.verify|verify} messages. - * @param message ActivityTaskFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IActivityTaskFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityTaskFailedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ActivityTaskFailedEventAttributes.verify|verify} messages. - * @param message ActivityTaskFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IActivityTaskFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityTaskFailedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityTaskFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ActivityTaskFailedEventAttributes; - - /** - * Decodes an ActivityTaskFailedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityTaskFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ActivityTaskFailedEventAttributes; - - /** - * Creates an ActivityTaskFailedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityTaskFailedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ActivityTaskFailedEventAttributes; - - /** - * Creates a plain object from an ActivityTaskFailedEventAttributes message. Also converts values to other types if specified. - * @param message ActivityTaskFailedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ActivityTaskFailedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityTaskFailedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityTaskFailedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityTaskTimedOutEventAttributes. */ - interface IActivityTaskTimedOutEventAttributes { - - /** - * If this activity had failed, was retried, and then timed out, that failure is stored as the - * `cause` in here. - */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** The id of the `ACTIVITY_TASK_SCHEDULED` event this timeout corresponds to */ - scheduledEventId?: (Long|null); - - /** The id of the `ACTIVITY_TASK_STARTED` event this timeout corresponds to */ - startedEventId?: (Long|null); - - /** ActivityTaskTimedOutEventAttributes retryState */ - retryState?: (temporal.api.enums.v1.RetryState|null); - } - - /** Represents an ActivityTaskTimedOutEventAttributes. */ - class ActivityTaskTimedOutEventAttributes implements IActivityTaskTimedOutEventAttributes { - - /** - * Constructs a new ActivityTaskTimedOutEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IActivityTaskTimedOutEventAttributes); - - /** - * If this activity had failed, was retried, and then timed out, that failure is stored as the - * `cause` in here. - */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** The id of the `ACTIVITY_TASK_SCHEDULED` event this timeout corresponds to */ - public scheduledEventId: Long; - - /** The id of the `ACTIVITY_TASK_STARTED` event this timeout corresponds to */ - public startedEventId: Long; - - /** ActivityTaskTimedOutEventAttributes retryState. */ - public retryState: temporal.api.enums.v1.RetryState; - - /** - * Creates a new ActivityTaskTimedOutEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityTaskTimedOutEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IActivityTaskTimedOutEventAttributes): temporal.api.history.v1.ActivityTaskTimedOutEventAttributes; - - /** - * Encodes the specified ActivityTaskTimedOutEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ActivityTaskTimedOutEventAttributes.verify|verify} messages. - * @param message ActivityTaskTimedOutEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IActivityTaskTimedOutEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityTaskTimedOutEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ActivityTaskTimedOutEventAttributes.verify|verify} messages. - * @param message ActivityTaskTimedOutEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IActivityTaskTimedOutEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityTaskTimedOutEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityTaskTimedOutEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ActivityTaskTimedOutEventAttributes; - - /** - * Decodes an ActivityTaskTimedOutEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityTaskTimedOutEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ActivityTaskTimedOutEventAttributes; - - /** - * Creates an ActivityTaskTimedOutEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityTaskTimedOutEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ActivityTaskTimedOutEventAttributes; - - /** - * Creates a plain object from an ActivityTaskTimedOutEventAttributes message. Also converts values to other types if specified. - * @param message ActivityTaskTimedOutEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ActivityTaskTimedOutEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityTaskTimedOutEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityTaskTimedOutEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityTaskCancelRequestedEventAttributes. */ - interface IActivityTaskCancelRequestedEventAttributes { - - /** The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel request corresponds to */ - scheduledEventId?: (Long|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - } - - /** Represents an ActivityTaskCancelRequestedEventAttributes. */ - class ActivityTaskCancelRequestedEventAttributes implements IActivityTaskCancelRequestedEventAttributes { - - /** - * Constructs a new ActivityTaskCancelRequestedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IActivityTaskCancelRequestedEventAttributes); - - /** The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel request corresponds to */ - public scheduledEventId: Long; - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** - * Creates a new ActivityTaskCancelRequestedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityTaskCancelRequestedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IActivityTaskCancelRequestedEventAttributes): temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributes; - - /** - * Encodes the specified ActivityTaskCancelRequestedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributes.verify|verify} messages. - * @param message ActivityTaskCancelRequestedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IActivityTaskCancelRequestedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityTaskCancelRequestedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributes.verify|verify} messages. - * @param message ActivityTaskCancelRequestedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IActivityTaskCancelRequestedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityTaskCancelRequestedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityTaskCancelRequestedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributes; - - /** - * Decodes an ActivityTaskCancelRequestedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityTaskCancelRequestedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributes; - - /** - * Creates an ActivityTaskCancelRequestedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityTaskCancelRequestedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributes; - - /** - * Creates a plain object from an ActivityTaskCancelRequestedEventAttributes message. Also converts values to other types if specified. - * @param message ActivityTaskCancelRequestedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityTaskCancelRequestedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityTaskCancelRequestedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityTaskCanceledEventAttributes. */ - interface IActivityTaskCanceledEventAttributes { - - /** Additional information that the activity reported upon confirming cancellation */ - details?: (temporal.api.common.v1.IPayloads|null); - - /** - * id of the most recent `ACTIVITY_TASK_CANCEL_REQUESTED` event which refers to the same - * activity - */ - latestCancelRequestedEventId?: (Long|null); - - /** The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel confirmation corresponds to */ - scheduledEventId?: (Long|null); - - /** The id of the `ACTIVITY_TASK_STARTED` event this cancel confirmation corresponds to */ - startedEventId?: (Long|null); - - /** id of the worker who canceled this activity */ - identity?: (string|null); - - /** - * Version info of the worker who processed this workflow task. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - } - - /** Represents an ActivityTaskCanceledEventAttributes. */ - class ActivityTaskCanceledEventAttributes implements IActivityTaskCanceledEventAttributes { - - /** - * Constructs a new ActivityTaskCanceledEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IActivityTaskCanceledEventAttributes); - - /** Additional information that the activity reported upon confirming cancellation */ - public details?: (temporal.api.common.v1.IPayloads|null); - - /** - * id of the most recent `ACTIVITY_TASK_CANCEL_REQUESTED` event which refers to the same - * activity - */ - public latestCancelRequestedEventId: Long; - - /** The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel confirmation corresponds to */ - public scheduledEventId: Long; - - /** The id of the `ACTIVITY_TASK_STARTED` event this cancel confirmation corresponds to */ - public startedEventId: Long; - - /** id of the worker who canceled this activity */ - public identity: string; - - /** - * Version info of the worker who processed this workflow task. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public workerVersion?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Creates a new ActivityTaskCanceledEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityTaskCanceledEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IActivityTaskCanceledEventAttributes): temporal.api.history.v1.ActivityTaskCanceledEventAttributes; - - /** - * Encodes the specified ActivityTaskCanceledEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ActivityTaskCanceledEventAttributes.verify|verify} messages. - * @param message ActivityTaskCanceledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IActivityTaskCanceledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityTaskCanceledEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ActivityTaskCanceledEventAttributes.verify|verify} messages. - * @param message ActivityTaskCanceledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IActivityTaskCanceledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityTaskCanceledEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityTaskCanceledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ActivityTaskCanceledEventAttributes; - - /** - * Decodes an ActivityTaskCanceledEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityTaskCanceledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ActivityTaskCanceledEventAttributes; - - /** - * Creates an ActivityTaskCanceledEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityTaskCanceledEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ActivityTaskCanceledEventAttributes; - - /** - * Creates a plain object from an ActivityTaskCanceledEventAttributes message. Also converts values to other types if specified. - * @param message ActivityTaskCanceledEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ActivityTaskCanceledEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityTaskCanceledEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityTaskCanceledEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TimerStartedEventAttributes. */ - interface ITimerStartedEventAttributes { - - /** The worker/user assigned id for this timer */ - timerId?: (string|null); - - /** - * How long until this timer fires - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - startToFireTimeout?: (google.protobuf.IDuration|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - } - - /** Represents a TimerStartedEventAttributes. */ - class TimerStartedEventAttributes implements ITimerStartedEventAttributes { - - /** - * Constructs a new TimerStartedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.ITimerStartedEventAttributes); - - /** The worker/user assigned id for this timer */ - public timerId: string; - - /** - * How long until this timer fires - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public startToFireTimeout?: (google.protobuf.IDuration|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** - * Creates a new TimerStartedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns TimerStartedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.ITimerStartedEventAttributes): temporal.api.history.v1.TimerStartedEventAttributes; - - /** - * Encodes the specified TimerStartedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.TimerStartedEventAttributes.verify|verify} messages. - * @param message TimerStartedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.ITimerStartedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimerStartedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.TimerStartedEventAttributes.verify|verify} messages. - * @param message TimerStartedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.ITimerStartedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimerStartedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimerStartedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.TimerStartedEventAttributes; - - /** - * Decodes a TimerStartedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimerStartedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.TimerStartedEventAttributes; - - /** - * Creates a TimerStartedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimerStartedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.TimerStartedEventAttributes; - - /** - * Creates a plain object from a TimerStartedEventAttributes message. Also converts values to other types if specified. - * @param message TimerStartedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.TimerStartedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimerStartedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TimerStartedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TimerFiredEventAttributes. */ - interface ITimerFiredEventAttributes { - - /** Will match the `timer_id` from `TIMER_STARTED` event for this timer */ - timerId?: (string|null); - - /** The id of the `TIMER_STARTED` event itself */ - startedEventId?: (Long|null); - } - - /** Represents a TimerFiredEventAttributes. */ - class TimerFiredEventAttributes implements ITimerFiredEventAttributes { - - /** - * Constructs a new TimerFiredEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.ITimerFiredEventAttributes); - - /** Will match the `timer_id` from `TIMER_STARTED` event for this timer */ - public timerId: string; - - /** The id of the `TIMER_STARTED` event itself */ - public startedEventId: Long; - - /** - * Creates a new TimerFiredEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns TimerFiredEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.ITimerFiredEventAttributes): temporal.api.history.v1.TimerFiredEventAttributes; - - /** - * Encodes the specified TimerFiredEventAttributes message. Does not implicitly {@link temporal.api.history.v1.TimerFiredEventAttributes.verify|verify} messages. - * @param message TimerFiredEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.ITimerFiredEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimerFiredEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.TimerFiredEventAttributes.verify|verify} messages. - * @param message TimerFiredEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.ITimerFiredEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimerFiredEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimerFiredEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.TimerFiredEventAttributes; - - /** - * Decodes a TimerFiredEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimerFiredEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.TimerFiredEventAttributes; - - /** - * Creates a TimerFiredEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimerFiredEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.TimerFiredEventAttributes; - - /** - * Creates a plain object from a TimerFiredEventAttributes message. Also converts values to other types if specified. - * @param message TimerFiredEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.TimerFiredEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimerFiredEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TimerFiredEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TimerCanceledEventAttributes. */ - interface ITimerCanceledEventAttributes { - - /** Will match the `timer_id` from `TIMER_STARTED` event for this timer */ - timerId?: (string|null); - - /** The id of the `TIMER_STARTED` event itself */ - startedEventId?: (Long|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - - /** The id of the worker who requested this cancel */ - identity?: (string|null); - } - - /** Represents a TimerCanceledEventAttributes. */ - class TimerCanceledEventAttributes implements ITimerCanceledEventAttributes { - - /** - * Constructs a new TimerCanceledEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.ITimerCanceledEventAttributes); - - /** Will match the `timer_id` from `TIMER_STARTED` event for this timer */ - public timerId: string; - - /** The id of the `TIMER_STARTED` event itself */ - public startedEventId: Long; - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** The id of the worker who requested this cancel */ - public identity: string; - - /** - * Creates a new TimerCanceledEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns TimerCanceledEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.ITimerCanceledEventAttributes): temporal.api.history.v1.TimerCanceledEventAttributes; - - /** - * Encodes the specified TimerCanceledEventAttributes message. Does not implicitly {@link temporal.api.history.v1.TimerCanceledEventAttributes.verify|verify} messages. - * @param message TimerCanceledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.ITimerCanceledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimerCanceledEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.TimerCanceledEventAttributes.verify|verify} messages. - * @param message TimerCanceledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.ITimerCanceledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimerCanceledEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimerCanceledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.TimerCanceledEventAttributes; - - /** - * Decodes a TimerCanceledEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimerCanceledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.TimerCanceledEventAttributes; - - /** - * Creates a TimerCanceledEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimerCanceledEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.TimerCanceledEventAttributes; - - /** - * Creates a plain object from a TimerCanceledEventAttributes message. Also converts values to other types if specified. - * @param message TimerCanceledEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.TimerCanceledEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimerCanceledEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TimerCanceledEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionCancelRequestedEventAttributes. */ - interface IWorkflowExecutionCancelRequestedEventAttributes { - - /** User provided reason for requesting cancellation */ - cause?: (string|null); - - /** - * The ID of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event in the external - * workflow history when the cancellation was requested by another workflow. - */ - externalInitiatedEventId?: (Long|null); - - /** WorkflowExecutionCancelRequestedEventAttributes externalWorkflowExecution */ - externalWorkflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** id of the worker or client who requested this cancel */ - identity?: (string|null); - } - - /** Represents a WorkflowExecutionCancelRequestedEventAttributes. */ - class WorkflowExecutionCancelRequestedEventAttributes implements IWorkflowExecutionCancelRequestedEventAttributes { - - /** - * Constructs a new WorkflowExecutionCancelRequestedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionCancelRequestedEventAttributes); - - /** User provided reason for requesting cancellation */ - public cause: string; - - /** - * The ID of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event in the external - * workflow history when the cancellation was requested by another workflow. - */ - public externalInitiatedEventId: Long; - - /** WorkflowExecutionCancelRequestedEventAttributes externalWorkflowExecution. */ - public externalWorkflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** id of the worker or client who requested this cancel */ - public identity: string; - - /** - * Creates a new WorkflowExecutionCancelRequestedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionCancelRequestedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionCancelRequestedEventAttributes): temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributes; - - /** - * Encodes the specified WorkflowExecutionCancelRequestedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionCancelRequestedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionCancelRequestedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionCancelRequestedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionCancelRequestedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionCancelRequestedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionCancelRequestedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionCancelRequestedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributes; - - /** - * Decodes a WorkflowExecutionCancelRequestedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionCancelRequestedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributes; - - /** - * Creates a WorkflowExecutionCancelRequestedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionCancelRequestedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionCancelRequestedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionCancelRequestedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionCancelRequestedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionCancelRequestedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionCanceledEventAttributes. */ - interface IWorkflowExecutionCanceledEventAttributes { - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - - /** WorkflowExecutionCanceledEventAttributes details */ - details?: (temporal.api.common.v1.IPayloads|null); - } - - /** Represents a WorkflowExecutionCanceledEventAttributes. */ - class WorkflowExecutionCanceledEventAttributes implements IWorkflowExecutionCanceledEventAttributes { - - /** - * Constructs a new WorkflowExecutionCanceledEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionCanceledEventAttributes); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** WorkflowExecutionCanceledEventAttributes details. */ - public details?: (temporal.api.common.v1.IPayloads|null); - - /** - * Creates a new WorkflowExecutionCanceledEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionCanceledEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionCanceledEventAttributes): temporal.api.history.v1.WorkflowExecutionCanceledEventAttributes; - - /** - * Encodes the specified WorkflowExecutionCanceledEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionCanceledEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionCanceledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionCanceledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionCanceledEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionCanceledEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionCanceledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionCanceledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionCanceledEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionCanceledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionCanceledEventAttributes; - - /** - * Decodes a WorkflowExecutionCanceledEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionCanceledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionCanceledEventAttributes; - - /** - * Creates a WorkflowExecutionCanceledEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionCanceledEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionCanceledEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionCanceledEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionCanceledEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionCanceledEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionCanceledEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionCanceledEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MarkerRecordedEventAttributes. */ - interface IMarkerRecordedEventAttributes { - - /** Workers use this to identify the "types" of various markers. Ex: Local activity, side effect. */ - markerName?: (string|null); - - /** Serialized information recorded in the marker */ - details?: ({ [k: string]: temporal.api.common.v1.IPayloads }|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - - /** MarkerRecordedEventAttributes header */ - header?: (temporal.api.common.v1.IHeader|null); - - /** Some uses of markers, like a local activity, could "fail". If they did that is recorded here. */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** Represents a MarkerRecordedEventAttributes. */ - class MarkerRecordedEventAttributes implements IMarkerRecordedEventAttributes { - - /** - * Constructs a new MarkerRecordedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IMarkerRecordedEventAttributes); - - /** Workers use this to identify the "types" of various markers. Ex: Local activity, side effect. */ - public markerName: string; - - /** Serialized information recorded in the marker */ - public details: { [k: string]: temporal.api.common.v1.IPayloads }; - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** MarkerRecordedEventAttributes header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** Some uses of markers, like a local activity, could "fail". If they did that is recorded here. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new MarkerRecordedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns MarkerRecordedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IMarkerRecordedEventAttributes): temporal.api.history.v1.MarkerRecordedEventAttributes; - - /** - * Encodes the specified MarkerRecordedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.MarkerRecordedEventAttributes.verify|verify} messages. - * @param message MarkerRecordedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IMarkerRecordedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MarkerRecordedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.MarkerRecordedEventAttributes.verify|verify} messages. - * @param message MarkerRecordedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IMarkerRecordedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MarkerRecordedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MarkerRecordedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.MarkerRecordedEventAttributes; - - /** - * Decodes a MarkerRecordedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MarkerRecordedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.MarkerRecordedEventAttributes; - - /** - * Creates a MarkerRecordedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MarkerRecordedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.MarkerRecordedEventAttributes; - - /** - * Creates a plain object from a MarkerRecordedEventAttributes message. Also converts values to other types if specified. - * @param message MarkerRecordedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.MarkerRecordedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MarkerRecordedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MarkerRecordedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionSignaledEventAttributes. */ - interface IWorkflowExecutionSignaledEventAttributes { - - /** The name/type of the signal to fire */ - signalName?: (string|null); - - /** Will be deserialized and provided as argument(s) to the signal handler */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** id of the worker/client who sent this signal */ - identity?: (string|null); - - /** - * Headers that were passed by the sender of the signal and copied by temporal - * server into the workflow task. - */ - header?: (temporal.api.common.v1.IHeader|null); - - /** Deprecated. This field is never respected and should always be set to false. */ - skipGenerateWorkflowTask?: (boolean|null); - - /** When signal origin is a workflow execution, this field is set. */ - externalWorkflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - } - - /** Represents a WorkflowExecutionSignaledEventAttributes. */ - class WorkflowExecutionSignaledEventAttributes implements IWorkflowExecutionSignaledEventAttributes { - - /** - * Constructs a new WorkflowExecutionSignaledEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionSignaledEventAttributes); - - /** The name/type of the signal to fire */ - public signalName: string; - - /** Will be deserialized and provided as argument(s) to the signal handler */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** id of the worker/client who sent this signal */ - public identity: string; - - /** - * Headers that were passed by the sender of the signal and copied by temporal - * server into the workflow task. - */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** Deprecated. This field is never respected and should always be set to false. */ - public skipGenerateWorkflowTask: boolean; - - /** When signal origin is a workflow execution, this field is set. */ - public externalWorkflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * Creates a new WorkflowExecutionSignaledEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionSignaledEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionSignaledEventAttributes): temporal.api.history.v1.WorkflowExecutionSignaledEventAttributes; - - /** - * Encodes the specified WorkflowExecutionSignaledEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionSignaledEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionSignaledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionSignaledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionSignaledEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionSignaledEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionSignaledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionSignaledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionSignaledEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionSignaledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionSignaledEventAttributes; - - /** - * Decodes a WorkflowExecutionSignaledEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionSignaledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionSignaledEventAttributes; - - /** - * Creates a WorkflowExecutionSignaledEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionSignaledEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionSignaledEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionSignaledEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionSignaledEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionSignaledEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionSignaledEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionSignaledEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionTerminatedEventAttributes. */ - interface IWorkflowExecutionTerminatedEventAttributes { - - /** User/client provided reason for termination */ - reason?: (string|null); - - /** WorkflowExecutionTerminatedEventAttributes details */ - details?: (temporal.api.common.v1.IPayloads|null); - - /** id of the client who requested termination */ - identity?: (string|null); - } - - /** Represents a WorkflowExecutionTerminatedEventAttributes. */ - class WorkflowExecutionTerminatedEventAttributes implements IWorkflowExecutionTerminatedEventAttributes { - - /** - * Constructs a new WorkflowExecutionTerminatedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionTerminatedEventAttributes); - - /** User/client provided reason for termination */ - public reason: string; - - /** WorkflowExecutionTerminatedEventAttributes details. */ - public details?: (temporal.api.common.v1.IPayloads|null); - - /** id of the client who requested termination */ - public identity: string; - - /** - * Creates a new WorkflowExecutionTerminatedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionTerminatedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionTerminatedEventAttributes): temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributes; - - /** - * Encodes the specified WorkflowExecutionTerminatedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionTerminatedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionTerminatedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionTerminatedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionTerminatedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionTerminatedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionTerminatedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionTerminatedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributes; - - /** - * Decodes a WorkflowExecutionTerminatedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionTerminatedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributes; - - /** - * Creates a WorkflowExecutionTerminatedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionTerminatedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionTerminatedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionTerminatedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionTerminatedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionTerminatedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RequestCancelExternalWorkflowExecutionInitiatedEventAttributes. */ - interface IRequestCancelExternalWorkflowExecutionInitiatedEventAttributes { - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - - /** - * The namespace the workflow to be cancelled lives in. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - namespace?: (string|null); - - /** RequestCancelExternalWorkflowExecutionInitiatedEventAttributes namespaceId */ - namespaceId?: (string|null); - - /** RequestCancelExternalWorkflowExecutionInitiatedEventAttributes workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** Deprecated. */ - control?: (string|null); - - /** - * Workers are expected to set this to true if the workflow they are requesting to cancel is - * a child of the workflow which issued the request - */ - childWorkflowOnly?: (boolean|null); - - /** Reason for requesting the cancellation */ - reason?: (string|null); - } - - /** Represents a RequestCancelExternalWorkflowExecutionInitiatedEventAttributes. */ - class RequestCancelExternalWorkflowExecutionInitiatedEventAttributes implements IRequestCancelExternalWorkflowExecutionInitiatedEventAttributes { - - /** - * Constructs a new RequestCancelExternalWorkflowExecutionInitiatedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IRequestCancelExternalWorkflowExecutionInitiatedEventAttributes); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** - * The namespace the workflow to be cancelled lives in. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - public namespace: string; - - /** RequestCancelExternalWorkflowExecutionInitiatedEventAttributes namespaceId. */ - public namespaceId: string; - - /** RequestCancelExternalWorkflowExecutionInitiatedEventAttributes workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** Deprecated. */ - public control: string; - - /** - * Workers are expected to set this to true if the workflow they are requesting to cancel is - * a child of the workflow which issued the request - */ - public childWorkflowOnly: boolean; - - /** Reason for requesting the cancellation */ - public reason: string; - - /** - * Creates a new RequestCancelExternalWorkflowExecutionInitiatedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestCancelExternalWorkflowExecutionInitiatedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IRequestCancelExternalWorkflowExecutionInitiatedEventAttributes): temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes; - - /** - * Encodes the specified RequestCancelExternalWorkflowExecutionInitiatedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes.verify|verify} messages. - * @param message RequestCancelExternalWorkflowExecutionInitiatedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IRequestCancelExternalWorkflowExecutionInitiatedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCancelExternalWorkflowExecutionInitiatedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes.verify|verify} messages. - * @param message RequestCancelExternalWorkflowExecutionInitiatedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IRequestCancelExternalWorkflowExecutionInitiatedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestCancelExternalWorkflowExecutionInitiatedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestCancelExternalWorkflowExecutionInitiatedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes; - - /** - * Decodes a RequestCancelExternalWorkflowExecutionInitiatedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestCancelExternalWorkflowExecutionInitiatedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes; - - /** - * Creates a RequestCancelExternalWorkflowExecutionInitiatedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCancelExternalWorkflowExecutionInitiatedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes; - - /** - * Creates a plain object from a RequestCancelExternalWorkflowExecutionInitiatedEventAttributes message. Also converts values to other types if specified. - * @param message RequestCancelExternalWorkflowExecutionInitiatedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCancelExternalWorkflowExecutionInitiatedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestCancelExternalWorkflowExecutionInitiatedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RequestCancelExternalWorkflowExecutionFailedEventAttributes. */ - interface IRequestCancelExternalWorkflowExecutionFailedEventAttributes { - - /** RequestCancelExternalWorkflowExecutionFailedEventAttributes cause */ - cause?: (temporal.api.enums.v1.CancelExternalWorkflowExecutionFailedCause|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - - /** - * Namespace of the workflow which failed to cancel. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - namespace?: (string|null); - - /** RequestCancelExternalWorkflowExecutionFailedEventAttributes namespaceId */ - namespaceId?: (string|null); - - /** RequestCancelExternalWorkflowExecutionFailedEventAttributes workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this failure - * corresponds to - */ - initiatedEventId?: (Long|null); - - /** Deprecated. */ - control?: (string|null); - } - - /** Represents a RequestCancelExternalWorkflowExecutionFailedEventAttributes. */ - class RequestCancelExternalWorkflowExecutionFailedEventAttributes implements IRequestCancelExternalWorkflowExecutionFailedEventAttributes { - - /** - * Constructs a new RequestCancelExternalWorkflowExecutionFailedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IRequestCancelExternalWorkflowExecutionFailedEventAttributes); - - /** RequestCancelExternalWorkflowExecutionFailedEventAttributes cause. */ - public cause: temporal.api.enums.v1.CancelExternalWorkflowExecutionFailedCause; - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** - * Namespace of the workflow which failed to cancel. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - public namespace: string; - - /** RequestCancelExternalWorkflowExecutionFailedEventAttributes namespaceId. */ - public namespaceId: string; - - /** RequestCancelExternalWorkflowExecutionFailedEventAttributes workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this failure - * corresponds to - */ - public initiatedEventId: Long; - - /** Deprecated. */ - public control: string; - - /** - * Creates a new RequestCancelExternalWorkflowExecutionFailedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestCancelExternalWorkflowExecutionFailedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IRequestCancelExternalWorkflowExecutionFailedEventAttributes): temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes; - - /** - * Encodes the specified RequestCancelExternalWorkflowExecutionFailedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes.verify|verify} messages. - * @param message RequestCancelExternalWorkflowExecutionFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IRequestCancelExternalWorkflowExecutionFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCancelExternalWorkflowExecutionFailedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes.verify|verify} messages. - * @param message RequestCancelExternalWorkflowExecutionFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IRequestCancelExternalWorkflowExecutionFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestCancelExternalWorkflowExecutionFailedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestCancelExternalWorkflowExecutionFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes; - - /** - * Decodes a RequestCancelExternalWorkflowExecutionFailedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestCancelExternalWorkflowExecutionFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes; - - /** - * Creates a RequestCancelExternalWorkflowExecutionFailedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCancelExternalWorkflowExecutionFailedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes; - - /** - * Creates a plain object from a RequestCancelExternalWorkflowExecutionFailedEventAttributes message. Also converts values to other types if specified. - * @param message RequestCancelExternalWorkflowExecutionFailedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCancelExternalWorkflowExecutionFailedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestCancelExternalWorkflowExecutionFailedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExternalWorkflowExecutionCancelRequestedEventAttributes. */ - interface IExternalWorkflowExecutionCancelRequestedEventAttributes { - - /** - * id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds - * to - */ - initiatedEventId?: (Long|null); - - /** - * Namespace of the to-be-cancelled workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - namespace?: (string|null); - - /** ExternalWorkflowExecutionCancelRequestedEventAttributes namespaceId */ - namespaceId?: (string|null); - - /** ExternalWorkflowExecutionCancelRequestedEventAttributes workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - } - - /** Represents an ExternalWorkflowExecutionCancelRequestedEventAttributes. */ - class ExternalWorkflowExecutionCancelRequestedEventAttributes implements IExternalWorkflowExecutionCancelRequestedEventAttributes { - - /** - * Constructs a new ExternalWorkflowExecutionCancelRequestedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IExternalWorkflowExecutionCancelRequestedEventAttributes); - - /** - * id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds - * to - */ - public initiatedEventId: Long; - - /** - * Namespace of the to-be-cancelled workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - public namespace: string; - - /** ExternalWorkflowExecutionCancelRequestedEventAttributes namespaceId. */ - public namespaceId: string; - - /** ExternalWorkflowExecutionCancelRequestedEventAttributes workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * Creates a new ExternalWorkflowExecutionCancelRequestedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ExternalWorkflowExecutionCancelRequestedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IExternalWorkflowExecutionCancelRequestedEventAttributes): temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes; - - /** - * Encodes the specified ExternalWorkflowExecutionCancelRequestedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes.verify|verify} messages. - * @param message ExternalWorkflowExecutionCancelRequestedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IExternalWorkflowExecutionCancelRequestedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExternalWorkflowExecutionCancelRequestedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes.verify|verify} messages. - * @param message ExternalWorkflowExecutionCancelRequestedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IExternalWorkflowExecutionCancelRequestedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExternalWorkflowExecutionCancelRequestedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExternalWorkflowExecutionCancelRequestedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes; - - /** - * Decodes an ExternalWorkflowExecutionCancelRequestedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExternalWorkflowExecutionCancelRequestedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes; - - /** - * Creates an ExternalWorkflowExecutionCancelRequestedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExternalWorkflowExecutionCancelRequestedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes; - - /** - * Creates a plain object from an ExternalWorkflowExecutionCancelRequestedEventAttributes message. Also converts values to other types if specified. - * @param message ExternalWorkflowExecutionCancelRequestedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExternalWorkflowExecutionCancelRequestedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExternalWorkflowExecutionCancelRequestedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SignalExternalWorkflowExecutionInitiatedEventAttributes. */ - interface ISignalExternalWorkflowExecutionInitiatedEventAttributes { - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - - /** - * Namespace of the to-be-signalled workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - namespace?: (string|null); - - /** SignalExternalWorkflowExecutionInitiatedEventAttributes namespaceId */ - namespaceId?: (string|null); - - /** SignalExternalWorkflowExecutionInitiatedEventAttributes workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** name/type of the signal to fire in the external workflow */ - signalName?: (string|null); - - /** Serialized arguments to provide to the signal handler */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** Deprecated. */ - control?: (string|null); - - /** - * Workers are expected to set this to true if the workflow they are requesting to cancel is - * a child of the workflow which issued the request - */ - childWorkflowOnly?: (boolean|null); - - /** SignalExternalWorkflowExecutionInitiatedEventAttributes header */ - header?: (temporal.api.common.v1.IHeader|null); - } - - /** Represents a SignalExternalWorkflowExecutionInitiatedEventAttributes. */ - class SignalExternalWorkflowExecutionInitiatedEventAttributes implements ISignalExternalWorkflowExecutionInitiatedEventAttributes { - - /** - * Constructs a new SignalExternalWorkflowExecutionInitiatedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.ISignalExternalWorkflowExecutionInitiatedEventAttributes); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** - * Namespace of the to-be-signalled workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - public namespace: string; - - /** SignalExternalWorkflowExecutionInitiatedEventAttributes namespaceId. */ - public namespaceId: string; - - /** SignalExternalWorkflowExecutionInitiatedEventAttributes workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** name/type of the signal to fire in the external workflow */ - public signalName: string; - - /** Serialized arguments to provide to the signal handler */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** Deprecated. */ - public control: string; - - /** - * Workers are expected to set this to true if the workflow they are requesting to cancel is - * a child of the workflow which issued the request - */ - public childWorkflowOnly: boolean; - - /** SignalExternalWorkflowExecutionInitiatedEventAttributes header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** - * Creates a new SignalExternalWorkflowExecutionInitiatedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns SignalExternalWorkflowExecutionInitiatedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.ISignalExternalWorkflowExecutionInitiatedEventAttributes): temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes; - - /** - * Encodes the specified SignalExternalWorkflowExecutionInitiatedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes.verify|verify} messages. - * @param message SignalExternalWorkflowExecutionInitiatedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.ISignalExternalWorkflowExecutionInitiatedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignalExternalWorkflowExecutionInitiatedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes.verify|verify} messages. - * @param message SignalExternalWorkflowExecutionInitiatedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.ISignalExternalWorkflowExecutionInitiatedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignalExternalWorkflowExecutionInitiatedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignalExternalWorkflowExecutionInitiatedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes; - - /** - * Decodes a SignalExternalWorkflowExecutionInitiatedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignalExternalWorkflowExecutionInitiatedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes; - - /** - * Creates a SignalExternalWorkflowExecutionInitiatedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignalExternalWorkflowExecutionInitiatedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes; - - /** - * Creates a plain object from a SignalExternalWorkflowExecutionInitiatedEventAttributes message. Also converts values to other types if specified. - * @param message SignalExternalWorkflowExecutionInitiatedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignalExternalWorkflowExecutionInitiatedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SignalExternalWorkflowExecutionInitiatedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SignalExternalWorkflowExecutionFailedEventAttributes. */ - interface ISignalExternalWorkflowExecutionFailedEventAttributes { - - /** SignalExternalWorkflowExecutionFailedEventAttributes cause */ - cause?: (temporal.api.enums.v1.SignalExternalWorkflowExecutionFailedCause|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - - /** - * Namespace of the workflow which failed the signal. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - namespace?: (string|null); - - /** SignalExternalWorkflowExecutionFailedEventAttributes namespaceId */ - namespaceId?: (string|null); - - /** SignalExternalWorkflowExecutionFailedEventAttributes workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** SignalExternalWorkflowExecutionFailedEventAttributes initiatedEventId */ - initiatedEventId?: (Long|null); - - /** Deprecated. */ - control?: (string|null); - } - - /** Represents a SignalExternalWorkflowExecutionFailedEventAttributes. */ - class SignalExternalWorkflowExecutionFailedEventAttributes implements ISignalExternalWorkflowExecutionFailedEventAttributes { - - /** - * Constructs a new SignalExternalWorkflowExecutionFailedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.ISignalExternalWorkflowExecutionFailedEventAttributes); - - /** SignalExternalWorkflowExecutionFailedEventAttributes cause. */ - public cause: temporal.api.enums.v1.SignalExternalWorkflowExecutionFailedCause; - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** - * Namespace of the workflow which failed the signal. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - public namespace: string; - - /** SignalExternalWorkflowExecutionFailedEventAttributes namespaceId. */ - public namespaceId: string; - - /** SignalExternalWorkflowExecutionFailedEventAttributes workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** SignalExternalWorkflowExecutionFailedEventAttributes initiatedEventId. */ - public initiatedEventId: Long; - - /** Deprecated. */ - public control: string; - - /** - * Creates a new SignalExternalWorkflowExecutionFailedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns SignalExternalWorkflowExecutionFailedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.ISignalExternalWorkflowExecutionFailedEventAttributes): temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes; - - /** - * Encodes the specified SignalExternalWorkflowExecutionFailedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes.verify|verify} messages. - * @param message SignalExternalWorkflowExecutionFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.ISignalExternalWorkflowExecutionFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignalExternalWorkflowExecutionFailedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes.verify|verify} messages. - * @param message SignalExternalWorkflowExecutionFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.ISignalExternalWorkflowExecutionFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignalExternalWorkflowExecutionFailedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignalExternalWorkflowExecutionFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes; - - /** - * Decodes a SignalExternalWorkflowExecutionFailedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignalExternalWorkflowExecutionFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes; - - /** - * Creates a SignalExternalWorkflowExecutionFailedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignalExternalWorkflowExecutionFailedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes; - - /** - * Creates a plain object from a SignalExternalWorkflowExecutionFailedEventAttributes message. Also converts values to other types if specified. - * @param message SignalExternalWorkflowExecutionFailedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignalExternalWorkflowExecutionFailedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SignalExternalWorkflowExecutionFailedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExternalWorkflowExecutionSignaledEventAttributes. */ - interface IExternalWorkflowExecutionSignaledEventAttributes { - - /** id of the `SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds to */ - initiatedEventId?: (Long|null); - - /** - * Namespace of the workflow which was signaled. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - namespace?: (string|null); - - /** ExternalWorkflowExecutionSignaledEventAttributes namespaceId */ - namespaceId?: (string|null); - - /** ExternalWorkflowExecutionSignaledEventAttributes workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** Deprecated. */ - control?: (string|null); - } - - /** Represents an ExternalWorkflowExecutionSignaledEventAttributes. */ - class ExternalWorkflowExecutionSignaledEventAttributes implements IExternalWorkflowExecutionSignaledEventAttributes { - - /** - * Constructs a new ExternalWorkflowExecutionSignaledEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IExternalWorkflowExecutionSignaledEventAttributes); - - /** id of the `SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds to */ - public initiatedEventId: Long; - - /** - * Namespace of the workflow which was signaled. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - public namespace: string; - - /** ExternalWorkflowExecutionSignaledEventAttributes namespaceId. */ - public namespaceId: string; - - /** ExternalWorkflowExecutionSignaledEventAttributes workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** Deprecated. */ - public control: string; - - /** - * Creates a new ExternalWorkflowExecutionSignaledEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ExternalWorkflowExecutionSignaledEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IExternalWorkflowExecutionSignaledEventAttributes): temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes; - - /** - * Encodes the specified ExternalWorkflowExecutionSignaledEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes.verify|verify} messages. - * @param message ExternalWorkflowExecutionSignaledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IExternalWorkflowExecutionSignaledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExternalWorkflowExecutionSignaledEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes.verify|verify} messages. - * @param message ExternalWorkflowExecutionSignaledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IExternalWorkflowExecutionSignaledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExternalWorkflowExecutionSignaledEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExternalWorkflowExecutionSignaledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes; - - /** - * Decodes an ExternalWorkflowExecutionSignaledEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExternalWorkflowExecutionSignaledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes; - - /** - * Creates an ExternalWorkflowExecutionSignaledEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExternalWorkflowExecutionSignaledEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes; - - /** - * Creates a plain object from an ExternalWorkflowExecutionSignaledEventAttributes message. Also converts values to other types if specified. - * @param message ExternalWorkflowExecutionSignaledEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExternalWorkflowExecutionSignaledEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExternalWorkflowExecutionSignaledEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpsertWorkflowSearchAttributesEventAttributes. */ - interface IUpsertWorkflowSearchAttributesEventAttributes { - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - - /** UpsertWorkflowSearchAttributesEventAttributes searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - } - - /** Represents an UpsertWorkflowSearchAttributesEventAttributes. */ - class UpsertWorkflowSearchAttributesEventAttributes implements IUpsertWorkflowSearchAttributesEventAttributes { - - /** - * Constructs a new UpsertWorkflowSearchAttributesEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IUpsertWorkflowSearchAttributesEventAttributes); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** UpsertWorkflowSearchAttributesEventAttributes searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * Creates a new UpsertWorkflowSearchAttributesEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns UpsertWorkflowSearchAttributesEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IUpsertWorkflowSearchAttributesEventAttributes): temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes; - - /** - * Encodes the specified UpsertWorkflowSearchAttributesEventAttributes message. Does not implicitly {@link temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes.verify|verify} messages. - * @param message UpsertWorkflowSearchAttributesEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IUpsertWorkflowSearchAttributesEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpsertWorkflowSearchAttributesEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes.verify|verify} messages. - * @param message UpsertWorkflowSearchAttributesEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IUpsertWorkflowSearchAttributesEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpsertWorkflowSearchAttributesEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpsertWorkflowSearchAttributesEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes; - - /** - * Decodes an UpsertWorkflowSearchAttributesEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpsertWorkflowSearchAttributesEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes; - - /** - * Creates an UpsertWorkflowSearchAttributesEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpsertWorkflowSearchAttributesEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes; - - /** - * Creates a plain object from an UpsertWorkflowSearchAttributesEventAttributes message. Also converts values to other types if specified. - * @param message UpsertWorkflowSearchAttributesEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpsertWorkflowSearchAttributesEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpsertWorkflowSearchAttributesEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowPropertiesModifiedEventAttributes. */ - interface IWorkflowPropertiesModifiedEventAttributes { - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - - /** - * If set, update the workflow memo with the provided values. The values will be merged with - * the existing memo. If the user wants to delete values, a default/empty Payload should be - * used as the value for the key being deleted. - */ - upsertedMemo?: (temporal.api.common.v1.IMemo|null); - } - - /** Represents a WorkflowPropertiesModifiedEventAttributes. */ - class WorkflowPropertiesModifiedEventAttributes implements IWorkflowPropertiesModifiedEventAttributes { - - /** - * Constructs a new WorkflowPropertiesModifiedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowPropertiesModifiedEventAttributes); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** - * If set, update the workflow memo with the provided values. The values will be merged with - * the existing memo. If the user wants to delete values, a default/empty Payload should be - * used as the value for the key being deleted. - */ - public upsertedMemo?: (temporal.api.common.v1.IMemo|null); - - /** - * Creates a new WorkflowPropertiesModifiedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowPropertiesModifiedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowPropertiesModifiedEventAttributes): temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes; - - /** - * Encodes the specified WorkflowPropertiesModifiedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes.verify|verify} messages. - * @param message WorkflowPropertiesModifiedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowPropertiesModifiedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowPropertiesModifiedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes.verify|verify} messages. - * @param message WorkflowPropertiesModifiedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowPropertiesModifiedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowPropertiesModifiedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowPropertiesModifiedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes; - - /** - * Decodes a WorkflowPropertiesModifiedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowPropertiesModifiedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes; - - /** - * Creates a WorkflowPropertiesModifiedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowPropertiesModifiedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes; - - /** - * Creates a plain object from a WorkflowPropertiesModifiedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowPropertiesModifiedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowPropertiesModifiedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowPropertiesModifiedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartChildWorkflowExecutionInitiatedEventAttributes. */ - interface IStartChildWorkflowExecutionInitiatedEventAttributes { - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - namespace?: (string|null); - - /** StartChildWorkflowExecutionInitiatedEventAttributes namespaceId */ - namespaceId?: (string|null); - - /** StartChildWorkflowExecutionInitiatedEventAttributes workflowId */ - workflowId?: (string|null); - - /** StartChildWorkflowExecutionInitiatedEventAttributes workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** StartChildWorkflowExecutionInitiatedEventAttributes taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** StartChildWorkflowExecutionInitiatedEventAttributes input */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** Total workflow execution timeout including retries and continue as new. */ - workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run. */ - workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** Default: PARENT_CLOSE_POLICY_TERMINATE. */ - parentClosePolicy?: (temporal.api.enums.v1.ParentClosePolicy|null); - - /** Deprecated. */ - control?: (string|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - - /** Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. */ - workflowIdReusePolicy?: (temporal.api.enums.v1.WorkflowIdReusePolicy|null); - - /** StartChildWorkflowExecutionInitiatedEventAttributes retryPolicy */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** If this child runs on a cron schedule, it will appear here */ - cronSchedule?: (string|null); - - /** StartChildWorkflowExecutionInitiatedEventAttributes header */ - header?: (temporal.api.common.v1.IHeader|null); - - /** StartChildWorkflowExecutionInitiatedEventAttributes memo */ - memo?: (temporal.api.common.v1.IMemo|null); - - /** StartChildWorkflowExecutionInitiatedEventAttributes searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment - * rules of the child's Task Queue will be used to independently assign a Build ID to it. - * Deprecated. Only considered for versioning v0.2. - */ - inheritBuildId?: (boolean|null); - - /** Priority metadata */ - priority?: (temporal.api.common.v1.IPriority|null); - } - - /** Represents a StartChildWorkflowExecutionInitiatedEventAttributes. */ - class StartChildWorkflowExecutionInitiatedEventAttributes implements IStartChildWorkflowExecutionInitiatedEventAttributes { - - /** - * Constructs a new StartChildWorkflowExecutionInitiatedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IStartChildWorkflowExecutionInitiatedEventAttributes); - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - public namespace: string; - - /** StartChildWorkflowExecutionInitiatedEventAttributes namespaceId. */ - public namespaceId: string; - - /** StartChildWorkflowExecutionInitiatedEventAttributes workflowId. */ - public workflowId: string; - - /** StartChildWorkflowExecutionInitiatedEventAttributes workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** StartChildWorkflowExecutionInitiatedEventAttributes taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** StartChildWorkflowExecutionInitiatedEventAttributes input. */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** Total workflow execution timeout including retries and continue as new. */ - public workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run. */ - public workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - public workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** Default: PARENT_CLOSE_POLICY_TERMINATE. */ - public parentClosePolicy: temporal.api.enums.v1.ParentClosePolicy; - - /** Deprecated. */ - public control: string; - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. */ - public workflowIdReusePolicy: temporal.api.enums.v1.WorkflowIdReusePolicy; - - /** StartChildWorkflowExecutionInitiatedEventAttributes retryPolicy. */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** If this child runs on a cron schedule, it will appear here */ - public cronSchedule: string; - - /** StartChildWorkflowExecutionInitiatedEventAttributes header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** StartChildWorkflowExecutionInitiatedEventAttributes memo. */ - public memo?: (temporal.api.common.v1.IMemo|null); - - /** StartChildWorkflowExecutionInitiatedEventAttributes searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment - * rules of the child's Task Queue will be used to independently assign a Build ID to it. - * Deprecated. Only considered for versioning v0.2. - */ - public inheritBuildId: boolean; - - /** Priority metadata */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Creates a new StartChildWorkflowExecutionInitiatedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns StartChildWorkflowExecutionInitiatedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IStartChildWorkflowExecutionInitiatedEventAttributes): temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributes; - - /** - * Encodes the specified StartChildWorkflowExecutionInitiatedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributes.verify|verify} messages. - * @param message StartChildWorkflowExecutionInitiatedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IStartChildWorkflowExecutionInitiatedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartChildWorkflowExecutionInitiatedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributes.verify|verify} messages. - * @param message StartChildWorkflowExecutionInitiatedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IStartChildWorkflowExecutionInitiatedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartChildWorkflowExecutionInitiatedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartChildWorkflowExecutionInitiatedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributes; - - /** - * Decodes a StartChildWorkflowExecutionInitiatedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartChildWorkflowExecutionInitiatedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributes; - - /** - * Creates a StartChildWorkflowExecutionInitiatedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartChildWorkflowExecutionInitiatedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributes; - - /** - * Creates a plain object from a StartChildWorkflowExecutionInitiatedEventAttributes message. Also converts values to other types if specified. - * @param message StartChildWorkflowExecutionInitiatedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartChildWorkflowExecutionInitiatedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartChildWorkflowExecutionInitiatedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartChildWorkflowExecutionFailedEventAttributes. */ - interface IStartChildWorkflowExecutionFailedEventAttributes { - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - namespace?: (string|null); - - /** StartChildWorkflowExecutionFailedEventAttributes namespaceId */ - namespaceId?: (string|null); - - /** StartChildWorkflowExecutionFailedEventAttributes workflowId */ - workflowId?: (string|null); - - /** StartChildWorkflowExecutionFailedEventAttributes workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** StartChildWorkflowExecutionFailedEventAttributes cause */ - cause?: (temporal.api.enums.v1.StartChildWorkflowExecutionFailedCause|null); - - /** Deprecated. */ - control?: (string|null); - - /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ - initiatedEventId?: (Long|null); - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - workflowTaskCompletedEventId?: (Long|null); - } - - /** Represents a StartChildWorkflowExecutionFailedEventAttributes. */ - class StartChildWorkflowExecutionFailedEventAttributes implements IStartChildWorkflowExecutionFailedEventAttributes { - - /** - * Constructs a new StartChildWorkflowExecutionFailedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IStartChildWorkflowExecutionFailedEventAttributes); - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - public namespace: string; - - /** StartChildWorkflowExecutionFailedEventAttributes namespaceId. */ - public namespaceId: string; - - /** StartChildWorkflowExecutionFailedEventAttributes workflowId. */ - public workflowId: string; - - /** StartChildWorkflowExecutionFailedEventAttributes workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** StartChildWorkflowExecutionFailedEventAttributes cause. */ - public cause: temporal.api.enums.v1.StartChildWorkflowExecutionFailedCause; - - /** Deprecated. */ - public control: string; - - /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ - public initiatedEventId: Long; - - /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ - public workflowTaskCompletedEventId: Long; - - /** - * Creates a new StartChildWorkflowExecutionFailedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns StartChildWorkflowExecutionFailedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IStartChildWorkflowExecutionFailedEventAttributes): temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributes; - - /** - * Encodes the specified StartChildWorkflowExecutionFailedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributes.verify|verify} messages. - * @param message StartChildWorkflowExecutionFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IStartChildWorkflowExecutionFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartChildWorkflowExecutionFailedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributes.verify|verify} messages. - * @param message StartChildWorkflowExecutionFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IStartChildWorkflowExecutionFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartChildWorkflowExecutionFailedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartChildWorkflowExecutionFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributes; - - /** - * Decodes a StartChildWorkflowExecutionFailedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartChildWorkflowExecutionFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributes; - - /** - * Creates a StartChildWorkflowExecutionFailedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartChildWorkflowExecutionFailedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributes; - - /** - * Creates a plain object from a StartChildWorkflowExecutionFailedEventAttributes message. Also converts values to other types if specified. - * @param message StartChildWorkflowExecutionFailedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartChildWorkflowExecutionFailedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartChildWorkflowExecutionFailedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ChildWorkflowExecutionStartedEventAttributes. */ - interface IChildWorkflowExecutionStartedEventAttributes { - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - namespace?: (string|null); - - /** ChildWorkflowExecutionStartedEventAttributes namespaceId */ - namespaceId?: (string|null); - - /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ - initiatedEventId?: (Long|null); - - /** ChildWorkflowExecutionStartedEventAttributes workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ChildWorkflowExecutionStartedEventAttributes workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** ChildWorkflowExecutionStartedEventAttributes header */ - header?: (temporal.api.common.v1.IHeader|null); - } - - /** Represents a ChildWorkflowExecutionStartedEventAttributes. */ - class ChildWorkflowExecutionStartedEventAttributes implements IChildWorkflowExecutionStartedEventAttributes { - - /** - * Constructs a new ChildWorkflowExecutionStartedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IChildWorkflowExecutionStartedEventAttributes); - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - public namespace: string; - - /** ChildWorkflowExecutionStartedEventAttributes namespaceId. */ - public namespaceId: string; - - /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ - public initiatedEventId: Long; - - /** ChildWorkflowExecutionStartedEventAttributes workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ChildWorkflowExecutionStartedEventAttributes workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** ChildWorkflowExecutionStartedEventAttributes header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** - * Creates a new ChildWorkflowExecutionStartedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ChildWorkflowExecutionStartedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IChildWorkflowExecutionStartedEventAttributes): temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributes; - - /** - * Encodes the specified ChildWorkflowExecutionStartedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributes.verify|verify} messages. - * @param message ChildWorkflowExecutionStartedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IChildWorkflowExecutionStartedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ChildWorkflowExecutionStartedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributes.verify|verify} messages. - * @param message ChildWorkflowExecutionStartedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IChildWorkflowExecutionStartedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ChildWorkflowExecutionStartedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChildWorkflowExecutionStartedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributes; - - /** - * Decodes a ChildWorkflowExecutionStartedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChildWorkflowExecutionStartedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributes; - - /** - * Creates a ChildWorkflowExecutionStartedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChildWorkflowExecutionStartedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributes; - - /** - * Creates a plain object from a ChildWorkflowExecutionStartedEventAttributes message. Also converts values to other types if specified. - * @param message ChildWorkflowExecutionStartedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ChildWorkflowExecutionStartedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ChildWorkflowExecutionStartedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ChildWorkflowExecutionCompletedEventAttributes. */ - interface IChildWorkflowExecutionCompletedEventAttributes { - - /** ChildWorkflowExecutionCompletedEventAttributes result */ - result?: (temporal.api.common.v1.IPayloads|null); - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - namespace?: (string|null); - - /** ChildWorkflowExecutionCompletedEventAttributes namespaceId */ - namespaceId?: (string|null); - - /** ChildWorkflowExecutionCompletedEventAttributes workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ChildWorkflowExecutionCompletedEventAttributes workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ - initiatedEventId?: (Long|null); - - /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ - startedEventId?: (Long|null); - } - - /** Represents a ChildWorkflowExecutionCompletedEventAttributes. */ - class ChildWorkflowExecutionCompletedEventAttributes implements IChildWorkflowExecutionCompletedEventAttributes { - - /** - * Constructs a new ChildWorkflowExecutionCompletedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IChildWorkflowExecutionCompletedEventAttributes); - - /** ChildWorkflowExecutionCompletedEventAttributes result. */ - public result?: (temporal.api.common.v1.IPayloads|null); - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - public namespace: string; - - /** ChildWorkflowExecutionCompletedEventAttributes namespaceId. */ - public namespaceId: string; - - /** ChildWorkflowExecutionCompletedEventAttributes workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ChildWorkflowExecutionCompletedEventAttributes workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ - public initiatedEventId: Long; - - /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ - public startedEventId: Long; - - /** - * Creates a new ChildWorkflowExecutionCompletedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ChildWorkflowExecutionCompletedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IChildWorkflowExecutionCompletedEventAttributes): temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributes; - - /** - * Encodes the specified ChildWorkflowExecutionCompletedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributes.verify|verify} messages. - * @param message ChildWorkflowExecutionCompletedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IChildWorkflowExecutionCompletedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ChildWorkflowExecutionCompletedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributes.verify|verify} messages. - * @param message ChildWorkflowExecutionCompletedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IChildWorkflowExecutionCompletedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ChildWorkflowExecutionCompletedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChildWorkflowExecutionCompletedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributes; - - /** - * Decodes a ChildWorkflowExecutionCompletedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChildWorkflowExecutionCompletedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributes; - - /** - * Creates a ChildWorkflowExecutionCompletedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChildWorkflowExecutionCompletedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributes; - - /** - * Creates a plain object from a ChildWorkflowExecutionCompletedEventAttributes message. Also converts values to other types if specified. - * @param message ChildWorkflowExecutionCompletedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ChildWorkflowExecutionCompletedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ChildWorkflowExecutionCompletedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ChildWorkflowExecutionFailedEventAttributes. */ - interface IChildWorkflowExecutionFailedEventAttributes { - - /** ChildWorkflowExecutionFailedEventAttributes failure */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - namespace?: (string|null); - - /** ChildWorkflowExecutionFailedEventAttributes namespaceId */ - namespaceId?: (string|null); - - /** ChildWorkflowExecutionFailedEventAttributes workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ChildWorkflowExecutionFailedEventAttributes workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ - initiatedEventId?: (Long|null); - - /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ - startedEventId?: (Long|null); - - /** ChildWorkflowExecutionFailedEventAttributes retryState */ - retryState?: (temporal.api.enums.v1.RetryState|null); - } - - /** Represents a ChildWorkflowExecutionFailedEventAttributes. */ - class ChildWorkflowExecutionFailedEventAttributes implements IChildWorkflowExecutionFailedEventAttributes { - - /** - * Constructs a new ChildWorkflowExecutionFailedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IChildWorkflowExecutionFailedEventAttributes); - - /** ChildWorkflowExecutionFailedEventAttributes failure. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - public namespace: string; - - /** ChildWorkflowExecutionFailedEventAttributes namespaceId. */ - public namespaceId: string; - - /** ChildWorkflowExecutionFailedEventAttributes workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ChildWorkflowExecutionFailedEventAttributes workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ - public initiatedEventId: Long; - - /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ - public startedEventId: Long; - - /** ChildWorkflowExecutionFailedEventAttributes retryState. */ - public retryState: temporal.api.enums.v1.RetryState; - - /** - * Creates a new ChildWorkflowExecutionFailedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ChildWorkflowExecutionFailedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IChildWorkflowExecutionFailedEventAttributes): temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributes; - - /** - * Encodes the specified ChildWorkflowExecutionFailedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributes.verify|verify} messages. - * @param message ChildWorkflowExecutionFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IChildWorkflowExecutionFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ChildWorkflowExecutionFailedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributes.verify|verify} messages. - * @param message ChildWorkflowExecutionFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IChildWorkflowExecutionFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ChildWorkflowExecutionFailedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChildWorkflowExecutionFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributes; - - /** - * Decodes a ChildWorkflowExecutionFailedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChildWorkflowExecutionFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributes; - - /** - * Creates a ChildWorkflowExecutionFailedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChildWorkflowExecutionFailedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributes; - - /** - * Creates a plain object from a ChildWorkflowExecutionFailedEventAttributes message. Also converts values to other types if specified. - * @param message ChildWorkflowExecutionFailedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ChildWorkflowExecutionFailedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ChildWorkflowExecutionFailedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ChildWorkflowExecutionCanceledEventAttributes. */ - interface IChildWorkflowExecutionCanceledEventAttributes { - - /** ChildWorkflowExecutionCanceledEventAttributes details */ - details?: (temporal.api.common.v1.IPayloads|null); - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - namespace?: (string|null); - - /** ChildWorkflowExecutionCanceledEventAttributes namespaceId */ - namespaceId?: (string|null); - - /** ChildWorkflowExecutionCanceledEventAttributes workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ChildWorkflowExecutionCanceledEventAttributes workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ - initiatedEventId?: (Long|null); - - /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ - startedEventId?: (Long|null); - } - - /** Represents a ChildWorkflowExecutionCanceledEventAttributes. */ - class ChildWorkflowExecutionCanceledEventAttributes implements IChildWorkflowExecutionCanceledEventAttributes { - - /** - * Constructs a new ChildWorkflowExecutionCanceledEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IChildWorkflowExecutionCanceledEventAttributes); - - /** ChildWorkflowExecutionCanceledEventAttributes details. */ - public details?: (temporal.api.common.v1.IPayloads|null); - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - public namespace: string; - - /** ChildWorkflowExecutionCanceledEventAttributes namespaceId. */ - public namespaceId: string; - - /** ChildWorkflowExecutionCanceledEventAttributes workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ChildWorkflowExecutionCanceledEventAttributes workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ - public initiatedEventId: Long; - - /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ - public startedEventId: Long; - - /** - * Creates a new ChildWorkflowExecutionCanceledEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ChildWorkflowExecutionCanceledEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IChildWorkflowExecutionCanceledEventAttributes): temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributes; - - /** - * Encodes the specified ChildWorkflowExecutionCanceledEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributes.verify|verify} messages. - * @param message ChildWorkflowExecutionCanceledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IChildWorkflowExecutionCanceledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ChildWorkflowExecutionCanceledEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributes.verify|verify} messages. - * @param message ChildWorkflowExecutionCanceledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IChildWorkflowExecutionCanceledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ChildWorkflowExecutionCanceledEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChildWorkflowExecutionCanceledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributes; - - /** - * Decodes a ChildWorkflowExecutionCanceledEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChildWorkflowExecutionCanceledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributes; - - /** - * Creates a ChildWorkflowExecutionCanceledEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChildWorkflowExecutionCanceledEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributes; - - /** - * Creates a plain object from a ChildWorkflowExecutionCanceledEventAttributes message. Also converts values to other types if specified. - * @param message ChildWorkflowExecutionCanceledEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ChildWorkflowExecutionCanceledEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ChildWorkflowExecutionCanceledEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ChildWorkflowExecutionTimedOutEventAttributes. */ - interface IChildWorkflowExecutionTimedOutEventAttributes { - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - namespace?: (string|null); - - /** ChildWorkflowExecutionTimedOutEventAttributes namespaceId */ - namespaceId?: (string|null); - - /** ChildWorkflowExecutionTimedOutEventAttributes workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ChildWorkflowExecutionTimedOutEventAttributes workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ - initiatedEventId?: (Long|null); - - /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ - startedEventId?: (Long|null); - - /** ChildWorkflowExecutionTimedOutEventAttributes retryState */ - retryState?: (temporal.api.enums.v1.RetryState|null); - } - - /** Represents a ChildWorkflowExecutionTimedOutEventAttributes. */ - class ChildWorkflowExecutionTimedOutEventAttributes implements IChildWorkflowExecutionTimedOutEventAttributes { - - /** - * Constructs a new ChildWorkflowExecutionTimedOutEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IChildWorkflowExecutionTimedOutEventAttributes); - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - public namespace: string; - - /** ChildWorkflowExecutionTimedOutEventAttributes namespaceId. */ - public namespaceId: string; - - /** ChildWorkflowExecutionTimedOutEventAttributes workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ChildWorkflowExecutionTimedOutEventAttributes workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ - public initiatedEventId: Long; - - /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ - public startedEventId: Long; - - /** ChildWorkflowExecutionTimedOutEventAttributes retryState. */ - public retryState: temporal.api.enums.v1.RetryState; - - /** - * Creates a new ChildWorkflowExecutionTimedOutEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ChildWorkflowExecutionTimedOutEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IChildWorkflowExecutionTimedOutEventAttributes): temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributes; - - /** - * Encodes the specified ChildWorkflowExecutionTimedOutEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributes.verify|verify} messages. - * @param message ChildWorkflowExecutionTimedOutEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IChildWorkflowExecutionTimedOutEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ChildWorkflowExecutionTimedOutEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributes.verify|verify} messages. - * @param message ChildWorkflowExecutionTimedOutEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IChildWorkflowExecutionTimedOutEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ChildWorkflowExecutionTimedOutEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChildWorkflowExecutionTimedOutEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributes; - - /** - * Decodes a ChildWorkflowExecutionTimedOutEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChildWorkflowExecutionTimedOutEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributes; - - /** - * Creates a ChildWorkflowExecutionTimedOutEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChildWorkflowExecutionTimedOutEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributes; - - /** - * Creates a plain object from a ChildWorkflowExecutionTimedOutEventAttributes message. Also converts values to other types if specified. - * @param message ChildWorkflowExecutionTimedOutEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ChildWorkflowExecutionTimedOutEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ChildWorkflowExecutionTimedOutEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ChildWorkflowExecutionTerminatedEventAttributes. */ - interface IChildWorkflowExecutionTerminatedEventAttributes { - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - namespace?: (string|null); - - /** ChildWorkflowExecutionTerminatedEventAttributes namespaceId */ - namespaceId?: (string|null); - - /** ChildWorkflowExecutionTerminatedEventAttributes workflowExecution */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ChildWorkflowExecutionTerminatedEventAttributes workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ - initiatedEventId?: (Long|null); - - /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ - startedEventId?: (Long|null); - } - - /** Represents a ChildWorkflowExecutionTerminatedEventAttributes. */ - class ChildWorkflowExecutionTerminatedEventAttributes implements IChildWorkflowExecutionTerminatedEventAttributes { - - /** - * Constructs a new ChildWorkflowExecutionTerminatedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IChildWorkflowExecutionTerminatedEventAttributes); - - /** - * Namespace of the child workflow. - * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. - */ - public namespace: string; - - /** ChildWorkflowExecutionTerminatedEventAttributes namespaceId. */ - public namespaceId: string; - - /** ChildWorkflowExecutionTerminatedEventAttributes workflowExecution. */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** ChildWorkflowExecutionTerminatedEventAttributes workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ - public initiatedEventId: Long; - - /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ - public startedEventId: Long; - - /** - * Creates a new ChildWorkflowExecutionTerminatedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ChildWorkflowExecutionTerminatedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IChildWorkflowExecutionTerminatedEventAttributes): temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributes; - - /** - * Encodes the specified ChildWorkflowExecutionTerminatedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributes.verify|verify} messages. - * @param message ChildWorkflowExecutionTerminatedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IChildWorkflowExecutionTerminatedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ChildWorkflowExecutionTerminatedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributes.verify|verify} messages. - * @param message ChildWorkflowExecutionTerminatedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IChildWorkflowExecutionTerminatedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ChildWorkflowExecutionTerminatedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChildWorkflowExecutionTerminatedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributes; - - /** - * Decodes a ChildWorkflowExecutionTerminatedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChildWorkflowExecutionTerminatedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributes; - - /** - * Creates a ChildWorkflowExecutionTerminatedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChildWorkflowExecutionTerminatedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributes; - - /** - * Creates a plain object from a ChildWorkflowExecutionTerminatedEventAttributes message. Also converts values to other types if specified. - * @param message ChildWorkflowExecutionTerminatedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ChildWorkflowExecutionTerminatedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ChildWorkflowExecutionTerminatedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionOptionsUpdatedEventAttributes. */ - interface IWorkflowExecutionOptionsUpdatedEventAttributes { - - /** - * Versioning override upserted in this event. - * Ignored if nil or if unset_versioning_override is true. - */ - versioningOverride?: (temporal.api.workflow.v1.IVersioningOverride|null); - - /** Versioning override removed in this event. */ - unsetVersioningOverride?: (boolean|null); - - /** - * Request ID attached to the running workflow execution so that subsequent requests with same - * request ID will be deduped. - */ - attachedRequestId?: (string|null); - - /** Completion callbacks attached to the running workflow execution. */ - attachedCompletionCallbacks?: (temporal.api.common.v1.ICallback[]|null); - - /** Optional. The identity of the client who initiated the request that created this event. */ - identity?: (string|null); - - /** - * Priority override upserted in this event. Represents the full priority; not just partial fields. - * Ignored if nil. - */ - priority?: (temporal.api.common.v1.IPriority|null); - } - - /** Represents a WorkflowExecutionOptionsUpdatedEventAttributes. */ - class WorkflowExecutionOptionsUpdatedEventAttributes implements IWorkflowExecutionOptionsUpdatedEventAttributes { - - /** - * Constructs a new WorkflowExecutionOptionsUpdatedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionOptionsUpdatedEventAttributes); - - /** - * Versioning override upserted in this event. - * Ignored if nil or if unset_versioning_override is true. - */ - public versioningOverride?: (temporal.api.workflow.v1.IVersioningOverride|null); - - /** Versioning override removed in this event. */ - public unsetVersioningOverride: boolean; - - /** - * Request ID attached to the running workflow execution so that subsequent requests with same - * request ID will be deduped. - */ - public attachedRequestId: string; - - /** Completion callbacks attached to the running workflow execution. */ - public attachedCompletionCallbacks: temporal.api.common.v1.ICallback[]; - - /** Optional. The identity of the client who initiated the request that created this event. */ - public identity: string; - - /** - * Priority override upserted in this event. Represents the full priority; not just partial fields. - * Ignored if nil. - */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Creates a new WorkflowExecutionOptionsUpdatedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionOptionsUpdatedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionOptionsUpdatedEventAttributes): temporal.api.history.v1.WorkflowExecutionOptionsUpdatedEventAttributes; - - /** - * Encodes the specified WorkflowExecutionOptionsUpdatedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionOptionsUpdatedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionOptionsUpdatedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionOptionsUpdatedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionOptionsUpdatedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionOptionsUpdatedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionOptionsUpdatedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionOptionsUpdatedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionOptionsUpdatedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionOptionsUpdatedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionOptionsUpdatedEventAttributes; - - /** - * Decodes a WorkflowExecutionOptionsUpdatedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionOptionsUpdatedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionOptionsUpdatedEventAttributes; - - /** - * Creates a WorkflowExecutionOptionsUpdatedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionOptionsUpdatedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionOptionsUpdatedEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionOptionsUpdatedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionOptionsUpdatedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionOptionsUpdatedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionOptionsUpdatedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionOptionsUpdatedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowPropertiesModifiedExternallyEventAttributes. */ - interface IWorkflowPropertiesModifiedExternallyEventAttributes { - - /** Not used. */ - newTaskQueue?: (string|null); - - /** Not used. */ - newWorkflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** Not used. */ - newWorkflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Not used. */ - newWorkflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Not used. */ - upsertedMemo?: (temporal.api.common.v1.IMemo|null); - } - - /** Not used anywhere. Use case is replaced by WorkflowExecutionOptionsUpdatedEventAttributes */ - class WorkflowPropertiesModifiedExternallyEventAttributes implements IWorkflowPropertiesModifiedExternallyEventAttributes { - - /** - * Constructs a new WorkflowPropertiesModifiedExternallyEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowPropertiesModifiedExternallyEventAttributes); - - /** Not used. */ - public newTaskQueue: string; - - /** Not used. */ - public newWorkflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** Not used. */ - public newWorkflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Not used. */ - public newWorkflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Not used. */ - public upsertedMemo?: (temporal.api.common.v1.IMemo|null); - - /** - * Creates a new WorkflowPropertiesModifiedExternallyEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowPropertiesModifiedExternallyEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowPropertiesModifiedExternallyEventAttributes): temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes; - - /** - * Encodes the specified WorkflowPropertiesModifiedExternallyEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes.verify|verify} messages. - * @param message WorkflowPropertiesModifiedExternallyEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowPropertiesModifiedExternallyEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowPropertiesModifiedExternallyEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes.verify|verify} messages. - * @param message WorkflowPropertiesModifiedExternallyEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowPropertiesModifiedExternallyEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowPropertiesModifiedExternallyEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowPropertiesModifiedExternallyEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes; - - /** - * Decodes a WorkflowPropertiesModifiedExternallyEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowPropertiesModifiedExternallyEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes; - - /** - * Creates a WorkflowPropertiesModifiedExternallyEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowPropertiesModifiedExternallyEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes; - - /** - * Creates a plain object from a WorkflowPropertiesModifiedExternallyEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowPropertiesModifiedExternallyEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowPropertiesModifiedExternallyEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowPropertiesModifiedExternallyEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivityPropertiesModifiedExternallyEventAttributes. */ - interface IActivityPropertiesModifiedExternallyEventAttributes { - - /** The id of the `ACTIVITY_TASK_SCHEDULED` event this modification corresponds to. */ - scheduledEventId?: (Long|null); - - /** - * If set, update the retry policy of the activity, replacing it with the specified one. - * The number of attempts at the activity is preserved. - */ - newRetryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - } - - /** Represents an ActivityPropertiesModifiedExternallyEventAttributes. */ - class ActivityPropertiesModifiedExternallyEventAttributes implements IActivityPropertiesModifiedExternallyEventAttributes { - - /** - * Constructs a new ActivityPropertiesModifiedExternallyEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IActivityPropertiesModifiedExternallyEventAttributes); - - /** The id of the `ACTIVITY_TASK_SCHEDULED` event this modification corresponds to. */ - public scheduledEventId: Long; - - /** - * If set, update the retry policy of the activity, replacing it with the specified one. - * The number of attempts at the activity is preserved. - */ - public newRetryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** - * Creates a new ActivityPropertiesModifiedExternallyEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityPropertiesModifiedExternallyEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IActivityPropertiesModifiedExternallyEventAttributes): temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes; - - /** - * Encodes the specified ActivityPropertiesModifiedExternallyEventAttributes message. Does not implicitly {@link temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes.verify|verify} messages. - * @param message ActivityPropertiesModifiedExternallyEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IActivityPropertiesModifiedExternallyEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityPropertiesModifiedExternallyEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes.verify|verify} messages. - * @param message ActivityPropertiesModifiedExternallyEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IActivityPropertiesModifiedExternallyEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityPropertiesModifiedExternallyEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityPropertiesModifiedExternallyEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes; - - /** - * Decodes an ActivityPropertiesModifiedExternallyEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityPropertiesModifiedExternallyEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes; - - /** - * Creates an ActivityPropertiesModifiedExternallyEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityPropertiesModifiedExternallyEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes; - - /** - * Creates a plain object from an ActivityPropertiesModifiedExternallyEventAttributes message. Also converts values to other types if specified. - * @param message ActivityPropertiesModifiedExternallyEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityPropertiesModifiedExternallyEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityPropertiesModifiedExternallyEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionUpdateAcceptedEventAttributes. */ - interface IWorkflowExecutionUpdateAcceptedEventAttributes { - - /** The instance ID of the update protocol that generated this event. */ - protocolInstanceId?: (string|null); - - /** - * The message ID of the original request message that initiated this - * update. Needed so that the worker can recreate and deliver that same - * message as part of replay. - */ - acceptedRequestMessageId?: (string|null); - - /** The event ID used to sequence the original request message. */ - acceptedRequestSequencingEventId?: (Long|null); - - /** - * The message payload of the original request message that initiated this - * update. - */ - acceptedRequest?: (temporal.api.update.v1.IRequest|null); - } - - /** Represents a WorkflowExecutionUpdateAcceptedEventAttributes. */ - class WorkflowExecutionUpdateAcceptedEventAttributes implements IWorkflowExecutionUpdateAcceptedEventAttributes { - - /** - * Constructs a new WorkflowExecutionUpdateAcceptedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionUpdateAcceptedEventAttributes); - - /** The instance ID of the update protocol that generated this event. */ - public protocolInstanceId: string; - - /** - * The message ID of the original request message that initiated this - * update. Needed so that the worker can recreate and deliver that same - * message as part of replay. - */ - public acceptedRequestMessageId: string; - - /** The event ID used to sequence the original request message. */ - public acceptedRequestSequencingEventId: Long; - - /** - * The message payload of the original request message that initiated this - * update. - */ - public acceptedRequest?: (temporal.api.update.v1.IRequest|null); - - /** - * Creates a new WorkflowExecutionUpdateAcceptedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionUpdateAcceptedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionUpdateAcceptedEventAttributes): temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes; - - /** - * Encodes the specified WorkflowExecutionUpdateAcceptedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionUpdateAcceptedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionUpdateAcceptedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionUpdateAcceptedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionUpdateAcceptedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionUpdateAcceptedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionUpdateAcceptedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionUpdateAcceptedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes; - - /** - * Decodes a WorkflowExecutionUpdateAcceptedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionUpdateAcceptedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes; - - /** - * Creates a WorkflowExecutionUpdateAcceptedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionUpdateAcceptedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionUpdateAcceptedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionUpdateAcceptedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionUpdateAcceptedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionUpdateAcceptedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionUpdateCompletedEventAttributes. */ - interface IWorkflowExecutionUpdateCompletedEventAttributes { - - /** The metadata about this update. */ - meta?: (temporal.api.update.v1.IMeta|null); - - /** The event ID indicating the acceptance of this update. */ - acceptedEventId?: (Long|null); - - /** The outcome of executing the workflow update function. */ - outcome?: (temporal.api.update.v1.IOutcome|null); - } - - /** Represents a WorkflowExecutionUpdateCompletedEventAttributes. */ - class WorkflowExecutionUpdateCompletedEventAttributes implements IWorkflowExecutionUpdateCompletedEventAttributes { - - /** - * Constructs a new WorkflowExecutionUpdateCompletedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionUpdateCompletedEventAttributes); - - /** The metadata about this update. */ - public meta?: (temporal.api.update.v1.IMeta|null); - - /** The event ID indicating the acceptance of this update. */ - public acceptedEventId: Long; - - /** The outcome of executing the workflow update function. */ - public outcome?: (temporal.api.update.v1.IOutcome|null); - - /** - * Creates a new WorkflowExecutionUpdateCompletedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionUpdateCompletedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionUpdateCompletedEventAttributes): temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes; - - /** - * Encodes the specified WorkflowExecutionUpdateCompletedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionUpdateCompletedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionUpdateCompletedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionUpdateCompletedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionUpdateCompletedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionUpdateCompletedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionUpdateCompletedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionUpdateCompletedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes; - - /** - * Decodes a WorkflowExecutionUpdateCompletedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionUpdateCompletedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes; - - /** - * Creates a WorkflowExecutionUpdateCompletedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionUpdateCompletedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionUpdateCompletedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionUpdateCompletedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionUpdateCompletedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionUpdateCompletedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionUpdateRejectedEventAttributes. */ - interface IWorkflowExecutionUpdateRejectedEventAttributes { - - /** The instance ID of the update protocol that generated this event. */ - protocolInstanceId?: (string|null); - - /** - * The message ID of the original request message that initiated this - * update. Needed so that the worker can recreate and deliver that same - * message as part of replay. - */ - rejectedRequestMessageId?: (string|null); - - /** The event ID used to sequence the original request message. */ - rejectedRequestSequencingEventId?: (Long|null); - - /** - * The message payload of the original request message that initiated this - * update. - */ - rejectedRequest?: (temporal.api.update.v1.IRequest|null); - - /** The cause of rejection. */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** Represents a WorkflowExecutionUpdateRejectedEventAttributes. */ - class WorkflowExecutionUpdateRejectedEventAttributes implements IWorkflowExecutionUpdateRejectedEventAttributes { - - /** - * Constructs a new WorkflowExecutionUpdateRejectedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionUpdateRejectedEventAttributes); - - /** The instance ID of the update protocol that generated this event. */ - public protocolInstanceId: string; - - /** - * The message ID of the original request message that initiated this - * update. Needed so that the worker can recreate and deliver that same - * message as part of replay. - */ - public rejectedRequestMessageId: string; - - /** The event ID used to sequence the original request message. */ - public rejectedRequestSequencingEventId: Long; - - /** - * The message payload of the original request message that initiated this - * update. - */ - public rejectedRequest?: (temporal.api.update.v1.IRequest|null); - - /** The cause of rejection. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new WorkflowExecutionUpdateRejectedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionUpdateRejectedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionUpdateRejectedEventAttributes): temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes; - - /** - * Encodes the specified WorkflowExecutionUpdateRejectedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionUpdateRejectedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionUpdateRejectedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionUpdateRejectedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionUpdateRejectedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionUpdateRejectedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionUpdateRejectedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionUpdateRejectedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes; - - /** - * Decodes a WorkflowExecutionUpdateRejectedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionUpdateRejectedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes; - - /** - * Creates a WorkflowExecutionUpdateRejectedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionUpdateRejectedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionUpdateRejectedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionUpdateRejectedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionUpdateRejectedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionUpdateRejectedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionUpdateAdmittedEventAttributes. */ - interface IWorkflowExecutionUpdateAdmittedEventAttributes { - - /** The update request associated with this event. */ - request?: (temporal.api.update.v1.IRequest|null); - - /** An explanation of why this event was written to history. */ - origin?: (temporal.api.enums.v1.UpdateAdmittedEventOrigin|null); - } - - /** Represents a WorkflowExecutionUpdateAdmittedEventAttributes. */ - class WorkflowExecutionUpdateAdmittedEventAttributes implements IWorkflowExecutionUpdateAdmittedEventAttributes { - - /** - * Constructs a new WorkflowExecutionUpdateAdmittedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionUpdateAdmittedEventAttributes); - - /** The update request associated with this event. */ - public request?: (temporal.api.update.v1.IRequest|null); - - /** An explanation of why this event was written to history. */ - public origin: temporal.api.enums.v1.UpdateAdmittedEventOrigin; - - /** - * Creates a new WorkflowExecutionUpdateAdmittedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionUpdateAdmittedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionUpdateAdmittedEventAttributes): temporal.api.history.v1.WorkflowExecutionUpdateAdmittedEventAttributes; - - /** - * Encodes the specified WorkflowExecutionUpdateAdmittedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionUpdateAdmittedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionUpdateAdmittedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionUpdateAdmittedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionUpdateAdmittedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionUpdateAdmittedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionUpdateAdmittedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionUpdateAdmittedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionUpdateAdmittedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionUpdateAdmittedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionUpdateAdmittedEventAttributes; - - /** - * Decodes a WorkflowExecutionUpdateAdmittedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionUpdateAdmittedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionUpdateAdmittedEventAttributes; - - /** - * Creates a WorkflowExecutionUpdateAdmittedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionUpdateAdmittedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionUpdateAdmittedEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionUpdateAdmittedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionUpdateAdmittedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionUpdateAdmittedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionUpdateAdmittedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionUpdateAdmittedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionPausedEventAttributes. */ - interface IWorkflowExecutionPausedEventAttributes { - - /** The identity of the client who paused the workflow execution. */ - identity?: (string|null); - - /** The reason for pausing the workflow execution. */ - reason?: (string|null); - - /** The request ID of the request that paused the workflow execution. */ - requestId?: (string|null); - } - - /** Attributes for an event marking that a workflow execution was paused. */ - class WorkflowExecutionPausedEventAttributes implements IWorkflowExecutionPausedEventAttributes { - - /** - * Constructs a new WorkflowExecutionPausedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionPausedEventAttributes); - - /** The identity of the client who paused the workflow execution. */ - public identity: string; - - /** The reason for pausing the workflow execution. */ - public reason: string; - - /** The request ID of the request that paused the workflow execution. */ - public requestId: string; - - /** - * Creates a new WorkflowExecutionPausedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionPausedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionPausedEventAttributes): temporal.api.history.v1.WorkflowExecutionPausedEventAttributes; - - /** - * Encodes the specified WorkflowExecutionPausedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionPausedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionPausedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionPausedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionPausedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionPausedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionPausedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionPausedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionPausedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionPausedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionPausedEventAttributes; - - /** - * Decodes a WorkflowExecutionPausedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionPausedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionPausedEventAttributes; - - /** - * Creates a WorkflowExecutionPausedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionPausedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionPausedEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionPausedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionPausedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionPausedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionPausedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionPausedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionUnpausedEventAttributes. */ - interface IWorkflowExecutionUnpausedEventAttributes { - - /** The identity of the client who unpaused the workflow execution. */ - identity?: (string|null); - - /** The reason for unpausing the workflow execution. */ - reason?: (string|null); - - /** The request ID of the request that unpaused the workflow execution. */ - requestId?: (string|null); - } - - /** Attributes for an event marking that a workflow execution was unpaused. */ - class WorkflowExecutionUnpausedEventAttributes implements IWorkflowExecutionUnpausedEventAttributes { - - /** - * Constructs a new WorkflowExecutionUnpausedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IWorkflowExecutionUnpausedEventAttributes); - - /** The identity of the client who unpaused the workflow execution. */ - public identity: string; - - /** The reason for unpausing the workflow execution. */ - public reason: string; - - /** The request ID of the request that unpaused the workflow execution. */ - public requestId: string; - - /** - * Creates a new WorkflowExecutionUnpausedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionUnpausedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.IWorkflowExecutionUnpausedEventAttributes): temporal.api.history.v1.WorkflowExecutionUnpausedEventAttributes; - - /** - * Encodes the specified WorkflowExecutionUnpausedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionUnpausedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionUnpausedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IWorkflowExecutionUnpausedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionUnpausedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.WorkflowExecutionUnpausedEventAttributes.verify|verify} messages. - * @param message WorkflowExecutionUnpausedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IWorkflowExecutionUnpausedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionUnpausedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionUnpausedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.WorkflowExecutionUnpausedEventAttributes; - - /** - * Decodes a WorkflowExecutionUnpausedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionUnpausedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.WorkflowExecutionUnpausedEventAttributes; - - /** - * Creates a WorkflowExecutionUnpausedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionUnpausedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.WorkflowExecutionUnpausedEventAttributes; - - /** - * Creates a plain object from a WorkflowExecutionUnpausedEventAttributes message. Also converts values to other types if specified. - * @param message WorkflowExecutionUnpausedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.WorkflowExecutionUnpausedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionUnpausedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionUnpausedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusOperationScheduledEventAttributes. */ - interface INexusOperationScheduledEventAttributes { - - /** Endpoint name, must exist in the endpoint registry. */ - endpoint?: (string|null); - - /** Service name. */ - service?: (string|null); - - /** Operation name. */ - operation?: (string|null); - - /** - * Input for the operation. The server converts this into Nexus request content and the appropriate content headers - * internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the - * content is transformed back to the original Payload stored in this event. - */ - input?: (temporal.api.common.v1.IPayload|null); - - /** - * Schedule-to-close timeout for this operation. - * Indicates how long the caller is willing to wait for operation completion. - * Calls are retried internally by the server. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Header to attach to the Nexus request. Note these headers are not the same as Temporal headers on internal - * activities and child workflows, these are transmitted to Nexus operations that may be external and are not - * traditional payloads. - */ - nexusHeader?: ({ [k: string]: string }|null); - - /** The `WORKFLOW_TASK_COMPLETED` event that the corresponding ScheduleNexusOperation command was reported with. */ - workflowTaskCompletedEventId?: (Long|null); - - /** - * A unique ID generated by the history service upon creation of this event. - * The ID will be transmitted with all nexus StartOperation requests and is used as an idempotentency key. - */ - requestId?: (string|null); - - /** - * Endpoint ID as resolved in the endpoint registry at the time this event was generated. - * This is stored on the event and used internally by the server in case the endpoint is renamed from the time the - * event was originally scheduled. - */ - endpointId?: (string|null); - - /** - * Schedule-to-start timeout for this operation. - * See ScheduleNexusOperationCommandAttributes.schedule_to_start_timeout for details. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Start-to-close timeout for this operation. - * See ScheduleNexusOperationCommandAttributes.start_to_close_timeout for details. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - startToCloseTimeout?: (google.protobuf.IDuration|null); - } - - /** Event marking that an operation was scheduled by a workflow via the ScheduleNexusOperation command. */ - class NexusOperationScheduledEventAttributes implements INexusOperationScheduledEventAttributes { - - /** - * Constructs a new NexusOperationScheduledEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.INexusOperationScheduledEventAttributes); - - /** Endpoint name, must exist in the endpoint registry. */ - public endpoint: string; - - /** Service name. */ - public service: string; - - /** Operation name. */ - public operation: string; - - /** - * Input for the operation. The server converts this into Nexus request content and the appropriate content headers - * internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the - * content is transformed back to the original Payload stored in this event. - */ - public input?: (temporal.api.common.v1.IPayload|null); - - /** - * Schedule-to-close timeout for this operation. - * Indicates how long the caller is willing to wait for operation completion. - * Calls are retried internally by the server. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Header to attach to the Nexus request. Note these headers are not the same as Temporal headers on internal - * activities and child workflows, these are transmitted to Nexus operations that may be external and are not - * traditional payloads. - */ - public nexusHeader: { [k: string]: string }; - - /** The `WORKFLOW_TASK_COMPLETED` event that the corresponding ScheduleNexusOperation command was reported with. */ - public workflowTaskCompletedEventId: Long; - - /** - * A unique ID generated by the history service upon creation of this event. - * The ID will be transmitted with all nexus StartOperation requests and is used as an idempotentency key. - */ - public requestId: string; - - /** - * Endpoint ID as resolved in the endpoint registry at the time this event was generated. - * This is stored on the event and used internally by the server in case the endpoint is renamed from the time the - * event was originally scheduled. - */ - public endpointId: string; - - /** - * Schedule-to-start timeout for this operation. - * See ScheduleNexusOperationCommandAttributes.schedule_to_start_timeout for details. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Start-to-close timeout for this operation. - * See ScheduleNexusOperationCommandAttributes.start_to_close_timeout for details. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new NexusOperationScheduledEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusOperationScheduledEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.INexusOperationScheduledEventAttributes): temporal.api.history.v1.NexusOperationScheduledEventAttributes; - - /** - * Encodes the specified NexusOperationScheduledEventAttributes message. Does not implicitly {@link temporal.api.history.v1.NexusOperationScheduledEventAttributes.verify|verify} messages. - * @param message NexusOperationScheduledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.INexusOperationScheduledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusOperationScheduledEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.NexusOperationScheduledEventAttributes.verify|verify} messages. - * @param message NexusOperationScheduledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.INexusOperationScheduledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusOperationScheduledEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusOperationScheduledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.NexusOperationScheduledEventAttributes; - - /** - * Decodes a NexusOperationScheduledEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusOperationScheduledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.NexusOperationScheduledEventAttributes; - - /** - * Creates a NexusOperationScheduledEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusOperationScheduledEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.NexusOperationScheduledEventAttributes; - - /** - * Creates a plain object from a NexusOperationScheduledEventAttributes message. Also converts values to other types if specified. - * @param message NexusOperationScheduledEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.NexusOperationScheduledEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusOperationScheduledEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusOperationScheduledEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusOperationStartedEventAttributes. */ - interface INexusOperationStartedEventAttributes { - - /** The ID of the `NEXUS_OPERATION_SCHEDULED` event this task corresponds to. */ - scheduledEventId?: (Long|null); - - /** - * The operation ID returned by the Nexus handler in the response to the StartOperation request. - * This ID is used when canceling the operation. - * - * Deprecated: Renamed to operation_token. - */ - operationId?: (string|null); - - /** The request ID allocated at schedule time. */ - requestId?: (string|null); - - /** - * The operation token returned by the Nexus handler in the response to the StartOperation request. - * This token is used when canceling the operation. - */ - operationToken?: (string|null); - } - - /** - * Event marking an asynchronous operation was started by the responding Nexus handler. - * If the operation completes synchronously, this event is not generated. - * In rare situations, such as request timeouts, the service may fail to record the actual start time and will fabricate - * this event upon receiving the operation completion via callback. - */ - class NexusOperationStartedEventAttributes implements INexusOperationStartedEventAttributes { - - /** - * Constructs a new NexusOperationStartedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.INexusOperationStartedEventAttributes); - - /** The ID of the `NEXUS_OPERATION_SCHEDULED` event this task corresponds to. */ - public scheduledEventId: Long; - - /** - * The operation ID returned by the Nexus handler in the response to the StartOperation request. - * This ID is used when canceling the operation. - * - * Deprecated: Renamed to operation_token. - */ - public operationId: string; - - /** The request ID allocated at schedule time. */ - public requestId: string; - - /** - * The operation token returned by the Nexus handler in the response to the StartOperation request. - * This token is used when canceling the operation. - */ - public operationToken: string; - - /** - * Creates a new NexusOperationStartedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusOperationStartedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.INexusOperationStartedEventAttributes): temporal.api.history.v1.NexusOperationStartedEventAttributes; - - /** - * Encodes the specified NexusOperationStartedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.NexusOperationStartedEventAttributes.verify|verify} messages. - * @param message NexusOperationStartedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.INexusOperationStartedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusOperationStartedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.NexusOperationStartedEventAttributes.verify|verify} messages. - * @param message NexusOperationStartedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.INexusOperationStartedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusOperationStartedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusOperationStartedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.NexusOperationStartedEventAttributes; - - /** - * Decodes a NexusOperationStartedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusOperationStartedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.NexusOperationStartedEventAttributes; - - /** - * Creates a NexusOperationStartedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusOperationStartedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.NexusOperationStartedEventAttributes; - - /** - * Creates a plain object from a NexusOperationStartedEventAttributes message. Also converts values to other types if specified. - * @param message NexusOperationStartedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.NexusOperationStartedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusOperationStartedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusOperationStartedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusOperationCompletedEventAttributes. */ - interface INexusOperationCompletedEventAttributes { - - /** The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. */ - scheduledEventId?: (Long|null); - - /** - * Serialized result of the Nexus operation. The response of the Nexus handler. - * Delivered either via a completion callback or as a response to a synchronous operation. - */ - result?: (temporal.api.common.v1.IPayload|null); - - /** The request ID allocated at schedule time. */ - requestId?: (string|null); - } - - /** Nexus operation completed successfully. */ - class NexusOperationCompletedEventAttributes implements INexusOperationCompletedEventAttributes { - - /** - * Constructs a new NexusOperationCompletedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.INexusOperationCompletedEventAttributes); - - /** The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. */ - public scheduledEventId: Long; - - /** - * Serialized result of the Nexus operation. The response of the Nexus handler. - * Delivered either via a completion callback or as a response to a synchronous operation. - */ - public result?: (temporal.api.common.v1.IPayload|null); - - /** The request ID allocated at schedule time. */ - public requestId: string; - - /** - * Creates a new NexusOperationCompletedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusOperationCompletedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.INexusOperationCompletedEventAttributes): temporal.api.history.v1.NexusOperationCompletedEventAttributes; - - /** - * Encodes the specified NexusOperationCompletedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.NexusOperationCompletedEventAttributes.verify|verify} messages. - * @param message NexusOperationCompletedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.INexusOperationCompletedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusOperationCompletedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.NexusOperationCompletedEventAttributes.verify|verify} messages. - * @param message NexusOperationCompletedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.INexusOperationCompletedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusOperationCompletedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusOperationCompletedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.NexusOperationCompletedEventAttributes; - - /** - * Decodes a NexusOperationCompletedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusOperationCompletedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.NexusOperationCompletedEventAttributes; - - /** - * Creates a NexusOperationCompletedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusOperationCompletedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.NexusOperationCompletedEventAttributes; - - /** - * Creates a plain object from a NexusOperationCompletedEventAttributes message. Also converts values to other types if specified. - * @param message NexusOperationCompletedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.NexusOperationCompletedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusOperationCompletedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusOperationCompletedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusOperationFailedEventAttributes. */ - interface INexusOperationFailedEventAttributes { - - /** The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. */ - scheduledEventId?: (Long|null); - - /** Failure details. A NexusOperationFailureInfo wrapping an ApplicationFailureInfo. */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** The request ID allocated at schedule time. */ - requestId?: (string|null); - } - - /** Nexus operation failed. */ - class NexusOperationFailedEventAttributes implements INexusOperationFailedEventAttributes { - - /** - * Constructs a new NexusOperationFailedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.INexusOperationFailedEventAttributes); - - /** The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. */ - public scheduledEventId: Long; - - /** Failure details. A NexusOperationFailureInfo wrapping an ApplicationFailureInfo. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** The request ID allocated at schedule time. */ - public requestId: string; - - /** - * Creates a new NexusOperationFailedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusOperationFailedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.INexusOperationFailedEventAttributes): temporal.api.history.v1.NexusOperationFailedEventAttributes; - - /** - * Encodes the specified NexusOperationFailedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.NexusOperationFailedEventAttributes.verify|verify} messages. - * @param message NexusOperationFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.INexusOperationFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusOperationFailedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.NexusOperationFailedEventAttributes.verify|verify} messages. - * @param message NexusOperationFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.INexusOperationFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusOperationFailedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusOperationFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.NexusOperationFailedEventAttributes; - - /** - * Decodes a NexusOperationFailedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusOperationFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.NexusOperationFailedEventAttributes; - - /** - * Creates a NexusOperationFailedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusOperationFailedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.NexusOperationFailedEventAttributes; - - /** - * Creates a plain object from a NexusOperationFailedEventAttributes message. Also converts values to other types if specified. - * @param message NexusOperationFailedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.NexusOperationFailedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusOperationFailedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusOperationFailedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusOperationTimedOutEventAttributes. */ - interface INexusOperationTimedOutEventAttributes { - - /** The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. */ - scheduledEventId?: (Long|null); - - /** Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo. */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** The request ID allocated at schedule time. */ - requestId?: (string|null); - } - - /** Nexus operation timed out. */ - class NexusOperationTimedOutEventAttributes implements INexusOperationTimedOutEventAttributes { - - /** - * Constructs a new NexusOperationTimedOutEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.INexusOperationTimedOutEventAttributes); - - /** The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. */ - public scheduledEventId: Long; - - /** Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** The request ID allocated at schedule time. */ - public requestId: string; - - /** - * Creates a new NexusOperationTimedOutEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusOperationTimedOutEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.INexusOperationTimedOutEventAttributes): temporal.api.history.v1.NexusOperationTimedOutEventAttributes; - - /** - * Encodes the specified NexusOperationTimedOutEventAttributes message. Does not implicitly {@link temporal.api.history.v1.NexusOperationTimedOutEventAttributes.verify|verify} messages. - * @param message NexusOperationTimedOutEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.INexusOperationTimedOutEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusOperationTimedOutEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.NexusOperationTimedOutEventAttributes.verify|verify} messages. - * @param message NexusOperationTimedOutEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.INexusOperationTimedOutEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusOperationTimedOutEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusOperationTimedOutEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.NexusOperationTimedOutEventAttributes; - - /** - * Decodes a NexusOperationTimedOutEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusOperationTimedOutEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.NexusOperationTimedOutEventAttributes; - - /** - * Creates a NexusOperationTimedOutEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusOperationTimedOutEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.NexusOperationTimedOutEventAttributes; - - /** - * Creates a plain object from a NexusOperationTimedOutEventAttributes message. Also converts values to other types if specified. - * @param message NexusOperationTimedOutEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.NexusOperationTimedOutEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusOperationTimedOutEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusOperationTimedOutEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusOperationCanceledEventAttributes. */ - interface INexusOperationCanceledEventAttributes { - - /** The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. */ - scheduledEventId?: (Long|null); - - /** Cancellation details. */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** The request ID allocated at schedule time. */ - requestId?: (string|null); - } - - /** Nexus operation completed as canceled. May or may not have been due to a cancellation request by the workflow. */ - class NexusOperationCanceledEventAttributes implements INexusOperationCanceledEventAttributes { - - /** - * Constructs a new NexusOperationCanceledEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.INexusOperationCanceledEventAttributes); - - /** The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. */ - public scheduledEventId: Long; - - /** Cancellation details. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** The request ID allocated at schedule time. */ - public requestId: string; - - /** - * Creates a new NexusOperationCanceledEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusOperationCanceledEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.INexusOperationCanceledEventAttributes): temporal.api.history.v1.NexusOperationCanceledEventAttributes; - - /** - * Encodes the specified NexusOperationCanceledEventAttributes message. Does not implicitly {@link temporal.api.history.v1.NexusOperationCanceledEventAttributes.verify|verify} messages. - * @param message NexusOperationCanceledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.INexusOperationCanceledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusOperationCanceledEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.NexusOperationCanceledEventAttributes.verify|verify} messages. - * @param message NexusOperationCanceledEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.INexusOperationCanceledEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusOperationCanceledEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusOperationCanceledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.NexusOperationCanceledEventAttributes; - - /** - * Decodes a NexusOperationCanceledEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusOperationCanceledEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.NexusOperationCanceledEventAttributes; - - /** - * Creates a NexusOperationCanceledEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusOperationCanceledEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.NexusOperationCanceledEventAttributes; - - /** - * Creates a plain object from a NexusOperationCanceledEventAttributes message. Also converts values to other types if specified. - * @param message NexusOperationCanceledEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.NexusOperationCanceledEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusOperationCanceledEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusOperationCanceledEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusOperationCancelRequestedEventAttributes. */ - interface INexusOperationCancelRequestedEventAttributes { - - /** The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to. */ - scheduledEventId?: (Long|null); - - /** - * The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported - * with. - */ - workflowTaskCompletedEventId?: (Long|null); - } - - /** Represents a NexusOperationCancelRequestedEventAttributes. */ - class NexusOperationCancelRequestedEventAttributes implements INexusOperationCancelRequestedEventAttributes { - - /** - * Constructs a new NexusOperationCancelRequestedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.INexusOperationCancelRequestedEventAttributes); - - /** The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to. */ - public scheduledEventId: Long; - - /** - * The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported - * with. - */ - public workflowTaskCompletedEventId: Long; - - /** - * Creates a new NexusOperationCancelRequestedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusOperationCancelRequestedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.INexusOperationCancelRequestedEventAttributes): temporal.api.history.v1.NexusOperationCancelRequestedEventAttributes; - - /** - * Encodes the specified NexusOperationCancelRequestedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.NexusOperationCancelRequestedEventAttributes.verify|verify} messages. - * @param message NexusOperationCancelRequestedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.INexusOperationCancelRequestedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusOperationCancelRequestedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.NexusOperationCancelRequestedEventAttributes.verify|verify} messages. - * @param message NexusOperationCancelRequestedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.INexusOperationCancelRequestedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusOperationCancelRequestedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusOperationCancelRequestedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.NexusOperationCancelRequestedEventAttributes; - - /** - * Decodes a NexusOperationCancelRequestedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusOperationCancelRequestedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.NexusOperationCancelRequestedEventAttributes; - - /** - * Creates a NexusOperationCancelRequestedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusOperationCancelRequestedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.NexusOperationCancelRequestedEventAttributes; - - /** - * Creates a plain object from a NexusOperationCancelRequestedEventAttributes message. Also converts values to other types if specified. - * @param message NexusOperationCancelRequestedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.NexusOperationCancelRequestedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusOperationCancelRequestedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusOperationCancelRequestedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusOperationCancelRequestCompletedEventAttributes. */ - interface INexusOperationCancelRequestCompletedEventAttributes { - - /** The ID of the `NEXUS_OPERATION_CANCEL_REQUESTED` event. */ - requestedEventId?: (Long|null); - - /** - * The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported - * with. - */ - workflowTaskCompletedEventId?: (Long|null); - - /** The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to. */ - scheduledEventId?: (Long|null); - } - - /** Represents a NexusOperationCancelRequestCompletedEventAttributes. */ - class NexusOperationCancelRequestCompletedEventAttributes implements INexusOperationCancelRequestCompletedEventAttributes { - - /** - * Constructs a new NexusOperationCancelRequestCompletedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.INexusOperationCancelRequestCompletedEventAttributes); - - /** The ID of the `NEXUS_OPERATION_CANCEL_REQUESTED` event. */ - public requestedEventId: Long; - - /** - * The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported - * with. - */ - public workflowTaskCompletedEventId: Long; - - /** The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to. */ - public scheduledEventId: Long; - - /** - * Creates a new NexusOperationCancelRequestCompletedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusOperationCancelRequestCompletedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.INexusOperationCancelRequestCompletedEventAttributes): temporal.api.history.v1.NexusOperationCancelRequestCompletedEventAttributes; - - /** - * Encodes the specified NexusOperationCancelRequestCompletedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.NexusOperationCancelRequestCompletedEventAttributes.verify|verify} messages. - * @param message NexusOperationCancelRequestCompletedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.INexusOperationCancelRequestCompletedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusOperationCancelRequestCompletedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.NexusOperationCancelRequestCompletedEventAttributes.verify|verify} messages. - * @param message NexusOperationCancelRequestCompletedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.INexusOperationCancelRequestCompletedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusOperationCancelRequestCompletedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusOperationCancelRequestCompletedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.NexusOperationCancelRequestCompletedEventAttributes; - - /** - * Decodes a NexusOperationCancelRequestCompletedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusOperationCancelRequestCompletedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.NexusOperationCancelRequestCompletedEventAttributes; - - /** - * Creates a NexusOperationCancelRequestCompletedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusOperationCancelRequestCompletedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.NexusOperationCancelRequestCompletedEventAttributes; - - /** - * Creates a plain object from a NexusOperationCancelRequestCompletedEventAttributes message. Also converts values to other types if specified. - * @param message NexusOperationCancelRequestCompletedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.NexusOperationCancelRequestCompletedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusOperationCancelRequestCompletedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusOperationCancelRequestCompletedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusOperationCancelRequestFailedEventAttributes. */ - interface INexusOperationCancelRequestFailedEventAttributes { - - /** The ID of the `NEXUS_OPERATION_CANCEL_REQUESTED` event. */ - requestedEventId?: (Long|null); - - /** - * The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported - * with. - */ - workflowTaskCompletedEventId?: (Long|null); - - /** Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo. */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to. */ - scheduledEventId?: (Long|null); - } - - /** Represents a NexusOperationCancelRequestFailedEventAttributes. */ - class NexusOperationCancelRequestFailedEventAttributes implements INexusOperationCancelRequestFailedEventAttributes { - - /** - * Constructs a new NexusOperationCancelRequestFailedEventAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.INexusOperationCancelRequestFailedEventAttributes); - - /** The ID of the `NEXUS_OPERATION_CANCEL_REQUESTED` event. */ - public requestedEventId: Long; - - /** - * The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported - * with. - */ - public workflowTaskCompletedEventId: Long; - - /** Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to. */ - public scheduledEventId: Long; - - /** - * Creates a new NexusOperationCancelRequestFailedEventAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusOperationCancelRequestFailedEventAttributes instance - */ - public static create(properties?: temporal.api.history.v1.INexusOperationCancelRequestFailedEventAttributes): temporal.api.history.v1.NexusOperationCancelRequestFailedEventAttributes; - - /** - * Encodes the specified NexusOperationCancelRequestFailedEventAttributes message. Does not implicitly {@link temporal.api.history.v1.NexusOperationCancelRequestFailedEventAttributes.verify|verify} messages. - * @param message NexusOperationCancelRequestFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.INexusOperationCancelRequestFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusOperationCancelRequestFailedEventAttributes message, length delimited. Does not implicitly {@link temporal.api.history.v1.NexusOperationCancelRequestFailedEventAttributes.verify|verify} messages. - * @param message NexusOperationCancelRequestFailedEventAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.INexusOperationCancelRequestFailedEventAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusOperationCancelRequestFailedEventAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusOperationCancelRequestFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.NexusOperationCancelRequestFailedEventAttributes; - - /** - * Decodes a NexusOperationCancelRequestFailedEventAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusOperationCancelRequestFailedEventAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.NexusOperationCancelRequestFailedEventAttributes; - - /** - * Creates a NexusOperationCancelRequestFailedEventAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusOperationCancelRequestFailedEventAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.NexusOperationCancelRequestFailedEventAttributes; - - /** - * Creates a plain object from a NexusOperationCancelRequestFailedEventAttributes message. Also converts values to other types if specified. - * @param message NexusOperationCancelRequestFailedEventAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.NexusOperationCancelRequestFailedEventAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusOperationCancelRequestFailedEventAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusOperationCancelRequestFailedEventAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HistoryEvent. */ - interface IHistoryEvent { - - /** Monotonically increasing event number, starts at 1. */ - eventId?: (Long|null); - - /** HistoryEvent eventTime */ - eventTime?: (google.protobuf.ITimestamp|null); - - /** HistoryEvent eventType */ - eventType?: (temporal.api.enums.v1.EventType|null); - - /** - * Failover version of the event, used by the server for multi-cluster replication and history - * versioning. SDKs generally ignore this field. - */ - version?: (Long|null); - - /** - * Identifier used by the service to order replication and transfer tasks associated with this - * event. SDKs generally ignore this field. - */ - taskId?: (Long|null); - - /** - * Set to true when the SDK may ignore the event as it does not impact workflow state or - * information in any way that the SDK need be concerned with. If an SDK encounters an event - * type which it does not understand, it must error unless this is true. If it is true, it's - * acceptable for the event type and/or attributes to be uninterpretable. - */ - workerMayIgnore?: (boolean|null); - - /** - * Metadata on the event. This is often carried over from commands and client calls. Most events - * won't have this information, and how this information is used is dependent upon the interface - * that reads it. - * - * Current well-known uses: - * workflow_execution_started_event_attributes - summary and details from start workflow. - * timer_started_event_attributes - summary represents an identifier for the timer for use by - * user interfaces. - */ - userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** Links associated with the event. */ - links?: (temporal.api.common.v1.ILink[]|null); - - /** HistoryEvent workflowExecutionStartedEventAttributes */ - workflowExecutionStartedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionStartedEventAttributes|null); - - /** HistoryEvent workflowExecutionCompletedEventAttributes */ - workflowExecutionCompletedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionCompletedEventAttributes|null); - - /** HistoryEvent workflowExecutionFailedEventAttributes */ - workflowExecutionFailedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionFailedEventAttributes|null); - - /** HistoryEvent workflowExecutionTimedOutEventAttributes */ - workflowExecutionTimedOutEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionTimedOutEventAttributes|null); - - /** HistoryEvent workflowTaskScheduledEventAttributes */ - workflowTaskScheduledEventAttributes?: (temporal.api.history.v1.IWorkflowTaskScheduledEventAttributes|null); - - /** HistoryEvent workflowTaskStartedEventAttributes */ - workflowTaskStartedEventAttributes?: (temporal.api.history.v1.IWorkflowTaskStartedEventAttributes|null); - - /** HistoryEvent workflowTaskCompletedEventAttributes */ - workflowTaskCompletedEventAttributes?: (temporal.api.history.v1.IWorkflowTaskCompletedEventAttributes|null); - - /** HistoryEvent workflowTaskTimedOutEventAttributes */ - workflowTaskTimedOutEventAttributes?: (temporal.api.history.v1.IWorkflowTaskTimedOutEventAttributes|null); - - /** HistoryEvent workflowTaskFailedEventAttributes */ - workflowTaskFailedEventAttributes?: (temporal.api.history.v1.IWorkflowTaskFailedEventAttributes|null); - - /** HistoryEvent activityTaskScheduledEventAttributes */ - activityTaskScheduledEventAttributes?: (temporal.api.history.v1.IActivityTaskScheduledEventAttributes|null); - - /** HistoryEvent activityTaskStartedEventAttributes */ - activityTaskStartedEventAttributes?: (temporal.api.history.v1.IActivityTaskStartedEventAttributes|null); - - /** HistoryEvent activityTaskCompletedEventAttributes */ - activityTaskCompletedEventAttributes?: (temporal.api.history.v1.IActivityTaskCompletedEventAttributes|null); - - /** HistoryEvent activityTaskFailedEventAttributes */ - activityTaskFailedEventAttributes?: (temporal.api.history.v1.IActivityTaskFailedEventAttributes|null); - - /** HistoryEvent activityTaskTimedOutEventAttributes */ - activityTaskTimedOutEventAttributes?: (temporal.api.history.v1.IActivityTaskTimedOutEventAttributes|null); - - /** HistoryEvent timerStartedEventAttributes */ - timerStartedEventAttributes?: (temporal.api.history.v1.ITimerStartedEventAttributes|null); - - /** HistoryEvent timerFiredEventAttributes */ - timerFiredEventAttributes?: (temporal.api.history.v1.ITimerFiredEventAttributes|null); - - /** HistoryEvent activityTaskCancelRequestedEventAttributes */ - activityTaskCancelRequestedEventAttributes?: (temporal.api.history.v1.IActivityTaskCancelRequestedEventAttributes|null); - - /** HistoryEvent activityTaskCanceledEventAttributes */ - activityTaskCanceledEventAttributes?: (temporal.api.history.v1.IActivityTaskCanceledEventAttributes|null); - - /** HistoryEvent timerCanceledEventAttributes */ - timerCanceledEventAttributes?: (temporal.api.history.v1.ITimerCanceledEventAttributes|null); - - /** HistoryEvent markerRecordedEventAttributes */ - markerRecordedEventAttributes?: (temporal.api.history.v1.IMarkerRecordedEventAttributes|null); - - /** HistoryEvent workflowExecutionSignaledEventAttributes */ - workflowExecutionSignaledEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionSignaledEventAttributes|null); - - /** HistoryEvent workflowExecutionTerminatedEventAttributes */ - workflowExecutionTerminatedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionTerminatedEventAttributes|null); - - /** HistoryEvent workflowExecutionCancelRequestedEventAttributes */ - workflowExecutionCancelRequestedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionCancelRequestedEventAttributes|null); - - /** HistoryEvent workflowExecutionCanceledEventAttributes */ - workflowExecutionCanceledEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionCanceledEventAttributes|null); - - /** HistoryEvent requestCancelExternalWorkflowExecutionInitiatedEventAttributes */ - requestCancelExternalWorkflowExecutionInitiatedEventAttributes?: (temporal.api.history.v1.IRequestCancelExternalWorkflowExecutionInitiatedEventAttributes|null); - - /** HistoryEvent requestCancelExternalWorkflowExecutionFailedEventAttributes */ - requestCancelExternalWorkflowExecutionFailedEventAttributes?: (temporal.api.history.v1.IRequestCancelExternalWorkflowExecutionFailedEventAttributes|null); - - /** HistoryEvent externalWorkflowExecutionCancelRequestedEventAttributes */ - externalWorkflowExecutionCancelRequestedEventAttributes?: (temporal.api.history.v1.IExternalWorkflowExecutionCancelRequestedEventAttributes|null); - - /** HistoryEvent workflowExecutionContinuedAsNewEventAttributes */ - workflowExecutionContinuedAsNewEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionContinuedAsNewEventAttributes|null); - - /** HistoryEvent startChildWorkflowExecutionInitiatedEventAttributes */ - startChildWorkflowExecutionInitiatedEventAttributes?: (temporal.api.history.v1.IStartChildWorkflowExecutionInitiatedEventAttributes|null); - - /** HistoryEvent startChildWorkflowExecutionFailedEventAttributes */ - startChildWorkflowExecutionFailedEventAttributes?: (temporal.api.history.v1.IStartChildWorkflowExecutionFailedEventAttributes|null); - - /** HistoryEvent childWorkflowExecutionStartedEventAttributes */ - childWorkflowExecutionStartedEventAttributes?: (temporal.api.history.v1.IChildWorkflowExecutionStartedEventAttributes|null); - - /** HistoryEvent childWorkflowExecutionCompletedEventAttributes */ - childWorkflowExecutionCompletedEventAttributes?: (temporal.api.history.v1.IChildWorkflowExecutionCompletedEventAttributes|null); - - /** HistoryEvent childWorkflowExecutionFailedEventAttributes */ - childWorkflowExecutionFailedEventAttributes?: (temporal.api.history.v1.IChildWorkflowExecutionFailedEventAttributes|null); - - /** HistoryEvent childWorkflowExecutionCanceledEventAttributes */ - childWorkflowExecutionCanceledEventAttributes?: (temporal.api.history.v1.IChildWorkflowExecutionCanceledEventAttributes|null); - - /** HistoryEvent childWorkflowExecutionTimedOutEventAttributes */ - childWorkflowExecutionTimedOutEventAttributes?: (temporal.api.history.v1.IChildWorkflowExecutionTimedOutEventAttributes|null); - - /** HistoryEvent childWorkflowExecutionTerminatedEventAttributes */ - childWorkflowExecutionTerminatedEventAttributes?: (temporal.api.history.v1.IChildWorkflowExecutionTerminatedEventAttributes|null); - - /** HistoryEvent signalExternalWorkflowExecutionInitiatedEventAttributes */ - signalExternalWorkflowExecutionInitiatedEventAttributes?: (temporal.api.history.v1.ISignalExternalWorkflowExecutionInitiatedEventAttributes|null); - - /** HistoryEvent signalExternalWorkflowExecutionFailedEventAttributes */ - signalExternalWorkflowExecutionFailedEventAttributes?: (temporal.api.history.v1.ISignalExternalWorkflowExecutionFailedEventAttributes|null); - - /** HistoryEvent externalWorkflowExecutionSignaledEventAttributes */ - externalWorkflowExecutionSignaledEventAttributes?: (temporal.api.history.v1.IExternalWorkflowExecutionSignaledEventAttributes|null); - - /** HistoryEvent upsertWorkflowSearchAttributesEventAttributes */ - upsertWorkflowSearchAttributesEventAttributes?: (temporal.api.history.v1.IUpsertWorkflowSearchAttributesEventAttributes|null); - - /** HistoryEvent workflowExecutionUpdateAcceptedEventAttributes */ - workflowExecutionUpdateAcceptedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionUpdateAcceptedEventAttributes|null); - - /** HistoryEvent workflowExecutionUpdateRejectedEventAttributes */ - workflowExecutionUpdateRejectedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionUpdateRejectedEventAttributes|null); - - /** HistoryEvent workflowExecutionUpdateCompletedEventAttributes */ - workflowExecutionUpdateCompletedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionUpdateCompletedEventAttributes|null); - - /** HistoryEvent workflowPropertiesModifiedExternallyEventAttributes */ - workflowPropertiesModifiedExternallyEventAttributes?: (temporal.api.history.v1.IWorkflowPropertiesModifiedExternallyEventAttributes|null); - - /** HistoryEvent activityPropertiesModifiedExternallyEventAttributes */ - activityPropertiesModifiedExternallyEventAttributes?: (temporal.api.history.v1.IActivityPropertiesModifiedExternallyEventAttributes|null); - - /** HistoryEvent workflowPropertiesModifiedEventAttributes */ - workflowPropertiesModifiedEventAttributes?: (temporal.api.history.v1.IWorkflowPropertiesModifiedEventAttributes|null); - - /** HistoryEvent workflowExecutionUpdateAdmittedEventAttributes */ - workflowExecutionUpdateAdmittedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionUpdateAdmittedEventAttributes|null); - - /** HistoryEvent nexusOperationScheduledEventAttributes */ - nexusOperationScheduledEventAttributes?: (temporal.api.history.v1.INexusOperationScheduledEventAttributes|null); - - /** HistoryEvent nexusOperationStartedEventAttributes */ - nexusOperationStartedEventAttributes?: (temporal.api.history.v1.INexusOperationStartedEventAttributes|null); - - /** HistoryEvent nexusOperationCompletedEventAttributes */ - nexusOperationCompletedEventAttributes?: (temporal.api.history.v1.INexusOperationCompletedEventAttributes|null); - - /** HistoryEvent nexusOperationFailedEventAttributes */ - nexusOperationFailedEventAttributes?: (temporal.api.history.v1.INexusOperationFailedEventAttributes|null); - - /** HistoryEvent nexusOperationCanceledEventAttributes */ - nexusOperationCanceledEventAttributes?: (temporal.api.history.v1.INexusOperationCanceledEventAttributes|null); - - /** HistoryEvent nexusOperationTimedOutEventAttributes */ - nexusOperationTimedOutEventAttributes?: (temporal.api.history.v1.INexusOperationTimedOutEventAttributes|null); - - /** HistoryEvent nexusOperationCancelRequestedEventAttributes */ - nexusOperationCancelRequestedEventAttributes?: (temporal.api.history.v1.INexusOperationCancelRequestedEventAttributes|null); - - /** HistoryEvent workflowExecutionOptionsUpdatedEventAttributes */ - workflowExecutionOptionsUpdatedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionOptionsUpdatedEventAttributes|null); - - /** HistoryEvent nexusOperationCancelRequestCompletedEventAttributes */ - nexusOperationCancelRequestCompletedEventAttributes?: (temporal.api.history.v1.INexusOperationCancelRequestCompletedEventAttributes|null); - - /** HistoryEvent nexusOperationCancelRequestFailedEventAttributes */ - nexusOperationCancelRequestFailedEventAttributes?: (temporal.api.history.v1.INexusOperationCancelRequestFailedEventAttributes|null); - - /** HistoryEvent workflowExecutionPausedEventAttributes */ - workflowExecutionPausedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionPausedEventAttributes|null); - - /** HistoryEvent workflowExecutionUnpausedEventAttributes */ - workflowExecutionUnpausedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionUnpausedEventAttributes|null); - } - - /** - * History events are the method by which Temporal SDKs advance (or recreate) workflow state. - * See the `EventType` enum for more info about what each event is for. - */ - class HistoryEvent implements IHistoryEvent { - - /** - * Constructs a new HistoryEvent. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IHistoryEvent); - - /** Monotonically increasing event number, starts at 1. */ - public eventId: Long; - - /** HistoryEvent eventTime. */ - public eventTime?: (google.protobuf.ITimestamp|null); - - /** HistoryEvent eventType. */ - public eventType: temporal.api.enums.v1.EventType; - - /** - * Failover version of the event, used by the server for multi-cluster replication and history - * versioning. SDKs generally ignore this field. - */ - public version: Long; - - /** - * Identifier used by the service to order replication and transfer tasks associated with this - * event. SDKs generally ignore this field. - */ - public taskId: Long; - - /** - * Set to true when the SDK may ignore the event as it does not impact workflow state or - * information in any way that the SDK need be concerned with. If an SDK encounters an event - * type which it does not understand, it must error unless this is true. If it is true, it's - * acceptable for the event type and/or attributes to be uninterpretable. - */ - public workerMayIgnore: boolean; - - /** - * Metadata on the event. This is often carried over from commands and client calls. Most events - * won't have this information, and how this information is used is dependent upon the interface - * that reads it. - * - * Current well-known uses: - * * workflow_execution_started_event_attributes - summary and details from start workflow. - * * timer_started_event_attributes - summary represents an identifier for the timer for use by - * user interfaces. - */ - public userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** Links associated with the event. */ - public links: temporal.api.common.v1.ILink[]; - - /** HistoryEvent workflowExecutionStartedEventAttributes. */ - public workflowExecutionStartedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionStartedEventAttributes|null); - - /** HistoryEvent workflowExecutionCompletedEventAttributes. */ - public workflowExecutionCompletedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionCompletedEventAttributes|null); - - /** HistoryEvent workflowExecutionFailedEventAttributes. */ - public workflowExecutionFailedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionFailedEventAttributes|null); - - /** HistoryEvent workflowExecutionTimedOutEventAttributes. */ - public workflowExecutionTimedOutEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionTimedOutEventAttributes|null); - - /** HistoryEvent workflowTaskScheduledEventAttributes. */ - public workflowTaskScheduledEventAttributes?: (temporal.api.history.v1.IWorkflowTaskScheduledEventAttributes|null); - - /** HistoryEvent workflowTaskStartedEventAttributes. */ - public workflowTaskStartedEventAttributes?: (temporal.api.history.v1.IWorkflowTaskStartedEventAttributes|null); - - /** HistoryEvent workflowTaskCompletedEventAttributes. */ - public workflowTaskCompletedEventAttributes?: (temporal.api.history.v1.IWorkflowTaskCompletedEventAttributes|null); - - /** HistoryEvent workflowTaskTimedOutEventAttributes. */ - public workflowTaskTimedOutEventAttributes?: (temporal.api.history.v1.IWorkflowTaskTimedOutEventAttributes|null); - - /** HistoryEvent workflowTaskFailedEventAttributes. */ - public workflowTaskFailedEventAttributes?: (temporal.api.history.v1.IWorkflowTaskFailedEventAttributes|null); - - /** HistoryEvent activityTaskScheduledEventAttributes. */ - public activityTaskScheduledEventAttributes?: (temporal.api.history.v1.IActivityTaskScheduledEventAttributes|null); - - /** HistoryEvent activityTaskStartedEventAttributes. */ - public activityTaskStartedEventAttributes?: (temporal.api.history.v1.IActivityTaskStartedEventAttributes|null); - - /** HistoryEvent activityTaskCompletedEventAttributes. */ - public activityTaskCompletedEventAttributes?: (temporal.api.history.v1.IActivityTaskCompletedEventAttributes|null); - - /** HistoryEvent activityTaskFailedEventAttributes. */ - public activityTaskFailedEventAttributes?: (temporal.api.history.v1.IActivityTaskFailedEventAttributes|null); - - /** HistoryEvent activityTaskTimedOutEventAttributes. */ - public activityTaskTimedOutEventAttributes?: (temporal.api.history.v1.IActivityTaskTimedOutEventAttributes|null); - - /** HistoryEvent timerStartedEventAttributes. */ - public timerStartedEventAttributes?: (temporal.api.history.v1.ITimerStartedEventAttributes|null); - - /** HistoryEvent timerFiredEventAttributes. */ - public timerFiredEventAttributes?: (temporal.api.history.v1.ITimerFiredEventAttributes|null); - - /** HistoryEvent activityTaskCancelRequestedEventAttributes. */ - public activityTaskCancelRequestedEventAttributes?: (temporal.api.history.v1.IActivityTaskCancelRequestedEventAttributes|null); - - /** HistoryEvent activityTaskCanceledEventAttributes. */ - public activityTaskCanceledEventAttributes?: (temporal.api.history.v1.IActivityTaskCanceledEventAttributes|null); - - /** HistoryEvent timerCanceledEventAttributes. */ - public timerCanceledEventAttributes?: (temporal.api.history.v1.ITimerCanceledEventAttributes|null); - - /** HistoryEvent markerRecordedEventAttributes. */ - public markerRecordedEventAttributes?: (temporal.api.history.v1.IMarkerRecordedEventAttributes|null); - - /** HistoryEvent workflowExecutionSignaledEventAttributes. */ - public workflowExecutionSignaledEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionSignaledEventAttributes|null); - - /** HistoryEvent workflowExecutionTerminatedEventAttributes. */ - public workflowExecutionTerminatedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionTerminatedEventAttributes|null); - - /** HistoryEvent workflowExecutionCancelRequestedEventAttributes. */ - public workflowExecutionCancelRequestedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionCancelRequestedEventAttributes|null); - - /** HistoryEvent workflowExecutionCanceledEventAttributes. */ - public workflowExecutionCanceledEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionCanceledEventAttributes|null); - - /** HistoryEvent requestCancelExternalWorkflowExecutionInitiatedEventAttributes. */ - public requestCancelExternalWorkflowExecutionInitiatedEventAttributes?: (temporal.api.history.v1.IRequestCancelExternalWorkflowExecutionInitiatedEventAttributes|null); - - /** HistoryEvent requestCancelExternalWorkflowExecutionFailedEventAttributes. */ - public requestCancelExternalWorkflowExecutionFailedEventAttributes?: (temporal.api.history.v1.IRequestCancelExternalWorkflowExecutionFailedEventAttributes|null); - - /** HistoryEvent externalWorkflowExecutionCancelRequestedEventAttributes. */ - public externalWorkflowExecutionCancelRequestedEventAttributes?: (temporal.api.history.v1.IExternalWorkflowExecutionCancelRequestedEventAttributes|null); - - /** HistoryEvent workflowExecutionContinuedAsNewEventAttributes. */ - public workflowExecutionContinuedAsNewEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionContinuedAsNewEventAttributes|null); - - /** HistoryEvent startChildWorkflowExecutionInitiatedEventAttributes. */ - public startChildWorkflowExecutionInitiatedEventAttributes?: (temporal.api.history.v1.IStartChildWorkflowExecutionInitiatedEventAttributes|null); - - /** HistoryEvent startChildWorkflowExecutionFailedEventAttributes. */ - public startChildWorkflowExecutionFailedEventAttributes?: (temporal.api.history.v1.IStartChildWorkflowExecutionFailedEventAttributes|null); - - /** HistoryEvent childWorkflowExecutionStartedEventAttributes. */ - public childWorkflowExecutionStartedEventAttributes?: (temporal.api.history.v1.IChildWorkflowExecutionStartedEventAttributes|null); - - /** HistoryEvent childWorkflowExecutionCompletedEventAttributes. */ - public childWorkflowExecutionCompletedEventAttributes?: (temporal.api.history.v1.IChildWorkflowExecutionCompletedEventAttributes|null); - - /** HistoryEvent childWorkflowExecutionFailedEventAttributes. */ - public childWorkflowExecutionFailedEventAttributes?: (temporal.api.history.v1.IChildWorkflowExecutionFailedEventAttributes|null); - - /** HistoryEvent childWorkflowExecutionCanceledEventAttributes. */ - public childWorkflowExecutionCanceledEventAttributes?: (temporal.api.history.v1.IChildWorkflowExecutionCanceledEventAttributes|null); - - /** HistoryEvent childWorkflowExecutionTimedOutEventAttributes. */ - public childWorkflowExecutionTimedOutEventAttributes?: (temporal.api.history.v1.IChildWorkflowExecutionTimedOutEventAttributes|null); - - /** HistoryEvent childWorkflowExecutionTerminatedEventAttributes. */ - public childWorkflowExecutionTerminatedEventAttributes?: (temporal.api.history.v1.IChildWorkflowExecutionTerminatedEventAttributes|null); - - /** HistoryEvent signalExternalWorkflowExecutionInitiatedEventAttributes. */ - public signalExternalWorkflowExecutionInitiatedEventAttributes?: (temporal.api.history.v1.ISignalExternalWorkflowExecutionInitiatedEventAttributes|null); - - /** HistoryEvent signalExternalWorkflowExecutionFailedEventAttributes. */ - public signalExternalWorkflowExecutionFailedEventAttributes?: (temporal.api.history.v1.ISignalExternalWorkflowExecutionFailedEventAttributes|null); - - /** HistoryEvent externalWorkflowExecutionSignaledEventAttributes. */ - public externalWorkflowExecutionSignaledEventAttributes?: (temporal.api.history.v1.IExternalWorkflowExecutionSignaledEventAttributes|null); - - /** HistoryEvent upsertWorkflowSearchAttributesEventAttributes. */ - public upsertWorkflowSearchAttributesEventAttributes?: (temporal.api.history.v1.IUpsertWorkflowSearchAttributesEventAttributes|null); - - /** HistoryEvent workflowExecutionUpdateAcceptedEventAttributes. */ - public workflowExecutionUpdateAcceptedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionUpdateAcceptedEventAttributes|null); - - /** HistoryEvent workflowExecutionUpdateRejectedEventAttributes. */ - public workflowExecutionUpdateRejectedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionUpdateRejectedEventAttributes|null); - - /** HistoryEvent workflowExecutionUpdateCompletedEventAttributes. */ - public workflowExecutionUpdateCompletedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionUpdateCompletedEventAttributes|null); - - /** HistoryEvent workflowPropertiesModifiedExternallyEventAttributes. */ - public workflowPropertiesModifiedExternallyEventAttributes?: (temporal.api.history.v1.IWorkflowPropertiesModifiedExternallyEventAttributes|null); - - /** HistoryEvent activityPropertiesModifiedExternallyEventAttributes. */ - public activityPropertiesModifiedExternallyEventAttributes?: (temporal.api.history.v1.IActivityPropertiesModifiedExternallyEventAttributes|null); - - /** HistoryEvent workflowPropertiesModifiedEventAttributes. */ - public workflowPropertiesModifiedEventAttributes?: (temporal.api.history.v1.IWorkflowPropertiesModifiedEventAttributes|null); - - /** HistoryEvent workflowExecutionUpdateAdmittedEventAttributes. */ - public workflowExecutionUpdateAdmittedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionUpdateAdmittedEventAttributes|null); - - /** HistoryEvent nexusOperationScheduledEventAttributes. */ - public nexusOperationScheduledEventAttributes?: (temporal.api.history.v1.INexusOperationScheduledEventAttributes|null); - - /** HistoryEvent nexusOperationStartedEventAttributes. */ - public nexusOperationStartedEventAttributes?: (temporal.api.history.v1.INexusOperationStartedEventAttributes|null); - - /** HistoryEvent nexusOperationCompletedEventAttributes. */ - public nexusOperationCompletedEventAttributes?: (temporal.api.history.v1.INexusOperationCompletedEventAttributes|null); - - /** HistoryEvent nexusOperationFailedEventAttributes. */ - public nexusOperationFailedEventAttributes?: (temporal.api.history.v1.INexusOperationFailedEventAttributes|null); - - /** HistoryEvent nexusOperationCanceledEventAttributes. */ - public nexusOperationCanceledEventAttributes?: (temporal.api.history.v1.INexusOperationCanceledEventAttributes|null); - - /** HistoryEvent nexusOperationTimedOutEventAttributes. */ - public nexusOperationTimedOutEventAttributes?: (temporal.api.history.v1.INexusOperationTimedOutEventAttributes|null); - - /** HistoryEvent nexusOperationCancelRequestedEventAttributes. */ - public nexusOperationCancelRequestedEventAttributes?: (temporal.api.history.v1.INexusOperationCancelRequestedEventAttributes|null); - - /** HistoryEvent workflowExecutionOptionsUpdatedEventAttributes. */ - public workflowExecutionOptionsUpdatedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionOptionsUpdatedEventAttributes|null); - - /** HistoryEvent nexusOperationCancelRequestCompletedEventAttributes. */ - public nexusOperationCancelRequestCompletedEventAttributes?: (temporal.api.history.v1.INexusOperationCancelRequestCompletedEventAttributes|null); - - /** HistoryEvent nexusOperationCancelRequestFailedEventAttributes. */ - public nexusOperationCancelRequestFailedEventAttributes?: (temporal.api.history.v1.INexusOperationCancelRequestFailedEventAttributes|null); - - /** HistoryEvent workflowExecutionPausedEventAttributes. */ - public workflowExecutionPausedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionPausedEventAttributes|null); - - /** HistoryEvent workflowExecutionUnpausedEventAttributes. */ - public workflowExecutionUnpausedEventAttributes?: (temporal.api.history.v1.IWorkflowExecutionUnpausedEventAttributes|null); - - /** The event details. The type must match that in `event_type`. */ - public attributes?: ("workflowExecutionStartedEventAttributes"|"workflowExecutionCompletedEventAttributes"|"workflowExecutionFailedEventAttributes"|"workflowExecutionTimedOutEventAttributes"|"workflowTaskScheduledEventAttributes"|"workflowTaskStartedEventAttributes"|"workflowTaskCompletedEventAttributes"|"workflowTaskTimedOutEventAttributes"|"workflowTaskFailedEventAttributes"|"activityTaskScheduledEventAttributes"|"activityTaskStartedEventAttributes"|"activityTaskCompletedEventAttributes"|"activityTaskFailedEventAttributes"|"activityTaskTimedOutEventAttributes"|"timerStartedEventAttributes"|"timerFiredEventAttributes"|"activityTaskCancelRequestedEventAttributes"|"activityTaskCanceledEventAttributes"|"timerCanceledEventAttributes"|"markerRecordedEventAttributes"|"workflowExecutionSignaledEventAttributes"|"workflowExecutionTerminatedEventAttributes"|"workflowExecutionCancelRequestedEventAttributes"|"workflowExecutionCanceledEventAttributes"|"requestCancelExternalWorkflowExecutionInitiatedEventAttributes"|"requestCancelExternalWorkflowExecutionFailedEventAttributes"|"externalWorkflowExecutionCancelRequestedEventAttributes"|"workflowExecutionContinuedAsNewEventAttributes"|"startChildWorkflowExecutionInitiatedEventAttributes"|"startChildWorkflowExecutionFailedEventAttributes"|"childWorkflowExecutionStartedEventAttributes"|"childWorkflowExecutionCompletedEventAttributes"|"childWorkflowExecutionFailedEventAttributes"|"childWorkflowExecutionCanceledEventAttributes"|"childWorkflowExecutionTimedOutEventAttributes"|"childWorkflowExecutionTerminatedEventAttributes"|"signalExternalWorkflowExecutionInitiatedEventAttributes"|"signalExternalWorkflowExecutionFailedEventAttributes"|"externalWorkflowExecutionSignaledEventAttributes"|"upsertWorkflowSearchAttributesEventAttributes"|"workflowExecutionUpdateAcceptedEventAttributes"|"workflowExecutionUpdateRejectedEventAttributes"|"workflowExecutionUpdateCompletedEventAttributes"|"workflowPropertiesModifiedExternallyEventAttributes"|"activityPropertiesModifiedExternallyEventAttributes"|"workflowPropertiesModifiedEventAttributes"|"workflowExecutionUpdateAdmittedEventAttributes"|"nexusOperationScheduledEventAttributes"|"nexusOperationStartedEventAttributes"|"nexusOperationCompletedEventAttributes"|"nexusOperationFailedEventAttributes"|"nexusOperationCanceledEventAttributes"|"nexusOperationTimedOutEventAttributes"|"nexusOperationCancelRequestedEventAttributes"|"workflowExecutionOptionsUpdatedEventAttributes"|"nexusOperationCancelRequestCompletedEventAttributes"|"nexusOperationCancelRequestFailedEventAttributes"|"workflowExecutionPausedEventAttributes"|"workflowExecutionUnpausedEventAttributes"); - - /** - * Creates a new HistoryEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns HistoryEvent instance - */ - public static create(properties?: temporal.api.history.v1.IHistoryEvent): temporal.api.history.v1.HistoryEvent; - - /** - * Encodes the specified HistoryEvent message. Does not implicitly {@link temporal.api.history.v1.HistoryEvent.verify|verify} messages. - * @param message HistoryEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IHistoryEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HistoryEvent message, length delimited. Does not implicitly {@link temporal.api.history.v1.HistoryEvent.verify|verify} messages. - * @param message HistoryEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IHistoryEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HistoryEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HistoryEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.HistoryEvent; - - /** - * Decodes a HistoryEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HistoryEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.HistoryEvent; - - /** - * Creates a HistoryEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HistoryEvent - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.HistoryEvent; - - /** - * Creates a plain object from a HistoryEvent message. Also converts values to other types if specified. - * @param message HistoryEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.HistoryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HistoryEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HistoryEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a History. */ - interface IHistory { - - /** History events */ - events?: (temporal.api.history.v1.IHistoryEvent[]|null); - } - - /** Represents a History. */ - class History implements IHistory { - - /** - * Constructs a new History. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.history.v1.IHistory); - - /** History events. */ - public events: temporal.api.history.v1.IHistoryEvent[]; - - /** - * Creates a new History instance using the specified properties. - * @param [properties] Properties to set - * @returns History instance - */ - public static create(properties?: temporal.api.history.v1.IHistory): temporal.api.history.v1.History; - - /** - * Encodes the specified History message. Does not implicitly {@link temporal.api.history.v1.History.verify|verify} messages. - * @param message History message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.history.v1.IHistory, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified History message, length delimited. Does not implicitly {@link temporal.api.history.v1.History.verify|verify} messages. - * @param message History message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.history.v1.IHistory, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a History message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns History - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.history.v1.History; - - /** - * Decodes a History message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns History - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.history.v1.History; - - /** - * Creates a History message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns History - */ - public static fromObject(object: { [k: string]: any }): temporal.api.history.v1.History; - - /** - * Creates a plain object from a History message. Also converts values to other types if specified. - * @param message History - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.history.v1.History, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this History to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for History - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace workflow. */ - namespace workflow { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a WorkflowExecutionInfo. */ - interface IWorkflowExecutionInfo { - - /** WorkflowExecutionInfo execution */ - execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** WorkflowExecutionInfo type */ - type?: (temporal.api.common.v1.IWorkflowType|null); - - /** WorkflowExecutionInfo startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** WorkflowExecutionInfo closeTime */ - closeTime?: (google.protobuf.ITimestamp|null); - - /** WorkflowExecutionInfo status */ - status?: (temporal.api.enums.v1.WorkflowExecutionStatus|null); - - /** WorkflowExecutionInfo historyLength */ - historyLength?: (Long|null); - - /** WorkflowExecutionInfo parentNamespaceId */ - parentNamespaceId?: (string|null); - - /** WorkflowExecutionInfo parentExecution */ - parentExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** WorkflowExecutionInfo executionTime */ - executionTime?: (google.protobuf.ITimestamp|null); - - /** WorkflowExecutionInfo memo */ - memo?: (temporal.api.common.v1.IMemo|null); - - /** WorkflowExecutionInfo searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** WorkflowExecutionInfo autoResetPoints */ - autoResetPoints?: (temporal.api.workflow.v1.IResetPoints|null); - - /** WorkflowExecutionInfo taskQueue */ - taskQueue?: (string|null); - - /** WorkflowExecutionInfo stateTransitionCount */ - stateTransitionCount?: (Long|null); - - /** WorkflowExecutionInfo historySizeBytes */ - historySizeBytes?: (Long|null); - - /** - * If set, the most recent worker version stamp that appeared in a workflow task completion - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - mostRecentWorkerVersionStamp?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Workflow execution duration is defined as difference between close time and execution time. - * This field is only populated if the workflow is closed. - */ - executionDuration?: (google.protobuf.IDuration|null); - - /** - * Contains information about the root workflow execution. - * The root workflow execution is defined as follows: - * 1. A workflow without parent workflow is its own root workflow. - * 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. - * Note: workflows continued as new or reseted may or may not have parents, check examples below. - * - * Examples: - * Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3. - * - The root workflow of all three workflows is W1. - * Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3. - * - The root workflow of all three workflows is W1. - * Scenario 3: Workflow W1 continued as new W2. - * - The root workflow of W1 is W1 and the root workflow of W2 is W2. - * Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3 - * - The root workflow of all three workflows is W1. - * Scenario 5: Workflow W1 is reseted, creating W2. - * - The root workflow of W1 is W1 and the root workflow of W2 is W2. - */ - rootExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * The currently assigned build ID for this execution. Presence of this value means worker versioning is used - * for this execution. Assigned build ID is selected based on Worker Versioning Assignment Rules - * when the first workflow task of the execution is scheduled. If the first workflow task fails and is scheduled - * again, the assigned build ID may change according to the latest versioning rules. - * Assigned build ID can also change in the middle of a execution if Compatible Redirect Rules are applied to - * this execution. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - assignedBuildId?: (string|null); - - /** - * Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead - * of using the assignment rules. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - inheritedBuildId?: (string|null); - - /** - * The first run ID in the execution chain. - * Executions created via the following operations are considered to be in the same chain - * - ContinueAsNew - * - Workflow Retry - * - Workflow Reset - * - Cron Schedule - */ - firstRunId?: (string|null); - - /** - * Absent value means the workflow execution is not versioned. When present, the execution might - * be versioned or unversioned, depending on `versioning_info.behavior` and `versioning_info.versioning_override`. - * Experimental. Versioning info is experimental and might change in the future. - */ - versioningInfo?: (temporal.api.workflow.v1.IWorkflowExecutionVersioningInfo|null); - - /** - * The name of Worker Deployment that completed the most recent workflow task. - * Experimental. Worker Deployments are experimental and might change in the future. - */ - workerDeploymentName?: (string|null); - - /** Priority metadata */ - priority?: (temporal.api.common.v1.IPriority|null); - - /** Total size in bytes of all external payloads referenced in workflow history. */ - externalPayloadSizeBytes?: (Long|null); - - /** Count of external payloads referenced in workflow history. */ - externalPayloadCount?: (Long|null); - } - - /** - * Hold basic information about a workflow execution. - * This structure is a part of visibility, and thus contain a limited subset of information. - */ - class WorkflowExecutionInfo implements IWorkflowExecutionInfo { - - /** - * Constructs a new WorkflowExecutionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IWorkflowExecutionInfo); - - /** WorkflowExecutionInfo execution. */ - public execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** WorkflowExecutionInfo type. */ - public type?: (temporal.api.common.v1.IWorkflowType|null); - - /** WorkflowExecutionInfo startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** WorkflowExecutionInfo closeTime. */ - public closeTime?: (google.protobuf.ITimestamp|null); - - /** WorkflowExecutionInfo status. */ - public status: temporal.api.enums.v1.WorkflowExecutionStatus; - - /** WorkflowExecutionInfo historyLength. */ - public historyLength: Long; - - /** WorkflowExecutionInfo parentNamespaceId. */ - public parentNamespaceId: string; - - /** WorkflowExecutionInfo parentExecution. */ - public parentExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** WorkflowExecutionInfo executionTime. */ - public executionTime?: (google.protobuf.ITimestamp|null); - - /** WorkflowExecutionInfo memo. */ - public memo?: (temporal.api.common.v1.IMemo|null); - - /** WorkflowExecutionInfo searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** WorkflowExecutionInfo autoResetPoints. */ - public autoResetPoints?: (temporal.api.workflow.v1.IResetPoints|null); - - /** WorkflowExecutionInfo taskQueue. */ - public taskQueue: string; - - /** WorkflowExecutionInfo stateTransitionCount. */ - public stateTransitionCount: Long; - - /** WorkflowExecutionInfo historySizeBytes. */ - public historySizeBytes: Long; - - /** - * If set, the most recent worker version stamp that appeared in a workflow task completion - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public mostRecentWorkerVersionStamp?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * Workflow execution duration is defined as difference between close time and execution time. - * This field is only populated if the workflow is closed. - */ - public executionDuration?: (google.protobuf.IDuration|null); - - /** - * Contains information about the root workflow execution. - * The root workflow execution is defined as follows: - * 1. A workflow without parent workflow is its own root workflow. - * 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. - * Note: workflows continued as new or reseted may or may not have parents, check examples below. - * - * Examples: - * Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3. - * - The root workflow of all three workflows is W1. - * Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3. - * - The root workflow of all three workflows is W1. - * Scenario 3: Workflow W1 continued as new W2. - * - The root workflow of W1 is W1 and the root workflow of W2 is W2. - * Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3 - * - The root workflow of all three workflows is W1. - * Scenario 5: Workflow W1 is reseted, creating W2. - * - The root workflow of W1 is W1 and the root workflow of W2 is W2. - */ - public rootExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * The currently assigned build ID for this execution. Presence of this value means worker versioning is used - * for this execution. Assigned build ID is selected based on Worker Versioning Assignment Rules - * when the first workflow task of the execution is scheduled. If the first workflow task fails and is scheduled - * again, the assigned build ID may change according to the latest versioning rules. - * Assigned build ID can also change in the middle of a execution if Compatible Redirect Rules are applied to - * this execution. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public assignedBuildId: string; - - /** - * Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead - * of using the assignment rules. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public inheritedBuildId: string; - - /** - * The first run ID in the execution chain. - * Executions created via the following operations are considered to be in the same chain - * - ContinueAsNew - * - Workflow Retry - * - Workflow Reset - * - Cron Schedule - */ - public firstRunId: string; - - /** - * Absent value means the workflow execution is not versioned. When present, the execution might - * be versioned or unversioned, depending on `versioning_info.behavior` and `versioning_info.versioning_override`. - * Experimental. Versioning info is experimental and might change in the future. - */ - public versioningInfo?: (temporal.api.workflow.v1.IWorkflowExecutionVersioningInfo|null); - - /** - * The name of Worker Deployment that completed the most recent workflow task. - * Experimental. Worker Deployments are experimental and might change in the future. - */ - public workerDeploymentName: string; - - /** Priority metadata */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** Total size in bytes of all external payloads referenced in workflow history. */ - public externalPayloadSizeBytes: Long; - - /** Count of external payloads referenced in workflow history. */ - public externalPayloadCount: Long; - - /** - * Creates a new WorkflowExecutionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionInfo instance - */ - public static create(properties?: temporal.api.workflow.v1.IWorkflowExecutionInfo): temporal.api.workflow.v1.WorkflowExecutionInfo; - - /** - * Encodes the specified WorkflowExecutionInfo message. Does not implicitly {@link temporal.api.workflow.v1.WorkflowExecutionInfo.verify|verify} messages. - * @param message WorkflowExecutionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IWorkflowExecutionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionInfo message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.WorkflowExecutionInfo.verify|verify} messages. - * @param message WorkflowExecutionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IWorkflowExecutionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.WorkflowExecutionInfo; - - /** - * Decodes a WorkflowExecutionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.WorkflowExecutionInfo; - - /** - * Creates a WorkflowExecutionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.WorkflowExecutionInfo; - - /** - * Creates a plain object from a WorkflowExecutionInfo message. Also converts values to other types if specified. - * @param message WorkflowExecutionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.WorkflowExecutionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionExtendedInfo. */ - interface IWorkflowExecutionExtendedInfo { - - /** - * Workflow execution expiration time is defined as workflow start time plus expiration timeout. - * Workflow start time may change after workflow reset. - */ - executionExpirationTime?: (google.protobuf.ITimestamp|null); - - /** Workflow run expiration time is defined as current workflow run start time plus workflow run timeout. */ - runExpirationTime?: (google.protobuf.ITimestamp|null); - - /** indicates if the workflow received a cancel request */ - cancelRequested?: (boolean|null); - - /** Last workflow reset time. Nil if the workflow was never reset. */ - lastResetTime?: (google.protobuf.ITimestamp|null); - - /** Original workflow start time. */ - originalStartTime?: (google.protobuf.ITimestamp|null); - - /** Reset Run ID points to the new run when this execution is reset. If the execution is reset multiple times, it points to the latest run. */ - resetRunId?: (string|null); - - /** - * Request ID information (eg: history event information associated with the request ID). - * Note: It only contains request IDs from StartWorkflowExecution requests, including indirect - * calls (eg: if SignalWithStartWorkflowExecution starts a new workflow, then the request ID is - * used in the StartWorkflowExecution request). - */ - requestIdInfos?: ({ [k: string]: temporal.api.workflow.v1.IRequestIdInfo }|null); - - /** Information about the workflow execution pause operation. */ - pauseInfo?: (temporal.api.workflow.v1.IWorkflowExecutionPauseInfo|null); - } - - /** Holds all the extra information about workflow execution that is not part of Visibility. */ - class WorkflowExecutionExtendedInfo implements IWorkflowExecutionExtendedInfo { - - /** - * Constructs a new WorkflowExecutionExtendedInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IWorkflowExecutionExtendedInfo); - - /** - * Workflow execution expiration time is defined as workflow start time plus expiration timeout. - * Workflow start time may change after workflow reset. - */ - public executionExpirationTime?: (google.protobuf.ITimestamp|null); - - /** Workflow run expiration time is defined as current workflow run start time plus workflow run timeout. */ - public runExpirationTime?: (google.protobuf.ITimestamp|null); - - /** indicates if the workflow received a cancel request */ - public cancelRequested: boolean; - - /** Last workflow reset time. Nil if the workflow was never reset. */ - public lastResetTime?: (google.protobuf.ITimestamp|null); - - /** Original workflow start time. */ - public originalStartTime?: (google.protobuf.ITimestamp|null); - - /** Reset Run ID points to the new run when this execution is reset. If the execution is reset multiple times, it points to the latest run. */ - public resetRunId: string; - - /** - * Request ID information (eg: history event information associated with the request ID). - * Note: It only contains request IDs from StartWorkflowExecution requests, including indirect - * calls (eg: if SignalWithStartWorkflowExecution starts a new workflow, then the request ID is - * used in the StartWorkflowExecution request). - */ - public requestIdInfos: { [k: string]: temporal.api.workflow.v1.IRequestIdInfo }; - - /** Information about the workflow execution pause operation. */ - public pauseInfo?: (temporal.api.workflow.v1.IWorkflowExecutionPauseInfo|null); - - /** - * Creates a new WorkflowExecutionExtendedInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionExtendedInfo instance - */ - public static create(properties?: temporal.api.workflow.v1.IWorkflowExecutionExtendedInfo): temporal.api.workflow.v1.WorkflowExecutionExtendedInfo; - - /** - * Encodes the specified WorkflowExecutionExtendedInfo message. Does not implicitly {@link temporal.api.workflow.v1.WorkflowExecutionExtendedInfo.verify|verify} messages. - * @param message WorkflowExecutionExtendedInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IWorkflowExecutionExtendedInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionExtendedInfo message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.WorkflowExecutionExtendedInfo.verify|verify} messages. - * @param message WorkflowExecutionExtendedInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IWorkflowExecutionExtendedInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionExtendedInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionExtendedInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.WorkflowExecutionExtendedInfo; - - /** - * Decodes a WorkflowExecutionExtendedInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionExtendedInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.WorkflowExecutionExtendedInfo; - - /** - * Creates a WorkflowExecutionExtendedInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionExtendedInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.WorkflowExecutionExtendedInfo; - - /** - * Creates a plain object from a WorkflowExecutionExtendedInfo message. Also converts values to other types if specified. - * @param message WorkflowExecutionExtendedInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.WorkflowExecutionExtendedInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionExtendedInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionExtendedInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionVersioningInfo. */ - interface IWorkflowExecutionVersioningInfo { - - /** - * Versioning behavior determines how the server should treat this execution when workers are - * upgraded. When present it means this workflow execution is versioned; UNSPECIFIED means - * unversioned. See the comments in `VersioningBehavior` enum for more info about different - * behaviors. - * - * Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning - * Behavior and Version (except when the new execution runs on a task queue not belonging to the - * same deployment version as the parent/previous run's task queue). The first workflow task will - * be dispatched according to the inherited behavior (or to the current version of the task-queue's - * deployment in the case of AutoUpgrade.) After completion of their first workflow task the - * Deployment Version and Behavior of the execution will update according to configuration on the worker. - * - * Note that `behavior` is overridden by `versioning_override` if the latter is present. - */ - behavior?: (temporal.api.enums.v1.VersioningBehavior|null); - - /** - * The worker deployment that completed the last workflow task of this workflow execution. Must - * be present if `behavior` is set. Absent value means no workflow task is completed, or the - * last workflow task was completed by an unversioned worker. Unversioned workers may still send - * a deployment value which will be stored here, so the right way to check if an execution is - * versioned if an execution is versioned or not is via the `behavior` field. - * Note that `deployment` is overridden by `versioning_override` if the latter is present. - * Deprecated. Use `deployment_version`. - */ - deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** Deprecated. Use `deployment_version`. */ - version?: (string|null); - - /** - * The Worker Deployment Version that completed the last workflow task of this workflow execution. - * An absent value means no workflow task is completed, or the workflow is unversioned. - * If present, and `behavior` is UNSPECIFIED, the last task of this workflow execution was completed - * by a worker that is not using versioning but _is_ passing Deployment Name and Build ID. - * - * Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning - * Behavior and Version (except when the new execution runs on a task queue not belonging to the - * same deployment version as the parent/previous run's task queue). The first workflow task will - * be dispatched according to the inherited behavior (or to the current version of the task-queue's - * deployment in the case of AutoUpgrade.) After completion of their first workflow task the - * Deployment Version and Behavior of the execution will update according to configuration on the worker. - * - * Note that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version` - * will override this value. - */ - deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** - * Present if user has set an execution-specific versioning override. This override takes - * precedence over SDK-sent `behavior` (and `version` when override is PINNED). An - * override can be set when starting a new execution, as well as afterwards by calling the - * `UpdateWorkflowExecutionOptions` API. - * Pinned overrides are automatically inherited by child workflows, continue-as-new workflows, - * workflow retries, and cron workflows. - */ - versioningOverride?: (temporal.api.workflow.v1.IVersioningOverride|null); - - /** - * When present, indicates the workflow is transitioning to a different deployment. Can - * indicate one of the following transitions: unversioned -> versioned, versioned -> versioned - * on a different deployment, or versioned -> unversioned. - * Not applicable to workflows with PINNED behavior. - * When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically - * start a transition to the task queue's current deployment if the task queue's current - * deployment is different from the workflow's deployment. - * If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those - * tasks will be redirected to the task queue's current deployment. As soon as a poller from - * that deployment is available to receive the task, the workflow will automatically start a - * transition to that deployment and continue execution there. - * A deployment transition can only exist while there is a pending or started workflow task. - * Once the pending workflow task completes on the transition's target deployment, the - * transition completes and the workflow's `deployment` and `behavior` fields are updated per - * the worker's task completion response. - * Pending activities will not start new attempts during a transition. Once the transition is - * completed, pending activities will start their next attempt on the new deployment. - * Deprecated. Use version_transition. - */ - deploymentTransition?: (temporal.api.workflow.v1.IDeploymentTransition|null); - - /** - * When present, indicates the workflow is transitioning to a different deployment version - * (which may belong to the same deployment name or another). Can indicate one of the following - * transitions: unversioned -> versioned, versioned -> versioned - * on a different deployment version, or versioned -> unversioned. - * Not applicable to workflows with PINNED behavior. - * When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically - * start a transition to the task queue's current version if the task queue's current version is - * different from the workflow's current deployment version. - * If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those - * tasks will be redirected to the task queue's current version. As soon as a poller from - * that deployment version is available to receive the task, the workflow will automatically - * start a transition to that version and continue execution there. - * A version transition can only exist while there is a pending or started workflow task. - * Once the pending workflow task completes on the transition's target version, the - * transition completes and the workflow's `behavior`, and `deployment_version` fields are updated per the - * worker's task completion response. - * Pending activities will not start new attempts during a transition. Once the transition is - * completed, pending activities will start their next attempt on the new version. - */ - versionTransition?: (temporal.api.workflow.v1.IDeploymentVersionTransition|null); - - /** - * Monotonic counter reflecting the latest routing decision for this workflow execution. - * Used for staleness detection between history and matching when dispatching tasks to workers. - * Incremented when a workflow execution routes to a new deployment version, which happens - * when a worker of the new deployment version completes a workflow task. - * Note: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not - * face the problem of inconsistent dispatching that arises from eventual consistency between - * task queues and their partitions. - */ - revisionNumber?: (Long|null); - } - - /** - * Holds all the information about worker versioning for a particular workflow execution. - * Experimental. Versioning info is experimental and might change in the future. - */ - class WorkflowExecutionVersioningInfo implements IWorkflowExecutionVersioningInfo { - - /** - * Constructs a new WorkflowExecutionVersioningInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IWorkflowExecutionVersioningInfo); - - /** - * Versioning behavior determines how the server should treat this execution when workers are - * upgraded. When present it means this workflow execution is versioned; UNSPECIFIED means - * unversioned. See the comments in `VersioningBehavior` enum for more info about different - * behaviors. - * - * Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning - * Behavior and Version (except when the new execution runs on a task queue not belonging to the - * same deployment version as the parent/previous run's task queue). The first workflow task will - * be dispatched according to the inherited behavior (or to the current version of the task-queue's - * deployment in the case of AutoUpgrade.) After completion of their first workflow task the - * Deployment Version and Behavior of the execution will update according to configuration on the worker. - * - * Note that `behavior` is overridden by `versioning_override` if the latter is present. - */ - public behavior: temporal.api.enums.v1.VersioningBehavior; - - /** - * The worker deployment that completed the last workflow task of this workflow execution. Must - * be present if `behavior` is set. Absent value means no workflow task is completed, or the - * last workflow task was completed by an unversioned worker. Unversioned workers may still send - * a deployment value which will be stored here, so the right way to check if an execution is - * versioned if an execution is versioned or not is via the `behavior` field. - * Note that `deployment` is overridden by `versioning_override` if the latter is present. - * Deprecated. Use `deployment_version`. - */ - public deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** Deprecated. Use `deployment_version`. */ - public version: string; - - /** - * The Worker Deployment Version that completed the last workflow task of this workflow execution. - * An absent value means no workflow task is completed, or the workflow is unversioned. - * If present, and `behavior` is UNSPECIFIED, the last task of this workflow execution was completed - * by a worker that is not using versioning but _is_ passing Deployment Name and Build ID. - * - * Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning - * Behavior and Version (except when the new execution runs on a task queue not belonging to the - * same deployment version as the parent/previous run's task queue). The first workflow task will - * be dispatched according to the inherited behavior (or to the current version of the task-queue's - * deployment in the case of AutoUpgrade.) After completion of their first workflow task the - * Deployment Version and Behavior of the execution will update according to configuration on the worker. - * - * Note that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version` - * will override this value. - */ - public deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** - * Present if user has set an execution-specific versioning override. This override takes - * precedence over SDK-sent `behavior` (and `version` when override is PINNED). An - * override can be set when starting a new execution, as well as afterwards by calling the - * `UpdateWorkflowExecutionOptions` API. - * Pinned overrides are automatically inherited by child workflows, continue-as-new workflows, - * workflow retries, and cron workflows. - */ - public versioningOverride?: (temporal.api.workflow.v1.IVersioningOverride|null); - - /** - * When present, indicates the workflow is transitioning to a different deployment. Can - * indicate one of the following transitions: unversioned -> versioned, versioned -> versioned - * on a different deployment, or versioned -> unversioned. - * Not applicable to workflows with PINNED behavior. - * When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically - * start a transition to the task queue's current deployment if the task queue's current - * deployment is different from the workflow's deployment. - * If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those - * tasks will be redirected to the task queue's current deployment. As soon as a poller from - * that deployment is available to receive the task, the workflow will automatically start a - * transition to that deployment and continue execution there. - * A deployment transition can only exist while there is a pending or started workflow task. - * Once the pending workflow task completes on the transition's target deployment, the - * transition completes and the workflow's `deployment` and `behavior` fields are updated per - * the worker's task completion response. - * Pending activities will not start new attempts during a transition. Once the transition is - * completed, pending activities will start their next attempt on the new deployment. - * Deprecated. Use version_transition. - */ - public deploymentTransition?: (temporal.api.workflow.v1.IDeploymentTransition|null); - - /** - * When present, indicates the workflow is transitioning to a different deployment version - * (which may belong to the same deployment name or another). Can indicate one of the following - * transitions: unversioned -> versioned, versioned -> versioned - * on a different deployment version, or versioned -> unversioned. - * Not applicable to workflows with PINNED behavior. - * When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically - * start a transition to the task queue's current version if the task queue's current version is - * different from the workflow's current deployment version. - * If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those - * tasks will be redirected to the task queue's current version. As soon as a poller from - * that deployment version is available to receive the task, the workflow will automatically - * start a transition to that version and continue execution there. - * A version transition can only exist while there is a pending or started workflow task. - * Once the pending workflow task completes on the transition's target version, the - * transition completes and the workflow's `behavior`, and `deployment_version` fields are updated per the - * worker's task completion response. - * Pending activities will not start new attempts during a transition. Once the transition is - * completed, pending activities will start their next attempt on the new version. - */ - public versionTransition?: (temporal.api.workflow.v1.IDeploymentVersionTransition|null); - - /** - * Monotonic counter reflecting the latest routing decision for this workflow execution. - * Used for staleness detection between history and matching when dispatching tasks to workers. - * Incremented when a workflow execution routes to a new deployment version, which happens - * when a worker of the new deployment version completes a workflow task. - * Note: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not - * face the problem of inconsistent dispatching that arises from eventual consistency between - * task queues and their partitions. - */ - public revisionNumber: Long; - - /** - * Creates a new WorkflowExecutionVersioningInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionVersioningInfo instance - */ - public static create(properties?: temporal.api.workflow.v1.IWorkflowExecutionVersioningInfo): temporal.api.workflow.v1.WorkflowExecutionVersioningInfo; - - /** - * Encodes the specified WorkflowExecutionVersioningInfo message. Does not implicitly {@link temporal.api.workflow.v1.WorkflowExecutionVersioningInfo.verify|verify} messages. - * @param message WorkflowExecutionVersioningInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IWorkflowExecutionVersioningInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionVersioningInfo message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.WorkflowExecutionVersioningInfo.verify|verify} messages. - * @param message WorkflowExecutionVersioningInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IWorkflowExecutionVersioningInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionVersioningInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionVersioningInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.WorkflowExecutionVersioningInfo; - - /** - * Decodes a WorkflowExecutionVersioningInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionVersioningInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.WorkflowExecutionVersioningInfo; - - /** - * Creates a WorkflowExecutionVersioningInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionVersioningInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.WorkflowExecutionVersioningInfo; - - /** - * Creates a plain object from a WorkflowExecutionVersioningInfo message. Also converts values to other types if specified. - * @param message WorkflowExecutionVersioningInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.WorkflowExecutionVersioningInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionVersioningInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionVersioningInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeploymentTransition. */ - interface IDeploymentTransition { - - /** - * The target deployment of the transition. Null means a so-far-versioned workflow is - * transitioning to unversioned workers. - */ - deployment?: (temporal.api.deployment.v1.IDeployment|null); - } - - /** - * Holds information about ongoing transition of a workflow execution from one deployment to another. - * Deprecated. Use DeploymentVersionTransition. - */ - class DeploymentTransition implements IDeploymentTransition { - - /** - * Constructs a new DeploymentTransition. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IDeploymentTransition); - - /** - * The target deployment of the transition. Null means a so-far-versioned workflow is - * transitioning to unversioned workers. - */ - public deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** - * Creates a new DeploymentTransition instance using the specified properties. - * @param [properties] Properties to set - * @returns DeploymentTransition instance - */ - public static create(properties?: temporal.api.workflow.v1.IDeploymentTransition): temporal.api.workflow.v1.DeploymentTransition; - - /** - * Encodes the specified DeploymentTransition message. Does not implicitly {@link temporal.api.workflow.v1.DeploymentTransition.verify|verify} messages. - * @param message DeploymentTransition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IDeploymentTransition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeploymentTransition message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.DeploymentTransition.verify|verify} messages. - * @param message DeploymentTransition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IDeploymentTransition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeploymentTransition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeploymentTransition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.DeploymentTransition; - - /** - * Decodes a DeploymentTransition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeploymentTransition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.DeploymentTransition; - - /** - * Creates a DeploymentTransition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeploymentTransition - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.DeploymentTransition; - - /** - * Creates a plain object from a DeploymentTransition message. Also converts values to other types if specified. - * @param message DeploymentTransition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.DeploymentTransition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeploymentTransition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeploymentTransition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeploymentVersionTransition. */ - interface IDeploymentVersionTransition { - - /** Deprecated. Use `deployment_version`. */ - version?: (string|null); - - /** - * The target Version of the transition. - * If nil, a so-far-versioned workflow is transitioning to unversioned workers. - */ - deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - } - - /** - * Holds information about ongoing transition of a workflow execution from one worker - * deployment version to another. - * Experimental. Might change in the future. - */ - class DeploymentVersionTransition implements IDeploymentVersionTransition { - - /** - * Constructs a new DeploymentVersionTransition. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IDeploymentVersionTransition); - - /** Deprecated. Use `deployment_version`. */ - public version: string; - - /** - * The target Version of the transition. - * If nil, a so-far-versioned workflow is transitioning to unversioned workers. - */ - public deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** - * Creates a new DeploymentVersionTransition instance using the specified properties. - * @param [properties] Properties to set - * @returns DeploymentVersionTransition instance - */ - public static create(properties?: temporal.api.workflow.v1.IDeploymentVersionTransition): temporal.api.workflow.v1.DeploymentVersionTransition; - - /** - * Encodes the specified DeploymentVersionTransition message. Does not implicitly {@link temporal.api.workflow.v1.DeploymentVersionTransition.verify|verify} messages. - * @param message DeploymentVersionTransition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IDeploymentVersionTransition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeploymentVersionTransition message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.DeploymentVersionTransition.verify|verify} messages. - * @param message DeploymentVersionTransition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IDeploymentVersionTransition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeploymentVersionTransition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeploymentVersionTransition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.DeploymentVersionTransition; - - /** - * Decodes a DeploymentVersionTransition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeploymentVersionTransition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.DeploymentVersionTransition; - - /** - * Creates a DeploymentVersionTransition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeploymentVersionTransition - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.DeploymentVersionTransition; - - /** - * Creates a plain object from a DeploymentVersionTransition message. Also converts values to other types if specified. - * @param message DeploymentVersionTransition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.DeploymentVersionTransition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeploymentVersionTransition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeploymentVersionTransition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionConfig. */ - interface IWorkflowExecutionConfig { - - /** WorkflowExecutionConfig taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** WorkflowExecutionConfig workflowExecutionTimeout */ - workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** WorkflowExecutionConfig workflowRunTimeout */ - workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** WorkflowExecutionConfig defaultWorkflowTaskTimeout */ - defaultWorkflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** User metadata provided on start workflow. */ - userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - } - - /** Represents a WorkflowExecutionConfig. */ - class WorkflowExecutionConfig implements IWorkflowExecutionConfig { - - /** - * Constructs a new WorkflowExecutionConfig. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IWorkflowExecutionConfig); - - /** WorkflowExecutionConfig taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** WorkflowExecutionConfig workflowExecutionTimeout. */ - public workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** WorkflowExecutionConfig workflowRunTimeout. */ - public workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** WorkflowExecutionConfig defaultWorkflowTaskTimeout. */ - public defaultWorkflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** User metadata provided on start workflow. */ - public userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** - * Creates a new WorkflowExecutionConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionConfig instance - */ - public static create(properties?: temporal.api.workflow.v1.IWorkflowExecutionConfig): temporal.api.workflow.v1.WorkflowExecutionConfig; - - /** - * Encodes the specified WorkflowExecutionConfig message. Does not implicitly {@link temporal.api.workflow.v1.WorkflowExecutionConfig.verify|verify} messages. - * @param message WorkflowExecutionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IWorkflowExecutionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionConfig message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.WorkflowExecutionConfig.verify|verify} messages. - * @param message WorkflowExecutionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IWorkflowExecutionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.WorkflowExecutionConfig; - - /** - * Decodes a WorkflowExecutionConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.WorkflowExecutionConfig; - - /** - * Creates a WorkflowExecutionConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionConfig - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.WorkflowExecutionConfig; - - /** - * Creates a plain object from a WorkflowExecutionConfig message. Also converts values to other types if specified. - * @param message WorkflowExecutionConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.WorkflowExecutionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PendingActivityInfo. */ - interface IPendingActivityInfo { - - /** PendingActivityInfo activityId */ - activityId?: (string|null); - - /** PendingActivityInfo activityType */ - activityType?: (temporal.api.common.v1.IActivityType|null); - - /** PendingActivityInfo state */ - state?: (temporal.api.enums.v1.PendingActivityState|null); - - /** PendingActivityInfo heartbeatDetails */ - heartbeatDetails?: (temporal.api.common.v1.IPayloads|null); - - /** PendingActivityInfo lastHeartbeatTime */ - lastHeartbeatTime?: (google.protobuf.ITimestamp|null); - - /** PendingActivityInfo lastStartedTime */ - lastStartedTime?: (google.protobuf.ITimestamp|null); - - /** PendingActivityInfo attempt */ - attempt?: (number|null); - - /** PendingActivityInfo maximumAttempts */ - maximumAttempts?: (number|null); - - /** PendingActivityInfo scheduledTime */ - scheduledTime?: (google.protobuf.ITimestamp|null); - - /** PendingActivityInfo expirationTime */ - expirationTime?: (google.protobuf.ITimestamp|null); - - /** PendingActivityInfo lastFailure */ - lastFailure?: (temporal.api.failure.v1.IFailure|null); - - /** PendingActivityInfo lastWorkerIdentity */ - lastWorkerIdentity?: (string|null); - - /** Deprecated. When present, it means this activity is assigned to the build ID of its workflow. */ - useWorkflowBuildId?: (google.protobuf.IEmpty|null); - - /** - * Deprecated. This means the activity is independently versioned and not bound to the build ID of its workflow. - * The activity will use the build id in this field instead. - * If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning - * rules. - */ - lastIndependentlyAssignedBuildId?: (string|null); - - /** - * Deprecated. The version stamp of the worker to whom this activity was most recently dispatched - * This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - lastWorkerVersionStamp?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * The time activity will wait until the next retry. - * If activity is currently running it will be next retry interval if activity failed. - * If activity is currently waiting it will be current retry interval. - * If there will be no retry it will be null. - */ - currentRetryInterval?: (google.protobuf.IDuration|null); - - /** The time when the last activity attempt was completed. If activity has not been completed yet then it will be null. */ - lastAttemptCompleteTime?: (google.protobuf.ITimestamp|null); - - /** - * Next time when activity will be scheduled. - * If activity is currently scheduled or started it will be null. - */ - nextAttemptScheduleTime?: (google.protobuf.ITimestamp|null); - - /** Indicates if activity is paused. */ - paused?: (boolean|null); - - /** - * The deployment this activity was dispatched to most recently. Present only if the activity - * was dispatched to a versioned worker. - * Deprecated. Use `last_deployment_version`. - */ - lastDeployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** - * The Worker Deployment Version this activity was dispatched to most recently. - * Deprecated. Use `last_deployment_version`. - */ - lastWorkerDeploymentVersion?: (string|null); - - /** - * The Worker Deployment Version this activity was dispatched to most recently. - * If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker. - */ - lastDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** - * Priority metadata. If this message is not present, or any fields are not - * present, they inherit the values from the workflow. - */ - priority?: (temporal.api.common.v1.IPriority|null); - - /** PendingActivityInfo pauseInfo */ - pauseInfo?: (temporal.api.workflow.v1.PendingActivityInfo.IPauseInfo|null); - - /** Current activity options. May be different from the one used to start the activity. */ - activityOptions?: (temporal.api.activity.v1.IActivityOptions|null); - } - - /** Represents a PendingActivityInfo. */ - class PendingActivityInfo implements IPendingActivityInfo { - - /** - * Constructs a new PendingActivityInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IPendingActivityInfo); - - /** PendingActivityInfo activityId. */ - public activityId: string; - - /** PendingActivityInfo activityType. */ - public activityType?: (temporal.api.common.v1.IActivityType|null); - - /** PendingActivityInfo state. */ - public state: temporal.api.enums.v1.PendingActivityState; - - /** PendingActivityInfo heartbeatDetails. */ - public heartbeatDetails?: (temporal.api.common.v1.IPayloads|null); - - /** PendingActivityInfo lastHeartbeatTime. */ - public lastHeartbeatTime?: (google.protobuf.ITimestamp|null); - - /** PendingActivityInfo lastStartedTime. */ - public lastStartedTime?: (google.protobuf.ITimestamp|null); - - /** PendingActivityInfo attempt. */ - public attempt: number; - - /** PendingActivityInfo maximumAttempts. */ - public maximumAttempts: number; - - /** PendingActivityInfo scheduledTime. */ - public scheduledTime?: (google.protobuf.ITimestamp|null); - - /** PendingActivityInfo expirationTime. */ - public expirationTime?: (google.protobuf.ITimestamp|null); - - /** PendingActivityInfo lastFailure. */ - public lastFailure?: (temporal.api.failure.v1.IFailure|null); - - /** PendingActivityInfo lastWorkerIdentity. */ - public lastWorkerIdentity: string; - - /** Deprecated. When present, it means this activity is assigned to the build ID of its workflow. */ - public useWorkflowBuildId?: (google.protobuf.IEmpty|null); - - /** - * Deprecated. This means the activity is independently versioned and not bound to the build ID of its workflow. - * The activity will use the build id in this field instead. - * If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning - * rules. - */ - public lastIndependentlyAssignedBuildId?: (string|null); - - /** - * Deprecated. The version stamp of the worker to whom this activity was most recently dispatched - * This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public lastWorkerVersionStamp?: (temporal.api.common.v1.IWorkerVersionStamp|null); - - /** - * The time activity will wait until the next retry. - * If activity is currently running it will be next retry interval if activity failed. - * If activity is currently waiting it will be current retry interval. - * If there will be no retry it will be null. - */ - public currentRetryInterval?: (google.protobuf.IDuration|null); - - /** The time when the last activity attempt was completed. If activity has not been completed yet then it will be null. */ - public lastAttemptCompleteTime?: (google.protobuf.ITimestamp|null); - - /** - * Next time when activity will be scheduled. - * If activity is currently scheduled or started it will be null. - */ - public nextAttemptScheduleTime?: (google.protobuf.ITimestamp|null); - - /** Indicates if activity is paused. */ - public paused: boolean; - - /** - * The deployment this activity was dispatched to most recently. Present only if the activity - * was dispatched to a versioned worker. - * Deprecated. Use `last_deployment_version`. - */ - public lastDeployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** - * The Worker Deployment Version this activity was dispatched to most recently. - * Deprecated. Use `last_deployment_version`. - */ - public lastWorkerDeploymentVersion: string; - - /** - * The Worker Deployment Version this activity was dispatched to most recently. - * If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker. - */ - public lastDeploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** - * Priority metadata. If this message is not present, or any fields are not - * present, they inherit the values from the workflow. - */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** PendingActivityInfo pauseInfo. */ - public pauseInfo?: (temporal.api.workflow.v1.PendingActivityInfo.IPauseInfo|null); - - /** Current activity options. May be different from the one used to start the activity. */ - public activityOptions?: (temporal.api.activity.v1.IActivityOptions|null); - - /** - * Absence of `assigned_build_id` generally means this task is on an "unversioned" task queue. - * In rare cases, it can also mean that the task queue is versioned but we failed to write activity's - * independently-assigned build ID to the database. This case heals automatically once the task is dispatched. - * Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - */ - public assignedBuildId?: ("useWorkflowBuildId"|"lastIndependentlyAssignedBuildId"); - - /** - * Creates a new PendingActivityInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns PendingActivityInfo instance - */ - public static create(properties?: temporal.api.workflow.v1.IPendingActivityInfo): temporal.api.workflow.v1.PendingActivityInfo; - - /** - * Encodes the specified PendingActivityInfo message. Does not implicitly {@link temporal.api.workflow.v1.PendingActivityInfo.verify|verify} messages. - * @param message PendingActivityInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IPendingActivityInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PendingActivityInfo message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.PendingActivityInfo.verify|verify} messages. - * @param message PendingActivityInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IPendingActivityInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PendingActivityInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PendingActivityInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.PendingActivityInfo; - - /** - * Decodes a PendingActivityInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PendingActivityInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.PendingActivityInfo; - - /** - * Creates a PendingActivityInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PendingActivityInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.PendingActivityInfo; - - /** - * Creates a plain object from a PendingActivityInfo message. Also converts values to other types if specified. - * @param message PendingActivityInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.PendingActivityInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PendingActivityInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PendingActivityInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PendingActivityInfo { - - /** Properties of a PauseInfo. */ - interface IPauseInfo { - - /** The time when the activity was paused. */ - pauseTime?: (google.protobuf.ITimestamp|null); - - /** activity was paused by the manual intervention */ - manual?: (temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.IManual|null); - - /** activity was paused by the rule */ - rule?: (temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.IRule|null); - } - - /** Represents a PauseInfo. */ - class PauseInfo implements IPauseInfo { - - /** - * Constructs a new PauseInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.PendingActivityInfo.IPauseInfo); - - /** The time when the activity was paused. */ - public pauseTime?: (google.protobuf.ITimestamp|null); - - /** activity was paused by the manual intervention */ - public manual?: (temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.IManual|null); - - /** activity was paused by the rule */ - public rule?: (temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.IRule|null); - - /** PauseInfo pausedBy. */ - public pausedBy?: ("manual"|"rule"); - - /** - * Creates a new PauseInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns PauseInfo instance - */ - public static create(properties?: temporal.api.workflow.v1.PendingActivityInfo.IPauseInfo): temporal.api.workflow.v1.PendingActivityInfo.PauseInfo; - - /** - * Encodes the specified PauseInfo message. Does not implicitly {@link temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.verify|verify} messages. - * @param message PauseInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.PendingActivityInfo.IPauseInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PauseInfo message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.verify|verify} messages. - * @param message PauseInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.PendingActivityInfo.IPauseInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PauseInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PauseInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.PendingActivityInfo.PauseInfo; - - /** - * Decodes a PauseInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PauseInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.PendingActivityInfo.PauseInfo; - - /** - * Creates a PauseInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PauseInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.PendingActivityInfo.PauseInfo; - - /** - * Creates a plain object from a PauseInfo message. Also converts values to other types if specified. - * @param message PauseInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.PendingActivityInfo.PauseInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PauseInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PauseInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PauseInfo { - - /** Properties of a Manual. */ - interface IManual { - - /** The identity of the actor that paused the activity. */ - identity?: (string|null); - - /** Reason for pausing the activity. */ - reason?: (string|null); - } - - /** Represents a Manual. */ - class Manual implements IManual { - - /** - * Constructs a new Manual. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.IManual); - - /** The identity of the actor that paused the activity. */ - public identity: string; - - /** Reason for pausing the activity. */ - public reason: string; - - /** - * Creates a new Manual instance using the specified properties. - * @param [properties] Properties to set - * @returns Manual instance - */ - public static create(properties?: temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.IManual): temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Manual; - - /** - * Encodes the specified Manual message. Does not implicitly {@link temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Manual.verify|verify} messages. - * @param message Manual message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.IManual, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Manual message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Manual.verify|verify} messages. - * @param message Manual message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.IManual, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Manual message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Manual - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Manual; - - /** - * Decodes a Manual message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Manual - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Manual; - - /** - * Creates a Manual message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Manual - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Manual; - - /** - * Creates a plain object from a Manual message. Also converts values to other types if specified. - * @param message Manual - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Manual, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Manual to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Manual - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Rule. */ - interface IRule { - - /** The rule that paused the activity. */ - ruleId?: (string|null); - - /** The identity of the actor that created the rule. */ - identity?: (string|null); - - /** Reason why rule was created. Populated from rule description. */ - reason?: (string|null); - } - - /** Represents a Rule. */ - class Rule implements IRule { - - /** - * Constructs a new Rule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.IRule); - - /** The rule that paused the activity. */ - public ruleId: string; - - /** The identity of the actor that created the rule. */ - public identity: string; - - /** Reason why rule was created. Populated from rule description. */ - public reason: string; - - /** - * Creates a new Rule instance using the specified properties. - * @param [properties] Properties to set - * @returns Rule instance - */ - public static create(properties?: temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.IRule): temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Rule; - - /** - * Encodes the specified Rule message. Does not implicitly {@link temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Rule.verify|verify} messages. - * @param message Rule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.IRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Rule message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Rule.verify|verify} messages. - * @param message Rule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.IRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Rule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Rule; - - /** - * Decodes a Rule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Rule; - - /** - * Creates a Rule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Rule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Rule; - - /** - * Creates a plain object from a Rule message. Also converts values to other types if specified. - * @param message Rule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Rule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Rule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Rule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of a PendingChildExecutionInfo. */ - interface IPendingChildExecutionInfo { - - /** PendingChildExecutionInfo workflowId */ - workflowId?: (string|null); - - /** PendingChildExecutionInfo runId */ - runId?: (string|null); - - /** PendingChildExecutionInfo workflowTypeName */ - workflowTypeName?: (string|null); - - /** PendingChildExecutionInfo initiatedId */ - initiatedId?: (Long|null); - - /** Default: PARENT_CLOSE_POLICY_TERMINATE. */ - parentClosePolicy?: (temporal.api.enums.v1.ParentClosePolicy|null); - } - - /** Represents a PendingChildExecutionInfo. */ - class PendingChildExecutionInfo implements IPendingChildExecutionInfo { - - /** - * Constructs a new PendingChildExecutionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IPendingChildExecutionInfo); - - /** PendingChildExecutionInfo workflowId. */ - public workflowId: string; - - /** PendingChildExecutionInfo runId. */ - public runId: string; - - /** PendingChildExecutionInfo workflowTypeName. */ - public workflowTypeName: string; - - /** PendingChildExecutionInfo initiatedId. */ - public initiatedId: Long; - - /** Default: PARENT_CLOSE_POLICY_TERMINATE. */ - public parentClosePolicy: temporal.api.enums.v1.ParentClosePolicy; - - /** - * Creates a new PendingChildExecutionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns PendingChildExecutionInfo instance - */ - public static create(properties?: temporal.api.workflow.v1.IPendingChildExecutionInfo): temporal.api.workflow.v1.PendingChildExecutionInfo; - - /** - * Encodes the specified PendingChildExecutionInfo message. Does not implicitly {@link temporal.api.workflow.v1.PendingChildExecutionInfo.verify|verify} messages. - * @param message PendingChildExecutionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IPendingChildExecutionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PendingChildExecutionInfo message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.PendingChildExecutionInfo.verify|verify} messages. - * @param message PendingChildExecutionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IPendingChildExecutionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PendingChildExecutionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PendingChildExecutionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.PendingChildExecutionInfo; - - /** - * Decodes a PendingChildExecutionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PendingChildExecutionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.PendingChildExecutionInfo; - - /** - * Creates a PendingChildExecutionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PendingChildExecutionInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.PendingChildExecutionInfo; - - /** - * Creates a plain object from a PendingChildExecutionInfo message. Also converts values to other types if specified. - * @param message PendingChildExecutionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.PendingChildExecutionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PendingChildExecutionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PendingChildExecutionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PendingWorkflowTaskInfo. */ - interface IPendingWorkflowTaskInfo { - - /** PendingWorkflowTaskInfo state */ - state?: (temporal.api.enums.v1.PendingWorkflowTaskState|null); - - /** PendingWorkflowTaskInfo scheduledTime */ - scheduledTime?: (google.protobuf.ITimestamp|null); - - /** - * original_scheduled_time is the scheduled time of the first workflow task during workflow task heartbeat. - * Heartbeat workflow task is done by RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true and no command - * In this case, OriginalScheduledTime won't change. Then when current time - original_scheduled_time exceeds - * some threshold, the workflow task will be forced timeout. - */ - originalScheduledTime?: (google.protobuf.ITimestamp|null); - - /** PendingWorkflowTaskInfo startedTime */ - startedTime?: (google.protobuf.ITimestamp|null); - - /** PendingWorkflowTaskInfo attempt */ - attempt?: (number|null); - } - - /** Represents a PendingWorkflowTaskInfo. */ - class PendingWorkflowTaskInfo implements IPendingWorkflowTaskInfo { - - /** - * Constructs a new PendingWorkflowTaskInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IPendingWorkflowTaskInfo); - - /** PendingWorkflowTaskInfo state. */ - public state: temporal.api.enums.v1.PendingWorkflowTaskState; - - /** PendingWorkflowTaskInfo scheduledTime. */ - public scheduledTime?: (google.protobuf.ITimestamp|null); - - /** - * original_scheduled_time is the scheduled time of the first workflow task during workflow task heartbeat. - * Heartbeat workflow task is done by RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true and no command - * In this case, OriginalScheduledTime won't change. Then when current time - original_scheduled_time exceeds - * some threshold, the workflow task will be forced timeout. - */ - public originalScheduledTime?: (google.protobuf.ITimestamp|null); - - /** PendingWorkflowTaskInfo startedTime. */ - public startedTime?: (google.protobuf.ITimestamp|null); - - /** PendingWorkflowTaskInfo attempt. */ - public attempt: number; - - /** - * Creates a new PendingWorkflowTaskInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns PendingWorkflowTaskInfo instance - */ - public static create(properties?: temporal.api.workflow.v1.IPendingWorkflowTaskInfo): temporal.api.workflow.v1.PendingWorkflowTaskInfo; - - /** - * Encodes the specified PendingWorkflowTaskInfo message. Does not implicitly {@link temporal.api.workflow.v1.PendingWorkflowTaskInfo.verify|verify} messages. - * @param message PendingWorkflowTaskInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IPendingWorkflowTaskInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PendingWorkflowTaskInfo message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.PendingWorkflowTaskInfo.verify|verify} messages. - * @param message PendingWorkflowTaskInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IPendingWorkflowTaskInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PendingWorkflowTaskInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PendingWorkflowTaskInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.PendingWorkflowTaskInfo; - - /** - * Decodes a PendingWorkflowTaskInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PendingWorkflowTaskInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.PendingWorkflowTaskInfo; - - /** - * Creates a PendingWorkflowTaskInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PendingWorkflowTaskInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.PendingWorkflowTaskInfo; - - /** - * Creates a plain object from a PendingWorkflowTaskInfo message. Also converts values to other types if specified. - * @param message PendingWorkflowTaskInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.PendingWorkflowTaskInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PendingWorkflowTaskInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PendingWorkflowTaskInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResetPoints. */ - interface IResetPoints { - - /** ResetPoints points */ - points?: (temporal.api.workflow.v1.IResetPointInfo[]|null); - } - - /** Represents a ResetPoints. */ - class ResetPoints implements IResetPoints { - - /** - * Constructs a new ResetPoints. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IResetPoints); - - /** ResetPoints points. */ - public points: temporal.api.workflow.v1.IResetPointInfo[]; - - /** - * Creates a new ResetPoints instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetPoints instance - */ - public static create(properties?: temporal.api.workflow.v1.IResetPoints): temporal.api.workflow.v1.ResetPoints; - - /** - * Encodes the specified ResetPoints message. Does not implicitly {@link temporal.api.workflow.v1.ResetPoints.verify|verify} messages. - * @param message ResetPoints message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IResetPoints, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetPoints message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.ResetPoints.verify|verify} messages. - * @param message ResetPoints message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IResetPoints, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetPoints message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetPoints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.ResetPoints; - - /** - * Decodes a ResetPoints message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetPoints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.ResetPoints; - - /** - * Creates a ResetPoints message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetPoints - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.ResetPoints; - - /** - * Creates a plain object from a ResetPoints message. Also converts values to other types if specified. - * @param message ResetPoints - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.ResetPoints, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetPoints to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetPoints - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResetPointInfo. */ - interface IResetPointInfo { - - /** Worker build id. */ - buildId?: (string|null); - - /** Deprecated. A worker binary version identifier. */ - binaryChecksum?: (string|null); - - /** The first run ID in the execution chain that was touched by this worker build. */ - runId?: (string|null); - - /** Event ID of the first WorkflowTaskCompleted event processed by this worker build. */ - firstWorkflowTaskCompletedId?: (Long|null); - - /** ResetPointInfo createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** - * (-- api-linter: core::0214::resource-expiry=disabled - * aip.dev/not-precedent: TTL is not defined for ResetPointInfo. --) - * The time that the run is deleted due to retention. - */ - expireTime?: (google.protobuf.ITimestamp|null); - - /** false if the reset point has pending childWFs/reqCancels/signalExternals. */ - resettable?: (boolean|null); - } - - /** - * ResetPointInfo records the workflow event id that is the first one processed by a given - * build id or binary checksum. A new reset point will be created if either build id or binary - * checksum changes (although in general only one or the other will be used at a time). - */ - class ResetPointInfo implements IResetPointInfo { - - /** - * Constructs a new ResetPointInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IResetPointInfo); - - /** Worker build id. */ - public buildId: string; - - /** Deprecated. A worker binary version identifier. */ - public binaryChecksum: string; - - /** The first run ID in the execution chain that was touched by this worker build. */ - public runId: string; - - /** Event ID of the first WorkflowTaskCompleted event processed by this worker build. */ - public firstWorkflowTaskCompletedId: Long; - - /** ResetPointInfo createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** - * (-- api-linter: core::0214::resource-expiry=disabled - * aip.dev/not-precedent: TTL is not defined for ResetPointInfo. --) - * The time that the run is deleted due to retention. - */ - public expireTime?: (google.protobuf.ITimestamp|null); - - /** false if the reset point has pending childWFs/reqCancels/signalExternals. */ - public resettable: boolean; - - /** - * Creates a new ResetPointInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetPointInfo instance - */ - public static create(properties?: temporal.api.workflow.v1.IResetPointInfo): temporal.api.workflow.v1.ResetPointInfo; - - /** - * Encodes the specified ResetPointInfo message. Does not implicitly {@link temporal.api.workflow.v1.ResetPointInfo.verify|verify} messages. - * @param message ResetPointInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IResetPointInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetPointInfo message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.ResetPointInfo.verify|verify} messages. - * @param message ResetPointInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IResetPointInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetPointInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetPointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.ResetPointInfo; - - /** - * Decodes a ResetPointInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetPointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.ResetPointInfo; - - /** - * Creates a ResetPointInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetPointInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.ResetPointInfo; - - /** - * Creates a plain object from a ResetPointInfo message. Also converts values to other types if specified. - * @param message ResetPointInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.ResetPointInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetPointInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetPointInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NewWorkflowExecutionInfo. */ - interface INewWorkflowExecutionInfo { - - /** NewWorkflowExecutionInfo workflowId */ - workflowId?: (string|null); - - /** NewWorkflowExecutionInfo workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** NewWorkflowExecutionInfo taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** Serialized arguments to the workflow. */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** Total workflow execution timeout including retries and continue as new. */ - workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run. */ - workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. */ - workflowIdReusePolicy?: (temporal.api.enums.v1.WorkflowIdReusePolicy|null); - - /** The retry policy for the workflow. Will never exceed `workflow_execution_timeout`. */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ */ - cronSchedule?: (string|null); - - /** NewWorkflowExecutionInfo memo */ - memo?: (temporal.api.common.v1.IMemo|null); - - /** NewWorkflowExecutionInfo searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** NewWorkflowExecutionInfo header */ - header?: (temporal.api.common.v1.IHeader|null); - - /** - * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig - * for use by user interfaces to display the fixed as-of-start summary and details of the - * workflow. - */ - userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** - * If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. - * To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions. - */ - versioningOverride?: (temporal.api.workflow.v1.IVersioningOverride|null); - - /** Priority metadata */ - priority?: (temporal.api.common.v1.IPriority|null); - } - - /** - * NewWorkflowExecutionInfo is a shared message that encapsulates all the - * required arguments to starting a workflow in different contexts. - */ - class NewWorkflowExecutionInfo implements INewWorkflowExecutionInfo { - - /** - * Constructs a new NewWorkflowExecutionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.INewWorkflowExecutionInfo); - - /** NewWorkflowExecutionInfo workflowId. */ - public workflowId: string; - - /** NewWorkflowExecutionInfo workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** NewWorkflowExecutionInfo taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** Serialized arguments to the workflow. */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** Total workflow execution timeout including retries and continue as new. */ - public workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run. */ - public workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - public workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. */ - public workflowIdReusePolicy: temporal.api.enums.v1.WorkflowIdReusePolicy; - - /** The retry policy for the workflow. Will never exceed `workflow_execution_timeout`. */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ */ - public cronSchedule: string; - - /** NewWorkflowExecutionInfo memo. */ - public memo?: (temporal.api.common.v1.IMemo|null); - - /** NewWorkflowExecutionInfo searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** NewWorkflowExecutionInfo header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** - * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig - * for use by user interfaces to display the fixed as-of-start summary and details of the - * workflow. - */ - public userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** - * If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. - * To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions. - */ - public versioningOverride?: (temporal.api.workflow.v1.IVersioningOverride|null); - - /** Priority metadata */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Creates a new NewWorkflowExecutionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NewWorkflowExecutionInfo instance - */ - public static create(properties?: temporal.api.workflow.v1.INewWorkflowExecutionInfo): temporal.api.workflow.v1.NewWorkflowExecutionInfo; - - /** - * Encodes the specified NewWorkflowExecutionInfo message. Does not implicitly {@link temporal.api.workflow.v1.NewWorkflowExecutionInfo.verify|verify} messages. - * @param message NewWorkflowExecutionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.INewWorkflowExecutionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NewWorkflowExecutionInfo message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.NewWorkflowExecutionInfo.verify|verify} messages. - * @param message NewWorkflowExecutionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.INewWorkflowExecutionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NewWorkflowExecutionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NewWorkflowExecutionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.NewWorkflowExecutionInfo; - - /** - * Decodes a NewWorkflowExecutionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NewWorkflowExecutionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.NewWorkflowExecutionInfo; - - /** - * Creates a NewWorkflowExecutionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NewWorkflowExecutionInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.NewWorkflowExecutionInfo; - - /** - * Creates a plain object from a NewWorkflowExecutionInfo message. Also converts values to other types if specified. - * @param message NewWorkflowExecutionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.NewWorkflowExecutionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NewWorkflowExecutionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NewWorkflowExecutionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CallbackInfo. */ - interface ICallbackInfo { - - /** Information on how this callback should be invoked (e.g. its URL and type). */ - callback?: (temporal.api.common.v1.ICallback|null); - - /** Trigger for this callback. */ - trigger?: (temporal.api.workflow.v1.CallbackInfo.ITrigger|null); - - /** The time when the callback was registered. */ - registrationTime?: (google.protobuf.ITimestamp|null); - - /** CallbackInfo state */ - state?: (temporal.api.enums.v1.CallbackState|null); - - /** - * The number of attempts made to deliver the callback. - * This number represents a minimum bound since the attempt is incremented after the callback request completes. - */ - attempt?: (number|null); - - /** The time when the last attempt completed. */ - lastAttemptCompleteTime?: (google.protobuf.ITimestamp|null); - - /** The last attempt's failure, if any. */ - lastAttemptFailure?: (temporal.api.failure.v1.IFailure|null); - - /** The time when the next attempt is scheduled. */ - nextAttemptScheduleTime?: (google.protobuf.ITimestamp|null); - - /** If the state is BLOCKED, blocked reason provides additional information. */ - blockedReason?: (string|null); - } - - /** CallbackInfo contains the state of an attached workflow callback. */ - class CallbackInfo implements ICallbackInfo { - - /** - * Constructs a new CallbackInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.ICallbackInfo); - - /** Information on how this callback should be invoked (e.g. its URL and type). */ - public callback?: (temporal.api.common.v1.ICallback|null); - - /** Trigger for this callback. */ - public trigger?: (temporal.api.workflow.v1.CallbackInfo.ITrigger|null); - - /** The time when the callback was registered. */ - public registrationTime?: (google.protobuf.ITimestamp|null); - - /** CallbackInfo state. */ - public state: temporal.api.enums.v1.CallbackState; - - /** - * The number of attempts made to deliver the callback. - * This number represents a minimum bound since the attempt is incremented after the callback request completes. - */ - public attempt: number; - - /** The time when the last attempt completed. */ - public lastAttemptCompleteTime?: (google.protobuf.ITimestamp|null); - - /** The last attempt's failure, if any. */ - public lastAttemptFailure?: (temporal.api.failure.v1.IFailure|null); - - /** The time when the next attempt is scheduled. */ - public nextAttemptScheduleTime?: (google.protobuf.ITimestamp|null); - - /** If the state is BLOCKED, blocked reason provides additional information. */ - public blockedReason: string; - - /** - * Creates a new CallbackInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CallbackInfo instance - */ - public static create(properties?: temporal.api.workflow.v1.ICallbackInfo): temporal.api.workflow.v1.CallbackInfo; - - /** - * Encodes the specified CallbackInfo message. Does not implicitly {@link temporal.api.workflow.v1.CallbackInfo.verify|verify} messages. - * @param message CallbackInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.ICallbackInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CallbackInfo message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.CallbackInfo.verify|verify} messages. - * @param message CallbackInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.ICallbackInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CallbackInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CallbackInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.CallbackInfo; - - /** - * Decodes a CallbackInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CallbackInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.CallbackInfo; - - /** - * Creates a CallbackInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CallbackInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.CallbackInfo; - - /** - * Creates a plain object from a CallbackInfo message. Also converts values to other types if specified. - * @param message CallbackInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.CallbackInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CallbackInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CallbackInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CallbackInfo { - - /** Properties of a WorkflowClosed. */ - interface IWorkflowClosed { - } - - /** Trigger for when the workflow is closed. */ - class WorkflowClosed implements IWorkflowClosed { - - /** - * Constructs a new WorkflowClosed. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.CallbackInfo.IWorkflowClosed); - - /** - * Creates a new WorkflowClosed instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowClosed instance - */ - public static create(properties?: temporal.api.workflow.v1.CallbackInfo.IWorkflowClosed): temporal.api.workflow.v1.CallbackInfo.WorkflowClosed; - - /** - * Encodes the specified WorkflowClosed message. Does not implicitly {@link temporal.api.workflow.v1.CallbackInfo.WorkflowClosed.verify|verify} messages. - * @param message WorkflowClosed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.CallbackInfo.IWorkflowClosed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowClosed message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.CallbackInfo.WorkflowClosed.verify|verify} messages. - * @param message WorkflowClosed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.CallbackInfo.IWorkflowClosed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowClosed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowClosed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.CallbackInfo.WorkflowClosed; - - /** - * Decodes a WorkflowClosed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowClosed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.CallbackInfo.WorkflowClosed; - - /** - * Creates a WorkflowClosed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowClosed - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.CallbackInfo.WorkflowClosed; - - /** - * Creates a plain object from a WorkflowClosed message. Also converts values to other types if specified. - * @param message WorkflowClosed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.CallbackInfo.WorkflowClosed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowClosed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowClosed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Trigger. */ - interface ITrigger { - - /** Trigger workflowClosed */ - workflowClosed?: (temporal.api.workflow.v1.CallbackInfo.IWorkflowClosed|null); - } - - /** Represents a Trigger. */ - class Trigger implements ITrigger { - - /** - * Constructs a new Trigger. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.CallbackInfo.ITrigger); - - /** Trigger workflowClosed. */ - public workflowClosed?: (temporal.api.workflow.v1.CallbackInfo.IWorkflowClosed|null); - - /** Trigger variant. */ - public variant?: "workflowClosed"; - - /** - * Creates a new Trigger instance using the specified properties. - * @param [properties] Properties to set - * @returns Trigger instance - */ - public static create(properties?: temporal.api.workflow.v1.CallbackInfo.ITrigger): temporal.api.workflow.v1.CallbackInfo.Trigger; - - /** - * Encodes the specified Trigger message. Does not implicitly {@link temporal.api.workflow.v1.CallbackInfo.Trigger.verify|verify} messages. - * @param message Trigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.CallbackInfo.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Trigger message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.CallbackInfo.Trigger.verify|verify} messages. - * @param message Trigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.CallbackInfo.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Trigger message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Trigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.CallbackInfo.Trigger; - - /** - * Decodes a Trigger message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Trigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.CallbackInfo.Trigger; - - /** - * Creates a Trigger message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Trigger - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.CallbackInfo.Trigger; - - /** - * Creates a plain object from a Trigger message. Also converts values to other types if specified. - * @param message Trigger - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.CallbackInfo.Trigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Trigger to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Trigger - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a PendingNexusOperationInfo. */ - interface IPendingNexusOperationInfo { - - /** - * Endpoint name. - * Resolved to a URL via the cluster's endpoint registry. - */ - endpoint?: (string|null); - - /** Service name. */ - service?: (string|null); - - /** Operation name. */ - operation?: (string|null); - - /** - * Operation ID. Only set for asynchronous operations after a successful StartOperation call. - * - * Deprecated. Renamed to operation_token. - */ - operationId?: (string|null); - - /** - * Schedule-to-close timeout for this operation. - * This is the only timeout settable by a workflow. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** The time when the operation was scheduled. */ - scheduledTime?: (google.protobuf.ITimestamp|null); - - /** PendingNexusOperationInfo state */ - state?: (temporal.api.enums.v1.PendingNexusOperationState|null); - - /** - * The number of attempts made to deliver the start operation request. - * This number represents a minimum bound since the attempt is incremented after the request completes. - */ - attempt?: (number|null); - - /** The time when the last attempt completed. */ - lastAttemptCompleteTime?: (google.protobuf.ITimestamp|null); - - /** The last attempt's failure, if any. */ - lastAttemptFailure?: (temporal.api.failure.v1.IFailure|null); - - /** The time when the next attempt is scheduled. */ - nextAttemptScheduleTime?: (google.protobuf.ITimestamp|null); - - /** PendingNexusOperationInfo cancellationInfo */ - cancellationInfo?: (temporal.api.workflow.v1.INexusOperationCancellationInfo|null); - - /** - * The event ID of the NexusOperationScheduled event. Can be used to correlate an operation in the - * DescribeWorkflowExecution response with workflow history. - */ - scheduledEventId?: (Long|null); - - /** If the state is BLOCKED, blocked reason provides additional information. */ - blockedReason?: (string|null); - - /** Operation token. Only set for asynchronous operations after a successful StartOperation call. */ - operationToken?: (string|null); - - /** - * Schedule-to-start timeout for this operation. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Start-to-close timeout for this operation. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - startToCloseTimeout?: (google.protobuf.IDuration|null); - } - - /** PendingNexusOperationInfo contains the state of a pending Nexus operation. */ - class PendingNexusOperationInfo implements IPendingNexusOperationInfo { - - /** - * Constructs a new PendingNexusOperationInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IPendingNexusOperationInfo); - - /** - * Endpoint name. - * Resolved to a URL via the cluster's endpoint registry. - */ - public endpoint: string; - - /** Service name. */ - public service: string; - - /** Operation name. */ - public operation: string; - - /** - * Operation ID. Only set for asynchronous operations after a successful StartOperation call. - * - * Deprecated. Renamed to operation_token. - */ - public operationId: string; - - /** - * Schedule-to-close timeout for this operation. - * This is the only timeout settable by a workflow. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** The time when the operation was scheduled. */ - public scheduledTime?: (google.protobuf.ITimestamp|null); - - /** PendingNexusOperationInfo state. */ - public state: temporal.api.enums.v1.PendingNexusOperationState; - - /** - * The number of attempts made to deliver the start operation request. - * This number represents a minimum bound since the attempt is incremented after the request completes. - */ - public attempt: number; - - /** The time when the last attempt completed. */ - public lastAttemptCompleteTime?: (google.protobuf.ITimestamp|null); - - /** The last attempt's failure, if any. */ - public lastAttemptFailure?: (temporal.api.failure.v1.IFailure|null); - - /** The time when the next attempt is scheduled. */ - public nextAttemptScheduleTime?: (google.protobuf.ITimestamp|null); - - /** PendingNexusOperationInfo cancellationInfo. */ - public cancellationInfo?: (temporal.api.workflow.v1.INexusOperationCancellationInfo|null); - - /** - * The event ID of the NexusOperationScheduled event. Can be used to correlate an operation in the - * DescribeWorkflowExecution response with workflow history. - */ - public scheduledEventId: Long; - - /** If the state is BLOCKED, blocked reason provides additional information. */ - public blockedReason: string; - - /** Operation token. Only set for asynchronous operations after a successful StartOperation call. */ - public operationToken: string; - - /** - * Schedule-to-start timeout for this operation. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Start-to-close timeout for this operation. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new PendingNexusOperationInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns PendingNexusOperationInfo instance - */ - public static create(properties?: temporal.api.workflow.v1.IPendingNexusOperationInfo): temporal.api.workflow.v1.PendingNexusOperationInfo; - - /** - * Encodes the specified PendingNexusOperationInfo message. Does not implicitly {@link temporal.api.workflow.v1.PendingNexusOperationInfo.verify|verify} messages. - * @param message PendingNexusOperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IPendingNexusOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PendingNexusOperationInfo message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.PendingNexusOperationInfo.verify|verify} messages. - * @param message PendingNexusOperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IPendingNexusOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PendingNexusOperationInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PendingNexusOperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.PendingNexusOperationInfo; - - /** - * Decodes a PendingNexusOperationInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PendingNexusOperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.PendingNexusOperationInfo; - - /** - * Creates a PendingNexusOperationInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PendingNexusOperationInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.PendingNexusOperationInfo; - - /** - * Creates a plain object from a PendingNexusOperationInfo message. Also converts values to other types if specified. - * @param message PendingNexusOperationInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.PendingNexusOperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PendingNexusOperationInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PendingNexusOperationInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NexusOperationCancellationInfo. */ - interface INexusOperationCancellationInfo { - - /** The time when cancellation was requested. */ - requestedTime?: (google.protobuf.ITimestamp|null); - - /** NexusOperationCancellationInfo state */ - state?: (temporal.api.enums.v1.NexusOperationCancellationState|null); - - /** - * The number of attempts made to deliver the cancel operation request. - * This number represents a minimum bound since the attempt is incremented after the request completes. - */ - attempt?: (number|null); - - /** The time when the last attempt completed. */ - lastAttemptCompleteTime?: (google.protobuf.ITimestamp|null); - - /** The last attempt's failure, if any. */ - lastAttemptFailure?: (temporal.api.failure.v1.IFailure|null); - - /** The time when the next attempt is scheduled. */ - nextAttemptScheduleTime?: (google.protobuf.ITimestamp|null); - - /** If the state is BLOCKED, blocked reason provides additional information. */ - blockedReason?: (string|null); - } - - /** NexusOperationCancellationInfo contains the state of a nexus operation cancellation. */ - class NexusOperationCancellationInfo implements INexusOperationCancellationInfo { - - /** - * Constructs a new NexusOperationCancellationInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.INexusOperationCancellationInfo); - - /** The time when cancellation was requested. */ - public requestedTime?: (google.protobuf.ITimestamp|null); - - /** NexusOperationCancellationInfo state. */ - public state: temporal.api.enums.v1.NexusOperationCancellationState; - - /** - * The number of attempts made to deliver the cancel operation request. - * This number represents a minimum bound since the attempt is incremented after the request completes. - */ - public attempt: number; - - /** The time when the last attempt completed. */ - public lastAttemptCompleteTime?: (google.protobuf.ITimestamp|null); - - /** The last attempt's failure, if any. */ - public lastAttemptFailure?: (temporal.api.failure.v1.IFailure|null); - - /** The time when the next attempt is scheduled. */ - public nextAttemptScheduleTime?: (google.protobuf.ITimestamp|null); - - /** If the state is BLOCKED, blocked reason provides additional information. */ - public blockedReason: string; - - /** - * Creates a new NexusOperationCancellationInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NexusOperationCancellationInfo instance - */ - public static create(properties?: temporal.api.workflow.v1.INexusOperationCancellationInfo): temporal.api.workflow.v1.NexusOperationCancellationInfo; - - /** - * Encodes the specified NexusOperationCancellationInfo message. Does not implicitly {@link temporal.api.workflow.v1.NexusOperationCancellationInfo.verify|verify} messages. - * @param message NexusOperationCancellationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.INexusOperationCancellationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NexusOperationCancellationInfo message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.NexusOperationCancellationInfo.verify|verify} messages. - * @param message NexusOperationCancellationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.INexusOperationCancellationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NexusOperationCancellationInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NexusOperationCancellationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.NexusOperationCancellationInfo; - - /** - * Decodes a NexusOperationCancellationInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NexusOperationCancellationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.NexusOperationCancellationInfo; - - /** - * Creates a NexusOperationCancellationInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NexusOperationCancellationInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.NexusOperationCancellationInfo; - - /** - * Creates a plain object from a NexusOperationCancellationInfo message. Also converts values to other types if specified. - * @param message NexusOperationCancellationInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.NexusOperationCancellationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NexusOperationCancellationInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NexusOperationCancellationInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionOptions. */ - interface IWorkflowExecutionOptions { - - /** If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. */ - versioningOverride?: (temporal.api.workflow.v1.IVersioningOverride|null); - - /** If set, overrides the workflow's priority sent by the SDK. */ - priority?: (temporal.api.common.v1.IPriority|null); - } - - /** Represents a WorkflowExecutionOptions. */ - class WorkflowExecutionOptions implements IWorkflowExecutionOptions { - - /** - * Constructs a new WorkflowExecutionOptions. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IWorkflowExecutionOptions); - - /** If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. */ - public versioningOverride?: (temporal.api.workflow.v1.IVersioningOverride|null); - - /** If set, overrides the workflow's priority sent by the SDK. */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Creates a new WorkflowExecutionOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionOptions instance - */ - public static create(properties?: temporal.api.workflow.v1.IWorkflowExecutionOptions): temporal.api.workflow.v1.WorkflowExecutionOptions; - - /** - * Encodes the specified WorkflowExecutionOptions message. Does not implicitly {@link temporal.api.workflow.v1.WorkflowExecutionOptions.verify|verify} messages. - * @param message WorkflowExecutionOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IWorkflowExecutionOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionOptions message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.WorkflowExecutionOptions.verify|verify} messages. - * @param message WorkflowExecutionOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IWorkflowExecutionOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.WorkflowExecutionOptions; - - /** - * Decodes a WorkflowExecutionOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.WorkflowExecutionOptions; - - /** - * Creates a WorkflowExecutionOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionOptions - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.WorkflowExecutionOptions; - - /** - * Creates a plain object from a WorkflowExecutionOptions message. Also converts values to other types if specified. - * @param message WorkflowExecutionOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.WorkflowExecutionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VersioningOverride. */ - interface IVersioningOverride { - - /** Override the workflow to have Pinned behavior. */ - pinned?: (temporal.api.workflow.v1.VersioningOverride.IPinnedOverride|null); - - /** Override the workflow to have AutoUpgrade behavior. */ - autoUpgrade?: (boolean|null); - - /** - * Required. - * Deprecated. Use `override`. - */ - behavior?: (temporal.api.enums.v1.VersioningBehavior|null); - - /** - * Required if behavior is `PINNED`. Must be null if behavior is `AUTO_UPGRADE`. - * Identifies the worker deployment to pin the workflow to. - * Deprecated. Use `override.pinned.version`. - */ - deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** - * Required if behavior is `PINNED`. Must be absent if behavior is not `PINNED`. - * Identifies the worker deployment version to pin the workflow to, in the format - * ".". - * Deprecated. Use `override.pinned.version`. - */ - pinnedVersion?: (string|null); - } - - /** - * Used to override the versioning behavior (and pinned deployment version, if applicable) of a - * specific workflow execution. If set, this override takes precedence over worker-sent values. - * See `WorkflowExecutionInfo.VersioningInfo` for more information. - * - * To remove the override, call `UpdateWorkflowExecutionOptions` with a null - * `VersioningOverride`, and use the `update_mask` to indicate that it should be mutated. - * - * Pinned behavior overrides are automatically inherited by child workflows, workflow retries, continue-as-new - * workflows, and cron workflows. - */ - class VersioningOverride implements IVersioningOverride { - - /** - * Constructs a new VersioningOverride. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IVersioningOverride); - - /** Override the workflow to have Pinned behavior. */ - public pinned?: (temporal.api.workflow.v1.VersioningOverride.IPinnedOverride|null); - - /** Override the workflow to have AutoUpgrade behavior. */ - public autoUpgrade?: (boolean|null); - - /** - * Required. - * Deprecated. Use `override`. - */ - public behavior: temporal.api.enums.v1.VersioningBehavior; - - /** - * Required if behavior is `PINNED`. Must be null if behavior is `AUTO_UPGRADE`. - * Identifies the worker deployment to pin the workflow to. - * Deprecated. Use `override.pinned.version`. - */ - public deployment?: (temporal.api.deployment.v1.IDeployment|null); - - /** - * Required if behavior is `PINNED`. Must be absent if behavior is not `PINNED`. - * Identifies the worker deployment version to pin the workflow to, in the format - * ".". - * Deprecated. Use `override.pinned.version`. - */ - public pinnedVersion: string; - - /** Indicates whether to override the workflow to be AutoUpgrade or Pinned. */ - public override?: ("pinned"|"autoUpgrade"); - - /** - * Creates a new VersioningOverride instance using the specified properties. - * @param [properties] Properties to set - * @returns VersioningOverride instance - */ - public static create(properties?: temporal.api.workflow.v1.IVersioningOverride): temporal.api.workflow.v1.VersioningOverride; - - /** - * Encodes the specified VersioningOverride message. Does not implicitly {@link temporal.api.workflow.v1.VersioningOverride.verify|verify} messages. - * @param message VersioningOverride message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IVersioningOverride, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VersioningOverride message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.VersioningOverride.verify|verify} messages. - * @param message VersioningOverride message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IVersioningOverride, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VersioningOverride message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VersioningOverride - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.VersioningOverride; - - /** - * Decodes a VersioningOverride message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VersioningOverride - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.VersioningOverride; - - /** - * Creates a VersioningOverride message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VersioningOverride - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.VersioningOverride; - - /** - * Creates a plain object from a VersioningOverride message. Also converts values to other types if specified. - * @param message VersioningOverride - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.VersioningOverride, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VersioningOverride to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VersioningOverride - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace VersioningOverride { - - /** Properties of a PinnedOverride. */ - interface IPinnedOverride { - - /** - * Defaults to PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED. - * See `PinnedOverrideBehavior` for details. - */ - behavior?: (temporal.api.workflow.v1.VersioningOverride.PinnedOverrideBehavior|null); - - /** - * Specifies the Worker Deployment Version to pin this workflow to. - * Required if the target workflow is not already pinned to a version. - * - * If omitted and the target workflow is already pinned, the effective - * pinned version will be the existing pinned version. - * - * If omitted and the target workflow is not pinned, the override request - * will be rejected with a PreconditionFailed error. - */ - version?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - } - - /** Represents a PinnedOverride. */ - class PinnedOverride implements IPinnedOverride { - - /** - * Constructs a new PinnedOverride. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.VersioningOverride.IPinnedOverride); - - /** - * Defaults to PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED. - * See `PinnedOverrideBehavior` for details. - */ - public behavior: temporal.api.workflow.v1.VersioningOverride.PinnedOverrideBehavior; - - /** - * Specifies the Worker Deployment Version to pin this workflow to. - * Required if the target workflow is not already pinned to a version. - * - * If omitted and the target workflow is already pinned, the effective - * pinned version will be the existing pinned version. - * - * If omitted and the target workflow is not pinned, the override request - * will be rejected with a PreconditionFailed error. - */ - public version?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** - * Creates a new PinnedOverride instance using the specified properties. - * @param [properties] Properties to set - * @returns PinnedOverride instance - */ - public static create(properties?: temporal.api.workflow.v1.VersioningOverride.IPinnedOverride): temporal.api.workflow.v1.VersioningOverride.PinnedOverride; - - /** - * Encodes the specified PinnedOverride message. Does not implicitly {@link temporal.api.workflow.v1.VersioningOverride.PinnedOverride.verify|verify} messages. - * @param message PinnedOverride message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.VersioningOverride.IPinnedOverride, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PinnedOverride message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.VersioningOverride.PinnedOverride.verify|verify} messages. - * @param message PinnedOverride message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.VersioningOverride.IPinnedOverride, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PinnedOverride message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PinnedOverride - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.VersioningOverride.PinnedOverride; - - /** - * Decodes a PinnedOverride message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PinnedOverride - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.VersioningOverride.PinnedOverride; - - /** - * Creates a PinnedOverride message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PinnedOverride - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.VersioningOverride.PinnedOverride; - - /** - * Creates a plain object from a PinnedOverride message. Also converts values to other types if specified. - * @param message PinnedOverride - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.VersioningOverride.PinnedOverride, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PinnedOverride to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PinnedOverride - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** PinnedOverrideBehavior enum. */ - enum PinnedOverrideBehavior { - PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED = 0, - PINNED_OVERRIDE_BEHAVIOR_PINNED = 1 - } - } - - /** Properties of an OnConflictOptions. */ - interface IOnConflictOptions { - - /** Attaches the request ID to the running workflow. */ - attachRequestId?: (boolean|null); - - /** Attaches the completion callbacks to the running workflow. */ - attachCompletionCallbacks?: (boolean|null); - - /** Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event. */ - attachLinks?: (boolean|null); - } - - /** - * When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and - * there is already an existing running workflow, OnConflictOptions defines actions to be taken on - * the existing running workflow. In this case, it will create a WorkflowExecutionOptionsUpdatedEvent - * history event in the running workflow with the changes requested in this object. - */ - class OnConflictOptions implements IOnConflictOptions { - - /** - * Constructs a new OnConflictOptions. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IOnConflictOptions); - - /** Attaches the request ID to the running workflow. */ - public attachRequestId: boolean; - - /** Attaches the completion callbacks to the running workflow. */ - public attachCompletionCallbacks: boolean; - - /** Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event. */ - public attachLinks: boolean; - - /** - * Creates a new OnConflictOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OnConflictOptions instance - */ - public static create(properties?: temporal.api.workflow.v1.IOnConflictOptions): temporal.api.workflow.v1.OnConflictOptions; - - /** - * Encodes the specified OnConflictOptions message. Does not implicitly {@link temporal.api.workflow.v1.OnConflictOptions.verify|verify} messages. - * @param message OnConflictOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IOnConflictOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OnConflictOptions message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.OnConflictOptions.verify|verify} messages. - * @param message OnConflictOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IOnConflictOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OnConflictOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OnConflictOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.OnConflictOptions; - - /** - * Decodes an OnConflictOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OnConflictOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.OnConflictOptions; - - /** - * Creates an OnConflictOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OnConflictOptions - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.OnConflictOptions; - - /** - * Creates a plain object from an OnConflictOptions message. Also converts values to other types if specified. - * @param message OnConflictOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.OnConflictOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OnConflictOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OnConflictOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RequestIdInfo. */ - interface IRequestIdInfo { - - /** The event type of the history event generated by the request. */ - eventType?: (temporal.api.enums.v1.EventType|null); - - /** - * The event id of the history event generated by the request. It's possible the event ID is not - * known (unflushed buffered event). In this case, the value will be zero or a negative value, - * representing an invalid ID. - */ - eventId?: (Long|null); - - /** - * Indicate if the request is still buffered. If so, the event ID is not known and its value - * will be an invalid event ID. - */ - buffered?: (boolean|null); - } - - /** RequestIdInfo contains details of a request ID. */ - class RequestIdInfo implements IRequestIdInfo { - - /** - * Constructs a new RequestIdInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IRequestIdInfo); - - /** The event type of the history event generated by the request. */ - public eventType: temporal.api.enums.v1.EventType; - - /** - * The event id of the history event generated by the request. It's possible the event ID is not - * known (unflushed buffered event). In this case, the value will be zero or a negative value, - * representing an invalid ID. - */ - public eventId: Long; - - /** - * Indicate if the request is still buffered. If so, the event ID is not known and its value - * will be an invalid event ID. - */ - public buffered: boolean; - - /** - * Creates a new RequestIdInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestIdInfo instance - */ - public static create(properties?: temporal.api.workflow.v1.IRequestIdInfo): temporal.api.workflow.v1.RequestIdInfo; - - /** - * Encodes the specified RequestIdInfo message. Does not implicitly {@link temporal.api.workflow.v1.RequestIdInfo.verify|verify} messages. - * @param message RequestIdInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IRequestIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestIdInfo message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.RequestIdInfo.verify|verify} messages. - * @param message RequestIdInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IRequestIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestIdInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestIdInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.RequestIdInfo; - - /** - * Decodes a RequestIdInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestIdInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.RequestIdInfo; - - /** - * Creates a RequestIdInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestIdInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.RequestIdInfo; - - /** - * Creates a plain object from a RequestIdInfo message. Also converts values to other types if specified. - * @param message RequestIdInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.RequestIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestIdInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestIdInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PostResetOperation. */ - interface IPostResetOperation { - - /** PostResetOperation signalWorkflow */ - signalWorkflow?: (temporal.api.workflow.v1.PostResetOperation.ISignalWorkflow|null); - - /** PostResetOperation updateWorkflowOptions */ - updateWorkflowOptions?: (temporal.api.workflow.v1.PostResetOperation.IUpdateWorkflowOptions|null); - } - - /** PostResetOperation represents an operation to be performed on the new workflow execution after a workflow reset. */ - class PostResetOperation implements IPostResetOperation { - - /** - * Constructs a new PostResetOperation. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IPostResetOperation); - - /** PostResetOperation signalWorkflow. */ - public signalWorkflow?: (temporal.api.workflow.v1.PostResetOperation.ISignalWorkflow|null); - - /** PostResetOperation updateWorkflowOptions. */ - public updateWorkflowOptions?: (temporal.api.workflow.v1.PostResetOperation.IUpdateWorkflowOptions|null); - - /** PostResetOperation variant. */ - public variant?: ("signalWorkflow"|"updateWorkflowOptions"); - - /** - * Creates a new PostResetOperation instance using the specified properties. - * @param [properties] Properties to set - * @returns PostResetOperation instance - */ - public static create(properties?: temporal.api.workflow.v1.IPostResetOperation): temporal.api.workflow.v1.PostResetOperation; - - /** - * Encodes the specified PostResetOperation message. Does not implicitly {@link temporal.api.workflow.v1.PostResetOperation.verify|verify} messages. - * @param message PostResetOperation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IPostResetOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostResetOperation message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.PostResetOperation.verify|verify} messages. - * @param message PostResetOperation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IPostResetOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostResetOperation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostResetOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.PostResetOperation; - - /** - * Decodes a PostResetOperation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostResetOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.PostResetOperation; - - /** - * Creates a PostResetOperation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostResetOperation - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.PostResetOperation; - - /** - * Creates a plain object from a PostResetOperation message. Also converts values to other types if specified. - * @param message PostResetOperation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.PostResetOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostResetOperation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostResetOperation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PostResetOperation { - - /** Properties of a SignalWorkflow. */ - interface ISignalWorkflow { - - /** The workflow author-defined name of the signal to send to the workflow. */ - signalName?: (string|null); - - /** Serialized value(s) to provide with the signal. */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** Headers that are passed with the signal to the processing workflow. */ - header?: (temporal.api.common.v1.IHeader|null); - - /** Links to be associated with the WorkflowExecutionSignaled event. */ - links?: (temporal.api.common.v1.ILink[]|null); - } - - /** - * SignalWorkflow represents sending a signal after a workflow reset. - * Keep the parameter in sync with temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest. - */ - class SignalWorkflow implements ISignalWorkflow { - - /** - * Constructs a new SignalWorkflow. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.PostResetOperation.ISignalWorkflow); - - /** The workflow author-defined name of the signal to send to the workflow. */ - public signalName: string; - - /** Serialized value(s) to provide with the signal. */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** Headers that are passed with the signal to the processing workflow. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** Links to be associated with the WorkflowExecutionSignaled event. */ - public links: temporal.api.common.v1.ILink[]; - - /** - * Creates a new SignalWorkflow instance using the specified properties. - * @param [properties] Properties to set - * @returns SignalWorkflow instance - */ - public static create(properties?: temporal.api.workflow.v1.PostResetOperation.ISignalWorkflow): temporal.api.workflow.v1.PostResetOperation.SignalWorkflow; - - /** - * Encodes the specified SignalWorkflow message. Does not implicitly {@link temporal.api.workflow.v1.PostResetOperation.SignalWorkflow.verify|verify} messages. - * @param message SignalWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.PostResetOperation.ISignalWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignalWorkflow message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.PostResetOperation.SignalWorkflow.verify|verify} messages. - * @param message SignalWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.PostResetOperation.ISignalWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignalWorkflow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignalWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.PostResetOperation.SignalWorkflow; - - /** - * Decodes a SignalWorkflow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignalWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.PostResetOperation.SignalWorkflow; - - /** - * Creates a SignalWorkflow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignalWorkflow - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.PostResetOperation.SignalWorkflow; - - /** - * Creates a plain object from a SignalWorkflow message. Also converts values to other types if specified. - * @param message SignalWorkflow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.PostResetOperation.SignalWorkflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignalWorkflow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SignalWorkflow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateWorkflowOptions. */ - interface IUpdateWorkflowOptions { - - /** Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask. */ - workflowExecutionOptions?: (temporal.api.workflow.v1.IWorkflowExecutionOptions|null); - - /** - * Controls which fields from `workflow_execution_options` will be applied. - * To unset a field, set it to null and use the update mask to indicate that it should be mutated. - */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** - * UpdateWorkflowOptions represents updating workflow execution options after a workflow reset. - * Keep the parameters in sync with temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest. - */ - class UpdateWorkflowOptions implements IUpdateWorkflowOptions { - - /** - * Constructs a new UpdateWorkflowOptions. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.PostResetOperation.IUpdateWorkflowOptions); - - /** Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask. */ - public workflowExecutionOptions?: (temporal.api.workflow.v1.IWorkflowExecutionOptions|null); - - /** - * Controls which fields from `workflow_execution_options` will be applied. - * To unset a field, set it to null and use the update mask to indicate that it should be mutated. - */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateWorkflowOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateWorkflowOptions instance - */ - public static create(properties?: temporal.api.workflow.v1.PostResetOperation.IUpdateWorkflowOptions): temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions; - - /** - * Encodes the specified UpdateWorkflowOptions message. Does not implicitly {@link temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions.verify|verify} messages. - * @param message UpdateWorkflowOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.PostResetOperation.IUpdateWorkflowOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateWorkflowOptions message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions.verify|verify} messages. - * @param message UpdateWorkflowOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.PostResetOperation.IUpdateWorkflowOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateWorkflowOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateWorkflowOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions; - - /** - * Decodes an UpdateWorkflowOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateWorkflowOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions; - - /** - * Creates an UpdateWorkflowOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateWorkflowOptions - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions; - - /** - * Creates a plain object from an UpdateWorkflowOptions message. Also converts values to other types if specified. - * @param message UpdateWorkflowOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateWorkflowOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateWorkflowOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a WorkflowExecutionPauseInfo. */ - interface IWorkflowExecutionPauseInfo { - - /** The identity of the client who paused the workflow execution. */ - identity?: (string|null); - - /** The time when the workflow execution was paused. */ - pausedTime?: (google.protobuf.ITimestamp|null); - - /** The reason for pausing the workflow execution. */ - reason?: (string|null); - } - - /** WorkflowExecutionPauseInfo contains the information about a workflow execution pause. */ - class WorkflowExecutionPauseInfo implements IWorkflowExecutionPauseInfo { - - /** - * Constructs a new WorkflowExecutionPauseInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.workflow.v1.IWorkflowExecutionPauseInfo); - - /** The identity of the client who paused the workflow execution. */ - public identity: string; - - /** The time when the workflow execution was paused. */ - public pausedTime?: (google.protobuf.ITimestamp|null); - - /** The reason for pausing the workflow execution. */ - public reason: string; - - /** - * Creates a new WorkflowExecutionPauseInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionPauseInfo instance - */ - public static create(properties?: temporal.api.workflow.v1.IWorkflowExecutionPauseInfo): temporal.api.workflow.v1.WorkflowExecutionPauseInfo; - - /** - * Encodes the specified WorkflowExecutionPauseInfo message. Does not implicitly {@link temporal.api.workflow.v1.WorkflowExecutionPauseInfo.verify|verify} messages. - * @param message WorkflowExecutionPauseInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.workflow.v1.IWorkflowExecutionPauseInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionPauseInfo message, length delimited. Does not implicitly {@link temporal.api.workflow.v1.WorkflowExecutionPauseInfo.verify|verify} messages. - * @param message WorkflowExecutionPauseInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.workflow.v1.IWorkflowExecutionPauseInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionPauseInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionPauseInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.workflow.v1.WorkflowExecutionPauseInfo; - - /** - * Decodes a WorkflowExecutionPauseInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionPauseInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.workflow.v1.WorkflowExecutionPauseInfo; - - /** - * Creates a WorkflowExecutionPauseInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionPauseInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.workflow.v1.WorkflowExecutionPauseInfo; - - /** - * Creates a plain object from a WorkflowExecutionPauseInfo message. Also converts values to other types if specified. - * @param message WorkflowExecutionPauseInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.workflow.v1.WorkflowExecutionPauseInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionPauseInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionPauseInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace command. */ - namespace command { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a ScheduleActivityTaskCommandAttributes. */ - interface IScheduleActivityTaskCommandAttributes { - - /** ScheduleActivityTaskCommandAttributes activityId */ - activityId?: (string|null); - - /** ScheduleActivityTaskCommandAttributes activityType */ - activityType?: (temporal.api.common.v1.IActivityType|null); - - /** ScheduleActivityTaskCommandAttributes taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** ScheduleActivityTaskCommandAttributes header */ - header?: (temporal.api.common.v1.IHeader|null); - - /** ScheduleActivityTaskCommandAttributes input */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** - * Indicates how long the caller is willing to wait for activity completion. The "schedule" time - * is when the activity is initially scheduled, not when the most recent retry is scheduled. - * Limits how long retries will be attempted. Either this or `start_to_close_timeout` must be - * specified. When not specified, defaults to the workflow execution timeout. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Limits the time an activity task can stay in a task queue before a worker picks it up. The - * "schedule" time is when the most recent retry is scheduled. This timeout should usually not - * be set: it's useful in specific scenarios like worker-specific task queues. This timeout is - * always non retryable, as all a retry would achieve is to put it back into the same queue. - * Defaults to `schedule_to_close_timeout` or workflow execution timeout if that is not - * specified. More info: - * https://docs.temporal.io/docs/content/what-is-a-schedule-to-start-timeout/ - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Maximum time an activity is allowed to execute after being picked up by a worker. This - * timeout is always retryable. Either this or `schedule_to_close_timeout` must be specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Maximum permitted time between successful worker heartbeats. */ - heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** - * Activities are provided by a default retry policy which is controlled through the service's - * dynamic configuration. Retries will be attempted until `schedule_to_close_timeout` has - * elapsed. To disable retries set retry_policy.maximum_attempts to 1. - */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** - * Request to start the activity directly bypassing matching service and worker polling - * The slot for executing the activity should be reserved when setting this field to true. - */ - requestEagerExecution?: (boolean|null); - - /** - * If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, - * Assignment rules of the activity's Task Queue will be used to determine the Build ID. - */ - useWorkflowBuildId?: (boolean|null); - - /** - * Priority metadata. If this message is not present, or any fields are not - * present, they inherit the values from the workflow. - */ - priority?: (temporal.api.common.v1.IPriority|null); - } - - /** Represents a ScheduleActivityTaskCommandAttributes. */ - class ScheduleActivityTaskCommandAttributes implements IScheduleActivityTaskCommandAttributes { - - /** - * Constructs a new ScheduleActivityTaskCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.IScheduleActivityTaskCommandAttributes); - - /** ScheduleActivityTaskCommandAttributes activityId. */ - public activityId: string; - - /** ScheduleActivityTaskCommandAttributes activityType. */ - public activityType?: (temporal.api.common.v1.IActivityType|null); - - /** ScheduleActivityTaskCommandAttributes taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** ScheduleActivityTaskCommandAttributes header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** ScheduleActivityTaskCommandAttributes input. */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** - * Indicates how long the caller is willing to wait for activity completion. The "schedule" time - * is when the activity is initially scheduled, not when the most recent retry is scheduled. - * Limits how long retries will be attempted. Either this or `start_to_close_timeout` must be - * specified. When not specified, defaults to the workflow execution timeout. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Limits the time an activity task can stay in a task queue before a worker picks it up. The - * "schedule" time is when the most recent retry is scheduled. This timeout should usually not - * be set: it's useful in specific scenarios like worker-specific task queues. This timeout is - * always non retryable, as all a retry would achieve is to put it back into the same queue. - * Defaults to `schedule_to_close_timeout` or workflow execution timeout if that is not - * specified. More info: - * https://docs.temporal.io/docs/content/what-is-a-schedule-to-start-timeout/ - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Maximum time an activity is allowed to execute after being picked up by a worker. This - * timeout is always retryable. Either this or `schedule_to_close_timeout` must be specified. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** Maximum permitted time between successful worker heartbeats. */ - public heartbeatTimeout?: (google.protobuf.IDuration|null); - - /** - * Activities are provided by a default retry policy which is controlled through the service's - * dynamic configuration. Retries will be attempted until `schedule_to_close_timeout` has - * elapsed. To disable retries set retry_policy.maximum_attempts to 1. - */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** - * Request to start the activity directly bypassing matching service and worker polling - * The slot for executing the activity should be reserved when setting this field to true. - */ - public requestEagerExecution: boolean; - - /** - * If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, - * Assignment rules of the activity's Task Queue will be used to determine the Build ID. - */ - public useWorkflowBuildId: boolean; - - /** - * Priority metadata. If this message is not present, or any fields are not - * present, they inherit the values from the workflow. - */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Creates a new ScheduleActivityTaskCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ScheduleActivityTaskCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.IScheduleActivityTaskCommandAttributes): temporal.api.command.v1.ScheduleActivityTaskCommandAttributes; - - /** - * Encodes the specified ScheduleActivityTaskCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.ScheduleActivityTaskCommandAttributes.verify|verify} messages. - * @param message ScheduleActivityTaskCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.IScheduleActivityTaskCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduleActivityTaskCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.ScheduleActivityTaskCommandAttributes.verify|verify} messages. - * @param message ScheduleActivityTaskCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.IScheduleActivityTaskCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduleActivityTaskCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduleActivityTaskCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.ScheduleActivityTaskCommandAttributes; - - /** - * Decodes a ScheduleActivityTaskCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduleActivityTaskCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.ScheduleActivityTaskCommandAttributes; - - /** - * Creates a ScheduleActivityTaskCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduleActivityTaskCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.ScheduleActivityTaskCommandAttributes; - - /** - * Creates a plain object from a ScheduleActivityTaskCommandAttributes message. Also converts values to other types if specified. - * @param message ScheduleActivityTaskCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.ScheduleActivityTaskCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduleActivityTaskCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScheduleActivityTaskCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RequestCancelActivityTaskCommandAttributes. */ - interface IRequestCancelActivityTaskCommandAttributes { - - /** The `ACTIVITY_TASK_SCHEDULED` event id for the activity being cancelled. */ - scheduledEventId?: (Long|null); - } - - /** Represents a RequestCancelActivityTaskCommandAttributes. */ - class RequestCancelActivityTaskCommandAttributes implements IRequestCancelActivityTaskCommandAttributes { - - /** - * Constructs a new RequestCancelActivityTaskCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.IRequestCancelActivityTaskCommandAttributes); - - /** The `ACTIVITY_TASK_SCHEDULED` event id for the activity being cancelled. */ - public scheduledEventId: Long; - - /** - * Creates a new RequestCancelActivityTaskCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestCancelActivityTaskCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.IRequestCancelActivityTaskCommandAttributes): temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes; - - /** - * Encodes the specified RequestCancelActivityTaskCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes.verify|verify} messages. - * @param message RequestCancelActivityTaskCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.IRequestCancelActivityTaskCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCancelActivityTaskCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes.verify|verify} messages. - * @param message RequestCancelActivityTaskCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.IRequestCancelActivityTaskCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestCancelActivityTaskCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestCancelActivityTaskCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes; - - /** - * Decodes a RequestCancelActivityTaskCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestCancelActivityTaskCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes; - - /** - * Creates a RequestCancelActivityTaskCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCancelActivityTaskCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes; - - /** - * Creates a plain object from a RequestCancelActivityTaskCommandAttributes message. Also converts values to other types if specified. - * @param message RequestCancelActivityTaskCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCancelActivityTaskCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestCancelActivityTaskCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartTimerCommandAttributes. */ - interface IStartTimerCommandAttributes { - - /** - * An id for the timer, currently live timers must have different ids. Typically autogenerated - * by the SDK. - */ - timerId?: (string|null); - - /** - * How long until the timer fires, producing a `TIMER_FIRED` event. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - startToFireTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a StartTimerCommandAttributes. */ - class StartTimerCommandAttributes implements IStartTimerCommandAttributes { - - /** - * Constructs a new StartTimerCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.IStartTimerCommandAttributes); - - /** - * An id for the timer, currently live timers must have different ids. Typically autogenerated - * by the SDK. - */ - public timerId: string; - - /** - * How long until the timer fires, producing a `TIMER_FIRED` event. - * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public startToFireTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new StartTimerCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns StartTimerCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.IStartTimerCommandAttributes): temporal.api.command.v1.StartTimerCommandAttributes; - - /** - * Encodes the specified StartTimerCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.StartTimerCommandAttributes.verify|verify} messages. - * @param message StartTimerCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.IStartTimerCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartTimerCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.StartTimerCommandAttributes.verify|verify} messages. - * @param message StartTimerCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.IStartTimerCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartTimerCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartTimerCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.StartTimerCommandAttributes; - - /** - * Decodes a StartTimerCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartTimerCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.StartTimerCommandAttributes; - - /** - * Creates a StartTimerCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartTimerCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.StartTimerCommandAttributes; - - /** - * Creates a plain object from a StartTimerCommandAttributes message. Also converts values to other types if specified. - * @param message StartTimerCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.StartTimerCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartTimerCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartTimerCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CompleteWorkflowExecutionCommandAttributes. */ - interface ICompleteWorkflowExecutionCommandAttributes { - - /** CompleteWorkflowExecutionCommandAttributes result */ - result?: (temporal.api.common.v1.IPayloads|null); - } - - /** Represents a CompleteWorkflowExecutionCommandAttributes. */ - class CompleteWorkflowExecutionCommandAttributes implements ICompleteWorkflowExecutionCommandAttributes { - - /** - * Constructs a new CompleteWorkflowExecutionCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.ICompleteWorkflowExecutionCommandAttributes); - - /** CompleteWorkflowExecutionCommandAttributes result. */ - public result?: (temporal.api.common.v1.IPayloads|null); - - /** - * Creates a new CompleteWorkflowExecutionCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns CompleteWorkflowExecutionCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.ICompleteWorkflowExecutionCommandAttributes): temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes; - - /** - * Encodes the specified CompleteWorkflowExecutionCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes.verify|verify} messages. - * @param message CompleteWorkflowExecutionCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.ICompleteWorkflowExecutionCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompleteWorkflowExecutionCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes.verify|verify} messages. - * @param message CompleteWorkflowExecutionCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.ICompleteWorkflowExecutionCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompleteWorkflowExecutionCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompleteWorkflowExecutionCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes; - - /** - * Decodes a CompleteWorkflowExecutionCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompleteWorkflowExecutionCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes; - - /** - * Creates a CompleteWorkflowExecutionCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompleteWorkflowExecutionCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes; - - /** - * Creates a plain object from a CompleteWorkflowExecutionCommandAttributes message. Also converts values to other types if specified. - * @param message CompleteWorkflowExecutionCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompleteWorkflowExecutionCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CompleteWorkflowExecutionCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FailWorkflowExecutionCommandAttributes. */ - interface IFailWorkflowExecutionCommandAttributes { - - /** FailWorkflowExecutionCommandAttributes failure */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** Represents a FailWorkflowExecutionCommandAttributes. */ - class FailWorkflowExecutionCommandAttributes implements IFailWorkflowExecutionCommandAttributes { - - /** - * Constructs a new FailWorkflowExecutionCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.IFailWorkflowExecutionCommandAttributes); - - /** FailWorkflowExecutionCommandAttributes failure. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new FailWorkflowExecutionCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns FailWorkflowExecutionCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.IFailWorkflowExecutionCommandAttributes): temporal.api.command.v1.FailWorkflowExecutionCommandAttributes; - - /** - * Encodes the specified FailWorkflowExecutionCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.FailWorkflowExecutionCommandAttributes.verify|verify} messages. - * @param message FailWorkflowExecutionCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.IFailWorkflowExecutionCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FailWorkflowExecutionCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.FailWorkflowExecutionCommandAttributes.verify|verify} messages. - * @param message FailWorkflowExecutionCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.IFailWorkflowExecutionCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FailWorkflowExecutionCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FailWorkflowExecutionCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.FailWorkflowExecutionCommandAttributes; - - /** - * Decodes a FailWorkflowExecutionCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FailWorkflowExecutionCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.FailWorkflowExecutionCommandAttributes; - - /** - * Creates a FailWorkflowExecutionCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FailWorkflowExecutionCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.FailWorkflowExecutionCommandAttributes; - - /** - * Creates a plain object from a FailWorkflowExecutionCommandAttributes message. Also converts values to other types if specified. - * @param message FailWorkflowExecutionCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.FailWorkflowExecutionCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FailWorkflowExecutionCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FailWorkflowExecutionCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelTimerCommandAttributes. */ - interface ICancelTimerCommandAttributes { - - /** The same timer id from the start timer command */ - timerId?: (string|null); - } - - /** Represents a CancelTimerCommandAttributes. */ - class CancelTimerCommandAttributes implements ICancelTimerCommandAttributes { - - /** - * Constructs a new CancelTimerCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.ICancelTimerCommandAttributes); - - /** The same timer id from the start timer command */ - public timerId: string; - - /** - * Creates a new CancelTimerCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelTimerCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.ICancelTimerCommandAttributes): temporal.api.command.v1.CancelTimerCommandAttributes; - - /** - * Encodes the specified CancelTimerCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.CancelTimerCommandAttributes.verify|verify} messages. - * @param message CancelTimerCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.ICancelTimerCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelTimerCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.CancelTimerCommandAttributes.verify|verify} messages. - * @param message CancelTimerCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.ICancelTimerCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelTimerCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelTimerCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.CancelTimerCommandAttributes; - - /** - * Decodes a CancelTimerCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelTimerCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.CancelTimerCommandAttributes; - - /** - * Creates a CancelTimerCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelTimerCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.CancelTimerCommandAttributes; - - /** - * Creates a plain object from a CancelTimerCommandAttributes message. Also converts values to other types if specified. - * @param message CancelTimerCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.CancelTimerCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelTimerCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelTimerCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelWorkflowExecutionCommandAttributes. */ - interface ICancelWorkflowExecutionCommandAttributes { - - /** CancelWorkflowExecutionCommandAttributes details */ - details?: (temporal.api.common.v1.IPayloads|null); - } - - /** Represents a CancelWorkflowExecutionCommandAttributes. */ - class CancelWorkflowExecutionCommandAttributes implements ICancelWorkflowExecutionCommandAttributes { - - /** - * Constructs a new CancelWorkflowExecutionCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.ICancelWorkflowExecutionCommandAttributes); - - /** CancelWorkflowExecutionCommandAttributes details. */ - public details?: (temporal.api.common.v1.IPayloads|null); - - /** - * Creates a new CancelWorkflowExecutionCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelWorkflowExecutionCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.ICancelWorkflowExecutionCommandAttributes): temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes; - - /** - * Encodes the specified CancelWorkflowExecutionCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes.verify|verify} messages. - * @param message CancelWorkflowExecutionCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.ICancelWorkflowExecutionCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelWorkflowExecutionCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes.verify|verify} messages. - * @param message CancelWorkflowExecutionCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.ICancelWorkflowExecutionCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelWorkflowExecutionCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelWorkflowExecutionCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes; - - /** - * Decodes a CancelWorkflowExecutionCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelWorkflowExecutionCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes; - - /** - * Creates a CancelWorkflowExecutionCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelWorkflowExecutionCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes; - - /** - * Creates a plain object from a CancelWorkflowExecutionCommandAttributes message. Also converts values to other types if specified. - * @param message CancelWorkflowExecutionCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelWorkflowExecutionCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelWorkflowExecutionCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RequestCancelExternalWorkflowExecutionCommandAttributes. */ - interface IRequestCancelExternalWorkflowExecutionCommandAttributes { - - /** RequestCancelExternalWorkflowExecutionCommandAttributes namespace */ - namespace?: (string|null); - - /** RequestCancelExternalWorkflowExecutionCommandAttributes workflowId */ - workflowId?: (string|null); - - /** RequestCancelExternalWorkflowExecutionCommandAttributes runId */ - runId?: (string|null); - - /** Deprecated. */ - control?: (string|null); - - /** - * Set this to true if the workflow being cancelled is a child of the workflow originating this - * command. The request will be rejected if it is set to true and the target workflow is *not* - * a child of the requesting workflow. - */ - childWorkflowOnly?: (boolean|null); - - /** Reason for requesting the cancellation */ - reason?: (string|null); - } - - /** Represents a RequestCancelExternalWorkflowExecutionCommandAttributes. */ - class RequestCancelExternalWorkflowExecutionCommandAttributes implements IRequestCancelExternalWorkflowExecutionCommandAttributes { - - /** - * Constructs a new RequestCancelExternalWorkflowExecutionCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.IRequestCancelExternalWorkflowExecutionCommandAttributes); - - /** RequestCancelExternalWorkflowExecutionCommandAttributes namespace. */ - public namespace: string; - - /** RequestCancelExternalWorkflowExecutionCommandAttributes workflowId. */ - public workflowId: string; - - /** RequestCancelExternalWorkflowExecutionCommandAttributes runId. */ - public runId: string; - - /** Deprecated. */ - public control: string; - - /** - * Set this to true if the workflow being cancelled is a child of the workflow originating this - * command. The request will be rejected if it is set to true and the target workflow is *not* - * a child of the requesting workflow. - */ - public childWorkflowOnly: boolean; - - /** Reason for requesting the cancellation */ - public reason: string; - - /** - * Creates a new RequestCancelExternalWorkflowExecutionCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestCancelExternalWorkflowExecutionCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.IRequestCancelExternalWorkflowExecutionCommandAttributes): temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes; - - /** - * Encodes the specified RequestCancelExternalWorkflowExecutionCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes.verify|verify} messages. - * @param message RequestCancelExternalWorkflowExecutionCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.IRequestCancelExternalWorkflowExecutionCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCancelExternalWorkflowExecutionCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes.verify|verify} messages. - * @param message RequestCancelExternalWorkflowExecutionCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.IRequestCancelExternalWorkflowExecutionCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestCancelExternalWorkflowExecutionCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestCancelExternalWorkflowExecutionCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes; - - /** - * Decodes a RequestCancelExternalWorkflowExecutionCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestCancelExternalWorkflowExecutionCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes; - - /** - * Creates a RequestCancelExternalWorkflowExecutionCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCancelExternalWorkflowExecutionCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes; - - /** - * Creates a plain object from a RequestCancelExternalWorkflowExecutionCommandAttributes message. Also converts values to other types if specified. - * @param message RequestCancelExternalWorkflowExecutionCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCancelExternalWorkflowExecutionCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestCancelExternalWorkflowExecutionCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SignalExternalWorkflowExecutionCommandAttributes. */ - interface ISignalExternalWorkflowExecutionCommandAttributes { - - /** SignalExternalWorkflowExecutionCommandAttributes namespace */ - namespace?: (string|null); - - /** SignalExternalWorkflowExecutionCommandAttributes execution */ - execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The workflow author-defined name of the signal to send to the workflow. */ - signalName?: (string|null); - - /** Serialized value(s) to provide with the signal. */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** Deprecated */ - control?: (string|null); - - /** - * Set this to true if the workflow being cancelled is a child of the workflow originating this - * command. The request will be rejected if it is set to true and the target workflow is *not* - * a child of the requesting workflow. - */ - childWorkflowOnly?: (boolean|null); - - /** - * Headers that are passed by the workflow that is sending a signal to the external - * workflow that is receiving this signal. - */ - header?: (temporal.api.common.v1.IHeader|null); - } - - /** Represents a SignalExternalWorkflowExecutionCommandAttributes. */ - class SignalExternalWorkflowExecutionCommandAttributes implements ISignalExternalWorkflowExecutionCommandAttributes { - - /** - * Constructs a new SignalExternalWorkflowExecutionCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.ISignalExternalWorkflowExecutionCommandAttributes); - - /** SignalExternalWorkflowExecutionCommandAttributes namespace. */ - public namespace: string; - - /** SignalExternalWorkflowExecutionCommandAttributes execution. */ - public execution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** The workflow author-defined name of the signal to send to the workflow. */ - public signalName: string; - - /** Serialized value(s) to provide with the signal. */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** Deprecated */ - public control: string; - - /** - * Set this to true if the workflow being cancelled is a child of the workflow originating this - * command. The request will be rejected if it is set to true and the target workflow is *not* - * a child of the requesting workflow. - */ - public childWorkflowOnly: boolean; - - /** - * Headers that are passed by the workflow that is sending a signal to the external - * workflow that is receiving this signal. - */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** - * Creates a new SignalExternalWorkflowExecutionCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns SignalExternalWorkflowExecutionCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.ISignalExternalWorkflowExecutionCommandAttributes): temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes; - - /** - * Encodes the specified SignalExternalWorkflowExecutionCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes.verify|verify} messages. - * @param message SignalExternalWorkflowExecutionCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.ISignalExternalWorkflowExecutionCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignalExternalWorkflowExecutionCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes.verify|verify} messages. - * @param message SignalExternalWorkflowExecutionCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.ISignalExternalWorkflowExecutionCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignalExternalWorkflowExecutionCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignalExternalWorkflowExecutionCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes; - - /** - * Decodes a SignalExternalWorkflowExecutionCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignalExternalWorkflowExecutionCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes; - - /** - * Creates a SignalExternalWorkflowExecutionCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignalExternalWorkflowExecutionCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes; - - /** - * Creates a plain object from a SignalExternalWorkflowExecutionCommandAttributes message. Also converts values to other types if specified. - * @param message SignalExternalWorkflowExecutionCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignalExternalWorkflowExecutionCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SignalExternalWorkflowExecutionCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpsertWorkflowSearchAttributesCommandAttributes. */ - interface IUpsertWorkflowSearchAttributesCommandAttributes { - - /** UpsertWorkflowSearchAttributesCommandAttributes searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - } - - /** Represents an UpsertWorkflowSearchAttributesCommandAttributes. */ - class UpsertWorkflowSearchAttributesCommandAttributes implements IUpsertWorkflowSearchAttributesCommandAttributes { - - /** - * Constructs a new UpsertWorkflowSearchAttributesCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.IUpsertWorkflowSearchAttributesCommandAttributes); - - /** UpsertWorkflowSearchAttributesCommandAttributes searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * Creates a new UpsertWorkflowSearchAttributesCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns UpsertWorkflowSearchAttributesCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.IUpsertWorkflowSearchAttributesCommandAttributes): temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes; - - /** - * Encodes the specified UpsertWorkflowSearchAttributesCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes.verify|verify} messages. - * @param message UpsertWorkflowSearchAttributesCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.IUpsertWorkflowSearchAttributesCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpsertWorkflowSearchAttributesCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes.verify|verify} messages. - * @param message UpsertWorkflowSearchAttributesCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.IUpsertWorkflowSearchAttributesCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpsertWorkflowSearchAttributesCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpsertWorkflowSearchAttributesCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes; - - /** - * Decodes an UpsertWorkflowSearchAttributesCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpsertWorkflowSearchAttributesCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes; - - /** - * Creates an UpsertWorkflowSearchAttributesCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpsertWorkflowSearchAttributesCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes; - - /** - * Creates a plain object from an UpsertWorkflowSearchAttributesCommandAttributes message. Also converts values to other types if specified. - * @param message UpsertWorkflowSearchAttributesCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpsertWorkflowSearchAttributesCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpsertWorkflowSearchAttributesCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ModifyWorkflowPropertiesCommandAttributes. */ - interface IModifyWorkflowPropertiesCommandAttributes { - - /** - * If set, update the workflow memo with the provided values. The values will be merged with - * the existing memo. If the user wants to delete values, a default/empty Payload should be - * used as the value for the key being deleted. - */ - upsertedMemo?: (temporal.api.common.v1.IMemo|null); - } - - /** Represents a ModifyWorkflowPropertiesCommandAttributes. */ - class ModifyWorkflowPropertiesCommandAttributes implements IModifyWorkflowPropertiesCommandAttributes { - - /** - * Constructs a new ModifyWorkflowPropertiesCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.IModifyWorkflowPropertiesCommandAttributes); - - /** - * If set, update the workflow memo with the provided values. The values will be merged with - * the existing memo. If the user wants to delete values, a default/empty Payload should be - * used as the value for the key being deleted. - */ - public upsertedMemo?: (temporal.api.common.v1.IMemo|null); - - /** - * Creates a new ModifyWorkflowPropertiesCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ModifyWorkflowPropertiesCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.IModifyWorkflowPropertiesCommandAttributes): temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributes; - - /** - * Encodes the specified ModifyWorkflowPropertiesCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributes.verify|verify} messages. - * @param message ModifyWorkflowPropertiesCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.IModifyWorkflowPropertiesCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModifyWorkflowPropertiesCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributes.verify|verify} messages. - * @param message ModifyWorkflowPropertiesCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.IModifyWorkflowPropertiesCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModifyWorkflowPropertiesCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ModifyWorkflowPropertiesCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributes; - - /** - * Decodes a ModifyWorkflowPropertiesCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModifyWorkflowPropertiesCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributes; - - /** - * Creates a ModifyWorkflowPropertiesCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModifyWorkflowPropertiesCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributes; - - /** - * Creates a plain object from a ModifyWorkflowPropertiesCommandAttributes message. Also converts values to other types if specified. - * @param message ModifyWorkflowPropertiesCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModifyWorkflowPropertiesCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ModifyWorkflowPropertiesCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RecordMarkerCommandAttributes. */ - interface IRecordMarkerCommandAttributes { - - /** RecordMarkerCommandAttributes markerName */ - markerName?: (string|null); - - /** RecordMarkerCommandAttributes details */ - details?: ({ [k: string]: temporal.api.common.v1.IPayloads }|null); - - /** RecordMarkerCommandAttributes header */ - header?: (temporal.api.common.v1.IHeader|null); - - /** RecordMarkerCommandAttributes failure */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** Represents a RecordMarkerCommandAttributes. */ - class RecordMarkerCommandAttributes implements IRecordMarkerCommandAttributes { - - /** - * Constructs a new RecordMarkerCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.IRecordMarkerCommandAttributes); - - /** RecordMarkerCommandAttributes markerName. */ - public markerName: string; - - /** RecordMarkerCommandAttributes details. */ - public details: { [k: string]: temporal.api.common.v1.IPayloads }; - - /** RecordMarkerCommandAttributes header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** RecordMarkerCommandAttributes failure. */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new RecordMarkerCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns RecordMarkerCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.IRecordMarkerCommandAttributes): temporal.api.command.v1.RecordMarkerCommandAttributes; - - /** - * Encodes the specified RecordMarkerCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.RecordMarkerCommandAttributes.verify|verify} messages. - * @param message RecordMarkerCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.IRecordMarkerCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecordMarkerCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.RecordMarkerCommandAttributes.verify|verify} messages. - * @param message RecordMarkerCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.IRecordMarkerCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecordMarkerCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecordMarkerCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.RecordMarkerCommandAttributes; - - /** - * Decodes a RecordMarkerCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecordMarkerCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.RecordMarkerCommandAttributes; - - /** - * Creates a RecordMarkerCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecordMarkerCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.RecordMarkerCommandAttributes; - - /** - * Creates a plain object from a RecordMarkerCommandAttributes message. Also converts values to other types if specified. - * @param message RecordMarkerCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.RecordMarkerCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecordMarkerCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RecordMarkerCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ContinueAsNewWorkflowExecutionCommandAttributes. */ - interface IContinueAsNewWorkflowExecutionCommandAttributes { - - /** ContinueAsNewWorkflowExecutionCommandAttributes workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** ContinueAsNewWorkflowExecutionCommandAttributes taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** ContinueAsNewWorkflowExecutionCommandAttributes input */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** Timeout of a single workflow run. */ - workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** How long the workflow start will be delayed - not really a "backoff" in the traditional sense. */ - backoffStartInterval?: (google.protobuf.IDuration|null); - - /** ContinueAsNewWorkflowExecutionCommandAttributes retryPolicy */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Should be removed */ - initiator?: (temporal.api.enums.v1.ContinueAsNewInitiator|null); - - /** Should be removed */ - failure?: (temporal.api.failure.v1.IFailure|null); - - /** Should be removed */ - lastCompletionResult?: (temporal.api.common.v1.IPayloads|null); - - /** Should be removed. Not necessarily unused but unclear and not exposed by SDKs. */ - cronSchedule?: (string|null); - - /** ContinueAsNewWorkflowExecutionCommandAttributes header */ - header?: (temporal.api.common.v1.IHeader|null); - - /** ContinueAsNewWorkflowExecutionCommandAttributes memo */ - memo?: (temporal.api.common.v1.IMemo|null); - - /** ContinueAsNewWorkflowExecutionCommandAttributes searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * If this is set, the new execution inherits the Build ID of the current execution. Otherwise, - * the assignment rules will be used to independently assign a Build ID to the new execution. - * Deprecated. Only considered for versioning v0.2. - */ - inheritBuildId?: (boolean|null); - - /** - * Experimental. Optionally decide the versioning behavior that the first task of the new run should use. - * For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version - * of the previous run. - */ - initialVersioningBehavior?: (temporal.api.enums.v1.ContinueAsNewVersioningBehavior|null); - } - - /** Represents a ContinueAsNewWorkflowExecutionCommandAttributes. */ - class ContinueAsNewWorkflowExecutionCommandAttributes implements IContinueAsNewWorkflowExecutionCommandAttributes { - - /** - * Constructs a new ContinueAsNewWorkflowExecutionCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.IContinueAsNewWorkflowExecutionCommandAttributes); - - /** ContinueAsNewWorkflowExecutionCommandAttributes workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** ContinueAsNewWorkflowExecutionCommandAttributes taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** ContinueAsNewWorkflowExecutionCommandAttributes input. */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** Timeout of a single workflow run. */ - public workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - public workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** How long the workflow start will be delayed - not really a "backoff" in the traditional sense. */ - public backoffStartInterval?: (google.protobuf.IDuration|null); - - /** ContinueAsNewWorkflowExecutionCommandAttributes retryPolicy. */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Should be removed */ - public initiator: temporal.api.enums.v1.ContinueAsNewInitiator; - - /** Should be removed */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** Should be removed */ - public lastCompletionResult?: (temporal.api.common.v1.IPayloads|null); - - /** Should be removed. Not necessarily unused but unclear and not exposed by SDKs. */ - public cronSchedule: string; - - /** ContinueAsNewWorkflowExecutionCommandAttributes header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** ContinueAsNewWorkflowExecutionCommandAttributes memo. */ - public memo?: (temporal.api.common.v1.IMemo|null); - - /** ContinueAsNewWorkflowExecutionCommandAttributes searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * If this is set, the new execution inherits the Build ID of the current execution. Otherwise, - * the assignment rules will be used to independently assign a Build ID to the new execution. - * Deprecated. Only considered for versioning v0.2. - */ - public inheritBuildId: boolean; - - /** - * Experimental. Optionally decide the versioning behavior that the first task of the new run should use. - * For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version - * of the previous run. - */ - public initialVersioningBehavior: temporal.api.enums.v1.ContinueAsNewVersioningBehavior; - - /** - * Creates a new ContinueAsNewWorkflowExecutionCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ContinueAsNewWorkflowExecutionCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.IContinueAsNewWorkflowExecutionCommandAttributes): temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes; - - /** - * Encodes the specified ContinueAsNewWorkflowExecutionCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes.verify|verify} messages. - * @param message ContinueAsNewWorkflowExecutionCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.IContinueAsNewWorkflowExecutionCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContinueAsNewWorkflowExecutionCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes.verify|verify} messages. - * @param message ContinueAsNewWorkflowExecutionCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.IContinueAsNewWorkflowExecutionCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContinueAsNewWorkflowExecutionCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContinueAsNewWorkflowExecutionCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes; - - /** - * Decodes a ContinueAsNewWorkflowExecutionCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContinueAsNewWorkflowExecutionCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes; - - /** - * Creates a ContinueAsNewWorkflowExecutionCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContinueAsNewWorkflowExecutionCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes; - - /** - * Creates a plain object from a ContinueAsNewWorkflowExecutionCommandAttributes message. Also converts values to other types if specified. - * @param message ContinueAsNewWorkflowExecutionCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContinueAsNewWorkflowExecutionCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ContinueAsNewWorkflowExecutionCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartChildWorkflowExecutionCommandAttributes. */ - interface IStartChildWorkflowExecutionCommandAttributes { - - /** StartChildWorkflowExecutionCommandAttributes namespace */ - namespace?: (string|null); - - /** StartChildWorkflowExecutionCommandAttributes workflowId */ - workflowId?: (string|null); - - /** StartChildWorkflowExecutionCommandAttributes workflowType */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** StartChildWorkflowExecutionCommandAttributes taskQueue */ - taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** StartChildWorkflowExecutionCommandAttributes input */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** Total workflow execution timeout including retries and continue as new. */ - workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run. */ - workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** Default: PARENT_CLOSE_POLICY_TERMINATE. */ - parentClosePolicy?: (temporal.api.enums.v1.ParentClosePolicy|null); - - /** StartChildWorkflowExecutionCommandAttributes control */ - control?: (string|null); - - /** Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. */ - workflowIdReusePolicy?: (temporal.api.enums.v1.WorkflowIdReusePolicy|null); - - /** StartChildWorkflowExecutionCommandAttributes retryPolicy */ - retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Establish a cron schedule for the child workflow. */ - cronSchedule?: (string|null); - - /** StartChildWorkflowExecutionCommandAttributes header */ - header?: (temporal.api.common.v1.IHeader|null); - - /** StartChildWorkflowExecutionCommandAttributes memo */ - memo?: (temporal.api.common.v1.IMemo|null); - - /** StartChildWorkflowExecutionCommandAttributes searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment - * rules of the child's Task Queue will be used to independently assign a Build ID to it. - * Deprecated. Only considered for versioning v0.2. - */ - inheritBuildId?: (boolean|null); - - /** - * Priority metadata. If this message is not present, or any fields are not - * present, they inherit the values from the workflow. - */ - priority?: (temporal.api.common.v1.IPriority|null); - } - - /** Represents a StartChildWorkflowExecutionCommandAttributes. */ - class StartChildWorkflowExecutionCommandAttributes implements IStartChildWorkflowExecutionCommandAttributes { - - /** - * Constructs a new StartChildWorkflowExecutionCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.IStartChildWorkflowExecutionCommandAttributes); - - /** StartChildWorkflowExecutionCommandAttributes namespace. */ - public namespace: string; - - /** StartChildWorkflowExecutionCommandAttributes workflowId. */ - public workflowId: string; - - /** StartChildWorkflowExecutionCommandAttributes workflowType. */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** StartChildWorkflowExecutionCommandAttributes taskQueue. */ - public taskQueue?: (temporal.api.taskqueue.v1.ITaskQueue|null); - - /** StartChildWorkflowExecutionCommandAttributes input. */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** Total workflow execution timeout including retries and continue as new. */ - public workflowExecutionTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow run. */ - public workflowRunTimeout?: (google.protobuf.IDuration|null); - - /** Timeout of a single workflow task. */ - public workflowTaskTimeout?: (google.protobuf.IDuration|null); - - /** Default: PARENT_CLOSE_POLICY_TERMINATE. */ - public parentClosePolicy: temporal.api.enums.v1.ParentClosePolicy; - - /** StartChildWorkflowExecutionCommandAttributes control. */ - public control: string; - - /** Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. */ - public workflowIdReusePolicy: temporal.api.enums.v1.WorkflowIdReusePolicy; - - /** StartChildWorkflowExecutionCommandAttributes retryPolicy. */ - public retryPolicy?: (temporal.api.common.v1.IRetryPolicy|null); - - /** Establish a cron schedule for the child workflow. */ - public cronSchedule: string; - - /** StartChildWorkflowExecutionCommandAttributes header. */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** StartChildWorkflowExecutionCommandAttributes memo. */ - public memo?: (temporal.api.common.v1.IMemo|null); - - /** StartChildWorkflowExecutionCommandAttributes searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** - * If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment - * rules of the child's Task Queue will be used to independently assign a Build ID to it. - * Deprecated. Only considered for versioning v0.2. - */ - public inheritBuildId: boolean; - - /** - * Priority metadata. If this message is not present, or any fields are not - * present, they inherit the values from the workflow. - */ - public priority?: (temporal.api.common.v1.IPriority|null); - - /** - * Creates a new StartChildWorkflowExecutionCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns StartChildWorkflowExecutionCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.IStartChildWorkflowExecutionCommandAttributes): temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes; - - /** - * Encodes the specified StartChildWorkflowExecutionCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes.verify|verify} messages. - * @param message StartChildWorkflowExecutionCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.IStartChildWorkflowExecutionCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartChildWorkflowExecutionCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes.verify|verify} messages. - * @param message StartChildWorkflowExecutionCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.IStartChildWorkflowExecutionCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartChildWorkflowExecutionCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartChildWorkflowExecutionCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes; - - /** - * Decodes a StartChildWorkflowExecutionCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartChildWorkflowExecutionCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes; - - /** - * Creates a StartChildWorkflowExecutionCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartChildWorkflowExecutionCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes; - - /** - * Creates a plain object from a StartChildWorkflowExecutionCommandAttributes message. Also converts values to other types if specified. - * @param message StartChildWorkflowExecutionCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartChildWorkflowExecutionCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartChildWorkflowExecutionCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ProtocolMessageCommandAttributes. */ - interface IProtocolMessageCommandAttributes { - - /** The message ID of the message to which this command is a pointer. */ - messageId?: (string|null); - } - - /** Represents a ProtocolMessageCommandAttributes. */ - class ProtocolMessageCommandAttributes implements IProtocolMessageCommandAttributes { - - /** - * Constructs a new ProtocolMessageCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.IProtocolMessageCommandAttributes); - - /** The message ID of the message to which this command is a pointer. */ - public messageId: string; - - /** - * Creates a new ProtocolMessageCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ProtocolMessageCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.IProtocolMessageCommandAttributes): temporal.api.command.v1.ProtocolMessageCommandAttributes; - - /** - * Encodes the specified ProtocolMessageCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.ProtocolMessageCommandAttributes.verify|verify} messages. - * @param message ProtocolMessageCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.IProtocolMessageCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProtocolMessageCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.ProtocolMessageCommandAttributes.verify|verify} messages. - * @param message ProtocolMessageCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.IProtocolMessageCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProtocolMessageCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProtocolMessageCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.ProtocolMessageCommandAttributes; - - /** - * Decodes a ProtocolMessageCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProtocolMessageCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.ProtocolMessageCommandAttributes; - - /** - * Creates a ProtocolMessageCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProtocolMessageCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.ProtocolMessageCommandAttributes; - - /** - * Creates a plain object from a ProtocolMessageCommandAttributes message. Also converts values to other types if specified. - * @param message ProtocolMessageCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.ProtocolMessageCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProtocolMessageCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProtocolMessageCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScheduleNexusOperationCommandAttributes. */ - interface IScheduleNexusOperationCommandAttributes { - - /** Endpoint name, must exist in the endpoint registry or this command will fail. */ - endpoint?: (string|null); - - /** Service name. */ - service?: (string|null); - - /** Operation name. */ - operation?: (string|null); - - /** - * Input for the operation. The server converts this into Nexus request content and the appropriate content headers - * internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the - * content is transformed back to the original Payload sent in this command. - */ - input?: (temporal.api.common.v1.IPayload|null); - - /** - * Schedule-to-close timeout for this operation. - * Indicates how long the caller is willing to wait for operation completion. - * Calls are retried internally by the server. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Header to attach to the Nexus request. - * Users are responsible for encrypting sensitive data in this header as it is stored in workflow history and - * transmitted to external services as-is. - * This is useful for propagating tracing information. - * Note these headers are not the same as Temporal headers on internal activities and child workflows, these are - * transmitted to Nexus operations that may be external and are not traditional payloads. - */ - nexusHeader?: ({ [k: string]: string }|null); - - /** - * Schedule-to-start timeout for this operation. - * Indicates how long the caller is willing to wait for the operation to be started (or completed if synchronous) - * by the handler. If the operation is not started within this timeout, it will fail with - * TIMEOUT_TYPE_SCHEDULE_TO_START. - * If not set or zero, no schedule-to-start timeout is enforced. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - * Requires server version 1.31.0 or later. - */ - scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Start-to-close timeout for this operation. - * Indicates how long the caller is willing to wait for an asynchronous operation to complete after it has been - * started. If the operation does not complete within this timeout after starting, it will fail with - * TIMEOUT_TYPE_START_TO_CLOSE. - * Only applies to asynchronous operations. Synchronous operations ignore this timeout. - * If not set or zero, no start-to-close timeout is enforced. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - * Requires server version 1.31.0 or later. - */ - startToCloseTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a ScheduleNexusOperationCommandAttributes. */ - class ScheduleNexusOperationCommandAttributes implements IScheduleNexusOperationCommandAttributes { - - /** - * Constructs a new ScheduleNexusOperationCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.IScheduleNexusOperationCommandAttributes); - - /** Endpoint name, must exist in the endpoint registry or this command will fail. */ - public endpoint: string; - - /** Service name. */ - public service: string; - - /** Operation name. */ - public operation: string; - - /** - * Input for the operation. The server converts this into Nexus request content and the appropriate content headers - * internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the - * content is transformed back to the original Payload sent in this command. - */ - public input?: (temporal.api.common.v1.IPayload|null); - - /** - * Schedule-to-close timeout for this operation. - * Indicates how long the caller is willing to wait for operation completion. - * Calls are retried internally by the server. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - */ - public scheduleToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Header to attach to the Nexus request. - * Users are responsible for encrypting sensitive data in this header as it is stored in workflow history and - * transmitted to external services as-is. - * This is useful for propagating tracing information. - * Note these headers are not the same as Temporal headers on internal activities and child workflows, these are - * transmitted to Nexus operations that may be external and are not traditional payloads. - */ - public nexusHeader: { [k: string]: string }; - - /** - * Schedule-to-start timeout for this operation. - * Indicates how long the caller is willing to wait for the operation to be started (or completed if synchronous) - * by the handler. If the operation is not started within this timeout, it will fail with - * TIMEOUT_TYPE_SCHEDULE_TO_START. - * If not set or zero, no schedule-to-start timeout is enforced. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - * Requires server version 1.31.0 or later. - */ - public scheduleToStartTimeout?: (google.protobuf.IDuration|null); - - /** - * Start-to-close timeout for this operation. - * Indicates how long the caller is willing to wait for an asynchronous operation to complete after it has been - * started. If the operation does not complete within this timeout after starting, it will fail with - * TIMEOUT_TYPE_START_TO_CLOSE. - * Only applies to asynchronous operations. Synchronous operations ignore this timeout. - * If not set or zero, no start-to-close timeout is enforced. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: "to" is used to indicate interval. --) - * Requires server version 1.31.0 or later. - */ - public startToCloseTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new ScheduleNexusOperationCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns ScheduleNexusOperationCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.IScheduleNexusOperationCommandAttributes): temporal.api.command.v1.ScheduleNexusOperationCommandAttributes; - - /** - * Encodes the specified ScheduleNexusOperationCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.ScheduleNexusOperationCommandAttributes.verify|verify} messages. - * @param message ScheduleNexusOperationCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.IScheduleNexusOperationCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduleNexusOperationCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.ScheduleNexusOperationCommandAttributes.verify|verify} messages. - * @param message ScheduleNexusOperationCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.IScheduleNexusOperationCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduleNexusOperationCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduleNexusOperationCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.ScheduleNexusOperationCommandAttributes; - - /** - * Decodes a ScheduleNexusOperationCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduleNexusOperationCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.ScheduleNexusOperationCommandAttributes; - - /** - * Creates a ScheduleNexusOperationCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduleNexusOperationCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.ScheduleNexusOperationCommandAttributes; - - /** - * Creates a plain object from a ScheduleNexusOperationCommandAttributes message. Also converts values to other types if specified. - * @param message ScheduleNexusOperationCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.ScheduleNexusOperationCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduleNexusOperationCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScheduleNexusOperationCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RequestCancelNexusOperationCommandAttributes. */ - interface IRequestCancelNexusOperationCommandAttributes { - - /** - * The `NEXUS_OPERATION_SCHEDULED` event ID (a unique identifier) for the operation to be canceled. - * The operation may ignore cancellation and end up with any completion state. - */ - scheduledEventId?: (Long|null); - } - - /** Represents a RequestCancelNexusOperationCommandAttributes. */ - class RequestCancelNexusOperationCommandAttributes implements IRequestCancelNexusOperationCommandAttributes { - - /** - * Constructs a new RequestCancelNexusOperationCommandAttributes. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.IRequestCancelNexusOperationCommandAttributes); - - /** - * The `NEXUS_OPERATION_SCHEDULED` event ID (a unique identifier) for the operation to be canceled. - * The operation may ignore cancellation and end up with any completion state. - */ - public scheduledEventId: Long; - - /** - * Creates a new RequestCancelNexusOperationCommandAttributes instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestCancelNexusOperationCommandAttributes instance - */ - public static create(properties?: temporal.api.command.v1.IRequestCancelNexusOperationCommandAttributes): temporal.api.command.v1.RequestCancelNexusOperationCommandAttributes; - - /** - * Encodes the specified RequestCancelNexusOperationCommandAttributes message. Does not implicitly {@link temporal.api.command.v1.RequestCancelNexusOperationCommandAttributes.verify|verify} messages. - * @param message RequestCancelNexusOperationCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.IRequestCancelNexusOperationCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCancelNexusOperationCommandAttributes message, length delimited. Does not implicitly {@link temporal.api.command.v1.RequestCancelNexusOperationCommandAttributes.verify|verify} messages. - * @param message RequestCancelNexusOperationCommandAttributes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.IRequestCancelNexusOperationCommandAttributes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestCancelNexusOperationCommandAttributes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestCancelNexusOperationCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.RequestCancelNexusOperationCommandAttributes; - - /** - * Decodes a RequestCancelNexusOperationCommandAttributes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestCancelNexusOperationCommandAttributes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.RequestCancelNexusOperationCommandAttributes; - - /** - * Creates a RequestCancelNexusOperationCommandAttributes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCancelNexusOperationCommandAttributes - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.RequestCancelNexusOperationCommandAttributes; - - /** - * Creates a plain object from a RequestCancelNexusOperationCommandAttributes message. Also converts values to other types if specified. - * @param message RequestCancelNexusOperationCommandAttributes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.RequestCancelNexusOperationCommandAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCancelNexusOperationCommandAttributes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestCancelNexusOperationCommandAttributes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Command. */ - interface ICommand { - - /** Command commandType */ - commandType?: (temporal.api.enums.v1.CommandType|null); - - /** - * Metadata on the command. This is sometimes carried over to the history event if one is - * created as a result of the command. Most commands won't have this information, and how this - * information is used is dependent upon the interface that reads it. - * - * Current well-known uses: - * start_child_workflow_execution_command_attributes - populates - * temporal.api.workflow.v1.WorkflowExecutionInfo.user_metadata where the summary and details - * are used by user interfaces to show fixed as-of-start workflow summary and details. - * start_timer_command_attributes - populates temporal.api.history.v1.HistoryEvent for timer - * started where the summary is used to identify the timer. - */ - userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** Command scheduleActivityTaskCommandAttributes */ - scheduleActivityTaskCommandAttributes?: (temporal.api.command.v1.IScheduleActivityTaskCommandAttributes|null); - - /** Command startTimerCommandAttributes */ - startTimerCommandAttributes?: (temporal.api.command.v1.IStartTimerCommandAttributes|null); - - /** Command completeWorkflowExecutionCommandAttributes */ - completeWorkflowExecutionCommandAttributes?: (temporal.api.command.v1.ICompleteWorkflowExecutionCommandAttributes|null); - - /** Command failWorkflowExecutionCommandAttributes */ - failWorkflowExecutionCommandAttributes?: (temporal.api.command.v1.IFailWorkflowExecutionCommandAttributes|null); - - /** Command requestCancelActivityTaskCommandAttributes */ - requestCancelActivityTaskCommandAttributes?: (temporal.api.command.v1.IRequestCancelActivityTaskCommandAttributes|null); - - /** Command cancelTimerCommandAttributes */ - cancelTimerCommandAttributes?: (temporal.api.command.v1.ICancelTimerCommandAttributes|null); - - /** Command cancelWorkflowExecutionCommandAttributes */ - cancelWorkflowExecutionCommandAttributes?: (temporal.api.command.v1.ICancelWorkflowExecutionCommandAttributes|null); - - /** Command requestCancelExternalWorkflowExecutionCommandAttributes */ - requestCancelExternalWorkflowExecutionCommandAttributes?: (temporal.api.command.v1.IRequestCancelExternalWorkflowExecutionCommandAttributes|null); - - /** Command recordMarkerCommandAttributes */ - recordMarkerCommandAttributes?: (temporal.api.command.v1.IRecordMarkerCommandAttributes|null); - - /** Command continueAsNewWorkflowExecutionCommandAttributes */ - continueAsNewWorkflowExecutionCommandAttributes?: (temporal.api.command.v1.IContinueAsNewWorkflowExecutionCommandAttributes|null); - - /** Command startChildWorkflowExecutionCommandAttributes */ - startChildWorkflowExecutionCommandAttributes?: (temporal.api.command.v1.IStartChildWorkflowExecutionCommandAttributes|null); - - /** Command signalExternalWorkflowExecutionCommandAttributes */ - signalExternalWorkflowExecutionCommandAttributes?: (temporal.api.command.v1.ISignalExternalWorkflowExecutionCommandAttributes|null); - - /** Command upsertWorkflowSearchAttributesCommandAttributes */ - upsertWorkflowSearchAttributesCommandAttributes?: (temporal.api.command.v1.IUpsertWorkflowSearchAttributesCommandAttributes|null); - - /** Command protocolMessageCommandAttributes */ - protocolMessageCommandAttributes?: (temporal.api.command.v1.IProtocolMessageCommandAttributes|null); - - /** 16 is available for use - it was used as part of a prototype that never made it into a release */ - modifyWorkflowPropertiesCommandAttributes?: (temporal.api.command.v1.IModifyWorkflowPropertiesCommandAttributes|null); - - /** Command scheduleNexusOperationCommandAttributes */ - scheduleNexusOperationCommandAttributes?: (temporal.api.command.v1.IScheduleNexusOperationCommandAttributes|null); - - /** Command requestCancelNexusOperationCommandAttributes */ - requestCancelNexusOperationCommandAttributes?: (temporal.api.command.v1.IRequestCancelNexusOperationCommandAttributes|null); - } - - /** Represents a Command. */ - class Command implements ICommand { - - /** - * Constructs a new Command. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.command.v1.ICommand); - - /** Command commandType. */ - public commandType: temporal.api.enums.v1.CommandType; - - /** - * Metadata on the command. This is sometimes carried over to the history event if one is - * created as a result of the command. Most commands won't have this information, and how this - * information is used is dependent upon the interface that reads it. - * - * Current well-known uses: - * * start_child_workflow_execution_command_attributes - populates - * temporal.api.workflow.v1.WorkflowExecutionInfo.user_metadata where the summary and details - * are used by user interfaces to show fixed as-of-start workflow summary and details. - * * start_timer_command_attributes - populates temporal.api.history.v1.HistoryEvent for timer - * started where the summary is used to identify the timer. - */ - public userMetadata?: (temporal.api.sdk.v1.IUserMetadata|null); - - /** Command scheduleActivityTaskCommandAttributes. */ - public scheduleActivityTaskCommandAttributes?: (temporal.api.command.v1.IScheduleActivityTaskCommandAttributes|null); - - /** Command startTimerCommandAttributes. */ - public startTimerCommandAttributes?: (temporal.api.command.v1.IStartTimerCommandAttributes|null); - - /** Command completeWorkflowExecutionCommandAttributes. */ - public completeWorkflowExecutionCommandAttributes?: (temporal.api.command.v1.ICompleteWorkflowExecutionCommandAttributes|null); - - /** Command failWorkflowExecutionCommandAttributes. */ - public failWorkflowExecutionCommandAttributes?: (temporal.api.command.v1.IFailWorkflowExecutionCommandAttributes|null); - - /** Command requestCancelActivityTaskCommandAttributes. */ - public requestCancelActivityTaskCommandAttributes?: (temporal.api.command.v1.IRequestCancelActivityTaskCommandAttributes|null); - - /** Command cancelTimerCommandAttributes. */ - public cancelTimerCommandAttributes?: (temporal.api.command.v1.ICancelTimerCommandAttributes|null); - - /** Command cancelWorkflowExecutionCommandAttributes. */ - public cancelWorkflowExecutionCommandAttributes?: (temporal.api.command.v1.ICancelWorkflowExecutionCommandAttributes|null); - - /** Command requestCancelExternalWorkflowExecutionCommandAttributes. */ - public requestCancelExternalWorkflowExecutionCommandAttributes?: (temporal.api.command.v1.IRequestCancelExternalWorkflowExecutionCommandAttributes|null); - - /** Command recordMarkerCommandAttributes. */ - public recordMarkerCommandAttributes?: (temporal.api.command.v1.IRecordMarkerCommandAttributes|null); - - /** Command continueAsNewWorkflowExecutionCommandAttributes. */ - public continueAsNewWorkflowExecutionCommandAttributes?: (temporal.api.command.v1.IContinueAsNewWorkflowExecutionCommandAttributes|null); - - /** Command startChildWorkflowExecutionCommandAttributes. */ - public startChildWorkflowExecutionCommandAttributes?: (temporal.api.command.v1.IStartChildWorkflowExecutionCommandAttributes|null); - - /** Command signalExternalWorkflowExecutionCommandAttributes. */ - public signalExternalWorkflowExecutionCommandAttributes?: (temporal.api.command.v1.ISignalExternalWorkflowExecutionCommandAttributes|null); - - /** Command upsertWorkflowSearchAttributesCommandAttributes. */ - public upsertWorkflowSearchAttributesCommandAttributes?: (temporal.api.command.v1.IUpsertWorkflowSearchAttributesCommandAttributes|null); - - /** Command protocolMessageCommandAttributes. */ - public protocolMessageCommandAttributes?: (temporal.api.command.v1.IProtocolMessageCommandAttributes|null); - - /** 16 is available for use - it was used as part of a prototype that never made it into a release */ - public modifyWorkflowPropertiesCommandAttributes?: (temporal.api.command.v1.IModifyWorkflowPropertiesCommandAttributes|null); - - /** Command scheduleNexusOperationCommandAttributes. */ - public scheduleNexusOperationCommandAttributes?: (temporal.api.command.v1.IScheduleNexusOperationCommandAttributes|null); - - /** Command requestCancelNexusOperationCommandAttributes. */ - public requestCancelNexusOperationCommandAttributes?: (temporal.api.command.v1.IRequestCancelNexusOperationCommandAttributes|null); - - /** The command details. The type must match that in `command_type`. */ - public attributes?: ("scheduleActivityTaskCommandAttributes"|"startTimerCommandAttributes"|"completeWorkflowExecutionCommandAttributes"|"failWorkflowExecutionCommandAttributes"|"requestCancelActivityTaskCommandAttributes"|"cancelTimerCommandAttributes"|"cancelWorkflowExecutionCommandAttributes"|"requestCancelExternalWorkflowExecutionCommandAttributes"|"recordMarkerCommandAttributes"|"continueAsNewWorkflowExecutionCommandAttributes"|"startChildWorkflowExecutionCommandAttributes"|"signalExternalWorkflowExecutionCommandAttributes"|"upsertWorkflowSearchAttributesCommandAttributes"|"protocolMessageCommandAttributes"|"modifyWorkflowPropertiesCommandAttributes"|"scheduleNexusOperationCommandAttributes"|"requestCancelNexusOperationCommandAttributes"); - - /** - * Creates a new Command instance using the specified properties. - * @param [properties] Properties to set - * @returns Command instance - */ - public static create(properties?: temporal.api.command.v1.ICommand): temporal.api.command.v1.Command; - - /** - * Encodes the specified Command message. Does not implicitly {@link temporal.api.command.v1.Command.verify|verify} messages. - * @param message Command message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.command.v1.ICommand, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Command message, length delimited. Does not implicitly {@link temporal.api.command.v1.Command.verify|verify} messages. - * @param message Command message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.command.v1.ICommand, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Command message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Command - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.command.v1.Command; - - /** - * Decodes a Command message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Command - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.command.v1.Command; - - /** - * Creates a Command message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Command - */ - public static fromObject(object: { [k: string]: any }): temporal.api.command.v1.Command; - - /** - * Creates a plain object from a Command message. Also converts values to other types if specified. - * @param message Command - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.command.v1.Command, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Command to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Command - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace filter. */ - namespace filter { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a WorkflowExecutionFilter. */ - interface IWorkflowExecutionFilter { - - /** WorkflowExecutionFilter workflowId */ - workflowId?: (string|null); - - /** WorkflowExecutionFilter runId */ - runId?: (string|null); - } - - /** Represents a WorkflowExecutionFilter. */ - class WorkflowExecutionFilter implements IWorkflowExecutionFilter { - - /** - * Constructs a new WorkflowExecutionFilter. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.filter.v1.IWorkflowExecutionFilter); - - /** WorkflowExecutionFilter workflowId. */ - public workflowId: string; - - /** WorkflowExecutionFilter runId. */ - public runId: string; - - /** - * Creates a new WorkflowExecutionFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionFilter instance - */ - public static create(properties?: temporal.api.filter.v1.IWorkflowExecutionFilter): temporal.api.filter.v1.WorkflowExecutionFilter; - - /** - * Encodes the specified WorkflowExecutionFilter message. Does not implicitly {@link temporal.api.filter.v1.WorkflowExecutionFilter.verify|verify} messages. - * @param message WorkflowExecutionFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.filter.v1.IWorkflowExecutionFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionFilter message, length delimited. Does not implicitly {@link temporal.api.filter.v1.WorkflowExecutionFilter.verify|verify} messages. - * @param message WorkflowExecutionFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.filter.v1.IWorkflowExecutionFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.filter.v1.WorkflowExecutionFilter; - - /** - * Decodes a WorkflowExecutionFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.filter.v1.WorkflowExecutionFilter; - - /** - * Creates a WorkflowExecutionFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionFilter - */ - public static fromObject(object: { [k: string]: any }): temporal.api.filter.v1.WorkflowExecutionFilter; - - /** - * Creates a plain object from a WorkflowExecutionFilter message. Also converts values to other types if specified. - * @param message WorkflowExecutionFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.filter.v1.WorkflowExecutionFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowTypeFilter. */ - interface IWorkflowTypeFilter { - - /** WorkflowTypeFilter name */ - name?: (string|null); - } - - /** Represents a WorkflowTypeFilter. */ - class WorkflowTypeFilter implements IWorkflowTypeFilter { - - /** - * Constructs a new WorkflowTypeFilter. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.filter.v1.IWorkflowTypeFilter); - - /** WorkflowTypeFilter name. */ - public name: string; - - /** - * Creates a new WorkflowTypeFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowTypeFilter instance - */ - public static create(properties?: temporal.api.filter.v1.IWorkflowTypeFilter): temporal.api.filter.v1.WorkflowTypeFilter; - - /** - * Encodes the specified WorkflowTypeFilter message. Does not implicitly {@link temporal.api.filter.v1.WorkflowTypeFilter.verify|verify} messages. - * @param message WorkflowTypeFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.filter.v1.IWorkflowTypeFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowTypeFilter message, length delimited. Does not implicitly {@link temporal.api.filter.v1.WorkflowTypeFilter.verify|verify} messages. - * @param message WorkflowTypeFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.filter.v1.IWorkflowTypeFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowTypeFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowTypeFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.filter.v1.WorkflowTypeFilter; - - /** - * Decodes a WorkflowTypeFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowTypeFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.filter.v1.WorkflowTypeFilter; - - /** - * Creates a WorkflowTypeFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowTypeFilter - */ - public static fromObject(object: { [k: string]: any }): temporal.api.filter.v1.WorkflowTypeFilter; - - /** - * Creates a plain object from a WorkflowTypeFilter message. Also converts values to other types if specified. - * @param message WorkflowTypeFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.filter.v1.WorkflowTypeFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowTypeFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowTypeFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartTimeFilter. */ - interface IStartTimeFilter { - - /** StartTimeFilter earliestTime */ - earliestTime?: (google.protobuf.ITimestamp|null); - - /** StartTimeFilter latestTime */ - latestTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a StartTimeFilter. */ - class StartTimeFilter implements IStartTimeFilter { - - /** - * Constructs a new StartTimeFilter. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.filter.v1.IStartTimeFilter); - - /** StartTimeFilter earliestTime. */ - public earliestTime?: (google.protobuf.ITimestamp|null); - - /** StartTimeFilter latestTime. */ - public latestTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new StartTimeFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns StartTimeFilter instance - */ - public static create(properties?: temporal.api.filter.v1.IStartTimeFilter): temporal.api.filter.v1.StartTimeFilter; - - /** - * Encodes the specified StartTimeFilter message. Does not implicitly {@link temporal.api.filter.v1.StartTimeFilter.verify|verify} messages. - * @param message StartTimeFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.filter.v1.IStartTimeFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartTimeFilter message, length delimited. Does not implicitly {@link temporal.api.filter.v1.StartTimeFilter.verify|verify} messages. - * @param message StartTimeFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.filter.v1.IStartTimeFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartTimeFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartTimeFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.filter.v1.StartTimeFilter; - - /** - * Decodes a StartTimeFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartTimeFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.filter.v1.StartTimeFilter; - - /** - * Creates a StartTimeFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartTimeFilter - */ - public static fromObject(object: { [k: string]: any }): temporal.api.filter.v1.StartTimeFilter; - - /** - * Creates a plain object from a StartTimeFilter message. Also converts values to other types if specified. - * @param message StartTimeFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.filter.v1.StartTimeFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartTimeFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartTimeFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StatusFilter. */ - interface IStatusFilter { - - /** StatusFilter status */ - status?: (temporal.api.enums.v1.WorkflowExecutionStatus|null); - } - - /** Represents a StatusFilter. */ - class StatusFilter implements IStatusFilter { - - /** - * Constructs a new StatusFilter. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.filter.v1.IStatusFilter); - - /** StatusFilter status. */ - public status: temporal.api.enums.v1.WorkflowExecutionStatus; - - /** - * Creates a new StatusFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns StatusFilter instance - */ - public static create(properties?: temporal.api.filter.v1.IStatusFilter): temporal.api.filter.v1.StatusFilter; - - /** - * Encodes the specified StatusFilter message. Does not implicitly {@link temporal.api.filter.v1.StatusFilter.verify|verify} messages. - * @param message StatusFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.filter.v1.IStatusFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StatusFilter message, length delimited. Does not implicitly {@link temporal.api.filter.v1.StatusFilter.verify|verify} messages. - * @param message StatusFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.filter.v1.IStatusFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StatusFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StatusFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.filter.v1.StatusFilter; - - /** - * Decodes a StatusFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StatusFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.filter.v1.StatusFilter; - - /** - * Creates a StatusFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StatusFilter - */ - public static fromObject(object: { [k: string]: any }): temporal.api.filter.v1.StatusFilter; - - /** - * Creates a plain object from a StatusFilter message. Also converts values to other types if specified. - * @param message StatusFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.filter.v1.StatusFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StatusFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StatusFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace protocol. */ - namespace protocol { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a Message. */ - interface IMessage { - - /** An ID for this specific message. */ - id?: (string|null); - - /** - * Identifies the specific instance of a protocol to which this message - * belongs. - */ - protocolInstanceId?: (string|null); - - /** Message eventId */ - eventId?: (Long|null); - - /** Message commandIndex */ - commandIndex?: (Long|null); - - /** - * The opaque data carried by this message. The protocol type can be - * extracted from the package name of the message carried inside the Any. - */ - body?: (google.protobuf.IAny|null); - } - - /** - * (-- api-linter: core::0146::any=disabled - * aip.dev/not-precedent: We want runtime extensibility for the body field --) - */ - class Message implements IMessage { - - /** - * Constructs a new Message. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.protocol.v1.IMessage); - - /** An ID for this specific message. */ - public id: string; - - /** - * Identifies the specific instance of a protocol to which this message - * belongs. - */ - public protocolInstanceId: string; - - /** Message eventId. */ - public eventId?: (Long|null); - - /** Message commandIndex. */ - public commandIndex?: (Long|null); - - /** - * The opaque data carried by this message. The protocol type can be - * extracted from the package name of the message carried inside the Any. - */ - public body?: (google.protobuf.IAny|null); - - /** - * The event ID or command ID after which this message can be delivered. The - * effects of history up to and including this event ID should be visible to - * the code that handles this message. Omit to opt out of sequencing. - */ - public sequencingId?: ("eventId"|"commandIndex"); - - /** - * Creates a new Message instance using the specified properties. - * @param [properties] Properties to set - * @returns Message instance - */ - public static create(properties?: temporal.api.protocol.v1.IMessage): temporal.api.protocol.v1.Message; - - /** - * Encodes the specified Message message. Does not implicitly {@link temporal.api.protocol.v1.Message.verify|verify} messages. - * @param message Message message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.protocol.v1.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Message message, length delimited. Does not implicitly {@link temporal.api.protocol.v1.Message.verify|verify} messages. - * @param message Message message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.protocol.v1.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Message message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.protocol.v1.Message; - - /** - * Decodes a Message message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.protocol.v1.Message; - - /** - * Creates a Message message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Message - */ - public static fromObject(object: { [k: string]: any }): temporal.api.protocol.v1.Message; - - /** - * Creates a plain object from a Message message. Also converts values to other types if specified. - * @param message Message - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.protocol.v1.Message, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Message to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Message - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace namespace. */ - namespace namespace { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a NamespaceInfo. */ - interface INamespaceInfo { - - /** NamespaceInfo name */ - name?: (string|null); - - /** NamespaceInfo state */ - state?: (temporal.api.enums.v1.NamespaceState|null); - - /** NamespaceInfo description */ - description?: (string|null); - - /** NamespaceInfo ownerEmail */ - ownerEmail?: (string|null); - - /** A key-value map for any customized purpose. */ - data?: ({ [k: string]: string }|null); - - /** NamespaceInfo id */ - id?: (string|null); - - /** All capabilities the namespace supports. */ - capabilities?: (temporal.api.namespace.v1.NamespaceInfo.ICapabilities|null); - - /** Namespace configured limits */ - limits?: (temporal.api.namespace.v1.NamespaceInfo.ILimits|null); - - /** - * Whether scheduled workflows are supported on this namespace. This is only needed - * temporarily while the feature is experimental, so we can give it a high tag. - */ - supportsSchedules?: (boolean|null); - } - - /** Represents a NamespaceInfo. */ - class NamespaceInfo implements INamespaceInfo { - - /** - * Constructs a new NamespaceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.namespace.v1.INamespaceInfo); - - /** NamespaceInfo name. */ - public name: string; - - /** NamespaceInfo state. */ - public state: temporal.api.enums.v1.NamespaceState; - - /** NamespaceInfo description. */ - public description: string; - - /** NamespaceInfo ownerEmail. */ - public ownerEmail: string; - - /** A key-value map for any customized purpose. */ - public data: { [k: string]: string }; - - /** NamespaceInfo id. */ - public id: string; - - /** All capabilities the namespace supports. */ - public capabilities?: (temporal.api.namespace.v1.NamespaceInfo.ICapabilities|null); - - /** Namespace configured limits */ - public limits?: (temporal.api.namespace.v1.NamespaceInfo.ILimits|null); - - /** - * Whether scheduled workflows are supported on this namespace. This is only needed - * temporarily while the feature is experimental, so we can give it a high tag. - */ - public supportsSchedules: boolean; - - /** - * Creates a new NamespaceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespaceInfo instance - */ - public static create(properties?: temporal.api.namespace.v1.INamespaceInfo): temporal.api.namespace.v1.NamespaceInfo; - - /** - * Encodes the specified NamespaceInfo message. Does not implicitly {@link temporal.api.namespace.v1.NamespaceInfo.verify|verify} messages. - * @param message NamespaceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.namespace.v1.INamespaceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespaceInfo message, length delimited. Does not implicitly {@link temporal.api.namespace.v1.NamespaceInfo.verify|verify} messages. - * @param message NamespaceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.namespace.v1.INamespaceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespaceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespaceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.namespace.v1.NamespaceInfo; - - /** - * Decodes a NamespaceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespaceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.namespace.v1.NamespaceInfo; - - /** - * Creates a NamespaceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespaceInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.namespace.v1.NamespaceInfo; - - /** - * Creates a plain object from a NamespaceInfo message. Also converts values to other types if specified. - * @param message NamespaceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.namespace.v1.NamespaceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespaceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespaceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NamespaceInfo { - - /** Properties of a Capabilities. */ - interface ICapabilities { - - /** True if the namespace supports eager workflow start. */ - eagerWorkflowStart?: (boolean|null); - - /** True if the namespace supports sync update */ - syncUpdate?: (boolean|null); - - /** True if the namespace supports async update */ - asyncUpdate?: (boolean|null); - - /** True if the namespace supports worker heartbeats */ - workerHeartbeats?: (boolean|null); - - /** True if the namespace supports reported problems search attribute */ - reportedProblemsSearchAttribute?: (boolean|null); - - /** True if the namespace supports pausing workflows */ - workflowPause?: (boolean|null); - - /** True if the namespace supports standalone activities */ - standaloneActivities?: (boolean|null); - - /** - * True if the namespace supports server-side completion of outstanding worker polls on shutdown. - * When enabled, the server will complete polls for workers that send WorkerInstanceKey in their - * poll requests and call ShutdownWorker with the same WorkerInstanceKey. The poll will return - * an empty response. When this flag is true, workers should allow polls to return gracefully - * rather than terminating any open polls on shutdown. - */ - workerPollCompleteOnShutdown?: (boolean|null); - } - - /** Namespace capability details. Should contain what features are enabled in a namespace. */ - class Capabilities implements ICapabilities { - - /** - * Constructs a new Capabilities. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.namespace.v1.NamespaceInfo.ICapabilities); - - /** True if the namespace supports eager workflow start. */ - public eagerWorkflowStart: boolean; - - /** True if the namespace supports sync update */ - public syncUpdate: boolean; - - /** True if the namespace supports async update */ - public asyncUpdate: boolean; - - /** True if the namespace supports worker heartbeats */ - public workerHeartbeats: boolean; - - /** True if the namespace supports reported problems search attribute */ - public reportedProblemsSearchAttribute: boolean; - - /** True if the namespace supports pausing workflows */ - public workflowPause: boolean; - - /** True if the namespace supports standalone activities */ - public standaloneActivities: boolean; - - /** - * True if the namespace supports server-side completion of outstanding worker polls on shutdown. - * When enabled, the server will complete polls for workers that send WorkerInstanceKey in their - * poll requests and call ShutdownWorker with the same WorkerInstanceKey. The poll will return - * an empty response. When this flag is true, workers should allow polls to return gracefully - * rather than terminating any open polls on shutdown. - */ - public workerPollCompleteOnShutdown: boolean; - - /** - * Creates a new Capabilities instance using the specified properties. - * @param [properties] Properties to set - * @returns Capabilities instance - */ - public static create(properties?: temporal.api.namespace.v1.NamespaceInfo.ICapabilities): temporal.api.namespace.v1.NamespaceInfo.Capabilities; - - /** - * Encodes the specified Capabilities message. Does not implicitly {@link temporal.api.namespace.v1.NamespaceInfo.Capabilities.verify|verify} messages. - * @param message Capabilities message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.namespace.v1.NamespaceInfo.ICapabilities, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Capabilities message, length delimited. Does not implicitly {@link temporal.api.namespace.v1.NamespaceInfo.Capabilities.verify|verify} messages. - * @param message Capabilities message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.namespace.v1.NamespaceInfo.ICapabilities, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Capabilities message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Capabilities - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.namespace.v1.NamespaceInfo.Capabilities; - - /** - * Decodes a Capabilities message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Capabilities - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.namespace.v1.NamespaceInfo.Capabilities; - - /** - * Creates a Capabilities message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Capabilities - */ - public static fromObject(object: { [k: string]: any }): temporal.api.namespace.v1.NamespaceInfo.Capabilities; - - /** - * Creates a plain object from a Capabilities message. Also converts values to other types if specified. - * @param message Capabilities - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.namespace.v1.NamespaceInfo.Capabilities, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Capabilities to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Capabilities - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Limits. */ - interface ILimits { - - /** - * Maximum size in bytes for payload fields in workflow history events - * (e.g., workflow/activity inputs and results, failure details, signal payloads). - * When exceeded, the server will reject the operation with an error. - */ - blobSizeLimitError?: (Long|null); - - /** Maximum total memo size in bytes per workflow execution. */ - memoSizeLimitError?: (Long|null); - } - - /** Represents a Limits. */ - class Limits implements ILimits { - - /** - * Constructs a new Limits. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.namespace.v1.NamespaceInfo.ILimits); - - /** - * Maximum size in bytes for payload fields in workflow history events - * (e.g., workflow/activity inputs and results, failure details, signal payloads). - * When exceeded, the server will reject the operation with an error. - */ - public blobSizeLimitError: Long; - - /** Maximum total memo size in bytes per workflow execution. */ - public memoSizeLimitError: Long; - - /** - * Creates a new Limits instance using the specified properties. - * @param [properties] Properties to set - * @returns Limits instance - */ - public static create(properties?: temporal.api.namespace.v1.NamespaceInfo.ILimits): temporal.api.namespace.v1.NamespaceInfo.Limits; - - /** - * Encodes the specified Limits message. Does not implicitly {@link temporal.api.namespace.v1.NamespaceInfo.Limits.verify|verify} messages. - * @param message Limits message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.namespace.v1.NamespaceInfo.ILimits, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Limits message, length delimited. Does not implicitly {@link temporal.api.namespace.v1.NamespaceInfo.Limits.verify|verify} messages. - * @param message Limits message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.namespace.v1.NamespaceInfo.ILimits, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Limits message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Limits - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.namespace.v1.NamespaceInfo.Limits; - - /** - * Decodes a Limits message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Limits - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.namespace.v1.NamespaceInfo.Limits; - - /** - * Creates a Limits message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Limits - */ - public static fromObject(object: { [k: string]: any }): temporal.api.namespace.v1.NamespaceInfo.Limits; - - /** - * Creates a plain object from a Limits message. Also converts values to other types if specified. - * @param message Limits - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.namespace.v1.NamespaceInfo.Limits, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Limits to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Limits - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a NamespaceConfig. */ - interface INamespaceConfig { - - /** NamespaceConfig workflowExecutionRetentionTtl */ - workflowExecutionRetentionTtl?: (google.protobuf.IDuration|null); - - /** NamespaceConfig badBinaries */ - badBinaries?: (temporal.api.namespace.v1.IBadBinaries|null); - - /** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ - historyArchivalState?: (temporal.api.enums.v1.ArchivalState|null); - - /** NamespaceConfig historyArchivalUri */ - historyArchivalUri?: (string|null); - - /** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ - visibilityArchivalState?: (temporal.api.enums.v1.ArchivalState|null); - - /** NamespaceConfig visibilityArchivalUri */ - visibilityArchivalUri?: (string|null); - - /** Map from field name to alias. */ - customSearchAttributeAliases?: ({ [k: string]: string }|null); - } - - /** Represents a NamespaceConfig. */ - class NamespaceConfig implements INamespaceConfig { - - /** - * Constructs a new NamespaceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.namespace.v1.INamespaceConfig); - - /** NamespaceConfig workflowExecutionRetentionTtl. */ - public workflowExecutionRetentionTtl?: (google.protobuf.IDuration|null); - - /** NamespaceConfig badBinaries. */ - public badBinaries?: (temporal.api.namespace.v1.IBadBinaries|null); - - /** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ - public historyArchivalState: temporal.api.enums.v1.ArchivalState; - - /** NamespaceConfig historyArchivalUri. */ - public historyArchivalUri: string; - - /** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ - public visibilityArchivalState: temporal.api.enums.v1.ArchivalState; - - /** NamespaceConfig visibilityArchivalUri. */ - public visibilityArchivalUri: string; - - /** Map from field name to alias. */ - public customSearchAttributeAliases: { [k: string]: string }; - - /** - * Creates a new NamespaceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespaceConfig instance - */ - public static create(properties?: temporal.api.namespace.v1.INamespaceConfig): temporal.api.namespace.v1.NamespaceConfig; - - /** - * Encodes the specified NamespaceConfig message. Does not implicitly {@link temporal.api.namespace.v1.NamespaceConfig.verify|verify} messages. - * @param message NamespaceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.namespace.v1.INamespaceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespaceConfig message, length delimited. Does not implicitly {@link temporal.api.namespace.v1.NamespaceConfig.verify|verify} messages. - * @param message NamespaceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.namespace.v1.INamespaceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespaceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespaceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.namespace.v1.NamespaceConfig; - - /** - * Decodes a NamespaceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespaceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.namespace.v1.NamespaceConfig; - - /** - * Creates a NamespaceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespaceConfig - */ - public static fromObject(object: { [k: string]: any }): temporal.api.namespace.v1.NamespaceConfig; - - /** - * Creates a plain object from a NamespaceConfig message. Also converts values to other types if specified. - * @param message NamespaceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.namespace.v1.NamespaceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespaceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespaceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BadBinaries. */ - interface IBadBinaries { - - /** BadBinaries binaries */ - binaries?: ({ [k: string]: temporal.api.namespace.v1.IBadBinaryInfo }|null); - } - - /** Represents a BadBinaries. */ - class BadBinaries implements IBadBinaries { - - /** - * Constructs a new BadBinaries. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.namespace.v1.IBadBinaries); - - /** BadBinaries binaries. */ - public binaries: { [k: string]: temporal.api.namespace.v1.IBadBinaryInfo }; - - /** - * Creates a new BadBinaries instance using the specified properties. - * @param [properties] Properties to set - * @returns BadBinaries instance - */ - public static create(properties?: temporal.api.namespace.v1.IBadBinaries): temporal.api.namespace.v1.BadBinaries; - - /** - * Encodes the specified BadBinaries message. Does not implicitly {@link temporal.api.namespace.v1.BadBinaries.verify|verify} messages. - * @param message BadBinaries message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.namespace.v1.IBadBinaries, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BadBinaries message, length delimited. Does not implicitly {@link temporal.api.namespace.v1.BadBinaries.verify|verify} messages. - * @param message BadBinaries message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.namespace.v1.IBadBinaries, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BadBinaries message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BadBinaries - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.namespace.v1.BadBinaries; - - /** - * Decodes a BadBinaries message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BadBinaries - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.namespace.v1.BadBinaries; - - /** - * Creates a BadBinaries message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BadBinaries - */ - public static fromObject(object: { [k: string]: any }): temporal.api.namespace.v1.BadBinaries; - - /** - * Creates a plain object from a BadBinaries message. Also converts values to other types if specified. - * @param message BadBinaries - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.namespace.v1.BadBinaries, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BadBinaries to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BadBinaries - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BadBinaryInfo. */ - interface IBadBinaryInfo { - - /** BadBinaryInfo reason */ - reason?: (string|null); - - /** BadBinaryInfo operator */ - operator?: (string|null); - - /** BadBinaryInfo createTime */ - createTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a BadBinaryInfo. */ - class BadBinaryInfo implements IBadBinaryInfo { - - /** - * Constructs a new BadBinaryInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.namespace.v1.IBadBinaryInfo); - - /** BadBinaryInfo reason. */ - public reason: string; - - /** BadBinaryInfo operator. */ - public operator: string; - - /** BadBinaryInfo createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new BadBinaryInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns BadBinaryInfo instance - */ - public static create(properties?: temporal.api.namespace.v1.IBadBinaryInfo): temporal.api.namespace.v1.BadBinaryInfo; - - /** - * Encodes the specified BadBinaryInfo message. Does not implicitly {@link temporal.api.namespace.v1.BadBinaryInfo.verify|verify} messages. - * @param message BadBinaryInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.namespace.v1.IBadBinaryInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BadBinaryInfo message, length delimited. Does not implicitly {@link temporal.api.namespace.v1.BadBinaryInfo.verify|verify} messages. - * @param message BadBinaryInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.namespace.v1.IBadBinaryInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BadBinaryInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BadBinaryInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.namespace.v1.BadBinaryInfo; - - /** - * Decodes a BadBinaryInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BadBinaryInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.namespace.v1.BadBinaryInfo; - - /** - * Creates a BadBinaryInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BadBinaryInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.namespace.v1.BadBinaryInfo; - - /** - * Creates a plain object from a BadBinaryInfo message. Also converts values to other types if specified. - * @param message BadBinaryInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.namespace.v1.BadBinaryInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BadBinaryInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BadBinaryInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNamespaceInfo. */ - interface IUpdateNamespaceInfo { - - /** UpdateNamespaceInfo description */ - description?: (string|null); - - /** UpdateNamespaceInfo ownerEmail */ - ownerEmail?: (string|null); - - /** - * A key-value map for any customized purpose. - * If data already exists on the namespace, - * this will merge with the existing key values. - */ - data?: ({ [k: string]: string }|null); - - /** - * New namespace state, server will reject if transition is not allowed. - * Allowed transitions are: - * Registered -> [ Deleted | Deprecated | Handover ] - * Handover -> [ Registered ] - * Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state. - */ - state?: (temporal.api.enums.v1.NamespaceState|null); - } - - /** Represents an UpdateNamespaceInfo. */ - class UpdateNamespaceInfo implements IUpdateNamespaceInfo { - - /** - * Constructs a new UpdateNamespaceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.namespace.v1.IUpdateNamespaceInfo); - - /** UpdateNamespaceInfo description. */ - public description: string; - - /** UpdateNamespaceInfo ownerEmail. */ - public ownerEmail: string; - - /** - * A key-value map for any customized purpose. - * If data already exists on the namespace, - * this will merge with the existing key values. - */ - public data: { [k: string]: string }; - - /** - * New namespace state, server will reject if transition is not allowed. - * Allowed transitions are: - * Registered -> [ Deleted | Deprecated | Handover ] - * Handover -> [ Registered ] - * Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state. - */ - public state: temporal.api.enums.v1.NamespaceState; - - /** - * Creates a new UpdateNamespaceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNamespaceInfo instance - */ - public static create(properties?: temporal.api.namespace.v1.IUpdateNamespaceInfo): temporal.api.namespace.v1.UpdateNamespaceInfo; - - /** - * Encodes the specified UpdateNamespaceInfo message. Does not implicitly {@link temporal.api.namespace.v1.UpdateNamespaceInfo.verify|verify} messages. - * @param message UpdateNamespaceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.namespace.v1.IUpdateNamespaceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNamespaceInfo message, length delimited. Does not implicitly {@link temporal.api.namespace.v1.UpdateNamespaceInfo.verify|verify} messages. - * @param message UpdateNamespaceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.namespace.v1.IUpdateNamespaceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNamespaceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNamespaceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.namespace.v1.UpdateNamespaceInfo; - - /** - * Decodes an UpdateNamespaceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNamespaceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.namespace.v1.UpdateNamespaceInfo; - - /** - * Creates an UpdateNamespaceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNamespaceInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.namespace.v1.UpdateNamespaceInfo; - - /** - * Creates a plain object from an UpdateNamespaceInfo message. Also converts values to other types if specified. - * @param message UpdateNamespaceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.namespace.v1.UpdateNamespaceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNamespaceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNamespaceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NamespaceFilter. */ - interface INamespaceFilter { - - /** - * By default namespaces in NAMESPACE_STATE_DELETED state are not included. - * Setting include_deleted to true will include deleted namespaces. - * Note: Namespace is in NAMESPACE_STATE_DELETED state when it was deleted from the system but associated data is not deleted yet. - */ - includeDeleted?: (boolean|null); - } - - /** Represents a NamespaceFilter. */ - class NamespaceFilter implements INamespaceFilter { - - /** - * Constructs a new NamespaceFilter. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.namespace.v1.INamespaceFilter); - - /** - * By default namespaces in NAMESPACE_STATE_DELETED state are not included. - * Setting include_deleted to true will include deleted namespaces. - * Note: Namespace is in NAMESPACE_STATE_DELETED state when it was deleted from the system but associated data is not deleted yet. - */ - public includeDeleted: boolean; - - /** - * Creates a new NamespaceFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespaceFilter instance - */ - public static create(properties?: temporal.api.namespace.v1.INamespaceFilter): temporal.api.namespace.v1.NamespaceFilter; - - /** - * Encodes the specified NamespaceFilter message. Does not implicitly {@link temporal.api.namespace.v1.NamespaceFilter.verify|verify} messages. - * @param message NamespaceFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.namespace.v1.INamespaceFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespaceFilter message, length delimited. Does not implicitly {@link temporal.api.namespace.v1.NamespaceFilter.verify|verify} messages. - * @param message NamespaceFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.namespace.v1.INamespaceFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespaceFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespaceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.namespace.v1.NamespaceFilter; - - /** - * Decodes a NamespaceFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespaceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.namespace.v1.NamespaceFilter; - - /** - * Creates a NamespaceFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespaceFilter - */ - public static fromObject(object: { [k: string]: any }): temporal.api.namespace.v1.NamespaceFilter; - - /** - * Creates a plain object from a NamespaceFilter message. Also converts values to other types if specified. - * @param message NamespaceFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.namespace.v1.NamespaceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespaceFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespaceFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace query. */ - namespace query { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a WorkflowQuery. */ - interface IWorkflowQuery { - - /** The workflow-author-defined identifier of the query. Typically a function name. */ - queryType?: (string|null); - - /** Serialized arguments that will be provided to the query handler. */ - queryArgs?: (temporal.api.common.v1.IPayloads|null); - - /** - * Headers that were passed by the caller of the query and copied by temporal - * server into the workflow task. - */ - header?: (temporal.api.common.v1.IHeader|null); - } - - /** See https://docs.temporal.io/docs/concepts/queries/ */ - class WorkflowQuery implements IWorkflowQuery { - - /** - * Constructs a new WorkflowQuery. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.query.v1.IWorkflowQuery); - - /** The workflow-author-defined identifier of the query. Typically a function name. */ - public queryType: string; - - /** Serialized arguments that will be provided to the query handler. */ - public queryArgs?: (temporal.api.common.v1.IPayloads|null); - - /** - * Headers that were passed by the caller of the query and copied by temporal - * server into the workflow task. - */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** - * Creates a new WorkflowQuery instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowQuery instance - */ - public static create(properties?: temporal.api.query.v1.IWorkflowQuery): temporal.api.query.v1.WorkflowQuery; - - /** - * Encodes the specified WorkflowQuery message. Does not implicitly {@link temporal.api.query.v1.WorkflowQuery.verify|verify} messages. - * @param message WorkflowQuery message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.query.v1.IWorkflowQuery, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowQuery message, length delimited. Does not implicitly {@link temporal.api.query.v1.WorkflowQuery.verify|verify} messages. - * @param message WorkflowQuery message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.query.v1.IWorkflowQuery, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowQuery message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.query.v1.WorkflowQuery; - - /** - * Decodes a WorkflowQuery message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.query.v1.WorkflowQuery; - - /** - * Creates a WorkflowQuery message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowQuery - */ - public static fromObject(object: { [k: string]: any }): temporal.api.query.v1.WorkflowQuery; - - /** - * Creates a plain object from a WorkflowQuery message. Also converts values to other types if specified. - * @param message WorkflowQuery - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.query.v1.WorkflowQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowQuery to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowQuery - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowQueryResult. */ - interface IWorkflowQueryResult { - - /** Did the query succeed or fail? */ - resultType?: (temporal.api.enums.v1.QueryResultType|null); - - /** - * Set when the query succeeds with the results. - * Mutually exclusive with `error_message` and `failure`. - */ - answer?: (temporal.api.common.v1.IPayloads|null); - - /** - * Mutually exclusive with `answer`. Set when the query fails. - * See also the newer `failure` field. - */ - errorMessage?: (string|null); - - /** - * The full reason for this query failure. This field is newer than `error_message` and can be encoded by the SDK's - * failure converter to support E2E encryption of messages and stack traces. - * Mutually exclusive with `answer`. Set when the query fails. - */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** Answer to a `WorkflowQuery` */ - class WorkflowQueryResult implements IWorkflowQueryResult { - - /** - * Constructs a new WorkflowQueryResult. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.query.v1.IWorkflowQueryResult); - - /** Did the query succeed or fail? */ - public resultType: temporal.api.enums.v1.QueryResultType; - - /** - * Set when the query succeeds with the results. - * Mutually exclusive with `error_message` and `failure`. - */ - public answer?: (temporal.api.common.v1.IPayloads|null); - - /** - * Mutually exclusive with `answer`. Set when the query fails. - * See also the newer `failure` field. - */ - public errorMessage: string; - - /** - * The full reason for this query failure. This field is newer than `error_message` and can be encoded by the SDK's - * failure converter to support E2E encryption of messages and stack traces. - * Mutually exclusive with `answer`. Set when the query fails. - */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new WorkflowQueryResult instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowQueryResult instance - */ - public static create(properties?: temporal.api.query.v1.IWorkflowQueryResult): temporal.api.query.v1.WorkflowQueryResult; - - /** - * Encodes the specified WorkflowQueryResult message. Does not implicitly {@link temporal.api.query.v1.WorkflowQueryResult.verify|verify} messages. - * @param message WorkflowQueryResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.query.v1.IWorkflowQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowQueryResult message, length delimited. Does not implicitly {@link temporal.api.query.v1.WorkflowQueryResult.verify|verify} messages. - * @param message WorkflowQueryResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.query.v1.IWorkflowQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowQueryResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowQueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.query.v1.WorkflowQueryResult; - - /** - * Decodes a WorkflowQueryResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowQueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.query.v1.WorkflowQueryResult; - - /** - * Creates a WorkflowQueryResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowQueryResult - */ - public static fromObject(object: { [k: string]: any }): temporal.api.query.v1.WorkflowQueryResult; - - /** - * Creates a plain object from a WorkflowQueryResult message. Also converts values to other types if specified. - * @param message WorkflowQueryResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.query.v1.WorkflowQueryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowQueryResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowQueryResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QueryRejected. */ - interface IQueryRejected { - - /** QueryRejected status */ - status?: (temporal.api.enums.v1.WorkflowExecutionStatus|null); - } - - /** Represents a QueryRejected. */ - class QueryRejected implements IQueryRejected { - - /** - * Constructs a new QueryRejected. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.query.v1.IQueryRejected); - - /** QueryRejected status. */ - public status: temporal.api.enums.v1.WorkflowExecutionStatus; - - /** - * Creates a new QueryRejected instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryRejected instance - */ - public static create(properties?: temporal.api.query.v1.IQueryRejected): temporal.api.query.v1.QueryRejected; - - /** - * Encodes the specified QueryRejected message. Does not implicitly {@link temporal.api.query.v1.QueryRejected.verify|verify} messages. - * @param message QueryRejected message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.query.v1.IQueryRejected, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryRejected message, length delimited. Does not implicitly {@link temporal.api.query.v1.QueryRejected.verify|verify} messages. - * @param message QueryRejected message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.query.v1.IQueryRejected, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryRejected message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryRejected - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.query.v1.QueryRejected; - - /** - * Decodes a QueryRejected message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryRejected - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.query.v1.QueryRejected; - - /** - * Creates a QueryRejected message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryRejected - */ - public static fromObject(object: { [k: string]: any }): temporal.api.query.v1.QueryRejected; - - /** - * Creates a plain object from a QueryRejected message. Also converts values to other types if specified. - * @param message QueryRejected - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.query.v1.QueryRejected, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryRejected to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryRejected - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace replication. */ - namespace replication { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a ClusterReplicationConfig. */ - interface IClusterReplicationConfig { - - /** ClusterReplicationConfig clusterName */ - clusterName?: (string|null); - } - - /** Represents a ClusterReplicationConfig. */ - class ClusterReplicationConfig implements IClusterReplicationConfig { - - /** - * Constructs a new ClusterReplicationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.replication.v1.IClusterReplicationConfig); - - /** ClusterReplicationConfig clusterName. */ - public clusterName: string; - - /** - * Creates a new ClusterReplicationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ClusterReplicationConfig instance - */ - public static create(properties?: temporal.api.replication.v1.IClusterReplicationConfig): temporal.api.replication.v1.ClusterReplicationConfig; - - /** - * Encodes the specified ClusterReplicationConfig message. Does not implicitly {@link temporal.api.replication.v1.ClusterReplicationConfig.verify|verify} messages. - * @param message ClusterReplicationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.replication.v1.IClusterReplicationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClusterReplicationConfig message, length delimited. Does not implicitly {@link temporal.api.replication.v1.ClusterReplicationConfig.verify|verify} messages. - * @param message ClusterReplicationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.replication.v1.IClusterReplicationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClusterReplicationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClusterReplicationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.replication.v1.ClusterReplicationConfig; - - /** - * Decodes a ClusterReplicationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClusterReplicationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.replication.v1.ClusterReplicationConfig; - - /** - * Creates a ClusterReplicationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClusterReplicationConfig - */ - public static fromObject(object: { [k: string]: any }): temporal.api.replication.v1.ClusterReplicationConfig; - - /** - * Creates a plain object from a ClusterReplicationConfig message. Also converts values to other types if specified. - * @param message ClusterReplicationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.replication.v1.ClusterReplicationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClusterReplicationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClusterReplicationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NamespaceReplicationConfig. */ - interface INamespaceReplicationConfig { - - /** NamespaceReplicationConfig activeClusterName */ - activeClusterName?: (string|null); - - /** NamespaceReplicationConfig clusters */ - clusters?: (temporal.api.replication.v1.IClusterReplicationConfig[]|null); - - /** NamespaceReplicationConfig state */ - state?: (temporal.api.enums.v1.ReplicationState|null); - } - - /** Represents a NamespaceReplicationConfig. */ - class NamespaceReplicationConfig implements INamespaceReplicationConfig { - - /** - * Constructs a new NamespaceReplicationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.replication.v1.INamespaceReplicationConfig); - - /** NamespaceReplicationConfig activeClusterName. */ - public activeClusterName: string; - - /** NamespaceReplicationConfig clusters. */ - public clusters: temporal.api.replication.v1.IClusterReplicationConfig[]; - - /** NamespaceReplicationConfig state. */ - public state: temporal.api.enums.v1.ReplicationState; - - /** - * Creates a new NamespaceReplicationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespaceReplicationConfig instance - */ - public static create(properties?: temporal.api.replication.v1.INamespaceReplicationConfig): temporal.api.replication.v1.NamespaceReplicationConfig; - - /** - * Encodes the specified NamespaceReplicationConfig message. Does not implicitly {@link temporal.api.replication.v1.NamespaceReplicationConfig.verify|verify} messages. - * @param message NamespaceReplicationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.replication.v1.INamespaceReplicationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespaceReplicationConfig message, length delimited. Does not implicitly {@link temporal.api.replication.v1.NamespaceReplicationConfig.verify|verify} messages. - * @param message NamespaceReplicationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.replication.v1.INamespaceReplicationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespaceReplicationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespaceReplicationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.replication.v1.NamespaceReplicationConfig; - - /** - * Decodes a NamespaceReplicationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespaceReplicationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.replication.v1.NamespaceReplicationConfig; - - /** - * Creates a NamespaceReplicationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespaceReplicationConfig - */ - public static fromObject(object: { [k: string]: any }): temporal.api.replication.v1.NamespaceReplicationConfig; - - /** - * Creates a plain object from a NamespaceReplicationConfig message. Also converts values to other types if specified. - * @param message NamespaceReplicationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.replication.v1.NamespaceReplicationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespaceReplicationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespaceReplicationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FailoverStatus. */ - interface IFailoverStatus { - - /** Timestamp when the Cluster switched to the following failover_version */ - failoverTime?: (google.protobuf.ITimestamp|null); - - /** FailoverStatus failoverVersion */ - failoverVersion?: (Long|null); - } - - /** Represents a historical replication status of a Namespace */ - class FailoverStatus implements IFailoverStatus { - - /** - * Constructs a new FailoverStatus. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.replication.v1.IFailoverStatus); - - /** Timestamp when the Cluster switched to the following failover_version */ - public failoverTime?: (google.protobuf.ITimestamp|null); - - /** FailoverStatus failoverVersion. */ - public failoverVersion: Long; - - /** - * Creates a new FailoverStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns FailoverStatus instance - */ - public static create(properties?: temporal.api.replication.v1.IFailoverStatus): temporal.api.replication.v1.FailoverStatus; - - /** - * Encodes the specified FailoverStatus message. Does not implicitly {@link temporal.api.replication.v1.FailoverStatus.verify|verify} messages. - * @param message FailoverStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.replication.v1.IFailoverStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FailoverStatus message, length delimited. Does not implicitly {@link temporal.api.replication.v1.FailoverStatus.verify|verify} messages. - * @param message FailoverStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.replication.v1.IFailoverStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FailoverStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FailoverStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.replication.v1.FailoverStatus; - - /** - * Decodes a FailoverStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FailoverStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.replication.v1.FailoverStatus; - - /** - * Creates a FailoverStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FailoverStatus - */ - public static fromObject(object: { [k: string]: any }): temporal.api.replication.v1.FailoverStatus; - - /** - * Creates a plain object from a FailoverStatus message. Also converts values to other types if specified. - * @param message FailoverStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.replication.v1.FailoverStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FailoverStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FailoverStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace rules. */ - namespace rules { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a WorkflowRuleAction. */ - interface IWorkflowRuleAction { - - /** WorkflowRuleAction activityPause */ - activityPause?: (temporal.api.rules.v1.WorkflowRuleAction.IActionActivityPause|null); - } - - /** Represents a WorkflowRuleAction. */ - class WorkflowRuleAction implements IWorkflowRuleAction { - - /** - * Constructs a new WorkflowRuleAction. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.rules.v1.IWorkflowRuleAction); - - /** WorkflowRuleAction activityPause. */ - public activityPause?: (temporal.api.rules.v1.WorkflowRuleAction.IActionActivityPause|null); - - /** Supported actions. */ - public variant?: "activityPause"; - - /** - * Creates a new WorkflowRuleAction instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowRuleAction instance - */ - public static create(properties?: temporal.api.rules.v1.IWorkflowRuleAction): temporal.api.rules.v1.WorkflowRuleAction; - - /** - * Encodes the specified WorkflowRuleAction message. Does not implicitly {@link temporal.api.rules.v1.WorkflowRuleAction.verify|verify} messages. - * @param message WorkflowRuleAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.rules.v1.IWorkflowRuleAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowRuleAction message, length delimited. Does not implicitly {@link temporal.api.rules.v1.WorkflowRuleAction.verify|verify} messages. - * @param message WorkflowRuleAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.rules.v1.IWorkflowRuleAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowRuleAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowRuleAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.rules.v1.WorkflowRuleAction; - - /** - * Decodes a WorkflowRuleAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowRuleAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.rules.v1.WorkflowRuleAction; - - /** - * Creates a WorkflowRuleAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowRuleAction - */ - public static fromObject(object: { [k: string]: any }): temporal.api.rules.v1.WorkflowRuleAction; - - /** - * Creates a plain object from a WorkflowRuleAction message. Also converts values to other types if specified. - * @param message WorkflowRuleAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.rules.v1.WorkflowRuleAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowRuleAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowRuleAction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WorkflowRuleAction { - - /** Properties of an ActionActivityPause. */ - interface IActionActivityPause { - } - - /** Represents an ActionActivityPause. */ - class ActionActivityPause implements IActionActivityPause { - - /** - * Constructs a new ActionActivityPause. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.rules.v1.WorkflowRuleAction.IActionActivityPause); - - /** - * Creates a new ActionActivityPause instance using the specified properties. - * @param [properties] Properties to set - * @returns ActionActivityPause instance - */ - public static create(properties?: temporal.api.rules.v1.WorkflowRuleAction.IActionActivityPause): temporal.api.rules.v1.WorkflowRuleAction.ActionActivityPause; - - /** - * Encodes the specified ActionActivityPause message. Does not implicitly {@link temporal.api.rules.v1.WorkflowRuleAction.ActionActivityPause.verify|verify} messages. - * @param message ActionActivityPause message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.rules.v1.WorkflowRuleAction.IActionActivityPause, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActionActivityPause message, length delimited. Does not implicitly {@link temporal.api.rules.v1.WorkflowRuleAction.ActionActivityPause.verify|verify} messages. - * @param message ActionActivityPause message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.rules.v1.WorkflowRuleAction.IActionActivityPause, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActionActivityPause message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActionActivityPause - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.rules.v1.WorkflowRuleAction.ActionActivityPause; - - /** - * Decodes an ActionActivityPause message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActionActivityPause - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.rules.v1.WorkflowRuleAction.ActionActivityPause; - - /** - * Creates an ActionActivityPause message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActionActivityPause - */ - public static fromObject(object: { [k: string]: any }): temporal.api.rules.v1.WorkflowRuleAction.ActionActivityPause; - - /** - * Creates a plain object from an ActionActivityPause message. Also converts values to other types if specified. - * @param message ActionActivityPause - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.rules.v1.WorkflowRuleAction.ActionActivityPause, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActionActivityPause to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActionActivityPause - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a WorkflowRuleSpec. */ - interface IWorkflowRuleSpec { - - /** - * The id of the new workflow rule. Must be unique within the namespace. - * Can be set by the user, and can have business meaning. - */ - id?: (string|null); - - /** WorkflowRuleSpec activityStart */ - activityStart?: (temporal.api.rules.v1.WorkflowRuleSpec.IActivityStartingTrigger|null); - - /** - * Restricted Visibility query. - * This query is used to filter workflows in this namespace to which this rule should apply. - * It is applied to any running workflow each time a triggering event occurs, before the trigger predicate is evaluated. - * The following workflow attributes are supported: - * - WorkflowType - * - WorkflowId - * - StartTime - * - ExecutionStatus - */ - visibilityQuery?: (string|null); - - /** WorkflowRuleAction to be taken when the rule is triggered and predicate is matched. */ - actions?: (temporal.api.rules.v1.IWorkflowRuleAction[]|null); - - /** - * Expiration time of the rule. After this time, the rule will be deleted. - * Can be empty if the rule should never expire. - */ - expirationTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a WorkflowRuleSpec. */ - class WorkflowRuleSpec implements IWorkflowRuleSpec { - - /** - * Constructs a new WorkflowRuleSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.rules.v1.IWorkflowRuleSpec); - - /** - * The id of the new workflow rule. Must be unique within the namespace. - * Can be set by the user, and can have business meaning. - */ - public id: string; - - /** WorkflowRuleSpec activityStart. */ - public activityStart?: (temporal.api.rules.v1.WorkflowRuleSpec.IActivityStartingTrigger|null); - - /** - * Restricted Visibility query. - * This query is used to filter workflows in this namespace to which this rule should apply. - * It is applied to any running workflow each time a triggering event occurs, before the trigger predicate is evaluated. - * The following workflow attributes are supported: - * - WorkflowType - * - WorkflowId - * - StartTime - * - ExecutionStatus - */ - public visibilityQuery: string; - - /** WorkflowRuleAction to be taken when the rule is triggered and predicate is matched. */ - public actions: temporal.api.rules.v1.IWorkflowRuleAction[]; - - /** - * Expiration time of the rule. After this time, the rule will be deleted. - * Can be empty if the rule should never expire. - */ - public expirationTime?: (google.protobuf.ITimestamp|null); - - /** - * Specifies how the rule should be triggered and evaluated. - * Currently, only "activity start" type is supported. - */ - public trigger?: "activityStart"; - - /** - * Creates a new WorkflowRuleSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowRuleSpec instance - */ - public static create(properties?: temporal.api.rules.v1.IWorkflowRuleSpec): temporal.api.rules.v1.WorkflowRuleSpec; - - /** - * Encodes the specified WorkflowRuleSpec message. Does not implicitly {@link temporal.api.rules.v1.WorkflowRuleSpec.verify|verify} messages. - * @param message WorkflowRuleSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.rules.v1.IWorkflowRuleSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowRuleSpec message, length delimited. Does not implicitly {@link temporal.api.rules.v1.WorkflowRuleSpec.verify|verify} messages. - * @param message WorkflowRuleSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.rules.v1.IWorkflowRuleSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowRuleSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowRuleSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.rules.v1.WorkflowRuleSpec; - - /** - * Decodes a WorkflowRuleSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowRuleSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.rules.v1.WorkflowRuleSpec; - - /** - * Creates a WorkflowRuleSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowRuleSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.rules.v1.WorkflowRuleSpec; - - /** - * Creates a plain object from a WorkflowRuleSpec message. Also converts values to other types if specified. - * @param message WorkflowRuleSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.rules.v1.WorkflowRuleSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowRuleSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowRuleSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WorkflowRuleSpec { - - /** Properties of an ActivityStartingTrigger. */ - interface IActivityStartingTrigger { - - /** - * Activity predicate is a SQL-like string filter parameter. - * It is used to match against workflow data. - * The following activity attributes are supported as part of the predicate: - * - ActivityType: An Activity Type is the mapping of a name to an Activity Definition.. - * - ActivityId: The ID of the activity. - * - ActivityAttempt: The number attempts of the activity. - * - BackoffInterval: The current amount of time between scheduled attempts of the activity. - * - ActivityStatus: The status of the activity. Can be one of "Scheduled", "Started", "Paused". - * - TaskQueue: The name of the task queue the workflow specified that the activity should run on. - * Activity predicate support the following operators: - * =, !=, >, >=, <, <= - * AND, OR, () - * BETWEEN ... AND - * STARTS_WITH - */ - predicate?: (string|null); - } - - /** Activity trigger will be triggered when an activity is about to start. */ - class ActivityStartingTrigger implements IActivityStartingTrigger { - - /** - * Constructs a new ActivityStartingTrigger. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.rules.v1.WorkflowRuleSpec.IActivityStartingTrigger); - - /** - * Activity predicate is a SQL-like string filter parameter. - * It is used to match against workflow data. - * The following activity attributes are supported as part of the predicate: - * - ActivityType: An Activity Type is the mapping of a name to an Activity Definition.. - * - ActivityId: The ID of the activity. - * - ActivityAttempt: The number attempts of the activity. - * - BackoffInterval: The current amount of time between scheduled attempts of the activity. - * - ActivityStatus: The status of the activity. Can be one of "Scheduled", "Started", "Paused". - * - TaskQueue: The name of the task queue the workflow specified that the activity should run on. - * Activity predicate support the following operators: - * * =, !=, >, >=, <, <= - * * AND, OR, () - * * BETWEEN ... AND - * STARTS_WITH - */ - public predicate: string; - - /** - * Creates a new ActivityStartingTrigger instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityStartingTrigger instance - */ - public static create(properties?: temporal.api.rules.v1.WorkflowRuleSpec.IActivityStartingTrigger): temporal.api.rules.v1.WorkflowRuleSpec.ActivityStartingTrigger; - - /** - * Encodes the specified ActivityStartingTrigger message. Does not implicitly {@link temporal.api.rules.v1.WorkflowRuleSpec.ActivityStartingTrigger.verify|verify} messages. - * @param message ActivityStartingTrigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.rules.v1.WorkflowRuleSpec.IActivityStartingTrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityStartingTrigger message, length delimited. Does not implicitly {@link temporal.api.rules.v1.WorkflowRuleSpec.ActivityStartingTrigger.verify|verify} messages. - * @param message ActivityStartingTrigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.rules.v1.WorkflowRuleSpec.IActivityStartingTrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityStartingTrigger message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityStartingTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.rules.v1.WorkflowRuleSpec.ActivityStartingTrigger; - - /** - * Decodes an ActivityStartingTrigger message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityStartingTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.rules.v1.WorkflowRuleSpec.ActivityStartingTrigger; - - /** - * Creates an ActivityStartingTrigger message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityStartingTrigger - */ - public static fromObject(object: { [k: string]: any }): temporal.api.rules.v1.WorkflowRuleSpec.ActivityStartingTrigger; - - /** - * Creates a plain object from an ActivityStartingTrigger message. Also converts values to other types if specified. - * @param message ActivityStartingTrigger - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.rules.v1.WorkflowRuleSpec.ActivityStartingTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityStartingTrigger to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityStartingTrigger - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a WorkflowRule. */ - interface IWorkflowRule { - - /** Rule creation time. */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Rule specification */ - spec?: (temporal.api.rules.v1.IWorkflowRuleSpec|null); - - /** - * Identity of the actor that created the rule - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: It is better reflect the intent this way, we will also have updated_by. --) - * (-- api-linter: core::0142::time-field-names=disabled - * aip.dev/not-precedent: Same as above. All other options sounds clumsy --) - */ - createdByIdentity?: (string|null); - - /** Rule description. */ - description?: (string|null); - } - - /** WorkflowRule describes a rule that can be applied to any workflow in this namespace. */ - class WorkflowRule implements IWorkflowRule { - - /** - * Constructs a new WorkflowRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.rules.v1.IWorkflowRule); - - /** Rule creation time. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Rule specification */ - public spec?: (temporal.api.rules.v1.IWorkflowRuleSpec|null); - - /** - * Identity of the actor that created the rule - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: It is better reflect the intent this way, we will also have updated_by. --) - * (-- api-linter: core::0142::time-field-names=disabled - * aip.dev/not-precedent: Same as above. All other options sounds clumsy --) - */ - public createdByIdentity: string; - - /** Rule description. */ - public description: string; - - /** - * Creates a new WorkflowRule instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowRule instance - */ - public static create(properties?: temporal.api.rules.v1.IWorkflowRule): temporal.api.rules.v1.WorkflowRule; - - /** - * Encodes the specified WorkflowRule message. Does not implicitly {@link temporal.api.rules.v1.WorkflowRule.verify|verify} messages. - * @param message WorkflowRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.rules.v1.IWorkflowRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowRule message, length delimited. Does not implicitly {@link temporal.api.rules.v1.WorkflowRule.verify|verify} messages. - * @param message WorkflowRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.rules.v1.IWorkflowRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.rules.v1.WorkflowRule; - - /** - * Decodes a WorkflowRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.rules.v1.WorkflowRule; - - /** - * Creates a WorkflowRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.rules.v1.WorkflowRule; - - /** - * Creates a plain object from a WorkflowRule message. Also converts values to other types if specified. - * @param message WorkflowRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.rules.v1.WorkflowRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace schedule. */ - namespace schedule { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a CalendarSpec. */ - interface ICalendarSpec { - - /** Expression to match seconds. Default: 0 */ - second?: (string|null); - - /** Expression to match minutes. Default: 0 */ - minute?: (string|null); - - /** Expression to match hours. Default: 0 */ - hour?: (string|null); - - /** - * Expression to match days of the month. Default: * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: standard name of field --) - */ - dayOfMonth?: (string|null); - - /** Expression to match months. Default: * */ - month?: (string|null); - - /** Expression to match years. Default: * */ - year?: (string|null); - - /** Expression to match days of the week. Default: * */ - dayOfWeek?: (string|null); - - /** Free-form comment describing the intention of this spec. */ - comment?: (string|null); - } - - /** - * CalendarSpec describes an event specification relative to the calendar, - * similar to a traditional cron specification, but with labeled fields. Each - * field can be one of: - * *: matches always - * x: matches when the field equals x - * x/y : matches when the field equals x+n*y where n is an integer - * x-z: matches when the field is between x and z inclusive - * w,x,y,...: matches when the field is one of the listed values - * Each x, y, z, ... is either a decimal integer, or a month or day of week name - * or abbreviation (in the appropriate fields). - * A timestamp matches if all fields match. - * Note that fields have different default values, for convenience. - * Note that the special case that some cron implementations have for treating - * day_of_month and day_of_week as "or" instead of "and" when both are set is - * not implemented. - * day_of_week can accept 0 or 7 as Sunday - * CalendarSpec gets compiled into StructuredCalendarSpec, which is what will be - * returned if you describe the schedule. - */ - class CalendarSpec implements ICalendarSpec { - - /** - * Constructs a new CalendarSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.ICalendarSpec); - - /** Expression to match seconds. Default: 0 */ - public second: string; - - /** Expression to match minutes. Default: 0 */ - public minute: string; - - /** Expression to match hours. Default: 0 */ - public hour: string; - - /** - * Expression to match days of the month. Default: * - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: standard name of field --) - */ - public dayOfMonth: string; - - /** Expression to match months. Default: * */ - public month: string; - - /** Expression to match years. Default: * */ - public year: string; - - /** Expression to match days of the week. Default: * */ - public dayOfWeek: string; - - /** Free-form comment describing the intention of this spec. */ - public comment: string; - - /** - * Creates a new CalendarSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns CalendarSpec instance - */ - public static create(properties?: temporal.api.schedule.v1.ICalendarSpec): temporal.api.schedule.v1.CalendarSpec; - - /** - * Encodes the specified CalendarSpec message. Does not implicitly {@link temporal.api.schedule.v1.CalendarSpec.verify|verify} messages. - * @param message CalendarSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.ICalendarSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CalendarSpec message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.CalendarSpec.verify|verify} messages. - * @param message CalendarSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.ICalendarSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CalendarSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CalendarSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.CalendarSpec; - - /** - * Decodes a CalendarSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CalendarSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.CalendarSpec; - - /** - * Creates a CalendarSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CalendarSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.CalendarSpec; - - /** - * Creates a plain object from a CalendarSpec message. Also converts values to other types if specified. - * @param message CalendarSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.CalendarSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CalendarSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CalendarSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Range. */ - interface IRange { - - /** Start of range (inclusive). */ - start?: (number|null); - - /** End of range (inclusive). */ - end?: (number|null); - - /** Step (optional, default 1). */ - step?: (number|null); - } - - /** - * Range represents a set of integer values, used to match fields of a calendar - * time in StructuredCalendarSpec. If end < start, then end is interpreted as - * equal to start. This means you can use a Range with start set to a value, and - * end and step unset (defaulting to 0) to represent a single value. - */ - class Range implements IRange { - - /** - * Constructs a new Range. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.IRange); - - /** Start of range (inclusive). */ - public start: number; - - /** End of range (inclusive). */ - public end: number; - - /** Step (optional, default 1). */ - public step: number; - - /** - * Creates a new Range instance using the specified properties. - * @param [properties] Properties to set - * @returns Range instance - */ - public static create(properties?: temporal.api.schedule.v1.IRange): temporal.api.schedule.v1.Range; - - /** - * Encodes the specified Range message. Does not implicitly {@link temporal.api.schedule.v1.Range.verify|verify} messages. - * @param message Range message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.IRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.Range.verify|verify} messages. - * @param message Range message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.IRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Range message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.Range; - - /** - * Decodes a Range message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.Range; - - /** - * Creates a Range message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Range - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.Range; - - /** - * Creates a plain object from a Range message. Also converts values to other types if specified. - * @param message Range - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Range to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Range - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StructuredCalendarSpec. */ - interface IStructuredCalendarSpec { - - /** Match seconds (0-59) */ - second?: (temporal.api.schedule.v1.IRange[]|null); - - /** Match minutes (0-59) */ - minute?: (temporal.api.schedule.v1.IRange[]|null); - - /** Match hours (0-23) */ - hour?: (temporal.api.schedule.v1.IRange[]|null); - - /** - * Match days of the month (1-31) - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: standard name of field --) - */ - dayOfMonth?: (temporal.api.schedule.v1.IRange[]|null); - - /** Match months (1-12) */ - month?: (temporal.api.schedule.v1.IRange[]|null); - - /** Match years. */ - year?: (temporal.api.schedule.v1.IRange[]|null); - - /** Match days of the week (0-6; 0 is Sunday). */ - dayOfWeek?: (temporal.api.schedule.v1.IRange[]|null); - - /** Free-form comment describing the intention of this spec. */ - comment?: (string|null); - } - - /** - * StructuredCalendarSpec describes an event specification relative to the - * calendar, in a form that's easy to work with programmatically. Each field can - * be one or more ranges. - * A timestamp matches if at least one range of each field matches the - * corresponding fields of the timestamp, except for year: if year is missing, - * that means all years match. For all fields besides year, at least one Range - * must be present to match anything. - * Relative expressions such as "last day of the month" or "third Monday" are not currently - * representable; callers must enumerate the concrete days they require. - */ - class StructuredCalendarSpec implements IStructuredCalendarSpec { - - /** - * Constructs a new StructuredCalendarSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.IStructuredCalendarSpec); - - /** Match seconds (0-59) */ - public second: temporal.api.schedule.v1.IRange[]; - - /** Match minutes (0-59) */ - public minute: temporal.api.schedule.v1.IRange[]; - - /** Match hours (0-23) */ - public hour: temporal.api.schedule.v1.IRange[]; - - /** - * Match days of the month (1-31) - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: standard name of field --) - */ - public dayOfMonth: temporal.api.schedule.v1.IRange[]; - - /** Match months (1-12) */ - public month: temporal.api.schedule.v1.IRange[]; - - /** Match years. */ - public year: temporal.api.schedule.v1.IRange[]; - - /** Match days of the week (0-6; 0 is Sunday). */ - public dayOfWeek: temporal.api.schedule.v1.IRange[]; - - /** Free-form comment describing the intention of this spec. */ - public comment: string; - - /** - * Creates a new StructuredCalendarSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns StructuredCalendarSpec instance - */ - public static create(properties?: temporal.api.schedule.v1.IStructuredCalendarSpec): temporal.api.schedule.v1.StructuredCalendarSpec; - - /** - * Encodes the specified StructuredCalendarSpec message. Does not implicitly {@link temporal.api.schedule.v1.StructuredCalendarSpec.verify|verify} messages. - * @param message StructuredCalendarSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.IStructuredCalendarSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StructuredCalendarSpec message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.StructuredCalendarSpec.verify|verify} messages. - * @param message StructuredCalendarSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.IStructuredCalendarSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StructuredCalendarSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StructuredCalendarSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.StructuredCalendarSpec; - - /** - * Decodes a StructuredCalendarSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StructuredCalendarSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.StructuredCalendarSpec; - - /** - * Creates a StructuredCalendarSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StructuredCalendarSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.StructuredCalendarSpec; - - /** - * Creates a plain object from a StructuredCalendarSpec message. Also converts values to other types if specified. - * @param message StructuredCalendarSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.StructuredCalendarSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StructuredCalendarSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StructuredCalendarSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an IntervalSpec. */ - interface IIntervalSpec { - - /** IntervalSpec interval */ - interval?: (google.protobuf.IDuration|null); - - /** IntervalSpec phase */ - phase?: (google.protobuf.IDuration|null); - } - - /** - * IntervalSpec matches times that can be expressed as: - * epoch + n * interval + phase - * where n is an integer. - * phase defaults to zero if missing. interval is required. - * Both interval and phase must be non-negative and are truncated to the nearest - * second before any calculations. - * For example, an interval of 1 hour with phase of zero would match every hour, - * on the hour. The same interval but a phase of 19 minutes would match every - * xx:19:00. An interval of 28 days with phase zero would match - * 2022-02-17T00:00:00Z (among other times). The same interval with a phase of 3 - * days, 5 hours, and 23 minutes would match 2022-02-20T05:23:00Z instead. - */ - class IntervalSpec implements IIntervalSpec { - - /** - * Constructs a new IntervalSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.IIntervalSpec); - - /** IntervalSpec interval. */ - public interval?: (google.protobuf.IDuration|null); - - /** IntervalSpec phase. */ - public phase?: (google.protobuf.IDuration|null); - - /** - * Creates a new IntervalSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns IntervalSpec instance - */ - public static create(properties?: temporal.api.schedule.v1.IIntervalSpec): temporal.api.schedule.v1.IntervalSpec; - - /** - * Encodes the specified IntervalSpec message. Does not implicitly {@link temporal.api.schedule.v1.IntervalSpec.verify|verify} messages. - * @param message IntervalSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.IIntervalSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IntervalSpec message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.IntervalSpec.verify|verify} messages. - * @param message IntervalSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.IIntervalSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IntervalSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IntervalSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.IntervalSpec; - - /** - * Decodes an IntervalSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IntervalSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.IntervalSpec; - - /** - * Creates an IntervalSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IntervalSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.IntervalSpec; - - /** - * Creates a plain object from an IntervalSpec message. Also converts values to other types if specified. - * @param message IntervalSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.IntervalSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IntervalSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IntervalSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScheduleSpec. */ - interface IScheduleSpec { - - /** Calendar-based specifications of times. */ - structuredCalendar?: (temporal.api.schedule.v1.IStructuredCalendarSpec[]|null); - - /** - * cron_string holds a traditional cron specification as a string. It - * accepts 5, 6, or 7 fields, separated by spaces, and interprets them the - * same way as CalendarSpec. - * 5 fields: minute, hour, day_of_month, month, day_of_week - * 6 fields: minute, hour, day_of_month, month, day_of_week, year - * 7 fields: second, minute, hour, day_of_month, month, day_of_week, year - * If year is not given, it defaults to *. If second is not given, it - * defaults to 0. - * Shorthands `@yearly`, `@monthly`, `@weekly`, `@daily`, and `@hourly` are also - * accepted instead of the 5-7 time fields. - * Optionally, the string can be preceded by CRON_TZ=`` or - * TZ=``, which will get copied to timezone_name. (There must - * not also be a timezone_name present.) - * Optionally "#" followed by a comment can appear at the end of the string. - * Note that the special case that some cron implementations have for - * treating day_of_month and day_of_week as "or" instead of "and" when both - * are set is not implemented. - * `@every` ``[/``] is accepted and gets compiled into an - * IntervalSpec instead. `` and `` should be a decimal integer - * with a unit suffix s, m, h, or d. - */ - cronString?: (string[]|null); - - /** Calendar-based specifications of times. */ - calendar?: (temporal.api.schedule.v1.ICalendarSpec[]|null); - - /** Interval-based specifications of times. */ - interval?: (temporal.api.schedule.v1.IIntervalSpec[]|null); - - /** - * Any timestamps matching any of exclude_* will be skipped. - * Deprecated. Use exclude_structured_calendar. - */ - excludeCalendar?: (temporal.api.schedule.v1.ICalendarSpec[]|null); - - /** ScheduleSpec excludeStructuredCalendar */ - excludeStructuredCalendar?: (temporal.api.schedule.v1.IStructuredCalendarSpec[]|null); - - /** - * If start_time is set, any timestamps before start_time will be skipped. - * (Together, start_time and end_time make an inclusive interval.) - */ - startTime?: (google.protobuf.ITimestamp|null); - - /** If end_time is set, any timestamps after end_time will be skipped. */ - endTime?: (google.protobuf.ITimestamp|null); - - /** - * All timestamps will be incremented by a random value from 0 to this - * amount of jitter. Default: 0 - */ - jitter?: (google.protobuf.IDuration|null); - - /** - * Time zone to interpret all calendar-based specs in. - * - * If unset, defaults to UTC. We recommend using UTC for your application if - * at all possible, to avoid various surprising properties of time zones. - * - * Time zones may be provided by name, corresponding to names in the IANA - * time zone database (see https://www.iana.org/time-zones). The definition - * will be loaded by the Temporal server from the environment it runs in. - * - * If your application requires more control over the time zone definition - * used, it may pass in a complete definition in the form of a TZif file - * from the time zone database. If present, this will be used instead of - * loading anything from the environment. You are then responsible for - * updating timezone_data when the definition changes. - * - * Calendar spec matching is based on literal matching of the clock time - * with no special handling of DST: if you write a calendar spec that fires - * at 2:30am and specify a time zone that follows DST, that action will not - * be triggered on the day that has no 2:30am. Similarly, an action that - * fires at 1:30am will be triggered twice on the day that has two 1:30s. - * - * Also note that no actions are taken on leap-seconds (e.g. 23:59:60 UTC). - */ - timezoneName?: (string|null); - - /** ScheduleSpec timezoneData */ - timezoneData?: (Uint8Array|null); - } - - /** - * ScheduleSpec is a complete description of a set of absolute timestamps - * (possibly infinite) that an action should occur at. The meaning of a - * ScheduleSpec depends only on its contents and never changes, except that the - * definition of a time zone can change over time (most commonly, when daylight - * saving time policy changes for an area). To create a totally self-contained - * ScheduleSpec, use UTC or include timezone_data. - * - * For input, you can provide zero or more of: structured_calendar, calendar, - * cron_string, interval, and exclude_structured_calendar, and all of them will - * be used (the schedule will take action at the union of all of their times, - * minus the ones that match exclude_structured_calendar). - * - * On input, calendar and cron_string fields will be compiled into - * structured_calendar (and maybe interval and timezone_name), so if you - * Describe a schedule, you'll see only structured_calendar, interval, etc. - * - * If a spec has no matching times after the current time, then the schedule - * will be subject to automatic deletion (after several days). - */ - class ScheduleSpec implements IScheduleSpec { - - /** - * Constructs a new ScheduleSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.IScheduleSpec); - - /** Calendar-based specifications of times. */ - public structuredCalendar: temporal.api.schedule.v1.IStructuredCalendarSpec[]; - - /** - * cron_string holds a traditional cron specification as a string. It - * accepts 5, 6, or 7 fields, separated by spaces, and interprets them the - * same way as CalendarSpec. - * 5 fields: minute, hour, day_of_month, month, day_of_week - * 6 fields: minute, hour, day_of_month, month, day_of_week, year - * 7 fields: second, minute, hour, day_of_month, month, day_of_week, year - * If year is not given, it defaults to *. If second is not given, it - * defaults to 0. - * Shorthands `@yearly`, `@monthly`, `@weekly`, `@daily`, and `@hourly` are also - * accepted instead of the 5-7 time fields. - * Optionally, the string can be preceded by CRON_TZ=`` or - * TZ=``, which will get copied to timezone_name. (There must - * not also be a timezone_name present.) - * Optionally "#" followed by a comment can appear at the end of the string. - * Note that the special case that some cron implementations have for - * treating day_of_month and day_of_week as "or" instead of "and" when both - * are set is not implemented. - * `@every` ``[/``] is accepted and gets compiled into an - * IntervalSpec instead. `` and `` should be a decimal integer - * with a unit suffix s, m, h, or d. - */ - public cronString: string[]; - - /** Calendar-based specifications of times. */ - public calendar: temporal.api.schedule.v1.ICalendarSpec[]; - - /** Interval-based specifications of times. */ - public interval: temporal.api.schedule.v1.IIntervalSpec[]; - - /** - * Any timestamps matching any of exclude_* will be skipped. - * Deprecated. Use exclude_structured_calendar. - */ - public excludeCalendar: temporal.api.schedule.v1.ICalendarSpec[]; - - /** ScheduleSpec excludeStructuredCalendar. */ - public excludeStructuredCalendar: temporal.api.schedule.v1.IStructuredCalendarSpec[]; - - /** - * If start_time is set, any timestamps before start_time will be skipped. - * (Together, start_time and end_time make an inclusive interval.) - */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** If end_time is set, any timestamps after end_time will be skipped. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** - * All timestamps will be incremented by a random value from 0 to this - * amount of jitter. Default: 0 - */ - public jitter?: (google.protobuf.IDuration|null); - - /** - * Time zone to interpret all calendar-based specs in. - * - * If unset, defaults to UTC. We recommend using UTC for your application if - * at all possible, to avoid various surprising properties of time zones. - * - * Time zones may be provided by name, corresponding to names in the IANA - * time zone database (see https://www.iana.org/time-zones). The definition - * will be loaded by the Temporal server from the environment it runs in. - * - * If your application requires more control over the time zone definition - * used, it may pass in a complete definition in the form of a TZif file - * from the time zone database. If present, this will be used instead of - * loading anything from the environment. You are then responsible for - * updating timezone_data when the definition changes. - * - * Calendar spec matching is based on literal matching of the clock time - * with no special handling of DST: if you write a calendar spec that fires - * at 2:30am and specify a time zone that follows DST, that action will not - * be triggered on the day that has no 2:30am. Similarly, an action that - * fires at 1:30am will be triggered twice on the day that has two 1:30s. - * - * Also note that no actions are taken on leap-seconds (e.g. 23:59:60 UTC). - */ - public timezoneName: string; - - /** ScheduleSpec timezoneData. */ - public timezoneData: Uint8Array; - - /** - * Creates a new ScheduleSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ScheduleSpec instance - */ - public static create(properties?: temporal.api.schedule.v1.IScheduleSpec): temporal.api.schedule.v1.ScheduleSpec; - - /** - * Encodes the specified ScheduleSpec message. Does not implicitly {@link temporal.api.schedule.v1.ScheduleSpec.verify|verify} messages. - * @param message ScheduleSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.IScheduleSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduleSpec message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.ScheduleSpec.verify|verify} messages. - * @param message ScheduleSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.IScheduleSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduleSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduleSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.ScheduleSpec; - - /** - * Decodes a ScheduleSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduleSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.ScheduleSpec; - - /** - * Creates a ScheduleSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduleSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.ScheduleSpec; - - /** - * Creates a plain object from a ScheduleSpec message. Also converts values to other types if specified. - * @param message ScheduleSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.ScheduleSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduleSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScheduleSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SchedulePolicies. */ - interface ISchedulePolicies { - - /** - * Policy for overlaps. - * Note that this can be changed after a schedule has taken some actions, - * and some changes might produce unintuitive results. In general, the later - * policy overrides the earlier policy. - */ - overlapPolicy?: (temporal.api.enums.v1.ScheduleOverlapPolicy|null); - - /** - * Policy for catchups: - * If the Temporal server misses an action due to one or more components - * being down, and comes back up, the action will be run if the scheduled - * time is within this window from the current time. - * This value defaults to one year, and can't be less than 10 seconds. - */ - catchupWindow?: (google.protobuf.IDuration|null); - - /** - * If true, and a workflow run fails or times out, turn on "paused". - * This applies after retry policies: the full chain of retries must fail to - * trigger a pause here. - */ - pauseOnFailure?: (boolean|null); - - /** - * If true, and the action would start a workflow, a timestamp will not be - * appended to the scheduled workflow id. - */ - keepOriginalWorkflowId?: (boolean|null); - } - - /** Represents a SchedulePolicies. */ - class SchedulePolicies implements ISchedulePolicies { - - /** - * Constructs a new SchedulePolicies. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.ISchedulePolicies); - - /** - * Policy for overlaps. - * Note that this can be changed after a schedule has taken some actions, - * and some changes might produce unintuitive results. In general, the later - * policy overrides the earlier policy. - */ - public overlapPolicy: temporal.api.enums.v1.ScheduleOverlapPolicy; - - /** - * Policy for catchups: - * If the Temporal server misses an action due to one or more components - * being down, and comes back up, the action will be run if the scheduled - * time is within this window from the current time. - * This value defaults to one year, and can't be less than 10 seconds. - */ - public catchupWindow?: (google.protobuf.IDuration|null); - - /** - * If true, and a workflow run fails or times out, turn on "paused". - * This applies after retry policies: the full chain of retries must fail to - * trigger a pause here. - */ - public pauseOnFailure: boolean; - - /** - * If true, and the action would start a workflow, a timestamp will not be - * appended to the scheduled workflow id. - */ - public keepOriginalWorkflowId: boolean; - - /** - * Creates a new SchedulePolicies instance using the specified properties. - * @param [properties] Properties to set - * @returns SchedulePolicies instance - */ - public static create(properties?: temporal.api.schedule.v1.ISchedulePolicies): temporal.api.schedule.v1.SchedulePolicies; - - /** - * Encodes the specified SchedulePolicies message. Does not implicitly {@link temporal.api.schedule.v1.SchedulePolicies.verify|verify} messages. - * @param message SchedulePolicies message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.ISchedulePolicies, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchedulePolicies message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.SchedulePolicies.verify|verify} messages. - * @param message SchedulePolicies message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.ISchedulePolicies, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchedulePolicies message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchedulePolicies - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.SchedulePolicies; - - /** - * Decodes a SchedulePolicies message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchedulePolicies - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.SchedulePolicies; - - /** - * Creates a SchedulePolicies message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchedulePolicies - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.SchedulePolicies; - - /** - * Creates a plain object from a SchedulePolicies message. Also converts values to other types if specified. - * @param message SchedulePolicies - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.SchedulePolicies, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchedulePolicies to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SchedulePolicies - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScheduleAction. */ - interface IScheduleAction { - - /** - * All fields of NewWorkflowExecutionInfo are valid except for: - * - workflow_id_reuse_policy - * - cron_schedule - * The workflow id of the started workflow may not match this exactly, - * it may have a timestamp appended for uniqueness. - */ - startWorkflow?: (temporal.api.workflow.v1.INewWorkflowExecutionInfo|null); - } - - /** Represents a ScheduleAction. */ - class ScheduleAction implements IScheduleAction { - - /** - * Constructs a new ScheduleAction. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.IScheduleAction); - - /** - * All fields of NewWorkflowExecutionInfo are valid except for: - * - workflow_id_reuse_policy - * - cron_schedule - * The workflow id of the started workflow may not match this exactly, - * it may have a timestamp appended for uniqueness. - */ - public startWorkflow?: (temporal.api.workflow.v1.INewWorkflowExecutionInfo|null); - - /** ScheduleAction action. */ - public action?: "startWorkflow"; - - /** - * Creates a new ScheduleAction instance using the specified properties. - * @param [properties] Properties to set - * @returns ScheduleAction instance - */ - public static create(properties?: temporal.api.schedule.v1.IScheduleAction): temporal.api.schedule.v1.ScheduleAction; - - /** - * Encodes the specified ScheduleAction message. Does not implicitly {@link temporal.api.schedule.v1.ScheduleAction.verify|verify} messages. - * @param message ScheduleAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.IScheduleAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduleAction message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.ScheduleAction.verify|verify} messages. - * @param message ScheduleAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.IScheduleAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduleAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduleAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.ScheduleAction; - - /** - * Decodes a ScheduleAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduleAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.ScheduleAction; - - /** - * Creates a ScheduleAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduleAction - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.ScheduleAction; - - /** - * Creates a plain object from a ScheduleAction message. Also converts values to other types if specified. - * @param message ScheduleAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.ScheduleAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduleAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScheduleAction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScheduleActionResult. */ - interface IScheduleActionResult { - - /** Time that the action was taken (according to the schedule, including jitter). */ - scheduleTime?: (google.protobuf.ITimestamp|null); - - /** Time that the action was taken (real time). */ - actualTime?: (google.protobuf.ITimestamp|null); - - /** If action was start_workflow: */ - startWorkflowResult?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * If the action was start_workflow, this field will reflect an - * eventually-consistent view of the started workflow's status. - */ - startWorkflowStatus?: (temporal.api.enums.v1.WorkflowExecutionStatus|null); - } - - /** Represents a ScheduleActionResult. */ - class ScheduleActionResult implements IScheduleActionResult { - - /** - * Constructs a new ScheduleActionResult. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.IScheduleActionResult); - - /** Time that the action was taken (according to the schedule, including jitter). */ - public scheduleTime?: (google.protobuf.ITimestamp|null); - - /** Time that the action was taken (real time). */ - public actualTime?: (google.protobuf.ITimestamp|null); - - /** If action was start_workflow: */ - public startWorkflowResult?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** - * If the action was start_workflow, this field will reflect an - * eventually-consistent view of the started workflow's status. - */ - public startWorkflowStatus: temporal.api.enums.v1.WorkflowExecutionStatus; - - /** - * Creates a new ScheduleActionResult instance using the specified properties. - * @param [properties] Properties to set - * @returns ScheduleActionResult instance - */ - public static create(properties?: temporal.api.schedule.v1.IScheduleActionResult): temporal.api.schedule.v1.ScheduleActionResult; - - /** - * Encodes the specified ScheduleActionResult message. Does not implicitly {@link temporal.api.schedule.v1.ScheduleActionResult.verify|verify} messages. - * @param message ScheduleActionResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.IScheduleActionResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduleActionResult message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.ScheduleActionResult.verify|verify} messages. - * @param message ScheduleActionResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.IScheduleActionResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduleActionResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduleActionResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.ScheduleActionResult; - - /** - * Decodes a ScheduleActionResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduleActionResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.ScheduleActionResult; - - /** - * Creates a ScheduleActionResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduleActionResult - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.ScheduleActionResult; - - /** - * Creates a plain object from a ScheduleActionResult message. Also converts values to other types if specified. - * @param message ScheduleActionResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.ScheduleActionResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduleActionResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScheduleActionResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScheduleState. */ - interface IScheduleState { - - /** - * Informative human-readable message with contextual notes, e.g. the reason - * a schedule is paused. The system may overwrite this message on certain - * conditions, e.g. when pause-on-failure happens. - */ - notes?: (string|null); - - /** If true, do not take any actions based on the schedule spec. */ - paused?: (boolean|null); - - /** - * If limited_actions is true, decrement remaining_actions after each - * action, and do not take any more scheduled actions if remaining_actions - * is zero. Actions may still be taken by explicit request (i.e. trigger - * immediately or backfill). Skipped actions (due to overlap policy) do not - * count against remaining actions. - * If a schedule has no more remaining actions, then the schedule will be - * subject to automatic deletion (after several days). - */ - limitedActions?: (boolean|null); - - /** ScheduleState remainingActions */ - remainingActions?: (Long|null); - } - - /** Represents a ScheduleState. */ - class ScheduleState implements IScheduleState { - - /** - * Constructs a new ScheduleState. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.IScheduleState); - - /** - * Informative human-readable message with contextual notes, e.g. the reason - * a schedule is paused. The system may overwrite this message on certain - * conditions, e.g. when pause-on-failure happens. - */ - public notes: string; - - /** If true, do not take any actions based on the schedule spec. */ - public paused: boolean; - - /** - * If limited_actions is true, decrement remaining_actions after each - * action, and do not take any more scheduled actions if remaining_actions - * is zero. Actions may still be taken by explicit request (i.e. trigger - * immediately or backfill). Skipped actions (due to overlap policy) do not - * count against remaining actions. - * If a schedule has no more remaining actions, then the schedule will be - * subject to automatic deletion (after several days). - */ - public limitedActions: boolean; - - /** ScheduleState remainingActions. */ - public remainingActions: Long; - - /** - * Creates a new ScheduleState instance using the specified properties. - * @param [properties] Properties to set - * @returns ScheduleState instance - */ - public static create(properties?: temporal.api.schedule.v1.IScheduleState): temporal.api.schedule.v1.ScheduleState; - - /** - * Encodes the specified ScheduleState message. Does not implicitly {@link temporal.api.schedule.v1.ScheduleState.verify|verify} messages. - * @param message ScheduleState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.IScheduleState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduleState message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.ScheduleState.verify|verify} messages. - * @param message ScheduleState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.IScheduleState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduleState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduleState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.ScheduleState; - - /** - * Decodes a ScheduleState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduleState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.ScheduleState; - - /** - * Creates a ScheduleState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduleState - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.ScheduleState; - - /** - * Creates a plain object from a ScheduleState message. Also converts values to other types if specified. - * @param message ScheduleState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.ScheduleState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduleState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScheduleState - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TriggerImmediatelyRequest. */ - interface ITriggerImmediatelyRequest { - - /** If set, override overlap policy for this one request. */ - overlapPolicy?: (temporal.api.enums.v1.ScheduleOverlapPolicy|null); - - /** - * Timestamp used for the identity of the target workflow. - * If not set the default value is the current time. - */ - scheduledTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a TriggerImmediatelyRequest. */ - class TriggerImmediatelyRequest implements ITriggerImmediatelyRequest { - - /** - * Constructs a new TriggerImmediatelyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.ITriggerImmediatelyRequest); - - /** If set, override overlap policy for this one request. */ - public overlapPolicy: temporal.api.enums.v1.ScheduleOverlapPolicy; - - /** - * Timestamp used for the identity of the target workflow. - * If not set the default value is the current time. - */ - public scheduledTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new TriggerImmediatelyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TriggerImmediatelyRequest instance - */ - public static create(properties?: temporal.api.schedule.v1.ITriggerImmediatelyRequest): temporal.api.schedule.v1.TriggerImmediatelyRequest; - - /** - * Encodes the specified TriggerImmediatelyRequest message. Does not implicitly {@link temporal.api.schedule.v1.TriggerImmediatelyRequest.verify|verify} messages. - * @param message TriggerImmediatelyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.ITriggerImmediatelyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TriggerImmediatelyRequest message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.TriggerImmediatelyRequest.verify|verify} messages. - * @param message TriggerImmediatelyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.ITriggerImmediatelyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TriggerImmediatelyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TriggerImmediatelyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.TriggerImmediatelyRequest; - - /** - * Decodes a TriggerImmediatelyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TriggerImmediatelyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.TriggerImmediatelyRequest; - - /** - * Creates a TriggerImmediatelyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TriggerImmediatelyRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.TriggerImmediatelyRequest; - - /** - * Creates a plain object from a TriggerImmediatelyRequest message. Also converts values to other types if specified. - * @param message TriggerImmediatelyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.TriggerImmediatelyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TriggerImmediatelyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TriggerImmediatelyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackfillRequest. */ - interface IBackfillRequest { - - /** - * Time range to evaluate schedule in. Currently, this time range is - * exclusive on start_time and inclusive on end_time. (This is admittedly - * counterintuitive and it may change in the future, so to be safe, use a - * start time strictly before a scheduled time.) Also note that an action - * nominally scheduled in the interval but with jitter that pushes it after - * end_time will not be included. - */ - startTime?: (google.protobuf.ITimestamp|null); - - /** BackfillRequest endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** If set, override overlap policy for this request. */ - overlapPolicy?: (temporal.api.enums.v1.ScheduleOverlapPolicy|null); - } - - /** Represents a BackfillRequest. */ - class BackfillRequest implements IBackfillRequest { - - /** - * Constructs a new BackfillRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.IBackfillRequest); - - /** - * Time range to evaluate schedule in. Currently, this time range is - * exclusive on start_time and inclusive on end_time. (This is admittedly - * counterintuitive and it may change in the future, so to be safe, use a - * start time strictly before a scheduled time.) Also note that an action - * nominally scheduled in the interval but with jitter that pushes it after - * end_time will not be included. - */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** BackfillRequest endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** If set, override overlap policy for this request. */ - public overlapPolicy: temporal.api.enums.v1.ScheduleOverlapPolicy; - - /** - * Creates a new BackfillRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns BackfillRequest instance - */ - public static create(properties?: temporal.api.schedule.v1.IBackfillRequest): temporal.api.schedule.v1.BackfillRequest; - - /** - * Encodes the specified BackfillRequest message. Does not implicitly {@link temporal.api.schedule.v1.BackfillRequest.verify|verify} messages. - * @param message BackfillRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.IBackfillRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackfillRequest message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.BackfillRequest.verify|verify} messages. - * @param message BackfillRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.IBackfillRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackfillRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackfillRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.BackfillRequest; - - /** - * Decodes a BackfillRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackfillRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.BackfillRequest; - - /** - * Creates a BackfillRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackfillRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.BackfillRequest; - - /** - * Creates a plain object from a BackfillRequest message. Also converts values to other types if specified. - * @param message BackfillRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.BackfillRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackfillRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackfillRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SchedulePatch. */ - interface ISchedulePatch { - - /** If set, trigger one action immediately. */ - triggerImmediately?: (temporal.api.schedule.v1.ITriggerImmediatelyRequest|null); - - /** - * If set, runs though the specified time period(s) and takes actions as if that time - * passed by right now, all at once. The overlap policy can be overridden for the - * scope of the backfill. - */ - backfillRequest?: (temporal.api.schedule.v1.IBackfillRequest[]|null); - - /** - * If set, change the state to paused or unpaused (respectively) and set the - * notes field to the value of the string. - */ - pause?: (string|null); - - /** SchedulePatch unpause */ - unpause?: (string|null); - } - - /** Represents a SchedulePatch. */ - class SchedulePatch implements ISchedulePatch { - - /** - * Constructs a new SchedulePatch. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.ISchedulePatch); - - /** If set, trigger one action immediately. */ - public triggerImmediately?: (temporal.api.schedule.v1.ITriggerImmediatelyRequest|null); - - /** - * If set, runs though the specified time period(s) and takes actions as if that time - * passed by right now, all at once. The overlap policy can be overridden for the - * scope of the backfill. - */ - public backfillRequest: temporal.api.schedule.v1.IBackfillRequest[]; - - /** - * If set, change the state to paused or unpaused (respectively) and set the - * notes field to the value of the string. - */ - public pause: string; - - /** SchedulePatch unpause. */ - public unpause: string; - - /** - * Creates a new SchedulePatch instance using the specified properties. - * @param [properties] Properties to set - * @returns SchedulePatch instance - */ - public static create(properties?: temporal.api.schedule.v1.ISchedulePatch): temporal.api.schedule.v1.SchedulePatch; - - /** - * Encodes the specified SchedulePatch message. Does not implicitly {@link temporal.api.schedule.v1.SchedulePatch.verify|verify} messages. - * @param message SchedulePatch message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.ISchedulePatch, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchedulePatch message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.SchedulePatch.verify|verify} messages. - * @param message SchedulePatch message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.ISchedulePatch, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchedulePatch message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchedulePatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.SchedulePatch; - - /** - * Decodes a SchedulePatch message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchedulePatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.SchedulePatch; - - /** - * Creates a SchedulePatch message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchedulePatch - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.SchedulePatch; - - /** - * Creates a plain object from a SchedulePatch message. Also converts values to other types if specified. - * @param message SchedulePatch - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.SchedulePatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchedulePatch to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SchedulePatch - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScheduleInfo. */ - interface IScheduleInfo { - - /** Number of actions taken so far. */ - actionCount?: (Long|null); - - /** Number of times a scheduled action was skipped due to missing the catchup window. */ - missedCatchupWindow?: (Long|null); - - /** Number of skipped actions due to overlap. */ - overlapSkipped?: (Long|null); - - /** Number of dropped actions due to buffer limit. */ - bufferDropped?: (Long|null); - - /** - * Number of actions in the buffer. The buffer holds the actions that cannot - * be immediately triggered (due to the overlap policy). These actions can be a result of - * the normal schedule or a backfill. - */ - bufferSize?: (Long|null); - - /** - * Currently-running workflows started by this schedule. (There might be - * more than one if the overlap policy allows overlaps.) - * Note that the run_ids in here are the original execution run ids as - * started by the schedule. If the workflows retried, did continue-as-new, - * or were reset, they might still be running but with a different run_id. - */ - runningWorkflows?: (temporal.api.common.v1.IWorkflowExecution[]|null); - - /** Most recent ten actual action times (including manual triggers). */ - recentActions?: (temporal.api.schedule.v1.IScheduleActionResult[]|null); - - /** Next ten scheduled action times. */ - futureActionTimes?: (google.protobuf.ITimestamp[]|null); - - /** Timestamps of schedule creation and last update. */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ScheduleInfo updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Deprecated. */ - invalidScheduleError?: (string|null); - } - - /** Represents a ScheduleInfo. */ - class ScheduleInfo implements IScheduleInfo { - - /** - * Constructs a new ScheduleInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.IScheduleInfo); - - /** Number of actions taken so far. */ - public actionCount: Long; - - /** Number of times a scheduled action was skipped due to missing the catchup window. */ - public missedCatchupWindow: Long; - - /** Number of skipped actions due to overlap. */ - public overlapSkipped: Long; - - /** Number of dropped actions due to buffer limit. */ - public bufferDropped: Long; - - /** - * Number of actions in the buffer. The buffer holds the actions that cannot - * be immediately triggered (due to the overlap policy). These actions can be a result of - * the normal schedule or a backfill. - */ - public bufferSize: Long; - - /** - * Currently-running workflows started by this schedule. (There might be - * more than one if the overlap policy allows overlaps.) - * Note that the run_ids in here are the original execution run ids as - * started by the schedule. If the workflows retried, did continue-as-new, - * or were reset, they might still be running but with a different run_id. - */ - public runningWorkflows: temporal.api.common.v1.IWorkflowExecution[]; - - /** Most recent ten actual action times (including manual triggers). */ - public recentActions: temporal.api.schedule.v1.IScheduleActionResult[]; - - /** Next ten scheduled action times. */ - public futureActionTimes: google.protobuf.ITimestamp[]; - - /** Timestamps of schedule creation and last update. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ScheduleInfo updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Deprecated. */ - public invalidScheduleError: string; - - /** - * Creates a new ScheduleInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ScheduleInfo instance - */ - public static create(properties?: temporal.api.schedule.v1.IScheduleInfo): temporal.api.schedule.v1.ScheduleInfo; - - /** - * Encodes the specified ScheduleInfo message. Does not implicitly {@link temporal.api.schedule.v1.ScheduleInfo.verify|verify} messages. - * @param message ScheduleInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.IScheduleInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduleInfo message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.ScheduleInfo.verify|verify} messages. - * @param message ScheduleInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.IScheduleInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduleInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.ScheduleInfo; - - /** - * Decodes a ScheduleInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.ScheduleInfo; - - /** - * Creates a ScheduleInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduleInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.ScheduleInfo; - - /** - * Creates a plain object from a ScheduleInfo message. Also converts values to other types if specified. - * @param message ScheduleInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.ScheduleInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduleInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScheduleInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Schedule. */ - interface ISchedule { - - /** Schedule spec */ - spec?: (temporal.api.schedule.v1.IScheduleSpec|null); - - /** Schedule action */ - action?: (temporal.api.schedule.v1.IScheduleAction|null); - - /** Schedule policies */ - policies?: (temporal.api.schedule.v1.ISchedulePolicies|null); - - /** Schedule state */ - state?: (temporal.api.schedule.v1.IScheduleState|null); - } - - /** Represents a Schedule. */ - class Schedule implements ISchedule { - - /** - * Constructs a new Schedule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.ISchedule); - - /** Schedule spec. */ - public spec?: (temporal.api.schedule.v1.IScheduleSpec|null); - - /** Schedule action. */ - public action?: (temporal.api.schedule.v1.IScheduleAction|null); - - /** Schedule policies. */ - public policies?: (temporal.api.schedule.v1.ISchedulePolicies|null); - - /** Schedule state. */ - public state?: (temporal.api.schedule.v1.IScheduleState|null); - - /** - * Creates a new Schedule instance using the specified properties. - * @param [properties] Properties to set - * @returns Schedule instance - */ - public static create(properties?: temporal.api.schedule.v1.ISchedule): temporal.api.schedule.v1.Schedule; - - /** - * Encodes the specified Schedule message. Does not implicitly {@link temporal.api.schedule.v1.Schedule.verify|verify} messages. - * @param message Schedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Schedule message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.Schedule.verify|verify} messages. - * @param message Schedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Schedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Schedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.Schedule; - - /** - * Decodes a Schedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Schedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.Schedule; - - /** - * Creates a Schedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Schedule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.Schedule; - - /** - * Creates a plain object from a Schedule message. Also converts values to other types if specified. - * @param message Schedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.Schedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Schedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Schedule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScheduleListInfo. */ - interface IScheduleListInfo { - - /** - * From spec: - * Some fields are dropped from this copy of spec: timezone_data - */ - spec?: (temporal.api.schedule.v1.IScheduleSpec|null); - - /** - * From action: - * Action is a oneof field, but we need to encode this in JSON and oneof fields don't work - * well with JSON. If action is start_workflow, this is set: - */ - workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** From state: */ - notes?: (string|null); - - /** ScheduleListInfo paused */ - paused?: (boolean|null); - - /** From info (maybe fewer entries): */ - recentActions?: (temporal.api.schedule.v1.IScheduleActionResult[]|null); - - /** ScheduleListInfo futureActionTimes */ - futureActionTimes?: (google.protobuf.ITimestamp[]|null); - } - - /** - * ScheduleListInfo is an abbreviated set of values from Schedule and ScheduleInfo - * that's returned in ListSchedules. - */ - class ScheduleListInfo implements IScheduleListInfo { - - /** - * Constructs a new ScheduleListInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.IScheduleListInfo); - - /** - * From spec: - * Some fields are dropped from this copy of spec: timezone_data - */ - public spec?: (temporal.api.schedule.v1.IScheduleSpec|null); - - /** - * From action: - * Action is a oneof field, but we need to encode this in JSON and oneof fields don't work - * well with JSON. If action is start_workflow, this is set: - */ - public workflowType?: (temporal.api.common.v1.IWorkflowType|null); - - /** From state: */ - public notes: string; - - /** ScheduleListInfo paused. */ - public paused: boolean; - - /** From info (maybe fewer entries): */ - public recentActions: temporal.api.schedule.v1.IScheduleActionResult[]; - - /** ScheduleListInfo futureActionTimes. */ - public futureActionTimes: google.protobuf.ITimestamp[]; - - /** - * Creates a new ScheduleListInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ScheduleListInfo instance - */ - public static create(properties?: temporal.api.schedule.v1.IScheduleListInfo): temporal.api.schedule.v1.ScheduleListInfo; - - /** - * Encodes the specified ScheduleListInfo message. Does not implicitly {@link temporal.api.schedule.v1.ScheduleListInfo.verify|verify} messages. - * @param message ScheduleListInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.IScheduleListInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduleListInfo message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.ScheduleListInfo.verify|verify} messages. - * @param message ScheduleListInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.IScheduleListInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduleListInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduleListInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.ScheduleListInfo; - - /** - * Decodes a ScheduleListInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduleListInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.ScheduleListInfo; - - /** - * Creates a ScheduleListInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduleListInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.ScheduleListInfo; - - /** - * Creates a plain object from a ScheduleListInfo message. Also converts values to other types if specified. - * @param message ScheduleListInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.ScheduleListInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduleListInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScheduleListInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScheduleListEntry. */ - interface IScheduleListEntry { - - /** ScheduleListEntry scheduleId */ - scheduleId?: (string|null); - - /** ScheduleListEntry memo */ - memo?: (temporal.api.common.v1.IMemo|null); - - /** ScheduleListEntry searchAttributes */ - searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** ScheduleListEntry info */ - info?: (temporal.api.schedule.v1.IScheduleListInfo|null); - } - - /** ScheduleListEntry is returned by ListSchedules. */ - class ScheduleListEntry implements IScheduleListEntry { - - /** - * Constructs a new ScheduleListEntry. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.schedule.v1.IScheduleListEntry); - - /** ScheduleListEntry scheduleId. */ - public scheduleId: string; - - /** ScheduleListEntry memo. */ - public memo?: (temporal.api.common.v1.IMemo|null); - - /** ScheduleListEntry searchAttributes. */ - public searchAttributes?: (temporal.api.common.v1.ISearchAttributes|null); - - /** ScheduleListEntry info. */ - public info?: (temporal.api.schedule.v1.IScheduleListInfo|null); - - /** - * Creates a new ScheduleListEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns ScheduleListEntry instance - */ - public static create(properties?: temporal.api.schedule.v1.IScheduleListEntry): temporal.api.schedule.v1.ScheduleListEntry; - - /** - * Encodes the specified ScheduleListEntry message. Does not implicitly {@link temporal.api.schedule.v1.ScheduleListEntry.verify|verify} messages. - * @param message ScheduleListEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.schedule.v1.IScheduleListEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduleListEntry message, length delimited. Does not implicitly {@link temporal.api.schedule.v1.ScheduleListEntry.verify|verify} messages. - * @param message ScheduleListEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.schedule.v1.IScheduleListEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduleListEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduleListEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.schedule.v1.ScheduleListEntry; - - /** - * Decodes a ScheduleListEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduleListEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.schedule.v1.ScheduleListEntry; - - /** - * Creates a ScheduleListEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduleListEntry - */ - public static fromObject(object: { [k: string]: any }): temporal.api.schedule.v1.ScheduleListEntry; - - /** - * Creates a plain object from a ScheduleListEntry message. Also converts values to other types if specified. - * @param message ScheduleListEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.schedule.v1.ScheduleListEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduleListEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScheduleListEntry - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace version. */ - namespace version { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a ReleaseInfo. */ - interface IReleaseInfo { - - /** ReleaseInfo version */ - version?: (string|null); - - /** ReleaseInfo releaseTime */ - releaseTime?: (google.protobuf.ITimestamp|null); - - /** ReleaseInfo notes */ - notes?: (string|null); - } - - /** ReleaseInfo contains information about specific version of temporal. */ - class ReleaseInfo implements IReleaseInfo { - - /** - * Constructs a new ReleaseInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.version.v1.IReleaseInfo); - - /** ReleaseInfo version. */ - public version: string; - - /** ReleaseInfo releaseTime. */ - public releaseTime?: (google.protobuf.ITimestamp|null); - - /** ReleaseInfo notes. */ - public notes: string; - - /** - * Creates a new ReleaseInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ReleaseInfo instance - */ - public static create(properties?: temporal.api.version.v1.IReleaseInfo): temporal.api.version.v1.ReleaseInfo; - - /** - * Encodes the specified ReleaseInfo message. Does not implicitly {@link temporal.api.version.v1.ReleaseInfo.verify|verify} messages. - * @param message ReleaseInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.version.v1.IReleaseInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReleaseInfo message, length delimited. Does not implicitly {@link temporal.api.version.v1.ReleaseInfo.verify|verify} messages. - * @param message ReleaseInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.version.v1.IReleaseInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReleaseInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReleaseInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.version.v1.ReleaseInfo; - - /** - * Decodes a ReleaseInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReleaseInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.version.v1.ReleaseInfo; - - /** - * Creates a ReleaseInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReleaseInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.version.v1.ReleaseInfo; - - /** - * Creates a plain object from a ReleaseInfo message. Also converts values to other types if specified. - * @param message ReleaseInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.version.v1.ReleaseInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReleaseInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReleaseInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Alert. */ - interface IAlert { - - /** Alert message */ - message?: (string|null); - - /** Alert severity */ - severity?: (temporal.api.enums.v1.Severity|null); - } - - /** Alert contains notification and severity. */ - class Alert implements IAlert { - - /** - * Constructs a new Alert. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.version.v1.IAlert); - - /** Alert message. */ - public message: string; - - /** Alert severity. */ - public severity: temporal.api.enums.v1.Severity; - - /** - * Creates a new Alert instance using the specified properties. - * @param [properties] Properties to set - * @returns Alert instance - */ - public static create(properties?: temporal.api.version.v1.IAlert): temporal.api.version.v1.Alert; - - /** - * Encodes the specified Alert message. Does not implicitly {@link temporal.api.version.v1.Alert.verify|verify} messages. - * @param message Alert message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.version.v1.IAlert, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Alert message, length delimited. Does not implicitly {@link temporal.api.version.v1.Alert.verify|verify} messages. - * @param message Alert message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.version.v1.IAlert, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Alert message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Alert - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.version.v1.Alert; - - /** - * Decodes an Alert message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Alert - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.version.v1.Alert; - - /** - * Creates an Alert message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Alert - */ - public static fromObject(object: { [k: string]: any }): temporal.api.version.v1.Alert; - - /** - * Creates a plain object from an Alert message. Also converts values to other types if specified. - * @param message Alert - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.version.v1.Alert, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Alert to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Alert - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VersionInfo. */ - interface IVersionInfo { - - /** VersionInfo current */ - current?: (temporal.api.version.v1.IReleaseInfo|null); - - /** VersionInfo recommended */ - recommended?: (temporal.api.version.v1.IReleaseInfo|null); - - /** VersionInfo instructions */ - instructions?: (string|null); - - /** VersionInfo alerts */ - alerts?: (temporal.api.version.v1.IAlert[]|null); - - /** VersionInfo lastUpdateTime */ - lastUpdateTime?: (google.protobuf.ITimestamp|null); - } - - /** VersionInfo contains details about current and recommended release versions as well as alerts and upgrade instructions. */ - class VersionInfo implements IVersionInfo { - - /** - * Constructs a new VersionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.version.v1.IVersionInfo); - - /** VersionInfo current. */ - public current?: (temporal.api.version.v1.IReleaseInfo|null); - - /** VersionInfo recommended. */ - public recommended?: (temporal.api.version.v1.IReleaseInfo|null); - - /** VersionInfo instructions. */ - public instructions: string; - - /** VersionInfo alerts. */ - public alerts: temporal.api.version.v1.IAlert[]; - - /** VersionInfo lastUpdateTime. */ - public lastUpdateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new VersionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VersionInfo instance - */ - public static create(properties?: temporal.api.version.v1.IVersionInfo): temporal.api.version.v1.VersionInfo; - - /** - * Encodes the specified VersionInfo message. Does not implicitly {@link temporal.api.version.v1.VersionInfo.verify|verify} messages. - * @param message VersionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.version.v1.IVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VersionInfo message, length delimited. Does not implicitly {@link temporal.api.version.v1.VersionInfo.verify|verify} messages. - * @param message VersionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.version.v1.IVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VersionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.version.v1.VersionInfo; - - /** - * Decodes a VersionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.version.v1.VersionInfo; - - /** - * Creates a VersionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VersionInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.version.v1.VersionInfo; - - /** - * Creates a plain object from a VersionInfo message. Also converts values to other types if specified. - * @param message VersionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.version.v1.VersionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VersionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VersionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace batch. */ - namespace batch { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a BatchOperationInfo. */ - interface IBatchOperationInfo { - - /** Batch job ID */ - jobId?: (string|null); - - /** Batch operation state */ - state?: (temporal.api.enums.v1.BatchOperationState|null); - - /** Batch operation start time */ - startTime?: (google.protobuf.ITimestamp|null); - - /** Batch operation close time */ - closeTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a BatchOperationInfo. */ - class BatchOperationInfo implements IBatchOperationInfo { - - /** - * Constructs a new BatchOperationInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.batch.v1.IBatchOperationInfo); - - /** Batch job ID */ - public jobId: string; - - /** Batch operation state */ - public state: temporal.api.enums.v1.BatchOperationState; - - /** Batch operation start time */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** Batch operation close time */ - public closeTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new BatchOperationInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchOperationInfo instance - */ - public static create(properties?: temporal.api.batch.v1.IBatchOperationInfo): temporal.api.batch.v1.BatchOperationInfo; - - /** - * Encodes the specified BatchOperationInfo message. Does not implicitly {@link temporal.api.batch.v1.BatchOperationInfo.verify|verify} messages. - * @param message BatchOperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.batch.v1.IBatchOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchOperationInfo message, length delimited. Does not implicitly {@link temporal.api.batch.v1.BatchOperationInfo.verify|verify} messages. - * @param message BatchOperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.batch.v1.IBatchOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchOperationInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchOperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.batch.v1.BatchOperationInfo; - - /** - * Decodes a BatchOperationInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchOperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.batch.v1.BatchOperationInfo; - - /** - * Creates a BatchOperationInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchOperationInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.batch.v1.BatchOperationInfo; - - /** - * Creates a plain object from a BatchOperationInfo message. Also converts values to other types if specified. - * @param message BatchOperationInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.batch.v1.BatchOperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchOperationInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchOperationInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchOperationTermination. */ - interface IBatchOperationTermination { - - /** Serialized value(s) to provide to the termination event */ - details?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - identity?: (string|null); - } - - /** - * BatchOperationTermination sends terminate requests to batch workflows. - * Keep the parameter in sync with temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest. - * Ignore first_execution_run_id because this is used for single workflow operation. - */ - class BatchOperationTermination implements IBatchOperationTermination { - - /** - * Constructs a new BatchOperationTermination. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.batch.v1.IBatchOperationTermination); - - /** Serialized value(s) to provide to the termination event */ - public details?: (temporal.api.common.v1.IPayloads|null); - - /** The identity of the worker/client */ - public identity: string; - - /** - * Creates a new BatchOperationTermination instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchOperationTermination instance - */ - public static create(properties?: temporal.api.batch.v1.IBatchOperationTermination): temporal.api.batch.v1.BatchOperationTermination; - - /** - * Encodes the specified BatchOperationTermination message. Does not implicitly {@link temporal.api.batch.v1.BatchOperationTermination.verify|verify} messages. - * @param message BatchOperationTermination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.batch.v1.IBatchOperationTermination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchOperationTermination message, length delimited. Does not implicitly {@link temporal.api.batch.v1.BatchOperationTermination.verify|verify} messages. - * @param message BatchOperationTermination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.batch.v1.IBatchOperationTermination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchOperationTermination message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchOperationTermination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.batch.v1.BatchOperationTermination; - - /** - * Decodes a BatchOperationTermination message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchOperationTermination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.batch.v1.BatchOperationTermination; - - /** - * Creates a BatchOperationTermination message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchOperationTermination - */ - public static fromObject(object: { [k: string]: any }): temporal.api.batch.v1.BatchOperationTermination; - - /** - * Creates a plain object from a BatchOperationTermination message. Also converts values to other types if specified. - * @param message BatchOperationTermination - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.batch.v1.BatchOperationTermination, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchOperationTermination to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchOperationTermination - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchOperationSignal. */ - interface IBatchOperationSignal { - - /** The workflow author-defined name of the signal to send to the workflow */ - signal?: (string|null); - - /** Serialized value(s) to provide with the signal */ - input?: (temporal.api.common.v1.IPayloads|null); - - /** - * Headers that are passed with the signal to the processing workflow. - * These can include things like auth or tracing tokens. - */ - header?: (temporal.api.common.v1.IHeader|null); - - /** The identity of the worker/client */ - identity?: (string|null); - } - - /** - * BatchOperationSignal sends signals to batch workflows. - * Keep the parameter in sync with temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest. - */ - class BatchOperationSignal implements IBatchOperationSignal { - - /** - * Constructs a new BatchOperationSignal. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.batch.v1.IBatchOperationSignal); - - /** The workflow author-defined name of the signal to send to the workflow */ - public signal: string; - - /** Serialized value(s) to provide with the signal */ - public input?: (temporal.api.common.v1.IPayloads|null); - - /** - * Headers that are passed with the signal to the processing workflow. - * These can include things like auth or tracing tokens. - */ - public header?: (temporal.api.common.v1.IHeader|null); - - /** The identity of the worker/client */ - public identity: string; - - /** - * Creates a new BatchOperationSignal instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchOperationSignal instance - */ - public static create(properties?: temporal.api.batch.v1.IBatchOperationSignal): temporal.api.batch.v1.BatchOperationSignal; - - /** - * Encodes the specified BatchOperationSignal message. Does not implicitly {@link temporal.api.batch.v1.BatchOperationSignal.verify|verify} messages. - * @param message BatchOperationSignal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.batch.v1.IBatchOperationSignal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchOperationSignal message, length delimited. Does not implicitly {@link temporal.api.batch.v1.BatchOperationSignal.verify|verify} messages. - * @param message BatchOperationSignal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.batch.v1.IBatchOperationSignal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchOperationSignal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchOperationSignal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.batch.v1.BatchOperationSignal; - - /** - * Decodes a BatchOperationSignal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchOperationSignal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.batch.v1.BatchOperationSignal; - - /** - * Creates a BatchOperationSignal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchOperationSignal - */ - public static fromObject(object: { [k: string]: any }): temporal.api.batch.v1.BatchOperationSignal; - - /** - * Creates a plain object from a BatchOperationSignal message. Also converts values to other types if specified. - * @param message BatchOperationSignal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.batch.v1.BatchOperationSignal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchOperationSignal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchOperationSignal - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchOperationCancellation. */ - interface IBatchOperationCancellation { - - /** The identity of the worker/client */ - identity?: (string|null); - } - - /** - * BatchOperationCancellation sends cancel requests to batch workflows. - * Keep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest. - * Ignore first_execution_run_id because this is used for single workflow operation. - */ - class BatchOperationCancellation implements IBatchOperationCancellation { - - /** - * Constructs a new BatchOperationCancellation. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.batch.v1.IBatchOperationCancellation); - - /** The identity of the worker/client */ - public identity: string; - - /** - * Creates a new BatchOperationCancellation instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchOperationCancellation instance - */ - public static create(properties?: temporal.api.batch.v1.IBatchOperationCancellation): temporal.api.batch.v1.BatchOperationCancellation; - - /** - * Encodes the specified BatchOperationCancellation message. Does not implicitly {@link temporal.api.batch.v1.BatchOperationCancellation.verify|verify} messages. - * @param message BatchOperationCancellation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.batch.v1.IBatchOperationCancellation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchOperationCancellation message, length delimited. Does not implicitly {@link temporal.api.batch.v1.BatchOperationCancellation.verify|verify} messages. - * @param message BatchOperationCancellation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.batch.v1.IBatchOperationCancellation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchOperationCancellation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchOperationCancellation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.batch.v1.BatchOperationCancellation; - - /** - * Decodes a BatchOperationCancellation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchOperationCancellation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.batch.v1.BatchOperationCancellation; - - /** - * Creates a BatchOperationCancellation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchOperationCancellation - */ - public static fromObject(object: { [k: string]: any }): temporal.api.batch.v1.BatchOperationCancellation; - - /** - * Creates a plain object from a BatchOperationCancellation message. Also converts values to other types if specified. - * @param message BatchOperationCancellation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.batch.v1.BatchOperationCancellation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchOperationCancellation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchOperationCancellation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchOperationDeletion. */ - interface IBatchOperationDeletion { - - /** The identity of the worker/client */ - identity?: (string|null); - } - - /** - * BatchOperationDeletion sends deletion requests to batch workflows. - * Keep the parameter in sync with temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest. - */ - class BatchOperationDeletion implements IBatchOperationDeletion { - - /** - * Constructs a new BatchOperationDeletion. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.batch.v1.IBatchOperationDeletion); - - /** The identity of the worker/client */ - public identity: string; - - /** - * Creates a new BatchOperationDeletion instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchOperationDeletion instance - */ - public static create(properties?: temporal.api.batch.v1.IBatchOperationDeletion): temporal.api.batch.v1.BatchOperationDeletion; - - /** - * Encodes the specified BatchOperationDeletion message. Does not implicitly {@link temporal.api.batch.v1.BatchOperationDeletion.verify|verify} messages. - * @param message BatchOperationDeletion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.batch.v1.IBatchOperationDeletion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchOperationDeletion message, length delimited. Does not implicitly {@link temporal.api.batch.v1.BatchOperationDeletion.verify|verify} messages. - * @param message BatchOperationDeletion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.batch.v1.IBatchOperationDeletion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchOperationDeletion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchOperationDeletion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.batch.v1.BatchOperationDeletion; - - /** - * Decodes a BatchOperationDeletion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchOperationDeletion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.batch.v1.BatchOperationDeletion; - - /** - * Creates a BatchOperationDeletion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchOperationDeletion - */ - public static fromObject(object: { [k: string]: any }): temporal.api.batch.v1.BatchOperationDeletion; - - /** - * Creates a plain object from a BatchOperationDeletion message. Also converts values to other types if specified. - * @param message BatchOperationDeletion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.batch.v1.BatchOperationDeletion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchOperationDeletion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchOperationDeletion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchOperationReset. */ - interface IBatchOperationReset { - - /** The identity of the worker/client. */ - identity?: (string|null); - - /** Describes what to reset to and how. If set, `reset_type` and `reset_reapply_type` are ignored. */ - options?: (temporal.api.common.v1.IResetOptions|null); - - /** Deprecated. Use `options`. */ - resetType?: (temporal.api.enums.v1.ResetType|null); - - /** Deprecated. Use `options`. */ - resetReapplyType?: (temporal.api.enums.v1.ResetReapplyType|null); - - /** - * Operations to perform after the workflow has been reset. These operations will be applied - * to the *new* run of the workflow execution in the order they are provided. - * All operations are applied to the workflow before the first new workflow task is generated - */ - postResetOperations?: (temporal.api.workflow.v1.IPostResetOperation[]|null); - } - - /** - * BatchOperationReset sends reset requests to batch workflows. - * Keep the parameter in sync with temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest. - */ - class BatchOperationReset implements IBatchOperationReset { - - /** - * Constructs a new BatchOperationReset. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.batch.v1.IBatchOperationReset); - - /** The identity of the worker/client. */ - public identity: string; - - /** Describes what to reset to and how. If set, `reset_type` and `reset_reapply_type` are ignored. */ - public options?: (temporal.api.common.v1.IResetOptions|null); - - /** Deprecated. Use `options`. */ - public resetType: temporal.api.enums.v1.ResetType; - - /** Deprecated. Use `options`. */ - public resetReapplyType: temporal.api.enums.v1.ResetReapplyType; - - /** - * Operations to perform after the workflow has been reset. These operations will be applied - * to the *new* run of the workflow execution in the order they are provided. - * All operations are applied to the workflow before the first new workflow task is generated - */ - public postResetOperations: temporal.api.workflow.v1.IPostResetOperation[]; - - /** - * Creates a new BatchOperationReset instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchOperationReset instance - */ - public static create(properties?: temporal.api.batch.v1.IBatchOperationReset): temporal.api.batch.v1.BatchOperationReset; - - /** - * Encodes the specified BatchOperationReset message. Does not implicitly {@link temporal.api.batch.v1.BatchOperationReset.verify|verify} messages. - * @param message BatchOperationReset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.batch.v1.IBatchOperationReset, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchOperationReset message, length delimited. Does not implicitly {@link temporal.api.batch.v1.BatchOperationReset.verify|verify} messages. - * @param message BatchOperationReset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.batch.v1.IBatchOperationReset, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchOperationReset message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchOperationReset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.batch.v1.BatchOperationReset; - - /** - * Decodes a BatchOperationReset message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchOperationReset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.batch.v1.BatchOperationReset; - - /** - * Creates a BatchOperationReset message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchOperationReset - */ - public static fromObject(object: { [k: string]: any }): temporal.api.batch.v1.BatchOperationReset; - - /** - * Creates a plain object from a BatchOperationReset message. Also converts values to other types if specified. - * @param message BatchOperationReset - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.batch.v1.BatchOperationReset, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchOperationReset to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchOperationReset - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchOperationUpdateWorkflowExecutionOptions. */ - interface IBatchOperationUpdateWorkflowExecutionOptions { - - /** The identity of the worker/client. */ - identity?: (string|null); - - /** Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask. */ - workflowExecutionOptions?: (temporal.api.workflow.v1.IWorkflowExecutionOptions|null); - - /** - * Controls which fields from `workflow_execution_options` will be applied. - * To unset a field, set it to null and use the update mask to indicate that it should be mutated. - */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** - * BatchOperationUpdateWorkflowExecutionOptions sends UpdateWorkflowExecutionOptions requests to batch workflows. - * Keep the parameters in sync with temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest. - */ - class BatchOperationUpdateWorkflowExecutionOptions implements IBatchOperationUpdateWorkflowExecutionOptions { - - /** - * Constructs a new BatchOperationUpdateWorkflowExecutionOptions. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.batch.v1.IBatchOperationUpdateWorkflowExecutionOptions); - - /** The identity of the worker/client. */ - public identity: string; - - /** Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask. */ - public workflowExecutionOptions?: (temporal.api.workflow.v1.IWorkflowExecutionOptions|null); - - /** - * Controls which fields from `workflow_execution_options` will be applied. - * To unset a field, set it to null and use the update mask to indicate that it should be mutated. - */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new BatchOperationUpdateWorkflowExecutionOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchOperationUpdateWorkflowExecutionOptions instance - */ - public static create(properties?: temporal.api.batch.v1.IBatchOperationUpdateWorkflowExecutionOptions): temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions; - - /** - * Encodes the specified BatchOperationUpdateWorkflowExecutionOptions message. Does not implicitly {@link temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions.verify|verify} messages. - * @param message BatchOperationUpdateWorkflowExecutionOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.batch.v1.IBatchOperationUpdateWorkflowExecutionOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchOperationUpdateWorkflowExecutionOptions message, length delimited. Does not implicitly {@link temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions.verify|verify} messages. - * @param message BatchOperationUpdateWorkflowExecutionOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.batch.v1.IBatchOperationUpdateWorkflowExecutionOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchOperationUpdateWorkflowExecutionOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchOperationUpdateWorkflowExecutionOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions; - - /** - * Decodes a BatchOperationUpdateWorkflowExecutionOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchOperationUpdateWorkflowExecutionOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions; - - /** - * Creates a BatchOperationUpdateWorkflowExecutionOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchOperationUpdateWorkflowExecutionOptions - */ - public static fromObject(object: { [k: string]: any }): temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions; - - /** - * Creates a plain object from a BatchOperationUpdateWorkflowExecutionOptions message. Also converts values to other types if specified. - * @param message BatchOperationUpdateWorkflowExecutionOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchOperationUpdateWorkflowExecutionOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchOperationUpdateWorkflowExecutionOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchOperationUnpauseActivities. */ - interface IBatchOperationUnpauseActivities { - - /** The identity of the worker/client. */ - identity?: (string|null); - - /** BatchOperationUnpauseActivities type */ - type?: (string|null); - - /** BatchOperationUnpauseActivities matchAll */ - matchAll?: (boolean|null); - - /** Setting this flag will also reset the number of attempts. */ - resetAttempts?: (boolean|null); - - /** Setting this flag will also reset the heartbeat details. */ - resetHeartbeat?: (boolean|null); - - /** - * If set, the activity will start at a random time within the specified jitter - * duration, introducing variability to the start time. - */ - jitter?: (google.protobuf.IDuration|null); - } - - /** BatchOperationUnpauseActivities sends unpause requests to batch workflows. */ - class BatchOperationUnpauseActivities implements IBatchOperationUnpauseActivities { - - /** - * Constructs a new BatchOperationUnpauseActivities. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.batch.v1.IBatchOperationUnpauseActivities); - - /** The identity of the worker/client. */ - public identity: string; - - /** BatchOperationUnpauseActivities type. */ - public type?: (string|null); - - /** BatchOperationUnpauseActivities matchAll. */ - public matchAll?: (boolean|null); - - /** Setting this flag will also reset the number of attempts. */ - public resetAttempts: boolean; - - /** Setting this flag will also reset the heartbeat details. */ - public resetHeartbeat: boolean; - - /** - * If set, the activity will start at a random time within the specified jitter - * duration, introducing variability to the start time. - */ - public jitter?: (google.protobuf.IDuration|null); - - /** The activity to unpause. If match_all is set to true, all activities will be unpaused. */ - public activity?: ("type"|"matchAll"); - - /** - * Creates a new BatchOperationUnpauseActivities instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchOperationUnpauseActivities instance - */ - public static create(properties?: temporal.api.batch.v1.IBatchOperationUnpauseActivities): temporal.api.batch.v1.BatchOperationUnpauseActivities; - - /** - * Encodes the specified BatchOperationUnpauseActivities message. Does not implicitly {@link temporal.api.batch.v1.BatchOperationUnpauseActivities.verify|verify} messages. - * @param message BatchOperationUnpauseActivities message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.batch.v1.IBatchOperationUnpauseActivities, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchOperationUnpauseActivities message, length delimited. Does not implicitly {@link temporal.api.batch.v1.BatchOperationUnpauseActivities.verify|verify} messages. - * @param message BatchOperationUnpauseActivities message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.batch.v1.IBatchOperationUnpauseActivities, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchOperationUnpauseActivities message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchOperationUnpauseActivities - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.batch.v1.BatchOperationUnpauseActivities; - - /** - * Decodes a BatchOperationUnpauseActivities message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchOperationUnpauseActivities - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.batch.v1.BatchOperationUnpauseActivities; - - /** - * Creates a BatchOperationUnpauseActivities message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchOperationUnpauseActivities - */ - public static fromObject(object: { [k: string]: any }): temporal.api.batch.v1.BatchOperationUnpauseActivities; - - /** - * Creates a plain object from a BatchOperationUnpauseActivities message. Also converts values to other types if specified. - * @param message BatchOperationUnpauseActivities - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.batch.v1.BatchOperationUnpauseActivities, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchOperationUnpauseActivities to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchOperationUnpauseActivities - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchOperationTriggerWorkflowRule. */ - interface IBatchOperationTriggerWorkflowRule { - - /** The identity of the worker/client. */ - identity?: (string|null); - - /** ID of existing rule. */ - id?: (string|null); - - /** Rule specification to be applied to the workflow without creating a new rule. */ - spec?: (temporal.api.rules.v1.IWorkflowRuleSpec|null); - } - - /** BatchOperationTriggerWorkflowRule sends TriggerWorkflowRule requests to batch workflows. */ - class BatchOperationTriggerWorkflowRule implements IBatchOperationTriggerWorkflowRule { - - /** - * Constructs a new BatchOperationTriggerWorkflowRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.batch.v1.IBatchOperationTriggerWorkflowRule); - - /** The identity of the worker/client. */ - public identity: string; - - /** ID of existing rule. */ - public id?: (string|null); - - /** Rule specification to be applied to the workflow without creating a new rule. */ - public spec?: (temporal.api.rules.v1.IWorkflowRuleSpec|null); - - /** BatchOperationTriggerWorkflowRule rule. */ - public rule?: ("id"|"spec"); - - /** - * Creates a new BatchOperationTriggerWorkflowRule instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchOperationTriggerWorkflowRule instance - */ - public static create(properties?: temporal.api.batch.v1.IBatchOperationTriggerWorkflowRule): temporal.api.batch.v1.BatchOperationTriggerWorkflowRule; - - /** - * Encodes the specified BatchOperationTriggerWorkflowRule message. Does not implicitly {@link temporal.api.batch.v1.BatchOperationTriggerWorkflowRule.verify|verify} messages. - * @param message BatchOperationTriggerWorkflowRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.batch.v1.IBatchOperationTriggerWorkflowRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchOperationTriggerWorkflowRule message, length delimited. Does not implicitly {@link temporal.api.batch.v1.BatchOperationTriggerWorkflowRule.verify|verify} messages. - * @param message BatchOperationTriggerWorkflowRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.batch.v1.IBatchOperationTriggerWorkflowRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchOperationTriggerWorkflowRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchOperationTriggerWorkflowRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.batch.v1.BatchOperationTriggerWorkflowRule; - - /** - * Decodes a BatchOperationTriggerWorkflowRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchOperationTriggerWorkflowRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.batch.v1.BatchOperationTriggerWorkflowRule; - - /** - * Creates a BatchOperationTriggerWorkflowRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchOperationTriggerWorkflowRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.batch.v1.BatchOperationTriggerWorkflowRule; - - /** - * Creates a plain object from a BatchOperationTriggerWorkflowRule message. Also converts values to other types if specified. - * @param message BatchOperationTriggerWorkflowRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.batch.v1.BatchOperationTriggerWorkflowRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchOperationTriggerWorkflowRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchOperationTriggerWorkflowRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchOperationResetActivities. */ - interface IBatchOperationResetActivities { - - /** The identity of the worker/client. */ - identity?: (string|null); - - /** BatchOperationResetActivities type */ - type?: (string|null); - - /** BatchOperationResetActivities matchAll */ - matchAll?: (boolean|null); - - /** Setting this flag will also reset the number of attempts. */ - resetAttempts?: (boolean|null); - - /** Setting this flag will also reset the heartbeat details. */ - resetHeartbeat?: (boolean|null); - - /** If activity is paused, it will remain paused after reset */ - keepPaused?: (boolean|null); - - /** - * If set, the activity will start at a random time within the specified jitter - * duration, introducing variability to the start time. - */ - jitter?: (google.protobuf.IDuration|null); - - /** - * If set, the activity options will be restored to the defaults. - * Default options are then options activity was created with. - * They are part of the first ActivityTaskScheduled event. - */ - restoreOriginalOptions?: (boolean|null); - } - - /** - * BatchOperationResetActivities sends activity reset requests in a batch. - * NOTE: keep in sync with temporal.api.workflowservice.v1.ResetActivityRequest - */ - class BatchOperationResetActivities implements IBatchOperationResetActivities { - - /** - * Constructs a new BatchOperationResetActivities. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.batch.v1.IBatchOperationResetActivities); - - /** The identity of the worker/client. */ - public identity: string; - - /** BatchOperationResetActivities type. */ - public type?: (string|null); - - /** BatchOperationResetActivities matchAll. */ - public matchAll?: (boolean|null); - - /** Setting this flag will also reset the number of attempts. */ - public resetAttempts: boolean; - - /** Setting this flag will also reset the heartbeat details. */ - public resetHeartbeat: boolean; - - /** If activity is paused, it will remain paused after reset */ - public keepPaused: boolean; - - /** - * If set, the activity will start at a random time within the specified jitter - * duration, introducing variability to the start time. - */ - public jitter?: (google.protobuf.IDuration|null); - - /** - * If set, the activity options will be restored to the defaults. - * Default options are then options activity was created with. - * They are part of the first ActivityTaskScheduled event. - */ - public restoreOriginalOptions: boolean; - - /** The activities to reset. If match_all is set to true, all activities will be reset. */ - public activity?: ("type"|"matchAll"); - - /** - * Creates a new BatchOperationResetActivities instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchOperationResetActivities instance - */ - public static create(properties?: temporal.api.batch.v1.IBatchOperationResetActivities): temporal.api.batch.v1.BatchOperationResetActivities; - - /** - * Encodes the specified BatchOperationResetActivities message. Does not implicitly {@link temporal.api.batch.v1.BatchOperationResetActivities.verify|verify} messages. - * @param message BatchOperationResetActivities message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.batch.v1.IBatchOperationResetActivities, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchOperationResetActivities message, length delimited. Does not implicitly {@link temporal.api.batch.v1.BatchOperationResetActivities.verify|verify} messages. - * @param message BatchOperationResetActivities message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.batch.v1.IBatchOperationResetActivities, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchOperationResetActivities message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchOperationResetActivities - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.batch.v1.BatchOperationResetActivities; - - /** - * Decodes a BatchOperationResetActivities message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchOperationResetActivities - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.batch.v1.BatchOperationResetActivities; - - /** - * Creates a BatchOperationResetActivities message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchOperationResetActivities - */ - public static fromObject(object: { [k: string]: any }): temporal.api.batch.v1.BatchOperationResetActivities; - - /** - * Creates a plain object from a BatchOperationResetActivities message. Also converts values to other types if specified. - * @param message BatchOperationResetActivities - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.batch.v1.BatchOperationResetActivities, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchOperationResetActivities to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchOperationResetActivities - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchOperationUpdateActivityOptions. */ - interface IBatchOperationUpdateActivityOptions { - - /** The identity of the worker/client. */ - identity?: (string|null); - - /** BatchOperationUpdateActivityOptions type */ - type?: (string|null); - - /** BatchOperationUpdateActivityOptions matchAll */ - matchAll?: (boolean|null); - - /** Update Activity options. Partial updates are accepted and controlled by update_mask. */ - activityOptions?: (temporal.api.activity.v1.IActivityOptions|null); - - /** Controls which fields from `activity_options` will be applied */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** - * If set, the activity options will be restored to the default. - * Default options are then options activity was created with. - * They are part of the first ActivityTaskScheduled event. - * This flag cannot be combined with any other option; if you supply - * restore_original together with other options, the request will be rejected. - */ - restoreOriginal?: (boolean|null); - } - - /** - * BatchOperationUpdateActivityOptions sends an update-activity-options requests in a batch. - * NOTE: keep in sync with temporal.api.workflowservice.v1.UpdateActivityRequest - */ - class BatchOperationUpdateActivityOptions implements IBatchOperationUpdateActivityOptions { - - /** - * Constructs a new BatchOperationUpdateActivityOptions. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.batch.v1.IBatchOperationUpdateActivityOptions); - - /** The identity of the worker/client. */ - public identity: string; - - /** BatchOperationUpdateActivityOptions type. */ - public type?: (string|null); - - /** BatchOperationUpdateActivityOptions matchAll. */ - public matchAll?: (boolean|null); - - /** Update Activity options. Partial updates are accepted and controlled by update_mask. */ - public activityOptions?: (temporal.api.activity.v1.IActivityOptions|null); - - /** Controls which fields from `activity_options` will be applied */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * If set, the activity options will be restored to the default. - * Default options are then options activity was created with. - * They are part of the first ActivityTaskScheduled event. - * This flag cannot be combined with any other option; if you supply - * restore_original together with other options, the request will be rejected. - */ - public restoreOriginal: boolean; - - /** The activity to update. If match_all is set to true, all activities will be updated. */ - public activity?: ("type"|"matchAll"); - - /** - * Creates a new BatchOperationUpdateActivityOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchOperationUpdateActivityOptions instance - */ - public static create(properties?: temporal.api.batch.v1.IBatchOperationUpdateActivityOptions): temporal.api.batch.v1.BatchOperationUpdateActivityOptions; - - /** - * Encodes the specified BatchOperationUpdateActivityOptions message. Does not implicitly {@link temporal.api.batch.v1.BatchOperationUpdateActivityOptions.verify|verify} messages. - * @param message BatchOperationUpdateActivityOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.batch.v1.IBatchOperationUpdateActivityOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchOperationUpdateActivityOptions message, length delimited. Does not implicitly {@link temporal.api.batch.v1.BatchOperationUpdateActivityOptions.verify|verify} messages. - * @param message BatchOperationUpdateActivityOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.batch.v1.IBatchOperationUpdateActivityOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchOperationUpdateActivityOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchOperationUpdateActivityOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.batch.v1.BatchOperationUpdateActivityOptions; - - /** - * Decodes a BatchOperationUpdateActivityOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchOperationUpdateActivityOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.batch.v1.BatchOperationUpdateActivityOptions; - - /** - * Creates a BatchOperationUpdateActivityOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchOperationUpdateActivityOptions - */ - public static fromObject(object: { [k: string]: any }): temporal.api.batch.v1.BatchOperationUpdateActivityOptions; - - /** - * Creates a plain object from a BatchOperationUpdateActivityOptions message. Also converts values to other types if specified. - * @param message BatchOperationUpdateActivityOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.batch.v1.BatchOperationUpdateActivityOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchOperationUpdateActivityOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchOperationUpdateActivityOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace worker. */ - namespace worker { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a WorkerPollerInfo. */ - interface IWorkerPollerInfo { - - /** Number of polling RPCs that are currently in flight. */ - currentPollers?: (number|null); - - /** WorkerPollerInfo lastSuccessfulPollTime */ - lastSuccessfulPollTime?: (google.protobuf.ITimestamp|null); - - /** Set true if the number of concurrent pollers is auto-scaled */ - isAutoscaling?: (boolean|null); - } - - /** Represents a WorkerPollerInfo. */ - class WorkerPollerInfo implements IWorkerPollerInfo { - - /** - * Constructs a new WorkerPollerInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.worker.v1.IWorkerPollerInfo); - - /** Number of polling RPCs that are currently in flight. */ - public currentPollers: number; - - /** WorkerPollerInfo lastSuccessfulPollTime. */ - public lastSuccessfulPollTime?: (google.protobuf.ITimestamp|null); - - /** Set true if the number of concurrent pollers is auto-scaled */ - public isAutoscaling: boolean; - - /** - * Creates a new WorkerPollerInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerPollerInfo instance - */ - public static create(properties?: temporal.api.worker.v1.IWorkerPollerInfo): temporal.api.worker.v1.WorkerPollerInfo; - - /** - * Encodes the specified WorkerPollerInfo message. Does not implicitly {@link temporal.api.worker.v1.WorkerPollerInfo.verify|verify} messages. - * @param message WorkerPollerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.worker.v1.IWorkerPollerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerPollerInfo message, length delimited. Does not implicitly {@link temporal.api.worker.v1.WorkerPollerInfo.verify|verify} messages. - * @param message WorkerPollerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.worker.v1.IWorkerPollerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerPollerInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerPollerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.worker.v1.WorkerPollerInfo; - - /** - * Decodes a WorkerPollerInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerPollerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.worker.v1.WorkerPollerInfo; - - /** - * Creates a WorkerPollerInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerPollerInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.worker.v1.WorkerPollerInfo; - - /** - * Creates a plain object from a WorkerPollerInfo message. Also converts values to other types if specified. - * @param message WorkerPollerInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.worker.v1.WorkerPollerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerPollerInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerPollerInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerSlotsInfo. */ - interface IWorkerSlotsInfo { - - /** - * Number of slots available for the worker to specific tasks. - * May be -1 if the upper bound is not known. - */ - currentAvailableSlots?: (number|null); - - /** Number of slots used by the worker for specific tasks. */ - currentUsedSlots?: (number|null); - - /** - * Kind of the slot supplier, which is used to determine how the slots are allocated. - * Possible values: "Fixed | ResourceBased | Custom String" - */ - slotSupplierKind?: (string|null); - - /** - * Total number of tasks processed (completed both successfully and unsuccesfully, or any other way) - * by the worker since the worker started. This is a cumulative counter. - */ - totalProcessedTasks?: (number|null); - - /** Total number of failed tasks processed by the worker so far. */ - totalFailedTasks?: (number|null); - - /** - * Number of tasks processed in since the last heartbeat from the worker. - * This is a cumulative counter, and it is reset to 0 each time the worker sends a heartbeat. - * Contains both successful and failed tasks. - */ - lastIntervalProcessedTasks?: (number|null); - - /** Number of failed tasks processed since the last heartbeat from the worker. */ - lastIntervalFailureTasks?: (number|null); - } - - /** Represents a WorkerSlotsInfo. */ - class WorkerSlotsInfo implements IWorkerSlotsInfo { - - /** - * Constructs a new WorkerSlotsInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.worker.v1.IWorkerSlotsInfo); - - /** - * Number of slots available for the worker to specific tasks. - * May be -1 if the upper bound is not known. - */ - public currentAvailableSlots: number; - - /** Number of slots used by the worker for specific tasks. */ - public currentUsedSlots: number; - - /** - * Kind of the slot supplier, which is used to determine how the slots are allocated. - * Possible values: "Fixed | ResourceBased | Custom String" - */ - public slotSupplierKind: string; - - /** - * Total number of tasks processed (completed both successfully and unsuccesfully, or any other way) - * by the worker since the worker started. This is a cumulative counter. - */ - public totalProcessedTasks: number; - - /** Total number of failed tasks processed by the worker so far. */ - public totalFailedTasks: number; - - /** - * Number of tasks processed in since the last heartbeat from the worker. - * This is a cumulative counter, and it is reset to 0 each time the worker sends a heartbeat. - * Contains both successful and failed tasks. - */ - public lastIntervalProcessedTasks: number; - - /** Number of failed tasks processed since the last heartbeat from the worker. */ - public lastIntervalFailureTasks: number; - - /** - * Creates a new WorkerSlotsInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerSlotsInfo instance - */ - public static create(properties?: temporal.api.worker.v1.IWorkerSlotsInfo): temporal.api.worker.v1.WorkerSlotsInfo; - - /** - * Encodes the specified WorkerSlotsInfo message. Does not implicitly {@link temporal.api.worker.v1.WorkerSlotsInfo.verify|verify} messages. - * @param message WorkerSlotsInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.worker.v1.IWorkerSlotsInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerSlotsInfo message, length delimited. Does not implicitly {@link temporal.api.worker.v1.WorkerSlotsInfo.verify|verify} messages. - * @param message WorkerSlotsInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.worker.v1.IWorkerSlotsInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerSlotsInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerSlotsInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.worker.v1.WorkerSlotsInfo; - - /** - * Decodes a WorkerSlotsInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerSlotsInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.worker.v1.WorkerSlotsInfo; - - /** - * Creates a WorkerSlotsInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerSlotsInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.worker.v1.WorkerSlotsInfo; - - /** - * Creates a plain object from a WorkerSlotsInfo message. Also converts values to other types if specified. - * @param message WorkerSlotsInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.worker.v1.WorkerSlotsInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerSlotsInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerSlotsInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerHostInfo. */ - interface IWorkerHostInfo { - - /** Worker host identifier. */ - hostName?: (string|null); - - /** - * Worker grouping identifier. A key to group workers that share the same client+namespace+process. - * This will be used to build the worker command nexus task queue name: - * "temporal-sys/worker-commands/{worker_grouping_key}" - */ - workerGroupingKey?: (string|null); - - /** - * Worker process identifier. This id only needs to be unique - * within one host (so using e.g. a unix pid would be appropriate). - */ - processId?: (string|null); - - /** - * System used CPU as a float in the range [0.0, 1.0] where 1.0 is defined as all - * cores on the host pegged. - */ - currentHostCpuUsage?: (number|null); - - /** - * System used memory as a float in the range [0.0, 1.0] where 1.0 is defined as - * all available memory on the host is used. - */ - currentHostMemUsage?: (number|null); - } - - /** Holds everything needed to identify the worker host/process context */ - class WorkerHostInfo implements IWorkerHostInfo { - - /** - * Constructs a new WorkerHostInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.worker.v1.IWorkerHostInfo); - - /** Worker host identifier. */ - public hostName: string; - - /** - * Worker grouping identifier. A key to group workers that share the same client+namespace+process. - * This will be used to build the worker command nexus task queue name: - * "temporal-sys/worker-commands/{worker_grouping_key}" - */ - public workerGroupingKey: string; - - /** - * Worker process identifier. This id only needs to be unique - * within one host (so using e.g. a unix pid would be appropriate). - */ - public processId: string; - - /** - * System used CPU as a float in the range [0.0, 1.0] where 1.0 is defined as all - * cores on the host pegged. - */ - public currentHostCpuUsage: number; - - /** - * System used memory as a float in the range [0.0, 1.0] where 1.0 is defined as - * all available memory on the host is used. - */ - public currentHostMemUsage: number; - - /** - * Creates a new WorkerHostInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerHostInfo instance - */ - public static create(properties?: temporal.api.worker.v1.IWorkerHostInfo): temporal.api.worker.v1.WorkerHostInfo; - - /** - * Encodes the specified WorkerHostInfo message. Does not implicitly {@link temporal.api.worker.v1.WorkerHostInfo.verify|verify} messages. - * @param message WorkerHostInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.worker.v1.IWorkerHostInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerHostInfo message, length delimited. Does not implicitly {@link temporal.api.worker.v1.WorkerHostInfo.verify|verify} messages. - * @param message WorkerHostInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.worker.v1.IWorkerHostInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerHostInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerHostInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.worker.v1.WorkerHostInfo; - - /** - * Decodes a WorkerHostInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerHostInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.worker.v1.WorkerHostInfo; - - /** - * Creates a WorkerHostInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerHostInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.worker.v1.WorkerHostInfo; - - /** - * Creates a plain object from a WorkerHostInfo message. Also converts values to other types if specified. - * @param message WorkerHostInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.worker.v1.WorkerHostInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerHostInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerHostInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerHeartbeat. */ - interface IWorkerHeartbeat { - - /** - * Worker identifier, should be unique for the namespace. - * It is distinct from worker identity, which is not necessarily namespace-unique. - */ - workerInstanceKey?: (string|null); - - /** - * Worker identity, set by the client, may not be unique. - * Usually host_name+(user group name)+process_id, but can be overwritten by the user. - */ - workerIdentity?: (string|null); - - /** Worker host information. */ - hostInfo?: (temporal.api.worker.v1.IWorkerHostInfo|null); - - /** Task queue this worker is polling for tasks. */ - taskQueue?: (string|null); - - /** WorkerHeartbeat deploymentVersion */ - deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** WorkerHeartbeat sdkName */ - sdkName?: (string|null); - - /** WorkerHeartbeat sdkVersion */ - sdkVersion?: (string|null); - - /** Worker status. Defined by SDK. */ - status?: (temporal.api.enums.v1.WorkerStatus|null); - - /** - * Worker start time. - * It can be used to determine worker uptime. (current time - start time) - */ - startTime?: (google.protobuf.ITimestamp|null); - - /** - * Timestamp of this heartbeat, coming from the worker. Worker should set it to "now". - * Note that this timestamp comes directly from the worker and is subject to workers' clock skew. - */ - heartbeatTime?: (google.protobuf.ITimestamp|null); - - /** Elapsed time since the last heartbeat from the worker. */ - elapsedSinceLastHeartbeat?: (google.protobuf.IDuration|null); - - /** WorkerHeartbeat workflowTaskSlotsInfo */ - workflowTaskSlotsInfo?: (temporal.api.worker.v1.IWorkerSlotsInfo|null); - - /** WorkerHeartbeat activityTaskSlotsInfo */ - activityTaskSlotsInfo?: (temporal.api.worker.v1.IWorkerSlotsInfo|null); - - /** WorkerHeartbeat nexusTaskSlotsInfo */ - nexusTaskSlotsInfo?: (temporal.api.worker.v1.IWorkerSlotsInfo|null); - - /** WorkerHeartbeat localActivitySlotsInfo */ - localActivitySlotsInfo?: (temporal.api.worker.v1.IWorkerSlotsInfo|null); - - /** WorkerHeartbeat workflowPollerInfo */ - workflowPollerInfo?: (temporal.api.worker.v1.IWorkerPollerInfo|null); - - /** WorkerHeartbeat workflowStickyPollerInfo */ - workflowStickyPollerInfo?: (temporal.api.worker.v1.IWorkerPollerInfo|null); - - /** WorkerHeartbeat activityPollerInfo */ - activityPollerInfo?: (temporal.api.worker.v1.IWorkerPollerInfo|null); - - /** WorkerHeartbeat nexusPollerInfo */ - nexusPollerInfo?: (temporal.api.worker.v1.IWorkerPollerInfo|null); - - /** A Workflow Task found a cached Workflow Execution to run against. */ - totalStickyCacheHit?: (number|null); - - /** A Workflow Task did not find a cached Workflow execution to run against. */ - totalStickyCacheMiss?: (number|null); - - /** Current cache size, expressed in number of Workflow Executions. */ - currentStickyCacheSize?: (number|null); - - /** Plugins currently in use by this SDK. */ - plugins?: (temporal.api.worker.v1.IPluginInfo[]|null); - } - - /** - * Worker info message, contains information about the worker and its current state. - * All information is provided by the worker itself. - * (-- api-linter: core::0140::prepositions=disabled - * aip.dev/not-precedent: Removing those words make names less clear. --) - */ - class WorkerHeartbeat implements IWorkerHeartbeat { - - /** - * Constructs a new WorkerHeartbeat. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.worker.v1.IWorkerHeartbeat); - - /** - * Worker identifier, should be unique for the namespace. - * It is distinct from worker identity, which is not necessarily namespace-unique. - */ - public workerInstanceKey: string; - - /** - * Worker identity, set by the client, may not be unique. - * Usually host_name+(user group name)+process_id, but can be overwritten by the user. - */ - public workerIdentity: string; - - /** Worker host information. */ - public hostInfo?: (temporal.api.worker.v1.IWorkerHostInfo|null); - - /** Task queue this worker is polling for tasks. */ - public taskQueue: string; - - /** WorkerHeartbeat deploymentVersion. */ - public deploymentVersion?: (temporal.api.deployment.v1.IWorkerDeploymentVersion|null); - - /** WorkerHeartbeat sdkName. */ - public sdkName: string; - - /** WorkerHeartbeat sdkVersion. */ - public sdkVersion: string; - - /** Worker status. Defined by SDK. */ - public status: temporal.api.enums.v1.WorkerStatus; - - /** - * Worker start time. - * It can be used to determine worker uptime. (current time - start time) - */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** - * Timestamp of this heartbeat, coming from the worker. Worker should set it to "now". - * Note that this timestamp comes directly from the worker and is subject to workers' clock skew. - */ - public heartbeatTime?: (google.protobuf.ITimestamp|null); - - /** Elapsed time since the last heartbeat from the worker. */ - public elapsedSinceLastHeartbeat?: (google.protobuf.IDuration|null); - - /** WorkerHeartbeat workflowTaskSlotsInfo. */ - public workflowTaskSlotsInfo?: (temporal.api.worker.v1.IWorkerSlotsInfo|null); - - /** WorkerHeartbeat activityTaskSlotsInfo. */ - public activityTaskSlotsInfo?: (temporal.api.worker.v1.IWorkerSlotsInfo|null); - - /** WorkerHeartbeat nexusTaskSlotsInfo. */ - public nexusTaskSlotsInfo?: (temporal.api.worker.v1.IWorkerSlotsInfo|null); - - /** WorkerHeartbeat localActivitySlotsInfo. */ - public localActivitySlotsInfo?: (temporal.api.worker.v1.IWorkerSlotsInfo|null); - - /** WorkerHeartbeat workflowPollerInfo. */ - public workflowPollerInfo?: (temporal.api.worker.v1.IWorkerPollerInfo|null); - - /** WorkerHeartbeat workflowStickyPollerInfo. */ - public workflowStickyPollerInfo?: (temporal.api.worker.v1.IWorkerPollerInfo|null); - - /** WorkerHeartbeat activityPollerInfo. */ - public activityPollerInfo?: (temporal.api.worker.v1.IWorkerPollerInfo|null); - - /** WorkerHeartbeat nexusPollerInfo. */ - public nexusPollerInfo?: (temporal.api.worker.v1.IWorkerPollerInfo|null); - - /** A Workflow Task found a cached Workflow Execution to run against. */ - public totalStickyCacheHit: number; - - /** A Workflow Task did not find a cached Workflow execution to run against. */ - public totalStickyCacheMiss: number; - - /** Current cache size, expressed in number of Workflow Executions. */ - public currentStickyCacheSize: number; - - /** Plugins currently in use by this SDK. */ - public plugins: temporal.api.worker.v1.IPluginInfo[]; - - /** - * Creates a new WorkerHeartbeat instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerHeartbeat instance - */ - public static create(properties?: temporal.api.worker.v1.IWorkerHeartbeat): temporal.api.worker.v1.WorkerHeartbeat; - - /** - * Encodes the specified WorkerHeartbeat message. Does not implicitly {@link temporal.api.worker.v1.WorkerHeartbeat.verify|verify} messages. - * @param message WorkerHeartbeat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.worker.v1.IWorkerHeartbeat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerHeartbeat message, length delimited. Does not implicitly {@link temporal.api.worker.v1.WorkerHeartbeat.verify|verify} messages. - * @param message WorkerHeartbeat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.worker.v1.IWorkerHeartbeat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerHeartbeat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerHeartbeat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.worker.v1.WorkerHeartbeat; - - /** - * Decodes a WorkerHeartbeat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerHeartbeat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.worker.v1.WorkerHeartbeat; - - /** - * Creates a WorkerHeartbeat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerHeartbeat - */ - public static fromObject(object: { [k: string]: any }): temporal.api.worker.v1.WorkerHeartbeat; - - /** - * Creates a plain object from a WorkerHeartbeat message. Also converts values to other types if specified. - * @param message WorkerHeartbeat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.worker.v1.WorkerHeartbeat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerHeartbeat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerHeartbeat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerInfo. */ - interface IWorkerInfo { - - /** WorkerInfo workerHeartbeat */ - workerHeartbeat?: (temporal.api.worker.v1.IWorkerHeartbeat|null); - } - - /** Represents a WorkerInfo. */ - class WorkerInfo implements IWorkerInfo { - - /** - * Constructs a new WorkerInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.worker.v1.IWorkerInfo); - - /** WorkerInfo workerHeartbeat. */ - public workerHeartbeat?: (temporal.api.worker.v1.IWorkerHeartbeat|null); - - /** - * Creates a new WorkerInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerInfo instance - */ - public static create(properties?: temporal.api.worker.v1.IWorkerInfo): temporal.api.worker.v1.WorkerInfo; - - /** - * Encodes the specified WorkerInfo message. Does not implicitly {@link temporal.api.worker.v1.WorkerInfo.verify|verify} messages. - * @param message WorkerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.worker.v1.IWorkerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerInfo message, length delimited. Does not implicitly {@link temporal.api.worker.v1.WorkerInfo.verify|verify} messages. - * @param message WorkerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.worker.v1.IWorkerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.worker.v1.WorkerInfo; - - /** - * Decodes a WorkerInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.worker.v1.WorkerInfo; - - /** - * Creates a WorkerInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.worker.v1.WorkerInfo; - - /** - * Creates a plain object from a WorkerInfo message. Also converts values to other types if specified. - * @param message WorkerInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.worker.v1.WorkerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PluginInfo. */ - interface IPluginInfo { - - /** The name of the plugin, required. */ - name?: (string|null); - - /** The version of the plugin, may be empty. */ - version?: (string|null); - } - - /** Represents a PluginInfo. */ - class PluginInfo implements IPluginInfo { - - /** - * Constructs a new PluginInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.worker.v1.IPluginInfo); - - /** The name of the plugin, required. */ - public name: string; - - /** The version of the plugin, may be empty. */ - public version: string; - - /** - * Creates a new PluginInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns PluginInfo instance - */ - public static create(properties?: temporal.api.worker.v1.IPluginInfo): temporal.api.worker.v1.PluginInfo; - - /** - * Encodes the specified PluginInfo message. Does not implicitly {@link temporal.api.worker.v1.PluginInfo.verify|verify} messages. - * @param message PluginInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.worker.v1.IPluginInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PluginInfo message, length delimited. Does not implicitly {@link temporal.api.worker.v1.PluginInfo.verify|verify} messages. - * @param message PluginInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.worker.v1.IPluginInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PluginInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PluginInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.worker.v1.PluginInfo; - - /** - * Decodes a PluginInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PluginInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.worker.v1.PluginInfo; - - /** - * Creates a PluginInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PluginInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.worker.v1.PluginInfo; - - /** - * Creates a plain object from a PluginInfo message. Also converts values to other types if specified. - * @param message PluginInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.worker.v1.PluginInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PluginInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PluginInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace operatorservice. */ - namespace operatorservice { - - /** Namespace v1. */ - namespace v1 { - - /** - * OperatorService API defines how Temporal SDKs and other clients interact with the Temporal server - * to perform administrative functions like registering a search attribute or a namespace. - * APIs in this file could be not compatible with Temporal Cloud, hence it's usage in SDKs should be limited by - * designated APIs that clearly state that they shouldn't be used by the main Application (Workflows & Activities) framework. - */ - class OperatorService extends $protobuf.rpc.Service { - - /** - * Constructs a new OperatorService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new OperatorService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): OperatorService; - - /** - * AddSearchAttributes add custom search attributes. - * - * Returns ALREADY_EXISTS status code if a Search Attribute with any of the specified names already exists - * Returns INTERNAL status code with temporal.api.errordetails.v1.SystemWorkflowFailure in Error Details if registration process fails, - * @param request AddSearchAttributesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AddSearchAttributesResponse - */ - public addSearchAttributes(request: temporal.api.operatorservice.v1.IAddSearchAttributesRequest, callback: temporal.api.operatorservice.v1.OperatorService.AddSearchAttributesCallback): void; - - /** - * AddSearchAttributes add custom search attributes. - * - * Returns ALREADY_EXISTS status code if a Search Attribute with any of the specified names already exists - * Returns INTERNAL status code with temporal.api.errordetails.v1.SystemWorkflowFailure in Error Details if registration process fails, - * @param request AddSearchAttributesRequest message or plain object - * @returns Promise - */ - public addSearchAttributes(request: temporal.api.operatorservice.v1.IAddSearchAttributesRequest): Promise; - - /** - * RemoveSearchAttributes removes custom search attributes. - * - * Returns NOT_FOUND status code if a Search Attribute with any of the specified names is not registered - * @param request RemoveSearchAttributesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RemoveSearchAttributesResponse - */ - public removeSearchAttributes(request: temporal.api.operatorservice.v1.IRemoveSearchAttributesRequest, callback: temporal.api.operatorservice.v1.OperatorService.RemoveSearchAttributesCallback): void; - - /** - * RemoveSearchAttributes removes custom search attributes. - * - * Returns NOT_FOUND status code if a Search Attribute with any of the specified names is not registered - * @param request RemoveSearchAttributesRequest message or plain object - * @returns Promise - */ - public removeSearchAttributes(request: temporal.api.operatorservice.v1.IRemoveSearchAttributesRequest): Promise; - - /** - * ListSearchAttributes returns comprehensive information about search attributes. - * @param request ListSearchAttributesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSearchAttributesResponse - */ - public listSearchAttributes(request: temporal.api.operatorservice.v1.IListSearchAttributesRequest, callback: temporal.api.operatorservice.v1.OperatorService.ListSearchAttributesCallback): void; - - /** - * ListSearchAttributes returns comprehensive information about search attributes. - * @param request ListSearchAttributesRequest message or plain object - * @returns Promise - */ - public listSearchAttributes(request: temporal.api.operatorservice.v1.IListSearchAttributesRequest): Promise; - - /** - * DeleteNamespace synchronously deletes a namespace and asynchronously reclaims all namespace resources. - * @param request DeleteNamespaceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteNamespaceResponse - */ - public deleteNamespace(request: temporal.api.operatorservice.v1.IDeleteNamespaceRequest, callback: temporal.api.operatorservice.v1.OperatorService.DeleteNamespaceCallback): void; - - /** - * DeleteNamespace synchronously deletes a namespace and asynchronously reclaims all namespace resources. - * @param request DeleteNamespaceRequest message or plain object - * @returns Promise - */ - public deleteNamespace(request: temporal.api.operatorservice.v1.IDeleteNamespaceRequest): Promise; - - /** - * AddOrUpdateRemoteCluster adds or updates remote cluster. - * @param request AddOrUpdateRemoteClusterRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AddOrUpdateRemoteClusterResponse - */ - public addOrUpdateRemoteCluster(request: temporal.api.operatorservice.v1.IAddOrUpdateRemoteClusterRequest, callback: temporal.api.operatorservice.v1.OperatorService.AddOrUpdateRemoteClusterCallback): void; - - /** - * AddOrUpdateRemoteCluster adds or updates remote cluster. - * @param request AddOrUpdateRemoteClusterRequest message or plain object - * @returns Promise - */ - public addOrUpdateRemoteCluster(request: temporal.api.operatorservice.v1.IAddOrUpdateRemoteClusterRequest): Promise; - - /** - * RemoveRemoteCluster removes remote cluster. - * @param request RemoveRemoteClusterRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RemoveRemoteClusterResponse - */ - public removeRemoteCluster(request: temporal.api.operatorservice.v1.IRemoveRemoteClusterRequest, callback: temporal.api.operatorservice.v1.OperatorService.RemoveRemoteClusterCallback): void; - - /** - * RemoveRemoteCluster removes remote cluster. - * @param request RemoveRemoteClusterRequest message or plain object - * @returns Promise - */ - public removeRemoteCluster(request: temporal.api.operatorservice.v1.IRemoveRemoteClusterRequest): Promise; - - /** - * ListClusters returns information about Temporal clusters. - * @param request ListClustersRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListClustersResponse - */ - public listClusters(request: temporal.api.operatorservice.v1.IListClustersRequest, callback: temporal.api.operatorservice.v1.OperatorService.ListClustersCallback): void; - - /** - * ListClusters returns information about Temporal clusters. - * @param request ListClustersRequest message or plain object - * @returns Promise - */ - public listClusters(request: temporal.api.operatorservice.v1.IListClustersRequest): Promise; - - /** - * Get a registered Nexus endpoint by ID. The returned version can be used for optimistic updates. - * @param request GetNexusEndpointRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetNexusEndpointResponse - */ - public getNexusEndpoint(request: temporal.api.operatorservice.v1.IGetNexusEndpointRequest, callback: temporal.api.operatorservice.v1.OperatorService.GetNexusEndpointCallback): void; - - /** - * Get a registered Nexus endpoint by ID. The returned version can be used for optimistic updates. - * @param request GetNexusEndpointRequest message or plain object - * @returns Promise - */ - public getNexusEndpoint(request: temporal.api.operatorservice.v1.IGetNexusEndpointRequest): Promise; - - /** - * Create a Nexus endpoint. This will fail if an endpoint with the same name is already registered with a status of - * ALREADY_EXISTS. - * Returns the created endpoint with its initial version. You may use this version for subsequent updates. - * @param request CreateNexusEndpointRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CreateNexusEndpointResponse - */ - public createNexusEndpoint(request: temporal.api.operatorservice.v1.ICreateNexusEndpointRequest, callback: temporal.api.operatorservice.v1.OperatorService.CreateNexusEndpointCallback): void; - - /** - * Create a Nexus endpoint. This will fail if an endpoint with the same name is already registered with a status of - * ALREADY_EXISTS. - * Returns the created endpoint with its initial version. You may use this version for subsequent updates. - * @param request CreateNexusEndpointRequest message or plain object - * @returns Promise - */ - public createNexusEndpoint(request: temporal.api.operatorservice.v1.ICreateNexusEndpointRequest): Promise; - - /** - * Optimistically update a Nexus endpoint based on provided version as obtained via the `GetNexusEndpoint` or - * `ListNexusEndpointResponse` APIs. This will fail with a status of FAILED_PRECONDITION if the version does not - * match. - * Returns the updated endpoint with its updated version. You may use this version for subsequent updates. You don't - * need to increment the version yourself. The server will increment the version for you after each update. - * @param request UpdateNexusEndpointRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateNexusEndpointResponse - */ - public updateNexusEndpoint(request: temporal.api.operatorservice.v1.IUpdateNexusEndpointRequest, callback: temporal.api.operatorservice.v1.OperatorService.UpdateNexusEndpointCallback): void; - - /** - * Optimistically update a Nexus endpoint based on provided version as obtained via the `GetNexusEndpoint` or - * `ListNexusEndpointResponse` APIs. This will fail with a status of FAILED_PRECONDITION if the version does not - * match. - * Returns the updated endpoint with its updated version. You may use this version for subsequent updates. You don't - * need to increment the version yourself. The server will increment the version for you after each update. - * @param request UpdateNexusEndpointRequest message or plain object - * @returns Promise - */ - public updateNexusEndpoint(request: temporal.api.operatorservice.v1.IUpdateNexusEndpointRequest): Promise; - - /** - * Delete an incoming Nexus service by ID. - * @param request DeleteNexusEndpointRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteNexusEndpointResponse - */ - public deleteNexusEndpoint(request: temporal.api.operatorservice.v1.IDeleteNexusEndpointRequest, callback: temporal.api.operatorservice.v1.OperatorService.DeleteNexusEndpointCallback): void; - - /** - * Delete an incoming Nexus service by ID. - * @param request DeleteNexusEndpointRequest message or plain object - * @returns Promise - */ - public deleteNexusEndpoint(request: temporal.api.operatorservice.v1.IDeleteNexusEndpointRequest): Promise; - - /** - * List all Nexus endpoints for the cluster, sorted by ID in ascending order. Set page_token in the request to the - * next_page_token field of the previous response to get the next page of results. An empty next_page_token - * indicates that there are no more results. During pagination, a newly added service with an ID lexicographically - * earlier than the previous page's last endpoint's ID may be missed. - * @param request ListNexusEndpointsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListNexusEndpointsResponse - */ - public listNexusEndpoints(request: temporal.api.operatorservice.v1.IListNexusEndpointsRequest, callback: temporal.api.operatorservice.v1.OperatorService.ListNexusEndpointsCallback): void; - - /** - * List all Nexus endpoints for the cluster, sorted by ID in ascending order. Set page_token in the request to the - * next_page_token field of the previous response to get the next page of results. An empty next_page_token - * indicates that there are no more results. During pagination, a newly added service with an ID lexicographically - * earlier than the previous page's last endpoint's ID may be missed. - * @param request ListNexusEndpointsRequest message or plain object - * @returns Promise - */ - public listNexusEndpoints(request: temporal.api.operatorservice.v1.IListNexusEndpointsRequest): Promise; - } - - namespace OperatorService { - - /** - * Callback as used by {@link temporal.api.operatorservice.v1.OperatorService#addSearchAttributes}. - * @param error Error, if any - * @param [response] AddSearchAttributesResponse - */ - type AddSearchAttributesCallback = (error: (Error|null), response?: temporal.api.operatorservice.v1.AddSearchAttributesResponse) => void; - - /** - * Callback as used by {@link temporal.api.operatorservice.v1.OperatorService#removeSearchAttributes}. - * @param error Error, if any - * @param [response] RemoveSearchAttributesResponse - */ - type RemoveSearchAttributesCallback = (error: (Error|null), response?: temporal.api.operatorservice.v1.RemoveSearchAttributesResponse) => void; - - /** - * Callback as used by {@link temporal.api.operatorservice.v1.OperatorService#listSearchAttributes}. - * @param error Error, if any - * @param [response] ListSearchAttributesResponse - */ - type ListSearchAttributesCallback = (error: (Error|null), response?: temporal.api.operatorservice.v1.ListSearchAttributesResponse) => void; - - /** - * Callback as used by {@link temporal.api.operatorservice.v1.OperatorService#deleteNamespace}. - * @param error Error, if any - * @param [response] DeleteNamespaceResponse - */ - type DeleteNamespaceCallback = (error: (Error|null), response?: temporal.api.operatorservice.v1.DeleteNamespaceResponse) => void; - - /** - * Callback as used by {@link temporal.api.operatorservice.v1.OperatorService#addOrUpdateRemoteCluster}. - * @param error Error, if any - * @param [response] AddOrUpdateRemoteClusterResponse - */ - type AddOrUpdateRemoteClusterCallback = (error: (Error|null), response?: temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse) => void; - - /** - * Callback as used by {@link temporal.api.operatorservice.v1.OperatorService#removeRemoteCluster}. - * @param error Error, if any - * @param [response] RemoveRemoteClusterResponse - */ - type RemoveRemoteClusterCallback = (error: (Error|null), response?: temporal.api.operatorservice.v1.RemoveRemoteClusterResponse) => void; - - /** - * Callback as used by {@link temporal.api.operatorservice.v1.OperatorService#listClusters}. - * @param error Error, if any - * @param [response] ListClustersResponse - */ - type ListClustersCallback = (error: (Error|null), response?: temporal.api.operatorservice.v1.ListClustersResponse) => void; - - /** - * Callback as used by {@link temporal.api.operatorservice.v1.OperatorService#getNexusEndpoint}. - * @param error Error, if any - * @param [response] GetNexusEndpointResponse - */ - type GetNexusEndpointCallback = (error: (Error|null), response?: temporal.api.operatorservice.v1.GetNexusEndpointResponse) => void; - - /** - * Callback as used by {@link temporal.api.operatorservice.v1.OperatorService#createNexusEndpoint}. - * @param error Error, if any - * @param [response] CreateNexusEndpointResponse - */ - type CreateNexusEndpointCallback = (error: (Error|null), response?: temporal.api.operatorservice.v1.CreateNexusEndpointResponse) => void; - - /** - * Callback as used by {@link temporal.api.operatorservice.v1.OperatorService#updateNexusEndpoint}. - * @param error Error, if any - * @param [response] UpdateNexusEndpointResponse - */ - type UpdateNexusEndpointCallback = (error: (Error|null), response?: temporal.api.operatorservice.v1.UpdateNexusEndpointResponse) => void; - - /** - * Callback as used by {@link temporal.api.operatorservice.v1.OperatorService#deleteNexusEndpoint}. - * @param error Error, if any - * @param [response] DeleteNexusEndpointResponse - */ - type DeleteNexusEndpointCallback = (error: (Error|null), response?: temporal.api.operatorservice.v1.DeleteNexusEndpointResponse) => void; - - /** - * Callback as used by {@link temporal.api.operatorservice.v1.OperatorService#listNexusEndpoints}. - * @param error Error, if any - * @param [response] ListNexusEndpointsResponse - */ - type ListNexusEndpointsCallback = (error: (Error|null), response?: temporal.api.operatorservice.v1.ListNexusEndpointsResponse) => void; - } - - /** Properties of an AddSearchAttributesRequest. */ - interface IAddSearchAttributesRequest { - - /** Mapping between search attribute name and its IndexedValueType. */ - searchAttributes?: ({ [k: string]: temporal.api.enums.v1.IndexedValueType }|null); - - /** AddSearchAttributesRequest namespace */ - namespace?: (string|null); - } - - /** Represents an AddSearchAttributesRequest. */ - class AddSearchAttributesRequest implements IAddSearchAttributesRequest { - - /** - * Constructs a new AddSearchAttributesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IAddSearchAttributesRequest); - - /** Mapping between search attribute name and its IndexedValueType. */ - public searchAttributes: { [k: string]: temporal.api.enums.v1.IndexedValueType }; - - /** AddSearchAttributesRequest namespace. */ - public namespace: string; - - /** - * Creates a new AddSearchAttributesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns AddSearchAttributesRequest instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IAddSearchAttributesRequest): temporal.api.operatorservice.v1.AddSearchAttributesRequest; - - /** - * Encodes the specified AddSearchAttributesRequest message. Does not implicitly {@link temporal.api.operatorservice.v1.AddSearchAttributesRequest.verify|verify} messages. - * @param message AddSearchAttributesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IAddSearchAttributesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddSearchAttributesRequest message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.AddSearchAttributesRequest.verify|verify} messages. - * @param message AddSearchAttributesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IAddSearchAttributesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddSearchAttributesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddSearchAttributesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.AddSearchAttributesRequest; - - /** - * Decodes an AddSearchAttributesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddSearchAttributesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.AddSearchAttributesRequest; - - /** - * Creates an AddSearchAttributesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddSearchAttributesRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.AddSearchAttributesRequest; - - /** - * Creates a plain object from an AddSearchAttributesRequest message. Also converts values to other types if specified. - * @param message AddSearchAttributesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.AddSearchAttributesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddSearchAttributesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddSearchAttributesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddSearchAttributesResponse. */ - interface IAddSearchAttributesResponse { - } - - /** Represents an AddSearchAttributesResponse. */ - class AddSearchAttributesResponse implements IAddSearchAttributesResponse { - - /** - * Constructs a new AddSearchAttributesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IAddSearchAttributesResponse); - - /** - * Creates a new AddSearchAttributesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns AddSearchAttributesResponse instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IAddSearchAttributesResponse): temporal.api.operatorservice.v1.AddSearchAttributesResponse; - - /** - * Encodes the specified AddSearchAttributesResponse message. Does not implicitly {@link temporal.api.operatorservice.v1.AddSearchAttributesResponse.verify|verify} messages. - * @param message AddSearchAttributesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IAddSearchAttributesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddSearchAttributesResponse message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.AddSearchAttributesResponse.verify|verify} messages. - * @param message AddSearchAttributesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IAddSearchAttributesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddSearchAttributesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddSearchAttributesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.AddSearchAttributesResponse; - - /** - * Decodes an AddSearchAttributesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddSearchAttributesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.AddSearchAttributesResponse; - - /** - * Creates an AddSearchAttributesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddSearchAttributesResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.AddSearchAttributesResponse; - - /** - * Creates a plain object from an AddSearchAttributesResponse message. Also converts values to other types if specified. - * @param message AddSearchAttributesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.AddSearchAttributesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddSearchAttributesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddSearchAttributesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemoveSearchAttributesRequest. */ - interface IRemoveSearchAttributesRequest { - - /** Search attribute names to delete. */ - searchAttributes?: (string[]|null); - - /** RemoveSearchAttributesRequest namespace */ - namespace?: (string|null); - } - - /** Represents a RemoveSearchAttributesRequest. */ - class RemoveSearchAttributesRequest implements IRemoveSearchAttributesRequest { - - /** - * Constructs a new RemoveSearchAttributesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IRemoveSearchAttributesRequest); - - /** Search attribute names to delete. */ - public searchAttributes: string[]; - - /** RemoveSearchAttributesRequest namespace. */ - public namespace: string; - - /** - * Creates a new RemoveSearchAttributesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoveSearchAttributesRequest instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IRemoveSearchAttributesRequest): temporal.api.operatorservice.v1.RemoveSearchAttributesRequest; - - /** - * Encodes the specified RemoveSearchAttributesRequest message. Does not implicitly {@link temporal.api.operatorservice.v1.RemoveSearchAttributesRequest.verify|verify} messages. - * @param message RemoveSearchAttributesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IRemoveSearchAttributesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoveSearchAttributesRequest message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.RemoveSearchAttributesRequest.verify|verify} messages. - * @param message RemoveSearchAttributesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IRemoveSearchAttributesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoveSearchAttributesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoveSearchAttributesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.RemoveSearchAttributesRequest; - - /** - * Decodes a RemoveSearchAttributesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoveSearchAttributesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.RemoveSearchAttributesRequest; - - /** - * Creates a RemoveSearchAttributesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoveSearchAttributesRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.RemoveSearchAttributesRequest; - - /** - * Creates a plain object from a RemoveSearchAttributesRequest message. Also converts values to other types if specified. - * @param message RemoveSearchAttributesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.RemoveSearchAttributesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoveSearchAttributesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemoveSearchAttributesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemoveSearchAttributesResponse. */ - interface IRemoveSearchAttributesResponse { - } - - /** Represents a RemoveSearchAttributesResponse. */ - class RemoveSearchAttributesResponse implements IRemoveSearchAttributesResponse { - - /** - * Constructs a new RemoveSearchAttributesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IRemoveSearchAttributesResponse); - - /** - * Creates a new RemoveSearchAttributesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoveSearchAttributesResponse instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IRemoveSearchAttributesResponse): temporal.api.operatorservice.v1.RemoveSearchAttributesResponse; - - /** - * Encodes the specified RemoveSearchAttributesResponse message. Does not implicitly {@link temporal.api.operatorservice.v1.RemoveSearchAttributesResponse.verify|verify} messages. - * @param message RemoveSearchAttributesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IRemoveSearchAttributesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoveSearchAttributesResponse message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.RemoveSearchAttributesResponse.verify|verify} messages. - * @param message RemoveSearchAttributesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IRemoveSearchAttributesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoveSearchAttributesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoveSearchAttributesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.RemoveSearchAttributesResponse; - - /** - * Decodes a RemoveSearchAttributesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoveSearchAttributesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.RemoveSearchAttributesResponse; - - /** - * Creates a RemoveSearchAttributesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoveSearchAttributesResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.RemoveSearchAttributesResponse; - - /** - * Creates a plain object from a RemoveSearchAttributesResponse message. Also converts values to other types if specified. - * @param message RemoveSearchAttributesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.RemoveSearchAttributesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoveSearchAttributesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemoveSearchAttributesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSearchAttributesRequest. */ - interface IListSearchAttributesRequest { - - /** ListSearchAttributesRequest namespace */ - namespace?: (string|null); - } - - /** Represents a ListSearchAttributesRequest. */ - class ListSearchAttributesRequest implements IListSearchAttributesRequest { - - /** - * Constructs a new ListSearchAttributesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IListSearchAttributesRequest); - - /** ListSearchAttributesRequest namespace. */ - public namespace: string; - - /** - * Creates a new ListSearchAttributesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSearchAttributesRequest instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IListSearchAttributesRequest): temporal.api.operatorservice.v1.ListSearchAttributesRequest; - - /** - * Encodes the specified ListSearchAttributesRequest message. Does not implicitly {@link temporal.api.operatorservice.v1.ListSearchAttributesRequest.verify|verify} messages. - * @param message ListSearchAttributesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IListSearchAttributesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSearchAttributesRequest message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.ListSearchAttributesRequest.verify|verify} messages. - * @param message ListSearchAttributesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IListSearchAttributesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSearchAttributesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSearchAttributesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.ListSearchAttributesRequest; - - /** - * Decodes a ListSearchAttributesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSearchAttributesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.ListSearchAttributesRequest; - - /** - * Creates a ListSearchAttributesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSearchAttributesRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.ListSearchAttributesRequest; - - /** - * Creates a plain object from a ListSearchAttributesRequest message. Also converts values to other types if specified. - * @param message ListSearchAttributesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.ListSearchAttributesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSearchAttributesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSearchAttributesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSearchAttributesResponse. */ - interface IListSearchAttributesResponse { - - /** Mapping between custom (user-registered) search attribute name to its IndexedValueType. */ - customAttributes?: ({ [k: string]: temporal.api.enums.v1.IndexedValueType }|null); - - /** Mapping between system (predefined) search attribute name to its IndexedValueType. */ - systemAttributes?: ({ [k: string]: temporal.api.enums.v1.IndexedValueType }|null); - - /** Mapping from the attribute name to the visibility storage native type. */ - storageSchema?: ({ [k: string]: string }|null); - } - - /** Represents a ListSearchAttributesResponse. */ - class ListSearchAttributesResponse implements IListSearchAttributesResponse { - - /** - * Constructs a new ListSearchAttributesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IListSearchAttributesResponse); - - /** Mapping between custom (user-registered) search attribute name to its IndexedValueType. */ - public customAttributes: { [k: string]: temporal.api.enums.v1.IndexedValueType }; - - /** Mapping between system (predefined) search attribute name to its IndexedValueType. */ - public systemAttributes: { [k: string]: temporal.api.enums.v1.IndexedValueType }; - - /** Mapping from the attribute name to the visibility storage native type. */ - public storageSchema: { [k: string]: string }; - - /** - * Creates a new ListSearchAttributesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSearchAttributesResponse instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IListSearchAttributesResponse): temporal.api.operatorservice.v1.ListSearchAttributesResponse; - - /** - * Encodes the specified ListSearchAttributesResponse message. Does not implicitly {@link temporal.api.operatorservice.v1.ListSearchAttributesResponse.verify|verify} messages. - * @param message ListSearchAttributesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IListSearchAttributesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSearchAttributesResponse message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.ListSearchAttributesResponse.verify|verify} messages. - * @param message ListSearchAttributesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IListSearchAttributesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSearchAttributesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSearchAttributesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.ListSearchAttributesResponse; - - /** - * Decodes a ListSearchAttributesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSearchAttributesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.ListSearchAttributesResponse; - - /** - * Creates a ListSearchAttributesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSearchAttributesResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.ListSearchAttributesResponse; - - /** - * Creates a plain object from a ListSearchAttributesResponse message. Also converts values to other types if specified. - * @param message ListSearchAttributesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.ListSearchAttributesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSearchAttributesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSearchAttributesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteNamespaceRequest. */ - interface IDeleteNamespaceRequest { - - /** Only one of namespace or namespace_id must be specified to identify namespace. */ - namespace?: (string|null); - - /** DeleteNamespaceRequest namespaceId */ - namespaceId?: (string|null); - - /** - * If provided, the deletion of namespace info will be delayed for the given duration (0 means no delay). - * If not provided, the default delay configured in the cluster will be used. - */ - namespaceDeleteDelay?: (google.protobuf.IDuration|null); - } - - /** Represents a DeleteNamespaceRequest. */ - class DeleteNamespaceRequest implements IDeleteNamespaceRequest { - - /** - * Constructs a new DeleteNamespaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IDeleteNamespaceRequest); - - /** Only one of namespace or namespace_id must be specified to identify namespace. */ - public namespace: string; - - /** DeleteNamespaceRequest namespaceId. */ - public namespaceId: string; - - /** - * If provided, the deletion of namespace info will be delayed for the given duration (0 means no delay). - * If not provided, the default delay configured in the cluster will be used. - */ - public namespaceDeleteDelay?: (google.protobuf.IDuration|null); - - /** - * Creates a new DeleteNamespaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteNamespaceRequest instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IDeleteNamespaceRequest): temporal.api.operatorservice.v1.DeleteNamespaceRequest; - - /** - * Encodes the specified DeleteNamespaceRequest message. Does not implicitly {@link temporal.api.operatorservice.v1.DeleteNamespaceRequest.verify|verify} messages. - * @param message DeleteNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IDeleteNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteNamespaceRequest message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.DeleteNamespaceRequest.verify|verify} messages. - * @param message DeleteNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IDeleteNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteNamespaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.DeleteNamespaceRequest; - - /** - * Decodes a DeleteNamespaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.DeleteNamespaceRequest; - - /** - * Creates a DeleteNamespaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteNamespaceRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.DeleteNamespaceRequest; - - /** - * Creates a plain object from a DeleteNamespaceRequest message. Also converts values to other types if specified. - * @param message DeleteNamespaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.DeleteNamespaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteNamespaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteNamespaceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteNamespaceResponse. */ - interface IDeleteNamespaceResponse { - - /** Temporary namespace name that is used during reclaim resources step. */ - deletedNamespace?: (string|null); - } - - /** Represents a DeleteNamespaceResponse. */ - class DeleteNamespaceResponse implements IDeleteNamespaceResponse { - - /** - * Constructs a new DeleteNamespaceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IDeleteNamespaceResponse); - - /** Temporary namespace name that is used during reclaim resources step. */ - public deletedNamespace: string; - - /** - * Creates a new DeleteNamespaceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteNamespaceResponse instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IDeleteNamespaceResponse): temporal.api.operatorservice.v1.DeleteNamespaceResponse; - - /** - * Encodes the specified DeleteNamespaceResponse message. Does not implicitly {@link temporal.api.operatorservice.v1.DeleteNamespaceResponse.verify|verify} messages. - * @param message DeleteNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IDeleteNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteNamespaceResponse message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.DeleteNamespaceResponse.verify|verify} messages. - * @param message DeleteNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IDeleteNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteNamespaceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.DeleteNamespaceResponse; - - /** - * Decodes a DeleteNamespaceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.DeleteNamespaceResponse; - - /** - * Creates a DeleteNamespaceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteNamespaceResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.DeleteNamespaceResponse; - - /** - * Creates a plain object from a DeleteNamespaceResponse message. Also converts values to other types if specified. - * @param message DeleteNamespaceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.DeleteNamespaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteNamespaceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteNamespaceResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddOrUpdateRemoteClusterRequest. */ - interface IAddOrUpdateRemoteClusterRequest { - - /** Frontend Address is a cross cluster accessible address for gRPC traffic. This field is required. */ - frontendAddress?: (string|null); - - /** Flag to enable / disable the cross cluster connection. */ - enableRemoteClusterConnection?: (boolean|null); - - /** - * Frontend HTTP Address is a cross cluster accessible address for HTTP traffic. This field is optional. If not provided - * on update, the existing HTTP address will be removed. - */ - frontendHttpAddress?: (string|null); - - /** Controls whether replication streams are active. */ - enableReplication?: (boolean|null); - } - - /** Represents an AddOrUpdateRemoteClusterRequest. */ - class AddOrUpdateRemoteClusterRequest implements IAddOrUpdateRemoteClusterRequest { - - /** - * Constructs a new AddOrUpdateRemoteClusterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IAddOrUpdateRemoteClusterRequest); - - /** Frontend Address is a cross cluster accessible address for gRPC traffic. This field is required. */ - public frontendAddress: string; - - /** Flag to enable / disable the cross cluster connection. */ - public enableRemoteClusterConnection: boolean; - - /** - * Frontend HTTP Address is a cross cluster accessible address for HTTP traffic. This field is optional. If not provided - * on update, the existing HTTP address will be removed. - */ - public frontendHttpAddress: string; - - /** Controls whether replication streams are active. */ - public enableReplication: boolean; - - /** - * Creates a new AddOrUpdateRemoteClusterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns AddOrUpdateRemoteClusterRequest instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IAddOrUpdateRemoteClusterRequest): temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest; - - /** - * Encodes the specified AddOrUpdateRemoteClusterRequest message. Does not implicitly {@link temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest.verify|verify} messages. - * @param message AddOrUpdateRemoteClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IAddOrUpdateRemoteClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddOrUpdateRemoteClusterRequest message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest.verify|verify} messages. - * @param message AddOrUpdateRemoteClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IAddOrUpdateRemoteClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddOrUpdateRemoteClusterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddOrUpdateRemoteClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest; - - /** - * Decodes an AddOrUpdateRemoteClusterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddOrUpdateRemoteClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest; - - /** - * Creates an AddOrUpdateRemoteClusterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddOrUpdateRemoteClusterRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest; - - /** - * Creates a plain object from an AddOrUpdateRemoteClusterRequest message. Also converts values to other types if specified. - * @param message AddOrUpdateRemoteClusterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddOrUpdateRemoteClusterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddOrUpdateRemoteClusterRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddOrUpdateRemoteClusterResponse. */ - interface IAddOrUpdateRemoteClusterResponse { - } - - /** Represents an AddOrUpdateRemoteClusterResponse. */ - class AddOrUpdateRemoteClusterResponse implements IAddOrUpdateRemoteClusterResponse { - - /** - * Constructs a new AddOrUpdateRemoteClusterResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IAddOrUpdateRemoteClusterResponse); - - /** - * Creates a new AddOrUpdateRemoteClusterResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns AddOrUpdateRemoteClusterResponse instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IAddOrUpdateRemoteClusterResponse): temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse; - - /** - * Encodes the specified AddOrUpdateRemoteClusterResponse message. Does not implicitly {@link temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse.verify|verify} messages. - * @param message AddOrUpdateRemoteClusterResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IAddOrUpdateRemoteClusterResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddOrUpdateRemoteClusterResponse message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse.verify|verify} messages. - * @param message AddOrUpdateRemoteClusterResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IAddOrUpdateRemoteClusterResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddOrUpdateRemoteClusterResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddOrUpdateRemoteClusterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse; - - /** - * Decodes an AddOrUpdateRemoteClusterResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddOrUpdateRemoteClusterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse; - - /** - * Creates an AddOrUpdateRemoteClusterResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddOrUpdateRemoteClusterResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse; - - /** - * Creates a plain object from an AddOrUpdateRemoteClusterResponse message. Also converts values to other types if specified. - * @param message AddOrUpdateRemoteClusterResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddOrUpdateRemoteClusterResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddOrUpdateRemoteClusterResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemoveRemoteClusterRequest. */ - interface IRemoveRemoteClusterRequest { - - /** Remote cluster name to be removed. */ - clusterName?: (string|null); - } - - /** Represents a RemoveRemoteClusterRequest. */ - class RemoveRemoteClusterRequest implements IRemoveRemoteClusterRequest { - - /** - * Constructs a new RemoveRemoteClusterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IRemoveRemoteClusterRequest); - - /** Remote cluster name to be removed. */ - public clusterName: string; - - /** - * Creates a new RemoveRemoteClusterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoveRemoteClusterRequest instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IRemoveRemoteClusterRequest): temporal.api.operatorservice.v1.RemoveRemoteClusterRequest; - - /** - * Encodes the specified RemoveRemoteClusterRequest message. Does not implicitly {@link temporal.api.operatorservice.v1.RemoveRemoteClusterRequest.verify|verify} messages. - * @param message RemoveRemoteClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IRemoveRemoteClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoveRemoteClusterRequest message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.RemoveRemoteClusterRequest.verify|verify} messages. - * @param message RemoveRemoteClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IRemoveRemoteClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoveRemoteClusterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoveRemoteClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.RemoveRemoteClusterRequest; - - /** - * Decodes a RemoveRemoteClusterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoveRemoteClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.RemoveRemoteClusterRequest; - - /** - * Creates a RemoveRemoteClusterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoveRemoteClusterRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.RemoveRemoteClusterRequest; - - /** - * Creates a plain object from a RemoveRemoteClusterRequest message. Also converts values to other types if specified. - * @param message RemoveRemoteClusterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.RemoveRemoteClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoveRemoteClusterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemoveRemoteClusterRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemoveRemoteClusterResponse. */ - interface IRemoveRemoteClusterResponse { - } - - /** Represents a RemoveRemoteClusterResponse. */ - class RemoveRemoteClusterResponse implements IRemoveRemoteClusterResponse { - - /** - * Constructs a new RemoveRemoteClusterResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IRemoveRemoteClusterResponse); - - /** - * Creates a new RemoveRemoteClusterResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoveRemoteClusterResponse instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IRemoveRemoteClusterResponse): temporal.api.operatorservice.v1.RemoveRemoteClusterResponse; - - /** - * Encodes the specified RemoveRemoteClusterResponse message. Does not implicitly {@link temporal.api.operatorservice.v1.RemoveRemoteClusterResponse.verify|verify} messages. - * @param message RemoveRemoteClusterResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IRemoveRemoteClusterResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoveRemoteClusterResponse message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.RemoveRemoteClusterResponse.verify|verify} messages. - * @param message RemoveRemoteClusterResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IRemoveRemoteClusterResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoveRemoteClusterResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoveRemoteClusterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.RemoveRemoteClusterResponse; - - /** - * Decodes a RemoveRemoteClusterResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoveRemoteClusterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.RemoveRemoteClusterResponse; - - /** - * Creates a RemoveRemoteClusterResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoveRemoteClusterResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.RemoveRemoteClusterResponse; - - /** - * Creates a plain object from a RemoveRemoteClusterResponse message. Also converts values to other types if specified. - * @param message RemoveRemoteClusterResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.RemoveRemoteClusterResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoveRemoteClusterResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemoveRemoteClusterResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListClustersRequest. */ - interface IListClustersRequest { - - /** ListClustersRequest pageSize */ - pageSize?: (number|null); - - /** ListClustersRequest nextPageToken */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListClustersRequest. */ - class ListClustersRequest implements IListClustersRequest { - - /** - * Constructs a new ListClustersRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IListClustersRequest); - - /** ListClustersRequest pageSize. */ - public pageSize: number; - - /** ListClustersRequest nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListClustersRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListClustersRequest instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IListClustersRequest): temporal.api.operatorservice.v1.ListClustersRequest; - - /** - * Encodes the specified ListClustersRequest message. Does not implicitly {@link temporal.api.operatorservice.v1.ListClustersRequest.verify|verify} messages. - * @param message ListClustersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IListClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListClustersRequest message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.ListClustersRequest.verify|verify} messages. - * @param message ListClustersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IListClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListClustersRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListClustersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.ListClustersRequest; - - /** - * Decodes a ListClustersRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListClustersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.ListClustersRequest; - - /** - * Creates a ListClustersRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListClustersRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.ListClustersRequest; - - /** - * Creates a plain object from a ListClustersRequest message. Also converts values to other types if specified. - * @param message ListClustersRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.ListClustersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListClustersRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListClustersRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListClustersResponse. */ - interface IListClustersResponse { - - /** List of all cluster information */ - clusters?: (temporal.api.operatorservice.v1.IClusterMetadata[]|null); - - /** ListClustersResponse nextPageToken */ - nextPageToken?: (Uint8Array|null); - } - - /** Represents a ListClustersResponse. */ - class ListClustersResponse implements IListClustersResponse { - - /** - * Constructs a new ListClustersResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IListClustersResponse); - - /** List of all cluster information */ - public clusters: temporal.api.operatorservice.v1.IClusterMetadata[]; - - /** ListClustersResponse nextPageToken. */ - public nextPageToken: Uint8Array; - - /** - * Creates a new ListClustersResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListClustersResponse instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IListClustersResponse): temporal.api.operatorservice.v1.ListClustersResponse; - - /** - * Encodes the specified ListClustersResponse message. Does not implicitly {@link temporal.api.operatorservice.v1.ListClustersResponse.verify|verify} messages. - * @param message ListClustersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IListClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListClustersResponse message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.ListClustersResponse.verify|verify} messages. - * @param message ListClustersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IListClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListClustersResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListClustersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.ListClustersResponse; - - /** - * Decodes a ListClustersResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListClustersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.ListClustersResponse; - - /** - * Creates a ListClustersResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListClustersResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.ListClustersResponse; - - /** - * Creates a plain object from a ListClustersResponse message. Also converts values to other types if specified. - * @param message ListClustersResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.ListClustersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListClustersResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListClustersResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClusterMetadata. */ - interface IClusterMetadata { - - /** Name of the cluster name. */ - clusterName?: (string|null); - - /** Id of the cluster. */ - clusterId?: (string|null); - - /** gRPC address. */ - address?: (string|null); - - /** HTTP address, if one exists. */ - httpAddress?: (string|null); - - /** A unique failover version across all connected clusters. */ - initialFailoverVersion?: (Long|null); - - /** History service shard number. */ - historyShardCount?: (number|null); - - /** A flag to indicate if a connection is active. */ - isConnectionEnabled?: (boolean|null); - - /** A flag to indicate if replication is enabled. */ - isReplicationEnabled?: (boolean|null); - } - - /** Represents a ClusterMetadata. */ - class ClusterMetadata implements IClusterMetadata { - - /** - * Constructs a new ClusterMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IClusterMetadata); - - /** Name of the cluster name. */ - public clusterName: string; - - /** Id of the cluster. */ - public clusterId: string; - - /** gRPC address. */ - public address: string; - - /** HTTP address, if one exists. */ - public httpAddress: string; - - /** A unique failover version across all connected clusters. */ - public initialFailoverVersion: Long; - - /** History service shard number. */ - public historyShardCount: number; - - /** A flag to indicate if a connection is active. */ - public isConnectionEnabled: boolean; - - /** A flag to indicate if replication is enabled. */ - public isReplicationEnabled: boolean; - - /** - * Creates a new ClusterMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ClusterMetadata instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IClusterMetadata): temporal.api.operatorservice.v1.ClusterMetadata; - - /** - * Encodes the specified ClusterMetadata message. Does not implicitly {@link temporal.api.operatorservice.v1.ClusterMetadata.verify|verify} messages. - * @param message ClusterMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IClusterMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClusterMetadata message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.ClusterMetadata.verify|verify} messages. - * @param message ClusterMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IClusterMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClusterMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClusterMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.ClusterMetadata; - - /** - * Decodes a ClusterMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClusterMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.ClusterMetadata; - - /** - * Creates a ClusterMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClusterMetadata - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.ClusterMetadata; - - /** - * Creates a plain object from a ClusterMetadata message. Also converts values to other types if specified. - * @param message ClusterMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.ClusterMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClusterMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClusterMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNexusEndpointRequest. */ - interface IGetNexusEndpointRequest { - - /** Server-generated unique endpoint ID. */ - id?: (string|null); - } - - /** Represents a GetNexusEndpointRequest. */ - class GetNexusEndpointRequest implements IGetNexusEndpointRequest { - - /** - * Constructs a new GetNexusEndpointRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IGetNexusEndpointRequest); - - /** Server-generated unique endpoint ID. */ - public id: string; - - /** - * Creates a new GetNexusEndpointRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNexusEndpointRequest instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IGetNexusEndpointRequest): temporal.api.operatorservice.v1.GetNexusEndpointRequest; - - /** - * Encodes the specified GetNexusEndpointRequest message. Does not implicitly {@link temporal.api.operatorservice.v1.GetNexusEndpointRequest.verify|verify} messages. - * @param message GetNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IGetNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNexusEndpointRequest message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.GetNexusEndpointRequest.verify|verify} messages. - * @param message GetNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IGetNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNexusEndpointRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.GetNexusEndpointRequest; - - /** - * Decodes a GetNexusEndpointRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.GetNexusEndpointRequest; - - /** - * Creates a GetNexusEndpointRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNexusEndpointRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.GetNexusEndpointRequest; - - /** - * Creates a plain object from a GetNexusEndpointRequest message. Also converts values to other types if specified. - * @param message GetNexusEndpointRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.GetNexusEndpointRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNexusEndpointRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNexusEndpointRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNexusEndpointResponse. */ - interface IGetNexusEndpointResponse { - - /** GetNexusEndpointResponse endpoint */ - endpoint?: (temporal.api.nexus.v1.IEndpoint|null); - } - - /** Represents a GetNexusEndpointResponse. */ - class GetNexusEndpointResponse implements IGetNexusEndpointResponse { - - /** - * Constructs a new GetNexusEndpointResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IGetNexusEndpointResponse); - - /** GetNexusEndpointResponse endpoint. */ - public endpoint?: (temporal.api.nexus.v1.IEndpoint|null); - - /** - * Creates a new GetNexusEndpointResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNexusEndpointResponse instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IGetNexusEndpointResponse): temporal.api.operatorservice.v1.GetNexusEndpointResponse; - - /** - * Encodes the specified GetNexusEndpointResponse message. Does not implicitly {@link temporal.api.operatorservice.v1.GetNexusEndpointResponse.verify|verify} messages. - * @param message GetNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IGetNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNexusEndpointResponse message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.GetNexusEndpointResponse.verify|verify} messages. - * @param message GetNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IGetNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNexusEndpointResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.GetNexusEndpointResponse; - - /** - * Decodes a GetNexusEndpointResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.GetNexusEndpointResponse; - - /** - * Creates a GetNexusEndpointResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNexusEndpointResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.GetNexusEndpointResponse; - - /** - * Creates a plain object from a GetNexusEndpointResponse message. Also converts values to other types if specified. - * @param message GetNexusEndpointResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.GetNexusEndpointResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNexusEndpointResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNexusEndpointResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateNexusEndpointRequest. */ - interface ICreateNexusEndpointRequest { - - /** Endpoint definition to create. */ - spec?: (temporal.api.nexus.v1.IEndpointSpec|null); - } - - /** Represents a CreateNexusEndpointRequest. */ - class CreateNexusEndpointRequest implements ICreateNexusEndpointRequest { - - /** - * Constructs a new CreateNexusEndpointRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.ICreateNexusEndpointRequest); - - /** Endpoint definition to create. */ - public spec?: (temporal.api.nexus.v1.IEndpointSpec|null); - - /** - * Creates a new CreateNexusEndpointRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateNexusEndpointRequest instance - */ - public static create(properties?: temporal.api.operatorservice.v1.ICreateNexusEndpointRequest): temporal.api.operatorservice.v1.CreateNexusEndpointRequest; - - /** - * Encodes the specified CreateNexusEndpointRequest message. Does not implicitly {@link temporal.api.operatorservice.v1.CreateNexusEndpointRequest.verify|verify} messages. - * @param message CreateNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.ICreateNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateNexusEndpointRequest message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.CreateNexusEndpointRequest.verify|verify} messages. - * @param message CreateNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.ICreateNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateNexusEndpointRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.CreateNexusEndpointRequest; - - /** - * Decodes a CreateNexusEndpointRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.CreateNexusEndpointRequest; - - /** - * Creates a CreateNexusEndpointRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateNexusEndpointRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.CreateNexusEndpointRequest; - - /** - * Creates a plain object from a CreateNexusEndpointRequest message. Also converts values to other types if specified. - * @param message CreateNexusEndpointRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.CreateNexusEndpointRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateNexusEndpointRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateNexusEndpointRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateNexusEndpointResponse. */ - interface ICreateNexusEndpointResponse { - - /** Data post acceptance. Can be used to issue additional updates to this record. */ - endpoint?: (temporal.api.nexus.v1.IEndpoint|null); - } - - /** Represents a CreateNexusEndpointResponse. */ - class CreateNexusEndpointResponse implements ICreateNexusEndpointResponse { - - /** - * Constructs a new CreateNexusEndpointResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.ICreateNexusEndpointResponse); - - /** Data post acceptance. Can be used to issue additional updates to this record. */ - public endpoint?: (temporal.api.nexus.v1.IEndpoint|null); - - /** - * Creates a new CreateNexusEndpointResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateNexusEndpointResponse instance - */ - public static create(properties?: temporal.api.operatorservice.v1.ICreateNexusEndpointResponse): temporal.api.operatorservice.v1.CreateNexusEndpointResponse; - - /** - * Encodes the specified CreateNexusEndpointResponse message. Does not implicitly {@link temporal.api.operatorservice.v1.CreateNexusEndpointResponse.verify|verify} messages. - * @param message CreateNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.ICreateNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateNexusEndpointResponse message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.CreateNexusEndpointResponse.verify|verify} messages. - * @param message CreateNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.ICreateNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateNexusEndpointResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.CreateNexusEndpointResponse; - - /** - * Decodes a CreateNexusEndpointResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.CreateNexusEndpointResponse; - - /** - * Creates a CreateNexusEndpointResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateNexusEndpointResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.CreateNexusEndpointResponse; - - /** - * Creates a plain object from a CreateNexusEndpointResponse message. Also converts values to other types if specified. - * @param message CreateNexusEndpointResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.CreateNexusEndpointResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateNexusEndpointResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateNexusEndpointResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNexusEndpointRequest. */ - interface IUpdateNexusEndpointRequest { - - /** Server-generated unique endpoint ID. */ - id?: (string|null); - - /** Data version for this endpoint. Must match current version. */ - version?: (Long|null); - - /** UpdateNexusEndpointRequest spec */ - spec?: (temporal.api.nexus.v1.IEndpointSpec|null); - } - - /** Represents an UpdateNexusEndpointRequest. */ - class UpdateNexusEndpointRequest implements IUpdateNexusEndpointRequest { - - /** - * Constructs a new UpdateNexusEndpointRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IUpdateNexusEndpointRequest); - - /** Server-generated unique endpoint ID. */ - public id: string; - - /** Data version for this endpoint. Must match current version. */ - public version: Long; - - /** UpdateNexusEndpointRequest spec. */ - public spec?: (temporal.api.nexus.v1.IEndpointSpec|null); - - /** - * Creates a new UpdateNexusEndpointRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNexusEndpointRequest instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IUpdateNexusEndpointRequest): temporal.api.operatorservice.v1.UpdateNexusEndpointRequest; - - /** - * Encodes the specified UpdateNexusEndpointRequest message. Does not implicitly {@link temporal.api.operatorservice.v1.UpdateNexusEndpointRequest.verify|verify} messages. - * @param message UpdateNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IUpdateNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNexusEndpointRequest message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.UpdateNexusEndpointRequest.verify|verify} messages. - * @param message UpdateNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IUpdateNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNexusEndpointRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.UpdateNexusEndpointRequest; - - /** - * Decodes an UpdateNexusEndpointRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.UpdateNexusEndpointRequest; - - /** - * Creates an UpdateNexusEndpointRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNexusEndpointRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.UpdateNexusEndpointRequest; - - /** - * Creates a plain object from an UpdateNexusEndpointRequest message. Also converts values to other types if specified. - * @param message UpdateNexusEndpointRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.UpdateNexusEndpointRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNexusEndpointRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNexusEndpointRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNexusEndpointResponse. */ - interface IUpdateNexusEndpointResponse { - - /** Data post acceptance. Can be used to issue additional updates to this record. */ - endpoint?: (temporal.api.nexus.v1.IEndpoint|null); - } - - /** Represents an UpdateNexusEndpointResponse. */ - class UpdateNexusEndpointResponse implements IUpdateNexusEndpointResponse { - - /** - * Constructs a new UpdateNexusEndpointResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IUpdateNexusEndpointResponse); - - /** Data post acceptance. Can be used to issue additional updates to this record. */ - public endpoint?: (temporal.api.nexus.v1.IEndpoint|null); - - /** - * Creates a new UpdateNexusEndpointResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNexusEndpointResponse instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IUpdateNexusEndpointResponse): temporal.api.operatorservice.v1.UpdateNexusEndpointResponse; - - /** - * Encodes the specified UpdateNexusEndpointResponse message. Does not implicitly {@link temporal.api.operatorservice.v1.UpdateNexusEndpointResponse.verify|verify} messages. - * @param message UpdateNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IUpdateNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNexusEndpointResponse message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.UpdateNexusEndpointResponse.verify|verify} messages. - * @param message UpdateNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IUpdateNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNexusEndpointResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.UpdateNexusEndpointResponse; - - /** - * Decodes an UpdateNexusEndpointResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.UpdateNexusEndpointResponse; - - /** - * Creates an UpdateNexusEndpointResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNexusEndpointResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.UpdateNexusEndpointResponse; - - /** - * Creates a plain object from an UpdateNexusEndpointResponse message. Also converts values to other types if specified. - * @param message UpdateNexusEndpointResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.UpdateNexusEndpointResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNexusEndpointResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNexusEndpointResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteNexusEndpointRequest. */ - interface IDeleteNexusEndpointRequest { - - /** Server-generated unique endpoint ID. */ - id?: (string|null); - - /** Data version for this endpoint. Must match current version. */ - version?: (Long|null); - } - - /** Represents a DeleteNexusEndpointRequest. */ - class DeleteNexusEndpointRequest implements IDeleteNexusEndpointRequest { - - /** - * Constructs a new DeleteNexusEndpointRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IDeleteNexusEndpointRequest); - - /** Server-generated unique endpoint ID. */ - public id: string; - - /** Data version for this endpoint. Must match current version. */ - public version: Long; - - /** - * Creates a new DeleteNexusEndpointRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteNexusEndpointRequest instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IDeleteNexusEndpointRequest): temporal.api.operatorservice.v1.DeleteNexusEndpointRequest; - - /** - * Encodes the specified DeleteNexusEndpointRequest message. Does not implicitly {@link temporal.api.operatorservice.v1.DeleteNexusEndpointRequest.verify|verify} messages. - * @param message DeleteNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IDeleteNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteNexusEndpointRequest message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.DeleteNexusEndpointRequest.verify|verify} messages. - * @param message DeleteNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IDeleteNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteNexusEndpointRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.DeleteNexusEndpointRequest; - - /** - * Decodes a DeleteNexusEndpointRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.DeleteNexusEndpointRequest; - - /** - * Creates a DeleteNexusEndpointRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteNexusEndpointRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.DeleteNexusEndpointRequest; - - /** - * Creates a plain object from a DeleteNexusEndpointRequest message. Also converts values to other types if specified. - * @param message DeleteNexusEndpointRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.DeleteNexusEndpointRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteNexusEndpointRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteNexusEndpointRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteNexusEndpointResponse. */ - interface IDeleteNexusEndpointResponse { - } - - /** Represents a DeleteNexusEndpointResponse. */ - class DeleteNexusEndpointResponse implements IDeleteNexusEndpointResponse { - - /** - * Constructs a new DeleteNexusEndpointResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IDeleteNexusEndpointResponse); - - /** - * Creates a new DeleteNexusEndpointResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteNexusEndpointResponse instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IDeleteNexusEndpointResponse): temporal.api.operatorservice.v1.DeleteNexusEndpointResponse; - - /** - * Encodes the specified DeleteNexusEndpointResponse message. Does not implicitly {@link temporal.api.operatorservice.v1.DeleteNexusEndpointResponse.verify|verify} messages. - * @param message DeleteNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IDeleteNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteNexusEndpointResponse message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.DeleteNexusEndpointResponse.verify|verify} messages. - * @param message DeleteNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IDeleteNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteNexusEndpointResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.DeleteNexusEndpointResponse; - - /** - * Decodes a DeleteNexusEndpointResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.DeleteNexusEndpointResponse; - - /** - * Creates a DeleteNexusEndpointResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteNexusEndpointResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.DeleteNexusEndpointResponse; - - /** - * Creates a plain object from a DeleteNexusEndpointResponse message. Also converts values to other types if specified. - * @param message DeleteNexusEndpointResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.DeleteNexusEndpointResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteNexusEndpointResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteNexusEndpointResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListNexusEndpointsRequest. */ - interface IListNexusEndpointsRequest { - - /** ListNexusEndpointsRequest pageSize */ - pageSize?: (number|null); - - /** - * To get the next page, pass in `ListNexusEndpointsResponse.next_page_token` from the previous page's - * response, the token will be empty if there's no other page. - * Note: the last page may be empty if the total number of endpoints registered is a multiple of the page size. - */ - nextPageToken?: (Uint8Array|null); - - /** - * Name of the incoming endpoint to filter on - optional. Specifying this will result in zero or one results. - * (-- api-linter: core::203::field-behavior-required=disabled - * aip.dev/not-precedent: Not following linter rules. --) - */ - name?: (string|null); - } - - /** Represents a ListNexusEndpointsRequest. */ - class ListNexusEndpointsRequest implements IListNexusEndpointsRequest { - - /** - * Constructs a new ListNexusEndpointsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IListNexusEndpointsRequest); - - /** ListNexusEndpointsRequest pageSize. */ - public pageSize: number; - - /** - * To get the next page, pass in `ListNexusEndpointsResponse.next_page_token` from the previous page's - * response, the token will be empty if there's no other page. - * Note: the last page may be empty if the total number of endpoints registered is a multiple of the page size. - */ - public nextPageToken: Uint8Array; - - /** - * Name of the incoming endpoint to filter on - optional. Specifying this will result in zero or one results. - * (-- api-linter: core::203::field-behavior-required=disabled - * aip.dev/not-precedent: Not following linter rules. --) - */ - public name: string; - - /** - * Creates a new ListNexusEndpointsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNexusEndpointsRequest instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IListNexusEndpointsRequest): temporal.api.operatorservice.v1.ListNexusEndpointsRequest; - - /** - * Encodes the specified ListNexusEndpointsRequest message. Does not implicitly {@link temporal.api.operatorservice.v1.ListNexusEndpointsRequest.verify|verify} messages. - * @param message ListNexusEndpointsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IListNexusEndpointsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListNexusEndpointsRequest message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.ListNexusEndpointsRequest.verify|verify} messages. - * @param message ListNexusEndpointsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IListNexusEndpointsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListNexusEndpointsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListNexusEndpointsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.ListNexusEndpointsRequest; - - /** - * Decodes a ListNexusEndpointsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNexusEndpointsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.ListNexusEndpointsRequest; - - /** - * Creates a ListNexusEndpointsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListNexusEndpointsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.ListNexusEndpointsRequest; - - /** - * Creates a plain object from a ListNexusEndpointsRequest message. Also converts values to other types if specified. - * @param message ListNexusEndpointsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.ListNexusEndpointsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListNexusEndpointsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListNexusEndpointsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListNexusEndpointsResponse. */ - interface IListNexusEndpointsResponse { - - /** Token for getting the next page. */ - nextPageToken?: (Uint8Array|null); - - /** ListNexusEndpointsResponse endpoints */ - endpoints?: (temporal.api.nexus.v1.IEndpoint[]|null); - } - - /** Represents a ListNexusEndpointsResponse. */ - class ListNexusEndpointsResponse implements IListNexusEndpointsResponse { - - /** - * Constructs a new ListNexusEndpointsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.operatorservice.v1.IListNexusEndpointsResponse); - - /** Token for getting the next page. */ - public nextPageToken: Uint8Array; - - /** ListNexusEndpointsResponse endpoints. */ - public endpoints: temporal.api.nexus.v1.IEndpoint[]; - - /** - * Creates a new ListNexusEndpointsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNexusEndpointsResponse instance - */ - public static create(properties?: temporal.api.operatorservice.v1.IListNexusEndpointsResponse): temporal.api.operatorservice.v1.ListNexusEndpointsResponse; - - /** - * Encodes the specified ListNexusEndpointsResponse message. Does not implicitly {@link temporal.api.operatorservice.v1.ListNexusEndpointsResponse.verify|verify} messages. - * @param message ListNexusEndpointsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.operatorservice.v1.IListNexusEndpointsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListNexusEndpointsResponse message, length delimited. Does not implicitly {@link temporal.api.operatorservice.v1.ListNexusEndpointsResponse.verify|verify} messages. - * @param message ListNexusEndpointsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.operatorservice.v1.IListNexusEndpointsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListNexusEndpointsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListNexusEndpointsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.operatorservice.v1.ListNexusEndpointsResponse; - - /** - * Decodes a ListNexusEndpointsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNexusEndpointsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.operatorservice.v1.ListNexusEndpointsResponse; - - /** - * Creates a ListNexusEndpointsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListNexusEndpointsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.operatorservice.v1.ListNexusEndpointsResponse; - - /** - * Creates a plain object from a ListNexusEndpointsResponse message. Also converts values to other types if specified. - * @param message ListNexusEndpointsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.operatorservice.v1.ListNexusEndpointsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListNexusEndpointsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListNexusEndpointsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace cloud. */ - namespace cloud { - - /** Namespace cloudservice. */ - namespace cloudservice { - - /** Namespace v1. */ - namespace v1 { - - /** - * WARNING: This service is currently experimental and may change in - * incompatible ways. - */ - class CloudService extends $protobuf.rpc.Service { - - /** - * Constructs a new CloudService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new CloudService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): CloudService; - - /** - * Gets all known users - * @param request GetUsersRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetUsersResponse - */ - public getUsers(request: temporal.api.cloud.cloudservice.v1.IGetUsersRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetUsersCallback): void; - - /** - * Gets all known users - * @param request GetUsersRequest message or plain object - * @returns Promise - */ - public getUsers(request: temporal.api.cloud.cloudservice.v1.IGetUsersRequest): Promise; - - /** - * Get a user - * @param request GetUserRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetUserResponse - */ - public getUser(request: temporal.api.cloud.cloudservice.v1.IGetUserRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetUserCallback): void; - - /** - * Get a user - * @param request GetUserRequest message or plain object - * @returns Promise - */ - public getUser(request: temporal.api.cloud.cloudservice.v1.IGetUserRequest): Promise; - - /** - * Create a user - * @param request CreateUserRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CreateUserResponse - */ - public createUser(request: temporal.api.cloud.cloudservice.v1.ICreateUserRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.CreateUserCallback): void; - - /** - * Create a user - * @param request CreateUserRequest message or plain object - * @returns Promise - */ - public createUser(request: temporal.api.cloud.cloudservice.v1.ICreateUserRequest): Promise; - - /** - * Update a user - * @param request UpdateUserRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateUserResponse - */ - public updateUser(request: temporal.api.cloud.cloudservice.v1.IUpdateUserRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.UpdateUserCallback): void; - - /** - * Update a user - * @param request UpdateUserRequest message or plain object - * @returns Promise - */ - public updateUser(request: temporal.api.cloud.cloudservice.v1.IUpdateUserRequest): Promise; - - /** - * Delete a user - * @param request DeleteUserRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteUserResponse - */ - public deleteUser(request: temporal.api.cloud.cloudservice.v1.IDeleteUserRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.DeleteUserCallback): void; - - /** - * Delete a user - * @param request DeleteUserRequest message or plain object - * @returns Promise - */ - public deleteUser(request: temporal.api.cloud.cloudservice.v1.IDeleteUserRequest): Promise; - - /** - * Set a user's access to a namespace - * @param request SetUserNamespaceAccessRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SetUserNamespaceAccessResponse - */ - public setUserNamespaceAccess(request: temporal.api.cloud.cloudservice.v1.ISetUserNamespaceAccessRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.SetUserNamespaceAccessCallback): void; - - /** - * Set a user's access to a namespace - * @param request SetUserNamespaceAccessRequest message or plain object - * @returns Promise - */ - public setUserNamespaceAccess(request: temporal.api.cloud.cloudservice.v1.ISetUserNamespaceAccessRequest): Promise; - - /** - * Get the latest information on an async operation - * @param request GetAsyncOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetAsyncOperationResponse - */ - public getAsyncOperation(request: temporal.api.cloud.cloudservice.v1.IGetAsyncOperationRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetAsyncOperationCallback): void; - - /** - * Get the latest information on an async operation - * @param request GetAsyncOperationRequest message or plain object - * @returns Promise - */ - public getAsyncOperation(request: temporal.api.cloud.cloudservice.v1.IGetAsyncOperationRequest): Promise; - - /** - * Create a new namespace - * @param request CreateNamespaceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CreateNamespaceResponse - */ - public createNamespace(request: temporal.api.cloud.cloudservice.v1.ICreateNamespaceRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.CreateNamespaceCallback): void; - - /** - * Create a new namespace - * @param request CreateNamespaceRequest message or plain object - * @returns Promise - */ - public createNamespace(request: temporal.api.cloud.cloudservice.v1.ICreateNamespaceRequest): Promise; - - /** - * Get all namespaces - * @param request GetNamespacesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetNamespacesResponse - */ - public getNamespaces(request: temporal.api.cloud.cloudservice.v1.IGetNamespacesRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetNamespacesCallback): void; - - /** - * Get all namespaces - * @param request GetNamespacesRequest message or plain object - * @returns Promise - */ - public getNamespaces(request: temporal.api.cloud.cloudservice.v1.IGetNamespacesRequest): Promise; - - /** - * Get a namespace - * @param request GetNamespaceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetNamespaceResponse - */ - public getNamespace(request: temporal.api.cloud.cloudservice.v1.IGetNamespaceRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetNamespaceCallback): void; - - /** - * Get a namespace - * @param request GetNamespaceRequest message or plain object - * @returns Promise - */ - public getNamespace(request: temporal.api.cloud.cloudservice.v1.IGetNamespaceRequest): Promise; - - /** - * Update a namespace - * @param request UpdateNamespaceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateNamespaceResponse - */ - public updateNamespace(request: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.UpdateNamespaceCallback): void; - - /** - * Update a namespace - * @param request UpdateNamespaceRequest message or plain object - * @returns Promise - */ - public updateNamespace(request: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceRequest): Promise; - - /** - * Rename an existing customer search attribute - * @param request RenameCustomSearchAttributeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RenameCustomSearchAttributeResponse - */ - public renameCustomSearchAttribute(request: temporal.api.cloud.cloudservice.v1.IRenameCustomSearchAttributeRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.RenameCustomSearchAttributeCallback): void; - - /** - * Rename an existing customer search attribute - * @param request RenameCustomSearchAttributeRequest message or plain object - * @returns Promise - */ - public renameCustomSearchAttribute(request: temporal.api.cloud.cloudservice.v1.IRenameCustomSearchAttributeRequest): Promise; - - /** - * Delete a namespace - * @param request DeleteNamespaceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteNamespaceResponse - */ - public deleteNamespace(request: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.DeleteNamespaceCallback): void; - - /** - * Delete a namespace - * @param request DeleteNamespaceRequest message or plain object - * @returns Promise - */ - public deleteNamespace(request: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRequest): Promise; - - /** - * Failover a multi-region namespace - * @param request FailoverNamespaceRegionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FailoverNamespaceRegionResponse - */ - public failoverNamespaceRegion(request: temporal.api.cloud.cloudservice.v1.IFailoverNamespaceRegionRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.FailoverNamespaceRegionCallback): void; - - /** - * Failover a multi-region namespace - * @param request FailoverNamespaceRegionRequest message or plain object - * @returns Promise - */ - public failoverNamespaceRegion(request: temporal.api.cloud.cloudservice.v1.IFailoverNamespaceRegionRequest): Promise; - - /** - * Add a new region to a namespace - * @param request AddNamespaceRegionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AddNamespaceRegionResponse - */ - public addNamespaceRegion(request: temporal.api.cloud.cloudservice.v1.IAddNamespaceRegionRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.AddNamespaceRegionCallback): void; - - /** - * Add a new region to a namespace - * @param request AddNamespaceRegionRequest message or plain object - * @returns Promise - */ - public addNamespaceRegion(request: temporal.api.cloud.cloudservice.v1.IAddNamespaceRegionRequest): Promise; - - /** - * Delete a region from a namespace - * @param request DeleteNamespaceRegionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteNamespaceRegionResponse - */ - public deleteNamespaceRegion(request: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRegionRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.DeleteNamespaceRegionCallback): void; - - /** - * Delete a region from a namespace - * @param request DeleteNamespaceRegionRequest message or plain object - * @returns Promise - */ - public deleteNamespaceRegion(request: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRegionRequest): Promise; - - /** - * Get all regions - * @param request GetRegionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetRegionsResponse - */ - public getRegions(request: temporal.api.cloud.cloudservice.v1.IGetRegionsRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetRegionsCallback): void; - - /** - * Get all regions - * @param request GetRegionsRequest message or plain object - * @returns Promise - */ - public getRegions(request: temporal.api.cloud.cloudservice.v1.IGetRegionsRequest): Promise; - - /** - * Get a region - * @param request GetRegionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetRegionResponse - */ - public getRegion(request: temporal.api.cloud.cloudservice.v1.IGetRegionRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetRegionCallback): void; - - /** - * Get a region - * @param request GetRegionRequest message or plain object - * @returns Promise - */ - public getRegion(request: temporal.api.cloud.cloudservice.v1.IGetRegionRequest): Promise; - - /** - * Get all known API keys - * @param request GetApiKeysRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetApiKeysResponse - */ - public getApiKeys(request: temporal.api.cloud.cloudservice.v1.IGetApiKeysRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetApiKeysCallback): void; - - /** - * Get all known API keys - * @param request GetApiKeysRequest message or plain object - * @returns Promise - */ - public getApiKeys(request: temporal.api.cloud.cloudservice.v1.IGetApiKeysRequest): Promise; - - /** - * Get an API key - * @param request GetApiKeyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetApiKeyResponse - */ - public getApiKey(request: temporal.api.cloud.cloudservice.v1.IGetApiKeyRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetApiKeyCallback): void; - - /** - * Get an API key - * @param request GetApiKeyRequest message or plain object - * @returns Promise - */ - public getApiKey(request: temporal.api.cloud.cloudservice.v1.IGetApiKeyRequest): Promise; - - /** - * Create an API key - * @param request CreateApiKeyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CreateApiKeyResponse - */ - public createApiKey(request: temporal.api.cloud.cloudservice.v1.ICreateApiKeyRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.CreateApiKeyCallback): void; - - /** - * Create an API key - * @param request CreateApiKeyRequest message or plain object - * @returns Promise - */ - public createApiKey(request: temporal.api.cloud.cloudservice.v1.ICreateApiKeyRequest): Promise; - - /** - * Update an API key - * @param request UpdateApiKeyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateApiKeyResponse - */ - public updateApiKey(request: temporal.api.cloud.cloudservice.v1.IUpdateApiKeyRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.UpdateApiKeyCallback): void; - - /** - * Update an API key - * @param request UpdateApiKeyRequest message or plain object - * @returns Promise - */ - public updateApiKey(request: temporal.api.cloud.cloudservice.v1.IUpdateApiKeyRequest): Promise; - - /** - * Delete an API key - * @param request DeleteApiKeyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteApiKeyResponse - */ - public deleteApiKey(request: temporal.api.cloud.cloudservice.v1.IDeleteApiKeyRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.DeleteApiKeyCallback): void; - - /** - * Delete an API key - * @param request DeleteApiKeyRequest message or plain object - * @returns Promise - */ - public deleteApiKey(request: temporal.api.cloud.cloudservice.v1.IDeleteApiKeyRequest): Promise; - - /** - * Gets nexus endpoints - * @param request GetNexusEndpointsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetNexusEndpointsResponse - */ - public getNexusEndpoints(request: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointsRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetNexusEndpointsCallback): void; - - /** - * Gets nexus endpoints - * @param request GetNexusEndpointsRequest message or plain object - * @returns Promise - */ - public getNexusEndpoints(request: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointsRequest): Promise; - - /** - * Get a nexus endpoint - * @param request GetNexusEndpointRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetNexusEndpointResponse - */ - public getNexusEndpoint(request: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetNexusEndpointCallback): void; - - /** - * Get a nexus endpoint - * @param request GetNexusEndpointRequest message or plain object - * @returns Promise - */ - public getNexusEndpoint(request: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointRequest): Promise; - - /** - * Create a nexus endpoint - * @param request CreateNexusEndpointRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CreateNexusEndpointResponse - */ - public createNexusEndpoint(request: temporal.api.cloud.cloudservice.v1.ICreateNexusEndpointRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.CreateNexusEndpointCallback): void; - - /** - * Create a nexus endpoint - * @param request CreateNexusEndpointRequest message or plain object - * @returns Promise - */ - public createNexusEndpoint(request: temporal.api.cloud.cloudservice.v1.ICreateNexusEndpointRequest): Promise; - - /** - * Update a nexus endpoint - * @param request UpdateNexusEndpointRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateNexusEndpointResponse - */ - public updateNexusEndpoint(request: temporal.api.cloud.cloudservice.v1.IUpdateNexusEndpointRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.UpdateNexusEndpointCallback): void; - - /** - * Update a nexus endpoint - * @param request UpdateNexusEndpointRequest message or plain object - * @returns Promise - */ - public updateNexusEndpoint(request: temporal.api.cloud.cloudservice.v1.IUpdateNexusEndpointRequest): Promise; - - /** - * Delete a nexus endpoint - * @param request DeleteNexusEndpointRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteNexusEndpointResponse - */ - public deleteNexusEndpoint(request: temporal.api.cloud.cloudservice.v1.IDeleteNexusEndpointRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.DeleteNexusEndpointCallback): void; - - /** - * Delete a nexus endpoint - * @param request DeleteNexusEndpointRequest message or plain object - * @returns Promise - */ - public deleteNexusEndpoint(request: temporal.api.cloud.cloudservice.v1.IDeleteNexusEndpointRequest): Promise; - - /** - * Get all user groups - * @param request GetUserGroupsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetUserGroupsResponse - */ - public getUserGroups(request: temporal.api.cloud.cloudservice.v1.IGetUserGroupsRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetUserGroupsCallback): void; - - /** - * Get all user groups - * @param request GetUserGroupsRequest message or plain object - * @returns Promise - */ - public getUserGroups(request: temporal.api.cloud.cloudservice.v1.IGetUserGroupsRequest): Promise; - - /** - * Get a user group - * @param request GetUserGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetUserGroupResponse - */ - public getUserGroup(request: temporal.api.cloud.cloudservice.v1.IGetUserGroupRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetUserGroupCallback): void; - - /** - * Get a user group - * @param request GetUserGroupRequest message or plain object - * @returns Promise - */ - public getUserGroup(request: temporal.api.cloud.cloudservice.v1.IGetUserGroupRequest): Promise; - - /** - * Create new a user group - * @param request CreateUserGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CreateUserGroupResponse - */ - public createUserGroup(request: temporal.api.cloud.cloudservice.v1.ICreateUserGroupRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.CreateUserGroupCallback): void; - - /** - * Create new a user group - * @param request CreateUserGroupRequest message or plain object - * @returns Promise - */ - public createUserGroup(request: temporal.api.cloud.cloudservice.v1.ICreateUserGroupRequest): Promise; - - /** - * Update a user group - * @param request UpdateUserGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateUserGroupResponse - */ - public updateUserGroup(request: temporal.api.cloud.cloudservice.v1.IUpdateUserGroupRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.UpdateUserGroupCallback): void; - - /** - * Update a user group - * @param request UpdateUserGroupRequest message or plain object - * @returns Promise - */ - public updateUserGroup(request: temporal.api.cloud.cloudservice.v1.IUpdateUserGroupRequest): Promise; - - /** - * Delete a user group - * @param request DeleteUserGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteUserGroupResponse - */ - public deleteUserGroup(request: temporal.api.cloud.cloudservice.v1.IDeleteUserGroupRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.DeleteUserGroupCallback): void; - - /** - * Delete a user group - * @param request DeleteUserGroupRequest message or plain object - * @returns Promise - */ - public deleteUserGroup(request: temporal.api.cloud.cloudservice.v1.IDeleteUserGroupRequest): Promise; - - /** - * Set a user group's access to a namespace - * @param request SetUserGroupNamespaceAccessRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SetUserGroupNamespaceAccessResponse - */ - public setUserGroupNamespaceAccess(request: temporal.api.cloud.cloudservice.v1.ISetUserGroupNamespaceAccessRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.SetUserGroupNamespaceAccessCallback): void; - - /** - * Set a user group's access to a namespace - * @param request SetUserGroupNamespaceAccessRequest message or plain object - * @returns Promise - */ - public setUserGroupNamespaceAccess(request: temporal.api.cloud.cloudservice.v1.ISetUserGroupNamespaceAccessRequest): Promise; - - /** - * Add a member to the group, can only be used with Cloud group types. - * @param request AddUserGroupMemberRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AddUserGroupMemberResponse - */ - public addUserGroupMember(request: temporal.api.cloud.cloudservice.v1.IAddUserGroupMemberRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.AddUserGroupMemberCallback): void; - - /** - * Add a member to the group, can only be used with Cloud group types. - * @param request AddUserGroupMemberRequest message or plain object - * @returns Promise - */ - public addUserGroupMember(request: temporal.api.cloud.cloudservice.v1.IAddUserGroupMemberRequest): Promise; - - /** - * Remove a member from the group, can only be used with Cloud group types. - * @param request RemoveUserGroupMemberRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RemoveUserGroupMemberResponse - */ - public removeUserGroupMember(request: temporal.api.cloud.cloudservice.v1.IRemoveUserGroupMemberRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.RemoveUserGroupMemberCallback): void; - - /** - * Remove a member from the group, can only be used with Cloud group types. - * @param request RemoveUserGroupMemberRequest message or plain object - * @returns Promise - */ - public removeUserGroupMember(request: temporal.api.cloud.cloudservice.v1.IRemoveUserGroupMemberRequest): Promise; - - /** - * Calls GetUserGroupMembers. - * @param request GetUserGroupMembersRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetUserGroupMembersResponse - */ - public getUserGroupMembers(request: temporal.api.cloud.cloudservice.v1.IGetUserGroupMembersRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetUserGroupMembersCallback): void; - - /** - * Calls GetUserGroupMembers. - * @param request GetUserGroupMembersRequest message or plain object - * @returns Promise - */ - public getUserGroupMembers(request: temporal.api.cloud.cloudservice.v1.IGetUserGroupMembersRequest): Promise; - - /** - * Create a service account. - * @param request CreateServiceAccountRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CreateServiceAccountResponse - */ - public createServiceAccount(request: temporal.api.cloud.cloudservice.v1.ICreateServiceAccountRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.CreateServiceAccountCallback): void; - - /** - * Create a service account. - * @param request CreateServiceAccountRequest message or plain object - * @returns Promise - */ - public createServiceAccount(request: temporal.api.cloud.cloudservice.v1.ICreateServiceAccountRequest): Promise; - - /** - * Get a service account. - * @param request GetServiceAccountRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetServiceAccountResponse - */ - public getServiceAccount(request: temporal.api.cloud.cloudservice.v1.IGetServiceAccountRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetServiceAccountCallback): void; - - /** - * Get a service account. - * @param request GetServiceAccountRequest message or plain object - * @returns Promise - */ - public getServiceAccount(request: temporal.api.cloud.cloudservice.v1.IGetServiceAccountRequest): Promise; - - /** - * Get service accounts. - * @param request GetServiceAccountsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetServiceAccountsResponse - */ - public getServiceAccounts(request: temporal.api.cloud.cloudservice.v1.IGetServiceAccountsRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetServiceAccountsCallback): void; - - /** - * Get service accounts. - * @param request GetServiceAccountsRequest message or plain object - * @returns Promise - */ - public getServiceAccounts(request: temporal.api.cloud.cloudservice.v1.IGetServiceAccountsRequest): Promise; - - /** - * Update a service account. - * @param request UpdateServiceAccountRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateServiceAccountResponse - */ - public updateServiceAccount(request: temporal.api.cloud.cloudservice.v1.IUpdateServiceAccountRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.UpdateServiceAccountCallback): void; - - /** - * Update a service account. - * @param request UpdateServiceAccountRequest message or plain object - * @returns Promise - */ - public updateServiceAccount(request: temporal.api.cloud.cloudservice.v1.IUpdateServiceAccountRequest): Promise; - - /** - * Set a service account's access to a namespace. - * @param request SetServiceAccountNamespaceAccessRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SetServiceAccountNamespaceAccessResponse - */ - public setServiceAccountNamespaceAccess(request: temporal.api.cloud.cloudservice.v1.ISetServiceAccountNamespaceAccessRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.SetServiceAccountNamespaceAccessCallback): void; - - /** - * Set a service account's access to a namespace. - * @param request SetServiceAccountNamespaceAccessRequest message or plain object - * @returns Promise - */ - public setServiceAccountNamespaceAccess(request: temporal.api.cloud.cloudservice.v1.ISetServiceAccountNamespaceAccessRequest): Promise; - - /** - * Delete a service account. - * @param request DeleteServiceAccountRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteServiceAccountResponse - */ - public deleteServiceAccount(request: temporal.api.cloud.cloudservice.v1.IDeleteServiceAccountRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.DeleteServiceAccountCallback): void; - - /** - * Delete a service account. - * @param request DeleteServiceAccountRequest message or plain object - * @returns Promise - */ - public deleteServiceAccount(request: temporal.api.cloud.cloudservice.v1.IDeleteServiceAccountRequest): Promise; - - /** - * WARNING: Pre-Release Feature - * Get usage data across namespaces - * @param request GetUsageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetUsageResponse - */ - public getUsage(request: temporal.api.cloud.cloudservice.v1.IGetUsageRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetUsageCallback): void; - - /** - * WARNING: Pre-Release Feature - * Get usage data across namespaces - * @param request GetUsageRequest message or plain object - * @returns Promise - */ - public getUsage(request: temporal.api.cloud.cloudservice.v1.IGetUsageRequest): Promise; - - /** - * Get account information. - * @param request GetAccountRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetAccountResponse - */ - public getAccount(request: temporal.api.cloud.cloudservice.v1.IGetAccountRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetAccountCallback): void; - - /** - * Get account information. - * @param request GetAccountRequest message or plain object - * @returns Promise - */ - public getAccount(request: temporal.api.cloud.cloudservice.v1.IGetAccountRequest): Promise; - - /** - * Update account information. - * @param request UpdateAccountRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateAccountResponse - */ - public updateAccount(request: temporal.api.cloud.cloudservice.v1.IUpdateAccountRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.UpdateAccountCallback): void; - - /** - * Update account information. - * @param request UpdateAccountRequest message or plain object - * @returns Promise - */ - public updateAccount(request: temporal.api.cloud.cloudservice.v1.IUpdateAccountRequest): Promise; - - /** - * Create an export sink - * @param request CreateNamespaceExportSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CreateNamespaceExportSinkResponse - */ - public createNamespaceExportSink(request: temporal.api.cloud.cloudservice.v1.ICreateNamespaceExportSinkRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.CreateNamespaceExportSinkCallback): void; - - /** - * Create an export sink - * @param request CreateNamespaceExportSinkRequest message or plain object - * @returns Promise - */ - public createNamespaceExportSink(request: temporal.api.cloud.cloudservice.v1.ICreateNamespaceExportSinkRequest): Promise; - - /** - * Get an export sink - * @param request GetNamespaceExportSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetNamespaceExportSinkResponse - */ - public getNamespaceExportSink(request: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinkRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetNamespaceExportSinkCallback): void; - - /** - * Get an export sink - * @param request GetNamespaceExportSinkRequest message or plain object - * @returns Promise - */ - public getNamespaceExportSink(request: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinkRequest): Promise; - - /** - * Get export sinks - * @param request GetNamespaceExportSinksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetNamespaceExportSinksResponse - */ - public getNamespaceExportSinks(request: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinksRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetNamespaceExportSinksCallback): void; - - /** - * Get export sinks - * @param request GetNamespaceExportSinksRequest message or plain object - * @returns Promise - */ - public getNamespaceExportSinks(request: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinksRequest): Promise; - - /** - * Update an export sink - * @param request UpdateNamespaceExportSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateNamespaceExportSinkResponse - */ - public updateNamespaceExportSink(request: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceExportSinkRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.UpdateNamespaceExportSinkCallback): void; - - /** - * Update an export sink - * @param request UpdateNamespaceExportSinkRequest message or plain object - * @returns Promise - */ - public updateNamespaceExportSink(request: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceExportSinkRequest): Promise; - - /** - * Delete an export sink - * @param request DeleteNamespaceExportSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteNamespaceExportSinkResponse - */ - public deleteNamespaceExportSink(request: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceExportSinkRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.DeleteNamespaceExportSinkCallback): void; - - /** - * Delete an export sink - * @param request DeleteNamespaceExportSinkRequest message or plain object - * @returns Promise - */ - public deleteNamespaceExportSink(request: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceExportSinkRequest): Promise; - - /** - * Validates an export sink configuration by delivering an empty test file to the specified sink. - * This operation verifies that the sink is correctly configured, accessible, and ready for data export. - * @param request ValidateNamespaceExportSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ValidateNamespaceExportSinkResponse - */ - public validateNamespaceExportSink(request: temporal.api.cloud.cloudservice.v1.IValidateNamespaceExportSinkRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.ValidateNamespaceExportSinkCallback): void; - - /** - * Validates an export sink configuration by delivering an empty test file to the specified sink. - * This operation verifies that the sink is correctly configured, accessible, and ready for data export. - * @param request ValidateNamespaceExportSinkRequest message or plain object - * @returns Promise - */ - public validateNamespaceExportSink(request: temporal.api.cloud.cloudservice.v1.IValidateNamespaceExportSinkRequest): Promise; - - /** - * Update the tags for a namespace - * @param request UpdateNamespaceTagsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateNamespaceTagsResponse - */ - public updateNamespaceTags(request: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceTagsRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.UpdateNamespaceTagsCallback): void; - - /** - * Update the tags for a namespace - * @param request UpdateNamespaceTagsRequest message or plain object - * @returns Promise - */ - public updateNamespaceTags(request: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceTagsRequest): Promise; - - /** - * Creates a connectivity rule - * @param request CreateConnectivityRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CreateConnectivityRuleResponse - */ - public createConnectivityRule(request: temporal.api.cloud.cloudservice.v1.ICreateConnectivityRuleRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.CreateConnectivityRuleCallback): void; - - /** - * Creates a connectivity rule - * @param request CreateConnectivityRuleRequest message or plain object - * @returns Promise - */ - public createConnectivityRule(request: temporal.api.cloud.cloudservice.v1.ICreateConnectivityRuleRequest): Promise; - - /** - * Gets a connectivity rule by id - * @param request GetConnectivityRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetConnectivityRuleResponse - */ - public getConnectivityRule(request: temporal.api.cloud.cloudservice.v1.IGetConnectivityRuleRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetConnectivityRuleCallback): void; - - /** - * Gets a connectivity rule by id - * @param request GetConnectivityRuleRequest message or plain object - * @returns Promise - */ - public getConnectivityRule(request: temporal.api.cloud.cloudservice.v1.IGetConnectivityRuleRequest): Promise; - - /** - * Lists connectivity rules by account - * @param request GetConnectivityRulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetConnectivityRulesResponse - */ - public getConnectivityRules(request: temporal.api.cloud.cloudservice.v1.IGetConnectivityRulesRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.GetConnectivityRulesCallback): void; - - /** - * Lists connectivity rules by account - * @param request GetConnectivityRulesRequest message or plain object - * @returns Promise - */ - public getConnectivityRules(request: temporal.api.cloud.cloudservice.v1.IGetConnectivityRulesRequest): Promise; - - /** - * Deletes a connectivity rule by id - * @param request DeleteConnectivityRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeleteConnectivityRuleResponse - */ - public deleteConnectivityRule(request: temporal.api.cloud.cloudservice.v1.IDeleteConnectivityRuleRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.DeleteConnectivityRuleCallback): void; - - /** - * Deletes a connectivity rule by id - * @param request DeleteConnectivityRuleRequest message or plain object - * @returns Promise - */ - public deleteConnectivityRule(request: temporal.api.cloud.cloudservice.v1.IDeleteConnectivityRuleRequest): Promise; - - /** - * Validate customer audit log sink is accessible from Temporal's workflow by delivering an empty file to the specified sink. - * The operation verifies that the sink is correctly configured, accessible and ready to receive audit logs. - * @param request ValidateAccountAuditLogSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ValidateAccountAuditLogSinkResponse - */ - public validateAccountAuditLogSink(request: temporal.api.cloud.cloudservice.v1.IValidateAccountAuditLogSinkRequest, callback: temporal.api.cloud.cloudservice.v1.CloudService.ValidateAccountAuditLogSinkCallback): void; - - /** - * Validate customer audit log sink is accessible from Temporal's workflow by delivering an empty file to the specified sink. - * The operation verifies that the sink is correctly configured, accessible and ready to receive audit logs. - * @param request ValidateAccountAuditLogSinkRequest message or plain object - * @returns Promise - */ - public validateAccountAuditLogSink(request: temporal.api.cloud.cloudservice.v1.IValidateAccountAuditLogSinkRequest): Promise; - } - - namespace CloudService { - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getUsers}. - * @param error Error, if any - * @param [response] GetUsersResponse - */ - type GetUsersCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetUsersResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getUser}. - * @param error Error, if any - * @param [response] GetUserResponse - */ - type GetUserCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetUserResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#createUser}. - * @param error Error, if any - * @param [response] CreateUserResponse - */ - type CreateUserCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.CreateUserResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#updateUser}. - * @param error Error, if any - * @param [response] UpdateUserResponse - */ - type UpdateUserCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.UpdateUserResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#deleteUser}. - * @param error Error, if any - * @param [response] DeleteUserResponse - */ - type DeleteUserCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.DeleteUserResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#setUserNamespaceAccess}. - * @param error Error, if any - * @param [response] SetUserNamespaceAccessResponse - */ - type SetUserNamespaceAccessCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getAsyncOperation}. - * @param error Error, if any - * @param [response] GetAsyncOperationResponse - */ - type GetAsyncOperationCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetAsyncOperationResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#createNamespace}. - * @param error Error, if any - * @param [response] CreateNamespaceResponse - */ - type CreateNamespaceCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.CreateNamespaceResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getNamespaces}. - * @param error Error, if any - * @param [response] GetNamespacesResponse - */ - type GetNamespacesCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetNamespacesResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getNamespace}. - * @param error Error, if any - * @param [response] GetNamespaceResponse - */ - type GetNamespaceCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetNamespaceResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#updateNamespace}. - * @param error Error, if any - * @param [response] UpdateNamespaceResponse - */ - type UpdateNamespaceCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.UpdateNamespaceResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#renameCustomSearchAttribute}. - * @param error Error, if any - * @param [response] RenameCustomSearchAttributeResponse - */ - type RenameCustomSearchAttributeCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#deleteNamespace}. - * @param error Error, if any - * @param [response] DeleteNamespaceResponse - */ - type DeleteNamespaceCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.DeleteNamespaceResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#failoverNamespaceRegion}. - * @param error Error, if any - * @param [response] FailoverNamespaceRegionResponse - */ - type FailoverNamespaceRegionCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#addNamespaceRegion}. - * @param error Error, if any - * @param [response] AddNamespaceRegionResponse - */ - type AddNamespaceRegionCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.AddNamespaceRegionResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#deleteNamespaceRegion}. - * @param error Error, if any - * @param [response] DeleteNamespaceRegionResponse - */ - type DeleteNamespaceRegionCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getRegions}. - * @param error Error, if any - * @param [response] GetRegionsResponse - */ - type GetRegionsCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetRegionsResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getRegion}. - * @param error Error, if any - * @param [response] GetRegionResponse - */ - type GetRegionCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetRegionResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getApiKeys}. - * @param error Error, if any - * @param [response] GetApiKeysResponse - */ - type GetApiKeysCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetApiKeysResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getApiKey}. - * @param error Error, if any - * @param [response] GetApiKeyResponse - */ - type GetApiKeyCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetApiKeyResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#createApiKey}. - * @param error Error, if any - * @param [response] CreateApiKeyResponse - */ - type CreateApiKeyCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.CreateApiKeyResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#updateApiKey}. - * @param error Error, if any - * @param [response] UpdateApiKeyResponse - */ - type UpdateApiKeyCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.UpdateApiKeyResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#deleteApiKey}. - * @param error Error, if any - * @param [response] DeleteApiKeyResponse - */ - type DeleteApiKeyCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.DeleteApiKeyResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getNexusEndpoints}. - * @param error Error, if any - * @param [response] GetNexusEndpointsResponse - */ - type GetNexusEndpointsCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetNexusEndpointsResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getNexusEndpoint}. - * @param error Error, if any - * @param [response] GetNexusEndpointResponse - */ - type GetNexusEndpointCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetNexusEndpointResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#createNexusEndpoint}. - * @param error Error, if any - * @param [response] CreateNexusEndpointResponse - */ - type CreateNexusEndpointCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.CreateNexusEndpointResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#updateNexusEndpoint}. - * @param error Error, if any - * @param [response] UpdateNexusEndpointResponse - */ - type UpdateNexusEndpointCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#deleteNexusEndpoint}. - * @param error Error, if any - * @param [response] DeleteNexusEndpointResponse - */ - type DeleteNexusEndpointCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getUserGroups}. - * @param error Error, if any - * @param [response] GetUserGroupsResponse - */ - type GetUserGroupsCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetUserGroupsResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getUserGroup}. - * @param error Error, if any - * @param [response] GetUserGroupResponse - */ - type GetUserGroupCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetUserGroupResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#createUserGroup}. - * @param error Error, if any - * @param [response] CreateUserGroupResponse - */ - type CreateUserGroupCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.CreateUserGroupResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#updateUserGroup}. - * @param error Error, if any - * @param [response] UpdateUserGroupResponse - */ - type UpdateUserGroupCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.UpdateUserGroupResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#deleteUserGroup}. - * @param error Error, if any - * @param [response] DeleteUserGroupResponse - */ - type DeleteUserGroupCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.DeleteUserGroupResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#setUserGroupNamespaceAccess}. - * @param error Error, if any - * @param [response] SetUserGroupNamespaceAccessResponse - */ - type SetUserGroupNamespaceAccessCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#addUserGroupMember}. - * @param error Error, if any - * @param [response] AddUserGroupMemberResponse - */ - type AddUserGroupMemberCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.AddUserGroupMemberResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#removeUserGroupMember}. - * @param error Error, if any - * @param [response] RemoveUserGroupMemberResponse - */ - type RemoveUserGroupMemberCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getUserGroupMembers}. - * @param error Error, if any - * @param [response] GetUserGroupMembersResponse - */ - type GetUserGroupMembersCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetUserGroupMembersResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#createServiceAccount}. - * @param error Error, if any - * @param [response] CreateServiceAccountResponse - */ - type CreateServiceAccountCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.CreateServiceAccountResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getServiceAccount}. - * @param error Error, if any - * @param [response] GetServiceAccountResponse - */ - type GetServiceAccountCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetServiceAccountResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getServiceAccounts}. - * @param error Error, if any - * @param [response] GetServiceAccountsResponse - */ - type GetServiceAccountsCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetServiceAccountsResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#updateServiceAccount}. - * @param error Error, if any - * @param [response] UpdateServiceAccountResponse - */ - type UpdateServiceAccountCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.UpdateServiceAccountResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#setServiceAccountNamespaceAccess}. - * @param error Error, if any - * @param [response] SetServiceAccountNamespaceAccessResponse - */ - type SetServiceAccountNamespaceAccessCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#deleteServiceAccount}. - * @param error Error, if any - * @param [response] DeleteServiceAccountResponse - */ - type DeleteServiceAccountCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.DeleteServiceAccountResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getUsage}. - * @param error Error, if any - * @param [response] GetUsageResponse - */ - type GetUsageCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetUsageResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getAccount}. - * @param error Error, if any - * @param [response] GetAccountResponse - */ - type GetAccountCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetAccountResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#updateAccount}. - * @param error Error, if any - * @param [response] UpdateAccountResponse - */ - type UpdateAccountCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.UpdateAccountResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#createNamespaceExportSink}. - * @param error Error, if any - * @param [response] CreateNamespaceExportSinkResponse - */ - type CreateNamespaceExportSinkCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getNamespaceExportSink}. - * @param error Error, if any - * @param [response] GetNamespaceExportSinkResponse - */ - type GetNamespaceExportSinkCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getNamespaceExportSinks}. - * @param error Error, if any - * @param [response] GetNamespaceExportSinksResponse - */ - type GetNamespaceExportSinksCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#updateNamespaceExportSink}. - * @param error Error, if any - * @param [response] UpdateNamespaceExportSinkResponse - */ - type UpdateNamespaceExportSinkCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#deleteNamespaceExportSink}. - * @param error Error, if any - * @param [response] DeleteNamespaceExportSinkResponse - */ - type DeleteNamespaceExportSinkCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#validateNamespaceExportSink}. - * @param error Error, if any - * @param [response] ValidateNamespaceExportSinkResponse - */ - type ValidateNamespaceExportSinkCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#updateNamespaceTags}. - * @param error Error, if any - * @param [response] UpdateNamespaceTagsResponse - */ - type UpdateNamespaceTagsCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#createConnectivityRule}. - * @param error Error, if any - * @param [response] CreateConnectivityRuleResponse - */ - type CreateConnectivityRuleCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getConnectivityRule}. - * @param error Error, if any - * @param [response] GetConnectivityRuleResponse - */ - type GetConnectivityRuleCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetConnectivityRuleResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#getConnectivityRules}. - * @param error Error, if any - * @param [response] GetConnectivityRulesResponse - */ - type GetConnectivityRulesCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.GetConnectivityRulesResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#deleteConnectivityRule}. - * @param error Error, if any - * @param [response] DeleteConnectivityRuleResponse - */ - type DeleteConnectivityRuleCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleResponse) => void; - - /** - * Callback as used by {@link temporal.api.cloud.cloudservice.v1.CloudService#validateAccountAuditLogSink}. - * @param error Error, if any - * @param [response] ValidateAccountAuditLogSinkResponse - */ - type ValidateAccountAuditLogSinkCallback = (error: (Error|null), response?: temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkResponse) => void; - } - - /** Properties of a GetUsersRequest. */ - interface IGetUsersRequest { - - /** - * The requested size of the page to retrieve - optional. - * Cannot exceed 1000. Defaults to 100. - */ - pageSize?: (number|null); - - /** The page token if this is continuing from another response - optional. */ - pageToken?: (string|null); - - /** Filter users by email address - optional. */ - email?: (string|null); - - /** Filter users by the namespace they have access to - optional. */ - namespace?: (string|null); - } - - /** Represents a GetUsersRequest. */ - class GetUsersRequest implements IGetUsersRequest { - - /** - * Constructs a new GetUsersRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetUsersRequest); - - /** - * The requested size of the page to retrieve - optional. - * Cannot exceed 1000. Defaults to 100. - */ - public pageSize: number; - - /** The page token if this is continuing from another response - optional. */ - public pageToken: string; - - /** Filter users by email address - optional. */ - public email: string; - - /** Filter users by the namespace they have access to - optional. */ - public namespace: string; - - /** - * Creates a new GetUsersRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUsersRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetUsersRequest): temporal.api.cloud.cloudservice.v1.GetUsersRequest; - - /** - * Encodes the specified GetUsersRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUsersRequest.verify|verify} messages. - * @param message GetUsersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetUsersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUsersRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUsersRequest.verify|verify} messages. - * @param message GetUsersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetUsersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUsersRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUsersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetUsersRequest; - - /** - * Decodes a GetUsersRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUsersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetUsersRequest; - - /** - * Creates a GetUsersRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUsersRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetUsersRequest; - - /** - * Creates a plain object from a GetUsersRequest message. Also converts values to other types if specified. - * @param message GetUsersRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetUsersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUsersRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUsersRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUsersResponse. */ - interface IGetUsersResponse { - - /** The list of users in ascending ids order */ - users?: (temporal.api.cloud.identity.v1.IUser[]|null); - - /** The next page's token */ - nextPageToken?: (string|null); - } - - /** Represents a GetUsersResponse. */ - class GetUsersResponse implements IGetUsersResponse { - - /** - * Constructs a new GetUsersResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetUsersResponse); - - /** The list of users in ascending ids order */ - public users: temporal.api.cloud.identity.v1.IUser[]; - - /** The next page's token */ - public nextPageToken: string; - - /** - * Creates a new GetUsersResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUsersResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetUsersResponse): temporal.api.cloud.cloudservice.v1.GetUsersResponse; - - /** - * Encodes the specified GetUsersResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUsersResponse.verify|verify} messages. - * @param message GetUsersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetUsersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUsersResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUsersResponse.verify|verify} messages. - * @param message GetUsersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetUsersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUsersResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUsersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetUsersResponse; - - /** - * Decodes a GetUsersResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUsersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetUsersResponse; - - /** - * Creates a GetUsersResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUsersResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetUsersResponse; - - /** - * Creates a plain object from a GetUsersResponse message. Also converts values to other types if specified. - * @param message GetUsersResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetUsersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUsersResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUsersResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUserRequest. */ - interface IGetUserRequest { - - /** The id of the user to get */ - userId?: (string|null); - } - - /** Represents a GetUserRequest. */ - class GetUserRequest implements IGetUserRequest { - - /** - * Constructs a new GetUserRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetUserRequest); - - /** The id of the user to get */ - public userId: string; - - /** - * Creates a new GetUserRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetUserRequest): temporal.api.cloud.cloudservice.v1.GetUserRequest; - - /** - * Encodes the specified GetUserRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserRequest.verify|verify} messages. - * @param message GetUserRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserRequest.verify|verify} messages. - * @param message GetUserRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetUserRequest; - - /** - * Decodes a GetUserRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetUserRequest; - - /** - * Creates a GetUserRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetUserRequest; - - /** - * Creates a plain object from a GetUserRequest message. Also converts values to other types if specified. - * @param message GetUserRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetUserRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUserResponse. */ - interface IGetUserResponse { - - /** The user */ - user?: (temporal.api.cloud.identity.v1.IUser|null); - } - - /** Represents a GetUserResponse. */ - class GetUserResponse implements IGetUserResponse { - - /** - * Constructs a new GetUserResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetUserResponse); - - /** The user */ - public user?: (temporal.api.cloud.identity.v1.IUser|null); - - /** - * Creates a new GetUserResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetUserResponse): temporal.api.cloud.cloudservice.v1.GetUserResponse; - - /** - * Encodes the specified GetUserResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserResponse.verify|verify} messages. - * @param message GetUserResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserResponse.verify|verify} messages. - * @param message GetUserResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetUserResponse; - - /** - * Decodes a GetUserResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetUserResponse; - - /** - * Creates a GetUserResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetUserResponse; - - /** - * Creates a plain object from a GetUserResponse message. Also converts values to other types if specified. - * @param message GetUserResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetUserResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateUserRequest. */ - interface ICreateUserRequest { - - /** The spec for the user to invite */ - spec?: (temporal.api.cloud.identity.v1.IUserSpec|null); - - /** The id to use for this async operation - optional */ - asyncOperationId?: (string|null); - } - - /** Represents a CreateUserRequest. */ - class CreateUserRequest implements ICreateUserRequest { - - /** - * Constructs a new CreateUserRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateUserRequest); - - /** The spec for the user to invite */ - public spec?: (temporal.api.cloud.identity.v1.IUserSpec|null); - - /** The id to use for this async operation - optional */ - public asyncOperationId: string; - - /** - * Creates a new CreateUserRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateUserRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateUserRequest): temporal.api.cloud.cloudservice.v1.CreateUserRequest; - - /** - * Encodes the specified CreateUserRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateUserRequest.verify|verify} messages. - * @param message CreateUserRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateUserRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateUserRequest.verify|verify} messages. - * @param message CreateUserRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateUserRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateUserRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateUserRequest; - - /** - * Decodes a CreateUserRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateUserRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateUserRequest; - - /** - * Creates a CreateUserRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateUserRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateUserRequest; - - /** - * Creates a plain object from a CreateUserRequest message. Also converts values to other types if specified. - * @param message CreateUserRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateUserRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateUserRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateUserRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateUserResponse. */ - interface ICreateUserResponse { - - /** The id of the user that was invited */ - userId?: (string|null); - - /** The async operation */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a CreateUserResponse. */ - class CreateUserResponse implements ICreateUserResponse { - - /** - * Constructs a new CreateUserResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateUserResponse); - - /** The id of the user that was invited */ - public userId: string; - - /** The async operation */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new CreateUserResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateUserResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateUserResponse): temporal.api.cloud.cloudservice.v1.CreateUserResponse; - - /** - * Encodes the specified CreateUserResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateUserResponse.verify|verify} messages. - * @param message CreateUserResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateUserResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateUserResponse.verify|verify} messages. - * @param message CreateUserResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateUserResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateUserResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateUserResponse; - - /** - * Decodes a CreateUserResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateUserResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateUserResponse; - - /** - * Creates a CreateUserResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateUserResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateUserResponse; - - /** - * Creates a plain object from a CreateUserResponse message. Also converts values to other types if specified. - * @param message CreateUserResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateUserResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateUserResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateUserResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateUserRequest. */ - interface IUpdateUserRequest { - - /** The id of the user to update */ - userId?: (string|null); - - /** The new user specification */ - spec?: (temporal.api.cloud.identity.v1.IUserSpec|null); - - /** - * The version of the user for which this update is intended for - * The latest version can be found in the GetUser operation response - */ - resourceVersion?: (string|null); - - /** The id to use for this async operation - optional */ - asyncOperationId?: (string|null); - } - - /** Represents an UpdateUserRequest. */ - class UpdateUserRequest implements IUpdateUserRequest { - - /** - * Constructs a new UpdateUserRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateUserRequest); - - /** The id of the user to update */ - public userId: string; - - /** The new user specification */ - public spec?: (temporal.api.cloud.identity.v1.IUserSpec|null); - - /** - * The version of the user for which this update is intended for - * The latest version can be found in the GetUser operation response - */ - public resourceVersion: string; - - /** The id to use for this async operation - optional */ - public asyncOperationId: string; - - /** - * Creates a new UpdateUserRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateUserRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateUserRequest): temporal.api.cloud.cloudservice.v1.UpdateUserRequest; - - /** - * Encodes the specified UpdateUserRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateUserRequest.verify|verify} messages. - * @param message UpdateUserRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateUserRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateUserRequest.verify|verify} messages. - * @param message UpdateUserRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateUserRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateUserRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateUserRequest; - - /** - * Decodes an UpdateUserRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateUserRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateUserRequest; - - /** - * Creates an UpdateUserRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateUserRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateUserRequest; - - /** - * Creates a plain object from an UpdateUserRequest message. Also converts values to other types if specified. - * @param message UpdateUserRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateUserRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateUserRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateUserRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateUserResponse. */ - interface IUpdateUserResponse { - - /** The async operation */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents an UpdateUserResponse. */ - class UpdateUserResponse implements IUpdateUserResponse { - - /** - * Constructs a new UpdateUserResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateUserResponse); - - /** The async operation */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new UpdateUserResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateUserResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateUserResponse): temporal.api.cloud.cloudservice.v1.UpdateUserResponse; - - /** - * Encodes the specified UpdateUserResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateUserResponse.verify|verify} messages. - * @param message UpdateUserResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateUserResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateUserResponse.verify|verify} messages. - * @param message UpdateUserResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateUserResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateUserResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateUserResponse; - - /** - * Decodes an UpdateUserResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateUserResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateUserResponse; - - /** - * Creates an UpdateUserResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateUserResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateUserResponse; - - /** - * Creates a plain object from an UpdateUserResponse message. Also converts values to other types if specified. - * @param message UpdateUserResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateUserResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateUserResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateUserResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteUserRequest. */ - interface IDeleteUserRequest { - - /** The id of the user to delete */ - userId?: (string|null); - - /** - * The version of the user for which this delete is intended for - * The latest version can be found in the GetUser operation response - */ - resourceVersion?: (string|null); - - /** The id to use for this async operation - optional */ - asyncOperationId?: (string|null); - } - - /** Represents a DeleteUserRequest. */ - class DeleteUserRequest implements IDeleteUserRequest { - - /** - * Constructs a new DeleteUserRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteUserRequest); - - /** The id of the user to delete */ - public userId: string; - - /** - * The version of the user for which this delete is intended for - * The latest version can be found in the GetUser operation response - */ - public resourceVersion: string; - - /** The id to use for this async operation - optional */ - public asyncOperationId: string; - - /** - * Creates a new DeleteUserRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteUserRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteUserRequest): temporal.api.cloud.cloudservice.v1.DeleteUserRequest; - - /** - * Encodes the specified DeleteUserRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteUserRequest.verify|verify} messages. - * @param message DeleteUserRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteUserRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteUserRequest.verify|verify} messages. - * @param message DeleteUserRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteUserRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteUserRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteUserRequest; - - /** - * Decodes a DeleteUserRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteUserRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteUserRequest; - - /** - * Creates a DeleteUserRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteUserRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteUserRequest; - - /** - * Creates a plain object from a DeleteUserRequest message. Also converts values to other types if specified. - * @param message DeleteUserRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteUserRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteUserRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteUserRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteUserResponse. */ - interface IDeleteUserResponse { - - /** The async operation */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a DeleteUserResponse. */ - class DeleteUserResponse implements IDeleteUserResponse { - - /** - * Constructs a new DeleteUserResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteUserResponse); - - /** The async operation */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new DeleteUserResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteUserResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteUserResponse): temporal.api.cloud.cloudservice.v1.DeleteUserResponse; - - /** - * Encodes the specified DeleteUserResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteUserResponse.verify|verify} messages. - * @param message DeleteUserResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteUserResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteUserResponse.verify|verify} messages. - * @param message DeleteUserResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteUserResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteUserResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteUserResponse; - - /** - * Decodes a DeleteUserResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteUserResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteUserResponse; - - /** - * Creates a DeleteUserResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteUserResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteUserResponse; - - /** - * Creates a plain object from a DeleteUserResponse message. Also converts values to other types if specified. - * @param message DeleteUserResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteUserResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteUserResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteUserResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetUserNamespaceAccessRequest. */ - interface ISetUserNamespaceAccessRequest { - - /** The namespace to set permissions for */ - namespace?: (string|null); - - /** The id of the user to set permissions for */ - userId?: (string|null); - - /** The namespace access to assign the user */ - access?: (temporal.api.cloud.identity.v1.INamespaceAccess|null); - - /** - * The version of the user for which this update is intended for - * The latest version can be found in the GetUser operation response - */ - resourceVersion?: (string|null); - - /** The id to use for this async operation - optional */ - asyncOperationId?: (string|null); - } - - /** Represents a SetUserNamespaceAccessRequest. */ - class SetUserNamespaceAccessRequest implements ISetUserNamespaceAccessRequest { - - /** - * Constructs a new SetUserNamespaceAccessRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ISetUserNamespaceAccessRequest); - - /** The namespace to set permissions for */ - public namespace: string; - - /** The id of the user to set permissions for */ - public userId: string; - - /** The namespace access to assign the user */ - public access?: (temporal.api.cloud.identity.v1.INamespaceAccess|null); - - /** - * The version of the user for which this update is intended for - * The latest version can be found in the GetUser operation response - */ - public resourceVersion: string; - - /** The id to use for this async operation - optional */ - public asyncOperationId: string; - - /** - * Creates a new SetUserNamespaceAccessRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetUserNamespaceAccessRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ISetUserNamespaceAccessRequest): temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessRequest; - - /** - * Encodes the specified SetUserNamespaceAccessRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessRequest.verify|verify} messages. - * @param message SetUserNamespaceAccessRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ISetUserNamespaceAccessRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetUserNamespaceAccessRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessRequest.verify|verify} messages. - * @param message SetUserNamespaceAccessRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ISetUserNamespaceAccessRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetUserNamespaceAccessRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetUserNamespaceAccessRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessRequest; - - /** - * Decodes a SetUserNamespaceAccessRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetUserNamespaceAccessRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessRequest; - - /** - * Creates a SetUserNamespaceAccessRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetUserNamespaceAccessRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessRequest; - - /** - * Creates a plain object from a SetUserNamespaceAccessRequest message. Also converts values to other types if specified. - * @param message SetUserNamespaceAccessRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetUserNamespaceAccessRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetUserNamespaceAccessRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetUserNamespaceAccessResponse. */ - interface ISetUserNamespaceAccessResponse { - - /** The async operation */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a SetUserNamespaceAccessResponse. */ - class SetUserNamespaceAccessResponse implements ISetUserNamespaceAccessResponse { - - /** - * Constructs a new SetUserNamespaceAccessResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ISetUserNamespaceAccessResponse); - - /** The async operation */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new SetUserNamespaceAccessResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SetUserNamespaceAccessResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ISetUserNamespaceAccessResponse): temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessResponse; - - /** - * Encodes the specified SetUserNamespaceAccessResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessResponse.verify|verify} messages. - * @param message SetUserNamespaceAccessResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ISetUserNamespaceAccessResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetUserNamespaceAccessResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessResponse.verify|verify} messages. - * @param message SetUserNamespaceAccessResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ISetUserNamespaceAccessResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetUserNamespaceAccessResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetUserNamespaceAccessResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessResponse; - - /** - * Decodes a SetUserNamespaceAccessResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetUserNamespaceAccessResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessResponse; - - /** - * Creates a SetUserNamespaceAccessResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetUserNamespaceAccessResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessResponse; - - /** - * Creates a plain object from a SetUserNamespaceAccessResponse message. Also converts values to other types if specified. - * @param message SetUserNamespaceAccessResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetUserNamespaceAccessResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetUserNamespaceAccessResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetAsyncOperationRequest. */ - interface IGetAsyncOperationRequest { - - /** The id of the async operation to get */ - asyncOperationId?: (string|null); - } - - /** Represents a GetAsyncOperationRequest. */ - class GetAsyncOperationRequest implements IGetAsyncOperationRequest { - - /** - * Constructs a new GetAsyncOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetAsyncOperationRequest); - - /** The id of the async operation to get */ - public asyncOperationId: string; - - /** - * Creates a new GetAsyncOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetAsyncOperationRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetAsyncOperationRequest): temporal.api.cloud.cloudservice.v1.GetAsyncOperationRequest; - - /** - * Encodes the specified GetAsyncOperationRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetAsyncOperationRequest.verify|verify} messages. - * @param message GetAsyncOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetAsyncOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetAsyncOperationRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetAsyncOperationRequest.verify|verify} messages. - * @param message GetAsyncOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetAsyncOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetAsyncOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetAsyncOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetAsyncOperationRequest; - - /** - * Decodes a GetAsyncOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetAsyncOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetAsyncOperationRequest; - - /** - * Creates a GetAsyncOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetAsyncOperationRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetAsyncOperationRequest; - - /** - * Creates a plain object from a GetAsyncOperationRequest message. Also converts values to other types if specified. - * @param message GetAsyncOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetAsyncOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetAsyncOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetAsyncOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetAsyncOperationResponse. */ - interface IGetAsyncOperationResponse { - - /** The async operation */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a GetAsyncOperationResponse. */ - class GetAsyncOperationResponse implements IGetAsyncOperationResponse { - - /** - * Constructs a new GetAsyncOperationResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetAsyncOperationResponse); - - /** The async operation */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new GetAsyncOperationResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetAsyncOperationResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetAsyncOperationResponse): temporal.api.cloud.cloudservice.v1.GetAsyncOperationResponse; - - /** - * Encodes the specified GetAsyncOperationResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetAsyncOperationResponse.verify|verify} messages. - * @param message GetAsyncOperationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetAsyncOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetAsyncOperationResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetAsyncOperationResponse.verify|verify} messages. - * @param message GetAsyncOperationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetAsyncOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetAsyncOperationResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetAsyncOperationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetAsyncOperationResponse; - - /** - * Decodes a GetAsyncOperationResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetAsyncOperationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetAsyncOperationResponse; - - /** - * Creates a GetAsyncOperationResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetAsyncOperationResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetAsyncOperationResponse; - - /** - * Creates a plain object from a GetAsyncOperationResponse message. Also converts values to other types if specified. - * @param message GetAsyncOperationResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetAsyncOperationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetAsyncOperationResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetAsyncOperationResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateNamespaceRequest. */ - interface ICreateNamespaceRequest { - - /** The namespace specification. */ - spec?: (temporal.api.cloud.namespace.v1.INamespaceSpec|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - asyncOperationId?: (string|null); - - /** - * The tags to add to the namespace. - * Note: This field can be set by global admins or account owners only. - */ - tags?: ({ [k: string]: string }|null); - } - - /** Represents a CreateNamespaceRequest. */ - class CreateNamespaceRequest implements ICreateNamespaceRequest { - - /** - * Constructs a new CreateNamespaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateNamespaceRequest); - - /** The namespace specification. */ - public spec?: (temporal.api.cloud.namespace.v1.INamespaceSpec|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - public asyncOperationId: string; - - /** - * The tags to add to the namespace. - * Note: This field can be set by global admins or account owners only. - */ - public tags: { [k: string]: string }; - - /** - * Creates a new CreateNamespaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateNamespaceRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateNamespaceRequest): temporal.api.cloud.cloudservice.v1.CreateNamespaceRequest; - - /** - * Encodes the specified CreateNamespaceRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateNamespaceRequest.verify|verify} messages. - * @param message CreateNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateNamespaceRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateNamespaceRequest.verify|verify} messages. - * @param message CreateNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateNamespaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateNamespaceRequest; - - /** - * Decodes a CreateNamespaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateNamespaceRequest; - - /** - * Creates a CreateNamespaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateNamespaceRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateNamespaceRequest; - - /** - * Creates a plain object from a CreateNamespaceRequest message. Also converts values to other types if specified. - * @param message CreateNamespaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateNamespaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateNamespaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateNamespaceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateNamespaceResponse. */ - interface ICreateNamespaceResponse { - - /** The namespace that was created. */ - namespace?: (string|null); - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a CreateNamespaceResponse. */ - class CreateNamespaceResponse implements ICreateNamespaceResponse { - - /** - * Constructs a new CreateNamespaceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateNamespaceResponse); - - /** The namespace that was created. */ - public namespace: string; - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new CreateNamespaceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateNamespaceResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateNamespaceResponse): temporal.api.cloud.cloudservice.v1.CreateNamespaceResponse; - - /** - * Encodes the specified CreateNamespaceResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateNamespaceResponse.verify|verify} messages. - * @param message CreateNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateNamespaceResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateNamespaceResponse.verify|verify} messages. - * @param message CreateNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateNamespaceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateNamespaceResponse; - - /** - * Decodes a CreateNamespaceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateNamespaceResponse; - - /** - * Creates a CreateNamespaceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateNamespaceResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateNamespaceResponse; - - /** - * Creates a plain object from a CreateNamespaceResponse message. Also converts values to other types if specified. - * @param message CreateNamespaceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateNamespaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateNamespaceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateNamespaceResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNamespacesRequest. */ - interface IGetNamespacesRequest { - - /** - * The requested size of the page to retrieve. - * Cannot exceed 1000. - * Optional, defaults to 100. - */ - pageSize?: (number|null); - - /** - * The page token if this is continuing from another response. - * Optional, defaults to empty. - */ - pageToken?: (string|null); - - /** - * Filter namespaces by their name. - * Optional, defaults to empty. - */ - name?: (string|null); - } - - /** Represents a GetNamespacesRequest. */ - class GetNamespacesRequest implements IGetNamespacesRequest { - - /** - * Constructs a new GetNamespacesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespacesRequest); - - /** - * The requested size of the page to retrieve. - * Cannot exceed 1000. - * Optional, defaults to 100. - */ - public pageSize: number; - - /** - * The page token if this is continuing from another response. - * Optional, defaults to empty. - */ - public pageToken: string; - - /** - * Filter namespaces by their name. - * Optional, defaults to empty. - */ - public name: string; - - /** - * Creates a new GetNamespacesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNamespacesRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespacesRequest): temporal.api.cloud.cloudservice.v1.GetNamespacesRequest; - - /** - * Encodes the specified GetNamespacesRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespacesRequest.verify|verify} messages. - * @param message GetNamespacesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetNamespacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNamespacesRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespacesRequest.verify|verify} messages. - * @param message GetNamespacesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetNamespacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNamespacesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNamespacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetNamespacesRequest; - - /** - * Decodes a GetNamespacesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNamespacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetNamespacesRequest; - - /** - * Creates a GetNamespacesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNamespacesRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetNamespacesRequest; - - /** - * Creates a plain object from a GetNamespacesRequest message. Also converts values to other types if specified. - * @param message GetNamespacesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetNamespacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNamespacesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNamespacesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNamespacesResponse. */ - interface IGetNamespacesResponse { - - /** The list of namespaces in ascending name order. */ - namespaces?: (temporal.api.cloud.namespace.v1.INamespace[]|null); - - /** The next page's token. */ - nextPageToken?: (string|null); - } - - /** Represents a GetNamespacesResponse. */ - class GetNamespacesResponse implements IGetNamespacesResponse { - - /** - * Constructs a new GetNamespacesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespacesResponse); - - /** The list of namespaces in ascending name order. */ - public namespaces: temporal.api.cloud.namespace.v1.INamespace[]; - - /** The next page's token. */ - public nextPageToken: string; - - /** - * Creates a new GetNamespacesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNamespacesResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespacesResponse): temporal.api.cloud.cloudservice.v1.GetNamespacesResponse; - - /** - * Encodes the specified GetNamespacesResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespacesResponse.verify|verify} messages. - * @param message GetNamespacesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetNamespacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNamespacesResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespacesResponse.verify|verify} messages. - * @param message GetNamespacesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetNamespacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNamespacesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNamespacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetNamespacesResponse; - - /** - * Decodes a GetNamespacesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNamespacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetNamespacesResponse; - - /** - * Creates a GetNamespacesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNamespacesResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetNamespacesResponse; - - /** - * Creates a plain object from a GetNamespacesResponse message. Also converts values to other types if specified. - * @param message GetNamespacesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetNamespacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNamespacesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNamespacesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNamespaceRequest. */ - interface IGetNamespaceRequest { - - /** The namespace to get. */ - namespace?: (string|null); - } - - /** Represents a GetNamespaceRequest. */ - class GetNamespaceRequest implements IGetNamespaceRequest { - - /** - * Constructs a new GetNamespaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespaceRequest); - - /** The namespace to get. */ - public namespace: string; - - /** - * Creates a new GetNamespaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNamespaceRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespaceRequest): temporal.api.cloud.cloudservice.v1.GetNamespaceRequest; - - /** - * Encodes the specified GetNamespaceRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespaceRequest.verify|verify} messages. - * @param message GetNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNamespaceRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespaceRequest.verify|verify} messages. - * @param message GetNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNamespaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetNamespaceRequest; - - /** - * Decodes a GetNamespaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetNamespaceRequest; - - /** - * Creates a GetNamespaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNamespaceRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetNamespaceRequest; - - /** - * Creates a plain object from a GetNamespaceRequest message. Also converts values to other types if specified. - * @param message GetNamespaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetNamespaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNamespaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNamespaceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNamespaceResponse. */ - interface IGetNamespaceResponse { - - /** The namespace. */ - namespace?: (temporal.api.cloud.namespace.v1.INamespace|null); - } - - /** Represents a GetNamespaceResponse. */ - class GetNamespaceResponse implements IGetNamespaceResponse { - - /** - * Constructs a new GetNamespaceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespaceResponse); - - /** The namespace. */ - public namespace?: (temporal.api.cloud.namespace.v1.INamespace|null); - - /** - * Creates a new GetNamespaceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNamespaceResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespaceResponse): temporal.api.cloud.cloudservice.v1.GetNamespaceResponse; - - /** - * Encodes the specified GetNamespaceResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespaceResponse.verify|verify} messages. - * @param message GetNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNamespaceResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespaceResponse.verify|verify} messages. - * @param message GetNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNamespaceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetNamespaceResponse; - - /** - * Decodes a GetNamespaceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetNamespaceResponse; - - /** - * Creates a GetNamespaceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNamespaceResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetNamespaceResponse; - - /** - * Creates a plain object from a GetNamespaceResponse message. Also converts values to other types if specified. - * @param message GetNamespaceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetNamespaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNamespaceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNamespaceResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNamespaceRequest. */ - interface IUpdateNamespaceRequest { - - /** The namespace to update. */ - namespace?: (string|null); - - /** The new namespace specification. */ - spec?: (temporal.api.cloud.namespace.v1.INamespaceSpec|null); - - /** - * The version of the namespace for which this update is intended for. - * The latest version can be found in the namespace status. - */ - resourceVersion?: (string|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - asyncOperationId?: (string|null); - } - - /** Represents an UpdateNamespaceRequest. */ - class UpdateNamespaceRequest implements IUpdateNamespaceRequest { - - /** - * Constructs a new UpdateNamespaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceRequest); - - /** The namespace to update. */ - public namespace: string; - - /** The new namespace specification. */ - public spec?: (temporal.api.cloud.namespace.v1.INamespaceSpec|null); - - /** - * The version of the namespace for which this update is intended for. - * The latest version can be found in the namespace status. - */ - public resourceVersion: string; - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - public asyncOperationId: string; - - /** - * Creates a new UpdateNamespaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNamespaceRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceRequest): temporal.api.cloud.cloudservice.v1.UpdateNamespaceRequest; - - /** - * Encodes the specified UpdateNamespaceRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNamespaceRequest.verify|verify} messages. - * @param message UpdateNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNamespaceRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNamespaceRequest.verify|verify} messages. - * @param message UpdateNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNamespaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateNamespaceRequest; - - /** - * Decodes an UpdateNamespaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateNamespaceRequest; - - /** - * Creates an UpdateNamespaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNamespaceRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateNamespaceRequest; - - /** - * Creates a plain object from an UpdateNamespaceRequest message. Also converts values to other types if specified. - * @param message UpdateNamespaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateNamespaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNamespaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNamespaceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNamespaceResponse. */ - interface IUpdateNamespaceResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents an UpdateNamespaceResponse. */ - class UpdateNamespaceResponse implements IUpdateNamespaceResponse { - - /** - * Constructs a new UpdateNamespaceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new UpdateNamespaceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNamespaceResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceResponse): temporal.api.cloud.cloudservice.v1.UpdateNamespaceResponse; - - /** - * Encodes the specified UpdateNamespaceResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNamespaceResponse.verify|verify} messages. - * @param message UpdateNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNamespaceResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNamespaceResponse.verify|verify} messages. - * @param message UpdateNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNamespaceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateNamespaceResponse; - - /** - * Decodes an UpdateNamespaceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateNamespaceResponse; - - /** - * Creates an UpdateNamespaceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNamespaceResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateNamespaceResponse; - - /** - * Creates a plain object from an UpdateNamespaceResponse message. Also converts values to other types if specified. - * @param message UpdateNamespaceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateNamespaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNamespaceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNamespaceResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RenameCustomSearchAttributeRequest. */ - interface IRenameCustomSearchAttributeRequest { - - /** The namespace to rename the custom search attribute for. */ - namespace?: (string|null); - - /** The existing name of the custom search attribute to be renamed. */ - existingCustomSearchAttributeName?: (string|null); - - /** The new name of the custom search attribute. */ - newCustomSearchAttributeName?: (string|null); - - /** - * The version of the namespace for which this update is intended for. - * The latest version can be found in the namespace status. - */ - resourceVersion?: (string|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - asyncOperationId?: (string|null); - } - - /** Represents a RenameCustomSearchAttributeRequest. */ - class RenameCustomSearchAttributeRequest implements IRenameCustomSearchAttributeRequest { - - /** - * Constructs a new RenameCustomSearchAttributeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IRenameCustomSearchAttributeRequest); - - /** The namespace to rename the custom search attribute for. */ - public namespace: string; - - /** The existing name of the custom search attribute to be renamed. */ - public existingCustomSearchAttributeName: string; - - /** The new name of the custom search attribute. */ - public newCustomSearchAttributeName: string; - - /** - * The version of the namespace for which this update is intended for. - * The latest version can be found in the namespace status. - */ - public resourceVersion: string; - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - public asyncOperationId: string; - - /** - * Creates a new RenameCustomSearchAttributeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RenameCustomSearchAttributeRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IRenameCustomSearchAttributeRequest): temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeRequest; - - /** - * Encodes the specified RenameCustomSearchAttributeRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeRequest.verify|verify} messages. - * @param message RenameCustomSearchAttributeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IRenameCustomSearchAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RenameCustomSearchAttributeRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeRequest.verify|verify} messages. - * @param message RenameCustomSearchAttributeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IRenameCustomSearchAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RenameCustomSearchAttributeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RenameCustomSearchAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeRequest; - - /** - * Decodes a RenameCustomSearchAttributeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RenameCustomSearchAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeRequest; - - /** - * Creates a RenameCustomSearchAttributeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RenameCustomSearchAttributeRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeRequest; - - /** - * Creates a plain object from a RenameCustomSearchAttributeRequest message. Also converts values to other types if specified. - * @param message RenameCustomSearchAttributeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RenameCustomSearchAttributeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RenameCustomSearchAttributeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RenameCustomSearchAttributeResponse. */ - interface IRenameCustomSearchAttributeResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a RenameCustomSearchAttributeResponse. */ - class RenameCustomSearchAttributeResponse implements IRenameCustomSearchAttributeResponse { - - /** - * Constructs a new RenameCustomSearchAttributeResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IRenameCustomSearchAttributeResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new RenameCustomSearchAttributeResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RenameCustomSearchAttributeResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IRenameCustomSearchAttributeResponse): temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeResponse; - - /** - * Encodes the specified RenameCustomSearchAttributeResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeResponse.verify|verify} messages. - * @param message RenameCustomSearchAttributeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IRenameCustomSearchAttributeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RenameCustomSearchAttributeResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeResponse.verify|verify} messages. - * @param message RenameCustomSearchAttributeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IRenameCustomSearchAttributeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RenameCustomSearchAttributeResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RenameCustomSearchAttributeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeResponse; - - /** - * Decodes a RenameCustomSearchAttributeResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RenameCustomSearchAttributeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeResponse; - - /** - * Creates a RenameCustomSearchAttributeResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RenameCustomSearchAttributeResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeResponse; - - /** - * Creates a plain object from a RenameCustomSearchAttributeResponse message. Also converts values to other types if specified. - * @param message RenameCustomSearchAttributeResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RenameCustomSearchAttributeResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RenameCustomSearchAttributeResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteNamespaceRequest. */ - interface IDeleteNamespaceRequest { - - /** The namespace to delete. */ - namespace?: (string|null); - - /** - * The version of the namespace for which this delete is intended for. - * The latest version can be found in the namespace status. - */ - resourceVersion?: (string|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - asyncOperationId?: (string|null); - } - - /** Represents a DeleteNamespaceRequest. */ - class DeleteNamespaceRequest implements IDeleteNamespaceRequest { - - /** - * Constructs a new DeleteNamespaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRequest); - - /** The namespace to delete. */ - public namespace: string; - - /** - * The version of the namespace for which this delete is intended for. - * The latest version can be found in the namespace status. - */ - public resourceVersion: string; - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - public asyncOperationId: string; - - /** - * Creates a new DeleteNamespaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteNamespaceRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRequest): temporal.api.cloud.cloudservice.v1.DeleteNamespaceRequest; - - /** - * Encodes the specified DeleteNamespaceRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNamespaceRequest.verify|verify} messages. - * @param message DeleteNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteNamespaceRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNamespaceRequest.verify|verify} messages. - * @param message DeleteNamespaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteNamespaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteNamespaceRequest; - - /** - * Decodes a DeleteNamespaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteNamespaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteNamespaceRequest; - - /** - * Creates a DeleteNamespaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteNamespaceRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteNamespaceRequest; - - /** - * Creates a plain object from a DeleteNamespaceRequest message. Also converts values to other types if specified. - * @param message DeleteNamespaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteNamespaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteNamespaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteNamespaceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteNamespaceResponse. */ - interface IDeleteNamespaceResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a DeleteNamespaceResponse. */ - class DeleteNamespaceResponse implements IDeleteNamespaceResponse { - - /** - * Constructs a new DeleteNamespaceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new DeleteNamespaceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteNamespaceResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceResponse): temporal.api.cloud.cloudservice.v1.DeleteNamespaceResponse; - - /** - * Encodes the specified DeleteNamespaceResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNamespaceResponse.verify|verify} messages. - * @param message DeleteNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteNamespaceResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNamespaceResponse.verify|verify} messages. - * @param message DeleteNamespaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteNamespaceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteNamespaceResponse; - - /** - * Decodes a DeleteNamespaceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteNamespaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteNamespaceResponse; - - /** - * Creates a DeleteNamespaceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteNamespaceResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteNamespaceResponse; - - /** - * Creates a plain object from a DeleteNamespaceResponse message. Also converts values to other types if specified. - * @param message DeleteNamespaceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteNamespaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteNamespaceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteNamespaceResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FailoverNamespaceRegionRequest. */ - interface IFailoverNamespaceRegionRequest { - - /** The namespace to failover. */ - namespace?: (string|null); - - /** - * The id of the region to failover to. - * Must be a region that the namespace is currently available in. - */ - region?: (string|null); - - /** The id to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents a FailoverNamespaceRegionRequest. */ - class FailoverNamespaceRegionRequest implements IFailoverNamespaceRegionRequest { - - /** - * Constructs a new FailoverNamespaceRegionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IFailoverNamespaceRegionRequest); - - /** The namespace to failover. */ - public namespace: string; - - /** - * The id of the region to failover to. - * Must be a region that the namespace is currently available in. - */ - public region: string; - - /** The id to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new FailoverNamespaceRegionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FailoverNamespaceRegionRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IFailoverNamespaceRegionRequest): temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionRequest; - - /** - * Encodes the specified FailoverNamespaceRegionRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionRequest.verify|verify} messages. - * @param message FailoverNamespaceRegionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IFailoverNamespaceRegionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FailoverNamespaceRegionRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionRequest.verify|verify} messages. - * @param message FailoverNamespaceRegionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IFailoverNamespaceRegionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FailoverNamespaceRegionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FailoverNamespaceRegionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionRequest; - - /** - * Decodes a FailoverNamespaceRegionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FailoverNamespaceRegionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionRequest; - - /** - * Creates a FailoverNamespaceRegionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FailoverNamespaceRegionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionRequest; - - /** - * Creates a plain object from a FailoverNamespaceRegionRequest message. Also converts values to other types if specified. - * @param message FailoverNamespaceRegionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FailoverNamespaceRegionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FailoverNamespaceRegionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FailoverNamespaceRegionResponse. */ - interface IFailoverNamespaceRegionResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a FailoverNamespaceRegionResponse. */ - class FailoverNamespaceRegionResponse implements IFailoverNamespaceRegionResponse { - - /** - * Constructs a new FailoverNamespaceRegionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IFailoverNamespaceRegionResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new FailoverNamespaceRegionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FailoverNamespaceRegionResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IFailoverNamespaceRegionResponse): temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionResponse; - - /** - * Encodes the specified FailoverNamespaceRegionResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionResponse.verify|verify} messages. - * @param message FailoverNamespaceRegionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IFailoverNamespaceRegionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FailoverNamespaceRegionResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionResponse.verify|verify} messages. - * @param message FailoverNamespaceRegionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IFailoverNamespaceRegionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FailoverNamespaceRegionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FailoverNamespaceRegionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionResponse; - - /** - * Decodes a FailoverNamespaceRegionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FailoverNamespaceRegionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionResponse; - - /** - * Creates a FailoverNamespaceRegionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FailoverNamespaceRegionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionResponse; - - /** - * Creates a plain object from a FailoverNamespaceRegionResponse message. Also converts values to other types if specified. - * @param message FailoverNamespaceRegionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FailoverNamespaceRegionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FailoverNamespaceRegionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddNamespaceRegionRequest. */ - interface IAddNamespaceRegionRequest { - - /** The namespace to add the region to. */ - namespace?: (string|null); - - /** - * The id of the standby region to add to the namespace. - * The GetRegions API can be used to get the list of valid region ids. - * Example: "aws-us-west-2". - */ - region?: (string|null); - - /** - * The version of the namespace for which this add region operation is intended for. - * The latest version can be found in the GetNamespace operation response. - */ - resourceVersion?: (string|null); - - /** The id to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents an AddNamespaceRegionRequest. */ - class AddNamespaceRegionRequest implements IAddNamespaceRegionRequest { - - /** - * Constructs a new AddNamespaceRegionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IAddNamespaceRegionRequest); - - /** The namespace to add the region to. */ - public namespace: string; - - /** - * The id of the standby region to add to the namespace. - * The GetRegions API can be used to get the list of valid region ids. - * Example: "aws-us-west-2". - */ - public region: string; - - /** - * The version of the namespace for which this add region operation is intended for. - * The latest version can be found in the GetNamespace operation response. - */ - public resourceVersion: string; - - /** The id to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new AddNamespaceRegionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns AddNamespaceRegionRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IAddNamespaceRegionRequest): temporal.api.cloud.cloudservice.v1.AddNamespaceRegionRequest; - - /** - * Encodes the specified AddNamespaceRegionRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.AddNamespaceRegionRequest.verify|verify} messages. - * @param message AddNamespaceRegionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IAddNamespaceRegionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddNamespaceRegionRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.AddNamespaceRegionRequest.verify|verify} messages. - * @param message AddNamespaceRegionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IAddNamespaceRegionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddNamespaceRegionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddNamespaceRegionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.AddNamespaceRegionRequest; - - /** - * Decodes an AddNamespaceRegionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddNamespaceRegionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.AddNamespaceRegionRequest; - - /** - * Creates an AddNamespaceRegionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddNamespaceRegionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.AddNamespaceRegionRequest; - - /** - * Creates a plain object from an AddNamespaceRegionRequest message. Also converts values to other types if specified. - * @param message AddNamespaceRegionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.AddNamespaceRegionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddNamespaceRegionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddNamespaceRegionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddNamespaceRegionResponse. */ - interface IAddNamespaceRegionResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents an AddNamespaceRegionResponse. */ - class AddNamespaceRegionResponse implements IAddNamespaceRegionResponse { - - /** - * Constructs a new AddNamespaceRegionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IAddNamespaceRegionResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new AddNamespaceRegionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns AddNamespaceRegionResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IAddNamespaceRegionResponse): temporal.api.cloud.cloudservice.v1.AddNamespaceRegionResponse; - - /** - * Encodes the specified AddNamespaceRegionResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.AddNamespaceRegionResponse.verify|verify} messages. - * @param message AddNamespaceRegionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IAddNamespaceRegionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddNamespaceRegionResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.AddNamespaceRegionResponse.verify|verify} messages. - * @param message AddNamespaceRegionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IAddNamespaceRegionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddNamespaceRegionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddNamespaceRegionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.AddNamespaceRegionResponse; - - /** - * Decodes an AddNamespaceRegionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddNamespaceRegionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.AddNamespaceRegionResponse; - - /** - * Creates an AddNamespaceRegionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddNamespaceRegionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.AddNamespaceRegionResponse; - - /** - * Creates a plain object from an AddNamespaceRegionResponse message. Also converts values to other types if specified. - * @param message AddNamespaceRegionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.AddNamespaceRegionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddNamespaceRegionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddNamespaceRegionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteNamespaceRegionRequest. */ - interface IDeleteNamespaceRegionRequest { - - /** The namespace to delete a region. */ - namespace?: (string|null); - - /** - * The id of the standby region to be deleted. - * The GetRegions API can be used to get the list of valid region ids. - * Example: "aws-us-west-2". - */ - region?: (string|null); - - /** - * The version of the namespace for which this delete region operation is intended for. - * The latest version can be found in the GetNamespace operation response. - */ - resourceVersion?: (string|null); - - /** The id to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents a DeleteNamespaceRegionRequest. */ - class DeleteNamespaceRegionRequest implements IDeleteNamespaceRegionRequest { - - /** - * Constructs a new DeleteNamespaceRegionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRegionRequest); - - /** The namespace to delete a region. */ - public namespace: string; - - /** - * The id of the standby region to be deleted. - * The GetRegions API can be used to get the list of valid region ids. - * Example: "aws-us-west-2". - */ - public region: string; - - /** - * The version of the namespace for which this delete region operation is intended for. - * The latest version can be found in the GetNamespace operation response. - */ - public resourceVersion: string; - - /** The id to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new DeleteNamespaceRegionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteNamespaceRegionRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRegionRequest): temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionRequest; - - /** - * Encodes the specified DeleteNamespaceRegionRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionRequest.verify|verify} messages. - * @param message DeleteNamespaceRegionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRegionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteNamespaceRegionRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionRequest.verify|verify} messages. - * @param message DeleteNamespaceRegionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRegionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteNamespaceRegionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteNamespaceRegionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionRequest; - - /** - * Decodes a DeleteNamespaceRegionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteNamespaceRegionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionRequest; - - /** - * Creates a DeleteNamespaceRegionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteNamespaceRegionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionRequest; - - /** - * Creates a plain object from a DeleteNamespaceRegionRequest message. Also converts values to other types if specified. - * @param message DeleteNamespaceRegionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteNamespaceRegionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteNamespaceRegionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteNamespaceRegionResponse. */ - interface IDeleteNamespaceRegionResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a DeleteNamespaceRegionResponse. */ - class DeleteNamespaceRegionResponse implements IDeleteNamespaceRegionResponse { - - /** - * Constructs a new DeleteNamespaceRegionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRegionResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new DeleteNamespaceRegionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteNamespaceRegionResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRegionResponse): temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionResponse; - - /** - * Encodes the specified DeleteNamespaceRegionResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionResponse.verify|verify} messages. - * @param message DeleteNamespaceRegionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRegionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteNamespaceRegionResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionResponse.verify|verify} messages. - * @param message DeleteNamespaceRegionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceRegionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteNamespaceRegionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteNamespaceRegionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionResponse; - - /** - * Decodes a DeleteNamespaceRegionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteNamespaceRegionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionResponse; - - /** - * Creates a DeleteNamespaceRegionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteNamespaceRegionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionResponse; - - /** - * Creates a plain object from a DeleteNamespaceRegionResponse message. Also converts values to other types if specified. - * @param message DeleteNamespaceRegionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteNamespaceRegionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteNamespaceRegionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetRegionsRequest. */ - interface IGetRegionsRequest { - } - - /** Represents a GetRegionsRequest. */ - class GetRegionsRequest implements IGetRegionsRequest { - - /** - * Constructs a new GetRegionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetRegionsRequest); - - /** - * Creates a new GetRegionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetRegionsRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetRegionsRequest): temporal.api.cloud.cloudservice.v1.GetRegionsRequest; - - /** - * Encodes the specified GetRegionsRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetRegionsRequest.verify|verify} messages. - * @param message GetRegionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetRegionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetRegionsRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetRegionsRequest.verify|verify} messages. - * @param message GetRegionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetRegionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetRegionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetRegionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetRegionsRequest; - - /** - * Decodes a GetRegionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetRegionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetRegionsRequest; - - /** - * Creates a GetRegionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetRegionsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetRegionsRequest; - - /** - * Creates a plain object from a GetRegionsRequest message. Also converts values to other types if specified. - * @param message GetRegionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetRegionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetRegionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetRegionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetRegionsResponse. */ - interface IGetRegionsResponse { - - /** The temporal cloud regions. */ - regions?: (temporal.api.cloud.region.v1.IRegion[]|null); - } - - /** Represents a GetRegionsResponse. */ - class GetRegionsResponse implements IGetRegionsResponse { - - /** - * Constructs a new GetRegionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetRegionsResponse); - - /** The temporal cloud regions. */ - public regions: temporal.api.cloud.region.v1.IRegion[]; - - /** - * Creates a new GetRegionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetRegionsResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetRegionsResponse): temporal.api.cloud.cloudservice.v1.GetRegionsResponse; - - /** - * Encodes the specified GetRegionsResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetRegionsResponse.verify|verify} messages. - * @param message GetRegionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetRegionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetRegionsResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetRegionsResponse.verify|verify} messages. - * @param message GetRegionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetRegionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetRegionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetRegionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetRegionsResponse; - - /** - * Decodes a GetRegionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetRegionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetRegionsResponse; - - /** - * Creates a GetRegionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetRegionsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetRegionsResponse; - - /** - * Creates a plain object from a GetRegionsResponse message. Also converts values to other types if specified. - * @param message GetRegionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetRegionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetRegionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetRegionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetRegionRequest. */ - interface IGetRegionRequest { - - /** The id of the region to get. */ - region?: (string|null); - } - - /** Represents a GetRegionRequest. */ - class GetRegionRequest implements IGetRegionRequest { - - /** - * Constructs a new GetRegionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetRegionRequest); - - /** The id of the region to get. */ - public region: string; - - /** - * Creates a new GetRegionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetRegionRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetRegionRequest): temporal.api.cloud.cloudservice.v1.GetRegionRequest; - - /** - * Encodes the specified GetRegionRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetRegionRequest.verify|verify} messages. - * @param message GetRegionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetRegionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetRegionRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetRegionRequest.verify|verify} messages. - * @param message GetRegionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetRegionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetRegionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetRegionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetRegionRequest; - - /** - * Decodes a GetRegionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetRegionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetRegionRequest; - - /** - * Creates a GetRegionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetRegionRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetRegionRequest; - - /** - * Creates a plain object from a GetRegionRequest message. Also converts values to other types if specified. - * @param message GetRegionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetRegionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetRegionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetRegionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetRegionResponse. */ - interface IGetRegionResponse { - - /** The temporal cloud region. */ - region?: (temporal.api.cloud.region.v1.IRegion|null); - } - - /** Represents a GetRegionResponse. */ - class GetRegionResponse implements IGetRegionResponse { - - /** - * Constructs a new GetRegionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetRegionResponse); - - /** The temporal cloud region. */ - public region?: (temporal.api.cloud.region.v1.IRegion|null); - - /** - * Creates a new GetRegionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetRegionResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetRegionResponse): temporal.api.cloud.cloudservice.v1.GetRegionResponse; - - /** - * Encodes the specified GetRegionResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetRegionResponse.verify|verify} messages. - * @param message GetRegionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetRegionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetRegionResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetRegionResponse.verify|verify} messages. - * @param message GetRegionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetRegionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetRegionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetRegionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetRegionResponse; - - /** - * Decodes a GetRegionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetRegionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetRegionResponse; - - /** - * Creates a GetRegionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetRegionResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetRegionResponse; - - /** - * Creates a plain object from a GetRegionResponse message. Also converts values to other types if specified. - * @param message GetRegionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetRegionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetRegionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetRegionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetApiKeysRequest. */ - interface IGetApiKeysRequest { - - /** - * The requested size of the page to retrieve - optional. - * Cannot exceed 1000. Defaults to 100. - */ - pageSize?: (number|null); - - /** The page token if this is continuing from another response - optional. */ - pageToken?: (string|null); - - /** Filter api keys by owner id - optional. */ - ownerId?: (string|null); - - /** - * Filter api keys by owner type - optional. - * Possible values: user, service-account - */ - ownerTypeDeprecated?: (string|null); - - /** - * Filter api keys by owner type - optional. - * temporal:enums:replaces=owner_type_deprecated - */ - ownerType?: (temporal.api.cloud.identity.v1.OwnerType|null); - } - - /** Represents a GetApiKeysRequest. */ - class GetApiKeysRequest implements IGetApiKeysRequest { - - /** - * Constructs a new GetApiKeysRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetApiKeysRequest); - - /** - * The requested size of the page to retrieve - optional. - * Cannot exceed 1000. Defaults to 100. - */ - public pageSize: number; - - /** The page token if this is continuing from another response - optional. */ - public pageToken: string; - - /** Filter api keys by owner id - optional. */ - public ownerId: string; - - /** - * Filter api keys by owner type - optional. - * Possible values: user, service-account - */ - public ownerTypeDeprecated: string; - - /** - * Filter api keys by owner type - optional. - * temporal:enums:replaces=owner_type_deprecated - */ - public ownerType: temporal.api.cloud.identity.v1.OwnerType; - - /** - * Creates a new GetApiKeysRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetApiKeysRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetApiKeysRequest): temporal.api.cloud.cloudservice.v1.GetApiKeysRequest; - - /** - * Encodes the specified GetApiKeysRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetApiKeysRequest.verify|verify} messages. - * @param message GetApiKeysRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetApiKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetApiKeysRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetApiKeysRequest.verify|verify} messages. - * @param message GetApiKeysRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetApiKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetApiKeysRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetApiKeysRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetApiKeysRequest; - - /** - * Decodes a GetApiKeysRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetApiKeysRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetApiKeysRequest; - - /** - * Creates a GetApiKeysRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetApiKeysRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetApiKeysRequest; - - /** - * Creates a plain object from a GetApiKeysRequest message. Also converts values to other types if specified. - * @param message GetApiKeysRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetApiKeysRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetApiKeysRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetApiKeysRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetApiKeysResponse. */ - interface IGetApiKeysResponse { - - /** The list of api keys in ascending id order. */ - apiKeys?: (temporal.api.cloud.identity.v1.IApiKey[]|null); - - /** The next page's token. */ - nextPageToken?: (string|null); - } - - /** Represents a GetApiKeysResponse. */ - class GetApiKeysResponse implements IGetApiKeysResponse { - - /** - * Constructs a new GetApiKeysResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetApiKeysResponse); - - /** The list of api keys in ascending id order. */ - public apiKeys: temporal.api.cloud.identity.v1.IApiKey[]; - - /** The next page's token. */ - public nextPageToken: string; - - /** - * Creates a new GetApiKeysResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetApiKeysResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetApiKeysResponse): temporal.api.cloud.cloudservice.v1.GetApiKeysResponse; - - /** - * Encodes the specified GetApiKeysResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetApiKeysResponse.verify|verify} messages. - * @param message GetApiKeysResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetApiKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetApiKeysResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetApiKeysResponse.verify|verify} messages. - * @param message GetApiKeysResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetApiKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetApiKeysResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetApiKeysResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetApiKeysResponse; - - /** - * Decodes a GetApiKeysResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetApiKeysResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetApiKeysResponse; - - /** - * Creates a GetApiKeysResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetApiKeysResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetApiKeysResponse; - - /** - * Creates a plain object from a GetApiKeysResponse message. Also converts values to other types if specified. - * @param message GetApiKeysResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetApiKeysResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetApiKeysResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetApiKeysResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetApiKeyRequest. */ - interface IGetApiKeyRequest { - - /** The id of the api key to get. */ - keyId?: (string|null); - } - - /** Represents a GetApiKeyRequest. */ - class GetApiKeyRequest implements IGetApiKeyRequest { - - /** - * Constructs a new GetApiKeyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetApiKeyRequest); - - /** The id of the api key to get. */ - public keyId: string; - - /** - * Creates a new GetApiKeyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetApiKeyRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetApiKeyRequest): temporal.api.cloud.cloudservice.v1.GetApiKeyRequest; - - /** - * Encodes the specified GetApiKeyRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetApiKeyRequest.verify|verify} messages. - * @param message GetApiKeyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetApiKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetApiKeyRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetApiKeyRequest.verify|verify} messages. - * @param message GetApiKeyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetApiKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetApiKeyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetApiKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetApiKeyRequest; - - /** - * Decodes a GetApiKeyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetApiKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetApiKeyRequest; - - /** - * Creates a GetApiKeyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetApiKeyRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetApiKeyRequest; - - /** - * Creates a plain object from a GetApiKeyRequest message. Also converts values to other types if specified. - * @param message GetApiKeyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetApiKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetApiKeyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetApiKeyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetApiKeyResponse. */ - interface IGetApiKeyResponse { - - /** The api key. */ - apiKey?: (temporal.api.cloud.identity.v1.IApiKey|null); - } - - /** Represents a GetApiKeyResponse. */ - class GetApiKeyResponse implements IGetApiKeyResponse { - - /** - * Constructs a new GetApiKeyResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetApiKeyResponse); - - /** The api key. */ - public apiKey?: (temporal.api.cloud.identity.v1.IApiKey|null); - - /** - * Creates a new GetApiKeyResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetApiKeyResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetApiKeyResponse): temporal.api.cloud.cloudservice.v1.GetApiKeyResponse; - - /** - * Encodes the specified GetApiKeyResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetApiKeyResponse.verify|verify} messages. - * @param message GetApiKeyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetApiKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetApiKeyResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetApiKeyResponse.verify|verify} messages. - * @param message GetApiKeyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetApiKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetApiKeyResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetApiKeyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetApiKeyResponse; - - /** - * Decodes a GetApiKeyResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetApiKeyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetApiKeyResponse; - - /** - * Creates a GetApiKeyResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetApiKeyResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetApiKeyResponse; - - /** - * Creates a plain object from a GetApiKeyResponse message. Also converts values to other types if specified. - * @param message GetApiKeyResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetApiKeyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetApiKeyResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetApiKeyResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateApiKeyRequest. */ - interface ICreateApiKeyRequest { - - /** - * The spec for the api key to create. - * Create api key only supports service-account owner type for now. - */ - spec?: (temporal.api.cloud.identity.v1.IApiKeySpec|null); - - /** The id to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents a CreateApiKeyRequest. */ - class CreateApiKeyRequest implements ICreateApiKeyRequest { - - /** - * Constructs a new CreateApiKeyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateApiKeyRequest); - - /** - * The spec for the api key to create. - * Create api key only supports service-account owner type for now. - */ - public spec?: (temporal.api.cloud.identity.v1.IApiKeySpec|null); - - /** The id to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new CreateApiKeyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateApiKeyRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateApiKeyRequest): temporal.api.cloud.cloudservice.v1.CreateApiKeyRequest; - - /** - * Encodes the specified CreateApiKeyRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateApiKeyRequest.verify|verify} messages. - * @param message CreateApiKeyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateApiKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateApiKeyRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateApiKeyRequest.verify|verify} messages. - * @param message CreateApiKeyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateApiKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateApiKeyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateApiKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateApiKeyRequest; - - /** - * Decodes a CreateApiKeyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateApiKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateApiKeyRequest; - - /** - * Creates a CreateApiKeyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateApiKeyRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateApiKeyRequest; - - /** - * Creates a plain object from a CreateApiKeyRequest message. Also converts values to other types if specified. - * @param message CreateApiKeyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateApiKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateApiKeyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateApiKeyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateApiKeyResponse. */ - interface ICreateApiKeyResponse { - - /** The id of the api key created. */ - keyId?: (string|null); - - /** - * The token of the api key created. - * This is a secret and should be stored securely. - * It will not be retrievable after this response. - */ - token?: (string|null); - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a CreateApiKeyResponse. */ - class CreateApiKeyResponse implements ICreateApiKeyResponse { - - /** - * Constructs a new CreateApiKeyResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateApiKeyResponse); - - /** The id of the api key created. */ - public keyId: string; - - /** - * The token of the api key created. - * This is a secret and should be stored securely. - * It will not be retrievable after this response. - */ - public token: string; - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new CreateApiKeyResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateApiKeyResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateApiKeyResponse): temporal.api.cloud.cloudservice.v1.CreateApiKeyResponse; - - /** - * Encodes the specified CreateApiKeyResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateApiKeyResponse.verify|verify} messages. - * @param message CreateApiKeyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateApiKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateApiKeyResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateApiKeyResponse.verify|verify} messages. - * @param message CreateApiKeyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateApiKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateApiKeyResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateApiKeyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateApiKeyResponse; - - /** - * Decodes a CreateApiKeyResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateApiKeyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateApiKeyResponse; - - /** - * Creates a CreateApiKeyResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateApiKeyResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateApiKeyResponse; - - /** - * Creates a plain object from a CreateApiKeyResponse message. Also converts values to other types if specified. - * @param message CreateApiKeyResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateApiKeyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateApiKeyResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateApiKeyResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateApiKeyRequest. */ - interface IUpdateApiKeyRequest { - - /** The id of the api key to update. */ - keyId?: (string|null); - - /** The new api key specification. */ - spec?: (temporal.api.cloud.identity.v1.IApiKeySpec|null); - - /** - * The version of the api key for which this update is intended for. - * The latest version can be found in the GetApiKey operation response. - */ - resourceVersion?: (string|null); - - /** The id to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents an UpdateApiKeyRequest. */ - class UpdateApiKeyRequest implements IUpdateApiKeyRequest { - - /** - * Constructs a new UpdateApiKeyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateApiKeyRequest); - - /** The id of the api key to update. */ - public keyId: string; - - /** The new api key specification. */ - public spec?: (temporal.api.cloud.identity.v1.IApiKeySpec|null); - - /** - * The version of the api key for which this update is intended for. - * The latest version can be found in the GetApiKey operation response. - */ - public resourceVersion: string; - - /** The id to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new UpdateApiKeyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateApiKeyRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateApiKeyRequest): temporal.api.cloud.cloudservice.v1.UpdateApiKeyRequest; - - /** - * Encodes the specified UpdateApiKeyRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateApiKeyRequest.verify|verify} messages. - * @param message UpdateApiKeyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateApiKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateApiKeyRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateApiKeyRequest.verify|verify} messages. - * @param message UpdateApiKeyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateApiKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateApiKeyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateApiKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateApiKeyRequest; - - /** - * Decodes an UpdateApiKeyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateApiKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateApiKeyRequest; - - /** - * Creates an UpdateApiKeyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateApiKeyRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateApiKeyRequest; - - /** - * Creates a plain object from an UpdateApiKeyRequest message. Also converts values to other types if specified. - * @param message UpdateApiKeyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateApiKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateApiKeyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateApiKeyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateApiKeyResponse. */ - interface IUpdateApiKeyResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents an UpdateApiKeyResponse. */ - class UpdateApiKeyResponse implements IUpdateApiKeyResponse { - - /** - * Constructs a new UpdateApiKeyResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateApiKeyResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new UpdateApiKeyResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateApiKeyResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateApiKeyResponse): temporal.api.cloud.cloudservice.v1.UpdateApiKeyResponse; - - /** - * Encodes the specified UpdateApiKeyResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateApiKeyResponse.verify|verify} messages. - * @param message UpdateApiKeyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateApiKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateApiKeyResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateApiKeyResponse.verify|verify} messages. - * @param message UpdateApiKeyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateApiKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateApiKeyResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateApiKeyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateApiKeyResponse; - - /** - * Decodes an UpdateApiKeyResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateApiKeyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateApiKeyResponse; - - /** - * Creates an UpdateApiKeyResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateApiKeyResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateApiKeyResponse; - - /** - * Creates a plain object from an UpdateApiKeyResponse message. Also converts values to other types if specified. - * @param message UpdateApiKeyResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateApiKeyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateApiKeyResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateApiKeyResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteApiKeyRequest. */ - interface IDeleteApiKeyRequest { - - /** The id of the api key to delete. */ - keyId?: (string|null); - - /** - * The version of the api key for which this delete is intended for. - * The latest version can be found in the GetApiKey operation response. - */ - resourceVersion?: (string|null); - - /** The id to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents a DeleteApiKeyRequest. */ - class DeleteApiKeyRequest implements IDeleteApiKeyRequest { - - /** - * Constructs a new DeleteApiKeyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteApiKeyRequest); - - /** The id of the api key to delete. */ - public keyId: string; - - /** - * The version of the api key for which this delete is intended for. - * The latest version can be found in the GetApiKey operation response. - */ - public resourceVersion: string; - - /** The id to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new DeleteApiKeyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteApiKeyRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteApiKeyRequest): temporal.api.cloud.cloudservice.v1.DeleteApiKeyRequest; - - /** - * Encodes the specified DeleteApiKeyRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteApiKeyRequest.verify|verify} messages. - * @param message DeleteApiKeyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteApiKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteApiKeyRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteApiKeyRequest.verify|verify} messages. - * @param message DeleteApiKeyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteApiKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteApiKeyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteApiKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteApiKeyRequest; - - /** - * Decodes a DeleteApiKeyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteApiKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteApiKeyRequest; - - /** - * Creates a DeleteApiKeyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteApiKeyRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteApiKeyRequest; - - /** - * Creates a plain object from a DeleteApiKeyRequest message. Also converts values to other types if specified. - * @param message DeleteApiKeyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteApiKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteApiKeyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteApiKeyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteApiKeyResponse. */ - interface IDeleteApiKeyResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a DeleteApiKeyResponse. */ - class DeleteApiKeyResponse implements IDeleteApiKeyResponse { - - /** - * Constructs a new DeleteApiKeyResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteApiKeyResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new DeleteApiKeyResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteApiKeyResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteApiKeyResponse): temporal.api.cloud.cloudservice.v1.DeleteApiKeyResponse; - - /** - * Encodes the specified DeleteApiKeyResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteApiKeyResponse.verify|verify} messages. - * @param message DeleteApiKeyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteApiKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteApiKeyResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteApiKeyResponse.verify|verify} messages. - * @param message DeleteApiKeyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteApiKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteApiKeyResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteApiKeyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteApiKeyResponse; - - /** - * Decodes a DeleteApiKeyResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteApiKeyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteApiKeyResponse; - - /** - * Creates a DeleteApiKeyResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteApiKeyResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteApiKeyResponse; - - /** - * Creates a plain object from a DeleteApiKeyResponse message. Also converts values to other types if specified. - * @param message DeleteApiKeyResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteApiKeyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteApiKeyResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteApiKeyResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNexusEndpointsRequest. */ - interface IGetNexusEndpointsRequest { - - /** - * The requested size of the page to retrieve - optional. - * Cannot exceed 1000. Defaults to 100. - */ - pageSize?: (number|null); - - /** The page token if this is continuing from another response - optional. */ - pageToken?: (string|null); - - /** optional, treated as an AND if specified */ - targetNamespaceId?: (string|null); - - /** optional, treated as an AND if specified */ - targetTaskQueue?: (string|null); - - /** Filter endpoints by their name - optional, treated as an AND if specified. Specifying this will result in zero or one results. */ - name?: (string|null); - } - - /** Represents a GetNexusEndpointsRequest. */ - class GetNexusEndpointsRequest implements IGetNexusEndpointsRequest { - - /** - * Constructs a new GetNexusEndpointsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointsRequest); - - /** - * The requested size of the page to retrieve - optional. - * Cannot exceed 1000. Defaults to 100. - */ - public pageSize: number; - - /** The page token if this is continuing from another response - optional. */ - public pageToken: string; - - /** optional, treated as an AND if specified */ - public targetNamespaceId: string; - - /** optional, treated as an AND if specified */ - public targetTaskQueue: string; - - /** Filter endpoints by their name - optional, treated as an AND if specified. Specifying this will result in zero or one results. */ - public name: string; - - /** - * Creates a new GetNexusEndpointsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNexusEndpointsRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointsRequest): temporal.api.cloud.cloudservice.v1.GetNexusEndpointsRequest; - - /** - * Encodes the specified GetNexusEndpointsRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNexusEndpointsRequest.verify|verify} messages. - * @param message GetNexusEndpointsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNexusEndpointsRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNexusEndpointsRequest.verify|verify} messages. - * @param message GetNexusEndpointsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNexusEndpointsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNexusEndpointsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetNexusEndpointsRequest; - - /** - * Decodes a GetNexusEndpointsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNexusEndpointsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetNexusEndpointsRequest; - - /** - * Creates a GetNexusEndpointsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNexusEndpointsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetNexusEndpointsRequest; - - /** - * Creates a plain object from a GetNexusEndpointsRequest message. Also converts values to other types if specified. - * @param message GetNexusEndpointsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetNexusEndpointsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNexusEndpointsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNexusEndpointsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNexusEndpointsResponse. */ - interface IGetNexusEndpointsResponse { - - /** The list of endpoints in ascending id order. */ - endpoints?: (temporal.api.cloud.nexus.v1.IEndpoint[]|null); - - /** The next page's token. */ - nextPageToken?: (string|null); - } - - /** Represents a GetNexusEndpointsResponse. */ - class GetNexusEndpointsResponse implements IGetNexusEndpointsResponse { - - /** - * Constructs a new GetNexusEndpointsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointsResponse); - - /** The list of endpoints in ascending id order. */ - public endpoints: temporal.api.cloud.nexus.v1.IEndpoint[]; - - /** The next page's token. */ - public nextPageToken: string; - - /** - * Creates a new GetNexusEndpointsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNexusEndpointsResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointsResponse): temporal.api.cloud.cloudservice.v1.GetNexusEndpointsResponse; - - /** - * Encodes the specified GetNexusEndpointsResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNexusEndpointsResponse.verify|verify} messages. - * @param message GetNexusEndpointsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNexusEndpointsResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNexusEndpointsResponse.verify|verify} messages. - * @param message GetNexusEndpointsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNexusEndpointsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNexusEndpointsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetNexusEndpointsResponse; - - /** - * Decodes a GetNexusEndpointsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNexusEndpointsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetNexusEndpointsResponse; - - /** - * Creates a GetNexusEndpointsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNexusEndpointsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetNexusEndpointsResponse; - - /** - * Creates a plain object from a GetNexusEndpointsResponse message. Also converts values to other types if specified. - * @param message GetNexusEndpointsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetNexusEndpointsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNexusEndpointsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNexusEndpointsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNexusEndpointRequest. */ - interface IGetNexusEndpointRequest { - - /** The id of the nexus endpoint to get. */ - endpointId?: (string|null); - } - - /** Represents a GetNexusEndpointRequest. */ - class GetNexusEndpointRequest implements IGetNexusEndpointRequest { - - /** - * Constructs a new GetNexusEndpointRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointRequest); - - /** The id of the nexus endpoint to get. */ - public endpointId: string; - - /** - * Creates a new GetNexusEndpointRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNexusEndpointRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointRequest): temporal.api.cloud.cloudservice.v1.GetNexusEndpointRequest; - - /** - * Encodes the specified GetNexusEndpointRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNexusEndpointRequest.verify|verify} messages. - * @param message GetNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNexusEndpointRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNexusEndpointRequest.verify|verify} messages. - * @param message GetNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNexusEndpointRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetNexusEndpointRequest; - - /** - * Decodes a GetNexusEndpointRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetNexusEndpointRequest; - - /** - * Creates a GetNexusEndpointRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNexusEndpointRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetNexusEndpointRequest; - - /** - * Creates a plain object from a GetNexusEndpointRequest message. Also converts values to other types if specified. - * @param message GetNexusEndpointRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetNexusEndpointRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNexusEndpointRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNexusEndpointRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNexusEndpointResponse. */ - interface IGetNexusEndpointResponse { - - /** The nexus endpoint. */ - endpoint?: (temporal.api.cloud.nexus.v1.IEndpoint|null); - } - - /** Represents a GetNexusEndpointResponse. */ - class GetNexusEndpointResponse implements IGetNexusEndpointResponse { - - /** - * Constructs a new GetNexusEndpointResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointResponse); - - /** The nexus endpoint. */ - public endpoint?: (temporal.api.cloud.nexus.v1.IEndpoint|null); - - /** - * Creates a new GetNexusEndpointResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNexusEndpointResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointResponse): temporal.api.cloud.cloudservice.v1.GetNexusEndpointResponse; - - /** - * Encodes the specified GetNexusEndpointResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNexusEndpointResponse.verify|verify} messages. - * @param message GetNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNexusEndpointResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNexusEndpointResponse.verify|verify} messages. - * @param message GetNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNexusEndpointResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetNexusEndpointResponse; - - /** - * Decodes a GetNexusEndpointResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetNexusEndpointResponse; - - /** - * Creates a GetNexusEndpointResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNexusEndpointResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetNexusEndpointResponse; - - /** - * Creates a plain object from a GetNexusEndpointResponse message. Also converts values to other types if specified. - * @param message GetNexusEndpointResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetNexusEndpointResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNexusEndpointResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNexusEndpointResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateNexusEndpointRequest. */ - interface ICreateNexusEndpointRequest { - - /** The spec for the nexus endpoint. */ - spec?: (temporal.api.cloud.nexus.v1.IEndpointSpec|null); - - /** The id to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents a CreateNexusEndpointRequest. */ - class CreateNexusEndpointRequest implements ICreateNexusEndpointRequest { - - /** - * Constructs a new CreateNexusEndpointRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateNexusEndpointRequest); - - /** The spec for the nexus endpoint. */ - public spec?: (temporal.api.cloud.nexus.v1.IEndpointSpec|null); - - /** The id to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new CreateNexusEndpointRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateNexusEndpointRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateNexusEndpointRequest): temporal.api.cloud.cloudservice.v1.CreateNexusEndpointRequest; - - /** - * Encodes the specified CreateNexusEndpointRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateNexusEndpointRequest.verify|verify} messages. - * @param message CreateNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateNexusEndpointRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateNexusEndpointRequest.verify|verify} messages. - * @param message CreateNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateNexusEndpointRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateNexusEndpointRequest; - - /** - * Decodes a CreateNexusEndpointRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateNexusEndpointRequest; - - /** - * Creates a CreateNexusEndpointRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateNexusEndpointRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateNexusEndpointRequest; - - /** - * Creates a plain object from a CreateNexusEndpointRequest message. Also converts values to other types if specified. - * @param message CreateNexusEndpointRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateNexusEndpointRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateNexusEndpointRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateNexusEndpointRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateNexusEndpointResponse. */ - interface ICreateNexusEndpointResponse { - - /** The id of the endpoint that was created. */ - endpointId?: (string|null); - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a CreateNexusEndpointResponse. */ - class CreateNexusEndpointResponse implements ICreateNexusEndpointResponse { - - /** - * Constructs a new CreateNexusEndpointResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateNexusEndpointResponse); - - /** The id of the endpoint that was created. */ - public endpointId: string; - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new CreateNexusEndpointResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateNexusEndpointResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateNexusEndpointResponse): temporal.api.cloud.cloudservice.v1.CreateNexusEndpointResponse; - - /** - * Encodes the specified CreateNexusEndpointResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateNexusEndpointResponse.verify|verify} messages. - * @param message CreateNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateNexusEndpointResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateNexusEndpointResponse.verify|verify} messages. - * @param message CreateNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateNexusEndpointResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateNexusEndpointResponse; - - /** - * Decodes a CreateNexusEndpointResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateNexusEndpointResponse; - - /** - * Creates a CreateNexusEndpointResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateNexusEndpointResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateNexusEndpointResponse; - - /** - * Creates a plain object from a CreateNexusEndpointResponse message. Also converts values to other types if specified. - * @param message CreateNexusEndpointResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateNexusEndpointResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateNexusEndpointResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateNexusEndpointResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNexusEndpointRequest. */ - interface IUpdateNexusEndpointRequest { - - /** The id of the nexus endpoint to update. */ - endpointId?: (string|null); - - /** The updated nexus endpoint specification. */ - spec?: (temporal.api.cloud.nexus.v1.IEndpointSpec|null); - - /** - * The version of the nexus endpoint for which this update is intended for. - * The latest version can be found in the GetNexusEndpoint operation response. - */ - resourceVersion?: (string|null); - - /** The id to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents an UpdateNexusEndpointRequest. */ - class UpdateNexusEndpointRequest implements IUpdateNexusEndpointRequest { - - /** - * Constructs a new UpdateNexusEndpointRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNexusEndpointRequest); - - /** The id of the nexus endpoint to update. */ - public endpointId: string; - - /** The updated nexus endpoint specification. */ - public spec?: (temporal.api.cloud.nexus.v1.IEndpointSpec|null); - - /** - * The version of the nexus endpoint for which this update is intended for. - * The latest version can be found in the GetNexusEndpoint operation response. - */ - public resourceVersion: string; - - /** The id to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new UpdateNexusEndpointRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNexusEndpointRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNexusEndpointRequest): temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointRequest; - - /** - * Encodes the specified UpdateNexusEndpointRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointRequest.verify|verify} messages. - * @param message UpdateNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNexusEndpointRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointRequest.verify|verify} messages. - * @param message UpdateNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNexusEndpointRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointRequest; - - /** - * Decodes an UpdateNexusEndpointRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointRequest; - - /** - * Creates an UpdateNexusEndpointRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNexusEndpointRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointRequest; - - /** - * Creates a plain object from an UpdateNexusEndpointRequest message. Also converts values to other types if specified. - * @param message UpdateNexusEndpointRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNexusEndpointRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNexusEndpointRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNexusEndpointResponse. */ - interface IUpdateNexusEndpointResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents an UpdateNexusEndpointResponse. */ - class UpdateNexusEndpointResponse implements IUpdateNexusEndpointResponse { - - /** - * Constructs a new UpdateNexusEndpointResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNexusEndpointResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new UpdateNexusEndpointResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNexusEndpointResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNexusEndpointResponse): temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointResponse; - - /** - * Encodes the specified UpdateNexusEndpointResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointResponse.verify|verify} messages. - * @param message UpdateNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNexusEndpointResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointResponse.verify|verify} messages. - * @param message UpdateNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNexusEndpointResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointResponse; - - /** - * Decodes an UpdateNexusEndpointResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointResponse; - - /** - * Creates an UpdateNexusEndpointResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNexusEndpointResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointResponse; - - /** - * Creates a plain object from an UpdateNexusEndpointResponse message. Also converts values to other types if specified. - * @param message UpdateNexusEndpointResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNexusEndpointResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNexusEndpointResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteNexusEndpointRequest. */ - interface IDeleteNexusEndpointRequest { - - /** The id of the nexus endpoint to delete. */ - endpointId?: (string|null); - - /** - * The version of the endpoint for which this delete is intended for. - * The latest version can be found in the GetNexusEndpoint operation response. - */ - resourceVersion?: (string|null); - - /** The id to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents a DeleteNexusEndpointRequest. */ - class DeleteNexusEndpointRequest implements IDeleteNexusEndpointRequest { - - /** - * Constructs a new DeleteNexusEndpointRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNexusEndpointRequest); - - /** The id of the nexus endpoint to delete. */ - public endpointId: string; - - /** - * The version of the endpoint for which this delete is intended for. - * The latest version can be found in the GetNexusEndpoint operation response. - */ - public resourceVersion: string; - - /** The id to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new DeleteNexusEndpointRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteNexusEndpointRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNexusEndpointRequest): temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointRequest; - - /** - * Encodes the specified DeleteNexusEndpointRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointRequest.verify|verify} messages. - * @param message DeleteNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteNexusEndpointRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointRequest.verify|verify} messages. - * @param message DeleteNexusEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteNexusEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteNexusEndpointRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointRequest; - - /** - * Decodes a DeleteNexusEndpointRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteNexusEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointRequest; - - /** - * Creates a DeleteNexusEndpointRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteNexusEndpointRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointRequest; - - /** - * Creates a plain object from a DeleteNexusEndpointRequest message. Also converts values to other types if specified. - * @param message DeleteNexusEndpointRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteNexusEndpointRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteNexusEndpointRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteNexusEndpointResponse. */ - interface IDeleteNexusEndpointResponse { - - /** The async operation */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a DeleteNexusEndpointResponse. */ - class DeleteNexusEndpointResponse implements IDeleteNexusEndpointResponse { - - /** - * Constructs a new DeleteNexusEndpointResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNexusEndpointResponse); - - /** The async operation */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new DeleteNexusEndpointResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteNexusEndpointResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNexusEndpointResponse): temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointResponse; - - /** - * Encodes the specified DeleteNexusEndpointResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointResponse.verify|verify} messages. - * @param message DeleteNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteNexusEndpointResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointResponse.verify|verify} messages. - * @param message DeleteNexusEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteNexusEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteNexusEndpointResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointResponse; - - /** - * Decodes a DeleteNexusEndpointResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteNexusEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointResponse; - - /** - * Creates a DeleteNexusEndpointResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteNexusEndpointResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointResponse; - - /** - * Creates a plain object from a DeleteNexusEndpointResponse message. Also converts values to other types if specified. - * @param message DeleteNexusEndpointResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteNexusEndpointResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteNexusEndpointResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUserGroupsRequest. */ - interface IGetUserGroupsRequest { - - /** - * The requested size of the page to retrieve - optional. - * Cannot exceed 1000. Defaults to 100. - */ - pageSize?: (number|null); - - /** The page token if this is continuing from another response - optional. */ - pageToken?: (string|null); - - /** Filter groups by the namespace they have access to - optional. */ - namespace?: (string|null); - - /** Filter groups by the display name - optional. */ - displayName?: (string|null); - - /** Filter groups by the google group specification - optional. */ - googleGroup?: (temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.IGoogleGroupFilter|null); - - /** Filter groups by the SCIM group specification - optional. */ - scimGroup?: (temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.ISCIMGroupFilter|null); - } - - /** Represents a GetUserGroupsRequest. */ - class GetUserGroupsRequest implements IGetUserGroupsRequest { - - /** - * Constructs a new GetUserGroupsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetUserGroupsRequest); - - /** - * The requested size of the page to retrieve - optional. - * Cannot exceed 1000. Defaults to 100. - */ - public pageSize: number; - - /** The page token if this is continuing from another response - optional. */ - public pageToken: string; - - /** Filter groups by the namespace they have access to - optional. */ - public namespace: string; - - /** Filter groups by the display name - optional. */ - public displayName: string; - - /** Filter groups by the google group specification - optional. */ - public googleGroup?: (temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.IGoogleGroupFilter|null); - - /** Filter groups by the SCIM group specification - optional. */ - public scimGroup?: (temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.ISCIMGroupFilter|null); - - /** - * Creates a new GetUserGroupsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserGroupsRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetUserGroupsRequest): temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest; - - /** - * Encodes the specified GetUserGroupsRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.verify|verify} messages. - * @param message GetUserGroupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetUserGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserGroupsRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.verify|verify} messages. - * @param message GetUserGroupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetUserGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserGroupsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserGroupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest; - - /** - * Decodes a GetUserGroupsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserGroupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest; - - /** - * Creates a GetUserGroupsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserGroupsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest; - - /** - * Creates a plain object from a GetUserGroupsRequest message. Also converts values to other types if specified. - * @param message GetUserGroupsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserGroupsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserGroupsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GetUserGroupsRequest { - - /** Properties of a GoogleGroupFilter. */ - interface IGoogleGroupFilter { - - /** Filter groups by the google group email - optional. */ - emailAddress?: (string|null); - } - - /** Represents a GoogleGroupFilter. */ - class GoogleGroupFilter implements IGoogleGroupFilter { - - /** - * Constructs a new GoogleGroupFilter. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.IGoogleGroupFilter); - - /** Filter groups by the google group email - optional. */ - public emailAddress: string; - - /** - * Creates a new GoogleGroupFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns GoogleGroupFilter instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.IGoogleGroupFilter): temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.GoogleGroupFilter; - - /** - * Encodes the specified GoogleGroupFilter message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.GoogleGroupFilter.verify|verify} messages. - * @param message GoogleGroupFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.IGoogleGroupFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoogleGroupFilter message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.GoogleGroupFilter.verify|verify} messages. - * @param message GoogleGroupFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.IGoogleGroupFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoogleGroupFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoogleGroupFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.GoogleGroupFilter; - - /** - * Decodes a GoogleGroupFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoogleGroupFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.GoogleGroupFilter; - - /** - * Creates a GoogleGroupFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoogleGroupFilter - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.GoogleGroupFilter; - - /** - * Creates a plain object from a GoogleGroupFilter message. Also converts values to other types if specified. - * @param message GoogleGroupFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.GoogleGroupFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoogleGroupFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoogleGroupFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SCIMGroupFilter. */ - interface ISCIMGroupFilter { - - /** Filter groups by the SCIM IDP id - optional. */ - idpId?: (string|null); - } - - /** Represents a SCIMGroupFilter. */ - class SCIMGroupFilter implements ISCIMGroupFilter { - - /** - * Constructs a new SCIMGroupFilter. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.ISCIMGroupFilter); - - /** Filter groups by the SCIM IDP id - optional. */ - public idpId: string; - - /** - * Creates a new SCIMGroupFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns SCIMGroupFilter instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.ISCIMGroupFilter): temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.SCIMGroupFilter; - - /** - * Encodes the specified SCIMGroupFilter message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.SCIMGroupFilter.verify|verify} messages. - * @param message SCIMGroupFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.ISCIMGroupFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SCIMGroupFilter message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.SCIMGroupFilter.verify|verify} messages. - * @param message SCIMGroupFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.ISCIMGroupFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SCIMGroupFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SCIMGroupFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.SCIMGroupFilter; - - /** - * Decodes a SCIMGroupFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SCIMGroupFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.SCIMGroupFilter; - - /** - * Creates a SCIMGroupFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SCIMGroupFilter - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.SCIMGroupFilter; - - /** - * Creates a plain object from a SCIMGroupFilter message. Also converts values to other types if specified. - * @param message SCIMGroupFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.SCIMGroupFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SCIMGroupFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SCIMGroupFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GetUserGroupsResponse. */ - interface IGetUserGroupsResponse { - - /** The list of groups in ascending name order. */ - groups?: (temporal.api.cloud.identity.v1.IUserGroup[]|null); - - /** The next page's token. */ - nextPageToken?: (string|null); - } - - /** Represents a GetUserGroupsResponse. */ - class GetUserGroupsResponse implements IGetUserGroupsResponse { - - /** - * Constructs a new GetUserGroupsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetUserGroupsResponse); - - /** The list of groups in ascending name order. */ - public groups: temporal.api.cloud.identity.v1.IUserGroup[]; - - /** The next page's token. */ - public nextPageToken: string; - - /** - * Creates a new GetUserGroupsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserGroupsResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetUserGroupsResponse): temporal.api.cloud.cloudservice.v1.GetUserGroupsResponse; - - /** - * Encodes the specified GetUserGroupsResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupsResponse.verify|verify} messages. - * @param message GetUserGroupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetUserGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserGroupsResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupsResponse.verify|verify} messages. - * @param message GetUserGroupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetUserGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserGroupsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserGroupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetUserGroupsResponse; - - /** - * Decodes a GetUserGroupsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserGroupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetUserGroupsResponse; - - /** - * Creates a GetUserGroupsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserGroupsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetUserGroupsResponse; - - /** - * Creates a plain object from a GetUserGroupsResponse message. Also converts values to other types if specified. - * @param message GetUserGroupsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetUserGroupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserGroupsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserGroupsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUserGroupRequest. */ - interface IGetUserGroupRequest { - - /** The id of the group to get. */ - groupId?: (string|null); - } - - /** Represents a GetUserGroupRequest. */ - class GetUserGroupRequest implements IGetUserGroupRequest { - - /** - * Constructs a new GetUserGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetUserGroupRequest); - - /** The id of the group to get. */ - public groupId: string; - - /** - * Creates a new GetUserGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserGroupRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetUserGroupRequest): temporal.api.cloud.cloudservice.v1.GetUserGroupRequest; - - /** - * Encodes the specified GetUserGroupRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupRequest.verify|verify} messages. - * @param message GetUserGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetUserGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserGroupRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupRequest.verify|verify} messages. - * @param message GetUserGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetUserGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetUserGroupRequest; - - /** - * Decodes a GetUserGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetUserGroupRequest; - - /** - * Creates a GetUserGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserGroupRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetUserGroupRequest; - - /** - * Creates a plain object from a GetUserGroupRequest message. Also converts values to other types if specified. - * @param message GetUserGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetUserGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUserGroupResponse. */ - interface IGetUserGroupResponse { - - /** The group. */ - group?: (temporal.api.cloud.identity.v1.IUserGroup|null); - } - - /** Represents a GetUserGroupResponse. */ - class GetUserGroupResponse implements IGetUserGroupResponse { - - /** - * Constructs a new GetUserGroupResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetUserGroupResponse); - - /** The group. */ - public group?: (temporal.api.cloud.identity.v1.IUserGroup|null); - - /** - * Creates a new GetUserGroupResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserGroupResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetUserGroupResponse): temporal.api.cloud.cloudservice.v1.GetUserGroupResponse; - - /** - * Encodes the specified GetUserGroupResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupResponse.verify|verify} messages. - * @param message GetUserGroupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetUserGroupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserGroupResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupResponse.verify|verify} messages. - * @param message GetUserGroupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetUserGroupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserGroupResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserGroupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetUserGroupResponse; - - /** - * Decodes a GetUserGroupResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserGroupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetUserGroupResponse; - - /** - * Creates a GetUserGroupResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserGroupResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetUserGroupResponse; - - /** - * Creates a plain object from a GetUserGroupResponse message. Also converts values to other types if specified. - * @param message GetUserGroupResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetUserGroupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserGroupResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserGroupResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateUserGroupRequest. */ - interface ICreateUserGroupRequest { - - /** The spec for the group to create. */ - spec?: (temporal.api.cloud.identity.v1.IUserGroupSpec|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - asyncOperationId?: (string|null); - } - - /** Represents a CreateUserGroupRequest. */ - class CreateUserGroupRequest implements ICreateUserGroupRequest { - - /** - * Constructs a new CreateUserGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateUserGroupRequest); - - /** The spec for the group to create. */ - public spec?: (temporal.api.cloud.identity.v1.IUserGroupSpec|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - public asyncOperationId: string; - - /** - * Creates a new CreateUserGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateUserGroupRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateUserGroupRequest): temporal.api.cloud.cloudservice.v1.CreateUserGroupRequest; - - /** - * Encodes the specified CreateUserGroupRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateUserGroupRequest.verify|verify} messages. - * @param message CreateUserGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateUserGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateUserGroupRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateUserGroupRequest.verify|verify} messages. - * @param message CreateUserGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateUserGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateUserGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateUserGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateUserGroupRequest; - - /** - * Decodes a CreateUserGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateUserGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateUserGroupRequest; - - /** - * Creates a CreateUserGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateUserGroupRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateUserGroupRequest; - - /** - * Creates a plain object from a CreateUserGroupRequest message. Also converts values to other types if specified. - * @param message CreateUserGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateUserGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateUserGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateUserGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateUserGroupResponse. */ - interface ICreateUserGroupResponse { - - /** The id of the group that was created. */ - groupId?: (string|null); - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a CreateUserGroupResponse. */ - class CreateUserGroupResponse implements ICreateUserGroupResponse { - - /** - * Constructs a new CreateUserGroupResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateUserGroupResponse); - - /** The id of the group that was created. */ - public groupId: string; - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new CreateUserGroupResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateUserGroupResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateUserGroupResponse): temporal.api.cloud.cloudservice.v1.CreateUserGroupResponse; - - /** - * Encodes the specified CreateUserGroupResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateUserGroupResponse.verify|verify} messages. - * @param message CreateUserGroupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateUserGroupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateUserGroupResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateUserGroupResponse.verify|verify} messages. - * @param message CreateUserGroupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateUserGroupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateUserGroupResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateUserGroupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateUserGroupResponse; - - /** - * Decodes a CreateUserGroupResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateUserGroupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateUserGroupResponse; - - /** - * Creates a CreateUserGroupResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateUserGroupResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateUserGroupResponse; - - /** - * Creates a plain object from a CreateUserGroupResponse message. Also converts values to other types if specified. - * @param message CreateUserGroupResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateUserGroupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateUserGroupResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateUserGroupResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateUserGroupRequest. */ - interface IUpdateUserGroupRequest { - - /** The id of the group to update. */ - groupId?: (string|null); - - /** The new group specification. */ - spec?: (temporal.api.cloud.identity.v1.IUserGroupSpec|null); - - /** - * The version of the group for which this update is intended for. - * The latest version can be found in the GetGroup operation response. - */ - resourceVersion?: (string|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - asyncOperationId?: (string|null); - } - - /** Represents an UpdateUserGroupRequest. */ - class UpdateUserGroupRequest implements IUpdateUserGroupRequest { - - /** - * Constructs a new UpdateUserGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateUserGroupRequest); - - /** The id of the group to update. */ - public groupId: string; - - /** The new group specification. */ - public spec?: (temporal.api.cloud.identity.v1.IUserGroupSpec|null); - - /** - * The version of the group for which this update is intended for. - * The latest version can be found in the GetGroup operation response. - */ - public resourceVersion: string; - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - public asyncOperationId: string; - - /** - * Creates a new UpdateUserGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateUserGroupRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateUserGroupRequest): temporal.api.cloud.cloudservice.v1.UpdateUserGroupRequest; - - /** - * Encodes the specified UpdateUserGroupRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateUserGroupRequest.verify|verify} messages. - * @param message UpdateUserGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateUserGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateUserGroupRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateUserGroupRequest.verify|verify} messages. - * @param message UpdateUserGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateUserGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateUserGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateUserGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateUserGroupRequest; - - /** - * Decodes an UpdateUserGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateUserGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateUserGroupRequest; - - /** - * Creates an UpdateUserGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateUserGroupRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateUserGroupRequest; - - /** - * Creates a plain object from an UpdateUserGroupRequest message. Also converts values to other types if specified. - * @param message UpdateUserGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateUserGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateUserGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateUserGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateUserGroupResponse. */ - interface IUpdateUserGroupResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents an UpdateUserGroupResponse. */ - class UpdateUserGroupResponse implements IUpdateUserGroupResponse { - - /** - * Constructs a new UpdateUserGroupResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateUserGroupResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new UpdateUserGroupResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateUserGroupResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateUserGroupResponse): temporal.api.cloud.cloudservice.v1.UpdateUserGroupResponse; - - /** - * Encodes the specified UpdateUserGroupResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateUserGroupResponse.verify|verify} messages. - * @param message UpdateUserGroupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateUserGroupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateUserGroupResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateUserGroupResponse.verify|verify} messages. - * @param message UpdateUserGroupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateUserGroupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateUserGroupResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateUserGroupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateUserGroupResponse; - - /** - * Decodes an UpdateUserGroupResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateUserGroupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateUserGroupResponse; - - /** - * Creates an UpdateUserGroupResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateUserGroupResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateUserGroupResponse; - - /** - * Creates a plain object from an UpdateUserGroupResponse message. Also converts values to other types if specified. - * @param message UpdateUserGroupResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateUserGroupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateUserGroupResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateUserGroupResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteUserGroupRequest. */ - interface IDeleteUserGroupRequest { - - /** The id of the group to delete. */ - groupId?: (string|null); - - /** - * The version of the group for which this delete is intended for. - * The latest version can be found in the GetGroup operation response. - */ - resourceVersion?: (string|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - asyncOperationId?: (string|null); - } - - /** Represents a DeleteUserGroupRequest. */ - class DeleteUserGroupRequest implements IDeleteUserGroupRequest { - - /** - * Constructs a new DeleteUserGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteUserGroupRequest); - - /** The id of the group to delete. */ - public groupId: string; - - /** - * The version of the group for which this delete is intended for. - * The latest version can be found in the GetGroup operation response. - */ - public resourceVersion: string; - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - public asyncOperationId: string; - - /** - * Creates a new DeleteUserGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteUserGroupRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteUserGroupRequest): temporal.api.cloud.cloudservice.v1.DeleteUserGroupRequest; - - /** - * Encodes the specified DeleteUserGroupRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteUserGroupRequest.verify|verify} messages. - * @param message DeleteUserGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteUserGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteUserGroupRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteUserGroupRequest.verify|verify} messages. - * @param message DeleteUserGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteUserGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteUserGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteUserGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteUserGroupRequest; - - /** - * Decodes a DeleteUserGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteUserGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteUserGroupRequest; - - /** - * Creates a DeleteUserGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteUserGroupRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteUserGroupRequest; - - /** - * Creates a plain object from a DeleteUserGroupRequest message. Also converts values to other types if specified. - * @param message DeleteUserGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteUserGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteUserGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteUserGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteUserGroupResponse. */ - interface IDeleteUserGroupResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a DeleteUserGroupResponse. */ - class DeleteUserGroupResponse implements IDeleteUserGroupResponse { - - /** - * Constructs a new DeleteUserGroupResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteUserGroupResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new DeleteUserGroupResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteUserGroupResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteUserGroupResponse): temporal.api.cloud.cloudservice.v1.DeleteUserGroupResponse; - - /** - * Encodes the specified DeleteUserGroupResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteUserGroupResponse.verify|verify} messages. - * @param message DeleteUserGroupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteUserGroupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteUserGroupResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteUserGroupResponse.verify|verify} messages. - * @param message DeleteUserGroupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteUserGroupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteUserGroupResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteUserGroupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteUserGroupResponse; - - /** - * Decodes a DeleteUserGroupResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteUserGroupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteUserGroupResponse; - - /** - * Creates a DeleteUserGroupResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteUserGroupResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteUserGroupResponse; - - /** - * Creates a plain object from a DeleteUserGroupResponse message. Also converts values to other types if specified. - * @param message DeleteUserGroupResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteUserGroupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteUserGroupResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteUserGroupResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetUserGroupNamespaceAccessRequest. */ - interface ISetUserGroupNamespaceAccessRequest { - - /** The namespace to set permissions for. */ - namespace?: (string|null); - - /** The id of the group to set permissions for. */ - groupId?: (string|null); - - /** The namespace access to assign the group. If left empty, the group will be removed from the namespace access. */ - access?: (temporal.api.cloud.identity.v1.INamespaceAccess|null); - - /** - * The version of the group for which this update is intended for. - * The latest version can be found in the GetGroup operation response. - */ - resourceVersion?: (string|null); - - /** The id to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents a SetUserGroupNamespaceAccessRequest. */ - class SetUserGroupNamespaceAccessRequest implements ISetUserGroupNamespaceAccessRequest { - - /** - * Constructs a new SetUserGroupNamespaceAccessRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ISetUserGroupNamespaceAccessRequest); - - /** The namespace to set permissions for. */ - public namespace: string; - - /** The id of the group to set permissions for. */ - public groupId: string; - - /** The namespace access to assign the group. If left empty, the group will be removed from the namespace access. */ - public access?: (temporal.api.cloud.identity.v1.INamespaceAccess|null); - - /** - * The version of the group for which this update is intended for. - * The latest version can be found in the GetGroup operation response. - */ - public resourceVersion: string; - - /** The id to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new SetUserGroupNamespaceAccessRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetUserGroupNamespaceAccessRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ISetUserGroupNamespaceAccessRequest): temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessRequest; - - /** - * Encodes the specified SetUserGroupNamespaceAccessRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessRequest.verify|verify} messages. - * @param message SetUserGroupNamespaceAccessRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ISetUserGroupNamespaceAccessRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetUserGroupNamespaceAccessRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessRequest.verify|verify} messages. - * @param message SetUserGroupNamespaceAccessRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ISetUserGroupNamespaceAccessRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetUserGroupNamespaceAccessRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetUserGroupNamespaceAccessRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessRequest; - - /** - * Decodes a SetUserGroupNamespaceAccessRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetUserGroupNamespaceAccessRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessRequest; - - /** - * Creates a SetUserGroupNamespaceAccessRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetUserGroupNamespaceAccessRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessRequest; - - /** - * Creates a plain object from a SetUserGroupNamespaceAccessRequest message. Also converts values to other types if specified. - * @param message SetUserGroupNamespaceAccessRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetUserGroupNamespaceAccessRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetUserGroupNamespaceAccessRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetUserGroupNamespaceAccessResponse. */ - interface ISetUserGroupNamespaceAccessResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a SetUserGroupNamespaceAccessResponse. */ - class SetUserGroupNamespaceAccessResponse implements ISetUserGroupNamespaceAccessResponse { - - /** - * Constructs a new SetUserGroupNamespaceAccessResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ISetUserGroupNamespaceAccessResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new SetUserGroupNamespaceAccessResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SetUserGroupNamespaceAccessResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ISetUserGroupNamespaceAccessResponse): temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessResponse; - - /** - * Encodes the specified SetUserGroupNamespaceAccessResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessResponse.verify|verify} messages. - * @param message SetUserGroupNamespaceAccessResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ISetUserGroupNamespaceAccessResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetUserGroupNamespaceAccessResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessResponse.verify|verify} messages. - * @param message SetUserGroupNamespaceAccessResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ISetUserGroupNamespaceAccessResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetUserGroupNamespaceAccessResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetUserGroupNamespaceAccessResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessResponse; - - /** - * Decodes a SetUserGroupNamespaceAccessResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetUserGroupNamespaceAccessResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessResponse; - - /** - * Creates a SetUserGroupNamespaceAccessResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetUserGroupNamespaceAccessResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessResponse; - - /** - * Creates a plain object from a SetUserGroupNamespaceAccessResponse message. Also converts values to other types if specified. - * @param message SetUserGroupNamespaceAccessResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetUserGroupNamespaceAccessResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetUserGroupNamespaceAccessResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddUserGroupMemberRequest. */ - interface IAddUserGroupMemberRequest { - - /** The id of the group to add the member for. */ - groupId?: (string|null); - - /** The member id to add to the group. */ - memberId?: (temporal.api.cloud.identity.v1.IUserGroupMemberId|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - asyncOperationId?: (string|null); - } - - /** Represents an AddUserGroupMemberRequest. */ - class AddUserGroupMemberRequest implements IAddUserGroupMemberRequest { - - /** - * Constructs a new AddUserGroupMemberRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IAddUserGroupMemberRequest); - - /** The id of the group to add the member for. */ - public groupId: string; - - /** The member id to add to the group. */ - public memberId?: (temporal.api.cloud.identity.v1.IUserGroupMemberId|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - public asyncOperationId: string; - - /** - * Creates a new AddUserGroupMemberRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns AddUserGroupMemberRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IAddUserGroupMemberRequest): temporal.api.cloud.cloudservice.v1.AddUserGroupMemberRequest; - - /** - * Encodes the specified AddUserGroupMemberRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.AddUserGroupMemberRequest.verify|verify} messages. - * @param message AddUserGroupMemberRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IAddUserGroupMemberRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddUserGroupMemberRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.AddUserGroupMemberRequest.verify|verify} messages. - * @param message AddUserGroupMemberRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IAddUserGroupMemberRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddUserGroupMemberRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddUserGroupMemberRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.AddUserGroupMemberRequest; - - /** - * Decodes an AddUserGroupMemberRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddUserGroupMemberRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.AddUserGroupMemberRequest; - - /** - * Creates an AddUserGroupMemberRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddUserGroupMemberRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.AddUserGroupMemberRequest; - - /** - * Creates a plain object from an AddUserGroupMemberRequest message. Also converts values to other types if specified. - * @param message AddUserGroupMemberRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.AddUserGroupMemberRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddUserGroupMemberRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddUserGroupMemberRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddUserGroupMemberResponse. */ - interface IAddUserGroupMemberResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents an AddUserGroupMemberResponse. */ - class AddUserGroupMemberResponse implements IAddUserGroupMemberResponse { - - /** - * Constructs a new AddUserGroupMemberResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IAddUserGroupMemberResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new AddUserGroupMemberResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns AddUserGroupMemberResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IAddUserGroupMemberResponse): temporal.api.cloud.cloudservice.v1.AddUserGroupMemberResponse; - - /** - * Encodes the specified AddUserGroupMemberResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.AddUserGroupMemberResponse.verify|verify} messages. - * @param message AddUserGroupMemberResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IAddUserGroupMemberResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddUserGroupMemberResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.AddUserGroupMemberResponse.verify|verify} messages. - * @param message AddUserGroupMemberResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IAddUserGroupMemberResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddUserGroupMemberResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddUserGroupMemberResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.AddUserGroupMemberResponse; - - /** - * Decodes an AddUserGroupMemberResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddUserGroupMemberResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.AddUserGroupMemberResponse; - - /** - * Creates an AddUserGroupMemberResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddUserGroupMemberResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.AddUserGroupMemberResponse; - - /** - * Creates a plain object from an AddUserGroupMemberResponse message. Also converts values to other types if specified. - * @param message AddUserGroupMemberResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.AddUserGroupMemberResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddUserGroupMemberResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddUserGroupMemberResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemoveUserGroupMemberRequest. */ - interface IRemoveUserGroupMemberRequest { - - /** The id of the group to add the member for. */ - groupId?: (string|null); - - /** The member id to add to the group. */ - memberId?: (temporal.api.cloud.identity.v1.IUserGroupMemberId|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - asyncOperationId?: (string|null); - } - - /** Represents a RemoveUserGroupMemberRequest. */ - class RemoveUserGroupMemberRequest implements IRemoveUserGroupMemberRequest { - - /** - * Constructs a new RemoveUserGroupMemberRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IRemoveUserGroupMemberRequest); - - /** The id of the group to add the member for. */ - public groupId: string; - - /** The member id to add to the group. */ - public memberId?: (temporal.api.cloud.identity.v1.IUserGroupMemberId|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - public asyncOperationId: string; - - /** - * Creates a new RemoveUserGroupMemberRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoveUserGroupMemberRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IRemoveUserGroupMemberRequest): temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberRequest; - - /** - * Encodes the specified RemoveUserGroupMemberRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberRequest.verify|verify} messages. - * @param message RemoveUserGroupMemberRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IRemoveUserGroupMemberRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoveUserGroupMemberRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberRequest.verify|verify} messages. - * @param message RemoveUserGroupMemberRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IRemoveUserGroupMemberRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoveUserGroupMemberRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoveUserGroupMemberRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberRequest; - - /** - * Decodes a RemoveUserGroupMemberRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoveUserGroupMemberRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberRequest; - - /** - * Creates a RemoveUserGroupMemberRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoveUserGroupMemberRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberRequest; - - /** - * Creates a plain object from a RemoveUserGroupMemberRequest message. Also converts values to other types if specified. - * @param message RemoveUserGroupMemberRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoveUserGroupMemberRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemoveUserGroupMemberRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemoveUserGroupMemberResponse. */ - interface IRemoveUserGroupMemberResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a RemoveUserGroupMemberResponse. */ - class RemoveUserGroupMemberResponse implements IRemoveUserGroupMemberResponse { - - /** - * Constructs a new RemoveUserGroupMemberResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IRemoveUserGroupMemberResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new RemoveUserGroupMemberResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoveUserGroupMemberResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IRemoveUserGroupMemberResponse): temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberResponse; - - /** - * Encodes the specified RemoveUserGroupMemberResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberResponse.verify|verify} messages. - * @param message RemoveUserGroupMemberResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IRemoveUserGroupMemberResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoveUserGroupMemberResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberResponse.verify|verify} messages. - * @param message RemoveUserGroupMemberResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IRemoveUserGroupMemberResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoveUserGroupMemberResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoveUserGroupMemberResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberResponse; - - /** - * Decodes a RemoveUserGroupMemberResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoveUserGroupMemberResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberResponse; - - /** - * Creates a RemoveUserGroupMemberResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoveUserGroupMemberResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberResponse; - - /** - * Creates a plain object from a RemoveUserGroupMemberResponse message. Also converts values to other types if specified. - * @param message RemoveUserGroupMemberResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoveUserGroupMemberResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemoveUserGroupMemberResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUserGroupMembersRequest. */ - interface IGetUserGroupMembersRequest { - - /** - * The requested size of the page to retrieve - optional. - * Cannot exceed 1000. Defaults to 100. - */ - pageSize?: (number|null); - - /** The page token if this is continuing from another response - optional. */ - pageToken?: (string|null); - - /** The group id to list members of. */ - groupId?: (string|null); - } - - /** Represents a GetUserGroupMembersRequest. */ - class GetUserGroupMembersRequest implements IGetUserGroupMembersRequest { - - /** - * Constructs a new GetUserGroupMembersRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetUserGroupMembersRequest); - - /** - * The requested size of the page to retrieve - optional. - * Cannot exceed 1000. Defaults to 100. - */ - public pageSize: number; - - /** The page token if this is continuing from another response - optional. */ - public pageToken: string; - - /** The group id to list members of. */ - public groupId: string; - - /** - * Creates a new GetUserGroupMembersRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserGroupMembersRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetUserGroupMembersRequest): temporal.api.cloud.cloudservice.v1.GetUserGroupMembersRequest; - - /** - * Encodes the specified GetUserGroupMembersRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupMembersRequest.verify|verify} messages. - * @param message GetUserGroupMembersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetUserGroupMembersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserGroupMembersRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupMembersRequest.verify|verify} messages. - * @param message GetUserGroupMembersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetUserGroupMembersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserGroupMembersRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserGroupMembersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetUserGroupMembersRequest; - - /** - * Decodes a GetUserGroupMembersRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserGroupMembersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetUserGroupMembersRequest; - - /** - * Creates a GetUserGroupMembersRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserGroupMembersRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetUserGroupMembersRequest; - - /** - * Creates a plain object from a GetUserGroupMembersRequest message. Also converts values to other types if specified. - * @param message GetUserGroupMembersRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetUserGroupMembersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserGroupMembersRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserGroupMembersRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUserGroupMembersResponse. */ - interface IGetUserGroupMembersResponse { - - /** The list of group members */ - members?: (temporal.api.cloud.identity.v1.IUserGroupMember[]|null); - - /** The next page's token. */ - nextPageToken?: (string|null); - } - - /** Represents a GetUserGroupMembersResponse. */ - class GetUserGroupMembersResponse implements IGetUserGroupMembersResponse { - - /** - * Constructs a new GetUserGroupMembersResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetUserGroupMembersResponse); - - /** The list of group members */ - public members: temporal.api.cloud.identity.v1.IUserGroupMember[]; - - /** The next page's token. */ - public nextPageToken: string; - - /** - * Creates a new GetUserGroupMembersResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserGroupMembersResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetUserGroupMembersResponse): temporal.api.cloud.cloudservice.v1.GetUserGroupMembersResponse; - - /** - * Encodes the specified GetUserGroupMembersResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupMembersResponse.verify|verify} messages. - * @param message GetUserGroupMembersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetUserGroupMembersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserGroupMembersResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUserGroupMembersResponse.verify|verify} messages. - * @param message GetUserGroupMembersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetUserGroupMembersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserGroupMembersResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserGroupMembersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetUserGroupMembersResponse; - - /** - * Decodes a GetUserGroupMembersResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserGroupMembersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetUserGroupMembersResponse; - - /** - * Creates a GetUserGroupMembersResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserGroupMembersResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetUserGroupMembersResponse; - - /** - * Creates a plain object from a GetUserGroupMembersResponse message. Also converts values to other types if specified. - * @param message GetUserGroupMembersResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetUserGroupMembersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserGroupMembersResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserGroupMembersResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateServiceAccountRequest. */ - interface ICreateServiceAccountRequest { - - /** The spec of the service account to create. */ - spec?: (temporal.api.cloud.identity.v1.IServiceAccountSpec|null); - - /** The ID to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents a CreateServiceAccountRequest. */ - class CreateServiceAccountRequest implements ICreateServiceAccountRequest { - - /** - * Constructs a new CreateServiceAccountRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateServiceAccountRequest); - - /** The spec of the service account to create. */ - public spec?: (temporal.api.cloud.identity.v1.IServiceAccountSpec|null); - - /** The ID to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new CreateServiceAccountRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateServiceAccountRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateServiceAccountRequest): temporal.api.cloud.cloudservice.v1.CreateServiceAccountRequest; - - /** - * Encodes the specified CreateServiceAccountRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateServiceAccountRequest.verify|verify} messages. - * @param message CreateServiceAccountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateServiceAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateServiceAccountRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateServiceAccountRequest.verify|verify} messages. - * @param message CreateServiceAccountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateServiceAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateServiceAccountRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateServiceAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateServiceAccountRequest; - - /** - * Decodes a CreateServiceAccountRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateServiceAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateServiceAccountRequest; - - /** - * Creates a CreateServiceAccountRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateServiceAccountRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateServiceAccountRequest; - - /** - * Creates a plain object from a CreateServiceAccountRequest message. Also converts values to other types if specified. - * @param message CreateServiceAccountRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateServiceAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateServiceAccountRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateServiceAccountRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateServiceAccountResponse. */ - interface ICreateServiceAccountResponse { - - /** The ID of the created service account. */ - serviceAccountId?: (string|null); - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a CreateServiceAccountResponse. */ - class CreateServiceAccountResponse implements ICreateServiceAccountResponse { - - /** - * Constructs a new CreateServiceAccountResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateServiceAccountResponse); - - /** The ID of the created service account. */ - public serviceAccountId: string; - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new CreateServiceAccountResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateServiceAccountResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateServiceAccountResponse): temporal.api.cloud.cloudservice.v1.CreateServiceAccountResponse; - - /** - * Encodes the specified CreateServiceAccountResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateServiceAccountResponse.verify|verify} messages. - * @param message CreateServiceAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateServiceAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateServiceAccountResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateServiceAccountResponse.verify|verify} messages. - * @param message CreateServiceAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateServiceAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateServiceAccountResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateServiceAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateServiceAccountResponse; - - /** - * Decodes a CreateServiceAccountResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateServiceAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateServiceAccountResponse; - - /** - * Creates a CreateServiceAccountResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateServiceAccountResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateServiceAccountResponse; - - /** - * Creates a plain object from a CreateServiceAccountResponse message. Also converts values to other types if specified. - * @param message CreateServiceAccountResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateServiceAccountResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateServiceAccountResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateServiceAccountResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetServiceAccountRequest. */ - interface IGetServiceAccountRequest { - - /** ID of the service account to retrieve. */ - serviceAccountId?: (string|null); - } - - /** Represents a GetServiceAccountRequest. */ - class GetServiceAccountRequest implements IGetServiceAccountRequest { - - /** - * Constructs a new GetServiceAccountRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetServiceAccountRequest); - - /** ID of the service account to retrieve. */ - public serviceAccountId: string; - - /** - * Creates a new GetServiceAccountRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetServiceAccountRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetServiceAccountRequest): temporal.api.cloud.cloudservice.v1.GetServiceAccountRequest; - - /** - * Encodes the specified GetServiceAccountRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetServiceAccountRequest.verify|verify} messages. - * @param message GetServiceAccountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetServiceAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetServiceAccountRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetServiceAccountRequest.verify|verify} messages. - * @param message GetServiceAccountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetServiceAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetServiceAccountRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetServiceAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetServiceAccountRequest; - - /** - * Decodes a GetServiceAccountRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetServiceAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetServiceAccountRequest; - - /** - * Creates a GetServiceAccountRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetServiceAccountRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetServiceAccountRequest; - - /** - * Creates a plain object from a GetServiceAccountRequest message. Also converts values to other types if specified. - * @param message GetServiceAccountRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetServiceAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetServiceAccountRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetServiceAccountRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetServiceAccountResponse. */ - interface IGetServiceAccountResponse { - - /** The service account retrieved. */ - serviceAccount?: (temporal.api.cloud.identity.v1.IServiceAccount|null); - } - - /** Represents a GetServiceAccountResponse. */ - class GetServiceAccountResponse implements IGetServiceAccountResponse { - - /** - * Constructs a new GetServiceAccountResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetServiceAccountResponse); - - /** The service account retrieved. */ - public serviceAccount?: (temporal.api.cloud.identity.v1.IServiceAccount|null); - - /** - * Creates a new GetServiceAccountResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetServiceAccountResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetServiceAccountResponse): temporal.api.cloud.cloudservice.v1.GetServiceAccountResponse; - - /** - * Encodes the specified GetServiceAccountResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetServiceAccountResponse.verify|verify} messages. - * @param message GetServiceAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetServiceAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetServiceAccountResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetServiceAccountResponse.verify|verify} messages. - * @param message GetServiceAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetServiceAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetServiceAccountResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetServiceAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetServiceAccountResponse; - - /** - * Decodes a GetServiceAccountResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetServiceAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetServiceAccountResponse; - - /** - * Creates a GetServiceAccountResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetServiceAccountResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetServiceAccountResponse; - - /** - * Creates a plain object from a GetServiceAccountResponse message. Also converts values to other types if specified. - * @param message GetServiceAccountResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetServiceAccountResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetServiceAccountResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetServiceAccountResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetServiceAccountsRequest. */ - interface IGetServiceAccountsRequest { - - /** - * The requested size of the page to retrieve - optional. - * Cannot exceed 1000. Defaults to 100. - */ - pageSize?: (number|null); - - /** The page token if this is continuing from another response - optional. */ - pageToken?: (string|null); - } - - /** Represents a GetServiceAccountsRequest. */ - class GetServiceAccountsRequest implements IGetServiceAccountsRequest { - - /** - * Constructs a new GetServiceAccountsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetServiceAccountsRequest); - - /** - * The requested size of the page to retrieve - optional. - * Cannot exceed 1000. Defaults to 100. - */ - public pageSize: number; - - /** The page token if this is continuing from another response - optional. */ - public pageToken: string; - - /** - * Creates a new GetServiceAccountsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetServiceAccountsRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetServiceAccountsRequest): temporal.api.cloud.cloudservice.v1.GetServiceAccountsRequest; - - /** - * Encodes the specified GetServiceAccountsRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetServiceAccountsRequest.verify|verify} messages. - * @param message GetServiceAccountsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetServiceAccountsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetServiceAccountsRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetServiceAccountsRequest.verify|verify} messages. - * @param message GetServiceAccountsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetServiceAccountsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetServiceAccountsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetServiceAccountsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetServiceAccountsRequest; - - /** - * Decodes a GetServiceAccountsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetServiceAccountsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetServiceAccountsRequest; - - /** - * Creates a GetServiceAccountsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetServiceAccountsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetServiceAccountsRequest; - - /** - * Creates a plain object from a GetServiceAccountsRequest message. Also converts values to other types if specified. - * @param message GetServiceAccountsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetServiceAccountsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetServiceAccountsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetServiceAccountsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetServiceAccountsResponse. */ - interface IGetServiceAccountsResponse { - - /** The list of service accounts in ascending ID order. */ - serviceAccount?: (temporal.api.cloud.identity.v1.IServiceAccount[]|null); - - /** The next page token, set if there is another page. */ - nextPageToken?: (string|null); - } - - /** Represents a GetServiceAccountsResponse. */ - class GetServiceAccountsResponse implements IGetServiceAccountsResponse { - - /** - * Constructs a new GetServiceAccountsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetServiceAccountsResponse); - - /** The list of service accounts in ascending ID order. */ - public serviceAccount: temporal.api.cloud.identity.v1.IServiceAccount[]; - - /** The next page token, set if there is another page. */ - public nextPageToken: string; - - /** - * Creates a new GetServiceAccountsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetServiceAccountsResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetServiceAccountsResponse): temporal.api.cloud.cloudservice.v1.GetServiceAccountsResponse; - - /** - * Encodes the specified GetServiceAccountsResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetServiceAccountsResponse.verify|verify} messages. - * @param message GetServiceAccountsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetServiceAccountsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetServiceAccountsResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetServiceAccountsResponse.verify|verify} messages. - * @param message GetServiceAccountsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetServiceAccountsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetServiceAccountsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetServiceAccountsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetServiceAccountsResponse; - - /** - * Decodes a GetServiceAccountsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetServiceAccountsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetServiceAccountsResponse; - - /** - * Creates a GetServiceAccountsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetServiceAccountsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetServiceAccountsResponse; - - /** - * Creates a plain object from a GetServiceAccountsResponse message. Also converts values to other types if specified. - * @param message GetServiceAccountsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetServiceAccountsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetServiceAccountsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetServiceAccountsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateServiceAccountRequest. */ - interface IUpdateServiceAccountRequest { - - /** The ID of the service account to update. */ - serviceAccountId?: (string|null); - - /** The new service account specification. */ - spec?: (temporal.api.cloud.identity.v1.IServiceAccountSpec|null); - - /** - * The version of the service account for which this update is intended for. - * The latest version can be found in the GetServiceAccount response. - */ - resourceVersion?: (string|null); - - /** The ID to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents an UpdateServiceAccountRequest. */ - class UpdateServiceAccountRequest implements IUpdateServiceAccountRequest { - - /** - * Constructs a new UpdateServiceAccountRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateServiceAccountRequest); - - /** The ID of the service account to update. */ - public serviceAccountId: string; - - /** The new service account specification. */ - public spec?: (temporal.api.cloud.identity.v1.IServiceAccountSpec|null); - - /** - * The version of the service account for which this update is intended for. - * The latest version can be found in the GetServiceAccount response. - */ - public resourceVersion: string; - - /** The ID to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new UpdateServiceAccountRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateServiceAccountRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateServiceAccountRequest): temporal.api.cloud.cloudservice.v1.UpdateServiceAccountRequest; - - /** - * Encodes the specified UpdateServiceAccountRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateServiceAccountRequest.verify|verify} messages. - * @param message UpdateServiceAccountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateServiceAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateServiceAccountRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateServiceAccountRequest.verify|verify} messages. - * @param message UpdateServiceAccountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateServiceAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateServiceAccountRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateServiceAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateServiceAccountRequest; - - /** - * Decodes an UpdateServiceAccountRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateServiceAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateServiceAccountRequest; - - /** - * Creates an UpdateServiceAccountRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateServiceAccountRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateServiceAccountRequest; - - /** - * Creates a plain object from an UpdateServiceAccountRequest message. Also converts values to other types if specified. - * @param message UpdateServiceAccountRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateServiceAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateServiceAccountRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateServiceAccountRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateServiceAccountResponse. */ - interface IUpdateServiceAccountResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents an UpdateServiceAccountResponse. */ - class UpdateServiceAccountResponse implements IUpdateServiceAccountResponse { - - /** - * Constructs a new UpdateServiceAccountResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateServiceAccountResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new UpdateServiceAccountResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateServiceAccountResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateServiceAccountResponse): temporal.api.cloud.cloudservice.v1.UpdateServiceAccountResponse; - - /** - * Encodes the specified UpdateServiceAccountResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateServiceAccountResponse.verify|verify} messages. - * @param message UpdateServiceAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateServiceAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateServiceAccountResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateServiceAccountResponse.verify|verify} messages. - * @param message UpdateServiceAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateServiceAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateServiceAccountResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateServiceAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateServiceAccountResponse; - - /** - * Decodes an UpdateServiceAccountResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateServiceAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateServiceAccountResponse; - - /** - * Creates an UpdateServiceAccountResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateServiceAccountResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateServiceAccountResponse; - - /** - * Creates a plain object from an UpdateServiceAccountResponse message. Also converts values to other types if specified. - * @param message UpdateServiceAccountResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateServiceAccountResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateServiceAccountResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateServiceAccountResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetServiceAccountNamespaceAccessRequest. */ - interface ISetServiceAccountNamespaceAccessRequest { - - /** The ID of the service account to update. */ - serviceAccountId?: (string|null); - - /** The namespace to set permissions for. */ - namespace?: (string|null); - - /** The namespace access to assign the service account. */ - access?: (temporal.api.cloud.identity.v1.INamespaceAccess|null); - - /** - * The version of the service account for which this update is intended for. - * The latest version can be found in the GetServiceAccount response. - */ - resourceVersion?: (string|null); - - /** The ID to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents a SetServiceAccountNamespaceAccessRequest. */ - class SetServiceAccountNamespaceAccessRequest implements ISetServiceAccountNamespaceAccessRequest { - - /** - * Constructs a new SetServiceAccountNamespaceAccessRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ISetServiceAccountNamespaceAccessRequest); - - /** The ID of the service account to update. */ - public serviceAccountId: string; - - /** The namespace to set permissions for. */ - public namespace: string; - - /** The namespace access to assign the service account. */ - public access?: (temporal.api.cloud.identity.v1.INamespaceAccess|null); - - /** - * The version of the service account for which this update is intended for. - * The latest version can be found in the GetServiceAccount response. - */ - public resourceVersion: string; - - /** The ID to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new SetServiceAccountNamespaceAccessRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetServiceAccountNamespaceAccessRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ISetServiceAccountNamespaceAccessRequest): temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessRequest; - - /** - * Encodes the specified SetServiceAccountNamespaceAccessRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessRequest.verify|verify} messages. - * @param message SetServiceAccountNamespaceAccessRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ISetServiceAccountNamespaceAccessRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetServiceAccountNamespaceAccessRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessRequest.verify|verify} messages. - * @param message SetServiceAccountNamespaceAccessRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ISetServiceAccountNamespaceAccessRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetServiceAccountNamespaceAccessRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetServiceAccountNamespaceAccessRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessRequest; - - /** - * Decodes a SetServiceAccountNamespaceAccessRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetServiceAccountNamespaceAccessRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessRequest; - - /** - * Creates a SetServiceAccountNamespaceAccessRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetServiceAccountNamespaceAccessRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessRequest; - - /** - * Creates a plain object from a SetServiceAccountNamespaceAccessRequest message. Also converts values to other types if specified. - * @param message SetServiceAccountNamespaceAccessRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetServiceAccountNamespaceAccessRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetServiceAccountNamespaceAccessRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetServiceAccountNamespaceAccessResponse. */ - interface ISetServiceAccountNamespaceAccessResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a SetServiceAccountNamespaceAccessResponse. */ - class SetServiceAccountNamespaceAccessResponse implements ISetServiceAccountNamespaceAccessResponse { - - /** - * Constructs a new SetServiceAccountNamespaceAccessResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ISetServiceAccountNamespaceAccessResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new SetServiceAccountNamespaceAccessResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SetServiceAccountNamespaceAccessResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ISetServiceAccountNamespaceAccessResponse): temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessResponse; - - /** - * Encodes the specified SetServiceAccountNamespaceAccessResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessResponse.verify|verify} messages. - * @param message SetServiceAccountNamespaceAccessResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ISetServiceAccountNamespaceAccessResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetServiceAccountNamespaceAccessResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessResponse.verify|verify} messages. - * @param message SetServiceAccountNamespaceAccessResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ISetServiceAccountNamespaceAccessResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetServiceAccountNamespaceAccessResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetServiceAccountNamespaceAccessResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessResponse; - - /** - * Decodes a SetServiceAccountNamespaceAccessResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetServiceAccountNamespaceAccessResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessResponse; - - /** - * Creates a SetServiceAccountNamespaceAccessResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetServiceAccountNamespaceAccessResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessResponse; - - /** - * Creates a plain object from a SetServiceAccountNamespaceAccessResponse message. Also converts values to other types if specified. - * @param message SetServiceAccountNamespaceAccessResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetServiceAccountNamespaceAccessResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetServiceAccountNamespaceAccessResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteServiceAccountRequest. */ - interface IDeleteServiceAccountRequest { - - /** The ID of the service account to delete; */ - serviceAccountId?: (string|null); - - /** - * The version of the service account for which this update is intended for. - * The latest version can be found in the GetServiceAccount response. - */ - resourceVersion?: (string|null); - - /** The ID to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents a DeleteServiceAccountRequest. */ - class DeleteServiceAccountRequest implements IDeleteServiceAccountRequest { - - /** - * Constructs a new DeleteServiceAccountRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteServiceAccountRequest); - - /** The ID of the service account to delete; */ - public serviceAccountId: string; - - /** - * The version of the service account for which this update is intended for. - * The latest version can be found in the GetServiceAccount response. - */ - public resourceVersion: string; - - /** The ID to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new DeleteServiceAccountRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteServiceAccountRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteServiceAccountRequest): temporal.api.cloud.cloudservice.v1.DeleteServiceAccountRequest; - - /** - * Encodes the specified DeleteServiceAccountRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteServiceAccountRequest.verify|verify} messages. - * @param message DeleteServiceAccountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteServiceAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteServiceAccountRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteServiceAccountRequest.verify|verify} messages. - * @param message DeleteServiceAccountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteServiceAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteServiceAccountRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteServiceAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteServiceAccountRequest; - - /** - * Decodes a DeleteServiceAccountRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteServiceAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteServiceAccountRequest; - - /** - * Creates a DeleteServiceAccountRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteServiceAccountRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteServiceAccountRequest; - - /** - * Creates a plain object from a DeleteServiceAccountRequest message. Also converts values to other types if specified. - * @param message DeleteServiceAccountRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteServiceAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteServiceAccountRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteServiceAccountRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteServiceAccountResponse. */ - interface IDeleteServiceAccountResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a DeleteServiceAccountResponse. */ - class DeleteServiceAccountResponse implements IDeleteServiceAccountResponse { - - /** - * Constructs a new DeleteServiceAccountResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteServiceAccountResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new DeleteServiceAccountResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteServiceAccountResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteServiceAccountResponse): temporal.api.cloud.cloudservice.v1.DeleteServiceAccountResponse; - - /** - * Encodes the specified DeleteServiceAccountResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteServiceAccountResponse.verify|verify} messages. - * @param message DeleteServiceAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteServiceAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteServiceAccountResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteServiceAccountResponse.verify|verify} messages. - * @param message DeleteServiceAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteServiceAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteServiceAccountResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteServiceAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteServiceAccountResponse; - - /** - * Decodes a DeleteServiceAccountResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteServiceAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteServiceAccountResponse; - - /** - * Creates a DeleteServiceAccountResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteServiceAccountResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteServiceAccountResponse; - - /** - * Creates a plain object from a DeleteServiceAccountResponse message. Also converts values to other types if specified. - * @param message DeleteServiceAccountResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteServiceAccountResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteServiceAccountResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteServiceAccountResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUsageRequest. */ - interface IGetUsageRequest { - - /** - * Filter for UTC time >= - optional. - * Defaults to: start of the current month. - * Must be: within the last 90 days from the current date. - * Must be: midnight UTC time. - */ - startTimeInclusive?: (google.protobuf.ITimestamp|null); - - /** - * Filter for UTC time < - optional. - * Defaults to: start of the next UTC day. - * Must be: within the last 90 days from the current date. - * Must be: midnight UTC time. - */ - endTimeExclusive?: (google.protobuf.ITimestamp|null); - - /** - * The requested size of the page to retrieve - optional. - * Each count corresponds to a single object - per day per namespace - * Cannot exceed 1000. Defaults to 100. - */ - pageSize?: (number|null); - - /** The page token if this is continuing from another response - optional. */ - pageToken?: (string|null); - } - - /** Represents a GetUsageRequest. */ - class GetUsageRequest implements IGetUsageRequest { - - /** - * Constructs a new GetUsageRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetUsageRequest); - - /** - * Filter for UTC time >= - optional. - * Defaults to: start of the current month. - * Must be: within the last 90 days from the current date. - * Must be: midnight UTC time. - */ - public startTimeInclusive?: (google.protobuf.ITimestamp|null); - - /** - * Filter for UTC time < - optional. - * Defaults to: start of the next UTC day. - * Must be: within the last 90 days from the current date. - * Must be: midnight UTC time. - */ - public endTimeExclusive?: (google.protobuf.ITimestamp|null); - - /** - * The requested size of the page to retrieve - optional. - * Each count corresponds to a single object - per day per namespace - * Cannot exceed 1000. Defaults to 100. - */ - public pageSize: number; - - /** The page token if this is continuing from another response - optional. */ - public pageToken: string; - - /** - * Creates a new GetUsageRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUsageRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetUsageRequest): temporal.api.cloud.cloudservice.v1.GetUsageRequest; - - /** - * Encodes the specified GetUsageRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUsageRequest.verify|verify} messages. - * @param message GetUsageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetUsageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUsageRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUsageRequest.verify|verify} messages. - * @param message GetUsageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetUsageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUsageRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUsageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetUsageRequest; - - /** - * Decodes a GetUsageRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUsageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetUsageRequest; - - /** - * Creates a GetUsageRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUsageRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetUsageRequest; - - /** - * Creates a plain object from a GetUsageRequest message. Also converts values to other types if specified. - * @param message GetUsageRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetUsageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUsageRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUsageRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUsageResponse. */ - interface IGetUsageResponse { - - /** - * The list of data based on granularity (per Day for now) - * Ordered by: time range in ascending order - */ - summaries?: (temporal.api.cloud.usage.v1.ISummary[]|null); - - /** The next page's token. */ - nextPageToken?: (string|null); - } - - /** Represents a GetUsageResponse. */ - class GetUsageResponse implements IGetUsageResponse { - - /** - * Constructs a new GetUsageResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetUsageResponse); - - /** - * The list of data based on granularity (per Day for now) - * Ordered by: time range in ascending order - */ - public summaries: temporal.api.cloud.usage.v1.ISummary[]; - - /** The next page's token. */ - public nextPageToken: string; - - /** - * Creates a new GetUsageResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUsageResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetUsageResponse): temporal.api.cloud.cloudservice.v1.GetUsageResponse; - - /** - * Encodes the specified GetUsageResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUsageResponse.verify|verify} messages. - * @param message GetUsageResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetUsageResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUsageResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetUsageResponse.verify|verify} messages. - * @param message GetUsageResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetUsageResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUsageResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUsageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetUsageResponse; - - /** - * Decodes a GetUsageResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUsageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetUsageResponse; - - /** - * Creates a GetUsageResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUsageResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetUsageResponse; - - /** - * Creates a plain object from a GetUsageResponse message. Also converts values to other types if specified. - * @param message GetUsageResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetUsageResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUsageResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUsageResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetAccountRequest. */ - interface IGetAccountRequest { - } - - /** Represents a GetAccountRequest. */ - class GetAccountRequest implements IGetAccountRequest { - - /** - * Constructs a new GetAccountRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetAccountRequest); - - /** - * Creates a new GetAccountRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetAccountRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetAccountRequest): temporal.api.cloud.cloudservice.v1.GetAccountRequest; - - /** - * Encodes the specified GetAccountRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetAccountRequest.verify|verify} messages. - * @param message GetAccountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetAccountRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetAccountRequest.verify|verify} messages. - * @param message GetAccountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetAccountRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetAccountRequest; - - /** - * Decodes a GetAccountRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetAccountRequest; - - /** - * Creates a GetAccountRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetAccountRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetAccountRequest; - - /** - * Creates a plain object from a GetAccountRequest message. Also converts values to other types if specified. - * @param message GetAccountRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetAccountRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetAccountRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetAccountResponse. */ - interface IGetAccountResponse { - - /** The account. */ - account?: (temporal.api.cloud.account.v1.IAccount|null); - } - - /** Represents a GetAccountResponse. */ - class GetAccountResponse implements IGetAccountResponse { - - /** - * Constructs a new GetAccountResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetAccountResponse); - - /** The account. */ - public account?: (temporal.api.cloud.account.v1.IAccount|null); - - /** - * Creates a new GetAccountResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetAccountResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetAccountResponse): temporal.api.cloud.cloudservice.v1.GetAccountResponse; - - /** - * Encodes the specified GetAccountResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetAccountResponse.verify|verify} messages. - * @param message GetAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetAccountResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetAccountResponse.verify|verify} messages. - * @param message GetAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetAccountResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetAccountResponse; - - /** - * Decodes a GetAccountResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetAccountResponse; - - /** - * Creates a GetAccountResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetAccountResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetAccountResponse; - - /** - * Creates a plain object from a GetAccountResponse message. Also converts values to other types if specified. - * @param message GetAccountResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetAccountResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetAccountResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetAccountResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateAccountRequest. */ - interface IUpdateAccountRequest { - - /** The updated account specification to apply. */ - spec?: (temporal.api.cloud.account.v1.IAccountSpec|null); - - /** - * The version of the account for which this update is intended for. - * The latest version can be found in the GetAccount operation response. - */ - resourceVersion?: (string|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - asyncOperationId?: (string|null); - } - - /** Represents an UpdateAccountRequest. */ - class UpdateAccountRequest implements IUpdateAccountRequest { - - /** - * Constructs a new UpdateAccountRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateAccountRequest); - - /** The updated account specification to apply. */ - public spec?: (temporal.api.cloud.account.v1.IAccountSpec|null); - - /** - * The version of the account for which this update is intended for. - * The latest version can be found in the GetAccount operation response. - */ - public resourceVersion: string; - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - public asyncOperationId: string; - - /** - * Creates a new UpdateAccountRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateAccountRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateAccountRequest): temporal.api.cloud.cloudservice.v1.UpdateAccountRequest; - - /** - * Encodes the specified UpdateAccountRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateAccountRequest.verify|verify} messages. - * @param message UpdateAccountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateAccountRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateAccountRequest.verify|verify} messages. - * @param message UpdateAccountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateAccountRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateAccountRequest; - - /** - * Decodes an UpdateAccountRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateAccountRequest; - - /** - * Creates an UpdateAccountRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateAccountRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateAccountRequest; - - /** - * Creates a plain object from an UpdateAccountRequest message. Also converts values to other types if specified. - * @param message UpdateAccountRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateAccountRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateAccountRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateAccountResponse. */ - interface IUpdateAccountResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents an UpdateAccountResponse. */ - class UpdateAccountResponse implements IUpdateAccountResponse { - - /** - * Constructs a new UpdateAccountResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateAccountResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new UpdateAccountResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateAccountResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateAccountResponse): temporal.api.cloud.cloudservice.v1.UpdateAccountResponse; - - /** - * Encodes the specified UpdateAccountResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateAccountResponse.verify|verify} messages. - * @param message UpdateAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateAccountResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateAccountResponse.verify|verify} messages. - * @param message UpdateAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateAccountResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateAccountResponse; - - /** - * Decodes an UpdateAccountResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateAccountResponse; - - /** - * Creates an UpdateAccountResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateAccountResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateAccountResponse; - - /** - * Creates a plain object from an UpdateAccountResponse message. Also converts values to other types if specified. - * @param message UpdateAccountResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateAccountResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateAccountResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateAccountResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateNamespaceExportSinkRequest. */ - interface ICreateNamespaceExportSinkRequest { - - /** The namespace under which the sink is configured. */ - namespace?: (string|null); - - /** The specification for the export sink. */ - spec?: (temporal.api.cloud.namespace.v1.IExportSinkSpec|null); - - /** Optional. The ID to use for this async operation. */ - asyncOperationId?: (string|null); - } - - /** Represents a CreateNamespaceExportSinkRequest. */ - class CreateNamespaceExportSinkRequest implements ICreateNamespaceExportSinkRequest { - - /** - * Constructs a new CreateNamespaceExportSinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateNamespaceExportSinkRequest); - - /** The namespace under which the sink is configured. */ - public namespace: string; - - /** The specification for the export sink. */ - public spec?: (temporal.api.cloud.namespace.v1.IExportSinkSpec|null); - - /** Optional. The ID to use for this async operation. */ - public asyncOperationId: string; - - /** - * Creates a new CreateNamespaceExportSinkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateNamespaceExportSinkRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateNamespaceExportSinkRequest): temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkRequest; - - /** - * Encodes the specified CreateNamespaceExportSinkRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkRequest.verify|verify} messages. - * @param message CreateNamespaceExportSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateNamespaceExportSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateNamespaceExportSinkRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkRequest.verify|verify} messages. - * @param message CreateNamespaceExportSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateNamespaceExportSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateNamespaceExportSinkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateNamespaceExportSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkRequest; - - /** - * Decodes a CreateNamespaceExportSinkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateNamespaceExportSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkRequest; - - /** - * Creates a CreateNamespaceExportSinkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateNamespaceExportSinkRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkRequest; - - /** - * Creates a plain object from a CreateNamespaceExportSinkRequest message. Also converts values to other types if specified. - * @param message CreateNamespaceExportSinkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateNamespaceExportSinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateNamespaceExportSinkRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateNamespaceExportSinkResponse. */ - interface ICreateNamespaceExportSinkResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a CreateNamespaceExportSinkResponse. */ - class CreateNamespaceExportSinkResponse implements ICreateNamespaceExportSinkResponse { - - /** - * Constructs a new CreateNamespaceExportSinkResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateNamespaceExportSinkResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new CreateNamespaceExportSinkResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateNamespaceExportSinkResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateNamespaceExportSinkResponse): temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkResponse; - - /** - * Encodes the specified CreateNamespaceExportSinkResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkResponse.verify|verify} messages. - * @param message CreateNamespaceExportSinkResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateNamespaceExportSinkResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateNamespaceExportSinkResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkResponse.verify|verify} messages. - * @param message CreateNamespaceExportSinkResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateNamespaceExportSinkResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateNamespaceExportSinkResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateNamespaceExportSinkResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkResponse; - - /** - * Decodes a CreateNamespaceExportSinkResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateNamespaceExportSinkResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkResponse; - - /** - * Creates a CreateNamespaceExportSinkResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateNamespaceExportSinkResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkResponse; - - /** - * Creates a plain object from a CreateNamespaceExportSinkResponse message. Also converts values to other types if specified. - * @param message CreateNamespaceExportSinkResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateNamespaceExportSinkResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateNamespaceExportSinkResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNamespaceExportSinkRequest. */ - interface IGetNamespaceExportSinkRequest { - - /** The namespace to which the sink belongs. */ - namespace?: (string|null); - - /** The name of the sink to retrieve. */ - name?: (string|null); - } - - /** Represents a GetNamespaceExportSinkRequest. */ - class GetNamespaceExportSinkRequest implements IGetNamespaceExportSinkRequest { - - /** - * Constructs a new GetNamespaceExportSinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinkRequest); - - /** The namespace to which the sink belongs. */ - public namespace: string; - - /** The name of the sink to retrieve. */ - public name: string; - - /** - * Creates a new GetNamespaceExportSinkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNamespaceExportSinkRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinkRequest): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkRequest; - - /** - * Encodes the specified GetNamespaceExportSinkRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkRequest.verify|verify} messages. - * @param message GetNamespaceExportSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNamespaceExportSinkRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkRequest.verify|verify} messages. - * @param message GetNamespaceExportSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNamespaceExportSinkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNamespaceExportSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkRequest; - - /** - * Decodes a GetNamespaceExportSinkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNamespaceExportSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkRequest; - - /** - * Creates a GetNamespaceExportSinkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNamespaceExportSinkRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkRequest; - - /** - * Creates a plain object from a GetNamespaceExportSinkRequest message. Also converts values to other types if specified. - * @param message GetNamespaceExportSinkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNamespaceExportSinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNamespaceExportSinkRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNamespaceExportSinkResponse. */ - interface IGetNamespaceExportSinkResponse { - - /** The export sink retrieved. */ - sink?: (temporal.api.cloud.namespace.v1.IExportSink|null); - } - - /** Represents a GetNamespaceExportSinkResponse. */ - class GetNamespaceExportSinkResponse implements IGetNamespaceExportSinkResponse { - - /** - * Constructs a new GetNamespaceExportSinkResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinkResponse); - - /** The export sink retrieved. */ - public sink?: (temporal.api.cloud.namespace.v1.IExportSink|null); - - /** - * Creates a new GetNamespaceExportSinkResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNamespaceExportSinkResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinkResponse): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkResponse; - - /** - * Encodes the specified GetNamespaceExportSinkResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkResponse.verify|verify} messages. - * @param message GetNamespaceExportSinkResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinkResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNamespaceExportSinkResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkResponse.verify|verify} messages. - * @param message GetNamespaceExportSinkResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinkResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNamespaceExportSinkResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNamespaceExportSinkResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkResponse; - - /** - * Decodes a GetNamespaceExportSinkResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNamespaceExportSinkResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkResponse; - - /** - * Creates a GetNamespaceExportSinkResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNamespaceExportSinkResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkResponse; - - /** - * Creates a plain object from a GetNamespaceExportSinkResponse message. Also converts values to other types if specified. - * @param message GetNamespaceExportSinkResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNamespaceExportSinkResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNamespaceExportSinkResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNamespaceExportSinksRequest. */ - interface IGetNamespaceExportSinksRequest { - - /** The namespace to which the sinks belong. */ - namespace?: (string|null); - - /** - * The requested size of the page to retrieve. Cannot exceed 1000. - * Defaults to 100 if not specified. - */ - pageSize?: (number|null); - - /** The page token if this is continuing from another response - optional. */ - pageToken?: (string|null); - } - - /** Represents a GetNamespaceExportSinksRequest. */ - class GetNamespaceExportSinksRequest implements IGetNamespaceExportSinksRequest { - - /** - * Constructs a new GetNamespaceExportSinksRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinksRequest); - - /** The namespace to which the sinks belong. */ - public namespace: string; - - /** - * The requested size of the page to retrieve. Cannot exceed 1000. - * Defaults to 100 if not specified. - */ - public pageSize: number; - - /** The page token if this is continuing from another response - optional. */ - public pageToken: string; - - /** - * Creates a new GetNamespaceExportSinksRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNamespaceExportSinksRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinksRequest): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksRequest; - - /** - * Encodes the specified GetNamespaceExportSinksRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksRequest.verify|verify} messages. - * @param message GetNamespaceExportSinksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNamespaceExportSinksRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksRequest.verify|verify} messages. - * @param message GetNamespaceExportSinksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNamespaceExportSinksRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNamespaceExportSinksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksRequest; - - /** - * Decodes a GetNamespaceExportSinksRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNamespaceExportSinksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksRequest; - - /** - * Creates a GetNamespaceExportSinksRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNamespaceExportSinksRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksRequest; - - /** - * Creates a plain object from a GetNamespaceExportSinksRequest message. Also converts values to other types if specified. - * @param message GetNamespaceExportSinksRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNamespaceExportSinksRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNamespaceExportSinksRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNamespaceExportSinksResponse. */ - interface IGetNamespaceExportSinksResponse { - - /** The list of export sinks retrieved. */ - sinks?: (temporal.api.cloud.namespace.v1.IExportSink[]|null); - - /** The next page token, set if there is another page. */ - nextPageToken?: (string|null); - } - - /** Represents a GetNamespaceExportSinksResponse. */ - class GetNamespaceExportSinksResponse implements IGetNamespaceExportSinksResponse { - - /** - * Constructs a new GetNamespaceExportSinksResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinksResponse); - - /** The list of export sinks retrieved. */ - public sinks: temporal.api.cloud.namespace.v1.IExportSink[]; - - /** The next page token, set if there is another page. */ - public nextPageToken: string; - - /** - * Creates a new GetNamespaceExportSinksResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNamespaceExportSinksResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinksResponse): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksResponse; - - /** - * Encodes the specified GetNamespaceExportSinksResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksResponse.verify|verify} messages. - * @param message GetNamespaceExportSinksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNamespaceExportSinksResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksResponse.verify|verify} messages. - * @param message GetNamespaceExportSinksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetNamespaceExportSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNamespaceExportSinksResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNamespaceExportSinksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksResponse; - - /** - * Decodes a GetNamespaceExportSinksResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNamespaceExportSinksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksResponse; - - /** - * Creates a GetNamespaceExportSinksResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNamespaceExportSinksResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksResponse; - - /** - * Creates a plain object from a GetNamespaceExportSinksResponse message. Also converts values to other types if specified. - * @param message GetNamespaceExportSinksResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNamespaceExportSinksResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNamespaceExportSinksResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNamespaceExportSinkRequest. */ - interface IUpdateNamespaceExportSinkRequest { - - /** The namespace to which the sink belongs. */ - namespace?: (string|null); - - /** The updated export sink specification. */ - spec?: (temporal.api.cloud.namespace.v1.IExportSinkSpec|null); - - /** - * The version of the sink to update. The latest version can be - * retrieved using the GetNamespaceExportSink call. - */ - resourceVersion?: (string|null); - - /** The ID to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents an UpdateNamespaceExportSinkRequest. */ - class UpdateNamespaceExportSinkRequest implements IUpdateNamespaceExportSinkRequest { - - /** - * Constructs a new UpdateNamespaceExportSinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceExportSinkRequest); - - /** The namespace to which the sink belongs. */ - public namespace: string; - - /** The updated export sink specification. */ - public spec?: (temporal.api.cloud.namespace.v1.IExportSinkSpec|null); - - /** - * The version of the sink to update. The latest version can be - * retrieved using the GetNamespaceExportSink call. - */ - public resourceVersion: string; - - /** The ID to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new UpdateNamespaceExportSinkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNamespaceExportSinkRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceExportSinkRequest): temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkRequest; - - /** - * Encodes the specified UpdateNamespaceExportSinkRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkRequest.verify|verify} messages. - * @param message UpdateNamespaceExportSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceExportSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNamespaceExportSinkRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkRequest.verify|verify} messages. - * @param message UpdateNamespaceExportSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceExportSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNamespaceExportSinkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNamespaceExportSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkRequest; - - /** - * Decodes an UpdateNamespaceExportSinkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNamespaceExportSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkRequest; - - /** - * Creates an UpdateNamespaceExportSinkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNamespaceExportSinkRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkRequest; - - /** - * Creates a plain object from an UpdateNamespaceExportSinkRequest message. Also converts values to other types if specified. - * @param message UpdateNamespaceExportSinkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNamespaceExportSinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNamespaceExportSinkRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNamespaceExportSinkResponse. */ - interface IUpdateNamespaceExportSinkResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents an UpdateNamespaceExportSinkResponse. */ - class UpdateNamespaceExportSinkResponse implements IUpdateNamespaceExportSinkResponse { - - /** - * Constructs a new UpdateNamespaceExportSinkResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceExportSinkResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new UpdateNamespaceExportSinkResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNamespaceExportSinkResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceExportSinkResponse): temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkResponse; - - /** - * Encodes the specified UpdateNamespaceExportSinkResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkResponse.verify|verify} messages. - * @param message UpdateNamespaceExportSinkResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceExportSinkResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNamespaceExportSinkResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkResponse.verify|verify} messages. - * @param message UpdateNamespaceExportSinkResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceExportSinkResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNamespaceExportSinkResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNamespaceExportSinkResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkResponse; - - /** - * Decodes an UpdateNamespaceExportSinkResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNamespaceExportSinkResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkResponse; - - /** - * Creates an UpdateNamespaceExportSinkResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNamespaceExportSinkResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkResponse; - - /** - * Creates a plain object from an UpdateNamespaceExportSinkResponse message. Also converts values to other types if specified. - * @param message UpdateNamespaceExportSinkResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNamespaceExportSinkResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNamespaceExportSinkResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteNamespaceExportSinkRequest. */ - interface IDeleteNamespaceExportSinkRequest { - - /** The namespace to which the sink belongs. */ - namespace?: (string|null); - - /** The name of the sink to delete. */ - name?: (string|null); - - /** - * The version of the sink to delete. The latest version can be - * retrieved using the GetNamespaceExportSink call. - */ - resourceVersion?: (string|null); - - /** The ID to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents a DeleteNamespaceExportSinkRequest. */ - class DeleteNamespaceExportSinkRequest implements IDeleteNamespaceExportSinkRequest { - - /** - * Constructs a new DeleteNamespaceExportSinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceExportSinkRequest); - - /** The namespace to which the sink belongs. */ - public namespace: string; - - /** The name of the sink to delete. */ - public name: string; - - /** - * The version of the sink to delete. The latest version can be - * retrieved using the GetNamespaceExportSink call. - */ - public resourceVersion: string; - - /** The ID to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new DeleteNamespaceExportSinkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteNamespaceExportSinkRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceExportSinkRequest): temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkRequest; - - /** - * Encodes the specified DeleteNamespaceExportSinkRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkRequest.verify|verify} messages. - * @param message DeleteNamespaceExportSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceExportSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteNamespaceExportSinkRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkRequest.verify|verify} messages. - * @param message DeleteNamespaceExportSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceExportSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteNamespaceExportSinkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteNamespaceExportSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkRequest; - - /** - * Decodes a DeleteNamespaceExportSinkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteNamespaceExportSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkRequest; - - /** - * Creates a DeleteNamespaceExportSinkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteNamespaceExportSinkRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkRequest; - - /** - * Creates a plain object from a DeleteNamespaceExportSinkRequest message. Also converts values to other types if specified. - * @param message DeleteNamespaceExportSinkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteNamespaceExportSinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteNamespaceExportSinkRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteNamespaceExportSinkResponse. */ - interface IDeleteNamespaceExportSinkResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a DeleteNamespaceExportSinkResponse. */ - class DeleteNamespaceExportSinkResponse implements IDeleteNamespaceExportSinkResponse { - - /** - * Constructs a new DeleteNamespaceExportSinkResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceExportSinkResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new DeleteNamespaceExportSinkResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteNamespaceExportSinkResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceExportSinkResponse): temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkResponse; - - /** - * Encodes the specified DeleteNamespaceExportSinkResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkResponse.verify|verify} messages. - * @param message DeleteNamespaceExportSinkResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceExportSinkResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteNamespaceExportSinkResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkResponse.verify|verify} messages. - * @param message DeleteNamespaceExportSinkResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteNamespaceExportSinkResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteNamespaceExportSinkResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteNamespaceExportSinkResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkResponse; - - /** - * Decodes a DeleteNamespaceExportSinkResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteNamespaceExportSinkResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkResponse; - - /** - * Creates a DeleteNamespaceExportSinkResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteNamespaceExportSinkResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkResponse; - - /** - * Creates a plain object from a DeleteNamespaceExportSinkResponse message. Also converts values to other types if specified. - * @param message DeleteNamespaceExportSinkResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteNamespaceExportSinkResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteNamespaceExportSinkResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ValidateNamespaceExportSinkRequest. */ - interface IValidateNamespaceExportSinkRequest { - - /** The namespace to which the sink belongs. */ - namespace?: (string|null); - - /** The export sink specification to validate. */ - spec?: (temporal.api.cloud.namespace.v1.IExportSinkSpec|null); - } - - /** Represents a ValidateNamespaceExportSinkRequest. */ - class ValidateNamespaceExportSinkRequest implements IValidateNamespaceExportSinkRequest { - - /** - * Constructs a new ValidateNamespaceExportSinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IValidateNamespaceExportSinkRequest); - - /** The namespace to which the sink belongs. */ - public namespace: string; - - /** The export sink specification to validate. */ - public spec?: (temporal.api.cloud.namespace.v1.IExportSinkSpec|null); - - /** - * Creates a new ValidateNamespaceExportSinkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidateNamespaceExportSinkRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IValidateNamespaceExportSinkRequest): temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkRequest; - - /** - * Encodes the specified ValidateNamespaceExportSinkRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkRequest.verify|verify} messages. - * @param message ValidateNamespaceExportSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IValidateNamespaceExportSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidateNamespaceExportSinkRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkRequest.verify|verify} messages. - * @param message ValidateNamespaceExportSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IValidateNamespaceExportSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidateNamespaceExportSinkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidateNamespaceExportSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkRequest; - - /** - * Decodes a ValidateNamespaceExportSinkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidateNamespaceExportSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkRequest; - - /** - * Creates a ValidateNamespaceExportSinkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidateNamespaceExportSinkRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkRequest; - - /** - * Creates a plain object from a ValidateNamespaceExportSinkRequest message. Also converts values to other types if specified. - * @param message ValidateNamespaceExportSinkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidateNamespaceExportSinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidateNamespaceExportSinkRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ValidateNamespaceExportSinkResponse. */ - interface IValidateNamespaceExportSinkResponse { - } - - /** Represents a ValidateNamespaceExportSinkResponse. */ - class ValidateNamespaceExportSinkResponse implements IValidateNamespaceExportSinkResponse { - - /** - * Constructs a new ValidateNamespaceExportSinkResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IValidateNamespaceExportSinkResponse); - - /** - * Creates a new ValidateNamespaceExportSinkResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidateNamespaceExportSinkResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IValidateNamespaceExportSinkResponse): temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkResponse; - - /** - * Encodes the specified ValidateNamespaceExportSinkResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkResponse.verify|verify} messages. - * @param message ValidateNamespaceExportSinkResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IValidateNamespaceExportSinkResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidateNamespaceExportSinkResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkResponse.verify|verify} messages. - * @param message ValidateNamespaceExportSinkResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IValidateNamespaceExportSinkResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidateNamespaceExportSinkResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidateNamespaceExportSinkResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkResponse; - - /** - * Decodes a ValidateNamespaceExportSinkResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidateNamespaceExportSinkResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkResponse; - - /** - * Creates a ValidateNamespaceExportSinkResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidateNamespaceExportSinkResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkResponse; - - /** - * Creates a plain object from a ValidateNamespaceExportSinkResponse message. Also converts values to other types if specified. - * @param message ValidateNamespaceExportSinkResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidateNamespaceExportSinkResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidateNamespaceExportSinkResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNamespaceTagsRequest. */ - interface IUpdateNamespaceTagsRequest { - - /** The namespace to set tags for. */ - namespace?: (string|null); - - /** - * A list of tags to add or update. - * If a key of an existing tag is added, the tag's value is updated. - * At least one of tags_to_upsert or tags_to_remove must be specified. - */ - tagsToUpsert?: ({ [k: string]: string }|null); - - /** - * A list of tag keys to remove. - * If a tag key doesn't exist, it is silently ignored. - * At least one of tags_to_upsert or tags_to_remove must be specified. - */ - tagsToRemove?: (string[]|null); - - /** The id to use for this async operation - optional. */ - asyncOperationId?: (string|null); - } - - /** Represents an UpdateNamespaceTagsRequest. */ - class UpdateNamespaceTagsRequest implements IUpdateNamespaceTagsRequest { - - /** - * Constructs a new UpdateNamespaceTagsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceTagsRequest); - - /** The namespace to set tags for. */ - public namespace: string; - - /** - * A list of tags to add or update. - * If a key of an existing tag is added, the tag's value is updated. - * At least one of tags_to_upsert or tags_to_remove must be specified. - */ - public tagsToUpsert: { [k: string]: string }; - - /** - * A list of tag keys to remove. - * If a tag key doesn't exist, it is silently ignored. - * At least one of tags_to_upsert or tags_to_remove must be specified. - */ - public tagsToRemove: string[]; - - /** The id to use for this async operation - optional. */ - public asyncOperationId: string; - - /** - * Creates a new UpdateNamespaceTagsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNamespaceTagsRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceTagsRequest): temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsRequest; - - /** - * Encodes the specified UpdateNamespaceTagsRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsRequest.verify|verify} messages. - * @param message UpdateNamespaceTagsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNamespaceTagsRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsRequest.verify|verify} messages. - * @param message UpdateNamespaceTagsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNamespaceTagsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNamespaceTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsRequest; - - /** - * Decodes an UpdateNamespaceTagsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNamespaceTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsRequest; - - /** - * Creates an UpdateNamespaceTagsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNamespaceTagsRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsRequest; - - /** - * Creates a plain object from an UpdateNamespaceTagsRequest message. Also converts values to other types if specified. - * @param message UpdateNamespaceTagsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNamespaceTagsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNamespaceTagsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNamespaceTagsResponse. */ - interface IUpdateNamespaceTagsResponse { - - /** The async operation. */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents an UpdateNamespaceTagsResponse. */ - class UpdateNamespaceTagsResponse implements IUpdateNamespaceTagsResponse { - - /** - * Constructs a new UpdateNamespaceTagsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceTagsResponse); - - /** The async operation. */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new UpdateNamespaceTagsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNamespaceTagsResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceTagsResponse): temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsResponse; - - /** - * Encodes the specified UpdateNamespaceTagsResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsResponse.verify|verify} messages. - * @param message UpdateNamespaceTagsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNamespaceTagsResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsResponse.verify|verify} messages. - * @param message UpdateNamespaceTagsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IUpdateNamespaceTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNamespaceTagsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNamespaceTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsResponse; - - /** - * Decodes an UpdateNamespaceTagsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNamespaceTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsResponse; - - /** - * Creates an UpdateNamespaceTagsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNamespaceTagsResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsResponse; - - /** - * Creates a plain object from an UpdateNamespaceTagsResponse message. Also converts values to other types if specified. - * @param message UpdateNamespaceTagsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNamespaceTagsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNamespaceTagsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateConnectivityRuleRequest. */ - interface ICreateConnectivityRuleRequest { - - /** The connectivity rule specification. */ - spec?: (temporal.api.cloud.connectivityrule.v1.IConnectivityRuleSpec|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - asyncOperationId?: (string|null); - } - - /** Represents a CreateConnectivityRuleRequest. */ - class CreateConnectivityRuleRequest implements ICreateConnectivityRuleRequest { - - /** - * Constructs a new CreateConnectivityRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateConnectivityRuleRequest); - - /** The connectivity rule specification. */ - public spec?: (temporal.api.cloud.connectivityrule.v1.IConnectivityRuleSpec|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - public asyncOperationId: string; - - /** - * Creates a new CreateConnectivityRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateConnectivityRuleRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateConnectivityRuleRequest): temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleRequest; - - /** - * Encodes the specified CreateConnectivityRuleRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleRequest.verify|verify} messages. - * @param message CreateConnectivityRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateConnectivityRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateConnectivityRuleRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleRequest.verify|verify} messages. - * @param message CreateConnectivityRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateConnectivityRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateConnectivityRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateConnectivityRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleRequest; - - /** - * Decodes a CreateConnectivityRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateConnectivityRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleRequest; - - /** - * Creates a CreateConnectivityRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateConnectivityRuleRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleRequest; - - /** - * Creates a plain object from a CreateConnectivityRuleRequest message. Also converts values to other types if specified. - * @param message CreateConnectivityRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateConnectivityRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateConnectivityRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateConnectivityRuleResponse. */ - interface ICreateConnectivityRuleResponse { - - /** The id of the connectivity rule that was created. */ - connectivityRuleId?: (string|null); - - /** The async operation */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a CreateConnectivityRuleResponse. */ - class CreateConnectivityRuleResponse implements ICreateConnectivityRuleResponse { - - /** - * Constructs a new CreateConnectivityRuleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.ICreateConnectivityRuleResponse); - - /** The id of the connectivity rule that was created. */ - public connectivityRuleId: string; - - /** The async operation */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new CreateConnectivityRuleResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateConnectivityRuleResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.ICreateConnectivityRuleResponse): temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleResponse; - - /** - * Encodes the specified CreateConnectivityRuleResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleResponse.verify|verify} messages. - * @param message CreateConnectivityRuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.ICreateConnectivityRuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateConnectivityRuleResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleResponse.verify|verify} messages. - * @param message CreateConnectivityRuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.ICreateConnectivityRuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateConnectivityRuleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateConnectivityRuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleResponse; - - /** - * Decodes a CreateConnectivityRuleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateConnectivityRuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleResponse; - - /** - * Creates a CreateConnectivityRuleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateConnectivityRuleResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleResponse; - - /** - * Creates a plain object from a CreateConnectivityRuleResponse message. Also converts values to other types if specified. - * @param message CreateConnectivityRuleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateConnectivityRuleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateConnectivityRuleResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetConnectivityRuleRequest. */ - interface IGetConnectivityRuleRequest { - - /** The id of the connectivity rule to get. */ - connectivityRuleId?: (string|null); - } - - /** Represents a GetConnectivityRuleRequest. */ - class GetConnectivityRuleRequest implements IGetConnectivityRuleRequest { - - /** - * Constructs a new GetConnectivityRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetConnectivityRuleRequest); - - /** The id of the connectivity rule to get. */ - public connectivityRuleId: string; - - /** - * Creates a new GetConnectivityRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetConnectivityRuleRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetConnectivityRuleRequest): temporal.api.cloud.cloudservice.v1.GetConnectivityRuleRequest; - - /** - * Encodes the specified GetConnectivityRuleRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetConnectivityRuleRequest.verify|verify} messages. - * @param message GetConnectivityRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetConnectivityRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetConnectivityRuleRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetConnectivityRuleRequest.verify|verify} messages. - * @param message GetConnectivityRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetConnectivityRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetConnectivityRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetConnectivityRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetConnectivityRuleRequest; - - /** - * Decodes a GetConnectivityRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetConnectivityRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetConnectivityRuleRequest; - - /** - * Creates a GetConnectivityRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetConnectivityRuleRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetConnectivityRuleRequest; - - /** - * Creates a plain object from a GetConnectivityRuleRequest message. Also converts values to other types if specified. - * @param message GetConnectivityRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetConnectivityRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetConnectivityRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetConnectivityRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetConnectivityRuleResponse. */ - interface IGetConnectivityRuleResponse { - - /** GetConnectivityRuleResponse connectivityRule */ - connectivityRule?: (temporal.api.cloud.connectivityrule.v1.IConnectivityRule|null); - } - - /** Represents a GetConnectivityRuleResponse. */ - class GetConnectivityRuleResponse implements IGetConnectivityRuleResponse { - - /** - * Constructs a new GetConnectivityRuleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetConnectivityRuleResponse); - - /** GetConnectivityRuleResponse connectivityRule. */ - public connectivityRule?: (temporal.api.cloud.connectivityrule.v1.IConnectivityRule|null); - - /** - * Creates a new GetConnectivityRuleResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetConnectivityRuleResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetConnectivityRuleResponse): temporal.api.cloud.cloudservice.v1.GetConnectivityRuleResponse; - - /** - * Encodes the specified GetConnectivityRuleResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetConnectivityRuleResponse.verify|verify} messages. - * @param message GetConnectivityRuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetConnectivityRuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetConnectivityRuleResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetConnectivityRuleResponse.verify|verify} messages. - * @param message GetConnectivityRuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetConnectivityRuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetConnectivityRuleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetConnectivityRuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetConnectivityRuleResponse; - - /** - * Decodes a GetConnectivityRuleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetConnectivityRuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetConnectivityRuleResponse; - - /** - * Creates a GetConnectivityRuleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetConnectivityRuleResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetConnectivityRuleResponse; - - /** - * Creates a plain object from a GetConnectivityRuleResponse message. Also converts values to other types if specified. - * @param message GetConnectivityRuleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetConnectivityRuleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetConnectivityRuleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetConnectivityRuleResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetConnectivityRulesRequest. */ - interface IGetConnectivityRulesRequest { - - /** - * The requested size of the page to retrieve. - * Optional, defaults to 100. - */ - pageSize?: (number|null); - - /** - * The page token if this is continuing from another response. - * Optional, defaults to empty. - */ - pageToken?: (string|null); - - /** Filter connectivity rule by the namespace id. */ - namespace?: (string|null); - } - - /** Represents a GetConnectivityRulesRequest. */ - class GetConnectivityRulesRequest implements IGetConnectivityRulesRequest { - - /** - * Constructs a new GetConnectivityRulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetConnectivityRulesRequest); - - /** - * The requested size of the page to retrieve. - * Optional, defaults to 100. - */ - public pageSize: number; - - /** - * The page token if this is continuing from another response. - * Optional, defaults to empty. - */ - public pageToken: string; - - /** Filter connectivity rule by the namespace id. */ - public namespace: string; - - /** - * Creates a new GetConnectivityRulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetConnectivityRulesRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetConnectivityRulesRequest): temporal.api.cloud.cloudservice.v1.GetConnectivityRulesRequest; - - /** - * Encodes the specified GetConnectivityRulesRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetConnectivityRulesRequest.verify|verify} messages. - * @param message GetConnectivityRulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetConnectivityRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetConnectivityRulesRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetConnectivityRulesRequest.verify|verify} messages. - * @param message GetConnectivityRulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetConnectivityRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetConnectivityRulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetConnectivityRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetConnectivityRulesRequest; - - /** - * Decodes a GetConnectivityRulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetConnectivityRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetConnectivityRulesRequest; - - /** - * Creates a GetConnectivityRulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetConnectivityRulesRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetConnectivityRulesRequest; - - /** - * Creates a plain object from a GetConnectivityRulesRequest message. Also converts values to other types if specified. - * @param message GetConnectivityRulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetConnectivityRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetConnectivityRulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetConnectivityRulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetConnectivityRulesResponse. */ - interface IGetConnectivityRulesResponse { - - /** connectivity_rules returned */ - connectivityRules?: (temporal.api.cloud.connectivityrule.v1.IConnectivityRule[]|null); - - /** The next page token */ - nextPageToken?: (string|null); - } - - /** Represents a GetConnectivityRulesResponse. */ - class GetConnectivityRulesResponse implements IGetConnectivityRulesResponse { - - /** - * Constructs a new GetConnectivityRulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IGetConnectivityRulesResponse); - - /** connectivity_rules returned */ - public connectivityRules: temporal.api.cloud.connectivityrule.v1.IConnectivityRule[]; - - /** The next page token */ - public nextPageToken: string; - - /** - * Creates a new GetConnectivityRulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetConnectivityRulesResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IGetConnectivityRulesResponse): temporal.api.cloud.cloudservice.v1.GetConnectivityRulesResponse; - - /** - * Encodes the specified GetConnectivityRulesResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetConnectivityRulesResponse.verify|verify} messages. - * @param message GetConnectivityRulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IGetConnectivityRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetConnectivityRulesResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.GetConnectivityRulesResponse.verify|verify} messages. - * @param message GetConnectivityRulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IGetConnectivityRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetConnectivityRulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetConnectivityRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.GetConnectivityRulesResponse; - - /** - * Decodes a GetConnectivityRulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetConnectivityRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.GetConnectivityRulesResponse; - - /** - * Creates a GetConnectivityRulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetConnectivityRulesResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.GetConnectivityRulesResponse; - - /** - * Creates a plain object from a GetConnectivityRulesResponse message. Also converts values to other types if specified. - * @param message GetConnectivityRulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.GetConnectivityRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetConnectivityRulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetConnectivityRulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteConnectivityRuleRequest. */ - interface IDeleteConnectivityRuleRequest { - - /** The ID of the connectivity rule that need be deleted, required. */ - connectivityRuleId?: (string|null); - - /** - * The resource version which should be the same from the the db, required - * The latest version can be found in the GetConnectivityRule operation response - */ - resourceVersion?: (string|null); - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - asyncOperationId?: (string|null); - } - - /** Represents a DeleteConnectivityRuleRequest. */ - class DeleteConnectivityRuleRequest implements IDeleteConnectivityRuleRequest { - - /** - * Constructs a new DeleteConnectivityRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteConnectivityRuleRequest); - - /** The ID of the connectivity rule that need be deleted, required. */ - public connectivityRuleId: string; - - /** - * The resource version which should be the same from the the db, required - * The latest version can be found in the GetConnectivityRule operation response - */ - public resourceVersion: string; - - /** - * The id to use for this async operation. - * Optional, if not provided a random id will be generated. - */ - public asyncOperationId: string; - - /** - * Creates a new DeleteConnectivityRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteConnectivityRuleRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteConnectivityRuleRequest): temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleRequest; - - /** - * Encodes the specified DeleteConnectivityRuleRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleRequest.verify|verify} messages. - * @param message DeleteConnectivityRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteConnectivityRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteConnectivityRuleRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleRequest.verify|verify} messages. - * @param message DeleteConnectivityRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteConnectivityRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteConnectivityRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteConnectivityRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleRequest; - - /** - * Decodes a DeleteConnectivityRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteConnectivityRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleRequest; - - /** - * Creates a DeleteConnectivityRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteConnectivityRuleRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleRequest; - - /** - * Creates a plain object from a DeleteConnectivityRuleRequest message. Also converts values to other types if specified. - * @param message DeleteConnectivityRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteConnectivityRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteConnectivityRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteConnectivityRuleResponse. */ - interface IDeleteConnectivityRuleResponse { - - /** The async operation */ - asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - } - - /** Represents a DeleteConnectivityRuleResponse. */ - class DeleteConnectivityRuleResponse implements IDeleteConnectivityRuleResponse { - - /** - * Constructs a new DeleteConnectivityRuleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IDeleteConnectivityRuleResponse); - - /** The async operation */ - public asyncOperation?: (temporal.api.cloud.operation.v1.IAsyncOperation|null); - - /** - * Creates a new DeleteConnectivityRuleResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteConnectivityRuleResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IDeleteConnectivityRuleResponse): temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleResponse; - - /** - * Encodes the specified DeleteConnectivityRuleResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleResponse.verify|verify} messages. - * @param message DeleteConnectivityRuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IDeleteConnectivityRuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteConnectivityRuleResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleResponse.verify|verify} messages. - * @param message DeleteConnectivityRuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IDeleteConnectivityRuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteConnectivityRuleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteConnectivityRuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleResponse; - - /** - * Decodes a DeleteConnectivityRuleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteConnectivityRuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleResponse; - - /** - * Creates a DeleteConnectivityRuleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteConnectivityRuleResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleResponse; - - /** - * Creates a plain object from a DeleteConnectivityRuleResponse message. Also converts values to other types if specified. - * @param message DeleteConnectivityRuleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteConnectivityRuleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteConnectivityRuleResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ValidateAccountAuditLogSinkRequest. */ - interface IValidateAccountAuditLogSinkRequest { - - /** The audit log sink spec that will be validated */ - spec?: (temporal.api.cloud.account.v1.IAuditLogSinkSpec|null); - } - - /** Represents a ValidateAccountAuditLogSinkRequest. */ - class ValidateAccountAuditLogSinkRequest implements IValidateAccountAuditLogSinkRequest { - - /** - * Constructs a new ValidateAccountAuditLogSinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IValidateAccountAuditLogSinkRequest); - - /** The audit log sink spec that will be validated */ - public spec?: (temporal.api.cloud.account.v1.IAuditLogSinkSpec|null); - - /** - * Creates a new ValidateAccountAuditLogSinkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidateAccountAuditLogSinkRequest instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IValidateAccountAuditLogSinkRequest): temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkRequest; - - /** - * Encodes the specified ValidateAccountAuditLogSinkRequest message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkRequest.verify|verify} messages. - * @param message ValidateAccountAuditLogSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IValidateAccountAuditLogSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidateAccountAuditLogSinkRequest message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkRequest.verify|verify} messages. - * @param message ValidateAccountAuditLogSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IValidateAccountAuditLogSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidateAccountAuditLogSinkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidateAccountAuditLogSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkRequest; - - /** - * Decodes a ValidateAccountAuditLogSinkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidateAccountAuditLogSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkRequest; - - /** - * Creates a ValidateAccountAuditLogSinkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidateAccountAuditLogSinkRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkRequest; - - /** - * Creates a plain object from a ValidateAccountAuditLogSinkRequest message. Also converts values to other types if specified. - * @param message ValidateAccountAuditLogSinkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidateAccountAuditLogSinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidateAccountAuditLogSinkRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ValidateAccountAuditLogSinkResponse. */ - interface IValidateAccountAuditLogSinkResponse { - } - - /** Represents a ValidateAccountAuditLogSinkResponse. */ - class ValidateAccountAuditLogSinkResponse implements IValidateAccountAuditLogSinkResponse { - - /** - * Constructs a new ValidateAccountAuditLogSinkResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.cloudservice.v1.IValidateAccountAuditLogSinkResponse); - - /** - * Creates a new ValidateAccountAuditLogSinkResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidateAccountAuditLogSinkResponse instance - */ - public static create(properties?: temporal.api.cloud.cloudservice.v1.IValidateAccountAuditLogSinkResponse): temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkResponse; - - /** - * Encodes the specified ValidateAccountAuditLogSinkResponse message. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkResponse.verify|verify} messages. - * @param message ValidateAccountAuditLogSinkResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.cloudservice.v1.IValidateAccountAuditLogSinkResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidateAccountAuditLogSinkResponse message, length delimited. Does not implicitly {@link temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkResponse.verify|verify} messages. - * @param message ValidateAccountAuditLogSinkResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.cloudservice.v1.IValidateAccountAuditLogSinkResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidateAccountAuditLogSinkResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidateAccountAuditLogSinkResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkResponse; - - /** - * Decodes a ValidateAccountAuditLogSinkResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidateAccountAuditLogSinkResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkResponse; - - /** - * Creates a ValidateAccountAuditLogSinkResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidateAccountAuditLogSinkResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkResponse; - - /** - * Creates a plain object from a ValidateAccountAuditLogSinkResponse message. Also converts values to other types if specified. - * @param message ValidateAccountAuditLogSinkResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidateAccountAuditLogSinkResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidateAccountAuditLogSinkResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace operation. */ - namespace operation { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of an AsyncOperation. */ - interface IAsyncOperation { - - /** The operation id. */ - id?: (string|null); - - /** - * The current state of this operation. - * Possible values are: pending, in_progress, failed, cancelled, fulfilled. - * Deprecated: Not supported after v0.3.0 api version. Use state instead. - * temporal:versioning:max_version=v0.3.0 - */ - stateDeprecated?: (string|null); - - /** - * The current state of this operation. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=state_deprecated - */ - state?: (temporal.api.cloud.operation.v1.AsyncOperation.State|null); - - /** The recommended duration to check back for an update in the operation's state. */ - checkDuration?: (google.protobuf.IDuration|null); - - /** The type of operation being performed. */ - operationType?: (string|null); - - /** - * The input to the operation being performed. - * - * (-- api-linter: core::0146::any=disabled --) - */ - operationInput?: (google.protobuf.IAny|null); - - /** If the operation failed, the reason for the failure. */ - failureReason?: (string|null); - - /** The date and time when the operation initiated. */ - startedTime?: (google.protobuf.ITimestamp|null); - - /** The date and time when the operation completed. */ - finishedTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents an AsyncOperation. */ - class AsyncOperation implements IAsyncOperation { - - /** - * Constructs a new AsyncOperation. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.operation.v1.IAsyncOperation); - - /** The operation id. */ - public id: string; - - /** - * The current state of this operation. - * Possible values are: pending, in_progress, failed, cancelled, fulfilled. - * Deprecated: Not supported after v0.3.0 api version. Use state instead. - * temporal:versioning:max_version=v0.3.0 - */ - public stateDeprecated: string; - - /** - * The current state of this operation. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=state_deprecated - */ - public state: temporal.api.cloud.operation.v1.AsyncOperation.State; - - /** The recommended duration to check back for an update in the operation's state. */ - public checkDuration?: (google.protobuf.IDuration|null); - - /** The type of operation being performed. */ - public operationType: string; - - /** - * The input to the operation being performed. - * - * (-- api-linter: core::0146::any=disabled --) - */ - public operationInput?: (google.protobuf.IAny|null); - - /** If the operation failed, the reason for the failure. */ - public failureReason: string; - - /** The date and time when the operation initiated. */ - public startedTime?: (google.protobuf.ITimestamp|null); - - /** The date and time when the operation completed. */ - public finishedTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new AsyncOperation instance using the specified properties. - * @param [properties] Properties to set - * @returns AsyncOperation instance - */ - public static create(properties?: temporal.api.cloud.operation.v1.IAsyncOperation): temporal.api.cloud.operation.v1.AsyncOperation; - - /** - * Encodes the specified AsyncOperation message. Does not implicitly {@link temporal.api.cloud.operation.v1.AsyncOperation.verify|verify} messages. - * @param message AsyncOperation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.operation.v1.IAsyncOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AsyncOperation message, length delimited. Does not implicitly {@link temporal.api.cloud.operation.v1.AsyncOperation.verify|verify} messages. - * @param message AsyncOperation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.operation.v1.IAsyncOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AsyncOperation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AsyncOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.operation.v1.AsyncOperation; - - /** - * Decodes an AsyncOperation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AsyncOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.operation.v1.AsyncOperation; - - /** - * Creates an AsyncOperation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AsyncOperation - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.operation.v1.AsyncOperation; - - /** - * Creates a plain object from an AsyncOperation message. Also converts values to other types if specified. - * @param message AsyncOperation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.operation.v1.AsyncOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AsyncOperation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AsyncOperation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AsyncOperation { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - STATE_PENDING = 1, - STATE_IN_PROGRESS = 2, - STATE_FAILED = 3, - STATE_CANCELLED = 4, - STATE_FULFILLED = 5, - STATE_REJECTED = 6 - } - } - } - } - - /** Namespace identity. */ - namespace identity { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of an AccountAccess. */ - interface IAccountAccess { - - /** - * The role on the account, should be one of [owner, admin, developer, financeadmin, read, metricsread] - * owner - gives full access to the account, including users, namespaces, and billing - * admin - gives full access the account, including users and namespaces - * developer - gives access to create namespaces on the account - * financeadmin - gives read only access and write access for billing - * read - gives read only access to the account - * metricsread - gives read only access to all namespace metrics - * Deprecated: Not supported after v0.3.0 api version. Use role instead. - * temporal:versioning:max_version=v0.3.0 - */ - roleDeprecated?: (string|null); - - /** - * The role on the account. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=role_deprecated - */ - role?: (temporal.api.cloud.identity.v1.AccountAccess.Role|null); - } - - /** Represents an AccountAccess. */ - class AccountAccess implements IAccountAccess { - - /** - * Constructs a new AccountAccess. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.IAccountAccess); - - /** - * The role on the account, should be one of [owner, admin, developer, financeadmin, read, metricsread] - * owner - gives full access to the account, including users, namespaces, and billing - * admin - gives full access the account, including users and namespaces - * developer - gives access to create namespaces on the account - * financeadmin - gives read only access and write access for billing - * read - gives read only access to the account - * metricsread - gives read only access to all namespace metrics - * Deprecated: Not supported after v0.3.0 api version. Use role instead. - * temporal:versioning:max_version=v0.3.0 - */ - public roleDeprecated: string; - - /** - * The role on the account. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=role_deprecated - */ - public role: temporal.api.cloud.identity.v1.AccountAccess.Role; - - /** - * Creates a new AccountAccess instance using the specified properties. - * @param [properties] Properties to set - * @returns AccountAccess instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.IAccountAccess): temporal.api.cloud.identity.v1.AccountAccess; - - /** - * Encodes the specified AccountAccess message. Does not implicitly {@link temporal.api.cloud.identity.v1.AccountAccess.verify|verify} messages. - * @param message AccountAccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.IAccountAccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AccountAccess message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.AccountAccess.verify|verify} messages. - * @param message AccountAccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.IAccountAccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AccountAccess message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AccountAccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.AccountAccess; - - /** - * Decodes an AccountAccess message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AccountAccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.AccountAccess; - - /** - * Creates an AccountAccess message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AccountAccess - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.AccountAccess; - - /** - * Creates a plain object from an AccountAccess message. Also converts values to other types if specified. - * @param message AccountAccess - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.AccountAccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AccountAccess to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AccountAccess - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AccountAccess { - - /** Role enum. */ - enum Role { - ROLE_UNSPECIFIED = 0, - ROLE_OWNER = 1, - ROLE_ADMIN = 2, - ROLE_DEVELOPER = 3, - ROLE_FINANCE_ADMIN = 4, - ROLE_READ = 5, - ROLE_METRICS_READ = 6 - } - } - - /** Properties of a NamespaceAccess. */ - interface INamespaceAccess { - - /** - * The permission to the namespace, should be one of [admin, write, read] - * admin - gives full access to the namespace, including assigning namespace access to other users - * write - gives write access to the namespace configuration and workflows within the namespace - * read - gives read only access to the namespace configuration and workflows within the namespace - * Deprecated: Not supported after v0.3.0 api version. Use permission instead. - * temporal:versioning:max_version=v0.3.0 - */ - permissionDeprecated?: (string|null); - - /** - * The permission to the namespace. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=permission_deprecated - */ - permission?: (temporal.api.cloud.identity.v1.NamespaceAccess.Permission|null); - } - - /** Represents a NamespaceAccess. */ - class NamespaceAccess implements INamespaceAccess { - - /** - * Constructs a new NamespaceAccess. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.INamespaceAccess); - - /** - * The permission to the namespace, should be one of [admin, write, read] - * admin - gives full access to the namespace, including assigning namespace access to other users - * write - gives write access to the namespace configuration and workflows within the namespace - * read - gives read only access to the namespace configuration and workflows within the namespace - * Deprecated: Not supported after v0.3.0 api version. Use permission instead. - * temporal:versioning:max_version=v0.3.0 - */ - public permissionDeprecated: string; - - /** - * The permission to the namespace. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=permission_deprecated - */ - public permission: temporal.api.cloud.identity.v1.NamespaceAccess.Permission; - - /** - * Creates a new NamespaceAccess instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespaceAccess instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.INamespaceAccess): temporal.api.cloud.identity.v1.NamespaceAccess; - - /** - * Encodes the specified NamespaceAccess message. Does not implicitly {@link temporal.api.cloud.identity.v1.NamespaceAccess.verify|verify} messages. - * @param message NamespaceAccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.INamespaceAccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespaceAccess message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.NamespaceAccess.verify|verify} messages. - * @param message NamespaceAccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.INamespaceAccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespaceAccess message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespaceAccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.NamespaceAccess; - - /** - * Decodes a NamespaceAccess message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespaceAccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.NamespaceAccess; - - /** - * Creates a NamespaceAccess message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespaceAccess - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.NamespaceAccess; - - /** - * Creates a plain object from a NamespaceAccess message. Also converts values to other types if specified. - * @param message NamespaceAccess - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.NamespaceAccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespaceAccess to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespaceAccess - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NamespaceAccess { - - /** Permission enum. */ - enum Permission { - PERMISSION_UNSPECIFIED = 0, - PERMISSION_ADMIN = 1, - PERMISSION_WRITE = 2, - PERMISSION_READ = 3 - } - } - - /** OwnerType enum. */ - enum OwnerType { - OWNER_TYPE_UNSPECIFIED = 0, - OWNER_TYPE_USER = 1, - OWNER_TYPE_SERVICE_ACCOUNT = 2 - } - - /** Properties of an Access. */ - interface IAccess { - - /** The account access */ - accountAccess?: (temporal.api.cloud.identity.v1.IAccountAccess|null); - - /** - * The map of namespace accesses - * The key is the namespace name and the value is the access to the namespace - */ - namespaceAccesses?: ({ [k: string]: temporal.api.cloud.identity.v1.INamespaceAccess }|null); - } - - /** Represents an Access. */ - class Access implements IAccess { - - /** - * Constructs a new Access. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.IAccess); - - /** The account access */ - public accountAccess?: (temporal.api.cloud.identity.v1.IAccountAccess|null); - - /** - * The map of namespace accesses - * The key is the namespace name and the value is the access to the namespace - */ - public namespaceAccesses: { [k: string]: temporal.api.cloud.identity.v1.INamespaceAccess }; - - /** - * Creates a new Access instance using the specified properties. - * @param [properties] Properties to set - * @returns Access instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.IAccess): temporal.api.cloud.identity.v1.Access; - - /** - * Encodes the specified Access message. Does not implicitly {@link temporal.api.cloud.identity.v1.Access.verify|verify} messages. - * @param message Access message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.IAccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Access message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.Access.verify|verify} messages. - * @param message Access message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.IAccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Access message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Access - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.Access; - - /** - * Decodes an Access message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Access - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.Access; - - /** - * Creates an Access message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Access - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.Access; - - /** - * Creates a plain object from an Access message. Also converts values to other types if specified. - * @param message Access - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.Access, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Access to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Access - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NamespaceScopedAccess. */ - interface INamespaceScopedAccess { - - /** The namespace the service account is assigned to - immutable. */ - namespace?: (string|null); - - /** The namespace access assigned to the service account - mutable. */ - access?: (temporal.api.cloud.identity.v1.INamespaceAccess|null); - } - - /** Represents a NamespaceScopedAccess. */ - class NamespaceScopedAccess implements INamespaceScopedAccess { - - /** - * Constructs a new NamespaceScopedAccess. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.INamespaceScopedAccess); - - /** The namespace the service account is assigned to - immutable. */ - public namespace: string; - - /** The namespace access assigned to the service account - mutable. */ - public access?: (temporal.api.cloud.identity.v1.INamespaceAccess|null); - - /** - * Creates a new NamespaceScopedAccess instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespaceScopedAccess instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.INamespaceScopedAccess): temporal.api.cloud.identity.v1.NamespaceScopedAccess; - - /** - * Encodes the specified NamespaceScopedAccess message. Does not implicitly {@link temporal.api.cloud.identity.v1.NamespaceScopedAccess.verify|verify} messages. - * @param message NamespaceScopedAccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.INamespaceScopedAccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespaceScopedAccess message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.NamespaceScopedAccess.verify|verify} messages. - * @param message NamespaceScopedAccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.INamespaceScopedAccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespaceScopedAccess message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespaceScopedAccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.NamespaceScopedAccess; - - /** - * Decodes a NamespaceScopedAccess message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespaceScopedAccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.NamespaceScopedAccess; - - /** - * Creates a NamespaceScopedAccess message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespaceScopedAccess - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.NamespaceScopedAccess; - - /** - * Creates a plain object from a NamespaceScopedAccess message. Also converts values to other types if specified. - * @param message NamespaceScopedAccess - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.NamespaceScopedAccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespaceScopedAccess to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespaceScopedAccess - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserSpec. */ - interface IUserSpec { - - /** The email address associated to the user */ - email?: (string|null); - - /** The access to assigned to the user */ - access?: (temporal.api.cloud.identity.v1.IAccess|null); - } - - /** Represents a UserSpec. */ - class UserSpec implements IUserSpec { - - /** - * Constructs a new UserSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.IUserSpec); - - /** The email address associated to the user */ - public email: string; - - /** The access to assigned to the user */ - public access?: (temporal.api.cloud.identity.v1.IAccess|null); - - /** - * Creates a new UserSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns UserSpec instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.IUserSpec): temporal.api.cloud.identity.v1.UserSpec; - - /** - * Encodes the specified UserSpec message. Does not implicitly {@link temporal.api.cloud.identity.v1.UserSpec.verify|verify} messages. - * @param message UserSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.IUserSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.UserSpec.verify|verify} messages. - * @param message UserSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.IUserSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.UserSpec; - - /** - * Decodes a UserSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.UserSpec; - - /** - * Creates a UserSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.UserSpec; - - /** - * Creates a plain object from a UserSpec message. Also converts values to other types if specified. - * @param message UserSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.UserSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Invitation. */ - interface IInvitation { - - /** The date and time when the user was created */ - createdTime?: (google.protobuf.ITimestamp|null); - - /** The date and time when the invitation expires or has expired */ - expiredTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents an Invitation. */ - class Invitation implements IInvitation { - - /** - * Constructs a new Invitation. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.IInvitation); - - /** The date and time when the user was created */ - public createdTime?: (google.protobuf.ITimestamp|null); - - /** The date and time when the invitation expires or has expired */ - public expiredTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new Invitation instance using the specified properties. - * @param [properties] Properties to set - * @returns Invitation instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.IInvitation): temporal.api.cloud.identity.v1.Invitation; - - /** - * Encodes the specified Invitation message. Does not implicitly {@link temporal.api.cloud.identity.v1.Invitation.verify|verify} messages. - * @param message Invitation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.IInvitation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Invitation message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.Invitation.verify|verify} messages. - * @param message Invitation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.IInvitation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Invitation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Invitation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.Invitation; - - /** - * Decodes an Invitation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Invitation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.Invitation; - - /** - * Creates an Invitation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Invitation - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.Invitation; - - /** - * Creates a plain object from an Invitation message. Also converts values to other types if specified. - * @param message Invitation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.Invitation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Invitation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Invitation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a User. */ - interface IUser { - - /** The id of the user */ - id?: (string|null); - - /** - * The current version of the user specification - * The next update operation will have to include this version - */ - resourceVersion?: (string|null); - - /** The user specification */ - spec?: (temporal.api.cloud.identity.v1.IUserSpec|null); - - /** - * The current state of the user - * Deprecated: Not supported after v0.3.0 api version. Use state instead. - * temporal:versioning:max_version=v0.3.0 - */ - stateDeprecated?: (string|null); - - /** - * The current state of the user. - * For any failed state, reach out to Temporal Cloud support for remediation. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=state_deprecated - */ - state?: (temporal.api.cloud.resource.v1.ResourceState|null); - - /** The id of the async operation that is creating/updating/deleting the user, if any */ - asyncOperationId?: (string|null); - - /** The details of the open invitation sent to the user, if any */ - invitation?: (temporal.api.cloud.identity.v1.IInvitation|null); - - /** The date and time when the user was created */ - createdTime?: (google.protobuf.ITimestamp|null); - - /** - * The date and time when the user was last modified - * Will not be set if the user has never been modified - */ - lastModifiedTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a User. */ - class User implements IUser { - - /** - * Constructs a new User. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.IUser); - - /** The id of the user */ - public id: string; - - /** - * The current version of the user specification - * The next update operation will have to include this version - */ - public resourceVersion: string; - - /** The user specification */ - public spec?: (temporal.api.cloud.identity.v1.IUserSpec|null); - - /** - * The current state of the user - * Deprecated: Not supported after v0.3.0 api version. Use state instead. - * temporal:versioning:max_version=v0.3.0 - */ - public stateDeprecated: string; - - /** - * The current state of the user. - * For any failed state, reach out to Temporal Cloud support for remediation. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=state_deprecated - */ - public state: temporal.api.cloud.resource.v1.ResourceState; - - /** The id of the async operation that is creating/updating/deleting the user, if any */ - public asyncOperationId: string; - - /** The details of the open invitation sent to the user, if any */ - public invitation?: (temporal.api.cloud.identity.v1.IInvitation|null); - - /** The date and time when the user was created */ - public createdTime?: (google.protobuf.ITimestamp|null); - - /** - * The date and time when the user was last modified - * Will not be set if the user has never been modified - */ - public lastModifiedTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new User instance using the specified properties. - * @param [properties] Properties to set - * @returns User instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.IUser): temporal.api.cloud.identity.v1.User; - - /** - * Encodes the specified User message. Does not implicitly {@link temporal.api.cloud.identity.v1.User.verify|verify} messages. - * @param message User message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.IUser, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified User message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.User.verify|verify} messages. - * @param message User message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.IUser, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a User message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns User - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.User; - - /** - * Decodes a User message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns User - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.User; - - /** - * Creates a User message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns User - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.User; - - /** - * Creates a plain object from a User message. Also converts values to other types if specified. - * @param message User - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.User, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this User to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for User - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoogleGroupSpec. */ - interface IGoogleGroupSpec { - - /** - * The email address of the Google group. - * The email address is immutable. Once set during creation, it cannot be changed. - */ - emailAddress?: (string|null); - } - - /** Represents a GoogleGroupSpec. */ - class GoogleGroupSpec implements IGoogleGroupSpec { - - /** - * Constructs a new GoogleGroupSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.IGoogleGroupSpec); - - /** - * The email address of the Google group. - * The email address is immutable. Once set during creation, it cannot be changed. - */ - public emailAddress: string; - - /** - * Creates a new GoogleGroupSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns GoogleGroupSpec instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.IGoogleGroupSpec): temporal.api.cloud.identity.v1.GoogleGroupSpec; - - /** - * Encodes the specified GoogleGroupSpec message. Does not implicitly {@link temporal.api.cloud.identity.v1.GoogleGroupSpec.verify|verify} messages. - * @param message GoogleGroupSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.IGoogleGroupSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoogleGroupSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.GoogleGroupSpec.verify|verify} messages. - * @param message GoogleGroupSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.IGoogleGroupSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoogleGroupSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoogleGroupSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.GoogleGroupSpec; - - /** - * Decodes a GoogleGroupSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoogleGroupSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.GoogleGroupSpec; - - /** - * Creates a GoogleGroupSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoogleGroupSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.GoogleGroupSpec; - - /** - * Creates a plain object from a GoogleGroupSpec message. Also converts values to other types if specified. - * @param message GoogleGroupSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.GoogleGroupSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoogleGroupSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoogleGroupSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SCIMGroupSpec. */ - interface ISCIMGroupSpec { - - /** The id used in the upstream identity provider. */ - idpId?: (string|null); - } - - /** Represents a SCIMGroupSpec. */ - class SCIMGroupSpec implements ISCIMGroupSpec { - - /** - * Constructs a new SCIMGroupSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.ISCIMGroupSpec); - - /** The id used in the upstream identity provider. */ - public idpId: string; - - /** - * Creates a new SCIMGroupSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns SCIMGroupSpec instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.ISCIMGroupSpec): temporal.api.cloud.identity.v1.SCIMGroupSpec; - - /** - * Encodes the specified SCIMGroupSpec message. Does not implicitly {@link temporal.api.cloud.identity.v1.SCIMGroupSpec.verify|verify} messages. - * @param message SCIMGroupSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.ISCIMGroupSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SCIMGroupSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.SCIMGroupSpec.verify|verify} messages. - * @param message SCIMGroupSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.ISCIMGroupSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SCIMGroupSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SCIMGroupSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.SCIMGroupSpec; - - /** - * Decodes a SCIMGroupSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SCIMGroupSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.SCIMGroupSpec; - - /** - * Creates a SCIMGroupSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SCIMGroupSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.SCIMGroupSpec; - - /** - * Creates a plain object from a SCIMGroupSpec message. Also converts values to other types if specified. - * @param message SCIMGroupSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.SCIMGroupSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SCIMGroupSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SCIMGroupSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudGroupSpec. */ - interface ICloudGroupSpec { - } - - /** Represents a CloudGroupSpec. */ - class CloudGroupSpec implements ICloudGroupSpec { - - /** - * Constructs a new CloudGroupSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.ICloudGroupSpec); - - /** - * Creates a new CloudGroupSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudGroupSpec instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.ICloudGroupSpec): temporal.api.cloud.identity.v1.CloudGroupSpec; - - /** - * Encodes the specified CloudGroupSpec message. Does not implicitly {@link temporal.api.cloud.identity.v1.CloudGroupSpec.verify|verify} messages. - * @param message CloudGroupSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.ICloudGroupSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudGroupSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.CloudGroupSpec.verify|verify} messages. - * @param message CloudGroupSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.ICloudGroupSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudGroupSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudGroupSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.CloudGroupSpec; - - /** - * Decodes a CloudGroupSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudGroupSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.CloudGroupSpec; - - /** - * Creates a CloudGroupSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudGroupSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.CloudGroupSpec; - - /** - * Creates a plain object from a CloudGroupSpec message. Also converts values to other types if specified. - * @param message CloudGroupSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.CloudGroupSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudGroupSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudGroupSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserGroupSpec. */ - interface IUserGroupSpec { - - /** The display name of the group. */ - displayName?: (string|null); - - /** The access assigned to the group. */ - access?: (temporal.api.cloud.identity.v1.IAccess|null); - - /** The specification of the google group that this group is associated with. */ - googleGroup?: (temporal.api.cloud.identity.v1.IGoogleGroupSpec|null); - - /** - * The specification of the SCIM group that this group is associated with. - * SCIM groups cannot be created or deleted directly, but their access can be managed. - */ - scimGroup?: (temporal.api.cloud.identity.v1.ISCIMGroupSpec|null); - - /** - * The specification for a Cloud group. Cloud groups can manage members using - * the add and remove member APIs. - */ - cloudGroup?: (temporal.api.cloud.identity.v1.ICloudGroupSpec|null); - } - - /** Represents a UserGroupSpec. */ - class UserGroupSpec implements IUserGroupSpec { - - /** - * Constructs a new UserGroupSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.IUserGroupSpec); - - /** The display name of the group. */ - public displayName: string; - - /** The access assigned to the group. */ - public access?: (temporal.api.cloud.identity.v1.IAccess|null); - - /** The specification of the google group that this group is associated with. */ - public googleGroup?: (temporal.api.cloud.identity.v1.IGoogleGroupSpec|null); - - /** - * The specification of the SCIM group that this group is associated with. - * SCIM groups cannot be created or deleted directly, but their access can be managed. - */ - public scimGroup?: (temporal.api.cloud.identity.v1.ISCIMGroupSpec|null); - - /** - * The specification for a Cloud group. Cloud groups can manage members using - * the add and remove member APIs. - */ - public cloudGroup?: (temporal.api.cloud.identity.v1.ICloudGroupSpec|null); - - /** UserGroupSpec groupType. */ - public groupType?: ("googleGroup"|"scimGroup"|"cloudGroup"); - - /** - * Creates a new UserGroupSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns UserGroupSpec instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.IUserGroupSpec): temporal.api.cloud.identity.v1.UserGroupSpec; - - /** - * Encodes the specified UserGroupSpec message. Does not implicitly {@link temporal.api.cloud.identity.v1.UserGroupSpec.verify|verify} messages. - * @param message UserGroupSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.IUserGroupSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserGroupSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.UserGroupSpec.verify|verify} messages. - * @param message UserGroupSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.IUserGroupSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserGroupSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserGroupSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.UserGroupSpec; - - /** - * Decodes a UserGroupSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserGroupSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.UserGroupSpec; - - /** - * Creates a UserGroupSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserGroupSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.UserGroupSpec; - - /** - * Creates a plain object from a UserGroupSpec message. Also converts values to other types if specified. - * @param message UserGroupSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.UserGroupSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserGroupSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserGroupSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserGroup. */ - interface IUserGroup { - - /** The id of the group */ - id?: (string|null); - - /** - * The current version of the group specification - * The next update operation will have to include this version - */ - resourceVersion?: (string|null); - - /** The group specification */ - spec?: (temporal.api.cloud.identity.v1.IUserGroupSpec|null); - - /** - * The current state of the group. - * Deprecated: Not supported after v0.3.0 api version. Use state instead. - * temporal:versioning:max_version=v0.3.0 - */ - stateDeprecated?: (string|null); - - /** - * The current state of the group. - * For any failed state, reach out to Temporal Cloud support for remediation. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=state_deprecated - */ - state?: (temporal.api.cloud.resource.v1.ResourceState|null); - - /** The id of the async operation that is creating/updating/deleting the group, if any */ - asyncOperationId?: (string|null); - - /** The date and time when the group was created */ - createdTime?: (google.protobuf.ITimestamp|null); - - /** - * The date and time when the group was last modified - * Will not be set if the group has never been modified - */ - lastModifiedTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a UserGroup. */ - class UserGroup implements IUserGroup { - - /** - * Constructs a new UserGroup. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.IUserGroup); - - /** The id of the group */ - public id: string; - - /** - * The current version of the group specification - * The next update operation will have to include this version - */ - public resourceVersion: string; - - /** The group specification */ - public spec?: (temporal.api.cloud.identity.v1.IUserGroupSpec|null); - - /** - * The current state of the group. - * Deprecated: Not supported after v0.3.0 api version. Use state instead. - * temporal:versioning:max_version=v0.3.0 - */ - public stateDeprecated: string; - - /** - * The current state of the group. - * For any failed state, reach out to Temporal Cloud support for remediation. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=state_deprecated - */ - public state: temporal.api.cloud.resource.v1.ResourceState; - - /** The id of the async operation that is creating/updating/deleting the group, if any */ - public asyncOperationId: string; - - /** The date and time when the group was created */ - public createdTime?: (google.protobuf.ITimestamp|null); - - /** - * The date and time when the group was last modified - * Will not be set if the group has never been modified - */ - public lastModifiedTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new UserGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns UserGroup instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.IUserGroup): temporal.api.cloud.identity.v1.UserGroup; - - /** - * Encodes the specified UserGroup message. Does not implicitly {@link temporal.api.cloud.identity.v1.UserGroup.verify|verify} messages. - * @param message UserGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.IUserGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserGroup message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.UserGroup.verify|verify} messages. - * @param message UserGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.IUserGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.UserGroup; - - /** - * Decodes a UserGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.UserGroup; - - /** - * Creates a UserGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserGroup - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.UserGroup; - - /** - * Creates a plain object from a UserGroup message. Also converts values to other types if specified. - * @param message UserGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.UserGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserGroupMemberId. */ - interface IUserGroupMemberId { - - /** UserGroupMemberId userId */ - userId?: (string|null); - } - - /** Represents a UserGroupMemberId. */ - class UserGroupMemberId implements IUserGroupMemberId { - - /** - * Constructs a new UserGroupMemberId. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.IUserGroupMemberId); - - /** UserGroupMemberId userId. */ - public userId?: (string|null); - - /** UserGroupMemberId memberType. */ - public memberType?: "userId"; - - /** - * Creates a new UserGroupMemberId instance using the specified properties. - * @param [properties] Properties to set - * @returns UserGroupMemberId instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.IUserGroupMemberId): temporal.api.cloud.identity.v1.UserGroupMemberId; - - /** - * Encodes the specified UserGroupMemberId message. Does not implicitly {@link temporal.api.cloud.identity.v1.UserGroupMemberId.verify|verify} messages. - * @param message UserGroupMemberId message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.IUserGroupMemberId, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserGroupMemberId message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.UserGroupMemberId.verify|verify} messages. - * @param message UserGroupMemberId message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.IUserGroupMemberId, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserGroupMemberId message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserGroupMemberId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.UserGroupMemberId; - - /** - * Decodes a UserGroupMemberId message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserGroupMemberId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.UserGroupMemberId; - - /** - * Creates a UserGroupMemberId message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserGroupMemberId - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.UserGroupMemberId; - - /** - * Creates a plain object from a UserGroupMemberId message. Also converts values to other types if specified. - * @param message UserGroupMemberId - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.UserGroupMemberId, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserGroupMemberId to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserGroupMemberId - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserGroupMember. */ - interface IUserGroupMember { - - /** UserGroupMember memberId */ - memberId?: (temporal.api.cloud.identity.v1.IUserGroupMemberId|null); - - /** UserGroupMember createdTime */ - createdTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a UserGroupMember. */ - class UserGroupMember implements IUserGroupMember { - - /** - * Constructs a new UserGroupMember. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.IUserGroupMember); - - /** UserGroupMember memberId. */ - public memberId?: (temporal.api.cloud.identity.v1.IUserGroupMemberId|null); - - /** UserGroupMember createdTime. */ - public createdTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new UserGroupMember instance using the specified properties. - * @param [properties] Properties to set - * @returns UserGroupMember instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.IUserGroupMember): temporal.api.cloud.identity.v1.UserGroupMember; - - /** - * Encodes the specified UserGroupMember message. Does not implicitly {@link temporal.api.cloud.identity.v1.UserGroupMember.verify|verify} messages. - * @param message UserGroupMember message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.IUserGroupMember, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserGroupMember message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.UserGroupMember.verify|verify} messages. - * @param message UserGroupMember message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.IUserGroupMember, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserGroupMember message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserGroupMember - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.UserGroupMember; - - /** - * Decodes a UserGroupMember message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserGroupMember - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.UserGroupMember; - - /** - * Creates a UserGroupMember message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserGroupMember - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.UserGroupMember; - - /** - * Creates a plain object from a UserGroupMember message. Also converts values to other types if specified. - * @param message UserGroupMember - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.UserGroupMember, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserGroupMember to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserGroupMember - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceAccount. */ - interface IServiceAccount { - - /** The id of the service account. */ - id?: (string|null); - - /** - * The current version of the service account specification. - * The next update operation will have to include this version. - */ - resourceVersion?: (string|null); - - /** The service account specification. */ - spec?: (temporal.api.cloud.identity.v1.IServiceAccountSpec|null); - - /** - * The current state of the service account. - * Possible values: activating, activationfailed, active, updating, updatefailed, deleting, deletefailed, deleted, suspending, suspendfailed, suspended. - * For any failed state, reach out to Temporal Cloud support for remediation. - * Deprecated: Not supported after v0.3.0 api version. Use state instead. - * temporal:versioning:max_version=v0.3.0 - */ - stateDeprecated?: (string|null); - - /** - * The current state of the service account. - * For any failed state, reach out to Temporal Cloud support for remediation. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=state_deprecated - */ - state?: (temporal.api.cloud.resource.v1.ResourceState|null); - - /** The id of the async operation that is creating/updating/deleting the service account, if any. */ - asyncOperationId?: (string|null); - - /** The date and time when the service account was created. */ - createdTime?: (google.protobuf.ITimestamp|null); - - /** - * The date and time when the service account was last modified - * Will not be set if the service account has never been modified. - */ - lastModifiedTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a ServiceAccount. */ - class ServiceAccount implements IServiceAccount { - - /** - * Constructs a new ServiceAccount. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.IServiceAccount); - - /** The id of the service account. */ - public id: string; - - /** - * The current version of the service account specification. - * The next update operation will have to include this version. - */ - public resourceVersion: string; - - /** The service account specification. */ - public spec?: (temporal.api.cloud.identity.v1.IServiceAccountSpec|null); - - /** - * The current state of the service account. - * Possible values: activating, activationfailed, active, updating, updatefailed, deleting, deletefailed, deleted, suspending, suspendfailed, suspended. - * For any failed state, reach out to Temporal Cloud support for remediation. - * Deprecated: Not supported after v0.3.0 api version. Use state instead. - * temporal:versioning:max_version=v0.3.0 - */ - public stateDeprecated: string; - - /** - * The current state of the service account. - * For any failed state, reach out to Temporal Cloud support for remediation. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=state_deprecated - */ - public state: temporal.api.cloud.resource.v1.ResourceState; - - /** The id of the async operation that is creating/updating/deleting the service account, if any. */ - public asyncOperationId: string; - - /** The date and time when the service account was created. */ - public createdTime?: (google.protobuf.ITimestamp|null); - - /** - * The date and time when the service account was last modified - * Will not be set if the service account has never been modified. - */ - public lastModifiedTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new ServiceAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceAccount instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.IServiceAccount): temporal.api.cloud.identity.v1.ServiceAccount; - - /** - * Encodes the specified ServiceAccount message. Does not implicitly {@link temporal.api.cloud.identity.v1.ServiceAccount.verify|verify} messages. - * @param message ServiceAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.ServiceAccount.verify|verify} messages. - * @param message ServiceAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.ServiceAccount; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.ServiceAccount; - - /** - * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceAccount - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.ServiceAccount; - - /** - * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. - * @param message ServiceAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.ServiceAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceAccount - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceAccountSpec. */ - interface IServiceAccountSpec { - - /** - * The name associated with the service account. - * The name is mutable, but must be unique across all your active service accounts. - */ - name?: (string|null); - - /** - * Note: one of `Access` or `NamespaceScopedAccess` must be provided, but not both. - * The access assigned to the service account. - * If set, creates an account scoped service account. - * The access is mutable. - */ - access?: (temporal.api.cloud.identity.v1.IAccess|null); - - /** - * The namespace scoped access assigned to the service account. - * If set, creates a namespace scoped service account (limited to a single namespace). - * The namespace scoped access is partially mutable. - * Refer to `NamespaceScopedAccess` for details. - */ - namespaceScopedAccess?: (temporal.api.cloud.identity.v1.INamespaceScopedAccess|null); - - /** - * The description associated with the service account - optional. - * The description is mutable. - */ - description?: (string|null); - } - - /** Represents a ServiceAccountSpec. */ - class ServiceAccountSpec implements IServiceAccountSpec { - - /** - * Constructs a new ServiceAccountSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.IServiceAccountSpec); - - /** - * The name associated with the service account. - * The name is mutable, but must be unique across all your active service accounts. - */ - public name: string; - - /** - * Note: one of `Access` or `NamespaceScopedAccess` must be provided, but not both. - * The access assigned to the service account. - * If set, creates an account scoped service account. - * The access is mutable. - */ - public access?: (temporal.api.cloud.identity.v1.IAccess|null); - - /** - * The namespace scoped access assigned to the service account. - * If set, creates a namespace scoped service account (limited to a single namespace). - * The namespace scoped access is partially mutable. - * Refer to `NamespaceScopedAccess` for details. - */ - public namespaceScopedAccess?: (temporal.api.cloud.identity.v1.INamespaceScopedAccess|null); - - /** - * The description associated with the service account - optional. - * The description is mutable. - */ - public description: string; - - /** - * Creates a new ServiceAccountSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceAccountSpec instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.IServiceAccountSpec): temporal.api.cloud.identity.v1.ServiceAccountSpec; - - /** - * Encodes the specified ServiceAccountSpec message. Does not implicitly {@link temporal.api.cloud.identity.v1.ServiceAccountSpec.verify|verify} messages. - * @param message ServiceAccountSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.IServiceAccountSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceAccountSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.ServiceAccountSpec.verify|verify} messages. - * @param message ServiceAccountSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.IServiceAccountSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceAccountSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceAccountSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.ServiceAccountSpec; - - /** - * Decodes a ServiceAccountSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceAccountSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.ServiceAccountSpec; - - /** - * Creates a ServiceAccountSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceAccountSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.ServiceAccountSpec; - - /** - * Creates a plain object from a ServiceAccountSpec message. Also converts values to other types if specified. - * @param message ServiceAccountSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.ServiceAccountSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceAccountSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceAccountSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ApiKey. */ - interface IApiKey { - - /** The id of the API Key. */ - id?: (string|null); - - /** - * The current version of the API key specification. - * The next update operation will have to include this version. - */ - resourceVersion?: (string|null); - - /** The API key specification. */ - spec?: (temporal.api.cloud.identity.v1.IApiKeySpec|null); - - /** - * The current state of the API key. - * Possible values: activating, activationfailed, active, updating, updatefailed, deleting, deletefailed, deleted, suspending, suspendfailed, suspended. - * For any failed state, reach out to Temporal Cloud support for remediation. - * Deprecated: Not supported after v0.3.0 api version. Use state instead. - * temporal:versioning:max_version=v0.3.0 - */ - stateDeprecated?: (string|null); - - /** - * The current state of the API key. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=state_deprecated - */ - state?: (temporal.api.cloud.resource.v1.ResourceState|null); - - /** The id of the async operation that is creating/updating/deleting the API key, if any. */ - asyncOperationId?: (string|null); - - /** The date and time when the API key was created. */ - createdTime?: (google.protobuf.ITimestamp|null); - - /** - * The date and time when the API key was last modified. - * Will not be set if the API key has never been modified. - */ - lastModifiedTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents an ApiKey. */ - class ApiKey implements IApiKey { - - /** - * Constructs a new ApiKey. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.IApiKey); - - /** The id of the API Key. */ - public id: string; - - /** - * The current version of the API key specification. - * The next update operation will have to include this version. - */ - public resourceVersion: string; - - /** The API key specification. */ - public spec?: (temporal.api.cloud.identity.v1.IApiKeySpec|null); - - /** - * The current state of the API key. - * Possible values: activating, activationfailed, active, updating, updatefailed, deleting, deletefailed, deleted, suspending, suspendfailed, suspended. - * For any failed state, reach out to Temporal Cloud support for remediation. - * Deprecated: Not supported after v0.3.0 api version. Use state instead. - * temporal:versioning:max_version=v0.3.0 - */ - public stateDeprecated: string; - - /** - * The current state of the API key. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=state_deprecated - */ - public state: temporal.api.cloud.resource.v1.ResourceState; - - /** The id of the async operation that is creating/updating/deleting the API key, if any. */ - public asyncOperationId: string; - - /** The date and time when the API key was created. */ - public createdTime?: (google.protobuf.ITimestamp|null); - - /** - * The date and time when the API key was last modified. - * Will not be set if the API key has never been modified. - */ - public lastModifiedTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new ApiKey instance using the specified properties. - * @param [properties] Properties to set - * @returns ApiKey instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.IApiKey): temporal.api.cloud.identity.v1.ApiKey; - - /** - * Encodes the specified ApiKey message. Does not implicitly {@link temporal.api.cloud.identity.v1.ApiKey.verify|verify} messages. - * @param message ApiKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.IApiKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ApiKey message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.ApiKey.verify|verify} messages. - * @param message ApiKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.IApiKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ApiKey message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ApiKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.ApiKey; - - /** - * Decodes an ApiKey message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ApiKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.ApiKey; - - /** - * Creates an ApiKey message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ApiKey - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.ApiKey; - - /** - * Creates a plain object from an ApiKey message. Also converts values to other types if specified. - * @param message ApiKey - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.ApiKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ApiKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ApiKey - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ApiKeySpec. */ - interface IApiKeySpec { - - /** - * The id of the owner to create the API key for. - * The owner id is immutable. Once set during creation, it cannot be changed. - * The owner id is the id of the user when the owner type is user. - * The owner id is the id of the service account when the owner type is service account. - */ - ownerId?: (string|null); - - /** - * The type of the owner to create the API key for. - * The owner type is immutable. Once set during creation, it cannot be changed. - * Possible values: user, service-account. - * Deprecated: Not supported after v0.3.0 api version. Use owner_type instead. - * temporal:versioning:max_version=v0.3.0 - */ - ownerTypeDeprecated?: (string|null); - - /** - * The type of the owner to create the API key for. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=owner_type_deprecated - */ - ownerType?: (temporal.api.cloud.identity.v1.OwnerType|null); - - /** The display name of the API key. */ - displayName?: (string|null); - - /** The description of the API key. */ - description?: (string|null); - - /** The expiry time of the API key. */ - expiryTime?: (google.protobuf.ITimestamp|null); - - /** True if the API key is disabled. */ - disabled?: (boolean|null); - } - - /** Represents an ApiKeySpec. */ - class ApiKeySpec implements IApiKeySpec { - - /** - * Constructs a new ApiKeySpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.identity.v1.IApiKeySpec); - - /** - * The id of the owner to create the API key for. - * The owner id is immutable. Once set during creation, it cannot be changed. - * The owner id is the id of the user when the owner type is user. - * The owner id is the id of the service account when the owner type is service account. - */ - public ownerId: string; - - /** - * The type of the owner to create the API key for. - * The owner type is immutable. Once set during creation, it cannot be changed. - * Possible values: user, service-account. - * Deprecated: Not supported after v0.3.0 api version. Use owner_type instead. - * temporal:versioning:max_version=v0.3.0 - */ - public ownerTypeDeprecated: string; - - /** - * The type of the owner to create the API key for. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=owner_type_deprecated - */ - public ownerType: temporal.api.cloud.identity.v1.OwnerType; - - /** The display name of the API key. */ - public displayName: string; - - /** The description of the API key. */ - public description: string; - - /** The expiry time of the API key. */ - public expiryTime?: (google.protobuf.ITimestamp|null); - - /** True if the API key is disabled. */ - public disabled: boolean; - - /** - * Creates a new ApiKeySpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ApiKeySpec instance - */ - public static create(properties?: temporal.api.cloud.identity.v1.IApiKeySpec): temporal.api.cloud.identity.v1.ApiKeySpec; - - /** - * Encodes the specified ApiKeySpec message. Does not implicitly {@link temporal.api.cloud.identity.v1.ApiKeySpec.verify|verify} messages. - * @param message ApiKeySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.identity.v1.IApiKeySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ApiKeySpec message, length delimited. Does not implicitly {@link temporal.api.cloud.identity.v1.ApiKeySpec.verify|verify} messages. - * @param message ApiKeySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.identity.v1.IApiKeySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ApiKeySpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ApiKeySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.identity.v1.ApiKeySpec; - - /** - * Decodes an ApiKeySpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ApiKeySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.identity.v1.ApiKeySpec; - - /** - * Creates an ApiKeySpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ApiKeySpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.identity.v1.ApiKeySpec; - - /** - * Creates a plain object from an ApiKeySpec message. Also converts values to other types if specified. - * @param message ApiKeySpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.identity.v1.ApiKeySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ApiKeySpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ApiKeySpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace resource. */ - namespace resource { - - /** Namespace v1. */ - namespace v1 { - - /** ResourceState enum. */ - enum ResourceState { - RESOURCE_STATE_UNSPECIFIED = 0, - RESOURCE_STATE_ACTIVATING = 1, - RESOURCE_STATE_ACTIVATION_FAILED = 2, - RESOURCE_STATE_ACTIVE = 3, - RESOURCE_STATE_UPDATING = 4, - RESOURCE_STATE_UPDATE_FAILED = 5, - RESOURCE_STATE_DELETING = 6, - RESOURCE_STATE_DELETE_FAILED = 7, - RESOURCE_STATE_DELETED = 8, - RESOURCE_STATE_SUSPENDED = 9, - RESOURCE_STATE_EXPIRED = 10 - } - } - } - - /** Namespace namespace. */ - namespace namespace { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a CertificateFilterSpec. */ - interface ICertificateFilterSpec { - - /** - * The common_name in the certificate. - * Optional, default is empty. - */ - commonName?: (string|null); - - /** - * The organization in the certificate. - * Optional, default is empty. - */ - organization?: (string|null); - - /** - * The organizational_unit in the certificate. - * Optional, default is empty. - */ - organizationalUnit?: (string|null); - - /** - * The subject_alternative_name in the certificate. - * Optional, default is empty. - */ - subjectAlternativeName?: (string|null); - } - - /** Represents a CertificateFilterSpec. */ - class CertificateFilterSpec implements ICertificateFilterSpec { - - /** - * Constructs a new CertificateFilterSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.ICertificateFilterSpec); - - /** - * The common_name in the certificate. - * Optional, default is empty. - */ - public commonName: string; - - /** - * The organization in the certificate. - * Optional, default is empty. - */ - public organization: string; - - /** - * The organizational_unit in the certificate. - * Optional, default is empty. - */ - public organizationalUnit: string; - - /** - * The subject_alternative_name in the certificate. - * Optional, default is empty. - */ - public subjectAlternativeName: string; - - /** - * Creates a new CertificateFilterSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns CertificateFilterSpec instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.ICertificateFilterSpec): temporal.api.cloud.namespace.v1.CertificateFilterSpec; - - /** - * Encodes the specified CertificateFilterSpec message. Does not implicitly {@link temporal.api.cloud.namespace.v1.CertificateFilterSpec.verify|verify} messages. - * @param message CertificateFilterSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.ICertificateFilterSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CertificateFilterSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.CertificateFilterSpec.verify|verify} messages. - * @param message CertificateFilterSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.ICertificateFilterSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CertificateFilterSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CertificateFilterSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.CertificateFilterSpec; - - /** - * Decodes a CertificateFilterSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CertificateFilterSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.CertificateFilterSpec; - - /** - * Creates a CertificateFilterSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CertificateFilterSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.CertificateFilterSpec; - - /** - * Creates a plain object from a CertificateFilterSpec message. Also converts values to other types if specified. - * @param message CertificateFilterSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.CertificateFilterSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CertificateFilterSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CertificateFilterSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MtlsAuthSpec. */ - interface IMtlsAuthSpec { - - /** - * The base64 encoded ca cert(s) in PEM format that the clients can use for authentication and authorization. - * This must only be one value, but the CA can have a chain. - * - * (-- api-linter: core::0140::base64=disabled --) - * Deprecated: Not supported after v0.2.0 api version. Use accepted_client_ca instead. - * temporal:versioning:max_version=v0.2.0 - */ - acceptedClientCaDeprecated?: (string|null); - - /** - * The ca cert(s) in PEM format that the clients can use for authentication and authorization. - * This must only be one value, but the CA can have a chain. - * temporal:versioning:min_version=v0.2.0 - */ - acceptedClientCa?: (Uint8Array|null); - - /** - * Certificate filters which, if specified, only allow connections from client certificates whose distinguished name properties match at least one of the filters. - * This allows limiting access to specific end-entity certificates. - * Optional, default is empty. - */ - certificateFilters?: (temporal.api.cloud.namespace.v1.ICertificateFilterSpec[]|null); - - /** - * Flag to enable mTLS auth (default: disabled). - * Note: disabling mTLS auth will cause existing mTLS connections to fail. - * temporal:versioning:min_version=v0.2.0 - */ - enabled?: (boolean|null); - } - - /** Represents a MtlsAuthSpec. */ - class MtlsAuthSpec implements IMtlsAuthSpec { - - /** - * Constructs a new MtlsAuthSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.IMtlsAuthSpec); - - /** - * The base64 encoded ca cert(s) in PEM format that the clients can use for authentication and authorization. - * This must only be one value, but the CA can have a chain. - * - * (-- api-linter: core::0140::base64=disabled --) - * Deprecated: Not supported after v0.2.0 api version. Use accepted_client_ca instead. - * temporal:versioning:max_version=v0.2.0 - */ - public acceptedClientCaDeprecated: string; - - /** - * The ca cert(s) in PEM format that the clients can use for authentication and authorization. - * This must only be one value, but the CA can have a chain. - * temporal:versioning:min_version=v0.2.0 - */ - public acceptedClientCa: Uint8Array; - - /** - * Certificate filters which, if specified, only allow connections from client certificates whose distinguished name properties match at least one of the filters. - * This allows limiting access to specific end-entity certificates. - * Optional, default is empty. - */ - public certificateFilters: temporal.api.cloud.namespace.v1.ICertificateFilterSpec[]; - - /** - * Flag to enable mTLS auth (default: disabled). - * Note: disabling mTLS auth will cause existing mTLS connections to fail. - * temporal:versioning:min_version=v0.2.0 - */ - public enabled: boolean; - - /** - * Creates a new MtlsAuthSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns MtlsAuthSpec instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.IMtlsAuthSpec): temporal.api.cloud.namespace.v1.MtlsAuthSpec; - - /** - * Encodes the specified MtlsAuthSpec message. Does not implicitly {@link temporal.api.cloud.namespace.v1.MtlsAuthSpec.verify|verify} messages. - * @param message MtlsAuthSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.IMtlsAuthSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MtlsAuthSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.MtlsAuthSpec.verify|verify} messages. - * @param message MtlsAuthSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.IMtlsAuthSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MtlsAuthSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MtlsAuthSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.MtlsAuthSpec; - - /** - * Decodes a MtlsAuthSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MtlsAuthSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.MtlsAuthSpec; - - /** - * Creates a MtlsAuthSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MtlsAuthSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.MtlsAuthSpec; - - /** - * Creates a plain object from a MtlsAuthSpec message. Also converts values to other types if specified. - * @param message MtlsAuthSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.MtlsAuthSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MtlsAuthSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MtlsAuthSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ApiKeyAuthSpec. */ - interface IApiKeyAuthSpec { - - /** - * Flag to enable API key auth (default: disabled). - * Note: disabling API key auth will cause existing API key connections to fail. - */ - enabled?: (boolean|null); - } - - /** Represents an ApiKeyAuthSpec. */ - class ApiKeyAuthSpec implements IApiKeyAuthSpec { - - /** - * Constructs a new ApiKeyAuthSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.IApiKeyAuthSpec); - - /** - * Flag to enable API key auth (default: disabled). - * Note: disabling API key auth will cause existing API key connections to fail. - */ - public enabled: boolean; - - /** - * Creates a new ApiKeyAuthSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ApiKeyAuthSpec instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.IApiKeyAuthSpec): temporal.api.cloud.namespace.v1.ApiKeyAuthSpec; - - /** - * Encodes the specified ApiKeyAuthSpec message. Does not implicitly {@link temporal.api.cloud.namespace.v1.ApiKeyAuthSpec.verify|verify} messages. - * @param message ApiKeyAuthSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.IApiKeyAuthSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ApiKeyAuthSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.ApiKeyAuthSpec.verify|verify} messages. - * @param message ApiKeyAuthSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.IApiKeyAuthSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ApiKeyAuthSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ApiKeyAuthSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.ApiKeyAuthSpec; - - /** - * Decodes an ApiKeyAuthSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ApiKeyAuthSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.ApiKeyAuthSpec; - - /** - * Creates an ApiKeyAuthSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ApiKeyAuthSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.ApiKeyAuthSpec; - - /** - * Creates a plain object from an ApiKeyAuthSpec message. Also converts values to other types if specified. - * @param message ApiKeyAuthSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.ApiKeyAuthSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ApiKeyAuthSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ApiKeyAuthSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CodecServerSpec. */ - interface ICodecServerSpec { - - /** The codec server endpoint. */ - endpoint?: (string|null); - - /** Whether to pass the user access token with your endpoint. */ - passAccessToken?: (boolean|null); - - /** Whether to include cross-origin credentials. */ - includeCrossOriginCredentials?: (boolean|null); - - /** - * A custom error message to display for remote codec server errors. - * temporal:versioning:min_version=v0.5.1 - */ - customErrorMessage?: (temporal.api.cloud.namespace.v1.CodecServerSpec.ICustomErrorMessage|null); - } - - /** Represents a CodecServerSpec. */ - class CodecServerSpec implements ICodecServerSpec { - - /** - * Constructs a new CodecServerSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.ICodecServerSpec); - - /** The codec server endpoint. */ - public endpoint: string; - - /** Whether to pass the user access token with your endpoint. */ - public passAccessToken: boolean; - - /** Whether to include cross-origin credentials. */ - public includeCrossOriginCredentials: boolean; - - /** - * A custom error message to display for remote codec server errors. - * temporal:versioning:min_version=v0.5.1 - */ - public customErrorMessage?: (temporal.api.cloud.namespace.v1.CodecServerSpec.ICustomErrorMessage|null); - - /** - * Creates a new CodecServerSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns CodecServerSpec instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.ICodecServerSpec): temporal.api.cloud.namespace.v1.CodecServerSpec; - - /** - * Encodes the specified CodecServerSpec message. Does not implicitly {@link temporal.api.cloud.namespace.v1.CodecServerSpec.verify|verify} messages. - * @param message CodecServerSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.ICodecServerSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CodecServerSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.CodecServerSpec.verify|verify} messages. - * @param message CodecServerSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.ICodecServerSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CodecServerSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CodecServerSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.CodecServerSpec; - - /** - * Decodes a CodecServerSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CodecServerSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.CodecServerSpec; - - /** - * Creates a CodecServerSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CodecServerSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.CodecServerSpec; - - /** - * Creates a plain object from a CodecServerSpec message. Also converts values to other types if specified. - * @param message CodecServerSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.CodecServerSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CodecServerSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CodecServerSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CodecServerSpec { - - /** Properties of a CustomErrorMessage. */ - interface ICustomErrorMessage { - - /** The error message to display by default for any remote codec server errors. */ - "default"?: (temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.IErrorMessage|null); - } - - /** Represents a CustomErrorMessage. */ - class CustomErrorMessage implements ICustomErrorMessage { - - /** - * Constructs a new CustomErrorMessage. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.CodecServerSpec.ICustomErrorMessage); - - /** The error message to display by default for any remote codec server errors. */ - public default?: (temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.IErrorMessage|null); - - /** - * Creates a new CustomErrorMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomErrorMessage instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.CodecServerSpec.ICustomErrorMessage): temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage; - - /** - * Encodes the specified CustomErrorMessage message. Does not implicitly {@link temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.verify|verify} messages. - * @param message CustomErrorMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.CodecServerSpec.ICustomErrorMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomErrorMessage message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.verify|verify} messages. - * @param message CustomErrorMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.CodecServerSpec.ICustomErrorMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomErrorMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomErrorMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage; - - /** - * Decodes a CustomErrorMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomErrorMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage; - - /** - * Creates a CustomErrorMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomErrorMessage - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage; - - /** - * Creates a plain object from a CustomErrorMessage message. Also converts values to other types if specified. - * @param message CustomErrorMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomErrorMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomErrorMessage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CustomErrorMessage { - - /** Properties of an ErrorMessage. */ - interface IErrorMessage { - - /** A message to display. */ - message?: (string|null); - - /** A link that is displayed along side the configured message. */ - link?: (string|null); - } - - /** Represents an ErrorMessage. */ - class ErrorMessage implements IErrorMessage { - - /** - * Constructs a new ErrorMessage. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.IErrorMessage); - - /** A message to display. */ - public message: string; - - /** A link that is displayed along side the configured message. */ - public link: string; - - /** - * Creates a new ErrorMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ErrorMessage instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.IErrorMessage): temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.ErrorMessage; - - /** - * Encodes the specified ErrorMessage message. Does not implicitly {@link temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.ErrorMessage.verify|verify} messages. - * @param message ErrorMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.IErrorMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ErrorMessage message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.ErrorMessage.verify|verify} messages. - * @param message ErrorMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.IErrorMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ErrorMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ErrorMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.ErrorMessage; - - /** - * Decodes an ErrorMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ErrorMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.ErrorMessage; - - /** - * Creates an ErrorMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ErrorMessage - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.ErrorMessage; - - /** - * Creates a plain object from an ErrorMessage message. Also converts values to other types if specified. - * @param message ErrorMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.ErrorMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ErrorMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ErrorMessage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of a LifecycleSpec. */ - interface ILifecycleSpec { - - /** Flag to enable delete protection for the namespace. */ - enableDeleteProtection?: (boolean|null); - } - - /** Represents a LifecycleSpec. */ - class LifecycleSpec implements ILifecycleSpec { - - /** - * Constructs a new LifecycleSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.ILifecycleSpec); - - /** Flag to enable delete protection for the namespace. */ - public enableDeleteProtection: boolean; - - /** - * Creates a new LifecycleSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns LifecycleSpec instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.ILifecycleSpec): temporal.api.cloud.namespace.v1.LifecycleSpec; - - /** - * Encodes the specified LifecycleSpec message. Does not implicitly {@link temporal.api.cloud.namespace.v1.LifecycleSpec.verify|verify} messages. - * @param message LifecycleSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.ILifecycleSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LifecycleSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.LifecycleSpec.verify|verify} messages. - * @param message LifecycleSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.ILifecycleSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LifecycleSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LifecycleSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.LifecycleSpec; - - /** - * Decodes a LifecycleSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LifecycleSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.LifecycleSpec; - - /** - * Creates a LifecycleSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LifecycleSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.LifecycleSpec; - - /** - * Creates a plain object from a LifecycleSpec message. Also converts values to other types if specified. - * @param message LifecycleSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.LifecycleSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LifecycleSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LifecycleSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HighAvailabilitySpec. */ - interface IHighAvailabilitySpec { - - /** Flag to disable managed failover for the namespace. */ - disableManagedFailover?: (boolean|null); - } - - /** Represents a HighAvailabilitySpec. */ - class HighAvailabilitySpec implements IHighAvailabilitySpec { - - /** - * Constructs a new HighAvailabilitySpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.IHighAvailabilitySpec); - - /** Flag to disable managed failover for the namespace. */ - public disableManagedFailover: boolean; - - /** - * Creates a new HighAvailabilitySpec instance using the specified properties. - * @param [properties] Properties to set - * @returns HighAvailabilitySpec instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.IHighAvailabilitySpec): temporal.api.cloud.namespace.v1.HighAvailabilitySpec; - - /** - * Encodes the specified HighAvailabilitySpec message. Does not implicitly {@link temporal.api.cloud.namespace.v1.HighAvailabilitySpec.verify|verify} messages. - * @param message HighAvailabilitySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.IHighAvailabilitySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HighAvailabilitySpec message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.HighAvailabilitySpec.verify|verify} messages. - * @param message HighAvailabilitySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.IHighAvailabilitySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HighAvailabilitySpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HighAvailabilitySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.HighAvailabilitySpec; - - /** - * Decodes a HighAvailabilitySpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HighAvailabilitySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.HighAvailabilitySpec; - - /** - * Creates a HighAvailabilitySpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HighAvailabilitySpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.HighAvailabilitySpec; - - /** - * Creates a plain object from a HighAvailabilitySpec message. Also converts values to other types if specified. - * @param message HighAvailabilitySpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.HighAvailabilitySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HighAvailabilitySpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HighAvailabilitySpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NamespaceSpec. */ - interface INamespaceSpec { - - /** - * The name to use for the namespace. - * This will create a namespace that's available at '..tmprl.cloud:7233'. - * The name is immutable. Once set, it cannot be changed. - */ - name?: (string|null); - - /** - * The ids of the regions where the namespace should be available. - * The GetRegions API can be used to get the list of valid region ids. - * Specifying more than one region makes the namespace "global", which is currently a preview only feature with restricted access. - * Please reach out to Temporal support for more information on global namespaces. - * When provisioned the global namespace will be active on the first region in the list and passive on the rest. - * Number of supported regions is 2. - * The regions is immutable. Once set, it cannot be changed. - * Example: ["aws-us-west-2"]. - */ - regions?: (string[]|null); - - /** - * The number of days the workflows data will be retained for. - * Changes to the retention period may impact your storage costs. - * Any changes to the retention period will be applied to all new running workflows. - */ - retentionDays?: (number|null); - - /** - * The mTLS auth configuration for the namespace. - * If unspecified, mTLS will be disabled. - */ - mtlsAuth?: (temporal.api.cloud.namespace.v1.IMtlsAuthSpec|null); - - /** - * The API key auth configuration for the namespace. - * If unspecified, API keys will be disabled. - * temporal:versioning:min_version=v0.2.0 - */ - apiKeyAuth?: (temporal.api.cloud.namespace.v1.IApiKeyAuthSpec|null); - - /** - * The custom search attributes to use for the namespace. - * The name of the attribute is the key and the type is the value. - * Supported attribute types: text, keyword, int, double, bool, datetime, keyword_list. - * NOTE: currently deleting a search attribute is not supported. - * Optional, default is empty. - * Deprecated: Not supported after v0.3.0 api version. Use search_attributes instead. - * temporal:versioning:max_version=v0.3.0 - */ - customSearchAttributes?: ({ [k: string]: string }|null); - - /** - * The custom search attributes to use for the namespace. - * The name of the attribute is the key and the type is the value. - * Note: currently deleting a search attribute is not supported. - * Optional, default is empty. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=custom_search_attributes - */ - searchAttributes?: ({ [k: string]: temporal.api.cloud.namespace.v1.NamespaceSpec.SearchAttributeType }|null); - - /** - * Codec server spec used by UI to decode payloads for all users interacting with this namespace. - * Optional, default is unset. - */ - codecServer?: (temporal.api.cloud.namespace.v1.ICodecServerSpec|null); - - /** - * The lifecycle configuration for the namespace. - * temporal:versioning:min_version=v0.4.0 - */ - lifecycle?: (temporal.api.cloud.namespace.v1.ILifecycleSpec|null); - - /** - * The high availability configuration for the namespace. - * temporal:versioning:min_version=v0.4.0 - */ - highAvailability?: (temporal.api.cloud.namespace.v1.IHighAvailabilitySpec|null); - - /** - * The private connectivity configuration for the namespace. - * This will apply the connectivity rules specified to the namespace. - * temporal:versioning:min_version=v0.6.0 - */ - connectivityRuleIds?: (string[]|null); - } - - /** Represents a NamespaceSpec. */ - class NamespaceSpec implements INamespaceSpec { - - /** - * Constructs a new NamespaceSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.INamespaceSpec); - - /** - * The name to use for the namespace. - * This will create a namespace that's available at '..tmprl.cloud:7233'. - * The name is immutable. Once set, it cannot be changed. - */ - public name: string; - - /** - * The ids of the regions where the namespace should be available. - * The GetRegions API can be used to get the list of valid region ids. - * Specifying more than one region makes the namespace "global", which is currently a preview only feature with restricted access. - * Please reach out to Temporal support for more information on global namespaces. - * When provisioned the global namespace will be active on the first region in the list and passive on the rest. - * Number of supported regions is 2. - * The regions is immutable. Once set, it cannot be changed. - * Example: ["aws-us-west-2"]. - */ - public regions: string[]; - - /** - * The number of days the workflows data will be retained for. - * Changes to the retention period may impact your storage costs. - * Any changes to the retention period will be applied to all new running workflows. - */ - public retentionDays: number; - - /** - * The mTLS auth configuration for the namespace. - * If unspecified, mTLS will be disabled. - */ - public mtlsAuth?: (temporal.api.cloud.namespace.v1.IMtlsAuthSpec|null); - - /** - * The API key auth configuration for the namespace. - * If unspecified, API keys will be disabled. - * temporal:versioning:min_version=v0.2.0 - */ - public apiKeyAuth?: (temporal.api.cloud.namespace.v1.IApiKeyAuthSpec|null); - - /** - * The custom search attributes to use for the namespace. - * The name of the attribute is the key and the type is the value. - * Supported attribute types: text, keyword, int, double, bool, datetime, keyword_list. - * NOTE: currently deleting a search attribute is not supported. - * Optional, default is empty. - * Deprecated: Not supported after v0.3.0 api version. Use search_attributes instead. - * temporal:versioning:max_version=v0.3.0 - */ - public customSearchAttributes: { [k: string]: string }; - - /** - * The custom search attributes to use for the namespace. - * The name of the attribute is the key and the type is the value. - * Note: currently deleting a search attribute is not supported. - * Optional, default is empty. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=custom_search_attributes - */ - public searchAttributes: { [k: string]: temporal.api.cloud.namespace.v1.NamespaceSpec.SearchAttributeType }; - - /** - * Codec server spec used by UI to decode payloads for all users interacting with this namespace. - * Optional, default is unset. - */ - public codecServer?: (temporal.api.cloud.namespace.v1.ICodecServerSpec|null); - - /** - * The lifecycle configuration for the namespace. - * temporal:versioning:min_version=v0.4.0 - */ - public lifecycle?: (temporal.api.cloud.namespace.v1.ILifecycleSpec|null); - - /** - * The high availability configuration for the namespace. - * temporal:versioning:min_version=v0.4.0 - */ - public highAvailability?: (temporal.api.cloud.namespace.v1.IHighAvailabilitySpec|null); - - /** - * The private connectivity configuration for the namespace. - * This will apply the connectivity rules specified to the namespace. - * temporal:versioning:min_version=v0.6.0 - */ - public connectivityRuleIds: string[]; - - /** - * Creates a new NamespaceSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespaceSpec instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.INamespaceSpec): temporal.api.cloud.namespace.v1.NamespaceSpec; - - /** - * Encodes the specified NamespaceSpec message. Does not implicitly {@link temporal.api.cloud.namespace.v1.NamespaceSpec.verify|verify} messages. - * @param message NamespaceSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.INamespaceSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespaceSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.NamespaceSpec.verify|verify} messages. - * @param message NamespaceSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.INamespaceSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespaceSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespaceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.NamespaceSpec; - - /** - * Decodes a NamespaceSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespaceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.NamespaceSpec; - - /** - * Creates a NamespaceSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespaceSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.NamespaceSpec; - - /** - * Creates a plain object from a NamespaceSpec message. Also converts values to other types if specified. - * @param message NamespaceSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.NamespaceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespaceSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespaceSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NamespaceSpec { - - /** SearchAttributeType enum. */ - enum SearchAttributeType { - SEARCH_ATTRIBUTE_TYPE_UNSPECIFIED = 0, - SEARCH_ATTRIBUTE_TYPE_TEXT = 1, - SEARCH_ATTRIBUTE_TYPE_KEYWORD = 2, - SEARCH_ATTRIBUTE_TYPE_INT = 3, - SEARCH_ATTRIBUTE_TYPE_DOUBLE = 4, - SEARCH_ATTRIBUTE_TYPE_BOOL = 5, - SEARCH_ATTRIBUTE_TYPE_DATETIME = 6, - SEARCH_ATTRIBUTE_TYPE_KEYWORD_LIST = 7 - } - } - - /** Properties of an Endpoints. */ - interface IEndpoints { - - /** The web UI address. */ - webAddress?: (string|null); - - /** The gRPC address for mTLS client connections (may be empty if mTLS is disabled). */ - mtlsGrpcAddress?: (string|null); - - /** The gRPC address for API key client connections (may be empty if API keys are disabled). */ - grpcAddress?: (string|null); - } - - /** Represents an Endpoints. */ - class Endpoints implements IEndpoints { - - /** - * Constructs a new Endpoints. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.IEndpoints); - - /** The web UI address. */ - public webAddress: string; - - /** The gRPC address for mTLS client connections (may be empty if mTLS is disabled). */ - public mtlsGrpcAddress: string; - - /** The gRPC address for API key client connections (may be empty if API keys are disabled). */ - public grpcAddress: string; - - /** - * Creates a new Endpoints instance using the specified properties. - * @param [properties] Properties to set - * @returns Endpoints instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.IEndpoints): temporal.api.cloud.namespace.v1.Endpoints; - - /** - * Encodes the specified Endpoints message. Does not implicitly {@link temporal.api.cloud.namespace.v1.Endpoints.verify|verify} messages. - * @param message Endpoints message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.IEndpoints, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Endpoints message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.Endpoints.verify|verify} messages. - * @param message Endpoints message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.IEndpoints, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Endpoints message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Endpoints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.Endpoints; - - /** - * Decodes an Endpoints message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Endpoints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.Endpoints; - - /** - * Creates an Endpoints message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Endpoints - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.Endpoints; - - /** - * Creates a plain object from an Endpoints message. Also converts values to other types if specified. - * @param message Endpoints - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.Endpoints, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Endpoints to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Endpoints - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Limits. */ - interface ILimits { - - /** - * The number of actions per second (APS) that is currently allowed for the namespace. - * The namespace may be throttled if its APS exceeds the limit. - */ - actionsPerSecondLimit?: (number|null); - } - - /** Represents a Limits. */ - class Limits implements ILimits { - - /** - * Constructs a new Limits. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.ILimits); - - /** - * The number of actions per second (APS) that is currently allowed for the namespace. - * The namespace may be throttled if its APS exceeds the limit. - */ - public actionsPerSecondLimit: number; - - /** - * Creates a new Limits instance using the specified properties. - * @param [properties] Properties to set - * @returns Limits instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.ILimits): temporal.api.cloud.namespace.v1.Limits; - - /** - * Encodes the specified Limits message. Does not implicitly {@link temporal.api.cloud.namespace.v1.Limits.verify|verify} messages. - * @param message Limits message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.ILimits, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Limits message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.Limits.verify|verify} messages. - * @param message Limits message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.ILimits, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Limits message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Limits - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.Limits; - - /** - * Decodes a Limits message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Limits - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.Limits; - - /** - * Creates a Limits message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Limits - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.Limits; - - /** - * Creates a plain object from a Limits message. Also converts values to other types if specified. - * @param message Limits - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.Limits, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Limits to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Limits - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a AWSPrivateLinkInfo. */ - interface IAWSPrivateLinkInfo { - - /** The list of principal arns that are allowed to access the namespace on the private link. */ - allowedPrincipalArns?: (string[]|null); - - /** The list of vpc endpoint service names that are associated with the namespace. */ - vpcEndpointServiceNames?: (string[]|null); - } - - /** Represents a AWSPrivateLinkInfo. */ - class AWSPrivateLinkInfo implements IAWSPrivateLinkInfo { - - /** - * Constructs a new AWSPrivateLinkInfo. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.IAWSPrivateLinkInfo); - - /** The list of principal arns that are allowed to access the namespace on the private link. */ - public allowedPrincipalArns: string[]; - - /** The list of vpc endpoint service names that are associated with the namespace. */ - public vpcEndpointServiceNames: string[]; - - /** - * Creates a new AWSPrivateLinkInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AWSPrivateLinkInfo instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.IAWSPrivateLinkInfo): temporal.api.cloud.namespace.v1.AWSPrivateLinkInfo; - - /** - * Encodes the specified AWSPrivateLinkInfo message. Does not implicitly {@link temporal.api.cloud.namespace.v1.AWSPrivateLinkInfo.verify|verify} messages. - * @param message AWSPrivateLinkInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.IAWSPrivateLinkInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AWSPrivateLinkInfo message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.AWSPrivateLinkInfo.verify|verify} messages. - * @param message AWSPrivateLinkInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.IAWSPrivateLinkInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a AWSPrivateLinkInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AWSPrivateLinkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.AWSPrivateLinkInfo; - - /** - * Decodes a AWSPrivateLinkInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AWSPrivateLinkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.AWSPrivateLinkInfo; - - /** - * Creates a AWSPrivateLinkInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AWSPrivateLinkInfo - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.AWSPrivateLinkInfo; - - /** - * Creates a plain object from a AWSPrivateLinkInfo message. Also converts values to other types if specified. - * @param message AWSPrivateLinkInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.AWSPrivateLinkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AWSPrivateLinkInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AWSPrivateLinkInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PrivateConnectivity. */ - interface IPrivateConnectivity { - - /** The id of the region where the private connectivity applies. */ - region?: (string|null); - - /** - * The AWS PrivateLink info. - * This will only be set for an aws region. - */ - awsPrivateLink?: (temporal.api.cloud.namespace.v1.IAWSPrivateLinkInfo|null); - } - - /** Represents a PrivateConnectivity. */ - class PrivateConnectivity implements IPrivateConnectivity { - - /** - * Constructs a new PrivateConnectivity. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.IPrivateConnectivity); - - /** The id of the region where the private connectivity applies. */ - public region: string; - - /** - * The AWS PrivateLink info. - * This will only be set for an aws region. - */ - public awsPrivateLink?: (temporal.api.cloud.namespace.v1.IAWSPrivateLinkInfo|null); - - /** - * Creates a new PrivateConnectivity instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateConnectivity instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.IPrivateConnectivity): temporal.api.cloud.namespace.v1.PrivateConnectivity; - - /** - * Encodes the specified PrivateConnectivity message. Does not implicitly {@link temporal.api.cloud.namespace.v1.PrivateConnectivity.verify|verify} messages. - * @param message PrivateConnectivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.IPrivateConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateConnectivity message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.PrivateConnectivity.verify|verify} messages. - * @param message PrivateConnectivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.IPrivateConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateConnectivity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateConnectivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.PrivateConnectivity; - - /** - * Decodes a PrivateConnectivity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateConnectivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.PrivateConnectivity; - - /** - * Creates a PrivateConnectivity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateConnectivity - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.PrivateConnectivity; - - /** - * Creates a plain object from a PrivateConnectivity message. Also converts values to other types if specified. - * @param message PrivateConnectivity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.PrivateConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateConnectivity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateConnectivity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Namespace. */ - interface INamespace { - - /** The namespace identifier. */ - namespace?: (string|null); - - /** - * The current version of the namespace specification. - * The next update operation will have to include this version. - */ - resourceVersion?: (string|null); - - /** The namespace specification. */ - spec?: (temporal.api.cloud.namespace.v1.INamespaceSpec|null); - - /** - * The current state of the namespace. - * Deprecated: Not supported after v0.3.0 api version. Use state instead. - * temporal:versioning:max_version=v0.3.0 - */ - stateDeprecated?: (string|null); - - /** - * The current state of the namespace. - * For any failed state, reach out to Temporal Cloud support for remediation. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=state_deprecated - */ - state?: (temporal.api.cloud.resource.v1.ResourceState|null); - - /** The id of the async operation that is creating/updating/deleting the namespace, if any. */ - asyncOperationId?: (string|null); - - /** The endpoints for the namespace. */ - endpoints?: (temporal.api.cloud.namespace.v1.IEndpoints|null); - - /** The currently active region for the namespace. */ - activeRegion?: (string|null); - - /** The limits set on the namespace currently. */ - limits?: (temporal.api.cloud.namespace.v1.ILimits|null); - - /** The private connectivities for the namespace, if any. */ - privateConnectivities?: (temporal.api.cloud.namespace.v1.IPrivateConnectivity[]|null); - - /** The date and time when the namespace was created. */ - createdTime?: (google.protobuf.ITimestamp|null); - - /** - * The date and time when the namespace was last modified. - * Will not be set if the namespace has never been modified. - */ - lastModifiedTime?: (google.protobuf.ITimestamp|null); - - /** - * The status of each region where the namespace is available. - * The id of the region is the key and the status is the value of the map. - */ - regionStatus?: ({ [k: string]: temporal.api.cloud.namespace.v1.INamespaceRegionStatus }|null); - - /** The connectivity rules that are set on this namespace. */ - connectivityRules?: (temporal.api.cloud.connectivityrule.v1.IConnectivityRule[]|null); - - /** The tags for the namespace. */ - tags?: ({ [k: string]: string }|null); - } - - /** Represents a Namespace. */ - class Namespace implements INamespace { - - /** - * Constructs a new Namespace. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.INamespace); - - /** The namespace identifier. */ - public namespace: string; - - /** - * The current version of the namespace specification. - * The next update operation will have to include this version. - */ - public resourceVersion: string; - - /** The namespace specification. */ - public spec?: (temporal.api.cloud.namespace.v1.INamespaceSpec|null); - - /** - * The current state of the namespace. - * Deprecated: Not supported after v0.3.0 api version. Use state instead. - * temporal:versioning:max_version=v0.3.0 - */ - public stateDeprecated: string; - - /** - * The current state of the namespace. - * For any failed state, reach out to Temporal Cloud support for remediation. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=state_deprecated - */ - public state: temporal.api.cloud.resource.v1.ResourceState; - - /** The id of the async operation that is creating/updating/deleting the namespace, if any. */ - public asyncOperationId: string; - - /** The endpoints for the namespace. */ - public endpoints?: (temporal.api.cloud.namespace.v1.IEndpoints|null); - - /** The currently active region for the namespace. */ - public activeRegion: string; - - /** The limits set on the namespace currently. */ - public limits?: (temporal.api.cloud.namespace.v1.ILimits|null); - - /** The private connectivities for the namespace, if any. */ - public privateConnectivities: temporal.api.cloud.namespace.v1.IPrivateConnectivity[]; - - /** The date and time when the namespace was created. */ - public createdTime?: (google.protobuf.ITimestamp|null); - - /** - * The date and time when the namespace was last modified. - * Will not be set if the namespace has never been modified. - */ - public lastModifiedTime?: (google.protobuf.ITimestamp|null); - - /** - * The status of each region where the namespace is available. - * The id of the region is the key and the status is the value of the map. - */ - public regionStatus: { [k: string]: temporal.api.cloud.namespace.v1.INamespaceRegionStatus }; - - /** The connectivity rules that are set on this namespace. */ - public connectivityRules: temporal.api.cloud.connectivityrule.v1.IConnectivityRule[]; - - /** The tags for the namespace. */ - public tags: { [k: string]: string }; - - /** - * Creates a new Namespace instance using the specified properties. - * @param [properties] Properties to set - * @returns Namespace instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.INamespace): temporal.api.cloud.namespace.v1.Namespace; - - /** - * Encodes the specified Namespace message. Does not implicitly {@link temporal.api.cloud.namespace.v1.Namespace.verify|verify} messages. - * @param message Namespace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.INamespace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Namespace message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.Namespace.verify|verify} messages. - * @param message Namespace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.INamespace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Namespace message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Namespace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.Namespace; - - /** - * Decodes a Namespace message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Namespace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.Namespace; - - /** - * Creates a Namespace message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Namespace - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.Namespace; - - /** - * Creates a plain object from a Namespace message. Also converts values to other types if specified. - * @param message Namespace - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.Namespace, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Namespace to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Namespace - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NamespaceRegionStatus. */ - interface INamespaceRegionStatus { - - /** - * The current state of the namespace region. - * Possible values: adding, active, passive, removing, failed. - * For any failed state, reach out to Temporal Cloud support for remediation. - * Deprecated: Not supported after v0.3.0 api version. Use state instead. - * temporal:versioning:max_version=v0.3.0 - */ - stateDeprecated?: (string|null); - - /** - * The current state of the namespace region. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=state_deprecated - */ - state?: (temporal.api.cloud.namespace.v1.NamespaceRegionStatus.State|null); - - /** The id of the async operation that is making changes to where the namespace is available, if any. */ - asyncOperationId?: (string|null); - } - - /** Represents a NamespaceRegionStatus. */ - class NamespaceRegionStatus implements INamespaceRegionStatus { - - /** - * Constructs a new NamespaceRegionStatus. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.INamespaceRegionStatus); - - /** - * The current state of the namespace region. - * Possible values: adding, active, passive, removing, failed. - * For any failed state, reach out to Temporal Cloud support for remediation. - * Deprecated: Not supported after v0.3.0 api version. Use state instead. - * temporal:versioning:max_version=v0.3.0 - */ - public stateDeprecated: string; - - /** - * The current state of the namespace region. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=state_deprecated - */ - public state: temporal.api.cloud.namespace.v1.NamespaceRegionStatus.State; - - /** The id of the async operation that is making changes to where the namespace is available, if any. */ - public asyncOperationId: string; - - /** - * Creates a new NamespaceRegionStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespaceRegionStatus instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.INamespaceRegionStatus): temporal.api.cloud.namespace.v1.NamespaceRegionStatus; - - /** - * Encodes the specified NamespaceRegionStatus message. Does not implicitly {@link temporal.api.cloud.namespace.v1.NamespaceRegionStatus.verify|verify} messages. - * @param message NamespaceRegionStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.INamespaceRegionStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespaceRegionStatus message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.NamespaceRegionStatus.verify|verify} messages. - * @param message NamespaceRegionStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.INamespaceRegionStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespaceRegionStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespaceRegionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.NamespaceRegionStatus; - - /** - * Decodes a NamespaceRegionStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespaceRegionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.NamespaceRegionStatus; - - /** - * Creates a NamespaceRegionStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespaceRegionStatus - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.NamespaceRegionStatus; - - /** - * Creates a plain object from a NamespaceRegionStatus message. Also converts values to other types if specified. - * @param message NamespaceRegionStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.NamespaceRegionStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespaceRegionStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespaceRegionStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NamespaceRegionStatus { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - STATE_ADDING = 1, - STATE_ACTIVE = 2, - STATE_PASSIVE = 3, - STATE_REMOVING = 4, - STATE_FAILED = 5 - } - } - - /** Properties of an ExportSinkSpec. */ - interface IExportSinkSpec { - - /** The unique name of the export sink, it can't be changed once set. */ - name?: (string|null); - - /** A flag indicating whether the export sink is enabled or not. */ - enabled?: (boolean|null); - - /** The S3 configuration details when destination_type is S3. */ - s3?: (temporal.api.cloud.sink.v1.IS3Spec|null); - - /** The GCS configuration details when destination_type is GCS. */ - gcs?: (temporal.api.cloud.sink.v1.IGCSSpec|null); - } - - /** Represents an ExportSinkSpec. */ - class ExportSinkSpec implements IExportSinkSpec { - - /** - * Constructs a new ExportSinkSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.IExportSinkSpec); - - /** The unique name of the export sink, it can't be changed once set. */ - public name: string; - - /** A flag indicating whether the export sink is enabled or not. */ - public enabled: boolean; - - /** The S3 configuration details when destination_type is S3. */ - public s3?: (temporal.api.cloud.sink.v1.IS3Spec|null); - - /** The GCS configuration details when destination_type is GCS. */ - public gcs?: (temporal.api.cloud.sink.v1.IGCSSpec|null); - - /** - * Creates a new ExportSinkSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportSinkSpec instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.IExportSinkSpec): temporal.api.cloud.namespace.v1.ExportSinkSpec; - - /** - * Encodes the specified ExportSinkSpec message. Does not implicitly {@link temporal.api.cloud.namespace.v1.ExportSinkSpec.verify|verify} messages. - * @param message ExportSinkSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.IExportSinkSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportSinkSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.ExportSinkSpec.verify|verify} messages. - * @param message ExportSinkSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.IExportSinkSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportSinkSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportSinkSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.ExportSinkSpec; - - /** - * Decodes an ExportSinkSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportSinkSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.ExportSinkSpec; - - /** - * Creates an ExportSinkSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportSinkSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.ExportSinkSpec; - - /** - * Creates a plain object from an ExportSinkSpec message. Also converts values to other types if specified. - * @param message ExportSinkSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.ExportSinkSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportSinkSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportSinkSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExportSink. */ - interface IExportSink { - - /** The unique name of the export sink. */ - name?: (string|null); - - /** The version of the export sink resource. */ - resourceVersion?: (string|null); - - /** The current state of the export sink. */ - state?: (temporal.api.cloud.resource.v1.ResourceState|null); - - /** The specification details of the export sink. */ - spec?: (temporal.api.cloud.namespace.v1.IExportSinkSpec|null); - - /** The health status of the export sink. */ - health?: (temporal.api.cloud.namespace.v1.ExportSink.Health|null); - - /** An error message describing any issues with the export sink, if applicable. */ - errorMessage?: (string|null); - - /** The timestamp of the latest successful data export. */ - latestDataExportTime?: (google.protobuf.ITimestamp|null); - - /** The timestamp of the last health check performed on the export sink. */ - lastHealthCheckTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents an ExportSink. */ - class ExportSink implements IExportSink { - - /** - * Constructs a new ExportSink. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.namespace.v1.IExportSink); - - /** The unique name of the export sink. */ - public name: string; - - /** The version of the export sink resource. */ - public resourceVersion: string; - - /** The current state of the export sink. */ - public state: temporal.api.cloud.resource.v1.ResourceState; - - /** The specification details of the export sink. */ - public spec?: (temporal.api.cloud.namespace.v1.IExportSinkSpec|null); - - /** The health status of the export sink. */ - public health: temporal.api.cloud.namespace.v1.ExportSink.Health; - - /** An error message describing any issues with the export sink, if applicable. */ - public errorMessage: string; - - /** The timestamp of the latest successful data export. */ - public latestDataExportTime?: (google.protobuf.ITimestamp|null); - - /** The timestamp of the last health check performed on the export sink. */ - public lastHealthCheckTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new ExportSink instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportSink instance - */ - public static create(properties?: temporal.api.cloud.namespace.v1.IExportSink): temporal.api.cloud.namespace.v1.ExportSink; - - /** - * Encodes the specified ExportSink message. Does not implicitly {@link temporal.api.cloud.namespace.v1.ExportSink.verify|verify} messages. - * @param message ExportSink message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.namespace.v1.IExportSink, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportSink message, length delimited. Does not implicitly {@link temporal.api.cloud.namespace.v1.ExportSink.verify|verify} messages. - * @param message ExportSink message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.namespace.v1.IExportSink, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportSink message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportSink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.namespace.v1.ExportSink; - - /** - * Decodes an ExportSink message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportSink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.namespace.v1.ExportSink; - - /** - * Creates an ExportSink message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportSink - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.namespace.v1.ExportSink; - - /** - * Creates a plain object from an ExportSink message. Also converts values to other types if specified. - * @param message ExportSink - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.namespace.v1.ExportSink, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportSink to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportSink - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExportSink { - - /** Health enum. */ - enum Health { - HEALTH_UNSPECIFIED = 0, - HEALTH_OK = 1, - HEALTH_ERROR_INTERNAL = 2, - HEALTH_ERROR_USER_CONFIGURATION = 3 - } - } - } - } - - /** Namespace sink. */ - namespace sink { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a S3Spec. */ - interface IS3Spec { - - /** The IAM role that Temporal Cloud assumes for writing records to the customer's S3 bucket. */ - roleName?: (string|null); - - /** The name of the destination S3 bucket where Temporal will send data. */ - bucketName?: (string|null); - - /** The region where the S3 bucket is located. */ - region?: (string|null); - - /** The AWS Key Management Service (KMS) ARN used for encryption. */ - kmsArn?: (string|null); - - /** The AWS account ID associated with the S3 bucket and the assumed role. */ - awsAccountId?: (string|null); - } - - /** Represents a S3Spec. */ - class S3Spec implements IS3Spec { - - /** - * Constructs a new S3Spec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.sink.v1.IS3Spec); - - /** The IAM role that Temporal Cloud assumes for writing records to the customer's S3 bucket. */ - public roleName: string; - - /** The name of the destination S3 bucket where Temporal will send data. */ - public bucketName: string; - - /** The region where the S3 bucket is located. */ - public region: string; - - /** The AWS Key Management Service (KMS) ARN used for encryption. */ - public kmsArn: string; - - /** The AWS account ID associated with the S3 bucket and the assumed role. */ - public awsAccountId: string; - - /** - * Creates a new S3Spec instance using the specified properties. - * @param [properties] Properties to set - * @returns S3Spec instance - */ - public static create(properties?: temporal.api.cloud.sink.v1.IS3Spec): temporal.api.cloud.sink.v1.S3Spec; - - /** - * Encodes the specified S3Spec message. Does not implicitly {@link temporal.api.cloud.sink.v1.S3Spec.verify|verify} messages. - * @param message S3Spec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.sink.v1.IS3Spec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified S3Spec message, length delimited. Does not implicitly {@link temporal.api.cloud.sink.v1.S3Spec.verify|verify} messages. - * @param message S3Spec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.sink.v1.IS3Spec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a S3Spec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns S3Spec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.sink.v1.S3Spec; - - /** - * Decodes a S3Spec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns S3Spec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.sink.v1.S3Spec; - - /** - * Creates a S3Spec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns S3Spec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.sink.v1.S3Spec; - - /** - * Creates a plain object from a S3Spec message. Also converts values to other types if specified. - * @param message S3Spec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.sink.v1.S3Spec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this S3Spec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for S3Spec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GCSSpec. */ - interface IGCSSpec { - - /** The customer service account ID that Temporal Cloud impersonates for writing records to the customer's GCS bucket. */ - saId?: (string|null); - - /** The name of the destination GCS bucket where Temporal will send data. */ - bucketName?: (string|null); - - /** The GCP project ID associated with the GCS bucket and service account. */ - gcpProjectId?: (string|null); - - /** The region of the gcs bucket */ - region?: (string|null); - } - - /** Represents a GCSSpec. */ - class GCSSpec implements IGCSSpec { - - /** - * Constructs a new GCSSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.sink.v1.IGCSSpec); - - /** The customer service account ID that Temporal Cloud impersonates for writing records to the customer's GCS bucket. */ - public saId: string; - - /** The name of the destination GCS bucket where Temporal will send data. */ - public bucketName: string; - - /** The GCP project ID associated with the GCS bucket and service account. */ - public gcpProjectId: string; - - /** The region of the gcs bucket */ - public region: string; - - /** - * Creates a new GCSSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns GCSSpec instance - */ - public static create(properties?: temporal.api.cloud.sink.v1.IGCSSpec): temporal.api.cloud.sink.v1.GCSSpec; - - /** - * Encodes the specified GCSSpec message. Does not implicitly {@link temporal.api.cloud.sink.v1.GCSSpec.verify|verify} messages. - * @param message GCSSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.sink.v1.IGCSSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GCSSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.sink.v1.GCSSpec.verify|verify} messages. - * @param message GCSSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.sink.v1.IGCSSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GCSSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GCSSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.sink.v1.GCSSpec; - - /** - * Decodes a GCSSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GCSSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.sink.v1.GCSSpec; - - /** - * Creates a GCSSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GCSSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.sink.v1.GCSSpec; - - /** - * Creates a plain object from a GCSSpec message. Also converts values to other types if specified. - * @param message GCSSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.sink.v1.GCSSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GCSSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GCSSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a KinesisSpec. */ - interface IKinesisSpec { - - /** The role Temporal Cloud assumes when writing records to Kinesis */ - roleName?: (string|null); - - /** Destination Kinesis endpoint arn for temporal to send data to. */ - destinationUri?: (string|null); - - /** The sink's region. */ - region?: (string|null); - } - - /** Represents a KinesisSpec. */ - class KinesisSpec implements IKinesisSpec { - - /** - * Constructs a new KinesisSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.sink.v1.IKinesisSpec); - - /** The role Temporal Cloud assumes when writing records to Kinesis */ - public roleName: string; - - /** Destination Kinesis endpoint arn for temporal to send data to. */ - public destinationUri: string; - - /** The sink's region. */ - public region: string; - - /** - * Creates a new KinesisSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns KinesisSpec instance - */ - public static create(properties?: temporal.api.cloud.sink.v1.IKinesisSpec): temporal.api.cloud.sink.v1.KinesisSpec; - - /** - * Encodes the specified KinesisSpec message. Does not implicitly {@link temporal.api.cloud.sink.v1.KinesisSpec.verify|verify} messages. - * @param message KinesisSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.sink.v1.IKinesisSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KinesisSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.sink.v1.KinesisSpec.verify|verify} messages. - * @param message KinesisSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.sink.v1.IKinesisSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KinesisSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KinesisSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.sink.v1.KinesisSpec; - - /** - * Decodes a KinesisSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KinesisSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.sink.v1.KinesisSpec; - - /** - * Creates a KinesisSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KinesisSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.sink.v1.KinesisSpec; - - /** - * Creates a plain object from a KinesisSpec message. Also converts values to other types if specified. - * @param message KinesisSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.sink.v1.KinesisSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KinesisSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for KinesisSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PubSubSpec. */ - interface IPubSubSpec { - - /** The customer service account id that Temporal Cloud impersonates for writing records to customer's pubsub topic */ - serviceAccountId?: (string|null); - - /** Destination pubsub topic name for us */ - topicName?: (string|null); - - /** The gcp project id of pubsub topic and service account */ - gcpProjectId?: (string|null); - } - - /** Represents a PubSubSpec. */ - class PubSubSpec implements IPubSubSpec { - - /** - * Constructs a new PubSubSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.sink.v1.IPubSubSpec); - - /** The customer service account id that Temporal Cloud impersonates for writing records to customer's pubsub topic */ - public serviceAccountId: string; - - /** Destination pubsub topic name for us */ - public topicName: string; - - /** The gcp project id of pubsub topic and service account */ - public gcpProjectId: string; - - /** - * Creates a new PubSubSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns PubSubSpec instance - */ - public static create(properties?: temporal.api.cloud.sink.v1.IPubSubSpec): temporal.api.cloud.sink.v1.PubSubSpec; - - /** - * Encodes the specified PubSubSpec message. Does not implicitly {@link temporal.api.cloud.sink.v1.PubSubSpec.verify|verify} messages. - * @param message PubSubSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.sink.v1.IPubSubSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PubSubSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.sink.v1.PubSubSpec.verify|verify} messages. - * @param message PubSubSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.sink.v1.IPubSubSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PubSubSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PubSubSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.sink.v1.PubSubSpec; - - /** - * Decodes a PubSubSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PubSubSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.sink.v1.PubSubSpec; - - /** - * Creates a PubSubSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PubSubSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.sink.v1.PubSubSpec; - - /** - * Creates a plain object from a PubSubSpec message. Also converts values to other types if specified. - * @param message PubSubSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.sink.v1.PubSubSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PubSubSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PubSubSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace connectivityrule. */ - namespace connectivityrule { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a ConnectivityRule. */ - interface IConnectivityRule { - - /** The id of the private connectivity rule. */ - id?: (string|null); - - /** The connectivity rule specification. */ - spec?: (temporal.api.cloud.connectivityrule.v1.IConnectivityRuleSpec|null); - - /** - * The current version of the connectivity rule specification. - * The next update operation will have to include this version. - */ - resourceVersion?: (string|null); - - /** ConnectivityRule state */ - state?: (temporal.api.cloud.resource.v1.ResourceState|null); - - /** The id of the async operation that is creating/updating/deleting the connectivity rule, if any. */ - asyncOperationId?: (string|null); - - /** The date and time when the connectivity rule was created. */ - createdTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a ConnectivityRule. */ - class ConnectivityRule implements IConnectivityRule { - - /** - * Constructs a new ConnectivityRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.connectivityrule.v1.IConnectivityRule); - - /** The id of the private connectivity rule. */ - public id: string; - - /** The connectivity rule specification. */ - public spec?: (temporal.api.cloud.connectivityrule.v1.IConnectivityRuleSpec|null); - - /** - * The current version of the connectivity rule specification. - * The next update operation will have to include this version. - */ - public resourceVersion: string; - - /** ConnectivityRule state. */ - public state: temporal.api.cloud.resource.v1.ResourceState; - - /** The id of the async operation that is creating/updating/deleting the connectivity rule, if any. */ - public asyncOperationId: string; - - /** The date and time when the connectivity rule was created. */ - public createdTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new ConnectivityRule instance using the specified properties. - * @param [properties] Properties to set - * @returns ConnectivityRule instance - */ - public static create(properties?: temporal.api.cloud.connectivityrule.v1.IConnectivityRule): temporal.api.cloud.connectivityrule.v1.ConnectivityRule; - - /** - * Encodes the specified ConnectivityRule message. Does not implicitly {@link temporal.api.cloud.connectivityrule.v1.ConnectivityRule.verify|verify} messages. - * @param message ConnectivityRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.connectivityrule.v1.IConnectivityRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConnectivityRule message, length delimited. Does not implicitly {@link temporal.api.cloud.connectivityrule.v1.ConnectivityRule.verify|verify} messages. - * @param message ConnectivityRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.connectivityrule.v1.IConnectivityRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConnectivityRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConnectivityRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.connectivityrule.v1.ConnectivityRule; - - /** - * Decodes a ConnectivityRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConnectivityRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.connectivityrule.v1.ConnectivityRule; - - /** - * Creates a ConnectivityRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConnectivityRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.connectivityrule.v1.ConnectivityRule; - - /** - * Creates a plain object from a ConnectivityRule message. Also converts values to other types if specified. - * @param message ConnectivityRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.connectivityrule.v1.ConnectivityRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConnectivityRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConnectivityRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ConnectivityRuleSpec. */ - interface IConnectivityRuleSpec { - - /** This allows access via public internet. */ - publicRule?: (temporal.api.cloud.connectivityrule.v1.IPublicConnectivityRule|null); - - /** This allows access via specific private vpc. */ - privateRule?: (temporal.api.cloud.connectivityrule.v1.IPrivateConnectivityRule|null); - } - - /** The connectivity rule specification passed in on create/update operations. */ - class ConnectivityRuleSpec implements IConnectivityRuleSpec { - - /** - * Constructs a new ConnectivityRuleSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.connectivityrule.v1.IConnectivityRuleSpec); - - /** This allows access via public internet. */ - public publicRule?: (temporal.api.cloud.connectivityrule.v1.IPublicConnectivityRule|null); - - /** This allows access via specific private vpc. */ - public privateRule?: (temporal.api.cloud.connectivityrule.v1.IPrivateConnectivityRule|null); - - /** ConnectivityRuleSpec connectionType. */ - public connectionType?: ("publicRule"|"privateRule"); - - /** - * Creates a new ConnectivityRuleSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ConnectivityRuleSpec instance - */ - public static create(properties?: temporal.api.cloud.connectivityrule.v1.IConnectivityRuleSpec): temporal.api.cloud.connectivityrule.v1.ConnectivityRuleSpec; - - /** - * Encodes the specified ConnectivityRuleSpec message. Does not implicitly {@link temporal.api.cloud.connectivityrule.v1.ConnectivityRuleSpec.verify|verify} messages. - * @param message ConnectivityRuleSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.connectivityrule.v1.IConnectivityRuleSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConnectivityRuleSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.connectivityrule.v1.ConnectivityRuleSpec.verify|verify} messages. - * @param message ConnectivityRuleSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.connectivityrule.v1.IConnectivityRuleSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConnectivityRuleSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConnectivityRuleSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.connectivityrule.v1.ConnectivityRuleSpec; - - /** - * Decodes a ConnectivityRuleSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConnectivityRuleSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.connectivityrule.v1.ConnectivityRuleSpec; - - /** - * Creates a ConnectivityRuleSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConnectivityRuleSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.connectivityrule.v1.ConnectivityRuleSpec; - - /** - * Creates a plain object from a ConnectivityRuleSpec message. Also converts values to other types if specified. - * @param message ConnectivityRuleSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.connectivityrule.v1.ConnectivityRuleSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConnectivityRuleSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConnectivityRuleSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PublicConnectivityRule. */ - interface IPublicConnectivityRule { - } - - /** A public connectivity rule allows access to the namespace via the public internet. */ - class PublicConnectivityRule implements IPublicConnectivityRule { - - /** - * Constructs a new PublicConnectivityRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.connectivityrule.v1.IPublicConnectivityRule); - - /** - * Creates a new PublicConnectivityRule instance using the specified properties. - * @param [properties] Properties to set - * @returns PublicConnectivityRule instance - */ - public static create(properties?: temporal.api.cloud.connectivityrule.v1.IPublicConnectivityRule): temporal.api.cloud.connectivityrule.v1.PublicConnectivityRule; - - /** - * Encodes the specified PublicConnectivityRule message. Does not implicitly {@link temporal.api.cloud.connectivityrule.v1.PublicConnectivityRule.verify|verify} messages. - * @param message PublicConnectivityRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.connectivityrule.v1.IPublicConnectivityRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PublicConnectivityRule message, length delimited. Does not implicitly {@link temporal.api.cloud.connectivityrule.v1.PublicConnectivityRule.verify|verify} messages. - * @param message PublicConnectivityRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.connectivityrule.v1.IPublicConnectivityRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PublicConnectivityRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PublicConnectivityRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.connectivityrule.v1.PublicConnectivityRule; - - /** - * Decodes a PublicConnectivityRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PublicConnectivityRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.connectivityrule.v1.PublicConnectivityRule; - - /** - * Creates a PublicConnectivityRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PublicConnectivityRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.connectivityrule.v1.PublicConnectivityRule; - - /** - * Creates a plain object from a PublicConnectivityRule message. Also converts values to other types if specified. - * @param message PublicConnectivityRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.connectivityrule.v1.PublicConnectivityRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PublicConnectivityRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PublicConnectivityRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PrivateConnectivityRule. */ - interface IPrivateConnectivityRule { - - /** Connection id provided to enforce the private connectivity. This is required both by AWS and GCP. */ - connectionId?: (string|null); - - /** - * For GCP private connectivity service, GCP needs both GCP project id and the Private Service Connect Connection IDs - * AWS only needs the connection_id - */ - gcpProjectId?: (string|null); - - /** - * The region of the connectivity rule. This should align with the namespace. - * Example: "aws-us-west-2" - */ - region?: (string|null); - } - - /** A private connectivity rule allows connections from a specific private vpc only. */ - class PrivateConnectivityRule implements IPrivateConnectivityRule { - - /** - * Constructs a new PrivateConnectivityRule. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.connectivityrule.v1.IPrivateConnectivityRule); - - /** Connection id provided to enforce the private connectivity. This is required both by AWS and GCP. */ - public connectionId: string; - - /** - * For GCP private connectivity service, GCP needs both GCP project id and the Private Service Connect Connection IDs - * AWS only needs the connection_id - */ - public gcpProjectId: string; - - /** - * The region of the connectivity rule. This should align with the namespace. - * Example: "aws-us-west-2" - */ - public region: string; - - /** - * Creates a new PrivateConnectivityRule instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateConnectivityRule instance - */ - public static create(properties?: temporal.api.cloud.connectivityrule.v1.IPrivateConnectivityRule): temporal.api.cloud.connectivityrule.v1.PrivateConnectivityRule; - - /** - * Encodes the specified PrivateConnectivityRule message. Does not implicitly {@link temporal.api.cloud.connectivityrule.v1.PrivateConnectivityRule.verify|verify} messages. - * @param message PrivateConnectivityRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.connectivityrule.v1.IPrivateConnectivityRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateConnectivityRule message, length delimited. Does not implicitly {@link temporal.api.cloud.connectivityrule.v1.PrivateConnectivityRule.verify|verify} messages. - * @param message PrivateConnectivityRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.connectivityrule.v1.IPrivateConnectivityRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateConnectivityRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateConnectivityRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.connectivityrule.v1.PrivateConnectivityRule; - - /** - * Decodes a PrivateConnectivityRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateConnectivityRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.connectivityrule.v1.PrivateConnectivityRule; - - /** - * Creates a PrivateConnectivityRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateConnectivityRule - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.connectivityrule.v1.PrivateConnectivityRule; - - /** - * Creates a plain object from a PrivateConnectivityRule message. Also converts values to other types if specified. - * @param message PrivateConnectivityRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.connectivityrule.v1.PrivateConnectivityRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateConnectivityRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateConnectivityRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace nexus. */ - namespace nexus { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of an EndpointSpec. */ - interface IEndpointSpec { - - /** - * The name of the endpoint. Must be unique within an account. - * The name must match `^[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9]$`. - * This field is mutable. - */ - name?: (string|null); - - /** Indicates where the endpoint should forward received nexus requests to. */ - targetSpec?: (temporal.api.cloud.nexus.v1.IEndpointTargetSpec|null); - - /** - * The set of policies (e.g. authorization) for the endpoint. Each request's caller - * must match with at least one of the specs to be accepted by the endpoint. - * This field is mutable. - */ - policySpecs?: (temporal.api.cloud.nexus.v1.IEndpointPolicySpec[]|null); - - /** - * Deprecated: Not supported after v0.4.0 api version. Use description instead. - * temporal:versioning:max_version=v0.4.0 - */ - descriptionDeprecated?: (string|null); - - /** - * The markdown description of the endpoint - optional. - * temporal:versioning:min_version=v0.4.0 - */ - description?: (temporal.api.common.v1.IPayload|null); - } - - /** Represents an EndpointSpec. */ - class EndpointSpec implements IEndpointSpec { - - /** - * Constructs a new EndpointSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.nexus.v1.IEndpointSpec); - - /** - * The name of the endpoint. Must be unique within an account. - * The name must match `^[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9]$`. - * This field is mutable. - */ - public name: string; - - /** Indicates where the endpoint should forward received nexus requests to. */ - public targetSpec?: (temporal.api.cloud.nexus.v1.IEndpointTargetSpec|null); - - /** - * The set of policies (e.g. authorization) for the endpoint. Each request's caller - * must match with at least one of the specs to be accepted by the endpoint. - * This field is mutable. - */ - public policySpecs: temporal.api.cloud.nexus.v1.IEndpointPolicySpec[]; - - /** - * Deprecated: Not supported after v0.4.0 api version. Use description instead. - * temporal:versioning:max_version=v0.4.0 - */ - public descriptionDeprecated: string; - - /** - * The markdown description of the endpoint - optional. - * temporal:versioning:min_version=v0.4.0 - */ - public description?: (temporal.api.common.v1.IPayload|null); - - /** - * Creates a new EndpointSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns EndpointSpec instance - */ - public static create(properties?: temporal.api.cloud.nexus.v1.IEndpointSpec): temporal.api.cloud.nexus.v1.EndpointSpec; - - /** - * Encodes the specified EndpointSpec message. Does not implicitly {@link temporal.api.cloud.nexus.v1.EndpointSpec.verify|verify} messages. - * @param message EndpointSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.nexus.v1.IEndpointSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EndpointSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.nexus.v1.EndpointSpec.verify|verify} messages. - * @param message EndpointSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.nexus.v1.IEndpointSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EndpointSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EndpointSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.nexus.v1.EndpointSpec; - - /** - * Decodes an EndpointSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EndpointSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.nexus.v1.EndpointSpec; - - /** - * Creates an EndpointSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EndpointSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.nexus.v1.EndpointSpec; - - /** - * Creates a plain object from an EndpointSpec message. Also converts values to other types if specified. - * @param message EndpointSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.nexus.v1.EndpointSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EndpointSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EndpointSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EndpointTargetSpec. */ - interface IEndpointTargetSpec { - - /** A target spec for routing nexus requests to a specific cloud namespace worker. */ - workerTargetSpec?: (temporal.api.cloud.nexus.v1.IWorkerTargetSpec|null); - } - - /** Represents an EndpointTargetSpec. */ - class EndpointTargetSpec implements IEndpointTargetSpec { - - /** - * Constructs a new EndpointTargetSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.nexus.v1.IEndpointTargetSpec); - - /** A target spec for routing nexus requests to a specific cloud namespace worker. */ - public workerTargetSpec?: (temporal.api.cloud.nexus.v1.IWorkerTargetSpec|null); - - /** EndpointTargetSpec variant. */ - public variant?: "workerTargetSpec"; - - /** - * Creates a new EndpointTargetSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns EndpointTargetSpec instance - */ - public static create(properties?: temporal.api.cloud.nexus.v1.IEndpointTargetSpec): temporal.api.cloud.nexus.v1.EndpointTargetSpec; - - /** - * Encodes the specified EndpointTargetSpec message. Does not implicitly {@link temporal.api.cloud.nexus.v1.EndpointTargetSpec.verify|verify} messages. - * @param message EndpointTargetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.nexus.v1.IEndpointTargetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EndpointTargetSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.nexus.v1.EndpointTargetSpec.verify|verify} messages. - * @param message EndpointTargetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.nexus.v1.IEndpointTargetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EndpointTargetSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EndpointTargetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.nexus.v1.EndpointTargetSpec; - - /** - * Decodes an EndpointTargetSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EndpointTargetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.nexus.v1.EndpointTargetSpec; - - /** - * Creates an EndpointTargetSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EndpointTargetSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.nexus.v1.EndpointTargetSpec; - - /** - * Creates a plain object from an EndpointTargetSpec message. Also converts values to other types if specified. - * @param message EndpointTargetSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.nexus.v1.EndpointTargetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EndpointTargetSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EndpointTargetSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerTargetSpec. */ - interface IWorkerTargetSpec { - - /** The target cloud namespace to route requests to. Namespace must be in same account as the endpoint. This field is mutable. */ - namespaceId?: (string|null); - - /** The task queue on the cloud namespace to route requests to. This field is mutable. */ - taskQueue?: (string|null); - } - - /** Represents a WorkerTargetSpec. */ - class WorkerTargetSpec implements IWorkerTargetSpec { - - /** - * Constructs a new WorkerTargetSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.nexus.v1.IWorkerTargetSpec); - - /** The target cloud namespace to route requests to. Namespace must be in same account as the endpoint. This field is mutable. */ - public namespaceId: string; - - /** The task queue on the cloud namespace to route requests to. This field is mutable. */ - public taskQueue: string; - - /** - * Creates a new WorkerTargetSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerTargetSpec instance - */ - public static create(properties?: temporal.api.cloud.nexus.v1.IWorkerTargetSpec): temporal.api.cloud.nexus.v1.WorkerTargetSpec; - - /** - * Encodes the specified WorkerTargetSpec message. Does not implicitly {@link temporal.api.cloud.nexus.v1.WorkerTargetSpec.verify|verify} messages. - * @param message WorkerTargetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.nexus.v1.IWorkerTargetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerTargetSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.nexus.v1.WorkerTargetSpec.verify|verify} messages. - * @param message WorkerTargetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.nexus.v1.IWorkerTargetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerTargetSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerTargetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.nexus.v1.WorkerTargetSpec; - - /** - * Decodes a WorkerTargetSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerTargetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.nexus.v1.WorkerTargetSpec; - - /** - * Creates a WorkerTargetSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerTargetSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.nexus.v1.WorkerTargetSpec; - - /** - * Creates a plain object from a WorkerTargetSpec message. Also converts values to other types if specified. - * @param message WorkerTargetSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.nexus.v1.WorkerTargetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerTargetSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerTargetSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EndpointPolicySpec. */ - interface IEndpointPolicySpec { - - /** A policy spec that allows one caller namespace to access the endpoint. */ - allowedCloudNamespacePolicySpec?: (temporal.api.cloud.nexus.v1.IAllowedCloudNamespacePolicySpec|null); - } - - /** Represents an EndpointPolicySpec. */ - class EndpointPolicySpec implements IEndpointPolicySpec { - - /** - * Constructs a new EndpointPolicySpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.nexus.v1.IEndpointPolicySpec); - - /** A policy spec that allows one caller namespace to access the endpoint. */ - public allowedCloudNamespacePolicySpec?: (temporal.api.cloud.nexus.v1.IAllowedCloudNamespacePolicySpec|null); - - /** EndpointPolicySpec variant. */ - public variant?: "allowedCloudNamespacePolicySpec"; - - /** - * Creates a new EndpointPolicySpec instance using the specified properties. - * @param [properties] Properties to set - * @returns EndpointPolicySpec instance - */ - public static create(properties?: temporal.api.cloud.nexus.v1.IEndpointPolicySpec): temporal.api.cloud.nexus.v1.EndpointPolicySpec; - - /** - * Encodes the specified EndpointPolicySpec message. Does not implicitly {@link temporal.api.cloud.nexus.v1.EndpointPolicySpec.verify|verify} messages. - * @param message EndpointPolicySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.nexus.v1.IEndpointPolicySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EndpointPolicySpec message, length delimited. Does not implicitly {@link temporal.api.cloud.nexus.v1.EndpointPolicySpec.verify|verify} messages. - * @param message EndpointPolicySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.nexus.v1.IEndpointPolicySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EndpointPolicySpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EndpointPolicySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.nexus.v1.EndpointPolicySpec; - - /** - * Decodes an EndpointPolicySpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EndpointPolicySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.nexus.v1.EndpointPolicySpec; - - /** - * Creates an EndpointPolicySpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EndpointPolicySpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.nexus.v1.EndpointPolicySpec; - - /** - * Creates a plain object from an EndpointPolicySpec message. Also converts values to other types if specified. - * @param message EndpointPolicySpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.nexus.v1.EndpointPolicySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EndpointPolicySpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EndpointPolicySpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AllowedCloudNamespacePolicySpec. */ - interface IAllowedCloudNamespacePolicySpec { - - /** The namespace that is allowed to call into this endpoint. Calling namespace must be in same account as the endpoint. */ - namespaceId?: (string|null); - } - - /** Represents an AllowedCloudNamespacePolicySpec. */ - class AllowedCloudNamespacePolicySpec implements IAllowedCloudNamespacePolicySpec { - - /** - * Constructs a new AllowedCloudNamespacePolicySpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.nexus.v1.IAllowedCloudNamespacePolicySpec); - - /** The namespace that is allowed to call into this endpoint. Calling namespace must be in same account as the endpoint. */ - public namespaceId: string; - - /** - * Creates a new AllowedCloudNamespacePolicySpec instance using the specified properties. - * @param [properties] Properties to set - * @returns AllowedCloudNamespacePolicySpec instance - */ - public static create(properties?: temporal.api.cloud.nexus.v1.IAllowedCloudNamespacePolicySpec): temporal.api.cloud.nexus.v1.AllowedCloudNamespacePolicySpec; - - /** - * Encodes the specified AllowedCloudNamespacePolicySpec message. Does not implicitly {@link temporal.api.cloud.nexus.v1.AllowedCloudNamespacePolicySpec.verify|verify} messages. - * @param message AllowedCloudNamespacePolicySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.nexus.v1.IAllowedCloudNamespacePolicySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AllowedCloudNamespacePolicySpec message, length delimited. Does not implicitly {@link temporal.api.cloud.nexus.v1.AllowedCloudNamespacePolicySpec.verify|verify} messages. - * @param message AllowedCloudNamespacePolicySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.nexus.v1.IAllowedCloudNamespacePolicySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AllowedCloudNamespacePolicySpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AllowedCloudNamespacePolicySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.nexus.v1.AllowedCloudNamespacePolicySpec; - - /** - * Decodes an AllowedCloudNamespacePolicySpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AllowedCloudNamespacePolicySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.nexus.v1.AllowedCloudNamespacePolicySpec; - - /** - * Creates an AllowedCloudNamespacePolicySpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AllowedCloudNamespacePolicySpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.nexus.v1.AllowedCloudNamespacePolicySpec; - - /** - * Creates a plain object from an AllowedCloudNamespacePolicySpec message. Also converts values to other types if specified. - * @param message AllowedCloudNamespacePolicySpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.nexus.v1.AllowedCloudNamespacePolicySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AllowedCloudNamespacePolicySpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AllowedCloudNamespacePolicySpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Endpoint. */ - interface IEndpoint { - - /** The id of the endpoint. This is generated by the server and is immutable. */ - id?: (string|null); - - /** - * The current version of the endpoint specification. - * The next update operation must include this version. - */ - resourceVersion?: (string|null); - - /** The endpoint specification. */ - spec?: (temporal.api.cloud.nexus.v1.IEndpointSpec|null); - - /** - * The current state of the endpoint. - * For any failed state, reach out to Temporal Cloud support for remediation. - */ - state?: (temporal.api.cloud.resource.v1.ResourceState|null); - - /** The id of any ongoing async operation that is creating, updating, or deleting the endpoint, if any. */ - asyncOperationId?: (string|null); - - /** The date and time when the endpoint was created. */ - createdTime?: (google.protobuf.ITimestamp|null); - - /** The date and time when the endpoint was last modified. */ - lastModifiedTime?: (google.protobuf.ITimestamp|null); - } - - /** An endpoint that receives and then routes Nexus requests */ - class Endpoint implements IEndpoint { - - /** - * Constructs a new Endpoint. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.nexus.v1.IEndpoint); - - /** The id of the endpoint. This is generated by the server and is immutable. */ - public id: string; - - /** - * The current version of the endpoint specification. - * The next update operation must include this version. - */ - public resourceVersion: string; - - /** The endpoint specification. */ - public spec?: (temporal.api.cloud.nexus.v1.IEndpointSpec|null); - - /** - * The current state of the endpoint. - * For any failed state, reach out to Temporal Cloud support for remediation. - */ - public state: temporal.api.cloud.resource.v1.ResourceState; - - /** The id of any ongoing async operation that is creating, updating, or deleting the endpoint, if any. */ - public asyncOperationId: string; - - /** The date and time when the endpoint was created. */ - public createdTime?: (google.protobuf.ITimestamp|null); - - /** The date and time when the endpoint was last modified. */ - public lastModifiedTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new Endpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns Endpoint instance - */ - public static create(properties?: temporal.api.cloud.nexus.v1.IEndpoint): temporal.api.cloud.nexus.v1.Endpoint; - - /** - * Encodes the specified Endpoint message. Does not implicitly {@link temporal.api.cloud.nexus.v1.Endpoint.verify|verify} messages. - * @param message Endpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.nexus.v1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link temporal.api.cloud.nexus.v1.Endpoint.verify|verify} messages. - * @param message Endpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.nexus.v1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Endpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.nexus.v1.Endpoint; - - /** - * Decodes an Endpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.nexus.v1.Endpoint; - - /** - * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Endpoint - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.nexus.v1.Endpoint; - - /** - * Creates a plain object from an Endpoint message. Also converts values to other types if specified. - * @param message Endpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.nexus.v1.Endpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Endpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Endpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace region. */ - namespace region { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a Region. */ - interface IRegion { - - /** The id of the temporal cloud region. */ - id?: (string|null); - - /** - * The name of the cloud provider that's hosting the region. - * Currently only "aws" is supported. - * Deprecated: Not supported after v0.3.0 api version. Use cloud_provider instead. - * temporal:versioning:max_version=v0.3.0 - */ - cloudProviderDeprecated?: (string|null); - - /** - * The cloud provider that's hosting the region. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=cloud_provider_deprecated - */ - cloudProvider?: (temporal.api.cloud.region.v1.Region.CloudProvider|null); - - /** The region identifier as defined by the cloud provider. */ - cloudProviderRegion?: (string|null); - - /** The human readable location of the region. */ - location?: (string|null); - } - - /** Represents a Region. */ - class Region implements IRegion { - - /** - * Constructs a new Region. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.region.v1.IRegion); - - /** The id of the temporal cloud region. */ - public id: string; - - /** - * The name of the cloud provider that's hosting the region. - * Currently only "aws" is supported. - * Deprecated: Not supported after v0.3.0 api version. Use cloud_provider instead. - * temporal:versioning:max_version=v0.3.0 - */ - public cloudProviderDeprecated: string; - - /** - * The cloud provider that's hosting the region. - * temporal:versioning:min_version=v0.3.0 - * temporal:enums:replaces=cloud_provider_deprecated - */ - public cloudProvider: temporal.api.cloud.region.v1.Region.CloudProvider; - - /** The region identifier as defined by the cloud provider. */ - public cloudProviderRegion: string; - - /** The human readable location of the region. */ - public location: string; - - /** - * Creates a new Region instance using the specified properties. - * @param [properties] Properties to set - * @returns Region instance - */ - public static create(properties?: temporal.api.cloud.region.v1.IRegion): temporal.api.cloud.region.v1.Region; - - /** - * Encodes the specified Region message. Does not implicitly {@link temporal.api.cloud.region.v1.Region.verify|verify} messages. - * @param message Region message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.region.v1.IRegion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Region message, length delimited. Does not implicitly {@link temporal.api.cloud.region.v1.Region.verify|verify} messages. - * @param message Region message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.region.v1.IRegion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Region message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Region - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.region.v1.Region; - - /** - * Decodes a Region message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Region - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.region.v1.Region; - - /** - * Creates a Region message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Region - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.region.v1.Region; - - /** - * Creates a plain object from a Region message. Also converts values to other types if specified. - * @param message Region - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.region.v1.Region, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Region to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Region - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Region { - - /** The cloud provider that's hosting the region. */ - enum CloudProvider { - CLOUD_PROVIDER_UNSPECIFIED = 0, - CLOUD_PROVIDER_AWS = 1, - CLOUD_PROVIDER_GCP = 2 - } - } - } - } - - /** Namespace account. */ - namespace account { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a MetricsSpec. */ - interface IMetricsSpec { - - /** - * The ca cert(s) in PEM format that clients connecting to the metrics endpoint can use for authentication. - * This must only be one value, but the CA can have a chain. - */ - acceptedClientCa?: (Uint8Array|null); - } - - /** Represents a MetricsSpec. */ - class MetricsSpec implements IMetricsSpec { - - /** - * Constructs a new MetricsSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.account.v1.IMetricsSpec); - - /** - * The ca cert(s) in PEM format that clients connecting to the metrics endpoint can use for authentication. - * This must only be one value, but the CA can have a chain. - */ - public acceptedClientCa: Uint8Array; - - /** - * Creates a new MetricsSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricsSpec instance - */ - public static create(properties?: temporal.api.cloud.account.v1.IMetricsSpec): temporal.api.cloud.account.v1.MetricsSpec; - - /** - * Encodes the specified MetricsSpec message. Does not implicitly {@link temporal.api.cloud.account.v1.MetricsSpec.verify|verify} messages. - * @param message MetricsSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.account.v1.IMetricsSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricsSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.account.v1.MetricsSpec.verify|verify} messages. - * @param message MetricsSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.account.v1.IMetricsSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricsSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricsSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.account.v1.MetricsSpec; - - /** - * Decodes a MetricsSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricsSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.account.v1.MetricsSpec; - - /** - * Creates a MetricsSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricsSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.account.v1.MetricsSpec; - - /** - * Creates a plain object from a MetricsSpec message. Also converts values to other types if specified. - * @param message MetricsSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.account.v1.MetricsSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricsSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetricsSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AccountSpec. */ - interface IAccountSpec { - - /** - * The metrics specification for this account. - * If not specified, metrics will not be enabled. - */ - metrics?: (temporal.api.cloud.account.v1.IMetricsSpec|null); - } - - /** Represents an AccountSpec. */ - class AccountSpec implements IAccountSpec { - - /** - * Constructs a new AccountSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.account.v1.IAccountSpec); - - /** - * The metrics specification for this account. - * If not specified, metrics will not be enabled. - */ - public metrics?: (temporal.api.cloud.account.v1.IMetricsSpec|null); - - /** - * Creates a new AccountSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns AccountSpec instance - */ - public static create(properties?: temporal.api.cloud.account.v1.IAccountSpec): temporal.api.cloud.account.v1.AccountSpec; - - /** - * Encodes the specified AccountSpec message. Does not implicitly {@link temporal.api.cloud.account.v1.AccountSpec.verify|verify} messages. - * @param message AccountSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.account.v1.IAccountSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AccountSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.account.v1.AccountSpec.verify|verify} messages. - * @param message AccountSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.account.v1.IAccountSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AccountSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AccountSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.account.v1.AccountSpec; - - /** - * Decodes an AccountSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AccountSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.account.v1.AccountSpec; - - /** - * Creates an AccountSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AccountSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.account.v1.AccountSpec; - - /** - * Creates a plain object from an AccountSpec message. Also converts values to other types if specified. - * @param message AccountSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.account.v1.AccountSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AccountSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AccountSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Metrics. */ - interface IMetrics { - - /** - * The prometheus metrics endpoint uri. - * This is only populated when the metrics is enabled in the metrics specification. - */ - uri?: (string|null); - } - - /** Represents a Metrics. */ - class Metrics implements IMetrics { - - /** - * Constructs a new Metrics. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.account.v1.IMetrics); - - /** - * The prometheus metrics endpoint uri. - * This is only populated when the metrics is enabled in the metrics specification. - */ - public uri: string; - - /** - * Creates a new Metrics instance using the specified properties. - * @param [properties] Properties to set - * @returns Metrics instance - */ - public static create(properties?: temporal.api.cloud.account.v1.IMetrics): temporal.api.cloud.account.v1.Metrics; - - /** - * Encodes the specified Metrics message. Does not implicitly {@link temporal.api.cloud.account.v1.Metrics.verify|verify} messages. - * @param message Metrics message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.account.v1.IMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metrics message, length delimited. Does not implicitly {@link temporal.api.cloud.account.v1.Metrics.verify|verify} messages. - * @param message Metrics message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.account.v1.IMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metrics message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.account.v1.Metrics; - - /** - * Decodes a Metrics message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.account.v1.Metrics; - - /** - * Creates a Metrics message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metrics - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.account.v1.Metrics; - - /** - * Creates a plain object from a Metrics message. Also converts values to other types if specified. - * @param message Metrics - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.account.v1.Metrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metrics to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metrics - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Account. */ - interface IAccount { - - /** The id of the account. */ - id?: (string|null); - - /** The account specification. */ - spec?: (temporal.api.cloud.account.v1.IAccountSpec|null); - - /** - * The current version of the account specification. - * The next update operation will have to include this version. - */ - resourceVersion?: (string|null); - - /** The current state of the account. */ - state?: (temporal.api.cloud.resource.v1.ResourceState|null); - - /** The id of the async operation that is updating the account, if any. */ - asyncOperationId?: (string|null); - - /** Information related to metrics. */ - metrics?: (temporal.api.cloud.account.v1.IMetrics|null); - } - - /** Represents an Account. */ - class Account implements IAccount { - - /** - * Constructs a new Account. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.account.v1.IAccount); - - /** The id of the account. */ - public id: string; - - /** The account specification. */ - public spec?: (temporal.api.cloud.account.v1.IAccountSpec|null); - - /** - * The current version of the account specification. - * The next update operation will have to include this version. - */ - public resourceVersion: string; - - /** The current state of the account. */ - public state: temporal.api.cloud.resource.v1.ResourceState; - - /** The id of the async operation that is updating the account, if any. */ - public asyncOperationId: string; - - /** Information related to metrics. */ - public metrics?: (temporal.api.cloud.account.v1.IMetrics|null); - - /** - * Creates a new Account instance using the specified properties. - * @param [properties] Properties to set - * @returns Account instance - */ - public static create(properties?: temporal.api.cloud.account.v1.IAccount): temporal.api.cloud.account.v1.Account; - - /** - * Encodes the specified Account message. Does not implicitly {@link temporal.api.cloud.account.v1.Account.verify|verify} messages. - * @param message Account message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.account.v1.IAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Account message, length delimited. Does not implicitly {@link temporal.api.cloud.account.v1.Account.verify|verify} messages. - * @param message Account message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.account.v1.IAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Account message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Account - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.account.v1.Account; - - /** - * Decodes an Account message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Account - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.account.v1.Account; - - /** - * Creates an Account message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Account - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.account.v1.Account; - - /** - * Creates a plain object from an Account message. Also converts values to other types if specified. - * @param message Account - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.account.v1.Account, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Account to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Account - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AuditLogSinkSpec. */ - interface IAuditLogSinkSpec { - - /** Name of the sink e.g. "audit_log_01" */ - name?: (string|null); - - /** The KinesisSpec when destination_type is Kinesis */ - kinesisSink?: (temporal.api.cloud.sink.v1.IKinesisSpec|null); - - /** The PubSubSpec when destination_type is PubSub */ - pubSubSink?: (temporal.api.cloud.sink.v1.IPubSubSpec|null); - - /** Enabled indicates whether the sink is enabled or not. */ - enabled?: (boolean|null); - } - - /** AuditLogSinkSpec is only used by Audit Log */ - class AuditLogSinkSpec implements IAuditLogSinkSpec { - - /** - * Constructs a new AuditLogSinkSpec. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.account.v1.IAuditLogSinkSpec); - - /** Name of the sink e.g. "audit_log_01" */ - public name: string; - - /** The KinesisSpec when destination_type is Kinesis */ - public kinesisSink?: (temporal.api.cloud.sink.v1.IKinesisSpec|null); - - /** The PubSubSpec when destination_type is PubSub */ - public pubSubSink?: (temporal.api.cloud.sink.v1.IPubSubSpec|null); - - /** Enabled indicates whether the sink is enabled or not. */ - public enabled: boolean; - - /** AuditLogSinkSpec sinkType. */ - public sinkType?: ("kinesisSink"|"pubSubSink"); - - /** - * Creates a new AuditLogSinkSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditLogSinkSpec instance - */ - public static create(properties?: temporal.api.cloud.account.v1.IAuditLogSinkSpec): temporal.api.cloud.account.v1.AuditLogSinkSpec; - - /** - * Encodes the specified AuditLogSinkSpec message. Does not implicitly {@link temporal.api.cloud.account.v1.AuditLogSinkSpec.verify|verify} messages. - * @param message AuditLogSinkSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.account.v1.IAuditLogSinkSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditLogSinkSpec message, length delimited. Does not implicitly {@link temporal.api.cloud.account.v1.AuditLogSinkSpec.verify|verify} messages. - * @param message AuditLogSinkSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.account.v1.IAuditLogSinkSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditLogSinkSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditLogSinkSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.account.v1.AuditLogSinkSpec; - - /** - * Decodes an AuditLogSinkSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditLogSinkSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.account.v1.AuditLogSinkSpec; - - /** - * Creates an AuditLogSinkSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditLogSinkSpec - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.account.v1.AuditLogSinkSpec; - - /** - * Creates a plain object from an AuditLogSinkSpec message. Also converts values to other types if specified. - * @param message AuditLogSinkSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.account.v1.AuditLogSinkSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditLogSinkSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditLogSinkSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace usage. */ - namespace usage { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a Summary. */ - interface ISummary { - - /** Start of UTC day for now (inclusive) */ - startTime?: (google.protobuf.ITimestamp|null); - - /** End of UTC day for now (exclusive) */ - endTime?: (google.protobuf.ITimestamp|null); - - /** Records grouped by namespace */ - recordGroups?: (temporal.api.cloud.usage.v1.IRecordGroup[]|null); - - /** - * True if data for given time window is not fully available yet (e.g. delays) - * When true, records for the given time range could still be added/updated in the future (until false) - */ - incomplete?: (boolean|null); - } - - /** Represents a Summary. */ - class Summary implements ISummary { - - /** - * Constructs a new Summary. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.usage.v1.ISummary); - - /** Start of UTC day for now (inclusive) */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** End of UTC day for now (exclusive) */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** Records grouped by namespace */ - public recordGroups: temporal.api.cloud.usage.v1.IRecordGroup[]; - - /** - * True if data for given time window is not fully available yet (e.g. delays) - * When true, records for the given time range could still be added/updated in the future (until false) - */ - public incomplete: boolean; - - /** - * Creates a new Summary instance using the specified properties. - * @param [properties] Properties to set - * @returns Summary instance - */ - public static create(properties?: temporal.api.cloud.usage.v1.ISummary): temporal.api.cloud.usage.v1.Summary; - - /** - * Encodes the specified Summary message. Does not implicitly {@link temporal.api.cloud.usage.v1.Summary.verify|verify} messages. - * @param message Summary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.usage.v1.ISummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Summary message, length delimited. Does not implicitly {@link temporal.api.cloud.usage.v1.Summary.verify|verify} messages. - * @param message Summary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.usage.v1.ISummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Summary message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Summary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.usage.v1.Summary; - - /** - * Decodes a Summary message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Summary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.usage.v1.Summary; - - /** - * Creates a Summary message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Summary - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.usage.v1.Summary; - - /** - * Creates a plain object from a Summary message. Also converts values to other types if specified. - * @param message Summary - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.usage.v1.Summary, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Summary to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Summary - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RecordGroup. */ - interface IRecordGroup { - - /** GroupBy keys and their values for this record group. Multiple fields are combined with logical AND. */ - groupBys?: (temporal.api.cloud.usage.v1.IGroupBy[]|null); - - /** RecordGroup records */ - records?: (temporal.api.cloud.usage.v1.IRecord[]|null); - } - - /** Represents a RecordGroup. */ - class RecordGroup implements IRecordGroup { - - /** - * Constructs a new RecordGroup. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.usage.v1.IRecordGroup); - - /** GroupBy keys and their values for this record group. Multiple fields are combined with logical AND. */ - public groupBys: temporal.api.cloud.usage.v1.IGroupBy[]; - - /** RecordGroup records. */ - public records: temporal.api.cloud.usage.v1.IRecord[]; - - /** - * Creates a new RecordGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns RecordGroup instance - */ - public static create(properties?: temporal.api.cloud.usage.v1.IRecordGroup): temporal.api.cloud.usage.v1.RecordGroup; - - /** - * Encodes the specified RecordGroup message. Does not implicitly {@link temporal.api.cloud.usage.v1.RecordGroup.verify|verify} messages. - * @param message RecordGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.usage.v1.IRecordGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecordGroup message, length delimited. Does not implicitly {@link temporal.api.cloud.usage.v1.RecordGroup.verify|verify} messages. - * @param message RecordGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.usage.v1.IRecordGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecordGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecordGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.usage.v1.RecordGroup; - - /** - * Decodes a RecordGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecordGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.usage.v1.RecordGroup; - - /** - * Creates a RecordGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecordGroup - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.usage.v1.RecordGroup; - - /** - * Creates a plain object from a RecordGroup message. Also converts values to other types if specified. - * @param message RecordGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.usage.v1.RecordGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecordGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RecordGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GroupBy. */ - interface IGroupBy { - - /** GroupBy key */ - key?: (temporal.api.cloud.usage.v1.GroupByKey|null); - - /** GroupBy value */ - value?: (string|null); - } - - /** Represents a GroupBy. */ - class GroupBy implements IGroupBy { - - /** - * Constructs a new GroupBy. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.usage.v1.IGroupBy); - - /** GroupBy key. */ - public key: temporal.api.cloud.usage.v1.GroupByKey; - - /** GroupBy value. */ - public value: string; - - /** - * Creates a new GroupBy instance using the specified properties. - * @param [properties] Properties to set - * @returns GroupBy instance - */ - public static create(properties?: temporal.api.cloud.usage.v1.IGroupBy): temporal.api.cloud.usage.v1.GroupBy; - - /** - * Encodes the specified GroupBy message. Does not implicitly {@link temporal.api.cloud.usage.v1.GroupBy.verify|verify} messages. - * @param message GroupBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.usage.v1.IGroupBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GroupBy message, length delimited. Does not implicitly {@link temporal.api.cloud.usage.v1.GroupBy.verify|verify} messages. - * @param message GroupBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.usage.v1.IGroupBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GroupBy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GroupBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.usage.v1.GroupBy; - - /** - * Decodes a GroupBy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GroupBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.usage.v1.GroupBy; - - /** - * Creates a GroupBy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GroupBy - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.usage.v1.GroupBy; - - /** - * Creates a plain object from a GroupBy message. Also converts values to other types if specified. - * @param message GroupBy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.usage.v1.GroupBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GroupBy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GroupBy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Record. */ - interface IRecord { - - /** Record type */ - type?: (temporal.api.cloud.usage.v1.RecordType|null); - - /** Record unit */ - unit?: (temporal.api.cloud.usage.v1.RecordUnit|null); - - /** Record value */ - value?: (number|null); - } - - /** Represents a Record. */ - class Record implements IRecord { - - /** - * Constructs a new Record. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.cloud.usage.v1.IRecord); - - /** Record type. */ - public type: temporal.api.cloud.usage.v1.RecordType; - - /** Record unit. */ - public unit: temporal.api.cloud.usage.v1.RecordUnit; - - /** Record value. */ - public value: number; - - /** - * Creates a new Record instance using the specified properties. - * @param [properties] Properties to set - * @returns Record instance - */ - public static create(properties?: temporal.api.cloud.usage.v1.IRecord): temporal.api.cloud.usage.v1.Record; - - /** - * Encodes the specified Record message. Does not implicitly {@link temporal.api.cloud.usage.v1.Record.verify|verify} messages. - * @param message Record message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.cloud.usage.v1.IRecord, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Record message, length delimited. Does not implicitly {@link temporal.api.cloud.usage.v1.Record.verify|verify} messages. - * @param message Record message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.cloud.usage.v1.IRecord, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Record message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Record - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.cloud.usage.v1.Record; - - /** - * Decodes a Record message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Record - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.cloud.usage.v1.Record; - - /** - * Creates a Record message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Record - */ - public static fromObject(object: { [k: string]: any }): temporal.api.cloud.usage.v1.Record; - - /** - * Creates a plain object from a Record message. Also converts values to other types if specified. - * @param message Record - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.cloud.usage.v1.Record, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Record to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Record - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** RecordType enum. */ - enum RecordType { - RECORD_TYPE_UNSPECIFIED = 0, - RECORD_TYPE_ACTIONS = 1, - RECORD_TYPE_ACTIVE_STORAGE = 2, - RECORD_TYPE_RETAINED_STORAGE = 3 - } - - /** RecordUnit enum. */ - enum RecordUnit { - RECORD_UNIT_UNSPECIFIED = 0, - RECORD_UNIT_NUMBER = 1, - RECORD_UNIT_BYTE_SECONDS = 2 - } - - /** GroupByKey enum. */ - enum GroupByKey { - GROUP_BY_KEY_UNSPECIFIED = 0, - GROUP_BY_KEY_NAMESPACE = 1 - } - } - } - } - - /** Namespace errordetails. */ - namespace errordetails { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a NotFoundFailure. */ - interface INotFoundFailure { - - /** NotFoundFailure currentCluster */ - currentCluster?: (string|null); - - /** NotFoundFailure activeCluster */ - activeCluster?: (string|null); - } - - /** Represents a NotFoundFailure. */ - class NotFoundFailure implements INotFoundFailure { - - /** - * Constructs a new NotFoundFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.INotFoundFailure); - - /** NotFoundFailure currentCluster. */ - public currentCluster: string; - - /** NotFoundFailure activeCluster. */ - public activeCluster: string; - - /** - * Creates a new NotFoundFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns NotFoundFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.INotFoundFailure): temporal.api.errordetails.v1.NotFoundFailure; - - /** - * Encodes the specified NotFoundFailure message. Does not implicitly {@link temporal.api.errordetails.v1.NotFoundFailure.verify|verify} messages. - * @param message NotFoundFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.INotFoundFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NotFoundFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.NotFoundFailure.verify|verify} messages. - * @param message NotFoundFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.INotFoundFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NotFoundFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NotFoundFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.NotFoundFailure; - - /** - * Decodes a NotFoundFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NotFoundFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.NotFoundFailure; - - /** - * Creates a NotFoundFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NotFoundFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.NotFoundFailure; - - /** - * Creates a plain object from a NotFoundFailure message. Also converts values to other types if specified. - * @param message NotFoundFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.NotFoundFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NotFoundFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NotFoundFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowExecutionAlreadyStartedFailure. */ - interface IWorkflowExecutionAlreadyStartedFailure { - - /** WorkflowExecutionAlreadyStartedFailure startRequestId */ - startRequestId?: (string|null); - - /** WorkflowExecutionAlreadyStartedFailure runId */ - runId?: (string|null); - } - - /** Represents a WorkflowExecutionAlreadyStartedFailure. */ - class WorkflowExecutionAlreadyStartedFailure implements IWorkflowExecutionAlreadyStartedFailure { - - /** - * Constructs a new WorkflowExecutionAlreadyStartedFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.IWorkflowExecutionAlreadyStartedFailure); - - /** WorkflowExecutionAlreadyStartedFailure startRequestId. */ - public startRequestId: string; - - /** WorkflowExecutionAlreadyStartedFailure runId. */ - public runId: string; - - /** - * Creates a new WorkflowExecutionAlreadyStartedFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowExecutionAlreadyStartedFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.IWorkflowExecutionAlreadyStartedFailure): temporal.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure; - - /** - * Encodes the specified WorkflowExecutionAlreadyStartedFailure message. Does not implicitly {@link temporal.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure.verify|verify} messages. - * @param message WorkflowExecutionAlreadyStartedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.IWorkflowExecutionAlreadyStartedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowExecutionAlreadyStartedFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure.verify|verify} messages. - * @param message WorkflowExecutionAlreadyStartedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.IWorkflowExecutionAlreadyStartedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowExecutionAlreadyStartedFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowExecutionAlreadyStartedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure; - - /** - * Decodes a WorkflowExecutionAlreadyStartedFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowExecutionAlreadyStartedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure; - - /** - * Creates a WorkflowExecutionAlreadyStartedFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowExecutionAlreadyStartedFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure; - - /** - * Creates a plain object from a WorkflowExecutionAlreadyStartedFailure message. Also converts values to other types if specified. - * @param message WorkflowExecutionAlreadyStartedFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowExecutionAlreadyStartedFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowExecutionAlreadyStartedFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NamespaceNotActiveFailure. */ - interface INamespaceNotActiveFailure { - - /** NamespaceNotActiveFailure namespace */ - namespace?: (string|null); - - /** NamespaceNotActiveFailure currentCluster */ - currentCluster?: (string|null); - - /** NamespaceNotActiveFailure activeCluster */ - activeCluster?: (string|null); - } - - /** Represents a NamespaceNotActiveFailure. */ - class NamespaceNotActiveFailure implements INamespaceNotActiveFailure { - - /** - * Constructs a new NamespaceNotActiveFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.INamespaceNotActiveFailure); - - /** NamespaceNotActiveFailure namespace. */ - public namespace: string; - - /** NamespaceNotActiveFailure currentCluster. */ - public currentCluster: string; - - /** NamespaceNotActiveFailure activeCluster. */ - public activeCluster: string; - - /** - * Creates a new NamespaceNotActiveFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespaceNotActiveFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.INamespaceNotActiveFailure): temporal.api.errordetails.v1.NamespaceNotActiveFailure; - - /** - * Encodes the specified NamespaceNotActiveFailure message. Does not implicitly {@link temporal.api.errordetails.v1.NamespaceNotActiveFailure.verify|verify} messages. - * @param message NamespaceNotActiveFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.INamespaceNotActiveFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespaceNotActiveFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.NamespaceNotActiveFailure.verify|verify} messages. - * @param message NamespaceNotActiveFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.INamespaceNotActiveFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespaceNotActiveFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespaceNotActiveFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.NamespaceNotActiveFailure; - - /** - * Decodes a NamespaceNotActiveFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespaceNotActiveFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.NamespaceNotActiveFailure; - - /** - * Creates a NamespaceNotActiveFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespaceNotActiveFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.NamespaceNotActiveFailure; - - /** - * Creates a plain object from a NamespaceNotActiveFailure message. Also converts values to other types if specified. - * @param message NamespaceNotActiveFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.NamespaceNotActiveFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespaceNotActiveFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespaceNotActiveFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NamespaceUnavailableFailure. */ - interface INamespaceUnavailableFailure { - - /** NamespaceUnavailableFailure namespace */ - namespace?: (string|null); - } - - /** - * NamespaceUnavailableFailure is returned by the service when a request addresses a namespace that is unavailable. For - * example, when a namespace is in the process of failing over between clusters. - * This is a transient error that should be automatically retried by clients. - */ - class NamespaceUnavailableFailure implements INamespaceUnavailableFailure { - - /** - * Constructs a new NamespaceUnavailableFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.INamespaceUnavailableFailure); - - /** NamespaceUnavailableFailure namespace. */ - public namespace: string; - - /** - * Creates a new NamespaceUnavailableFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespaceUnavailableFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.INamespaceUnavailableFailure): temporal.api.errordetails.v1.NamespaceUnavailableFailure; - - /** - * Encodes the specified NamespaceUnavailableFailure message. Does not implicitly {@link temporal.api.errordetails.v1.NamespaceUnavailableFailure.verify|verify} messages. - * @param message NamespaceUnavailableFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.INamespaceUnavailableFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespaceUnavailableFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.NamespaceUnavailableFailure.verify|verify} messages. - * @param message NamespaceUnavailableFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.INamespaceUnavailableFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespaceUnavailableFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespaceUnavailableFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.NamespaceUnavailableFailure; - - /** - * Decodes a NamespaceUnavailableFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespaceUnavailableFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.NamespaceUnavailableFailure; - - /** - * Creates a NamespaceUnavailableFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespaceUnavailableFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.NamespaceUnavailableFailure; - - /** - * Creates a plain object from a NamespaceUnavailableFailure message. Also converts values to other types if specified. - * @param message NamespaceUnavailableFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.NamespaceUnavailableFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespaceUnavailableFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespaceUnavailableFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NamespaceInvalidStateFailure. */ - interface INamespaceInvalidStateFailure { - - /** NamespaceInvalidStateFailure namespace */ - namespace?: (string|null); - - /** Current state of the requested namespace. */ - state?: (temporal.api.enums.v1.NamespaceState|null); - - /** - * Allowed namespace states for requested operation. - * For example NAMESPACE_STATE_DELETED is forbidden for most operations but allowed for DescribeNamespace. - */ - allowedStates?: (temporal.api.enums.v1.NamespaceState[]|null); - } - - /** Represents a NamespaceInvalidStateFailure. */ - class NamespaceInvalidStateFailure implements INamespaceInvalidStateFailure { - - /** - * Constructs a new NamespaceInvalidStateFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.INamespaceInvalidStateFailure); - - /** NamespaceInvalidStateFailure namespace. */ - public namespace: string; - - /** Current state of the requested namespace. */ - public state: temporal.api.enums.v1.NamespaceState; - - /** - * Allowed namespace states for requested operation. - * For example NAMESPACE_STATE_DELETED is forbidden for most operations but allowed for DescribeNamespace. - */ - public allowedStates: temporal.api.enums.v1.NamespaceState[]; - - /** - * Creates a new NamespaceInvalidStateFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespaceInvalidStateFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.INamespaceInvalidStateFailure): temporal.api.errordetails.v1.NamespaceInvalidStateFailure; - - /** - * Encodes the specified NamespaceInvalidStateFailure message. Does not implicitly {@link temporal.api.errordetails.v1.NamespaceInvalidStateFailure.verify|verify} messages. - * @param message NamespaceInvalidStateFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.INamespaceInvalidStateFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespaceInvalidStateFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.NamespaceInvalidStateFailure.verify|verify} messages. - * @param message NamespaceInvalidStateFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.INamespaceInvalidStateFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespaceInvalidStateFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespaceInvalidStateFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.NamespaceInvalidStateFailure; - - /** - * Decodes a NamespaceInvalidStateFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespaceInvalidStateFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.NamespaceInvalidStateFailure; - - /** - * Creates a NamespaceInvalidStateFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespaceInvalidStateFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.NamespaceInvalidStateFailure; - - /** - * Creates a plain object from a NamespaceInvalidStateFailure message. Also converts values to other types if specified. - * @param message NamespaceInvalidStateFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.NamespaceInvalidStateFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespaceInvalidStateFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespaceInvalidStateFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NamespaceNotFoundFailure. */ - interface INamespaceNotFoundFailure { - - /** NamespaceNotFoundFailure namespace */ - namespace?: (string|null); - } - - /** Represents a NamespaceNotFoundFailure. */ - class NamespaceNotFoundFailure implements INamespaceNotFoundFailure { - - /** - * Constructs a new NamespaceNotFoundFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.INamespaceNotFoundFailure); - - /** NamespaceNotFoundFailure namespace. */ - public namespace: string; - - /** - * Creates a new NamespaceNotFoundFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespaceNotFoundFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.INamespaceNotFoundFailure): temporal.api.errordetails.v1.NamespaceNotFoundFailure; - - /** - * Encodes the specified NamespaceNotFoundFailure message. Does not implicitly {@link temporal.api.errordetails.v1.NamespaceNotFoundFailure.verify|verify} messages. - * @param message NamespaceNotFoundFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.INamespaceNotFoundFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespaceNotFoundFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.NamespaceNotFoundFailure.verify|verify} messages. - * @param message NamespaceNotFoundFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.INamespaceNotFoundFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespaceNotFoundFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespaceNotFoundFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.NamespaceNotFoundFailure; - - /** - * Decodes a NamespaceNotFoundFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespaceNotFoundFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.NamespaceNotFoundFailure; - - /** - * Creates a NamespaceNotFoundFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespaceNotFoundFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.NamespaceNotFoundFailure; - - /** - * Creates a plain object from a NamespaceNotFoundFailure message. Also converts values to other types if specified. - * @param message NamespaceNotFoundFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.NamespaceNotFoundFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespaceNotFoundFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespaceNotFoundFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NamespaceAlreadyExistsFailure. */ - interface INamespaceAlreadyExistsFailure { - } - - /** Represents a NamespaceAlreadyExistsFailure. */ - class NamespaceAlreadyExistsFailure implements INamespaceAlreadyExistsFailure { - - /** - * Constructs a new NamespaceAlreadyExistsFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.INamespaceAlreadyExistsFailure); - - /** - * Creates a new NamespaceAlreadyExistsFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns NamespaceAlreadyExistsFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.INamespaceAlreadyExistsFailure): temporal.api.errordetails.v1.NamespaceAlreadyExistsFailure; - - /** - * Encodes the specified NamespaceAlreadyExistsFailure message. Does not implicitly {@link temporal.api.errordetails.v1.NamespaceAlreadyExistsFailure.verify|verify} messages. - * @param message NamespaceAlreadyExistsFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.INamespaceAlreadyExistsFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamespaceAlreadyExistsFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.NamespaceAlreadyExistsFailure.verify|verify} messages. - * @param message NamespaceAlreadyExistsFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.INamespaceAlreadyExistsFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamespaceAlreadyExistsFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamespaceAlreadyExistsFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.NamespaceAlreadyExistsFailure; - - /** - * Decodes a NamespaceAlreadyExistsFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamespaceAlreadyExistsFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.NamespaceAlreadyExistsFailure; - - /** - * Creates a NamespaceAlreadyExistsFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamespaceAlreadyExistsFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.NamespaceAlreadyExistsFailure; - - /** - * Creates a plain object from a NamespaceAlreadyExistsFailure message. Also converts values to other types if specified. - * @param message NamespaceAlreadyExistsFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.NamespaceAlreadyExistsFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamespaceAlreadyExistsFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamespaceAlreadyExistsFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientVersionNotSupportedFailure. */ - interface IClientVersionNotSupportedFailure { - - /** ClientVersionNotSupportedFailure clientVersion */ - clientVersion?: (string|null); - - /** ClientVersionNotSupportedFailure clientName */ - clientName?: (string|null); - - /** ClientVersionNotSupportedFailure supportedVersions */ - supportedVersions?: (string|null); - } - - /** Represents a ClientVersionNotSupportedFailure. */ - class ClientVersionNotSupportedFailure implements IClientVersionNotSupportedFailure { - - /** - * Constructs a new ClientVersionNotSupportedFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.IClientVersionNotSupportedFailure); - - /** ClientVersionNotSupportedFailure clientVersion. */ - public clientVersion: string; - - /** ClientVersionNotSupportedFailure clientName. */ - public clientName: string; - - /** ClientVersionNotSupportedFailure supportedVersions. */ - public supportedVersions: string; - - /** - * Creates a new ClientVersionNotSupportedFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientVersionNotSupportedFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.IClientVersionNotSupportedFailure): temporal.api.errordetails.v1.ClientVersionNotSupportedFailure; - - /** - * Encodes the specified ClientVersionNotSupportedFailure message. Does not implicitly {@link temporal.api.errordetails.v1.ClientVersionNotSupportedFailure.verify|verify} messages. - * @param message ClientVersionNotSupportedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.IClientVersionNotSupportedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientVersionNotSupportedFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.ClientVersionNotSupportedFailure.verify|verify} messages. - * @param message ClientVersionNotSupportedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.IClientVersionNotSupportedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientVersionNotSupportedFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientVersionNotSupportedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.ClientVersionNotSupportedFailure; - - /** - * Decodes a ClientVersionNotSupportedFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientVersionNotSupportedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.ClientVersionNotSupportedFailure; - - /** - * Creates a ClientVersionNotSupportedFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientVersionNotSupportedFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.ClientVersionNotSupportedFailure; - - /** - * Creates a plain object from a ClientVersionNotSupportedFailure message. Also converts values to other types if specified. - * @param message ClientVersionNotSupportedFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.ClientVersionNotSupportedFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientVersionNotSupportedFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientVersionNotSupportedFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServerVersionNotSupportedFailure. */ - interface IServerVersionNotSupportedFailure { - - /** ServerVersionNotSupportedFailure serverVersion */ - serverVersion?: (string|null); - - /** ServerVersionNotSupportedFailure clientSupportedServerVersions */ - clientSupportedServerVersions?: (string|null); - } - - /** Represents a ServerVersionNotSupportedFailure. */ - class ServerVersionNotSupportedFailure implements IServerVersionNotSupportedFailure { - - /** - * Constructs a new ServerVersionNotSupportedFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.IServerVersionNotSupportedFailure); - - /** ServerVersionNotSupportedFailure serverVersion. */ - public serverVersion: string; - - /** ServerVersionNotSupportedFailure clientSupportedServerVersions. */ - public clientSupportedServerVersions: string; - - /** - * Creates a new ServerVersionNotSupportedFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns ServerVersionNotSupportedFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.IServerVersionNotSupportedFailure): temporal.api.errordetails.v1.ServerVersionNotSupportedFailure; - - /** - * Encodes the specified ServerVersionNotSupportedFailure message. Does not implicitly {@link temporal.api.errordetails.v1.ServerVersionNotSupportedFailure.verify|verify} messages. - * @param message ServerVersionNotSupportedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.IServerVersionNotSupportedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServerVersionNotSupportedFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.ServerVersionNotSupportedFailure.verify|verify} messages. - * @param message ServerVersionNotSupportedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.IServerVersionNotSupportedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServerVersionNotSupportedFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServerVersionNotSupportedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.ServerVersionNotSupportedFailure; - - /** - * Decodes a ServerVersionNotSupportedFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServerVersionNotSupportedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.ServerVersionNotSupportedFailure; - - /** - * Creates a ServerVersionNotSupportedFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServerVersionNotSupportedFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.ServerVersionNotSupportedFailure; - - /** - * Creates a plain object from a ServerVersionNotSupportedFailure message. Also converts values to other types if specified. - * @param message ServerVersionNotSupportedFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.ServerVersionNotSupportedFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServerVersionNotSupportedFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServerVersionNotSupportedFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancellationAlreadyRequestedFailure. */ - interface ICancellationAlreadyRequestedFailure { - } - - /** Represents a CancellationAlreadyRequestedFailure. */ - class CancellationAlreadyRequestedFailure implements ICancellationAlreadyRequestedFailure { - - /** - * Constructs a new CancellationAlreadyRequestedFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.ICancellationAlreadyRequestedFailure); - - /** - * Creates a new CancellationAlreadyRequestedFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns CancellationAlreadyRequestedFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.ICancellationAlreadyRequestedFailure): temporal.api.errordetails.v1.CancellationAlreadyRequestedFailure; - - /** - * Encodes the specified CancellationAlreadyRequestedFailure message. Does not implicitly {@link temporal.api.errordetails.v1.CancellationAlreadyRequestedFailure.verify|verify} messages. - * @param message CancellationAlreadyRequestedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.ICancellationAlreadyRequestedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancellationAlreadyRequestedFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.CancellationAlreadyRequestedFailure.verify|verify} messages. - * @param message CancellationAlreadyRequestedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.ICancellationAlreadyRequestedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancellationAlreadyRequestedFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancellationAlreadyRequestedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.CancellationAlreadyRequestedFailure; - - /** - * Decodes a CancellationAlreadyRequestedFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancellationAlreadyRequestedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.CancellationAlreadyRequestedFailure; - - /** - * Creates a CancellationAlreadyRequestedFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancellationAlreadyRequestedFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.CancellationAlreadyRequestedFailure; - - /** - * Creates a plain object from a CancellationAlreadyRequestedFailure message. Also converts values to other types if specified. - * @param message CancellationAlreadyRequestedFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.CancellationAlreadyRequestedFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancellationAlreadyRequestedFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancellationAlreadyRequestedFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QueryFailedFailure. */ - interface IQueryFailedFailure { - - /** - * The full reason for this query failure. May not be available if the response is generated by an old - * SDK. This field can be encoded by the SDK's failure converter to support E2E encryption of messages and stack - * traces. - */ - failure?: (temporal.api.failure.v1.IFailure|null); - } - - /** Represents a QueryFailedFailure. */ - class QueryFailedFailure implements IQueryFailedFailure { - - /** - * Constructs a new QueryFailedFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.IQueryFailedFailure); - - /** - * The full reason for this query failure. May not be available if the response is generated by an old - * SDK. This field can be encoded by the SDK's failure converter to support E2E encryption of messages and stack - * traces. - */ - public failure?: (temporal.api.failure.v1.IFailure|null); - - /** - * Creates a new QueryFailedFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryFailedFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.IQueryFailedFailure): temporal.api.errordetails.v1.QueryFailedFailure; - - /** - * Encodes the specified QueryFailedFailure message. Does not implicitly {@link temporal.api.errordetails.v1.QueryFailedFailure.verify|verify} messages. - * @param message QueryFailedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.IQueryFailedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryFailedFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.QueryFailedFailure.verify|verify} messages. - * @param message QueryFailedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.IQueryFailedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryFailedFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryFailedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.QueryFailedFailure; - - /** - * Decodes a QueryFailedFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryFailedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.QueryFailedFailure; - - /** - * Creates a QueryFailedFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryFailedFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.QueryFailedFailure; - - /** - * Creates a plain object from a QueryFailedFailure message. Also converts values to other types if specified. - * @param message QueryFailedFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.QueryFailedFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryFailedFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryFailedFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PermissionDeniedFailure. */ - interface IPermissionDeniedFailure { - - /** PermissionDeniedFailure reason */ - reason?: (string|null); - } - - /** Represents a PermissionDeniedFailure. */ - class PermissionDeniedFailure implements IPermissionDeniedFailure { - - /** - * Constructs a new PermissionDeniedFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.IPermissionDeniedFailure); - - /** PermissionDeniedFailure reason. */ - public reason: string; - - /** - * Creates a new PermissionDeniedFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns PermissionDeniedFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.IPermissionDeniedFailure): temporal.api.errordetails.v1.PermissionDeniedFailure; - - /** - * Encodes the specified PermissionDeniedFailure message. Does not implicitly {@link temporal.api.errordetails.v1.PermissionDeniedFailure.verify|verify} messages. - * @param message PermissionDeniedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.IPermissionDeniedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PermissionDeniedFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.PermissionDeniedFailure.verify|verify} messages. - * @param message PermissionDeniedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.IPermissionDeniedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PermissionDeniedFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PermissionDeniedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.PermissionDeniedFailure; - - /** - * Decodes a PermissionDeniedFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PermissionDeniedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.PermissionDeniedFailure; - - /** - * Creates a PermissionDeniedFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PermissionDeniedFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.PermissionDeniedFailure; - - /** - * Creates a plain object from a PermissionDeniedFailure message. Also converts values to other types if specified. - * @param message PermissionDeniedFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.PermissionDeniedFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PermissionDeniedFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PermissionDeniedFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResourceExhaustedFailure. */ - interface IResourceExhaustedFailure { - - /** ResourceExhaustedFailure cause */ - cause?: (temporal.api.enums.v1.ResourceExhaustedCause|null); - - /** ResourceExhaustedFailure scope */ - scope?: (temporal.api.enums.v1.ResourceExhaustedScope|null); - } - - /** Represents a ResourceExhaustedFailure. */ - class ResourceExhaustedFailure implements IResourceExhaustedFailure { - - /** - * Constructs a new ResourceExhaustedFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.IResourceExhaustedFailure); - - /** ResourceExhaustedFailure cause. */ - public cause: temporal.api.enums.v1.ResourceExhaustedCause; - - /** ResourceExhaustedFailure scope. */ - public scope: temporal.api.enums.v1.ResourceExhaustedScope; - - /** - * Creates a new ResourceExhaustedFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceExhaustedFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.IResourceExhaustedFailure): temporal.api.errordetails.v1.ResourceExhaustedFailure; - - /** - * Encodes the specified ResourceExhaustedFailure message. Does not implicitly {@link temporal.api.errordetails.v1.ResourceExhaustedFailure.verify|verify} messages. - * @param message ResourceExhaustedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.IResourceExhaustedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceExhaustedFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.ResourceExhaustedFailure.verify|verify} messages. - * @param message ResourceExhaustedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.IResourceExhaustedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceExhaustedFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceExhaustedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.ResourceExhaustedFailure; - - /** - * Decodes a ResourceExhaustedFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceExhaustedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.ResourceExhaustedFailure; - - /** - * Creates a ResourceExhaustedFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceExhaustedFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.ResourceExhaustedFailure; - - /** - * Creates a plain object from a ResourceExhaustedFailure message. Also converts values to other types if specified. - * @param message ResourceExhaustedFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.ResourceExhaustedFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceExhaustedFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceExhaustedFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SystemWorkflowFailure. */ - interface ISystemWorkflowFailure { - - /** - * WorkflowId and RunId of the Temporal system workflow performing the underlying operation. - * Looking up the info of the system workflow run may help identify the issue causing the failure. - */ - workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** Serialized error returned by the system workflow performing the underlying operation. */ - workflowError?: (string|null); - } - - /** Represents a SystemWorkflowFailure. */ - class SystemWorkflowFailure implements ISystemWorkflowFailure { - - /** - * Constructs a new SystemWorkflowFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.ISystemWorkflowFailure); - - /** - * WorkflowId and RunId of the Temporal system workflow performing the underlying operation. - * Looking up the info of the system workflow run may help identify the issue causing the failure. - */ - public workflowExecution?: (temporal.api.common.v1.IWorkflowExecution|null); - - /** Serialized error returned by the system workflow performing the underlying operation. */ - public workflowError: string; - - /** - * Creates a new SystemWorkflowFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns SystemWorkflowFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.ISystemWorkflowFailure): temporal.api.errordetails.v1.SystemWorkflowFailure; - - /** - * Encodes the specified SystemWorkflowFailure message. Does not implicitly {@link temporal.api.errordetails.v1.SystemWorkflowFailure.verify|verify} messages. - * @param message SystemWorkflowFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.ISystemWorkflowFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SystemWorkflowFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.SystemWorkflowFailure.verify|verify} messages. - * @param message SystemWorkflowFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.ISystemWorkflowFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SystemWorkflowFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SystemWorkflowFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.SystemWorkflowFailure; - - /** - * Decodes a SystemWorkflowFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SystemWorkflowFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.SystemWorkflowFailure; - - /** - * Creates a SystemWorkflowFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SystemWorkflowFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.SystemWorkflowFailure; - - /** - * Creates a plain object from a SystemWorkflowFailure message. Also converts values to other types if specified. - * @param message SystemWorkflowFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.SystemWorkflowFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SystemWorkflowFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SystemWorkflowFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkflowNotReadyFailure. */ - interface IWorkflowNotReadyFailure { - } - - /** Represents a WorkflowNotReadyFailure. */ - class WorkflowNotReadyFailure implements IWorkflowNotReadyFailure { - - /** - * Constructs a new WorkflowNotReadyFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.IWorkflowNotReadyFailure); - - /** - * Creates a new WorkflowNotReadyFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkflowNotReadyFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.IWorkflowNotReadyFailure): temporal.api.errordetails.v1.WorkflowNotReadyFailure; - - /** - * Encodes the specified WorkflowNotReadyFailure message. Does not implicitly {@link temporal.api.errordetails.v1.WorkflowNotReadyFailure.verify|verify} messages. - * @param message WorkflowNotReadyFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.IWorkflowNotReadyFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkflowNotReadyFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.WorkflowNotReadyFailure.verify|verify} messages. - * @param message WorkflowNotReadyFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.IWorkflowNotReadyFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkflowNotReadyFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkflowNotReadyFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.WorkflowNotReadyFailure; - - /** - * Decodes a WorkflowNotReadyFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkflowNotReadyFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.WorkflowNotReadyFailure; - - /** - * Creates a WorkflowNotReadyFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkflowNotReadyFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.WorkflowNotReadyFailure; - - /** - * Creates a plain object from a WorkflowNotReadyFailure message. Also converts values to other types if specified. - * @param message WorkflowNotReadyFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.WorkflowNotReadyFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkflowNotReadyFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkflowNotReadyFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NewerBuildExistsFailure. */ - interface INewerBuildExistsFailure { - - /** The current default compatible build ID which will receive tasks */ - defaultBuildId?: (string|null); - } - - /** Represents a NewerBuildExistsFailure. */ - class NewerBuildExistsFailure implements INewerBuildExistsFailure { - - /** - * Constructs a new NewerBuildExistsFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.INewerBuildExistsFailure); - - /** The current default compatible build ID which will receive tasks */ - public defaultBuildId: string; - - /** - * Creates a new NewerBuildExistsFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns NewerBuildExistsFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.INewerBuildExistsFailure): temporal.api.errordetails.v1.NewerBuildExistsFailure; - - /** - * Encodes the specified NewerBuildExistsFailure message. Does not implicitly {@link temporal.api.errordetails.v1.NewerBuildExistsFailure.verify|verify} messages. - * @param message NewerBuildExistsFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.INewerBuildExistsFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NewerBuildExistsFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.NewerBuildExistsFailure.verify|verify} messages. - * @param message NewerBuildExistsFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.INewerBuildExistsFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NewerBuildExistsFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NewerBuildExistsFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.NewerBuildExistsFailure; - - /** - * Decodes a NewerBuildExistsFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NewerBuildExistsFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.NewerBuildExistsFailure; - - /** - * Creates a NewerBuildExistsFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NewerBuildExistsFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.NewerBuildExistsFailure; - - /** - * Creates a plain object from a NewerBuildExistsFailure message. Also converts values to other types if specified. - * @param message NewerBuildExistsFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.NewerBuildExistsFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NewerBuildExistsFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NewerBuildExistsFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MultiOperationExecutionFailure. */ - interface IMultiOperationExecutionFailure { - - /** - * One status for each requested operation from the failed MultiOperation. The failed - * operation(s) have the same error details as if it was executed separately. All other operations have the - * status code `Aborted` and `MultiOperationExecutionAborted` is added to the details field. - */ - statuses?: (temporal.api.errordetails.v1.MultiOperationExecutionFailure.IOperationStatus[]|null); - } - - /** Represents a MultiOperationExecutionFailure. */ - class MultiOperationExecutionFailure implements IMultiOperationExecutionFailure { - - /** - * Constructs a new MultiOperationExecutionFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.IMultiOperationExecutionFailure); - - /** - * One status for each requested operation from the failed MultiOperation. The failed - * operation(s) have the same error details as if it was executed separately. All other operations have the - * status code `Aborted` and `MultiOperationExecutionAborted` is added to the details field. - */ - public statuses: temporal.api.errordetails.v1.MultiOperationExecutionFailure.IOperationStatus[]; - - /** - * Creates a new MultiOperationExecutionFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns MultiOperationExecutionFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.IMultiOperationExecutionFailure): temporal.api.errordetails.v1.MultiOperationExecutionFailure; - - /** - * Encodes the specified MultiOperationExecutionFailure message. Does not implicitly {@link temporal.api.errordetails.v1.MultiOperationExecutionFailure.verify|verify} messages. - * @param message MultiOperationExecutionFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.IMultiOperationExecutionFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MultiOperationExecutionFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.MultiOperationExecutionFailure.verify|verify} messages. - * @param message MultiOperationExecutionFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.IMultiOperationExecutionFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MultiOperationExecutionFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MultiOperationExecutionFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.MultiOperationExecutionFailure; - - /** - * Decodes a MultiOperationExecutionFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MultiOperationExecutionFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.MultiOperationExecutionFailure; - - /** - * Creates a MultiOperationExecutionFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MultiOperationExecutionFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.MultiOperationExecutionFailure; - - /** - * Creates a plain object from a MultiOperationExecutionFailure message. Also converts values to other types if specified. - * @param message MultiOperationExecutionFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.MultiOperationExecutionFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MultiOperationExecutionFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MultiOperationExecutionFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MultiOperationExecutionFailure { - - /** Properties of an OperationStatus. */ - interface IOperationStatus { - - /** OperationStatus code */ - code?: (number|null); - - /** OperationStatus message */ - message?: (string|null); - - /** OperationStatus details */ - details?: (google.protobuf.IAny[]|null); - } - - /** - * NOTE: `OperationStatus` is modelled after - * [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto). - * - * (-- api-linter: core::0146::any=disabled - * aip.dev/not-precedent: details are meant to hold arbitrary payloads. --) - */ - class OperationStatus implements IOperationStatus { - - /** - * Constructs a new OperationStatus. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.MultiOperationExecutionFailure.IOperationStatus); - - /** OperationStatus code. */ - public code: number; - - /** OperationStatus message. */ - public message: string; - - /** OperationStatus details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new OperationStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationStatus instance - */ - public static create(properties?: temporal.api.errordetails.v1.MultiOperationExecutionFailure.IOperationStatus): temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus; - - /** - * Encodes the specified OperationStatus message. Does not implicitly {@link temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus.verify|verify} messages. - * @param message OperationStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.MultiOperationExecutionFailure.IOperationStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationStatus message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus.verify|verify} messages. - * @param message OperationStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.MultiOperationExecutionFailure.IOperationStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus; - - /** - * Decodes an OperationStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus; - - /** - * Creates an OperationStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationStatus - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus; - - /** - * Creates a plain object from an OperationStatus message. Also converts values to other types if specified. - * @param message OperationStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ActivityExecutionAlreadyStartedFailure. */ - interface IActivityExecutionAlreadyStartedFailure { - - /** ActivityExecutionAlreadyStartedFailure startRequestId */ - startRequestId?: (string|null); - - /** ActivityExecutionAlreadyStartedFailure runId */ - runId?: (string|null); - } - - /** - * An error indicating that an activity execution failed to start. Returned when there is an existing activity with the - * given activity ID, and the given ID reuse and conflict policies do not permit starting a new one or attaching to an - * existing one. - */ - class ActivityExecutionAlreadyStartedFailure implements IActivityExecutionAlreadyStartedFailure { - - /** - * Constructs a new ActivityExecutionAlreadyStartedFailure. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.errordetails.v1.IActivityExecutionAlreadyStartedFailure); - - /** ActivityExecutionAlreadyStartedFailure startRequestId. */ - public startRequestId: string; - - /** ActivityExecutionAlreadyStartedFailure runId. */ - public runId: string; - - /** - * Creates a new ActivityExecutionAlreadyStartedFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivityExecutionAlreadyStartedFailure instance - */ - public static create(properties?: temporal.api.errordetails.v1.IActivityExecutionAlreadyStartedFailure): temporal.api.errordetails.v1.ActivityExecutionAlreadyStartedFailure; - - /** - * Encodes the specified ActivityExecutionAlreadyStartedFailure message. Does not implicitly {@link temporal.api.errordetails.v1.ActivityExecutionAlreadyStartedFailure.verify|verify} messages. - * @param message ActivityExecutionAlreadyStartedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.errordetails.v1.IActivityExecutionAlreadyStartedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivityExecutionAlreadyStartedFailure message, length delimited. Does not implicitly {@link temporal.api.errordetails.v1.ActivityExecutionAlreadyStartedFailure.verify|verify} messages. - * @param message ActivityExecutionAlreadyStartedFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.errordetails.v1.IActivityExecutionAlreadyStartedFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivityExecutionAlreadyStartedFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivityExecutionAlreadyStartedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.errordetails.v1.ActivityExecutionAlreadyStartedFailure; - - /** - * Decodes an ActivityExecutionAlreadyStartedFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivityExecutionAlreadyStartedFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.errordetails.v1.ActivityExecutionAlreadyStartedFailure; - - /** - * Creates an ActivityExecutionAlreadyStartedFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivityExecutionAlreadyStartedFailure - */ - public static fromObject(object: { [k: string]: any }): temporal.api.errordetails.v1.ActivityExecutionAlreadyStartedFailure; - - /** - * Creates a plain object from an ActivityExecutionAlreadyStartedFailure message. Also converts values to other types if specified. - * @param message ActivityExecutionAlreadyStartedFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.errordetails.v1.ActivityExecutionAlreadyStartedFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivityExecutionAlreadyStartedFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivityExecutionAlreadyStartedFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace testservice. */ - namespace testservice { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a LockTimeSkippingRequest. */ - interface ILockTimeSkippingRequest { - } - - /** Represents a LockTimeSkippingRequest. */ - class LockTimeSkippingRequest implements ILockTimeSkippingRequest { - - /** - * Constructs a new LockTimeSkippingRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.testservice.v1.ILockTimeSkippingRequest); - - /** - * Creates a new LockTimeSkippingRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns LockTimeSkippingRequest instance - */ - public static create(properties?: temporal.api.testservice.v1.ILockTimeSkippingRequest): temporal.api.testservice.v1.LockTimeSkippingRequest; - - /** - * Encodes the specified LockTimeSkippingRequest message. Does not implicitly {@link temporal.api.testservice.v1.LockTimeSkippingRequest.verify|verify} messages. - * @param message LockTimeSkippingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.testservice.v1.ILockTimeSkippingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LockTimeSkippingRequest message, length delimited. Does not implicitly {@link temporal.api.testservice.v1.LockTimeSkippingRequest.verify|verify} messages. - * @param message LockTimeSkippingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.testservice.v1.ILockTimeSkippingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LockTimeSkippingRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LockTimeSkippingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.testservice.v1.LockTimeSkippingRequest; - - /** - * Decodes a LockTimeSkippingRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LockTimeSkippingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.testservice.v1.LockTimeSkippingRequest; - - /** - * Creates a LockTimeSkippingRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LockTimeSkippingRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.testservice.v1.LockTimeSkippingRequest; - - /** - * Creates a plain object from a LockTimeSkippingRequest message. Also converts values to other types if specified. - * @param message LockTimeSkippingRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.testservice.v1.LockTimeSkippingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LockTimeSkippingRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LockTimeSkippingRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LockTimeSkippingResponse. */ - interface ILockTimeSkippingResponse { - } - - /** Represents a LockTimeSkippingResponse. */ - class LockTimeSkippingResponse implements ILockTimeSkippingResponse { - - /** - * Constructs a new LockTimeSkippingResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.testservice.v1.ILockTimeSkippingResponse); - - /** - * Creates a new LockTimeSkippingResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns LockTimeSkippingResponse instance - */ - public static create(properties?: temporal.api.testservice.v1.ILockTimeSkippingResponse): temporal.api.testservice.v1.LockTimeSkippingResponse; - - /** - * Encodes the specified LockTimeSkippingResponse message. Does not implicitly {@link temporal.api.testservice.v1.LockTimeSkippingResponse.verify|verify} messages. - * @param message LockTimeSkippingResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.testservice.v1.ILockTimeSkippingResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LockTimeSkippingResponse message, length delimited. Does not implicitly {@link temporal.api.testservice.v1.LockTimeSkippingResponse.verify|verify} messages. - * @param message LockTimeSkippingResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.testservice.v1.ILockTimeSkippingResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LockTimeSkippingResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LockTimeSkippingResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.testservice.v1.LockTimeSkippingResponse; - - /** - * Decodes a LockTimeSkippingResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LockTimeSkippingResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.testservice.v1.LockTimeSkippingResponse; - - /** - * Creates a LockTimeSkippingResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LockTimeSkippingResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.testservice.v1.LockTimeSkippingResponse; - - /** - * Creates a plain object from a LockTimeSkippingResponse message. Also converts values to other types if specified. - * @param message LockTimeSkippingResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.testservice.v1.LockTimeSkippingResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LockTimeSkippingResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LockTimeSkippingResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UnlockTimeSkippingRequest. */ - interface IUnlockTimeSkippingRequest { - } - - /** Represents an UnlockTimeSkippingRequest. */ - class UnlockTimeSkippingRequest implements IUnlockTimeSkippingRequest { - - /** - * Constructs a new UnlockTimeSkippingRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.testservice.v1.IUnlockTimeSkippingRequest); - - /** - * Creates a new UnlockTimeSkippingRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UnlockTimeSkippingRequest instance - */ - public static create(properties?: temporal.api.testservice.v1.IUnlockTimeSkippingRequest): temporal.api.testservice.v1.UnlockTimeSkippingRequest; - - /** - * Encodes the specified UnlockTimeSkippingRequest message. Does not implicitly {@link temporal.api.testservice.v1.UnlockTimeSkippingRequest.verify|verify} messages. - * @param message UnlockTimeSkippingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.testservice.v1.IUnlockTimeSkippingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnlockTimeSkippingRequest message, length delimited. Does not implicitly {@link temporal.api.testservice.v1.UnlockTimeSkippingRequest.verify|verify} messages. - * @param message UnlockTimeSkippingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.testservice.v1.IUnlockTimeSkippingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnlockTimeSkippingRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnlockTimeSkippingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.testservice.v1.UnlockTimeSkippingRequest; - - /** - * Decodes an UnlockTimeSkippingRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnlockTimeSkippingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.testservice.v1.UnlockTimeSkippingRequest; - - /** - * Creates an UnlockTimeSkippingRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnlockTimeSkippingRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.testservice.v1.UnlockTimeSkippingRequest; - - /** - * Creates a plain object from an UnlockTimeSkippingRequest message. Also converts values to other types if specified. - * @param message UnlockTimeSkippingRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.testservice.v1.UnlockTimeSkippingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnlockTimeSkippingRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UnlockTimeSkippingRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UnlockTimeSkippingResponse. */ - interface IUnlockTimeSkippingResponse { - } - - /** Represents an UnlockTimeSkippingResponse. */ - class UnlockTimeSkippingResponse implements IUnlockTimeSkippingResponse { - - /** - * Constructs a new UnlockTimeSkippingResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.testservice.v1.IUnlockTimeSkippingResponse); - - /** - * Creates a new UnlockTimeSkippingResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UnlockTimeSkippingResponse instance - */ - public static create(properties?: temporal.api.testservice.v1.IUnlockTimeSkippingResponse): temporal.api.testservice.v1.UnlockTimeSkippingResponse; - - /** - * Encodes the specified UnlockTimeSkippingResponse message. Does not implicitly {@link temporal.api.testservice.v1.UnlockTimeSkippingResponse.verify|verify} messages. - * @param message UnlockTimeSkippingResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.testservice.v1.IUnlockTimeSkippingResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnlockTimeSkippingResponse message, length delimited. Does not implicitly {@link temporal.api.testservice.v1.UnlockTimeSkippingResponse.verify|verify} messages. - * @param message UnlockTimeSkippingResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.testservice.v1.IUnlockTimeSkippingResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnlockTimeSkippingResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnlockTimeSkippingResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.testservice.v1.UnlockTimeSkippingResponse; - - /** - * Decodes an UnlockTimeSkippingResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnlockTimeSkippingResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.testservice.v1.UnlockTimeSkippingResponse; - - /** - * Creates an UnlockTimeSkippingResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnlockTimeSkippingResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.testservice.v1.UnlockTimeSkippingResponse; - - /** - * Creates a plain object from an UnlockTimeSkippingResponse message. Also converts values to other types if specified. - * @param message UnlockTimeSkippingResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.testservice.v1.UnlockTimeSkippingResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnlockTimeSkippingResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UnlockTimeSkippingResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SleepUntilRequest. */ - interface ISleepUntilRequest { - - /** SleepUntilRequest timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - } - - /** Represents a SleepUntilRequest. */ - class SleepUntilRequest implements ISleepUntilRequest { - - /** - * Constructs a new SleepUntilRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.testservice.v1.ISleepUntilRequest); - - /** SleepUntilRequest timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new SleepUntilRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SleepUntilRequest instance - */ - public static create(properties?: temporal.api.testservice.v1.ISleepUntilRequest): temporal.api.testservice.v1.SleepUntilRequest; - - /** - * Encodes the specified SleepUntilRequest message. Does not implicitly {@link temporal.api.testservice.v1.SleepUntilRequest.verify|verify} messages. - * @param message SleepUntilRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.testservice.v1.ISleepUntilRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SleepUntilRequest message, length delimited. Does not implicitly {@link temporal.api.testservice.v1.SleepUntilRequest.verify|verify} messages. - * @param message SleepUntilRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.testservice.v1.ISleepUntilRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SleepUntilRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SleepUntilRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.testservice.v1.SleepUntilRequest; - - /** - * Decodes a SleepUntilRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SleepUntilRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.testservice.v1.SleepUntilRequest; - - /** - * Creates a SleepUntilRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SleepUntilRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.testservice.v1.SleepUntilRequest; - - /** - * Creates a plain object from a SleepUntilRequest message. Also converts values to other types if specified. - * @param message SleepUntilRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.testservice.v1.SleepUntilRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SleepUntilRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SleepUntilRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SleepRequest. */ - interface ISleepRequest { - - /** SleepRequest duration */ - duration?: (google.protobuf.IDuration|null); - } - - /** Represents a SleepRequest. */ - class SleepRequest implements ISleepRequest { - - /** - * Constructs a new SleepRequest. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.testservice.v1.ISleepRequest); - - /** SleepRequest duration. */ - public duration?: (google.protobuf.IDuration|null); - - /** - * Creates a new SleepRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SleepRequest instance - */ - public static create(properties?: temporal.api.testservice.v1.ISleepRequest): temporal.api.testservice.v1.SleepRequest; - - /** - * Encodes the specified SleepRequest message. Does not implicitly {@link temporal.api.testservice.v1.SleepRequest.verify|verify} messages. - * @param message SleepRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.testservice.v1.ISleepRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SleepRequest message, length delimited. Does not implicitly {@link temporal.api.testservice.v1.SleepRequest.verify|verify} messages. - * @param message SleepRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.testservice.v1.ISleepRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SleepRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SleepRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.testservice.v1.SleepRequest; - - /** - * Decodes a SleepRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SleepRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.testservice.v1.SleepRequest; - - /** - * Creates a SleepRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SleepRequest - */ - public static fromObject(object: { [k: string]: any }): temporal.api.testservice.v1.SleepRequest; - - /** - * Creates a plain object from a SleepRequest message. Also converts values to other types if specified. - * @param message SleepRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.testservice.v1.SleepRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SleepRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SleepRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SleepResponse. */ - interface ISleepResponse { - } - - /** Represents a SleepResponse. */ - class SleepResponse implements ISleepResponse { - - /** - * Constructs a new SleepResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.testservice.v1.ISleepResponse); - - /** - * Creates a new SleepResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SleepResponse instance - */ - public static create(properties?: temporal.api.testservice.v1.ISleepResponse): temporal.api.testservice.v1.SleepResponse; - - /** - * Encodes the specified SleepResponse message. Does not implicitly {@link temporal.api.testservice.v1.SleepResponse.verify|verify} messages. - * @param message SleepResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.testservice.v1.ISleepResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SleepResponse message, length delimited. Does not implicitly {@link temporal.api.testservice.v1.SleepResponse.verify|verify} messages. - * @param message SleepResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.testservice.v1.ISleepResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SleepResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SleepResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.testservice.v1.SleepResponse; - - /** - * Decodes a SleepResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SleepResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.testservice.v1.SleepResponse; - - /** - * Creates a SleepResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SleepResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.testservice.v1.SleepResponse; - - /** - * Creates a plain object from a SleepResponse message. Also converts values to other types if specified. - * @param message SleepResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.testservice.v1.SleepResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SleepResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SleepResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetCurrentTimeResponse. */ - interface IGetCurrentTimeResponse { - - /** GetCurrentTimeResponse time */ - time?: (google.protobuf.ITimestamp|null); - } - - /** Represents a GetCurrentTimeResponse. */ - class GetCurrentTimeResponse implements IGetCurrentTimeResponse { - - /** - * Constructs a new GetCurrentTimeResponse. - * @param [properties] Properties to set - */ - constructor(properties?: temporal.api.testservice.v1.IGetCurrentTimeResponse); - - /** GetCurrentTimeResponse time. */ - public time?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new GetCurrentTimeResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetCurrentTimeResponse instance - */ - public static create(properties?: temporal.api.testservice.v1.IGetCurrentTimeResponse): temporal.api.testservice.v1.GetCurrentTimeResponse; - - /** - * Encodes the specified GetCurrentTimeResponse message. Does not implicitly {@link temporal.api.testservice.v1.GetCurrentTimeResponse.verify|verify} messages. - * @param message GetCurrentTimeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: temporal.api.testservice.v1.IGetCurrentTimeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetCurrentTimeResponse message, length delimited. Does not implicitly {@link temporal.api.testservice.v1.GetCurrentTimeResponse.verify|verify} messages. - * @param message GetCurrentTimeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: temporal.api.testservice.v1.IGetCurrentTimeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetCurrentTimeResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetCurrentTimeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): temporal.api.testservice.v1.GetCurrentTimeResponse; - - /** - * Decodes a GetCurrentTimeResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetCurrentTimeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): temporal.api.testservice.v1.GetCurrentTimeResponse; - - /** - * Creates a GetCurrentTimeResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetCurrentTimeResponse - */ - public static fromObject(object: { [k: string]: any }): temporal.api.testservice.v1.GetCurrentTimeResponse; - - /** - * Creates a plain object from a GetCurrentTimeResponse message. Also converts values to other types if specified. - * @param message GetCurrentTimeResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: temporal.api.testservice.v1.GetCurrentTimeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetCurrentTimeResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetCurrentTimeResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** - * TestService API defines an interface supported only by the Temporal Test Server. - * It provides functionality needed or supported for testing purposes only. - * - * This is an EXPERIMENTAL API. - */ - class TestService extends $protobuf.rpc.Service { - - /** - * Constructs a new TestService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new TestService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): TestService; - - /** - * LockTimeSkipping increments Time Locking Counter by one. - * - * If Time Locking Counter is positive, time skipping is locked (disabled). - * When time skipping is disabled, the time in test server is moving normally, with a real time pace. - * Test Server is typically started with locked time skipping and Time Locking Counter = 1. - * - * LockTimeSkipping and UnlockTimeSkipping calls are counted. - * @param request LockTimeSkippingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LockTimeSkippingResponse - */ - public lockTimeSkipping(request: temporal.api.testservice.v1.ILockTimeSkippingRequest, callback: temporal.api.testservice.v1.TestService.LockTimeSkippingCallback): void; - - /** - * LockTimeSkipping increments Time Locking Counter by one. - * - * If Time Locking Counter is positive, time skipping is locked (disabled). - * When time skipping is disabled, the time in test server is moving normally, with a real time pace. - * Test Server is typically started with locked time skipping and Time Locking Counter = 1. - * - * LockTimeSkipping and UnlockTimeSkipping calls are counted. - * @param request LockTimeSkippingRequest message or plain object - * @returns Promise - */ - public lockTimeSkipping(request: temporal.api.testservice.v1.ILockTimeSkippingRequest): Promise; - - /** - * UnlockTimeSkipping decrements Time Locking Counter by one. - * - * If the counter reaches 0, it unlocks time skipping and fast forwards time. - * LockTimeSkipping and UnlockTimeSkipping calls are counted. Calling UnlockTimeSkipping does not - * guarantee that time is going to be fast forwarded as another lock can be holding it. - * - * Time Locking Counter can't be negative, unbalanced calls to UnlockTimeSkipping will lead to rpc call failure - * @param request UnlockTimeSkippingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UnlockTimeSkippingResponse - */ - public unlockTimeSkipping(request: temporal.api.testservice.v1.IUnlockTimeSkippingRequest, callback: temporal.api.testservice.v1.TestService.UnlockTimeSkippingCallback): void; - - /** - * UnlockTimeSkipping decrements Time Locking Counter by one. - * - * If the counter reaches 0, it unlocks time skipping and fast forwards time. - * LockTimeSkipping and UnlockTimeSkipping calls are counted. Calling UnlockTimeSkipping does not - * guarantee that time is going to be fast forwarded as another lock can be holding it. - * - * Time Locking Counter can't be negative, unbalanced calls to UnlockTimeSkipping will lead to rpc call failure - * @param request UnlockTimeSkippingRequest message or plain object - * @returns Promise - */ - public unlockTimeSkipping(request: temporal.api.testservice.v1.IUnlockTimeSkippingRequest): Promise; - - /** - * This call returns only when the Test Server Time advances by the specified duration. - * This is an EXPERIMENTAL API. - * @param request SleepRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SleepResponse - */ - public sleep(request: temporal.api.testservice.v1.ISleepRequest, callback: temporal.api.testservice.v1.TestService.SleepCallback): void; - - /** - * This call returns only when the Test Server Time advances by the specified duration. - * This is an EXPERIMENTAL API. - * @param request SleepRequest message or plain object - * @returns Promise - */ - public sleep(request: temporal.api.testservice.v1.ISleepRequest): Promise; - - /** - * This call returns only when the Test Server Time advances to the specified timestamp. - * If the current Test Server Time is beyond the specified timestamp, returns immediately. - * This is an EXPERIMENTAL API. - * @param request SleepUntilRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SleepResponse - */ - public sleepUntil(request: temporal.api.testservice.v1.ISleepUntilRequest, callback: temporal.api.testservice.v1.TestService.SleepUntilCallback): void; - - /** - * This call returns only when the Test Server Time advances to the specified timestamp. - * If the current Test Server Time is beyond the specified timestamp, returns immediately. - * This is an EXPERIMENTAL API. - * @param request SleepUntilRequest message or plain object - * @returns Promise - */ - public sleepUntil(request: temporal.api.testservice.v1.ISleepUntilRequest): Promise; - - /** - * UnlockTimeSkippingWhileSleep decreases time locking counter by one and increases it back - * once the Test Server Time advances by the duration specified in the request. - * - * This call returns only when the Test Server Time advances by the specified duration. - * - * If it is called when Time Locking Counter is - * - more than 1 and no other unlocks are coming in, rpc call will block for the specified duration, time will not be fast forwarded. - * - 1, it will lead to fast forwarding of the time by the duration specified in the request and quick return of this rpc call. - * - 0 will lead to rpc call failure same way as an unbalanced UnlockTimeSkipping. - * @param request SleepRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SleepResponse - */ - public unlockTimeSkippingWithSleep(request: temporal.api.testservice.v1.ISleepRequest, callback: temporal.api.testservice.v1.TestService.UnlockTimeSkippingWithSleepCallback): void; - - /** - * UnlockTimeSkippingWhileSleep decreases time locking counter by one and increases it back - * once the Test Server Time advances by the duration specified in the request. - * - * This call returns only when the Test Server Time advances by the specified duration. - * - * If it is called when Time Locking Counter is - * - more than 1 and no other unlocks are coming in, rpc call will block for the specified duration, time will not be fast forwarded. - * - 1, it will lead to fast forwarding of the time by the duration specified in the request and quick return of this rpc call. - * - 0 will lead to rpc call failure same way as an unbalanced UnlockTimeSkipping. - * @param request SleepRequest message or plain object - * @returns Promise - */ - public unlockTimeSkippingWithSleep(request: temporal.api.testservice.v1.ISleepRequest): Promise; - - /** - * GetCurrentTime returns the current Temporal Test Server time - * - * This time might not be equal to {@link System#currentTimeMillis()} due to time skipping. - * @param request Empty message or plain object - * @param callback Node-style callback called with the error, if any, and GetCurrentTimeResponse - */ - public getCurrentTime(request: google.protobuf.IEmpty, callback: temporal.api.testservice.v1.TestService.GetCurrentTimeCallback): void; - - /** - * GetCurrentTime returns the current Temporal Test Server time - * - * This time might not be equal to {@link System#currentTimeMillis()} due to time skipping. - * @param request Empty message or plain object - * @returns Promise - */ - public getCurrentTime(request: google.protobuf.IEmpty): Promise; - } - - namespace TestService { - - /** - * Callback as used by {@link temporal.api.testservice.v1.TestService#lockTimeSkipping}. - * @param error Error, if any - * @param [response] LockTimeSkippingResponse - */ - type LockTimeSkippingCallback = (error: (Error|null), response?: temporal.api.testservice.v1.LockTimeSkippingResponse) => void; - - /** - * Callback as used by {@link temporal.api.testservice.v1.TestService#unlockTimeSkipping}. - * @param error Error, if any - * @param [response] UnlockTimeSkippingResponse - */ - type UnlockTimeSkippingCallback = (error: (Error|null), response?: temporal.api.testservice.v1.UnlockTimeSkippingResponse) => void; - - /** - * Callback as used by {@link temporal.api.testservice.v1.TestService#sleep}. - * @param error Error, if any - * @param [response] SleepResponse - */ - type SleepCallback = (error: (Error|null), response?: temporal.api.testservice.v1.SleepResponse) => void; - - /** - * Callback as used by {@link temporal.api.testservice.v1.TestService#sleepUntil}. - * @param error Error, if any - * @param [response] SleepResponse - */ - type SleepUntilCallback = (error: (Error|null), response?: temporal.api.testservice.v1.SleepResponse) => void; - - /** - * Callback as used by {@link temporal.api.testservice.v1.TestService#unlockTimeSkippingWithSleep}. - * @param error Error, if any - * @param [response] SleepResponse - */ - type UnlockTimeSkippingWithSleepCallback = (error: (Error|null), response?: temporal.api.testservice.v1.SleepResponse) => void; - - /** - * Callback as used by {@link temporal.api.testservice.v1.TestService#getCurrentTime}. - * @param error Error, if any - * @param [response] GetCurrentTimeResponse - */ - type GetCurrentTimeCallback = (error: (Error|null), response?: temporal.api.testservice.v1.GetCurrentTimeResponse) => void; - } - } - } - } -} - -/** Namespace google. */ -export namespace google { - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (Long|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: Long; - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (Long|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: Long; - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DoubleValue. */ - interface IDoubleValue { - - /** DoubleValue value */ - value?: (number|null); - } - - /** Represents a DoubleValue. */ - class DoubleValue implements IDoubleValue { - - /** - * Constructs a new DoubleValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDoubleValue); - - /** DoubleValue value. */ - public value: number; - - /** - * Creates a new DoubleValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DoubleValue instance - */ - public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; - - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; - - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DoubleValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; - - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @param message DoubleValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DoubleValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DoubleValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FloatValue. */ - interface IFloatValue { - - /** FloatValue value */ - value?: (number|null); - } - - /** Represents a FloatValue. */ - class FloatValue implements IFloatValue { - - /** - * Constructs a new FloatValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFloatValue); - - /** FloatValue value. */ - public value: number; - - /** - * Creates a new FloatValue instance using the specified properties. - * @param [properties] Properties to set - * @returns FloatValue instance - */ - public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; - - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; - - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; - - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FloatValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; - - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @param message FloatValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FloatValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FloatValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int64Value. */ - interface IInt64Value { - - /** Int64Value value */ - value?: (Long|null); - } - - /** Represents an Int64Value. */ - class Int64Value implements IInt64Value { - - /** - * Constructs a new Int64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt64Value); - - /** Int64Value value. */ - public value: Long; - - /** - * Creates a new Int64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int64Value instance - */ - public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; - - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; - - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; - - /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; - - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @param message Int64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt64Value. */ - interface IUInt64Value { - - /** UInt64Value value */ - value?: (Long|null); - } - - /** Represents a UInt64Value. */ - class UInt64Value implements IUInt64Value { - - /** - * Constructs a new UInt64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt64Value); - - /** UInt64Value value. */ - public value: Long; - - /** - * Creates a new UInt64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt64Value instance - */ - public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; - - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; - - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; - - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; - - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @param message UInt64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int32Value. */ - interface IInt32Value { - - /** Int32Value value */ - value?: (number|null); - } - - /** Represents an Int32Value. */ - class Int32Value implements IInt32Value { - - /** - * Constructs a new Int32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt32Value); - - /** Int32Value value. */ - public value: number; - - /** - * Creates a new Int32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int32Value instance - */ - public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; - - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int32Value; - - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int32Value; - - /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @param message Int32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt32Value. */ - interface IUInt32Value { - - /** UInt32Value value */ - value?: (number|null); - } - - /** Represents a UInt32Value. */ - class UInt32Value implements IUInt32Value { - - /** - * Constructs a new UInt32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt32Value); - - /** UInt32Value value. */ - public value: number; - - /** - * Creates a new UInt32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt32Value instance - */ - public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; - - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; - - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; - - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; - - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @param message UInt32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BoolValue. */ - interface IBoolValue { - - /** BoolValue value */ - value?: (boolean|null); - } - - /** Represents a BoolValue. */ - class BoolValue implements IBoolValue { - - /** - * Constructs a new BoolValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBoolValue); - - /** BoolValue value. */ - public value: boolean; - - /** - * Creates a new BoolValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BoolValue instance - */ - public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; - - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BoolValue; - - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BoolValue; - - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BoolValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; - - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @param message BoolValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BoolValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BoolValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StringValue. */ - interface IStringValue { - - /** StringValue value */ - value?: (string|null); - } - - /** Represents a StringValue. */ - class StringValue implements IStringValue { - - /** - * Constructs a new StringValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStringValue); - - /** StringValue value. */ - public value: string; - - /** - * Creates a new StringValue instance using the specified properties. - * @param [properties] Properties to set - * @returns StringValue instance - */ - public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; - - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StringValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; - - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; - - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; - - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StringValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StringValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BytesValue. */ - interface IBytesValue { - - /** BytesValue value */ - value?: (Uint8Array|null); - } - - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { - - /** - * Constructs a new BytesValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBytesValue); - - /** BytesValue value. */ - public value: Uint8Array; - - /** - * Creates a new BytesValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BytesValue instance - */ - public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; - - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BytesValue; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BytesValue; - - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BytesValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; - - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BytesValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BytesValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); - } - - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { - - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; - - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldMask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: Uint8Array; - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Any - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** The full set of known editions. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** file name, relative to root of source tree */ - name?: (string|null); - - /** e.g. "foo", "foo.bar", etc. */ - "package"?: (string|null); - - /** Names of files imported by this file. */ - dependency?: (string[]|null); - - /** Indexes of the public imported files in the dependency list above. */ - publicDependency?: (number[]|null); - - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency?: (number[]|null); - - /** All top-level definitions in this file. */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** - * The syntax of the proto file. - * The supported values are "proto2", "proto3", and "editions". - * - * If `edition` is present, this value must be "editions". - */ - syntax?: (string|null); - - /** The edition of the proto file. */ - edition?: (google.protobuf.Edition|null); - } - - /** Describes a complete .proto file. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** file name, relative to root of source tree */ - public name: string; - - /** e.g. "foo", "foo.bar", etc. */ - public package: string; - - /** Names of files imported by this file. */ - public dependency: string[]; - - /** Indexes of the public imported files in the dependency list above. */ - public publicDependency: number[]; - - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - public weakDependency: number[]; - - /** All top-level definitions in this file. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** - * The syntax of the proto file. - * The supported values are "proto2", "proto3", and "editions". - * - * If `edition` is present, this value must be "editions". - */ - public syntax: string; - - /** The edition of the proto file. */ - public edition: google.protobuf.Edition; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName?: (string[]|null); - } - - /** Describes a message type. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** Inclusive. */ - start?: (number|null); - - /** Exclusive. */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** Inclusive. */ - public start: number; - - /** Exclusive. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** Inclusive. */ - start?: (number|null); - - /** Exclusive. */ - end?: (number|null); - } - - /** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** Inclusive. */ - public start: number; - - /** Exclusive. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** - * For external users: DO NOT USE. We are in the process of open sourcing - * extension declaration and executing internal cleanups before it can be - * used externally. - */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** Any features defined in the specific edition. */ - features?: (google.protobuf.IFeatureSet|null); - - /** - * The verification state of the range. - * TODO: flip the default to DECLARATION once all empty ranges - * are marked as UNVERIFIED. - */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** The parser stores options it doesn't recognize here. See above. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * For external users: DO NOT USE. We are in the process of open sourcing - * extension declaration and executing internal cleanups before it can be - * used externally. - */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** Any features defined in the specific edition. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * The verification state of the range. - * TODO: flip the default to DECLARATION once all empty ranges - * are marked as UNVERIFIED. - */ - public verification: google.protobuf.ExtensionRangeOptions.VerificationState; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** The extension number declared within the extension range. */ - number?: (number|null); - - /** - * The fully-qualified name of the extension field. There must be a leading - * dot in front of the full name. - */ - fullName?: (string|null); - - /** - * The fully-qualified type name of the extension field. Unlike - * Metadata.type, Declaration.type must have a leading dot for messages - * and enums. - */ - type?: (string|null); - - /** - * If true, indicates that the number is reserved in the extension range, - * and any extension field with the number will fail to compile. Set this - * when a declared extension field is deleted. - */ - reserved?: (boolean|null); - - /** - * If true, indicates that the extension must be defined as repeated. - * Otherwise the extension must be defined as optional. - */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** The extension number declared within the extension range. */ - public number: number; - - /** - * The fully-qualified name of the extension field. There must be a leading - * dot in front of the full name. - */ - public fullName: string; - - /** - * The fully-qualified type name of the extension field. Unlike - * Metadata.type, Declaration.type must have a leading dot for messages - * and enums. - */ - public type: string; - - /** - * If true, indicates that the number is reserved in the extension range, - * and any extension field with the number will fail to compile. Set this - * when a declared extension field is deleted. - */ - public reserved: boolean; - - /** - * If true, indicates that the extension must be defined as repeated. - * Otherwise the extension must be defined as optional. - */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** The verification state of the extension range. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|null); - - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type?: (google.protobuf.FieldDescriptorProto.Type|null); - - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName?: (string|null); - - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee?: (string|null); - - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - */ - defaultValue?: (string|null); - - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex?: (number|null); - - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional?: (boolean|null); - } - - /** Describes a field within a message. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: google.protobuf.FieldDescriptorProto.Label; - - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - public type: google.protobuf.FieldDescriptorProto.Type; - - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - public typeName: string; - - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - public extendee: string; - - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - */ - public defaultValue: string; - - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - public oneofIndex: number; - - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Describes a oneof. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName?: (string[]|null); - } - - /** Describes an enum type. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** Inclusive. */ - start?: (number|null); - - /** Inclusive. */ - end?: (number|null); - } - - /** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** Inclusive. */ - public start: number; - - /** Inclusive. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Describes a value within an enum. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Describes a service. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** Identifies if client streams multiple client messages */ - clientStreaming?: (boolean|null); - - /** Identifies if server streams multiple server messages */ - serverStreaming?: (boolean|null); - } - - /** Describes a method of a service. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** Identifies if client streams multiple client messages */ - public clientStreaming: boolean; - - /** Identifies if server streams multiple server messages */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage?: (string|null); - - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname?: (string|null); - - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles?: (boolean|null); - - /** This option does nothing. */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); - - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage?: (string|null); - - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions phpGenericServices */ - phpGenericServices?: (boolean|null); - - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated?: (boolean|null); - - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas?: (boolean|null); - - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix?: (string|null); - - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace?: (string|null); - - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix?: (string|null); - - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix?: (string|null); - - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace?: (string|null); - - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace?: (string|null); - - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage?: (string|null); - - /** Any features defined in the specific edition. */ - features?: (google.protobuf.IFeatureSet|null); - - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - public javaPackage: string; - - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - public javaOuterClassname: string; - - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - public javaMultipleFiles: boolean; - - /** This option does nothing. */ - public javaGenerateEqualsAndHash: boolean; - - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: google.protobuf.FileOptions.OptimizeMode; - - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - public goPackage: string; - - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions phpGenericServices. */ - public phpGenericServices: boolean; - - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - public deprecated: boolean; - - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - public ccEnableArenas: boolean; - - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - public objcClassPrefix: string; - - /** Namespace for generated classes; defaults to the package. */ - public csharpNamespace: string; - - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - public swiftPrefix: string; - - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - public phpClassPrefix: string; - - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - public phpNamespace: string; - - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - public phpMetadataNamespace: string; - - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - public rubyPackage: string; - - /** Any features defined in the specific edition. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** Generated classes can be optimized for speed or code size. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat?: (boolean|null); - - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor?: (boolean|null); - - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated?: (boolean|null); - - /** - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - * - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - */ - mapEntry?: (boolean|null); - - /** - * Enable the legacy handling of JSON field name conflicts. This lowercases - * and strips underscored from the fields before comparison in proto3 only. - * The new behavior takes `json_name` into account and applies to proto2 as - * well. - * - * This should only be used as a temporary measure against broken builds due - * to the change in behavior for JSON field name conflicts. - * - * TODO This is legacy behavior we plan to remove once downstream - * teams have had time to migrate. - */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** Any features defined in the specific edition. */ - features?: (google.protobuf.IFeatureSet|null); - - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - public messageSetWireFormat: boolean; - - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - public noStandardDescriptorAccessor: boolean; - - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - public deprecated: boolean; - - /** - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - * - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - */ - public mapEntry: boolean; - - /** - * Enable the legacy handling of JSON field name conflicts. This lowercases - * and strips underscored from the fields before comparison in proto3 only. - * The new behavior takes `json_name` into account and applies to proto2 as - * well. - * - * This should only be used as a temporary measure against broken builds due - * to the change in behavior for JSON field name conflicts. - * - * TODO This is legacy behavior we plan to remove once downstream - * teams have had time to migrate. - */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** Any features defined in the specific edition. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** The parser stores options it doesn't recognize here. See above. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is only implemented to support use of - * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - * type "bytes" in the open source release -- sorry, we'll try to include - * other types in a future version! - */ - ctype?: (google.protobuf.FieldOptions.CType|null); - - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed?: (boolean|null); - - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype?: (google.protobuf.FieldOptions.JSType|null); - - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - * - * As of May 2022, lazy verifies the contents of the byte stream during - * parsing. An invalid byte stream will cause the overall parsing to fail. - */ - lazy?: (boolean|null); - - /** - * unverified_lazy does no correctness checks on the byte stream. This should - * only be used where lazy with verification is prohibitive for performance - * reasons. - */ - unverifiedLazy?: (boolean|null); - - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated?: (boolean|null); - - /** For Google-internal migration only. Do not use. */ - weak?: (boolean|null); - - /** - * Indicate that the field value should not be printed out when using debug - * formats, e.g. when the field contains sensitive credentials. - */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** Any features defined in the specific edition. */ - features?: (google.protobuf.IFeatureSet|null); - - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is only implemented to support use of - * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - * type "bytes" in the open source release -- sorry, we'll try to include - * other types in a future version! - */ - public ctype: google.protobuf.FieldOptions.CType; - - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - public packed: boolean; - - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - public jstype: google.protobuf.FieldOptions.JSType; - - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - * - * As of May 2022, lazy verifies the contents of the byte stream during - * parsing. An invalid byte stream will cause the overall parsing to fail. - */ - public lazy: boolean; - - /** - * unverified_lazy does no correctness checks on the byte stream. This should - * only be used where lazy with verification is prohibitive for performance - * reasons. - */ - public unverifiedLazy: boolean; - - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - public deprecated: boolean; - - /** For Google-internal migration only. Do not use. */ - public weak: boolean; - - /** - * Indicate that the field value should not be printed out when using debug - * formats, e.g. when the field contains sensitive credentials. - */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: google.protobuf.FieldOptions.OptionRetention; - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** Any features defined in the specific edition. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** The parser stores options it doesn't recognize here. See above. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** - * If set to RETENTION_SOURCE, the option will be omitted from the binary. - * Note: as of January 2023, support for this is in progress and does not yet - * have an effect (b/264593489). - */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** - * This indicates the types of entities that the field may apply to when used - * as an option. If it is unset, then the field may be freely used as an - * option on any kind of entity. Note: as of January 2023, support for this is - * in progress and does not yet have an effect (b/264593489). - */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|null); - - /** Textproto value. */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: google.protobuf.Edition; - - /** Textproto value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** Any features defined in the specific edition. */ - features?: (google.protobuf.IFeatureSet|null); - - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** Any features defined in the specific edition. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** The parser stores options it doesn't recognize here. See above. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias?: (boolean|null); - - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated?: (boolean|null); - - /** - * Enable the legacy handling of JSON field name conflicts. This lowercases - * and strips underscored from the fields before comparison in proto3 only. - * The new behavior takes `json_name` into account and applies to proto2 as - * well. - * TODO Remove this legacy behavior once downstream teams have - * had time to migrate. - */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** Any features defined in the specific edition. */ - features?: (google.protobuf.IFeatureSet|null); - - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - public allowAlias: boolean; - - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - public deprecated: boolean; - - /** - * Enable the legacy handling of JSON field name conflicts. This lowercases - * and strips underscored from the fields before comparison in proto3 only. - * The new behavior takes `json_name` into account and applies to proto2 as - * well. - * TODO Remove this legacy behavior once downstream teams have - * had time to migrate. - */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** Any features defined in the specific edition. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** The parser stores options it doesn't recognize here. See above. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated?: (boolean|null); - - /** Any features defined in the specific edition. */ - features?: (google.protobuf.IFeatureSet|null); - - /** - * Indicate that fields annotated with this enum value should not be printed - * out when using debug formats, e.g. when the field contains sensitive - * credentials. - */ - debugRedact?: (boolean|null); - - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - public deprecated: boolean; - - /** Any features defined in the specific edition. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Indicate that fields annotated with this enum value should not be printed - * out when using debug formats, e.g. when the field contains sensitive - * credentials. - */ - public debugRedact: boolean; - - /** The parser stores options it doesn't recognize here. See above. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** Any features defined in the specific edition. */ - features?: (google.protobuf.IFeatureSet|null); - - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated?: (boolean|null); - - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** Any features defined in the specific edition. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - public deprecated: boolean; - - /** The parser stores options it doesn't recognize here. See above. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** Any features defined in the specific edition. */ - features?: (google.protobuf.IFeatureSet|null); - - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; - - /** Any features defined in the specific edition. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** The parser stores options it doesn't recognize here. See above. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodOptions { - - /** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (Long|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (Long|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: Long; - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: Long; - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: Uint8Array; - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents - * "foo.(bar.baz).moo". - */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|null); - } - - /** - * TODO Enums in C++ gencode (and potentially other languages) are - * not well scoped. This means that each of the feature enums below can clash - * with each other. The short names we've chosen maximize call-site - * readability, but leave us very open to this scenario. A future feature will - * be designed and implemented to handle this, hopefully before we ever hit a - * conflict here. - */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: google.protobuf.FeatureSet.FieldPresence; - - /** FeatureSet enumType. */ - public enumType: google.protobuf.FeatureSet.EnumType; - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: google.protobuf.FeatureSet.RepeatedFieldEncoding; - - /** FeatureSet utf8Validation. */ - public utf8Validation: google.protobuf.FeatureSet.Utf8Validation; - - /** FeatureSet messageEncoding. */ - public messageEncoding: google.protobuf.FeatureSet.MessageEncoding; - - /** FeatureSet jsonFormat. */ - public jsonFormat: google.protobuf.FeatureSet.JsonFormat; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - UNVERIFIED = 1, - VERIFY = 2 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** - * The minimum supported edition (inclusive) when this was constructed. - * Editions before this will not have defaults. - */ - minimumEdition?: (google.protobuf.Edition|null); - - /** - * The maximum known edition (inclusive) when this was constructed. Editions - * after this will not have reliable defaults. - */ - maximumEdition?: (google.protobuf.Edition|null); - } - - /** - * A compiled specification for the defaults of a set of features. These - * messages are generated from FeatureSet extensions and can be used to seed - * feature resolution. The resolution with this object becomes a simple search - * for the closest matching edition, followed by proto merges. - */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** - * The minimum supported edition (inclusive) when this was constructed. - * Editions before this will not have defaults. - */ - public minimumEdition: google.protobuf.Edition; - - /** - * The maximum known edition (inclusive) when this was constructed. Editions - * after this will not have reliable defaults. - */ - public maximumEdition: google.protobuf.Edition; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|null); - - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } - - /** - * A map from every known edition with a unique set of defaults to its - * defaults. Not all editions may be contained here. For a given edition, - * the defaults at the closest matching edition ordered at or before it should - * be used. This field must be in strict ascending order by edition. - */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: google.protobuf.Edition; - - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition occurs. - * For example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path?: (number[]|null); - - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span?: (number[]|null); - - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to moo. - * // - * // Another line attached to moo. - * optional double moo = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to moo or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * to corge. Leading asterisks - * will be removed. * / - * /* Block comment attached to - * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition occurs. - * For example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - public path: number[]; - - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - public span: number[]; - - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to moo. - * // - * // Another line attached to moo. - * optional double moo = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to moo or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path?: (number[]|null); - - /** Identifies the filesystem path to the original source .proto. */ - sourceFile?: (string|null); - - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin?: (number|null); - - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified object. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end?: (number|null); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - public path: number[]; - - /** Identifies the filesystem path to the original source .proto. */ - public sourceFile: string; - - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - public begin: number; - - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified object. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - public end: number; - - /** Annotation semantic. */ - public semantic: google.protobuf.GeneratedCodeInfo.Annotation.Semantic; - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Annotation { - - /** - * Represents the identified object's effect on the element in the original - * .proto file. - */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * *NOTE:** All service configuration rules follow "last one wins" order. - */ - rules?: (google.api.IHttpRule[]|null); - - /** - * When set to true, URL path parameters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - public rules: google.api.IHttpRule[]; - - /** - * When set to true, URL path parameters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Http - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** - * Selects a method to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax - * details. - */ - selector?: (string|null); - - /** - * Maps to HTTP GET. Used for listing and getting information about - * resources. - */ - get?: (string|null); - - /** Maps to HTTP PUT. Used for replacing a resource. */ - put?: (string|null); - - /** Maps to HTTP POST. Used for creating a resource or performing an action. */ - post?: (string|null); - - /** Maps to HTTP DELETE. Used for deleting a resource. */ - "delete"?: (string|null); - - /** Maps to HTTP PATCH. Used for updating a resource. */ - patch?: (string|null); - - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom?: (google.api.ICustomHttpPattern|null); - - /** - * The name of the request field whose value is mapped to the HTTP request - * body, or `*` for mapping all request fields not captured by the path - * pattern to the HTTP body, or omitted for not having any HTTP request body. - * - * NOTE: the referred field must be present at the top-level of the request - * message type. - */ - body?: (string|null); - - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * response body. When omitted, the entire response message will be used - * as the HTTP response body. - * - * NOTE: The referred field must be present at the top-level of the response - * message type. - */ - responseBody?: (string|null); - - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** - * # gRPC Transcoding - * - * gRPC Transcoding is a feature for mapping between a gRPC method and one or - * more HTTP REST endpoints. It allows developers to build a single API service - * that supports both gRPC APIs and REST APIs. Many systems, including [Google - * APIs](https://github.com/googleapis/googleapis), - * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC - * Gateway](https://github.com/grpc-ecosystem/grpc-gateway), - * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature - * and use it for large scale production services. - * - * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies - * how different portions of the gRPC request message are mapped to the URL - * path, URL query parameters, and HTTP request body. It also controls how the - * gRPC response message is mapped to the HTTP response body. `HttpRule` is - * typically specified as an `google.api.http` annotation on the gRPC method. - * - * Each mapping specifies a URL path template and an HTTP method. The path - * template may refer to one or more fields in the gRPC request message, as long - * as each field is a non-repeated field with a primitive (non-message) type. - * The path template controls how fields of the request message are mapped to - * the URL path. - * - * Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/{name=messages/*}" - * }; - * } - * } - * message GetMessageRequest { - * string name = 1; // Mapped to URL path. - * } - * message Message { - * string text = 1; // The resource content. - * } - * - * This enables an HTTP REST to gRPC mapping as below: - * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` - * - * Any fields in the request message which are not bound by the path template - * automatically become HTTP query parameters if there is no HTTP request body. - * For example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get:"/v1/messages/{message_id}" - * }; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // Mapped to URL path. - * int64 revision = 2; // Mapped to URL query parameter `revision`. - * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. - * } - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | - * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: - * "foo"))` - * - * Note that fields which are mapped to URL query parameters must have a - * primitive type or a repeated primitive type or a non-repeated message type. - * In the case of a repeated type, the parameter can be repeated in the URL - * as `...?param=A¶m=B`. In the case of a message type, each field of the - * message is mapped to a separate parameter, such as - * `...?foo.a=A&foo.b=B&foo.c=C`. - * - * For HTTP methods that allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * patch: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | gRPC - * -----|----- - * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * patch: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | gRPC - * -----|----- - * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice when - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * This enables the following two alternative HTTP JSON to RPC mappings: - * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: - * "123456")` - * - * ## Rules for HTTP mapping - * - * 1. Leaf request fields (recursive expansion nested messages in the request - * message) are classified into three categories: - * - Fields referred by the path template. They are passed via the URL path. - * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They - * are passed via the HTTP - * request body. - * - All other fields are passed via the URL query parameters, and the - * parameter name is the field path in the request message. A repeated - * field can be represented as multiple query parameters under the same - * name. - * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL - * query parameter, all fields - * are passed via URL path and HTTP request body. - * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP - * request body, all - * fields are passed via URL path and URL query parameters. - * - * ### Path template syntax - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single URL path segment. The syntax `**` matches - * zero or more URL path segments, which must be the last part of the URL path - * except the `Verb`. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` - * contains any reserved character, such characters should be percent-encoded - * before the matching. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path on the client - * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The - * server side does the reverse decoding. Such variables show up in the - * [Discovery - * Document](https://developers.google.com/discovery/v1/reference/apis) as - * `{var}`. - * - * If a variable contains multiple path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path on the - * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. - * The server side does the reverse decoding, except "%2F" and "%2f" are left - * unchanged. Such variables show up in the - * [Discovery - * Document](https://developers.google.com/discovery/v1/reference/apis) as - * `{+var}`. - * - * ## Using gRPC API Service Configuration - * - * gRPC API Service Configuration (service config) is a configuration language - * for configuring a gRPC service to become a user-facing product. The - * service config is simply the YAML representation of the `google.api.Service` - * proto message. - * - * As an alternative to annotating your proto file, you can configure gRPC - * transcoding in your service config YAML files. You do this by specifying a - * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same - * effect as the proto annotation. This can be particularly useful if you - * have a proto that is reused in multiple services. Note that any transcoding - * specified in the service config will override any matching transcoding - * configuration in the proto. - * - * Example: - * - * http: - * rules: - * # Selects a gRPC method and applies HttpRule to it. - * - selector: example.v1.Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * ## Special notes - * - * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the - * proto to JSON conversion must follow the [proto3 - * specification](https://developers.google.com/protocol-buffers/docs/proto3#json). - * - * While the single segment variable follows the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String - * Expansion, the multi segment variable **does not** follow RFC 6570 Section - * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding - * for multi segment variables. - * - * The path variables **must not** refer to any repeated or mapped field, - * because client libraries are not capable of handling such variable expansion. - * - * The path variables **must not** capture the leading "/" character. The reason - * is that the most common use case "{var}" does not capture the leading "/" - * character. For consistency, all path variables must share the same behavior. - * - * Repeated message fields must not be mapped to URL query parameters, because - * no client library can support such complicated mapping. - * - * If an API needs to use a JSON array for request or response body, it can map - * the request or response body to a repeated field. However, some gRPC - * Transcoding implementations may not support this feature. - */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** - * Selects a method to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax - * details. - */ - public selector: string; - - /** - * Maps to HTTP GET. Used for listing and getting information about - * resources. - */ - public get?: (string|null); - - /** Maps to HTTP PUT. Used for replacing a resource. */ - public put?: (string|null); - - /** Maps to HTTP POST. Used for creating a resource or performing an action. */ - public post?: (string|null); - - /** Maps to HTTP DELETE. Used for deleting a resource. */ - public delete?: (string|null); - - /** Maps to HTTP PATCH. Used for updating a resource. */ - public patch?: (string|null); - - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** - * The name of the request field whose value is mapped to the HTTP request - * body, or `*` for mapping all request fields not captured by the path - * pattern to the HTTP body, or omitted for not having any HTTP request body. - * - * NOTE: the referred field must be present at the top-level of the request - * message type. - */ - public body: string; - - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * response body. When omitted, the entire response message will be used - * as the HTTP response body. - * - * NOTE: The referred field must be present at the top-level of the response - * message type. - */ - public responseBody: string; - - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - public additionalBindings: google.api.IHttpRule[]; - - /** - * Determines the URL pattern is matched by this rules. This pattern can be - * used with any of the {get|put|post|delete|patch} methods. A custom method - * can be defined using the 'custom' field. - */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** The name of this custom HTTP verb. */ - kind?: (string|null); - - /** The path matched by this custom verb. */ - path?: (string|null); - } - - /** A custom pattern is used for defining custom HTTP verb. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** The name of this custom HTTP verb. */ - public kind: string; - - /** The path matched by this custom verb. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** - * The status code, which should be an enum value of - * [google.rpc.Code][google.rpc.Code]. - */ - code?: (number|null); - - /** - * A developer-facing error message, which should be in English. Any - * user-facing error message should be localized and sent in the - * [google.rpc.Status.details][google.rpc.Status.details] field, or localized - * by the client. - */ - message?: (string|null); - - /** - * A list of messages that carry the error details. There is a common set of - * message types for APIs to use. - */ - details?: (google.protobuf.IAny[]|null); - } - - /** - * The `Status` type defines a logical error model that is suitable for - * different programming environments, including REST APIs and RPC APIs. It is - * used by [gRPC](https://github.com/grpc). Each `Status` message contains - * three pieces of data: error code, error message, and error details. - * - * You can find out more about this error model and how to work with it in the - * [API Design Guide](https://cloud.google.com/apis/design/errors). - */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** - * The status code, which should be an enum value of - * [google.rpc.Code][google.rpc.Code]. - */ - public code: number; - - /** - * A developer-facing error message, which should be in English. Any - * user-facing error message should be localized and sent in the - * [google.rpc.Status.details][google.rpc.Status.details] field, or localized - * by the client. - */ - public message: string; - - /** - * A list of messages that carry the error details. There is a common set of - * message types for APIs to use. - */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} - -/** Namespace grpc. */ -export namespace grpc { - - /** Namespace health. */ - namespace health { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a HealthCheckRequest. */ - interface IHealthCheckRequest { - - /** HealthCheckRequest service */ - service?: (string|null); - } - - /** Represents a HealthCheckRequest. */ - class HealthCheckRequest implements IHealthCheckRequest { - - /** - * Constructs a new HealthCheckRequest. - * @param [properties] Properties to set - */ - constructor(properties?: grpc.health.v1.IHealthCheckRequest); - - /** HealthCheckRequest service. */ - public service: string; - - /** - * Creates a new HealthCheckRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns HealthCheckRequest instance - */ - public static create(properties?: grpc.health.v1.IHealthCheckRequest): grpc.health.v1.HealthCheckRequest; - - /** - * Encodes the specified HealthCheckRequest message. Does not implicitly {@link grpc.health.v1.HealthCheckRequest.verify|verify} messages. - * @param message HealthCheckRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grpc.health.v1.IHealthCheckRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HealthCheckRequest message, length delimited. Does not implicitly {@link grpc.health.v1.HealthCheckRequest.verify|verify} messages. - * @param message HealthCheckRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grpc.health.v1.IHealthCheckRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HealthCheckRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HealthCheckRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grpc.health.v1.HealthCheckRequest; - - /** - * Decodes a HealthCheckRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HealthCheckRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grpc.health.v1.HealthCheckRequest; - - /** - * Creates a HealthCheckRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HealthCheckRequest - */ - public static fromObject(object: { [k: string]: any }): grpc.health.v1.HealthCheckRequest; - - /** - * Creates a plain object from a HealthCheckRequest message. Also converts values to other types if specified. - * @param message HealthCheckRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grpc.health.v1.HealthCheckRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HealthCheckRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HealthCheckRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HealthCheckResponse. */ - interface IHealthCheckResponse { - - /** HealthCheckResponse status */ - status?: (grpc.health.v1.HealthCheckResponse.ServingStatus|null); - } - - /** Represents a HealthCheckResponse. */ - class HealthCheckResponse implements IHealthCheckResponse { - - /** - * Constructs a new HealthCheckResponse. - * @param [properties] Properties to set - */ - constructor(properties?: grpc.health.v1.IHealthCheckResponse); - - /** HealthCheckResponse status. */ - public status: grpc.health.v1.HealthCheckResponse.ServingStatus; - - /** - * Creates a new HealthCheckResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns HealthCheckResponse instance - */ - public static create(properties?: grpc.health.v1.IHealthCheckResponse): grpc.health.v1.HealthCheckResponse; - - /** - * Encodes the specified HealthCheckResponse message. Does not implicitly {@link grpc.health.v1.HealthCheckResponse.verify|verify} messages. - * @param message HealthCheckResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grpc.health.v1.IHealthCheckResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HealthCheckResponse message, length delimited. Does not implicitly {@link grpc.health.v1.HealthCheckResponse.verify|verify} messages. - * @param message HealthCheckResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grpc.health.v1.IHealthCheckResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HealthCheckResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HealthCheckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grpc.health.v1.HealthCheckResponse; - - /** - * Decodes a HealthCheckResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HealthCheckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grpc.health.v1.HealthCheckResponse; - - /** - * Creates a HealthCheckResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HealthCheckResponse - */ - public static fromObject(object: { [k: string]: any }): grpc.health.v1.HealthCheckResponse; - - /** - * Creates a plain object from a HealthCheckResponse message. Also converts values to other types if specified. - * @param message HealthCheckResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grpc.health.v1.HealthCheckResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HealthCheckResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HealthCheckResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace HealthCheckResponse { - - /** ServingStatus enum. */ - enum ServingStatus { - UNKNOWN = 0, - SERVING = 1, - NOT_SERVING = 2, - SERVICE_UNKNOWN = 3 - } - } - - /** Represents a Health */ - class Health extends $protobuf.rpc.Service { - - /** - * Constructs a new Health service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new Health service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Health; - - /** - * If the requested service is unknown, the call will fail with status - * NOT_FOUND. - * @param request HealthCheckRequest message or plain object - * @param callback Node-style callback called with the error, if any, and HealthCheckResponse - */ - public check(request: grpc.health.v1.IHealthCheckRequest, callback: grpc.health.v1.Health.CheckCallback): void; - - /** - * If the requested service is unknown, the call will fail with status - * NOT_FOUND. - * @param request HealthCheckRequest message or plain object - * @returns Promise - */ - public check(request: grpc.health.v1.IHealthCheckRequest): Promise; - - /** - * Performs a watch for the serving status of the requested service. - * The server will immediately send back a message indicating the current - * serving status. It will then subsequently send a new message whenever - * the service's serving status changes. - * - * If the requested service is unknown when the call is received, the - * server will send a message setting the serving status to - * SERVICE_UNKNOWN but will *not* terminate the call. If at some - * future point, the serving status of the service becomes known, the - * server will send a new message with the service's serving status. - * - * If the call terminates with status UNIMPLEMENTED, then clients - * should assume this method is not supported and should not retry the - * call. If the call terminates with any other status (including OK), - * clients should retry the call with appropriate exponential backoff. - * @param request HealthCheckRequest message or plain object - * @param callback Node-style callback called with the error, if any, and HealthCheckResponse - */ - public watch(request: grpc.health.v1.IHealthCheckRequest, callback: grpc.health.v1.Health.WatchCallback): void; - - /** - * Performs a watch for the serving status of the requested service. - * The server will immediately send back a message indicating the current - * serving status. It will then subsequently send a new message whenever - * the service's serving status changes. - * - * If the requested service is unknown when the call is received, the - * server will send a message setting the serving status to - * SERVICE_UNKNOWN but will *not* terminate the call. If at some - * future point, the serving status of the service becomes known, the - * server will send a new message with the service's serving status. - * - * If the call terminates with status UNIMPLEMENTED, then clients - * should assume this method is not supported and should not retry the - * call. If the call terminates with any other status (including OK), - * clients should retry the call with appropriate exponential backoff. - * @param request HealthCheckRequest message or plain object - * @returns Promise - */ - public watch(request: grpc.health.v1.IHealthCheckRequest): Promise; - } - - namespace Health { - - /** - * Callback as used by {@link grpc.health.v1.Health#check}. - * @param error Error, if any - * @param [response] HealthCheckResponse - */ - type CheckCallback = (error: (Error|null), response?: grpc.health.v1.HealthCheckResponse) => void; - - /** - * Callback as used by {@link grpc.health.v1.Health#watch}. - * @param error Error, if any - * @param [response] HealthCheckResponse - */ - type WatchCallback = (error: (Error|null), response?: grpc.health.v1.HealthCheckResponse) => void; - } - } - } -} diff --git a/node_modules/@temporalio/proto/protos/root.js b/node_modules/@temporalio/proto/protos/root.js deleted file mode 100644 index 1b6975c..0000000 --- a/node_modules/@temporalio/proto/protos/root.js +++ /dev/null @@ -1,9 +0,0 @@ -// Workaround an issue that prevents protobufjs from loading 'long' in Yarn 3 PnP -// https://github.com/protobufjs/protobuf.js/issues/1745#issuecomment-1200319399 -const $protobuf = require('protobufjs/light'); -$protobuf.util.Long = require('long'); -$protobuf.configure(); - -const { patchProtobufRoot } = require('../lib/patch-protobuf-root'); -const unpatchedRoot = require('./json-module'); -module.exports = patchProtobufRoot(unpatchedRoot); diff --git a/node_modules/@temporalio/proto/src/patch-protobuf-root.ts b/node_modules/@temporalio/proto/src/patch-protobuf-root.ts deleted file mode 100644 index 74ce930..0000000 --- a/node_modules/@temporalio/proto/src/patch-protobuf-root.ts +++ /dev/null @@ -1,68 +0,0 @@ -const ROOT_PROPS = [ - 'options', - 'parsedOptions', - 'name', - 'parent', - 'resolved', - 'comment', - 'filename', - 'nested', - '_nestedArray', -]; - -/** - * Create a version of `root` with non-nested namespaces to match the generated types. - * For more information, see: - * https://github.com/temporalio/sdk-typescript/blob/main/docs/protobuf-libraries.md#current-solution - * @param root Generated by `pbjs -t json-module -w commonjs -o json-module.js *.proto` - * @returns A new patched `root` - */ -export function patchProtobufRoot>(root: T): T { - return _patchProtobufRoot(root); -} - -function _patchProtobufRoot>(root: T, name?: string): T { - const newRoot = new (root.constructor as any)(isNamespace(root) ? name : {}); - for (const key in root) { - newRoot[key] = root[key]; - } - - if (isRecord(root.nested)) { - for (const typeOrNamespace in root.nested) { - const value = root.nested[typeOrNamespace]; - if (ROOT_PROPS.includes(typeOrNamespace)) { - console.log( - `patchProtobufRoot warning: overriding property '${typeOrNamespace}' that is used by protobufjs with the '${typeOrNamespace}' protobuf ${ - isNamespace(value) ? 'namespace' : 'type' - }. This may result in protobufjs not working property.` - ); - } - - if (isNamespace(value)) { - newRoot[typeOrNamespace] = _patchProtobufRoot(value, typeOrNamespace); - } else if (isType(value)) { - newRoot[typeOrNamespace] = value; - } - } - } - - return newRoot; -} - -type Type = Record; -type Namespace = { nested: Record }; - -function isType(value: unknown): value is Type { - // constructor.name may get mangled by minifiers; thanksfuly protobufjs also sets a constructor.className property - return isRecord(value) && (value.constructor as any).className === 'Type'; -} - -function isNamespace(value: unknown): value is Namespace { - // constructor.name may get mangled by minifiers; thanksfuly protobufjs also sets a constructor.className property - return isRecord(value) && (value.constructor as any).className === 'Namespace'; -} - -// Duplicate from type-helpers instead of importing in order to avoid circular dependency -function isRecord(value: unknown): value is Record { - return typeof value === 'object' && value !== null; -} diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/node/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md deleted file mode 100644 index 501b8dc..0000000 --- a/node_modules/@types/node/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/node` - -# Summary -This package contains type definitions for node (https://nodejs.org/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. - -### Additional Details - * Last updated: Tue, 19 May 2026 17:48:56 GMT - * Dependencies: [undici-types](https://npmjs.com/package/undici-types) - -# Credits -These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), [René](https://github.com/Renegade334), and [Yagiz Nizipli](https://github.com/anonrig). diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts deleted file mode 100644 index c4cc77e..0000000 --- a/node_modules/@types/node/assert.d.ts +++ /dev/null @@ -1,950 +0,0 @@ -declare module "node:assert" { - import strict = require("node:assert/strict"); - /** - * An alias of {@link assert.ok}. - * @since v0.5.9 - * @param value The input that is checked for being truthy. - */ - function assert(value: unknown, message?: string | Error): asserts value; - const kOptions: unique symbol; - namespace assert { - type AssertMethodNames = - | "deepEqual" - | "deepStrictEqual" - | "doesNotMatch" - | "doesNotReject" - | "doesNotThrow" - | "equal" - | "fail" - | "ifError" - | "match" - | "notDeepEqual" - | "notDeepStrictEqual" - | "notEqual" - | "notStrictEqual" - | "ok" - | "partialDeepStrictEqual" - | "rejects" - | "strictEqual" - | "throws"; - interface AssertOptions { - /** - * If set to `'full'`, shows the full diff in assertion errors. - * @default 'simple' - */ - diff?: "simple" | "full" | undefined; - /** - * If set to `true`, non-strict methods behave like their - * corresponding strict methods. - * @default true - */ - strict?: boolean | undefined; - /** - * If set to `true`, skips prototype and constructor - * comparison in deep equality checks. - * @since v24.9.0 - * @default false - */ - skipPrototype?: boolean | undefined; - } - interface Assert extends Pick { - readonly [kOptions]: AssertOptions & { strict: false }; - } - interface AssertStrict extends Pick { - readonly [kOptions]: AssertOptions & { strict: true }; - } - /** - * The `Assert` class allows creating independent assertion instances with custom options. - * @since v24.6.0 - */ - var Assert: { - /** - * Creates a new assertion instance. The `diff` option controls the verbosity of diffs in assertion error messages. - * - * ```js - * const { Assert } = require('node:assert'); - * const assertInstance = new Assert({ diff: 'full' }); - * assertInstance.deepStrictEqual({ a: 1 }, { a: 2 }); - * // Shows a full diff in the error message. - * ``` - * - * **Important**: When destructuring assertion methods from an `Assert` instance, - * the methods lose their connection to the instance's configuration options (such - * as `diff`, `strict`, and `skipPrototype` settings). - * The destructured methods will fall back to default behavior instead. - * - * ```js - * const myAssert = new Assert({ diff: 'full' }); - * - * // This works as expected - uses 'full' diff - * myAssert.strictEqual({ a: 1 }, { b: { c: 1 } }); - * - * // This loses the 'full' diff setting - falls back to default 'simple' diff - * const { strictEqual } = myAssert; - * strictEqual({ a: 1 }, { b: { c: 1 } }); - * ``` - * - * The `skipPrototype` option affects all deep equality methods: - * - * ```js - * class Foo { - * constructor(a) { - * this.a = a; - * } - * } - * - * class Bar { - * constructor(a) { - * this.a = a; - * } - * } - * - * const foo = new Foo(1); - * const bar = new Bar(1); - * - * // Default behavior - fails due to different constructors - * const assert1 = new Assert(); - * assert1.deepStrictEqual(foo, bar); // AssertionError - * - * // Skip prototype comparison - passes if properties are equal - * const assert2 = new Assert({ skipPrototype: true }); - * assert2.deepStrictEqual(foo, bar); // OK - * ``` - * - * When destructured, methods lose access to the instance's `this` context and revert to default assertion behavior - * (diff: 'simple', non-strict mode). - * To maintain custom options when using destructured methods, avoid - * destructuring and call methods directly on the instance. - * @since v24.6.0 - */ - new( - options?: AssertOptions & { strict?: true | undefined }, - ): AssertStrict; - new( - options: AssertOptions, - ): Assert; - }; - interface AssertionErrorOptions { - /** - * If provided, the error message is set to this value. - */ - message?: string | undefined; - /** - * The `actual` property on the error instance. - */ - actual?: unknown; - /** - * The `expected` property on the error instance. - */ - expected?: unknown; - /** - * The `operator` property on the error instance. - */ - operator?: string | undefined; - /** - * If provided, the generated stack trace omits frames before this function. - */ - stackStartFn?: Function | undefined; - /** - * If set to `'full'`, shows the full diff in assertion errors. - * @default 'simple' - */ - diff?: "simple" | "full" | undefined; - } - /** - * Indicates the failure of an assertion. All errors thrown by the `node:assert` module will be instances of the `AssertionError` class. - */ - class AssertionError extends Error { - constructor(options: AssertionErrorOptions); - /** - * Set to the `actual` argument for methods such as {@link assert.strictEqual()}. - */ - actual: unknown; - /** - * Set to the `expected` argument for methods such as {@link assert.strictEqual()}. - */ - expected: unknown; - /** - * Indicates if the message was auto-generated (`true`) or not. - */ - generatedMessage: boolean; - /** - * Value is always `ERR_ASSERTION` to show that the error is an assertion error. - */ - code: "ERR_ASSERTION"; - /** - * Set to the passed in operator value. - */ - operator: string; - } - type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error; - /** - * Throws an `AssertionError` with the provided error message or a default - * error message. If the `message` parameter is an instance of an `Error` then - * it will be thrown instead of the `AssertionError`. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.fail(); - * // AssertionError [ERR_ASSERTION]: Failed - * - * assert.fail('boom'); - * // AssertionError [ERR_ASSERTION]: boom - * - * assert.fail(new TypeError('need array')); - * // TypeError: need array - * ``` - * @since v0.1.21 - * @param [message='Failed'] - */ - function fail(message?: string | Error): never; - /** - * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`. - * - * If `value` is not truthy, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is `undefined`, a default - * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. - * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``. - * - * Be aware that in the `repl` the error message will be different to the one - * thrown in a file! See below for further details. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.ok(true); - * // OK - * assert.ok(1); - * // OK - * - * assert.ok(); - * // AssertionError: No value argument passed to `assert.ok()` - * - * assert.ok(false, 'it\'s false'); - * // AssertionError: it's false - * - * // In the repl: - * assert.ok(typeof 123 === 'string'); - * // AssertionError: false == true - * - * // In a file (e.g. test.js): - * assert.ok(typeof 123 === 'string'); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert.ok(typeof 123 === 'string') - * - * assert.ok(false); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert.ok(false) - * - * assert.ok(0); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert.ok(0) - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * // Using `assert()` works the same: - * assert(2 + 2 > 5);; - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert(2 + 2 > 5) - * ``` - * @since v0.1.21 - */ - function ok(value: unknown, message?: string | Error): asserts value; - /** - * **Strict assertion mode** - * - * An alias of {@link strictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link strictEqual} instead. - * - * Tests shallow, coercive equality between the `actual` and `expected` parameters - * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled - * and treated as being identical if both sides are `NaN`. - * - * ```js - * import assert from 'node:assert'; - * - * assert.equal(1, 1); - * // OK, 1 == 1 - * assert.equal(1, '1'); - * // OK, 1 == '1' - * assert.equal(NaN, NaN); - * // OK - * - * assert.equal(1, 2); - * // AssertionError: 1 == 2 - * assert.equal({ a: { b: 1 } }, { a: { b: 1 } }); - * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } } - * ``` - * - * If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default - * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. - * @since v0.1.21 - */ - function equal(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * **Strict assertion mode** - * - * An alias of {@link notStrictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead. - * - * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is - * specially handled and treated as being identical if both sides are `NaN`. - * - * ```js - * import assert from 'node:assert'; - * - * assert.notEqual(1, 2); - * // OK - * - * assert.notEqual(1, 1); - * // AssertionError: 1 != 1 - * - * assert.notEqual(1, '1'); - * // AssertionError: 1 != '1' - * ``` - * - * If the values are equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default error - * message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. - * @since v0.1.21 - */ - function notEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * **Strict assertion mode** - * - * An alias of {@link deepStrictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead. - * - * Tests for deep equality between the `actual` and `expected` parameters. Consider - * using {@link deepStrictEqual} instead. {@link deepEqual} can have - * surprising results. - * - * _Deep equality_ means that the enumerable "own" properties of child objects - * are also recursively evaluated by the following rules. - * @since v0.1.21 - */ - function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * **Strict assertion mode** - * - * An alias of {@link notDeepStrictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead. - * - * Tests for any deep inequality. Opposite of {@link deepEqual}. - * - * ```js - * import assert from 'node:assert'; - * - * const obj1 = { - * a: { - * b: 1, - * }, - * }; - * const obj2 = { - * a: { - * b: 2, - * }, - * }; - * const obj3 = { - * a: { - * b: 1, - * }, - * }; - * const obj4 = { __proto__: obj1 }; - * - * assert.notDeepEqual(obj1, obj1); - * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } - * - * assert.notDeepEqual(obj1, obj2); - * // OK - * - * assert.notDeepEqual(obj1, obj3); - * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } - * - * assert.notDeepEqual(obj1, obj4); - * // OK - * ``` - * - * If the values are deeply equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default - * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v0.1.21 - */ - function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * Tests strict equality between the `actual` and `expected` parameters as - * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.strictEqual(1, 2); - * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: - * // - * // 1 !== 2 - * - * assert.strictEqual(1, 1); - * // OK - * - * assert.strictEqual('Hello foobar', 'Hello World!'); - * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: - * // + actual - expected - * // - * // + 'Hello foobar' - * // - 'Hello World!' - * // ^ - * - * const apples = 1; - * const oranges = 2; - * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`); - * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2 - * - * assert.strictEqual(1, '1', new TypeError('Inputs are not identical')); - * // TypeError: Inputs are not identical - * ``` - * - * If the values are not strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a - * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v0.1.21 - */ - function strictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; - /** - * Tests strict inequality between the `actual` and `expected` parameters as - * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.notStrictEqual(1, 2); - * // OK - * - * assert.notStrictEqual(1, 1); - * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to: - * // - * // 1 - * - * assert.notStrictEqual(1, '1'); - * // OK - * ``` - * - * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a - * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v0.1.21 - */ - function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * Tests for deep equality between the `actual` and `expected` parameters. - * "Deep" equality means that the enumerable "own" properties of child objects - * are recursively evaluated also by the following rules. - * @since v1.2.0 - */ - function deepStrictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; - /** - * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.notDeepStrictEqual({ a: 1 }, { a: '1' }); - * // OK - * ``` - * - * If the values are deeply and strictly equal, an `AssertionError` is thrown - * with a `message` property set equal to the value of the `message` parameter. If - * the `message` parameter is undefined, a default error message is assigned. If - * the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v1.2.0 - */ - function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * Expects the function `fn` to throw an error. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, - * a validation object where each property will be tested for strict deep equality, - * or an instance of error where each property will be tested for strict deep - * equality including the non-enumerable `message` and `name` properties. When - * using an object, it is also possible to use a regular expression, when - * validating against a string property. See below for examples. - * - * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation - * fails. - * - * Custom validation object/error instance: - * - * ```js - * import assert from 'node:assert/strict'; - * - * const err = new TypeError('Wrong value'); - * err.code = 404; - * err.foo = 'bar'; - * err.info = { - * nested: true, - * baz: 'text', - * }; - * err.reg = /abc/i; - * - * assert.throws( - * () => { - * throw err; - * }, - * { - * name: 'TypeError', - * message: 'Wrong value', - * info: { - * nested: true, - * baz: 'text', - * }, - * // Only properties on the validation object will be tested for. - * // Using nested objects requires all properties to be present. Otherwise - * // the validation is going to fail. - * }, - * ); - * - * // Using regular expressions to validate error properties: - * assert.throws( - * () => { - * throw err; - * }, - * { - * // The `name` and `message` properties are strings and using regular - * // expressions on those will match against the string. If they fail, an - * // error is thrown. - * name: /^TypeError$/, - * message: /Wrong/, - * foo: 'bar', - * info: { - * nested: true, - * // It is not possible to use regular expressions for nested properties! - * baz: 'text', - * }, - * // The `reg` property contains a regular expression and only if the - * // validation object contains an identical regular expression, it is going - * // to pass. - * reg: /abc/i, - * }, - * ); - * - * // Fails due to the different `message` and `name` properties: - * assert.throws( - * () => { - * const otherErr = new Error('Not found'); - * // Copy all enumerable properties from `err` to `otherErr`. - * for (const [key, value] of Object.entries(err)) { - * otherErr[key] = value; - * } - * throw otherErr; - * }, - * // The error's `message` and `name` properties will also be checked when using - * // an error as validation object. - * err, - * ); - * ``` - * - * Validate instanceof using constructor: - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.throws( - * () => { - * throw new Error('Wrong value'); - * }, - * Error, - * ); - * ``` - * - * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions): - * - * Using a regular expression runs `.toString` on the error object, and will - * therefore also include the error name. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.throws( - * () => { - * throw new Error('Wrong value'); - * }, - * /^Error: Wrong value$/, - * ); - * ``` - * - * Custom error validation: - * - * The function must return `true` to indicate all internal validations passed. - * It will otherwise fail with an `AssertionError`. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.throws( - * () => { - * throw new Error('Wrong value'); - * }, - * (err) => { - * assert(err instanceof Error); - * assert(/value/.test(err)); - * // Avoid returning anything from validation functions besides `true`. - * // Otherwise, it's not clear what part of the validation failed. Instead, - * // throw an error about the specific validation that failed (as done in this - * // example) and add as much helpful debugging information to that error as - * // possible. - * return true; - * }, - * 'unexpected error', - * ); - * ``` - * - * `error` cannot be a string. If a string is provided as the second - * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same - * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using - * a string as the second argument gets considered: - * - * ```js - * import assert from 'node:assert/strict'; - * - * function throwingFirst() { - * throw new Error('First'); - * } - * - * function throwingSecond() { - * throw new Error('Second'); - * } - * - * function notThrowing() {} - * - * // The second argument is a string and the input function threw an Error. - * // The first case will not throw as it does not match for the error message - * // thrown by the input function! - * assert.throws(throwingFirst, 'Second'); - * // In the next example the message has no benefit over the message from the - * // error and since it is not clear if the user intended to actually match - * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error. - * assert.throws(throwingSecond, 'Second'); - * // TypeError [ERR_AMBIGUOUS_ARGUMENT] - * - * // The string is only used (as message) in case the function does not throw: - * assert.throws(notThrowing, 'Second'); - * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second - * - * // If it was intended to match for the error message do this instead: - * // It does not throw because the error messages match. - * assert.throws(throwingSecond, /Second$/); - * - * // If the error message does not match, an AssertionError is thrown. - * assert.throws(throwingFirst, /Second$/); - * // AssertionError [ERR_ASSERTION] - * ``` - * - * Due to the confusing error-prone notation, avoid a string as the second - * argument. - * @since v0.1.21 - */ - function throws(block: () => unknown, message?: string | Error): void; - function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void; - /** - * Asserts that the function `fn` does not throw an error. - * - * Using `assert.doesNotThrow()` is actually not useful because there - * is no benefit in catching an error and then rethrowing it. Instead, consider - * adding a comment next to the specific code path that should not throw and keep - * error messages as expressive as possible. - * - * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function. - * - * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a - * different type, or if the `error` parameter is undefined, the error is - * propagated back to the caller. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation - * function. See {@link throws} for more details. - * - * The following, for instance, will throw the `TypeError` because there is no - * matching error type in the assertion: - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotThrow( - * () => { - * throw new TypeError('Wrong value'); - * }, - * SyntaxError, - * ); - * ``` - * - * However, the following will result in an `AssertionError` with the message - * 'Got unwanted exception...': - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotThrow( - * () => { - * throw new TypeError('Wrong value'); - * }, - * TypeError, - * ); - * ``` - * - * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message: - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotThrow( - * () => { - * throw new TypeError('Wrong value'); - * }, - * /Wrong value/, - * 'Whoops', - * ); - * // Throws: AssertionError: Got unwanted exception: Whoops - * ``` - * @since v0.1.21 - */ - function doesNotThrow(block: () => unknown, message?: string | Error): void; - function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void; - /** - * Throws `value` if `value` is not `undefined` or `null`. This is useful when - * testing the `error` argument in callbacks. The stack trace contains all frames - * from the error passed to `ifError()` including the potential new frames for `ifError()` itself. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.ifError(null); - * // OK - * assert.ifError(0); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0 - * assert.ifError('error'); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error' - * assert.ifError(new Error()); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error - * - * // Create some random error frames. - * let err; - * (function errorFrame() { - * err = new Error('test error'); - * })(); - * - * (function ifErrorFrame() { - * assert.ifError(err); - * })(); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error - * // at ifErrorFrame - * // at errorFrame - * ``` - * @since v0.1.97 - */ - function ifError(value: unknown): asserts value is null | undefined; - /** - * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately - * calls the function and awaits the returned promise to complete. It will then - * check that the promise is rejected. - * - * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the - * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value) - * error. In both cases the error handler is skipped. - * - * Besides the async nature to await the completion behaves identically to {@link throws}. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, - * an object where each property will be tested for, or an instance of error where - * each property will be tested for including the non-enumerable `message` and `name` properties. - * - * If specified, `message` will be the message provided by the `{@link AssertionError}` if the `asyncFn` fails to reject. - * - * ```js - * import assert from 'node:assert/strict'; - * - * await assert.rejects( - * async () => { - * throw new TypeError('Wrong value'); - * }, - * { - * name: 'TypeError', - * message: 'Wrong value', - * }, - * ); - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * await assert.rejects( - * async () => { - * throw new TypeError('Wrong value'); - * }, - * (err) => { - * assert.strictEqual(err.name, 'TypeError'); - * assert.strictEqual(err.message, 'Wrong value'); - * return true; - * }, - * ); - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.rejects( - * Promise.reject(new Error('Wrong value')), - * Error, - * ).then(() => { - * // ... - * }); - * ``` - * - * `error` cannot be a string. If a string is provided as the second argument, then `error` is assumed to - * be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Please read the - * example in {@link throws} carefully if using a string as the second argument gets considered. - * @since v10.0.0 - */ - function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; - function rejects( - block: (() => Promise) | Promise, - error: AssertPredicate, - message?: string | Error, - ): Promise; - /** - * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately - * calls the function and awaits the returned promise to complete. It will then - * check that the promise is not rejected. - * - * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If - * the function does not return a promise, `assert.doesNotReject()` will return a - * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value) error. In both cases - * the error handler is skipped. - * - * Using `assert.doesNotReject()` is actually not useful because there is little - * benefit in catching a rejection and then rejecting it again. Instead, consider - * adding a comment next to the specific code path that should not reject and keep - * error messages as expressive as possible. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation - * function. See {@link throws} for more details. - * - * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}. - * - * ```js - * import assert from 'node:assert/strict'; - * - * await assert.doesNotReject( - * async () => { - * throw new TypeError('Wrong value'); - * }, - * SyntaxError, - * ); - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotReject(Promise.reject(new TypeError('Wrong value'))) - * .then(() => { - * // ... - * }); - * ``` - * @since v10.0.0 - */ - function doesNotReject( - block: (() => Promise) | Promise, - message?: string | Error, - ): Promise; - function doesNotReject( - block: (() => Promise) | Promise, - error: AssertPredicate, - message?: string | Error, - ): Promise; - /** - * Expects the `string` input to match the regular expression. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.match('I will fail', /pass/); - * // AssertionError [ERR_ASSERTION]: The input did not match the regular ... - * - * assert.match(123, /pass/); - * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. - * - * assert.match('I will pass', /pass/); - * // OK - * ``` - * - * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal - * to the value of the `message` parameter. If the `message` parameter is - * undefined, a default error message is assigned. If the `message` parameter is an - * instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. - * @since v13.6.0, v12.16.0 - */ - function match(value: string, regExp: RegExp, message?: string | Error): void; - /** - * Expects the `string` input not to match the regular expression. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotMatch('I will fail', /fail/); - * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ... - * - * assert.doesNotMatch(123, /pass/); - * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. - * - * assert.doesNotMatch('I will pass', /different/); - * // OK - * ``` - * - * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal - * to the value of the `message` parameter. If the `message` parameter is - * undefined, a default error message is assigned. If the `message` parameter is an - * instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. - * @since v13.6.0, v12.16.0 - */ - function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void; - /** - * Tests for partial deep equality between the `actual` and `expected` parameters. - * "Deep" equality means that the enumerable "own" properties of child objects - * are recursively evaluated also by the following rules. "Partial" equality means - * that only properties that exist on the `expected` parameter are going to be - * compared. - * - * This method always passes the same test cases as `assert.deepStrictEqual()`, - * behaving as a super set of it. - * @since v22.13.0 - */ - function partialDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; - } - namespace assert { - export { strict }; - } - export = assert; -} -declare module "assert" { - import assert = require("node:assert"); - export = assert; -} diff --git a/node_modules/@types/node/assert/strict.d.ts b/node_modules/@types/node/assert/strict.d.ts deleted file mode 100644 index 7a9dcf5..0000000 --- a/node_modules/@types/node/assert/strict.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -declare module "node:assert/strict" { - import { - Assert, - AssertionError, - AssertionErrorOptions, - AssertOptions, - AssertPredicate, - AssertStrict, - deepStrictEqual, - doesNotMatch, - doesNotReject, - doesNotThrow, - fail, - ifError, - match, - notDeepStrictEqual, - notStrictEqual, - ok, - partialDeepStrictEqual, - rejects, - strictEqual, - throws, - } from "node:assert"; - function strict(value: unknown, message?: string | Error): asserts value; - namespace strict { - export { - Assert, - AssertionError, - AssertionErrorOptions, - AssertOptions, - AssertPredicate, - AssertStrict, - deepStrictEqual, - deepStrictEqual as deepEqual, - doesNotMatch, - doesNotReject, - doesNotThrow, - fail, - ifError, - match, - notDeepStrictEqual, - notDeepStrictEqual as notDeepEqual, - notStrictEqual, - notStrictEqual as notEqual, - ok, - partialDeepStrictEqual, - rejects, - strict, - strictEqual, - strictEqual as equal, - throws, - }; - } - export = strict; -} -declare module "assert/strict" { - import strict = require("node:assert/strict"); - export = strict; -} diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts deleted file mode 100644 index ac857ad..0000000 --- a/node_modules/@types/node/async_hooks.d.ts +++ /dev/null @@ -1,711 +0,0 @@ -declare module "node:async_hooks" { - /** - * ```js - * import { executionAsyncId } from 'node:async_hooks'; - * import fs from 'node:fs'; - * - * console.log(executionAsyncId()); // 1 - bootstrap - * const path = '.'; - * fs.open(path, 'r', (err, fd) => { - * console.log(executionAsyncId()); // 6 - open() - * }); - * ``` - * - * The ID returned from `executionAsyncId()` is related to execution timing, not - * causality (which is covered by `triggerAsyncId()`): - * - * ```js - * const server = net.createServer((conn) => { - * // Returns the ID of the server, not of the new connection, because the - * // callback runs in the execution scope of the server's MakeCallback(). - * async_hooks.executionAsyncId(); - * - * }).listen(port, () => { - * // Returns the ID of a TickObject (process.nextTick()) because all - * // callbacks passed to .listen() are wrapped in a nextTick(). - * async_hooks.executionAsyncId(); - * }); - * ``` - * - * Promise contexts may not get precise `executionAsyncIds` by default. - * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking). - * @since v8.1.0 - * @return The `asyncId` of the current execution context. Useful to track when something calls. - */ - function executionAsyncId(): number; - /** - * Resource objects returned by `executionAsyncResource()` are most often internal - * Node.js handle objects with undocumented APIs. Using any functions or properties - * on the object is likely to crash your application and should be avoided. - * - * Using `executionAsyncResource()` in the top-level execution context will - * return an empty object as there is no handle or request object to use, - * but having an object representing the top-level can be helpful. - * - * ```js - * import { open } from 'node:fs'; - * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks'; - * - * console.log(executionAsyncId(), executionAsyncResource()); // 1 {} - * open(new URL(import.meta.url), 'r', (err, fd) => { - * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap - * }); - * ``` - * - * This can be used to implement continuation local storage without the - * use of a tracking `Map` to store the metadata: - * - * ```js - * import { createServer } from 'node:http'; - * import { - * executionAsyncId, - * executionAsyncResource, - * createHook, - * } from 'node:async_hooks'; - * const sym = Symbol('state'); // Private symbol to avoid pollution - * - * createHook({ - * init(asyncId, type, triggerAsyncId, resource) { - * const cr = executionAsyncResource(); - * if (cr) { - * resource[sym] = cr[sym]; - * } - * }, - * }).enable(); - * - * const server = createServer((req, res) => { - * executionAsyncResource()[sym] = { state: req.url }; - * setTimeout(function() { - * res.end(JSON.stringify(executionAsyncResource()[sym])); - * }, 100); - * }).listen(3000); - * ``` - * @since v13.9.0, v12.17.0 - * @return The resource representing the current execution. Useful to store data within the resource. - */ - function executionAsyncResource(): object; - /** - * ```js - * const server = net.createServer((conn) => { - * // The resource that caused (or triggered) this callback to be called - * // was that of the new connection. Thus the return value of triggerAsyncId() - * // is the asyncId of "conn". - * async_hooks.triggerAsyncId(); - * - * }).listen(port, () => { - * // Even though all callbacks passed to .listen() are wrapped in a nextTick() - * // the callback itself exists because the call to the server's .listen() - * // was made. So the return value would be the ID of the server. - * async_hooks.triggerAsyncId(); - * }); - * ``` - * - * Promise contexts may not get valid `triggerAsyncId`s by default. See - * the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking). - * @return The ID of the resource responsible for calling the callback that is currently being executed. - */ - function triggerAsyncId(): number; - interface HookCallbacks { - /** - * The [`init` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#initasyncid-type-triggerasyncid-resource). - */ - init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void; - /** - * The [`before` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#beforeasyncid). - */ - before?(asyncId: number): void; - /** - * The [`after` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#afterasyncid). - */ - after?(asyncId: number): void; - /** - * The [`promiseResolve` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promiseresolveasyncid). - */ - promiseResolve?(asyncId: number): void; - /** - * The [`destroy` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#destroyasyncid). - */ - destroy?(asyncId: number): void; - /** - * Whether the hook should track `Promise`s. Cannot be `false` if - * `promiseResolve` is set. - * @default true - */ - trackPromises?: boolean | undefined; - } - interface AsyncHook { - /** - * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. - */ - enable(): this; - /** - * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. - */ - disable(): this; - } - /** - * Registers functions to be called for different lifetime events of each async - * operation. - * - * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the - * respective asynchronous event during a resource's lifetime. - * - * All callbacks are optional. For example, if only resource cleanup needs to - * be tracked, then only the `destroy` callback needs to be passed. The - * specifics of all functions that can be passed to `callbacks` is in the - * [Hook Callbacks](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#hook-callbacks) section. - * - * ```js - * import { createHook } from 'node:async_hooks'; - * - * const asyncHook = createHook({ - * init(asyncId, type, triggerAsyncId, resource) { }, - * destroy(asyncId) { }, - * }); - * ``` - * - * The callbacks will be inherited via the prototype chain: - * - * ```js - * class MyAsyncCallbacks { - * init(asyncId, type, triggerAsyncId, resource) { } - * destroy(asyncId) {} - * } - * - * class MyAddedCallbacks extends MyAsyncCallbacks { - * before(asyncId) { } - * after(asyncId) { } - * } - * - * const asyncHook = async_hooks.createHook(new MyAddedCallbacks()); - * ``` - * - * Because promises are asynchronous resources whose lifecycle is tracked - * via the async hooks mechanism, the `init()`, `before()`, `after()`, and - * `destroy()` callbacks _must not_ be async functions that return promises. - * @since v8.1.0 - * @param options The [Hook Callbacks](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#hook-callbacks) to register - * @returns Instance used for disabling and enabling hooks - */ - function createHook(options: HookCallbacks): AsyncHook; - interface AsyncResourceOptions { - /** - * The ID of the execution context that created this async event. - * @default executionAsyncId() - */ - triggerAsyncId?: number | undefined; - /** - * Disables automatic `emitDestroy` when the object is garbage collected. - * This usually does not need to be set (even if `emitDestroy` is called - * manually), unless the resource's `asyncId` is retrieved and the - * sensitive API's `emitDestroy` is called with it. - * @default false - */ - requireManualDestroy?: boolean | undefined; - } - /** - * The class `AsyncResource` is designed to be extended by the embedder's async - * resources. Using this, users can easily trigger the lifetime events of their - * own resources. - * - * The `init` hook will trigger when an `AsyncResource` is instantiated. - * - * The following is an overview of the `AsyncResource` API. - * - * ```js - * import { AsyncResource, executionAsyncId } from 'node:async_hooks'; - * - * // AsyncResource() is meant to be extended. Instantiating a - * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then - * // async_hook.executionAsyncId() is used. - * const asyncResource = new AsyncResource( - * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }, - * ); - * - * // Run a function in the execution context of the resource. This will - * // * establish the context of the resource - * // * trigger the AsyncHooks before callbacks - * // * call the provided function `fn` with the supplied arguments - * // * trigger the AsyncHooks after callbacks - * // * restore the original execution context - * asyncResource.runInAsyncScope(fn, thisArg, ...args); - * - * // Call AsyncHooks destroy callbacks. - * asyncResource.emitDestroy(); - * - * // Return the unique ID assigned to the AsyncResource instance. - * asyncResource.asyncId(); - * - * // Return the trigger ID for the AsyncResource instance. - * asyncResource.triggerAsyncId(); - * ``` - */ - class AsyncResource { - /** - * AsyncResource() is meant to be extended. Instantiating a - * new AsyncResource() also triggers init. If triggerAsyncId is omitted then - * async_hook.executionAsyncId() is used. - * @param type The type of async event. - * @param triggerAsyncId The ID of the execution context that created - * this async event (default: `executionAsyncId()`), or an - * AsyncResourceOptions object (since v9.3.0) - */ - constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions); - /** - * Binds the given function to the current execution context. - * @since v14.8.0, v12.19.0 - * @param fn The function to bind to the current execution context. - * @param type An optional name to associate with the underlying `AsyncResource`. - */ - static bind any, ThisArg>( - fn: Func, - type?: string, - thisArg?: ThisArg, - ): Func; - /** - * Binds the given function to execute to this `AsyncResource`'s scope. - * @since v14.8.0, v12.19.0 - * @param fn The function to bind to the current `AsyncResource`. - */ - bind any>(fn: Func): Func; - /** - * Call the provided function with the provided arguments in the execution context - * of the async resource. This will establish the context, trigger the AsyncHooks - * before callbacks, call the function, trigger the AsyncHooks after callbacks, and - * then restore the original execution context. - * @since v9.6.0 - * @param fn The function to call in the execution context of this async resource. - * @param thisArg The receiver to be used for the function call. - * @param args Optional arguments to pass to the function. - */ - runInAsyncScope( - fn: (this: This, ...args: any[]) => Result, - thisArg?: This, - ...args: any[] - ): Result; - /** - * Call all `destroy` hooks. This should only ever be called once. An error will - * be thrown if it is called more than once. This **must** be manually called. If - * the resource is left to be collected by the GC then the `destroy` hooks will - * never be called. - * @return A reference to `asyncResource`. - */ - emitDestroy(): this; - /** - * @return The unique `asyncId` assigned to the resource. - */ - asyncId(): number; - /** - * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor. - */ - triggerAsyncId(): number; - } - interface AsyncLocalStorageOptions { - /** - * The default value to be used when no store is provided. - */ - defaultValue?: any; - /** - * A name for the `AsyncLocalStorage` value. - */ - name?: string | undefined; - } - /** - * This class creates stores that stay coherent through asynchronous operations. - * - * While you can create your own implementation on top of the `node:async_hooks` module, `AsyncLocalStorage` should be preferred as it is a performant and memory - * safe implementation that involves significant optimizations that are non-obvious - * to implement. - * - * The following example uses `AsyncLocalStorage` to build a simple logger - * that assigns IDs to incoming HTTP requests and includes them in messages - * logged within each request. - * - * ```js - * import http from 'node:http'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const asyncLocalStorage = new AsyncLocalStorage(); - * - * function logWithId(msg) { - * const id = asyncLocalStorage.getStore(); - * console.log(`${id !== undefined ? id : '-'}:`, msg); - * } - * - * let idSeq = 0; - * http.createServer((req, res) => { - * asyncLocalStorage.run(idSeq++, () => { - * logWithId('start'); - * // Imagine any chain of async operations here - * setImmediate(() => { - * logWithId('finish'); - * res.end(); - * }); - * }); - * }).listen(8080); - * - * http.get('http://localhost:8080'); - * http.get('http://localhost:8080'); - * // Prints: - * // 0: start - * // 0: finish - * // 1: start - * // 1: finish - * ``` - * - * Each instance of `AsyncLocalStorage` maintains an independent storage context. - * Multiple instances can safely exist simultaneously without risk of interfering - * with each other's data. - * @since v13.10.0, v12.17.0 - */ - class AsyncLocalStorage { - /** - * Creates a new instance of `AsyncLocalStorage`. Store is only provided within a - * `run()` call or after an `enterWith()` call. - */ - constructor(options?: AsyncLocalStorageOptions); - /** - * Binds the given function to the current execution context. - * @since v19.8.0 - * @param fn The function to bind to the current execution context. - * @return A new function that calls `fn` within the captured execution context. - */ - static bind any>(fn: Func): Func; - /** - * Captures the current execution context and returns a function that accepts a - * function as an argument. Whenever the returned function is called, it - * calls the function passed to it within the captured context. - * - * ```js - * const asyncLocalStorage = new AsyncLocalStorage(); - * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot()); - * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore())); - * console.log(result); // returns 123 - * ``` - * - * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple - * async context tracking purposes, for example: - * - * ```js - * class Foo { - * #runInAsyncScope = AsyncLocalStorage.snapshot(); - * - * get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); } - * } - * - * const foo = asyncLocalStorage.run(123, () => new Foo()); - * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123 - * ``` - * @since v19.8.0 - * @return A new function with the signature `(fn: (...args) : R, ...args) : R`. - */ - static snapshot(): (fn: (...args: TArgs) => R, ...args: TArgs) => R; - /** - * Disables the instance of `AsyncLocalStorage`. All subsequent calls - * to `asyncLocalStorage.getStore()` will return `undefined` until `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again. - * - * When calling `asyncLocalStorage.disable()`, all current contexts linked to the - * instance will be exited. - * - * Calling `asyncLocalStorage.disable()` is required before the `asyncLocalStorage` can be garbage collected. This does not apply to stores - * provided by the `asyncLocalStorage`, as those objects are garbage collected - * along with the corresponding async resources. - * - * Use this method when the `asyncLocalStorage` is not in use anymore - * in the current process. - * @since v13.10.0, v12.17.0 - * @experimental - */ - disable(): void; - /** - * Returns the current store. - * If called outside of an asynchronous context initialized by - * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it - * returns `undefined`. - * @since v13.10.0, v12.17.0 - */ - getStore(): T | undefined; - /** - * The name of the `AsyncLocalStorage` instance if provided. - * @since v24.0.0 - */ - readonly name: string; - /** - * Runs a function synchronously within a context and returns its - * return value. The store is not accessible outside of the callback function. - * The store is accessible to any asynchronous operations created within the - * callback. - * - * The optional `args` are passed to the callback function. - * - * If the callback function throws an error, the error is thrown by `run()` too. - * The stacktrace is not impacted by this call and the context is exited. - * - * Example: - * - * ```js - * const store = { id: 2 }; - * try { - * asyncLocalStorage.run(store, () => { - * asyncLocalStorage.getStore(); // Returns the store object - * setTimeout(() => { - * asyncLocalStorage.getStore(); // Returns the store object - * }, 200); - * throw new Error(); - * }); - * } catch (e) { - * asyncLocalStorage.getStore(); // Returns undefined - * // The error will be caught here - * } - * ``` - * @since v13.10.0, v12.17.0 - */ - run(store: T, callback: () => R): R; - run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R; - /** - * Runs a function synchronously outside of a context and returns its - * return value. The store is not accessible within the callback function or - * the asynchronous operations created within the callback. Any `getStore()` call done within the callback function will always return `undefined`. - * - * The optional `args` are passed to the callback function. - * - * If the callback function throws an error, the error is thrown by `exit()` too. - * The stacktrace is not impacted by this call and the context is re-entered. - * - * Example: - * - * ```js - * // Within a call to run - * try { - * asyncLocalStorage.getStore(); // Returns the store object or value - * asyncLocalStorage.exit(() => { - * asyncLocalStorage.getStore(); // Returns undefined - * throw new Error(); - * }); - * } catch (e) { - * asyncLocalStorage.getStore(); // Returns the same object or value - * // The error will be caught here - * } - * ``` - * @since v13.10.0, v12.17.0 - * @experimental - */ - exit(callback: (...args: TArgs) => R, ...args: TArgs): R; - /** - * Creates a disposable scope that enters the given store and automatically - * restores the previous store value when the scope is disposed. This method is - * designed to work with JavaScript's explicit resource management (`using` syntax). - * - * Example: - * - * ```js - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const asyncLocalStorage = new AsyncLocalStorage(); - * - * { - * using _ = asyncLocalStorage.withScope('my-store'); - * console.log(asyncLocalStorage.getStore()); // Prints: my-store - * } - * - * console.log(asyncLocalStorage.getStore()); // Prints: undefined - * ``` - * - * The `withScope()` method is particularly useful for managing context in - * synchronous code where you want to ensure the previous store value is restored - * when exiting a block, even if an error is thrown. - * - * ```js - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const asyncLocalStorage = new AsyncLocalStorage(); - * - * try { - * using _ = asyncLocalStorage.withScope('my-store'); - * console.log(asyncLocalStorage.getStore()); // Prints: my-store - * throw new Error('test'); - * } catch (e) { - * // Store is automatically restored even after error - * console.log(asyncLocalStorage.getStore()); // Prints: undefined - * } - * ``` - * - * **Important:** When using `withScope()` in async functions before the first - * `await`, be aware that the scope change will affect the caller's context. The - * synchronous portion of an async function (before the first `await`) runs - * immediately when called, and when it reaches the first `await`, it returns the - * promise to the caller. At that point, the scope change becomes visible in the - * caller's context and will persist in subsequent synchronous code until something - * else changes the scope value. For async operations, prefer using `run()` which - * properly isolates context across async boundaries. - * - * ```js - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const asyncLocalStorage = new AsyncLocalStorage(); - * - * async function example() { - * using _ = asyncLocalStorage.withScope('my-store'); - * console.log(asyncLocalStorage.getStore()); // Prints: my-store - * await someAsyncOperation(); // Function pauses here and returns promise - * console.log(asyncLocalStorage.getStore()); // Prints: my-store - * } - * - * // Calling without await - * example(); // Synchronous portion runs, then pauses at first await - * // After the promise is returned, the scope 'my-store' is now active in caller! - * console.log(asyncLocalStorage.getStore()); // Prints: my-store (unexpected!) - * ``` - * @since v25.9.0 - * @experimental - */ - withScope(store: T): RunScope; - /** - * Transitions into the context for the remainder of the current - * synchronous execution and then persists the store through any following - * asynchronous calls. - * - * Example: - * - * ```js - * const store = { id: 1 }; - * // Replaces previous store with the given store object - * asyncLocalStorage.enterWith(store); - * asyncLocalStorage.getStore(); // Returns the store object - * someAsyncOperation(() => { - * asyncLocalStorage.getStore(); // Returns the same object - * }); - * ``` - * - * This transition will continue for the _entire_ synchronous execution. - * This means that if, for example, the context is entered within an event - * handler subsequent event handlers will also run within that context unless - * specifically bound to another context with an `AsyncResource`. That is why `run()` should be preferred over `enterWith()` unless there are strong reasons - * to use the latter method. - * - * ```js - * const store = { id: 1 }; - * - * emitter.on('my-event', () => { - * asyncLocalStorage.enterWith(store); - * }); - * emitter.on('my-event', () => { - * asyncLocalStorage.getStore(); // Returns the same object - * }); - * - * asyncLocalStorage.getStore(); // Returns undefined - * emitter.emit('my-event'); - * asyncLocalStorage.getStore(); // Returns the same object - * ``` - * @since v13.11.0, v12.17.0 - * @experimental - */ - enterWith(store: T): void; - } - /** - * A disposable scope returned by `asyncLocalStorage.withScope()` that - * automatically restores the previous store value when disposed. This class - * implements the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) protocol and is designed to work - * with JavaScript's `using` syntax. - * - * The scope automatically restores the previous store value when the `using` block - * exits, whether through normal completion or by throwing an error. - * @since v25.9.0 - * @experimental - */ - interface RunScope extends Disposable { - /** - * Explicitly ends the scope and restores the previous store value. This method - * is idempotent: calling it multiple times has the same effect as calling it once. - * - * The `[Symbol.dispose]()` method defers to `dispose()`. - * - * If `withScope()` is called without the `using` keyword, `dispose()` must be - * called manually to restore the previous store value. Forgetting to call - * `dispose()` will cause the store value to persist for the remainder of the - * current execution context: - * - * ```js - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const storage = new AsyncLocalStorage(); - * - * // Without using, the scope must be disposed manually - * const scope = storage.withScope('my-store'); - * // storage.getStore() === 'my-store' here - * - * scope.dispose(); // Restore previous value - * // storage.getStore() === undefined here - * ``` - * @since v25.9.0 - */ - dispose(): void; - } - /** - * @since v17.2.0, v16.14.0 - * @return A map of provider types to the corresponding numeric id. - * This map contains all the event types that might be emitted by the `async_hooks.init()` event. - */ - namespace asyncWrapProviders { - const NONE: number; - const DIRHANDLE: number; - const DNSCHANNEL: number; - const ELDHISTOGRAM: number; - const FILEHANDLE: number; - const FILEHANDLECLOSEREQ: number; - const FIXEDSIZEBLOBCOPY: number; - const FSEVENTWRAP: number; - const FSREQCALLBACK: number; - const FSREQPROMISE: number; - const GETADDRINFOREQWRAP: number; - const GETNAMEINFOREQWRAP: number; - const HEAPSNAPSHOT: number; - const HTTP2SESSION: number; - const HTTP2STREAM: number; - const HTTP2PING: number; - const HTTP2SETTINGS: number; - const HTTPINCOMINGMESSAGE: number; - const HTTPCLIENTREQUEST: number; - const JSSTREAM: number; - const JSUDPWRAP: number; - const MESSAGEPORT: number; - const PIPECONNECTWRAP: number; - const PIPESERVERWRAP: number; - const PIPEWRAP: number; - const PROCESSWRAP: number; - const PROMISE: number; - const QUERYWRAP: number; - const SHUTDOWNWRAP: number; - const SIGNALWRAP: number; - const STATWATCHER: number; - const STREAMPIPE: number; - const TCPCONNECTWRAP: number; - const TCPSERVERWRAP: number; - const TCPWRAP: number; - const TTYWRAP: number; - const UDPSENDWRAP: number; - const UDPWRAP: number; - const SIGINTWATCHDOG: number; - const WORKER: number; - const WORKERHEAPSNAPSHOT: number; - const WRITEWRAP: number; - const ZLIB: number; - const CHECKPRIMEREQUEST: number; - const PBKDF2REQUEST: number; - const KEYPAIRGENREQUEST: number; - const KEYGENREQUEST: number; - const KEYEXPORTREQUEST: number; - const CIPHERREQUEST: number; - const DERIVEBITSREQUEST: number; - const HASHREQUEST: number; - const RANDOMBYTESREQUEST: number; - const RANDOMPRIMEREQUEST: number; - const SCRYPTREQUEST: number; - const SIGNREQUEST: number; - const TLSWRAP: number; - const VERIFYREQUEST: number; - } -} -declare module "async_hooks" { - export * from "node:async_hooks"; -} diff --git a/node_modules/@types/node/buffer.buffer.d.ts b/node_modules/@types/node/buffer.buffer.d.ts deleted file mode 100644 index a6c4b25..0000000 --- a/node_modules/@types/node/buffer.buffer.d.ts +++ /dev/null @@ -1,466 +0,0 @@ -declare module "node:buffer" { - type ImplicitArrayBuffer> = T extends - { valueOf(): infer V extends ArrayBufferLike } ? V : T; - global { - interface BufferConstructor { - // see buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. - */ - new(str: string, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). - */ - new(size: number): Buffer; - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. - */ - new(array: ArrayLike): Buffer; - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}/{SharedArrayBuffer}. - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. - */ - new(arrayBuffer: TArrayBuffer): Buffer; - /** - * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. - * Array entries outside that range will be truncated to fit into it. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. - * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); - * ``` - * - * If `array` is an `Array`-like object (that is, one with a `length` property of - * type `number`), it is treated as if it is an array, unless it is a `Buffer` or - * a `Uint8Array`. This means all other `TypedArray` variants get treated as an - * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use - * `Buffer.copyBytesFrom()`. - * - * A `TypeError` will be thrown if `array` is not an `Array` or another type - * appropriate for `Buffer.from()` variants. - * - * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal - * `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v5.10.0 - */ - from(array: WithImplicitCoercion>): Buffer; - /** - * This creates a view of the `ArrayBuffer` without copying the underlying - * memory. For example, when passed a reference to the `.buffer` property of a - * `TypedArray` instance, the newly created `Buffer` will share the same - * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const arr = new Uint16Array(2); - * - * arr[0] = 5000; - * arr[1] = 4000; - * - * // Shares memory with `arr`. - * const buf = Buffer.from(arr.buffer); - * - * console.log(buf); - * // Prints: - * - * // Changing the original Uint16Array changes the Buffer also. - * arr[1] = 6000; - * - * console.log(buf); - * // Prints: - * ``` - * - * The optional `byteOffset` and `length` arguments specify a memory range within - * the `arrayBuffer` that will be shared by the `Buffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const ab = new ArrayBuffer(10); - * const buf = Buffer.from(ab, 0, 2); - * - * console.log(buf.length); - * // Prints: 2 - * ``` - * - * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a - * `SharedArrayBuffer` or another type appropriate for `Buffer.from()` - * variants. - * - * It is important to remember that a backing `ArrayBuffer` can cover a range - * of memory that extends beyond the bounds of a `TypedArray` view. A new - * `Buffer` created using the `buffer` property of a `TypedArray` may extend - * beyond the range of the `TypedArray`: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements - * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements - * console.log(arrA.buffer === arrB.buffer); // true - * - * const buf = Buffer.from(arrB.buffer); - * console.log(buf); - * // Prints: - * ``` - * @since v5.10.0 - * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the - * `.buffer` property of a `TypedArray`. - * @param byteOffset Index of first byte to expose. **Default:** `0`. - * @param length Number of bytes to expose. **Default:** - * `arrayBuffer.byteLength - byteOffset`. - */ - from>( - arrayBuffer: TArrayBuffer, - byteOffset?: number, - length?: number, - ): Buffer>; - /** - * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies - * the character encoding to be used when converting `string` into bytes. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('this is a tést'); - * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); - * - * console.log(buf1.toString()); - * // Prints: this is a tést - * console.log(buf2.toString()); - * // Prints: this is a tést - * console.log(buf1.toString('latin1')); - * // Prints: this is a tést - * ``` - * - * A `TypeError` will be thrown if `string` is not a string or another type - * appropriate for `Buffer.from()` variants. - * - * `Buffer.from(string)` may also use the internal `Buffer` pool like - * `Buffer.allocUnsafe()` does. - * @since v5.10.0 - * @param string A string to encode. - * @param encoding The encoding of `string`. **Default:** `'utf8'`. - */ - from(string: WithImplicitCoercion, encoding?: BufferEncoding): Buffer; - from(arrayOrString: WithImplicitCoercion | string>): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param values to create a new Buffer - */ - of(...items: number[]): Buffer; - /** - * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. - * - * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. - * - * If `totalLength` is not provided, it is calculated from the `Buffer` instances - * in `list` by adding their lengths. - * - * If `totalLength` is provided, it must be an unsigned integer. If the - * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is - * truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is - * less than `totalLength`, the remaining space is filled with zeros. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a single `Buffer` from a list of three `Buffer` instances. - * - * const buf1 = Buffer.alloc(10); - * const buf2 = Buffer.alloc(14); - * const buf3 = Buffer.alloc(18); - * const totalLength = buf1.length + buf2.length + buf3.length; - * - * console.log(totalLength); - * // Prints: 42 - * - * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); - * - * console.log(bufA); - * // Prints: - * console.log(bufA.length); - * // Prints: 42 - * ``` - * - * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v0.7.11 - * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. - * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. - */ - concat(list: readonly Uint8Array[], totalLength?: number): Buffer; - /** - * Copies the underlying memory of `view` into a new `Buffer`. - * - * ```js - * const u16 = new Uint16Array([0, 0xffff]); - * const buf = Buffer.copyBytesFrom(u16, 1, 1); - * u16[1] = 0; - * console.log(buf.length); // 2 - * console.log(buf[0]); // 255 - * console.log(buf[1]); // 255 - * ``` - * @since v19.8.0 - * @param view The {TypedArray} to copy. - * @param [offset=0] The starting offset within `view`. - * @param [length=view.length - offset] The number of elements from `view` to copy. - */ - copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5); - * - * console.log(buf); - * // Prints: - * ``` - * - * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5, 'a'); - * - * console.log(buf); - * // Prints: - * ``` - * - * If both `fill` and `encoding` are specified, the allocated `Buffer` will be - * initialized by calling `buf.fill(fill, encoding)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); - * - * console.log(buf); - * // Prints: - * ``` - * - * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance - * contents will never contain sensitive data from previous allocations, including - * data that might not have been allocated for `Buffer`s. - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - * @param [fill=0] A value to pre-fill the new `Buffer` with. - * @param [encoding='utf8'] If `fill` is a string, this is its encoding. - */ - alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(10); - * - * console.log(buf); - * // Prints (contents may vary): - * - * buf.fill(0); - * - * console.log(buf); - * // Prints: - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * - * The `Buffer` module pre-allocates an internal `Buffer` instance of - * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, - * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). - * - * Use of this pre-allocated internal memory pool is a key difference between - * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. - * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less - * than or equal to half `Buffer.poolSize`. The - * difference is subtle but can be important when an application requires the - * additional performance that `Buffer.allocUnsafe()` provides. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafe(size: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if - * `size` is 0. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize - * such `Buffer` instances with zeroes. - * - * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, - * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This - * allows applications to avoid the garbage collection overhead of creating many - * individually allocated `Buffer` instances. This approach improves both - * performance and memory usage by eliminating the need to track and clean up as - * many individual `ArrayBuffer` objects. - * - * However, in the case where a developer may need to retain a small chunk of - * memory from a pool for an indeterminate amount of time, it may be appropriate - * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and - * then copying out the relevant bits. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Need to keep around a few small chunks of memory. - * const store = []; - * - * socket.on('readable', () => { - * let data; - * while (null !== (data = readable.read())) { - * // Allocate for retained data. - * const sb = Buffer.allocUnsafeSlow(10); - * - * // Copy the data into the new allocation. - * data.copy(sb, 0, 0, 10); - * - * store.push(sb); - * } - * }); - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.12.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafeSlow(size: number): Buffer; - } - interface Buffer extends Uint8Array { - // see buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * This method is not compatible with the `Uint8Array.prototype.slice()`, - * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * const copiedBuf = Uint8Array.prototype.slice.call(buf); - * copiedBuf[0]++; - * console.log(copiedBuf.toString()); - * // Prints: cuffer - * - * console.log(buf.toString()); - * // Prints: buffer - * - * // With buf.slice(), the original buffer is modified. - * const notReallyCopiedBuf = buf.slice(); - * notReallyCopiedBuf[0]++; - * console.log(notReallyCopiedBuf.toString()); - * // Prints: cuffer - * console.log(buf.toString()); - * // Also prints: cuffer (!) - * ``` - * @since v0.3.0 - * @deprecated Use `subarray` instead. - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - slice(start?: number, end?: number): Buffer; - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * Specifying `end` greater than `buf.length` will return the same result as - * that of `end` equal to `buf.length`. - * - * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). - * - * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte - * // from the original `Buffer`. - * - * const buf1 = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * const buf2 = buf1.subarray(0, 3); - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: abc - * - * buf1[0] = 33; - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: !bc - * ``` - * - * Specifying negative indexes causes the slice to be generated relative to the - * end of `buf` rather than the beginning. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * console.log(buf.subarray(-6, -1).toString()); - * // Prints: buffe - * // (Equivalent to buf.subarray(0, 5).) - * - * console.log(buf.subarray(-6, -2).toString()); - * // Prints: buff - * // (Equivalent to buf.subarray(0, 4).) - * - * console.log(buf.subarray(-5, -2).toString()); - * // Prints: uff - * // (Equivalent to buf.subarray(1, 4).) - * ``` - * @since v3.0.0 - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - subarray(start?: number, end?: number): Buffer; - } - // TODO: remove globals in future version - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedBuffer = Buffer; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type AllowSharedBuffer = Buffer; - } -} diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts deleted file mode 100644 index 7cff31f..0000000 --- a/node_modules/@types/node/buffer.d.ts +++ /dev/null @@ -1,1765 +0,0 @@ -declare module "node:buffer" { - import { ReadableStream } from "node:stream/web"; - /** - * This function returns `true` if `input` contains only valid UTF-8-encoded data, - * including the case in which `input` is empty. - * - * Throws if the `input` is a detached array buffer. - * @since v19.4.0, v18.14.0 - * @param input The input to validate. - */ - export function isUtf8(input: ArrayBuffer | NodeJS.TypedArray): boolean; - /** - * This function returns `true` if `input` contains only valid ASCII-encoded data, - * including the case in which `input` is empty. - * - * Throws if the `input` is a detached array buffer. - * @since v19.6.0, v18.15.0 - * @param input The input to validate. - */ - export function isAscii(input: ArrayBuffer | NodeJS.TypedArray): boolean; - export let INSPECT_MAX_BYTES: number; - export const kMaxLength: number; - export const kStringMaxLength: number; - export const constants: { - MAX_LENGTH: number; - MAX_STRING_LENGTH: number; - }; - export type TranscodeEncoding = - | "ascii" - | "utf8" - | "utf-8" - | "utf16le" - | "utf-16le" - | "ucs2" - | "ucs-2" - | "latin1" - | "binary"; - /** - * Re-encodes the given `Buffer` or `Uint8Array` instance from one character - * encoding to another. Returns a new `Buffer` instance. - * - * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if - * conversion from `fromEnc` to `toEnc` is not permitted. - * - * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`, `'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`. - * - * The transcoding process will use substitution characters if a given byte - * sequence cannot be adequately represented in the target encoding. For instance: - * - * ```js - * import { Buffer, transcode } from 'node:buffer'; - * - * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii'); - * console.log(newBuf.toString('ascii')); - * // Prints: '?' - * ``` - * - * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced - * with `?` in the transcoded `Buffer`. - * @since v7.1.0 - * @param source A `Buffer` or `Uint8Array` instance. - * @param fromEnc The current encoding. - * @param toEnc To target encoding. - */ - export function transcode( - source: Uint8Array, - fromEnc: TranscodeEncoding, - toEnc: TranscodeEncoding, - ): NonSharedBuffer; - /** - * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using - * a prior call to `URL.createObjectURL()`. - * @since v16.7.0 - * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. - */ - export function resolveObjectURL(id: string): Blob | undefined; - export { type AllowSharedBuffer, Buffer, type NonSharedBuffer }; - /** @deprecated This alias will be removed in a future version. Use the canonical `BlobPropertyBag` instead. */ - // TODO: remove in future major - export interface BlobOptions extends BlobPropertyBag {} - /** @deprecated This alias will be removed in a future version. Use the canonical `FilePropertyBag` instead. */ - export interface FileOptions extends FilePropertyBag {} - export type WithImplicitCoercion = - | T - | { valueOf(): T } - | (T extends string ? { [Symbol.toPrimitive](hint: "string"): T } : never); - global { - namespace NodeJS { - export { BufferEncoding }; - } - // Buffer class - type BufferEncoding = - | "ascii" - | "utf8" - | "utf-8" - | "utf16le" - | "utf-16le" - | "ucs2" - | "ucs-2" - | "base64" - | "base64url" - | "latin1" - | "binary" - | "hex"; - /** - * Raw data is stored in instances of the Buffer class. - * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. - * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex' - */ - interface BufferConstructor { - // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later - // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier - - /** - * Returns `true` if `obj` is a `Buffer`, `false` otherwise. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * Buffer.isBuffer(Buffer.alloc(10)); // true - * Buffer.isBuffer(Buffer.from('foo')); // true - * Buffer.isBuffer('a string'); // false - * Buffer.isBuffer([]); // false - * Buffer.isBuffer(new Uint8Array(1024)); // false - * ``` - * @since v0.1.101 - */ - isBuffer(obj: any): obj is Buffer; - /** - * Returns `true` if `encoding` is the name of a supported character encoding, - * or `false` otherwise. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * console.log(Buffer.isEncoding('utf8')); - * // Prints: true - * - * console.log(Buffer.isEncoding('hex')); - * // Prints: true - * - * console.log(Buffer.isEncoding('utf/8')); - * // Prints: false - * - * console.log(Buffer.isEncoding('')); - * // Prints: false - * ``` - * @since v0.9.1 - * @param encoding A character encoding name to check. - */ - isEncoding(encoding: string): encoding is BufferEncoding; - /** - * Returns the byte length of a string when encoded using `encoding`. - * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account - * for the encoding that is used to convert the string into bytes. - * - * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input. - * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the - * return value might be greater than the length of a `Buffer` created from the - * string. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const str = '\u00bd + \u00bc = \u00be'; - * - * console.log(`${str}: ${str.length} characters, ` + - * `${Buffer.byteLength(str, 'utf8')} bytes`); - * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes - * ``` - * - * When `string` is a - * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/- - * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop- - * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned. - * @since v0.1.90 - * @param string A value to calculate the length of. - * @param [encoding='utf8'] If `string` is a string, this is its encoding. - * @return The number of bytes contained within `string`. - */ - byteLength( - string: string | NodeJS.ArrayBufferView | ArrayBufferLike, - encoding?: BufferEncoding, - ): number; - /** - * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of `Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('1234'); - * const buf2 = Buffer.from('0123'); - * const arr = [buf1, buf2]; - * - * console.log(arr.sort(Buffer.compare)); - * // Prints: [ , ] - * // (This result is equal to: [buf2, buf1].) - * ``` - * @since v0.11.13 - * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details. - */ - compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1; - /** - * This is the size (in bytes) of pre-allocated internal `Buffer` instances used - * for pooling. This value may be modified. - * @since v0.11.3 - */ - poolSize: number; - } - interface Buffer { - // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later - // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier - - /** - * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did - * not contain enough space to fit the entire string, only part of `string` will be - * written. However, partially encoded characters will not be written. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(256); - * - * const len = buf.write('\u00bd + \u00bc = \u00be', 0); - * - * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); - * // Prints: 12 bytes: ½ + ¼ = ¾ - * - * const buffer = Buffer.alloc(10); - * - * const length = buffer.write('abcd', 8); - * - * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`); - * // Prints: 2 bytes : ab - * ``` - * @since v0.1.90 - * @param string String to write to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write `string`. - * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`). - * @param [encoding='utf8'] The character encoding of `string`. - * @return Number of bytes written. - */ - write(string: string, encoding?: BufferEncoding): number; - write(string: string, offset: number, encoding?: BufferEncoding): number; - write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; - /** - * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`. - * - * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8, - * then each invalid byte is replaced with the replacement character `U+FFFD`. - * - * The maximum length of a string instance (in UTF-16 code units) is available - * as {@link constants.MAX_STRING_LENGTH}. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * console.log(buf1.toString('utf8')); - * // Prints: abcdefghijklmnopqrstuvwxyz - * console.log(buf1.toString('utf8', 0, 5)); - * // Prints: abcde - * - * const buf2 = Buffer.from('tést'); - * - * console.log(buf2.toString('hex')); - * // Prints: 74c3a97374 - * console.log(buf2.toString('utf8', 0, 3)); - * // Prints: té - * console.log(buf2.toString(undefined, 0, 3)); - * // Prints: té - * ``` - * @since v0.1.90 - * @param [encoding='utf8'] The character encoding to use. - * @param [start=0] The byte offset to start decoding at. - * @param [end=buf.length] The byte offset to stop decoding at (not inclusive). - */ - toString(encoding?: BufferEncoding, start?: number, end?: number): string; - /** - * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls - * this function when stringifying a `Buffer` instance. - * - * `Buffer.from()` accepts objects in the format returned from this method. - * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]); - * const json = JSON.stringify(buf); - * - * console.log(json); - * // Prints: {"type":"Buffer","data":[1,2,3,4,5]} - * - * const copy = JSON.parse(json, (key, value) => { - * return value && value.type === 'Buffer' ? - * Buffer.from(value) : - * value; - * }); - * - * console.log(copy); - * // Prints: - * ``` - * @since v0.9.2 - */ - toJSON(): { - type: "Buffer"; - data: number[]; - }; - /** - * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('ABC'); - * const buf2 = Buffer.from('414243', 'hex'); - * const buf3 = Buffer.from('ABCD'); - * - * console.log(buf1.equals(buf2)); - * // Prints: true - * console.log(buf1.equals(buf3)); - * // Prints: false - * ``` - * @since v0.11.13 - * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`. - */ - equals(otherBuffer: Uint8Array): boolean; - /** - * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order. - * Comparison is based on the actual sequence of bytes in each `Buffer`. - * - * * `0` is returned if `target` is the same as `buf` - * * `1` is returned if `target` should come _before_`buf` when sorted. - * * `-1` is returned if `target` should come _after_`buf` when sorted. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('ABC'); - * const buf2 = Buffer.from('BCD'); - * const buf3 = Buffer.from('ABCD'); - * - * console.log(buf1.compare(buf1)); - * // Prints: 0 - * console.log(buf1.compare(buf2)); - * // Prints: -1 - * console.log(buf1.compare(buf3)); - * // Prints: -1 - * console.log(buf2.compare(buf1)); - * // Prints: 1 - * console.log(buf2.compare(buf3)); - * // Prints: 1 - * console.log([buf1, buf2, buf3].sort(Buffer.compare)); - * // Prints: [ , , ] - * // (This result is equal to: [buf1, buf3, buf2].) - * ``` - * - * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd` arguments can be used to limit the comparison to specific ranges within `target` and `buf` respectively. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]); - * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]); - * - * console.log(buf1.compare(buf2, 5, 9, 0, 4)); - * // Prints: 0 - * console.log(buf1.compare(buf2, 0, 6, 4)); - * // Prints: -1 - * console.log(buf1.compare(buf2, 5, 6, 5)); - * // Prints: 1 - * ``` - * - * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`, `targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`. - * @since v0.11.13 - * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`. - * @param [targetStart=0] The offset within `target` at which to begin comparison. - * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive). - * @param [sourceStart=0] The offset within `buf` at which to begin comparison. - * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive). - */ - compare( - target: Uint8Array, - targetStart?: number, - targetEnd?: number, - sourceStart?: number, - sourceEnd?: number, - ): -1 | 0 | 1; - /** - * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`. - * - * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available - * for all TypedArrays, including Node.js `Buffer`s, although it takes - * different function arguments. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create two `Buffer` instances. - * const buf1 = Buffer.allocUnsafe(26); - * const buf2 = Buffer.allocUnsafe(26).fill('!'); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`. - * buf1.copy(buf2, 8, 16, 20); - * // This is equivalent to: - * // buf2.set(buf1.subarray(16, 20), 8); - * - * console.log(buf2.toString('ascii', 0, 25)); - * // Prints: !!!!!!!!qrst!!!!!!!!!!!!! - * ``` - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a `Buffer` and copy data from one region to an overlapping region - * // within the same `Buffer`. - * - * const buf = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf[i] = i + 97; - * } - * - * buf.copy(buf, 0, 4, 10); - * - * console.log(buf.toString()); - * // Prints: efghijghijklmnopqrstuvwxyz - * ``` - * @since v0.1.90 - * @param target A `Buffer` or {@link Uint8Array} to copy into. - * @param [targetStart=0] The offset within `target` at which to begin writing. - * @param [sourceStart=0] The offset within `buf` from which to begin copying. - * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive). - * @return The number of bytes copied. - */ - copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. - * - * `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigInt64BE(0x0102030405060708n, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigInt64BE(value: bigint, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. - * - * `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigInt64LE(0x0102030405060708n, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigInt64LE(value: bigint, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. - * - * This function is also available under the `writeBigUint64BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigUInt64BE(0xdecafafecacefaden, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigUInt64BE(value: bigint, offset?: number): number; - /** - * @alias Buffer.writeBigUInt64BE - * @since v14.10.0, v12.19.0 - */ - writeBigUint64BE(value: bigint, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigUInt64LE(0xdecafafecacefaden, 0); - * - * console.log(buf); - * // Prints: - * ``` - * - * This function is also available under the `writeBigUint64LE` alias. - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigUInt64LE(value: bigint, offset?: number): number; - /** - * @alias Buffer.writeBigUInt64LE - * @since v14.10.0, v12.19.0 - */ - writeBigUint64LE(value: bigint, offset?: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined - * when `value` is anything other than an unsigned integer. - * - * This function is also available under the `writeUintLE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeUIntLE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeUIntLE(value: number, offset: number, byteLength: number): number; - /** - * @alias Buffer.writeUIntLE - * @since v14.9.0, v12.19.0 - */ - writeUintLE(value: number, offset: number, byteLength: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined - * when `value` is anything other than an unsigned integer. - * - * This function is also available under the `writeUintBE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeUIntBE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeUIntBE(value: number, offset: number, byteLength: number): number; - /** - * @alias Buffer.writeUIntBE - * @since v14.9.0, v12.19.0 - */ - writeUintBE(value: number, offset: number, byteLength: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined - * when `value` is anything other than a signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeIntLE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeIntLE(value: number, offset: number, byteLength: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a - * signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeIntBE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeIntBE(value: number, offset: number, byteLength: number): number; - /** - * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readBigUint64BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); - * - * console.log(buf.readBigUInt64BE(0)); - * // Prints: 4294967295n - * ``` - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigUInt64BE(offset?: number): bigint; - /** - * @alias Buffer.readBigUInt64BE - * @since v14.10.0, v12.19.0 - */ - readBigUint64BE(offset?: number): bigint; - /** - * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readBigUint64LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); - * - * console.log(buf.readBigUInt64LE(0)); - * // Prints: 18446744069414584320n - * ``` - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigUInt64LE(offset?: number): bigint; - /** - * @alias Buffer.readBigUInt64LE - * @since v14.10.0, v12.19.0 - */ - readBigUint64LE(offset?: number): bigint; - /** - * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed - * values. - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigInt64BE(offset?: number): bigint; - /** - * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed - * values. - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigInt64LE(offset?: number): bigint; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned, little-endian integer supporting - * up to 48 bits of accuracy. - * - * This function is also available under the `readUintLE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readUIntLE(0, 6).toString(16)); - * // Prints: ab9078563412 - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readUIntLE(offset: number, byteLength: number): number; - /** - * @alias Buffer.readUIntLE - * @since v14.9.0, v12.19.0 - */ - readUintLE(offset: number, byteLength: number): number; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned big-endian integer supporting - * up to 48 bits of accuracy. - * - * This function is also available under the `readUintBE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readUIntBE(0, 6).toString(16)); - * // Prints: 1234567890ab - * console.log(buf.readUIntBE(1, 6).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readUIntBE(offset: number, byteLength: number): number; - /** - * @alias Buffer.readUIntBE - * @since v14.9.0, v12.19.0 - */ - readUintBE(offset: number, byteLength: number): number; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a little-endian, two's complement signed value - * supporting up to 48 bits of accuracy. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readIntLE(0, 6).toString(16)); - * // Prints: -546f87a9cbee - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readIntLE(offset: number, byteLength: number): number; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a big-endian, two's complement signed value - * supporting up to 48 bits of accuracy. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readIntBE(0, 6).toString(16)); - * // Prints: 1234567890ab - * console.log(buf.readIntBE(1, 6).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * console.log(buf.readIntBE(1, 0).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readIntBE(offset: number, byteLength: number): number; - /** - * Reads an unsigned 8-bit integer from `buf` at the specified `offset`. - * - * This function is also available under the `readUint8` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, -2]); - * - * console.log(buf.readUInt8(0)); - * // Prints: 1 - * console.log(buf.readUInt8(1)); - * // Prints: 254 - * console.log(buf.readUInt8(2)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. - */ - readUInt8(offset?: number): number; - /** - * @alias Buffer.readUInt8 - * @since v14.9.0, v12.19.0 - */ - readUint8(offset?: number): number; - /** - * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified `offset`. - * - * This function is also available under the `readUint16LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56]); - * - * console.log(buf.readUInt16LE(0).toString(16)); - * // Prints: 3412 - * console.log(buf.readUInt16LE(1).toString(16)); - * // Prints: 5634 - * console.log(buf.readUInt16LE(2).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readUInt16LE(offset?: number): number; - /** - * @alias Buffer.readUInt16LE - * @since v14.9.0, v12.19.0 - */ - readUint16LE(offset?: number): number; - /** - * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readUint16BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56]); - * - * console.log(buf.readUInt16BE(0).toString(16)); - * // Prints: 1234 - * console.log(buf.readUInt16BE(1).toString(16)); - * // Prints: 3456 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readUInt16BE(offset?: number): number; - /** - * @alias Buffer.readUInt16BE - * @since v14.9.0, v12.19.0 - */ - readUint16BE(offset?: number): number; - /** - * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readUint32LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); - * - * console.log(buf.readUInt32LE(0).toString(16)); - * // Prints: 78563412 - * console.log(buf.readUInt32LE(1).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readUInt32LE(offset?: number): number; - /** - * @alias Buffer.readUInt32LE - * @since v14.9.0, v12.19.0 - */ - readUint32LE(offset?: number): number; - /** - * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readUint32BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); - * - * console.log(buf.readUInt32BE(0).toString(16)); - * // Prints: 12345678 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readUInt32BE(offset?: number): number; - /** - * @alias Buffer.readUInt32BE - * @since v14.9.0, v12.19.0 - */ - readUint32BE(offset?: number): number; - /** - * Reads a signed 8-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([-1, 5]); - * - * console.log(buf.readInt8(0)); - * // Prints: -1 - * console.log(buf.readInt8(1)); - * // Prints: 5 - * console.log(buf.readInt8(2)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. - */ - readInt8(offset?: number): number; - /** - * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 5]); - * - * console.log(buf.readInt16LE(0)); - * // Prints: 1280 - * console.log(buf.readInt16LE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readInt16LE(offset?: number): number; - /** - * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 5]); - * - * console.log(buf.readInt16BE(0)); - * // Prints: 5 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readInt16BE(offset?: number): number; - /** - * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 0, 0, 5]); - * - * console.log(buf.readInt32LE(0)); - * // Prints: 83886080 - * console.log(buf.readInt32LE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readInt32LE(offset?: number): number; - /** - * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 0, 0, 5]); - * - * console.log(buf.readInt32BE(0)); - * // Prints: 5 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readInt32BE(offset?: number): number; - /** - * Reads a 32-bit, little-endian float from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4]); - * - * console.log(buf.readFloatLE(0)); - * // Prints: 1.539989614439558e-36 - * console.log(buf.readFloatLE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readFloatLE(offset?: number): number; - /** - * Reads a 32-bit, big-endian float from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4]); - * - * console.log(buf.readFloatBE(0)); - * // Prints: 2.387939260590663e-38 - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readFloatBE(offset?: number): number; - /** - * Reads a 64-bit, little-endian double from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); - * - * console.log(buf.readDoubleLE(0)); - * // Prints: 5.447603722011605e-270 - * console.log(buf.readDoubleLE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. - */ - readDoubleLE(offset?: number): number; - /** - * Reads a 64-bit, big-endian double from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); - * - * console.log(buf.readDoubleBE(0)); - * // Prints: 8.20788039913184e-304 - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. - */ - readDoubleBE(offset?: number): number; - reverse(): this; - /** - * Interprets `buf` as an array of unsigned 16-bit integers and swaps the - * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); - * - * console.log(buf1); - * // Prints: - * - * buf1.swap16(); - * - * console.log(buf1); - * // Prints: - * - * const buf2 = Buffer.from([0x1, 0x2, 0x3]); - * - * buf2.swap16(); - * // Throws ERR_INVALID_BUFFER_SIZE. - * ``` - * - * One convenient use of `buf.swap16()` is to perform a fast in-place conversion - * between UTF-16 little-endian and UTF-16 big-endian: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le'); - * buf.swap16(); // Convert to big-endian UTF-16 text. - * ``` - * @since v5.10.0 - * @return A reference to `buf`. - */ - swap16(): this; - /** - * Interprets `buf` as an array of unsigned 32-bit integers and swaps the - * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); - * - * console.log(buf1); - * // Prints: - * - * buf1.swap32(); - * - * console.log(buf1); - * // Prints: - * - * const buf2 = Buffer.from([0x1, 0x2, 0x3]); - * - * buf2.swap32(); - * // Throws ERR_INVALID_BUFFER_SIZE. - * ``` - * @since v5.10.0 - * @return A reference to `buf`. - */ - swap32(): this; - /** - * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_. - * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); - * - * console.log(buf1); - * // Prints: - * - * buf1.swap64(); - * - * console.log(buf1); - * // Prints: - * - * const buf2 = Buffer.from([0x1, 0x2, 0x3]); - * - * buf2.swap64(); - * // Throws ERR_INVALID_BUFFER_SIZE. - * ``` - * @since v6.3.0 - * @return A reference to `buf`. - */ - swap64(): this; - /** - * Writes `value` to `buf` at the specified `offset`. `value` must be a - * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything - * other than an unsigned 8-bit integer. - * - * This function is also available under the `writeUint8` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt8(0x3, 0); - * buf.writeUInt8(0x4, 1); - * buf.writeUInt8(0x23, 2); - * buf.writeUInt8(0x42, 3); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. - * @return `offset` plus the number of bytes written. - */ - writeUInt8(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt8 - * @since v14.9.0, v12.19.0 - */ - writeUint8(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is - * anything other than an unsigned 16-bit integer. - * - * This function is also available under the `writeUint16LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt16LE(0xdead, 0); - * buf.writeUInt16LE(0xbeef, 2); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeUInt16LE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt16LE - * @since v14.9.0, v12.19.0 - */ - writeUint16LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an - * unsigned 16-bit integer. - * - * This function is also available under the `writeUint16BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt16BE(0xdead, 0); - * buf.writeUInt16BE(0xbeef, 2); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeUInt16BE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt16BE - * @since v14.9.0, v12.19.0 - */ - writeUint16BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is - * anything other than an unsigned 32-bit integer. - * - * This function is also available under the `writeUint32LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt32LE(0xfeedface, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeUInt32LE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt32LE - * @since v14.9.0, v12.19.0 - */ - writeUint32LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an - * unsigned 32-bit integer. - * - * This function is also available under the `writeUint32BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt32BE(0xfeedface, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeUInt32BE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt32BE - * @since v14.9.0, v12.19.0 - */ - writeUint32BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset`. `value` must be a valid - * signed 8-bit integer. Behavior is undefined when `value` is anything other than - * a signed 8-bit integer. - * - * `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(2); - * - * buf.writeInt8(2, 0); - * buf.writeInt8(-2, 1); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. - * @return `offset` plus the number of bytes written. - */ - writeInt8(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is - * anything other than a signed 16-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(2); - * - * buf.writeInt16LE(0x0304, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeInt16LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is - * anything other than a signed 16-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(2); - * - * buf.writeInt16BE(0x0102, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeInt16BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is - * anything other than a signed 32-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeInt32LE(0x05060708, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeInt32LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is - * anything other than a signed 32-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeInt32BE(0x01020304, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeInt32BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is - * undefined when `value` is anything other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeFloatLE(0xcafebabe, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeFloatLE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is - * undefined when `value` is anything other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeFloatBE(0xcafebabe, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeFloatBE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything - * other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeDoubleLE(123.456, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeDoubleLE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything - * other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeDoubleBE(123.456, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeDoubleBE(value: number, offset?: number): number; - /** - * Fills `buf` with the specified `value`. If the `offset` and `end` are not given, - * the entire `buf` will be filled: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Fill a `Buffer` with the ASCII character 'h'. - * - * const b = Buffer.allocUnsafe(50).fill('h'); - * - * console.log(b.toString()); - * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh - * - * // Fill a buffer with empty string - * const c = Buffer.allocUnsafe(5).fill(''); - * - * console.log(c.fill('')); - * // Prints: - * ``` - * - * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or - * integer. If the resulting integer is greater than `255` (decimal), `buf` will be - * filled with `value & 255`. - * - * If the final write of a `fill()` operation falls on a multi-byte character, - * then only the bytes of that character that fit into `buf` are written: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Fill a `Buffer` with character that takes up two bytes in UTF-8. - * - * console.log(Buffer.allocUnsafe(5).fill('\u0222')); - * // Prints: - * ``` - * - * If `value` contains invalid characters, it is truncated; if no valid - * fill data remains, an exception is thrown: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(5); - * - * console.log(buf.fill('a')); - * // Prints: - * console.log(buf.fill('aazz', 'hex')); - * // Prints: - * console.log(buf.fill('zz', 'hex')); - * // Throws an exception. - * ``` - * @since v0.5.0 - * @param value The value with which to fill `buf`. Empty value (string, Uint8Array, Buffer) is coerced to `0`. - * @param [offset=0] Number of bytes to skip before starting to fill `buf`. - * @param [end=buf.length] Where to stop filling `buf` (not inclusive). - * @param [encoding='utf8'] The encoding for `value` if `value` is a string. - * @return A reference to `buf`. - */ - fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; - fill(value: string | Uint8Array | number, offset: number, encoding: BufferEncoding): this; - fill(value: string | Uint8Array | number, encoding: BufferEncoding): this; - /** - * If `value` is: - * - * * a string, `value` is interpreted according to the character encoding in `encoding`. - * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety. - * To compare a partial `Buffer`, use `buf.subarray`. - * * a number, `value` will be interpreted as an unsigned 8-bit integer - * value between `0` and `255`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('this is a buffer'); - * - * console.log(buf.indexOf('this')); - * // Prints: 0 - * console.log(buf.indexOf('is')); - * // Prints: 2 - * console.log(buf.indexOf(Buffer.from('a buffer'))); - * // Prints: 8 - * console.log(buf.indexOf(97)); - * // Prints: 8 (97 is the decimal ASCII value for 'a') - * console.log(buf.indexOf(Buffer.from('a buffer example'))); - * // Prints: -1 - * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8))); - * // Prints: 8 - * - * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); - * - * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le')); - * // Prints: 4 - * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le')); - * // Prints: 6 - * ``` - * - * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value, - * an integer between 0 and 255. - * - * If `byteOffset` is not a number, it will be coerced to a number. If the result - * of coercion is `NaN` or `0`, then the entire buffer will be searched. This - * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf). - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const b = Buffer.from('abcdef'); - * - * // Passing a value that's a number, but not a valid byte. - * // Prints: 2, equivalent to searching for 99 or 'c'. - * console.log(b.indexOf(99.9)); - * console.log(b.indexOf(256 + 99)); - * - * // Passing a byteOffset that coerces to NaN or 0. - * // Prints: 1, searching the whole buffer. - * console.log(b.indexOf('b', undefined)); - * console.log(b.indexOf('b', {})); - * console.log(b.indexOf('b', null)); - * console.log(b.indexOf('b', [])); - * ``` - * - * If `value` is an empty string or empty `Buffer` and `byteOffset` is less - * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned. - * @since v1.5.0 - * @param value What to search for. - * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. - * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. - * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. - */ - indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; - indexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number; - /** - * Identical to `buf.indexOf()`, except the last occurrence of `value` is found - * rather than the first occurrence. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('this buffer is a buffer'); - * - * console.log(buf.lastIndexOf('this')); - * // Prints: 0 - * console.log(buf.lastIndexOf('buffer')); - * // Prints: 17 - * console.log(buf.lastIndexOf(Buffer.from('buffer'))); - * // Prints: 17 - * console.log(buf.lastIndexOf(97)); - * // Prints: 15 (97 is the decimal ASCII value for 'a') - * console.log(buf.lastIndexOf(Buffer.from('yolo'))); - * // Prints: -1 - * console.log(buf.lastIndexOf('buffer', 5)); - * // Prints: 5 - * console.log(buf.lastIndexOf('buffer', 4)); - * // Prints: -1 - * - * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); - * - * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le')); - * // Prints: 6 - * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le')); - * // Prints: 4 - * ``` - * - * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value, - * an integer between 0 and 255. - * - * If `byteOffset` is not a number, it will be coerced to a number. Any arguments - * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer. - * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf). - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const b = Buffer.from('abcdef'); - * - * // Passing a value that's a number, but not a valid byte. - * // Prints: 2, equivalent to searching for 99 or 'c'. - * console.log(b.lastIndexOf(99.9)); - * console.log(b.lastIndexOf(256 + 99)); - * - * // Passing a byteOffset that coerces to NaN. - * // Prints: 1, searching the whole buffer. - * console.log(b.lastIndexOf('b', undefined)); - * console.log(b.lastIndexOf('b', {})); - * - * // Passing a byteOffset that coerces to 0. - * // Prints: -1, equivalent to passing 0. - * console.log(b.lastIndexOf('b', null)); - * console.log(b.lastIndexOf('b', [])); - * ``` - * - * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned. - * @since v6.0.0 - * @param value What to search for. - * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. - * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. - * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. - */ - lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; - lastIndexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number; - /** - * Equivalent to `buf.indexOf() !== -1`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('this is a buffer'); - * - * console.log(buf.includes('this')); - * // Prints: true - * console.log(buf.includes('is')); - * // Prints: true - * console.log(buf.includes(Buffer.from('a buffer'))); - * // Prints: true - * console.log(buf.includes(97)); - * // Prints: true (97 is the decimal ASCII value for 'a') - * console.log(buf.includes(Buffer.from('a buffer example'))); - * // Prints: false - * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8))); - * // Prints: true - * console.log(buf.includes('this', 4)); - * // Prints: false - * ``` - * @since v5.3.0 - * @param value What to search for. - * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. - * @param [encoding='utf8'] If `value` is a string, this is its encoding. - * @return `true` if `value` was found in `buf`, `false` otherwise. - */ - includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean; - includes(value: string | number | Buffer, encoding: BufferEncoding): boolean; - } - var Buffer: BufferConstructor; - } - // #region web types - export type BlobPart = NodeJS.BufferSource | Blob | string; - export interface BlobPropertyBag { - endings?: "native" | "transparent"; - type?: string; - } - export interface FilePropertyBag extends BlobPropertyBag { - lastModified?: number; - } - export interface Blob { - readonly size: number; - readonly type: string; - arrayBuffer(): Promise; - bytes(): Promise; - slice(start?: number, end?: number, contentType?: string): Blob; - stream(): ReadableStream; - text(): Promise; - } - export var Blob: { - prototype: Blob; - new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob; - }; - export interface File extends Blob { - readonly lastModified: number; - readonly name: string; - readonly webkitRelativePath: string; - } - export var File: { - prototype: File; - new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File; - }; - export import atob = globalThis.atob; - export import btoa = globalThis.btoa; - // #endregion -} -declare module "buffer" { - export * from "node:buffer"; -} diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts deleted file mode 100644 index e3964ab..0000000 --- a/node_modules/@types/node/child_process.d.ts +++ /dev/null @@ -1,1366 +0,0 @@ -declare module "node:child_process" { - import { NonSharedBuffer } from "node:buffer"; - import * as dgram from "node:dgram"; - import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; - import * as net from "node:net"; - import { Readable, Stream, Writable } from "node:stream"; - import { URL } from "node:url"; - type Serializable = string | object | number | boolean | bigint; - type SendHandle = net.Socket | net.Server | dgram.Socket | undefined; - interface ChildProcessEventMap { - "close": [code: number | null, signal: NodeJS.Signals | null]; - "disconnect": []; - "error": [err: Error]; - "exit": [code: number | null, signal: NodeJS.Signals | null]; - "message": [message: Serializable, sendHandle: SendHandle]; - "spawn": []; - } - /** - * Instances of the `ChildProcess` represent spawned child processes. - * - * Instances of `ChildProcess` are not intended to be created directly. Rather, - * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create - * instances of `ChildProcess`. - * @since v2.2.0 - */ - class ChildProcess implements EventEmitter { - /** - * A `Writable Stream` that represents the child process's `stdin`. - * - * If a child process waits to read all of its input, the child will not continue - * until this stream has been closed via `end()`. - * - * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`, - * then this will be `null`. - * - * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will - * refer to the same value. - * - * The `subprocess.stdin` property can be `null` or `undefined` if the child process could not be successfully spawned. - * @since v0.1.90 - */ - stdin: Writable | null; - /** - * A `Readable Stream` that represents the child process's `stdout`. - * - * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`, - * then this will be `null`. - * - * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will - * refer to the same value. - * - * ```js - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn('ls'); - * - * subprocess.stdout.on('data', (data) => { - * console.log(`Received chunk ${data}`); - * }); - * ``` - * - * The `subprocess.stdout` property can be `null` or `undefined` if the child process could not be successfully spawned. - * @since v0.1.90 - */ - stdout: Readable | null; - /** - * A `Readable Stream` that represents the child process's `stderr`. - * - * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`, - * then this will be `null`. - * - * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will - * refer to the same value. - * - * The `subprocess.stderr` property can be `null` or `undefined` if the child process could not be successfully spawned. - * @since v0.1.90 - */ - stderr: Readable | null; - /** - * The `subprocess.channel` property is a reference to the child's IPC channel. If - * no IPC channel exists, this property is `undefined`. - * @since v7.1.0 - */ - readonly channel?: Control | null; - /** - * A sparse array of pipes to the child process, corresponding with positions in - * the `stdio` option passed to {@link spawn} that have been set - * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and `subprocess.stdio[2]` are also available as `subprocess.stdin`, `subprocess.stdout`, and `subprocess.stderr`, - * respectively. - * - * In the following example, only the child's fd `1` (stdout) is configured as a - * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values - * in the array are `null`. - * - * ```js - * import assert from 'node:assert'; - * import fs from 'node:fs'; - * import child_process from 'node:child_process'; - * - * const subprocess = child_process.spawn('ls', { - * stdio: [ - * 0, // Use parent's stdin for child. - * 'pipe', // Pipe child's stdout to parent. - * fs.openSync('err.out', 'w'), // Direct child's stderr to a file. - * ], - * }); - * - * assert.strictEqual(subprocess.stdio[0], null); - * assert.strictEqual(subprocess.stdio[0], subprocess.stdin); - * - * assert(subprocess.stdout); - * assert.strictEqual(subprocess.stdio[1], subprocess.stdout); - * - * assert.strictEqual(subprocess.stdio[2], null); - * assert.strictEqual(subprocess.stdio[2], subprocess.stderr); - * ``` - * - * The `subprocess.stdio` property can be `undefined` if the child process could - * not be successfully spawned. - * @since v0.7.10 - */ - readonly stdio: [ - Writable | null, - // stdin - Readable | null, - // stdout - Readable | null, - // stderr - Readable | Writable | null | undefined, - // extra - Readable | Writable | null | undefined, // extra - ]; - /** - * The `subprocess.killed` property indicates whether the child process - * successfully received a signal from `subprocess.kill()`. The `killed` property - * does not indicate that the child process has been terminated. - * @since v0.5.10 - */ - readonly killed: boolean; - /** - * Returns the process identifier (PID) of the child process. If the child process - * fails to spawn due to errors, then the value is `undefined` and `error` is - * emitted. - * - * ```js - * import { spawn } from 'node:child_process'; - * const grep = spawn('grep', ['ssh']); - * - * console.log(`Spawned child pid: ${grep.pid}`); - * grep.stdin.end(); - * ``` - * @since v0.1.90 - */ - readonly pid?: number | undefined; - /** - * The `subprocess.connected` property indicates whether it is still possible to - * send and receive messages from a child process. When `subprocess.connected` is `false`, it is no longer possible to send or receive messages. - * @since v0.7.2 - */ - readonly connected: boolean; - /** - * The `subprocess.exitCode` property indicates the exit code of the child process. - * If the child process is still running, the field will be `null`. - * - * When the child process is terminated by a signal, `subprocess.exitCode` will be - * `null` and `subprocess.signalCode` will be set. To get the corresponding - * POSIX exit code, use - * `util.convertProcessSignalToExitCode(subprocess.signalCode)`. - */ - readonly exitCode: number | null; - /** - * The `subprocess.signalCode` property indicates the signal received by - * the child process if any, else `null`. - */ - readonly signalCode: NodeJS.Signals | null; - /** - * The `subprocess.spawnargs` property represents the full list of command-line - * arguments the child process was launched with. - */ - readonly spawnargs: string[]; - /** - * The `subprocess.spawnfile` property indicates the executable file name of - * the child process that is launched. - * - * For {@link fork}, its value will be equal to `process.execPath`. - * For {@link spawn}, its value will be the name of - * the executable file. - * For {@link exec}, its value will be the name of the shell - * in which the child process is launched. - */ - readonly spawnfile: string; - /** - * The `subprocess.kill()` method sends a signal to the child process. If no - * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function - * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise. - * - * ```js - * import { spawn } from 'node:child_process'; - * const grep = spawn('grep', ['ssh']); - * - * grep.on('close', (code, signal) => { - * console.log( - * `child process terminated due to receipt of signal ${signal}`); - * }); - * - * // Send SIGHUP to process. - * grep.kill('SIGHUP'); - * ``` - * - * The `ChildProcess` object may emit an `'error'` event if the signal - * cannot be delivered. Sending a signal to a child process that has already exited - * is not an error but may have unforeseen consequences. Specifically, if the - * process identifier (PID) has been reassigned to another process, the signal will - * be delivered to that process instead which can have unexpected results. - * - * While the function is called `kill`, the signal delivered to the child process - * may not actually terminate the process. - * - * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference. - * - * On Windows, where POSIX signals do not exist, the `signal` argument will be - * ignored, and the process will be killed forcefully and abruptly (similar to `'SIGKILL'`). - * See `Signal Events` for more details. - * - * On Linux, child processes of child processes will not be terminated - * when attempting to kill their parent. This is likely to happen when running a - * new process in a shell or with the use of the `shell` option of `ChildProcess`: - * - * ```js - * 'use strict'; - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn( - * 'sh', - * [ - * '-c', - * `node -e "setInterval(() => { - * console.log(process.pid, 'is alive') - * }, 500);"`, - * ], { - * stdio: ['inherit', 'inherit', 'inherit'], - * }, - * ); - * - * setTimeout(() => { - * subprocess.kill(); // Does not terminate the Node.js process in the shell. - * }, 2000); - * ``` - * @since v0.1.90 - */ - kill(signal?: NodeJS.Signals | number): boolean; - /** - * Calls {@link ChildProcess.kill} with `'SIGTERM'`. - * @since v20.5.0 - */ - [Symbol.dispose](): void; - /** - * When an IPC channel has been established between the parent and child ( - * i.e. when using {@link fork}), the `subprocess.send()` method can - * be used to send messages to the child process. When the child process is a - * Node.js instance, these messages can be received via the `'message'` event. - * - * The message goes through serialization and parsing. The resulting - * message might not be the same as what is originally sent. - * - * For example, in the parent script: - * - * ```js - * import cp from 'node:child_process'; - * const n = cp.fork(`${__dirname}/sub.js`); - * - * n.on('message', (m) => { - * console.log('PARENT got message:', m); - * }); - * - * // Causes the child to print: CHILD got message: { hello: 'world' } - * n.send({ hello: 'world' }); - * ``` - * - * And then the child script, `'sub.js'` might look like this: - * - * ```js - * process.on('message', (m) => { - * console.log('CHILD got message:', m); - * }); - * - * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null } - * process.send({ foo: 'bar', baz: NaN }); - * ``` - * - * Child Node.js processes will have a `process.send()` method of their own - * that allows the child to send messages back to the parent. - * - * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages - * containing a `NODE_` prefix in the `cmd` property are reserved for use within - * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the `'internalMessage'` event and are consumed internally by Node.js. - * Applications should avoid using such messages or listening for `'internalMessage'` events as it is subject to change without notice. - * - * The optional `sendHandle` argument that may be passed to `subprocess.send()` is - * for passing a TCP server or socket object to the child process. The child will - * receive the object as the second argument passed to the callback function - * registered on the `'message'` event. Any data that is received and buffered in - * the socket will not be sent to the child. Sending IPC sockets is not supported on Windows. - * - * The optional `callback` is a function that is invoked after the message is - * sent but before the child may have received it. The function is called with a - * single argument: `null` on success, or an `Error` object on failure. - * - * If no `callback` function is provided and the message cannot be sent, an `'error'` event will be emitted by the `ChildProcess` object. This can - * happen, for instance, when the child process has already exited. - * - * `subprocess.send()` will return `false` if the channel has closed or when the - * backlog of unsent messages exceeds a threshold that makes it unwise to send - * more. Otherwise, the method returns `true`. The `callback` function can be - * used to implement flow control. - * - * #### Example: sending a server object - * - * The `sendHandle` argument can be used, for instance, to pass the handle of - * a TCP server object to the child process as illustrated in the example below: - * - * ```js - * import { createServer } from 'node:net'; - * import { fork } from 'node:child_process'; - * const subprocess = fork('subprocess.js'); - * - * // Open up the server object and send the handle. - * const server = createServer(); - * server.on('connection', (socket) => { - * socket.end('handled by parent'); - * }); - * server.listen(1337, () => { - * subprocess.send('server', server); - * }); - * ``` - * - * The child would then receive the server object as: - * - * ```js - * process.on('message', (m, server) => { - * if (m === 'server') { - * server.on('connection', (socket) => { - * socket.end('handled by child'); - * }); - * } - * }); - * ``` - * - * Once the server is now shared between the parent and child, some connections - * can be handled by the parent and some by the child. - * - * While the example above uses a server created using the `node:net` module, `node:dgram` module servers use exactly the same workflow with the exceptions of - * listening on a `'message'` event instead of `'connection'` and using `server.bind()` instead of `server.listen()`. This is, however, only - * supported on Unix platforms. - * - * #### Example: sending a socket object - * - * Similarly, the `sendHandler` argument can be used to pass the handle of a - * socket to the child process. The example below spawns two children that each - * handle connections with "normal" or "special" priority: - * - * ```js - * import { createServer } from 'node:net'; - * import { fork } from 'node:child_process'; - * const normal = fork('subprocess.js', ['normal']); - * const special = fork('subprocess.js', ['special']); - * - * // Open up the server and send sockets to child. Use pauseOnConnect to prevent - * // the sockets from being read before they are sent to the child process. - * const server = createServer({ pauseOnConnect: true }); - * server.on('connection', (socket) => { - * - * // If this is special priority... - * if (socket.remoteAddress === '74.125.127.100') { - * special.send('socket', socket); - * return; - * } - * // This is normal priority. - * normal.send('socket', socket); - * }); - * server.listen(1337); - * ``` - * - * The `subprocess.js` would receive the socket handle as the second argument - * passed to the event callback function: - * - * ```js - * process.on('message', (m, socket) => { - * if (m === 'socket') { - * if (socket) { - * // Check that the client socket exists. - * // It is possible for the socket to be closed between the time it is - * // sent and the time it is received in the child process. - * socket.end(`Request handled with ${process.argv[2]} priority`); - * } - * } - * }); - * ``` - * - * Do not use `.maxConnections` on a socket that has been passed to a subprocess. - * The parent cannot track when the socket is destroyed. - * - * Any `'message'` handlers in the subprocess should verify that `socket` exists, - * as the connection may have been closed during the time it takes to send the - * connection to the child. - * @since v0.5.9 - * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v25.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v25.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v25.x/api/dgram.html#class-dgramsocket) object. - * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: - */ - send(message: Serializable, callback?: (error: Error | null) => void): boolean; - send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean; - send( - message: Serializable, - sendHandle?: SendHandle, - options?: MessageOptions, - callback?: (error: Error | null) => void, - ): boolean; - /** - * Closes the IPC channel between parent and child, allowing the child to exit - * gracefully once there are no other connections keeping it alive. After calling - * this method the `subprocess.connected` and `process.connected` properties in - * both the parent and child (respectively) will be set to `false`, and it will be - * no longer possible to pass messages between the processes. - * - * The `'disconnect'` event will be emitted when there are no messages in the - * process of being received. This will most often be triggered immediately after - * calling `subprocess.disconnect()`. - * - * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked - * within the child process to close the IPC channel as well. - * @since v0.7.2 - */ - disconnect(): void; - /** - * By default, the parent will wait for the detached child to exit. To prevent the - * parent from waiting for a given `subprocess` to exit, use the `subprocess.unref()` method. Doing so will cause the parent's event loop to not - * include the child in its reference count, allowing the parent to exit - * independently of the child, unless there is an established IPC channel between - * the child and the parent. - * - * ```js - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn(process.argv[0], ['child_program.js'], { - * detached: true, - * stdio: 'ignore', - * }); - * - * subprocess.unref(); - * ``` - * @since v0.7.10 - */ - unref(): void; - /** - * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will - * restore the removed reference count for the child process, forcing the parent - * to wait for the child to exit before exiting itself. - * - * ```js - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn(process.argv[0], ['child_program.js'], { - * detached: true, - * stdio: 'ignore', - * }); - * - * subprocess.unref(); - * subprocess.ref(); - * ``` - * @since v0.7.10 - */ - ref(): void; - } - interface ChildProcess extends InternalEventEmitter {} - // return this object when stdio option is undefined or not specified - interface ChildProcessWithoutNullStreams extends ChildProcess { - stdin: Writable; - stdout: Readable; - stderr: Readable; - readonly stdio: [ - Writable, - Readable, - Readable, - // stderr - Readable | Writable | null | undefined, - // extra, no modification - Readable | Writable | null | undefined, // extra, no modification - ]; - } - // return this object when stdio option is a tuple of 3 - interface ChildProcessByStdio - extends ChildProcess - { - stdin: I; - stdout: O; - stderr: E; - readonly stdio: [ - I, - O, - E, - Readable | Writable | null | undefined, - // extra, no modification - Readable | Writable | null | undefined, // extra, no modification - ]; - } - interface Control extends EventEmitter { - ref(): void; - unref(): void; - } - interface MessageOptions { - keepOpen?: boolean | undefined; - } - type IOType = "overlapped" | "pipe" | "ignore" | "inherit"; - type StdioOptions = IOType | Array; - type SerializationType = "json" | "advanced"; - interface MessagingOptions extends Abortable { - /** - * Specify the kind of serialization used for sending messages between processes. - * @default 'json' - */ - serialization?: SerializationType | undefined; - /** - * The signal value to be used when the spawned process will be killed by the abort signal. - * @default 'SIGTERM' - */ - killSignal?: NodeJS.Signals | number | undefined; - /** - * In milliseconds the maximum amount of time the process is allowed to run. - */ - timeout?: number | undefined; - } - interface ProcessEnvOptions { - uid?: number | undefined; - gid?: number | undefined; - cwd?: string | URL | undefined; - env?: NodeJS.ProcessEnv | undefined; - } - interface CommonOptions extends ProcessEnvOptions { - /** - * @default false - */ - windowsHide?: boolean | undefined; - /** - * @default 0 - */ - timeout?: number | undefined; - } - interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable { - argv0?: string | undefined; - /** - * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. - * If passed as an array, the first element is used for `stdin`, the second for - * `stdout`, and the third for `stderr`. A fourth element can be used to - * specify the `stdio` behavior beyond the standard streams. See - * {@link ChildProcess.stdio} for more information. - * - * @default 'pipe' - */ - stdio?: StdioOptions | undefined; - shell?: boolean | string | undefined; - windowsVerbatimArguments?: boolean | undefined; - } - interface SpawnOptions extends CommonSpawnOptions { - detached?: boolean | undefined; - } - interface SpawnOptionsWithoutStdio extends SpawnOptions { - stdio?: StdioPipeNamed | StdioPipe[] | undefined; - } - type StdioNull = "inherit" | "ignore" | Stream; - type StdioPipeNamed = "pipe" | "overlapped"; - type StdioPipe = undefined | null | StdioPipeNamed; - interface SpawnOptionsWithStdioTuple< - Stdin extends StdioNull | StdioPipe, - Stdout extends StdioNull | StdioPipe, - Stderr extends StdioNull | StdioPipe, - > extends SpawnOptions { - stdio: [Stdin, Stdout, Stderr]; - } - /** - * The `child_process.spawn()` method spawns a new process using the given `command`, with command-line arguments in `args`. If omitted, `args` defaults - * to an empty array. - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * - * A third argument may be used to specify additional options, with these defaults: - * - * ```js - * const defaults = { - * cwd: undefined, - * env: process.env, - * }; - * ``` - * - * Use `cwd` to specify the working directory from which the process is spawned. - * If not given, the default is to inherit the current working directory. If given, - * but the path does not exist, the child process emits an `ENOENT` error - * and exits immediately. `ENOENT` is also emitted when the command - * does not exist. - * - * Use `env` to specify environment variables that will be visible to the new - * process, the default is `process.env`. - * - * `undefined` values in `env` will be ignored. - * - * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the - * exit code: - * - * ```js - * import { spawn } from 'node:child_process'; - * import { once } from 'node:events'; - * const ls = spawn('ls', ['-lh', '/usr']); - * - * ls.stdout.on('data', (data) => { - * console.log(`stdout: ${data}`); - * }); - * - * ls.stderr.on('data', (data) => { - * console.error(`stderr: ${data}`); - * }); - * - * const [code] = await once(ls, 'close'); - * console.log(`child process exited with code ${code}`); - * ``` - * - * Example: A very elaborate way to run `ps ax | grep ssh` - * - * ```js - * import { spawn } from 'node:child_process'; - * const ps = spawn('ps', ['ax']); - * const grep = spawn('grep', ['ssh']); - * - * ps.stdout.on('data', (data) => { - * grep.stdin.write(data); - * }); - * - * ps.stderr.on('data', (data) => { - * console.error(`ps stderr: ${data}`); - * }); - * - * ps.on('close', (code) => { - * if (code !== 0) { - * console.log(`ps process exited with code ${code}`); - * } - * grep.stdin.end(); - * }); - * - * grep.stdout.on('data', (data) => { - * console.log(data.toString()); - * }); - * - * grep.stderr.on('data', (data) => { - * console.error(`grep stderr: ${data}`); - * }); - * - * grep.on('close', (code) => { - * if (code !== 0) { - * console.log(`grep process exited with code ${code}`); - * } - * }); - * ``` - * - * Example of checking for failed `spawn`: - * - * ```js - * import { spawn } from 'node:child_process'; - * const subprocess = spawn('bad_command'); - * - * subprocess.on('error', (err) => { - * console.error('Failed to start subprocess.'); - * }); - * ``` - * - * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process - * title while others (Windows, SunOS) will use `command`. - * - * Node.js overwrites `argv[0]` with `process.execPath` on startup, so `process.argv[0]` in a Node.js child process will not match the `argv0` parameter passed to `spawn` from the parent. Retrieve - * it with the `process.argv0` property instead. - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * import { spawn } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const grep = spawn('grep', ['ssh'], { signal }); - * grep.on('error', (err) => { - * // This will be called with err being an AbortError if the controller aborts - * }); - * controller.abort(); // Stops the child process - * ``` - * @since v0.1.90 - * @param command The command to run. - * @param args List of string arguments. - */ - function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn(command: string, options: SpawnOptions): ChildProcess; - // overloads of spawn with 'args' - function spawn( - command: string, - args?: readonly string[], - options?: SpawnOptionsWithoutStdio, - ): ChildProcessWithoutNullStreams; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn(command: string, args: readonly string[], options: SpawnOptions): ChildProcess; - interface ExecOptions extends CommonOptions { - shell?: string | undefined; - signal?: AbortSignal | undefined; - maxBuffer?: number | undefined; - killSignal?: NodeJS.Signals | number | undefined; - encoding?: string | null | undefined; - } - interface ExecOptionsWithStringEncoding extends ExecOptions { - encoding?: BufferEncoding | undefined; - } - interface ExecOptionsWithBufferEncoding extends ExecOptions { - encoding: "buffer" | null; // specify `null`. - } - // TODO: Just Plain Wrong™ (see also nodejs/node#57392) - interface ExecException extends Error { - cmd?: string; - killed?: boolean; - code?: number; - signal?: NodeJS.Signals; - stdout?: string; - stderr?: string; - } - /** - * Spawns a shell then executes the `command` within that shell, buffering any - * generated output. The `command` string passed to the exec function is processed - * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters)) - * need to be dealt with accordingly: - * - * ```js - * import { exec } from 'node:child_process'; - * - * exec('"/path/to/test file/test.sh" arg1 arg2'); - * // Double quotes are used so that the space in the path is not interpreted as - * // a delimiter of multiple arguments. - * - * exec('echo "The \\$HOME variable is $HOME"'); - * // The $HOME variable is escaped in the first instance, but not in the second. - * ``` - * - * **Never pass unsanitized user input to this function. Any input containing shell** - * **metacharacters may be used to trigger arbitrary command execution.** - * - * If a `callback` function is provided, it is called with the arguments `(error, stdout, stderr)`. On success, `error` will be `null`. On error, `error` will be an instance of `Error`. The - * `error.code` property will be - * the exit code of the process. By convention, any exit code other than `0` indicates an error. `error.signal` will be the signal that terminated the - * process. - * - * The `stdout` and `stderr` arguments passed to the callback will contain the - * stdout and stderr output of the child process. By default, Node.js will decode - * the output as UTF-8 and pass strings to the callback. The `encoding` option - * can be used to specify the character encoding used to decode the stdout and - * stderr output. If `encoding` is `'buffer'`, or an unrecognized character - * encoding, `Buffer` objects will be passed to the callback instead. - * - * ```js - * import { exec } from 'node:child_process'; - * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => { - * if (error) { - * console.error(`exec error: ${error}`); - * return; - * } - * console.log(`stdout: ${stdout}`); - * console.error(`stderr: ${stderr}`); - * }); - * ``` - * - * If `timeout` is greater than `0`, the parent will send the signal - * identified by the `killSignal` property (the default is `'SIGTERM'`) if the - * child runs longer than `timeout` milliseconds. - * - * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace - * the existing process and uses a shell to execute the command. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In - * case of an error (including any error resulting in an exit code other than 0), a - * rejected promise is returned, with the same `error` object given in the - * callback, but with two additional properties `stdout` and `stderr`. - * - * ```js - * import util from 'node:util'; - * import child_process from 'node:child_process'; - * const exec = util.promisify(child_process.exec); - * - * async function lsExample() { - * const { stdout, stderr } = await exec('ls'); - * console.log('stdout:', stdout); - * console.error('stderr:', stderr); - * } - * lsExample(); - * ``` - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * import { exec } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const child = exec('grep ssh', { signal }, (error) => { - * console.error(error); // an AbortError - * }); - * controller.abort(); - * ``` - * @since v0.1.90 - * @param command The command to run, with space-separated arguments. - * @param callback called with the output when process terminates. - */ - function exec( - command: string, - callback?: (error: ExecException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. - function exec( - command: string, - options: ExecOptionsWithBufferEncoding, - callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, - ): ChildProcess; - // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`. - function exec( - command: string, - options: ExecOptionsWithStringEncoding, - callback?: (error: ExecException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // fallback if nothing else matches. Worst case is always `string | Buffer`. - function exec( - command: string, - options: ExecOptions | undefined | null, - callback?: ( - error: ExecException | null, - stdout: string | NonSharedBuffer, - stderr: string | NonSharedBuffer, - ) => void, - ): ChildProcess; - interface PromiseWithChild extends Promise { - child: ChildProcess; - } - namespace exec { - function __promisify__(command: string): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - command: string, - options: ExecOptionsWithBufferEncoding, - ): PromiseWithChild<{ - stdout: NonSharedBuffer; - stderr: NonSharedBuffer; - }>; - function __promisify__( - command: string, - options: ExecOptionsWithStringEncoding, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - command: string, - options: ExecOptions | undefined | null, - ): PromiseWithChild<{ - stdout: string | NonSharedBuffer; - stderr: string | NonSharedBuffer; - }>; - } - interface ExecFileOptions extends CommonOptions, Abortable { - maxBuffer?: number | undefined; - killSignal?: NodeJS.Signals | number | undefined; - windowsVerbatimArguments?: boolean | undefined; - shell?: boolean | string | undefined; - signal?: AbortSignal | undefined; - encoding?: string | null | undefined; - } - interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { - encoding?: BufferEncoding | undefined; - } - interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { - encoding: "buffer" | null; - } - /** @deprecated Use `ExecFileOptions` instead. */ - interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {} - // TODO: execFile exceptions can take many forms... this accurately describes none of them - type ExecFileException = - & Omit - & Omit - & { code?: string | number | null }; - /** - * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified - * executable `file` is spawned directly as a new process making it slightly more - * efficient than {@link exec}. - * - * The same options as {@link exec} are supported. Since a shell is - * not spawned, behaviors such as I/O redirection and file globbing are not - * supported. - * - * ```js - * import { execFile } from 'node:child_process'; - * const child = execFile('node', ['--version'], (error, stdout, stderr) => { - * if (error) { - * throw error; - * } - * console.log(stdout); - * }); - * ``` - * - * The `stdout` and `stderr` arguments passed to the callback will contain the - * stdout and stderr output of the child process. By default, Node.js will decode - * the output as UTF-8 and pass strings to the callback. The `encoding` option - * can be used to specify the character encoding used to decode the stdout and - * stderr output. If `encoding` is `'buffer'`, or an unrecognized character - * encoding, `Buffer` objects will be passed to the callback instead. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In - * case of an error (including any error resulting in an exit code other than 0), a - * rejected promise is returned, with the same `error` object given in the - * callback, but with two additional properties `stdout` and `stderr`. - * - * ```js - * import util from 'node:util'; - * import child_process from 'node:child_process'; - * const execFile = util.promisify(child_process.execFile); - * async function getVersion() { - * const { stdout } = await execFile('node', ['--version']); - * console.log(stdout); - * } - * getVersion(); - * ``` - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * import { execFile } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const child = execFile('node', ['--version'], { signal }, (error) => { - * console.error(error); // an AbortError - * }); - * controller.abort(); - * ``` - * @since v0.1.91 - * @param file The name or path of the executable file to run. - * @param args List of string arguments. - * @param callback Called with the output when process terminates. - */ - // no `options` definitely means stdout/stderr are `string`. - function execFile( - file: string, - callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. - function execFile( - file: string, - options: ExecFileOptionsWithBufferEncoding, - callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithBufferEncoding, - callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, - ): ChildProcess; - // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`. - function execFile( - file: string, - options: ExecFileOptionsWithStringEncoding, - callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithStringEncoding, - callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // fallback if nothing else matches. Worst case is always `string | Buffer`. - function execFile( - file: string, - options: ExecFileOptions | undefined | null, - callback: - | (( - error: ExecFileException | null, - stdout: string | NonSharedBuffer, - stderr: string | NonSharedBuffer, - ) => void) - | undefined - | null, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptions | undefined | null, - callback: - | (( - error: ExecFileException | null, - stdout: string | NonSharedBuffer, - stderr: string | NonSharedBuffer, - ) => void) - | undefined - | null, - ): ChildProcess; - namespace execFile { - function __promisify__(file: string): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - options: ExecFileOptionsWithBufferEncoding, - ): PromiseWithChild<{ - stdout: NonSharedBuffer; - stderr: NonSharedBuffer; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithBufferEncoding, - ): PromiseWithChild<{ - stdout: NonSharedBuffer; - stderr: NonSharedBuffer; - }>; - function __promisify__( - file: string, - options: ExecFileOptionsWithStringEncoding, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithStringEncoding, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - options: ExecFileOptions | undefined | null, - ): PromiseWithChild<{ - stdout: string | NonSharedBuffer; - stderr: string | NonSharedBuffer; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptions | undefined | null, - ): PromiseWithChild<{ - stdout: string | NonSharedBuffer; - stderr: string | NonSharedBuffer; - }>; - } - interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable { - execPath?: string | undefined; - execArgv?: string[] | undefined; - silent?: boolean | undefined; - /** - * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. - * If passed as an array, the first element is used for `stdin`, the second for - * `stdout`, and the third for `stderr`. A fourth element can be used to - * specify the `stdio` behavior beyond the standard streams. See - * {@link ChildProcess.stdio} for more information. - * - * @default 'pipe' - */ - stdio?: StdioOptions | undefined; - detached?: boolean | undefined; - windowsVerbatimArguments?: boolean | undefined; - } - /** - * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes. - * Like {@link spawn}, a `ChildProcess` object is returned. The - * returned `ChildProcess` will have an additional communication channel - * built-in that allows messages to be passed back and forth between the parent and - * child. See `subprocess.send()` for details. - * - * Keep in mind that spawned Node.js child processes are - * independent of the parent with exception of the IPC communication channel - * that is established between the two. Each process has its own memory, with - * their own V8 instances. Because of the additional resource allocations - * required, spawning a large number of child Node.js processes is not - * recommended. - * - * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the `options` object allows for an alternative - * execution path to be used. - * - * Node.js processes launched with a custom `execPath` will communicate with the - * parent process using the file descriptor (fd) identified using the - * environment variable `NODE_CHANNEL_FD` on the child process. - * - * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the - * current process. - * - * The `shell` option available in {@link spawn} is not supported by `child_process.fork()` and will be ignored if set. - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * if (process.argv[2] === 'child') { - * setTimeout(() => { - * console.log(`Hello from ${process.argv[2]}!`); - * }, 1_000); - * } else { - * import { fork } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const child = fork(__filename, ['child'], { signal }); - * child.on('error', (err) => { - * // This will be called with err being an AbortError if the controller aborts - * }); - * controller.abort(); // Stops the child process - * } - * ``` - * @since v0.5.0 - * @param modulePath The module to run in the child. - * @param args List of string arguments. - */ - function fork(modulePath: string | URL, options?: ForkOptions): ChildProcess; - function fork(modulePath: string | URL, args?: readonly string[], options?: ForkOptions): ChildProcess; - interface SpawnSyncOptions extends CommonSpawnOptions { - input?: string | NodeJS.ArrayBufferView | undefined; - maxBuffer?: number | undefined; - encoding?: BufferEncoding | "buffer" | null | undefined; - } - interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { - encoding: BufferEncoding; - } - interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { - encoding?: "buffer" | null | undefined; - } - interface SpawnSyncReturns { - pid: number; - output: Array; - stdout: T; - stderr: T; - status: number | null; - signal: NodeJS.Signals | null; - error?: Error; - } - /** - * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return - * until the child process has fully closed. When a timeout has been encountered - * and `killSignal` is sent, the method won't return until the process has - * completely exited. If the process intercepts and handles the `SIGTERM` signal - * and doesn't exit, the parent process will wait until the child process has - * exited. - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * @since v0.11.12 - * @param command The command to run. - * @param args List of string arguments. - */ - function spawnSync(command: string): SpawnSyncReturns; - function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; - function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; - function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; - function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns; - function spawnSync( - command: string, - args: readonly string[], - options: SpawnSyncOptionsWithStringEncoding, - ): SpawnSyncReturns; - function spawnSync( - command: string, - args: readonly string[], - options: SpawnSyncOptionsWithBufferEncoding, - ): SpawnSyncReturns; - function spawnSync( - command: string, - args?: readonly string[], - options?: SpawnSyncOptions, - ): SpawnSyncReturns; - interface CommonExecOptions extends CommonOptions { - input?: string | NodeJS.ArrayBufferView | undefined; - /** - * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings. - * If passed as an array, the first element is used for `stdin`, the second for - * `stdout`, and the third for `stderr`. A fourth element can be used to - * specify the `stdio` behavior beyond the standard streams. See - * {@link ChildProcess.stdio} for more information. - * - * @default 'pipe' - */ - stdio?: StdioOptions | undefined; - killSignal?: NodeJS.Signals | number | undefined; - maxBuffer?: number | undefined; - encoding?: BufferEncoding | "buffer" | null | undefined; - } - interface ExecSyncOptions extends CommonExecOptions { - shell?: string | undefined; - } - interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { - encoding: BufferEncoding; - } - interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { - encoding?: "buffer" | null | undefined; - } - /** - * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return - * until the child process has fully closed. When a timeout has been encountered - * and `killSignal` is sent, the method won't return until the process has - * completely exited. If the child process intercepts and handles the `SIGTERM` signal and doesn't exit, the parent process will wait until the child process - * has exited. - * - * If the process times out or has a non-zero exit code, this method will throw. - * The `Error` object will contain the entire result from {@link spawnSync}. - * - * **Never pass unsanitized user input to this function. Any input containing shell** - * **metacharacters may be used to trigger arbitrary command execution.** - * @since v0.11.12 - * @param command The command to run. - * @return The stdout from the command. - */ - function execSync(command: string): NonSharedBuffer; - function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string; - function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): NonSharedBuffer; - function execSync(command: string, options?: ExecSyncOptions): string | NonSharedBuffer; - interface ExecFileSyncOptions extends CommonExecOptions { - shell?: boolean | string | undefined; - } - interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { - encoding: BufferEncoding; - } - interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { - encoding?: "buffer" | null | undefined; // specify `null`. - } - /** - * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not - * return until the child process has fully closed. When a timeout has been - * encountered and `killSignal` is sent, the method won't return until the process - * has completely exited. - * - * If the child process intercepts and handles the `SIGTERM` signal and - * does not exit, the parent process will still wait until the child process has - * exited. - * - * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}. - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * @since v0.11.12 - * @param file The name or path of the executable file to run. - * @param args List of string arguments. - * @return The stdout from the command. - */ - function execFileSync(file: string): NonSharedBuffer; - function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string; - function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): NonSharedBuffer; - function execFileSync(file: string, options?: ExecFileSyncOptions): string | NonSharedBuffer; - function execFileSync(file: string, args: readonly string[]): NonSharedBuffer; - function execFileSync( - file: string, - args: readonly string[], - options: ExecFileSyncOptionsWithStringEncoding, - ): string; - function execFileSync( - file: string, - args: readonly string[], - options: ExecFileSyncOptionsWithBufferEncoding, - ): NonSharedBuffer; - function execFileSync( - file: string, - args?: readonly string[], - options?: ExecFileSyncOptions, - ): string | NonSharedBuffer; -} -declare module "child_process" { - export * from "node:child_process"; -} diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts deleted file mode 100644 index 80f55ae..0000000 --- a/node_modules/@types/node/cluster.d.ts +++ /dev/null @@ -1,432 +0,0 @@ -declare module "node:cluster" { - import * as child_process from "node:child_process"; - import { EventEmitter, InternalEventEmitter } from "node:events"; - class Worker implements EventEmitter { - constructor(options?: cluster.WorkerOptions); - /** - * Each new worker is given its own unique id, this id is stored in the `id`. - * - * While a worker is alive, this is the key that indexes it in `cluster.workers`. - * @since v0.8.0 - */ - id: number; - /** - * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object - * from this function is stored as `.process`. In a worker, the global `process` is stored. - * - * See: [Child Process module](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processforkmodulepath-args-options). - * - * Workers will call `process.exit(0)` if the `'disconnect'` event occurs - * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against - * accidental disconnection. - * @since v0.7.0 - */ - process: child_process.ChildProcess; - /** - * Send a message to a worker or primary, optionally with a handle. - * - * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback). - * - * In a worker, this sends a message to the primary. It is identical to `process.send()`. - * - * This example will echo back all messages from the primary: - * - * ```js - * if (cluster.isPrimary) { - * const worker = cluster.fork(); - * worker.send('hi there'); - * - * } else if (cluster.isWorker) { - * process.on('message', (msg) => { - * process.send(msg); - * }); - * } - * ``` - * @since v0.7.0 - * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. - */ - send(message: child_process.Serializable, callback?: (error: Error | null) => void): boolean; - send( - message: child_process.Serializable, - sendHandle: child_process.SendHandle, - callback?: (error: Error | null) => void, - ): boolean; - send( - message: child_process.Serializable, - sendHandle: child_process.SendHandle, - options?: child_process.MessageOptions, - callback?: (error: Error | null) => void, - ): boolean; - /** - * This function will kill the worker. In the primary worker, it does this by - * disconnecting the `worker.process`, and once disconnected, killing with `signal`. In the worker, it does it by killing the process with `signal`. - * - * The `kill()` function kills the worker process without waiting for a graceful - * disconnect, it has the same behavior as `worker.process.kill()`. - * - * This method is aliased as `worker.destroy()` for backwards compatibility. - * - * In a worker, `process.kill()` exists, but it is not this function; - * it is [`kill()`](https://nodejs.org/docs/latest-v25.x/api/process.html#processkillpid-signal). - * @since v0.9.12 - * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process. - */ - kill(signal?: string): void; - destroy(signal?: string): void; - /** - * In a worker, this function will close all servers, wait for the `'close'` event - * on those servers, and then disconnect the IPC channel. - * - * In the primary, an internal message is sent to the worker causing it to call `.disconnect()` on itself. - * - * Causes `.exitedAfterDisconnect` to be set. - * - * After a server is closed, it will no longer accept new connections, - * but connections may be accepted by any other listening worker. Existing - * connections will be allowed to close as usual. When no more connections exist, - * see `server.close()`, the IPC channel to the worker will close allowing it - * to die gracefully. - * - * The above applies _only_ to server connections, client connections are not - * automatically closed by workers, and disconnect does not wait for them to close - * before exiting. - * - * In a worker, `process.disconnect` exists, but it is not this function; - * it is `disconnect()`. - * - * Because long living server connections may block workers from disconnecting, it - * may be useful to send a message, so application specific actions may be taken to - * close them. It also may be useful to implement a timeout, killing a worker if - * the `'disconnect'` event has not been emitted after some time. - * - * ```js - * import net from 'node:net'; - * - * if (cluster.isPrimary) { - * const worker = cluster.fork(); - * let timeout; - * - * worker.on('listening', (address) => { - * worker.send('shutdown'); - * worker.disconnect(); - * timeout = setTimeout(() => { - * worker.kill(); - * }, 2000); - * }); - * - * worker.on('disconnect', () => { - * clearTimeout(timeout); - * }); - * - * } else if (cluster.isWorker) { - * const server = net.createServer((socket) => { - * // Connections never end - * }); - * - * server.listen(8000); - * - * process.on('message', (msg) => { - * if (msg === 'shutdown') { - * // Initiate graceful close of any connections to server - * } - * }); - * } - * ``` - * @since v0.7.7 - * @return A reference to `worker`. - */ - disconnect(): this; - /** - * This function returns `true` if the worker is connected to its primary via its - * IPC channel, `false` otherwise. A worker is connected to its primary after it - * has been created. It is disconnected after the `'disconnect'` event is emitted. - * @since v0.11.14 - */ - isConnected(): boolean; - /** - * This function returns `true` if the worker's process has terminated (either - * because of exiting or being signaled). Otherwise, it returns `false`. - * - * ```js - * import cluster from 'node:cluster'; - * import http from 'node:http'; - * import { availableParallelism } from 'node:os'; - * import process from 'node:process'; - * - * const numCPUs = availableParallelism(); - * - * if (cluster.isPrimary) { - * console.log(`Primary ${process.pid} is running`); - * - * // Fork workers. - * for (let i = 0; i < numCPUs; i++) { - * cluster.fork(); - * } - * - * cluster.on('fork', (worker) => { - * console.log('worker is dead:', worker.isDead()); - * }); - * - * cluster.on('exit', (worker, code, signal) => { - * console.log('worker is dead:', worker.isDead()); - * }); - * } else { - * // Workers can share any TCP connection. In this case, it is an HTTP server. - * http.createServer((req, res) => { - * res.writeHead(200); - * res.end(`Current process\n ${process.pid}`); - * process.kill(process.pid); - * }).listen(8000); - * } - * ``` - * @since v0.11.14 - */ - isDead(): boolean; - /** - * This property is `true` if the worker exited due to `.disconnect()`. - * If the worker exited any other way, it is `false`. If the - * worker has not exited, it is `undefined`. - * - * The boolean `worker.exitedAfterDisconnect` allows distinguishing between - * voluntary and accidental exit, the primary may choose not to respawn a worker - * based on this value. - * - * ```js - * cluster.on('exit', (worker, code, signal) => { - * if (worker.exitedAfterDisconnect === true) { - * console.log('Oh, it was just voluntary – no need to worry'); - * } - * }); - * - * // kill worker - * worker.kill(); - * ``` - * @since v6.0.0 - */ - exitedAfterDisconnect: boolean; - } - interface Worker extends InternalEventEmitter {} - type _Worker = Worker; - namespace cluster { - interface Worker extends _Worker {} - interface WorkerOptions { - id?: number | undefined; - process?: child_process.ChildProcess | undefined; - state?: string | undefined; - } - interface WorkerEventMap { - "disconnect": []; - "error": [error: Error]; - "exit": [code: number, signal: string]; - "listening": [address: Address]; - "message": [message: any, handle: child_process.SendHandle]; - "online": []; - } - interface ClusterSettings { - /** - * List of string arguments passed to the Node.js executable. - * @default process.execArgv - */ - execArgv?: string[] | undefined; - /** - * File path to worker file. - * @default process.argv[1] - */ - exec?: string | undefined; - /** - * String arguments passed to worker. - * @default process.argv.slice(2) - */ - args?: readonly string[] | undefined; - /** - * Whether or not to send output to parent's stdio. - * @default false - */ - silent?: boolean | undefined; - /** - * Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must - * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processspawncommand-args-options)'s - * [`stdio`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#optionsstdio). - */ - stdio?: any[] | undefined; - /** - * Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).) - */ - uid?: number | undefined; - /** - * Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).) - */ - gid?: number | undefined; - /** - * Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number. - * By default each worker gets its own port, incremented from the primary's `process.debugPort`. - */ - inspectPort?: number | (() => number) | undefined; - /** - * Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`. - * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#advanced-serialization) for more details. - * @default false - */ - serialization?: "json" | "advanced" | undefined; - /** - * Current working directory of the worker process. - * @default undefined (inherits from parent process) - */ - cwd?: string | undefined; - /** - * Hide the forked processes console window that would normally be created on Windows systems. - * @default false - */ - windowsHide?: boolean | undefined; - } - interface Address { - address: string; - port: number; - /** - * The `addressType` is one of: - * - * * `4` (TCPv4) - * * `6` (TCPv6) - * * `-1` (Unix domain socket) - * * `'udp4'` or `'udp6'` (UDPv4 or UDPv6) - */ - addressType: 4 | 6 | -1 | "udp4" | "udp6"; - } - interface ClusterEventMap { - "disconnect": [worker: Worker]; - "exit": [worker: Worker, code: number, signal: string]; - "fork": [worker: Worker]; - "listening": [worker: Worker, address: Address]; - "message": [worker: Worker, message: any, handle: child_process.SendHandle]; - "online": [worker: Worker]; - "setup": [settings: ClusterSettings]; - } - interface Cluster extends InternalEventEmitter { - /** - * A `Worker` object contains all public information and method about a worker. - * In the primary it can be obtained using `cluster.workers`. In a worker - * it can be obtained using `cluster.worker`. - * @since v0.7.0 - */ - Worker: typeof Worker; - disconnect(callback?: () => void): void; - /** - * Spawn a new worker process. - * - * This can only be called from the primary process. - * @param env Key/value pairs to add to worker process environment. - * @since v0.6.0 - */ - fork(env?: any): Worker; - /** @deprecated since v16.0.0 - use isPrimary. */ - readonly isMaster: boolean; - /** - * True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` - * is undefined, then `isPrimary` is `true`. - * @since v16.0.0 - */ - readonly isPrimary: boolean; - /** - * True if the process is not a primary (it is the negation of `cluster.isPrimary`). - * @since v0.6.0 - */ - readonly isWorker: boolean; - /** - * The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a - * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings) - * is called, whichever comes first. - * - * `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute - * IOCP handles without incurring a large performance hit. - * - * `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`. - * @since v0.11.2 - */ - schedulingPolicy: number; - /** - * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings) - * (or [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv)) this settings object will contain - * the settings, including the default values. - * - * This object is not intended to be changed or set manually. - * @since v0.7.1 - */ - readonly settings: ClusterSettings; - /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings) instead. */ - setupMaster(settings?: ClusterSettings): void; - /** - * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`. - * - * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv) - * and have no effect on workers that are already running. - * - * The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to - * [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv). - * - * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of - * `cluster.setupPrimary()` is called. - * - * ```js - * import cluster from 'node:cluster'; - * - * cluster.setupPrimary({ - * exec: 'worker.js', - * args: ['--use', 'https'], - * silent: true, - * }); - * cluster.fork(); // https worker - * cluster.setupPrimary({ - * exec: 'worker.js', - * args: ['--use', 'http'], - * }); - * cluster.fork(); // http worker - * ``` - * - * This can only be called from the primary process. - * @since v16.0.0 - */ - setupPrimary(settings?: ClusterSettings): void; - /** - * A reference to the current worker object. Not available in the primary process. - * - * ```js - * import cluster from 'node:cluster'; - * - * if (cluster.isPrimary) { - * console.log('I am primary'); - * cluster.fork(); - * cluster.fork(); - * } else if (cluster.isWorker) { - * console.log(`I am worker #${cluster.worker.id}`); - * } - * ``` - * @since v0.7.0 - */ - readonly worker?: Worker; - /** - * A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process. - * - * A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it - * is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted. - * - * ```js - * import cluster from 'node:cluster'; - * - * for (const worker of Object.values(cluster.workers)) { - * worker.send('big announcement to all workers'); - * } - * ``` - * @since v0.7.0 - */ - readonly workers?: NodeJS.Dict; - readonly SCHED_NONE: number; - readonly SCHED_RR: number; - } - } - var cluster: cluster.Cluster; - export = cluster; -} -declare module "cluster" { - import cluster = require("node:cluster"); - export = cluster; -} diff --git a/node_modules/@types/node/compatibility/iterators.d.ts b/node_modules/@types/node/compatibility/iterators.d.ts deleted file mode 100644 index 156e785..0000000 --- a/node_modules/@types/node/compatibility/iterators.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Backwards-compatible iterator interfaces, augmented with iterator helper methods by lib.esnext.iterator in TypeScript 5.6. -// The IterableIterator interface does not contain these methods, which creates assignability issues in places where IteratorObjects -// are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded. -// Also ensures that iterators returned by the Node API, which inherit from Iterator.prototype, correctly expose the iterator helper methods -// if lib.esnext.iterator is loaded. -// TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn. - -// Placeholders for TS <5.6 -interface IteratorObject {} -interface AsyncIteratorObject {} - -declare namespace NodeJS { - // Populate iterator methods for TS <5.6 - interface Iterator extends globalThis.Iterator {} - interface AsyncIterator extends globalThis.AsyncIterator {} - - // Polyfill for TS 5.6's instrinsic BuiltinIteratorReturn type, required for DOM-compatible iterators - type BuiltinIteratorReturn = ReturnType extends - globalThis.Iterator ? TReturn - : any; -} diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts deleted file mode 100644 index b7f8833..0000000 --- a/node_modules/@types/node/console.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -declare module "node:console" { - import { InspectOptions } from "node:util"; - namespace console { - interface ConsoleOptions { - stdout: NodeJS.WritableStream; - stderr?: NodeJS.WritableStream | undefined; - /** - * Ignore errors when writing to the underlying streams. - * @default true - */ - ignoreErrors?: boolean | undefined; - /** - * Set color support for this `Console` instance. Setting to true enables coloring while inspecting - * values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color - * support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the - * respective stream. This option can not be used, if `inspectOptions.colors` is set as well. - * @default 'auto' - */ - colorMode?: boolean | "auto" | undefined; - /** - * Specifies options that are passed along to - * [`util.inspect()`](https://nodejs.org/docs/latest-v25.x/api/util.html#utilinspectobject-options). - */ - inspectOptions?: InspectOptions | ReadonlyMap | undefined; - /** - * Set group indentation. - * @default 2 - */ - groupIndentation?: number | undefined; - } - interface Console { - readonly Console: { - prototype: Console; - new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console; - new(options: ConsoleOptions): Console; - }; - assert(condition?: unknown, ...data: any[]): void; - clear(): void; - count(label?: string): void; - countReset(label?: string): void; - debug(...data: any[]): void; - dir(item?: any, options?: InspectOptions): void; - dirxml(...data: any[]): void; - error(...data: any[]): void; - group(...data: any[]): void; - groupCollapsed(...data: any[]): void; - groupEnd(): void; - info(...data: any[]): void; - log(...data: any[]): void; - table(tabularData?: any, properties?: string[]): void; - time(label?: string): void; - timeEnd(label?: string): void; - timeLog(label?: string, ...data: any[]): void; - trace(...data: any[]): void; - warn(...data: any[]): void; - /** - * This method does not display anything unless used in the inspector. The `console.profile()` - * method starts a JavaScript CPU profile with an optional label until {@link profileEnd} - * is called. The profile is then added to the Profile panel of the inspector. - * - * ```js - * console.profile('MyLabel'); - * // Some code - * console.profileEnd('MyLabel'); - * // Adds the profile 'MyLabel' to the Profiles panel of the inspector. - * ``` - * @since v8.0.0 - */ - profile(label?: string): void; - /** - * This method does not display anything unless used in the inspector. Stops the current - * JavaScript CPU profiling session if one has been started and prints the report to the - * Profiles panel of the inspector. See {@link profile} for an example. - * - * If this method is called without a label, the most recently started profile is stopped. - * @since v8.0.0 - */ - profileEnd(label?: string): void; - /** - * This method does not display anything unless used in the inspector. The `console.timeStamp()` - * method adds an event with the label `'label'` to the Timeline panel of the inspector. - * @since v8.0.0 - */ - timeStamp(label?: string): void; - } - } - var console: console.Console; - export = console; -} -declare module "console" { - import console = require("node:console"); - export = console; -} diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts deleted file mode 100644 index a271f9a..0000000 --- a/node_modules/@types/node/constants.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -declare module "node:constants" { - const constants: - & typeof import("node:os").constants.dlopen - & typeof import("node:os").constants.errno - & typeof import("node:os").constants.priority - & typeof import("node:os").constants.signals - & typeof import("node:fs").constants - & typeof import("node:crypto").constants; - export = constants; -} -declare module "constants" { - import constants = require("node:constants"); - export = constants; -} diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts deleted file mode 100644 index 1933d60..0000000 --- a/node_modules/@types/node/crypto.d.ts +++ /dev/null @@ -1,4058 +0,0 @@ -declare module "node:crypto" { - import { NonSharedBuffer } from "node:buffer"; - import * as stream from "node:stream"; - import { PeerCertificate } from "node:tls"; - /** - * SPKAC is a Certificate Signing Request mechanism originally implemented by - * Netscape and was specified formally as part of HTML5's `keygen` element. - * - * `` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects - * should not use this element anymore. - * - * The `node:crypto` module provides the `Certificate` class for working with SPKAC - * data. The most common usage is handling output generated by the HTML5 `` element. Node.js uses [OpenSSL's SPKAC - * implementation](https://www.openssl.org/docs/man3.0/man1/openssl-spkac.html) internally. - * @since v0.11.8 - */ - class Certificate { - /** - * ```js - * const { Certificate } = await import('node:crypto'); - * const spkac = getSpkacSomehow(); - * const challenge = Certificate.exportChallenge(spkac); - * console.log(challenge.toString('utf8')); - * // Prints: the challenge as a UTF8 string - * ``` - * @since v9.0.0 - * @param encoding The `encoding` of the `spkac` string. - * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge. - */ - static exportChallenge(spkac: BinaryLike): NonSharedBuffer; - /** - * ```js - * const { Certificate } = await import('node:crypto'); - * const spkac = getSpkacSomehow(); - * const publicKey = Certificate.exportPublicKey(spkac); - * console.log(publicKey); - * // Prints: the public key as - * ``` - * @since v9.0.0 - * @param encoding The `encoding` of the `spkac` string. - * @return The public key component of the `spkac` data structure, which includes a public key and a challenge. - */ - static exportPublicKey(spkac: BinaryLike, encoding?: string): NonSharedBuffer; - /** - * ```js - * import { Buffer } from 'node:buffer'; - * const { Certificate } = await import('node:crypto'); - * - * const spkac = getSpkacSomehow(); - * console.log(Certificate.verifySpkac(Buffer.from(spkac))); - * // Prints: true or false - * ``` - * @since v9.0.0 - * @param encoding The `encoding` of the `spkac` string. - * @return `true` if the given `spkac` data structure is valid, `false` otherwise. - */ - static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; - /** - * @deprecated - * @param spkac - * @returns The challenge component of the `spkac` data structure, - * which includes a public key and a challenge. - */ - exportChallenge(spkac: BinaryLike): NonSharedBuffer; - /** - * @deprecated - * @param spkac - * @param encoding The encoding of the spkac string. - * @returns The public key component of the `spkac` data structure, - * which includes a public key and a challenge. - */ - exportPublicKey(spkac: BinaryLike, encoding?: string): NonSharedBuffer; - /** - * @deprecated - * @param spkac - * @returns `true` if the given `spkac` data structure is valid, - * `false` otherwise. - */ - verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; - } - namespace constants { - // https://nodejs.org/dist/latest-v25.x/docs/api/crypto.html#crypto-constants - const OPENSSL_VERSION_NUMBER: number; - /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */ - const SSL_OP_ALL: number; - /** Instructs OpenSSL to allow a non-[EC]DHE-based key exchange mode for TLS v1.3 */ - const SSL_OP_ALLOW_NO_DHE_KEX: number; - /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ - const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; - /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ - const SSL_OP_CIPHER_SERVER_PREFERENCE: number; - /** Instructs OpenSSL to use Cisco's version identifier of DTLS_BAD_VER. */ - const SSL_OP_CISCO_ANYCONNECT: number; - /** Instructs OpenSSL to turn on cookie exchange. */ - const SSL_OP_COOKIE_EXCHANGE: number; - /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */ - const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; - /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */ - const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; - /** Allows initial connection to servers that do not support RI. */ - const SSL_OP_LEGACY_SERVER_CONNECT: number; - /** Instructs OpenSSL to disable support for SSL/TLS compression. */ - const SSL_OP_NO_COMPRESSION: number; - /** Instructs OpenSSL to disable encrypt-then-MAC. */ - const SSL_OP_NO_ENCRYPT_THEN_MAC: number; - const SSL_OP_NO_QUERY_MTU: number; - /** Instructs OpenSSL to disable renegotiation. */ - const SSL_OP_NO_RENEGOTIATION: number; - /** Instructs OpenSSL to always start a new session when performing renegotiation. */ - const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; - /** Instructs OpenSSL to turn off SSL v2 */ - const SSL_OP_NO_SSLv2: number; - /** Instructs OpenSSL to turn off SSL v3 */ - const SSL_OP_NO_SSLv3: number; - /** Instructs OpenSSL to disable use of RFC4507bis tickets. */ - const SSL_OP_NO_TICKET: number; - /** Instructs OpenSSL to turn off TLS v1 */ - const SSL_OP_NO_TLSv1: number; - /** Instructs OpenSSL to turn off TLS v1.1 */ - const SSL_OP_NO_TLSv1_1: number; - /** Instructs OpenSSL to turn off TLS v1.2 */ - const SSL_OP_NO_TLSv1_2: number; - /** Instructs OpenSSL to turn off TLS v1.3 */ - const SSL_OP_NO_TLSv1_3: number; - /** Instructs OpenSSL server to prioritize ChaCha20-Poly1305 when the client does. This option has no effect if `SSL_OP_CIPHER_SERVER_PREFERENCE` is not enabled. */ - const SSL_OP_PRIORITIZE_CHACHA: number; - /** Instructs OpenSSL to disable version rollback attack detection. */ - const SSL_OP_TLS_ROLLBACK_BUG: number; - const ENGINE_METHOD_RSA: number; - const ENGINE_METHOD_DSA: number; - const ENGINE_METHOD_DH: number; - const ENGINE_METHOD_RAND: number; - const ENGINE_METHOD_EC: number; - const ENGINE_METHOD_CIPHERS: number; - const ENGINE_METHOD_DIGESTS: number; - const ENGINE_METHOD_PKEY_METHS: number; - const ENGINE_METHOD_PKEY_ASN1_METHS: number; - const ENGINE_METHOD_ALL: number; - const ENGINE_METHOD_NONE: number; - const DH_CHECK_P_NOT_SAFE_PRIME: number; - const DH_CHECK_P_NOT_PRIME: number; - const DH_UNABLE_TO_CHECK_GENERATOR: number; - const DH_NOT_SUITABLE_GENERATOR: number; - const RSA_PKCS1_PADDING: number; - const RSA_SSLV23_PADDING: number; - const RSA_NO_PADDING: number; - const RSA_PKCS1_OAEP_PADDING: number; - const RSA_X931_PADDING: number; - const RSA_PKCS1_PSS_PADDING: number; - /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */ - const RSA_PSS_SALTLEN_DIGEST: number; - /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */ - const RSA_PSS_SALTLEN_MAX_SIGN: number; - /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */ - const RSA_PSS_SALTLEN_AUTO: number; - const POINT_CONVERSION_COMPRESSED: number; - const POINT_CONVERSION_UNCOMPRESSED: number; - const POINT_CONVERSION_HYBRID: number; - /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */ - const defaultCoreCipherList: string; - /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */ - const defaultCipherList: string; - } - interface HashOptions extends stream.TransformOptions { - /** - * For XOF hash functions such as `shake256`, the - * outputLength option can be used to specify the desired output length in bytes. - */ - outputLength?: number | undefined; - } - /** @deprecated since v10.0.0 */ - const fips: boolean; - /** - * Creates and returns a `Hash` object that can be used to generate hash digests - * using the given `algorithm`. Optional `options` argument controls stream - * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option - * can be used to specify the desired output length in bytes. - * - * The `algorithm` is dependent on the available algorithms supported by the - * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. - * On recent releases of OpenSSL, `openssl list -digest-algorithms` will - * display the available digest algorithms. - * - * Example: generating the sha256 sum of a file - * - * ```js - * import { - * createReadStream, - * } from 'node:fs'; - * import { argv } from 'node:process'; - * const { - * createHash, - * } = await import('node:crypto'); - * - * const filename = argv[2]; - * - * const hash = createHash('sha256'); - * - * const input = createReadStream(filename); - * input.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = input.read(); - * if (data) - * hash.update(data); - * else { - * console.log(`${hash.digest('hex')} ${filename}`); - * } - * }); - * ``` - * @since v0.1.92 - * @param options `stream.transform` options - */ - function createHash(algorithm: string, options?: HashOptions): Hash; - /** - * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`. - * Optional `options` argument controls stream behavior. - * - * The `algorithm` is dependent on the available algorithms supported by the - * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. - * On recent releases of OpenSSL, `openssl list -digest-algorithms` will - * display the available digest algorithms. - * - * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is - * a `KeyObject`, its type must be `secret`. If it is a string, please consider `caveats when using strings as inputs to cryptographic APIs`. If it was - * obtained from a cryptographically secure source of entropy, such as {@link randomBytes} or {@link generateKey}, its length should not - * exceed the block size of `algorithm` (e.g., 512 bits for SHA-256). - * - * Example: generating the sha256 HMAC of a file - * - * ```js - * import { - * createReadStream, - * } from 'node:fs'; - * import { argv } from 'node:process'; - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const filename = argv[2]; - * - * const hmac = createHmac('sha256', 'a secret'); - * - * const input = createReadStream(filename); - * input.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = input.read(); - * if (data) - * hmac.update(data); - * else { - * console.log(`${hmac.digest('hex')} ${filename}`); - * } - * }); - * ``` - * @since v0.1.94 - * @param options `stream.transform` options - */ - function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac; - // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings - type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary"; - type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1"; - type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2"; - type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding; - type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; - /** - * The `Hash` class is a utility for creating hash digests of data. It can be - * used in one of two ways: - * - * * As a `stream` that is both readable and writable, where data is written - * to produce a computed hash digest on the readable side, or - * * Using the `hash.update()` and `hash.digest()` methods to produce the - * computed hash. - * - * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword. - * - * Example: Using `Hash` objects as streams: - * - * ```js - * const { - * createHash, - * } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * hash.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = hash.read(); - * if (data) { - * console.log(data.toString('hex')); - * // Prints: - * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 - * } - * }); - * - * hash.write('some data to hash'); - * hash.end(); - * ``` - * - * Example: Using `Hash` and piped streams: - * - * ```js - * import { createReadStream } from 'node:fs'; - * import { stdout } from 'node:process'; - * const { createHash } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * const input = createReadStream('test.js'); - * input.pipe(hash).setEncoding('hex').pipe(stdout); - * ``` - * - * Example: Using the `hash.update()` and `hash.digest()` methods: - * - * ```js - * const { - * createHash, - * } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * hash.update('some data to hash'); - * console.log(hash.digest('hex')); - * // Prints: - * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 - * ``` - * @since v0.1.92 - */ - class Hash extends stream.Transform { - private constructor(); - /** - * Creates a new `Hash` object that contains a deep copy of the internal state - * of the current `Hash` object. - * - * The optional `options` argument controls stream behavior. For XOF hash - * functions such as `'shake256'`, the `outputLength` option can be used to - * specify the desired output length in bytes. - * - * An error is thrown when an attempt is made to copy the `Hash` object after - * its `hash.digest()` method has been called. - * - * ```js - * // Calculate a rolling hash. - * const { - * createHash, - * } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * hash.update('one'); - * console.log(hash.copy().digest('hex')); - * - * hash.update('two'); - * console.log(hash.copy().digest('hex')); - * - * hash.update('three'); - * console.log(hash.copy().digest('hex')); - * - * // Etc. - * ``` - * @since v13.1.0 - * @param options `stream.transform` options - */ - copy(options?: HashOptions): Hash; - /** - * Updates the hash content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `encoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.92 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): Hash; - update(data: string, inputEncoding: Encoding): Hash; - /** - * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method). - * If `encoding` is provided a string will be returned; otherwise - * a `Buffer` is returned. - * - * The `Hash` object can not be used again after `hash.digest()` method has been - * called. Multiple calls will cause an error to be thrown. - * @since v0.1.92 - * @param encoding The `encoding` of the return value. - */ - digest(): NonSharedBuffer; - digest(encoding: BinaryToTextEncoding): string; - } - /** - * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can - * be used in one of two ways: - * - * * As a `stream` that is both readable and writable, where data is written - * to produce a computed HMAC digest on the readable side, or - * * Using the `hmac.update()` and `hmac.digest()` methods to produce the - * computed HMAC digest. - * - * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword. - * - * Example: Using `Hmac` objects as streams: - * - * ```js - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const hmac = createHmac('sha256', 'a secret'); - * - * hmac.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = hmac.read(); - * if (data) { - * console.log(data.toString('hex')); - * // Prints: - * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e - * } - * }); - * - * hmac.write('some data to hash'); - * hmac.end(); - * ``` - * - * Example: Using `Hmac` and piped streams: - * - * ```js - * import { createReadStream } from 'node:fs'; - * import { stdout } from 'node:process'; - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const hmac = createHmac('sha256', 'a secret'); - * - * const input = createReadStream('test.js'); - * input.pipe(hmac).pipe(stdout); - * ``` - * - * Example: Using the `hmac.update()` and `hmac.digest()` methods: - * - * ```js - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const hmac = createHmac('sha256', 'a secret'); - * - * hmac.update('some data to hash'); - * console.log(hmac.digest('hex')); - * // Prints: - * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e - * ``` - * @since v0.1.94 - */ - class Hmac extends stream.Transform { - private constructor(); - /** - * Updates the `Hmac` content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `encoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.94 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): Hmac; - update(data: string, inputEncoding: Encoding): Hmac; - /** - * Calculates the HMAC digest of all of the data passed using `hmac.update()`. - * If `encoding` is - * provided a string is returned; otherwise a `Buffer` is returned; - * - * The `Hmac` object can not be used again after `hmac.digest()` has been - * called. Multiple calls to `hmac.digest()` will result in an error being thrown. - * @since v0.1.94 - * @param encoding The `encoding` of the return value. - */ - digest(): NonSharedBuffer; - digest(encoding: BinaryToTextEncoding): string; - } - type KeyFormat = "pem" | "der" | "jwk"; - type KeyObjectType = "secret" | "public" | "private"; - type PublicKeyExportType = "pkcs1" | "spki"; - type PrivateKeyExportType = "pkcs1" | "pkcs8" | "sec1"; - type KeyExportOptions = - | SymmetricKeyExportOptions - | PublicKeyExportOptions - | PrivateKeyExportOptions - | JwkKeyExportOptions; - interface SymmetricKeyExportOptions { - format?: "buffer" | undefined; - } - interface PublicKeyExportOptions { - type: T; - format: Exclude; - } - interface PrivateKeyExportOptions { - type: T; - format: Exclude; - cipher?: string | undefined; - passphrase?: string | Buffer | undefined; - } - interface JwkKeyExportOptions { - format: "jwk"; - } - interface KeyPairExportOptions< - TPublic extends PublicKeyExportType = PublicKeyExportType, - TPrivate extends PrivateKeyExportType = PrivateKeyExportType, - > { - publicKeyEncoding?: PublicKeyExportOptions | JwkKeyExportOptions | undefined; - privateKeyEncoding?: PrivateKeyExportOptions | JwkKeyExportOptions | undefined; - } - type KeyExportResult = T extends { format: infer F extends KeyFormat } - ? { der: NonSharedBuffer; jwk: webcrypto.JsonWebKey; pem: string }[F] - : Default; - interface KeyPairExportResult { - publicKey: KeyExportResult; - privateKey: KeyExportResult; - } - type KeyPairExportCallback = ( - err: Error | null, - publicKey: KeyExportResult, - privateKey: KeyExportResult, - ) => void; - type MLDSAKeyType = `ml-dsa-${44 | 65 | 87}`; - type MLKEMKeyType = `ml-kem-${1024 | 512 | 768}`; - type SLHDSAKeyType = `slh-dsa-${"sha2" | "shake"}-${128 | 192 | 256}${"f" | "s"}`; - type AsymmetricKeyType = - | "dh" - | "dsa" - | "ec" - | "ed25519" - | "ed448" - | MLDSAKeyType - | MLKEMKeyType - | "rsa-pss" - | "rsa" - | SLHDSAKeyType - | "x25519" - | "x448"; - interface AsymmetricKeyDetails { - /** - * Key size in bits (RSA, DSA). - */ - modulusLength?: number; - /** - * Public exponent (RSA). - */ - publicExponent?: bigint; - /** - * Name of the message digest (RSA-PSS). - */ - hashAlgorithm?: string; - /** - * Name of the message digest used by MGF1 (RSA-PSS). - */ - mgf1HashAlgorithm?: string; - /** - * Minimal salt length in bytes (RSA-PSS). - */ - saltLength?: number; - /** - * Size of q in bits (DSA). - */ - divisorLength?: number; - /** - * Name of the curve (EC). - */ - namedCurve?: string; - } - /** - * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key, - * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject` - * objects are not to be created directly using the `new`keyword. - * - * Most applications should consider using the new `KeyObject` API instead of - * passing keys as strings or `Buffer`s due to improved security features. - * - * `KeyObject` instances can be passed to other threads via `postMessage()`. - * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to - * be listed in the `transferList` argument. - * @since v11.6.0 - */ - class KeyObject { - private constructor(); - /** - * Example: Converting a `CryptoKey` instance to a `KeyObject`: - * - * ```js - * const { KeyObject } = await import('node:crypto'); - * const { subtle } = globalThis.crypto; - * - * const key = await subtle.generateKey({ - * name: 'HMAC', - * hash: 'SHA-256', - * length: 256, - * }, true, ['sign', 'verify']); - * - * const keyObject = KeyObject.from(key); - * console.log(keyObject.symmetricKeySize); - * // Prints: 32 (symmetric key size in bytes) - * ``` - * @since v15.0.0 - */ - static from(key: webcrypto.CryptoKey): KeyObject; - /** - * For asymmetric keys, this property represents the type of the key. See the - * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types). - * - * This property is `undefined` for unrecognized `KeyObject` types and symmetric - * keys. - * @since v11.6.0 - */ - asymmetricKeyType?: AsymmetricKeyType; - /** - * This property exists only on asymmetric keys. Depending on the type of the key, - * this object contains information about the key. None of the information obtained - * through this property can be used to uniquely identify a key or to compromise - * the security of the key. - * - * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence, - * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be - * set. - * - * Other key details might be exposed via this API using additional attributes. - * @since v15.7.0 - */ - asymmetricKeyDetails?: AsymmetricKeyDetails; - /** - * For symmetric keys, the following encoding options can be used: - * - * For public keys, the following encoding options can be used: - * - * For private keys, the following encoding options can be used: - * - * The result type depends on the selected encoding format, when PEM the - * result is a string, when DER it will be a buffer containing the data - * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object. - * - * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are - * ignored. - * - * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of - * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be - * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for - * encrypted private keys. Since PKCS#8 defines its own - * encryption mechanism, PEM-level encryption is not supported when encrypting - * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for - * PKCS#1 and SEC1 encryption. - * @since v11.6.0 - */ - export(options?: T): KeyExportResult; - /** - * Returns `true` or `false` depending on whether the keys have exactly the same - * type, value, and parameters. This method is not [constant time](https://en.wikipedia.org/wiki/Timing_attack). - * @since v17.7.0, v16.15.0 - * @param otherKeyObject A `KeyObject` with which to compare `keyObject`. - */ - equals(otherKeyObject: KeyObject): boolean; - /** - * For secret keys, this property represents the size of the key in bytes. This - * property is `undefined` for asymmetric keys. - * @since v11.6.0 - */ - symmetricKeySize?: number; - /** - * Converts a `KeyObject` instance to a `CryptoKey`. - * @since 22.10.0 - */ - toCryptoKey( - algorithm: - | webcrypto.AlgorithmIdentifier - | webcrypto.RsaHashedImportParams - | webcrypto.EcKeyImportParams - | webcrypto.HmacImportParams, - extractable: boolean, - keyUsages: readonly webcrypto.KeyUsage[], - ): webcrypto.CryptoKey; - /** - * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys - * or `'private'` for private (asymmetric) keys. - * @since v11.6.0 - */ - type: KeyObjectType; - } - type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm"; - type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm"; - type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb"; - type CipherChaCha20Poly1305Types = "chacha20-poly1305"; - type BinaryLike = string | NodeJS.ArrayBufferView; - type CipherKey = BinaryLike | KeyObject; - interface CipherCCMOptions extends stream.TransformOptions { - authTagLength: number; - } - interface CipherGCMOptions extends stream.TransformOptions { - authTagLength?: number | undefined; - } - interface CipherOCBOptions extends stream.TransformOptions { - authTagLength: number; - } - interface CipherChaCha20Poly1305Options extends stream.TransformOptions { - /** @default 16 */ - authTagLength?: number | undefined; - } - /** - * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and - * initialization vector (`iv`). - * - * The `options` argument controls stream behavior and is optional except when a - * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the - * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication - * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. - * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. - * - * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On - * recent OpenSSL releases, `openssl list -cipher-algorithms` will - * display the available cipher algorithms. - * - * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded - * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be - * a `KeyObject` of type `secret`. If the cipher does not need - * an initialization vector, `iv` may be `null`. - * - * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * Initialization vectors should be unpredictable and unique; ideally, they will be - * cryptographically random. They do not have to be secret: IVs are typically just - * added to ciphertext messages unencrypted. It may sound contradictory that - * something has to be unpredictable and unique, but does not have to be secret; - * remember that an attacker must not be able to predict ahead of time what a - * given IV will be. - * @since v0.1.94 - * @param options `stream.transform` options - */ - function createCipheriv( - algorithm: CipherCCMTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherCCMOptions, - ): CipherCCM; - function createCipheriv( - algorithm: CipherOCBTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherOCBOptions, - ): CipherOCB; - function createCipheriv( - algorithm: CipherGCMTypes, - key: CipherKey, - iv: BinaryLike, - options?: CipherGCMOptions, - ): CipherGCM; - function createCipheriv( - algorithm: CipherChaCha20Poly1305Types, - key: CipherKey, - iv: BinaryLike, - options?: CipherChaCha20Poly1305Options, - ): CipherChaCha20Poly1305; - function createCipheriv( - algorithm: string, - key: CipherKey, - iv: BinaryLike | null, - options?: stream.TransformOptions, - ): Cipheriv; - /** - * Instances of the `Cipheriv` class are used to encrypt data. The class can be - * used in one of two ways: - * - * * As a `stream` that is both readable and writable, where plain unencrypted - * data is written to produce encrypted data on the readable side, or - * * Using the `cipher.update()` and `cipher.final()` methods to produce - * the encrypted data. - * - * The {@link createCipheriv} method is - * used to create `Cipheriv` instances. `Cipheriv` objects are not to be created - * directly using the `new` keyword. - * - * Example: Using `Cipheriv` objects as streams: - * - * ```js - * const { - * scrypt, - * randomFill, - * createCipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * - * // First, we'll generate the key. The key length is dependent on the algorithm. - * // In this case for aes192, it is 24 bytes (192 bits). - * scrypt(password, 'salt', 24, (err, key) => { - * if (err) throw err; - * // Then, we'll generate a random initialization vector - * randomFill(new Uint8Array(16), (err, iv) => { - * if (err) throw err; - * - * // Once we have the key and iv, we can create and use the cipher... - * const cipher = createCipheriv(algorithm, key, iv); - * - * let encrypted = ''; - * cipher.setEncoding('hex'); - * - * cipher.on('data', (chunk) => encrypted += chunk); - * cipher.on('end', () => console.log(encrypted)); - * - * cipher.write('some clear text data'); - * cipher.end(); - * }); - * }); - * ``` - * - * Example: Using `Cipheriv` and piped streams: - * - * ```js - * import { - * createReadStream, - * createWriteStream, - * } from 'node:fs'; - * - * import { - * pipeline, - * } from 'node:stream'; - * - * const { - * scrypt, - * randomFill, - * createCipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * - * // First, we'll generate the key. The key length is dependent on the algorithm. - * // In this case for aes192, it is 24 bytes (192 bits). - * scrypt(password, 'salt', 24, (err, key) => { - * if (err) throw err; - * // Then, we'll generate a random initialization vector - * randomFill(new Uint8Array(16), (err, iv) => { - * if (err) throw err; - * - * const cipher = createCipheriv(algorithm, key, iv); - * - * const input = createReadStream('test.js'); - * const output = createWriteStream('test.enc'); - * - * pipeline(input, cipher, output, (err) => { - * if (err) throw err; - * }); - * }); - * }); - * ``` - * - * Example: Using the `cipher.update()` and `cipher.final()` methods: - * - * ```js - * const { - * scrypt, - * randomFill, - * createCipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * - * // First, we'll generate the key. The key length is dependent on the algorithm. - * // In this case for aes192, it is 24 bytes (192 bits). - * scrypt(password, 'salt', 24, (err, key) => { - * if (err) throw err; - * // Then, we'll generate a random initialization vector - * randomFill(new Uint8Array(16), (err, iv) => { - * if (err) throw err; - * - * const cipher = createCipheriv(algorithm, key, iv); - * - * let encrypted = cipher.update('some clear text data', 'utf8', 'hex'); - * encrypted += cipher.final('hex'); - * console.log(encrypted); - * }); - * }); - * ``` - * @since v0.1.94 - */ - class Cipheriv extends stream.Transform { - private constructor(); - /** - * Updates the cipher with `data`. If the `inputEncoding` argument is given, - * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or `DataView`. If `data` is a `Buffer`, - * `TypedArray`, or `DataView`, then `inputEncoding` is ignored. - * - * The `outputEncoding` specifies the output format of the enciphered - * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. - * - * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being - * thrown. - * @since v0.1.94 - * @param inputEncoding The `encoding` of the data. - * @param outputEncoding The `encoding` of the return value. - */ - update(data: BinaryLike): NonSharedBuffer; - update(data: string, inputEncoding: Encoding): NonSharedBuffer; - update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; - update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; - /** - * Once the `cipher.final()` method has been called, the `Cipheriv` object can no - * longer be used to encrypt data. Attempts to call `cipher.final()` more than - * once will result in an error being thrown. - * @since v0.1.94 - * @param outputEncoding The `encoding` of the return value. - * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. - */ - final(): NonSharedBuffer; - final(outputEncoding: BufferEncoding): string; - /** - * When using block encryption algorithms, the `Cipheriv` class will automatically - * add padding to the input data to the appropriate block size. To disable the - * default padding call `cipher.setAutoPadding(false)`. - * - * When `autoPadding` is `false`, the length of the entire input data must be a - * multiple of the cipher's block size or `cipher.final()` will throw an error. - * Disabling automatic padding is useful for non-standard padding, for instance - * using `0x0` instead of PKCS padding. - * - * The `cipher.setAutoPadding()` method must be called before `cipher.final()`. - * @since v0.7.1 - * @param [autoPadding=true] - * @return for method chaining. - */ - setAutoPadding(autoPadding?: boolean): this; - } - interface CipherCCM extends Cipheriv { - setAAD( - buffer: NodeJS.ArrayBufferView, - options: { - plaintextLength: number; - }, - ): this; - getAuthTag(): NonSharedBuffer; - } - interface CipherGCM extends Cipheriv { - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - getAuthTag(): NonSharedBuffer; - } - interface CipherOCB extends Cipheriv { - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - getAuthTag(): NonSharedBuffer; - } - interface CipherChaCha20Poly1305 extends Cipheriv { - setAAD( - buffer: NodeJS.ArrayBufferView, - options: { - plaintextLength: number; - }, - ): this; - getAuthTag(): NonSharedBuffer; - } - /** - * Creates and returns a `Decipheriv` object that uses the given `algorithm`, `key` and initialization vector (`iv`). - * - * The `options` argument controls stream behavior and is optional except when a - * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the `authTagLength` option is required and specifies the length of the - * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength` option is not required but can be used to restrict accepted authentication tags - * to those with the specified length. - * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. - * - * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On - * recent OpenSSL releases, `openssl list -cipher-algorithms` will - * display the available cipher algorithms. - * - * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded - * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be - * a `KeyObject` of type `secret`. If the cipher does not need - * an initialization vector, `iv` may be `null`. - * - * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * Initialization vectors should be unpredictable and unique; ideally, they will be - * cryptographically random. They do not have to be secret: IVs are typically just - * added to ciphertext messages unencrypted. It may sound contradictory that - * something has to be unpredictable and unique, but does not have to be secret; - * remember that an attacker must not be able to predict ahead of time what a given - * IV will be. - * @since v0.1.94 - * @param options `stream.transform` options - */ - function createDecipheriv( - algorithm: CipherCCMTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherCCMOptions, - ): DecipherCCM; - function createDecipheriv( - algorithm: CipherOCBTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherOCBOptions, - ): DecipherOCB; - function createDecipheriv( - algorithm: CipherGCMTypes, - key: CipherKey, - iv: BinaryLike, - options?: CipherGCMOptions, - ): DecipherGCM; - function createDecipheriv( - algorithm: CipherChaCha20Poly1305Types, - key: CipherKey, - iv: BinaryLike, - options?: CipherChaCha20Poly1305Options, - ): DecipherChaCha20Poly1305; - function createDecipheriv( - algorithm: string, - key: CipherKey, - iv: BinaryLike | null, - options?: stream.TransformOptions, - ): Decipheriv; - /** - * Instances of the `Decipheriv` class are used to decrypt data. The class can be - * used in one of two ways: - * - * * As a `stream` that is both readable and writable, where plain encrypted - * data is written to produce unencrypted data on the readable side, or - * * Using the `decipher.update()` and `decipher.final()` methods to - * produce the unencrypted data. - * - * The {@link createDecipheriv} method is - * used to create `Decipheriv` instances. `Decipheriv` objects are not to be created - * directly using the `new` keyword. - * - * Example: Using `Decipheriv` objects as streams: - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * scryptSync, - * createDecipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * // Key length is dependent on the algorithm. In this case for aes192, it is - * // 24 bytes (192 bits). - * // Use the async `crypto.scrypt()` instead. - * const key = scryptSync(password, 'salt', 24); - * // The IV is usually passed along with the ciphertext. - * const iv = Buffer.alloc(16, 0); // Initialization vector. - * - * const decipher = createDecipheriv(algorithm, key, iv); - * - * let decrypted = ''; - * decipher.on('readable', () => { - * let chunk; - * while (null !== (chunk = decipher.read())) { - * decrypted += chunk.toString('utf8'); - * } - * }); - * decipher.on('end', () => { - * console.log(decrypted); - * // Prints: some clear text data - * }); - * - * // Encrypted with same algorithm, key and iv. - * const encrypted = - * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; - * decipher.write(encrypted, 'hex'); - * decipher.end(); - * ``` - * - * Example: Using `Decipheriv` and piped streams: - * - * ```js - * import { - * createReadStream, - * createWriteStream, - * } from 'node:fs'; - * import { Buffer } from 'node:buffer'; - * const { - * scryptSync, - * createDecipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * // Use the async `crypto.scrypt()` instead. - * const key = scryptSync(password, 'salt', 24); - * // The IV is usually passed along with the ciphertext. - * const iv = Buffer.alloc(16, 0); // Initialization vector. - * - * const decipher = createDecipheriv(algorithm, key, iv); - * - * const input = createReadStream('test.enc'); - * const output = createWriteStream('test.js'); - * - * input.pipe(decipher).pipe(output); - * ``` - * - * Example: Using the `decipher.update()` and `decipher.final()` methods: - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * scryptSync, - * createDecipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * // Use the async `crypto.scrypt()` instead. - * const key = scryptSync(password, 'salt', 24); - * // The IV is usually passed along with the ciphertext. - * const iv = Buffer.alloc(16, 0); // Initialization vector. - * - * const decipher = createDecipheriv(algorithm, key, iv); - * - * // Encrypted using same algorithm, key and iv. - * const encrypted = - * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; - * let decrypted = decipher.update(encrypted, 'hex', 'utf8'); - * decrypted += decipher.final('utf8'); - * console.log(decrypted); - * // Prints: some clear text data - * ``` - * @since v0.1.94 - */ - class Decipheriv extends stream.Transform { - private constructor(); - /** - * Updates the decipher with `data`. If the `inputEncoding` argument is given, - * the `data` argument is a string using the specified encoding. If the `inputEncoding` argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is - * ignored. - * - * The `outputEncoding` specifies the output format of the enciphered - * data. If the `outputEncoding` is specified, a string using the specified encoding is returned. If no `outputEncoding` is provided, a `Buffer` is returned. - * - * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error - * being thrown. - * @since v0.1.94 - * @param inputEncoding The `encoding` of the `data` string. - * @param outputEncoding The `encoding` of the return value. - */ - update(data: NodeJS.ArrayBufferView): NonSharedBuffer; - update(data: string, inputEncoding: Encoding): NonSharedBuffer; - update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; - update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; - /** - * Once the `decipher.final()` method has been called, the `Decipheriv` object can - * no longer be used to decrypt data. Attempts to call `decipher.final()` more - * than once will result in an error being thrown. - * @since v0.1.94 - * @param outputEncoding The `encoding` of the return value. - * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. - */ - final(): NonSharedBuffer; - final(outputEncoding: BufferEncoding): string; - /** - * When data has been encrypted without standard block padding, calling `decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and - * removing padding. - * - * Turning auto padding off will only work if the input data's length is a - * multiple of the ciphers block size. - * - * The `decipher.setAutoPadding()` method must be called before `decipher.final()`. - * @since v0.7.1 - * @param [autoPadding=true] - * @return for method chaining. - */ - setAutoPadding(auto_padding?: boolean): this; - } - interface DecipherCCM extends Decipheriv { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options: { - plaintextLength: number; - }, - ): this; - } - interface DecipherGCM extends Decipheriv { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - } - interface DecipherOCB extends Decipheriv { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - } - interface DecipherChaCha20Poly1305 extends Decipheriv { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options: { - plaintextLength: number; - }, - ): this; - } - interface PrivateKeyInput { - key: string | Buffer; - format?: KeyFormat | undefined; - type?: PrivateKeyExportType | undefined; - passphrase?: string | Buffer | undefined; - encoding?: string | undefined; - } - interface PublicKeyInput { - key: string | Buffer; - format?: KeyFormat | undefined; - type?: PublicKeyExportType | undefined; - encoding?: string | undefined; - } - /** - * Asynchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`. - * - * ```js - * const { - * generateKey, - * } = await import('node:crypto'); - * - * generateKey('hmac', { length: 512 }, (err, key) => { - * if (err) throw err; - * console.log(key.export().toString('hex')); // 46e..........620 - * }); - * ``` - * - * The size of a generated HMAC key should not exceed the block size of the - * underlying hash function. See {@link createHmac} for more information. - * @since v15.0.0 - * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. - */ - function generateKey( - type: "hmac" | "aes", - options: { - length: number; - }, - callback: (err: Error | null, key: KeyObject) => void, - ): void; - /** - * Synchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`. - * - * ```js - * const { - * generateKeySync, - * } = await import('node:crypto'); - * - * const key = generateKeySync('hmac', { length: 512 }); - * console.log(key.export().toString('hex')); // e89..........41e - * ``` - * - * The size of a generated HMAC key should not exceed the block size of the - * underlying hash function. See {@link createHmac} for more information. - * @since v15.0.0 - * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. - */ - function generateKeySync( - type: "hmac" | "aes", - options: { - length: number; - }, - ): KeyObject; - interface JsonWebKeyInput { - key: webcrypto.JsonWebKey; - format: "jwk"; - } - /** - * Creates and returns a new key object containing a private key. If `key` is a - * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` must be an object with the properties described above. - * - * If the private key is encrypted, a `passphrase` must be specified. The length - * of the passphrase is limited to 1024 bytes. - * @since v11.6.0 - */ - function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject; - /** - * Creates and returns a new key object containing a public key. If `key` is a - * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject` with type `'private'`, the public key is derived from the given private key; - * otherwise, `key` must be an object with the properties described above. - * - * If the format is `'pem'`, the `'key'` may also be an X.509 certificate. - * - * Because public keys can be derived from private keys, a private key may be - * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the - * returned `KeyObject` will be `'public'` and that the private key cannot be - * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type `'private'` is given, a new `KeyObject` with type `'public'` will be returned - * and it will be impossible to extract the private key from the returned object. - * @since v11.6.0 - */ - function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject; - /** - * Creates and returns a new key object containing a secret key for symmetric - * encryption or `Hmac`. - * @since v11.6.0 - * @param encoding The string encoding when `key` is a string. - */ - function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject; - function createSecretKey(key: string, encoding: BufferEncoding): KeyObject; - /** - * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms. - * Optional `options` argument controls the `stream.Writable` behavior. - * - * In some cases, a `Sign` instance can be created using the name of a signature - * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use - * the corresponding digest algorithm. This does not work for all signature - * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest - * algorithm names. - * @since v0.1.92 - * @param options `stream.Writable` options - */ - // TODO: signing algorithm type - function createSign(algorithm: string, options?: stream.WritableOptions): Sign; - type DSAEncoding = "der" | "ieee-p1363"; - interface SigningOptions { - /** - * @see crypto.constants.RSA_PKCS1_PADDING - */ - padding?: number | undefined; - saltLength?: number | undefined; - dsaEncoding?: DSAEncoding | undefined; - context?: ArrayBuffer | NodeJS.ArrayBufferView | undefined; - } - interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {} - interface SignKeyObjectInput extends SigningOptions { - key: KeyObject; - } - interface SignJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} - interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {} - interface VerifyKeyObjectInput extends SigningOptions { - key: KeyObject; - } - interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} - type KeyLike = string | Buffer | KeyObject; - /** - * The `Sign` class is a utility for generating signatures. It can be used in one - * of two ways: - * - * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or - * * Using the `sign.update()` and `sign.sign()` methods to produce the - * signature. - * - * The {@link createSign} method is used to create `Sign` instances. The - * argument is the string name of the hash function to use. `Sign` objects are not - * to be created directly using the `new` keyword. - * - * Example: Using `Sign` and `Verify` objects as streams: - * - * ```js - * const { - * generateKeyPairSync, - * createSign, - * createVerify, - * } = await import('node:crypto'); - * - * const { privateKey, publicKey } = generateKeyPairSync('ec', { - * namedCurve: 'sect239k1', - * }); - * - * const sign = createSign('SHA256'); - * sign.write('some data to sign'); - * sign.end(); - * const signature = sign.sign(privateKey, 'hex'); - * - * const verify = createVerify('SHA256'); - * verify.write('some data to sign'); - * verify.end(); - * console.log(verify.verify(publicKey, signature, 'hex')); - * // Prints: true - * ``` - * - * Example: Using the `sign.update()` and `verify.update()` methods: - * - * ```js - * const { - * generateKeyPairSync, - * createSign, - * createVerify, - * } = await import('node:crypto'); - * - * const { privateKey, publicKey } = generateKeyPairSync('rsa', { - * modulusLength: 2048, - * }); - * - * const sign = createSign('SHA256'); - * sign.update('some data to sign'); - * sign.end(); - * const signature = sign.sign(privateKey); - * - * const verify = createVerify('SHA256'); - * verify.update('some data to sign'); - * verify.end(); - * console.log(verify.verify(publicKey, signature)); - * // Prints: true - * ``` - * @since v0.1.92 - */ - class Sign extends stream.Writable { - private constructor(); - /** - * Updates the `Sign` content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `encoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.92 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): this; - update(data: string, inputEncoding: Encoding): this; - /** - * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`. - * - * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an - * object, the following additional properties can be passed: - * - * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned. - * - * The `Sign` object can not be again used after `sign.sign()` method has been - * called. Multiple calls to `sign.sign()` will result in an error being thrown. - * @since v0.1.92 - */ - sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput): NonSharedBuffer; - sign( - privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, - outputFormat: BinaryToTextEncoding, - ): string; - } - /** - * Creates and returns a `Verify` object that uses the given algorithm. - * Use {@link getHashes} to obtain an array of names of the available - * signing algorithms. Optional `options` argument controls the `stream.Writable` behavior. - * - * In some cases, a `Verify` instance can be created using the name of a signature - * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use - * the corresponding digest algorithm. This does not work for all signature - * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest - * algorithm names. - * @since v0.1.92 - * @param options `stream.Writable` options - */ - function createVerify(algorithm: string, options?: stream.WritableOptions): Verify; - /** - * The `Verify` class is a utility for verifying signatures. It can be used in one - * of two ways: - * - * * As a writable `stream` where written data is used to validate against the - * supplied signature, or - * * Using the `verify.update()` and `verify.verify()` methods to verify - * the signature. - * - * The {@link createVerify} method is used to create `Verify` instances. `Verify` objects are not to be created directly using the `new` keyword. - * - * See `Sign` for examples. - * @since v0.1.92 - */ - class Verify extends stream.Writable { - private constructor(); - /** - * Updates the `Verify` content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `inputEncoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or `DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.92 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): Verify; - update(data: string, inputEncoding: Encoding): Verify; - /** - * Verifies the provided data using the given `object` and `signature`. - * - * If `object` is not a `KeyObject`, this function behaves as if `object` had been passed to {@link createPublicKey}. If it is an - * object, the following additional properties can be passed: - * - * The `signature` argument is the previously calculated signature for the data, in - * the `signatureEncoding`. - * If a `signatureEncoding` is specified, the `signature` is expected to be a - * string; otherwise `signature` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * The `verify` object can not be used again after `verify.verify()` has been - * called. Multiple calls to `verify.verify()` will result in an error being - * thrown. - * - * Because public keys can be derived from private keys, a private key may - * be passed instead of a public key. - * @since v0.1.92 - */ - verify( - object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: NodeJS.ArrayBufferView, - ): boolean; - verify( - object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: string, - signature_format?: BinaryToTextEncoding, - ): boolean; - } - /** - * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an - * optional specific `generator`. - * - * The `generator` argument can be a number, string, or `Buffer`. If `generator` is not specified, the value `2` is used. - * - * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise - * a `Buffer`, `TypedArray`, or `DataView` is expected. - * - * If `generatorEncoding` is specified, `generator` is expected to be a string; - * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected. - * @since v0.11.12 - * @param primeEncoding The `encoding` of the `prime` string. - * @param [generator=2] - * @param generatorEncoding The `encoding` of the `generator` string. - */ - function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman; - function createDiffieHellman( - prime: ArrayBuffer | NodeJS.ArrayBufferView, - generator?: number | ArrayBuffer | NodeJS.ArrayBufferView, - ): DiffieHellman; - function createDiffieHellman( - prime: ArrayBuffer | NodeJS.ArrayBufferView, - generator: string, - generatorEncoding: BinaryToTextEncoding, - ): DiffieHellman; - function createDiffieHellman( - prime: string, - primeEncoding: BinaryToTextEncoding, - generator?: number | ArrayBuffer | NodeJS.ArrayBufferView, - ): DiffieHellman; - function createDiffieHellman( - prime: string, - primeEncoding: BinaryToTextEncoding, - generator: string, - generatorEncoding: BinaryToTextEncoding, - ): DiffieHellman; - /** - * The `DiffieHellman` class is a utility for creating Diffie-Hellman key - * exchanges. - * - * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function. - * - * ```js - * import assert from 'node:assert'; - * - * const { - * createDiffieHellman, - * } = await import('node:crypto'); - * - * // Generate Alice's keys... - * const alice = createDiffieHellman(2048); - * const aliceKey = alice.generateKeys(); - * - * // Generate Bob's keys... - * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator()); - * const bobKey = bob.generateKeys(); - * - * // Exchange and generate the secret... - * const aliceSecret = alice.computeSecret(bobKey); - * const bobSecret = bob.computeSecret(aliceKey); - * - * // OK - * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); - * ``` - * @since v0.5.0 - */ - class DiffieHellman { - private constructor(); - /** - * Generates private and public Diffie-Hellman key values unless they have been - * generated or computed already, and returns - * the public key in the specified `encoding`. This key should be - * transferred to the other party. - * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. - * - * This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular, - * once a private key has been generated or set, calling this function only updates - * the public key but does not generate a new private key. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - generateKeys(): NonSharedBuffer; - generateKeys(encoding: BinaryToTextEncoding): string; - /** - * Computes the shared secret using `otherPublicKey` as the other - * party's public key and returns the computed shared secret. The supplied - * key is interpreted using the specified `inputEncoding`, and secret is - * encoded using specified `outputEncoding`. - * If the `inputEncoding` is not - * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned. - * @since v0.5.0 - * @param inputEncoding The `encoding` of an `otherPublicKey` string. - * @param outputEncoding The `encoding` of the return value. - */ - computeSecret( - otherPublicKey: NodeJS.ArrayBufferView, - inputEncoding?: null, - outputEncoding?: null, - ): NonSharedBuffer; - computeSecret( - otherPublicKey: string, - inputEncoding: BinaryToTextEncoding, - outputEncoding?: null, - ): NonSharedBuffer; - computeSecret( - otherPublicKey: NodeJS.ArrayBufferView, - inputEncoding: null, - outputEncoding: BinaryToTextEncoding, - ): string; - computeSecret( - otherPublicKey: string, - inputEncoding: BinaryToTextEncoding, - outputEncoding: BinaryToTextEncoding, - ): string; - /** - * Returns the Diffie-Hellman prime in the specified `encoding`. - * If `encoding` is provided a string is - * returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getPrime(): NonSharedBuffer; - getPrime(encoding: BinaryToTextEncoding): string; - /** - * Returns the Diffie-Hellman generator in the specified `encoding`. - * If `encoding` is provided a string is - * returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getGenerator(): NonSharedBuffer; - getGenerator(encoding: BinaryToTextEncoding): string; - /** - * Returns the Diffie-Hellman public key in the specified `encoding`. - * If `encoding` is provided a - * string is returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getPublicKey(): NonSharedBuffer; - getPublicKey(encoding: BinaryToTextEncoding): string; - /** - * Returns the Diffie-Hellman private key in the specified `encoding`. - * If `encoding` is provided a - * string is returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getPrivateKey(): NonSharedBuffer; - getPrivateKey(encoding: BinaryToTextEncoding): string; - /** - * Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected - * to be a string. If no `encoding` is provided, `publicKey` is expected - * to be a `Buffer`, `TypedArray`, or `DataView`. - * @since v0.5.0 - * @param encoding The `encoding` of the `publicKey` string. - */ - setPublicKey(publicKey: NodeJS.ArrayBufferView): void; - setPublicKey(publicKey: string, encoding: BufferEncoding): void; - /** - * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected - * to be a string. If no `encoding` is provided, `privateKey` is expected - * to be a `Buffer`, `TypedArray`, or `DataView`. - * - * This function does not automatically compute the associated public key. Either `diffieHellman.setPublicKey()` or `diffieHellman.generateKeys()` can be - * used to manually provide the public key or to automatically derive it. - * @since v0.5.0 - * @param encoding The `encoding` of the `privateKey` string. - */ - setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; - setPrivateKey(privateKey: string, encoding: BufferEncoding): void; - /** - * A bit field containing any warnings and/or errors resulting from a check - * performed during initialization of the `DiffieHellman` object. - * - * The following values are valid for this property (as defined in `node:constants` module): - * - * * `DH_CHECK_P_NOT_SAFE_PRIME` - * * `DH_CHECK_P_NOT_PRIME` - * * `DH_UNABLE_TO_CHECK_GENERATOR` - * * `DH_NOT_SUITABLE_GENERATOR` - * @since v0.11.12 - */ - verifyError: number; - } - /** - * The `DiffieHellmanGroup` class takes a well-known modp group as its argument. - * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation. - * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods. - * - * ```js - * const { createDiffieHellmanGroup } = await import('node:crypto'); - * const dh = createDiffieHellmanGroup('modp1'); - * ``` - * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt): - * ```bash - * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h - * modp1 # 768 bits - * modp2 # 1024 bits - * modp5 # 1536 bits - * modp14 # 2048 bits - * modp15 # etc. - * modp16 - * modp17 - * modp18 - * ``` - * @since v0.7.5 - */ - const DiffieHellmanGroup: DiffieHellmanGroupConstructor; - interface DiffieHellmanGroupConstructor { - new(name: string): DiffieHellmanGroup; - (name: string): DiffieHellmanGroup; - readonly prototype: DiffieHellmanGroup; - } - type DiffieHellmanGroup = Omit; - /** - * Creates a predefined `DiffieHellmanGroup` key exchange object. The - * supported groups are listed in the documentation for `DiffieHellmanGroup`. - * - * The returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing - * the keys (with `diffieHellman.setPublicKey()`, for example). The - * advantage of using this method is that the parties do not have to - * generate nor exchange a group modulus beforehand, saving both processor - * and communication time. - * - * Example (obtaining a shared secret): - * - * ```js - * const { - * getDiffieHellman, - * } = await import('node:crypto'); - * const alice = getDiffieHellman('modp14'); - * const bob = getDiffieHellman('modp14'); - * - * alice.generateKeys(); - * bob.generateKeys(); - * - * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); - * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); - * - * // aliceSecret and bobSecret should be the same - * console.log(aliceSecret === bobSecret); - * ``` - * @since v0.7.5 - */ - function getDiffieHellman(groupName: string): DiffieHellmanGroup; - /** - * An alias for {@link getDiffieHellman} - * @since v0.9.3 - */ - function createDiffieHellmanGroup(name: string): DiffieHellmanGroup; - /** - * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) - * implementation. A selected HMAC digest algorithm specified by `digest` is - * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`. - * - * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an error occurs while deriving the key, `err` will be set; - * otherwise `err` will be `null`. By default, the successfully generated `derivedKey` will be passed to the callback as a `Buffer`. An error will be - * thrown if any of the input arguments specify invalid values or types. - * - * The `iterations` argument must be a number set as high as possible. The - * higher the number of iterations, the more secure the derived key will be, - * but will take a longer amount of time to complete. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * ```js - * const { - * pbkdf2, - * } = await import('node:crypto'); - * - * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => { - * if (err) throw err; - * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' - * }); - * ``` - * - * An array of supported digest functions can be retrieved using {@link getHashes}. - * - * This API uses libuv's threadpool, which can have surprising and - * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. - * @since v0.5.5 - */ - function pbkdf2( - password: BinaryLike, - salt: BinaryLike, - iterations: number, - keylen: number, - digest: string, - callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, - ): void; - /** - * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2) - * implementation. A selected HMAC digest algorithm specified by `digest` is - * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`. - * - * If an error occurs an `Error` will be thrown, otherwise the derived key will be - * returned as a `Buffer`. - * - * The `iterations` argument must be a number set as high as possible. The - * higher the number of iterations, the more secure the derived key will be, - * but will take a longer amount of time to complete. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * ```js - * const { - * pbkdf2Sync, - * } = await import('node:crypto'); - * - * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512'); - * console.log(key.toString('hex')); // '3745e48...08d59ae' - * ``` - * - * An array of supported digest functions can be retrieved using {@link getHashes}. - * @since v0.9.3 - */ - function pbkdf2Sync( - password: BinaryLike, - salt: BinaryLike, - iterations: number, - keylen: number, - digest: string, - ): NonSharedBuffer; - /** - * Generates cryptographically strong pseudorandom data. The `size` argument - * is a number indicating the number of bytes to generate. - * - * If a `callback` function is provided, the bytes are generated asynchronously - * and the `callback` function is invoked with two arguments: `err` and `buf`. - * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The `buf` argument is a `Buffer` containing the generated bytes. - * - * ```js - * // Asynchronous - * const { - * randomBytes, - * } = await import('node:crypto'); - * - * randomBytes(256, (err, buf) => { - * if (err) throw err; - * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`); - * }); - * ``` - * - * If the `callback` function is not provided, the random bytes are generated - * synchronously and returned as a `Buffer`. An error will be thrown if - * there is a problem generating the bytes. - * - * ```js - * // Synchronous - * const { - * randomBytes, - * } = await import('node:crypto'); - * - * const buf = randomBytes(256); - * console.log( - * `${buf.length} bytes of random data: ${buf.toString('hex')}`); - * ``` - * - * The `crypto.randomBytes()` method will not complete until there is - * sufficient entropy available. - * This should normally never take longer than a few milliseconds. The only time - * when generating the random bytes may conceivably block for a longer period of - * time is right after boot, when the whole system is still low on entropy. - * - * This API uses libuv's threadpool, which can have surprising and - * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. - * - * The asynchronous version of `crypto.randomBytes()` is carried out in a single - * threadpool request. To minimize threadpool task length variation, partition - * large `randomBytes` requests when doing so as part of fulfilling a client - * request. - * @since v0.5.8 - * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`. - * @return if the `callback` function is not provided. - */ - function randomBytes(size: number): NonSharedBuffer; - function randomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void; - function pseudoRandomBytes(size: number): NonSharedBuffer; - function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void; - /** - * Return a random integer `n` such that `min <= n < max`. This - * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias). - * - * The range (`max - min`) must be less than 2**48. `min` and `max` must - * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). - * - * If the `callback` function is not provided, the random integer is - * generated synchronously. - * - * ```js - * // Asynchronous - * const { - * randomInt, - * } = await import('node:crypto'); - * - * randomInt(3, (err, n) => { - * if (err) throw err; - * console.log(`Random number chosen from (0, 1, 2): ${n}`); - * }); - * ``` - * - * ```js - * // Synchronous - * const { - * randomInt, - * } = await import('node:crypto'); - * - * const n = randomInt(3); - * console.log(`Random number chosen from (0, 1, 2): ${n}`); - * ``` - * - * ```js - * // With `min` argument - * const { - * randomInt, - * } = await import('node:crypto'); - * - * const n = randomInt(1, 7); - * console.log(`The dice rolled: ${n}`); - * ``` - * @since v14.10.0, v12.19.0 - * @param [min=0] Start of random range (inclusive). - * @param max End of random range (exclusive). - * @param callback `function(err, n) {}`. - */ - function randomInt(max: number): number; - function randomInt(min: number, max: number): number; - function randomInt(max: number, callback: (err: Error | null, value: number) => void): void; - function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void; - /** - * Synchronous version of {@link randomFill}. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFillSync } = await import('node:crypto'); - * - * const buf = Buffer.alloc(10); - * console.log(randomFillSync(buf).toString('hex')); - * - * randomFillSync(buf, 5); - * console.log(buf.toString('hex')); - * - * // The above is equivalent to the following: - * randomFillSync(buf, 5, 5); - * console.log(buf.toString('hex')); - * ``` - * - * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFillSync } = await import('node:crypto'); - * - * const a = new Uint32Array(10); - * console.log(Buffer.from(randomFillSync(a).buffer, - * a.byteOffset, a.byteLength).toString('hex')); - * - * const b = new DataView(new ArrayBuffer(10)); - * console.log(Buffer.from(randomFillSync(b).buffer, - * b.byteOffset, b.byteLength).toString('hex')); - * - * const c = new ArrayBuffer(10); - * console.log(Buffer.from(randomFillSync(c)).toString('hex')); - * ``` - * @since v7.10.0, v6.13.0 - * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. - * @param [offset=0] - * @param [size=buffer.length - offset] - * @return The object passed as `buffer` argument. - */ - function randomFillSync(buffer: T, offset?: number, size?: number): T; - /** - * This function is similar to {@link randomBytes} but requires the first - * argument to be a `Buffer` that will be filled. It also - * requires that a callback is passed in. - * - * If the `callback` function is not provided, an error will be thrown. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFill } = await import('node:crypto'); - * - * const buf = Buffer.alloc(10); - * randomFill(buf, (err, buf) => { - * if (err) throw err; - * console.log(buf.toString('hex')); - * }); - * - * randomFill(buf, 5, (err, buf) => { - * if (err) throw err; - * console.log(buf.toString('hex')); - * }); - * - * // The above is equivalent to the following: - * randomFill(buf, 5, 5, (err, buf) => { - * if (err) throw err; - * console.log(buf.toString('hex')); - * }); - * ``` - * - * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as `buffer`. - * - * While this includes instances of `Float32Array` and `Float64Array`, this - * function should not be used to generate random floating-point numbers. The - * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array - * contains finite numbers only, they are not drawn from a uniform random - * distribution and have no meaningful lower or upper bounds. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFill } = await import('node:crypto'); - * - * const a = new Uint32Array(10); - * randomFill(a, (err, buf) => { - * if (err) throw err; - * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) - * .toString('hex')); - * }); - * - * const b = new DataView(new ArrayBuffer(10)); - * randomFill(b, (err, buf) => { - * if (err) throw err; - * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) - * .toString('hex')); - * }); - * - * const c = new ArrayBuffer(10); - * randomFill(c, (err, buf) => { - * if (err) throw err; - * console.log(Buffer.from(buf).toString('hex')); - * }); - * ``` - * - * This API uses libuv's threadpool, which can have surprising and - * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. - * - * The asynchronous version of `crypto.randomFill()` is carried out in a single - * threadpool request. To minimize threadpool task length variation, partition - * large `randomFill` requests when doing so as part of fulfilling a client - * request. - * @since v7.10.0, v6.13.0 - * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. - * @param [offset=0] - * @param [size=buffer.length - offset] - * @param callback `function(err, buf) {}`. - */ - function randomFill( - buffer: T, - callback: (err: Error | null, buf: T) => void, - ): void; - function randomFill( - buffer: T, - offset: number, - callback: (err: Error | null, buf: T) => void, - ): void; - function randomFill( - buffer: T, - offset: number, - size: number, - callback: (err: Error | null, buf: T) => void, - ): void; - interface ScryptOptions { - cost?: number | undefined; - blockSize?: number | undefined; - parallelization?: number | undefined; - N?: number | undefined; - r?: number | undefined; - p?: number | undefined; - maxmem?: number | undefined; - } - /** - * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based - * key derivation function that is designed to be expensive computationally and - * memory-wise in order to make brute-force attacks unrewarding. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * The `callback` function is called with two arguments: `err` and `derivedKey`. `err` is an exception object when key derivation fails, otherwise `err` is `null`. `derivedKey` is passed to the - * callback as a `Buffer`. - * - * An exception is thrown when any of the input arguments specify invalid values - * or types. - * - * ```js - * const { - * scrypt, - * } = await import('node:crypto'); - * - * // Using the factory defaults. - * scrypt('password', 'salt', 64, (err, derivedKey) => { - * if (err) throw err; - * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' - * }); - * // Using a custom N parameter. Must be a power of two. - * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => { - * if (err) throw err; - * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34' - * }); - * ``` - * @since v10.5.0 - */ - function scrypt( - password: BinaryLike, - salt: BinaryLike, - keylen: number, - callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, - ): void; - function scrypt( - password: BinaryLike, - salt: BinaryLike, - keylen: number, - options: ScryptOptions, - callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, - ): void; - /** - * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based - * key derivation function that is designed to be expensive computationally and - * memory-wise in order to make brute-force attacks unrewarding. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * An exception is thrown when key derivation fails, otherwise the derived key is - * returned as a `Buffer`. - * - * An exception is thrown when any of the input arguments specify invalid values - * or types. - * - * ```js - * const { - * scryptSync, - * } = await import('node:crypto'); - * // Using the factory defaults. - * - * const key1 = scryptSync('password', 'salt', 64); - * console.log(key1.toString('hex')); // '3745e48...08d59ae' - * // Using a custom N parameter. Must be a power of two. - * const key2 = scryptSync('password', 'salt', 64, { N: 1024 }); - * console.log(key2.toString('hex')); // '3745e48...aa39b34' - * ``` - * @since v10.5.0 - */ - function scryptSync( - password: BinaryLike, - salt: BinaryLike, - keylen: number, - options?: ScryptOptions, - ): NonSharedBuffer; - interface RsaPublicKey { - key: KeyLike; - padding?: number | undefined; - } - interface RsaPrivateKey { - key: KeyLike; - passphrase?: string | undefined; - /** - * @default 'sha1' - */ - oaepHash?: string | undefined; - oaepLabel?: NodeJS.TypedArray | undefined; - padding?: number | undefined; - } - /** - * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using - * the corresponding private key, for example using {@link privateDecrypt}. - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. - * - * Because RSA public keys can be derived from private keys, a private key may - * be passed instead of a public key. - * @since v0.11.14 - */ - function publicEncrypt( - key: RsaPublicKey | RsaPrivateKey | KeyLike, - buffer: NodeJS.ArrayBufferView | string, - ): NonSharedBuffer; - /** - * Decrypts `buffer` with `key`.`buffer` was previously encrypted using - * the corresponding private key, for example using {@link privateEncrypt}. - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. - * - * Because RSA public keys can be derived from private keys, a private key may - * be passed instead of a public key. - * @since v1.1.0 - */ - function publicDecrypt( - key: RsaPublicKey | RsaPrivateKey | KeyLike, - buffer: NodeJS.ArrayBufferView | string, - ): NonSharedBuffer; - /** - * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using - * the corresponding public key, for example using {@link publicEncrypt}. - * - * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. - * @since v0.11.14 - */ - function privateDecrypt( - privateKey: RsaPrivateKey | KeyLike, - buffer: NodeJS.ArrayBufferView | string, - ): NonSharedBuffer; - /** - * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using - * the corresponding public key, for example using {@link publicDecrypt}. - * - * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. - * @since v1.1.0 - */ - function privateEncrypt( - privateKey: RsaPrivateKey | KeyLike, - buffer: NodeJS.ArrayBufferView | string, - ): NonSharedBuffer; - /** - * ```js - * const { - * getCiphers, - * } = await import('node:crypto'); - * - * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...] - * ``` - * @since v0.9.3 - * @return An array with the names of the supported cipher algorithms. - */ - function getCiphers(): string[]; - /** - * ```js - * const { - * getCurves, - * } = await import('node:crypto'); - * - * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...] - * ``` - * @since v2.3.0 - * @return An array with the names of the supported elliptic curves. - */ - function getCurves(): string[]; - /** - * @since v10.0.0 - * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}. - */ - function getFips(): 1 | 0; - /** - * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. - * Throws an error if FIPS mode is not available. - * @since v10.0.0 - * @param bool `true` to enable FIPS mode. - */ - function setFips(bool: boolean): void; - /** - * ```js - * const { - * getHashes, - * } = await import('node:crypto'); - * - * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...] - * ``` - * @since v0.9.3 - * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms. - */ - function getHashes(): string[]; - /** - * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH) - * key exchanges. - * - * Instances of the `ECDH` class can be created using the {@link createECDH} function. - * - * ```js - * import assert from 'node:assert'; - * - * const { - * createECDH, - * } = await import('node:crypto'); - * - * // Generate Alice's keys... - * const alice = createECDH('secp521r1'); - * const aliceKey = alice.generateKeys(); - * - * // Generate Bob's keys... - * const bob = createECDH('secp521r1'); - * const bobKey = bob.generateKeys(); - * - * // Exchange and generate the secret... - * const aliceSecret = alice.computeSecret(bobKey); - * const bobSecret = bob.computeSecret(aliceKey); - * - * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); - * // OK - * ``` - * @since v0.11.14 - */ - class ECDH { - private constructor(); - /** - * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the - * format specified by `format`. The `format` argument specifies point encoding - * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is - * interpreted using the specified `inputEncoding`, and the returned key is encoded - * using the specified `outputEncoding`. - * - * Use {@link getCurves} to obtain a list of available curve names. - * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display - * the name and description of each available elliptic curve. - * - * If `format` is not specified the point will be returned in `'uncompressed'` format. - * - * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * Example (uncompressing a key): - * - * ```js - * const { - * createECDH, - * ECDH, - * } = await import('node:crypto'); - * - * const ecdh = createECDH('secp256k1'); - * ecdh.generateKeys(); - * - * const compressedKey = ecdh.getPublicKey('hex', 'compressed'); - * - * const uncompressedKey = ECDH.convertKey(compressedKey, - * 'secp256k1', - * 'hex', - * 'hex', - * 'uncompressed'); - * - * // The converted key and the uncompressed public key should be the same - * console.log(uncompressedKey === ecdh.getPublicKey('hex')); - * ``` - * @since v10.0.0 - * @param inputEncoding The `encoding` of the `key` string. - * @param outputEncoding The `encoding` of the return value. - * @param [format='uncompressed'] - */ - static convertKey( - key: BinaryLike, - curve: string, - inputEncoding?: BinaryToTextEncoding, - outputEncoding?: "latin1" | "hex" | "base64" | "base64url", - format?: "uncompressed" | "compressed" | "hybrid", - ): NonSharedBuffer | string; - /** - * Generates private and public EC Diffie-Hellman key values, and returns - * the public key in the specified `format` and `encoding`. This key should be - * transferred to the other party. - * - * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format. - * - * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. - * @since v0.11.14 - * @param encoding The `encoding` of the return value. - * @param [format='uncompressed'] - */ - generateKeys(): NonSharedBuffer; - generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; - /** - * Computes the shared secret using `otherPublicKey` as the other - * party's public key and returns the computed shared secret. The supplied - * key is interpreted using specified `inputEncoding`, and the returned secret - * is encoded using the specified `outputEncoding`. - * If the `inputEncoding` is not - * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned. - * - * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey` lies outside of the elliptic curve. Since `otherPublicKey` is - * usually supplied from a remote user over an insecure network, - * be sure to handle this exception accordingly. - * @since v0.11.14 - * @param inputEncoding The `encoding` of the `otherPublicKey` string. - * @param outputEncoding The `encoding` of the return value. - */ - computeSecret(otherPublicKey: NodeJS.ArrayBufferView): NonSharedBuffer; - computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): NonSharedBuffer; - computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string; - computeSecret( - otherPublicKey: string, - inputEncoding: BinaryToTextEncoding, - outputEncoding: BinaryToTextEncoding, - ): string; - /** - * If `encoding` is specified, a string is returned; otherwise a `Buffer` is - * returned. - * @since v0.11.14 - * @param encoding The `encoding` of the return value. - * @return The EC Diffie-Hellman in the specified `encoding`. - */ - getPrivateKey(): NonSharedBuffer; - getPrivateKey(encoding: BinaryToTextEncoding): string; - /** - * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format. - * - * If `encoding` is specified, a string is returned; otherwise a `Buffer` is - * returned. - * @since v0.11.14 - * @param encoding The `encoding` of the return value. - * @param [format='uncompressed'] - * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`. - */ - getPublicKey(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer; - getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; - /** - * Sets the EC Diffie-Hellman private key. - * If `encoding` is provided, `privateKey` is expected - * to be a string; otherwise `privateKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * If `privateKey` is not valid for the curve specified when the `ECDH` object was - * created, an error is thrown. Upon setting the private key, the associated - * public point (key) is also generated and set in the `ECDH` object. - * @since v0.11.14 - * @param encoding The `encoding` of the `privateKey` string. - */ - setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; - setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void; - } - /** - * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a - * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent - * OpenSSL releases, `openssl ecparam -list_curves` will also display the name - * and description of each available elliptic curve. - * @since v0.11.14 - */ - function createECDH(curveName: string): ECDH; - /** - * This function compares the underlying bytes that represent the given `ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time - * algorithm. - * - * This function does not leak timing information that - * would allow an attacker to guess one of the values. This is suitable for - * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/). - * - * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they - * must have the same byte length. An error is thrown if `a` and `b` have - * different byte lengths. - * - * If at least one of `a` and `b` is a `TypedArray` with more than one byte per - * entry, such as `Uint16Array`, the result will be computed using the platform - * byte order. - * - * **When both of the inputs are `Float32Array`s or `Float64Array`s, this function might return unexpected results due to IEEE 754** - * **encoding of floating-point numbers. In particular, neither `x === y` nor `Object.is(x, y)` implies that the byte representations of two floating-point** - * **numbers `x` and `y` are equal.** - * - * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code - * is timing-safe. Care should be taken to ensure that the surrounding code does - * not introduce timing vulnerabilities. - * @since v6.6.0 - */ - function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean; - interface DHKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { - /** - * The prime parameter - */ - prime?: Buffer | undefined; - /** - * Prime length in bits - */ - primeLength?: number | undefined; - /** - * Custom generator - * @default 2 - */ - generator?: number | undefined; - /** - * Diffie-Hellman group name - * @see {@link getDiffieHellman} - */ - groupName?: string | undefined; - } - interface DSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Size of q in bits - */ - divisorLength: number; - } - interface ECKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8" | "sec1"> { - /** - * Name of the curve to use - */ - namedCurve: string; - /** - * Must be `'named'` or `'explicit'` - * @default 'named' - */ - paramEncoding?: "explicit" | "named" | undefined; - } - interface ED25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} - interface ED448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} - interface MLDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} - interface MLKEMKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} - interface RSAPSSKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Public exponent - * @default 0x10001 - */ - publicExponent?: number | undefined; - /** - * Name of the message digest - */ - hashAlgorithm?: string | undefined; - /** - * Name of the message digest used by MGF1 - */ - mgf1HashAlgorithm?: string | undefined; - /** - * Minimal salt length in bytes - */ - saltLength?: string | undefined; - } - interface RSAKeyPairOptions extends KeyPairExportOptions<"pkcs1" | "spki", "pkcs1" | "pkcs8"> { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Public exponent - * @default 0x10001 - */ - publicExponent?: number | undefined; - } - interface SLHDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} - interface X25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} - interface X448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} - /** - * Generates a new asymmetric key pair of the given `type`. See the - * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types). - * - * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function - * behaves as if `keyObject.export()` had been called on its result. Otherwise, - * the respective part of the key is returned as a `KeyObject`. - * - * When encoding public keys, it is recommended to use `'spki'`. When encoding - * private keys, it is recommended to use `'pkcs8'` with a strong passphrase, - * and to keep the passphrase confidential. - * - * ```js - * const { - * generateKeyPairSync, - * } = await import('node:crypto'); - * - * const { - * publicKey, - * privateKey, - * } = generateKeyPairSync('rsa', { - * modulusLength: 4096, - * publicKeyEncoding: { - * type: 'spki', - * format: 'pem', - * }, - * privateKeyEncoding: { - * type: 'pkcs8', - * format: 'pem', - * cipher: 'aes-256-cbc', - * passphrase: 'top secret', - * }, - * }); - * ``` - * - * The return value `{ publicKey, privateKey }` represents the generated key pair. - * When PEM encoding was selected, the respective key will be a string, otherwise - * it will be a buffer containing the data encoded as DER. - * @since v10.12.0 - * @param type The asymmetric key type to generate. See the - * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types). - */ - function generateKeyPairSync( - type: "dh", - options: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "dsa", - options: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "ec", - options: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "ed25519", - options?: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "ed448", - options?: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: MLDSAKeyType, - options?: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: MLKEMKeyType, - options?: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "rsa-pss", - options: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "rsa", - options: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: SLHDSAKeyType, - options?: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "x25519", - options?: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "x448", - options?: T, - ): KeyPairExportResult; - /** - * Generates a new asymmetric key pair of the given `type`. See the - * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types). - * - * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function - * behaves as if `keyObject.export()` had been called on its result. Otherwise, - * the respective part of the key is returned as a `KeyObject`. - * - * It is recommended to encode public keys as `'spki'` and private keys as `'pkcs8'` with encryption for long-term storage: - * - * ```js - * const { - * generateKeyPair, - * } = await import('node:crypto'); - * - * generateKeyPair('rsa', { - * modulusLength: 4096, - * publicKeyEncoding: { - * type: 'spki', - * format: 'pem', - * }, - * privateKeyEncoding: { - * type: 'pkcs8', - * format: 'pem', - * cipher: 'aes-256-cbc', - * passphrase: 'top secret', - * }, - * }, (err, publicKey, privateKey) => { - * // Handle errors and use the generated key pair. - * }); - * ``` - * - * On completion, `callback` will be called with `err` set to `undefined` and `publicKey` / `privateKey` representing the generated key pair. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a `Promise` for an `Object` with `publicKey` and `privateKey` properties. - * @since v10.12.0 - * @param type The asymmetric key type to generate. See the - * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types). - */ - function generateKeyPair( - type: "dh", - options: T, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "dsa", - options: T, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "ec", - options: T, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "ed25519", - options: T | undefined, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "ed448", - options: T | undefined, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: MLDSAKeyType, - options: T | undefined, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: MLKEMKeyType, - options: T | undefined, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "rsa-pss", - options: T, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "rsa", - options: T, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: SLHDSAKeyType, - options: T | undefined, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "x25519", - options: T | undefined, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "x448", - options: T | undefined, - callback: KeyPairExportCallback, - ): void; - namespace generateKeyPair { - function __promisify__( - type: "dh", - options: T, - ): Promise>; - function __promisify__( - type: "dsa", - options: T, - ): Promise>; - function __promisify__( - type: "ec", - options: T, - ): Promise>; - function __promisify__( - type: "ed25519", - options?: T, - ): Promise>; - function __promisify__( - type: "ed448", - options?: T, - ): Promise>; - function __promisify__( - type: MLDSAKeyType, - options?: T, - ): Promise>; - function __promisify__( - type: MLKEMKeyType, - options?: T, - ): Promise>; - function __promisify__( - type: "rsa-pss", - options: T, - ): Promise>; - function __promisify__( - type: "rsa", - options: T, - ): Promise>; - function __promisify__( - type: SLHDSAKeyType, - options?: T, - ): Promise>; - function __promisify__( - type: "x25519", - options?: T, - ): Promise>; - function __promisify__( - type: "x448", - options?: T, - ): Promise>; - } - /** - * Calculates and returns the signature for `data` using the given private key and - * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is - * dependent upon the key type. - * - * `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and - * ML-DSA. - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been - * passed to {@link createPrivateKey}. If it is an object, the following - * additional properties can be passed: - * - * If the `callback` function is provided this function uses libuv's threadpool. - * @since v12.0.0 - */ - function sign( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, - ): NonSharedBuffer; - function sign( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, - callback: (error: Error | null, data: NonSharedBuffer) => void, - ): void; - /** - * Verifies the given signature for `data` using the given key and algorithm. If - * `algorithm` is `null` or `undefined`, then the algorithm is dependent upon the - * key type. - * - * `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and - * ML-DSA. - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been - * passed to {@link createPublicKey}. If it is an object, the following - * additional properties can be passed: - * - * The `signature` argument is the previously calculated signature for the `data`. - * - * Because public keys can be derived from private keys, a private key or a public - * key may be passed for `key`. - * - * If the `callback` function is provided this function uses libuv's threadpool. - * @since v12.0.0 - */ - function verify( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: NodeJS.ArrayBufferView, - ): boolean; - function verify( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: NodeJS.ArrayBufferView, - callback: (error: Error | null, result: boolean) => void, - ): void; - /** - * Key decapsulation using a KEM algorithm with a private key. - * - * Supported key types and their KEM algorithms are: - * - * * `'rsa'` RSA Secret Value Encapsulation - * * `'ec'` DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256) - * * `'x25519'` DHKEM(X25519, HKDF-SHA256) - * * `'x448'` DHKEM(X448, HKDF-SHA512) - * * `'ml-kem-512'` ML-KEM - * * `'ml-kem-768'` ML-KEM - * * `'ml-kem-1024'` ML-KEM - * - * If `key` is not a {@link KeyObject}, this function behaves as if `key` had been - * passed to `crypto.createPrivateKey()`. - * - * If the `callback` function is provided this function uses libuv's threadpool. - * @since v24.7.0 - */ - function decapsulate( - key: KeyLike | PrivateKeyInput | JsonWebKeyInput, - ciphertext: ArrayBuffer | NodeJS.ArrayBufferView, - ): NonSharedBuffer; - function decapsulate( - key: KeyLike | PrivateKeyInput | JsonWebKeyInput, - ciphertext: ArrayBuffer | NodeJS.ArrayBufferView, - callback: (err: Error, sharedKey: NonSharedBuffer) => void, - ): void; - /** - * Computes the Diffie-Hellman shared secret based on a `privateKey` and a `publicKey`. - * Both keys must have the same `asymmetricKeyType` and must support either the DH or - * ECDH operation. - * - * If the `callback` function is provided this function uses libuv's threadpool. - * @since v13.9.0, v12.17.0 - */ - function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): NonSharedBuffer; - function diffieHellman( - options: { privateKey: KeyObject; publicKey: KeyObject }, - callback: (err: Error | null, secret: NonSharedBuffer) => void, - ): void; - /** - * Key encapsulation using a KEM algorithm with a public key. - * - * Supported key types and their KEM algorithms are: - * - * * `'rsa'` RSA Secret Value Encapsulation - * * `'ec'` DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256) - * * `'x25519'` DHKEM(X25519, HKDF-SHA256) - * * `'x448'` DHKEM(X448, HKDF-SHA512) - * * `'ml-kem-512'` ML-KEM - * * `'ml-kem-768'` ML-KEM - * * `'ml-kem-1024'` ML-KEM - * - * If `key` is not a {@link KeyObject}, this function behaves as if `key` had been - * passed to `crypto.createPublicKey()`. - * - * If the `callback` function is provided this function uses libuv's threadpool. - * @since v24.7.0 - */ - function encapsulate( - key: KeyLike | PublicKeyInput | JsonWebKeyInput, - ): { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer }; - function encapsulate( - key: KeyLike | PublicKeyInput | JsonWebKeyInput, - callback: (err: Error, result: { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer }) => void, - ): void; - interface OneShotDigestOptions { - /** - * Encoding used to encode the returned digest. - * @default 'hex' - */ - outputEncoding?: BinaryToTextEncoding | "buffer" | undefined; - /** - * For XOF hash functions such as 'shake256', the outputLength option - * can be used to specify the desired output length in bytes. - */ - outputLength?: number | undefined; - } - interface OneShotDigestOptionsWithStringEncoding extends OneShotDigestOptions { - outputEncoding?: BinaryToTextEncoding | undefined; - } - interface OneShotDigestOptionsWithBufferEncoding extends OneShotDigestOptions { - outputEncoding: "buffer"; - } - /** - * A utility for creating one-shot hash digests of data. It can be faster than - * the object-based `crypto.createHash()` when hashing a smaller amount of data - * (<= 5MB) that's readily available. If the data can be big or if it is streamed, - * it's still recommended to use `crypto.createHash()` instead. - * - * The `algorithm` is dependent on the available algorithms supported by the - * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. - * On recent releases of OpenSSL, `openssl list -digest-algorithms` will - * display the available digest algorithms. - * - * If `options` is a string, then it specifies the `outputEncoding`. - * - * Example: - * - * ```js - * import crypto from 'node:crypto'; - * import { Buffer } from 'node:buffer'; - * - * // Hashing a string and return the result as a hex-encoded string. - * const string = 'Node.js'; - * // 10b3493287f831e81a438811a1ffba01f8cec4b7 - * console.log(crypto.hash('sha1', string)); - * - * // Encode a base64-encoded string into a Buffer, hash it and return - * // the result as a buffer. - * const base64 = 'Tm9kZS5qcw=='; - * // - * console.log(crypto.hash('sha1', Buffer.from(base64, 'base64'), 'buffer')); - * ``` - * @since v21.7.0, v20.12.0 - * @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different - * input encoding is desired for a string input, user could encode the string - * into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing - * the encoded `TypedArray` into this API instead. - */ - function hash( - algorithm: string, - data: BinaryLike, - options?: OneShotDigestOptionsWithStringEncoding | BinaryToTextEncoding, - ): string; - function hash( - algorithm: string, - data: BinaryLike, - options: OneShotDigestOptionsWithBufferEncoding | "buffer", - ): NonSharedBuffer; - function hash( - algorithm: string, - data: BinaryLike, - options: OneShotDigestOptions | BinaryToTextEncoding | "buffer", - ): string | NonSharedBuffer; - type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts"; - interface CipherInfoOptions { - /** - * A test key length. - */ - keyLength?: number | undefined; - /** - * A test IV length. - */ - ivLength?: number | undefined; - } - interface CipherInfo { - /** - * The name of the cipher. - */ - name: string; - /** - * The nid of the cipher. - */ - nid: number; - /** - * The block size of the cipher in bytes. - * This property is omitted when mode is 'stream'. - */ - blockSize?: number | undefined; - /** - * The expected or default initialization vector length in bytes. - * This property is omitted if the cipher does not use an initialization vector. - */ - ivLength?: number | undefined; - /** - * The expected or default key length in bytes. - */ - keyLength: number; - /** - * The cipher mode. - */ - mode: CipherMode; - } - /** - * Returns information about a given cipher. - * - * Some ciphers accept variable length keys and initialization vectors. By default, - * the `crypto.getCipherInfo()` method will return the default values for these - * ciphers. To test if a given key length or iv length is acceptable for given - * cipher, use the `keyLength` and `ivLength` options. If the given values are - * unacceptable, `undefined` will be returned. - * @since v15.0.0 - * @param nameOrNid The name or nid of the cipher to query. - */ - function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined; - /** - * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. - * - * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an errors occurs while deriving the key, `err` will be set; - * otherwise `err` will be `null`. The successfully generated `derivedKey` will - * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any - * of the input arguments specify invalid values or types. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * hkdf, - * } = await import('node:crypto'); - * - * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => { - * if (err) throw err; - * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' - * }); - * ``` - * @since v15.0.0 - * @param digest The digest algorithm to use. - * @param ikm The input keying material. Must be provided but can be zero-length. - * @param salt The salt value. Must be provided but can be zero-length. - * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. - * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` - * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). - */ - function hkdf( - digest: string, - irm: BinaryLike | KeyObject, - salt: BinaryLike, - info: BinaryLike, - keylen: number, - callback: (err: Error | null, derivedKey: ArrayBuffer) => void, - ): void; - /** - * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The - * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. - * - * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). - * - * An error will be thrown if any of the input arguments specify invalid values or - * types, or if the derived key cannot be generated. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * hkdfSync, - * } = await import('node:crypto'); - * - * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64); - * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' - * ``` - * @since v15.0.0 - * @param digest The digest algorithm to use. - * @param ikm The input keying material. Must be provided but can be zero-length. - * @param salt The salt value. Must be provided but can be zero-length. - * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. - * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` - * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). - */ - function hkdfSync( - digest: string, - ikm: BinaryLike | KeyObject, - salt: BinaryLike, - info: BinaryLike, - keylen: number, - ): ArrayBuffer; - interface SecureHeapUsage { - /** - * The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag. - */ - total: number; - /** - * The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag. - */ - min: number; - /** - * The total number of bytes currently allocated from the secure heap. - */ - used: number; - /** - * The calculated ratio of `used` to `total` allocated bytes. - */ - utilization: number; - } - /** - * @since v15.6.0 - */ - function secureHeapUsed(): SecureHeapUsage; - interface RandomUUIDOptions { - /** - * By default, to improve performance, - * Node.js will pre-emptively generate and persistently cache enough - * random data to generate up to 128 random UUIDs. To generate a UUID - * without using the cache, set `disableEntropyCache` to `true`. - * - * @default `false` - */ - disableEntropyCache?: boolean | undefined; - } - type UUID = `${string}-${string}-${string}-${string}-${string}`; - /** - * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a - * cryptographic pseudorandom number generator. - * @since v15.6.0, v14.17.0 - */ - function randomUUID(options?: RandomUUIDOptions): UUID; - interface X509CheckOptions { - /** - * @default 'always' - */ - subject?: "always" | "default" | "never" | undefined; - /** - * @default true - */ - wildcards?: boolean | undefined; - /** - * @default true - */ - partialWildcards?: boolean | undefined; - /** - * @default false - */ - multiLabelWildcards?: boolean | undefined; - /** - * @default false - */ - singleLabelSubdomains?: boolean | undefined; - } - /** - * Encapsulates an X509 certificate and provides read-only access to - * its information. - * - * ```js - * const { X509Certificate } = await import('node:crypto'); - * - * const x509 = new X509Certificate('{... pem encoded cert ...}'); - * - * console.log(x509.subject); - * ``` - * @since v15.6.0 - */ - class X509Certificate { - /** - * Will be \`true\` if this is a Certificate Authority (CA) certificate. - * @since v15.6.0 - */ - readonly ca: boolean; - /** - * The SHA-1 fingerprint of this certificate. - * - * Because SHA-1 is cryptographically broken and because the security of SHA-1 is - * significantly worse than that of algorithms that are commonly used to sign - * certificates, consider using `x509.fingerprint256` instead. - * @since v15.6.0 - */ - readonly fingerprint: string; - /** - * The SHA-256 fingerprint of this certificate. - * @since v15.6.0 - */ - readonly fingerprint256: string; - /** - * The SHA-512 fingerprint of this certificate. - * - * Because computing the SHA-256 fingerprint is usually faster and because it is - * only half the size of the SHA-512 fingerprint, `x509.fingerprint256` may be - * a better choice. While SHA-512 presumably provides a higher level of security in - * general, the security of SHA-256 matches that of most algorithms that are - * commonly used to sign certificates. - * @since v17.2.0, v16.14.0 - */ - readonly fingerprint512: string; - /** - * The complete subject of this certificate. - * @since v15.6.0 - */ - readonly subject: string; - /** - * The subject alternative name specified for this certificate. - * - * This is a comma-separated list of subject alternative names. Each entry begins - * with a string identifying the kind of the subject alternative name followed by - * a colon and the value associated with the entry. - * - * Earlier versions of Node.js incorrectly assumed that it is safe to split this - * property at the two-character sequence `', '` (see [CVE-2021-44532](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532)). However, - * both malicious and legitimate certificates can contain subject alternative names - * that include this sequence when represented as a string. - * - * After the prefix denoting the type of the entry, the remainder of each entry - * might be enclosed in quotes to indicate that the value is a JSON string literal. - * For backward compatibility, Node.js only uses JSON string literals within this - * property when necessary to avoid ambiguity. Third-party code should be prepared - * to handle both possible entry formats. - * @since v15.6.0 - */ - readonly subjectAltName: string | undefined; - /** - * A textual representation of the certificate's authority information access - * extension. - * - * This is a line feed separated list of access descriptions. Each line begins with - * the access method and the kind of the access location, followed by a colon and - * the value associated with the access location. - * - * After the prefix denoting the access method and the kind of the access location, - * the remainder of each line might be enclosed in quotes to indicate that the - * value is a JSON string literal. For backward compatibility, Node.js only uses - * JSON string literals within this property when necessary to avoid ambiguity. - * Third-party code should be prepared to handle both possible entry formats. - * @since v15.6.0 - */ - readonly infoAccess: string | undefined; - /** - * An array detailing the key usages for this certificate. - * @since v15.6.0 - */ - readonly keyUsage: string[]; - /** - * The issuer identification included in this certificate. - * @since v15.6.0 - */ - readonly issuer: string; - /** - * The issuer certificate or `undefined` if the issuer certificate is not - * available. - * @since v15.9.0 - */ - readonly issuerCertificate: X509Certificate | undefined; - /** - * The public key `KeyObject` for this certificate. - * @since v15.6.0 - */ - readonly publicKey: KeyObject; - /** - * A `Buffer` containing the DER encoding of this certificate. - * @since v15.6.0 - */ - readonly raw: NonSharedBuffer; - /** - * The serial number of this certificate. - * - * Serial numbers are assigned by certificate authorities and do not uniquely - * identify certificates. Consider using `x509.fingerprint256` as a unique - * identifier instead. - * @since v15.6.0 - */ - readonly serialNumber: string; - /** - * The algorithm used to sign the certificate or `undefined` if the signature algorithm is unknown by OpenSSL. - * @since v24.9.0 - */ - readonly signatureAlgorithm: string | undefined; - /** - * The OID of the algorithm used to sign the certificate. - * @since v24.9.0 - */ - readonly signatureAlgorithmOid: string; - /** - * The date/time from which this certificate is considered valid. - * @since v15.6.0 - */ - readonly validFrom: string; - /** - * The date/time from which this certificate is valid, encapsulated in a `Date` object. - * @since v22.10.0 - */ - readonly validFromDate: Date; - /** - * The date/time until which this certificate is considered valid. - * @since v15.6.0 - */ - readonly validTo: string; - /** - * The date/time until which this certificate is valid, encapsulated in a `Date` object. - * @since v22.10.0 - */ - readonly validToDate: Date; - constructor(buffer: BinaryLike); - /** - * Checks whether the certificate matches the given email address. - * - * If the `'subject'` option is undefined or set to `'default'`, the certificate - * subject is only considered if the subject alternative name extension either does - * not exist or does not contain any email addresses. - * - * If the `'subject'` option is set to `'always'` and if the subject alternative - * name extension either does not exist or does not contain a matching email - * address, the certificate subject is considered. - * - * If the `'subject'` option is set to `'never'`, the certificate subject is never - * considered, even if the certificate contains no subject alternative names. - * @since v15.6.0 - * @return Returns `email` if the certificate matches, `undefined` if it does not. - */ - checkEmail(email: string, options?: Pick): string | undefined; - /** - * Checks whether the certificate matches the given host name. - * - * If the certificate matches the given host name, the matching subject name is - * returned. The returned name might be an exact match (e.g., `foo.example.com`) - * or it might contain wildcards (e.g., `*.example.com`). Because host name - * comparisons are case-insensitive, the returned subject name might also differ - * from the given `name` in capitalization. - * - * If the `'subject'` option is undefined or set to `'default'`, the certificate - * subject is only considered if the subject alternative name extension either does - * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS"). - * - * If the `'subject'` option is set to `'always'` and if the subject alternative - * name extension either does not exist or does not contain a matching DNS name, - * the certificate subject is considered. - * - * If the `'subject'` option is set to `'never'`, the certificate subject is never - * considered, even if the certificate contains no subject alternative names. - * @since v15.6.0 - * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`. - */ - checkHost(name: string, options?: X509CheckOptions): string | undefined; - /** - * Checks whether the certificate matches the given IP address (IPv4 or IPv6). - * - * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they - * must match the given `ip` address exactly. Other subject alternative names as - * well as the subject field of the certificate are ignored. - * @since v15.6.0 - * @return Returns `ip` if the certificate matches, `undefined` if it does not. - */ - checkIP(ip: string): string | undefined; - /** - * Checks whether this certificate was potentially issued by the given `otherCert` - * by comparing the certificate metadata. - * - * This is useful for pruning a list of possible issuer certificates which have been - * selected using a more rudimentary filtering routine, i.e. just based on subject - * and issuer names. - * - * Finally, to verify that this certificate's signature was produced by a private key - * corresponding to `otherCert`'s public key use `x509.verify(publicKey)` - * with `otherCert`'s public key represented as a `KeyObject` - * like so - * - * ```js - * if (!x509.verify(otherCert.publicKey)) { - * throw new Error('otherCert did not issue x509'); - * } - * ``` - * @since v15.6.0 - */ - checkIssued(otherCert: X509Certificate): boolean; - /** - * Checks whether the public key for this certificate is consistent with - * the given private key. - * @since v15.6.0 - * @param privateKey A private key. - */ - checkPrivateKey(privateKey: KeyObject): boolean; - /** - * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded - * certificate. - * @since v15.6.0 - */ - toJSON(): string; - /** - * Returns information about this certificate using the legacy `certificate object` encoding. - * @since v15.6.0 - */ - toLegacyObject(): PeerCertificate; - /** - * Returns the PEM-encoded certificate. - * @since v15.6.0 - */ - toString(): string; - /** - * Verifies that this certificate was signed by the given public key. - * Does not perform any other validation checks on the certificate. - * @since v15.6.0 - * @param publicKey A public key. - */ - verify(publicKey: KeyObject): boolean; - } - type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint; - interface GeneratePrimeOptions { - add?: LargeNumberLike | undefined; - rem?: LargeNumberLike | undefined; - /** - * @default false - */ - safe?: boolean | undefined; - bigint?: boolean | undefined; - } - interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions { - bigint: true; - } - interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions { - bigint?: false | undefined; - } - /** - * Generates a pseudorandom prime of `size` bits. - * - * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime. - * - * The `options.add` and `options.rem` parameters can be used to enforce additional - * requirements, e.g., for Diffie-Hellman: - * - * * If `options.add` and `options.rem` are both set, the prime will satisfy the - * condition that `prime % add = rem`. - * * If only `options.add` is set and `options.safe` is not `true`, the prime will - * satisfy the condition that `prime % add = 1`. - * * If only `options.add` is set and `options.safe` is set to `true`, the prime - * will instead satisfy the condition that `prime % add = 3`. This is necessary - * because `prime % add = 1` for `options.add > 2` would contradict the condition - * enforced by `options.safe`. - * * `options.rem` is ignored if `options.add` is not given. - * - * Both `options.add` and `options.rem` must be encoded as big-endian sequences - * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`. - * - * By default, the prime is encoded as a big-endian sequence of octets - * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a - * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. - * @since v15.8.0 - * @param size The size (in bits) of the prime to generate. - */ - function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void; - function generatePrime( - size: number, - options: GeneratePrimeOptionsBigInt, - callback: (err: Error | null, prime: bigint) => void, - ): void; - function generatePrime( - size: number, - options: GeneratePrimeOptionsArrayBuffer, - callback: (err: Error | null, prime: ArrayBuffer) => void, - ): void; - function generatePrime( - size: number, - options: GeneratePrimeOptions, - callback: (err: Error | null, prime: ArrayBuffer | bigint) => void, - ): void; - /** - * Generates a pseudorandom prime of `size` bits. - * - * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime. - * - * The `options.add` and `options.rem` parameters can be used to enforce additional - * requirements, e.g., for Diffie-Hellman: - * - * * If `options.add` and `options.rem` are both set, the prime will satisfy the - * condition that `prime % add = rem`. - * * If only `options.add` is set and `options.safe` is not `true`, the prime will - * satisfy the condition that `prime % add = 1`. - * * If only `options.add` is set and `options.safe` is set to `true`, the prime - * will instead satisfy the condition that `prime % add = 3`. This is necessary - * because `prime % add = 1` for `options.add > 2` would contradict the condition - * enforced by `options.safe`. - * * `options.rem` is ignored if `options.add` is not given. - * - * Both `options.add` and `options.rem` must be encoded as big-endian sequences - * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`. - * - * By default, the prime is encoded as a big-endian sequence of octets - * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a - * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. - * @since v15.8.0 - * @param size The size (in bits) of the prime to generate. - */ - function generatePrimeSync(size: number): ArrayBuffer; - function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint; - function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer; - function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint; - interface CheckPrimeOptions { - /** - * The number of Miller-Rabin probabilistic primality iterations to perform. - * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most `2**-64` for random input. - * Care must be used when selecting a number of checks. - * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details. - * - * @default 0 - */ - checks?: number | undefined; - } - /** - * Checks the primality of the `candidate`. - * @since v15.8.0 - * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. - */ - function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void; - function checkPrime( - value: LargeNumberLike, - options: CheckPrimeOptions, - callback: (err: Error | null, result: boolean) => void, - ): void; - /** - * Checks the primality of the `candidate`. - * @since v15.8.0 - * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. - * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`. - */ - function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean; - /** - * Load and set the `engine` for some or all OpenSSL functions (selected by flags). - * - * `engine` could be either an id or a path to the engine's shared library. - * - * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`): - * - * * `crypto.constants.ENGINE_METHOD_RSA` - * * `crypto.constants.ENGINE_METHOD_DSA` - * * `crypto.constants.ENGINE_METHOD_DH` - * * `crypto.constants.ENGINE_METHOD_RAND` - * * `crypto.constants.ENGINE_METHOD_EC` - * * `crypto.constants.ENGINE_METHOD_CIPHERS` - * * `crypto.constants.ENGINE_METHOD_DIGESTS` - * * `crypto.constants.ENGINE_METHOD_PKEY_METHS` - * * `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS` - * * `crypto.constants.ENGINE_METHOD_ALL` - * * `crypto.constants.ENGINE_METHOD_NONE` - * @since v0.11.11 - * @param flags - */ - function setEngine(engine: string, flags?: number): void; - /** - * A convenient alias for {@link webcrypto.getRandomValues}. This - * implementation is not compliant with the Web Crypto spec, to write - * web-compatible code use {@link webcrypto.getRandomValues} instead. - * @since v17.4.0 - * @return Returns `typedArray`. - */ - function getRandomValues< - T extends Exclude< - NodeJS.NonSharedTypedArray, - NodeJS.NonSharedFloat16Array | NodeJS.NonSharedFloat32Array | NodeJS.NonSharedFloat64Array - >, - >(typedArray: T): T; - type Argon2Algorithm = "argon2d" | "argon2i" | "argon2id"; - interface Argon2Parameters { - /** - * REQUIRED, this is the password for password hashing applications of Argon2. - */ - message: string | ArrayBuffer | NodeJS.ArrayBufferView; - /** - * REQUIRED, must be at least 8 bytes long. This is the salt for password hashing applications of Argon2. - */ - nonce: string | ArrayBuffer | NodeJS.ArrayBufferView; - /** - * REQUIRED, degree of parallelism determines how many computational chains (lanes) - * can be run. Must be greater than 1 and less than `2**24-1`. - */ - parallelism: number; - /** - * REQUIRED, the length of the key to generate. Must be greater than 4 and - * less than `2**32-1`. - */ - tagLength: number; - /** - * REQUIRED, memory cost in 1KiB blocks. Must be greater than - * `8 * parallelism` and less than `2**32-1`. The actual number of blocks is rounded - * down to the nearest multiple of `4 * parallelism`. - */ - memory: number; - /** - * REQUIRED, number of passes (iterations). Must be greater than 1 and less - * than `2**32-1`. - */ - passes: number; - /** - * OPTIONAL, Random additional input, - * similar to the salt, that should **NOT** be stored with the derived key. This is known as pepper in - * password hashing applications. If used, must have a length not greater than `2**32-1` bytes. - */ - secret?: string | ArrayBuffer | NodeJS.ArrayBufferView | undefined; - /** - * OPTIONAL, Additional data to - * be added to the hash, functionally equivalent to salt or secret, but meant for - * non-random data. If used, must have a length not greater than `2**32-1` bytes. - */ - associatedData?: string | ArrayBuffer | NodeJS.ArrayBufferView | undefined; - } - /** - * Provides an asynchronous [Argon2](https://www.rfc-editor.org/rfc/rfc9106.html) implementation. Argon2 is a password-based - * key derivation function that is designed to be expensive computationally and - * memory-wise in order to make brute-force attacks unrewarding. - * - * The `nonce` should be as unique as possible. It is recommended that a nonce is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `message`, `nonce`, `secret` or `associatedData`, please - * consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v25.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis). - * - * The `callback` function is called with two arguments: `err` and `derivedKey`. - * `err` is an exception object when key derivation fails, otherwise `err` is - * `null`. `derivedKey` is passed to the callback as a `Buffer`. - * - * An exception is thrown when any of the input arguments specify invalid values - * or types. - * - * ```js - * const { argon2, randomBytes } = await import('node:crypto'); - * - * const parameters = { - * message: 'password', - * nonce: randomBytes(16), - * parallelism: 4, - * tagLength: 64, - * memory: 65536, - * passes: 3, - * }; - * - * argon2('argon2id', parameters, (err, derivedKey) => { - * if (err) throw err; - * console.log(derivedKey.toString('hex')); // 'af91dad...9520f15' - * }); - * ``` - * @since v24.7.0 - * @param algorithm Variant of Argon2, one of `"argon2d"`, `"argon2i"` or `"argon2id"`. - * @experimental - */ - function argon2( - algorithm: Argon2Algorithm, - parameters: Argon2Parameters, - callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, - ): void; - /** - * Provides a synchronous [Argon2][] implementation. Argon2 is a password-based - * key derivation function that is designed to be expensive computationally and - * memory-wise in order to make brute-force attacks unrewarding. - * - * The `nonce` should be as unique as possible. It is recommended that a nonce is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `message`, `nonce`, `secret` or `associatedData`, please - * consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v25.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis). - * - * An exception is thrown when key derivation fails, otherwise the derived key is - * returned as a `Buffer`. - * - * An exception is thrown when any of the input arguments specify invalid values - * or types. - * - * ```js - * const { argon2Sync, randomBytes } = await import('node:crypto'); - * - * const parameters = { - * message: 'password', - * nonce: randomBytes(16), - * parallelism: 4, - * tagLength: 64, - * memory: 65536, - * passes: 3, - * }; - * - * const derivedKey = argon2Sync('argon2id', parameters); - * console.log(derivedKey.toString('hex')); // 'af91dad...9520f15' - * ``` - * @since v24.7.0 - * @experimental - */ - function argon2Sync(algorithm: Argon2Algorithm, parameters: Argon2Parameters): NonSharedBuffer; - /** - * A convenient alias for `crypto.webcrypto.subtle`. - * @since v17.4.0 - */ - const subtle: webcrypto.SubtleCrypto; - /** - * An implementation of the Web Crypto API standard. - * - * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details. - * @since v15.0.0 - */ - const webcrypto: webcrypto.Crypto; - namespace webcrypto { - type AlgorithmIdentifier = Algorithm | string; - type BigInteger = NodeJS.NonSharedUint8Array; - type KeyFormat = "jwk" | "pkcs8" | "raw" | "raw-public" | "raw-secret" | "raw-seed" | "spki"; - type KeyType = "private" | "public" | "secret"; - type KeyUsage = - | "decapsulateBits" - | "decapsulateKey" - | "decrypt" - | "deriveBits" - | "deriveKey" - | "encapsulateBits" - | "encapsulateKey" - | "encrypt" - | "sign" - | "unwrapKey" - | "verify" - | "wrapKey"; - type HashAlgorithmIdentifier = AlgorithmIdentifier; - type NamedCurve = string; - interface AeadParams extends Algorithm { - additionalData?: NodeJS.BufferSource; - iv: NodeJS.BufferSource; - tagLength: number; - } - interface AesCbcParams extends Algorithm { - iv: NodeJS.BufferSource; - } - interface AesCtrParams extends Algorithm { - counter: NodeJS.BufferSource; - length: number; - } - interface AesDerivedKeyParams extends Algorithm { - length: number; - } - interface AesKeyAlgorithm extends KeyAlgorithm { - length: number; - } - interface AesKeyGenParams extends Algorithm { - length: number; - } - interface Algorithm { - name: string; - } - interface Argon2Params extends Algorithm { - associatedData?: NodeJS.BufferSource; - memory: number; - nonce: NodeJS.BufferSource; - parallelism: number; - passes: number; - secretValue?: NodeJS.BufferSource; - version?: number; - } - interface CShakeParams extends Algorithm { - customization?: NodeJS.BufferSource; - functionName?: NodeJS.BufferSource; - outputLength: number; - } - interface ContextParams extends Algorithm { - context?: NodeJS.BufferSource; - } - interface EcKeyAlgorithm extends KeyAlgorithm { - namedCurve: NamedCurve; - } - interface EcKeyGenParams extends Algorithm { - namedCurve: NamedCurve; - } - interface EcKeyImportParams extends Algorithm { - namedCurve: NamedCurve; - } - interface EcdhKeyDeriveParams extends Algorithm { - public: CryptoKey; - } - interface EcdsaParams extends Algorithm { - hash: HashAlgorithmIdentifier; - } - interface HkdfParams extends Algorithm { - hash: HashAlgorithmIdentifier; - info: NodeJS.BufferSource; - salt: NodeJS.BufferSource; - } - interface HmacImportParams extends Algorithm { - hash: HashAlgorithmIdentifier; - length?: number; - } - interface HmacKeyAlgorithm extends KeyAlgorithm { - hash: KeyAlgorithm; - length: number; - } - interface HmacKeyGenParams extends Algorithm { - hash: HashAlgorithmIdentifier; - length?: number; - } - interface KangarooTwelveParams { - customization?: NodeJS.BufferSource; - outputLength: number; - } - interface JsonWebKey { - alg?: string; - crv?: string; - d?: string; - dp?: string; - dq?: string; - e?: string; - ext?: boolean; - k?: string; - key_ops?: string[]; - kty?: string; - n?: string; - oth?: RsaOtherPrimesInfo[]; - p?: string; - q?: string; - qi?: string; - use?: string; - x?: string; - y?: string; - } - interface KeyAlgorithm { - name: string; - } - interface KmacImportParams extends Algorithm { - length?: number; - } - interface KmacKeyAlgorithm extends KeyAlgorithm { - length: number; - } - interface KmacKeyGenParams extends Algorithm { - length?: number; - } - interface KmacParams extends Algorithm { - customization?: NodeJS.BufferSource; - outputLength: number; - } - interface Pbkdf2Params extends Algorithm { - hash: HashAlgorithmIdentifier; - iterations: number; - salt: NodeJS.BufferSource; - } - interface RsaHashedImportParams extends Algorithm { - hash: HashAlgorithmIdentifier; - } - interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm { - hash: KeyAlgorithm; - } - interface RsaHashedKeyGenParams extends RsaKeyGenParams { - hash: HashAlgorithmIdentifier; - } - interface RsaKeyAlgorithm extends KeyAlgorithm { - modulusLength: number; - publicExponent: BigInteger; - } - interface RsaKeyGenParams extends Algorithm { - modulusLength: number; - publicExponent: BigInteger; - } - interface RsaOaepParams extends Algorithm { - label?: NodeJS.BufferSource; - } - interface RsaOtherPrimesInfo { - d?: string; - r?: string; - t?: string; - } - interface RsaPssParams extends Algorithm { - saltLength: number; - } - interface TurboShakeParams { - domainSeparation?: number; - outputLength: number; - } - interface Crypto { - readonly subtle: SubtleCrypto; - getRandomValues< - T extends Exclude< - NodeJS.NonSharedTypedArray, - NodeJS.NonSharedFloat16Array | NodeJS.NonSharedFloat32Array | NodeJS.NonSharedFloat64Array - >, - >( - typedArray: T, - ): T; - randomUUID(): UUID; - } - interface CryptoKey { - readonly algorithm: KeyAlgorithm; - readonly extractable: boolean; - readonly type: KeyType; - readonly usages: KeyUsage[]; - } - interface CryptoKeyPair { - privateKey: CryptoKey; - publicKey: CryptoKey; - } - interface EncapsulatedBits { - sharedKey: ArrayBuffer; - ciphertext: ArrayBuffer; - } - interface EncapsulatedKey { - sharedKey: CryptoKey; - ciphertext: ArrayBuffer; - } - interface SubtleCrypto { - decapsulateBits( - decapsulationAlgorithm: AlgorithmIdentifier, - decapsulationKey: CryptoKey, - ciphertext: NodeJS.BufferSource, - ): Promise; - decapsulateKey( - decapsulationAlgorithm: AlgorithmIdentifier, - decapsulationKey: CryptoKey, - ciphertext: NodeJS.BufferSource, - sharedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | AesDerivedKeyParams | KmacImportParams, - extractable: boolean, - usages: KeyUsage[], - ): Promise; - decrypt( - algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, - key: CryptoKey, - data: NodeJS.BufferSource, - ): Promise; - deriveBits( - algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params, - baseKey: CryptoKey, - length?: number | null, - ): Promise; - deriveKey( - algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params, - baseKey: CryptoKey, - derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | KmacImportParams, - extractable: boolean, - keyUsages: readonly KeyUsage[], - ): Promise; - digest( - algorithm: AlgorithmIdentifier | CShakeParams | TurboShakeParams | KangarooTwelveParams, - data: NodeJS.BufferSource, - ): Promise; - encapsulateBits( - encapsulationAlgorithm: AlgorithmIdentifier, - encapsulationKey: CryptoKey, - ): Promise; - encapsulateKey( - encapsulationAlgorithm: AlgorithmIdentifier, - encapsulationKey: CryptoKey, - sharedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | KmacImportParams, - extractable: boolean, - usages: KeyUsage[], - ): Promise; - encrypt( - algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, - key: CryptoKey, - data: NodeJS.BufferSource, - ): Promise; - exportKey(format: "jwk", key: CryptoKey): Promise; - exportKey(format: Exclude, key: CryptoKey): Promise; - exportKey(format: KeyFormat, key: CryptoKey): Promise; - generateKey( - algorithm: RsaHashedKeyGenParams | EcKeyGenParams, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - generateKey( - algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params | KmacKeyGenParams, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - generateKey( - algorithm: AlgorithmIdentifier, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - getPublicKey(key: CryptoKey, keyUsages: KeyUsage[]): Promise; - importKey( - format: "jwk", - keyData: JsonWebKey, - algorithm: - | AlgorithmIdentifier - | RsaHashedImportParams - | EcKeyImportParams - | HmacImportParams - | AesKeyAlgorithm - | KmacImportParams, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - importKey( - format: Exclude, - keyData: NodeJS.BufferSource, - algorithm: - | AlgorithmIdentifier - | RsaHashedImportParams - | EcKeyImportParams - | HmacImportParams - | AesKeyAlgorithm - | KmacImportParams, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - sign( - algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams, - key: CryptoKey, - data: NodeJS.BufferSource, - ): Promise; - unwrapKey( - format: KeyFormat, - wrappedKey: NodeJS.BufferSource, - unwrappingKey: CryptoKey, - unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, - unwrappedKeyAlgorithm: - | AlgorithmIdentifier - | RsaHashedImportParams - | EcKeyImportParams - | HmacImportParams - | AesKeyAlgorithm - | KmacImportParams, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - verify( - algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams, - key: CryptoKey, - signature: NodeJS.BufferSource, - data: NodeJS.BufferSource, - ): Promise; - wrapKey( - format: KeyFormat, - key: CryptoKey, - wrappingKey: CryptoKey, - wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, - ): Promise; - } - } -} -declare module "crypto" { - export * from "node:crypto"; -} diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts deleted file mode 100644 index 8665497..0000000 --- a/node_modules/@types/node/dgram.d.ts +++ /dev/null @@ -1,537 +0,0 @@ -declare module "node:dgram" { - import { NonSharedBuffer } from "node:buffer"; - import * as dns from "node:dns"; - import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; - import { AddressInfo, BlockList } from "node:net"; - interface RemoteInfo { - address: string; - family: "IPv4" | "IPv6"; - port: number; - size: number; - } - interface BindOptions { - port?: number | undefined; - address?: string | undefined; - exclusive?: boolean | undefined; - fd?: number | undefined; - } - type SocketType = "udp4" | "udp6"; - interface SocketOptions extends Abortable { - type: SocketType; - reuseAddr?: boolean | undefined; - reusePort?: boolean | undefined; - /** - * @default false - */ - ipv6Only?: boolean | undefined; - recvBufferSize?: number | undefined; - sendBufferSize?: number | undefined; - lookup?: - | (( - hostname: string, - options: dns.LookupOneOptions, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ) => void) - | undefined; - receiveBlockList?: BlockList | undefined; - sendBlockList?: BlockList | undefined; - } - /** - * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram - * messages. When `address` and `port` are not passed to `socket.bind()` the - * method will bind the socket to the "all interfaces" address on a random port - * (it does the right thing for both `udp4` and `udp6` sockets). The bound address - * and port can be retrieved using `socket.address().address` and `socket.address().port`. - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.close()` on the socket: - * - * ```js - * const controller = new AbortController(); - * const { signal } = controller; - * const server = dgram.createSocket({ type: 'udp4', signal }); - * server.on('message', (msg, rinfo) => { - * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); - * }); - * // Later, when you want to close the server. - * controller.abort(); - * ``` - * @since v0.11.13 - * @param options Available options are: - * @param callback Attached as a listener for `'message'` events. Optional. - */ - function createSocket(type: SocketType, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket; - function createSocket(options: SocketOptions, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket; - interface SocketEventMap { - "close": []; - "connect": []; - "error": [err: Error]; - "listening": []; - "message": [msg: NonSharedBuffer, rinfo: RemoteInfo]; - } - /** - * Encapsulates the datagram functionality. - * - * New instances of `dgram.Socket` are created using {@link createSocket}. - * The `new` keyword is not to be used to create `dgram.Socket` instances. - * @since v0.1.99 - */ - class Socket implements EventEmitter { - /** - * Tells the kernel to join a multicast group at the given `multicastAddress` and `multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface` argument is not - * specified, the operating system will choose - * one interface and will add membership to it. To add membership to every - * available interface, call `addMembership` multiple times, once per interface. - * - * When called on an unbound socket, this method will implicitly bind to a random - * port, listening on all interfaces. - * - * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur: - * - * ```js - * import cluster from 'node:cluster'; - * import dgram from 'node:dgram'; - * - * if (cluster.isPrimary) { - * cluster.fork(); // Works ok. - * cluster.fork(); // Fails with EADDRINUSE. - * } else { - * const s = dgram.createSocket('udp4'); - * s.bind(1234, () => { - * s.addMembership('224.0.0.114'); - * }); - * } - * ``` - * @since v0.6.9 - */ - addMembership(multicastAddress: string, multicastInterface?: string): void; - /** - * Returns an object containing the address information for a socket. - * For UDP sockets, this object will contain `address`, `family`, and `port` properties. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.1.99 - */ - address(): AddressInfo; - /** - * For UDP sockets, causes the `dgram.Socket` to listen for datagram - * messages on a named `port` and optional `address`. If `port` is not - * specified or is `0`, the operating system will attempt to bind to a - * random port. If `address` is not specified, the operating system will - * attempt to listen on all addresses. Once binding is complete, a `'listening'` event is emitted and the optional `callback` function is - * called. - * - * Specifying both a `'listening'` event listener and passing a `callback` to the `socket.bind()` method is not harmful but not very - * useful. - * - * A bound datagram socket keeps the Node.js process running to receive - * datagram messages. - * - * If binding fails, an `'error'` event is generated. In rare case (e.g. - * attempting to bind with a closed socket), an `Error` may be thrown. - * - * Example of a UDP server listening on port 41234: - * - * ```js - * import dgram from 'node:dgram'; - * - * const server = dgram.createSocket('udp4'); - * - * server.on('error', (err) => { - * console.error(`server error:\n${err.stack}`); - * server.close(); - * }); - * - * server.on('message', (msg, rinfo) => { - * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); - * }); - * - * server.on('listening', () => { - * const address = server.address(); - * console.log(`server listening ${address.address}:${address.port}`); - * }); - * - * server.bind(41234); - * // Prints: server listening 0.0.0.0:41234 - * ``` - * @since v0.1.99 - * @param callback with no parameters. Called when binding is complete. - */ - bind(port?: number, address?: string, callback?: () => void): this; - bind(port?: number, callback?: () => void): this; - bind(callback?: () => void): this; - bind(options: BindOptions, callback?: () => void): this; - /** - * Close the underlying socket and stop listening for data on it. If a callback is - * provided, it is added as a listener for the `'close'` event. - * @since v0.1.99 - * @param callback Called when the socket has been closed. - */ - close(callback?: () => void): this; - /** - * Associates the `dgram.Socket` to a remote address and port. Every - * message sent by this handle is automatically sent to that destination. Also, - * the socket will only receive messages from that remote peer. - * Trying to call `connect()` on an already connected socket will result - * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not - * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) - * will be used by default. Once the connection is complete, a `'connect'` event - * is emitted and the optional `callback` function is called. In case of failure, - * the `callback` is called or, failing this, an `'error'` event is emitted. - * @since v12.0.0 - * @param callback Called when the connection is completed or on error. - */ - connect(port: number, address?: string, callback?: () => void): void; - connect(port: number, callback: () => void): void; - /** - * A synchronous function that disassociates a connected `dgram.Socket` from - * its remote address. Trying to call `disconnect()` on an unbound or already - * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception. - * @since v12.0.0 - */ - disconnect(): void; - /** - * Instructs the kernel to leave a multicast group at `multicastAddress` using the `IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the - * kernel when the socket is closed or the process terminates, so most apps will - * never have reason to call this. - * - * If `multicastInterface` is not specified, the operating system will attempt to - * drop membership on all valid interfaces. - * @since v0.6.9 - */ - dropMembership(multicastAddress: string, multicastInterface?: string): void; - /** - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - * @return the `SO_RCVBUF` socket receive buffer size in bytes. - */ - getRecvBufferSize(): number; - /** - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - * @return the `SO_SNDBUF` socket send buffer size in bytes. - */ - getSendBufferSize(): number; - /** - * @since v18.8.0, v16.19.0 - * @return Number of bytes queued for sending. - */ - getSendQueueSize(): number; - /** - * @since v18.8.0, v16.19.0 - * @return Number of send requests currently in the queue awaiting to be processed. - */ - getSendQueueCount(): number; - /** - * By default, binding a socket will cause it to block the Node.js process from - * exiting as long as the socket is open. The `socket.unref()` method can be used - * to exclude the socket from the reference counting that keeps the Node.js - * process active. The `socket.ref()` method adds the socket back to the reference - * counting and restores the default behavior. - * - * Calling `socket.ref()` multiples times will have no additional effect. - * - * The `socket.ref()` method returns a reference to the socket so calls can be - * chained. - * @since v0.9.1 - */ - ref(): this; - /** - * Returns an object containing the `address`, `family`, and `port` of the remote - * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception - * if the socket is not connected. - * @since v12.0.0 - */ - remoteAddress(): AddressInfo; - /** - * Broadcasts a datagram on the socket. - * For connectionless sockets, the destination `port` and `address` must be - * specified. Connected sockets, on the other hand, will use their associated - * remote endpoint, so the `port` and `address` arguments must not be set. - * - * The `msg` argument contains the message to be sent. - * Depending on its type, different behavior can apply. If `msg` is a `Buffer`, - * any `TypedArray` or a `DataView`, - * the `offset` and `length` specify the offset within the `Buffer` where the - * message begins and the number of bytes in the message, respectively. - * If `msg` is a `String`, then it is automatically converted to a `Buffer` with `'utf8'` encoding. With messages that - * contain multi-byte characters, `offset` and `length` will be calculated with - * respect to `byte length` and not the character position. - * If `msg` is an array, `offset` and `length` must not be specified. - * - * The `address` argument is a string. If the value of `address` is a host name, - * DNS will be used to resolve the address of the host. If `address` is not - * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) will be used by default. - * - * If the socket has not been previously bound with a call to `bind`, the socket - * is assigned a random port number and is bound to the "all interfaces" address - * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.) - * - * An optional `callback` function may be specified to as a way of reporting - * DNS errors or for determining when it is safe to reuse the `buf` object. - * DNS lookups delay the time to send for at least one tick of the - * Node.js event loop. - * - * The only way to know for sure that the datagram has been sent is by using a `callback`. If an error occurs and a `callback` is given, the error will be - * passed as the first argument to the `callback`. If a `callback` is not given, - * the error is emitted as an `'error'` event on the `socket` object. - * - * Offset and length are optional but both _must_ be set if either are used. - * They are supported only when the first argument is a `Buffer`, a `TypedArray`, - * or a `DataView`. - * - * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket. - * - * Example of sending a UDP packet to a port on `localhost`; - * - * ```js - * import dgram from 'node:dgram'; - * import { Buffer } from 'node:buffer'; - * - * const message = Buffer.from('Some bytes'); - * const client = dgram.createSocket('udp4'); - * client.send(message, 41234, 'localhost', (err) => { - * client.close(); - * }); - * ``` - * - * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`; - * - * ```js - * import dgram from 'node:dgram'; - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('Some '); - * const buf2 = Buffer.from('bytes'); - * const client = dgram.createSocket('udp4'); - * client.send([buf1, buf2], 41234, (err) => { - * client.close(); - * }); - * ``` - * - * Sending multiple buffers might be faster or slower depending on the - * application and operating system. Run benchmarks to - * determine the optimal strategy on a case-by-case basis. Generally speaking, - * however, sending multiple buffers is faster. - * - * Example of sending a UDP packet using a socket connected to a port on `localhost`: - * - * ```js - * import dgram from 'node:dgram'; - * import { Buffer } from 'node:buffer'; - * - * const message = Buffer.from('Some bytes'); - * const client = dgram.createSocket('udp4'); - * client.connect(41234, 'localhost', (err) => { - * client.send(message, (err) => { - * client.close(); - * }); - * }); - * ``` - * @since v0.1.99 - * @param msg Message to be sent. - * @param offset Offset in the buffer where the message starts. - * @param length Number of bytes in the message. - * @param port Destination port. - * @param address Destination host name or IP address. - * @param callback Called when the message has been sent. - */ - send( - msg: string | NodeJS.ArrayBufferView | readonly any[], - port?: number, - address?: string, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView | readonly any[], - port?: number, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView | readonly any[], - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView, - offset: number, - length: number, - port?: number, - address?: string, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView, - offset: number, - length: number, - port?: number, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView, - offset: number, - length: number, - callback?: (error: Error | null, bytes: number) => void, - ): void; - /** - * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP - * packets may be sent to a local interface's broadcast address. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.6.9 - */ - setBroadcast(flag: boolean): void; - /** - * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC - * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_ - * _with a scope index is written as `'IP%scope'` where scope is an interface name_ - * _or interface number._ - * - * Sets the default outgoing multicast interface of the socket to a chosen - * interface or back to system interface selection. The `multicastInterface` must - * be a valid string representation of an IP from the socket's family. - * - * For IPv4 sockets, this should be the IP configured for the desired physical - * interface. All packets sent to multicast on the socket will be sent on the - * interface determined by the most recent successful use of this call. - * - * For IPv6 sockets, `multicastInterface` should include a scope to indicate the - * interface as in the examples that follow. In IPv6, individual `send` calls can - * also use explicit scope in addresses, so only packets sent to a multicast - * address without specifying an explicit scope are affected by the most recent - * successful use of this call. - * - * This method throws `EBADF` if called on an unbound socket. - * - * #### Example: IPv6 outgoing multicast interface - * - * On most systems, where scope format uses the interface name: - * - * ```js - * const socket = dgram.createSocket('udp6'); - * - * socket.bind(1234, () => { - * socket.setMulticastInterface('::%eth1'); - * }); - * ``` - * - * On Windows, where scope format uses an interface number: - * - * ```js - * const socket = dgram.createSocket('udp6'); - * - * socket.bind(1234, () => { - * socket.setMulticastInterface('::%2'); - * }); - * ``` - * - * #### Example: IPv4 outgoing multicast interface - * - * All systems use an IP of the host on the desired physical interface: - * - * ```js - * const socket = dgram.createSocket('udp4'); - * - * socket.bind(1234, () => { - * socket.setMulticastInterface('10.0.0.2'); - * }); - * ``` - * @since v8.6.0 - */ - setMulticastInterface(multicastInterface: string): void; - /** - * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`, - * multicast packets will also be received on the local interface. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.3.8 - */ - setMulticastLoopback(flag: boolean): boolean; - /** - * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for - * "Time to Live", in this context it specifies the number of IP hops that a - * packet is allowed to travel through, specifically for multicast traffic. Each - * router or gateway that forwards a packet decrements the TTL. If the TTL is - * decremented to 0 by a router, it will not be forwarded. - * - * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.3.8 - */ - setMulticastTTL(ttl: number): number; - /** - * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer - * in bytes. - * - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - */ - setRecvBufferSize(size: number): void; - /** - * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer - * in bytes. - * - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - */ - setSendBufferSize(size: number): void; - /** - * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live", - * in this context it specifies the number of IP hops that a packet is allowed to - * travel through. Each router or gateway that forwards a packet decrements the - * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. - * Changing TTL values is typically done for network probes or when multicasting. - * - * The `ttl` argument may be between 1 and 255\. The default on most systems - * is 64. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.1.101 - */ - setTTL(ttl: number): number; - /** - * By default, binding a socket will cause it to block the Node.js process from - * exiting as long as the socket is open. The `socket.unref()` method can be used - * to exclude the socket from the reference counting that keeps the Node.js - * process active, allowing the process to exit even if the socket is still - * listening. - * - * Calling `socket.unref()` multiple times will have no additional effect. - * - * The `socket.unref()` method returns a reference to the socket so calls can be - * chained. - * @since v0.9.1 - */ - unref(): this; - /** - * Tells the kernel to join a source-specific multicast channel at the given `sourceAddress` and `groupAddress`, using the `multicastInterface` with the `IP_ADD_SOURCE_MEMBERSHIP` socket - * option. If the `multicastInterface` argument - * is not specified, the operating system will choose one interface and will add - * membership to it. To add membership to every available interface, call `socket.addSourceSpecificMembership()` multiple times, once per interface. - * - * When called on an unbound socket, this method will implicitly bind to a random - * port, listening on all interfaces. - * @since v13.1.0, v12.16.0 - */ - addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; - /** - * Instructs the kernel to leave a source-specific multicast channel at the given `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP` socket option. This method is - * automatically called by the kernel when the - * socket is closed or the process terminates, so most apps will never have - * reason to call this. - * - * If `multicastInterface` is not specified, the operating system will attempt to - * drop membership on all valid interfaces. - * @since v13.1.0, v12.16.0 - */ - dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; - /** - * Calls `socket.close()` and returns a promise that fulfills when the socket has closed. - * @since v20.5.0 - */ - [Symbol.asyncDispose](): Promise; - } - interface Socket extends InternalEventEmitter {} -} -declare module "dgram" { - export * from "node:dgram"; -} diff --git a/node_modules/@types/node/diagnostics_channel.d.ts b/node_modules/@types/node/diagnostics_channel.d.ts deleted file mode 100644 index fa83612..0000000 --- a/node_modules/@types/node/diagnostics_channel.d.ts +++ /dev/null @@ -1,552 +0,0 @@ -declare module "node:diagnostics_channel" { - import { AsyncLocalStorage } from "node:async_hooks"; - /** - * Check if there are active subscribers to the named channel. This is helpful if - * the message you want to send might be expensive to prepare. - * - * This API is optional but helpful when trying to publish messages from very - * performance-sensitive code. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * if (diagnostics_channel.hasSubscribers('my-channel')) { - * // There are subscribers, prepare and publish message - * } - * ``` - * @since v15.1.0, v14.17.0 - * @param name The channel name - * @return If there are active subscribers - */ - function hasSubscribers(name: string | symbol): boolean; - /** - * This is the primary entry-point for anyone wanting to publish to a named - * channel. It produces a channel object which is optimized to reduce overhead at - * publish time as much as possible. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * ``` - * @since v15.1.0, v14.17.0 - * @param name The channel name - * @return The named channel object - */ - function channel(name: string | symbol): Channel; - type ChannelListener = (message: unknown, name: string | symbol) => void; - /** - * Register a message handler to subscribe to this channel. This message handler - * will be run synchronously whenever a message is published to the channel. Any - * errors thrown in the message handler will trigger an `'uncaughtException'`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * diagnostics_channel.subscribe('my-channel', (message, name) => { - * // Received data - * }); - * ``` - * @since v18.7.0, v16.17.0 - * @param name The channel name - * @param onMessage The handler to receive channel messages - */ - function subscribe(name: string | symbol, onMessage: ChannelListener): void; - /** - * Remove a message handler previously registered to this channel with {@link subscribe}. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * function onMessage(message, name) { - * // Received data - * } - * - * diagnostics_channel.subscribe('my-channel', onMessage); - * - * diagnostics_channel.unsubscribe('my-channel', onMessage); - * ``` - * @since v18.7.0, v16.17.0 - * @param name The channel name - * @param onMessage The previous subscribed handler to remove - * @return `true` if the handler was found, `false` otherwise. - */ - function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean; - /** - * Creates a `TracingChannel` wrapper for the given `TracingChannel Channels`. If a name is given, the corresponding tracing - * channels will be created in the form of `tracing:${name}:${eventType}` where `eventType` corresponds to the types of `TracingChannel Channels`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channelsByName = diagnostics_channel.tracingChannel('my-channel'); - * - * // or... - * - * const channelsByCollection = diagnostics_channel.tracingChannel({ - * start: diagnostics_channel.channel('tracing:my-channel:start'), - * end: diagnostics_channel.channel('tracing:my-channel:end'), - * asyncStart: diagnostics_channel.channel('tracing:my-channel:asyncStart'), - * asyncEnd: diagnostics_channel.channel('tracing:my-channel:asyncEnd'), - * error: diagnostics_channel.channel('tracing:my-channel:error'), - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param nameOrChannels Channel name or object containing all the `TracingChannel Channels` - * @return Collection of channels to trace with - */ - function tracingChannel< - StoreType = unknown, - ContextType extends object = StoreType extends object ? StoreType : object, - >( - nameOrChannels: string | TracingChannelCollection, - ): TracingChannel; - /** - * The class `Channel` represents an individual named channel within the data - * pipeline. It is used to track subscribers and to publish messages when there - * are subscribers present. It exists as a separate object to avoid channel - * lookups at publish time, enabling very fast publish speeds and allowing - * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly - * with `new Channel(name)` is not supported. - * @since v15.1.0, v14.17.0 - */ - class Channel { - readonly name: string | symbol; - /** - * Check if there are active subscribers to this channel. This is helpful if - * the message you want to send might be expensive to prepare. - * - * This API is optional but helpful when trying to publish messages from very - * performance-sensitive code. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * if (channel.hasSubscribers) { - * // There are subscribers, prepare and publish message - * } - * ``` - * @since v15.1.0, v14.17.0 - */ - readonly hasSubscribers: boolean; - private constructor(name: string | symbol); - /** - * Publish a message to any subscribers to the channel. This will trigger - * message handlers synchronously so they will execute within the same context. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.publish({ - * some: 'message', - * }); - * ``` - * @since v15.1.0, v14.17.0 - * @param message The message to send to the channel subscribers - */ - publish(message: unknown): void; - /** - * Register a message handler to subscribe to this channel. This message handler - * will be run synchronously whenever a message is published to the channel. Any - * errors thrown in the message handler will trigger an `'uncaughtException'`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.subscribe((message, name) => { - * // Received data - * }); - * ``` - * @since v15.1.0, v14.17.0 - * @param onMessage The handler to receive channel messages - */ - subscribe(onMessage: ChannelListener): void; - /** - * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * function onMessage(message, name) { - * // Received data - * } - * - * channel.subscribe(onMessage); - * - * channel.unsubscribe(onMessage); - * ``` - * @since v15.1.0, v14.17.0 - * @param onMessage The previous subscribed handler to remove - * @return `true` if the handler was found, `false` otherwise. - */ - unsubscribe(onMessage: ChannelListener): void; - /** - * When `channel.runStores(context, ...)` is called, the given context data - * will be applied to any store bound to the channel. If the store has already been - * bound the previous `transform` function will be replaced with the new one. - * The `transform` function may be omitted to set the given context data as the - * context directly. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const store = new AsyncLocalStorage(); - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.bindStore(store, (data) => { - * return { data }; - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param store The store to which to bind the context data - * @param transform Transform context data before setting the store context - */ - bindStore(store: AsyncLocalStorage, transform?: (context: ContextType) => StoreType): void; - /** - * Remove a message handler previously registered to this channel with `channel.bindStore(store)`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const store = new AsyncLocalStorage(); - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.bindStore(store); - * channel.unbindStore(store); - * ``` - * @since v19.9.0 - * @experimental - * @param store The store to unbind from the channel. - * @return `true` if the store was found, `false` otherwise. - */ - unbindStore(store: AsyncLocalStorage): boolean; - /** - * Applies the given data to any AsyncLocalStorage instances bound to the channel - * for the duration of the given function, then publishes to the channel within - * the scope of that data is applied to the stores. - * - * If a transform function was given to `channel.bindStore(store)` it will be - * applied to transform the message data before it becomes the context value for - * the store. The prior storage context is accessible from within the transform - * function in cases where context linking is required. - * - * The context applied to the store should be accessible in any async code which - * continues from execution which began during the given function, however - * there are some situations in which `context loss` may occur. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const store = new AsyncLocalStorage(); - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.bindStore(store, (message) => { - * const parent = store.getStore(); - * return new Span(message, parent); - * }); - * channel.runStores({ some: 'message' }, () => { - * store.getStore(); // Span({ some: 'message' }) - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param context Message to send to subscribers and bind to stores - * @param fn Handler to run within the entered storage context - * @param thisArg The receiver to be used for the function call. - * @param args Optional arguments to pass to the function. - */ - runStores( - context: ContextType, - fn: (this: ThisArg, ...args: Args) => Result, - thisArg?: ThisArg, - ...args: Args - ): Result; - } - interface TracingChannelSubscribers { - start: (message: ContextType) => void; - end: ( - message: ContextType & { - error?: unknown; - result?: unknown; - }, - ) => void; - asyncStart: ( - message: ContextType & { - error?: unknown; - result?: unknown; - }, - ) => void; - asyncEnd: ( - message: ContextType & { - error?: unknown; - result?: unknown; - }, - ) => void; - error: ( - message: ContextType & { - error: unknown; - }, - ) => void; - } - interface TracingChannelCollection { - start: Channel; - end: Channel; - asyncStart: Channel; - asyncEnd: Channel; - error: Channel; - } - /** - * The class `TracingChannel` is a collection of `TracingChannel Channels` which - * together express a single traceable action. It is used to formalize and - * simplify the process of producing events for tracing application flow. {@link tracingChannel} is used to construct a `TracingChannel`. As with `Channel` it is recommended to create and reuse a - * single `TracingChannel` at the top-level of the file rather than creating them - * dynamically. - * @since v19.9.0 - * @experimental - */ - class TracingChannel implements TracingChannelCollection { - start: Channel; - end: Channel; - asyncStart: Channel; - asyncEnd: Channel; - error: Channel; - /** - * Helper to subscribe a collection of functions to the corresponding channels. - * This is the same as calling `channel.subscribe(onMessage)` on each channel - * individually. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.subscribe({ - * start(message) { - * // Handle start message - * }, - * end(message) { - * // Handle end message - * }, - * asyncStart(message) { - * // Handle asyncStart message - * }, - * asyncEnd(message) { - * // Handle asyncEnd message - * }, - * error(message) { - * // Handle error message - * }, - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param subscribers Set of `TracingChannel Channels` subscribers - */ - subscribe(subscribers: TracingChannelSubscribers): void; - /** - * Helper to unsubscribe a collection of functions from the corresponding channels. - * This is the same as calling `channel.unsubscribe(onMessage)` on each channel - * individually. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.unsubscribe({ - * start(message) { - * // Handle start message - * }, - * end(message) { - * // Handle end message - * }, - * asyncStart(message) { - * // Handle asyncStart message - * }, - * asyncEnd(message) { - * // Handle asyncEnd message - * }, - * error(message) { - * // Handle error message - * }, - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param subscribers Set of `TracingChannel Channels` subscribers - * @return `true` if all handlers were successfully unsubscribed, and `false` otherwise. - */ - unsubscribe(subscribers: TracingChannelSubscribers): void; - /** - * Trace a synchronous function call. This will always produce a `start event` and `end event` around the execution and may produce an `error event` if the given function throws an error. - * This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all - * events should have any bound stores set to match this trace context. - * - * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions - * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.traceSync(() => { - * // Do something - * }, { - * some: 'thing', - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param fn Function to wrap a trace around - * @param context Shared object to correlate events through - * @param thisArg The receiver to be used for the function call - * @param args Optional arguments to pass to the function - * @return The return value of the given function - */ - traceSync( - fn: (this: ThisArg, ...args: Args) => Result, - context?: ContextType, - thisArg?: ThisArg, - ...args: Args - ): Result; - /** - * Trace a promise-returning function call. This will always produce a `start event` and `end event` around the synchronous portion of the - * function execution, and will produce an `asyncStart event` and `asyncEnd event` when a promise continuation is reached. It may also - * produce an `error event` if the given function throws an error or the - * returned promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all - * events should have any bound stores set to match this trace context. - * - * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions - * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.tracePromise(async () => { - * // Do something - * }, { - * some: 'thing', - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param fn Promise-returning function to wrap a trace around - * @param context Shared object to correlate trace events through - * @param thisArg The receiver to be used for the function call - * @param args Optional arguments to pass to the function - * @return Chained from promise returned by the given function - */ - tracePromise( - fn: (this: ThisArg, ...args: Args) => Promise, - context?: ContextType, - thisArg?: ThisArg, - ...args: Args - ): Promise; - /** - * Trace a callback-receiving function call. This will always produce a `start event` and `end event` around the synchronous portion of the - * function execution, and will produce a `asyncStart event` and `asyncEnd event` around the callback execution. It may also produce an `error event` if the given function throws an error or - * the returned - * promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all - * events should have any bound stores set to match this trace context. - * - * The `position` will be -1 by default to indicate the final argument should - * be used as the callback. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.traceCallback((arg1, callback) => { - * // Do something - * callback(null, 'result'); - * }, 1, { - * some: 'thing', - * }, thisArg, arg1, callback); - * ``` - * - * The callback will also be run with `channel.runStores(context, ...)` which - * enables context loss recovery in some cases. - * - * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions - * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * const myStore = new AsyncLocalStorage(); - * - * // The start channel sets the initial store data to something - * // and stores that store data value on the trace context object - * channels.start.bindStore(myStore, (data) => { - * const span = new Span(data); - * data.span = span; - * return span; - * }); - * - * // Then asyncStart can restore from that data it stored previously - * channels.asyncStart.bindStore(myStore, (data) => { - * return data.span; - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param fn callback using function to wrap a trace around - * @param position Zero-indexed argument position of expected callback - * @param context Shared object to correlate trace events through - * @param thisArg The receiver to be used for the function call - * @param args Optional arguments to pass to the function - * @return The return value of the given function - */ - traceCallback( - fn: (this: ThisArg, ...args: Args) => Result, - position?: number, - context?: ContextType, - thisArg?: ThisArg, - ...args: Args - ): Result; - /** - * `true` if any of the individual channels has a subscriber, `false` if not. - * - * This is a helper method available on a {@link TracingChannel} instance to check - * if any of the [TracingChannel Channels](https://nodejs.org/api/diagnostics_channel.html#tracingchannel-channels) have subscribers. - * A `true` is returned if any of them have at least one subscriber, a `false` is returned otherwise. - * - * ```js - * const diagnostics_channel = require('node:diagnostics_channel'); - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * if (channels.hasSubscribers) { - * // Do something - * } - * ``` - * @since v22.0.0, v20.13.0 - */ - readonly hasSubscribers: boolean; - } -} -declare module "diagnostics_channel" { - export * from "node:diagnostics_channel"; -} diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts deleted file mode 100644 index 2e0941e..0000000 --- a/node_modules/@types/node/dns.d.ts +++ /dev/null @@ -1,876 +0,0 @@ -declare module "node:dns" { - // Supported getaddrinfo flags. - /** - * Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are - * only returned if the current system has at least one IPv4 address configured. - */ - const ADDRCONFIG: number; - /** - * If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported - * on some operating systems (e.g. FreeBSD 10.1). - */ - const V4MAPPED: number; - /** - * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as - * well as IPv4 mapped IPv6 addresses. - */ - const ALL: number; - interface LookupOptions { - /** - * The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted - * as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used - * with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned. - * @default 0 - */ - family?: number | "IPv4" | "IPv6" | undefined; - /** - * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v25.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be - * passed by bitwise `OR`ing their values. - */ - hints?: number | undefined; - /** - * When `true`, the callback returns all resolved addresses in an array. Otherwise, returns a single address. - * @default false - */ - all?: boolean | undefined; - /** - * When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted - * by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6 - * addresses before IPv4 addresses. Default value is configurable using - * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder). - * @default `verbatim` (addresses are not reordered) - * @since v22.1.0 - */ - order?: "ipv4first" | "ipv6first" | "verbatim" | undefined; - /** - * When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4 - * addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified, - * `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder} - * @default true (addresses are not reordered) - * @deprecated Please use `order` option - */ - verbatim?: boolean | undefined; - } - interface LookupOneOptions extends LookupOptions { - all?: false | undefined; - } - interface LookupAllOptions extends LookupOptions { - all: true; - } - interface LookupAddress { - /** - * A string representation of an IPv4 or IPv6 address. - */ - address: string; - /** - * `4` or `6`, denoting the family of `address`, or `0` if the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a - * bug in the name resolution service used by the operating system. - */ - family: number; - } - /** - * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or - * AAAA (IPv6) record. All `option` properties are optional. If `options` is an - * integer, then it must be `4` or `6` – if `options` is `0` or not provided, then - * IPv4 and IPv6 addresses are both returned if found. - * - * With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the - * properties `address` and `family`. - * - * On error, `err` is an `Error` object, where `err.code` is the error code. - * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when - * the host name does not exist but also when the lookup fails in other ways - * such as no available file descriptors. - * - * `dns.lookup()` does not necessarily have anything to do with the DNS protocol. - * The implementation uses an operating system facility that can associate names - * with addresses and vice versa. This implementation can have subtle but - * important consequences on the behavior of any Node.js program. Please take some - * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations) - * before using `dns.lookup()`. - * - * Example usage: - * - * ```js - * import dns from 'node:dns'; - * const options = { - * family: 6, - * hints: dns.ADDRCONFIG | dns.V4MAPPED, - * }; - * dns.lookup('example.com', options, (err, address, family) => - * console.log('address: %j family: IPv%s', address, family)); - * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 - * - * // When options.all is true, the result will be an Array. - * options.all = true; - * dns.lookup('example.com', options, (err, addresses) => - * console.log('addresses: %j', addresses)); - * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] - * ``` - * - * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed - * version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties. - * @since v0.1.90 - */ - function lookup( - hostname: string, - family: number, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ): void; - function lookup( - hostname: string, - options: LookupOneOptions, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ): void; - function lookup( - hostname: string, - options: LookupAllOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void, - ): void; - function lookup( - hostname: string, - options: LookupOptions, - callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void, - ): void; - function lookup( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ): void; - namespace lookup { - function __promisify__(hostname: string, options: LookupAllOptions): Promise; - function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise; - function __promisify__(hostname: string, options: LookupOptions): Promise; - } - /** - * Resolves the given `address` and `port` into a host name and service using - * the operating system's underlying `getnameinfo` implementation. - * - * If `address` is not a valid IP address, a `TypeError` will be thrown. - * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. - * - * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object, - * where `err.code` is the error code. - * - * ```js - * import dns from 'node:dns'; - * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { - * console.log(hostname, service); - * // Prints: localhost ssh - * }); - * ``` - * - * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed - * version, it returns a `Promise` for an `Object` with `hostname` and `service` properties. - * @since v0.11.14 - */ - function lookupService( - address: string, - port: number, - callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void, - ): void; - namespace lookupService { - function __promisify__( - address: string, - port: number, - ): Promise<{ - hostname: string; - service: string; - }>; - } - interface ResolveOptions { - ttl: boolean; - } - interface ResolveWithTtlOptions extends ResolveOptions { - ttl: true; - } - interface RecordWithTtl { - address: string; - ttl: number; - } - interface AnyARecord extends RecordWithTtl { - type: "A"; - } - interface AnyAaaaRecord extends RecordWithTtl { - type: "AAAA"; - } - interface CaaRecord { - critical: number; - issue?: string | undefined; - issuewild?: string | undefined; - iodef?: string | undefined; - contactemail?: string | undefined; - contactphone?: string | undefined; - } - interface AnyCaaRecord extends CaaRecord { - type: "CAA"; - } - interface MxRecord { - priority: number; - exchange: string; - } - interface AnyMxRecord extends MxRecord { - type: "MX"; - } - interface NaptrRecord { - flags: string; - service: string; - regexp: string; - replacement: string; - order: number; - preference: number; - } - interface AnyNaptrRecord extends NaptrRecord { - type: "NAPTR"; - } - interface SoaRecord { - nsname: string; - hostmaster: string; - serial: number; - refresh: number; - retry: number; - expire: number; - minttl: number; - } - interface AnySoaRecord extends SoaRecord { - type: "SOA"; - } - interface SrvRecord { - priority: number; - weight: number; - port: number; - name: string; - } - interface AnySrvRecord extends SrvRecord { - type: "SRV"; - } - interface TlsaRecord { - certUsage: number; - selector: number; - match: number; - data: ArrayBuffer; - } - interface AnyTlsaRecord extends TlsaRecord { - type: "TLSA"; - } - interface AnyTxtRecord { - type: "TXT"; - entries: string[]; - } - interface AnyNsRecord { - type: "NS"; - value: string; - } - interface AnyPtrRecord { - type: "PTR"; - value: string; - } - interface AnyCnameRecord { - type: "CNAME"; - value: string; - } - type AnyRecord = - | AnyARecord - | AnyAaaaRecord - | AnyCaaRecord - | AnyCnameRecord - | AnyMxRecord - | AnyNaptrRecord - | AnyNsRecord - | AnyPtrRecord - | AnySoaRecord - | AnySrvRecord - | AnyTlsaRecord - | AnyTxtRecord; - /** - * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array - * of the resource records. The `callback` function has arguments `(err, records)`. When successful, `records` will be an array of resource - * records. The type and structure of individual results varies based on `rrtype`: - * - * - * - * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object, - * where `err.code` is one of the `DNS error codes`. - * @since v0.1.27 - * @param hostname Host name to resolve. - * @param [rrtype='A'] Resource record type. - */ - function resolve( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR", - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "ANY", - callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "CAA", - callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "MX", - callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "NAPTR", - callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "SOA", - callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void, - ): void; - function resolve( - hostname: string, - rrtype: "SRV", - callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "TLSA", - callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "TXT", - callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, - ): void; - function resolve( - hostname: string, - rrtype: string, - callback: ( - err: NodeJS.ErrnoException | null, - addresses: - | string[] - | CaaRecord[] - | MxRecord[] - | NaptrRecord[] - | SoaRecord - | SrvRecord[] - | TlsaRecord[] - | string[][] - | AnyRecord[], - ) => void, - ): void; - namespace resolve { - function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; - function __promisify__(hostname: string, rrtype: "ANY"): Promise; - function __promisify__(hostname: string, rrtype: "CAA"): Promise; - function __promisify__(hostname: string, rrtype: "MX"): Promise; - function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; - function __promisify__(hostname: string, rrtype: "SOA"): Promise; - function __promisify__(hostname: string, rrtype: "SRV"): Promise; - function __promisify__(hostname: string, rrtype: "TLSA"): Promise; - function __promisify__(hostname: string, rrtype: "TXT"): Promise; - function __promisify__( - hostname: string, - rrtype: string, - ): Promise< - | string[] - | CaaRecord[] - | MxRecord[] - | NaptrRecord[] - | SoaRecord - | SrvRecord[] - | TlsaRecord[] - | string[][] - | AnyRecord[] - >; - } - /** - * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`). - * @since v0.1.16 - * @param hostname Host name to resolve. - */ - function resolve4( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - function resolve4( - hostname: string, - options: ResolveWithTtlOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void, - ): void; - function resolve4( - hostname: string, - options: ResolveOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void, - ): void; - namespace resolve4 { - function __promisify__(hostname: string): Promise; - function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; - function __promisify__(hostname: string, options?: ResolveOptions): Promise; - } - /** - * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of IPv6 addresses. - * @since v0.1.16 - * @param hostname Host name to resolve. - */ - function resolve6( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - function resolve6( - hostname: string, - options: ResolveWithTtlOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void, - ): void; - function resolve6( - hostname: string, - options: ResolveOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void, - ): void; - namespace resolve6 { - function __promisify__(hostname: string): Promise; - function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; - function __promisify__(hostname: string, options?: ResolveOptions): Promise; - } - /** - * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`). - * @since v0.3.2 - */ - function resolveCname( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - namespace resolveCname { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of certification authority authorization records - * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`). - * @since v15.0.0, v14.17.0 - */ - function resolveCaa( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void, - ): void; - namespace resolveCaa { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`). - * @since v0.1.27 - */ - function resolveMx( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, - ): void; - namespace resolveMx { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of - * objects with the following properties: - * - * * `flags` - * * `service` - * * `regexp` - * * `replacement` - * * `order` - * * `preference` - * - * ```js - * { - * flags: 's', - * service: 'SIP+D2U', - * regexp: '', - * replacement: '_sip._udp.example.com', - * order: 30, - * preference: 100 - * } - * ``` - * @since v0.9.12 - */ - function resolveNaptr( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, - ): void; - namespace resolveNaptr { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`). - * @since v0.1.90 - */ - function resolveNs( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - namespace resolveNs { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * be an array of strings containing the reply records. - * @since v6.0.0 - */ - function resolvePtr( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - namespace resolvePtr { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for - * the `hostname`. The `address` argument passed to the `callback` function will - * be an object with the following properties: - * - * * `nsname` - * * `hostmaster` - * * `serial` - * * `refresh` - * * `retry` - * * `expire` - * * `minttl` - * - * ```js - * { - * nsname: 'ns.example.com', - * hostmaster: 'root.example.com', - * serial: 2013101809, - * refresh: 10000, - * retry: 2400, - * expire: 604800, - * minttl: 3600 - * } - * ``` - * @since v0.11.10 - */ - function resolveSoa( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void, - ): void; - namespace resolveSoa { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * be an array of objects with the following properties: - * - * * `priority` - * * `weight` - * * `port` - * * `name` - * - * ```js - * { - * priority: 10, - * weight: 5, - * port: 21223, - * name: 'service.example.com' - * } - * ``` - * @since v0.1.27 - */ - function resolveSrv( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, - ): void; - namespace resolveSrv { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for - * the `hostname`. The `records` argument passed to the `callback` function is an - * array of objects with these properties: - * - * * `certUsage` - * * `selector` - * * `match` - * * `data` - * - * ```js - * { - * certUsage: 3, - * selector: 1, - * match: 1, - * data: [ArrayBuffer] - * } - * ``` - * @since v23.9.0, v22.15.0 - */ - function resolveTlsa( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void, - ): void; - namespace resolveTlsa { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a - * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of - * one record. Depending on the use case, these could be either joined together or - * treated separately. - * @since v0.1.27 - */ - function resolveTxt( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, - ): void; - namespace resolveTxt { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). - * The `ret` argument passed to the `callback` function will be an array containing - * various types of records. Each object has a property `type` that indicates the - * type of the current record. And depending on the `type`, additional properties - * will be present on the object: - * - * - * - * Here is an example of the `ret` object passed to the callback: - * - * ```js - * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, - * { type: 'CNAME', value: 'example.com' }, - * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, - * { type: 'NS', value: 'ns1.example.com' }, - * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, - * { type: 'SOA', - * nsname: 'ns1.example.com', - * hostmaster: 'admin.example.com', - * serial: 156696742, - * refresh: 900, - * retry: 900, - * expire: 1800, - * minttl: 60 } ] - * ``` - * - * DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see - * [RFC 8482](https://tools.ietf.org/html/rfc8482). - */ - function resolveAny( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, - ): void; - namespace resolveAny { - function __promisify__(hostname: string): Promise; - } - /** - * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an - * array of host names. - * - * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object, where `err.code` is - * one of the [DNS error codes](https://nodejs.org/docs/latest-v25.x/api/dns.html#error-codes). - * @since v0.1.16 - */ - function reverse( - ip: string, - callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void, - ): void; - /** - * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options). - * The value could be: - * - * * `ipv4first`: for `order` defaulting to `ipv4first`. - * * `ipv6first`: for `order` defaulting to `ipv6first`. - * * `verbatim`: for `order` defaulting to `verbatim`. - * @since v18.17.0 - */ - function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim"; - /** - * Sets the IP address and port of servers to be used when performing DNS - * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted - * addresses. If the port is the IANA default DNS port (53) it can be omitted. - * - * ```js - * dns.setServers([ - * '4.4.4.4', - * '[2001:4860:4860::8888]', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ]); - * ``` - * - * An error will be thrown if an invalid address is provided. - * - * The `dns.setServers()` method must not be called while a DNS query is in - * progress. - * - * The {@link setServers} method affects only {@link resolve}, `dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}). - * - * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). - * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with - * subsequent servers provided. Fallback DNS servers will only be used if the - * earlier ones time out or result in some other error. - * @since v0.11.3 - * @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses - */ - function setServers(servers: readonly string[]): void; - /** - * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), - * that are currently configured for DNS resolution. A string will include a port - * section if a custom port is used. - * - * ```js - * [ - * '4.4.4.4', - * '2001:4860:4860::8888', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ] - * ``` - * @since v0.11.3 - */ - function getServers(): string[]; - /** - * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options). - * The value could be: - * - * * `ipv4first`: sets default `order` to `ipv4first`. - * * `ipv6first`: sets default `order` to `ipv6first`. - * * `verbatim`: sets default `order` to `verbatim`. - * - * The default is `verbatim` and {@link setDefaultResultOrder} have higher - * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder). When using - * [worker threads](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main - * thread won't affect the default dns orders in workers. - * @since v16.4.0, v14.18.0 - * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. - */ - function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; - // Error codes - const NODATA: "ENODATA"; - const FORMERR: "EFORMERR"; - const SERVFAIL: "ESERVFAIL"; - const NOTFOUND: "ENOTFOUND"; - const NOTIMP: "ENOTIMP"; - const REFUSED: "EREFUSED"; - const BADQUERY: "EBADQUERY"; - const BADNAME: "EBADNAME"; - const BADFAMILY: "EBADFAMILY"; - const BADRESP: "EBADRESP"; - const CONNREFUSED: "ECONNREFUSED"; - const TIMEOUT: "ETIMEOUT"; - const EOF: "EOF"; - const FILE: "EFILE"; - const NOMEM: "ENOMEM"; - const DESTRUCTION: "EDESTRUCTION"; - const BADSTR: "EBADSTR"; - const BADFLAGS: "EBADFLAGS"; - const NONAME: "ENONAME"; - const BADHINTS: "EBADHINTS"; - const NOTINITIALIZED: "ENOTINITIALIZED"; - const LOADIPHLPAPI: "ELOADIPHLPAPI"; - const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS"; - const CANCELLED: "ECANCELLED"; - interface ResolverOptions { - /** - * Query timeout in milliseconds, or `-1` to use the default timeout. - */ - timeout?: number | undefined; - /** - * The number of tries the resolver will try contacting each name server before giving up. - * @default 4 - */ - tries?: number | undefined; - /** - * The max retry timeout, in milliseconds. - * @default 0 - */ - maxTimeout?: number | undefined; - } - /** - * An independent resolver for DNS requests. - * - * Creating a new resolver uses the default server settings. Setting - * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnssetserversservers) does not affect - * other resolvers: - * - * ```js - * import { Resolver } from 'node:dns'; - * const resolver = new Resolver(); - * resolver.setServers(['4.4.4.4']); - * - * // This request will use the server at 4.4.4.4, independent of global settings. - * resolver.resolve4('example.org', (err, addresses) => { - * // ... - * }); - * ``` - * - * The following methods from the `node:dns` module are available: - * - * * `resolver.getServers()` - * * `resolver.resolve()` - * * `resolver.resolve4()` - * * `resolver.resolve6()` - * * `resolver.resolveAny()` - * * `resolver.resolveCaa()` - * * `resolver.resolveCname()` - * * `resolver.resolveMx()` - * * `resolver.resolveNaptr()` - * * `resolver.resolveNs()` - * * `resolver.resolvePtr()` - * * `resolver.resolveSoa()` - * * `resolver.resolveSrv()` - * * `resolver.resolveTxt()` - * * `resolver.reverse()` - * * `resolver.setServers()` - * @since v8.3.0 - */ - class Resolver { - constructor(options?: ResolverOptions); - /** - * Cancel all outstanding DNS queries made by this resolver. The corresponding - * callbacks will be called with an error with code `ECANCELLED`. - * @since v8.3.0 - */ - cancel(): void; - getServers: typeof getServers; - resolve: typeof resolve; - resolve4: typeof resolve4; - resolve6: typeof resolve6; - resolveAny: typeof resolveAny; - resolveCaa: typeof resolveCaa; - resolveCname: typeof resolveCname; - resolveMx: typeof resolveMx; - resolveNaptr: typeof resolveNaptr; - resolveNs: typeof resolveNs; - resolvePtr: typeof resolvePtr; - resolveSoa: typeof resolveSoa; - resolveSrv: typeof resolveSrv; - resolveTlsa: typeof resolveTlsa; - resolveTxt: typeof resolveTxt; - reverse: typeof reverse; - /** - * The resolver instance will send its requests from the specified IP address. - * This allows programs to specify outbound interfaces when used on multi-homed - * systems. - * - * If a v4 or v6 address is not specified, it is set to the default and the - * operating system will choose a local address automatically. - * - * The resolver will use the v4 local address when making requests to IPv4 DNS - * servers, and the v6 local address when making requests to IPv6 DNS servers. - * The `rrtype` of resolution requests has no impact on the local address used. - * @since v15.1.0, v14.17.0 - * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. - * @param [ipv6='::0'] A string representation of an IPv6 address. - */ - setLocalAddress(ipv4?: string, ipv6?: string): void; - setServers: typeof setServers; - } -} -declare module "node:dns" { - export * as promises from "node:dns/promises"; -} -declare module "dns" { - export * from "node:dns"; -} diff --git a/node_modules/@types/node/dns/promises.d.ts b/node_modules/@types/node/dns/promises.d.ts deleted file mode 100644 index b9e091c..0000000 --- a/node_modules/@types/node/dns/promises.d.ts +++ /dev/null @@ -1,497 +0,0 @@ -declare module "node:dns/promises" { - import { - AnyRecord, - CaaRecord, - LookupAddress, - LookupAllOptions, - LookupOneOptions, - LookupOptions, - MxRecord, - NaptrRecord, - RecordWithTtl, - ResolveOptions, - ResolverOptions, - ResolveWithTtlOptions, - SoaRecord, - SrvRecord, - TlsaRecord, - } from "node:dns"; - /** - * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), - * that are currently configured for DNS resolution. A string will include a port - * section if a custom port is used. - * - * ```js - * [ - * '4.4.4.4', - * '2001:4860:4860::8888', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ] - * ``` - * @since v10.6.0 - */ - function getServers(): string[]; - /** - * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or - * AAAA (IPv6) record. All `option` properties are optional. If `options` is an - * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 - * and IPv6 addresses are both returned if found. - * - * With the `all` option set to `true`, the `Promise` is resolved with `addresses` being an array of objects with the properties `address` and `family`. - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. - * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when - * the host name does not exist but also when the lookup fails in other ways - * such as no available file descriptors. - * - * [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options) does not necessarily have anything to do with the DNS - * protocol. The implementation uses an operating system facility that can - * associate names with addresses and vice versa. This implementation can have - * subtle but important consequences on the behavior of any Node.js program. Please - * take some time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) before - * using `dnsPromises.lookup()`. - * - * Example usage: - * - * ```js - * import dns from 'node:dns'; - * const dnsPromises = dns.promises; - * const options = { - * family: 6, - * hints: dns.ADDRCONFIG | dns.V4MAPPED, - * }; - * - * dnsPromises.lookup('example.com', options).then((result) => { - * console.log('address: %j family: IPv%s', result.address, result.family); - * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 - * }); - * - * // When options.all is true, the result will be an Array. - * options.all = true; - * dnsPromises.lookup('example.com', options).then((result) => { - * console.log('addresses: %j', result); - * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] - * }); - * ``` - * @since v10.6.0 - */ - function lookup(hostname: string, family: number): Promise; - function lookup(hostname: string, options: LookupOneOptions): Promise; - function lookup(hostname: string, options: LookupAllOptions): Promise; - function lookup(hostname: string, options: LookupOptions): Promise; - function lookup(hostname: string): Promise; - /** - * Resolves the given `address` and `port` into a host name and service using - * the operating system's underlying `getnameinfo` implementation. - * - * If `address` is not a valid IP address, a `TypeError` will be thrown. - * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. - * - * ```js - * import dnsPromises from 'node:dns'; - * dnsPromises.lookupService('127.0.0.1', 22).then((result) => { - * console.log(result.hostname, result.service); - * // Prints: localhost ssh - * }); - * ``` - * @since v10.6.0 - */ - function lookupService( - address: string, - port: number, - ): Promise<{ - hostname: string; - service: string; - }>; - /** - * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array - * of the resource records. When successful, the `Promise` is resolved with an - * array of resource records. The type and structure of individual results vary - * based on `rrtype`: - * - * - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` - * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). - * @since v10.6.0 - * @param hostname Host name to resolve. - * @param [rrtype='A'] Resource record type. - */ - function resolve(hostname: string): Promise; - function resolve(hostname: string, rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; - function resolve(hostname: string, rrtype: "ANY"): Promise; - function resolve(hostname: string, rrtype: "CAA"): Promise; - function resolve(hostname: string, rrtype: "MX"): Promise; - function resolve(hostname: string, rrtype: "NAPTR"): Promise; - function resolve(hostname: string, rrtype: "SOA"): Promise; - function resolve(hostname: string, rrtype: "SRV"): Promise; - function resolve(hostname: string, rrtype: "TLSA"): Promise; - function resolve(hostname: string, rrtype: "TXT"): Promise; - function resolve(hostname: string, rrtype: string): Promise< - | string[] - | CaaRecord[] - | MxRecord[] - | NaptrRecord[] - | SoaRecord - | SrvRecord[] - | TlsaRecord[] - | string[][] - | AnyRecord[] - >; - /** - * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4 - * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). - * @since v10.6.0 - * @param hostname Host name to resolve. - */ - function resolve4(hostname: string): Promise; - function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; - function resolve4(hostname: string, options: ResolveOptions): Promise; - /** - * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv6 - * addresses. - * @since v10.6.0 - * @param hostname Host name to resolve. - */ - function resolve6(hostname: string): Promise; - function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; - function resolve6(hostname: string, options: ResolveOptions): Promise; - /** - * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). - * On success, the `Promise` is resolved with an array containing various types of - * records. Each object has a property `type` that indicates the type of the - * current record. And depending on the `type`, additional properties will be - * present on the object: - * - * - * - * Here is an example of the result object: - * - * ```js - * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, - * { type: 'CNAME', value: 'example.com' }, - * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, - * { type: 'NS', value: 'ns1.example.com' }, - * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, - * { type: 'SOA', - * nsname: 'ns1.example.com', - * hostmaster: 'admin.example.com', - * serial: 156696742, - * refresh: 900, - * retry: 900, - * expire: 1800, - * minttl: 60 } ] - * ``` - * @since v10.6.0 - */ - function resolveAny(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success, - * the `Promise` is resolved with an array of objects containing available - * certification authority authorization records available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`). - * @since v15.0.0, v14.17.0 - */ - function resolveCaa(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success, - * the `Promise` is resolved with an array of canonical name records available for - * the `hostname` (e.g. `['bar.example.com']`). - * @since v10.6.0 - */ - function resolveCname(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects - * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`). - * @since v10.6.0 - */ - function resolveMx(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. On success, the `Promise` is resolved with an array - * of objects with the following properties: - * - * * `flags` - * * `service` - * * `regexp` - * * `replacement` - * * `order` - * * `preference` - * - * ```js - * { - * flags: 's', - * service: 'SIP+D2U', - * regexp: '', - * replacement: '_sip._udp.example.com', - * order: 30, - * preference: 100 - * } - * ``` - * @since v10.6.0 - */ - function resolveNaptr(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. On success, the `Promise` is resolved with an array of name server - * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`). - * @since v10.6.0 - */ - function resolveNs(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. On success, the `Promise` is resolved with an array of strings - * containing the reply records. - * @since v10.6.0 - */ - function resolvePtr(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for - * the `hostname`. On success, the `Promise` is resolved with an object with the - * following properties: - * - * * `nsname` - * * `hostmaster` - * * `serial` - * * `refresh` - * * `retry` - * * `expire` - * * `minttl` - * - * ```js - * { - * nsname: 'ns.example.com', - * hostmaster: 'root.example.com', - * serial: 2013101809, - * refresh: 10000, - * retry: 2400, - * expire: 604800, - * minttl: 3600 - * } - * ``` - * @since v10.6.0 - */ - function resolveSoa(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects with - * the following properties: - * - * * `priority` - * * `weight` - * * `port` - * * `name` - * - * ```js - * { - * priority: 10, - * weight: 5, - * port: 21223, - * name: 'service.example.com' - * } - * ``` - * @since v10.6.0 - */ - function resolveSrv(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for - * the `hostname`. On success, the `Promise` is resolved with an array of objectsAdd commentMore actions - * with these properties: - * - * * `certUsage` - * * `selector` - * * `match` - * * `data` - * - * ```js - * { - * certUsage: 3, - * selector: 1, - * match: 1, - * data: [ArrayBuffer] - * } - * ``` - * @since v23.9.0, v22.15.0 - */ - function resolveTlsa(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array - * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of - * one record. Depending on the use case, these could be either joined together or - * treated separately. - * @since v10.6.0 - */ - function resolveTxt(hostname: string): Promise; - /** - * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an - * array of host names. - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` - * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). - * @since v10.6.0 - */ - function reverse(ip: string): Promise; - /** - * Get the default value for `verbatim` in {@link lookup} and [dnsPromises.lookup()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options). - * The value could be: - * - * * `ipv4first`: for `verbatim` defaulting to `false`. - * * `verbatim`: for `verbatim` defaulting to `true`. - * @since v20.1.0 - */ - function getDefaultResultOrder(): "ipv4first" | "verbatim"; - /** - * Sets the IP address and port of servers to be used when performing DNS - * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted - * addresses. If the port is the IANA default DNS port (53) it can be omitted. - * - * ```js - * dnsPromises.setServers([ - * '4.4.4.4', - * '[2001:4860:4860::8888]', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ]); - * ``` - * - * An error will be thrown if an invalid address is provided. - * - * The `dnsPromises.setServers()` method must not be called while a DNS query is in - * progress. - * - * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). - * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with - * subsequent servers provided. Fallback DNS servers will only be used if the - * earlier ones time out or result in some other error. - * @since v10.6.0 - * @param servers array of `RFC 5952` formatted addresses - */ - function setServers(servers: readonly string[]): void; - /** - * Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be: - * - * * `ipv4first`: sets default `order` to `ipv4first`. - * * `ipv6first`: sets default `order` to `ipv6first`. - * * `verbatim`: sets default `order` to `verbatim`. - * - * The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) - * have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). - * When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) - * from the main thread won't affect the default dns orders in workers. - * @since v16.4.0, v14.18.0 - * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. - */ - function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; - // Error codes - const NODATA: "ENODATA"; - const FORMERR: "EFORMERR"; - const SERVFAIL: "ESERVFAIL"; - const NOTFOUND: "ENOTFOUND"; - const NOTIMP: "ENOTIMP"; - const REFUSED: "EREFUSED"; - const BADQUERY: "EBADQUERY"; - const BADNAME: "EBADNAME"; - const BADFAMILY: "EBADFAMILY"; - const BADRESP: "EBADRESP"; - const CONNREFUSED: "ECONNREFUSED"; - const TIMEOUT: "ETIMEOUT"; - const EOF: "EOF"; - const FILE: "EFILE"; - const NOMEM: "ENOMEM"; - const DESTRUCTION: "EDESTRUCTION"; - const BADSTR: "EBADSTR"; - const BADFLAGS: "EBADFLAGS"; - const NONAME: "ENONAME"; - const BADHINTS: "EBADHINTS"; - const NOTINITIALIZED: "ENOTINITIALIZED"; - const LOADIPHLPAPI: "ELOADIPHLPAPI"; - const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS"; - const CANCELLED: "ECANCELLED"; - - /** - * An independent resolver for DNS requests. - * - * Creating a new resolver uses the default server settings. Setting - * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetserversservers) does not affect - * other resolvers: - * - * ```js - * import { promises } from 'node:dns'; - * const resolver = new promises.Resolver(); - * resolver.setServers(['4.4.4.4']); - * - * // This request will use the server at 4.4.4.4, independent of global settings. - * resolver.resolve4('example.org').then((addresses) => { - * // ... - * }); - * - * // Alternatively, the same code can be written using async-await style. - * (async function() { - * const addresses = await resolver.resolve4('example.org'); - * })(); - * ``` - * - * The following methods from the `dnsPromises` API are available: - * - * * `resolver.getServers()` - * * `resolver.resolve()` - * * `resolver.resolve4()` - * * `resolver.resolve6()` - * * `resolver.resolveAny()` - * * `resolver.resolveCaa()` - * * `resolver.resolveCname()` - * * `resolver.resolveMx()` - * * `resolver.resolveNaptr()` - * * `resolver.resolveNs()` - * * `resolver.resolvePtr()` - * * `resolver.resolveSoa()` - * * `resolver.resolveSrv()` - * * `resolver.resolveTxt()` - * * `resolver.reverse()` - * * `resolver.setServers()` - * @since v10.6.0 - */ - class Resolver { - constructor(options?: ResolverOptions); - /** - * Cancel all outstanding DNS queries made by this resolver. The corresponding - * callbacks will be called with an error with code `ECANCELLED`. - * @since v8.3.0 - */ - cancel(): void; - getServers: typeof getServers; - resolve: typeof resolve; - resolve4: typeof resolve4; - resolve6: typeof resolve6; - resolveAny: typeof resolveAny; - resolveCaa: typeof resolveCaa; - resolveCname: typeof resolveCname; - resolveMx: typeof resolveMx; - resolveNaptr: typeof resolveNaptr; - resolveNs: typeof resolveNs; - resolvePtr: typeof resolvePtr; - resolveSoa: typeof resolveSoa; - resolveSrv: typeof resolveSrv; - resolveTlsa: typeof resolveTlsa; - resolveTxt: typeof resolveTxt; - reverse: typeof reverse; - /** - * The resolver instance will send its requests from the specified IP address. - * This allows programs to specify outbound interfaces when used on multi-homed - * systems. - * - * If a v4 or v6 address is not specified, it is set to the default and the - * operating system will choose a local address automatically. - * - * The resolver will use the v4 local address when making requests to IPv4 DNS - * servers, and the v6 local address when making requests to IPv6 DNS servers. - * The `rrtype` of resolution requests has no impact on the local address used. - * @since v15.1.0, v14.17.0 - * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. - * @param [ipv6='::0'] A string representation of an IPv6 address. - */ - setLocalAddress(ipv4?: string, ipv6?: string): void; - setServers: typeof setServers; - } -} -declare module "dns/promises" { - export * from "node:dns/promises"; -} diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts deleted file mode 100644 index 8e03a7d..0000000 --- a/node_modules/@types/node/domain.d.ts +++ /dev/null @@ -1,150 +0,0 @@ -declare module "node:domain" { - import { EventEmitter } from "node:events"; - /** - * The `Domain` class encapsulates the functionality of routing errors and - * uncaught exceptions to the active `Domain` object. - * - * To handle the errors that it catches, listen to its `'error'` event. - */ - class Domain extends EventEmitter { - /** - * An array of event emitters that have been explicitly added to the domain. - */ - members: EventEmitter[]; - /** - * The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly - * pushes the domain onto the domain - * stack managed by the domain module (see {@link exit} for details on the - * domain stack). The call to `enter()` delimits the beginning of a chain of - * asynchronous calls and I/O operations bound to a domain. - * - * Calling `enter()` changes only the active domain, and does not alter the domain - * itself. `enter()` and `exit()` can be called an arbitrary number of times on a - * single domain. - */ - enter(): void; - /** - * The `exit()` method exits the current domain, popping it off the domain stack. - * Any time execution is going to switch to the context of a different chain of - * asynchronous calls, it's important to ensure that the current domain is exited. - * The call to `exit()` delimits either the end of or an interruption to the chain - * of asynchronous calls and I/O operations bound to a domain. - * - * If there are multiple, nested domains bound to the current execution context, `exit()` will exit any domains nested within this domain. - * - * Calling `exit()` changes only the active domain, and does not alter the domain - * itself. `enter()` and `exit()` can be called an arbitrary number of times on a - * single domain. - */ - exit(): void; - /** - * Run the supplied function in the context of the domain, implicitly - * binding all event emitters, timers, and low-level requests that are - * created in that context. Optionally, arguments can be passed to - * the function. - * - * This is the most basic way to use a domain. - * - * ```js - * import domain from 'node:domain'; - * import fs from 'node:fs'; - * const d = domain.create(); - * d.on('error', (er) => { - * console.error('Caught error!', er); - * }); - * d.run(() => { - * process.nextTick(() => { - * setTimeout(() => { // Simulating some various async stuff - * fs.open('non-existent file', 'r', (er, fd) => { - * if (er) throw er; - * // proceed... - * }); - * }, 100); - * }); - * }); - * ``` - * - * In this example, the `d.on('error')` handler will be triggered, rather - * than crashing the program. - */ - run(fn: (...args: any[]) => T, ...args: any[]): T; - /** - * Explicitly adds an emitter to the domain. If any event handlers called by - * the emitter throw an error, or if the emitter emits an `'error'` event, it - * will be routed to the domain's `'error'` event, just like with implicit - * binding. - * - * If the `EventEmitter` was already bound to a domain, it is removed from that - * one, and bound to this one instead. - * @param emitter emitter to be added to the domain - */ - add(emitter: EventEmitter): void; - /** - * The opposite of {@link add}. Removes domain handling from the - * specified emitter. - * @param emitter emitter to be removed from the domain - */ - remove(emitter: EventEmitter): void; - /** - * The returned function will be a wrapper around the supplied callback - * function. When the returned function is called, any errors that are - * thrown will be routed to the domain's `'error'` event. - * - * ```js - * const d = domain.create(); - * - * function readSomeFile(filename, cb) { - * fs.readFile(filename, 'utf8', d.bind((er, data) => { - * // If this throws, it will also be passed to the domain. - * return cb(er, data ? JSON.parse(data) : null); - * })); - * } - * - * d.on('error', (er) => { - * // An error occurred somewhere. If we throw it now, it will crash the program - * // with the normal line number and stack message. - * }); - * ``` - * @param callback The callback function - * @return The bound function - */ - bind(callback: T): T; - /** - * This method is almost identical to {@link bind}. However, in - * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function. - * - * In this way, the common `if (err) return callback(err);` pattern can be replaced - * with a single error handler in a single place. - * - * ```js - * const d = domain.create(); - * - * function readSomeFile(filename, cb) { - * fs.readFile(filename, 'utf8', d.intercept((data) => { - * // Note, the first argument is never passed to the - * // callback since it is assumed to be the 'Error' argument - * // and thus intercepted by the domain. - * - * // If this throws, it will also be passed to the domain - * // so the error-handling logic can be moved to the 'error' - * // event on the domain instead of being repeated throughout - * // the program. - * return cb(null, JSON.parse(data)); - * })); - * } - * - * d.on('error', (er) => { - * // An error occurred somewhere. If we throw it now, it will crash the program - * // with the normal line number and stack message. - * }); - * ``` - * @param callback The callback function - * @return The intercepted function - */ - intercept(callback: T): T; - } - function create(): Domain; -} -declare module "domain" { - export * from "node:domain"; -} diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts deleted file mode 100644 index f481a32..0000000 --- a/node_modules/@types/node/events.d.ts +++ /dev/null @@ -1,1008 +0,0 @@ -declare module "node:events" { - import { AsyncResource, AsyncResourceOptions } from "node:async_hooks"; - // #region Event map helpers - type EventMap = Record; - type IfEventMap, True, False> = {} extends Events ? False : True; - type Args, EventName extends string | symbol> = IfEventMap< - Events, - EventName extends keyof Events ? Events[EventName] - : EventName extends keyof EventEmitterEventMap ? EventEmitterEventMap[EventName] - : any[], - any[] - >; - type EventNames, EventName extends string | symbol> = IfEventMap< - Events, - EventName | (keyof Events & (string | symbol)) | keyof EventEmitterEventMap, - string | symbol - >; - type Listener, EventName extends string | symbol> = IfEventMap< - Events, - ( - ...args: EventName extends keyof Events ? Events[EventName] - : EventName extends keyof EventEmitterEventMap ? EventEmitterEventMap[EventName] - : any[] - ) => void, - (...args: any[]) => void - >; - interface EventEmitterEventMap { - newListener: [eventName: string | symbol, listener: (...args: any[]) => void]; - removeListener: [eventName: string | symbol, listener: (...args: any[]) => void]; - } - // #endregion - interface EventEmitterOptions { - /** - * It enables - * [automatic capturing of promise rejection](https://nodejs.org/docs/latest-v25.x/api/events.html#capture-rejections-of-promises). - * @default false - */ - captureRejections?: boolean | undefined; - } - /** - * The `EventEmitter` class is defined and exposed by the `node:events` module: - * - * ```js - * import { EventEmitter } from 'node:events'; - * ``` - * - * All `EventEmitter`s emit the event `'newListener'` when new listeners are - * added and `'removeListener'` when existing listeners are removed. - * - * It supports the following option: - * @since v0.1.26 - */ - class EventEmitter = any> { - constructor(options?: EventEmitterOptions); - } - interface EventEmitter = any> extends NodeJS.EventEmitter {} - global { - namespace NodeJS { - interface EventEmitter = any> { - /** - * The `Symbol.for('nodejs.rejection')` method is called in case a - * promise rejection happens when emitting an event and - * `captureRejections` is enabled on the emitter. - * It is possible to use `events.captureRejectionSymbol` in - * place of `Symbol.for('nodejs.rejection')`. - * - * ```js - * import { EventEmitter, captureRejectionSymbol } from 'node:events'; - * - * class MyClass extends EventEmitter { - * constructor() { - * super({ captureRejections: true }); - * } - * - * [captureRejectionSymbol](err, event, ...args) { - * console.log('rejection happened for', event, 'with', err, ...args); - * this.destroy(err); - * } - * - * destroy(err) { - * // Tear the resource down here. - * } - * } - * ``` - * @since v13.4.0, v12.16.0 - */ - [EventEmitter.captureRejectionSymbol]?(error: Error, event: string | symbol, ...args: any[]): void; - /** - * Alias for `emitter.on(eventName, listener)`. - * @since v0.1.26 - */ - addListener(eventName: EventNames, listener: Listener): this; - /** - * Synchronously calls each of the listeners registered for the event named - * `eventName`, in the order they were registered, passing the supplied arguments - * to each. - * - * Returns `true` if the event had listeners, `false` otherwise. - * - * ```js - * import { EventEmitter } from 'node:events'; - * const myEmitter = new EventEmitter(); - * - * // First listener - * myEmitter.on('event', function firstListener() { - * console.log('Helloooo! first listener'); - * }); - * // Second listener - * myEmitter.on('event', function secondListener(arg1, arg2) { - * console.log(`event with parameters ${arg1}, ${arg2} in second listener`); - * }); - * // Third listener - * myEmitter.on('event', function thirdListener(...args) { - * const parameters = args.join(', '); - * console.log(`event with parameters ${parameters} in third listener`); - * }); - * - * console.log(myEmitter.listeners('event')); - * - * myEmitter.emit('event', 1, 2, 3, 4, 5); - * - * // Prints: - * // [ - * // [Function: firstListener], - * // [Function: secondListener], - * // [Function: thirdListener] - * // ] - * // Helloooo! first listener - * // event with parameters 1, 2 in second listener - * // event with parameters 1, 2, 3, 4, 5 in third listener - * ``` - * @since v0.1.26 - */ - emit(eventName: EventNames, ...args: Args): boolean; - /** - * Returns an array listing the events for which the emitter has registered - * listeners. - * - * ```js - * import { EventEmitter } from 'node:events'; - * - * const myEE = new EventEmitter(); - * myEE.on('foo', () => {}); - * myEE.on('bar', () => {}); - * - * const sym = Symbol('symbol'); - * myEE.on(sym, () => {}); - * - * console.log(myEE.eventNames()); - * // Prints: [ 'foo', 'bar', Symbol(symbol) ] - * ``` - * @since v6.0.0 - */ - eventNames(): (string | symbol)[]; - /** - * Returns the current max listener value for the `EventEmitter` which is either - * set by `emitter.setMaxListeners(n)` or defaults to - * `events.defaultMaxListeners`. - * @since v1.0.0 - */ - getMaxListeners(): number; - /** - * Returns the number of listeners listening for the event named `eventName`. - * If `listener` is provided, it will return how many times the listener is found - * in the list of the listeners of the event. - * @since v3.2.0 - * @param eventName The name of the event being listened for - * @param listener The event handler function - */ - listenerCount( - eventName: EventNames, - listener?: Listener, - ): number; - /** - * Returns a copy of the array of listeners for the event named `eventName`. - * - * ```js - * server.on('connection', (stream) => { - * console.log('someone connected!'); - * }); - * console.log(util.inspect(server.listeners('connection'))); - * // Prints: [ [Function] ] - * ``` - * @since v0.1.26 - */ - listeners(eventName: EventNames): Listener[]; - /** - * Alias for `emitter.removeListener()`. - * @since v10.0.0 - */ - off(eventName: EventNames, listener: Listener): this; - /** - * Adds the `listener` function to the end of the listeners array for the - * event named `eventName`. No checks are made to see if the `listener` has - * already been added. Multiple calls passing the same combination of `eventName` - * and `listener` will result in the `listener` being added, and called, multiple - * times. - * - * ```js - * server.on('connection', (stream) => { - * console.log('someone connected!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * - * By default, event listeners are invoked in the order they are added. The - * `emitter.prependListener()` method can be used as an alternative to add the - * event listener to the beginning of the listeners array. - * - * ```js - * import { EventEmitter } from 'node:events'; - * const myEE = new EventEmitter(); - * myEE.on('foo', () => console.log('a')); - * myEE.prependListener('foo', () => console.log('b')); - * myEE.emit('foo'); - * // Prints: - * // b - * // a - * ``` - * @since v0.1.101 - * @param eventName The name of the event. - * @param listener The callback function - */ - on(eventName: EventNames, listener: Listener): this; - /** - * Adds a **one-time** `listener` function for the event named `eventName`. The - * next time `eventName` is triggered, this listener is removed and then invoked. - * - * ```js - * server.once('connection', (stream) => { - * console.log('Ah, we have our first user!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * - * By default, event listeners are invoked in the order they are added. The - * `emitter.prependOnceListener()` method can be used as an alternative to add the - * event listener to the beginning of the listeners array. - * - * ```js - * import { EventEmitter } from 'node:events'; - * const myEE = new EventEmitter(); - * myEE.once('foo', () => console.log('a')); - * myEE.prependOnceListener('foo', () => console.log('b')); - * myEE.emit('foo'); - * // Prints: - * // b - * // a - * ``` - * @since v0.3.0 - * @param eventName The name of the event. - * @param listener The callback function - */ - once(eventName: EventNames, listener: Listener): this; - /** - * Adds the `listener` function to the _beginning_ of the listeners array for the - * event named `eventName`. No checks are made to see if the `listener` has - * already been added. Multiple calls passing the same combination of `eventName` - * and `listener` will result in the `listener` being added, and called, multiple - * times. - * - * ```js - * server.prependListener('connection', (stream) => { - * console.log('someone connected!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v6.0.0 - * @param eventName The name of the event. - * @param listener The callback function - */ - prependListener(eventName: EventNames, listener: Listener): this; - /** - * Adds a **one-time** `listener` function for the event named `eventName` to the - * _beginning_ of the listeners array. The next time `eventName` is triggered, this - * listener is removed, and then invoked. - * - * ```js - * server.prependOnceListener('connection', (stream) => { - * console.log('Ah, we have our first user!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v6.0.0 - * @param eventName The name of the event. - * @param listener The callback function - */ - prependOnceListener( - eventName: EventNames, - listener: Listener, - ): this; - /** - * Returns a copy of the array of listeners for the event named `eventName`, - * including any wrappers (such as those created by `.once()`). - * - * ```js - * import { EventEmitter } from 'node:events'; - * const emitter = new EventEmitter(); - * emitter.once('log', () => console.log('log once')); - * - * // Returns a new Array with a function `onceWrapper` which has a property - * // `listener` which contains the original listener bound above - * const listeners = emitter.rawListeners('log'); - * const logFnWrapper = listeners[0]; - * - * // Logs "log once" to the console and does not unbind the `once` event - * logFnWrapper.listener(); - * - * // Logs "log once" to the console and removes the listener - * logFnWrapper(); - * - * emitter.on('log', () => console.log('log persistently')); - * // Will return a new Array with a single function bound by `.on()` above - * const newListeners = emitter.rawListeners('log'); - * - * // Logs "log persistently" twice - * newListeners[0](); - * emitter.emit('log'); - * ``` - * @since v9.4.0 - */ - rawListeners(eventName: EventNames): Listener[]; - /** - * Removes all listeners, or those of the specified `eventName`. - * - * It is bad practice to remove listeners added elsewhere in the code, - * particularly when the `EventEmitter` instance was created by some other - * component or module (e.g. sockets or file streams). - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v0.1.26 - */ - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: EventNames): this; - /** - * Removes the specified `listener` from the listener array for the event named - * `eventName`. - * - * ```js - * const callback = (stream) => { - * console.log('someone connected!'); - * }; - * server.on('connection', callback); - * // ... - * server.removeListener('connection', callback); - * ``` - * - * `removeListener()` will remove, at most, one instance of a listener from the - * listener array. If any single listener has been added multiple times to the - * listener array for the specified `eventName`, then `removeListener()` must be - * called multiple times to remove each instance. - * - * Once an event is emitted, all listeners attached to it at the - * time of emitting are called in order. This implies that any - * `removeListener()` or `removeAllListeners()` calls _after_ emitting and - * _before_ the last listener finishes execution will not remove them from - * `emit()` in progress. Subsequent events behave as expected. - * - * ```js - * import { EventEmitter } from 'node:events'; - * class MyEmitter extends EventEmitter {} - * const myEmitter = new MyEmitter(); - * - * const callbackA = () => { - * console.log('A'); - * myEmitter.removeListener('event', callbackB); - * }; - * - * const callbackB = () => { - * console.log('B'); - * }; - * - * myEmitter.on('event', callbackA); - * - * myEmitter.on('event', callbackB); - * - * // callbackA removes listener callbackB but it will still be called. - * // Internal listener array at time of emit [callbackA, callbackB] - * myEmitter.emit('event'); - * // Prints: - * // A - * // B - * - * // callbackB is now removed. - * // Internal listener array [callbackA] - * myEmitter.emit('event'); - * // Prints: - * // A - * ``` - * - * Because listeners are managed using an internal array, calling this will - * change the position indexes of any listener registered _after_ the listener - * being removed. This will not impact the order in which listeners are called, - * but it means that any copies of the listener array as returned by - * the `emitter.listeners()` method will need to be recreated. - * - * When a single function has been added as a handler multiple times for a single - * event (as in the example below), `removeListener()` will remove the most - * recently added instance. In the example the `once('ping')` - * listener is removed: - * - * ```js - * import { EventEmitter } from 'node:events'; - * const ee = new EventEmitter(); - * - * function pong() { - * console.log('pong'); - * } - * - * ee.on('ping', pong); - * ee.once('ping', pong); - * ee.removeListener('ping', pong); - * - * ee.emit('ping'); - * ee.emit('ping'); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v0.1.26 - */ - removeListener(eventName: EventNames, listener: Listener): this; - /** - * By default `EventEmitter`s will print a warning if more than `10` listeners are - * added for a particular event. This is a useful default that helps finding - * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be - * modified for this specific `EventEmitter` instance. The value can be set to - * `Infinity` (or `0`) to indicate an unlimited number of listeners. - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v0.3.5 - */ - setMaxListeners(n: number): this; - } - } - } - namespace EventEmitter { - export { EventEmitter, EventEmitterEventMap, EventEmitterOptions }; - } - namespace EventEmitter { - interface Abortable { - signal?: AbortSignal | undefined; - } - /** - * See how to write a custom [rejection handler](https://nodejs.org/docs/latest-v25.x/api/events.html#emittersymbolfornodejsrejectionerr-eventname-args). - * @since v13.4.0, v12.16.0 - */ - const captureRejectionSymbol: unique symbol; - /** - * Change the default `captureRejections` option on all new `EventEmitter` objects. - * @since v13.4.0, v12.16.0 - */ - let captureRejections: boolean; - /** - * By default, a maximum of `10` listeners can be registered for any single - * event. This limit can be changed for individual `EventEmitter` instances - * using the `emitter.setMaxListeners(n)` method. To change the default - * for _all_ `EventEmitter` instances, the `events.defaultMaxListeners` - * property can be used. If this value is not a positive number, a `RangeError` - * is thrown. - * - * Take caution when setting the `events.defaultMaxListeners` because the - * change affects _all_ `EventEmitter` instances, including those created before - * the change is made. However, calling `emitter.setMaxListeners(n)` still has - * precedence over `events.defaultMaxListeners`. - * - * This is not a hard limit. The `EventEmitter` instance will allow - * more listeners to be added but will output a trace warning to stderr indicating - * that a "possible EventEmitter memory leak" has been detected. For any single - * `EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` - * methods can be used to temporarily avoid this warning: - * - * `defaultMaxListeners` has no effect on `AbortSignal` instances. While it is - * still possible to use `emitter.setMaxListeners(n)` to set a warning limit - * for individual `AbortSignal` instances, per default `AbortSignal` instances will not warn. - * - * ```js - * import { EventEmitter } from 'node:events'; - * const emitter = new EventEmitter(); - * emitter.setMaxListeners(emitter.getMaxListeners() + 1); - * emitter.once('event', () => { - * // do stuff - * emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); - * }); - * ``` - * - * The `--trace-warnings` command-line flag can be used to display the - * stack trace for such warnings. - * - * The emitted warning can be inspected with `process.on('warning')` and will - * have the additional `emitter`, `type`, and `count` properties, referring to - * the event emitter instance, the event's name and the number of attached - * listeners, respectively. - * Its `name` property is set to `'MaxListenersExceededWarning'`. - * @since v0.11.2 - */ - let defaultMaxListeners: number; - /** - * This symbol shall be used to install a listener for only monitoring `'error'` - * events. Listeners installed using this symbol are called before the regular - * `'error'` listeners are called. - * - * Installing a listener using this symbol does not change the behavior once an - * `'error'` event is emitted. Therefore, the process will still crash if no - * regular `'error'` listener is installed. - * @since v13.6.0, v12.17.0 - */ - const errorMonitor: unique symbol; - /** - * Listens once to the `abort` event on the provided `signal`. - * - * Listening to the `abort` event on abort signals is unsafe and may - * lead to resource leaks since another third party with the signal can - * call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change - * this since it would violate the web standard. Additionally, the original - * API makes it easy to forget to remove listeners. - * - * This API allows safely using `AbortSignal`s in Node.js APIs by solving these - * two issues by listening to the event such that `stopImmediatePropagation` does - * not prevent the listener from running. - * - * Returns a disposable so that it may be unsubscribed from more easily. - * - * ```js - * import { addAbortListener } from 'node:events'; - * - * function example(signal) { - * signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); - * // addAbortListener() returns a disposable, so the `using` keyword ensures - * // the abort listener is automatically removed when this scope exits. - * using _ = addAbortListener(signal, (e) => { - * // Do something when signal is aborted. - * }); - * } - * ``` - * @since v20.5.0 - * @return Disposable that removes the `abort` listener. - */ - function addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable; - /** - * Returns a copy of the array of listeners for the event named `eventName`. - * - * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on - * the emitter. - * - * For `EventTarget`s this is the only way to get the event listeners for the - * event target. This is useful for debugging and diagnostic purposes. - * - * ```js - * import { getEventListeners, EventEmitter } from 'node:events'; - * - * { - * const ee = new EventEmitter(); - * const listener = () => console.log('Events are fun'); - * ee.on('foo', listener); - * console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ] - * } - * { - * const et = new EventTarget(); - * const listener = () => console.log('Events are fun'); - * et.addEventListener('foo', listener); - * console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ] - * } - * ``` - * @since v15.2.0, v14.17.0 - */ - function getEventListeners(emitter: EventEmitter, name: string | symbol): ((...args: any[]) => void)[]; - function getEventListeners(emitter: EventTarget, name: string): ((...args: any[]) => void)[]; - /** - * Returns the currently set max amount of listeners. - * - * For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on - * the emitter. - * - * For `EventTarget`s this is the only way to get the max event listeners for the - * event target. If the number of event handlers on a single EventTarget exceeds - * the max set, the EventTarget will print a warning. - * - * ```js - * import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events'; - * - * { - * const ee = new EventEmitter(); - * console.log(getMaxListeners(ee)); // 10 - * setMaxListeners(11, ee); - * console.log(getMaxListeners(ee)); // 11 - * } - * { - * const et = new EventTarget(); - * console.log(getMaxListeners(et)); // 10 - * setMaxListeners(11, et); - * console.log(getMaxListeners(et)); // 11 - * } - * ``` - * @since v19.9.0 - */ - function getMaxListeners(emitter: EventEmitter | EventTarget): number; - /** - * Returns the number of registered listeners for the event named `eventName`. - * - * For `EventEmitter`s this behaves exactly the same as calling `.listenerCount` - * on the emitter. - * - * For `EventTarget`s this is the only way to obtain the listener count. This can - * be useful for debugging and diagnostic purposes. - * @since v0.9.12 - */ - function listenerCount(emitter: EventEmitter, eventName: string | symbol): number; - function listenerCount(emitter: EventTarget, eventName: string): number; - interface OnOptions extends Abortable { - /** - * Names of events that will end the iteration. - */ - close?: readonly string[] | undefined; - /** - * The high watermark. The emitter is paused every time the size of events - * being buffered is higher than it. Supported only on emitters implementing - * `pause()` and `resume()` methods. - * @default Number.MAX_SAFE_INTEGER - */ - highWaterMark?: number | undefined; - /** - * The low watermark. The emitter is resumed every time the size of events - * being buffered is lower than it. Supported only on emitters implementing - * `pause()` and `resume()` methods. - * @default 1 - */ - lowWaterMark?: number | undefined; - } - /** - * ```js - * import { on, EventEmitter } from 'node:events'; - * import process from 'node:process'; - * - * const ee = new EventEmitter(); - * - * // Emit later on - * process.nextTick(() => { - * ee.emit('foo', 'bar'); - * ee.emit('foo', 42); - * }); - * - * for await (const event of on(ee, 'foo')) { - * // The execution of this inner block is synchronous and it - * // processes one event at a time (even with await). Do not use - * // if concurrent execution is required. - * console.log(event); // prints ['bar'] [42] - * } - * // Unreachable here - * ``` - * - * Returns an `AsyncIterator` that iterates `eventName` events. It will throw - * if the `EventEmitter` emits `'error'`. It removes all listeners when - * exiting the loop. The `value` returned by each iteration is an array - * composed of the emitted event arguments. - * - * An `AbortSignal` can be used to cancel waiting on events: - * - * ```js - * import { on, EventEmitter } from 'node:events'; - * import process from 'node:process'; - * - * const ac = new AbortController(); - * - * (async () => { - * const ee = new EventEmitter(); - * - * // Emit later on - * process.nextTick(() => { - * ee.emit('foo', 'bar'); - * ee.emit('foo', 42); - * }); - * - * for await (const event of on(ee, 'foo', { signal: ac.signal })) { - * // The execution of this inner block is synchronous and it - * // processes one event at a time (even with await). Do not use - * // if concurrent execution is required. - * console.log(event); // prints ['bar'] [42] - * } - * // Unreachable here - * })(); - * - * process.nextTick(() => ac.abort()); - * ``` - * @since v13.6.0, v12.16.0 - * @returns `AsyncIterator` that iterates `eventName` events emitted by the `emitter` - */ - function on( - emitter: EventEmitter, - eventName: string | symbol, - options?: OnOptions, - ): NodeJS.AsyncIterator; - function on( - emitter: EventTarget, - eventName: string, - options?: OnOptions, - ): NodeJS.AsyncIterator; - interface OnceOptions extends Abortable {} - /** - * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given - * event or that is rejected if the `EventEmitter` emits `'error'` while waiting. - * The `Promise` will resolve with an array of all the arguments emitted to the - * given event. - * - * This method is intentionally generic and works with the web platform - * [EventTarget][WHATWG-EventTarget] interface, which has no special - * `'error'` event semantics and does not listen to the `'error'` event. - * - * ```js - * import { once, EventEmitter } from 'node:events'; - * import process from 'node:process'; - * - * const ee = new EventEmitter(); - * - * process.nextTick(() => { - * ee.emit('myevent', 42); - * }); - * - * const [value] = await once(ee, 'myevent'); - * console.log(value); - * - * const err = new Error('kaboom'); - * process.nextTick(() => { - * ee.emit('error', err); - * }); - * - * try { - * await once(ee, 'myevent'); - * } catch (err) { - * console.error('error happened', err); - * } - * ``` - * - * The special handling of the `'error'` event is only used when `events.once()` - * is used to wait for another event. If `events.once()` is used to wait for the - * '`error'` event itself, then it is treated as any other kind of event without - * special handling: - * - * ```js - * import { EventEmitter, once } from 'node:events'; - * - * const ee = new EventEmitter(); - * - * once(ee, 'error') - * .then(([err]) => console.log('ok', err.message)) - * .catch((err) => console.error('error', err.message)); - * - * ee.emit('error', new Error('boom')); - * - * // Prints: ok boom - * ``` - * - * An `AbortSignal` can be used to cancel waiting for the event: - * - * ```js - * import { EventEmitter, once } from 'node:events'; - * - * const ee = new EventEmitter(); - * const ac = new AbortController(); - * - * async function foo(emitter, event, signal) { - * try { - * await once(emitter, event, { signal }); - * console.log('event emitted!'); - * } catch (error) { - * if (error.name === 'AbortError') { - * console.error('Waiting for the event was canceled!'); - * } else { - * console.error('There was an error', error.message); - * } - * } - * } - * - * foo(ee, 'foo', ac.signal); - * ac.abort(); // Prints: Waiting for the event was canceled! - * ``` - * @since v11.13.0, v10.16.0 - */ - function once( - emitter: EventEmitter, - eventName: string | symbol, - options?: OnceOptions, - ): Promise; - function once(emitter: EventTarget, eventName: string, options?: OnceOptions): Promise; - /** - * ```js - * import { setMaxListeners, EventEmitter } from 'node:events'; - * - * const target = new EventTarget(); - * const emitter = new EventEmitter(); - * - * setMaxListeners(5, target, emitter); - * ``` - * @since v15.4.0 - * @param n A non-negative number. The maximum number of listeners per `EventTarget` event. - * @param eventTargets Zero or more `EventTarget` - * or `EventEmitter` instances. If none are specified, `n` is set as the default - * max for all newly created `EventTarget` and `EventEmitter` objects. - * objects. - */ - function setMaxListeners(n: number, ...eventTargets: ReadonlyArray): void; - /** - * This is the interface from which event-emitting Node.js APIs inherit in the types package. - * **It is not intended for consumer use.** - * - * It provides event-mapped definitions similar to EventEmitter, except that its signatures - * are deliberately permissive: they provide type _hinting_, but not rigid type-checking, - * for compatibility reasons. - * - * Classes that inherit directly from EventEmitter in JavaScript can inherit directly from - * this interface in the type definitions. Classes that are more than one inheritance level - * away from EventEmitter (eg. `net.Socket` > `stream.Duplex` > `EventEmitter`) must instead - * copy these method definitions into the derived class. Search "#region InternalEventEmitter" - * for examples. - * @internal - */ - interface InternalEventEmitter> extends EventEmitter { - addListener(eventName: E, listener: (...args: T[E]) => void): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: T[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount(eventName: E, listener?: (...args: T[E]) => void): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: T[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: T[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: T[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once(eventName: E, listener: (...args: T[E]) => void): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener(eventName: E, listener: (...args: T[E]) => void): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(eventName: E, listener: (...args: T[E]) => void): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: T[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener(eventName: E, listener: (...args: T[E]) => void): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - } - interface EventEmitterReferencingAsyncResource extends AsyncResource { - readonly eventEmitter: EventEmitterAsyncResource; - } - interface EventEmitterAsyncResourceOptions extends AsyncResourceOptions, EventEmitterOptions { - /** - * The type of async event. - * @default new.target.name - */ - name?: string | undefined; - } - /** - * Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that - * require manual async tracking. Specifically, all events emitted by instances - * of `events.EventEmitterAsyncResource` will run within its [async context](https://nodejs.org/docs/latest-v25.x/api/async_context.html). - * - * ```js - * import { EventEmitterAsyncResource, EventEmitter } from 'node:events'; - * import { notStrictEqual, strictEqual } from 'node:assert'; - * import { executionAsyncId, triggerAsyncId } from 'node:async_hooks'; - * - * // Async tracking tooling will identify this as 'Q'. - * const ee1 = new EventEmitterAsyncResource({ name: 'Q' }); - * - * // 'foo' listeners will run in the EventEmitters async context. - * ee1.on('foo', () => { - * strictEqual(executionAsyncId(), ee1.asyncId); - * strictEqual(triggerAsyncId(), ee1.triggerAsyncId); - * }); - * - * const ee2 = new EventEmitter(); - * - * // 'foo' listeners on ordinary EventEmitters that do not track async - * // context, however, run in the same async context as the emit(). - * ee2.on('foo', () => { - * notStrictEqual(executionAsyncId(), ee2.asyncId); - * notStrictEqual(triggerAsyncId(), ee2.triggerAsyncId); - * }); - * - * Promise.resolve().then(() => { - * ee1.emit('foo'); - * ee2.emit('foo'); - * }); - * ``` - * - * The `EventEmitterAsyncResource` class has the same methods and takes the - * same options as `EventEmitter` and `AsyncResource` themselves. - * @since v17.4.0, v16.14.0 - */ - class EventEmitterAsyncResource extends EventEmitter { - constructor(options?: EventEmitterAsyncResourceOptions); - /** - * The unique `asyncId` assigned to the resource. - */ - readonly asyncId: number; - /** - * The returned `AsyncResource` object has an additional `eventEmitter` property - * that provides a reference to this `EventEmitterAsyncResource`. - */ - readonly asyncResource: EventEmitterReferencingAsyncResource; - /** - * Call all `destroy` hooks. This should only ever be called once. An error will - * be thrown if it is called more than once. This **must** be manually called. If - * the resource is left to be collected by the GC then the `destroy` hooks will - * never be called. - */ - emitDestroy(): void; - /** - * The same `triggerAsyncId` that is passed to the - * `AsyncResource` constructor. - */ - readonly triggerAsyncId: number; - } - /** - * The `NodeEventTarget` is a Node.js-specific extension to `EventTarget` - * that emulates a subset of the `EventEmitter` API. - * @since v14.5.0 - */ - interface NodeEventTarget extends EventTarget { - /** - * Node.js-specific extension to the `EventTarget` class that emulates the - * equivalent `EventEmitter` API. The only difference between `addListener()` and - * `addEventListener()` is that `addListener()` will return a reference to the - * `EventTarget`. - * @since v14.5.0 - */ - addListener(type: string, listener: (arg: any) => void): this; - /** - * Node.js-specific extension to the `EventTarget` class that dispatches the - * `arg` to the list of handlers for `type`. - * @since v15.2.0 - * @returns `true` if event listeners registered for the `type` exist, - * otherwise `false`. - */ - emit(type: string, arg: any): boolean; - /** - * Node.js-specific extension to the `EventTarget` class that returns an array - * of event `type` names for which event listeners are registered. - * @since 14.5.0 - */ - eventNames(): string[]; - /** - * Node.js-specific extension to the `EventTarget` class that returns the number - * of event listeners registered for the `type`. - * @since v14.5.0 - */ - listenerCount(type: string): number; - /** - * Node.js-specific extension to the `EventTarget` class that sets the number - * of max event listeners as `n`. - * @since v14.5.0 - */ - setMaxListeners(n: number): void; - /** - * Node.js-specific extension to the `EventTarget` class that returns the number - * of max event listeners. - * @since v14.5.0 - */ - getMaxListeners(): number; - /** - * Node.js-specific alias for `eventTarget.removeEventListener()`. - * @since v14.5.0 - */ - off(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this; - /** - * Node.js-specific alias for `eventTarget.addEventListener()`. - * @since v14.5.0 - */ - on(type: string, listener: (arg: any) => void): this; - /** - * Node.js-specific extension to the `EventTarget` class that adds a `once` - * listener for the given event `type`. This is equivalent to calling `on` - * with the `once` option set to `true`. - * @since v14.5.0 - */ - once(type: string, listener: (arg: any) => void): this; - /** - * Node.js-specific extension to the `EventTarget` class. If `type` is specified, - * removes all registered listeners for `type`, otherwise removes all registered - * listeners. - * @since v14.5.0 - */ - removeAllListeners(type?: string): this; - /** - * Node.js-specific extension to the `EventTarget` class that removes the - * `listener` for the given `type`. The only difference between `removeListener()` - * and `removeEventListener()` is that `removeListener()` will return a reference - * to the `EventTarget`. - * @since v14.5.0 - */ - removeListener(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this; - } - /** @internal */ - type InternalEventTargetEventProperties = { - [K in keyof T & string as `on${K}`]: ((ev: T[K]) => void) | null; - }; - } - export = EventEmitter; -} -declare module "events" { - import events = require("node:events"); - export = events; -} diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts deleted file mode 100644 index 1fce8b8..0000000 --- a/node_modules/@types/node/fs.d.ts +++ /dev/null @@ -1,4780 +0,0 @@ -declare module "node:fs" { - import { NonSharedBuffer } from "node:buffer"; - import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; - import { FileHandle } from "node:fs/promises"; - import * as stream from "node:stream"; - import { URL } from "node:url"; - /** - * Valid types for path values in "fs". - */ - type PathLike = string | Buffer | URL; - type PathOrFileDescriptor = PathLike | number; - type TimeLike = string | number | Date; - type NoParamCallback = (err: NodeJS.ErrnoException | null) => void; - type BufferEncodingOption = - | "buffer" - | { - encoding: "buffer"; - }; - interface ObjectEncodingOptions { - encoding?: BufferEncoding | null | undefined; - } - type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null; - type OpenMode = number | string; - type Mode = number | string; - interface StatsBase { - isFile(): boolean; - isDirectory(): boolean; - isBlockDevice(): boolean; - isCharacterDevice(): boolean; - isSymbolicLink(): boolean; - isFIFO(): boolean; - isSocket(): boolean; - dev: T; - ino: T; - mode: T; - nlink: T; - uid: T; - gid: T; - rdev: T; - size: T; - blksize: T; - blocks: T; - atimeMs: T; - mtimeMs: T; - ctimeMs: T; - birthtimeMs: T; - atime: Date; - mtime: Date; - ctime: Date; - birthtime: Date; - } - interface Stats extends StatsBase {} - /** - * A `fs.Stats` object provides information about a file. - * - * Objects returned from {@link stat}, {@link lstat}, {@link fstat}, and - * their synchronous counterparts are of this type. - * If `bigint` in the `options` passed to those methods is true, the numeric values - * will be `bigint` instead of `number`, and the object will contain additional - * nanosecond-precision properties suffixed with `Ns`. `Stat` objects are not to be created directly using the `new` keyword. - * - * ```console - * Stats { - * dev: 2114, - * ino: 48064969, - * mode: 33188, - * nlink: 1, - * uid: 85, - * gid: 100, - * rdev: 0, - * size: 527, - * blksize: 4096, - * blocks: 8, - * atimeMs: 1318289051000.1, - * mtimeMs: 1318289051000.1, - * ctimeMs: 1318289051000.1, - * birthtimeMs: 1318289051000.1, - * atime: Mon, 10 Oct 2011 23:24:11 GMT, - * mtime: Mon, 10 Oct 2011 23:24:11 GMT, - * ctime: Mon, 10 Oct 2011 23:24:11 GMT, - * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } - * ``` - * - * `bigint` version: - * - * ```console - * BigIntStats { - * dev: 2114n, - * ino: 48064969n, - * mode: 33188n, - * nlink: 1n, - * uid: 85n, - * gid: 100n, - * rdev: 0n, - * size: 527n, - * blksize: 4096n, - * blocks: 8n, - * atimeMs: 1318289051000n, - * mtimeMs: 1318289051000n, - * ctimeMs: 1318289051000n, - * birthtimeMs: 1318289051000n, - * atimeNs: 1318289051000000000n, - * mtimeNs: 1318289051000000000n, - * ctimeNs: 1318289051000000000n, - * birthtimeNs: 1318289051000000000n, - * atime: Mon, 10 Oct 2011 23:24:11 GMT, - * mtime: Mon, 10 Oct 2011 23:24:11 GMT, - * ctime: Mon, 10 Oct 2011 23:24:11 GMT, - * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } - * ``` - * @since v0.1.21 - */ - class Stats { - private constructor(); - } - interface StatsFsBase { - /** Type of file system. */ - type: T; - /** Optimal transfer block size. */ - bsize: T; - /** Total data blocks in file system. */ - blocks: T; - /** Free blocks in file system. */ - bfree: T; - /** Available blocks for unprivileged users */ - bavail: T; - /** Total file nodes in file system. */ - files: T; - /** Free file nodes in file system. */ - ffree: T; - } - interface StatsFs extends StatsFsBase {} - /** - * Provides information about a mounted file system. - * - * Objects returned from {@link statfs} and its synchronous counterpart are of - * this type. If `bigint` in the `options` passed to those methods is `true`, the - * numeric values will be `bigint` instead of `number`. - * - * ```console - * StatFs { - * type: 1397114950, - * bsize: 4096, - * blocks: 121938943, - * bfree: 61058895, - * bavail: 61058895, - * files: 999, - * ffree: 1000000 - * } - * ``` - * - * `bigint` version: - * - * ```console - * StatFs { - * type: 1397114950n, - * bsize: 4096n, - * blocks: 121938943n, - * bfree: 61058895n, - * bavail: 61058895n, - * files: 999n, - * ffree: 1000000n - * } - * ``` - * @since v19.6.0, v18.15.0 - */ - class StatsFs {} - interface BigIntStatsFs extends StatsFsBase {} - interface StatFsOptions { - bigint?: boolean | undefined; - } - /** - * A representation of a directory entry, which can be a file or a subdirectory - * within the directory, as returned by reading from an `fs.Dir`. The - * directory entry is a combination of the file name and file type pairs. - * - * Additionally, when {@link readdir} or {@link readdirSync} is called with - * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s. - * @since v10.10.0 - */ - class Dirent { - /** - * Returns `true` if the `fs.Dirent` object describes a regular file. - * @since v10.10.0 - */ - isFile(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a file system - * directory. - * @since v10.10.0 - */ - isDirectory(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a block device. - * @since v10.10.0 - */ - isBlockDevice(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a character device. - * @since v10.10.0 - */ - isCharacterDevice(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a symbolic link. - * @since v10.10.0 - */ - isSymbolicLink(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a first-in-first-out - * (FIFO) pipe. - * @since v10.10.0 - */ - isFIFO(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a socket. - * @since v10.10.0 - */ - isSocket(): boolean; - /** - * The file name that this `fs.Dirent` object refers to. The type of this - * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}. - * @since v10.10.0 - */ - name: Name; - /** - * The path to the parent directory of the file this `fs.Dirent` object refers to. - * @since v20.12.0, v18.20.0 - */ - parentPath: string; - } - /** - * A class representing a directory stream. - * - * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`. - * - * ```js - * import { opendir } from 'node:fs/promises'; - * - * try { - * const dir = await opendir('./'); - * for await (const dirent of dir) - * console.log(dirent.name); - * } catch (err) { - * console.error(err); - * } - * ``` - * - * When using the async iterator, the `fs.Dir` object will be automatically - * closed after the iterator exits. - * @since v12.12.0 - */ - class Dir implements AsyncIterable { - /** - * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`. - * @since v12.12.0 - */ - readonly path: string; - /** - * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read. - */ - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - /** - * Asynchronously close the directory's underlying resource handle. - * Subsequent reads will result in errors. - * - * A promise is returned that will be fulfilled after the resource has been - * closed. - * @since v12.12.0 - */ - close(): Promise; - close(cb: NoParamCallback): void; - /** - * Synchronously close the directory's underlying resource handle. - * Subsequent reads will result in errors. - * @since v12.12.0 - */ - closeSync(): void; - /** - * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`. - * - * A promise is returned that will be fulfilled with an `fs.Dirent`, or `null` if there are no more directory entries to read. - * - * Directory entries returned by this function are in no particular order as - * provided by the operating system's underlying directory mechanisms. - * Entries added or removed while iterating over the directory might not be - * included in the iteration results. - * @since v12.12.0 - * @return containing {fs.Dirent|null} - */ - read(): Promise; - read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void; - /** - * Synchronously read the next directory entry as an `fs.Dirent`. See the - * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail. - * - * If there are no more directory entries to read, `null` will be returned. - * - * Directory entries returned by this function are in no particular order as - * provided by the operating system's underlying directory mechanisms. - * Entries added or removed while iterating over the directory might not be - * included in the iteration results. - * @since v12.12.0 - */ - readSync(): Dirent | null; - /** - * Calls `dir.close()` if the directory handle is open, and returns a promise that - * fulfills when disposal is complete. - * @since v24.1.0 - */ - [Symbol.asyncDispose](): Promise; - /** - * Calls `dir.closeSync()` if the directory handle is open, and returns - * `undefined`. - * @since v24.1.0 - */ - [Symbol.dispose](): void; - } - /** - * Class: fs.StatWatcher - * @since v14.3.0, v12.20.0 - * Extends `EventEmitter` - * A successful call to {@link watchFile} method will return a new fs.StatWatcher object. - */ - interface StatWatcher extends EventEmitter { - /** - * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have - * no effect. - * - * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally - * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been - * called previously. - * @since v14.3.0, v12.20.0 - */ - ref(): this; - /** - * When called, the active `fs.StatWatcher` object will not require the Node.js - * event loop to remain active. If there is no other activity keeping the - * event loop running, the process may exit before the `fs.StatWatcher` object's - * callback is invoked. Calling `watcher.unref()` multiple times will have - * no effect. - * @since v14.3.0, v12.20.0 - */ - unref(): this; - } - interface FSWatcherEventMap { - "change": [eventType: string, filename: string | NonSharedBuffer]; - "close": []; - "error": [error: Error]; - } - interface FSWatcher extends InternalEventEmitter { - /** - * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable. - * @since v0.5.8 - */ - close(): void; - /** - * When called, requests that the Node.js event loop _not_ exit so long as the `fs.FSWatcher` is active. Calling `watcher.ref()` multiple times will have - * no effect. - * - * By default, all `fs.FSWatcher` objects are "ref'ed", making it normally - * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been - * called previously. - * @since v14.3.0, v12.20.0 - */ - ref(): this; - /** - * When called, the active `fs.FSWatcher` object will not require the Node.js - * event loop to remain active. If there is no other activity keeping the - * event loop running, the process may exit before the `fs.FSWatcher` object's - * callback is invoked. Calling `watcher.unref()` multiple times will have - * no effect. - * @since v14.3.0, v12.20.0 - */ - unref(): this; - } - interface ReadStreamEventMap extends stream.ReadableEventMap { - "close": []; - "data": [chunk: string | NonSharedBuffer]; - "open": [fd: number]; - "ready": []; - } - /** - * Instances of `fs.ReadStream` cannot be constructed directly. They are created and - * returned using the `fs.createReadStream()` function. - * @since v0.1.93 - */ - class ReadStream extends stream.Readable { - close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; - /** - * The number of bytes that have been read so far. - * @since v6.4.0 - */ - bytesRead: number; - /** - * The path to the file the stream is reading from as specified in the first - * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a - * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`. - * @since v0.1.93 - */ - path: string | Buffer; - /** - * This property is `true` if the underlying file has not been opened yet, - * i.e. before the `'ready'` event is emitted. - * @since v11.2.0, v10.16.0 - */ - pending: boolean; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ReadStreamEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ReadStreamEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ReadStreamEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ReadStreamEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ReadStreamEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ReadStreamEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ReadStreamEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface Utf8StreamOptions { - /** - * Appends writes to dest file instead of truncating it. - * @default true - */ - append?: boolean | undefined; - /** - * Which type of data you can send to the write - * function, supported values are `'utf8'` or `'buffer'`. - * @default 'utf8' - */ - contentMode?: "utf8" | "buffer" | undefined; - /** - * A path to a file to be written to (mode controlled by the - * append option). - */ - dest?: string | undefined; - /** - * A file descriptor, something that is returned by `fs.open()` - * or `fs.openSync()`. - */ - fd?: number | undefined; - /** - * An object that has the same API as the `fs` module, useful - * for mocking, testing, or customizing the behavior of the stream. - */ - fs?: object | undefined; - /** - * Perform a `fs.fsyncSync()` every time a write is - * completed. - */ - fsync?: boolean | undefined; - /** - * The maximum length of the internal buffer. If a write - * operation would cause the buffer to exceed `maxLength`, the data written is - * dropped and a drop event is emitted with the dropped data - */ - maxLength?: number | undefined; - /** - * The maximum number of bytes that can be written; - * @default 16384 - */ - maxWrite?: number | undefined; - /** - * The minimum length of the internal buffer that is - * required to be full before flushing. - */ - minLength?: number | undefined; - /** - * Ensure directory for `dest` file exists when true. - * @default false - */ - mkdir?: boolean | undefined; - /** - * Specify the creating file mode (see `fs.open()`). - */ - mode?: number | string | undefined; - /** - * Calls flush every `periodicFlush` milliseconds. - */ - periodicFlush?: number | undefined; - /** - * A function that will be called when `write()`, - * `writeSync()`, or `flushSync()` encounters an `EAGAIN` or `EBUSY` error. - * If the return value is `true` the operation will be retried, otherwise it - * will bubble the error. The `err` is the error that caused this function to - * be called, `writeBufferLen` is the length of the buffer that was written, - * and `remainingBufferLen` is the length of the remaining buffer that the - * stream did not try to write. - */ - retryEAGAIN?: ((err: Error | null, writeBufferLen: number, remainingBufferLen: number) => boolean) | undefined; - /** - * Perform writes synchronously. - */ - sync?: boolean | undefined; - } - interface Utf8StreamEventMap { - "close": []; - "drain": []; - "drop": [data: string | Buffer]; - "error": [error: Error]; - "finish": []; - "ready": []; - "write": [n: number]; - } - /** - * An optimized UTF-8 stream writer that allows for flushing all the internal - * buffering on demand. It handles `EAGAIN` errors correctly, allowing for - * customization, for example, by dropping content if the disk is busy. - * @since v24.6.0 - * @experimental - */ - class Utf8Stream implements EventEmitter { - constructor(options: Utf8StreamOptions); - /** - * Whether the stream is appending to the file or truncating it. - */ - readonly append: boolean; - /** - * The type of data that can be written to the stream. Supported - * values are `'utf8'` or `'buffer'`. - * @default 'utf8' - */ - readonly contentMode: "utf8" | "buffer"; - /** - * Close the stream immediately, without flushing the internal buffer. - */ - destroy(): void; - /** - * Close the stream gracefully, flushing the internal buffer before closing. - */ - end(): void; - /** - * The file descriptor that is being written to. - */ - readonly fd: number; - /** - * The file that is being written to. - */ - readonly file: string; - /** - * Writes the current buffer to the file if a write was not in progress. Do - * nothing if `minLength` is zero or if it is already writing. - */ - flush(callback: (err: Error | null) => void): void; - /** - * Flushes the buffered data synchronously. This is a costly operation. - */ - flushSync(): void; - /** - * Whether the stream is performing a `fs.fsyncSync()` after every - * write operation. - */ - readonly fsync: boolean; - /** - * The maximum length of the internal buffer. If a write - * operation would cause the buffer to exceed `maxLength`, the data written is - * dropped and a drop event is emitted with the dropped data. - */ - readonly maxLength: number; - /** - * The minimum length of the internal buffer that is required to be - * full before flushing. - */ - readonly minLength: number; - /** - * Whether the stream should ensure that the directory for the - * `dest` file exists. If `true`, it will create the directory if it does not - * exist. - * @default false - */ - readonly mkdir: boolean; - /** - * The mode of the file that is being written to. - */ - readonly mode: number | string; - /** - * The number of milliseconds between flushes. If set to `0`, no - * periodic flushes will be performed. - */ - readonly periodicFlush: number; - /** - * Reopen the file in place, useful for log rotation. - * @param file A path to a file to be written to (mode - * controlled by the append option). - */ - reopen(file: PathLike): void; - /** - * Whether the stream is writing synchronously or asynchronously. - */ - readonly sync: boolean; - /** - * When the `options.contentMode` is set to `'utf8'` when the stream is created, - * the `data` argument must be a string. If the `contentMode` is set to `'buffer'`, - * the `data` argument must be a `Buffer`. - * @param data The data to write. - */ - write(data: string | Buffer): boolean; - /** - * Whether the stream is currently writing data to the file. - */ - readonly writing: boolean; - /** - * Calls `utf8Stream.destroy()`. - */ - [Symbol.dispose](): void; - } - interface Utf8Stream extends InternalEventEmitter {} - interface WriteStreamEventMap extends stream.WritableEventMap { - "close": []; - "open": [fd: number]; - "ready": []; - } - /** - * Instances of `fs.WriteStream` cannot be constructed directly. They are created and - * returned using the `fs.createWriteStream()` function. - * @since v0.1.93 - */ - class WriteStream extends stream.Writable { - /** - * Closes `writeStream`. Optionally accepts a - * callback that will be executed once the `writeStream`is closed. - * @since v0.9.4 - */ - close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; - /** - * The number of bytes written so far. Does not include data that is still queued - * for writing. - * @since v0.4.7 - */ - bytesWritten: number; - /** - * The path to the file the stream is writing to as specified in the first - * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a - * `Buffer`. - * @since v0.1.93 - */ - path: string | Buffer; - /** - * This property is `true` if the underlying file has not been opened yet, - * i.e. before the `'ready'` event is emitted. - * @since v11.2.0 - */ - pending: boolean; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: WriteStreamEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: WriteStreamEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - /** - * Asynchronously rename file at `oldPath` to the pathname provided - * as `newPath`. In the case that `newPath` already exists, it will - * be overwritten. If there is a directory at `newPath`, an error will - * be raised instead. No arguments other than a possible exception are - * given to the completion callback. - * - * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html). - * - * ```js - * import { rename } from 'node:fs'; - * - * rename('oldFile.txt', 'newFile.txt', (err) => { - * if (err) throw err; - * console.log('Rename complete!'); - * }); - * ``` - * @since v0.0.2 - */ - function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; - namespace rename { - /** - * Asynchronous rename(2) - Change the name or location of a file or directory. - * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; - } - /** - * Renames the file from `oldPath` to `newPath`. Returns `undefined`. - * - * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details. - * @since v0.1.21 - */ - function renameSync(oldPath: PathLike, newPath: PathLike): void; - /** - * Truncates the file. No arguments other than a possible exception are - * given to the completion callback. A file descriptor can also be passed as the - * first argument. In this case, `fs.ftruncate()` is called. - * - * ```js - * import { truncate } from 'node:fs'; - * // Assuming that 'path/file.txt' is a regular file. - * truncate('path/file.txt', (err) => { - * if (err) throw err; - * console.log('path/file.txt was truncated'); - * }); - * ``` - * - * Passing a file descriptor is deprecated and may result in an error being thrown - * in the future. - * - * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details. - * @since v0.8.6 - * @param [len=0] - */ - function truncate(path: PathLike, len: number | undefined, callback: NoParamCallback): void; - /** - * Asynchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function truncate(path: PathLike, callback: NoParamCallback): void; - namespace truncate { - /** - * Asynchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param len If not specified, defaults to `0`. - */ - function __promisify__(path: PathLike, len?: number): Promise; - } - /** - * Truncates the file. Returns `undefined`. A file descriptor can also be - * passed as the first argument. In this case, `fs.ftruncateSync()` is called. - * - * Passing a file descriptor is deprecated and may result in an error being thrown - * in the future. - * @since v0.8.6 - * @param [len=0] - */ - function truncateSync(path: PathLike, len?: number): void; - /** - * Truncates the file descriptor. No arguments other than a possible exception are - * given to the completion callback. - * - * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail. - * - * If the file referred to by the file descriptor was larger than `len` bytes, only - * the first `len` bytes will be retained in the file. - * - * For example, the following program retains only the first four bytes of the - * file: - * - * ```js - * import { open, close, ftruncate } from 'node:fs'; - * - * function closeFd(fd) { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * - * open('temp.txt', 'r+', (err, fd) => { - * if (err) throw err; - * - * try { - * ftruncate(fd, 4, (err) => { - * closeFd(fd); - * if (err) throw err; - * }); - * } catch (err) { - * closeFd(fd); - * if (err) throw err; - * } - * }); - * ``` - * - * If the file previously was shorter than `len` bytes, it is extended, and the - * extended part is filled with null bytes (`'\0'`): - * - * If `len` is negative then `0` will be used. - * @since v0.8.6 - * @param [len=0] - */ - function ftruncate(fd: number, len: number | undefined, callback: NoParamCallback): void; - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param fd A file descriptor. - */ - function ftruncate(fd: number, callback: NoParamCallback): void; - namespace ftruncate { - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param fd A file descriptor. - * @param len If not specified, defaults to `0`. - */ - function __promisify__(fd: number, len?: number): Promise; - } - /** - * Truncates the file descriptor. Returns `undefined`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link ftruncate}. - * @since v0.8.6 - * @param [len=0] - */ - function ftruncateSync(fd: number, len?: number): void; - /** - * Asynchronously changes owner and group of a file. No arguments other than a - * possible exception are given to the completion callback. - * - * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. - * @since v0.1.97 - */ - function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; - namespace chown { - /** - * Asynchronous chown(2) - Change ownership of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike, uid: number, gid: number): Promise; - } - /** - * Synchronously changes owner and group of a file. Returns `undefined`. - * This is the synchronous version of {@link chown}. - * - * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. - * @since v0.1.97 - */ - function chownSync(path: PathLike, uid: number, gid: number): void; - /** - * Sets the owner of the file. No arguments other than a possible exception are - * given to the completion callback. - * - * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. - * @since v0.4.7 - */ - function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void; - namespace fchown { - /** - * Asynchronous fchown(2) - Change ownership of a file. - * @param fd A file descriptor. - */ - function __promisify__(fd: number, uid: number, gid: number): Promise; - } - /** - * Sets the owner of the file. Returns `undefined`. - * - * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. - * @since v0.4.7 - * @param uid The file's new owner's user id. - * @param gid The file's new group's group id. - */ - function fchownSync(fd: number, uid: number, gid: number): void; - /** - * Set the owner of the symbolic link. No arguments other than a possible - * exception are given to the completion callback. - * - * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail. - */ - function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; - namespace lchown { - /** - * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike, uid: number, gid: number): Promise; - } - /** - * Set the owner for the path. Returns `undefined`. - * - * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details. - * @param uid The file's new owner's user id. - * @param gid The file's new group's group id. - */ - function lchownSync(path: PathLike, uid: number, gid: number): void; - /** - * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic - * link, then the link is not dereferenced: instead, the timestamps of the - * symbolic link itself are changed. - * - * No arguments other than a possible exception are given to the completion - * callback. - * @since v14.5.0, v12.19.0 - */ - function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; - namespace lutimes { - /** - * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, - * with the difference that if the path refers to a symbolic link, then the link is not - * dereferenced: instead, the timestamps of the symbolic link itself are changed. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - } - /** - * Change the file system timestamps of the symbolic link referenced by `path`. - * Returns `undefined`, or throws an exception when parameters are incorrect or - * the operation fails. This is the synchronous version of {@link lutimes}. - * @since v14.5.0, v12.19.0 - */ - function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; - /** - * Asynchronously changes the permissions of a file. No arguments other than a - * possible exception are given to the completion callback. - * - * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. - * - * ```js - * import { chmod } from 'node:fs'; - * - * chmod('my_file.txt', 0o775, (err) => { - * if (err) throw err; - * console.log('The permissions for file "my_file.txt" have been changed!'); - * }); - * ``` - * @since v0.1.30 - */ - function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; - namespace chmod { - /** - * Asynchronous chmod(2) - Change permissions of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(path: PathLike, mode: Mode): Promise; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link chmod}. - * - * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. - * @since v0.6.7 - */ - function chmodSync(path: PathLike, mode: Mode): void; - /** - * Sets the permissions on the file. No arguments other than a possible exception - * are given to the completion callback. - * - * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. - * @since v0.4.7 - */ - function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void; - namespace fchmod { - /** - * Asynchronous fchmod(2) - Change permissions of a file. - * @param fd A file descriptor. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(fd: number, mode: Mode): Promise; - } - /** - * Sets the permissions on the file. Returns `undefined`. - * - * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. - * @since v0.4.7 - */ - function fchmodSync(fd: number, mode: Mode): void; - /** - * Changes the permissions on a symbolic link. No arguments other than a possible - * exception are given to the completion callback. - * - * This method is only implemented on macOS. - * - * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. - * @deprecated Since v0.4.7 - */ - function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; - /** @deprecated */ - namespace lchmod { - /** - * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(path: PathLike, mode: Mode): Promise; - } - /** - * Changes the permissions on a symbolic link. Returns `undefined`. - * - * This method is only implemented on macOS. - * - * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. - * @deprecated Since v0.4.7 - */ - function lchmodSync(path: PathLike, mode: Mode): void; - /** - * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object. - * - * In case of an error, the `err.code` will be one of `Common System Errors`. - * - * {@link stat} follows symbolic links. Use {@link lstat} to look at the - * links themselves. - * - * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. - * Instead, user code should open/read/write the file directly and handle the - * error raised if the file is not available. - * - * To check if a file exists without manipulating it afterwards, {@link access} is recommended. - * - * For example, given the following directory structure: - * - * ```text - * - txtDir - * -- file.txt - * - app.js - * ``` - * - * The next program will check for the stats of the given paths: - * - * ```js - * import { stat } from 'node:fs'; - * - * const pathsToCheck = ['./txtDir', './txtDir/file.txt']; - * - * for (let i = 0; i < pathsToCheck.length; i++) { - * stat(pathsToCheck[i], (err, stats) => { - * console.log(stats.isDirectory()); - * console.log(stats); - * }); - * } - * ``` - * - * The resulting output will resemble: - * - * ```console - * true - * Stats { - * dev: 16777220, - * mode: 16877, - * nlink: 3, - * uid: 501, - * gid: 20, - * rdev: 0, - * blksize: 4096, - * ino: 14214262, - * size: 96, - * blocks: 0, - * atimeMs: 1561174653071.963, - * mtimeMs: 1561174614583.3518, - * ctimeMs: 1561174626623.5366, - * birthtimeMs: 1561174126937.2893, - * atime: 2019-06-22T03:37:33.072Z, - * mtime: 2019-06-22T03:36:54.583Z, - * ctime: 2019-06-22T03:37:06.624Z, - * birthtime: 2019-06-22T03:28:46.937Z - * } - * false - * Stats { - * dev: 16777220, - * mode: 33188, - * nlink: 1, - * uid: 501, - * gid: 20, - * rdev: 0, - * blksize: 4096, - * ino: 14214074, - * size: 8, - * blocks: 8, - * atimeMs: 1561174616618.8555, - * mtimeMs: 1561174614584, - * ctimeMs: 1561174614583.8145, - * birthtimeMs: 1561174007710.7478, - * atime: 2019-06-22T03:36:56.619Z, - * mtime: 2019-06-22T03:36:54.584Z, - * ctime: 2019-06-22T03:36:54.584Z, - * birthtime: 2019-06-22T03:26:47.711Z - * } - * ``` - * @since v0.0.2 - */ - function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - function stat( - path: PathLike, - options: - | (StatOptions & { - bigint?: false | undefined; - throwIfNoEntry?: true | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, - ): void; - function stat( - path: PathLike, - options: StatOptions & { - bigint: true; - throwIfNoEntry?: true | undefined; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, - ): void; - function stat( - path: PathLike, - options: StatOptions & { - bigint?: false | undefined; - throwIfNoEntry: false; - }, - callback: (err: NodeJS.ErrnoException | null, stats: Stats | undefined) => void, - ): void; - function stat( - path: PathLike, - options: StatOptions & { - bigint: true; - throwIfNoEntry: false; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats | undefined) => void, - ): void; - function stat( - path: PathLike, - options: StatOptions & { - throwIfNoEntry?: true | undefined; - }, - callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, - ): void; - function stat( - path: PathLike, - options: StatOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats | undefined) => void, - ): void; - namespace stat { - // TODO: aliased promisify signatures - /** - * Asynchronous stat(2) - Get file status. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike): Promise; - function __promisify__( - path: PathLike, - options?: StatOptions & { - bigint?: false | undefined; - throwIfNoEntry?: true | undefined; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatOptions & { - bigint: true; - throwIfNoEntry?: true | undefined; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatOptions & { - bigint?: false | undefined; - throwIfNoEntry: false; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatOptions & { - bigint: true; - throwIfNoEntry: false; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatOptions & { - throwIfNoEntry?: true | undefined; - }, - ): Promise; - function __promisify__(path: PathLike, options?: StatOptions): Promise; - } - /** @deprecated This orphaned interface will be removed in a future version. */ - interface StatSyncFn extends Function { - (path: PathLike, options?: undefined): Stats; - ( - path: PathLike, - options?: StatSyncOptions & { - bigint?: false | undefined; - throwIfNoEntry: false; - }, - ): Stats | undefined; - ( - path: PathLike, - options: StatSyncOptions & { - bigint: true; - throwIfNoEntry: false; - }, - ): BigIntStats | undefined; - ( - path: PathLike, - options?: StatSyncOptions & { - bigint?: false | undefined; - }, - ): Stats; - ( - path: PathLike, - options: StatSyncOptions & { - bigint: true; - }, - ): BigIntStats; - ( - path: PathLike, - options: StatSyncOptions & { - bigint: boolean; - throwIfNoEntry?: false | undefined; - }, - ): Stats | BigIntStats; - (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined; - } - /** - * Synchronous stat(2) - Get file status. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function statSync(path: PathLike): Stats; - function statSync( - path: PathLike, - options?: StatOptions & { - bigint?: false | undefined; - throwIfNoEntry?: true | undefined; - }, - ): Stats; - function statSync( - path: PathLike, - options: StatOptions & { - bigint: true; - throwIfNoEntry?: true | undefined; - }, - ): BigIntStats; - function statSync( - path: PathLike, - options: StatOptions & { - bigint?: false | undefined; - throwIfNoEntry: false; - }, - ): Stats | undefined; - function statSync( - path: PathLike, - options: StatOptions & { - bigint: true; - throwIfNoEntry: false; - }, - ): BigIntStats | undefined; - function statSync( - path: PathLike, - options: StatOptions & { - throwIfNoEntry?: true | undefined; - }, - ): Stats | BigIntStats; - function statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined; - /** - * Invokes the callback with the `fs.Stats` for the file descriptor. - * - * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. - * @since v0.1.95 - */ - function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - function fstat( - fd: number, - options: - | (StatOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, - ): void; - function fstat( - fd: number, - options: StatOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, - ): void; - function fstat( - fd: number, - options: StatOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, - ): void; - namespace fstat { - /** - * Asynchronous fstat(2) - Get file status. - * @param fd A file descriptor. - */ - function __promisify__( - fd: number, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - fd: number, - options: StatOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(fd: number, options?: StatOptions): Promise; - } - /** - * Retrieves the `fs.Stats` for the file descriptor. - * - * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. - * @since v0.1.95 - */ - function fstatSync( - fd: number, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Stats; - function fstatSync( - fd: number, - options: StatOptions & { - bigint: true; - }, - ): BigIntStats; - function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats; - /** - * Retrieves the `fs.Stats` for the symbolic link referred to by the path. - * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic - * link, then the link itself is stat-ed, not the file that it refers to. - * - * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details. - * @since v0.1.30 - */ - function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - function lstat( - path: PathLike, - options: - | (StatOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, - ): void; - function lstat( - path: PathLike, - options: StatOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, - ): void; - function lstat( - path: PathLike, - options: StatOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, - ): void; - namespace lstat { - /** - * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__( - path: PathLike, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(path: PathLike, options?: StatOptions): Promise; - } - /** - * Asynchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which - * contains `path`. The callback gets two arguments `(err, stats)` where `stats`is an `fs.StatFs` object. - * - * In case of an error, the `err.code` will be one of `Common System Errors`. - * @since v19.6.0, v18.15.0 - * @param path A path to an existing file or directory on the file system to be queried. - */ - function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void; - function statfs( - path: PathLike, - options: - | (StatFsOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void, - ): void; - function statfs( - path: PathLike, - options: StatFsOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void, - ): void; - function statfs( - path: PathLike, - options: StatFsOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void, - ): void; - namespace statfs { - /** - * Asynchronous statfs(2) - Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an object. - * @param path A path to an existing file or directory on the file system to be queried. - */ - function __promisify__( - path: PathLike, - options?: StatFsOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatFsOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(path: PathLike, options?: StatFsOptions): Promise; - } - /** - * Synchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which - * contains `path`. - * - * In case of an error, the `err.code` will be one of `Common System Errors`. - * @since v19.6.0, v18.15.0 - * @param path A path to an existing file or directory on the file system to be queried. - */ - function statfsSync( - path: PathLike, - options?: StatFsOptions & { - bigint?: false | undefined; - }, - ): StatsFs; - function statfsSync( - path: PathLike, - options: StatFsOptions & { - bigint: true; - }, - ): BigIntStatsFs; - function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs; - /** - * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function lstatSync(path: PathLike): Stats; - function lstatSync( - path: PathLike, - options?: StatOptions & { - bigint?: false | undefined; - throwIfNoEntry?: true | undefined; - }, - ): Stats; - function lstatSync( - path: PathLike, - options: StatOptions & { - bigint: true; - throwIfNoEntry?: true | undefined; - }, - ): BigIntStats; - function lstatSync( - path: PathLike, - options: StatOptions & { - bigint?: false | undefined; - throwIfNoEntry: false; - }, - ): Stats | undefined; - function lstatSync( - path: PathLike, - options: StatOptions & { - bigint: true; - throwIfNoEntry: false; - }, - ): BigIntStats | undefined; - function lstatSync( - path: PathLike, - options: StatOptions & { - throwIfNoEntry?: true | undefined; - }, - ): Stats | BigIntStats; - function lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined; - /** - * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than - * a possible - * exception are given to the completion callback. - * @since v0.1.31 - */ - function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; - namespace link { - /** - * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. - * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(existingPath: PathLike, newPath: PathLike): Promise; - } - /** - * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`. - * @since v0.1.31 - */ - function linkSync(existingPath: PathLike, newPath: PathLike): void; - /** - * Creates the link called `path` pointing to `target`. No arguments other than a - * possible exception are given to the completion callback. - * - * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details. - * - * The `type` argument is only available on Windows and ignored on other platforms. - * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is - * not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`. - * If the `target` does not exist, `'file'` will be used. Windows junction points - * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. Junction - * points on NTFS volumes can only point to directories. - * - * Relative targets are relative to the link's parent directory. - * - * ```js - * import { symlink } from 'node:fs'; - * - * symlink('./mew', './mewtwo', callback); - * ``` - * - * The above example creates a symbolic link `mewtwo` which points to `mew` in the - * same directory: - * - * ```bash - * $ tree . - * . - * ├── mew - * └── mewtwo -> ./mew - * ``` - * @since v0.1.31 - * @param [type='null'] - */ - function symlink( - target: PathLike, - path: PathLike, - type: symlink.Type | undefined | null, - callback: NoParamCallback, - ): void; - /** - * Asynchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - */ - function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void; - namespace symlink { - /** - * Asynchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). - * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. - */ - function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; - type Type = "dir" | "file" | "junction"; - } - /** - * Returns `undefined`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link symlink}. - * @since v0.1.31 - * @param [type='null'] - */ - function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; - /** - * Reads the contents of the symbolic link referred to by `path`. The callback gets - * two arguments `(err, linkString)`. - * - * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the link path passed to the callback. If the `encoding` is set to `'buffer'`, - * the link path returned will be passed as a `Buffer` object. - * @since v0.1.31 - */ - function readlink( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, - ): void; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink( - path: PathLike, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, linkString: NonSharedBuffer) => void, - ): void; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, linkString: string | NonSharedBuffer) => void, - ): void; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function readlink( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, - ): void; - namespace readlink { - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - } - /** - * Returns the symbolic link's string value. - * - * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the link path returned. If the `encoding` is set to `'buffer'`, - * the link path returned will be passed as a `Buffer` object. - * @since v0.1.31 - */ - function readlinkSync(path: PathLike, options?: EncodingOption): string; - /** - * Synchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlinkSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; - /** - * Synchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlinkSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; - /** - * Asynchronously computes the canonical pathname by resolving `.`, `..`, and - * symbolic links. - * - * A canonical pathname is not necessarily unique. Hard links and bind mounts can - * expose a file system entity through many pathnames. - * - * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions: - * - * 1. No case conversion is performed on case-insensitive file systems. - * 2. The maximum number of symbolic links is platform-independent and generally - * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports. - * - * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd` to resolve relative paths. - * - * Only paths that can be converted to UTF8 strings are supported. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the path passed to the callback. If the `encoding` is set to `'buffer'`, - * the path returned will be passed as a `Buffer` object. - * - * If `path` resolves to a socket or a pipe, the function will return a system - * dependent name for that object. - * @since v0.1.31 - */ - function realpath( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath( - path: PathLike, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void, - ): void; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void, - ): void; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function realpath( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - namespace realpath { - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - /** - * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html). - * - * The `callback` gets two arguments `(err, resolvedPath)`. - * - * Only paths that can be converted to UTF8 strings are supported. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the path passed to the callback. If the `encoding` is set to `'buffer'`, - * the path returned will be passed as a `Buffer` object. - * - * On Linux, when Node.js is linked against musl libc, the procfs file system must - * be mounted on `/proc` in order for this function to work. Glibc does not have - * this restriction. - * @since v9.2.0 - */ - function native( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - function native( - path: PathLike, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void, - ): void; - function native( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void, - ): void; - function native( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - } - /** - * Returns the resolved pathname. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link realpath}. - * @since v0.1.31 - */ - function realpathSync(path: PathLike, options?: EncodingOption): string; - /** - * Synchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpathSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; - /** - * Synchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpathSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; - namespace realpathSync { - function native(path: PathLike, options?: EncodingOption): string; - function native(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; - function native(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; - } - /** - * Asynchronously removes a file or symbolic link. No arguments other than a - * possible exception are given to the completion callback. - * - * ```js - * import { unlink } from 'node:fs'; - * // Assuming that 'path/file.txt' is a regular file. - * unlink('path/file.txt', (err) => { - * if (err) throw err; - * console.log('path/file.txt was deleted'); - * }); - * ``` - * - * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a - * directory, use {@link rmdir}. - * - * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details. - * @since v0.0.2 - */ - function unlink(path: PathLike, callback: NoParamCallback): void; - namespace unlink { - /** - * Asynchronous unlink(2) - delete a name and possibly the file it refers to. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike): Promise; - } - /** - * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`. - * @since v0.1.21 - */ - function unlinkSync(path: PathLike): void; - /** @deprecated `rmdir()` no longer provides any options. This interface will be removed in a future version. */ - // TODO: remove in future major - interface RmDirOptions {} - /** - * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given - * to the completion callback. - * - * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on - * Windows and an `ENOTDIR` error on POSIX. - * - * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`. - * @since v0.0.2 - */ - function rmdir(path: PathLike, callback: NoParamCallback): void; - namespace rmdir { - /** - * Asynchronous rmdir(2) - delete a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike): Promise; - } - /** - * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`. - * - * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error - * on Windows and an `ENOTDIR` error on POSIX. - * - * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`. - * @since v0.1.21 - */ - function rmdirSync(path: PathLike): void; - interface RmOptions { - /** - * When `true`, exceptions will be ignored if `path` does not exist. - * @default false - */ - force?: boolean | undefined; - /** - * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or - * `EPERM` error is encountered, Node.js will retry the operation with a linear - * backoff wait of `retryDelay` ms longer on each try. This option represents the - * number of retries. This option is ignored if the `recursive` option is not - * `true`. - * @default 0 - */ - maxRetries?: number | undefined; - /** - * If `true`, perform a recursive directory removal. In - * recursive mode, operations are retried on failure. - * @default false - */ - recursive?: boolean | undefined; - /** - * The amount of time in milliseconds to wait between retries. - * This option is ignored if the `recursive` option is not `true`. - * @default 100 - */ - retryDelay?: number | undefined; - } - /** - * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). No arguments other than a possible exception are given to the - * completion callback. - * @since v14.14.0 - */ - function rm(path: PathLike, callback: NoParamCallback): void; - function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void; - namespace rm { - /** - * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). - */ - function __promisify__(path: PathLike, options?: RmOptions): Promise; - } - /** - * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility). Returns `undefined`. - * @since v14.14.0 - */ - function rmSync(path: PathLike, options?: RmOptions): void; - interface MakeDirectoryOptions { - /** - * Indicates whether parent folders should be created. - * If a folder was created, the path to the first created folder will be returned. - * @default false - */ - recursive?: boolean | undefined; - /** - * A file mode. If a string is passed, it is parsed as an octal integer. If not specified - * @default 0o777 - */ - mode?: Mode | undefined; - } - /** - * Asynchronously creates a directory. - * - * The callback is given a possible exception and, if `recursive` is `true`, the - * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was - * created (for instance, if it was previously created). - * - * The optional `options` argument can be an integer specifying `mode` (permission - * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fs.mkdir()` when `path` is a directory that - * exists results in an error only - * when `recursive` is false. If `recursive` is false and the directory exists, - * an `EEXIST` error occurs. - * - * ```js - * import { mkdir } from 'node:fs'; - * - * // Create ./tmp/a/apple, regardless of whether ./tmp and ./tmp/a exist. - * mkdir('./tmp/a/apple', { recursive: true }, (err) => { - * if (err) throw err; - * }); - * ``` - * - * On Windows, using `fs.mkdir()` on the root directory even with recursion will - * result in an error: - * - * ```js - * import { mkdir } from 'node:fs'; - * - * mkdir('/', { recursive: true }, (err) => { - * // => [Error: EPERM: operation not permitted, mkdir 'C:\'] - * }); - * ``` - * - * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. - * @since v0.1.8 - */ - function mkdir( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - callback: (err: NodeJS.ErrnoException | null, path?: string) => void, - ): void; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir( - path: PathLike, - options: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null - | undefined, - callback: NoParamCallback, - ): void; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir( - path: PathLike, - options: Mode | MakeDirectoryOptions | null | undefined, - callback: (err: NodeJS.ErrnoException | null, path?: string) => void, - ): void; - /** - * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function mkdir(path: PathLike, callback: NoParamCallback): void; - namespace mkdir { - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function __promisify__( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function __promisify__( - path: PathLike, - options?: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function __promisify__( - path: PathLike, - options?: Mode | MakeDirectoryOptions | null, - ): Promise; - } - /** - * Synchronously creates a directory. Returns `undefined`, or if `recursive` is `true`, the first directory path created. - * This is the synchronous version of {@link mkdir}. - * - * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. - * @since v0.1.21 - */ - function mkdirSync( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - ): string | undefined; - /** - * Synchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdirSync( - path: PathLike, - options?: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null, - ): void; - /** - * Synchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined; - /** - * Creates a unique temporary directory. - * - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. Due to platform - * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, - * notably the BSDs, can return more than six random characters, and replace - * trailing `X` characters in `prefix` with random characters. - * - * The created directory path is passed as a string to the callback's second - * parameter. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * - * ```js - * import { mkdtemp } from 'node:fs'; - * import { join } from 'node:path'; - * import { tmpdir } from 'node:os'; - * - * mkdtemp(join(tmpdir(), 'foo-'), (err, directory) => { - * if (err) throw err; - * console.log(directory); - * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2 - * }); - * ``` - * - * The `fs.mkdtemp()` method will append the six randomly selected characters - * directly to the `prefix` string. For instance, given a directory `/tmp`, if the - * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator - * (`import { sep } from 'node:path'`). - * - * ```js - * import { tmpdir } from 'node:os'; - * import { mkdtemp } from 'node:fs'; - * - * // The parent directory for the new temporary directory - * const tmpDir = tmpdir(); - * - * // This method is *INCORRECT*: - * mkdtemp(tmpDir, (err, directory) => { - * if (err) throw err; - * console.log(directory); - * // Will print something similar to `/tmpabc123`. - * // A new temporary directory is created at the file system root - * // rather than *within* the /tmp directory. - * }); - * - * // This method is *CORRECT*: - * import { sep } from 'node:path'; - * mkdtemp(`${tmpDir}${sep}`, (err, directory) => { - * if (err) throw err; - * console.log(directory); - * // Will print something similar to `/tmp/abc123`. - * // A new temporary directory is created within - * // the /tmp directory. - * }); - * ``` - * @since v5.10.0 - */ - function mkdtemp( - prefix: string, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, folder: string) => void, - ): void; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp( - prefix: string, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, folder: NonSharedBuffer) => void, - ): void; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp( - prefix: string, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, folder: string | NonSharedBuffer) => void, - ): void; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - */ - function mkdtemp( - prefix: string, - callback: (err: NodeJS.ErrnoException | null, folder: string) => void, - ): void; - namespace mkdtemp { - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options?: EncodingOption): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options: BufferEncodingOption): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options?: EncodingOption): Promise; - } - /** - * Returns the created directory path. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link mkdtemp}. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * @since v5.10.0 - */ - function mkdtempSync(prefix: string, options?: EncodingOption): string; - /** - * Synchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtempSync(prefix: string, options: BufferEncodingOption): NonSharedBuffer; - /** - * Synchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtempSync(prefix: string, options?: EncodingOption): string | NonSharedBuffer; - interface DisposableTempDir extends Disposable { - /** - * The path of the created directory. - */ - path: string; - /** - * A function which removes the created directory. - */ - remove(): void; - /** - * The same as `remove`. - */ - [Symbol.dispose](): void; - } - /** - * Returns a disposable object whose `path` property holds the created directory - * path. When the object is disposed, the directory and its contents will be - * removed if it still exists. If the directory cannot be deleted, disposal will - * throw an error. The object has a `remove()` method which will perform the same - * task. - * - * - * - * For detailed information, see the documentation of `fs.mkdtemp()`. - * - * There is no callback-based version of this API because it is designed for use - * with the `using` syntax. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * @since v24.4.0 - */ - function mkdtempDisposableSync(prefix: string, options?: EncodingOption): DisposableTempDir; - /** - * Reads the contents of a directory. The callback gets two arguments `(err, files)` where `files` is an array of the names of the files in the directory excluding `'.'` and `'..'`. - * - * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the filenames passed to the callback. If the `encoding` is set to `'buffer'`, - * the filenames returned will be passed as `Buffer` objects. - * - * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects. - * @since v0.1.8 - */ - function readdir( - path: PathLike, - options: - | { - encoding: BufferEncoding | null; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | BufferEncoding - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir( - path: PathLike, - options: - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | "buffer", - callback: (err: NodeJS.ErrnoException | null, files: NonSharedBuffer[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir( - path: PathLike, - options: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, files: string[] | NonSharedBuffer[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function readdir( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - function readdir( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. - */ - function readdir( - path: PathLike, - options: { - encoding: "buffer"; - withFileTypes: true; - recursive?: boolean | undefined; - }, - callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void, - ): void; - namespace readdir { - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__( - path: PathLike, - options?: - | { - encoding: BufferEncoding | null; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__( - path: PathLike, - options: - | "buffer" - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent - */ - function __promisify__( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. - */ - function __promisify__( - path: PathLike, - options: { - encoding: "buffer"; - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Promise[]>; - } - /** - * Reads the contents of the directory. - * - * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the filenames returned. If the `encoding` is set to `'buffer'`, - * the filenames returned will be passed as `Buffer` objects. - * - * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects. - * @since v0.1.21 - */ - function readdirSync( - path: PathLike, - options?: - | { - encoding: BufferEncoding | null; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | BufferEncoding - | null, - ): string[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdirSync( - path: PathLike, - options: - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | "buffer", - ): NonSharedBuffer[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdirSync( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): string[] | NonSharedBuffer[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - function readdirSync( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Dirent[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. - */ - function readdirSync( - path: PathLike, - options: { - encoding: "buffer"; - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Dirent[]; - /** - * Closes the file descriptor. No arguments other than a possible exception are - * given to the completion callback. - * - * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use - * through any other `fs` operation may lead to undefined behavior. - * - * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. - * @since v0.0.2 - */ - function close(fd: number, callback?: NoParamCallback): void; - namespace close { - /** - * Asynchronous close(2) - close a file descriptor. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - /** - * Closes the file descriptor. Returns `undefined`. - * - * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use - * through any other `fs` operation may lead to undefined behavior. - * - * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. - * @since v0.1.21 - */ - function closeSync(fd: number): void; - /** - * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details. - * - * `mode` sets the file mode (permission and sticky bits), but only if the file was - * created. On Windows, only the write permission can be manipulated; see {@link chmod}. - * - * The callback gets two arguments `(err, fd)`. - * - * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented - * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains - * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). - * - * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc. - * @since v0.0.2 - * @param [flags='r'] See `support of file system `flags``. - * @param [mode=0o666] - */ - function open( - path: PathLike, - flags: OpenMode | undefined, - mode: Mode | undefined | null, - callback: (err: NodeJS.ErrnoException | null, fd: number) => void, - ): void; - /** - * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param [flags='r'] See `support of file system `flags``. - */ - function open( - path: PathLike, - flags: OpenMode | undefined, - callback: (err: NodeJS.ErrnoException | null, fd: number) => void, - ): void; - /** - * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; - namespace open { - /** - * Asynchronous open(2) - open and possibly create a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. - */ - function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise; - } - /** - * Returns an integer representing the file descriptor. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link open}. - * @since v0.1.21 - * @param [flags='r'] - * @param [mode=0o666] - */ - function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number; - /** - * Change the file system timestamps of the object referenced by `path`. - * - * The `atime` and `mtime` arguments follow these rules: - * - * * Values can be either numbers representing Unix epoch time in seconds, `Date`s, or a numeric string like `'123456789.0'`. - * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. - * @since v0.4.2 - */ - function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; - namespace utimes { - /** - * Asynchronously change file timestamps of the file referenced by the supplied path. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - } - /** - * Returns `undefined`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link utimes}. - * @since v0.4.2 - */ - function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; - /** - * Change the file system timestamps of the object referenced by the supplied file - * descriptor. See {@link utimes}. - * @since v0.4.2 - */ - function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; - namespace futimes { - /** - * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise; - } - /** - * Synchronous version of {@link futimes}. Returns `undefined`. - * @since v0.4.2 - */ - function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void; - /** - * Request that all data for the open file descriptor is flushed to the storage - * device. The specific implementation is operating system and device specific. - * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other - * than a possible exception are given to the completion callback. - * @since v0.1.96 - */ - function fsync(fd: number, callback: NoParamCallback): void; - namespace fsync { - /** - * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - /** - * Request that all data for the open file descriptor is flushed to the storage - * device. The specific implementation is operating system and device specific. - * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`. - * @since v0.1.96 - */ - function fsyncSync(fd: number): void; - interface WriteOptions { - /** - * @default 0 - */ - offset?: number | undefined; - /** - * @default `buffer.byteLength - offset` - */ - length?: number | undefined; - /** - * @default null - */ - position?: number | null | undefined; - } - /** - * Write `buffer` to the file specified by `fd`. - * - * `offset` determines the part of the buffer to be written, and `length` is - * an integer specifying the number of bytes to write. - * - * `position` refers to the offset from the beginning of the file where this data - * should be written. If `typeof position !== 'number'`, the data will be written - * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html). - * - * The callback will be given three arguments `(err, bytesWritten, buffer)` where `bytesWritten` specifies how many _bytes_ were written from `buffer`. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a promise for an `Object` with `bytesWritten` and `buffer` properties. - * - * It is unsafe to use `fs.write()` multiple times on the same file without waiting - * for the callback. For this scenario, {@link createWriteStream} is - * recommended. - * - * On Linux, positional writes don't work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v0.0.2 - * @param [offset=0] - * @param [length=buffer.byteLength - offset] - * @param [position='null'] - */ - function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - length: number | undefined | null, - position: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - */ - function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - length: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - */ - function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - */ - function write( - fd: number, - buffer: TBuffer, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param options An object with the following properties: - * * `offset` The part of the buffer to be written. If not supplied, defaults to `0`. - * * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function write( - fd: number, - buffer: TBuffer, - options: WriteOptions, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - function write( - fd: number, - string: string, - position: number | undefined | null, - encoding: BufferEncoding | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, - ): void; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function write( - fd: number, - string: string, - position: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, - ): void; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - */ - function write( - fd: number, - string: string, - callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, - ): void; - namespace write { - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function __promisify__( - fd: number, - buffer?: TBuffer, - offset?: number, - length?: number, - position?: number | null, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param options An object with the following properties: - * * `offset` The part of the buffer to be written. If not supplied, defaults to `0`. - * * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function __promisify__( - fd: number, - buffer?: TBuffer, - options?: WriteOptions, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - function __promisify__( - fd: number, - string: string, - position?: number | null, - encoding?: BufferEncoding | null, - ): Promise<{ - bytesWritten: number; - buffer: string; - }>; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link write}. - * @since v0.1.21 - * @param [offset=0] - * @param [length=buffer.byteLength - offset] - * @param [position='null'] - * @return The number of bytes written. - */ - function writeSync( - fd: number, - buffer: NodeJS.ArrayBufferView, - offset?: number | null, - length?: number | null, - position?: number | null, - ): number; - /** - * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - function writeSync( - fd: number, - string: string, - position?: number | null, - encoding?: BufferEncoding | null, - ): number; - type ReadPosition = number | bigint; - interface ReadOptions { - /** - * @default 0 - */ - offset?: number | undefined; - /** - * @default `length of buffer` - */ - length?: number | undefined; - /** - * @default null - */ - position?: ReadPosition | null | undefined; - } - interface ReadOptionsWithBuffer extends ReadOptions { - buffer?: T | undefined; - } - /** @deprecated Use `ReadOptions` instead. */ - // TODO: remove in future major - interface ReadSyncOptions extends ReadOptions {} - /** @deprecated Use `ReadOptionsWithBuffer` instead. */ - // TODO: remove in future major - interface ReadAsyncOptions extends ReadOptionsWithBuffer {} - /** - * Read data from the file specified by `fd`. - * - * The callback is given the three arguments, `(err, bytesRead, buffer)`. - * - * If the file is not modified concurrently, the end-of-file is reached when the - * number of bytes read is zero. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a promise for an `Object` with `bytesRead` and `buffer` properties. - * @since v0.0.2 - * @param buffer The buffer that the data will be written to. - * @param offset The position in `buffer` to write the data to. - * @param length The number of bytes to read. - * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If - * `position` is an integer, the file position will be unchanged. - */ - function read( - fd: number, - buffer: TBuffer, - offset: number, - length: number, - position: ReadPosition | null, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - /** - * Similar to the above `fs.read` function, this version takes an optional `options` object. - * If not otherwise specified in an `options` object, - * `buffer` defaults to `Buffer.alloc(16384)`, - * `offset` defaults to `0`, - * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0 - * `position` defaults to `null` - * @since v12.17.0, 13.11.0 - */ - function read( - fd: number, - options: ReadOptionsWithBuffer, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - function read( - fd: number, - buffer: TBuffer, - options: ReadOptions, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - function read( - fd: number, - buffer: TBuffer, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - function read( - fd: number, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NonSharedBuffer) => void, - ): void; - namespace read { - /** - * @param fd A file descriptor. - * @param buffer The buffer that the data will be written to. - * @param offset The offset in the buffer at which to start writing. - * @param length The number of bytes to read. - * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. - */ - function __promisify__( - fd: number, - buffer: TBuffer, - offset: number, - length: number, - position: ReadPosition | null, - ): Promise<{ - bytesRead: number; - buffer: TBuffer; - }>; - function __promisify__( - fd: number, - options: ReadOptionsWithBuffer, - ): Promise<{ - bytesRead: number; - buffer: TBuffer; - }>; - function __promisify__(fd: number): Promise<{ - bytesRead: number; - buffer: NonSharedBuffer; - }>; - } - /** - * Returns the number of `bytesRead`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link read}. - * @since v0.1.21 - * @param [position='null'] - */ - function readSync( - fd: number, - buffer: NodeJS.ArrayBufferView, - offset: number, - length: number, - position: ReadPosition | null, - ): number; - /** - * Similar to the above `fs.readSync` function, this version takes an optional `options` object. - * If no `options` object is specified, it will default with the above values. - */ - function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadOptions): number; - /** - * Asynchronously reads the entire contents of a file. - * - * ```js - * import { readFile } from 'node:fs'; - * - * readFile('/etc/passwd', (err, data) => { - * if (err) throw err; - * console.log(data); - * }); - * ``` - * - * The callback is passed two arguments `(err, data)`, where `data` is the - * contents of the file. - * - * If no encoding is specified, then the raw buffer is returned. - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { readFile } from 'node:fs'; - * - * readFile('/etc/passwd', 'utf8', callback); - * ``` - * - * When the path is a directory, the behavior of `fs.readFile()` and {@link readFileSync} is platform-specific. On macOS, Linux, and Windows, an - * error will be returned. On FreeBSD, a representation of the directory's contents - * will be returned. - * - * ```js - * import { readFile } from 'node:fs'; - * - * // macOS, Linux, and Windows - * readFile('', (err, data) => { - * // => [Error: EISDIR: illegal operation on a directory, read ] - * }); - * - * // FreeBSD - * readFile('', (err, data) => { - * // => null, - * }); - * ``` - * - * It is possible to abort an ongoing request using an `AbortSignal`. If a - * request is aborted the callback is called with an `AbortError`: - * - * ```js - * import { readFile } from 'node:fs'; - * - * const controller = new AbortController(); - * const signal = controller.signal; - * readFile(fileInfo[0].name, { signal }, (err, buf) => { - * // ... - * }); - * // When you want to abort the request - * controller.abort(); - * ``` - * - * The `fs.readFile()` function buffers the entire file. To minimize memory costs, - * when possible prefer streaming via `fs.createReadStream()`. - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.readFile` performs. - * @since v0.1.29 - * @param path filename or file descriptor - */ - function readFile( - path: PathOrFileDescriptor, - options: - | ({ - encoding?: null | undefined; - flag?: string | undefined; - } & Abortable) - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void, - ): void; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile( - path: PathOrFileDescriptor, - options: - | ({ - encoding: BufferEncoding; - flag?: string | undefined; - } & Abortable) - | BufferEncoding, - callback: (err: NodeJS.ErrnoException | null, data: string) => void, - ): void; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile( - path: PathOrFileDescriptor, - options: - | (ObjectEncodingOptions & { - flag?: string | undefined; - } & Abortable) - | BufferEncoding - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, data: string | NonSharedBuffer) => void, - ): void; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - */ - function readFile( - path: PathOrFileDescriptor, - callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void, - ): void; - namespace readFile { - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__( - path: PathOrFileDescriptor, - options?: { - encoding?: null | undefined; - flag?: string | undefined; - } | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__( - path: PathOrFileDescriptor, - options: - | { - encoding: BufferEncoding; - flag?: string | undefined; - } - | BufferEncoding, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__( - path: PathOrFileDescriptor, - options?: - | (ObjectEncodingOptions & { - flag?: string | undefined; - }) - | BufferEncoding - | null, - ): Promise; - } - /** - * Returns the contents of the `path`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link readFile}. - * - * If the `encoding` option is specified then this function returns a - * string. Otherwise it returns a buffer. - * - * Similar to {@link readFile}, when the path is a directory, the behavior of `fs.readFileSync()` is platform-specific. - * - * ```js - * import { readFileSync } from 'node:fs'; - * - * // macOS, Linux, and Windows - * readFileSync(''); - * // => [Error: EISDIR: illegal operation on a directory, read ] - * - * // FreeBSD - * readFileSync(''); // => - * ``` - * @since v0.1.8 - * @param path filename or file descriptor - */ - function readFileSync( - path: PathOrFileDescriptor, - options?: { - encoding?: null | undefined; - flag?: string | undefined; - } | null, - ): NonSharedBuffer; - /** - * Synchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFileSync( - path: PathOrFileDescriptor, - options: - | { - encoding: BufferEncoding; - flag?: string | undefined; - } - | BufferEncoding, - ): string; - /** - * Synchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFileSync( - path: PathOrFileDescriptor, - options?: - | (ObjectEncodingOptions & { - flag?: string | undefined; - }) - | BufferEncoding - | null, - ): string | NonSharedBuffer; - type WriteFileOptions = - | ( - & ObjectEncodingOptions - & Abortable - & { - mode?: Mode | undefined; - flag?: string | undefined; - flush?: boolean | undefined; - } - ) - | BufferEncoding - | null; - /** - * When `file` is a filename, asynchronously writes data to the file, replacing the - * file if it already exists. `data` can be a string or a buffer. - * - * When `file` is a file descriptor, the behavior is similar to calling `fs.write()` directly (which is recommended). See the notes below on using - * a file descriptor. - * - * The `encoding` option is ignored if `data` is a buffer. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * ```js - * import { writeFile } from 'node:fs'; - * import { Buffer } from 'node:buffer'; - * - * const data = new Uint8Array(Buffer.from('Hello Node.js')); - * writeFile('message.txt', data, (err) => { - * if (err) throw err; - * console.log('The file has been saved!'); - * }); - * ``` - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { writeFile } from 'node:fs'; - * - * writeFile('message.txt', 'Hello Node.js', 'utf8', callback); - * ``` - * - * It is unsafe to use `fs.writeFile()` multiple times on the same file without - * waiting for the callback. For this scenario, {@link createWriteStream} is - * recommended. - * - * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that - * performs multiple `write` calls internally to write the buffer passed to it. - * For performance sensitive code consider using {@link createWriteStream}. - * - * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`. - * Cancelation is "best effort", and some amount of data is likely still - * to be written. - * - * ```js - * import { writeFile } from 'node:fs'; - * import { Buffer } from 'node:buffer'; - * - * const controller = new AbortController(); - * const { signal } = controller; - * const data = new Uint8Array(Buffer.from('Hello Node.js')); - * writeFile('message.txt', data, { signal }, (err) => { - * // When a request is aborted - the callback is called with an AbortError - * }); - * // When the request should be aborted - * controller.abort(); - * ``` - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.writeFile` performs. - * @since v0.1.29 - * @param file filename or file descriptor - */ - function writeFile( - file: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - options: WriteFileOptions, - callback: NoParamCallback, - ): void; - /** - * Asynchronously writes data to a file, replacing the file if it already exists. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - */ - function writeFile( - path: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - callback: NoParamCallback, - ): void; - namespace writeFile { - /** - * Asynchronously writes data to a file, replacing the file if it already exists. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'w'` is used. - */ - function __promisify__( - path: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - options?: WriteFileOptions, - ): Promise; - } - /** - * Returns `undefined`. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link writeFile}. - * @since v0.1.29 - * @param file filename or file descriptor - */ - function writeFileSync( - file: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - options?: WriteFileOptions, - ): void; - /** - * Asynchronously append data to a file, creating the file if it does not yet - * exist. `data` can be a string or a `Buffer`. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * ```js - * import { appendFile } from 'node:fs'; - * - * appendFile('message.txt', 'data to append', (err) => { - * if (err) throw err; - * console.log('The "data to append" was appended to file!'); - * }); - * ``` - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { appendFile } from 'node:fs'; - * - * appendFile('message.txt', 'data to append', 'utf8', callback); - * ``` - * - * The `path` may be specified as a numeric file descriptor that has been opened - * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will - * not be closed automatically. - * - * ```js - * import { open, close, appendFile } from 'node:fs'; - * - * function closeFd(fd) { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * - * open('message.txt', 'a', (err, fd) => { - * if (err) throw err; - * - * try { - * appendFile(fd, 'data to append', 'utf8', (err) => { - * closeFd(fd); - * if (err) throw err; - * }); - * } catch (err) { - * closeFd(fd); - * throw err; - * } - * }); - * ``` - * @since v0.6.7 - * @param path filename or file descriptor - */ - function appendFile( - path: PathOrFileDescriptor, - data: string | Uint8Array, - options: WriteFileOptions, - callback: NoParamCallback, - ): void; - /** - * Asynchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - */ - function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void; - namespace appendFile { - /** - * Asynchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'a'` is used. - */ - function __promisify__( - file: PathOrFileDescriptor, - data: string | Uint8Array, - options?: WriteFileOptions, - ): Promise; - } - /** - * Synchronously append data to a file, creating the file if it does not yet - * exist. `data` can be a string or a `Buffer`. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * ```js - * import { appendFileSync } from 'node:fs'; - * - * try { - * appendFileSync('message.txt', 'data to append'); - * console.log('The "data to append" was appended to file!'); - * } catch (err) { - * // Handle the error - * } - * ``` - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { appendFileSync } from 'node:fs'; - * - * appendFileSync('message.txt', 'data to append', 'utf8'); - * ``` - * - * The `path` may be specified as a numeric file descriptor that has been opened - * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will - * not be closed automatically. - * - * ```js - * import { openSync, closeSync, appendFileSync } from 'node:fs'; - * - * let fd; - * - * try { - * fd = openSync('message.txt', 'a'); - * appendFileSync(fd, 'data to append', 'utf8'); - * } catch (err) { - * // Handle the error - * } finally { - * if (fd !== undefined) - * closeSync(fd); - * } - * ``` - * @since v0.6.7 - * @param path filename or file descriptor - */ - function appendFileSync( - path: PathOrFileDescriptor, - data: string | Uint8Array, - options?: WriteFileOptions, - ): void; - /** - * Watch for changes on `filename`. The callback `listener` will be called each - * time the file is accessed. - * - * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates - * whether the process should continue to run as long as files are being watched. - * The `options` object may specify an `interval` property indicating how often the - * target should be polled in milliseconds. - * - * The `listener` gets two arguments the current stat object and the previous - * stat object: - * - * ```js - * import { watchFile } from 'node:fs'; - * - * watchFile('message.text', (curr, prev) => { - * console.log(`the current mtime is: ${curr.mtime}`); - * console.log(`the previous mtime was: ${prev.mtime}`); - * }); - * ``` - * - * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, - * the numeric values in these objects are specified as `BigInt`s. - * - * To be notified when the file was modified, not just accessed, it is necessary - * to compare `curr.mtimeMs` and `prev.mtimeMs`. - * - * When an `fs.watchFile` operation results in an `ENOENT` error, it - * will invoke the listener once, with all the fields zeroed (or, for dates, the - * Unix Epoch). If the file is created later on, the listener will be called - * again, with the latest stat objects. This is a change in functionality since - * v0.10. - * - * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. - * - * When a file being watched by `fs.watchFile()` disappears and reappears, - * then the contents of `previous` in the second callback event (the file's - * reappearance) will be the same as the contents of `previous` in the first - * callback event (its disappearance). - * - * This happens when: - * - * * the file is deleted, followed by a restore - * * the file is renamed and then renamed a second time back to its original name - * @since v0.1.31 - */ - interface WatchFileOptions { - bigint?: boolean | undefined; - persistent?: boolean | undefined; - interval?: number | undefined; - } - /** - * Watch for changes on `filename`. The callback `listener` will be called each - * time the file is accessed. - * - * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates - * whether the process should continue to run as long as files are being watched. - * The `options` object may specify an `interval` property indicating how often the - * target should be polled in milliseconds. - * - * The `listener` gets two arguments the current stat object and the previous - * stat object: - * - * ```js - * import { watchFile } from 'node:fs'; - * - * watchFile('message.text', (curr, prev) => { - * console.log(`the current mtime is: ${curr.mtime}`); - * console.log(`the previous mtime was: ${prev.mtime}`); - * }); - * ``` - * - * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, - * the numeric values in these objects are specified as `BigInt`s. - * - * To be notified when the file was modified, not just accessed, it is necessary - * to compare `curr.mtimeMs` and `prev.mtimeMs`. - * - * When an `fs.watchFile` operation results in an `ENOENT` error, it - * will invoke the listener once, with all the fields zeroed (or, for dates, the - * Unix Epoch). If the file is created later on, the listener will be called - * again, with the latest stat objects. This is a change in functionality since - * v0.10. - * - * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. - * - * When a file being watched by `fs.watchFile()` disappears and reappears, - * then the contents of `previous` in the second callback event (the file's - * reappearance) will be the same as the contents of `previous` in the first - * callback event (its disappearance). - * - * This happens when: - * - * * the file is deleted, followed by a restore - * * the file is renamed and then renamed a second time back to its original name - * @since v0.1.31 - */ - function watchFile( - filename: PathLike, - options: - | (WatchFileOptions & { - bigint?: false | undefined; - }) - | undefined, - listener: StatsListener, - ): StatWatcher; - function watchFile( - filename: PathLike, - options: - | (WatchFileOptions & { - bigint: true; - }) - | undefined, - listener: BigIntStatsListener, - ): StatWatcher; - /** - * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - */ - function watchFile(filename: PathLike, listener: StatsListener): StatWatcher; - /** - * Stop watching for changes on `filename`. If `listener` is specified, only that - * particular listener is removed. Otherwise, _all_ listeners are removed, - * effectively stopping watching of `filename`. - * - * Calling `fs.unwatchFile()` with a filename that is not being watched is a - * no-op, not an error. - * - * Using {@link watch} is more efficient than `fs.watchFile()` and `fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()` and `fs.unwatchFile()` when possible. - * @since v0.1.31 - * @param listener Optional, a listener previously attached using `fs.watchFile()` - */ - function unwatchFile(filename: PathLike, listener?: StatsListener): void; - function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void; - type WatchIgnorePredicate = string | RegExp | ((filename: string) => boolean); - interface WatchOptions extends Abortable { - encoding?: BufferEncoding | "buffer" | undefined; - persistent?: boolean | undefined; - recursive?: boolean | undefined; - ignore?: WatchIgnorePredicate | readonly WatchIgnorePredicate[] | undefined; - } - interface WatchOptionsWithBufferEncoding extends WatchOptions { - encoding: "buffer"; - } - interface WatchOptionsWithStringEncoding extends WatchOptions { - encoding?: BufferEncoding | undefined; - } - type WatchEventType = "rename" | "change"; - type WatchListener = (event: WatchEventType, filename: T | null) => void; - type StatsListener = (curr: Stats, prev: Stats) => void; - type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void; - /** - * Watch for changes on `filename`, where `filename` is either a file or a - * directory. - * - * The second argument is optional. If `options` is provided as a string, it - * specifies the `encoding`. Otherwise `options` should be passed as an object. - * - * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file - * which triggered the event. - * - * On most platforms, `'rename'` is emitted whenever a filename appears or - * disappears in the directory. - * - * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of `eventType`. - * - * If a `signal` is passed, aborting the corresponding AbortController will close - * the returned `fs.FSWatcher`. - * @since v0.5.10 - * @param listener - */ - function watch( - filename: PathLike, - options?: WatchOptionsWithStringEncoding | BufferEncoding | null, - listener?: WatchListener, - ): FSWatcher; - function watch( - filename: PathLike, - options: WatchOptionsWithBufferEncoding | "buffer", - listener: WatchListener, - ): FSWatcher; - function watch( - filename: PathLike, - options: WatchOptions | BufferEncoding | "buffer" | null, - listener: WatchListener, - ): FSWatcher; - function watch(filename: PathLike, listener: WatchListener): FSWatcher; - /** - * Test whether or not the given path exists by checking with the file system. - * Then call the `callback` argument with either true or false: - * - * ```js - * import { exists } from 'node:fs'; - * - * exists('/etc/passwd', (e) => { - * console.log(e ? 'it exists' : 'no passwd!'); - * }); - * ``` - * - * **The parameters for this callback are not consistent with other Node.js** - * **callbacks.** Normally, the first parameter to a Node.js callback is an `err` parameter, optionally followed by other parameters. The `fs.exists()` callback - * has only one boolean parameter. This is one reason `fs.access()` is recommended - * instead of `fs.exists()`. - * - * Using `fs.exists()` to check for the existence of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing - * so introduces a race condition, since other processes may change the file's - * state between the two calls. Instead, user code should open/read/write the - * file directly and handle the error raised if the file does not exist. - * - * **write (NOT RECOMMENDED)** - * - * ```js - * import { exists, open, close } from 'node:fs'; - * - * exists('myfile', (e) => { - * if (e) { - * console.error('myfile already exists'); - * } else { - * open('myfile', 'wx', (err, fd) => { - * if (err) throw err; - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * } - * }); - * ``` - * - * **write (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * open('myfile', 'wx', (err, fd) => { - * if (err) { - * if (err.code === 'EEXIST') { - * console.error('myfile already exists'); - * return; - * } - * - * throw err; - * } - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * **read (NOT RECOMMENDED)** - * - * ```js - * import { open, close, exists } from 'node:fs'; - * - * exists('myfile', (e) => { - * if (e) { - * open('myfile', 'r', (err, fd) => { - * if (err) throw err; - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * } else { - * console.error('myfile does not exist'); - * } - * }); - * ``` - * - * **read (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * - * open('myfile', 'r', (err, fd) => { - * if (err) { - * if (err.code === 'ENOENT') { - * console.error('myfile does not exist'); - * return; - * } - * - * throw err; - * } - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * The "not recommended" examples above check for existence and then use the - * file; the "recommended" examples are better because they use the file directly - * and handle the error, if any. - * - * In general, check for the existence of a file only if the file won't be - * used directly, for example when its existence is a signal from another - * process. - * @since v0.0.2 - * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead. - */ - function exists(path: PathLike, callback: (exists: boolean) => void): void; - /** @deprecated */ - namespace exists { - /** - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(path: PathLike): Promise; - } - /** - * Returns `true` if the path exists, `false` otherwise. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link exists}. - * - * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback` parameter to `fs.exists()` accepts parameters that are inconsistent with other - * Node.js callbacks. `fs.existsSync()` does not use a callback. - * - * ```js - * import { existsSync } from 'node:fs'; - * - * if (existsSync('/etc/passwd')) - * console.log('The path exists.'); - * ``` - * @since v0.1.21 - */ - function existsSync(path: PathLike): boolean; - namespace constants { - // File Access Constants - /** Constant for fs.access(). File is visible to the calling process. */ - const F_OK: number; - /** Constant for fs.access(). File can be read by the calling process. */ - const R_OK: number; - /** Constant for fs.access(). File can be written by the calling process. */ - const W_OK: number; - /** Constant for fs.access(). File can be executed by the calling process. */ - const X_OK: number; - // File Copy Constants - /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ - const COPYFILE_EXCL: number; - /** - * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. - * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. - */ - const COPYFILE_FICLONE: number; - /** - * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. - * If the underlying platform does not support copy-on-write, then the operation will fail with an error. - */ - const COPYFILE_FICLONE_FORCE: number; - // File Open Constants - /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ - const O_RDONLY: number; - /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ - const O_WRONLY: number; - /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ - const O_RDWR: number; - /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ - const O_CREAT: number; - /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ - const O_EXCL: number; - /** - * Constant for fs.open(). Flag indicating that if path identifies a terminal device, - * opening the path shall not cause that terminal to become the controlling terminal for the process - * (if the process does not already have one). - */ - const O_NOCTTY: number; - /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ - const O_TRUNC: number; - /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ - const O_APPEND: number; - /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ - const O_DIRECTORY: number; - /** - * constant for fs.open(). - * Flag indicating reading accesses to the file system will no longer result in - * an update to the atime information associated with the file. - * This flag is available on Linux operating systems only. - */ - const O_NOATIME: number; - /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ - const O_NOFOLLOW: number; - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ - const O_SYNC: number; - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ - const O_DSYNC: number; - /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ - const O_SYMLINK: number; - /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ - const O_DIRECT: number; - /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ - const O_NONBLOCK: number; - // File Type Constants - /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ - const S_IFMT: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ - const S_IFREG: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ - const S_IFDIR: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ - const S_IFCHR: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ - const S_IFBLK: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ - const S_IFIFO: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ - const S_IFLNK: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ - const S_IFSOCK: number; - // File Mode Constants - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ - const S_IRWXU: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ - const S_IRUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ - const S_IWUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ - const S_IXUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ - const S_IRWXG: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ - const S_IRGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ - const S_IWGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ - const S_IXGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ - const S_IRWXO: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ - const S_IROTH: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ - const S_IWOTH: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ - const S_IXOTH: number; - /** - * When set, a memory file mapping is used to access the file. This flag - * is available on Windows operating systems only. On other operating systems, - * this flag is ignored. - */ - const UV_FS_O_FILEMAP: number; - } - /** - * Tests a user's permissions for the file or directory specified by `path`. - * The `mode` argument is an optional integer that specifies the accessibility - * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` - * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for - * possible values of `mode`. - * - * The final argument, `callback`, is a callback function that is invoked with - * a possible error argument. If any of the accessibility checks fail, the error - * argument will be an `Error` object. The following examples check if `package.json` exists, and if it is readable or writable. - * - * ```js - * import { access, constants } from 'node:fs'; - * - * const file = 'package.json'; - * - * // Check if the file exists in the current directory. - * access(file, constants.F_OK, (err) => { - * console.log(`${file} ${err ? 'does not exist' : 'exists'}`); - * }); - * - * // Check if the file is readable. - * access(file, constants.R_OK, (err) => { - * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`); - * }); - * - * // Check if the file is writable. - * access(file, constants.W_OK, (err) => { - * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`); - * }); - * - * // Check if the file is readable and writable. - * access(file, constants.R_OK | constants.W_OK, (err) => { - * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`); - * }); - * ``` - * - * Do not use `fs.access()` to check for the accessibility of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing - * so introduces a race condition, since other processes may change the file's - * state between the two calls. Instead, user code should open/read/write the - * file directly and handle the error raised if the file is not accessible. - * - * **write (NOT RECOMMENDED)** - * - * ```js - * import { access, open, close } from 'node:fs'; - * - * access('myfile', (err) => { - * if (!err) { - * console.error('myfile already exists'); - * return; - * } - * - * open('myfile', 'wx', (err, fd) => { - * if (err) throw err; - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * }); - * ``` - * - * **write (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * - * open('myfile', 'wx', (err, fd) => { - * if (err) { - * if (err.code === 'EEXIST') { - * console.error('myfile already exists'); - * return; - * } - * - * throw err; - * } - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * **read (NOT RECOMMENDED)** - * - * ```js - * import { access, open, close } from 'node:fs'; - * access('myfile', (err) => { - * if (err) { - * if (err.code === 'ENOENT') { - * console.error('myfile does not exist'); - * return; - * } - * - * throw err; - * } - * - * open('myfile', 'r', (err, fd) => { - * if (err) throw err; - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * }); - * ``` - * - * **read (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * - * open('myfile', 'r', (err, fd) => { - * if (err) { - * if (err.code === 'ENOENT') { - * console.error('myfile does not exist'); - * return; - * } - * - * throw err; - * } - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * The "not recommended" examples above check for accessibility and then use the - * file; the "recommended" examples are better because they use the file directly - * and handle the error, if any. - * - * In general, check for the accessibility of a file only if the file will not be - * used directly, for example when its accessibility is a signal from another - * process. - * - * On Windows, access-control policies (ACLs) on a directory may limit access to - * a file or directory. The `fs.access()` function, however, does not check the - * ACL and therefore may report that a path is accessible even if the ACL restricts - * the user from reading or writing to it. - * @since v0.11.15 - * @param [mode=fs.constants.F_OK] - */ - function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void; - /** - * Asynchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - */ - function access(path: PathLike, callback: NoParamCallback): void; - namespace access { - /** - * Asynchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(path: PathLike, mode?: number): Promise; - } - /** - * Synchronously tests a user's permissions for the file or directory specified - * by `path`. The `mode` argument is an optional integer that specifies the - * accessibility checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and - * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for - * possible values of `mode`. - * - * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise, - * the method will return `undefined`. - * - * ```js - * import { accessSync, constants } from 'node:fs'; - * - * try { - * accessSync('etc/passwd', constants.R_OK | constants.W_OK); - * console.log('can read/write'); - * } catch (err) { - * console.error('no access!'); - * } - * ``` - * @since v0.11.15 - * @param [mode=fs.constants.F_OK] - */ - function accessSync(path: PathLike, mode?: number): void; - interface StreamOptions { - flags?: string | undefined; - encoding?: BufferEncoding | undefined; - fd?: number | FileHandle | undefined; - mode?: number | undefined; - autoClose?: boolean | undefined; - emitClose?: boolean | undefined; - start?: number | undefined; - signal?: AbortSignal | null | undefined; - highWaterMark?: number | undefined; - } - interface FSImplementation { - open?: (...args: any[]) => any; - close?: (...args: any[]) => any; - } - interface CreateReadStreamFSImplementation extends FSImplementation { - read: (...args: any[]) => any; - } - interface CreateWriteStreamFSImplementation extends FSImplementation { - write: (...args: any[]) => any; - writev?: (...args: any[]) => any; - } - interface ReadStreamOptions extends StreamOptions { - fs?: CreateReadStreamFSImplementation | null | undefined; - end?: number | undefined; - } - interface WriteStreamOptions extends StreamOptions { - fs?: CreateWriteStreamFSImplementation | null | undefined; - flush?: boolean | undefined; - } - /** - * `options` can include `start` and `end` values to read a range of bytes from - * the file instead of the entire file. Both `start` and `end` are inclusive and - * start counting at 0, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is - * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the - * current file position. The `encoding` can be any one of those accepted by `Buffer`. - * - * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use - * the specified file descriptor. This means that no `'open'` event will be - * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`. - * - * If `fd` points to a character device that only supports blocking reads - * (such as keyboard or sound card), read operations do not finish until data is - * available. This can prevent the process from exiting and the stream from - * closing naturally. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * - * By providing the `fs` option, it is possible to override the corresponding `fs` implementations for `open`, `read`, and `close`. When providing the `fs` option, - * an override for `read` is required. If no `fd` is provided, an override for `open` is also required. If `autoClose` is `true`, an override for `close` is - * also required. - * - * ```js - * import { createReadStream } from 'node:fs'; - * - * // Create a stream from some character device. - * const stream = createReadStream('/dev/input/event0'); - * setTimeout(() => { - * stream.close(); // This may not close the stream. - * // Artificially marking end-of-stream, as if the underlying resource had - * // indicated end-of-file by itself, allows the stream to close. - * // This does not cancel pending read operations, and if there is such an - * // operation, the process may still not be able to exit successfully - * // until it finishes. - * stream.push(null); - * stream.read(0); - * }, 100); - * ``` - * - * If `autoClose` is false, then the file descriptor won't be closed, even if - * there's an error. It is the application's responsibility to close it and make - * sure there's no file descriptor leak. If `autoClose` is set to true (default - * behavior), on `'error'` or `'end'` the file descriptor will be closed - * automatically. - * - * `mode` sets the file mode (permission and sticky bits), but only if the - * file was created. - * - * An example to read the last 10 bytes of a file which is 100 bytes long: - * - * ```js - * import { createReadStream } from 'node:fs'; - * - * createReadStream('sample.txt', { start: 90, end: 99 }); - * ``` - * - * If `options` is a string, then it specifies the encoding. - * @since v0.1.31 - */ - function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream; - /** - * `options` may also include a `start` option to allow writing data at some - * position past the beginning of the file, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than - * replacing it may require the `flags` option to be set to `r+` rather than the - * default `w`. The `encoding` can be any one of those accepted by `Buffer`. - * - * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, - * then the file descriptor won't be closed, even if there's an error. - * It is the application's responsibility to close it and make sure there's no - * file descriptor leak. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * - * By providing the `fs` option it is possible to override the corresponding `fs` implementations for `open`, `write`, `writev`, and `close`. Overriding `write()` without `writev()` can reduce - * performance as some optimizations (`_writev()`) - * will be disabled. When providing the `fs` option, overrides for at least one of `write` and `writev` are required. If no `fd` option is supplied, an override - * for `open` is also required. If `autoClose` is `true`, an override for `close` is also required. - * - * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the `path` argument and will use the specified file descriptor. This means that no `'open'` event will be - * emitted. `fd` should be blocking; non-blocking `fd`s - * should be passed to `net.Socket`. - * - * If `options` is a string, then it specifies the encoding. - * @since v0.1.31 - */ - function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream; - /** - * Forces all currently queued I/O operations associated with the file to the - * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other - * than a possible - * exception are given to the completion callback. - * @since v0.1.96 - */ - function fdatasync(fd: number, callback: NoParamCallback): void; - namespace fdatasync { - /** - * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - /** - * Forces all currently queued I/O operations associated with the file to the - * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`. - * @since v0.1.96 - */ - function fdatasyncSync(fd: number): void; - /** - * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it - * already exists. No arguments other than a possible exception are given to the - * callback function. Node.js makes no guarantees about the atomicity of the copy - * operation. If an error occurs after the destination file has been opened for - * writing, Node.js will attempt to remove the destination. - * - * `mode` is an optional integer that specifies the behavior - * of the copy operation. It is possible to create a mask consisting of the bitwise - * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). - * - * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already - * exists. - * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a - * copy-on-write reflink. If the platform does not support copy-on-write, then a - * fallback copy mechanism is used. - * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to - * create a copy-on-write reflink. If the platform does not support - * copy-on-write, then the operation will fail. - * - * ```js - * import { copyFile, constants } from 'node:fs'; - * - * function callback(err) { - * if (err) throw err; - * console.log('source.txt was copied to destination.txt'); - * } - * - * // destination.txt will be created or overwritten by default. - * copyFile('source.txt', 'destination.txt', callback); - * - * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. - * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback); - * ``` - * @since v8.5.0 - * @param src source filename to copy - * @param dest destination filename of the copy operation - * @param [mode=0] modifiers for copy operation. - */ - function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void; - function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void; - namespace copyFile { - function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise; - } - /** - * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it - * already exists. Returns `undefined`. Node.js makes no guarantees about the - * atomicity of the copy operation. If an error occurs after the destination file - * has been opened for writing, Node.js will attempt to remove the destination. - * - * `mode` is an optional integer that specifies the behavior - * of the copy operation. It is possible to create a mask consisting of the bitwise - * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). - * - * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already - * exists. - * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a - * copy-on-write reflink. If the platform does not support copy-on-write, then a - * fallback copy mechanism is used. - * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to - * create a copy-on-write reflink. If the platform does not support - * copy-on-write, then the operation will fail. - * - * ```js - * import { copyFileSync, constants } from 'node:fs'; - * - * // destination.txt will be created or overwritten by default. - * copyFileSync('source.txt', 'destination.txt'); - * console.log('source.txt was copied to destination.txt'); - * - * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. - * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL); - * ``` - * @since v8.5.0 - * @param src source filename to copy - * @param dest destination filename of the copy operation - * @param [mode=0] modifiers for copy operation. - */ - function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void; - /** - * Write an array of `ArrayBufferView`s to the file specified by `fd` using `writev()`. - * - * `position` is the offset from the beginning of the file where this data - * should be written. If `typeof position !== 'number'`, the data will be written - * at the current position. - * - * The callback will be given three arguments: `err`, `bytesWritten`, and `buffers`. `bytesWritten` is how many bytes were written from `buffers`. - * - * If this method is `util.promisify()` ed, it returns a promise for an `Object` with `bytesWritten` and `buffers` properties. - * - * It is unsafe to use `fs.writev()` multiple times on the same file without - * waiting for the callback. For this scenario, use {@link createWriteStream}. - * - * On Linux, positional writes don't work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v12.9.0 - * @param [position='null'] - */ - function writev( - fd: number, - buffers: TBuffers, - cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void, - ): void; - function writev( - fd: number, - buffers: TBuffers, - position: number | null, - cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void, - ): void; - // Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314 - // TODO: remove default in future major version - interface WriteVResult { - bytesWritten: number; - buffers: T; - } - namespace writev { - function __promisify__( - fd: number, - buffers: TBuffers, - position?: number, - ): Promise>; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link writev}. - * @since v12.9.0 - * @param [position='null'] - * @return The number of bytes written. - */ - function writevSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; - /** - * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s - * using `readv()`. - * - * `position` is the offset from the beginning of the file from where data - * should be read. If `typeof position !== 'number'`, the data will be read - * from the current position. - * - * The callback will be given three arguments: `err`, `bytesRead`, and `buffers`. `bytesRead` is how many bytes were read from the file. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a promise for an `Object` with `bytesRead` and `buffers` properties. - * @since v13.13.0, v12.17.0 - * @param [position='null'] - */ - function readv( - fd: number, - buffers: TBuffers, - cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void, - ): void; - function readv( - fd: number, - buffers: TBuffers, - position: number | null, - cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void, - ): void; - // Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314 - // TODO: remove default in future major version - interface ReadVResult { - bytesRead: number; - buffers: T; - } - namespace readv { - function __promisify__( - fd: number, - buffers: TBuffers, - position?: number, - ): Promise>; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link readv}. - * @since v13.13.0, v12.17.0 - * @param [position='null'] - * @return The number of bytes read. - */ - function readvSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; - - interface OpenAsBlobOptions { - /** - * An optional mime type for the blob. - * - * @default 'undefined' - */ - type?: string | undefined; - } - - /** - * Returns a `Blob` whose data is backed by the given file. - * - * The file must not be modified after the `Blob` is created. Any modifications - * will cause reading the `Blob` data to fail with a `DOMException` error. - * Synchronous stat operations on the file when the `Blob` is created, and before - * each read in order to detect whether the file data has been modified on disk. - * - * ```js - * import { openAsBlob } from 'node:fs'; - * - * const blob = await openAsBlob('the.file.txt'); - * const ab = await blob.arrayBuffer(); - * blob.stream(); - * ``` - * @since v19.8.0 - */ - function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise; - - interface OpenDirOptions { - /** - * @default 'utf8' - */ - encoding?: BufferEncoding | undefined; - /** - * Number of directory entries that are buffered - * internally when reading from the directory. Higher values lead to better - * performance but higher memory usage. - * @default 32 - */ - bufferSize?: number | undefined; - /** - * @default false - */ - recursive?: boolean | undefined; - } - /** - * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html). - * - * Creates an `fs.Dir`, which contains all further functions for reading from - * and cleaning up the directory. - * - * The `encoding` option sets the encoding for the `path` while opening the - * directory and subsequent read operations. - * @since v12.12.0 - */ - function opendirSync(path: PathLike, options?: OpenDirOptions): Dir; - /** - * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for - * more details. - * - * Creates an `fs.Dir`, which contains all further functions for reading from - * and cleaning up the directory. - * - * The `encoding` option sets the encoding for the `path` while opening the - * directory and subsequent read operations. - * @since v12.12.0 - */ - function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; - function opendir( - path: PathLike, - options: OpenDirOptions, - cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void, - ): void; - namespace opendir { - function __promisify__(path: PathLike, options?: OpenDirOptions): Promise

; - } - interface BigIntStats extends StatsBase { - atimeNs: bigint; - mtimeNs: bigint; - ctimeNs: bigint; - birthtimeNs: bigint; - } - interface BigIntOptions { - bigint: true; - } - interface StatOptions { - bigint?: boolean | undefined; - throwIfNoEntry?: boolean | undefined; - } - /** @deprecated This orphaned interface will be removed in a future version. Use `StatOptions` instead. */ - interface StatSyncOptions extends StatOptions {} - interface CopyOptionsBase { - /** - * Dereference symlinks - * @default false - */ - dereference?: boolean | undefined; - /** - * When `force` is `false`, and the destination - * exists, throw an error. - * @default false - */ - errorOnExist?: boolean | undefined; - /** - * Overwrite existing file or directory. _The copy - * operation will ignore errors if you set this to false and the destination - * exists. Use the `errorOnExist` option to change this behavior. - * @default true - */ - force?: boolean | undefined; - /** - * Modifiers for copy operation. See `mode` flag of {@link copyFileSync()} - */ - mode?: number | undefined; - /** - * When `true` timestamps from `src` will - * be preserved. - * @default false - */ - preserveTimestamps?: boolean | undefined; - /** - * Copy directories recursively. - * @default false - */ - recursive?: boolean | undefined; - /** - * When true, path resolution for symlinks will be skipped - * @default false - */ - verbatimSymlinks?: boolean | undefined; - } - interface CopyOptions extends CopyOptionsBase { - /** - * Function to filter copied files/directories. Return - * `true` to copy the item, `false` to ignore it. - */ - filter?: ((source: string, destination: string) => boolean | Promise) | undefined; - } - interface CopySyncOptions extends CopyOptionsBase { - /** - * Function to filter copied files/directories. Return - * `true` to copy the item, `false` to ignore it. - */ - filter?: ((source: string, destination: string) => boolean) | undefined; - } - /** - * Asynchronously copies the entire directory structure from `src` to `dest`, - * including subdirectories and files. - * - * When copying a directory to another directory, globs are not supported and - * behavior is similar to `cp dir1/ dir2/`. - * @since v16.7.0 - * @experimental - * @param src source path to copy. - * @param dest destination path to copy to. - */ - function cp( - source: string | URL, - destination: string | URL, - callback: (err: NodeJS.ErrnoException | null) => void, - ): void; - function cp( - source: string | URL, - destination: string | URL, - opts: CopyOptions, - callback: (err: NodeJS.ErrnoException | null) => void, - ): void; - /** - * Synchronously copies the entire directory structure from `src` to `dest`, - * including subdirectories and files. - * - * When copying a directory to another directory, globs are not supported and - * behavior is similar to `cp dir1/ dir2/`. - * @since v16.7.0 - * @experimental - * @param src source path to copy. - * @param dest destination path to copy to. - */ - function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void; - - // TODO: collapse - interface _GlobOptions { - /** - * Current working directory. - * @default process.cwd() - */ - cwd?: string | URL | undefined; - /** - * `true` if the glob should return paths as `Dirent`s, `false` otherwise. - * @default false - * @since v22.2.0 - */ - withFileTypes?: boolean | undefined; - /** - * Function to filter out files/directories or a - * list of glob patterns to be excluded. If a function is provided, return - * `true` to exclude the item, `false` to include it. - * If a string array is provided, each string should be a glob pattern that - * specifies paths to exclude. Note: Negation patterns (e.g., '!foo.js') are - * not supported. - * @default undefined - */ - exclude?: ((fileName: T) => boolean) | readonly string[] | undefined; - } - interface GlobOptions extends _GlobOptions {} - interface GlobOptionsWithFileTypes extends _GlobOptions { - withFileTypes: true; - } - interface GlobOptionsWithoutFileTypes extends _GlobOptions { - withFileTypes?: false | undefined; - } - - /** - * Retrieves the files matching the specified pattern. - * - * ```js - * import { glob } from 'node:fs'; - * - * glob('*.js', (err, matches) => { - * if (err) throw err; - * console.log(matches); - * }); - * ``` - * @since v22.0.0 - */ - function glob( - pattern: string | readonly string[], - callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void, - ): void; - function glob( - pattern: string | readonly string[], - options: GlobOptionsWithFileTypes, - callback: ( - err: NodeJS.ErrnoException | null, - matches: Dirent[], - ) => void, - ): void; - function glob( - pattern: string | readonly string[], - options: GlobOptionsWithoutFileTypes, - callback: ( - err: NodeJS.ErrnoException | null, - matches: string[], - ) => void, - ): void; - function glob( - pattern: string | readonly string[], - options: GlobOptions, - callback: ( - err: NodeJS.ErrnoException | null, - matches: Dirent[] | string[], - ) => void, - ): void; - /** - * ```js - * import { globSync } from 'node:fs'; - * - * console.log(globSync('*.js')); - * ``` - * @since v22.0.0 - * @returns paths of files that match the pattern. - */ - function globSync(pattern: string | readonly string[]): string[]; - function globSync( - pattern: string | readonly string[], - options: GlobOptionsWithFileTypes, - ): Dirent[]; - function globSync( - pattern: string | readonly string[], - options: GlobOptionsWithoutFileTypes, - ): string[]; - function globSync( - pattern: string | readonly string[], - options: GlobOptions, - ): Dirent[] | string[]; -} -declare module "node:fs" { - export * as promises from "node:fs/promises"; -} -declare module "fs" { - export * from "node:fs"; -} diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts deleted file mode 100644 index c9c2421..0000000 --- a/node_modules/@types/node/fs/promises.d.ts +++ /dev/null @@ -1,1468 +0,0 @@ -declare module "node:fs/promises" { - import { NonSharedBuffer } from "node:buffer"; - import { Abortable } from "node:events"; - import { Interface as ReadlineInterface } from "node:readline"; - import { - BigIntStats, - BigIntStatsFs, - BufferEncodingOption, - constants as fsConstants, - CopyOptions, - Dir, - Dirent, - EncodingOption, - GlobOptions, - GlobOptionsWithFileTypes, - GlobOptionsWithoutFileTypes, - MakeDirectoryOptions, - Mode, - ObjectEncodingOptions, - OpenDirOptions, - OpenMode, - PathLike, - ReadOptions, - ReadOptionsWithBuffer, - ReadPosition, - ReadStream, - ReadVResult, - RmOptions, - StatFsOptions, - StatOptions, - Stats, - StatsFs, - TimeLike, - WatchEventType, - WatchOptions as _WatchOptions, - WriteStream, - WriteVResult, - } from "node:fs"; - import { Stream } from "node:stream"; - import { ByteReadableStream, Transform, Writer } from "node:stream/iter"; - import { ReadableStream } from "node:stream/web"; - interface FileChangeInfo { - eventType: WatchEventType; - filename: T | null; - } - interface FlagAndOpenMode { - mode?: Mode | undefined; - flag?: OpenMode | undefined; - } - interface FileReadResult { - bytesRead: number; - buffer: T; - } - /** @deprecated This interface will be removed in a future version. Use `import { ReadOptionsWithBuffer } from "node:fs"` instead. */ - interface FileReadOptions { - /** - * @default `Buffer.alloc(0xffff)` - */ - buffer?: T; - /** - * @default 0 - */ - offset?: number | null; - /** - * @default `buffer.byteLength` - */ - length?: number | null; - position?: ReadPosition | null; - } - interface CreateReadStreamOptions extends Abortable { - encoding?: BufferEncoding | null | undefined; - autoClose?: boolean | undefined; - emitClose?: boolean | undefined; - start?: number | undefined; - end?: number | undefined; - highWaterMark?: number | undefined; - } - interface CreateWriteStreamOptions { - encoding?: BufferEncoding | null | undefined; - autoClose?: boolean | undefined; - emitClose?: boolean | undefined; - start?: number | undefined; - highWaterMark?: number | undefined; - flush?: boolean | undefined; - } - interface ReadableWebStreamOptions { - autoClose?: boolean | undefined; - } - interface PullOptions extends Abortable { - /** - * Close the file handle when the stream ends. - * @default false - */ - autoClose?: boolean | undefined; - /** - * Byte offset to begin reading from. When specified, - * reads use explicit positioning (`pread` semantics). - */ - start?: number | undefined; - /** - * Maximum number of bytes to read before ending the - * iterator. Reads stop when `limit` bytes have been delivered or EOF is - * reached, whichever comes first. - */ - limit?: number | undefined; - /** - * Size in bytes of the buffer allocated for each - * read operation. - * @default 131072 - */ - chunkSize?: number | undefined; - } - interface WriterOptions { - /** - * Close the file handle when the writer ends or fails. - * @default false - */ - autoClose?: boolean | undefined; - /** - * Byte offset to start writing at. When specified, - * writes use explicit positioning. - */ - start?: number | undefined; - /** - * Maximum number of bytes the writer will accept. - * Async writes (`write()`, `writev()`) that would exceed the limit reject - * with `ERR_OUT_OF_RANGE`. Sync writes (`writeSync()`, `writevSync()`) - * return `false`. - */ - limit?: number | undefined; - /** - * Maximum chunk size in bytes for synchronous write - * operations. Writes larger than this threshold fall back to async I/O. - * Set this to match the reader's `chunkSize` for optimal `pipeTo()` - * performance. - * @default 131072 - */ - chunkSize?: number | undefined; - } - // TODO: Add `EventEmitter` close - interface FileHandle { - /** - * The numeric file descriptor managed by the {FileHandle} object. - * @since v10.0.0 - */ - readonly fd: number; - /** - * Alias of `filehandle.writeFile()`. - * - * When operating on file handles, the mode cannot be changed from what it was set - * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - appendFile( - data: string | Uint8Array, - options?: - | (ObjectEncodingOptions & Abortable) - | BufferEncoding - | null, - ): Promise; - /** - * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html). - * @since v10.0.0 - * @param uid The file's new owner's user id. - * @param gid The file's new group's group id. - * @return Fulfills with `undefined` upon success. - */ - chown(uid: number, gid: number): Promise; - /** - * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html). - * @since v10.0.0 - * @param mode the file mode bit mask. - * @return Fulfills with `undefined` upon success. - */ - chmod(mode: Mode): Promise; - /** - * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream - * returned by this method has a default `highWaterMark` of 64 KiB. - * - * `options` can include `start` and `end` values to read a range of bytes from - * the file instead of the entire file. Both `start` and `end` are inclusive and - * start counting at 0, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is - * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from - * the current file position. The `encoding` can be any one of those accepted by `Buffer`. - * - * If the `FileHandle` points to a character device that only supports blocking - * reads (such as keyboard or sound card), read operations do not finish until data - * is available. This can prevent the process from exiting and the stream from - * closing naturally. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * - * ```js - * import { open } from 'node:fs/promises'; - * - * const fd = await open('/dev/input/event0'); - * // Create a stream from some character device. - * const stream = fd.createReadStream(); - * setTimeout(() => { - * stream.close(); // This may not close the stream. - * // Artificially marking end-of-stream, as if the underlying resource had - * // indicated end-of-file by itself, allows the stream to close. - * // This does not cancel pending read operations, and if there is such an - * // operation, the process may still not be able to exit successfully - * // until it finishes. - * stream.push(null); - * stream.read(0); - * }, 100); - * ``` - * - * If `autoClose` is false, then the file descriptor won't be closed, even if - * there's an error. It is the application's responsibility to close it and make - * sure there's no file descriptor leak. If `autoClose` is set to true (default - * behavior), on `'error'` or `'end'` the file descriptor will be closed - * automatically. - * - * An example to read the last 10 bytes of a file which is 100 bytes long: - * - * ```js - * import { open } from 'node:fs/promises'; - * - * const fd = await open('sample.txt'); - * fd.createReadStream({ start: 90, end: 99 }); - * ``` - * @since v16.11.0 - */ - createReadStream(options?: CreateReadStreamOptions): ReadStream; - /** - * `options` may also include a `start` option to allow writing data at some - * position past the beginning of the file, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than - * replacing it may require the `flags` `open` option to be set to `r+` rather than - * the default `r`. The `encoding` can be any one of those accepted by `Buffer`. - * - * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, - * then the file descriptor won't be closed, even if there's an error. - * It is the application's responsibility to close it and make sure there's no - * file descriptor leak. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * @since v16.11.0 - */ - createWriteStream(options?: CreateWriteStreamOptions): WriteStream; - /** - * Forces all currently queued I/O operations associated with the file to the - * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. - * - * Unlike `filehandle.sync` this method does not flush modified metadata. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - datasync(): Promise; - /** - * Return the file contents as an async iterable using the - * [`node:stream/iter`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html) pull model. Reads are performed in `chunkSize`-byte - * chunks (default 128 KB). If transforms are provided, they are applied - * via [`stream/iter pull()`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html#pullsource-transforms-options). - * - * The file handle is locked while the iterable is being consumed and unlocked - * when iteration completes, an error occurs, or the consumer breaks. - * - * This function is only available when the `--experimental-stream-iter` flag is - * enabled. - * - * ```js - * import { open } from 'node:fs/promises'; - * import { text } from 'node:stream/iter'; - * import { compressGzip } from 'node:zlib/iter'; - * - * const fh = await open('input.txt', 'r'); - * - * // Read as text - * console.log(await text(fh.pull({ autoClose: true }))); - * - * // Read 1 KB starting at byte 100 - * const fh2 = await open('input.txt', 'r'); - * console.log(await text(fh2.pull({ start: 100, limit: 1024, autoClose: true }))); - * - * // Read with compression - * const fh3 = await open('input.txt', 'r'); - * const compressed = fh3.pull(compressGzip(), { autoClose: true }); - * ``` - * @since v25.9.0 - * @experimental - */ - pull(...transforms: Transform[]): ByteReadableStream; - pull(...args: [...transforms: Transform[], options: PullOptions]): ByteReadableStream; - /** - * Request that all data for the open file descriptor is flushed to the storage - * device. The specific implementation is operating system and device specific. - * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - sync(): Promise; - /** - * Reads data from the file and stores that in the given buffer. - * - * If the file is not modified concurrently, the end-of-file is reached when the - * number of bytes read is zero. - * @since v10.0.0 - * @param buffer A buffer that will be filled with the file data read. - * @param offset The location in the buffer at which to start filling. - * @param length The number of bytes to read. - * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an - * integer, the current file position will remain unchanged. - * @return Fulfills upon success with an object with two properties: - */ - read( - buffer: T, - offset?: number | null, - length?: number | null, - position?: ReadPosition | null, - ): Promise>; - read( - buffer: T, - options?: ReadOptions, - ): Promise>; - read( - options?: ReadOptionsWithBuffer, - ): Promise>; - /** - * Returns a byte-oriented `ReadableStream` that may be used to read the file's - * contents. - * - * An error will be thrown if this method is called more than once or is called - * after the `FileHandle` is closed or closing. - * - * ```js - * import { - * open, - * } from 'node:fs/promises'; - * - * const file = await open('./some/file/to/read'); - * - * for await (const chunk of file.readableWebStream()) - * console.log(chunk); - * - * await file.close(); - * ``` - * - * While the `ReadableStream` will read the file to completion, it will not - * close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method. - * @since v17.0.0 - */ - readableWebStream(options?: ReadableWebStreamOptions): ReadableStream; - /** - * Asynchronously reads the entire contents of a file. - * - * If `options` is a string, then it specifies the `encoding`. - * - * The `FileHandle` has to support reading. - * - * If one or more `filehandle.read()` calls are made on a file handle and then a `filehandle.readFile()` call is made, the data will be read from the current - * position till the end of the file. It doesn't always read from the beginning - * of the file. - * @since v10.0.0 - * @return Fulfills upon a successful read with the contents of the file. If no encoding is specified (using `options.encoding`), the data is returned as a {Buffer} object. Otherwise, the - * data will be a string. - */ - readFile( - options?: - | ({ encoding?: null | undefined } & Abortable) - | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for reading. - */ - readFile( - options: - | ({ encoding: BufferEncoding } & Abortable) - | BufferEncoding, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for reading. - */ - readFile( - options?: - | (ObjectEncodingOptions & Abortable) - | BufferEncoding - | null, - ): Promise; - /** - * Convenience method to create a `readline` interface and stream over the file. - * See `filehandle.createReadStream()` for the options. - * - * ```js - * import { open } from 'node:fs/promises'; - * - * const file = await open('./some/file/to/read'); - * - * for await (const line of file.readLines()) { - * console.log(line); - * } - * ``` - * @since v18.11.0 - */ - readLines(options?: CreateReadStreamOptions): ReadlineInterface; - /** - * @since v10.0.0 - * @return Fulfills with an {fs.Stats} for the file. - */ - stat( - opts?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - stat( - opts: StatOptions & { - bigint: true; - }, - ): Promise; - stat(opts?: StatOptions): Promise; - /** - * Truncates the file. - * - * If the file was larger than `len` bytes, only the first `len` bytes will be - * retained in the file. - * - * The following example retains only the first four bytes of the file: - * - * ```js - * import { open } from 'node:fs/promises'; - * - * let filehandle = null; - * try { - * filehandle = await open('temp.txt', 'r+'); - * await filehandle.truncate(4); - * } finally { - * await filehandle?.close(); - * } - * ``` - * - * If the file previously was shorter than `len` bytes, it is extended, and the - * extended part is filled with null bytes (`'\0'`): - * - * If `len` is negative then `0` will be used. - * @since v10.0.0 - * @param [len=0] - * @return Fulfills with `undefined` upon success. - */ - truncate(len?: number): Promise; - /** - * Change the file system timestamps of the object referenced by the `FileHandle` then fulfills the promise with no arguments upon success. - * @since v10.0.0 - */ - utimes(atime: TimeLike, mtime: TimeLike): Promise; - /** - * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an - * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an - * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. - * The promise is fulfilled with no arguments upon success. - * - * If `options` is a string, then it specifies the `encoding`. - * - * The `FileHandle` has to support writing. - * - * It is unsafe to use `filehandle.writeFile()` multiple times on the same file - * without waiting for the promise to be fulfilled (or rejected). - * - * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the - * current position till the end of the file. It doesn't always write from the - * beginning of the file. - * @since v10.0.0 - */ - writeFile( - data: string | Uint8Array, - options?: - | (ObjectEncodingOptions & Abortable) - | BufferEncoding - | null, - ): Promise; - /** - * Write `buffer` to the file. - * - * The promise is fulfilled with an object containing two properties: - * - * It is unsafe to use `filehandle.write()` multiple times on the same file - * without waiting for the promise to be fulfilled (or rejected). For this - * scenario, use `filehandle.createWriteStream()`. - * - * On Linux, positional writes do not work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v10.0.0 - * @param offset The start position from within `buffer` where the data to write begins. - * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write. - * @param [position='null'] The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current - * position. See the POSIX pwrite(2) documentation for more detail. - */ - write( - buffer: TBuffer, - offset?: number | null, - length?: number | null, - position?: number | null, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; - write( - buffer: TBuffer, - options?: { offset?: number; length?: number; position?: number }, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; - write( - data: string, - position?: number | null, - encoding?: BufferEncoding | null, - ): Promise<{ - bytesWritten: number; - buffer: string; - }>; - /** - * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file. - * - * The promise is fulfilled with an object containing a two properties: - * - * It is unsafe to call `writev()` multiple times on the same file without waiting - * for the promise to be fulfilled (or rejected). - * - * On Linux, positional writes don't work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v12.9.0 - * @param [position='null'] The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current - * position. - */ - writev( - buffers: TBuffers, - position?: number, - ): Promise>; - /** - * Return a [`node:stream/iter`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html) writer backed by this file handle. - * - * The writer supports both `Symbol.asyncDispose` and `Symbol.dispose`: - * - * * `await using w = fh.writer()` — if the writer is still open (no `end()` - * called), `asyncDispose` calls `fail()`. If `end()` is pending, it waits - * for it to complete. - * * `using w = fh.writer()` — calls `fail()` unconditionally. - * - * The `writeSync()` and `writevSync()` methods enable the try-sync fast path - * used by [`stream/iter pipeTo()`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html#pipetosource-transforms-writer). When the reader's chunk size matches the - * writer's `chunkSize`, all writes in a `pipeTo()` pipeline complete - * synchronously with zero promise overhead. - * - * This function is only available when the `--experimental-stream-iter` flag is - * enabled. - * - * ```js - * import { open } from 'node:fs/promises'; - * import { from, pipeTo } from 'node:stream/iter'; - * import { compressGzip } from 'node:zlib/iter'; - * - * // Async pipeline - * const fh = await open('output.gz', 'w'); - * await pipeTo(from('Hello!'), compressGzip(), fh.writer({ autoClose: true })); - * - * // Sync pipeline with limit - * const src = await open('input.txt', 'r'); - * const dst = await open('output.txt', 'w'); - * const w = dst.writer({ limit: 1024 * 1024 }); // Max 1 MB - * await pipeTo(src.pull({ autoClose: true }), w); - * await w.end(); - * await dst.close(); - * ``` - * @since v25.9.0 - * @experimental - */ - writer(options?: WriterOptions): Writer; - /** - * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s - * @since v13.13.0, v12.17.0 - * @param [position='null'] The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position. - * @return Fulfills upon success an object containing two properties: - */ - readv( - buffers: TBuffers, - position?: number, - ): Promise>; - /** - * Closes the file handle after waiting for any pending operation on the handle to - * complete. - * - * ```js - * import { open } from 'node:fs/promises'; - * - * let filehandle; - * try { - * filehandle = await open('thefile.txt', 'r'); - * } finally { - * await filehandle?.close(); - * } - * ``` - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - close(): Promise; - /** - * Calls `filehandle.close()` and returns a promise that fulfills when the - * filehandle is closed. - * @since v20.4.0, v18.8.0 - */ - [Symbol.asyncDispose](): Promise; - } - const constants: typeof fsConstants; - /** - * Tests a user's permissions for the file or directory specified by `path`. - * The `mode` argument is an optional integer that specifies the accessibility - * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` - * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for - * possible values of `mode`. - * - * If the accessibility check is successful, the promise is fulfilled with no - * value. If any of the accessibility checks fail, the promise is rejected - * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and - * written by the current process. - * - * ```js - * import { access, constants } from 'node:fs/promises'; - * - * try { - * await access('/etc/passwd', constants.R_OK | constants.W_OK); - * console.log('can access'); - * } catch { - * console.error('cannot access'); - * } - * ``` - * - * Using `fsPromises.access()` to check for the accessibility of a file before - * calling `fsPromises.open()` is not recommended. Doing so introduces a race - * condition, since other processes may change the file's state between the two - * calls. Instead, user code should open/read/write the file directly and handle - * the error raised if the file is not accessible. - * @since v10.0.0 - * @param [mode=fs.constants.F_OK] - * @return Fulfills with `undefined` upon success. - */ - function access(path: PathLike, mode?: number): Promise; - /** - * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it - * already exists. - * - * No guarantees are made about the atomicity of the copy operation. If an - * error occurs after the destination file has been opened for writing, an attempt - * will be made to remove the destination. - * - * ```js - * import { copyFile, constants } from 'node:fs/promises'; - * - * try { - * await copyFile('source.txt', 'destination.txt'); - * console.log('source.txt was copied to destination.txt'); - * } catch { - * console.error('The file could not be copied'); - * } - * - * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. - * try { - * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL); - * console.log('source.txt was copied to destination.txt'); - * } catch { - * console.error('The file could not be copied'); - * } - * ``` - * @since v10.0.0 - * @param src source filename to copy - * @param dest destination filename of the copy operation - * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g. - * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`) - * @return Fulfills with `undefined` upon success. - */ - function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise; - /** - * Opens a `FileHandle`. - * - * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail. - * - * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented - * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains - * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). - * @since v10.0.0 - * @param [flags='r'] See `support of file system `flags``. - * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created. - * @return Fulfills with a {FileHandle} object. - */ - function open(path: PathLike, flags?: string | number, mode?: Mode): Promise; - /** - * Renames `oldPath` to `newPath`. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function rename(oldPath: PathLike, newPath: PathLike): Promise; - /** - * Truncates (shortens or extends the length) of the content at `path` to `len` bytes. - * @since v10.0.0 - * @param [len=0] - * @return Fulfills with `undefined` upon success. - */ - function truncate(path: PathLike, len?: number): Promise; - /** - * Removes the directory identified by `path`. - * - * Using `fsPromises.rmdir()` on a file (not a directory) results in the - * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR` error on POSIX. - * - * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function rmdir(path: PathLike): Promise; - /** - * Removes files and directories (modeled on the standard POSIX `rm` utility). - * @since v14.14.0 - * @return Fulfills with `undefined` upon success. - */ - function rm(path: PathLike, options?: RmOptions): Promise; - /** - * Asynchronously creates a directory. - * - * The optional `options` argument can be an integer specifying `mode` (permission - * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fsPromises.mkdir()` when `path` is a directory - * that exists results in a - * rejection only when `recursive` is false. - * - * ```js - * import { mkdir } from 'node:fs/promises'; - * - * try { - * const projectFolder = new URL('./test/project/', import.meta.url); - * const createDir = await mkdir(projectFolder, { recursive: true }); - * - * console.log(`created ${createDir}`); - * } catch (err) { - * console.error(err.message); - * } - * ``` - * @since v10.0.0 - * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`. - */ - function mkdir( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir( - path: PathLike, - options?: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise; - /** - * Reads the contents of a directory. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned - * will be passed as `Buffer` objects. - * - * If `options.withFileTypes` is set to `true`, the returned array will contain `fs.Dirent` objects. - * - * ```js - * import { readdir } from 'node:fs/promises'; - * - * try { - * const files = await readdir(path); - * for (const file of files) - * console.log(file); - * } catch (err) { - * console.error(err); - * } - * ``` - * @since v10.0.0 - * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`. - */ - function readdir( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir( - path: PathLike, - options: - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | "buffer", - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - function readdir( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a directory. If a URL is provided, it must use the `file:` protocol. - * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. - */ - function readdir( - path: PathLike, - options: { - encoding: "buffer"; - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Promise[]>; - /** - * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is - * fulfilled with the`linkString` upon success. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the link path returned. If the `encoding` is set to `'buffer'`, the link path - * returned will be passed as a `Buffer` object. - * @since v10.0.0 - * @return Fulfills with the `linkString` upon success. - */ - function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink( - path: PathLike, - options?: ObjectEncodingOptions | string | null, - ): Promise; - /** - * Creates a symbolic link. - * - * The `type` argument is only used on Windows platforms and can be one of `'dir'`, `'file'`, or `'junction'`. If the `type` argument is not a string, Node.js will - * autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not - * exist, `'file'` will be used. Windows junction points require the destination - * path to be absolute. When using `'junction'`, the `target` argument will - * automatically be normalized to absolute path. Junction points on NTFS volumes - * can only point to directories. - * @since v10.0.0 - * @param [type='null'] - * @return Fulfills with `undefined` upon success. - */ - function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; - /** - * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link, - * in which case the link itself is stat-ed, not the file that it refers to. - * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail. - * @since v10.0.0 - * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`. - */ - function lstat( - path: PathLike, - opts?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function lstat( - path: PathLike, - opts: StatOptions & { - bigint: true; - }, - ): Promise; - function lstat(path: PathLike, opts?: StatOptions): Promise; - /** - * @since v10.0.0 - * @return Fulfills with the {fs.Stats} object for the given `path`. - */ - function stat(path: PathLike): Promise; - function stat( - path: PathLike, - opts?: StatOptions & { - bigint?: false | undefined; - throwIfNoEntry?: true | undefined; - }, - ): Promise; - function stat( - path: PathLike, - opts: StatOptions & { - bigint: true; - throwIfNoEntry?: true | undefined; - }, - ): Promise; - function stat( - path: PathLike, - opts: StatOptions & { - bigint?: false | undefined; - throwIfNoEntry: false; - }, - ): Promise; - function stat( - path: PathLike, - opts: StatOptions & { - bigint: true; - throwIfNoEntry: false; - }, - ): Promise; - function stat( - path: PathLike, - opts: StatOptions & { - throwIfNoEntry?: true | undefined; - }, - ): Promise; - function stat(path: PathLike, opts?: StatOptions): Promise; - /** - * @since v19.6.0, v18.15.0 - * @return Fulfills with the {fs.StatFs} object for the given `path`. - */ - function statfs( - path: PathLike, - opts?: StatFsOptions & { - bigint?: false | undefined; - }, - ): Promise; - function statfs( - path: PathLike, - opts: StatFsOptions & { - bigint: true; - }, - ): Promise; - function statfs(path: PathLike, opts?: StatFsOptions): Promise; - /** - * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function link(existingPath: PathLike, newPath: PathLike): Promise; - /** - * If `path` refers to a symbolic link, then the link is removed without affecting - * the file or directory to which that link refers. If the `path` refers to a file - * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function unlink(path: PathLike): Promise; - /** - * Changes the permissions of a file. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function chmod(path: PathLike, mode: Mode): Promise; - /** - * Changes the permissions on a symbolic link. - * - * This method is only implemented on macOS. - * @deprecated Since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function lchmod(path: PathLike, mode: Mode): Promise; - /** - * Changes the ownership on a symbolic link. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function lchown(path: PathLike, uid: number, gid: number): Promise; - /** - * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a - * symbolic link, then the link is not dereferenced: instead, the timestamps of - * the symbolic link itself are changed. - * @since v14.5.0, v12.19.0 - * @return Fulfills with `undefined` upon success. - */ - function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - /** - * Changes the ownership of a file. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function chown(path: PathLike, uid: number, gid: number): Promise; - /** - * Change the file system timestamps of the object referenced by `path`. - * - * The `atime` and `mtime` arguments follow these rules: - * - * * Values can be either numbers representing Unix epoch time, `Date`s, or a - * numeric string like `'123456789.0'`. - * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - /** - * Determines the actual location of `path` using the same semantics as the `fs.realpath.native()` function. - * - * Only paths that can be converted to UTF8 strings are supported. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the path. If the `encoding` is set to `'buffer'`, the path returned will be - * passed as a `Buffer` object. - * - * On Linux, when Node.js is linked against musl libc, the procfs file system must - * be mounted on `/proc` in order for this function to work. Glibc does not have - * this restriction. - * @since v10.0.0 - * @return Fulfills with the resolved path upon success. - */ - function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath( - path: PathLike, - options?: ObjectEncodingOptions | BufferEncoding | null, - ): Promise; - /** - * Creates a unique temporary directory. A unique directory name is generated by - * appending six random characters to the end of the provided `prefix`. Due to - * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some - * platforms, notably the BSDs, can return more than six random characters, and - * replace trailing `X` characters in `prefix` with random characters. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * - * ```js - * import { mkdtemp } from 'node:fs/promises'; - * import { join } from 'node:path'; - * import { tmpdir } from 'node:os'; - * - * try { - * await mkdtemp(join(tmpdir(), 'foo-')); - * } catch (err) { - * console.error(err); - * } - * ``` - * - * The `fsPromises.mkdtemp()` method will append the six randomly selected - * characters directly to the `prefix` string. For instance, given a directory `/tmp`, if the intention is to create a temporary directory _within_ `/tmp`, the `prefix` must end with a trailing - * platform-specific path separator - * (`import { sep } from 'node:path'`). - * @since v10.0.0 - * @return Fulfills with a string containing the file system path of the newly created temporary directory. - */ - function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp(prefix: string, options: BufferEncodingOption): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp( - prefix: string, - options?: ObjectEncodingOptions | BufferEncoding | null, - ): Promise; - interface DisposableTempDir extends AsyncDisposable { - /** - * The path of the created directory. - */ - path: string; - /** - * A function which removes the created directory. - */ - remove(): Promise; - /** - * The same as `remove`. - */ - [Symbol.asyncDispose](): Promise; - } - /** - * The resulting Promise holds an async-disposable object whose `path` property - * holds the created directory path. When the object is disposed, the directory - * and its contents will be removed asynchronously if it still exists. If the - * directory cannot be deleted, disposal will throw an error. The object has an - * async `remove()` method which will perform the same task. - * - * Both this function and the disposal function on the resulting object are - * async, so it should be used with `await` + `await using` as in - * `await using dir = await fsPromises.mkdtempDisposable('prefix')`. - * - * - * - * For detailed information, see the documentation of `fsPromises.mkdtemp()`. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * @since v24.4.0 - */ - function mkdtempDisposable(prefix: PathLike, options?: EncodingOption): Promise; - /** - * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an - * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an - * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. - * - * The `encoding` option is ignored if `data` is a buffer. - * - * If `options` is a string, then it specifies the encoding. - * - * The `mode` option only affects the newly created file. See `fs.open()` for more details. - * - * Any specified `FileHandle` has to support writing. - * - * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file - * without waiting for the promise to be settled. - * - * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience - * method that performs multiple `write` calls internally to write the buffer - * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`. - * - * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`. - * Cancelation is "best effort", and some amount of data is likely still - * to be written. - * - * ```js - * import { writeFile } from 'node:fs/promises'; - * import { Buffer } from 'node:buffer'; - * - * try { - * const controller = new AbortController(); - * const { signal } = controller; - * const data = new Uint8Array(Buffer.from('Hello Node.js')); - * const promise = writeFile('message.txt', data, { signal }); - * - * // Abort the request before the promise settles. - * controller.abort(); - * - * await promise; - * } catch (err) { - * // When a request is aborted - err is an AbortError - * console.error(err); - * } - * ``` - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.writeFile` performs. - * @since v10.0.0 - * @param file filename or `FileHandle` - * @return Fulfills with `undefined` upon success. - */ - function writeFile( - file: PathLike | FileHandle, - data: - | string - | NodeJS.ArrayBufferView - | Iterable - | AsyncIterable - | Stream, - options?: - | (ObjectEncodingOptions & { - mode?: Mode | undefined; - flag?: OpenMode | undefined; - /** - * If all data is successfully written to the file, and `flush` - * is `true`, `filehandle.sync()` is used to flush the data. - * @default false - */ - flush?: boolean | undefined; - } & Abortable) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronously append data to a file, creating the file if it does not yet - * exist. `data` can be a string or a `Buffer`. - * - * If `options` is a string, then it specifies the `encoding`. - * - * The `mode` option only affects the newly created file. See `fs.open()` for more details. - * - * The `path` may be specified as a `FileHandle` that has been opened - * for appending (using `fsPromises.open()`). - * @since v10.0.0 - * @param path filename or {FileHandle} - * @return Fulfills with `undefined` upon success. - */ - function appendFile( - path: PathLike | FileHandle, - data: string | Uint8Array, - options?: (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) | BufferEncoding | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * - * If no encoding is specified (using `options.encoding`), the data is returned - * as a `Buffer` object. Otherwise, the data will be a string. - * - * If `options` is a string, then it specifies the encoding. - * - * When the `path` is a directory, the behavior of `fsPromises.readFile()` is - * platform-specific. On macOS, Linux, and Windows, the promise will be rejected - * with an error. On FreeBSD, a representation of the directory's contents will be - * returned. - * - * An example of reading a `package.json` file located in the same directory of the - * running code: - * - * ```js - * import { readFile } from 'node:fs/promises'; - * try { - * const filePath = new URL('./package.json', import.meta.url); - * const contents = await readFile(filePath, { encoding: 'utf8' }); - * console.log(contents); - * } catch (err) { - * console.error(err.message); - * } - * ``` - * - * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a - * request is aborted the promise returned is rejected with an `AbortError`: - * - * ```js - * import { readFile } from 'node:fs/promises'; - * - * try { - * const controller = new AbortController(); - * const { signal } = controller; - * const promise = readFile(fileName, { signal }); - * - * // Abort the request before the promise settles. - * controller.abort(); - * - * await promise; - * } catch (err) { - * // When a request is aborted - err is an AbortError - * console.error(err); - * } - * ``` - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.readFile` performs. - * - * Any specified `FileHandle` has to support reading. - * @since v10.0.0 - * @param path filename or `FileHandle` - * @return Fulfills with the contents of the file. - */ - function readFile( - path: PathLike | FileHandle, - options?: - | ({ - encoding?: null | undefined; - flag?: OpenMode | undefined; - } & Abortable) - | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile( - path: PathLike | FileHandle, - options: - | ({ - encoding: BufferEncoding; - flag?: OpenMode | undefined; - } & Abortable) - | BufferEncoding, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile( - path: PathLike | FileHandle, - options?: - | ( - & ObjectEncodingOptions - & Abortable - & { - flag?: OpenMode | undefined; - } - ) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail. - * - * Creates an `fs.Dir`, which contains all further functions for reading from - * and cleaning up the directory. - * - * The `encoding` option sets the encoding for the `path` while opening the - * directory and subsequent read operations. - * - * Example using async iteration: - * - * ```js - * import { opendir } from 'node:fs/promises'; - * - * try { - * const dir = await opendir('./'); - * for await (const dirent of dir) - * console.log(dirent.name); - * } catch (err) { - * console.error(err); - * } - * ``` - * - * When using the async iterator, the `fs.Dir` object will be automatically - * closed after the iterator exits. - * @since v12.12.0 - * @return Fulfills with an {fs.Dir}. - */ - function opendir(path: PathLike, options?: OpenDirOptions): Promise; - interface WatchOptions extends _WatchOptions { - maxQueue?: number | undefined; - overflow?: "ignore" | "throw" | undefined; - } - interface WatchOptionsWithBufferEncoding extends WatchOptions { - encoding: "buffer"; - } - interface WatchOptionsWithStringEncoding extends WatchOptions { - encoding?: BufferEncoding | undefined; - } - /** - * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory. - * - * ```js - * import { watch } from 'node:fs/promises'; - * - * const ac = new AbortController(); - * const { signal } = ac; - * setTimeout(() => ac.abort(), 10000); - * - * (async () => { - * try { - * const watcher = watch(__filename, { signal }); - * for await (const event of watcher) - * console.log(event); - * } catch (err) { - * if (err.name === 'AbortError') - * return; - * throw err; - * } - * })(); - * ``` - * - * On most platforms, `'rename'` is emitted whenever a filename appears or - * disappears in the directory. - * - * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`. - * @since v15.9.0, v14.18.0 - * @return of objects with the properties: - */ - function watch( - filename: PathLike, - options?: WatchOptionsWithStringEncoding | BufferEncoding, - ): NodeJS.AsyncIterator>; - function watch( - filename: PathLike, - options: WatchOptionsWithBufferEncoding | "buffer", - ): NodeJS.AsyncIterator>; - function watch( - filename: PathLike, - options: WatchOptions | BufferEncoding | "buffer", - ): NodeJS.AsyncIterator>; - /** - * Asynchronously copies the entire directory structure from `src` to `dest`, - * including subdirectories and files. - * - * When copying a directory to another directory, globs are not supported and - * behavior is similar to `cp dir1/ dir2/`. - * @since v16.7.0 - * @experimental - * @param src source path to copy. - * @param dest destination path to copy to. - * @return Fulfills with `undefined` upon success. - */ - function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise; - /** - * ```js - * import { glob } from 'node:fs/promises'; - * - * for await (const entry of glob('*.js')) - * console.log(entry); - * ``` - * @since v22.0.0 - * @returns An AsyncIterator that yields the paths of files - * that match the pattern. - */ - function glob(pattern: string | readonly string[]): NodeJS.AsyncIterator; - function glob( - pattern: string | readonly string[], - options: GlobOptionsWithFileTypes, - ): NodeJS.AsyncIterator; - function glob( - pattern: string | readonly string[], - options: GlobOptionsWithoutFileTypes, - ): NodeJS.AsyncIterator; - function glob( - pattern: string | readonly string[], - options: GlobOptions, - ): NodeJS.AsyncIterator; -} -declare module "fs/promises" { - export * from "node:fs/promises"; -} diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts deleted file mode 100644 index 36e7f90..0000000 --- a/node_modules/@types/node/globals.d.ts +++ /dev/null @@ -1,150 +0,0 @@ -declare var global: typeof globalThis; - -declare var process: NodeJS.Process; - -interface ErrorConstructor { - /** - * Creates a `.stack` property on `targetObject`, which when accessed returns - * a string representing the location in the code at which - * `Error.captureStackTrace()` was called. - * - * ```js - * const myObject = {}; - * Error.captureStackTrace(myObject); - * myObject.stack; // Similar to `new Error().stack` - * ``` - * - * The first line of the trace will be prefixed with - * `${myObject.name}: ${myObject.message}`. - * - * The optional `constructorOpt` argument accepts a function. If given, all frames - * above `constructorOpt`, including `constructorOpt`, will be omitted from the - * generated stack trace. - * - * The `constructorOpt` argument is useful for hiding implementation - * details of error generation from the user. For instance: - * - * ```js - * function a() { - * b(); - * } - * - * function b() { - * c(); - * } - * - * function c() { - * // Create an error without stack trace to avoid calculating the stack trace twice. - * const { stackTraceLimit } = Error; - * Error.stackTraceLimit = 0; - * const error = new Error(); - * Error.stackTraceLimit = stackTraceLimit; - * - * // Capture the stack trace above function b - * Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace - * throw error; - * } - * - * a(); - * ``` - */ - captureStackTrace(targetObject: object, constructorOpt?: Function): void; - /** - * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces - */ - prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any; - /** - * The `Error.stackTraceLimit` property specifies the number of stack frames - * collected by a stack trace (whether generated by `new Error().stack` or - * `Error.captureStackTrace(obj)`). - * - * The default value is `10` but may be set to any valid JavaScript number. Changes - * will affect any stack trace captured _after_ the value has been changed. - * - * If set to a non-number value, or set to a negative number, stack traces will - * not capture any frames. - */ - stackTraceLimit: number; -} - -/** - * Enable this API with the `--expose-gc` CLI flag. - */ -declare var gc: NodeJS.GCFunction | undefined; - -declare namespace NodeJS { - interface CallSite { - getColumnNumber(): number | null; - getEnclosingColumnNumber(): number | null; - getEnclosingLineNumber(): number | null; - getEvalOrigin(): string | undefined; - getFileName(): string | null; - getFunction(): Function | undefined; - getFunctionName(): string | null; - getLineNumber(): number | null; - getMethodName(): string | null; - getPosition(): number; - getPromiseIndex(): number | null; - getScriptHash(): string; - getScriptNameOrSourceURL(): string | null; - getThis(): unknown; - getTypeName(): string | null; - isAsync(): boolean; - isConstructor(): boolean; - isEval(): boolean; - isNative(): boolean; - isPromiseAll(): boolean; - isToplevel(): boolean; - } - - interface ErrnoException extends Error { - errno?: number | undefined; - code?: string | undefined; - path?: string | undefined; - syscall?: string | undefined; - } - - interface RefCounted { - ref(): this; - unref(): this; - } - - interface Dict { - [key: string]: T | undefined; - } - - interface ReadOnlyDict { - readonly [key: string]: T | undefined; - } - - type PartialOptions = { [K in keyof T]?: T[K] | undefined }; - - interface GCFunction { - (minor?: boolean): void; - (options: NodeJS.GCOptions & { execution: "async" }): Promise; - (options: NodeJS.GCOptions): void; - } - - interface GCOptions { - execution?: "sync" | "async" | undefined; - flavor?: "regular" | "last-resort" | undefined; - type?: "major-snapshot" | "major" | "minor" | undefined; - filename?: string | undefined; - } - - /** An iterable iterator returned by the Node.js API. */ - interface Iterator extends IteratorObject { - [Symbol.iterator](): NodeJS.Iterator; - } - - /** An async iterable iterator returned by the Node.js API. */ - interface AsyncIterator extends AsyncIteratorObject { - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - } - - /** The [`BufferSource`](https://webidl.spec.whatwg.org/#BufferSource) type from the Web IDL specification. */ - type BufferSource = NonSharedArrayBufferView | ArrayBuffer; - - /** The [`AllowSharedBufferSource`](https://webidl.spec.whatwg.org/#AllowSharedBufferSource) type from the Web IDL specification. */ - type AllowSharedBufferSource = ArrayBufferView | ArrayBufferLike; -} diff --git a/node_modules/@types/node/globals.typedarray.d.ts b/node_modules/@types/node/globals.typedarray.d.ts deleted file mode 100644 index e69dd0c..0000000 --- a/node_modules/@types/node/globals.typedarray.d.ts +++ /dev/null @@ -1,101 +0,0 @@ -export {}; // Make this a module - -declare global { - namespace NodeJS { - type TypedArray = - | Uint8Array - | Uint8ClampedArray - | Uint16Array - | Uint32Array - | Int8Array - | Int16Array - | Int32Array - | BigUint64Array - | BigInt64Array - | Float16Array - | Float32Array - | Float64Array; - type ArrayBufferView = - | TypedArray - | DataView; - - // The following aliases are required to allow use of non-shared ArrayBufferViews in @types/node - // while maintaining compatibility with TS <=5.6. - // TODO: remove once @types/node no longer supports TS 5.6, and replace with native types. - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedUint8Array = Uint8Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedUint8ClampedArray = Uint8ClampedArray; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedUint16Array = Uint16Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedUint32Array = Uint32Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedInt8Array = Int8Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedInt16Array = Int16Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedInt32Array = Int32Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedBigUint64Array = BigUint64Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedBigInt64Array = BigInt64Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedFloat16Array = Float16Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedFloat32Array = Float32Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedFloat64Array = Float64Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedDataView = DataView; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedTypedArray = TypedArray; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedArrayBufferView = ArrayBufferView; - } -} diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts deleted file mode 100644 index c2e00e7..0000000 --- a/node_modules/@types/node/http.d.ts +++ /dev/null @@ -1,2147 +0,0 @@ -declare module "node:http" { - import { NonSharedBuffer } from "node:buffer"; - import { LookupOptions } from "node:dns"; - import { EventEmitter } from "node:events"; - import * as net from "node:net"; - import * as stream from "node:stream"; - import { URL } from "node:url"; - // incoming headers will never contain number - interface IncomingHttpHeaders extends NodeJS.Dict { - accept?: string | undefined; - "accept-encoding"?: string | undefined; - "accept-language"?: string | undefined; - "accept-patch"?: string | undefined; - "accept-ranges"?: string | undefined; - "access-control-allow-credentials"?: string | undefined; - "access-control-allow-headers"?: string | undefined; - "access-control-allow-methods"?: string | undefined; - "access-control-allow-origin"?: string | undefined; - "access-control-expose-headers"?: string | undefined; - "access-control-max-age"?: string | undefined; - "access-control-request-headers"?: string | undefined; - "access-control-request-method"?: string | undefined; - age?: string | undefined; - allow?: string | undefined; - "alt-svc"?: string | undefined; - authorization?: string | undefined; - "cache-control"?: string | undefined; - connection?: string | undefined; - "content-disposition"?: string | undefined; - "content-encoding"?: string | undefined; - "content-language"?: string | undefined; - "content-length"?: string | undefined; - "content-location"?: string | undefined; - "content-range"?: string | undefined; - "content-type"?: string | undefined; - cookie?: string | undefined; - date?: string | undefined; - etag?: string | undefined; - expect?: string | undefined; - expires?: string | undefined; - forwarded?: string | undefined; - from?: string | undefined; - host?: string | undefined; - "if-match"?: string | undefined; - "if-modified-since"?: string | undefined; - "if-none-match"?: string | undefined; - "if-unmodified-since"?: string | undefined; - "last-modified"?: string | undefined; - location?: string | undefined; - origin?: string | undefined; - pragma?: string | undefined; - "proxy-authenticate"?: string | undefined; - "proxy-authorization"?: string | undefined; - "public-key-pins"?: string | undefined; - range?: string | undefined; - referer?: string | undefined; - "retry-after"?: string | undefined; - "sec-fetch-site"?: string | undefined; - "sec-fetch-mode"?: string | undefined; - "sec-fetch-user"?: string | undefined; - "sec-fetch-dest"?: string | undefined; - "sec-websocket-accept"?: string | undefined; - "sec-websocket-extensions"?: string | undefined; - "sec-websocket-key"?: string | undefined; - "sec-websocket-protocol"?: string | undefined; - "sec-websocket-version"?: string | undefined; - "set-cookie"?: string[] | undefined; - "strict-transport-security"?: string | undefined; - tk?: string | undefined; - trailer?: string | undefined; - "transfer-encoding"?: string | undefined; - upgrade?: string | undefined; - "user-agent"?: string | undefined; - vary?: string | undefined; - via?: string | undefined; - warning?: string | undefined; - "www-authenticate"?: string | undefined; - } - // outgoing headers allows numbers (as they are converted internally to strings) - type OutgoingHttpHeader = number | string | string[]; - interface OutgoingHttpHeaders extends NodeJS.Dict { - accept?: string | string[] | undefined; - "accept-charset"?: string | string[] | undefined; - "accept-encoding"?: string | string[] | undefined; - "accept-language"?: string | string[] | undefined; - "accept-ranges"?: string | undefined; - "access-control-allow-credentials"?: string | undefined; - "access-control-allow-headers"?: string | undefined; - "access-control-allow-methods"?: string | undefined; - "access-control-allow-origin"?: string | undefined; - "access-control-expose-headers"?: string | undefined; - "access-control-max-age"?: string | undefined; - "access-control-request-headers"?: string | undefined; - "access-control-request-method"?: string | undefined; - age?: string | undefined; - allow?: string | undefined; - authorization?: string | undefined; - "cache-control"?: string | undefined; - "cdn-cache-control"?: string | undefined; - connection?: string | string[] | undefined; - "content-disposition"?: string | undefined; - "content-encoding"?: string | undefined; - "content-language"?: string | undefined; - "content-length"?: string | number | undefined; - "content-location"?: string | undefined; - "content-range"?: string | undefined; - "content-security-policy"?: string | undefined; - "content-security-policy-report-only"?: string | undefined; - "content-type"?: string | undefined; - cookie?: string | string[] | undefined; - dav?: string | string[] | undefined; - dnt?: string | undefined; - date?: string | undefined; - etag?: string | undefined; - expect?: string | undefined; - expires?: string | undefined; - forwarded?: string | undefined; - from?: string | undefined; - host?: string | undefined; - "if-match"?: string | undefined; - "if-modified-since"?: string | undefined; - "if-none-match"?: string | undefined; - "if-range"?: string | undefined; - "if-unmodified-since"?: string | undefined; - "last-modified"?: string | undefined; - link?: string | string[] | undefined; - location?: string | undefined; - "max-forwards"?: string | undefined; - origin?: string | undefined; - pragma?: string | string[] | undefined; - "proxy-authenticate"?: string | string[] | undefined; - "proxy-authorization"?: string | undefined; - "public-key-pins"?: string | undefined; - "public-key-pins-report-only"?: string | undefined; - range?: string | undefined; - referer?: string | undefined; - "referrer-policy"?: string | undefined; - refresh?: string | undefined; - "retry-after"?: string | undefined; - "sec-websocket-accept"?: string | undefined; - "sec-websocket-extensions"?: string | string[] | undefined; - "sec-websocket-key"?: string | undefined; - "sec-websocket-protocol"?: string | string[] | undefined; - "sec-websocket-version"?: string | undefined; - server?: string | undefined; - "set-cookie"?: string | string[] | undefined; - "strict-transport-security"?: string | undefined; - te?: string | undefined; - trailer?: string | undefined; - "transfer-encoding"?: string | undefined; - "user-agent"?: string | undefined; - upgrade?: string | undefined; - "upgrade-insecure-requests"?: string | undefined; - vary?: string | undefined; - via?: string | string[] | undefined; - warning?: string | undefined; - "www-authenticate"?: string | string[] | undefined; - "x-content-type-options"?: string | undefined; - "x-dns-prefetch-control"?: string | undefined; - "x-frame-options"?: string | undefined; - "x-xss-protection"?: string | undefined; - } - interface ClientRequestArgs extends Pick { - _defaultAgent?: Agent | undefined; - agent?: Agent | boolean | undefined; - auth?: string | null | undefined; - createConnection?: - | (( - options: ClientRequestArgs, - oncreate: (err: Error | null, socket: stream.Duplex) => void, - ) => stream.Duplex | null | undefined) - | undefined; - defaultPort?: number | string | undefined; - family?: number | undefined; - headers?: OutgoingHttpHeaders | readonly string[] | undefined; - host?: string | null | undefined; - hostname?: string | null | undefined; - insecureHTTPParser?: boolean | undefined; - localAddress?: string | undefined; - localPort?: number | undefined; - lookup?: net.LookupFunction | undefined; - /** - * @default 16384 - */ - maxHeaderSize?: number | undefined; - method?: string | undefined; - path?: string | null | undefined; - port?: number | string | null | undefined; - protocol?: string | null | undefined; - setDefaultHeaders?: boolean | undefined; - setHost?: boolean | undefined; - signal?: AbortSignal | undefined; - socketPath?: string | undefined; - timeout?: number | undefined; - uniqueHeaders?: Array | undefined; - joinDuplicateHeaders?: boolean | undefined; - } - interface ServerOptions< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - > { - /** - * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`. - */ - IncomingMessage?: Request | undefined; - /** - * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`. - */ - ServerResponse?: Response | undefined; - /** - * Sets the timeout value in milliseconds for receiving the entire request from the client. - * @see Server.requestTimeout for more information. - * @default 300000 - * @since v18.0.0 - */ - requestTimeout?: number | undefined; - /** - * It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates. - * @default false - * @since v18.14.0 - */ - joinDuplicateHeaders?: boolean | undefined; - /** - * The number of milliseconds of inactivity a server needs to wait for additional incoming data, - * after it has finished writing the last response, before a socket will be destroyed. - * @see Server.keepAliveTimeout for more information. - * @default 5000 - * @since v18.0.0 - */ - keepAliveTimeout?: number | undefined; - /** - * An additional buffer time added to the - * `server.keepAliveTimeout` to extend the internal socket timeout. - * @since 24.6.0 - * @default 1000 - */ - keepAliveTimeoutBuffer?: number | undefined; - /** - * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests. - * @default 30000 - */ - connectionsCheckingInterval?: number | undefined; - /** - * Sets the timeout value in milliseconds for receiving the complete HTTP headers from the client. - * See {@link Server.headersTimeout} for more information. - * @default 60000 - * @since 18.0.0 - */ - headersTimeout?: number | undefined; - /** - * Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`. - * This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`. - * Default: @see stream.getDefaultHighWaterMark(). - * @since v20.1.0 - */ - highWaterMark?: number | undefined; - /** - * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. - * Using the insecure parser should be avoided. - * See --insecure-http-parser for more information. - * @default false - */ - insecureHTTPParser?: boolean | undefined; - /** - * Optionally overrides the value of `--max-http-header-size` for requests received by - * this server, i.e. the maximum length of request headers in bytes. - * @default 16384 - * @since v13.3.0 - */ - maxHeaderSize?: number | undefined; - /** - * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. - * @default true - * @since v16.5.0 - */ - noDelay?: boolean | undefined; - /** - * If set to `true`, it forces the server to respond with a 400 (Bad Request) status code - * to any HTTP/1.1 request message that lacks a Host header (as mandated by the specification). - * @default true - * @since 20.0.0 - */ - requireHostHeader?: boolean | undefined; - /** - * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, - * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. - * @default false - * @since v16.5.0 - */ - keepAlive?: boolean | undefined; - /** - * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. - * @default 0 - * @since v16.5.0 - */ - keepAliveInitialDelay?: number | undefined; - /** - * A list of response headers that should be sent only once. - * If the header's value is an array, the items will be joined using `; `. - */ - uniqueHeaders?: Array | undefined; - /** - * A callback which receives an - * incoming request and returns a boolean, to control which upgrade attempts - * should be accepted. Accepted upgrades will fire an `'upgrade'` event (or - * their sockets will be destroyed, if no listener is registered) while - * rejected upgrades will fire a `'request'` event like any non-upgrade - * request. - * @since v24.9.0 - * @default () => server.listenerCount('upgrade') > 0 - */ - shouldUpgradeCallback?: ((request: InstanceType) => boolean) | undefined; - /** - * If set to `true`, an error is thrown when writing to an HTTP response which does not have a body. - * @default false - * @since v18.17.0, v20.2.0 - */ - rejectNonStandardBodyWrites?: boolean | undefined; - /** - * If set to `true`, requests without `Content-Length` - * or `Transfer-Encoding` headers (indicating no body) will be initialized with an - * already-ended body stream, so they will never emit any stream events - * (like `'data'` or `'end'`). You can use `req.readableEnded` to detect this case. - * @since v25.1.0 - * @default false - */ - optimizeEmptyRequests?: boolean | undefined; - } - type RequestListener< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - > = (request: InstanceType, response: InstanceType & { req: InstanceType }) => void; - interface ServerEventMap< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - > extends net.ServerEventMap { - "checkContinue": Parameters>; - "checkExpectation": Parameters>; - "clientError": [exception: Error, socket: stream.Duplex]; - "connect": [request: InstanceType, socket: stream.Duplex, head: NonSharedBuffer]; - "connection": [socket: net.Socket]; - "dropRequest": [request: InstanceType, socket: stream.Duplex]; - "request": Parameters>; - "upgrade": [req: InstanceType, socket: stream.Duplex, head: NonSharedBuffer]; - } - /** - * @since v0.1.17 - */ - class Server< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - > extends net.Server { - constructor(requestListener?: RequestListener); - constructor(options: ServerOptions, requestListener?: RequestListener); - /** - * Sets the timeout value for sockets, and emits a `'timeout'` event on - * the Server object, passing the socket as an argument, if a timeout - * occurs. - * - * If there is a `'timeout'` event listener on the Server object, then it - * will be called with the timed-out socket as an argument. - * - * By default, the Server does not timeout sockets. However, if a callback - * is assigned to the Server's `'timeout'` event, timeouts must be handled - * explicitly. - * @since v0.9.12 - * @param [msecs=0 (no timeout)] - */ - setTimeout(msecs?: number, callback?: (socket: net.Socket) => void): this; - setTimeout(callback: (socket: net.Socket) => void): this; - /** - * Limits maximum incoming headers count. If set to 0, no limit will be applied. - * @since v0.7.0 - */ - maxHeadersCount: number | null; - /** - * The maximum number of requests socket can handle - * before closing keep alive connection. - * - * A value of `0` will disable the limit. - * - * When the limit is reached it will set the `Connection` header value to `close`, - * but will not actually close the connection, subsequent requests sent - * after the limit is reached will get `503 Service Unavailable` as a response. - * @since v16.10.0 - */ - maxRequestsPerSocket: number | null; - /** - * The number of milliseconds of inactivity before a socket is presumed - * to have timed out. - * - * A value of `0` will disable the timeout behavior on incoming connections. - * - * The socket timeout logic is set up on connection, so changing this - * value only affects new connections to the server, not any existing connections. - * @since v0.9.12 - */ - timeout: number; - /** - * Limit the amount of time the parser will wait to receive the complete HTTP - * headers. - * - * If the timeout expires, the server responds with status 408 without - * forwarding the request to the request listener and then closes the connection. - * - * It must be set to a non-zero value (e.g. 120 seconds) to protect against - * potential Denial-of-Service attacks in case the server is deployed without a - * reverse proxy in front. - * @since v11.3.0, v10.14.0 - */ - headersTimeout: number; - /** - * The number of milliseconds of inactivity a server needs to wait for additional - * incoming data, after it has finished writing the last response, before a socket - * will be destroyed. - * - * This timeout value is combined with the - * `server.keepAliveTimeoutBuffer` option to determine the actual socket - * timeout, calculated as: - * socketTimeout = keepAliveTimeout + keepAliveTimeoutBuffer - * If the server receives new data before the keep-alive timeout has fired, it - * will reset the regular inactivity timeout, i.e., `server.timeout`. - * - * A value of `0` will disable the keep-alive timeout behavior on incoming - * connections. - * A value of `0` makes the HTTP server behave similarly to Node.js versions prior - * to 8.0.0, which did not have a keep-alive timeout. - * - * The socket timeout logic is set up on connection, so changing this value only - * affects new connections to the server, not any existing connections. - * @since v8.0.0 - */ - keepAliveTimeout: number; - /** - * An additional buffer time added to the - * `server.keepAliveTimeout` to extend the internal socket timeout. - * - * This buffer helps reduce connection reset (`ECONNRESET`) errors by increasing - * the socket timeout slightly beyond the advertised keep-alive timeout. - * - * This option applies only to new incoming connections. - * @since v24.6.0 - * @default 1000 - */ - keepAliveTimeoutBuffer: number; - /** - * Sets the timeout value in milliseconds for receiving the entire request from - * the client. - * - * If the timeout expires, the server responds with status 408 without - * forwarding the request to the request listener and then closes the connection. - * - * It must be set to a non-zero value (e.g. 120 seconds) to protect against - * potential Denial-of-Service attacks in case the server is deployed without a - * reverse proxy in front. - * @since v14.11.0 - */ - requestTimeout: number; - /** - * Closes all connections connected to this server. - * @since v18.2.0 - */ - closeAllConnections(): void; - /** - * Closes all connections connected to this server which are not sending a request - * or waiting for a response. - * @since v18.2.0 - */ - closeIdleConnections(): void; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ServerEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ServerEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: ServerEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: ServerEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface OutgoingMessageEventMap extends stream.WritableEventMap { - "prefinish": []; - } - /** - * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract outgoing message from - * the perspective of the participants of an HTTP transaction. - * @since v0.1.17 - */ - class OutgoingMessage extends stream.Writable { - constructor(); - readonly req: Request; - chunkedEncoding: boolean; - shouldKeepAlive: boolean; - useChunkedEncodingByDefault: boolean; - sendDate: boolean; - /** - * @deprecated Use `writableEnded` instead. - */ - finished: boolean; - /** - * Read-only. `true` if the headers were sent, otherwise `false`. - * @since v0.9.3 - */ - readonly headersSent: boolean; - /** - * Alias of `outgoingMessage.socket`. - * @since v0.3.0 - * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead. - */ - readonly connection: net.Socket | null; - /** - * Reference to the underlying socket. Usually, users will not want to access - * this property. - * - * After calling `outgoingMessage.end()`, this property will be nulled. - * @since v0.3.0 - */ - readonly socket: net.Socket | null; - /** - * Once a socket is associated with the message and is connected, `socket.setTimeout()` will be called with `msecs` as the first parameter. - * @since v0.9.12 - * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event. - */ - setTimeout(msecs: number, callback?: () => void): this; - /** - * Sets a single header value. If the header already exists in the to-be-sent - * headers, its value will be replaced. Use an array of strings to send multiple - * headers with the same name. - * @since v0.4.0 - * @param name Header name - * @param value Header value - */ - setHeader(name: string, value: number | string | readonly string[]): this; - /** - * Sets multiple header values for implicit headers. headers must be an instance of - * `Headers` or `Map`, if a header already exists in the to-be-sent headers, its - * value will be replaced. - * - * ```js - * const headers = new Headers({ foo: 'bar' }); - * outgoingMessage.setHeaders(headers); - * ``` - * - * or - * - * ```js - * const headers = new Map([['foo', 'bar']]); - * outgoingMessage.setHeaders(headers); - * ``` - * - * When headers have been set with `outgoingMessage.setHeaders()`, they will be - * merged with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * ```js - * // Returns content-type = text/plain - * const server = http.createServer((req, res) => { - * const headers = new Headers({ 'Content-Type': 'text/html' }); - * res.setHeaders(headers); - * res.writeHead(200, { 'Content-Type': 'text/plain' }); - * res.end('ok'); - * }); - * ``` - * - * @since v19.6.0, v18.15.0 - * @param name Header name - * @param value Header value - */ - setHeaders(headers: Headers | Map): this; - /** - * Append a single header value to the header object. - * - * If the value is an array, this is equivalent to calling this method multiple - * times. - * - * If there were no previous values for the header, this is equivalent to calling `outgoingMessage.setHeader(name, value)`. - * - * Depending of the value of `options.uniqueHeaders` when the client request or the - * server were created, this will end up in the header being sent multiple times or - * a single time with values joined using `; `. - * @since v18.3.0, v16.17.0 - * @param name Header name - * @param value Header value - */ - appendHeader(name: string, value: string | readonly string[]): this; - /** - * Gets the value of the HTTP header with the given name. If that header is not - * set, the returned value will be `undefined`. - * @since v0.4.0 - * @param name Name of header - */ - getHeader(name: string): number | string | string[] | undefined; - /** - * Returns a shallow copy of the current outgoing headers. Since a shallow - * copy is used, array values may be mutated without additional calls to - * various header-related HTTP module methods. The keys of the returned - * object are the header names and the values are the respective header - * values. All header names are lowercase. - * - * The object returned by the `outgoingMessage.getHeaders()` method does - * not prototypically inherit from the JavaScript `Object`. This means that - * typical `Object` methods such as `obj.toString()`, `obj.hasOwnProperty()`, - * and others are not defined and will not work. - * - * ```js - * outgoingMessage.setHeader('Foo', 'bar'); - * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headers = outgoingMessage.getHeaders(); - * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } - * ``` - * @since v7.7.0 - */ - getHeaders(): OutgoingHttpHeaders; - /** - * Returns an array containing the unique names of the current outgoing headers. - * All names are lowercase. - * @since v7.7.0 - */ - getHeaderNames(): string[]; - /** - * Returns `true` if the header identified by `name` is currently set in the - * outgoing headers. The header name is case-insensitive. - * - * ```js - * const hasContentType = outgoingMessage.hasHeader('content-type'); - * ``` - * @since v7.7.0 - */ - hasHeader(name: string): boolean; - /** - * Removes a header that is queued for implicit sending. - * - * ```js - * outgoingMessage.removeHeader('Content-Encoding'); - * ``` - * @since v0.4.0 - * @param name Header name - */ - removeHeader(name: string): void; - /** - * Adds HTTP trailers (headers but at the end of the message) to the message. - * - * Trailers will **only** be emitted if the message is chunked encoded. If not, - * the trailers will be silently discarded. - * - * HTTP requires the `Trailer` header to be sent to emit trailers, - * with a list of header field names in its value, e.g. - * - * ```js - * message.writeHead(200, { 'Content-Type': 'text/plain', - * 'Trailer': 'Content-MD5' }); - * message.write(fileData); - * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' }); - * message.end(); - * ``` - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * @since v0.3.0 - */ - addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void; - /** - * Flushes the message headers. - * - * For efficiency reason, Node.js normally buffers the message headers - * until `outgoingMessage.end()` is called or the first chunk of message data - * is written. It then tries to pack the headers and data into a single TCP - * packet. - * - * It is usually desired (it saves a TCP round-trip), but not when the first - * data is not sent until possibly much later. `outgoingMessage.flushHeaders()` bypasses the optimization and kickstarts the message. - * @since v1.6.0 - */ - flushHeaders(): void; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: OutgoingMessageEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: OutgoingMessageEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: OutgoingMessageEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: OutgoingMessageEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: OutgoingMessageEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: OutgoingMessageEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: OutgoingMessageEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: OutgoingMessageEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: OutgoingMessageEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: OutgoingMessageEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: OutgoingMessageEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - /** - * This object is created internally by an HTTP server, not by the user. It is - * passed as the second parameter to the `'request'` event. - * @since v0.1.17 - */ - class ServerResponse extends OutgoingMessage { - /** - * When using implicit headers (not calling `response.writeHead()` explicitly), - * this property controls the status code that will be sent to the client when - * the headers get flushed. - * - * ```js - * response.statusCode = 404; - * ``` - * - * After response header was sent to the client, this property indicates the - * status code which was sent out. - * @since v0.4.0 - */ - statusCode: number; - /** - * When using implicit headers (not calling `response.writeHead()` explicitly), - * this property controls the status message that will be sent to the client when - * the headers get flushed. If this is left as `undefined` then the standard - * message for the status code will be used. - * - * ```js - * response.statusMessage = 'Not found'; - * ``` - * - * After response header was sent to the client, this property indicates the - * status message which was sent out. - * @since v0.11.8 - */ - statusMessage: string; - /** - * If set to `true`, Node.js will check whether the `Content-Length` header value and the size of the body, in bytes, are equal. - * Mismatching the `Content-Length` header value will result - * in an `Error` being thrown, identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. - * @since v18.10.0, v16.18.0 - */ - strictContentLength: boolean; - constructor(req: Request); - assignSocket(socket: net.Socket): void; - detachSocket(socket: net.Socket): void; - /** - * Sends an HTTP/1.1 100 Continue message to the client, indicating that - * the request body should be sent. See the `'checkContinue'` event on `Server`. - * @since v0.3.0 - */ - writeContinue(callback?: () => void): void; - /** - * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header, - * indicating that the user agent can preload/preconnect the linked resources. - * The `hints` is an object containing the values of headers to be sent with - * early hints message. The optional `callback` argument will be called when - * the response message has been written. - * - * **Example** - * - * ```js - * const earlyHintsLink = '; rel=preload; as=style'; - * response.writeEarlyHints({ - * 'link': earlyHintsLink, - * }); - * - * const earlyHintsLinks = [ - * '; rel=preload; as=style', - * '; rel=preload; as=script', - * ]; - * response.writeEarlyHints({ - * 'link': earlyHintsLinks, - * 'x-trace-id': 'id for diagnostics', - * }); - * - * const earlyHintsCallback = () => console.log('early hints message sent'); - * response.writeEarlyHints({ - * 'link': earlyHintsLinks, - * }, earlyHintsCallback); - * ``` - * @since v18.11.0 - * @param hints An object containing the values of headers - * @param callback Will be called when the response message has been written - */ - writeEarlyHints(hints: Record, callback?: () => void): void; - /** - * Sends a response header to the request. The status code is a 3-digit HTTP - * status code, like `404`. The last argument, `headers`, are the response headers. - * Optionally one can give a human-readable `statusMessage` as the second - * argument. - * - * `headers` may be an `Array` where the keys and values are in the same list. - * It is _not_ a list of tuples. So, the even-numbered offsets are key values, - * and the odd-numbered offsets are the associated values. The array is in the same - * format as `request.rawHeaders`. - * - * Returns a reference to the `ServerResponse`, so that calls can be chained. - * - * ```js - * const body = 'hello world'; - * response - * .writeHead(200, { - * 'Content-Length': Buffer.byteLength(body), - * 'Content-Type': 'text/plain', - * }) - * .end(body); - * ``` - * - * This method must only be called once on a message and it must - * be called before `response.end()` is called. - * - * If `response.write()` or `response.end()` are called before calling - * this, the implicit/mutable headers will be calculated and call this function. - * - * When headers have been set with `response.setHeader()`, they will be merged - * with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * If this method is called and `response.setHeader()` has not been called, - * it will directly write the supplied header values onto the network channel - * without caching internally, and the `response.getHeader()` on the header - * will not yield the expected result. If progressive population of headers is - * desired with potential future retrieval and modification, use `response.setHeader()` instead. - * - * ```js - * // Returns content-type = text/plain - * const server = http.createServer((req, res) => { - * res.setHeader('Content-Type', 'text/html'); - * res.setHeader('X-Foo', 'bar'); - * res.writeHead(200, { 'Content-Type': 'text/plain' }); - * res.end('ok'); - * }); - * ``` - * - * `Content-Length` is read in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js - * will check whether `Content-Length` and the length of the body which has - * been transmitted are equal or not. - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `Error` being thrown. - * @since v0.1.30 - */ - writeHead( - statusCode: number, - statusMessage?: string, - headers?: OutgoingHttpHeaders | OutgoingHttpHeader[], - ): this; - writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this; - /** - * Sends a HTTP/1.1 102 Processing message to the client, indicating that - * the request body should be sent. - * @since v10.0.0 - */ - writeProcessing(callback?: () => void): void; - } - interface InformationEvent { - httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - statusCode: number; - statusMessage: string; - headers: IncomingHttpHeaders; - rawHeaders: string[]; - } - interface ClientRequestEventMap extends stream.WritableEventMap { - /** @deprecated Listen for the `'close'` event instead. */ - "abort": []; - "connect": [response: IncomingMessage, socket: net.Socket, head: NonSharedBuffer]; - "continue": []; - "information": [info: InformationEvent]; - "response": [response: IncomingMessage]; - "socket": [socket: net.Socket]; - "timeout": []; - "upgrade": [response: IncomingMessage, socket: net.Socket, head: NonSharedBuffer]; - } - /** - * This object is created internally and returned from {@link request}. It - * represents an _in-progress_ request whose header has already been queued. The - * header is still mutable using the `setHeader(name, value)`, `getHeader(name)`, `removeHeader(name)` API. The actual header will - * be sent along with the first data chunk or when calling `request.end()`. - * - * To get the response, add a listener for `'response'` to the request object. `'response'` will be emitted from the request object when the response - * headers have been received. The `'response'` event is executed with one - * argument which is an instance of {@link IncomingMessage}. - * - * During the `'response'` event, one can add listeners to the - * response object; particularly to listen for the `'data'` event. - * - * If no `'response'` handler is added, then the response will be - * entirely discarded. However, if a `'response'` event handler is added, - * then the data from the response object **must** be consumed, either by - * calling `response.read()` whenever there is a `'readable'` event, or - * by adding a `'data'` handler, or by calling the `.resume()` method. - * Until the data is consumed, the `'end'` event will not fire. Also, until - * the data is read it will consume memory that can eventually lead to a - * 'process out of memory' error. - * - * For backward compatibility, `res` will only emit `'error'` if there is an `'error'` listener registered. - * - * Set `Content-Length` header to limit the response body size. - * If `response.strictContentLength` is set to `true`, mismatching the `Content-Length` header value will result in an `Error` being thrown, - * identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. - * - * `Content-Length` value should be in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. - * @since v0.1.17 - */ - class ClientRequest extends OutgoingMessage { - /** - * The `request.aborted` property will be `true` if the request has - * been aborted. - * @since v0.11.14 - * @deprecated Since v17.0.0, v16.12.0 - Check `destroyed` instead. - */ - aborted: boolean; - /** - * The request host. - * @since v14.5.0, v12.19.0 - */ - host: string; - /** - * The request protocol. - * @since v14.5.0, v12.19.0 - */ - protocol: string; - /** - * When sending request through a keep-alive enabled agent, the underlying socket - * might be reused. But if server closes connection at unfortunate time, client - * may run into a 'ECONNRESET' error. - * - * ```js - * import http from 'node:http'; - * const agent = new http.Agent({ keepAlive: true }); - * - * // Server has a 5 seconds keep-alive timeout by default - * http - * .createServer((req, res) => { - * res.write('hello\n'); - * res.end(); - * }) - * .listen(3000); - * - * setInterval(() => { - * // Adapting a keep-alive agent - * http.get('http://localhost:3000', { agent }, (res) => { - * res.on('data', (data) => { - * // Do nothing - * }); - * }); - * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout - * ``` - * - * By marking a request whether it reused socket or not, we can do - * automatic error retry base on it. - * - * ```js - * import http from 'node:http'; - * const agent = new http.Agent({ keepAlive: true }); - * - * function retriableRequest() { - * const req = http - * .get('http://localhost:3000', { agent }, (res) => { - * // ... - * }) - * .on('error', (err) => { - * // Check if retry is needed - * if (req.reusedSocket && err.code === 'ECONNRESET') { - * retriableRequest(); - * } - * }); - * } - * - * retriableRequest(); - * ``` - * @since v13.0.0, v12.16.0 - */ - reusedSocket: boolean; - /** - * Limits maximum response headers count. If set to 0, no limit will be applied. - */ - maxHeadersCount: number; - constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); - /** - * The request method. - * @since v0.1.97 - */ - method: string; - /** - * The request path. - * @since v0.4.0 - */ - path: string; - /** - * Marks the request as aborting. Calling this will cause remaining data - * in the response to be dropped and the socket to be destroyed. - * @since v0.3.8 - * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead. - */ - abort(): void; - onSocket(socket: net.Socket): void; - /** - * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called. - * @since v0.5.9 - * @param timeout Milliseconds before a request times out. - * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event. - */ - setTimeout(timeout: number, callback?: () => void): this; - /** - * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called. - * @since v0.5.9 - */ - setNoDelay(noDelay?: boolean): void; - /** - * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called. - * @since v0.5.9 - */ - setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; - /** - * Returns an array containing the unique names of the current outgoing raw - * headers. Header names are returned with their exact casing being set. - * - * ```js - * request.setHeader('Foo', 'bar'); - * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headerNames = request.getRawHeaderNames(); - * // headerNames === ['Foo', 'Set-Cookie'] - * ``` - * @since v15.13.0, v14.17.0 - */ - getRawHeaderNames(): string[]; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ClientRequestEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ClientRequestEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ClientRequestEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: ClientRequestEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: ClientRequestEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: ClientRequestEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ClientRequestEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ClientRequestEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ClientRequestEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: ClientRequestEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ClientRequestEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface IncomingMessageEventMap extends stream.ReadableEventMap { - /** @deprecated Listen for `'close'` event instead. */ - "aborted": []; - } - /** - * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to - * access response - * status, headers, and data. - * - * Different from its `socket` value which is a subclass of `stream.Duplex`, the `IncomingMessage` itself extends `stream.Readable` and is created separately to - * parse and emit the incoming HTTP headers and payload, as the underlying socket - * may be reused multiple times in case of keep-alive. - * @since v0.1.17 - */ - class IncomingMessage extends stream.Readable { - constructor(socket: net.Socket); - /** - * The `message.aborted` property will be `true` if the request has - * been aborted. - * @since v10.1.0 - * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from stream.Readable. - */ - aborted: boolean; - /** - * In case of server request, the HTTP version sent by the client. In the case of - * client response, the HTTP version of the connected-to server. - * Probably either `'1.1'` or `'1.0'`. - * - * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. - * @since v0.1.1 - */ - httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - /** - * The `message.complete` property will be `true` if a complete HTTP message has - * been received and successfully parsed. - * - * This property is particularly useful as a means of determining if a client or - * server fully transmitted a message before a connection was terminated: - * - * ```js - * const req = http.request({ - * host: '127.0.0.1', - * port: 8080, - * method: 'POST', - * }, (res) => { - * res.resume(); - * res.on('end', () => { - * if (!res.complete) - * console.error( - * 'The connection was terminated while the message was still being sent'); - * }); - * }); - * ``` - * @since v0.3.0 - */ - complete: boolean; - /** - * Alias for `message.socket`. - * @since v0.1.90 - * @deprecated Since v16.0.0 - Use `socket`. - */ - connection: net.Socket; - /** - * The `net.Socket` object associated with the connection. - * - * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the - * client's authentication details. - * - * This property is guaranteed to be an instance of the `net.Socket` class, - * a subclass of `stream.Duplex`, unless the user specified a socket - * type other than `net.Socket` or internally nulled. - * @since v0.3.0 - */ - socket: net.Socket; - /** - * The request/response headers object. - * - * Key-value pairs of header names and values. Header names are lower-cased. - * - * ```js - * // Prints something like: - * // - * // { 'user-agent': 'curl/7.22.0', - * // host: '127.0.0.1:8000', - * // accept: '*' } - * console.log(request.headers); - * ``` - * - * Duplicates in raw headers are handled in the following ways, depending on the - * header name: - * - * * Duplicates of `age`, `authorization`, `content-length`, `content-type`, `etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`, `last-modified`, `location`, - * `max-forwards`, `proxy-authorization`, `referer`, `retry-after`, `server`, or `user-agent` are discarded. - * To allow duplicate values of the headers listed above to be joined, - * use the option `joinDuplicateHeaders` in {@link request} and {@link createServer}. See RFC 9110 Section 5.3 for more - * information. - * * `set-cookie` is always an array. Duplicates are added to the array. - * * For duplicate `cookie` headers, the values are joined together with `; `. - * * For all other headers, the values are joined together with `, `. - * @since v0.1.5 - */ - headers: IncomingHttpHeaders; - /** - * Similar to `message.headers`, but there is no join logic and the values are - * always arrays of strings, even for headers received just once. - * - * ```js - * // Prints something like: - * // - * // { 'user-agent': ['curl/7.22.0'], - * // host: ['127.0.0.1:8000'], - * // accept: ['*'] } - * console.log(request.headersDistinct); - * ``` - * @since v18.3.0, v16.17.0 - */ - headersDistinct: NodeJS.Dict; - /** - * The raw request/response headers list exactly as they were received. - * - * The keys and values are in the same list. It is _not_ a - * list of tuples. So, the even-numbered offsets are key values, and the - * odd-numbered offsets are the associated values. - * - * Header names are not lowercased, and duplicates are not merged. - * - * ```js - * // Prints something like: - * // - * // [ 'user-agent', - * // 'this is invalid because there can be only one', - * // 'User-Agent', - * // 'curl/7.22.0', - * // 'Host', - * // '127.0.0.1:8000', - * // 'ACCEPT', - * // '*' ] - * console.log(request.rawHeaders); - * ``` - * @since v0.11.6 - */ - rawHeaders: string[]; - /** - * The request/response trailers object. Only populated at the `'end'` event. - * @since v0.3.0 - */ - trailers: NodeJS.Dict; - /** - * Similar to `message.trailers`, but there is no join logic and the values are - * always arrays of strings, even for headers received just once. - * Only populated at the `'end'` event. - * @since v18.3.0, v16.17.0 - */ - trailersDistinct: NodeJS.Dict; - /** - * The raw request/response trailer keys and values exactly as they were - * received. Only populated at the `'end'` event. - * @since v0.11.6 - */ - rawTrailers: string[]; - /** - * Calls `message.socket.setTimeout(msecs, callback)`. - * @since v0.5.9 - */ - setTimeout(msecs: number, callback?: () => void): this; - /** - * **Only valid for request obtained from {@link Server}.** - * - * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`. - * @since v0.1.1 - */ - method?: string | undefined; - /** - * **Only valid for request obtained from {@link Server}.** - * - * Request URL string. This contains only the URL that is present in the actual - * HTTP request. Take the following request: - * - * ```http - * GET /status?name=ryan HTTP/1.1 - * Accept: text/plain - * ``` - * - * To parse the URL into its parts: - * - * ```js - * new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`); - * ``` - * - * When `request.url` is `'/status?name=ryan'` and `process.env.HOST` is undefined: - * - * ```console - * $ node - * > new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`); - * URL { - * href: 'http://localhost/status?name=ryan', - * origin: 'http://localhost', - * protocol: 'http:', - * username: '', - * password: '', - * host: 'localhost', - * hostname: 'localhost', - * port: '', - * pathname: '/status', - * search: '?name=ryan', - * searchParams: URLSearchParams { 'name' => 'ryan' }, - * hash: '' - * } - * ``` - * - * Ensure that you set `process.env.HOST` to the server's host name, or consider replacing this part entirely. If using `req.headers.host`, ensure proper - * validation is used, as clients may specify a custom `Host` header. - * @since v0.1.90 - */ - url?: string | undefined; - /** - * **Only valid for response obtained from {@link ClientRequest}.** - * - * The 3-digit HTTP response status code. E.G. `404`. - * @since v0.1.1 - */ - statusCode?: number | undefined; - /** - * **Only valid for response obtained from {@link ClientRequest}.** - * - * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`. - * @since v0.11.10 - */ - statusMessage?: string | undefined; - /** - * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error` is provided, an `'error'` event is emitted on the socket and `error` is passed - * as an argument to any listeners on the event. - * @since v0.3.0 - */ - destroy(error?: Error): this; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: IncomingMessageEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: IncomingMessageEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: IncomingMessageEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: IncomingMessageEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: IncomingMessageEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: IncomingMessageEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: IncomingMessageEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: IncomingMessageEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: IncomingMessageEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: IncomingMessageEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: IncomingMessageEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface ProxyEnv extends NodeJS.ProcessEnv { - HTTP_PROXY?: string | undefined; - HTTPS_PROXY?: string | undefined; - NO_PROXY?: string | undefined; - http_proxy?: string | undefined; - https_proxy?: string | undefined; - no_proxy?: string | undefined; - } - interface AgentOptions extends NodeJS.PartialOptions { - /** - * Keep sockets around in a pool to be used by other requests in the future. Default = false - */ - keepAlive?: boolean | undefined; - /** - * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. - * Only relevant if keepAlive is set to true. - */ - keepAliveMsecs?: number | undefined; - /** - * Milliseconds to subtract from - * the server-provided `keep-alive: timeout=...` hint when determining socket - * expiration time. This buffer helps ensure the agent closes the socket - * slightly before the server does, reducing the chance of sending a request - * on a socket that’s about to be closed by the server. - * @since v24.7.0 - * @default 1000 - */ - agentKeepAliveTimeoutBuffer?: number | undefined; - /** - * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity - */ - maxSockets?: number | undefined; - /** - * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity. - */ - maxTotalSockets?: number | undefined; - /** - * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. - */ - maxFreeSockets?: number | undefined; - /** - * Socket timeout in milliseconds. This will set the timeout after the socket is connected. - */ - timeout?: number | undefined; - /** - * Scheduling strategy to apply when picking the next free socket to use. - * @default `lifo` - */ - scheduling?: "fifo" | "lifo" | undefined; - /** - * Environment variables for proxy configuration. See - * [Built-in Proxy Support](https://nodejs.org/docs/latest-v25.x/api/http.html#built-in-proxy-support) for details. - * @since v24.5.0 - */ - proxyEnv?: ProxyEnv | undefined; - /** - * Default port to use when the port is not specified in requests. - * @since v24.5.0 - */ - defaultPort?: number | undefined; - /** - * The protocol to use for the agent. - * @since v24.5.0 - */ - protocol?: string | undefined; - } - /** - * An `Agent` is responsible for managing connection persistence - * and reuse for HTTP clients. It maintains a queue of pending requests - * for a given host and port, reusing a single socket connection for each - * until the queue is empty, at which time the socket is either destroyed - * or put into a pool where it is kept to be used again for requests to the - * same host and port. Whether it is destroyed or pooled depends on the `keepAlive` `option`. - * - * Pooled connections have TCP Keep-Alive enabled for them, but servers may - * still close idle connections, in which case they will be removed from the - * pool and a new connection will be made when a new HTTP request is made for - * that host and port. Servers may also refuse to allow multiple requests - * over the same connection, in which case the connection will have to be - * remade for every request and cannot be pooled. The `Agent` will still make - * the requests to that server, but each one will occur over a new connection. - * - * When a connection is closed by the client or the server, it is removed - * from the pool. Any unused sockets in the pool will be unrefed so as not - * to keep the Node.js process running when there are no outstanding requests. - * (see `socket.unref()`). - * - * It is good practice, to `destroy()` an `Agent` instance when it is no - * longer in use, because unused sockets consume OS resources. - * - * Sockets are removed from an agent when the socket emits either - * a `'close'` event or an `'agentRemove'` event. When intending to keep one - * HTTP request open for a long time without keeping it in the agent, something - * like the following may be done: - * - * ```js - * http.get(options, (res) => { - * // Do stuff - * }).on('socket', (socket) => { - * socket.emit('agentRemove'); - * }); - * ``` - * - * An agent may also be used for an individual request. By providing `{agent: false}` as an option to the `http.get()` or `http.request()` functions, a one-time use `Agent` with default options - * will be used - * for the client connection. - * - * `agent:false`: - * - * ```js - * http.get({ - * hostname: 'localhost', - * port: 80, - * path: '/', - * agent: false, // Create a new agent just for this one request - * }, (res) => { - * // Do stuff with response - * }); - * ``` - * - * `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v25.x/api/net.html#socketconnectoptions-connectlistener) are also supported. - * - * To configure any of them, a custom {@link Agent} instance must be created. - * - * ```js - * import http from 'node:http'; - * const keepAliveAgent = new http.Agent({ keepAlive: true }); - * options.agent = keepAliveAgent; - * http.request(options, onResponseCallback) - * ``` - * @since v0.3.4 - */ - class Agent extends EventEmitter { - /** - * By default set to 256. For agents with `keepAlive` enabled, this - * sets the maximum number of sockets that will be left open in the free - * state. - * @since v0.11.7 - */ - maxFreeSockets: number; - /** - * By default set to `Infinity`. Determines how many concurrent sockets the agent - * can have open per origin. Origin is the returned value of `agent.getName()`. - * @since v0.3.6 - */ - maxSockets: number; - /** - * By default set to `Infinity`. Determines how many concurrent sockets the agent - * can have open. Unlike `maxSockets`, this parameter applies across all origins. - * @since v14.5.0, v12.19.0 - */ - maxTotalSockets: number; - /** - * An object which contains arrays of sockets currently awaiting use by - * the agent when `keepAlive` is enabled. Do not modify. - * - * Sockets in the `freeSockets` list will be automatically destroyed and - * removed from the array on `'timeout'`. - * @since v0.11.4 - */ - readonly freeSockets: NodeJS.ReadOnlyDict; - /** - * An object which contains arrays of sockets currently in use by the - * agent. Do not modify. - * @since v0.3.6 - */ - readonly sockets: NodeJS.ReadOnlyDict; - /** - * An object which contains queues of requests that have not yet been assigned to - * sockets. Do not modify. - * @since v0.5.9 - */ - readonly requests: NodeJS.ReadOnlyDict; - constructor(opts?: AgentOptions); - /** - * Destroy any sockets that are currently in use by the agent. - * - * It is usually not necessary to do this. However, if using an - * agent with `keepAlive` enabled, then it is best to explicitly shut down - * the agent when it is no longer needed. Otherwise, - * sockets might stay open for quite a long time before the server - * terminates them. - * @since v0.11.4 - */ - destroy(): void; - /** - * Produces a socket/stream to be used for HTTP requests. - * - * By default, this function behaves identically to `net.createConnection()`, - * synchronously returning the created socket. The optional `callback` parameter in the - * signature is **not** used by this default implementation. - * - * However, custom agents may override this method to provide greater flexibility, - * for example, to create sockets asynchronously. When overriding `createConnection`: - * - * 1. **Synchronous socket creation**: The overriding method can return the - * socket/stream directly. - * 2. **Asynchronous socket creation**: The overriding method can accept the `callback` - * and pass the created socket/stream to it (e.g., `callback(null, newSocket)`). - * If an error occurs during socket creation, it should be passed as the first - * argument to the `callback` (e.g., `callback(err)`). - * - * The agent will call the provided `createConnection` function with `options` and - * this internal `callback`. The `callback` provided by the agent has a signature - * of `(err, stream)`. - * @since v0.11.4 - * @param options Options containing connection details. Check - * `net.createConnection` for the format of the options. For custom agents, - * this object is passed to the custom `createConnection` function. - * @param callback (Optional, primarily for custom agents) A function to be - * called by a custom `createConnection` implementation when the socket is - * created, especially for asynchronous operations. - * @returns The created socket. This is returned by the default - * implementation or by a custom synchronous `createConnection` implementation. - * If a custom `createConnection` uses the `callback` for asynchronous - * operation, this return value might not be the primary way to obtain the socket. - */ - createConnection( - options: ClientRequestArgs, - callback?: (err: Error | null, stream: stream.Duplex) => void, - ): stream.Duplex | null | undefined; - /** - * Called when `socket` is detached from a request and could be persisted by the`Agent`. Default behavior is to: - * - * ```js - * socket.setKeepAlive(true, this.keepAliveMsecs); - * socket.unref(); - * return true; - * ``` - * - * This method can be overridden by a particular `Agent` subclass. If this - * method returns a falsy value, the socket will be destroyed instead of persisting - * it for use with the next request. - * - * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`. - * @since v8.1.0 - */ - keepSocketAlive(socket: stream.Duplex): void; - /** - * Called when `socket` is attached to `request` after being persisted because of - * the keep-alive options. Default behavior is to: - * - * ```js - * socket.ref(); - * ``` - * - * This method can be overridden by a particular `Agent` subclass. - * - * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`. - * @since v8.1.0 - */ - reuseSocket(socket: stream.Duplex, request: ClientRequest): void; - /** - * Get a unique name for a set of request options, to determine whether a - * connection can be reused. For an HTTP agent, this returns`host:port:localAddress` or `host:port:localAddress:family`. For an HTTPS agent, - * the name includes the CA, cert, ciphers, and other HTTPS/TLS-specific options - * that determine socket reusability. - * @since v0.11.4 - * @param options A set of options providing information for name generation - */ - getName(options?: ClientRequestArgs): string; - } - const METHODS: string[]; - const STATUS_CODES: { - [errorCode: number]: string | undefined; - [errorCode: string]: string | undefined; - }; - /** - * Returns a new instance of {@link Server}. - * - * The `requestListener` is a function which is automatically - * added to the `'request'` event. - * - * ```js - * import http from 'node:http'; - * - * // Create a local server to receive data from - * const server = http.createServer((req, res) => { - * res.writeHead(200, { 'Content-Type': 'application/json' }); - * res.end(JSON.stringify({ - * data: 'Hello World!', - * })); - * }); - * - * server.listen(8000); - * ``` - * - * ```js - * import http from 'node:http'; - * - * // Create a local server to receive data from - * const server = http.createServer(); - * - * // Listen to the request event - * server.on('request', (request, res) => { - * res.writeHead(200, { 'Content-Type': 'application/json' }); - * res.end(JSON.stringify({ - * data: 'Hello World!', - * })); - * }); - * - * server.listen(8000); - * ``` - * @since v0.1.13 - */ - function createServer< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - >(requestListener?: RequestListener): Server; - function createServer< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - >( - options: ServerOptions, - requestListener?: RequestListener, - ): Server; - // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, - // create interface RequestOptions would make the naming more clear to developers - interface RequestOptions extends ClientRequestArgs {} - /** - * `options` in `socket.connect()` are also supported. - * - * Node.js maintains several connections per server to make HTTP requests. - * This function allows one to transparently issue requests. - * - * `url` can be a string or a `URL` object. If `url` is a - * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. - * - * If both `url` and `options` are specified, the objects are merged, with the `options` properties taking precedence. - * - * The optional `callback` parameter will be added as a one-time listener for - * the `'response'` event. - * - * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to - * upload a file with a POST request, then write to the `ClientRequest` object. - * - * ```js - * import http from 'node:http'; - * import { Buffer } from 'node:buffer'; - * - * const postData = JSON.stringify({ - * 'msg': 'Hello World!', - * }); - * - * const options = { - * hostname: 'www.google.com', - * port: 80, - * path: '/upload', - * method: 'POST', - * headers: { - * 'Content-Type': 'application/json', - * 'Content-Length': Buffer.byteLength(postData), - * }, - * }; - * - * const req = http.request(options, (res) => { - * console.log(`STATUS: ${res.statusCode}`); - * console.log(`HEADERS: ${JSON.stringify(res.headers)}`); - * res.setEncoding('utf8'); - * res.on('data', (chunk) => { - * console.log(`BODY: ${chunk}`); - * }); - * res.on('end', () => { - * console.log('No more data in response.'); - * }); - * }); - * - * req.on('error', (e) => { - * console.error(`problem with request: ${e.message}`); - * }); - * - * // Write data to request body - * req.write(postData); - * req.end(); - * ``` - * - * In the example `req.end()` was called. With `http.request()` one - * must always call `req.end()` to signify the end of the request - - * even if there is no data being written to the request body. - * - * If any error is encountered during the request (be that with DNS resolution, - * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted - * on the returned request object. As with all `'error'` events, if no listeners - * are registered the error will be thrown. - * - * There are a few special headers that should be noted. - * - * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to - * the server should be persisted until the next request. - * * Sending a 'Content-Length' header will disable the default chunked encoding. - * * Sending an 'Expect' header will immediately send the request headers. - * Usually, when sending 'Expect: 100-continue', both a timeout and a listener - * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more - * information. - * * Sending an Authorization header will override using the `auth` option - * to compute basic authentication. - * - * Example using a `URL` as `options`: - * - * ```js - * const options = new URL('http://abc:xyz@example.com'); - * - * const req = http.request(options, (res) => { - * // ... - * }); - * ``` - * - * In a successful request, the following events will be emitted in the following - * order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * (`'data'` will not be emitted at all if the response body is empty, for - * instance, in most redirects) - * * `'end'` on the `res` object - * * `'close'` - * - * In the case of a connection error, the following events will be emitted: - * - * * `'socket'` - * * `'error'` - * * `'close'` - * - * In the case of a premature connection close before the response is received, - * the following events will be emitted in the following order: - * - * * `'socket'` - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'` - * * `'close'` - * - * In the case of a premature connection close after the response is received, - * the following events will be emitted in the following order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * * (connection closed here) - * * `'aborted'` on the `res` object - * * `'close'` - * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'` - * * `'close'` on the `res` object - * - * If `req.destroy()` is called before a socket is assigned, the following - * events will be emitted in the following order: - * - * * (`req.destroy()` called here) - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called - * * `'close'` - * - * If `req.destroy()` is called before the connection succeeds, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * (`req.destroy()` called here) - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called - * * `'close'` - * - * If `req.destroy()` is called after the response is received, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * * (`req.destroy()` called here) - * * `'aborted'` on the `res` object - * * `'close'` - * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called - * * `'close'` on the `res` object - * - * If `req.abort()` is called before a socket is assigned, the following - * events will be emitted in the following order: - * - * * (`req.abort()` called here) - * * `'abort'` - * * `'close'` - * - * If `req.abort()` is called before the connection succeeds, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * (`req.abort()` called here) - * * `'abort'` - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'` - * * `'close'` - * - * If `req.abort()` is called after the response is received, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * * (`req.abort()` called here) - * * `'abort'` - * * `'aborted'` on the `res` object - * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`. - * * `'close'` - * * `'close'` on the `res` object - * - * Setting the `timeout` option or using the `setTimeout()` function will - * not abort the request or do anything besides add a `'timeout'` event. - * - * Passing an `AbortSignal` and then calling `abort()` on the corresponding `AbortController` will behave the same way as calling `.destroy()` on the - * request. Specifically, the `'error'` event will be emitted with an error with - * the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'` and the `cause`, if one was provided. - * @since v0.3.6 - */ - function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; - function request( - url: string | URL, - options: RequestOptions, - callback?: (res: IncomingMessage) => void, - ): ClientRequest; - /** - * Since most requests are GET requests without bodies, Node.js provides this - * convenience method. The only difference between this method and {@link request} is that it sets the method to GET by default and calls `req.end()` automatically. The callback must take care to - * consume the response - * data for reasons stated in {@link ClientRequest} section. - * - * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}. - * - * JSON fetching example: - * - * ```js - * http.get('http://localhost:8000/', (res) => { - * const { statusCode } = res; - * const contentType = res.headers['content-type']; - * - * let error; - * // Any 2xx status code signals a successful response but - * // here we're only checking for 200. - * if (statusCode !== 200) { - * error = new Error('Request Failed.\n' + - * `Status Code: ${statusCode}`); - * } else if (!/^application\/json/.test(contentType)) { - * error = new Error('Invalid content-type.\n' + - * `Expected application/json but received ${contentType}`); - * } - * if (error) { - * console.error(error.message); - * // Consume response data to free up memory - * res.resume(); - * return; - * } - * - * res.setEncoding('utf8'); - * let rawData = ''; - * res.on('data', (chunk) => { rawData += chunk; }); - * res.on('end', () => { - * try { - * const parsedData = JSON.parse(rawData); - * console.log(parsedData); - * } catch (e) { - * console.error(e.message); - * } - * }); - * }).on('error', (e) => { - * console.error(`Got error: ${e.message}`); - * }); - * - * // Create a local server to receive data from - * const server = http.createServer((req, res) => { - * res.writeHead(200, { 'Content-Type': 'application/json' }); - * res.end(JSON.stringify({ - * data: 'Hello World!', - * })); - * }); - * - * server.listen(8000); - * ``` - * @since v0.3.6 - * @param options Accepts the same `options` as {@link request}, with the method set to GET by default. - */ - function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; - function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; - /** - * Performs the low-level validations on the provided `name` that are done when `res.setHeader(name, value)` is called. - * - * Passing illegal value as `name` will result in a `TypeError` being thrown, - * identified by `code: 'ERR_INVALID_HTTP_TOKEN'`. - * - * It is not necessary to use this method before passing headers to an HTTP request - * or response. The HTTP module will automatically validate such headers. - * - * Example: - * - * ```js - * import { validateHeaderName } from 'node:http'; - * - * try { - * validateHeaderName(''); - * } catch (err) { - * console.error(err instanceof TypeError); // --> true - * console.error(err.code); // --> 'ERR_INVALID_HTTP_TOKEN' - * console.error(err.message); // --> 'Header name must be a valid HTTP token [""]' - * } - * ``` - * @since v14.3.0 - * @param [label='Header name'] Label for error message. - */ - function validateHeaderName(name: string): void; - /** - * Performs the low-level validations on the provided `value` that are done when `res.setHeader(name, value)` is called. - * - * Passing illegal value as `value` will result in a `TypeError` being thrown. - * - * * Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`. - * * Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`. - * - * It is not necessary to use this method before passing headers to an HTTP request - * or response. The HTTP module will automatically validate such headers. - * - * Examples: - * - * ```js - * import { validateHeaderValue } from 'node:http'; - * - * try { - * validateHeaderValue('x-my-header', undefined); - * } catch (err) { - * console.error(err instanceof TypeError); // --> true - * console.error(err.code === 'ERR_HTTP_INVALID_HEADER_VALUE'); // --> true - * console.error(err.message); // --> 'Invalid value "undefined" for header "x-my-header"' - * } - * - * try { - * validateHeaderValue('x-my-header', 'oʊmɪɡə'); - * } catch (err) { - * console.error(err instanceof TypeError); // --> true - * console.error(err.code === 'ERR_INVALID_CHAR'); // --> true - * console.error(err.message); // --> 'Invalid character in header content ["x-my-header"]' - * } - * ``` - * @since v14.3.0 - * @param name Header name - * @param value Header value - */ - function validateHeaderValue(name: string, value: string): void; - /** - * Set the maximum number of idle HTTP parsers. - * @since v18.8.0, v16.18.0 - * @param [max=1000] - */ - function setMaxIdleHTTPParsers(max: number): void; - /** - * Dynamically resets the global configurations to enable built-in proxy support for - * `fetch()` and `http.request()`/`https.request()` at runtime, as an alternative - * to using the `--use-env-proxy` flag or `NODE_USE_ENV_PROXY` environment variable. - * It can also be used to override settings configured from the environment variables. - * - * As this function resets the global configurations, any previously configured - * `http.globalAgent`, `https.globalAgent` or undici global dispatcher would be - * overridden after this function is invoked. It's recommended to invoke it before any - * requests are made and avoid invoking it in the middle of any requests. - * - * See [Built-in Proxy Support](https://nodejs.org/docs/latest-v25.x/api/http.html#built-in-proxy-support) for details on proxy URL formats and `NO_PROXY` - * syntax. - * @since v25.4.0 - * @param proxyEnv An object containing proxy configuration. This accepts the - * same options as the `proxyEnv` option accepted by {@link Agent}. **Default:** - * `process.env`. - * @returns A function that restores the original agent and dispatcher - * settings to the state before this `http.setGlobalProxyFromEnv()` is invoked. - */ - function setGlobalProxyFromEnv(proxyEnv?: ProxyEnv): () => void; - /** - * Global instance of `Agent` which is used as the default for all HTTP client - * requests. Diverges from a default `Agent` configuration by having `keepAlive` - * enabled and a `timeout` of 5 seconds. - * @since v0.5.9 - */ - let globalAgent: Agent; - /** - * Read-only property specifying the maximum allowed size of HTTP headers in bytes. - * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option. - */ - const maxHeaderSize: number; - /** - * A browser-compatible implementation of `WebSocket`. - * @since v22.5.0 - */ - const WebSocket: typeof import("undici-types").WebSocket; - /** - * @since v22.5.0 - */ - const CloseEvent: typeof import("undici-types").CloseEvent; - /** - * @since v22.5.0 - */ - const MessageEvent: typeof import("undici-types").MessageEvent; -} -declare module "http" { - export * from "node:http"; -} diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts deleted file mode 100644 index d20753d..0000000 --- a/node_modules/@types/node/http2.d.ts +++ /dev/null @@ -1,2485 +0,0 @@ -declare module "node:http2" { - import { NonSharedBuffer } from "node:buffer"; - import { InternalEventEmitter } from "node:events"; - import * as fs from "node:fs"; - import * as net from "node:net"; - import * as stream from "node:stream"; - import * as tls from "node:tls"; - import * as url from "node:url"; - import { - IncomingHttpHeaders as Http1IncomingHttpHeaders, - IncomingMessage, - OutgoingHttpHeaders, - ServerResponse, - } from "node:http"; - interface IncomingHttpStatusHeader { - ":status"?: number | undefined; - } - interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { - ":path"?: string | undefined; - ":method"?: string | undefined; - ":authority"?: string | undefined; - ":scheme"?: string | undefined; - } - // Http2Stream - interface StreamState { - localWindowSize?: number | undefined; - state?: number | undefined; - localClose?: number | undefined; - remoteClose?: number | undefined; - /** @deprecated */ - sumDependencyWeight?: number | undefined; - /** @deprecated */ - weight?: number | undefined; - } - interface ServerStreamResponseOptions { - endStream?: boolean | undefined; - waitForTrailers?: boolean | undefined; - } - interface StatOptions { - offset: number; - length: number; - } - interface ServerStreamFileResponseOptions { - statCheck?: - | ((stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void) - | undefined; - waitForTrailers?: boolean | undefined; - offset?: number | undefined; - length?: number | undefined; - } - interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { - onError?: ((err: NodeJS.ErrnoException) => void) | undefined; - } - interface Http2StreamEventMap extends stream.DuplexEventMap { - "aborted": []; - "data": [chunk: string | NonSharedBuffer]; - "frameError": [type: number, code: number, id: number]; - "ready": []; - "streamClosed": [code: number]; - "timeout": []; - "trailers": [trailers: IncomingHttpHeaders, flags: number]; - "wantTrailers": []; - } - interface Http2Stream extends stream.Duplex { - /** - * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set, - * the `'aborted'` event will have been emitted. - * @since v8.4.0 - */ - readonly aborted: boolean; - /** - * This property shows the number of characters currently buffered to be written. - * See `net.Socket.bufferSize` for details. - * @since v11.2.0, v10.16.0 - */ - readonly bufferSize: number; - /** - * Set to `true` if the `Http2Stream` instance has been closed. - * @since v9.4.0 - */ - readonly closed: boolean; - /** - * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer - * usable. - * @since v8.4.0 - */ - readonly destroyed: boolean; - /** - * Set to `true` if the `END_STREAM` flag was set in the request or response - * HEADERS frame received, indicating that no additional data should be received - * and the readable side of the `Http2Stream` will be closed. - * @since v10.11.0 - */ - readonly endAfterHeaders: boolean; - /** - * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined` if the stream identifier has not yet been assigned. - * @since v8.4.0 - */ - readonly id?: number | undefined; - /** - * Set to `true` if the `Http2Stream` instance has not yet been assigned a - * numeric stream identifier. - * @since v9.4.0 - */ - readonly pending: boolean; - /** - * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is - * destroyed after either receiving an `RST_STREAM` frame from the connected peer, - * calling `http2stream.close()`, or `http2stream.destroy()`. Will be `undefined` if the `Http2Stream` has not been closed. - * @since v8.4.0 - */ - readonly rstCode: number; - /** - * An object containing the outbound headers sent for this `Http2Stream`. - * @since v9.5.0 - */ - readonly sentHeaders: OutgoingHttpHeaders; - /** - * An array of objects containing the outbound informational (additional) headers - * sent for this `Http2Stream`. - * @since v9.5.0 - */ - readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined; - /** - * An object containing the outbound trailers sent for this `HttpStream`. - * @since v9.5.0 - */ - readonly sentTrailers?: OutgoingHttpHeaders | undefined; - /** - * A reference to the `Http2Session` instance that owns this `Http2Stream`. The - * value will be `undefined` after the `Http2Stream` instance is destroyed. - * @since v8.4.0 - */ - readonly session: Http2Session | undefined; - /** - * Provides miscellaneous information about the current state of the `Http2Stream`. - * - * A current state of this `Http2Stream`. - * @since v8.4.0 - */ - readonly state: StreamState; - /** - * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the - * connected HTTP/2 peer. - * @since v8.4.0 - * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code. - * @param callback An optional function registered to listen for the `'close'` event. - */ - close(code?: number, callback?: () => void): void; - /** - * @deprecated Priority signaling is no longer supported in Node.js. - */ - priority(options: unknown): void; - /** - * ```js - * import http2 from 'node:http2'; - * const client = http2.connect('http://example.org:8000'); - * const { NGHTTP2_CANCEL } = http2.constants; - * const req = client.request({ ':path': '/' }); - * - * // Cancel the stream if there's no activity after 5 seconds - * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL)); - * ``` - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - /** - * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method - * will cause the `Http2Stream` to be immediately closed and must only be - * called after the `'wantTrailers'` event has been emitted. When sending a - * request or sending a response, the `options.waitForTrailers` option must be set - * in order to keep the `Http2Stream` open after the final `DATA` frame so that - * trailers can be sent. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond(undefined, { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ xyz: 'abc' }); - * }); - * stream.end('Hello World'); - * }); - * ``` - * - * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header - * fields (e.g. `':method'`, `':path'`, etc). - * @since v10.0.0 - */ - sendTrailers(headers: OutgoingHttpHeaders): void; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: Http2StreamEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: Http2StreamEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: Http2StreamEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: Http2StreamEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: Http2StreamEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: Http2StreamEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: Http2StreamEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: Http2StreamEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: Http2StreamEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: Http2StreamEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: Http2StreamEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface ClientHttp2StreamEventMap extends Http2StreamEventMap { - "continue": []; - "headers": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]]; - "push": [headers: IncomingHttpHeaders, flags: number]; - "response": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]]; - } - interface ClientHttp2Stream extends Http2Stream { - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ClientHttp2StreamEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ClientHttp2StreamEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface ServerHttp2Stream extends Http2Stream { - /** - * True if headers were sent, false otherwise (read-only). - * @since v8.4.0 - */ - readonly headersSent: boolean; - /** - * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote - * client's most recent `SETTINGS` frame. Will be `true` if the remote peer - * accepts push streams, `false` otherwise. Settings are the same for every `Http2Stream` in the same `Http2Session`. - * @since v8.4.0 - */ - readonly pushAllowed: boolean; - /** - * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer. - * @since v8.4.0 - */ - additionalHeaders(headers: OutgoingHttpHeaders): void; - /** - * Initiates a push stream. The callback is invoked with the new `Http2Stream` instance created for the push stream passed as the second argument, or an `Error` passed as the first argument. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond({ ':status': 200 }); - * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => { - * if (err) throw err; - * pushStream.respond({ ':status': 200 }); - * pushStream.end('some pushed data'); - * }); - * stream.end('some data'); - * }); - * ``` - * - * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass - * a `weight` value to `http2stream.priority` with the `silent` option set to `true` to enable server-side bandwidth balancing between concurrent streams. - * - * Calling `http2stream.pushStream()` from within a pushed stream is not permitted - * and will throw an error. - * @since v8.4.0 - * @param callback Callback that is called once the push stream has been initiated. - */ - pushStream( - headers: OutgoingHttpHeaders, - callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, - ): void; - pushStream( - headers: OutgoingHttpHeaders, - options?: Pick, - callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, - ): void; - /** - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond({ ':status': 200 }); - * stream.end('some data'); - * }); - * ``` - * - * Initiates a response. When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * will be emitted immediately after queuing the last chunk of payload data to be sent. - * The `http2stream.sendTrailers()` method can then be used to send trailing header fields to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code must call either `http2stream.sendTrailers()` or `http2stream.close()` to close the `Http2Stream`. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond({ ':status': 200 }, { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ ABC: 'some value to send' }); - * }); - * stream.end('some data'); - * }); - * ``` - * @since v8.4.0 - */ - respond(headers?: OutgoingHttpHeaders | readonly string[], options?: ServerStreamResponseOptions): void; - /** - * Initiates a response whose data is read from the given file descriptor. No - * validation is performed on the given file descriptor. If an error occurs while - * attempting to read data using the file descriptor, the `Http2Stream` will be - * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. - * - * When used, the `Http2Stream` object's `Duplex` interface will be closed - * automatically. - * - * ```js - * import http2 from 'node:http2'; - * import fs from 'node:fs'; - * - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * const fd = fs.openSync('/some/file', 'r'); - * - * const stat = fs.fstatSync(fd); - * const headers = { - * 'content-length': stat.size, - * 'last-modified': stat.mtime.toUTCString(), - * 'content-type': 'text/plain; charset=utf-8', - * }; - * stream.respondWithFD(fd, headers); - * stream.on('close', () => fs.closeSync(fd)); - * }); - * ``` - * - * The optional `options.statCheck` function may be specified to give user code - * an opportunity to set additional content headers based on the `fs.Stat` details - * of the given fd. If the `statCheck` function is provided, the `http2stream.respondWithFD()` method will - * perform an `fs.fstat()` call to collect details on the provided file descriptor. - * - * The `offset` and `length` options may be used to limit the response to a - * specific range subset. This can be used, for instance, to support HTTP Range - * requests. - * - * The file descriptor or `FileHandle` is not closed when the stream is closed, - * so it will need to be closed manually once it is no longer needed. - * Using the same file descriptor concurrently for multiple streams - * is not supported and may result in data loss. Re-using a file descriptor - * after a stream has finished is supported. - * - * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * will be emitted immediately after queuing the last chunk of payload data to be - * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing - * header fields to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code _must_ call either `http2stream.sendTrailers()` - * or `http2stream.close()` to close the `Http2Stream`. - * - * ```js - * import http2 from 'node:http2'; - * import fs from 'node:fs'; - * - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * const fd = fs.openSync('/some/file', 'r'); - * - * const stat = fs.fstatSync(fd); - * const headers = { - * 'content-length': stat.size, - * 'last-modified': stat.mtime.toUTCString(), - * 'content-type': 'text/plain; charset=utf-8', - * }; - * stream.respondWithFD(fd, headers, { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ ABC: 'some value to send' }); - * }); - * - * stream.on('close', () => fs.closeSync(fd)); - * }); - * ``` - * @since v8.4.0 - * @param fd A readable file descriptor. - */ - respondWithFD( - fd: number | fs.promises.FileHandle, - headers?: OutgoingHttpHeaders, - options?: ServerStreamFileResponseOptions, - ): void; - /** - * Sends a regular file as the response. The `path` must specify a regular file - * or an `'error'` event will be emitted on the `Http2Stream` object. - * - * When used, the `Http2Stream` object's `Duplex` interface will be closed - * automatically. - * - * The optional `options.statCheck` function may be specified to give user code - * an opportunity to set additional content headers based on the `fs.Stat` details - * of the given file: - * - * If an error occurs while attempting to read the file data, the `Http2Stream` will be closed using an - * `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. - * If the `onError` callback is defined, then it will be called. Otherwise, the stream will be destroyed. - * - * Example using a file path: - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * function statCheck(stat, headers) { - * headers['last-modified'] = stat.mtime.toUTCString(); - * } - * - * function onError(err) { - * // stream.respond() can throw if the stream has been destroyed by - * // the other side. - * try { - * if (err.code === 'ENOENT') { - * stream.respond({ ':status': 404 }); - * } else { - * stream.respond({ ':status': 500 }); - * } - * } catch (err) { - * // Perform actual error handling. - * console.error(err); - * } - * stream.end(); - * } - * - * stream.respondWithFile('/some/file', - * { 'content-type': 'text/plain; charset=utf-8' }, - * { statCheck, onError }); - * }); - * ``` - * - * The `options.statCheck` function may also be used to cancel the send operation - * by returning `false`. For instance, a conditional request may check the stat - * results to determine if the file has been modified to return an appropriate `304` response: - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * function statCheck(stat, headers) { - * // Check the stat here... - * stream.respond({ ':status': 304 }); - * return false; // Cancel the send operation - * } - * stream.respondWithFile('/some/file', - * { 'content-type': 'text/plain; charset=utf-8' }, - * { statCheck }); - * }); - * ``` - * - * The `content-length` header field will be automatically set. - * - * The `offset` and `length` options may be used to limit the response to a - * specific range subset. This can be used, for instance, to support HTTP Range - * requests. - * - * The `options.onError` function may also be used to handle all the errors - * that could happen before the delivery of the file is initiated. The - * default behavior is to destroy the stream. - * - * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * will be emitted immediately after queuing the last chunk of payload data to be - * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing - * header fields to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respondWithFile('/some/file', - * { 'content-type': 'text/plain; charset=utf-8' }, - * { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ ABC: 'some value to send' }); - * }); - * }); - * ``` - * @since v8.4.0 - */ - respondWithFile( - path: string, - headers?: OutgoingHttpHeaders, - options?: ServerStreamFileResponseOptionsWithError, - ): void; - } - // Http2Session - interface Settings { - headerTableSize?: number | undefined; - enablePush?: boolean | undefined; - initialWindowSize?: number | undefined; - maxFrameSize?: number | undefined; - maxConcurrentStreams?: number | undefined; - maxHeaderListSize?: number | undefined; - enableConnectProtocol?: boolean | undefined; - } - interface ClientSessionRequestOptions { - endStream?: boolean | undefined; - exclusive?: boolean | undefined; - parent?: number | undefined; - waitForTrailers?: boolean | undefined; - signal?: AbortSignal | undefined; - } - interface SessionState { - effectiveLocalWindowSize?: number | undefined; - effectiveRecvDataLength?: number | undefined; - nextStreamID?: number | undefined; - localWindowSize?: number | undefined; - lastProcStreamID?: number | undefined; - remoteWindowSize?: number | undefined; - outboundQueueSize?: number | undefined; - deflateDynamicTableSize?: number | undefined; - inflateDynamicTableSize?: number | undefined; - } - interface Http2SessionEventMap { - "close": []; - "connect": [session: Http2Session, socket: net.Socket | tls.TLSSocket]; - "error": [err: Error]; - "frameError": [type: number, code: number, id: number]; - "goaway": [errorCode: number, lastStreamID: number, opaqueData?: NonSharedBuffer]; - "localSettings": [settings: Settings]; - "ping": [payload: Buffer]; - "remoteSettings": [settings: Settings]; - "stream": [ - stream: Http2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - rawHeaders: string[], - ]; - "timeout": []; - } - interface Http2Session extends InternalEventEmitter { - /** - * Value will be `undefined` if the `Http2Session` is not yet connected to a - * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or - * will return the value of the connected `TLSSocket`'s own `alpnProtocol` property. - * @since v9.4.0 - */ - readonly alpnProtocol?: string | undefined; - /** - * Will be `true` if this `Http2Session` instance has been closed, otherwise `false`. - * @since v9.4.0 - */ - readonly closed: boolean; - /** - * Will be `true` if this `Http2Session` instance is still connecting, will be set - * to `false` before emitting `connect` event and/or calling the `http2.connect` callback. - * @since v10.0.0 - */ - readonly connecting: boolean; - /** - * Will be `true` if this `Http2Session` instance has been destroyed and must no - * longer be used, otherwise `false`. - * @since v8.4.0 - */ - readonly destroyed: boolean; - /** - * Value is `undefined` if the `Http2Session` session socket has not yet been - * connected, `true` if the `Http2Session` is connected with a `TLSSocket`, - * and `false` if the `Http2Session` is connected to any other kind of socket - * or stream. - * @since v9.4.0 - */ - readonly encrypted?: boolean | undefined; - /** - * A prototype-less object describing the current local settings of this `Http2Session`. - * The local settings are local to _this_`Http2Session` instance. - * @since v8.4.0 - */ - readonly localSettings: Settings; - /** - * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property - * will return an `Array` of origins for which the `Http2Session` may be - * considered authoritative. - * - * The `originSet` property is only available when using a secure TLS connection. - * @since v9.4.0 - */ - readonly originSet?: string[] | undefined; - /** - * Indicates whether the `Http2Session` is currently waiting for acknowledgment of - * a sent `SETTINGS` frame. Will be `true` after calling the `http2session.settings()` method. - * Will be `false` once all sent `SETTINGS` frames have been acknowledged. - * @since v8.4.0 - */ - readonly pendingSettingsAck: boolean; - /** - * A prototype-less object describing the current remote settings of this`Http2Session`. - * The remote settings are set by the _connected_ HTTP/2 peer. - * @since v8.4.0 - */ - readonly remoteSettings: Settings; - /** - * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but - * limits available methods to ones safe to use with HTTP/2. - * - * `destroy`, `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw - * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information. - * - * `setTimeout` method will be called on this `Http2Session`. - * - * All other interactions will be routed directly to the socket. - * @since v8.4.0 - */ - readonly socket: net.Socket | tls.TLSSocket; - /** - * Provides miscellaneous information about the current state of the`Http2Session`. - * - * An object describing the current status of this `Http2Session`. - * @since v8.4.0 - */ - readonly state: SessionState; - /** - * The `http2session.type` will be equal to `http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a - * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a - * client. - * @since v8.4.0 - */ - readonly type: number; - /** - * Gracefully closes the `Http2Session`, allowing any existing streams to - * complete on their own and preventing new `Http2Stream` instances from being - * created. Once closed, `http2session.destroy()`_might_ be called if there - * are no open `Http2Stream` instances. - * - * If specified, the `callback` function is registered as a handler for the`'close'` event. - * @since v9.4.0 - */ - close(callback?: () => void): void; - /** - * Immediately terminates the `Http2Session` and the associated `net.Socket` or `tls.TLSSocket`. - * - * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error` is not undefined, an `'error'` event will be emitted immediately before the `'close'` event. - * - * If there are any remaining open `Http2Streams` associated with the `Http2Session`, those will also be destroyed. - * @since v8.4.0 - * @param error An `Error` object if the `Http2Session` is being destroyed due to an error. - * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`. - */ - destroy(error?: Error, code?: number): void; - /** - * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`. - * @since v9.4.0 - * @param code An HTTP/2 error code - * @param lastStreamID The numeric ID of the last processed `Http2Stream` - * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame. - */ - goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void; - /** - * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must - * be provided. The method will return `true` if the `PING` was sent, `false` otherwise. - * - * The maximum number of outstanding (unacknowledged) pings is determined by the `maxOutstandingPings` configuration option. The default maximum is 10. - * - * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView` containing 8 bytes of data that will be transmitted with the `PING` and - * returned with the ping acknowledgment. - * - * The callback will be invoked with three arguments: an error argument that will - * be `null` if the `PING` was successfully acknowledged, a `duration` argument - * that reports the number of milliseconds elapsed since the ping was sent and the - * acknowledgment was received, and a `Buffer` containing the 8-byte `PING` payload. - * - * ```js - * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => { - * if (!err) { - * console.log(`Ping acknowledged in ${duration} milliseconds`); - * console.log(`With payload '${payload.toString()}'`); - * } - * }); - * ``` - * - * If the `payload` argument is not specified, the default payload will be the - * 64-bit timestamp (little endian) marking the start of the `PING` duration. - * @since v8.9.3 - * @param payload Optional ping payload. - */ - ping(callback: (err: Error | null, duration: number, payload: NonSharedBuffer) => void): boolean; - ping( - payload: NodeJS.ArrayBufferView, - callback: (err: Error | null, duration: number, payload: NonSharedBuffer) => void, - ): boolean; - /** - * Calls `ref()` on this `Http2Session` instance's underlying `net.Socket`. - * @since v9.4.0 - */ - ref(): void; - /** - * Sets the local endpoint's window size. - * The `windowSize` is the total window size to set, not - * the delta. - * - * ```js - * import http2 from 'node:http2'; - * - * const server = http2.createServer(); - * const expectedWindowSize = 2 ** 20; - * server.on('connect', (session) => { - * - * // Set local window size to be 2 ** 20 - * session.setLocalWindowSize(expectedWindowSize); - * }); - * ``` - * @since v15.3.0, v14.18.0 - */ - setLocalWindowSize(windowSize: number): void; - /** - * Used to set a callback function that is called when there is no activity on - * the `Http2Session` after `msecs` milliseconds. The given `callback` is - * registered as a listener on the `'timeout'` event. - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - /** - * Updates the current local settings for this `Http2Session` and sends a new `SETTINGS` frame to the connected HTTP/2 peer. - * - * Once called, the `http2session.pendingSettingsAck` property will be `true` while the session is waiting for the remote peer to acknowledge the new - * settings. - * - * The new settings will not become effective until the `SETTINGS` acknowledgment - * is received and the `'localSettings'` event is emitted. It is possible to send - * multiple `SETTINGS` frames while acknowledgment is still pending. - * @since v8.4.0 - * @param callback Callback that is called once the session is connected or right away if the session is already connected. - */ - settings( - settings: Settings, - callback?: (err: Error | null, settings: Settings, duration: number) => void, - ): void; - /** - * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`. - * @since v9.4.0 - */ - unref(): void; - } - interface ClientHttp2SessionEventMap extends Http2SessionEventMap { - "altsvc": [alt: string, origin: string, streamId: number]; - "connect": [session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket]; - "origin": [origins: string[]]; - "stream": [ - stream: ClientHttp2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - rawHeaders: string[], - ]; - } - interface ClientHttp2Session extends Http2Session { - /** - * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()` creates and returns an `Http2Stream` instance that can be used to send an - * HTTP/2 request to the connected server. - * - * When a `ClientHttp2Session` is first created, the socket may not yet be - * connected. if `clienthttp2session.request()` is called during this time, the - * actual request will be deferred until the socket is ready to go. - * If the `session` is closed before the actual request be executed, an `ERR_HTTP2_GOAWAY_SESSION` is thrown. - * - * This method is only available if `http2session.type` is equal to `http2.constants.NGHTTP2_SESSION_CLIENT`. - * - * ```js - * import http2 from 'node:http2'; - * const clientSession = http2.connect('https://localhost:1234'); - * const { - * HTTP2_HEADER_PATH, - * HTTP2_HEADER_STATUS, - * } = http2.constants; - * - * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' }); - * req.on('response', (headers) => { - * console.log(headers[HTTP2_HEADER_STATUS]); - * req.on('data', (chunk) => { // .. }); - * req.on('end', () => { // .. }); - * }); - * ``` - * - * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * is emitted immediately after queuing the last chunk of payload data to be sent. - * The `http2stream.sendTrailers()` method can then be called to send trailing - * headers to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. - * - * When `options.signal` is set with an `AbortSignal` and then `abort` on the - * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error. - * - * The `:method` and `:path` pseudo-headers are not specified within `headers`, - * they respectively default to: - * - * * `:method` \= `'GET'` - * * `:path` \= `/` - * @since v8.4.0 - */ - request( - headers?: OutgoingHttpHeaders | readonly string[], - options?: ClientSessionRequestOptions, - ): ClientHttp2Stream; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ClientHttp2StreamEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ClientHttp2StreamEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface AlternativeServiceOptions { - origin: number | string | url.URL; - } - interface ServerHttp2SessionEventMap< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends Http2SessionEventMap { - "connect": [ - session: ServerHttp2Session, - socket: net.Socket | tls.TLSSocket, - ]; - "stream": [stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]]; - } - interface ServerHttp2Session< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends Http2Session { - readonly server: - | Http2Server - | Http2SecureServer; - /** - * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client. - * - * ```js - * import http2 from 'node:http2'; - * - * const server = http2.createServer(); - * server.on('session', (session) => { - * // Set altsvc for origin https://example.org:80 - * session.altsvc('h2=":8000"', 'https://example.org:80'); - * }); - * - * server.on('stream', (stream) => { - * // Set altsvc for a specific stream - * stream.session.altsvc('h2=":8000"', stream.id); - * }); - * ``` - * - * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate - * service is associated with the origin of the given `Http2Stream`. - * - * The `alt` and origin string _must_ contain only ASCII bytes and are - * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given - * domain. - * - * When a string is passed for the `originOrStream` argument, it will be parsed as - * a URL and the origin will be derived. For instance, the origin for the - * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string - * cannot be parsed as a URL or if a valid origin cannot be derived. - * - * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be - * used. The value of the `origin` property _must_ be a properly serialized - * ASCII origin. - * @since v9.4.0 - * @param alt A description of the alternative service configuration as defined by `RFC 7838`. - * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the - * `http2stream.id` property. - */ - altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; - /** - * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client - * to advertise the set of origins for which the server is capable of providing - * authoritative responses. - * - * ```js - * import http2 from 'node:http2'; - * const options = getSecureOptionsSomehow(); - * const server = http2.createSecureServer(options); - * server.on('stream', (stream) => { - * stream.respond(); - * stream.end('ok'); - * }); - * server.on('session', (session) => { - * session.origin('https://example.com', 'https://example.org'); - * }); - * ``` - * - * When a string is passed as an `origin`, it will be parsed as a URL and the - * origin will be derived. For instance, the origin for the HTTP URL `'https://example.org/foo/bar'` is the ASCII string` 'https://example.org'`. An error will be thrown if either the given - * string - * cannot be parsed as a URL or if a valid origin cannot be derived. - * - * A `URL` object, or any object with an `origin` property, may be passed as - * an `origin`, in which case the value of the `origin` property will be - * used. The value of the `origin` property _must_ be a properly serialized - * ASCII origin. - * - * Alternatively, the `origins` option may be used when creating a new HTTP/2 - * server using the `http2.createSecureServer()` method: - * - * ```js - * import http2 from 'node:http2'; - * const options = getSecureOptionsSomehow(); - * options.origins = ['https://example.com', 'https://example.org']; - * const server = http2.createSecureServer(options); - * server.on('stream', (stream) => { - * stream.respond(); - * stream.end('ok'); - * }); - * ``` - * @since v10.12.0 - * @param origins One or more URL Strings passed as separate arguments. - */ - origin( - ...origins: Array< - | string - | url.URL - | { - origin: string; - } - > - ): void; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit( - eventName: E, - ...args: ServerHttp2SessionEventMap[E] - ): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): (( - ...args: ServerHttp2SessionEventMap[E] - ) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): (( - ...args: ServerHttp2SessionEventMap[E] - ) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - // Http2Server - interface SessionOptions { - /** - * Sets the maximum dynamic table size for deflating header fields. - * @default 4Kib - */ - maxDeflateDynamicTableSize?: number | undefined; - /** - * Sets the maximum number of settings entries per `SETTINGS` frame. - * The minimum value allowed is `1`. - * @default 32 - */ - maxSettings?: number | undefined; - /** - * Sets the maximum memory that the `Http2Session` is permitted to use. - * The value is expressed in terms of number of megabytes, e.g. `1` equal 1 megabyte. - * The minimum value allowed is `1`. - * This is a credit based limit, existing `Http2Stream`s may cause this limit to be exceeded, - * but new `Http2Stream` instances will be rejected while this limit is exceeded. - * The current number of `Http2Stream` sessions, the current memory use of the header compression tables, - * current data queued to be sent, and unacknowledged `PING` and `SETTINGS` frames are all counted towards the current limit. - * @default 10 - */ - maxSessionMemory?: number | undefined; - /** - * Sets the maximum number of header entries. - * This is similar to `server.maxHeadersCount` or `request.maxHeadersCount` in the `node:http` module. - * The minimum value is `1`. - * @default 128 - */ - maxHeaderListPairs?: number | undefined; - /** - * Sets the maximum number of outstanding, unacknowledged pings. - * @default 10 - */ - maxOutstandingPings?: number | undefined; - /** - * Sets the maximum allowed size for a serialized, compressed block of headers. - * Attempts to send headers that exceed this limit will result in - * a `'frameError'` event being emitted and the stream being closed and destroyed. - */ - maxSendHeaderBlockLength?: number | undefined; - /** - * Strategy used for determining the amount of padding to use for `HEADERS` and `DATA` frames. - * @default http2.constants.PADDING_STRATEGY_NONE - */ - paddingStrategy?: number | undefined; - /** - * Sets the maximum number of concurrent streams for the remote peer as if a `SETTINGS` frame had been received. - * Will be overridden if the remote peer sets its own value for `maxConcurrentStreams`. - * @default 100 - */ - peerMaxConcurrentStreams?: number | undefined; - /** - * The initial settings to send to the remote peer upon connection. - */ - settings?: Settings | undefined; - /** - * The array of integer values determines the settings types, - * which are included in the `CustomSettings`-property of the received remoteSettings. - * Please see the `CustomSettings`-property of the `Http2Settings` object for more information, on the allowed setting types. - */ - remoteCustomSettings?: number[] | undefined; - /** - * Specifies a timeout in milliseconds that - * a server should wait when an [`'unknownProtocol'`][] is emitted. If the - * socket has not been destroyed by that time the server will destroy it. - * @default 100000 - */ - unknownProtocolTimeout?: number | undefined; - /** - * If `true`, it turns on strict leading - * and trailing whitespace validation for HTTP/2 header field names and values - * as per [RFC-9113](https://www.rfc-editor.org/rfc/rfc9113.html#section-8.2.1). - * @since v24.2.0 - * @default true - */ - strictFieldWhitespaceValidation?: boolean | undefined; - } - interface ClientSessionOptions extends SessionOptions { - /** - * Sets the maximum number of reserved push streams the client will accept at any given time. - * Once the current number of currently reserved push streams exceeds reaches this limit, - * new push streams sent by the server will be automatically rejected. - * The minimum allowed value is 0. The maximum allowed value is 232-1. - * A negative value sets this option to the maximum allowed value. - * @default 200 - */ - maxReservedRemoteStreams?: number | undefined; - /** - * An optional callback that receives the `URL` instance passed to `connect` and the `options` object, - * and returns any `Duplex` stream that is to be used as the connection for this session. - */ - createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined; - /** - * The protocol to connect with, if not set in the `authority`. - * Value may be either `'http:'` or `'https:'`. - * @default 'https:' - */ - protocol?: "http:" | "https:" | undefined; - } - interface ServerSessionOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends SessionOptions { - streamResetBurst?: number | undefined; - streamResetRate?: number | undefined; - /** @deprecated Use `http1Options.IncomingMessage` instead. */ - Http1IncomingMessage?: Http1Request | undefined; - /** @deprecated Use `http1Options.ServerResponse` instead. */ - Http1ServerResponse?: Http1Response | undefined; - http1Options?: Http1Options | undefined; - Http2ServerRequest?: Http2Request | undefined; - Http2ServerResponse?: Http2Response | undefined; - strictSingleValueFields?: boolean | undefined; - } - interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {} - interface SecureServerSessionOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends ServerSessionOptions, tls.TlsOptions {} - interface ServerOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends ServerSessionOptions {} - interface SecureServerOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends SecureServerSessionOptions { - allowHTTP1?: boolean | undefined; - origins?: string[] | undefined; - } - interface Http1Options< - Request extends typeof IncomingMessage, - Response extends typeof ServerResponse>, - > { - IncomingMessage?: Request | undefined; - ServerResponse?: Response | undefined; - keepAliveTimeout?: number | undefined; - } - interface Http2ServerCommon { - setTimeout(msec?: number, callback?: () => void): this; - /** - * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values. - * Throws ERR_INVALID_ARG_TYPE for invalid settings argument. - */ - updateSettings(settings: Settings): void; - } - interface Http2ServerEventMap< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends net.ServerEventMap, Pick { - "checkContinue": [request: InstanceType, response: InstanceType]; - "request": [request: InstanceType, response: InstanceType]; - "session": [session: ServerHttp2Session]; - "sessionError": [ - err: Error, - session: ServerHttp2Session, - ]; - } - interface Http2Server< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends net.Server, Http2ServerCommon { - // #region InternalEventEmitter - addListener( - eventName: E, - listener: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit( - eventName: E, - ...args: Http2ServerEventMap[E] - ): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: Http2ServerEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: Http2ServerEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface Http2SecureServerEventMap< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends tls.ServerEventMap, Http2ServerEventMap { - "unknownProtocol": [socket: tls.TLSSocket]; - } - interface Http2SecureServer< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends tls.Server, Http2ServerCommon { - // #region InternalEventEmitter - addListener( - eventName: E, - listener: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit( - eventName: E, - ...args: Http2SecureServerEventMap[E] - ): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): (( - ...args: Http2SecureServerEventMap[E] - ) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): (( - ...args: Http2SecureServerEventMap[E] - ) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface Http2ServerRequestEventMap extends stream.ReadableEventMap { - "aborted": [hadError: boolean, code: number]; - "data": [chunk: string | NonSharedBuffer]; - } - /** - * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status, - * headers, and - * data. - * @since v8.4.0 - */ - class Http2ServerRequest extends stream.Readable { - constructor( - stream: ServerHttp2Stream, - headers: IncomingHttpHeaders, - options: stream.ReadableOptions, - rawHeaders: readonly string[], - ); - /** - * The `request.aborted` property will be `true` if the request has - * been aborted. - * @since v10.1.0 - */ - readonly aborted: boolean; - /** - * The request authority pseudo header field. Because HTTP/2 allows requests - * to set either `:authority` or `host`, this value is derived from `req.headers[':authority']` if present. Otherwise, it is derived from `req.headers['host']`. - * @since v8.4.0 - */ - readonly authority: string; - /** - * See `request.socket`. - * @since v8.4.0 - * @deprecated Since v13.0.0 - Use `socket`. - */ - readonly connection: net.Socket | tls.TLSSocket; - /** - * The `request.complete` property will be `true` if the request has - * been completed, aborted, or destroyed. - * @since v12.10.0 - */ - readonly complete: boolean; - /** - * The request/response headers object. - * - * Key-value pairs of header names and values. Header names are lower-cased. - * - * ```js - * // Prints something like: - * // - * // { 'user-agent': 'curl/7.22.0', - * // host: '127.0.0.1:8000', - * // accept: '*' } - * console.log(request.headers); - * ``` - * - * See `HTTP/2 Headers Object`. - * - * In HTTP/2, the request path, host name, protocol, and method are represented as - * special headers prefixed with the `:` character (e.g. `':path'`). These special - * headers will be included in the `request.headers` object. Care must be taken not - * to inadvertently modify these special headers or errors may occur. For instance, - * removing all headers from the request will cause errors to occur: - * - * ```js - * removeAllHeaders(request.headers); - * assert(request.url); // Fails because the :path header has been removed - * ``` - * @since v8.4.0 - */ - readonly headers: IncomingHttpHeaders; - /** - * In case of server request, the HTTP version sent by the client. In the case of - * client response, the HTTP version of the connected-to server. Returns `'2.0'`. - * - * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. - * @since v8.4.0 - */ - readonly httpVersion: string; - readonly httpVersionMinor: number; - readonly httpVersionMajor: number; - /** - * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`. - * @since v8.4.0 - */ - readonly method: string; - /** - * The raw request/response headers list exactly as they were received. - * - * The keys and values are in the same list. It is _not_ a - * list of tuples. So, the even-numbered offsets are key values, and the - * odd-numbered offsets are the associated values. - * - * Header names are not lowercased, and duplicates are not merged. - * - * ```js - * // Prints something like: - * // - * // [ 'user-agent', - * // 'this is invalid because there can be only one', - * // 'User-Agent', - * // 'curl/7.22.0', - * // 'Host', - * // '127.0.0.1:8000', - * // 'ACCEPT', - * // '*' ] - * console.log(request.rawHeaders); - * ``` - * @since v8.4.0 - */ - readonly rawHeaders: string[]; - /** - * The raw request/response trailer keys and values exactly as they were - * received. Only populated at the `'end'` event. - * @since v8.4.0 - */ - readonly rawTrailers: string[]; - /** - * The request scheme pseudo header field indicating the scheme - * portion of the target URL. - * @since v8.4.0 - */ - readonly scheme: string; - /** - * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but - * applies getters, setters, and methods based on HTTP/2 logic. - * - * `destroyed`, `readable`, and `writable` properties will be retrieved from and - * set on `request.stream`. - * - * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `request.stream`. - * - * `setTimeout` method will be called on `request.stream.session`. - * - * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for - * more information. - * - * All other interactions will be routed directly to the socket. With TLS support, - * use `request.socket.getPeerCertificate()` to obtain the client's - * authentication details. - * @since v8.4.0 - */ - readonly socket: net.Socket | tls.TLSSocket; - /** - * The `Http2Stream` object backing the request. - * @since v8.4.0 - */ - readonly stream: ServerHttp2Stream; - /** - * The request/response trailers object. Only populated at the `'end'` event. - * @since v8.4.0 - */ - readonly trailers: IncomingHttpHeaders; - /** - * Request URL string. This contains only the URL that is present in the actual - * HTTP request. If the request is: - * - * ```http - * GET /status?name=ryan HTTP/1.1 - * Accept: text/plain - * ``` - * - * Then `request.url` will be: - * - * ```js - * '/status?name=ryan' - * ``` - * - * To parse the url into its parts, `new URL()` can be used: - * - * ```console - * $ node - * > new URL('/status?name=ryan', 'http://example.com') - * URL { - * href: 'http://example.com/status?name=ryan', - * origin: 'http://example.com', - * protocol: 'http:', - * username: '', - * password: '', - * host: 'example.com', - * hostname: 'example.com', - * port: '', - * pathname: '/status', - * search: '?name=ryan', - * searchParams: URLSearchParams { 'name' => 'ryan' }, - * hash: '' - * } - * ``` - * @since v8.4.0 - */ - url: string; - /** - * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is - * provided, then it is added as a listener on the `'timeout'` event on - * the response object. - * - * If no `'timeout'` listener is added to the request, the response, or - * the server, then `Http2Stream`s are destroyed when they time out. If a - * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly. - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - read(size?: number): Buffer | string | null; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: Http2ServerRequestEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: Http2ServerRequestEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: Http2ServerRequestEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: Http2ServerRequestEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: Http2ServerRequestEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: Http2ServerRequestEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: Http2ServerRequestEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: Http2ServerRequestEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: Http2ServerRequestEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: Http2ServerRequestEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: Http2ServerRequestEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - /** - * This object is created internally by an HTTP server, not by the user. It is - * passed as the second parameter to the `'request'` event. - * @since v8.4.0 - */ - class Http2ServerResponse extends stream.Writable { - constructor(stream: ServerHttp2Stream); - /** - * See `response.socket`. - * @since v8.4.0 - * @deprecated Since v13.0.0 - Use `socket`. - */ - readonly connection: net.Socket | tls.TLSSocket; - /** - * Append a single header value to the header object. - * - * If the value is an array, this is equivalent to calling this method multiple times. - * - * If there were no previous values for the header, this is equivalent to calling {@link setHeader}. - * - * Attempting to set a header field name or value that contains invalid characters will result in a - * [TypeError](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-typeerror) being thrown. - * - * ```js - * // Returns headers including "set-cookie: a" and "set-cookie: b" - * const server = http2.createServer((req, res) => { - * res.setHeader('set-cookie', 'a'); - * res.appendHeader('set-cookie', 'b'); - * res.writeHead(200); - * res.end('ok'); - * }); - * ``` - * @since v20.12.0 - */ - appendHeader(name: string, value: string | string[]): void; - /** - * Boolean value that indicates whether the response has completed. Starts - * as `false`. After `response.end()` executes, the value will be `true`. - * @since v8.4.0 - * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`. - */ - readonly finished: boolean; - /** - * True if headers were sent, false otherwise (read-only). - * @since v8.4.0 - */ - readonly headersSent: boolean; - /** - * A reference to the original HTTP2 `request` object. - * @since v15.7.0 - */ - readonly req: Request; - /** - * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but - * applies getters, setters, and methods based on HTTP/2 logic. - * - * `destroyed`, `readable`, and `writable` properties will be retrieved from and - * set on `response.stream`. - * - * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `response.stream`. - * - * `setTimeout` method will be called on `response.stream.session`. - * - * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for - * more information. - * - * All other interactions will be routed directly to the socket. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer((req, res) => { - * const ip = req.socket.remoteAddress; - * const port = req.socket.remotePort; - * res.end(`Your IP address is ${ip} and your source port is ${port}.`); - * }).listen(3000); - * ``` - * @since v8.4.0 - */ - readonly socket: net.Socket | tls.TLSSocket; - /** - * The `Http2Stream` object backing the response. - * @since v8.4.0 - */ - readonly stream: ServerHttp2Stream; - /** - * When true, the Date header will be automatically generated and sent in - * the response if it is not already present in the headers. Defaults to true. - * - * This should only be disabled for testing; HTTP requires the Date header - * in responses. - * @since v8.4.0 - */ - sendDate: boolean; - /** - * When using implicit headers (not calling `response.writeHead()` explicitly), - * this property controls the status code that will be sent to the client when - * the headers get flushed. - * - * ```js - * response.statusCode = 404; - * ``` - * - * After response header was sent to the client, this property indicates the - * status code which was sent out. - * @since v8.4.0 - */ - statusCode: number; - /** - * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns - * an empty string. - * @since v8.4.0 - */ - statusMessage: ""; - /** - * This method adds HTTP trailing headers (a header but at the end of the - * message) to the response. - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * @since v8.4.0 - */ - addTrailers(trailers: OutgoingHttpHeaders): void; - /** - * This method signals to the server that all of the response headers and body - * have been sent; that server should consider this message complete. - * The method, `response.end()`, MUST be called on each response. - * - * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`. - * - * If `callback` is specified, it will be called when the response stream - * is finished. - * @since v8.4.0 - */ - end(callback?: () => void): this; - end(data: string | Uint8Array, callback?: () => void): this; - end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this; - /** - * Reads out a header that has already been queued but not sent to the client. - * The name is case-insensitive. - * - * ```js - * const contentType = response.getHeader('content-type'); - * ``` - * @since v8.4.0 - */ - getHeader(name: string): string; - /** - * Returns an array containing the unique names of the current outgoing headers. - * All header names are lowercase. - * - * ```js - * response.setHeader('Foo', 'bar'); - * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headerNames = response.getHeaderNames(); - * // headerNames === ['foo', 'set-cookie'] - * ``` - * @since v8.4.0 - */ - getHeaderNames(): string[]; - /** - * Returns a shallow copy of the current outgoing headers. Since a shallow copy - * is used, array values may be mutated without additional calls to various - * header-related http module methods. The keys of the returned object are the - * header names and the values are the respective header values. All header names - * are lowercase. - * - * The object returned by the `response.getHeaders()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, - * `obj.hasOwnProperty()`, and others - * are not defined and _will not work_. - * - * ```js - * response.setHeader('Foo', 'bar'); - * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headers = response.getHeaders(); - * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } - * ``` - * @since v8.4.0 - */ - getHeaders(): OutgoingHttpHeaders; - /** - * Returns `true` if the header identified by `name` is currently set in the - * outgoing headers. The header name matching is case-insensitive. - * - * ```js - * const hasContentType = response.hasHeader('content-type'); - * ``` - * @since v8.4.0 - */ - hasHeader(name: string): boolean; - /** - * Removes a header that has been queued for implicit sending. - * - * ```js - * response.removeHeader('Content-Encoding'); - * ``` - * @since v8.4.0 - */ - removeHeader(name: string): void; - /** - * Sets a single header value for implicit headers. If this header already exists - * in the to-be-sent headers, its value will be replaced. Use an array of strings - * here to send multiple headers with the same name. - * - * ```js - * response.setHeader('Content-Type', 'text/html; charset=utf-8'); - * ``` - * - * or - * - * ```js - * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); - * ``` - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * - * When headers have been set with `response.setHeader()`, they will be merged - * with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * ```js - * // Returns content-type = text/plain - * const server = http2.createServer((req, res) => { - * res.setHeader('Content-Type', 'text/html; charset=utf-8'); - * res.setHeader('X-Foo', 'bar'); - * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); - * res.end('ok'); - * }); - * ``` - * @since v8.4.0 - */ - setHeader(name: string, value: number | string | readonly string[]): void; - /** - * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is - * provided, then it is added as a listener on the `'timeout'` event on - * the response object. - * - * If no `'timeout'` listener is added to the request, the response, or - * the server, then `Http2Stream` s are destroyed when they time out. If a - * handler is assigned to the request, the response, or the server's `'timeout'` events, timed out sockets must be handled explicitly. - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - /** - * If this method is called and `response.writeHead()` has not been called, - * it will switch to implicit header mode and flush the implicit headers. - * - * This sends a chunk of the response body. This method may - * be called multiple times to provide successive parts of the body. - * - * In the `node:http` module, the response body is omitted when the - * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body. - * - * `chunk` can be a string or a buffer. If `chunk` is a string, - * the second parameter specifies how to encode it into a byte stream. - * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk - * of data is flushed. - * - * This is the raw HTTP body and has nothing to do with higher-level multi-part - * body encodings that may be used. - * - * The first time `response.write()` is called, it will send the buffered - * header information and the first chunk of the body to the client. The second - * time `response.write()` is called, Node.js assumes data will be streamed, - * and sends the new data separately. That is, the response is buffered up to the - * first chunk of the body. - * - * Returns `true` if the entire data was flushed successfully to the kernel - * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again. - * @since v8.4.0 - */ - write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; - write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean; - /** - * Sends a status `100 Continue` to the client, indicating that the request body - * should be sent. See the `'checkContinue'` event on `Http2Server` and `Http2SecureServer`. - * @since v8.4.0 - */ - writeContinue(): void; - /** - * Sends a status `103 Early Hints` to the client with a Link header, - * indicating that the user agent can preload/preconnect the linked resources. - * The `hints` is an object containing the values of headers to be sent with - * early hints message. - * - * **Example** - * - * ```js - * const earlyHintsLink = '; rel=preload; as=style'; - * response.writeEarlyHints({ - * 'link': earlyHintsLink, - * }); - * - * const earlyHintsLinks = [ - * '; rel=preload; as=style', - * '; rel=preload; as=script', - * ]; - * response.writeEarlyHints({ - * 'link': earlyHintsLinks, - * }); - * ``` - * @since v18.11.0 - */ - writeEarlyHints(hints: Record): void; - /** - * Sends a response header to the request. The status code is a 3-digit HTTP - * status code, like `404`. The last argument, `headers`, are the response headers. - * - * Returns a reference to the `Http2ServerResponse`, so that calls can be chained. - * - * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be - * passed as the second argument. However, because the `statusMessage` has no - * meaning within HTTP/2, the argument will have no effect and a process warning - * will be emitted. - * - * ```js - * const body = 'hello world'; - * response.writeHead(200, { - * 'Content-Length': Buffer.byteLength(body), - * 'Content-Type': 'text/plain; charset=utf-8', - * }); - * ``` - * - * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a - * given encoding. On outbound messages, Node.js does not check if Content-Length - * and the length of the body being transmitted are equal or not. However, when - * receiving messages, Node.js will automatically reject messages when the `Content-Length` does not match the actual payload size. - * - * This method may be called at most one time on a message before `response.end()` is called. - * - * If `response.write()` or `response.end()` are called before calling - * this, the implicit/mutable headers will be calculated and call this function. - * - * When headers have been set with `response.setHeader()`, they will be merged - * with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * ```js - * // Returns content-type = text/plain - * const server = http2.createServer((req, res) => { - * res.setHeader('Content-Type', 'text/html; charset=utf-8'); - * res.setHeader('X-Foo', 'bar'); - * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); - * res.end('ok'); - * }); - * ``` - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * @since v8.4.0 - */ - writeHead(statusCode: number, headers?: OutgoingHttpHeaders | readonly string[]): this; - writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders | readonly string[]): this; - /** - * Call `http2stream.pushStream()` with the given headers, and wrap the - * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback - * parameter if successful. When `Http2ServerRequest` is closed, the callback is - * called with an error `ERR_HTTP2_INVALID_STREAM`. - * @since v8.4.0 - * @param headers An object describing the headers - * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of - * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method - */ - createPushResponse( - headers: OutgoingHttpHeaders, - callback: (err: Error | null, res: Http2ServerResponse) => void, - ): void; - } - namespace constants { - const NGHTTP2_SESSION_SERVER: number; - const NGHTTP2_SESSION_CLIENT: number; - const NGHTTP2_STREAM_STATE_IDLE: number; - const NGHTTP2_STREAM_STATE_OPEN: number; - const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; - const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; - const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; - const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; - const NGHTTP2_STREAM_STATE_CLOSED: number; - const NGHTTP2_NO_ERROR: number; - const NGHTTP2_PROTOCOL_ERROR: number; - const NGHTTP2_INTERNAL_ERROR: number; - const NGHTTP2_FLOW_CONTROL_ERROR: number; - const NGHTTP2_SETTINGS_TIMEOUT: number; - const NGHTTP2_STREAM_CLOSED: number; - const NGHTTP2_FRAME_SIZE_ERROR: number; - const NGHTTP2_REFUSED_STREAM: number; - const NGHTTP2_CANCEL: number; - const NGHTTP2_COMPRESSION_ERROR: number; - const NGHTTP2_CONNECT_ERROR: number; - const NGHTTP2_ENHANCE_YOUR_CALM: number; - const NGHTTP2_INADEQUATE_SECURITY: number; - const NGHTTP2_HTTP_1_1_REQUIRED: number; - const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; - const NGHTTP2_FLAG_NONE: number; - const NGHTTP2_FLAG_END_STREAM: number; - const NGHTTP2_FLAG_END_HEADERS: number; - const NGHTTP2_FLAG_ACK: number; - const NGHTTP2_FLAG_PADDED: number; - const NGHTTP2_FLAG_PRIORITY: number; - const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; - const DEFAULT_SETTINGS_ENABLE_PUSH: number; - const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; - const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; - const MAX_MAX_FRAME_SIZE: number; - const MIN_MAX_FRAME_SIZE: number; - const MAX_INITIAL_WINDOW_SIZE: number; - const NGHTTP2_DEFAULT_WEIGHT: number; - const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; - const NGHTTP2_SETTINGS_ENABLE_PUSH: number; - const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; - const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; - const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; - const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; - const PADDING_STRATEGY_NONE: number; - const PADDING_STRATEGY_MAX: number; - const PADDING_STRATEGY_CALLBACK: number; - const HTTP2_HEADER_STATUS: string; - const HTTP2_HEADER_METHOD: string; - const HTTP2_HEADER_AUTHORITY: string; - const HTTP2_HEADER_SCHEME: string; - const HTTP2_HEADER_PATH: string; - const HTTP2_HEADER_ACCEPT_CHARSET: string; - const HTTP2_HEADER_ACCEPT_ENCODING: string; - const HTTP2_HEADER_ACCEPT_LANGUAGE: string; - const HTTP2_HEADER_ACCEPT_RANGES: string; - const HTTP2_HEADER_ACCEPT: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; - const HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS: string; - const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERS: string; - const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD: string; - const HTTP2_HEADER_AGE: string; - const HTTP2_HEADER_ALLOW: string; - const HTTP2_HEADER_AUTHORIZATION: string; - const HTTP2_HEADER_CACHE_CONTROL: string; - const HTTP2_HEADER_CONNECTION: string; - const HTTP2_HEADER_CONTENT_DISPOSITION: string; - const HTTP2_HEADER_CONTENT_ENCODING: string; - const HTTP2_HEADER_CONTENT_LANGUAGE: string; - const HTTP2_HEADER_CONTENT_LENGTH: string; - const HTTP2_HEADER_CONTENT_LOCATION: string; - const HTTP2_HEADER_CONTENT_MD5: string; - const HTTP2_HEADER_CONTENT_RANGE: string; - const HTTP2_HEADER_CONTENT_TYPE: string; - const HTTP2_HEADER_COOKIE: string; - const HTTP2_HEADER_DATE: string; - const HTTP2_HEADER_ETAG: string; - const HTTP2_HEADER_EXPECT: string; - const HTTP2_HEADER_EXPIRES: string; - const HTTP2_HEADER_FROM: string; - const HTTP2_HEADER_HOST: string; - const HTTP2_HEADER_IF_MATCH: string; - const HTTP2_HEADER_IF_MODIFIED_SINCE: string; - const HTTP2_HEADER_IF_NONE_MATCH: string; - const HTTP2_HEADER_IF_RANGE: string; - const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; - const HTTP2_HEADER_LAST_MODIFIED: string; - const HTTP2_HEADER_LINK: string; - const HTTP2_HEADER_LOCATION: string; - const HTTP2_HEADER_MAX_FORWARDS: string; - const HTTP2_HEADER_PREFER: string; - const HTTP2_HEADER_PROXY_AUTHENTICATE: string; - const HTTP2_HEADER_PROXY_AUTHORIZATION: string; - const HTTP2_HEADER_RANGE: string; - const HTTP2_HEADER_REFERER: string; - const HTTP2_HEADER_REFRESH: string; - const HTTP2_HEADER_RETRY_AFTER: string; - const HTTP2_HEADER_SERVER: string; - const HTTP2_HEADER_SET_COOKIE: string; - const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; - const HTTP2_HEADER_TRANSFER_ENCODING: string; - const HTTP2_HEADER_TE: string; - const HTTP2_HEADER_UPGRADE: string; - const HTTP2_HEADER_USER_AGENT: string; - const HTTP2_HEADER_VARY: string; - const HTTP2_HEADER_VIA: string; - const HTTP2_HEADER_WWW_AUTHENTICATE: string; - const HTTP2_HEADER_HTTP2_SETTINGS: string; - const HTTP2_HEADER_KEEP_ALIVE: string; - const HTTP2_HEADER_PROXY_CONNECTION: string; - const HTTP2_METHOD_ACL: string; - const HTTP2_METHOD_BASELINE_CONTROL: string; - const HTTP2_METHOD_BIND: string; - const HTTP2_METHOD_CHECKIN: string; - const HTTP2_METHOD_CHECKOUT: string; - const HTTP2_METHOD_CONNECT: string; - const HTTP2_METHOD_COPY: string; - const HTTP2_METHOD_DELETE: string; - const HTTP2_METHOD_GET: string; - const HTTP2_METHOD_HEAD: string; - const HTTP2_METHOD_LABEL: string; - const HTTP2_METHOD_LINK: string; - const HTTP2_METHOD_LOCK: string; - const HTTP2_METHOD_MERGE: string; - const HTTP2_METHOD_MKACTIVITY: string; - const HTTP2_METHOD_MKCALENDAR: string; - const HTTP2_METHOD_MKCOL: string; - const HTTP2_METHOD_MKREDIRECTREF: string; - const HTTP2_METHOD_MKWORKSPACE: string; - const HTTP2_METHOD_MOVE: string; - const HTTP2_METHOD_OPTIONS: string; - const HTTP2_METHOD_ORDERPATCH: string; - const HTTP2_METHOD_PATCH: string; - const HTTP2_METHOD_POST: string; - const HTTP2_METHOD_PRI: string; - const HTTP2_METHOD_PROPFIND: string; - const HTTP2_METHOD_PROPPATCH: string; - const HTTP2_METHOD_PUT: string; - const HTTP2_METHOD_REBIND: string; - const HTTP2_METHOD_REPORT: string; - const HTTP2_METHOD_SEARCH: string; - const HTTP2_METHOD_TRACE: string; - const HTTP2_METHOD_UNBIND: string; - const HTTP2_METHOD_UNCHECKOUT: string; - const HTTP2_METHOD_UNLINK: string; - const HTTP2_METHOD_UNLOCK: string; - const HTTP2_METHOD_UPDATE: string; - const HTTP2_METHOD_UPDATEREDIRECTREF: string; - const HTTP2_METHOD_VERSION_CONTROL: string; - const HTTP_STATUS_CONTINUE: number; - const HTTP_STATUS_SWITCHING_PROTOCOLS: number; - const HTTP_STATUS_PROCESSING: number; - const HTTP_STATUS_OK: number; - const HTTP_STATUS_CREATED: number; - const HTTP_STATUS_ACCEPTED: number; - const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; - const HTTP_STATUS_NO_CONTENT: number; - const HTTP_STATUS_RESET_CONTENT: number; - const HTTP_STATUS_PARTIAL_CONTENT: number; - const HTTP_STATUS_MULTI_STATUS: number; - const HTTP_STATUS_ALREADY_REPORTED: number; - const HTTP_STATUS_IM_USED: number; - const HTTP_STATUS_MULTIPLE_CHOICES: number; - const HTTP_STATUS_MOVED_PERMANENTLY: number; - const HTTP_STATUS_FOUND: number; - const HTTP_STATUS_SEE_OTHER: number; - const HTTP_STATUS_NOT_MODIFIED: number; - const HTTP_STATUS_USE_PROXY: number; - const HTTP_STATUS_TEMPORARY_REDIRECT: number; - const HTTP_STATUS_PERMANENT_REDIRECT: number; - const HTTP_STATUS_BAD_REQUEST: number; - const HTTP_STATUS_UNAUTHORIZED: number; - const HTTP_STATUS_PAYMENT_REQUIRED: number; - const HTTP_STATUS_FORBIDDEN: number; - const HTTP_STATUS_NOT_FOUND: number; - const HTTP_STATUS_METHOD_NOT_ALLOWED: number; - const HTTP_STATUS_NOT_ACCEPTABLE: number; - const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; - const HTTP_STATUS_REQUEST_TIMEOUT: number; - const HTTP_STATUS_CONFLICT: number; - const HTTP_STATUS_GONE: number; - const HTTP_STATUS_LENGTH_REQUIRED: number; - const HTTP_STATUS_PRECONDITION_FAILED: number; - const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; - const HTTP_STATUS_URI_TOO_LONG: number; - const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; - const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; - const HTTP_STATUS_EXPECTATION_FAILED: number; - const HTTP_STATUS_TEAPOT: number; - const HTTP_STATUS_MISDIRECTED_REQUEST: number; - const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; - const HTTP_STATUS_LOCKED: number; - const HTTP_STATUS_FAILED_DEPENDENCY: number; - const HTTP_STATUS_UNORDERED_COLLECTION: number; - const HTTP_STATUS_UPGRADE_REQUIRED: number; - const HTTP_STATUS_PRECONDITION_REQUIRED: number; - const HTTP_STATUS_TOO_MANY_REQUESTS: number; - const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; - const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; - const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; - const HTTP_STATUS_NOT_IMPLEMENTED: number; - const HTTP_STATUS_BAD_GATEWAY: number; - const HTTP_STATUS_SERVICE_UNAVAILABLE: number; - const HTTP_STATUS_GATEWAY_TIMEOUT: number; - const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; - const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; - const HTTP_STATUS_INSUFFICIENT_STORAGE: number; - const HTTP_STATUS_LOOP_DETECTED: number; - const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; - const HTTP_STATUS_NOT_EXTENDED: number; - const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; - } - /** - * This symbol can be set as a property on the HTTP/2 headers object with - * an array value in order to provide a list of headers considered sensitive. - */ - const sensitiveHeaders: symbol; - /** - * Returns an object containing the default settings for an `Http2Session` instance. This method returns a new object instance every time it is called - * so instances returned may be safely modified for use. - * @since v8.4.0 - */ - function getDefaultSettings(): Settings; - /** - * Returns a `Buffer` instance containing serialized representation of the given - * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended - * for use with the `HTTP2-Settings` header field. - * - * ```js - * import http2 from 'node:http2'; - * - * const packed = http2.getPackedSettings({ enablePush: false }); - * - * console.log(packed.toString('base64')); - * // Prints: AAIAAAAA - * ``` - * @since v8.4.0 - */ - function getPackedSettings(settings: Settings): NonSharedBuffer; - /** - * Returns a `HTTP/2 Settings Object` containing the deserialized settings from - * the given `Buffer` as generated by `http2.getPackedSettings()`. - * @since v8.4.0 - * @param buf The packed settings. - */ - function getUnpackedSettings(buf: Uint8Array): Settings; - /** - * Returns a `net.Server` instance that creates and manages `Http2Session` instances. - * - * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when - * communicating - * with browser clients. - * - * ```js - * import http2 from 'node:http2'; - * - * // Create an unencrypted HTTP/2 server. - * // Since there are no browsers known that support - * // unencrypted HTTP/2, the use of `http2.createSecureServer()` - * // is necessary when communicating with browser clients. - * const server = http2.createServer(); - * - * server.on('stream', (stream, headers) => { - * stream.respond({ - * 'content-type': 'text/html; charset=utf-8', - * ':status': 200, - * }); - * stream.end('

Hello World

'); - * }); - * - * server.listen(8000); - * ``` - * @since v8.4.0 - * @param onRequestHandler See `Compatibility API` - */ - function createServer( - onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, - ): Http2Server; - function createServer< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - >( - options: ServerOptions, - onRequestHandler?: (request: InstanceType, response: InstanceType) => void, - ): Http2Server; - /** - * Returns a `tls.Server` instance that creates and manages `Http2Session` instances. - * - * ```js - * import http2 from 'node:http2'; - * import fs from 'node:fs'; - * - * const options = { - * key: fs.readFileSync('server-key.pem'), - * cert: fs.readFileSync('server-cert.pem'), - * }; - * - * // Create a secure HTTP/2 server - * const server = http2.createSecureServer(options); - * - * server.on('stream', (stream, headers) => { - * stream.respond({ - * 'content-type': 'text/html; charset=utf-8', - * ':status': 200, - * }); - * stream.end('

Hello World

'); - * }); - * - * server.listen(8443); - * ``` - * @since v8.4.0 - * @param onRequestHandler See `Compatibility API` - */ - function createSecureServer( - onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, - ): Http2SecureServer; - function createSecureServer< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - >( - options: SecureServerOptions, - onRequestHandler?: (request: InstanceType, response: InstanceType) => void, - ): Http2SecureServer; - /** - * Returns a `ClientHttp2Session` instance. - * - * ```js - * import http2 from 'node:http2'; - * const client = http2.connect('https://localhost:1234'); - * - * // Use the client - * - * client.close(); - * ``` - * @since v8.4.0 - * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port - * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored. - * @param listener Will be registered as a one-time listener of the {@link 'connect'} event. - */ - function connect( - authority: string | url.URL, - listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): ClientHttp2Session; - function connect( - authority: string | url.URL, - options?: ClientSessionOptions | SecureClientSessionOptions, - listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): ClientHttp2Session; - /** - * Create an HTTP/2 server session from an existing socket. - * @param socket A Duplex Stream - * @param options Any `{@link createServer}` options can be provided. - * @since v20.12.0 - */ - function performServerHandshake< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - >( - socket: stream.Duplex, - options?: ServerOptions, - ): ServerHttp2Session; -} -declare module "node:http2" { - export { OutgoingHttpHeaders } from "node:http"; -} -declare module "http2" { - export * from "node:http2"; -} diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts deleted file mode 100644 index b10aad0..0000000 --- a/node_modules/@types/node/https.d.ts +++ /dev/null @@ -1,400 +0,0 @@ -declare module "node:https" { - import * as http from "node:http"; - import { Duplex } from "node:stream"; - import * as tls from "node:tls"; - import { URL } from "node:url"; - interface ServerOptions< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - > extends http.ServerOptions, tls.TlsOptions {} - interface RequestOptions extends http.RequestOptions, tls.SecureContextOptions { - checkServerIdentity?: - | ((hostname: string, cert: tls.DetailedPeerCertificate) => Error | undefined) - | undefined; - rejectUnauthorized?: boolean | undefined; // Defaults to true - servername?: string | undefined; // SNI TLS Extension - } - interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { - maxCachedSessions?: number | undefined; - } - /** - * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information. - * - * Like `http.Agent`, the `createConnection(options[, callback])` method can be overridden - * to customize how TLS connections are established. - * - * > See `agent.createConnection()` for details on overriding this method, - * > including asynchronous socket creation with a callback. - * @since v0.4.5 - */ - class Agent extends http.Agent { - constructor(options?: AgentOptions); - options: AgentOptions; - createConnection( - options: RequestOptions, - callback?: (err: Error | null, stream: Duplex) => void, - ): Duplex | null | undefined; - getName(options?: RequestOptions): string; - } - interface ServerEventMap< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - > extends http.ServerEventMap, tls.ServerEventMap {} - /** - * See `http.Server` for more information. - * @since v0.3.4 - */ - class Server< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - > extends tls.Server { - constructor(requestListener?: http.RequestListener); - constructor( - options: ServerOptions, - requestListener?: http.RequestListener, - ); - /** - * Closes all connections connected to this server. - * @since v18.2.0 - */ - closeAllConnections(): void; - /** - * Closes all connections connected to this server which are not sending a request or waiting for a response. - * @since v18.2.0 - */ - closeIdleConnections(): void; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ServerEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ServerEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: ServerEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: ServerEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface Server< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - > extends http.Server {} - /** - * ```js - * // curl -k https://localhost:8000/ - * import https from 'node:https'; - * import fs from 'node:fs'; - * - * const options = { - * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), - * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), - * }; - * - * https.createServer(options, (req, res) => { - * res.writeHead(200); - * res.end('hello world\n'); - * }).listen(8000); - * ``` - * - * Or - * - * ```js - * import https from 'node:https'; - * import fs from 'node:fs'; - * - * const options = { - * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'), - * passphrase: 'sample', - * }; - * - * https.createServer(options, (req, res) => { - * res.writeHead(200); - * res.end('hello world\n'); - * }).listen(8000); - * ``` - * @since v0.3.4 - * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`. - * @param requestListener A listener to be added to the `'request'` event. - */ - function createServer< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - >(requestListener?: http.RequestListener): Server; - function createServer< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - >( - options: ServerOptions, - requestListener?: http.RequestListener, - ): Server; - /** - * Makes a request to a secure web server. - * - * The following additional `options` from `tls.connect()` are also accepted: `ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`, `honorCipherOrder`, `key`, `passphrase`, - * `pfx`, `rejectUnauthorized`, `secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`, `highWaterMark`. - * - * `options` can be an object, a string, or a `URL` object. If `options` is a - * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. - * - * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to - * upload a file with a POST request, then write to the `ClientRequest` object. - * - * ```js - * import https from 'node:https'; - * - * const options = { - * hostname: 'encrypted.google.com', - * port: 443, - * path: '/', - * method: 'GET', - * }; - * - * const req = https.request(options, (res) => { - * console.log('statusCode:', res.statusCode); - * console.log('headers:', res.headers); - * - * res.on('data', (d) => { - * process.stdout.write(d); - * }); - * }); - * - * req.on('error', (e) => { - * console.error(e); - * }); - * req.end(); - * ``` - * - * Example using options from `tls.connect()`: - * - * ```js - * const options = { - * hostname: 'encrypted.google.com', - * port: 443, - * path: '/', - * method: 'GET', - * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), - * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), - * }; - * options.agent = new https.Agent(options); - * - * const req = https.request(options, (res) => { - * // ... - * }); - * ``` - * - * Alternatively, opt out of connection pooling by not using an `Agent`. - * - * ```js - * const options = { - * hostname: 'encrypted.google.com', - * port: 443, - * path: '/', - * method: 'GET', - * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), - * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), - * agent: false, - * }; - * - * const req = https.request(options, (res) => { - * // ... - * }); - * ``` - * - * Example using a `URL` as `options`: - * - * ```js - * const options = new URL('https://abc:xyz@example.com'); - * - * const req = https.request(options, (res) => { - * // ... - * }); - * ``` - * - * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`): - * - * ```js - * import tls from 'node:tls'; - * import https from 'node:https'; - * import crypto from 'node:crypto'; - * - * function sha256(s) { - * return crypto.createHash('sha256').update(s).digest('base64'); - * } - * const options = { - * hostname: 'github.com', - * port: 443, - * path: '/', - * method: 'GET', - * checkServerIdentity: function(host, cert) { - * // Make sure the certificate is issued to the host we are connected to - * const err = tls.checkServerIdentity(host, cert); - * if (err) { - * return err; - * } - * - * // Pin the public key, similar to HPKP pin-sha256 pinning - * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU='; - * if (sha256(cert.pubkey) !== pubkey256) { - * const msg = 'Certificate verification error: ' + - * `The public key of '${cert.subject.CN}' ` + - * 'does not match our pinned fingerprint'; - * return new Error(msg); - * } - * - * // Pin the exact certificate, rather than the pub key - * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' + - * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16'; - * if (cert.fingerprint256 !== cert256) { - * const msg = 'Certificate verification error: ' + - * `The certificate of '${cert.subject.CN}' ` + - * 'does not match our pinned fingerprint'; - * return new Error(msg); - * } - * - * // This loop is informational only. - * // Print the certificate and public key fingerprints of all certs in the - * // chain. Its common to pin the public key of the issuer on the public - * // internet, while pinning the public key of the service in sensitive - * // environments. - * do { - * console.log('Subject Common Name:', cert.subject.CN); - * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256); - * - * hash = crypto.createHash('sha256'); - * console.log(' Public key ping-sha256:', sha256(cert.pubkey)); - * - * lastprint256 = cert.fingerprint256; - * cert = cert.issuerCertificate; - * } while (cert.fingerprint256 !== lastprint256); - * - * }, - * }; - * - * options.agent = new https.Agent(options); - * const req = https.request(options, (res) => { - * console.log('All OK. Server matched our pinned cert or public key'); - * console.log('statusCode:', res.statusCode); - * // Print the HPKP values - * console.log('headers:', res.headers['public-key-pins']); - * - * res.on('data', (d) => {}); - * }); - * - * req.on('error', (e) => { - * console.error(e.message); - * }); - * req.end(); - * ``` - * - * Outputs for example: - * - * ```text - * Subject Common Name: github.com - * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16 - * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU= - * Subject Common Name: DigiCert SHA2 Extended Validation Server CA - * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A - * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho= - * Subject Common Name: DigiCert High Assurance EV Root CA - * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF - * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18= - * All OK. Server matched our pinned cert or public key - * statusCode: 200 - * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; - * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; - * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains - * ``` - * @since v0.3.6 - * @param options Accepts all `options` from `request`, with some differences in default values: - */ - function request( - options: RequestOptions | string | URL, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - function request( - url: string | URL, - options: RequestOptions, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - /** - * Like `http.get()` but for HTTPS. - * - * `options` can be an object, a string, or a `URL` object. If `options` is a - * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. - * - * ```js - * import https from 'node:https'; - * - * https.get('https://encrypted.google.com/', (res) => { - * console.log('statusCode:', res.statusCode); - * console.log('headers:', res.headers); - * - * res.on('data', (d) => { - * process.stdout.write(d); - * }); - * - * }).on('error', (e) => { - * console.error(e); - * }); - * ``` - * @since v0.3.6 - * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. - */ - function get( - options: RequestOptions | string | URL, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - function get( - url: string | URL, - options: RequestOptions, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - let globalAgent: Agent; -} -declare module "https" { - export * from "node:https"; -} diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts deleted file mode 100644 index 14dd60b..0000000 --- a/node_modules/@types/node/index.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -/** - * License for programmatically and manually incorporated - * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc - * - * Copyright Node.js contributors. All rights reserved. - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -// NOTE: These definitions support Node.js and TypeScript 5.8+. - -// Reference required TypeScript libraries: -/// -/// -/// - -// Iterator definitions required for compatibility with TypeScript <5.6: -/// - -// Definitions for Node.js modules specific to TypeScript 5.7+: -/// -/// - -// Definitions for Node.js modules that are not specific to any version of TypeScript: -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts deleted file mode 100644 index cf385b7..0000000 --- a/node_modules/@types/node/inspector.d.ts +++ /dev/null @@ -1,264 +0,0 @@ -declare module "node:inspector" { - import { EventEmitter } from "node:events"; - /** - * The `inspector.Session` is used for dispatching messages to the V8 inspector - * back-end and receiving message responses and notifications. - */ - class Session extends EventEmitter { - /** - * Create a new instance of the inspector.Session class. - * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend. - */ - constructor(); - /** - * Connects a session to the inspector back-end. - */ - connect(): void; - /** - * Connects a session to the inspector back-end. - * An exception will be thrown if this API was not called on a Worker thread. - * @since v12.11.0 - */ - connectToMainThread(): void; - /** - * Immediately close the session. All pending message callbacks will be called with an error. - * `session.connect()` will need to be called to be able to send messages again. - * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. - */ - disconnect(): void; - } - /** - * Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has - * started. - * - * If wait is `true`, will block until a client has connected to the inspect port - * and flow control has been passed to the debugger client. - * - * See the [security warning](https://nodejs.org/docs/latest-v25.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure) - * regarding the `host` parameter usage. - * @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI. - * @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI. - * @param wait Block until a client has connected. Defaults to what was specified on the CLI. - * @returns Disposable that calls `inspector.close()`. - */ - function open(port?: number, host?: string, wait?: boolean): Disposable; - /** - * Deactivate the inspector. Blocks until there are no active connections. - */ - function close(): void; - /** - * Return the URL of the active inspector, or `undefined` if there is none. - * - * ```console - * $ node --inspect -p 'inspector.url()' - * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 - * For help, see: https://nodejs.org/en/docs/inspector - * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 - * - * $ node --inspect=localhost:3000 -p 'inspector.url()' - * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a - * For help, see: https://nodejs.org/en/docs/inspector - * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a - * - * $ node -p 'inspector.url()' - * undefined - * ``` - */ - function url(): string | undefined; - /** - * Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command. - * - * An exception will be thrown if there is no active inspector. - * @since v12.7.0 - */ - function waitForDebugger(): void; - // These methods are exposed by the V8 inspector console API (inspector/v8-console.h). - // The method signatures differ from those of the Node.js console, and are deliberately - // typed permissively. - interface InspectorConsole { - debug(...data: any[]): void; - error(...data: any[]): void; - info(...data: any[]): void; - log(...data: any[]): void; - warn(...data: any[]): void; - dir(...data: any[]): void; - dirxml(...data: any[]): void; - table(...data: any[]): void; - trace(...data: any[]): void; - group(...data: any[]): void; - groupCollapsed(...data: any[]): void; - groupEnd(...data: any[]): void; - clear(...data: any[]): void; - count(label?: any): void; - countReset(label?: any): void; - assert(value?: any, ...data: any[]): void; - profile(label?: any): void; - profileEnd(label?: any): void; - time(label?: any): void; - timeLog(label?: any): void; - timeStamp(label?: any): void; - } - /** - * An object to send messages to the remote inspector console. - * @since v11.0.0 - */ - const console: InspectorConsole; - // DevTools protocol event broadcast methods - namespace Network { - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that - * the application is about to send an HTTP request. - * @since v22.6.0 - */ - function requestWillBeSent(params: RequestWillBeSentEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.dataReceived` event to connected frontends, or buffers the data if - * `Network.streamResourceContent` command was not invoked for the given request yet. - * - * Also enables `Network.getResponseBody` command to retrieve the response data. - * @since v24.2.0 - */ - function dataReceived(params: DataReceivedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Enables `Network.getRequestPostData` command to retrieve the request data. - * @since v24.3.0 - */ - function dataSent(params: unknown): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that - * HTTP response is available. - * @since v22.6.0 - */ - function responseReceived(params: ResponseReceivedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that - * HTTP request has finished loading. - * @since v22.6.0 - */ - function loadingFinished(params: LoadingFinishedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that - * HTTP request has failed to load. - * @since v22.7.0 - */ - function loadingFailed(params: LoadingFailedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.webSocketCreated` event to connected frontends. This event indicates that - * a WebSocket connection has been initiated. - * @since v24.7.0 - */ - function webSocketCreated(params: WebSocketCreatedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.webSocketHandshakeResponseReceived` event to connected frontends. - * This event indicates that the WebSocket handshake response has been received. - * @since v24.7.0 - */ - function webSocketHandshakeResponseReceived(params: WebSocketHandshakeResponseReceivedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.webSocketClosed` event to connected frontends. - * This event indicates that a WebSocket connection has been closed. - * @since v24.7.0 - */ - function webSocketClosed(params: WebSocketClosedEventDataType): void; - } - namespace NetworkResources { - /** - * This feature is only available with the `--experimental-inspector-network-resource` flag enabled. - * - * The inspector.NetworkResources.put method is used to provide a response for a loadNetworkResource - * request issued via the Chrome DevTools Protocol (CDP). - * This is typically triggered when a source map is specified by URL, and a DevTools frontend—such as - * Chrome—requests the resource to retrieve the source map. - * - * This method allows developers to predefine the resource content to be served in response to such CDP requests. - * - * ```js - * const inspector = require('node:inspector'); - * // By preemptively calling put to register the resource, a source map can be resolved when - * // a loadNetworkResource request is made from the frontend. - * async function setNetworkResources() { - * const mapUrl = 'http://localhost:3000/dist/app.js.map'; - * const tsUrl = 'http://localhost:3000/src/app.ts'; - * const distAppJsMap = await fetch(mapUrl).then((res) => res.text()); - * const srcAppTs = await fetch(tsUrl).then((res) => res.text()); - * inspector.NetworkResources.put(mapUrl, distAppJsMap); - * inspector.NetworkResources.put(tsUrl, srcAppTs); - * }; - * setNetworkResources().then(() => { - * require('./dist/app'); - * }); - * ``` - * - * For more details, see the official CDP documentation: [Network.loadNetworkResource](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-loadNetworkResource) - * @since v24.5.0 - * @experimental - */ - function put(url: string, data: string): void; - } - namespace DOMStorage { - /** - * This feature is only available with the - * `--experimental-storage-inspection` flag enabled. - * - * Broadcasts the `DOMStorage.domStorageItemAdded` event to connected frontends. - * This event indicates that a new item has been added to the storage. - * @since v25.5.0 - */ - function domStorageItemAdded(params: DomStorageItemAddedEventDataType): void; - /** - * This feature is only available with the - * `--experimental-storage-inspection` flag enabled. - * - * Broadcasts the `DOMStorage.domStorageItemRemoved` event to connected frontends. - * This event indicates that an item has been removed from the storage. - * @since v25.5.0 - */ - function domStorageItemRemoved(params: DomStorageItemRemovedEventDataType): void; - /** - * This feature is only available with the - * `--experimental-storage-inspection` flag enabled. - - * Broadcasts the `DOMStorage.domStorageItemUpdated` event to connected frontends. - * This event indicates that a storage item has been updated. - * @since v25.5.0 - */ - function domStorageItemUpdated(params: DomStorageItemUpdatedEventDataType): void; - /** - * This feature is only available with the - * `--experimental-storage-inspection` flag enabled. - * - * Broadcasts the `DOMStorage.domStorageItemsCleared` event to connected - * frontends. This event indicates that all items have been cleared from the - * storage. - * @since v25.5.0 - */ - function domStorageItemsCleared(params: DomStorageItemsClearedEventDataType): void; - /** - * This feature is only available with the - * `--experimental-storage-inspection` flag enabled. - * @since v25.5.0 - */ - function registerStorage(params: unknown): void; - } -} -declare module "inspector" { - export * from "node:inspector"; -} diff --git a/node_modules/@types/node/inspector.generated.d.ts b/node_modules/@types/node/inspector.generated.d.ts deleted file mode 100644 index 0e2e441..0000000 --- a/node_modules/@types/node/inspector.generated.d.ts +++ /dev/null @@ -1,4406 +0,0 @@ -// These definitions are automatically generated by the generate-inspector script. -// Do not edit this file directly. -// See scripts/generate-inspector/README.md for information on how to update the protocol definitions. -// Changes to the module itself should be added to the generator template (scripts/generate-inspector/inspector.d.ts.template). - -declare module "node:inspector" { - interface InspectorNotification { - method: string; - params: T; - } - namespace Schema { - /** - * Description of the protocol domain. - */ - interface Domain { - /** - * Domain name. - */ - name: string; - /** - * Domain version. - */ - version: string; - } - interface GetDomainsReturnType { - /** - * List of supported domains. - */ - domains: Domain[]; - } - } - namespace Runtime { - /** - * Unique script identifier. - */ - type ScriptId = string; - /** - * Unique object identifier. - */ - type RemoteObjectId = string; - /** - * Primitive value which cannot be JSON-stringified. - */ - type UnserializableValue = string; - /** - * Mirror object referencing original JavaScript object. - */ - interface RemoteObject { - /** - * Object type. - */ - type: string; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string | undefined; - /** - * Object class (constructor) name. Specified for object type values only. - */ - className?: string | undefined; - /** - * Remote object value in case of primitive values or JSON values (if it was requested). - */ - value?: any; - /** - * Primitive value which can not be JSON-stringified does not have value, but gets this property. - */ - unserializableValue?: UnserializableValue | undefined; - /** - * String representation of the object. - */ - description?: string | undefined; - /** - * Unique object identifier (for non-primitive values). - */ - objectId?: RemoteObjectId | undefined; - /** - * Preview containing abbreviated property values. Specified for object type values only. - * @experimental - */ - preview?: ObjectPreview | undefined; - /** - * @experimental - */ - customPreview?: CustomPreview | undefined; - } - /** - * @experimental - */ - interface CustomPreview { - header: string; - hasBody: boolean; - formatterObjectId: RemoteObjectId; - bindRemoteObjectFunctionId: RemoteObjectId; - configObjectId?: RemoteObjectId | undefined; - } - /** - * Object containing abbreviated remote object value. - * @experimental - */ - interface ObjectPreview { - /** - * Object type. - */ - type: string; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string | undefined; - /** - * String representation of the object. - */ - description?: string | undefined; - /** - * True iff some of the properties or entries of the original object did not fit. - */ - overflow: boolean; - /** - * List of the properties. - */ - properties: PropertyPreview[]; - /** - * List of the entries. Specified for map and set subtype values only. - */ - entries?: EntryPreview[] | undefined; - } - /** - * @experimental - */ - interface PropertyPreview { - /** - * Property name. - */ - name: string; - /** - * Object type. Accessor means that the property itself is an accessor property. - */ - type: string; - /** - * User-friendly property value string. - */ - value?: string | undefined; - /** - * Nested value preview. - */ - valuePreview?: ObjectPreview | undefined; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string | undefined; - } - /** - * @experimental - */ - interface EntryPreview { - /** - * Preview of the key. Specified for map-like collection entries. - */ - key?: ObjectPreview | undefined; - /** - * Preview of the value. - */ - value: ObjectPreview; - } - /** - * Object property descriptor. - */ - interface PropertyDescriptor { - /** - * Property name or symbol description. - */ - name: string; - /** - * The value associated with the property. - */ - value?: RemoteObject | undefined; - /** - * True if the value associated with the property may be changed (data descriptors only). - */ - writable?: boolean | undefined; - /** - * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). - */ - get?: RemoteObject | undefined; - /** - * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). - */ - set?: RemoteObject | undefined; - /** - * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. - */ - configurable: boolean; - /** - * True if this property shows up during enumeration of the properties on the corresponding object. - */ - enumerable: boolean; - /** - * True if the result was thrown during the evaluation. - */ - wasThrown?: boolean | undefined; - /** - * True if the property is owned for the object. - */ - isOwn?: boolean | undefined; - /** - * Property symbol object, if the property is of the symbol type. - */ - symbol?: RemoteObject | undefined; - } - /** - * Object internal property descriptor. This property isn't normally visible in JavaScript code. - */ - interface InternalPropertyDescriptor { - /** - * Conventional property name. - */ - name: string; - /** - * The value associated with the property. - */ - value?: RemoteObject | undefined; - } - /** - * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. - */ - interface CallArgument { - /** - * Primitive value or serializable javascript object. - */ - value?: any; - /** - * Primitive value which can not be JSON-stringified. - */ - unserializableValue?: UnserializableValue | undefined; - /** - * Remote object handle. - */ - objectId?: RemoteObjectId | undefined; - } - /** - * Id of an execution context. - */ - type ExecutionContextId = number; - /** - * Description of an isolated world. - */ - interface ExecutionContextDescription { - /** - * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. - */ - id: ExecutionContextId; - /** - * Execution context origin. - */ - origin: string; - /** - * Human readable name describing given context. - */ - name: string; - /** - * Embedder-specific auxiliary data. - */ - auxData?: object | undefined; - } - /** - * Detailed information about exception (or error) that was thrown during script compilation or execution. - */ - interface ExceptionDetails { - /** - * Exception id. - */ - exceptionId: number; - /** - * Exception text, which should be used together with exception object when available. - */ - text: string; - /** - * Line number of the exception location (0-based). - */ - lineNumber: number; - /** - * Column number of the exception location (0-based). - */ - columnNumber: number; - /** - * Script ID of the exception location. - */ - scriptId?: ScriptId | undefined; - /** - * URL of the exception location, to be used when the script was not reported. - */ - url?: string | undefined; - /** - * JavaScript stack trace if available. - */ - stackTrace?: StackTrace | undefined; - /** - * Exception object if available. - */ - exception?: RemoteObject | undefined; - /** - * Identifier of the context where exception happened. - */ - executionContextId?: ExecutionContextId | undefined; - } - /** - * Number of milliseconds since epoch. - */ - type Timestamp = number; - /** - * Stack entry for runtime errors and assertions. - */ - interface CallFrame { - /** - * JavaScript function name. - */ - functionName: string; - /** - * JavaScript script id. - */ - scriptId: ScriptId; - /** - * JavaScript script name or url. - */ - url: string; - /** - * JavaScript script line number (0-based). - */ - lineNumber: number; - /** - * JavaScript script column number (0-based). - */ - columnNumber: number; - } - /** - * Call frames for assertions or error messages. - */ - interface StackTrace { - /** - * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. - */ - description?: string | undefined; - /** - * JavaScript function name. - */ - callFrames: CallFrame[]; - /** - * Asynchronous JavaScript stack trace that preceded this stack, if available. - */ - parent?: StackTrace | undefined; - /** - * Asynchronous JavaScript stack trace that preceded this stack, if available. - * @experimental - */ - parentId?: StackTraceId | undefined; - } - /** - * Unique identifier of current debugger. - * @experimental - */ - type UniqueDebuggerId = string; - /** - * If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages. - * @experimental - */ - interface StackTraceId { - id: string; - debuggerId?: UniqueDebuggerId | undefined; - } - interface EvaluateParameterType { - /** - * Expression to evaluate. - */ - expression: string; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string | undefined; - /** - * Determines whether Command Line API should be available during the evaluation. - */ - includeCommandLineAPI?: boolean | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. - */ - contextId?: ExecutionContextId | undefined; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean | undefined; - /** - * Whether execution should be treated as initiated by user in the UI. - */ - userGesture?: boolean | undefined; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean | undefined; - } - interface AwaitPromiseParameterType { - /** - * Identifier of the promise. - */ - promiseObjectId: RemoteObjectId; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean | undefined; - } - interface CallFunctionOnParameterType { - /** - * Declaration of the function to call. - */ - functionDeclaration: string; - /** - * Identifier of the object to call function on. Either objectId or executionContextId should be specified. - */ - objectId?: RemoteObjectId | undefined; - /** - * Call arguments. All call arguments must belong to the same JavaScript world as the target object. - */ - arguments?: CallArgument[] | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Whether the result is expected to be a JSON object which should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean | undefined; - /** - * Whether execution should be treated as initiated by user in the UI. - */ - userGesture?: boolean | undefined; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean | undefined; - /** - * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. - */ - executionContextId?: ExecutionContextId | undefined; - /** - * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. - */ - objectGroup?: string | undefined; - } - interface GetPropertiesParameterType { - /** - * Identifier of the object to return properties for. - */ - objectId: RemoteObjectId; - /** - * If true, returns properties belonging only to the element itself, not to its prototype chain. - */ - ownProperties?: boolean | undefined; - /** - * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. - * @experimental - */ - accessorPropertiesOnly?: boolean | undefined; - /** - * Whether preview should be generated for the results. - * @experimental - */ - generatePreview?: boolean | undefined; - } - interface ReleaseObjectParameterType { - /** - * Identifier of the object to release. - */ - objectId: RemoteObjectId; - } - interface ReleaseObjectGroupParameterType { - /** - * Symbolic object group name. - */ - objectGroup: string; - } - interface SetCustomObjectFormatterEnabledParameterType { - enabled: boolean; - } - interface CompileScriptParameterType { - /** - * Expression to compile. - */ - expression: string; - /** - * Source url to be set for the script. - */ - sourceURL: string; - /** - * Specifies whether the compiled script should be persisted. - */ - persistScript: boolean; - /** - * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. - */ - executionContextId?: ExecutionContextId | undefined; - } - interface RunScriptParameterType { - /** - * Id of the script to run. - */ - scriptId: ScriptId; - /** - * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. - */ - executionContextId?: ExecutionContextId | undefined; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Determines whether Command Line API should be available during the evaluation. - */ - includeCommandLineAPI?: boolean | undefined; - /** - * Whether the result is expected to be a JSON object which should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean | undefined; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean | undefined; - } - interface QueryObjectsParameterType { - /** - * Identifier of the prototype to return objects for. - */ - prototypeObjectId: RemoteObjectId; - } - interface GlobalLexicalScopeNamesParameterType { - /** - * Specifies in which execution context to lookup global scope variables. - */ - executionContextId?: ExecutionContextId | undefined; - } - interface EvaluateReturnType { - /** - * Evaluation result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface AwaitPromiseReturnType { - /** - * Promise result. Will contain rejected value if promise was rejected. - */ - result: RemoteObject; - /** - * Exception details if stack strace is available. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface CallFunctionOnReturnType { - /** - * Call result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface GetPropertiesReturnType { - /** - * Object properties. - */ - result: PropertyDescriptor[]; - /** - * Internal object properties (only of the element itself). - */ - internalProperties?: InternalPropertyDescriptor[] | undefined; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface CompileScriptReturnType { - /** - * Id of the script. - */ - scriptId?: ScriptId | undefined; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface RunScriptReturnType { - /** - * Run result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface QueryObjectsReturnType { - /** - * Array with objects. - */ - objects: RemoteObject; - } - interface GlobalLexicalScopeNamesReturnType { - names: string[]; - } - interface ExecutionContextCreatedEventDataType { - /** - * A newly created execution context. - */ - context: ExecutionContextDescription; - } - interface ExecutionContextDestroyedEventDataType { - /** - * Id of the destroyed context - */ - executionContextId: ExecutionContextId; - } - interface ExceptionThrownEventDataType { - /** - * Timestamp of the exception. - */ - timestamp: Timestamp; - exceptionDetails: ExceptionDetails; - } - interface ExceptionRevokedEventDataType { - /** - * Reason describing why exception was revoked. - */ - reason: string; - /** - * The id of revoked exception, as reported in exceptionThrown. - */ - exceptionId: number; - } - interface ConsoleAPICalledEventDataType { - /** - * Type of the call. - */ - type: string; - /** - * Call arguments. - */ - args: RemoteObject[]; - /** - * Identifier of the context where the call was made. - */ - executionContextId: ExecutionContextId; - /** - * Call timestamp. - */ - timestamp: Timestamp; - /** - * Stack trace captured when the call was made. - */ - stackTrace?: StackTrace | undefined; - /** - * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. - * @experimental - */ - context?: string | undefined; - } - interface InspectRequestedEventDataType { - object: RemoteObject; - hints: object; - } - } - namespace Debugger { - /** - * Breakpoint identifier. - */ - type BreakpointId = string; - /** - * Call frame identifier. - */ - type CallFrameId = string; - /** - * Location in the source code. - */ - interface Location { - /** - * Script identifier as reported in the Debugger.scriptParsed. - */ - scriptId: Runtime.ScriptId; - /** - * Line number in the script (0-based). - */ - lineNumber: number; - /** - * Column number in the script (0-based). - */ - columnNumber?: number | undefined; - } - /** - * Location in the source code. - * @experimental - */ - interface ScriptPosition { - lineNumber: number; - columnNumber: number; - } - /** - * JavaScript call frame. Array of call frames form the call stack. - */ - interface CallFrame { - /** - * Call frame identifier. This identifier is only valid while the virtual machine is paused. - */ - callFrameId: CallFrameId; - /** - * Name of the JavaScript function called on this call frame. - */ - functionName: string; - /** - * Location in the source code. - */ - functionLocation?: Location | undefined; - /** - * Location in the source code. - */ - location: Location; - /** - * JavaScript script name or url. - */ - url: string; - /** - * Scope chain for this call frame. - */ - scopeChain: Scope[]; - /** - * this object for this call frame. - */ - this: Runtime.RemoteObject; - /** - * The value being returned, if the function is at return point. - */ - returnValue?: Runtime.RemoteObject | undefined; - } - /** - * Scope description. - */ - interface Scope { - /** - * Scope type. - */ - type: string; - /** - * Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. - */ - object: Runtime.RemoteObject; - name?: string | undefined; - /** - * Location in the source code where scope starts - */ - startLocation?: Location | undefined; - /** - * Location in the source code where scope ends - */ - endLocation?: Location | undefined; - } - /** - * Search match for resource. - */ - interface SearchMatch { - /** - * Line number in resource content. - */ - lineNumber: number; - /** - * Line with match content. - */ - lineContent: string; - } - interface BreakLocation { - /** - * Script identifier as reported in the Debugger.scriptParsed. - */ - scriptId: Runtime.ScriptId; - /** - * Line number in the script (0-based). - */ - lineNumber: number; - /** - * Column number in the script (0-based). - */ - columnNumber?: number | undefined; - type?: string | undefined; - } - interface SetBreakpointsActiveParameterType { - /** - * New value for breakpoints active state. - */ - active: boolean; - } - interface SetSkipAllPausesParameterType { - /** - * New value for skip pauses state. - */ - skip: boolean; - } - interface SetBreakpointByUrlParameterType { - /** - * Line number to set breakpoint at. - */ - lineNumber: number; - /** - * URL of the resources to set breakpoint on. - */ - url?: string | undefined; - /** - * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. - */ - urlRegex?: string | undefined; - /** - * Script hash of the resources to set breakpoint on. - */ - scriptHash?: string | undefined; - /** - * Offset in the line to set breakpoint at. - */ - columnNumber?: number | undefined; - /** - * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. - */ - condition?: string | undefined; - } - interface SetBreakpointParameterType { - /** - * Location to set breakpoint in. - */ - location: Location; - /** - * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. - */ - condition?: string | undefined; - } - interface RemoveBreakpointParameterType { - breakpointId: BreakpointId; - } - interface GetPossibleBreakpointsParameterType { - /** - * Start of range to search possible breakpoint locations in. - */ - start: Location; - /** - * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. - */ - end?: Location | undefined; - /** - * Only consider locations which are in the same (non-nested) function as start. - */ - restrictToFunction?: boolean | undefined; - } - interface ContinueToLocationParameterType { - /** - * Location to continue to. - */ - location: Location; - targetCallFrames?: string | undefined; - } - interface PauseOnAsyncCallParameterType { - /** - * Debugger will pause when async call with given stack trace is started. - */ - parentStackTraceId: Runtime.StackTraceId; - } - interface StepIntoParameterType { - /** - * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause. - * @experimental - */ - breakOnAsyncCall?: boolean | undefined; - } - interface GetStackTraceParameterType { - stackTraceId: Runtime.StackTraceId; - } - interface SearchInContentParameterType { - /** - * Id of the script to search in. - */ - scriptId: Runtime.ScriptId; - /** - * String to search for. - */ - query: string; - /** - * If true, search is case sensitive. - */ - caseSensitive?: boolean | undefined; - /** - * If true, treats string parameter as regex. - */ - isRegex?: boolean | undefined; - } - interface SetScriptSourceParameterType { - /** - * Id of the script to edit. - */ - scriptId: Runtime.ScriptId; - /** - * New content of the script. - */ - scriptSource: string; - /** - * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. - */ - dryRun?: boolean | undefined; - } - interface RestartFrameParameterType { - /** - * Call frame identifier to evaluate on. - */ - callFrameId: CallFrameId; - } - interface GetScriptSourceParameterType { - /** - * Id of the script to get source for. - */ - scriptId: Runtime.ScriptId; - } - interface SetPauseOnExceptionsParameterType { - /** - * Pause on exceptions mode. - */ - state: string; - } - interface EvaluateOnCallFrameParameterType { - /** - * Call frame identifier to evaluate on. - */ - callFrameId: CallFrameId; - /** - * Expression to evaluate. - */ - expression: string; - /** - * String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). - */ - objectGroup?: string | undefined; - /** - * Specifies whether command line API should be available to the evaluated expression, defaults to false. - */ - includeCommandLineAPI?: boolean | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean | undefined; - /** - * Whether to throw an exception if side effect cannot be ruled out during evaluation. - */ - throwOnSideEffect?: boolean | undefined; - } - interface SetVariableValueParameterType { - /** - * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. - */ - scopeNumber: number; - /** - * Variable name. - */ - variableName: string; - /** - * New variable value. - */ - newValue: Runtime.CallArgument; - /** - * Id of callframe that holds variable. - */ - callFrameId: CallFrameId; - } - interface SetReturnValueParameterType { - /** - * New return value. - */ - newValue: Runtime.CallArgument; - } - interface SetAsyncCallStackDepthParameterType { - /** - * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). - */ - maxDepth: number; - } - interface SetBlackboxPatternsParameterType { - /** - * Array of regexps that will be used to check script url for blackbox state. - */ - patterns: string[]; - } - interface SetBlackboxedRangesParameterType { - /** - * Id of the script. - */ - scriptId: Runtime.ScriptId; - positions: ScriptPosition[]; - } - interface EnableReturnType { - /** - * Unique identifier of the debugger. - * @experimental - */ - debuggerId: Runtime.UniqueDebuggerId; - } - interface SetBreakpointByUrlReturnType { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - /** - * List of the locations this breakpoint resolved into upon addition. - */ - locations: Location[]; - } - interface SetBreakpointReturnType { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - /** - * Location this breakpoint resolved into. - */ - actualLocation: Location; - } - interface GetPossibleBreakpointsReturnType { - /** - * List of the possible breakpoint locations. - */ - locations: BreakLocation[]; - } - interface GetStackTraceReturnType { - stackTrace: Runtime.StackTrace; - } - interface SearchInContentReturnType { - /** - * List of search matches. - */ - result: SearchMatch[]; - } - interface SetScriptSourceReturnType { - /** - * New stack trace in case editing has happened while VM was stopped. - */ - callFrames?: CallFrame[] | undefined; - /** - * Whether current call stack was modified after applying the changes. - */ - stackChanged?: boolean | undefined; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace | undefined; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId | undefined; - /** - * Exception details if any. - */ - exceptionDetails?: Runtime.ExceptionDetails | undefined; - } - interface RestartFrameReturnType { - /** - * New stack trace. - */ - callFrames: CallFrame[]; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace | undefined; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId | undefined; - } - interface GetScriptSourceReturnType { - /** - * Script source. - */ - scriptSource: string; - } - interface EvaluateOnCallFrameReturnType { - /** - * Object wrapper for the evaluation result. - */ - result: Runtime.RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: Runtime.ExceptionDetails | undefined; - } - interface ScriptParsedEventDataType { - /** - * Identifier of the script parsed. - */ - scriptId: Runtime.ScriptId; - /** - * URL or name of the script parsed (if any). - */ - url: string; - /** - * Line offset of the script within the resource with given URL (for script tags). - */ - startLine: number; - /** - * Column offset of the script within the resource with given URL. - */ - startColumn: number; - /** - * Last line of the script. - */ - endLine: number; - /** - * Length of the last line of the script. - */ - endColumn: number; - /** - * Specifies script creation context. - */ - executionContextId: Runtime.ExecutionContextId; - /** - * Content hash of the script. - */ - hash: string; - /** - * Embedder-specific auxiliary data. - */ - executionContextAuxData?: object | undefined; - /** - * True, if this script is generated as a result of the live edit operation. - * @experimental - */ - isLiveEdit?: boolean | undefined; - /** - * URL of source map associated with script (if any). - */ - sourceMapURL?: string | undefined; - /** - * True, if this script has sourceURL. - */ - hasSourceURL?: boolean | undefined; - /** - * True, if this script is ES6 module. - */ - isModule?: boolean | undefined; - /** - * This script length. - */ - length?: number | undefined; - /** - * JavaScript top stack frame of where the script parsed event was triggered if available. - * @experimental - */ - stackTrace?: Runtime.StackTrace | undefined; - } - interface ScriptFailedToParseEventDataType { - /** - * Identifier of the script parsed. - */ - scriptId: Runtime.ScriptId; - /** - * URL or name of the script parsed (if any). - */ - url: string; - /** - * Line offset of the script within the resource with given URL (for script tags). - */ - startLine: number; - /** - * Column offset of the script within the resource with given URL. - */ - startColumn: number; - /** - * Last line of the script. - */ - endLine: number; - /** - * Length of the last line of the script. - */ - endColumn: number; - /** - * Specifies script creation context. - */ - executionContextId: Runtime.ExecutionContextId; - /** - * Content hash of the script. - */ - hash: string; - /** - * Embedder-specific auxiliary data. - */ - executionContextAuxData?: object | undefined; - /** - * URL of source map associated with script (if any). - */ - sourceMapURL?: string | undefined; - /** - * True, if this script has sourceURL. - */ - hasSourceURL?: boolean | undefined; - /** - * True, if this script is ES6 module. - */ - isModule?: boolean | undefined; - /** - * This script length. - */ - length?: number | undefined; - /** - * JavaScript top stack frame of where the script parsed event was triggered if available. - * @experimental - */ - stackTrace?: Runtime.StackTrace | undefined; - } - interface BreakpointResolvedEventDataType { - /** - * Breakpoint unique identifier. - */ - breakpointId: BreakpointId; - /** - * Actual breakpoint location. - */ - location: Location; - } - interface PausedEventDataType { - /** - * Call stack the virtual machine stopped on. - */ - callFrames: CallFrame[]; - /** - * Pause reason. - */ - reason: string; - /** - * Object containing break-specific auxiliary properties. - */ - data?: object | undefined; - /** - * Hit breakpoints IDs - */ - hitBreakpoints?: string[] | undefined; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace | undefined; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId | undefined; - /** - * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag. - * @experimental - */ - asyncCallStackTraceId?: Runtime.StackTraceId | undefined; - } - } - namespace Console { - /** - * Console message. - */ - interface ConsoleMessage { - /** - * Message source. - */ - source: string; - /** - * Message severity. - */ - level: string; - /** - * Message text. - */ - text: string; - /** - * URL of the message origin. - */ - url?: string | undefined; - /** - * Line number in the resource that generated this message (1-based). - */ - line?: number | undefined; - /** - * Column number in the resource that generated this message (1-based). - */ - column?: number | undefined; - } - interface MessageAddedEventDataType { - /** - * Console message that has been added. - */ - message: ConsoleMessage; - } - } - namespace Profiler { - /** - * Profile node. Holds callsite information, execution statistics and child nodes. - */ - interface ProfileNode { - /** - * Unique id of the node. - */ - id: number; - /** - * Function location. - */ - callFrame: Runtime.CallFrame; - /** - * Number of samples where this node was on top of the call stack. - */ - hitCount?: number | undefined; - /** - * Child node ids. - */ - children?: number[] | undefined; - /** - * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. - */ - deoptReason?: string | undefined; - /** - * An array of source position ticks. - */ - positionTicks?: PositionTickInfo[] | undefined; - } - /** - * Profile. - */ - interface Profile { - /** - * The list of profile nodes. First item is the root node. - */ - nodes: ProfileNode[]; - /** - * Profiling start timestamp in microseconds. - */ - startTime: number; - /** - * Profiling end timestamp in microseconds. - */ - endTime: number; - /** - * Ids of samples top nodes. - */ - samples?: number[] | undefined; - /** - * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. - */ - timeDeltas?: number[] | undefined; - } - /** - * Specifies a number of samples attributed to a certain source position. - */ - interface PositionTickInfo { - /** - * Source line number (1-based). - */ - line: number; - /** - * Number of samples attributed to the source line. - */ - ticks: number; - } - /** - * Coverage data for a source range. - */ - interface CoverageRange { - /** - * JavaScript script source offset for the range start. - */ - startOffset: number; - /** - * JavaScript script source offset for the range end. - */ - endOffset: number; - /** - * Collected execution count of the source range. - */ - count: number; - } - /** - * Coverage data for a JavaScript function. - */ - interface FunctionCoverage { - /** - * JavaScript function name. - */ - functionName: string; - /** - * Source ranges inside the function with coverage data. - */ - ranges: CoverageRange[]; - /** - * Whether coverage data for this function has block granularity. - */ - isBlockCoverage: boolean; - } - /** - * Coverage data for a JavaScript script. - */ - interface ScriptCoverage { - /** - * JavaScript script id. - */ - scriptId: Runtime.ScriptId; - /** - * JavaScript script name or url. - */ - url: string; - /** - * Functions contained in the script that has coverage data. - */ - functions: FunctionCoverage[]; - } - interface SetSamplingIntervalParameterType { - /** - * New sampling interval in microseconds. - */ - interval: number; - } - interface StartPreciseCoverageParameterType { - /** - * Collect accurate call counts beyond simple 'covered' or 'not covered'. - */ - callCount?: boolean | undefined; - /** - * Collect block-based coverage. - */ - detailed?: boolean | undefined; - } - interface StopReturnType { - /** - * Recorded profile. - */ - profile: Profile; - } - interface TakePreciseCoverageReturnType { - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - } - interface GetBestEffortCoverageReturnType { - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - } - interface ConsoleProfileStartedEventDataType { - id: string; - /** - * Location of console.profile(). - */ - location: Debugger.Location; - /** - * Profile title passed as an argument to console.profile(). - */ - title?: string | undefined; - } - interface ConsoleProfileFinishedEventDataType { - id: string; - /** - * Location of console.profileEnd(). - */ - location: Debugger.Location; - profile: Profile; - /** - * Profile title passed as an argument to console.profile(). - */ - title?: string | undefined; - } - } - namespace HeapProfiler { - /** - * Heap snapshot object id. - */ - type HeapSnapshotObjectId = string; - /** - * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. - */ - interface SamplingHeapProfileNode { - /** - * Function location. - */ - callFrame: Runtime.CallFrame; - /** - * Allocations size in bytes for the node excluding children. - */ - selfSize: number; - /** - * Child nodes. - */ - children: SamplingHeapProfileNode[]; - } - /** - * Profile. - */ - interface SamplingHeapProfile { - head: SamplingHeapProfileNode; - } - interface StartTrackingHeapObjectsParameterType { - trackAllocations?: boolean | undefined; - } - interface StopTrackingHeapObjectsParameterType { - /** - * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. - */ - reportProgress?: boolean | undefined; - } - interface TakeHeapSnapshotParameterType { - /** - * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. - */ - reportProgress?: boolean | undefined; - } - interface GetObjectByHeapObjectIdParameterType { - objectId: HeapSnapshotObjectId; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string | undefined; - } - interface AddInspectedHeapObjectParameterType { - /** - * Heap snapshot object id to be accessible by means of $x command line API. - */ - heapObjectId: HeapSnapshotObjectId; - } - interface GetHeapObjectIdParameterType { - /** - * Identifier of the object to get heap object id for. - */ - objectId: Runtime.RemoteObjectId; - } - interface StartSamplingParameterType { - /** - * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. - */ - samplingInterval?: number | undefined; - } - interface GetObjectByHeapObjectIdReturnType { - /** - * Evaluation result. - */ - result: Runtime.RemoteObject; - } - interface GetHeapObjectIdReturnType { - /** - * Id of the heap snapshot object corresponding to the passed remote object id. - */ - heapSnapshotObjectId: HeapSnapshotObjectId; - } - interface StopSamplingReturnType { - /** - * Recorded sampling heap profile. - */ - profile: SamplingHeapProfile; - } - interface GetSamplingProfileReturnType { - /** - * Return the sampling profile being collected. - */ - profile: SamplingHeapProfile; - } - interface AddHeapSnapshotChunkEventDataType { - chunk: string; - } - interface ReportHeapSnapshotProgressEventDataType { - done: number; - total: number; - finished?: boolean | undefined; - } - interface LastSeenObjectIdEventDataType { - lastSeenObjectId: number; - timestamp: number; - } - interface HeapStatsUpdateEventDataType { - /** - * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. - */ - statsUpdate: number[]; - } - } - namespace IO { - type StreamHandle = string; - interface ReadParameterType { - /** - * Handle of the stream to read. - */ - handle: StreamHandle; - /** - * Seek to the specified offset before reading (if not specified, proceed with offset - * following the last read). Some types of streams may only support sequential reads. - */ - offset?: number | undefined; - /** - * Maximum number of bytes to read (left upon the agent discretion if not specified). - */ - size?: number | undefined; - } - interface CloseParameterType { - /** - * Handle of the stream to close. - */ - handle: StreamHandle; - } - interface ReadReturnType { - /** - * Data that were read. - */ - data: string; - /** - * Set if the end-of-file condition occurred while reading. - */ - eof: boolean; - } - } - namespace Network { - /** - * Resource type as it was perceived by the rendering engine. - */ - type ResourceType = string; - /** - * Unique request identifier. - */ - type RequestId = string; - /** - * UTC time in seconds, counted from January 1, 1970. - */ - type TimeSinceEpoch = number; - /** - * Monotonically increasing time in seconds since an arbitrary point in the past. - */ - type MonotonicTime = number; - /** - * Information about the request initiator. - */ - interface Initiator { - /** - * Type of this initiator. - */ - type: string; - /** - * Initiator JavaScript stack trace, set for Script only. - * Requires the Debugger domain to be enabled. - */ - stack?: Runtime.StackTrace | undefined; - /** - * Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type. - */ - url?: string | undefined; - /** - * Initiator line number, set for Parser type or for Script type (when script is importing - * module) (0-based). - */ - lineNumber?: number | undefined; - /** - * Initiator column number, set for Parser type or for Script type (when script is importing - * module) (0-based). - */ - columnNumber?: number | undefined; - /** - * Set if another request triggered this request (e.g. preflight). - */ - requestId?: RequestId | undefined; - } - /** - * HTTP request data. - */ - interface Request { - url: string; - method: string; - headers: Headers; - hasPostData: boolean; - } - /** - * HTTP response data. - */ - interface Response { - url: string; - status: number; - statusText: string; - headers: Headers; - mimeType: string; - charset: string; - } - /** - * Request / response headers as keys / values of JSON object. - */ - interface Headers { - } - interface LoadNetworkResourcePageResult { - success: boolean; - stream?: IO.StreamHandle | undefined; - } - /** - * WebSocket response data. - */ - interface WebSocketResponse { - /** - * HTTP response status code. - */ - status: number; - /** - * HTTP response status text. - */ - statusText: string; - /** - * HTTP response headers. - */ - headers: Headers; - } - interface EnableParameterType { - /** - * Buffer size in bytes to use when preserving network payloads (XHRs, etc). - * @experimental - */ - maxTotalBufferSize?: number | undefined; - /** - * Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc). - * @experimental - */ - maxResourceBufferSize?: number | undefined; - } - interface GetRequestPostDataParameterType { - /** - * Identifier of the network request to get content for. - */ - requestId: RequestId; - } - interface GetResponseBodyParameterType { - /** - * Identifier of the network request to get content for. - */ - requestId: RequestId; - } - interface StreamResourceContentParameterType { - /** - * Identifier of the request to stream. - */ - requestId: RequestId; - } - interface LoadNetworkResourceParameterType { - /** - * URL of the resource to get content for. - */ - url: string; - } - interface GetRequestPostDataReturnType { - /** - * Request body string, omitting files from multipart requests - */ - postData: string; - } - interface GetResponseBodyReturnType { - /** - * Response body. - */ - body: string; - /** - * True, if content was sent as base64. - */ - base64Encoded: boolean; - } - interface StreamResourceContentReturnType { - /** - * Data that has been buffered until streaming is enabled. - */ - bufferedData: string; - } - interface LoadNetworkResourceReturnType { - resource: LoadNetworkResourcePageResult; - } - interface RequestWillBeSentEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Request data. - */ - request: Request; - /** - * Request initiator. - */ - initiator: Initiator; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * Timestamp. - */ - wallTime: TimeSinceEpoch; - } - interface ResponseReceivedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * Resource type. - */ - type: ResourceType; - /** - * Response data. - */ - response: Response; - } - interface LoadingFailedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * Resource type. - */ - type: ResourceType; - /** - * Error message. - */ - errorText: string; - } - interface LoadingFinishedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - } - interface DataReceivedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * Data chunk length. - */ - dataLength: number; - /** - * Actual bytes received (might be less than dataLength for compressed encodings). - */ - encodedDataLength: number; - /** - * Data that was received. - * @experimental - */ - data?: string | undefined; - } - interface WebSocketCreatedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * WebSocket request URL. - */ - url: string; - /** - * Request initiator. - */ - initiator: Initiator; - } - interface WebSocketClosedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - } - interface WebSocketHandshakeResponseReceivedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * WebSocket response data. - */ - response: WebSocketResponse; - } - } - namespace NodeRuntime { - interface NotifyWhenWaitingForDisconnectParameterType { - enabled: boolean; - } - } - namespace NodeTracing { - interface TraceConfig { - /** - * Controls how the trace buffer stores data. - */ - recordMode?: string | undefined; - /** - * Included category filters. - */ - includedCategories: string[]; - } - interface StartParameterType { - traceConfig: TraceConfig; - } - interface GetCategoriesReturnType { - /** - * A list of supported tracing categories. - */ - categories: string[]; - } - interface DataCollectedEventDataType { - value: object[]; - } - } - namespace NodeWorker { - type WorkerID = string; - /** - * Unique identifier of attached debugging session. - */ - type SessionID = string; - interface WorkerInfo { - workerId: WorkerID; - type: string; - title: string; - url: string; - } - interface SendMessageToWorkerParameterType { - message: string; - /** - * Identifier of the session. - */ - sessionId: SessionID; - } - interface EnableParameterType { - /** - * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` - * message to run them. - */ - waitForDebuggerOnStart: boolean; - } - interface DetachParameterType { - sessionId: SessionID; - } - interface AttachedToWorkerEventDataType { - /** - * Identifier assigned to the session used to send/receive messages. - */ - sessionId: SessionID; - workerInfo: WorkerInfo; - waitingForDebugger: boolean; - } - interface DetachedFromWorkerEventDataType { - /** - * Detached session identifier. - */ - sessionId: SessionID; - } - interface ReceivedMessageFromWorkerEventDataType { - /** - * Identifier of a session which sends a message. - */ - sessionId: SessionID; - message: string; - } - } - namespace Target { - type SessionID = string; - type TargetID = string; - interface TargetInfo { - targetId: TargetID; - type: string; - title: string; - url: string; - attached: boolean; - canAccessOpener: boolean; - } - interface SetAutoAttachParameterType { - autoAttach: boolean; - waitForDebuggerOnStart: boolean; - } - interface GetTargetsReturnType { - targetInfos: TargetInfo[]; - } - interface TargetCreatedEventDataType { - targetInfo: TargetInfo; - } - interface AttachedToTargetEventDataType { - sessionId: SessionID; - targetInfo: TargetInfo; - waitingForDebugger: boolean; - } - } - namespace DOMStorage { - type SerializedStorageKey = string; - /** - * DOM Storage identifier. - */ - interface StorageId { - /** - * Security origin for the storage. - */ - securityOrigin?: string | undefined; - /** - * Represents a key by which DOM Storage keys its CachedStorageAreas - */ - storageKey?: SerializedStorageKey | undefined; - /** - * Whether the storage is local storage (not session storage). - */ - isLocalStorage: boolean; - } - /** - * DOM Storage item. - */ - type Item = string[]; - interface ClearParameterType { - storageId: StorageId; - } - interface GetDOMStorageItemsParameterType { - storageId: StorageId; - } - interface RemoveDOMStorageItemParameterType { - storageId: StorageId; - key: string; - } - interface SetDOMStorageItemParameterType { - storageId: StorageId; - key: string; - value: string; - } - interface GetDOMStorageItemsReturnType { - entries: Item[]; - } - interface DomStorageItemAddedEventDataType { - storageId: StorageId; - key: string; - newValue: string; - } - interface DomStorageItemRemovedEventDataType { - storageId: StorageId; - key: string; - } - interface DomStorageItemUpdatedEventDataType { - storageId: StorageId; - key: string; - oldValue: string; - newValue: string; - } - interface DomStorageItemsClearedEventDataType { - storageId: StorageId; - } - } - namespace Storage { - type SerializedStorageKey = string; - interface GetStorageKeyParameterType { - frameId?: string | undefined; - } - interface GetStorageKeyReturnType { - storageKey: SerializedStorageKey; - } - } - interface Session { - /** - * Posts a message to the inspector back-end. `callback` will be notified when - * a response is received. `callback` is a function that accepts two optional - * arguments: error and message-specific result. - * - * ```js - * session.post('Runtime.evaluate', { expression: '2 + 2' }, - * (error, { result }) => console.log(result)); - * // Output: { type: 'number', value: 4, description: '4' } - * ``` - * - * The latest version of the V8 inspector protocol is published on the - * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). - * - * Node.js inspector supports all the Chrome DevTools Protocol domains declared - * by V8. Chrome DevTools Protocol domain provides an interface for interacting - * with one of the runtime agents used to inspect the application state and listen - * to the run-time events. - */ - post(method: string, callback?: (err: Error | null, params?: object) => void): void; - post(method: string, params?: object, callback?: (err: Error | null, params?: object) => void): void; - /** - * Returns supported domains. - */ - post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; - /** - * Evaluates expression on global object. - */ - post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; - post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; - /** - * Add handler to promise with given promise object id. - */ - post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; - post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; - /** - * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. - */ - post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; - post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; - /** - * Returns properties of a given object. Object group of the result is inherited from the target object. - */ - post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; - post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; - /** - * Releases remote object with given id. - */ - post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; - post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void; - /** - * Releases all remote objects that belong to a given group. - */ - post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; - post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void; - /** - * Tells inspected instance to run if it was waiting for debugger to attach. - */ - post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void; - /** - * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. - */ - post(method: "Runtime.enable", callback?: (err: Error | null) => void): void; - /** - * Disables reporting of execution contexts creation. - */ - post(method: "Runtime.disable", callback?: (err: Error | null) => void): void; - /** - * Discards collected exceptions and console API calls. - */ - post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void; - /** - * @experimental - */ - post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; - post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void; - /** - * Compiles expression. - */ - post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; - post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; - /** - * Runs script with given id in a given context. - */ - post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; - post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; - post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; - post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; - /** - * Returns all let, const and class variables from global scope. - */ - post( - method: "Runtime.globalLexicalScopeNames", - params?: Runtime.GlobalLexicalScopeNamesParameterType, - callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void - ): void; - post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; - /** - * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. - */ - post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; - /** - * Disables debugger for given page. - */ - post(method: "Debugger.disable", callback?: (err: Error | null) => void): void; - /** - * Activates / deactivates all breakpoints on the page. - */ - post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void; - /** - * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). - */ - post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void; - /** - * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. - */ - post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; - post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; - /** - * Sets JavaScript breakpoint at a given location. - */ - post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; - post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; - /** - * Removes JavaScript breakpoint. - */ - post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void; - /** - * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. - */ - post( - method: "Debugger.getPossibleBreakpoints", - params?: Debugger.GetPossibleBreakpointsParameterType, - callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void - ): void; - post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; - /** - * Continues execution until specific location is reached. - */ - post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void; - /** - * @experimental - */ - post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void; - /** - * Steps over the statement. - */ - post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void; - /** - * Steps into the function call. - */ - post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void; - /** - * Steps out of the function call. - */ - post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void; - /** - * Stops on the next JavaScript statement. - */ - post(method: "Debugger.pause", callback?: (err: Error | null) => void): void; - /** - * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. - * @experimental - */ - post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void; - /** - * Resumes JavaScript execution. - */ - post(method: "Debugger.resume", callback?: (err: Error | null) => void): void; - /** - * Returns stack trace with given stackTraceId. - * @experimental - */ - post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; - post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; - /** - * Searches for given string in script content. - */ - post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; - post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; - /** - * Edits JavaScript source live. - */ - post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; - post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; - /** - * Restarts particular call frame from the beginning. - */ - post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; - post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; - /** - * Returns source for the script with given id. - */ - post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; - post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; - /** - * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. - */ - post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void; - /** - * Evaluates expression on a given call frame. - */ - post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; - post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; - /** - * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. - */ - post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void; - /** - * Changes return value in top frame. Available only at return break position. - * @experimental - */ - post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void; - /** - * Enables or disables async call stacks tracking. - */ - post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void; - /** - * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - * @experimental - */ - post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void; - /** - * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. - * @experimental - */ - post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void; - /** - * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. - */ - post(method: "Console.enable", callback?: (err: Error | null) => void): void; - /** - * Disables console domain, prevents further console messages from being reported to the client. - */ - post(method: "Console.disable", callback?: (err: Error | null) => void): void; - /** - * Does nothing. - */ - post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void; - post(method: "Profiler.enable", callback?: (err: Error | null) => void): void; - post(method: "Profiler.disable", callback?: (err: Error | null) => void): void; - /** - * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. - */ - post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; - post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void; - post(method: "Profiler.start", callback?: (err: Error | null) => void): void; - post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; - /** - * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. - */ - post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; - post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void; - /** - * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. - */ - post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void; - /** - * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. - */ - post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; - /** - * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. - */ - post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; - post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void; - post( - method: "HeapProfiler.getObjectByHeapObjectId", - params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, - callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void - ): void; - post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; - /** - * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). - */ - post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; - post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; - post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; - post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; - /** - * Read a chunk of the stream - */ - post(method: "IO.read", params?: IO.ReadParameterType, callback?: (err: Error | null, params: IO.ReadReturnType) => void): void; - post(method: "IO.read", callback?: (err: Error | null, params: IO.ReadReturnType) => void): void; - post(method: "IO.close", params?: IO.CloseParameterType, callback?: (err: Error | null) => void): void; - post(method: "IO.close", callback?: (err: Error | null) => void): void; - /** - * Disables network tracking, prevents network events from being sent to the client. - */ - post(method: "Network.disable", callback?: (err: Error | null) => void): void; - /** - * Enables network tracking, network events will now be delivered to the client. - */ - post(method: "Network.enable", params?: Network.EnableParameterType, callback?: (err: Error | null) => void): void; - post(method: "Network.enable", callback?: (err: Error | null) => void): void; - /** - * Returns post data sent with the request. Returns an error when no data was sent with the request. - */ - post(method: "Network.getRequestPostData", params?: Network.GetRequestPostDataParameterType, callback?: (err: Error | null, params: Network.GetRequestPostDataReturnType) => void): void; - post(method: "Network.getRequestPostData", callback?: (err: Error | null, params: Network.GetRequestPostDataReturnType) => void): void; - /** - * Returns content served for the given request. - */ - post(method: "Network.getResponseBody", params?: Network.GetResponseBodyParameterType, callback?: (err: Error | null, params: Network.GetResponseBodyReturnType) => void): void; - post(method: "Network.getResponseBody", callback?: (err: Error | null, params: Network.GetResponseBodyReturnType) => void): void; - /** - * Enables streaming of the response for the given requestId. - * If enabled, the dataReceived event contains the data that was received during streaming. - * @experimental - */ - post( - method: "Network.streamResourceContent", - params?: Network.StreamResourceContentParameterType, - callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void - ): void; - post(method: "Network.streamResourceContent", callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void): void; - /** - * Fetches the resource and returns the content. - */ - post(method: "Network.loadNetworkResource", params?: Network.LoadNetworkResourceParameterType, callback?: (err: Error | null, params: Network.LoadNetworkResourceReturnType) => void): void; - post(method: "Network.loadNetworkResource", callback?: (err: Error | null, params: Network.LoadNetworkResourceReturnType) => void): void; - /** - * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. - */ - post(method: "NodeRuntime.enable", callback?: (err: Error | null) => void): void; - /** - * Disable NodeRuntime events - */ - post(method: "NodeRuntime.disable", callback?: (err: Error | null) => void): void; - /** - * Enable the `NodeRuntime.waitingForDisconnect`. - */ - post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", callback?: (err: Error | null) => void): void; - /** - * Gets supported tracing categories. - */ - post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; - /** - * Start trace events collection. - */ - post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void; - /** - * Stop trace events collection. Remaining collected events will be sent as a sequence of - * dataCollected events followed by tracingComplete event. - */ - post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void; - /** - * Sends protocol message over session with given id. - */ - post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void; - /** - * Instructs the inspector to attach to running workers. Will also attach to new workers - * as they start - */ - post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void; - /** - * Detaches from all running workers and disables attaching to new workers as they are started. - */ - post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void; - /** - * Detached from the worker with given sessionId. - */ - post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void; - post(method: "Target.getTargets", callback?: (err: Error | null, params: Target.GetTargetsReturnType) => void): void; - post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType, callback?: (err: Error | null) => void): void; - post(method: "Target.setAutoAttach", callback?: (err: Error | null) => void): void; - post(method: "DOMStorage.clear", params?: DOMStorage.ClearParameterType, callback?: (err: Error | null) => void): void; - post(method: "DOMStorage.clear", callback?: (err: Error | null) => void): void; - /** - * Disables storage tracking, prevents storage events from being sent to the client. - */ - post(method: "DOMStorage.disable", callback?: (err: Error | null) => void): void; - /** - * Enables storage tracking, storage events will now be delivered to the client. - */ - post(method: "DOMStorage.enable", callback?: (err: Error | null) => void): void; - post( - method: "DOMStorage.getDOMStorageItems", - params?: DOMStorage.GetDOMStorageItemsParameterType, - callback?: (err: Error | null, params: DOMStorage.GetDOMStorageItemsReturnType) => void - ): void; - post(method: "DOMStorage.getDOMStorageItems", callback?: (err: Error | null, params: DOMStorage.GetDOMStorageItemsReturnType) => void): void; - post(method: "DOMStorage.removeDOMStorageItem", params?: DOMStorage.RemoveDOMStorageItemParameterType, callback?: (err: Error | null) => void): void; - post(method: "DOMStorage.removeDOMStorageItem", callback?: (err: Error | null) => void): void; - post(method: "DOMStorage.setDOMStorageItem", params?: DOMStorage.SetDOMStorageItemParameterType, callback?: (err: Error | null) => void): void; - post(method: "DOMStorage.setDOMStorageItem", callback?: (err: Error | null) => void): void; - /** - * @experimental - */ - post(method: "Storage.getStorageKey", params?: Storage.GetStorageKeyParameterType, callback?: (err: Error | null, params: Storage.GetStorageKeyReturnType) => void): void; - post(method: "Storage.getStorageKey", callback?: (err: Error | null, params: Storage.GetStorageKeyReturnType) => void): void; - addListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - addListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - addListener(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - addListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - addListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - addListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - addListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - addListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - addListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - addListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - addListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - addListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - /** - * Contains an bucket of collected trace events. - */ - addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - addListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - addListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - addListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; - addListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; - addListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; - addListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "inspectorNotification", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextsCleared"): boolean; - emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; - emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; - emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; - emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; - emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; - emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; - emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; - emit(event: "Debugger.paused", message: InspectorNotification): boolean; - emit(event: "Debugger.resumed"): boolean; - emit(event: "Console.messageAdded", message: InspectorNotification): boolean; - emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; - emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.resetProfiles"): boolean; - emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; - emit(event: "Network.requestWillBeSent", message: InspectorNotification): boolean; - emit(event: "Network.responseReceived", message: InspectorNotification): boolean; - emit(event: "Network.loadingFailed", message: InspectorNotification): boolean; - emit(event: "Network.loadingFinished", message: InspectorNotification): boolean; - emit(event: "Network.dataReceived", message: InspectorNotification): boolean; - emit(event: "Network.webSocketCreated", message: InspectorNotification): boolean; - emit(event: "Network.webSocketClosed", message: InspectorNotification): boolean; - emit(event: "Network.webSocketHandshakeResponseReceived", message: InspectorNotification): boolean; - emit(event: "NodeRuntime.waitingForDisconnect"): boolean; - emit(event: "NodeRuntime.waitingForDebugger"): boolean; - emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; - emit(event: "NodeTracing.tracingComplete"): boolean; - emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; - emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; - emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; - emit(event: "Target.targetCreated", message: InspectorNotification): boolean; - emit(event: "Target.attachedToTarget", message: InspectorNotification): boolean; - emit(event: "DOMStorage.domStorageItemAdded", message: InspectorNotification): boolean; - emit(event: "DOMStorage.domStorageItemRemoved", message: InspectorNotification): boolean; - emit(event: "DOMStorage.domStorageItemUpdated", message: InspectorNotification): boolean; - emit(event: "DOMStorage.domStorageItemsCleared", message: InspectorNotification): boolean; - on(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - on(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - on(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - on(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - on(event: "HeapProfiler.resetProfiles", listener: () => void): this; - on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - on(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - on(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - on(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - on(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - on(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - on(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - on(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - on(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - on(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - /** - * Contains an bucket of collected trace events. - */ - on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - on(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - on(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - on(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - on(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; - on(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; - on(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; - on(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - once(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - once(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - once(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - once(event: "HeapProfiler.resetProfiles", listener: () => void): this; - once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - once(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - once(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - once(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - once(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - once(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - once(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - once(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - once(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - once(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - /** - * Contains an bucket of collected trace events. - */ - once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - once(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - once(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - once(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - once(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; - once(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; - once(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; - once(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependListener(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - prependListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - prependListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - prependListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - prependListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - prependListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; - prependListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; - prependListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; - prependListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependOnceListener(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependOnceListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependOnceListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - prependOnceListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - prependOnceListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - prependOnceListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - prependOnceListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependOnceListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; - } -} -declare module "node:inspector/promises" { - export { - Schema, - Runtime, - Debugger, - Console, - Profiler, - HeapProfiler, - IO, - Network, - NodeRuntime, - NodeTracing, - NodeWorker, - Target, - DOMStorage, - Storage, - } from 'inspector'; -} -declare module "node:inspector/promises" { - import { - InspectorNotification, - Schema, - Runtime, - Debugger, - Console, - Profiler, - HeapProfiler, - IO, - Network, - NodeRuntime, - NodeTracing, - NodeWorker, - Target, - DOMStorage, - Storage, - } from "inspector"; - /** - * The `inspector.Session` is used for dispatching messages to the V8 inspector - * back-end and receiving message responses and notifications. - * @since v19.0.0 - */ - interface Session { - /** - * Posts a message to the inspector back-end. - * - * ```js - * import { Session } from 'node:inspector/promises'; - * try { - * const session = new Session(); - * session.connect(); - * const result = await session.post('Runtime.evaluate', { expression: '2 + 2' }); - * console.log(result); - * } catch (error) { - * console.error(error); - * } - * // Output: { result: { type: 'number', value: 4, description: '4' } } - * ``` - * - * The latest version of the V8 inspector protocol is published on the - * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). - * - * Node.js inspector supports all the Chrome DevTools Protocol domains declared - * by V8. Chrome DevTools Protocol domain provides an interface for interacting - * with one of the runtime agents used to inspect the application state and listen - * to the run-time events. - */ - post(method: string, params?: object): Promise; - /** - * Returns supported domains. - */ - post(method: "Schema.getDomains"): Promise; - /** - * Evaluates expression on global object. - */ - post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType): Promise; - /** - * Add handler to promise with given promise object id. - */ - post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType): Promise; - /** - * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. - */ - post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType): Promise; - /** - * Returns properties of a given object. Object group of the result is inherited from the target object. - */ - post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType): Promise; - /** - * Releases remote object with given id. - */ - post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType): Promise; - /** - * Releases all remote objects that belong to a given group. - */ - post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType): Promise; - /** - * Tells inspected instance to run if it was waiting for debugger to attach. - */ - post(method: "Runtime.runIfWaitingForDebugger"): Promise; - /** - * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. - */ - post(method: "Runtime.enable"): Promise; - /** - * Disables reporting of execution contexts creation. - */ - post(method: "Runtime.disable"): Promise; - /** - * Discards collected exceptions and console API calls. - */ - post(method: "Runtime.discardConsoleEntries"): Promise; - /** - * @experimental - */ - post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType): Promise; - /** - * Compiles expression. - */ - post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType): Promise; - /** - * Runs script with given id in a given context. - */ - post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType): Promise; - post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType): Promise; - /** - * Returns all let, const and class variables from global scope. - */ - post(method: "Runtime.globalLexicalScopeNames", params?: Runtime.GlobalLexicalScopeNamesParameterType): Promise; - /** - * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. - */ - post(method: "Debugger.enable"): Promise; - /** - * Disables debugger for given page. - */ - post(method: "Debugger.disable"): Promise; - /** - * Activates / deactivates all breakpoints on the page. - */ - post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType): Promise; - /** - * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). - */ - post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType): Promise; - /** - * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. - */ - post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType): Promise; - /** - * Sets JavaScript breakpoint at a given location. - */ - post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType): Promise; - /** - * Removes JavaScript breakpoint. - */ - post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType): Promise; - /** - * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. - */ - post(method: "Debugger.getPossibleBreakpoints", params?: Debugger.GetPossibleBreakpointsParameterType): Promise; - /** - * Continues execution until specific location is reached. - */ - post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType): Promise; - /** - * @experimental - */ - post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType): Promise; - /** - * Steps over the statement. - */ - post(method: "Debugger.stepOver"): Promise; - /** - * Steps into the function call. - */ - post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType): Promise; - /** - * Steps out of the function call. - */ - post(method: "Debugger.stepOut"): Promise; - /** - * Stops on the next JavaScript statement. - */ - post(method: "Debugger.pause"): Promise; - /** - * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. - * @experimental - */ - post(method: "Debugger.scheduleStepIntoAsync"): Promise; - /** - * Resumes JavaScript execution. - */ - post(method: "Debugger.resume"): Promise; - /** - * Returns stack trace with given stackTraceId. - * @experimental - */ - post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType): Promise; - /** - * Searches for given string in script content. - */ - post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType): Promise; - /** - * Edits JavaScript source live. - */ - post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType): Promise; - /** - * Restarts particular call frame from the beginning. - */ - post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType): Promise; - /** - * Returns source for the script with given id. - */ - post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType): Promise; - /** - * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. - */ - post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType): Promise; - /** - * Evaluates expression on a given call frame. - */ - post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType): Promise; - /** - * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. - */ - post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType): Promise; - /** - * Changes return value in top frame. Available only at return break position. - * @experimental - */ - post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType): Promise; - /** - * Enables or disables async call stacks tracking. - */ - post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType): Promise; - /** - * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - * @experimental - */ - post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType): Promise; - /** - * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. - * @experimental - */ - post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType): Promise; - /** - * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. - */ - post(method: "Console.enable"): Promise; - /** - * Disables console domain, prevents further console messages from being reported to the client. - */ - post(method: "Console.disable"): Promise; - /** - * Does nothing. - */ - post(method: "Console.clearMessages"): Promise; - post(method: "Profiler.enable"): Promise; - post(method: "Profiler.disable"): Promise; - /** - * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. - */ - post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType): Promise; - post(method: "Profiler.start"): Promise; - post(method: "Profiler.stop"): Promise; - /** - * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. - */ - post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType): Promise; - /** - * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. - */ - post(method: "Profiler.stopPreciseCoverage"): Promise; - /** - * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. - */ - post(method: "Profiler.takePreciseCoverage"): Promise; - /** - * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. - */ - post(method: "Profiler.getBestEffortCoverage"): Promise; - post(method: "HeapProfiler.enable"): Promise; - post(method: "HeapProfiler.disable"): Promise; - post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType): Promise; - post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType): Promise; - post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType): Promise; - post(method: "HeapProfiler.collectGarbage"): Promise; - post(method: "HeapProfiler.getObjectByHeapObjectId", params?: HeapProfiler.GetObjectByHeapObjectIdParameterType): Promise; - /** - * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). - */ - post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType): Promise; - post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType): Promise; - post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType): Promise; - post(method: "HeapProfiler.stopSampling"): Promise; - post(method: "HeapProfiler.getSamplingProfile"): Promise; - /** - * Read a chunk of the stream - */ - post(method: "IO.read", params?: IO.ReadParameterType): Promise; - post(method: "IO.close", params?: IO.CloseParameterType): Promise; - /** - * Disables network tracking, prevents network events from being sent to the client. - */ - post(method: "Network.disable"): Promise; - /** - * Enables network tracking, network events will now be delivered to the client. - */ - post(method: "Network.enable", params?: Network.EnableParameterType): Promise; - /** - * Returns post data sent with the request. Returns an error when no data was sent with the request. - */ - post(method: "Network.getRequestPostData", params?: Network.GetRequestPostDataParameterType): Promise; - /** - * Returns content served for the given request. - */ - post(method: "Network.getResponseBody", params?: Network.GetResponseBodyParameterType): Promise; - /** - * Enables streaming of the response for the given requestId. - * If enabled, the dataReceived event contains the data that was received during streaming. - * @experimental - */ - post(method: "Network.streamResourceContent", params?: Network.StreamResourceContentParameterType): Promise; - /** - * Fetches the resource and returns the content. - */ - post(method: "Network.loadNetworkResource", params?: Network.LoadNetworkResourceParameterType): Promise; - /** - * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. - */ - post(method: "NodeRuntime.enable"): Promise; - /** - * Disable NodeRuntime events - */ - post(method: "NodeRuntime.disable"): Promise; - /** - * Enable the `NodeRuntime.waitingForDisconnect`. - */ - post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType): Promise; - /** - * Gets supported tracing categories. - */ - post(method: "NodeTracing.getCategories"): Promise; - /** - * Start trace events collection. - */ - post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType): Promise; - /** - * Stop trace events collection. Remaining collected events will be sent as a sequence of - * dataCollected events followed by tracingComplete event. - */ - post(method: "NodeTracing.stop"): Promise; - /** - * Sends protocol message over session with given id. - */ - post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType): Promise; - /** - * Instructs the inspector to attach to running workers. Will also attach to new workers - * as they start - */ - post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType): Promise; - /** - * Detaches from all running workers and disables attaching to new workers as they are started. - */ - post(method: "NodeWorker.disable"): Promise; - /** - * Detached from the worker with given sessionId. - */ - post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType): Promise; - post(method: "Target.getTargets"): Promise; - post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType): Promise; - post(method: "DOMStorage.clear", params?: DOMStorage.ClearParameterType): Promise; - /** - * Disables storage tracking, prevents storage events from being sent to the client. - */ - post(method: "DOMStorage.disable"): Promise; - /** - * Enables storage tracking, storage events will now be delivered to the client. - */ - post(method: "DOMStorage.enable"): Promise; - post(method: "DOMStorage.getDOMStorageItems", params?: DOMStorage.GetDOMStorageItemsParameterType): Promise; - post(method: "DOMStorage.removeDOMStorageItem", params?: DOMStorage.RemoveDOMStorageItemParameterType): Promise; - post(method: "DOMStorage.setDOMStorageItem", params?: DOMStorage.SetDOMStorageItemParameterType): Promise; - /** - * @experimental - */ - post(method: "Storage.getStorageKey", params?: Storage.GetStorageKeyParameterType): Promise; - addListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - addListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - addListener(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - addListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - addListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - addListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - addListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - addListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - addListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - addListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - addListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - addListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - /** - * Contains an bucket of collected trace events. - */ - addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - addListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - addListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - addListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; - addListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; - addListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; - addListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "inspectorNotification", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextsCleared"): boolean; - emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; - emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; - emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; - emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; - emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; - emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; - emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; - emit(event: "Debugger.paused", message: InspectorNotification): boolean; - emit(event: "Debugger.resumed"): boolean; - emit(event: "Console.messageAdded", message: InspectorNotification): boolean; - emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; - emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.resetProfiles"): boolean; - emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; - emit(event: "Network.requestWillBeSent", message: InspectorNotification): boolean; - emit(event: "Network.responseReceived", message: InspectorNotification): boolean; - emit(event: "Network.loadingFailed", message: InspectorNotification): boolean; - emit(event: "Network.loadingFinished", message: InspectorNotification): boolean; - emit(event: "Network.dataReceived", message: InspectorNotification): boolean; - emit(event: "Network.webSocketCreated", message: InspectorNotification): boolean; - emit(event: "Network.webSocketClosed", message: InspectorNotification): boolean; - emit(event: "Network.webSocketHandshakeResponseReceived", message: InspectorNotification): boolean; - emit(event: "NodeRuntime.waitingForDisconnect"): boolean; - emit(event: "NodeRuntime.waitingForDebugger"): boolean; - emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; - emit(event: "NodeTracing.tracingComplete"): boolean; - emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; - emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; - emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; - emit(event: "Target.targetCreated", message: InspectorNotification): boolean; - emit(event: "Target.attachedToTarget", message: InspectorNotification): boolean; - emit(event: "DOMStorage.domStorageItemAdded", message: InspectorNotification): boolean; - emit(event: "DOMStorage.domStorageItemRemoved", message: InspectorNotification): boolean; - emit(event: "DOMStorage.domStorageItemUpdated", message: InspectorNotification): boolean; - emit(event: "DOMStorage.domStorageItemsCleared", message: InspectorNotification): boolean; - on(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - on(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - on(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - on(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - on(event: "HeapProfiler.resetProfiles", listener: () => void): this; - on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - on(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - on(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - on(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - on(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - on(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - on(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - on(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - on(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - on(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - /** - * Contains an bucket of collected trace events. - */ - on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - on(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - on(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - on(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - on(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; - on(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; - on(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; - on(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - once(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - once(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - once(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - once(event: "HeapProfiler.resetProfiles", listener: () => void): this; - once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - once(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - once(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - once(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - once(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - once(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - once(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - once(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - once(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - once(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - /** - * Contains an bucket of collected trace events. - */ - once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - once(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - once(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - once(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - once(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; - once(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; - once(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; - once(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependListener(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - prependListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - prependListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - prependListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - prependListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - prependListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; - prependListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; - prependListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; - prependListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependOnceListener(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependOnceListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependOnceListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - prependOnceListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - prependOnceListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - prependOnceListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - prependOnceListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependOnceListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; - } -} diff --git a/node_modules/@types/node/inspector/promises.d.ts b/node_modules/@types/node/inspector/promises.d.ts deleted file mode 100644 index e75ff20..0000000 --- a/node_modules/@types/node/inspector/promises.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -declare module "node:inspector/promises" { - import { EventEmitter } from "node:events"; - export { close, console, NetworkResources, open, url, waitForDebugger } from "node:inspector"; - /** - * The `inspector.Session` is used for dispatching messages to the V8 inspector - * back-end and receiving message responses and notifications. - * @since v19.0.0 - */ - export class Session extends EventEmitter { - /** - * Create a new instance of the inspector.Session class. - * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend. - */ - constructor(); - /** - * Connects a session to the inspector back-end. - */ - connect(): void; - /** - * Connects a session to the inspector back-end. - * An exception will be thrown if this API was not called on a Worker thread. - * @since v12.11.0 - */ - connectToMainThread(): void; - /** - * Immediately close the session. All pending message callbacks will be called with an error. - * `session.connect()` will need to be called to be able to send messages again. - * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. - */ - disconnect(): void; - } -} -declare module "inspector/promises" { - export * from "node:inspector/promises"; -} diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts deleted file mode 100644 index ae6c329..0000000 --- a/node_modules/@types/node/module.d.ts +++ /dev/null @@ -1,755 +0,0 @@ -declare module "node:module" { - import { URL } from "node:url"; - class Module { - constructor(id: string, parent?: Module); - } - interface Module extends NodeJS.Module {} - namespace Module { - export { Module }; - } - namespace Module { - /** - * A list of the names of all modules provided by Node.js. Can be used to verify - * if a module is maintained by a third party or not. - * - * Note: the list doesn't contain prefix-only modules like `node:test`. - * @since v9.3.0, v8.10.0, v6.13.0 - */ - const builtinModules: readonly string[]; - /** - * @since v12.2.0 - * @param path Filename to be used to construct the require - * function. Must be a file URL object, file URL string, or absolute path - * string. - */ - function createRequire(path: string | URL): NodeJS.Require; - namespace constants { - /** - * The following constants are returned as the `status` field in the object returned by - * {@link enableCompileCache} to indicate the result of the attempt to enable the - * [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache). - * @since v22.8.0 - */ - namespace compileCacheStatus { - /** - * Node.js has enabled the compile cache successfully. The directory used to store the - * compile cache will be returned in the `directory` field in the - * returned object. - */ - const ENABLED: number; - /** - * The compile cache has already been enabled before, either by a previous call to - * {@link enableCompileCache}, or by the `NODE_COMPILE_CACHE=dir` - * environment variable. The directory used to store the - * compile cache will be returned in the `directory` field in the - * returned object. - */ - const ALREADY_ENABLED: number; - /** - * Node.js fails to enable the compile cache. This can be caused by the lack of - * permission to use the specified directory, or various kinds of file system errors. - * The detail of the failure will be returned in the `message` field in the - * returned object. - */ - const FAILED: number; - /** - * Node.js cannot enable the compile cache because the environment variable - * `NODE_DISABLE_COMPILE_CACHE=1` has been set. - */ - const DISABLED: number; - } - } - interface EnableCompileCacheOptions { - /** - * Optional. Directory to store the compile cache. If not specified, - * the directory specified by the `NODE_COMPILE_CACHE=dir` environment variable - * will be used if it's set, or `path.join(os.tmpdir(), 'node-compile-cache')` - * otherwise. - * @since v25.0.0 - */ - directory?: string | undefined; - /** - * Optional. If `true`, enables portable compile cache so that - * the cache can be reused even if the project directory is moved. This is a best-effort - * feature. If not specified, it will depend on whether the environment variable - * `NODE_COMPILE_CACHE_PORTABLE=1` is set. - * @since v25.0.0 - */ - portable?: boolean | undefined; - } - interface EnableCompileCacheResult { - /** - * One of the {@link constants.compileCacheStatus} - */ - status: number; - /** - * If Node.js cannot enable the compile cache, this contains - * the error message. Only set if `status` is `module.constants.compileCacheStatus.FAILED`. - */ - message?: string; - /** - * If the compile cache is enabled, this contains the directory - * where the compile cache is stored. Only set if `status` is - * `module.constants.compileCacheStatus.ENABLED` or - * `module.constants.compileCacheStatus.ALREADY_ENABLED`. - */ - directory?: string; - } - /** - * Enable [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache) - * in the current Node.js instance. - * - * For general use cases, it's recommended to call `module.enableCompileCache()` without - * specifying the `options.directory`, so that the directory can be overridden by the - * `NODE_COMPILE_CACHE` environment variable when necessary. - * - * Since compile cache is supposed to be a optimization that is not mission critical, this - * method is designed to not throw any exception when the compile cache cannot be enabled. - * Instead, it will return an object containing an error message in the `message` field to - * aid debugging. If compile cache is enabled successfully, the `directory` field in the - * returned object contains the path to the directory where the compile cache is stored. The - * `status` field in the returned object would be one of the `module.constants.compileCacheStatus` - * values to indicate the result of the attempt to enable the - * [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache). - * - * This method only affects the current Node.js instance. To enable it in child worker threads, - * either call this method in child worker threads too, or set the - * `process.env.NODE_COMPILE_CACHE` value to compile cache directory so the behavior can - * be inherited into the child workers. The directory can be obtained either from the - * `directory` field returned by this method, or with {@link getCompileCacheDir}. - * @since v22.8.0 - * @param options Optional. If a string is passed, it is considered to be `options.directory`. - */ - function enableCompileCache(options?: string | EnableCompileCacheOptions): EnableCompileCacheResult; - /** - * Flush the [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache) - * accumulated from modules already loaded - * in the current Node.js instance to disk. This returns after all the flushing - * file system operations come to an end, no matter they succeed or not. If there - * are any errors, this will fail silently, since compile cache misses should not - * interfere with the actual operation of the application. - * @since v22.10.0 - */ - function flushCompileCache(): void; - /** - * @since v22.8.0 - * @return Path to the [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache) - * directory if it is enabled, or `undefined` otherwise. - */ - function getCompileCacheDir(): string | undefined; - /** - * ```text - * /path/to/project - * ├ packages/ - * ├ bar/ - * ├ bar.js - * └ package.json // name = '@foo/bar' - * └ qux/ - * ├ node_modules/ - * └ some-package/ - * └ package.json // name = 'some-package' - * ├ qux.js - * └ package.json // name = '@foo/qux' - * ├ main.js - * └ package.json // name = '@foo' - * ``` - * ```js - * // /path/to/project/packages/bar/bar.js - * import { findPackageJSON } from 'node:module'; - * - * findPackageJSON('..', import.meta.url); - * // '/path/to/project/package.json' - * // Same result when passing an absolute specifier instead: - * findPackageJSON(new URL('../', import.meta.url)); - * findPackageJSON(import.meta.resolve('../')); - * - * findPackageJSON('some-package', import.meta.url); - * // '/path/to/project/packages/bar/node_modules/some-package/package.json' - * // When passing an absolute specifier, you might get a different result if the - * // resolved module is inside a subfolder that has nested `package.json`. - * findPackageJSON(import.meta.resolve('some-package')); - * // '/path/to/project/packages/bar/node_modules/some-package/some-subfolder/package.json' - * - * findPackageJSON('@foo/qux', import.meta.url); - * // '/path/to/project/packages/qux/package.json' - * ``` - * @since v22.14.0 - * @param specifier The specifier for the module whose `package.json` to - * retrieve. When passing a _bare specifier_, the `package.json` at the root of - * the package is returned. When passing a _relative specifier_ or an _absolute specifier_, - * the closest parent `package.json` is returned. - * @param base The absolute location (`file:` URL string or FS path) of the - * containing module. For CJS, use `__filename` (not `__dirname`!); for ESM, use - * `import.meta.url`. You do not need to pass it if `specifier` is an _absolute specifier_. - * @returns A path if the `package.json` is found. When `startLocation` - * is a package, the package's root `package.json`; when a relative or unresolved, the closest - * `package.json` to the `startLocation`. - */ - function findPackageJSON(specifier: string | URL, base?: string | URL): string | undefined; - /** - * @since v18.6.0, v16.17.0 - */ - function isBuiltin(moduleName: string): boolean; - interface RegisterOptions { - /** - * If you want to resolve `specifier` relative to a - * base URL, such as `import.meta.url`, you can pass that URL here. This - * property is ignored if the `parentURL` is supplied as the second argument. - * @default 'data:' - */ - parentURL?: string | URL | undefined; - /** - * Any arbitrary, cloneable JavaScript value to pass into the - * {@link initialize} hook. - */ - data?: Data | undefined; - /** - * [Transferable objects](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html#portpostmessagevalue-transferlist) - * to be passed into the `initialize` hook. - */ - transferList?: any[] | undefined; - } - /* eslint-disable @definitelytyped/no-unnecessary-generics */ - /** - * Register a module that exports hooks that customize Node.js module - * resolution and loading behavior. See - * [Customization hooks](https://nodejs.org/docs/latest-v25.x/api/module.html#customization-hooks). - * - * This feature requires `--allow-worker` if used with the - * [Permission Model](https://nodejs.org/docs/latest-v25.x/api/permissions.html#permission-model). - * @since v20.6.0, v18.19.0 - * @deprecated Use `module.registerHooks()` instead. - * @param specifier Customization hooks to be registered; this should be - * the same string that would be passed to `import()`, except that if it is - * relative, it is resolved relative to `parentURL`. - * @param parentURL f you want to resolve `specifier` relative to a base - * URL, such as `import.meta.url`, you can pass that URL here. - */ - function register( - specifier: string | URL, - parentURL?: string | URL, - options?: RegisterOptions, - ): void; - function register(specifier: string | URL, options?: RegisterOptions): void; - interface RegisterHooksOptions { - /** - * See [load hook](https://nodejs.org/docs/latest-v25.x/api/module.html#loadurl-context-nextload). - * @default undefined - */ - load?: LoadHookSync | undefined; - /** - * See [resolve hook](https://nodejs.org/docs/latest-v25.x/api/module.html#resolvespecifier-context-nextresolve). - * @default undefined - */ - resolve?: ResolveHookSync | undefined; - } - interface ModuleHooks { - /** - * Deregister the hook instance. - */ - deregister(): void; - } - /** - * Register [hooks](https://nodejs.org/docs/latest-v25.x/api/module.html#customization-hooks) - * that customize Node.js module resolution and loading behavior. - * @since v22.15.0 - * @experimental - */ - function registerHooks(options: RegisterHooksOptions): ModuleHooks; - interface StripTypeScriptTypesOptions { - /** - * Possible values are: - * * `'strip'` Only strip type annotations without performing the transformation of TypeScript features. - * * `'transform'` Strip type annotations and transform TypeScript features to JavaScript. - * @default 'strip' - */ - mode?: "strip" | "transform" | undefined; - /** - * Only when `mode` is `'transform'`, if `true`, a source map - * will be generated for the transformed code. - * @default false - */ - sourceMap?: boolean | undefined; - /** - * Specifies the source url used in the source map. - */ - sourceUrl?: string | undefined; - } - /** - * `module.stripTypeScriptTypes()` removes type annotations from TypeScript code. It - * can be used to strip type annotations from TypeScript code before running it - * with `vm.runInContext()` or `vm.compileFunction()`. - * By default, it will throw an error if the code contains TypeScript features - * that require transformation such as `Enums`, - * see [type-stripping](https://nodejs.org/docs/latest-v25.x/api/typescript.md#type-stripping) for more information. - * When mode is `'transform'`, it also transforms TypeScript features to JavaScript, - * see [transform TypeScript features](https://nodejs.org/docs/latest-v25.x/api/typescript.md#typescript-features) for more information. - * When mode is `'strip'`, source maps are not generated, because locations are preserved. - * If `sourceMap` is provided, when mode is `'strip'`, an error will be thrown. - * - * _WARNING_: The output of this function should not be considered stable across Node.js versions, - * due to changes in the TypeScript parser. - * - * ```js - * import { stripTypeScriptTypes } from 'node:module'; - * const code = 'const a: number = 1;'; - * const strippedCode = stripTypeScriptTypes(code); - * console.log(strippedCode); - * // Prints: const a = 1; - * ``` - * - * If `sourceUrl` is provided, it will be used appended as a comment at the end of the output: - * - * ```js - * import { stripTypeScriptTypes } from 'node:module'; - * const code = 'const a: number = 1;'; - * const strippedCode = stripTypeScriptTypes(code, { mode: 'strip', sourceUrl: 'source.ts' }); - * console.log(strippedCode); - * // Prints: const a = 1\n\n//# sourceURL=source.ts; - * ``` - * - * When `mode` is `'transform'`, the code is transformed to JavaScript: - * - * ```js - * import { stripTypeScriptTypes } from 'node:module'; - * const code = ` - * namespace MathUtil { - * export const add = (a: number, b: number) => a + b; - * }`; - * const strippedCode = stripTypeScriptTypes(code, { mode: 'transform', sourceMap: true }); - * console.log(strippedCode); - * // Prints: - * // var MathUtil; - * // (function(MathUtil) { - * // MathUtil.add = (a, b)=>a + b; - * // })(MathUtil || (MathUtil = {})); - * // # sourceMappingURL=data:application/json;base64, ... - * ``` - * @since v22.13.0 - * @param code The code to strip type annotations from. - * @returns The code with type annotations stripped. - */ - function stripTypeScriptTypes(code: string, options?: StripTypeScriptTypesOptions): string; - /* eslint-enable @definitelytyped/no-unnecessary-generics */ - /** - * The `module.syncBuiltinESMExports()` method updates all the live bindings for - * builtin `ES Modules` to match the properties of the `CommonJS` exports. It - * does not add or remove exported names from the `ES Modules`. - * - * ```js - * import fs from 'node:fs'; - * import assert from 'node:assert'; - * import { syncBuiltinESMExports } from 'node:module'; - * - * fs.readFile = newAPI; - * - * delete fs.readFileSync; - * - * function newAPI() { - * // ... - * } - * - * fs.newAPI = newAPI; - * - * syncBuiltinESMExports(); - * - * import('node:fs').then((esmFS) => { - * // It syncs the existing readFile property with the new value - * assert.strictEqual(esmFS.readFile, newAPI); - * // readFileSync has been deleted from the required fs - * assert.strictEqual('readFileSync' in fs, false); - * // syncBuiltinESMExports() does not remove readFileSync from esmFS - * assert.strictEqual('readFileSync' in esmFS, true); - * // syncBuiltinESMExports() does not add names - * assert.strictEqual(esmFS.newAPI, undefined); - * }); - * ``` - * @since v12.12.0 - */ - function syncBuiltinESMExports(): void; - interface ImportAttributes extends NodeJS.Dict { - type?: string | undefined; - } - type ImportPhase = "source" | "evaluation"; - type ModuleFormat = - | "addon" - | "builtin" - | "commonjs" - | "commonjs-typescript" - | "json" - | "module" - | "module-typescript" - | "wasm"; - type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray; - type InitializeHook = (data: Data) => void | Promise; - interface ResolveHookContext { - conditions: string[]; - importAttributes: ImportAttributes; - parentURL: string | undefined; - } - interface ResolveFnOutput { - format?: string | null | undefined; - importAttributes?: ImportAttributes | undefined; - shortCircuit?: boolean | undefined; - url: string; - } - type ResolveHook = ( - specifier: string, - context: ResolveHookContext, - nextResolve: ( - specifier: string, - context?: Partial, - ) => ResolveFnOutput | Promise, - ) => ResolveFnOutput | Promise; - type ResolveHookSync = ( - specifier: string, - context: ResolveHookContext, - nextResolve: ( - specifier: string, - context?: Partial, - ) => ResolveFnOutput, - ) => ResolveFnOutput; - interface LoadHookContext { - conditions: string[]; - format: string | null | undefined; - importAttributes: ImportAttributes; - } - interface LoadFnOutput { - format: string | null | undefined; - shortCircuit?: boolean | undefined; - source?: ModuleSource | undefined; - } - type LoadHook = ( - url: string, - context: LoadHookContext, - nextLoad: ( - url: string, - context?: Partial, - ) => LoadFnOutput | Promise, - ) => LoadFnOutput | Promise; - type LoadHookSync = ( - url: string, - context: LoadHookContext, - nextLoad: ( - url: string, - context?: Partial, - ) => LoadFnOutput, - ) => LoadFnOutput; - interface SourceMapsSupport { - /** - * If the source maps support is enabled - */ - enabled: boolean; - /** - * If the support is enabled for files in `node_modules`. - */ - nodeModules: boolean; - /** - * If the support is enabled for generated code from `eval` or `new Function`. - */ - generatedCode: boolean; - } - /** - * This method returns whether the [Source Map v3](https://tc39.es/ecma426/) support for stack - * traces is enabled. - * @since v23.7.0, v22.14.0 - */ - function getSourceMapsSupport(): SourceMapsSupport; - /** - * `path` is the resolved path for the file for which a corresponding source map - * should be fetched. - * @since v13.7.0, v12.17.0 - * @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise. - */ - function findSourceMap(path: string): SourceMap | undefined; - interface SetSourceMapsSupportOptions { - /** - * If enabling the support for files in `node_modules`. - * @default false - */ - nodeModules?: boolean | undefined; - /** - * If enabling the support for generated code from `eval` or `new Function`. - * @default false - */ - generatedCode?: boolean | undefined; - } - /** - * This function enables or disables the [Source Map v3](https://tc39.es/ecma426/) support for - * stack traces. - * - * It provides same features as launching Node.js process with commandline options - * `--enable-source-maps`, with additional options to alter the support for files - * in `node_modules` or generated codes. - * - * Only source maps in JavaScript files that are loaded after source maps has been - * enabled will be parsed and loaded. Preferably, use the commandline options - * `--enable-source-maps` to avoid losing track of source maps of modules loaded - * before this API call. - * @since v23.7.0, v22.14.0 - */ - function setSourceMapsSupport(enabled: boolean, options?: SetSourceMapsSupportOptions): void; - interface SourceMapConstructorOptions { - /** - * @since v21.0.0, v20.5.0 - */ - lineLengths?: readonly number[] | undefined; - } - interface SourceMapPayload { - file: string; - version: number; - sources: string[]; - sourcesContent: string[]; - names: string[]; - mappings: string; - sourceRoot: string; - } - interface SourceMapping { - generatedLine: number; - generatedColumn: number; - originalSource: string; - originalLine: number; - originalColumn: number; - } - interface SourceOrigin { - /** - * The name of the range in the source map, if one was provided - */ - name: string | undefined; - /** - * The file name of the original source, as reported in the SourceMap - */ - fileName: string; - /** - * The 1-indexed lineNumber of the corresponding call site in the original source - */ - lineNumber: number; - /** - * The 1-indexed columnNumber of the corresponding call site in the original source - */ - columnNumber: number; - } - /** - * @since v13.7.0, v12.17.0 - */ - class SourceMap { - constructor(payload: SourceMapPayload, options?: SourceMapConstructorOptions); - /** - * Getter for the payload used to construct the `SourceMap` instance. - */ - readonly payload: SourceMapPayload; - /** - * Given a line offset and column offset in the generated source - * file, returns an object representing the SourceMap range in the - * original file if found, or an empty object if not. - * - * The object returned contains the following keys: - * - * The returned value represents the raw range as it appears in the - * SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and - * column numbers as they appear in Error messages and CallSite - * objects. - * - * To get the corresponding 1-indexed line and column numbers from a - * lineNumber and columnNumber as they are reported by Error stacks - * and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)` - * @param lineOffset The zero-indexed line number offset in the generated source - * @param columnOffset The zero-indexed column number offset in the generated source - */ - findEntry(lineOffset: number, columnOffset: number): SourceMapping | {}; - /** - * Given a 1-indexed `lineNumber` and `columnNumber` from a call site in the generated source, - * find the corresponding call site location in the original source. - * - * If the `lineNumber` and `columnNumber` provided are not found in any source map, - * then an empty object is returned. - * @param lineNumber The 1-indexed line number of the call site in the generated source - * @param columnNumber The 1-indexed column number of the call site in the generated source - */ - findOrigin(lineNumber: number, columnNumber: number): SourceOrigin | {}; - } - function runMain(main?: string): void; - function wrap(script: string): string; - } - global { - namespace NodeJS { - interface Module { - /** - * The module objects required for the first time by this one. - * @since v0.1.16 - */ - children: Module[]; - /** - * The `module.exports` object is created by the `Module` system. Sometimes this is - * not acceptable; many want their module to be an instance of some class. To do - * this, assign the desired export object to `module.exports`. - * @since v0.1.16 - */ - exports: any; - /** - * The fully resolved filename of the module. - * @since v0.1.16 - */ - filename: string; - /** - * The identifier for the module. Typically this is the fully resolved - * filename. - * @since v0.1.16 - */ - id: string; - /** - * `true` if the module is running during the Node.js preload - * phase. - * @since v15.4.0, v14.17.0 - */ - isPreloading: boolean; - /** - * Whether or not the module is done loading, or is in the process of - * loading. - * @since v0.1.16 - */ - loaded: boolean; - /** - * The module that first required this one, or `null` if the current module is the - * entry point of the current process, or `undefined` if the module was loaded by - * something that is not a CommonJS module (e.g. REPL or `import`). - * @since v0.1.16 - * @deprecated Please use `require.main` and `module.children` instead. - */ - parent: Module | null | undefined; - /** - * The directory name of the module. This is usually the same as the - * `path.dirname()` of the `module.id`. - * @since v11.14.0 - */ - path: string; - /** - * The search paths for the module. - * @since v0.4.0 - */ - paths: string[]; - /** - * The `module.require()` method provides a way to load a module as if - * `require()` was called from the original module. - * @since v0.5.1 - */ - require(id: string): any; - } - interface Require { - /** - * Used to import modules, `JSON`, and local files. - * @since v0.1.13 - */ - (id: string): any; - /** - * Modules are cached in this object when they are required. By deleting a key - * value from this object, the next `require` will reload the module. - * This does not apply to - * [native addons](https://nodejs.org/docs/latest-v25.x/api/addons.html), - * for which reloading will result in an error. - * @since v0.3.0 - */ - cache: Dict; - /** - * Instruct `require` on how to handle certain file extensions. - * @since v0.3.0 - * @deprecated - */ - extensions: RequireExtensions; - /** - * The `Module` object representing the entry script loaded when the Node.js - * process launched, or `undefined` if the entry point of the program is not a - * CommonJS module. - * @since v0.1.17 - */ - main: Module | undefined; - /** - * @since v0.3.0 - */ - resolve: RequireResolve; - } - /** @deprecated */ - interface RequireExtensions extends Dict<(module: Module, filename: string) => any> { - ".js": (module: Module, filename: string) => any; - ".json": (module: Module, filename: string) => any; - ".node": (module: Module, filename: string) => any; - } - interface RequireResolveOptions { - /** - * Paths to resolve module location from. If present, these - * paths are used instead of the default resolution paths, with the exception - * of - * [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v25.x/api/modules.html#loading-from-the-global-folders) - * like `$HOME/.node_modules`, which are - * always included. Each of these paths is used as a starting point for - * the module resolution algorithm, meaning that the `node_modules` hierarchy - * is checked from this location. - * @since v8.9.0 - */ - paths?: string[] | undefined; - } - interface RequireResolve { - /** - * Use the internal `require()` machinery to look up the location of a module, - * but rather than loading the module, just return the resolved filename. - * - * If the module can not be found, a `MODULE_NOT_FOUND` error is thrown. - * @since v0.3.0 - * @param request The module path to resolve. - */ - (request: string, options?: RequireResolveOptions): string; - /** - * Returns an array containing the paths searched during resolution of `request` or - * `null` if the `request` string references a core module, for example `http` or - * `fs`. - * @since v8.9.0 - * @param request The module path whose lookup paths are being retrieved. - */ - paths(request: string): string[] | null; - } - } - /** - * The directory name of the current module. This is the same as the - * `path.dirname()` of the `__filename`. - * @since v0.1.27 - */ - var __dirname: string; - /** - * The file name of the current module. This is the current module file's absolute - * path with symlinks resolved. - * - * For a main program this is not necessarily the same as the file name used in the - * command line. - * @since v0.0.1 - */ - var __filename: string; - /** - * The `exports` variable is available within a module's file-level scope, and is - * assigned the value of `module.exports` before the module is evaluated. - * @since v0.1.16 - */ - var exports: NodeJS.Module["exports"]; - /** - * A reference to the current module. - * @since v0.1.16 - */ - var module: NodeJS.Module; - /** - * @since v0.1.13 - */ - var require: NodeJS.Require; - // Global-scope aliases for backwards compatibility with @types/node <13.0.x - // TODO: consider removing in a future major version update - /** @deprecated Use `NodeJS.Module` instead. */ - interface NodeModule extends NodeJS.Module {} - /** @deprecated Use `NodeJS.Require` instead. */ - interface NodeRequire extends NodeJS.Require {} - /** @deprecated Use `NodeJS.RequireResolve` instead. */ - interface RequireResolve extends NodeJS.RequireResolve {} - } - export = Module; -} -declare module "module" { - import module = require("node:module"); - export = module; -} diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts deleted file mode 100644 index bb6d3a3..0000000 --- a/node_modules/@types/node/net.d.ts +++ /dev/null @@ -1,970 +0,0 @@ -declare module "node:net" { - import { NonSharedBuffer } from "node:buffer"; - import * as dns from "node:dns"; - import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; - import * as stream from "node:stream"; - type LookupFunction = ( - hostname: string, - options: dns.LookupOptions, - callback: (err: NodeJS.ErrnoException | null, address: string | dns.LookupAddress[], family?: number) => void, - ) => void; - interface AddressInfo { - address: string; - family: string; - port: number; - } - interface SocketConstructorOpts { - fd?: number | undefined; - allowHalfOpen?: boolean | undefined; - onread?: OnReadOpts | undefined; - readable?: boolean | undefined; - writable?: boolean | undefined; - signal?: AbortSignal | undefined; - noDelay?: boolean | undefined; - keepAlive?: boolean | undefined; - keepAliveInitialDelay?: number | undefined; - blockList?: BlockList | undefined; - typeOfService?: number | undefined; - } - interface OnReadOpts { - buffer: Uint8Array | (() => Uint8Array); - /** - * This function is called for every chunk of incoming data. - * Two arguments are passed to it: the number of bytes written to `buffer` and a reference to `buffer`. - * Return `false` from this function to implicitly `pause()` the socket. - */ - callback(bytesWritten: number, buffer: Uint8Array): boolean; - } - interface TcpSocketConnectOpts { - port: number; - host?: string | undefined; - localAddress?: string | undefined; - localPort?: number | undefined; - hints?: number | undefined; - family?: number | undefined; - lookup?: LookupFunction | undefined; - /** - * @since v18.13.0 - */ - autoSelectFamily?: boolean | undefined; - /** - * @since v18.13.0 - */ - autoSelectFamilyAttemptTimeout?: number | undefined; - } - interface IpcSocketConnectOpts { - path: string; - } - type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; - type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed"; - interface SocketEventMap extends Omit { - "close": [hadError: boolean]; - "connect": []; - "connectionAttempt": [ip: string, port: number, family: number]; - "connectionAttemptFailed": [ip: string, port: number, family: number, error: Error]; - "connectionAttemptTimeout": [ip: string, port: number, family: number]; - "data": [data: string | NonSharedBuffer]; - "lookup": [err: Error | null, address: string, family: number | null, host: string]; - "ready": []; - "timeout": []; - } - /** - * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint - * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also - * an `EventEmitter`. - * - * A `net.Socket` can be created by the user and used directly to interact with - * a server. For example, it is returned by {@link createConnection}, - * so the user can use it to talk to the server. - * - * It can also be created by Node.js and passed to the user when a connection - * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use - * it to interact with the client. - * @since v0.3.4 - */ - class Socket extends stream.Duplex { - constructor(options?: SocketConstructorOpts); - /** - * Destroys the socket after all data is written. If the `finish` event was already emitted the socket is destroyed immediately. - * If the socket is still writable it implicitly calls `socket.end()`. - * @since v0.3.4 - */ - destroySoon(): void; - /** - * Sends data on the socket. The second parameter specifies the encoding in the - * case of a string. It defaults to UTF8 encoding. - * - * Returns `true` if the entire data was flushed successfully to the kernel - * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free. - * - * The optional `callback` parameter will be executed when the data is finally - * written out, which may not be immediately. - * - * See `Writable` stream `write()` method for more - * information. - * @since v0.1.90 - */ - write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; - /** - * Sends data on the socket, with an explicit encoding for string data. - * @see {@link Socket.write} for full details. - * @since v0.1.90 - * @param [encoding='utf8'] Only used when data is `string`. - */ - write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; - /** - * Initiate a connection on a given socket. - * - * Possible signatures: - * - * * `socket.connect(options[, connectListener])` - * * `socket.connect(path[, connectListener])` for `IPC` connections. - * * `socket.connect(port[, host][, connectListener])` for TCP connections. - * * Returns: `net.Socket` The socket itself. - * - * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting, - * instead of a `'connect'` event, an `'error'` event will be emitted with - * the error passed to the `'error'` listener. - * The last parameter `connectListener`, if supplied, will be added as a listener - * for the `'connect'` event **once**. - * - * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined - * behavior. - */ - connect(options: SocketConnectOpts, connectionListener?: () => void): this; - connect(port: number, host: string, connectionListener?: () => void): this; - connect(port: number, connectionListener?: () => void): this; - connect(path: string, connectionListener?: () => void): this; - /** - * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information. - * @since v0.1.90 - * @return The socket itself. - */ - setEncoding(encoding?: BufferEncoding): this; - /** - * Pauses the reading of data. That is, `'data'` events will not be emitted. - * Useful to throttle back an upload. - * @return The socket itself. - */ - pause(): this; - /** - * Close the TCP connection by sending an RST packet and destroy the stream. - * If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected. - * Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error. - * If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error. - * @since v18.3.0, v16.17.0 - */ - resetAndDestroy(): this; - /** - * Resumes reading after a call to `socket.pause()`. - * @return The socket itself. - */ - resume(): this; - /** - * Sets the socket to timeout after `timeout` milliseconds of inactivity on - * the socket. By default `net.Socket` do not have a timeout. - * - * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to - * end the connection. - * - * ```js - * socket.setTimeout(3000); - * socket.on('timeout', () => { - * console.log('socket timeout'); - * socket.end(); - * }); - * ``` - * - * If `timeout` is 0, then the existing idle timeout is disabled. - * - * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event. - * @since v0.1.90 - * @return The socket itself. - */ - setTimeout(timeout: number, callback?: () => void): this; - /** - * Enable/disable the use of Nagle's algorithm. - * - * When a TCP connection is created, it will have Nagle's algorithm enabled. - * - * Nagle's algorithm delays data before it is sent via the network. It attempts - * to optimize throughput at the expense of latency. - * - * Passing `true` for `noDelay` or not passing an argument will disable Nagle's - * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's - * algorithm. - * @since v0.1.90 - * @param [noDelay=true] - * @return The socket itself. - */ - setNoDelay(noDelay?: boolean): this; - /** - * Enable/disable keep-alive functionality, and optionally set the initial - * delay before the first keepalive probe is sent on an idle socket. - * - * Set `initialDelay` (in milliseconds) to set the delay between the last - * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default - * (or previous) setting. - * - * Enabling the keep-alive functionality will set the following socket options: - * - * * `SO_KEEPALIVE=1` - * * `TCP_KEEPIDLE=initialDelay` - * * `TCP_KEEPCNT=10` - * * `TCP_KEEPINTVL=1` - * @since v0.1.92 - * @param [enable=false] - * @param [initialDelay=0] - * @return The socket itself. - */ - setKeepAlive(enable?: boolean, initialDelay?: number): this; - /** - * Returns the current Type of Service (TOS) field for IPv4 packets or Traffic - * Class for IPv6 packets for this socket. - * - * `setTypeOfService()` may be called before the socket is connected; the value - * will be cached and applied when the socket establishes a connection. - * `getTypeOfService()` will return the currently set value even before connection. - * - * On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored, - * and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers - * should verify platform-specific semantics. - * @since v25.6.0 - * @returns The current TOS value. - */ - getTypeOfService(): number; - /** - * Sets the Type of Service (TOS) field for IPv4 packets or Traffic Class for IPv6 - * Packets sent from this socket. This can be used to prioritize network traffic. - * - * `setTypeOfService()` may be called before the socket is connected; the value - * will be cached and applied when the socket establishes a connection. - * `getTypeOfService()` will return the currently set value even before connection. - * - * On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored, - * and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers - * should verify platform-specific semantics. - * @since v25.6.0 - * @param tos The TOS value to set (0-255). - * @returns The socket itself. - */ - setTypeOfService(tos: number): this; - /** - * Returns the bound `address`, the address `family` name and `port` of the - * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }` - * @since v0.1.90 - */ - address(): AddressInfo | {}; - /** - * Calling `unref()` on a socket will allow the program to exit if this is the only - * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect. - * @since v0.9.1 - * @return The socket itself. - */ - unref(): this; - /** - * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior). - * If the socket is `ref`ed calling `ref` again will have no effect. - * @since v0.9.1 - * @return The socket itself. - */ - ref(): this; - /** - * This property is only present if the family autoselection algorithm is enabled in `socket.connect(options)` - * and it is an array of the addresses that have been attempted. - * - * Each address is a string in the form of `$IP:$PORT`. - * If the connection was successful, then the last address is the one that the socket is currently connected to. - * @since v19.4.0 - */ - readonly autoSelectFamilyAttemptedAddresses: string[]; - /** - * This property shows the number of characters buffered for writing. The buffer - * may contain strings whose length after encoding is not yet known. So this number - * is only an approximation of the number of bytes in the buffer. - * - * `net.Socket` has the property that `socket.write()` always works. This is to - * help users get up and running quickly. The computer cannot always keep up - * with the amount of data that is written to a socket. The network connection - * simply might be too slow. Node.js will internally queue up the data written to a - * socket and send it out over the wire when it is possible. - * - * The consequence of this internal buffering is that memory may grow. - * Users who experience large or growing `bufferSize` should attempt to - * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`. - * @since v0.3.8 - * @deprecated Since v14.6.0 - Use `writableLength` instead. - */ - readonly bufferSize: number; - /** - * The amount of received bytes. - * @since v0.5.3 - */ - readonly bytesRead: number; - /** - * The amount of bytes sent. - * @since v0.5.3 - */ - readonly bytesWritten: number; - /** - * If `true`, `socket.connect(options[, connectListener])` was - * called and has not yet finished. It will stay `true` until the socket becomes - * connected, then it is set to `false` and the `'connect'` event is emitted. Note - * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event. - * @since v6.1.0 - */ - readonly connecting: boolean; - /** - * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting - * (see `socket.connecting`). - * @since v11.2.0, v10.16.0 - */ - readonly pending: boolean; - /** - * See `writable.destroyed` for further details. - */ - readonly destroyed: boolean; - /** - * The string representation of the local IP address the remote client is - * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client - * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`. - * @since v0.9.6 - */ - readonly localAddress?: string; - /** - * The numeric representation of the local port. For example, `80` or `21`. - * @since v0.9.6 - */ - readonly localPort?: number; - /** - * The string representation of the local IP family. `'IPv4'` or `'IPv6'`. - * @since v18.8.0, v16.18.0 - */ - readonly localFamily?: string; - /** - * This property represents the state of the connection as a string. - * - * * If the stream is connecting `socket.readyState` is `opening`. - * * If the stream is readable and writable, it is `open`. - * * If the stream is readable and not writable, it is `readOnly`. - * * If the stream is not readable and writable, it is `writeOnly`. - * @since v0.5.0 - */ - readonly readyState: SocketReadyState; - /** - * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if - * the socket is destroyed (for example, if the client disconnected). - * @since v0.5.10 - */ - readonly remoteAddress: string | undefined; - /** - * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if - * the socket is destroyed (for example, if the client disconnected). - * @since v0.11.14 - */ - readonly remoteFamily: string | undefined; - /** - * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if - * the socket is destroyed (for example, if the client disconnected). - * @since v0.5.10 - */ - readonly remotePort: number | undefined; - /** - * The socket timeout in milliseconds as set by `socket.setTimeout()`. - * It is `undefined` if a timeout has not been set. - * @since v10.7.0 - */ - readonly timeout?: number; - /** - * Half-closes the socket. i.e., it sends a FIN packet. It is possible the - * server will still send some data. - * - * See `writable.end()` for further details. - * @since v0.1.90 - * @param callback Optional callback for when the socket is finished. - * @return The socket itself. - */ - end(callback?: () => void): this; - /** - * Half-closes the socket, with one final chunk of data. - * @see {@link Socket.end} for full details. - * @since v0.1.90 - * @param callback Optional callback for when the socket is finished. - * @return The socket itself. - */ - end(buffer: Uint8Array | string, callback?: () => void): this; - /** - * Half-closes the socket, with one final chunk of data. - * @see {@link Socket.end} for full details. - * @since v0.1.90 - * @param [encoding='utf8'] Only used when data is `string`. - * @param callback Optional callback for when the socket is finished. - * @return The socket itself. - */ - end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this; - // #region InternalEventEmitter - addListener(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: SocketEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: SocketEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: SocketEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: SocketEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: SocketEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: SocketEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: SocketEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface ListenOptions extends Abortable { - backlog?: number | undefined; - exclusive?: boolean | undefined; - host?: string | undefined; - /** - * @default false - */ - ipv6Only?: boolean | undefined; - reusePort?: boolean | undefined; - path?: string | undefined; - port?: number | undefined; - readableAll?: boolean | undefined; - writableAll?: boolean | undefined; - } - interface ServerOpts { - /** - * Indicates whether half-opened TCP connections are allowed. - * @default false - */ - allowHalfOpen?: boolean | undefined; - /** - * Indicates whether the socket should be paused on incoming connections. - * @default false - */ - pauseOnConnect?: boolean | undefined; - /** - * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. - * @default false - * @since v16.5.0 - */ - noDelay?: boolean | undefined; - /** - * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, - * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. - * @default false - * @since v16.5.0 - */ - keepAlive?: boolean | undefined; - /** - * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. - * @default 0 - * @since v16.5.0 - */ - keepAliveInitialDelay?: number | undefined; - /** - * Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`. - * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode). - * @since v18.17.0, v20.1.0 - */ - highWaterMark?: number | undefined; - /** - * `blockList` can be used for disabling inbound - * access to specific IP addresses, IP ranges, or IP subnets. This does not - * work if the server is behind a reverse proxy, NAT, etc. because the address - * checked against the block list is the address of the proxy, or the one - * specified by the NAT. - * @since v22.13.0 - */ - blockList?: BlockList | undefined; - } - interface DropArgument { - localAddress?: string; - localPort?: number; - localFamily?: string; - remoteAddress?: string; - remotePort?: number; - remoteFamily?: string; - } - interface ServerEventMap { - "close": []; - "connection": [socket: Socket]; - "error": [err: Error]; - "listening": []; - "drop": [data?: DropArgument]; - } - /** - * This class is used to create a TCP or `IPC` server. - * @since v0.1.90 - */ - class Server implements EventEmitter { - constructor(connectionListener?: (socket: Socket) => void); - constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void); - /** - * Start a server listening for connections. A `net.Server` can be a TCP or - * an `IPC` server depending on what it listens to. - * - * Possible signatures: - * - * * `server.listen(handle[, backlog][, callback])` - * * `server.listen(options[, callback])` - * * `server.listen(path[, backlog][, callback])` for `IPC` servers - * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers - * - * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'` - * event. - * - * All `listen()` methods can take a `backlog` parameter to specify the maximum - * length of the queue of pending connections. The actual length will be determined - * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn` on Linux. The default value of this parameter is 511 (not 512). - * - * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for - * details). - * - * The `server.listen()` method can be called again if and only if there was an - * error during the first `server.listen()` call or `server.close()` has been - * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown. - * - * One of the most common errors raised when listening is `EADDRINUSE`. - * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry - * after a certain amount of time: - * - * ```js - * server.on('error', (e) => { - * if (e.code === 'EADDRINUSE') { - * console.error('Address in use, retrying...'); - * setTimeout(() => { - * server.close(); - * server.listen(PORT, HOST); - * }, 1000); - * } - * }); - * ``` - */ - listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; - listen(port?: number, hostname?: string, listeningListener?: () => void): this; - listen(port?: number, backlog?: number, listeningListener?: () => void): this; - listen(port?: number, listeningListener?: () => void): this; - listen(path: string, backlog?: number, listeningListener?: () => void): this; - listen(path: string, listeningListener?: () => void): this; - listen(options: ListenOptions, listeningListener?: () => void): this; - listen(handle: any, backlog?: number, listeningListener?: () => void): this; - listen(handle: any, listeningListener?: () => void): this; - /** - * Stops the server from accepting new connections and keeps existing - * connections. This function is asynchronous, the server is finally closed - * when all connections are ended and the server emits a `'close'` event. - * The optional `callback` will be called once the `'close'` event occurs. Unlike - * that event, it will be called with an `Error` as its only argument if the server - * was not open when it was closed. - * @since v0.1.90 - * @param callback Called when the server is closed. - */ - close(callback?: (err?: Error) => void): this; - /** - * Returns the bound `address`, the address `family` name, and `port` of the server - * as reported by the operating system if listening on an IP socket - * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. - * - * For a server listening on a pipe or Unix domain socket, the name is returned - * as a string. - * - * ```js - * const server = net.createServer((socket) => { - * socket.end('goodbye\n'); - * }).on('error', (err) => { - * // Handle errors here. - * throw err; - * }); - * - * // Grab an arbitrary unused port. - * server.listen(() => { - * console.log('opened server on', server.address()); - * }); - * ``` - * - * `server.address()` returns `null` before the `'listening'` event has been - * emitted or after calling `server.close()`. - * @since v0.1.90 - */ - address(): AddressInfo | string | null; - /** - * Asynchronously get the number of concurrent connections on the server. Works - * when sockets were sent to forks. - * - * Callback should take two arguments `err` and `count`. - * @since v0.9.7 - */ - getConnections(cb: (error: Error | null, count: number) => void): this; - /** - * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior). - * If the server is `ref`ed calling `ref()` again will have no effect. - * @since v0.9.1 - */ - ref(): this; - /** - * Calling `unref()` on a server will allow the program to exit if this is the only - * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect. - * @since v0.9.1 - */ - unref(): this; - /** - * Set this property to reject connections when the server's connection count gets - * high. - * - * It is not recommended to use this option once a socket has been sent to a child - * with `child_process.fork()`. - * @since v0.2.0 - */ - maxConnections: number; - connections: number; - /** - * Indicates whether or not the server is listening for connections. - * @since v5.7.0 - */ - readonly listening: boolean; - /** - * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed. - * @since v20.5.0 - */ - [Symbol.asyncDispose](): Promise; - } - interface Server extends InternalEventEmitter {} - type IPVersion = "ipv4" | "ipv6"; - /** - * The `BlockList` object can be used with some network APIs to specify rules for - * disabling inbound or outbound access to specific IP addresses, IP ranges, or - * IP subnets. - * @since v15.0.0, v14.18.0 - */ - class BlockList { - /** - * Adds a rule to block the given IP address. - * @since v15.0.0, v14.18.0 - * @param address An IPv4 or IPv6 address. - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - addAddress(address: string, type?: IPVersion): void; - addAddress(address: SocketAddress): void; - /** - * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive). - * @since v15.0.0, v14.18.0 - * @param start The starting IPv4 or IPv6 address in the range. - * @param end The ending IPv4 or IPv6 address in the range. - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - addRange(start: string, end: string, type?: IPVersion): void; - addRange(start: SocketAddress, end: SocketAddress): void; - /** - * Adds a rule to block a range of IP addresses specified as a subnet mask. - * @since v15.0.0, v14.18.0 - * @param net The network IPv4 or IPv6 address. - * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`. - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - addSubnet(net: SocketAddress, prefix: number): void; - addSubnet(net: string, prefix: number, type?: IPVersion): void; - /** - * Returns `true` if the given IP address matches any of the rules added to the`BlockList`. - * - * ```js - * const blockList = new net.BlockList(); - * blockList.addAddress('123.123.123.123'); - * blockList.addRange('10.0.0.1', '10.0.0.10'); - * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6'); - * - * console.log(blockList.check('123.123.123.123')); // Prints: true - * console.log(blockList.check('10.0.0.3')); // Prints: true - * console.log(blockList.check('222.111.111.222')); // Prints: false - * - * // IPv6 notation for IPv4 addresses works: - * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true - * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true - * ``` - * @since v15.0.0, v14.18.0 - * @param address The IP address to check - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - check(address: SocketAddress): boolean; - check(address: string, type?: IPVersion): boolean; - /** - * The list of rules added to the blocklist. - * @since v15.0.0, v14.18.0 - */ - rules: readonly string[]; - /** - * Returns `true` if the `value` is a `net.BlockList`. - * @since v22.13.0 - * @param value Any JS value - */ - static isBlockList(value: unknown): value is BlockList; - /** - * ```js - * const blockList = new net.BlockList(); - * const data = [ - * 'Subnet: IPv4 192.168.1.0/24', - * 'Address: IPv4 10.0.0.5', - * 'Range: IPv4 192.168.2.1-192.168.2.10', - * 'Range: IPv4 10.0.0.1-10.0.0.10', - * ]; - * blockList.fromJSON(data); - * blockList.fromJSON(JSON.stringify(data)); - * ``` - * @since v24.5.0 - * @experimental - */ - fromJSON(data: string | readonly string[]): void; - /** - * @since v24.5.0 - * @experimental - */ - toJSON(): readonly string[]; - } - interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { - timeout?: number | undefined; - } - interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { - timeout?: number | undefined; - } - type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; - /** - * Creates a new TCP or `IPC` server. - * - * If `allowHalfOpen` is set to `true`, when the other end of the socket - * signals the end of transmission, the server will only send back the end of - * transmission when `socket.end()` is explicitly called. For example, in the - * context of TCP, when a FIN packed is received, a FIN packed is sent - * back only when `socket.end()` is explicitly called. Until then the - * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information. - * - * If `pauseOnConnect` is set to `true`, then the socket associated with each - * incoming connection will be paused, and no data will be read from its handle. - * This allows connections to be passed between processes without any data being - * read by the original process. To begin reading data from a paused socket, call `socket.resume()`. - * - * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to. - * - * Here is an example of a TCP echo server which listens for connections - * on port 8124: - * - * ```js - * import net from 'node:net'; - * const server = net.createServer((c) => { - * // 'connection' listener. - * console.log('client connected'); - * c.on('end', () => { - * console.log('client disconnected'); - * }); - * c.write('hello\r\n'); - * c.pipe(c); - * }); - * server.on('error', (err) => { - * throw err; - * }); - * server.listen(8124, () => { - * console.log('server bound'); - * }); - * ``` - * - * Test this by using `telnet`: - * - * ```bash - * telnet localhost 8124 - * ``` - * - * To listen on the socket `/tmp/echo.sock`: - * - * ```js - * server.listen('/tmp/echo.sock', () => { - * console.log('server bound'); - * }); - * ``` - * - * Use `nc` to connect to a Unix domain socket server: - * - * ```bash - * nc -U /tmp/echo.sock - * ``` - * @since v0.5.0 - * @param connectionListener Automatically set as a listener for the {@link 'connection'} event. - */ - function createServer(connectionListener?: (socket: Socket) => void): Server; - function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server; - /** - * Aliases to {@link createConnection}. - * - * Possible signatures: - * - * * {@link connect} - * * {@link connect} for `IPC` connections. - * * {@link connect} for TCP connections. - */ - function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; - function connect(port: number, host?: string, connectionListener?: () => void): Socket; - function connect(path: string, connectionListener?: () => void): Socket; - /** - * A factory function, which creates a new {@link Socket}, - * immediately initiates connection with `socket.connect()`, - * then returns the `net.Socket` that starts the connection. - * - * When the connection is established, a `'connect'` event will be emitted - * on the returned socket. The last parameter `connectListener`, if supplied, - * will be added as a listener for the `'connect'` event **once**. - * - * Possible signatures: - * - * * {@link createConnection} - * * {@link createConnection} for `IPC` connections. - * * {@link createConnection} for TCP connections. - * - * The {@link connect} function is an alias to this function. - */ - function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; - function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; - function createConnection(path: string, connectionListener?: () => void): Socket; - /** - * Gets the current default value of the `autoSelectFamily` option of `socket.connect(options)`. - * The initial default value is `true`, unless the command line option`--no-network-family-autoselection` is provided. - * @since v19.4.0 - */ - function getDefaultAutoSelectFamily(): boolean; - /** - * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`. - * @param value The new default value. - * The initial default value is `true`, unless the command line option - * `--no-network-family-autoselection` is provided. - * @since v19.4.0 - */ - function setDefaultAutoSelectFamily(value: boolean): void; - /** - * Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. - * The initial default value is `500` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`. - * @returns The current default value of the `autoSelectFamilyAttemptTimeout` option. - * @since v19.8.0, v18.8.0 - */ - function getDefaultAutoSelectFamilyAttemptTimeout(): number; - /** - * Sets the default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. - * @param value The new default value, which must be a positive number. If the number is less than `10`, the value `10` is used instead. The initial default value is `250` or the value specified via the command line - * option `--network-family-autoselection-attempt-timeout`. - * @since v19.8.0, v18.8.0 - */ - function setDefaultAutoSelectFamilyAttemptTimeout(value: number): void; - /** - * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4 - * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`. - * - * ```js - * net.isIP('::1'); // returns 6 - * net.isIP('127.0.0.1'); // returns 4 - * net.isIP('127.000.000.001'); // returns 0 - * net.isIP('127.0.0.1/24'); // returns 0 - * net.isIP('fhqwhgads'); // returns 0 - * ``` - * @since v0.3.0 - */ - function isIP(input: string): number; - /** - * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no - * leading zeroes. Otherwise, returns `false`. - * - * ```js - * net.isIPv4('127.0.0.1'); // returns true - * net.isIPv4('127.000.000.001'); // returns false - * net.isIPv4('127.0.0.1/24'); // returns false - * net.isIPv4('fhqwhgads'); // returns false - * ``` - * @since v0.3.0 - */ - function isIPv4(input: string): boolean; - /** - * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`. - * - * ```js - * net.isIPv6('::1'); // returns true - * net.isIPv6('fhqwhgads'); // returns false - * ``` - * @since v0.3.0 - */ - function isIPv6(input: string): boolean; - interface SocketAddressInitOptions { - /** - * The network address as either an IPv4 or IPv6 string. - * @default 127.0.0.1 - */ - address?: string | undefined; - /** - * @default `'ipv4'` - */ - family?: IPVersion | undefined; - /** - * An IPv6 flow-label used only if `family` is `'ipv6'`. - * @default 0 - */ - flowlabel?: number | undefined; - /** - * An IP port. - * @default 0 - */ - port?: number | undefined; - } - /** - * @since v15.14.0, v14.18.0 - */ - class SocketAddress { - constructor(options: SocketAddressInitOptions); - /** - * Either \`'ipv4'\` or \`'ipv6'\`. - * @since v15.14.0, v14.18.0 - */ - readonly address: string; - /** - * Either \`'ipv4'\` or \`'ipv6'\`. - * @since v15.14.0, v14.18.0 - */ - readonly family: IPVersion; - /** - * @since v15.14.0, v14.18.0 - */ - readonly port: number; - /** - * @since v15.14.0, v14.18.0 - */ - readonly flowlabel: number; - /** - * @since v22.13.0 - * @param input An input string containing an IP address and optional port, - * e.g. `123.1.2.3:1234` or `[1::1]:1234`. - * @returns Returns a `SocketAddress` if parsing was successful. - * Otherwise returns `undefined`. - */ - static parse(input: string): SocketAddress | undefined; - } -} -declare module "net" { - export * from "node:net"; -} diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts deleted file mode 100644 index 562c463..0000000 --- a/node_modules/@types/node/os.d.ts +++ /dev/null @@ -1,498 +0,0 @@ -declare module "node:os" { - import { NonSharedBuffer } from "buffer"; - interface CpuInfo { - model: string; - speed: number; - times: { - /** The number of milliseconds the CPU has spent in user mode. */ - user: number; - /** The number of milliseconds the CPU has spent in nice mode. */ - nice: number; - /** The number of milliseconds the CPU has spent in sys mode. */ - sys: number; - /** The number of milliseconds the CPU has spent in idle mode. */ - idle: number; - /** The number of milliseconds the CPU has spent in irq mode. */ - irq: number; - }; - } - interface NetworkInterfaceBase { - address: string; - netmask: string; - mac: string; - internal: boolean; - cidr: string | null; - scopeid?: number; - } - interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { - family: "IPv4"; - } - interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { - family: "IPv6"; - scopeid: number; - } - interface UserInfo { - username: T; - uid: number; - gid: number; - shell: T | null; - homedir: T; - } - type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; - /** - * Returns the host name of the operating system as a string. - * @since v0.3.3 - */ - function hostname(): string; - /** - * Returns an array containing the 1, 5, and 15 minute load averages. - * - * The load average is a measure of system activity calculated by the operating - * system and expressed as a fractional number. - * - * The load average is a Unix-specific concept. On Windows, the return value is - * always `[0, 0, 0]`. - * @since v0.3.3 - */ - function loadavg(): number[]; - /** - * Returns the system uptime in number of seconds. - * @since v0.3.3 - */ - function uptime(): number; - /** - * Returns the amount of free system memory in bytes as an integer. - * @since v0.3.3 - */ - function freemem(): number; - /** - * Returns the total amount of system memory in bytes as an integer. - * @since v0.3.3 - */ - function totalmem(): number; - /** - * Returns an array of objects containing information about each logical CPU core. - * The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable. - * - * The properties included on each object include: - * - * ```js - * [ - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 252020, - * nice: 0, - * sys: 30340, - * idle: 1070356870, - * irq: 0, - * }, - * }, - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 306960, - * nice: 0, - * sys: 26980, - * idle: 1071569080, - * irq: 0, - * }, - * }, - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 248450, - * nice: 0, - * sys: 21750, - * idle: 1070919370, - * irq: 0, - * }, - * }, - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 256880, - * nice: 0, - * sys: 19430, - * idle: 1070905480, - * irq: 20, - * }, - * }, - * ] - * ``` - * - * `nice` values are POSIX-only. On Windows, the `nice` values of all processors - * are always 0. - * - * `os.cpus().length` should not be used to calculate the amount of parallelism - * available to an application. Use {@link availableParallelism} for this purpose. - * @since v0.3.3 - */ - function cpus(): CpuInfo[]; - /** - * Returns an estimate of the default amount of parallelism a program should use. - * Always returns a value greater than zero. - * - * This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism). - * @since v19.4.0, v18.14.0 - */ - function availableParallelism(): number; - /** - * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it - * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows. - * - * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information - * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems. - * @since v0.3.3 - */ - function type(): string; - /** - * Returns the operating system as a string. - * - * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See - * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. - * @since v0.3.3 - */ - function release(): string; - /** - * Returns an object containing network interfaces that have been assigned a - * network address. - * - * Each key on the returned object identifies a network interface. The associated - * value is an array of objects that each describe an assigned network address. - * - * The properties available on the assigned network address object include: - * - * ```js - * { - * lo: [ - * { - * address: '127.0.0.1', - * netmask: '255.0.0.0', - * family: 'IPv4', - * mac: '00:00:00:00:00:00', - * internal: true, - * cidr: '127.0.0.1/8' - * }, - * { - * address: '::1', - * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', - * family: 'IPv6', - * mac: '00:00:00:00:00:00', - * scopeid: 0, - * internal: true, - * cidr: '::1/128' - * } - * ], - * eth0: [ - * { - * address: '192.168.1.108', - * netmask: '255.255.255.0', - * family: 'IPv4', - * mac: '01:02:03:0a:0b:0c', - * internal: false, - * cidr: '192.168.1.108/24' - * }, - * { - * address: 'fe80::a00:27ff:fe4e:66a1', - * netmask: 'ffff:ffff:ffff:ffff::', - * family: 'IPv6', - * mac: '01:02:03:0a:0b:0c', - * scopeid: 1, - * internal: false, - * cidr: 'fe80::a00:27ff:fe4e:66a1/64' - * } - * ] - * } - * ``` - * @since v0.6.0 - */ - function networkInterfaces(): NodeJS.Dict; - /** - * Returns the string path of the current user's home directory. - * - * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it - * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory. - * - * On Windows, it uses the `USERPROFILE` environment variable if defined. - * Otherwise it uses the path to the profile directory of the current user. - * @since v2.3.0 - */ - function homedir(): string; - interface UserInfoOptions { - encoding?: BufferEncoding | "buffer" | undefined; - } - interface UserInfoOptionsWithBufferEncoding extends UserInfoOptions { - encoding: "buffer"; - } - interface UserInfoOptionsWithStringEncoding extends UserInfoOptions { - encoding?: BufferEncoding | undefined; - } - /** - * Returns information about the currently effective user. On POSIX platforms, - * this is typically a subset of the password file. The returned object includes - * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`. - * - * The value of `homedir` returned by `os.userInfo()` is provided by the operating - * system. This differs from the result of `os.homedir()`, which queries - * environment variables for the home directory before falling back to the - * operating system response. - * - * Throws a [`SystemError`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`. - * @since v6.0.0 - */ - function userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfo; - function userInfo(options: UserInfoOptionsWithBufferEncoding): UserInfo; - function userInfo(options: UserInfoOptions): UserInfo; - type SignalConstants = { - [key in NodeJS.Signals]: number; - }; - namespace constants { - const UV_UDP_REUSEADDR: number; - namespace signals {} - const signals: SignalConstants; - namespace errno { - const E2BIG: number; - const EACCES: number; - const EADDRINUSE: number; - const EADDRNOTAVAIL: number; - const EAFNOSUPPORT: number; - const EAGAIN: number; - const EALREADY: number; - const EBADF: number; - const EBADMSG: number; - const EBUSY: number; - const ECANCELED: number; - const ECHILD: number; - const ECONNABORTED: number; - const ECONNREFUSED: number; - const ECONNRESET: number; - const EDEADLK: number; - const EDESTADDRREQ: number; - const EDOM: number; - const EDQUOT: number; - const EEXIST: number; - const EFAULT: number; - const EFBIG: number; - const EHOSTUNREACH: number; - const EIDRM: number; - const EILSEQ: number; - const EINPROGRESS: number; - const EINTR: number; - const EINVAL: number; - const EIO: number; - const EISCONN: number; - const EISDIR: number; - const ELOOP: number; - const EMFILE: number; - const EMLINK: number; - const EMSGSIZE: number; - const EMULTIHOP: number; - const ENAMETOOLONG: number; - const ENETDOWN: number; - const ENETRESET: number; - const ENETUNREACH: number; - const ENFILE: number; - const ENOBUFS: number; - const ENODATA: number; - const ENODEV: number; - const ENOENT: number; - const ENOEXEC: number; - const ENOLCK: number; - const ENOLINK: number; - const ENOMEM: number; - const ENOMSG: number; - const ENOPROTOOPT: number; - const ENOSPC: number; - const ENOSR: number; - const ENOSTR: number; - const ENOSYS: number; - const ENOTCONN: number; - const ENOTDIR: number; - const ENOTEMPTY: number; - const ENOTSOCK: number; - const ENOTSUP: number; - const ENOTTY: number; - const ENXIO: number; - const EOPNOTSUPP: number; - const EOVERFLOW: number; - const EPERM: number; - const EPIPE: number; - const EPROTO: number; - const EPROTONOSUPPORT: number; - const EPROTOTYPE: number; - const ERANGE: number; - const EROFS: number; - const ESPIPE: number; - const ESRCH: number; - const ESTALE: number; - const ETIME: number; - const ETIMEDOUT: number; - const ETXTBSY: number; - const EWOULDBLOCK: number; - const EXDEV: number; - const WSAEINTR: number; - const WSAEBADF: number; - const WSAEACCES: number; - const WSAEFAULT: number; - const WSAEINVAL: number; - const WSAEMFILE: number; - const WSAEWOULDBLOCK: number; - const WSAEINPROGRESS: number; - const WSAEALREADY: number; - const WSAENOTSOCK: number; - const WSAEDESTADDRREQ: number; - const WSAEMSGSIZE: number; - const WSAEPROTOTYPE: number; - const WSAENOPROTOOPT: number; - const WSAEPROTONOSUPPORT: number; - const WSAESOCKTNOSUPPORT: number; - const WSAEOPNOTSUPP: number; - const WSAEPFNOSUPPORT: number; - const WSAEAFNOSUPPORT: number; - const WSAEADDRINUSE: number; - const WSAEADDRNOTAVAIL: number; - const WSAENETDOWN: number; - const WSAENETUNREACH: number; - const WSAENETRESET: number; - const WSAECONNABORTED: number; - const WSAECONNRESET: number; - const WSAENOBUFS: number; - const WSAEISCONN: number; - const WSAENOTCONN: number; - const WSAESHUTDOWN: number; - const WSAETOOMANYREFS: number; - const WSAETIMEDOUT: number; - const WSAECONNREFUSED: number; - const WSAELOOP: number; - const WSAENAMETOOLONG: number; - const WSAEHOSTDOWN: number; - const WSAEHOSTUNREACH: number; - const WSAENOTEMPTY: number; - const WSAEPROCLIM: number; - const WSAEUSERS: number; - const WSAEDQUOT: number; - const WSAESTALE: number; - const WSAEREMOTE: number; - const WSASYSNOTREADY: number; - const WSAVERNOTSUPPORTED: number; - const WSANOTINITIALISED: number; - const WSAEDISCON: number; - const WSAENOMORE: number; - const WSAECANCELLED: number; - const WSAEINVALIDPROCTABLE: number; - const WSAEINVALIDPROVIDER: number; - const WSAEPROVIDERFAILEDINIT: number; - const WSASYSCALLFAILURE: number; - const WSASERVICE_NOT_FOUND: number; - const WSATYPE_NOT_FOUND: number; - const WSA_E_NO_MORE: number; - const WSA_E_CANCELLED: number; - const WSAEREFUSED: number; - } - namespace dlopen { - const RTLD_LAZY: number; - const RTLD_NOW: number; - const RTLD_GLOBAL: number; - const RTLD_LOCAL: number; - const RTLD_DEEPBIND: number; - } - namespace priority { - const PRIORITY_LOW: number; - const PRIORITY_BELOW_NORMAL: number; - const PRIORITY_NORMAL: number; - const PRIORITY_ABOVE_NORMAL: number; - const PRIORITY_HIGH: number; - const PRIORITY_HIGHEST: number; - } - } - const devNull: string; - /** - * The operating system-specific end-of-line marker. - * * `\n` on POSIX - * * `\r\n` on Windows - */ - const EOL: string; - /** - * Returns the operating system CPU architecture for which the Node.js binary was - * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, - * `'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`. - * - * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v25.x/api/process.html#processarch). - * @since v0.5.0 - */ - function arch(): NodeJS.Architecture; - /** - * Returns a string identifying the kernel version. - * - * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not - * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. - * @since v13.11.0, v12.17.0 - */ - function version(): string; - /** - * Returns a string identifying the operating system platform for which - * the Node.js binary was compiled. The value is set at compile time. - * Possible values are `'aix'`, `'darwin'`, `'freebsd'`, `'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`. - * - * The return value is equivalent to `process.platform`. - * - * The value `'android'` may also be returned if Node.js is built on the Android - * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). - * @since v0.5.0 - */ - function platform(): NodeJS.Platform; - /** - * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, - * `mips`, `mips64`, `ppc64`, `ppc64le`, `s390x`, `i386`, `i686`, `x86_64`. - * - * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not - * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. - * @since v18.9.0, v16.18.0 - */ - function machine(): string; - /** - * Returns the operating system's default directory for temporary files as a - * string. - * @since v0.9.9 - */ - function tmpdir(): string; - /** - * Returns a string identifying the endianness of the CPU for which the Node.js - * binary was compiled. - * - * Possible values are `'BE'` for big endian and `'LE'` for little endian. - * @since v0.9.4 - */ - function endianness(): "BE" | "LE"; - /** - * Returns the scheduling priority for the process specified by `pid`. If `pid` is - * not provided or is `0`, the priority of the current process is returned. - * @since v10.10.0 - * @param [pid=0] The process ID to retrieve scheduling priority for. - */ - function getPriority(pid?: number): number; - /** - * Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used. - * - * The `priority` input must be an integer between `-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows - * priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range - * mapping may cause the return value to be slightly different on Windows. To avoid - * confusion, set `priority` to one of the priority constants. - * - * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user - * privileges. Otherwise the set priority will be silently reduced to `PRIORITY_HIGH`. - * @since v10.10.0 - * @param [pid=0] The process ID to set scheduling priority for. - * @param priority The scheduling priority to assign to the process. - */ - function setPriority(priority: number): void; - function setPriority(pid: number, priority: number): void; -} -declare module "os" { - export * from "node:os"; -} diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json deleted file mode 100644 index 3eff1b7..0000000 --- a/node_modules/@types/node/package.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "name": "@types/node", - "version": "25.9.1", - "description": "TypeScript definitions for node", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", - "license": "MIT", - "contributors": [ - { - "name": "Microsoft TypeScript", - "githubUsername": "Microsoft", - "url": "https://github.com/Microsoft" - }, - { - "name": "Alberto Schiabel", - "githubUsername": "jkomyno", - "url": "https://github.com/jkomyno" - }, - { - "name": "Andrew Makarov", - "githubUsername": "r3nya", - "url": "https://github.com/r3nya" - }, - { - "name": "Benjamin Toueg", - "githubUsername": "btoueg", - "url": "https://github.com/btoueg" - }, - { - "name": "David Junger", - "githubUsername": "touffy", - "url": "https://github.com/touffy" - }, - { - "name": "Mohsen Azimi", - "githubUsername": "mohsen1", - "url": "https://github.com/mohsen1" - }, - { - "name": "Nikita Galkin", - "githubUsername": "galkin", - "url": "https://github.com/galkin" - }, - { - "name": "Sebastian Silbermann", - "githubUsername": "eps1lon", - "url": "https://github.com/eps1lon" - }, - { - "name": "Wilco Bakker", - "githubUsername": "WilcoBakker", - "url": "https://github.com/WilcoBakker" - }, - { - "name": "Marcin Kopacz", - "githubUsername": "chyzwar", - "url": "https://github.com/chyzwar" - }, - { - "name": "Trivikram Kamat", - "githubUsername": "trivikr", - "url": "https://github.com/trivikr" - }, - { - "name": "Junxiao Shi", - "githubUsername": "yoursunny", - "url": "https://github.com/yoursunny" - }, - { - "name": "Ilia Baryshnikov", - "githubUsername": "qwelias", - "url": "https://github.com/qwelias" - }, - { - "name": "ExE Boss", - "githubUsername": "ExE-Boss", - "url": "https://github.com/ExE-Boss" - }, - { - "name": "Piotr Błażejewicz", - "githubUsername": "peterblazejewicz", - "url": "https://github.com/peterblazejewicz" - }, - { - "name": "Anna Henningsen", - "githubUsername": "addaleax", - "url": "https://github.com/addaleax" - }, - { - "name": "Victor Perin", - "githubUsername": "victorperin", - "url": "https://github.com/victorperin" - }, - { - "name": "NodeJS Contributors", - "githubUsername": "NodeJS", - "url": "https://github.com/NodeJS" - }, - { - "name": "Linus Unnebäck", - "githubUsername": "LinusU", - "url": "https://github.com/LinusU" - }, - { - "name": "wafuwafu13", - "githubUsername": "wafuwafu13", - "url": "https://github.com/wafuwafu13" - }, - { - "name": "Matteo Collina", - "githubUsername": "mcollina", - "url": "https://github.com/mcollina" - }, - { - "name": "Dmitry Semigradsky", - "githubUsername": "Semigradsky", - "url": "https://github.com/Semigradsky" - }, - { - "name": "René", - "githubUsername": "Renegade334", - "url": "https://github.com/Renegade334" - }, - { - "name": "Yagiz Nizipli", - "githubUsername": "anonrig", - "url": "https://github.com/anonrig" - } - ], - "main": "", - "types": "index.d.ts", - "typesVersions": { - "<=5.6": { - "*": [ - "ts5.6/*" - ] - }, - "<=5.7": { - "*": [ - "ts5.7/*" - ] - } - }, - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/node" - }, - "scripts": {}, - "dependencies": { - "undici-types": ">=7.24.0 <7.24.7" - }, - "peerDependencies": {}, - "typesPublisherContentHash": "2546f5f588e15fc9aa202a3005dab2859d006fd48a8448107741e5ce184e9098", - "typeScriptVersion": "5.3" -} \ No newline at end of file diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts deleted file mode 100644 index ae8fd97..0000000 --- a/node_modules/@types/node/path.d.ts +++ /dev/null @@ -1,178 +0,0 @@ -declare module "node:path" { - namespace path { - /** - * A parsed path object generated by path.parse() or consumed by path.format(). - */ - interface ParsedPath { - /** - * The root of the path such as '/' or 'c:\' - */ - root: string; - /** - * The full directory path such as '/home/user/dir' or 'c:\path\dir' - */ - dir: string; - /** - * The file name including extension (if any) such as 'index.html' - */ - base: string; - /** - * The file extension (if any) such as '.html' - */ - ext: string; - /** - * The file name without extension (if any) such as 'index' - */ - name: string; - } - interface FormatInputPathObject { - /** - * The root of the path such as '/' or 'c:\' - */ - root?: string | undefined; - /** - * The full directory path such as '/home/user/dir' or 'c:\path\dir' - */ - dir?: string | undefined; - /** - * The file name including extension (if any) such as 'index.html' - */ - base?: string | undefined; - /** - * The file extension (if any) such as '.html' - */ - ext?: string | undefined; - /** - * The file name without extension (if any) such as 'index' - */ - name?: string | undefined; - } - /** - * Normalize a string path, reducing '..' and '.' parts. - * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory. - * - * @param path string path to normalize. - * @throws {TypeError} if `path` is not a string. - */ - function normalize(path: string): string; - /** - * Join all arguments together and normalize the resulting path. - * - * @param paths paths to join. - * @throws {TypeError} if any of the path segments is not a string. - */ - function join(...paths: string[]): string; - /** - * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. - * - * Starting from leftmost {from} parameter, resolves {to} to an absolute path. - * - * If {to} isn't already absolute, {from} arguments are prepended in right to left order, - * until an absolute path is found. If after using all {from} paths still no absolute path is found, - * the current working directory is used as well. The resulting path is normalized, - * and trailing slashes are removed unless the path gets resolved to the root directory. - * - * @param paths A sequence of paths or path segments. - * @throws {TypeError} if any of the arguments is not a string. - */ - function resolve(...paths: string[]): string; - /** - * The `path.matchesGlob()` method determines if `path` matches the `pattern`. - * @param path The path to glob-match against. - * @param pattern The glob to check the path against. - * @returns Whether or not the `path` matched the `pattern`. - * @throws {TypeError} if `path` or `pattern` are not strings. - * @since v22.5.0 - */ - function matchesGlob(path: string, pattern: string): boolean; - /** - * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. - * - * If the given {path} is a zero-length string, `false` will be returned. - * - * @param path path to test. - * @throws {TypeError} if `path` is not a string. - */ - function isAbsolute(path: string): boolean; - /** - * Solve the relative path from {from} to {to} based on the current working directory. - * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. - * - * @throws {TypeError} if either `from` or `to` is not a string. - */ - function relative(from: string, to: string): string; - /** - * Return the directory name of a path. Similar to the Unix dirname command. - * - * @param path the path to evaluate. - * @throws {TypeError} if `path` is not a string. - */ - function dirname(path: string): string; - /** - * Return the last portion of a path. Similar to the Unix basename command. - * Often used to extract the file name from a fully qualified path. - * - * @param path the path to evaluate. - * @param suffix optionally, an extension to remove from the result. - * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string. - */ - function basename(path: string, suffix?: string): string; - /** - * Return the extension of the path, from the last '.' to end of string in the last portion of the path. - * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string. - * - * @param path the path to evaluate. - * @throws {TypeError} if `path` is not a string. - */ - function extname(path: string): string; - /** - * The platform-specific file separator. '\\' or '/'. - */ - const sep: "\\" | "/"; - /** - * The platform-specific file delimiter. ';' or ':'. - */ - const delimiter: ";" | ":"; - /** - * Returns an object from a path string - the opposite of format(). - * - * @param path path to evaluate. - * @throws {TypeError} if `path` is not a string. - */ - function parse(path: string): ParsedPath; - /** - * Returns a path string from an object - the opposite of parse(). - * - * @param pathObject path to evaluate. - */ - function format(pathObject: FormatInputPathObject): string; - /** - * On Windows systems only, returns an equivalent namespace-prefixed path for the given path. - * If path is not a string, path will be returned without modifications. - * This method is meaningful only on Windows system. - * On POSIX systems, the method is non-operational and always returns path without modifications. - */ - function toNamespacedPath(path: string): string; - } - namespace path { - export { - /** - * The `path.posix` property provides access to POSIX specific implementations of the `path` methods. - * - * The API is accessible via `require('node:path').posix` or `require('node:path/posix')`. - */ - path as posix, - /** - * The `path.win32` property provides access to Windows-specific implementations of the `path` methods. - * - * The API is accessible via `require('node:path').win32` or `require('node:path/win32')`. - */ - path as win32, - }; - } - export = path; -} -declare module "path" { - import path = require("node:path"); - export = path; -} diff --git a/node_modules/@types/node/path/posix.d.ts b/node_modules/@types/node/path/posix.d.ts deleted file mode 100644 index d60f629..0000000 --- a/node_modules/@types/node/path/posix.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare module "node:path/posix" { - import path = require("node:path"); - export = path.posix; -} -declare module "path/posix" { - import path = require("path"); - export = path.posix; -} diff --git a/node_modules/@types/node/path/win32.d.ts b/node_modules/@types/node/path/win32.d.ts deleted file mode 100644 index e6aa9fa..0000000 --- a/node_modules/@types/node/path/win32.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare module "node:path/win32" { - import path = require("node:path"); - export = path.win32; -} -declare module "path/win32" { - import path = require("path"); - export = path.win32; -} diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts deleted file mode 100644 index 46e725c..0000000 --- a/node_modules/@types/node/perf_hooks.d.ts +++ /dev/null @@ -1,612 +0,0 @@ -declare module "node:perf_hooks" { - import { InternalEventTargetEventProperties } from "node:events"; - // #region web types - type EntryType = - | "dns" // Node.js only - | "function" // Node.js only - | "gc" // Node.js only - | "http2" // Node.js only - | "http" // Node.js only - | "mark" // available on the Web - | "measure" // available on the Web - | "net" // Node.js only - | "node" // Node.js only - | "resource"; // available on the Web - interface ConnectionTimingInfo { - domainLookupStartTime: number; - domainLookupEndTime: number; - connectionStartTime: number; - connectionEndTime: number; - secureConnectionStartTime: number; - ALPNNegotiatedProtocol: string; - } - interface FetchTimingInfo { - startTime: number; - redirectStartTime: number; - redirectEndTime: number; - postRedirectStartTime: number; - finalServiceWorkerStartTime: number; - finalNetworkRequestStartTime: number; - finalNetworkResponseStartTime: number; - endTime: number; - finalConnectionTimingInfo: ConnectionTimingInfo | null; - encodedBodySize: number; - decodedBodySize: number; - } - type PerformanceEntryList = PerformanceEntry[]; - interface PerformanceMarkOptions { - detail?: any; - startTime?: number; - } - interface PerformanceMeasureOptions { - detail?: any; - duration?: number; - end?: string | number; - start?: string | number; - } - interface PerformanceObserverCallback { - (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void; - } - interface PerformanceObserverInit { - buffered?: boolean; - entryTypes?: EntryType[]; - type?: EntryType; - } - // TODO: remove in next major - /** @deprecated Use `TimerifyOptions` instead. */ - interface PerformanceTimerifyOptions extends TimerifyOptions {} - interface PerformanceEventMap { - "resourcetimingbufferfull": Event; - } - interface Performance extends EventTarget, InternalEventTargetEventProperties { - readonly nodeTiming: PerformanceNodeTiming; - readonly timeOrigin: number; - clearMarks(markName?: string): void; - clearMeasures(measureName?: string): void; - clearResourceTimings(resourceTimingName?: string): void; - getEntries(): PerformanceEntryList; - getEntriesByName(name: string, type?: EntryType): PerformanceEntryList; - getEntriesByType(type: EntryType): PerformanceEntryList; - mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; - markResourceTiming( - timingInfo: FetchTimingInfo, - requestedUrl: string, - initiatorType: string, - global: unknown, - cacheMode: string, - bodyInfo: unknown, - responseStatus: number, - deliveryType?: string, - ): PerformanceResourceTiming; - measure(measureName: string, startMark?: string, endMark?: string): PerformanceMeasure; - measure(measureName: string, options: PerformanceMeasureOptions, endMark?: string): PerformanceMeasure; - now(): number; - setResourceTimingBufferSize(maxSize: number): void; - toJSON(): any; - addEventListener( - type: K, - listener: (ev: PerformanceEventMap[K]) => void, - options?: AddEventListenerOptions | boolean, - ): void; - addEventListener( - type: string, - listener: EventListener | EventListenerObject, - options?: AddEventListenerOptions | boolean, - ): void; - removeEventListener( - type: K, - listener: (ev: PerformanceEventMap[K]) => void, - options?: EventListenerOptions | boolean, - ): void; - removeEventListener( - type: string, - listener: EventListener | EventListenerObject, - options?: EventListenerOptions | boolean, - ): void; - /** - * This is an alias of `perf_hooks.eventLoopUtilization()`. - * - * _This property is an extension by Node.js. It is not available in Web browsers._ - * @since v14.10.0, v12.19.0 - * @param utilization1 The result of a previous call to - * `eventLoopUtilization()`. - * @param utilization2 The result of a previous call to - * `eventLoopUtilization()` prior to `utilization1`. - */ - eventLoopUtilization( - utilization1?: EventLoopUtilization, - utilization2?: EventLoopUtilization, - ): EventLoopUtilization; - /** - * This is an alias of `perf_hooks.timerify()`. - * - * _This property is an extension by Node.js. It is not available in Web browsers._ - * @since v8.5.0 - */ - timerify any>(fn: T, options?: TimerifyOptions): T; - } - var Performance: { - prototype: Performance; - new(): Performance; - }; - interface PerformanceEntry { - readonly duration: number; - readonly entryType: EntryType; - readonly name: string; - readonly startTime: number; - toJSON(): any; - } - var PerformanceEntry: { - prototype: PerformanceEntry; - new(): PerformanceEntry; - }; - interface PerformanceMark extends PerformanceEntry { - readonly detail: any; - readonly entryType: "mark"; - } - var PerformanceMark: { - prototype: PerformanceMark; - new(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; - }; - interface PerformanceMeasure extends PerformanceEntry { - readonly detail: any; - readonly entryType: "measure"; - } - var PerformanceMeasure: { - prototype: PerformanceMeasure; - new(): PerformanceMeasure; - }; - interface PerformanceObserver { - disconnect(): void; - observe(options: PerformanceObserverInit): void; - takeRecords(): PerformanceEntryList; - } - var PerformanceObserver: { - prototype: PerformanceObserver; - new(callback: PerformanceObserverCallback): PerformanceObserver; - readonly supportedEntryTypes: readonly EntryType[]; - }; - interface PerformanceObserverEntryList { - getEntries(): PerformanceEntryList; - getEntriesByName(name: string, type?: EntryType): PerformanceEntryList; - getEntriesByType(type: EntryType): PerformanceEntryList; - } - var PerformanceObserverEntryList: { - prototype: PerformanceObserverEntryList; - new(): PerformanceObserverEntryList; - }; - interface PerformanceResourceTiming extends PerformanceEntry { - readonly connectEnd: number; - readonly connectStart: number; - readonly decodedBodySize: number; - readonly domainLookupEnd: number; - readonly domainLookupStart: number; - readonly encodedBodySize: number; - readonly entryType: "resource"; - readonly fetchStart: number; - readonly initiatorType: string; - readonly nextHopProtocol: string; - readonly redirectEnd: number; - readonly redirectStart: number; - readonly requestStart: number; - readonly responseEnd: number; - readonly responseStart: number; - readonly responseStatus: number; - readonly secureConnectionStart: number; - readonly transferSize: number; - readonly workerStart: number; - toJSON(): any; - } - var PerformanceResourceTiming: { - prototype: PerformanceResourceTiming; - new(): PerformanceResourceTiming; - }; - var performance: Performance; - // #endregion - /** - * _This class is an extension by Node.js. It is not available in Web browsers._ - * - * Provides detailed Node.js timing data. - * - * The constructor of this class is not exposed to users directly. - * @since v19.0.0 - */ - class PerformanceNodeEntry extends PerformanceEntry { - /** - * Additional detail specific to the `entryType`. - * @since v16.0.0 - */ - readonly detail: any; - readonly entryType: "dns" | "function" | "gc" | "http2" | "http" | "net" | "node"; - } - interface UVMetrics { - /** - * Number of event loop iterations. - */ - readonly loopCount: number; - /** - * Number of events that have been processed by the event handler. - */ - readonly events: number; - /** - * Number of events that were waiting to be processed when the event provider was called. - */ - readonly eventsWaiting: number; - } - /** - * _This property is an extension by Node.js. It is not available in Web browsers._ - * - * Provides timing details for Node.js itself. The constructor of this class - * is not exposed to users. - * @since v8.5.0 - */ - interface PerformanceNodeTiming extends PerformanceEntry { - /** - * The high resolution millisecond timestamp at which the Node.js process - * completed bootstrapping. If bootstrapping has not yet finished, the property - * has the value of -1. - * @since v8.5.0 - */ - readonly bootstrapComplete: number; - readonly entryType: "node"; - /** - * The high resolution millisecond timestamp at which the Node.js environment was - * initialized. - * @since v8.5.0 - */ - readonly environment: number; - /** - * The high resolution millisecond timestamp of the amount of time the event loop - * has been idle within the event loop's event provider (e.g. `epoll_wait`). This - * does not take CPU usage into consideration. If the event loop has not yet - * started (e.g., in the first tick of the main script), the property has the - * value of 0. - * @since v14.10.0, v12.19.0 - */ - readonly idleTime: number; - /** - * The high resolution millisecond timestamp at which the Node.js event loop - * exited. If the event loop has not yet exited, the property has the value of -1\. - * It can only have a value of not -1 in a handler of the `'exit'` event. - * @since v8.5.0 - */ - readonly loopExit: number; - /** - * The high resolution millisecond timestamp at which the Node.js event loop - * started. If the event loop has not yet started (e.g., in the first tick of the - * main script), the property has the value of -1. - * @since v8.5.0 - */ - readonly loopStart: number; - /** - * The high resolution millisecond timestamp at which the Node.js process was initialized. - * @since v8.5.0 - */ - readonly nodeStart: number; - /** - * This is a wrapper to the `uv_metrics_info` function. - * It returns the current set of event loop metrics. - * - * It is recommended to use this property inside a function whose execution was - * scheduled using `setImmediate` to avoid collecting metrics before finishing all - * operations scheduled during the current loop iteration. - * @since v22.8.0, v20.18.0 - */ - readonly uvMetricsInfo: UVMetrics; - /** - * The high resolution millisecond timestamp at which the V8 platform was - * initialized. - * @since v8.5.0 - */ - readonly v8Start: number; - } - namespace constants { - const NODE_PERFORMANCE_GC_MAJOR: number; - const NODE_PERFORMANCE_GC_MINOR: number; - const NODE_PERFORMANCE_GC_INCREMENTAL: number; - const NODE_PERFORMANCE_GC_WEAKCB: number; - const NODE_PERFORMANCE_GC_FLAGS_NO: number; - const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number; - const NODE_PERFORMANCE_GC_FLAGS_FORCED: number; - const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number; - const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number; - const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number; - const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number; - } - interface EventLoopMonitorOptions { - /** - * The sampling rate in milliseconds. - * Must be greater than zero. - * @default 10 - */ - resolution?: number | undefined; - } - interface Histogram { - /** - * The number of samples recorded by the histogram. - * @since v17.4.0, v16.14.0 - */ - readonly count: number; - /** - * The number of samples recorded by the histogram. - * v17.4.0, v16.14.0 - */ - readonly countBigInt: bigint; - /** - * The number of times the event loop delay exceeded the maximum 1 hour event - * loop delay threshold. - * @since v11.10.0 - */ - readonly exceeds: number; - /** - * The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold. - * @since v17.4.0, v16.14.0 - */ - readonly exceedsBigInt: bigint; - /** - * The maximum recorded event loop delay. - * @since v11.10.0 - */ - readonly max: number; - /** - * The maximum recorded event loop delay. - * v17.4.0, v16.14.0 - */ - readonly maxBigInt: number; - /** - * The mean of the recorded event loop delays. - * @since v11.10.0 - */ - readonly mean: number; - /** - * The minimum recorded event loop delay. - * @since v11.10.0 - */ - readonly min: number; - /** - * The minimum recorded event loop delay. - * v17.4.0, v16.14.0 - */ - readonly minBigInt: bigint; - /** - * Returns the value at the given percentile. - * @since v11.10.0 - * @param percentile A percentile value in the range (0, 100]. - */ - percentile(percentile: number): number; - /** - * Returns the value at the given percentile. - * @since v17.4.0, v16.14.0 - * @param percentile A percentile value in the range (0, 100]. - */ - percentileBigInt(percentile: number): bigint; - /** - * Returns a `Map` object detailing the accumulated percentile distribution. - * @since v11.10.0 - */ - readonly percentiles: Map; - /** - * Returns a `Map` object detailing the accumulated percentile distribution. - * @since v17.4.0, v16.14.0 - */ - readonly percentilesBigInt: Map; - /** - * Resets the collected histogram data. - * @since v11.10.0 - */ - reset(): void; - /** - * The standard deviation of the recorded event loop delays. - * @since v11.10.0 - */ - readonly stddev: number; - } - interface IntervalHistogram extends Histogram { - /** - * Enables the update interval timer. Returns `true` if the timer was - * started, `false` if it was already started. - * @since v11.10.0 - */ - enable(): boolean; - /** - * Disables the update interval timer. Returns `true` if the timer was - * stopped, `false` if it was already stopped. - * @since v11.10.0 - */ - disable(): boolean; - /** - * Disables the update interval timer when the histogram is disposed. - * - * ```js - * const { monitorEventLoopDelay } = require('node:perf_hooks'); - * { - * using hist = monitorEventLoopDelay({ resolution: 20 }); - * hist.enable(); - * // The histogram will be disabled when the block is exited. - * } - * ``` - * @since v24.2.0 - */ - [Symbol.dispose](): void; - } - interface RecordableHistogram extends Histogram { - /** - * @since v15.9.0, v14.18.0 - * @param val The amount to record in the histogram. - */ - record(val: number | bigint): void; - /** - * Calculates the amount of time (in nanoseconds) that has passed since the - * previous call to `recordDelta()` and records that amount in the histogram. - * @since v15.9.0, v14.18.0 - */ - recordDelta(): void; - /** - * Adds the values from `other` to this histogram. - * @since v17.4.0, v16.14.0 - */ - add(other: RecordableHistogram): void; - } - interface EventLoopUtilization { - idle: number; - active: number; - utilization: number; - } - /** - * The `eventLoopUtilization()` function returns an object that contains the - * cumulative duration of time the event loop has been both idle and active as a - * high resolution milliseconds timer. The `utilization` value is the calculated - * Event Loop Utilization (ELU). - * - * If bootstrapping has not yet finished on the main thread the properties have - * the value of `0`. The ELU is immediately available on [Worker threads](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html#worker-threads) since - * bootstrap happens within the event loop. - * - * Both `utilization1` and `utilization2` are optional parameters. - * - * If `utilization1` is passed, then the delta between the current call's `active` - * and `idle` times, as well as the corresponding `utilization` value are - * calculated and returned (similar to `process.hrtime()`). - * - * If `utilization1` and `utilization2` are both passed, then the delta is - * calculated between the two arguments. This is a convenience option because, - * unlike `process.hrtime()`, calculating the ELU is more complex than a - * single subtraction. - * - * ELU is similar to CPU utilization, except that it only measures event loop - * statistics and not CPU usage. It represents the percentage of time the event - * loop has spent outside the event loop's event provider (e.g. `epoll_wait`). - * No other CPU idle time is taken into consideration. The following is an example - * of how a mostly idle process will have a high ELU. - * - * ```js - * import { eventLoopUtilization } from 'node:perf_hooks'; - * import { spawnSync } from 'node:child_process'; - * - * setImmediate(() => { - * const elu = eventLoopUtilization(); - * spawnSync('sleep', ['5']); - * console.log(eventLoopUtilization(elu).utilization); - * }); - * ``` - * - * Although the CPU is mostly idle while running this script, the value of - * `utilization` is `1`. This is because the call to - * `child_process.spawnSync()` blocks the event loop from proceeding. - * - * Passing in a user-defined object instead of the result of a previous call to - * `eventLoopUtilization()` will lead to undefined behavior. The return values - * are not guaranteed to reflect any correct state of the event loop. - * @since v25.2.0 - * @param utilization1 The result of a previous call to - * `eventLoopUtilization()`. - * @param utilization2 The result of a previous call to - * `eventLoopUtilization()` prior to `utilization1`. - */ - function eventLoopUtilization( - utilization1?: EventLoopUtilization, - utilization2?: EventLoopUtilization, - ): EventLoopUtilization; - /** - * _This property is an extension by Node.js. It is not available in Web browsers._ - * - * Creates an `IntervalHistogram` object that samples and reports the event loop - * delay over time. The delays will be reported in nanoseconds. - * - * Using a timer to detect approximate event loop delay works because the - * execution of timers is tied specifically to the lifecycle of the libuv - * event loop. That is, a delay in the loop will cause a delay in the execution - * of the timer, and those delays are specifically what this API is intended to - * detect. - * - * ```js - * import { monitorEventLoopDelay } from 'node:perf_hooks'; - * const h = monitorEventLoopDelay({ resolution: 20 }); - * h.enable(); - * // Do something. - * h.disable(); - * console.log(h.min); - * console.log(h.max); - * console.log(h.mean); - * console.log(h.stddev); - * console.log(h.percentiles); - * console.log(h.percentile(50)); - * console.log(h.percentile(99)); - * ``` - * @since v11.10.0 - */ - function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram; - interface TimerifyOptions { - /** - * A histogram object created using - * `perf_hooks.createHistogram()` that will record runtime durations in - * nanoseconds. - */ - histogram?: RecordableHistogram | undefined; - } - /** - * _This property is an extension by Node.js. It is not available in Web browsers._ - * - * Wraps a function within a new function that measures the running time of the - * wrapped function. A `PerformanceObserver` must be subscribed to the `'function'` - * event type in order for the timing details to be accessed. - * - * ```js - * import { timerify, performance, PerformanceObserver } from 'node:perf_hooks'; - * - * function someFunction() { - * console.log('hello world'); - * } - * - * const wrapped = timerify(someFunction); - * - * const obs = new PerformanceObserver((list) => { - * console.log(list.getEntries()[0].duration); - * - * performance.clearMarks(); - * performance.clearMeasures(); - * obs.disconnect(); - * }); - * obs.observe({ entryTypes: ['function'] }); - * - * // A performance timeline entry will be created - * wrapped(); - * ``` - * - * If the wrapped function returns a promise, a finally handler will be attached - * to the promise and the duration will be reported once the finally handler is - * invoked. - * @since v25.2.0 - */ - function timerify any>(fn: T, options?: TimerifyOptions): T; - interface CreateHistogramOptions { - /** - * The minimum recordable value. Must be an integer value greater than 0. - * @default 1 - */ - lowest?: number | bigint | undefined; - /** - * The maximum recordable value. Must be an integer value greater than min. - * @default Number.MAX_SAFE_INTEGER - */ - highest?: number | bigint | undefined; - /** - * The number of accuracy digits. Must be a number between 1 and 5. - * @default 3 - */ - figures?: number | undefined; - } - /** - * Returns a `RecordableHistogram`. - * @since v15.9.0, v14.18.0 - */ - function createHistogram(options?: CreateHistogramOptions): RecordableHistogram; - // TODO: remove these in a future major - /** @deprecated Use the canonical `PerformanceMarkOptions` instead. */ - interface MarkOptions extends PerformanceMarkOptions {} - /** @deprecated Use the canonical `PerformanceMeasureOptions` instead. */ - interface MeasureOptions extends PerformanceMeasureOptions {} -} -declare module "perf_hooks" { - export * from "node:perf_hooks"; -} diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts deleted file mode 100644 index 00ab94e..0000000 --- a/node_modules/@types/node/process.d.ts +++ /dev/null @@ -1,2204 +0,0 @@ -declare module "node:process" { - import { Control, MessageOptions, SendHandle } from "node:child_process"; - import { PathLike } from "node:fs"; - import * as tty from "node:tty"; - import { Worker } from "node:worker_threads"; - interface BuiltInModule { - "assert": typeof import("assert"); - "node:assert": typeof import("node:assert"); - "assert/strict": typeof import("assert/strict"); - "node:assert/strict": typeof import("node:assert/strict"); - "async_hooks": typeof import("async_hooks"); - "node:async_hooks": typeof import("node:async_hooks"); - "buffer": typeof import("buffer"); - "node:buffer": typeof import("node:buffer"); - "child_process": typeof import("child_process"); - "node:child_process": typeof import("node:child_process"); - "cluster": typeof import("cluster"); - "node:cluster": typeof import("node:cluster"); - "console": typeof import("console"); - "node:console": typeof import("node:console"); - "constants": typeof import("constants"); - "node:constants": typeof import("node:constants"); - "crypto": typeof import("crypto"); - "node:crypto": typeof import("node:crypto"); - "dgram": typeof import("dgram"); - "node:dgram": typeof import("node:dgram"); - "diagnostics_channel": typeof import("diagnostics_channel"); - "node:diagnostics_channel": typeof import("node:diagnostics_channel"); - "dns": typeof import("dns"); - "node:dns": typeof import("node:dns"); - "dns/promises": typeof import("dns/promises"); - "node:dns/promises": typeof import("node:dns/promises"); - "domain": typeof import("domain"); - "node:domain": typeof import("node:domain"); - "events": typeof import("events"); - "node:events": typeof import("node:events"); - "fs": typeof import("fs"); - "node:fs": typeof import("node:fs"); - "fs/promises": typeof import("fs/promises"); - "node:fs/promises": typeof import("node:fs/promises"); - "http": typeof import("http"); - "node:http": typeof import("node:http"); - "http2": typeof import("http2"); - "node:http2": typeof import("node:http2"); - "https": typeof import("https"); - "node:https": typeof import("node:https"); - "inspector": typeof import("inspector"); - "node:inspector": typeof import("node:inspector"); - "inspector/promises": typeof import("inspector/promises"); - "node:inspector/promises": typeof import("node:inspector/promises"); - "module": typeof import("module"); - "node:module": typeof import("node:module"); - "net": typeof import("net"); - "node:net": typeof import("node:net"); - "os": typeof import("os"); - "node:os": typeof import("node:os"); - "path": typeof import("path"); - "node:path": typeof import("node:path"); - "path/posix": typeof import("path/posix"); - "node:path/posix": typeof import("node:path/posix"); - "path/win32": typeof import("path/win32"); - "node:path/win32": typeof import("node:path/win32"); - "perf_hooks": typeof import("perf_hooks"); - "node:perf_hooks": typeof import("node:perf_hooks"); - "process": typeof import("process"); - "node:process": typeof import("node:process"); - "punycode": typeof import("punycode"); - "node:punycode": typeof import("node:punycode"); - "querystring": typeof import("querystring"); - "node:querystring": typeof import("node:querystring"); - "node:quic": typeof import("node:quic"); - "readline": typeof import("readline"); - "node:readline": typeof import("node:readline"); - "readline/promises": typeof import("readline/promises"); - "node:readline/promises": typeof import("node:readline/promises"); - "repl": typeof import("repl"); - "node:repl": typeof import("node:repl"); - "node:sea": typeof import("node:sea"); - "node:sqlite": typeof import("node:sqlite"); - "stream": typeof import("stream"); - "node:stream": typeof import("node:stream"); - "stream/consumers": typeof import("stream/consumers"); - "node:stream/consumers": typeof import("node:stream/consumers"); - "stream/promises": typeof import("stream/promises"); - "node:stream/promises": typeof import("node:stream/promises"); - "stream/web": typeof import("stream/web"); - "node:stream/web": typeof import("node:stream/web"); - "string_decoder": typeof import("string_decoder"); - "node:string_decoder": typeof import("node:string_decoder"); - "node:test": typeof import("node:test"); - "node:test/reporters": typeof import("node:test/reporters"); - "timers": typeof import("timers"); - "node:timers": typeof import("node:timers"); - "timers/promises": typeof import("timers/promises"); - "node:timers/promises": typeof import("node:timers/promises"); - "tls": typeof import("tls"); - "node:tls": typeof import("node:tls"); - "trace_events": typeof import("trace_events"); - "node:trace_events": typeof import("node:trace_events"); - "tty": typeof import("tty"); - "node:tty": typeof import("node:tty"); - "url": typeof import("url"); - "node:url": typeof import("node:url"); - "util": typeof import("util"); - "node:util": typeof import("node:util"); - "util/types": typeof import("util/types"); - "node:util/types": typeof import("node:util/types"); - "v8": typeof import("v8"); - "node:v8": typeof import("node:v8"); - "vm": typeof import("vm"); - "node:vm": typeof import("node:vm"); - "wasi": typeof import("wasi"); - "node:wasi": typeof import("node:wasi"); - "worker_threads": typeof import("worker_threads"); - "node:worker_threads": typeof import("node:worker_threads"); - "zlib": typeof import("zlib"); - "node:zlib": typeof import("node:zlib"); - } - type SignalsEventMap = { [S in NodeJS.Signals]: [signal: S] }; - interface ProcessEventMap extends SignalsEventMap { - "beforeExit": [code: number]; - "disconnect": []; - "exit": [code: number]; - "message": [ - message: object | boolean | number | string | null, - sendHandle: SendHandle | undefined, - ]; - "rejectionHandled": [promise: Promise]; - "uncaughtException": [error: Error, origin: NodeJS.UncaughtExceptionOrigin]; - "uncaughtExceptionMonitor": [error: Error, origin: NodeJS.UncaughtExceptionOrigin]; - "unhandledRejection": [reason: unknown, promise: Promise]; - "warning": [warning: Error]; - "worker": [worker: Worker]; - "workerMessage": [value: any, source: number]; - } - global { - var process: NodeJS.Process; - namespace process { - export { ProcessEventMap }; - } - namespace NodeJS { - // this namespace merge is here because these are specifically used - // as the type for process.stdin, process.stdout, and process.stderr. - // they can't live in tty.d.ts because we need to disambiguate the imported name. - interface ReadStream extends tty.ReadStream {} - interface WriteStream extends tty.WriteStream {} - interface MemoryUsageFn { - /** - * The `process.memoryUsage()` method iterate over each page to gather informations about memory - * usage which can be slow depending on the program memory allocations. - */ - (): MemoryUsage; - /** - * method returns an integer representing the Resident Set Size (RSS) in bytes. - */ - rss(): number; - } - interface MemoryUsage { - /** - * Resident Set Size, is the amount of space occupied in the main memory device (that is a subset of the total allocated memory) for the - * process, including all C++ and JavaScript objects and code. - */ - rss: number; - /** - * Refers to V8's memory usage. - */ - heapTotal: number; - /** - * Refers to V8's memory usage. - */ - heapUsed: number; - external: number; - /** - * Refers to memory allocated for `ArrayBuffer`s and `SharedArrayBuffer`s, including all Node.js Buffers. This is also included - * in the external value. When Node.js is used as an embedded library, this value may be `0` because allocations for `ArrayBuffer`s - * may not be tracked in that case. - */ - arrayBuffers: number; - } - interface CpuUsage { - user: number; - system: number; - } - interface ProcessRelease { - name: string; - sourceUrl?: string | undefined; - headersUrl?: string | undefined; - libUrl?: string | undefined; - lts?: string | undefined; - } - interface ProcessFeatures { - /** - * A boolean value that is `true` if the current Node.js build is caching builtin modules. - * @since v12.0.0 - */ - readonly cached_builtins: boolean; - /** - * A boolean value that is `true` if the current Node.js build is a debug build. - * @since v0.5.5 - */ - readonly debug: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes the inspector. - * @since v11.10.0 - */ - readonly inspector: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for IPv6. - * - * Since all Node.js builds have IPv6 support, this value is always `true`. - * @since v0.5.3 - * @deprecated This property is always true, and any checks based on it are redundant. - */ - readonly ipv6: boolean; - /** - * A boolean value that is `true` if the current Node.js build supports - * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v25.x/api/modules.md#loading-ecmascript-modules-using-require). - * @since v22.10.0 - */ - readonly require_module: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for TLS. - * @since v0.5.3 - */ - readonly tls: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for ALPN in TLS. - * - * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional ALPN support. - * This value is therefore identical to that of `process.features.tls`. - * @since v4.8.0 - * @deprecated Use `process.features.tls` instead. - */ - readonly tls_alpn: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for OCSP in TLS. - * - * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional OCSP support. - * This value is therefore identical to that of `process.features.tls`. - * @since v0.11.13 - * @deprecated Use `process.features.tls` instead. - */ - readonly tls_ocsp: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for SNI in TLS. - * - * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional SNI support. - * This value is therefore identical to that of `process.features.tls`. - * @since v0.5.3 - * @deprecated Use `process.features.tls` instead. - */ - readonly tls_sni: boolean; - /** - * A value that is `"strip"` by default, - * `"transform"` if Node.js is run with `--experimental-transform-types`, and `false` if - * Node.js is run with `--no-strip-types`. - * @since v22.10.0 - */ - readonly typescript: "strip" | "transform" | false; - /** - * A boolean value that is `true` if the current Node.js build includes support for libuv. - * - * Since it's not possible to build Node.js without libuv, this value is always `true`. - * @since v0.5.3 - * @deprecated This property is always true, and any checks based on it are redundant. - */ - readonly uv: boolean; - } - interface ProcessVersions extends Dict { - http_parser: string; - node: string; - v8: string; - ares: string; - uv: string; - zlib: string; - modules: string; - openssl: string; - } - type Platform = - | "aix" - | "android" - | "darwin" - | "freebsd" - | "haiku" - | "linux" - | "openbsd" - | "sunos" - | "win32" - | "cygwin" - | "netbsd"; - type Architecture = - | "arm" - | "arm64" - | "ia32" - | "loong64" - | "mips" - | "mipsel" - | "ppc64" - | "riscv64" - | "s390x" - | "x64"; - type Signals = - | "SIGABRT" - | "SIGALRM" - | "SIGBUS" - | "SIGCHLD" - | "SIGCONT" - | "SIGFPE" - | "SIGHUP" - | "SIGILL" - | "SIGINT" - | "SIGIO" - | "SIGIOT" - | "SIGKILL" - | "SIGPIPE" - | "SIGPOLL" - | "SIGPROF" - | "SIGPWR" - | "SIGQUIT" - | "SIGSEGV" - | "SIGSTKFLT" - | "SIGSTOP" - | "SIGSYS" - | "SIGTERM" - | "SIGTRAP" - | "SIGTSTP" - | "SIGTTIN" - | "SIGTTOU" - | "SIGUNUSED" - | "SIGURG" - | "SIGUSR1" - | "SIGUSR2" - | "SIGVTALRM" - | "SIGWINCH" - | "SIGXCPU" - | "SIGXFSZ" - | "SIGBREAK" - | "SIGLOST" - | "SIGINFO"; - type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection"; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['beforeExit']) => { ... }; - * ``` - */ - type BeforeExitListener = (...args: ProcessEventMap["beforeExit"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['disconnect']) => { ... }; - * ``` - */ - type DisconnectListener = (...args: ProcessEventMap["disconnect"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['exit']) => { ... }; - * ``` - */ - type ExitListener = (...args: ProcessEventMap["exit"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['message']) => { ... }; - * ``` - */ - type MessageListener = (...args: ProcessEventMap["message"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['rejectionHandled']) => { ... }; - * ``` - */ - type RejectionHandledListener = (...args: ProcessEventMap["rejectionHandled"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - */ - type SignalsListener = (signal: Signals) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['uncaughtException']) => { ... }; - * ``` - */ - type UncaughtExceptionListener = (...args: ProcessEventMap["uncaughtException"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['unhandledRejection']) => { ... }; - * ``` - */ - type UnhandledRejectionListener = (...args: ProcessEventMap["unhandledRejection"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['warning']) => { ... }; - * ``` - */ - type WarningListener = (...args: ProcessEventMap["warning"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['worker']) => { ... }; - * ``` - */ - type WorkerListener = (...args: ProcessEventMap["worker"]) => void; - interface Socket extends ReadWriteStream { - isTTY?: true | undefined; - } - // Alias for compatibility - interface ProcessEnv extends Dict {} - interface HRTime { - /** - * This is the legacy version of {@link process.hrtime.bigint()} - * before bigint was introduced in JavaScript. - * - * The `process.hrtime()` method returns the current high-resolution real time in a `[seconds, nanoseconds]` tuple `Array`, - * where `nanoseconds` is the remaining part of the real time that can't be represented in second precision. - * - * `time` is an optional parameter that must be the result of a previous `process.hrtime()` call to diff with the current time. - * If the parameter passed in is not a tuple `Array`, a TypeError will be thrown. - * Passing in a user-defined array instead of the result of a previous call to `process.hrtime()` will lead to undefined behavior. - * - * These times are relative to an arbitrary time in the past, - * and not related to the time of day and therefore not subject to clock drift. - * The primary use is for measuring performance between intervals: - * ```js - * const { hrtime } = require('node:process'); - * const NS_PER_SEC = 1e9; - * const time = hrtime(); - * // [ 1800216, 25 ] - * - * setTimeout(() => { - * const diff = hrtime(time); - * // [ 1, 552 ] - * - * console.log(`Benchmark took ${diff[0] * NS_PER_SEC + diff[1]} nanoseconds`); - * // Benchmark took 1000000552 nanoseconds - * }, 1000); - * ``` - * @since 0.7.6 - * @legacy Use {@link process.hrtime.bigint()} instead. - * @param time The result of a previous call to `process.hrtime()` - */ - (time?: [number, number]): [number, number]; - /** - * The `bigint` version of the {@link process.hrtime()} method returning the current high-resolution real time in nanoseconds as a `bigint`. - * - * Unlike {@link process.hrtime()}, it does not support an additional time argument since the difference can just be computed directly by subtraction of the two `bigint`s. - * ```js - * import { hrtime } from 'node:process'; - * - * const start = hrtime.bigint(); - * // 191051479007711n - * - * setTimeout(() => { - * const end = hrtime.bigint(); - * // 191052633396993n - * - * console.log(`Benchmark took ${end - start} nanoseconds`); - * // Benchmark took 1154389282 nanoseconds - * }, 1000); - * ``` - * @since v10.7.0 - */ - bigint(): bigint; - } - interface ProcessPermission { - /** - * Verifies that the process is able to access the given scope and reference. - * If no reference is provided, a global scope is assumed, for instance, `process.permission.has('fs.read')` - * will check if the process has ALL file system read permissions. - * - * The reference has a meaning based on the provided scope. For example, the reference when the scope is File System means files and folders. - * - * The available scopes are: - * - * * `fs` - All File System - * * `fs.read` - File System read operations - * * `fs.write` - File System write operations - * * `child` - Child process spawning operations - * * `worker` - Worker thread spawning operation - * - * ```js - * // Check if the process has permission to read the README file - * process.permission.has('fs.read', './README.md'); - * // Check if the process has read permission operations - * process.permission.has('fs.read'); - * ``` - * @since v20.0.0 - */ - has(scope: string, reference?: string): boolean; - } - interface ProcessReport { - /** - * Write reports in a compact format, single-line JSON, more easily consumable by log processing systems - * than the default multi-line format designed for human consumption. - * @since v13.12.0, v12.17.0 - */ - compact: boolean; - /** - * Directory where the report is written. - * The default value is the empty string, indicating that reports are written to the current - * working directory of the Node.js process. - */ - directory: string; - /** - * Filename where the report is written. If set to the empty string, the output filename will be comprised - * of a timestamp, PID, and sequence number. The default value is the empty string. - */ - filename: string; - /** - * Returns a JavaScript Object representation of a diagnostic report for the running process. - * The report's JavaScript stack trace is taken from `err`, if present. - */ - getReport(err?: Error): object; - /** - * If true, a diagnostic report is generated on fatal errors, - * such as out of memory errors or failed C++ assertions. - * @default false - */ - reportOnFatalError: boolean; - /** - * If true, a diagnostic report is generated when the process - * receives the signal specified by process.report.signal. - * @default false - */ - reportOnSignal: boolean; - /** - * If true, a diagnostic report is generated on uncaught exception. - * @default false - */ - reportOnUncaughtException: boolean; - /** - * If true, a diagnostic report is generated without the environment variables. - * @default false - */ - excludeEnv: boolean; - /** - * The signal used to trigger the creation of a diagnostic report. - * @default 'SIGUSR2' - */ - signal: Signals; - /** - * Writes a diagnostic report to a file. If filename is not provided, the default filename - * includes the date, time, PID, and a sequence number. - * The report's JavaScript stack trace is taken from `err`, if present. - * - * If the value of filename is set to `'stdout'` or `'stderr'`, the report is written - * to the stdout or stderr of the process respectively. - * @param fileName Name of the file where the report is written. - * This should be a relative path, that will be appended to the directory specified in - * `process.report.directory`, or the current working directory of the Node.js process, - * if unspecified. - * @param err A custom error used for reporting the JavaScript stack. - * @return Filename of the generated report. - */ - writeReport(fileName?: string, err?: Error): string; - writeReport(err?: Error): string; - } - interface ResourceUsage { - fsRead: number; - fsWrite: number; - involuntaryContextSwitches: number; - ipcReceived: number; - ipcSent: number; - majorPageFault: number; - maxRSS: number; - minorPageFault: number; - sharedMemorySize: number; - signalsCount: number; - swappedOut: number; - systemCPUTime: number; - unsharedDataSize: number; - unsharedStackSize: number; - userCPUTime: number; - voluntaryContextSwitches: number; - } - interface EmitWarningOptions { - /** - * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted. - * - * @default 'Warning' - */ - type?: string | undefined; - /** - * A unique identifier for the warning instance being emitted. - */ - code?: string | undefined; - /** - * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace. - * - * @default process.emitWarning - */ - ctor?: Function | undefined; - /** - * Additional text to include with the error. - */ - detail?: string | undefined; - } - interface ProcessConfig { - readonly target_defaults: { - readonly cflags: any[]; - readonly default_configuration: string; - readonly defines: string[]; - readonly include_dirs: string[]; - readonly libraries: string[]; - }; - readonly variables: { - readonly clang: number; - readonly host_arch: string; - readonly node_install_npm: boolean; - readonly node_install_waf: boolean; - readonly node_prefix: string; - readonly node_shared_openssl: boolean; - readonly node_shared_v8: boolean; - readonly node_shared_zlib: boolean; - readonly node_use_dtrace: boolean; - readonly node_use_etw: boolean; - readonly node_use_openssl: boolean; - readonly target_arch: string; - readonly v8_no_strict_aliasing: number; - readonly v8_use_snapshot: boolean; - readonly visibility: string; - }; - } - interface Process extends EventEmitter { - /** - * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is - * a `Writable` stream. - * - * For example, to copy `process.stdin` to `process.stdout`: - * - * ```js - * import { stdin, stdout } from 'node:process'; - * - * stdin.pipe(stdout); - * ``` - * - * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information. - */ - stdout: WriteStream & { - fd: 1; - }; - /** - * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is - * a `Writable` stream. - * - * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information. - */ - stderr: WriteStream & { - fd: 2; - }; - /** - * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is - * a `Readable` stream. - * - * For details of how to read from `stdin` see `readable.read()`. - * - * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that - * is compatible with scripts written for Node.js prior to v0.10\. - * For more information see `Stream compatibility`. - * - * In "old" streams mode the `stdin` stream is paused by default, so one - * must call `process.stdin.resume()` to read from it. Note also that calling `process.stdin.resume()` itself would switch stream to "old" mode. - */ - stdin: ReadStream & { - fd: 0; - }; - /** - * The `process.argv` property returns an array containing the command-line - * arguments passed when the Node.js process was launched. The first element will - * be {@link execPath}. See `process.argv0` if access to the original value - * of `argv[0]` is needed. The second element will be the path to the JavaScript - * file being executed. If a [program entry point](https://nodejs.org/docs/latest-v25.x/api/cli.html#program-entry-point) was provided, the second element - * will be the absolute path to it. The remaining elements are additional command-line - * arguments. - * - * For example, assuming the following script for `process-args.js`: - * - * ```js - * import { argv } from 'node:process'; - * - * // print process.argv - * argv.forEach((val, index) => { - * console.log(`${index}: ${val}`); - * }); - * ``` - * - * Launching the Node.js process as: - * - * ```bash - * node process-args.js one two=three four - * ``` - * - * Would generate the output: - * - * ```text - * 0: /usr/local/bin/node - * 1: /Users/mjr/work/node/process-args.js - * 2: one - * 3: two=three - * 4: four - * ``` - * @since v0.1.27 - */ - argv: string[]; - /** - * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts. - * - * ```console - * $ bash -c 'exec -a customArgv0 ./node' - * > process.argv[0] - * '/Volumes/code/external/node/out/Release/node' - * > process.argv0 - * 'customArgv0' - * ``` - * @since v6.4.0 - */ - argv0: string; - /** - * The `process.execArgv` property returns the set of Node.js-specific command-line - * options passed when the Node.js process was launched. These options do not - * appear in the array returned by the {@link argv} property, and do not - * include the Node.js executable, the name of the script, or any options following - * the script name. These options are useful in order to spawn child processes with - * the same execution environment as the parent. - * - * ```bash - * node --icu-data-dir=./foo --require ./bar.js script.js --version - * ``` - * - * Results in `process.execArgv`: - * - * ```js - * ["--icu-data-dir=./foo", "--require", "./bar.js"] - * ``` - * - * And `process.argv`: - * - * ```js - * ['/usr/local/bin/node', 'script.js', '--version'] - * ``` - * - * Refer to `Worker constructor` for the detailed behavior of worker - * threads with this property. - * @since v0.7.7 - */ - execArgv: string[]; - /** - * The `process.execPath` property returns the absolute pathname of the executable - * that started the Node.js process. Symbolic links, if any, are resolved. - * - * ```js - * '/usr/local/bin/node' - * ``` - * @since v0.1.100 - */ - execPath: string; - /** - * The `process.abort()` method causes the Node.js process to exit immediately and - * generate a core file. - * - * This feature is not available in `Worker` threads. - * @since v0.7.0 - */ - abort(): never; - /** - * The `process.addUncaughtExceptionCaptureCallback()` function adds a callback - * that will be invoked when an uncaught exception occurs, receiving the exception - * value as its first argument. - * - * Unlike `process.setUncaughtExceptionCaptureCallback()`, this function allows - * multiple callbacks to be registered and does not conflict with the - * [`domain`](https://nodejs.org/docs/latest-v25.x/api/domain.html) module. Callbacks are called in reverse order of registration - * (most recent first). If a callback returns `true`, subsequent callbacks - * and the default uncaught exception handling are skipped. - * - * ```js - * import process from 'node:process'; - * - * process.addUncaughtExceptionCaptureCallback((err) => { - * console.error('Caught exception:', err.message); - * return true; // Indicates exception was handled - * }); - * ``` - * @since v25.9.0 - */ - addUncaughtExceptionCaptureCallback(fn: (err: unknown) => boolean): void; - /** - * The `process.chdir()` method changes the current working directory of the - * Node.js process or throws an exception if doing so fails (for instance, if - * the specified `directory` does not exist). - * - * ```js - * import { chdir, cwd } from 'node:process'; - * - * console.log(`Starting directory: ${cwd()}`); - * try { - * chdir('/tmp'); - * console.log(`New directory: ${cwd()}`); - * } catch (err) { - * console.error(`chdir: ${err}`); - * } - * ``` - * - * This feature is not available in `Worker` threads. - * @since v0.1.17 - */ - chdir(directory: string): void; - /** - * The `process.cwd()` method returns the current working directory of the Node.js - * process. - * - * ```js - * import { cwd } from 'node:process'; - * - * console.log(`Current directory: ${cwd()}`); - * ``` - * @since v0.1.8 - */ - cwd(): string; - /** - * The port used by the Node.js debugger when enabled. - * - * ```js - * import process from 'node:process'; - * - * process.debugPort = 5858; - * ``` - * @since v0.7.2 - */ - debugPort: number; - /** - * The `process.dlopen()` method allows dynamically loading shared objects. It is primarily used by `require()` to load C++ Addons, and - * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()` - * unless there are specific reasons such as custom dlopen flags or loading from ES modules. - * - * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v25.x/api/os.html#dlopen-constants)` - * documentation for details. - * - * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon - * are then accessible via `module.exports`. - * - * The example below shows how to load a C++ Addon, named `local.node`, that exports a `foo` function. All the symbols are loaded before the call returns, by passing the `RTLD_NOW` constant. - * In this example the constant is assumed to be available. - * - * ```js - * import { dlopen } from 'node:process'; - * import { constants } from 'node:os'; - * import { fileURLToPath } from 'node:url'; - * - * const module = { exports: {} }; - * dlopen(module, fileURLToPath(new URL('local.node', import.meta.url)), - * constants.dlopen.RTLD_NOW); - * module.exports.foo(); - * ``` - */ - dlopen(module: object, filename: string, flags?: number): void; - /** - * The `process.emitWarning()` method can be used to emit custom or application - * specific process warnings. These can be listened for by adding a handler to the `'warning'` event. - * - * ```js - * import { emitWarning } from 'node:process'; - * - * // Emit a warning using a string. - * emitWarning('Something happened!'); - * // Emits: (node: 56338) Warning: Something happened! - * ``` - * - * ```js - * import { emitWarning } from 'node:process'; - * - * // Emit a warning using a string and a type. - * emitWarning('Something Happened!', 'CustomWarning'); - * // Emits: (node:56338) CustomWarning: Something Happened! - * ``` - * - * ```js - * import { emitWarning } from 'node:process'; - * - * emitWarning('Something happened!', 'CustomWarning', 'WARN001'); - * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! - * ```js - * - * In each of the previous examples, an `Error` object is generated internally by `process.emitWarning()` and passed through to the `'warning'` handler. - * - * ```js - * import process from 'node:process'; - * - * process.on('warning', (warning) => { - * console.warn(warning.name); // 'Warning' - * console.warn(warning.message); // 'Something happened!' - * console.warn(warning.code); // 'MY_WARNING' - * console.warn(warning.stack); // Stack trace - * console.warn(warning.detail); // 'This is some additional information' - * }); - * ``` - * - * If `warning` is passed as an `Error` object, it will be passed through to the `'warning'` event handler - * unmodified (and the optional `type`, `code` and `ctor` arguments will be ignored): - * - * ```js - * import { emitWarning } from 'node:process'; - * - * // Emit a warning using an Error object. - * const myWarning = new Error('Something happened!'); - * // Use the Error name property to specify the type name - * myWarning.name = 'CustomWarning'; - * myWarning.code = 'WARN001'; - * - * emitWarning(myWarning); - * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! - * ``` - * - * A `TypeError` is thrown if `warning` is anything other than a string or `Error` object. - * - * While process warnings use `Error` objects, the process warning mechanism is not a replacement for normal error handling mechanisms. - * - * The following additional handling is implemented if the warning `type` is `'DeprecationWarning'`: - * * If the `--throw-deprecation` command-line flag is used, the deprecation warning is thrown as an exception rather than being emitted as an event. - * * If the `--no-deprecation` command-line flag is used, the deprecation warning is suppressed. - * * If the `--trace-deprecation` command-line flag is used, the deprecation warning is printed to `stderr` along with the full stack trace. - * @since v8.0.0 - * @param warning The warning to emit. - */ - emitWarning(warning: string | Error, ctor?: Function): void; - emitWarning(warning: string | Error, type?: string, ctor?: Function): void; - emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void; - emitWarning(warning: string | Error, options?: EmitWarningOptions): void; - /** - * The `process.env` property returns an object containing the user environment. - * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html). - * - * An example of this object looks like: - * - * ```js - * { - * TERM: 'xterm-256color', - * SHELL: '/usr/local/bin/bash', - * USER: 'maciej', - * PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin', - * PWD: '/Users/maciej', - * EDITOR: 'vim', - * SHLVL: '1', - * HOME: '/Users/maciej', - * LOGNAME: 'maciej', - * _: '/usr/local/bin/node' - * } - * ``` - * - * It is possible to modify this object, but such modifications will not be - * reflected outside the Node.js process, or (unless explicitly requested) - * to other `Worker` threads. - * In other words, the following example would not work: - * - * ```bash - * node -e 'process.env.foo = "bar"' && echo $foo - * ``` - * - * While the following will: - * - * ```js - * import { env } from 'node:process'; - * - * env.foo = 'bar'; - * console.log(env.foo); - * ``` - * - * Assigning a property on `process.env` will implicitly convert the value - * to a string. **This behavior is deprecated.** Future versions of Node.js may - * throw an error when the value is not a string, number, or boolean. - * - * ```js - * import { env } from 'node:process'; - * - * env.test = null; - * console.log(env.test); - * // => 'null' - * env.test = undefined; - * console.log(env.test); - * // => 'undefined' - * ``` - * - * Use `delete` to delete a property from `process.env`. - * - * ```js - * import { env } from 'node:process'; - * - * env.TEST = 1; - * delete env.TEST; - * console.log(env.TEST); - * // => undefined - * ``` - * - * On Windows operating systems, environment variables are case-insensitive. - * - * ```js - * import { env } from 'node:process'; - * - * env.TEST = 1; - * console.log(env.test); - * // => 1 - * ``` - * - * Unless explicitly specified when creating a `Worker` instance, - * each `Worker` thread has its own copy of `process.env`, based on its - * parent thread's `process.env`, or whatever was specified as the `env` option - * to the `Worker` constructor. Changes to `process.env` will not be visible - * across `Worker` threads, and only the main thread can make changes that - * are visible to the operating system or to native add-ons. On Windows, a copy of `process.env` on a `Worker` instance operates in a case-sensitive manner - * unlike the main thread. - * @since v0.1.27 - */ - env: ProcessEnv; - /** - * The `process.exit()` method instructs Node.js to terminate the process - * synchronously with an exit status of `code`. If `code` is omitted, exit uses - * either the 'success' code `0` or the value of `process.exitCode` if it has been - * set. Node.js will not terminate until all the `'exit'` event listeners are - * called. - * - * To exit with a 'failure' code: - * - * ```js - * import { exit } from 'node:process'; - * - * exit(1); - * ``` - * - * The shell that executed Node.js should see the exit code as `1`. - * - * Calling `process.exit()` will force the process to exit as quickly as possible - * even if there are still asynchronous operations pending that have not yet - * completed fully, including I/O operations to `process.stdout` and `process.stderr`. - * - * In most situations, it is not actually necessary to call `process.exit()` explicitly. The Node.js process will exit on its own _if there is no additional_ - * _work pending_ in the event loop. The `process.exitCode` property can be set to - * tell the process which exit code to use when the process exits gracefully. - * - * For instance, the following example illustrates a _misuse_ of the `process.exit()` method that could lead to data printed to stdout being - * truncated and lost: - * - * ```js - * import { exit } from 'node:process'; - * - * // This is an example of what *not* to do: - * if (someConditionNotMet()) { - * printUsageToStdout(); - * exit(1); - * } - * ``` - * - * The reason this is problematic is because writes to `process.stdout` in Node.js - * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js - * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed. - * - * Rather than calling `process.exit()` directly, the code _should_ set the `process.exitCode` and allow the process to exit naturally by avoiding - * scheduling any additional work for the event loop: - * - * ```js - * import process from 'node:process'; - * - * // How to properly set the exit code while letting - * // the process exit gracefully. - * if (someConditionNotMet()) { - * printUsageToStdout(); - * process.exitCode = 1; - * } - * ``` - * - * If it is necessary to terminate the Node.js process due to an error condition, - * throwing an _uncaught_ error and allowing the process to terminate accordingly - * is safer than calling `process.exit()`. - * - * In `Worker` threads, this function stops the current thread rather - * than the current process. - * @since v0.1.13 - * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed. - */ - exit(code?: number | string | null): never; - /** - * A number which will be the process exit code, when the process either - * exits gracefully, or is exited via {@link exit} without specifying - * a code. - * - * Specifying a code to {@link exit} will override any - * previous setting of `process.exitCode`. - * @default undefined - * @since v0.11.8 - */ - exitCode: number | string | null | undefined; - finalization: { - /** - * This function registers a callback to be called when the process emits the `exit` event if the `ref` object was not garbage collected. - * If the object `ref` was garbage collected before the `exit` event is emitted, the callback will be removed from the finalization registry, and it will not be called on process exit. - * - * Inside the callback you can release the resources allocated by the `ref` object. - * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, - * this means that there is a possibility that the callback will not be called under special circumstances. - * - * The idea of ​​this function is to help you free up resources when the starts process exiting, but also let the object be garbage collected if it is no longer being used. - * @param ref The reference to the resource that is being tracked. - * @param callback The callback function to be called when the resource is finalized. - * @since v22.5.0 - * @experimental - */ - register(ref: T, callback: (ref: T, event: "exit") => void): void; - /** - * This function behaves exactly like the `register`, except that the callback will be called when the process emits the `beforeExit` event if `ref` object was not garbage collected. - * - * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, this means that there is a possibility that the callback will not be called under special circumstances. - * @param ref The reference to the resource that is being tracked. - * @param callback The callback function to be called when the resource is finalized. - * @since v22.5.0 - * @experimental - */ - registerBeforeExit(ref: T, callback: (ref: T, event: "beforeExit") => void): void; - /** - * This function remove the register of the object from the finalization registry, so the callback will not be called anymore. - * @param ref The reference to the resource that was registered previously. - * @since v22.5.0 - * @experimental - */ - unregister(ref: object): void; - }; - /** - * The `process.getActiveResourcesInfo()` method returns an array of strings containing - * the types of the active resources that are currently keeping the event loop alive. - * - * ```js - * import { getActiveResourcesInfo } from 'node:process'; - * import { setTimeout } from 'node:timers'; - - * console.log('Before:', getActiveResourcesInfo()); - * setTimeout(() => {}, 1000); - * console.log('After:', getActiveResourcesInfo()); - * // Prints: - * // Before: [ 'TTYWrap', 'TTYWrap', 'TTYWrap' ] - * // After: [ 'TTYWrap', 'TTYWrap', 'TTYWrap', 'Timeout' ] - * ``` - * @since v17.3.0, v16.14.0 - */ - getActiveResourcesInfo(): string[]; - /** - * Provides a way to load built-in modules in a globally available function. - * @param id ID of the built-in module being requested. - */ - getBuiltinModule(id: ID): BuiltInModule[ID]; - getBuiltinModule(id: string): object | undefined; - /** - * The `process.getgid()` method returns the numerical group identity of the - * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.getgid) { - * console.log(`Current gid: ${process.getgid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v0.1.31 - */ - getgid?: () => number; - /** - * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a - * numeric ID or a group name - * string. If a group name is specified, this method blocks while resolving the - * associated numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.getgid && process.setgid) { - * console.log(`Current gid: ${process.getgid()}`); - * try { - * process.setgid(501); - * console.log(`New gid: ${process.getgid()}`); - * } catch (err) { - * console.log(`Failed to set gid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v0.1.31 - * @param id The group name or ID - */ - setgid?: (id: number | string) => void; - /** - * The `process.getuid()` method returns the numeric user identity of the process. - * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.getuid) { - * console.log(`Current uid: ${process.getuid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v0.1.28 - */ - getuid?: () => number; - /** - * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a - * numeric ID or a username string. - * If a username is specified, the method blocks while resolving the associated - * numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.getuid && process.setuid) { - * console.log(`Current uid: ${process.getuid()}`); - * try { - * process.setuid(501); - * console.log(`New uid: ${process.getuid()}`); - * } catch (err) { - * console.log(`Failed to set uid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v0.1.28 - */ - setuid?: (id: number | string) => void; - /** - * The `process.geteuid()` method returns the numerical effective user identity of - * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.geteuid) { - * console.log(`Current uid: ${process.geteuid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v2.0.0 - */ - geteuid?: () => number; - /** - * The `process.seteuid()` method sets the effective user identity of the process. - * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username - * string. If a username is specified, the method blocks while resolving the - * associated numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.geteuid && process.seteuid) { - * console.log(`Current uid: ${process.geteuid()}`); - * try { - * process.seteuid(501); - * console.log(`New uid: ${process.geteuid()}`); - * } catch (err) { - * console.log(`Failed to set uid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v2.0.0 - * @param id A user name or ID - */ - seteuid?: (id: number | string) => void; - /** - * The `process.getegid()` method returns the numerical effective group identity - * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.getegid) { - * console.log(`Current gid: ${process.getegid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v2.0.0 - */ - getegid?: () => number; - /** - * The `process.setegid()` method sets the effective group identity of the process. - * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group - * name string. If a group name is specified, this method blocks while resolving - * the associated a numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.getegid && process.setegid) { - * console.log(`Current gid: ${process.getegid()}`); - * try { - * process.setegid(501); - * console.log(`New gid: ${process.getegid()}`); - * } catch (err) { - * console.log(`Failed to set gid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v2.0.0 - * @param id A group name or ID - */ - setegid?: (id: number | string) => void; - /** - * The `process.getgroups()` method returns an array with the supplementary group - * IDs. POSIX leaves it unspecified if the effective group ID is included but - * Node.js ensures it always is. - * - * ```js - * import process from 'node:process'; - * - * if (process.getgroups) { - * console.log(process.getgroups()); // [ 16, 21, 297 ] - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v0.9.4 - */ - getgroups?: () => number[]; - /** - * The `process.setgroups()` method sets the supplementary group IDs for the - * Node.js process. This is a privileged operation that requires the Node.js - * process to have `root` or the `CAP_SETGID` capability. - * - * The `groups` array can contain numeric group IDs, group names, or both. - * - * ```js - * import process from 'node:process'; - * - * if (process.getgroups && process.setgroups) { - * try { - * process.setgroups([501]); - * console.log(process.getgroups()); // new groups - * } catch (err) { - * console.log(`Failed to set groups: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v0.9.4 - */ - setgroups?: (groups: ReadonlyArray) => void; - /** - * The `process.setUncaughtExceptionCaptureCallback()` function sets a function - * that will be invoked when an uncaught exception occurs, which will receive the - * exception value itself as its first argument. - * - * If such a function is set, the `'uncaughtException'` event will - * not be emitted. If `--abort-on-uncaught-exception` was passed from the - * command line or set through `v8.setFlagsFromString()`, the process will - * not abort. Actions configured to take place on exceptions such as report - * generations will be affected too - * - * To unset the capture function, `process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this - * method with a non-`null` argument while another capture function is set will - * throw an error. - * - * To register multiple callbacks that can coexist, use - * `process.addUncaughtExceptionCaptureCallback()` instead. - * @since v9.3.0 - */ - // TODO: callback parameter should be `unknown` - setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void; - /** - * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}. - * @since v9.3.0 - */ - hasUncaughtExceptionCaptureCallback(): boolean; - /** - * The `process.sourceMapsEnabled` property returns whether the [Source Map v3](https://sourcemaps.info/spec.html) support for stack traces is enabled. - * @since v20.7.0 - * @experimental - */ - readonly sourceMapsEnabled: boolean; - /** - * This function enables or disables the [Source Map v3](https://sourcemaps.info/spec.html) support for - * stack traces. - * - * It provides same features as launching Node.js process with commandline options `--enable-source-maps`. - * - * Only source maps in JavaScript files that are loaded after source maps has been - * enabled will be parsed and loaded. - * @since v16.6.0, v14.18.0 - * @experimental - */ - setSourceMapsEnabled(value: boolean): void; - /** - * The `process.version` property contains the Node.js version string. - * - * ```js - * import { version } from 'node:process'; - * - * console.log(`Version: ${version}`); - * // Version: v14.8.0 - * ``` - * - * To get the version string without the prepended _v_, use`process.versions.node`. - * @since v0.1.3 - */ - readonly version: string; - /** - * The `process.versions` property returns an object listing the version strings of - * Node.js and its dependencies. `process.versions.modules` indicates the current - * ABI version, which is increased whenever a C++ API changes. Node.js will refuse - * to load modules that were compiled against a different module ABI version. - * - * ```js - * import { versions } from 'node:process'; - * - * console.log(versions); - * ``` - * - * Will generate an object similar to: - * - * ```console - * { node: '26.0.0-pre', - * acorn: '8.15.0', - * ada: '3.4.1', - * amaro: '1.1.5', - * ares: '1.34.6', - * brotli: '1.2.0', - * merve: '1.0.0', - * cldr: '48.0', - * icu: '78.2', - * llhttp: '9.3.0', - * modules: '144', - * napi: '10', - * nbytes: '0.1.1', - * ncrypto: '0.0.1', - * nghttp2: '1.68.0', - * nghttp3: '', - * ngtcp2: '', - * openssl: '3.5.4', - * simdjson: '4.2.4', - * simdutf: '7.3.3', - * sqlite: '3.51.2', - * tz: '2025c', - * undici: '7.18.2', - * unicode: '17.0', - * uv: '1.51.0', - * uvwasi: '0.0.23', - * v8: '14.3.127.18-node.10', - * zlib: '1.3.1-e00f703', - * zstd: '1.5.7' } - * ``` - * @since v0.2.0 - */ - readonly versions: ProcessVersions; - /** - * The `process.config` property returns a frozen `Object` containing the - * JavaScript representation of the configure options used to compile the current - * Node.js executable. This is the same as the `config.gypi` file that was produced - * when running the `./configure` script. - * - * An example of the possible output looks like: - * - * ```js - * { - * target_defaults: - * { cflags: [], - * default_configuration: 'Release', - * defines: [], - * include_dirs: [], - * libraries: [] }, - * variables: - * { - * host_arch: 'x64', - * napi_build_version: 5, - * node_install_npm: 'true', - * node_prefix: '', - * node_shared_cares: 'false', - * node_shared_http_parser: 'false', - * node_shared_libuv: 'false', - * node_shared_zlib: 'false', - * node_use_openssl: 'true', - * node_shared_openssl: 'false', - * strict_aliasing: 'true', - * target_arch: 'x64', - * v8_use_snapshot: 1 - * } - * } - * ``` - * @since v0.7.7 - */ - readonly config: ProcessConfig; - /** - * The `process.kill()` method sends the `signal` to the process identified by`pid`. - * - * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information. - * - * This method will throw an error if the target `pid` does not exist. As a special - * case, a signal of `0` can be used to test for the existence of a process. - * Windows platforms will throw an error if the `pid` is used to kill a process - * group. - * - * Even though the name of this function is `process.kill()`, it is really just a - * signal sender, like the `kill` system call. The signal sent may do something - * other than kill the target process. - * - * ```js - * import process, { kill } from 'node:process'; - * - * process.on('SIGHUP', () => { - * console.log('Got SIGHUP signal.'); - * }); - * - * setTimeout(() => { - * console.log('Exiting.'); - * process.exit(0); - * }, 100); - * - * kill(process.pid, 'SIGHUP'); - * ``` - * - * When `SIGUSR1` is received by a Node.js process, Node.js will start the - * debugger. See `Signal Events`. - * @since v0.0.6 - * @param pid A process ID - * @param [signal='SIGTERM'] The signal to send, either as a string or number. - */ - kill(pid: number, signal?: string | number): true; - /** - * Loads the environment configuration from a `.env` file into `process.env`. If - * the file is not found, error will be thrown. - * - * To load a specific .env file by specifying its path, use the following code: - * - * ```js - * import { loadEnvFile } from 'node:process'; - * - * loadEnvFile('./development.env') - * ``` - * @since v20.12.0 - * @param path The path to the .env file - */ - loadEnvFile(path?: PathLike): void; - /** - * The `process.pid` property returns the PID of the process. - * - * ```js - * import { pid } from 'node:process'; - * - * console.log(`This process is pid ${pid}`); - * ``` - * @since v0.1.15 - */ - readonly pid: number; - /** - * The `process.ppid` property returns the PID of the parent of the - * current process. - * - * ```js - * import { ppid } from 'node:process'; - * - * console.log(`The parent process is pid ${ppid}`); - * ``` - * @since v9.2.0, v8.10.0, v6.13.0 - */ - readonly ppid: number; - /** - * The `process.threadCpuUsage()` method returns the user and system CPU time usage of - * the current worker thread, in an object with properties `user` and `system`, whose - * values are microsecond values (millionth of a second). - * - * The result of a previous call to `process.threadCpuUsage()` can be passed as the - * argument to the function, to get a diff reading. - * @since v23.9.0 - * @param previousValue A previous return value from calling - * `process.threadCpuUsage()` - */ - threadCpuUsage(previousValue?: CpuUsage): CpuUsage; - /** - * The `process.title` property returns the current process title (i.e. returns - * the current value of `ps`). Assigning a new value to `process.title` modifies - * the current value of `ps`. - * - * When a new value is assigned, different platforms will impose different maximum - * length restrictions on the title. Usually such restrictions are quite limited. - * For instance, on Linux and macOS, `process.title` is limited to the size of the - * binary name plus the length of the command-line arguments because setting the `process.title` overwrites the `argv` memory of the process. Node.js v0.8 - * allowed for longer process title strings by also overwriting the `environ` memory but that was potentially insecure and confusing in some (rather obscure) - * cases. - * - * Assigning a value to `process.title` might not result in an accurate label - * within process manager applications such as macOS Activity Monitor or Windows - * Services Manager. - * @since v0.1.104 - */ - title: string; - /** - * The operating system CPU architecture for which the Node.js binary was compiled. - * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, - * `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`. - * - * ```js - * import { arch } from 'node:process'; - * - * console.log(`This processor architecture is ${arch}`); - * ``` - * @since v0.5.0 - */ - readonly arch: Architecture; - /** - * The `process.platform` property returns a string identifying the operating - * system platform for which the Node.js binary was compiled. - * - * Currently possible values are: - * - * * `'aix'` - * * `'darwin'` - * * `'freebsd'` - * * `'linux'` - * * `'openbsd'` - * * `'sunos'` - * * `'win32'` - * - * ```js - * import { platform } from 'node:process'; - * - * console.log(`This platform is ${platform}`); - * ``` - * - * The value `'android'` may also be returned if the Node.js is built on the - * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). - * @since v0.1.16 - */ - readonly platform: Platform; - /** - * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at - * runtime, `require.main` may still refer to the original main module in - * modules that were required before the change occurred. Generally, it's - * safe to assume that the two refer to the same module. - * - * As with `require.main`, `process.mainModule` will be `undefined` if there - * is no entry script. - * @since v0.1.17 - * @deprecated Since v14.0.0 - Use `main` instead. - */ - mainModule?: Module; - memoryUsage: MemoryUsageFn; - /** - * Gets the amount of memory available to the process (in bytes) based on - * limits imposed by the OS. If there is no such constraint, or the constraint - * is unknown, `0` is returned. - * - * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more - * information. - * @since v19.6.0, v18.15.0 - */ - constrainedMemory(): number; - /** - * Gets the amount of free memory that is still available to the process (in bytes). - * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v25.x/api/process.html#processavailablememory) for more information. - * @since v20.13.0 - */ - availableMemory(): number; - /** - * The `process.cpuUsage()` method returns the user and system CPU time usage of - * the current process, in an object with properties `user` and `system`, whose - * values are microsecond values (millionth of a second). These values measure time - * spent in user and system code respectively, and may end up being greater than - * actual elapsed time if multiple CPU cores are performing work for this process. - * - * The result of a previous call to `process.cpuUsage()` can be passed as the - * argument to the function, to get a diff reading. - * - * ```js - * import { cpuUsage } from 'node:process'; - * - * const startUsage = cpuUsage(); - * // { user: 38579, system: 6986 } - * - * // spin the CPU for 500 milliseconds - * const now = Date.now(); - * while (Date.now() - now < 500); - * - * console.log(cpuUsage(startUsage)); - * // { user: 514883, system: 11226 } - * ``` - * @since v6.1.0 - * @param previousValue A previous return value from calling `process.cpuUsage()` - */ - cpuUsage(previousValue?: CpuUsage): CpuUsage; - /** - * `process.nextTick()` adds `callback` to the "next tick queue". This queue is - * fully drained after the current operation on the JavaScript stack runs to - * completion and before the event loop is allowed to continue. It's possible to - * create an infinite loop if one were to recursively call `process.nextTick()`. - * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background. - * - * ```js - * import { nextTick } from 'node:process'; - * - * console.log('start'); - * nextTick(() => { - * console.log('nextTick callback'); - * }); - * console.log('scheduled'); - * // Output: - * // start - * // scheduled - * // nextTick callback - * ``` - * - * This is important when developing APIs in order to give users the opportunity - * to assign event handlers _after_ an object has been constructed but before any - * I/O has occurred: - * - * ```js - * import { nextTick } from 'node:process'; - * - * function MyThing(options) { - * this.setupOptions(options); - * - * nextTick(() => { - * this.startDoingStuff(); - * }); - * } - * - * const thing = new MyThing(); - * thing.getReadyForStuff(); - * - * // thing.startDoingStuff() gets called now, not before. - * ``` - * - * It is very important for APIs to be either 100% synchronous or 100% - * asynchronous. Consider this example: - * - * ```js - * // WARNING! DO NOT USE! BAD UNSAFE HAZARD! - * function maybeSync(arg, cb) { - * if (arg) { - * cb(); - * return; - * } - * - * fs.stat('file', cb); - * } - * ``` - * - * This API is hazardous because in the following case: - * - * ```js - * const maybeTrue = Math.random() > 0.5; - * - * maybeSync(maybeTrue, () => { - * foo(); - * }); - * - * bar(); - * ``` - * - * It is not clear whether `foo()` or `bar()` will be called first. - * - * The following approach is much better: - * - * ```js - * import { nextTick } from 'node:process'; - * - * function definitelyAsync(arg, cb) { - * if (arg) { - * nextTick(cb); - * return; - * } - * - * fs.stat('file', cb); - * } - * ``` - * @since v0.1.26 - * @param args Additional arguments to pass when invoking the `callback` - */ - nextTick(callback: Function, ...args: any[]): void; - /** - * The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process. - * See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior. - */ - noDeprecation?: boolean; - /** - * This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag. - * - * `process.permission` is an object whose methods are used to manage permissions for the current process. - * Additional documentation is available in the [Permission Model](https://nodejs.org/api/permissions.html#permission-model). - * @since v20.0.0 - */ - permission: ProcessPermission; - /** - * The `process.release` property returns an `Object` containing metadata related - * to the current release, including URLs for the source tarball and headers-only - * tarball. - * - * `process.release` contains the following properties: - * - * ```js - * { - * name: 'node', - * lts: 'Hydrogen', - * sourceUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz', - * headersUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz', - * libUrl: 'https://nodejs.org/download/release/v18.12.0/win-x64/node.lib' - * } - * ``` - * - * In custom builds from non-release versions of the source tree, only the `name` property may be present. The additional properties should not be - * relied upon to exist. - * @since v3.0.0 - */ - readonly release: ProcessRelease; - readonly features: ProcessFeatures; - /** - * The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag - * is set on the current Node.js process. This property allows programmatic control over the - * tracing of warnings, enabling or disabling stack traces for warnings at runtime. - * - * ```js - * // Enable trace warnings - * process.traceProcessWarnings = true; - * - * // Emit a warning with a stack trace - * process.emitWarning('Warning with stack trace'); - * - * // Disable trace warnings - * process.traceProcessWarnings = false; - * ``` - * @since v6.10.0 - */ - traceProcessWarnings: boolean; - /** - * `process.umask()` returns the Node.js process's file mode creation mask. Child - * processes inherit the mask from the parent process. - * @since v0.1.19 - * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential - * security vulnerability. There is no safe, cross-platform alternative API. - */ - umask(): number; - /** - * Can only be set if not in worker thread. - */ - umask(mask: string | number): number; - /** - * The `process.uptime()` method returns the number of seconds the current Node.js - * process has been running. - * - * The return value includes fractions of a second. Use `Math.floor()` to get whole - * seconds. - * @since v0.5.0 - */ - uptime(): number; - hrtime: HRTime; - /** - * If the Node.js process was spawned with an IPC channel, the process.channel property is a reference to the IPC channel. - * If no IPC channel exists, this property is undefined. - * @since v7.1.0 - */ - channel?: Control; - /** - * If Node.js is spawned with an IPC channel, the `process.send()` method can be - * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object. - * - * If Node.js was not spawned with an IPC channel, `process.send` will be `undefined`. - * - * The message goes through serialization and parsing. The resulting message might - * not be the same as what is originally sent. - * @since v0.5.9 - * @param options used to parameterize the sending of certain types of handles. `options` supports the following properties: - */ - send?( - message: any, - sendHandle?: SendHandle, - options?: MessageOptions, - callback?: (error: Error | null) => void, - ): boolean; - send?( - message: any, - sendHandle: SendHandle, - callback?: (error: Error | null) => void, - ): boolean; - send?( - message: any, - callback: (error: Error | null) => void, - ): boolean; - /** - * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the - * IPC channel to the parent process, allowing the child process to exit gracefully - * once there are no other connections keeping it alive. - * - * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process. - * - * If the Node.js process was not spawned with an IPC channel, `process.disconnect()` will be `undefined`. - * @since v0.7.2 - */ - disconnect?(): void; - /** - * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return `true` so long as the IPC - * channel is connected and will return `false` after `process.disconnect()` is called. - * - * Once `process.connected` is `false`, it is no longer possible to send messages - * over the IPC channel using `process.send()`. - * @since v0.7.2 - */ - connected: boolean; - /** - * The `process.allowedNodeEnvironmentFlags` property is a special, - * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable. - * - * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides `Set.prototype.has` to recognize several different possible flag - * representations. `process.allowedNodeEnvironmentFlags.has()` will - * return `true` in the following cases: - * - * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g., `inspect-brk` for `--inspect-brk`, or `r` for `-r`. - * * Flags passed through to V8 (as listed in `--v8-options`) may replace - * one or more _non-leading_ dashes for an underscore, or vice-versa; - * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`, - * etc. - * * Flags may contain one or more equals (`=`) characters; all - * characters after and including the first equals will be ignored; - * e.g., `--stack-trace-limit=100`. - * * Flags _must_ be allowable within `NODE_OPTIONS`. - * - * When iterating over `process.allowedNodeEnvironmentFlags`, flags will - * appear only _once_; each will begin with one or more dashes. Flags - * passed through to V8 will contain underscores instead of non-leading - * dashes: - * - * ```js - * import { allowedNodeEnvironmentFlags } from 'node:process'; - * - * allowedNodeEnvironmentFlags.forEach((flag) => { - * // -r - * // --inspect-brk - * // --abort_on_uncaught_exception - * // ... - * }); - * ``` - * - * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail - * silently. - * - * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will - * contain what _would have_ been allowable. - * @since v10.10.0 - */ - allowedNodeEnvironmentFlags: ReadonlySet; - /** - * `process.report` is an object whose methods are used to generate diagnostic reports for the current process. - * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v25.x/api/report.html). - * @since v11.8.0 - */ - report: ProcessReport; - /** - * ```js - * import { resourceUsage } from 'node:process'; - * - * console.log(resourceUsage()); - * /* - * Will output: - * { - * userCPUTime: 82872, - * systemCPUTime: 4143, - * maxRSS: 33164, - * sharedMemorySize: 0, - * unsharedDataSize: 0, - * unsharedStackSize: 0, - * minorPageFault: 2469, - * majorPageFault: 0, - * swappedOut: 0, - * fsRead: 0, - * fsWrite: 8, - * ipcSent: 0, - * ipcReceived: 0, - * signalsCount: 0, - * voluntaryContextSwitches: 79, - * involuntaryContextSwitches: 1 - * } - * - * ``` - * @since v12.6.0 - * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t]. - */ - resourceUsage(): ResourceUsage; - /** - * The initial value of `process.throwDeprecation` indicates whether the `--throw-deprecation` flag is set on the current Node.js process. `process.throwDeprecation` - * is mutable, so whether or not deprecation warnings result in errors may be altered at runtime. See the documentation for the 'warning' event and the emitWarning() - * method for more information. - * - * ```bash - * $ node --throw-deprecation -p "process.throwDeprecation" - * true - * $ node -p "process.throwDeprecation" - * undefined - * $ node - * > process.emitWarning('test', 'DeprecationWarning'); - * undefined - * > (node:26598) DeprecationWarning: test - * > process.throwDeprecation = true; - * true - * > process.emitWarning('test', 'DeprecationWarning'); - * Thrown: - * [DeprecationWarning: test] { name: 'DeprecationWarning' } - * ``` - * @since v0.9.12 - */ - throwDeprecation: boolean; - /** - * The `process.traceDeprecation` property indicates whether the `--trace-deprecation` flag is set on the current Node.js process. See the - * documentation for the `'warning' event` and the `emitWarning() method` for more information about this - * flag's behavior. - * @since v0.8.0 - */ - traceDeprecation: boolean; - /** - * An object is "refable" if it implements the Node.js "Refable protocol". - * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')` - * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js - * event loop alive, while "unref'd" objects will not. Historically, this was - * implemented by using `ref()` and `unref()` methods directly on the objects. - * This pattern, however, is being deprecated in favor of the "Refable protocol" - * in order to better support Web Platform API types whose APIs cannot be modified - * to add `ref()` and `unref()` methods but still need to support that behavior. - * @since v22.14.0 - * @experimental - * @param maybeRefable An object that may be "refable". - */ - ref(maybeRefable: any): void; - /** - * An object is "unrefable" if it implements the Node.js "Refable protocol". - * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')` - * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js - * event loop alive, while "unref'd" objects will not. Historically, this was - * implemented by using `ref()` and `unref()` methods directly on the objects. - * This pattern, however, is being deprecated in favor of the "Refable protocol" - * in order to better support Web Platform API types whose APIs cannot be modified - * to add `ref()` and `unref()` methods but still need to support that behavior. - * @since v22.14.0 - * @experimental - * @param maybeRefable An object that may be "unref'd". - */ - unref(maybeRefable: any): void; - /** - * Replaces the current process with a new process. - * - * This is achieved by using the `execve` POSIX function and therefore no memory or other - * resources from the current process are preserved, except for the standard input, - * standard output and standard error file descriptor. - * - * All other resources are discarded by the system when the processes are swapped, without triggering - * any exit or close events and without running any cleanup handler. - * - * This function will never return, unless an error occurred. - * - * This function is not available on Windows or IBM i. - * @since v22.15.0 - * @experimental - * @param file The name or path of the executable file to run. - * @param args List of string arguments. No argument can contain a null-byte (`\u0000`). - * @param env Environment key-value pairs. - * No key or value can contain a null-byte (`\u0000`). - * **Default:** `process.env`. - */ - execve?(file: string, args?: readonly string[], env?: ProcessEnv): never; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ProcessEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ProcessEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ProcessEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: ProcessEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: ProcessEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: ProcessEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ProcessEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ProcessEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ProcessEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: ProcessEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ProcessEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - } - } - export = process; -} -declare module "process" { - import process = require("node:process"); - export = process; -} diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts deleted file mode 100644 index 87fdec9..0000000 --- a/node_modules/@types/node/punycode.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -declare module "node:punycode" { - /** - * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only - * characters to the equivalent string of Unicode codepoints. - * - * ```js - * punycode.decode('maana-pta'); // 'mañana' - * punycode.decode('--dqo34k'); // '☃-⌘' - * ``` - * @since v0.5.1 - */ - function decode(string: string): string; - /** - * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters. - * - * ```js - * punycode.encode('mañana'); // 'maana-pta' - * punycode.encode('☃-⌘'); // '--dqo34k' - * ``` - * @since v0.5.1 - */ - function encode(string: string): string; - /** - * The `punycode.toUnicode()` method converts a string representing a domain name - * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be - * converted. - * - * ```js - * // decode domain names - * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com' - * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com' - * punycode.toUnicode('example.com'); // 'example.com' - * ``` - * @since v0.6.1 - */ - function toUnicode(domain: string): string; - /** - * The `punycode.toASCII()` method converts a Unicode string representing an - * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the - * domain name will be converted. Calling `punycode.toASCII()` on a string that - * already only contains ASCII characters will have no effect. - * - * ```js - * // encode domain names - * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com' - * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com' - * punycode.toASCII('example.com'); // 'example.com' - * ``` - * @since v0.6.1 - */ - function toASCII(domain: string): string; - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - const ucs2: ucs2; - interface ucs2 { - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - decode(string: string): number[]; - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - encode(codePoints: readonly number[]): string; - } - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - const version: string; -} -declare module "punycode" { - export * from "node:punycode"; -} diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts deleted file mode 100644 index 6d821a4..0000000 --- a/node_modules/@types/node/querystring.d.ts +++ /dev/null @@ -1,139 +0,0 @@ -declare module "node:querystring" { - interface StringifyOptions { - /** - * The function to use when converting URL-unsafe characters to percent-encoding in the query string. - * @default `querystring.escape()` - */ - encodeURIComponent?: ((str: string) => string) | undefined; - } - interface ParseOptions { - /** - * Specifies the maximum number of keys to parse. Specify `0` to remove key counting limitations. - * @default 1000 - */ - maxKeys?: number | undefined; - /** - * The function to use when decoding percent-encoded characters in the query string. - * @default `querystring.unescape()` - */ - decodeURIComponent?: ((str: string) => string) | undefined; - } - interface ParsedUrlQuery extends NodeJS.Dict {} - interface ParsedUrlQueryInput extends - NodeJS.Dict< - | string - | number - | boolean - | bigint - | ReadonlyArray - | null - > - {} - /** - * The `querystring.stringify()` method produces a URL query string from a - * given `obj` by iterating through the object's "own properties". - * - * It serializes the following types of values passed in `obj`: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | - * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | - * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | - * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) | - * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | - * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | - * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | - * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to - * empty strings. - * - * ```js - * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }); - * // Returns 'foo=bar&baz=qux&baz=quux&corge=' - * - * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':'); - * // Returns 'foo:bar;baz:qux' - * ``` - * - * By default, characters requiring percent-encoding within the query string will - * be encoded as UTF-8\. If an alternative encoding is required, then an alternative `encodeURIComponent` option will need to be specified: - * - * ```js - * // Assuming gbkEncodeURIComponent function already exists, - * - * querystring.stringify({ w: '中文', foo: 'bar' }, null, null, - * { encodeURIComponent: gbkEncodeURIComponent }); - * ``` - * @since v0.1.25 - * @param obj The object to serialize into a URL query string - * @param [sep='&'] The substring used to delimit key and value pairs in the query string. - * @param [eq='='] . The substring used to delimit keys and values in the query string. - */ - function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; - /** - * The `querystring.parse()` method parses a URL query string (`str`) into a - * collection of key and value pairs. - * - * For example, the query string `'foo=bar&abc=xyz&abc=123'` is parsed into: - * - * ```json - * { - * "foo": "bar", - * "abc": ["xyz", "123"] - * } - * ``` - * - * The object returned by the `querystring.parse()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, - * `obj.hasOwnProperty()`, and others - * are not defined and _will not work_. - * - * By default, percent-encoded characters within the query string will be assumed - * to use UTF-8 encoding. If an alternative character encoding is used, then an - * alternative `decodeURIComponent` option will need to be specified: - * - * ```js - * // Assuming gbkDecodeURIComponent function already exists... - * - * querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null, - * { decodeURIComponent: gbkDecodeURIComponent }); - * ``` - * @since v0.1.25 - * @param str The URL query string to parse - * @param [sep='&'] The substring used to delimit key and value pairs in the query string. - * @param [eq='='] The substring used to delimit keys and values in the query string. - */ - function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; - /** - * The querystring.encode() function is an alias for querystring.stringify(). - */ - const encode: typeof stringify; - /** - * The querystring.decode() function is an alias for querystring.parse(). - */ - const decode: typeof parse; - /** - * The `querystring.escape()` method performs URL percent-encoding on the given `str` in a manner that is optimized for the specific requirements of URL - * query strings. - * - * The `querystring.escape()` method is used by `querystring.stringify()` and is - * generally not expected to be used directly. It is exported primarily to allow - * application code to provide a replacement percent-encoding implementation if - * necessary by assigning `querystring.escape` to an alternative function. - * @since v0.1.25 - */ - function escape(str: string): string; - /** - * The `querystring.unescape()` method performs decoding of URL percent-encoded - * characters on the given `str`. - * - * The `querystring.unescape()` method is used by `querystring.parse()` and is - * generally not expected to be used directly. It is exported primarily to allow - * application code to provide a replacement decoding implementation if - * necessary by assigning `querystring.unescape` to an alternative function. - * - * By default, the `querystring.unescape()` method will attempt to use the - * JavaScript built-in `decodeURIComponent()` method to decode. If that fails, - * a safer equivalent that does not throw on malformed URLs will be used. - * @since v0.1.25 - */ - function unescape(str: string): string; -} -declare module "querystring" { - export * from "node:querystring"; -} diff --git a/node_modules/@types/node/quic.d.ts b/node_modules/@types/node/quic.d.ts deleted file mode 100644 index 7143708..0000000 --- a/node_modules/@types/node/quic.d.ts +++ /dev/null @@ -1,897 +0,0 @@ -declare module "node:quic" { - import { KeyObject, webcrypto } from "node:crypto"; - import { SocketAddress } from "node:net"; - import { ReadableStream } from "node:stream/web"; - /** - * @since v23.8.0 - */ - type OnSessionCallback = (this: QuicEndpoint, session: QuicSession) => void; - /** - * @since v23.8.0 - */ - type OnStreamCallback = (this: QuicSession, stream: QuicStream) => void; - /** - * @since v23.8.0 - */ - type OnDatagramCallback = (this: QuicSession, datagram: Uint8Array, early: boolean) => void; - /** - * @since v23.8.0 - */ - type OnDatagramStatusCallback = (this: QuicSession, id: bigint, status: "lost" | "acknowledged") => void; - /** - * @since v23.8.0 - */ - type OnPathValidationCallback = ( - this: QuicSession, - result: "success" | "failure" | "aborted", - newLocalAddress: SocketAddress, - newRemoteAddress: SocketAddress, - oldLocalAddress: SocketAddress, - oldRemoteAddress: SocketAddress, - preferredAddress: boolean, - ) => void; - /** - * @since v23.8.0 - */ - type OnSessionTicketCallback = (this: QuicSession, ticket: object) => void; - /** - * @since v23.8.0 - */ - type OnVersionNegotiationCallback = ( - this: QuicSession, - version: number, - requestedVersions: number[], - supportedVersions: number[], - ) => void; - /** - * @since v23.8.0 - */ - type OnHandshakeCallback = ( - this: QuicSession, - sni: string, - alpn: string, - cipher: string, - cipherVersion: string, - validationErrorReason: string, - validationErrorCode: number, - earlyDataAccepted: boolean, - ) => void; - /** - * @since v23.8.0 - */ - type OnBlockedCallback = (this: QuicStream) => void; - /** - * @since v23.8.0 - */ - type OnStreamErrorCallback = (this: QuicStream, error: any) => void; - /** - * @since v23.8.0 - */ - interface TransportParams { - /** - * The preferred IPv4 address to advertise. - * @since v23.8.0 - */ - preferredAddressIpv4?: SocketAddress | undefined; - /** - * The preferred IPv6 address to advertise. - * @since v23.8.0 - */ - preferredAddressIpv6?: SocketAddress | undefined; - /** - * @since v23.8.0 - */ - initialMaxStreamDataBidiLocal?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - initialMaxStreamDataBidiRemote?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - initialMaxStreamDataUni?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - initialMaxData?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - initialMaxStreamsBidi?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - initialMaxStreamsUni?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - maxIdleTimeout?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - activeConnectionIDLimit?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - ackDelayExponent?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - maxAckDelay?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - maxDatagramFrameSize?: bigint | number | undefined; - } - /** - * @since v23.8.0 - */ - interface SessionOptions { - /** - * An endpoint to use. - * @since v23.8.0 - */ - endpoint?: EndpointOptions | QuicEndpoint | undefined; - /** - * The ALPN protocol identifier. - * @since v23.8.0 - */ - alpn?: string | undefined; - /** - * The CA certificates to use for sessions. - * @since v23.8.0 - */ - ca?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; - /** - * Specifies the congestion control algorithm that will be used. - * Must be set to one of either `'reno'`, `'cubic'`, or `'bbr'`. - * - * This is an advanced option that users typically won't have need to specify. - * @since v23.8.0 - */ - cc?: `${constants.cc}` | undefined; - /** - * The TLS certificates to use for sessions. - * @since v23.8.0 - */ - certs?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; - /** - * The list of supported TLS 1.3 cipher algorithms. - * @since v23.8.0 - */ - ciphers?: string | undefined; - /** - * The CRL to use for sessions. - * @since v23.8.0 - */ - crl?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; - /** - * The list of support TLS 1.3 cipher groups. - * @since v23.8.0 - */ - groups?: string | undefined; - /** - * True to enable TLS keylogging output. - * @since v23.8.0 - */ - keylog?: boolean | undefined; - /** - * The TLS crypto keys to use for sessions. - * @since v23.8.0 - */ - keys?: KeyObject | readonly KeyObject[] | undefined; - /** - * Specifies the maximum UDP packet payload size. - * @since v23.8.0 - */ - maxPayloadSize?: bigint | number | undefined; - /** - * Specifies the maximum stream flow-control window size. - * @since v23.8.0 - */ - maxStreamWindow?: bigint | number | undefined; - /** - * Specifies the maximum session flow-control window size. - * @since v23.8.0 - */ - maxWindow?: bigint | number | undefined; - /** - * The minimum QUIC version number to allow. This is an advanced option that users - * typically won't have need to specify. - * @since v23.8.0 - */ - minVersion?: number | undefined; - /** - * When the remote peer advertises a preferred address, this option specifies whether - * to use it or ignore it. - * @since v23.8.0 - */ - preferredAddressPolicy?: "use" | "ignore" | "default" | undefined; - /** - * True if qlog output should be enabled. - * @since v23.8.0 - */ - qlog?: boolean | undefined; - /** - * A session ticket to use for 0RTT session resumption. - * @since v23.8.0 - */ - sessionTicket?: NodeJS.ArrayBufferView | undefined; - /** - * Specifies the maximum number of milliseconds a TLS handshake is permitted to take - * to complete before timing out. - * @since v23.8.0 - */ - handshakeTimeout?: bigint | number | undefined; - /** - * The peer server name to target. - * @since v23.8.0 - */ - sni?: string | undefined; - /** - * True to enable TLS tracing output. - * @since v23.8.0 - */ - tlsTrace?: boolean | undefined; - /** - * The QUIC transport parameters to use for the session. - * @since v23.8.0 - */ - transportParams?: TransportParams | undefined; - /** - * Specifies the maximum number of unacknowledged packets a session should allow. - * @since v23.8.0 - */ - unacknowledgedPacketThreshold?: bigint | number | undefined; - /** - * True to require verification of TLS client certificate. - * @since v23.8.0 - */ - verifyClient?: boolean | undefined; - /** - * True to require private key verification. - * @since v23.8.0 - */ - verifyPrivateKey?: boolean | undefined; - /** - * The QUIC version number to use. This is an advanced option that users typically - * won't have need to specify. - * @since v23.8.0 - */ - version?: number | undefined; - } - /** - * Initiate a new client-side session. - * - * ```js - * import { connect } from 'node:quic'; - * import { Buffer } from 'node:buffer'; - * - * const enc = new TextEncoder(); - * const alpn = 'foo'; - * const client = await connect('123.123.123.123:8888', { alpn }); - * await client.createUnidirectionalStream({ - * body: enc.encode('hello world'), - * }); - * ``` - * - * By default, every call to `connect(...)` will create a new local - * `QuicEndpoint` instance bound to a new random local IP port. To - * specify the exact local address to use, or to multiplex multiple - * QUIC sessions over a single local port, pass the `endpoint` option - * with either a `QuicEndpoint` or `EndpointOptions` as the argument. - * - * ```js - * import { QuicEndpoint, connect } from 'node:quic'; - * - * const endpoint = new QuicEndpoint({ - * address: '127.0.0.1:1234', - * }); - * - * const client = await connect('123.123.123.123:8888', { endpoint }); - * ``` - * @since v23.8.0 - */ - function connect(address: string | SocketAddress, options?: SessionOptions): Promise; - /** - * Configures the endpoint to listen as a server. When a new session is initiated by - * a remote peer, the given `onsession` callback will be invoked with the created - * session. - * - * ```js - * import { listen } from 'node:quic'; - * - * const endpoint = await listen((session) => { - * // ... handle the session - * }); - * - * // Closing the endpoint allows any sessions open when close is called - * // to complete naturally while preventing new sessions from being - * // initiated. Once all existing sessions have finished, the endpoint - * // will be destroyed. The call returns a promise that is resolved once - * // the endpoint is destroyed. - * await endpoint.close(); - * ``` - * - * By default, every call to `listen(...)` will create a new local - * `QuicEndpoint` instance bound to a new random local IP port. To - * specify the exact local address to use, or to multiplex multiple - * QUIC sessions over a single local port, pass the `endpoint` option - * with either a `QuicEndpoint` or `EndpointOptions` as the argument. - * - * At most, any single `QuicEndpoint` can only be configured to listen as - * a server once. - * @since v23.8.0 - */ - function listen(onsession: OnSessionCallback, options?: SessionOptions): Promise; - /** - * The endpoint configuration options passed when constructing a new `QuicEndpoint` instance. - * @since v23.8.0 - */ - interface EndpointOptions { - /** - * If not specified the endpoint will bind to IPv4 `localhost` on a random port. - * @since v23.8.0 - */ - address?: SocketAddress | string | undefined; - /** - * The endpoint maintains an internal cache of validated socket addresses as a - * performance optimization. This option sets the maximum number of addresses - * that are cache. This is an advanced option that users typically won't have - * need to specify. - * @since v23.8.0 - */ - addressLRUSize?: bigint | number | undefined; - /** - * When `true`, indicates that the endpoint should bind only to IPv6 addresses. - * @since v23.8.0 - */ - ipv6Only?: boolean | undefined; - /** - * Specifies the maximum number of concurrent sessions allowed per remote peer address. - * @since v23.8.0 - */ - maxConnectionsPerHost?: bigint | number | undefined; - /** - * Specifies the maximum total number of concurrent sessions. - * @since v23.8.0 - */ - maxConnectionsTotal?: bigint | number | undefined; - /** - * Specifies the maximum number of QUIC retry attempts allowed per remote peer address. - * @since v23.8.0 - */ - maxRetries?: bigint | number | undefined; - /** - * Specifies the maximum number of stateless resets that are allowed per remote peer address. - * @since v23.8.0 - */ - maxStatelessResetsPerHost?: bigint | number | undefined; - /** - * Specifies the length of time a QUIC retry token is considered valid. - * @since v23.8.0 - */ - retryTokenExpiration?: bigint | number | undefined; - /** - * Specifies the 16-byte secret used to generate QUIC retry tokens. - * @since v23.8.0 - */ - resetTokenSecret?: NodeJS.ArrayBufferView | undefined; - /** - * Specifies the length of time a QUIC token is considered valid. - * @since v23.8.0 - */ - tokenExpiration?: bigint | number | undefined; - /** - * Specifies the 16-byte secret used to generate QUIC tokens. - * @since v23.8.0 - */ - tokenSecret?: NodeJS.ArrayBufferView | undefined; - /** - * @since v23.8.0 - */ - udpReceiveBufferSize?: number | undefined; - /** - * @since v23.8.0 - */ - udpSendBufferSize?: number | undefined; - /** - * @since v23.8.0 - */ - udpTTL?: number | undefined; - /** - * When `true`, requires that the endpoint validate peer addresses using retry packets - * while establishing a new connection. - * @since v23.8.0 - */ - validateAddress?: boolean | undefined; - } - /** - * A `QuicEndpoint` encapsulates the local UDP-port binding for QUIC. It can be - * used as both a client and a server. - * @since v23.8.0 - */ - class QuicEndpoint implements AsyncDisposable { - constructor(options?: EndpointOptions); - /** - * The local UDP socket address to which the endpoint is bound, if any. - * - * If the endpoint is not currently bound then the value will be `undefined`. Read only. - * @since v23.8.0 - */ - readonly address: SocketAddress | undefined; - /** - * When `endpoint.busy` is set to true, the endpoint will temporarily reject - * new sessions from being created. Read/write. - * - * ```js - * // Mark the endpoint busy. New sessions will be prevented. - * endpoint.busy = true; - * - * // Mark the endpoint free. New session will be allowed. - * endpoint.busy = false; - * ``` - * - * The `busy` property is useful when the endpoint is under heavy load and needs to - * temporarily reject new sessions while it catches up. - * @since v23.8.0 - */ - busy: boolean; - /** - * Gracefully close the endpoint. The endpoint will close and destroy itself when - * all currently open sessions close. Once called, new sessions will be rejected. - * - * Returns a promise that is fulfilled when the endpoint is destroyed. - * @since v23.8.0 - */ - close(): Promise; - /** - * A promise that is fulfilled when the endpoint is destroyed. This will be the same promise that is - * returned by the `endpoint.close()` function. Read only. - * @since v23.8.0 - */ - readonly closed: Promise; - /** - * True if `endpoint.close()` has been called and closing the endpoint has not yet completed. - * Read only. - * @since v23.8.0 - */ - readonly closing: boolean; - /** - * Forcefully closes the endpoint by forcing all open sessions to be immediately - * closed. - * @since v23.8.0 - */ - destroy(error?: any): void; - /** - * True if `endpoint.destroy()` has been called. Read only. - * @since v23.8.0 - */ - readonly destroyed: boolean; - /** - * The statistics collected for an active session. Read only. - * @since v23.8.0 - */ - readonly stats: QuicEndpoint.Stats; - /** - * Calls `endpoint.close()` and returns a promise that fulfills when the - * endpoint has closed. - * @since v23.8.0 - */ - [Symbol.asyncDispose](): Promise; - } - namespace QuicEndpoint { - /** - * A view of the collected statistics for an endpoint. - * @since v23.8.0 - */ - class Stats { - private constructor(); - /** - * A timestamp indicating the moment the endpoint was created. Read only. - * @since v23.8.0 - */ - readonly createdAt: bigint; - /** - * A timestamp indicating the moment the endpoint was destroyed. Read only. - * @since v23.8.0 - */ - readonly destroyedAt: bigint; - /** - * The total number of bytes received by this endpoint. Read only. - * @since v23.8.0 - */ - readonly bytesReceived: bigint; - /** - * The total number of bytes sent by this endpoint. Read only. - * @since v23.8.0 - */ - readonly bytesSent: bigint; - /** - * The total number of QUIC packets successfully received by this endpoint. Read only. - * @since v23.8.0 - */ - readonly packetsReceived: bigint; - /** - * The total number of QUIC packets successfully sent by this endpoint. Read only. - * @since v23.8.0 - */ - readonly packetsSent: bigint; - /** - * The total number of peer-initiated sessions received by this endpoint. Read only. - * @since v23.8.0 - */ - readonly serverSessions: bigint; - /** - * The total number of sessions initiated by this endpoint. Read only. - * @since v23.8.0 - */ - readonly clientSessions: bigint; - /** - * The total number of times an initial packet was rejected due to the - * endpoint being marked busy. Read only. - * @since v23.8.0 - */ - readonly serverBusyCount: bigint; - /** - * The total number of QUIC retry attempts on this endpoint. Read only. - * @since v23.8.0 - */ - readonly retryCount: bigint; - /** - * The total number sessions rejected due to QUIC version mismatch. Read only. - * @since v23.8.0 - */ - readonly versionNegotiationCount: bigint; - /** - * The total number of stateless resets handled by this endpoint. Read only. - * @since v23.8.0 - */ - readonly statelessResetCount: bigint; - /** - * The total number of sessions that were closed before handshake completed. Read only. - * @since v23.8.0 - */ - readonly immediateCloseCount: bigint; - } - } - interface CreateStreamOptions { - body?: ArrayBuffer | NodeJS.ArrayBufferView | Blob | undefined; - sendOrder?: number | undefined; - } - interface SessionPath { - local: SocketAddress; - remote: SocketAddress; - } - /** - * A `QuicSession` represents the local side of a QUIC connection. - * @since v23.8.0 - */ - class QuicSession implements AsyncDisposable { - private constructor(); - /** - * Initiate a graceful close of the session. Existing streams will be allowed - * to complete but no new streams will be opened. Once all streams have closed, - * the session will be destroyed. The returned promise will be fulfilled once - * the session has been destroyed. - * @since v23.8.0 - */ - close(): Promise; - /** - * A promise that is fulfilled once the session is destroyed. - * @since v23.8.0 - */ - readonly closed: Promise; - /** - * Immediately destroy the session. All streams will be destroys and the - * session will be closed. - * @since v23.8.0 - */ - destroy(error?: any): void; - /** - * True if `session.destroy()` has been called. Read only. - * @since v23.8.0 - */ - readonly destroyed: boolean; - /** - * The endpoint that created this session. Read only. - * @since v23.8.0 - */ - readonly endpoint: QuicEndpoint; - /** - * The callback to invoke when a new stream is initiated by a remote peer. Read/write. - * @since v23.8.0 - */ - onstream: OnStreamCallback | undefined; - /** - * The callback to invoke when a new datagram is received from a remote peer. Read/write. - * @since v23.8.0 - */ - ondatagram: OnDatagramCallback | undefined; - /** - * The callback to invoke when the status of a datagram is updated. Read/write. - * @since v23.8.0 - */ - ondatagramstatus: OnDatagramStatusCallback | undefined; - /** - * The callback to invoke when the path validation is updated. Read/write. - * @since v23.8.0 - */ - onpathvalidation: OnPathValidationCallback | undefined; - /** - * The callback to invoke when a new session ticket is received. Read/write. - * @since v23.8.0 - */ - onsessionticket: OnSessionTicketCallback | undefined; - /** - * The callback to invoke when a version negotiation is initiated. Read/write. - * @since v23.8.0 - */ - onversionnegotiation: OnVersionNegotiationCallback | undefined; - /** - * The callback to invoke when the TLS handshake is completed. Read/write. - * @since v23.8.0 - */ - onhandshake: OnHandshakeCallback | undefined; - /** - * Open a new bidirectional stream. If the `body` option is not specified, - * the outgoing stream will be half-closed. - * @since v23.8.0 - */ - createBidirectionalStream(options?: CreateStreamOptions): Promise; - /** - * Open a new unidirectional stream. If the `body` option is not specified, - * the outgoing stream will be closed. - * @since v23.8.0 - */ - createUnidirectionalStream(options?: CreateStreamOptions): Promise; - /** - * The local and remote socket addresses associated with the session. Read only. - * @since v23.8.0 - */ - path: SessionPath | undefined; - /** - * Sends an unreliable datagram to the remote peer, returning the datagram ID. - * If the datagram payload is specified as an `ArrayBufferView`, then ownership of - * that view will be transferred to the underlying stream. - * @since v23.8.0 - */ - sendDatagram(datagram: string | NodeJS.ArrayBufferView): bigint; - /** - * Return the current statistics for the session. Read only. - * @since v23.8.0 - */ - readonly stats: QuicSession.Stats; - /** - * Initiate a key update for the session. - * @since v23.8.0 - */ - updateKey(): void; - /** - * Calls `session.close()` and returns a promise that fulfills when the - * session has closed. - * @since v23.8.0 - */ - [Symbol.asyncDispose](): Promise; - } - namespace QuicSession { - /** - * @since v23.8.0 - */ - class Stats { - private constructor(); - /** - * @since v23.8.0 - */ - readonly createdAt: bigint; - /** - * @since v23.8.0 - */ - readonly closingAt: bigint; - /** - * @since v23.8.0 - */ - readonly handshakeCompletedAt: bigint; - /** - * @since v23.8.0 - */ - readonly handshakeConfirmedAt: bigint; - /** - * @since v23.8.0 - */ - readonly bytesReceived: bigint; - /** - * @since v23.8.0 - */ - readonly bytesSent: bigint; - /** - * @since v23.8.0 - */ - readonly bidiInStreamCount: bigint; - /** - * @since v23.8.0 - */ - readonly bidiOutStreamCount: bigint; - /** - * @since v23.8.0 - */ - readonly uniInStreamCount: bigint; - /** - * @since v23.8.0 - */ - readonly uniOutStreamCount: bigint; - /** - * @since v23.8.0 - */ - readonly maxBytesInFlights: bigint; - /** - * @since v23.8.0 - */ - readonly bytesInFlight: bigint; - /** - * @since v23.8.0 - */ - readonly blockCount: bigint; - /** - * @since v23.8.0 - */ - readonly cwnd: bigint; - /** - * @since v23.8.0 - */ - readonly latestRtt: bigint; - /** - * @since v23.8.0 - */ - readonly minRtt: bigint; - /** - * @since v23.8.0 - */ - readonly rttVar: bigint; - /** - * @since v23.8.0 - */ - readonly smoothedRtt: bigint; - /** - * @since v23.8.0 - */ - readonly ssthresh: bigint; - /** - * @since v23.8.0 - */ - readonly datagramsReceived: bigint; - /** - * @since v23.8.0 - */ - readonly datagramsSent: bigint; - /** - * @since v23.8.0 - */ - readonly datagramsAcknowledged: bigint; - /** - * @since v23.8.0 - */ - readonly datagramsLost: bigint; - } - } - /** - * @since v23.8.0 - */ - class QuicStream { - private constructor(); - /** - * A promise that is fulfilled when the stream is fully closed. - * @since v23.8.0 - */ - readonly closed: Promise; - /** - * Immediately and abruptly destroys the stream. - * @since v23.8.0 - */ - destroy(error?: any): void; - /** - * True if `stream.destroy()` has been called. - * @since v23.8.0 - */ - readonly destroyed: boolean; - /** - * The directionality of the stream. Read only. - * @since v23.8.0 - */ - readonly direction: "bidi" | "uni"; - /** - * The stream ID. Read only. - * @since v23.8.0 - */ - readonly id: bigint; - /** - * The callback to invoke when the stream is blocked. Read/write. - * @since v23.8.0 - */ - onblocked: OnBlockedCallback | undefined; - /** - * The callback to invoke when the stream is reset. Read/write. - * @since v23.8.0 - */ - onreset: OnStreamErrorCallback | undefined; - /** - * @since v23.8.0 - */ - readonly readable: ReadableStream; - /** - * The session that created this stream. Read only. - * @since v23.8.0 - */ - readonly session: QuicSession; - /** - * The current statistics for the stream. Read only. - * @since v23.8.0 - */ - readonly stats: QuicStream.Stats; - } - namespace QuicStream { - /** - * @since v23.8.0 - */ - class Stats { - private constructor(); - /** - * @since v23.8.0 - */ - readonly ackedAt: bigint; - /** - * @since v23.8.0 - */ - readonly bytesReceived: bigint; - /** - * @since v23.8.0 - */ - readonly bytesSent: bigint; - /** - * @since v23.8.0 - */ - readonly createdAt: bigint; - /** - * @since v23.8.0 - */ - readonly destroyedAt: bigint; - /** - * @since v23.8.0 - */ - readonly finalSize: bigint; - /** - * @since v23.8.0 - */ - readonly isConnected: bigint; - /** - * @since v23.8.0 - */ - readonly maxOffset: bigint; - /** - * @since v23.8.0 - */ - readonly maxOffsetAcknowledged: bigint; - /** - * @since v23.8.0 - */ - readonly maxOffsetReceived: bigint; - /** - * @since v23.8.0 - */ - readonly openedAt: bigint; - /** - * @since v23.8.0 - */ - readonly receivedAt: bigint; - } - } - namespace constants { - enum cc { - RENO = "reno", - CUBIC = "cubic", - BBR = "bbr", - } - const DEFAULT_CIPHERS: string; - const DEFAULT_GROUPS: string; - } -} diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts deleted file mode 100644 index 5042975..0000000 --- a/node_modules/@types/node/readline.d.ts +++ /dev/null @@ -1,507 +0,0 @@ -declare module "node:readline" { - import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; - interface Key { - sequence?: string | undefined; - name?: string | undefined; - ctrl?: boolean | undefined; - meta?: boolean | undefined; - shift?: boolean | undefined; - } - interface InterfaceEventMap { - "close": []; - "error": [error: Error]; - "history": [history: string[]]; - "line": [input: string]; - "pause": []; - "resume": []; - "SIGCONT": []; - "SIGINT": []; - "SIGTSTP": []; - } - /** - * Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a - * single `input` [Readable](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v25.x/api/stream.html#writable-streams) stream. - * The `output` stream is used to print prompts for user input that arrives on, - * and is read from, the `input` stream. - * @since v0.1.104 - */ - class Interface implements EventEmitter, Disposable { - /** - * NOTE: According to the documentation: - * - * > Instances of the `readline.Interface` class are constructed using the - * > `readline.createInterface()` method. - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#class-interfaceconstructor - */ - protected constructor( - input: NodeJS.ReadableStream, - output?: NodeJS.WritableStream, - completer?: Completer | AsyncCompleter, - terminal?: boolean, - ); - /** - * NOTE: According to the documentation: - * - * > Instances of the `readline.Interface` class are constructed using the - * > `readline.createInterface()` method. - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#class-interfaceconstructor - */ - protected constructor(options: ReadLineOptions); - readonly terminal: boolean; - /** - * The current input data being processed by node. - * - * This can be used when collecting input from a TTY stream to retrieve the - * current value that has been processed thus far, prior to the `line` event - * being emitted. Once the `line` event has been emitted, this property will - * be an empty string. - * - * Be aware that modifying the value during the instance runtime may have - * unintended consequences if `rl.cursor` is not also controlled. - * - * **If not using a TTY stream for input, use the `'line'` event.** - * - * One possible use case would be as follows: - * - * ```js - * const values = ['lorem ipsum', 'dolor sit amet']; - * const rl = readline.createInterface(process.stdin); - * const showResults = debounce(() => { - * console.log( - * '\n', - * values.filter((val) => val.startsWith(rl.line)).join(' '), - * ); - * }, 300); - * process.stdin.on('keypress', (c, k) => { - * showResults(); - * }); - * ``` - * @since v0.1.98 - */ - readonly line: string; - /** - * The cursor position relative to `rl.line`. - * - * This will track where the current cursor lands in the input string, when - * reading input from a TTY stream. The position of cursor determines the - * portion of the input string that will be modified as input is processed, - * as well as the column where the terminal caret will be rendered. - * @since v0.1.98 - */ - readonly cursor: number; - /** - * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`. - * @since v15.3.0, v14.17.0 - * @return the current prompt string - */ - getPrompt(): string; - /** - * The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called. - * @since v0.1.98 - */ - setPrompt(prompt: string): void; - /** - * The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new - * location at which to provide input. - * - * When called, `rl.prompt()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the prompt is not written. - * @since v0.1.98 - * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`. - */ - prompt(preserveCursor?: boolean): void; - /** - * The `rl.question()` method displays the `query` by writing it to the `output`, - * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. - * - * When called, `rl.question()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. - * - * The `callback` function passed to `rl.question()` does not follow the typical - * pattern of accepting an `Error` object or `null` as the first argument. - * The `callback` is called with the provided answer as the only argument. - * - * An error will be thrown if calling `rl.question()` after `rl.close()`. - * - * Example usage: - * - * ```js - * rl.question('What is your favorite food? ', (answer) => { - * console.log(`Oh, so your favorite food is ${answer}`); - * }); - * ``` - * - * Using an `AbortController` to cancel a question. - * - * ```js - * const ac = new AbortController(); - * const signal = ac.signal; - * - * rl.question('What is your favorite food? ', { signal }, (answer) => { - * console.log(`Oh, so your favorite food is ${answer}`); - * }); - * - * signal.addEventListener('abort', () => { - * console.log('The food question timed out'); - * }, { once: true }); - * - * setTimeout(() => ac.abort(), 10000); - * ``` - * @since v0.3.3 - * @param query A statement or query to write to `output`, prepended to the prompt. - * @param callback A callback function that is invoked with the user's input in response to the `query`. - */ - question(query: string, callback: (answer: string) => void): void; - question(query: string, options: Abortable, callback: (answer: string) => void): void; - /** - * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed - * later if necessary. - * - * Calling `rl.pause()` does not immediately pause other events (including `'line'`) from being emitted by the `Interface` instance. - * @since v0.3.4 - */ - pause(): this; - /** - * The `rl.resume()` method resumes the `input` stream if it has been paused. - * @since v0.3.4 - */ - resume(): this; - /** - * The `rl.close()` method closes the `Interface` instance and - * relinquishes control over the `input` and `output` streams. When called, - * the `'close'` event will be emitted. - * - * Calling `rl.close()` does not immediately stop other events (including `'line'`) - * from being emitted by the `Interface` instance. - * @since v0.1.98 - */ - close(): void; - /** - * Alias for `rl.close()`. - * @since v22.15.0 - */ - [Symbol.dispose](): void; - /** - * The `rl.write()` method will write either `data` or a key sequence identified - * by `key` to the `output`. The `key` argument is supported only if `output` is - * a `TTY` text terminal. See `TTY keybindings` for a list of key - * combinations. - * - * If `key` is specified, `data` is ignored. - * - * When called, `rl.write()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the `data` and `key` are not written. - * - * ```js - * rl.write('Delete this!'); - * // Simulate Ctrl+U to delete the line written previously - * rl.write(null, { ctrl: true, name: 'u' }); - * ``` - * - * The `rl.write()` method will write the data to the `readline` `Interface`'s `input` _as if it were provided by the user_. - * @since v0.1.98 - */ - write(data: string | Buffer, key?: Key): void; - write(data: undefined | null | string | Buffer, key: Key): void; - /** - * Returns the real position of the cursor in relation to the input - * prompt + string. Long input (wrapping) strings, as well as multiple - * line prompts are included in the calculations. - * @since v13.5.0, v12.16.0 - */ - getCursorPos(): CursorPos; - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - } - interface Interface extends InternalEventEmitter {} - type ReadLine = Interface; // type forwarded for backwards compatibility - type Completer = (line: string) => CompleterResult; - type AsyncCompleter = ( - line: string, - callback: (err?: null | Error, result?: CompleterResult) => void, - ) => void; - type CompleterResult = [string[], string]; - interface ReadLineOptions { - /** - * The [`Readable`](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream to listen to - */ - input: NodeJS.ReadableStream; - /** - * The [`Writable`](https://nodejs.org/docs/latest-v25.x/api/stream.html#writable-streams) stream to write readline data to. - */ - output?: NodeJS.WritableStream | undefined; - /** - * An optional function used for Tab autocompletion. - */ - completer?: Completer | AsyncCompleter | undefined; - /** - * `true` if the `input` and `output` streams should be treated like a TTY, - * and have ANSI/VT100 escape codes written to it. - * Default: checking `isTTY` on the `output` stream upon instantiation. - */ - terminal?: boolean | undefined; - /** - * Initial list of history lines. - * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check, - * otherwise the history caching mechanism is not initialized at all. - * @default [] - */ - history?: string[] | undefined; - /** - * Maximum number of history lines retained. - * To disable the history set this value to `0`. - * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check, - * otherwise the history caching mechanism is not initialized at all. - * @default 30 - */ - historySize?: number | undefined; - /** - * If `true`, when a new input line added to the history list duplicates an older one, - * this removes the older line from the list. - * @default false - */ - removeHistoryDuplicates?: boolean | undefined; - /** - * The prompt string to use. - * @default "> " - */ - prompt?: string | undefined; - /** - * If the delay between `\r` and `\n` exceeds `crlfDelay` milliseconds, - * both `\r` and `\n` will be treated as separate end-of-line input. - * `crlfDelay` will be coerced to a number no less than `100`. - * It can be set to `Infinity`, in which case - * `\r` followed by `\n` will always be considered a single newline - * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v25.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter). - * @default 100 - */ - crlfDelay?: number | undefined; - /** - * The duration `readline` will wait for a character - * (when reading an ambiguous key sequence in milliseconds - * one that can both form a complete key sequence using the input read so far - * and can take additional input to complete a longer key sequence). - * @default 500 - */ - escapeCodeTimeout?: number | undefined; - /** - * The number of spaces a tab is equal to (minimum 1). - * @default 8 - */ - tabSize?: number | undefined; - /** - * Allows closing the interface using an AbortSignal. - * Aborting the signal will internally call `close` on the interface. - */ - signal?: AbortSignal | undefined; - } - /** - * The `readline.createInterface()` method creates a new `readline.Interface` instance. - * - * ```js - * import readline from 'node:readline'; - * const rl = readline.createInterface({ - * input: process.stdin, - * output: process.stdout, - * }); - * ``` - * - * Once the `readline.Interface` instance is created, the most common case is to - * listen for the `'line'` event: - * - * ```js - * rl.on('line', (line) => { - * console.log(`Received: ${line}`); - * }); - * ``` - * - * If `terminal` is `true` for this instance then the `output` stream will get - * the best compatibility if it defines an `output.columns` property and emits - * a `'resize'` event on the `output` if or when the columns ever change - * (`process.stdout` does this automatically when it is a TTY). - * - * When creating a `readline.Interface` using `stdin` as input, the program - * will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without - * waiting for user input, call `process.stdin.unref()`. - * @since v0.1.98 - */ - function createInterface( - input: NodeJS.ReadableStream, - output?: NodeJS.WritableStream, - completer?: Completer | AsyncCompleter, - terminal?: boolean, - ): Interface; - function createInterface(options: ReadLineOptions): Interface; - /** - * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input. - * - * Optionally, `interface` specifies a `readline.Interface` instance for which - * autocompletion is disabled when copy-pasted input is detected. - * - * If the `stream` is a `TTY`, then it must be in raw mode. - * - * This is automatically called by any readline instance on its `input` if the `input` is a terminal. Closing the `readline` instance does not stop - * the `input` from emitting `'keypress'` events. - * - * ```js - * readline.emitKeypressEvents(process.stdin); - * if (process.stdin.isTTY) - * process.stdin.setRawMode(true); - * ``` - * - * ## Example: Tiny CLI - * - * The following example illustrates the use of `readline.Interface` class to - * implement a small command-line interface: - * - * ```js - * import readline from 'node:readline'; - * const rl = readline.createInterface({ - * input: process.stdin, - * output: process.stdout, - * prompt: 'OHAI> ', - * }); - * - * rl.prompt(); - * - * rl.on('line', (line) => { - * switch (line.trim()) { - * case 'hello': - * console.log('world!'); - * break; - * default: - * console.log(`Say what? I might have heard '${line.trim()}'`); - * break; - * } - * rl.prompt(); - * }).on('close', () => { - * console.log('Have a great day!'); - * process.exit(0); - * }); - * ``` - * - * ## Example: Read file stream line-by-Line - * - * A common use case for `readline` is to consume an input file one line at a - * time. The easiest way to do so is leveraging the `fs.ReadStream` API as - * well as a `for await...of` loop: - * - * ```js - * import fs from 'node:fs'; - * import readline from 'node:readline'; - * - * async function processLineByLine() { - * const fileStream = fs.createReadStream('input.txt'); - * - * const rl = readline.createInterface({ - * input: fileStream, - * crlfDelay: Infinity, - * }); - * // Note: we use the crlfDelay option to recognize all instances of CR LF - * // ('\r\n') in input.txt as a single line break. - * - * for await (const line of rl) { - * // Each line in input.txt will be successively available here as `line`. - * console.log(`Line from file: ${line}`); - * } - * } - * - * processLineByLine(); - * ``` - * - * Alternatively, one could use the `'line'` event: - * - * ```js - * import fs from 'node:fs'; - * import readline from 'node:readline'; - * - * const rl = readline.createInterface({ - * input: fs.createReadStream('sample.txt'), - * crlfDelay: Infinity, - * }); - * - * rl.on('line', (line) => { - * console.log(`Line from file: ${line}`); - * }); - * ``` - * - * Currently, `for await...of` loop can be a bit slower. If `async` / `await` flow and speed are both essential, a mixed approach can be applied: - * - * ```js - * import { once } from 'node:events'; - * import { createReadStream } from 'node:fs'; - * import { createInterface } from 'node:readline'; - * - * (async function processLineByLine() { - * try { - * const rl = createInterface({ - * input: createReadStream('big-file.txt'), - * crlfDelay: Infinity, - * }); - * - * rl.on('line', (line) => { - * // Process the line. - * }); - * - * await once(rl, 'close'); - * - * console.log('File processed.'); - * } catch (err) { - * console.error(err); - * } - * })(); - * ``` - * @since v0.7.7 - */ - function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; - type Direction = -1 | 0 | 1; - interface CursorPos { - rows: number; - cols: number; - } - /** - * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) stream - * in a specified direction identified by `dir`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; - /** - * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) stream from - * the current position of the cursor down. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; - /** - * The `readline.cursorTo()` method moves cursor to the specified position in a - * given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) `stream`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; - /** - * The `readline.moveCursor()` method moves the cursor _relative_ to its current - * position in a given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) `stream`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; -} -declare module "node:readline" { - export * as promises from "node:readline/promises"; -} -declare module "readline" { - export * from "node:readline"; -} diff --git a/node_modules/@types/node/readline/promises.d.ts b/node_modules/@types/node/readline/promises.d.ts deleted file mode 100644 index ccee490..0000000 --- a/node_modules/@types/node/readline/promises.d.ts +++ /dev/null @@ -1,158 +0,0 @@ -declare module "node:readline/promises" { - import { Abortable } from "node:events"; - import { - CompleterResult, - Direction, - Interface as _Interface, - ReadLineOptions as _ReadLineOptions, - } from "node:readline"; - /** - * Instances of the `readlinePromises.Interface` class are constructed using the `readlinePromises.createInterface()` method. Every instance is associated with a - * single `input` `Readable` stream and a single `output` `Writable` stream. - * The `output` stream is used to print prompts for user input that arrives on, - * and is read from, the `input` stream. - * @since v17.0.0 - */ - class Interface extends _Interface { - /** - * The `rl.question()` method displays the `query` by writing it to the `output`, - * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. - * - * When called, `rl.question()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. - * - * If the question is called after `rl.close()`, it returns a rejected promise. - * - * Example usage: - * - * ```js - * const answer = await rl.question('What is your favorite food? '); - * console.log(`Oh, so your favorite food is ${answer}`); - * ``` - * - * Using an `AbortSignal` to cancel a question. - * - * ```js - * const signal = AbortSignal.timeout(10_000); - * - * signal.addEventListener('abort', () => { - * console.log('The food question timed out'); - * }, { once: true }); - * - * const answer = await rl.question('What is your favorite food? ', { signal }); - * console.log(`Oh, so your favorite food is ${answer}`); - * ``` - * @since v17.0.0 - * @param query A statement or query to write to `output`, prepended to the prompt. - * @return A promise that is fulfilled with the user's input in response to the `query`. - */ - question(query: string): Promise; - question(query: string, options: Abortable): Promise; - } - /** - * @since v17.0.0 - */ - class Readline { - /** - * @param stream A TTY stream. - */ - constructor( - stream: NodeJS.WritableStream, - options?: { - autoCommit?: boolean | undefined; - }, - ); - /** - * The `rl.clearLine()` method adds to the internal list of pending action an - * action that clears current line of the associated `stream` in a specified - * direction identified by `dir`. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - clearLine(dir: Direction): this; - /** - * The `rl.clearScreenDown()` method adds to the internal list of pending action an - * action that clears the associated stream from the current position of the - * cursor down. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - clearScreenDown(): this; - /** - * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions. - * @since v17.0.0 - */ - commit(): Promise; - /** - * The `rl.cursorTo()` method adds to the internal list of pending action an action - * that moves cursor to the specified position in the associated `stream`. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - cursorTo(x: number, y?: number): this; - /** - * The `rl.moveCursor()` method adds to the internal list of pending action an - * action that moves the cursor _relative_ to its current position in the - * associated `stream`. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - moveCursor(dx: number, dy: number): this; - /** - * The `rl.rollback` methods clears the internal list of pending actions without - * sending it to the associated `stream`. - * @since v17.0.0 - * @return this - */ - rollback(): this; - } - type Completer = (line: string) => CompleterResult | Promise; - interface ReadLineOptions extends Omit<_ReadLineOptions, "completer"> { - /** - * An optional function used for Tab autocompletion. - */ - completer?: Completer | undefined; - } - /** - * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance. - * - * ```js - * import readlinePromises from 'node:readline/promises'; - * const rl = readlinePromises.createInterface({ - * input: process.stdin, - * output: process.stdout, - * }); - * ``` - * - * Once the `readlinePromises.Interface` instance is created, the most common case - * is to listen for the `'line'` event: - * - * ```js - * rl.on('line', (line) => { - * console.log(`Received: ${line}`); - * }); - * ``` - * - * If `terminal` is `true` for this instance then the `output` stream will get - * the best compatibility if it defines an `output.columns` property and emits - * a `'resize'` event on the `output` if or when the columns ever change - * (`process.stdout` does this automatically when it is a TTY). - * @since v17.0.0 - */ - function createInterface( - input: NodeJS.ReadableStream, - output?: NodeJS.WritableStream, - completer?: Completer, - terminal?: boolean, - ): Interface; - function createInterface(options: ReadLineOptions): Interface; -} -declare module "readline/promises" { - export * from "node:readline/promises"; -} diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts deleted file mode 100644 index 4bb74ec..0000000 --- a/node_modules/@types/node/repl.d.ts +++ /dev/null @@ -1,420 +0,0 @@ -declare module "node:repl" { - import { AsyncCompleter, Completer, Interface, InterfaceEventMap } from "node:readline"; - import { InspectOptions } from "node:util"; - import { Context } from "node:vm"; - interface ReplOptions { - /** - * The input prompt to display. - * @default "> " - */ - prompt?: string | undefined; - /** - * The `Readable` stream from which REPL input will be read. - * @default process.stdin - */ - input?: NodeJS.ReadableStream | undefined; - /** - * The `Writable` stream to which REPL output will be written. - * @default process.stdout - */ - output?: NodeJS.WritableStream | undefined; - /** - * If `true`, specifies that the output should be treated as a TTY terminal, and have - * ANSI/VT100 escape codes written to it. - * Default: checking the value of the `isTTY` property on the output stream upon - * instantiation. - */ - terminal?: boolean | undefined; - /** - * The function to be used when evaluating each given line of input. - * **Default:** an async wrapper for the JavaScript `eval()` function. An `eval` function can - * error with `repl.Recoverable` to indicate the input was incomplete and prompt for - * additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#custom-evaluation-functions) - * section for more details. - */ - eval?: REPLEval | undefined; - /** - * Defines if the repl prints output previews or not. - * @default `true` Always `false` in case `terminal` is falsy. - */ - preview?: boolean | undefined; - /** - * If `true`, specifies that the default `writer` function should include ANSI color - * styling to REPL output. If a custom `writer` function is provided then this has no - * effect. - * @default the REPL instance's `terminal` value - */ - useColors?: boolean | undefined; - /** - * If `true`, specifies that the default evaluation function will use the JavaScript - * `global` as the context as opposed to creating a new separate context for the REPL - * instance. The node CLI REPL sets this value to `true`. - * @default false - */ - useGlobal?: boolean | undefined; - /** - * If `true`, specifies that the default writer will not output the return value of a - * command if it evaluates to `undefined`. - * @default false - */ - ignoreUndefined?: boolean | undefined; - /** - * The function to invoke to format the output of each command before writing to `output`. - * @default a wrapper for `util.inspect` - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_customizing_repl_output - */ - writer?: REPLWriter | undefined; - /** - * An optional function used for custom Tab auto completion. - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#readline_use_of_the_completer_function - */ - completer?: Completer | AsyncCompleter | undefined; - /** - * A flag that specifies whether the default evaluator executes all JavaScript commands in - * strict mode or default (sloppy) mode. - * Accepted values are: - * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. - * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to - * prefacing every repl statement with `'use strict'`. - */ - replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined; - /** - * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is - * pressed. This cannot be used together with a custom `eval` function. - * @default false - */ - breakEvalOnSigint?: boolean | undefined; - /** - * This function customizes error handling in the REPL. - * It receives the thrown exception as its first argument and must return one - * of the following values synchronously: - * * `'print'` to print the error to the output stream (default behavior). - * * `'ignore'` to skip all remaining error handling. - * * `'unhandled'` to treat the exception as fully unhandled. In this case, - * the error will be passed to process-wide exception handlers, such as - * the `'uncaughtException'` event. - * The `'unhandled'` value may or may not be desirable in situations - * where the `REPLServer` instance has been closed, depending on the particular - * use case. - * @since v25.9.0 - */ - handleError?: ((err: unknown) => "print" | "ignore" | "unhandled") | undefined; - } - type REPLEval = ( - this: REPLServer, - evalCmd: string, - context: Context, - file: string, - cb: (err: Error | null, result: any) => void, - ) => void; - type REPLWriter = (this: REPLServer, obj: any) => string; - /** - * This is the default "writer" value, if none is passed in the REPL options, - * and it can be overridden by custom print functions. - */ - const writer: REPLWriter & { - options: InspectOptions; - }; - type REPLCommandAction = (this: REPLServer, text: string) => void; - interface REPLCommand { - /** - * Help text to be displayed when `.help` is entered. - */ - help?: string | undefined; - /** - * The function to execute, optionally accepting a single string argument. - */ - action: REPLCommandAction; - } - interface REPLServerSetupHistoryOptions { - filePath?: string | undefined; - size?: number | undefined; - removeHistoryDuplicates?: boolean | undefined; - onHistoryFileLoaded?: ((err: Error | null, repl: REPLServer) => void) | undefined; - } - interface REPLServerEventMap extends InterfaceEventMap { - "exit": []; - "reset": [context: Context]; - } - /** - * Instances of `repl.REPLServer` are created using the {@link start} method - * or directly using the JavaScript `new` keyword. - * - * ```js - * import repl from 'node:repl'; - * - * const options = { useColors: true }; - * - * const firstInstance = repl.start(options); - * const secondInstance = new repl.REPLServer(options); - * ``` - * @since v0.1.91 - */ - class REPLServer extends Interface { - /** - * NOTE: According to the documentation: - * - * > Instances of `repl.REPLServer` are created using the `repl.start()` method and - * > _should not_ be created directly using the JavaScript `new` keyword. - * - * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_class_replserver - */ - private constructor(); - /** - * The `vm.Context` provided to the `eval` function to be used for JavaScript - * evaluation. - */ - readonly context: Context; - /** - * @deprecated since v14.3.0 - Use `input` instead. - */ - readonly inputStream: NodeJS.ReadableStream; - /** - * @deprecated since v14.3.0 - Use `output` instead. - */ - readonly outputStream: NodeJS.WritableStream; - /** - * The `Readable` stream from which REPL input will be read. - */ - readonly input: NodeJS.ReadableStream; - /** - * The `Writable` stream to which REPL output will be written. - */ - readonly output: NodeJS.WritableStream; - /** - * The commands registered via `replServer.defineCommand()`. - */ - readonly commands: NodeJS.ReadOnlyDict; - /** - * A value indicating whether the REPL is currently in "editor mode". - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_commands_and_special_keys - */ - readonly editorMode: boolean; - /** - * A value indicating whether the `_` variable has been assigned. - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly underscoreAssigned: boolean; - /** - * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly last: any; - /** - * A value indicating whether the `_error` variable has been assigned. - * - * @since v9.8.0 - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly underscoreErrAssigned: boolean; - /** - * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). - * - * @since v9.8.0 - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly lastError: any; - /** - * Specified in the REPL options, this is the function to be used when evaluating each - * given line of input. If not specified in the REPL options, this is an async wrapper - * for the JavaScript `eval()` function. - */ - readonly eval: REPLEval; - /** - * Specified in the REPL options, this is a value indicating whether the default - * `writer` function should include ANSI color styling to REPL output. - */ - readonly useColors: boolean; - /** - * Specified in the REPL options, this is a value indicating whether the default `eval` - * function will use the JavaScript `global` as the context as opposed to creating a new - * separate context for the REPL instance. - */ - readonly useGlobal: boolean; - /** - * Specified in the REPL options, this is a value indicating whether the default `writer` - * function should output the result of a command if it evaluates to `undefined`. - */ - readonly ignoreUndefined: boolean; - /** - * Specified in the REPL options, this is the function to invoke to format the output of - * each command before writing to `outputStream`. If not specified in the REPL options, - * this will be a wrapper for `util.inspect`. - */ - readonly writer: REPLWriter; - /** - * Specified in the REPL options, this is the function to use for custom Tab auto-completion. - */ - readonly completer: Completer | AsyncCompleter; - /** - * Specified in the REPL options, this is a flag that specifies whether the default `eval` - * function should execute all JavaScript commands in strict mode or default (sloppy) mode. - * Possible values are: - * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. - * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to - * prefacing every repl statement with `'use strict'`. - */ - readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; - /** - * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands - * to the REPL instance. Such commands are invoked by typing a `.` followed by the `keyword`. The `cmd` is either a `Function` or an `Object` with the following - * properties: - * - * The following example shows two new commands added to the REPL instance: - * - * ```js - * import repl from 'node:repl'; - * - * const replServer = repl.start({ prompt: '> ' }); - * replServer.defineCommand('sayhello', { - * help: 'Say hello', - * action(name) { - * this.clearBufferedCommand(); - * console.log(`Hello, ${name}!`); - * this.displayPrompt(); - * }, - * }); - * replServer.defineCommand('saybye', function saybye() { - * console.log('Goodbye!'); - * this.close(); - * }); - * ``` - * - * The new commands can then be used from within the REPL instance: - * - * ```console - * > .sayhello Node.js User - * Hello, Node.js User! - * > .saybye - * Goodbye! - * ``` - * @since v0.3.0 - * @param keyword The command keyword (_without_ a leading `.` character). - * @param cmd The function to invoke when the command is processed. - */ - defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; - /** - * The `replServer.displayPrompt()` method readies the REPL instance for input - * from the user, printing the configured `prompt` to a new line in the `output` and resuming the `input` to accept new input. - * - * When multi-line input is being entered, a pipe `'|'` is printed rather than the - * 'prompt'. - * - * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`. - * - * The `replServer.displayPrompt` method is primarily intended to be called from - * within the action function for commands registered using the `replServer.defineCommand()` method. - * @since v0.1.91 - */ - displayPrompt(preserveCursor?: boolean): void; - /** - * The `replServer.clearBufferedCommand()` method clears any command that has been - * buffered but not yet executed. This method is primarily intended to be - * called from within the action function for commands registered using the `replServer.defineCommand()` method. - * @since v9.0.0 - */ - clearBufferedCommand(): void; - /** - * Initializes a history log file for the REPL instance. When executing the - * Node.js binary and using the command-line REPL, a history file is initialized - * by default. However, this is not the case when creating a REPL - * programmatically. Use this method to initialize a history log file when working - * with REPL instances programmatically. - * @since v11.10.0 - * @param historyPath the path to the history file - * @param callback called when history writes are ready or upon error - */ - setupHistory(historyPath: string, callback: (err: Error | null, repl: this) => void): void; - setupHistory( - historyConfig?: REPLServerSetupHistoryOptions, - callback?: (err: Error | null, repl: this) => void, - ): void; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: REPLServerEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: REPLServerEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: REPLServerEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: REPLServerEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: REPLServerEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: REPLServerEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: REPLServerEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: REPLServerEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: REPLServerEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - /** - * A flag passed in the REPL options. Evaluates expressions in sloppy mode. - */ - const REPL_MODE_SLOPPY: unique symbol; - /** - * A flag passed in the REPL options. Evaluates expressions in strict mode. - * This is equivalent to prefacing every repl statement with `'use strict'`. - */ - const REPL_MODE_STRICT: unique symbol; - /** - * The `repl.start()` method creates and starts a {@link REPLServer} instance. - * - * If `options` is a string, then it specifies the input prompt: - * - * ```js - * import repl from 'node:repl'; - * - * // a Unix style prompt - * repl.start('$ '); - * ``` - * @since v0.1.91 - */ - function start(options?: string | ReplOptions): REPLServer; - /** - * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_recoverable_errors - */ - class Recoverable extends SyntaxError { - err: Error; - constructor(err: Error); - } -} -declare module "repl" { - export * from "node:repl"; -} diff --git a/node_modules/@types/node/sea.d.ts b/node_modules/@types/node/sea.d.ts deleted file mode 100644 index 85ab108..0000000 --- a/node_modules/@types/node/sea.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -declare module "node:sea" { - type AssetKey = string; - /** - * @since v20.12.0 - * @return Whether this script is running inside a single-executable application. - */ - function isSea(): boolean; - /** - * This method can be used to retrieve the assets configured to be bundled into the - * single-executable application at build time. - * An error is thrown when no matching asset can be found. - * @since v20.12.0 - */ - function getAsset(key: AssetKey): ArrayBuffer; - function getAsset(key: AssetKey, encoding: string): string; - /** - * Similar to `sea.getAsset()`, but returns the result in a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob). - * An error is thrown when no matching asset can be found. - * @since v20.12.0 - */ - function getAssetAsBlob(key: AssetKey, options?: { - type: string; - }): Blob; - /** - * This method can be used to retrieve the assets configured to be bundled into the - * single-executable application at build time. - * An error is thrown when no matching asset can be found. - * - * Unlike `sea.getRawAsset()` or `sea.getAssetAsBlob()`, this method does not - * return a copy. Instead, it returns the raw asset bundled inside the executable. - * - * For now, users should avoid writing to the returned array buffer. If the - * injected section is not marked as writable or not aligned properly, - * writes to the returned array buffer is likely to result in a crash. - * @since v20.12.0 - */ - function getRawAsset(key: AssetKey): ArrayBuffer; - /** - * This method can be used to retrieve an array of all the keys of assets - * embedded into the single-executable application. - * An error is thrown when not running inside a single-executable application. - * @since v24.8.0 - * @returns An array containing all the keys of the assets - * embedded in the executable. If no assets are embedded, returns an empty array. - */ - function getAssetKeys(): string[]; -} diff --git a/node_modules/@types/node/sqlite.d.ts b/node_modules/@types/node/sqlite.d.ts deleted file mode 100644 index a1fa358..0000000 --- a/node_modules/@types/node/sqlite.d.ts +++ /dev/null @@ -1,1068 +0,0 @@ -declare module "node:sqlite" { - import { PathLike } from "node:fs"; - type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView; - type SQLOutputValue = null | number | bigint | string | NodeJS.NonSharedUint8Array; - interface DatabaseSyncOptions { - /** - * If `true`, the database is opened by the constructor. When - * this value is `false`, the database must be opened via the `open()` method. - * @since v22.5.0 - * @default true - */ - open?: boolean | undefined; - /** - * If `true`, foreign key constraints - * are enabled. This is recommended but can be disabled for compatibility with - * legacy database schemas. The enforcement of foreign key constraints can be - * enabled and disabled after opening the database using - * [`PRAGMA foreign_keys`](https://www.sqlite.org/pragma.html#pragma_foreign_keys). - * @since v22.10.0 - * @default true - */ - enableForeignKeyConstraints?: boolean | undefined; - /** - * If `true`, SQLite will accept - * [double-quoted string literals](https://www.sqlite.org/quirks.html#dblquote). - * This is not recommended but can be - * enabled for compatibility with legacy database schemas. - * @since v22.10.0 - * @default false - */ - enableDoubleQuotedStringLiterals?: boolean | undefined; - /** - * If `true`, the database is opened in read-only mode. - * If the database does not exist, opening it will fail. - * @since v22.12.0 - * @default false - */ - readOnly?: boolean | undefined; - /** - * If `true`, the `loadExtension` SQL function - * and the `loadExtension()` method are enabled. - * You can call `enableLoadExtension(false)` later to disable this feature. - * @since v22.13.0 - * @default false - */ - allowExtension?: boolean | undefined; - /** - * The [busy timeout](https://sqlite.org/c3ref/busy_timeout.html) in milliseconds. This is the maximum amount of - * time that SQLite will wait for a database lock to be released before - * returning an error. - * @since v24.0.0 - * @default 0 - */ - timeout?: number | undefined; - /** - * If `true`, integer fields are read as JavaScript `BigInt` values. If `false`, - * integer fields are read as JavaScript numbers. - * @since v24.4.0 - * @default false - */ - readBigInts?: boolean | undefined; - /** - * If `true`, query results are returned as arrays instead of objects. - * @since v24.4.0 - * @default false - */ - returnArrays?: boolean | undefined; - /** - * If `true`, allows binding named parameters without the prefix - * character (e.g., `foo` instead of `:foo`). - * @since v24.4.40 - * @default true - */ - allowBareNamedParameters?: boolean | undefined; - /** - * If `true`, unknown named parameters are ignored when binding. - * If `false`, an exception is thrown for unknown named parameters. - * @since v24.4.40 - * @default false - */ - allowUnknownNamedParameters?: boolean | undefined; - /** - * If `true`, enables the defensive flag. When the defensive flag is enabled, - * language features that allow ordinary SQL to deliberately corrupt the database file are disabled. - * The defensive flag can also be set using `enableDefensive()`. - * @since v25.1.0 - * @default true - */ - defensive?: boolean | undefined; - /** - * Configuration for various SQLite limits. These limits - * can be used to prevent excessive resource consumption when handling - * potentially malicious input. See [Run-Time Limits](https://www.sqlite.org/c3ref/c_limit_attached.html) and [Limit Constants](https://www.sqlite.org/c3ref/limit.html) - * in the SQLite documentation for details. Default values are determined by - * SQLite's compile-time defaults and may vary depending on how SQLite was - * built. The following properties are supported: - * @since v25.8.0 - */ - limits?: NodeJS.PartialOptions | undefined; - } - interface DatabaseLimits { - length: number; - sqlLength: number; - column: number; - exprDepth: number; - compoundSelect: number; - vdbeOp: number; - functionArg: number; - attach: number; - likePatternLength: number; - variableNumber: number; - triggerDepth: number; - } - interface CreateSessionOptions { - /** - * A specific table to track changes for. By default, changes to all tables are tracked. - * @since v22.12.0 - */ - table?: string | undefined; - /** - * Name of the database to track. This is useful when multiple databases have been added using - * [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html). - * @since v22.12.0 - * @default 'main' - */ - db?: string | undefined; - } - interface ApplyChangesetOptions { - /** - * Skip changes that, when targeted table name is supplied to this function, return a truthy value. - * By default, all changes are attempted. - * @since v22.12.0 - */ - filter?: ((tableName: string) => boolean) | undefined; - /** - * A function that determines how to handle conflicts. The function receives one argument, - * which can be one of the following values: - * - * * `SQLITE_CHANGESET_DATA`: A `DELETE` or `UPDATE` change does not contain the expected "before" values. - * * `SQLITE_CHANGESET_NOTFOUND`: A row matching the primary key of the `DELETE` or `UPDATE` change does not exist. - * * `SQLITE_CHANGESET_CONFLICT`: An `INSERT` change results in a duplicate primary key. - * * `SQLITE_CHANGESET_FOREIGN_KEY`: Applying a change would result in a foreign key violation. - * * `SQLITE_CHANGESET_CONSTRAINT`: Applying a change results in a `UNIQUE`, `CHECK`, or `NOT NULL` constraint - * violation. - * - * The function should return one of the following values: - * - * * `SQLITE_CHANGESET_OMIT`: Omit conflicting changes. - * * `SQLITE_CHANGESET_REPLACE`: Replace existing values with conflicting changes (only valid with - `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT` conflicts). - * * `SQLITE_CHANGESET_ABORT`: Abort on conflict and roll back the database. - * - * When an error is thrown in the conflict handler or when any other value is returned from the handler, - * applying the changeset is aborted and the database is rolled back. - * - * **Default**: A function that returns `SQLITE_CHANGESET_ABORT`. - * @since v22.12.0 - */ - onConflict?: ((conflictType: number) => number) | undefined; - } - interface FunctionOptions { - /** - * If `true`, the [`SQLITE_DETERMINISTIC`](https://www.sqlite.org/c3ref/c_deterministic.html) flag is - * set on the created function. - * @default false - */ - deterministic?: boolean | undefined; - /** - * If `true`, the [`SQLITE_DIRECTONLY`](https://www.sqlite.org/c3ref/c_directonly.html) flag is set on - * the created function. - * @default false - */ - directOnly?: boolean | undefined; - /** - * If `true`, integer arguments to `function` - * are converted to `BigInt`s. If `false`, integer arguments are passed as - * JavaScript numbers. - * @default false - */ - useBigIntArguments?: boolean | undefined; - /** - * If `true`, `function` may be invoked with any number of - * arguments (between zero and - * [`SQLITE_MAX_FUNCTION_ARG`](https://www.sqlite.org/limits.html#max_function_arg)). If `false`, - * `function` must be invoked with exactly `function.length` arguments. - * @default false - */ - varargs?: boolean | undefined; - } - interface AggregateOptions extends FunctionOptions { - /** - * The identity value for the aggregation function. This value is used when the aggregation - * function is initialized. When a `Function` is passed the identity will be its return value. - */ - start: T | (() => T); - /** - * The function to call for each row in the aggregation. The - * function receives the current state and the row value. The return value of - * this function should be the new state. - */ - step: (accumulator: T, ...args: SQLOutputValue[]) => T; - /** - * The function to call to get the result of the - * aggregation. The function receives the final state and should return the - * result of the aggregation. - */ - result?: ((accumulator: T) => SQLInputValue) | undefined; - /** - * When this function is provided, the `aggregate` method will work as a window function. - * The function receives the current state and the dropped row value. The return value of this function should be the - * new state. - */ - inverse?: ((accumulator: T, ...args: SQLOutputValue[]) => T) | undefined; - } - interface PrepareOptions { - /** - * If `true`, integer fields are read as `BigInt`s. - * @since v25.5.0 - */ - readBigInts?: boolean | undefined; - /** - * If `true`, results are returned as arrays. - * @since v25.5.0 - */ - returnArrays?: boolean | undefined; - /** - * If `true`, allows binding named parameters without the prefix character. - * @since v25.5.0 - */ - allowBareNamedParameters?: boolean | undefined; - /** - * If `true`, unknown named parameters are ignored. - * @since v25.5.0 - */ - allowUnknownNamedParameters?: boolean | undefined; - } - /** - * This class represents a single [connection](https://www.sqlite.org/c3ref/sqlite3.html) to a SQLite database. All APIs - * exposed by this class execute synchronously. - * @since v22.5.0 - */ - class DatabaseSync implements Disposable { - /** - * Constructs a new `DatabaseSync` instance. - * @param path The path of the database. - * A SQLite database can be stored in a file or completely [in memory](https://www.sqlite.org/inmemorydb.html). - * To use a file-backed database, the path should be a file path. - * To use an in-memory database, the path should be the special name `':memory:'`. - * @param options Configuration options for the database connection. - */ - constructor(path: PathLike, options?: DatabaseSyncOptions); - /** - * Registers a new aggregate function with the SQLite database. This method is a wrapper around - * [`sqlite3_create_window_function()`](https://www.sqlite.org/c3ref/create_function.html). - * - * When used as a window function, the `result` function will be called multiple times. - * - * ```js - * import { DatabaseSync } from 'node:sqlite'; - * - * const db = new DatabaseSync(':memory:'); - * db.exec(` - * CREATE TABLE t3(x, y); - * INSERT INTO t3 VALUES ('a', 4), - * ('b', 5), - * ('c', 3), - * ('d', 8), - * ('e', 1); - * `); - * - * db.aggregate('sumint', { - * start: 0, - * step: (acc, value) => acc + value, - * }); - * - * db.prepare('SELECT sumint(y) as total FROM t3').get(); // { total: 21 } - * ``` - * @since v24.0.0 - * @param name The name of the SQLite function to create. - * @param options Function configuration settings. - */ - aggregate(name: string, options: AggregateOptions): void; - aggregate(name: string, options: AggregateOptions): void; - /** - * Closes the database connection. An exception is thrown if the database is not - * open. This method is a wrapper around [`sqlite3_close_v2()`](https://www.sqlite.org/c3ref/close.html). - * @since v22.5.0 - */ - close(): void; - /** - * Loads a shared library into the database connection. This method is a wrapper - * around [`sqlite3_load_extension()`](https://www.sqlite.org/c3ref/load_extension.html). It is required to enable the - * `allowExtension` option when constructing the `DatabaseSync` instance. - * @since v22.13.0 - * @param path The path to the shared library to load. - */ - loadExtension(path: string): void; - /** - * Enables or disables the `loadExtension` SQL function, and the `loadExtension()` - * method. When `allowExtension` is `false` when constructing, you cannot enable - * loading extensions for security reasons. - * @since v22.13.0 - * @param allow Whether to allow loading extensions. - */ - enableLoadExtension(allow: boolean): void; - /** - * Enables or disables the defensive flag. When the defensive flag is active, - * language features that allow ordinary SQL to deliberately corrupt the database file are disabled. - * See [`SQLITE_DBCONFIG_DEFENSIVE`](https://www.sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive) in the SQLite documentation for details. - * @since v25.1.0 - * @param active Whether to set the defensive flag. - */ - enableDefensive(active: boolean): void; - /** - * This method is a wrapper around [`sqlite3_db_filename()`](https://sqlite.org/c3ref/db_filename.html) - * @since v24.0.0 - * @param dbName Name of the database. This can be `'main'` (the default primary database) or any other - * database that has been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) **Default:** `'main'`. - * @returns The location of the database file. When using an in-memory database, - * this method returns null. - */ - location(dbName?: string): string | null; - /** - * This method allows one or more SQL statements to be executed without returning - * any results. This method is useful when executing SQL statements read from a - * file. This method is a wrapper around [`sqlite3_exec()`](https://www.sqlite.org/c3ref/exec.html). - * @since v22.5.0 - * @param sql A SQL string to execute. - */ - exec(sql: string): void; - /** - * This method is used to create SQLite user-defined functions. This method is a - * wrapper around [`sqlite3_create_function_v2()`](https://www.sqlite.org/c3ref/create_function.html). - * @since v22.13.0 - * @param name The name of the SQLite function to create. - * @param options Optional configuration settings for the function. - * @param fn The JavaScript function to call when the SQLite function is - * invoked. The return value of this function should be a valid SQLite data type: - * see [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v25.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite). The result defaults to - * `NULL` if the return value is `undefined`. - */ - function( - name: string, - options: FunctionOptions, - fn: (...args: SQLOutputValue[]) => SQLInputValue, - ): void; - function(name: string, fn: (...args: SQLOutputValue[]) => SQLInputValue): void; - /** - * Sets an authorizer callback that SQLite will invoke whenever it attempts to - * access data or modify the database schema through prepared statements. - * This can be used to implement security policies, audit access, or restrict certain operations. - * This method is a wrapper around [`sqlite3_set_authorizer()`](https://sqlite.org/c3ref/set_authorizer.html). - * - * When invoked, the callback receives five arguments: - * - * * `actionCode` {number} The type of operation being performed (e.g., - * `SQLITE_INSERT`, `SQLITE_UPDATE`, `SQLITE_SELECT`). - * * `arg1` {string|null} The first argument (context-dependent, often a table name). - * * `arg2` {string|null} The second argument (context-dependent, often a column name). - * * `dbName` {string|null} The name of the database. - * * `triggerOrView` {string|null} The name of the trigger or view causing the access. - * - * The callback must return one of the following constants: - * - * * `SQLITE_OK` - Allow the operation. - * * `SQLITE_DENY` - Deny the operation (causes an error). - * * `SQLITE_IGNORE` - Ignore the operation (silently skip). - * - * ```js - * import { DatabaseSync, constants } from 'node:sqlite'; - * const db = new DatabaseSync(':memory:'); - * - * // Set up an authorizer that denies all table creation - * db.setAuthorizer((actionCode) => { - * if (actionCode === constants.SQLITE_CREATE_TABLE) { - * return constants.SQLITE_DENY; - * } - * return constants.SQLITE_OK; - * }); - * - * // This will work - * db.prepare('SELECT 1').get(); - * - * // This will throw an error due to authorization denial - * try { - * db.exec('CREATE TABLE blocked (id INTEGER)'); - * } catch (err) { - * console.log('Operation blocked:', err.message); - * } - * ``` - * @since v24.10.0 - * @param callback The authorizer function to set, or `null` to - * clear the current authorizer. - */ - setAuthorizer( - callback: - | (( - actionCode: number, - arg1: string | null, - arg2: string | null, - dbName: string | null, - triggerOrView: string | null, - ) => number) - | null, - ): void; - /** - * Whether the database is currently open or not. - * @since v22.15.0 - */ - readonly isOpen: boolean; - /** - * Whether the database is currently within a transaction. This method - * is a wrapper around [`sqlite3_get_autocommit()`](https://sqlite.org/c3ref/get_autocommit.html). - * @since v24.0.0 - */ - readonly isTransaction: boolean; - /** - * An object for getting and setting SQLite database limits at runtime. - * Each property corresponds to an SQLite limit and can be read or written. - * - * ```js - * const db = new DatabaseSync(':memory:'); - * - * // Read current limit - * console.log(db.limits.length); - * - * // Set a new limit - * db.limits.sqlLength = 100000; - * - * // Reset a limit to its compile-time maximum - * db.limits.sqlLength = Infinity; - * ``` - * - * Available properties: `length`, `sqlLength`, `column`, `exprDepth`, - * `compoundSelect`, `vdbeOp`, `functionArg`, `attach`, `likePatternLength`, - * `variableNumber`, `triggerDepth`. - * - * Setting a property to `Infinity` resets the limit to its compile-time maximum value. - * @since v25.8.0 - */ - readonly limits: DatabaseLimits; - /** - * Opens the database specified in the `path` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via - * the constructor. An exception is thrown if the database is already open. - * @since v22.5.0 - */ - open(): void; - /** - * Compiles a SQL statement into a [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This method is a wrapper - * around [`sqlite3_prepare_v2()`](https://www.sqlite.org/c3ref/prepare.html). - * @since v22.5.0 - * @param sql A SQL string to compile to a prepared statement. - * @param options Optional configuration for the prepared statement. - * @return The prepared statement. - */ - prepare(sql: string, options?: PrepareOptions): StatementSync; - /** - * Creates a new {@link SQLTagStore}, which is a Least Recently Used (LRU) cache - * for storing prepared statements. This allows for the efficient reuse of - * prepared statements by tagging them with a unique identifier. - * - * When a tagged SQL literal is executed, the `SQLTagStore` checks if a prepared - * statement for the corresponding SQL query string already exists in the cache. - * If it does, the cached statement is used. If not, a new prepared statement is - * created, executed, and then stored in the cache for future use. This mechanism - * helps to avoid the overhead of repeatedly parsing and preparing the same SQL - * statements. - * - * Tagged statements bind the placeholder values from the template literal as - * parameters to the underlying prepared statement. For example: - * - * ```js - * sqlTagStore.get`SELECT ${value}`; - * ``` - * - * is equivalent to: - * - * ```js - * db.prepare('SELECT ?').get(value); - * ``` - * - * However, in the first example, the tag store will cache the underlying prepared - * statement for future use. - * - * > **Note:** The `${value}` syntax in tagged statements _binds_ a parameter to - * > the prepared statement. This differs from its behavior in _untagged_ template - * > literals, where it performs string interpolation. - * > - * > ```js - * > // This a safe example of binding a parameter to a tagged statement. - * > sqlTagStore.run`INSERT INTO t1 (id) VALUES (${id})`; - * > - * > // This is an *unsafe* example of an untagged template string. - * > // `id` is interpolated into the query text as a string. - * > // This can lead to SQL injection and data corruption. - * > db.run(`INSERT INTO t1 (id) VALUES (${id})`); - * > ``` - * - * The tag store will match a statement from the cache if the query strings - * (including the positions of any bound placeholders) are identical. - * - * ```js - * // The following statements will match in the cache: - * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`; - * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${12345} AND active = 1`; - * - * // The following statements will not match, as the query strings - * // and bound placeholders differ: - * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`; - * sqlTagStore.get`SELECT * FROM t1 WHERE id = 12345 AND active = 1`; - * - * // The following statements will not match, as matches are case-sensitive: - * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`; - * sqlTagStore.get`select * from t1 where id = ${id} and active = 1`; - * ``` - * - * The only way of binding parameters in tagged statements is with the `${value}` - * syntax. Do not add parameter binding placeholders (`?` etc.) to the SQL query - * string itself. - * - * ```js - * import { DatabaseSync } from 'node:sqlite'; - * - * const db = new DatabaseSync(':memory:'); - * const sql = db.createSQLTagStore(); - * - * db.exec('CREATE TABLE users (id INT, name TEXT)'); - * - * // Using the 'run' method to insert data. - * // The tagged literal is used to identify the prepared statement. - * sql.run`INSERT INTO users VALUES (1, 'Alice')`; - * sql.run`INSERT INTO users VALUES (2, 'Bob')`; - * - * // Using the 'get' method to retrieve a single row. - * const name = 'Alice'; - * const user = sql.get`SELECT * FROM users WHERE name = ${name}`; - * console.log(user); // { id: 1, name: 'Alice' } - * - * // Using the 'all' method to retrieve all rows. - * const allUsers = sql.all`SELECT * FROM users ORDER BY id`; - * console.log(allUsers); - * // [ - * // { id: 1, name: 'Alice' }, - * // { id: 2, name: 'Bob' } - * // ] - * ``` - * @since v24.9.0 - * @returns A new SQL tag store for caching prepared statements. - */ - createTagStore(maxSize?: number): SQLTagStore; - /** - * Creates and attaches a session to the database. This method is a wrapper around - * [`sqlite3session_create()`](https://www.sqlite.org/session/sqlite3session_create.html) and - * [`sqlite3session_attach()`](https://www.sqlite.org/session/sqlite3session_attach.html). - * @param options The configuration options for the session. - * @returns A session handle. - * @since v22.12.0 - */ - createSession(options?: CreateSessionOptions): Session; - /** - * An exception is thrown if the database is not - * open. This method is a wrapper around - * [`sqlite3changeset_apply()`](https://www.sqlite.org/session/sqlite3changeset_apply.html). - * - * ```js - * import { DatabaseSync } from 'node:sqlite'; - * - * const sourceDb = new DatabaseSync(':memory:'); - * const targetDb = new DatabaseSync(':memory:'); - * - * sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)'); - * targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)'); - * - * const session = sourceDb.createSession(); - * - * const insert = sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)'); - * insert.run(1, 'hello'); - * insert.run(2, 'world'); - * - * const changeset = session.changeset(); - * targetDb.applyChangeset(changeset); - * // Now that the changeset has been applied, targetDb contains the same data as sourceDb. - * ``` - * @param changeset A binary changeset or patchset. - * @param options The configuration options for how the changes will be applied. - * @returns Whether the changeset was applied successfully without being aborted. - * @since v22.12.0 - */ - applyChangeset(changeset: Uint8Array, options?: ApplyChangesetOptions): boolean; - /** - * Closes the database connection. If the database connection is already closed - * then this is a no-op. - * @since v22.15.0 - */ - [Symbol.dispose](): void; - } - /** - * @since v22.12.0 - */ - interface Session { - /** - * Retrieves a changeset containing all changes since the changeset was created. Can be called multiple times. - * An exception is thrown if the database or the session is not open. This method is a wrapper around - * [`sqlite3session_changeset()`](https://www.sqlite.org/session/sqlite3session_changeset.html). - * @returns Binary changeset that can be applied to other databases. - * @since v22.12.0 - */ - changeset(): NodeJS.NonSharedUint8Array; - /** - * Similar to the method above, but generates a more compact patchset. See - * [Changesets and Patchsets](https://www.sqlite.org/sessionintro.html#changesets_and_patchsets) - * in the documentation of SQLite. An exception is thrown if the database or the session is not open. This method is a - * wrapper around - * [`sqlite3session_patchset()`](https://www.sqlite.org/session/sqlite3session_patchset.html). - * @returns Binary patchset that can be applied to other databases. - * @since v22.12.0 - */ - patchset(): NodeJS.NonSharedUint8Array; - /** - * Closes the session. An exception is thrown if the database or the session is not open. This method is a - * wrapper around - * [`sqlite3session_delete()`](https://www.sqlite.org/session/sqlite3session_delete.html). - */ - close(): void; - /** - * Closes the session. If the session is already closed, does nothing. - * @since v24.9.0 - */ - [Symbol.dispose](): void; - } - /** - * This class represents a single LRU (Least Recently Used) cache for storing - * prepared statements. - * - * Instances of this class are created via the `database.createTagStore()` - * method, not by using a constructor. The store caches prepared statements based - * on the provided SQL query string. When the same query is seen again, the store - * retrieves the cached statement and safely applies the new values through - * parameter binding, thereby preventing attacks like SQL injection. - * - * The cache has a maxSize that defaults to 1000 statements, but a custom size can - * be provided (e.g., `database.createTagStore(100)`). All APIs exposed by this - * class execute synchronously. - * @since v24.9.0 - */ - interface SQLTagStore { - /** - * Executes the given SQL query and returns all resulting rows as an array of - * objects. - * - * This function is intended to be used as a template literal tag, not to be - * called directly. - * @since v24.9.0 - * @param stringElements Template literal elements containing the SQL - * query. - * @param boundParameters Parameter values to be bound to placeholders in the template string. - * @returns An array of objects representing the rows returned by the query. - */ - all( - stringElements: TemplateStringsArray, - ...boundParameters: SQLInputValue[] - ): Record[]; - /** - * Executes the given SQL query and returns the first resulting row as an object. - * - * This function is intended to be used as a template literal tag, not to be - * called directly. - * @since v24.9.0 - * @param stringElements Template literal elements containing the SQL - * query. - * @param boundParameters Parameter values to be bound to placeholders in the template string. - * @returns An object representing the first row returned by - * the query, or `undefined` if no rows are returned. - */ - get( - stringElements: TemplateStringsArray, - ...boundParameters: SQLInputValue[] - ): Record | undefined; - /** - * Executes the given SQL query and returns an iterator over the resulting rows. - * - * This function is intended to be used as a template literal tag, not to be - * called directly. - * @since v24.9.0 - * @param stringElements Template literal elements containing the SQL - * query. - * @param boundParameters Parameter values to be bound to placeholders in the template string. - * @returns An iterator that yields objects representing the rows returned by the query. - */ - iterate( - stringElements: TemplateStringsArray, - ...boundParameters: SQLInputValue[] - ): NodeJS.Iterator>; - /** - * Executes the given SQL query, which is expected to not return any rows (e.g., INSERT, UPDATE, DELETE). - * - * This function is intended to be used as a template literal tag, not to be - * called directly. - * @since v24.9.0 - * @param stringElements Template literal elements containing the SQL - * query. - * @param boundParameters Parameter values to be bound to placeholders in the template string. - * @returns An object containing information about the execution, including `changes` and `lastInsertRowid`. - */ - run(stringElements: TemplateStringsArray, ...boundParameters: SQLInputValue[]): StatementResultingChanges; - /** - * A read-only property that returns the number of prepared statements currently in the cache. - * @since v24.9.0 - */ - readonly size: number; - /** - * A read-only property that returns the maximum number of prepared statements the cache can hold. - * @since v24.9.0 - */ - readonly capacity: number; - /** - * A read-only property that returns the `DatabaseSync` object associated with this `SQLTagStore`. - * @since v24.9.0 - */ - readonly db: DatabaseSync; - /** - * Resets the LRU cache, clearing all stored prepared statements. - * @since v24.9.0 - */ - clear(): void; - } - interface StatementColumnMetadata { - /** - * The unaliased name of the column in the origin - * table, or `null` if the column is the result of an expression or subquery. - * This property is the result of [`sqlite3_column_origin_name()`](https://www.sqlite.org/c3ref/column_database_name.html). - */ - column: string | null; - /** - * The unaliased name of the origin database, or - * `null` if the column is the result of an expression or subquery. This - * property is the result of [`sqlite3_column_database_name()`](https://www.sqlite.org/c3ref/column_database_name.html). - */ - database: string | null; - /** - * The name assigned to the column in the result set of a - * `SELECT` statement. This property is the result of - * [`sqlite3_column_name()`](https://www.sqlite.org/c3ref/column_name.html). - */ - name: string; - /** - * The unaliased name of the origin table, or `null` if - * the column is the result of an expression or subquery. This property is the - * result of [`sqlite3_column_table_name()`](https://www.sqlite.org/c3ref/column_database_name.html). - */ - table: string | null; - /** - * The declared data type of the column, or `null` if the - * column is the result of an expression or subquery. This property is the - * result of [`sqlite3_column_decltype()`](https://www.sqlite.org/c3ref/column_decltype.html). - */ - type: string | null; - } - interface StatementResultingChanges { - /** - * The number of rows modified, inserted, or deleted by the most recently completed `INSERT`, `UPDATE`, or `DELETE` statement. - * This field is either a number or a `BigInt` depending on the prepared statement's configuration. - * This property is the result of [`sqlite3_changes64()`](https://www.sqlite.org/c3ref/changes.html). - */ - changes: number | bigint; - /** - * The most recently inserted rowid. - * This field is either a number or a `BigInt` depending on the prepared statement's configuration. - * This property is the result of [`sqlite3_last_insert_rowid()`](https://www.sqlite.org/c3ref/last_insert_rowid.html). - */ - lastInsertRowid: number | bigint; - } - /** - * This class represents a single [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This class cannot be - * instantiated via its constructor. Instead, instances are created via the`database.prepare()` method. All APIs exposed by this class execute - * synchronously. - * - * A prepared statement is an efficient binary representation of the SQL used to - * create it. Prepared statements are parameterizable, and can be invoked multiple - * times with different bound values. Parameters also offer protection against [SQL injection](https://en.wikipedia.org/wiki/SQL_injection) attacks. For these reasons, prepared statements are - * preferred - * over hand-crafted SQL strings when handling user input. - * @since v22.5.0 - */ - class StatementSync { - private constructor(); - /** - * This method executes a prepared statement and returns all results as an array of - * objects. If the prepared statement does not return any results, this method - * returns an empty array. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using - * the values in `namedParameters` and `anonymousParameters`. - * @since v22.5.0 - * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - * @return An array of objects. Each object corresponds to a row returned by executing the prepared statement. The keys and values of each object correspond to the column names and values of - * the row. - */ - all(...anonymousParameters: SQLInputValue[]): Record[]; - all( - namedParameters: Record, - ...anonymousParameters: SQLInputValue[] - ): Record[]; - /** - * This method is used to retrieve information about the columns returned by the - * prepared statement. - * @since v23.11.0 - * @returns An array of objects. Each object corresponds to a column - * in the prepared statement, and contains the following properties: - */ - columns(): StatementColumnMetadata[]; - /** - * The source SQL text of the prepared statement with parameter - * placeholders replaced by the values that were used during the most recent - * execution of this prepared statement. This property is a wrapper around - * [`sqlite3_expanded_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html). - * @since v22.5.0 - */ - readonly expandedSQL: string; - /** - * This method executes a prepared statement and returns the first result as an - * object. If the prepared statement does not return any results, this method - * returns `undefined`. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the - * values in `namedParameters` and `anonymousParameters`. - * @since v22.5.0 - * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - * @return An object corresponding to the first row returned by executing the prepared statement. The keys and values of the object correspond to the column names and values of the row. If no - * rows were returned from the database then this method returns `undefined`. - */ - get(...anonymousParameters: SQLInputValue[]): Record | undefined; - get( - namedParameters: Record, - ...anonymousParameters: SQLInputValue[] - ): Record | undefined; - /** - * This method executes a prepared statement and returns an iterator of - * objects. If the prepared statement does not return any results, this method - * returns an empty iterator. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using - * the values in `namedParameters` and `anonymousParameters`. - * @since v22.13.0 - * @param namedParameters An optional object used to bind named parameters. - * The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - * @returns An iterable iterator of objects. Each object corresponds to a row - * returned by executing the prepared statement. The keys and values of each - * object correspond to the column names and values of the row. - */ - iterate(...anonymousParameters: SQLInputValue[]): NodeJS.Iterator>; - iterate( - namedParameters: Record, - ...anonymousParameters: SQLInputValue[] - ): NodeJS.Iterator>; - /** - * This method executes a prepared statement and returns an object summarizing the - * resulting changes. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the - * values in `namedParameters` and `anonymousParameters`. - * @since v22.5.0 - * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - */ - run(...anonymousParameters: SQLInputValue[]): StatementResultingChanges; - run( - namedParameters: Record, - ...anonymousParameters: SQLInputValue[] - ): StatementResultingChanges; - /** - * The names of SQLite parameters begin with a prefix character. By default,`node:sqlite` requires that this prefix character is present when binding - * parameters. However, with the exception of dollar sign character, these - * prefix characters also require extra quoting when used in object keys. - * - * To improve ergonomics, this method can be used to also allow bare named - * parameters, which do not require the prefix character in JavaScript code. There - * are several caveats to be aware of when enabling bare named parameters: - * - * * The prefix character is still required in SQL. - * * The prefix character is still allowed in JavaScript. In fact, prefixed names - * will have slightly better binding performance. - * * Using ambiguous named parameters, such as `$k` and `@k`, in the same prepared - * statement will result in an exception as it cannot be determined how to bind - * a bare name. - * @since v22.5.0 - * @param enabled Enables or disables support for binding named parameters without the prefix character. - */ - setAllowBareNamedParameters(enabled: boolean): void; - /** - * By default, if an unknown name is encountered while binding parameters, an - * exception is thrown. This method allows unknown named parameters to be ignored. - * @since v22.15.0 - * @param enabled Enables or disables support for unknown named parameters. - */ - setAllowUnknownNamedParameters(enabled: boolean): void; - /** - * When enabled, query results returned by the `all()`, `get()`, and `iterate()` methods will be returned as arrays instead - * of objects. - * @since v24.0.0 - * @param enabled Enables or disables the return of query results as arrays. - */ - setReturnArrays(enabled: boolean): void; - /** - * When reading from the database, SQLite `INTEGER`s are mapped to JavaScript - * numbers by default. However, SQLite `INTEGER`s can store values larger than - * JavaScript numbers are capable of representing. In such cases, this method can - * be used to read `INTEGER` data using JavaScript `BigInt`s. This method has no - * impact on database write operations where numbers and `BigInt`s are both - * supported at all times. - * @since v22.5.0 - * @param enabled Enables or disables the use of `BigInt`s when reading `INTEGER` fields from the database. - */ - setReadBigInts(enabled: boolean): void; - /** - * The source SQL text of the prepared statement. This property is a - * wrapper around [`sqlite3_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html). - * @since v22.5.0 - */ - readonly sourceSQL: string; - } - interface BackupOptions { - /** - * Name of the source database. This can be `'main'` (the default primary database) or any other - * database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) - * @default 'main' - */ - source?: string | undefined; - /** - * Name of the target database. This can be `'main'` (the default primary database) or any other - * database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) - * @default 'main' - */ - target?: string | undefined; - /** - * Number of pages to be transmitted in each batch of the backup. - * @default 100 - */ - rate?: number | undefined; - /** - * An optional callback function that will be called after each backup step. The argument passed - * to this callback is an `Object` with `remainingPages` and `totalPages` properties, describing the current progress - * of the backup operation. - */ - progress?: ((progressInfo: BackupProgressInfo) => void) | undefined; - } - interface BackupProgressInfo { - totalPages: number; - remainingPages: number; - } - /** - * This method makes a database backup. This method abstracts the - * [`sqlite3_backup_init()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupinit), - * [`sqlite3_backup_step()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupstep) - * and [`sqlite3_backup_finish()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupfinish) functions. - * - * The backed-up database can be used normally during the backup process. Mutations coming from the same connection - same - * `DatabaseSync` - object will be reflected in the backup right away. However, mutations from other connections will cause - * the backup process to restart. - * - * ```js - * import { backup, DatabaseSync } from 'node:sqlite'; - * - * const sourceDb = new DatabaseSync('source.db'); - * const totalPagesTransferred = await backup(sourceDb, 'backup.db', { - * rate: 1, // Copy one page at a time. - * progress: ({ totalPages, remainingPages }) => { - * console.log('Backup in progress', { totalPages, remainingPages }); - * }, - * }); - * - * console.log('Backup completed', totalPagesTransferred); - * ``` - * @since v23.8.0 - * @param sourceDb The database to backup. The source database must be open. - * @param path The path where the backup will be created. If the file already exists, - * the contents will be overwritten. - * @param options Optional configuration for the backup. The - * following properties are supported: - * @returns A promise that fulfills with the total number of backed-up pages upon completion, or rejects if an - * error occurs. - */ - function backup(sourceDb: DatabaseSync, path: PathLike, options?: BackupOptions): Promise; - /** - * @since v22.13.0 - */ - namespace constants { - /** - * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is present in the database, but one or more other (non primary-key) fields modified by the update do not contain the expected "before" values. - * @since v22.14.0 - */ - const SQLITE_CHANGESET_DATA: number; - /** - * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is not present in the database. - * @since v22.14.0 - */ - const SQLITE_CHANGESET_NOTFOUND: number; - /** - * This constant is passed to the conflict handler while processing an INSERT change if the operation would result in duplicate primary key values. - * @since v22.14.0 - */ - const SQLITE_CHANGESET_CONFLICT: number; - /** - * If foreign key handling is enabled, and applying a changeset leaves the database in a state containing foreign key violations, the conflict handler is invoked with this constant exactly once before the changeset is committed. If the conflict handler returns `SQLITE_CHANGESET_OMIT`, the changes, including those that caused the foreign key constraint violation, are committed. Or, if it returns `SQLITE_CHANGESET_ABORT`, the changeset is rolled back. - * @since v22.14.0 - */ - const SQLITE_CHANGESET_FOREIGN_KEY: number; - /** - * Conflicting changes are omitted. - * @since v22.12.0 - */ - const SQLITE_CHANGESET_OMIT: number; - /** - * Conflicting changes replace existing values. Note that this value can only be returned when the type of conflict is either `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT`. - * @since v22.12.0 - */ - const SQLITE_CHANGESET_REPLACE: number; - /** - * Abort when a change encounters a conflict and roll back database. - * @since v22.12.0 - */ - const SQLITE_CHANGESET_ABORT: number; - /** - * Deny the operation and cause an error to be returned. - * @since v24.10.0 - */ - const SQLITE_DENY: number; - /** - * Ignore the operation and continue as if it had never been requested. - * @since 24.10.0 - */ - const SQLITE_IGNORE: number; - /** - * Allow the operation to proceed normally. - * @since v24.10.0 - */ - const SQLITE_OK: number; - const SQLITE_CREATE_INDEX: number; - const SQLITE_CREATE_TABLE: number; - const SQLITE_CREATE_TEMP_INDEX: number; - const SQLITE_CREATE_TEMP_TABLE: number; - const SQLITE_CREATE_TEMP_TRIGGER: number; - const SQLITE_CREATE_TEMP_VIEW: number; - const SQLITE_CREATE_TRIGGER: number; - const SQLITE_CREATE_VIEW: number; - const SQLITE_DELETE: number; - const SQLITE_DROP_INDEX: number; - const SQLITE_DROP_TABLE: number; - const SQLITE_DROP_TEMP_INDEX: number; - const SQLITE_DROP_TEMP_TABLE: number; - const SQLITE_DROP_TEMP_TRIGGER: number; - const SQLITE_DROP_TEMP_VIEW: number; - const SQLITE_DROP_TRIGGER: number; - const SQLITE_DROP_VIEW: number; - const SQLITE_INSERT: number; - const SQLITE_PRAGMA: number; - const SQLITE_READ: number; - const SQLITE_SELECT: number; - const SQLITE_TRANSACTION: number; - const SQLITE_UPDATE: number; - const SQLITE_ATTACH: number; - const SQLITE_DETACH: number; - const SQLITE_ALTER_TABLE: number; - const SQLITE_REINDEX: number; - const SQLITE_ANALYZE: number; - const SQLITE_CREATE_VTABLE: number; - const SQLITE_DROP_VTABLE: number; - const SQLITE_FUNCTION: number; - const SQLITE_SAVEPOINT: number; - const SQLITE_COPY: number; - const SQLITE_RECURSIVE: number; - } -} diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts deleted file mode 100644 index 887b6d4..0000000 --- a/node_modules/@types/node/stream.d.ts +++ /dev/null @@ -1,1774 +0,0 @@ -declare module "node:stream" { - import { Blob } from "node:buffer"; - import { Abortable, EventEmitter } from "node:events"; - import * as promises from "node:stream/promises"; - import * as web from "node:stream/web"; - class Stream extends EventEmitter { - /** - * @since v0.9.4 - */ - pipe( - destination: T, - options?: Stream.PipeOptions, - ): T; - } - namespace Stream { - export { promises, Stream }; - } - namespace Stream { - interface PipeOptions { - /** - * End the writer when the reader ends. - * @default true - */ - end?: boolean | undefined; - } - interface StreamOptions extends Abortable { - emitClose?: boolean | undefined; - highWaterMark?: number | undefined; - objectMode?: boolean | undefined; - construct?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined; - destroy?: ((this: T, error: Error | null, callback: (error?: Error | null) => void) => void) | undefined; - autoDestroy?: boolean | undefined; - } - interface ReadableOptions extends StreamOptions { - encoding?: BufferEncoding | undefined; - read?: ((this: T, size: number) => void) | undefined; - } - interface ReadableIteratorOptions { - /** - * When set to `false`, calling `return` on the async iterator, - * or exiting a `for await...of` iteration using a `break`, - * `return`, or `throw` will not destroy the stream. - * @default true - */ - destroyOnReturn?: boolean | undefined; - } - interface ReadableOperatorOptions extends Abortable { - /** - * The maximum concurrent invocations of `fn` to call - * on the stream at once. - * @default 1 - */ - concurrency?: number | undefined; - /** - * How many items to buffer while waiting for user consumption - * of the output. - * @default concurrency * 2 - 1 - */ - highWaterMark?: number | undefined; - } - /** @deprecated Use `ReadableOperatorOptions` instead. */ - interface ArrayOptions extends ReadableOperatorOptions {} - interface ReadableToWebOptions { - strategy?: web.QueuingStrategy | undefined; - type?: web.ReadableStreamType | undefined; - } - interface ReadableEventMap { - "close": []; - "data": [chunk: any]; - "end": []; - "error": [err: Error]; - "pause": []; - "readable": []; - "resume": []; - } - /** - * @since v0.9.4 - */ - class Readable extends Stream implements NodeJS.ReadableStream { - constructor(options?: ReadableOptions); - /** - * A utility method for creating Readable Streams out of iterators. - * @since v12.3.0, v10.17.0 - * @param iterable Object implementing the `Symbol.asyncIterator` or `Symbol.iterator` iterable protocol. Emits an 'error' event if a null value is passed. - * @param options Options provided to `new stream.Readable([options])`. By default, `Readable.from()` will set `options.objectMode` to `true`, unless this is explicitly opted out by setting `options.objectMode` to `false`. - */ - static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; - /** - * A utility method for creating a `Readable` from a web `ReadableStream`. - * @since v17.0.0 - */ - static fromWeb( - readableStream: web.ReadableStream, - options?: Pick, - ): Readable; - /** - * A utility method for creating a web `ReadableStream` from a `Readable`. - * @since v17.0.0 - */ - static toWeb( - streamReadable: NodeJS.ReadableStream, - options?: ReadableToWebOptions, - ): web.ReadableStream; - /** - * Returns whether the stream has been read from or cancelled. - * @since v16.8.0 - */ - static isDisturbed(stream: NodeJS.ReadableStream | web.ReadableStream): boolean; - /** - * Returns whether the stream was destroyed or errored before emitting `'end'`. - * @since v16.8.0 - */ - readonly readableAborted: boolean; - /** - * Is `true` if it is safe to call {@link read}, which means - * the stream has not been destroyed or emitted `'error'` or `'end'`. - * @since v11.4.0 - */ - readable: boolean; - /** - * Returns whether `'data'` has been emitted. - * @since v16.7.0, v14.18.0 - */ - readonly readableDidRead: boolean; - /** - * Getter for the property `encoding` of a given `Readable` stream. The `encoding` property can be set using the {@link setEncoding} method. - * @since v12.7.0 - */ - readonly readableEncoding: BufferEncoding | null; - /** - * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v25.x/api/stream.html#event-end) event is emitted. - * @since v12.9.0 - */ - readonly readableEnded: boolean; - /** - * This property reflects the current state of a `Readable` stream as described - * in the [Three states](https://nodejs.org/docs/latest-v25.x/api/stream.html#three-states) section. - * @since v9.4.0 - */ - readableFlowing: boolean | null; - /** - * Returns the value of `highWaterMark` passed when creating this `Readable`. - * @since v9.3.0 - */ - readonly readableHighWaterMark: number; - /** - * This property contains the number of bytes (or objects) in the queue - * ready to be read. The value provides introspection data regarding - * the status of the `highWaterMark`. - * @since v9.4.0 - */ - readonly readableLength: number; - /** - * Getter for the property `objectMode` of a given `Readable` stream. - * @since v12.3.0 - */ - readonly readableObjectMode: boolean; - /** - * Is `true` after `readable.destroy()` has been called. - * @since v8.0.0 - */ - destroyed: boolean; - /** - * Is `true` after `'close'` has been emitted. - * @since v18.0.0 - */ - readonly closed: boolean; - /** - * Returns error if the stream has been destroyed with an error. - * @since v18.0.0 - */ - readonly errored: Error | null; - _construct?(callback: (error?: Error | null) => void): void; - _read(size: number): void; - /** - * The `readable.read()` method reads data out of the internal buffer and - * returns it. If no data is available to be read, `null` is returned. By default, - * the data is returned as a `Buffer` object unless an encoding has been - * specified using the `readable.setEncoding()` method or the stream is operating - * in object mode. - * - * The optional `size` argument specifies a specific number of bytes to read. If - * `size` bytes are not available to be read, `null` will be returned _unless_ the - * stream has ended, in which case all of the data remaining in the internal buffer - * will be returned. - * - * If the `size` argument is not specified, all of the data contained in the - * internal buffer will be returned. - * - * The `size` argument must be less than or equal to 1 GiB. - * - * The `readable.read()` method should only be called on `Readable` streams - * operating in paused mode. In flowing mode, `readable.read()` is called - * automatically until the internal buffer is fully drained. - * - * ```js - * const readable = getReadableStreamSomehow(); - * - * // 'readable' may be triggered multiple times as data is buffered in - * readable.on('readable', () => { - * let chunk; - * console.log('Stream is readable (new data received in buffer)'); - * // Use a loop to make sure we read all currently available data - * while (null !== (chunk = readable.read())) { - * console.log(`Read ${chunk.length} bytes of data...`); - * } - * }); - * - * // 'end' will be triggered once when there is no more data available - * readable.on('end', () => { - * console.log('Reached end of stream.'); - * }); - * ``` - * - * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks - * are not concatenated. A `while` loop is necessary to consume all data - * currently in the buffer. When reading a large file `.read()` may return `null`, - * having consumed all buffered content so far, but there is still more data to - * come not yet buffered. In this case a new `'readable'` event will be emitted - * when there is more data in the buffer. Finally the `'end'` event will be - * emitted when there is no more data to come. - * - * Therefore to read a file's whole contents from a `readable`, it is necessary - * to collect chunks across multiple `'readable'` events: - * - * ```js - * const chunks = []; - * - * readable.on('readable', () => { - * let chunk; - * while (null !== (chunk = readable.read())) { - * chunks.push(chunk); - * } - * }); - * - * readable.on('end', () => { - * const content = chunks.join(''); - * }); - * ``` - * - * A `Readable` stream in object mode will always return a single item from - * a call to `readable.read(size)`, regardless of the value of the `size` argument. - * - * If the `readable.read()` method returns a chunk of data, a `'data'` event will - * also be emitted. - * - * Calling {@link read} after the `'end'` event has - * been emitted will return `null`. No runtime error will be raised. - * @since v0.9.4 - * @param size Optional argument to specify how much data to read. - */ - read(size?: number): any; - /** - * The `readable.setEncoding()` method sets the character encoding for - * data read from the `Readable` stream. - * - * By default, no encoding is assigned and stream data will be returned as `Buffer` objects. Setting an encoding causes the stream data - * to be returned as strings of the specified encoding rather than as `Buffer` objects. For instance, calling `readable.setEncoding('utf8')` will cause the - * output data to be interpreted as UTF-8 data, and passed as strings. Calling `readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal - * string format. - * - * The `Readable` stream will properly handle multi-byte characters delivered - * through the stream that would otherwise become improperly decoded if simply - * pulled from the stream as `Buffer` objects. - * - * ```js - * const readable = getReadableStreamSomehow(); - * readable.setEncoding('utf8'); - * readable.on('data', (chunk) => { - * assert.equal(typeof chunk, 'string'); - * console.log('Got %d characters of string data:', chunk.length); - * }); - * ``` - * @since v0.9.4 - * @param encoding The encoding to use. - */ - setEncoding(encoding: BufferEncoding): this; - /** - * The `readable.pause()` method will cause a stream in flowing mode to stop - * emitting `'data'` events, switching out of flowing mode. Any data that - * becomes available will remain in the internal buffer. - * - * ```js - * const readable = getReadableStreamSomehow(); - * readable.on('data', (chunk) => { - * console.log(`Received ${chunk.length} bytes of data.`); - * readable.pause(); - * console.log('There will be no additional data for 1 second.'); - * setTimeout(() => { - * console.log('Now data will start flowing again.'); - * readable.resume(); - * }, 1000); - * }); - * ``` - * - * The `readable.pause()` method has no effect if there is a `'readable'` event listener. - * @since v0.9.4 - */ - pause(): this; - /** - * The `readable.resume()` method causes an explicitly paused `Readable` stream to - * resume emitting `'data'` events, switching the stream into flowing mode. - * - * The `readable.resume()` method can be used to fully consume the data from a - * stream without actually processing any of that data: - * - * ```js - * getReadableStreamSomehow() - * .resume() - * .on('end', () => { - * console.log('Reached the end, but did not read anything.'); - * }); - * ``` - * - * The `readable.resume()` method has no effect if there is a `'readable'` event listener. - * @since v0.9.4 - */ - resume(): this; - /** - * The `readable.isPaused()` method returns the current operating state of the `Readable`. - * This is used primarily by the mechanism that underlies the `readable.pipe()` method. - * In most typical cases, there will be no reason to use this method directly. - * - * ```js - * const readable = new stream.Readable(); - * - * readable.isPaused(); // === false - * readable.pause(); - * readable.isPaused(); // === true - * readable.resume(); - * readable.isPaused(); // === false - * ``` - * @since v0.11.14 - */ - isPaused(): boolean; - /** - * The `readable.unpipe()` method detaches a `Writable` stream previously attached - * using the {@link pipe} method. - * - * If the `destination` is not specified, then _all_ pipes are detached. - * - * If the `destination` is specified, but no pipe is set up for it, then - * the method does nothing. - * - * ```js - * import fs from 'node:fs'; - * const readable = getReadableStreamSomehow(); - * const writable = fs.createWriteStream('file.txt'); - * // All the data from readable goes into 'file.txt', - * // but only for the first second. - * readable.pipe(writable); - * setTimeout(() => { - * console.log('Stop writing to file.txt.'); - * readable.unpipe(writable); - * console.log('Manually close the file stream.'); - * writable.end(); - * }, 1000); - * ``` - * @since v0.9.4 - * @param destination Optional specific stream to unpipe - */ - unpipe(destination?: NodeJS.WritableStream): this; - /** - * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the - * same as `readable.push(null)`, after which no more data can be written. The EOF - * signal is put at the end of the buffer and any buffered data will still be - * flushed. - * - * The `readable.unshift()` method pushes a chunk of data back into the internal - * buffer. This is useful in certain situations where a stream is being consumed by - * code that needs to "un-consume" some amount of data that it has optimistically - * pulled out of the source, so that the data can be passed on to some other party. - * - * The `stream.unshift(chunk)` method cannot be called after the `'end'` event - * has been emitted or a runtime error will be thrown. - * - * Developers using `stream.unshift()` often should consider switching to - * use of a `Transform` stream instead. See the `API for stream implementers` section for more information. - * - * ```js - * // Pull off a header delimited by \n\n. - * // Use unshift() if we get too much. - * // Call the callback with (error, header, stream). - * import { StringDecoder } from 'node:string_decoder'; - * function parseHeader(stream, callback) { - * stream.on('error', callback); - * stream.on('readable', onReadable); - * const decoder = new StringDecoder('utf8'); - * let header = ''; - * function onReadable() { - * let chunk; - * while (null !== (chunk = stream.read())) { - * const str = decoder.write(chunk); - * if (str.includes('\n\n')) { - * // Found the header boundary. - * const split = str.split(/\n\n/); - * header += split.shift(); - * const remaining = split.join('\n\n'); - * const buf = Buffer.from(remaining, 'utf8'); - * stream.removeListener('error', callback); - * // Remove the 'readable' listener before unshifting. - * stream.removeListener('readable', onReadable); - * if (buf.length) - * stream.unshift(buf); - * // Now the body of the message can be read from the stream. - * callback(null, header, stream); - * return; - * } - * // Still reading the header. - * header += str; - * } - * } - * } - * ``` - * - * Unlike {@link push}, `stream.unshift(chunk)` will not - * end the reading process by resetting the internal reading state of the stream. - * This can cause unexpected results if `readable.unshift()` is called during a - * read (i.e. from within a {@link _read} implementation on a - * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately, - * however it is best to simply avoid calling `readable.unshift()` while in the - * process of performing a read. - * @since v0.9.11 - * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must - * be a {string}, {Buffer}, {TypedArray}, {DataView} or `null`. For object mode streams, `chunk` may be any JavaScript value. - * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`. - */ - unshift(chunk: any, encoding?: BufferEncoding): void; - /** - * Prior to Node.js 0.10, streams did not implement the entire `node:stream` module API as it is currently defined. (See `Compatibility` for more - * information.) - * - * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the `readable.wrap()` method can be used to create a `Readable` - * stream that uses - * the old stream as its data source. - * - * It will rarely be necessary to use `readable.wrap()` but the method has been - * provided as a convenience for interacting with older Node.js applications and - * libraries. - * - * ```js - * import { OldReader } from './old-api-module.js'; - * import { Readable } from 'node:stream'; - * const oreader = new OldReader(); - * const myReader = new Readable().wrap(oreader); - * - * myReader.on('readable', () => { - * myReader.read(); // etc. - * }); - * ``` - * @since v0.9.4 - * @param stream An "old style" readable stream - */ - wrap(stream: NodeJS.ReadableStream): this; - push(chunk: any, encoding?: BufferEncoding): boolean; - /** - * ```js - * import { Readable } from 'node:stream'; - * - * async function* splitToWords(source) { - * for await (const chunk of source) { - * const words = String(chunk).split(' '); - * - * for (const word of words) { - * yield word; - * } - * } - * } - * - * const wordsStream = Readable.from(['text passed through', 'composed stream']).compose(splitToWords); - * const words = await wordsStream.toArray(); - * - * console.log(words); // prints ['text', 'passed', 'through', 'composed', 'stream'] - * ``` - * - * `readable.compose(s)` is equivalent to `stream.compose(readable, s)`. - * - * This method also allows for an `AbortSignal` to be provided, which will destroy - * the composed stream when aborted. - * - * See [`stream.compose(...streams)`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamcomposestreams) for more information. - * @since v19.1.0, v18.13.0 - * @returns a stream composed with the stream `stream`. - */ - compose( - stream: NodeJS.WritableStream | web.WritableStream | web.TransformStream | ((source: any) => void), - options?: Abortable, - ): Duplex; - /** - * The iterator created by this method gives users the option to cancel the destruction - * of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`, - * or if the iterator should destroy the stream if the stream emitted an error during iteration. - * @since v16.3.0 - */ - iterator(options?: ReadableIteratorOptions): NodeJS.AsyncIterator; - /** - * This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream. - * If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream. - * @since v17.4.0, v16.14.0 - * @param fn a function to map over every chunk in the stream. Async or not. - * @returns a stream mapped with the function *fn*. - */ - map(fn: (data: any, options?: Abortable) => any, options?: ReadableOperatorOptions): Readable; - /** - * This method allows filtering the stream. For each chunk in the stream the *fn* function will be called - * and if it returns a truthy value, the chunk will be passed to the result stream. - * If the *fn* function returns a promise - that promise will be `await`ed. - * @since v17.4.0, v16.14.0 - * @param fn a function to filter chunks from the stream. Async or not. - * @returns a stream filtered with the predicate *fn*. - */ - filter( - fn: (data: any, options?: Abortable) => boolean | Promise, - options?: ReadableOperatorOptions, - ): Readable; - /** - * This method allows iterating a stream. For each chunk in the stream the *fn* function will be called. - * If the *fn* function returns a promise - that promise will be `await`ed. - * - * This method is different from `for await...of` loops in that it can optionally process chunks concurrently. - * In addition, a `forEach` iteration can only be stopped by having passed a `signal` option - * and aborting the related AbortController while `for await...of` can be stopped with `break` or `return`. - * In either case the stream will be destroyed. - * - * This method is different from listening to the `'data'` event in that it uses the `readable` event - * in the underlying machinary and can limit the number of concurrent *fn* calls. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise for when the stream has finished. - */ - forEach( - fn: (data: any, options?: Abortable) => void | Promise, - options?: Pick, - ): Promise; - /** - * This method allows easily obtaining the contents of a stream. - * - * As this method reads the entire stream into memory, it negates the benefits of streams. It's intended - * for interoperability and convenience, not as the primary way to consume streams. - * @since v17.5.0 - * @returns a promise containing an array with the contents of the stream. - */ - toArray(options?: Abortable): Promise; - /** - * This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream - * until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk - * `await`ed return value is truthy, the stream is destroyed and the promise is fulfilled with `true`. - * If none of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `false`. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks. - */ - some( - fn: (data: any, options?: Abortable) => boolean | Promise, - options?: Pick, - ): Promise; - /** - * This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream - * to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return value is truthy, - * the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. - * If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise evaluating to the first chunk for which *fn* evaluated with a truthy value, - * or `undefined` if no element was found. - */ - find( - fn: (data: any, options?: Abortable) => data is T, - options?: Pick, - ): Promise; - find( - fn: (data: any, options?: Abortable) => boolean | Promise, - options?: Pick, - ): Promise; - /** - * This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream - * to check if all awaited return values are truthy value for *fn*. Once an *fn* call on a chunk - * `await`ed return value is falsy, the stream is destroyed and the promise is fulfilled with `false`. - * If all of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `true`. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks. - */ - every( - fn: (data: any, options?: Abortable) => boolean | Promise, - options?: Pick, - ): Promise; - /** - * This method returns a new stream by applying the given callback to each chunk of the stream - * and then flattening the result. - * - * It is possible to return a stream or another iterable or async iterable from *fn* and the result streams - * will be merged (flattened) into the returned stream. - * @since v17.5.0 - * @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator. - * @returns a stream flat-mapped with the function *fn*. - */ - flatMap( - fn: (data: any, options?: Abortable) => any, - options?: Pick, - ): Readable; - /** - * This method returns a new stream with the first *limit* chunks dropped from the start. - * @since v17.5.0 - * @param limit the number of chunks to drop from the readable. - * @returns a stream with *limit* chunks dropped from the start. - */ - drop(limit: number, options?: Abortable): Readable; - /** - * This method returns a new stream with the first *limit* chunks. - * @since v17.5.0 - * @param limit the number of chunks to take from the readable. - * @returns a stream with *limit* chunks taken. - */ - take(limit: number, options?: Abortable): Readable; - /** - * This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation - * on the previous element. It returns a promise for the final value of the reduction. - * - * If no *initial* value is supplied the first chunk of the stream is used as the initial value. - * If the stream is empty, the promise is rejected with a `TypeError` with the `ERR_INVALID_ARGS` code property. - * - * The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter - * or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. - * @since v17.5.0 - * @param fn a reducer function to call over every chunk in the stream. Async or not. - * @param initial the initial value to use in the reduction. - * @returns a promise for the final value of the reduction. - */ - reduce(fn: (previous: any, data: any, options?: Abortable) => T): Promise; - reduce( - fn: (previous: T, data: any, options?: Abortable) => T, - initial: T, - options?: Abortable, - ): Promise; - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - /** - * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the readable - * stream will release any internal resources and subsequent calls to `push()` will be ignored. - * - * Once `destroy()` has been called any further calls will be a no-op and no - * further errors except from `_destroy()` may be emitted as `'error'`. - * - * Implementors should not override this method, but instead implement `readable._destroy()`. - * @since v8.0.0 - * @param error Error which will be passed as payload in `'error'` event - */ - destroy(error?: Error): this; - /** - * @returns `AsyncIterator` to fully consume the stream. - * @since v10.0.0 - */ - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - /** - * Calls `readable.destroy()` with an `AbortError` and returns - * a promise that fulfills when the stream is finished. - * @since v20.4.0 - */ - [Symbol.asyncDispose](): Promise; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ReadableEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ReadableEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ReadableEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: ReadableEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ReadableEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ReadableEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ReadableEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: ReadableEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ReadableEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface WritableOptions extends StreamOptions { - decodeStrings?: boolean | undefined; - defaultEncoding?: BufferEncoding | undefined; - write?: - | (( - this: T, - chunk: any, - encoding: BufferEncoding, - callback: (error?: Error | null) => void, - ) => void) - | undefined; - writev?: - | (( - this: T, - chunks: { - chunk: any; - encoding: BufferEncoding; - }[], - callback: (error?: Error | null) => void, - ) => void) - | undefined; - final?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined; - } - interface WritableEventMap { - "close": []; - "drain": []; - "error": [err: Error]; - "finish": []; - "pipe": [src: Readable]; - "unpipe": [src: Readable]; - } - /** - * @since v0.9.4 - */ - class Writable extends Stream implements NodeJS.WritableStream { - constructor(options?: WritableOptions); - /** - * A utility method for creating a `Writable` from a web `WritableStream`. - * @since v17.0.0 - */ - static fromWeb( - writableStream: web.WritableStream, - options?: Pick, - ): Writable; - /** - * A utility method for creating a web `WritableStream` from a `Writable`. - * @since v17.0.0 - */ - static toWeb(streamWritable: NodeJS.WritableStream): web.WritableStream; - /** - * Is `true` if it is safe to call `writable.write()`, which means - * the stream has not been destroyed, errored, or ended. - * @since v11.4.0 - */ - writable: boolean; - /** - * Returns whether the stream was destroyed or errored before emitting `'finish'`. - * @since v18.0.0, v16.17.0 - */ - readonly writableAborted: boolean; - /** - * Is `true` after `writable.end()` has been called. This property - * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. - * @since v12.9.0 - */ - readonly writableEnded: boolean; - /** - * Is set to `true` immediately before the `'finish'` event is emitted. - * @since v12.6.0 - */ - readonly writableFinished: boolean; - /** - * Return the value of `highWaterMark` passed when creating this `Writable`. - * @since v9.3.0 - */ - readonly writableHighWaterMark: number; - /** - * This property contains the number of bytes (or objects) in the queue - * ready to be written. The value provides introspection data regarding - * the status of the `highWaterMark`. - * @since v9.4.0 - */ - readonly writableLength: number; - /** - * Getter for the property `objectMode` of a given `Writable` stream. - * @since v12.3.0 - */ - readonly writableObjectMode: boolean; - /** - * Number of times `writable.uncork()` needs to be - * called in order to fully uncork the stream. - * @since v13.2.0, v12.16.0 - */ - readonly writableCorked: number; - /** - * Is `true` after `writable.destroy()` has been called. - * @since v8.0.0 - */ - destroyed: boolean; - /** - * Is `true` after `'close'` has been emitted. - * @since v18.0.0 - */ - readonly closed: boolean; - /** - * Returns error if the stream has been destroyed with an error. - * @since v18.0.0 - */ - readonly errored: Error | null; - /** - * Is `true` if the stream's buffer has been full and stream will emit `'drain'`. - * @since v15.2.0, v14.17.0 - */ - readonly writableNeedDrain: boolean; - _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; - _writev?( - chunks: { - chunk: any; - encoding: BufferEncoding; - }[], - callback: (error?: Error | null) => void, - ): void; - _construct?(callback: (error?: Error | null) => void): void; - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - _final(callback: (error?: Error | null) => void): void; - /** - * The `writable.write()` method writes some data to the stream, and calls the - * supplied `callback` once the data has been fully handled. If an error - * occurs, the `callback` will be called with the error as its - * first argument. The `callback` is called asynchronously and before `'error'` is - * emitted. - * - * The return value is `true` if the internal buffer is less than the `highWaterMark` configured when the stream was created after admitting `chunk`. - * If `false` is returned, further attempts to write data to the stream should - * stop until the `'drain'` event is emitted. - * - * While a stream is not draining, calls to `write()` will buffer `chunk`, and - * return false. Once all currently buffered chunks are drained (accepted for - * delivery by the operating system), the `'drain'` event will be emitted. - * Once `write()` returns false, do not write more chunks - * until the `'drain'` event is emitted. While calling `write()` on a stream that - * is not draining is allowed, Node.js will buffer all written chunks until - * maximum memory usage occurs, at which point it will abort unconditionally. - * Even before it aborts, high memory usage will cause poor garbage collector - * performance and high RSS (which is not typically released back to the system, - * even after the memory is no longer required). Since TCP sockets may never - * drain if the remote peer does not read the data, writing a socket that is - * not draining may lead to a remotely exploitable vulnerability. - * - * Writing data while the stream is not draining is particularly - * problematic for a `Transform`, because the `Transform` streams are paused - * by default until they are piped or a `'data'` or `'readable'` event handler - * is added. - * - * If the data to be written can be generated or fetched on demand, it is - * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is - * possible to respect backpressure and avoid memory issues using the `'drain'` event: - * - * ```js - * function write(data, cb) { - * if (!stream.write(data)) { - * stream.once('drain', cb); - * } else { - * process.nextTick(cb); - * } - * } - * - * // Wait for cb to be called before doing any other write. - * write('hello', () => { - * console.log('Write completed, do more writes now.'); - * }); - * ``` - * - * A `Writable` stream in object mode will always ignore the `encoding` argument. - * @since v0.9.4 - * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, - * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. - * @param callback Callback for when this chunk of data is flushed. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean; - /** - * Writes data to the stream, with an explicit encoding for string data. - * @see {@link Writable.write} for full details. - * @since v0.9.4 - * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, - * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. - * @param encoding The encoding, if `chunk` is a string. - * @param callback Callback for when this chunk of data is flushed. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean; - /** - * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream. - * @since v0.11.15 - * @param encoding The new default encoding - */ - setDefaultEncoding(encoding: BufferEncoding): this; - /** - * Calling the `writable.end()` method signals that no more data will be written - * to the `Writable`. The optional `chunk` and `encoding` arguments allow one - * final additional chunk of data to be written immediately before closing the - * stream. - * - * Calling the {@link write} method after calling {@link end} will raise an error. - * - * ```js - * // Write 'hello, ' and then end with 'world!'. - * import fs from 'node:fs'; - * const file = fs.createWriteStream('example.txt'); - * file.write('hello, '); - * file.end('world!'); - * // Writing more now is not allowed! - * ``` - * @since v0.9.4 - * @param cb Callback for when the stream is finished. - */ - end(cb?: () => void): this; - /** - * Signals that no more data will be written, with one final chunk of data. - * @see {@link Writable.end} for full details. - * @since v0.9.4 - * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, - * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. - * @param cb Callback for when the stream is finished. - */ - end(chunk: any, cb?: () => void): this; - /** - * Signals that no more data will be written, with one final chunk of data. - * @see {@link Writable.end} for full details. - * @since v0.9.4 - * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, - * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. - * @param encoding The encoding if `chunk` is a string - * @param cb Callback for when the stream is finished. - */ - end(chunk: any, encoding: BufferEncoding, cb?: () => void): this; - /** - * The `writable.cork()` method forces all written data to be buffered in memory. - * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called. - * - * The primary intent of `writable.cork()` is to accommodate a situation in which - * several small chunks are written to the stream in rapid succession. Instead of - * immediately forwarding them to the underlying destination, `writable.cork()` buffers all the chunks until `writable.uncork()` is called, which will pass them - * all to `writable._writev()`, if present. This prevents a head-of-line blocking - * situation where data is being buffered while waiting for the first small chunk - * to be processed. However, use of `writable.cork()` without implementing `writable._writev()` may have an adverse effect on throughput. - * - * See also: `writable.uncork()`, `writable._writev()`. - * @since v0.11.2 - */ - cork(): void; - /** - * The `writable.uncork()` method flushes all data buffered since {@link cork} was called. - * - * When using `writable.cork()` and `writable.uncork()` to manage the buffering - * of writes to a stream, defer calls to `writable.uncork()` using `process.nextTick()`. Doing so allows batching of all `writable.write()` calls that occur within a given Node.js event - * loop phase. - * - * ```js - * stream.cork(); - * stream.write('some '); - * stream.write('data '); - * process.nextTick(() => stream.uncork()); - * ``` - * - * If the `writable.cork()` method is called multiple times on a stream, the - * same number of calls to `writable.uncork()` must be called to flush the buffered - * data. - * - * ```js - * stream.cork(); - * stream.write('some '); - * stream.cork(); - * stream.write('data '); - * process.nextTick(() => { - * stream.uncork(); - * // The data will not be flushed until uncork() is called a second time. - * stream.uncork(); - * }); - * ``` - * - * See also: `writable.cork()`. - * @since v0.11.2 - */ - uncork(): void; - /** - * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the writable - * stream has ended and subsequent calls to `write()` or `end()` will result in - * an `ERR_STREAM_DESTROYED` error. - * This is a destructive and immediate way to destroy a stream. Previous calls to `write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error. - * Use `end()` instead of destroy if data should flush before close, or wait for - * the `'drain'` event before destroying the stream. - * - * Once `destroy()` has been called any further calls will be a no-op and no - * further errors except from `_destroy()` may be emitted as `'error'`. - * - * Implementors should not override this method, - * but instead implement `writable._destroy()`. - * @since v8.0.0 - * @param error Optional, an error to emit with `'error'` event. - */ - destroy(error?: Error): this; - /** - * Calls `writable.destroy()` with an `AbortError` and returns - * a promise that fulfills when the stream is finished. - * @since v22.4.0, v20.16.0 - */ - [Symbol.asyncDispose](): Promise; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: WritableEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: WritableEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: WritableEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: WritableEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: WritableEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: WritableEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: WritableEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: WritableEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: WritableEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: WritableEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: WritableEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface DuplexOptions extends ReadableOptions, WritableOptions { - allowHalfOpen?: boolean | undefined; - readableObjectMode?: boolean | undefined; - writableObjectMode?: boolean | undefined; - readableHighWaterMark?: number | undefined; - writableHighWaterMark?: number | undefined; - writableCorked?: number | undefined; - } - interface DuplexToWebOptions { - readableType?: web.ReadableStreamType | undefined; - } - interface DuplexEventMap extends ReadableEventMap, WritableEventMap {} - /** - * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces. - * - * Examples of `Duplex` streams include: - * - * * `TCP sockets` - * * `zlib streams` - * * `crypto streams` - * @since v0.9.4 - */ - class Duplex extends Stream implements NodeJS.ReadWriteStream { - constructor(options?: DuplexOptions); - /** - * A utility method for creating duplex streams. - * - * - `Stream` converts writable stream into writable `Duplex` and readable stream - * to `Duplex`. - * - `Blob` converts into readable `Duplex`. - * - `string` converts into readable `Duplex`. - * - `ArrayBuffer` converts into readable `Duplex`. - * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`. - * - `AsyncGeneratorFunction` converts into a readable/writable transform - * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield - * `null`. - * - `AsyncFunction` converts into a writable `Duplex`. Must return - * either `null` or `undefined` - * - `Object ({ writable, readable })` converts `readable` and - * `writable` into `Stream` and then combines them into `Duplex` where the - * `Duplex` will write to the `writable` and read from the `readable`. - * - `Promise` converts into readable `Duplex`. Value `null` is ignored. - * - * @since v16.8.0 - */ - static from( - src: - | NodeJS.ReadableStream - | NodeJS.WritableStream - | Blob - | string - | Iterable - | AsyncIterable - | ((source: AsyncIterable) => AsyncIterable) - | ((source: AsyncIterable) => Promise) - | Promise - | web.ReadableWritablePair - | web.ReadableStream - | web.WritableStream, - ): Duplex; - /** - * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`. - * @since v17.0.0 - */ - static toWeb(streamDuplex: NodeJS.ReadWriteStream, options?: DuplexToWebOptions): web.ReadableWritablePair; - /** - * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`. - * @since v17.0.0 - */ - static fromWeb( - duplexStream: web.ReadableWritablePair, - options?: Pick< - DuplexOptions, - "allowHalfOpen" | "decodeStrings" | "encoding" | "highWaterMark" | "objectMode" | "signal" - >, - ): Duplex; - /** - * If `false` then the stream will automatically end the writable side when the - * readable side ends. Set initially by the `allowHalfOpen` constructor option, - * which defaults to `true`. - * - * This can be changed manually to change the half-open behavior of an existing - * `Duplex` stream instance, but must be changed before the `'end'` event is emitted. - * @since v0.9.4 - */ - allowHalfOpen: boolean; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: DuplexEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: DuplexEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: DuplexEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: DuplexEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: DuplexEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: DuplexEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: DuplexEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: DuplexEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface Duplex extends Readable, Writable {} - /** - * The utility function `duplexPair` returns an Array with two items, - * each being a `Duplex` stream connected to the other side: - * - * ```js - * const [ sideA, sideB ] = duplexPair(); - * ``` - * - * Whatever is written to one stream is made readable on the other. It provides - * behavior analogous to a network connection, where the data written by the client - * becomes readable by the server, and vice-versa. - * - * The Duplex streams are symmetrical; one or the other may be used without any - * difference in behavior. - * @param options A value to pass to both {@link Duplex} constructors, - * to set options such as buffering. - * @since v22.6.0 - */ - function duplexPair(options?: DuplexOptions): [Duplex, Duplex]; - type TransformCallback = (error?: Error | null, data?: any) => void; - interface TransformOptions extends DuplexOptions { - transform?: - | ((this: T, chunk: any, encoding: BufferEncoding, callback: TransformCallback) => void) - | undefined; - flush?: ((this: T, callback: TransformCallback) => void) | undefined; - } - /** - * Transform streams are `Duplex` streams where the output is in some way - * related to the input. Like all `Duplex` streams, `Transform` streams - * implement both the `Readable` and `Writable` interfaces. - * - * Examples of `Transform` streams include: - * - * * `zlib streams` - * * `crypto streams` - * @since v0.9.4 - */ - class Transform extends Duplex { - constructor(options?: TransformOptions); - _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; - _flush(callback: TransformCallback): void; - } - /** - * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is - * primarily for examples and testing, but there are some use cases where `stream.PassThrough` is useful as a building block for novel sorts of streams. - */ - class PassThrough extends Transform {} - /** - * A stream to attach a signal to. - * - * Attaches an AbortSignal to a readable or writeable stream. This lets code - * control stream destruction using an `AbortController`. - * - * Calling `abort` on the `AbortController` corresponding to the passed `AbortSignal` will behave the same way as calling `.destroy(new AbortError())` on the - * stream, and `controller.error(new AbortError())` for webstreams. - * - * ```js - * import fs from 'node:fs'; - * - * const controller = new AbortController(); - * const read = addAbortSignal( - * controller.signal, - * fs.createReadStream(('object.json')), - * ); - * // Later, abort the operation closing the stream - * controller.abort(); - * ``` - * - * Or using an `AbortSignal` with a readable stream as an async iterable: - * - * ```js - * const controller = new AbortController(); - * setTimeout(() => controller.abort(), 10_000); // set a timeout - * const stream = addAbortSignal( - * controller.signal, - * fs.createReadStream(('object.json')), - * ); - * (async () => { - * try { - * for await (const chunk of stream) { - * await process(chunk); - * } - * } catch (e) { - * if (e.name === 'AbortError') { - * // The operation was cancelled - * } else { - * throw e; - * } - * } - * })(); - * ``` - * - * Or using an `AbortSignal` with a ReadableStream: - * - * ```js - * const controller = new AbortController(); - * const rs = new ReadableStream({ - * start(controller) { - * controller.enqueue('hello'); - * controller.enqueue('world'); - * controller.close(); - * }, - * }); - * - * addAbortSignal(controller.signal, rs); - * - * finished(rs, (err) => { - * if (err) { - * if (err.name === 'AbortError') { - * // The operation was cancelled - * } - * } - * }); - * - * const reader = rs.getReader(); - * - * reader.read().then(({ value, done }) => { - * console.log(value); // hello - * console.log(done); // false - * controller.abort(); - * }); - * ``` - * @since v15.4.0 - * @param signal A signal representing possible cancellation - * @param stream A stream to attach a signal to. - */ - function addAbortSignal< - T extends NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, - >(signal: AbortSignal, stream: T): T; - /** - * Returns the default highWaterMark used by streams. - * Defaults to `65536` (64 KiB), or `16` for `objectMode`. - * @since v19.9.0 - */ - function getDefaultHighWaterMark(objectMode: boolean): number; - /** - * Sets the default highWaterMark used by streams. - * @since v19.9.0 - * @param value highWaterMark value - */ - function setDefaultHighWaterMark(objectMode: boolean, value: number): void; - interface FinishedOptions extends Abortable { - error?: boolean | undefined; - readable?: boolean | undefined; - writable?: boolean | undefined; - } - /** - * A readable and/or writable stream/webstream. - * - * A function to get notified when a stream is no longer readable, writable - * or has experienced an error or a premature close event. - * - * ```js - * import { finished } from 'node:stream'; - * import fs from 'node:fs'; - * - * const rs = fs.createReadStream('archive.tar'); - * - * finished(rs, (err) => { - * if (err) { - * console.error('Stream failed.', err); - * } else { - * console.log('Stream is done reading.'); - * } - * }); - * - * rs.resume(); // Drain the stream. - * ``` - * - * Especially useful in error handling scenarios where a stream is destroyed - * prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`. - * - * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamfinishedstream-options). - * - * `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been - * invoked. The reason for this is so that unexpected `'error'` events (due to - * incorrect stream implementations) do not cause unexpected crashes. - * If this is unwanted behavior then the returned cleanup function needs to be - * invoked in the callback: - * - * ```js - * const cleanup = finished(rs, (err) => { - * cleanup(); - * // ... - * }); - * ``` - * @since v10.0.0 - * @param stream A readable and/or writable stream. - * @param callback A callback function that takes an optional error argument. - * @returns A cleanup function which removes all registered listeners. - */ - function finished( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, - options: FinishedOptions, - callback: (err?: NodeJS.ErrnoException | null) => void, - ): () => void; - function finished( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, - callback: (err?: NodeJS.ErrnoException | null) => void, - ): () => void; - namespace finished { - import __promisify__ = promises.finished; - export { __promisify__ }; - } - type PipelineSourceFunction = (options?: Abortable) => Iterable | AsyncIterable; - type PipelineSource = - | NodeJS.ReadableStream - | web.ReadableStream - | web.TransformStream - | Iterable - | AsyncIterable - | PipelineSourceFunction; - type PipelineSourceArgument = (T extends (...args: any[]) => infer R ? R : T) extends infer S - ? S extends web.TransformStream ? web.ReadableStream : S - : never; - type PipelineTransformGenerator, O> = ( - source: PipelineSourceArgument, - options?: Abortable, - ) => AsyncIterable; - type PipelineTransformStreams = - | NodeJS.ReadWriteStream - | web.TransformStream; - type PipelineTransform, O> = S extends - PipelineSource | PipelineTransformStreams | ((...args: any[]) => infer I) - ? PipelineTransformStreams | PipelineTransformGenerator - : never; - type PipelineTransformSource = PipelineSource | PipelineTransform; - type PipelineDestinationFunction, R> = ( - source: PipelineSourceArgument, - options?: Abortable, - ) => R; - type PipelineDestination, R> = S extends - PipelineSource | PipelineTransform ? - | NodeJS.WritableStream - | web.WritableStream - | web.TransformStream - | PipelineDestinationFunction - : never; - type PipelineCallback> = ( - err: NodeJS.ErrnoException | null, - value: S extends (...args: any[]) => PromiseLike ? R : undefined, - ) => void; - type PipelineResult> = S extends NodeJS.WritableStream ? S : Duplex; - /** - * A module method to pipe between streams and generators forwarding errors and - * properly cleaning up and provide a callback when the pipeline is complete. - * - * ```js - * import { pipeline } from 'node:stream'; - * import fs from 'node:fs'; - * import zlib from 'node:zlib'; - * - * // Use the pipeline API to easily pipe a series of streams - * // together and get notified when the pipeline is fully done. - * - * // A pipeline to gzip a potentially huge tar file efficiently: - * - * pipeline( - * fs.createReadStream('archive.tar'), - * zlib.createGzip(), - * fs.createWriteStream('archive.tar.gz'), - * (err) => { - * if (err) { - * console.error('Pipeline failed.', err); - * } else { - * console.log('Pipeline succeeded.'); - * } - * }, - * ); - * ``` - * - * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streampipelinesource-transforms-destination-options). - * - * `stream.pipeline()` will call `stream.destroy(err)` on all streams except: - * - * * `Readable` streams which have emitted `'end'` or `'close'`. - * * `Writable` streams which have emitted `'finish'` or `'close'`. - * - * `stream.pipeline()` leaves dangling event listeners on the streams - * after the `callback` has been invoked. In the case of reuse of streams after - * failure, this can cause event listener leaks and swallowed errors. If the last - * stream is readable, dangling event listeners will be removed so that the last - * stream can be consumed later. - * - * `stream.pipeline()` closes all the streams when an error is raised. - * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior - * once it would destroy the socket without sending the expected response. - * See the example below: - * - * ```js - * import fs from 'node:fs'; - * import http from 'node:http'; - * import { pipeline } from 'node:stream'; - * - * const server = http.createServer((req, res) => { - * const fileStream = fs.createReadStream('./fileNotExist.txt'); - * pipeline(fileStream, res, (err) => { - * if (err) { - * console.log(err); // No such file - * // this message can't be sent once `pipeline` already destroyed the socket - * return res.end('error!!!'); - * } - * }); - * }); - * ``` - * @since v10.0.0 - * @param callback Called when the pipeline is fully done. - */ - function pipeline, D extends PipelineDestination>( - source: S, - destination: D, - callback: PipelineCallback, - ): PipelineResult; - function pipeline< - S extends PipelineSource, - T extends PipelineTransform, - D extends PipelineDestination, - >( - source: S, - transform: T, - destination: D, - callback: PipelineCallback, - ): PipelineResult; - function pipeline< - S extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - D extends PipelineDestination, - >( - source: S, - transform1: T1, - transform2: T2, - destination: D, - callback: PipelineCallback, - ): PipelineResult; - function pipeline< - S extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - D extends PipelineDestination, - >( - source: S, - transform1: T1, - transform2: T2, - transform3: T3, - destination: D, - callback: PipelineCallback, - ): PipelineResult; - function pipeline< - S extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - T4 extends PipelineTransform, - D extends PipelineDestination, - >( - source: S, - transform1: T1, - transform2: T2, - transform3: T3, - transform4: T4, - destination: D, - callback: PipelineCallback, - ): PipelineResult; - function pipeline( - streams: ReadonlyArray | PipelineTransform | PipelineDestination>, - callback: (err: NodeJS.ErrnoException | null) => void, - ): NodeJS.WritableStream; - function pipeline( - ...streams: [ - ...[PipelineSource, ...PipelineTransform[], PipelineDestination], - callback: ((err: NodeJS.ErrnoException | null) => void), - ] - ): NodeJS.WritableStream; - namespace pipeline { - import __promisify__ = promises.pipeline; - export { __promisify__ }; - } - type ComposeSource = - | NodeJS.ReadableStream - | web.ReadableStream - | Iterable - | AsyncIterable - | (() => AsyncIterable); - type ComposeTransformStreams = NodeJS.ReadWriteStream | web.TransformStream; - type ComposeTransformGenerator = (source: AsyncIterable) => AsyncIterable; - type ComposeTransform, O> = S extends - ComposeSource | ComposeTransformStreams | ComposeTransformGenerator - ? ComposeTransformStreams | ComposeTransformGenerator - : never; - type ComposeTransformSource = ComposeSource | ComposeTransform; - type ComposeDestination> = S extends ComposeTransformSource ? - | NodeJS.WritableStream - | web.WritableStream - | web.TransformStream - | ((source: AsyncIterable) => void) - : never; - /** - * Combines two or more streams into a `Duplex` stream that writes to the - * first stream and reads from the last. Each provided stream is piped into - * the next, using `stream.pipeline`. If any of the streams error then all - * are destroyed, including the outer `Duplex` stream. - * - * Because `stream.compose` returns a new stream that in turn can (and - * should) be piped into other streams, it enables composition. In contrast, - * when passing streams to `stream.pipeline`, typically the first stream is - * a readable stream and the last a writable stream, forming a closed - * circuit. - * - * If passed a `Function` it must be a factory method taking a `source` - * `Iterable`. - * - * ```js - * import { compose, Transform } from 'node:stream'; - * - * const removeSpaces = new Transform({ - * transform(chunk, encoding, callback) { - * callback(null, String(chunk).replace(' ', '')); - * }, - * }); - * - * async function* toUpper(source) { - * for await (const chunk of source) { - * yield String(chunk).toUpperCase(); - * } - * } - * - * let res = ''; - * for await (const buf of compose(removeSpaces, toUpper).end('hello world')) { - * res += buf; - * } - * - * console.log(res); // prints 'HELLOWORLD' - * ``` - * - * `stream.compose` can be used to convert async iterables, generators and - * functions into streams. - * - * * `AsyncIterable` converts into a readable `Duplex`. Cannot yield - * `null`. - * * `AsyncGeneratorFunction` converts into a readable/writable transform `Duplex`. - * Must take a source `AsyncIterable` as first parameter. Cannot yield - * `null`. - * * `AsyncFunction` converts into a writable `Duplex`. Must return - * either `null` or `undefined`. - * - * ```js - * import { compose } from 'node:stream'; - * import { finished } from 'node:stream/promises'; - * - * // Convert AsyncIterable into readable Duplex. - * const s1 = compose(async function*() { - * yield 'Hello'; - * yield 'World'; - * }()); - * - * // Convert AsyncGenerator into transform Duplex. - * const s2 = compose(async function*(source) { - * for await (const chunk of source) { - * yield String(chunk).toUpperCase(); - * } - * }); - * - * let res = ''; - * - * // Convert AsyncFunction into writable Duplex. - * const s3 = compose(async function(source) { - * for await (const chunk of source) { - * res += chunk; - * } - * }); - * - * await finished(compose(s1, s2, s3)); - * - * console.log(res); // prints 'HELLOWORLD' - * ``` - * - * For convenience, the `readable.compose(stream)` method is available on - * `Readable` and `Duplex` streams as a wrapper for this function. - * @since v16.9.0 - * @experimental - */ - /* eslint-disable @definitelytyped/no-unnecessary-generics */ - function compose(stream: ComposeSource | ComposeDestination): Duplex; - function compose< - S extends ComposeSource | ComposeTransform, - D extends ComposeTransform | ComposeDestination, - >( - source: S, - destination: D, - ): Duplex; - function compose< - S extends ComposeSource | ComposeTransform, - T extends ComposeTransform, - D extends ComposeTransform | ComposeDestination, - >(source: S, transform: T, destination: D): Duplex; - function compose< - S extends ComposeSource | ComposeTransform, - T1 extends ComposeTransform, - T2 extends ComposeTransform, - D extends ComposeTransform | ComposeDestination, - >(source: S, transform1: T1, transform2: T2, destination: D): Duplex; - function compose< - S extends ComposeSource | ComposeTransform, - T1 extends ComposeTransform, - T2 extends ComposeTransform, - T3 extends ComposeTransform, - D extends ComposeTransform | ComposeDestination, - >(source: S, transform1: T1, transform2: T2, transform3: T3, destination: D): Duplex; - function compose< - S extends ComposeSource | ComposeTransform, - T1 extends ComposeTransform, - T2 extends ComposeTransform, - T3 extends ComposeTransform, - T4 extends ComposeTransform, - D extends ComposeTransform | ComposeDestination, - >(source: S, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: D): Duplex; - function compose( - ...streams: [ - ComposeSource, - ...ComposeTransform[], - ComposeDestination, - ] - ): Duplex; - /* eslint-enable @definitelytyped/no-unnecessary-generics */ - /** - * Returns whether the stream has encountered an error. - * @since v17.3.0, v16.14.0 - */ - function isErrored( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, - ): boolean; - /** - * Returns whether the stream is readable. - * @since v17.4.0, v16.14.0 - * @returns Only returns `null` if `stream` is not a valid `Readable`, `Duplex` or `ReadableStream`. - */ - function isReadable(stream: NodeJS.ReadableStream | web.ReadableStream): boolean | null; - /** - * Returns whether the stream is writable. - * @since v20.0.0 - * @returns Only returns `null` if `stream` is not a valid `Writable`, `Duplex` or `WritableStream`. - */ - function isWritable(stream: NodeJS.WritableStream | web.WritableStream): boolean | null; - } - global { - namespace NodeJS { - // These interfaces are vestigial, and correspond roughly to the "streams2" interfaces - // from early versions of Node.js, but they are still used widely across the ecosystem. - // Accordingly, they are commonly used as "in-types" for @types/node APIs, so that - // eg. streams returned from older libraries will still be considered valid input to - // functions which accept stream arguments. - // It's not possible to change or remove these without astronomical levels of breakage. - interface ReadableStream extends EventEmitter { - readable: boolean; - read(size?: number): string | Buffer; - setEncoding(encoding: BufferEncoding): this; - pause(): this; - resume(): this; - isPaused(): boolean; - pipe(destination: T, options?: { end?: boolean | undefined }): T; - unpipe(destination?: WritableStream): this; - unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; - wrap(oldStream: ReadableStream): this; - [Symbol.asyncIterator](): AsyncIterableIterator; - } - interface WritableStream extends EventEmitter { - writable: boolean; - write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; - write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; - end(cb?: () => void): this; - end(data: string | Uint8Array, cb?: () => void): this; - end(str: string, encoding?: BufferEncoding, cb?: () => void): this; - } - interface ReadWriteStream extends ReadableStream, WritableStream {} - } - } - export = Stream; -} -declare module "stream" { - import stream = require("node:stream"); - export = stream; -} diff --git a/node_modules/@types/node/stream/consumers.d.ts b/node_modules/@types/node/stream/consumers.d.ts deleted file mode 100644 index 27a474c..0000000 --- a/node_modules/@types/node/stream/consumers.d.ts +++ /dev/null @@ -1,114 +0,0 @@ -declare module "node:stream/consumers" { - import { Blob, NonSharedBuffer } from "node:buffer"; - import { ReadableStream } from "node:stream/web"; - /** - * ```js - * import { arrayBuffer } from 'node:stream/consumers'; - * import { Readable } from 'node:stream'; - * import { TextEncoder } from 'node:util'; - * - * const encoder = new TextEncoder(); - * const dataArray = encoder.encode('hello world from consumers!'); - * - * const readable = Readable.from(dataArray); - * const data = await arrayBuffer(readable); - * console.log(`from readable: ${data.byteLength}`); - * // Prints: from readable: 76 - * ``` - * @since v16.7.0 - * @returns Fulfills with an `ArrayBuffer` containing the full contents of the stream. - */ - function arrayBuffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; - /** - * ```js - * import { blob } from 'node:stream/consumers'; - * - * const dataBlob = new Blob(['hello world from consumers!']); - * - * const readable = dataBlob.stream(); - * const data = await blob(readable); - * console.log(`from readable: ${data.size}`); - * // Prints: from readable: 27 - * ``` - * @since v16.7.0 - * @returns Fulfills with a `Blob` containing the full contents of the stream. - */ - function blob(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; - /** - * ```js - * import { buffer } from 'node:stream/consumers'; - * import { Readable } from 'node:stream'; - * import { Buffer } from 'node:buffer'; - * - * const dataBuffer = Buffer.from('hello world from consumers!'); - * - * const readable = Readable.from(dataBuffer); - * const data = await buffer(readable); - * console.log(`from readable: ${data.length}`); - * // Prints: from readable: 27 - * ``` - * @since v16.7.0 - * @returns Fulfills with a `Buffer` containing the full contents of the stream. - */ - function buffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; - /** - * ```js - * import { bytes } from 'node:stream/consumers'; - * import { Readable } from 'node:stream'; - * import { Buffer } from 'node:buffer'; - * - * const dataBuffer = Buffer.from('hello world from consumers!'); - * - * const readable = Readable.from(dataBuffer); - * const data = await bytes(readable); - * console.log(`from readable: ${data.length}`); - * // Prints: from readable: 27 - * ``` - * @since v25.6.0 - * @returns Fulfills with a `Uint8Array` containing the full contents of the stream. - */ - function bytes( - stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable, - ): Promise; - /** - * ```js - * import { json } from 'node:stream/consumers'; - * import { Readable } from 'node:stream'; - * - * const items = Array.from( - * { - * length: 100, - * }, - * () => ({ - * message: 'hello world from consumers!', - * }), - * ); - * - * const readable = Readable.from(JSON.stringify(items)); - * const data = await json(readable); - * console.log(`from readable: ${data.length}`); - * // Prints: from readable: 100 - * ``` - * @since v16.7.0 - * @returns Fulfills with the contents of the stream parsed as a - * UTF-8 encoded string that is then passed through `JSON.parse()`. - */ - function json(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; - /** - * ```js - * import { text } from 'node:stream/consumers'; - * import { Readable } from 'node:stream'; - * - * const readable = Readable.from('Hello world from consumers!'); - * const data = await text(readable); - * console.log(`from readable: ${data.length}`); - * // Prints: from readable: 27 - * ``` - * @since v16.7.0 - * @returns Fulfills with the contents of the stream parsed as a UTF-8 encoded string. - */ - function text(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; -} -declare module "stream/consumers" { - export * from "node:stream/consumers"; -} diff --git a/node_modules/@types/node/stream/iter.d.ts b/node_modules/@types/node/stream/iter.d.ts deleted file mode 100644 index 121f782..0000000 --- a/node_modules/@types/node/stream/iter.d.ts +++ /dev/null @@ -1,301 +0,0 @@ -declare module "node:stream/iter" { - // Symbols and custom typedefs - const broadcastProtocol: unique symbol; - const drainableProtocol: unique symbol; - const shareProtocol: unique symbol; - const shareSyncProtocol: unique symbol; - const toAsyncStreamable: unique symbol; - const toStreamable: unique symbol; - type Source = - | string - | ArrayBufferLike - | ArrayBufferView - | Iterable - | AsyncIterable - | Streamable - | AsyncStreamable; - type SyncSource = string | ArrayBufferLike | ArrayBufferView | Iterable | Streamable; - type Transform = StatelessTransformFn | StatefulTransform; - type SyncTransform = SyncStatelessTransformFn | SyncStatefulTransform; - type TransformResult = - | string - | ArrayBufferLike - | ArrayBufferView - | Iterable - | AsyncIterable; - type SyncTransformResult = string | ArrayBufferLike | ArrayBufferView | Iterable; - interface AsyncStreamable { - [toAsyncStreamable](): Source; - } - interface Broadcastable { - [broadcastProtocol](options: BroadcastOptions): Broadcast; - } - interface Drainable { - [drainableProtocol](): Promise | null; - } - interface Shareable { - [shareProtocol](options: ShareOptions): Share; - } - interface Streamable { - [toStreamable](): SyncSource; - } - interface SyncShareable { - [shareSyncProtocol](options: ShareSyncOptions): SyncShare; - } - // IDL dictionaries, enums, typedefs - type BackpressurePolicy = "strict" | "block" | "drop-oldest" | "drop-newest"; - type ByteReadableStream = AsyncIterable; - type SyncByteReadableStream = Iterable; - interface WriteOptions { - signal?: AbortSignal; - } - interface PushStreamOptions { - highWaterMark?: number; - backpressure?: BackpressurePolicy; - signal?: AbortSignal; - } - interface PullOptions { - signal?: AbortSignal; - } - interface PipeToOptions { - signal?: AbortSignal; - preventClose?: boolean; - preventFail?: boolean; - } - interface PipeToSyncOptions { - preventClose?: boolean; - preventFail?: boolean; - } - interface ConsumeOptions { - signal?: AbortSignal; - limit?: number; - } - interface ConsumeSyncOptions { - limit?: number; - } - interface TextConsumeOptions extends ConsumeOptions { - encoding?: string; - } - interface TextConsumeSyncOptions extends ConsumeSyncOptions { - encoding?: string; - } - interface MergeOptions { - signal?: AbortSignal; - } - interface BroadcastOptions { - highWaterMark?: number; - backpressure?: BackpressurePolicy; - signal?: AbortSignal; - } - interface ShareOptions { - highWaterMark?: number; - backpressure?: BackpressurePolicy; - signal?: AbortSignal; - } - interface ShareSyncOptions { - highWaterMark?: number; - backpressure?: BackpressurePolicy; - } - interface DuplexDirectionOptions { - highWaterMark?: number; - backpressure?: BackpressurePolicy; - } - interface DuplexOptions { - highWaterMark?: number; - backpressure?: BackpressurePolicy; - a?: DuplexDirectionOptions; - b?: DuplexDirectionOptions; - signal?: AbortSignal; - } - interface TransformCallbackOptions { - signal: AbortSignal; - } - interface StatelessTransformFn { - ( - chunks: Uint8Array[] | null, - options: TransformCallbackOptions, - ): Promise | TransformResult | null; - } - interface SyncStatelessTransformFn { - (chunks: Uint8Array[] | null): SyncTransformResult | null; - } - interface StatefulTransform { - transform( - source: AsyncIterable, - options: TransformCallbackOptions, - ): AsyncIterable; - } - interface SyncStatefulTransform { - transform(source: Iterable): Iterable; - } - // IDL interfaces - interface PushWriter extends Writer, Drainable {} - interface PushStreamResult { - writer: PushWriter; - readable: ByteReadableStream; - } - interface BroadcastWriter extends Writer, Drainable {} - interface BroadcastResult { - writer: BroadcastWriter; - broadcast: Broadcast; - } - interface Writer extends Disposable, AsyncDisposable { - readonly desiredSize: number | null; - write(chunk: Uint8Array | string, options?: WriteOptions): Promise; - writev(chunks: Array, options?: WriteOptions): Promise; - writeSync(chunk: Uint8Array | string): boolean; - writevSync(chunks: Array): boolean; - end(options?: WriteOptions): Promise; - endSync(): number; - fail(reason?: any): void; - } - interface PartialWriter extends Partial { - write(chunk: Uint8Array | string, options?: WriteOptions): Promise; - } - interface SyncWriter extends Disposable { - readonly desiredSize: number | null; - writeSync(chunk: Uint8Array | string): number; - writevSync(chunks: Array): number; - endSync(): number; - fail(reason?: any): void; - } - interface PartialSyncWriter extends Partial { - writeSync(chunk: Uint8Array | string): number; - } - interface Broadcast extends Disposable { - readonly consumerCount: number; - readonly bufferSize: number; - push(...args: any[]): ByteReadableStream; - cancel(reason?: any): void; - } - interface Share extends Disposable { - readonly consumerCount: number; - readonly bufferSize: number; - pull(...args: any[]): ByteReadableStream; - cancel(reason?: any): void; - } - interface SyncShare extends Disposable { - readonly consumerCount: number; - readonly bufferSize: number; - pull(...args: any): SyncByteReadableStream; - cancel(reason?: any): void; - } - interface DuplexChannel extends AsyncDisposable { - readonly writer: Writer; - readonly readable: ByteReadableStream; - close(): Promise; - } - // Push stream creation - function push(...transforms: Transform[]): PushStreamResult; - function push(...args: [...transforms: Transform[], options: PushStreamOptions]): PushStreamResult; - // Stream factories - function from(input: Source): ByteReadableStream; - function fromSync(input: SyncSource): SyncByteReadableStream; - // Pull pipelines - function pull(source: Source, ...transforms: Transform[]): ByteReadableStream; - function pull( - source: Source, - ...args: [...transforms: Transform[], options: PullOptions] - ): ByteReadableStream; - function pullSync(source: SyncSource, ...transforms: SyncTransform[]): SyncByteReadableStream; - // Pipe operations - function pipeTo(source: Source, writer: PartialWriter, options?: PipeToOptions): Promise; - function pipeTo(source: Source, ...args: [...transforms: Transform[], writer: PartialWriter]): Promise; - function pipeTo( - source: Source, - ...args: [...transforms: Transform[], writer: PartialWriter, options: PipeToOptions] - ): Promise; - function pipeToSync(source: SyncSource, writer: PartialSyncWriter, options?: PipeToSyncOptions): number; - function pipeToSync( - source: SyncSource, - ...args: [...transforms: SyncTransform[], writer: PartialSyncWriter] - ): number; - function pipeToSync( - source: SyncSource, - ...args: [...transforms: SyncTransform[], writer: PartialSyncWriter, options: PipeToSyncOptions] - ): number; - // Consumers - function bytes(source: Source, options?: ConsumeOptions): Promise; - function bytesSync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array; - function text(source: Source, options?: TextConsumeOptions): Promise; - function textSync(source: SyncSource, options?: TextConsumeSyncOptions): string; - function arrayBuffer(source: Source, options?: ConsumeOptions): Promise; - function arrayBufferSync(source: SyncSource, options?: ConsumeSyncOptions): ArrayBuffer; - function array(source: Source, options?: ConsumeOptions): Promise; - function arraySync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array[]; - // Utilities - function tap(callback: StatelessTransformFn): StatelessTransformFn; - function tapSync(callback: SyncStatelessTransformFn): SyncStatelessTransformFn; - function merge(...sources: Source[]): ByteReadableStream; - function merge(...args: [...sources: Source[], options: MergeOptions]): ByteReadableStream; - function ondrain(drainable: any): Promise | null; - // Multi-consumer - function broadcast(options?: BroadcastOptions): BroadcastResult; - function share(source: Source, options?: ShareOptions): Share; - function shareSync(source: SyncSource, options?: ShareSyncOptions): SyncShare; - // Duplex - function duplex(options?: DuplexOptions): [DuplexChannel, DuplexChannel]; - // Node.js-specific extensions - namespace Broadcast { - /** - * Create a `Broadcast` from an existing source. The source is consumed - * automatically and pushed to all subscribers. - * @since v25.9.0 - * @param options Same as `broadcast()`. - */ - function from( - input: ByteReadableStream | SyncByteReadableStream | Broadcastable, - options?: BroadcastOptions, - ): BroadcastResult; - } - namespace Share { - /** - * Create a `Share` from an existing source. - * @since v25.9.0 - * @param options Same as `share()`. - */ - function from(input: ByteReadableStream | SyncByteReadableStream | Shareable, options?: ShareOptions): Share; - } - namespace SyncShare { - /** - * @since v25.9.0 - */ - function from(input: SyncByteReadableStream | SyncShareable, options?: ShareSyncOptions): SyncShare; - } - namespace Stream { - export { - array, - arrayBuffer, - arrayBufferSync, - arraySync, - broadcast, - broadcastProtocol, - bytes, - bytesSync, - drainableProtocol, - duplex, - from, - fromSync, - merge, - ondrain, - pipeTo, - pipeToSync, - pull, - pullSync, - push, - share, - shareProtocol, - shareSync, - shareSyncProtocol, - tap, - tapSync, - text, - textSync, - toAsyncStreamable, - toStreamable, - }; - } -} -declare module "stream/iter" { - export * from "node:stream/iter"; -} diff --git a/node_modules/@types/node/stream/promises.d.ts b/node_modules/@types/node/stream/promises.d.ts deleted file mode 100644 index c4bd3ea..0000000 --- a/node_modules/@types/node/stream/promises.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -declare module "node:stream/promises" { - import { Abortable } from "node:events"; - import { - FinishedOptions as _FinishedOptions, - PipelineDestination, - PipelineSource, - PipelineTransform, - } from "node:stream"; - import { ReadableStream, WritableStream } from "node:stream/web"; - interface FinishedOptions extends _FinishedOptions { - /** - * If true, removes the listeners registered by this function before the promise is fulfilled. - * @default false - */ - cleanup?: boolean | undefined; - } - /** - * ```js - * import { finished } from 'node:stream/promises'; - * import { createReadStream } from 'node:fs'; - * - * const rs = createReadStream('archive.tar'); - * - * async function run() { - * await finished(rs); - * console.log('Stream is done reading.'); - * } - * - * run().catch(console.error); - * rs.resume(); // Drain the stream. - * ``` - * - * The `finished` API also provides a [callback version](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamfinishedstream-options-callback). - * - * `stream.finished()` leaves dangling event listeners (in particular - * `'error'`, `'end'`, `'finish'` and `'close'`) after the returned promise is - * resolved or rejected. The reason for this is so that unexpected `'error'` - * events (due to incorrect stream implementations) do not cause unexpected - * crashes. If this is unwanted behavior then `options.cleanup` should be set to - * `true`: - * - * ```js - * await finished(rs, { cleanup: true }); - * ``` - * @since v15.0.0 - * @returns Fulfills when the stream is no longer readable or writable. - */ - function finished( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | ReadableStream | WritableStream, - options?: FinishedOptions, - ): Promise; - interface PipelineOptions extends Abortable { - end?: boolean | undefined; - } - type PipelineResult> = S extends (...args: any[]) => PromiseLike - ? Promise - : Promise; - /** - * ```js - * import { pipeline } from 'node:stream/promises'; - * import { createReadStream, createWriteStream } from 'node:fs'; - * import { createGzip } from 'node:zlib'; - * - * await pipeline( - * createReadStream('archive.tar'), - * createGzip(), - * createWriteStream('archive.tar.gz'), - * ); - * console.log('Pipeline succeeded.'); - * ``` - * - * To use an `AbortSignal`, pass it inside an options object, as the last argument. - * When the signal is aborted, `destroy` will be called on the underlying pipeline, - * with an `AbortError`. - * - * ```js - * import { pipeline } from 'node:stream/promises'; - * import { createReadStream, createWriteStream } from 'node:fs'; - * import { createGzip } from 'node:zlib'; - * - * const ac = new AbortController(); - * const { signal } = ac; - * setImmediate(() => ac.abort()); - * try { - * await pipeline( - * createReadStream('archive.tar'), - * createGzip(), - * createWriteStream('archive.tar.gz'), - * { signal }, - * ); - * } catch (err) { - * console.error(err); // AbortError - * } - * ``` - * - * The `pipeline` API also supports async generators: - * - * ```js - * import { pipeline } from 'node:stream/promises'; - * import { createReadStream, createWriteStream } from 'node:fs'; - * - * await pipeline( - * createReadStream('lowercase.txt'), - * async function* (source, { signal }) { - * source.setEncoding('utf8'); // Work with strings rather than `Buffer`s. - * for await (const chunk of source) { - * yield await processChunk(chunk, { signal }); - * } - * }, - * createWriteStream('uppercase.txt'), - * ); - * console.log('Pipeline succeeded.'); - * ``` - * - * Remember to handle the `signal` argument passed into the async generator. - * Especially in the case where the async generator is the source for the - * pipeline (i.e. first argument) or the pipeline will never complete. - * - * ```js - * import { pipeline } from 'node:stream/promises'; - * import fs from 'node:fs'; - * await pipeline( - * async function* ({ signal }) { - * await someLongRunningfn({ signal }); - * yield 'asd'; - * }, - * fs.createWriteStream('uppercase.txt'), - * ); - * console.log('Pipeline succeeded.'); - * ``` - * - * The `pipeline` API provides [callback version](https://nodejs.org/docs/latest-v25.x/api/stream.html#streampipelinesource-transforms-destination-callback): - * @since v15.0.0 - * @returns Fulfills when the pipeline is complete. - */ - function pipeline, B extends PipelineDestination>( - source: A, - destination: B, - options?: PipelineOptions, - ): PipelineResult; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - destination: B, - options?: PipelineOptions, - ): PipelineResult; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - destination: B, - options?: PipelineOptions, - ): PipelineResult; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - destination: B, - options?: PipelineOptions, - ): PipelineResult; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - T4 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - transform4: T4, - destination: B, - options?: PipelineOptions, - ): PipelineResult; - function pipeline( - streams: readonly [PipelineSource, ...PipelineTransform[], PipelineDestination], - options?: PipelineOptions, - ): Promise; - function pipeline( - ...streams: [PipelineSource, ...PipelineTransform[], PipelineDestination] - ): Promise; - function pipeline( - ...streams: [ - PipelineSource, - ...PipelineTransform[], - PipelineDestination, - options: PipelineOptions, - ] - ): Promise; -} -declare module "stream/promises" { - export * from "node:stream/promises"; -} diff --git a/node_modules/@types/node/stream/web.d.ts b/node_modules/@types/node/stream/web.d.ts deleted file mode 100644 index 84d3811..0000000 --- a/node_modules/@types/node/stream/web.d.ts +++ /dev/null @@ -1,300 +0,0 @@ -declare module "node:stream/web" { - import { TextDecoderCommon, TextDecoderOptions, TextEncoderCommon } from "node:util"; - type CompressionFormat = "brotli" | "deflate" | "deflate-raw" | "gzip"; - type ReadableStreamController = ReadableStreamDefaultController | ReadableByteStreamController; - type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; - type ReadableStreamReaderMode = "byob"; - type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; - type ReadableStreamType = "bytes"; - interface GenericTransformStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - interface QueuingStrategy { - highWaterMark?: number; - size?: QueuingStrategySize; - } - interface QueuingStrategyInit { - highWaterMark: number; - } - interface QueuingStrategySize { - (chunk: T): number; - } - interface ReadableStreamBYOBReaderReadOptions { - min?: number; - } - interface ReadableStreamGenericReader { - readonly closed: Promise; - cancel(reason?: any): Promise; - } - interface ReadableStreamGetReaderOptions { - mode?: ReadableStreamReaderMode; - } - interface ReadableStreamIteratorOptions { - preventCancel?: boolean; - } - interface ReadableStreamReadDoneResult { - done: true; - value: T | undefined; - } - interface ReadableStreamReadValueResult { - done: false; - value: T; - } - interface ReadableWritablePair { - readable: ReadableStream; - writable: WritableStream; - } - interface StreamPipeOptions { - preventAbort?: boolean; - preventCancel?: boolean; - preventClose?: boolean; - signal?: AbortSignal; - } - interface Transformer { - cancel?: TransformerCancelCallback; - flush?: TransformerFlushCallback; - readableType?: undefined; - start?: TransformerStartCallback; - transform?: TransformerTransformCallback; - writableType?: undefined; - } - interface TransformerCancelCallback { - (reason: any): void | PromiseLike; - } - interface TransformerFlushCallback { - (controller: TransformStreamDefaultController): void | PromiseLike; - } - interface TransformerStartCallback { - (controller: TransformStreamDefaultController): any; - } - interface TransformerTransformCallback { - (chunk: I, controller: TransformStreamDefaultController): void | PromiseLike; - } - interface UnderlyingByteSource { - autoAllocateChunkSize?: number; - cancel?: UnderlyingSourceCancelCallback; - pull?: (controller: ReadableByteStreamController) => void | PromiseLike; - start?: (controller: ReadableByteStreamController) => any; - type: "bytes"; - } - interface UnderlyingDefaultSource { - cancel?: UnderlyingSourceCancelCallback; - pull?: (controller: ReadableStreamDefaultController) => void | PromiseLike; - start?: (controller: ReadableStreamDefaultController) => any; - type?: undefined; - } - interface UnderlyingSink { - abort?: UnderlyingSinkAbortCallback; - close?: UnderlyingSinkCloseCallback; - start?: UnderlyingSinkStartCallback; - type?: undefined; - write?: UnderlyingSinkWriteCallback; - } - interface UnderlyingSinkAbortCallback { - (reason?: any): void | PromiseLike; - } - interface UnderlyingSinkCloseCallback { - (): void | PromiseLike; - } - interface UnderlyingSinkStartCallback { - (controller: WritableStreamDefaultController): any; - } - interface UnderlyingSinkWriteCallback { - (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike; - } - interface UnderlyingSource { - autoAllocateChunkSize?: number; - cancel?: UnderlyingSourceCancelCallback; - pull?: UnderlyingSourcePullCallback; - start?: UnderlyingSourceStartCallback; - type?: ReadableStreamType; - } - interface UnderlyingSourceCancelCallback { - (reason?: any): void | PromiseLike; - } - interface UnderlyingSourcePullCallback { - (controller: ReadableStreamController): void | PromiseLike; - } - interface UnderlyingSourceStartCallback { - (controller: ReadableStreamController): any; - } - interface ByteLengthQueuingStrategy extends QueuingStrategy { - readonly highWaterMark: number; - readonly size: QueuingStrategySize; - } - var ByteLengthQueuingStrategy: { - prototype: ByteLengthQueuingStrategy; - new(init: QueuingStrategyInit): ByteLengthQueuingStrategy; - }; - interface CompressionStream extends GenericTransformStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - var CompressionStream: { - prototype: CompressionStream; - new(format: CompressionFormat): CompressionStream; - }; - interface CountQueuingStrategy extends QueuingStrategy { - readonly highWaterMark: number; - readonly size: QueuingStrategySize; - } - var CountQueuingStrategy: { - prototype: CountQueuingStrategy; - new(init: QueuingStrategyInit): CountQueuingStrategy; - }; - interface DecompressionStream extends GenericTransformStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - var DecompressionStream: { - prototype: DecompressionStream; - new(format: CompressionFormat): DecompressionStream; - }; - interface ReadableByteStreamController { - readonly byobRequest: ReadableStreamBYOBRequest | null; - readonly desiredSize: number | null; - close(): void; - enqueue(chunk: NodeJS.NonSharedArrayBufferView): void; - error(e?: any): void; - } - var ReadableByteStreamController: { - prototype: ReadableByteStreamController; - new(): ReadableByteStreamController; - }; - interface ReadableStream { - readonly locked: boolean; - cancel(reason?: any): Promise; - getReader(options: { mode: "byob" }): ReadableStreamBYOBReader; - getReader(): ReadableStreamDefaultReader; - getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader; - pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; - pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; - tee(): [ReadableStream, ReadableStream]; - [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; - values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; - } - var ReadableStream: { - prototype: ReadableStream; - new( - underlyingSource: UnderlyingByteSource, - strategy?: { highWaterMark?: number }, - ): ReadableStream; - new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; - new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; - from(iterable: Iterable | AsyncIterable): ReadableStream; - }; - interface ReadableStreamAsyncIterator extends NodeJS.AsyncIterator { - [Symbol.asyncIterator](): ReadableStreamAsyncIterator; - } - interface ReadableStreamBYOBReader extends ReadableStreamGenericReader { - read( - view: T, - options?: ReadableStreamBYOBReaderReadOptions, - ): Promise>; - releaseLock(): void; - } - var ReadableStreamBYOBReader: { - prototype: ReadableStreamBYOBReader; - new(stream: ReadableStream): ReadableStreamBYOBReader; - }; - interface ReadableStreamBYOBRequest { - readonly view: NodeJS.NonSharedArrayBufferView | null; - respond(bytesWritten: number): void; - respondWithNewView(view: NodeJS.NonSharedArrayBufferView): void; - } - var ReadableStreamBYOBRequest: { - prototype: ReadableStreamBYOBRequest; - new(): ReadableStreamBYOBRequest; - }; - interface ReadableStreamDefaultController { - readonly desiredSize: number | null; - close(): void; - enqueue(chunk: R): void; - error(e?: any): void; - } - var ReadableStreamDefaultController: { - prototype: ReadableStreamDefaultController; - new(): ReadableStreamDefaultController; - }; - interface ReadableStreamDefaultReader extends ReadableStreamGenericReader { - read(): Promise>; - releaseLock(): void; - } - var ReadableStreamDefaultReader: { - prototype: ReadableStreamDefaultReader; - new(stream: ReadableStream): ReadableStreamDefaultReader; - }; - interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - var TextDecoderStream: { - prototype: TextDecoderStream; - new(label?: string, options?: TextDecoderOptions): TextDecoderStream; - }; - interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - var TextEncoderStream: { - prototype: TextEncoderStream; - new(): TextEncoderStream; - }; - interface TransformStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - var TransformStream: { - prototype: TransformStream; - new( - transformer?: Transformer, - writableStrategy?: QueuingStrategy, - readableStrategy?: QueuingStrategy, - ): TransformStream; - }; - interface TransformStreamDefaultController { - readonly desiredSize: number | null; - enqueue(chunk: O): void; - error(reason?: any): void; - terminate(): void; - } - var TransformStreamDefaultController: { - prototype: TransformStreamDefaultController; - new(): TransformStreamDefaultController; - }; - interface WritableStream { - readonly locked: boolean; - abort(reason?: any): Promise; - close(): Promise; - getWriter(): WritableStreamDefaultWriter; - } - var WritableStream: { - prototype: WritableStream; - new(underlyingSink?: UnderlyingSink, strategy?: QueuingStrategy): WritableStream; - }; - interface WritableStreamDefaultController { - readonly signal: AbortSignal; - error(e?: any): void; - } - var WritableStreamDefaultController: { - prototype: WritableStreamDefaultController; - new(): WritableStreamDefaultController; - }; - interface WritableStreamDefaultWriter { - readonly closed: Promise; - readonly desiredSize: number | null; - readonly ready: Promise; - abort(reason?: any): Promise; - close(): Promise; - releaseLock(): void; - write(chunk: W): Promise; - } - var WritableStreamDefaultWriter: { - prototype: WritableStreamDefaultWriter; - new(stream: WritableStream): WritableStreamDefaultWriter; - }; -} -declare module "stream/web" { - export * from "node:stream/web"; -} diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts deleted file mode 100644 index 568e3f6..0000000 --- a/node_modules/@types/node/string_decoder.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -declare module "node:string_decoder" { - class StringDecoder { - constructor(encoding?: BufferEncoding); - /** - * Returns a decoded string, ensuring that any incomplete multibyte characters at - * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the - * returned string and stored in an internal buffer for the next call to `stringDecoder.write()` or `stringDecoder.end()`. - * @since v0.1.99 - * @param buffer The bytes to decode. - */ - write(buffer: string | NodeJS.ArrayBufferView): string; - /** - * Returns any remaining input stored in the internal buffer as a string. Bytes - * representing incomplete UTF-8 and UTF-16 characters will be replaced with - * substitution characters appropriate for the character encoding. - * - * If the `buffer` argument is provided, one final call to `stringDecoder.write()` is performed before returning the remaining input. - * After `end()` is called, the `stringDecoder` object can be reused for new input. - * @since v0.9.3 - * @param buffer The bytes to decode. - */ - end(buffer?: string | NodeJS.ArrayBufferView): string; - } -} -declare module "string_decoder" { - export * from "node:string_decoder"; -} diff --git a/node_modules/@types/node/test.d.ts b/node_modules/@types/node/test.d.ts deleted file mode 100644 index 0ad8b60..0000000 --- a/node_modules/@types/node/test.d.ts +++ /dev/null @@ -1,2279 +0,0 @@ -declare module "node:test" { - import { AssertMethodNames, AssertPredicate } from "node:assert"; - import { Readable, ReadableEventMap } from "node:stream"; - import { TestEvent } from "node:test/reporters"; - import { URL } from "node:url"; - import TestFn = test.TestFn; - import TestOptions = test.TestOptions; - /** - * The `test()` function is the value imported from the `test` module. Each - * invocation of this function results in reporting the test to the `TestsStream`. - * - * The `TestContext` object passed to the `fn` argument can be used to perform - * actions related to the current test. Examples include skipping the test, adding - * additional diagnostic information, or creating subtests. - * - * `test()` returns a `Promise` that fulfills once the test completes. - * if `test()` is called within a suite, it fulfills immediately. - * The return value can usually be discarded for top level tests. - * However, the return value from subtests should be used to prevent the parent - * test from finishing first and cancelling the subtest - * as shown in the following example. - * - * ```js - * test('top level test', async (t) => { - * // The setTimeout() in the following subtest would cause it to outlive its - * // parent test if 'await' is removed on the next line. Once the parent test - * // completes, it will cancel any outstanding subtests. - * await t.test('longer running subtest', async (t) => { - * return new Promise((resolve, reject) => { - * setTimeout(resolve, 1000); - * }); - * }); - * }); - * ``` - * - * The `timeout` option can be used to fail the test if it takes longer than `timeout` milliseconds to complete. However, it is not a reliable mechanism for - * canceling tests because a running test might block the application thread and - * thus prevent the scheduled cancellation. - * @since v18.0.0, v16.17.0 - * @param name The name of the test, which is displayed when reporting test results. - * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. - * @param options Configuration options for the test. - * @param fn The function under test. The first argument to this function is a {@link TestContext} object. - * If the test uses callbacks, the callback function is passed as the second argument. - * @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within a suite. - */ - function test(name?: string, fn?: TestFn): Promise; - function test(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function test(options?: TestOptions, fn?: TestFn): Promise; - function test(fn?: TestFn): Promise; - namespace test { - export { test }; - export { suite as describe, test as it }; - } - namespace test { - /** - * **Note:** `shard` is used to horizontally parallelize test running across - * machines or processes, ideal for large-scale executions across varied - * environments. It's incompatible with `watch` mode, tailored for rapid - * code iteration by automatically rerunning tests on file changes. - * - * ```js - * import { tap } from 'node:test/reporters'; - * import { run } from 'node:test'; - * import process from 'node:process'; - * import path from 'node:path'; - * - * run({ files: [path.resolve('./tests/test.js')] }) - * .compose(tap) - * .pipe(process.stdout); - * ``` - * @since v18.9.0, v16.19.0 - * @param options Configuration options for running tests. - */ - function run(options?: RunOptions): TestsStream; - /** - * The `suite()` function is imported from the `node:test` module. - * @param name The name of the suite, which is displayed when reporting test results. - * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. - * @param options Configuration options for the suite. This supports the same options as {@link test}. - * @param fn The suite function declaring nested tests and suites. The first argument to this function is a {@link SuiteContext} object. - * @return Immediately fulfilled with `undefined`. - * @since v20.13.0 - */ - function suite(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function suite(name?: string, fn?: SuiteFn): Promise; - function suite(options?: TestOptions, fn?: SuiteFn): Promise; - function suite(fn?: SuiteFn): Promise; - namespace suite { - /** - * Shorthand for skipping a suite. This is the same as calling {@link suite} with `options.skip` set to `true`. - * @since v20.13.0 - */ - function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function skip(name?: string, fn?: SuiteFn): Promise; - function skip(options?: TestOptions, fn?: SuiteFn): Promise; - function skip(fn?: SuiteFn): Promise; - /** - * Shorthand for marking a suite as `TODO`. This is the same as calling {@link suite} with `options.todo` set to `true`. - * @since v20.13.0 - */ - function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function todo(name?: string, fn?: SuiteFn): Promise; - function todo(options?: TestOptions, fn?: SuiteFn): Promise; - function todo(fn?: SuiteFn): Promise; - /** - * Shorthand for marking a suite as `only`. This is the same as calling {@link suite} with `options.only` set to `true`. - * @since v20.13.0 - */ - function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function only(name?: string, fn?: SuiteFn): Promise; - function only(options?: TestOptions, fn?: SuiteFn): Promise; - function only(fn?: SuiteFn): Promise; - /** - * This flips the pass/fail reporting for a specific test or suite: a flagged test - * case must throw in order to pass, and a flagged test case that does not throw - * fails. - * @since v25.5.0 - */ - function expectFailure(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function expectFailure(name?: string, fn?: SuiteFn): Promise; - function expectFailure(options?: TestOptions, fn?: SuiteFn): Promise; - function expectFailure(fn?: SuiteFn): Promise; - } - /** - * Shorthand for skipping a test. This is the same as calling {@link test} with `options.skip` set to `true`. - * @since v20.2.0 - */ - function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function skip(name?: string, fn?: TestFn): Promise; - function skip(options?: TestOptions, fn?: TestFn): Promise; - function skip(fn?: TestFn): Promise; - /** - * Shorthand for marking a test as `TODO`. This is the same as calling {@link test} with `options.todo` set to `true`. - * @since v20.2.0 - */ - function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function todo(name?: string, fn?: TestFn): Promise; - function todo(options?: TestOptions, fn?: TestFn): Promise; - function todo(fn?: TestFn): Promise; - /** - * Shorthand for marking a test as `only`. This is the same as calling {@link test} with `options.only` set to `true`. - * @since v20.2.0 - */ - function only(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function only(name?: string, fn?: TestFn): Promise; - function only(options?: TestOptions, fn?: TestFn): Promise; - function only(fn?: TestFn): Promise; - // added in v25.5.0, undocumented - function expectFailure(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function expectFailure(name?: string, fn?: TestFn): Promise; - function expectFailure(options?: TestOptions, fn?: TestFn): Promise; - function expectFailure(fn?: TestFn): Promise; - /** - * The type of a function passed to {@link test}. The first argument to this function is a {@link TestContext} object. - * If the test uses callbacks, the callback function is passed as the second argument. - */ - type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise; - /** - * The type of a suite test function. The argument to this function is a {@link SuiteContext} object. - */ - type SuiteFn = (s: SuiteContext) => void | Promise; - interface TestShard { - /** - * A positive integer between 1 and `total` that specifies the index of the shard to run. - */ - index: number; - /** - * A positive integer that specifies the total number of shards to split the test files to. - */ - total: number; - } - interface RunOptions { - /** - * If a number is provided, then that many tests would run asynchronously (they are still managed by the single-threaded event loop). - * If `true`, it would run `os.availableParallelism() - 1` test files in parallel. If `false`, it would only run one test file at a time. - * @default false - */ - concurrency?: number | boolean | undefined; - /** - * Specifies the current working directory to be used by the test runner. - * Serves as the base path for resolving files according to the - * [test runner execution model](https://nodejs.org/docs/latest-v25.x/api/test.html#test-runner-execution-model). - * @since v23.0.0 - * @default process.cwd() - */ - cwd?: string | undefined; - /** - * An array containing the list of files to run. If omitted, files are run according to the - * [test runner execution model](https://nodejs.org/docs/latest-v25.x/api/test.html#test-runner-execution-model). - */ - files?: readonly string[] | undefined; - /** - * Configures the test runner to exit the process once all known - * tests have finished executing even if the event loop would - * otherwise remain active. - * @default false - */ - forceExit?: boolean | undefined; - /** - * An array containing the list of glob patterns to match test files. - * This option cannot be used together with `files`. If omitted, files are run according to the - * [test runner execution model](https://nodejs.org/docs/latest-v25.x/api/test.html#test-runner-execution-model). - * @since v22.6.0 - */ - globPatterns?: readonly string[] | undefined; - /** - * Sets inspector port of test child process. - * This can be a number, or a function that takes no arguments and returns a - * number. If a nullish value is provided, each process gets its own port, - * incremented from the primary's `process.debugPort`. This option is ignored - * if the `isolation` option is set to `'none'` as no child processes are - * spawned. - * @default undefined - */ - inspectPort?: number | (() => number) | undefined; - /** - * Configures the type of test isolation. If set to - * `'process'`, each test file is run in a separate child process. If set to - * `'none'`, all test files run in the current process. - * @default 'process' - * @since v22.8.0 - */ - isolation?: "process" | "none" | undefined; - /** - * If truthy, the test context will only run tests that have the `only` option set - */ - only?: boolean | undefined; - /** - * A function that accepts the `TestsStream` instance and can be used to setup listeners before any tests are run. - * @default undefined - */ - setup?: ((reporter: TestsStream) => void | Promise) | undefined; - /** - * An array of CLI flags to pass to the `node` executable when - * spawning the subprocesses. This option has no effect when `isolation` is `'none`'. - * @since v22.10.0 - * @default [] - */ - execArgv?: readonly string[] | undefined; - /** - * An array of CLI flags to pass to each test file when spawning the - * subprocesses. This option has no effect when `isolation` is `'none'`. - * @since v22.10.0 - * @default [] - */ - argv?: readonly string[] | undefined; - /** - * Allows aborting an in-progress test execution. - */ - signal?: AbortSignal | undefined; - /** - * If provided, only run tests whose name matches the provided pattern. - * Strings are interpreted as JavaScript regular expressions. - * @default undefined - */ - testNamePatterns?: string | RegExp | ReadonlyArray | undefined; - /** - * A String, RegExp or a RegExp Array, that can be used to exclude running tests whose - * name matches the provided pattern. Test name patterns are interpreted as JavaScript - * regular expressions. For each test that is executed, any corresponding test hooks, - * such as `beforeEach()`, are also run. - * @default undefined - * @since v22.1.0 - */ - testSkipPatterns?: string | RegExp | ReadonlyArray | undefined; - /** - * The number of milliseconds after which the test execution will fail. - * If unspecified, subtests inherit this value from their parent. - * @default Infinity - */ - timeout?: number | undefined; - /** - * Whether to run in watch mode or not. - * @default false - */ - watch?: boolean | undefined; - /** - * Running tests in a specific shard. - * @default undefined - */ - shard?: TestShard | undefined; - /** - * A file path where the test runner will - * store the state of the tests to allow rerunning only the failed tests on a next run. - * @since v24.7.0 - * @default undefined - */ - rerunFailuresFilePath?: string | undefined; - /** - * enable [code coverage](https://nodejs.org/docs/latest-v25.x/api/test.html#collecting-code-coverage) collection. - * @since v22.10.0 - * @default false - */ - coverage?: boolean | undefined; - /** - * Excludes specific files from code coverage - * using a glob pattern, which can match both absolute and relative file paths. - * This property is only applicable when `coverage` was set to `true`. - * If both `coverageExcludeGlobs` and `coverageIncludeGlobs` are provided, - * files must meet **both** criteria to be included in the coverage report. - * @since v22.10.0 - * @default undefined - */ - coverageExcludeGlobs?: string | readonly string[] | undefined; - /** - * Includes specific files in code coverage - * using a glob pattern, which can match both absolute and relative file paths. - * This property is only applicable when `coverage` was set to `true`. - * If both `coverageExcludeGlobs` and `coverageIncludeGlobs` are provided, - * files must meet **both** criteria to be included in the coverage report. - * @since v22.10.0 - * @default undefined - */ - coverageIncludeGlobs?: string | readonly string[] | undefined; - /** - * Require a minimum percent of covered lines. If code - * coverage does not reach the threshold specified, the process will exit with code `1`. - * @since v22.10.0 - * @default 0 - */ - lineCoverage?: number | undefined; - /** - * Require a minimum percent of covered branches. If code - * coverage does not reach the threshold specified, the process will exit with code `1`. - * @since v22.10.0 - * @default 0 - */ - branchCoverage?: number | undefined; - /** - * Require a minimum percent of covered functions. If code - * coverage does not reach the threshold specified, the process will exit with code `1`. - * @since v22.10.0 - * @default 0 - */ - functionCoverage?: number | undefined; - /** - * Specify environment variables to be passed along to the test process. - * This options is not compatible with `isolation='none'`. These variables will override - * those from the main process, and are not merged with `process.env`. - * @since v25.6.0 - * @default process.env - */ - env?: NodeJS.ProcessEnv | undefined; - } - interface TestsStreamEventMap extends ReadableEventMap { - "data": [data: TestEvent]; - "test:coverage": [data: EventData.TestCoverage]; - "test:complete": [data: EventData.TestComplete]; - "test:dequeue": [data: EventData.TestDequeue]; - "test:diagnostic": [data: EventData.TestDiagnostic]; - "test:enqueue": [data: EventData.TestEnqueue]; - "test:fail": [data: EventData.TestFail]; - "test:interrupted": [data: EventData.TestInterrupted]; - "test:pass": [data: EventData.TestPass]; - "test:plan": [data: EventData.TestPlan]; - "test:start": [data: EventData.TestStart]; - "test:stderr": [data: EventData.TestStderr]; - "test:stdout": [data: EventData.TestStdout]; - "test:summary": [data: EventData.TestSummary]; - "test:watch:drained": []; - "test:watch:restarted": []; - } - /** - * A successful call to `run()` will return a new `TestsStream` object, streaming a series of events representing the execution of the tests. - * - * Some of the events are guaranteed to be emitted in the same order as the tests are defined, while others are emitted in the order that the tests execute. - * @since v18.9.0, v16.19.0 - */ - interface TestsStream extends Readable { - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: TestsStreamEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: TestsStreamEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: TestsStreamEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: TestsStreamEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: TestsStreamEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: TestsStreamEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: TestsStreamEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: TestsStreamEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: TestsStreamEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: TestsStreamEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: TestsStreamEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - namespace EventData { - interface Error extends globalThis.Error { - cause: unknown; - } - interface LocationInfo { - /** - * The column number where the test is defined, or - * `undefined` if the test was run through the REPL. - */ - column?: number; - /** - * The path of the test file, `undefined` if test was run through the REPL. - */ - file?: string; - /** - * The line number where the test is defined, or `undefined` if the test was run through the REPL. - */ - line?: number; - } - interface TestDiagnostic extends LocationInfo { - /** - * The diagnostic message. - */ - message: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The severity level of the diagnostic message. - * Possible values are: - * * `'info'`: Informational messages. - * * `'warn'`: Warnings. - * * `'error'`: Errors. - */ - level: "info" | "warn" | "error"; - } - interface TestCoverage { - /** - * An object containing the coverage report. - */ - summary: { - /** - * An array of coverage reports for individual files. - */ - files: Array<{ - /** - * The absolute path of the file. - */ - path: string; - /** - * The total number of lines. - */ - totalLineCount: number; - /** - * The total number of branches. - */ - totalBranchCount: number; - /** - * The total number of functions. - */ - totalFunctionCount: number; - /** - * The number of covered lines. - */ - coveredLineCount: number; - /** - * The number of covered branches. - */ - coveredBranchCount: number; - /** - * The number of covered functions. - */ - coveredFunctionCount: number; - /** - * The percentage of lines covered. - */ - coveredLinePercent: number; - /** - * The percentage of branches covered. - */ - coveredBranchPercent: number; - /** - * The percentage of functions covered. - */ - coveredFunctionPercent: number; - /** - * An array of functions representing function coverage. - */ - functions: Array<{ - /** - * The name of the function. - */ - name: string; - /** - * The line number where the function is defined. - */ - line: number; - /** - * The number of times the function was called. - */ - count: number; - }>; - /** - * An array of branches representing branch coverage. - */ - branches: Array<{ - /** - * The line number where the branch is defined. - */ - line: number; - /** - * The number of times the branch was taken. - */ - count: number; - }>; - /** - * An array of lines representing line numbers and the number of times they were covered. - */ - lines: Array<{ - /** - * The line number. - */ - line: number; - /** - * The number of times the line was covered. - */ - count: number; - }>; - }>; - /** - * An object containing whether or not the coverage for - * each coverage type. - * @since v22.9.0 - */ - thresholds: { - /** - * The function coverage threshold. - */ - function: number; - /** - * The branch coverage threshold. - */ - branch: number; - /** - * The line coverage threshold. - */ - line: number; - }; - /** - * An object containing a summary of coverage for all files. - */ - totals: { - /** - * The total number of lines. - */ - totalLineCount: number; - /** - * The total number of branches. - */ - totalBranchCount: number; - /** - * The total number of functions. - */ - totalFunctionCount: number; - /** - * The number of covered lines. - */ - coveredLineCount: number; - /** - * The number of covered branches. - */ - coveredBranchCount: number; - /** - * The number of covered functions. - */ - coveredFunctionCount: number; - /** - * The percentage of lines covered. - */ - coveredLinePercent: number; - /** - * The percentage of branches covered. - */ - coveredBranchPercent: number; - /** - * The percentage of functions covered. - */ - coveredFunctionPercent: number; - }; - /** - * The working directory when code coverage began. This - * is useful for displaying relative path names in case - * the tests changed the working directory of the Node.js process. - */ - workingDirectory: string; - }; - /** - * The nesting level of the test. - */ - nesting: number; - } - interface TestComplete extends LocationInfo { - /** - * Additional execution metadata. - */ - details: { - /** - * Whether the test passed or not. - */ - passed: boolean; - /** - * The duration of the test in milliseconds. - */ - duration_ms: number; - /** - * An error wrapping the error thrown by the test if it did not pass. - */ - error?: Error; - /** - * The type of the test, used to denote whether this is a suite. - */ - type?: "suite" | "test"; - }; - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The ordinal number of the test. - */ - testNumber: number; - /** - * Present if `context.todo` is called. - */ - todo?: string | boolean; - /** - * Present if `context.skip` is called. - */ - skip?: string | boolean; - } - interface TestDequeue extends LocationInfo { - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The test type. Either `'suite'` or `'test'`. - * @since v22.15.0 - */ - type: "suite" | "test"; - } - interface TestEnqueue extends LocationInfo { - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The test type. Either `'suite'` or `'test'`. - * @since v22.15.0 - */ - type: "suite" | "test"; - } - interface TestFail extends LocationInfo { - /** - * Additional execution metadata. - */ - details: { - /** - * The duration of the test in milliseconds. - */ - duration_ms: number; - /** - * An error wrapping the error thrown by the test. - */ - error: Error; - /** - * The type of the test, used to denote whether this is a suite. - * @since v20.0.0, v19.9.0, v18.17.0 - */ - type?: "suite" | "test"; - /** - * The attempt number of the test run, - * present only when using the `--test-rerun-failures` flag. - * @since v24.7.0 - */ - attempt?: number; - }; - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The ordinal number of the test. - */ - testNumber: number; - /** - * Present if `context.todo` is called. - */ - todo?: string | boolean; - /** - * Present if `context.skip` is called. - */ - skip?: string | boolean; - } - interface TestInterrupted { - /** - * An array of objects containing information about the - * interrupted tests. - */ - tests: TestStart[]; - } - interface TestPass extends LocationInfo { - /** - * Additional execution metadata. - */ - details: { - /** - * The duration of the test in milliseconds. - */ - duration_ms: number; - /** - * The type of the test, used to denote whether this is a suite. - * @since 20.0.0, 19.9.0, 18.17.0 - */ - type?: "suite" | "test"; - /** - * The attempt number of the test run, - * present only when using the `--test-rerun-failures` flag. - * @since v24.7.0 - */ - attempt?: number; - /** - * The attempt number the test passed on, - * present only when using the `--test-rerun-failures` flag. - * @since v24.7.0 - */ - passed_on_attempt?: number; - }; - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The ordinal number of the test. - */ - testNumber: number; - /** - * Present if `context.todo` is called. - */ - todo?: string | boolean; - /** - * Present if `context.skip` is called. - */ - skip?: string | boolean; - } - interface TestPlan extends LocationInfo { - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The number of subtests that have ran. - */ - count: number; - } - interface TestStart extends LocationInfo { - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - } - interface TestStderr { - /** - * The path of the test file. - */ - file: string; - /** - * The message written to `stderr`. - */ - message: string; - } - interface TestStdout { - /** - * The path of the test file. - */ - file: string; - /** - * The message written to `stdout`. - */ - message: string; - } - interface TestSummary { - /** - * An object containing the counts of various test results. - */ - counts: { - /** - * The total number of cancelled tests. - */ - cancelled: number; - /** - * The total number of passed tests. - */ - passed: number; - /** - * The total number of skipped tests. - */ - skipped: number; - /** - * The total number of suites run. - */ - suites: number; - /** - * The total number of tests run, excluding suites. - */ - tests: number; - /** - * The total number of TODO tests. - */ - todo: number; - /** - * The total number of top level tests and suites. - */ - topLevel: number; - }; - /** - * The duration of the test run in milliseconds. - */ - duration_ms: number; - /** - * The path of the test file that generated the - * summary. If the summary corresponds to multiple files, this value is - * `undefined`. - */ - file: string | undefined; - /** - * Indicates whether or not the test run is considered - * successful or not. If any error condition occurs, such as a failing test or - * unmet coverage threshold, this value will be set to `false`. - */ - success: boolean; - } - } - /** - * An instance of `TestContext` is passed to each test function in order to - * interact with the test runner. However, the `TestContext` constructor is not - * exposed as part of the API. - * @since v18.0.0, v16.17.0 - */ - interface TestContext { - /** - * An object containing assertion methods bound to the test context. - * The top-level functions from the `node:assert` module are exposed here for the purpose of creating test plans. - * - * **Note:** Some of the functions from `node:assert` contain type assertions. If these are called via the - * TestContext `assert` object, then the context parameter in the test's function signature **must be explicitly typed** - * (ie. the parameter must have a type annotation), otherwise an error will be raised by the TypeScript compiler: - * ```ts - * import { test, type TestContext } from 'node:test'; - * - * // The test function's context parameter must have a type annotation. - * test('example', (t: TestContext) => { - * t.assert.deepStrictEqual(actual, expected); - * }); - * - * // Omitting the type annotation will result in a compilation error. - * test('example', t => { - * t.assert.deepStrictEqual(actual, expected); // Error: 't' needs an explicit type annotation. - * }); - * ``` - * @since v22.2.0, v20.15.0 - */ - readonly assert: TestContextAssert; - /** - * This function is used to create a hook running before subtest of the current test. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v20.1.0, v18.17.0 - */ - before(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to create a hook running before each subtest of the current test. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v18.8.0 - */ - beforeEach(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to create a hook that runs after the current test finishes. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v18.13.0 - */ - after(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to create a hook running after each subtest of the current test. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v18.8.0 - */ - afterEach(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to write diagnostics to the output. Any diagnostic - * information is included at the end of the test's results. This function does - * not return a value. - * - * ```js - * test('top level test', (t) => { - * t.diagnostic('A diagnostic message'); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param message Message to be reported. - */ - diagnostic(message: string): void; - /** - * The absolute path of the test file that created the current test. If a test file imports - * additional modules that generate tests, the imported tests will return the path of the root test file. - * @since v22.6.0 - */ - readonly filePath: string | undefined; - /** - * The name of the test and each of its ancestors, separated by `>`. - * @since v22.3.0 - */ - readonly fullName: string; - /** - * The name of the test. - * @since v18.8.0, v16.18.0 - */ - readonly name: string; - /** - * Indicated whether the test succeeded. - * @since v21.7.0, v20.12.0 - */ - readonly passed: boolean; - /** - * The failure reason for the test/case; wrapped and available via `context.error.cause`. - * @since v21.7.0, v20.12.0 - */ - readonly error: EventData.Error | null; - /** - * Number of times the test has been attempted. - * @since v21.7.0, v20.12.0 - */ - readonly attempt: number; - /** - * The unique identifier of the worker running the current test file. This value is - * derived from the `NODE_TEST_WORKER_ID` environment variable. When running tests - * with `--test-isolation=process` (the default), each test file runs in a separate - * child process and is assigned a worker ID from 1 to N, where N is the number of - * concurrent workers. When running with `--test-isolation=none`, all tests run in - * the same process and the worker ID is always 1. This value is `undefined` when - * not running in a test context. - * - * This property is useful for splitting resources (like database connections or - * server ports) across concurrent test files: - * - * ```js - * import { test } from 'node:test'; - * import { process } from 'node:process'; - * - * test('database operations', async (t) => { - * // Worker ID is available via context - * console.log(`Running in worker ${t.workerId}`); - * - * // Or via environment variable (available at import time) - * const workerId = process.env.NODE_TEST_WORKER_ID; - * // Use workerId to allocate separate resources per worker - * }); - * ``` - * @since v25.8.0 - */ - readonly workerId: number | undefined; - /** - * This function is used to set the number of assertions and subtests that are expected to run - * within the test. If the number of assertions and subtests that run does not match the - * expected count, the test will fail. - * - * > Note: To make sure assertions are tracked, `t.assert` must be used instead of `assert` directly. - * - * ```js - * test('top level test', (t) => { - * t.plan(2); - * t.assert.ok('some relevant assertion here'); - * t.test('subtest', () => {}); - * }); - * ``` - * - * When working with asynchronous code, the `plan` function can be used to ensure that the - * correct number of assertions are run: - * - * ```js - * test('planning with streams', (t, done) => { - * function* generate() { - * yield 'a'; - * yield 'b'; - * yield 'c'; - * } - * const expected = ['a', 'b', 'c']; - * t.plan(expected.length); - * const stream = Readable.from(generate()); - * stream.on('data', (chunk) => { - * t.assert.strictEqual(chunk, expected.shift()); - * }); - * - * stream.on('end', () => { - * done(); - * }); - * }); - * ``` - * - * When using the `wait` option, you can control how long the test will wait for the expected assertions. - * For example, setting a maximum wait time ensures that the test will wait for asynchronous assertions - * to complete within the specified timeframe: - * - * ```js - * test('plan with wait: 2000 waits for async assertions', (t) => { - * t.plan(1, { wait: 2000 }); // Waits for up to 2 seconds for the assertion to complete. - * - * const asyncActivity = () => { - * setTimeout(() => { - * * t.assert.ok(true, 'Async assertion completed within the wait time'); - * }, 1000); // Completes after 1 second, within the 2-second wait time. - * }; - * - * asyncActivity(); // The test will pass because the assertion is completed in time. - * }); - * ``` - * - * Note: If a `wait` timeout is specified, it begins counting down only after the test function finishes executing. - * @since v22.2.0 - */ - plan(count: number, options?: TestContextPlanOptions): void; - /** - * If `shouldRunOnlyTests` is truthy, the test context will only run tests that - * have the `only` option set. Otherwise, all tests are run. If Node.js was not - * started with the `--test-only` command-line option, this function is a - * no-op. - * - * ```js - * test('top level test', (t) => { - * // The test context can be set to run subtests with the 'only' option. - * t.runOnly(true); - * return Promise.all([ - * t.test('this subtest is now skipped'), - * t.test('this subtest is run', { only: true }), - * ]); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param shouldRunOnlyTests Whether or not to run `only` tests. - */ - runOnly(shouldRunOnlyTests: boolean): void; - /** - * ```js - * test('top level test', async (t) => { - * await fetch('some/uri', { signal: t.signal }); - * }); - * ``` - * @since v18.7.0, v16.17.0 - */ - readonly signal: AbortSignal; - /** - * This function causes the test's output to indicate the test as skipped. If `message` is provided, it is included in the output. Calling `skip()` does - * not terminate execution of the test function. This function does not return a - * value. - * - * ```js - * test('top level test', (t) => { - * // Make sure to return here as well if the test contains additional logic. - * t.skip('this is skipped'); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param message Optional skip message. - */ - skip(message?: string): void; - /** - * This function adds a `TODO` directive to the test's output. If `message` is - * provided, it is included in the output. Calling `todo()` does not terminate - * execution of the test function. This function does not return a value. - * - * ```js - * test('top level test', (t) => { - * // This test is marked as `TODO` - * t.todo('this is a todo'); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param message Optional `TODO` message. - */ - todo(message?: string): void; - /** - * This function is used to create subtests under the current test. This function behaves in - * the same fashion as the top level {@link test} function. - * @since v18.0.0 - * @param name The name of the test, which is displayed when reporting test results. - * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. - * @param options Configuration options for the test. - * @param fn The function under test. This first argument to this function is a {@link TestContext} object. - * If the test uses callbacks, the callback function is passed as the second argument. - * @returns A {@link Promise} resolved with `undefined` once the test completes. - */ - test: typeof test; - /** - * This method polls a `condition` function until that function either returns - * successfully or the operation times out. - * @since v22.14.0 - * @param condition An assertion function that is invoked - * periodically until it completes successfully or the defined polling timeout - * elapses. Successful completion is defined as not throwing or rejecting. This - * function does not accept any arguments, and is allowed to return any value. - * @param options An optional configuration object for the polling operation. - * @returns Fulfilled with the value returned by `condition`. - */ - waitFor(condition: () => T, options?: TestContextWaitForOptions): Promise>; - /** - * Each test provides its own MockTracker instance. - */ - readonly mock: MockTracker; - } - interface TestContextAssert extends Pick { - /** - * This function serializes `value` and writes it to the file specified by `path`. - * - * ```js - * test('snapshot test with default serialization', (t) => { - * t.assert.fileSnapshot({ value1: 1, value2: 2 }, './snapshots/snapshot.json'); - * }); - * ``` - * - * This function differs from `context.assert.snapshot()` in the following ways: - * - * * The snapshot file path is explicitly provided by the user. - * * Each snapshot file is limited to a single snapshot value. - * * No additional escaping is performed by the test runner. - * - * These differences allow snapshot files to better support features such as syntax - * highlighting. - * @since v22.14.0 - * @param value A value to serialize to a string. If Node.js was started with - * the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--test-update-snapshots) - * flag, the serialized value is written to - * `path`. Otherwise, the serialized value is compared to the contents of the - * existing snapshot file. - * @param path The file where the serialized `value` is written. - * @param options Optional configuration options. - */ - fileSnapshot(value: any, path: string, options?: AssertSnapshotOptions): void; - /** - * This function implements assertions for snapshot testing. - * ```js - * test('snapshot test with default serialization', (t) => { - * t.assert.snapshot({ value1: 1, value2: 2 }); - * }); - * - * test('snapshot test with custom serialization', (t) => { - * t.assert.snapshot({ value3: 3, value4: 4 }, { - * serializers: [(value) => JSON.stringify(value)] - * }); - * }); - * ``` - * @since v22.3.0 - * @param value A value to serialize to a string. If Node.js was started with - * the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--test-update-snapshots) - * flag, the serialized value is written to - * the snapshot file. Otherwise, the serialized value is compared to the - * corresponding value in the existing snapshot file. - */ - snapshot(value: any, options?: AssertSnapshotOptions): void; - /** - * A custom assertion function registered with `assert.register()`. - */ - [name: string]: (...args: any[]) => void; - } - interface AssertSnapshotOptions { - /** - * An array of synchronous functions used to serialize `value` into a string. - * `value` is passed as the only argument to the first serializer function. - * The return value of each serializer is passed as input to the next serializer. - * Once all serializers have run, the resulting value is coerced to a string. - * - * If no serializers are provided, the test runner's default serializers are used. - */ - serializers?: ReadonlyArray<(value: any) => any> | undefined; - } - interface TestContextPlanOptions { - /** - * The wait time for the plan: - * * If `true`, the plan waits indefinitely for all assertions and subtests to run. - * * If `false`, the plan performs an immediate check after the test function completes, - * without waiting for any pending assertions or subtests. - * Any assertions or subtests that complete after this check will not be counted towards the plan. - * * If a number, it specifies the maximum wait time in milliseconds - * before timing out while waiting for expected assertions and subtests to be matched. - * If the timeout is reached, the test will fail. - * @default false - */ - wait?: boolean | number | undefined; - } - interface TestContextWaitForOptions { - /** - * The number of milliseconds to wait after an unsuccessful - * invocation of `condition` before trying again. - * @default 50 - */ - interval?: number | undefined; - /** - * The poll timeout in milliseconds. If `condition` has not - * succeeded by the time this elapses, an error occurs. - * @default 1000 - */ - timeout?: number | undefined; - } - /** - * An instance of `SuiteContext` is passed to each suite function in order to - * interact with the test runner. However, the `SuiteContext` constructor is not - * exposed as part of the API. - * @since v18.7.0, v16.17.0 - */ - interface SuiteContext { - /** - * The absolute path of the test file that created the current suite. If a test file imports - * additional modules that generate suites, the imported suites will return the path of the root test file. - * @since v22.6.0 - */ - readonly filePath: string | undefined; - /** - * The name of the suite and each of its ancestors, separated by `>`. - * @since v22.3.0, v20.16.0 - */ - readonly fullName: string; - /** - * The name of the suite. - * @since v18.8.0, v16.18.0 - */ - readonly name: string; - /** - * Can be used to abort test subtasks when the test has been aborted. - * @since v18.7.0, v16.17.0 - */ - readonly signal: AbortSignal; - } - interface TestOptions { - /** - * If a number is provided, then that many tests would run in parallel. - * If truthy, it would run (number of cpu cores - 1) tests in parallel. - * For subtests, it will be `Infinity` tests in parallel. - * If falsy, it would only run one test at a time. - * If unspecified, subtests inherit this value from their parent. - * @default false - */ - concurrency?: number | boolean | undefined; - /** - * If truthy, the test is expected to fail. If a non-empty string is provided, that string is displayed - * in the test results as the reason why the test is expected to fail. If a - * `RegExp`, `Function`, `Object`, or `Error` is provided directly (without wrapping in `{ match: … }`), the test passes - * only if the thrown error matches, following the behavior of - * `assert.throws`. To provide both a reason and validation, pass an object - * with `label` (string) and `match` (RegExp, Function, Object, or Error). - * @since v25.5.0 - * @default false - */ - expectFailure?: boolean | string | AssertPredicate | undefined; - /** - * If truthy, and the test context is configured to run `only` tests, then this test will be - * run. Otherwise, the test is skipped. - * @default false - */ - only?: boolean | undefined; - /** - * Allows aborting an in-progress test. - * @since v18.8.0 - */ - signal?: AbortSignal | undefined; - /** - * If truthy, the test is skipped. If a string is provided, that string is displayed in the - * test results as the reason for skipping the test. - * @default false - */ - skip?: boolean | string | undefined; - /** - * A number of milliseconds the test will fail after. If unspecified, subtests inherit this - * value from their parent. - * @default Infinity - * @since v18.7.0 - */ - timeout?: number | undefined; - /** - * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in - * the test results as the reason why the test is `TODO`. - * @default false - */ - todo?: boolean | string | undefined; - /** - * The number of assertions and subtests expected to be run in the test. - * If the number of assertions run in the test does not match the number - * specified in the plan, the test will fail. - * @default undefined - * @since v22.2.0 - */ - plan?: number | undefined; - } - /** - * This function creates a hook that runs before executing a suite. - * - * ```js - * describe('tests', async () => { - * before(() => console.log('about to run some test')); - * it('is a subtest', () => { - * // Some relevant assertion here - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function before(fn?: HookFn, options?: HookOptions): void; - /** - * This function creates a hook that runs after executing a suite. - * - * ```js - * describe('tests', async () => { - * after(() => console.log('finished running tests')); - * it('is a subtest', () => { - * // Some relevant assertion here - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function after(fn?: HookFn, options?: HookOptions): void; - /** - * This function creates a hook that runs before each test in the current suite. - * - * ```js - * describe('tests', async () => { - * beforeEach(() => console.log('about to run a test')); - * it('is a subtest', () => { - * // Some relevant assertion here - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function beforeEach(fn?: HookFn, options?: HookOptions): void; - /** - * This function creates a hook that runs after each test in the current suite. - * The `afterEach()` hook is run even if the test fails. - * - * ```js - * describe('tests', async () => { - * afterEach(() => console.log('finished running a test')); - * it('is a subtest', () => { - * // Some relevant assertion here - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function afterEach(fn?: HookFn, options?: HookOptions): void; - /** - * The hook function. The first argument is the context in which the hook is called. - * If the hook uses callbacks, the callback function is passed as the second argument. - */ - type HookFn = (c: TestContext | SuiteContext, done: (result?: any) => void) => any; - /** - * The hook function. The first argument is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - */ - type TestContextHookFn = (t: TestContext, done: (result?: any) => void) => any; - /** - * Configuration options for hooks. - * @since v18.8.0 - */ - interface HookOptions { - /** - * Allows aborting an in-progress hook. - */ - signal?: AbortSignal | undefined; - /** - * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this - * value from their parent. - * @default Infinity - */ - timeout?: number | undefined; - } - interface MockFunctionOptions { - /** - * The number of times that the mock will use the behavior of `implementation`. - * Once the mock function has been called `times` times, - * it will automatically restore the behavior of `original`. - * This value must be an integer greater than zero. - * @default Infinity - */ - times?: number | undefined; - } - interface MockMethodOptions extends MockFunctionOptions { - /** - * If `true`, `object[methodName]` is treated as a getter. - * This option cannot be used with the `setter` option. - */ - getter?: boolean | undefined; - /** - * If `true`, `object[methodName]` is treated as a setter. - * This option cannot be used with the `getter` option. - */ - setter?: boolean | undefined; - } - type Mock = F & { - mock: MockFunctionContext; - }; - interface MockModuleOptions { - /** - * If false, each call to `require()` or `import()` generates a new mock module. - * If true, subsequent calls will return the same module mock, and the mock module is inserted into the CommonJS cache. - * @default false - */ - cache?: boolean | undefined; - /** - * Optional mocked exports. The `default` property, if - * provided, is used as the mocked module's default export. All other own - * enumerable properties are used as named exports. - * **This option cannot be used with `defaultExport` or `namedExports`.** - * * If the mock is a CommonJS or builtin module, `exports.default` is used as - * the value of `module.exports`. - * * If `exports.default` is not provided for a CommonJS or builtin mock, - * `module.exports` defaults to an empty object. - * * If named exports are provided with a non-object default export, the mock - * throws an exception when used as a CommonJS or builtin module. - */ - exports?: object | undefined; - /** - * An optional value used as the mocked module's default - * export. If this value is not provided, ESM mocks do not include a default - * export. If the mock is a CommonJS or builtin module, this setting is used as - * the value of `module.exports`. If this value is not provided, CJS and builtin - * mocks use an empty object as the value of `module.exports`. - * **This option cannot be used with `options.exports`.** - * This option is deprecated and will be removed in a later version. - * Prefer `options.exports.default`. - * @deprecated - */ - defaultExport?: any; - /** - * An optional object whose keys and values are used to - * create the named exports of the mock module. If the mock is a CommonJS or - * builtin module, these values are copied onto `module.exports`. Therefore, if a - * mock is created with both named exports and a non-object default export, the - * mock will throw an exception when used as a CJS or builtin module. - * **This option cannot be used with `options.exports`.** - * This option is deprecated and will be removed in a later version. - * Prefer `options.exports`. - * @deprecated - */ - namedExports?: object | undefined; - } - /** - * The `MockTracker` class is used to manage mocking functionality. The test runner - * module provides a top level `mock` export which is a `MockTracker` instance. - * Each test also provides its own `MockTracker` instance via the test context's `mock` property. - * @since v19.1.0, v18.13.0 - */ - interface MockTracker { - /** - * This function is used to create a mock function. - * - * The following example creates a mock function that increments a counter by one - * on each invocation. The `times` option is used to modify the mock behavior such - * that the first two invocations add two to the counter instead of one. - * - * ```js - * test('mocks a counting function', (t) => { - * let cnt = 0; - * - * function addOne() { - * cnt++; - * return cnt; - * } - * - * function addTwo() { - * cnt += 2; - * return cnt; - * } - * - * const fn = t.mock.fn(addOne, addTwo, { times: 2 }); - * - * assert.strictEqual(fn(), 2); - * assert.strictEqual(fn(), 4); - * assert.strictEqual(fn(), 5); - * assert.strictEqual(fn(), 6); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param original An optional function to create a mock on. - * @param implementation An optional function used as the mock implementation for `original`. This is useful for creating mocks that exhibit one behavior for a specified number of calls and - * then restore the behavior of `original`. - * @param options Optional configuration options for the mock function. - * @return The mocked function. The mocked function contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the - * behavior of the mocked function. - */ - fn undefined>( - original?: F, - options?: MockFunctionOptions, - ): Mock; - fn undefined, Implementation extends Function = F>( - original?: F, - implementation?: Implementation, - options?: MockFunctionOptions, - ): Mock; - /** - * This function is used to create a mock on an existing object method. The - * following example demonstrates how a mock is created on an existing object - * method. - * - * ```js - * test('spies on an object method', (t) => { - * const number = { - * value: 5, - * subtract(a) { - * return this.value - a; - * }, - * }; - * - * t.mock.method(number, 'subtract'); - * assert.strictEqual(number.subtract.mock.calls.length, 0); - * assert.strictEqual(number.subtract(3), 2); - * assert.strictEqual(number.subtract.mock.calls.length, 1); - * - * const call = number.subtract.mock.calls[0]; - * - * assert.deepStrictEqual(call.arguments, [3]); - * assert.strictEqual(call.result, 2); - * assert.strictEqual(call.error, undefined); - * assert.strictEqual(call.target, undefined); - * assert.strictEqual(call.this, number); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param object The object whose method is being mocked. - * @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown. - * @param implementation An optional function used as the mock implementation for `object[methodName]`. - * @param options Optional configuration options for the mock method. - * @return The mocked method. The mocked method contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the - * behavior of the mocked method. - */ - method< - MockedObject extends object, - MethodName extends FunctionPropertyNames, - >( - object: MockedObject, - methodName: MethodName, - options?: MockFunctionOptions, - ): MockedObject[MethodName] extends Function ? Mock - : never; - method< - MockedObject extends object, - MethodName extends FunctionPropertyNames, - Implementation extends Function, - >( - object: MockedObject, - methodName: MethodName, - implementation: Implementation, - options?: MockFunctionOptions, - ): MockedObject[MethodName] extends Function ? Mock - : never; - method( - object: MockedObject, - methodName: keyof MockedObject, - options: MockMethodOptions, - ): Mock; - method( - object: MockedObject, - methodName: keyof MockedObject, - implementation: Function, - options: MockMethodOptions, - ): Mock; - /** - * This function is syntax sugar for `MockTracker.method` with `options.getter` set to `true`. - * @since v19.3.0, v18.13.0 - */ - getter< - MockedObject extends object, - MethodName extends keyof MockedObject, - >( - object: MockedObject, - methodName: MethodName, - options?: MockFunctionOptions, - ): Mock<() => MockedObject[MethodName]>; - getter< - MockedObject extends object, - MethodName extends keyof MockedObject, - Implementation extends Function, - >( - object: MockedObject, - methodName: MethodName, - implementation?: Implementation, - options?: MockFunctionOptions, - ): Mock<(() => MockedObject[MethodName]) | Implementation>; - /** - * This function is syntax sugar for `MockTracker.method` with `options.setter` set to `true`. - * @since v19.3.0, v18.13.0 - */ - setter< - MockedObject extends object, - MethodName extends keyof MockedObject, - >( - object: MockedObject, - methodName: MethodName, - options?: MockFunctionOptions, - ): Mock<(value: MockedObject[MethodName]) => void>; - setter< - MockedObject extends object, - MethodName extends keyof MockedObject, - Implementation extends Function, - >( - object: MockedObject, - methodName: MethodName, - implementation?: Implementation, - options?: MockFunctionOptions, - ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>; - /** - * This function is used to mock the exports of ECMAScript modules, CommonJS modules, JSON modules, and - * Node.js builtin modules. Any references to the original module prior to mocking are not impacted. In - * order to enable module mocking, Node.js must be started with the - * [`--experimental-test-module-mocks`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--experimental-test-module-mocks) - * command-line flag. - * - * **Note**: [module customization hooks](https://nodejs.org/docs/latest-v25.x/api/module.html#customization-hooks) registered via the **synchronous** API effect resolution of - * the `specifier` provided to `mock.module`. Customization hooks registered via the **asynchronous** - * API are currently ignored (because the test runner's loader is synchronous, and node does not - * support multi-chain / cross-chain loading). - * - * The following example demonstrates how a mock is created for a module. - * - * ```js - * test('mocks a builtin module in both module systems', async (t) => { - * // Create a mock of 'node:readline' with a named export named 'foo', which - * // does not exist in the original 'node:readline' module. - * const mock = t.mock.module('node:readline', { - * exports: { foo: () => 42 }, - * }); - * - * let esmImpl = await import('node:readline'); - * let cjsImpl = require('node:readline'); - * - * // cursorTo() is an export of the original 'node:readline' module. - * assert.strictEqual(esmImpl.cursorTo, undefined); - * assert.strictEqual(cjsImpl.cursorTo, undefined); - * assert.strictEqual(esmImpl.fn(), 42); - * assert.strictEqual(cjsImpl.fn(), 42); - * - * mock.restore(); - * - * // The mock is restored, so the original builtin module is returned. - * esmImpl = await import('node:readline'); - * cjsImpl = require('node:readline'); - * - * assert.strictEqual(typeof esmImpl.cursorTo, 'function'); - * assert.strictEqual(typeof cjsImpl.cursorTo, 'function'); - * assert.strictEqual(esmImpl.fn, undefined); - * assert.strictEqual(cjsImpl.fn, undefined); - * }); - * ``` - * @since v22.3.0 - * @experimental - * @param specifier A string identifying the module to mock. - * @param options Optional configuration options for the mock module. - */ - module(specifier: string | URL, options?: MockModuleOptions): MockModuleContext; - /** - * Creates a mock for a property value on an object. This allows you to track and control access to a specific property, - * including how many times it is read (getter) or written (setter), and to restore the original value after mocking. - * - * ```js - * test('mocks a property value', (t) => { - * const obj = { foo: 42 }; - * const prop = t.mock.property(obj, 'foo', 100); - * - * assert.strictEqual(obj.foo, 100); - * assert.strictEqual(prop.mock.accessCount(), 1); - * assert.strictEqual(prop.mock.accesses[0].type, 'get'); - * assert.strictEqual(prop.mock.accesses[0].value, 100); - * - * obj.foo = 200; - * assert.strictEqual(prop.mock.accessCount(), 2); - * assert.strictEqual(prop.mock.accesses[1].type, 'set'); - * assert.strictEqual(prop.mock.accesses[1].value, 200); - * - * prop.mock.restore(); - * assert.strictEqual(obj.foo, 42); - * }); - * ``` - * @since v24.3.0 - * @param object The object whose value is being mocked. - * @param propertyName The identifier of the property on `object` to mock. - * @param value An optional value used as the mock value - * for `object[propertyName]`. **Default:** The original property value. - * @returns A proxy to the mocked object. The mocked object contains a - * special `mock` property, which is an instance of [`MockPropertyContext`][], and - * can be used for inspecting and changing the behavior of the mocked property. - */ - property< - MockedObject extends object, - PropertyName extends keyof MockedObject, - >( - object: MockedObject, - property: PropertyName, - value?: MockedObject[PropertyName], - ): MockedObject & { mock: MockPropertyContext }; - /** - * This function restores the default behavior of all mocks that were previously - * created by this `MockTracker` and disassociates the mocks from the `MockTracker` instance. Once disassociated, the mocks can still be used, but the `MockTracker` instance can no longer be - * used to reset their behavior or - * otherwise interact with them. - * - * After each test completes, this function is called on the test context's `MockTracker`. If the global `MockTracker` is used extensively, calling this - * function manually is recommended. - * @since v19.1.0, v18.13.0 - */ - reset(): void; - /** - * This function restores the default behavior of all mocks that were previously - * created by this `MockTracker`. Unlike `mock.reset()`, `mock.restoreAll()` does - * not disassociate the mocks from the `MockTracker` instance. - * @since v19.1.0, v18.13.0 - */ - restoreAll(): void; - readonly timers: MockTimers; - } - const mock: MockTracker; - interface MockFunctionCall< - F extends Function, - ReturnType = F extends (...args: any) => infer T ? T - : F extends abstract new(...args: any) => infer T ? T - : unknown, - Args = F extends (...args: infer Y) => any ? Y - : F extends abstract new(...args: infer Y) => any ? Y - : unknown[], - > { - /** - * An array of the arguments passed to the mock function. - */ - arguments: Args; - /** - * If the mocked function threw then this property contains the thrown value. - */ - error: unknown | undefined; - /** - * The value returned by the mocked function. - * - * If the mocked function threw, it will be `undefined`. - */ - result: ReturnType | undefined; - /** - * An `Error` object whose stack can be used to determine the callsite of the mocked function invocation. - */ - stack: Error; - /** - * If the mocked function is a constructor, this field contains the class being constructed. - * Otherwise this will be `undefined`. - */ - target: F extends abstract new(...args: any) => any ? F : undefined; - /** - * The mocked function's `this` value. - */ - this: unknown; - } - /** - * The `MockFunctionContext` class is used to inspect or manipulate the behavior of - * mocks created via the `MockTracker` APIs. - * @since v19.1.0, v18.13.0 - */ - interface MockFunctionContext { - /** - * A getter that returns a copy of the internal array used to track calls to the - * mock. Each entry in the array is an object with the following properties. - * @since v19.1.0, v18.13.0 - */ - readonly calls: MockFunctionCall[]; - /** - * This function returns the number of times that this mock has been invoked. This - * function is more efficient than checking `ctx.calls.length` because `ctx.calls` is a getter that creates a copy of the internal call tracking array. - * @since v19.1.0, v18.13.0 - * @return The number of times that this mock has been invoked. - */ - callCount(): number; - /** - * This function is used to change the behavior of an existing mock. - * - * The following example creates a mock function using `t.mock.fn()`, calls the - * mock function, and then changes the mock implementation to a different function. - * - * ```js - * test('changes a mock behavior', (t) => { - * let cnt = 0; - * - * function addOne() { - * cnt++; - * return cnt; - * } - * - * function addTwo() { - * cnt += 2; - * return cnt; - * } - * - * const fn = t.mock.fn(addOne); - * - * assert.strictEqual(fn(), 1); - * fn.mock.mockImplementation(addTwo); - * assert.strictEqual(fn(), 3); - * assert.strictEqual(fn(), 5); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param implementation The function to be used as the mock's new implementation. - */ - mockImplementation(implementation: F): void; - /** - * This function is used to change the behavior of an existing mock for a single - * invocation. Once invocation `onCall` has occurred, the mock will revert to - * whatever behavior it would have used had `mockImplementationOnce()` not been - * called. - * - * The following example creates a mock function using `t.mock.fn()`, calls the - * mock function, changes the mock implementation to a different function for the - * next invocation, and then resumes its previous behavior. - * - * ```js - * test('changes a mock behavior once', (t) => { - * let cnt = 0; - * - * function addOne() { - * cnt++; - * return cnt; - * } - * - * function addTwo() { - * cnt += 2; - * return cnt; - * } - * - * const fn = t.mock.fn(addOne); - * - * assert.strictEqual(fn(), 1); - * fn.mock.mockImplementationOnce(addTwo); - * assert.strictEqual(fn(), 3); - * assert.strictEqual(fn(), 4); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`. - * @param onCall The invocation number that will use `implementation`. If the specified invocation has already occurred then an exception is thrown. - */ - mockImplementationOnce(implementation: F, onCall?: number): void; - /** - * Resets the call history of the mock function. - * @since v19.3.0, v18.13.0 - */ - resetCalls(): void; - /** - * Resets the implementation of the mock function to its original behavior. The - * mock can still be used after calling this function. - * @since v19.1.0, v18.13.0 - */ - restore(): void; - } - /** - * @since v22.3.0 - * @experimental - */ - interface MockModuleContext { - /** - * Resets the implementation of the mock module. - * @since v22.3.0 - */ - restore(): void; - } - /** - * @since v24.3.0 - */ - class MockPropertyContext { - /** - * A getter that returns a copy of the internal array used to track accesses (get/set) to - * the mocked property. Each entry in the array is an object with the following properties: - */ - readonly accesses: Array<{ - type: "get" | "set"; - value: PropertyType; - stack: Error; - }>; - /** - * This function returns the number of times that the property was accessed. - * This function is more efficient than checking `ctx.accesses.length` because - * `ctx.accesses` is a getter that creates a copy of the internal access tracking array. - * @returns The number of times that the property was accessed (read or written). - */ - accessCount(): number; - /** - * This function is used to change the value returned by the mocked property getter. - * @param value The new value to be set as the mocked property value. - */ - mockImplementation(value: PropertyType): void; - /** - * This function is used to change the behavior of an existing mock for a single - * invocation. Once invocation `onAccess` has occurred, the mock will revert to - * whatever behavior it would have used had `mockImplementationOnce()` not been - * called. - * - * The following example creates a mock function using `t.mock.property()`, calls the - * mock property, changes the mock implementation to a different value for the - * next invocation, and then resumes its previous behavior. - * - * ```js - * test('changes a mock behavior once', (t) => { - * const obj = { foo: 1 }; - * - * const prop = t.mock.property(obj, 'foo', 5); - * - * assert.strictEqual(obj.foo, 5); - * prop.mock.mockImplementationOnce(25); - * assert.strictEqual(obj.foo, 25); - * assert.strictEqual(obj.foo, 5); - * }); - * ``` - * @param value The value to be used as the mock's - * implementation for the invocation number specified by `onAccess`. - * @param onAccess The invocation number that will use `value`. If - * the specified invocation has already occurred then an exception is thrown. - * **Default:** The number of the next invocation. - */ - mockImplementationOnce(value: PropertyType, onAccess?: number): void; - /** - * Resets the access history of the mocked property. - */ - resetAccesses(): void; - /** - * Resets the implementation of the mock property to its original behavior. The - * mock can still be used after calling this function. - */ - restore(): void; - } - interface MockTimersOptions { - apis: ReadonlyArray<"setInterval" | "setTimeout" | "setImmediate" | "Date">; - now?: number | Date | undefined; - } - /** - * Mocking timers is a technique commonly used in software testing to simulate and - * control the behavior of timers, such as `setInterval` and `setTimeout`, - * without actually waiting for the specified time intervals. - * - * The MockTimers API also allows for mocking of the `Date` constructor and - * `setImmediate`/`clearImmediate` functions. - * - * The `MockTracker` provides a top-level `timers` export - * which is a `MockTimers` instance. - * @since v20.4.0 - */ - interface MockTimers { - /** - * Enables timer mocking for the specified timers. - * - * **Note:** When you enable mocking for a specific timer, its associated - * clear function will also be implicitly mocked. - * - * **Note:** Mocking `Date` will affect the behavior of the mocked timers - * as they use the same internal clock. - * - * Example usage without setting initial time: - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.enable({ apis: ['setInterval', 'Date'], now: 1234 }); - * ``` - * - * The above example enables mocking for the `Date` constructor, `setInterval` timer and - * implicitly mocks the `clearInterval` function. Only the `Date` constructor from `globalThis`, - * `setInterval` and `clearInterval` functions from `node:timers`, `node:timers/promises`, and `globalThis` will be mocked. - * - * Example usage with initial time set - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.enable({ apis: ['Date'], now: 1000 }); - * ``` - * - * Example usage with initial Date object as time set - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.enable({ apis: ['Date'], now: new Date() }); - * ``` - * - * Alternatively, if you call `mock.timers.enable()` without any parameters: - * - * All timers (`'setInterval'`, `'clearInterval'`, `'Date'`, `'setImmediate'`, `'clearImmediate'`, `'setTimeout'`, and `'clearTimeout'`) - * will be mocked. - * - * The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout` functions from `node:timers`, `node:timers/promises`, - * and `globalThis` will be mocked. - * The `Date` constructor from `globalThis` will be mocked. - * - * If there is no initial epoch set, the initial date will be based on 0 in the Unix epoch. This is `January 1st, 1970, 00:00:00 UTC`. You can - * set an initial date by passing a now property to the `.enable()` method. This value will be used as the initial date for the mocked Date - * object. It can either be a positive integer, or another Date object. - * @since v20.4.0 - */ - enable(options?: MockTimersOptions): void; - /** - * Sets the current Unix timestamp that will be used as reference for any mocked - * `Date` objects. - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('runAll functions following the given order', (context) => { - * const now = Date.now(); - * const setTime = 1000; - * // Date.now is not mocked - * assert.deepStrictEqual(Date.now(), now); - * - * context.mock.timers.enable({ apis: ['Date'] }); - * context.mock.timers.setTime(setTime); - * // Date.now is now 1000 - * assert.strictEqual(Date.now(), setTime); - * }); - * ``` - * @since v21.2.0, v20.11.0 - */ - setTime(milliseconds: number): void; - /** - * This function restores the default behavior of all mocks that were previously - * created by this `MockTimers` instance and disassociates the mocks - * from the `MockTracker` instance. - * - * **Note:** After each test completes, this function is called on - * the test context's `MockTracker`. - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.reset(); - * ``` - * @since v20.4.0 - */ - reset(): void; - /** - * Advances time for all mocked timers. - * - * **Note:** This diverges from how `setTimeout` in Node.js behaves and accepts - * only positive numbers. In Node.js, `setTimeout` with negative numbers is - * only supported for web compatibility reasons. - * - * The following example mocks a `setTimeout` function and - * by using `.tick` advances in - * time triggering all pending timers. - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { - * const fn = context.mock.fn(); - * - * context.mock.timers.enable({ apis: ['setTimeout'] }); - * - * setTimeout(fn, 9999); - * - * assert.strictEqual(fn.mock.callCount(), 0); - * - * // Advance in time - * context.mock.timers.tick(9999); - * - * assert.strictEqual(fn.mock.callCount(), 1); - * }); - * ``` - * - * Alternativelly, the `.tick` function can be called many times - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { - * const fn = context.mock.fn(); - * context.mock.timers.enable({ apis: ['setTimeout'] }); - * const nineSecs = 9000; - * setTimeout(fn, nineSecs); - * - * const twoSeconds = 3000; - * context.mock.timers.tick(twoSeconds); - * context.mock.timers.tick(twoSeconds); - * context.mock.timers.tick(twoSeconds); - * - * assert.strictEqual(fn.mock.callCount(), 1); - * }); - * ``` - * - * Advancing time using `.tick` will also advance the time for any `Date` object - * created after the mock was enabled (if `Date` was also set to be mocked). - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { - * const fn = context.mock.fn(); - * - * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); - * setTimeout(fn, 9999); - * - * assert.strictEqual(fn.mock.callCount(), 0); - * assert.strictEqual(Date.now(), 0); - * - * // Advance in time - * context.mock.timers.tick(9999); - * assert.strictEqual(fn.mock.callCount(), 1); - * assert.strictEqual(Date.now(), 9999); - * }); - * ``` - * @since v20.4.0 - */ - tick(milliseconds: number): void; - /** - * Triggers all pending mocked timers immediately. If the `Date` object is also - * mocked, it will also advance the `Date` object to the furthest timer's time. - * - * The example below triggers all pending timers immediately, - * causing them to execute without any delay. - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('runAll functions following the given order', (context) => { - * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); - * const results = []; - * setTimeout(() => results.push(1), 9999); - * - * // Notice that if both timers have the same timeout, - * // the order of execution is guaranteed - * setTimeout(() => results.push(3), 8888); - * setTimeout(() => results.push(2), 8888); - * - * assert.deepStrictEqual(results, []); - * - * context.mock.timers.runAll(); - * assert.deepStrictEqual(results, [3, 2, 1]); - * // The Date object is also advanced to the furthest timer's time - * assert.strictEqual(Date.now(), 9999); - * }); - * ``` - * - * **Note:** The `runAll()` function is specifically designed for - * triggering timers in the context of timer mocking. - * It does not have any effect on real-time system - * clocks or actual timers outside of the mocking environment. - * @since v20.4.0 - */ - runAll(): void; - /** - * Calls {@link MockTimers.reset()}. - */ - [Symbol.dispose](): void; - } - /** - * An object whose methods are used to configure available assertions on the - * `TestContext` objects in the current process. The methods from `node:assert` - * and snapshot testing functions are available by default. - * - * It is possible to apply the same configuration to all files by placing common - * configuration code in a module - * preloaded with `--require` or `--import`. - * @since v22.14.0 - */ - namespace assert { - /** - * Defines a new assertion function with the provided name and function. If an - * assertion already exists with the same name, it is overwritten. - * @since v22.14.0 - */ - function register(name: string, fn: (this: TestContext, ...args: any[]) => void): void; - } - /** - * @since v22.3.0 - */ - namespace snapshot { - /** - * This function is used to customize the default serialization mechanism used by the test runner. - * - * By default, the test runner performs serialization by calling `JSON.stringify(value, null, 2)` on the provided value. - * `JSON.stringify()` does have limitations regarding circular structures and supported data types. - * If a more robust serialization mechanism is required, this function should be used to specify a list of custom serializers. - * - * Serializers are called in order, with the output of the previous serializer passed as input to the next. - * The final result must be a string value. - * @since v22.3.0 - * @param serializers An array of synchronous functions used as the default serializers for snapshot tests. - */ - function setDefaultSnapshotSerializers(serializers: ReadonlyArray<(value: any) => any>): void; - /** - * This function is used to set a custom resolver for the location of the snapshot file used for snapshot testing. - * By default, the snapshot filename is the same as the entry point filename with `.snapshot` appended. - * @since v22.3.0 - * @param fn A function used to compute the location of the snapshot file. - * The function receives the path of the test file as its only argument. If the - * test is not associated with a file (for example in the REPL), the input is - * undefined. `fn()` must return a string specifying the location of the snapshot file. - */ - function setResolveSnapshotPath(fn: (path: string | undefined) => string): void; - } - } - type FunctionPropertyNames = { - [K in keyof T]: T[K] extends Function ? K : never; - }[keyof T]; - export = test; -} diff --git a/node_modules/@types/node/test/reporters.d.ts b/node_modules/@types/node/test/reporters.d.ts deleted file mode 100644 index 55595f3..0000000 --- a/node_modules/@types/node/test/reporters.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -declare module "node:test/reporters" { - import { Transform, TransformOptions } from "node:stream"; - import { EventData } from "node:test"; - type TestEvent = - | { type: "test:coverage"; data: EventData.TestCoverage } - | { type: "test:complete"; data: EventData.TestComplete } - | { type: "test:dequeue"; data: EventData.TestDequeue } - | { type: "test:diagnostic"; data: EventData.TestDiagnostic } - | { type: "test:enqueue"; data: EventData.TestEnqueue } - | { type: "test:fail"; data: EventData.TestFail } - | { type: "test:interrupted"; data: EventData.TestInterrupted } - | { type: "test:pass"; data: EventData.TestPass } - | { type: "test:plan"; data: EventData.TestPlan } - | { type: "test:start"; data: EventData.TestStart } - | { type: "test:stderr"; data: EventData.TestStderr } - | { type: "test:stdout"; data: EventData.TestStdout } - | { type: "test:summary"; data: EventData.TestSummary } - | { type: "test:watch:drained"; data: undefined } - | { type: "test:watch:restarted"; data: undefined }; - interface ReporterConstructorWrapper Transform> { - new(...args: ConstructorParameters): InstanceType; - (...args: ConstructorParameters): InstanceType; - } - /** - * The `dot` reporter outputs the test results in a compact format, - * where each passing test is represented by a `.`, - * and each failing test is represented by a `X`. - * @since v20.0.0 - */ - function dot(source: AsyncIterable): NodeJS.AsyncIterator; - /** - * The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format. - * @since v20.0.0 - */ - function tap(source: AsyncIterable): NodeJS.AsyncIterator; - class SpecReporter extends Transform { - constructor(); - } - /** - * The `spec` reporter outputs the test results in a human-readable format. - * @since v20.0.0 - */ - const spec: ReporterConstructorWrapper; - /** - * The `junit` reporter outputs test results in a jUnit XML format. - * @since v21.0.0 - */ - function junit(source: AsyncIterable): NodeJS.AsyncIterator; - class LcovReporter extends Transform { - constructor(options?: Omit); - } - /** - * The `lcov` reporter outputs test coverage when used with the - * [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--experimental-test-coverage) flag. - * @since v22.0.0 - */ - const lcov: ReporterConstructorWrapper; - export { dot, junit, lcov, spec, tap, TestEvent }; -} diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts deleted file mode 100644 index 5b74b89..0000000 --- a/node_modules/@types/node/timers.d.ts +++ /dev/null @@ -1,149 +0,0 @@ -declare module "node:timers" { - import { Abortable } from "node:events"; - import * as promises from "node:timers/promises"; - export interface TimerOptions extends Abortable { - /** - * Set to `false` to indicate that the scheduled `Timeout` - * should not require the Node.js event loop to remain active. - * @default true - */ - ref?: boolean | undefined; - } - global { - namespace NodeJS { - /** - * This object is created internally and is returned from `setImmediate()`. It - * can be passed to `clearImmediate()` in order to cancel the scheduled - * actions. - * - * By default, when an immediate is scheduled, the Node.js event loop will continue - * running as long as the immediate is active. The `Immediate` object returned by - * `setImmediate()` exports both `immediate.ref()` and `immediate.unref()` - * functions that can be used to control this default behavior. - */ - interface Immediate extends RefCounted, Disposable { - /** - * If true, the `Immediate` object will keep the Node.js event loop active. - * @since v11.0.0 - */ - hasRef(): boolean; - /** - * When called, requests that the Node.js event loop _not_ exit so long as the - * `Immediate` is active. Calling `immediate.ref()` multiple times will have no - * effect. - * - * By default, all `Immediate` objects are "ref'ed", making it normally unnecessary - * to call `immediate.ref()` unless `immediate.unref()` had been called previously. - * @since v9.7.0 - * @returns a reference to `immediate` - */ - ref(): this; - /** - * When called, the active `Immediate` object will not require the Node.js event - * loop to remain active. If there is no other activity keeping the event loop - * running, the process may exit before the `Immediate` object's callback is - * invoked. Calling `immediate.unref()` multiple times will have no effect. - * @since v9.7.0 - * @returns a reference to `immediate` - */ - unref(): this; - /** - * Cancels the immediate. This is similar to calling `clearImmediate()`. - * @since v20.5.0, v18.18.0 - */ - [Symbol.dispose](): void; - _onImmediate(...args: any[]): void; - } - // Legacy interface used in Node.js v9 and prior - // TODO: remove in a future major version bump - /** @deprecated Use `NodeJS.Timeout` instead. */ - interface Timer extends RefCounted { - hasRef(): boolean; - refresh(): this; - [Symbol.toPrimitive](): number; - } - /** - * This object is created internally and is returned from `setTimeout()` and - * `setInterval()`. It can be passed to either `clearTimeout()` or - * `clearInterval()` in order to cancel the scheduled actions. - * - * By default, when a timer is scheduled using either `setTimeout()` or - * `setInterval()`, the Node.js event loop will continue running as long as the - * timer is active. Each of the `Timeout` objects returned by these functions - * export both `timeout.ref()` and `timeout.unref()` functions that can be used to - * control this default behavior. - */ - interface Timeout extends RefCounted, Disposable, Timer { - /** - * Cancels the timeout. - * @since v0.9.1 - * @legacy Use `clearTimeout()` instead. - * @returns a reference to `timeout` - */ - close(): this; - /** - * If true, the `Timeout` object will keep the Node.js event loop active. - * @since v11.0.0 - */ - hasRef(): boolean; - /** - * When called, requests that the Node.js event loop _not_ exit so long as the - * `Timeout` is active. Calling `timeout.ref()` multiple times will have no effect. - * - * By default, all `Timeout` objects are "ref'ed", making it normally unnecessary - * to call `timeout.ref()` unless `timeout.unref()` had been called previously. - * @since v0.9.1 - * @returns a reference to `timeout` - */ - ref(): this; - /** - * Sets the timer's start time to the current time, and reschedules the timer to - * call its callback at the previously specified duration adjusted to the current - * time. This is useful for refreshing a timer without allocating a new - * JavaScript object. - * - * Using this on a timer that has already called its callback will reactivate the - * timer. - * @since v10.2.0 - * @returns a reference to `timeout` - */ - refresh(): this; - /** - * When called, the active `Timeout` object will not require the Node.js event loop - * to remain active. If there is no other activity keeping the event loop running, - * the process may exit before the `Timeout` object's callback is invoked. Calling - * `timeout.unref()` multiple times will have no effect. - * @since v0.9.1 - * @returns a reference to `timeout` - */ - unref(): this; - /** - * Coerce a `Timeout` to a primitive. The primitive can be used to - * clear the `Timeout`. The primitive can only be used in the - * same thread where the timeout was created. Therefore, to use it - * across `worker_threads` it must first be passed to the correct - * thread. This allows enhanced compatibility with browser - * `setTimeout()` and `setInterval()` implementations. - * @since v14.9.0, v12.19.0 - */ - [Symbol.toPrimitive](): number; - /** - * Cancels the timeout. - * @since v20.5.0, v18.18.0 - */ - [Symbol.dispose](): void; - _onTimeout(...args: any[]): void; - } - } - } - import clearImmediate = globalThis.clearImmediate; - import clearInterval = globalThis.clearInterval; - import clearTimeout = globalThis.clearTimeout; - import setImmediate = globalThis.setImmediate; - import setInterval = globalThis.setInterval; - import setTimeout = globalThis.setTimeout; - export { clearImmediate, clearInterval, clearTimeout, promises, setImmediate, setInterval, setTimeout }; -} -declare module "timers" { - export * from "node:timers"; -} diff --git a/node_modules/@types/node/timers/promises.d.ts b/node_modules/@types/node/timers/promises.d.ts deleted file mode 100644 index 8e178ea..0000000 --- a/node_modules/@types/node/timers/promises.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -declare module "node:timers/promises" { - import { TimerOptions } from "node:timers"; - /** - * ```js - * import { - * setTimeout, - * } from 'node:timers/promises'; - * - * const res = await setTimeout(100, 'result'); - * - * console.log(res); // Prints 'result' - * ``` - * @since v15.0.0 - * @param delay The number of milliseconds to wait before fulfilling the - * promise. **Default:** `1`. - * @param value A value with which the promise is fulfilled. - */ - function setTimeout(delay?: number, value?: T, options?: TimerOptions): Promise; - /** - * ```js - * import { - * setImmediate, - * } from 'node:timers/promises'; - * - * const res = await setImmediate('result'); - * - * console.log(res); // Prints 'result' - * ``` - * @since v15.0.0 - * @param value A value with which the promise is fulfilled. - */ - function setImmediate(value?: T, options?: TimerOptions): Promise; - /** - * Returns an async iterator that generates values in an interval of `delay` ms. - * If `ref` is `true`, you need to call `next()` of async iterator explicitly - * or implicitly to keep the event loop alive. - * - * ```js - * import { - * setInterval, - * } from 'node:timers/promises'; - * - * const interval = 100; - * for await (const startTime of setInterval(interval, Date.now())) { - * const now = Date.now(); - * console.log(now); - * if ((now - startTime) > 1000) - * break; - * } - * console.log(Date.now()); - * ``` - * @since v15.9.0 - * @param delay The number of milliseconds to wait between iterations. - * **Default:** `1`. - * @param value A value with which the iterator returns. - */ - function setInterval(delay?: number, value?: T, options?: TimerOptions): NodeJS.AsyncIterator; - interface Scheduler { - /** - * An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification - * being developed as a standard Web Platform API. - * - * Calling `timersPromises.scheduler.wait(delay, options)` is roughly equivalent - * to calling `timersPromises.setTimeout(delay, undefined, options)` except that - * the `ref` option is not supported. - * - * ```js - * import { scheduler } from 'node:timers/promises'; - * - * await scheduler.wait(1000); // Wait one second before continuing - * ``` - * @since v17.3.0, v16.14.0 - * @experimental - * @param delay The number of milliseconds to wait before resolving the - * promise. - */ - wait(delay: number, options?: { signal?: AbortSignal }): Promise; - /** - * An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification - * being developed as a standard Web Platform API. - * - * Calling `timersPromises.scheduler.yield()` is equivalent to calling - * `timersPromises.setImmediate()` with no arguments. - * @since v17.3.0, v16.14.0 - * @experimental - */ - yield(): Promise; - } - const scheduler: Scheduler; -} -declare module "timers/promises" { - export * from "node:timers/promises"; -} diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts deleted file mode 100644 index 3efd2ae..0000000 --- a/node_modules/@types/node/tls.d.ts +++ /dev/null @@ -1,1193 +0,0 @@ -declare module "node:tls" { - import { NonSharedBuffer } from "node:buffer"; - import { X509Certificate } from "node:crypto"; - import * as net from "node:net"; - import * as stream from "stream"; - const CLIENT_RENEG_LIMIT: number; - const CLIENT_RENEG_WINDOW: number; - interface Certificate extends NodeJS.Dict { - /** - * Country code. - */ - C?: string | string[]; - /** - * Street. - */ - ST?: string | string[]; - /** - * Locality. - */ - L?: string | string[]; - /** - * Organization. - */ - O?: string | string[]; - /** - * Organizational unit. - */ - OU?: string | string[]; - /** - * Common name. - */ - CN?: string | string[]; - } - interface PeerCertificate { - /** - * `true` if a Certificate Authority (CA), `false` otherwise. - * @since v18.13.0 - */ - ca: boolean; - /** - * The DER encoded X.509 certificate data. - */ - raw: NonSharedBuffer; - /** - * The certificate subject. - */ - subject: Certificate; - /** - * The certificate issuer, described in the same terms as the `subject`. - */ - issuer: Certificate; - /** - * The date-time the certificate is valid from. - */ - valid_from: string; - /** - * The date-time the certificate is valid to. - */ - valid_to: string; - /** - * The certificate serial number, as a hex string. - */ - serialNumber: string; - /** - * The SHA-1 digest of the DER encoded certificate. - * It is returned as a `:` separated hexadecimal string. - */ - fingerprint: string; - /** - * The SHA-256 digest of the DER encoded certificate. - * It is returned as a `:` separated hexadecimal string. - */ - fingerprint256: string; - /** - * The SHA-512 digest of the DER encoded certificate. - * It is returned as a `:` separated hexadecimal string. - */ - fingerprint512: string; - /** - * The extended key usage, a set of OIDs. - */ - ext_key_usage?: string[]; - /** - * A string containing concatenated names for the subject, - * an alternative to the `subject` names. - */ - subjectaltname?: string; - /** - * An array describing the AuthorityInfoAccess, used with OCSP. - */ - infoAccess?: NodeJS.Dict; - /** - * For RSA keys: The RSA bit size. - * - * For EC keys: The key size in bits. - */ - bits?: number; - /** - * The RSA exponent, as a string in hexadecimal number notation. - */ - exponent?: string; - /** - * The RSA modulus, as a hexadecimal string. - */ - modulus?: string; - /** - * The public key. - */ - pubkey?: NonSharedBuffer; - /** - * The ASN.1 name of the OID of the elliptic curve. - * Well-known curves are identified by an OID. - * While it is unusual, it is possible that the curve - * is identified by its mathematical properties, - * in which case it will not have an OID. - */ - asn1Curve?: string; - /** - * The NIST name for the elliptic curve, if it has one - * (not all well-known curves have been assigned names by NIST). - */ - nistCurve?: string; - } - interface DetailedPeerCertificate extends PeerCertificate { - /** - * The issuer certificate object. - * For self-signed certificates, this may be a circular reference. - */ - issuerCertificate: DetailedPeerCertificate; - } - interface CipherNameAndProtocol { - /** - * The cipher name. - */ - name: string; - /** - * SSL/TLS protocol version. - */ - version: string; - /** - * IETF name for the cipher suite. - */ - standardName: string; - } - interface EphemeralKeyInfo { - /** - * The supported types are 'DH' and 'ECDH'. - */ - type: string; - /** - * The name property is available only when type is 'ECDH'. - */ - name?: string | undefined; - /** - * The size of parameter of an ephemeral key exchange. - */ - size: number; - } - interface KeyObject { - /** - * Private keys in PEM format. - */ - pem: string | Buffer; - /** - * Optional passphrase. - */ - passphrase?: string | undefined; - } - interface PxfObject { - /** - * PFX or PKCS12 encoded private key and certificate chain. - */ - buf: string | Buffer; - /** - * Optional passphrase. - */ - passphrase?: string | undefined; - } - interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { - /** - * If true the TLS socket will be instantiated in server-mode. - * Defaults to false. - */ - isServer?: boolean | undefined; - /** - * An optional net.Server instance. - */ - server?: net.Server | undefined; - /** - * An optional Buffer instance containing a TLS session. - */ - session?: Buffer | undefined; - } - interface TLSSocketEventMap extends net.SocketEventMap { - "keylog": [line: NonSharedBuffer]; - "OCSPResponse": [response: NonSharedBuffer]; - "secure": []; - "secureConnect": []; - "session": [session: NonSharedBuffer]; - } - /** - * Performs transparent encryption of written data and all required TLS - * negotiation. - * - * Instances of `tls.TLSSocket` implement the duplex `Stream` interface. - * - * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate}) will only return data while the - * connection is open. - * @since v0.11.4 - */ - class TLSSocket extends net.Socket { - /** - * Construct a new tls.TLSSocket object from an existing TCP socket. - */ - constructor(socket: net.Socket | stream.Duplex, options?: TLSSocketOptions); - /** - * This property is `true` if the peer certificate was signed by one of the CAs - * specified when creating the `tls.TLSSocket` instance, otherwise `false`. - * @since v0.11.4 - */ - authorized: boolean; - /** - * Returns the reason why the peer's certificate was not been verified. This - * property is set only when `tlsSocket.authorized === false`. - * @since v0.11.4 - */ - authorizationError: Error; - /** - * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances. - * @since v0.11.4 - */ - encrypted: true; - /** - * String containing the selected ALPN protocol. - * Before a handshake has completed, this value is always null. - * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false. - */ - alpnProtocol: string | false | null; - /** - * String containing the server name requested via SNI (Server Name Indication) TLS extension. - */ - servername: string | false | null; - /** - * Returns an object representing the local certificate. The returned object has - * some properties corresponding to the fields of the certificate. - * - * See {@link TLSSocket.getPeerCertificate} for an example of the certificate - * structure. - * - * If there is no local certificate, an empty object will be returned. If the - * socket has been destroyed, `null` will be returned. - * @since v11.2.0 - */ - getCertificate(): PeerCertificate | object | null; - /** - * Returns an object containing information on the negotiated cipher suite. - * - * For example, a TLSv1.2 protocol with AES256-SHA cipher: - * - * ```json - * { - * "name": "AES256-SHA", - * "standardName": "TLS_RSA_WITH_AES_256_CBC_SHA", - * "version": "SSLv3" - * } - * ``` - * - * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information. - * @since v0.11.4 - */ - getCipher(): CipherNameAndProtocol; - /** - * Returns an object representing the type, name, and size of parameter of - * an ephemeral key exchange in `perfect forward secrecy` on a client - * connection. It returns an empty object when the key exchange is not - * ephemeral. As this is only supported on a client socket; `null` is returned - * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The `name` property is available only when type is `'ECDH'`. - * - * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`. - * @since v5.0.0 - */ - getEphemeralKeyInfo(): EphemeralKeyInfo | object | null; - /** - * As the `Finished` messages are message digests of the complete handshake - * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can - * be used for external authentication procedures when the authentication - * provided by SSL/TLS is not desired or is not enough. - * - * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used - * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). - * @since v9.9.0 - * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet. - */ - getFinished(): NonSharedBuffer | undefined; - /** - * Returns an object representing the peer's certificate. If the peer does not - * provide a certificate, an empty object will be returned. If the socket has been - * destroyed, `null` will be returned. - * - * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's - * certificate. - * @since v0.11.4 - * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate. - * @return A certificate object. - */ - getPeerCertificate(detailed: true): DetailedPeerCertificate; - getPeerCertificate(detailed?: false): PeerCertificate; - getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; - /** - * As the `Finished` messages are message digests of the complete handshake - * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can - * be used for external authentication procedures when the authentication - * provided by SSL/TLS is not desired or is not enough. - * - * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used - * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). - * @since v9.9.0 - * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so - * far. - */ - getPeerFinished(): NonSharedBuffer | undefined; - /** - * Returns a string containing the negotiated SSL/TLS protocol version of the - * current connection. The value `'unknown'` will be returned for connected - * sockets that have not completed the handshaking process. The value `null` will - * be returned for server sockets or disconnected client sockets. - * - * Protocol versions are: - * - * * `'SSLv3'` - * * `'TLSv1'` - * * `'TLSv1.1'` - * * `'TLSv1.2'` - * * `'TLSv1.3'` - * - * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information. - * @since v5.7.0 - */ - getProtocol(): string | null; - /** - * Returns the TLS session data or `undefined` if no session was - * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful - * for debugging. - * - * See `Session Resumption` for more information. - * - * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications - * must use the `'session'` event (it also works for TLSv1.2 and below). - * @since v0.11.4 - */ - getSession(): NonSharedBuffer | undefined; - /** - * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information. - * @since v12.11.0 - * @return List of signature algorithms shared between the server and the client in the order of decreasing preference. - */ - getSharedSigalgs(): string[]; - /** - * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`. - * - * It may be useful for debugging. - * - * See `Session Resumption` for more information. - * @since v0.11.4 - */ - getTLSTicket(): NonSharedBuffer | undefined; - /** - * See `Session Resumption` for more information. - * @since v0.5.6 - * @return `true` if the session was reused, `false` otherwise. - */ - isSessionReused(): boolean; - /** - * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process. - * Upon completion, the `callback` function will be passed a single argument - * that is either an `Error` (if the request failed) or `null`. - * - * This method can be used to request a peer's certificate after the secure - * connection has been established. - * - * When running as the server, the socket will be destroyed with an error after `handshakeTimeout` timeout. - * - * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the - * protocol. - * @since v0.11.8 - * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with - * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all. - * @return `true` if renegotiation was initiated, `false` otherwise. - */ - renegotiate( - options: { - rejectUnauthorized?: boolean | undefined; - requestCert?: boolean | undefined; - }, - callback: (err: Error | null) => void, - ): undefined | boolean; - /** - * The `tlsSocket.setKeyCert()` method sets the private key and certificate to use for the socket. - * This is mainly useful if you wish to select a server certificate from a TLS server's `ALPNCallback`. - * @since v22.5.0, v20.17.0 - * @param context An object containing at least `key` and `cert` properties from the {@link createSecureContext()} `options`, - * or a TLS context object created with {@link createSecureContext()} itself. - */ - setKeyCert(context: SecureContextOptions | SecureContext): void; - /** - * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size. - * Returns `true` if setting the limit succeeded; `false` otherwise. - * - * Smaller fragment sizes decrease the buffering latency on the client: larger - * fragments are buffered by the TLS layer until the entire fragment is received - * and its integrity is verified; large fragments can span multiple roundtrips - * and their processing can be delayed due to packet loss or reordering. However, - * smaller fragments add extra TLS framing bytes and CPU overhead, which may - * decrease overall server throughput. - * @since v0.11.11 - * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`. - */ - setMaxSendFragment(size: number): boolean; - /** - * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts - * to renegotiate will trigger an `'error'` event on the `TLSSocket`. - * @since v8.4.0 - */ - disableRenegotiation(): void; - /** - * When enabled, TLS packet trace information is written to `stderr`. This can be - * used to debug TLS connection problems. - * - * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by - * OpenSSL's `SSL_trace()` function, the format is undocumented, can change - * without notice, and should not be relied on. - * @since v12.2.0 - */ - enableTrace(): void; - /** - * Returns the peer certificate as an `X509Certificate` object. - * - * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned. - * @since v15.9.0 - */ - getPeerX509Certificate(): X509Certificate | undefined; - /** - * Returns the local certificate as an `X509Certificate` object. - * - * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned. - * @since v15.9.0 - */ - getX509Certificate(): X509Certificate | undefined; - /** - * Keying material is used for validations to prevent different kind of attacks in - * network protocols, for example in the specifications of IEEE 802.1X. - * - * Example - * - * ```js - * const keyingMaterial = tlsSocket.exportKeyingMaterial( - * 128, - * 'client finished'); - * - * /* - * Example return value of keyingMaterial: - * - * - * ``` - * - * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more - * information. - * @since v13.10.0, v12.17.0 - * @param length number of bytes to retrieve from keying material - * @param label an application specific label, typically this will be a value from the [IANA Exporter Label - * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). - * @param context Optionally provide a context. - * @return requested bytes of the keying material - */ - exportKeyingMaterial(length: number, label: string, context: Buffer): NonSharedBuffer; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: TLSSocketEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: TLSSocketEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: TLSSocketEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: TLSSocketEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: TLSSocketEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: TLSSocketEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: TLSSocketEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: TLSSocketEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface CommonConnectionOptions { - /** - * An optional TLS context object from tls.createSecureContext() - */ - secureContext?: SecureContext | undefined; - /** - * When enabled, TLS packet trace information is written to `stderr`. This can be - * used to debug TLS connection problems. - * @default false - */ - enableTrace?: boolean | undefined; - /** - * If true the server will request a certificate from clients that - * connect and attempt to verify that certificate. Defaults to - * false. - */ - requestCert?: boolean | undefined; - /** - * An array of strings, or a single `Buffer`, `TypedArray`, or `DataView` containing the supported - * ALPN protocols. Buffers should have the format `[len][name][len][name]...` - * e.g. `'\x08http/1.1\x08http/1.0'`, where the `len` byte is the length of the - * next protocol name. Passing an array is usually much simpler, e.g. - * `['http/1.1', 'http/1.0']`. Protocols earlier in the list have higher - * preference than those later. - */ - ALPNProtocols?: readonly string[] | NodeJS.ArrayBufferView | undefined; - /** - * SNICallback(servername, cb) A function that will be - * called if the client supports SNI TLS extension. Two arguments - * will be passed when called: servername and cb. SNICallback should - * invoke cb(null, ctx), where ctx is a SecureContext instance. - * (tls.createSecureContext(...) can be used to get a proper - * SecureContext.) If SNICallback wasn't provided the default callback - * with high-level API will be used (see below). - */ - SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined; - /** - * If true the server will reject any connection which is not - * authorized with the list of supplied CAs. This option only has an - * effect if requestCert is true. - * @default true - */ - rejectUnauthorized?: boolean | undefined; - /** - * If true, specifies that the OCSP status request extension will be - * added to the client hello and an 'OCSPResponse' event will be - * emitted on the socket before establishing a secure communication. - */ - requestOCSP?: boolean | undefined; - } - interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts { - /** - * Abort the connection if the SSL/TLS handshake does not finish in the - * specified number of milliseconds. A 'tlsClientError' is emitted on - * the tls.Server object whenever a handshake times out. Default: - * 120000 (120 seconds). - */ - handshakeTimeout?: number | undefined; - /** - * The number of seconds after which a TLS session created by the - * server will no longer be resumable. See Session Resumption for more - * information. Default: 300. - */ - sessionTimeout?: number | undefined; - /** - * 48-bytes of cryptographically strong pseudo-random data. - */ - ticketKeys?: Buffer | undefined; - /** - * @param socket - * @param identity identity parameter sent from the client. - * @return pre-shared key that must either be - * a buffer or `null` to stop the negotiation process. Returned PSK must be - * compatible with the selected cipher's digest. - * - * When negotiating TLS-PSK (pre-shared keys), this function is called - * with the identity provided by the client. - * If the return value is `null` the negotiation process will stop and an - * "unknown_psk_identity" alert message will be sent to the other party. - * If the server wishes to hide the fact that the PSK identity was not known, - * the callback must provide some random data as `psk` to make the connection - * fail with "decrypt_error" before negotiation is finished. - * PSK ciphers are disabled by default, and using TLS-PSK thus - * requires explicitly specifying a cipher suite with the `ciphers` option. - * More information can be found in the RFC 4279. - */ - pskCallback?: ((socket: TLSSocket, identity: string) => NodeJS.ArrayBufferView | null) | undefined; - /** - * hint to send to a client to help - * with selecting the identity during TLS-PSK negotiation. Will be ignored - * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be - * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code. - */ - pskIdentityHint?: string | undefined; - } - interface PSKCallbackNegotation { - psk: NodeJS.ArrayBufferView; - identity: string; - } - interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { - host?: string | undefined; - port?: number | undefined; - path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. - socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket - checkServerIdentity?: typeof checkServerIdentity | undefined; - servername?: string | undefined; // SNI TLS Extension - session?: Buffer | undefined; - minDHSize?: number | undefined; - lookup?: net.LookupFunction | undefined; - timeout?: number | undefined; - /** - * When negotiating TLS-PSK (pre-shared keys), this function is called - * with optional identity `hint` provided by the server or `null` - * in case of TLS 1.3 where `hint` was removed. - * It will be necessary to provide a custom `tls.checkServerIdentity()` - * for the connection as the default one will try to check hostname/IP - * of the server against the certificate but that's not applicable for PSK - * because there won't be a certificate present. - * More information can be found in the RFC 4279. - * - * @param hint message sent from the server to help client - * decide which identity to use during negotiation. - * Always `null` if TLS 1.3 is used. - * @returns Return `null` to stop the negotiation process. `psk` must be - * compatible with the selected cipher's digest. - * `identity` must use UTF-8 encoding. - */ - pskCallback?: ((hint: string | null) => PSKCallbackNegotation | null) | undefined; - } - interface ServerEventMap extends net.ServerEventMap { - "connection": [socket: net.Socket]; - "keylog": [line: NonSharedBuffer, tlsSocket: TLSSocket]; - "newSession": [sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void]; - "OCSPRequest": [ - certificate: NonSharedBuffer, - issuer: NonSharedBuffer, - callback: (err: Error | null, resp: Buffer | null) => void, - ]; - "resumeSession": [sessionId: Buffer, callback: (err: Error | null, sessionData?: Buffer) => void]; - "secureConnection": [tlsSocket: TLSSocket]; - "tlsClientError": [exception: Error, tlsSocket: TLSSocket]; - } - /** - * Accepts encrypted connections using TLS or SSL. - * @since v0.3.2 - */ - class Server extends net.Server { - constructor(secureConnectionListener?: (socket: TLSSocket) => void); - constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void); - /** - * The `server.addContext()` method adds a secure context that will be used if - * the client request's SNI name matches the supplied `hostname` (or wildcard). - * - * When there are multiple matching contexts, the most recently added one is - * used. - * @since v0.5.3 - * @param hostname A SNI host name or wildcard (e.g. `'*'`) - * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc), or a TLS context object created - * with {@link createSecureContext} itself. - */ - addContext(hostname: string, context: SecureContextOptions | SecureContext): void; - /** - * Returns the session ticket keys. - * - * See `Session Resumption` for more information. - * @since v3.0.0 - * @return A 48-byte buffer containing the session ticket keys. - */ - getTicketKeys(): NonSharedBuffer; - /** - * The `server.setSecureContext()` method replaces the secure context of an - * existing server. Existing connections to the server are not interrupted. - * @since v11.0.0 - * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). - */ - setSecureContext(options: SecureContextOptions): void; - /** - * Sets the session ticket keys. - * - * Changes to the ticket keys are effective only for future server connections. - * Existing or currently pending server connections will use the previous keys. - * - * See `Session Resumption` for more information. - * @since v3.0.0 - * @param keys A 48-byte buffer containing the session ticket keys. - */ - setTicketKeys(keys: Buffer): void; - // #region InternalEventEmitter - addListener(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ServerEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ServerEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: ServerEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: ServerEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1"; - interface SecureContextOptions { - /** - * If set, this will be called when a client opens a connection using the ALPN extension. - * One argument will be passed to the callback: an object containing `servername` and `protocols` fields, - * respectively containing the server name from the SNI extension (if any) and an array of - * ALPN protocol name strings. The callback must return either one of the strings listed in `protocols`, - * which will be returned to the client as the selected ALPN protocol, or `undefined`, - * to reject the connection with a fatal alert. If a string is returned that does not match one of - * the client's ALPN protocols, an error will be thrown. - * This option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error. - */ - ALPNCallback?: ((arg: { servername: string; protocols: string[] }) => string | undefined) | undefined; - /** - * Treat intermediate (non-self-signed) - * certificates in the trust CA certificate list as trusted. - * @since v22.9.0, v20.18.0 - */ - allowPartialTrustChain?: boolean | undefined; - /** - * Optionally override the trusted CA certificates. Default is to trust - * the well-known CAs curated by Mozilla. Mozilla's CAs are completely - * replaced when CAs are explicitly specified using this option. - */ - ca?: string | Buffer | Array | undefined; - /** - * Cert chains in PEM format. One cert chain should be provided per - * private key. Each cert chain should consist of the PEM formatted - * certificate for a provided private key, followed by the PEM - * formatted intermediate certificates (if any), in order, and not - * including the root CA (the root CA must be pre-known to the peer, - * see ca). When providing multiple cert chains, they do not have to - * be in the same order as their private keys in key. If the - * intermediate certificates are not provided, the peer will not be - * able to validate the certificate, and the handshake will fail. - */ - cert?: string | Buffer | Array | undefined; - /** - * Colon-separated list of supported signature algorithms. The list - * can contain digest algorithms (SHA256, MD5 etc.), public key - * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g - * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512). - */ - sigalgs?: string | undefined; - /** - * Cipher suite specification, replacing the default. For more - * information, see modifying the default cipher suite. Permitted - * ciphers can be obtained via tls.getCiphers(). Cipher names must be - * uppercased in order for OpenSSL to accept them. - */ - ciphers?: string | undefined; - /** - * Name of an OpenSSL engine which can provide the client certificate. - * @deprecated - */ - clientCertEngine?: string | undefined; - /** - * PEM formatted CRLs (Certificate Revocation Lists). - */ - crl?: string | Buffer | Array | undefined; - /** - * `'auto'` or custom Diffie-Hellman parameters, required for non-ECDHE perfect forward secrecy. - * If omitted or invalid, the parameters are silently discarded and DHE ciphers will not be available. - * ECDHE-based perfect forward secrecy will still be available. - */ - dhparam?: string | Buffer | undefined; - /** - * A string describing a named curve or a colon separated list of curve - * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key - * agreement. Set to auto to select the curve automatically. Use - * crypto.getCurves() to obtain a list of available curve names. On - * recent releases, openssl ecparam -list_curves will also display the - * name and description of each available elliptic curve. Default: - * tls.DEFAULT_ECDH_CURVE. - */ - ecdhCurve?: string | undefined; - /** - * Attempt to use the server's cipher suite preferences instead of the - * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be - * set in secureOptions - */ - honorCipherOrder?: boolean | undefined; - /** - * Private keys in PEM format. PEM allows the option of private keys - * being encrypted. Encrypted keys will be decrypted with - * options.passphrase. Multiple keys using different algorithms can be - * provided either as an array of unencrypted key strings or buffers, - * or an array of objects in the form {pem: [, - * passphrase: ]}. The object form can only occur in an array. - * object.passphrase is optional. Encrypted keys will be decrypted with - * object.passphrase if provided, or options.passphrase if it is not. - */ - key?: string | Buffer | Array | undefined; - /** - * Name of an OpenSSL engine to get private key from. Should be used - * together with privateKeyIdentifier. - * @deprecated - */ - privateKeyEngine?: string | undefined; - /** - * Identifier of a private key managed by an OpenSSL engine. Should be - * used together with privateKeyEngine. Should not be set together with - * key, because both options define a private key in different ways. - * @deprecated - */ - privateKeyIdentifier?: string | undefined; - /** - * Optionally set the maximum TLS version to allow. One - * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the - * `secureProtocol` option, use one or the other. - * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using - * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to - * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. - */ - maxVersion?: SecureVersion | undefined; - /** - * Optionally set the minimum TLS version to allow. One - * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the - * `secureProtocol` option, use one or the other. It is not recommended to use - * less than TLSv1.2, but it may be required for interoperability. - * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using - * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to - * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to - * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. - */ - minVersion?: SecureVersion | undefined; - /** - * Shared passphrase used for a single private key and/or a PFX. - */ - passphrase?: string | undefined; - /** - * PFX or PKCS12 encoded private key and certificate chain. pfx is an - * alternative to providing key and cert individually. PFX is usually - * encrypted, if it is, passphrase will be used to decrypt it. Multiple - * PFX can be provided either as an array of unencrypted PFX buffers, - * or an array of objects in the form {buf: [, - * passphrase: ]}. The object form can only occur in an array. - * object.passphrase is optional. Encrypted PFX will be decrypted with - * object.passphrase if provided, or options.passphrase if it is not. - */ - pfx?: string | Buffer | Array | undefined; - /** - * Optionally affect the OpenSSL protocol behavior, which is not - * usually necessary. This should be used carefully if at all! Value is - * a numeric bitmask of the SSL_OP_* options from OpenSSL Options - */ - secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options - /** - * Legacy mechanism to select the TLS protocol version to use, it does - * not support independent control of the minimum and maximum version, - * and does not support limiting the protocol to TLSv1.3. Use - * minVersion and maxVersion instead. The possible values are listed as - * SSL_METHODS, use the function names as strings. For example, use - * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow - * any TLS protocol version up to TLSv1.3. It is not recommended to use - * TLS versions less than 1.2, but it may be required for - * interoperability. Default: none, see minVersion. - */ - secureProtocol?: string | undefined; - /** - * Opaque identifier used by servers to ensure session state is not - * shared between applications. Unused by clients. - */ - sessionIdContext?: string | undefined; - /** - * 48-bytes of cryptographically strong pseudo-random data. - * See Session Resumption for more information. - */ - ticketKeys?: Buffer | undefined; - /** - * The number of seconds after which a TLS session created by the - * server will no longer be resumable. See Session Resumption for more - * information. Default: 300. - */ - sessionTimeout?: number | undefined; - } - interface SecureContext { - context: any; - } - /** - * Verifies the certificate `cert` is issued to `hostname`. - * - * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on - * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type). - * - * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as - * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead. - * - * This function can be overwritten by providing an alternative function as the `options.checkServerIdentity` option that is passed to `tls.connect()`. The - * overwriting function can call `tls.checkServerIdentity()` of course, to augment - * the checks done with additional verification. - * - * This function is only called if the certificate passed all other checks, such as - * being issued by trusted CA (`options.ca`). - * - * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name - * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use - * a custom `options.checkServerIdentity` function that implements the desired behavior. - * @since v0.8.4 - * @param hostname The host name or IP address to verify the certificate against. - * @param cert A `certificate object` representing the peer's certificate. - */ - function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined; - /** - * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is - * automatically set as a listener for the `'secureConnection'` event. - * - * The `ticketKeys` options is automatically shared between `node:cluster` module - * workers. - * - * The following illustrates a simple echo server: - * - * ```js - * import tls from 'node:tls'; - * import fs from 'node:fs'; - * - * const options = { - * key: fs.readFileSync('server-key.pem'), - * cert: fs.readFileSync('server-cert.pem'), - * - * // This is necessary only if using client certificate authentication. - * requestCert: true, - * - * // This is necessary only if the client uses a self-signed certificate. - * ca: [ fs.readFileSync('client-cert.pem') ], - * }; - * - * const server = tls.createServer(options, (socket) => { - * console.log('server connected', - * socket.authorized ? 'authorized' : 'unauthorized'); - * socket.write('welcome!\n'); - * socket.setEncoding('utf8'); - * socket.pipe(socket); - * }); - * server.listen(8000, () => { - * console.log('server bound'); - * }); - * ``` - * - * The server can be tested by connecting to it using the example client from {@link connect}. - * @since v0.3.2 - */ - function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; - function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; - /** - * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event. - * - * `tls.connect()` returns a {@link TLSSocket} object. - * - * Unlike the `https` API, `tls.connect()` does not enable the - * SNI (Server Name Indication) extension by default, which may cause some - * servers to return an incorrect certificate or reject the connection - * altogether. To enable SNI, set the `servername` option in addition - * to `host`. - * - * The following illustrates a client for the echo server example from {@link createServer}: - * - * ```js - * // Assumes an echo server that is listening on port 8000. - * import tls from 'node:tls'; - * import fs from 'node:fs'; - * - * const options = { - * // Necessary only if the server requires client certificate authentication. - * key: fs.readFileSync('client-key.pem'), - * cert: fs.readFileSync('client-cert.pem'), - * - * // Necessary only if the server uses a self-signed certificate. - * ca: [ fs.readFileSync('server-cert.pem') ], - * - * // Necessary only if the server's cert isn't for "localhost". - * checkServerIdentity: () => { return null; }, - * }; - * - * const socket = tls.connect(8000, options, () => { - * console.log('client connected', - * socket.authorized ? 'authorized' : 'unauthorized'); - * process.stdin.pipe(socket); - * process.stdin.resume(); - * }); - * socket.setEncoding('utf8'); - * socket.on('data', (data) => { - * console.log(data); - * }); - * socket.on('end', () => { - * console.log('server ends connection'); - * }); - * ``` - * @since v0.11.3 - */ - function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; - function connect( - port: number, - host?: string, - options?: ConnectionOptions, - secureConnectListener?: () => void, - ): TLSSocket; - function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; - /** - * `{@link createServer}` sets the default value of the `honorCipherOrder` option - * to `true`, other APIs that create secure contexts leave it unset. - * - * `{@link createServer}` uses a 128 bit truncated SHA1 hash value generated - * from `process.argv` as the default value of the `sessionIdContext` option, other - * APIs that create secure contexts have no default value. - * - * The `tls.createSecureContext()` method creates a `SecureContext` object. It is - * usable as an argument to several `tls` APIs, such as `server.addContext()`, - * but has no public methods. The {@link Server} constructor and the {@link createServer} method do not support the `secureContext` option. - * - * A key is _required_ for ciphers that use certificates. Either `key` or `pfx` can be used to provide it. - * - * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of - * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt). - * - * Custom DHE parameters are discouraged in favor of the new `dhparam: 'auto' `option. When set to `'auto'`, well-known DHE parameters of sufficient strength - * will be selected automatically. Otherwise, if necessary, `openssl dhparam` can - * be used to create custom parameters. The key length must be greater than or - * equal to 1024 bits or else an error will be thrown. Although 1024 bits is - * permissible, use 2048 bits or larger for stronger security. - * @since v0.11.13 - */ - function createSecureContext(options?: SecureContextOptions): SecureContext; - /** - * Returns an array containing the CA certificates from various sources, depending on `type`: - * - * * `"default"`: return the CA certificates that will be used by the Node.js TLS clients by default. - * * When `--use-bundled-ca` is enabled (default), or `--use-openssl-ca` is not enabled, - * this would include CA certificates from the bundled Mozilla CA store. - * * When `--use-system-ca` is enabled, this would also include certificates from the system's - * trusted store. - * * When `NODE_EXTRA_CA_CERTS` is used, this would also include certificates loaded from the specified - * file. - * * `"system"`: return the CA certificates that are loaded from the system's trusted store, according - * to rules set by `--use-system-ca`. This can be used to get the certificates from the system - * when `--use-system-ca` is not enabled. - * * `"bundled"`: return the CA certificates from the bundled Mozilla CA store. This would be the same - * as `tls.rootCertificates`. - * * `"extra"`: return the CA certificates loaded from `NODE_EXTRA_CA_CERTS`. It's an empty array if - * `NODE_EXTRA_CA_CERTS` is not set. - * @since v22.15.0 - * @param type The type of CA certificates that will be returned. Valid values - * are `"default"`, `"system"`, `"bundled"` and `"extra"`. - * **Default:** `"default"`. - * @returns An array of PEM-encoded certificates. The array may contain duplicates - * if the same certificate is repeatedly stored in multiple sources. - */ - function getCACertificates(type?: "default" | "system" | "bundled" | "extra"): string[]; - /** - * Returns an array with the names of the supported TLS ciphers. The names are - * lower-case for historical reasons, but must be uppercased to be used in - * the `ciphers` option of `{@link createSecureContext}`. - * - * Not all supported ciphers are enabled by default. See - * [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v25.x/api/tls.html#modifying-the-default-tls-cipher-suite). - * - * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for - * TLSv1.2 and below. - * - * ```js - * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...] - * ``` - * @since v0.10.2 - */ - function getCiphers(): string[]; - /** - * Sets the default CA certificates used by Node.js TLS clients. If the provided - * certificates are parsed successfully, they will become the default CA - * certificate list returned by {@link getCACertificates} and used - * by subsequent TLS connections that don't specify their own CA certificates. - * The certificates will be deduplicated before being set as the default. - * - * This function only affects the current Node.js thread. Previous - * sessions cached by the HTTPS agent won't be affected by this change, so - * this method should be called before any unwanted cachable TLS connections are - * made. - * - * To use system CA certificates as the default: - * - * ```js - * import tls from 'node:tls'; - * tls.setDefaultCACertificates(tls.getCACertificates('system')); - * ``` - * - * This function completely replaces the default CA certificate list. To add additional - * certificates to the existing defaults, get the current certificates and append to them: - * - * ```js - * import tls from 'node:tls'; - * const currentCerts = tls.getCACertificates('default'); - * const additionalCerts = ['-----BEGIN CERTIFICATE-----\n...']; - * tls.setDefaultCACertificates([...currentCerts, ...additionalCerts]); - * ``` - * @since v24.5.0 - * @param certs An array of CA certificates in PEM format. - */ - function setDefaultCACertificates(certs: ReadonlyArray): void; - /** - * The default curve name to use for ECDH key agreement in a tls server. - * The default value is `'auto'`. See `{@link createSecureContext()}` for further - * information. - * @since v0.11.13 - */ - let DEFAULT_ECDH_CURVE: string; - /** - * The default value of the `maxVersion` option of `{@link createSecureContext()}`. - * It can be assigned any of the supported TLS protocol versions, - * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.3'`, unless - * changed using CLI options. Using `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using - * `--tls-max-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options - * are provided, the highest maximum is used. - * @since v11.4.0 - */ - let DEFAULT_MAX_VERSION: SecureVersion; - /** - * The default value of the `minVersion` option of `{@link createSecureContext()}`. - * It can be assigned any of the supported TLS protocol versions, - * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.2'`, unless - * changed using CLI options. Using `--tls-min-v1.0` sets the default to - * `'TLSv1'`. Using `--tls-min-v1.1` sets the default to `'TLSv1.1'`. Using - * `--tls-min-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options - * are provided, the lowest minimum is used. - * @since v11.4.0 - */ - let DEFAULT_MIN_VERSION: SecureVersion; - /** - * The default value of the `ciphers` option of `{@link createSecureContext()}`. - * It can be assigned any of the supported OpenSSL ciphers. - * Defaults to the content of `crypto.constants.defaultCoreCipherList`, unless - * changed using CLI options using `--tls-default-ciphers`. - * @since v19.8.0 - */ - let DEFAULT_CIPHERS: string; - /** - * An immutable array of strings representing the root certificates (in PEM format) - * from the bundled Mozilla CA store as supplied by the current Node.js version. - * - * The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store - * that is fixed at release time. It is identical on all supported platforms. - * @since v12.3.0 - */ - const rootCertificates: readonly string[]; -} -declare module "tls" { - export * from "node:tls"; -} diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts deleted file mode 100644 index 5fa7a39..0000000 --- a/node_modules/@types/node/trace_events.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -declare module "node:trace_events" { - /** - * The `Tracing` object is used to enable or disable tracing for sets of - * categories. Instances are created using the - * `trace_events.createTracing()` method. - * - * When created, the `Tracing` object is disabled. Calling the - * `tracing.enable()` method adds the categories to the set of enabled trace - * event categories. Calling `tracing.disable()` will remove the categories - * from the set of enabled trace event categories. - */ - interface Tracing { - /** - * A comma-separated list of the trace event categories covered by this - * `Tracing` object. - * @since v10.0.0 - */ - readonly categories: string; - /** - * Disables this `Tracing` object. - * - * Only trace event categories _not_ covered by other enabled `Tracing` - * objects and _not_ specified by the `--trace-event-categories` flag - * will be disabled. - * - * ```js - * import trace_events from 'node:trace_events'; - * const t1 = trace_events.createTracing({ categories: ['node', 'v8'] }); - * const t2 = trace_events.createTracing({ categories: ['node.perf', 'node'] }); - * t1.enable(); - * t2.enable(); - * - * // Prints 'node,node.perf,v8' - * console.log(trace_events.getEnabledCategories()); - * - * t2.disable(); // Will only disable emission of the 'node.perf' category - * - * // Prints 'node,v8' - * console.log(trace_events.getEnabledCategories()); - * ``` - * @since v10.0.0 - */ - disable(): void; - /** - * Enables this `Tracing` object for the set of categories covered by - * the `Tracing` object. - * @since v10.0.0 - */ - enable(): void; - /** - * `true` only if the `Tracing` object has been enabled. - * @since v10.0.0 - */ - readonly enabled: boolean; - } - interface CreateTracingOptions { - /** - * An array of trace category names. Values included in the array are - * coerced to a string when possible. An error will be thrown if the - * value cannot be coerced. - */ - categories: string[]; - } - /** - * Creates and returns a `Tracing` object for the given set of `categories`. - * - * ```js - * import trace_events from 'node:trace_events'; - * const categories = ['node.perf', 'node.async_hooks']; - * const tracing = trace_events.createTracing({ categories }); - * tracing.enable(); - * // do stuff - * tracing.disable(); - * ``` - * @since v10.0.0 - */ - function createTracing(options: CreateTracingOptions): Tracing; - /** - * Returns a comma-separated list of all currently-enabled trace event - * categories. The current set of enabled trace event categories is determined - * by the _union_ of all currently-enabled `Tracing` objects and any categories - * enabled using the `--trace-event-categories` flag. - * - * Given the file `test.js` below, the command `node --trace-event-categories node.perf test.js` will print `'node.async_hooks,node.perf'` to the console. - * - * ```js - * import trace_events from 'node:trace_events'; - * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] }); - * const t2 = trace_events.createTracing({ categories: ['node.perf'] }); - * const t3 = trace_events.createTracing({ categories: ['v8'] }); - * - * t1.enable(); - * t2.enable(); - * - * console.log(trace_events.getEnabledCategories()); - * ``` - * @since v10.0.0 - */ - function getEnabledCategories(): string | undefined; -} -declare module "trace_events" { - export * from "node:trace_events"; -} diff --git a/node_modules/@types/node/ts5.6/buffer.buffer.d.ts b/node_modules/@types/node/ts5.6/buffer.buffer.d.ts deleted file mode 100644 index 118041b..0000000 --- a/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +++ /dev/null @@ -1,462 +0,0 @@ -declare module "node:buffer" { - global { - interface BufferConstructor { - // see ../buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. - */ - new(str: string, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). - */ - new(size: number): Buffer; - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. - */ - new(array: ArrayLike): Buffer; - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}/{SharedArrayBuffer}. - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. - */ - new(arrayBuffer: ArrayBufferLike): Buffer; - /** - * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. - * Array entries outside that range will be truncated to fit into it. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. - * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); - * ``` - * - * If `array` is an `Array`-like object (that is, one with a `length` property of - * type `number`), it is treated as if it is an array, unless it is a `Buffer` or - * a `Uint8Array`. This means all other `TypedArray` variants get treated as an - * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use - * `Buffer.copyBytesFrom()`. - * - * A `TypeError` will be thrown if `array` is not an `Array` or another type - * appropriate for `Buffer.from()` variants. - * - * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal - * `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v5.10.0 - */ - from(array: WithImplicitCoercion>): Buffer; - /** - * This creates a view of the `ArrayBuffer` without copying the underlying - * memory. For example, when passed a reference to the `.buffer` property of a - * `TypedArray` instance, the newly created `Buffer` will share the same - * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const arr = new Uint16Array(2); - * - * arr[0] = 5000; - * arr[1] = 4000; - * - * // Shares memory with `arr`. - * const buf = Buffer.from(arr.buffer); - * - * console.log(buf); - * // Prints: - * - * // Changing the original Uint16Array changes the Buffer also. - * arr[1] = 6000; - * - * console.log(buf); - * // Prints: - * ``` - * - * The optional `byteOffset` and `length` arguments specify a memory range within - * the `arrayBuffer` that will be shared by the `Buffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const ab = new ArrayBuffer(10); - * const buf = Buffer.from(ab, 0, 2); - * - * console.log(buf.length); - * // Prints: 2 - * ``` - * - * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a - * `SharedArrayBuffer` or another type appropriate for `Buffer.from()` - * variants. - * - * It is important to remember that a backing `ArrayBuffer` can cover a range - * of memory that extends beyond the bounds of a `TypedArray` view. A new - * `Buffer` created using the `buffer` property of a `TypedArray` may extend - * beyond the range of the `TypedArray`: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements - * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements - * console.log(arrA.buffer === arrB.buffer); // true - * - * const buf = Buffer.from(arrB.buffer); - * console.log(buf); - * // Prints: - * ``` - * @since v5.10.0 - * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the - * `.buffer` property of a `TypedArray`. - * @param byteOffset Index of first byte to expose. **Default:** `0`. - * @param length Number of bytes to expose. **Default:** - * `arrayBuffer.byteLength - byteOffset`. - */ - from( - arrayBuffer: WithImplicitCoercion, - byteOffset?: number, - length?: number, - ): Buffer; - /** - * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies - * the character encoding to be used when converting `string` into bytes. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('this is a tést'); - * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); - * - * console.log(buf1.toString()); - * // Prints: this is a tést - * console.log(buf2.toString()); - * // Prints: this is a tést - * console.log(buf1.toString('latin1')); - * // Prints: this is a tést - * ``` - * - * A `TypeError` will be thrown if `string` is not a string or another type - * appropriate for `Buffer.from()` variants. - * - * `Buffer.from(string)` may also use the internal `Buffer` pool like - * `Buffer.allocUnsafe()` does. - * @since v5.10.0 - * @param string A string to encode. - * @param encoding The encoding of `string`. **Default:** `'utf8'`. - */ - from(string: WithImplicitCoercion, encoding?: BufferEncoding): Buffer; - from(arrayOrString: WithImplicitCoercion | string>): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param values to create a new Buffer - */ - of(...items: number[]): Buffer; - /** - * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. - * - * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. - * - * If `totalLength` is not provided, it is calculated from the `Buffer` instances - * in `list` by adding their lengths. - * - * If `totalLength` is provided, it must be an unsigned integer. If the - * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is - * truncated to `totalLength`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a single `Buffer` from a list of three `Buffer` instances. - * - * const buf1 = Buffer.alloc(10); - * const buf2 = Buffer.alloc(14); - * const buf3 = Buffer.alloc(18); - * const totalLength = buf1.length + buf2.length + buf3.length; - * - * console.log(totalLength); - * // Prints: 42 - * - * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); - * - * console.log(bufA); - * // Prints: - * console.log(bufA.length); - * // Prints: 42 - * ``` - * - * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v0.7.11 - * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. - * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. - */ - concat(list: readonly Uint8Array[], totalLength?: number): Buffer; - /** - * Copies the underlying memory of `view` into a new `Buffer`. - * - * ```js - * const u16 = new Uint16Array([0, 0xffff]); - * const buf = Buffer.copyBytesFrom(u16, 1, 1); - * u16[1] = 0; - * console.log(buf.length); // 2 - * console.log(buf[0]); // 255 - * console.log(buf[1]); // 255 - * ``` - * @since v19.8.0 - * @param view The {TypedArray} to copy. - * @param [offset=0] The starting offset within `view`. - * @param [length=view.length - offset] The number of elements from `view` to copy. - */ - copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5); - * - * console.log(buf); - * // Prints: - * ``` - * - * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5, 'a'); - * - * console.log(buf); - * // Prints: - * ``` - * - * If both `fill` and `encoding` are specified, the allocated `Buffer` will be - * initialized by calling `buf.fill(fill, encoding)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); - * - * console.log(buf); - * // Prints: - * ``` - * - * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance - * contents will never contain sensitive data from previous allocations, including - * data that might not have been allocated for `Buffer`s. - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - * @param [fill=0] A value to pre-fill the new `Buffer` with. - * @param [encoding='utf8'] If `fill` is a string, this is its encoding. - */ - alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(10); - * - * console.log(buf); - * // Prints (contents may vary): - * - * buf.fill(0); - * - * console.log(buf); - * // Prints: - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * - * The `Buffer` module pre-allocates an internal `Buffer` instance of - * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, - * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). - * - * Use of this pre-allocated internal memory pool is a key difference between - * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. - * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less - * than or equal to half `Buffer.poolSize`. The - * difference is subtle but can be important when an application requires the - * additional performance that `Buffer.allocUnsafe()` provides. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafe(size: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if - * `size` is 0. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize - * such `Buffer` instances with zeroes. - * - * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, - * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This - * allows applications to avoid the garbage collection overhead of creating many - * individually allocated `Buffer` instances. This approach improves both - * performance and memory usage by eliminating the need to track and clean up as - * many individual `ArrayBuffer` objects. - * - * However, in the case where a developer may need to retain a small chunk of - * memory from a pool for an indeterminate amount of time, it may be appropriate - * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and - * then copying out the relevant bits. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Need to keep around a few small chunks of memory. - * const store = []; - * - * socket.on('readable', () => { - * let data; - * while (null !== (data = readable.read())) { - * // Allocate for retained data. - * const sb = Buffer.allocUnsafeSlow(10); - * - * // Copy the data into the new allocation. - * data.copy(sb, 0, 0, 10); - * - * store.push(sb); - * } - * }); - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.12.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafeSlow(size: number): Buffer; - } - interface Buffer extends Uint8Array { - // see ../buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * This method is not compatible with the `Uint8Array.prototype.slice()`, - * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * const copiedBuf = Uint8Array.prototype.slice.call(buf); - * copiedBuf[0]++; - * console.log(copiedBuf.toString()); - * // Prints: cuffer - * - * console.log(buf.toString()); - * // Prints: buffer - * - * // With buf.slice(), the original buffer is modified. - * const notReallyCopiedBuf = buf.slice(); - * notReallyCopiedBuf[0]++; - * console.log(notReallyCopiedBuf.toString()); - * // Prints: cuffer - * console.log(buf.toString()); - * // Also prints: cuffer (!) - * ``` - * @since v0.3.0 - * @deprecated Use `subarray` instead. - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - slice(start?: number, end?: number): Buffer; - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * Specifying `end` greater than `buf.length` will return the same result as - * that of `end` equal to `buf.length`. - * - * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). - * - * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte - * // from the original `Buffer`. - * - * const buf1 = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * const buf2 = buf1.subarray(0, 3); - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: abc - * - * buf1[0] = 33; - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: !bc - * ``` - * - * Specifying negative indexes causes the slice to be generated relative to the - * end of `buf` rather than the beginning. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * console.log(buf.subarray(-6, -1).toString()); - * // Prints: buffe - * // (Equivalent to buf.subarray(0, 5).) - * - * console.log(buf.subarray(-6, -2).toString()); - * // Prints: buff - * // (Equivalent to buf.subarray(0, 4).) - * - * console.log(buf.subarray(-5, -2).toString()); - * // Prints: uff - * // (Equivalent to buf.subarray(1, 4).) - * ``` - * @since v3.0.0 - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - subarray(start?: number, end?: number): Buffer; - } - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedBuffer = Buffer; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type AllowSharedBuffer = Buffer; - } -} diff --git a/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts b/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts deleted file mode 100644 index f148cc4..0000000 --- a/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -// Interface declaration for Float16Array, required in @types/node v24+. -// These definitions are specific to TS <=5.6. - -// This needs all of the "common" properties/methods of the TypedArrays, -// otherwise the type unions `TypedArray` and `ArrayBufferView` will be -// empty objects. -interface Float16Array extends Pick { - readonly BYTES_PER_ELEMENT: number; - readonly buffer: ArrayBufferLike; - readonly byteLength: number; - readonly byteOffset: number; - readonly length: number; - readonly [Symbol.toStringTag]: "Float16Array"; - at(index: number): number | undefined; - copyWithin(target: number, start: number, end?: number): this; - every(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean; - fill(value: number, start?: number, end?: number): this; - filter(predicate: (value: number, index: number, array: Float16Array) => any, thisArg?: any): Float16Array; - find(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number | undefined; - findIndex(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number; - findLast( - predicate: (value: number, index: number, array: Float16Array) => value is S, - thisArg?: any, - ): S | undefined; - findLast( - predicate: (value: number, index: number, array: Float16Array) => unknown, - thisArg?: any, - ): number | undefined; - findLastIndex(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): number; - forEach(callbackfn: (value: number, index: number, array: Float16Array) => void, thisArg?: any): void; - includes(searchElement: number, fromIndex?: number): boolean; - indexOf(searchElement: number, fromIndex?: number): number; - join(separator?: string): string; - lastIndexOf(searchElement: number, fromIndex?: number): number; - map(callbackfn: (value: number, index: number, array: Float16Array) => number, thisArg?: any): Float16Array; - reduce( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, - ): number; - reduce( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, - initialValue: number, - ): number; - reduce( - callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U, - initialValue: U, - ): U; - reduceRight( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, - ): number; - reduceRight( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, - initialValue: number, - ): number; - reduceRight( - callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U, - initialValue: U, - ): U; - reverse(): Float16Array; - set(array: ArrayLike, offset?: number): void; - slice(start?: number, end?: number): Float16Array; - some(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean; - sort(compareFn?: (a: number, b: number) => number): this; - subarray(begin?: number, end?: number): Float16Array; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - toReversed(): Float16Array; - toSorted(compareFn?: (a: number, b: number) => number): Float16Array; - toString(): string; - valueOf(): Float16Array; - with(index: number, value: number): Float16Array; - [index: number]: number; -} diff --git a/node_modules/@types/node/ts5.6/globals.typedarray.d.ts b/node_modules/@types/node/ts5.6/globals.typedarray.d.ts deleted file mode 100644 index 57a1ab4..0000000 --- a/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -export {}; // Make this a module - -declare global { - namespace NodeJS { - type TypedArray = - | Uint8Array - | Uint8ClampedArray - | Uint16Array - | Uint32Array - | Int8Array - | Int16Array - | Int32Array - | BigUint64Array - | BigInt64Array - | Float16Array - | Float32Array - | Float64Array; - type ArrayBufferView = TypedArray | DataView; - - type NonSharedUint8Array = Uint8Array; - type NonSharedUint8ClampedArray = Uint8ClampedArray; - type NonSharedUint16Array = Uint16Array; - type NonSharedUint32Array = Uint32Array; - type NonSharedInt8Array = Int8Array; - type NonSharedInt16Array = Int16Array; - type NonSharedInt32Array = Int32Array; - type NonSharedBigUint64Array = BigUint64Array; - type NonSharedBigInt64Array = BigInt64Array; - type NonSharedFloat16Array = Float16Array; - type NonSharedFloat32Array = Float32Array; - type NonSharedFloat64Array = Float64Array; - type NonSharedDataView = DataView; - type NonSharedTypedArray = TypedArray; - type NonSharedArrayBufferView = ArrayBufferView; - } -} diff --git a/node_modules/@types/node/ts5.6/index.d.ts b/node_modules/@types/node/ts5.6/index.d.ts deleted file mode 100644 index c088541..0000000 --- a/node_modules/@types/node/ts5.6/index.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -/** - * License for programmatically and manually incorporated - * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc - * - * Copyright Node.js contributors. All rights reserved. - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -// NOTE: These definitions support Node.js and TypeScript 5.2 through 5.6. - -// Reference required TypeScript libraries: -/// -/// - -// TypeScript library polyfills required for TypeScript <=5.6: -/// - -// Iterator definitions required for compatibility with TypeScript <5.6: -/// - -// Definitions for Node.js modules specific to TypeScript <=5.6: -/// -/// - -// Definitions for Node.js modules that are not specific to any version of TypeScript: -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts b/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts deleted file mode 100644 index 110b1eb..0000000 --- a/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -// Interface declaration for Float16Array, required in @types/node v24+. -// These definitions are specific to TS 5.7. - -// This needs all of the "common" properties/methods of the TypedArrays, -// otherwise the type unions `TypedArray` and `ArrayBufferView` will be -// empty objects. -interface Float16Array { - readonly BYTES_PER_ELEMENT: number; - readonly buffer: TArrayBuffer; - readonly byteLength: number; - readonly byteOffset: number; - readonly length: number; - readonly [Symbol.toStringTag]: "Float16Array"; - at(index: number): number | undefined; - copyWithin(target: number, start: number, end?: number): this; - entries(): ArrayIterator<[number, number]>; - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - fill(value: number, start?: number, end?: number): this; - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float16Array; - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - findLast( - predicate: (value: number, index: number, array: this) => value is S, - thisArg?: any, - ): S | undefined; - findLast(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number | undefined; - findLastIndex(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number; - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - includes(searchElement: number, fromIndex?: number): boolean; - indexOf(searchElement: number, fromIndex?: number): number; - join(separator?: string): string; - keys(): ArrayIterator; - lastIndexOf(searchElement: number, fromIndex?: number): number; - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float16Array; - reduce( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, - ): number; - reduce( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, - initialValue: number, - ): number; - reduce( - callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, - initialValue: U, - ): U; - reduceRight( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, - ): number; - reduceRight( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, - initialValue: number, - ): number; - reduceRight( - callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, - initialValue: U, - ): U; - reverse(): this; - set(array: ArrayLike, offset?: number): void; - slice(start?: number, end?: number): Float16Array; - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - sort(compareFn?: (a: number, b: number) => number): this; - subarray(begin?: number, end?: number): Float16Array; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - toReversed(): Float16Array; - toSorted(compareFn?: (a: number, b: number) => number): Float16Array; - toString(): string; - valueOf(): this; - values(): ArrayIterator; - with(index: number, value: number): Float16Array; - [Symbol.iterator](): ArrayIterator; - [index: number]: number; -} diff --git a/node_modules/@types/node/ts5.7/index.d.ts b/node_modules/@types/node/ts5.7/index.d.ts deleted file mode 100644 index 2510b2e..0000000 --- a/node_modules/@types/node/ts5.7/index.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -/** - * License for programmatically and manually incorporated - * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc - * - * Copyright Node.js contributors. All rights reserved. - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -// NOTE: These definitions support Node.js and TypeScript 5.7. - -// Reference required TypeScript libraries: -/// -/// - -// TypeScript library polyfills required for TypeScript 5.7: -/// - -// Iterator definitions required for compatibility with TypeScript <5.6: -/// - -// Definitions for Node.js modules specific to TypeScript 5.7+: -/// -/// - -// Definitions for Node.js modules that are not specific to any version of TypeScript: -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts deleted file mode 100644 index 39b4a7f..0000000 --- a/node_modules/@types/node/tty.d.ts +++ /dev/null @@ -1,225 +0,0 @@ -declare module "node:tty" { - import * as net from "node:net"; - /** - * The `tty.isatty()` method returns `true` if the given `fd` is associated with - * a TTY and `false` if it is not, including whenever `fd` is not a non-negative - * integer. - * @since v0.5.8 - * @param fd A numeric file descriptor - */ - function isatty(fd: number): boolean; - /** - * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js - * process and there should be no reason to create additional instances. - * @since v0.5.8 - */ - class ReadStream extends net.Socket { - constructor(fd: number, options?: net.SocketConstructorOpts); - /** - * A `boolean` that is `true` if the TTY is currently configured to operate as a - * raw device. - * - * This flag is always `false` when a process starts, even if the terminal is - * operating in raw mode. Its value will change with subsequent calls to `setRawMode`. - * @since v0.7.7 - */ - isRaw: boolean; - /** - * Allows configuration of `tty.ReadStream` so that it operates as a raw device. - * - * When in raw mode, input is always available character-by-character, not - * including modifiers. Additionally, all special processing of characters by the - * terminal is disabled, including echoing input - * characters. Ctrl+C will no longer cause a `SIGINT` when - * in this mode. - * @since v0.7.7 - * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw` - * property will be set to the resulting mode. - * @return The read stream instance. - */ - setRawMode(mode: boolean): this; - /** - * A `boolean` that is always `true` for `tty.ReadStream` instances. - * @since v0.5.8 - */ - isTTY: boolean; - } - /** - * -1 - to the left from cursor - * 0 - the entire line - * 1 - to the right from cursor - */ - type Direction = -1 | 0 | 1; - interface WriteStreamEventMap extends net.SocketEventMap { - "resize": []; - } - /** - * Represents the writable side of a TTY. In normal circumstances, `process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there - * should be no reason to create additional instances. - * @since v0.5.8 - */ - class WriteStream extends net.Socket { - constructor(fd: number); - /** - * `writeStream.clearLine()` clears the current line of this `WriteStream` in a - * direction identified by `dir`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - clearLine(dir: Direction, callback?: () => void): boolean; - /** - * `writeStream.clearScreenDown()` clears this `WriteStream` from the current - * cursor down. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - clearScreenDown(callback?: () => void): boolean; - /** - * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified - * position. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - cursorTo(x: number, y?: number, callback?: () => void): boolean; - cursorTo(x: number, callback: () => void): boolean; - /** - * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its - * current position. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - moveCursor(dx: number, dy: number, callback?: () => void): boolean; - /** - * Returns: - * - * * `1` for 2, - * * `4` for 16, - * * `8` for 256, - * * `24` for 16,777,216 colors supported. - * - * Use this to determine what colors the terminal supports. Due to the nature of - * colors in terminals it is possible to either have false positives or false - * negatives. It depends on process information and the environment variables that - * may lie about what terminal is used. - * It is possible to pass in an `env` object to simulate the usage of a specific - * terminal. This can be useful to check how specific environment settings behave. - * - * To enforce a specific color support, use one of the below environment settings. - * - * * 2 colors: `FORCE_COLOR = 0` (Disables colors) - * * 16 colors: `FORCE_COLOR = 1` - * * 256 colors: `FORCE_COLOR = 2` - * * 16,777,216 colors: `FORCE_COLOR = 3` - * - * Disabling color support is also possible by using the `NO_COLOR` and `NODE_DISABLE_COLORS` environment variables. - * @since v9.9.0 - * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. - */ - getColorDepth(env?: object): number; - /** - * Returns `true` if the `writeStream` supports at least as many colors as provided - * in `count`. Minimum support is 2 (black and white). - * - * This has the same false positives and negatives as described in `writeStream.getColorDepth()`. - * - * ```js - * process.stdout.hasColors(); - * // Returns true or false depending on if `stdout` supports at least 16 colors. - * process.stdout.hasColors(256); - * // Returns true or false depending on if `stdout` supports at least 256 colors. - * process.stdout.hasColors({ TMUX: '1' }); - * // Returns true. - * process.stdout.hasColors(2 ** 24, { TMUX: '1' }); - * // Returns false (the environment setting pretends to support 2 ** 8 colors). - * ``` - * @since v11.13.0, v10.16.0 - * @param [count=16] The number of colors that are requested (minimum 2). - * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. - */ - hasColors(count?: number): boolean; - hasColors(env?: object): boolean; - hasColors(count: number, env?: object): boolean; - /** - * `writeStream.getWindowSize()` returns the size of the TTY - * corresponding to this `WriteStream`. The array is of the type `[numColumns, numRows]` where `numColumns` and `numRows` represent the number - * of columns and rows in the corresponding TTY. - * @since v0.7.7 - */ - getWindowSize(): [number, number]; - /** - * A `number` specifying the number of columns the TTY currently has. This property - * is updated whenever the `'resize'` event is emitted. - * @since v0.7.7 - */ - columns: number; - /** - * A `number` specifying the number of rows the TTY currently has. This property - * is updated whenever the `'resize'` event is emitted. - * @since v0.7.7 - */ - rows: number; - /** - * A `boolean` that is always `true`. - * @since v0.5.8 - */ - isTTY: boolean; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: WriteStreamEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: WriteStreamEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } -} -declare module "tty" { - export * from "node:tty"; -} diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts deleted file mode 100644 index a464d82..0000000 --- a/node_modules/@types/node/url.d.ts +++ /dev/null @@ -1,556 +0,0 @@ -declare module "node:url" { - import { Blob, NonSharedBuffer } from "node:buffer"; - import { ClientRequestArgs } from "node:http"; - import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring"; - // Input to `url.format` - interface UrlObject { - auth?: string | null | undefined; - hash?: string | null | undefined; - host?: string | null | undefined; - hostname?: string | null | undefined; - href?: string | null | undefined; - pathname?: string | null | undefined; - protocol?: string | null | undefined; - search?: string | null | undefined; - slashes?: boolean | null | undefined; - port?: string | number | null | undefined; - query?: string | null | ParsedUrlQueryInput | undefined; - } - // Output of `url.parse` - interface Url { - auth: string | null; - hash: string | null; - host: string | null; - hostname: string | null; - href: string; - path: string | null; - pathname: string | null; - protocol: string | null; - search: string | null; - slashes: boolean | null; - port: string | null; - query: string | null | ParsedUrlQuery; - } - interface UrlWithParsedQuery extends Url { - query: ParsedUrlQuery; - } - interface UrlWithStringQuery extends Url { - query: string | null; - } - interface FileUrlToPathOptions { - /** - * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. - * @default undefined - * @since v22.1.0 - */ - windows?: boolean | undefined; - } - interface PathToFileUrlOptions { - /** - * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. - * @default undefined - * @since v22.1.0 - */ - windows?: boolean | undefined; - } - /** - * The `url.parse()` method takes a URL string, parses it, and returns a URL - * object. - * - * A `TypeError` is thrown if `urlString` is not a string. - * - * A `URIError` is thrown if the `auth` property is present but cannot be decoded. - * - * `url.parse()` uses a lenient, non-standard algorithm for parsing URL - * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) - * and incorrect handling of usernames and passwords. Do not use with untrusted - * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the - * [WHATWG URL](https://nodejs.org/docs/latest-v25.x/api/url.html#the-whatwg-url-api) API instead, for example: - * - * ```js - * function getURL(req) { - * const proto = req.headers['x-forwarded-proto'] || 'https'; - * const host = req.headers['x-forwarded-host'] || req.headers.host || 'example.com'; - * return new URL(req.url || '/', `${proto}://${host}`); - * } - * ``` - * - * The example above assumes well-formed headers are forwarded from a reverse - * proxy to your Node.js server. If you are not using a reverse proxy, you should - * use the example below: - * - * ```js - * function getURL(req) { - * return new URL(req.url || '/', 'https://example.com'); - * } - * ``` - * @since v0.1.25 - * @deprecated Use the WHATWG URL API instead. - * @param urlString The URL string to parse. - * @param parseQueryString If `true`, the `query` property will always - * be set to an object returned by the [`querystring`](https://nodejs.org/docs/latest-v25.x/api/querystring.html) module's `parse()` - * method. If `false`, the `query` property on the returned URL object will be an - * unparsed, undecoded string. **Default:** `false`. - * @param slashesDenoteHost If `true`, the first token after the literal - * string `//` and preceding the next `/` will be interpreted as the `host`. - * For instance, given `//foo/bar`, the result would be - * `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`. - * **Default:** `false`. - */ - function parse( - urlString: string, - parseQueryString?: false, - slashesDenoteHost?: boolean, - ): UrlWithStringQuery; - function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; - function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; - /** - * The `url.format()` method returns a formatted URL string derived from `urlObject`. - * - * ```js - * import url from 'node:url'; - * url.format({ - * protocol: 'https', - * hostname: 'example.com', - * pathname: '/some/path', - * query: { - * page: 1, - * format: 'json', - * }, - * }); - * - * // => 'https://example.com/some/path?page=1&format=json' - * ``` - * - * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. - * - * The formatting process operates as follows: - * - * * A new empty string `result` is created. - * * If `urlObject.protocol` is a string, it is appended as-is to `result`. - * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. - * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII - * colon (`:`) character, the literal string `:` will be appended to `result`. - * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: - * * `urlObject.slashes` property is true; - * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; - * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string - * and appended to `result` followed by the literal string `@`. - * * If the `urlObject.host` property is `undefined` then: - * * If the `urlObject.hostname` is a string, it is appended to `result`. - * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, - * an `Error` is thrown. - * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: - * * The literal string `:` is appended to `result`, and - * * The value of `urlObject.port` is coerced to a string and appended to `result`. - * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. - * * If the `urlObject.pathname` property is a string that is not an empty string: - * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash - * (`/`), then the literal string `'/'` is appended to `result`. - * * The value of `urlObject.pathname` is appended to `result`. - * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the - * `querystring` module's `stringify()` method passing the value of `urlObject.query`. - * * Otherwise, if `urlObject.search` is a string: - * * If the value of `urlObject.search` _does not start_ with the ASCII question - * mark (`?`) character, the literal string `?` is appended to `result`. - * * The value of `urlObject.search` is appended to `result`. - * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.hash` property is a string: - * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) - * character, the literal string `#` is appended to `result`. - * * The value of `urlObject.hash` is appended to `result`. - * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a - * string, an `Error` is thrown. - * * `result` is returned. - * @since v0.1.25 - * @legacy Use the WHATWG URL API instead. - * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. - */ - function format(urlObject: URL, options?: URLFormatOptions): string; - /** - * The `url.format()` method returns a formatted URL string derived from `urlObject`. - * - * ```js - * import url from 'node:url'; - * url.format({ - * protocol: 'https', - * hostname: 'example.com', - * pathname: '/some/path', - * query: { - * page: 1, - * format: 'json', - * }, - * }); - * - * // => 'https://example.com/some/path?page=1&format=json' - * ``` - * - * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. - * - * The formatting process operates as follows: - * - * * A new empty string `result` is created. - * * If `urlObject.protocol` is a string, it is appended as-is to `result`. - * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. - * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII - * colon (`:`) character, the literal string `:` will be appended to `result`. - * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: - * * `urlObject.slashes` property is true; - * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; - * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string - * and appended to `result` followed by the literal string `@`. - * * If the `urlObject.host` property is `undefined` then: - * * If the `urlObject.hostname` is a string, it is appended to `result`. - * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, - * an `Error` is thrown. - * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: - * * The literal string `:` is appended to `result`, and - * * The value of `urlObject.port` is coerced to a string and appended to `result`. - * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. - * * If the `urlObject.pathname` property is a string that is not an empty string: - * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash - * (`/`), then the literal string `'/'` is appended to `result`. - * * The value of `urlObject.pathname` is appended to `result`. - * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the - * `querystring` module's `stringify()` method passing the value of `urlObject.query`. - * * Otherwise, if `urlObject.search` is a string: - * * If the value of `urlObject.search` _does not start_ with the ASCII question - * mark (`?`) character, the literal string `?` is appended to `result`. - * * The value of `urlObject.search` is appended to `result`. - * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.hash` property is a string: - * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) - * character, the literal string `#` is appended to `result`. - * * The value of `urlObject.hash` is appended to `result`. - * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a - * string, an `Error` is thrown. - * * `result` is returned. - * @since v0.1.25 - * @legacy Use the WHATWG URL API instead. - * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). - */ - function format(urlObject: UrlObject): string; - /** - * `url.format(urlString)` is shorthand for `url.format(url.parse(urlString))`. - * - * Because it invokes the deprecated `url.parse()` internally, passing a string argument - * to `url.format()` is itself deprecated. - * - * Canonicalizing a URL string can be performed using the WHATWG URL API, by - * constructing a new URL object and calling `url.toString()`. - * - * ```js - * import { URL } from 'node:url'; - * - * const unformatted = 'http://[fe80:0:0:0:0:0:0:1]:/a/b?a=b#abc'; - * const formatted = new URL(unformatted).toString(); - * - * console.log(formatted); // Prints: http://[fe80::1]/a/b?a=b#abc - * ``` - * @since v0.1.25 - * @deprecated Use the WHATWG URL API instead. - * @param urlString A string that will be passed to `url.parse()` and then formatted. - */ - function format(urlString: string): string; - /** - * The `url.resolve()` method resolves a target URL relative to a base URL in a - * manner similar to that of a web browser resolving an anchor tag. - * - * ```js - * import url from 'node:url'; - * url.resolve('/one/two/three', 'four'); // '/one/two/four' - * url.resolve('http://example.com/', '/one'); // 'http://example.com/one' - * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' - * ``` - * - * Because it invokes the deprecated `url.parse()` internally, `url.resolve()` is itself deprecated. - * - * To achieve the same result using the WHATWG URL API: - * - * ```js - * function resolve(from, to) { - * const resolvedUrl = new URL(to, new URL(from, 'resolve://')); - * if (resolvedUrl.protocol === 'resolve:') { - * // `from` is a relative URL. - * const { pathname, search, hash } = resolvedUrl; - * return pathname + search + hash; - * } - * return resolvedUrl.toString(); - * } - * - * resolve('/one/two/three', 'four'); // '/one/two/four' - * resolve('http://example.com/', '/one'); // 'http://example.com/one' - * resolve('http://example.com/one', '/two'); // 'http://example.com/two' - * ``` - * @since v0.1.25 - * @deprecated Use the WHATWG URL API instead. - * @param from The base URL to use if `to` is a relative URL. - * @param to The target URL to resolve. - */ - function resolve(from: string, to: string): string; - /** - * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an - * invalid domain, the empty string is returned. - * - * It performs the inverse operation to {@link domainToUnicode}. - * - * ```js - * import url from 'node:url'; - * - * console.log(url.domainToASCII('español.com')); - * // Prints xn--espaol-zwa.com - * console.log(url.domainToASCII('中文.com')); - * // Prints xn--fiq228c.com - * console.log(url.domainToASCII('xn--iñvalid.com')); - * // Prints an empty string - * ``` - * @since v7.4.0, v6.13.0 - */ - function domainToASCII(domain: string): string; - /** - * Returns the Unicode serialization of the `domain`. If `domain` is an invalid - * domain, the empty string is returned. - * - * It performs the inverse operation to {@link domainToASCII}. - * - * ```js - * import url from 'node:url'; - * - * console.log(url.domainToUnicode('xn--espaol-zwa.com')); - * // Prints español.com - * console.log(url.domainToUnicode('xn--fiq228c.com')); - * // Prints 中文.com - * console.log(url.domainToUnicode('xn--iñvalid.com')); - * // Prints an empty string - * ``` - * @since v7.4.0, v6.13.0 - */ - function domainToUnicode(domain: string): string; - /** - * This function ensures the correct decodings of percent-encoded characters as - * well as ensuring a cross-platform valid absolute path string. - * - * ```js - * import { fileURLToPath } from 'node:url'; - * - * const __filename = fileURLToPath(import.meta.url); - * - * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/ - * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows) - * - * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt - * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows) - * - * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt - * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX) - * - * new URL('file:///hello world').pathname; // Incorrect: /hello%20world - * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX) - * ``` - * - * **Security Considerations:** - * - * This function decodes percent-encoded characters, including encoded dot-segments - * (`%2e` as `.` and `%2e%2e` as `..`), and then normalizes the resulting path. - * This means that encoded directory traversal sequences (such as `%2e%2e`) are - * decoded and processed as actual path traversal, even though encoded slashes - * (`%2F`, `%5C`) are correctly rejected. - * - * **Applications must not rely on `fileURLToPath()` alone to prevent directory - * traversal attacks.** Always perform explicit path validation and security checks - * on the returned path value to ensure it remains within expected boundaries - * before using it for file system operations. - * @since v10.12.0 - * @param url The file URL string or URL object to convert to a path. - * @return The fully-resolved platform-specific Node.js file path. - */ - function fileURLToPath(url: string | URL, options?: FileUrlToPathOptions): string; - /** - * Like `url.fileURLToPath(...)` except that instead of returning a string - * representation of the path, a `Buffer` is returned. This conversion is - * helpful when the input URL contains percent-encoded segments that are - * not valid UTF-8 / Unicode sequences. - * - * **Security Considerations:** - * - * This function has the same security considerations as `url.fileURLToPath()`. - * It decodes percent-encoded characters, including encoded dot-segments - * (`%2e` as `.` and `%2e%2e` as `..`), and normalizes the path. **Applications - * must not rely on this function alone to prevent directory traversal attacks.** - * Always perform explicit path validation on the returned buffer value before - * using it for file system operations. - * @since v24.3.0 - * @param url The file URL string or URL object to convert to a path. - * @returns The fully-resolved platform-specific Node.js file path - * as a `Buffer`. - */ - function fileURLToPathBuffer(url: string | URL, options?: FileUrlToPathOptions): NonSharedBuffer; - /** - * This function ensures that `path` is resolved absolutely, and that the URL - * control characters are correctly encoded when converting into a File URL. - * - * ```js - * import { pathToFileURL } from 'node:url'; - * - * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1 - * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX) - * - * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c - * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX) - * ``` - * @since v10.12.0 - * @param path The path to convert to a File URL. - * @return The file URL object. - */ - function pathToFileURL(path: string, options?: PathToFileUrlOptions): URL; - /** - * This utility function converts a URL object into an ordinary options object as - * expected by the `http.request()` and `https.request()` APIs. - * - * ```js - * import { urlToHttpOptions } from 'node:url'; - * const myURL = new URL('https://a:b@測試?abc#foo'); - * - * console.log(urlToHttpOptions(myURL)); - * /* - * { - * protocol: 'https:', - * hostname: 'xn--g6w251d', - * hash: '#foo', - * search: '?abc', - * pathname: '/', - * path: '/?abc', - * href: 'https://a:b@xn--g6w251d/?abc#foo', - * auth: 'a:b' - * } - * - * ``` - * @since v15.7.0, v14.18.0 - * @param url The `WHATWG URL` object to convert to an options object. - * @return Options object - */ - function urlToHttpOptions(url: URL): ClientRequestArgs; - interface URLFormatOptions { - /** - * `true` if the serialized URL string should include the username and password, `false` otherwise. - * @default true - */ - auth?: boolean | undefined; - /** - * `true` if the serialized URL string should include the fragment, `false` otherwise. - * @default true - */ - fragment?: boolean | undefined; - /** - * `true` if the serialized URL string should include the search query, `false` otherwise. - * @default true - */ - search?: boolean | undefined; - /** - * `true` if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to - * being Punycode encoded. - * @default false - */ - unicode?: boolean | undefined; - } - // #region web types - type URLPatternInput = string | URLPatternInit; - interface URLPatternComponentResult { - input: string; - groups: Record; - } - interface URLPatternInit { - protocol?: string; - username?: string; - password?: string; - hostname?: string; - port?: string; - pathname?: string; - search?: string; - hash?: string; - baseURL?: string; - } - interface URLPatternOptions { - ignoreCase?: boolean; - } - interface URLPatternResult { - inputs: URLPatternInput[]; - protocol: URLPatternComponentResult; - username: URLPatternComponentResult; - password: URLPatternComponentResult; - hostname: URLPatternComponentResult; - port: URLPatternComponentResult; - pathname: URLPatternComponentResult; - search: URLPatternComponentResult; - hash: URLPatternComponentResult; - } - interface URL { - hash: string; - host: string; - hostname: string; - href: string; - readonly origin: string; - password: string; - pathname: string; - port: string; - protocol: string; - search: string; - readonly searchParams: URLSearchParams; - username: string; - toJSON(): string; - } - var URL: { - prototype: URL; - new(url: string | URL, base?: string | URL): URL; - canParse(input: string | URL, base?: string | URL): boolean; - createObjectURL(blob: Blob): string; - parse(input: string | URL, base?: string | URL): URL | null; - revokeObjectURL(id: string): void; - }; - interface URLPattern { - readonly hasRegExpGroups: boolean; - readonly hash: string; - readonly hostname: string; - readonly password: string; - readonly pathname: string; - readonly port: string; - readonly protocol: string; - readonly search: string; - readonly username: string; - exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; - test(input?: URLPatternInput, baseURL?: string | URL): boolean; - } - var URLPattern: { - prototype: URLPattern; - new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; - new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; - }; - interface URLSearchParams { - readonly size: number; - append(name: string, value: string): void; - delete(name: string, value?: string): void; - get(name: string): string | null; - getAll(name: string): string[]; - has(name: string, value?: string): boolean; - set(name: string, value: string): void; - sort(): void; - forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void; - [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; - entries(): URLSearchParamsIterator<[string, string]>; - keys(): URLSearchParamsIterator; - values(): URLSearchParamsIterator; - } - var URLSearchParams: { - prototype: URLSearchParams; - new(init?: string[][] | Record | string | URLSearchParams): URLSearchParams; - }; - interface URLSearchParamsIterator extends NodeJS.Iterator { - [Symbol.iterator](): URLSearchParamsIterator; - } - // #endregion -} -declare module "url" { - export * from "node:url"; -} diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts deleted file mode 100644 index 90f12aa..0000000 --- a/node_modules/@types/node/util.d.ts +++ /dev/null @@ -1,1677 +0,0 @@ -declare module "node:util" { - export * as types from "node:util/types"; - export type InspectStyle = - | "special" - | "number" - | "bigint" - | "boolean" - | "undefined" - | "null" - | "string" - | "symbol" - | "date" - | "name" - | "regexp" - | "module"; - export interface InspectStyles extends Record string)> { - regexp: { - (value: string): string; - colors: InspectColor[]; - }; - } - export type InspectColorModifier = - | "reset" - | "bold" - | "dim" - | "italic" - | "underline" - | "blink" - | "inverse" - | "hidden" - | "strikethrough" - | "doubleunderline"; - export type InspectColorForeground = - | "black" - | "red" - | "green" - | "yellow" - | "blue" - | "magenta" - | "cyan" - | "white" - | "gray" - | "redBright" - | "greenBright" - | "yellowBright" - | "blueBright" - | "magentaBright" - | "cyanBright" - | "whiteBright"; - export type InspectColorBackground = `bg${Capitalize}`; - export type InspectColor = InspectColorModifier | InspectColorForeground | InspectColorBackground; - export interface InspectColors extends Record {} - export interface InspectOptions { - /** - * If `true`, object's non-enumerable symbols and properties are included in the formatted result. - * `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties). - * @default false - */ - showHidden?: boolean | undefined; - /** - * Specifies the number of times to recurse while formatting object. - * This is useful for inspecting large objects. - * To recurse up to the maximum call stack size pass `Infinity` or `null`. - * @default 2 - */ - depth?: number | null | undefined; - /** - * If `true`, the output is styled with ANSI color codes. Colors are customizable. - */ - colors?: boolean | undefined; - /** - * If `false`, `[util.inspect.custom](depth, opts, inspect)` functions are not invoked. - * @default true - */ - customInspect?: boolean | undefined; - /** - * If `true`, `Proxy` inspection includes the target and handler objects. - * @default false - */ - showProxy?: boolean | undefined; - /** - * Specifies the maximum number of `Array`, `TypedArray`, `WeakMap`, and `WeakSet` elements - * to include when formatting. Set to `null` or `Infinity` to show all elements. - * Set to `0` or negative to show no elements. - * @default 100 - */ - maxArrayLength?: number | null | undefined; - /** - * Specifies the maximum number of characters to - * include when formatting. Set to `null` or `Infinity` to show all elements. - * Set to `0` or negative to show no characters. - * @default 10000 - */ - maxStringLength?: number | null | undefined; - /** - * The length at which input values are split across multiple lines. - * Set to `Infinity` to format the input as a single line - * (in combination with `compact` set to `true` or any number >= `1`). - * @default 80 - */ - breakLength?: number | undefined; - /** - * Setting this to `false` causes each object key - * to be displayed on a new line. It will also add new lines to text that is - * longer than `breakLength`. If set to a number, the most `n` inner elements - * are united on a single line as long as all properties fit into - * `breakLength`. Short array elements are also grouped together. Note that no - * text will be reduced below 16 characters, no matter the `breakLength` size. - * For more information, see the example below. - * @default true - */ - compact?: boolean | number | undefined; - /** - * If set to `true` or a function, all properties of an object, and `Set` and `Map` - * entries are sorted in the resulting string. - * If set to `true` the default sort is used. - * If set to a function, it is used as a compare function. - */ - sorted?: boolean | ((a: string, b: string) => number) | undefined; - /** - * If set to `true`, getters are going to be - * inspected as well. If set to `'get'` only getters without setter are going - * to be inspected. If set to `'set'` only getters having a corresponding - * setter are going to be inspected. This might cause side effects depending on - * the getter function. - * @default false - */ - getters?: "get" | "set" | boolean | undefined; - /** - * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers. - * @default false - */ - numericSeparator?: boolean | undefined; - } - export interface InspectContext extends Required { - stylize(text: string, styleType: InspectStyle): string; - } - import _inspect = inspect; - export interface Inspectable { - [inspect.custom](depth: number, options: InspectContext, inspect: typeof _inspect): any; - } - // TODO: Remove these in a future major - /** @deprecated Use `InspectStyle` instead. */ - export type Style = Exclude; - /** @deprecated Use the `Inspectable` interface instead. */ - export type CustomInspectFunction = (depth: number, options: InspectContext) => any; - /** @deprecated Use `InspectContext` instead. */ - export interface InspectOptionsStylized extends InspectContext {} - /** @deprecated Use `InspectColorModifier` instead. */ - export type Modifiers = InspectColorModifier; - /** @deprecated Use `InspectColorForeground` instead. */ - export type ForegroundColors = InspectColorForeground; - /** @deprecated Use `InspectColorBackground` instead. */ - export type BackgroundColors = InspectColorBackground; - export interface CallSiteObject { - /** - * Returns the name of the function associated with this call site. - */ - functionName: string; - /** - * Returns the name of the resource that contains the script for the - * function for this call site. - */ - scriptName: string; - /** - * Returns the unique id of the script, as in Chrome DevTools protocol - * [`Runtime.ScriptId`](https://chromedevtools.github.io/devtools-protocol/1-3/Runtime/#type-ScriptId). - * @since v22.14.0 - */ - scriptId: string; - /** - * Returns the number, 1-based, of the line for the associate function call. - */ - lineNumber: number; - /** - * Returns the 1-based column offset on the line for the associated function call. - */ - columnNumber: number; - } - export type DiffEntry = [operation: -1 | 0 | 1, value: string]; - /** - * `util.diff()` compares two string or array values and returns an array of difference entries. - * It uses the Myers diff algorithm to compute minimal differences, which is the same algorithm - * used internally by assertion error messages. - * - * If the values are equal, an empty array is returned. - * - * ```js - * const { diff } = require('node:util'); - * - * // Comparing strings - * const actualString = '12345678'; - * const expectedString = '12!!5!7!'; - * console.log(diff(actualString, expectedString)); - * // [ - * // [0, '1'], - * // [0, '2'], - * // [1, '3'], - * // [1, '4'], - * // [-1, '!'], - * // [-1, '!'], - * // [0, '5'], - * // [1, '6'], - * // [-1, '!'], - * // [0, '7'], - * // [1, '8'], - * // [-1, '!'], - * // ] - * // Comparing arrays - * const actualArray = ['1', '2', '3']; - * const expectedArray = ['1', '3', '4']; - * console.log(diff(actualArray, expectedArray)); - * // [ - * // [0, '1'], - * // [1, '2'], - * // [0, '3'], - * // [-1, '4'], - * // ] - * // Equal values return empty array - * console.log(diff('same', 'same')); - * // [] - * ``` - * @since v22.15.0 - * @experimental - * @param actual The first value to compare - * @param expected The second value to compare - * @returns An array of difference entries. Each entry is an array with two elements: - * * Index 0: `number` Operation code: `-1` for delete, `0` for no-op/unchanged, `1` for insert - * * Index 1: `string` The value associated with the operation - */ - export function diff(actual: string | readonly string[], expected: string | readonly string[]): DiffEntry[]; - /** - * The `util.format()` method returns a formatted string using the first argument - * as a `printf`-like format string which can contain zero or more format - * specifiers. Each specifier is replaced with the converted value from the - * corresponding argument. Supported specifiers are: - * - * If a specifier does not have a corresponding argument, it is not replaced: - * - * ```js - * util.format('%s:%s', 'foo'); - * // Returns: 'foo:%s' - * ``` - * - * Values that are not part of the format string are formatted using `util.inspect()` if their type is not `string`. - * - * If there are more arguments passed to the `util.format()` method than the - * number of specifiers, the extra arguments are concatenated to the returned - * string, separated by spaces: - * - * ```js - * util.format('%s:%s', 'foo', 'bar', 'baz'); - * // Returns: 'foo:bar baz' - * ``` - * - * If the first argument does not contain a valid format specifier, `util.format()` returns a string that is the concatenation of all arguments separated by spaces: - * - * ```js - * util.format(1, 2, 3); - * // Returns: '1 2 3' - * ``` - * - * If only one argument is passed to `util.format()`, it is returned as it is - * without any formatting: - * - * ```js - * util.format('%% %s'); - * // Returns: '%% %s' - * ``` - * - * `util.format()` is a synchronous method that is intended as a debugging tool. - * Some input values can have a significant performance overhead that can block the - * event loop. Use this function with care and never in a hot code path. - * @since v0.5.3 - * @param format A `printf`-like format string. - */ - export function format(format?: any, ...param: any[]): string; - /** - * This function is identical to {@link format}, except in that it takes - * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}. - * - * ```js - * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 }); - * // Returns 'See object { foo: 42 }', where `42` is colored as a number - * // when printed to a terminal. - * ``` - * @since v10.0.0 - */ - export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string; - export interface GetCallSitesOptions { - /** - * Reconstruct the original location in the stacktrace from the source-map. - * Enabled by default with the flag `--enable-source-maps`. - */ - sourceMap?: boolean | undefined; - } - /** - * Returns an array of call site objects containing the stack of - * the caller function. - * - * Unlike accessing an `error.stack`, the result returned from this API is not - * interfered with `Error.prepareStackTrace`. - * - * ```js - * import { getCallSites } from 'node:util'; - * - * function exampleFunction() { - * const callSites = getCallSites(); - * - * console.log('Call Sites:'); - * callSites.forEach((callSite, index) => { - * console.log(`CallSite ${index + 1}:`); - * console.log(`Function Name: ${callSite.functionName}`); - * console.log(`Script Name: ${callSite.scriptName}`); - * console.log(`Line Number: ${callSite.lineNumber}`); - * console.log(`Column Number: ${callSite.columnNumber}`); - * }); - * // CallSite 1: - * // Function Name: exampleFunction - * // Script Name: /home/example.js - * // Line Number: 5 - * // Column Number: 26 - * - * // CallSite 2: - * // Function Name: anotherFunction - * // Script Name: /home/example.js - * // Line Number: 22 - * // Column Number: 3 - * - * // ... - * } - * - * // A function to simulate another stack layer - * function anotherFunction() { - * exampleFunction(); - * } - * - * anotherFunction(); - * ``` - * - * It is possible to reconstruct the original locations by setting the option `sourceMap` to `true`. - * If the source map is not available, the original location will be the same as the current location. - * When the `--enable-source-maps` flag is enabled, for example when using `--experimental-transform-types`, - * `sourceMap` will be true by default. - * - * ```ts - * import { getCallSites } from 'node:util'; - * - * interface Foo { - * foo: string; - * } - * - * const callSites = getCallSites({ sourceMap: true }); - * - * // With sourceMap: - * // Function Name: '' - * // Script Name: example.js - * // Line Number: 7 - * // Column Number: 26 - * - * // Without sourceMap: - * // Function Name: '' - * // Script Name: example.js - * // Line Number: 2 - * // Column Number: 26 - * ``` - * @param frameCount Number of frames to capture as call site objects. - * **Default:** `10`. Allowable range is between 1 and 200. - * @return An array of call site objects - * @since v22.9.0 - */ - export function getCallSites(frameCount?: number, options?: GetCallSitesOptions): CallSiteObject[]; - export function getCallSites(options: GetCallSitesOptions): CallSiteObject[]; - /** - * Returns the string name for a numeric error code that comes from a Node.js API. - * The mapping between error codes and error names is platform-dependent. - * See `Common System Errors` for the names of common errors. - * - * ```js - * fs.access('file/that/does/not/exist', (err) => { - * const name = util.getSystemErrorName(err.errno); - * console.error(name); // ENOENT - * }); - * ``` - * @since v9.7.0 - */ - export function getSystemErrorName(err: number): string; - /** - * Enable or disable printing a stack trace on `SIGINT`. The API is only available on the main thread. - * @since 24.6.0 - */ - export function setTraceSigInt(enable: boolean): void; - /** - * Returns a Map of all system error codes available from the Node.js API. - * The mapping between error codes and error names is platform-dependent. - * See `Common System Errors` for the names of common errors. - * - * ```js - * fs.access('file/that/does/not/exist', (err) => { - * const errorMap = util.getSystemErrorMap(); - * const name = errorMap.get(err.errno); - * console.error(name); // ENOENT - * }); - * ``` - * @since v16.0.0, v14.17.0 - */ - export function getSystemErrorMap(): Map; - /** - * Returns the string message for a numeric error code that comes from a Node.js - * API. - * The mapping between error codes and string messages is platform-dependent. - * - * ```js - * fs.access('file/that/does/not/exist', (err) => { - * const message = util.getSystemErrorMessage(err.errno); - * console.error(message); // no such file or directory - * }); - * ``` - * @since v22.12.0 - */ - export function getSystemErrorMessage(err: number): string; - /** - * Returns the `string` after replacing any surrogate code points - * (or equivalently, any unpaired surrogate code units) with the - * Unicode "replacement character" U+FFFD. - * @since v16.8.0, v14.18.0 - */ - export function toUSVString(string: string): string; - /** - * Creates and returns an `AbortController` instance whose `AbortSignal` is marked - * as transferable and can be used with `structuredClone()` or `postMessage()`. - * @since v18.11.0 - * @returns A transferable AbortController - */ - export function transferableAbortController(): AbortController; - /** - * Marks the given `AbortSignal` as transferable so that it can be used with`structuredClone()` and `postMessage()`. - * - * ```js - * const signal = transferableAbortSignal(AbortSignal.timeout(100)); - * const channel = new MessageChannel(); - * channel.port2.postMessage(signal, [signal]); - * ``` - * @since v18.11.0 - * @param signal The AbortSignal - * @returns The same AbortSignal - */ - export function transferableAbortSignal(signal: AbortSignal): AbortSignal; - /** - * Listens to abort event on the provided `signal` and returns a promise that resolves when the `signal` is aborted. - * If `resource` is provided, it weakly references the operation's associated object, - * so if `resource` is garbage collected before the `signal` aborts, - * then returned promise shall remain pending. - * This prevents memory leaks in long-running or non-cancelable operations. - * - * ```js - * import { aborted } from 'node:util'; - * - * // Obtain an object with an abortable signal, like a custom resource or operation. - * const dependent = obtainSomethingAbortable(); - * - * // Pass `dependent` as the resource, indicating the promise should only resolve - * // if `dependent` is still in memory when the signal is aborted. - * aborted(dependent.signal, dependent).then(() => { - * // This code runs when `dependent` is aborted. - * console.log('Dependent resource was aborted.'); - * }); - * - * // Simulate an event that triggers the abort. - * dependent.on('event', () => { - * dependent.abort(); // This will cause the `aborted` promise to resolve. - * }); - * ``` - * @since v19.7.0 - * @param resource Any non-null object tied to the abortable operation and held weakly. - * If `resource` is garbage collected before the `signal` aborts, the promise remains pending, - * allowing Node.js to stop tracking it. - * This helps prevent memory leaks in long-running or non-cancelable operations. - */ - export function aborted(signal: AbortSignal, resource: any): Promise; - /** - * The `util.inspect()` method returns a string representation of `object` that is - * intended for debugging. The output of `util.inspect` may change at any time - * and should not be depended upon programmatically. Additional `options` may be - * passed that alter the result. - * `util.inspect()` will use the constructor's name and/or `Symbol.toStringTag` - * property to make an identifiable tag for an inspected value. - * - * ```js - * class Foo { - * get [Symbol.toStringTag]() { - * return 'bar'; - * } - * } - * - * class Bar {} - * - * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } }); - * - * util.inspect(new Foo()); // 'Foo [bar] {}' - * util.inspect(new Bar()); // 'Bar {}' - * util.inspect(baz); // '[foo] {}' - * ``` - * - * Circular references point to their anchor by using a reference index: - * - * ```js - * import { inspect } from 'node:util'; - * - * const obj = {}; - * obj.a = [obj]; - * obj.b = {}; - * obj.b.inner = obj.b; - * obj.b.obj = obj; - * - * console.log(inspect(obj)); - * // { - * // a: [ [Circular *1] ], - * // b: { inner: [Circular *2], obj: [Circular *1] } - * // } - * ``` - * - * The following example inspects all properties of the `util` object: - * - * ```js - * import util from 'node:util'; - * - * console.log(util.inspect(util, { showHidden: true, depth: null })); - * ``` - * - * The following example highlights the effect of the `compact` option: - * - * ```js - * import { inspect } from 'node:util'; - * - * const o = { - * a: [1, 2, [[ - * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' + - * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.', - * 'test', - * 'foo']], 4], - * b: new Map([['za', 1], ['zb', 'test']]), - * }; - * console.log(inspect(o, { compact: true, depth: 5, breakLength: 80 })); - * - * // { a: - * // [ 1, - * // 2, - * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line - * // 'test', - * // 'foo' ] ], - * // 4 ], - * // b: Map(2) { 'za' => 1, 'zb' => 'test' } } - * - * // Setting `compact` to false or an integer creates more reader friendly output. - * console.log(inspect(o, { compact: false, depth: 5, breakLength: 80 })); - * - * // { - * // a: [ - * // 1, - * // 2, - * // [ - * // [ - * // 'Lorem ipsum dolor sit amet,\n' + - * // 'consectetur adipiscing elit, sed do eiusmod \n' + - * // 'tempor incididunt ut labore et dolore magna aliqua.', - * // 'test', - * // 'foo' - * // ] - * // ], - * // 4 - * // ], - * // b: Map(2) { - * // 'za' => 1, - * // 'zb' => 'test' - * // } - * // } - * - * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a - * // single line. - * ``` - * - * The `showHidden` option allows `WeakMap` and `WeakSet` entries to be - * inspected. If there are more entries than `maxArrayLength`, there is no - * guarantee which entries are displayed. That means retrieving the same - * `WeakSet` entries twice may result in different output. Furthermore, entries - * with no remaining strong references may be garbage collected at any time. - * - * ```js - * import { inspect } from 'node:util'; - * - * const obj = { a: 1 }; - * const obj2 = { b: 2 }; - * const weakSet = new WeakSet([obj, obj2]); - * - * console.log(inspect(weakSet, { showHidden: true })); - * // WeakSet { { a: 1 }, { b: 2 } } - * ``` - * - * The `sorted` option ensures that an object's property insertion order does not - * impact the result of `util.inspect()`. - * - * ```js - * import { inspect } from 'node:util'; - * import assert from 'node:assert'; - * - * const o1 = { - * b: [2, 3, 1], - * a: '`a` comes before `b`', - * c: new Set([2, 3, 1]), - * }; - * console.log(inspect(o1, { sorted: true })); - * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } } - * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) })); - * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' } - * - * const o2 = { - * c: new Set([2, 1, 3]), - * a: '`a` comes before `b`', - * b: [2, 3, 1], - * }; - * assert.strict.equal( - * inspect(o1, { sorted: true }), - * inspect(o2, { sorted: true }), - * ); - * ``` - * - * The `numericSeparator` option adds an underscore every three digits to all - * numbers. - * - * ```js - * import { inspect } from 'node:util'; - * - * const thousand = 1000; - * const million = 1000000; - * const bigNumber = 123456789n; - * const bigDecimal = 1234.12345; - * - * console.log(inspect(thousand, { numericSeparator: true })); - * // 1_000 - * console.log(inspect(million, { numericSeparator: true })); - * // 1_000_000 - * console.log(inspect(bigNumber, { numericSeparator: true })); - * // 123_456_789n - * console.log(inspect(bigDecimal, { numericSeparator: true })); - * // 1_234.123_45 - * ``` - * - * `util.inspect()` is a synchronous method intended for debugging. Its maximum - * output length is approximately 128 MiB. Inputs that result in longer output will - * be truncated. - * @since v0.3.0 - * @param object Any JavaScript primitive or `Object`. - * @return The representation of `object`. - */ - export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; - export function inspect(object: any, options?: InspectOptions): string; - export namespace inspect { - const custom: unique symbol; - let colors: InspectColors; - let styles: InspectStyles; - let defaultOptions: InspectOptions; - let replDefaults: InspectOptions; - } - /** - * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray). - * - * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isArray([]); - * // Returns: true - * util.isArray(new Array()); - * // Returns: true - * util.isArray({}); - * // Returns: false - * ``` - * @since v0.6.0 - * @deprecated Since v4.0.0 - Use `isArray` instead. - */ - export function isArray(object: unknown): object is unknown[]; - /** - * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and - * `extends` keywords to get language level inheritance support. Also note - * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179). - * - * Inherit the prototype methods from one - * [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The - * prototype of `constructor` will be set to a new object created from - * `superConstructor`. - * - * This mainly adds some input validation on top of - * `Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`. - * As an additional convenience, `superConstructor` will be accessible - * through the `constructor.super_` property. - * - * ```js - * const util = require('node:util'); - * const EventEmitter = require('node:events'); - * - * function MyStream() { - * EventEmitter.call(this); - * } - * - * util.inherits(MyStream, EventEmitter); - * - * MyStream.prototype.write = function(data) { - * this.emit('data', data); - * }; - * - * const stream = new MyStream(); - * - * console.log(stream instanceof EventEmitter); // true - * console.log(MyStream.super_ === EventEmitter); // true - * - * stream.on('data', (data) => { - * console.log(`Received data: "${data}"`); - * }); - * stream.write('It works!'); // Received data: "It works!" - * ``` - * - * ES6 example using `class` and `extends`: - * - * ```js - * import EventEmitter from 'node:events'; - * - * class MyStream extends EventEmitter { - * write(data) { - * this.emit('data', data); - * } - * } - * - * const stream = new MyStream(); - * - * stream.on('data', (data) => { - * console.log(`Received data: "${data}"`); - * }); - * stream.write('With ES6'); - * ``` - * @since v0.3.0 - * @legacy Use ES2015 class syntax and `extends` keyword instead. - */ - export function inherits(constructor: unknown, superConstructor: unknown): void; - /** - * The `util.convertProcessSignalToExitCode()` method converts a signal name to its - * corresponding POSIX exit code. Following the POSIX standard, the exit code - * for a process terminated by a signal is calculated as `128 + signal number`. - * - * If `signal` is not a valid signal name, then an error will be thrown. See - * [`signal(7)`](https://man7.org/linux/man-pages/man7/signal.7.html) for a list of valid signals. - * - * ```js - * import { convertProcessSignalToExitCode } from 'node:util'; - * - * console.log(convertProcessSignalToExitCode('SIGTERM')); // 143 (128 + 15) - * console.log(convertProcessSignalToExitCode('SIGKILL')); // 137 (128 + 9) - * ``` - * - * This is particularly useful when working with processes to determine - * the exit code based on the signal that terminated the process. - * @since v25.4.0 - * @param signal A signal name (e.g. `'SIGTERM'`) - * @returns The exit code corresponding to `signal` - */ - export function convertProcessSignalToExitCode(signal: NodeJS.Signals): number; - export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void; - export interface DebugLogger extends DebugLoggerFunction { - /** - * The `util.debuglog().enabled` getter is used to create a test that can be used - * in conditionals based on the existence of the `NODE_DEBUG` environment variable. - * If the `section` name appears within the value of that environment variable, - * then the returned value will be `true`. If not, then the returned value will be - * `false`. - * - * ```js - * import { debuglog } from 'node:util'; - * const enabled = debuglog('foo').enabled; - * if (enabled) { - * console.log('hello from foo [%d]', 123); - * } - * ``` - * - * If this program is run with `NODE_DEBUG=foo` in the environment, then it will - * output something like: - * - * ```console - * hello from foo [123] - * ``` - */ - enabled: boolean; - } - /** - * The `util.debuglog()` method is used to create a function that conditionally - * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG` - * environment variable. If the `section` name appears within the value of that - * environment variable, then the returned function operates similar to - * `console.error()`. If not, then the returned function is a no-op. - * - * ```js - * import { debuglog } from 'node:util'; - * const log = debuglog('foo'); - * - * log('hello from foo [%d]', 123); - * ``` - * - * If this program is run with `NODE_DEBUG=foo` in the environment, then - * it will output something like: - * - * ```console - * FOO 3245: hello from foo [123] - * ``` - * - * where `3245` is the process id. If it is not run with that - * environment variable set, then it will not print anything. - * - * The `section` supports wildcard also: - * - * ```js - * import { debuglog } from 'node:util'; - * const log = debuglog('foo-bar'); - * - * log('hi there, it\'s foo-bar [%d]', 2333); - * ``` - * - * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output - * something like: - * - * ```console - * FOO-BAR 3257: hi there, it's foo-bar [2333] - * ``` - * - * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG` - * environment variable: `NODE_DEBUG=fs,net,tls`. - * - * The optional `callback` argument can be used to replace the logging function - * with a different function that doesn't have any initialization or - * unnecessary wrapping. - * - * ```js - * import { debuglog } from 'node:util'; - * let log = debuglog('internals', (debug) => { - * // Replace with a logging function that optimizes out - * // testing if the section is enabled - * log = debug; - * }); - * ``` - * @since v0.11.3 - * @param section A string identifying the portion of the application for which the `debuglog` function is being created. - * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function. - * @return The logging function - */ - export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger; - export { debuglog as debug }; - export interface DeprecateOptions { - /** - * When false do not change the prototype of object - * while emitting the deprecation warning. - * @since v25.2.0 - * @default true - */ - modifyPrototype?: boolean | undefined; - } - /** - * The `util.deprecate()` method wraps `fn` (which may be a function or class) in - * such a way that it is marked as deprecated. - * - * ```js - * import { deprecate } from 'node:util'; - * - * export const obsoleteFunction = deprecate(() => { - * // Do something here. - * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.'); - * ``` - * - * When called, `util.deprecate()` will return a function that will emit a - * `DeprecationWarning` using the `'warning'` event. The warning will - * be emitted and printed to `stderr` the first time the returned function is - * called. After the warning is emitted, the wrapped function is called without - * emitting a warning. - * - * If the same optional `code` is supplied in multiple calls to `util.deprecate()`, - * the warning will be emitted only once for that `code`. - * - * ```js - * import { deprecate } from 'node:util'; - * - * const fn1 = deprecate( - * () => 'a value', - * 'deprecation message', - * 'DEP0001', - * ); - * const fn2 = deprecate( - * () => 'a different value', - * 'other dep message', - * 'DEP0001', - * ); - * fn1(); // Emits a deprecation warning with code DEP0001 - * fn2(); // Does not emit a deprecation warning because it has the same code - * ``` - * - * If either the `--no-deprecation` or `--no-warnings` command-line flags are - * used, or if the `process.noDeprecation` property is set to `true` _prior_ to - * the first deprecation warning, the `util.deprecate()` method does nothing. - * - * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set, - * or the `process.traceDeprecation` property is set to `true`, a warning and a - * stack trace are printed to `stderr` the first time the deprecated function is - * called. - * - * If the `--throw-deprecation` command-line flag is set, or the - * `process.throwDeprecation` property is set to `true`, then an exception will be - * thrown when the deprecated function is called. - * - * The `--throw-deprecation` command-line flag and `process.throwDeprecation` - * property take precedence over `--trace-deprecation` and - * `process.traceDeprecation`. - * @since v0.8.0 - * @param fn The function that is being deprecated. - * @param msg A warning message to display when the deprecated function is invoked. - * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes. - * @return The deprecated function wrapped to emit a warning. - */ - export function deprecate(fn: T, msg: string, code?: string, options?: DeprecateOptions): T; - export interface IsDeepStrictEqualOptions { - /** - * If `true`, prototype and constructor - * comparison is skipped during deep strict equality check. - * @since v24.9.0 - * @default false - */ - skipPrototype?: boolean | undefined; - } - /** - * Returns `true` if there is deep strict equality between `val1` and `val2`. - * Otherwise, returns `false`. - * - * See `assert.deepStrictEqual()` for more information about deep strict - * equality. - * @since v9.0.0 - */ - export function isDeepStrictEqual(val1: unknown, val2: unknown, options?: IsDeepStrictEqualOptions): boolean; - /** - * Returns `str` with any ANSI escape codes removed. - * - * ```js - * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m')); - * // Prints "value" - * ``` - * @since v16.11.0 - */ - export function stripVTControlCharacters(str: string): string; - /** - * Takes an `async` function (or a function that returns a `Promise`) and returns a - * function following the error-first callback style, i.e. taking - * an `(err, value) => ...` callback as the last argument. In the callback, the - * first argument will be the rejection reason (or `null` if the `Promise` - * resolved), and the second argument will be the resolved value. - * - * ```js - * import { callbackify } from 'node:util'; - * - * async function fn() { - * return 'hello world'; - * } - * const callbackFunction = callbackify(fn); - * - * callbackFunction((err, ret) => { - * if (err) throw err; - * console.log(ret); - * }); - * ``` - * - * Will print: - * - * ```text - * hello world - * ``` - * - * The callback is executed asynchronously, and will have a limited stack trace. - * If the callback throws, the process will emit an `'uncaughtException'` - * event, and if not handled will exit. - * - * Since `null` has a special meaning as the first argument to a callback, if a - * wrapped function rejects a `Promise` with a falsy value as a reason, the value - * is wrapped in an `Error` with the original value stored in a field named - * `reason`. - * - * ```js - * function fn() { - * return Promise.reject(null); - * } - * const callbackFunction = util.callbackify(fn); - * - * callbackFunction((err, ret) => { - * // When the Promise was rejected with `null` it is wrapped with an Error and - * // the original value is stored in `reason`. - * err && Object.hasOwn(err, 'reason') && err.reason === null; // true - * }); - * ``` - * @since v8.2.0 - * @param fn An `async` function - * @return a callback style function - */ - export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: () => Promise, - ): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1) => Promise, - ): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1) => Promise, - ): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2) => Promise, - ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2) => Promise, - ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, - ) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, - ) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - arg6: T6, - callback: (err: NodeJS.ErrnoException) => void, - ) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - arg6: T6, - callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, - ) => void; - export interface CustomPromisifyLegacy extends Function { - __promisify__: TCustom; - } - export interface CustomPromisifySymbol extends Function { - [promisify.custom]: TCustom; - } - export type CustomPromisify = - | CustomPromisifySymbol - | CustomPromisifyLegacy; - /** - * Takes a function following the common error-first callback style, i.e. taking - * an `(err, value) => ...` callback as the last argument, and returns a version - * that returns promises. - * - * ```js - * import { promisify } from 'node:util'; - * import { stat } from 'node:fs'; - * - * const promisifiedStat = promisify(stat); - * promisifiedStat('.').then((stats) => { - * // Do something with `stats` - * }).catch((error) => { - * // Handle the error. - * }); - * ``` - * - * Or, equivalently using `async function`s: - * - * ```js - * import { promisify } from 'node:util'; - * import { stat } from 'node:fs'; - * - * const promisifiedStat = promisify(stat); - * - * async function callStat() { - * const stats = await promisifiedStat('.'); - * console.log(`This directory is owned by ${stats.uid}`); - * } - * - * callStat(); - * ``` - * - * If there is an `original[util.promisify.custom]` property present, `promisify` - * will return its value, see [Custom promisified functions](https://nodejs.org/docs/latest-v25.x/api/util.html#custom-promisified-functions). - * - * `promisify()` assumes that `original` is a function taking a callback as its - * final argument in all cases. If `original` is not a function, `promisify()` - * will throw an error. If `original` is a function but its last argument is not - * an error-first callback, it will still be passed an error-first - * callback as its last argument. - * - * Using `promisify()` on class methods or other methods that use `this` may not - * work as expected unless handled specially: - * - * ```js - * import { promisify } from 'node:util'; - * - * class Foo { - * constructor() { - * this.a = 42; - * } - * - * bar(callback) { - * callback(null, this.a); - * } - * } - * - * const foo = new Foo(); - * - * const naiveBar = promisify(foo.bar); - * // TypeError: Cannot read properties of undefined (reading 'a') - * // naiveBar().then(a => console.log(a)); - * - * naiveBar.call(foo).then((a) => console.log(a)); // '42' - * - * const bindBar = naiveBar.bind(foo); - * bindBar().then((a) => console.log(a)); // '42' - * ``` - * @since v8.0.0 - */ - export function promisify(fn: CustomPromisify): TCustom; - export function promisify( - fn: (callback: (err: any, result: TResult) => void) => void, - ): () => Promise; - export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise; - export function promisify( - fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1) => Promise; - export function promisify(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; - export function promisify(fn: Function): Function; - export namespace promisify { - /** - * That can be used to declare custom promisified variants of functions. - */ - const custom: unique symbol; - } - /** - * Stability: 1.1 - Active development - * Given an example `.env` file: - * - * ```js - * import { parseEnv } from 'node:util'; - * - * parseEnv('HELLO=world\nHELLO=oh my\n'); - * // Returns: { HELLO: 'oh my' } - * ``` - * @param content The raw contents of a `.env` file. - * @since v20.12.0 - */ - export function parseEnv(content: string): NodeJS.Dict; - export interface StyleTextOptions { - /** - * When true, `stream` is checked to see if it can handle colors. - * @default true - */ - validateStream?: boolean | undefined; - /** - * A stream that will be validated if it can be colored. - * @default process.stdout - */ - stream?: NodeJS.WritableStream | undefined; - } - /** - * This function returns a formatted text considering the `format` passed - * for printing in a terminal. It is aware of the terminal's capabilities - * and acts according to the configuration set via `NO_COLOR`, - * `NODE_DISABLE_COLORS` and `FORCE_COLOR` environment variables. - * - * ```js - * import { styleText } from 'node:util'; - * import { stderr } from 'node:process'; - * - * const successMessage = styleText('green', 'Success!'); - * console.log(successMessage); - * - * const errorMessage = styleText( - * 'red', - * 'Error! Error!', - * // Validate if process.stderr has TTY - * { stream: stderr }, - * ); - * console.error(errorMessage); - * ``` - * - * `util.inspect.colors` also provides text formats such as `italic`, and - * `underline` and you can combine both: - * - * ```js - * console.log( - * util.styleText(['underline', 'italic'], 'My italic underlined message'), - * ); - * ``` - * - * When passing an array of formats, the order of the format applied - * is left to right so the following style might overwrite the previous one. - * - * ```js - * console.log( - * util.styleText(['red', 'green'], 'text'), // green - * ); - * ``` - * - * The special format value `none` applies no additional styling to the text. - * - * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v25.x/api/util.html#modifiers). - * @param format A text format or an Array of text formats defined in `util.inspect.colors`. - * @param text The text to to be formatted. - * @since v20.12.0 - */ - export function styleText( - format: InspectColor | readonly InspectColor[], - text: string, - options?: StyleTextOptions, - ): string; - /** @deprecated This alias will be removed in a future version. Use the canonical `TextEncoderEncodeIntoResult` instead. */ - // TODO: remove in future major - export interface EncodeIntoResult extends TextEncoderEncodeIntoResult {} - //// parseArgs - /** - * Provides a higher level API for command-line argument parsing than interacting - * with `process.argv` directly. Takes a specification for the expected arguments - * and returns a structured object with the parsed options and positionals. - * - * ```js - * import { parseArgs } from 'node:util'; - * const args = ['-f', '--bar', 'b']; - * const options = { - * foo: { - * type: 'boolean', - * short: 'f', - * }, - * bar: { - * type: 'string', - * }, - * }; - * const { - * values, - * positionals, - * } = parseArgs({ args, options }); - * console.log(values, positionals); - * // Prints: [Object: null prototype] { foo: true, bar: 'b' } [] - * ``` - * @since v18.3.0, v16.17.0 - * @param config Used to provide arguments for parsing and to configure the parser. `config` supports the following properties: - * @return The parsed command line arguments: - */ - export function parseArgs(config?: T): ParsedResults; - /** - * Type of argument used in {@link parseArgs}. - */ - export type ParseArgsOptionsType = "boolean" | "string"; - export interface ParseArgsOptionDescriptor { - /** - * Type of argument. - */ - type: ParseArgsOptionsType; - /** - * Whether this option can be provided multiple times. - * If `true`, all values will be collected in an array. - * If `false`, values for the option are last-wins. - * @default false. - */ - multiple?: boolean | undefined; - /** - * A single character alias for the option. - */ - short?: string | undefined; - /** - * The value to assign to - * the option if it does not appear in the arguments to be parsed. The value - * must match the type specified by the `type` property. If `multiple` is - * `true`, it must be an array. No default value is applied when the option - * does appear in the arguments to be parsed, even if the provided value - * is falsy. - * @since v18.11.0 - */ - default?: string | boolean | string[] | boolean[] | undefined; - } - export interface ParseArgsOptionsConfig { - [longOption: string]: ParseArgsOptionDescriptor; - } - export interface ParseArgsConfig { - /** - * Array of argument strings. - */ - args?: readonly string[] | undefined; - /** - * Used to describe arguments known to the parser. - */ - options?: ParseArgsOptionsConfig | undefined; - /** - * Should an error be thrown when unknown arguments are encountered, - * or when arguments are passed that do not match the `type` configured in `options`. - * @default true - */ - strict?: boolean | undefined; - /** - * Whether this command accepts positional arguments. - */ - allowPositionals?: boolean | undefined; - /** - * If `true`, allows explicitly setting boolean options to `false` by prefixing the option name with `--no-`. - * @default false - * @since v22.4.0 - */ - allowNegative?: boolean | undefined; - /** - * Return the parsed tokens. This is useful for extending the built-in behavior, - * from adding additional checks through to reprocessing the tokens in different ways. - * @default false - */ - tokens?: boolean | undefined; - } - /* - IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties. - TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936 - This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present". - But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present. - So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value. - This is technically incorrect but is a much nicer UX for the common case. - The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false. - */ - type IfDefaultsTrue = T extends true ? IfTrue - : T extends false ? IfFalse - : IfTrue; - // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false` - type IfDefaultsFalse = T extends false ? IfFalse - : T extends true ? IfTrue - : IfFalse; - type ExtractOptionValue = IfDefaultsTrue< - T["strict"], - O["type"] extends "string" ? string : O["type"] extends "boolean" ? boolean : string | boolean, - string | boolean - >; - type ApplyOptionalModifiers> = ( - & { -readonly [LongOption in keyof O]?: V[LongOption] } - & { [LongOption in keyof O as O[LongOption]["default"] extends {} ? LongOption : never]: V[LongOption] } - ) extends infer P ? { [K in keyof P]: P[K] } : never; // resolve intersection to object - type ParsedValues = - & IfDefaultsTrue - & (T["options"] extends ParseArgsOptionsConfig ? ApplyOptionalModifiers< - T["options"], - { - [LongOption in keyof T["options"]]: IfDefaultsFalse< - T["options"][LongOption]["multiple"], - Array>, - ExtractOptionValue - >; - } - > - : {}); - type ParsedPositionals = IfDefaultsTrue< - T["strict"], - IfDefaultsFalse, - IfDefaultsTrue - >; - type PreciseTokenForOptions< - K extends string, - O extends ParseArgsOptionDescriptor, - > = O["type"] extends "string" ? { - kind: "option"; - index: number; - name: K; - rawName: string; - value: string; - inlineValue: boolean; - } - : O["type"] extends "boolean" ? { - kind: "option"; - index: number; - name: K; - rawName: string; - value: undefined; - inlineValue: undefined; - } - : OptionToken & { name: K }; - type TokenForOptions< - T extends ParseArgsConfig, - K extends keyof T["options"] = keyof T["options"], - > = K extends unknown - ? T["options"] extends ParseArgsOptionsConfig ? PreciseTokenForOptions - : OptionToken - : never; - type ParsedOptionToken = IfDefaultsTrue, OptionToken>; - type ParsedPositionalToken = IfDefaultsTrue< - T["strict"], - IfDefaultsFalse, - IfDefaultsTrue - >; - type ParsedTokens = Array< - ParsedOptionToken | ParsedPositionalToken | { kind: "option-terminator"; index: number } - >; - type PreciseParsedResults = IfDefaultsFalse< - T["tokens"], - { - values: ParsedValues; - positionals: ParsedPositionals; - tokens: ParsedTokens; - }, - { - values: ParsedValues; - positionals: ParsedPositionals; - } - >; - type OptionToken = - | { kind: "option"; index: number; name: string; rawName: string; value: string; inlineValue: boolean } - | { - kind: "option"; - index: number; - name: string; - rawName: string; - value: undefined; - inlineValue: undefined; - }; - type Token = - | OptionToken - | { kind: "positional"; index: number; value: string } - | { kind: "option-terminator"; index: number }; - // If ParseArgsConfig extends T, then the user passed config constructed elsewhere. - // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above. - type ParsedResults = ParseArgsConfig extends T ? { - values: { - [longOption: string]: undefined | string | boolean | Array; - }; - positionals: string[]; - tokens?: Token[]; - } - : PreciseParsedResults; - /** - * An implementation of [the MIMEType class](https://bmeck.github.io/node-proposal-mime-api/). - * - * In accordance with browser conventions, all properties of `MIMEType` objects - * are implemented as getters and setters on the class prototype, rather than as - * data properties on the object itself. - * - * A MIME string is a structured string containing multiple meaningful - * components. When parsed, a `MIMEType` object is returned containing - * properties for each of these components. - * @since v19.1.0, v18.13.0 - */ - export class MIMEType { - /** - * Creates a new MIMEType object by parsing the input. - * - * A `TypeError` will be thrown if the `input` is not a valid MIME. - * Note that an effort will be made to coerce the given values into strings. - * @param input The input MIME to parse. - */ - constructor(input: string | { toString: () => string }); - /** - * Gets and sets the type portion of the MIME. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const myMIME = new MIMEType('text/javascript'); - * console.log(myMIME.type); - * // Prints: text - * myMIME.type = 'application'; - * console.log(myMIME.type); - * // Prints: application - * console.log(String(myMIME)); - * // Prints: application/javascript - * ``` - */ - type: string; - /** - * Gets and sets the subtype portion of the MIME. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const myMIME = new MIMEType('text/ecmascript'); - * console.log(myMIME.subtype); - * // Prints: ecmascript - * myMIME.subtype = 'javascript'; - * console.log(myMIME.subtype); - * // Prints: javascript - * console.log(String(myMIME)); - * // Prints: text/javascript - * ``` - */ - subtype: string; - /** - * Gets the essence of the MIME. This property is read only. - * Use `mime.type` or `mime.subtype` to alter the MIME. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const myMIME = new MIMEType('text/javascript;key=value'); - * console.log(myMIME.essence); - * // Prints: text/javascript - * myMIME.type = 'application'; - * console.log(myMIME.essence); - * // Prints: application/javascript - * console.log(String(myMIME)); - * // Prints: application/javascript;key=value - * ``` - */ - readonly essence: string; - /** - * Gets the `MIMEParams` object representing the - * parameters of the MIME. This property is read-only. See `MIMEParams` documentation for details. - */ - readonly params: MIMEParams; - /** - * The `toString()` method on the `MIMEType` object returns the serialized MIME. - * - * Because of the need for standard compliance, this method does not allow users - * to customize the serialization process of the MIME. - */ - toString(): string; - } - /** - * The `MIMEParams` API provides read and write access to the parameters of a `MIMEType`. - * @since v19.1.0, v18.13.0 - */ - export class MIMEParams { - /** - * Remove all name-value pairs whose name is `name`. - */ - delete(name: string): void; - /** - * Returns an iterator over each of the name-value pairs in the parameters. - * Each item of the iterator is a JavaScript `Array`. The first item of the array - * is the `name`, the second item of the array is the `value`. - */ - entries(): NodeJS.Iterator<[name: string, value: string]>; - /** - * Returns the value of the first name-value pair whose name is `name`. If there - * are no such pairs, `null` is returned. - * @return or `null` if there is no name-value pair with the given `name`. - */ - get(name: string): string | null; - /** - * Returns `true` if there is at least one name-value pair whose name is `name`. - */ - has(name: string): boolean; - /** - * Returns an iterator over the names of each name-value pair. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const { params } = new MIMEType('text/plain;foo=0;bar=1'); - * for (const name of params.keys()) { - * console.log(name); - * } - * // Prints: - * // foo - * // bar - * ``` - */ - keys(): NodeJS.Iterator; - /** - * Sets the value in the `MIMEParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`, - * set the first such pair's value to `value`. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const { params } = new MIMEType('text/plain;foo=0;bar=1'); - * params.set('foo', 'def'); - * params.set('baz', 'xyz'); - * console.log(params.toString()); - * // Prints: foo=def;bar=1;baz=xyz - * ``` - */ - set(name: string, value: string): void; - /** - * Returns an iterator over the values of each name-value pair. - */ - values(): NodeJS.Iterator; - /** - * Returns an iterator over each of the name-value pairs in the parameters. - */ - [Symbol.iterator](): NodeJS.Iterator<[name: string, value: string]>; - } - // #region web types - export interface TextDecodeOptions { - stream?: boolean; - } - export interface TextDecoderCommon { - readonly encoding: string; - readonly fatal: boolean; - readonly ignoreBOM: boolean; - } - export interface TextDecoderOptions { - fatal?: boolean; - ignoreBOM?: boolean; - } - export interface TextEncoderCommon { - readonly encoding: string; - } - export interface TextEncoderEncodeIntoResult { - read: number; - written: number; - } - export interface TextDecoder extends TextDecoderCommon { - decode(input?: NodeJS.AllowSharedBufferSource, options?: TextDecodeOptions): string; - } - export var TextDecoder: { - prototype: TextDecoder; - new(label?: string, options?: TextDecoderOptions): TextDecoder; - }; - export interface TextEncoder extends TextEncoderCommon { - encode(input?: string): NodeJS.NonSharedUint8Array; - encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult; - } - export var TextEncoder: { - prototype: TextEncoder; - new(): TextEncoder; - }; - // #endregion -} -declare module "util" { - export * from "node:util"; -} diff --git a/node_modules/@types/node/util/types.d.ts b/node_modules/@types/node/util/types.d.ts deleted file mode 100644 index 818825b..0000000 --- a/node_modules/@types/node/util/types.d.ts +++ /dev/null @@ -1,558 +0,0 @@ -declare module "node:util/types" { - import { KeyObject, webcrypto } from "node:crypto"; - /** - * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or - * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. - * - * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`. - * - * ```js - * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true - * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true - * ``` - * @since v10.0.0 - */ - function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike; - /** - * Returns `true` if the value is an `arguments` object. - * - * ```js - * function foo() { - * util.types.isArgumentsObject(arguments); // Returns true - * } - * ``` - * @since v10.0.0 - */ - function isArgumentsObject(object: unknown): object is IArguments; - /** - * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance. - * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is - * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. - * - * ```js - * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true - * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false - * ``` - * @since v10.0.0 - */ - function isArrayBuffer(object: unknown): object is ArrayBuffer; - /** - * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed - * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to - * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). - * - * ```js - * util.types.isArrayBufferView(new Int8Array()); // true - * util.types.isArrayBufferView(Buffer.from('hello world')); // true - * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true - * util.types.isArrayBufferView(new ArrayBuffer()); // false - * ``` - * @since v10.0.0 - */ - function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView; - /** - * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function). - * This only reports back what the JavaScript engine is seeing; - * in particular, the return value may not match the original source code if - * a transpilation tool was used. - * - * ```js - * util.types.isAsyncFunction(function foo() {}); // Returns false - * util.types.isAsyncFunction(async function foo() {}); // Returns true - * ``` - * @since v10.0.0 - */ - function isAsyncFunction(object: unknown): boolean; - /** - * Returns `true` if the value is a `BigInt64Array` instance. - * - * ```js - * util.types.isBigInt64Array(new BigInt64Array()); // Returns true - * util.types.isBigInt64Array(new BigUint64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isBigInt64Array(value: unknown): value is BigInt64Array; - /** - * Returns `true` if the value is a BigInt object, e.g. created - * by `Object(BigInt(123))`. - * - * ```js - * util.types.isBigIntObject(Object(BigInt(123))); // Returns true - * util.types.isBigIntObject(BigInt(123)); // Returns false - * util.types.isBigIntObject(123); // Returns false - * ``` - * @since v10.4.0 - */ - function isBigIntObject(object: unknown): object is BigInt; - /** - * Returns `true` if the value is a `BigUint64Array` instance. - * - * ```js - * util.types.isBigUint64Array(new BigInt64Array()); // Returns false - * util.types.isBigUint64Array(new BigUint64Array()); // Returns true - * ``` - * @since v10.0.0 - */ - function isBigUint64Array(value: unknown): value is BigUint64Array; - /** - * Returns `true` if the value is a boolean object, e.g. created - * by `new Boolean()`. - * - * ```js - * util.types.isBooleanObject(false); // Returns false - * util.types.isBooleanObject(true); // Returns false - * util.types.isBooleanObject(new Boolean(false)); // Returns true - * util.types.isBooleanObject(new Boolean(true)); // Returns true - * util.types.isBooleanObject(Boolean(false)); // Returns false - * util.types.isBooleanObject(Boolean(true)); // Returns false - * ``` - * @since v10.0.0 - */ - function isBooleanObject(object: unknown): object is Boolean; - /** - * Returns `true` if the value is any boxed primitive object, e.g. created - * by `new Boolean()`, `new String()` or `Object(Symbol())`. - * - * For example: - * - * ```js - * util.types.isBoxedPrimitive(false); // Returns false - * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true - * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false - * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true - * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true - * ``` - * @since v10.11.0 - */ - function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol; - /** - * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance. - * - * ```js - * const ab = new ArrayBuffer(20); - * util.types.isDataView(new DataView(ab)); // Returns true - * util.types.isDataView(new Float64Array()); // Returns false - * ``` - * - * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). - * @since v10.0.0 - */ - function isDataView(object: unknown): object is DataView; - /** - * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance. - * - * ```js - * util.types.isDate(new Date()); // Returns true - * ``` - * @since v10.0.0 - */ - function isDate(object: unknown): object is Date; - /** - * Returns `true` if the value is a native `External` value. - * - * A native `External` value is a special type of object that contains a - * raw C++ pointer (`void*`) for access from native code, and has no other - * properties. Such objects are created either by Node.js internals or native - * addons. In JavaScript, they are - * [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a - * `null` prototype. - * - * ```c - * #include - * #include - * napi_value result; - * static napi_value MyNapi(napi_env env, napi_callback_info info) { - * int* raw = (int*) malloc(1024); - * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &result); - * if (status != napi_ok) { - * napi_throw_error(env, NULL, "napi_create_external failed"); - * return NULL; - * } - * return result; - * } - * ... - * DECLARE_NAPI_PROPERTY("myNapi", MyNapi) - * ... - * ``` - * - * ```js - * import native from 'napi_addon.node'; - * import { types } from 'node:util'; - * - * const data = native.myNapi(); - * types.isExternal(data); // returns true - * types.isExternal(0); // returns false - * types.isExternal(new String('foo')); // returns false - * ``` - * - * For further information on `napi_create_external`, refer to - * [`napi_create_external()`](https://nodejs.org/docs/latest-v25.x/api/n-api.html#napi_create_external). - * @since v10.0.0 - */ - function isExternal(object: unknown): boolean; - /** - * Returns `true` if the value is a built-in [`Float16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float16Array) instance. - * - * ```js - * util.types.isFloat16Array(new ArrayBuffer()); // Returns false - * util.types.isFloat16Array(new Float16Array()); // Returns true - * util.types.isFloat16Array(new Float32Array()); // Returns false - * ``` - * @since v24.0.0 - */ - function isFloat16Array(object: unknown): object is Float16Array; - /** - * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance. - * - * ```js - * util.types.isFloat32Array(new ArrayBuffer()); // Returns false - * util.types.isFloat32Array(new Float32Array()); // Returns true - * util.types.isFloat32Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isFloat32Array(object: unknown): object is Float32Array; - /** - * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance. - * - * ```js - * util.types.isFloat64Array(new ArrayBuffer()); // Returns false - * util.types.isFloat64Array(new Uint8Array()); // Returns false - * util.types.isFloat64Array(new Float64Array()); // Returns true - * ``` - * @since v10.0.0 - */ - function isFloat64Array(object: unknown): object is Float64Array; - /** - * Returns `true` if the value is a generator function. - * This only reports back what the JavaScript engine is seeing; - * in particular, the return value may not match the original source code if - * a transpilation tool was used. - * - * ```js - * util.types.isGeneratorFunction(function foo() {}); // Returns false - * util.types.isGeneratorFunction(function* foo() {}); // Returns true - * ``` - * @since v10.0.0 - */ - function isGeneratorFunction(object: unknown): object is GeneratorFunction; - /** - * Returns `true` if the value is a generator object as returned from a - * built-in generator function. - * This only reports back what the JavaScript engine is seeing; - * in particular, the return value may not match the original source code if - * a transpilation tool was used. - * - * ```js - * function* foo() {} - * const generator = foo(); - * util.types.isGeneratorObject(generator); // Returns true - * ``` - * @since v10.0.0 - */ - function isGeneratorObject(object: unknown): object is Generator; - /** - * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance. - * - * ```js - * util.types.isInt8Array(new ArrayBuffer()); // Returns false - * util.types.isInt8Array(new Int8Array()); // Returns true - * util.types.isInt8Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isInt8Array(object: unknown): object is Int8Array; - /** - * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance. - * - * ```js - * util.types.isInt16Array(new ArrayBuffer()); // Returns false - * util.types.isInt16Array(new Int16Array()); // Returns true - * util.types.isInt16Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isInt16Array(object: unknown): object is Int16Array; - /** - * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance. - * - * ```js - * util.types.isInt32Array(new ArrayBuffer()); // Returns false - * util.types.isInt32Array(new Int32Array()); // Returns true - * util.types.isInt32Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isInt32Array(object: unknown): object is Int32Array; - /** - * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. - * - * ```js - * util.types.isMap(new Map()); // Returns true - * ``` - * @since v10.0.0 - */ - function isMap( - object: T | {}, - ): object is T extends ReadonlyMap ? (unknown extends T ? never : ReadonlyMap) - : Map; - /** - * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. - * - * ```js - * const map = new Map(); - * util.types.isMapIterator(map.keys()); // Returns true - * util.types.isMapIterator(map.values()); // Returns true - * util.types.isMapIterator(map.entries()); // Returns true - * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true - * ``` - * @since v10.0.0 - */ - function isMapIterator(object: unknown): boolean; - /** - * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects). - * - * ```js - * import * as ns from './a.js'; - * - * util.types.isModuleNamespaceObject(ns); // Returns true - * ``` - * @since v10.0.0 - */ - function isModuleNamespaceObject(value: unknown): boolean; - /** - * Returns `true` if the value was returned by the constructor of a - * [built-in `Error` type](https://tc39.es/ecma262/#sec-error-objects). - * - * ```js - * console.log(util.types.isNativeError(new Error())); // true - * console.log(util.types.isNativeError(new TypeError())); // true - * console.log(util.types.isNativeError(new RangeError())); // true - * ``` - * - * Subclasses of the native error types are also native errors: - * - * ```js - * class MyError extends Error {} - * console.log(util.types.isNativeError(new MyError())); // true - * ``` - * - * A value being `instanceof` a native error class is not equivalent to `isNativeError()` - * returning `true` for that value. `isNativeError()` returns `true` for errors - * which come from a different [realm](https://tc39.es/ecma262/#realm) while `instanceof Error` returns `false` - * for these errors: - * - * ```js - * import { createContext, runInContext } from 'node:vm'; - * import { types } from 'node:util'; - * - * const context = createContext({}); - * const myError = runInContext('new Error()', context); - * console.log(types.isNativeError(myError)); // true - * console.log(myError instanceof Error); // false - * ``` - * - * Conversely, `isNativeError()` returns `false` for all objects which were not - * returned by the constructor of a native error. That includes values - * which are `instanceof` native errors: - * - * ```js - * const myError = { __proto__: Error.prototype }; - * console.log(util.types.isNativeError(myError)); // false - * console.log(myError instanceof Error); // true - * ``` - * @since v10.0.0 - * @deprecated The `util.types.isNativeError` API is deprecated. Please use `Error.isError` instead. - */ - function isNativeError(object: unknown): object is Error; - /** - * Returns `true` if the value is a number object, e.g. created - * by `new Number()`. - * - * ```js - * util.types.isNumberObject(0); // Returns false - * util.types.isNumberObject(new Number(0)); // Returns true - * ``` - * @since v10.0.0 - */ - function isNumberObject(object: unknown): object is Number; - /** - * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). - * - * ```js - * util.types.isPromise(Promise.resolve(42)); // Returns true - * ``` - * @since v10.0.0 - */ - function isPromise(object: unknown): object is Promise; - /** - * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance. - * - * ```js - * const target = {}; - * const proxy = new Proxy(target, {}); - * util.types.isProxy(target); // Returns false - * util.types.isProxy(proxy); // Returns true - * ``` - * @since v10.0.0 - */ - function isProxy(object: unknown): boolean; - /** - * Returns `true` if the value is a regular expression object. - * - * ```js - * util.types.isRegExp(/abc/); // Returns true - * util.types.isRegExp(new RegExp('abc')); // Returns true - * ``` - * @since v10.0.0 - */ - function isRegExp(object: unknown): object is RegExp; - /** - * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. - * - * ```js - * util.types.isSet(new Set()); // Returns true - * ``` - * @since v10.0.0 - */ - function isSet( - object: T | {}, - ): object is T extends ReadonlySet ? (unknown extends T ? never : ReadonlySet) : Set; - /** - * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. - * - * ```js - * const set = new Set(); - * util.types.isSetIterator(set.keys()); // Returns true - * util.types.isSetIterator(set.values()); // Returns true - * util.types.isSetIterator(set.entries()); // Returns true - * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true - * ``` - * @since v10.0.0 - */ - function isSetIterator(object: unknown): boolean; - /** - * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. - * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is - * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. - * - * ```js - * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false - * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true - * ``` - * @since v10.0.0 - */ - function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer; - /** - * Returns `true` if the value is a string object, e.g. created - * by `new String()`. - * - * ```js - * util.types.isStringObject('foo'); // Returns false - * util.types.isStringObject(new String('foo')); // Returns true - * ``` - * @since v10.0.0 - */ - function isStringObject(object: unknown): object is String; - /** - * Returns `true` if the value is a symbol object, created - * by calling `Object()` on a `Symbol` primitive. - * - * ```js - * const symbol = Symbol('foo'); - * util.types.isSymbolObject(symbol); // Returns false - * util.types.isSymbolObject(Object(symbol)); // Returns true - * ``` - * @since v10.0.0 - */ - function isSymbolObject(object: unknown): object is Symbol; - /** - * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance. - * - * ```js - * util.types.isTypedArray(new ArrayBuffer()); // Returns false - * util.types.isTypedArray(new Uint8Array()); // Returns true - * util.types.isTypedArray(new Float64Array()); // Returns true - * ``` - * - * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). - * @since v10.0.0 - */ - function isTypedArray(object: unknown): object is NodeJS.TypedArray; - /** - * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance. - * - * ```js - * util.types.isUint8Array(new ArrayBuffer()); // Returns false - * util.types.isUint8Array(new Uint8Array()); // Returns true - * util.types.isUint8Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint8Array(object: unknown): object is Uint8Array; - /** - * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance. - * - * ```js - * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false - * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true - * util.types.isUint8ClampedArray(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray; - /** - * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance. - * - * ```js - * util.types.isUint16Array(new ArrayBuffer()); // Returns false - * util.types.isUint16Array(new Uint16Array()); // Returns true - * util.types.isUint16Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint16Array(object: unknown): object is Uint16Array; - /** - * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance. - * - * ```js - * util.types.isUint32Array(new ArrayBuffer()); // Returns false - * util.types.isUint32Array(new Uint32Array()); // Returns true - * util.types.isUint32Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint32Array(object: unknown): object is Uint32Array; - /** - * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance. - * - * ```js - * util.types.isWeakMap(new WeakMap()); // Returns true - * ``` - * @since v10.0.0 - */ - function isWeakMap(object: unknown): object is WeakMap; - /** - * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance. - * - * ```js - * util.types.isWeakSet(new WeakSet()); // Returns true - * ``` - * @since v10.0.0 - */ - function isWeakSet(object: unknown): object is WeakSet; - /** - * Returns `true` if `value` is a `KeyObject`, `false` otherwise. - * @since v16.2.0 - */ - function isKeyObject(object: unknown): object is KeyObject; - /** - * Returns `true` if `value` is a `CryptoKey`, `false` otherwise. - * @since v16.2.0 - */ - function isCryptoKey(object: unknown): object is webcrypto.CryptoKey; -} -declare module "util/types" { - export * from "node:util/types"; -} diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts deleted file mode 100644 index c121c61..0000000 --- a/node_modules/@types/node/v8.d.ts +++ /dev/null @@ -1,980 +0,0 @@ -declare module "node:v8" { - import { NonSharedBuffer } from "node:buffer"; - import { Readable } from "node:stream"; - interface HeapSpaceInfo { - space_name: string; - space_size: number; - space_used_size: number; - space_available_size: number; - physical_space_size: number; - } - // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ - type DoesZapCodeSpaceFlag = 0 | 1; - interface HeapInfo { - total_heap_size: number; - total_heap_size_executable: number; - total_physical_size: number; - total_available_size: number; - used_heap_size: number; - heap_size_limit: number; - malloced_memory: number; - peak_malloced_memory: number; - does_zap_garbage: DoesZapCodeSpaceFlag; - number_of_native_contexts: number; - number_of_detached_contexts: number; - total_global_handles_size: number; - used_global_handles_size: number; - external_memory: number; - total_allocated_bytes: number; - } - interface HeapCodeStatistics { - code_and_metadata_size: number; - bytecode_and_metadata_size: number; - external_script_source_size: number; - } - interface HeapSnapshotOptions { - /** - * If true, expose internals in the heap snapshot. - * @default false - */ - exposeInternals?: boolean | undefined; - /** - * If true, expose numeric values in artificial fields. - * @default false - */ - exposeNumericValues?: boolean | undefined; - } - /** - * Returns an integer representing a version tag derived from the V8 version, - * command-line flags, and detected CPU features. This is useful for determining - * whether a `vm.Script` `cachedData` buffer is compatible with this instance - * of V8. - * - * ```js - * console.log(v8.cachedDataVersionTag()); // 3947234607 - * // The value returned by v8.cachedDataVersionTag() is derived from the V8 - * // version, command-line flags, and detected CPU features. Test that the value - * // does indeed update when flags are toggled. - * v8.setFlagsFromString('--allow_natives_syntax'); - * console.log(v8.cachedDataVersionTag()); // 183726201 - * ``` - * @since v8.0.0 - */ - function cachedDataVersionTag(): number; - /** - * Returns an object with the following properties: - * - * `does_zap_garbage` is a 0/1 boolean, which signifies whether the `--zap_code_space` option is enabled or not. This makes V8 overwrite heap - * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger - * because it continuously touches all heap pages and that makes them less likely - * to get swapped out by the operating system. - * - * `number_of_native_contexts` The value of native\_context is the number of the - * top-level contexts currently active. Increase of this number over time indicates - * a memory leak. - * - * `number_of_detached_contexts` The value of detached\_context is the number - * of contexts that were detached and not yet garbage collected. This number - * being non-zero indicates a potential memory leak. - * - * `total_global_handles_size` The value of total\_global\_handles\_size is the - * total memory size of V8 global handles. - * - * `used_global_handles_size` The value of used\_global\_handles\_size is the - * used memory size of V8 global handles. - * - * `external_memory` The value of external\_memory is the memory size of array - * buffers and external strings. - * - * `total_allocated_bytes` The value of total allocated bytes since the Isolate - * creation. - * - * ```js - * { - * total_heap_size: 7326976, - * total_heap_size_executable: 4194304, - * total_physical_size: 7326976, - * total_available_size: 1152656, - * used_heap_size: 3476208, - * heap_size_limit: 1535115264, - * malloced_memory: 16384, - * peak_malloced_memory: 1127496, - * does_zap_garbage: 0, - * number_of_native_contexts: 1, - * number_of_detached_contexts: 0, - * total_global_handles_size: 8192, - * used_global_handles_size: 3296, - * external_memory: 318824, - * total_allocated_bytes: 45224088 - * } - * ``` - * @since v1.0.0 - */ - function getHeapStatistics(): HeapInfo; - /** - * It returns an object with a structure similar to the - * [`cppgc::HeapStatistics`](https://v8docs.nodesource.com/node-22.4/d7/d51/heap-statistics_8h_source.html) - * object. See the [V8 documentation](https://v8docs.nodesource.com/node-22.4/df/d2f/structcppgc_1_1_heap_statistics.html) - * for more information about the properties of the object. - * - * ```js - * // Detailed - * ({ - * committed_size_bytes: 131072, - * resident_size_bytes: 131072, - * used_size_bytes: 152, - * space_statistics: [ - * { - * name: 'NormalPageSpace0', - * committed_size_bytes: 0, - * resident_size_bytes: 0, - * used_size_bytes: 0, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * { - * name: 'NormalPageSpace1', - * committed_size_bytes: 131072, - * resident_size_bytes: 131072, - * used_size_bytes: 152, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * { - * name: 'NormalPageSpace2', - * committed_size_bytes: 0, - * resident_size_bytes: 0, - * used_size_bytes: 0, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * { - * name: 'NormalPageSpace3', - * committed_size_bytes: 0, - * resident_size_bytes: 0, - * used_size_bytes: 0, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * { - * name: 'LargePageSpace', - * committed_size_bytes: 0, - * resident_size_bytes: 0, - * used_size_bytes: 0, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * ], - * type_names: [], - * detail_level: 'detailed', - * }); - * ``` - * - * ```js - * // Brief - * ({ - * committed_size_bytes: 131072, - * resident_size_bytes: 131072, - * used_size_bytes: 128864, - * space_statistics: [], - * type_names: [], - * detail_level: 'brief', - * }); - * ``` - * @since v22.15.0 - * @param detailLevel **Default:** `'detailed'`. Specifies the level of detail in the returned statistics. - * Accepted values are: - * * `'brief'`: Brief statistics contain only the top-level - * allocated and used - * memory statistics for the entire heap. - * * `'detailed'`: Detailed statistics also contain a break - * down per space and page, as well as freelist statistics - * and object type histograms. - */ - function getCppHeapStatistics(detailLevel?: "brief" | "detailed"): object; - /** - * Returns statistics about the V8 heap spaces, i.e. the segments which make up - * the V8 heap. Neither the ordering of heap spaces, nor the availability of a - * heap space can be guaranteed as the statistics are provided via the - * V8 [`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the - * next. - * - * The value returned is an array of objects containing the following properties: - * - * ```json - * [ - * { - * "space_name": "new_space", - * "space_size": 2063872, - * "space_used_size": 951112, - * "space_available_size": 80824, - * "physical_space_size": 2063872 - * }, - * { - * "space_name": "old_space", - * "space_size": 3090560, - * "space_used_size": 2493792, - * "space_available_size": 0, - * "physical_space_size": 3090560 - * }, - * { - * "space_name": "code_space", - * "space_size": 1260160, - * "space_used_size": 644256, - * "space_available_size": 960, - * "physical_space_size": 1260160 - * }, - * { - * "space_name": "map_space", - * "space_size": 1094160, - * "space_used_size": 201608, - * "space_available_size": 0, - * "physical_space_size": 1094160 - * }, - * { - * "space_name": "large_object_space", - * "space_size": 0, - * "space_used_size": 0, - * "space_available_size": 1490980608, - * "physical_space_size": 0 - * } - * ] - * ``` - * @since v6.0.0 - */ - function getHeapSpaceStatistics(): HeapSpaceInfo[]; - /** - * The `v8.setFlagsFromString()` method can be used to programmatically set - * V8 command-line flags. This method should be used with care. Changing settings - * after the VM has started may result in unpredictable behavior, including - * crashes and data loss; or it may simply do nothing. - * - * The V8 options available for a version of Node.js may be determined by running `node --v8-options`. - * - * Usage: - * - * ```js - * // Print GC events to stdout for one minute. - * import v8 from 'node:v8'; - * v8.setFlagsFromString('--trace_gc'); - * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3); - * ``` - * @since v1.0.0 - */ - function setFlagsFromString(flags: string): void; - /** - * This is similar to the [`queryObjects()` console API](https://developer.chrome.com/docs/devtools/console/utilities#queryObjects-function) - * provided by the Chromium DevTools console. It can be used to search for objects that have the matching constructor on its prototype chain - * in the heap after a full garbage collection, which can be useful for memory leak regression tests. To avoid surprising results, users should - * avoid using this API on constructors whose implementation they don't control, or on constructors that can be invoked by other parties in the - * application. - * - * To avoid accidental leaks, this API does not return raw references to the objects found. By default, it returns the count of the objects - * found. If `options.format` is `'summary'`, it returns an array containing brief string representations for each object. The visibility provided - * in this API is similar to what the heap snapshot provides, while users can save the cost of serialization and parsing and directly filter the - * target objects during the search. - * - * Only objects created in the current execution context are included in the results. - * - * ```js - * import { queryObjects } from 'node:v8'; - * class A { foo = 'bar'; } - * console.log(queryObjects(A)); // 0 - * const a = new A(); - * console.log(queryObjects(A)); // 1 - * // [ "A { foo: 'bar' }" ] - * console.log(queryObjects(A, { format: 'summary' })); - * - * class B extends A { bar = 'qux'; } - * const b = new B(); - * console.log(queryObjects(B)); // 1 - * // [ "B { foo: 'bar', bar: 'qux' }" ] - * console.log(queryObjects(B, { format: 'summary' })); - * - * // Note that, when there are child classes inheriting from a constructor, - * // the constructor also shows up in the prototype chain of the child - * // classes's prototoype, so the child classes's prototoype would also be - * // included in the result. - * console.log(queryObjects(A)); // 3 - * // [ "B { foo: 'bar', bar: 'qux' }", 'A {}', "A { foo: 'bar' }" ] - * console.log(queryObjects(A, { format: 'summary' })); - * ``` - * @param ctor The constructor that can be used to search on the prototype chain in order to filter target objects in the heap. - * @since v20.13.0 - */ - function queryObjects(ctor: Function): number | string[]; - function queryObjects(ctor: Function, options: { format: "count" }): number; - function queryObjects(ctor: Function, options: { format: "summary" }): string[]; - /** - * Generates a snapshot of the current V8 heap and returns a Readable - * Stream that may be used to read the JSON serialized representation. - * This JSON stream format is intended to be used with tools such as - * Chrome DevTools. The JSON schema is undocumented and specific to the - * V8 engine. Therefore, the schema may change from one version of V8 to the next. - * - * Creating a heap snapshot requires memory about twice the size of the heap at - * the time the snapshot is created. This results in the risk of OOM killers - * terminating the process. - * - * Generating a snapshot is a synchronous operation which blocks the event loop - * for a duration depending on the heap size. - * - * ```js - * // Print heap snapshot to the console - * import v8 from 'node:v8'; - * const stream = v8.getHeapSnapshot(); - * stream.pipe(process.stdout); - * ``` - * @since v11.13.0 - * @return A Readable containing the V8 heap snapshot. - */ - function getHeapSnapshot(options?: HeapSnapshotOptions): Readable; - /** - * Generates a snapshot of the current V8 heap and writes it to a JSON - * file. This file is intended to be used with tools such as Chrome - * DevTools. The JSON schema is undocumented and specific to the V8 - * engine, and may change from one version of V8 to the next. - * - * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will - * not contain any information about the workers, and vice versa. - * - * Creating a heap snapshot requires memory about twice the size of the heap at - * the time the snapshot is created. This results in the risk of OOM killers - * terminating the process. - * - * Generating a snapshot is a synchronous operation which blocks the event loop - * for a duration depending on the heap size. - * - * ```js - * import { writeHeapSnapshot } from 'node:v8'; - * import { - * Worker, - * isMainThread, - * parentPort, - * } from 'node:worker_threads'; - * - * if (isMainThread) { - * const worker = new Worker(__filename); - * - * worker.once('message', (filename) => { - * console.log(`worker heapdump: ${filename}`); - * // Now get a heapdump for the main thread. - * console.log(`main thread heapdump: ${writeHeapSnapshot()}`); - * }); - * - * // Tell the worker to create a heapdump. - * worker.postMessage('heapdump'); - * } else { - * parentPort.once('message', (message) => { - * if (message === 'heapdump') { - * // Generate a heapdump for the worker - * // and return the filename to the parent. - * parentPort.postMessage(writeHeapSnapshot()); - * } - * }); - * } - * ``` - * @since v11.13.0 - * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be - * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a - * worker thread. - * @return The filename where the snapshot was saved. - */ - function writeHeapSnapshot(filename?: string, options?: HeapSnapshotOptions): string; - /** - * Get statistics about code and its metadata in the heap, see - * V8 [`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the - * following properties: - * - * ```js - * { - * code_and_metadata_size: 212208, - * bytecode_and_metadata_size: 161368, - * external_script_source_size: 1410794, - * cpu_profiler_metadata_size: 0, - * } - * ``` - * @since v12.8.0 - */ - function getHeapCodeStatistics(): HeapCodeStatistics; - /** - * @since v25.0.0 - */ - interface SyncCPUProfileHandle { - /** - * Stopping collecting the profile and return the profile data. - * @since v25.0.0 - */ - stop(): string; - /** - * Stopping collecting the profile and the profile will be discarded. - * @since v25.0.0 - */ - [Symbol.dispose](): void; - } - /** - * @since v24.8.0 - */ - interface CPUProfileHandle { - /** - * Stopping collecting the profile, then return a Promise that fulfills with an error or the - * profile data. - * @since v24.8.0 - */ - stop(): Promise; - /** - * Stopping collecting the profile and the profile will be discarded. - * @since v24.8.0 - */ - [Symbol.asyncDispose](): Promise; - } - /** - * @since v24.9.0 - */ - interface HeapProfileHandle { - /** - * Stopping collecting the profile, then return a Promise that fulfills with an error or the - * profile data. - * @since v24.9.0 - */ - stop(): Promise; - /** - * Stopping collecting the profile and the profile will be discarded. - * @since v24.9.0 - */ - [Symbol.asyncDispose](): Promise; - } - /** - * Starting a CPU profile then return a `SyncCPUProfileHandle` object. - * This API supports `using` syntax. - * - * ```js - * const handle = v8.startCpuProfile(); - * const profile = handle.stop(); - * console.log(profile); - * ``` - * @since v25.0.0 - */ - function startCpuProfile(): SyncCPUProfileHandle; - /** - * V8 only supports `Latin-1/ISO-8859-1` and `UTF16` as the underlying representation of a string. - * If the `content` uses `Latin-1/ISO-8859-1` as the underlying representation, this function will return true; - * otherwise, it returns false. - * - * If this method returns false, that does not mean that the string contains some characters not in `Latin-1/ISO-8859-1`. - * Sometimes a `Latin-1` string may also be represented as `UTF16`. - * - * ```js - * const { isStringOneByteRepresentation } = require('node:v8'); - * - * const Encoding = { - * latin1: 1, - * utf16le: 2, - * }; - * const buffer = Buffer.alloc(100); - * function writeString(input) { - * if (isStringOneByteRepresentation(input)) { - * buffer.writeUint8(Encoding.latin1); - * buffer.writeUint32LE(input.length, 1); - * buffer.write(input, 5, 'latin1'); - * } else { - * buffer.writeUint8(Encoding.utf16le); - * buffer.writeUint32LE(input.length * 2, 1); - * buffer.write(input, 5, 'utf16le'); - * } - * } - * writeString('hello'); - * writeString('你好'); - * ``` - * @since v23.10.0, v22.15.0 - */ - function isStringOneByteRepresentation(content: string): boolean; - /** - * @since v8.0.0 - */ - class Serializer { - /** - * Writes out a header, which includes the serialization format version. - */ - writeHeader(): void; - /** - * Serializes a JavaScript value and adds the serialized representation to the - * internal buffer. - * - * This throws an error if `value` cannot be serialized. - */ - writeValue(val: any): boolean; - /** - * Returns the stored internal buffer. This serializer should not be used once - * the buffer is released. Calling this method results in undefined behavior - * if a previous write has failed. - */ - releaseBuffer(): NonSharedBuffer; - /** - * Marks an `ArrayBuffer` as having its contents transferred out of band. - * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`. - * @param id A 32-bit unsigned integer. - * @param arrayBuffer An `ArrayBuffer` instance. - */ - transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; - /** - * Write a raw 32-bit unsigned integer. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeUint32(value: number): void; - /** - * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeUint64(hi: number, lo: number): void; - /** - * Write a JS `number` value. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeDouble(value: number): void; - /** - * Write raw bytes into the serializer's internal buffer. The deserializer - * will require a way to compute the length of the buffer. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeRawBytes(buffer: NodeJS.ArrayBufferView): void; - } - /** - * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only - * stores the part of their underlying `ArrayBuffer`s that they are referring to. - * @since v8.0.0 - */ - class DefaultSerializer extends Serializer {} - /** - * @since v8.0.0 - */ - class Deserializer { - constructor(data: NodeJS.TypedArray); - /** - * Reads and validates a header (including the format version). - * May, for example, reject an invalid or unsupported wire format. In that case, - * an `Error` is thrown. - */ - readHeader(): boolean; - /** - * Deserializes a JavaScript value from the buffer and returns it. - */ - readValue(): any; - /** - * Marks an `ArrayBuffer` as having its contents transferred out of band. - * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of - * `SharedArrayBuffer`s). - * @param id A 32-bit unsigned integer. - * @param arrayBuffer An `ArrayBuffer` instance. - */ - transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; - /** - * Reads the underlying wire format version. Likely mostly to be useful to - * legacy code reading old wire format versions. May not be called before `.readHeader()`. - */ - getWireFormatVersion(): number; - /** - * Read a raw 32-bit unsigned integer and return it. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readUint32(): number; - /** - * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]` with two 32-bit unsigned integer entries. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readUint64(): [number, number]; - /** - * Read a JS `number` value. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readDouble(): number; - /** - * Read raw bytes from the deserializer's internal buffer. The `length` parameter - * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readRawBytes(length: number): Buffer; - } - /** - * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`. - * @since v8.0.0 - */ - class DefaultDeserializer extends Deserializer {} - /** - * Uses a `DefaultSerializer` to serialize `value` into a buffer. - * - * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to - * serialize a huge object which requires buffer - * larger than `buffer.constants.MAX_LENGTH`. - * @since v8.0.0 - */ - function serialize(value: any): NonSharedBuffer; - /** - * Uses a `DefaultDeserializer` with default options to read a JS value - * from a buffer. - * @since v8.0.0 - * @param buffer A buffer returned by {@link serialize}. - */ - function deserialize(buffer: NodeJS.ArrayBufferView): any; - /** - * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple - * times during the lifetime of the process. Each time the execution counter will - * be reset and a new coverage report will be written to the directory specified - * by `NODE_V8_COVERAGE`. - * - * When the process is about to exit, one last coverage will still be written to - * disk unless {@link stopCoverage} is invoked before the process exits. - * @since v15.1.0, v14.18.0, v12.22.0 - */ - function takeCoverage(): void; - /** - * The `v8.stopCoverage()` method allows the user to stop the coverage collection - * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count - * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand. - * @since v15.1.0, v14.18.0, v12.22.0 - */ - function stopCoverage(): void; - /** - * The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once. - * `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information. - * @since v18.10.0, v16.18.0 - */ - function setHeapSnapshotNearHeapLimit(limit: number): void; - /** - * This API collects GC data in current thread. - * @since v19.6.0, v18.15.0 - */ - class GCProfiler { - /** - * Start collecting GC data. - * @since v19.6.0, v18.15.0 - */ - start(): void; - /** - * Stop collecting GC data and return an object. The content of object - * is as follows. - * - * ```json - * { - * "version": 1, - * "startTime": 1674059033862, - * "statistics": [ - * { - * "gcType": "Scavenge", - * "beforeGC": { - * "heapStatistics": { - * "totalHeapSize": 5005312, - * "totalHeapSizeExecutable": 524288, - * "totalPhysicalSize": 5226496, - * "totalAvailableSize": 4341325216, - * "totalGlobalHandlesSize": 8192, - * "usedGlobalHandlesSize": 2112, - * "usedHeapSize": 4883840, - * "heapSizeLimit": 4345298944, - * "mallocedMemory": 254128, - * "externalMemory": 225138, - * "peakMallocedMemory": 181760 - * }, - * "heapSpaceStatistics": [ - * { - * "spaceName": "read_only_space", - * "spaceSize": 0, - * "spaceUsedSize": 0, - * "spaceAvailableSize": 0, - * "physicalSpaceSize": 0 - * } - * ] - * }, - * "cost": 1574.14, - * "afterGC": { - * "heapStatistics": { - * "totalHeapSize": 6053888, - * "totalHeapSizeExecutable": 524288, - * "totalPhysicalSize": 5500928, - * "totalAvailableSize": 4341101384, - * "totalGlobalHandlesSize": 8192, - * "usedGlobalHandlesSize": 2112, - * "usedHeapSize": 4059096, - * "heapSizeLimit": 4345298944, - * "mallocedMemory": 254128, - * "externalMemory": 225138, - * "peakMallocedMemory": 181760 - * }, - * "heapSpaceStatistics": [ - * { - * "spaceName": "read_only_space", - * "spaceSize": 0, - * "spaceUsedSize": 0, - * "spaceAvailableSize": 0, - * "physicalSpaceSize": 0 - * } - * ] - * } - * } - * ], - * "endTime": 1674059036865 - * } - * ``` - * - * Here's an example. - * - * ```js - * import { GCProfiler } from 'node:v8'; - * const profiler = new GCProfiler(); - * profiler.start(); - * setTimeout(() => { - * console.log(profiler.stop()); - * }, 1000); - * ``` - * @since v19.6.0, v18.15.0 - */ - stop(): GCProfilerResult; - /** - * Stop collecting GC data, and discard the profile. - * @since v25.5.0 - */ - [Symbol.dispose](): void; - } - interface GCProfilerResult { - version: number; - startTime: number; - endTime: number; - statistics: Array<{ - gcType: string; - cost: number; - beforeGC: { - heapStatistics: HeapStatistics; - heapSpaceStatistics: HeapSpaceStatistics[]; - }; - afterGC: { - heapStatistics: HeapStatistics; - heapSpaceStatistics: HeapSpaceStatistics[]; - }; - }>; - } - interface HeapStatistics { - totalHeapSize: number; - totalHeapSizeExecutable: number; - totalPhysicalSize: number; - totalAvailableSize: number; - totalGlobalHandlesSize: number; - usedGlobalHandlesSize: number; - usedHeapSize: number; - heapSizeLimit: number; - mallocedMemory: number; - externalMemory: number; - peakMallocedMemory: number; - } - interface HeapSpaceStatistics { - spaceName: string; - spaceSize: number; - spaceUsedSize: number; - spaceAvailableSize: number; - physicalSpaceSize: number; - } - /** - * Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will - * happen if a promise is created without ever getting a continuation. - * @since v17.1.0, v16.14.0 - * @param promise The promise being created. - * @param parent The promise continued from, if applicable. - */ - interface Init { - (promise: Promise, parent: Promise): void; - } - /** - * Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming. - * - * The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise. - * The before callback may be called many times in the case where many continuations have been made from the same promise. - * @since v17.1.0, v16.14.0 - */ - interface Before { - (promise: Promise): void; - } - /** - * Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await. - * @since v17.1.0, v16.14.0 - */ - interface After { - (promise: Promise): void; - } - /** - * Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or - * {@link Promise.reject()}. - * @since v17.1.0, v16.14.0 - */ - interface Settled { - (promise: Promise): void; - } - /** - * Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or - * around an await, and when the promise resolves or rejects. - * - * Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and - * `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop. - * @since v17.1.0, v16.14.0 - */ - interface HookCallbacks { - init?: Init; - before?: Before; - after?: After; - settled?: Settled; - } - interface PromiseHooks { - /** - * The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param init The {@link Init | `init` callback} to call when a promise is created. - * @return Call to stop the hook. - */ - onInit: (init: Init) => Function; - /** - * The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param settled The {@link Settled | `settled` callback} to call when a promise is created. - * @return Call to stop the hook. - */ - onSettled: (settled: Settled) => Function; - /** - * The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param before The {@link Before | `before` callback} to call before a promise continuation executes. - * @return Call to stop the hook. - */ - onBefore: (before: Before) => Function; - /** - * The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param after The {@link After | `after` callback} to call after a promise continuation executes. - * @return Call to stop the hook. - */ - onAfter: (after: After) => Function; - /** - * Registers functions to be called for different lifetime events of each promise. - * The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime. - * All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed. - * The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param callbacks The {@link HookCallbacks | Hook Callbacks} to register - * @return Used for disabling hooks - */ - createHook: (callbacks: HookCallbacks) => Function; - } - /** - * The `promiseHooks` interface can be used to track promise lifecycle events. - * @since v17.1.0, v16.14.0 - */ - const promiseHooks: PromiseHooks; - type StartupSnapshotCallbackFn = (args: any) => any; - /** - * The `v8.startupSnapshot` interface can be used to add serialization and deserialization hooks for custom startup snapshots. - * - * ```bash - * $ node --snapshot-blob snapshot.blob --build-snapshot entry.js - * # This launches a process with the snapshot - * $ node --snapshot-blob snapshot.blob - * ``` - * - * In the example above, `entry.js` can use methods from the `v8.startupSnapshot` interface to specify how to save information for custom objects - * in the snapshot during serialization and how the information can be used to synchronize these objects during deserialization of the snapshot. - * For example, if the `entry.js` contains the following script: - * - * ```js - * 'use strict'; - * - * import fs from 'node:fs'; - * import zlib from 'node:zlib'; - * import path from 'node:path'; - * import assert from 'node:assert'; - * - * import v8 from 'node:v8'; - * - * class BookShelf { - * storage = new Map(); - * - * // Reading a series of files from directory and store them into storage. - * constructor(directory, books) { - * for (const book of books) { - * this.storage.set(book, fs.readFileSync(path.join(directory, book))); - * } - * } - * - * static compressAll(shelf) { - * for (const [ book, content ] of shelf.storage) { - * shelf.storage.set(book, zlib.gzipSync(content)); - * } - * } - * - * static decompressAll(shelf) { - * for (const [ book, content ] of shelf.storage) { - * shelf.storage.set(book, zlib.gunzipSync(content)); - * } - * } - * } - * - * // __dirname here is where the snapshot script is placed - * // during snapshot building time. - * const shelf = new BookShelf(__dirname, [ - * 'book1.en_US.txt', - * 'book1.es_ES.txt', - * 'book2.zh_CN.txt', - * ]); - * - * assert(v8.startupSnapshot.isBuildingSnapshot()); - * // On snapshot serialization, compress the books to reduce size. - * v8.startupSnapshot.addSerializeCallback(BookShelf.compressAll, shelf); - * // On snapshot deserialization, decompress the books. - * v8.startupSnapshot.addDeserializeCallback(BookShelf.decompressAll, shelf); - * v8.startupSnapshot.setDeserializeMainFunction((shelf) => { - * // process.env and process.argv are refreshed during snapshot - * // deserialization. - * const lang = process.env.BOOK_LANG || 'en_US'; - * const book = process.argv[1]; - * const name = `${book}.${lang}.txt`; - * console.log(shelf.storage.get(name)); - * }, shelf); - * ``` - * - * The resulted binary will get print the data deserialized from the snapshot during start up, using the refreshed `process.env` and `process.argv` of the launched process: - * - * ```bash - * $ BOOK_LANG=es_ES node --snapshot-blob snapshot.blob book1 - * # Prints content of book1.es_ES.txt deserialized from the snapshot. - * ``` - * - * Currently the application deserialized from a user-land snapshot cannot be snapshotted again, so these APIs are only available to applications that are not deserialized from a user-land snapshot. - * - * @since v18.6.0, v16.17.0 - */ - namespace startupSnapshot { - /** - * Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit. - * This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization. - * @since v18.6.0, v16.17.0 - */ - function addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * Add a callback that will be called when the Node.js instance is deserialized from a snapshot. - * The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or - * to re-acquire resources that the application needs when the application is restarted from the snapshot. - * @since v18.6.0, v16.17.0 - */ - function addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script. - * If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized - * data (if provided), otherwise an entry point script still needs to be provided to the deserialized application. - * @since v18.6.0, v16.17.0 - */ - function setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * Returns true if the Node.js instance is run to build a snapshot. - * @since v18.6.0, v16.17.0 - */ - function isBuildingSnapshot(): boolean; - } -} -declare module "v8" { - export * from "node:v8"; -} diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts deleted file mode 100644 index 963078c..0000000 --- a/node_modules/@types/node/vm.d.ts +++ /dev/null @@ -1,1136 +0,0 @@ -declare module "node:vm" { - import { NonSharedBuffer } from "node:buffer"; - import { ImportAttributes, ImportPhase } from "node:module"; - interface Context extends NodeJS.Dict {} - interface BaseOptions { - /** - * Specifies the filename used in stack traces produced by this script. - * @default '' - */ - filename?: string | undefined; - /** - * Specifies the line number offset that is displayed in stack traces produced by this script. - * @default 0 - */ - lineOffset?: number | undefined; - /** - * Specifies the column number offset that is displayed in stack traces produced by this script. - * @default 0 - */ - columnOffset?: number | undefined; - } - type DynamicModuleLoader = ( - specifier: string, - referrer: T, - importAttributes: ImportAttributes, - phase: ImportPhase, - ) => Module | Promise; - interface ScriptOptions extends BaseOptions { - /** - * Provides an optional data with V8's code cache data for the supplied source. - */ - cachedData?: NodeJS.ArrayBufferView | undefined; - /** @deprecated in favor of `script.createCachedData()` */ - produceCachedData?: boolean | undefined; - /** - * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is - * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see - * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis). - * @experimental - */ - importModuleDynamically?: - | DynamicModuleLoader -``` - -| Distribution | Location -|--------------|-------------------------------------------------------- -| Full | -| Light | -| Minimal | - -All variants support CommonJS and AMD loaders and export globally as `window.protobuf`. - -Usage ------ - -Because JavaScript is a dynamically typed language, protobuf.js utilizes the concept of a **valid message** in order to provide the best possible [performance](#performance) (and, as a side product, proper typings): - -### Valid message - -> A valid message is an object (1) not missing any required fields and (2) exclusively composed of JS types understood by the wire format writer. - -There are two possible types of valid messages and the encoder is able to work with both of these for convenience: - -* **Message instances** (explicit instances of message classes with default values on their prototype) naturally satisfy the requirements of a valid message and -* **Plain JavaScript objects** that just so happen to be composed in a way satisfying the requirements of a valid message as well. - -In a nutshell, the wire format writer understands the following types: - -| Field type | Expected JS type (create, encode) | Conversion (fromObject) -|------------|-----------------------------------|------------------------ -| s-/u-/int32
s-/fixed32 | `number` (32 bit integer) | value | 0 if signed
`value >>> 0` if unsigned -| s-/u-/int64
s-/fixed64 | `Long`-like (optimal)
`number` (53 bit integer) | `Long.fromValue(value)` with long.js
`parseInt(value, 10)` otherwise -| float
double | `number` | `Number(value)` -| bool | `boolean` | `Boolean(value)` -| string | `string` | `String(value)` -| bytes | `Uint8Array` (optimal)
`Buffer` (optimal under node)
`Array.` (8 bit integers) | `base64.decode(value)` if a `string`
`Object` with non-zero `.length` is assumed to be buffer-like -| enum | `number` (32 bit integer) | Looks up the numeric id if a `string` -| message | Valid message | `Message.fromObject(value)` -| repeated T | `Array` | Copy -| map | `Object` | Copy - -* Explicit `undefined` and `null` are considered as not set if the field is optional. -* Maps are objects where the key is the string representation of the respective value or an 8 characters long hash string for `Long`-likes. - -### Toolset - -With that in mind and again for performance reasons, each message class provides a distinct set of methods with each method doing just one thing. This avoids unnecessary assertions / redundant operations where performance is a concern but also forces a user to perform verification (of plain JavaScript objects that *might* just so happen to be a valid message) explicitly where necessary - for example when dealing with user input. - -**Note** that `Message` below refers to any message class. - -* **Message.verify**(message: `Object`): `null|string`
- verifies that a **plain JavaScript object** satisfies the requirements of a valid message and thus can be encoded without issues. Instead of throwing, it returns the error message as a string, if any. - - ```js - var payload = "invalid (not an object)"; - var err = AwesomeMessage.verify(payload); - if (err) - throw Error(err); - ``` - -* **Message.encode**(message: `Message|Object` [, writer: `Writer`]): `Writer`
- encodes a **message instance** or valid **plain JavaScript object**. This method does not implicitly verify the message and it's up to the user to make sure that the payload is a valid message. - - ```js - var buffer = AwesomeMessage.encode(message).finish(); - ``` - -* **Message.encodeDelimited**(message: `Message|Object` [, writer: `Writer`]): `Writer`
- works like `Message.encode` but additionally prepends the length of the message as a varint. - -* **Message.decode**(reader: `Reader|Uint8Array`): `Message`
- decodes a buffer to a **message instance**. If required fields are missing, it throws a `util.ProtocolError` with an `instance` property set to the so far decoded message. If the wire format is invalid, it throws an `Error`. - - ```js - try { - var decodedMessage = AwesomeMessage.decode(buffer); - } catch (e) { - if (e instanceof protobuf.util.ProtocolError) { - // e.instance holds the so far decoded message with missing required fields - } else { - // wire format is invalid - } - } - ``` - -* **Message.decodeDelimited**(reader: `Reader|Uint8Array`): `Message`
- works like `Message.decode` but additionally reads the length of the message prepended as a varint. - -* **Message.create**(properties: `Object`): `Message`
- creates a new **message instance** from a set of properties that satisfy the requirements of a valid message. Where applicable, it is recommended to prefer `Message.create` over `Message.fromObject` because it doesn't perform possibly redundant conversion. - - ```js - var message = AwesomeMessage.create({ awesomeField: "AwesomeString" }); - ``` - -* **Message.fromObject**(object: `Object`): `Message`
- converts any non-valid **plain JavaScript object** to a **message instance** using the conversion steps outlined within the table above. - - ```js - var message = AwesomeMessage.fromObject({ awesomeField: 42 }); - // converts awesomeField to a string - ``` - -* **Message.toObject**(message: `Message` [, options: `ConversionOptions`]): `Object`
- converts a **message instance** to an arbitrary **plain JavaScript object** for interoperability with other libraries or storage. The resulting plain JavaScript object *might* still satisfy the requirements of a valid message depending on the actual conversion options specified, but most of the time it does not. - - ```js - var object = AwesomeMessage.toObject(message, { - enums: String, // enums as string names - longs: String, // longs as strings (or BigInt for bigint values) - bytes: String, // bytes as base64 encoded strings - defaults: true, // includes default values - arrays: true, // populates empty arrays (repeated fields) even if defaults=false - objects: true, // populates empty objects (map fields) even if defaults=false - oneofs: true // includes virtual oneof fields set to the present field's name - }); - ``` - -For reference, the following diagram aims to display relationships between the different methods and the concept of a valid message: - -

Toolset Diagram

- -> In other words: `verify` indicates that calling `create` or `encode` directly on the plain object will [result in a valid message respectively] succeed. `fromObject`, on the other hand, does conversion from a broader range of plain objects to create valid messages. ([ref](https://github.com/protobufjs/protobuf.js/issues/748#issuecomment-291925749)) - -Examples --------- - -### Using .proto files - -It is possible to load existing .proto files using the full library, which parses and compiles the definitions to ready to use (reflection-based) message classes: - -```protobuf -// awesome.proto -package awesomepackage; -syntax = "proto3"; - -message AwesomeMessage { - string awesome_field = 1; // becomes awesomeField -} -``` - -```js -protobuf.load("awesome.proto", function(err, root) { - if (err) - throw err; - - // Obtain a message type - var AwesomeMessage = root.lookupType("awesomepackage.AwesomeMessage"); - - // Exemplary payload - var payload = { awesomeField: "AwesomeString" }; - - // Verify the payload if necessary (i.e. when possibly incomplete or invalid) - var errMsg = AwesomeMessage.verify(payload); - if (errMsg) - throw Error(errMsg); - - // Create a new message - var message = AwesomeMessage.create(payload); // or use .fromObject if conversion is necessary - - // Encode a message to an Uint8Array (browser) or Buffer (node) - var buffer = AwesomeMessage.encode(message).finish(); - // ... do something with buffer - - // Decode an Uint8Array (browser) or Buffer (node) to a message - var message = AwesomeMessage.decode(buffer); - // ... do something with message - - // If the application uses length-delimited buffers, there is also encodeDelimited and decodeDelimited. - - // Maybe convert the message back to a plain object - var object = AwesomeMessage.toObject(message, { - longs: String, - enums: String, - bytes: String, - // see ConversionOptions - }); -}); -``` - -Additionally, promise syntax can be used by omitting the callback, if preferred: - -```js -protobuf.load("awesome.proto") - .then(function(root) { - ... - }); -``` - -### Using JSON descriptors - -The library utilizes JSON descriptors that are equivalent to a .proto definition. For example, the following is identical to the .proto definition seen above: - -```json -// awesome.json -{ - "nested": { - "awesomepackage": { - "nested": { - "AwesomeMessage": { - "fields": { - "awesomeField": { - "type": "string", - "id": 1 - } - } - } - } - } - } -} -``` - -JSON descriptors closely resemble the internal reflection structure: - -| Type (T) | Extends | Type-specific properties -|--------------------|--------------------|------------------------- -| *ReflectionObject* | | options -| *Namespace* | *ReflectionObject* | nested -| Root | *Namespace* | **nested** -| Type | *Namespace* | **fields** -| Enum | *ReflectionObject* | **values** -| Field | *ReflectionObject* | rule, **type**, **id** -| MapField | Field | **keyType** -| OneOf | *ReflectionObject* | **oneof** (array of field names) -| Service | *Namespace* | **methods** -| Method | *ReflectionObject* | type, **requestType**, **responseType**, requestStream, responseStream - -* **Bold properties** are required. *Italic types* are abstract. -* `T.fromJSON(name, json)` creates the respective reflection object from a JSON descriptor -* `T#toJSON()` creates a JSON descriptor from the respective reflection object (its name is used as the key within the parent) - -Exclusively using JSON descriptors instead of .proto files enables the use of just the light library (the parser isn't required in this case). - -A JSON descriptor can either be loaded the usual way: - -```js -protobuf.load("awesome.json", function(err, root) { - if (err) throw err; - - // Continue at "Obtain a message type" above -}); -``` - -Or it can be loaded inline: - -```js -var jsonDescriptor = require("./awesome.json"); // exemplary for node - -var root = protobuf.Root.fromJSON(jsonDescriptor); - -// Continue at "Obtain a message type" above -``` - -### Using reflection only - -Both the full and the light library include full reflection support. One could, for example, define the .proto definitions seen in the examples above using just reflection: - -```js -... -var Root = protobuf.Root, - Type = protobuf.Type, - Field = protobuf.Field; - -var AwesomeMessage = new Type("AwesomeMessage").add(new Field("awesomeField", 1, "string")); - -var root = new Root().define("awesomepackage").add(AwesomeMessage); - -// Continue at "Create a new message" above -... -``` - -Detailed information on the reflection structure is available within the [API documentation](#additional-documentation). - -### Using custom classes - -Message classes can also be extended with custom functionality and it is also possible to register a custom constructor with a reflected message type: - -```js -... - -// Define a custom constructor -function AwesomeMessage(properties) { - // custom initialization code - ... -} - -// Register the custom constructor with its reflected type (*) -root.lookupType("awesomepackage.AwesomeMessage").ctor = AwesomeMessage; - -// Define custom functionality -AwesomeMessage.customStaticMethod = function() { ... }; -AwesomeMessage.prototype.customInstanceMethod = function() { ... }; - -// Continue at "Create a new message" above -``` - -(*) Besides referencing its reflected type through `AwesomeMessage.$type` and `AwesomeMesage#$type`, the respective custom class is automatically populated with: - -* `AwesomeMessage.create` -* `AwesomeMessage.encode` and `AwesomeMessage.encodeDelimited` -* `AwesomeMessage.decode` and `AwesomeMessage.decodeDelimited` -* `AwesomeMessage.verify` -* `AwesomeMessage.fromObject`, `AwesomeMessage.toObject` and `AwesomeMessage#toJSON` - -Afterwards, decoded messages of this type are `instanceof AwesomeMessage`. - -Alternatively, it is also possible to reuse and extend the internal constructor if custom initialization code is not required: - -```js -... - -// Reuse the internal constructor -var AwesomeMessage = root.lookupType("awesomepackage.AwesomeMessage").ctor; - -// Define custom functionality -AwesomeMessage.customStaticMethod = function() { ... }; -AwesomeMessage.prototype.customInstanceMethod = function() { ... }; - -// Continue at "Create a new message" above -``` - -### Using services - -The library also supports consuming services but it doesn't make any assumptions about the actual transport channel. Instead, a user must provide a suitable RPC implementation, which is an asynchronous function that takes the reflected service method, the binary request and a node-style callback as its parameters: - -```js -function rpcImpl(method, requestData, callback) { - // perform the request using an HTTP request or a WebSocket for example - var responseData = ...; - // and call the callback with the binary response afterwards: - callback(null, responseData); -} -``` - -Below is a working example with a typescript implementation using grpc npm package. -```ts -const grpc = require('grpc') - -const Client = grpc.makeGenericClientConstructor({}) -const client = new Client( - grpcServerUrl, - grpc.credentials.createInsecure() -) - -const rpcImpl = function(method, requestData, callback) { - client.makeUnaryRequest( - method.name, - arg => arg, - arg => arg, - requestData, - callback - ) -} -``` - -Example: - -```protobuf -// greeter.proto -syntax = "proto3"; - -service Greeter { - rpc SayHello (HelloRequest) returns (HelloReply) {} -} - -message HelloRequest { - string name = 1; -} - -message HelloReply { - string message = 1; -} -``` - -```js -... -var Greeter = root.lookup("Greeter"); -var greeter = Greeter.create(/* see above */ rpcImpl, /* request delimited? */ false, /* response delimited? */ false); - -greeter.sayHello({ name: 'you' }, function(err, response) { - console.log('Greeting:', response.message); -}); -``` - -Services also support promises: - -```js -greeter.sayHello({ name: 'you' }) - .then(function(response) { - console.log('Greeting:', response.message); - }); -``` - -There is also an [example for streaming RPC](https://github.com/protobufjs/protobuf.js/blob/master/examples/streaming-rpc.js). - -Note that the service API is meant for clients. Implementing a server-side endpoint pretty much always requires transport channel (i.e. http, websocket, etc.) specific code with the only common denominator being that it decodes and encodes messages. - -### Usage with TypeScript - -The library ships with its own [type definitions](https://github.com/protobufjs/protobuf.js/blob/master/index.d.ts) and modern editors like [Visual Studio Code](https://code.visualstudio.com/) will automatically detect and use them for code completion. - -The npm package depends on [@types/node](https://www.npmjs.com/package/@types/node) because of `Buffer` and [@types/long](https://www.npmjs.com/package/@types/long) because of `Long`. If you are not building for node and/or not using long.js, it should be safe to exclude them manually. - -#### Using the JS API - -The API shown above works pretty much the same with TypeScript. However, because everything is typed, accessing fields on instances of dynamically generated message classes requires either using bracket-notation (i.e. `message["awesomeField"]`) or explicit casts. Alternatively, it is possible to use a [typings file generated for its static counterpart](#pbts-for-typescript). - -```ts -import { load } from "protobufjs"; // respectively "./node_modules/protobufjs" - -load("awesome.proto", function(err, root) { - if (err) - throw err; - - // example code - const AwesomeMessage = root.lookupType("awesomepackage.AwesomeMessage"); - - let message = AwesomeMessage.create({ awesomeField: "hello" }); - console.log(`message = ${JSON.stringify(message)}`); - - let buffer = AwesomeMessage.encode(message).finish(); - console.log(`buffer = ${Array.prototype.toString.call(buffer)}`); - - let decoded = AwesomeMessage.decode(buffer); - console.log(`decoded = ${JSON.stringify(decoded)}`); -}); -``` - -#### Using generated static code - -If you generated static code to `bundle.js` using the CLI and its type definitions to `bundle.d.ts`, then you can just do: - -```ts -import { AwesomeMessage } from "./bundle.js"; - -// example code -let message = AwesomeMessage.create({ awesomeField: "hello" }); -let buffer = AwesomeMessage.encode(message).finish(); -let decoded = AwesomeMessage.decode(buffer); -``` - -#### Using decorators - -The library also includes an early implementation of [decorators](https://www.typescriptlang.org/docs/handbook/decorators.html). - -**Note** that decorators are an experimental feature in TypeScript and that declaration order is important depending on the JS target. For example, `@Field.d(2, AwesomeArrayMessage)` requires that `AwesomeArrayMessage` has been defined earlier when targeting `ES5`. - -```ts -import { Message, Type, Field, OneOf } from "protobufjs/light"; // respectively "./node_modules/protobufjs/light.js" - -export class AwesomeSubMessage extends Message { - - @Field.d(1, "string") - public awesomeString: string; - -} - -export enum AwesomeEnum { - ONE = 1, - TWO = 2 -} - -@Type.d("SuperAwesomeMessage") -export class AwesomeMessage extends Message { - - @Field.d(1, "string", "optional", "awesome default string") - public awesomeField: string; - - @Field.d(2, AwesomeSubMessage) - public awesomeSubMessage: AwesomeSubMessage; - - @Field.d(3, AwesomeEnum, "optional", AwesomeEnum.ONE) - public awesomeEnum: AwesomeEnum; - - @OneOf.d("awesomeSubMessage", "awesomeEnum") - public which: string; - -} - -// example code -let message = new AwesomeMessage({ awesomeField: "hello" }); -let buffer = AwesomeMessage.encode(message).finish(); -let decoded = AwesomeMessage.decode(buffer); -``` - -Supported decorators are: - -* **Type.d(typeName?: `string`)**   *(optional)*
- annotates a class as a protobuf message type. If `typeName` is not specified, the constructor's runtime function name is used for the reflected type. - -* **Field.d<T>(fieldId: `number`, fieldType: `string | Constructor`, fieldRule?: `"optional" | "required" | "repeated"`, defaultValue?: `T`)**
- annotates a property as a protobuf field with the specified id and protobuf type. - -* **MapField.d<T extends { [key: string]: any }>(fieldId: `number`, fieldKeyType: `string`, fieldValueType. `string | Constructor<{}>`)**
- annotates a property as a protobuf map field with the specified id, protobuf key and value type. - -* **OneOf.d<T extends string>(...fieldNames: `string[]`)**
- annotates a property as a protobuf oneof covering the specified fields. - -Other notes: - -* Decorated types reside in `protobuf.roots["decorated"]` using a flat structure, so no duplicate names. -* Enums are copied to a reflected enum with a generic name on decorator evaluation because referenced enum objects have no runtime name the decorator could use. -* Default values must be specified as arguments to the decorator instead of using a property initializer for proper prototype behavior. -* Property names on decorated classes must not be renamed on compile time (i.e. by a minifier) because decorators just receive the original field name as a string. - -**ProTip!** Not as pretty, but you can [use decorators in plain JavaScript](https://github.com/protobufjs/protobuf.js/blob/master/examples/js-decorators.js) as well. - -Additional documentation ------------------------- - -#### Protocol Buffers -* [Google's Developer Guide](https://protobuf.dev/overview/) - -#### protobuf.js -* [API Documentation](https://protobufjs.github.io/protobuf.js) -* [CHANGELOG](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md) -* [Frequently asked questions](https://github.com/protobufjs/protobuf.js/wiki) on our wiki - -#### Community -* [Questions and answers](http://stackoverflow.com/search?tab=newest&q=protobuf.js) on StackOverflow - -Performance ------------ -The package includes a benchmark that compares protobuf.js performance to native JSON (as far as this is possible) and [Google's JS implementation](https://github.com/google/protobuf/tree/master/js). On an i7-2600K running node 6.9.1 it yields: - -``` -benchmarking encoding performance ... - -protobuf.js (reflect) x 541,707 ops/sec ±1.13% (87 runs sampled) -protobuf.js (static) x 548,134 ops/sec ±1.38% (89 runs sampled) -JSON (string) x 318,076 ops/sec ±0.63% (93 runs sampled) -JSON (buffer) x 179,165 ops/sec ±2.26% (91 runs sampled) -google-protobuf x 74,406 ops/sec ±0.85% (86 runs sampled) - - protobuf.js (static) was fastest - protobuf.js (reflect) was 0.9% ops/sec slower (factor 1.0) - JSON (string) was 41.5% ops/sec slower (factor 1.7) - JSON (buffer) was 67.6% ops/sec slower (factor 3.1) - google-protobuf was 86.4% ops/sec slower (factor 7.3) - -benchmarking decoding performance ... - -protobuf.js (reflect) x 1,383,981 ops/sec ±0.88% (93 runs sampled) -protobuf.js (static) x 1,378,925 ops/sec ±0.81% (93 runs sampled) -JSON (string) x 302,444 ops/sec ±0.81% (93 runs sampled) -JSON (buffer) x 264,882 ops/sec ±0.81% (93 runs sampled) -google-protobuf x 179,180 ops/sec ±0.64% (94 runs sampled) - - protobuf.js (reflect) was fastest - protobuf.js (static) was 0.3% ops/sec slower (factor 1.0) - JSON (string) was 78.1% ops/sec slower (factor 4.6) - JSON (buffer) was 80.8% ops/sec slower (factor 5.2) - google-protobuf was 87.0% ops/sec slower (factor 7.7) - -benchmarking combined performance ... - -protobuf.js (reflect) x 275,900 ops/sec ±0.78% (90 runs sampled) -protobuf.js (static) x 290,096 ops/sec ±0.96% (90 runs sampled) -JSON (string) x 129,381 ops/sec ±0.77% (90 runs sampled) -JSON (buffer) x 91,051 ops/sec ±0.94% (90 runs sampled) -google-protobuf x 42,050 ops/sec ±0.85% (91 runs sampled) - - protobuf.js (static) was fastest - protobuf.js (reflect) was 4.7% ops/sec slower (factor 1.0) - JSON (string) was 55.3% ops/sec slower (factor 2.2) - JSON (buffer) was 68.6% ops/sec slower (factor 3.2) - google-protobuf was 85.5% ops/sec slower (factor 6.9) -``` - -These results are achieved by - -* generating type-specific encoders, decoders, verifiers and converters at runtime -* configuring the reader/writer interface according to the environment -* using node-specific functionality where beneficial and, of course -* avoiding unnecessary operations through splitting up [the toolset](#toolset). - -You can also run [the benchmark](https://github.com/protobufjs/protobuf.js/blob/master/bench/index.js) ... - -``` -$> npm run bench -``` - -and [the profiler](https://github.com/protobufjs/protobuf.js/blob/master/bench/prof.js) yourself (the latter requires a recent version of node): - -``` -$> npm run prof [iterations=10000000] -``` - -Note that as of this writing, the benchmark suite performs significantly slower on node 7.2.0 compared to 6.9.1 because moths. - -Compatibility -------------- - -* Works in all modern and not-so-modern browsers except IE8. -* Because the internals of this package do not rely on `google/protobuf/descriptor.proto`, options are parsed and presented literally. -* If typed arrays are not supported by the environment, plain arrays will be used instead. -* Support for pre-ES5 environments (except IE8) can be achieved by [using a polyfill](https://github.com/protobufjs/protobuf.js/blob/master/lib/polyfill.js). -* Support for [Content Security Policy](https://w3c.github.io/webappsec-csp/)-restricted environments (like Chrome extensions without unsafe-eval) can be achieved by generating and using static code instead. -* If a proper way to work with 64 bit values (uint64, int64 etc.) is required, just install [long.js](https://github.com/dcodeIO/long.js) alongside this library. All 64 bit numbers will then be returned as a `Long` instance instead of a possibly unsafe JavaScript number ([see](https://github.com/dcodeIO/long.js)). -* For descriptor.proto interoperability, see [ext/descriptor](https://github.com/protobufjs/protobuf.js/tree/master/ext/descriptor) - -Building --------- - -To build the library or its components yourself, clone it from GitHub and install the development dependencies: - -``` -$> git clone https://github.com/protobufjs/protobuf.js.git -$> cd protobuf.js -$> npm install -``` - -Building the respective development and production versions with their respective source maps to `dist/`: - -``` -$> npm run build -``` - -Building the documentation to `docs/`: - -``` -$> npm run docs -``` - -Building the TypeScript definition to `index.d.ts`: - -``` -$> npm run build:types -``` - -### Browserify integration - -By default, protobuf.js integrates into any browserify build-process without requiring any optional modules. Hence: - -* If int64 support is required, explicitly require the `long` module somewhere in your project as it will be excluded otherwise. This assumes that a global `require` function is present that protobuf.js can call to obtain the long module. - - If there is no global `require` function present after bundling, it's also possible to assign the long module programmatically: - - ```js - var Long = ...; - - protobuf.util.Long = Long; - protobuf.configure(); - ``` - -* If you have any special requirements, there is [the bundler](https://github.com/protobufjs/protobuf.js/blob/master/scripts/bundle.js) for reference. - -**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/protobufjs/dist/light/protobuf.js b/node_modules/protobufjs/dist/light/protobuf.js deleted file mode 100644 index adeb30e..0000000 --- a/node_modules/protobufjs/dist/light/protobuf.js +++ /dev/null @@ -1,8081 +0,0 @@ -/*! - * protobuf.js v7.6.1 (c) 2016, daniel wirtz - * compiled fri, 22 may 2026 02:52:08 utc - * licensed under the bsd-3-clause license - * see: https://github.com/dcodeio/protobuf.js for details - */ -(function(undefined){"use strict";(function prelude(modules, cache, entries) { - - // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS - // sources through a conflict-free require shim and is again wrapped within an iife that - // provides a minification-friendly `undefined` var plus a global "use strict" directive - // so that minification can remove the directives of each module. - - function $require(name) { - var $module = cache[name]; - if (!$module) - modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports); - return $module.exports; - } - - var protobuf = $require(entries[0]); - - // Expose globally - protobuf.util.global.protobuf = protobuf; - - // Be nice to AMD - if (typeof define === "function" && define.amd) - define(["long"], function(Long) { - if (Long && Long.isLong) { - protobuf.util.Long = Long; - protobuf.configure(); - } - return protobuf; - }); - - // Be nice to CommonJS - if (typeof module === "object" && module && module.exports) - module.exports = protobuf; - -})/* end of prelude */({1:[function(require,module,exports){ -"use strict"; -module.exports = asPromise; - -/** - * Callback as used by {@link util.asPromise}. - * @typedef asPromiseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {...*} params Additional arguments - * @returns {undefined} - */ - -/** - * Returns a promise from a node-style callback function. - * @memberof util - * @param {asPromiseCallback} fn Function to call - * @param {*} ctx Function context - * @param {...*} params Function arguments - * @returns {Promise<*>} Promisified function - */ -function asPromise(fn, ctx/*, varargs */) { - var params = new Array(arguments.length - 1), - offset = 0, - index = 2, - pending = true; - while (index < arguments.length) - params[offset++] = arguments[index++]; - return new Promise(function executor(resolve, reject) { - params[offset] = function callback(err/*, varargs */) { - if (pending) { - pending = false; - if (err) - reject(err); - else { - var params = new Array(arguments.length - 1), - offset = 0; - while (offset < params.length) - params[offset++] = arguments[offset]; - resolve.apply(null, params); - } - } - }; - try { - fn.apply(ctx || null, params); - } catch (err) { - if (pending) { - pending = false; - reject(err); - } - } - }); -} - -},{}],2:[function(require,module,exports){ -"use strict"; - -/** - * A minimal base64 implementation for number arrays. - * @memberof util - * @namespace - */ -var base64 = exports; - -/** - * Calculates the byte length of a base64 encoded string. - * @param {string} string Base64 encoded string - * @returns {number} Byte length - */ -base64.length = function length(string) { - var p = string.length; - if (!p) - return 0; - var n = 0; - while (--p % 4 > 1 && string.charAt(p) === "=") - ++n; - return Math.ceil(string.length * 3) / 4 - n; -}; - -// Base64 encoding table -var b64 = new Array(64); - -// Base64 decoding table -var s64 = new Array(123); - -// 65..90, 97..122, 48..57, 43, 47 -for (var i = 0; i < 64;) - s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; - -/** - * Encodes a buffer to a base64 encoded string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} Base64 encoded string - */ -base64.encode = function encode(buffer, start, end) { - var parts = null, - chunk = []; - var i = 0, // output index - j = 0, // goto index - t; // temporary - while (start < end) { - var b = buffer[start++]; - switch (j) { - case 0: - chunk[i++] = b64[b >> 2]; - t = (b & 3) << 4; - j = 1; - break; - case 1: - chunk[i++] = b64[t | b >> 4]; - t = (b & 15) << 2; - j = 2; - break; - case 2: - chunk[i++] = b64[t | b >> 6]; - chunk[i++] = b64[b & 63]; - j = 0; - break; - } - if (i > 8191) { - (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); - i = 0; - } - } - if (j) { - chunk[i++] = b64[t]; - chunk[i++] = 61; - if (j === 1) - chunk[i++] = 61; - } - if (parts) { - if (i) - parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); - return parts.join(""); - } - return String.fromCharCode.apply(String, chunk.slice(0, i)); -}; - -var invalidEncoding = "invalid encoding"; - -/** - * Decodes a base64 encoded string to a buffer. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Number of bytes written - * @throws {Error} If encoding is invalid - */ -base64.decode = function decode(string, buffer, offset) { - var start = offset; - var j = 0, // goto index - t; // temporary - for (var i = 0; i < string.length;) { - var c = string.charCodeAt(i++); - if (c === 61 && j > 1) - break; - if ((c = s64[c]) === undefined) - throw Error(invalidEncoding); - switch (j) { - case 0: - t = c; - j = 1; - break; - case 1: - buffer[offset++] = t << 2 | (c & 48) >> 4; - t = c; - j = 2; - break; - case 2: - buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; - t = c; - j = 3; - break; - case 3: - buffer[offset++] = (t & 3) << 6 | c; - j = 0; - break; - } - } - if (j === 1) - throw Error(invalidEncoding); - return offset - start; -}; - -/** - * Tests if the specified string appears to be base64 encoded. - * @param {string} string String to test - * @returns {boolean} `true` if probably base64 encoded, otherwise false - */ -base64.test = function test(string) { - return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); -}; - -},{}],3:[function(require,module,exports){ -"use strict"; -module.exports = codegen; - -var reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/; - -/** - * Begins generating a function. - * @memberof util - * @param {string[]} functionParams Function parameter names - * @param {string} [functionName] Function name if not anonymous - * @returns {Codegen} Appender that appends code to the function's body - */ -function codegen(functionParams, functionName) { - - /* istanbul ignore if */ - if (typeof functionParams === "string") { - functionName = functionParams; - functionParams = undefined; - } - - var body = []; - - /** - * Appends code to the function's body or finishes generation. - * @typedef Codegen - * @type {function} - * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any - * @param {...*} [formatParams] Format parameters - * @returns {Codegen|Function} Itself or the generated function if finished - * @throws {Error} If format parameter counts do not match - */ - - function Codegen(formatStringOrScope) { - // note that explicit array handling below makes this ~50% faster - - // finish the function - if (typeof formatStringOrScope !== "string") { - var source = toString(); - if (codegen.verbose) - console.log("codegen: " + source); // eslint-disable-line no-console - source = "return " + source; - if (formatStringOrScope) { - var scopeKeys = Object.keys(formatStringOrScope), - scopeParams = new Array(scopeKeys.length + 1), - scopeValues = new Array(scopeKeys.length), - scopeOffset = 0; - while (scopeOffset < scopeKeys.length) { - scopeParams[scopeOffset] = scopeKeys[scopeOffset]; - scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]]; - } - scopeParams[scopeOffset] = source; - return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func - } - return Function(source)(); // eslint-disable-line no-new-func - } - - // otherwise append to body - var formatParams = new Array(arguments.length - 1), - formatOffset = 0; - while (formatOffset < formatParams.length) - formatParams[formatOffset] = arguments[++formatOffset]; - formatOffset = 0; - formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) { - var value = formatParams[formatOffset++]; - switch ($1) { - case "d": case "f": return String(Number(value)); - case "i": return String(Math.floor(value)); - case "j": return JSON.stringify(value); - case "s": return String(value); - } - return "%"; - }); - if (formatOffset !== formatParams.length) - throw Error("parameter count mismatch"); - body.push(formatStringOrScope); - return Codegen; - } - - function toString(functionNameOverride) { - return "function " + safeFunctionName(functionNameOverride || functionName) + "(" + (functionParams && functionParams.join(",") || "") + "){\n " + body.join("\n ") + "\n}"; - } - - Codegen.toString = toString; - return Codegen; -} - -/** - * Begins generating a function. - * @memberof util - * @function codegen - * @param {string} [functionName] Function name if not anonymous - * @returns {Codegen} Appender that appends code to the function's body - * @variation 2 - */ - -/** - * When set to `true`, codegen will log generated code to console. Useful for debugging. - * @name util.codegen.verbose - * @type {boolean} - */ -codegen.verbose = false; - -function safeFunctionName(name) { - if (!name) - return ""; - name = String(name).replace(/[^\w$]/g, ""); - if (!name) - return ""; - if (/^\d/.test(name)) - name = "_" + name; - return reservedRe.test(name) ? name + "_" : name; -} - -},{}],4:[function(require,module,exports){ -"use strict"; -module.exports = EventEmitter; - -/** - * Constructs a new event emitter instance. - * @classdesc A minimal event emitter. - * @memberof util - * @constructor - */ -function EventEmitter() { - - /** - * Registered listeners. - * @type {Object.} - * @private - */ - this._listeners = Object.create(null); -} - -/** - * Event listener as used by {@link util.EventEmitter}. - * @typedef EventEmitterListener - * @type {function} - * @param {...*} args Arguments - * @returns {undefined} - */ - -/** - * Registers an event listener. - * @param {string} evt Event name - * @param {EventEmitterListener} fn Listener - * @param {*} [ctx] Listener context - * @returns {this} `this` - */ -EventEmitter.prototype.on = function on(evt, fn, ctx) { - (this._listeners[evt] || (this._listeners[evt] = [])).push({ - fn : fn, - ctx : ctx || this - }); - return this; -}; - -/** - * Removes an event listener or any matching listeners if arguments are omitted. - * @param {string} [evt] Event name. Removes all listeners if omitted. - * @param {EventEmitterListener} [fn] Listener to remove. Removes all listeners of `evt` if omitted. - * @returns {this} `this` - */ -EventEmitter.prototype.off = function off(evt, fn) { - if (evt === undefined) - this._listeners = Object.create(null); - else { - if (fn === undefined) - this._listeners[evt] = []; - else { - var listeners = this._listeners[evt]; - if (!listeners) - return this; - for (var i = 0; i < listeners.length;) - if (listeners[i].fn === fn) - listeners.splice(i, 1); - else - ++i; - } - } - return this; -}; - -/** - * Emits an event by calling its listeners with the specified arguments. - * @param {string} evt Event name - * @param {...*} args Arguments - * @returns {this} `this` - */ -EventEmitter.prototype.emit = function emit(evt) { - var listeners = this._listeners[evt]; - if (listeners) { - var args = [], - i = 1; - for (; i < arguments.length;) - args.push(arguments[i++]); - for (i = 0; i < listeners.length;) - listeners[i].fn.apply(listeners[i++].ctx, args); - } - return this; -}; - -},{}],5:[function(require,module,exports){ -"use strict"; -module.exports = fetch; - -var asPromise = require(1), - fs = require(6); - -/** - * Node-style callback as used by {@link util.fetch}. - * @typedef FetchCallback - * @type {function} - * @param {?Error} error Error, if any, otherwise `null` - * @param {string} [contents] File contents, if there hasn't been an error - * @returns {undefined} - */ - -/** - * Options as used by {@link util.fetch}. - * @interface IFetchOptions - * @property {boolean} [binary=false] Whether expecting a binary response - * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest - */ - -/** - * Fetches the contents of a file. - * @memberof util - * @param {string} filename File path or url - * @param {IFetchOptions} options Fetch options - * @param {FetchCallback} callback Callback function - * @returns {undefined} - */ -function fetch(filename, options, callback) { - if (typeof options === "function") { - callback = options; - options = {}; - } else if (!options) - options = {}; - - if (!callback) - return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this - - // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found. - if (!options.xhr && fs && fs.readFile) - return fs.readFile(filename, function fetchReadFileCallback(err, contents) { - return err && typeof XMLHttpRequest !== "undefined" - ? fetch.xhr(filename, options, callback) - : err - ? callback(err) - : callback(null, options.binary ? contents : contents.toString("utf8")); - }); - - // use the XHR version otherwise. - return fetch.xhr(filename, options, callback); -} - -/** - * Fetches the contents of a file. - * @name util.fetch - * @function - * @param {string} path File path or url - * @param {FetchCallback} callback Callback function - * @returns {undefined} - * @variation 2 - */ - -/** - * Fetches the contents of a file. - * @name util.fetch - * @function - * @param {string} path File path or url - * @param {IFetchOptions} [options] Fetch options - * @returns {Promise} Promise - * @variation 3 - */ - -/**/ -fetch.xhr = function fetch_xhr(filename, options, callback) { - var xhr = new XMLHttpRequest(); - xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() { - - if (xhr.readyState !== 4) - return undefined; - - // local cors security errors return status 0 / empty string, too. afaik this cannot be - // reliably distinguished from an actually empty file for security reasons. feel free - // to send a pull request if you are aware of a solution. - if (xhr.status !== 0 && xhr.status !== 200) - return callback(Error("status " + xhr.status)); - - // if binary data is expected, make sure that some sort of array is returned, even if - // ArrayBuffers are not supported. the binary string fallback, however, is unsafe. - if (options.binary) { - var buffer = xhr.response; - if (!buffer) { - buffer = []; - for (var i = 0; i < xhr.responseText.length; ++i) - buffer.push(xhr.responseText.charCodeAt(i) & 255); - } - return callback(null, typeof Uint8Array !== "undefined" ? new Uint8Array(buffer) : buffer); - } - return callback(null, xhr.responseText); - }; - - if (options.binary) { - // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers - if ("overrideMimeType" in xhr) - xhr.overrideMimeType("text/plain; charset=x-user-defined"); - xhr.responseType = "arraybuffer"; - } - - xhr.open("GET", filename); - xhr.send(); -}; - -},{"1":1,"6":6}],6:[function(require,module,exports){ -"use strict"; - -var fs = null; -try { - fs = require(12); - if (!fs || !fs.readFile || !fs.readFileSync) - fs = null; -} catch (e) { - // `fs` is unavailable in browsers and browser-like bundles. -} -module.exports = fs; - -},{"12":12}],7:[function(require,module,exports){ -"use strict"; - -module.exports = factory(factory); - -/** - * Reads / writes floats / doubles from / to buffers. - * @name util.float - * @namespace - */ - -/** - * Writes a 32 bit float to a buffer using little endian byte order. - * @name util.float.writeFloatLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Writes a 32 bit float to a buffer using big endian byte order. - * @name util.float.writeFloatBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Reads a 32 bit float from a buffer using little endian byte order. - * @name util.float.readFloatLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Reads a 32 bit float from a buffer using big endian byte order. - * @name util.float.readFloatBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Writes a 64 bit double to a buffer using little endian byte order. - * @name util.float.writeDoubleLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Writes a 64 bit double to a buffer using big endian byte order. - * @name util.float.writeDoubleBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Reads a 64 bit double from a buffer using little endian byte order. - * @name util.float.readDoubleLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Reads a 64 bit double from a buffer using big endian byte order. - * @name util.float.readDoubleBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -// Factory function for the purpose of node-based testing in modified global environments -function factory(exports) { - - // float: typed array - if (typeof Float32Array !== "undefined") (function() { - - var f32 = new Float32Array([ -0 ]), - f8b = new Uint8Array(f32.buffer), - le = f8b[3] === 128; - - function writeFloat_f32_cpy(val, buf, pos) { - f32[0] = val; - buf[pos ] = f8b[0]; - buf[pos + 1] = f8b[1]; - buf[pos + 2] = f8b[2]; - buf[pos + 3] = f8b[3]; - } - - function writeFloat_f32_rev(val, buf, pos) { - f32[0] = val; - buf[pos ] = f8b[3]; - buf[pos + 1] = f8b[2]; - buf[pos + 2] = f8b[1]; - buf[pos + 3] = f8b[0]; - } - - /* istanbul ignore next */ - exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev; - /* istanbul ignore next */ - exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy; - - function readFloat_f32_cpy(buf, pos) { - f8b[0] = buf[pos ]; - f8b[1] = buf[pos + 1]; - f8b[2] = buf[pos + 2]; - f8b[3] = buf[pos + 3]; - return f32[0]; - } - - function readFloat_f32_rev(buf, pos) { - f8b[3] = buf[pos ]; - f8b[2] = buf[pos + 1]; - f8b[1] = buf[pos + 2]; - f8b[0] = buf[pos + 3]; - return f32[0]; - } - - /* istanbul ignore next */ - exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev; - /* istanbul ignore next */ - exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy; - - // float: ieee754 - })(); else (function() { - - function writeFloat_ieee754(writeUint, val, buf, pos) { - var sign = val < 0 ? 1 : 0; - if (sign) - val = -val; - if (val === 0) - writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos); - else if (isNaN(val)) - writeUint(2143289344, buf, pos); - else if (val > 3.4028234663852886e+38) // +-Infinity - writeUint((sign << 31 | 2139095040) >>> 0, buf, pos); - else if (val < 1.1754943508222875e-38) // denormal - writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos); - else { - var exponent = Math.floor(Math.log(val) / Math.LN2), - mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607; - writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos); - } - } - - exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE); - exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE); - - function readFloat_ieee754(readUint, buf, pos) { - var uint = readUint(buf, pos), - sign = (uint >> 31) * 2 + 1, - exponent = uint >>> 23 & 255, - mantissa = uint & 8388607; - return exponent === 255 - ? mantissa - ? NaN - : sign * Infinity - : exponent === 0 // denormal - ? sign * 1.401298464324817e-45 * mantissa - : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608); - } - - exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE); - exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE); - - })(); - - // double: typed array - if (typeof Float64Array !== "undefined") (function() { - - var f64 = new Float64Array([-0]), - f8b = new Uint8Array(f64.buffer), - le = f8b[7] === 128; - - function writeDouble_f64_cpy(val, buf, pos) { - f64[0] = val; - buf[pos ] = f8b[0]; - buf[pos + 1] = f8b[1]; - buf[pos + 2] = f8b[2]; - buf[pos + 3] = f8b[3]; - buf[pos + 4] = f8b[4]; - buf[pos + 5] = f8b[5]; - buf[pos + 6] = f8b[6]; - buf[pos + 7] = f8b[7]; - } - - function writeDouble_f64_rev(val, buf, pos) { - f64[0] = val; - buf[pos ] = f8b[7]; - buf[pos + 1] = f8b[6]; - buf[pos + 2] = f8b[5]; - buf[pos + 3] = f8b[4]; - buf[pos + 4] = f8b[3]; - buf[pos + 5] = f8b[2]; - buf[pos + 6] = f8b[1]; - buf[pos + 7] = f8b[0]; - } - - /* istanbul ignore next */ - exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev; - /* istanbul ignore next */ - exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy; - - function readDouble_f64_cpy(buf, pos) { - f8b[0] = buf[pos ]; - f8b[1] = buf[pos + 1]; - f8b[2] = buf[pos + 2]; - f8b[3] = buf[pos + 3]; - f8b[4] = buf[pos + 4]; - f8b[5] = buf[pos + 5]; - f8b[6] = buf[pos + 6]; - f8b[7] = buf[pos + 7]; - return f64[0]; - } - - function readDouble_f64_rev(buf, pos) { - f8b[7] = buf[pos ]; - f8b[6] = buf[pos + 1]; - f8b[5] = buf[pos + 2]; - f8b[4] = buf[pos + 3]; - f8b[3] = buf[pos + 4]; - f8b[2] = buf[pos + 5]; - f8b[1] = buf[pos + 6]; - f8b[0] = buf[pos + 7]; - return f64[0]; - } - - /* istanbul ignore next */ - exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev; - /* istanbul ignore next */ - exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy; - - // double: ieee754 - })(); else (function() { - - function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) { - var sign = val < 0 ? 1 : 0; - if (sign) - val = -val; - if (val === 0) { - writeUint(0, buf, pos + off0); - writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1); - } else if (isNaN(val)) { - writeUint(0, buf, pos + off0); - writeUint(2146959360, buf, pos + off1); - } else if (val > 1.7976931348623157e+308) { // +-Infinity - writeUint(0, buf, pos + off0); - writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1); - } else { - var mantissa; - if (val < 2.2250738585072014e-308) { // denormal - mantissa = val / 5e-324; - writeUint(mantissa >>> 0, buf, pos + off0); - writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1); - } else { - var exponent = Math.floor(Math.log(val) / Math.LN2); - if (exponent === 1024) - exponent = 1023; - mantissa = val * Math.pow(2, -exponent); - writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0); - writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1); - } - } - } - - exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4); - exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0); - - function readDouble_ieee754(readUint, off0, off1, buf, pos) { - var lo = readUint(buf, pos + off0), - hi = readUint(buf, pos + off1); - var sign = (hi >> 31) * 2 + 1, - exponent = hi >>> 20 & 2047, - mantissa = 4294967296 * (hi & 1048575) + lo; - return exponent === 2047 - ? mantissa - ? NaN - : sign * Infinity - : exponent === 0 // denormal - ? sign * 5e-324 * mantissa - : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496); - } - - exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4); - exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0); - - })(); - - return exports; -} - -// uint helpers - -function writeUintLE(val, buf, pos) { - buf[pos ] = val & 255; - buf[pos + 1] = val >>> 8 & 255; - buf[pos + 2] = val >>> 16 & 255; - buf[pos + 3] = val >>> 24; -} - -function writeUintBE(val, buf, pos) { - buf[pos ] = val >>> 24; - buf[pos + 1] = val >>> 16 & 255; - buf[pos + 2] = val >>> 8 & 255; - buf[pos + 3] = val & 255; -} - -function readUintLE(buf, pos) { - return (buf[pos ] - | buf[pos + 1] << 8 - | buf[pos + 2] << 16 - | buf[pos + 3] << 24) >>> 0; -} - -function readUintBE(buf, pos) { - return (buf[pos ] << 24 - | buf[pos + 1] << 16 - | buf[pos + 2] << 8 - | buf[pos + 3]) >>> 0; -} - -},{}],8:[function(require,module,exports){ -"use strict"; -module.exports = inquire; - -/** - * Requires a module only if available. - * @memberof util - * @param {string} moduleName Module to require - * @returns {?Object} Required module if available and not empty, otherwise `null` - * @deprecated Legacy optional require helper. Will be removed in a future release. - */ -function inquire(moduleName) { - try { - if (typeof require !== "function") { - return null; - } - var mod = require(moduleName); - if (mod && (mod.length || Object.keys(mod).length)) return mod; - return null; - } catch (err) { - // ignore - return null; - } -} - -/* -// maybe worth a shot to prevent renaming issues: -// see: https://github.com/webpack/webpack/blob/master/lib/dependencies/CommonJsRequireDependencyParserPlugin.js -// triggers on: -// - expression require.cache -// - expression require (???) -// - call require -// - call require:commonjs:item -// - call require:commonjs:context - -Object.defineProperty(Function.prototype, "__self", { get: function() { return this; } }); -var r = require.__self; -delete Function.prototype.__self; -*/ - -},{}],9:[function(require,module,exports){ -"use strict"; - -/** - * A minimal path module to resolve Unix, Windows and URL paths alike. - * @memberof util - * @namespace - */ -var path = exports; - -var isAbsolute = -/** - * Tests if the specified path is absolute. - * @param {string} path Path to test - * @returns {boolean} `true` if path is absolute - */ -path.isAbsolute = function isAbsolute(path) { - return /^(?:\/|\w+:)/.test(path); -}; - -var normalize = -/** - * Normalizes the specified path. - * @param {string} path Path to normalize - * @returns {string} Normalized path - */ -path.normalize = function normalize(path) { - path = path.replace(/\\/g, "/") - .replace(/\/{2,}/g, "/"); - var parts = path.split("/"), - absolute = isAbsolute(path), - prefix = ""; - if (absolute) - prefix = parts.shift() + "/"; - for (var i = 0; i < parts.length;) { - if (parts[i] === "..") { - if (i > 0 && parts[i - 1] !== "..") - parts.splice(--i, 2); - else if (absolute) - parts.splice(i, 1); - else - ++i; - } else if (parts[i] === ".") - parts.splice(i, 1); - else - ++i; - } - return prefix + parts.join("/"); -}; - -/** - * Resolves the specified include path against the specified origin path. - * @param {string} originPath Path to the origin file - * @param {string} includePath Include path relative to origin path - * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized - * @returns {string} Path to the include file - */ -path.resolve = function resolve(originPath, includePath, alreadyNormalized) { - if (!alreadyNormalized) - includePath = normalize(includePath); - if (isAbsolute(includePath)) - return includePath; - if (!alreadyNormalized) - originPath = normalize(originPath); - return (originPath = originPath.replace(/(?:\/|^)[^/]+$/, "")).length ? normalize(originPath + "/" + includePath) : includePath; -}; - -},{}],10:[function(require,module,exports){ -"use strict"; -module.exports = pool; - -/** - * An allocator as used by {@link util.pool}. - * @typedef PoolAllocator - * @type {function} - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ - -/** - * A slicer as used by {@link util.pool}. - * @typedef PoolSlicer - * @type {function} - * @param {number} start Start offset - * @param {number} end End offset - * @returns {Uint8Array} Buffer slice - * @this {Uint8Array} - */ - -/** - * A general purpose buffer pool. - * @memberof util - * @function - * @param {PoolAllocator} alloc Allocator - * @param {PoolSlicer} slice Slicer - * @param {number} [size=8192] Slab size - * @returns {PoolAllocator} Pooled allocator - */ -function pool(alloc, slice, size) { - var SIZE = size || 8192; - var MAX = SIZE >>> 1; - var slab = null; - var offset = SIZE; - return function pool_alloc(size) { - if (size < 1 || size > MAX) - return alloc(size); - if (offset + size > SIZE) { - slab = alloc(SIZE); - offset = 0; - } - var buf = slice.call(slab, offset, offset += size); - if (offset & 7) // align to 32 bit - offset = (offset | 7) + 1; - return buf; - }; -} - -},{}],11:[function(require,module,exports){ -"use strict"; - -/** - * A minimal UTF8 implementation for number arrays. - * @memberof util - * @namespace - */ -var utf8 = exports, - replacementChar = "\ufffd"; - -/** - * Calculates the UTF8 byte length of a string. - * @param {string} string String - * @returns {number} Byte length - */ -utf8.length = function utf8_length(string) { - var len = 0, - c = 0; - for (var i = 0; i < string.length; ++i) { - c = string.charCodeAt(i); - if (c < 128) - len += 1; - else if (c < 2048) - len += 2; - else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { - ++i; - len += 4; - } else - len += 3; - } - return len; -}; - -/** - * Reads UTF8 bytes as a string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} String read - */ -utf8.read = function utf8_read(buffer, start, end) { - if (end - start < 1) { - return ""; - } - - var str = ""; - for (var i = start; i < end;) { - var t = buffer[i++]; - if (t <= 0x7F) { - str += String.fromCharCode(t); - } else if (t >= 0xC0 && t < 0xE0) { - var c2 = (t & 0x1F) << 6 | buffer[i++] & 0x3F; - str += c2 >= 0x80 ? String.fromCharCode(c2) : replacementChar; - } else if (t >= 0xE0 && t < 0xF0) { - var c3 = (t & 0xF) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F; - str += c3 >= 0x800 ? String.fromCharCode(c3) : replacementChar; - } else if (t >= 0xF0) { - var t2 = (t & 7) << 18 | (buffer[i++] & 0x3F) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F; - if (t2 < 0x10000 || t2 > 0x10FFFF) - str += replacementChar; - else { - t2 -= 0x10000; - str += String.fromCharCode(0xD800 + (t2 >> 10)); - str += String.fromCharCode(0xDC00 + (t2 & 0x3FF)); - } - } - } - - return str; -}; - -/** - * Writes a string as UTF8 bytes. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Bytes written - */ -utf8.write = function utf8_write(string, buffer, offset) { - var start = offset, - c1, // character 1 - c2; // character 2 - for (var i = 0; i < string.length; ++i) { - c1 = string.charCodeAt(i); - if (c1 < 128) { - buffer[offset++] = c1; - } else if (c1 < 2048) { - buffer[offset++] = c1 >> 6 | 192; - buffer[offset++] = c1 & 63 | 128; - } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { - c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); - ++i; - buffer[offset++] = c1 >> 18 | 240; - buffer[offset++] = c1 >> 12 & 63 | 128; - buffer[offset++] = c1 >> 6 & 63 | 128; - buffer[offset++] = c1 & 63 | 128; - } else { - buffer[offset++] = c1 >> 12 | 224; - buffer[offset++] = c1 >> 6 & 63 | 128; - buffer[offset++] = c1 & 63 | 128; - } - } - return offset - start; -}; - -},{}],12:[function(require,module,exports){ - -},{}],13:[function(require,module,exports){ -"use strict"; -/** - * Runtime message from/to plain object converters. - * @namespace - */ -var converter = exports; - -var Enum = require(16), - util = require(35); - -/** - * Generates a partial value fromObject conveter. - * @param {Codegen} gen Codegen instance - * @param {Field} field Reflected field - * @param {number} fieldIndex Field index - * @param {string} prop Property reference - * @returns {Codegen} Codegen instance - * @ignore - */ -function genValuePartial_fromObject(gen, field, fieldIndex, prop) { - var defaultAlreadyEmitted = false; - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - if (field.resolvedType) { - if (field.resolvedType instanceof Enum) { gen - ("switch(d%s){", prop); - for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) { - // enum unknown values passthrough - if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen - ("default:") - ("if(typeof(d%s)===\"number\"){m%s=d%s;break}", prop, prop, prop); - if (!field.repeated) gen // fallback to default value only for - // arrays, to avoid leaving holes. - ("break"); // for non-repeated fields, just ignore - defaultAlreadyEmitted = true; - } - gen - ("case%j:", keys[i]) - ("case %i:", values[keys[i]]) - ("m%s=%j", prop, values[keys[i]]) - ("break"); - } gen - ("}"); - } else gen - ("if(typeof d%s!==\"object\")", prop) - ("throw TypeError(%j)", field.fullName + ": object expected") - ("m%s=types[%i].fromObject(d%s,n+1)", prop, fieldIndex, prop); - } else { - var isUnsigned = false; - switch (field.type) { - case "double": - case "float": gen - ("m%s=Number(d%s)", prop, prop); // also catches "NaN", "Infinity" - break; - case "uint32": - case "fixed32": gen - ("m%s=d%s>>>0", prop, prop); - break; - case "int32": - case "sint32": - case "sfixed32": gen - ("m%s=d%s|0", prop, prop); - break; - case "uint64": - case "fixed64": - isUnsigned = true; - // eslint-disable-next-line no-fallthrough - case "int64": - case "sint64": - case "sfixed64": gen - ("if(util.Long)") - ("m%s=util.Long.fromValue(d%s,%j)", prop, prop, isUnsigned) - ("else if(typeof d%s===\"string\")", prop) - ("m%s=parseInt(d%s,10)", prop, prop) - ("else if(typeof d%s===\"number\")", prop) - ("m%s=d%s", prop, prop) - ("else if(typeof d%s===\"object\")", prop) - ("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", prop, prop, prop, isUnsigned ? "true" : ""); - break; - case "bytes": gen - ("if(typeof d%s===\"string\")", prop) - ("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", prop, prop, prop) - ("else if(d%s.length >= 0)", prop) - ("m%s=d%s", prop, prop); - break; - case "string": gen - ("m%s=String(d%s)", prop, prop); - break; - case "bool": gen - ("m%s=Boolean(d%s)", prop, prop); - break; - /* default: gen - ("m%s=d%s", prop, prop); - break; */ - } - } - return gen; - /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ -} - -/** - * Generates a plain object to runtime message converter specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -converter.fromObject = function fromObject(mtype) { - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - var fields = mtype.fieldsArray; - var gen = util.codegen(["d", "n"], mtype.name + "$fromObject") - ("if(d instanceof this.ctor)") - ("return d") - ("if(n===undefined)n=0") - ("if(n>util.recursionLimit)") - ("throw Error(\"maximum nesting depth exceeded\")"); - if (!fields.length) return gen - ("return new this.ctor"); - gen - ("var m=new this.ctor"); - for (var i = 0; i < fields.length; ++i) { - var field = fields[i].resolve(), - prop = util.safeProp(field.name); - - // Map fields - if (field.map) { gen - ("if(d%s){", prop) - ("if(typeof d%s!==\"object\")", prop) - ("throw TypeError(%j)", field.fullName + ": object expected") - ("m%s={}", prop) - ("for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0,%j).toBigInt()", prop, prop, prop, prop, prop, isUnsigned) - ("else if(typeof m%s===\"number\")", prop) - ("d%s=o.longs===String?String(m%s):m%s", prop, prop, prop) - ("else") // Long-like - ("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", prop, prop, prop, prop, isUnsigned ? "true": "", prop); - break; - case "bytes": gen - ("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", prop, prop, prop, prop, prop); - break; - default: gen - ("d%s=m%s", prop, prop); - break; - } - } - return gen; - /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ -} - -/** - * Generates a runtime message to plain object converter specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -converter.toObject = function toObject(mtype) { - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById); - if (!fields.length) - return util.codegen()("return {}"); - var gen = util.codegen(["m", "o", "q"], mtype.name + "$toObject") - ("if(!o)") - ("o={}") - ("if(q===undefined)q=0") - ("if(q>util.recursionLimit)") - ("throw Error(\"max depth exceeded\")") - ("var d={}"); - - var repeatedFields = [], - mapFields = [], - normalFields = [], - i = 0; - for (; i < fields.length; ++i) - if (!fields[i].partOf) - ( fields[i].resolve().repeated ? repeatedFields - : fields[i].map ? mapFields - : normalFields).push(fields[i]); - - if (repeatedFields.length) { gen - ("if(o.arrays||o.defaults){"); - for (i = 0; i < repeatedFields.length; ++i) gen - ("d%s=[]", util.safeProp(repeatedFields[i].name)); - gen - ("}"); - } - - if (mapFields.length) { gen - ("if(o.objects||o.defaults){"); - for (i = 0; i < mapFields.length; ++i) gen - ("d%s={}", util.safeProp(mapFields[i].name)); - gen - ("}"); - } - - if (normalFields.length) { gen - ("if(o.defaults){"); - for (i = 0; i < normalFields.length; ++i) { - var field = normalFields[i], - prop = util.safeProp(field.name); - if (field.resolvedType instanceof Enum) gen - ("d%s=o.enums===String?%j:%j", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault); - else if (field.long) gen - ("if(util.Long){") - ("var n=new util.Long(%i,%i,%j)", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned) - ("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!==\"undefined\"&&o.longs===BigInt?n.toBigInt():n", prop) - ("}else") - ("d%s=o.longs===String?%j:typeof BigInt!==\"undefined\"&&o.longs===BigInt?BigInt(%j):%i", prop, field.typeDefault.toString(), field.typeDefault.toString(), field.typeDefault.toNumber()); - else if (field.bytes) { - var arrayDefault = Array.prototype.slice.call(field.typeDefault); - gen - ("if(o.bytes===String)d%s=%j", prop, String.fromCharCode.apply(String, field.typeDefault)) - ("else{") - ("d%s=%j", prop, arrayDefault) - ("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", prop, prop) - ("}"); - } else gen - ("d%s=%j", prop, field.typeDefault); // also messages (=null) - } gen - ("}"); - } - var hasKs2 = false; - for (i = 0; i < fields.length; ++i) { - var field = fields[i], - index = mtype._fieldsArray.indexOf(field), - prop = util.safeProp(field.name); - if (field.map) { - if (!hasKs2) { hasKs2 = true; gen - ("var ks2"); - } gen - ("if(m%s&&(ks2=Object.keys(m%s)).length){", prop, prop) - ("d%s={}", prop) - ("for(var j=0;jReader.recursionLimit)") - ("throw Error(\"maximum nesting depth exceeded\")") - ("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (mtype.fieldsArray.filter(function(field) { return field.map; }).length ? ",k,value" : "")) - ("while(r.pos>>3){"); - - var i = 0; - for (; i < /* initializes */ mtype.fieldsArray.length; ++i) { - var field = mtype._fieldsArray[i].resolve(), - type = field.resolvedType instanceof Enum ? "int32" : field.type, - ref = "m" + util.safeProp(field.name); gen - ("case %i: {", field.id); - - // Map fields - if (field.map) { gen - ("if(%s===util.emptyObject)", ref) - ("%s={}", ref) - ("var c2 = r.uint32()+r.pos"); - - if (types.defaults[field.keyType] !== undefined) gen - ("k=%j", types.defaults[field.keyType]); - else gen - ("k=null"); - - if (types.defaults[type] !== undefined) gen - ("value=%j", types.defaults[type]); - else gen - ("value=null"); - - gen - ("while(r.pos>>3){") - ("case 1: k=r.%s(); break", field.keyType) - ("case 2:"); - - if (types.basic[type] === undefined) gen - ("value=types[%i].decode(r,r.uint32(),undefined,n+1)", i); // can't be groups - else gen - ("value=r.%s()", type); - - gen - ("break") - ("default:") - ("r.skipType(tag2&7,n)") - ("break") - ("}") - ("}"); - - if (types.long[field.keyType] !== undefined) gen - ("%s[typeof k===\"object\"?util.longToHash(k):k]=value", ref); - else { - if (field.keyType === "string") gen - ("if(k===\"__proto__\")") - ("util.makeProp(%s,k)", ref); - gen - ("%s[k]=value", ref); - } - - // Repeated fields - } else if (field.repeated) { gen - - ("if(!(%s&&%s.length))", ref, ref) - ("%s=[]", ref); - - // Packable (always check for forward and backward compatiblity) - if (types.packed[type] !== undefined) gen - ("if((t&7)===2){") - ("var c2=r.uint32()+r.pos") - ("while(r.pos>> 0, (field.id << 3 | 4) >>> 0) - : gen("types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0); -} - -/** - * Generates an encoder specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -function encoder(mtype) { - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - var gen = util.codegen(["m", "w", "q"], mtype.name + "$encode") - ("if(!w)") - ("w=Writer.create()") - ("if(q===undefined)q=0") - ("if(q>util.recursionLimit)") - ("throw Error(\"max depth exceeded\")"); - - var i, ref; - - // "when a message is serialized its known fields should be written sequentially by field number" - var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById); - - for (var i = 0; i < fields.length; ++i) { - var field = fields[i].resolve(), - index = mtype._fieldsArray.indexOf(field), - type = field.resolvedType instanceof Enum ? "int32" : field.type, - wireType = types.basic[type]; - ref = "m" + util.safeProp(field.name); - - // Map fields - if (field.map) { - gen - ("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", ref, field.name) // !== undefined && !== null - ("for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType); - if (wireType === undefined) gen - ("types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()", index, ref); // can't be groups - else gen - (".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | wireType, type, ref); - gen - ("}") - ("}"); - - // Repeated fields - } else if (field.repeated) { gen - ("if(%s!=null&&%s.length){", ref, ref); // !== undefined && !== null - - // Packed repeated - if (field.packed && types.packed[type] !== undefined) { gen - - ("w.uint32(%i).fork()", (field.id << 3 | 2) >>> 0) - ("for(var i=0;i<%s.length;++i)", ref) - ("w.%s(%s[i])", type, ref) - ("w.ldelim()"); - - // Non-packed - } else { gen - - ("for(var i=0;i<%s.length;++i)", ref); - if (wireType === undefined) - genTypePartial(gen, field, index, ref + "[i]"); - else gen - ("w.uint32(%i).%s(%s[i])", (field.id << 3 | wireType) >>> 0, type, ref); - - } gen - ("}"); - - // Non-repeated - } else { - if (field.optional) gen - ("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", ref, field.name); // !== undefined && !== null - - if (wireType === undefined) - genTypePartial(gen, field, index, ref); - else gen - ("w.uint32(%i).%s(%s)", (field.id << 3 | wireType) >>> 0, type, ref); - - } - } - - return gen - ("return w"); - /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ -} - -},{"16":16,"34":34,"35":35}],16:[function(require,module,exports){ -"use strict"; -module.exports = Enum; - -// extends ReflectionObject -var ReflectionObject = require(24); -((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = "Enum"; - -var Namespace = require(23), - util = require(35); - -/** - * Constructs a new enum instance. - * @classdesc Reflected enum. - * @extends ReflectionObject - * @constructor - * @param {string} name Unique name within its namespace - * @param {Object.} [values] Enum values as an object, by name - * @param {Object.} [options] Declared options - * @param {string} [comment] The comment for this enum - * @param {Object.} [comments] The value comments for this enum - * @param {Object.>|undefined} [valuesOptions] The value options for this enum - */ -function Enum(name, values, options, comment, comments, valuesOptions) { - ReflectionObject.call(this, name, options); - - if (values && typeof values !== "object") - throw TypeError("values must be an object"); - - /** - * Enum values by id. - * @type {Object.} - */ - this.valuesById = {}; - - /** - * Enum values by name. - * @type {Object.} - */ - this.values = Object.create(this.valuesById); // toJSON, marker - - /** - * Enum comment text. - * @type {string|null} - */ - this.comment = comment; - - /** - * Value comment texts, if any. - * @type {Object.} - */ - this.comments = comments || {}; - - /** - * Values options, if any - * @type {Object>|undefined} - */ - this.valuesOptions = valuesOptions; - - /** - * Resolved values features, if any - * @type {Object>|undefined} - */ - this._valuesFeatures = {}; - - /** - * Reserved ranges, if any. - * @type {Array.} - */ - this.reserved = undefined; // toJSON - - // Note that values inherit valuesById on their prototype which makes them a TypeScript- - // compatible enum. This is used by pbts to write actual enum definitions that work for - // static and reflection code alike instead of emitting generic object definitions. - - if (values) - for (var keys = Object.keys(values), i = 0; i < keys.length; ++i) - if (keys[i] !== "__proto__" && typeof values[keys[i]] === "number") // use forward entries only - this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i]; -} - -/** - * @override - */ -Enum.prototype._resolveFeatures = function _resolveFeatures(edition) { - edition = this._edition || edition; - ReflectionObject.prototype._resolveFeatures.call(this, edition); - - Object.keys(this.values).forEach(key => { - var parentFeaturesCopy = util.merge({}, this._features); - this._valuesFeatures[key] = util.merge(parentFeaturesCopy, this.valuesOptions && this.valuesOptions[key] && this.valuesOptions[key].features || {}); - }); - - return this; -}; - -/** - * Enum descriptor. - * @interface IEnum - * @property {Object.} values Enum values - * @property {Object.} [options] Enum options - */ - -/** - * Constructs an enum from an enum descriptor. - * @param {string} name Enum name - * @param {IEnum} json Enum descriptor - * @returns {Enum} Created enum - * @throws {TypeError} If arguments are invalid - */ -Enum.fromJSON = function fromJSON(name, json) { - var enm = new Enum(name, json.values, json.options, json.comment, json.comments); - enm.reserved = json.reserved; - if (json.edition) - enm._edition = json.edition; - enm._defaultEdition = "proto3"; // For backwards-compatibility. - return enm; -}; - -/** - * Converts this enum to an enum descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IEnum} Enum descriptor - */ -Enum.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "edition" , this._editionToJSON(), - "options" , this.options, - "valuesOptions" , this.valuesOptions, - "values" , this.values, - "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, - "comment" , keepComments ? this.comment : undefined, - "comments" , keepComments ? this.comments : undefined - ]); -}; - -/** - * Adds a value to this enum. - * @param {string} name Value name - * @param {number} id Value id - * @param {string} [comment] Comment, if any - * @param {Object.|undefined} [options] Options, if any - * @returns {Enum} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a value with this name or id - */ -Enum.prototype.add = function add(name, id, comment, options) { - // utilized by the parser but not by .fromJSON - - if (!util.isString(name)) - throw TypeError("name must be a string"); - - if (!util.isInteger(id)) - throw TypeError("id must be an integer"); - - if (name === "__proto__") - return this; - - if (this.values[name] !== undefined) - throw Error("duplicate name '" + name + "' in " + this); - - if (this.isReservedId(id)) - throw Error("id " + id + " is reserved in " + this); - - if (this.isReservedName(name)) - throw Error("name '" + name + "' is reserved in " + this); - - if (this.valuesById[id] !== undefined) { - if (!(this.options && this.options.allow_alias)) - throw Error("duplicate id " + id + " in " + this); - this.values[name] = id; - } else - this.valuesById[this.values[name] = id] = name; - - if (options) { - if (this.valuesOptions === undefined) - this.valuesOptions = {}; - this.valuesOptions[name] = options || null; - } - - this.comments[name] = comment || null; - return this; -}; - -/** - * Removes a value from this enum - * @param {string} name Value name - * @returns {Enum} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `name` is not a name of this enum - */ -Enum.prototype.remove = function remove(name) { - - if (!util.isString(name)) - throw TypeError("name must be a string"); - - var val = this.values[name]; - if (val == null) - throw Error("name '" + name + "' does not exist in " + this); - - delete this.valuesById[val]; - delete this.values[name]; - delete this.comments[name]; - if (this.valuesOptions) - delete this.valuesOptions[name]; - - return this; -}; - -/** - * Tests if the specified id is reserved. - * @param {number} id Id to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Enum.prototype.isReservedId = function isReservedId(id) { - return Namespace.isReservedId(this.reserved, id); -}; - -/** - * Tests if the specified name is reserved. - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Enum.prototype.isReservedName = function isReservedName(name) { - return Namespace.isReservedName(this.reserved, name); -}; - -},{"23":23,"24":24,"35":35}],17:[function(require,module,exports){ -"use strict"; -module.exports = Field; - -// extends ReflectionObject -var ReflectionObject = require(24); -((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = "Field"; - -var Enum = require(16), - types = require(34), - util = require(35); - -var Type; // cyclic - -var ruleRe = /^required|optional|repeated$/; - -/** - * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class. - * @name Field - * @classdesc Reflected message field. - * @extends FieldBase - * @constructor - * @param {string} name Unique name within its namespace - * @param {number} id Unique id within its namespace - * @param {string} type Value type - * @param {string|Object.} [rule="optional"] Field rule - * @param {string|Object.} [extend] Extended type if different from parent - * @param {Object.} [options] Declared options - */ - -/** - * Constructs a field from a field descriptor. - * @param {string} name Field name - * @param {IField} json Field descriptor - * @returns {Field} Created field - * @throws {TypeError} If arguments are invalid - */ -Field.fromJSON = function fromJSON(name, json) { - var field = new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment); - if (json.edition) - field._edition = json.edition; - field._defaultEdition = "proto3"; // For backwards-compatibility. - return field; -}; - -/** - * Not an actual constructor. Use {@link Field} instead. - * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions. - * @exports FieldBase - * @extends ReflectionObject - * @constructor - * @param {string} name Unique name within its namespace - * @param {number} id Unique id within its namespace - * @param {string} type Value type - * @param {string|Object.} [rule="optional"] Field rule - * @param {string|Object.} [extend] Extended type if different from parent - * @param {Object.} [options] Declared options - * @param {string} [comment] Comment associated with this field - */ -function Field(name, id, type, rule, extend, options, comment) { - - if (util.isObject(rule)) { - comment = extend; - options = rule; - rule = extend = undefined; - } else if (util.isObject(extend)) { - comment = options; - options = extend; - extend = undefined; - } - - ReflectionObject.call(this, name, options); - - if (!util.isInteger(id) || id < 0) - throw TypeError("id must be a non-negative integer"); - - if (!util.isString(type)) - throw TypeError("type must be a string"); - - if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase())) - throw TypeError("rule must be a string rule"); - - if (extend !== undefined && !util.isString(extend)) - throw TypeError("extend must be a string"); - - /** - * Field rule, if any. - * @type {string|undefined} - */ - if (rule === "proto3_optional") { - rule = "optional"; - } - this.rule = rule && rule !== "optional" ? rule : undefined; // toJSON - - /** - * Field type. - * @type {string} - */ - this.type = type; // toJSON - - /** - * Unique field id. - * @type {number} - */ - this.id = id; // toJSON, marker - - /** - * Extended type if different from parent. - * @type {string|undefined} - */ - this.extend = extend || undefined; // toJSON - - /** - * Whether this field is repeated. - * @type {boolean} - */ - this.repeated = rule === "repeated"; - - /** - * Whether this field is a map or not. - * @type {boolean} - */ - this.map = false; - - /** - * Message this field belongs to. - * @type {Type|null} - */ - this.message = null; - - /** - * OneOf this field belongs to, if any, - * @type {OneOf|null} - */ - this.partOf = null; - - /** - * The field type's default value. - * @type {*} - */ - this.typeDefault = null; - - /** - * The field's default value on prototypes. - * @type {*} - */ - this.defaultValue = null; - - /** - * Whether this field's value should be treated as a long. - * @type {boolean} - */ - this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false; - - /** - * Whether this field's value is a buffer. - * @type {boolean} - */ - this.bytes = type === "bytes"; - - /** - * Resolved type if not a basic type. - * @type {Type|Enum|null} - */ - this.resolvedType = null; - - /** - * Sister-field within the extended type if a declaring extension field. - * @type {Field|null} - */ - this.extensionField = null; - - /** - * Sister-field within the declaring namespace if an extended field. - * @type {Field|null} - */ - this.declaringField = null; - - /** - * Comment for this field. - * @type {string|null} - */ - this.comment = comment; -} - -/** - * Determines whether this field is required. - * @name Field#required - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "required", { - get: function() { - return this._features.field_presence === "LEGACY_REQUIRED"; - } -}); - -/** - * Determines whether this field is not required. - * @name Field#optional - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "optional", { - get: function() { - return !this.required; - } -}); - -/** - * Determines whether this field uses tag-delimited encoding. In proto2 this - * corresponded to group syntax. - * @name Field#delimited - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "delimited", { - get: function() { - return this.resolvedType instanceof Type && - this._features.message_encoding === "DELIMITED"; - } -}); - -/** - * Determines whether this field is packed. Only relevant when repeated. - * @name Field#packed - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "packed", { - get: function() { - return this._features.repeated_field_encoding === "PACKED"; - } -}); - -/** - * Determines whether this field tracks presence. - * @name Field#hasPresence - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "hasPresence", { - get: function() { - if (this.repeated || this.map) { - return false; - } - return this.partOf || // oneofs - this.declaringField || this.extensionField || // extensions - this._features.field_presence !== "IMPLICIT"; - } -}); - -/** - * @override - */ -Field.prototype.setOption = function setOption(name, value, ifNotSet) { - return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet); -}; - -/** - * Field descriptor. - * @interface IField - * @property {string} [rule="optional"] Field rule - * @property {string} type Field type - * @property {number} id Field id - * @property {Object.} [options] Field options - */ - -/** - * Extension field descriptor. - * @interface IExtensionField - * @extends IField - * @property {string} extend Extended type - */ - -/** - * Converts this field to a field descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IField} Field descriptor - */ -Field.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "edition" , this._editionToJSON(), - "rule" , this.rule !== "optional" && this.rule || undefined, - "type" , this.type, - "id" , this.id, - "extend" , this.extend, - "options" , this.options, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * Resolves this field's type references. - * @returns {Field} `this` - * @throws {Error} If any reference cannot be resolved - */ -Field.prototype.resolve = function resolve() { - - if (this.resolved) - return this; - - if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it - this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type); - if (this.resolvedType instanceof Type) - this.typeDefault = null; - else // instanceof Enum - this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined - } else if (this.options && this.options.proto3_optional) { - // proto3 scalar value marked optional; should default to null - this.typeDefault = null; - } - - // use explicitly set default value if present - if (this.options && this.options["default"] != null) { - this.typeDefault = this.options["default"]; - if (this.resolvedType instanceof Enum && typeof this.typeDefault === "string") - this.typeDefault = this.resolvedType.values[this.typeDefault]; - } - - // remove unnecessary options - if (this.options) { - if (this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum)) - delete this.options.packed; - if (!Object.keys(this.options).length) - this.options = undefined; - } - - // convert to internal data type if necesssary - if (this.long) { - this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type === "uint64" || this.type === "fixed64"); - - /* istanbul ignore else */ - if (Object.freeze) - Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it) - - } else if (this.bytes && typeof this.typeDefault === "string") { - var buf; - if (util.base64.test(this.typeDefault)) - util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0); - else - util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0); - this.typeDefault = buf; - } - - // take special care of maps and repeated fields - if (this.map) - this.defaultValue = util.emptyObject; - else if (this.repeated) - this.defaultValue = util.emptyArray; - else - this.defaultValue = this.typeDefault; - - // ensure proper value on prototype - if (this.parent instanceof Type) - this.parent.ctor.prototype[this.name] = this.defaultValue; - - return ReflectionObject.prototype.resolve.call(this); -}; - -/** - * Infers field features from legacy syntax that may have been specified differently. - * in older editions. - * @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions - * @returns {object} The feature values to override - */ -Field.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(edition) { - if (edition !== "proto2" && edition !== "proto3") { - return {}; - } - - var features = {}; - - if (this.rule === "required") { - features.field_presence = "LEGACY_REQUIRED"; - } - if (this.parent && types.defaults[this.type] === undefined) { - // We can't use resolvedType because types may not have been resolved yet. However, - // legacy groups are always in the same scope as the field so we don't have to do a - // full scan of the tree. - var type = this.parent.get(this.type.split(".").pop()); - if (type && type instanceof Type && type.group) { - features.message_encoding = "DELIMITED"; - } - } - if (this.getOption("packed") === true) { - features.repeated_field_encoding = "PACKED"; - } else if (this.getOption("packed") === false) { - features.repeated_field_encoding = "EXPANDED"; - } - return features; -}; - -/** - * @override - */ -Field.prototype._resolveFeatures = function _resolveFeatures(edition) { - return ReflectionObject.prototype._resolveFeatures.call(this, this._edition || edition); -}; - -/** - * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript). - * @typedef FieldDecorator - * @type {function} - * @param {Object} prototype Target prototype - * @param {string} fieldName Field name - * @returns {undefined} - */ - -/** - * Field decorator (TypeScript). - * @name Field.d - * @function - * @param {number} fieldId Field id - * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"string"|"bool"|"bytes"|Object} fieldType Field type - * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule - * @param {T} [defaultValue] Default value - * @returns {FieldDecorator} Decorator function - * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[] - */ -Field.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) { - - // submessage: decorate the submessage and use its name as the type - if (typeof fieldType === "function") - fieldType = util.decorateType(fieldType).name; - - // enum reference: create a reflected copy of the enum and keep reuseing it - else if (fieldType && typeof fieldType === "object") - fieldType = util.decorateEnum(fieldType).name; - - return function fieldDecorator(prototype, fieldName) { - util.decorateType(prototype.constructor) - .add(new Field(fieldName, fieldId, fieldType, fieldRule, { "default": defaultValue })); - }; -}; - -/** - * Field decorator (TypeScript). - * @name Field.d - * @function - * @param {number} fieldId Field id - * @param {Constructor|string} fieldType Field type - * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule - * @returns {FieldDecorator} Decorator function - * @template T extends Message - * @variation 2 - */ -// like Field.d but without a default value - -// Sets up cyclic dependencies (called in index-light) -Field._configure = function configure(Type_) { - Type = Type_; -}; - -},{"16":16,"24":24,"34":34,"35":35}],18:[function(require,module,exports){ -"use strict"; -var protobuf = module.exports = require(19); - -protobuf.build = "light"; - -/** - * A node-style callback as used by {@link load} and {@link Root#load}. - * @typedef LoadCallback - * @type {function} - * @param {Error|null} error Error, if any, otherwise `null` - * @param {Root} [root] Root, if there hasn't been an error - * @returns {undefined} - */ - -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. - * @param {string|string[]} filename One or multiple files to load - * @param {Root} root Root namespace, defaults to create a new one if omitted. - * @param {LoadCallback} callback Callback function - * @returns {undefined} - * @see {@link Root#load} - */ -function load(filename, root, callback) { - if (typeof root === "function") { - callback = root; - root = new protobuf.Root(); - } else if (!root) - root = new protobuf.Root(); - return root.load(filename, callback); -} - -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. - * @name load - * @function - * @param {string|string[]} filename One or multiple files to load - * @param {LoadCallback} callback Callback function - * @returns {undefined} - * @see {@link Root#load} - * @variation 2 - */ -// function load(filename:string, callback:LoadCallback):undefined - -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise. - * @name load - * @function - * @param {string|string[]} filename One or multiple files to load - * @param {Root} [root] Root namespace, defaults to create a new one if omitted. - * @returns {Promise} Promise - * @see {@link Root#load} - * @variation 3 - */ -// function load(filename:string, [root:Root]):Promise - -protobuf.load = load; - -/** - * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only). - * @param {string|string[]} filename One or multiple files to load - * @param {Root} [root] Root namespace, defaults to create a new one if omitted. - * @returns {Root} Root namespace - * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid - * @see {@link Root#loadSync} - */ -function loadSync(filename, root) { - if (!root) - root = new protobuf.Root(); - return root.loadSync(filename); -} - -protobuf.loadSync = loadSync; - -// Serialization -protobuf.encoder = require(15); -protobuf.decoder = require(14); -protobuf.verifier = require(40); -protobuf.converter = require(13); - -// Reflection -protobuf.ReflectionObject = require(24); -protobuf.Namespace = require(23); -protobuf.Root = require(28); -protobuf.Enum = require(16); -protobuf.Type = require(33); -protobuf.Field = require(17); -protobuf.OneOf = require(25); -protobuf.MapField = require(20); -protobuf.Service = require(32); -protobuf.Method = require(22); - -// Runtime -protobuf.Message = require(21); -protobuf.wrappers = require(41); - -// Utility -protobuf.types = require(34); -protobuf.util = require(35); - -// Set up possibly cyclic reflection dependencies -protobuf.ReflectionObject._configure(protobuf.Root); -protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum); -protobuf.Root._configure(protobuf.Type); -protobuf.Field._configure(protobuf.Type); - -},{"13":13,"14":14,"15":15,"16":16,"17":17,"19":19,"20":20,"21":21,"22":22,"23":23,"24":24,"25":25,"28":28,"32":32,"33":33,"34":34,"35":35,"40":40,"41":41}],19:[function(require,module,exports){ -"use strict"; -var protobuf = exports; - -/** - * Build type, one of `"full"`, `"light"` or `"minimal"`. - * @name build - * @type {string} - * @const - */ -protobuf.build = "minimal"; - -// Serialization -protobuf.Writer = require(42); -protobuf.BufferWriter = require(43); -protobuf.Reader = require(26); -protobuf.BufferReader = require(27); - -// Utility -protobuf.util = require(38); -protobuf.rpc = require(30); -protobuf.roots = require(29); -protobuf.configure = configure; - -/* istanbul ignore next */ -/** - * Reconfigures the library according to the environment. - * @returns {undefined} - */ -function configure() { - protobuf.util._configure(); - protobuf.Writer._configure(protobuf.BufferWriter); - protobuf.Reader._configure(protobuf.BufferReader); -} - -// Set up buffer utility according to the environment -configure(); - -},{"26":26,"27":27,"29":29,"30":30,"38":38,"42":42,"43":43}],20:[function(require,module,exports){ -"use strict"; -module.exports = MapField; - -// extends Field -var Field = require(17); -((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = "MapField"; - -var types = require(34), - util = require(35); - -/** - * Constructs a new map field instance. - * @classdesc Reflected map field. - * @extends FieldBase - * @constructor - * @param {string} name Unique name within its namespace - * @param {number} id Unique id within its namespace - * @param {string} keyType Key type - * @param {string} type Value type - * @param {Object.} [options] Declared options - * @param {string} [comment] Comment associated with this field - */ -function MapField(name, id, keyType, type, options, comment) { - Field.call(this, name, id, type, undefined, undefined, options, comment); - - /* istanbul ignore if */ - if (!util.isString(keyType)) - throw TypeError("keyType must be a string"); - - /** - * Key type. - * @type {string} - */ - this.keyType = keyType; // toJSON, marker - - /** - * Resolved key type if not a basic type. - * @type {ReflectionObject|null} - */ - this.resolvedKeyType = null; - - // Overrides Field#map - this.map = true; -} - -/** - * Map field descriptor. - * @interface IMapField - * @extends {IField} - * @property {string} keyType Key type - */ - -/** - * Extension map field descriptor. - * @interface IExtensionMapField - * @extends IMapField - * @property {string} extend Extended type - */ - -/** - * Constructs a map field from a map field descriptor. - * @param {string} name Field name - * @param {IMapField} json Map field descriptor - * @returns {MapField} Created map field - * @throws {TypeError} If arguments are invalid - */ -MapField.fromJSON = function fromJSON(name, json) { - return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment); -}; - -/** - * Converts this map field to a map field descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IMapField} Map field descriptor - */ -MapField.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "keyType" , this.keyType, - "type" , this.type, - "id" , this.id, - "extend" , this.extend, - "options" , this.options, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * @override - */ -MapField.prototype.resolve = function resolve() { - if (this.resolved) - return this; - - // Besides a value type, map fields have a key type that may be "any scalar type except for floating point types and bytes" - if (types.mapKey[this.keyType] === undefined) - throw Error("invalid key type: " + this.keyType); - - return Field.prototype.resolve.call(this); -}; - -/** - * Map field decorator (TypeScript). - * @name MapField.d - * @function - * @param {number} fieldId Field id - * @param {"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"} fieldKeyType Field key type - * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"|"bytes"|Object|Constructor<{}>} fieldValueType Field value type - * @returns {FieldDecorator} Decorator function - * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> } - */ -MapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) { - - // submessage value: decorate the submessage and use its name as the type - if (typeof fieldValueType === "function") - fieldValueType = util.decorateType(fieldValueType).name; - - // enum reference value: create a reflected copy of the enum and keep reuseing it - else if (fieldValueType && typeof fieldValueType === "object") - fieldValueType = util.decorateEnum(fieldValueType).name; - - return function mapFieldDecorator(prototype, fieldName) { - util.decorateType(prototype.constructor) - .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType)); - }; -}; - -},{"17":17,"34":34,"35":35}],21:[function(require,module,exports){ -"use strict"; -module.exports = Message; - -var util = require(38); - -/** - * Constructs a new message instance. - * @classdesc Abstract runtime message. - * @constructor - * @param {Properties} [properties] Properties to set - * @template T extends object = object - */ -function Message(properties) { - // not used internally - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) { - var key = keys[i]; - if (key === "__proto__") - continue; - this[key] = properties[key]; - } -} - -/** - * Reference to the reflected type. - * @name Message.$type - * @type {Type} - * @readonly - */ - -/** - * Reference to the reflected type. - * @name Message#$type - * @type {Type} - * @readonly - */ - -/*eslint-disable valid-jsdoc*/ - -/** - * Creates a new message of this type using the specified properties. - * @param {Object.} [properties] Properties to set - * @returns {Message} Message instance - * @template T extends Message - * @this Constructor - */ -Message.create = function create(properties) { - return this.$type.create(properties); -}; - -/** - * Encodes a message of this type. - * @param {T|Object.} message Message to encode - * @param {Writer} [writer] Writer to use - * @returns {Writer} Writer - * @template T extends Message - * @this Constructor - */ -Message.encode = function encode(message, writer) { - return this.$type.encode(message, writer); -}; - -/** - * Encodes a message of this type preceeded by its length as a varint. - * @param {T|Object.} message Message to encode - * @param {Writer} [writer] Writer to use - * @returns {Writer} Writer - * @template T extends Message - * @this Constructor - */ -Message.encodeDelimited = function encodeDelimited(message, writer) { - return this.$type.encodeDelimited(message, writer); -}; - -/** - * Decodes a message of this type. - * @name Message.decode - * @function - * @param {Reader|Uint8Array} reader Reader or buffer to decode - * @returns {T} Decoded message - * @template T extends Message - * @this Constructor - */ -Message.decode = function decode(reader) { - return this.$type.decode(reader); -}; - -/** - * Decodes a message of this type preceeded by its length as a varint. - * @name Message.decodeDelimited - * @function - * @param {Reader|Uint8Array} reader Reader or buffer to decode - * @returns {T} Decoded message - * @template T extends Message - * @this Constructor - */ -Message.decodeDelimited = function decodeDelimited(reader) { - return this.$type.decodeDelimited(reader); -}; - -/** - * Verifies a message of this type. - * @name Message.verify - * @function - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ -Message.verify = function verify(message) { - return this.$type.verify(message); -}; - -/** - * Creates a new message of this type from a plain object. Also converts values to their respective internal types. - * @param {Object.} object Plain object - * @returns {T} Message instance - * @template T extends Message - * @this Constructor - */ -Message.fromObject = function fromObject(object) { - return this.$type.fromObject(object); -}; - -/** - * Creates a plain object from a message of this type. Also converts values to other types if specified. - * @param {T} message Message instance - * @param {IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - * @template T extends Message - * @this Constructor - */ -Message.toObject = function toObject(message, options) { - return this.$type.toObject(message, options); -}; - -/** - * Converts this message to JSON. - * @returns {Object.} JSON object - */ -Message.prototype.toJSON = function toJSON() { - return this.$type.toObject(this, util.toJSONOptions); -}; - -/*eslint-enable valid-jsdoc*/ - -},{"38":38}],22:[function(require,module,exports){ -"use strict"; -module.exports = Method; - -// extends ReflectionObject -var ReflectionObject = require(24); -((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = "Method"; - -var util = require(35); - -/** - * Constructs a new service method instance. - * @classdesc Reflected service method. - * @extends ReflectionObject - * @constructor - * @param {string} name Method name - * @param {string|undefined} type Method type, usually `"rpc"` - * @param {string} requestType Request message type - * @param {string} responseType Response message type - * @param {boolean|Object.} [requestStream] Whether the request is streamed - * @param {boolean|Object.} [responseStream] Whether the response is streamed - * @param {Object.} [options] Declared options - * @param {string} [comment] The comment for this method - * @param {Object.} [parsedOptions] Declared options, properly parsed into an object - */ -function Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) { - - /* istanbul ignore next */ - if (util.isObject(requestStream)) { - options = requestStream; - requestStream = responseStream = undefined; - } else if (util.isObject(responseStream)) { - options = responseStream; - responseStream = undefined; - } - - /* istanbul ignore if */ - if (!(type === undefined || util.isString(type))) - throw TypeError("type must be a string"); - - /* istanbul ignore if */ - if (!util.isString(requestType)) - throw TypeError("requestType must be a string"); - - /* istanbul ignore if */ - if (!util.isString(responseType)) - throw TypeError("responseType must be a string"); - - ReflectionObject.call(this, name, options); - - /** - * Method type. - * @type {string} - */ - this.type = type || "rpc"; // toJSON - - /** - * Request type. - * @type {string} - */ - this.requestType = requestType; // toJSON, marker - - /** - * Whether requests are streamed or not. - * @type {boolean|undefined} - */ - this.requestStream = requestStream ? true : undefined; // toJSON - - /** - * Response type. - * @type {string} - */ - this.responseType = responseType; // toJSON - - /** - * Whether responses are streamed or not. - * @type {boolean|undefined} - */ - this.responseStream = responseStream ? true : undefined; // toJSON - - /** - * Resolved request type. - * @type {Type|null} - */ - this.resolvedRequestType = null; - - /** - * Resolved response type. - * @type {Type|null} - */ - this.resolvedResponseType = null; - - /** - * Comment for this method - * @type {string|null} - */ - this.comment = comment; - - /** - * Options properly parsed into an object - */ - this.parsedOptions = parsedOptions; -} - -/** - * Method descriptor. - * @interface IMethod - * @property {string} [type="rpc"] Method type - * @property {string} requestType Request type - * @property {string} responseType Response type - * @property {boolean} [requestStream=false] Whether requests are streamed - * @property {boolean} [responseStream=false] Whether responses are streamed - * @property {Object.} [options] Method options - * @property {string} comment Method comments - * @property {Object.} [parsedOptions] Method options properly parsed into an object - */ - -/** - * Constructs a method from a method descriptor. - * @param {string} name Method name - * @param {IMethod} json Method descriptor - * @returns {Method} Created method - * @throws {TypeError} If arguments are invalid - */ -Method.fromJSON = function fromJSON(name, json) { - return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions); -}; - -/** - * Converts this method to a method descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IMethod} Method descriptor - */ -Method.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "type" , this.type !== "rpc" && /* istanbul ignore next */ this.type || undefined, - "requestType" , this.requestType, - "requestStream" , this.requestStream, - "responseType" , this.responseType, - "responseStream" , this.responseStream, - "options" , this.options, - "comment" , keepComments ? this.comment : undefined, - "parsedOptions" , this.parsedOptions, - ]); -}; - -/** - * @override - */ -Method.prototype.resolve = function resolve() { - - /* istanbul ignore if */ - if (this.resolved) - return this; - - this.resolvedRequestType = this.parent.lookupType(this.requestType); - this.resolvedResponseType = this.parent.lookupType(this.responseType); - - return ReflectionObject.prototype.resolve.call(this); -}; - -},{"24":24,"35":35}],23:[function(require,module,exports){ -"use strict"; -module.exports = Namespace; - -// extends ReflectionObject -var ReflectionObject = require(24); -((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = "Namespace"; - -var Field = require(17), - util = require(35), - OneOf = require(25); - -var Type, // cyclic - Service, - Enum; - -/** - * Constructs a new namespace instance. - * @name Namespace - * @classdesc Reflected namespace. - * @extends NamespaceBase - * @constructor - * @param {string} name Namespace name - * @param {Object.} [options] Declared options - */ - -/** - * Constructs a namespace from JSON. - * @memberof Namespace - * @function - * @param {string} name Namespace name - * @param {Object.} json JSON object - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Namespace} Created namespace - * @throws {TypeError} If arguments are invalid - */ -Namespace.fromJSON = function fromJSON(name, json, depth) { - depth = util.checkDepth(depth); - return new Namespace(name, json.options).addJSON(json.nested, depth); -}; - -/** - * Converts an array of reflection objects to JSON. - * @memberof Namespace - * @param {ReflectionObject[]} array Object array - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {Object.|undefined} JSON object or `undefined` when array is empty - */ -function arrayToJSON(array, toJSONOptions) { - if (!(array && array.length)) - return undefined; - var obj = {}; - for (var i = 0; i < array.length; ++i) - obj[array[i].name] = array[i].toJSON(toJSONOptions); - return obj; -} - -Namespace.arrayToJSON = arrayToJSON; - -/** - * Tests if the specified id is reserved. - * @param {Array.|undefined} reserved Array of reserved ranges and names - * @param {number} id Id to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Namespace.isReservedId = function isReservedId(reserved, id) { - if (reserved) - for (var i = 0; i < reserved.length; ++i) - if (typeof reserved[i] !== "string" && reserved[i][0] <= id && reserved[i][1] > id) - return true; - return false; -}; - -/** - * Tests if the specified name is reserved. - * @param {Array.|undefined} reserved Array of reserved ranges and names - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Namespace.isReservedName = function isReservedName(reserved, name) { - if (reserved) - for (var i = 0; i < reserved.length; ++i) - if (reserved[i] === name) - return true; - return false; -}; - -/** - * Not an actual constructor. Use {@link Namespace} instead. - * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions. - * @exports NamespaceBase - * @extends ReflectionObject - * @abstract - * @constructor - * @param {string} name Namespace name - * @param {Object.} [options] Declared options - * @see {@link Namespace} - */ -function Namespace(name, options) { - ReflectionObject.call(this, name, options); - - /** - * Nested objects by name. - * @type {Object.|undefined} - */ - this.nested = undefined; // toJSON - - /** - * Cached nested objects as an array. - * @type {ReflectionObject[]|null} - * @private - */ - this._nestedArray = null; - - /** - * Cache lookup calls for any objects contains anywhere under this namespace. - * This drastically speeds up resolve for large cross-linked protos where the same - * types are looked up repeatedly. - * @type {Object.} - * @private - */ - this._lookupCache = Object.create(null); - - /** - * Whether or not objects contained in this namespace need feature resolution. - * @type {boolean} - * @protected - */ - this._needsRecursiveFeatureResolution = true; - - /** - * Whether or not objects contained in this namespace need a resolve. - * @type {boolean} - * @protected - */ - this._needsRecursiveResolve = true; -} - -function clearCache(namespace) { - namespace._nestedArray = null; - namespace._lookupCache = Object.create(null); - - // Also clear parent caches, since they include nested lookups. - var parent = namespace; - while(parent = parent.parent) { - parent._lookupCache = Object.create(null); - } - return namespace; -} - -/** - * Nested objects of this namespace as an array for iteration. - * @name NamespaceBase#nestedArray - * @type {ReflectionObject[]} - * @readonly - */ -Object.defineProperty(Namespace.prototype, "nestedArray", { - get: function() { - return this._nestedArray || (this._nestedArray = util.toArray(this.nested)); - } -}); - -/** - * Namespace descriptor. - * @interface INamespace - * @property {Object.} [options] Namespace options - * @property {Object.} [nested] Nested object descriptors - */ - -/** - * Any extension field descriptor. - * @typedef AnyExtensionField - * @type {IExtensionField|IExtensionMapField} - */ - -/** - * Any nested object descriptor. - * @typedef AnyNestedObject - * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf} - */ - -/** - * Converts this namespace to a namespace descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {INamespace} Namespace descriptor - */ -Namespace.prototype.toJSON = function toJSON(toJSONOptions) { - return util.toObject([ - "options" , this.options, - "nested" , arrayToJSON(this.nestedArray, toJSONOptions) - ]); -}; - -/** - * Adds nested objects to this namespace from nested object descriptors. - * @param {Object.} nestedJson Any nested object descriptors - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Namespace} `this` - */ -Namespace.prototype.addJSON = function addJSON(nestedJson, depth) { - depth = util.checkDepth(depth); - var ns = this; - /* istanbul ignore else */ - if (nestedJson) { - for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) { - nested = nestedJson[names[i]]; - ns.add( // most to least likely - ( nested.fields !== undefined - ? Type.fromJSON - : nested.values !== undefined - ? Enum.fromJSON - : nested.methods !== undefined - ? Service.fromJSON - : nested.id !== undefined - ? Field.fromJSON - : Namespace.fromJSON )(names[i], nested, depth + 1) - ); - } - } - return this; -}; - -/** - * Gets the nested object of the specified name. - * @param {string} name Nested object name - * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist - */ -Namespace.prototype.get = function get(name) { - return this.nested && Object.prototype.hasOwnProperty.call(this.nested, name) - ? this.nested[name] - : null; -}; - -/** - * Gets the values of the nested {@link Enum|enum} of the specified name. - * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`. - * @param {string} name Nested enum name - * @returns {Object.} Enum values - * @throws {Error} If there is no such enum - */ -Namespace.prototype.getEnum = function getEnum(name) { - if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name) && this.nested[name] instanceof Enum) - return this.nested[name].values; - throw Error("no such enum: " + name); -}; - -/** - * Adds a nested object to this namespace. - * @param {ReflectionObject} object Nested object to add - * @returns {Namespace} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a nested object with this name - */ -Namespace.prototype.add = function add(object) { - - if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace)) - throw TypeError("object must be a valid nested object"); - - if (object.name === "__proto__") - return this; - - if (!this.nested) - this.nested = {}; - else { - var prev = this.get(object.name); - if (prev) { - if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) { - // replace plain namespace but keep existing nested elements and options - var nested = prev.nestedArray; - for (var i = 0; i < nested.length; ++i) - object.add(nested[i]); - this.remove(prev); - if (!this.nested) - this.nested = {}; - object.setOptions(prev.options, true); - - } else - throw Error("duplicate name '" + object.name + "' in " + this); - } - } - this.nested[object.name] = object; - - if (!(this instanceof Type || this instanceof Service || this instanceof Enum || this instanceof Field)) { - // This is a package or a root namespace. - if (!object._edition) { - // Make sure that some edition is set if it hasn't already been specified. - object._edition = object._defaultEdition; - } - } - - this._needsRecursiveFeatureResolution = true; - this._needsRecursiveResolve = true; - - // Also clear parent caches, since they need to recurse down. - var parent = this; - while(parent = parent.parent) { - parent._needsRecursiveFeatureResolution = true; - parent._needsRecursiveResolve = true; - } - - object.onAdd(this); - return clearCache(this); -}; - -/** - * Removes a nested object from this namespace. - * @param {ReflectionObject} object Nested object to remove - * @returns {Namespace} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `object` is not a member of this namespace - */ -Namespace.prototype.remove = function remove(object) { - - if (!(object instanceof ReflectionObject)) - throw TypeError("object must be a ReflectionObject"); - if (object.parent !== this) - throw Error(object + " is not a member of " + this); - - delete this.nested[object.name]; - if (!Object.keys(this.nested).length) - this.nested = undefined; - - object.onRemove(this); - return clearCache(this); -}; - -/** - * Defines additial namespaces within this one if not yet existing. - * @param {string|string[]} path Path to create - * @param {*} [json] Nested types to create from JSON - * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty - */ -Namespace.prototype.define = function define(path, json) { - - if (util.isString(path)) - path = path.split("."); - else if (!Array.isArray(path)) - throw TypeError("illegal path"); - if (path && path.length && path[0] === "") - throw Error("path must be relative"); - if (path.length > util.recursionLimit) - throw Error("max depth exceeded"); - - var ptr = this; - while (path.length > 0) { - var part = path.shift(); - if (ptr.nested && ptr.nested[part]) { - ptr = ptr.nested[part]; - if (!(ptr instanceof Namespace)) - throw Error("path conflicts with non-namespace objects"); - } else - ptr.add(ptr = new Namespace(part)); - } - if (json) - ptr.addJSON(json); - return ptr; -}; - -/** - * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost. - * @returns {Namespace} `this` - */ -Namespace.prototype.resolveAll = function resolveAll() { - if (!this._needsRecursiveResolve) return this; - - this._resolveFeaturesRecursive(this._edition); - - var nested = this.nestedArray, i = 0; - this.resolve(); - while (i < nested.length) - if (nested[i] instanceof Namespace) - nested[i++].resolveAll(); - else - nested[i++].resolve(); - this._needsRecursiveResolve = false; - return this; -}; - -/** - * @override - */ -Namespace.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) { - if (!this._needsRecursiveFeatureResolution) return this; - this._needsRecursiveFeatureResolution = false; - - edition = this._edition || edition; - - ReflectionObject.prototype._resolveFeaturesRecursive.call(this, edition); - this.nestedArray.forEach(nested => { - nested._resolveFeaturesRecursive(edition); - }); - return this; -}; - -/** - * Recursively looks up the reflection object matching the specified path in the scope of this namespace. - * @param {string|string[]} path Path to look up - * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc. - * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked - * @returns {ReflectionObject|null} Looked up object or `null` if none could be found - */ -Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) { - /* istanbul ignore next */ - if (typeof filterTypes === "boolean") { - parentAlreadyChecked = filterTypes; - filterTypes = undefined; - } else if (filterTypes && !Array.isArray(filterTypes)) - filterTypes = [ filterTypes ]; - - if (util.isString(path) && path.length) { - if (path === ".") - return this.root; - path = path.split("."); - } else if (!path.length) - return this; - - var flatPath = path.join("."); - - // Start at root if path is absolute - if (path[0] === "") - return this.root.lookup(path.slice(1), filterTypes); - - // Early bailout for objects with matching absolute paths - var found = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects["." + flatPath]; - if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) { - return found; - } - - // Do a regular lookup at this namespace and below - found = this._lookupImpl(path, flatPath); - if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) { - return found; - } - - if (parentAlreadyChecked) - return null; - - // If there hasn't been a match, walk up the tree and look more broadly - var current = this; - while (current.parent) { - found = current.parent._lookupImpl(path, flatPath); - if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) { - return found; - } - current = current.parent; - } - return null; -}; - -/** - * Internal helper for lookup that handles searching just at this namespace and below along with caching. - * @param {string[]} path Path to look up - * @param {string} flatPath Flattened version of the path to use as a cache key - * @returns {ReflectionObject|null} Looked up object or `null` if none could be found - * @private - */ -Namespace.prototype._lookupImpl = function lookup(path, flatPath) { - if(Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) { - return this._lookupCache[flatPath]; - } - - // Test if the first part matches any nested object, and if so, traverse if path contains more - var found = this.get(path[0]); - var exact = null; - if (found) { - if (path.length === 1) { - exact = found; - } else if (found instanceof Namespace) { - path = path.slice(1); - exact = found._lookupImpl(path, path.join(".")); - } - - // Otherwise try each nested namespace - } else { - for (var i = 0; i < this.nestedArray.length; ++i) - if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path, flatPath))) { - exact = found; - break; - } - } - - // Set this even when null, so that when we walk up the tree we can quickly bail on repeated checks back down. - this._lookupCache[flatPath] = exact; - return exact; -}; - -/** - * Looks up the reflection object at the specified path, relative to this namespace. - * @name NamespaceBase#lookup - * @function - * @param {string|string[]} path Path to look up - * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked - * @returns {ReflectionObject|null} Looked up object or `null` if none could be found - * @variation 2 - */ -// lookup(path: string, [parentAlreadyChecked: boolean]) - -/** - * Looks up the {@link Type|type} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Type} Looked up type - * @throws {Error} If `path` does not point to a type - */ -Namespace.prototype.lookupType = function lookupType(path) { - var found = this.lookup(path, [ Type ]); - if (!found) - throw Error("no such type: " + path); - return found; -}; - -/** - * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Enum} Looked up enum - * @throws {Error} If `path` does not point to an enum - */ -Namespace.prototype.lookupEnum = function lookupEnum(path) { - var found = this.lookup(path, [ Enum ]); - if (!found) - throw Error("no such Enum '" + path + "' in " + this); - return found; -}; - -/** - * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Type} Looked up type or enum - * @throws {Error} If `path` does not point to a type or enum - */ -Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) { - var found = this.lookup(path, [ Type, Enum ]); - if (!found) - throw Error("no such Type or Enum '" + path + "' in " + this); - return found; -}; - -/** - * Looks up the {@link Service|service} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Service} Looked up service - * @throws {Error} If `path` does not point to a service - */ -Namespace.prototype.lookupService = function lookupService(path) { - var found = this.lookup(path, [ Service ]); - if (!found) - throw Error("no such Service '" + path + "' in " + this); - return found; -}; - -// Sets up cyclic dependencies (called in index-light) -Namespace._configure = function(Type_, Service_, Enum_) { - Type = Type_; - Service = Service_; - Enum = Enum_; -}; - -},{"17":17,"24":24,"25":25,"35":35}],24:[function(require,module,exports){ -"use strict"; -module.exports = ReflectionObject; - -ReflectionObject.className = "ReflectionObject"; - -const OneOf = require(25); -var util = require(35); - -var Root; // cyclic - -/* eslint-disable no-warning-comments */ -// TODO: Replace with embedded proto. -var editions2023Defaults = {enum_type: "OPEN", field_presence: "EXPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY"}; -var proto2Defaults = {enum_type: "CLOSED", field_presence: "EXPLICIT", json_format: "LEGACY_BEST_EFFORT", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "EXPANDED", utf8_validation: "NONE"}; -var proto3Defaults = {enum_type: "OPEN", field_presence: "IMPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY"}; - -/** - * Constructs a new reflection object instance. - * @classdesc Base class of all reflection objects. - * @constructor - * @param {string} name Object name - * @param {Object.} [options] Declared options - * @abstract - */ -function ReflectionObject(name, options) { - - if (!util.isString(name)) - throw TypeError("name must be a string"); - - if (options && !util.isObject(options)) - throw TypeError("options must be an object"); - - /** - * Options. - * @type {Object.|undefined} - */ - this.options = options; // toJSON - - /** - * Parsed Options. - * @type {Array.>|undefined} - */ - this.parsedOptions = null; - - /** - * Unique name within its namespace. - * @type {string} - */ - this.name = name; - - /** - * The edition specified for this object. Only relevant for top-level objects. - * @type {string} - * @private - */ - this._edition = null; - - /** - * The default edition to use for this object if none is specified. For legacy reasons, - * this is proto2 except in the JSON parsing case where it was proto3. - * @type {string} - * @private - */ - this._defaultEdition = "proto2"; - - /** - * Resolved Features. - * @type {object} - * @private - */ - this._features = {}; - - /** - * Whether or not features have been resolved. - * @type {boolean} - * @private - */ - this._featuresResolved = false; - - /** - * Parent namespace. - * @type {Namespace|null} - */ - this.parent = null; - - /** - * Whether already resolved or not. - * @type {boolean} - */ - this.resolved = false; - - /** - * Comment text, if any. - * @type {string|null} - */ - this.comment = null; - - /** - * Defining file name. - * @type {string|null} - */ - this.filename = null; -} - -Object.defineProperties(ReflectionObject.prototype, { - - /** - * Reference to the root namespace. - * @name ReflectionObject#root - * @type {Root} - * @readonly - */ - root: { - get: function() { - var ptr = this; - while (ptr.parent !== null) - ptr = ptr.parent; - return ptr; - } - }, - - /** - * Full name including leading dot. - * @name ReflectionObject#fullName - * @type {string} - * @readonly - */ - fullName: { - get: function() { - var path = [ this.name ], - ptr = this.parent; - while (ptr) { - path.unshift(ptr.name); - ptr = ptr.parent; - } - return path.join("."); - } - } -}); - -/** - * Converts this reflection object to its descriptor representation. - * @returns {Object.} Descriptor - * @abstract - */ -ReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() { - throw Error(); // not implemented, shouldn't happen -}; - -/** - * Called when this object is added to a parent. - * @param {ReflectionObject} parent Parent added to - * @returns {undefined} - */ -ReflectionObject.prototype.onAdd = function onAdd(parent) { - if (this.parent && this.parent !== parent) - this.parent.remove(this); - this.parent = parent; - this.resolved = false; - var root = parent.root; - if (root instanceof Root) - root._handleAdd(this); -}; - -/** - * Called when this object is removed from a parent. - * @param {ReflectionObject} parent Parent removed from - * @returns {undefined} - */ -ReflectionObject.prototype.onRemove = function onRemove(parent) { - var root = parent.root; - if (root instanceof Root) - root._handleRemove(this); - this.parent = null; - this.resolved = false; -}; - -/** - * Resolves this objects type references. - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype.resolve = function resolve() { - if (this.resolved) - return this; - if (this.root instanceof Root) - this.resolved = true; // only if part of a root - return this; -}; - -/** - * Resolves this objects editions features. - * @param {string} edition The edition we're currently resolving for. - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) { - return this._resolveFeatures(this._edition || edition); -}; - -/** - * Resolves child features from parent features - * @param {string} edition The edition we're currently resolving for. - * @returns {undefined} - */ -ReflectionObject.prototype._resolveFeatures = function _resolveFeatures(edition) { - if (this._featuresResolved) { - return; - } - - var defaults = {}; - - /* istanbul ignore if */ - if (!edition) { - throw new Error("Unknown edition for " + this.fullName); - } - - var protoFeatures = util.merge({}, this.options && this.options.features, - this._inferLegacyProtoFeatures(edition)); - - if (this._edition) { - // For a namespace marked with a specific edition, reset defaults. - /* istanbul ignore else */ - if (edition === "proto2") { - defaults = Object.assign({}, proto2Defaults); - } else if (edition === "proto3") { - defaults = Object.assign({}, proto3Defaults); - } else if (edition === "2023") { - defaults = Object.assign({}, editions2023Defaults); - } else { - throw new Error("Unknown edition: " + edition); - } - this._features = util.merge(defaults, protoFeatures); - this._featuresResolved = true; - return; - } - - // fields in Oneofs aren't actually children of them, so we have to - // special-case it - /* istanbul ignore else */ - if (this.partOf instanceof OneOf) { - var lexicalParentFeaturesCopy = util.merge({}, this.partOf._features); - this._features = util.merge(lexicalParentFeaturesCopy, protoFeatures); - } else if (this.declaringField) { - // Skip feature resolution of sister fields. - } else if (this.parent) { - var parentFeaturesCopy = util.merge({}, this.parent._features); - this._features = util.merge(parentFeaturesCopy, protoFeatures); - } else { - throw new Error("Unable to find a parent for " + this.fullName); - } - if (this.extensionField) { - // Sister fields should have the same features as their extensions. - this.extensionField._features = this._features; - } - this._featuresResolved = true; -}; - -/** - * Infers features from legacy syntax that may have been specified differently. - * in older editions. - * @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions - * @returns {object} The feature values to override - */ -ReflectionObject.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(/*edition*/) { - return {}; -}; - -/** - * Gets an option value. - * @param {string} name Option name - * @returns {*} Option value or `undefined` if not set - */ -ReflectionObject.prototype.getOption = function getOption(name) { - if (this.options) - return this.options[name]; - return undefined; -}; - -/** - * Sets an option. - * @param {string} name Option name - * @param {*} value Option value - * @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) { - if (name === "__proto__") - return this; - if (!this.options) - this.options = {}; - if (/^features\./.test(name)) { - util.setProperty(this.options, name, value, ifNotSet); - } else if (!ifNotSet || this.options[name] === undefined) { - if (this.getOption(name) !== value) this.resolved = false; - this.options[name] = value; - } - - return this; -}; - -/** - * Sets a parsed option. - * @param {string} name parsed Option name - * @param {*} value Option value - * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\empty, will add a new option with that value - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) { - if (name === "__proto__") - return this; - if (!this.parsedOptions) { - this.parsedOptions = []; - } - var parsedOptions = this.parsedOptions; - if (propName) { - // If setting a sub property of an option then try to merge it - // with an existing option - var opt = parsedOptions.find(function (opt) { - return Object.prototype.hasOwnProperty.call(opt, name); - }); - if (opt) { - // If we found an existing option - just merge the property value - // (If it's a feature, will just write over) - var newValue = opt[name]; - util.setProperty(newValue, propName, value); - } else { - // otherwise, create a new option, set its property and add it to the list - opt = {}; - opt[name] = util.setProperty({}, propName, value); - parsedOptions.push(opt); - } - } else { - // Always create a new option when setting the value of the option itself - var newOpt = {}; - newOpt[name] = value; - parsedOptions.push(newOpt); - } - - return this; -}; - -/** - * Sets multiple options. - * @param {Object.} options Options to set - * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) { - if (options) - for (var keys = Object.keys(options), i = 0; i < keys.length; ++i) - this.setOption(keys[i], options[keys[i]], ifNotSet); - return this; -}; - -/** - * Converts this instance to its string representation. - * @returns {string} Class name[, space, full name] - */ -ReflectionObject.prototype.toString = function toString() { - var className = this.constructor.className, - fullName = this.fullName; - if (fullName.length) - return className + " " + fullName; - return className; -}; - -/** - * Converts the edition this object is pinned to for JSON format. - * @returns {string|undefined} The edition string for JSON representation - */ -ReflectionObject.prototype._editionToJSON = function _editionToJSON() { - if (!this._edition || this._edition === "proto3") { - // Avoid emitting proto3 since we need to default to it for backwards - // compatibility anyway. - return undefined; - } - return this._edition; -}; - -// Sets up cyclic dependencies (called in index-light) -ReflectionObject._configure = function(Root_) { - Root = Root_; -}; - -},{"25":25,"35":35}],25:[function(require,module,exports){ -"use strict"; -module.exports = OneOf; - -// extends ReflectionObject -var ReflectionObject = require(24); -((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = "OneOf"; - -var Field = require(17), - util = require(35); - -/** - * Constructs a new oneof instance. - * @classdesc Reflected oneof. - * @extends ReflectionObject - * @constructor - * @param {string} name Oneof name - * @param {string[]|Object.} [fieldNames] Field names - * @param {Object.} [options] Declared options - * @param {string} [comment] Comment associated with this field - */ -function OneOf(name, fieldNames, options, comment) { - if (!Array.isArray(fieldNames)) { - options = fieldNames; - fieldNames = undefined; - } - ReflectionObject.call(this, name, options); - - /* istanbul ignore if */ - if (!(fieldNames === undefined || Array.isArray(fieldNames))) - throw TypeError("fieldNames must be an Array"); - - /** - * Field names that belong to this oneof. - * @type {string[]} - */ - this.oneof = fieldNames || []; // toJSON, marker - - /** - * Fields that belong to this oneof as an array for iteration. - * @type {Field[]} - * @readonly - */ - this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent - - /** - * Comment for this field. - * @type {string|null} - */ - this.comment = comment; -} - -/** - * Oneof descriptor. - * @interface IOneOf - * @property {Array.} oneof Oneof field names - * @property {Object.} [options] Oneof options - */ - -/** - * Constructs a oneof from a oneof descriptor. - * @param {string} name Oneof name - * @param {IOneOf} json Oneof descriptor - * @returns {OneOf} Created oneof - * @throws {TypeError} If arguments are invalid - */ -OneOf.fromJSON = function fromJSON(name, json) { - return new OneOf(name, json.oneof, json.options, json.comment); -}; - -/** - * Converts this oneof to a oneof descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IOneOf} Oneof descriptor - */ -OneOf.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "options" , this.options, - "oneof" , this.oneof, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * Adds the fields of the specified oneof to the parent if not already done so. - * @param {OneOf} oneof The oneof - * @returns {undefined} - * @inner - * @ignore - */ -function addFieldsToParent(oneof) { - if (oneof.parent) - for (var i = 0; i < oneof.fieldsArray.length; ++i) - if (!oneof.fieldsArray[i].parent) - oneof.parent.add(oneof.fieldsArray[i]); -} - -/** - * Adds a field to this oneof and removes it from its current parent, if any. - * @param {Field} field Field to add - * @returns {OneOf} `this` - */ -OneOf.prototype.add = function add(field) { - - /* istanbul ignore if */ - if (!(field instanceof Field)) - throw TypeError("field must be a Field"); - - if (field.parent && field.parent !== this.parent) - field.parent.remove(field); - this.oneof.push(field.name); - this.fieldsArray.push(field); - field.partOf = this; // field.parent remains null - addFieldsToParent(this); - return this; -}; - -/** - * Removes a field from this oneof and puts it back to the oneof's parent. - * @param {Field} field Field to remove - * @returns {OneOf} `this` - */ -OneOf.prototype.remove = function remove(field) { - - /* istanbul ignore if */ - if (!(field instanceof Field)) - throw TypeError("field must be a Field"); - - var index = this.fieldsArray.indexOf(field); - - /* istanbul ignore if */ - if (index < 0) - throw Error(field + " is not a member of " + this); - - this.fieldsArray.splice(index, 1); - index = this.oneof.indexOf(field.name); - - /* istanbul ignore else */ - if (index > -1) // theoretical - this.oneof.splice(index, 1); - - field.partOf = null; - return this; -}; - -/** - * @override - */ -OneOf.prototype.onAdd = function onAdd(parent) { - ReflectionObject.prototype.onAdd.call(this, parent); - var self = this; - // Collect present fields - for (var i = 0; i < this.oneof.length; ++i) { - var field = parent.get(this.oneof[i]); - if (field && !field.partOf) { - field.partOf = self; - self.fieldsArray.push(field); - } - } - // Add not yet present fields - addFieldsToParent(this); -}; - -/** - * @override - */ -OneOf.prototype.onRemove = function onRemove(parent) { - for (var i = 0, field; i < this.fieldsArray.length; ++i) - if ((field = this.fieldsArray[i]).parent) - field.parent.remove(field); - ReflectionObject.prototype.onRemove.call(this, parent); -}; - -/** - * Determines whether this field corresponds to a synthetic oneof created for - * a proto3 optional field. No behavioral logic should depend on this, but it - * can be relevant for reflection. - * @name OneOf#isProto3Optional - * @type {boolean} - * @readonly - */ -Object.defineProperty(OneOf.prototype, "isProto3Optional", { - get: function() { - if (this.fieldsArray == null || this.fieldsArray.length !== 1) { - return false; - } - - var field = this.fieldsArray[0]; - return field.options != null && field.options["proto3_optional"] === true; - } -}); - -/** - * Decorator function as returned by {@link OneOf.d} (TypeScript). - * @typedef OneOfDecorator - * @type {function} - * @param {Object} prototype Target prototype - * @param {string} oneofName OneOf name - * @returns {undefined} - */ - -/** - * OneOf decorator (TypeScript). - * @function - * @param {...string} fieldNames Field names - * @returns {OneOfDecorator} Decorator function - * @template T extends string - */ -OneOf.d = function decorateOneOf() { - var fieldNames = new Array(arguments.length), - index = 0; - while (index < arguments.length) - fieldNames[index] = arguments[index++]; - return function oneOfDecorator(prototype, oneofName) { - util.decorateType(prototype.constructor) - .add(new OneOf(oneofName, fieldNames)); - Object.defineProperty(prototype, oneofName, { - get: util.oneOfGetter(fieldNames), - set: util.oneOfSetter(fieldNames) - }); - }; -}; - -},{"17":17,"24":24,"35":35}],26:[function(require,module,exports){ -"use strict"; -module.exports = Reader; - -var util = require(38); - -var BufferReader; // cyclic - -var LongBits = util.LongBits, - utf8 = util.utf8; - -/* istanbul ignore next */ -function indexOutOfRange(reader, writeLength) { - return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len); -} - -/** - * Constructs a new reader instance using the specified buffer. - * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`. - * @constructor - * @param {Uint8Array} buffer Buffer to read from - */ -function Reader(buffer) { - - /** - * Read buffer. - * @type {Uint8Array} - */ - this.buf = buffer; - - /** - * Read buffer position. - * @type {number} - */ - this.pos = 0; - - /** - * Read buffer length. - * @type {number} - */ - this.len = buffer.length; -} - -var create_array = typeof Uint8Array !== "undefined" - ? function create_typed_array(buffer) { - if (buffer instanceof Uint8Array || Array.isArray(buffer)) - return new Reader(buffer); - throw Error("illegal buffer"); - } - /* istanbul ignore next */ - : function create_array(buffer) { - if (Array.isArray(buffer)) - return new Reader(buffer); - throw Error("illegal buffer"); - }; - -var create = function create() { - return util.Buffer - ? function create_buffer_setup(buffer) { - return (Reader.create = function create_buffer(buffer) { - return util.Buffer.isBuffer(buffer) - ? new BufferReader(buffer) - /* istanbul ignore next */ - : create_array(buffer); - })(buffer); - } - /* istanbul ignore next */ - : create_array; -}; - -/** - * Creates a new reader using the specified buffer. - * @function - * @param {Uint8Array|Buffer} buffer Buffer to read from - * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} - * @throws {Error} If `buffer` is not a valid buffer - */ -Reader.create = create(); - -Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice; - -/** - * Reads a varint as an unsigned 32 bit value. - * @function - * @returns {number} Value read - */ -Reader.prototype.uint32 = (function read_uint32_setup() { - var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!) - return function read_uint32() { - value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value; - - /* istanbul ignore if */ - if ((this.pos += 5) > this.len) { - this.pos = this.len; - throw indexOutOfRange(this, 10); - } - return value; - }; -})(); - -/** - * Reads a varint as a signed 32 bit value. - * @returns {number} Value read - */ -Reader.prototype.int32 = function read_int32() { - return this.uint32() | 0; -}; - -/** - * Reads a zig-zag encoded varint as a signed 32 bit value. - * @returns {number} Value read - */ -Reader.prototype.sint32 = function read_sint32() { - var value = this.uint32(); - return value >>> 1 ^ -(value & 1) | 0; -}; - -/* eslint-disable no-invalid-this */ - -function readLongVarint() { - // tends to deopt with local vars for octet etc. - var bits = new LongBits(0, 0); - var i = 0; - if (this.len - this.pos > 4) { // fast route (lo) - for (; i < 4; ++i) { - // 1st..4th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - // 5th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; - bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - i = 0; - } else { - for (; i < 3; ++i) { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - // 1st..3th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - // 4th - bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; - return bits; - } - if (this.len - this.pos > 4) { // fast route (hi) - for (; i < 5; ++i) { - // 6th..10th - bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - } else { - for (; i < 5; ++i) { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - // 6th..10th - bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - } - /* istanbul ignore next */ - throw Error("invalid varint encoding"); -} - -/* eslint-enable no-invalid-this */ - -/** - * Reads a varint as a signed 64 bit value. - * @name Reader#int64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a varint as an unsigned 64 bit value. - * @name Reader#uint64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a zig-zag encoded varint as a signed 64 bit value. - * @name Reader#sint64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a varint as a boolean. - * @returns {boolean} Value read - */ -Reader.prototype.bool = function read_bool() { - return this.uint32() !== 0; -}; - -function readFixed32_end(buf, end) { // note that this uses `end`, not `pos` - return (buf[end - 4] - | buf[end - 3] << 8 - | buf[end - 2] << 16 - | buf[end - 1] << 24) >>> 0; -} - -/** - * Reads fixed 32 bits as an unsigned 32 bit integer. - * @returns {number} Value read - */ -Reader.prototype.fixed32 = function read_fixed32() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - return readFixed32_end(this.buf, this.pos += 4); -}; - -/** - * Reads fixed 32 bits as a signed 32 bit integer. - * @returns {number} Value read - */ -Reader.prototype.sfixed32 = function read_sfixed32() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - return readFixed32_end(this.buf, this.pos += 4) | 0; -}; - -/* eslint-disable no-invalid-this */ - -function readFixed64(/* this: Reader */) { - - /* istanbul ignore if */ - if (this.pos + 8 > this.len) - throw indexOutOfRange(this, 8); - - return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4)); -} - -/* eslint-enable no-invalid-this */ - -/** - * Reads fixed 64 bits. - * @name Reader#fixed64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads zig-zag encoded fixed 64 bits. - * @name Reader#sfixed64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a float (32 bit) as a number. - * @function - * @returns {number} Value read - */ -Reader.prototype.float = function read_float() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - var value = util.float.readFloatLE(this.buf, this.pos); - this.pos += 4; - return value; -}; - -/** - * Reads a double (64 bit float) as a number. - * @function - * @returns {number} Value read - */ -Reader.prototype.double = function read_double() { - - /* istanbul ignore if */ - if (this.pos + 8 > this.len) - throw indexOutOfRange(this, 4); - - var value = util.float.readDoubleLE(this.buf, this.pos); - this.pos += 8; - return value; -}; - -/** - * Reads a sequence of bytes preceeded by its length as a varint. - * @returns {Uint8Array} Value read - */ -Reader.prototype.bytes = function read_bytes() { - var length = this.uint32(), - start = this.pos, - end = this.pos + length; - - /* istanbul ignore if */ - if (end > this.len) - throw indexOutOfRange(this, length); - - this.pos += length; - if (Array.isArray(this.buf)) // plain array - return this.buf.slice(start, end); - - if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1 - var nativeBuffer = util.Buffer; - return nativeBuffer - ? nativeBuffer.alloc(0) - : new this.buf.constructor(0); - } - return this._slice.call(this.buf, start, end); -}; - -/** - * Reads a string preceeded by its byte length as a varint. - * @returns {string} Value read - */ -Reader.prototype.string = function read_string() { - var bytes = this.bytes(); - return utf8.read(bytes, 0, bytes.length); -}; - -/** - * Skips the specified number of bytes if specified, otherwise skips a varint. - * @param {number} [length] Length if known, otherwise a varint is assumed - * @returns {Reader} `this` - */ -Reader.prototype.skip = function skip(length) { - if (typeof length === "number") { - /* istanbul ignore if */ - if (this.pos + length > this.len) - throw indexOutOfRange(this, length); - this.pos += length; - } else { - do { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - } while (this.buf[this.pos++] & 128); - } - return this; -}; - -/** - * Recursion limit. - * @type {number} - */ -Reader.recursionLimit = util.recursionLimit; - -/** - * Skips the next element of the specified wire type. - * @param {number} wireType Wire type received - * @param {number} [depth] Depth of recursion to control nested calls; 0 if omitted - * @returns {Reader} `this` - */ -Reader.prototype.skipType = function(wireType, depth) { - if (depth === undefined) depth = 0; - if (depth > Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - switch (wireType) { - case 0: - this.skip(); - break; - case 1: - this.skip(8); - break; - case 2: - this.skip(this.uint32()); - break; - case 3: - while ((wireType = this.uint32() & 7) !== 4) { - this.skipType(wireType, depth + 1); - } - break; - case 5: - this.skip(4); - break; - - /* istanbul ignore next */ - default: - throw Error("invalid wire type " + wireType + " at offset " + this.pos); - } - return this; -}; - -Reader._configure = function(BufferReader_) { - BufferReader = BufferReader_; - Reader.create = create(); - BufferReader._configure(); - - var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; - util.merge(Reader.prototype, { - - int64: function read_int64() { - return readLongVarint.call(this)[fn](false); - }, - - uint64: function read_uint64() { - return readLongVarint.call(this)[fn](true); - }, - - sint64: function read_sint64() { - return readLongVarint.call(this).zzDecode()[fn](false); - }, - - fixed64: function read_fixed64() { - return readFixed64.call(this)[fn](true); - }, - - sfixed64: function read_sfixed64() { - return readFixed64.call(this)[fn](false); - } - - }); -}; - -},{"38":38}],27:[function(require,module,exports){ -"use strict"; -module.exports = BufferReader; - -// extends Reader -var Reader = require(26); -(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; - -var util = require(38); - -/** - * Constructs a new buffer reader instance. - * @classdesc Wire format reader using node buffers. - * @extends Reader - * @constructor - * @param {Buffer} buffer Buffer to read from - */ -function BufferReader(buffer) { - Reader.call(this, buffer); - - /** - * Read buffer. - * @name BufferReader#buf - * @type {Buffer} - */ -} - -BufferReader._configure = function () { - /* istanbul ignore else */ - if (util.Buffer) - BufferReader.prototype._slice = util.Buffer.prototype.slice; -}; - - -/** - * @override - */ -BufferReader.prototype.string = function read_string_buffer() { - var len = this.uint32(); // modifies pos - return this.buf.utf8Slice - ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) - : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len)); -}; - -/** - * Reads a sequence of bytes preceeded by its length as a varint. - * @name BufferReader#bytes - * @function - * @returns {Buffer} Value read - */ - -BufferReader._configure(); - -},{"26":26,"38":38}],28:[function(require,module,exports){ -"use strict"; -module.exports = Root; - -// extends Namespace -var Namespace = require(23); -((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = "Root"; - -var Field = require(17), - Enum = require(16), - OneOf = require(25), - util = require(35); - -var Type, // cyclic - parse, // might be excluded - common; // " - -/** - * Constructs a new root namespace instance. - * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. - * @extends NamespaceBase - * @constructor - * @param {Object.} [options] Top level options - */ -function Root(options) { - Namespace.call(this, "", options); - - /** - * Deferred extension fields. - * @type {Field[]} - */ - this.deferred = []; - - /** - * Resolved file names of loaded files. - * @type {string[]} - */ - this.files = []; - - /** - * Edition, defaults to proto2 if unspecified. - * @type {string} - * @private - */ - this._edition = "proto2"; - - /** - * Global lookup cache of fully qualified names. - * @type {Object.} - * @private - */ - this._fullyQualifiedObjects = {}; -} - -/** - * Loads a namespace descriptor into a root namespace. - * @param {INamespace} json Namespace descriptor - * @param {Root} [root] Root namespace, defaults to create a new one if omitted - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Root} Root namespace - */ -Root.fromJSON = function fromJSON(json, root, depth) { - depth = util.checkDepth(depth); - if (!root) - root = new Root(); - if (json.options) - root.setOptions(json.options); - return root.addJSON(json.nested, depth).resolveAll(); -}; - -/** - * Resolves the path of an imported file, relative to the importing origin. - * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories. - * @function - * @param {string} origin The file name of the importing file - * @param {string} target The file name being imported - * @returns {string|null} Resolved path to `target` or `null` to skip the file - */ -Root.prototype.resolvePath = util.path.resolve; - -/** - * Fetch content from file path or url - * This method exists so you can override it with your own logic. - * @function - * @param {string} path File path or url - * @param {FetchCallback} callback Callback function - * @returns {undefined} - */ -Root.prototype.fetch = util.fetch; - -// A symbol-like function to safely signal synchronous loading -/* istanbul ignore next */ -function SYNC() {} // eslint-disable-line no-empty-function - -/** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. - * @param {string|string[]} filename Names of one or multiple files to load - * @param {IParseOptions} options Parse options - * @param {LoadCallback} callback Callback function - * @returns {undefined} - */ -Root.prototype.load = function load(filename, options, callback) { - if (typeof options === "function") { - callback = options; - options = undefined; - } - var self = this; - if (!callback) { - return util.asPromise(load, self, filename, options); - } - - var sync = callback === SYNC; // undocumented - - // Finishes loading by calling the callback (exactly once) - function finish(err, root) { - /* istanbul ignore if */ - if (!callback) { - return; - } - if (sync) { - throw err; - } - if (root) { - root.resolveAll(); - } - var cb = callback; - callback = null; - cb(err, root); - } - - // Bundled definition existence checking - function getBundledFileName(filename) { - var idx = filename.lastIndexOf("google/protobuf/"); - if (idx > -1) { - var altname = filename.substring(idx); - if (altname in common) return altname; - } - return null; - } - - // Processes a single file - function process(filename, source, depth) { - if (depth === undefined) - depth = 0; - try { - if (depth > util.recursionLimit) - throw Error("max depth exceeded"); - if (util.isString(source) && source.charAt(0) === "{") - source = JSON.parse(source); - if (!util.isString(source)) - self.setOptions(source.options).addJSON(source.nested); - else { - parse.filename = filename; - var parsed = parse(source, self, options), - resolved, - i = 0; - if (parsed.imports) - for (; i < parsed.imports.length; ++i) - if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i])) - fetch(resolved, false, depth + 1); - if (parsed.weakImports) - for (i = 0; i < parsed.weakImports.length; ++i) - if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i])) - fetch(resolved, true, depth + 1); - } - } catch (err) { - finish(err); - } - if (!sync && !queued) { - finish(null, self); // only once anyway - } - } - - // Fetches a single file - function fetch(filename, weak, depth) { - if (depth === undefined) - depth = 0; - filename = getBundledFileName(filename) || filename; - - // Skip if already loaded / attempted - if (self.files.indexOf(filename) > -1) { - return; - } - self.files.push(filename); - - // Shortcut bundled definitions - if (filename in common) { - if (sync) { - process(filename, common[filename], depth); - } else { - ++queued; - setTimeout(function() { - --queued; - process(filename, common[filename], depth); - }); - } - return; - } - - // Otherwise fetch from disk or network - if (sync) { - var source; - try { - source = util.fs.readFileSync(filename).toString("utf8"); - } catch (err) { - if (!weak) - finish(err); - return; - } - process(filename, source, depth); - } else { - ++queued; - self.fetch(filename, function(err, source) { - --queued; - /* istanbul ignore if */ - if (!callback) { - return; // terminated meanwhile - } - if (err) { - /* istanbul ignore else */ - if (!weak) - finish(err); - else if (!queued) // can't be covered reliably - finish(null, self); - return; - } - process(filename, source, depth); - }); - } - } - var queued = 0; - - // Assembling the root namespace doesn't require working type - // references anymore, so we can load everything in parallel - if (util.isString(filename)) { - filename = [ filename ]; - } - for (var i = 0, resolved; i < filename.length; ++i) - if (resolved = self.resolvePath("", filename[i])) - fetch(resolved); - if (sync) { - self.resolveAll(); - return self; - } - if (!queued) { - finish(null, self); - } - - return self; -}; -// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined - -/** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. - * @function Root#load - * @param {string|string[]} filename Names of one or multiple files to load - * @param {LoadCallback} callback Callback function - * @returns {undefined} - * @variation 2 - */ -// function load(filename:string, callback:LoadCallback):undefined - -/** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise. - * @function Root#load - * @param {string|string[]} filename Names of one or multiple files to load - * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns {Promise} Promise - * @variation 3 - */ -// function load(filename:string, [options:IParseOptions]):Promise - -/** - * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only). - * @function Root#loadSync - * @param {string|string[]} filename Names of one or multiple files to load - * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns {Root} Root namespace - * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid - */ -Root.prototype.loadSync = function loadSync(filename, options) { - if (!util.isNode) - throw Error("not supported"); - return this.load(filename, options, SYNC); -}; - -/** - * @override - */ -Root.prototype.resolveAll = function resolveAll() { - if (!this._needsRecursiveResolve) return this; - - if (this.deferred.length) - throw Error("unresolvable extensions: " + this.deferred.map(function(field) { - return "'extend " + field.extend + "' in " + field.parent.fullName; - }).join(", ")); - return Namespace.prototype.resolveAll.call(this); -}; - -// only uppercased (and thus conflict-free) children are exposed, see below -var exposeRe = /^[A-Z]/; - -/** - * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type. - * @param {Root} root Root instance - * @param {Field} field Declaring extension field witin the declaring type - * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise - * @inner - * @ignore - */ -function tryHandleExtension(root, field) { - var extendedType = field.parent.lookup(field.extend); - if (extendedType) { - var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options); - //do not allow to extend same field twice to prevent the error - if (extendedType.get(sisterField.name)) { - return true; - } - sisterField.declaringField = field; - field.extensionField = sisterField; - extendedType.add(sisterField); - return true; - } - return false; -} - -/** - * Called when any object is added to this root or its sub-namespaces. - * @param {ReflectionObject} object Object added - * @returns {undefined} - * @private - */ -Root.prototype._handleAdd = function _handleAdd(object) { - if (object instanceof Field) { - - if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField) - if (!tryHandleExtension(this, object)) - this.deferred.push(object); - - } else if (object instanceof Enum) { - - if (exposeRe.test(object.name)) - object.parent[object.name] = object.values; // expose enum values as property of its parent - - } else if (!(object instanceof OneOf)) /* everything else is a namespace */ { - - if (object instanceof Type) // Try to handle any deferred extensions - for (var i = 0; i < this.deferred.length;) - if (tryHandleExtension(this, this.deferred[i])) - this.deferred.splice(i, 1); - else - ++i; - for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace - this._handleAdd(object._nestedArray[j]); - if (exposeRe.test(object.name)) - object.parent[object.name] = object; // expose namespace as property of its parent - } - - if (object instanceof Type || object instanceof Enum || object instanceof Field) { - // Only store types and enums for quick lookup during resolve. - this._fullyQualifiedObjects[object.fullName] = object; - } - - // The above also adds uppercased (and thus conflict-free) nested types, services and enums as - // properties of namespaces just like static code does. This allows using a .d.ts generated for - // a static module with reflection-based solutions where the condition is met. -}; - -/** - * Called when any object is removed from this root or its sub-namespaces. - * @param {ReflectionObject} object Object removed - * @returns {undefined} - * @private - */ -Root.prototype._handleRemove = function _handleRemove(object) { - if (object instanceof Field) { - - if (/* an extension field */ object.extend !== undefined) { - if (/* already handled */ object.extensionField) { // remove its sister field - object.extensionField.parent.remove(object.extensionField); - object.extensionField = null; - } else { // cancel the extension - var index = this.deferred.indexOf(object); - /* istanbul ignore else */ - if (index > -1) - this.deferred.splice(index, 1); - } - } - - } else if (object instanceof Enum) { - - if (exposeRe.test(object.name)) - delete object.parent[object.name]; // unexpose enum values - - } else if (object instanceof Namespace) { - - for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace - this._handleRemove(object._nestedArray[i]); - - if (exposeRe.test(object.name)) - delete object.parent[object.name]; // unexpose namespaces - - } - - delete this._fullyQualifiedObjects[object.fullName]; -}; - -// Sets up cyclic dependencies (called in index-light) -Root._configure = function(Type_, parse_, common_) { - Type = Type_; - parse = parse_; - common = common_; -}; - -},{"16":16,"17":17,"23":23,"25":25,"35":35}],29:[function(require,module,exports){ -"use strict"; -module.exports = {}; - -/** - * Named roots. - * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). - * Can also be used manually to make roots available across modules. - * @name roots - * @type {Object.} - * @example - * // pbjs -r myroot -o compiled.js ... - * - * // in another module: - * require("./compiled.js"); - * - * // in any subsequent module: - * var root = protobuf.roots["myroot"]; - */ - -},{}],30:[function(require,module,exports){ -"use strict"; - -/** - * Streaming RPC helpers. - * @namespace - */ -var rpc = exports; - -/** - * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. - * @typedef RPCImpl - * @type {function} - * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called - * @param {Uint8Array} requestData Request data - * @param {RPCImplCallback} callback Callback function - * @returns {undefined} - * @example - * function rpcImpl(method, requestData, callback) { - * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code - * throw Error("no such method"); - * asynchronouslyObtainAResponse(requestData, function(err, responseData) { - * callback(err, responseData); - * }); - * } - */ - -/** - * Node-style callback as used by {@link RPCImpl}. - * @typedef RPCImplCallback - * @type {function} - * @param {Error|null} error Error, if any, otherwise `null` - * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error - * @returns {undefined} - */ - -rpc.Service = require(31); - -},{"31":31}],31:[function(require,module,exports){ -"use strict"; -module.exports = Service; - -var util = require(38); - -// Extends EventEmitter -(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service; - -/** - * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. - * - * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. - * @typedef rpc.ServiceMethodCallback - * @template TRes extends Message - * @type {function} - * @param {Error|null} error Error, if any - * @param {TRes} [response] Response message - * @returns {undefined} - */ - -/** - * A service method part of a {@link rpc.Service} as created by {@link Service.create}. - * @typedef rpc.ServiceMethod - * @template TReq extends Message - * @template TRes extends Message - * @type {function} - * @param {TReq|Properties} request Request message or plain object - * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message - * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined` - */ - -/** - * Constructs a new RPC service instance. - * @classdesc An RPC service as returned by {@link Service#create}. - * @exports rpc.Service - * @extends util.EventEmitter - * @constructor - * @param {RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ -function Service(rpcImpl, requestDelimited, responseDelimited) { - - if (typeof rpcImpl !== "function") - throw TypeError("rpcImpl must be a function"); - - util.EventEmitter.call(this); - - /** - * RPC implementation. Becomes `null` once the service is ended. - * @type {RPCImpl|null} - */ - this.rpcImpl = rpcImpl; - - /** - * Whether requests are length-delimited. - * @type {boolean} - */ - this.requestDelimited = Boolean(requestDelimited); - - /** - * Whether responses are length-delimited. - * @type {boolean} - */ - this.responseDelimited = Boolean(responseDelimited); -} - -/** - * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. - * @param {Method|rpc.ServiceMethod} method Reflected or static method - * @param {Constructor} requestCtor Request constructor - * @param {Constructor} responseCtor Response constructor - * @param {TReq|Properties} request Request message or plain object - * @param {rpc.ServiceMethodCallback} callback Service callback - * @returns {undefined} - * @template TReq extends Message - * @template TRes extends Message - */ -Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) { - - if (!request) - throw TypeError("request must be specified"); - - var self = this; - if (!callback) - return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request); - - if (!self.rpcImpl) { - setTimeout(function() { callback(Error("already ended")); }, 0); - return undefined; - } - - try { - return self.rpcImpl( - method, - requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(), - function rpcCallback(err, response) { - - if (err) { - self.emit("error", err, method); - return callback(err); - } - - if (response === null) { - self.end(/* endedByRPC */ true); - return undefined; - } - - if (!(response instanceof responseCtor)) { - try { - response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response); - } catch (err) { - self.emit("error", err, method); - return callback(err); - } - } - - self.emit("data", response, method); - return callback(null, response); - } - ); - } catch (err) { - self.emit("error", err, method); - setTimeout(function() { callback(err); }, 0); - return undefined; - } -}; - -/** - * Ends this service and emits the `end` event. - * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. - * @returns {rpc.Service} `this` - */ -Service.prototype.end = function end(endedByRPC) { - if (this.rpcImpl) { - if (!endedByRPC) // signal end to rpcImpl - this.rpcImpl(null, null, null); - this.rpcImpl = null; - this.emit("end").off(); - } - return this; -}; - -},{"38":38}],32:[function(require,module,exports){ -"use strict"; -module.exports = Service; - -// extends Namespace -var Namespace = require(23); -((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = "Service"; - -var Method = require(22), - util = require(35), - rpc = require(30); - -var reservedRe = util.patterns.reservedRe; - -/** - * Constructs a new service instance. - * @classdesc Reflected service. - * @extends NamespaceBase - * @constructor - * @param {string} name Service name - * @param {Object.} [options] Service options - * @throws {TypeError} If arguments are invalid - */ -function Service(name, options) { - Namespace.call(this, name, options); - - /** - * Service methods. - * @type {Object.} - */ - this.methods = {}; // toJSON, marker - - /** - * Cached methods as an array. - * @type {Method[]|null} - * @private - */ - this._methodsArray = null; -} - -/** - * Service descriptor. - * @interface IService - * @extends INamespace - * @property {Object.} methods Method descriptors - */ - -/** - * Constructs a service from a service descriptor. - * @param {string} name Service name - * @param {IService} json Service descriptor - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Service} Created service - * @throws {TypeError} If arguments are invalid - */ -Service.fromJSON = function fromJSON(name, json, depth) { - depth = util.checkDepth(depth); - var service = new Service(name, json.options); - /* istanbul ignore else */ - if (json.methods) - for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i) - service.add(Method.fromJSON(names[i], json.methods[names[i]])); - if (json.nested) - service.addJSON(json.nested, depth); - if (json.edition) - service._edition = json.edition; - service.comment = json.comment; - service._defaultEdition = "proto3"; // For backwards-compatibility. - return service; -}; - -/** - * Converts this service to a service descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IService} Service descriptor - */ -Service.prototype.toJSON = function toJSON(toJSONOptions) { - var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "edition" , this._editionToJSON(), - "options" , inherited && inherited.options || undefined, - "methods" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {}, - "nested" , inherited && inherited.nested || undefined, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * Methods of this service as an array for iteration. - * @name Service#methodsArray - * @type {Method[]} - * @readonly - */ -Object.defineProperty(Service.prototype, "methodsArray", { - get: function() { - return this._methodsArray || (this._methodsArray = util.toArray(this.methods)); - } -}); - -function clearCache(service) { - service._methodsArray = null; - return service; -} - -/** - * @override - */ -Service.prototype.get = function get(name) { - return Object.prototype.hasOwnProperty.call(this.methods, name) - ? this.methods[name] - : Namespace.prototype.get.call(this, name); -}; - -/** - * @override - */ -Service.prototype.resolveAll = function resolveAll() { - if (!this._needsRecursiveResolve) return this; - - Namespace.prototype.resolve.call(this); - var methods = this.methodsArray; - for (var i = 0; i < methods.length; ++i) - methods[i].resolve(); - return this; -}; - -/** - * @override - */ -Service.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) { - if (!this._needsRecursiveFeatureResolution) return this; - - edition = this._edition || edition; - - Namespace.prototype._resolveFeaturesRecursive.call(this, edition); - this.methodsArray.forEach(method => { - method._resolveFeaturesRecursive(edition); - }); - return this; -}; - -/** - * @override - */ -Service.prototype.add = function add(object) { - /* istanbul ignore if */ - if (this.get(object.name)) - throw Error("duplicate name '" + object.name + "' in " + this); - - if (object instanceof Method) { - if (object.name === "__proto__") - return this; - this.methods[object.name] = object; - object.parent = this; - return clearCache(this); - } - return Namespace.prototype.add.call(this, object); -}; - -/** - * @override - */ -Service.prototype.remove = function remove(object) { - if (object instanceof Method) { - - /* istanbul ignore if */ - if (this.methods[object.name] !== object) - throw Error(object + " is not a member of " + this); - - delete this.methods[object.name]; - object.parent = null; - return clearCache(this); - } - return Namespace.prototype.remove.call(this, object); -}; - -/** - * Creates a runtime service using the specified rpc implementation. - * @param {RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed. - */ -Service.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) { - var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited); - for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) { - var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\w_]/g, ""); - rpcService[methodName] = util.codegen(["r","c"], reservedRe.test(methodName) ? methodName + "_" : methodName)("return this.rpcCall(m,q,s,r,c)")({ - m: method, - q: method.resolvedRequestType.ctor, - s: method.resolvedResponseType.ctor - }); - } - return rpcService; -}; - -},{"22":22,"23":23,"30":30,"35":35}],33:[function(require,module,exports){ -"use strict"; -module.exports = Type; - -// extends Namespace -var Namespace = require(23); -((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = "Type"; - -var Enum = require(16), - OneOf = require(25), - Field = require(17), - MapField = require(20), - Service = require(32), - Message = require(21), - Reader = require(26), - Writer = require(42), - util = require(35), - encoder = require(15), - decoder = require(14), - verifier = require(40), - converter = require(13), - wrappers = require(41); - -/** - * Constructs a new reflected message type instance. - * @classdesc Reflected message type. - * @extends NamespaceBase - * @constructor - * @param {string} name Message name - * @param {Object.} [options] Declared options - */ -function Type(name, options) { - name = name.replace(/\W/g, ""); - Namespace.call(this, name, options); - - /** - * Message fields. - * @type {Object.} - */ - this.fields = {}; // toJSON, marker - - /** - * Oneofs declared within this namespace, if any. - * @type {Object.} - */ - this.oneofs = undefined; // toJSON - - /** - * Extension ranges, if any. - * @type {number[][]} - */ - this.extensions = undefined; // toJSON - - /** - * Reserved ranges, if any. - * @type {Array.} - */ - this.reserved = undefined; // toJSON - - /*? - * Whether this type is a legacy group. - * @type {boolean|undefined} - */ - this.group = undefined; // toJSON - - /** - * Cached fields by id. - * @type {Object.|null} - * @private - */ - this._fieldsById = null; - - /** - * Cached fields as an array. - * @type {Field[]|null} - * @private - */ - this._fieldsArray = null; - - /** - * Cached oneofs as an array. - * @type {OneOf[]|null} - * @private - */ - this._oneofsArray = null; - - /** - * Cached constructor. - * @type {Constructor<{}>} - * @private - */ - this._ctor = null; -} - -Object.defineProperties(Type.prototype, { - - /** - * Message fields by id. - * @name Type#fieldsById - * @type {Object.} - * @readonly - */ - fieldsById: { - get: function() { - - /* istanbul ignore if */ - if (this._fieldsById) - return this._fieldsById; - - this._fieldsById = {}; - for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) { - var field = this.fields[names[i]], - id = field.id; - - /* istanbul ignore if */ - if (this._fieldsById[id]) - throw Error("duplicate id " + id + " in " + this); - - this._fieldsById[id] = field; - } - return this._fieldsById; - } - }, - - /** - * Fields of this message as an array for iteration. - * @name Type#fieldsArray - * @type {Field[]} - * @readonly - */ - fieldsArray: { - get: function() { - return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields)); - } - }, - - /** - * Oneofs of this message as an array for iteration. - * @name Type#oneofsArray - * @type {OneOf[]} - * @readonly - */ - oneofsArray: { - get: function() { - return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs)); - } - }, - - /** - * The registered constructor, if any registered, otherwise a generic constructor. - * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor. - * @name Type#ctor - * @type {Constructor<{}>} - */ - ctor: { - get: function() { - return this._ctor || (this.ctor = Type.generateConstructor(this)()); - }, - set: function(ctor) { - - // Ensure proper prototype - var prototype = ctor.prototype; - if (!(prototype instanceof Message)) { - (ctor.prototype = new Message()).constructor = ctor; - util.merge(ctor.prototype, prototype); - } - - // Classes and messages reference their reflected type - ctor.$type = ctor.prototype.$type = this; - - // Mix in static methods - util.merge(ctor, Message, true); - - this._ctor = ctor; - - // Messages have non-enumerable default values on their prototype - var i = 0; - for (; i < /* initializes */ this.fieldsArray.length; ++i) - this._fieldsArray[i].resolve(); // ensures a proper value - - // Messages have non-enumerable getters and setters for each virtual oneof field - var ctorProperties = {}; - for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i) - ctorProperties[this._oneofsArray[i].resolve().name] = { - get: util.oneOfGetter(this._oneofsArray[i].oneof), - set: util.oneOfSetter(this._oneofsArray[i].oneof) - }; - if (i) - Object.defineProperties(ctor.prototype, ctorProperties); - } - } -}); - -/** - * Generates a constructor function for the specified type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -Type.generateConstructor = function generateConstructor(mtype) { - /* eslint-disable no-unexpected-multiline */ - var gen = util.codegen(["p"], mtype.name); - // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype - for (var i = 0, field; i < mtype.fieldsArray.length; ++i) - if ((field = mtype._fieldsArray[i]).map) gen - ("this%s={}", util.safeProp(field.name)); - else if (field.repeated) gen - ("this%s=[]", util.safeProp(field.name)); - return gen - ("if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors - * @property {Object.} fields Field descriptors - * @property {number[][]} [extensions] Extension ranges - * @property {Array.} [reserved] Reserved ranges - * @property {boolean} [group=false] Whether a legacy group or not - */ - -/** - * Creates a message type from a message type descriptor. - * @param {string} name Message name - * @param {IType} json Message type descriptor - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Type} Created message type - */ -Type.fromJSON = function fromJSON(name, json, depth) { - if (depth === undefined) - depth = 0; - if (depth > util.nestingLimit) - throw Error("max depth exceeded"); - var type = new Type(name, json.options); - type.extensions = json.extensions; - type.reserved = json.reserved; - var names = Object.keys(json.fields), - i = 0; - for (; i < names.length; ++i) - type.add( - ( typeof json.fields[names[i]].keyType !== "undefined" - ? MapField.fromJSON - : Field.fromJSON )(names[i], json.fields[names[i]]) - ); - if (json.oneofs) - for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i) - type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]])); - if (json.nested) - for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) { - var nested = json.nested[names[i]]; - type.add( // most to least likely - ( nested.id !== undefined - ? Field.fromJSON - : nested.fields !== undefined - ? Type.fromJSON - : nested.values !== undefined - ? Enum.fromJSON - : nested.methods !== undefined - ? Service.fromJSON - : Namespace.fromJSON )(names[i], nested, depth + 1) - ); - } - if (json.extensions && json.extensions.length) - type.extensions = json.extensions; - if (json.reserved && json.reserved.length) - type.reserved = json.reserved; - if (json.group) - type.group = true; - if (json.comment) - type.comment = json.comment; - if (json.edition) - type._edition = json.edition; - type._defaultEdition = "proto3"; // For backwards-compatibility. - return type; -}; - -/** - * Converts this message type to a message type descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IType} Message type descriptor - */ -Type.prototype.toJSON = function toJSON(toJSONOptions) { - var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "edition" , this._editionToJSON(), - "options" , inherited && inherited.options || undefined, - "oneofs" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions), - "fields" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {}, - "extensions" , this.extensions && this.extensions.length ? this.extensions : undefined, - "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, - "group" , this.group || undefined, - "nested" , inherited && inherited.nested || undefined, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * @override - */ -Type.prototype.resolveAll = function resolveAll() { - if (!this._needsRecursiveResolve) return this; - - Namespace.prototype.resolveAll.call(this); - var oneofs = this.oneofsArray; i = 0; - while (i < oneofs.length) - oneofs[i++].resolve(); - var fields = this.fieldsArray, i = 0; - while (i < fields.length) - fields[i++].resolve(); - return this; -}; - -/** - * @override - */ -Type.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) { - if (!this._needsRecursiveFeatureResolution) return this; - - edition = this._edition || edition; - - Namespace.prototype._resolveFeaturesRecursive.call(this, edition); - this.oneofsArray.forEach(oneof => { - oneof._resolveFeatures(edition); - }); - this.fieldsArray.forEach(field => { - field._resolveFeatures(edition); - }); - return this; -}; - -/** - * @override - */ -Type.prototype.get = function get(name) { - if (Object.prototype.hasOwnProperty.call(this.fields, name)) - return this.fields[name]; - if (this.oneofs && Object.prototype.hasOwnProperty.call(this.oneofs, name)) - return this.oneofs[name]; - if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name)) - return this.nested[name]; - return null; -}; - -/** - * Adds a nested object to this type. - * @param {ReflectionObject} object Nested object to add - * @returns {Type} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id - */ -Type.prototype.add = function add(object) { - if (this.get(object.name)) - throw Error("duplicate name '" + object.name + "' in " + this); - - if (object instanceof Field && object.extend === undefined) { - // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects. - // The root object takes care of adding distinct sister-fields to the respective extended - // type instead. - - // avoids calling the getter if not absolutely necessary because it's called quite frequently - if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id]) - throw Error("duplicate id " + object.id + " in " + this); - if (this.isReservedId(object.id)) - throw Error("id " + object.id + " is reserved in " + this); - if (this.isReservedName(object.name)) - throw Error("name '" + object.name + "' is reserved in " + this); - if (object.name === "__proto__") - return this; - - if (object.parent) - object.parent.remove(object); - this.fields[object.name] = object; - object.message = this; - object.onAdd(this); - return clearCache(this); - } - if (object instanceof OneOf) { - if (object.name === "__proto__") - return this; - if (!this.oneofs) - this.oneofs = {}; - this.oneofs[object.name] = object; - object.onAdd(this); - return clearCache(this); - } - return Namespace.prototype.add.call(this, object); -}; - -/** - * Removes a nested object from this type. - * @param {ReflectionObject} object Nested object to remove - * @returns {Type} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `object` is not a member of this type - */ -Type.prototype.remove = function remove(object) { - if (object instanceof Field && object.extend === undefined) { - // See Type#add for the reason why extension fields are excluded here. - - /* istanbul ignore if */ - if (!this.fields || this.fields[object.name] !== object) - throw Error(object + " is not a member of " + this); - - delete this.fields[object.name]; - object.parent = null; - object.onRemove(this); - return clearCache(this); - } - if (object instanceof OneOf) { - - /* istanbul ignore if */ - if (!this.oneofs || this.oneofs[object.name] !== object) - throw Error(object + " is not a member of " + this); - - delete this.oneofs[object.name]; - object.parent = null; - object.onRemove(this); - return clearCache(this); - } - return Namespace.prototype.remove.call(this, object); -}; - -/** - * Tests if the specified id is reserved. - * @param {number} id Id to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Type.prototype.isReservedId = function isReservedId(id) { - return Namespace.isReservedId(this.reserved, id); -}; - -/** - * Tests if the specified name is reserved. - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Type.prototype.isReservedName = function isReservedName(name) { - return Namespace.isReservedName(this.reserved, name); -}; - -/** - * Creates a new message of this type using the specified properties. - * @param {Object.} [properties] Properties to set - * @returns {Message<{}>} Message instance - */ -Type.prototype.create = function create(properties) { - return new this.ctor(properties); -}; - -/** - * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}. - * @returns {Type} `this` - */ -Type.prototype.setup = function setup() { - // Sets up everything at once so that the prototype chain does not have to be re-evaluated - // multiple times (V8, soft-deopt prototype-check). - - var fullName = this.fullName, - types = []; - for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i) - types.push(this._fieldsArray[i].resolve().resolvedType); - - // Replace setup methods with type-specific generated functions - this.encode = encoder(this)({ - Writer : Writer, - types : types, - util : util - }); - this.decode = decoder(this)({ - Reader : Reader, - types : types, - util : util - }); - this.verify = verifier(this)({ - types : types, - util : util - }); - this.fromObject = converter.fromObject(this)({ - types : types, - util : util - }); - this.toObject = converter.toObject(this)({ - types : types, - util : util - }); - - // Inject custom wrappers for common types - var wrapper = wrappers[fullName]; - if (wrapper) { - var originalThis = Object.create(this); - // if (wrapper.fromObject) { - originalThis.fromObject = this.fromObject; - this.fromObject = wrapper.fromObject.bind(originalThis); - // } - // if (wrapper.toObject) { - originalThis.toObject = this.toObject; - this.toObject = wrapper.toObject.bind(originalThis); - // } - } - - return this; -}; - -/** - * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages. - * @param {Message<{}>|Object.} message Message instance or plain object - * @param {Writer} [writer] Writer to encode to - * @returns {Writer} writer - */ -Type.prototype.encode = function encode_setup(message, writer) { // eslint-disable-line no-unused-vars - return this.setup().encode.apply(this, arguments); // overrides this method -}; - -/** - * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages. - * @param {Message<{}>|Object.} message Message instance or plain object - * @param {Writer} [writer] Writer to encode to - * @returns {Writer} writer - */ -Type.prototype.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); -}; - -/** - * Decodes a message of this type. - * @param {Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Length of the message, if known beforehand - * @param {number} [end] Expected group end tag, if decoding a group - * @param {number} [depth] Current nesting depth - * @returns {Message<{}>} Decoded message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {util.ProtocolError<{}>} If required fields are missing - */ -Type.prototype.decode = function decode_setup(reader, length, end, depth) { - return this.setup().decode(reader, length, end, depth); // overrides this method -}; - -/** - * Decodes a message of this type preceeded by its byte length as a varint. - * @param {Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {Message<{}>} Decoded message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {util.ProtocolError} If required fields are missing - */ -Type.prototype.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof Reader)) - reader = Reader.create(reader); - return this.decode(reader, reader.uint32()); -}; - -/** - * Verifies that field values are valid and that required fields are present. - * @param {Object.} message Plain object to verify - * @param {number} [depth] Current nesting depth - * @returns {null|string} `null` if valid, otherwise the reason why it is not - */ -Type.prototype.verify = function verify_setup(message, depth) { - return this.setup().verify(message, depth); // overrides this method -}; - -/** - * Creates a new message of this type from a plain object. Also converts values to their respective internal types. - * @param {Object.} object Plain object to convert - * @param {number} [depth] Current nesting depth - * @returns {Message<{}>} Message instance - */ -Type.prototype.fromObject = function fromObject(object, depth) { - return this.setup().fromObject(object, depth); -}; - -/** - * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}. - * @interface IConversionOptions - * @property {Function} [longs] Long conversion type. - * Valid values are `BigInt`, `String` and `Number` (the global types). - * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library. - * @property {Function} [enums] Enum value conversion type. - * Only valid value is `String` (the global type). - * Defaults to copy the present value, which is the numeric id. - * @property {Function} [bytes] Bytes value conversion type. - * Valid values are `Array` and (a base64 encoded) `String` (the global types). - * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser. - * @property {boolean} [defaults=false] Also sets default values on the resulting object - * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false` - * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false` - * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any - * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings - */ - -/** - * Creates a plain object from a message of this type. Also converts values to other types if specified. - * @param {Message<{}>} message Message instance - * @param {IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ -Type.prototype.toObject = function toObject(message, options) { // eslint-disable-line no-unused-vars - return this.setup().toObject.apply(this, arguments); -}; - -/** - * Decorator function as returned by {@link Type.d} (TypeScript). - * @typedef TypeDecorator - * @type {function} - * @param {Constructor} target Target constructor - * @returns {undefined} - * @template T extends Message - */ - -/** - * Type decorator (TypeScript). - * @param {string} [typeName] Type name, defaults to the constructor's name - * @returns {TypeDecorator} Decorator function - * @template T extends Message - */ -Type.d = function decorateType(typeName) { - return function typeDecorator(target) { - util.decorateType(target, typeName); - }; -}; - -},{"13":13,"14":14,"15":15,"16":16,"17":17,"20":20,"21":21,"23":23,"25":25,"26":26,"32":32,"35":35,"40":40,"41":41,"42":42}],34:[function(require,module,exports){ -"use strict"; - -/** - * Common type constants. - * @namespace - */ -var types = exports; - -var util = require(35); - -var s = [ - "double", // 0 - "float", // 1 - "int32", // 2 - "uint32", // 3 - "sint32", // 4 - "fixed32", // 5 - "sfixed32", // 6 - "int64", // 7 - "uint64", // 8 - "sint64", // 9 - "fixed64", // 10 - "sfixed64", // 11 - "bool", // 12 - "string", // 13 - "bytes" // 14 -]; - -function bake(values, offset) { - var i = 0, o = Object.create(null); - offset |= 0; - while (i < values.length) o[s[i + offset]] = values[i++]; - return o; -} - -/** - * Basic type wire types. - * @type {Object.} - * @const - * @property {number} double=1 Fixed64 wire type - * @property {number} float=5 Fixed32 wire type - * @property {number} int32=0 Varint wire type - * @property {number} uint32=0 Varint wire type - * @property {number} sint32=0 Varint wire type - * @property {number} fixed32=5 Fixed32 wire type - * @property {number} sfixed32=5 Fixed32 wire type - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - * @property {number} bool=0 Varint wire type - * @property {number} string=2 Ldelim wire type - * @property {number} bytes=2 Ldelim wire type - */ -types.basic = bake([ - /* double */ 1, - /* float */ 5, - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 5, - /* sfixed32 */ 5, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1, - /* bool */ 0, - /* string */ 2, - /* bytes */ 2 -]); - -/** - * Basic type defaults. - * @type {Object.} - * @const - * @property {number} double=0 Double default - * @property {number} float=0 Float default - * @property {number} int32=0 Int32 default - * @property {number} uint32=0 Uint32 default - * @property {number} sint32=0 Sint32 default - * @property {number} fixed32=0 Fixed32 default - * @property {number} sfixed32=0 Sfixed32 default - * @property {number} int64=0 Int64 default - * @property {number} uint64=0 Uint64 default - * @property {number} sint64=0 Sint32 default - * @property {number} fixed64=0 Fixed64 default - * @property {number} sfixed64=0 Sfixed64 default - * @property {boolean} bool=false Bool default - * @property {string} string="" String default - * @property {Array.} bytes=Array(0) Bytes default - * @property {null} message=null Message default - */ -types.defaults = bake([ - /* double */ 0, - /* float */ 0, - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 0, - /* sfixed32 */ 0, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 0, - /* sfixed64 */ 0, - /* bool */ false, - /* string */ "", - /* bytes */ util.emptyArray, - /* message */ null -]); - -/** - * Basic long type wire types. - * @type {Object.} - * @const - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - */ -types.long = bake([ - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1 -], 7); - -/** - * Allowed types for map keys with their associated wire type. - * @type {Object.} - * @const - * @property {number} int32=0 Varint wire type - * @property {number} uint32=0 Varint wire type - * @property {number} sint32=0 Varint wire type - * @property {number} fixed32=5 Fixed32 wire type - * @property {number} sfixed32=5 Fixed32 wire type - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - * @property {number} bool=0 Varint wire type - * @property {number} string=2 Ldelim wire type - */ -types.mapKey = bake([ - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 5, - /* sfixed32 */ 5, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1, - /* bool */ 0, - /* string */ 2 -], 2); - -/** - * Allowed types for packed repeated fields with their associated wire type. - * @type {Object.} - * @const - * @property {number} double=1 Fixed64 wire type - * @property {number} float=5 Fixed32 wire type - * @property {number} int32=0 Varint wire type - * @property {number} uint32=0 Varint wire type - * @property {number} sint32=0 Varint wire type - * @property {number} fixed32=5 Fixed32 wire type - * @property {number} sfixed32=5 Fixed32 wire type - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - * @property {number} bool=0 Varint wire type - */ -types.packed = bake([ - /* double */ 1, - /* float */ 5, - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 5, - /* sfixed32 */ 5, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1, - /* bool */ 0 -]); - -},{"35":35}],35:[function(require,module,exports){ -"use strict"; - -/** - * Various utility functions. - * @namespace - */ -var util = module.exports = require(38); - -var roots = require(29); - -var Type, // cyclic - Enum; - -util.codegen = require(3); -util.fetch = require(5); -util.path = require(9); -util.patterns = require(39); - -var reservedRe = util.patterns.reservedRe; - -/** - * Node's fs module if available. - * @type {Object.} - */ -util.fs = require(36); - -/** - * Checks a recursion depth. - * @param {number|undefined} depth Depth of recursion - * @returns {number} Depth of recursion - * @throws {Error} If depth exceeds util.recursionLimit - */ -util.checkDepth = function checkDepth(depth) { - if (depth === undefined) - depth = 0; - if (depth > util.recursionLimit) - throw Error("max depth exceeded"); - return depth; -}; - -/** - * Converts an object's values to an array. - * @param {Object.} object Object to convert - * @returns {Array.<*>} Converted array - */ -util.toArray = function toArray(object) { - if (object) { - var keys = Object.keys(object), - array = new Array(keys.length), - index = 0; - while (index < keys.length) - array[index] = object[keys[index++]]; - return array; - } - return []; -}; - -/** - * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values. - * @param {Array.<*>} array Array to convert - * @returns {Object.} Converted object - */ -util.toObject = function toObject(array) { - var object = {}, - index = 0; - while (index < array.length) { - var key = array[index++], - val = array[index++]; - if (val !== undefined) - object[key] = val; - } - return object; -}; - -/** - * Tests whether the specified name is a reserved word in JS. - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -util.isReserved = function isReserved(name) { - return reservedRe.test(name); -}; - -/** - * Returns a safe property accessor for the specified property name. - * @param {string} prop Property name - * @returns {string} Safe accessor - */ -util.safeProp = function safeProp(prop) { - if (!/^[$\w_]+$/.test(prop) || reservedRe.test(prop)) - return "[" + JSON.stringify(prop) + "]"; - return "." + prop; -}; - -/** - * Converts the first character of a string to upper case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.ucFirst = function ucFirst(str) { - return str.charAt(0).toUpperCase() + str.substring(1); -}; - -var camelCaseRe = /_([a-z])/g; - -/** - * Converts a string to camel case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.camelCase = function camelCase(str) { - return str.substring(0, 1) - + str.substring(1) - .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); }); -}; - -/** - * Compares reflected fields by id. - * @param {Field} a First field - * @param {Field} b Second field - * @returns {number} Comparison value - */ -util.compareFieldsById = function compareFieldsById(a, b) { - return a.id - b.id; -}; - -/** - * Decorator helper for types (TypeScript). - * @param {Constructor} ctor Constructor function - * @param {string} [typeName] Type name, defaults to the constructor's name - * @returns {Type} Reflected type - * @template T extends Message - * @property {Root} root Decorators root - */ -util.decorateType = function decorateType(ctor, typeName) { - - /* istanbul ignore if */ - if (ctor.$type) { - if (typeName && ctor.$type.name !== typeName) { - util.decorateRoot.remove(ctor.$type); - ctor.$type.name = typeName; - util.decorateRoot.add(ctor.$type); - } - return ctor.$type; - } - - /* istanbul ignore next */ - if (!Type) - Type = require(33); - - var type = new Type(typeName || ctor.name); - util.decorateRoot.add(type); - type.ctor = ctor; // sets up .encode, .decode etc. - Object.defineProperty(ctor, "$type", { value: type, enumerable: false }); - Object.defineProperty(ctor.prototype, "$type", { value: type, enumerable: false }); - return type; -}; - -var decorateEnumIndex = 0; - -/** - * Decorator helper for enums (TypeScript). - * @param {Object} object Enum object - * @returns {Enum} Reflected enum - */ -util.decorateEnum = function decorateEnum(object) { - - /* istanbul ignore if */ - if (object.$type) - return object.$type; - - /* istanbul ignore next */ - if (!Enum) - Enum = require(16); - - var enm = new Enum("Enum" + decorateEnumIndex++, object); - util.decorateRoot.add(enm); - Object.defineProperty(object, "$type", { value: enm, enumerable: false }); - return enm; -}; - - -/** - * Sets the value of a property by property path. If a value already exists, it is turned to an array - * @param {Object.} dst Destination object - * @param {string} path dot '.' delimited path of the property to set - * @param {Object} value the value to set - * @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set - * @returns {Object.} Destination object - */ -util.setProperty = function setProperty(dst, path, value, ifNotSet) { - function setProp(dst, path, value) { - var part = path.shift(); - if (util.isUnsafeProperty(part)) - return dst; - if (path.length > 0) { - dst[part] = setProp(dst[part] || {}, path, value); - } else { - var prevValue = dst[part]; - if (prevValue && ifNotSet) - return dst; - if (prevValue) - value = [].concat(prevValue).concat(value); - dst[part] = value; - } - return dst; - } - - if (typeof dst !== "object") - throw TypeError("dst must be an object"); - if (!path) - throw TypeError("path must be specified"); - - path = path.split("."); - if (path.length > util.recursionLimit) - throw Error("max depth exceeded"); - return setProp(dst, path, value); -}; - -/** - * Decorator root (TypeScript). - * @name util.decorateRoot - * @type {Root} - * @readonly - */ -Object.defineProperty(util, "decorateRoot", { - get: function() { - return roots["decorated"] || (roots["decorated"] = new (require(28))()); - } -}); - -},{"16":16,"28":28,"29":29,"3":3,"33":33,"36":36,"38":38,"39":39,"5":5,"9":9}],36:[function(require,module,exports){ -"use strict"; - -var fs = null; -try { - fs = require(12); - if (!fs || !fs.readFile || !fs.readFileSync) - fs = null; -} catch (e) { - // `fs` is unavailable in browsers and browser-like bundles. -} -module.exports = fs; - -},{"12":12}],37:[function(require,module,exports){ -"use strict"; -module.exports = LongBits; - -var util = require(38); - -/** - * Constructs new long bits. - * @classdesc Helper class for working with the low and high bits of a 64 bit value. - * @memberof util - * @constructor - * @param {number} lo Low 32 bits, unsigned - * @param {number} hi High 32 bits, unsigned - */ -function LongBits(lo, hi) { - - // note that the casts below are theoretically unnecessary as of today, but older statically - // generated converter code might still call the ctor with signed 32bits. kept for compat. - - /** - * Low bits. - * @type {number} - */ - this.lo = lo >>> 0; - - /** - * High bits. - * @type {number} - */ - this.hi = hi >>> 0; -} - -/** - * Zero bits. - * @memberof util.LongBits - * @type {util.LongBits} - */ -var zero = LongBits.zero = new LongBits(0, 0); - -zero.toNumber = function() { return 0; }; -zero.zzEncode = zero.zzDecode = function() { return this; }; -zero.length = function() { return 1; }; - -/** - * Zero hash. - * @memberof util.LongBits - * @type {string} - */ -var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; - -/** - * Constructs new long bits from the specified number. - * @param {number} value Value - * @returns {util.LongBits} Instance - */ -LongBits.fromNumber = function fromNumber(value) { - if (value === 0) - return zero; - var sign = value < 0; - if (sign) - value = -value; - var lo = value >>> 0, - hi = (value - lo) / 4294967296 >>> 0; - if (sign) { - hi = ~hi >>> 0; - lo = ~lo >>> 0; - if (++lo > 4294967295) { - lo = 0; - if (++hi > 4294967295) - hi = 0; - } - } - return new LongBits(lo, hi); -}; - -/** - * Constructs new long bits from a number, long or string. - * @param {Long|number|string} value Value - * @returns {util.LongBits} Instance - */ -LongBits.from = function from(value) { - if (typeof value === "number") - return LongBits.fromNumber(value); - if (util.isString(value)) { - /* istanbul ignore else */ - if (util.Long) - value = util.Long.fromString(value); - else - return LongBits.fromNumber(parseInt(value, 10)); - } - return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; -}; - -/** - * Converts this long bits to a possibly unsafe JavaScript number. - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {number} Possibly unsafe number - */ -LongBits.prototype.toNumber = function toNumber(unsigned) { - if (!unsigned && this.hi >>> 31) { - var lo = ~this.lo + 1 >>> 0, - hi = ~this.hi >>> 0; - if (!lo) - hi = hi + 1 >>> 0; - return -(lo + hi * 4294967296); - } - return this.lo + this.hi * 4294967296; -}; - -/** - * Converts this long bits to a long. - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long} Long - */ -LongBits.prototype.toLong = function toLong(unsigned) { - return util.Long - ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) - /* istanbul ignore next */ - : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; -}; - -var charCodeAt = String.prototype.charCodeAt; - -/** - * Constructs new long bits from the specified 8 characters long hash. - * @param {string} hash Hash - * @returns {util.LongBits} Bits - */ -LongBits.fromHash = function fromHash(hash) { - if (hash === zeroHash) - return zero; - return new LongBits( - ( charCodeAt.call(hash, 0) - | charCodeAt.call(hash, 1) << 8 - | charCodeAt.call(hash, 2) << 16 - | charCodeAt.call(hash, 3) << 24) >>> 0 - , - ( charCodeAt.call(hash, 4) - | charCodeAt.call(hash, 5) << 8 - | charCodeAt.call(hash, 6) << 16 - | charCodeAt.call(hash, 7) << 24) >>> 0 - ); -}; - -/** - * Converts this long bits to a 8 characters long hash. - * @returns {string} Hash - */ -LongBits.prototype.toHash = function toHash() { - return String.fromCharCode( - this.lo & 255, - this.lo >>> 8 & 255, - this.lo >>> 16 & 255, - this.lo >>> 24 , - this.hi & 255, - this.hi >>> 8 & 255, - this.hi >>> 16 & 255, - this.hi >>> 24 - ); -}; - -/** - * Zig-zag encodes this long bits. - * @returns {util.LongBits} `this` - */ -LongBits.prototype.zzEncode = function zzEncode() { - var mask = this.hi >> 31; - this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; - this.lo = ( this.lo << 1 ^ mask) >>> 0; - return this; -}; - -/** - * Zig-zag decodes this long bits. - * @returns {util.LongBits} `this` - */ -LongBits.prototype.zzDecode = function zzDecode() { - var mask = -(this.lo & 1); - this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; - this.hi = ( this.hi >>> 1 ^ mask) >>> 0; - return this; -}; - -/** - * Calculates the length of this longbits when encoded as a varint. - * @returns {number} Length - */ -LongBits.prototype.length = function length() { - var part0 = this.lo, - part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, - part2 = this.hi >>> 24; - return part2 === 0 - ? part1 === 0 - ? part0 < 16384 - ? part0 < 128 ? 1 : 2 - : part0 < 2097152 ? 3 : 4 - : part1 < 16384 - ? part1 < 128 ? 5 : 6 - : part1 < 2097152 ? 7 : 8 - : part2 < 128 ? 9 : 10; -}; - -},{"38":38}],38:[function(require,module,exports){ -"use strict"; -var util = exports; - -// used to return a Promise where callback is omitted -util.asPromise = require(1); - -// converts to / from base64 encoded strings -util.base64 = require(2); - -// base class of rpc.Service -util.EventEmitter = require(4); - -// float handling accross browsers -util.float = require(7); - -// requires modules optionally and hides the call from bundlers -util.inquire = require(8); - -// converts to / from utf8 encoded strings -util.utf8 = require(11); - -// provides a node-like buffer pool in the browser -util.pool = require(10); - -// utility to work with the low and high bits of a 64 bit value -util.LongBits = require(37); - -/** - * Tests if the specified key can affect object prototypes. - * @memberof util - * @param {string} key Key to test - * @returns {boolean} `true` if the key is unsafe - */ -function isUnsafeProperty(key) { - return key === "__proto__" || key === "prototype" || key === "constructor"; -} - -util.isUnsafeProperty = isUnsafeProperty; - -/** - * Whether running within node or not. - * @memberof util - * @type {boolean} - */ -util.isNode = Boolean(typeof global !== "undefined" - && global - && global.process - && global.process.versions - && global.process.versions.node); - -/** - * Global object reference. - * @memberof util - * @type {Object} - */ -util.global = util.isNode && global - || typeof window !== "undefined" && window - || typeof self !== "undefined" && self - || this; // eslint-disable-line no-invalid-this - -/** - * An immuable empty array. - * @memberof util - * @type {Array.<*>} - * @const - */ -util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes - -/** - * An immutable empty object. - * @type {Object} - * @const - */ -util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes - -/** - * Tests if the specified value is an integer. - * @function - * @param {*} value Value to test - * @returns {boolean} `true` if the value is an integer - */ -util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) { - return typeof value === "number" && isFinite(value) && Math.floor(value) === value; -}; - -/** - * Tests if the specified value is a string. - * @param {*} value Value to test - * @returns {boolean} `true` if the value is a string - */ -util.isString = function isString(value) { - return typeof value === "string" || value instanceof String; -}; - -/** - * Tests if the specified value is a non-null object. - * @param {*} value Value to test - * @returns {boolean} `true` if the value is a non-null object - */ -util.isObject = function isObject(value) { - return value && typeof value === "object"; -}; - -/** - * Checks if a property on a message is considered to be present. - * This is an alias of {@link util.isSet}. - * @function - * @param {Object} obj Plain object or message instance - * @param {string} prop Property name - * @returns {boolean} `true` if considered to be present, otherwise `false` - */ -util.isset = - -/** - * Checks if a property on a message is considered to be present. - * @param {Object} obj Plain object or message instance - * @param {string} prop Property name - * @returns {boolean} `true` if considered to be present, otherwise `false` - */ -util.isSet = function isSet(obj, prop) { - var value = obj[prop]; - if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins - return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0; - return false; -}; - -/** - * Any compatible Buffer instance. - * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. - * @interface Buffer - * @extends Uint8Array - */ - -/** - * Node's Buffer class if available. - * @type {Constructor} - */ -util.Buffer = (function() { - try { - var Buffer = util.global.Buffer; - // refuse to use non-node buffers if not explicitly assigned (perf reasons): - return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; - } catch (e) { - /* istanbul ignore next */ - return null; - } -})(); - -// Internal alias of or polyfull for Buffer.from. -util._Buffer_from = null; - -// Internal alias of or polyfill for Buffer.allocUnsafe. -util._Buffer_allocUnsafe = null; - -/** - * Creates a new buffer of whatever type supported by the environment. - * @param {number|number[]} [sizeOrArray=0] Buffer size or number array - * @returns {Uint8Array|Buffer} Buffer - */ -util.newBuffer = function newBuffer(sizeOrArray) { - /* istanbul ignore next */ - return typeof sizeOrArray === "number" - ? util.Buffer - ? util._Buffer_allocUnsafe(sizeOrArray) - : new util.Array(sizeOrArray) - : util.Buffer - ? util._Buffer_from(sizeOrArray) - : typeof Uint8Array === "undefined" - ? sizeOrArray - : new Uint8Array(sizeOrArray); -}; - -/** - * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. - * @type {Constructor} - */ -util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array; - -/** - * Any compatible Long instance. - * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. - * @interface Long - * @property {number} low Low bits - * @property {number} high High bits - * @property {boolean} unsigned Whether unsigned or not - */ - -/** - * Long.js's Long class if available. - * @type {Constructor} - */ -util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long - || /* istanbul ignore next */ util.global.Long - || (function() { - try { - var Long = require("long"); - return Long && Long.isLong ? Long : null; - } catch (e) { - /* istanbul ignore next */ - return null; - } - })(); - -/** - * Regular expression used to verify 2 bit (`bool`) map keys. - * @type {RegExp} - * @const - */ -util.key2Re = /^true|false|0|1$/; - -/** - * Regular expression used to verify 32 bit (`int32` etc.) map keys. - * @type {RegExp} - * @const - */ -util.key32Re = /^-?(?:0|[1-9][0-9]*)$/; - -/** - * Regular expression used to verify 64 bit (`int64` etc.) map keys. - * @type {RegExp} - * @const - */ -util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/; - -/** - * Converts a number or long to an 8 characters long hash string. - * @param {Long|number} value Value to convert - * @returns {string} Hash - */ -util.longToHash = function longToHash(value) { - return value - ? util.LongBits.from(value).toHash() - : util.LongBits.zeroHash; -}; - -/** - * Converts an 8 characters long hash string to a long or number. - * @param {string} hash Hash - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long|number} Original value - */ -util.longFromHash = function longFromHash(hash, unsigned) { - var bits = util.LongBits.fromHash(hash); - if (util.Long) - return util.Long.fromBits(bits.lo, bits.hi, unsigned); - return bits.toNumber(Boolean(unsigned)); -}; - -/** - * Merges the properties of the source object into the destination object. - * @memberof util - * @param {Object.} dst Destination object - * @param {...(Object.|boolean)} src Source objects, optionally followed by an `ifNotSet` flag - * @returns {Object.} Destination object - */ -function merge(dst) { // used by converters - var ifNotSet = typeof arguments[arguments.length - 1] === "boolean", - limit = ifNotSet ? arguments.length - 1 : arguments.length; - ifNotSet = ifNotSet && arguments[arguments.length - 1]; - for (var a = 1; a < limit; ++a) { - var src = arguments[a]; - if (!src) - continue; - for (var keys = Object.keys(src), i = 0; i < keys.length; ++i) - if (!isUnsafeProperty(keys[i]) && (dst[keys[i]] === undefined || !ifNotSet)) - dst[keys[i]] = src[keys[i]]; - } - return dst; -} - -util.merge = merge; - -/** - * Schema declaration nesting limit. - * @memberof util - * @type {number} - */ -util.nestingLimit = 32; // protoc: MaxMessageDeclarationNestingDepth - -/** - * Recursion limit. - * @memberof util - * @type {number} - */ -util.recursionLimit = 100; // protoc: CodedInputStream::default_recursion_limit_ - -/** - * Makes a property safe for assignment as an own property. - * @memberof util - * @param {Object.} obj Object - * @param {string} key Property key - * @returns {undefined} - */ -util.makeProp = function makeProp(obj, key) { - Object.defineProperty(obj, key, { - enumerable: true, - configurable: true, - writable: true - }); -}; - -/** - * Converts the first character of a string to lower case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.lcFirst = function lcFirst(str) { - return str.charAt(0).toLowerCase() + str.substring(1); -}; - -/** - * Creates a custom error constructor. - * @memberof util - * @param {string} name Error name - * @returns {Constructor} Custom error constructor - */ -function newError(name) { - - function CustomError(message, properties) { - - if (!(this instanceof CustomError)) - return new CustomError(message, properties); - - // Error.call(this, message); - // ^ just returns a new error instance because the ctor can be called as a function - - Object.defineProperty(this, "message", { get: function() { return message; } }); - - /* istanbul ignore next */ - if (Error.captureStackTrace) // node - Error.captureStackTrace(this, CustomError); - else - Object.defineProperty(this, "stack", { value: new Error().stack || "" }); - - if (properties) - merge(this, properties); - } - - CustomError.prototype = Object.create(Error.prototype, { - constructor: { - value: CustomError, - writable: true, - enumerable: false, - configurable: true, - }, - name: { - get: function get() { return name; }, - set: undefined, - enumerable: false, - // configurable: false would accurately preserve the behavior of - // the original, but I'm guessing that was not intentional. - // For an actual error subclass, this property would - // be configurable. - configurable: true, - }, - toString: { - value: function value() { return this.name + ": " + this.message; }, - writable: true, - enumerable: false, - configurable: true, - }, - }); - - return CustomError; -} - -util.newError = newError; - -/** - * Constructs a new protocol error. - * @classdesc Error subclass indicating a protocol specifc error. - * @memberof util - * @extends Error - * @template T extends Message - * @constructor - * @param {string} message Error message - * @param {Object.} [properties] Additional properties - * @example - * try { - * MyMessage.decode(someBuffer); // throws if required fields are missing - * } catch (e) { - * if (e instanceof ProtocolError && e.instance) - * console.log("decoded so far: " + JSON.stringify(e.instance)); - * } - */ -util.ProtocolError = newError("ProtocolError"); - -/** - * So far decoded message instance. - * @name util.ProtocolError#instance - * @type {Message} - */ - -/** - * A OneOf getter as returned by {@link util.oneOfGetter}. - * @typedef OneOfGetter - * @type {function} - * @returns {string|undefined} Set field name, if any - */ - -/** - * Builds a getter for a oneof's present field name. - * @param {string[]} fieldNames Field names - * @returns {OneOfGetter} Unbound getter - */ -util.oneOfGetter = function getOneOf(fieldNames) { - var fieldMap = {}; - for (var i = 0; i < fieldNames.length; ++i) - fieldMap[fieldNames[i]] = 1; - - /** - * @returns {string|undefined} Set field name, if any - * @this Object - * @ignore - */ - return function() { // eslint-disable-line consistent-return - for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i) - if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null) - return keys[i]; - }; -}; - -/** - * A OneOf setter as returned by {@link util.oneOfSetter}. - * @typedef OneOfSetter - * @type {function} - * @param {string|undefined} value Field name - * @returns {undefined} - */ - -/** - * Builds a setter for a oneof's present field name. - * @param {string[]} fieldNames Field names - * @returns {OneOfSetter} Unbound setter - */ -util.oneOfSetter = function setOneOf(fieldNames) { - - /** - * @param {string} name Field name - * @returns {undefined} - * @this Object - * @ignore - */ - return function(name) { - for (var i = 0; i < fieldNames.length; ++i) - if (fieldNames[i] !== name) - delete this[fieldNames[i]]; - }; -}; - -/** - * Default conversion options used for {@link Message#toJSON} implementations. - * - * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: - * - * - Longs become strings - * - Enums become string keys - * - Bytes become base64 encoded strings - * - (Sub-)Messages become plain objects - * - Maps become plain objects with all string keys - * - Repeated fields become arrays - * - NaN and Infinity for float and double fields become strings - * - * @type {IConversionOptions} - * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json - */ -util.toJSONOptions = { - longs: String, - enums: String, - bytes: String, - json: true -}; - -// Sets up buffer utility according to the environment (called in index-minimal) -util._configure = function() { - var Buffer = util.Buffer; - /* istanbul ignore if */ - if (!Buffer) { - util._Buffer_from = util._Buffer_allocUnsafe = null; - return; - } - // because node 4.x buffers are incompatible & immutable - // see: https://github.com/dcodeIO/protobuf.js/pull/665 - util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || - /* istanbul ignore next */ - function Buffer_from(value, encoding) { - return new Buffer(value, encoding); - }; - util._Buffer_allocUnsafe = Buffer.allocUnsafe || - /* istanbul ignore next */ - function Buffer_allocUnsafe(size) { - return new Buffer(size); - }; -}; - -},{"1":1,"10":10,"11":11,"2":2,"37":37,"4":4,"7":7,"8":8,"long":"long"}],39:[function(require,module,exports){ -"use strict"; - -var patterns = exports; - -patterns.numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/; -patterns.typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/; -patterns.reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/; - -},{}],40:[function(require,module,exports){ -"use strict"; -module.exports = verifier; - -var Enum = require(16), - util = require(35); - -function invalid(field, expected) { - return field.name + ": " + expected + (field.repeated && expected !== "array" ? "[]" : field.map && expected !== "object" ? "{k:"+field.keyType+"}" : "") + " expected"; -} - -/** - * Generates a partial value verifier. - * @param {Codegen} gen Codegen instance - * @param {Field} field Reflected field - * @param {number} fieldIndex Field index - * @param {string} ref Variable reference - * @returns {Codegen} Codegen instance - * @ignore - */ -function genVerifyValue(gen, field, fieldIndex, ref) { - /* eslint-disable no-unexpected-multiline */ - if (field.resolvedType) { - if (field.resolvedType instanceof Enum) { gen - ("switch(%s){", ref) - ("default:") - ("return%j", invalid(field, "enum value")); - for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen - ("case %i:", field.resolvedType.values[keys[j]]); - gen - ("break") - ("}"); - } else { - gen - ("{") - ("var e=types[%i].verify(%s,n+1);", fieldIndex, ref) - ("if(e)") - ("return%j+e", field.name + ".") - ("}"); - } - } else { - switch (field.type) { - case "int32": - case "uint32": - case "sint32": - case "fixed32": - case "sfixed32": gen - ("if(!util.isInteger(%s))", ref) - ("return%j", invalid(field, "integer")); - break; - case "int64": - case "uint64": - case "sint64": - case "fixed64": - case "sfixed64": gen - ("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", ref, ref, ref, ref) - ("return%j", invalid(field, "integer|Long")); - break; - case "float": - case "double": gen - ("if(typeof %s!==\"number\")", ref) - ("return%j", invalid(field, "number")); - break; - case "bool": gen - ("if(typeof %s!==\"boolean\")", ref) - ("return%j", invalid(field, "boolean")); - break; - case "string": gen - ("if(!util.isString(%s))", ref) - ("return%j", invalid(field, "string")); - break; - case "bytes": gen - ("if(!(%s&&typeof %s.length===\"number\"||util.isString(%s)))", ref, ref, ref) - ("return%j", invalid(field, "buffer")); - break; - } - } - return gen; - /* eslint-enable no-unexpected-multiline */ -} - -/** - * Generates a partial key verifier. - * @param {Codegen} gen Codegen instance - * @param {Field} field Reflected field - * @param {string} ref Variable reference - * @returns {Codegen} Codegen instance - * @ignore - */ -function genVerifyKey(gen, field, ref) { - /* eslint-disable no-unexpected-multiline */ - switch (field.keyType) { - case "int32": - case "uint32": - case "sint32": - case "fixed32": - case "sfixed32": gen - ("if(!util.key32Re.test(%s))", ref) - ("return%j", invalid(field, "integer key")); - break; - case "int64": - case "uint64": - case "sint64": - case "fixed64": - case "sfixed64": gen - ("if(!util.key64Re.test(%s))", ref) // see comment above: x is ok, d is not - ("return%j", invalid(field, "integer|Long key")); - break; - case "bool": gen - ("if(!util.key2Re.test(%s))", ref) - ("return%j", invalid(field, "boolean key")); - break; - } - return gen; - /* eslint-enable no-unexpected-multiline */ -} - -/** - * Generates a verifier specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -function verifier(mtype) { - /* eslint-disable no-unexpected-multiline */ - - var gen = util.codegen(["m", "n"], mtype.name + "$verify") - ("if(typeof m!==\"object\"||m===null)") - ("return%j", "object expected") - ("if(n===undefined)n=0") - ("if(n>util.recursionLimit)") - ("return%j", "maximum nesting depth exceeded"); - var oneofs = mtype.oneofsArray, - seenFirstField = {}; - if (oneofs.length) gen - ("var p={}"); - - for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) { - var field = mtype._fieldsArray[i].resolve(), - ref = "m" + util.safeProp(field.name); - - if (field.optional) gen - ("if(%s!=null&&m.hasOwnProperty(%j)){", ref, field.name); // !== undefined && !== null - - // map fields - if (field.map) { gen - ("if(!util.isObject(%s))", ref) - ("return%j", invalid(field, "object")) - ("var k=Object.keys(%s)", ref) - ("for(var i=0;i} - * @const - */ -var wrappers = exports; - -var Message = require(21), - util = require(38); - -/** - * From object converter part of an {@link IWrapper}. - * @typedef WrapperFromObjectConverter - * @type {function} - * @param {Object.} object Plain object - * @returns {Message<{}>} Message instance - * @this Type - */ - -/** - * To object converter part of an {@link IWrapper}. - * @typedef WrapperToObjectConverter - * @type {function} - * @param {Message<{}>} message Message instance - * @param {IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - * @this Type - */ - -/** - * Common type wrapper part of {@link wrappers}. - * @interface IWrapper - * @property {WrapperFromObjectConverter} [fromObject] From object converter - * @property {WrapperToObjectConverter} [toObject] To object converter - */ - -// Custom wrapper for Any -wrappers[".google.protobuf.Any"] = { - - fromObject: function(object, depth) { - - // unwrap value type if mapped - if (object && object["@type"]) { - // Only use fully qualified type name after the last '/' - var name = object["@type"].substring(object["@type"].lastIndexOf("/") + 1); - var type = this.lookup(name); - /* istanbul ignore else */ - if (type) { - // type_url does not accept leading "." - var type_url = object["@type"].charAt(0) === "." ? - object["@type"].slice(1) : object["@type"]; - // type_url prefix is optional, but path seperator is required - if (type_url.indexOf("/") === -1) { - type_url = "/" + type_url; - } - return this.create({ - type_url: type_url, - value: type.encode(type.fromObject(object, depth === undefined ? 1 : depth + 1)).finish() - }); - } - } - - return this.fromObject(object, depth); - }, - - toObject: function(message, options, depth) { - if (depth === undefined) - depth = 0; - if (depth > util.recursionLimit) - throw Error("max depth exceeded"); - - // Default prefix - var googleApi = "type.googleapis.com/"; - var prefix = ""; - var name = ""; - - // decode value if requested and unmapped - if (options && options.json && message.type_url && message.value) { - // Only use fully qualified type name after the last '/' - name = message.type_url.substring(message.type_url.lastIndexOf("/") + 1); - // Separate the prefix used - prefix = message.type_url.substring(0, message.type_url.lastIndexOf("/") + 1); - var type = this.lookup(name); - /* istanbul ignore else */ - if (type) - message = type.decode(message.value, undefined, undefined, depth + 1); - } - - // wrap value if unmapped - if (!(message instanceof this.ctor) && message instanceof Message) { - var object = message.$type.toObject(message, options, depth + 1); - var messageName = message.$type.fullName[0] === "." ? - message.$type.fullName.slice(1) : message.$type.fullName; - // Default to type.googleapis.com prefix if no prefix is used - if (prefix === "") { - prefix = googleApi; - } - name = prefix + messageName; - object["@type"] = name; - return object; - } - - return this.toObject(message, options, depth); - } -}; - -},{"21":21,"38":38}],42:[function(require,module,exports){ -"use strict"; -module.exports = Writer; - -var util = require(38); - -var BufferWriter; // cyclic - -var LongBits = util.LongBits, - base64 = util.base64, - utf8 = util.utf8; - -/** - * Constructs a new writer operation instance. - * @classdesc Scheduled writer operation. - * @constructor - * @param {function(*, Uint8Array, number)} fn Function to call - * @param {number} len Value byte length - * @param {*} val Value to write - * @ignore - */ -function Op(fn, len, val) { - - /** - * Function to call. - * @type {function(Uint8Array, number, *)} - */ - this.fn = fn; - - /** - * Value byte length. - * @type {number} - */ - this.len = len; - - /** - * Next operation. - * @type {Writer.Op|undefined} - */ - this.next = undefined; - - /** - * Value to write. - * @type {*} - */ - this.val = val; // type varies -} - -/* istanbul ignore next */ -function noop() {} // eslint-disable-line no-empty-function - -/** - * Constructs a new writer state instance. - * @classdesc Copied writer state. - * @memberof Writer - * @constructor - * @param {Writer} writer Writer to copy state from - * @ignore - */ -function State(writer) { - - /** - * Current head. - * @type {Writer.Op} - */ - this.head = writer.head; - - /** - * Current tail. - * @type {Writer.Op} - */ - this.tail = writer.tail; - - /** - * Current buffer length. - * @type {number} - */ - this.len = writer.len; - - /** - * Next state. - * @type {State|null} - */ - this.next = writer.states; -} - -/** - * Constructs a new writer instance. - * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`. - * @constructor - */ -function Writer() { - - /** - * Current length. - * @type {number} - */ - this.len = 0; - - /** - * Operations head. - * @type {Object} - */ - this.head = new Op(noop, 0, 0); - - /** - * Operations tail - * @type {Object} - */ - this.tail = this.head; - - /** - * Linked forked states. - * @type {Object|null} - */ - this.states = null; - - // When a value is written, the writer calculates its byte length and puts it into a linked - // list of operations to perform when finish() is called. This both allows us to allocate - // buffers of the exact required size and reduces the amount of work we have to do compared - // to first calculating over objects and then encoding over objects. In our case, the encoding - // part is just a linked list walk calling operations with already prepared values. -} - -var create = function create() { - return util.Buffer - ? function create_buffer_setup() { - return (Writer.create = function create_buffer() { - return new BufferWriter(); - })(); - } - /* istanbul ignore next */ - : function create_array() { - return new Writer(); - }; -}; - -/** - * Creates a new writer. - * @function - * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} - */ -Writer.create = create(); - -/** - * Allocates a buffer of the specified size. - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ -Writer.alloc = function alloc(size) { - return new util.Array(size); -}; - -// Use Uint8Array buffer pool in the browser, just like node does with buffers -/* istanbul ignore else */ -if (util.Array !== Array) - Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray); - -/** - * Pushes a new operation to the queue. - * @param {function(Uint8Array, number, *)} fn Function to call - * @param {number} len Value byte length - * @param {number} val Value to write - * @returns {Writer} `this` - * @private - */ -Writer.prototype._push = function push(fn, len, val) { - this.tail = this.tail.next = new Op(fn, len, val); - this.len += len; - return this; -}; - -function writeByte(val, buf, pos) { - buf[pos] = val & 255; -} - -function writeVarint32(val, buf, pos) { - while (val > 127) { - buf[pos++] = val & 127 | 128; - val >>>= 7; - } - buf[pos] = val; -} - -/** - * Constructs a new varint writer operation instance. - * @classdesc Scheduled varint writer operation. - * @extends Op - * @constructor - * @param {number} len Value byte length - * @param {number} val Value to write - * @ignore - */ -function VarintOp(len, val) { - this.len = len; - this.next = undefined; - this.val = val; -} - -VarintOp.prototype = Object.create(Op.prototype); -VarintOp.prototype.fn = writeVarint32; - -/** - * Writes an unsigned 32 bit value as a varint. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.uint32 = function write_uint32(value) { - // here, the call to this.push has been inlined and a varint specific Op subclass is used. - // uint32 is by far the most frequently used operation and benefits significantly from this. - this.len += (this.tail = this.tail.next = new VarintOp( - (value = value >>> 0) - < 128 ? 1 - : value < 16384 ? 2 - : value < 2097152 ? 3 - : value < 268435456 ? 4 - : 5, - value)).len; - return this; -}; - -/** - * Writes a signed 32 bit value as a varint. - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.int32 = function write_int32(value) { - return (value |= 0) < 0 - ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec - : this.uint32(value); -}; - -/** - * Writes a 32 bit value as a varint, zig-zag encoded. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.sint32 = function write_sint32(value) { - return this.uint32((value << 1 ^ value >> 31) >>> 0); -}; - -function writeVarint64(val, buf, pos) { - var lo = val.lo, - hi = val.hi; - while (hi) { - buf[pos++] = lo & 127 | 128; - lo = (lo >>> 7 | hi << 25) >>> 0; - hi >>>= 7; - } - while (lo > 127) { - buf[pos++] = lo & 127 | 128; - lo = lo >>> 7; - } - buf[pos++] = lo; -} - -/** - * Writes an unsigned 64 bit value as a varint. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.uint64 = function write_uint64(value) { - var bits = LongBits.from(value); - return this._push(writeVarint64, bits.length(), bits); -}; - -/** - * Writes a signed 64 bit value as a varint. - * @function - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.int64 = Writer.prototype.uint64; - -/** - * Writes a signed 64 bit value as a varint, zig-zag encoded. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.sint64 = function write_sint64(value) { - var bits = LongBits.from(value).zzEncode(); - return this._push(writeVarint64, bits.length(), bits); -}; - -/** - * Writes a boolish value as a varint. - * @param {boolean} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.bool = function write_bool(value) { - return this._push(writeByte, 1, value ? 1 : 0); -}; - -function writeFixed32(val, buf, pos) { - buf[pos ] = val & 255; - buf[pos + 1] = val >>> 8 & 255; - buf[pos + 2] = val >>> 16 & 255; - buf[pos + 3] = val >>> 24; -} - -/** - * Writes an unsigned 32 bit value as fixed 32 bits. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.fixed32 = function write_fixed32(value) { - return this._push(writeFixed32, 4, value >>> 0); -}; - -/** - * Writes a signed 32 bit value as fixed 32 bits. - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.sfixed32 = Writer.prototype.fixed32; - -/** - * Writes an unsigned 64 bit value as fixed 64 bits. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.fixed64 = function write_fixed64(value) { - var bits = LongBits.from(value); - return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); -}; - -/** - * Writes a signed 64 bit value as fixed 64 bits. - * @function - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.sfixed64 = Writer.prototype.fixed64; - -/** - * Writes a float (32 bit). - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.float = function write_float(value) { - return this._push(util.float.writeFloatLE, 4, value); -}; - -/** - * Writes a double (64 bit float). - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.double = function write_double(value) { - return this._push(util.float.writeDoubleLE, 8, value); -}; - -var writeBytes = util.Array.prototype.set - ? function writeBytes_set(val, buf, pos) { - buf.set(val, pos); // also works for plain array values - } - /* istanbul ignore next */ - : function writeBytes_for(val, buf, pos) { - for (var i = 0; i < val.length; ++i) - buf[pos + i] = val[i]; - }; - -/** - * Writes a sequence of bytes. - * @param {Uint8Array|string} value Buffer or base64 encoded string to write - * @returns {Writer} `this` - */ -Writer.prototype.bytes = function write_bytes(value) { - var len = value.length >>> 0; - if (!len) - return this._push(writeByte, 1, 0); - if (util.isString(value)) { - var buf = Writer.alloc(len = base64.length(value)); - base64.decode(value, buf, 0); - value = buf; - } - return this.uint32(len)._push(writeBytes, len, value); -}; - -/** - * Writes a string. - * @param {string} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.string = function write_string(value) { - var len = utf8.length(value); - return len - ? this.uint32(len)._push(utf8.write, len, value) - : this._push(writeByte, 1, 0); -}; - -/** - * Forks this writer's state by pushing it to a stack. - * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. - * @returns {Writer} `this` - */ -Writer.prototype.fork = function fork() { - this.states = new State(this); - this.head = this.tail = new Op(noop, 0, 0); - this.len = 0; - return this; -}; - -/** - * Resets this instance to the last state. - * @returns {Writer} `this` - */ -Writer.prototype.reset = function reset() { - if (this.states) { - this.head = this.states.head; - this.tail = this.states.tail; - this.len = this.states.len; - this.states = this.states.next; - } else { - this.head = this.tail = new Op(noop, 0, 0); - this.len = 0; - } - return this; -}; - -/** - * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. - * @returns {Writer} `this` - */ -Writer.prototype.ldelim = function ldelim() { - var head = this.head, - tail = this.tail, - len = this.len; - this.reset().uint32(len); - if (len) { - this.tail.next = head.next; // skip noop - this.tail = tail; - this.len += len; - } - return this; -}; - -/** - * Finishes the write operation. - * @returns {Uint8Array} Finished buffer - */ -Writer.prototype.finish = function finish() { - var head = this.head.next, // skip noop - buf = this.constructor.alloc(this.len), - pos = 0; - while (head) { - head.fn(head.val, buf, pos); - pos += head.len; - head = head.next; - } - // this.head = this.tail = null; - return buf; -}; - -Writer._configure = function(BufferWriter_) { - BufferWriter = BufferWriter_; - Writer.create = create(); - BufferWriter._configure(); -}; - -},{"38":38}],43:[function(require,module,exports){ -"use strict"; -module.exports = BufferWriter; - -// extends Writer -var Writer = require(42); -(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; - -var util = require(38); - -/** - * Constructs a new buffer writer instance. - * @classdesc Wire format writer using node buffers. - * @extends Writer - * @constructor - */ -function BufferWriter() { - Writer.call(this); -} - -BufferWriter._configure = function () { - /** - * Allocates a buffer of the specified size. - * @function - * @param {number} size Buffer size - * @returns {Buffer} Buffer - */ - BufferWriter.alloc = util._Buffer_allocUnsafe; - - BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" - ? function writeBytesBuffer_set(val, buf, pos) { - buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) - // also works for plain array values - } - /* istanbul ignore next */ - : function writeBytesBuffer_copy(val, buf, pos) { - if (val.copy) // Buffer values - val.copy(buf, pos, 0, val.length); - else for (var i = 0; i < val.length;) // plain array values - buf[pos++] = val[i++]; - }; -}; - - -/** - * @override - */ -BufferWriter.prototype.bytes = function write_bytes_buffer(value) { - if (util.isString(value)) - value = util._Buffer_from(value, "base64"); - var len = value.length >>> 0; - this.uint32(len); - if (len) - this._push(BufferWriter.writeBytesBuffer, len, value); - return this; -}; - -function writeStringBuffer(val, buf, pos) { - if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) - util.utf8.write(val, buf, pos); - else if (buf.utf8Write) - buf.utf8Write(val, pos); - else - buf.write(val, pos); -} - -/** - * @override - */ -BufferWriter.prototype.string = function write_string_buffer(value) { - var len = util.Buffer.byteLength(value); - this.uint32(len); - if (len) - this._push(writeStringBuffer, len, value); - return this; -}; - - -/** - * Finishes the write operation. - * @name BufferWriter#finish - * @function - * @returns {Buffer} Finished buffer - */ - -BufferWriter._configure(); - -},{"38":38,"42":42}]},{},[18]) - -})(); -//# sourceMappingURL=protobuf.js.map diff --git a/node_modules/protobufjs/dist/light/protobuf.js.map b/node_modules/protobufjs/dist/light/protobuf.js.map deleted file mode 100644 index 968d7ef..0000000 --- a/node_modules/protobufjs/dist/light/protobuf.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["lib/prelude.js","../node_modules/@protobufjs/aspromise/index.js","../node_modules/@protobufjs/base64/index.js","../node_modules/@protobufjs/codegen/index.js","../node_modules/@protobufjs/eventemitter/index.js","../node_modules/@protobufjs/fetch/index.js","../node_modules/@protobufjs/fetch/util/fs.js","../node_modules/@protobufjs/float/index.js","../node_modules/@protobufjs/inquire/index.js","../node_modules/@protobufjs/path/index.js","../node_modules/@protobufjs/pool/index.js","../node_modules/@protobufjs/utf8/index.js","../node_modules/browser-resolve/empty.js","../src/converter.js","../src/decoder.js","../src/encoder.js","../src/enum.js","../src/field.js","../src/index-light","../src/index-minimal.js","../src/mapfield.js","../src/message.js","../src/method.js","../src/namespace.js","../src/object.js","../src/oneof.js","../src/reader.js","../src/reader_buffer.js","../src/root.js","../src/roots.js","../src/rpc.js","../src/rpc/service.js","../src/service.js","../src/type.js","../src/types.js","../src/util.js","../src/util/fs.js","../src/util/longbits.js","../src/util/minimal.js","../src/util/patterns.js","../src/verifier.js","../src/wrappers.js","../src/writer.js","../src/writer_buffer.js"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9iBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9XA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9eA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACndA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function prelude(modules, cache, entries) {\n\n // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS\n // sources through a conflict-free require shim and is again wrapped within an iife that\n // provides a minification-friendly `undefined` var plus a global \"use strict\" directive\n // so that minification can remove the directives of each module.\n\n function $require(name) {\n var $module = cache[name];\n if (!$module)\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n return $module.exports;\n }\n\n var protobuf = $require(entries[0]);\n\n // Expose globally\n protobuf.util.global.protobuf = protobuf;\n\n // Be nice to AMD\n if (typeof define === \"function\" && define.amd)\n define([\"long\"], function(Long) {\n if (Long && Long.isLong) {\n protobuf.util.Long = Long;\n protobuf.configure();\n }\n return protobuf;\n });\n\n // Be nice to CommonJS\n if (typeof module === \"object\" && module && module.exports)\n module.exports = protobuf;\n\n})/* end of prelude */","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @param {string[]} functionParams Function parameter names\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n */\r\nfunction codegen(functionParams, functionName) {\r\n\r\n /* istanbul ignore if */\r\n if (typeof functionParams === \"string\") {\r\n functionName = functionParams;\r\n functionParams = undefined;\r\n }\r\n\r\n var body = [];\r\n\r\n /**\r\n * Appends code to the function's body or finishes generation.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any\r\n * @param {...*} [formatParams] Format parameters\r\n * @returns {Codegen|Function} Itself or the generated function if finished\r\n * @throws {Error} If format parameter counts do not match\r\n */\r\n\r\n function Codegen(formatStringOrScope) {\r\n // note that explicit array handling below makes this ~50% faster\r\n\r\n // finish the function\r\n if (typeof formatStringOrScope !== \"string\") {\r\n var source = toString();\r\n if (codegen.verbose)\r\n console.log(\"codegen: \" + source); // eslint-disable-line no-console\r\n source = \"return \" + source;\r\n if (formatStringOrScope) {\r\n var scopeKeys = Object.keys(formatStringOrScope),\r\n scopeParams = new Array(scopeKeys.length + 1),\r\n scopeValues = new Array(scopeKeys.length),\r\n scopeOffset = 0;\r\n while (scopeOffset < scopeKeys.length) {\r\n scopeParams[scopeOffset] = scopeKeys[scopeOffset];\r\n scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]];\r\n }\r\n scopeParams[scopeOffset] = source;\r\n return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func\r\n }\r\n return Function(source)(); // eslint-disable-line no-new-func\r\n }\r\n\r\n // otherwise append to body\r\n var formatParams = new Array(arguments.length - 1),\r\n formatOffset = 0;\r\n while (formatOffset < formatParams.length)\r\n formatParams[formatOffset] = arguments[++formatOffset];\r\n formatOffset = 0;\r\n formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {\r\n var value = formatParams[formatOffset++];\r\n switch ($1) {\r\n case \"d\": case \"f\": return String(Number(value));\r\n case \"i\": return String(Math.floor(value));\r\n case \"j\": return JSON.stringify(value);\r\n case \"s\": return String(value);\r\n }\r\n return \"%\";\r\n });\r\n if (formatOffset !== formatParams.length)\r\n throw Error(\"parameter count mismatch\");\r\n body.push(formatStringOrScope);\r\n return Codegen;\r\n }\r\n\r\n function toString(functionNameOverride) {\r\n return \"function \" + safeFunctionName(functionNameOverride || functionName) + \"(\" + (functionParams && functionParams.join(\",\") || \"\") + \"){\\n \" + body.join(\"\\n \") + \"\\n}\";\r\n }\r\n\r\n Codegen.toString = toString;\r\n return Codegen;\r\n}\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @function codegen\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * When set to `true`, codegen will log generated code to console. Useful for debugging.\r\n * @name util.codegen.verbose\r\n * @type {boolean}\r\n */\r\ncodegen.verbose = false;\r\n\r\nfunction safeFunctionName(name) {\r\n if (!name)\r\n return \"\";\r\n name = String(name).replace(/[^\\w$]/g, \"\");\r\n if (!name)\r\n return \"\";\r\n if (/^\\d/.test(name))\r\n name = \"_\" + name;\r\n return reservedRe.test(name) ? name + \"_\" : name;\r\n}\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = Object.create(null);\r\n}\r\n\r\n/**\r\n * Event listener as used by {@link util.EventEmitter}.\r\n * @typedef EventEmitterListener\r\n * @type {function}\r\n * @param {...*} args Arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {EventEmitterListener} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {EventEmitterListener} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = Object.create(null);\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n if (!listeners)\r\n return this;\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n fs = require(6);\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Options as used by {@link util.fetch}.\r\n * @interface IFetchOptions\r\n * @property {boolean} [binary=false] Whether expecting a binary response\r\n * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} filename File path or url\r\n * @param {IFetchOptions} options Fetch options\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction fetch(filename, options, callback) {\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = {};\r\n } else if (!options)\r\n options = {};\r\n\r\n if (!callback)\r\n return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this\r\n\r\n // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found.\r\n if (!options.xhr && fs && fs.readFile)\r\n return fs.readFile(filename, function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch.xhr(filename, options, callback)\r\n : err\r\n ? callback(err)\r\n : callback(null, options.binary ? contents : contents.toString(\"utf8\"));\r\n });\r\n\r\n // use the XHR version otherwise.\r\n return fetch.xhr(filename, options, callback);\r\n}\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {IFetchOptions} [options] Fetch options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n\r\n/**/\r\nfetch.xhr = function fetch_xhr(filename, options, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n\r\n if (xhr.readyState !== 4)\r\n return undefined;\r\n\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n if (xhr.status !== 0 && xhr.status !== 200)\r\n return callback(Error(\"status \" + xhr.status));\r\n\r\n // if binary data is expected, make sure that some sort of array is returned, even if\r\n // ArrayBuffers are not supported. the binary string fallback, however, is unsafe.\r\n if (options.binary) {\r\n var buffer = xhr.response;\r\n if (!buffer) {\r\n buffer = [];\r\n for (var i = 0; i < xhr.responseText.length; ++i)\r\n buffer.push(xhr.responseText.charCodeAt(i) & 255);\r\n }\r\n return callback(null, typeof Uint8Array !== \"undefined\" ? new Uint8Array(buffer) : buffer);\r\n }\r\n return callback(null, xhr.responseText);\r\n };\r\n\r\n if (options.binary) {\r\n // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers\r\n if (\"overrideMimeType\" in xhr)\r\n xhr.overrideMimeType(\"text/plain; charset=x-user-defined\");\r\n xhr.responseType = \"arraybuffer\";\r\n }\r\n\r\n xhr.open(\"GET\", filename);\r\n xhr.send();\r\n};\r\n","\"use strict\";\r\n\r\nvar fs = null;\r\ntry {\r\n fs = require(12);\r\n if (!fs || !fs.readFile || !fs.readFileSync)\r\n fs = null;\r\n} catch (e) {\r\n // `fs` is unavailable in browsers and browser-like bundles.\r\n}\r\nmodule.exports = fs;\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n * @deprecated Legacy optional require helper. Will be removed in a future release.\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n if (typeof require !== \"function\") {\r\n return null;\r\n }\r\n var mod = require(moduleName);\r\n if (mod && (mod.length || Object.keys(mod).length)) return mod;\r\n return null;\r\n } catch (err) {\r\n // ignore\r\n return null;\r\n }\r\n}\r\n\r\n/*\r\n// maybe worth a shot to prevent renaming issues:\r\n// see: https://github.com/webpack/webpack/blob/master/lib/dependencies/CommonJsRequireDependencyParserPlugin.js\r\n// triggers on:\r\n// - expression require.cache\r\n// - expression require (???)\r\n// - call require\r\n// - call require:commonjs:item\r\n// - call require:commonjs:context\r\n\r\nObject.defineProperty(Function.prototype, \"__self\", { get: function() { return this; } });\r\nvar r = require.__self;\r\ndelete Function.prototype.__self;\r\n*/\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0 && parts[i - 1] !== \"..\")\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\r\n};\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports,\r\n replacementChar = \"\\ufffd\";\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n if (end - start < 1) {\r\n return \"\";\r\n }\r\n\r\n var str = \"\";\r\n for (var i = start; i < end;) {\r\n var t = buffer[i++];\r\n if (t <= 0x7F) {\r\n str += String.fromCharCode(t);\r\n } else if (t >= 0xC0 && t < 0xE0) {\r\n var c2 = (t & 0x1F) << 6 | buffer[i++] & 0x3F;\r\n str += c2 >= 0x80 ? String.fromCharCode(c2) : replacementChar;\r\n } else if (t >= 0xE0 && t < 0xF0) {\r\n var c3 = (t & 0xF) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F;\r\n str += c3 >= 0x800 ? String.fromCharCode(c3) : replacementChar;\r\n } else if (t >= 0xF0) {\r\n var t2 = (t & 7) << 18 | (buffer[i++] & 0x3F) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F;\r\n if (t2 < 0x10000 || t2 > 0x10FFFF)\r\n str += replacementChar;\r\n else {\r\n t2 -= 0x10000;\r\n str += String.fromCharCode(0xD800 + (t2 >> 10));\r\n str += String.fromCharCode(0xDC00 + (t2 & 0x3FF));\r\n }\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","","\"use strict\";\n/**\n * Runtime message from/to plain object converters.\n * @namespace\n */\nvar converter = exports;\n\nvar Enum = require(16),\n util = require(35);\n\n/**\n * Generates a partial value fromObject conveter.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} prop Property reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genValuePartial_fromObject(gen, field, fieldIndex, prop) {\n var defaultAlreadyEmitted = false;\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(d%s){\", prop);\n for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) {\n // enum unknown values passthrough\n if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen\n (\"default:\")\n (\"if(typeof(d%s)===\\\"number\\\"){m%s=d%s;break}\", prop, prop, prop);\n if (!field.repeated) gen // fallback to default value only for\n // arrays, to avoid leaving holes.\n (\"break\"); // for non-repeated fields, just ignore\n defaultAlreadyEmitted = true;\n }\n gen\n (\"case%j:\", keys[i])\n (\"case %i:\", values[keys[i]])\n (\"m%s=%j\", prop, values[keys[i]])\n (\"break\");\n } gen\n (\"}\");\n } else gen\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s=types[%i].fromObject(d%s,n+1)\", prop, fieldIndex, prop);\n } else {\n var isUnsigned = false;\n switch (field.type) {\n case \"double\":\n case \"float\": gen\n (\"m%s=Number(d%s)\", prop, prop); // also catches \"NaN\", \"Infinity\"\n break;\n case \"uint32\":\n case \"fixed32\": gen\n (\"m%s=d%s>>>0\", prop, prop);\n break;\n case \"int32\":\n case \"sint32\":\n case \"sfixed32\": gen\n (\"m%s=d%s|0\", prop, prop);\n break;\n case \"uint64\":\n case \"fixed64\":\n isUnsigned = true;\n // eslint-disable-next-line no-fallthrough\n case \"int64\":\n case \"sint64\":\n case \"sfixed64\": gen\n (\"if(util.Long)\")\n (\"m%s=util.Long.fromValue(d%s,%j)\", prop, prop, isUnsigned)\n (\"else if(typeof d%s===\\\"string\\\")\", prop)\n (\"m%s=parseInt(d%s,10)\", prop, prop)\n (\"else if(typeof d%s===\\\"number\\\")\", prop)\n (\"m%s=d%s\", prop, prop)\n (\"else if(typeof d%s===\\\"object\\\")\", prop)\n (\"m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)\", prop, prop, prop, isUnsigned ? \"true\" : \"\");\n break;\n case \"bytes\": gen\n (\"if(typeof d%s===\\\"string\\\")\", prop)\n (\"util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)\", prop, prop, prop)\n (\"else if(d%s.length >= 0)\", prop)\n (\"m%s=d%s\", prop, prop);\n break;\n case \"string\": gen\n (\"m%s=String(d%s)\", prop, prop);\n break;\n case \"bool\": gen\n (\"m%s=Boolean(d%s)\", prop, prop);\n break;\n /* default: gen\n (\"m%s=d%s\", prop, prop);\n break; */\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a plain object to runtime message converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.fromObject = function fromObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray;\n var gen = util.codegen([\"d\", \"n\"], mtype.name + \"$fromObject\")\n (\"if(d instanceof this.ctor)\")\n (\"return d\")\n (\"if(n===undefined)n=0\")\n (\"if(n>util.recursionLimit)\")\n (\"throw Error(\\\"maximum nesting depth exceeded\\\")\");\n if (!fields.length) return gen\n (\"return new this.ctor\");\n gen\n (\"var m=new this.ctor\");\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n prop = util.safeProp(field.name);\n\n // Map fields\n if (field.map) { gen\n (\"if(d%s){\", prop)\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s={}\", prop)\n (\"for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0,%j).toBigInt()\", prop, prop, prop, prop, prop, isUnsigned)\n (\"else if(typeof m%s===\\\"number\\\")\", prop)\n (\"d%s=o.longs===String?String(m%s):m%s\", prop, prop, prop)\n (\"else\") // Long-like\n (\"d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s\", prop, prop, prop, prop, isUnsigned ? \"true\": \"\", prop);\n break;\n case \"bytes\": gen\n (\"d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s\", prop, prop, prop, prop, prop);\n break;\n default: gen\n (\"d%s=m%s\", prop, prop);\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a runtime message to plain object converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.toObject = function toObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById);\n if (!fields.length)\n return util.codegen()(\"return {}\");\n var gen = util.codegen([\"m\", \"o\", \"q\"], mtype.name + \"$toObject\")\n (\"if(!o)\")\n (\"o={}\")\n (\"if(q===undefined)q=0\")\n (\"if(q>util.recursionLimit)\")\n (\"throw Error(\\\"max depth exceeded\\\")\")\n (\"var d={}\");\n\n var repeatedFields = [],\n mapFields = [],\n normalFields = [],\n i = 0;\n for (; i < fields.length; ++i)\n if (!fields[i].partOf)\n ( fields[i].resolve().repeated ? repeatedFields\n : fields[i].map ? mapFields\n : normalFields).push(fields[i]);\n\n if (repeatedFields.length) { gen\n (\"if(o.arrays||o.defaults){\");\n for (i = 0; i < repeatedFields.length; ++i) gen\n (\"d%s=[]\", util.safeProp(repeatedFields[i].name));\n gen\n (\"}\");\n }\n\n if (mapFields.length) { gen\n (\"if(o.objects||o.defaults){\");\n for (i = 0; i < mapFields.length; ++i) gen\n (\"d%s={}\", util.safeProp(mapFields[i].name));\n gen\n (\"}\");\n }\n\n if (normalFields.length) { gen\n (\"if(o.defaults){\");\n for (i = 0; i < normalFields.length; ++i) {\n var field = normalFields[i],\n prop = util.safeProp(field.name);\n if (field.resolvedType instanceof Enum) gen\n (\"d%s=o.enums===String?%j:%j\", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);\n else if (field.long) gen\n (\"if(util.Long){\")\n (\"var n=new util.Long(%i,%i,%j)\", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)\n (\"d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!==\\\"undefined\\\"&&o.longs===BigInt?n.toBigInt():n\", prop)\n (\"}else\")\n (\"d%s=o.longs===String?%j:typeof BigInt!==\\\"undefined\\\"&&o.longs===BigInt?BigInt(%j):%i\", prop, field.typeDefault.toString(), field.typeDefault.toString(), field.typeDefault.toNumber());\n else if (field.bytes) {\n var arrayDefault = Array.prototype.slice.call(field.typeDefault);\n gen\n (\"if(o.bytes===String)d%s=%j\", prop, String.fromCharCode.apply(String, field.typeDefault))\n (\"else{\")\n (\"d%s=%j\", prop, arrayDefault)\n (\"if(o.bytes!==Array)d%s=util.newBuffer(d%s)\", prop, prop)\n (\"}\");\n } else gen\n (\"d%s=%j\", prop, field.typeDefault); // also messages (=null)\n } gen\n (\"}\");\n }\n var hasKs2 = false;\n for (i = 0; i < fields.length; ++i) {\n var field = fields[i],\n index = mtype._fieldsArray.indexOf(field),\n prop = util.safeProp(field.name);\n if (field.map) {\n if (!hasKs2) { hasKs2 = true; gen\n (\"var ks2\");\n } gen\n (\"if(m%s&&(ks2=Object.keys(m%s)).length){\", prop, prop)\n (\"d%s={}\", prop)\n (\"for(var j=0;jReader.recursionLimit)\")\n (\"throw Error(\\\"maximum nesting depth exceeded\\\")\")\n (\"var c=l===undefined?r.len:r.pos+l,m=new this.ctor\" + (mtype.fieldsArray.filter(function(field) { return field.map; }).length ? \",k,value\" : \"\"))\n (\"while(r.pos>>3){\");\n\n var i = 0;\n for (; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n ref = \"m\" + util.safeProp(field.name); gen\n (\"case %i: {\", field.id);\n\n // Map fields\n if (field.map) { gen\n (\"if(%s===util.emptyObject)\", ref)\n (\"%s={}\", ref)\n (\"var c2 = r.uint32()+r.pos\");\n\n if (types.defaults[field.keyType] !== undefined) gen\n (\"k=%j\", types.defaults[field.keyType]);\n else gen\n (\"k=null\");\n\n if (types.defaults[type] !== undefined) gen\n (\"value=%j\", types.defaults[type]);\n else gen\n (\"value=null\");\n\n gen\n (\"while(r.pos>>3){\")\n (\"case 1: k=r.%s(); break\", field.keyType)\n (\"case 2:\");\n\n if (types.basic[type] === undefined) gen\n (\"value=types[%i].decode(r,r.uint32(),undefined,n+1)\", i); // can't be groups\n else gen\n (\"value=r.%s()\", type);\n\n gen\n (\"break\")\n (\"default:\")\n (\"r.skipType(tag2&7,n)\")\n (\"break\")\n (\"}\")\n (\"}\");\n\n if (types.long[field.keyType] !== undefined) gen\n (\"%s[typeof k===\\\"object\\\"?util.longToHash(k):k]=value\", ref);\n else {\n if (field.keyType === \"string\") gen\n (\"if(k===\\\"__proto__\\\")\")\n (\"util.makeProp(%s,k)\", ref);\n gen\n (\"%s[k]=value\", ref);\n }\n\n // Repeated fields\n } else if (field.repeated) { gen\n\n (\"if(!(%s&&%s.length))\", ref, ref)\n (\"%s=[]\", ref);\n\n // Packable (always check for forward and backward compatiblity)\n if (types.packed[type] !== undefined) gen\n (\"if((t&7)===2){\")\n (\"var c2=r.uint32()+r.pos\")\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\n : gen(\"types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\n}\n\n/**\n * Generates an encoder specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction encoder(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var gen = util.codegen([\"m\", \"w\", \"q\"], mtype.name + \"$encode\")\n (\"if(!w)\")\n (\"w=Writer.create()\")\n (\"if(q===undefined)q=0\")\n (\"if(q>util.recursionLimit)\")\n (\"throw Error(\\\"max depth exceeded\\\")\");\n\n var i, ref;\n\n // \"when a message is serialized its known fields should be written sequentially by field number\"\n var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById);\n\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n index = mtype._fieldsArray.indexOf(field),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n wireType = types.basic[type];\n ref = \"m\" + util.safeProp(field.name);\n\n // Map fields\n if (field.map) {\n gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j)){\", ref, field.name) // !== undefined && !== null\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType);\n if (wireType === undefined) gen\n (\"types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()\", index, ref); // can't be groups\n else gen\n (\".uint32(%i).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\n gen\n (\"}\")\n (\"}\");\n\n // Repeated fields\n } else if (field.repeated) { gen\n (\"if(%s!=null&&%s.length){\", ref, ref); // !== undefined && !== null\n\n // Packed repeated\n if (field.packed && types.packed[type] !== undefined) { gen\n\n (\"w.uint32(%i).fork()\", (field.id << 3 | 2) >>> 0)\n (\"for(var i=0;i<%s.length;++i)\", ref)\n (\"w.%s(%s[i])\", type, ref)\n (\"w.ldelim()\");\n\n // Non-packed\n } else { gen\n\n (\"for(var i=0;i<%s.length;++i)\", ref);\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref + \"[i]\");\n else gen\n (\"w.uint32(%i).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n } gen\n (\"}\");\n\n // Non-repeated\n } else {\n if (field.optional) gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j))\", ref, field.name); // !== undefined && !== null\n\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref);\n else gen\n (\"w.uint32(%i).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n }\n }\n\n return gen\n (\"return w\");\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n","\"use strict\";\nmodule.exports = Enum;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = \"Enum\";\n\nvar Namespace = require(23),\n util = require(35);\n\n/**\n * Constructs a new enum instance.\n * @classdesc Reflected enum.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {Object.} [values] Enum values as an object, by name\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this enum\n * @param {Object.} [comments] The value comments for this enum\n * @param {Object.>|undefined} [valuesOptions] The value options for this enum\n */\nfunction Enum(name, values, options, comment, comments, valuesOptions) {\n ReflectionObject.call(this, name, options);\n\n if (values && typeof values !== \"object\")\n throw TypeError(\"values must be an object\");\n\n /**\n * Enum values by id.\n * @type {Object.}\n */\n this.valuesById = {};\n\n /**\n * Enum values by name.\n * @type {Object.}\n */\n this.values = Object.create(this.valuesById); // toJSON, marker\n\n /**\n * Enum comment text.\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Value comment texts, if any.\n * @type {Object.}\n */\n this.comments = comments || {};\n\n /**\n * Values options, if any\n * @type {Object>|undefined}\n */\n this.valuesOptions = valuesOptions;\n\n /**\n * Resolved values features, if any\n * @type {Object>|undefined}\n */\n this._valuesFeatures = {};\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\n // compatible enum. This is used by pbts to write actual enum definitions that work for\n // static and reflection code alike instead of emitting generic object definitions.\n\n if (values)\n for (var keys = Object.keys(values), i = 0; i < keys.length; ++i)\n if (keys[i] !== \"__proto__\" && typeof values[keys[i]] === \"number\") // use forward entries only\n this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i];\n}\n\n/**\n * @override\n */\nEnum.prototype._resolveFeatures = function _resolveFeatures(edition) {\n edition = this._edition || edition;\n ReflectionObject.prototype._resolveFeatures.call(this, edition);\n\n Object.keys(this.values).forEach(key => {\n var parentFeaturesCopy = util.merge({}, this._features);\n this._valuesFeatures[key] = util.merge(parentFeaturesCopy, this.valuesOptions && this.valuesOptions[key] && this.valuesOptions[key].features || {});\n });\n\n return this;\n};\n\n/**\n * Enum descriptor.\n * @interface IEnum\n * @property {Object.} values Enum values\n * @property {Object.} [options] Enum options\n */\n\n/**\n * Constructs an enum from an enum descriptor.\n * @param {string} name Enum name\n * @param {IEnum} json Enum descriptor\n * @returns {Enum} Created enum\n * @throws {TypeError} If arguments are invalid\n */\nEnum.fromJSON = function fromJSON(name, json) {\n var enm = new Enum(name, json.values, json.options, json.comment, json.comments);\n enm.reserved = json.reserved;\n if (json.edition)\n enm._edition = json.edition;\n enm._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return enm;\n};\n\n/**\n * Converts this enum to an enum descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IEnum} Enum descriptor\n */\nEnum.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"options\" , this.options,\n \"valuesOptions\" , this.valuesOptions,\n \"values\" , this.values,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"comment\" , keepComments ? this.comment : undefined,\n \"comments\" , keepComments ? this.comments : undefined\n ]);\n};\n\n/**\n * Adds a value to this enum.\n * @param {string} name Value name\n * @param {number} id Value id\n * @param {string} [comment] Comment, if any\n * @param {Object.|undefined} [options] Options, if any\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a value with this name or id\n */\nEnum.prototype.add = function add(name, id, comment, options) {\n // utilized by the parser but not by .fromJSON\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (!util.isInteger(id))\n throw TypeError(\"id must be an integer\");\n\n if (name === \"__proto__\")\n return this;\n\n if (this.values[name] !== undefined)\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\n\n if (this.isReservedId(id))\n throw Error(\"id \" + id + \" is reserved in \" + this);\n\n if (this.isReservedName(name))\n throw Error(\"name '\" + name + \"' is reserved in \" + this);\n\n if (this.valuesById[id] !== undefined) {\n if (!(this.options && this.options.allow_alias))\n throw Error(\"duplicate id \" + id + \" in \" + this);\n this.values[name] = id;\n } else\n this.valuesById[this.values[name] = id] = name;\n\n if (options) {\n if (this.valuesOptions === undefined)\n this.valuesOptions = {};\n this.valuesOptions[name] = options || null;\n }\n\n this.comments[name] = comment || null;\n return this;\n};\n\n/**\n * Removes a value from this enum\n * @param {string} name Value name\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `name` is not a name of this enum\n */\nEnum.prototype.remove = function remove(name) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n var val = this.values[name];\n if (val == null)\n throw Error(\"name '\" + name + \"' does not exist in \" + this);\n\n delete this.valuesById[val];\n delete this.values[name];\n delete this.comments[name];\n if (this.valuesOptions)\n delete this.valuesOptions[name];\n\n return this;\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n","\"use strict\";\nmodule.exports = Field;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = \"Field\";\n\nvar Enum = require(16),\n types = require(34),\n util = require(35);\n\nvar Type; // cyclic\n\nvar ruleRe = /^required|optional|repeated$/;\n\n/**\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\n * @name Field\n * @classdesc Reflected message field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a field from a field descriptor.\n * @param {string} name Field name\n * @param {IField} json Field descriptor\n * @returns {Field} Created field\n * @throws {TypeError} If arguments are invalid\n */\nField.fromJSON = function fromJSON(name, json) {\n var field = new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment);\n if (json.edition)\n field._edition = json.edition;\n field._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return field;\n};\n\n/**\n * Not an actual constructor. Use {@link Field} instead.\n * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports FieldBase\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction Field(name, id, type, rule, extend, options, comment) {\n\n if (util.isObject(rule)) {\n comment = extend;\n options = rule;\n rule = extend = undefined;\n } else if (util.isObject(extend)) {\n comment = options;\n options = extend;\n extend = undefined;\n }\n\n ReflectionObject.call(this, name, options);\n\n if (!util.isInteger(id) || id < 0)\n throw TypeError(\"id must be a non-negative integer\");\n\n if (!util.isString(type))\n throw TypeError(\"type must be a string\");\n\n if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase()))\n throw TypeError(\"rule must be a string rule\");\n\n if (extend !== undefined && !util.isString(extend))\n throw TypeError(\"extend must be a string\");\n\n /**\n * Field rule, if any.\n * @type {string|undefined}\n */\n if (rule === \"proto3_optional\") {\n rule = \"optional\";\n }\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\n\n /**\n * Field type.\n * @type {string}\n */\n this.type = type; // toJSON\n\n /**\n * Unique field id.\n * @type {number}\n */\n this.id = id; // toJSON, marker\n\n /**\n * Extended type if different from parent.\n * @type {string|undefined}\n */\n this.extend = extend || undefined; // toJSON\n\n /**\n * Whether this field is repeated.\n * @type {boolean}\n */\n this.repeated = rule === \"repeated\";\n\n /**\n * Whether this field is a map or not.\n * @type {boolean}\n */\n this.map = false;\n\n /**\n * Message this field belongs to.\n * @type {Type|null}\n */\n this.message = null;\n\n /**\n * OneOf this field belongs to, if any,\n * @type {OneOf|null}\n */\n this.partOf = null;\n\n /**\n * The field type's default value.\n * @type {*}\n */\n this.typeDefault = null;\n\n /**\n * The field's default value on prototypes.\n * @type {*}\n */\n this.defaultValue = null;\n\n /**\n * Whether this field's value should be treated as a long.\n * @type {boolean}\n */\n this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false;\n\n /**\n * Whether this field's value is a buffer.\n * @type {boolean}\n */\n this.bytes = type === \"bytes\";\n\n /**\n * Resolved type if not a basic type.\n * @type {Type|Enum|null}\n */\n this.resolvedType = null;\n\n /**\n * Sister-field within the extended type if a declaring extension field.\n * @type {Field|null}\n */\n this.extensionField = null;\n\n /**\n * Sister-field within the declaring namespace if an extended field.\n * @type {Field|null}\n */\n this.declaringField = null;\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Determines whether this field is required.\n * @name Field#required\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"required\", {\n get: function() {\n return this._features.field_presence === \"LEGACY_REQUIRED\";\n }\n});\n\n/**\n * Determines whether this field is not required.\n * @name Field#optional\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"optional\", {\n get: function() {\n return !this.required;\n }\n});\n\n/**\n * Determines whether this field uses tag-delimited encoding. In proto2 this\n * corresponded to group syntax.\n * @name Field#delimited\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"delimited\", {\n get: function() {\n return this.resolvedType instanceof Type &&\n this._features.message_encoding === \"DELIMITED\";\n }\n});\n\n/**\n * Determines whether this field is packed. Only relevant when repeated.\n * @name Field#packed\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"packed\", {\n get: function() {\n return this._features.repeated_field_encoding === \"PACKED\";\n }\n});\n\n/**\n * Determines whether this field tracks presence.\n * @name Field#hasPresence\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"hasPresence\", {\n get: function() {\n if (this.repeated || this.map) {\n return false;\n }\n return this.partOf || // oneofs\n this.declaringField || this.extensionField || // extensions\n this._features.field_presence !== \"IMPLICIT\";\n }\n});\n\n/**\n * @override\n */\nField.prototype.setOption = function setOption(name, value, ifNotSet) {\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\n};\n\n/**\n * Field descriptor.\n * @interface IField\n * @property {string} [rule=\"optional\"] Field rule\n * @property {string} type Field type\n * @property {number} id Field id\n * @property {Object.} [options] Field options\n */\n\n/**\n * Extension field descriptor.\n * @interface IExtensionField\n * @extends IField\n * @property {string} extend Extended type\n */\n\n/**\n * Converts this field to a field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IField} Field descriptor\n */\nField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"rule\" , this.rule !== \"optional\" && this.rule || undefined,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Resolves this field's type references.\n * @returns {Field} `this`\n * @throws {Error} If any reference cannot be resolved\n */\nField.prototype.resolve = function resolve() {\n\n if (this.resolved)\n return this;\n\n if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it\n this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type);\n if (this.resolvedType instanceof Type)\n this.typeDefault = null;\n else // instanceof Enum\n this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined\n } else if (this.options && this.options.proto3_optional) {\n // proto3 scalar value marked optional; should default to null\n this.typeDefault = null;\n }\n\n // use explicitly set default value if present\n if (this.options && this.options[\"default\"] != null) {\n this.typeDefault = this.options[\"default\"];\n if (this.resolvedType instanceof Enum && typeof this.typeDefault === \"string\")\n this.typeDefault = this.resolvedType.values[this.typeDefault];\n }\n\n // remove unnecessary options\n if (this.options) {\n if (this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum))\n delete this.options.packed;\n if (!Object.keys(this.options).length)\n this.options = undefined;\n }\n\n // convert to internal data type if necesssary\n if (this.long) {\n this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type === \"uint64\" || this.type === \"fixed64\");\n\n /* istanbul ignore else */\n if (Object.freeze)\n Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\n\n } else if (this.bytes && typeof this.typeDefault === \"string\") {\n var buf;\n if (util.base64.test(this.typeDefault))\n util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0);\n else\n util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0);\n this.typeDefault = buf;\n }\n\n // take special care of maps and repeated fields\n if (this.map)\n this.defaultValue = util.emptyObject;\n else if (this.repeated)\n this.defaultValue = util.emptyArray;\n else\n this.defaultValue = this.typeDefault;\n\n // ensure proper value on prototype\n if (this.parent instanceof Type)\n this.parent.ctor.prototype[this.name] = this.defaultValue;\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n\n/**\n * Infers field features from legacy syntax that may have been specified differently.\n * in older editions.\n * @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions\n * @returns {object} The feature values to override\n */\nField.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(edition) {\n if (edition !== \"proto2\" && edition !== \"proto3\") {\n return {};\n }\n\n var features = {};\n\n if (this.rule === \"required\") {\n features.field_presence = \"LEGACY_REQUIRED\";\n }\n if (this.parent && types.defaults[this.type] === undefined) {\n // We can't use resolvedType because types may not have been resolved yet. However,\n // legacy groups are always in the same scope as the field so we don't have to do a\n // full scan of the tree.\n var type = this.parent.get(this.type.split(\".\").pop());\n if (type && type instanceof Type && type.group) {\n features.message_encoding = \"DELIMITED\";\n }\n }\n if (this.getOption(\"packed\") === true) {\n features.repeated_field_encoding = \"PACKED\";\n } else if (this.getOption(\"packed\") === false) {\n features.repeated_field_encoding = \"EXPANDED\";\n }\n return features;\n};\n\n/**\n * @override\n */\nField.prototype._resolveFeatures = function _resolveFeatures(edition) {\n return ReflectionObject.prototype._resolveFeatures.call(this, this._edition || edition);\n};\n\n/**\n * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript).\n * @typedef FieldDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} fieldName Field name\n * @returns {undefined}\n */\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"string\"|\"bool\"|\"bytes\"|Object} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @param {T} [defaultValue] Default value\n * @returns {FieldDecorator} Decorator function\n * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[]\n */\nField.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) {\n\n // submessage: decorate the submessage and use its name as the type\n if (typeof fieldType === \"function\")\n fieldType = util.decorateType(fieldType).name;\n\n // enum reference: create a reflected copy of the enum and keep reuseing it\n else if (fieldType && typeof fieldType === \"object\")\n fieldType = util.decorateEnum(fieldType).name;\n\n return function fieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new Field(fieldName, fieldId, fieldType, fieldRule, { \"default\": defaultValue }));\n };\n};\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {Constructor|string} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @returns {FieldDecorator} Decorator function\n * @template T extends Message\n * @variation 2\n */\n// like Field.d but without a default value\n\n// Sets up cyclic dependencies (called in index-light)\nField._configure = function configure(Type_) {\n Type = Type_;\n};\n","\"use strict\";\nvar protobuf = module.exports = require(19);\n\nprotobuf.build = \"light\";\n\n/**\n * A node-style callback as used by {@link load} and {@link Root#load}.\n * @typedef LoadCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Root} [root] Root, if there hasn't been an error\n * @returns {undefined}\n */\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n */\nfunction load(filename, root, callback) {\n if (typeof root === \"function\") {\n callback = root;\n root = new protobuf.Root();\n } else if (!root)\n root = new protobuf.Root();\n return root.load(filename, callback);\n}\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Promise} Promise\n * @see {@link Root#load}\n * @variation 3\n */\n// function load(filename:string, [root:Root]):Promise\n\nprotobuf.load = load;\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n * @see {@link Root#loadSync}\n */\nfunction loadSync(filename, root) {\n if (!root)\n root = new protobuf.Root();\n return root.loadSync(filename);\n}\n\nprotobuf.loadSync = loadSync;\n\n// Serialization\nprotobuf.encoder = require(15);\nprotobuf.decoder = require(14);\nprotobuf.verifier = require(40);\nprotobuf.converter = require(13);\n\n// Reflection\nprotobuf.ReflectionObject = require(24);\nprotobuf.Namespace = require(23);\nprotobuf.Root = require(28);\nprotobuf.Enum = require(16);\nprotobuf.Type = require(33);\nprotobuf.Field = require(17);\nprotobuf.OneOf = require(25);\nprotobuf.MapField = require(20);\nprotobuf.Service = require(32);\nprotobuf.Method = require(22);\n\n// Runtime\nprotobuf.Message = require(21);\nprotobuf.wrappers = require(41);\n\n// Utility\nprotobuf.types = require(34);\nprotobuf.util = require(35);\n\n// Set up possibly cyclic reflection dependencies\nprotobuf.ReflectionObject._configure(protobuf.Root);\nprotobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);\nprotobuf.Root._configure(protobuf.Type);\nprotobuf.Field._configure(protobuf.Type);\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(42);\nprotobuf.BufferWriter = require(43);\nprotobuf.Reader = require(26);\nprotobuf.BufferReader = require(27);\n\n// Utility\nprotobuf.util = require(38);\nprotobuf.rpc = require(30);\nprotobuf.roots = require(29);\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","\"use strict\";\nmodule.exports = MapField;\n\n// extends Field\nvar Field = require(17);\n((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = \"MapField\";\n\nvar types = require(34),\n util = require(35);\n\n/**\n * Constructs a new map field instance.\n * @classdesc Reflected map field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} keyType Key type\n * @param {string} type Value type\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction MapField(name, id, keyType, type, options, comment) {\n Field.call(this, name, id, type, undefined, undefined, options, comment);\n\n /* istanbul ignore if */\n if (!util.isString(keyType))\n throw TypeError(\"keyType must be a string\");\n\n /**\n * Key type.\n * @type {string}\n */\n this.keyType = keyType; // toJSON, marker\n\n /**\n * Resolved key type if not a basic type.\n * @type {ReflectionObject|null}\n */\n this.resolvedKeyType = null;\n\n // Overrides Field#map\n this.map = true;\n}\n\n/**\n * Map field descriptor.\n * @interface IMapField\n * @extends {IField}\n * @property {string} keyType Key type\n */\n\n/**\n * Extension map field descriptor.\n * @interface IExtensionMapField\n * @extends IMapField\n * @property {string} extend Extended type\n */\n\n/**\n * Constructs a map field from a map field descriptor.\n * @param {string} name Field name\n * @param {IMapField} json Map field descriptor\n * @returns {MapField} Created map field\n * @throws {TypeError} If arguments are invalid\n */\nMapField.fromJSON = function fromJSON(name, json) {\n return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment);\n};\n\n/**\n * Converts this map field to a map field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMapField} Map field descriptor\n */\nMapField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"keyType\" , this.keyType,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nMapField.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\n if (types.mapKey[this.keyType] === undefined)\n throw Error(\"invalid key type: \" + this.keyType);\n\n return Field.prototype.resolve.call(this);\n};\n\n/**\n * Map field decorator (TypeScript).\n * @name MapField.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"} fieldKeyType Field key type\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"|\"bytes\"|Object|Constructor<{}>} fieldValueType Field value type\n * @returns {FieldDecorator} Decorator function\n * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> }\n */\nMapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) {\n\n // submessage value: decorate the submessage and use its name as the type\n if (typeof fieldValueType === \"function\")\n fieldValueType = util.decorateType(fieldValueType).name;\n\n // enum reference value: create a reflected copy of the enum and keep reuseing it\n else if (fieldValueType && typeof fieldValueType === \"object\")\n fieldValueType = util.decorateEnum(fieldValueType).name;\n\n return function mapFieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType));\n };\n};\n","\"use strict\";\nmodule.exports = Message;\n\nvar util = require(38);\n\n/**\n * Constructs a new message instance.\n * @classdesc Abstract runtime message.\n * @constructor\n * @param {Properties} [properties] Properties to set\n * @template T extends object = object\n */\nfunction Message(properties) {\n // not used internally\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (key === \"__proto__\")\n continue;\n this[key] = properties[key];\n }\n}\n\n/**\n * Reference to the reflected type.\n * @name Message.$type\n * @type {Type}\n * @readonly\n */\n\n/**\n * Reference to the reflected type.\n * @name Message#$type\n * @type {Type}\n * @readonly\n */\n\n/*eslint-disable valid-jsdoc*/\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.create = function create(properties) {\n return this.$type.create(properties);\n};\n\n/**\n * Encodes a message of this type.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encode = function encode(message, writer) {\n return this.$type.encode(message, writer);\n};\n\n/**\n * Encodes a message of this type preceeded by its length as a varint.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.$type.encodeDelimited(message, writer);\n};\n\n/**\n * Decodes a message of this type.\n * @name Message.decode\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decode = function decode(reader) {\n return this.$type.decode(reader);\n};\n\n/**\n * Decodes a message of this type preceeded by its length as a varint.\n * @name Message.decodeDelimited\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decodeDelimited = function decodeDelimited(reader) {\n return this.$type.decodeDelimited(reader);\n};\n\n/**\n * Verifies a message of this type.\n * @name Message.verify\n * @function\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\nMessage.verify = function verify(message) {\n return this.$type.verify(message);\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object\n * @returns {T} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.fromObject = function fromObject(object) {\n return this.$type.fromObject(object);\n};\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {T} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @template T extends Message\n * @this Constructor\n */\nMessage.toObject = function toObject(message, options) {\n return this.$type.toObject(message, options);\n};\n\n/**\n * Converts this message to JSON.\n * @returns {Object.} JSON object\n */\nMessage.prototype.toJSON = function toJSON() {\n return this.$type.toObject(this, util.toJSONOptions);\n};\n\n/*eslint-enable valid-jsdoc*/\n","\"use strict\";\nmodule.exports = Method;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = \"Method\";\n\nvar util = require(35);\n\n/**\n * Constructs a new service method instance.\n * @classdesc Reflected service method.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Method name\n * @param {string|undefined} type Method type, usually `\"rpc\"`\n * @param {string} requestType Request message type\n * @param {string} responseType Response message type\n * @param {boolean|Object.} [requestStream] Whether the request is streamed\n * @param {boolean|Object.} [responseStream] Whether the response is streamed\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this method\n * @param {Object.} [parsedOptions] Declared options, properly parsed into an object\n */\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) {\n\n /* istanbul ignore next */\n if (util.isObject(requestStream)) {\n options = requestStream;\n requestStream = responseStream = undefined;\n } else if (util.isObject(responseStream)) {\n options = responseStream;\n responseStream = undefined;\n }\n\n /* istanbul ignore if */\n if (!(type === undefined || util.isString(type)))\n throw TypeError(\"type must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(requestType))\n throw TypeError(\"requestType must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(responseType))\n throw TypeError(\"responseType must be a string\");\n\n ReflectionObject.call(this, name, options);\n\n /**\n * Method type.\n * @type {string}\n */\n this.type = type || \"rpc\"; // toJSON\n\n /**\n * Request type.\n * @type {string}\n */\n this.requestType = requestType; // toJSON, marker\n\n /**\n * Whether requests are streamed or not.\n * @type {boolean|undefined}\n */\n this.requestStream = requestStream ? true : undefined; // toJSON\n\n /**\n * Response type.\n * @type {string}\n */\n this.responseType = responseType; // toJSON\n\n /**\n * Whether responses are streamed or not.\n * @type {boolean|undefined}\n */\n this.responseStream = responseStream ? true : undefined; // toJSON\n\n /**\n * Resolved request type.\n * @type {Type|null}\n */\n this.resolvedRequestType = null;\n\n /**\n * Resolved response type.\n * @type {Type|null}\n */\n this.resolvedResponseType = null;\n\n /**\n * Comment for this method\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Options properly parsed into an object\n */\n this.parsedOptions = parsedOptions;\n}\n\n/**\n * Method descriptor.\n * @interface IMethod\n * @property {string} [type=\"rpc\"] Method type\n * @property {string} requestType Request type\n * @property {string} responseType Response type\n * @property {boolean} [requestStream=false] Whether requests are streamed\n * @property {boolean} [responseStream=false] Whether responses are streamed\n * @property {Object.} [options] Method options\n * @property {string} comment Method comments\n * @property {Object.} [parsedOptions] Method options properly parsed into an object\n */\n\n/**\n * Constructs a method from a method descriptor.\n * @param {string} name Method name\n * @param {IMethod} json Method descriptor\n * @returns {Method} Created method\n * @throws {TypeError} If arguments are invalid\n */\nMethod.fromJSON = function fromJSON(name, json) {\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions);\n};\n\n/**\n * Converts this method to a method descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMethod} Method descriptor\n */\nMethod.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"type\" , this.type !== \"rpc\" && /* istanbul ignore next */ this.type || undefined,\n \"requestType\" , this.requestType,\n \"requestStream\" , this.requestStream,\n \"responseType\" , this.responseType,\n \"responseStream\" , this.responseStream,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined,\n \"parsedOptions\" , this.parsedOptions,\n ]);\n};\n\n/**\n * @override\n */\nMethod.prototype.resolve = function resolve() {\n\n /* istanbul ignore if */\n if (this.resolved)\n return this;\n\n this.resolvedRequestType = this.parent.lookupType(this.requestType);\n this.resolvedResponseType = this.parent.lookupType(this.responseType);\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n","\"use strict\";\nmodule.exports = Namespace;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = \"Namespace\";\n\nvar Field = require(17),\n util = require(35),\n OneOf = require(25);\n\nvar Type, // cyclic\n Service,\n Enum;\n\n/**\n * Constructs a new namespace instance.\n * @name Namespace\n * @classdesc Reflected namespace.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a namespace from JSON.\n * @memberof Namespace\n * @function\n * @param {string} name Namespace name\n * @param {Object.} json JSON object\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Namespace} Created namespace\n * @throws {TypeError} If arguments are invalid\n */\nNamespace.fromJSON = function fromJSON(name, json, depth) {\n depth = util.checkDepth(depth);\n return new Namespace(name, json.options).addJSON(json.nested, depth);\n};\n\n/**\n * Converts an array of reflection objects to JSON.\n * @memberof Namespace\n * @param {ReflectionObject[]} array Object array\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\n */\nfunction arrayToJSON(array, toJSONOptions) {\n if (!(array && array.length))\n return undefined;\n var obj = {};\n for (var i = 0; i < array.length; ++i)\n obj[array[i].name] = array[i].toJSON(toJSONOptions);\n return obj;\n}\n\nNamespace.arrayToJSON = arrayToJSON;\n\n/**\n * Tests if the specified id is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedId = function isReservedId(reserved, id) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (typeof reserved[i] !== \"string\" && reserved[i][0] <= id && reserved[i][1] > id)\n return true;\n return false;\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedName = function isReservedName(reserved, name) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (reserved[i] === name)\n return true;\n return false;\n};\n\n/**\n * Not an actual constructor. Use {@link Namespace} instead.\n * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports NamespaceBase\n * @extends ReflectionObject\n * @abstract\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n * @see {@link Namespace}\n */\nfunction Namespace(name, options) {\n ReflectionObject.call(this, name, options);\n\n /**\n * Nested objects by name.\n * @type {Object.|undefined}\n */\n this.nested = undefined; // toJSON\n\n /**\n * Cached nested objects as an array.\n * @type {ReflectionObject[]|null}\n * @private\n */\n this._nestedArray = null;\n\n /**\n * Cache lookup calls for any objects contains anywhere under this namespace.\n * This drastically speeds up resolve for large cross-linked protos where the same\n * types are looked up repeatedly.\n * @type {Object.}\n * @private\n */\n this._lookupCache = Object.create(null);\n\n /**\n * Whether or not objects contained in this namespace need feature resolution.\n * @type {boolean}\n * @protected\n */\n this._needsRecursiveFeatureResolution = true;\n\n /**\n * Whether or not objects contained in this namespace need a resolve.\n * @type {boolean}\n * @protected\n */\n this._needsRecursiveResolve = true;\n}\n\nfunction clearCache(namespace) {\n namespace._nestedArray = null;\n namespace._lookupCache = Object.create(null);\n\n // Also clear parent caches, since they include nested lookups.\n var parent = namespace;\n while(parent = parent.parent) {\n parent._lookupCache = Object.create(null);\n }\n return namespace;\n}\n\n/**\n * Nested objects of this namespace as an array for iteration.\n * @name NamespaceBase#nestedArray\n * @type {ReflectionObject[]}\n * @readonly\n */\nObject.defineProperty(Namespace.prototype, \"nestedArray\", {\n get: function() {\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\n }\n});\n\n/**\n * Namespace descriptor.\n * @interface INamespace\n * @property {Object.} [options] Namespace options\n * @property {Object.} [nested] Nested object descriptors\n */\n\n/**\n * Any extension field descriptor.\n * @typedef AnyExtensionField\n * @type {IExtensionField|IExtensionMapField}\n */\n\n/**\n * Any nested object descriptor.\n * @typedef AnyNestedObject\n * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf}\n */\n\n/**\n * Converts this namespace to a namespace descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {INamespace} Namespace descriptor\n */\nNamespace.prototype.toJSON = function toJSON(toJSONOptions) {\n return util.toObject([\n \"options\" , this.options,\n \"nested\" , arrayToJSON(this.nestedArray, toJSONOptions)\n ]);\n};\n\n/**\n * Adds nested objects to this namespace from nested object descriptors.\n * @param {Object.} nestedJson Any nested object descriptors\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Namespace} `this`\n */\nNamespace.prototype.addJSON = function addJSON(nestedJson, depth) {\n depth = util.checkDepth(depth);\n var ns = this;\n /* istanbul ignore else */\n if (nestedJson) {\n for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) {\n nested = nestedJson[names[i]];\n ns.add( // most to least likely\n ( nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : nested.id !== undefined\n ? Field.fromJSON\n : Namespace.fromJSON )(names[i], nested, depth + 1)\n );\n }\n }\n return this;\n};\n\n/**\n * Gets the nested object of the specified name.\n * @param {string} name Nested object name\n * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist\n */\nNamespace.prototype.get = function get(name) {\n return this.nested && Object.prototype.hasOwnProperty.call(this.nested, name)\n ? this.nested[name]\n : null;\n};\n\n/**\n * Gets the values of the nested {@link Enum|enum} of the specified name.\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\n * @param {string} name Nested enum name\n * @returns {Object.} Enum values\n * @throws {Error} If there is no such enum\n */\nNamespace.prototype.getEnum = function getEnum(name) {\n if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name) && this.nested[name] instanceof Enum)\n return this.nested[name].values;\n throw Error(\"no such enum: \" + name);\n};\n\n/**\n * Adds a nested object to this namespace.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name\n */\nNamespace.prototype.add = function add(object) {\n\n if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace))\n throw TypeError(\"object must be a valid nested object\");\n\n if (object.name === \"__proto__\")\n return this;\n\n if (!this.nested)\n this.nested = {};\n else {\n var prev = this.get(object.name);\n if (prev) {\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\n // replace plain namespace but keep existing nested elements and options\n var nested = prev.nestedArray;\n for (var i = 0; i < nested.length; ++i)\n object.add(nested[i]);\n this.remove(prev);\n if (!this.nested)\n this.nested = {};\n object.setOptions(prev.options, true);\n\n } else\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n }\n }\n this.nested[object.name] = object;\n\n if (!(this instanceof Type || this instanceof Service || this instanceof Enum || this instanceof Field)) {\n // This is a package or a root namespace.\n if (!object._edition) {\n // Make sure that some edition is set if it hasn't already been specified.\n object._edition = object._defaultEdition;\n }\n }\n\n this._needsRecursiveFeatureResolution = true;\n this._needsRecursiveResolve = true;\n\n // Also clear parent caches, since they need to recurse down.\n var parent = this;\n while(parent = parent.parent) {\n parent._needsRecursiveFeatureResolution = true;\n parent._needsRecursiveResolve = true;\n }\n\n object.onAdd(this);\n return clearCache(this);\n};\n\n/**\n * Removes a nested object from this namespace.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this namespace\n */\nNamespace.prototype.remove = function remove(object) {\n\n if (!(object instanceof ReflectionObject))\n throw TypeError(\"object must be a ReflectionObject\");\n if (object.parent !== this)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.nested[object.name];\n if (!Object.keys(this.nested).length)\n this.nested = undefined;\n\n object.onRemove(this);\n return clearCache(this);\n};\n\n/**\n * Defines additial namespaces within this one if not yet existing.\n * @param {string|string[]} path Path to create\n * @param {*} [json] Nested types to create from JSON\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\n */\nNamespace.prototype.define = function define(path, json) {\n\n if (util.isString(path))\n path = path.split(\".\");\n else if (!Array.isArray(path))\n throw TypeError(\"illegal path\");\n if (path && path.length && path[0] === \"\")\n throw Error(\"path must be relative\");\n if (path.length > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n\n var ptr = this;\n while (path.length > 0) {\n var part = path.shift();\n if (ptr.nested && ptr.nested[part]) {\n ptr = ptr.nested[part];\n if (!(ptr instanceof Namespace))\n throw Error(\"path conflicts with non-namespace objects\");\n } else\n ptr.add(ptr = new Namespace(part));\n }\n if (json)\n ptr.addJSON(json);\n return ptr;\n};\n\n/**\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost.\n * @returns {Namespace} `this`\n */\nNamespace.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n this._resolveFeaturesRecursive(this._edition);\n\n var nested = this.nestedArray, i = 0;\n this.resolve();\n while (i < nested.length)\n if (nested[i] instanceof Namespace)\n nested[i++].resolveAll();\n else\n nested[i++].resolve();\n this._needsRecursiveResolve = false;\n return this;\n};\n\n/**\n * @override\n */\nNamespace.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n if (!this._needsRecursiveFeatureResolution) return this;\n this._needsRecursiveFeatureResolution = false;\n\n edition = this._edition || edition;\n\n ReflectionObject.prototype._resolveFeaturesRecursive.call(this, edition);\n this.nestedArray.forEach(nested => {\n nested._resolveFeaturesRecursive(edition);\n });\n return this;\n};\n\n/**\n * Recursively looks up the reflection object matching the specified path in the scope of this namespace.\n * @param {string|string[]} path Path to look up\n * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n */\nNamespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) {\n /* istanbul ignore next */\n if (typeof filterTypes === \"boolean\") {\n parentAlreadyChecked = filterTypes;\n filterTypes = undefined;\n } else if (filterTypes && !Array.isArray(filterTypes))\n filterTypes = [ filterTypes ];\n\n if (util.isString(path) && path.length) {\n if (path === \".\")\n return this.root;\n path = path.split(\".\");\n } else if (!path.length)\n return this;\n\n var flatPath = path.join(\".\");\n\n // Start at root if path is absolute\n if (path[0] === \"\")\n return this.root.lookup(path.slice(1), filterTypes);\n\n // Early bailout for objects with matching absolute paths\n var found = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects[\".\" + flatPath];\n if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {\n return found;\n }\n\n // Do a regular lookup at this namespace and below\n found = this._lookupImpl(path, flatPath);\n if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {\n return found;\n }\n\n if (parentAlreadyChecked)\n return null;\n\n // If there hasn't been a match, walk up the tree and look more broadly\n var current = this;\n while (current.parent) {\n found = current.parent._lookupImpl(path, flatPath);\n if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {\n return found;\n }\n current = current.parent;\n }\n return null;\n};\n\n/**\n * Internal helper for lookup that handles searching just at this namespace and below along with caching.\n * @param {string[]} path Path to look up\n * @param {string} flatPath Flattened version of the path to use as a cache key\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n * @private\n */\nNamespace.prototype._lookupImpl = function lookup(path, flatPath) {\n if(Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) {\n return this._lookupCache[flatPath];\n }\n\n // Test if the first part matches any nested object, and if so, traverse if path contains more\n var found = this.get(path[0]);\n var exact = null;\n if (found) {\n if (path.length === 1) {\n exact = found;\n } else if (found instanceof Namespace) {\n path = path.slice(1);\n exact = found._lookupImpl(path, path.join(\".\"));\n }\n\n // Otherwise try each nested namespace\n } else {\n for (var i = 0; i < this.nestedArray.length; ++i)\n if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path, flatPath))) {\n exact = found;\n break;\n }\n }\n\n // Set this even when null, so that when we walk up the tree we can quickly bail on repeated checks back down.\n this._lookupCache[flatPath] = exact;\n return exact;\n};\n\n/**\n * Looks up the reflection object at the specified path, relative to this namespace.\n * @name NamespaceBase#lookup\n * @function\n * @param {string|string[]} path Path to look up\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n * @variation 2\n */\n// lookup(path: string, [parentAlreadyChecked: boolean])\n\n/**\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type\n * @throws {Error} If `path` does not point to a type\n */\nNamespace.prototype.lookupType = function lookupType(path) {\n var found = this.lookup(path, [ Type ]);\n if (!found)\n throw Error(\"no such type: \" + path);\n return found;\n};\n\n/**\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Enum} Looked up enum\n * @throws {Error} If `path` does not point to an enum\n */\nNamespace.prototype.lookupEnum = function lookupEnum(path) {\n var found = this.lookup(path, [ Enum ]);\n if (!found)\n throw Error(\"no such Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type or enum\n * @throws {Error} If `path` does not point to a type or enum\n */\nNamespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) {\n var found = this.lookup(path, [ Type, Enum ]);\n if (!found)\n throw Error(\"no such Type or Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Service} Looked up service\n * @throws {Error} If `path` does not point to a service\n */\nNamespace.prototype.lookupService = function lookupService(path) {\n var found = this.lookup(path, [ Service ]);\n if (!found)\n throw Error(\"no such Service '\" + path + \"' in \" + this);\n return found;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nNamespace._configure = function(Type_, Service_, Enum_) {\n Type = Type_;\n Service = Service_;\n Enum = Enum_;\n};\n","\"use strict\";\nmodule.exports = ReflectionObject;\n\nReflectionObject.className = \"ReflectionObject\";\n\nconst OneOf = require(25);\nvar util = require(35);\n\nvar Root; // cyclic\n\n/* eslint-disable no-warning-comments */\n// TODO: Replace with embedded proto.\nvar editions2023Defaults = {enum_type: \"OPEN\", field_presence: \"EXPLICIT\", json_format: \"ALLOW\", message_encoding: \"LENGTH_PREFIXED\", repeated_field_encoding: \"PACKED\", utf8_validation: \"VERIFY\"};\nvar proto2Defaults = {enum_type: \"CLOSED\", field_presence: \"EXPLICIT\", json_format: \"LEGACY_BEST_EFFORT\", message_encoding: \"LENGTH_PREFIXED\", repeated_field_encoding: \"EXPANDED\", utf8_validation: \"NONE\"};\nvar proto3Defaults = {enum_type: \"OPEN\", field_presence: \"IMPLICIT\", json_format: \"ALLOW\", message_encoding: \"LENGTH_PREFIXED\", repeated_field_encoding: \"PACKED\", utf8_validation: \"VERIFY\"};\n\n/**\n * Constructs a new reflection object instance.\n * @classdesc Base class of all reflection objects.\n * @constructor\n * @param {string} name Object name\n * @param {Object.} [options] Declared options\n * @abstract\n */\nfunction ReflectionObject(name, options) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (options && !util.isObject(options))\n throw TypeError(\"options must be an object\");\n\n /**\n * Options.\n * @type {Object.|undefined}\n */\n this.options = options; // toJSON\n\n /**\n * Parsed Options.\n * @type {Array.>|undefined}\n */\n this.parsedOptions = null;\n\n /**\n * Unique name within its namespace.\n * @type {string}\n */\n this.name = name;\n\n /**\n * The edition specified for this object. Only relevant for top-level objects.\n * @type {string}\n * @private\n */\n this._edition = null;\n\n /**\n * The default edition to use for this object if none is specified. For legacy reasons,\n * this is proto2 except in the JSON parsing case where it was proto3.\n * @type {string}\n * @private\n */\n this._defaultEdition = \"proto2\";\n\n /**\n * Resolved Features.\n * @type {object}\n * @private\n */\n this._features = {};\n\n /**\n * Whether or not features have been resolved.\n * @type {boolean}\n * @private\n */\n this._featuresResolved = false;\n\n /**\n * Parent namespace.\n * @type {Namespace|null}\n */\n this.parent = null;\n\n /**\n * Whether already resolved or not.\n * @type {boolean}\n */\n this.resolved = false;\n\n /**\n * Comment text, if any.\n * @type {string|null}\n */\n this.comment = null;\n\n /**\n * Defining file name.\n * @type {string|null}\n */\n this.filename = null;\n}\n\nObject.defineProperties(ReflectionObject.prototype, {\n\n /**\n * Reference to the root namespace.\n * @name ReflectionObject#root\n * @type {Root}\n * @readonly\n */\n root: {\n get: function() {\n var ptr = this;\n while (ptr.parent !== null)\n ptr = ptr.parent;\n return ptr;\n }\n },\n\n /**\n * Full name including leading dot.\n * @name ReflectionObject#fullName\n * @type {string}\n * @readonly\n */\n fullName: {\n get: function() {\n var path = [ this.name ],\n ptr = this.parent;\n while (ptr) {\n path.unshift(ptr.name);\n ptr = ptr.parent;\n }\n return path.join(\".\");\n }\n }\n});\n\n/**\n * Converts this reflection object to its descriptor representation.\n * @returns {Object.} Descriptor\n * @abstract\n */\nReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() {\n throw Error(); // not implemented, shouldn't happen\n};\n\n/**\n * Called when this object is added to a parent.\n * @param {ReflectionObject} parent Parent added to\n * @returns {undefined}\n */\nReflectionObject.prototype.onAdd = function onAdd(parent) {\n if (this.parent && this.parent !== parent)\n this.parent.remove(this);\n this.parent = parent;\n this.resolved = false;\n var root = parent.root;\n if (root instanceof Root)\n root._handleAdd(this);\n};\n\n/**\n * Called when this object is removed from a parent.\n * @param {ReflectionObject} parent Parent removed from\n * @returns {undefined}\n */\nReflectionObject.prototype.onRemove = function onRemove(parent) {\n var root = parent.root;\n if (root instanceof Root)\n root._handleRemove(this);\n this.parent = null;\n this.resolved = false;\n};\n\n/**\n * Resolves this objects type references.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n if (this.root instanceof Root)\n this.resolved = true; // only if part of a root\n return this;\n};\n\n/**\n * Resolves this objects editions features.\n * @param {string} edition The edition we're currently resolving for.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n return this._resolveFeatures(this._edition || edition);\n};\n\n/**\n * Resolves child features from parent features\n * @param {string} edition The edition we're currently resolving for.\n * @returns {undefined}\n */\nReflectionObject.prototype._resolveFeatures = function _resolveFeatures(edition) {\n if (this._featuresResolved) {\n return;\n }\n\n var defaults = {};\n\n /* istanbul ignore if */\n if (!edition) {\n throw new Error(\"Unknown edition for \" + this.fullName);\n }\n\n var protoFeatures = util.merge({}, this.options && this.options.features,\n this._inferLegacyProtoFeatures(edition));\n\n if (this._edition) {\n // For a namespace marked with a specific edition, reset defaults.\n /* istanbul ignore else */\n if (edition === \"proto2\") {\n defaults = Object.assign({}, proto2Defaults);\n } else if (edition === \"proto3\") {\n defaults = Object.assign({}, proto3Defaults);\n } else if (edition === \"2023\") {\n defaults = Object.assign({}, editions2023Defaults);\n } else {\n throw new Error(\"Unknown edition: \" + edition);\n }\n this._features = util.merge(defaults, protoFeatures);\n this._featuresResolved = true;\n return;\n }\n\n // fields in Oneofs aren't actually children of them, so we have to\n // special-case it\n /* istanbul ignore else */\n if (this.partOf instanceof OneOf) {\n var lexicalParentFeaturesCopy = util.merge({}, this.partOf._features);\n this._features = util.merge(lexicalParentFeaturesCopy, protoFeatures);\n } else if (this.declaringField) {\n // Skip feature resolution of sister fields.\n } else if (this.parent) {\n var parentFeaturesCopy = util.merge({}, this.parent._features);\n this._features = util.merge(parentFeaturesCopy, protoFeatures);\n } else {\n throw new Error(\"Unable to find a parent for \" + this.fullName);\n }\n if (this.extensionField) {\n // Sister fields should have the same features as their extensions.\n this.extensionField._features = this._features;\n }\n this._featuresResolved = true;\n};\n\n/**\n * Infers features from legacy syntax that may have been specified differently.\n * in older editions.\n * @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions\n * @returns {object} The feature values to override\n */\nReflectionObject.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(/*edition*/) {\n return {};\n};\n\n/**\n * Gets an option value.\n * @param {string} name Option name\n * @returns {*} Option value or `undefined` if not set\n */\nReflectionObject.prototype.getOption = function getOption(name) {\n if (this.options)\n return this.options[name];\n return undefined;\n};\n\n/**\n * Sets an option.\n * @param {string} name Option name\n * @param {*} value Option value\n * @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (name === \"__proto__\")\n return this;\n if (!this.options)\n this.options = {};\n if (/^features\\./.test(name)) {\n util.setProperty(this.options, name, value, ifNotSet);\n } else if (!ifNotSet || this.options[name] === undefined) {\n if (this.getOption(name) !== value) this.resolved = false;\n this.options[name] = value;\n }\n\n return this;\n};\n\n/**\n * Sets a parsed option.\n * @param {string} name parsed Option name\n * @param {*} value Option value\n * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\\empty, will add a new option with that value\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) {\n if (name === \"__proto__\")\n return this;\n if (!this.parsedOptions) {\n this.parsedOptions = [];\n }\n var parsedOptions = this.parsedOptions;\n if (propName) {\n // If setting a sub property of an option then try to merge it\n // with an existing option\n var opt = parsedOptions.find(function (opt) {\n return Object.prototype.hasOwnProperty.call(opt, name);\n });\n if (opt) {\n // If we found an existing option - just merge the property value\n // (If it's a feature, will just write over)\n var newValue = opt[name];\n util.setProperty(newValue, propName, value);\n } else {\n // otherwise, create a new option, set its property and add it to the list\n opt = {};\n opt[name] = util.setProperty({}, propName, value);\n parsedOptions.push(opt);\n }\n } else {\n // Always create a new option when setting the value of the option itself\n var newOpt = {};\n newOpt[name] = value;\n parsedOptions.push(newOpt);\n }\n\n return this;\n};\n\n/**\n * Sets multiple options.\n * @param {Object.} options Options to set\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) {\n if (options)\n for (var keys = Object.keys(options), i = 0; i < keys.length; ++i)\n this.setOption(keys[i], options[keys[i]], ifNotSet);\n return this;\n};\n\n/**\n * Converts this instance to its string representation.\n * @returns {string} Class name[, space, full name]\n */\nReflectionObject.prototype.toString = function toString() {\n var className = this.constructor.className,\n fullName = this.fullName;\n if (fullName.length)\n return className + \" \" + fullName;\n return className;\n};\n\n/**\n * Converts the edition this object is pinned to for JSON format.\n * @returns {string|undefined} The edition string for JSON representation\n */\nReflectionObject.prototype._editionToJSON = function _editionToJSON() {\n if (!this._edition || this._edition === \"proto3\") {\n // Avoid emitting proto3 since we need to default to it for backwards\n // compatibility anyway.\n return undefined;\n }\n return this._edition;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nReflectionObject._configure = function(Root_) {\n Root = Root_;\n};\n","\"use strict\";\nmodule.exports = OneOf;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = \"OneOf\";\n\nvar Field = require(17),\n util = require(35);\n\n/**\n * Constructs a new oneof instance.\n * @classdesc Reflected oneof.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Oneof name\n * @param {string[]|Object.} [fieldNames] Field names\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction OneOf(name, fieldNames, options, comment) {\n if (!Array.isArray(fieldNames)) {\n options = fieldNames;\n fieldNames = undefined;\n }\n ReflectionObject.call(this, name, options);\n\n /* istanbul ignore if */\n if (!(fieldNames === undefined || Array.isArray(fieldNames)))\n throw TypeError(\"fieldNames must be an Array\");\n\n /**\n * Field names that belong to this oneof.\n * @type {string[]}\n */\n this.oneof = fieldNames || []; // toJSON, marker\n\n /**\n * Fields that belong to this oneof as an array for iteration.\n * @type {Field[]}\n * @readonly\n */\n this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Oneof descriptor.\n * @interface IOneOf\n * @property {Array.} oneof Oneof field names\n * @property {Object.} [options] Oneof options\n */\n\n/**\n * Constructs a oneof from a oneof descriptor.\n * @param {string} name Oneof name\n * @param {IOneOf} json Oneof descriptor\n * @returns {OneOf} Created oneof\n * @throws {TypeError} If arguments are invalid\n */\nOneOf.fromJSON = function fromJSON(name, json) {\n return new OneOf(name, json.oneof, json.options, json.comment);\n};\n\n/**\n * Converts this oneof to a oneof descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IOneOf} Oneof descriptor\n */\nOneOf.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"oneof\" , this.oneof,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Adds the fields of the specified oneof to the parent if not already done so.\n * @param {OneOf} oneof The oneof\n * @returns {undefined}\n * @inner\n * @ignore\n */\nfunction addFieldsToParent(oneof) {\n if (oneof.parent)\n for (var i = 0; i < oneof.fieldsArray.length; ++i)\n if (!oneof.fieldsArray[i].parent)\n oneof.parent.add(oneof.fieldsArray[i]);\n}\n\n/**\n * Adds a field to this oneof and removes it from its current parent, if any.\n * @param {Field} field Field to add\n * @returns {OneOf} `this`\n */\nOneOf.prototype.add = function add(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n if (field.parent && field.parent !== this.parent)\n field.parent.remove(field);\n this.oneof.push(field.name);\n this.fieldsArray.push(field);\n field.partOf = this; // field.parent remains null\n addFieldsToParent(this);\n return this;\n};\n\n/**\n * Removes a field from this oneof and puts it back to the oneof's parent.\n * @param {Field} field Field to remove\n * @returns {OneOf} `this`\n */\nOneOf.prototype.remove = function remove(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n var index = this.fieldsArray.indexOf(field);\n\n /* istanbul ignore if */\n if (index < 0)\n throw Error(field + \" is not a member of \" + this);\n\n this.fieldsArray.splice(index, 1);\n index = this.oneof.indexOf(field.name);\n\n /* istanbul ignore else */\n if (index > -1) // theoretical\n this.oneof.splice(index, 1);\n\n field.partOf = null;\n return this;\n};\n\n/**\n * @override\n */\nOneOf.prototype.onAdd = function onAdd(parent) {\n ReflectionObject.prototype.onAdd.call(this, parent);\n var self = this;\n // Collect present fields\n for (var i = 0; i < this.oneof.length; ++i) {\n var field = parent.get(this.oneof[i]);\n if (field && !field.partOf) {\n field.partOf = self;\n self.fieldsArray.push(field);\n }\n }\n // Add not yet present fields\n addFieldsToParent(this);\n};\n\n/**\n * @override\n */\nOneOf.prototype.onRemove = function onRemove(parent) {\n for (var i = 0, field; i < this.fieldsArray.length; ++i)\n if ((field = this.fieldsArray[i]).parent)\n field.parent.remove(field);\n ReflectionObject.prototype.onRemove.call(this, parent);\n};\n\n/**\n * Determines whether this field corresponds to a synthetic oneof created for\n * a proto3 optional field. No behavioral logic should depend on this, but it\n * can be relevant for reflection.\n * @name OneOf#isProto3Optional\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(OneOf.prototype, \"isProto3Optional\", {\n get: function() {\n if (this.fieldsArray == null || this.fieldsArray.length !== 1) {\n return false;\n }\n\n var field = this.fieldsArray[0];\n return field.options != null && field.options[\"proto3_optional\"] === true;\n }\n});\n\n/**\n * Decorator function as returned by {@link OneOf.d} (TypeScript).\n * @typedef OneOfDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} oneofName OneOf name\n * @returns {undefined}\n */\n\n/**\n * OneOf decorator (TypeScript).\n * @function\n * @param {...string} fieldNames Field names\n * @returns {OneOfDecorator} Decorator function\n * @template T extends string\n */\nOneOf.d = function decorateOneOf() {\n var fieldNames = new Array(arguments.length),\n index = 0;\n while (index < arguments.length)\n fieldNames[index] = arguments[index++];\n return function oneOfDecorator(prototype, oneofName) {\n util.decorateType(prototype.constructor)\n .add(new OneOf(oneofName, fieldNames));\n Object.defineProperty(prototype, oneofName, {\n get: util.oneOfGetter(fieldNames),\n set: util.oneOfSetter(fieldNames)\n });\n };\n};\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(38);\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Recursion limit.\n * @type {number}\n */\nReader.recursionLimit = util.recursionLimit;\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @param {number} [depth] Depth of recursion to control nested calls; 0 if omitted\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType, depth) {\n if (depth === undefined) depth = 0;\n if (depth > Reader.recursionLimit)\n throw Error(\"maximum nesting depth exceeded\");\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType, depth + 1);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(26);\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(38);\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = Root;\n\n// extends Namespace\nvar Namespace = require(23);\n((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = \"Root\";\n\nvar Field = require(17),\n Enum = require(16),\n OneOf = require(25),\n util = require(35);\n\nvar Type, // cyclic\n parse, // might be excluded\n common; // \"\n\n/**\n * Constructs a new root namespace instance.\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\n * @extends NamespaceBase\n * @constructor\n * @param {Object.} [options] Top level options\n */\nfunction Root(options) {\n Namespace.call(this, \"\", options);\n\n /**\n * Deferred extension fields.\n * @type {Field[]}\n */\n this.deferred = [];\n\n /**\n * Resolved file names of loaded files.\n * @type {string[]}\n */\n this.files = [];\n\n /**\n * Edition, defaults to proto2 if unspecified.\n * @type {string}\n * @private\n */\n this._edition = \"proto2\";\n\n /**\n * Global lookup cache of fully qualified names.\n * @type {Object.}\n * @private\n */\n this._fullyQualifiedObjects = {};\n}\n\n/**\n * Loads a namespace descriptor into a root namespace.\n * @param {INamespace} json Namespace descriptor\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Root} Root namespace\n */\nRoot.fromJSON = function fromJSON(json, root, depth) {\n depth = util.checkDepth(depth);\n if (!root)\n root = new Root();\n if (json.options)\n root.setOptions(json.options);\n return root.addJSON(json.nested, depth).resolveAll();\n};\n\n/**\n * Resolves the path of an imported file, relative to the importing origin.\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\n * @function\n * @param {string} origin The file name of the importing file\n * @param {string} target The file name being imported\n * @returns {string|null} Resolved path to `target` or `null` to skip the file\n */\nRoot.prototype.resolvePath = util.path.resolve;\n\n/**\n * Fetch content from file path or url\n * This method exists so you can override it with your own logic.\n * @function\n * @param {string} path File path or url\n * @param {FetchCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.fetch = util.fetch;\n\n// A symbol-like function to safely signal synchronous loading\n/* istanbul ignore next */\nfunction SYNC() {} // eslint-disable-line no-empty-function\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} options Parse options\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.load = function load(filename, options, callback) {\n if (typeof options === \"function\") {\n callback = options;\n options = undefined;\n }\n var self = this;\n if (!callback) {\n return util.asPromise(load, self, filename, options);\n }\n\n var sync = callback === SYNC; // undocumented\n\n // Finishes loading by calling the callback (exactly once)\n function finish(err, root) {\n /* istanbul ignore if */\n if (!callback) {\n return;\n }\n if (sync) {\n throw err;\n }\n if (root) {\n root.resolveAll();\n }\n var cb = callback;\n callback = null;\n cb(err, root);\n }\n\n // Bundled definition existence checking\n function getBundledFileName(filename) {\n var idx = filename.lastIndexOf(\"google/protobuf/\");\n if (idx > -1) {\n var altname = filename.substring(idx);\n if (altname in common) return altname;\n }\n return null;\n }\n\n // Processes a single file\n function process(filename, source, depth) {\n if (depth === undefined)\n depth = 0;\n try {\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n if (util.isString(source) && source.charAt(0) === \"{\")\n source = JSON.parse(source);\n if (!util.isString(source))\n self.setOptions(source.options).addJSON(source.nested);\n else {\n parse.filename = filename;\n var parsed = parse(source, self, options),\n resolved,\n i = 0;\n if (parsed.imports)\n for (; i < parsed.imports.length; ++i)\n if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i]))\n fetch(resolved, false, depth + 1);\n if (parsed.weakImports)\n for (i = 0; i < parsed.weakImports.length; ++i)\n if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i]))\n fetch(resolved, true, depth + 1);\n }\n } catch (err) {\n finish(err);\n }\n if (!sync && !queued) {\n finish(null, self); // only once anyway\n }\n }\n\n // Fetches a single file\n function fetch(filename, weak, depth) {\n if (depth === undefined)\n depth = 0;\n filename = getBundledFileName(filename) || filename;\n\n // Skip if already loaded / attempted\n if (self.files.indexOf(filename) > -1) {\n return;\n }\n self.files.push(filename);\n\n // Shortcut bundled definitions\n if (filename in common) {\n if (sync) {\n process(filename, common[filename], depth);\n } else {\n ++queued;\n setTimeout(function() {\n --queued;\n process(filename, common[filename], depth);\n });\n }\n return;\n }\n\n // Otherwise fetch from disk or network\n if (sync) {\n var source;\n try {\n source = util.fs.readFileSync(filename).toString(\"utf8\");\n } catch (err) {\n if (!weak)\n finish(err);\n return;\n }\n process(filename, source, depth);\n } else {\n ++queued;\n self.fetch(filename, function(err, source) {\n --queued;\n /* istanbul ignore if */\n if (!callback) {\n return; // terminated meanwhile\n }\n if (err) {\n /* istanbul ignore else */\n if (!weak)\n finish(err);\n else if (!queued) // can't be covered reliably\n finish(null, self);\n return;\n }\n process(filename, source, depth);\n });\n }\n }\n var queued = 0;\n\n // Assembling the root namespace doesn't require working type\n // references anymore, so we can load everything in parallel\n if (util.isString(filename)) {\n filename = [ filename ];\n }\n for (var i = 0, resolved; i < filename.length; ++i)\n if (resolved = self.resolvePath(\"\", filename[i]))\n fetch(resolved);\n if (sync) {\n self.resolveAll();\n return self;\n }\n if (!queued) {\n finish(null, self);\n }\n\n return self;\n};\n// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Promise} Promise\n * @variation 3\n */\n// function load(filename:string, [options:IParseOptions]):Promise\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only).\n * @function Root#loadSync\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n */\nRoot.prototype.loadSync = function loadSync(filename, options) {\n if (!util.isNode)\n throw Error(\"not supported\");\n return this.load(filename, options, SYNC);\n};\n\n/**\n * @override\n */\nRoot.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n if (this.deferred.length)\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\n }).join(\", \"));\n return Namespace.prototype.resolveAll.call(this);\n};\n\n// only uppercased (and thus conflict-free) children are exposed, see below\nvar exposeRe = /^[A-Z]/;\n\n/**\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\n * @param {Root} root Root instance\n * @param {Field} field Declaring extension field witin the declaring type\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\n * @inner\n * @ignore\n */\nfunction tryHandleExtension(root, field) {\n var extendedType = field.parent.lookup(field.extend);\n if (extendedType) {\n var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options);\n //do not allow to extend same field twice to prevent the error\n if (extendedType.get(sisterField.name)) {\n return true;\n }\n sisterField.declaringField = field;\n field.extensionField = sisterField;\n extendedType.add(sisterField);\n return true;\n }\n return false;\n}\n\n/**\n * Called when any object is added to this root or its sub-namespaces.\n * @param {ReflectionObject} object Object added\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleAdd = function _handleAdd(object) {\n if (object instanceof Field) {\n\n if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField)\n if (!tryHandleExtension(this, object))\n this.deferred.push(object);\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n object.parent[object.name] = object.values; // expose enum values as property of its parent\n\n } else if (!(object instanceof OneOf)) /* everything else is a namespace */ {\n\n if (object instanceof Type) // Try to handle any deferred extensions\n for (var i = 0; i < this.deferred.length;)\n if (tryHandleExtension(this, this.deferred[i]))\n this.deferred.splice(i, 1);\n else\n ++i;\n for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace\n this._handleAdd(object._nestedArray[j]);\n if (exposeRe.test(object.name))\n object.parent[object.name] = object; // expose namespace as property of its parent\n }\n\n if (object instanceof Type || object instanceof Enum || object instanceof Field) {\n // Only store types and enums for quick lookup during resolve.\n this._fullyQualifiedObjects[object.fullName] = object;\n }\n\n // The above also adds uppercased (and thus conflict-free) nested types, services and enums as\n // properties of namespaces just like static code does. This allows using a .d.ts generated for\n // a static module with reflection-based solutions where the condition is met.\n};\n\n/**\n * Called when any object is removed from this root or its sub-namespaces.\n * @param {ReflectionObject} object Object removed\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleRemove = function _handleRemove(object) {\n if (object instanceof Field) {\n\n if (/* an extension field */ object.extend !== undefined) {\n if (/* already handled */ object.extensionField) { // remove its sister field\n object.extensionField.parent.remove(object.extensionField);\n object.extensionField = null;\n } else { // cancel the extension\n var index = this.deferred.indexOf(object);\n /* istanbul ignore else */\n if (index > -1)\n this.deferred.splice(index, 1);\n }\n }\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose enum values\n\n } else if (object instanceof Namespace) {\n\n for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace\n this._handleRemove(object._nestedArray[i]);\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose namespaces\n\n }\n\n delete this._fullyQualifiedObjects[object.fullName];\n};\n\n// Sets up cyclic dependencies (called in index-light)\nRoot._configure = function(Type_, parse_, common_) {\n Type = Type_;\n parse = parse_;\n common = common_;\n};\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(31);\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(38);\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = Service;\n\n// extends Namespace\nvar Namespace = require(23);\n((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = \"Service\";\n\nvar Method = require(22),\n util = require(35),\n rpc = require(30);\n\nvar reservedRe = util.patterns.reservedRe;\n\n/**\n * Constructs a new service instance.\n * @classdesc Reflected service.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Service name\n * @param {Object.} [options] Service options\n * @throws {TypeError} If arguments are invalid\n */\nfunction Service(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Service methods.\n * @type {Object.}\n */\n this.methods = {}; // toJSON, marker\n\n /**\n * Cached methods as an array.\n * @type {Method[]|null}\n * @private\n */\n this._methodsArray = null;\n}\n\n/**\n * Service descriptor.\n * @interface IService\n * @extends INamespace\n * @property {Object.} methods Method descriptors\n */\n\n/**\n * Constructs a service from a service descriptor.\n * @param {string} name Service name\n * @param {IService} json Service descriptor\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Service} Created service\n * @throws {TypeError} If arguments are invalid\n */\nService.fromJSON = function fromJSON(name, json, depth) {\n depth = util.checkDepth(depth);\n var service = new Service(name, json.options);\n /* istanbul ignore else */\n if (json.methods)\n for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i)\n service.add(Method.fromJSON(names[i], json.methods[names[i]]));\n if (json.nested)\n service.addJSON(json.nested, depth);\n if (json.edition)\n service._edition = json.edition;\n service.comment = json.comment;\n service._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return service;\n};\n\n/**\n * Converts this service to a service descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IService} Service descriptor\n */\nService.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"options\" , inherited && inherited.options || undefined,\n \"methods\" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {},\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Methods of this service as an array for iteration.\n * @name Service#methodsArray\n * @type {Method[]}\n * @readonly\n */\nObject.defineProperty(Service.prototype, \"methodsArray\", {\n get: function() {\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\n }\n});\n\nfunction clearCache(service) {\n service._methodsArray = null;\n return service;\n}\n\n/**\n * @override\n */\nService.prototype.get = function get(name) {\n return Object.prototype.hasOwnProperty.call(this.methods, name)\n ? this.methods[name]\n : Namespace.prototype.get.call(this, name);\n};\n\n/**\n * @override\n */\nService.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n Namespace.prototype.resolve.call(this);\n var methods = this.methodsArray;\n for (var i = 0; i < methods.length; ++i)\n methods[i].resolve();\n return this;\n};\n\n/**\n * @override\n */\nService.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n if (!this._needsRecursiveFeatureResolution) return this;\n\n edition = this._edition || edition;\n\n Namespace.prototype._resolveFeaturesRecursive.call(this, edition);\n this.methodsArray.forEach(method => {\n method._resolveFeaturesRecursive(edition);\n });\n return this;\n};\n\n/**\n * @override\n */\nService.prototype.add = function add(object) {\n /* istanbul ignore if */\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Method) {\n if (object.name === \"__proto__\")\n return this;\n this.methods[object.name] = object;\n object.parent = this;\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * @override\n */\nService.prototype.remove = function remove(object) {\n if (object instanceof Method) {\n\n /* istanbul ignore if */\n if (this.methods[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.methods[object.name];\n object.parent = null;\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Creates a runtime service using the specified rpc implementation.\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed.\n */\nService.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited);\n for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) {\n var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\\w_]/g, \"\");\n rpcService[methodName] = util.codegen([\"r\",\"c\"], reservedRe.test(methodName) ? methodName + \"_\" : methodName)(\"return this.rpcCall(m,q,s,r,c)\")({\n m: method,\n q: method.resolvedRequestType.ctor,\n s: method.resolvedResponseType.ctor\n });\n }\n return rpcService;\n};\n","\"use strict\";\nmodule.exports = Type;\n\n// extends Namespace\nvar Namespace = require(23);\n((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = \"Type\";\n\nvar Enum = require(16),\n OneOf = require(25),\n Field = require(17),\n MapField = require(20),\n Service = require(32),\n Message = require(21),\n Reader = require(26),\n Writer = require(42),\n util = require(35),\n encoder = require(15),\n decoder = require(14),\n verifier = require(40),\n converter = require(13),\n wrappers = require(41);\n\n/**\n * Constructs a new reflected message type instance.\n * @classdesc Reflected message type.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Message name\n * @param {Object.} [options] Declared options\n */\nfunction Type(name, options) {\n name = name.replace(/\\W/g, \"\");\n Namespace.call(this, name, options);\n\n /**\n * Message fields.\n * @type {Object.}\n */\n this.fields = {}; // toJSON, marker\n\n /**\n * Oneofs declared within this namespace, if any.\n * @type {Object.}\n */\n this.oneofs = undefined; // toJSON\n\n /**\n * Extension ranges, if any.\n * @type {number[][]}\n */\n this.extensions = undefined; // toJSON\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n /*?\n * Whether this type is a legacy group.\n * @type {boolean|undefined}\n */\n this.group = undefined; // toJSON\n\n /**\n * Cached fields by id.\n * @type {Object.|null}\n * @private\n */\n this._fieldsById = null;\n\n /**\n * Cached fields as an array.\n * @type {Field[]|null}\n * @private\n */\n this._fieldsArray = null;\n\n /**\n * Cached oneofs as an array.\n * @type {OneOf[]|null}\n * @private\n */\n this._oneofsArray = null;\n\n /**\n * Cached constructor.\n * @type {Constructor<{}>}\n * @private\n */\n this._ctor = null;\n}\n\nObject.defineProperties(Type.prototype, {\n\n /**\n * Message fields by id.\n * @name Type#fieldsById\n * @type {Object.}\n * @readonly\n */\n fieldsById: {\n get: function() {\n\n /* istanbul ignore if */\n if (this._fieldsById)\n return this._fieldsById;\n\n this._fieldsById = {};\n for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) {\n var field = this.fields[names[i]],\n id = field.id;\n\n /* istanbul ignore if */\n if (this._fieldsById[id])\n throw Error(\"duplicate id \" + id + \" in \" + this);\n\n this._fieldsById[id] = field;\n }\n return this._fieldsById;\n }\n },\n\n /**\n * Fields of this message as an array for iteration.\n * @name Type#fieldsArray\n * @type {Field[]}\n * @readonly\n */\n fieldsArray: {\n get: function() {\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\n }\n },\n\n /**\n * Oneofs of this message as an array for iteration.\n * @name Type#oneofsArray\n * @type {OneOf[]}\n * @readonly\n */\n oneofsArray: {\n get: function() {\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\n }\n },\n\n /**\n * The registered constructor, if any registered, otherwise a generic constructor.\n * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor.\n * @name Type#ctor\n * @type {Constructor<{}>}\n */\n ctor: {\n get: function() {\n return this._ctor || (this.ctor = Type.generateConstructor(this)());\n },\n set: function(ctor) {\n\n // Ensure proper prototype\n var prototype = ctor.prototype;\n if (!(prototype instanceof Message)) {\n (ctor.prototype = new Message()).constructor = ctor;\n util.merge(ctor.prototype, prototype);\n }\n\n // Classes and messages reference their reflected type\n ctor.$type = ctor.prototype.$type = this;\n\n // Mix in static methods\n util.merge(ctor, Message, true);\n\n this._ctor = ctor;\n\n // Messages have non-enumerable default values on their prototype\n var i = 0;\n for (; i < /* initializes */ this.fieldsArray.length; ++i)\n this._fieldsArray[i].resolve(); // ensures a proper value\n\n // Messages have non-enumerable getters and setters for each virtual oneof field\n var ctorProperties = {};\n for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i)\n ctorProperties[this._oneofsArray[i].resolve().name] = {\n get: util.oneOfGetter(this._oneofsArray[i].oneof),\n set: util.oneOfSetter(this._oneofsArray[i].oneof)\n };\n if (i)\n Object.defineProperties(ctor.prototype, ctorProperties);\n }\n }\n});\n\n/**\n * Generates a constructor function for the specified type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nType.generateConstructor = function generateConstructor(mtype) {\n /* eslint-disable no-unexpected-multiline */\n var gen = util.codegen([\"p\"], mtype.name);\n // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype\n for (var i = 0, field; i < mtype.fieldsArray.length; ++i)\n if ((field = mtype._fieldsArray[i]).map) gen\n (\"this%s={}\", util.safeProp(field.name));\n else if (field.repeated) gen\n (\"this%s=[]\", util.safeProp(field.name));\n return gen\n (\"if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors\n * @property {Object.} fields Field descriptors\n * @property {number[][]} [extensions] Extension ranges\n * @property {Array.} [reserved] Reserved ranges\n * @property {boolean} [group=false] Whether a legacy group or not\n */\n\n/**\n * Creates a message type from a message type descriptor.\n * @param {string} name Message name\n * @param {IType} json Message type descriptor\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Type} Created message type\n */\nType.fromJSON = function fromJSON(name, json, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.nestingLimit)\n throw Error(\"max depth exceeded\");\n var type = new Type(name, json.options);\n type.extensions = json.extensions;\n type.reserved = json.reserved;\n var names = Object.keys(json.fields),\n i = 0;\n for (; i < names.length; ++i)\n type.add(\n ( typeof json.fields[names[i]].keyType !== \"undefined\"\n ? MapField.fromJSON\n : Field.fromJSON )(names[i], json.fields[names[i]])\n );\n if (json.oneofs)\n for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i)\n type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]]));\n if (json.nested)\n for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) {\n var nested = json.nested[names[i]];\n type.add( // most to least likely\n ( nested.id !== undefined\n ? Field.fromJSON\n : nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : Namespace.fromJSON )(names[i], nested, depth + 1)\n );\n }\n if (json.extensions && json.extensions.length)\n type.extensions = json.extensions;\n if (json.reserved && json.reserved.length)\n type.reserved = json.reserved;\n if (json.group)\n type.group = true;\n if (json.comment)\n type.comment = json.comment;\n if (json.edition)\n type._edition = json.edition;\n type._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return type;\n};\n\n/**\n * Converts this message type to a message type descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IType} Message type descriptor\n */\nType.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"options\" , inherited && inherited.options || undefined,\n \"oneofs\" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions),\n \"fields\" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {},\n \"extensions\" , this.extensions && this.extensions.length ? this.extensions : undefined,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"group\" , this.group || undefined,\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nType.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n Namespace.prototype.resolveAll.call(this);\n var oneofs = this.oneofsArray; i = 0;\n while (i < oneofs.length)\n oneofs[i++].resolve();\n var fields = this.fieldsArray, i = 0;\n while (i < fields.length)\n fields[i++].resolve();\n return this;\n};\n\n/**\n * @override\n */\nType.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n if (!this._needsRecursiveFeatureResolution) return this;\n\n edition = this._edition || edition;\n\n Namespace.prototype._resolveFeaturesRecursive.call(this, edition);\n this.oneofsArray.forEach(oneof => {\n oneof._resolveFeatures(edition);\n });\n this.fieldsArray.forEach(field => {\n field._resolveFeatures(edition);\n });\n return this;\n};\n\n/**\n * @override\n */\nType.prototype.get = function get(name) {\n if (Object.prototype.hasOwnProperty.call(this.fields, name))\n return this.fields[name];\n if (this.oneofs && Object.prototype.hasOwnProperty.call(this.oneofs, name))\n return this.oneofs[name];\n if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name))\n return this.nested[name];\n return null;\n};\n\n/**\n * Adds a nested object to this type.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\n */\nType.prototype.add = function add(object) {\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Field && object.extend === undefined) {\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\n // The root object takes care of adding distinct sister-fields to the respective extended\n // type instead.\n\n // avoids calling the getter if not absolutely necessary because it's called quite frequently\n if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id])\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\n if (this.isReservedId(object.id))\n throw Error(\"id \" + object.id + \" is reserved in \" + this);\n if (this.isReservedName(object.name))\n throw Error(\"name '\" + object.name + \"' is reserved in \" + this);\n if (object.name === \"__proto__\")\n return this;\n\n if (object.parent)\n object.parent.remove(object);\n this.fields[object.name] = object;\n object.message = this;\n object.onAdd(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n if (object.name === \"__proto__\")\n return this;\n if (!this.oneofs)\n this.oneofs = {};\n this.oneofs[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * Removes a nested object from this type.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this type\n */\nType.prototype.remove = function remove(object) {\n if (object instanceof Field && object.extend === undefined) {\n // See Type#add for the reason why extension fields are excluded here.\n\n /* istanbul ignore if */\n if (!this.fields || this.fields[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.fields[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n\n /* istanbul ignore if */\n if (!this.oneofs || this.oneofs[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.oneofs[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message<{}>} Message instance\n */\nType.prototype.create = function create(properties) {\n return new this.ctor(properties);\n};\n\n/**\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\n * @returns {Type} `this`\n */\nType.prototype.setup = function setup() {\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\n // multiple times (V8, soft-deopt prototype-check).\n\n var fullName = this.fullName,\n types = [];\n for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i)\n types.push(this._fieldsArray[i].resolve().resolvedType);\n\n // Replace setup methods with type-specific generated functions\n this.encode = encoder(this)({\n Writer : Writer,\n types : types,\n util : util\n });\n this.decode = decoder(this)({\n Reader : Reader,\n types : types,\n util : util\n });\n this.verify = verifier(this)({\n types : types,\n util : util\n });\n this.fromObject = converter.fromObject(this)({\n types : types,\n util : util\n });\n this.toObject = converter.toObject(this)({\n types : types,\n util : util\n });\n\n // Inject custom wrappers for common types\n var wrapper = wrappers[fullName];\n if (wrapper) {\n var originalThis = Object.create(this);\n // if (wrapper.fromObject) {\n originalThis.fromObject = this.fromObject;\n this.fromObject = wrapper.fromObject.bind(originalThis);\n // }\n // if (wrapper.toObject) {\n originalThis.toObject = this.toObject;\n this.toObject = wrapper.toObject.bind(originalThis);\n // }\n }\n\n return this;\n};\n\n/**\n * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encode = function encode_setup(message, writer) { // eslint-disable-line no-unused-vars\n return this.setup().encode.apply(this, arguments); // overrides this method\n};\n\n/**\n * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\n};\n\n/**\n * Decodes a message of this type.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Length of the message, if known beforehand\n * @param {number} [end] Expected group end tag, if decoding a group\n * @param {number} [depth] Current nesting depth\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError<{}>} If required fields are missing\n */\nType.prototype.decode = function decode_setup(reader, length, end, depth) {\n return this.setup().decode(reader, length, end, depth); // overrides this method\n};\n\n/**\n * Decodes a message of this type preceeded by its byte length as a varint.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError} If required fields are missing\n */\nType.prototype.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof Reader))\n reader = Reader.create(reader);\n return this.decode(reader, reader.uint32());\n};\n\n/**\n * Verifies that field values are valid and that required fields are present.\n * @param {Object.} message Plain object to verify\n * @param {number} [depth] Current nesting depth\n * @returns {null|string} `null` if valid, otherwise the reason why it is not\n */\nType.prototype.verify = function verify_setup(message, depth) {\n return this.setup().verify(message, depth); // overrides this method\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object to convert\n * @param {number} [depth] Current nesting depth\n * @returns {Message<{}>} Message instance\n */\nType.prototype.fromObject = function fromObject(object, depth) {\n return this.setup().fromObject(object, depth);\n};\n\n/**\n * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}.\n * @interface IConversionOptions\n * @property {Function} [longs] Long conversion type.\n * Valid values are `BigInt`, `String` and `Number` (the global types).\n * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library.\n * @property {Function} [enums] Enum value conversion type.\n * Only valid value is `String` (the global type).\n * Defaults to copy the present value, which is the numeric id.\n * @property {Function} [bytes] Bytes value conversion type.\n * Valid values are `Array` and (a base64 encoded) `String` (the global types).\n * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser.\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\n * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\n * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false`\n * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any\n * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings\n */\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\nType.prototype.toObject = function toObject(message, options) { // eslint-disable-line no-unused-vars\n return this.setup().toObject.apply(this, arguments);\n};\n\n/**\n * Decorator function as returned by {@link Type.d} (TypeScript).\n * @typedef TypeDecorator\n * @type {function}\n * @param {Constructor} target Target constructor\n * @returns {undefined}\n * @template T extends Message\n */\n\n/**\n * Type decorator (TypeScript).\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {TypeDecorator} Decorator function\n * @template T extends Message\n */\nType.d = function decorateType(typeName) {\n return function typeDecorator(target) {\n util.decorateType(target, typeName);\n };\n};\n","\"use strict\";\n\n/**\n * Common type constants.\n * @namespace\n */\nvar types = exports;\n\nvar util = require(35);\n\nvar s = [\n \"double\", // 0\n \"float\", // 1\n \"int32\", // 2\n \"uint32\", // 3\n \"sint32\", // 4\n \"fixed32\", // 5\n \"sfixed32\", // 6\n \"int64\", // 7\n \"uint64\", // 8\n \"sint64\", // 9\n \"fixed64\", // 10\n \"sfixed64\", // 11\n \"bool\", // 12\n \"string\", // 13\n \"bytes\" // 14\n];\n\nfunction bake(values, offset) {\n var i = 0, o = Object.create(null);\n offset |= 0;\n while (i < values.length) o[s[i + offset]] = values[i++];\n return o;\n}\n\n/**\n * Basic type wire types.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n * @property {number} bytes=2 Ldelim wire type\n */\ntypes.basic = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2,\n /* bytes */ 2\n]);\n\n/**\n * Basic type defaults.\n * @type {Object.}\n * @const\n * @property {number} double=0 Double default\n * @property {number} float=0 Float default\n * @property {number} int32=0 Int32 default\n * @property {number} uint32=0 Uint32 default\n * @property {number} sint32=0 Sint32 default\n * @property {number} fixed32=0 Fixed32 default\n * @property {number} sfixed32=0 Sfixed32 default\n * @property {number} int64=0 Int64 default\n * @property {number} uint64=0 Uint64 default\n * @property {number} sint64=0 Sint32 default\n * @property {number} fixed64=0 Fixed64 default\n * @property {number} sfixed64=0 Sfixed64 default\n * @property {boolean} bool=false Bool default\n * @property {string} string=\"\" String default\n * @property {Array.} bytes=Array(0) Bytes default\n * @property {null} message=null Message default\n */\ntypes.defaults = bake([\n /* double */ 0,\n /* float */ 0,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 0,\n /* sfixed32 */ 0,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 0,\n /* sfixed64 */ 0,\n /* bool */ false,\n /* string */ \"\",\n /* bytes */ util.emptyArray,\n /* message */ null\n]);\n\n/**\n * Basic long type wire types.\n * @type {Object.}\n * @const\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n */\ntypes.long = bake([\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1\n], 7);\n\n/**\n * Allowed types for map keys with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n */\ntypes.mapKey = bake([\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2\n], 2);\n\n/**\n * Allowed types for packed repeated fields with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n */\ntypes.packed = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0\n]);\n","\"use strict\";\n\n/**\n * Various utility functions.\n * @namespace\n */\nvar util = module.exports = require(38);\n\nvar roots = require(29);\n\nvar Type, // cyclic\n Enum;\n\nutil.codegen = require(3);\nutil.fetch = require(5);\nutil.path = require(9);\nutil.patterns = require(39);\n\nvar reservedRe = util.patterns.reservedRe;\n\n/**\n * Node's fs module if available.\n * @type {Object.}\n */\nutil.fs = require(36);\n\n/**\n * Checks a recursion depth.\n * @param {number|undefined} depth Depth of recursion\n * @returns {number} Depth of recursion\n * @throws {Error} If depth exceeds util.recursionLimit\n */\nutil.checkDepth = function checkDepth(depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n return depth;\n};\n\n/**\n * Converts an object's values to an array.\n * @param {Object.} object Object to convert\n * @returns {Array.<*>} Converted array\n */\nutil.toArray = function toArray(object) {\n if (object) {\n var keys = Object.keys(object),\n array = new Array(keys.length),\n index = 0;\n while (index < keys.length)\n array[index] = object[keys[index++]];\n return array;\n }\n return [];\n};\n\n/**\n * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values.\n * @param {Array.<*>} array Array to convert\n * @returns {Object.} Converted object\n */\nutil.toObject = function toObject(array) {\n var object = {},\n index = 0;\n while (index < array.length) {\n var key = array[index++],\n val = array[index++];\n if (val !== undefined)\n object[key] = val;\n }\n return object;\n};\n\n/**\n * Tests whether the specified name is a reserved word in JS.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nutil.isReserved = function isReserved(name) {\n return reservedRe.test(name);\n};\n\n/**\n * Returns a safe property accessor for the specified property name.\n * @param {string} prop Property name\n * @returns {string} Safe accessor\n */\nutil.safeProp = function safeProp(prop) {\n if (!/^[$\\w_]+$/.test(prop) || reservedRe.test(prop))\n return \"[\" + JSON.stringify(prop) + \"]\";\n return \".\" + prop;\n};\n\n/**\n * Converts the first character of a string to upper case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.ucFirst = function ucFirst(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n\nvar camelCaseRe = /_([a-z])/g;\n\n/**\n * Converts a string to camel case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.camelCase = function camelCase(str) {\n return str.substring(0, 1)\n + str.substring(1)\n .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); });\n};\n\n/**\n * Compares reflected fields by id.\n * @param {Field} a First field\n * @param {Field} b Second field\n * @returns {number} Comparison value\n */\nutil.compareFieldsById = function compareFieldsById(a, b) {\n return a.id - b.id;\n};\n\n/**\n * Decorator helper for types (TypeScript).\n * @param {Constructor} ctor Constructor function\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {Type} Reflected type\n * @template T extends Message\n * @property {Root} root Decorators root\n */\nutil.decorateType = function decorateType(ctor, typeName) {\n\n /* istanbul ignore if */\n if (ctor.$type) {\n if (typeName && ctor.$type.name !== typeName) {\n util.decorateRoot.remove(ctor.$type);\n ctor.$type.name = typeName;\n util.decorateRoot.add(ctor.$type);\n }\n return ctor.$type;\n }\n\n /* istanbul ignore next */\n if (!Type)\n Type = require(33);\n\n var type = new Type(typeName || ctor.name);\n util.decorateRoot.add(type);\n type.ctor = ctor; // sets up .encode, .decode etc.\n Object.defineProperty(ctor, \"$type\", { value: type, enumerable: false });\n Object.defineProperty(ctor.prototype, \"$type\", { value: type, enumerable: false });\n return type;\n};\n\nvar decorateEnumIndex = 0;\n\n/**\n * Decorator helper for enums (TypeScript).\n * @param {Object} object Enum object\n * @returns {Enum} Reflected enum\n */\nutil.decorateEnum = function decorateEnum(object) {\n\n /* istanbul ignore if */\n if (object.$type)\n return object.$type;\n\n /* istanbul ignore next */\n if (!Enum)\n Enum = require(16);\n\n var enm = new Enum(\"Enum\" + decorateEnumIndex++, object);\n util.decorateRoot.add(enm);\n Object.defineProperty(object, \"$type\", { value: enm, enumerable: false });\n return enm;\n};\n\n\n/**\n * Sets the value of a property by property path. If a value already exists, it is turned to an array\n * @param {Object.} dst Destination object\n * @param {string} path dot '.' delimited path of the property to set\n * @param {Object} value the value to set\n * @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {Object.} Destination object\n */\nutil.setProperty = function setProperty(dst, path, value, ifNotSet) {\n function setProp(dst, path, value) {\n var part = path.shift();\n if (util.isUnsafeProperty(part))\n return dst;\n if (path.length > 0) {\n dst[part] = setProp(dst[part] || {}, path, value);\n } else {\n var prevValue = dst[part];\n if (prevValue && ifNotSet)\n return dst;\n if (prevValue)\n value = [].concat(prevValue).concat(value);\n dst[part] = value;\n }\n return dst;\n }\n\n if (typeof dst !== \"object\")\n throw TypeError(\"dst must be an object\");\n if (!path)\n throw TypeError(\"path must be specified\");\n\n path = path.split(\".\");\n if (path.length > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n return setProp(dst, path, value);\n};\n\n/**\n * Decorator root (TypeScript).\n * @name util.decorateRoot\n * @type {Root}\n * @readonly\n */\nObject.defineProperty(util, \"decorateRoot\", {\n get: function() {\n return roots[\"decorated\"] || (roots[\"decorated\"] = new (require(28))());\n }\n});\n","\"use strict\";\n\nvar fs = null;\ntry {\n fs = require(12);\n if (!fs || !fs.readFile || !fs.readFileSync)\n fs = null;\n} catch (e) {\n // `fs` is unavailable in browsers and browser-like bundles.\n}\nmodule.exports = fs;\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(38);\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(1);\n\n// converts to / from base64 encoded strings\nutil.base64 = require(2);\n\n// base class of rpc.Service\nutil.EventEmitter = require(4);\n\n// float handling accross browsers\nutil.float = require(7);\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(8);\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(11);\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(10);\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(37);\n\n/**\n * Tests if the specified key can affect object prototypes.\n * @memberof util\n * @param {string} key Key to test\n * @returns {boolean} `true` if the key is unsafe\n */\nfunction isUnsafeProperty(key) {\n return key === \"__proto__\" || key === \"prototype\" || key === \"constructor\";\n}\n\nutil.isUnsafeProperty = isUnsafeProperty;\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.global.Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || (function() {\n try {\n var Long = require(\"long\");\n return Long && Long.isLong ? Long : null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n })();\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {...(Object.|boolean)} src Source objects, optionally followed by an `ifNotSet` flag\n * @returns {Object.} Destination object\n */\nfunction merge(dst) { // used by converters\n var ifNotSet = typeof arguments[arguments.length - 1] === \"boolean\",\n limit = ifNotSet ? arguments.length - 1 : arguments.length;\n ifNotSet = ifNotSet && arguments[arguments.length - 1];\n for (var a = 1; a < limit; ++a) {\n var src = arguments[a];\n if (!src)\n continue;\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (!isUnsafeProperty(keys[i]) && (dst[keys[i]] === undefined || !ifNotSet))\n dst[keys[i]] = src[keys[i]];\n }\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Schema declaration nesting limit.\n * @memberof util\n * @type {number}\n */\nutil.nestingLimit = 32; // protoc: MaxMessageDeclarationNestingDepth\n\n/**\n * Recursion limit.\n * @memberof util\n * @type {number}\n */\nutil.recursionLimit = 100; // protoc: CodedInputStream::default_recursion_limit_\n\n/**\n * Makes a property safe for assignment as an own property.\n * @memberof util\n * @param {Object.} obj Object\n * @param {string} key Property key\n * @returns {undefined}\n */\nutil.makeProp = function makeProp(obj, key) {\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n writable: true\n });\n};\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\n\nvar patterns = exports;\n\npatterns.numberRe = /^(?![eE])[0-9]*(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/;\npatterns.typeRefRe = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;\npatterns.reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;\n","\"use strict\";\nmodule.exports = verifier;\n\nvar Enum = require(16),\n util = require(35);\n\nfunction invalid(field, expected) {\n return field.name + \": \" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected\";\n}\n\n/**\n * Generates a partial value verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\n /* eslint-disable no-unexpected-multiline */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(%s){\", ref)\n (\"default:\")\n (\"return%j\", invalid(field, \"enum value\"));\n for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen\n (\"case %i:\", field.resolvedType.values[keys[j]]);\n gen\n (\"break\")\n (\"}\");\n } else {\n gen\n (\"{\")\n (\"var e=types[%i].verify(%s,n+1);\", fieldIndex, ref)\n (\"if(e)\")\n (\"return%j+e\", field.name + \".\")\n (\"}\");\n }\n } else {\n switch (field.type) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.isInteger(%s))\", ref)\n (\"return%j\", invalid(field, \"integer\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\n (\"return%j\", invalid(field, \"integer|Long\"));\n break;\n case \"float\":\n case \"double\": gen\n (\"if(typeof %s!==\\\"number\\\")\", ref)\n (\"return%j\", invalid(field, \"number\"));\n break;\n case \"bool\": gen\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\n (\"return%j\", invalid(field, \"boolean\"));\n break;\n case \"string\": gen\n (\"if(!util.isString(%s))\", ref)\n (\"return%j\", invalid(field, \"string\"));\n break;\n case \"bytes\": gen\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\n (\"return%j\", invalid(field, \"buffer\"));\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a partial key verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyKey(gen, field, ref) {\n /* eslint-disable no-unexpected-multiline */\n switch (field.keyType) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.key32Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"integer key\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.key64Re.test(%s))\", ref) // see comment above: x is ok, d is not\n (\"return%j\", invalid(field, \"integer|Long key\"));\n break;\n case \"bool\": gen\n (\"if(!util.key2Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"boolean key\"));\n break;\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a verifier specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction verifier(mtype) {\n /* eslint-disable no-unexpected-multiline */\n\n var gen = util.codegen([\"m\", \"n\"], mtype.name + \"$verify\")\n (\"if(typeof m!==\\\"object\\\"||m===null)\")\n (\"return%j\", \"object expected\")\n (\"if(n===undefined)n=0\")\n (\"if(n>util.recursionLimit)\")\n (\"return%j\", \"maximum nesting depth exceeded\");\n var oneofs = mtype.oneofsArray,\n seenFirstField = {};\n if (oneofs.length) gen\n (\"var p={}\");\n\n for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n ref = \"m\" + util.safeProp(field.name);\n\n if (field.optional) gen\n (\"if(%s!=null&&m.hasOwnProperty(%j)){\", ref, field.name); // !== undefined && !== null\n\n // map fields\n if (field.map) { gen\n (\"if(!util.isObject(%s))\", ref)\n (\"return%j\", invalid(field, \"object\"))\n (\"var k=Object.keys(%s)\", ref)\n (\"for(var i=0;i}\n * @const\n */\nvar wrappers = exports;\n\nvar Message = require(21),\n util = require(38);\n\n/**\n * From object converter part of an {@link IWrapper}.\n * @typedef WrapperFromObjectConverter\n * @type {function}\n * @param {Object.} object Plain object\n * @returns {Message<{}>} Message instance\n * @this Type\n */\n\n/**\n * To object converter part of an {@link IWrapper}.\n * @typedef WrapperToObjectConverter\n * @type {function}\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @this Type\n */\n\n/**\n * Common type wrapper part of {@link wrappers}.\n * @interface IWrapper\n * @property {WrapperFromObjectConverter} [fromObject] From object converter\n * @property {WrapperToObjectConverter} [toObject] To object converter\n */\n\n// Custom wrapper for Any\nwrappers[\".google.protobuf.Any\"] = {\n\n fromObject: function(object, depth) {\n\n // unwrap value type if mapped\n if (object && object[\"@type\"]) {\n // Only use fully qualified type name after the last '/'\n var name = object[\"@type\"].substring(object[\"@type\"].lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type) {\n // type_url does not accept leading \".\"\n var type_url = object[\"@type\"].charAt(0) === \".\" ?\n object[\"@type\"].slice(1) : object[\"@type\"];\n // type_url prefix is optional, but path seperator is required\n if (type_url.indexOf(\"/\") === -1) {\n type_url = \"/\" + type_url;\n }\n return this.create({\n type_url: type_url,\n value: type.encode(type.fromObject(object, depth === undefined ? 1 : depth + 1)).finish()\n });\n }\n }\n\n return this.fromObject(object, depth);\n },\n\n toObject: function(message, options, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n\n // Default prefix\n var googleApi = \"type.googleapis.com/\";\n var prefix = \"\";\n var name = \"\";\n\n // decode value if requested and unmapped\n if (options && options.json && message.type_url && message.value) {\n // Only use fully qualified type name after the last '/'\n name = message.type_url.substring(message.type_url.lastIndexOf(\"/\") + 1);\n // Separate the prefix used\n prefix = message.type_url.substring(0, message.type_url.lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type)\n message = type.decode(message.value, undefined, undefined, depth + 1);\n }\n\n // wrap value if unmapped\n if (!(message instanceof this.ctor) && message instanceof Message) {\n var object = message.$type.toObject(message, options, depth + 1);\n var messageName = message.$type.fullName[0] === \".\" ?\n message.$type.fullName.slice(1) : message.$type.fullName;\n // Default to type.googleapis.com prefix if no prefix is used\n if (prefix === \"\") {\n prefix = googleApi;\n }\n name = prefix + messageName;\n object[\"@type\"] = name;\n return object;\n }\n\n return this.toObject(message, options, depth);\n }\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(38);\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return (value |= 0) < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n var lo = val.lo,\n hi = val.hi;\n while (hi) {\n buf[pos++] = lo & 127 | 128;\n lo = (lo >>> 7 | hi << 25) >>> 0;\n hi >>>= 7;\n }\n while (lo > 127) {\n buf[pos++] = lo & 127 | 128;\n lo = lo >>> 7;\n }\n buf[pos++] = lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(42);\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(38);\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/node_modules/protobufjs/dist/light/protobuf.min.js b/node_modules/protobufjs/dist/light/protobuf.min.js deleted file mode 100644 index 2ee7863..0000000 --- a/node_modules/protobufjs/dist/light/protobuf.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * protobuf.js v7.6.1 (c) 2016, daniel wirtz - * compiled fri, 22 may 2026 02:52:09 utc - * licensed under the bsd-3-clause license - * see: https://github.com/dcodeio/protobuf.js for details - */ -!function(g){"use strict";var r,e,i;r={1:[function(t,i,n){i.exports=function(t,i){var n=Array(arguments.length-1),s=0,r=2,o=!0;for(;r>2],r=(3&h)<<4,u=1;break;case 1:s[o++]=f[r|h>>4],r=(15&h)<<2,u=2;break;case 2:s[o++]=f[r|h>>6],s[o++]=f[63&h],u=0}8191>4,r=u,s=2;break;case 2:i[n++]=(15&r)<<4|(60&u)>>2,r=u,s=3;break;case 3:i[n++]=(3&r)<<6|u,s=0}}if(1===s)throw Error(c);return n-e},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},{}],3:[function(t,i,n){i.exports=a;var r=/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;function a(i,n){"string"==typeof i&&(n=i,i=g);var h=[];function f(t){if("string"!=typeof t){var i=c();if(a.verbose&&console.log("codegen: "+i),i="return "+i,t){for(var n=Object.keys(t),r=Array(n.length+1),e=Array(n.length),s=0;s>>0:i<11754943508222875e-54?(e<<31|Math.round(i/1401298464324817e-60))>>>0:(e<<31|127+(t=Math.floor(Math.log(i)/Math.LN2))<<23|8388607&Math.round(i*Math.pow(2,-t)*8388608))>>>0,n,r)}function n(t,i,n){t=t(i,n),i=2*(t>>31)+1,n=t>>>23&255,t&=8388607;return 255==n?t?NaN:1/0*i:0==n?1401298464324817e-60*i*t:i*Math.pow(2,n-150)*(8388608+t)}function r(t,i,n){u[0]=t,i[n]=h[0],i[n+1]=h[1],i[n+2]=h[2],i[n+3]=h[3]}function e(t,i,n){u[0]=t,i[n]=h[3],i[n+1]=h[2],i[n+2]=h[1],i[n+3]=h[0]}function s(t,i){return h[0]=t[i],h[1]=t[i+1],h[2]=t[i+2],h[3]=t[i+3],u[0]}function o(t,i){return h[3]=t[i],h[2]=t[i+1],h[1]=t[i+2],h[0]=t[i+3],u[0]}var u,h,f,c,a;function l(t,i,n,r,e,s){var o,u=r<0?1:0;0===(r=u?-r:r)?(t(0,e,s+i),t(0<1/r?0:2147483648,e,s+n)):isNaN(r)?(t(0,e,s+i),t(2146959360,e,s+n)):17976931348623157e292>>0,e,s+n)):r<22250738585072014e-324?(t((o=r/5e-324)>>>0,e,s+i),t((u<<31|o/4294967296)>>>0,e,s+n)):(t(4503599627370496*(o=r*Math.pow(2,-(r=1024===(r=Math.floor(Math.log(r)/Math.LN2))?1023:r)))>>>0,e,s+i),t((u<<31|r+1023<<20|1048576*o&1048575)>>>0,e,s+n))}function d(t,i,n,r,e){i=t(r,e+i),t=t(r,e+n),r=2*(t>>31)+1,e=t>>>20&2047,n=4294967296*(1048575&t)+i;return 2047==e?n?NaN:1/0*r:0==e?5e-324*r*n:r*Math.pow(2,e-1075)*(n+4503599627370496)}function p(t,i,n){f[0]=t,i[n]=c[0],i[n+1]=c[1],i[n+2]=c[2],i[n+3]=c[3],i[n+4]=c[4],i[n+5]=c[5],i[n+6]=c[6],i[n+7]=c[7]}function v(t,i,n){f[0]=t,i[n]=c[7],i[n+1]=c[6],i[n+2]=c[5],i[n+3]=c[4],i[n+4]=c[3],i[n+5]=c[2],i[n+6]=c[1],i[n+7]=c[0]}function b(t,i){return c[0]=t[i],c[1]=t[i+1],c[2]=t[i+2],c[3]=t[i+3],c[4]=t[i+4],c[5]=t[i+5],c[6]=t[i+6],c[7]=t[i+7],f[0]}function m(t,i){return c[7]=t[i],c[6]=t[i+1],c[5]=t[i+2],c[4]=t[i+3],c[3]=t[i+4],c[2]=t[i+5],c[1]=t[i+6],c[0]=t[i+7],f[0]}return"undefined"!=typeof Float32Array?(u=new Float32Array([-0]),h=new Uint8Array(u.buffer),a=128===h[3],t.writeFloatLE=a?r:e,t.writeFloatBE=a?e:r,t.readFloatLE=a?s:o,t.readFloatBE=a?o:s):(t.writeFloatLE=i.bind(null,y),t.writeFloatBE=i.bind(null,w),t.readFloatLE=n.bind(null,g),t.readFloatBE=n.bind(null,j)),"undefined"!=typeof Float64Array?(f=new Float64Array([-0]),c=new Uint8Array(f.buffer),a=128===c[7],t.writeDoubleLE=a?p:v,t.writeDoubleBE=a?v:p,t.readDoubleLE=a?b:m,t.readDoubleBE=a?m:b):(t.writeDoubleLE=l.bind(null,y,0,4),t.writeDoubleBE=l.bind(null,w,4,0),t.readDoubleLE=d.bind(null,g,0,4),t.readDoubleBE=d.bind(null,j,4,0)),t}function y(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}function w(t,i,n){i[n]=t>>>24,i[n+1]=t>>>16&255,i[n+2]=t>>>8&255,i[n+3]=255&t}function g(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16|t[i+3]<<24)>>>0}function j(t,i){return(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])>>>0}i.exports=r(r)},{}],8:[function(n,t,i){t.exports=function(t){try{var i;return"function"!=typeof n?null:(i=n(t))&&(i.length||Object.keys(i).length)?i:null}catch(t){return null}}},{}],9:[function(t,i,n){var e=n.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},r=n.normalize=function(t){var i=(t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),n=e(t),t="";n&&(t=i.shift()+"/");for(var r=0;r>>1,s=null,o=r;return function(t){if(t<1||e>10))+String.fromCharCode(56320+(1023&o)))}return r},n.write=function(t,i,n){for(var r,e,s=n,o=0;o>6|192:(55296==(64512&r)&&56320==(64512&(e=t.charCodeAt(o+1)))?(++o,i[n++]=(r=65536+((1023&r)<<10)+(1023&e))>>18|240,i[n++]=r>>12&63|128):i[n++]=r>>12|224,i[n++]=r>>6&63|128),i[n++]=63&r|128);return n-s}},{}],12:[function(t,i,n){},{}],13:[function(t,i,n){var l=t(16),d=t(35);function o(t,i,n,r){var e=!1;if(i.resolvedType)if(i.resolvedType instanceof l){t("switch(d%s){",r);for(var s=i.resolvedType.values,o=Object.keys(s),u=0;u>>0",r,r);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",r,r);break;case"uint64":case"fixed64":h=!0;case"int64":case"sint64":case"sfixed64":t("if(util.Long)")("m%s=util.Long.fromValue(d%s,%j)",r,r,h)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,h?"true":"");break;case"bytes":t('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length >= 0)",r)("m%s=d%s",r,r);break;case"string":t("m%s=String(d%s)",r,r);break;case"bool":t("m%s=Boolean(d%s)",r,r)}}return t}function p(t,i,n,r){if(i.resolvedType)i.resolvedType instanceof l?t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",r,n,r,r,n,r,r):t("d%s=types[%i].toObject(m%s,o,q+1)",r,n,r);else{var e=!1;switch(i.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":case"fixed64":e=!0;case"int64":case"sint64":case"sfixed64":t('if(typeof BigInt!=="undefined"&&o.longs===BigInt)')('d%s=typeof m%s==="number"?BigInt(m%s):util.Long.fromBits(m%s.low>>>0,m%s.high>>>0,%j).toBigInt()',r,r,r,r,r,e)('else if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,e?"true":"",r);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:t("d%s=m%s",r,r)}}return t}n.fromObject=function(t){var i=t.fieldsArray,n=d.codegen(["d","n"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d")("if(n===undefined)n=0")("if(n>util.recursionLimit)")('throw Error("maximum nesting depth exceeded")');if(!i.length)return n("return new this.ctor");n("var m=new this.ctor");for(var r=0;rutil.recursionLimit)")('throw Error("max depth exceeded")')("var d={}"),r=[],e=[],s=[],o=0;oReader.recursionLimit)")('throw Error("maximum nesting depth exceeded")')("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter(function(t){return t.map}).length?",k,value":""))("while(r.pos>>3){"),n=0;n>>3){")("case 1: k=r.%s(); break",r.keyType)("case 2:"),h.basic[e]===g?i("value=types[%i].decode(r,r.uint32(),undefined,n+1)",n):i("value=r.%s()",e),i("break")("default:")("r.skipType(tag2&7,n)")("break")("}")("}"),h.long[r.keyType]!==g?i('%s[typeof k==="object"?util.longToHash(k):k]=value',s):("string"===r.keyType&&i('if(k==="__proto__")')("util.makeProp(%s,k)",s),i("%s[k]=value",s))):r.repeated?(i("if(!(%s&&%s.length))",s,s)("%s=[]",s),h.packed[e]!==g&&i("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.posutil.recursionLimit)")('throw Error("max depth exceeded")'),r=t.fieldsArray.slice().sort(a.compareFieldsById),e=0;e>>0,8|c.mapKey[s.keyType],s.keyType),h===g?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()",o,i):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,u,i),n("}")("}")):s.repeated?(n("if(%s!=null&&%s.length){",i,i),s.packed&&c.packed[u]!==g?n("w.uint32(%i).fork()",(s.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",u,i)("w.ldelim()"):(n("for(var i=0;i<%s.length;++i)",i),h===g?l(n,s,o,i+"[i]"):n("w.uint32(%i).%s(%s[i])",(s.id<<3|h)>>>0,u,i)),n("}")):(s.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,s.name),h===g?l(n,s,o,i):n("w.uint32(%i).%s(%s)",(s.id<<3|h)>>>0,u,i))}return n("return w")};var f=t(16),c=t(34),a=t(35);function l(t,i,n,r){i.delimited?t("types[%i].encode(%s,w.uint32(%i),q+1).uint32(%i)",n,r,(i.id<<3|3)>>>0,(i.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()",n,r,(i.id<<3|2)>>>0)}},{16:16,34:34,35:35}],16:[function(t,i,n){i.exports=s;var h=t(24),r=(((s.prototype=Object.create(h.prototype)).constructor=s).className="Enum",t(23)),e=t(35);function s(t,i,n,r,e,s){if(h.call(this,t,n),i&&"object"!=typeof i)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=r,this.comments=e||{},this.valuesOptions=s,this.n={},this.reserved=g,i)for(var o=Object.keys(i),u=0;u{var i=e.merge({},this.o);this.n[t]=e.merge(i,this.valuesOptions&&this.valuesOptions[t]&&this.valuesOptions[t].features||{})}),this},s.fromJSON=function(t,i){t=new s(t,i.values,i.options,i.comment,i.comments);return t.reserved=i.reserved,i.edition&&(t.e=i.edition),t.u="proto3",t},s.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return e.toObject(["edition",this.h(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:g,"comment",t?this.comment:g,"comments",t?this.comments:g])},s.prototype.add=function(t,i,n,r){if(!e.isString(t))throw TypeError("name must be a string");if(!e.isInteger(i))throw TypeError("id must be an integer");if("__proto__"!==t){if(this.values[t]!==g)throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(i))throw Error("id "+i+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(this.valuesById[i]!==g){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+i+" in "+this);this.values[t]=i}else this.valuesById[this.values[t]=i]=t;r&&(this.valuesOptions===g&&(this.valuesOptions={}),this.valuesOptions[t]=r||null),this.comments[t]=n||null}return this},s.prototype.remove=function(t){if(!e.isString(t))throw TypeError("name must be a string");var i=this.values[t];if(null==i)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[i],delete this.values[t],delete this.comments[t],this.valuesOptions&&delete this.valuesOptions[t],this},s.prototype.isReservedId=function(t){return r.isReservedId(this.reserved,t)},s.prototype.isReservedName=function(t){return r.isReservedName(this.reserved,t)}},{23:23,24:24,35:35}],17:[function(t,i,n){i.exports=o;var r,u=t(24),e=(((o.prototype=Object.create(u.prototype)).constructor=o).className="Field",t(16)),h=t(34),f=t(35),c=/^required|optional|repeated$/;function o(t,i,n,r,e,s,o){if(f.isObject(r)?(o=e,s=r,r=e=g):f.isObject(e)&&(o=s,s=e,e=g),u.call(this,t,s),!f.isInteger(i)||i<0)throw TypeError("id must be a non-negative integer");if(!f.isString(n))throw TypeError("type must be a string");if(r!==g&&!c.test(r=r.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(e!==g&&!f.isString(e))throw TypeError("extend must be a string");this.rule=(r="proto3_optional"===r?"optional":r)&&"optional"!==r?r:g,this.type=n,this.id=i,this.extend=e||g,this.repeated="repeated"===r,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!f.Long&&h.long[n]!==g,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=o}o.fromJSON=function(t,i){t=new o(t,i.id,i.type,i.rule,i.extend,i.options,i.comment);return i.edition&&(t.e=i.edition),t.u="proto3",t},Object.defineProperty(o.prototype,"required",{get:function(){return"LEGACY_REQUIRED"===this.o.field_presence}}),Object.defineProperty(o.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(o.prototype,"delimited",{get:function(){return this.resolvedType instanceof r&&"DELIMITED"===this.o.message_encoding}}),Object.defineProperty(o.prototype,"packed",{get:function(){return"PACKED"===this.o.repeated_field_encoding}}),Object.defineProperty(o.prototype,"hasPresence",{get:function(){return!this.repeated&&!this.map&&(this.partOf||this.declaringField||this.extensionField||"IMPLICIT"!==this.o.field_presence)}}),o.prototype.setOption=function(t,i,n){return u.prototype.setOption.call(this,t,i,n)},o.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return f.toObject(["edition",this.h(),"rule","optional"!==this.rule&&this.rule||g,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:g])},o.prototype.resolve=function(){var t;return this.resolved?this:((this.typeDefault=h.defaults[this.type])===g?(this.resolvedType=(this.declaringField||this).parent.lookupTypeOrEnum(this.type),this.resolvedType instanceof r?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof e&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed===g||!this.resolvedType||this.resolvedType instanceof e||delete this.options.packed,Object.keys(this.options).length||(this.options=g)),this.long?(this.typeDefault=f.Long.fromNumber(this.typeDefault,"uint64"===this.type||"fixed64"===this.type),Object.freeze&&Object.freeze(this.typeDefault)):this.bytes&&"string"==typeof this.typeDefault&&(f.base64.test(this.typeDefault)?f.base64.decode(this.typeDefault,t=f.newBuffer(f.base64.length(this.typeDefault)),0):f.utf8.write(this.typeDefault,t=f.newBuffer(f.utf8.length(this.typeDefault)),0),this.typeDefault=t),this.map?this.defaultValue=f.emptyObject:this.repeated?this.defaultValue=f.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof r&&(this.parent.ctor.prototype[this.name]=this.defaultValue),u.prototype.resolve.call(this))},o.prototype.f=function(t){var i;return"proto2"!==t&&"proto3"!==t?{}:(t={},"required"===this.rule&&(t.field_presence="LEGACY_REQUIRED"),this.parent&&h.defaults[this.type]===g&&(i=this.parent.get(this.type.split(".").pop()))&&i instanceof r&&i.group&&(t.message_encoding="DELIMITED"),!0===this.getOption("packed")?t.repeated_field_encoding="PACKED":!1===this.getOption("packed")&&(t.repeated_field_encoding="EXPANDED"),t)},o.prototype.r=function(t){return u.prototype.r.call(this,this.e||t)},o.d=function(n,r,e,s){return"function"==typeof r?r=f.decorateType(r).name:r&&"object"==typeof r&&(r=f.decorateEnum(r).name),function(t,i){f.decorateType(t.constructor).add(new o(i,n,r,e,{default:s}))}},o.c=function(t){r=t}},{16:16,24:24,34:34,35:35}],18:[function(t,i,n){var r=i.exports=t(19);r.build="light",r.load=function(t,i,n){return(i="function"==typeof i?(n=i,new r.Root):i||new r.Root).load(t,n)},r.loadSync=function(t,i){return(i=i||new r.Root).loadSync(t)},r.encoder=t(15),r.decoder=t(14),r.verifier=t(40),r.converter=t(13),r.ReflectionObject=t(24),r.Namespace=t(23),r.Root=t(28),r.Enum=t(16),r.Type=t(33),r.Field=t(17),r.OneOf=t(25),r.MapField=t(20),r.Service=t(32),r.Method=t(22),r.Message=t(21),r.wrappers=t(41),r.types=t(34),r.util=t(35),r.ReflectionObject.c(r.Root),r.Namespace.c(r.Type,r.Service,r.Enum),r.Root.c(r.Type),r.Field.c(r.Type)},{13:13,14:14,15:15,16:16,17:17,19:19,20:20,21:21,22:22,23:23,24:24,25:25,28:28,32:32,33:33,34:34,35:35,40:40,41:41}],19:[function(t,i,n){var r=n;function e(){r.util.c(),r.Writer.c(r.BufferWriter),r.Reader.c(r.BufferReader)}r.build="minimal",r.Writer=t(42),r.BufferWriter=t(43),r.Reader=t(26),r.BufferReader=t(27),r.util=t(38),r.rpc=t(30),r.roots=t(29),r.configure=e,e()},{26:26,27:27,29:29,30:30,38:38,42:42,43:43}],20:[function(t,i,n){i.exports=s;var o=t(17),r=(((s.prototype=Object.create(o.prototype)).constructor=s).className="MapField",t(34)),u=t(35);function s(t,i,n,r,e,s){if(o.call(this,t,i,r,g,g,e,s),!u.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(t,i){return new s(t,i.id,i.keyType,i.type,i.options,i.comment)},s.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return u.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:g])},s.prototype.resolve=function(){if(this.resolved)return this;if(r.mapKey[this.keyType]===g)throw Error("invalid key type: "+this.keyType);return o.prototype.resolve.call(this)},s.d=function(n,r,e){return"function"==typeof e?e=u.decorateType(e).name:e&&"object"==typeof e&&(e=u.decorateEnum(e).name),function(t,i){u.decorateType(t.constructor).add(new s(i,n,r,e))}}},{17:17,34:34,35:35}],21:[function(t,i,n){i.exports=e;var r=t(38);function e(t){if(t)for(var i=Object.keys(t),n=0;ni)return!0;return!1},a.isReservedName=function(t,i){if(t)for(var n=0;nf.recursionLimit)throw Error("max depth exceeded");for(var n=this;0{t.b(i)})),this},a.prototype.lookup=function(t,i,n){if("boolean"==typeof i?(n=i,i=g):i&&!Array.isArray(i)&&(i=[i]),f.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;var r=t.join(".");if(""===t[0])return this.root.lookup(t.slice(1),i);var e=this.root.y&&this.root.y["."+r];if(e&&(!i||~i.indexOf(e.constructor)))return e;if((e=this.w(t,r))&&(!i||~i.indexOf(e.constructor)))return e;if(!n)for(var s=this;s.parent;){if((e=s.parent.w(t,r))&&(!i||~i.indexOf(e.constructor)))return e;s=s.parent}return null},a.prototype.w=function(t,i){if(Object.prototype.hasOwnProperty.call(this.l,i))return this.l[i];var n=this.get(t[0]),r=null;if(n)1===t.length?r=n:n instanceof a&&(t=t.slice(1),r=n.w(t,t.join(".")));else for(var e=0;e "+t.len)}function h(t){this.buf=t,this.pos=0,this.len=t.length}function f(){return e.Buffer?function(t){return(h.create=function(t){return e.Buffer.isBuffer(t)?new r(t):a(t)})(t)}:a}var c,a="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new h(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new h(t);throw Error("illegal buffer")};function l(){var t=new s(0,0),i=0;if(!(4=this.len)throw u(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*i)>>>0,t}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(i=0,4>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw u(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function d(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw u(this,8);return new s(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}h.create=f(),h.prototype.k=e.Array.prototype.subarray||e.Array.prototype.slice,h.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128||(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128||!((this.pos+=5)>this.len))))))return c;throw this.pos=this.len,u(this,10)}),h.prototype.int32=function(){return 0|this.uint32()},h.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},h.prototype.bool=function(){return 0!==this.uint32()},h.prototype.fixed32=function(){if(this.pos+4>this.len)throw u(this,4);return d(this.buf,this.pos+=4)},h.prototype.sfixed32=function(){if(this.pos+4>this.len)throw u(this,4);return 0|d(this.buf,this.pos+=4)},h.prototype.float=function(){if(this.pos+4>this.len)throw u(this,4);var t=e.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},h.prototype.double=function(){if(this.pos+8>this.len)throw u(this,4);var t=e.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},h.prototype.bytes=function(){var t=this.uint32(),i=this.pos,n=this.pos+t;if(n>this.len)throw u(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,n):i===n?(t=e.Buffer)?t.alloc(0):new this.buf.constructor(0):this.k.call(this.buf,i,n)},h.prototype.string=function(){var t=this.bytes();return o.read(t,0,t.length)},h.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw u(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw u(this)}while(128&this.buf[this.pos++]);return this},h.recursionLimit=e.recursionLimit,h.prototype.skipType=function(t,i){if(h.recursionLimit<(i=i===g?0:i))throw Error("maximum nesting depth exceeded");switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t,i+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},h.c=function(t){r=t,h.create=f(),r.c();var i=e.Long?"toLong":"toNumber";e.merge(h.prototype,{int64:function(){return l.call(this)[i](!1)},uint64:function(){return l.call(this)[i](!0)},sint64:function(){return l.call(this).zzDecode()[i](!1)},fixed64:function(){return p.call(this)[i](!0)},sfixed64:function(){return p.call(this)[i](!1)}})}},{38:38}],27:[function(t,i,n){i.exports=s;var r=t(26),e=((s.prototype=Object.create(r.prototype)).constructor=s,t(38));function s(t){r.call(this,t)}s.c=function(){e.Buffer&&(s.prototype.k=e.Buffer.prototype.slice)},s.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},s.c()},{26:26,38:38}],28:[function(t,i,n){i.exports=h;var r,p,v,e=t(23),s=(((h.prototype=Object.create(e.prototype)).constructor=h).className="Root",t(17)),o=t(16),u=t(25),b=t(35);function h(t){e.call(this,"",t),this.deferred=[],this.files=[],this.e="proto2",this.y={}}function m(){}h.fromJSON=function(t,i,n){return n=b.checkDepth(n),i=i||new h,t.options&&i.setOptions(t.options),i.addJSON(t.nested,n).resolveAll()},h.prototype.resolvePath=b.path.resolve,h.prototype.fetch=b.fetch,h.prototype.load=function t(i,o,s){"function"==typeof o&&(s=o,o=g);var u=this;if(!s)return b.asPromise(t,u,i,o);var h=s===m;function f(t,i){if(s){if(h)throw t;i&&i.resolveAll();var n=s;s=null,n(t,i)}}function c(t){var i=t.lastIndexOf("google/protobuf/");if(-1b.recursionLimit)throw Error("max depth exceeded");if(b.isString(i)&&"{"==(i[0]||"")&&(i=JSON.parse(i)),b.isString(i)){p.filename=t;var r,e=p(i,u,o),s=0;if(e.imports)for(;s{t.b(i)})),this},c.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof o?"__proto__"===t.name?this:e((this.methods[t.name]=t).parent=this):r.prototype.add.call(this,t)},c.prototype.remove=function(t){if(t instanceof o){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,e(this)}return r.prototype.remove.call(this,t)},c.prototype.create=function(t,i,n){for(var r,e=new h.Service(t,i,n),s=0;sd.nestingLimit)throw Error("max depth exceeded");for(var r=new w(t,i.options),e=(r.extensions=i.extensions,r.reserved=i.reserved,Object.keys(i.fields)),s=0;s{t.r(i)}),this.fieldsArray.forEach(t=>{t.r(i)})),this},w.prototype.get=function(t){return Object.prototype.hasOwnProperty.call(this.fields,t)?this.fields[t]:this.oneofs&&Object.prototype.hasOwnProperty.call(this.oneofs,t)?this.oneofs[t]:this.nested&&Object.prototype.hasOwnProperty.call(this.nested,t)?this.nested[t]:null},w.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof c&&t.extend===g){if((this.x||this.fieldsById)[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return"__proto__"===t.name?this:(t.parent&&t.parent.remove(t),(this.fields[t.name]=t).message=this,t.onAdd(this),r(this))}return t instanceof f?"__proto__"===t.name?this:(this.oneofs||(this.oneofs={}),(this.oneofs[t.name]=t).onAdd(this),r(this)):u.prototype.add.call(this,t)},w.prototype.remove=function(t){if(t instanceof c&&t.extend===g){if(this.fields&&this.fields[t.name]===t)return delete this.fields[t.name],t.parent=null,t.onRemove(this),r(this);throw Error(t+" is not a member of "+this)}if(t instanceof f){if(this.oneofs&&this.oneofs[t.name]===t)return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),r(this);throw Error(t+" is not a member of "+this)}return u.prototype.remove.call(this,t)},w.prototype.isReservedId=function(t){return u.isReservedId(this.reserved,t)},w.prototype.isReservedName=function(t){return u.isReservedName(this.reserved,t)},w.prototype.create=function(t){return new this.ctor(t)},w.prototype.setup=function(){for(var t=this.fullName,i=[],n=0;no.recursionLimit)throw Error("max depth exceeded");return t},o.toArray=function(t){if(t){for(var i=Object.keys(t),n=Array(i.length),r=0;ro.recursionLimit)throw Error("max depth exceeded");return function t(i,n,r){var e=n.shift();if(!o.isUnsafeProperty(e))if(0>>0,this.hi=i>>>0}var s=e.zero=new e(0,0),o=(s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1},e.zeroHash="\0\0\0\0\0\0\0\0",e.fromNumber=function(t){var i,n;return 0===t?s:(n=(t=(i=t<0)?-t:t)>>>0,t=(t-n)/4294967296>>>0,i&&(t=~t>>>0,n=~n>>>0,4294967295<++n&&(n=0,4294967295<++t&&(t=0))),new e(n,t))},e.from=function(t){if("number"==typeof t)return e.fromNumber(t);if(r.isString(t)){if(!r.Long)return e.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new e(t.low>>>0,t.high>>>0):s},e.prototype.toNumber=function(t){var i;return!t&&this.hi>>>31?(t=1+~this.lo>>>0,i=~this.hi>>>0,-(t+4294967296*(i=t?i:i+1>>>0))):this.lo+4294967296*this.hi},e.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}},String.prototype.charCodeAt);e.fromHash=function(t){return"\0\0\0\0\0\0\0\0"===t?s:new e((o.call(t,0)|o.call(t,1)<<8|o.call(t,2)<<16|o.call(t,3)<<24)>>>0,(o.call(t,4)|o.call(t,5)<<8|o.call(t,6)<<16|o.call(t,7)<<24)>>>0)},e.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},e.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},e.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},e.prototype.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0==n?0==i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:n<128?9:10}},{38:38}],38:[function(i,t,n){var r=n;function u(t){return"__proto__"===t||"prototype"===t||"constructor"===t}function e(t){for(var i=(n="boolean"==typeof arguments[arguments.length-1])?arguments.length-1:arguments.length,n=n&&arguments[arguments.length-1],r=1;rutil.recursionLimit)")("return%j","maximum nesting depth exceeded"),n=t.oneofsArray,r={};n.length&&i("var p={}");for(var e=0;eh.recursionLimit)throw Error("max depth exceeded");var r,e,s="",o="";return i&&i.json&&t.type_url&&t.value&&(o=t.type_url.substring(1+t.type_url.lastIndexOf("/")),s=t.type_url.substring(0,1+t.type_url.lastIndexOf("/")),(r=this.lookup(o))&&(t=r.decode(t.value,g,g,n+1))),!(t instanceof this.ctor)&&t instanceof u?(r=t.$type.toObject(t,i,n+1),e="."===t.$type.fullName[0]?t.$type.fullName.slice(1):t.$type.fullName,r["@type"]=o=(s=""===s?"type.googleapis.com/":s)+e,r):this.toObject(t,i,n)}}},{21:21,38:38}],42:[function(t,i,n){i.exports=a;var r,e=t(38),s=e.LongBits,o=e.base64,u=e.utf8;function h(t,i,n){this.fn=t,this.len=i,this.next=g,this.val=n}function f(){}function c(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function a(){this.len=0,this.head=new h(f,0,0),this.tail=this.head,this.states=null}function l(){return e.Buffer?function(){return(a.create=function(){return new r})()}:function(){return new a}}function d(t,i,n){i[n]=255&t}function p(t,i){this.len=t,this.next=g,this.val=i}function v(t,i,n){for(var r=t.lo,e=t.hi;e;)i[n++]=127&r|128,r=(r>>>7|e<<25)>>>0,e>>>=7;for(;127>>=7;i[n++]=r}function b(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}a.create=l(),a.alloc=function(t){return new e.Array(t)},e.Array!==Array&&(a.alloc=e.pool(a.alloc,e.Array.prototype.subarray)),a.prototype.L=function(t,i,n){return this.tail=this.tail.next=new h(t,i,n),this.len+=i,this},(p.prototype=Object.create(h.prototype)).fn=function(t,i,n){for(;127>>=7;i[n]=t},a.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new p((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},a.prototype.int32=function(t){return(t|=0)<0?this.L(v,10,s.fromNumber(t)):this.uint32(t)},a.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},a.prototype.int64=a.prototype.uint64=function(t){t=s.from(t);return this.L(v,t.length(),t)},a.prototype.sint64=function(t){t=s.from(t).zzEncode();return this.L(v,t.length(),t)},a.prototype.bool=function(t){return this.L(d,1,t?1:0)},a.prototype.sfixed32=a.prototype.fixed32=function(t){return this.L(b,4,t>>>0)},a.prototype.sfixed64=a.prototype.fixed64=function(t){t=s.from(t);return this.L(b,4,t.lo).L(b,4,t.hi)},a.prototype.float=function(t){return this.L(e.float.writeFloatLE,4,t)},a.prototype.double=function(t){return this.L(e.float.writeDoubleLE,8,t)};var m=e.Array.prototype.set?function(t,i,n){i.set(t,n)}:function(t,i,n){for(var r=0;r>>0;return n?(e.isString(t)&&(i=a.alloc(n=o.length(t)),o.decode(t,i,0),t=i),this.uint32(n).L(m,n,t)):this.L(d,1,0)},a.prototype.string=function(t){var i=u.length(t);return i?this.uint32(i).L(u.write,i,t):this.L(d,1,0)},a.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new h(f,0,0),this.len=0,this},a.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new h(f,0,0),this.len=0),this},a.prototype.ldelim=function(){var t=this.head,i=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=i,this.len+=n),this},a.prototype.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,i,n),n+=t.len,t=t.next;return i},a.c=function(t){r=t,a.create=l(),r.c()}},{38:38}],43:[function(t,i,n){i.exports=s;var r=t(42),e=((s.prototype=Object.create(r.prototype)).constructor=s,t(38));function s(){r.call(this)}function o(t,i,n){t.length<40?e.utf8.write(t,i,n):i.utf8Write?i.utf8Write(t,n):i.write(t,n)}s.c=function(){s.alloc=e.I,s.writeBytesBuffer=e.Buffer&&e.Buffer.prototype instanceof Uint8Array&&"set"===e.Buffer.prototype.set.name?function(t,i,n){i.set(t,n)}:function(t,i,n){if(t.copy)t.copy(i,n,0,t.length);else for(var r=0;r>>0;return this.uint32(i),i&&this.L(s.writeBytesBuffer,i,t),this},s.prototype.string=function(t){var i=e.Buffer.byteLength(t);return this.uint32(i),i&&this.L(o,i,t),this},s.c()},{38:38,42:42}]},e={},(i=function t(i){var n=e[i];return n||r[i][0].call(n=e[i]={exports:{}},t,n,n.exports),n.exports}([18][0])).util.global.protobuf=i,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&t.isLong&&(i.util.Long=t,i.configure()),i}),"object"==typeof module&&module&&module.exports&&(module.exports=i)}(); -//# sourceMappingURL=protobuf.min.js.map diff --git a/node_modules/protobufjs/dist/light/protobuf.min.js.map b/node_modules/protobufjs/dist/light/protobuf.min.js.map deleted file mode 100644 index 7bb888f..0000000 --- a/node_modules/protobufjs/dist/light/protobuf.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["lib/prelude.js","../node_modules/@protobufjs/aspromise/index.js","../node_modules/@protobufjs/base64/index.js","../node_modules/@protobufjs/codegen/index.js","../node_modules/@protobufjs/eventemitter/index.js","../node_modules/@protobufjs/fetch/index.js","../node_modules/@protobufjs/fetch/util/fs.js","../node_modules/@protobufjs/float/index.js","../node_modules/@protobufjs/inquire/index.js","../node_modules/@protobufjs/path/index.js","../node_modules/@protobufjs/pool/index.js","../node_modules/@protobufjs/utf8/index.js","../src/converter.js","../src/decoder.js","../src/encoder.js","../src/enum.js","../src/field.js","../src/index-light","../src/index-minimal.js","../src/mapfield.js","../src/message.js","../src/method.js","../src/namespace.js","../src/object.js","../src/oneof.js","../src/reader.js","../src/reader_buffer.js","../src/root.js","../src/roots.js","../src/rpc.js","../src/rpc/service.js","../src/service.js","../src/type.js","../src/types.js","../src/util.js","../src/util/fs.js","../src/util/longbits.js","../src/util/minimal.js","../src/util/patterns.js","../src/verifier.js","../src/wrappers.js","../src/writer.js","../src/writer_buffer.js"],"names":["undefined","modules","cache","protobuf","1","require","module","exports","fn","ctx","params","Array","arguments","length","offset","index","pending","Promise","resolve","reject","err","apply","base64","string","p","n","Math","ceil","b64","s64","i","encode","buffer","start","end","t","parts","chunk","j","b","push","String","fromCharCode","slice","join","invalidEncoding","decode","c","charCodeAt","Error","test","codegen","reservedRe","functionParams","functionName","body","Codegen","formatStringOrScope","source","toString","verbose","console","log","scopeKeys","Object","keys","scopeParams","scopeValues","scopeOffset","Function","formatParams","formatOffset","replace","$0","$1","value","Number","floor","JSON","stringify","functionNameOverride","name","EventEmitter","this","_listeners","create","prototype","on","evt","off","listeners","splice","emit","args","fetch","asPromise","fs","filename","options","callback","xhr","readFile","contents","XMLHttpRequest","binary","onreadystatechange","readyState","status","response","responseText","Uint8Array","overrideMimeType","responseType","open","send","readFileSync","e","factory","writeFloat_ieee754","writeUint","val","buf","pos","sign","isNaN","round","exponent","LN2","pow","readFloat_ieee754","readUint","uint","mantissa","NaN","Infinity","writeFloat_f32_cpy","f32","f8b","writeFloat_f32_rev","readFloat_f32_cpy","readFloat_f32_rev","f64","le","writeDouble_ieee754","off0","off1","readDouble_ieee754","lo","hi","writeDouble_f64_cpy","writeDouble_f64_rev","readDouble_f64_cpy","readDouble_f64_rev","Float32Array","writeFloatLE","writeFloatBE","readFloatLE","readFloatBE","bind","writeUintLE","writeUintBE","readUintLE","readUintBE","Float64Array","writeDoubleLE","writeDoubleBE","readDoubleLE","readDoubleBE","moduleName","mod","isAbsolute","path","normalize","split","absolute","prefix","shift","originPath","includePath","alreadyNormalized","alloc","size","SIZE","MAX","slab","call","utf8","len","read","str","c3","c2","t2","write","c1","Enum","util","genValuePartial_fromObject","gen","field","fieldIndex","prop","defaultAlreadyEmitted","resolvedType","values","typeDefault","repeated","fullName","isUnsigned","type","genValuePartial_toObject","converter","fromObject","mtype","fields","fieldsArray","safeProp","map","toObject","sort","compareFieldsById","repeatedFields","mapFields","normalFields","partOf","arrayDefault","valuesById","long","low","high","unsigned","toNumber","bytes","hasKs2","_fieldsArray","indexOf","filter","ref","id","types","defaults","keyType","basic","packed","delimited","rfield","required","wireType","mapKey","genTypePartial","optional","ReflectionObject","Namespace","constructor","className","comment","comments","valuesOptions","TypeError","_valuesFeatures","reserved","_resolveFeatures","edition","_edition","forEach","key","parentFeaturesCopy","merge","_features","features","fromJSON","json","enm","_defaultEdition","toJSON","toJSONOptions","keepComments","Boolean","_editionToJSON","add","isString","isInteger","isReservedId","isReservedName","allow_alias","remove","Field","Type","ruleRe","rule","extend","isObject","toLowerCase","message","defaultValue","Long","extensionField","declaringField","defineProperty","get","field_presence","message_encoding","repeated_field_encoding","setOption","ifNotSet","resolved","parent","lookupTypeOrEnum","proto3_optional","fromNumber","freeze","newBuffer","emptyObject","emptyArray","ctor","_inferLegacyProtoFeatures","pop","group","getOption","d","fieldId","fieldType","fieldRule","decorateType","decorateEnum","fieldName","default","_configure","Type_","build","load","root","Root","loadSync","encoder","decoder","verifier","OneOf","MapField","Service","Method","Message","wrappers","configure","Writer","BufferWriter","Reader","BufferReader","rpc","roots","resolvedKeyType","fieldKeyType","fieldValueType","properties","$type","writer","encodeDelimited","reader","decodeDelimited","verify","object","requestType","requestStream","responseStream","parsedOptions","resolvedRequestType","resolvedResponseType","lookupType","arrayToJSON","array","obj","nested","_nestedArray","_lookupCache","_needsRecursiveFeatureResolution","_needsRecursiveResolve","clearCache","namespace","depth","checkDepth","addJSON","toArray","nestedArray","nestedJson","names","methods","hasOwnProperty","getEnum","prev","setOptions","onAdd","onRemove","define","isArray","recursionLimit","ptr","part","resolveAll","_resolveFeaturesRecursive","lookup","filterTypes","parentAlreadyChecked","flatPath","found","_fullyQualifiedObjects","_lookupImpl","current","exact","lookupEnum","lookupService","Service_","Enum_","editions2023Defaults","enum_type","json_format","utf8_validation","proto2Defaults","proto3Defaults","_featuresResolved","defineProperties","unshift","_handleAdd","_handleRemove","protoFeatures","assign","lexicalParentFeaturesCopy","setProperty","setParsedOption","propName","opt","newOpt","find","newValue","Root_","fieldNames","oneof","addFieldsToParent","oneofName","oneOfGetter","set","oneOfSetter","LongBits","indexOutOfRange","writeLength","RangeError","Buffer","isBuffer","create_array","readLongVarint","bits","readFixed32_end","readFixed64","_slice","subarray","uint32","int32","sint32","bool","fixed32","sfixed32","float","double","nativeBuffer","skip","skipType","BufferReader_","int64","uint64","sint64","zzDecode","fixed64","sfixed64","utf8Slice","min","parse","common","deferred","files","SYNC","resolvePath","self","sync","finish","cb","getBundledFileName","idx","lastIndexOf","altname","substring","process","parsed","imports","weakImports","queued","weak","setTimeout","isNode","exposeRe","tryHandleExtension","sisterField","extendedType","parse_","common_","rpcImpl","requestDelimited","responseDelimited","rpcCall","method","requestCtor","responseCtor","request","endedByRPC","patterns","_methodsArray","service","inherited","methodsArray","rpcService","methodName","lcFirst","m","q","s","oneofs","extensions","_fieldsById","_oneofsArray","_ctor","fieldsById","oneofsArray","generateConstructor","ctorProperties","nestingLimit","setup","originalThis","wrapper","fork","ldelim","typeName","target","bake","o","camelCaseRe","isReserved","ucFirst","toUpperCase","decorateEnumIndex","camelCase","a","decorateRoot","enumerable","dst","setProp","isUnsafeProperty","prevValue","concat","zero","zzEncode","zeroHash","from","parseInt","fromString","toLong","fromHash","hash","toHash","mask","part0","part1","part2","limit","src","newError","CustomError","captureStackTrace","stack","writable","configurable","inquire","pool","global","versions","node","window","isFinite","isset","isSet","utf8Write","_Buffer_from","_Buffer_allocUnsafe","sizeOrArray","dcodeIO","isLong","key2Re","key32Re","key64Re","longToHash","longFromHash","fromBits","makeProp","ProtocolError","fieldMap","longs","enums","encoding","allocUnsafe","numberRe","typeRefRe","seenFirstField","oneofProp","invalid","genVerifyValue","expected","type_url","messageName","Op","next","noop","State","head","tail","states","writeByte","VarintOp","writeVarint64","writeFixed32","_push","writeBytes","reset","BufferWriter_","writeStringBuffer","writeBytesBuffer","copy","byteLength","$require","$module","amd"],"mappings":";;;;;;AAAA,CAAA,SAAAA,GAAA,aAAA,IAAAC,EAAAC,EAcAC,EAdAF,EAiCA,CAAAG,EAAA,CAAA,SAAAC,EAAAC,EAAAC,GChCAD,EAAAC,QAmBA,SAAAC,EAAAC,GACA,IAAAC,EAAAC,MAAAC,UAAAC,OAAA,CAAA,EACAC,EAAA,EACAC,EAAA,EACAC,EAAA,CAAA,EACA,KAAAD,EAAAH,UAAAC,QACAH,EAAAI,CAAA,IAAAF,UAAAG,CAAA,IACA,OAAA,IAAA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AA9iB,CAAA,EAIA,OAHAQ,KAAAmX,OAAA3Q,CAAA,EACAA,GACAxG,KAAA+hB,EAAAI,EAAA3b,EAAAhH,CAAA,EACAQ,IACA,EAUAsQ,EAAAlB,EAAA,mB1CpFArU,MAcAC,EAPA,SAAAunB,EAAAziB,GACA,IAAA0iB,EAAAznB,EAAA+E,GAGA,OAFA0iB,GACA1nB,EAAAgF,GAAA,GAAAwG,KAAAkc,EAAAznB,EAAA+E,GAAA,CAAA1E,QAAA,EAAA,EAAAmnB,EAAAC,EAAAA,EAAApnB,OAAA,EACAonB,EAAApnB,OACA,OAEA,EAAA,GAGA6L,KAAAgY,OAAAjkB,SAAAA,EAGA,YAAA,OAAAqY,QAAAA,OAAAoP,KACApP,OAAA,CAAA,QAAA,SAAAjG,GAKA,OAJAA,GAAAA,EAAAyS,SACA7kB,EAAAiM,KAAAmG,KAAAA,EACApS,EAAAoV,UAAA,GAEApV,CACA,CAAA,EAGA,UAAA,OAAAG,QAAAA,QAAAA,OAAAC,UACAD,OAAAC,QAAAJ","file":"protobuf.min.js","sourcesContent":["(function prelude(modules, cache, entries) {\n\n // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS\n // sources through a conflict-free require shim and is again wrapped within an iife that\n // provides a minification-friendly `undefined` var plus a global \"use strict\" directive\n // so that minification can remove the directives of each module.\n\n function $require(name) {\n var $module = cache[name];\n if (!$module)\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n return $module.exports;\n }\n\n var protobuf = $require(entries[0]);\n\n // Expose globally\n protobuf.util.global.protobuf = protobuf;\n\n // Be nice to AMD\n if (typeof define === \"function\" && define.amd)\n define([\"long\"], function(Long) {\n if (Long && Long.isLong) {\n protobuf.util.Long = Long;\n protobuf.configure();\n }\n return protobuf;\n });\n\n // Be nice to CommonJS\n if (typeof module === \"object\" && module && module.exports)\n module.exports = protobuf;\n\n})/* end of prelude */","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @param {string[]} functionParams Function parameter names\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n */\r\nfunction codegen(functionParams, functionName) {\r\n\r\n /* istanbul ignore if */\r\n if (typeof functionParams === \"string\") {\r\n functionName = functionParams;\r\n functionParams = undefined;\r\n }\r\n\r\n var body = [];\r\n\r\n /**\r\n * Appends code to the function's body or finishes generation.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any\r\n * @param {...*} [formatParams] Format parameters\r\n * @returns {Codegen|Function} Itself or the generated function if finished\r\n * @throws {Error} If format parameter counts do not match\r\n */\r\n\r\n function Codegen(formatStringOrScope) {\r\n // note that explicit array handling below makes this ~50% faster\r\n\r\n // finish the function\r\n if (typeof formatStringOrScope !== \"string\") {\r\n var source = toString();\r\n if (codegen.verbose)\r\n console.log(\"codegen: \" + source); // eslint-disable-line no-console\r\n source = \"return \" + source;\r\n if (formatStringOrScope) {\r\n var scopeKeys = Object.keys(formatStringOrScope),\r\n scopeParams = new Array(scopeKeys.length + 1),\r\n scopeValues = new Array(scopeKeys.length),\r\n scopeOffset = 0;\r\n while (scopeOffset < scopeKeys.length) {\r\n scopeParams[scopeOffset] = scopeKeys[scopeOffset];\r\n scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]];\r\n }\r\n scopeParams[scopeOffset] = source;\r\n return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func\r\n }\r\n return Function(source)(); // eslint-disable-line no-new-func\r\n }\r\n\r\n // otherwise append to body\r\n var formatParams = new Array(arguments.length - 1),\r\n formatOffset = 0;\r\n while (formatOffset < formatParams.length)\r\n formatParams[formatOffset] = arguments[++formatOffset];\r\n formatOffset = 0;\r\n formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {\r\n var value = formatParams[formatOffset++];\r\n switch ($1) {\r\n case \"d\": case \"f\": return String(Number(value));\r\n case \"i\": return String(Math.floor(value));\r\n case \"j\": return JSON.stringify(value);\r\n case \"s\": return String(value);\r\n }\r\n return \"%\";\r\n });\r\n if (formatOffset !== formatParams.length)\r\n throw Error(\"parameter count mismatch\");\r\n body.push(formatStringOrScope);\r\n return Codegen;\r\n }\r\n\r\n function toString(functionNameOverride) {\r\n return \"function \" + safeFunctionName(functionNameOverride || functionName) + \"(\" + (functionParams && functionParams.join(\",\") || \"\") + \"){\\n \" + body.join(\"\\n \") + \"\\n}\";\r\n }\r\n\r\n Codegen.toString = toString;\r\n return Codegen;\r\n}\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @function codegen\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * When set to `true`, codegen will log generated code to console. Useful for debugging.\r\n * @name util.codegen.verbose\r\n * @type {boolean}\r\n */\r\ncodegen.verbose = false;\r\n\r\nfunction safeFunctionName(name) {\r\n if (!name)\r\n return \"\";\r\n name = String(name).replace(/[^\\w$]/g, \"\");\r\n if (!name)\r\n return \"\";\r\n if (/^\\d/.test(name))\r\n name = \"_\" + name;\r\n return reservedRe.test(name) ? name + \"_\" : name;\r\n}\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = Object.create(null);\r\n}\r\n\r\n/**\r\n * Event listener as used by {@link util.EventEmitter}.\r\n * @typedef EventEmitterListener\r\n * @type {function}\r\n * @param {...*} args Arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {EventEmitterListener} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {EventEmitterListener} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = Object.create(null);\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n if (!listeners)\r\n return this;\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n fs = require(6);\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Options as used by {@link util.fetch}.\r\n * @interface IFetchOptions\r\n * @property {boolean} [binary=false] Whether expecting a binary response\r\n * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} filename File path or url\r\n * @param {IFetchOptions} options Fetch options\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction fetch(filename, options, callback) {\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = {};\r\n } else if (!options)\r\n options = {};\r\n\r\n if (!callback)\r\n return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this\r\n\r\n // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found.\r\n if (!options.xhr && fs && fs.readFile)\r\n return fs.readFile(filename, function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch.xhr(filename, options, callback)\r\n : err\r\n ? callback(err)\r\n : callback(null, options.binary ? contents : contents.toString(\"utf8\"));\r\n });\r\n\r\n // use the XHR version otherwise.\r\n return fetch.xhr(filename, options, callback);\r\n}\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {IFetchOptions} [options] Fetch options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n\r\n/**/\r\nfetch.xhr = function fetch_xhr(filename, options, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n\r\n if (xhr.readyState !== 4)\r\n return undefined;\r\n\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n if (xhr.status !== 0 && xhr.status !== 200)\r\n return callback(Error(\"status \" + xhr.status));\r\n\r\n // if binary data is expected, make sure that some sort of array is returned, even if\r\n // ArrayBuffers are not supported. the binary string fallback, however, is unsafe.\r\n if (options.binary) {\r\n var buffer = xhr.response;\r\n if (!buffer) {\r\n buffer = [];\r\n for (var i = 0; i < xhr.responseText.length; ++i)\r\n buffer.push(xhr.responseText.charCodeAt(i) & 255);\r\n }\r\n return callback(null, typeof Uint8Array !== \"undefined\" ? new Uint8Array(buffer) : buffer);\r\n }\r\n return callback(null, xhr.responseText);\r\n };\r\n\r\n if (options.binary) {\r\n // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers\r\n if (\"overrideMimeType\" in xhr)\r\n xhr.overrideMimeType(\"text/plain; charset=x-user-defined\");\r\n xhr.responseType = \"arraybuffer\";\r\n }\r\n\r\n xhr.open(\"GET\", filename);\r\n xhr.send();\r\n};\r\n","\"use strict\";\r\n\r\nvar fs = null;\r\ntry {\r\n fs = require(12);\r\n if (!fs || !fs.readFile || !fs.readFileSync)\r\n fs = null;\r\n} catch (e) {\r\n // `fs` is unavailable in browsers and browser-like bundles.\r\n}\r\nmodule.exports = fs;\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n * @deprecated Legacy optional require helper. Will be removed in a future release.\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n if (typeof require !== \"function\") {\r\n return null;\r\n }\r\n var mod = require(moduleName);\r\n if (mod && (mod.length || Object.keys(mod).length)) return mod;\r\n return null;\r\n } catch (err) {\r\n // ignore\r\n return null;\r\n }\r\n}\r\n\r\n/*\r\n// maybe worth a shot to prevent renaming issues:\r\n// see: https://github.com/webpack/webpack/blob/master/lib/dependencies/CommonJsRequireDependencyParserPlugin.js\r\n// triggers on:\r\n// - expression require.cache\r\n// - expression require (???)\r\n// - call require\r\n// - call require:commonjs:item\r\n// - call require:commonjs:context\r\n\r\nObject.defineProperty(Function.prototype, \"__self\", { get: function() { return this; } });\r\nvar r = require.__self;\r\ndelete Function.prototype.__self;\r\n*/\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0 && parts[i - 1] !== \"..\")\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\r\n};\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports,\r\n replacementChar = \"\\ufffd\";\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n if (end - start < 1) {\r\n return \"\";\r\n }\r\n\r\n var str = \"\";\r\n for (var i = start; i < end;) {\r\n var t = buffer[i++];\r\n if (t <= 0x7F) {\r\n str += String.fromCharCode(t);\r\n } else if (t >= 0xC0 && t < 0xE0) {\r\n var c2 = (t & 0x1F) << 6 | buffer[i++] & 0x3F;\r\n str += c2 >= 0x80 ? String.fromCharCode(c2) : replacementChar;\r\n } else if (t >= 0xE0 && t < 0xF0) {\r\n var c3 = (t & 0xF) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F;\r\n str += c3 >= 0x800 ? String.fromCharCode(c3) : replacementChar;\r\n } else if (t >= 0xF0) {\r\n var t2 = (t & 7) << 18 | (buffer[i++] & 0x3F) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F;\r\n if (t2 < 0x10000 || t2 > 0x10FFFF)\r\n str += replacementChar;\r\n else {\r\n t2 -= 0x10000;\r\n str += String.fromCharCode(0xD800 + (t2 >> 10));\r\n str += String.fromCharCode(0xDC00 + (t2 & 0x3FF));\r\n }\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\n/**\n * Runtime message from/to plain object converters.\n * @namespace\n */\nvar converter = exports;\n\nvar Enum = require(16),\n util = require(35);\n\n/**\n * Generates a partial value fromObject conveter.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} prop Property reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genValuePartial_fromObject(gen, field, fieldIndex, prop) {\n var defaultAlreadyEmitted = false;\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(d%s){\", prop);\n for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) {\n // enum unknown values passthrough\n if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen\n (\"default:\")\n (\"if(typeof(d%s)===\\\"number\\\"){m%s=d%s;break}\", prop, prop, prop);\n if (!field.repeated) gen // fallback to default value only for\n // arrays, to avoid leaving holes.\n (\"break\"); // for non-repeated fields, just ignore\n defaultAlreadyEmitted = true;\n }\n gen\n (\"case%j:\", keys[i])\n (\"case %i:\", values[keys[i]])\n (\"m%s=%j\", prop, values[keys[i]])\n (\"break\");\n } gen\n (\"}\");\n } else gen\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s=types[%i].fromObject(d%s,n+1)\", prop, fieldIndex, prop);\n } else {\n var isUnsigned = false;\n switch (field.type) {\n case \"double\":\n case \"float\": gen\n (\"m%s=Number(d%s)\", prop, prop); // also catches \"NaN\", \"Infinity\"\n break;\n case \"uint32\":\n case \"fixed32\": gen\n (\"m%s=d%s>>>0\", prop, prop);\n break;\n case \"int32\":\n case \"sint32\":\n case \"sfixed32\": gen\n (\"m%s=d%s|0\", prop, prop);\n break;\n case \"uint64\":\n case \"fixed64\":\n isUnsigned = true;\n // eslint-disable-next-line no-fallthrough\n case \"int64\":\n case \"sint64\":\n case \"sfixed64\": gen\n (\"if(util.Long)\")\n (\"m%s=util.Long.fromValue(d%s,%j)\", prop, prop, isUnsigned)\n (\"else if(typeof d%s===\\\"string\\\")\", prop)\n (\"m%s=parseInt(d%s,10)\", prop, prop)\n (\"else if(typeof d%s===\\\"number\\\")\", prop)\n (\"m%s=d%s\", prop, prop)\n (\"else if(typeof d%s===\\\"object\\\")\", prop)\n (\"m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)\", prop, prop, prop, isUnsigned ? \"true\" : \"\");\n break;\n case \"bytes\": gen\n (\"if(typeof d%s===\\\"string\\\")\", prop)\n (\"util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)\", prop, prop, prop)\n (\"else if(d%s.length >= 0)\", prop)\n (\"m%s=d%s\", prop, prop);\n break;\n case \"string\": gen\n (\"m%s=String(d%s)\", prop, prop);\n break;\n case \"bool\": gen\n (\"m%s=Boolean(d%s)\", prop, prop);\n break;\n /* default: gen\n (\"m%s=d%s\", prop, prop);\n break; */\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a plain object to runtime message converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.fromObject = function fromObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray;\n var gen = util.codegen([\"d\", \"n\"], mtype.name + \"$fromObject\")\n (\"if(d instanceof this.ctor)\")\n (\"return d\")\n (\"if(n===undefined)n=0\")\n (\"if(n>util.recursionLimit)\")\n (\"throw Error(\\\"maximum nesting depth exceeded\\\")\");\n if (!fields.length) return gen\n (\"return new this.ctor\");\n gen\n (\"var m=new this.ctor\");\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n prop = util.safeProp(field.name);\n\n // Map fields\n if (field.map) { gen\n (\"if(d%s){\", prop)\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s={}\", prop)\n (\"for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0,%j).toBigInt()\", prop, prop, prop, prop, prop, isUnsigned)\n (\"else if(typeof m%s===\\\"number\\\")\", prop)\n (\"d%s=o.longs===String?String(m%s):m%s\", prop, prop, prop)\n (\"else\") // Long-like\n (\"d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s\", prop, prop, prop, prop, isUnsigned ? \"true\": \"\", prop);\n break;\n case \"bytes\": gen\n (\"d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s\", prop, prop, prop, prop, prop);\n break;\n default: gen\n (\"d%s=m%s\", prop, prop);\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a runtime message to plain object converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.toObject = function toObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById);\n if (!fields.length)\n return util.codegen()(\"return {}\");\n var gen = util.codegen([\"m\", \"o\", \"q\"], mtype.name + \"$toObject\")\n (\"if(!o)\")\n (\"o={}\")\n (\"if(q===undefined)q=0\")\n (\"if(q>util.recursionLimit)\")\n (\"throw Error(\\\"max depth exceeded\\\")\")\n (\"var d={}\");\n\n var repeatedFields = [],\n mapFields = [],\n normalFields = [],\n i = 0;\n for (; i < fields.length; ++i)\n if (!fields[i].partOf)\n ( fields[i].resolve().repeated ? repeatedFields\n : fields[i].map ? mapFields\n : normalFields).push(fields[i]);\n\n if (repeatedFields.length) { gen\n (\"if(o.arrays||o.defaults){\");\n for (i = 0; i < repeatedFields.length; ++i) gen\n (\"d%s=[]\", util.safeProp(repeatedFields[i].name));\n gen\n (\"}\");\n }\n\n if (mapFields.length) { gen\n (\"if(o.objects||o.defaults){\");\n for (i = 0; i < mapFields.length; ++i) gen\n (\"d%s={}\", util.safeProp(mapFields[i].name));\n gen\n (\"}\");\n }\n\n if (normalFields.length) { gen\n (\"if(o.defaults){\");\n for (i = 0; i < normalFields.length; ++i) {\n var field = normalFields[i],\n prop = util.safeProp(field.name);\n if (field.resolvedType instanceof Enum) gen\n (\"d%s=o.enums===String?%j:%j\", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);\n else if (field.long) gen\n (\"if(util.Long){\")\n (\"var n=new util.Long(%i,%i,%j)\", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)\n (\"d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!==\\\"undefined\\\"&&o.longs===BigInt?n.toBigInt():n\", prop)\n (\"}else\")\n (\"d%s=o.longs===String?%j:typeof BigInt!==\\\"undefined\\\"&&o.longs===BigInt?BigInt(%j):%i\", prop, field.typeDefault.toString(), field.typeDefault.toString(), field.typeDefault.toNumber());\n else if (field.bytes) {\n var arrayDefault = Array.prototype.slice.call(field.typeDefault);\n gen\n (\"if(o.bytes===String)d%s=%j\", prop, String.fromCharCode.apply(String, field.typeDefault))\n (\"else{\")\n (\"d%s=%j\", prop, arrayDefault)\n (\"if(o.bytes!==Array)d%s=util.newBuffer(d%s)\", prop, prop)\n (\"}\");\n } else gen\n (\"d%s=%j\", prop, field.typeDefault); // also messages (=null)\n } gen\n (\"}\");\n }\n var hasKs2 = false;\n for (i = 0; i < fields.length; ++i) {\n var field = fields[i],\n index = mtype._fieldsArray.indexOf(field),\n prop = util.safeProp(field.name);\n if (field.map) {\n if (!hasKs2) { hasKs2 = true; gen\n (\"var ks2\");\n } gen\n (\"if(m%s&&(ks2=Object.keys(m%s)).length){\", prop, prop)\n (\"d%s={}\", prop)\n (\"for(var j=0;jReader.recursionLimit)\")\n (\"throw Error(\\\"maximum nesting depth exceeded\\\")\")\n (\"var c=l===undefined?r.len:r.pos+l,m=new this.ctor\" + (mtype.fieldsArray.filter(function(field) { return field.map; }).length ? \",k,value\" : \"\"))\n (\"while(r.pos>>3){\");\n\n var i = 0;\n for (; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n ref = \"m\" + util.safeProp(field.name); gen\n (\"case %i: {\", field.id);\n\n // Map fields\n if (field.map) { gen\n (\"if(%s===util.emptyObject)\", ref)\n (\"%s={}\", ref)\n (\"var c2 = r.uint32()+r.pos\");\n\n if (types.defaults[field.keyType] !== undefined) gen\n (\"k=%j\", types.defaults[field.keyType]);\n else gen\n (\"k=null\");\n\n if (types.defaults[type] !== undefined) gen\n (\"value=%j\", types.defaults[type]);\n else gen\n (\"value=null\");\n\n gen\n (\"while(r.pos>>3){\")\n (\"case 1: k=r.%s(); break\", field.keyType)\n (\"case 2:\");\n\n if (types.basic[type] === undefined) gen\n (\"value=types[%i].decode(r,r.uint32(),undefined,n+1)\", i); // can't be groups\n else gen\n (\"value=r.%s()\", type);\n\n gen\n (\"break\")\n (\"default:\")\n (\"r.skipType(tag2&7,n)\")\n (\"break\")\n (\"}\")\n (\"}\");\n\n if (types.long[field.keyType] !== undefined) gen\n (\"%s[typeof k===\\\"object\\\"?util.longToHash(k):k]=value\", ref);\n else {\n if (field.keyType === \"string\") gen\n (\"if(k===\\\"__proto__\\\")\")\n (\"util.makeProp(%s,k)\", ref);\n gen\n (\"%s[k]=value\", ref);\n }\n\n // Repeated fields\n } else if (field.repeated) { gen\n\n (\"if(!(%s&&%s.length))\", ref, ref)\n (\"%s=[]\", ref);\n\n // Packable (always check for forward and backward compatiblity)\n if (types.packed[type] !== undefined) gen\n (\"if((t&7)===2){\")\n (\"var c2=r.uint32()+r.pos\")\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\n : gen(\"types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\n}\n\n/**\n * Generates an encoder specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction encoder(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var gen = util.codegen([\"m\", \"w\", \"q\"], mtype.name + \"$encode\")\n (\"if(!w)\")\n (\"w=Writer.create()\")\n (\"if(q===undefined)q=0\")\n (\"if(q>util.recursionLimit)\")\n (\"throw Error(\\\"max depth exceeded\\\")\");\n\n var i, ref;\n\n // \"when a message is serialized its known fields should be written sequentially by field number\"\n var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById);\n\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n index = mtype._fieldsArray.indexOf(field),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n wireType = types.basic[type];\n ref = \"m\" + util.safeProp(field.name);\n\n // Map fields\n if (field.map) {\n gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j)){\", ref, field.name) // !== undefined && !== null\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType);\n if (wireType === undefined) gen\n (\"types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()\", index, ref); // can't be groups\n else gen\n (\".uint32(%i).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\n gen\n (\"}\")\n (\"}\");\n\n // Repeated fields\n } else if (field.repeated) { gen\n (\"if(%s!=null&&%s.length){\", ref, ref); // !== undefined && !== null\n\n // Packed repeated\n if (field.packed && types.packed[type] !== undefined) { gen\n\n (\"w.uint32(%i).fork()\", (field.id << 3 | 2) >>> 0)\n (\"for(var i=0;i<%s.length;++i)\", ref)\n (\"w.%s(%s[i])\", type, ref)\n (\"w.ldelim()\");\n\n // Non-packed\n } else { gen\n\n (\"for(var i=0;i<%s.length;++i)\", ref);\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref + \"[i]\");\n else gen\n (\"w.uint32(%i).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n } gen\n (\"}\");\n\n // Non-repeated\n } else {\n if (field.optional) gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j))\", ref, field.name); // !== undefined && !== null\n\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref);\n else gen\n (\"w.uint32(%i).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n }\n }\n\n return gen\n (\"return w\");\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n","\"use strict\";\nmodule.exports = Enum;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = \"Enum\";\n\nvar Namespace = require(23),\n util = require(35);\n\n/**\n * Constructs a new enum instance.\n * @classdesc Reflected enum.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {Object.} [values] Enum values as an object, by name\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this enum\n * @param {Object.} [comments] The value comments for this enum\n * @param {Object.>|undefined} [valuesOptions] The value options for this enum\n */\nfunction Enum(name, values, options, comment, comments, valuesOptions) {\n ReflectionObject.call(this, name, options);\n\n if (values && typeof values !== \"object\")\n throw TypeError(\"values must be an object\");\n\n /**\n * Enum values by id.\n * @type {Object.}\n */\n this.valuesById = {};\n\n /**\n * Enum values by name.\n * @type {Object.}\n */\n this.values = Object.create(this.valuesById); // toJSON, marker\n\n /**\n * Enum comment text.\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Value comment texts, if any.\n * @type {Object.}\n */\n this.comments = comments || {};\n\n /**\n * Values options, if any\n * @type {Object>|undefined}\n */\n this.valuesOptions = valuesOptions;\n\n /**\n * Resolved values features, if any\n * @type {Object>|undefined}\n */\n this._valuesFeatures = {};\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\n // compatible enum. This is used by pbts to write actual enum definitions that work for\n // static and reflection code alike instead of emitting generic object definitions.\n\n if (values)\n for (var keys = Object.keys(values), i = 0; i < keys.length; ++i)\n if (keys[i] !== \"__proto__\" && typeof values[keys[i]] === \"number\") // use forward entries only\n this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i];\n}\n\n/**\n * @override\n */\nEnum.prototype._resolveFeatures = function _resolveFeatures(edition) {\n edition = this._edition || edition;\n ReflectionObject.prototype._resolveFeatures.call(this, edition);\n\n Object.keys(this.values).forEach(key => {\n var parentFeaturesCopy = util.merge({}, this._features);\n this._valuesFeatures[key] = util.merge(parentFeaturesCopy, this.valuesOptions && this.valuesOptions[key] && this.valuesOptions[key].features || {});\n });\n\n return this;\n};\n\n/**\n * Enum descriptor.\n * @interface IEnum\n * @property {Object.} values Enum values\n * @property {Object.} [options] Enum options\n */\n\n/**\n * Constructs an enum from an enum descriptor.\n * @param {string} name Enum name\n * @param {IEnum} json Enum descriptor\n * @returns {Enum} Created enum\n * @throws {TypeError} If arguments are invalid\n */\nEnum.fromJSON = function fromJSON(name, json) {\n var enm = new Enum(name, json.values, json.options, json.comment, json.comments);\n enm.reserved = json.reserved;\n if (json.edition)\n enm._edition = json.edition;\n enm._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return enm;\n};\n\n/**\n * Converts this enum to an enum descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IEnum} Enum descriptor\n */\nEnum.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"options\" , this.options,\n \"valuesOptions\" , this.valuesOptions,\n \"values\" , this.values,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"comment\" , keepComments ? this.comment : undefined,\n \"comments\" , keepComments ? this.comments : undefined\n ]);\n};\n\n/**\n * Adds a value to this enum.\n * @param {string} name Value name\n * @param {number} id Value id\n * @param {string} [comment] Comment, if any\n * @param {Object.|undefined} [options] Options, if any\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a value with this name or id\n */\nEnum.prototype.add = function add(name, id, comment, options) {\n // utilized by the parser but not by .fromJSON\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (!util.isInteger(id))\n throw TypeError(\"id must be an integer\");\n\n if (name === \"__proto__\")\n return this;\n\n if (this.values[name] !== undefined)\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\n\n if (this.isReservedId(id))\n throw Error(\"id \" + id + \" is reserved in \" + this);\n\n if (this.isReservedName(name))\n throw Error(\"name '\" + name + \"' is reserved in \" + this);\n\n if (this.valuesById[id] !== undefined) {\n if (!(this.options && this.options.allow_alias))\n throw Error(\"duplicate id \" + id + \" in \" + this);\n this.values[name] = id;\n } else\n this.valuesById[this.values[name] = id] = name;\n\n if (options) {\n if (this.valuesOptions === undefined)\n this.valuesOptions = {};\n this.valuesOptions[name] = options || null;\n }\n\n this.comments[name] = comment || null;\n return this;\n};\n\n/**\n * Removes a value from this enum\n * @param {string} name Value name\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `name` is not a name of this enum\n */\nEnum.prototype.remove = function remove(name) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n var val = this.values[name];\n if (val == null)\n throw Error(\"name '\" + name + \"' does not exist in \" + this);\n\n delete this.valuesById[val];\n delete this.values[name];\n delete this.comments[name];\n if (this.valuesOptions)\n delete this.valuesOptions[name];\n\n return this;\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n","\"use strict\";\nmodule.exports = Field;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = \"Field\";\n\nvar Enum = require(16),\n types = require(34),\n util = require(35);\n\nvar Type; // cyclic\n\nvar ruleRe = /^required|optional|repeated$/;\n\n/**\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\n * @name Field\n * @classdesc Reflected message field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a field from a field descriptor.\n * @param {string} name Field name\n * @param {IField} json Field descriptor\n * @returns {Field} Created field\n * @throws {TypeError} If arguments are invalid\n */\nField.fromJSON = function fromJSON(name, json) {\n var field = new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment);\n if (json.edition)\n field._edition = json.edition;\n field._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return field;\n};\n\n/**\n * Not an actual constructor. Use {@link Field} instead.\n * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports FieldBase\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction Field(name, id, type, rule, extend, options, comment) {\n\n if (util.isObject(rule)) {\n comment = extend;\n options = rule;\n rule = extend = undefined;\n } else if (util.isObject(extend)) {\n comment = options;\n options = extend;\n extend = undefined;\n }\n\n ReflectionObject.call(this, name, options);\n\n if (!util.isInteger(id) || id < 0)\n throw TypeError(\"id must be a non-negative integer\");\n\n if (!util.isString(type))\n throw TypeError(\"type must be a string\");\n\n if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase()))\n throw TypeError(\"rule must be a string rule\");\n\n if (extend !== undefined && !util.isString(extend))\n throw TypeError(\"extend must be a string\");\n\n /**\n * Field rule, if any.\n * @type {string|undefined}\n */\n if (rule === \"proto3_optional\") {\n rule = \"optional\";\n }\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\n\n /**\n * Field type.\n * @type {string}\n */\n this.type = type; // toJSON\n\n /**\n * Unique field id.\n * @type {number}\n */\n this.id = id; // toJSON, marker\n\n /**\n * Extended type if different from parent.\n * @type {string|undefined}\n */\n this.extend = extend || undefined; // toJSON\n\n /**\n * Whether this field is repeated.\n * @type {boolean}\n */\n this.repeated = rule === \"repeated\";\n\n /**\n * Whether this field is a map or not.\n * @type {boolean}\n */\n this.map = false;\n\n /**\n * Message this field belongs to.\n * @type {Type|null}\n */\n this.message = null;\n\n /**\n * OneOf this field belongs to, if any,\n * @type {OneOf|null}\n */\n this.partOf = null;\n\n /**\n * The field type's default value.\n * @type {*}\n */\n this.typeDefault = null;\n\n /**\n * The field's default value on prototypes.\n * @type {*}\n */\n this.defaultValue = null;\n\n /**\n * Whether this field's value should be treated as a long.\n * @type {boolean}\n */\n this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false;\n\n /**\n * Whether this field's value is a buffer.\n * @type {boolean}\n */\n this.bytes = type === \"bytes\";\n\n /**\n * Resolved type if not a basic type.\n * @type {Type|Enum|null}\n */\n this.resolvedType = null;\n\n /**\n * Sister-field within the extended type if a declaring extension field.\n * @type {Field|null}\n */\n this.extensionField = null;\n\n /**\n * Sister-field within the declaring namespace if an extended field.\n * @type {Field|null}\n */\n this.declaringField = null;\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Determines whether this field is required.\n * @name Field#required\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"required\", {\n get: function() {\n return this._features.field_presence === \"LEGACY_REQUIRED\";\n }\n});\n\n/**\n * Determines whether this field is not required.\n * @name Field#optional\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"optional\", {\n get: function() {\n return !this.required;\n }\n});\n\n/**\n * Determines whether this field uses tag-delimited encoding. In proto2 this\n * corresponded to group syntax.\n * @name Field#delimited\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"delimited\", {\n get: function() {\n return this.resolvedType instanceof Type &&\n this._features.message_encoding === \"DELIMITED\";\n }\n});\n\n/**\n * Determines whether this field is packed. Only relevant when repeated.\n * @name Field#packed\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"packed\", {\n get: function() {\n return this._features.repeated_field_encoding === \"PACKED\";\n }\n});\n\n/**\n * Determines whether this field tracks presence.\n * @name Field#hasPresence\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"hasPresence\", {\n get: function() {\n if (this.repeated || this.map) {\n return false;\n }\n return this.partOf || // oneofs\n this.declaringField || this.extensionField || // extensions\n this._features.field_presence !== \"IMPLICIT\";\n }\n});\n\n/**\n * @override\n */\nField.prototype.setOption = function setOption(name, value, ifNotSet) {\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\n};\n\n/**\n * Field descriptor.\n * @interface IField\n * @property {string} [rule=\"optional\"] Field rule\n * @property {string} type Field type\n * @property {number} id Field id\n * @property {Object.} [options] Field options\n */\n\n/**\n * Extension field descriptor.\n * @interface IExtensionField\n * @extends IField\n * @property {string} extend Extended type\n */\n\n/**\n * Converts this field to a field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IField} Field descriptor\n */\nField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"rule\" , this.rule !== \"optional\" && this.rule || undefined,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Resolves this field's type references.\n * @returns {Field} `this`\n * @throws {Error} If any reference cannot be resolved\n */\nField.prototype.resolve = function resolve() {\n\n if (this.resolved)\n return this;\n\n if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it\n this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type);\n if (this.resolvedType instanceof Type)\n this.typeDefault = null;\n else // instanceof Enum\n this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined\n } else if (this.options && this.options.proto3_optional) {\n // proto3 scalar value marked optional; should default to null\n this.typeDefault = null;\n }\n\n // use explicitly set default value if present\n if (this.options && this.options[\"default\"] != null) {\n this.typeDefault = this.options[\"default\"];\n if (this.resolvedType instanceof Enum && typeof this.typeDefault === \"string\")\n this.typeDefault = this.resolvedType.values[this.typeDefault];\n }\n\n // remove unnecessary options\n if (this.options) {\n if (this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum))\n delete this.options.packed;\n if (!Object.keys(this.options).length)\n this.options = undefined;\n }\n\n // convert to internal data type if necesssary\n if (this.long) {\n this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type === \"uint64\" || this.type === \"fixed64\");\n\n /* istanbul ignore else */\n if (Object.freeze)\n Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\n\n } else if (this.bytes && typeof this.typeDefault === \"string\") {\n var buf;\n if (util.base64.test(this.typeDefault))\n util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0);\n else\n util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0);\n this.typeDefault = buf;\n }\n\n // take special care of maps and repeated fields\n if (this.map)\n this.defaultValue = util.emptyObject;\n else if (this.repeated)\n this.defaultValue = util.emptyArray;\n else\n this.defaultValue = this.typeDefault;\n\n // ensure proper value on prototype\n if (this.parent instanceof Type)\n this.parent.ctor.prototype[this.name] = this.defaultValue;\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n\n/**\n * Infers field features from legacy syntax that may have been specified differently.\n * in older editions.\n * @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions\n * @returns {object} The feature values to override\n */\nField.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(edition) {\n if (edition !== \"proto2\" && edition !== \"proto3\") {\n return {};\n }\n\n var features = {};\n\n if (this.rule === \"required\") {\n features.field_presence = \"LEGACY_REQUIRED\";\n }\n if (this.parent && types.defaults[this.type] === undefined) {\n // We can't use resolvedType because types may not have been resolved yet. However,\n // legacy groups are always in the same scope as the field so we don't have to do a\n // full scan of the tree.\n var type = this.parent.get(this.type.split(\".\").pop());\n if (type && type instanceof Type && type.group) {\n features.message_encoding = \"DELIMITED\";\n }\n }\n if (this.getOption(\"packed\") === true) {\n features.repeated_field_encoding = \"PACKED\";\n } else if (this.getOption(\"packed\") === false) {\n features.repeated_field_encoding = \"EXPANDED\";\n }\n return features;\n};\n\n/**\n * @override\n */\nField.prototype._resolveFeatures = function _resolveFeatures(edition) {\n return ReflectionObject.prototype._resolveFeatures.call(this, this._edition || edition);\n};\n\n/**\n * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript).\n * @typedef FieldDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} fieldName Field name\n * @returns {undefined}\n */\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"string\"|\"bool\"|\"bytes\"|Object} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @param {T} [defaultValue] Default value\n * @returns {FieldDecorator} Decorator function\n * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[]\n */\nField.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) {\n\n // submessage: decorate the submessage and use its name as the type\n if (typeof fieldType === \"function\")\n fieldType = util.decorateType(fieldType).name;\n\n // enum reference: create a reflected copy of the enum and keep reuseing it\n else if (fieldType && typeof fieldType === \"object\")\n fieldType = util.decorateEnum(fieldType).name;\n\n return function fieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new Field(fieldName, fieldId, fieldType, fieldRule, { \"default\": defaultValue }));\n };\n};\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {Constructor|string} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @returns {FieldDecorator} Decorator function\n * @template T extends Message\n * @variation 2\n */\n// like Field.d but without a default value\n\n// Sets up cyclic dependencies (called in index-light)\nField._configure = function configure(Type_) {\n Type = Type_;\n};\n","\"use strict\";\nvar protobuf = module.exports = require(19);\n\nprotobuf.build = \"light\";\n\n/**\n * A node-style callback as used by {@link load} and {@link Root#load}.\n * @typedef LoadCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Root} [root] Root, if there hasn't been an error\n * @returns {undefined}\n */\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n */\nfunction load(filename, root, callback) {\n if (typeof root === \"function\") {\n callback = root;\n root = new protobuf.Root();\n } else if (!root)\n root = new protobuf.Root();\n return root.load(filename, callback);\n}\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Promise} Promise\n * @see {@link Root#load}\n * @variation 3\n */\n// function load(filename:string, [root:Root]):Promise\n\nprotobuf.load = load;\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n * @see {@link Root#loadSync}\n */\nfunction loadSync(filename, root) {\n if (!root)\n root = new protobuf.Root();\n return root.loadSync(filename);\n}\n\nprotobuf.loadSync = loadSync;\n\n// Serialization\nprotobuf.encoder = require(15);\nprotobuf.decoder = require(14);\nprotobuf.verifier = require(40);\nprotobuf.converter = require(13);\n\n// Reflection\nprotobuf.ReflectionObject = require(24);\nprotobuf.Namespace = require(23);\nprotobuf.Root = require(28);\nprotobuf.Enum = require(16);\nprotobuf.Type = require(33);\nprotobuf.Field = require(17);\nprotobuf.OneOf = require(25);\nprotobuf.MapField = require(20);\nprotobuf.Service = require(32);\nprotobuf.Method = require(22);\n\n// Runtime\nprotobuf.Message = require(21);\nprotobuf.wrappers = require(41);\n\n// Utility\nprotobuf.types = require(34);\nprotobuf.util = require(35);\n\n// Set up possibly cyclic reflection dependencies\nprotobuf.ReflectionObject._configure(protobuf.Root);\nprotobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);\nprotobuf.Root._configure(protobuf.Type);\nprotobuf.Field._configure(protobuf.Type);\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(42);\nprotobuf.BufferWriter = require(43);\nprotobuf.Reader = require(26);\nprotobuf.BufferReader = require(27);\n\n// Utility\nprotobuf.util = require(38);\nprotobuf.rpc = require(30);\nprotobuf.roots = require(29);\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","\"use strict\";\nmodule.exports = MapField;\n\n// extends Field\nvar Field = require(17);\n((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = \"MapField\";\n\nvar types = require(34),\n util = require(35);\n\n/**\n * Constructs a new map field instance.\n * @classdesc Reflected map field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} keyType Key type\n * @param {string} type Value type\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction MapField(name, id, keyType, type, options, comment) {\n Field.call(this, name, id, type, undefined, undefined, options, comment);\n\n /* istanbul ignore if */\n if (!util.isString(keyType))\n throw TypeError(\"keyType must be a string\");\n\n /**\n * Key type.\n * @type {string}\n */\n this.keyType = keyType; // toJSON, marker\n\n /**\n * Resolved key type if not a basic type.\n * @type {ReflectionObject|null}\n */\n this.resolvedKeyType = null;\n\n // Overrides Field#map\n this.map = true;\n}\n\n/**\n * Map field descriptor.\n * @interface IMapField\n * @extends {IField}\n * @property {string} keyType Key type\n */\n\n/**\n * Extension map field descriptor.\n * @interface IExtensionMapField\n * @extends IMapField\n * @property {string} extend Extended type\n */\n\n/**\n * Constructs a map field from a map field descriptor.\n * @param {string} name Field name\n * @param {IMapField} json Map field descriptor\n * @returns {MapField} Created map field\n * @throws {TypeError} If arguments are invalid\n */\nMapField.fromJSON = function fromJSON(name, json) {\n return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment);\n};\n\n/**\n * Converts this map field to a map field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMapField} Map field descriptor\n */\nMapField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"keyType\" , this.keyType,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nMapField.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\n if (types.mapKey[this.keyType] === undefined)\n throw Error(\"invalid key type: \" + this.keyType);\n\n return Field.prototype.resolve.call(this);\n};\n\n/**\n * Map field decorator (TypeScript).\n * @name MapField.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"} fieldKeyType Field key type\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"|\"bytes\"|Object|Constructor<{}>} fieldValueType Field value type\n * @returns {FieldDecorator} Decorator function\n * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> }\n */\nMapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) {\n\n // submessage value: decorate the submessage and use its name as the type\n if (typeof fieldValueType === \"function\")\n fieldValueType = util.decorateType(fieldValueType).name;\n\n // enum reference value: create a reflected copy of the enum and keep reuseing it\n else if (fieldValueType && typeof fieldValueType === \"object\")\n fieldValueType = util.decorateEnum(fieldValueType).name;\n\n return function mapFieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType));\n };\n};\n","\"use strict\";\nmodule.exports = Message;\n\nvar util = require(38);\n\n/**\n * Constructs a new message instance.\n * @classdesc Abstract runtime message.\n * @constructor\n * @param {Properties} [properties] Properties to set\n * @template T extends object = object\n */\nfunction Message(properties) {\n // not used internally\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (key === \"__proto__\")\n continue;\n this[key] = properties[key];\n }\n}\n\n/**\n * Reference to the reflected type.\n * @name Message.$type\n * @type {Type}\n * @readonly\n */\n\n/**\n * Reference to the reflected type.\n * @name Message#$type\n * @type {Type}\n * @readonly\n */\n\n/*eslint-disable valid-jsdoc*/\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.create = function create(properties) {\n return this.$type.create(properties);\n};\n\n/**\n * Encodes a message of this type.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encode = function encode(message, writer) {\n return this.$type.encode(message, writer);\n};\n\n/**\n * Encodes a message of this type preceeded by its length as a varint.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.$type.encodeDelimited(message, writer);\n};\n\n/**\n * Decodes a message of this type.\n * @name Message.decode\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decode = function decode(reader) {\n return this.$type.decode(reader);\n};\n\n/**\n * Decodes a message of this type preceeded by its length as a varint.\n * @name Message.decodeDelimited\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decodeDelimited = function decodeDelimited(reader) {\n return this.$type.decodeDelimited(reader);\n};\n\n/**\n * Verifies a message of this type.\n * @name Message.verify\n * @function\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\nMessage.verify = function verify(message) {\n return this.$type.verify(message);\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object\n * @returns {T} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.fromObject = function fromObject(object) {\n return this.$type.fromObject(object);\n};\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {T} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @template T extends Message\n * @this Constructor\n */\nMessage.toObject = function toObject(message, options) {\n return this.$type.toObject(message, options);\n};\n\n/**\n * Converts this message to JSON.\n * @returns {Object.} JSON object\n */\nMessage.prototype.toJSON = function toJSON() {\n return this.$type.toObject(this, util.toJSONOptions);\n};\n\n/*eslint-enable valid-jsdoc*/\n","\"use strict\";\nmodule.exports = Method;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = \"Method\";\n\nvar util = require(35);\n\n/**\n * Constructs a new service method instance.\n * @classdesc Reflected service method.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Method name\n * @param {string|undefined} type Method type, usually `\"rpc\"`\n * @param {string} requestType Request message type\n * @param {string} responseType Response message type\n * @param {boolean|Object.} [requestStream] Whether the request is streamed\n * @param {boolean|Object.} [responseStream] Whether the response is streamed\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this method\n * @param {Object.} [parsedOptions] Declared options, properly parsed into an object\n */\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) {\n\n /* istanbul ignore next */\n if (util.isObject(requestStream)) {\n options = requestStream;\n requestStream = responseStream = undefined;\n } else if (util.isObject(responseStream)) {\n options = responseStream;\n responseStream = undefined;\n }\n\n /* istanbul ignore if */\n if (!(type === undefined || util.isString(type)))\n throw TypeError(\"type must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(requestType))\n throw TypeError(\"requestType must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(responseType))\n throw TypeError(\"responseType must be a string\");\n\n ReflectionObject.call(this, name, options);\n\n /**\n * Method type.\n * @type {string}\n */\n this.type = type || \"rpc\"; // toJSON\n\n /**\n * Request type.\n * @type {string}\n */\n this.requestType = requestType; // toJSON, marker\n\n /**\n * Whether requests are streamed or not.\n * @type {boolean|undefined}\n */\n this.requestStream = requestStream ? true : undefined; // toJSON\n\n /**\n * Response type.\n * @type {string}\n */\n this.responseType = responseType; // toJSON\n\n /**\n * Whether responses are streamed or not.\n * @type {boolean|undefined}\n */\n this.responseStream = responseStream ? true : undefined; // toJSON\n\n /**\n * Resolved request type.\n * @type {Type|null}\n */\n this.resolvedRequestType = null;\n\n /**\n * Resolved response type.\n * @type {Type|null}\n */\n this.resolvedResponseType = null;\n\n /**\n * Comment for this method\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Options properly parsed into an object\n */\n this.parsedOptions = parsedOptions;\n}\n\n/**\n * Method descriptor.\n * @interface IMethod\n * @property {string} [type=\"rpc\"] Method type\n * @property {string} requestType Request type\n * @property {string} responseType Response type\n * @property {boolean} [requestStream=false] Whether requests are streamed\n * @property {boolean} [responseStream=false] Whether responses are streamed\n * @property {Object.} [options] Method options\n * @property {string} comment Method comments\n * @property {Object.} [parsedOptions] Method options properly parsed into an object\n */\n\n/**\n * Constructs a method from a method descriptor.\n * @param {string} name Method name\n * @param {IMethod} json Method descriptor\n * @returns {Method} Created method\n * @throws {TypeError} If arguments are invalid\n */\nMethod.fromJSON = function fromJSON(name, json) {\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions);\n};\n\n/**\n * Converts this method to a method descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMethod} Method descriptor\n */\nMethod.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"type\" , this.type !== \"rpc\" && /* istanbul ignore next */ this.type || undefined,\n \"requestType\" , this.requestType,\n \"requestStream\" , this.requestStream,\n \"responseType\" , this.responseType,\n \"responseStream\" , this.responseStream,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined,\n \"parsedOptions\" , this.parsedOptions,\n ]);\n};\n\n/**\n * @override\n */\nMethod.prototype.resolve = function resolve() {\n\n /* istanbul ignore if */\n if (this.resolved)\n return this;\n\n this.resolvedRequestType = this.parent.lookupType(this.requestType);\n this.resolvedResponseType = this.parent.lookupType(this.responseType);\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n","\"use strict\";\nmodule.exports = Namespace;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = \"Namespace\";\n\nvar Field = require(17),\n util = require(35),\n OneOf = require(25);\n\nvar Type, // cyclic\n Service,\n Enum;\n\n/**\n * Constructs a new namespace instance.\n * @name Namespace\n * @classdesc Reflected namespace.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a namespace from JSON.\n * @memberof Namespace\n * @function\n * @param {string} name Namespace name\n * @param {Object.} json JSON object\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Namespace} Created namespace\n * @throws {TypeError} If arguments are invalid\n */\nNamespace.fromJSON = function fromJSON(name, json, depth) {\n depth = util.checkDepth(depth);\n return new Namespace(name, json.options).addJSON(json.nested, depth);\n};\n\n/**\n * Converts an array of reflection objects to JSON.\n * @memberof Namespace\n * @param {ReflectionObject[]} array Object array\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\n */\nfunction arrayToJSON(array, toJSONOptions) {\n if (!(array && array.length))\n return undefined;\n var obj = {};\n for (var i = 0; i < array.length; ++i)\n obj[array[i].name] = array[i].toJSON(toJSONOptions);\n return obj;\n}\n\nNamespace.arrayToJSON = arrayToJSON;\n\n/**\n * Tests if the specified id is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedId = function isReservedId(reserved, id) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (typeof reserved[i] !== \"string\" && reserved[i][0] <= id && reserved[i][1] > id)\n return true;\n return false;\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedName = function isReservedName(reserved, name) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (reserved[i] === name)\n return true;\n return false;\n};\n\n/**\n * Not an actual constructor. Use {@link Namespace} instead.\n * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports NamespaceBase\n * @extends ReflectionObject\n * @abstract\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n * @see {@link Namespace}\n */\nfunction Namespace(name, options) {\n ReflectionObject.call(this, name, options);\n\n /**\n * Nested objects by name.\n * @type {Object.|undefined}\n */\n this.nested = undefined; // toJSON\n\n /**\n * Cached nested objects as an array.\n * @type {ReflectionObject[]|null}\n * @private\n */\n this._nestedArray = null;\n\n /**\n * Cache lookup calls for any objects contains anywhere under this namespace.\n * This drastically speeds up resolve for large cross-linked protos where the same\n * types are looked up repeatedly.\n * @type {Object.}\n * @private\n */\n this._lookupCache = Object.create(null);\n\n /**\n * Whether or not objects contained in this namespace need feature resolution.\n * @type {boolean}\n * @protected\n */\n this._needsRecursiveFeatureResolution = true;\n\n /**\n * Whether or not objects contained in this namespace need a resolve.\n * @type {boolean}\n * @protected\n */\n this._needsRecursiveResolve = true;\n}\n\nfunction clearCache(namespace) {\n namespace._nestedArray = null;\n namespace._lookupCache = Object.create(null);\n\n // Also clear parent caches, since they include nested lookups.\n var parent = namespace;\n while(parent = parent.parent) {\n parent._lookupCache = Object.create(null);\n }\n return namespace;\n}\n\n/**\n * Nested objects of this namespace as an array for iteration.\n * @name NamespaceBase#nestedArray\n * @type {ReflectionObject[]}\n * @readonly\n */\nObject.defineProperty(Namespace.prototype, \"nestedArray\", {\n get: function() {\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\n }\n});\n\n/**\n * Namespace descriptor.\n * @interface INamespace\n * @property {Object.} [options] Namespace options\n * @property {Object.} [nested] Nested object descriptors\n */\n\n/**\n * Any extension field descriptor.\n * @typedef AnyExtensionField\n * @type {IExtensionField|IExtensionMapField}\n */\n\n/**\n * Any nested object descriptor.\n * @typedef AnyNestedObject\n * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf}\n */\n\n/**\n * Converts this namespace to a namespace descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {INamespace} Namespace descriptor\n */\nNamespace.prototype.toJSON = function toJSON(toJSONOptions) {\n return util.toObject([\n \"options\" , this.options,\n \"nested\" , arrayToJSON(this.nestedArray, toJSONOptions)\n ]);\n};\n\n/**\n * Adds nested objects to this namespace from nested object descriptors.\n * @param {Object.} nestedJson Any nested object descriptors\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Namespace} `this`\n */\nNamespace.prototype.addJSON = function addJSON(nestedJson, depth) {\n depth = util.checkDepth(depth);\n var ns = this;\n /* istanbul ignore else */\n if (nestedJson) {\n for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) {\n nested = nestedJson[names[i]];\n ns.add( // most to least likely\n ( nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : nested.id !== undefined\n ? Field.fromJSON\n : Namespace.fromJSON )(names[i], nested, depth + 1)\n );\n }\n }\n return this;\n};\n\n/**\n * Gets the nested object of the specified name.\n * @param {string} name Nested object name\n * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist\n */\nNamespace.prototype.get = function get(name) {\n return this.nested && Object.prototype.hasOwnProperty.call(this.nested, name)\n ? this.nested[name]\n : null;\n};\n\n/**\n * Gets the values of the nested {@link Enum|enum} of the specified name.\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\n * @param {string} name Nested enum name\n * @returns {Object.} Enum values\n * @throws {Error} If there is no such enum\n */\nNamespace.prototype.getEnum = function getEnum(name) {\n if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name) && this.nested[name] instanceof Enum)\n return this.nested[name].values;\n throw Error(\"no such enum: \" + name);\n};\n\n/**\n * Adds a nested object to this namespace.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name\n */\nNamespace.prototype.add = function add(object) {\n\n if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace))\n throw TypeError(\"object must be a valid nested object\");\n\n if (object.name === \"__proto__\")\n return this;\n\n if (!this.nested)\n this.nested = {};\n else {\n var prev = this.get(object.name);\n if (prev) {\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\n // replace plain namespace but keep existing nested elements and options\n var nested = prev.nestedArray;\n for (var i = 0; i < nested.length; ++i)\n object.add(nested[i]);\n this.remove(prev);\n if (!this.nested)\n this.nested = {};\n object.setOptions(prev.options, true);\n\n } else\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n }\n }\n this.nested[object.name] = object;\n\n if (!(this instanceof Type || this instanceof Service || this instanceof Enum || this instanceof Field)) {\n // This is a package or a root namespace.\n if (!object._edition) {\n // Make sure that some edition is set if it hasn't already been specified.\n object._edition = object._defaultEdition;\n }\n }\n\n this._needsRecursiveFeatureResolution = true;\n this._needsRecursiveResolve = true;\n\n // Also clear parent caches, since they need to recurse down.\n var parent = this;\n while(parent = parent.parent) {\n parent._needsRecursiveFeatureResolution = true;\n parent._needsRecursiveResolve = true;\n }\n\n object.onAdd(this);\n return clearCache(this);\n};\n\n/**\n * Removes a nested object from this namespace.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this namespace\n */\nNamespace.prototype.remove = function remove(object) {\n\n if (!(object instanceof ReflectionObject))\n throw TypeError(\"object must be a ReflectionObject\");\n if (object.parent !== this)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.nested[object.name];\n if (!Object.keys(this.nested).length)\n this.nested = undefined;\n\n object.onRemove(this);\n return clearCache(this);\n};\n\n/**\n * Defines additial namespaces within this one if not yet existing.\n * @param {string|string[]} path Path to create\n * @param {*} [json] Nested types to create from JSON\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\n */\nNamespace.prototype.define = function define(path, json) {\n\n if (util.isString(path))\n path = path.split(\".\");\n else if (!Array.isArray(path))\n throw TypeError(\"illegal path\");\n if (path && path.length && path[0] === \"\")\n throw Error(\"path must be relative\");\n if (path.length > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n\n var ptr = this;\n while (path.length > 0) {\n var part = path.shift();\n if (ptr.nested && ptr.nested[part]) {\n ptr = ptr.nested[part];\n if (!(ptr instanceof Namespace))\n throw Error(\"path conflicts with non-namespace objects\");\n } else\n ptr.add(ptr = new Namespace(part));\n }\n if (json)\n ptr.addJSON(json);\n return ptr;\n};\n\n/**\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost.\n * @returns {Namespace} `this`\n */\nNamespace.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n this._resolveFeaturesRecursive(this._edition);\n\n var nested = this.nestedArray, i = 0;\n this.resolve();\n while (i < nested.length)\n if (nested[i] instanceof Namespace)\n nested[i++].resolveAll();\n else\n nested[i++].resolve();\n this._needsRecursiveResolve = false;\n return this;\n};\n\n/**\n * @override\n */\nNamespace.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n if (!this._needsRecursiveFeatureResolution) return this;\n this._needsRecursiveFeatureResolution = false;\n\n edition = this._edition || edition;\n\n ReflectionObject.prototype._resolveFeaturesRecursive.call(this, edition);\n this.nestedArray.forEach(nested => {\n nested._resolveFeaturesRecursive(edition);\n });\n return this;\n};\n\n/**\n * Recursively looks up the reflection object matching the specified path in the scope of this namespace.\n * @param {string|string[]} path Path to look up\n * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n */\nNamespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) {\n /* istanbul ignore next */\n if (typeof filterTypes === \"boolean\") {\n parentAlreadyChecked = filterTypes;\n filterTypes = undefined;\n } else if (filterTypes && !Array.isArray(filterTypes))\n filterTypes = [ filterTypes ];\n\n if (util.isString(path) && path.length) {\n if (path === \".\")\n return this.root;\n path = path.split(\".\");\n } else if (!path.length)\n return this;\n\n var flatPath = path.join(\".\");\n\n // Start at root if path is absolute\n if (path[0] === \"\")\n return this.root.lookup(path.slice(1), filterTypes);\n\n // Early bailout for objects with matching absolute paths\n var found = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects[\".\" + flatPath];\n if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {\n return found;\n }\n\n // Do a regular lookup at this namespace and below\n found = this._lookupImpl(path, flatPath);\n if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {\n return found;\n }\n\n if (parentAlreadyChecked)\n return null;\n\n // If there hasn't been a match, walk up the tree and look more broadly\n var current = this;\n while (current.parent) {\n found = current.parent._lookupImpl(path, flatPath);\n if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {\n return found;\n }\n current = current.parent;\n }\n return null;\n};\n\n/**\n * Internal helper for lookup that handles searching just at this namespace and below along with caching.\n * @param {string[]} path Path to look up\n * @param {string} flatPath Flattened version of the path to use as a cache key\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n * @private\n */\nNamespace.prototype._lookupImpl = function lookup(path, flatPath) {\n if(Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) {\n return this._lookupCache[flatPath];\n }\n\n // Test if the first part matches any nested object, and if so, traverse if path contains more\n var found = this.get(path[0]);\n var exact = null;\n if (found) {\n if (path.length === 1) {\n exact = found;\n } else if (found instanceof Namespace) {\n path = path.slice(1);\n exact = found._lookupImpl(path, path.join(\".\"));\n }\n\n // Otherwise try each nested namespace\n } else {\n for (var i = 0; i < this.nestedArray.length; ++i)\n if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path, flatPath))) {\n exact = found;\n break;\n }\n }\n\n // Set this even when null, so that when we walk up the tree we can quickly bail on repeated checks back down.\n this._lookupCache[flatPath] = exact;\n return exact;\n};\n\n/**\n * Looks up the reflection object at the specified path, relative to this namespace.\n * @name NamespaceBase#lookup\n * @function\n * @param {string|string[]} path Path to look up\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n * @variation 2\n */\n// lookup(path: string, [parentAlreadyChecked: boolean])\n\n/**\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type\n * @throws {Error} If `path` does not point to a type\n */\nNamespace.prototype.lookupType = function lookupType(path) {\n var found = this.lookup(path, [ Type ]);\n if (!found)\n throw Error(\"no such type: \" + path);\n return found;\n};\n\n/**\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Enum} Looked up enum\n * @throws {Error} If `path` does not point to an enum\n */\nNamespace.prototype.lookupEnum = function lookupEnum(path) {\n var found = this.lookup(path, [ Enum ]);\n if (!found)\n throw Error(\"no such Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type or enum\n * @throws {Error} If `path` does not point to a type or enum\n */\nNamespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) {\n var found = this.lookup(path, [ Type, Enum ]);\n if (!found)\n throw Error(\"no such Type or Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Service} Looked up service\n * @throws {Error} If `path` does not point to a service\n */\nNamespace.prototype.lookupService = function lookupService(path) {\n var found = this.lookup(path, [ Service ]);\n if (!found)\n throw Error(\"no such Service '\" + path + \"' in \" + this);\n return found;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nNamespace._configure = function(Type_, Service_, Enum_) {\n Type = Type_;\n Service = Service_;\n Enum = Enum_;\n};\n","\"use strict\";\nmodule.exports = ReflectionObject;\n\nReflectionObject.className = \"ReflectionObject\";\n\nconst OneOf = require(25);\nvar util = require(35);\n\nvar Root; // cyclic\n\n/* eslint-disable no-warning-comments */\n// TODO: Replace with embedded proto.\nvar editions2023Defaults = {enum_type: \"OPEN\", field_presence: \"EXPLICIT\", json_format: \"ALLOW\", message_encoding: \"LENGTH_PREFIXED\", repeated_field_encoding: \"PACKED\", utf8_validation: \"VERIFY\"};\nvar proto2Defaults = {enum_type: \"CLOSED\", field_presence: \"EXPLICIT\", json_format: \"LEGACY_BEST_EFFORT\", message_encoding: \"LENGTH_PREFIXED\", repeated_field_encoding: \"EXPANDED\", utf8_validation: \"NONE\"};\nvar proto3Defaults = {enum_type: \"OPEN\", field_presence: \"IMPLICIT\", json_format: \"ALLOW\", message_encoding: \"LENGTH_PREFIXED\", repeated_field_encoding: \"PACKED\", utf8_validation: \"VERIFY\"};\n\n/**\n * Constructs a new reflection object instance.\n * @classdesc Base class of all reflection objects.\n * @constructor\n * @param {string} name Object name\n * @param {Object.} [options] Declared options\n * @abstract\n */\nfunction ReflectionObject(name, options) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (options && !util.isObject(options))\n throw TypeError(\"options must be an object\");\n\n /**\n * Options.\n * @type {Object.|undefined}\n */\n this.options = options; // toJSON\n\n /**\n * Parsed Options.\n * @type {Array.>|undefined}\n */\n this.parsedOptions = null;\n\n /**\n * Unique name within its namespace.\n * @type {string}\n */\n this.name = name;\n\n /**\n * The edition specified for this object. Only relevant for top-level objects.\n * @type {string}\n * @private\n */\n this._edition = null;\n\n /**\n * The default edition to use for this object if none is specified. For legacy reasons,\n * this is proto2 except in the JSON parsing case where it was proto3.\n * @type {string}\n * @private\n */\n this._defaultEdition = \"proto2\";\n\n /**\n * Resolved Features.\n * @type {object}\n * @private\n */\n this._features = {};\n\n /**\n * Whether or not features have been resolved.\n * @type {boolean}\n * @private\n */\n this._featuresResolved = false;\n\n /**\n * Parent namespace.\n * @type {Namespace|null}\n */\n this.parent = null;\n\n /**\n * Whether already resolved or not.\n * @type {boolean}\n */\n this.resolved = false;\n\n /**\n * Comment text, if any.\n * @type {string|null}\n */\n this.comment = null;\n\n /**\n * Defining file name.\n * @type {string|null}\n */\n this.filename = null;\n}\n\nObject.defineProperties(ReflectionObject.prototype, {\n\n /**\n * Reference to the root namespace.\n * @name ReflectionObject#root\n * @type {Root}\n * @readonly\n */\n root: {\n get: function() {\n var ptr = this;\n while (ptr.parent !== null)\n ptr = ptr.parent;\n return ptr;\n }\n },\n\n /**\n * Full name including leading dot.\n * @name ReflectionObject#fullName\n * @type {string}\n * @readonly\n */\n fullName: {\n get: function() {\n var path = [ this.name ],\n ptr = this.parent;\n while (ptr) {\n path.unshift(ptr.name);\n ptr = ptr.parent;\n }\n return path.join(\".\");\n }\n }\n});\n\n/**\n * Converts this reflection object to its descriptor representation.\n * @returns {Object.} Descriptor\n * @abstract\n */\nReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() {\n throw Error(); // not implemented, shouldn't happen\n};\n\n/**\n * Called when this object is added to a parent.\n * @param {ReflectionObject} parent Parent added to\n * @returns {undefined}\n */\nReflectionObject.prototype.onAdd = function onAdd(parent) {\n if (this.parent && this.parent !== parent)\n this.parent.remove(this);\n this.parent = parent;\n this.resolved = false;\n var root = parent.root;\n if (root instanceof Root)\n root._handleAdd(this);\n};\n\n/**\n * Called when this object is removed from a parent.\n * @param {ReflectionObject} parent Parent removed from\n * @returns {undefined}\n */\nReflectionObject.prototype.onRemove = function onRemove(parent) {\n var root = parent.root;\n if (root instanceof Root)\n root._handleRemove(this);\n this.parent = null;\n this.resolved = false;\n};\n\n/**\n * Resolves this objects type references.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n if (this.root instanceof Root)\n this.resolved = true; // only if part of a root\n return this;\n};\n\n/**\n * Resolves this objects editions features.\n * @param {string} edition The edition we're currently resolving for.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n return this._resolveFeatures(this._edition || edition);\n};\n\n/**\n * Resolves child features from parent features\n * @param {string} edition The edition we're currently resolving for.\n * @returns {undefined}\n */\nReflectionObject.prototype._resolveFeatures = function _resolveFeatures(edition) {\n if (this._featuresResolved) {\n return;\n }\n\n var defaults = {};\n\n /* istanbul ignore if */\n if (!edition) {\n throw new Error(\"Unknown edition for \" + this.fullName);\n }\n\n var protoFeatures = util.merge({}, this.options && this.options.features,\n this._inferLegacyProtoFeatures(edition));\n\n if (this._edition) {\n // For a namespace marked with a specific edition, reset defaults.\n /* istanbul ignore else */\n if (edition === \"proto2\") {\n defaults = Object.assign({}, proto2Defaults);\n } else if (edition === \"proto3\") {\n defaults = Object.assign({}, proto3Defaults);\n } else if (edition === \"2023\") {\n defaults = Object.assign({}, editions2023Defaults);\n } else {\n throw new Error(\"Unknown edition: \" + edition);\n }\n this._features = util.merge(defaults, protoFeatures);\n this._featuresResolved = true;\n return;\n }\n\n // fields in Oneofs aren't actually children of them, so we have to\n // special-case it\n /* istanbul ignore else */\n if (this.partOf instanceof OneOf) {\n var lexicalParentFeaturesCopy = util.merge({}, this.partOf._features);\n this._features = util.merge(lexicalParentFeaturesCopy, protoFeatures);\n } else if (this.declaringField) {\n // Skip feature resolution of sister fields.\n } else if (this.parent) {\n var parentFeaturesCopy = util.merge({}, this.parent._features);\n this._features = util.merge(parentFeaturesCopy, protoFeatures);\n } else {\n throw new Error(\"Unable to find a parent for \" + this.fullName);\n }\n if (this.extensionField) {\n // Sister fields should have the same features as their extensions.\n this.extensionField._features = this._features;\n }\n this._featuresResolved = true;\n};\n\n/**\n * Infers features from legacy syntax that may have been specified differently.\n * in older editions.\n * @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions\n * @returns {object} The feature values to override\n */\nReflectionObject.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(/*edition*/) {\n return {};\n};\n\n/**\n * Gets an option value.\n * @param {string} name Option name\n * @returns {*} Option value or `undefined` if not set\n */\nReflectionObject.prototype.getOption = function getOption(name) {\n if (this.options)\n return this.options[name];\n return undefined;\n};\n\n/**\n * Sets an option.\n * @param {string} name Option name\n * @param {*} value Option value\n * @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (name === \"__proto__\")\n return this;\n if (!this.options)\n this.options = {};\n if (/^features\\./.test(name)) {\n util.setProperty(this.options, name, value, ifNotSet);\n } else if (!ifNotSet || this.options[name] === undefined) {\n if (this.getOption(name) !== value) this.resolved = false;\n this.options[name] = value;\n }\n\n return this;\n};\n\n/**\n * Sets a parsed option.\n * @param {string} name parsed Option name\n * @param {*} value Option value\n * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\\empty, will add a new option with that value\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) {\n if (name === \"__proto__\")\n return this;\n if (!this.parsedOptions) {\n this.parsedOptions = [];\n }\n var parsedOptions = this.parsedOptions;\n if (propName) {\n // If setting a sub property of an option then try to merge it\n // with an existing option\n var opt = parsedOptions.find(function (opt) {\n return Object.prototype.hasOwnProperty.call(opt, name);\n });\n if (opt) {\n // If we found an existing option - just merge the property value\n // (If it's a feature, will just write over)\n var newValue = opt[name];\n util.setProperty(newValue, propName, value);\n } else {\n // otherwise, create a new option, set its property and add it to the list\n opt = {};\n opt[name] = util.setProperty({}, propName, value);\n parsedOptions.push(opt);\n }\n } else {\n // Always create a new option when setting the value of the option itself\n var newOpt = {};\n newOpt[name] = value;\n parsedOptions.push(newOpt);\n }\n\n return this;\n};\n\n/**\n * Sets multiple options.\n * @param {Object.} options Options to set\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) {\n if (options)\n for (var keys = Object.keys(options), i = 0; i < keys.length; ++i)\n this.setOption(keys[i], options[keys[i]], ifNotSet);\n return this;\n};\n\n/**\n * Converts this instance to its string representation.\n * @returns {string} Class name[, space, full name]\n */\nReflectionObject.prototype.toString = function toString() {\n var className = this.constructor.className,\n fullName = this.fullName;\n if (fullName.length)\n return className + \" \" + fullName;\n return className;\n};\n\n/**\n * Converts the edition this object is pinned to for JSON format.\n * @returns {string|undefined} The edition string for JSON representation\n */\nReflectionObject.prototype._editionToJSON = function _editionToJSON() {\n if (!this._edition || this._edition === \"proto3\") {\n // Avoid emitting proto3 since we need to default to it for backwards\n // compatibility anyway.\n return undefined;\n }\n return this._edition;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nReflectionObject._configure = function(Root_) {\n Root = Root_;\n};\n","\"use strict\";\nmodule.exports = OneOf;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = \"OneOf\";\n\nvar Field = require(17),\n util = require(35);\n\n/**\n * Constructs a new oneof instance.\n * @classdesc Reflected oneof.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Oneof name\n * @param {string[]|Object.} [fieldNames] Field names\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction OneOf(name, fieldNames, options, comment) {\n if (!Array.isArray(fieldNames)) {\n options = fieldNames;\n fieldNames = undefined;\n }\n ReflectionObject.call(this, name, options);\n\n /* istanbul ignore if */\n if (!(fieldNames === undefined || Array.isArray(fieldNames)))\n throw TypeError(\"fieldNames must be an Array\");\n\n /**\n * Field names that belong to this oneof.\n * @type {string[]}\n */\n this.oneof = fieldNames || []; // toJSON, marker\n\n /**\n * Fields that belong to this oneof as an array for iteration.\n * @type {Field[]}\n * @readonly\n */\n this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Oneof descriptor.\n * @interface IOneOf\n * @property {Array.} oneof Oneof field names\n * @property {Object.} [options] Oneof options\n */\n\n/**\n * Constructs a oneof from a oneof descriptor.\n * @param {string} name Oneof name\n * @param {IOneOf} json Oneof descriptor\n * @returns {OneOf} Created oneof\n * @throws {TypeError} If arguments are invalid\n */\nOneOf.fromJSON = function fromJSON(name, json) {\n return new OneOf(name, json.oneof, json.options, json.comment);\n};\n\n/**\n * Converts this oneof to a oneof descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IOneOf} Oneof descriptor\n */\nOneOf.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"oneof\" , this.oneof,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Adds the fields of the specified oneof to the parent if not already done so.\n * @param {OneOf} oneof The oneof\n * @returns {undefined}\n * @inner\n * @ignore\n */\nfunction addFieldsToParent(oneof) {\n if (oneof.parent)\n for (var i = 0; i < oneof.fieldsArray.length; ++i)\n if (!oneof.fieldsArray[i].parent)\n oneof.parent.add(oneof.fieldsArray[i]);\n}\n\n/**\n * Adds a field to this oneof and removes it from its current parent, if any.\n * @param {Field} field Field to add\n * @returns {OneOf} `this`\n */\nOneOf.prototype.add = function add(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n if (field.parent && field.parent !== this.parent)\n field.parent.remove(field);\n this.oneof.push(field.name);\n this.fieldsArray.push(field);\n field.partOf = this; // field.parent remains null\n addFieldsToParent(this);\n return this;\n};\n\n/**\n * Removes a field from this oneof and puts it back to the oneof's parent.\n * @param {Field} field Field to remove\n * @returns {OneOf} `this`\n */\nOneOf.prototype.remove = function remove(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n var index = this.fieldsArray.indexOf(field);\n\n /* istanbul ignore if */\n if (index < 0)\n throw Error(field + \" is not a member of \" + this);\n\n this.fieldsArray.splice(index, 1);\n index = this.oneof.indexOf(field.name);\n\n /* istanbul ignore else */\n if (index > -1) // theoretical\n this.oneof.splice(index, 1);\n\n field.partOf = null;\n return this;\n};\n\n/**\n * @override\n */\nOneOf.prototype.onAdd = function onAdd(parent) {\n ReflectionObject.prototype.onAdd.call(this, parent);\n var self = this;\n // Collect present fields\n for (var i = 0; i < this.oneof.length; ++i) {\n var field = parent.get(this.oneof[i]);\n if (field && !field.partOf) {\n field.partOf = self;\n self.fieldsArray.push(field);\n }\n }\n // Add not yet present fields\n addFieldsToParent(this);\n};\n\n/**\n * @override\n */\nOneOf.prototype.onRemove = function onRemove(parent) {\n for (var i = 0, field; i < this.fieldsArray.length; ++i)\n if ((field = this.fieldsArray[i]).parent)\n field.parent.remove(field);\n ReflectionObject.prototype.onRemove.call(this, parent);\n};\n\n/**\n * Determines whether this field corresponds to a synthetic oneof created for\n * a proto3 optional field. No behavioral logic should depend on this, but it\n * can be relevant for reflection.\n * @name OneOf#isProto3Optional\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(OneOf.prototype, \"isProto3Optional\", {\n get: function() {\n if (this.fieldsArray == null || this.fieldsArray.length !== 1) {\n return false;\n }\n\n var field = this.fieldsArray[0];\n return field.options != null && field.options[\"proto3_optional\"] === true;\n }\n});\n\n/**\n * Decorator function as returned by {@link OneOf.d} (TypeScript).\n * @typedef OneOfDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} oneofName OneOf name\n * @returns {undefined}\n */\n\n/**\n * OneOf decorator (TypeScript).\n * @function\n * @param {...string} fieldNames Field names\n * @returns {OneOfDecorator} Decorator function\n * @template T extends string\n */\nOneOf.d = function decorateOneOf() {\n var fieldNames = new Array(arguments.length),\n index = 0;\n while (index < arguments.length)\n fieldNames[index] = arguments[index++];\n return function oneOfDecorator(prototype, oneofName) {\n util.decorateType(prototype.constructor)\n .add(new OneOf(oneofName, fieldNames));\n Object.defineProperty(prototype, oneofName, {\n get: util.oneOfGetter(fieldNames),\n set: util.oneOfSetter(fieldNames)\n });\n };\n};\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(38);\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Recursion limit.\n * @type {number}\n */\nReader.recursionLimit = util.recursionLimit;\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @param {number} [depth] Depth of recursion to control nested calls; 0 if omitted\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType, depth) {\n if (depth === undefined) depth = 0;\n if (depth > Reader.recursionLimit)\n throw Error(\"maximum nesting depth exceeded\");\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType, depth + 1);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(26);\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(38);\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = Root;\n\n// extends Namespace\nvar Namespace = require(23);\n((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = \"Root\";\n\nvar Field = require(17),\n Enum = require(16),\n OneOf = require(25),\n util = require(35);\n\nvar Type, // cyclic\n parse, // might be excluded\n common; // \"\n\n/**\n * Constructs a new root namespace instance.\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\n * @extends NamespaceBase\n * @constructor\n * @param {Object.} [options] Top level options\n */\nfunction Root(options) {\n Namespace.call(this, \"\", options);\n\n /**\n * Deferred extension fields.\n * @type {Field[]}\n */\n this.deferred = [];\n\n /**\n * Resolved file names of loaded files.\n * @type {string[]}\n */\n this.files = [];\n\n /**\n * Edition, defaults to proto2 if unspecified.\n * @type {string}\n * @private\n */\n this._edition = \"proto2\";\n\n /**\n * Global lookup cache of fully qualified names.\n * @type {Object.}\n * @private\n */\n this._fullyQualifiedObjects = {};\n}\n\n/**\n * Loads a namespace descriptor into a root namespace.\n * @param {INamespace} json Namespace descriptor\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Root} Root namespace\n */\nRoot.fromJSON = function fromJSON(json, root, depth) {\n depth = util.checkDepth(depth);\n if (!root)\n root = new Root();\n if (json.options)\n root.setOptions(json.options);\n return root.addJSON(json.nested, depth).resolveAll();\n};\n\n/**\n * Resolves the path of an imported file, relative to the importing origin.\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\n * @function\n * @param {string} origin The file name of the importing file\n * @param {string} target The file name being imported\n * @returns {string|null} Resolved path to `target` or `null` to skip the file\n */\nRoot.prototype.resolvePath = util.path.resolve;\n\n/**\n * Fetch content from file path or url\n * This method exists so you can override it with your own logic.\n * @function\n * @param {string} path File path or url\n * @param {FetchCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.fetch = util.fetch;\n\n// A symbol-like function to safely signal synchronous loading\n/* istanbul ignore next */\nfunction SYNC() {} // eslint-disable-line no-empty-function\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} options Parse options\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.load = function load(filename, options, callback) {\n if (typeof options === \"function\") {\n callback = options;\n options = undefined;\n }\n var self = this;\n if (!callback) {\n return util.asPromise(load, self, filename, options);\n }\n\n var sync = callback === SYNC; // undocumented\n\n // Finishes loading by calling the callback (exactly once)\n function finish(err, root) {\n /* istanbul ignore if */\n if (!callback) {\n return;\n }\n if (sync) {\n throw err;\n }\n if (root) {\n root.resolveAll();\n }\n var cb = callback;\n callback = null;\n cb(err, root);\n }\n\n // Bundled definition existence checking\n function getBundledFileName(filename) {\n var idx = filename.lastIndexOf(\"google/protobuf/\");\n if (idx > -1) {\n var altname = filename.substring(idx);\n if (altname in common) return altname;\n }\n return null;\n }\n\n // Processes a single file\n function process(filename, source, depth) {\n if (depth === undefined)\n depth = 0;\n try {\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n if (util.isString(source) && source.charAt(0) === \"{\")\n source = JSON.parse(source);\n if (!util.isString(source))\n self.setOptions(source.options).addJSON(source.nested);\n else {\n parse.filename = filename;\n var parsed = parse(source, self, options),\n resolved,\n i = 0;\n if (parsed.imports)\n for (; i < parsed.imports.length; ++i)\n if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i]))\n fetch(resolved, false, depth + 1);\n if (parsed.weakImports)\n for (i = 0; i < parsed.weakImports.length; ++i)\n if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i]))\n fetch(resolved, true, depth + 1);\n }\n } catch (err) {\n finish(err);\n }\n if (!sync && !queued) {\n finish(null, self); // only once anyway\n }\n }\n\n // Fetches a single file\n function fetch(filename, weak, depth) {\n if (depth === undefined)\n depth = 0;\n filename = getBundledFileName(filename) || filename;\n\n // Skip if already loaded / attempted\n if (self.files.indexOf(filename) > -1) {\n return;\n }\n self.files.push(filename);\n\n // Shortcut bundled definitions\n if (filename in common) {\n if (sync) {\n process(filename, common[filename], depth);\n } else {\n ++queued;\n setTimeout(function() {\n --queued;\n process(filename, common[filename], depth);\n });\n }\n return;\n }\n\n // Otherwise fetch from disk or network\n if (sync) {\n var source;\n try {\n source = util.fs.readFileSync(filename).toString(\"utf8\");\n } catch (err) {\n if (!weak)\n finish(err);\n return;\n }\n process(filename, source, depth);\n } else {\n ++queued;\n self.fetch(filename, function(err, source) {\n --queued;\n /* istanbul ignore if */\n if (!callback) {\n return; // terminated meanwhile\n }\n if (err) {\n /* istanbul ignore else */\n if (!weak)\n finish(err);\n else if (!queued) // can't be covered reliably\n finish(null, self);\n return;\n }\n process(filename, source, depth);\n });\n }\n }\n var queued = 0;\n\n // Assembling the root namespace doesn't require working type\n // references anymore, so we can load everything in parallel\n if (util.isString(filename)) {\n filename = [ filename ];\n }\n for (var i = 0, resolved; i < filename.length; ++i)\n if (resolved = self.resolvePath(\"\", filename[i]))\n fetch(resolved);\n if (sync) {\n self.resolveAll();\n return self;\n }\n if (!queued) {\n finish(null, self);\n }\n\n return self;\n};\n// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Promise} Promise\n * @variation 3\n */\n// function load(filename:string, [options:IParseOptions]):Promise\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only).\n * @function Root#loadSync\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n */\nRoot.prototype.loadSync = function loadSync(filename, options) {\n if (!util.isNode)\n throw Error(\"not supported\");\n return this.load(filename, options, SYNC);\n};\n\n/**\n * @override\n */\nRoot.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n if (this.deferred.length)\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\n }).join(\", \"));\n return Namespace.prototype.resolveAll.call(this);\n};\n\n// only uppercased (and thus conflict-free) children are exposed, see below\nvar exposeRe = /^[A-Z]/;\n\n/**\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\n * @param {Root} root Root instance\n * @param {Field} field Declaring extension field witin the declaring type\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\n * @inner\n * @ignore\n */\nfunction tryHandleExtension(root, field) {\n var extendedType = field.parent.lookup(field.extend);\n if (extendedType) {\n var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options);\n //do not allow to extend same field twice to prevent the error\n if (extendedType.get(sisterField.name)) {\n return true;\n }\n sisterField.declaringField = field;\n field.extensionField = sisterField;\n extendedType.add(sisterField);\n return true;\n }\n return false;\n}\n\n/**\n * Called when any object is added to this root or its sub-namespaces.\n * @param {ReflectionObject} object Object added\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleAdd = function _handleAdd(object) {\n if (object instanceof Field) {\n\n if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField)\n if (!tryHandleExtension(this, object))\n this.deferred.push(object);\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n object.parent[object.name] = object.values; // expose enum values as property of its parent\n\n } else if (!(object instanceof OneOf)) /* everything else is a namespace */ {\n\n if (object instanceof Type) // Try to handle any deferred extensions\n for (var i = 0; i < this.deferred.length;)\n if (tryHandleExtension(this, this.deferred[i]))\n this.deferred.splice(i, 1);\n else\n ++i;\n for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace\n this._handleAdd(object._nestedArray[j]);\n if (exposeRe.test(object.name))\n object.parent[object.name] = object; // expose namespace as property of its parent\n }\n\n if (object instanceof Type || object instanceof Enum || object instanceof Field) {\n // Only store types and enums for quick lookup during resolve.\n this._fullyQualifiedObjects[object.fullName] = object;\n }\n\n // The above also adds uppercased (and thus conflict-free) nested types, services and enums as\n // properties of namespaces just like static code does. This allows using a .d.ts generated for\n // a static module with reflection-based solutions where the condition is met.\n};\n\n/**\n * Called when any object is removed from this root or its sub-namespaces.\n * @param {ReflectionObject} object Object removed\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleRemove = function _handleRemove(object) {\n if (object instanceof Field) {\n\n if (/* an extension field */ object.extend !== undefined) {\n if (/* already handled */ object.extensionField) { // remove its sister field\n object.extensionField.parent.remove(object.extensionField);\n object.extensionField = null;\n } else { // cancel the extension\n var index = this.deferred.indexOf(object);\n /* istanbul ignore else */\n if (index > -1)\n this.deferred.splice(index, 1);\n }\n }\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose enum values\n\n } else if (object instanceof Namespace) {\n\n for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace\n this._handleRemove(object._nestedArray[i]);\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose namespaces\n\n }\n\n delete this._fullyQualifiedObjects[object.fullName];\n};\n\n// Sets up cyclic dependencies (called in index-light)\nRoot._configure = function(Type_, parse_, common_) {\n Type = Type_;\n parse = parse_;\n common = common_;\n};\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(31);\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(38);\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = Service;\n\n// extends Namespace\nvar Namespace = require(23);\n((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = \"Service\";\n\nvar Method = require(22),\n util = require(35),\n rpc = require(30);\n\nvar reservedRe = util.patterns.reservedRe;\n\n/**\n * Constructs a new service instance.\n * @classdesc Reflected service.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Service name\n * @param {Object.} [options] Service options\n * @throws {TypeError} If arguments are invalid\n */\nfunction Service(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Service methods.\n * @type {Object.}\n */\n this.methods = {}; // toJSON, marker\n\n /**\n * Cached methods as an array.\n * @type {Method[]|null}\n * @private\n */\n this._methodsArray = null;\n}\n\n/**\n * Service descriptor.\n * @interface IService\n * @extends INamespace\n * @property {Object.} methods Method descriptors\n */\n\n/**\n * Constructs a service from a service descriptor.\n * @param {string} name Service name\n * @param {IService} json Service descriptor\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Service} Created service\n * @throws {TypeError} If arguments are invalid\n */\nService.fromJSON = function fromJSON(name, json, depth) {\n depth = util.checkDepth(depth);\n var service = new Service(name, json.options);\n /* istanbul ignore else */\n if (json.methods)\n for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i)\n service.add(Method.fromJSON(names[i], json.methods[names[i]]));\n if (json.nested)\n service.addJSON(json.nested, depth);\n if (json.edition)\n service._edition = json.edition;\n service.comment = json.comment;\n service._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return service;\n};\n\n/**\n * Converts this service to a service descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IService} Service descriptor\n */\nService.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"options\" , inherited && inherited.options || undefined,\n \"methods\" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {},\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Methods of this service as an array for iteration.\n * @name Service#methodsArray\n * @type {Method[]}\n * @readonly\n */\nObject.defineProperty(Service.prototype, \"methodsArray\", {\n get: function() {\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\n }\n});\n\nfunction clearCache(service) {\n service._methodsArray = null;\n return service;\n}\n\n/**\n * @override\n */\nService.prototype.get = function get(name) {\n return Object.prototype.hasOwnProperty.call(this.methods, name)\n ? this.methods[name]\n : Namespace.prototype.get.call(this, name);\n};\n\n/**\n * @override\n */\nService.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n Namespace.prototype.resolve.call(this);\n var methods = this.methodsArray;\n for (var i = 0; i < methods.length; ++i)\n methods[i].resolve();\n return this;\n};\n\n/**\n * @override\n */\nService.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n if (!this._needsRecursiveFeatureResolution) return this;\n\n edition = this._edition || edition;\n\n Namespace.prototype._resolveFeaturesRecursive.call(this, edition);\n this.methodsArray.forEach(method => {\n method._resolveFeaturesRecursive(edition);\n });\n return this;\n};\n\n/**\n * @override\n */\nService.prototype.add = function add(object) {\n /* istanbul ignore if */\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Method) {\n if (object.name === \"__proto__\")\n return this;\n this.methods[object.name] = object;\n object.parent = this;\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * @override\n */\nService.prototype.remove = function remove(object) {\n if (object instanceof Method) {\n\n /* istanbul ignore if */\n if (this.methods[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.methods[object.name];\n object.parent = null;\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Creates a runtime service using the specified rpc implementation.\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed.\n */\nService.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited);\n for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) {\n var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\\w_]/g, \"\");\n rpcService[methodName] = util.codegen([\"r\",\"c\"], reservedRe.test(methodName) ? methodName + \"_\" : methodName)(\"return this.rpcCall(m,q,s,r,c)\")({\n m: method,\n q: method.resolvedRequestType.ctor,\n s: method.resolvedResponseType.ctor\n });\n }\n return rpcService;\n};\n","\"use strict\";\nmodule.exports = Type;\n\n// extends Namespace\nvar Namespace = require(23);\n((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = \"Type\";\n\nvar Enum = require(16),\n OneOf = require(25),\n Field = require(17),\n MapField = require(20),\n Service = require(32),\n Message = require(21),\n Reader = require(26),\n Writer = require(42),\n util = require(35),\n encoder = require(15),\n decoder = require(14),\n verifier = require(40),\n converter = require(13),\n wrappers = require(41);\n\n/**\n * Constructs a new reflected message type instance.\n * @classdesc Reflected message type.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Message name\n * @param {Object.} [options] Declared options\n */\nfunction Type(name, options) {\n name = name.replace(/\\W/g, \"\");\n Namespace.call(this, name, options);\n\n /**\n * Message fields.\n * @type {Object.}\n */\n this.fields = {}; // toJSON, marker\n\n /**\n * Oneofs declared within this namespace, if any.\n * @type {Object.}\n */\n this.oneofs = undefined; // toJSON\n\n /**\n * Extension ranges, if any.\n * @type {number[][]}\n */\n this.extensions = undefined; // toJSON\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n /*?\n * Whether this type is a legacy group.\n * @type {boolean|undefined}\n */\n this.group = undefined; // toJSON\n\n /**\n * Cached fields by id.\n * @type {Object.|null}\n * @private\n */\n this._fieldsById = null;\n\n /**\n * Cached fields as an array.\n * @type {Field[]|null}\n * @private\n */\n this._fieldsArray = null;\n\n /**\n * Cached oneofs as an array.\n * @type {OneOf[]|null}\n * @private\n */\n this._oneofsArray = null;\n\n /**\n * Cached constructor.\n * @type {Constructor<{}>}\n * @private\n */\n this._ctor = null;\n}\n\nObject.defineProperties(Type.prototype, {\n\n /**\n * Message fields by id.\n * @name Type#fieldsById\n * @type {Object.}\n * @readonly\n */\n fieldsById: {\n get: function() {\n\n /* istanbul ignore if */\n if (this._fieldsById)\n return this._fieldsById;\n\n this._fieldsById = {};\n for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) {\n var field = this.fields[names[i]],\n id = field.id;\n\n /* istanbul ignore if */\n if (this._fieldsById[id])\n throw Error(\"duplicate id \" + id + \" in \" + this);\n\n this._fieldsById[id] = field;\n }\n return this._fieldsById;\n }\n },\n\n /**\n * Fields of this message as an array for iteration.\n * @name Type#fieldsArray\n * @type {Field[]}\n * @readonly\n */\n fieldsArray: {\n get: function() {\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\n }\n },\n\n /**\n * Oneofs of this message as an array for iteration.\n * @name Type#oneofsArray\n * @type {OneOf[]}\n * @readonly\n */\n oneofsArray: {\n get: function() {\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\n }\n },\n\n /**\n * The registered constructor, if any registered, otherwise a generic constructor.\n * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor.\n * @name Type#ctor\n * @type {Constructor<{}>}\n */\n ctor: {\n get: function() {\n return this._ctor || (this.ctor = Type.generateConstructor(this)());\n },\n set: function(ctor) {\n\n // Ensure proper prototype\n var prototype = ctor.prototype;\n if (!(prototype instanceof Message)) {\n (ctor.prototype = new Message()).constructor = ctor;\n util.merge(ctor.prototype, prototype);\n }\n\n // Classes and messages reference their reflected type\n ctor.$type = ctor.prototype.$type = this;\n\n // Mix in static methods\n util.merge(ctor, Message, true);\n\n this._ctor = ctor;\n\n // Messages have non-enumerable default values on their prototype\n var i = 0;\n for (; i < /* initializes */ this.fieldsArray.length; ++i)\n this._fieldsArray[i].resolve(); // ensures a proper value\n\n // Messages have non-enumerable getters and setters for each virtual oneof field\n var ctorProperties = {};\n for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i)\n ctorProperties[this._oneofsArray[i].resolve().name] = {\n get: util.oneOfGetter(this._oneofsArray[i].oneof),\n set: util.oneOfSetter(this._oneofsArray[i].oneof)\n };\n if (i)\n Object.defineProperties(ctor.prototype, ctorProperties);\n }\n }\n});\n\n/**\n * Generates a constructor function for the specified type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nType.generateConstructor = function generateConstructor(mtype) {\n /* eslint-disable no-unexpected-multiline */\n var gen = util.codegen([\"p\"], mtype.name);\n // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype\n for (var i = 0, field; i < mtype.fieldsArray.length; ++i)\n if ((field = mtype._fieldsArray[i]).map) gen\n (\"this%s={}\", util.safeProp(field.name));\n else if (field.repeated) gen\n (\"this%s=[]\", util.safeProp(field.name));\n return gen\n (\"if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors\n * @property {Object.} fields Field descriptors\n * @property {number[][]} [extensions] Extension ranges\n * @property {Array.} [reserved] Reserved ranges\n * @property {boolean} [group=false] Whether a legacy group or not\n */\n\n/**\n * Creates a message type from a message type descriptor.\n * @param {string} name Message name\n * @param {IType} json Message type descriptor\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Type} Created message type\n */\nType.fromJSON = function fromJSON(name, json, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.nestingLimit)\n throw Error(\"max depth exceeded\");\n var type = new Type(name, json.options);\n type.extensions = json.extensions;\n type.reserved = json.reserved;\n var names = Object.keys(json.fields),\n i = 0;\n for (; i < names.length; ++i)\n type.add(\n ( typeof json.fields[names[i]].keyType !== \"undefined\"\n ? MapField.fromJSON\n : Field.fromJSON )(names[i], json.fields[names[i]])\n );\n if (json.oneofs)\n for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i)\n type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]]));\n if (json.nested)\n for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) {\n var nested = json.nested[names[i]];\n type.add( // most to least likely\n ( nested.id !== undefined\n ? Field.fromJSON\n : nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : Namespace.fromJSON )(names[i], nested, depth + 1)\n );\n }\n if (json.extensions && json.extensions.length)\n type.extensions = json.extensions;\n if (json.reserved && json.reserved.length)\n type.reserved = json.reserved;\n if (json.group)\n type.group = true;\n if (json.comment)\n type.comment = json.comment;\n if (json.edition)\n type._edition = json.edition;\n type._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return type;\n};\n\n/**\n * Converts this message type to a message type descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IType} Message type descriptor\n */\nType.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"options\" , inherited && inherited.options || undefined,\n \"oneofs\" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions),\n \"fields\" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {},\n \"extensions\" , this.extensions && this.extensions.length ? this.extensions : undefined,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"group\" , this.group || undefined,\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nType.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n Namespace.prototype.resolveAll.call(this);\n var oneofs = this.oneofsArray; i = 0;\n while (i < oneofs.length)\n oneofs[i++].resolve();\n var fields = this.fieldsArray, i = 0;\n while (i < fields.length)\n fields[i++].resolve();\n return this;\n};\n\n/**\n * @override\n */\nType.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n if (!this._needsRecursiveFeatureResolution) return this;\n\n edition = this._edition || edition;\n\n Namespace.prototype._resolveFeaturesRecursive.call(this, edition);\n this.oneofsArray.forEach(oneof => {\n oneof._resolveFeatures(edition);\n });\n this.fieldsArray.forEach(field => {\n field._resolveFeatures(edition);\n });\n return this;\n};\n\n/**\n * @override\n */\nType.prototype.get = function get(name) {\n if (Object.prototype.hasOwnProperty.call(this.fields, name))\n return this.fields[name];\n if (this.oneofs && Object.prototype.hasOwnProperty.call(this.oneofs, name))\n return this.oneofs[name];\n if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name))\n return this.nested[name];\n return null;\n};\n\n/**\n * Adds a nested object to this type.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\n */\nType.prototype.add = function add(object) {\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Field && object.extend === undefined) {\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\n // The root object takes care of adding distinct sister-fields to the respective extended\n // type instead.\n\n // avoids calling the getter if not absolutely necessary because it's called quite frequently\n if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id])\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\n if (this.isReservedId(object.id))\n throw Error(\"id \" + object.id + \" is reserved in \" + this);\n if (this.isReservedName(object.name))\n throw Error(\"name '\" + object.name + \"' is reserved in \" + this);\n if (object.name === \"__proto__\")\n return this;\n\n if (object.parent)\n object.parent.remove(object);\n this.fields[object.name] = object;\n object.message = this;\n object.onAdd(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n if (object.name === \"__proto__\")\n return this;\n if (!this.oneofs)\n this.oneofs = {};\n this.oneofs[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * Removes a nested object from this type.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this type\n */\nType.prototype.remove = function remove(object) {\n if (object instanceof Field && object.extend === undefined) {\n // See Type#add for the reason why extension fields are excluded here.\n\n /* istanbul ignore if */\n if (!this.fields || this.fields[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.fields[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n\n /* istanbul ignore if */\n if (!this.oneofs || this.oneofs[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.oneofs[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message<{}>} Message instance\n */\nType.prototype.create = function create(properties) {\n return new this.ctor(properties);\n};\n\n/**\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\n * @returns {Type} `this`\n */\nType.prototype.setup = function setup() {\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\n // multiple times (V8, soft-deopt prototype-check).\n\n var fullName = this.fullName,\n types = [];\n for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i)\n types.push(this._fieldsArray[i].resolve().resolvedType);\n\n // Replace setup methods with type-specific generated functions\n this.encode = encoder(this)({\n Writer : Writer,\n types : types,\n util : util\n });\n this.decode = decoder(this)({\n Reader : Reader,\n types : types,\n util : util\n });\n this.verify = verifier(this)({\n types : types,\n util : util\n });\n this.fromObject = converter.fromObject(this)({\n types : types,\n util : util\n });\n this.toObject = converter.toObject(this)({\n types : types,\n util : util\n });\n\n // Inject custom wrappers for common types\n var wrapper = wrappers[fullName];\n if (wrapper) {\n var originalThis = Object.create(this);\n // if (wrapper.fromObject) {\n originalThis.fromObject = this.fromObject;\n this.fromObject = wrapper.fromObject.bind(originalThis);\n // }\n // if (wrapper.toObject) {\n originalThis.toObject = this.toObject;\n this.toObject = wrapper.toObject.bind(originalThis);\n // }\n }\n\n return this;\n};\n\n/**\n * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encode = function encode_setup(message, writer) { // eslint-disable-line no-unused-vars\n return this.setup().encode.apply(this, arguments); // overrides this method\n};\n\n/**\n * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\n};\n\n/**\n * Decodes a message of this type.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Length of the message, if known beforehand\n * @param {number} [end] Expected group end tag, if decoding a group\n * @param {number} [depth] Current nesting depth\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError<{}>} If required fields are missing\n */\nType.prototype.decode = function decode_setup(reader, length, end, depth) {\n return this.setup().decode(reader, length, end, depth); // overrides this method\n};\n\n/**\n * Decodes a message of this type preceeded by its byte length as a varint.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError} If required fields are missing\n */\nType.prototype.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof Reader))\n reader = Reader.create(reader);\n return this.decode(reader, reader.uint32());\n};\n\n/**\n * Verifies that field values are valid and that required fields are present.\n * @param {Object.} message Plain object to verify\n * @param {number} [depth] Current nesting depth\n * @returns {null|string} `null` if valid, otherwise the reason why it is not\n */\nType.prototype.verify = function verify_setup(message, depth) {\n return this.setup().verify(message, depth); // overrides this method\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object to convert\n * @param {number} [depth] Current nesting depth\n * @returns {Message<{}>} Message instance\n */\nType.prototype.fromObject = function fromObject(object, depth) {\n return this.setup().fromObject(object, depth);\n};\n\n/**\n * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}.\n * @interface IConversionOptions\n * @property {Function} [longs] Long conversion type.\n * Valid values are `BigInt`, `String` and `Number` (the global types).\n * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library.\n * @property {Function} [enums] Enum value conversion type.\n * Only valid value is `String` (the global type).\n * Defaults to copy the present value, which is the numeric id.\n * @property {Function} [bytes] Bytes value conversion type.\n * Valid values are `Array` and (a base64 encoded) `String` (the global types).\n * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser.\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\n * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\n * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false`\n * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any\n * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings\n */\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\nType.prototype.toObject = function toObject(message, options) { // eslint-disable-line no-unused-vars\n return this.setup().toObject.apply(this, arguments);\n};\n\n/**\n * Decorator function as returned by {@link Type.d} (TypeScript).\n * @typedef TypeDecorator\n * @type {function}\n * @param {Constructor} target Target constructor\n * @returns {undefined}\n * @template T extends Message\n */\n\n/**\n * Type decorator (TypeScript).\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {TypeDecorator} Decorator function\n * @template T extends Message\n */\nType.d = function decorateType(typeName) {\n return function typeDecorator(target) {\n util.decorateType(target, typeName);\n };\n};\n","\"use strict\";\n\n/**\n * Common type constants.\n * @namespace\n */\nvar types = exports;\n\nvar util = require(35);\n\nvar s = [\n \"double\", // 0\n \"float\", // 1\n \"int32\", // 2\n \"uint32\", // 3\n \"sint32\", // 4\n \"fixed32\", // 5\n \"sfixed32\", // 6\n \"int64\", // 7\n \"uint64\", // 8\n \"sint64\", // 9\n \"fixed64\", // 10\n \"sfixed64\", // 11\n \"bool\", // 12\n \"string\", // 13\n \"bytes\" // 14\n];\n\nfunction bake(values, offset) {\n var i = 0, o = Object.create(null);\n offset |= 0;\n while (i < values.length) o[s[i + offset]] = values[i++];\n return o;\n}\n\n/**\n * Basic type wire types.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n * @property {number} bytes=2 Ldelim wire type\n */\ntypes.basic = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2,\n /* bytes */ 2\n]);\n\n/**\n * Basic type defaults.\n * @type {Object.}\n * @const\n * @property {number} double=0 Double default\n * @property {number} float=0 Float default\n * @property {number} int32=0 Int32 default\n * @property {number} uint32=0 Uint32 default\n * @property {number} sint32=0 Sint32 default\n * @property {number} fixed32=0 Fixed32 default\n * @property {number} sfixed32=0 Sfixed32 default\n * @property {number} int64=0 Int64 default\n * @property {number} uint64=0 Uint64 default\n * @property {number} sint64=0 Sint32 default\n * @property {number} fixed64=0 Fixed64 default\n * @property {number} sfixed64=0 Sfixed64 default\n * @property {boolean} bool=false Bool default\n * @property {string} string=\"\" String default\n * @property {Array.} bytes=Array(0) Bytes default\n * @property {null} message=null Message default\n */\ntypes.defaults = bake([\n /* double */ 0,\n /* float */ 0,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 0,\n /* sfixed32 */ 0,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 0,\n /* sfixed64 */ 0,\n /* bool */ false,\n /* string */ \"\",\n /* bytes */ util.emptyArray,\n /* message */ null\n]);\n\n/**\n * Basic long type wire types.\n * @type {Object.}\n * @const\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n */\ntypes.long = bake([\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1\n], 7);\n\n/**\n * Allowed types for map keys with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n */\ntypes.mapKey = bake([\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2\n], 2);\n\n/**\n * Allowed types for packed repeated fields with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n */\ntypes.packed = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0\n]);\n","\"use strict\";\n\n/**\n * Various utility functions.\n * @namespace\n */\nvar util = module.exports = require(38);\n\nvar roots = require(29);\n\nvar Type, // cyclic\n Enum;\n\nutil.codegen = require(3);\nutil.fetch = require(5);\nutil.path = require(9);\nutil.patterns = require(39);\n\nvar reservedRe = util.patterns.reservedRe;\n\n/**\n * Node's fs module if available.\n * @type {Object.}\n */\nutil.fs = require(36);\n\n/**\n * Checks a recursion depth.\n * @param {number|undefined} depth Depth of recursion\n * @returns {number} Depth of recursion\n * @throws {Error} If depth exceeds util.recursionLimit\n */\nutil.checkDepth = function checkDepth(depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n return depth;\n};\n\n/**\n * Converts an object's values to an array.\n * @param {Object.} object Object to convert\n * @returns {Array.<*>} Converted array\n */\nutil.toArray = function toArray(object) {\n if (object) {\n var keys = Object.keys(object),\n array = new Array(keys.length),\n index = 0;\n while (index < keys.length)\n array[index] = object[keys[index++]];\n return array;\n }\n return [];\n};\n\n/**\n * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values.\n * @param {Array.<*>} array Array to convert\n * @returns {Object.} Converted object\n */\nutil.toObject = function toObject(array) {\n var object = {},\n index = 0;\n while (index < array.length) {\n var key = array[index++],\n val = array[index++];\n if (val !== undefined)\n object[key] = val;\n }\n return object;\n};\n\n/**\n * Tests whether the specified name is a reserved word in JS.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nutil.isReserved = function isReserved(name) {\n return reservedRe.test(name);\n};\n\n/**\n * Returns a safe property accessor for the specified property name.\n * @param {string} prop Property name\n * @returns {string} Safe accessor\n */\nutil.safeProp = function safeProp(prop) {\n if (!/^[$\\w_]+$/.test(prop) || reservedRe.test(prop))\n return \"[\" + JSON.stringify(prop) + \"]\";\n return \".\" + prop;\n};\n\n/**\n * Converts the first character of a string to upper case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.ucFirst = function ucFirst(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n\nvar camelCaseRe = /_([a-z])/g;\n\n/**\n * Converts a string to camel case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.camelCase = function camelCase(str) {\n return str.substring(0, 1)\n + str.substring(1)\n .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); });\n};\n\n/**\n * Compares reflected fields by id.\n * @param {Field} a First field\n * @param {Field} b Second field\n * @returns {number} Comparison value\n */\nutil.compareFieldsById = function compareFieldsById(a, b) {\n return a.id - b.id;\n};\n\n/**\n * Decorator helper for types (TypeScript).\n * @param {Constructor} ctor Constructor function\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {Type} Reflected type\n * @template T extends Message\n * @property {Root} root Decorators root\n */\nutil.decorateType = function decorateType(ctor, typeName) {\n\n /* istanbul ignore if */\n if (ctor.$type) {\n if (typeName && ctor.$type.name !== typeName) {\n util.decorateRoot.remove(ctor.$type);\n ctor.$type.name = typeName;\n util.decorateRoot.add(ctor.$type);\n }\n return ctor.$type;\n }\n\n /* istanbul ignore next */\n if (!Type)\n Type = require(33);\n\n var type = new Type(typeName || ctor.name);\n util.decorateRoot.add(type);\n type.ctor = ctor; // sets up .encode, .decode etc.\n Object.defineProperty(ctor, \"$type\", { value: type, enumerable: false });\n Object.defineProperty(ctor.prototype, \"$type\", { value: type, enumerable: false });\n return type;\n};\n\nvar decorateEnumIndex = 0;\n\n/**\n * Decorator helper for enums (TypeScript).\n * @param {Object} object Enum object\n * @returns {Enum} Reflected enum\n */\nutil.decorateEnum = function decorateEnum(object) {\n\n /* istanbul ignore if */\n if (object.$type)\n return object.$type;\n\n /* istanbul ignore next */\n if (!Enum)\n Enum = require(16);\n\n var enm = new Enum(\"Enum\" + decorateEnumIndex++, object);\n util.decorateRoot.add(enm);\n Object.defineProperty(object, \"$type\", { value: enm, enumerable: false });\n return enm;\n};\n\n\n/**\n * Sets the value of a property by property path. If a value already exists, it is turned to an array\n * @param {Object.} dst Destination object\n * @param {string} path dot '.' delimited path of the property to set\n * @param {Object} value the value to set\n * @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {Object.} Destination object\n */\nutil.setProperty = function setProperty(dst, path, value, ifNotSet) {\n function setProp(dst, path, value) {\n var part = path.shift();\n if (util.isUnsafeProperty(part))\n return dst;\n if (path.length > 0) {\n dst[part] = setProp(dst[part] || {}, path, value);\n } else {\n var prevValue = dst[part];\n if (prevValue && ifNotSet)\n return dst;\n if (prevValue)\n value = [].concat(prevValue).concat(value);\n dst[part] = value;\n }\n return dst;\n }\n\n if (typeof dst !== \"object\")\n throw TypeError(\"dst must be an object\");\n if (!path)\n throw TypeError(\"path must be specified\");\n\n path = path.split(\".\");\n if (path.length > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n return setProp(dst, path, value);\n};\n\n/**\n * Decorator root (TypeScript).\n * @name util.decorateRoot\n * @type {Root}\n * @readonly\n */\nObject.defineProperty(util, \"decorateRoot\", {\n get: function() {\n return roots[\"decorated\"] || (roots[\"decorated\"] = new (require(28))());\n }\n});\n","\"use strict\";\n\nvar fs = null;\ntry {\n fs = require(12);\n if (!fs || !fs.readFile || !fs.readFileSync)\n fs = null;\n} catch (e) {\n // `fs` is unavailable in browsers and browser-like bundles.\n}\nmodule.exports = fs;\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(38);\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(1);\n\n// converts to / from base64 encoded strings\nutil.base64 = require(2);\n\n// base class of rpc.Service\nutil.EventEmitter = require(4);\n\n// float handling accross browsers\nutil.float = require(7);\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(8);\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(11);\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(10);\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(37);\n\n/**\n * Tests if the specified key can affect object prototypes.\n * @memberof util\n * @param {string} key Key to test\n * @returns {boolean} `true` if the key is unsafe\n */\nfunction isUnsafeProperty(key) {\n return key === \"__proto__\" || key === \"prototype\" || key === \"constructor\";\n}\n\nutil.isUnsafeProperty = isUnsafeProperty;\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.global.Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || (function() {\n try {\n var Long = require(\"long\");\n return Long && Long.isLong ? Long : null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n })();\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {...(Object.|boolean)} src Source objects, optionally followed by an `ifNotSet` flag\n * @returns {Object.} Destination object\n */\nfunction merge(dst) { // used by converters\n var ifNotSet = typeof arguments[arguments.length - 1] === \"boolean\",\n limit = ifNotSet ? arguments.length - 1 : arguments.length;\n ifNotSet = ifNotSet && arguments[arguments.length - 1];\n for (var a = 1; a < limit; ++a) {\n var src = arguments[a];\n if (!src)\n continue;\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (!isUnsafeProperty(keys[i]) && (dst[keys[i]] === undefined || !ifNotSet))\n dst[keys[i]] = src[keys[i]];\n }\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Schema declaration nesting limit.\n * @memberof util\n * @type {number}\n */\nutil.nestingLimit = 32; // protoc: MaxMessageDeclarationNestingDepth\n\n/**\n * Recursion limit.\n * @memberof util\n * @type {number}\n */\nutil.recursionLimit = 100; // protoc: CodedInputStream::default_recursion_limit_\n\n/**\n * Makes a property safe for assignment as an own property.\n * @memberof util\n * @param {Object.} obj Object\n * @param {string} key Property key\n * @returns {undefined}\n */\nutil.makeProp = function makeProp(obj, key) {\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n writable: true\n });\n};\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\n\nvar patterns = exports;\n\npatterns.numberRe = /^(?![eE])[0-9]*(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/;\npatterns.typeRefRe = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;\npatterns.reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;\n","\"use strict\";\nmodule.exports = verifier;\n\nvar Enum = require(16),\n util = require(35);\n\nfunction invalid(field, expected) {\n return field.name + \": \" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected\";\n}\n\n/**\n * Generates a partial value verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\n /* eslint-disable no-unexpected-multiline */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(%s){\", ref)\n (\"default:\")\n (\"return%j\", invalid(field, \"enum value\"));\n for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen\n (\"case %i:\", field.resolvedType.values[keys[j]]);\n gen\n (\"break\")\n (\"}\");\n } else {\n gen\n (\"{\")\n (\"var e=types[%i].verify(%s,n+1);\", fieldIndex, ref)\n (\"if(e)\")\n (\"return%j+e\", field.name + \".\")\n (\"}\");\n }\n } else {\n switch (field.type) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.isInteger(%s))\", ref)\n (\"return%j\", invalid(field, \"integer\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\n (\"return%j\", invalid(field, \"integer|Long\"));\n break;\n case \"float\":\n case \"double\": gen\n (\"if(typeof %s!==\\\"number\\\")\", ref)\n (\"return%j\", invalid(field, \"number\"));\n break;\n case \"bool\": gen\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\n (\"return%j\", invalid(field, \"boolean\"));\n break;\n case \"string\": gen\n (\"if(!util.isString(%s))\", ref)\n (\"return%j\", invalid(field, \"string\"));\n break;\n case \"bytes\": gen\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\n (\"return%j\", invalid(field, \"buffer\"));\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a partial key verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyKey(gen, field, ref) {\n /* eslint-disable no-unexpected-multiline */\n switch (field.keyType) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.key32Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"integer key\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.key64Re.test(%s))\", ref) // see comment above: x is ok, d is not\n (\"return%j\", invalid(field, \"integer|Long key\"));\n break;\n case \"bool\": gen\n (\"if(!util.key2Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"boolean key\"));\n break;\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a verifier specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction verifier(mtype) {\n /* eslint-disable no-unexpected-multiline */\n\n var gen = util.codegen([\"m\", \"n\"], mtype.name + \"$verify\")\n (\"if(typeof m!==\\\"object\\\"||m===null)\")\n (\"return%j\", \"object expected\")\n (\"if(n===undefined)n=0\")\n (\"if(n>util.recursionLimit)\")\n (\"return%j\", \"maximum nesting depth exceeded\");\n var oneofs = mtype.oneofsArray,\n seenFirstField = {};\n if (oneofs.length) gen\n (\"var p={}\");\n\n for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n ref = \"m\" + util.safeProp(field.name);\n\n if (field.optional) gen\n (\"if(%s!=null&&m.hasOwnProperty(%j)){\", ref, field.name); // !== undefined && !== null\n\n // map fields\n if (field.map) { gen\n (\"if(!util.isObject(%s))\", ref)\n (\"return%j\", invalid(field, \"object\"))\n (\"var k=Object.keys(%s)\", ref)\n (\"for(var i=0;i}\n * @const\n */\nvar wrappers = exports;\n\nvar Message = require(21),\n util = require(38);\n\n/**\n * From object converter part of an {@link IWrapper}.\n * @typedef WrapperFromObjectConverter\n * @type {function}\n * @param {Object.} object Plain object\n * @returns {Message<{}>} Message instance\n * @this Type\n */\n\n/**\n * To object converter part of an {@link IWrapper}.\n * @typedef WrapperToObjectConverter\n * @type {function}\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @this Type\n */\n\n/**\n * Common type wrapper part of {@link wrappers}.\n * @interface IWrapper\n * @property {WrapperFromObjectConverter} [fromObject] From object converter\n * @property {WrapperToObjectConverter} [toObject] To object converter\n */\n\n// Custom wrapper for Any\nwrappers[\".google.protobuf.Any\"] = {\n\n fromObject: function(object, depth) {\n\n // unwrap value type if mapped\n if (object && object[\"@type\"]) {\n // Only use fully qualified type name after the last '/'\n var name = object[\"@type\"].substring(object[\"@type\"].lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type) {\n // type_url does not accept leading \".\"\n var type_url = object[\"@type\"].charAt(0) === \".\" ?\n object[\"@type\"].slice(1) : object[\"@type\"];\n // type_url prefix is optional, but path seperator is required\n if (type_url.indexOf(\"/\") === -1) {\n type_url = \"/\" + type_url;\n }\n return this.create({\n type_url: type_url,\n value: type.encode(type.fromObject(object, depth === undefined ? 1 : depth + 1)).finish()\n });\n }\n }\n\n return this.fromObject(object, depth);\n },\n\n toObject: function(message, options, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n\n // Default prefix\n var googleApi = \"type.googleapis.com/\";\n var prefix = \"\";\n var name = \"\";\n\n // decode value if requested and unmapped\n if (options && options.json && message.type_url && message.value) {\n // Only use fully qualified type name after the last '/'\n name = message.type_url.substring(message.type_url.lastIndexOf(\"/\") + 1);\n // Separate the prefix used\n prefix = message.type_url.substring(0, message.type_url.lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type)\n message = type.decode(message.value, undefined, undefined, depth + 1);\n }\n\n // wrap value if unmapped\n if (!(message instanceof this.ctor) && message instanceof Message) {\n var object = message.$type.toObject(message, options, depth + 1);\n var messageName = message.$type.fullName[0] === \".\" ?\n message.$type.fullName.slice(1) : message.$type.fullName;\n // Default to type.googleapis.com prefix if no prefix is used\n if (prefix === \"\") {\n prefix = googleApi;\n }\n name = prefix + messageName;\n object[\"@type\"] = name;\n return object;\n }\n\n return this.toObject(message, options, depth);\n }\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(38);\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return (value |= 0) < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n var lo = val.lo,\n hi = val.hi;\n while (hi) {\n buf[pos++] = lo & 127 | 128;\n lo = (lo >>> 7 | hi << 25) >>> 0;\n hi >>>= 7;\n }\n while (lo > 127) {\n buf[pos++] = lo & 127 | 128;\n lo = lo >>> 7;\n }\n buf[pos++] = lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(42);\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(38);\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/node_modules/protobufjs/dist/minimal/protobuf.js b/node_modules/protobufjs/dist/minimal/protobuf.js deleted file mode 100644 index 59fe622..0000000 --- a/node_modules/protobufjs/dist/minimal/protobuf.js +++ /dev/null @@ -1,2834 +0,0 @@ -/*! - * protobuf.js v7.6.1 (c) 2016, daniel wirtz - * compiled fri, 22 may 2026 02:52:08 utc - * licensed under the bsd-3-clause license - * see: https://github.com/dcodeio/protobuf.js for details - */ -(function(undefined){"use strict";(function prelude(modules, cache, entries) { - - // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS - // sources through a conflict-free require shim and is again wrapped within an iife that - // provides a minification-friendly `undefined` var plus a global "use strict" directive - // so that minification can remove the directives of each module. - - function $require(name) { - var $module = cache[name]; - if (!$module) - modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports); - return $module.exports; - } - - var protobuf = $require(entries[0]); - - // Expose globally - protobuf.util.global.protobuf = protobuf; - - // Be nice to AMD - if (typeof define === "function" && define.amd) - define(["long"], function(Long) { - if (Long && Long.isLong) { - protobuf.util.Long = Long; - protobuf.configure(); - } - return protobuf; - }); - - // Be nice to CommonJS - if (typeof module === "object" && module && module.exports) - module.exports = protobuf; - -})/* end of prelude */({1:[function(require,module,exports){ -"use strict"; -module.exports = asPromise; - -/** - * Callback as used by {@link util.asPromise}. - * @typedef asPromiseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {...*} params Additional arguments - * @returns {undefined} - */ - -/** - * Returns a promise from a node-style callback function. - * @memberof util - * @param {asPromiseCallback} fn Function to call - * @param {*} ctx Function context - * @param {...*} params Function arguments - * @returns {Promise<*>} Promisified function - */ -function asPromise(fn, ctx/*, varargs */) { - var params = new Array(arguments.length - 1), - offset = 0, - index = 2, - pending = true; - while (index < arguments.length) - params[offset++] = arguments[index++]; - return new Promise(function executor(resolve, reject) { - params[offset] = function callback(err/*, varargs */) { - if (pending) { - pending = false; - if (err) - reject(err); - else { - var params = new Array(arguments.length - 1), - offset = 0; - while (offset < params.length) - params[offset++] = arguments[offset]; - resolve.apply(null, params); - } - } - }; - try { - fn.apply(ctx || null, params); - } catch (err) { - if (pending) { - pending = false; - reject(err); - } - } - }); -} - -},{}],2:[function(require,module,exports){ -"use strict"; - -/** - * A minimal base64 implementation for number arrays. - * @memberof util - * @namespace - */ -var base64 = exports; - -/** - * Calculates the byte length of a base64 encoded string. - * @param {string} string Base64 encoded string - * @returns {number} Byte length - */ -base64.length = function length(string) { - var p = string.length; - if (!p) - return 0; - var n = 0; - while (--p % 4 > 1 && string.charAt(p) === "=") - ++n; - return Math.ceil(string.length * 3) / 4 - n; -}; - -// Base64 encoding table -var b64 = new Array(64); - -// Base64 decoding table -var s64 = new Array(123); - -// 65..90, 97..122, 48..57, 43, 47 -for (var i = 0; i < 64;) - s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; - -/** - * Encodes a buffer to a base64 encoded string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} Base64 encoded string - */ -base64.encode = function encode(buffer, start, end) { - var parts = null, - chunk = []; - var i = 0, // output index - j = 0, // goto index - t; // temporary - while (start < end) { - var b = buffer[start++]; - switch (j) { - case 0: - chunk[i++] = b64[b >> 2]; - t = (b & 3) << 4; - j = 1; - break; - case 1: - chunk[i++] = b64[t | b >> 4]; - t = (b & 15) << 2; - j = 2; - break; - case 2: - chunk[i++] = b64[t | b >> 6]; - chunk[i++] = b64[b & 63]; - j = 0; - break; - } - if (i > 8191) { - (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); - i = 0; - } - } - if (j) { - chunk[i++] = b64[t]; - chunk[i++] = 61; - if (j === 1) - chunk[i++] = 61; - } - if (parts) { - if (i) - parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); - return parts.join(""); - } - return String.fromCharCode.apply(String, chunk.slice(0, i)); -}; - -var invalidEncoding = "invalid encoding"; - -/** - * Decodes a base64 encoded string to a buffer. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Number of bytes written - * @throws {Error} If encoding is invalid - */ -base64.decode = function decode(string, buffer, offset) { - var start = offset; - var j = 0, // goto index - t; // temporary - for (var i = 0; i < string.length;) { - var c = string.charCodeAt(i++); - if (c === 61 && j > 1) - break; - if ((c = s64[c]) === undefined) - throw Error(invalidEncoding); - switch (j) { - case 0: - t = c; - j = 1; - break; - case 1: - buffer[offset++] = t << 2 | (c & 48) >> 4; - t = c; - j = 2; - break; - case 2: - buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; - t = c; - j = 3; - break; - case 3: - buffer[offset++] = (t & 3) << 6 | c; - j = 0; - break; - } - } - if (j === 1) - throw Error(invalidEncoding); - return offset - start; -}; - -/** - * Tests if the specified string appears to be base64 encoded. - * @param {string} string String to test - * @returns {boolean} `true` if probably base64 encoded, otherwise false - */ -base64.test = function test(string) { - return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); -}; - -},{}],3:[function(require,module,exports){ -"use strict"; -module.exports = EventEmitter; - -/** - * Constructs a new event emitter instance. - * @classdesc A minimal event emitter. - * @memberof util - * @constructor - */ -function EventEmitter() { - - /** - * Registered listeners. - * @type {Object.} - * @private - */ - this._listeners = Object.create(null); -} - -/** - * Event listener as used by {@link util.EventEmitter}. - * @typedef EventEmitterListener - * @type {function} - * @param {...*} args Arguments - * @returns {undefined} - */ - -/** - * Registers an event listener. - * @param {string} evt Event name - * @param {EventEmitterListener} fn Listener - * @param {*} [ctx] Listener context - * @returns {this} `this` - */ -EventEmitter.prototype.on = function on(evt, fn, ctx) { - (this._listeners[evt] || (this._listeners[evt] = [])).push({ - fn : fn, - ctx : ctx || this - }); - return this; -}; - -/** - * Removes an event listener or any matching listeners if arguments are omitted. - * @param {string} [evt] Event name. Removes all listeners if omitted. - * @param {EventEmitterListener} [fn] Listener to remove. Removes all listeners of `evt` if omitted. - * @returns {this} `this` - */ -EventEmitter.prototype.off = function off(evt, fn) { - if (evt === undefined) - this._listeners = Object.create(null); - else { - if (fn === undefined) - this._listeners[evt] = []; - else { - var listeners = this._listeners[evt]; - if (!listeners) - return this; - for (var i = 0; i < listeners.length;) - if (listeners[i].fn === fn) - listeners.splice(i, 1); - else - ++i; - } - } - return this; -}; - -/** - * Emits an event by calling its listeners with the specified arguments. - * @param {string} evt Event name - * @param {...*} args Arguments - * @returns {this} `this` - */ -EventEmitter.prototype.emit = function emit(evt) { - var listeners = this._listeners[evt]; - if (listeners) { - var args = [], - i = 1; - for (; i < arguments.length;) - args.push(arguments[i++]); - for (i = 0; i < listeners.length;) - listeners[i].fn.apply(listeners[i++].ctx, args); - } - return this; -}; - -},{}],4:[function(require,module,exports){ -"use strict"; - -module.exports = factory(factory); - -/** - * Reads / writes floats / doubles from / to buffers. - * @name util.float - * @namespace - */ - -/** - * Writes a 32 bit float to a buffer using little endian byte order. - * @name util.float.writeFloatLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Writes a 32 bit float to a buffer using big endian byte order. - * @name util.float.writeFloatBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Reads a 32 bit float from a buffer using little endian byte order. - * @name util.float.readFloatLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Reads a 32 bit float from a buffer using big endian byte order. - * @name util.float.readFloatBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Writes a 64 bit double to a buffer using little endian byte order. - * @name util.float.writeDoubleLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Writes a 64 bit double to a buffer using big endian byte order. - * @name util.float.writeDoubleBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Reads a 64 bit double from a buffer using little endian byte order. - * @name util.float.readDoubleLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Reads a 64 bit double from a buffer using big endian byte order. - * @name util.float.readDoubleBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -// Factory function for the purpose of node-based testing in modified global environments -function factory(exports) { - - // float: typed array - if (typeof Float32Array !== "undefined") (function() { - - var f32 = new Float32Array([ -0 ]), - f8b = new Uint8Array(f32.buffer), - le = f8b[3] === 128; - - function writeFloat_f32_cpy(val, buf, pos) { - f32[0] = val; - buf[pos ] = f8b[0]; - buf[pos + 1] = f8b[1]; - buf[pos + 2] = f8b[2]; - buf[pos + 3] = f8b[3]; - } - - function writeFloat_f32_rev(val, buf, pos) { - f32[0] = val; - buf[pos ] = f8b[3]; - buf[pos + 1] = f8b[2]; - buf[pos + 2] = f8b[1]; - buf[pos + 3] = f8b[0]; - } - - /* istanbul ignore next */ - exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev; - /* istanbul ignore next */ - exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy; - - function readFloat_f32_cpy(buf, pos) { - f8b[0] = buf[pos ]; - f8b[1] = buf[pos + 1]; - f8b[2] = buf[pos + 2]; - f8b[3] = buf[pos + 3]; - return f32[0]; - } - - function readFloat_f32_rev(buf, pos) { - f8b[3] = buf[pos ]; - f8b[2] = buf[pos + 1]; - f8b[1] = buf[pos + 2]; - f8b[0] = buf[pos + 3]; - return f32[0]; - } - - /* istanbul ignore next */ - exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev; - /* istanbul ignore next */ - exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy; - - // float: ieee754 - })(); else (function() { - - function writeFloat_ieee754(writeUint, val, buf, pos) { - var sign = val < 0 ? 1 : 0; - if (sign) - val = -val; - if (val === 0) - writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos); - else if (isNaN(val)) - writeUint(2143289344, buf, pos); - else if (val > 3.4028234663852886e+38) // +-Infinity - writeUint((sign << 31 | 2139095040) >>> 0, buf, pos); - else if (val < 1.1754943508222875e-38) // denormal - writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos); - else { - var exponent = Math.floor(Math.log(val) / Math.LN2), - mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607; - writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos); - } - } - - exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE); - exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE); - - function readFloat_ieee754(readUint, buf, pos) { - var uint = readUint(buf, pos), - sign = (uint >> 31) * 2 + 1, - exponent = uint >>> 23 & 255, - mantissa = uint & 8388607; - return exponent === 255 - ? mantissa - ? NaN - : sign * Infinity - : exponent === 0 // denormal - ? sign * 1.401298464324817e-45 * mantissa - : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608); - } - - exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE); - exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE); - - })(); - - // double: typed array - if (typeof Float64Array !== "undefined") (function() { - - var f64 = new Float64Array([-0]), - f8b = new Uint8Array(f64.buffer), - le = f8b[7] === 128; - - function writeDouble_f64_cpy(val, buf, pos) { - f64[0] = val; - buf[pos ] = f8b[0]; - buf[pos + 1] = f8b[1]; - buf[pos + 2] = f8b[2]; - buf[pos + 3] = f8b[3]; - buf[pos + 4] = f8b[4]; - buf[pos + 5] = f8b[5]; - buf[pos + 6] = f8b[6]; - buf[pos + 7] = f8b[7]; - } - - function writeDouble_f64_rev(val, buf, pos) { - f64[0] = val; - buf[pos ] = f8b[7]; - buf[pos + 1] = f8b[6]; - buf[pos + 2] = f8b[5]; - buf[pos + 3] = f8b[4]; - buf[pos + 4] = f8b[3]; - buf[pos + 5] = f8b[2]; - buf[pos + 6] = f8b[1]; - buf[pos + 7] = f8b[0]; - } - - /* istanbul ignore next */ - exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev; - /* istanbul ignore next */ - exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy; - - function readDouble_f64_cpy(buf, pos) { - f8b[0] = buf[pos ]; - f8b[1] = buf[pos + 1]; - f8b[2] = buf[pos + 2]; - f8b[3] = buf[pos + 3]; - f8b[4] = buf[pos + 4]; - f8b[5] = buf[pos + 5]; - f8b[6] = buf[pos + 6]; - f8b[7] = buf[pos + 7]; - return f64[0]; - } - - function readDouble_f64_rev(buf, pos) { - f8b[7] = buf[pos ]; - f8b[6] = buf[pos + 1]; - f8b[5] = buf[pos + 2]; - f8b[4] = buf[pos + 3]; - f8b[3] = buf[pos + 4]; - f8b[2] = buf[pos + 5]; - f8b[1] = buf[pos + 6]; - f8b[0] = buf[pos + 7]; - return f64[0]; - } - - /* istanbul ignore next */ - exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev; - /* istanbul ignore next */ - exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy; - - // double: ieee754 - })(); else (function() { - - function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) { - var sign = val < 0 ? 1 : 0; - if (sign) - val = -val; - if (val === 0) { - writeUint(0, buf, pos + off0); - writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1); - } else if (isNaN(val)) { - writeUint(0, buf, pos + off0); - writeUint(2146959360, buf, pos + off1); - } else if (val > 1.7976931348623157e+308) { // +-Infinity - writeUint(0, buf, pos + off0); - writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1); - } else { - var mantissa; - if (val < 2.2250738585072014e-308) { // denormal - mantissa = val / 5e-324; - writeUint(mantissa >>> 0, buf, pos + off0); - writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1); - } else { - var exponent = Math.floor(Math.log(val) / Math.LN2); - if (exponent === 1024) - exponent = 1023; - mantissa = val * Math.pow(2, -exponent); - writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0); - writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1); - } - } - } - - exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4); - exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0); - - function readDouble_ieee754(readUint, off0, off1, buf, pos) { - var lo = readUint(buf, pos + off0), - hi = readUint(buf, pos + off1); - var sign = (hi >> 31) * 2 + 1, - exponent = hi >>> 20 & 2047, - mantissa = 4294967296 * (hi & 1048575) + lo; - return exponent === 2047 - ? mantissa - ? NaN - : sign * Infinity - : exponent === 0 // denormal - ? sign * 5e-324 * mantissa - : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496); - } - - exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4); - exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0); - - })(); - - return exports; -} - -// uint helpers - -function writeUintLE(val, buf, pos) { - buf[pos ] = val & 255; - buf[pos + 1] = val >>> 8 & 255; - buf[pos + 2] = val >>> 16 & 255; - buf[pos + 3] = val >>> 24; -} - -function writeUintBE(val, buf, pos) { - buf[pos ] = val >>> 24; - buf[pos + 1] = val >>> 16 & 255; - buf[pos + 2] = val >>> 8 & 255; - buf[pos + 3] = val & 255; -} - -function readUintLE(buf, pos) { - return (buf[pos ] - | buf[pos + 1] << 8 - | buf[pos + 2] << 16 - | buf[pos + 3] << 24) >>> 0; -} - -function readUintBE(buf, pos) { - return (buf[pos ] << 24 - | buf[pos + 1] << 16 - | buf[pos + 2] << 8 - | buf[pos + 3]) >>> 0; -} - -},{}],5:[function(require,module,exports){ -"use strict"; -module.exports = inquire; - -/** - * Requires a module only if available. - * @memberof util - * @param {string} moduleName Module to require - * @returns {?Object} Required module if available and not empty, otherwise `null` - * @deprecated Legacy optional require helper. Will be removed in a future release. - */ -function inquire(moduleName) { - try { - if (typeof require !== "function") { - return null; - } - var mod = require(moduleName); - if (mod && (mod.length || Object.keys(mod).length)) return mod; - return null; - } catch (err) { - // ignore - return null; - } -} - -/* -// maybe worth a shot to prevent renaming issues: -// see: https://github.com/webpack/webpack/blob/master/lib/dependencies/CommonJsRequireDependencyParserPlugin.js -// triggers on: -// - expression require.cache -// - expression require (???) -// - call require -// - call require:commonjs:item -// - call require:commonjs:context - -Object.defineProperty(Function.prototype, "__self", { get: function() { return this; } }); -var r = require.__self; -delete Function.prototype.__self; -*/ - -},{}],6:[function(require,module,exports){ -"use strict"; -module.exports = pool; - -/** - * An allocator as used by {@link util.pool}. - * @typedef PoolAllocator - * @type {function} - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ - -/** - * A slicer as used by {@link util.pool}. - * @typedef PoolSlicer - * @type {function} - * @param {number} start Start offset - * @param {number} end End offset - * @returns {Uint8Array} Buffer slice - * @this {Uint8Array} - */ - -/** - * A general purpose buffer pool. - * @memberof util - * @function - * @param {PoolAllocator} alloc Allocator - * @param {PoolSlicer} slice Slicer - * @param {number} [size=8192] Slab size - * @returns {PoolAllocator} Pooled allocator - */ -function pool(alloc, slice, size) { - var SIZE = size || 8192; - var MAX = SIZE >>> 1; - var slab = null; - var offset = SIZE; - return function pool_alloc(size) { - if (size < 1 || size > MAX) - return alloc(size); - if (offset + size > SIZE) { - slab = alloc(SIZE); - offset = 0; - } - var buf = slice.call(slab, offset, offset += size); - if (offset & 7) // align to 32 bit - offset = (offset | 7) + 1; - return buf; - }; -} - -},{}],7:[function(require,module,exports){ -"use strict"; - -/** - * A minimal UTF8 implementation for number arrays. - * @memberof util - * @namespace - */ -var utf8 = exports, - replacementChar = "\ufffd"; - -/** - * Calculates the UTF8 byte length of a string. - * @param {string} string String - * @returns {number} Byte length - */ -utf8.length = function utf8_length(string) { - var len = 0, - c = 0; - for (var i = 0; i < string.length; ++i) { - c = string.charCodeAt(i); - if (c < 128) - len += 1; - else if (c < 2048) - len += 2; - else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { - ++i; - len += 4; - } else - len += 3; - } - return len; -}; - -/** - * Reads UTF8 bytes as a string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} String read - */ -utf8.read = function utf8_read(buffer, start, end) { - if (end - start < 1) { - return ""; - } - - var str = ""; - for (var i = start; i < end;) { - var t = buffer[i++]; - if (t <= 0x7F) { - str += String.fromCharCode(t); - } else if (t >= 0xC0 && t < 0xE0) { - var c2 = (t & 0x1F) << 6 | buffer[i++] & 0x3F; - str += c2 >= 0x80 ? String.fromCharCode(c2) : replacementChar; - } else if (t >= 0xE0 && t < 0xF0) { - var c3 = (t & 0xF) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F; - str += c3 >= 0x800 ? String.fromCharCode(c3) : replacementChar; - } else if (t >= 0xF0) { - var t2 = (t & 7) << 18 | (buffer[i++] & 0x3F) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F; - if (t2 < 0x10000 || t2 > 0x10FFFF) - str += replacementChar; - else { - t2 -= 0x10000; - str += String.fromCharCode(0xD800 + (t2 >> 10)); - str += String.fromCharCode(0xDC00 + (t2 & 0x3FF)); - } - } - } - - return str; -}; - -/** - * Writes a string as UTF8 bytes. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Bytes written - */ -utf8.write = function utf8_write(string, buffer, offset) { - var start = offset, - c1, // character 1 - c2; // character 2 - for (var i = 0; i < string.length; ++i) { - c1 = string.charCodeAt(i); - if (c1 < 128) { - buffer[offset++] = c1; - } else if (c1 < 2048) { - buffer[offset++] = c1 >> 6 | 192; - buffer[offset++] = c1 & 63 | 128; - } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { - c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); - ++i; - buffer[offset++] = c1 >> 18 | 240; - buffer[offset++] = c1 >> 12 & 63 | 128; - buffer[offset++] = c1 >> 6 & 63 | 128; - buffer[offset++] = c1 & 63 | 128; - } else { - buffer[offset++] = c1 >> 12 | 224; - buffer[offset++] = c1 >> 6 & 63 | 128; - buffer[offset++] = c1 & 63 | 128; - } - } - return offset - start; -}; - -},{}],8:[function(require,module,exports){ -"use strict"; -var protobuf = exports; - -/** - * Build type, one of `"full"`, `"light"` or `"minimal"`. - * @name build - * @type {string} - * @const - */ -protobuf.build = "minimal"; - -// Serialization -protobuf.Writer = require(16); -protobuf.BufferWriter = require(17); -protobuf.Reader = require(9); -protobuf.BufferReader = require(10); - -// Utility -protobuf.util = require(15); -protobuf.rpc = require(12); -protobuf.roots = require(11); -protobuf.configure = configure; - -/* istanbul ignore next */ -/** - * Reconfigures the library according to the environment. - * @returns {undefined} - */ -function configure() { - protobuf.util._configure(); - protobuf.Writer._configure(protobuf.BufferWriter); - protobuf.Reader._configure(protobuf.BufferReader); -} - -// Set up buffer utility according to the environment -configure(); - -},{"10":10,"11":11,"12":12,"15":15,"16":16,"17":17,"9":9}],9:[function(require,module,exports){ -"use strict"; -module.exports = Reader; - -var util = require(15); - -var BufferReader; // cyclic - -var LongBits = util.LongBits, - utf8 = util.utf8; - -/* istanbul ignore next */ -function indexOutOfRange(reader, writeLength) { - return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len); -} - -/** - * Constructs a new reader instance using the specified buffer. - * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`. - * @constructor - * @param {Uint8Array} buffer Buffer to read from - */ -function Reader(buffer) { - - /** - * Read buffer. - * @type {Uint8Array} - */ - this.buf = buffer; - - /** - * Read buffer position. - * @type {number} - */ - this.pos = 0; - - /** - * Read buffer length. - * @type {number} - */ - this.len = buffer.length; -} - -var create_array = typeof Uint8Array !== "undefined" - ? function create_typed_array(buffer) { - if (buffer instanceof Uint8Array || Array.isArray(buffer)) - return new Reader(buffer); - throw Error("illegal buffer"); - } - /* istanbul ignore next */ - : function create_array(buffer) { - if (Array.isArray(buffer)) - return new Reader(buffer); - throw Error("illegal buffer"); - }; - -var create = function create() { - return util.Buffer - ? function create_buffer_setup(buffer) { - return (Reader.create = function create_buffer(buffer) { - return util.Buffer.isBuffer(buffer) - ? new BufferReader(buffer) - /* istanbul ignore next */ - : create_array(buffer); - })(buffer); - } - /* istanbul ignore next */ - : create_array; -}; - -/** - * Creates a new reader using the specified buffer. - * @function - * @param {Uint8Array|Buffer} buffer Buffer to read from - * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} - * @throws {Error} If `buffer` is not a valid buffer - */ -Reader.create = create(); - -Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice; - -/** - * Reads a varint as an unsigned 32 bit value. - * @function - * @returns {number} Value read - */ -Reader.prototype.uint32 = (function read_uint32_setup() { - var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!) - return function read_uint32() { - value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value; - - /* istanbul ignore if */ - if ((this.pos += 5) > this.len) { - this.pos = this.len; - throw indexOutOfRange(this, 10); - } - return value; - }; -})(); - -/** - * Reads a varint as a signed 32 bit value. - * @returns {number} Value read - */ -Reader.prototype.int32 = function read_int32() { - return this.uint32() | 0; -}; - -/** - * Reads a zig-zag encoded varint as a signed 32 bit value. - * @returns {number} Value read - */ -Reader.prototype.sint32 = function read_sint32() { - var value = this.uint32(); - return value >>> 1 ^ -(value & 1) | 0; -}; - -/* eslint-disable no-invalid-this */ - -function readLongVarint() { - // tends to deopt with local vars for octet etc. - var bits = new LongBits(0, 0); - var i = 0; - if (this.len - this.pos > 4) { // fast route (lo) - for (; i < 4; ++i) { - // 1st..4th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - // 5th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; - bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - i = 0; - } else { - for (; i < 3; ++i) { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - // 1st..3th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - // 4th - bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; - return bits; - } - if (this.len - this.pos > 4) { // fast route (hi) - for (; i < 5; ++i) { - // 6th..10th - bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - } else { - for (; i < 5; ++i) { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - // 6th..10th - bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - } - /* istanbul ignore next */ - throw Error("invalid varint encoding"); -} - -/* eslint-enable no-invalid-this */ - -/** - * Reads a varint as a signed 64 bit value. - * @name Reader#int64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a varint as an unsigned 64 bit value. - * @name Reader#uint64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a zig-zag encoded varint as a signed 64 bit value. - * @name Reader#sint64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a varint as a boolean. - * @returns {boolean} Value read - */ -Reader.prototype.bool = function read_bool() { - return this.uint32() !== 0; -}; - -function readFixed32_end(buf, end) { // note that this uses `end`, not `pos` - return (buf[end - 4] - | buf[end - 3] << 8 - | buf[end - 2] << 16 - | buf[end - 1] << 24) >>> 0; -} - -/** - * Reads fixed 32 bits as an unsigned 32 bit integer. - * @returns {number} Value read - */ -Reader.prototype.fixed32 = function read_fixed32() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - return readFixed32_end(this.buf, this.pos += 4); -}; - -/** - * Reads fixed 32 bits as a signed 32 bit integer. - * @returns {number} Value read - */ -Reader.prototype.sfixed32 = function read_sfixed32() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - return readFixed32_end(this.buf, this.pos += 4) | 0; -}; - -/* eslint-disable no-invalid-this */ - -function readFixed64(/* this: Reader */) { - - /* istanbul ignore if */ - if (this.pos + 8 > this.len) - throw indexOutOfRange(this, 8); - - return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4)); -} - -/* eslint-enable no-invalid-this */ - -/** - * Reads fixed 64 bits. - * @name Reader#fixed64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads zig-zag encoded fixed 64 bits. - * @name Reader#sfixed64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a float (32 bit) as a number. - * @function - * @returns {number} Value read - */ -Reader.prototype.float = function read_float() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - var value = util.float.readFloatLE(this.buf, this.pos); - this.pos += 4; - return value; -}; - -/** - * Reads a double (64 bit float) as a number. - * @function - * @returns {number} Value read - */ -Reader.prototype.double = function read_double() { - - /* istanbul ignore if */ - if (this.pos + 8 > this.len) - throw indexOutOfRange(this, 4); - - var value = util.float.readDoubleLE(this.buf, this.pos); - this.pos += 8; - return value; -}; - -/** - * Reads a sequence of bytes preceeded by its length as a varint. - * @returns {Uint8Array} Value read - */ -Reader.prototype.bytes = function read_bytes() { - var length = this.uint32(), - start = this.pos, - end = this.pos + length; - - /* istanbul ignore if */ - if (end > this.len) - throw indexOutOfRange(this, length); - - this.pos += length; - if (Array.isArray(this.buf)) // plain array - return this.buf.slice(start, end); - - if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1 - var nativeBuffer = util.Buffer; - return nativeBuffer - ? nativeBuffer.alloc(0) - : new this.buf.constructor(0); - } - return this._slice.call(this.buf, start, end); -}; - -/** - * Reads a string preceeded by its byte length as a varint. - * @returns {string} Value read - */ -Reader.prototype.string = function read_string() { - var bytes = this.bytes(); - return utf8.read(bytes, 0, bytes.length); -}; - -/** - * Skips the specified number of bytes if specified, otherwise skips a varint. - * @param {number} [length] Length if known, otherwise a varint is assumed - * @returns {Reader} `this` - */ -Reader.prototype.skip = function skip(length) { - if (typeof length === "number") { - /* istanbul ignore if */ - if (this.pos + length > this.len) - throw indexOutOfRange(this, length); - this.pos += length; - } else { - do { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - } while (this.buf[this.pos++] & 128); - } - return this; -}; - -/** - * Recursion limit. - * @type {number} - */ -Reader.recursionLimit = util.recursionLimit; - -/** - * Skips the next element of the specified wire type. - * @param {number} wireType Wire type received - * @param {number} [depth] Depth of recursion to control nested calls; 0 if omitted - * @returns {Reader} `this` - */ -Reader.prototype.skipType = function(wireType, depth) { - if (depth === undefined) depth = 0; - if (depth > Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - switch (wireType) { - case 0: - this.skip(); - break; - case 1: - this.skip(8); - break; - case 2: - this.skip(this.uint32()); - break; - case 3: - while ((wireType = this.uint32() & 7) !== 4) { - this.skipType(wireType, depth + 1); - } - break; - case 5: - this.skip(4); - break; - - /* istanbul ignore next */ - default: - throw Error("invalid wire type " + wireType + " at offset " + this.pos); - } - return this; -}; - -Reader._configure = function(BufferReader_) { - BufferReader = BufferReader_; - Reader.create = create(); - BufferReader._configure(); - - var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; - util.merge(Reader.prototype, { - - int64: function read_int64() { - return readLongVarint.call(this)[fn](false); - }, - - uint64: function read_uint64() { - return readLongVarint.call(this)[fn](true); - }, - - sint64: function read_sint64() { - return readLongVarint.call(this).zzDecode()[fn](false); - }, - - fixed64: function read_fixed64() { - return readFixed64.call(this)[fn](true); - }, - - sfixed64: function read_sfixed64() { - return readFixed64.call(this)[fn](false); - } - - }); -}; - -},{"15":15}],10:[function(require,module,exports){ -"use strict"; -module.exports = BufferReader; - -// extends Reader -var Reader = require(9); -(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; - -var util = require(15); - -/** - * Constructs a new buffer reader instance. - * @classdesc Wire format reader using node buffers. - * @extends Reader - * @constructor - * @param {Buffer} buffer Buffer to read from - */ -function BufferReader(buffer) { - Reader.call(this, buffer); - - /** - * Read buffer. - * @name BufferReader#buf - * @type {Buffer} - */ -} - -BufferReader._configure = function () { - /* istanbul ignore else */ - if (util.Buffer) - BufferReader.prototype._slice = util.Buffer.prototype.slice; -}; - - -/** - * @override - */ -BufferReader.prototype.string = function read_string_buffer() { - var len = this.uint32(); // modifies pos - return this.buf.utf8Slice - ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) - : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len)); -}; - -/** - * Reads a sequence of bytes preceeded by its length as a varint. - * @name BufferReader#bytes - * @function - * @returns {Buffer} Value read - */ - -BufferReader._configure(); - -},{"15":15,"9":9}],11:[function(require,module,exports){ -"use strict"; -module.exports = {}; - -/** - * Named roots. - * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). - * Can also be used manually to make roots available across modules. - * @name roots - * @type {Object.} - * @example - * // pbjs -r myroot -o compiled.js ... - * - * // in another module: - * require("./compiled.js"); - * - * // in any subsequent module: - * var root = protobuf.roots["myroot"]; - */ - -},{}],12:[function(require,module,exports){ -"use strict"; - -/** - * Streaming RPC helpers. - * @namespace - */ -var rpc = exports; - -/** - * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. - * @typedef RPCImpl - * @type {function} - * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called - * @param {Uint8Array} requestData Request data - * @param {RPCImplCallback} callback Callback function - * @returns {undefined} - * @example - * function rpcImpl(method, requestData, callback) { - * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code - * throw Error("no such method"); - * asynchronouslyObtainAResponse(requestData, function(err, responseData) { - * callback(err, responseData); - * }); - * } - */ - -/** - * Node-style callback as used by {@link RPCImpl}. - * @typedef RPCImplCallback - * @type {function} - * @param {Error|null} error Error, if any, otherwise `null` - * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error - * @returns {undefined} - */ - -rpc.Service = require(13); - -},{"13":13}],13:[function(require,module,exports){ -"use strict"; -module.exports = Service; - -var util = require(15); - -// Extends EventEmitter -(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service; - -/** - * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. - * - * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. - * @typedef rpc.ServiceMethodCallback - * @template TRes extends Message - * @type {function} - * @param {Error|null} error Error, if any - * @param {TRes} [response] Response message - * @returns {undefined} - */ - -/** - * A service method part of a {@link rpc.Service} as created by {@link Service.create}. - * @typedef rpc.ServiceMethod - * @template TReq extends Message - * @template TRes extends Message - * @type {function} - * @param {TReq|Properties} request Request message or plain object - * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message - * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined` - */ - -/** - * Constructs a new RPC service instance. - * @classdesc An RPC service as returned by {@link Service#create}. - * @exports rpc.Service - * @extends util.EventEmitter - * @constructor - * @param {RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ -function Service(rpcImpl, requestDelimited, responseDelimited) { - - if (typeof rpcImpl !== "function") - throw TypeError("rpcImpl must be a function"); - - util.EventEmitter.call(this); - - /** - * RPC implementation. Becomes `null` once the service is ended. - * @type {RPCImpl|null} - */ - this.rpcImpl = rpcImpl; - - /** - * Whether requests are length-delimited. - * @type {boolean} - */ - this.requestDelimited = Boolean(requestDelimited); - - /** - * Whether responses are length-delimited. - * @type {boolean} - */ - this.responseDelimited = Boolean(responseDelimited); -} - -/** - * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. - * @param {Method|rpc.ServiceMethod} method Reflected or static method - * @param {Constructor} requestCtor Request constructor - * @param {Constructor} responseCtor Response constructor - * @param {TReq|Properties} request Request message or plain object - * @param {rpc.ServiceMethodCallback} callback Service callback - * @returns {undefined} - * @template TReq extends Message - * @template TRes extends Message - */ -Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) { - - if (!request) - throw TypeError("request must be specified"); - - var self = this; - if (!callback) - return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request); - - if (!self.rpcImpl) { - setTimeout(function() { callback(Error("already ended")); }, 0); - return undefined; - } - - try { - return self.rpcImpl( - method, - requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(), - function rpcCallback(err, response) { - - if (err) { - self.emit("error", err, method); - return callback(err); - } - - if (response === null) { - self.end(/* endedByRPC */ true); - return undefined; - } - - if (!(response instanceof responseCtor)) { - try { - response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response); - } catch (err) { - self.emit("error", err, method); - return callback(err); - } - } - - self.emit("data", response, method); - return callback(null, response); - } - ); - } catch (err) { - self.emit("error", err, method); - setTimeout(function() { callback(err); }, 0); - return undefined; - } -}; - -/** - * Ends this service and emits the `end` event. - * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. - * @returns {rpc.Service} `this` - */ -Service.prototype.end = function end(endedByRPC) { - if (this.rpcImpl) { - if (!endedByRPC) // signal end to rpcImpl - this.rpcImpl(null, null, null); - this.rpcImpl = null; - this.emit("end").off(); - } - return this; -}; - -},{"15":15}],14:[function(require,module,exports){ -"use strict"; -module.exports = LongBits; - -var util = require(15); - -/** - * Constructs new long bits. - * @classdesc Helper class for working with the low and high bits of a 64 bit value. - * @memberof util - * @constructor - * @param {number} lo Low 32 bits, unsigned - * @param {number} hi High 32 bits, unsigned - */ -function LongBits(lo, hi) { - - // note that the casts below are theoretically unnecessary as of today, but older statically - // generated converter code might still call the ctor with signed 32bits. kept for compat. - - /** - * Low bits. - * @type {number} - */ - this.lo = lo >>> 0; - - /** - * High bits. - * @type {number} - */ - this.hi = hi >>> 0; -} - -/** - * Zero bits. - * @memberof util.LongBits - * @type {util.LongBits} - */ -var zero = LongBits.zero = new LongBits(0, 0); - -zero.toNumber = function() { return 0; }; -zero.zzEncode = zero.zzDecode = function() { return this; }; -zero.length = function() { return 1; }; - -/** - * Zero hash. - * @memberof util.LongBits - * @type {string} - */ -var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; - -/** - * Constructs new long bits from the specified number. - * @param {number} value Value - * @returns {util.LongBits} Instance - */ -LongBits.fromNumber = function fromNumber(value) { - if (value === 0) - return zero; - var sign = value < 0; - if (sign) - value = -value; - var lo = value >>> 0, - hi = (value - lo) / 4294967296 >>> 0; - if (sign) { - hi = ~hi >>> 0; - lo = ~lo >>> 0; - if (++lo > 4294967295) { - lo = 0; - if (++hi > 4294967295) - hi = 0; - } - } - return new LongBits(lo, hi); -}; - -/** - * Constructs new long bits from a number, long or string. - * @param {Long|number|string} value Value - * @returns {util.LongBits} Instance - */ -LongBits.from = function from(value) { - if (typeof value === "number") - return LongBits.fromNumber(value); - if (util.isString(value)) { - /* istanbul ignore else */ - if (util.Long) - value = util.Long.fromString(value); - else - return LongBits.fromNumber(parseInt(value, 10)); - } - return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; -}; - -/** - * Converts this long bits to a possibly unsafe JavaScript number. - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {number} Possibly unsafe number - */ -LongBits.prototype.toNumber = function toNumber(unsigned) { - if (!unsigned && this.hi >>> 31) { - var lo = ~this.lo + 1 >>> 0, - hi = ~this.hi >>> 0; - if (!lo) - hi = hi + 1 >>> 0; - return -(lo + hi * 4294967296); - } - return this.lo + this.hi * 4294967296; -}; - -/** - * Converts this long bits to a long. - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long} Long - */ -LongBits.prototype.toLong = function toLong(unsigned) { - return util.Long - ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) - /* istanbul ignore next */ - : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; -}; - -var charCodeAt = String.prototype.charCodeAt; - -/** - * Constructs new long bits from the specified 8 characters long hash. - * @param {string} hash Hash - * @returns {util.LongBits} Bits - */ -LongBits.fromHash = function fromHash(hash) { - if (hash === zeroHash) - return zero; - return new LongBits( - ( charCodeAt.call(hash, 0) - | charCodeAt.call(hash, 1) << 8 - | charCodeAt.call(hash, 2) << 16 - | charCodeAt.call(hash, 3) << 24) >>> 0 - , - ( charCodeAt.call(hash, 4) - | charCodeAt.call(hash, 5) << 8 - | charCodeAt.call(hash, 6) << 16 - | charCodeAt.call(hash, 7) << 24) >>> 0 - ); -}; - -/** - * Converts this long bits to a 8 characters long hash. - * @returns {string} Hash - */ -LongBits.prototype.toHash = function toHash() { - return String.fromCharCode( - this.lo & 255, - this.lo >>> 8 & 255, - this.lo >>> 16 & 255, - this.lo >>> 24 , - this.hi & 255, - this.hi >>> 8 & 255, - this.hi >>> 16 & 255, - this.hi >>> 24 - ); -}; - -/** - * Zig-zag encodes this long bits. - * @returns {util.LongBits} `this` - */ -LongBits.prototype.zzEncode = function zzEncode() { - var mask = this.hi >> 31; - this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; - this.lo = ( this.lo << 1 ^ mask) >>> 0; - return this; -}; - -/** - * Zig-zag decodes this long bits. - * @returns {util.LongBits} `this` - */ -LongBits.prototype.zzDecode = function zzDecode() { - var mask = -(this.lo & 1); - this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; - this.hi = ( this.hi >>> 1 ^ mask) >>> 0; - return this; -}; - -/** - * Calculates the length of this longbits when encoded as a varint. - * @returns {number} Length - */ -LongBits.prototype.length = function length() { - var part0 = this.lo, - part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, - part2 = this.hi >>> 24; - return part2 === 0 - ? part1 === 0 - ? part0 < 16384 - ? part0 < 128 ? 1 : 2 - : part0 < 2097152 ? 3 : 4 - : part1 < 16384 - ? part1 < 128 ? 5 : 6 - : part1 < 2097152 ? 7 : 8 - : part2 < 128 ? 9 : 10; -}; - -},{"15":15}],15:[function(require,module,exports){ -"use strict"; -var util = exports; - -// used to return a Promise where callback is omitted -util.asPromise = require(1); - -// converts to / from base64 encoded strings -util.base64 = require(2); - -// base class of rpc.Service -util.EventEmitter = require(3); - -// float handling accross browsers -util.float = require(4); - -// requires modules optionally and hides the call from bundlers -util.inquire = require(5); - -// converts to / from utf8 encoded strings -util.utf8 = require(7); - -// provides a node-like buffer pool in the browser -util.pool = require(6); - -// utility to work with the low and high bits of a 64 bit value -util.LongBits = require(14); - -/** - * Tests if the specified key can affect object prototypes. - * @memberof util - * @param {string} key Key to test - * @returns {boolean} `true` if the key is unsafe - */ -function isUnsafeProperty(key) { - return key === "__proto__" || key === "prototype" || key === "constructor"; -} - -util.isUnsafeProperty = isUnsafeProperty; - -/** - * Whether running within node or not. - * @memberof util - * @type {boolean} - */ -util.isNode = Boolean(typeof global !== "undefined" - && global - && global.process - && global.process.versions - && global.process.versions.node); - -/** - * Global object reference. - * @memberof util - * @type {Object} - */ -util.global = util.isNode && global - || typeof window !== "undefined" && window - || typeof self !== "undefined" && self - || this; // eslint-disable-line no-invalid-this - -/** - * An immuable empty array. - * @memberof util - * @type {Array.<*>} - * @const - */ -util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes - -/** - * An immutable empty object. - * @type {Object} - * @const - */ -util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes - -/** - * Tests if the specified value is an integer. - * @function - * @param {*} value Value to test - * @returns {boolean} `true` if the value is an integer - */ -util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) { - return typeof value === "number" && isFinite(value) && Math.floor(value) === value; -}; - -/** - * Tests if the specified value is a string. - * @param {*} value Value to test - * @returns {boolean} `true` if the value is a string - */ -util.isString = function isString(value) { - return typeof value === "string" || value instanceof String; -}; - -/** - * Tests if the specified value is a non-null object. - * @param {*} value Value to test - * @returns {boolean} `true` if the value is a non-null object - */ -util.isObject = function isObject(value) { - return value && typeof value === "object"; -}; - -/** - * Checks if a property on a message is considered to be present. - * This is an alias of {@link util.isSet}. - * @function - * @param {Object} obj Plain object or message instance - * @param {string} prop Property name - * @returns {boolean} `true` if considered to be present, otherwise `false` - */ -util.isset = - -/** - * Checks if a property on a message is considered to be present. - * @param {Object} obj Plain object or message instance - * @param {string} prop Property name - * @returns {boolean} `true` if considered to be present, otherwise `false` - */ -util.isSet = function isSet(obj, prop) { - var value = obj[prop]; - if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins - return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0; - return false; -}; - -/** - * Any compatible Buffer instance. - * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. - * @interface Buffer - * @extends Uint8Array - */ - -/** - * Node's Buffer class if available. - * @type {Constructor} - */ -util.Buffer = (function() { - try { - var Buffer = util.global.Buffer; - // refuse to use non-node buffers if not explicitly assigned (perf reasons): - return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; - } catch (e) { - /* istanbul ignore next */ - return null; - } -})(); - -// Internal alias of or polyfull for Buffer.from. -util._Buffer_from = null; - -// Internal alias of or polyfill for Buffer.allocUnsafe. -util._Buffer_allocUnsafe = null; - -/** - * Creates a new buffer of whatever type supported by the environment. - * @param {number|number[]} [sizeOrArray=0] Buffer size or number array - * @returns {Uint8Array|Buffer} Buffer - */ -util.newBuffer = function newBuffer(sizeOrArray) { - /* istanbul ignore next */ - return typeof sizeOrArray === "number" - ? util.Buffer - ? util._Buffer_allocUnsafe(sizeOrArray) - : new util.Array(sizeOrArray) - : util.Buffer - ? util._Buffer_from(sizeOrArray) - : typeof Uint8Array === "undefined" - ? sizeOrArray - : new Uint8Array(sizeOrArray); -}; - -/** - * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. - * @type {Constructor} - */ -util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array; - -/** - * Any compatible Long instance. - * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. - * @interface Long - * @property {number} low Low bits - * @property {number} high High bits - * @property {boolean} unsigned Whether unsigned or not - */ - -/** - * Long.js's Long class if available. - * @type {Constructor} - */ -util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long - || /* istanbul ignore next */ util.global.Long - || (function() { - try { - var Long = require("long"); - return Long && Long.isLong ? Long : null; - } catch (e) { - /* istanbul ignore next */ - return null; - } - })(); - -/** - * Regular expression used to verify 2 bit (`bool`) map keys. - * @type {RegExp} - * @const - */ -util.key2Re = /^true|false|0|1$/; - -/** - * Regular expression used to verify 32 bit (`int32` etc.) map keys. - * @type {RegExp} - * @const - */ -util.key32Re = /^-?(?:0|[1-9][0-9]*)$/; - -/** - * Regular expression used to verify 64 bit (`int64` etc.) map keys. - * @type {RegExp} - * @const - */ -util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/; - -/** - * Converts a number or long to an 8 characters long hash string. - * @param {Long|number} value Value to convert - * @returns {string} Hash - */ -util.longToHash = function longToHash(value) { - return value - ? util.LongBits.from(value).toHash() - : util.LongBits.zeroHash; -}; - -/** - * Converts an 8 characters long hash string to a long or number. - * @param {string} hash Hash - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long|number} Original value - */ -util.longFromHash = function longFromHash(hash, unsigned) { - var bits = util.LongBits.fromHash(hash); - if (util.Long) - return util.Long.fromBits(bits.lo, bits.hi, unsigned); - return bits.toNumber(Boolean(unsigned)); -}; - -/** - * Merges the properties of the source object into the destination object. - * @memberof util - * @param {Object.} dst Destination object - * @param {...(Object.|boolean)} src Source objects, optionally followed by an `ifNotSet` flag - * @returns {Object.} Destination object - */ -function merge(dst) { // used by converters - var ifNotSet = typeof arguments[arguments.length - 1] === "boolean", - limit = ifNotSet ? arguments.length - 1 : arguments.length; - ifNotSet = ifNotSet && arguments[arguments.length - 1]; - for (var a = 1; a < limit; ++a) { - var src = arguments[a]; - if (!src) - continue; - for (var keys = Object.keys(src), i = 0; i < keys.length; ++i) - if (!isUnsafeProperty(keys[i]) && (dst[keys[i]] === undefined || !ifNotSet)) - dst[keys[i]] = src[keys[i]]; - } - return dst; -} - -util.merge = merge; - -/** - * Schema declaration nesting limit. - * @memberof util - * @type {number} - */ -util.nestingLimit = 32; // protoc: MaxMessageDeclarationNestingDepth - -/** - * Recursion limit. - * @memberof util - * @type {number} - */ -util.recursionLimit = 100; // protoc: CodedInputStream::default_recursion_limit_ - -/** - * Makes a property safe for assignment as an own property. - * @memberof util - * @param {Object.} obj Object - * @param {string} key Property key - * @returns {undefined} - */ -util.makeProp = function makeProp(obj, key) { - Object.defineProperty(obj, key, { - enumerable: true, - configurable: true, - writable: true - }); -}; - -/** - * Converts the first character of a string to lower case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.lcFirst = function lcFirst(str) { - return str.charAt(0).toLowerCase() + str.substring(1); -}; - -/** - * Creates a custom error constructor. - * @memberof util - * @param {string} name Error name - * @returns {Constructor} Custom error constructor - */ -function newError(name) { - - function CustomError(message, properties) { - - if (!(this instanceof CustomError)) - return new CustomError(message, properties); - - // Error.call(this, message); - // ^ just returns a new error instance because the ctor can be called as a function - - Object.defineProperty(this, "message", { get: function() { return message; } }); - - /* istanbul ignore next */ - if (Error.captureStackTrace) // node - Error.captureStackTrace(this, CustomError); - else - Object.defineProperty(this, "stack", { value: new Error().stack || "" }); - - if (properties) - merge(this, properties); - } - - CustomError.prototype = Object.create(Error.prototype, { - constructor: { - value: CustomError, - writable: true, - enumerable: false, - configurable: true, - }, - name: { - get: function get() { return name; }, - set: undefined, - enumerable: false, - // configurable: false would accurately preserve the behavior of - // the original, but I'm guessing that was not intentional. - // For an actual error subclass, this property would - // be configurable. - configurable: true, - }, - toString: { - value: function value() { return this.name + ": " + this.message; }, - writable: true, - enumerable: false, - configurable: true, - }, - }); - - return CustomError; -} - -util.newError = newError; - -/** - * Constructs a new protocol error. - * @classdesc Error subclass indicating a protocol specifc error. - * @memberof util - * @extends Error - * @template T extends Message - * @constructor - * @param {string} message Error message - * @param {Object.} [properties] Additional properties - * @example - * try { - * MyMessage.decode(someBuffer); // throws if required fields are missing - * } catch (e) { - * if (e instanceof ProtocolError && e.instance) - * console.log("decoded so far: " + JSON.stringify(e.instance)); - * } - */ -util.ProtocolError = newError("ProtocolError"); - -/** - * So far decoded message instance. - * @name util.ProtocolError#instance - * @type {Message} - */ - -/** - * A OneOf getter as returned by {@link util.oneOfGetter}. - * @typedef OneOfGetter - * @type {function} - * @returns {string|undefined} Set field name, if any - */ - -/** - * Builds a getter for a oneof's present field name. - * @param {string[]} fieldNames Field names - * @returns {OneOfGetter} Unbound getter - */ -util.oneOfGetter = function getOneOf(fieldNames) { - var fieldMap = {}; - for (var i = 0; i < fieldNames.length; ++i) - fieldMap[fieldNames[i]] = 1; - - /** - * @returns {string|undefined} Set field name, if any - * @this Object - * @ignore - */ - return function() { // eslint-disable-line consistent-return - for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i) - if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null) - return keys[i]; - }; -}; - -/** - * A OneOf setter as returned by {@link util.oneOfSetter}. - * @typedef OneOfSetter - * @type {function} - * @param {string|undefined} value Field name - * @returns {undefined} - */ - -/** - * Builds a setter for a oneof's present field name. - * @param {string[]} fieldNames Field names - * @returns {OneOfSetter} Unbound setter - */ -util.oneOfSetter = function setOneOf(fieldNames) { - - /** - * @param {string} name Field name - * @returns {undefined} - * @this Object - * @ignore - */ - return function(name) { - for (var i = 0; i < fieldNames.length; ++i) - if (fieldNames[i] !== name) - delete this[fieldNames[i]]; - }; -}; - -/** - * Default conversion options used for {@link Message#toJSON} implementations. - * - * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: - * - * - Longs become strings - * - Enums become string keys - * - Bytes become base64 encoded strings - * - (Sub-)Messages become plain objects - * - Maps become plain objects with all string keys - * - Repeated fields become arrays - * - NaN and Infinity for float and double fields become strings - * - * @type {IConversionOptions} - * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json - */ -util.toJSONOptions = { - longs: String, - enums: String, - bytes: String, - json: true -}; - -// Sets up buffer utility according to the environment (called in index-minimal) -util._configure = function() { - var Buffer = util.Buffer; - /* istanbul ignore if */ - if (!Buffer) { - util._Buffer_from = util._Buffer_allocUnsafe = null; - return; - } - // because node 4.x buffers are incompatible & immutable - // see: https://github.com/dcodeIO/protobuf.js/pull/665 - util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || - /* istanbul ignore next */ - function Buffer_from(value, encoding) { - return new Buffer(value, encoding); - }; - util._Buffer_allocUnsafe = Buffer.allocUnsafe || - /* istanbul ignore next */ - function Buffer_allocUnsafe(size) { - return new Buffer(size); - }; -}; - -},{"1":1,"14":14,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"long":"long"}],16:[function(require,module,exports){ -"use strict"; -module.exports = Writer; - -var util = require(15); - -var BufferWriter; // cyclic - -var LongBits = util.LongBits, - base64 = util.base64, - utf8 = util.utf8; - -/** - * Constructs a new writer operation instance. - * @classdesc Scheduled writer operation. - * @constructor - * @param {function(*, Uint8Array, number)} fn Function to call - * @param {number} len Value byte length - * @param {*} val Value to write - * @ignore - */ -function Op(fn, len, val) { - - /** - * Function to call. - * @type {function(Uint8Array, number, *)} - */ - this.fn = fn; - - /** - * Value byte length. - * @type {number} - */ - this.len = len; - - /** - * Next operation. - * @type {Writer.Op|undefined} - */ - this.next = undefined; - - /** - * Value to write. - * @type {*} - */ - this.val = val; // type varies -} - -/* istanbul ignore next */ -function noop() {} // eslint-disable-line no-empty-function - -/** - * Constructs a new writer state instance. - * @classdesc Copied writer state. - * @memberof Writer - * @constructor - * @param {Writer} writer Writer to copy state from - * @ignore - */ -function State(writer) { - - /** - * Current head. - * @type {Writer.Op} - */ - this.head = writer.head; - - /** - * Current tail. - * @type {Writer.Op} - */ - this.tail = writer.tail; - - /** - * Current buffer length. - * @type {number} - */ - this.len = writer.len; - - /** - * Next state. - * @type {State|null} - */ - this.next = writer.states; -} - -/** - * Constructs a new writer instance. - * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`. - * @constructor - */ -function Writer() { - - /** - * Current length. - * @type {number} - */ - this.len = 0; - - /** - * Operations head. - * @type {Object} - */ - this.head = new Op(noop, 0, 0); - - /** - * Operations tail - * @type {Object} - */ - this.tail = this.head; - - /** - * Linked forked states. - * @type {Object|null} - */ - this.states = null; - - // When a value is written, the writer calculates its byte length and puts it into a linked - // list of operations to perform when finish() is called. This both allows us to allocate - // buffers of the exact required size and reduces the amount of work we have to do compared - // to first calculating over objects and then encoding over objects. In our case, the encoding - // part is just a linked list walk calling operations with already prepared values. -} - -var create = function create() { - return util.Buffer - ? function create_buffer_setup() { - return (Writer.create = function create_buffer() { - return new BufferWriter(); - })(); - } - /* istanbul ignore next */ - : function create_array() { - return new Writer(); - }; -}; - -/** - * Creates a new writer. - * @function - * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} - */ -Writer.create = create(); - -/** - * Allocates a buffer of the specified size. - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ -Writer.alloc = function alloc(size) { - return new util.Array(size); -}; - -// Use Uint8Array buffer pool in the browser, just like node does with buffers -/* istanbul ignore else */ -if (util.Array !== Array) - Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray); - -/** - * Pushes a new operation to the queue. - * @param {function(Uint8Array, number, *)} fn Function to call - * @param {number} len Value byte length - * @param {number} val Value to write - * @returns {Writer} `this` - * @private - */ -Writer.prototype._push = function push(fn, len, val) { - this.tail = this.tail.next = new Op(fn, len, val); - this.len += len; - return this; -}; - -function writeByte(val, buf, pos) { - buf[pos] = val & 255; -} - -function writeVarint32(val, buf, pos) { - while (val > 127) { - buf[pos++] = val & 127 | 128; - val >>>= 7; - } - buf[pos] = val; -} - -/** - * Constructs a new varint writer operation instance. - * @classdesc Scheduled varint writer operation. - * @extends Op - * @constructor - * @param {number} len Value byte length - * @param {number} val Value to write - * @ignore - */ -function VarintOp(len, val) { - this.len = len; - this.next = undefined; - this.val = val; -} - -VarintOp.prototype = Object.create(Op.prototype); -VarintOp.prototype.fn = writeVarint32; - -/** - * Writes an unsigned 32 bit value as a varint. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.uint32 = function write_uint32(value) { - // here, the call to this.push has been inlined and a varint specific Op subclass is used. - // uint32 is by far the most frequently used operation and benefits significantly from this. - this.len += (this.tail = this.tail.next = new VarintOp( - (value = value >>> 0) - < 128 ? 1 - : value < 16384 ? 2 - : value < 2097152 ? 3 - : value < 268435456 ? 4 - : 5, - value)).len; - return this; -}; - -/** - * Writes a signed 32 bit value as a varint. - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.int32 = function write_int32(value) { - return (value |= 0) < 0 - ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec - : this.uint32(value); -}; - -/** - * Writes a 32 bit value as a varint, zig-zag encoded. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.sint32 = function write_sint32(value) { - return this.uint32((value << 1 ^ value >> 31) >>> 0); -}; - -function writeVarint64(val, buf, pos) { - var lo = val.lo, - hi = val.hi; - while (hi) { - buf[pos++] = lo & 127 | 128; - lo = (lo >>> 7 | hi << 25) >>> 0; - hi >>>= 7; - } - while (lo > 127) { - buf[pos++] = lo & 127 | 128; - lo = lo >>> 7; - } - buf[pos++] = lo; -} - -/** - * Writes an unsigned 64 bit value as a varint. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.uint64 = function write_uint64(value) { - var bits = LongBits.from(value); - return this._push(writeVarint64, bits.length(), bits); -}; - -/** - * Writes a signed 64 bit value as a varint. - * @function - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.int64 = Writer.prototype.uint64; - -/** - * Writes a signed 64 bit value as a varint, zig-zag encoded. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.sint64 = function write_sint64(value) { - var bits = LongBits.from(value).zzEncode(); - return this._push(writeVarint64, bits.length(), bits); -}; - -/** - * Writes a boolish value as a varint. - * @param {boolean} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.bool = function write_bool(value) { - return this._push(writeByte, 1, value ? 1 : 0); -}; - -function writeFixed32(val, buf, pos) { - buf[pos ] = val & 255; - buf[pos + 1] = val >>> 8 & 255; - buf[pos + 2] = val >>> 16 & 255; - buf[pos + 3] = val >>> 24; -} - -/** - * Writes an unsigned 32 bit value as fixed 32 bits. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.fixed32 = function write_fixed32(value) { - return this._push(writeFixed32, 4, value >>> 0); -}; - -/** - * Writes a signed 32 bit value as fixed 32 bits. - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.sfixed32 = Writer.prototype.fixed32; - -/** - * Writes an unsigned 64 bit value as fixed 64 bits. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.fixed64 = function write_fixed64(value) { - var bits = LongBits.from(value); - return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); -}; - -/** - * Writes a signed 64 bit value as fixed 64 bits. - * @function - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.sfixed64 = Writer.prototype.fixed64; - -/** - * Writes a float (32 bit). - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.float = function write_float(value) { - return this._push(util.float.writeFloatLE, 4, value); -}; - -/** - * Writes a double (64 bit float). - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.double = function write_double(value) { - return this._push(util.float.writeDoubleLE, 8, value); -}; - -var writeBytes = util.Array.prototype.set - ? function writeBytes_set(val, buf, pos) { - buf.set(val, pos); // also works for plain array values - } - /* istanbul ignore next */ - : function writeBytes_for(val, buf, pos) { - for (var i = 0; i < val.length; ++i) - buf[pos + i] = val[i]; - }; - -/** - * Writes a sequence of bytes. - * @param {Uint8Array|string} value Buffer or base64 encoded string to write - * @returns {Writer} `this` - */ -Writer.prototype.bytes = function write_bytes(value) { - var len = value.length >>> 0; - if (!len) - return this._push(writeByte, 1, 0); - if (util.isString(value)) { - var buf = Writer.alloc(len = base64.length(value)); - base64.decode(value, buf, 0); - value = buf; - } - return this.uint32(len)._push(writeBytes, len, value); -}; - -/** - * Writes a string. - * @param {string} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.string = function write_string(value) { - var len = utf8.length(value); - return len - ? this.uint32(len)._push(utf8.write, len, value) - : this._push(writeByte, 1, 0); -}; - -/** - * Forks this writer's state by pushing it to a stack. - * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. - * @returns {Writer} `this` - */ -Writer.prototype.fork = function fork() { - this.states = new State(this); - this.head = this.tail = new Op(noop, 0, 0); - this.len = 0; - return this; -}; - -/** - * Resets this instance to the last state. - * @returns {Writer} `this` - */ -Writer.prototype.reset = function reset() { - if (this.states) { - this.head = this.states.head; - this.tail = this.states.tail; - this.len = this.states.len; - this.states = this.states.next; - } else { - this.head = this.tail = new Op(noop, 0, 0); - this.len = 0; - } - return this; -}; - -/** - * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. - * @returns {Writer} `this` - */ -Writer.prototype.ldelim = function ldelim() { - var head = this.head, - tail = this.tail, - len = this.len; - this.reset().uint32(len); - if (len) { - this.tail.next = head.next; // skip noop - this.tail = tail; - this.len += len; - } - return this; -}; - -/** - * Finishes the write operation. - * @returns {Uint8Array} Finished buffer - */ -Writer.prototype.finish = function finish() { - var head = this.head.next, // skip noop - buf = this.constructor.alloc(this.len), - pos = 0; - while (head) { - head.fn(head.val, buf, pos); - pos += head.len; - head = head.next; - } - // this.head = this.tail = null; - return buf; -}; - -Writer._configure = function(BufferWriter_) { - BufferWriter = BufferWriter_; - Writer.create = create(); - BufferWriter._configure(); -}; - -},{"15":15}],17:[function(require,module,exports){ -"use strict"; -module.exports = BufferWriter; - -// extends Writer -var Writer = require(16); -(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; - -var util = require(15); - -/** - * Constructs a new buffer writer instance. - * @classdesc Wire format writer using node buffers. - * @extends Writer - * @constructor - */ -function BufferWriter() { - Writer.call(this); -} - -BufferWriter._configure = function () { - /** - * Allocates a buffer of the specified size. - * @function - * @param {number} size Buffer size - * @returns {Buffer} Buffer - */ - BufferWriter.alloc = util._Buffer_allocUnsafe; - - BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" - ? function writeBytesBuffer_set(val, buf, pos) { - buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) - // also works for plain array values - } - /* istanbul ignore next */ - : function writeBytesBuffer_copy(val, buf, pos) { - if (val.copy) // Buffer values - val.copy(buf, pos, 0, val.length); - else for (var i = 0; i < val.length;) // plain array values - buf[pos++] = val[i++]; - }; -}; - - -/** - * @override - */ -BufferWriter.prototype.bytes = function write_bytes_buffer(value) { - if (util.isString(value)) - value = util._Buffer_from(value, "base64"); - var len = value.length >>> 0; - this.uint32(len); - if (len) - this._push(BufferWriter.writeBytesBuffer, len, value); - return this; -}; - -function writeStringBuffer(val, buf, pos) { - if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) - util.utf8.write(val, buf, pos); - else if (buf.utf8Write) - buf.utf8Write(val, pos); - else - buf.write(val, pos); -} - -/** - * @override - */ -BufferWriter.prototype.string = function write_string_buffer(value) { - var len = util.Buffer.byteLength(value); - this.uint32(len); - if (len) - this._push(writeStringBuffer, len, value); - return this; -}; - - -/** - * Finishes the write operation. - * @name BufferWriter#finish - * @function - * @returns {Buffer} Finished buffer - */ - -BufferWriter._configure(); - -},{"15":15,"16":16}]},{},[8]) - -})(); -//# sourceMappingURL=protobuf.js.map diff --git a/node_modules/protobufjs/dist/minimal/protobuf.js.map b/node_modules/protobufjs/dist/minimal/protobuf.js.map deleted file mode 100644 index 369a50d..0000000 --- a/node_modules/protobufjs/dist/minimal/protobuf.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["lib/prelude.js","../node_modules/@protobufjs/aspromise/index.js","../node_modules/@protobufjs/base64/index.js","../node_modules/@protobufjs/eventemitter/index.js","../node_modules/@protobufjs/float/index.js","../node_modules/@protobufjs/inquire/index.js","../node_modules/@protobufjs/pool/index.js","../node_modules/@protobufjs/utf8/index.js","../src/index-minimal","../src/reader.js","../src/reader_buffer.js","../src/roots.js","../src/rpc.js","../src/rpc/service.js","../src/util/longbits.js","../src/util/minimal.js","../src/writer.js","../src/writer_buffer.js"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9eA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACndA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function prelude(modules, cache, entries) {\n\n // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS\n // sources through a conflict-free require shim and is again wrapped within an iife that\n // provides a minification-friendly `undefined` var plus a global \"use strict\" directive\n // so that minification can remove the directives of each module.\n\n function $require(name) {\n var $module = cache[name];\n if (!$module)\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n return $module.exports;\n }\n\n var protobuf = $require(entries[0]);\n\n // Expose globally\n protobuf.util.global.protobuf = protobuf;\n\n // Be nice to AMD\n if (typeof define === \"function\" && define.amd)\n define([\"long\"], function(Long) {\n if (Long && Long.isLong) {\n protobuf.util.Long = Long;\n protobuf.configure();\n }\n return protobuf;\n });\n\n // Be nice to CommonJS\n if (typeof module === \"object\" && module && module.exports)\n module.exports = protobuf;\n\n})/* end of prelude */","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = Object.create(null);\r\n}\r\n\r\n/**\r\n * Event listener as used by {@link util.EventEmitter}.\r\n * @typedef EventEmitterListener\r\n * @type {function}\r\n * @param {...*} args Arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {EventEmitterListener} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {EventEmitterListener} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = Object.create(null);\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n if (!listeners)\r\n return this;\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n * @deprecated Legacy optional require helper. Will be removed in a future release.\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n if (typeof require !== \"function\") {\r\n return null;\r\n }\r\n var mod = require(moduleName);\r\n if (mod && (mod.length || Object.keys(mod).length)) return mod;\r\n return null;\r\n } catch (err) {\r\n // ignore\r\n return null;\r\n }\r\n}\r\n\r\n/*\r\n// maybe worth a shot to prevent renaming issues:\r\n// see: https://github.com/webpack/webpack/blob/master/lib/dependencies/CommonJsRequireDependencyParserPlugin.js\r\n// triggers on:\r\n// - expression require.cache\r\n// - expression require (???)\r\n// - call require\r\n// - call require:commonjs:item\r\n// - call require:commonjs:context\r\n\r\nObject.defineProperty(Function.prototype, \"__self\", { get: function() { return this; } });\r\nvar r = require.__self;\r\ndelete Function.prototype.__self;\r\n*/\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports,\r\n replacementChar = \"\\ufffd\";\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n if (end - start < 1) {\r\n return \"\";\r\n }\r\n\r\n var str = \"\";\r\n for (var i = start; i < end;) {\r\n var t = buffer[i++];\r\n if (t <= 0x7F) {\r\n str += String.fromCharCode(t);\r\n } else if (t >= 0xC0 && t < 0xE0) {\r\n var c2 = (t & 0x1F) << 6 | buffer[i++] & 0x3F;\r\n str += c2 >= 0x80 ? String.fromCharCode(c2) : replacementChar;\r\n } else if (t >= 0xE0 && t < 0xF0) {\r\n var c3 = (t & 0xF) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F;\r\n str += c3 >= 0x800 ? String.fromCharCode(c3) : replacementChar;\r\n } else if (t >= 0xF0) {\r\n var t2 = (t & 7) << 18 | (buffer[i++] & 0x3F) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F;\r\n if (t2 < 0x10000 || t2 > 0x10FFFF)\r\n str += replacementChar;\r\n else {\r\n t2 -= 0x10000;\r\n str += String.fromCharCode(0xD800 + (t2 >> 10));\r\n str += String.fromCharCode(0xDC00 + (t2 & 0x3FF));\r\n }\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(16);\nprotobuf.BufferWriter = require(17);\nprotobuf.Reader = require(9);\nprotobuf.BufferReader = require(10);\n\n// Utility\nprotobuf.util = require(15);\nprotobuf.rpc = require(12);\nprotobuf.roots = require(11);\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(15);\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Recursion limit.\n * @type {number}\n */\nReader.recursionLimit = util.recursionLimit;\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @param {number} [depth] Depth of recursion to control nested calls; 0 if omitted\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType, depth) {\n if (depth === undefined) depth = 0;\n if (depth > Reader.recursionLimit)\n throw Error(\"maximum nesting depth exceeded\");\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType, depth + 1);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(9);\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(15);\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(13);\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(15);\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(15);\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(1);\n\n// converts to / from base64 encoded strings\nutil.base64 = require(2);\n\n// base class of rpc.Service\nutil.EventEmitter = require(3);\n\n// float handling accross browsers\nutil.float = require(4);\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(5);\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(7);\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(6);\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(14);\n\n/**\n * Tests if the specified key can affect object prototypes.\n * @memberof util\n * @param {string} key Key to test\n * @returns {boolean} `true` if the key is unsafe\n */\nfunction isUnsafeProperty(key) {\n return key === \"__proto__\" || key === \"prototype\" || key === \"constructor\";\n}\n\nutil.isUnsafeProperty = isUnsafeProperty;\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.global.Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || (function() {\n try {\n var Long = require(\"long\");\n return Long && Long.isLong ? Long : null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n })();\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {...(Object.|boolean)} src Source objects, optionally followed by an `ifNotSet` flag\n * @returns {Object.} Destination object\n */\nfunction merge(dst) { // used by converters\n var ifNotSet = typeof arguments[arguments.length - 1] === \"boolean\",\n limit = ifNotSet ? arguments.length - 1 : arguments.length;\n ifNotSet = ifNotSet && arguments[arguments.length - 1];\n for (var a = 1; a < limit; ++a) {\n var src = arguments[a];\n if (!src)\n continue;\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (!isUnsafeProperty(keys[i]) && (dst[keys[i]] === undefined || !ifNotSet))\n dst[keys[i]] = src[keys[i]];\n }\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Schema declaration nesting limit.\n * @memberof util\n * @type {number}\n */\nutil.nestingLimit = 32; // protoc: MaxMessageDeclarationNestingDepth\n\n/**\n * Recursion limit.\n * @memberof util\n * @type {number}\n */\nutil.recursionLimit = 100; // protoc: CodedInputStream::default_recursion_limit_\n\n/**\n * Makes a property safe for assignment as an own property.\n * @memberof util\n * @param {Object.} obj Object\n * @param {string} key Property key\n * @returns {undefined}\n */\nutil.makeProp = function makeProp(obj, key) {\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n writable: true\n });\n};\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(15);\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return (value |= 0) < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n var lo = val.lo,\n hi = val.hi;\n while (hi) {\n buf[pos++] = lo & 127 | 128;\n lo = (lo >>> 7 | hi << 25) >>> 0;\n hi >>>= 7;\n }\n while (lo > 127) {\n buf[pos++] = lo & 127 | 128;\n lo = lo >>> 7;\n }\n buf[pos++] = lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(16);\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(15);\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/node_modules/protobufjs/dist/minimal/protobuf.min.js b/node_modules/protobufjs/dist/minimal/protobuf.min.js deleted file mode 100644 index 547f672..0000000 --- a/node_modules/protobufjs/dist/minimal/protobuf.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * protobuf.js v7.6.1 (c) 2016, daniel wirtz - * compiled fri, 22 may 2026 02:52:09 utc - * licensed under the bsd-3-clause license - * see: https://github.com/dcodeio/protobuf.js for details - */ -!function(d){"use strict";var r,u,n;r={1:[function(t,n,i){n.exports=function(t,n){var i=Array(arguments.length-1),e=0,r=2,s=!0;for(;r>2],r=(3&o)<<4,h=1;break;case 1:e[s++]=f[r|o>>4],r=(15&o)<<2,h=2;break;case 2:e[s++]=f[r|o>>6],e[s++]=f[63&o],h=0}8191>4,r=h,e=2;break;case 2:n[i++]=(15&r)<<4|(60&h)>>2,r=h,e=3;break;case 3:n[i++]=(3&r)<<6|h,e=0}}if(1===e)throw Error(c);return i-u},i.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},{}],3:[function(t,n,i){function r(){this.t=Object.create(null)}(n.exports=r).prototype.on=function(t,n,i){return(this.t[t]||(this.t[t]=[])).push({fn:n,ctx:i||this}),this},r.prototype.off=function(t,n){if(t===d)this.t=Object.create(null);else if(n===d)this.t[t]=[];else{var i=this.t[t];if(!i)return this;for(var r=0;r>>0:n<11754943508222875e-54?(u<<31|Math.round(n/1401298464324817e-60))>>>0:(u<<31|127+(t=Math.floor(Math.log(n)/Math.LN2))<<23|8388607&Math.round(n*Math.pow(2,-t)*8388608))>>>0,i,r)}function i(t,n,i){t=t(n,i),n=2*(t>>31)+1,i=t>>>23&255,t&=8388607;return 255==i?t?NaN:1/0*n:0==i?1401298464324817e-60*n*t:n*Math.pow(2,i-150)*(8388608+t)}function r(t,n,i){h[0]=t,n[i]=o[0],n[i+1]=o[1],n[i+2]=o[2],n[i+3]=o[3]}function u(t,n,i){h[0]=t,n[i]=o[3],n[i+1]=o[2],n[i+2]=o[1],n[i+3]=o[0]}function e(t,n){return o[0]=t[n],o[1]=t[n+1],o[2]=t[n+2],o[3]=t[n+3],h[0]}function s(t,n){return o[3]=t[n],o[2]=t[n+1],o[1]=t[n+2],o[0]=t[n+3],h[0]}var h,o,f,c,a;function l(t,n,i,r,u,e){var s,h=r<0?1:0;0===(r=h?-r:r)?(t(0,u,e+n),t(0<1/r?0:2147483648,u,e+i)):isNaN(r)?(t(0,u,e+n),t(2146959360,u,e+i)):17976931348623157e292>>0,u,e+i)):r<22250738585072014e-324?(t((s=r/5e-324)>>>0,u,e+n),t((h<<31|s/4294967296)>>>0,u,e+i)):(t(4503599627370496*(s=r*Math.pow(2,-(r=1024===(r=Math.floor(Math.log(r)/Math.LN2))?1023:r)))>>>0,u,e+n),t((h<<31|r+1023<<20|1048576*s&1048575)>>>0,u,e+i))}function v(t,n,i,r,u){n=t(r,u+n),t=t(r,u+i),r=2*(t>>31)+1,u=t>>>20&2047,i=4294967296*(1048575&t)+n;return 2047==u?i?NaN:1/0*r:0==u?5e-324*r*i:r*Math.pow(2,u-1075)*(i+4503599627370496)}function w(t,n,i){f[0]=t,n[i]=c[0],n[i+1]=c[1],n[i+2]=c[2],n[i+3]=c[3],n[i+4]=c[4],n[i+5]=c[5],n[i+6]=c[6],n[i+7]=c[7]}function b(t,n,i){f[0]=t,n[i]=c[7],n[i+1]=c[6],n[i+2]=c[5],n[i+3]=c[4],n[i+4]=c[3],n[i+5]=c[2],n[i+6]=c[1],n[i+7]=c[0]}function y(t,n){return c[0]=t[n],c[1]=t[n+1],c[2]=t[n+2],c[3]=t[n+3],c[4]=t[n+4],c[5]=t[n+5],c[6]=t[n+6],c[7]=t[n+7],f[0]}function g(t,n){return c[7]=t[n],c[6]=t[n+1],c[5]=t[n+2],c[4]=t[n+3],c[3]=t[n+4],c[2]=t[n+5],c[1]=t[n+6],c[0]=t[n+7],f[0]}return"undefined"!=typeof Float32Array?(h=new Float32Array([-0]),o=new Uint8Array(h.buffer),a=128===o[3],t.writeFloatLE=a?r:u,t.writeFloatBE=a?u:r,t.readFloatLE=a?e:s,t.readFloatBE=a?s:e):(t.writeFloatLE=n.bind(null,d),t.writeFloatBE=n.bind(null,p),t.readFloatLE=i.bind(null,m),t.readFloatBE=i.bind(null,A)),"undefined"!=typeof Float64Array?(f=new Float64Array([-0]),c=new Uint8Array(f.buffer),a=128===c[7],t.writeDoubleLE=a?w:b,t.writeDoubleBE=a?b:w,t.readDoubleLE=a?y:g,t.readDoubleBE=a?g:y):(t.writeDoubleLE=l.bind(null,d,0,4),t.writeDoubleBE=l.bind(null,p,4,0),t.readDoubleLE=v.bind(null,m,0,4),t.readDoubleBE=v.bind(null,A,4,0)),t}function d(t,n,i){n[i]=255&t,n[i+1]=t>>>8&255,n[i+2]=t>>>16&255,n[i+3]=t>>>24}function p(t,n,i){n[i]=t>>>24,n[i+1]=t>>>16&255,n[i+2]=t>>>8&255,n[i+3]=255&t}function m(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24)>>>0}function A(t,n){return(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])>>>0}n.exports=r(r)},{}],5:[function(i,t,n){t.exports=function(t){try{var n;return"function"!=typeof i?null:(n=i(t))&&(n.length||Object.keys(n).length)?n:null}catch(t){return null}}},{}],6:[function(t,n,i){n.exports=function(n,i,t){var r=t||8192,u=r>>>1,e=null,s=r;return function(t){if(t<1||u>10))+String.fromCharCode(56320+(1023&s)))}return r},i.write=function(t,n,i){for(var r,u,e=i,s=0;s>6|192:(55296==(64512&r)&&56320==(64512&(u=t.charCodeAt(s+1)))?(++s,n[i++]=(r=65536+((1023&r)<<10)+(1023&u))>>18|240,n[i++]=r>>12&63|128):n[i++]=r>>12|224,n[i++]=r>>6&63|128),n[i++]=63&r|128);return i-e}},{}],8:[function(t,n,i){var r=i;function u(){r.util.n(),r.Writer.n(r.BufferWriter),r.Reader.n(r.BufferReader)}r.build="minimal",r.Writer=t(16),r.BufferWriter=t(17),r.Reader=t(9),r.BufferReader=t(10),r.util=t(15),r.rpc=t(12),r.roots=t(11),r.configure=u,u()},{10:10,11:11,12:12,15:15,16:16,17:17,9:9}],9:[function(t,n,i){n.exports=o;var r,u=t(15),e=u.LongBits,s=u.utf8;function h(t,n){return RangeError("index out of range: "+t.pos+" + "+(n||1)+" > "+t.len)}function o(t){this.buf=t,this.pos=0,this.len=t.length}function f(){return u.Buffer?function(t){return(o.create=function(t){return u.Buffer.isBuffer(t)?new r(t):a(t)})(t)}:a}var c,a="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new o(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new o(t);throw Error("illegal buffer")};function l(){var t=new e(0,0),n=0;if(!(4=this.len)throw h(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*n)>>>0,t}for(;n<4;++n)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(n=0,4>>0,this.buf[this.pos++]<128)return t}else for(;n<5;++n){if(this.pos>=this.len)throw h(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function v(t,n){return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-1]<<24)>>>0}function w(){if(this.pos+8>this.len)throw h(this,8);return new e(v(this.buf,this.pos+=4),v(this.buf,this.pos+=4))}o.create=f(),o.prototype.i=u.Array.prototype.subarray||u.Array.prototype.slice,o.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128||(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128||!((this.pos+=5)>this.len))))))return c;throw this.pos=this.len,h(this,10)}),o.prototype.int32=function(){return 0|this.uint32()},o.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},o.prototype.bool=function(){return 0!==this.uint32()},o.prototype.fixed32=function(){if(this.pos+4>this.len)throw h(this,4);return v(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw h(this,4);return 0|v(this.buf,this.pos+=4)},o.prototype.float=function(){if(this.pos+4>this.len)throw h(this,4);var t=u.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},o.prototype.double=function(){if(this.pos+8>this.len)throw h(this,4);var t=u.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},o.prototype.bytes=function(){var t=this.uint32(),n=this.pos,i=this.pos+t;if(i>this.len)throw h(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(n,i):n===i?(t=u.Buffer)?t.alloc(0):new this.buf.constructor(0):this.i.call(this.buf,n,i)},o.prototype.string=function(){var t=this.bytes();return s.read(t,0,t.length)},o.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw h(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw h(this)}while(128&this.buf[this.pos++]);return this},o.recursionLimit=u.recursionLimit,o.prototype.skipType=function(t,n){if(o.recursionLimit<(n=n===d?0:n))throw Error("maximum nesting depth exceeded");switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t,n+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},o.n=function(t){r=t,o.create=f(),r.n();var n=u.Long?"toLong":"toNumber";u.merge(o.prototype,{int64:function(){return l.call(this)[n](!1)},uint64:function(){return l.call(this)[n](!0)},sint64:function(){return l.call(this).zzDecode()[n](!1)},fixed64:function(){return w.call(this)[n](!0)},sfixed64:function(){return w.call(this)[n](!1)}})}},{15:15}],10:[function(t,n,i){n.exports=e;var r=t(9),u=((e.prototype=Object.create(r.prototype)).constructor=e,t(15));function e(t){r.call(this,t)}e.n=function(){u.Buffer&&(e.prototype.i=u.Buffer.prototype.slice)},e.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},e.n()},{15:15,9:9}],11:[function(t,n,i){n.exports={}},{}],12:[function(t,n,i){i.Service=t(13)},{13:13}],13:[function(t,n,i){n.exports=r;var h=t(15);function r(t,n,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");h.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!n,this.responseDelimited=!!i}((r.prototype=Object.create(h.EventEmitter.prototype)).constructor=r).prototype.rpcCall=function t(i,n,r,u,e){if(!u)throw TypeError("request must be specified");var s=this;if(!e)return h.asPromise(t,s,i,n,r,u);if(!s.rpcImpl)return setTimeout(function(){e(Error("already ended"))},0),d;try{return s.rpcImpl(i,n[s.requestDelimited?"encodeDelimited":"encode"](u).finish(),function(t,n){if(t)return s.emit("error",t,i),e(t);if(null===n)return s.end(!0),d;if(!(n instanceof r))try{n=r[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return s.emit("error",t,i),e(t)}return s.emit("data",n,i),e(null,n)})}catch(t){return s.emit("error",t,i),setTimeout(function(){e(t)},0),d}},r.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{15:15}],14:[function(t,n,i){n.exports=u;var r=t(15);function u(t,n){this.lo=t>>>0,this.hi=n>>>0}var e=u.zero=new u(0,0),s=(e.toNumber=function(){return 0},e.zzEncode=e.zzDecode=function(){return this},e.length=function(){return 1},u.zeroHash="\0\0\0\0\0\0\0\0",u.fromNumber=function(t){var n,i;return 0===t?e:(i=(t=(n=t<0)?-t:t)>>>0,t=(t-i)/4294967296>>>0,n&&(t=~t>>>0,i=~i>>>0,4294967295<++i&&(i=0,4294967295<++t&&(t=0))),new u(i,t))},u.from=function(t){if("number"==typeof t)return u.fromNumber(t);if(r.isString(t)){if(!r.Long)return u.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new u(t.low>>>0,t.high>>>0):e},u.prototype.toNumber=function(t){var n;return!t&&this.hi>>>31?(t=1+~this.lo>>>0,n=~this.hi>>>0,-(t+4294967296*(n=t?n:n+1>>>0))):this.lo+4294967296*this.hi},u.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}},String.prototype.charCodeAt);u.fromHash=function(t){return"\0\0\0\0\0\0\0\0"===t?e:new u((s.call(t,0)|s.call(t,1)<<8|s.call(t,2)<<16|s.call(t,3)<<24)>>>0,(s.call(t,4)|s.call(t,5)<<8|s.call(t,6)<<16|s.call(t,7)<<24)>>>0)},u.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},u.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},u.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},u.prototype.length=function(){var t=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0==i?0==n?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:i<128?9:10}},{15:15}],15:[function(n,t,i){var r=i;function h(t){return"__proto__"===t||"prototype"===t||"constructor"===t}function u(t){for(var n=(i="boolean"==typeof arguments[arguments.length-1])?arguments.length-1:arguments.length,i=i&&arguments[arguments.length-1],r=1;r>>7|u<<25)>>>0,u>>>=7;for(;127>>=7;n[i++]=r}function y(t,n,i){n[i]=255&t,n[i+1]=t>>>8&255,n[i+2]=t>>>16&255,n[i+3]=t>>>24}a.create=l(),a.alloc=function(t){return new u.Array(t)},u.Array!==Array&&(a.alloc=u.pool(a.alloc,u.Array.prototype.subarray)),a.prototype.e=function(t,n,i){return this.tail=this.tail.next=new o(t,n,i),this.len+=n,this},(w.prototype=Object.create(o.prototype)).fn=function(t,n,i){for(;127>>=7;n[i]=t},a.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new w((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},a.prototype.int32=function(t){return(t|=0)<0?this.e(b,10,e.fromNumber(t)):this.uint32(t)},a.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},a.prototype.int64=a.prototype.uint64=function(t){t=e.from(t);return this.e(b,t.length(),t)},a.prototype.sint64=function(t){t=e.from(t).zzEncode();return this.e(b,t.length(),t)},a.prototype.bool=function(t){return this.e(v,1,t?1:0)},a.prototype.sfixed32=a.prototype.fixed32=function(t){return this.e(y,4,t>>>0)},a.prototype.sfixed64=a.prototype.fixed64=function(t){t=e.from(t);return this.e(y,4,t.lo).e(y,4,t.hi)},a.prototype.float=function(t){return this.e(u.float.writeFloatLE,4,t)},a.prototype.double=function(t){return this.e(u.float.writeDoubleLE,8,t)};var g=u.Array.prototype.set?function(t,n,i){n.set(t,i)}:function(t,n,i){for(var r=0;r>>0;return i?(u.isString(t)&&(n=a.alloc(i=s.length(t)),s.decode(t,n,0),t=n),this.uint32(i).e(g,i,t)):this.e(v,1,0)},a.prototype.string=function(t){var n=h.length(t);return n?this.uint32(n).e(h.write,n,t):this.e(v,1,0)},a.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new o(f,0,0),this.len=0,this},a.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new o(f,0,0),this.len=0),this},a.prototype.ldelim=function(){var t=this.head,n=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=t.next,this.tail=n,this.len+=i),this},a.prototype.finish=function(){for(var t=this.head.next,n=this.constructor.alloc(this.len),i=0;t;)t.fn(t.val,n,i),i+=t.len,t=t.next;return n},a.n=function(t){r=t,a.create=l(),r.n()}},{15:15}],17:[function(t,n,i){n.exports=e;var r=t(16),u=((e.prototype=Object.create(r.prototype)).constructor=e,t(15));function e(){r.call(this)}function s(t,n,i){t.length<40?u.utf8.write(t,n,i):n.utf8Write?n.utf8Write(t,i):n.write(t,i)}e.n=function(){e.alloc=u.u,e.writeBytesBuffer=u.Buffer&&u.Buffer.prototype instanceof Uint8Array&&"set"===u.Buffer.prototype.set.name?function(t,n,i){n.set(t,i)}:function(t,n,i){if(t.copy)t.copy(n,i,0,t.length);else for(var r=0;r>>0;return this.uint32(n),n&&this.e(e.writeBytesBuffer,n,t),this},e.prototype.string=function(t){var n=u.Buffer.byteLength(t);return this.uint32(n),n&&this.e(s,n,t),this},e.n()},{15:15,16:16}]},u={},(n=function t(n){var i=u[n];return i||r[n][0].call(i=u[n]={exports:{}},t,i,i.exports),i.exports}([8][0])).util.global.protobuf=n,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&t.isLong&&(n.util.Long=t,n.configure()),n}),"object"==typeof module&&module&&module.exports&&(module.exports=n)}(); -//# sourceMappingURL=protobuf.min.js.map diff --git a/node_modules/protobufjs/dist/minimal/protobuf.min.js.map b/node_modules/protobufjs/dist/minimal/protobuf.min.js.map deleted file mode 100644 index 4fe15bd..0000000 --- a/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["lib/prelude.js","../node_modules/@protobufjs/aspromise/index.js","../node_modules/@protobufjs/base64/index.js","../node_modules/@protobufjs/eventemitter/index.js","../node_modules/@protobufjs/float/index.js","../node_modules/@protobufjs/inquire/index.js","../node_modules/@protobufjs/pool/index.js","../node_modules/@protobufjs/utf8/index.js","../src/index-minimal","../src/reader.js","../src/reader_buffer.js","../src/roots.js","../src/rpc.js","../src/rpc/service.js","../src/util/longbits.js","../src/util/minimal.js","../src/writer.js","../src/writer_buffer.js"],"names":["undefined","modules","cache","protobuf","1","require","module","exports","fn","ctx","params","Array","arguments","length","offset","index","pending","Promise","resolve","reject","err","apply","base64","string","p","n","Math","ceil","b64","s64","i","encode","buffer","start","end","t","parts","chunk","j","b","push","String","fromCharCode","slice","join","invalidEncoding","decode","c","charCodeAt","Error","test","EventEmitter","this","_listeners","Object","create","prototype","on","evt","off","listeners","splice","emit","args","factory","writeFloat_ieee754","writeUint","val","buf","pos","sign","isNaN","round","exponent","floor","log","LN2","pow","readFloat_ieee754","readUint","uint","mantissa","NaN","Infinity","writeFloat_f32_cpy","f32","f8b","writeFloat_f32_rev","readFloat_f32_cpy","readFloat_f32_rev","f64","le","writeDouble_ieee754","off0","off1","readDouble_ieee754","lo","hi","writeDouble_f64_cpy","writeDouble_f64_rev","readDouble_f64_cpy","readDouble_f64_rev","Float32Array","Uint8Array","writeFloatLE","writeFloatBE","readFloatLE","readFloatBE","bind","writeUintLE","writeUintBE","readUintLE","readUintBE","Float64Array","writeDoubleLE","writeDoubleBE","readDoubleLE","readDoubleBE","moduleName","mod","keys","alloc","size","SIZE","MAX","slab","call","utf8","len","read","str","c3","c2","t2","write","c1","configure","util","_configure","Writer","BufferWriter","Reader","BufferReader","build","rpc","roots","LongBits","indexOutOfRange","reader","writeLength","RangeError","Buffer","isBuffer","create_array","value","isArray","readLongVarint","bits","readFixed32_end","readFixed64","_slice","subarray","uint32","int32","sint32","bool","fixed32","sfixed32","float","double","bytes","nativeBuffer","constructor","skip","recursionLimit","skipType","wireType","depth","BufferReader_","Long","merge","int64","uint64","sint64","zzDecode","fixed64","sfixed64","utf8Slice","min","toString","Service","rpcImpl","requestDelimited","responseDelimited","TypeError","Boolean","rpcCall","method","requestCtor","responseCtor","request","callback","self","asPromise","setTimeout","finish","response","endedByRPC","zero","toNumber","zzEncode","zeroHash","fromNumber","from","isString","parseInt","fromString","low","high","unsigned","toLong","fromHash","hash","toHash","mask","part0","part1","part2","isUnsafeProperty","key","dst","limit","ifNotSet","a","src","newError","name","CustomError","message","properties","defineProperty","get","captureStackTrace","stack","writable","enumerable","configurable","set","inquire","pool","isNode","global","process","versions","node","window","emptyArray","freeze","emptyObject","isInteger","Number","isFinite","isObject","isset","isSet","obj","prop","hasOwnProperty","utf8Write","e","_Buffer_from","_Buffer_allocUnsafe","newBuffer","sizeOrArray","dcodeIO","isLong","key2Re","key32Re","key64Re","longToHash","longFromHash","fromBits","nestingLimit","makeProp","lcFirst","toLowerCase","substring","ProtocolError","oneOfGetter","fieldNames","fieldMap","oneOfSetter","toJSONOptions","longs","enums","json","encoding","allocUnsafe","Op","next","noop","State","writer","head","tail","states","writeByte","VarintOp","writeVarint64","writeFixed32","_push","writeBytes","fork","reset","ldelim","BufferWriter_","writeStringBuffer","writeBytesBuffer","copy","byteLength","$require","$module","define","amd"],"mappings":";;;;;;AAAA,CAAA,SAAAA,GAAA,aAAA,IAAAC,EAAAC,EAcAC,EAdAF,EAiCA,CAAAG,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EA,EAAA,GAGAkI,KAAAkH,OAAAxP,SAAAA,EAGA,YAAA,OAAA+T,QAAAA,OAAAC,KACAD,OAAA,CAAA,QAAA,SAAA/I,GAKA,OAJAA,GAAAA,EAAAgG,SACAhR,EAAAsI,KAAA0C,KAAAA,EACAhL,EAAAqI,UAAA,GAEArI,CACA,CAAA,EAGA,UAAA,OAAAG,QAAAA,QAAAA,OAAAC,UACAD,OAAAC,QAAAJ","file":"protobuf.min.js","sourcesContent":["(function prelude(modules, cache, entries) {\n\n // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS\n // sources through a conflict-free require shim and is again wrapped within an iife that\n // provides a minification-friendly `undefined` var plus a global \"use strict\" directive\n // so that minification can remove the directives of each module.\n\n function $require(name) {\n var $module = cache[name];\n if (!$module)\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n return $module.exports;\n }\n\n var protobuf = $require(entries[0]);\n\n // Expose globally\n protobuf.util.global.protobuf = protobuf;\n\n // Be nice to AMD\n if (typeof define === \"function\" && define.amd)\n define([\"long\"], function(Long) {\n if (Long && Long.isLong) {\n protobuf.util.Long = Long;\n protobuf.configure();\n }\n return protobuf;\n });\n\n // Be nice to CommonJS\n if (typeof module === \"object\" && module && module.exports)\n module.exports = protobuf;\n\n})/* end of prelude */","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = Object.create(null);\r\n}\r\n\r\n/**\r\n * Event listener as used by {@link util.EventEmitter}.\r\n * @typedef EventEmitterListener\r\n * @type {function}\r\n * @param {...*} args Arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {EventEmitterListener} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {EventEmitterListener} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = Object.create(null);\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n if (!listeners)\r\n return this;\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n * @deprecated Legacy optional require helper. Will be removed in a future release.\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n if (typeof require !== \"function\") {\r\n return null;\r\n }\r\n var mod = require(moduleName);\r\n if (mod && (mod.length || Object.keys(mod).length)) return mod;\r\n return null;\r\n } catch (err) {\r\n // ignore\r\n return null;\r\n }\r\n}\r\n\r\n/*\r\n// maybe worth a shot to prevent renaming issues:\r\n// see: https://github.com/webpack/webpack/blob/master/lib/dependencies/CommonJsRequireDependencyParserPlugin.js\r\n// triggers on:\r\n// - expression require.cache\r\n// - expression require (???)\r\n// - call require\r\n// - call require:commonjs:item\r\n// - call require:commonjs:context\r\n\r\nObject.defineProperty(Function.prototype, \"__self\", { get: function() { return this; } });\r\nvar r = require.__self;\r\ndelete Function.prototype.__self;\r\n*/\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports,\r\n replacementChar = \"\\ufffd\";\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n if (end - start < 1) {\r\n return \"\";\r\n }\r\n\r\n var str = \"\";\r\n for (var i = start; i < end;) {\r\n var t = buffer[i++];\r\n if (t <= 0x7F) {\r\n str += String.fromCharCode(t);\r\n } else if (t >= 0xC0 && t < 0xE0) {\r\n var c2 = (t & 0x1F) << 6 | buffer[i++] & 0x3F;\r\n str += c2 >= 0x80 ? String.fromCharCode(c2) : replacementChar;\r\n } else if (t >= 0xE0 && t < 0xF0) {\r\n var c3 = (t & 0xF) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F;\r\n str += c3 >= 0x800 ? String.fromCharCode(c3) : replacementChar;\r\n } else if (t >= 0xF0) {\r\n var t2 = (t & 7) << 18 | (buffer[i++] & 0x3F) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F;\r\n if (t2 < 0x10000 || t2 > 0x10FFFF)\r\n str += replacementChar;\r\n else {\r\n t2 -= 0x10000;\r\n str += String.fromCharCode(0xD800 + (t2 >> 10));\r\n str += String.fromCharCode(0xDC00 + (t2 & 0x3FF));\r\n }\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(16);\nprotobuf.BufferWriter = require(17);\nprotobuf.Reader = require(9);\nprotobuf.BufferReader = require(10);\n\n// Utility\nprotobuf.util = require(15);\nprotobuf.rpc = require(12);\nprotobuf.roots = require(11);\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(15);\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Recursion limit.\n * @type {number}\n */\nReader.recursionLimit = util.recursionLimit;\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @param {number} [depth] Depth of recursion to control nested calls; 0 if omitted\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType, depth) {\n if (depth === undefined) depth = 0;\n if (depth > Reader.recursionLimit)\n throw Error(\"maximum nesting depth exceeded\");\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType, depth + 1);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(9);\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(15);\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(13);\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(15);\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(15);\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(1);\n\n// converts to / from base64 encoded strings\nutil.base64 = require(2);\n\n// base class of rpc.Service\nutil.EventEmitter = require(3);\n\n// float handling accross browsers\nutil.float = require(4);\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(5);\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(7);\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(6);\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(14);\n\n/**\n * Tests if the specified key can affect object prototypes.\n * @memberof util\n * @param {string} key Key to test\n * @returns {boolean} `true` if the key is unsafe\n */\nfunction isUnsafeProperty(key) {\n return key === \"__proto__\" || key === \"prototype\" || key === \"constructor\";\n}\n\nutil.isUnsafeProperty = isUnsafeProperty;\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.global.Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || (function() {\n try {\n var Long = require(\"long\");\n return Long && Long.isLong ? Long : null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n })();\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {...(Object.|boolean)} src Source objects, optionally followed by an `ifNotSet` flag\n * @returns {Object.} Destination object\n */\nfunction merge(dst) { // used by converters\n var ifNotSet = typeof arguments[arguments.length - 1] === \"boolean\",\n limit = ifNotSet ? arguments.length - 1 : arguments.length;\n ifNotSet = ifNotSet && arguments[arguments.length - 1];\n for (var a = 1; a < limit; ++a) {\n var src = arguments[a];\n if (!src)\n continue;\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (!isUnsafeProperty(keys[i]) && (dst[keys[i]] === undefined || !ifNotSet))\n dst[keys[i]] = src[keys[i]];\n }\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Schema declaration nesting limit.\n * @memberof util\n * @type {number}\n */\nutil.nestingLimit = 32; // protoc: MaxMessageDeclarationNestingDepth\n\n/**\n * Recursion limit.\n * @memberof util\n * @type {number}\n */\nutil.recursionLimit = 100; // protoc: CodedInputStream::default_recursion_limit_\n\n/**\n * Makes a property safe for assignment as an own property.\n * @memberof util\n * @param {Object.} obj Object\n * @param {string} key Property key\n * @returns {undefined}\n */\nutil.makeProp = function makeProp(obj, key) {\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n writable: true\n });\n};\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(15);\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return (value |= 0) < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n var lo = val.lo,\n hi = val.hi;\n while (hi) {\n buf[pos++] = lo & 127 | 128;\n lo = (lo >>> 7 | hi << 25) >>> 0;\n hi >>>= 7;\n }\n while (lo > 127) {\n buf[pos++] = lo & 127 | 128;\n lo = lo >>> 7;\n }\n buf[pos++] = lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(16);\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(15);\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/node_modules/protobufjs/dist/protobuf.js b/node_modules/protobufjs/dist/protobuf.js deleted file mode 100644 index 4df82a5..0000000 --- a/node_modules/protobufjs/dist/protobuf.js +++ /dev/null @@ -1,9905 +0,0 @@ -/*! - * protobuf.js v7.6.1 (c) 2016, daniel wirtz - * compiled fri, 22 may 2026 02:52:08 utc - * licensed under the bsd-3-clause license - * see: https://github.com/dcodeio/protobuf.js for details - */ -(function(undefined){"use strict";(function prelude(modules, cache, entries) { - - // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS - // sources through a conflict-free require shim and is again wrapped within an iife that - // provides a minification-friendly `undefined` var plus a global "use strict" directive - // so that minification can remove the directives of each module. - - function $require(name) { - var $module = cache[name]; - if (!$module) - modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports); - return $module.exports; - } - - var protobuf = $require(entries[0]); - - // Expose globally - protobuf.util.global.protobuf = protobuf; - - // Be nice to AMD - if (typeof define === "function" && define.amd) - define(["long"], function(Long) { - if (Long && Long.isLong) { - protobuf.util.Long = Long; - protobuf.configure(); - } - return protobuf; - }); - - // Be nice to CommonJS - if (typeof module === "object" && module && module.exports) - module.exports = protobuf; - -})/* end of prelude */({1:[function(require,module,exports){ -"use strict"; -module.exports = asPromise; - -/** - * Callback as used by {@link util.asPromise}. - * @typedef asPromiseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {...*} params Additional arguments - * @returns {undefined} - */ - -/** - * Returns a promise from a node-style callback function. - * @memberof util - * @param {asPromiseCallback} fn Function to call - * @param {*} ctx Function context - * @param {...*} params Function arguments - * @returns {Promise<*>} Promisified function - */ -function asPromise(fn, ctx/*, varargs */) { - var params = new Array(arguments.length - 1), - offset = 0, - index = 2, - pending = true; - while (index < arguments.length) - params[offset++] = arguments[index++]; - return new Promise(function executor(resolve, reject) { - params[offset] = function callback(err/*, varargs */) { - if (pending) { - pending = false; - if (err) - reject(err); - else { - var params = new Array(arguments.length - 1), - offset = 0; - while (offset < params.length) - params[offset++] = arguments[offset]; - resolve.apply(null, params); - } - } - }; - try { - fn.apply(ctx || null, params); - } catch (err) { - if (pending) { - pending = false; - reject(err); - } - } - }); -} - -},{}],2:[function(require,module,exports){ -"use strict"; - -/** - * A minimal base64 implementation for number arrays. - * @memberof util - * @namespace - */ -var base64 = exports; - -/** - * Calculates the byte length of a base64 encoded string. - * @param {string} string Base64 encoded string - * @returns {number} Byte length - */ -base64.length = function length(string) { - var p = string.length; - if (!p) - return 0; - var n = 0; - while (--p % 4 > 1 && string.charAt(p) === "=") - ++n; - return Math.ceil(string.length * 3) / 4 - n; -}; - -// Base64 encoding table -var b64 = new Array(64); - -// Base64 decoding table -var s64 = new Array(123); - -// 65..90, 97..122, 48..57, 43, 47 -for (var i = 0; i < 64;) - s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; - -/** - * Encodes a buffer to a base64 encoded string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} Base64 encoded string - */ -base64.encode = function encode(buffer, start, end) { - var parts = null, - chunk = []; - var i = 0, // output index - j = 0, // goto index - t; // temporary - while (start < end) { - var b = buffer[start++]; - switch (j) { - case 0: - chunk[i++] = b64[b >> 2]; - t = (b & 3) << 4; - j = 1; - break; - case 1: - chunk[i++] = b64[t | b >> 4]; - t = (b & 15) << 2; - j = 2; - break; - case 2: - chunk[i++] = b64[t | b >> 6]; - chunk[i++] = b64[b & 63]; - j = 0; - break; - } - if (i > 8191) { - (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); - i = 0; - } - } - if (j) { - chunk[i++] = b64[t]; - chunk[i++] = 61; - if (j === 1) - chunk[i++] = 61; - } - if (parts) { - if (i) - parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); - return parts.join(""); - } - return String.fromCharCode.apply(String, chunk.slice(0, i)); -}; - -var invalidEncoding = "invalid encoding"; - -/** - * Decodes a base64 encoded string to a buffer. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Number of bytes written - * @throws {Error} If encoding is invalid - */ -base64.decode = function decode(string, buffer, offset) { - var start = offset; - var j = 0, // goto index - t; // temporary - for (var i = 0; i < string.length;) { - var c = string.charCodeAt(i++); - if (c === 61 && j > 1) - break; - if ((c = s64[c]) === undefined) - throw Error(invalidEncoding); - switch (j) { - case 0: - t = c; - j = 1; - break; - case 1: - buffer[offset++] = t << 2 | (c & 48) >> 4; - t = c; - j = 2; - break; - case 2: - buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; - t = c; - j = 3; - break; - case 3: - buffer[offset++] = (t & 3) << 6 | c; - j = 0; - break; - } - } - if (j === 1) - throw Error(invalidEncoding); - return offset - start; -}; - -/** - * Tests if the specified string appears to be base64 encoded. - * @param {string} string String to test - * @returns {boolean} `true` if probably base64 encoded, otherwise false - */ -base64.test = function test(string) { - return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); -}; - -},{}],3:[function(require,module,exports){ -"use strict"; -module.exports = codegen; - -var reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/; - -/** - * Begins generating a function. - * @memberof util - * @param {string[]} functionParams Function parameter names - * @param {string} [functionName] Function name if not anonymous - * @returns {Codegen} Appender that appends code to the function's body - */ -function codegen(functionParams, functionName) { - - /* istanbul ignore if */ - if (typeof functionParams === "string") { - functionName = functionParams; - functionParams = undefined; - } - - var body = []; - - /** - * Appends code to the function's body or finishes generation. - * @typedef Codegen - * @type {function} - * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any - * @param {...*} [formatParams] Format parameters - * @returns {Codegen|Function} Itself or the generated function if finished - * @throws {Error} If format parameter counts do not match - */ - - function Codegen(formatStringOrScope) { - // note that explicit array handling below makes this ~50% faster - - // finish the function - if (typeof formatStringOrScope !== "string") { - var source = toString(); - if (codegen.verbose) - console.log("codegen: " + source); // eslint-disable-line no-console - source = "return " + source; - if (formatStringOrScope) { - var scopeKeys = Object.keys(formatStringOrScope), - scopeParams = new Array(scopeKeys.length + 1), - scopeValues = new Array(scopeKeys.length), - scopeOffset = 0; - while (scopeOffset < scopeKeys.length) { - scopeParams[scopeOffset] = scopeKeys[scopeOffset]; - scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]]; - } - scopeParams[scopeOffset] = source; - return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func - } - return Function(source)(); // eslint-disable-line no-new-func - } - - // otherwise append to body - var formatParams = new Array(arguments.length - 1), - formatOffset = 0; - while (formatOffset < formatParams.length) - formatParams[formatOffset] = arguments[++formatOffset]; - formatOffset = 0; - formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) { - var value = formatParams[formatOffset++]; - switch ($1) { - case "d": case "f": return String(Number(value)); - case "i": return String(Math.floor(value)); - case "j": return JSON.stringify(value); - case "s": return String(value); - } - return "%"; - }); - if (formatOffset !== formatParams.length) - throw Error("parameter count mismatch"); - body.push(formatStringOrScope); - return Codegen; - } - - function toString(functionNameOverride) { - return "function " + safeFunctionName(functionNameOverride || functionName) + "(" + (functionParams && functionParams.join(",") || "") + "){\n " + body.join("\n ") + "\n}"; - } - - Codegen.toString = toString; - return Codegen; -} - -/** - * Begins generating a function. - * @memberof util - * @function codegen - * @param {string} [functionName] Function name if not anonymous - * @returns {Codegen} Appender that appends code to the function's body - * @variation 2 - */ - -/** - * When set to `true`, codegen will log generated code to console. Useful for debugging. - * @name util.codegen.verbose - * @type {boolean} - */ -codegen.verbose = false; - -function safeFunctionName(name) { - if (!name) - return ""; - name = String(name).replace(/[^\w$]/g, ""); - if (!name) - return ""; - if (/^\d/.test(name)) - name = "_" + name; - return reservedRe.test(name) ? name + "_" : name; -} - -},{}],4:[function(require,module,exports){ -"use strict"; -module.exports = EventEmitter; - -/** - * Constructs a new event emitter instance. - * @classdesc A minimal event emitter. - * @memberof util - * @constructor - */ -function EventEmitter() { - - /** - * Registered listeners. - * @type {Object.} - * @private - */ - this._listeners = Object.create(null); -} - -/** - * Event listener as used by {@link util.EventEmitter}. - * @typedef EventEmitterListener - * @type {function} - * @param {...*} args Arguments - * @returns {undefined} - */ - -/** - * Registers an event listener. - * @param {string} evt Event name - * @param {EventEmitterListener} fn Listener - * @param {*} [ctx] Listener context - * @returns {this} `this` - */ -EventEmitter.prototype.on = function on(evt, fn, ctx) { - (this._listeners[evt] || (this._listeners[evt] = [])).push({ - fn : fn, - ctx : ctx || this - }); - return this; -}; - -/** - * Removes an event listener or any matching listeners if arguments are omitted. - * @param {string} [evt] Event name. Removes all listeners if omitted. - * @param {EventEmitterListener} [fn] Listener to remove. Removes all listeners of `evt` if omitted. - * @returns {this} `this` - */ -EventEmitter.prototype.off = function off(evt, fn) { - if (evt === undefined) - this._listeners = Object.create(null); - else { - if (fn === undefined) - this._listeners[evt] = []; - else { - var listeners = this._listeners[evt]; - if (!listeners) - return this; - for (var i = 0; i < listeners.length;) - if (listeners[i].fn === fn) - listeners.splice(i, 1); - else - ++i; - } - } - return this; -}; - -/** - * Emits an event by calling its listeners with the specified arguments. - * @param {string} evt Event name - * @param {...*} args Arguments - * @returns {this} `this` - */ -EventEmitter.prototype.emit = function emit(evt) { - var listeners = this._listeners[evt]; - if (listeners) { - var args = [], - i = 1; - for (; i < arguments.length;) - args.push(arguments[i++]); - for (i = 0; i < listeners.length;) - listeners[i].fn.apply(listeners[i++].ctx, args); - } - return this; -}; - -},{}],5:[function(require,module,exports){ -"use strict"; -module.exports = fetch; - -var asPromise = require(1), - fs = require(6); - -/** - * Node-style callback as used by {@link util.fetch}. - * @typedef FetchCallback - * @type {function} - * @param {?Error} error Error, if any, otherwise `null` - * @param {string} [contents] File contents, if there hasn't been an error - * @returns {undefined} - */ - -/** - * Options as used by {@link util.fetch}. - * @interface IFetchOptions - * @property {boolean} [binary=false] Whether expecting a binary response - * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest - */ - -/** - * Fetches the contents of a file. - * @memberof util - * @param {string} filename File path or url - * @param {IFetchOptions} options Fetch options - * @param {FetchCallback} callback Callback function - * @returns {undefined} - */ -function fetch(filename, options, callback) { - if (typeof options === "function") { - callback = options; - options = {}; - } else if (!options) - options = {}; - - if (!callback) - return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this - - // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found. - if (!options.xhr && fs && fs.readFile) - return fs.readFile(filename, function fetchReadFileCallback(err, contents) { - return err && typeof XMLHttpRequest !== "undefined" - ? fetch.xhr(filename, options, callback) - : err - ? callback(err) - : callback(null, options.binary ? contents : contents.toString("utf8")); - }); - - // use the XHR version otherwise. - return fetch.xhr(filename, options, callback); -} - -/** - * Fetches the contents of a file. - * @name util.fetch - * @function - * @param {string} path File path or url - * @param {FetchCallback} callback Callback function - * @returns {undefined} - * @variation 2 - */ - -/** - * Fetches the contents of a file. - * @name util.fetch - * @function - * @param {string} path File path or url - * @param {IFetchOptions} [options] Fetch options - * @returns {Promise} Promise - * @variation 3 - */ - -/**/ -fetch.xhr = function fetch_xhr(filename, options, callback) { - var xhr = new XMLHttpRequest(); - xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() { - - if (xhr.readyState !== 4) - return undefined; - - // local cors security errors return status 0 / empty string, too. afaik this cannot be - // reliably distinguished from an actually empty file for security reasons. feel free - // to send a pull request if you are aware of a solution. - if (xhr.status !== 0 && xhr.status !== 200) - return callback(Error("status " + xhr.status)); - - // if binary data is expected, make sure that some sort of array is returned, even if - // ArrayBuffers are not supported. the binary string fallback, however, is unsafe. - if (options.binary) { - var buffer = xhr.response; - if (!buffer) { - buffer = []; - for (var i = 0; i < xhr.responseText.length; ++i) - buffer.push(xhr.responseText.charCodeAt(i) & 255); - } - return callback(null, typeof Uint8Array !== "undefined" ? new Uint8Array(buffer) : buffer); - } - return callback(null, xhr.responseText); - }; - - if (options.binary) { - // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers - if ("overrideMimeType" in xhr) - xhr.overrideMimeType("text/plain; charset=x-user-defined"); - xhr.responseType = "arraybuffer"; - } - - xhr.open("GET", filename); - xhr.send(); -}; - -},{"1":1,"6":6}],6:[function(require,module,exports){ -"use strict"; - -var fs = null; -try { - fs = require(12); - if (!fs || !fs.readFile || !fs.readFileSync) - fs = null; -} catch (e) { - // `fs` is unavailable in browsers and browser-like bundles. -} -module.exports = fs; - -},{"12":12}],7:[function(require,module,exports){ -"use strict"; - -module.exports = factory(factory); - -/** - * Reads / writes floats / doubles from / to buffers. - * @name util.float - * @namespace - */ - -/** - * Writes a 32 bit float to a buffer using little endian byte order. - * @name util.float.writeFloatLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Writes a 32 bit float to a buffer using big endian byte order. - * @name util.float.writeFloatBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Reads a 32 bit float from a buffer using little endian byte order. - * @name util.float.readFloatLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Reads a 32 bit float from a buffer using big endian byte order. - * @name util.float.readFloatBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Writes a 64 bit double to a buffer using little endian byte order. - * @name util.float.writeDoubleLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Writes a 64 bit double to a buffer using big endian byte order. - * @name util.float.writeDoubleBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Reads a 64 bit double from a buffer using little endian byte order. - * @name util.float.readDoubleLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Reads a 64 bit double from a buffer using big endian byte order. - * @name util.float.readDoubleBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -// Factory function for the purpose of node-based testing in modified global environments -function factory(exports) { - - // float: typed array - if (typeof Float32Array !== "undefined") (function() { - - var f32 = new Float32Array([ -0 ]), - f8b = new Uint8Array(f32.buffer), - le = f8b[3] === 128; - - function writeFloat_f32_cpy(val, buf, pos) { - f32[0] = val; - buf[pos ] = f8b[0]; - buf[pos + 1] = f8b[1]; - buf[pos + 2] = f8b[2]; - buf[pos + 3] = f8b[3]; - } - - function writeFloat_f32_rev(val, buf, pos) { - f32[0] = val; - buf[pos ] = f8b[3]; - buf[pos + 1] = f8b[2]; - buf[pos + 2] = f8b[1]; - buf[pos + 3] = f8b[0]; - } - - /* istanbul ignore next */ - exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev; - /* istanbul ignore next */ - exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy; - - function readFloat_f32_cpy(buf, pos) { - f8b[0] = buf[pos ]; - f8b[1] = buf[pos + 1]; - f8b[2] = buf[pos + 2]; - f8b[3] = buf[pos + 3]; - return f32[0]; - } - - function readFloat_f32_rev(buf, pos) { - f8b[3] = buf[pos ]; - f8b[2] = buf[pos + 1]; - f8b[1] = buf[pos + 2]; - f8b[0] = buf[pos + 3]; - return f32[0]; - } - - /* istanbul ignore next */ - exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev; - /* istanbul ignore next */ - exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy; - - // float: ieee754 - })(); else (function() { - - function writeFloat_ieee754(writeUint, val, buf, pos) { - var sign = val < 0 ? 1 : 0; - if (sign) - val = -val; - if (val === 0) - writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos); - else if (isNaN(val)) - writeUint(2143289344, buf, pos); - else if (val > 3.4028234663852886e+38) // +-Infinity - writeUint((sign << 31 | 2139095040) >>> 0, buf, pos); - else if (val < 1.1754943508222875e-38) // denormal - writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos); - else { - var exponent = Math.floor(Math.log(val) / Math.LN2), - mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607; - writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos); - } - } - - exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE); - exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE); - - function readFloat_ieee754(readUint, buf, pos) { - var uint = readUint(buf, pos), - sign = (uint >> 31) * 2 + 1, - exponent = uint >>> 23 & 255, - mantissa = uint & 8388607; - return exponent === 255 - ? mantissa - ? NaN - : sign * Infinity - : exponent === 0 // denormal - ? sign * 1.401298464324817e-45 * mantissa - : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608); - } - - exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE); - exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE); - - })(); - - // double: typed array - if (typeof Float64Array !== "undefined") (function() { - - var f64 = new Float64Array([-0]), - f8b = new Uint8Array(f64.buffer), - le = f8b[7] === 128; - - function writeDouble_f64_cpy(val, buf, pos) { - f64[0] = val; - buf[pos ] = f8b[0]; - buf[pos + 1] = f8b[1]; - buf[pos + 2] = f8b[2]; - buf[pos + 3] = f8b[3]; - buf[pos + 4] = f8b[4]; - buf[pos + 5] = f8b[5]; - buf[pos + 6] = f8b[6]; - buf[pos + 7] = f8b[7]; - } - - function writeDouble_f64_rev(val, buf, pos) { - f64[0] = val; - buf[pos ] = f8b[7]; - buf[pos + 1] = f8b[6]; - buf[pos + 2] = f8b[5]; - buf[pos + 3] = f8b[4]; - buf[pos + 4] = f8b[3]; - buf[pos + 5] = f8b[2]; - buf[pos + 6] = f8b[1]; - buf[pos + 7] = f8b[0]; - } - - /* istanbul ignore next */ - exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev; - /* istanbul ignore next */ - exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy; - - function readDouble_f64_cpy(buf, pos) { - f8b[0] = buf[pos ]; - f8b[1] = buf[pos + 1]; - f8b[2] = buf[pos + 2]; - f8b[3] = buf[pos + 3]; - f8b[4] = buf[pos + 4]; - f8b[5] = buf[pos + 5]; - f8b[6] = buf[pos + 6]; - f8b[7] = buf[pos + 7]; - return f64[0]; - } - - function readDouble_f64_rev(buf, pos) { - f8b[7] = buf[pos ]; - f8b[6] = buf[pos + 1]; - f8b[5] = buf[pos + 2]; - f8b[4] = buf[pos + 3]; - f8b[3] = buf[pos + 4]; - f8b[2] = buf[pos + 5]; - f8b[1] = buf[pos + 6]; - f8b[0] = buf[pos + 7]; - return f64[0]; - } - - /* istanbul ignore next */ - exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev; - /* istanbul ignore next */ - exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy; - - // double: ieee754 - })(); else (function() { - - function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) { - var sign = val < 0 ? 1 : 0; - if (sign) - val = -val; - if (val === 0) { - writeUint(0, buf, pos + off0); - writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1); - } else if (isNaN(val)) { - writeUint(0, buf, pos + off0); - writeUint(2146959360, buf, pos + off1); - } else if (val > 1.7976931348623157e+308) { // +-Infinity - writeUint(0, buf, pos + off0); - writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1); - } else { - var mantissa; - if (val < 2.2250738585072014e-308) { // denormal - mantissa = val / 5e-324; - writeUint(mantissa >>> 0, buf, pos + off0); - writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1); - } else { - var exponent = Math.floor(Math.log(val) / Math.LN2); - if (exponent === 1024) - exponent = 1023; - mantissa = val * Math.pow(2, -exponent); - writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0); - writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1); - } - } - } - - exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4); - exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0); - - function readDouble_ieee754(readUint, off0, off1, buf, pos) { - var lo = readUint(buf, pos + off0), - hi = readUint(buf, pos + off1); - var sign = (hi >> 31) * 2 + 1, - exponent = hi >>> 20 & 2047, - mantissa = 4294967296 * (hi & 1048575) + lo; - return exponent === 2047 - ? mantissa - ? NaN - : sign * Infinity - : exponent === 0 // denormal - ? sign * 5e-324 * mantissa - : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496); - } - - exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4); - exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0); - - })(); - - return exports; -} - -// uint helpers - -function writeUintLE(val, buf, pos) { - buf[pos ] = val & 255; - buf[pos + 1] = val >>> 8 & 255; - buf[pos + 2] = val >>> 16 & 255; - buf[pos + 3] = val >>> 24; -} - -function writeUintBE(val, buf, pos) { - buf[pos ] = val >>> 24; - buf[pos + 1] = val >>> 16 & 255; - buf[pos + 2] = val >>> 8 & 255; - buf[pos + 3] = val & 255; -} - -function readUintLE(buf, pos) { - return (buf[pos ] - | buf[pos + 1] << 8 - | buf[pos + 2] << 16 - | buf[pos + 3] << 24) >>> 0; -} - -function readUintBE(buf, pos) { - return (buf[pos ] << 24 - | buf[pos + 1] << 16 - | buf[pos + 2] << 8 - | buf[pos + 3]) >>> 0; -} - -},{}],8:[function(require,module,exports){ -"use strict"; -module.exports = inquire; - -/** - * Requires a module only if available. - * @memberof util - * @param {string} moduleName Module to require - * @returns {?Object} Required module if available and not empty, otherwise `null` - * @deprecated Legacy optional require helper. Will be removed in a future release. - */ -function inquire(moduleName) { - try { - if (typeof require !== "function") { - return null; - } - var mod = require(moduleName); - if (mod && (mod.length || Object.keys(mod).length)) return mod; - return null; - } catch (err) { - // ignore - return null; - } -} - -/* -// maybe worth a shot to prevent renaming issues: -// see: https://github.com/webpack/webpack/blob/master/lib/dependencies/CommonJsRequireDependencyParserPlugin.js -// triggers on: -// - expression require.cache -// - expression require (???) -// - call require -// - call require:commonjs:item -// - call require:commonjs:context - -Object.defineProperty(Function.prototype, "__self", { get: function() { return this; } }); -var r = require.__self; -delete Function.prototype.__self; -*/ - -},{}],9:[function(require,module,exports){ -"use strict"; - -/** - * A minimal path module to resolve Unix, Windows and URL paths alike. - * @memberof util - * @namespace - */ -var path = exports; - -var isAbsolute = -/** - * Tests if the specified path is absolute. - * @param {string} path Path to test - * @returns {boolean} `true` if path is absolute - */ -path.isAbsolute = function isAbsolute(path) { - return /^(?:\/|\w+:)/.test(path); -}; - -var normalize = -/** - * Normalizes the specified path. - * @param {string} path Path to normalize - * @returns {string} Normalized path - */ -path.normalize = function normalize(path) { - path = path.replace(/\\/g, "/") - .replace(/\/{2,}/g, "/"); - var parts = path.split("/"), - absolute = isAbsolute(path), - prefix = ""; - if (absolute) - prefix = parts.shift() + "/"; - for (var i = 0; i < parts.length;) { - if (parts[i] === "..") { - if (i > 0 && parts[i - 1] !== "..") - parts.splice(--i, 2); - else if (absolute) - parts.splice(i, 1); - else - ++i; - } else if (parts[i] === ".") - parts.splice(i, 1); - else - ++i; - } - return prefix + parts.join("/"); -}; - -/** - * Resolves the specified include path against the specified origin path. - * @param {string} originPath Path to the origin file - * @param {string} includePath Include path relative to origin path - * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized - * @returns {string} Path to the include file - */ -path.resolve = function resolve(originPath, includePath, alreadyNormalized) { - if (!alreadyNormalized) - includePath = normalize(includePath); - if (isAbsolute(includePath)) - return includePath; - if (!alreadyNormalized) - originPath = normalize(originPath); - return (originPath = originPath.replace(/(?:\/|^)[^/]+$/, "")).length ? normalize(originPath + "/" + includePath) : includePath; -}; - -},{}],10:[function(require,module,exports){ -"use strict"; -module.exports = pool; - -/** - * An allocator as used by {@link util.pool}. - * @typedef PoolAllocator - * @type {function} - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ - -/** - * A slicer as used by {@link util.pool}. - * @typedef PoolSlicer - * @type {function} - * @param {number} start Start offset - * @param {number} end End offset - * @returns {Uint8Array} Buffer slice - * @this {Uint8Array} - */ - -/** - * A general purpose buffer pool. - * @memberof util - * @function - * @param {PoolAllocator} alloc Allocator - * @param {PoolSlicer} slice Slicer - * @param {number} [size=8192] Slab size - * @returns {PoolAllocator} Pooled allocator - */ -function pool(alloc, slice, size) { - var SIZE = size || 8192; - var MAX = SIZE >>> 1; - var slab = null; - var offset = SIZE; - return function pool_alloc(size) { - if (size < 1 || size > MAX) - return alloc(size); - if (offset + size > SIZE) { - slab = alloc(SIZE); - offset = 0; - } - var buf = slice.call(slab, offset, offset += size); - if (offset & 7) // align to 32 bit - offset = (offset | 7) + 1; - return buf; - }; -} - -},{}],11:[function(require,module,exports){ -"use strict"; - -/** - * A minimal UTF8 implementation for number arrays. - * @memberof util - * @namespace - */ -var utf8 = exports, - replacementChar = "\ufffd"; - -/** - * Calculates the UTF8 byte length of a string. - * @param {string} string String - * @returns {number} Byte length - */ -utf8.length = function utf8_length(string) { - var len = 0, - c = 0; - for (var i = 0; i < string.length; ++i) { - c = string.charCodeAt(i); - if (c < 128) - len += 1; - else if (c < 2048) - len += 2; - else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { - ++i; - len += 4; - } else - len += 3; - } - return len; -}; - -/** - * Reads UTF8 bytes as a string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} String read - */ -utf8.read = function utf8_read(buffer, start, end) { - if (end - start < 1) { - return ""; - } - - var str = ""; - for (var i = start; i < end;) { - var t = buffer[i++]; - if (t <= 0x7F) { - str += String.fromCharCode(t); - } else if (t >= 0xC0 && t < 0xE0) { - var c2 = (t & 0x1F) << 6 | buffer[i++] & 0x3F; - str += c2 >= 0x80 ? String.fromCharCode(c2) : replacementChar; - } else if (t >= 0xE0 && t < 0xF0) { - var c3 = (t & 0xF) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F; - str += c3 >= 0x800 ? String.fromCharCode(c3) : replacementChar; - } else if (t >= 0xF0) { - var t2 = (t & 7) << 18 | (buffer[i++] & 0x3F) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F; - if (t2 < 0x10000 || t2 > 0x10FFFF) - str += replacementChar; - else { - t2 -= 0x10000; - str += String.fromCharCode(0xD800 + (t2 >> 10)); - str += String.fromCharCode(0xDC00 + (t2 & 0x3FF)); - } - } - } - - return str; -}; - -/** - * Writes a string as UTF8 bytes. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Bytes written - */ -utf8.write = function utf8_write(string, buffer, offset) { - var start = offset, - c1, // character 1 - c2; // character 2 - for (var i = 0; i < string.length; ++i) { - c1 = string.charCodeAt(i); - if (c1 < 128) { - buffer[offset++] = c1; - } else if (c1 < 2048) { - buffer[offset++] = c1 >> 6 | 192; - buffer[offset++] = c1 & 63 | 128; - } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { - c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); - ++i; - buffer[offset++] = c1 >> 18 | 240; - buffer[offset++] = c1 >> 12 & 63 | 128; - buffer[offset++] = c1 >> 6 & 63 | 128; - buffer[offset++] = c1 & 63 | 128; - } else { - buffer[offset++] = c1 >> 12 | 224; - buffer[offset++] = c1 >> 6 & 63 | 128; - buffer[offset++] = c1 & 63 | 128; - } - } - return offset - start; -}; - -},{}],12:[function(require,module,exports){ - -},{}],13:[function(require,module,exports){ -"use strict"; -module.exports = common; - -var commonRe = /\/|\./; - -/** - * Provides common type definitions. - * Can also be used to provide additional google types or your own custom types. - * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name - * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition - * @returns {undefined} - * @property {INamespace} google/protobuf/any.proto Any - * @property {INamespace} google/protobuf/duration.proto Duration - * @property {INamespace} google/protobuf/empty.proto Empty - * @property {INamespace} google/protobuf/field_mask.proto FieldMask - * @property {INamespace} google/protobuf/struct.proto Struct, Value, NullValue and ListValue - * @property {INamespace} google/protobuf/timestamp.proto Timestamp - * @property {INamespace} google/protobuf/wrappers.proto Wrappers - * @example - * // manually provides descriptor.proto (assumes google/protobuf/ namespace and .proto extension) - * protobuf.common("descriptor", descriptorJson); - * - * // manually provides a custom definition (uses my.foo namespace) - * protobuf.common("my/foo/bar.proto", myFooBarJson); - */ -function common(name, json) { - if (!commonRe.test(name)) { - name = "google/protobuf/" + name + ".proto"; - json = { nested: { google: { nested: { protobuf: { nested: json } } } } }; - } - common[name] = json; -} - -// Not provided because of limited use (feel free to discuss or to provide yourself): -// -// google/protobuf/descriptor.proto -// google/protobuf/source_context.proto -// google/protobuf/type.proto -// -// Stripped and pre-parsed versions of these non-bundled files are instead available as part of -// the repository or package within the google/protobuf directory. - -common("any", { - - /** - * Properties of a google.protobuf.Any message. - * @interface IAny - * @type {Object} - * @property {string} [typeUrl] - * @property {Uint8Array} [bytes] - * @memberof common - */ - Any: { - fields: { - type_url: { - type: "string", - id: 1 - }, - value: { - type: "bytes", - id: 2 - } - } - } -}); - -var timeType; - -common("duration", { - - /** - * Properties of a google.protobuf.Duration message. - * @interface IDuration - * @type {Object} - * @property {number|Long} [seconds] - * @property {number} [nanos] - * @memberof common - */ - Duration: timeType = { - fields: { - seconds: { - type: "int64", - id: 1 - }, - nanos: { - type: "int32", - id: 2 - } - } - } -}); - -common("timestamp", { - - /** - * Properties of a google.protobuf.Timestamp message. - * @interface ITimestamp - * @type {Object} - * @property {number|Long} [seconds] - * @property {number} [nanos] - * @memberof common - */ - Timestamp: timeType -}); - -common("empty", { - - /** - * Properties of a google.protobuf.Empty message. - * @interface IEmpty - * @memberof common - */ - Empty: { - fields: {} - } -}); - -common("struct", { - - /** - * Properties of a google.protobuf.Struct message. - * @interface IStruct - * @type {Object} - * @property {Object.} [fields] - * @memberof common - */ - Struct: { - fields: { - fields: { - keyType: "string", - type: "Value", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.Value message. - * @interface IValue - * @type {Object} - * @property {string} [kind] - * @property {0} [nullValue] - * @property {number} [numberValue] - * @property {string} [stringValue] - * @property {boolean} [boolValue] - * @property {IStruct} [structValue] - * @property {IListValue} [listValue] - * @memberof common - */ - Value: { - oneofs: { - kind: { - oneof: [ - "nullValue", - "numberValue", - "stringValue", - "boolValue", - "structValue", - "listValue" - ] - } - }, - fields: { - nullValue: { - type: "NullValue", - id: 1 - }, - numberValue: { - type: "double", - id: 2 - }, - stringValue: { - type: "string", - id: 3 - }, - boolValue: { - type: "bool", - id: 4 - }, - structValue: { - type: "Struct", - id: 5 - }, - listValue: { - type: "ListValue", - id: 6 - } - } - }, - - NullValue: { - values: { - NULL_VALUE: 0 - } - }, - - /** - * Properties of a google.protobuf.ListValue message. - * @interface IListValue - * @type {Object} - * @property {Array.} [values] - * @memberof common - */ - ListValue: { - fields: { - values: { - rule: "repeated", - type: "Value", - id: 1 - } - } - } -}); - -common("wrappers", { - - /** - * Properties of a google.protobuf.DoubleValue message. - * @interface IDoubleValue - * @type {Object} - * @property {number} [value] - * @memberof common - */ - DoubleValue: { - fields: { - value: { - type: "double", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.FloatValue message. - * @interface IFloatValue - * @type {Object} - * @property {number} [value] - * @memberof common - */ - FloatValue: { - fields: { - value: { - type: "float", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.Int64Value message. - * @interface IInt64Value - * @type {Object} - * @property {number|Long} [value] - * @memberof common - */ - Int64Value: { - fields: { - value: { - type: "int64", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.UInt64Value message. - * @interface IUInt64Value - * @type {Object} - * @property {number|Long} [value] - * @memberof common - */ - UInt64Value: { - fields: { - value: { - type: "uint64", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.Int32Value message. - * @interface IInt32Value - * @type {Object} - * @property {number} [value] - * @memberof common - */ - Int32Value: { - fields: { - value: { - type: "int32", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.UInt32Value message. - * @interface IUInt32Value - * @type {Object} - * @property {number} [value] - * @memberof common - */ - UInt32Value: { - fields: { - value: { - type: "uint32", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.BoolValue message. - * @interface IBoolValue - * @type {Object} - * @property {boolean} [value] - * @memberof common - */ - BoolValue: { - fields: { - value: { - type: "bool", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.StringValue message. - * @interface IStringValue - * @type {Object} - * @property {string} [value] - * @memberof common - */ - StringValue: { - fields: { - value: { - type: "string", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.BytesValue message. - * @interface IBytesValue - * @type {Object} - * @property {Uint8Array} [value] - * @memberof common - */ - BytesValue: { - fields: { - value: { - type: "bytes", - id: 1 - } - } - } -}); - -common("field_mask", { - - /** - * Properties of a google.protobuf.FieldMask message. - * @interface IDoubleValue - * @type {Object} - * @property {number} [value] - * @memberof common - */ - FieldMask: { - fields: { - paths: { - rule: "repeated", - type: "string", - id: 1 - } - } - } -}); - -/** - * Gets the root definition of the specified common proto file. - * - * Bundled definitions are: - * - google/protobuf/any.proto - * - google/protobuf/duration.proto - * - google/protobuf/empty.proto - * - google/protobuf/field_mask.proto - * - google/protobuf/struct.proto - * - google/protobuf/timestamp.proto - * - google/protobuf/wrappers.proto - * - * @param {string} file Proto file name - * @returns {INamespace|null} Root definition or `null` if not defined - */ -common.get = function get(file) { - return common[file] || null; -}; - -},{}],14:[function(require,module,exports){ -"use strict"; -/** - * Runtime message from/to plain object converters. - * @namespace - */ -var converter = exports; - -var Enum = require(17), - util = require(39); - -/** - * Generates a partial value fromObject conveter. - * @param {Codegen} gen Codegen instance - * @param {Field} field Reflected field - * @param {number} fieldIndex Field index - * @param {string} prop Property reference - * @returns {Codegen} Codegen instance - * @ignore - */ -function genValuePartial_fromObject(gen, field, fieldIndex, prop) { - var defaultAlreadyEmitted = false; - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - if (field.resolvedType) { - if (field.resolvedType instanceof Enum) { gen - ("switch(d%s){", prop); - for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) { - // enum unknown values passthrough - if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen - ("default:") - ("if(typeof(d%s)===\"number\"){m%s=d%s;break}", prop, prop, prop); - if (!field.repeated) gen // fallback to default value only for - // arrays, to avoid leaving holes. - ("break"); // for non-repeated fields, just ignore - defaultAlreadyEmitted = true; - } - gen - ("case%j:", keys[i]) - ("case %i:", values[keys[i]]) - ("m%s=%j", prop, values[keys[i]]) - ("break"); - } gen - ("}"); - } else gen - ("if(typeof d%s!==\"object\")", prop) - ("throw TypeError(%j)", field.fullName + ": object expected") - ("m%s=types[%i].fromObject(d%s,n+1)", prop, fieldIndex, prop); - } else { - var isUnsigned = false; - switch (field.type) { - case "double": - case "float": gen - ("m%s=Number(d%s)", prop, prop); // also catches "NaN", "Infinity" - break; - case "uint32": - case "fixed32": gen - ("m%s=d%s>>>0", prop, prop); - break; - case "int32": - case "sint32": - case "sfixed32": gen - ("m%s=d%s|0", prop, prop); - break; - case "uint64": - case "fixed64": - isUnsigned = true; - // eslint-disable-next-line no-fallthrough - case "int64": - case "sint64": - case "sfixed64": gen - ("if(util.Long)") - ("m%s=util.Long.fromValue(d%s,%j)", prop, prop, isUnsigned) - ("else if(typeof d%s===\"string\")", prop) - ("m%s=parseInt(d%s,10)", prop, prop) - ("else if(typeof d%s===\"number\")", prop) - ("m%s=d%s", prop, prop) - ("else if(typeof d%s===\"object\")", prop) - ("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", prop, prop, prop, isUnsigned ? "true" : ""); - break; - case "bytes": gen - ("if(typeof d%s===\"string\")", prop) - ("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", prop, prop, prop) - ("else if(d%s.length >= 0)", prop) - ("m%s=d%s", prop, prop); - break; - case "string": gen - ("m%s=String(d%s)", prop, prop); - break; - case "bool": gen - ("m%s=Boolean(d%s)", prop, prop); - break; - /* default: gen - ("m%s=d%s", prop, prop); - break; */ - } - } - return gen; - /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ -} - -/** - * Generates a plain object to runtime message converter specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -converter.fromObject = function fromObject(mtype) { - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - var fields = mtype.fieldsArray; - var gen = util.codegen(["d", "n"], mtype.name + "$fromObject") - ("if(d instanceof this.ctor)") - ("return d") - ("if(n===undefined)n=0") - ("if(n>util.recursionLimit)") - ("throw Error(\"maximum nesting depth exceeded\")"); - if (!fields.length) return gen - ("return new this.ctor"); - gen - ("var m=new this.ctor"); - for (var i = 0; i < fields.length; ++i) { - var field = fields[i].resolve(), - prop = util.safeProp(field.name); - - // Map fields - if (field.map) { gen - ("if(d%s){", prop) - ("if(typeof d%s!==\"object\")", prop) - ("throw TypeError(%j)", field.fullName + ": object expected") - ("m%s={}", prop) - ("for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0,%j).toBigInt()", prop, prop, prop, prop, prop, isUnsigned) - ("else if(typeof m%s===\"number\")", prop) - ("d%s=o.longs===String?String(m%s):m%s", prop, prop, prop) - ("else") // Long-like - ("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", prop, prop, prop, prop, isUnsigned ? "true": "", prop); - break; - case "bytes": gen - ("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", prop, prop, prop, prop, prop); - break; - default: gen - ("d%s=m%s", prop, prop); - break; - } - } - return gen; - /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ -} - -/** - * Generates a runtime message to plain object converter specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -converter.toObject = function toObject(mtype) { - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById); - if (!fields.length) - return util.codegen()("return {}"); - var gen = util.codegen(["m", "o", "q"], mtype.name + "$toObject") - ("if(!o)") - ("o={}") - ("if(q===undefined)q=0") - ("if(q>util.recursionLimit)") - ("throw Error(\"max depth exceeded\")") - ("var d={}"); - - var repeatedFields = [], - mapFields = [], - normalFields = [], - i = 0; - for (; i < fields.length; ++i) - if (!fields[i].partOf) - ( fields[i].resolve().repeated ? repeatedFields - : fields[i].map ? mapFields - : normalFields).push(fields[i]); - - if (repeatedFields.length) { gen - ("if(o.arrays||o.defaults){"); - for (i = 0; i < repeatedFields.length; ++i) gen - ("d%s=[]", util.safeProp(repeatedFields[i].name)); - gen - ("}"); - } - - if (mapFields.length) { gen - ("if(o.objects||o.defaults){"); - for (i = 0; i < mapFields.length; ++i) gen - ("d%s={}", util.safeProp(mapFields[i].name)); - gen - ("}"); - } - - if (normalFields.length) { gen - ("if(o.defaults){"); - for (i = 0; i < normalFields.length; ++i) { - var field = normalFields[i], - prop = util.safeProp(field.name); - if (field.resolvedType instanceof Enum) gen - ("d%s=o.enums===String?%j:%j", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault); - else if (field.long) gen - ("if(util.Long){") - ("var n=new util.Long(%i,%i,%j)", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned) - ("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!==\"undefined\"&&o.longs===BigInt?n.toBigInt():n", prop) - ("}else") - ("d%s=o.longs===String?%j:typeof BigInt!==\"undefined\"&&o.longs===BigInt?BigInt(%j):%i", prop, field.typeDefault.toString(), field.typeDefault.toString(), field.typeDefault.toNumber()); - else if (field.bytes) { - var arrayDefault = Array.prototype.slice.call(field.typeDefault); - gen - ("if(o.bytes===String)d%s=%j", prop, String.fromCharCode.apply(String, field.typeDefault)) - ("else{") - ("d%s=%j", prop, arrayDefault) - ("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", prop, prop) - ("}"); - } else gen - ("d%s=%j", prop, field.typeDefault); // also messages (=null) - } gen - ("}"); - } - var hasKs2 = false; - for (i = 0; i < fields.length; ++i) { - var field = fields[i], - index = mtype._fieldsArray.indexOf(field), - prop = util.safeProp(field.name); - if (field.map) { - if (!hasKs2) { hasKs2 = true; gen - ("var ks2"); - } gen - ("if(m%s&&(ks2=Object.keys(m%s)).length){", prop, prop) - ("d%s={}", prop) - ("for(var j=0;jReader.recursionLimit)") - ("throw Error(\"maximum nesting depth exceeded\")") - ("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (mtype.fieldsArray.filter(function(field) { return field.map; }).length ? ",k,value" : "")) - ("while(r.pos>>3){"); - - var i = 0; - for (; i < /* initializes */ mtype.fieldsArray.length; ++i) { - var field = mtype._fieldsArray[i].resolve(), - type = field.resolvedType instanceof Enum ? "int32" : field.type, - ref = "m" + util.safeProp(field.name); gen - ("case %i: {", field.id); - - // Map fields - if (field.map) { gen - ("if(%s===util.emptyObject)", ref) - ("%s={}", ref) - ("var c2 = r.uint32()+r.pos"); - - if (types.defaults[field.keyType] !== undefined) gen - ("k=%j", types.defaults[field.keyType]); - else gen - ("k=null"); - - if (types.defaults[type] !== undefined) gen - ("value=%j", types.defaults[type]); - else gen - ("value=null"); - - gen - ("while(r.pos>>3){") - ("case 1: k=r.%s(); break", field.keyType) - ("case 2:"); - - if (types.basic[type] === undefined) gen - ("value=types[%i].decode(r,r.uint32(),undefined,n+1)", i); // can't be groups - else gen - ("value=r.%s()", type); - - gen - ("break") - ("default:") - ("r.skipType(tag2&7,n)") - ("break") - ("}") - ("}"); - - if (types.long[field.keyType] !== undefined) gen - ("%s[typeof k===\"object\"?util.longToHash(k):k]=value", ref); - else { - if (field.keyType === "string") gen - ("if(k===\"__proto__\")") - ("util.makeProp(%s,k)", ref); - gen - ("%s[k]=value", ref); - } - - // Repeated fields - } else if (field.repeated) { gen - - ("if(!(%s&&%s.length))", ref, ref) - ("%s=[]", ref); - - // Packable (always check for forward and backward compatiblity) - if (types.packed[type] !== undefined) gen - ("if((t&7)===2){") - ("var c2=r.uint32()+r.pos") - ("while(r.pos>> 0, (field.id << 3 | 4) >>> 0) - : gen("types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0); -} - -/** - * Generates an encoder specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -function encoder(mtype) { - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - var gen = util.codegen(["m", "w", "q"], mtype.name + "$encode") - ("if(!w)") - ("w=Writer.create()") - ("if(q===undefined)q=0") - ("if(q>util.recursionLimit)") - ("throw Error(\"max depth exceeded\")"); - - var i, ref; - - // "when a message is serialized its known fields should be written sequentially by field number" - var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById); - - for (var i = 0; i < fields.length; ++i) { - var field = fields[i].resolve(), - index = mtype._fieldsArray.indexOf(field), - type = field.resolvedType instanceof Enum ? "int32" : field.type, - wireType = types.basic[type]; - ref = "m" + util.safeProp(field.name); - - // Map fields - if (field.map) { - gen - ("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", ref, field.name) // !== undefined && !== null - ("for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType); - if (wireType === undefined) gen - ("types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()", index, ref); // can't be groups - else gen - (".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | wireType, type, ref); - gen - ("}") - ("}"); - - // Repeated fields - } else if (field.repeated) { gen - ("if(%s!=null&&%s.length){", ref, ref); // !== undefined && !== null - - // Packed repeated - if (field.packed && types.packed[type] !== undefined) { gen - - ("w.uint32(%i).fork()", (field.id << 3 | 2) >>> 0) - ("for(var i=0;i<%s.length;++i)", ref) - ("w.%s(%s[i])", type, ref) - ("w.ldelim()"); - - // Non-packed - } else { gen - - ("for(var i=0;i<%s.length;++i)", ref); - if (wireType === undefined) - genTypePartial(gen, field, index, ref + "[i]"); - else gen - ("w.uint32(%i).%s(%s[i])", (field.id << 3 | wireType) >>> 0, type, ref); - - } gen - ("}"); - - // Non-repeated - } else { - if (field.optional) gen - ("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", ref, field.name); // !== undefined && !== null - - if (wireType === undefined) - genTypePartial(gen, field, index, ref); - else gen - ("w.uint32(%i).%s(%s)", (field.id << 3 | wireType) >>> 0, type, ref); - - } - } - - return gen - ("return w"); - /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ -} - -},{"17":17,"38":38,"39":39}],17:[function(require,module,exports){ -"use strict"; -module.exports = Enum; - -// extends ReflectionObject -var ReflectionObject = require(26); -((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = "Enum"; - -var Namespace = require(25), - util = require(39); - -/** - * Constructs a new enum instance. - * @classdesc Reflected enum. - * @extends ReflectionObject - * @constructor - * @param {string} name Unique name within its namespace - * @param {Object.} [values] Enum values as an object, by name - * @param {Object.} [options] Declared options - * @param {string} [comment] The comment for this enum - * @param {Object.} [comments] The value comments for this enum - * @param {Object.>|undefined} [valuesOptions] The value options for this enum - */ -function Enum(name, values, options, comment, comments, valuesOptions) { - ReflectionObject.call(this, name, options); - - if (values && typeof values !== "object") - throw TypeError("values must be an object"); - - /** - * Enum values by id. - * @type {Object.} - */ - this.valuesById = {}; - - /** - * Enum values by name. - * @type {Object.} - */ - this.values = Object.create(this.valuesById); // toJSON, marker - - /** - * Enum comment text. - * @type {string|null} - */ - this.comment = comment; - - /** - * Value comment texts, if any. - * @type {Object.} - */ - this.comments = comments || {}; - - /** - * Values options, if any - * @type {Object>|undefined} - */ - this.valuesOptions = valuesOptions; - - /** - * Resolved values features, if any - * @type {Object>|undefined} - */ - this._valuesFeatures = {}; - - /** - * Reserved ranges, if any. - * @type {Array.} - */ - this.reserved = undefined; // toJSON - - // Note that values inherit valuesById on their prototype which makes them a TypeScript- - // compatible enum. This is used by pbts to write actual enum definitions that work for - // static and reflection code alike instead of emitting generic object definitions. - - if (values) - for (var keys = Object.keys(values), i = 0; i < keys.length; ++i) - if (keys[i] !== "__proto__" && typeof values[keys[i]] === "number") // use forward entries only - this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i]; -} - -/** - * @override - */ -Enum.prototype._resolveFeatures = function _resolveFeatures(edition) { - edition = this._edition || edition; - ReflectionObject.prototype._resolveFeatures.call(this, edition); - - Object.keys(this.values).forEach(key => { - var parentFeaturesCopy = util.merge({}, this._features); - this._valuesFeatures[key] = util.merge(parentFeaturesCopy, this.valuesOptions && this.valuesOptions[key] && this.valuesOptions[key].features || {}); - }); - - return this; -}; - -/** - * Enum descriptor. - * @interface IEnum - * @property {Object.} values Enum values - * @property {Object.} [options] Enum options - */ - -/** - * Constructs an enum from an enum descriptor. - * @param {string} name Enum name - * @param {IEnum} json Enum descriptor - * @returns {Enum} Created enum - * @throws {TypeError} If arguments are invalid - */ -Enum.fromJSON = function fromJSON(name, json) { - var enm = new Enum(name, json.values, json.options, json.comment, json.comments); - enm.reserved = json.reserved; - if (json.edition) - enm._edition = json.edition; - enm._defaultEdition = "proto3"; // For backwards-compatibility. - return enm; -}; - -/** - * Converts this enum to an enum descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IEnum} Enum descriptor - */ -Enum.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "edition" , this._editionToJSON(), - "options" , this.options, - "valuesOptions" , this.valuesOptions, - "values" , this.values, - "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, - "comment" , keepComments ? this.comment : undefined, - "comments" , keepComments ? this.comments : undefined - ]); -}; - -/** - * Adds a value to this enum. - * @param {string} name Value name - * @param {number} id Value id - * @param {string} [comment] Comment, if any - * @param {Object.|undefined} [options] Options, if any - * @returns {Enum} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a value with this name or id - */ -Enum.prototype.add = function add(name, id, comment, options) { - // utilized by the parser but not by .fromJSON - - if (!util.isString(name)) - throw TypeError("name must be a string"); - - if (!util.isInteger(id)) - throw TypeError("id must be an integer"); - - if (name === "__proto__") - return this; - - if (this.values[name] !== undefined) - throw Error("duplicate name '" + name + "' in " + this); - - if (this.isReservedId(id)) - throw Error("id " + id + " is reserved in " + this); - - if (this.isReservedName(name)) - throw Error("name '" + name + "' is reserved in " + this); - - if (this.valuesById[id] !== undefined) { - if (!(this.options && this.options.allow_alias)) - throw Error("duplicate id " + id + " in " + this); - this.values[name] = id; - } else - this.valuesById[this.values[name] = id] = name; - - if (options) { - if (this.valuesOptions === undefined) - this.valuesOptions = {}; - this.valuesOptions[name] = options || null; - } - - this.comments[name] = comment || null; - return this; -}; - -/** - * Removes a value from this enum - * @param {string} name Value name - * @returns {Enum} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `name` is not a name of this enum - */ -Enum.prototype.remove = function remove(name) { - - if (!util.isString(name)) - throw TypeError("name must be a string"); - - var val = this.values[name]; - if (val == null) - throw Error("name '" + name + "' does not exist in " + this); - - delete this.valuesById[val]; - delete this.values[name]; - delete this.comments[name]; - if (this.valuesOptions) - delete this.valuesOptions[name]; - - return this; -}; - -/** - * Tests if the specified id is reserved. - * @param {number} id Id to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Enum.prototype.isReservedId = function isReservedId(id) { - return Namespace.isReservedId(this.reserved, id); -}; - -/** - * Tests if the specified name is reserved. - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Enum.prototype.isReservedName = function isReservedName(name) { - return Namespace.isReservedName(this.reserved, name); -}; - -},{"25":25,"26":26,"39":39}],18:[function(require,module,exports){ -"use strict"; -module.exports = Field; - -// extends ReflectionObject -var ReflectionObject = require(26); -((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = "Field"; - -var Enum = require(17), - types = require(38), - util = require(39); - -var Type; // cyclic - -var ruleRe = /^required|optional|repeated$/; - -/** - * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class. - * @name Field - * @classdesc Reflected message field. - * @extends FieldBase - * @constructor - * @param {string} name Unique name within its namespace - * @param {number} id Unique id within its namespace - * @param {string} type Value type - * @param {string|Object.} [rule="optional"] Field rule - * @param {string|Object.} [extend] Extended type if different from parent - * @param {Object.} [options] Declared options - */ - -/** - * Constructs a field from a field descriptor. - * @param {string} name Field name - * @param {IField} json Field descriptor - * @returns {Field} Created field - * @throws {TypeError} If arguments are invalid - */ -Field.fromJSON = function fromJSON(name, json) { - var field = new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment); - if (json.edition) - field._edition = json.edition; - field._defaultEdition = "proto3"; // For backwards-compatibility. - return field; -}; - -/** - * Not an actual constructor. Use {@link Field} instead. - * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions. - * @exports FieldBase - * @extends ReflectionObject - * @constructor - * @param {string} name Unique name within its namespace - * @param {number} id Unique id within its namespace - * @param {string} type Value type - * @param {string|Object.} [rule="optional"] Field rule - * @param {string|Object.} [extend] Extended type if different from parent - * @param {Object.} [options] Declared options - * @param {string} [comment] Comment associated with this field - */ -function Field(name, id, type, rule, extend, options, comment) { - - if (util.isObject(rule)) { - comment = extend; - options = rule; - rule = extend = undefined; - } else if (util.isObject(extend)) { - comment = options; - options = extend; - extend = undefined; - } - - ReflectionObject.call(this, name, options); - - if (!util.isInteger(id) || id < 0) - throw TypeError("id must be a non-negative integer"); - - if (!util.isString(type)) - throw TypeError("type must be a string"); - - if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase())) - throw TypeError("rule must be a string rule"); - - if (extend !== undefined && !util.isString(extend)) - throw TypeError("extend must be a string"); - - /** - * Field rule, if any. - * @type {string|undefined} - */ - if (rule === "proto3_optional") { - rule = "optional"; - } - this.rule = rule && rule !== "optional" ? rule : undefined; // toJSON - - /** - * Field type. - * @type {string} - */ - this.type = type; // toJSON - - /** - * Unique field id. - * @type {number} - */ - this.id = id; // toJSON, marker - - /** - * Extended type if different from parent. - * @type {string|undefined} - */ - this.extend = extend || undefined; // toJSON - - /** - * Whether this field is repeated. - * @type {boolean} - */ - this.repeated = rule === "repeated"; - - /** - * Whether this field is a map or not. - * @type {boolean} - */ - this.map = false; - - /** - * Message this field belongs to. - * @type {Type|null} - */ - this.message = null; - - /** - * OneOf this field belongs to, if any, - * @type {OneOf|null} - */ - this.partOf = null; - - /** - * The field type's default value. - * @type {*} - */ - this.typeDefault = null; - - /** - * The field's default value on prototypes. - * @type {*} - */ - this.defaultValue = null; - - /** - * Whether this field's value should be treated as a long. - * @type {boolean} - */ - this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false; - - /** - * Whether this field's value is a buffer. - * @type {boolean} - */ - this.bytes = type === "bytes"; - - /** - * Resolved type if not a basic type. - * @type {Type|Enum|null} - */ - this.resolvedType = null; - - /** - * Sister-field within the extended type if a declaring extension field. - * @type {Field|null} - */ - this.extensionField = null; - - /** - * Sister-field within the declaring namespace if an extended field. - * @type {Field|null} - */ - this.declaringField = null; - - /** - * Comment for this field. - * @type {string|null} - */ - this.comment = comment; -} - -/** - * Determines whether this field is required. - * @name Field#required - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "required", { - get: function() { - return this._features.field_presence === "LEGACY_REQUIRED"; - } -}); - -/** - * Determines whether this field is not required. - * @name Field#optional - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "optional", { - get: function() { - return !this.required; - } -}); - -/** - * Determines whether this field uses tag-delimited encoding. In proto2 this - * corresponded to group syntax. - * @name Field#delimited - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "delimited", { - get: function() { - return this.resolvedType instanceof Type && - this._features.message_encoding === "DELIMITED"; - } -}); - -/** - * Determines whether this field is packed. Only relevant when repeated. - * @name Field#packed - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "packed", { - get: function() { - return this._features.repeated_field_encoding === "PACKED"; - } -}); - -/** - * Determines whether this field tracks presence. - * @name Field#hasPresence - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "hasPresence", { - get: function() { - if (this.repeated || this.map) { - return false; - } - return this.partOf || // oneofs - this.declaringField || this.extensionField || // extensions - this._features.field_presence !== "IMPLICIT"; - } -}); - -/** - * @override - */ -Field.prototype.setOption = function setOption(name, value, ifNotSet) { - return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet); -}; - -/** - * Field descriptor. - * @interface IField - * @property {string} [rule="optional"] Field rule - * @property {string} type Field type - * @property {number} id Field id - * @property {Object.} [options] Field options - */ - -/** - * Extension field descriptor. - * @interface IExtensionField - * @extends IField - * @property {string} extend Extended type - */ - -/** - * Converts this field to a field descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IField} Field descriptor - */ -Field.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "edition" , this._editionToJSON(), - "rule" , this.rule !== "optional" && this.rule || undefined, - "type" , this.type, - "id" , this.id, - "extend" , this.extend, - "options" , this.options, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * Resolves this field's type references. - * @returns {Field} `this` - * @throws {Error} If any reference cannot be resolved - */ -Field.prototype.resolve = function resolve() { - - if (this.resolved) - return this; - - if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it - this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type); - if (this.resolvedType instanceof Type) - this.typeDefault = null; - else // instanceof Enum - this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined - } else if (this.options && this.options.proto3_optional) { - // proto3 scalar value marked optional; should default to null - this.typeDefault = null; - } - - // use explicitly set default value if present - if (this.options && this.options["default"] != null) { - this.typeDefault = this.options["default"]; - if (this.resolvedType instanceof Enum && typeof this.typeDefault === "string") - this.typeDefault = this.resolvedType.values[this.typeDefault]; - } - - // remove unnecessary options - if (this.options) { - if (this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum)) - delete this.options.packed; - if (!Object.keys(this.options).length) - this.options = undefined; - } - - // convert to internal data type if necesssary - if (this.long) { - this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type === "uint64" || this.type === "fixed64"); - - /* istanbul ignore else */ - if (Object.freeze) - Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it) - - } else if (this.bytes && typeof this.typeDefault === "string") { - var buf; - if (util.base64.test(this.typeDefault)) - util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0); - else - util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0); - this.typeDefault = buf; - } - - // take special care of maps and repeated fields - if (this.map) - this.defaultValue = util.emptyObject; - else if (this.repeated) - this.defaultValue = util.emptyArray; - else - this.defaultValue = this.typeDefault; - - // ensure proper value on prototype - if (this.parent instanceof Type) - this.parent.ctor.prototype[this.name] = this.defaultValue; - - return ReflectionObject.prototype.resolve.call(this); -}; - -/** - * Infers field features from legacy syntax that may have been specified differently. - * in older editions. - * @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions - * @returns {object} The feature values to override - */ -Field.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(edition) { - if (edition !== "proto2" && edition !== "proto3") { - return {}; - } - - var features = {}; - - if (this.rule === "required") { - features.field_presence = "LEGACY_REQUIRED"; - } - if (this.parent && types.defaults[this.type] === undefined) { - // We can't use resolvedType because types may not have been resolved yet. However, - // legacy groups are always in the same scope as the field so we don't have to do a - // full scan of the tree. - var type = this.parent.get(this.type.split(".").pop()); - if (type && type instanceof Type && type.group) { - features.message_encoding = "DELIMITED"; - } - } - if (this.getOption("packed") === true) { - features.repeated_field_encoding = "PACKED"; - } else if (this.getOption("packed") === false) { - features.repeated_field_encoding = "EXPANDED"; - } - return features; -}; - -/** - * @override - */ -Field.prototype._resolveFeatures = function _resolveFeatures(edition) { - return ReflectionObject.prototype._resolveFeatures.call(this, this._edition || edition); -}; - -/** - * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript). - * @typedef FieldDecorator - * @type {function} - * @param {Object} prototype Target prototype - * @param {string} fieldName Field name - * @returns {undefined} - */ - -/** - * Field decorator (TypeScript). - * @name Field.d - * @function - * @param {number} fieldId Field id - * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"string"|"bool"|"bytes"|Object} fieldType Field type - * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule - * @param {T} [defaultValue] Default value - * @returns {FieldDecorator} Decorator function - * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[] - */ -Field.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) { - - // submessage: decorate the submessage and use its name as the type - if (typeof fieldType === "function") - fieldType = util.decorateType(fieldType).name; - - // enum reference: create a reflected copy of the enum and keep reuseing it - else if (fieldType && typeof fieldType === "object") - fieldType = util.decorateEnum(fieldType).name; - - return function fieldDecorator(prototype, fieldName) { - util.decorateType(prototype.constructor) - .add(new Field(fieldName, fieldId, fieldType, fieldRule, { "default": defaultValue })); - }; -}; - -/** - * Field decorator (TypeScript). - * @name Field.d - * @function - * @param {number} fieldId Field id - * @param {Constructor|string} fieldType Field type - * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule - * @returns {FieldDecorator} Decorator function - * @template T extends Message - * @variation 2 - */ -// like Field.d but without a default value - -// Sets up cyclic dependencies (called in index-light) -Field._configure = function configure(Type_) { - Type = Type_; -}; - -},{"17":17,"26":26,"38":38,"39":39}],19:[function(require,module,exports){ -"use strict"; -var protobuf = module.exports = require(20); - -protobuf.build = "light"; - -/** - * A node-style callback as used by {@link load} and {@link Root#load}. - * @typedef LoadCallback - * @type {function} - * @param {Error|null} error Error, if any, otherwise `null` - * @param {Root} [root] Root, if there hasn't been an error - * @returns {undefined} - */ - -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. - * @param {string|string[]} filename One or multiple files to load - * @param {Root} root Root namespace, defaults to create a new one if omitted. - * @param {LoadCallback} callback Callback function - * @returns {undefined} - * @see {@link Root#load} - */ -function load(filename, root, callback) { - if (typeof root === "function") { - callback = root; - root = new protobuf.Root(); - } else if (!root) - root = new protobuf.Root(); - return root.load(filename, callback); -} - -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. - * @name load - * @function - * @param {string|string[]} filename One or multiple files to load - * @param {LoadCallback} callback Callback function - * @returns {undefined} - * @see {@link Root#load} - * @variation 2 - */ -// function load(filename:string, callback:LoadCallback):undefined - -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise. - * @name load - * @function - * @param {string|string[]} filename One or multiple files to load - * @param {Root} [root] Root namespace, defaults to create a new one if omitted. - * @returns {Promise} Promise - * @see {@link Root#load} - * @variation 3 - */ -// function load(filename:string, [root:Root]):Promise - -protobuf.load = load; - -/** - * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only). - * @param {string|string[]} filename One or multiple files to load - * @param {Root} [root] Root namespace, defaults to create a new one if omitted. - * @returns {Root} Root namespace - * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid - * @see {@link Root#loadSync} - */ -function loadSync(filename, root) { - if (!root) - root = new protobuf.Root(); - return root.loadSync(filename); -} - -protobuf.loadSync = loadSync; - -// Serialization -protobuf.encoder = require(16); -protobuf.decoder = require(15); -protobuf.verifier = require(44); -protobuf.converter = require(14); - -// Reflection -protobuf.ReflectionObject = require(26); -protobuf.Namespace = require(25); -protobuf.Root = require(31); -protobuf.Enum = require(17); -protobuf.Type = require(37); -protobuf.Field = require(18); -protobuf.OneOf = require(27); -protobuf.MapField = require(22); -protobuf.Service = require(35); -protobuf.Method = require(24); - -// Runtime -protobuf.Message = require(23); -protobuf.wrappers = require(45); - -// Utility -protobuf.types = require(38); -protobuf.util = require(39); - -// Set up possibly cyclic reflection dependencies -protobuf.ReflectionObject._configure(protobuf.Root); -protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum); -protobuf.Root._configure(protobuf.Type); -protobuf.Field._configure(protobuf.Type); - -},{"14":14,"15":15,"16":16,"17":17,"18":18,"20":20,"22":22,"23":23,"24":24,"25":25,"26":26,"27":27,"31":31,"35":35,"37":37,"38":38,"39":39,"44":44,"45":45}],20:[function(require,module,exports){ -"use strict"; -var protobuf = exports; - -/** - * Build type, one of `"full"`, `"light"` or `"minimal"`. - * @name build - * @type {string} - * @const - */ -protobuf.build = "minimal"; - -// Serialization -protobuf.Writer = require(46); -protobuf.BufferWriter = require(47); -protobuf.Reader = require(29); -protobuf.BufferReader = require(30); - -// Utility -protobuf.util = require(42); -protobuf.rpc = require(33); -protobuf.roots = require(32); -protobuf.configure = configure; - -/* istanbul ignore next */ -/** - * Reconfigures the library according to the environment. - * @returns {undefined} - */ -function configure() { - protobuf.util._configure(); - protobuf.Writer._configure(protobuf.BufferWriter); - protobuf.Reader._configure(protobuf.BufferReader); -} - -// Set up buffer utility according to the environment -configure(); - -},{"29":29,"30":30,"32":32,"33":33,"42":42,"46":46,"47":47}],21:[function(require,module,exports){ -"use strict"; -var protobuf = module.exports = require(19); - -protobuf.build = "full"; - -// Parser -protobuf.tokenize = require(36); -protobuf.parse = require(28); -protobuf.common = require(13); - -// Configure parser -protobuf.Root._configure(protobuf.Type, protobuf.parse, protobuf.common); - -},{"13":13,"19":19,"28":28,"36":36}],22:[function(require,module,exports){ -"use strict"; -module.exports = MapField; - -// extends Field -var Field = require(18); -((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = "MapField"; - -var types = require(38), - util = require(39); - -/** - * Constructs a new map field instance. - * @classdesc Reflected map field. - * @extends FieldBase - * @constructor - * @param {string} name Unique name within its namespace - * @param {number} id Unique id within its namespace - * @param {string} keyType Key type - * @param {string} type Value type - * @param {Object.} [options] Declared options - * @param {string} [comment] Comment associated with this field - */ -function MapField(name, id, keyType, type, options, comment) { - Field.call(this, name, id, type, undefined, undefined, options, comment); - - /* istanbul ignore if */ - if (!util.isString(keyType)) - throw TypeError("keyType must be a string"); - - /** - * Key type. - * @type {string} - */ - this.keyType = keyType; // toJSON, marker - - /** - * Resolved key type if not a basic type. - * @type {ReflectionObject|null} - */ - this.resolvedKeyType = null; - - // Overrides Field#map - this.map = true; -} - -/** - * Map field descriptor. - * @interface IMapField - * @extends {IField} - * @property {string} keyType Key type - */ - -/** - * Extension map field descriptor. - * @interface IExtensionMapField - * @extends IMapField - * @property {string} extend Extended type - */ - -/** - * Constructs a map field from a map field descriptor. - * @param {string} name Field name - * @param {IMapField} json Map field descriptor - * @returns {MapField} Created map field - * @throws {TypeError} If arguments are invalid - */ -MapField.fromJSON = function fromJSON(name, json) { - return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment); -}; - -/** - * Converts this map field to a map field descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IMapField} Map field descriptor - */ -MapField.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "keyType" , this.keyType, - "type" , this.type, - "id" , this.id, - "extend" , this.extend, - "options" , this.options, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * @override - */ -MapField.prototype.resolve = function resolve() { - if (this.resolved) - return this; - - // Besides a value type, map fields have a key type that may be "any scalar type except for floating point types and bytes" - if (types.mapKey[this.keyType] === undefined) - throw Error("invalid key type: " + this.keyType); - - return Field.prototype.resolve.call(this); -}; - -/** - * Map field decorator (TypeScript). - * @name MapField.d - * @function - * @param {number} fieldId Field id - * @param {"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"} fieldKeyType Field key type - * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"|"bytes"|Object|Constructor<{}>} fieldValueType Field value type - * @returns {FieldDecorator} Decorator function - * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> } - */ -MapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) { - - // submessage value: decorate the submessage and use its name as the type - if (typeof fieldValueType === "function") - fieldValueType = util.decorateType(fieldValueType).name; - - // enum reference value: create a reflected copy of the enum and keep reuseing it - else if (fieldValueType && typeof fieldValueType === "object") - fieldValueType = util.decorateEnum(fieldValueType).name; - - return function mapFieldDecorator(prototype, fieldName) { - util.decorateType(prototype.constructor) - .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType)); - }; -}; - -},{"18":18,"38":38,"39":39}],23:[function(require,module,exports){ -"use strict"; -module.exports = Message; - -var util = require(42); - -/** - * Constructs a new message instance. - * @classdesc Abstract runtime message. - * @constructor - * @param {Properties} [properties] Properties to set - * @template T extends object = object - */ -function Message(properties) { - // not used internally - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) { - var key = keys[i]; - if (key === "__proto__") - continue; - this[key] = properties[key]; - } -} - -/** - * Reference to the reflected type. - * @name Message.$type - * @type {Type} - * @readonly - */ - -/** - * Reference to the reflected type. - * @name Message#$type - * @type {Type} - * @readonly - */ - -/*eslint-disable valid-jsdoc*/ - -/** - * Creates a new message of this type using the specified properties. - * @param {Object.} [properties] Properties to set - * @returns {Message} Message instance - * @template T extends Message - * @this Constructor - */ -Message.create = function create(properties) { - return this.$type.create(properties); -}; - -/** - * Encodes a message of this type. - * @param {T|Object.} message Message to encode - * @param {Writer} [writer] Writer to use - * @returns {Writer} Writer - * @template T extends Message - * @this Constructor - */ -Message.encode = function encode(message, writer) { - return this.$type.encode(message, writer); -}; - -/** - * Encodes a message of this type preceeded by its length as a varint. - * @param {T|Object.} message Message to encode - * @param {Writer} [writer] Writer to use - * @returns {Writer} Writer - * @template T extends Message - * @this Constructor - */ -Message.encodeDelimited = function encodeDelimited(message, writer) { - return this.$type.encodeDelimited(message, writer); -}; - -/** - * Decodes a message of this type. - * @name Message.decode - * @function - * @param {Reader|Uint8Array} reader Reader or buffer to decode - * @returns {T} Decoded message - * @template T extends Message - * @this Constructor - */ -Message.decode = function decode(reader) { - return this.$type.decode(reader); -}; - -/** - * Decodes a message of this type preceeded by its length as a varint. - * @name Message.decodeDelimited - * @function - * @param {Reader|Uint8Array} reader Reader or buffer to decode - * @returns {T} Decoded message - * @template T extends Message - * @this Constructor - */ -Message.decodeDelimited = function decodeDelimited(reader) { - return this.$type.decodeDelimited(reader); -}; - -/** - * Verifies a message of this type. - * @name Message.verify - * @function - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ -Message.verify = function verify(message) { - return this.$type.verify(message); -}; - -/** - * Creates a new message of this type from a plain object. Also converts values to their respective internal types. - * @param {Object.} object Plain object - * @returns {T} Message instance - * @template T extends Message - * @this Constructor - */ -Message.fromObject = function fromObject(object) { - return this.$type.fromObject(object); -}; - -/** - * Creates a plain object from a message of this type. Also converts values to other types if specified. - * @param {T} message Message instance - * @param {IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - * @template T extends Message - * @this Constructor - */ -Message.toObject = function toObject(message, options) { - return this.$type.toObject(message, options); -}; - -/** - * Converts this message to JSON. - * @returns {Object.} JSON object - */ -Message.prototype.toJSON = function toJSON() { - return this.$type.toObject(this, util.toJSONOptions); -}; - -/*eslint-enable valid-jsdoc*/ - -},{"42":42}],24:[function(require,module,exports){ -"use strict"; -module.exports = Method; - -// extends ReflectionObject -var ReflectionObject = require(26); -((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = "Method"; - -var util = require(39); - -/** - * Constructs a new service method instance. - * @classdesc Reflected service method. - * @extends ReflectionObject - * @constructor - * @param {string} name Method name - * @param {string|undefined} type Method type, usually `"rpc"` - * @param {string} requestType Request message type - * @param {string} responseType Response message type - * @param {boolean|Object.} [requestStream] Whether the request is streamed - * @param {boolean|Object.} [responseStream] Whether the response is streamed - * @param {Object.} [options] Declared options - * @param {string} [comment] The comment for this method - * @param {Object.} [parsedOptions] Declared options, properly parsed into an object - */ -function Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) { - - /* istanbul ignore next */ - if (util.isObject(requestStream)) { - options = requestStream; - requestStream = responseStream = undefined; - } else if (util.isObject(responseStream)) { - options = responseStream; - responseStream = undefined; - } - - /* istanbul ignore if */ - if (!(type === undefined || util.isString(type))) - throw TypeError("type must be a string"); - - /* istanbul ignore if */ - if (!util.isString(requestType)) - throw TypeError("requestType must be a string"); - - /* istanbul ignore if */ - if (!util.isString(responseType)) - throw TypeError("responseType must be a string"); - - ReflectionObject.call(this, name, options); - - /** - * Method type. - * @type {string} - */ - this.type = type || "rpc"; // toJSON - - /** - * Request type. - * @type {string} - */ - this.requestType = requestType; // toJSON, marker - - /** - * Whether requests are streamed or not. - * @type {boolean|undefined} - */ - this.requestStream = requestStream ? true : undefined; // toJSON - - /** - * Response type. - * @type {string} - */ - this.responseType = responseType; // toJSON - - /** - * Whether responses are streamed or not. - * @type {boolean|undefined} - */ - this.responseStream = responseStream ? true : undefined; // toJSON - - /** - * Resolved request type. - * @type {Type|null} - */ - this.resolvedRequestType = null; - - /** - * Resolved response type. - * @type {Type|null} - */ - this.resolvedResponseType = null; - - /** - * Comment for this method - * @type {string|null} - */ - this.comment = comment; - - /** - * Options properly parsed into an object - */ - this.parsedOptions = parsedOptions; -} - -/** - * Method descriptor. - * @interface IMethod - * @property {string} [type="rpc"] Method type - * @property {string} requestType Request type - * @property {string} responseType Response type - * @property {boolean} [requestStream=false] Whether requests are streamed - * @property {boolean} [responseStream=false] Whether responses are streamed - * @property {Object.} [options] Method options - * @property {string} comment Method comments - * @property {Object.} [parsedOptions] Method options properly parsed into an object - */ - -/** - * Constructs a method from a method descriptor. - * @param {string} name Method name - * @param {IMethod} json Method descriptor - * @returns {Method} Created method - * @throws {TypeError} If arguments are invalid - */ -Method.fromJSON = function fromJSON(name, json) { - return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions); -}; - -/** - * Converts this method to a method descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IMethod} Method descriptor - */ -Method.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "type" , this.type !== "rpc" && /* istanbul ignore next */ this.type || undefined, - "requestType" , this.requestType, - "requestStream" , this.requestStream, - "responseType" , this.responseType, - "responseStream" , this.responseStream, - "options" , this.options, - "comment" , keepComments ? this.comment : undefined, - "parsedOptions" , this.parsedOptions, - ]); -}; - -/** - * @override - */ -Method.prototype.resolve = function resolve() { - - /* istanbul ignore if */ - if (this.resolved) - return this; - - this.resolvedRequestType = this.parent.lookupType(this.requestType); - this.resolvedResponseType = this.parent.lookupType(this.responseType); - - return ReflectionObject.prototype.resolve.call(this); -}; - -},{"26":26,"39":39}],25:[function(require,module,exports){ -"use strict"; -module.exports = Namespace; - -// extends ReflectionObject -var ReflectionObject = require(26); -((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = "Namespace"; - -var Field = require(18), - util = require(39), - OneOf = require(27); - -var Type, // cyclic - Service, - Enum; - -/** - * Constructs a new namespace instance. - * @name Namespace - * @classdesc Reflected namespace. - * @extends NamespaceBase - * @constructor - * @param {string} name Namespace name - * @param {Object.} [options] Declared options - */ - -/** - * Constructs a namespace from JSON. - * @memberof Namespace - * @function - * @param {string} name Namespace name - * @param {Object.} json JSON object - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Namespace} Created namespace - * @throws {TypeError} If arguments are invalid - */ -Namespace.fromJSON = function fromJSON(name, json, depth) { - depth = util.checkDepth(depth); - return new Namespace(name, json.options).addJSON(json.nested, depth); -}; - -/** - * Converts an array of reflection objects to JSON. - * @memberof Namespace - * @param {ReflectionObject[]} array Object array - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {Object.|undefined} JSON object or `undefined` when array is empty - */ -function arrayToJSON(array, toJSONOptions) { - if (!(array && array.length)) - return undefined; - var obj = {}; - for (var i = 0; i < array.length; ++i) - obj[array[i].name] = array[i].toJSON(toJSONOptions); - return obj; -} - -Namespace.arrayToJSON = arrayToJSON; - -/** - * Tests if the specified id is reserved. - * @param {Array.|undefined} reserved Array of reserved ranges and names - * @param {number} id Id to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Namespace.isReservedId = function isReservedId(reserved, id) { - if (reserved) - for (var i = 0; i < reserved.length; ++i) - if (typeof reserved[i] !== "string" && reserved[i][0] <= id && reserved[i][1] > id) - return true; - return false; -}; - -/** - * Tests if the specified name is reserved. - * @param {Array.|undefined} reserved Array of reserved ranges and names - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Namespace.isReservedName = function isReservedName(reserved, name) { - if (reserved) - for (var i = 0; i < reserved.length; ++i) - if (reserved[i] === name) - return true; - return false; -}; - -/** - * Not an actual constructor. Use {@link Namespace} instead. - * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions. - * @exports NamespaceBase - * @extends ReflectionObject - * @abstract - * @constructor - * @param {string} name Namespace name - * @param {Object.} [options] Declared options - * @see {@link Namespace} - */ -function Namespace(name, options) { - ReflectionObject.call(this, name, options); - - /** - * Nested objects by name. - * @type {Object.|undefined} - */ - this.nested = undefined; // toJSON - - /** - * Cached nested objects as an array. - * @type {ReflectionObject[]|null} - * @private - */ - this._nestedArray = null; - - /** - * Cache lookup calls for any objects contains anywhere under this namespace. - * This drastically speeds up resolve for large cross-linked protos where the same - * types are looked up repeatedly. - * @type {Object.} - * @private - */ - this._lookupCache = Object.create(null); - - /** - * Whether or not objects contained in this namespace need feature resolution. - * @type {boolean} - * @protected - */ - this._needsRecursiveFeatureResolution = true; - - /** - * Whether or not objects contained in this namespace need a resolve. - * @type {boolean} - * @protected - */ - this._needsRecursiveResolve = true; -} - -function clearCache(namespace) { - namespace._nestedArray = null; - namespace._lookupCache = Object.create(null); - - // Also clear parent caches, since they include nested lookups. - var parent = namespace; - while(parent = parent.parent) { - parent._lookupCache = Object.create(null); - } - return namespace; -} - -/** - * Nested objects of this namespace as an array for iteration. - * @name NamespaceBase#nestedArray - * @type {ReflectionObject[]} - * @readonly - */ -Object.defineProperty(Namespace.prototype, "nestedArray", { - get: function() { - return this._nestedArray || (this._nestedArray = util.toArray(this.nested)); - } -}); - -/** - * Namespace descriptor. - * @interface INamespace - * @property {Object.} [options] Namespace options - * @property {Object.} [nested] Nested object descriptors - */ - -/** - * Any extension field descriptor. - * @typedef AnyExtensionField - * @type {IExtensionField|IExtensionMapField} - */ - -/** - * Any nested object descriptor. - * @typedef AnyNestedObject - * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf} - */ - -/** - * Converts this namespace to a namespace descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {INamespace} Namespace descriptor - */ -Namespace.prototype.toJSON = function toJSON(toJSONOptions) { - return util.toObject([ - "options" , this.options, - "nested" , arrayToJSON(this.nestedArray, toJSONOptions) - ]); -}; - -/** - * Adds nested objects to this namespace from nested object descriptors. - * @param {Object.} nestedJson Any nested object descriptors - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Namespace} `this` - */ -Namespace.prototype.addJSON = function addJSON(nestedJson, depth) { - depth = util.checkDepth(depth); - var ns = this; - /* istanbul ignore else */ - if (nestedJson) { - for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) { - nested = nestedJson[names[i]]; - ns.add( // most to least likely - ( nested.fields !== undefined - ? Type.fromJSON - : nested.values !== undefined - ? Enum.fromJSON - : nested.methods !== undefined - ? Service.fromJSON - : nested.id !== undefined - ? Field.fromJSON - : Namespace.fromJSON )(names[i], nested, depth + 1) - ); - } - } - return this; -}; - -/** - * Gets the nested object of the specified name. - * @param {string} name Nested object name - * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist - */ -Namespace.prototype.get = function get(name) { - return this.nested && Object.prototype.hasOwnProperty.call(this.nested, name) - ? this.nested[name] - : null; -}; - -/** - * Gets the values of the nested {@link Enum|enum} of the specified name. - * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`. - * @param {string} name Nested enum name - * @returns {Object.} Enum values - * @throws {Error} If there is no such enum - */ -Namespace.prototype.getEnum = function getEnum(name) { - if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name) && this.nested[name] instanceof Enum) - return this.nested[name].values; - throw Error("no such enum: " + name); -}; - -/** - * Adds a nested object to this namespace. - * @param {ReflectionObject} object Nested object to add - * @returns {Namespace} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a nested object with this name - */ -Namespace.prototype.add = function add(object) { - - if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace)) - throw TypeError("object must be a valid nested object"); - - if (object.name === "__proto__") - return this; - - if (!this.nested) - this.nested = {}; - else { - var prev = this.get(object.name); - if (prev) { - if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) { - // replace plain namespace but keep existing nested elements and options - var nested = prev.nestedArray; - for (var i = 0; i < nested.length; ++i) - object.add(nested[i]); - this.remove(prev); - if (!this.nested) - this.nested = {}; - object.setOptions(prev.options, true); - - } else - throw Error("duplicate name '" + object.name + "' in " + this); - } - } - this.nested[object.name] = object; - - if (!(this instanceof Type || this instanceof Service || this instanceof Enum || this instanceof Field)) { - // This is a package or a root namespace. - if (!object._edition) { - // Make sure that some edition is set if it hasn't already been specified. - object._edition = object._defaultEdition; - } - } - - this._needsRecursiveFeatureResolution = true; - this._needsRecursiveResolve = true; - - // Also clear parent caches, since they need to recurse down. - var parent = this; - while(parent = parent.parent) { - parent._needsRecursiveFeatureResolution = true; - parent._needsRecursiveResolve = true; - } - - object.onAdd(this); - return clearCache(this); -}; - -/** - * Removes a nested object from this namespace. - * @param {ReflectionObject} object Nested object to remove - * @returns {Namespace} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `object` is not a member of this namespace - */ -Namespace.prototype.remove = function remove(object) { - - if (!(object instanceof ReflectionObject)) - throw TypeError("object must be a ReflectionObject"); - if (object.parent !== this) - throw Error(object + " is not a member of " + this); - - delete this.nested[object.name]; - if (!Object.keys(this.nested).length) - this.nested = undefined; - - object.onRemove(this); - return clearCache(this); -}; - -/** - * Defines additial namespaces within this one if not yet existing. - * @param {string|string[]} path Path to create - * @param {*} [json] Nested types to create from JSON - * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty - */ -Namespace.prototype.define = function define(path, json) { - - if (util.isString(path)) - path = path.split("."); - else if (!Array.isArray(path)) - throw TypeError("illegal path"); - if (path && path.length && path[0] === "") - throw Error("path must be relative"); - if (path.length > util.recursionLimit) - throw Error("max depth exceeded"); - - var ptr = this; - while (path.length > 0) { - var part = path.shift(); - if (ptr.nested && ptr.nested[part]) { - ptr = ptr.nested[part]; - if (!(ptr instanceof Namespace)) - throw Error("path conflicts with non-namespace objects"); - } else - ptr.add(ptr = new Namespace(part)); - } - if (json) - ptr.addJSON(json); - return ptr; -}; - -/** - * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost. - * @returns {Namespace} `this` - */ -Namespace.prototype.resolveAll = function resolveAll() { - if (!this._needsRecursiveResolve) return this; - - this._resolveFeaturesRecursive(this._edition); - - var nested = this.nestedArray, i = 0; - this.resolve(); - while (i < nested.length) - if (nested[i] instanceof Namespace) - nested[i++].resolveAll(); - else - nested[i++].resolve(); - this._needsRecursiveResolve = false; - return this; -}; - -/** - * @override - */ -Namespace.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) { - if (!this._needsRecursiveFeatureResolution) return this; - this._needsRecursiveFeatureResolution = false; - - edition = this._edition || edition; - - ReflectionObject.prototype._resolveFeaturesRecursive.call(this, edition); - this.nestedArray.forEach(nested => { - nested._resolveFeaturesRecursive(edition); - }); - return this; -}; - -/** - * Recursively looks up the reflection object matching the specified path in the scope of this namespace. - * @param {string|string[]} path Path to look up - * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc. - * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked - * @returns {ReflectionObject|null} Looked up object or `null` if none could be found - */ -Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) { - /* istanbul ignore next */ - if (typeof filterTypes === "boolean") { - parentAlreadyChecked = filterTypes; - filterTypes = undefined; - } else if (filterTypes && !Array.isArray(filterTypes)) - filterTypes = [ filterTypes ]; - - if (util.isString(path) && path.length) { - if (path === ".") - return this.root; - path = path.split("."); - } else if (!path.length) - return this; - - var flatPath = path.join("."); - - // Start at root if path is absolute - if (path[0] === "") - return this.root.lookup(path.slice(1), filterTypes); - - // Early bailout for objects with matching absolute paths - var found = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects["." + flatPath]; - if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) { - return found; - } - - // Do a regular lookup at this namespace and below - found = this._lookupImpl(path, flatPath); - if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) { - return found; - } - - if (parentAlreadyChecked) - return null; - - // If there hasn't been a match, walk up the tree and look more broadly - var current = this; - while (current.parent) { - found = current.parent._lookupImpl(path, flatPath); - if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) { - return found; - } - current = current.parent; - } - return null; -}; - -/** - * Internal helper for lookup that handles searching just at this namespace and below along with caching. - * @param {string[]} path Path to look up - * @param {string} flatPath Flattened version of the path to use as a cache key - * @returns {ReflectionObject|null} Looked up object or `null` if none could be found - * @private - */ -Namespace.prototype._lookupImpl = function lookup(path, flatPath) { - if(Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) { - return this._lookupCache[flatPath]; - } - - // Test if the first part matches any nested object, and if so, traverse if path contains more - var found = this.get(path[0]); - var exact = null; - if (found) { - if (path.length === 1) { - exact = found; - } else if (found instanceof Namespace) { - path = path.slice(1); - exact = found._lookupImpl(path, path.join(".")); - } - - // Otherwise try each nested namespace - } else { - for (var i = 0; i < this.nestedArray.length; ++i) - if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path, flatPath))) { - exact = found; - break; - } - } - - // Set this even when null, so that when we walk up the tree we can quickly bail on repeated checks back down. - this._lookupCache[flatPath] = exact; - return exact; -}; - -/** - * Looks up the reflection object at the specified path, relative to this namespace. - * @name NamespaceBase#lookup - * @function - * @param {string|string[]} path Path to look up - * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked - * @returns {ReflectionObject|null} Looked up object or `null` if none could be found - * @variation 2 - */ -// lookup(path: string, [parentAlreadyChecked: boolean]) - -/** - * Looks up the {@link Type|type} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Type} Looked up type - * @throws {Error} If `path` does not point to a type - */ -Namespace.prototype.lookupType = function lookupType(path) { - var found = this.lookup(path, [ Type ]); - if (!found) - throw Error("no such type: " + path); - return found; -}; - -/** - * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Enum} Looked up enum - * @throws {Error} If `path` does not point to an enum - */ -Namespace.prototype.lookupEnum = function lookupEnum(path) { - var found = this.lookup(path, [ Enum ]); - if (!found) - throw Error("no such Enum '" + path + "' in " + this); - return found; -}; - -/** - * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Type} Looked up type or enum - * @throws {Error} If `path` does not point to a type or enum - */ -Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) { - var found = this.lookup(path, [ Type, Enum ]); - if (!found) - throw Error("no such Type or Enum '" + path + "' in " + this); - return found; -}; - -/** - * Looks up the {@link Service|service} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Service} Looked up service - * @throws {Error} If `path` does not point to a service - */ -Namespace.prototype.lookupService = function lookupService(path) { - var found = this.lookup(path, [ Service ]); - if (!found) - throw Error("no such Service '" + path + "' in " + this); - return found; -}; - -// Sets up cyclic dependencies (called in index-light) -Namespace._configure = function(Type_, Service_, Enum_) { - Type = Type_; - Service = Service_; - Enum = Enum_; -}; - -},{"18":18,"26":26,"27":27,"39":39}],26:[function(require,module,exports){ -"use strict"; -module.exports = ReflectionObject; - -ReflectionObject.className = "ReflectionObject"; - -const OneOf = require(27); -var util = require(39); - -var Root; // cyclic - -/* eslint-disable no-warning-comments */ -// TODO: Replace with embedded proto. -var editions2023Defaults = {enum_type: "OPEN", field_presence: "EXPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY"}; -var proto2Defaults = {enum_type: "CLOSED", field_presence: "EXPLICIT", json_format: "LEGACY_BEST_EFFORT", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "EXPANDED", utf8_validation: "NONE"}; -var proto3Defaults = {enum_type: "OPEN", field_presence: "IMPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY"}; - -/** - * Constructs a new reflection object instance. - * @classdesc Base class of all reflection objects. - * @constructor - * @param {string} name Object name - * @param {Object.} [options] Declared options - * @abstract - */ -function ReflectionObject(name, options) { - - if (!util.isString(name)) - throw TypeError("name must be a string"); - - if (options && !util.isObject(options)) - throw TypeError("options must be an object"); - - /** - * Options. - * @type {Object.|undefined} - */ - this.options = options; // toJSON - - /** - * Parsed Options. - * @type {Array.>|undefined} - */ - this.parsedOptions = null; - - /** - * Unique name within its namespace. - * @type {string} - */ - this.name = name; - - /** - * The edition specified for this object. Only relevant for top-level objects. - * @type {string} - * @private - */ - this._edition = null; - - /** - * The default edition to use for this object if none is specified. For legacy reasons, - * this is proto2 except in the JSON parsing case where it was proto3. - * @type {string} - * @private - */ - this._defaultEdition = "proto2"; - - /** - * Resolved Features. - * @type {object} - * @private - */ - this._features = {}; - - /** - * Whether or not features have been resolved. - * @type {boolean} - * @private - */ - this._featuresResolved = false; - - /** - * Parent namespace. - * @type {Namespace|null} - */ - this.parent = null; - - /** - * Whether already resolved or not. - * @type {boolean} - */ - this.resolved = false; - - /** - * Comment text, if any. - * @type {string|null} - */ - this.comment = null; - - /** - * Defining file name. - * @type {string|null} - */ - this.filename = null; -} - -Object.defineProperties(ReflectionObject.prototype, { - - /** - * Reference to the root namespace. - * @name ReflectionObject#root - * @type {Root} - * @readonly - */ - root: { - get: function() { - var ptr = this; - while (ptr.parent !== null) - ptr = ptr.parent; - return ptr; - } - }, - - /** - * Full name including leading dot. - * @name ReflectionObject#fullName - * @type {string} - * @readonly - */ - fullName: { - get: function() { - var path = [ this.name ], - ptr = this.parent; - while (ptr) { - path.unshift(ptr.name); - ptr = ptr.parent; - } - return path.join("."); - } - } -}); - -/** - * Converts this reflection object to its descriptor representation. - * @returns {Object.} Descriptor - * @abstract - */ -ReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() { - throw Error(); // not implemented, shouldn't happen -}; - -/** - * Called when this object is added to a parent. - * @param {ReflectionObject} parent Parent added to - * @returns {undefined} - */ -ReflectionObject.prototype.onAdd = function onAdd(parent) { - if (this.parent && this.parent !== parent) - this.parent.remove(this); - this.parent = parent; - this.resolved = false; - var root = parent.root; - if (root instanceof Root) - root._handleAdd(this); -}; - -/** - * Called when this object is removed from a parent. - * @param {ReflectionObject} parent Parent removed from - * @returns {undefined} - */ -ReflectionObject.prototype.onRemove = function onRemove(parent) { - var root = parent.root; - if (root instanceof Root) - root._handleRemove(this); - this.parent = null; - this.resolved = false; -}; - -/** - * Resolves this objects type references. - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype.resolve = function resolve() { - if (this.resolved) - return this; - if (this.root instanceof Root) - this.resolved = true; // only if part of a root - return this; -}; - -/** - * Resolves this objects editions features. - * @param {string} edition The edition we're currently resolving for. - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) { - return this._resolveFeatures(this._edition || edition); -}; - -/** - * Resolves child features from parent features - * @param {string} edition The edition we're currently resolving for. - * @returns {undefined} - */ -ReflectionObject.prototype._resolveFeatures = function _resolveFeatures(edition) { - if (this._featuresResolved) { - return; - } - - var defaults = {}; - - /* istanbul ignore if */ - if (!edition) { - throw new Error("Unknown edition for " + this.fullName); - } - - var protoFeatures = util.merge({}, this.options && this.options.features, - this._inferLegacyProtoFeatures(edition)); - - if (this._edition) { - // For a namespace marked with a specific edition, reset defaults. - /* istanbul ignore else */ - if (edition === "proto2") { - defaults = Object.assign({}, proto2Defaults); - } else if (edition === "proto3") { - defaults = Object.assign({}, proto3Defaults); - } else if (edition === "2023") { - defaults = Object.assign({}, editions2023Defaults); - } else { - throw new Error("Unknown edition: " + edition); - } - this._features = util.merge(defaults, protoFeatures); - this._featuresResolved = true; - return; - } - - // fields in Oneofs aren't actually children of them, so we have to - // special-case it - /* istanbul ignore else */ - if (this.partOf instanceof OneOf) { - var lexicalParentFeaturesCopy = util.merge({}, this.partOf._features); - this._features = util.merge(lexicalParentFeaturesCopy, protoFeatures); - } else if (this.declaringField) { - // Skip feature resolution of sister fields. - } else if (this.parent) { - var parentFeaturesCopy = util.merge({}, this.parent._features); - this._features = util.merge(parentFeaturesCopy, protoFeatures); - } else { - throw new Error("Unable to find a parent for " + this.fullName); - } - if (this.extensionField) { - // Sister fields should have the same features as their extensions. - this.extensionField._features = this._features; - } - this._featuresResolved = true; -}; - -/** - * Infers features from legacy syntax that may have been specified differently. - * in older editions. - * @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions - * @returns {object} The feature values to override - */ -ReflectionObject.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(/*edition*/) { - return {}; -}; - -/** - * Gets an option value. - * @param {string} name Option name - * @returns {*} Option value or `undefined` if not set - */ -ReflectionObject.prototype.getOption = function getOption(name) { - if (this.options) - return this.options[name]; - return undefined; -}; - -/** - * Sets an option. - * @param {string} name Option name - * @param {*} value Option value - * @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) { - if (name === "__proto__") - return this; - if (!this.options) - this.options = {}; - if (/^features\./.test(name)) { - util.setProperty(this.options, name, value, ifNotSet); - } else if (!ifNotSet || this.options[name] === undefined) { - if (this.getOption(name) !== value) this.resolved = false; - this.options[name] = value; - } - - return this; -}; - -/** - * Sets a parsed option. - * @param {string} name parsed Option name - * @param {*} value Option value - * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\empty, will add a new option with that value - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) { - if (name === "__proto__") - return this; - if (!this.parsedOptions) { - this.parsedOptions = []; - } - var parsedOptions = this.parsedOptions; - if (propName) { - // If setting a sub property of an option then try to merge it - // with an existing option - var opt = parsedOptions.find(function (opt) { - return Object.prototype.hasOwnProperty.call(opt, name); - }); - if (opt) { - // If we found an existing option - just merge the property value - // (If it's a feature, will just write over) - var newValue = opt[name]; - util.setProperty(newValue, propName, value); - } else { - // otherwise, create a new option, set its property and add it to the list - opt = {}; - opt[name] = util.setProperty({}, propName, value); - parsedOptions.push(opt); - } - } else { - // Always create a new option when setting the value of the option itself - var newOpt = {}; - newOpt[name] = value; - parsedOptions.push(newOpt); - } - - return this; -}; - -/** - * Sets multiple options. - * @param {Object.} options Options to set - * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) { - if (options) - for (var keys = Object.keys(options), i = 0; i < keys.length; ++i) - this.setOption(keys[i], options[keys[i]], ifNotSet); - return this; -}; - -/** - * Converts this instance to its string representation. - * @returns {string} Class name[, space, full name] - */ -ReflectionObject.prototype.toString = function toString() { - var className = this.constructor.className, - fullName = this.fullName; - if (fullName.length) - return className + " " + fullName; - return className; -}; - -/** - * Converts the edition this object is pinned to for JSON format. - * @returns {string|undefined} The edition string for JSON representation - */ -ReflectionObject.prototype._editionToJSON = function _editionToJSON() { - if (!this._edition || this._edition === "proto3") { - // Avoid emitting proto3 since we need to default to it for backwards - // compatibility anyway. - return undefined; - } - return this._edition; -}; - -// Sets up cyclic dependencies (called in index-light) -ReflectionObject._configure = function(Root_) { - Root = Root_; -}; - -},{"27":27,"39":39}],27:[function(require,module,exports){ -"use strict"; -module.exports = OneOf; - -// extends ReflectionObject -var ReflectionObject = require(26); -((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = "OneOf"; - -var Field = require(18), - util = require(39); - -/** - * Constructs a new oneof instance. - * @classdesc Reflected oneof. - * @extends ReflectionObject - * @constructor - * @param {string} name Oneof name - * @param {string[]|Object.} [fieldNames] Field names - * @param {Object.} [options] Declared options - * @param {string} [comment] Comment associated with this field - */ -function OneOf(name, fieldNames, options, comment) { - if (!Array.isArray(fieldNames)) { - options = fieldNames; - fieldNames = undefined; - } - ReflectionObject.call(this, name, options); - - /* istanbul ignore if */ - if (!(fieldNames === undefined || Array.isArray(fieldNames))) - throw TypeError("fieldNames must be an Array"); - - /** - * Field names that belong to this oneof. - * @type {string[]} - */ - this.oneof = fieldNames || []; // toJSON, marker - - /** - * Fields that belong to this oneof as an array for iteration. - * @type {Field[]} - * @readonly - */ - this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent - - /** - * Comment for this field. - * @type {string|null} - */ - this.comment = comment; -} - -/** - * Oneof descriptor. - * @interface IOneOf - * @property {Array.} oneof Oneof field names - * @property {Object.} [options] Oneof options - */ - -/** - * Constructs a oneof from a oneof descriptor. - * @param {string} name Oneof name - * @param {IOneOf} json Oneof descriptor - * @returns {OneOf} Created oneof - * @throws {TypeError} If arguments are invalid - */ -OneOf.fromJSON = function fromJSON(name, json) { - return new OneOf(name, json.oneof, json.options, json.comment); -}; - -/** - * Converts this oneof to a oneof descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IOneOf} Oneof descriptor - */ -OneOf.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "options" , this.options, - "oneof" , this.oneof, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * Adds the fields of the specified oneof to the parent if not already done so. - * @param {OneOf} oneof The oneof - * @returns {undefined} - * @inner - * @ignore - */ -function addFieldsToParent(oneof) { - if (oneof.parent) - for (var i = 0; i < oneof.fieldsArray.length; ++i) - if (!oneof.fieldsArray[i].parent) - oneof.parent.add(oneof.fieldsArray[i]); -} - -/** - * Adds a field to this oneof and removes it from its current parent, if any. - * @param {Field} field Field to add - * @returns {OneOf} `this` - */ -OneOf.prototype.add = function add(field) { - - /* istanbul ignore if */ - if (!(field instanceof Field)) - throw TypeError("field must be a Field"); - - if (field.parent && field.parent !== this.parent) - field.parent.remove(field); - this.oneof.push(field.name); - this.fieldsArray.push(field); - field.partOf = this; // field.parent remains null - addFieldsToParent(this); - return this; -}; - -/** - * Removes a field from this oneof and puts it back to the oneof's parent. - * @param {Field} field Field to remove - * @returns {OneOf} `this` - */ -OneOf.prototype.remove = function remove(field) { - - /* istanbul ignore if */ - if (!(field instanceof Field)) - throw TypeError("field must be a Field"); - - var index = this.fieldsArray.indexOf(field); - - /* istanbul ignore if */ - if (index < 0) - throw Error(field + " is not a member of " + this); - - this.fieldsArray.splice(index, 1); - index = this.oneof.indexOf(field.name); - - /* istanbul ignore else */ - if (index > -1) // theoretical - this.oneof.splice(index, 1); - - field.partOf = null; - return this; -}; - -/** - * @override - */ -OneOf.prototype.onAdd = function onAdd(parent) { - ReflectionObject.prototype.onAdd.call(this, parent); - var self = this; - // Collect present fields - for (var i = 0; i < this.oneof.length; ++i) { - var field = parent.get(this.oneof[i]); - if (field && !field.partOf) { - field.partOf = self; - self.fieldsArray.push(field); - } - } - // Add not yet present fields - addFieldsToParent(this); -}; - -/** - * @override - */ -OneOf.prototype.onRemove = function onRemove(parent) { - for (var i = 0, field; i < this.fieldsArray.length; ++i) - if ((field = this.fieldsArray[i]).parent) - field.parent.remove(field); - ReflectionObject.prototype.onRemove.call(this, parent); -}; - -/** - * Determines whether this field corresponds to a synthetic oneof created for - * a proto3 optional field. No behavioral logic should depend on this, but it - * can be relevant for reflection. - * @name OneOf#isProto3Optional - * @type {boolean} - * @readonly - */ -Object.defineProperty(OneOf.prototype, "isProto3Optional", { - get: function() { - if (this.fieldsArray == null || this.fieldsArray.length !== 1) { - return false; - } - - var field = this.fieldsArray[0]; - return field.options != null && field.options["proto3_optional"] === true; - } -}); - -/** - * Decorator function as returned by {@link OneOf.d} (TypeScript). - * @typedef OneOfDecorator - * @type {function} - * @param {Object} prototype Target prototype - * @param {string} oneofName OneOf name - * @returns {undefined} - */ - -/** - * OneOf decorator (TypeScript). - * @function - * @param {...string} fieldNames Field names - * @returns {OneOfDecorator} Decorator function - * @template T extends string - */ -OneOf.d = function decorateOneOf() { - var fieldNames = new Array(arguments.length), - index = 0; - while (index < arguments.length) - fieldNames[index] = arguments[index++]; - return function oneOfDecorator(prototype, oneofName) { - util.decorateType(prototype.constructor) - .add(new OneOf(oneofName, fieldNames)); - Object.defineProperty(prototype, oneofName, { - get: util.oneOfGetter(fieldNames), - set: util.oneOfSetter(fieldNames) - }); - }; -}; - -},{"18":18,"26":26,"39":39}],28:[function(require,module,exports){ -"use strict"; -module.exports = parse; - -parse.filename = null; -parse.defaults = { keepCase: false }; - -var tokenize = require(36), - Root = require(31), - Type = require(37), - Field = require(18), - MapField = require(22), - OneOf = require(27), - Enum = require(17), - Service = require(35), - Method = require(24), - ReflectionObject = require(26), - types = require(38), - util = require(39); - -var base10Re = /^[1-9][0-9]*$/, - base10NegRe = /^-?[1-9][0-9]*$/, - base16Re = /^0[x][0-9a-fA-F]+$/, - base16NegRe = /^-?0[x][0-9a-fA-F]+$/, - base8Re = /^0[0-7]+$/, - base8NegRe = /^-?0[0-7]+$/, - numberRe = util.patterns.numberRe, - nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/, - typeRefRe = util.patterns.typeRefRe; - -/** - * Result object returned from {@link parse}. - * @interface IParserResult - * @property {string|undefined} package Package name, if declared - * @property {string[]|undefined} imports Imports, if any - * @property {string[]|undefined} weakImports Weak imports, if any - * @property {Root} root Populated root instance - */ - -/** - * Options modifying the behavior of {@link parse}. - * @interface IParseOptions - * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case - * @property {boolean} [alternateCommentMode=false] Recognize double-slash comments in addition to doc-block comments. - * @property {boolean} [preferTrailingComment=false] Use trailing comment when both leading comment and trailing comment exist. - */ - -/** - * Options modifying the behavior of JSON serialization. - * @interface IToJSONOptions - * @property {boolean} [keepComments=false] Serializes comments. - */ - -/** - * Parses the given .proto source and returns an object with the parsed contents. - * @param {string} source Source contents - * @param {Root} root Root to populate - * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns {IParserResult} Parser result - * @property {string} filename=null Currently processing file name for error reporting, if known - * @property {IParseOptions} defaults Default {@link IParseOptions} - */ -function parse(source, root, options) { - /* eslint-disable callback-return */ - if (!(root instanceof Root)) { - options = root; - root = new Root(); - } - if (!options) - options = parse.defaults; - - var preferTrailingComment = options.preferTrailingComment || false; - var tn = tokenize(source, options.alternateCommentMode || false), - next = tn.next, - push = tn.push, - peek = tn.peek, - skip = tn.skip, - cmnt = tn.cmnt; - - var head = true, - pkg, - imports, - weakImports, - edition = "proto2"; - - var ptr = root; - - var topLevelObjects = []; - var topLevelOptions = {}; - - var applyCase = options.keepCase ? function(name) { return name; } : util.camelCase; - - function resolveFileFeatures() { - topLevelObjects.forEach(obj => { - obj._edition = edition; - Object.keys(topLevelOptions).forEach(opt => { - if (obj.getOption(opt) !== undefined) return; - obj.setOption(opt, topLevelOptions[opt], true); - }); - }); - } - - /* istanbul ignore next */ - function illegal(token, name, insideTryCatch) { - var filename = parse.filename; - if (!insideTryCatch) - parse.filename = null; - return Error("illegal " + (name || "token") + " '" + token + "' (" + (filename ? filename + ", " : "") + "line " + tn.line + ")"); - } - - function readString() { - var values = [], - token; - do { - /* istanbul ignore if */ - if ((token = next()) !== "\"" && token !== "'") - throw illegal(token); - - values.push(next()); - skip(token); - token = peek(); - } while (token === "\"" || token === "'"); - return values.join(""); - } - - function readValue(acceptTypeRef) { - var token = next(); - switch (token) { - case "'": - case "\"": - push(token); - return readString(); - case "true": case "TRUE": - return true; - case "false": case "FALSE": - return false; - } - try { - return parseNumber(token, /* insideTryCatch */ true); - } catch (e) { - /* istanbul ignore else */ - if (acceptTypeRef && typeRefRe.test(token)) - return token; - - /* istanbul ignore next */ - throw illegal(token, "value"); - } - } - - function readRanges(target, acceptStrings) { - var token, start; - do { - if (acceptStrings && ((token = peek()) === "\"" || token === "'")) { - var str = readString(); - target.push(str); - if (edition >= 2023) { - throw illegal(str, "id"); - } - } else { - try { - target.push([ start = parseId(next()), skip("to", true) ? parseId(next()) : start ]); - } catch (err) { - if (acceptStrings && typeRefRe.test(token) && edition >= 2023) { - target.push(token); - } else { - throw err; - } - } - } - } while (skip(",", true)); - var dummy = {options: undefined}; - dummy.setOption = function(name, value) { - if (this.options === undefined) this.options = {}; - this.options[name] = value; - }; - ifBlock( - dummy, - function parseRange_block(token) { - /* istanbul ignore else */ - if (token === "option") { - parseOption(dummy, token); // skip - skip(";"); - } else - throw illegal(token); - }, - function parseRange_line() { - parseInlineOptions(dummy); // skip - }); - } - - function parseNumber(token, insideTryCatch) { - var sign = 1; - if (token.charAt(0) === "-") { - sign = -1; - token = token.substring(1); - } - switch (token) { - case "inf": case "INF": case "Inf": - return sign * Infinity; - case "nan": case "NAN": case "Nan": case "NaN": - return NaN; - case "0": - return 0; - } - if (base10Re.test(token)) - return sign * parseInt(token, 10); - if (base16Re.test(token)) - return sign * parseInt(token, 16); - if (base8Re.test(token)) - return sign * parseInt(token, 8); - - /* istanbul ignore else */ - if (numberRe.test(token)) - return sign * parseFloat(token); - - /* istanbul ignore next */ - throw illegal(token, "number", insideTryCatch); - } - - function parseId(token, acceptNegative) { - switch (token) { - case "max": case "MAX": case "Max": - return 536870911; - case "0": - return 0; - } - - /* istanbul ignore if */ - if (!acceptNegative && token.charAt(0) === "-") - throw illegal(token, "id"); - - if (base10NegRe.test(token)) - return parseInt(token, 10); - if (base16NegRe.test(token)) - return parseInt(token, 16); - - /* istanbul ignore else */ - if (base8NegRe.test(token)) - return parseInt(token, 8); - - /* istanbul ignore next */ - throw illegal(token, "id"); - } - - function parsePackage() { - /* istanbul ignore if */ - if (pkg !== undefined) - throw illegal("package"); - - pkg = next(); - - /* istanbul ignore if */ - if (!typeRefRe.test(pkg)) - throw illegal(pkg, "name"); - - ptr = ptr.define(pkg); - - skip(";"); - } - - function parseImport() { - var token = peek(); - var whichImports; - switch (token) { - case "weak": - whichImports = weakImports || (weakImports = []); - next(); - break; - case "public": - next(); - // eslint-disable-next-line no-fallthrough - default: - whichImports = imports || (imports = []); - break; - } - token = readString(); - skip(";"); - whichImports.push(token); - } - - function parseSyntax() { - skip("="); - edition = readString(); - - /* istanbul ignore if */ - if (edition < 2023) - throw illegal(edition, "syntax"); - - skip(";"); - } - - function parseEdition() { - skip("="); - edition = readString(); - const supportedEditions = ["2023"]; - - /* istanbul ignore if */ - if (!supportedEditions.includes(edition)) - throw illegal(edition, "edition"); - - skip(";"); - } - - - function parseCommon(parent, token, depth) { - if (depth === undefined) - depth = 0; - // depth is checked by dispatched functions - switch (token) { - - case "option": - parseOption(parent, token); - skip(";"); - return true; - - case "message": - parseType(parent, token, depth + 1); - return true; - - case "enum": - parseEnum(parent, token); - return true; - - case "service": - parseService(parent, token, depth + 1); - return true; - - case "extend": - parseExtension(parent, token, depth); - return true; - } - return false; - } - - function ifBlock(obj, fnIf, fnElse) { - var trailingLine = tn.line; - if (obj) { - if(typeof obj.comment !== "string") { - obj.comment = cmnt(); // try block-type comment - } - obj.filename = parse.filename; - } - if (skip("{", true)) { - var token; - while ((token = next()) !== "}") - fnIf(token); - skip(";", true); - } else { - if (fnElse) - fnElse(); - skip(";"); - if (obj && (typeof obj.comment !== "string" || preferTrailingComment)) - obj.comment = cmnt(trailingLine) || obj.comment; // try line-type comment - } - } - - function parseType(parent, token, depth) { - if (depth === undefined) - depth = 0; - if (depth > util.nestingLimit) - throw Error("max depth exceeded"); - - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "type name"); - - var type = new Type(token); - ifBlock(type, function parseType_block(token) { - if (parseCommon(type, token, depth)) - return; - - switch (token) { - - case "map": - parseMapField(type, token); - break; - - case "required": - if (edition !== "proto2") - throw illegal(token); - /* eslint-disable no-fallthrough */ - case "repeated": - parseField(type, token, undefined, depth + 1); - break; - - case "optional": - /* istanbul ignore if */ - if (edition === "proto3") { - parseField(type, "proto3_optional", undefined, depth + 1); - } else if (edition !== "proto2") { - throw illegal(token); - } else { - parseField(type, "optional", undefined, depth + 1); - } - break; - - case "oneof": - parseOneOf(type, token, depth + 1); - break; - - case "extensions": - readRanges(type.extensions || (type.extensions = [])); - break; - - case "reserved": - readRanges(type.reserved || (type.reserved = []), true); - break; - - default: - /* istanbul ignore if */ - if (edition === "proto2" || !typeRefRe.test(token)) { - throw illegal(token); - } - - push(token); - parseField(type, "optional", undefined, depth + 1); - break; - } - }); - parent.add(type); - if (parent === ptr) { - topLevelObjects.push(type); - } - } - - function parseField(parent, rule, extend, depth) { - var type = next(); - if (type === "group") { - parseGroup(parent, rule, depth); - return; - } - // Type names can consume multiple tokens, in multiple variants: - // package.subpackage field tokens: "package.subpackage" [TYPE NAME ENDS HERE] "field" - // package . subpackage field tokens: "package" "." "subpackage" [TYPE NAME ENDS HERE] "field" - // package. subpackage field tokens: "package." "subpackage" [TYPE NAME ENDS HERE] "field" - // package .subpackage field tokens: "package" ".subpackage" [TYPE NAME ENDS HERE] "field" - // Keep reading tokens until we get a type name with no period at the end, - // and the next token does not start with a period. - while (type.endsWith(".") || peek().startsWith(".")) { - type += next(); - } - - /* istanbul ignore if */ - if (!typeRefRe.test(type)) - throw illegal(type, "type"); - - var name = next(); - - /* istanbul ignore if */ - - if (!nameRe.test(name)) - throw illegal(name, "name"); - - name = applyCase(name); - skip("="); - - var field = new Field(name, parseId(next()), type, rule, extend); - - ifBlock(field, function parseField_block(token) { - - /* istanbul ignore else */ - if (token === "option") { - parseOption(field, token); - skip(";"); - } else - throw illegal(token); - - }, function parseField_line() { - parseInlineOptions(field); - }); - - if (rule === "proto3_optional") { - // for proto3 optional fields, we create a single-member Oneof to mimic "optional" behavior - var oneof = new OneOf("_" + name); - field.setOption("proto3_optional", true); - oneof.add(field); - parent.add(oneof); - } else { - parent.add(field); - } - if (parent === ptr) { - topLevelObjects.push(field); - } - } - - function parseGroup(parent, rule, depth) { - if (depth === undefined) - depth = 0; - if (depth > util.nestingLimit) - throw Error("max depth exceeded"); - if (edition >= 2023) { - throw illegal("group"); - } - var name = next(); - - /* istanbul ignore if */ - if (!nameRe.test(name)) - throw illegal(name, "name"); - - var fieldName = util.lcFirst(name); - if (name === fieldName) - name = util.ucFirst(name); - skip("="); - var id = parseId(next()); - var type = new Type(name); - type.group = true; - var field = new Field(fieldName, id, name, rule); - field.filename = parse.filename; - ifBlock(type, function parseGroup_block(token) { - switch (token) { - - case "option": - parseOption(type, token); - skip(";"); - break; - case "required": - case "repeated": - parseField(type, token, undefined, depth + 1); - break; - - case "optional": - /* istanbul ignore if */ - if (edition === "proto3") { - parseField(type, "proto3_optional", undefined, depth + 1); - } else { - parseField(type, "optional", undefined, depth + 1); - } - break; - - case "message": - parseType(type, token, depth + 1); - break; - - case "enum": - parseEnum(type, token); - break; - - case "reserved": - readRanges(type.reserved || (type.reserved = []), true); - break; - - /* istanbul ignore next */ - default: - throw illegal(token); // there are no groups with proto3 semantics - } - }); - parent.add(type) - .add(field); - } - - function parseMapField(parent) { - skip("<"); - var keyType = next(); - - /* istanbul ignore if */ - if (types.mapKey[keyType] === undefined) - throw illegal(keyType, "type"); - - skip(","); - var valueType = next(); - - /* istanbul ignore if */ - if (!typeRefRe.test(valueType)) - throw illegal(valueType, "type"); - - skip(">"); - var name = next(); - - /* istanbul ignore if */ - if (!nameRe.test(name)) - throw illegal(name, "name"); - - skip("="); - var field = new MapField(applyCase(name), parseId(next()), keyType, valueType); - ifBlock(field, function parseMapField_block(token) { - - /* istanbul ignore else */ - if (token === "option") { - parseOption(field, token); - skip(";"); - } else - throw illegal(token); - - }, function parseMapField_line() { - parseInlineOptions(field); - }); - parent.add(field); - } - - function parseOneOf(parent, token, depth) { - - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "name"); - - var oneof = new OneOf(applyCase(token)); - ifBlock(oneof, function parseOneOf_block(token) { - if (token === "option") { - parseOption(oneof, token); - skip(";"); - } else { - push(token); - parseField(oneof, "optional", undefined, depth); - } - }); - parent.add(oneof); - } - - function parseEnum(parent, token) { - - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "name"); - - var enm = new Enum(token); - ifBlock(enm, function parseEnum_block(token) { - switch(token) { - case "option": - parseOption(enm, token); - skip(";"); - break; - - case "reserved": - readRanges(enm.reserved || (enm.reserved = []), true); - if(enm.reserved === undefined) enm.reserved = []; - break; - - default: - parseEnumValue(enm, token); - } - }); - parent.add(enm); - if (parent === ptr) { - topLevelObjects.push(enm); - } - } - - function parseEnumValue(parent, token) { - - /* istanbul ignore if */ - if (!nameRe.test(token)) - throw illegal(token, "name"); - - skip("="); - var value = parseId(next(), true), - dummy = { - options: undefined - }; - dummy.getOption = function(name) { - return this.options[name]; - }; - dummy.setOption = function(name, value) { - ReflectionObject.prototype.setOption.call(dummy, name, value); - }; - dummy.setParsedOption = function() { - return undefined; - }; - ifBlock(dummy, function parseEnumValue_block(token) { - - /* istanbul ignore else */ - if (token === "option") { - parseOption(dummy, token); // skip - skip(";"); - } else - throw illegal(token); - - }, function parseEnumValue_line() { - parseInlineOptions(dummy); // skip - }); - parent.add(token, value, dummy.comment, dummy.parsedOptions || dummy.options); - } - - function parseOption(parent, token) { - var option; - var propName; - var isOption = true; - if (token === "option") { - token = next(); - } - - while (token !== "=") { - if (token === "(") { - var parensValue = next(); - skip(")"); - token = "(" + parensValue + ")"; - } - if (isOption) { - isOption = false; - if (token.includes(".") && !token.includes("(")) { - var tokens = token.split("."); - option = tokens[0] + "."; - token = tokens[1]; - continue; - } - option = token; - } else { - propName = propName ? propName += token : token; - } - token = next(); - } - var name = propName ? option.concat(propName) : option; - var optionValue = parseOptionValue(parent, name); - propName = propName && propName[0] === "." ? propName.slice(1) : propName; - option = option && option[option.length - 1] === "." ? option.slice(0, -1) : option; - setParsedOption(parent, option, optionValue, propName); - } - - function parseOptionValue(parent, name, depth) { - if (depth === undefined) - depth = 0; - if (depth > util.recursionLimit) - throw Error("max depth exceeded"); - // { a: "foo" b { c: "bar" } } - if (skip("{", true)) { - var objectResult = {}; - - while (!skip("}", true)) { - /* istanbul ignore if */ - if (!nameRe.test(token = next())) { - throw illegal(token, "name"); - } - if (token === null) { - throw illegal(token, "end of input"); - } - - var value; - var propName = token; - - skip(":", true); - - if (peek() === "{") { - // option (my_option) = { - // repeated_value: [ "foo", "bar" ] - // }; - value = parseOptionValue(parent, name + "." + token, depth + 1); - } else if (peek() === "[") { - value = []; - var lastValue; - if (skip("[", true)) { - do { - lastValue = readValue(true); - value.push(lastValue); - } while (skip(",", true)); - skip("]"); - if (typeof lastValue !== "undefined") { - setOption(parent, name + "." + token, lastValue); - } - } - } else { - value = readValue(true); - setOption(parent, name + "." + token, value); - } - - var prevValue = objectResult[propName]; - - if (prevValue) - value = [].concat(prevValue).concat(value); - - if (propName !== "__proto__") - objectResult[propName] = value; - - // Semicolons and commas can be optional - skip(",", true); - skip(";", true); - } - - return objectResult; - } - - var simpleValue = readValue(true); - setOption(parent, name, simpleValue); - return simpleValue; - // Does not enforce a delimiter to be universal - } - - function setOption(parent, name, value) { - if (ptr === parent && /^features\./.test(name)) { - topLevelOptions[name] = value; - return; - } - if (parent.setOption) - parent.setOption(name, value); - } - - function setParsedOption(parent, name, value, propName) { - if (parent.setParsedOption) - parent.setParsedOption(name, value, propName); - } - - function parseInlineOptions(parent) { - if (skip("[", true)) { - do { - parseOption(parent, "option"); - } while (skip(",", true)); - skip("]"); - } - return parent; - } - - function parseService(parent, token, depth) { - if (depth === undefined) - depth = 0; - if (depth > util.recursionLimit) - throw Error("max depth exceeded"); - - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "service name"); - - var service = new Service(token); - ifBlock(service, function parseService_block(token) { - if (parseCommon(service, token, depth)) { - return; - } - - /* istanbul ignore else */ - if (token === "rpc") - parseMethod(service, token); - else - throw illegal(token); - }); - parent.add(service); - if (parent === ptr) { - topLevelObjects.push(service); - } - } - - function parseMethod(parent, token) { - // Get the comment of the preceding line now (if one exists) in case the - // method is defined across multiple lines. - var commentText = cmnt(); - - var type = token; - - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "name"); - - var name = token, - requestType, requestStream, - responseType, responseStream; - - skip("("); - if (skip("stream", true)) - requestStream = true; - - /* istanbul ignore if */ - if (!typeRefRe.test(token = next())) - throw illegal(token); - - requestType = token; - skip(")"); skip("returns"); skip("("); - if (skip("stream", true)) - responseStream = true; - - /* istanbul ignore if */ - if (!typeRefRe.test(token = next())) - throw illegal(token); - - responseType = token; - skip(")"); - - var method = new Method(name, type, requestType, responseType, requestStream, responseStream); - method.comment = commentText; - ifBlock(method, function parseMethod_block(token) { - - /* istanbul ignore else */ - if (token === "option") { - parseOption(method, token); - skip(";"); - } else - throw illegal(token); - - }); - parent.add(method); - } - - function parseExtension(parent, token, depth) { - - /* istanbul ignore if */ - if (!typeRefRe.test(token = next())) - throw illegal(token, "reference"); - - var reference = token; - ifBlock(null, function parseExtension_block(token) { - switch (token) { - - case "required": - case "repeated": - parseField(parent, token, reference, depth + 1); - break; - - case "optional": - /* istanbul ignore if */ - if (edition === "proto3") { - parseField(parent, "proto3_optional", reference, depth + 1); - } else { - parseField(parent, "optional", reference, depth + 1); - } - break; - - default: - /* istanbul ignore if */ - if (edition === "proto2" || !typeRefRe.test(token)) - throw illegal(token); - push(token); - parseField(parent, "optional", reference, depth + 1); - break; - } - }); - } - - var token; - while ((token = next()) !== null) { - switch (token) { - - case "package": - - /* istanbul ignore if */ - if (!head) - throw illegal(token); - - parsePackage(); - break; - - case "import": - - /* istanbul ignore if */ - if (!head) - throw illegal(token); - - parseImport(); - break; - - case "syntax": - - /* istanbul ignore if */ - if (!head) - throw illegal(token); - - parseSyntax(); - break; - - case "edition": - /* istanbul ignore if */ - if (!head) - throw illegal(token); - parseEdition(); - break; - - case "option": - parseOption(ptr, token); - skip(";", true); - break; - - default: - - /* istanbul ignore else */ - if (parseCommon(ptr, token, 0)) { - head = false; - continue; - } - - /* istanbul ignore next */ - throw illegal(token); - } - } - - resolveFileFeatures(); - - parse.filename = null; - return { - "package" : pkg, - "imports" : imports, - weakImports : weakImports, - root : root - }; -} - -/** - * Parses the given .proto source and returns an object with the parsed contents. - * @name parse - * @function - * @param {string} source Source contents - * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns {IParserResult} Parser result - * @property {string} filename=null Currently processing file name for error reporting, if known - * @property {IParseOptions} defaults Default {@link IParseOptions} - * @variation 2 - */ - -},{"17":17,"18":18,"22":22,"24":24,"26":26,"27":27,"31":31,"35":35,"36":36,"37":37,"38":38,"39":39}],29:[function(require,module,exports){ -"use strict"; -module.exports = Reader; - -var util = require(42); - -var BufferReader; // cyclic - -var LongBits = util.LongBits, - utf8 = util.utf8; - -/* istanbul ignore next */ -function indexOutOfRange(reader, writeLength) { - return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len); -} - -/** - * Constructs a new reader instance using the specified buffer. - * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`. - * @constructor - * @param {Uint8Array} buffer Buffer to read from - */ -function Reader(buffer) { - - /** - * Read buffer. - * @type {Uint8Array} - */ - this.buf = buffer; - - /** - * Read buffer position. - * @type {number} - */ - this.pos = 0; - - /** - * Read buffer length. - * @type {number} - */ - this.len = buffer.length; -} - -var create_array = typeof Uint8Array !== "undefined" - ? function create_typed_array(buffer) { - if (buffer instanceof Uint8Array || Array.isArray(buffer)) - return new Reader(buffer); - throw Error("illegal buffer"); - } - /* istanbul ignore next */ - : function create_array(buffer) { - if (Array.isArray(buffer)) - return new Reader(buffer); - throw Error("illegal buffer"); - }; - -var create = function create() { - return util.Buffer - ? function create_buffer_setup(buffer) { - return (Reader.create = function create_buffer(buffer) { - return util.Buffer.isBuffer(buffer) - ? new BufferReader(buffer) - /* istanbul ignore next */ - : create_array(buffer); - })(buffer); - } - /* istanbul ignore next */ - : create_array; -}; - -/** - * Creates a new reader using the specified buffer. - * @function - * @param {Uint8Array|Buffer} buffer Buffer to read from - * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} - * @throws {Error} If `buffer` is not a valid buffer - */ -Reader.create = create(); - -Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice; - -/** - * Reads a varint as an unsigned 32 bit value. - * @function - * @returns {number} Value read - */ -Reader.prototype.uint32 = (function read_uint32_setup() { - var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!) - return function read_uint32() { - value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value; - - /* istanbul ignore if */ - if ((this.pos += 5) > this.len) { - this.pos = this.len; - throw indexOutOfRange(this, 10); - } - return value; - }; -})(); - -/** - * Reads a varint as a signed 32 bit value. - * @returns {number} Value read - */ -Reader.prototype.int32 = function read_int32() { - return this.uint32() | 0; -}; - -/** - * Reads a zig-zag encoded varint as a signed 32 bit value. - * @returns {number} Value read - */ -Reader.prototype.sint32 = function read_sint32() { - var value = this.uint32(); - return value >>> 1 ^ -(value & 1) | 0; -}; - -/* eslint-disable no-invalid-this */ - -function readLongVarint() { - // tends to deopt with local vars for octet etc. - var bits = new LongBits(0, 0); - var i = 0; - if (this.len - this.pos > 4) { // fast route (lo) - for (; i < 4; ++i) { - // 1st..4th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - // 5th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; - bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - i = 0; - } else { - for (; i < 3; ++i) { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - // 1st..3th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - // 4th - bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; - return bits; - } - if (this.len - this.pos > 4) { // fast route (hi) - for (; i < 5; ++i) { - // 6th..10th - bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - } else { - for (; i < 5; ++i) { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - // 6th..10th - bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - } - /* istanbul ignore next */ - throw Error("invalid varint encoding"); -} - -/* eslint-enable no-invalid-this */ - -/** - * Reads a varint as a signed 64 bit value. - * @name Reader#int64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a varint as an unsigned 64 bit value. - * @name Reader#uint64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a zig-zag encoded varint as a signed 64 bit value. - * @name Reader#sint64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a varint as a boolean. - * @returns {boolean} Value read - */ -Reader.prototype.bool = function read_bool() { - return this.uint32() !== 0; -}; - -function readFixed32_end(buf, end) { // note that this uses `end`, not `pos` - return (buf[end - 4] - | buf[end - 3] << 8 - | buf[end - 2] << 16 - | buf[end - 1] << 24) >>> 0; -} - -/** - * Reads fixed 32 bits as an unsigned 32 bit integer. - * @returns {number} Value read - */ -Reader.prototype.fixed32 = function read_fixed32() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - return readFixed32_end(this.buf, this.pos += 4); -}; - -/** - * Reads fixed 32 bits as a signed 32 bit integer. - * @returns {number} Value read - */ -Reader.prototype.sfixed32 = function read_sfixed32() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - return readFixed32_end(this.buf, this.pos += 4) | 0; -}; - -/* eslint-disable no-invalid-this */ - -function readFixed64(/* this: Reader */) { - - /* istanbul ignore if */ - if (this.pos + 8 > this.len) - throw indexOutOfRange(this, 8); - - return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4)); -} - -/* eslint-enable no-invalid-this */ - -/** - * Reads fixed 64 bits. - * @name Reader#fixed64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads zig-zag encoded fixed 64 bits. - * @name Reader#sfixed64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a float (32 bit) as a number. - * @function - * @returns {number} Value read - */ -Reader.prototype.float = function read_float() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - var value = util.float.readFloatLE(this.buf, this.pos); - this.pos += 4; - return value; -}; - -/** - * Reads a double (64 bit float) as a number. - * @function - * @returns {number} Value read - */ -Reader.prototype.double = function read_double() { - - /* istanbul ignore if */ - if (this.pos + 8 > this.len) - throw indexOutOfRange(this, 4); - - var value = util.float.readDoubleLE(this.buf, this.pos); - this.pos += 8; - return value; -}; - -/** - * Reads a sequence of bytes preceeded by its length as a varint. - * @returns {Uint8Array} Value read - */ -Reader.prototype.bytes = function read_bytes() { - var length = this.uint32(), - start = this.pos, - end = this.pos + length; - - /* istanbul ignore if */ - if (end > this.len) - throw indexOutOfRange(this, length); - - this.pos += length; - if (Array.isArray(this.buf)) // plain array - return this.buf.slice(start, end); - - if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1 - var nativeBuffer = util.Buffer; - return nativeBuffer - ? nativeBuffer.alloc(0) - : new this.buf.constructor(0); - } - return this._slice.call(this.buf, start, end); -}; - -/** - * Reads a string preceeded by its byte length as a varint. - * @returns {string} Value read - */ -Reader.prototype.string = function read_string() { - var bytes = this.bytes(); - return utf8.read(bytes, 0, bytes.length); -}; - -/** - * Skips the specified number of bytes if specified, otherwise skips a varint. - * @param {number} [length] Length if known, otherwise a varint is assumed - * @returns {Reader} `this` - */ -Reader.prototype.skip = function skip(length) { - if (typeof length === "number") { - /* istanbul ignore if */ - if (this.pos + length > this.len) - throw indexOutOfRange(this, length); - this.pos += length; - } else { - do { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - } while (this.buf[this.pos++] & 128); - } - return this; -}; - -/** - * Recursion limit. - * @type {number} - */ -Reader.recursionLimit = util.recursionLimit; - -/** - * Skips the next element of the specified wire type. - * @param {number} wireType Wire type received - * @param {number} [depth] Depth of recursion to control nested calls; 0 if omitted - * @returns {Reader} `this` - */ -Reader.prototype.skipType = function(wireType, depth) { - if (depth === undefined) depth = 0; - if (depth > Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - switch (wireType) { - case 0: - this.skip(); - break; - case 1: - this.skip(8); - break; - case 2: - this.skip(this.uint32()); - break; - case 3: - while ((wireType = this.uint32() & 7) !== 4) { - this.skipType(wireType, depth + 1); - } - break; - case 5: - this.skip(4); - break; - - /* istanbul ignore next */ - default: - throw Error("invalid wire type " + wireType + " at offset " + this.pos); - } - return this; -}; - -Reader._configure = function(BufferReader_) { - BufferReader = BufferReader_; - Reader.create = create(); - BufferReader._configure(); - - var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; - util.merge(Reader.prototype, { - - int64: function read_int64() { - return readLongVarint.call(this)[fn](false); - }, - - uint64: function read_uint64() { - return readLongVarint.call(this)[fn](true); - }, - - sint64: function read_sint64() { - return readLongVarint.call(this).zzDecode()[fn](false); - }, - - fixed64: function read_fixed64() { - return readFixed64.call(this)[fn](true); - }, - - sfixed64: function read_sfixed64() { - return readFixed64.call(this)[fn](false); - } - - }); -}; - -},{"42":42}],30:[function(require,module,exports){ -"use strict"; -module.exports = BufferReader; - -// extends Reader -var Reader = require(29); -(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; - -var util = require(42); - -/** - * Constructs a new buffer reader instance. - * @classdesc Wire format reader using node buffers. - * @extends Reader - * @constructor - * @param {Buffer} buffer Buffer to read from - */ -function BufferReader(buffer) { - Reader.call(this, buffer); - - /** - * Read buffer. - * @name BufferReader#buf - * @type {Buffer} - */ -} - -BufferReader._configure = function () { - /* istanbul ignore else */ - if (util.Buffer) - BufferReader.prototype._slice = util.Buffer.prototype.slice; -}; - - -/** - * @override - */ -BufferReader.prototype.string = function read_string_buffer() { - var len = this.uint32(); // modifies pos - return this.buf.utf8Slice - ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) - : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len)); -}; - -/** - * Reads a sequence of bytes preceeded by its length as a varint. - * @name BufferReader#bytes - * @function - * @returns {Buffer} Value read - */ - -BufferReader._configure(); - -},{"29":29,"42":42}],31:[function(require,module,exports){ -"use strict"; -module.exports = Root; - -// extends Namespace -var Namespace = require(25); -((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = "Root"; - -var Field = require(18), - Enum = require(17), - OneOf = require(27), - util = require(39); - -var Type, // cyclic - parse, // might be excluded - common; // " - -/** - * Constructs a new root namespace instance. - * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. - * @extends NamespaceBase - * @constructor - * @param {Object.} [options] Top level options - */ -function Root(options) { - Namespace.call(this, "", options); - - /** - * Deferred extension fields. - * @type {Field[]} - */ - this.deferred = []; - - /** - * Resolved file names of loaded files. - * @type {string[]} - */ - this.files = []; - - /** - * Edition, defaults to proto2 if unspecified. - * @type {string} - * @private - */ - this._edition = "proto2"; - - /** - * Global lookup cache of fully qualified names. - * @type {Object.} - * @private - */ - this._fullyQualifiedObjects = {}; -} - -/** - * Loads a namespace descriptor into a root namespace. - * @param {INamespace} json Namespace descriptor - * @param {Root} [root] Root namespace, defaults to create a new one if omitted - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Root} Root namespace - */ -Root.fromJSON = function fromJSON(json, root, depth) { - depth = util.checkDepth(depth); - if (!root) - root = new Root(); - if (json.options) - root.setOptions(json.options); - return root.addJSON(json.nested, depth).resolveAll(); -}; - -/** - * Resolves the path of an imported file, relative to the importing origin. - * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories. - * @function - * @param {string} origin The file name of the importing file - * @param {string} target The file name being imported - * @returns {string|null} Resolved path to `target` or `null` to skip the file - */ -Root.prototype.resolvePath = util.path.resolve; - -/** - * Fetch content from file path or url - * This method exists so you can override it with your own logic. - * @function - * @param {string} path File path or url - * @param {FetchCallback} callback Callback function - * @returns {undefined} - */ -Root.prototype.fetch = util.fetch; - -// A symbol-like function to safely signal synchronous loading -/* istanbul ignore next */ -function SYNC() {} // eslint-disable-line no-empty-function - -/** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. - * @param {string|string[]} filename Names of one or multiple files to load - * @param {IParseOptions} options Parse options - * @param {LoadCallback} callback Callback function - * @returns {undefined} - */ -Root.prototype.load = function load(filename, options, callback) { - if (typeof options === "function") { - callback = options; - options = undefined; - } - var self = this; - if (!callback) { - return util.asPromise(load, self, filename, options); - } - - var sync = callback === SYNC; // undocumented - - // Finishes loading by calling the callback (exactly once) - function finish(err, root) { - /* istanbul ignore if */ - if (!callback) { - return; - } - if (sync) { - throw err; - } - if (root) { - root.resolveAll(); - } - var cb = callback; - callback = null; - cb(err, root); - } - - // Bundled definition existence checking - function getBundledFileName(filename) { - var idx = filename.lastIndexOf("google/protobuf/"); - if (idx > -1) { - var altname = filename.substring(idx); - if (altname in common) return altname; - } - return null; - } - - // Processes a single file - function process(filename, source, depth) { - if (depth === undefined) - depth = 0; - try { - if (depth > util.recursionLimit) - throw Error("max depth exceeded"); - if (util.isString(source) && source.charAt(0) === "{") - source = JSON.parse(source); - if (!util.isString(source)) - self.setOptions(source.options).addJSON(source.nested); - else { - parse.filename = filename; - var parsed = parse(source, self, options), - resolved, - i = 0; - if (parsed.imports) - for (; i < parsed.imports.length; ++i) - if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i])) - fetch(resolved, false, depth + 1); - if (parsed.weakImports) - for (i = 0; i < parsed.weakImports.length; ++i) - if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i])) - fetch(resolved, true, depth + 1); - } - } catch (err) { - finish(err); - } - if (!sync && !queued) { - finish(null, self); // only once anyway - } - } - - // Fetches a single file - function fetch(filename, weak, depth) { - if (depth === undefined) - depth = 0; - filename = getBundledFileName(filename) || filename; - - // Skip if already loaded / attempted - if (self.files.indexOf(filename) > -1) { - return; - } - self.files.push(filename); - - // Shortcut bundled definitions - if (filename in common) { - if (sync) { - process(filename, common[filename], depth); - } else { - ++queued; - setTimeout(function() { - --queued; - process(filename, common[filename], depth); - }); - } - return; - } - - // Otherwise fetch from disk or network - if (sync) { - var source; - try { - source = util.fs.readFileSync(filename).toString("utf8"); - } catch (err) { - if (!weak) - finish(err); - return; - } - process(filename, source, depth); - } else { - ++queued; - self.fetch(filename, function(err, source) { - --queued; - /* istanbul ignore if */ - if (!callback) { - return; // terminated meanwhile - } - if (err) { - /* istanbul ignore else */ - if (!weak) - finish(err); - else if (!queued) // can't be covered reliably - finish(null, self); - return; - } - process(filename, source, depth); - }); - } - } - var queued = 0; - - // Assembling the root namespace doesn't require working type - // references anymore, so we can load everything in parallel - if (util.isString(filename)) { - filename = [ filename ]; - } - for (var i = 0, resolved; i < filename.length; ++i) - if (resolved = self.resolvePath("", filename[i])) - fetch(resolved); - if (sync) { - self.resolveAll(); - return self; - } - if (!queued) { - finish(null, self); - } - - return self; -}; -// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined - -/** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. - * @function Root#load - * @param {string|string[]} filename Names of one or multiple files to load - * @param {LoadCallback} callback Callback function - * @returns {undefined} - * @variation 2 - */ -// function load(filename:string, callback:LoadCallback):undefined - -/** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise. - * @function Root#load - * @param {string|string[]} filename Names of one or multiple files to load - * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns {Promise} Promise - * @variation 3 - */ -// function load(filename:string, [options:IParseOptions]):Promise - -/** - * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only). - * @function Root#loadSync - * @param {string|string[]} filename Names of one or multiple files to load - * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns {Root} Root namespace - * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid - */ -Root.prototype.loadSync = function loadSync(filename, options) { - if (!util.isNode) - throw Error("not supported"); - return this.load(filename, options, SYNC); -}; - -/** - * @override - */ -Root.prototype.resolveAll = function resolveAll() { - if (!this._needsRecursiveResolve) return this; - - if (this.deferred.length) - throw Error("unresolvable extensions: " + this.deferred.map(function(field) { - return "'extend " + field.extend + "' in " + field.parent.fullName; - }).join(", ")); - return Namespace.prototype.resolveAll.call(this); -}; - -// only uppercased (and thus conflict-free) children are exposed, see below -var exposeRe = /^[A-Z]/; - -/** - * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type. - * @param {Root} root Root instance - * @param {Field} field Declaring extension field witin the declaring type - * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise - * @inner - * @ignore - */ -function tryHandleExtension(root, field) { - var extendedType = field.parent.lookup(field.extend); - if (extendedType) { - var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options); - //do not allow to extend same field twice to prevent the error - if (extendedType.get(sisterField.name)) { - return true; - } - sisterField.declaringField = field; - field.extensionField = sisterField; - extendedType.add(sisterField); - return true; - } - return false; -} - -/** - * Called when any object is added to this root or its sub-namespaces. - * @param {ReflectionObject} object Object added - * @returns {undefined} - * @private - */ -Root.prototype._handleAdd = function _handleAdd(object) { - if (object instanceof Field) { - - if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField) - if (!tryHandleExtension(this, object)) - this.deferred.push(object); - - } else if (object instanceof Enum) { - - if (exposeRe.test(object.name)) - object.parent[object.name] = object.values; // expose enum values as property of its parent - - } else if (!(object instanceof OneOf)) /* everything else is a namespace */ { - - if (object instanceof Type) // Try to handle any deferred extensions - for (var i = 0; i < this.deferred.length;) - if (tryHandleExtension(this, this.deferred[i])) - this.deferred.splice(i, 1); - else - ++i; - for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace - this._handleAdd(object._nestedArray[j]); - if (exposeRe.test(object.name)) - object.parent[object.name] = object; // expose namespace as property of its parent - } - - if (object instanceof Type || object instanceof Enum || object instanceof Field) { - // Only store types and enums for quick lookup during resolve. - this._fullyQualifiedObjects[object.fullName] = object; - } - - // The above also adds uppercased (and thus conflict-free) nested types, services and enums as - // properties of namespaces just like static code does. This allows using a .d.ts generated for - // a static module with reflection-based solutions where the condition is met. -}; - -/** - * Called when any object is removed from this root or its sub-namespaces. - * @param {ReflectionObject} object Object removed - * @returns {undefined} - * @private - */ -Root.prototype._handleRemove = function _handleRemove(object) { - if (object instanceof Field) { - - if (/* an extension field */ object.extend !== undefined) { - if (/* already handled */ object.extensionField) { // remove its sister field - object.extensionField.parent.remove(object.extensionField); - object.extensionField = null; - } else { // cancel the extension - var index = this.deferred.indexOf(object); - /* istanbul ignore else */ - if (index > -1) - this.deferred.splice(index, 1); - } - } - - } else if (object instanceof Enum) { - - if (exposeRe.test(object.name)) - delete object.parent[object.name]; // unexpose enum values - - } else if (object instanceof Namespace) { - - for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace - this._handleRemove(object._nestedArray[i]); - - if (exposeRe.test(object.name)) - delete object.parent[object.name]; // unexpose namespaces - - } - - delete this._fullyQualifiedObjects[object.fullName]; -}; - -// Sets up cyclic dependencies (called in index-light) -Root._configure = function(Type_, parse_, common_) { - Type = Type_; - parse = parse_; - common = common_; -}; - -},{"17":17,"18":18,"25":25,"27":27,"39":39}],32:[function(require,module,exports){ -"use strict"; -module.exports = {}; - -/** - * Named roots. - * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). - * Can also be used manually to make roots available across modules. - * @name roots - * @type {Object.} - * @example - * // pbjs -r myroot -o compiled.js ... - * - * // in another module: - * require("./compiled.js"); - * - * // in any subsequent module: - * var root = protobuf.roots["myroot"]; - */ - -},{}],33:[function(require,module,exports){ -"use strict"; - -/** - * Streaming RPC helpers. - * @namespace - */ -var rpc = exports; - -/** - * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. - * @typedef RPCImpl - * @type {function} - * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called - * @param {Uint8Array} requestData Request data - * @param {RPCImplCallback} callback Callback function - * @returns {undefined} - * @example - * function rpcImpl(method, requestData, callback) { - * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code - * throw Error("no such method"); - * asynchronouslyObtainAResponse(requestData, function(err, responseData) { - * callback(err, responseData); - * }); - * } - */ - -/** - * Node-style callback as used by {@link RPCImpl}. - * @typedef RPCImplCallback - * @type {function} - * @param {Error|null} error Error, if any, otherwise `null` - * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error - * @returns {undefined} - */ - -rpc.Service = require(34); - -},{"34":34}],34:[function(require,module,exports){ -"use strict"; -module.exports = Service; - -var util = require(42); - -// Extends EventEmitter -(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service; - -/** - * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. - * - * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. - * @typedef rpc.ServiceMethodCallback - * @template TRes extends Message - * @type {function} - * @param {Error|null} error Error, if any - * @param {TRes} [response] Response message - * @returns {undefined} - */ - -/** - * A service method part of a {@link rpc.Service} as created by {@link Service.create}. - * @typedef rpc.ServiceMethod - * @template TReq extends Message - * @template TRes extends Message - * @type {function} - * @param {TReq|Properties} request Request message or plain object - * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message - * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined` - */ - -/** - * Constructs a new RPC service instance. - * @classdesc An RPC service as returned by {@link Service#create}. - * @exports rpc.Service - * @extends util.EventEmitter - * @constructor - * @param {RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ -function Service(rpcImpl, requestDelimited, responseDelimited) { - - if (typeof rpcImpl !== "function") - throw TypeError("rpcImpl must be a function"); - - util.EventEmitter.call(this); - - /** - * RPC implementation. Becomes `null` once the service is ended. - * @type {RPCImpl|null} - */ - this.rpcImpl = rpcImpl; - - /** - * Whether requests are length-delimited. - * @type {boolean} - */ - this.requestDelimited = Boolean(requestDelimited); - - /** - * Whether responses are length-delimited. - * @type {boolean} - */ - this.responseDelimited = Boolean(responseDelimited); -} - -/** - * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. - * @param {Method|rpc.ServiceMethod} method Reflected or static method - * @param {Constructor} requestCtor Request constructor - * @param {Constructor} responseCtor Response constructor - * @param {TReq|Properties} request Request message or plain object - * @param {rpc.ServiceMethodCallback} callback Service callback - * @returns {undefined} - * @template TReq extends Message - * @template TRes extends Message - */ -Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) { - - if (!request) - throw TypeError("request must be specified"); - - var self = this; - if (!callback) - return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request); - - if (!self.rpcImpl) { - setTimeout(function() { callback(Error("already ended")); }, 0); - return undefined; - } - - try { - return self.rpcImpl( - method, - requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(), - function rpcCallback(err, response) { - - if (err) { - self.emit("error", err, method); - return callback(err); - } - - if (response === null) { - self.end(/* endedByRPC */ true); - return undefined; - } - - if (!(response instanceof responseCtor)) { - try { - response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response); - } catch (err) { - self.emit("error", err, method); - return callback(err); - } - } - - self.emit("data", response, method); - return callback(null, response); - } - ); - } catch (err) { - self.emit("error", err, method); - setTimeout(function() { callback(err); }, 0); - return undefined; - } -}; - -/** - * Ends this service and emits the `end` event. - * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. - * @returns {rpc.Service} `this` - */ -Service.prototype.end = function end(endedByRPC) { - if (this.rpcImpl) { - if (!endedByRPC) // signal end to rpcImpl - this.rpcImpl(null, null, null); - this.rpcImpl = null; - this.emit("end").off(); - } - return this; -}; - -},{"42":42}],35:[function(require,module,exports){ -"use strict"; -module.exports = Service; - -// extends Namespace -var Namespace = require(25); -((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = "Service"; - -var Method = require(24), - util = require(39), - rpc = require(33); - -var reservedRe = util.patterns.reservedRe; - -/** - * Constructs a new service instance. - * @classdesc Reflected service. - * @extends NamespaceBase - * @constructor - * @param {string} name Service name - * @param {Object.} [options] Service options - * @throws {TypeError} If arguments are invalid - */ -function Service(name, options) { - Namespace.call(this, name, options); - - /** - * Service methods. - * @type {Object.} - */ - this.methods = {}; // toJSON, marker - - /** - * Cached methods as an array. - * @type {Method[]|null} - * @private - */ - this._methodsArray = null; -} - -/** - * Service descriptor. - * @interface IService - * @extends INamespace - * @property {Object.} methods Method descriptors - */ - -/** - * Constructs a service from a service descriptor. - * @param {string} name Service name - * @param {IService} json Service descriptor - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Service} Created service - * @throws {TypeError} If arguments are invalid - */ -Service.fromJSON = function fromJSON(name, json, depth) { - depth = util.checkDepth(depth); - var service = new Service(name, json.options); - /* istanbul ignore else */ - if (json.methods) - for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i) - service.add(Method.fromJSON(names[i], json.methods[names[i]])); - if (json.nested) - service.addJSON(json.nested, depth); - if (json.edition) - service._edition = json.edition; - service.comment = json.comment; - service._defaultEdition = "proto3"; // For backwards-compatibility. - return service; -}; - -/** - * Converts this service to a service descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IService} Service descriptor - */ -Service.prototype.toJSON = function toJSON(toJSONOptions) { - var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "edition" , this._editionToJSON(), - "options" , inherited && inherited.options || undefined, - "methods" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {}, - "nested" , inherited && inherited.nested || undefined, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * Methods of this service as an array for iteration. - * @name Service#methodsArray - * @type {Method[]} - * @readonly - */ -Object.defineProperty(Service.prototype, "methodsArray", { - get: function() { - return this._methodsArray || (this._methodsArray = util.toArray(this.methods)); - } -}); - -function clearCache(service) { - service._methodsArray = null; - return service; -} - -/** - * @override - */ -Service.prototype.get = function get(name) { - return Object.prototype.hasOwnProperty.call(this.methods, name) - ? this.methods[name] - : Namespace.prototype.get.call(this, name); -}; - -/** - * @override - */ -Service.prototype.resolveAll = function resolveAll() { - if (!this._needsRecursiveResolve) return this; - - Namespace.prototype.resolve.call(this); - var methods = this.methodsArray; - for (var i = 0; i < methods.length; ++i) - methods[i].resolve(); - return this; -}; - -/** - * @override - */ -Service.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) { - if (!this._needsRecursiveFeatureResolution) return this; - - edition = this._edition || edition; - - Namespace.prototype._resolveFeaturesRecursive.call(this, edition); - this.methodsArray.forEach(method => { - method._resolveFeaturesRecursive(edition); - }); - return this; -}; - -/** - * @override - */ -Service.prototype.add = function add(object) { - /* istanbul ignore if */ - if (this.get(object.name)) - throw Error("duplicate name '" + object.name + "' in " + this); - - if (object instanceof Method) { - if (object.name === "__proto__") - return this; - this.methods[object.name] = object; - object.parent = this; - return clearCache(this); - } - return Namespace.prototype.add.call(this, object); -}; - -/** - * @override - */ -Service.prototype.remove = function remove(object) { - if (object instanceof Method) { - - /* istanbul ignore if */ - if (this.methods[object.name] !== object) - throw Error(object + " is not a member of " + this); - - delete this.methods[object.name]; - object.parent = null; - return clearCache(this); - } - return Namespace.prototype.remove.call(this, object); -}; - -/** - * Creates a runtime service using the specified rpc implementation. - * @param {RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed. - */ -Service.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) { - var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited); - for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) { - var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\w_]/g, ""); - rpcService[methodName] = util.codegen(["r","c"], reservedRe.test(methodName) ? methodName + "_" : methodName)("return this.rpcCall(m,q,s,r,c)")({ - m: method, - q: method.resolvedRequestType.ctor, - s: method.resolvedResponseType.ctor - }); - } - return rpcService; -}; - -},{"24":24,"25":25,"33":33,"39":39}],36:[function(require,module,exports){ -"use strict"; -module.exports = tokenize; - -var delimRe = /[\s{}=;:[\],'"()<>]/g, - stringDoubleRe = /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, - stringSingleRe = /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g; - -var setCommentRe = /^ *[*/]+ */, - setCommentAltRe = /^\s*\*?\/*/, - setCommentSplitRe = /\n/g, - whitespaceRe = /\s/, - unescapeRe = /\\(.?)/g; - -var unescapeMap = { - "0": "\0", - "r": "\r", - "n": "\n", - "t": "\t" -}; - -/** - * Unescapes a string. - * @param {string} str String to unescape - * @returns {string} Unescaped string - * @property {Object.} map Special characters map - * @memberof tokenize - */ -function unescape(str) { - return str.replace(unescapeRe, function($0, $1) { - switch ($1) { - case "\\": - case "": - return $1; - default: - return unescapeMap[$1] || ""; - } - }); -} - -tokenize.unescape = unescape; - -/** - * Gets the next token and advances. - * @typedef TokenizerHandleNext - * @type {function} - * @returns {string|null} Next token or `null` on eof - */ - -/** - * Peeks for the next token. - * @typedef TokenizerHandlePeek - * @type {function} - * @returns {string|null} Next token or `null` on eof - */ - -/** - * Pushes a token back to the stack. - * @typedef TokenizerHandlePush - * @type {function} - * @param {string} token Token - * @returns {undefined} - */ - -/** - * Skips the next token. - * @typedef TokenizerHandleSkip - * @type {function} - * @param {string} expected Expected token - * @param {boolean} [optional=false] If optional - * @returns {boolean} Whether the token matched - * @throws {Error} If the token didn't match and is not optional - */ - -/** - * Gets the comment on the previous line or, alternatively, the line comment on the specified line. - * @typedef TokenizerHandleCmnt - * @type {function} - * @param {number} [line] Line number - * @returns {string|null} Comment text or `null` if none - */ - -/** - * Handle object returned from {@link tokenize}. - * @interface ITokenizerHandle - * @property {TokenizerHandleNext} next Gets the next token and advances (`null` on eof) - * @property {TokenizerHandlePeek} peek Peeks for the next token (`null` on eof) - * @property {TokenizerHandlePush} push Pushes a token back to the stack - * @property {TokenizerHandleSkip} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws - * @property {TokenizerHandleCmnt} cmnt Gets the comment on the previous line or the line comment on the specified line, if any - * @property {number} line Current line number - */ - -/** - * Tokenizes the given .proto source and returns an object with useful utility functions. - * @param {string} source Source contents - * @param {boolean} alternateCommentMode Whether we should activate alternate comment parsing mode. - * @returns {ITokenizerHandle} Tokenizer handle - */ -function tokenize(source, alternateCommentMode) { - /* eslint-disable callback-return */ - source = source.toString(); - - var offset = 0, - length = source.length, - line = 1, - lastCommentLine = 0, - comments = {}; - - var stack = []; - - var stringDelim = null; - - /* istanbul ignore next */ - /** - * Creates an error for illegal syntax. - * @param {string} subject Subject - * @returns {Error} Error created - * @inner - */ - function illegal(subject) { - return Error("illegal " + subject + " (line " + line + ")"); - } - - /** - * Reads a string till its end. - * @returns {string} String read - * @inner - */ - function readString() { - var re = stringDelim === "'" ? stringSingleRe : stringDoubleRe; - re.lastIndex = offset - 1; - var match = re.exec(source); - if (!match) - throw illegal("string"); - offset = re.lastIndex; - push(stringDelim); - stringDelim = null; - return unescape(match[1]); - } - - /** - * Gets the character at `pos` within the source. - * @param {number} pos Position - * @returns {string} Character - * @inner - */ - function charAt(pos) { - return source.charAt(pos); - } - - /** - * Sets the current comment text. - * @param {number} start Start offset - * @param {number} end End offset - * @param {boolean} isLeading set if a leading comment - * @returns {undefined} - * @inner - */ - function setComment(start, end, isLeading) { - var comment = { - type: source.charAt(start++), - lineEmpty: false, - leading: isLeading, - }; - var lookback; - if (alternateCommentMode) { - lookback = 2; // alternate comment parsing: "//" or "/*" - } else { - lookback = 3; // "///" or "/**" - } - var commentOffset = start - lookback, - c; - do { - if (--commentOffset < 0 || - (c = source.charAt(commentOffset)) === "\n") { - comment.lineEmpty = true; - break; - } - } while (c === " " || c === "\t"); - var lines = source - .substring(start, end) - .split(setCommentSplitRe); - for (var i = 0; i < lines.length; ++i) - lines[i] = lines[i] - .replace(alternateCommentMode ? setCommentAltRe : setCommentRe, "") - .trim(); - comment.text = lines - .join("\n") - .trim(); - - comments[line] = comment; - lastCommentLine = line; - } - - function isDoubleSlashCommentLine(startOffset) { - var endOffset = findEndOfLine(startOffset); - - // see if remaining line matches comment pattern - var lineText = source.substring(startOffset, endOffset); - var isComment = /^\s*\/\//.test(lineText); - return isComment; - } - - function findEndOfLine(cursor) { - // find end of cursor's line - var endOffset = cursor; - while (endOffset < length && charAt(endOffset) !== "\n") { - endOffset++; - } - return endOffset; - } - - /** - * Obtains the next token. - * @returns {string|null} Next token or `null` on eof - * @inner - */ - function next() { - if (stack.length > 0) - return stack.shift(); - if (stringDelim) - return readString(); - var repeat, - prev, - curr, - start, - isDoc, - isLeadingComment = offset === 0; - do { - if (offset === length) - return null; - repeat = false; - while (whitespaceRe.test(curr = charAt(offset))) { - if (curr === "\n") { - isLeadingComment = true; - ++line; - } - if (++offset === length) - return null; - } - - if (charAt(offset) === "/") { - if (++offset === length) { - throw illegal("comment"); - } - if (charAt(offset) === "/") { // Line - if (!alternateCommentMode) { - // check for triple-slash comment - isDoc = charAt(start = offset + 1) === "/"; - - while (charAt(++offset) !== "\n") { - if (offset === length) { - return null; - } - } - ++offset; - if (isDoc) { - setComment(start, offset - 1, isLeadingComment); - // Trailing comment cannot not be multi-line, - // so leading comment state should be reset to handle potential next comments - isLeadingComment = true; - } - ++line; - repeat = true; - } else { - // check for double-slash comments, consolidating consecutive lines - start = offset; - isDoc = false; - if (isDoubleSlashCommentLine(offset - 1)) { - isDoc = true; - do { - offset = findEndOfLine(offset); - if (offset === length) { - break; - } - offset++; - if (!isLeadingComment) { - // Trailing comment cannot not be multi-line - break; - } - } while (isDoubleSlashCommentLine(offset)); - } else { - offset = Math.min(length, findEndOfLine(offset) + 1); - } - if (isDoc) { - setComment(start, offset, isLeadingComment); - isLeadingComment = true; - } - line++; - repeat = true; - } - } else if ((curr = charAt(offset)) === "*") { /* Block */ - // check for /** (regular comment mode) or /* (alternate comment mode) - start = offset + 1; - isDoc = alternateCommentMode || charAt(start) === "*"; - do { - if (curr === "\n") { - ++line; - } - if (++offset === length) { - throw illegal("comment"); - } - prev = curr; - curr = charAt(offset); - } while (prev !== "*" || curr !== "/"); - ++offset; - if (isDoc) { - setComment(start, offset - 2, isLeadingComment); - isLeadingComment = true; - } - repeat = true; - } else { - return "/"; - } - } - } while (repeat); - - // offset !== length if we got here - - var end = offset; - delimRe.lastIndex = 0; - var delim = delimRe.test(charAt(end++)); - if (!delim) - while (end < length && !delimRe.test(charAt(end))) - ++end; - var token = source.substring(offset, offset = end); - if (token === "\"" || token === "'") - stringDelim = token; - return token; - } - - /** - * Pushes a token back to the stack. - * @param {string} token Token - * @returns {undefined} - * @inner - */ - function push(token) { - stack.push(token); - } - - /** - * Peeks for the next token. - * @returns {string|null} Token or `null` on eof - * @inner - */ - function peek() { - if (!stack.length) { - var token = next(); - if (token === null) - return null; - push(token); - } - return stack[0]; - } - - /** - * Skips a token. - * @param {string} expected Expected token - * @param {boolean} [optional=false] Whether the token is optional - * @returns {boolean} `true` when skipped, `false` if not - * @throws {Error} When a required token is not present - * @inner - */ - function skip(expected, optional) { - var actual = peek(), - equals = actual === expected; - if (equals) { - next(); - return true; - } - if (!optional) - throw illegal("token '" + actual + "', '" + expected + "' expected"); - return false; - } - - /** - * Gets a comment. - * @param {number} [trailingLine] Line number if looking for a trailing comment - * @returns {string|null} Comment text - * @inner - */ - function cmnt(trailingLine) { - var ret = null; - var comment; - if (trailingLine === undefined) { - comment = comments[line - 1]; - delete comments[line - 1]; - if (comment && (alternateCommentMode || comment.type === "*" || comment.lineEmpty)) { - ret = comment.leading ? comment.text : null; - } - } else { - /* istanbul ignore else */ - if (lastCommentLine < trailingLine) { - peek(); - } - comment = comments[trailingLine]; - delete comments[trailingLine]; - if (comment && !comment.lineEmpty && (alternateCommentMode || comment.type === "/")) { - ret = comment.leading ? null : comment.text; - } - } - return ret; - } - - return Object.defineProperty({ - next: next, - peek: peek, - push: push, - skip: skip, - cmnt: cmnt - }, "line", { - get: function() { return line; } - }); - /* eslint-enable callback-return */ -} - -},{}],37:[function(require,module,exports){ -"use strict"; -module.exports = Type; - -// extends Namespace -var Namespace = require(25); -((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = "Type"; - -var Enum = require(17), - OneOf = require(27), - Field = require(18), - MapField = require(22), - Service = require(35), - Message = require(23), - Reader = require(29), - Writer = require(46), - util = require(39), - encoder = require(16), - decoder = require(15), - verifier = require(44), - converter = require(14), - wrappers = require(45); - -/** - * Constructs a new reflected message type instance. - * @classdesc Reflected message type. - * @extends NamespaceBase - * @constructor - * @param {string} name Message name - * @param {Object.} [options] Declared options - */ -function Type(name, options) { - name = name.replace(/\W/g, ""); - Namespace.call(this, name, options); - - /** - * Message fields. - * @type {Object.} - */ - this.fields = {}; // toJSON, marker - - /** - * Oneofs declared within this namespace, if any. - * @type {Object.} - */ - this.oneofs = undefined; // toJSON - - /** - * Extension ranges, if any. - * @type {number[][]} - */ - this.extensions = undefined; // toJSON - - /** - * Reserved ranges, if any. - * @type {Array.} - */ - this.reserved = undefined; // toJSON - - /*? - * Whether this type is a legacy group. - * @type {boolean|undefined} - */ - this.group = undefined; // toJSON - - /** - * Cached fields by id. - * @type {Object.|null} - * @private - */ - this._fieldsById = null; - - /** - * Cached fields as an array. - * @type {Field[]|null} - * @private - */ - this._fieldsArray = null; - - /** - * Cached oneofs as an array. - * @type {OneOf[]|null} - * @private - */ - this._oneofsArray = null; - - /** - * Cached constructor. - * @type {Constructor<{}>} - * @private - */ - this._ctor = null; -} - -Object.defineProperties(Type.prototype, { - - /** - * Message fields by id. - * @name Type#fieldsById - * @type {Object.} - * @readonly - */ - fieldsById: { - get: function() { - - /* istanbul ignore if */ - if (this._fieldsById) - return this._fieldsById; - - this._fieldsById = {}; - for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) { - var field = this.fields[names[i]], - id = field.id; - - /* istanbul ignore if */ - if (this._fieldsById[id]) - throw Error("duplicate id " + id + " in " + this); - - this._fieldsById[id] = field; - } - return this._fieldsById; - } - }, - - /** - * Fields of this message as an array for iteration. - * @name Type#fieldsArray - * @type {Field[]} - * @readonly - */ - fieldsArray: { - get: function() { - return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields)); - } - }, - - /** - * Oneofs of this message as an array for iteration. - * @name Type#oneofsArray - * @type {OneOf[]} - * @readonly - */ - oneofsArray: { - get: function() { - return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs)); - } - }, - - /** - * The registered constructor, if any registered, otherwise a generic constructor. - * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor. - * @name Type#ctor - * @type {Constructor<{}>} - */ - ctor: { - get: function() { - return this._ctor || (this.ctor = Type.generateConstructor(this)()); - }, - set: function(ctor) { - - // Ensure proper prototype - var prototype = ctor.prototype; - if (!(prototype instanceof Message)) { - (ctor.prototype = new Message()).constructor = ctor; - util.merge(ctor.prototype, prototype); - } - - // Classes and messages reference their reflected type - ctor.$type = ctor.prototype.$type = this; - - // Mix in static methods - util.merge(ctor, Message, true); - - this._ctor = ctor; - - // Messages have non-enumerable default values on their prototype - var i = 0; - for (; i < /* initializes */ this.fieldsArray.length; ++i) - this._fieldsArray[i].resolve(); // ensures a proper value - - // Messages have non-enumerable getters and setters for each virtual oneof field - var ctorProperties = {}; - for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i) - ctorProperties[this._oneofsArray[i].resolve().name] = { - get: util.oneOfGetter(this._oneofsArray[i].oneof), - set: util.oneOfSetter(this._oneofsArray[i].oneof) - }; - if (i) - Object.defineProperties(ctor.prototype, ctorProperties); - } - } -}); - -/** - * Generates a constructor function for the specified type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -Type.generateConstructor = function generateConstructor(mtype) { - /* eslint-disable no-unexpected-multiline */ - var gen = util.codegen(["p"], mtype.name); - // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype - for (var i = 0, field; i < mtype.fieldsArray.length; ++i) - if ((field = mtype._fieldsArray[i]).map) gen - ("this%s={}", util.safeProp(field.name)); - else if (field.repeated) gen - ("this%s=[]", util.safeProp(field.name)); - return gen - ("if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors - * @property {Object.} fields Field descriptors - * @property {number[][]} [extensions] Extension ranges - * @property {Array.} [reserved] Reserved ranges - * @property {boolean} [group=false] Whether a legacy group or not - */ - -/** - * Creates a message type from a message type descriptor. - * @param {string} name Message name - * @param {IType} json Message type descriptor - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Type} Created message type - */ -Type.fromJSON = function fromJSON(name, json, depth) { - if (depth === undefined) - depth = 0; - if (depth > util.nestingLimit) - throw Error("max depth exceeded"); - var type = new Type(name, json.options); - type.extensions = json.extensions; - type.reserved = json.reserved; - var names = Object.keys(json.fields), - i = 0; - for (; i < names.length; ++i) - type.add( - ( typeof json.fields[names[i]].keyType !== "undefined" - ? MapField.fromJSON - : Field.fromJSON )(names[i], json.fields[names[i]]) - ); - if (json.oneofs) - for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i) - type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]])); - if (json.nested) - for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) { - var nested = json.nested[names[i]]; - type.add( // most to least likely - ( nested.id !== undefined - ? Field.fromJSON - : nested.fields !== undefined - ? Type.fromJSON - : nested.values !== undefined - ? Enum.fromJSON - : nested.methods !== undefined - ? Service.fromJSON - : Namespace.fromJSON )(names[i], nested, depth + 1) - ); - } - if (json.extensions && json.extensions.length) - type.extensions = json.extensions; - if (json.reserved && json.reserved.length) - type.reserved = json.reserved; - if (json.group) - type.group = true; - if (json.comment) - type.comment = json.comment; - if (json.edition) - type._edition = json.edition; - type._defaultEdition = "proto3"; // For backwards-compatibility. - return type; -}; - -/** - * Converts this message type to a message type descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IType} Message type descriptor - */ -Type.prototype.toJSON = function toJSON(toJSONOptions) { - var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "edition" , this._editionToJSON(), - "options" , inherited && inherited.options || undefined, - "oneofs" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions), - "fields" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {}, - "extensions" , this.extensions && this.extensions.length ? this.extensions : undefined, - "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, - "group" , this.group || undefined, - "nested" , inherited && inherited.nested || undefined, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * @override - */ -Type.prototype.resolveAll = function resolveAll() { - if (!this._needsRecursiveResolve) return this; - - Namespace.prototype.resolveAll.call(this); - var oneofs = this.oneofsArray; i = 0; - while (i < oneofs.length) - oneofs[i++].resolve(); - var fields = this.fieldsArray, i = 0; - while (i < fields.length) - fields[i++].resolve(); - return this; -}; - -/** - * @override - */ -Type.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) { - if (!this._needsRecursiveFeatureResolution) return this; - - edition = this._edition || edition; - - Namespace.prototype._resolveFeaturesRecursive.call(this, edition); - this.oneofsArray.forEach(oneof => { - oneof._resolveFeatures(edition); - }); - this.fieldsArray.forEach(field => { - field._resolveFeatures(edition); - }); - return this; -}; - -/** - * @override - */ -Type.prototype.get = function get(name) { - if (Object.prototype.hasOwnProperty.call(this.fields, name)) - return this.fields[name]; - if (this.oneofs && Object.prototype.hasOwnProperty.call(this.oneofs, name)) - return this.oneofs[name]; - if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name)) - return this.nested[name]; - return null; -}; - -/** - * Adds a nested object to this type. - * @param {ReflectionObject} object Nested object to add - * @returns {Type} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id - */ -Type.prototype.add = function add(object) { - if (this.get(object.name)) - throw Error("duplicate name '" + object.name + "' in " + this); - - if (object instanceof Field && object.extend === undefined) { - // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects. - // The root object takes care of adding distinct sister-fields to the respective extended - // type instead. - - // avoids calling the getter if not absolutely necessary because it's called quite frequently - if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id]) - throw Error("duplicate id " + object.id + " in " + this); - if (this.isReservedId(object.id)) - throw Error("id " + object.id + " is reserved in " + this); - if (this.isReservedName(object.name)) - throw Error("name '" + object.name + "' is reserved in " + this); - if (object.name === "__proto__") - return this; - - if (object.parent) - object.parent.remove(object); - this.fields[object.name] = object; - object.message = this; - object.onAdd(this); - return clearCache(this); - } - if (object instanceof OneOf) { - if (object.name === "__proto__") - return this; - if (!this.oneofs) - this.oneofs = {}; - this.oneofs[object.name] = object; - object.onAdd(this); - return clearCache(this); - } - return Namespace.prototype.add.call(this, object); -}; - -/** - * Removes a nested object from this type. - * @param {ReflectionObject} object Nested object to remove - * @returns {Type} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `object` is not a member of this type - */ -Type.prototype.remove = function remove(object) { - if (object instanceof Field && object.extend === undefined) { - // See Type#add for the reason why extension fields are excluded here. - - /* istanbul ignore if */ - if (!this.fields || this.fields[object.name] !== object) - throw Error(object + " is not a member of " + this); - - delete this.fields[object.name]; - object.parent = null; - object.onRemove(this); - return clearCache(this); - } - if (object instanceof OneOf) { - - /* istanbul ignore if */ - if (!this.oneofs || this.oneofs[object.name] !== object) - throw Error(object + " is not a member of " + this); - - delete this.oneofs[object.name]; - object.parent = null; - object.onRemove(this); - return clearCache(this); - } - return Namespace.prototype.remove.call(this, object); -}; - -/** - * Tests if the specified id is reserved. - * @param {number} id Id to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Type.prototype.isReservedId = function isReservedId(id) { - return Namespace.isReservedId(this.reserved, id); -}; - -/** - * Tests if the specified name is reserved. - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Type.prototype.isReservedName = function isReservedName(name) { - return Namespace.isReservedName(this.reserved, name); -}; - -/** - * Creates a new message of this type using the specified properties. - * @param {Object.} [properties] Properties to set - * @returns {Message<{}>} Message instance - */ -Type.prototype.create = function create(properties) { - return new this.ctor(properties); -}; - -/** - * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}. - * @returns {Type} `this` - */ -Type.prototype.setup = function setup() { - // Sets up everything at once so that the prototype chain does not have to be re-evaluated - // multiple times (V8, soft-deopt prototype-check). - - var fullName = this.fullName, - types = []; - for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i) - types.push(this._fieldsArray[i].resolve().resolvedType); - - // Replace setup methods with type-specific generated functions - this.encode = encoder(this)({ - Writer : Writer, - types : types, - util : util - }); - this.decode = decoder(this)({ - Reader : Reader, - types : types, - util : util - }); - this.verify = verifier(this)({ - types : types, - util : util - }); - this.fromObject = converter.fromObject(this)({ - types : types, - util : util - }); - this.toObject = converter.toObject(this)({ - types : types, - util : util - }); - - // Inject custom wrappers for common types - var wrapper = wrappers[fullName]; - if (wrapper) { - var originalThis = Object.create(this); - // if (wrapper.fromObject) { - originalThis.fromObject = this.fromObject; - this.fromObject = wrapper.fromObject.bind(originalThis); - // } - // if (wrapper.toObject) { - originalThis.toObject = this.toObject; - this.toObject = wrapper.toObject.bind(originalThis); - // } - } - - return this; -}; - -/** - * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages. - * @param {Message<{}>|Object.} message Message instance or plain object - * @param {Writer} [writer] Writer to encode to - * @returns {Writer} writer - */ -Type.prototype.encode = function encode_setup(message, writer) { // eslint-disable-line no-unused-vars - return this.setup().encode.apply(this, arguments); // overrides this method -}; - -/** - * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages. - * @param {Message<{}>|Object.} message Message instance or plain object - * @param {Writer} [writer] Writer to encode to - * @returns {Writer} writer - */ -Type.prototype.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); -}; - -/** - * Decodes a message of this type. - * @param {Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Length of the message, if known beforehand - * @param {number} [end] Expected group end tag, if decoding a group - * @param {number} [depth] Current nesting depth - * @returns {Message<{}>} Decoded message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {util.ProtocolError<{}>} If required fields are missing - */ -Type.prototype.decode = function decode_setup(reader, length, end, depth) { - return this.setup().decode(reader, length, end, depth); // overrides this method -}; - -/** - * Decodes a message of this type preceeded by its byte length as a varint. - * @param {Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {Message<{}>} Decoded message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {util.ProtocolError} If required fields are missing - */ -Type.prototype.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof Reader)) - reader = Reader.create(reader); - return this.decode(reader, reader.uint32()); -}; - -/** - * Verifies that field values are valid and that required fields are present. - * @param {Object.} message Plain object to verify - * @param {number} [depth] Current nesting depth - * @returns {null|string} `null` if valid, otherwise the reason why it is not - */ -Type.prototype.verify = function verify_setup(message, depth) { - return this.setup().verify(message, depth); // overrides this method -}; - -/** - * Creates a new message of this type from a plain object. Also converts values to their respective internal types. - * @param {Object.} object Plain object to convert - * @param {number} [depth] Current nesting depth - * @returns {Message<{}>} Message instance - */ -Type.prototype.fromObject = function fromObject(object, depth) { - return this.setup().fromObject(object, depth); -}; - -/** - * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}. - * @interface IConversionOptions - * @property {Function} [longs] Long conversion type. - * Valid values are `BigInt`, `String` and `Number` (the global types). - * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library. - * @property {Function} [enums] Enum value conversion type. - * Only valid value is `String` (the global type). - * Defaults to copy the present value, which is the numeric id. - * @property {Function} [bytes] Bytes value conversion type. - * Valid values are `Array` and (a base64 encoded) `String` (the global types). - * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser. - * @property {boolean} [defaults=false] Also sets default values on the resulting object - * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false` - * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false` - * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any - * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings - */ - -/** - * Creates a plain object from a message of this type. Also converts values to other types if specified. - * @param {Message<{}>} message Message instance - * @param {IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ -Type.prototype.toObject = function toObject(message, options) { // eslint-disable-line no-unused-vars - return this.setup().toObject.apply(this, arguments); -}; - -/** - * Decorator function as returned by {@link Type.d} (TypeScript). - * @typedef TypeDecorator - * @type {function} - * @param {Constructor} target Target constructor - * @returns {undefined} - * @template T extends Message - */ - -/** - * Type decorator (TypeScript). - * @param {string} [typeName] Type name, defaults to the constructor's name - * @returns {TypeDecorator} Decorator function - * @template T extends Message - */ -Type.d = function decorateType(typeName) { - return function typeDecorator(target) { - util.decorateType(target, typeName); - }; -}; - -},{"14":14,"15":15,"16":16,"17":17,"18":18,"22":22,"23":23,"25":25,"27":27,"29":29,"35":35,"39":39,"44":44,"45":45,"46":46}],38:[function(require,module,exports){ -"use strict"; - -/** - * Common type constants. - * @namespace - */ -var types = exports; - -var util = require(39); - -var s = [ - "double", // 0 - "float", // 1 - "int32", // 2 - "uint32", // 3 - "sint32", // 4 - "fixed32", // 5 - "sfixed32", // 6 - "int64", // 7 - "uint64", // 8 - "sint64", // 9 - "fixed64", // 10 - "sfixed64", // 11 - "bool", // 12 - "string", // 13 - "bytes" // 14 -]; - -function bake(values, offset) { - var i = 0, o = Object.create(null); - offset |= 0; - while (i < values.length) o[s[i + offset]] = values[i++]; - return o; -} - -/** - * Basic type wire types. - * @type {Object.} - * @const - * @property {number} double=1 Fixed64 wire type - * @property {number} float=5 Fixed32 wire type - * @property {number} int32=0 Varint wire type - * @property {number} uint32=0 Varint wire type - * @property {number} sint32=0 Varint wire type - * @property {number} fixed32=5 Fixed32 wire type - * @property {number} sfixed32=5 Fixed32 wire type - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - * @property {number} bool=0 Varint wire type - * @property {number} string=2 Ldelim wire type - * @property {number} bytes=2 Ldelim wire type - */ -types.basic = bake([ - /* double */ 1, - /* float */ 5, - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 5, - /* sfixed32 */ 5, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1, - /* bool */ 0, - /* string */ 2, - /* bytes */ 2 -]); - -/** - * Basic type defaults. - * @type {Object.} - * @const - * @property {number} double=0 Double default - * @property {number} float=0 Float default - * @property {number} int32=0 Int32 default - * @property {number} uint32=0 Uint32 default - * @property {number} sint32=0 Sint32 default - * @property {number} fixed32=0 Fixed32 default - * @property {number} sfixed32=0 Sfixed32 default - * @property {number} int64=0 Int64 default - * @property {number} uint64=0 Uint64 default - * @property {number} sint64=0 Sint32 default - * @property {number} fixed64=0 Fixed64 default - * @property {number} sfixed64=0 Sfixed64 default - * @property {boolean} bool=false Bool default - * @property {string} string="" String default - * @property {Array.} bytes=Array(0) Bytes default - * @property {null} message=null Message default - */ -types.defaults = bake([ - /* double */ 0, - /* float */ 0, - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 0, - /* sfixed32 */ 0, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 0, - /* sfixed64 */ 0, - /* bool */ false, - /* string */ "", - /* bytes */ util.emptyArray, - /* message */ null -]); - -/** - * Basic long type wire types. - * @type {Object.} - * @const - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - */ -types.long = bake([ - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1 -], 7); - -/** - * Allowed types for map keys with their associated wire type. - * @type {Object.} - * @const - * @property {number} int32=0 Varint wire type - * @property {number} uint32=0 Varint wire type - * @property {number} sint32=0 Varint wire type - * @property {number} fixed32=5 Fixed32 wire type - * @property {number} sfixed32=5 Fixed32 wire type - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - * @property {number} bool=0 Varint wire type - * @property {number} string=2 Ldelim wire type - */ -types.mapKey = bake([ - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 5, - /* sfixed32 */ 5, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1, - /* bool */ 0, - /* string */ 2 -], 2); - -/** - * Allowed types for packed repeated fields with their associated wire type. - * @type {Object.} - * @const - * @property {number} double=1 Fixed64 wire type - * @property {number} float=5 Fixed32 wire type - * @property {number} int32=0 Varint wire type - * @property {number} uint32=0 Varint wire type - * @property {number} sint32=0 Varint wire type - * @property {number} fixed32=5 Fixed32 wire type - * @property {number} sfixed32=5 Fixed32 wire type - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - * @property {number} bool=0 Varint wire type - */ -types.packed = bake([ - /* double */ 1, - /* float */ 5, - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 5, - /* sfixed32 */ 5, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1, - /* bool */ 0 -]); - -},{"39":39}],39:[function(require,module,exports){ -"use strict"; - -/** - * Various utility functions. - * @namespace - */ -var util = module.exports = require(42); - -var roots = require(32); - -var Type, // cyclic - Enum; - -util.codegen = require(3); -util.fetch = require(5); -util.path = require(9); -util.patterns = require(43); - -var reservedRe = util.patterns.reservedRe; - -/** - * Node's fs module if available. - * @type {Object.} - */ -util.fs = require(40); - -/** - * Checks a recursion depth. - * @param {number|undefined} depth Depth of recursion - * @returns {number} Depth of recursion - * @throws {Error} If depth exceeds util.recursionLimit - */ -util.checkDepth = function checkDepth(depth) { - if (depth === undefined) - depth = 0; - if (depth > util.recursionLimit) - throw Error("max depth exceeded"); - return depth; -}; - -/** - * Converts an object's values to an array. - * @param {Object.} object Object to convert - * @returns {Array.<*>} Converted array - */ -util.toArray = function toArray(object) { - if (object) { - var keys = Object.keys(object), - array = new Array(keys.length), - index = 0; - while (index < keys.length) - array[index] = object[keys[index++]]; - return array; - } - return []; -}; - -/** - * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values. - * @param {Array.<*>} array Array to convert - * @returns {Object.} Converted object - */ -util.toObject = function toObject(array) { - var object = {}, - index = 0; - while (index < array.length) { - var key = array[index++], - val = array[index++]; - if (val !== undefined) - object[key] = val; - } - return object; -}; - -/** - * Tests whether the specified name is a reserved word in JS. - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -util.isReserved = function isReserved(name) { - return reservedRe.test(name); -}; - -/** - * Returns a safe property accessor for the specified property name. - * @param {string} prop Property name - * @returns {string} Safe accessor - */ -util.safeProp = function safeProp(prop) { - if (!/^[$\w_]+$/.test(prop) || reservedRe.test(prop)) - return "[" + JSON.stringify(prop) + "]"; - return "." + prop; -}; - -/** - * Converts the first character of a string to upper case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.ucFirst = function ucFirst(str) { - return str.charAt(0).toUpperCase() + str.substring(1); -}; - -var camelCaseRe = /_([a-z])/g; - -/** - * Converts a string to camel case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.camelCase = function camelCase(str) { - return str.substring(0, 1) - + str.substring(1) - .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); }); -}; - -/** - * Compares reflected fields by id. - * @param {Field} a First field - * @param {Field} b Second field - * @returns {number} Comparison value - */ -util.compareFieldsById = function compareFieldsById(a, b) { - return a.id - b.id; -}; - -/** - * Decorator helper for types (TypeScript). - * @param {Constructor} ctor Constructor function - * @param {string} [typeName] Type name, defaults to the constructor's name - * @returns {Type} Reflected type - * @template T extends Message - * @property {Root} root Decorators root - */ -util.decorateType = function decorateType(ctor, typeName) { - - /* istanbul ignore if */ - if (ctor.$type) { - if (typeName && ctor.$type.name !== typeName) { - util.decorateRoot.remove(ctor.$type); - ctor.$type.name = typeName; - util.decorateRoot.add(ctor.$type); - } - return ctor.$type; - } - - /* istanbul ignore next */ - if (!Type) - Type = require(37); - - var type = new Type(typeName || ctor.name); - util.decorateRoot.add(type); - type.ctor = ctor; // sets up .encode, .decode etc. - Object.defineProperty(ctor, "$type", { value: type, enumerable: false }); - Object.defineProperty(ctor.prototype, "$type", { value: type, enumerable: false }); - return type; -}; - -var decorateEnumIndex = 0; - -/** - * Decorator helper for enums (TypeScript). - * @param {Object} object Enum object - * @returns {Enum} Reflected enum - */ -util.decorateEnum = function decorateEnum(object) { - - /* istanbul ignore if */ - if (object.$type) - return object.$type; - - /* istanbul ignore next */ - if (!Enum) - Enum = require(17); - - var enm = new Enum("Enum" + decorateEnumIndex++, object); - util.decorateRoot.add(enm); - Object.defineProperty(object, "$type", { value: enm, enumerable: false }); - return enm; -}; - - -/** - * Sets the value of a property by property path. If a value already exists, it is turned to an array - * @param {Object.} dst Destination object - * @param {string} path dot '.' delimited path of the property to set - * @param {Object} value the value to set - * @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set - * @returns {Object.} Destination object - */ -util.setProperty = function setProperty(dst, path, value, ifNotSet) { - function setProp(dst, path, value) { - var part = path.shift(); - if (util.isUnsafeProperty(part)) - return dst; - if (path.length > 0) { - dst[part] = setProp(dst[part] || {}, path, value); - } else { - var prevValue = dst[part]; - if (prevValue && ifNotSet) - return dst; - if (prevValue) - value = [].concat(prevValue).concat(value); - dst[part] = value; - } - return dst; - } - - if (typeof dst !== "object") - throw TypeError("dst must be an object"); - if (!path) - throw TypeError("path must be specified"); - - path = path.split("."); - if (path.length > util.recursionLimit) - throw Error("max depth exceeded"); - return setProp(dst, path, value); -}; - -/** - * Decorator root (TypeScript). - * @name util.decorateRoot - * @type {Root} - * @readonly - */ -Object.defineProperty(util, "decorateRoot", { - get: function() { - return roots["decorated"] || (roots["decorated"] = new (require(31))()); - } -}); - -},{"17":17,"3":3,"31":31,"32":32,"37":37,"40":40,"42":42,"43":43,"5":5,"9":9}],40:[function(require,module,exports){ -"use strict"; - -var fs = null; -try { - fs = require(12); - if (!fs || !fs.readFile || !fs.readFileSync) - fs = null; -} catch (e) { - // `fs` is unavailable in browsers and browser-like bundles. -} -module.exports = fs; - -},{"12":12}],41:[function(require,module,exports){ -"use strict"; -module.exports = LongBits; - -var util = require(42); - -/** - * Constructs new long bits. - * @classdesc Helper class for working with the low and high bits of a 64 bit value. - * @memberof util - * @constructor - * @param {number} lo Low 32 bits, unsigned - * @param {number} hi High 32 bits, unsigned - */ -function LongBits(lo, hi) { - - // note that the casts below are theoretically unnecessary as of today, but older statically - // generated converter code might still call the ctor with signed 32bits. kept for compat. - - /** - * Low bits. - * @type {number} - */ - this.lo = lo >>> 0; - - /** - * High bits. - * @type {number} - */ - this.hi = hi >>> 0; -} - -/** - * Zero bits. - * @memberof util.LongBits - * @type {util.LongBits} - */ -var zero = LongBits.zero = new LongBits(0, 0); - -zero.toNumber = function() { return 0; }; -zero.zzEncode = zero.zzDecode = function() { return this; }; -zero.length = function() { return 1; }; - -/** - * Zero hash. - * @memberof util.LongBits - * @type {string} - */ -var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; - -/** - * Constructs new long bits from the specified number. - * @param {number} value Value - * @returns {util.LongBits} Instance - */ -LongBits.fromNumber = function fromNumber(value) { - if (value === 0) - return zero; - var sign = value < 0; - if (sign) - value = -value; - var lo = value >>> 0, - hi = (value - lo) / 4294967296 >>> 0; - if (sign) { - hi = ~hi >>> 0; - lo = ~lo >>> 0; - if (++lo > 4294967295) { - lo = 0; - if (++hi > 4294967295) - hi = 0; - } - } - return new LongBits(lo, hi); -}; - -/** - * Constructs new long bits from a number, long or string. - * @param {Long|number|string} value Value - * @returns {util.LongBits} Instance - */ -LongBits.from = function from(value) { - if (typeof value === "number") - return LongBits.fromNumber(value); - if (util.isString(value)) { - /* istanbul ignore else */ - if (util.Long) - value = util.Long.fromString(value); - else - return LongBits.fromNumber(parseInt(value, 10)); - } - return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; -}; - -/** - * Converts this long bits to a possibly unsafe JavaScript number. - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {number} Possibly unsafe number - */ -LongBits.prototype.toNumber = function toNumber(unsigned) { - if (!unsigned && this.hi >>> 31) { - var lo = ~this.lo + 1 >>> 0, - hi = ~this.hi >>> 0; - if (!lo) - hi = hi + 1 >>> 0; - return -(lo + hi * 4294967296); - } - return this.lo + this.hi * 4294967296; -}; - -/** - * Converts this long bits to a long. - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long} Long - */ -LongBits.prototype.toLong = function toLong(unsigned) { - return util.Long - ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) - /* istanbul ignore next */ - : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; -}; - -var charCodeAt = String.prototype.charCodeAt; - -/** - * Constructs new long bits from the specified 8 characters long hash. - * @param {string} hash Hash - * @returns {util.LongBits} Bits - */ -LongBits.fromHash = function fromHash(hash) { - if (hash === zeroHash) - return zero; - return new LongBits( - ( charCodeAt.call(hash, 0) - | charCodeAt.call(hash, 1) << 8 - | charCodeAt.call(hash, 2) << 16 - | charCodeAt.call(hash, 3) << 24) >>> 0 - , - ( charCodeAt.call(hash, 4) - | charCodeAt.call(hash, 5) << 8 - | charCodeAt.call(hash, 6) << 16 - | charCodeAt.call(hash, 7) << 24) >>> 0 - ); -}; - -/** - * Converts this long bits to a 8 characters long hash. - * @returns {string} Hash - */ -LongBits.prototype.toHash = function toHash() { - return String.fromCharCode( - this.lo & 255, - this.lo >>> 8 & 255, - this.lo >>> 16 & 255, - this.lo >>> 24 , - this.hi & 255, - this.hi >>> 8 & 255, - this.hi >>> 16 & 255, - this.hi >>> 24 - ); -}; - -/** - * Zig-zag encodes this long bits. - * @returns {util.LongBits} `this` - */ -LongBits.prototype.zzEncode = function zzEncode() { - var mask = this.hi >> 31; - this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; - this.lo = ( this.lo << 1 ^ mask) >>> 0; - return this; -}; - -/** - * Zig-zag decodes this long bits. - * @returns {util.LongBits} `this` - */ -LongBits.prototype.zzDecode = function zzDecode() { - var mask = -(this.lo & 1); - this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; - this.hi = ( this.hi >>> 1 ^ mask) >>> 0; - return this; -}; - -/** - * Calculates the length of this longbits when encoded as a varint. - * @returns {number} Length - */ -LongBits.prototype.length = function length() { - var part0 = this.lo, - part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, - part2 = this.hi >>> 24; - return part2 === 0 - ? part1 === 0 - ? part0 < 16384 - ? part0 < 128 ? 1 : 2 - : part0 < 2097152 ? 3 : 4 - : part1 < 16384 - ? part1 < 128 ? 5 : 6 - : part1 < 2097152 ? 7 : 8 - : part2 < 128 ? 9 : 10; -}; - -},{"42":42}],42:[function(require,module,exports){ -"use strict"; -var util = exports; - -// used to return a Promise where callback is omitted -util.asPromise = require(1); - -// converts to / from base64 encoded strings -util.base64 = require(2); - -// base class of rpc.Service -util.EventEmitter = require(4); - -// float handling accross browsers -util.float = require(7); - -// requires modules optionally and hides the call from bundlers -util.inquire = require(8); - -// converts to / from utf8 encoded strings -util.utf8 = require(11); - -// provides a node-like buffer pool in the browser -util.pool = require(10); - -// utility to work with the low and high bits of a 64 bit value -util.LongBits = require(41); - -/** - * Tests if the specified key can affect object prototypes. - * @memberof util - * @param {string} key Key to test - * @returns {boolean} `true` if the key is unsafe - */ -function isUnsafeProperty(key) { - return key === "__proto__" || key === "prototype" || key === "constructor"; -} - -util.isUnsafeProperty = isUnsafeProperty; - -/** - * Whether running within node or not. - * @memberof util - * @type {boolean} - */ -util.isNode = Boolean(typeof global !== "undefined" - && global - && global.process - && global.process.versions - && global.process.versions.node); - -/** - * Global object reference. - * @memberof util - * @type {Object} - */ -util.global = util.isNode && global - || typeof window !== "undefined" && window - || typeof self !== "undefined" && self - || this; // eslint-disable-line no-invalid-this - -/** - * An immuable empty array. - * @memberof util - * @type {Array.<*>} - * @const - */ -util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes - -/** - * An immutable empty object. - * @type {Object} - * @const - */ -util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes - -/** - * Tests if the specified value is an integer. - * @function - * @param {*} value Value to test - * @returns {boolean} `true` if the value is an integer - */ -util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) { - return typeof value === "number" && isFinite(value) && Math.floor(value) === value; -}; - -/** - * Tests if the specified value is a string. - * @param {*} value Value to test - * @returns {boolean} `true` if the value is a string - */ -util.isString = function isString(value) { - return typeof value === "string" || value instanceof String; -}; - -/** - * Tests if the specified value is a non-null object. - * @param {*} value Value to test - * @returns {boolean} `true` if the value is a non-null object - */ -util.isObject = function isObject(value) { - return value && typeof value === "object"; -}; - -/** - * Checks if a property on a message is considered to be present. - * This is an alias of {@link util.isSet}. - * @function - * @param {Object} obj Plain object or message instance - * @param {string} prop Property name - * @returns {boolean} `true` if considered to be present, otherwise `false` - */ -util.isset = - -/** - * Checks if a property on a message is considered to be present. - * @param {Object} obj Plain object or message instance - * @param {string} prop Property name - * @returns {boolean} `true` if considered to be present, otherwise `false` - */ -util.isSet = function isSet(obj, prop) { - var value = obj[prop]; - if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins - return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0; - return false; -}; - -/** - * Any compatible Buffer instance. - * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. - * @interface Buffer - * @extends Uint8Array - */ - -/** - * Node's Buffer class if available. - * @type {Constructor} - */ -util.Buffer = (function() { - try { - var Buffer = util.global.Buffer; - // refuse to use non-node buffers if not explicitly assigned (perf reasons): - return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; - } catch (e) { - /* istanbul ignore next */ - return null; - } -})(); - -// Internal alias of or polyfull for Buffer.from. -util._Buffer_from = null; - -// Internal alias of or polyfill for Buffer.allocUnsafe. -util._Buffer_allocUnsafe = null; - -/** - * Creates a new buffer of whatever type supported by the environment. - * @param {number|number[]} [sizeOrArray=0] Buffer size or number array - * @returns {Uint8Array|Buffer} Buffer - */ -util.newBuffer = function newBuffer(sizeOrArray) { - /* istanbul ignore next */ - return typeof sizeOrArray === "number" - ? util.Buffer - ? util._Buffer_allocUnsafe(sizeOrArray) - : new util.Array(sizeOrArray) - : util.Buffer - ? util._Buffer_from(sizeOrArray) - : typeof Uint8Array === "undefined" - ? sizeOrArray - : new Uint8Array(sizeOrArray); -}; - -/** - * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. - * @type {Constructor} - */ -util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array; - -/** - * Any compatible Long instance. - * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. - * @interface Long - * @property {number} low Low bits - * @property {number} high High bits - * @property {boolean} unsigned Whether unsigned or not - */ - -/** - * Long.js's Long class if available. - * @type {Constructor} - */ -util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long - || /* istanbul ignore next */ util.global.Long - || (function() { - try { - var Long = require("long"); - return Long && Long.isLong ? Long : null; - } catch (e) { - /* istanbul ignore next */ - return null; - } - })(); - -/** - * Regular expression used to verify 2 bit (`bool`) map keys. - * @type {RegExp} - * @const - */ -util.key2Re = /^true|false|0|1$/; - -/** - * Regular expression used to verify 32 bit (`int32` etc.) map keys. - * @type {RegExp} - * @const - */ -util.key32Re = /^-?(?:0|[1-9][0-9]*)$/; - -/** - * Regular expression used to verify 64 bit (`int64` etc.) map keys. - * @type {RegExp} - * @const - */ -util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/; - -/** - * Converts a number or long to an 8 characters long hash string. - * @param {Long|number} value Value to convert - * @returns {string} Hash - */ -util.longToHash = function longToHash(value) { - return value - ? util.LongBits.from(value).toHash() - : util.LongBits.zeroHash; -}; - -/** - * Converts an 8 characters long hash string to a long or number. - * @param {string} hash Hash - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long|number} Original value - */ -util.longFromHash = function longFromHash(hash, unsigned) { - var bits = util.LongBits.fromHash(hash); - if (util.Long) - return util.Long.fromBits(bits.lo, bits.hi, unsigned); - return bits.toNumber(Boolean(unsigned)); -}; - -/** - * Merges the properties of the source object into the destination object. - * @memberof util - * @param {Object.} dst Destination object - * @param {...(Object.|boolean)} src Source objects, optionally followed by an `ifNotSet` flag - * @returns {Object.} Destination object - */ -function merge(dst) { // used by converters - var ifNotSet = typeof arguments[arguments.length - 1] === "boolean", - limit = ifNotSet ? arguments.length - 1 : arguments.length; - ifNotSet = ifNotSet && arguments[arguments.length - 1]; - for (var a = 1; a < limit; ++a) { - var src = arguments[a]; - if (!src) - continue; - for (var keys = Object.keys(src), i = 0; i < keys.length; ++i) - if (!isUnsafeProperty(keys[i]) && (dst[keys[i]] === undefined || !ifNotSet)) - dst[keys[i]] = src[keys[i]]; - } - return dst; -} - -util.merge = merge; - -/** - * Schema declaration nesting limit. - * @memberof util - * @type {number} - */ -util.nestingLimit = 32; // protoc: MaxMessageDeclarationNestingDepth - -/** - * Recursion limit. - * @memberof util - * @type {number} - */ -util.recursionLimit = 100; // protoc: CodedInputStream::default_recursion_limit_ - -/** - * Makes a property safe for assignment as an own property. - * @memberof util - * @param {Object.} obj Object - * @param {string} key Property key - * @returns {undefined} - */ -util.makeProp = function makeProp(obj, key) { - Object.defineProperty(obj, key, { - enumerable: true, - configurable: true, - writable: true - }); -}; - -/** - * Converts the first character of a string to lower case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.lcFirst = function lcFirst(str) { - return str.charAt(0).toLowerCase() + str.substring(1); -}; - -/** - * Creates a custom error constructor. - * @memberof util - * @param {string} name Error name - * @returns {Constructor} Custom error constructor - */ -function newError(name) { - - function CustomError(message, properties) { - - if (!(this instanceof CustomError)) - return new CustomError(message, properties); - - // Error.call(this, message); - // ^ just returns a new error instance because the ctor can be called as a function - - Object.defineProperty(this, "message", { get: function() { return message; } }); - - /* istanbul ignore next */ - if (Error.captureStackTrace) // node - Error.captureStackTrace(this, CustomError); - else - Object.defineProperty(this, "stack", { value: new Error().stack || "" }); - - if (properties) - merge(this, properties); - } - - CustomError.prototype = Object.create(Error.prototype, { - constructor: { - value: CustomError, - writable: true, - enumerable: false, - configurable: true, - }, - name: { - get: function get() { return name; }, - set: undefined, - enumerable: false, - // configurable: false would accurately preserve the behavior of - // the original, but I'm guessing that was not intentional. - // For an actual error subclass, this property would - // be configurable. - configurable: true, - }, - toString: { - value: function value() { return this.name + ": " + this.message; }, - writable: true, - enumerable: false, - configurable: true, - }, - }); - - return CustomError; -} - -util.newError = newError; - -/** - * Constructs a new protocol error. - * @classdesc Error subclass indicating a protocol specifc error. - * @memberof util - * @extends Error - * @template T extends Message - * @constructor - * @param {string} message Error message - * @param {Object.} [properties] Additional properties - * @example - * try { - * MyMessage.decode(someBuffer); // throws if required fields are missing - * } catch (e) { - * if (e instanceof ProtocolError && e.instance) - * console.log("decoded so far: " + JSON.stringify(e.instance)); - * } - */ -util.ProtocolError = newError("ProtocolError"); - -/** - * So far decoded message instance. - * @name util.ProtocolError#instance - * @type {Message} - */ - -/** - * A OneOf getter as returned by {@link util.oneOfGetter}. - * @typedef OneOfGetter - * @type {function} - * @returns {string|undefined} Set field name, if any - */ - -/** - * Builds a getter for a oneof's present field name. - * @param {string[]} fieldNames Field names - * @returns {OneOfGetter} Unbound getter - */ -util.oneOfGetter = function getOneOf(fieldNames) { - var fieldMap = {}; - for (var i = 0; i < fieldNames.length; ++i) - fieldMap[fieldNames[i]] = 1; - - /** - * @returns {string|undefined} Set field name, if any - * @this Object - * @ignore - */ - return function() { // eslint-disable-line consistent-return - for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i) - if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null) - return keys[i]; - }; -}; - -/** - * A OneOf setter as returned by {@link util.oneOfSetter}. - * @typedef OneOfSetter - * @type {function} - * @param {string|undefined} value Field name - * @returns {undefined} - */ - -/** - * Builds a setter for a oneof's present field name. - * @param {string[]} fieldNames Field names - * @returns {OneOfSetter} Unbound setter - */ -util.oneOfSetter = function setOneOf(fieldNames) { - - /** - * @param {string} name Field name - * @returns {undefined} - * @this Object - * @ignore - */ - return function(name) { - for (var i = 0; i < fieldNames.length; ++i) - if (fieldNames[i] !== name) - delete this[fieldNames[i]]; - }; -}; - -/** - * Default conversion options used for {@link Message#toJSON} implementations. - * - * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: - * - * - Longs become strings - * - Enums become string keys - * - Bytes become base64 encoded strings - * - (Sub-)Messages become plain objects - * - Maps become plain objects with all string keys - * - Repeated fields become arrays - * - NaN and Infinity for float and double fields become strings - * - * @type {IConversionOptions} - * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json - */ -util.toJSONOptions = { - longs: String, - enums: String, - bytes: String, - json: true -}; - -// Sets up buffer utility according to the environment (called in index-minimal) -util._configure = function() { - var Buffer = util.Buffer; - /* istanbul ignore if */ - if (!Buffer) { - util._Buffer_from = util._Buffer_allocUnsafe = null; - return; - } - // because node 4.x buffers are incompatible & immutable - // see: https://github.com/dcodeIO/protobuf.js/pull/665 - util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || - /* istanbul ignore next */ - function Buffer_from(value, encoding) { - return new Buffer(value, encoding); - }; - util._Buffer_allocUnsafe = Buffer.allocUnsafe || - /* istanbul ignore next */ - function Buffer_allocUnsafe(size) { - return new Buffer(size); - }; -}; - -},{"1":1,"10":10,"11":11,"2":2,"4":4,"41":41,"7":7,"8":8,"long":"long"}],43:[function(require,module,exports){ -"use strict"; - -var patterns = exports; - -patterns.numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/; -patterns.typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/; -patterns.reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/; - -},{}],44:[function(require,module,exports){ -"use strict"; -module.exports = verifier; - -var Enum = require(17), - util = require(39); - -function invalid(field, expected) { - return field.name + ": " + expected + (field.repeated && expected !== "array" ? "[]" : field.map && expected !== "object" ? "{k:"+field.keyType+"}" : "") + " expected"; -} - -/** - * Generates a partial value verifier. - * @param {Codegen} gen Codegen instance - * @param {Field} field Reflected field - * @param {number} fieldIndex Field index - * @param {string} ref Variable reference - * @returns {Codegen} Codegen instance - * @ignore - */ -function genVerifyValue(gen, field, fieldIndex, ref) { - /* eslint-disable no-unexpected-multiline */ - if (field.resolvedType) { - if (field.resolvedType instanceof Enum) { gen - ("switch(%s){", ref) - ("default:") - ("return%j", invalid(field, "enum value")); - for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen - ("case %i:", field.resolvedType.values[keys[j]]); - gen - ("break") - ("}"); - } else { - gen - ("{") - ("var e=types[%i].verify(%s,n+1);", fieldIndex, ref) - ("if(e)") - ("return%j+e", field.name + ".") - ("}"); - } - } else { - switch (field.type) { - case "int32": - case "uint32": - case "sint32": - case "fixed32": - case "sfixed32": gen - ("if(!util.isInteger(%s))", ref) - ("return%j", invalid(field, "integer")); - break; - case "int64": - case "uint64": - case "sint64": - case "fixed64": - case "sfixed64": gen - ("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", ref, ref, ref, ref) - ("return%j", invalid(field, "integer|Long")); - break; - case "float": - case "double": gen - ("if(typeof %s!==\"number\")", ref) - ("return%j", invalid(field, "number")); - break; - case "bool": gen - ("if(typeof %s!==\"boolean\")", ref) - ("return%j", invalid(field, "boolean")); - break; - case "string": gen - ("if(!util.isString(%s))", ref) - ("return%j", invalid(field, "string")); - break; - case "bytes": gen - ("if(!(%s&&typeof %s.length===\"number\"||util.isString(%s)))", ref, ref, ref) - ("return%j", invalid(field, "buffer")); - break; - } - } - return gen; - /* eslint-enable no-unexpected-multiline */ -} - -/** - * Generates a partial key verifier. - * @param {Codegen} gen Codegen instance - * @param {Field} field Reflected field - * @param {string} ref Variable reference - * @returns {Codegen} Codegen instance - * @ignore - */ -function genVerifyKey(gen, field, ref) { - /* eslint-disable no-unexpected-multiline */ - switch (field.keyType) { - case "int32": - case "uint32": - case "sint32": - case "fixed32": - case "sfixed32": gen - ("if(!util.key32Re.test(%s))", ref) - ("return%j", invalid(field, "integer key")); - break; - case "int64": - case "uint64": - case "sint64": - case "fixed64": - case "sfixed64": gen - ("if(!util.key64Re.test(%s))", ref) // see comment above: x is ok, d is not - ("return%j", invalid(field, "integer|Long key")); - break; - case "bool": gen - ("if(!util.key2Re.test(%s))", ref) - ("return%j", invalid(field, "boolean key")); - break; - } - return gen; - /* eslint-enable no-unexpected-multiline */ -} - -/** - * Generates a verifier specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -function verifier(mtype) { - /* eslint-disable no-unexpected-multiline */ - - var gen = util.codegen(["m", "n"], mtype.name + "$verify") - ("if(typeof m!==\"object\"||m===null)") - ("return%j", "object expected") - ("if(n===undefined)n=0") - ("if(n>util.recursionLimit)") - ("return%j", "maximum nesting depth exceeded"); - var oneofs = mtype.oneofsArray, - seenFirstField = {}; - if (oneofs.length) gen - ("var p={}"); - - for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) { - var field = mtype._fieldsArray[i].resolve(), - ref = "m" + util.safeProp(field.name); - - if (field.optional) gen - ("if(%s!=null&&m.hasOwnProperty(%j)){", ref, field.name); // !== undefined && !== null - - // map fields - if (field.map) { gen - ("if(!util.isObject(%s))", ref) - ("return%j", invalid(field, "object")) - ("var k=Object.keys(%s)", ref) - ("for(var i=0;i} - * @const - */ -var wrappers = exports; - -var Message = require(23), - util = require(42); - -/** - * From object converter part of an {@link IWrapper}. - * @typedef WrapperFromObjectConverter - * @type {function} - * @param {Object.} object Plain object - * @returns {Message<{}>} Message instance - * @this Type - */ - -/** - * To object converter part of an {@link IWrapper}. - * @typedef WrapperToObjectConverter - * @type {function} - * @param {Message<{}>} message Message instance - * @param {IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - * @this Type - */ - -/** - * Common type wrapper part of {@link wrappers}. - * @interface IWrapper - * @property {WrapperFromObjectConverter} [fromObject] From object converter - * @property {WrapperToObjectConverter} [toObject] To object converter - */ - -// Custom wrapper for Any -wrappers[".google.protobuf.Any"] = { - - fromObject: function(object, depth) { - - // unwrap value type if mapped - if (object && object["@type"]) { - // Only use fully qualified type name after the last '/' - var name = object["@type"].substring(object["@type"].lastIndexOf("/") + 1); - var type = this.lookup(name); - /* istanbul ignore else */ - if (type) { - // type_url does not accept leading "." - var type_url = object["@type"].charAt(0) === "." ? - object["@type"].slice(1) : object["@type"]; - // type_url prefix is optional, but path seperator is required - if (type_url.indexOf("/") === -1) { - type_url = "/" + type_url; - } - return this.create({ - type_url: type_url, - value: type.encode(type.fromObject(object, depth === undefined ? 1 : depth + 1)).finish() - }); - } - } - - return this.fromObject(object, depth); - }, - - toObject: function(message, options, depth) { - if (depth === undefined) - depth = 0; - if (depth > util.recursionLimit) - throw Error("max depth exceeded"); - - // Default prefix - var googleApi = "type.googleapis.com/"; - var prefix = ""; - var name = ""; - - // decode value if requested and unmapped - if (options && options.json && message.type_url && message.value) { - // Only use fully qualified type name after the last '/' - name = message.type_url.substring(message.type_url.lastIndexOf("/") + 1); - // Separate the prefix used - prefix = message.type_url.substring(0, message.type_url.lastIndexOf("/") + 1); - var type = this.lookup(name); - /* istanbul ignore else */ - if (type) - message = type.decode(message.value, undefined, undefined, depth + 1); - } - - // wrap value if unmapped - if (!(message instanceof this.ctor) && message instanceof Message) { - var object = message.$type.toObject(message, options, depth + 1); - var messageName = message.$type.fullName[0] === "." ? - message.$type.fullName.slice(1) : message.$type.fullName; - // Default to type.googleapis.com prefix if no prefix is used - if (prefix === "") { - prefix = googleApi; - } - name = prefix + messageName; - object["@type"] = name; - return object; - } - - return this.toObject(message, options, depth); - } -}; - -},{"23":23,"42":42}],46:[function(require,module,exports){ -"use strict"; -module.exports = Writer; - -var util = require(42); - -var BufferWriter; // cyclic - -var LongBits = util.LongBits, - base64 = util.base64, - utf8 = util.utf8; - -/** - * Constructs a new writer operation instance. - * @classdesc Scheduled writer operation. - * @constructor - * @param {function(*, Uint8Array, number)} fn Function to call - * @param {number} len Value byte length - * @param {*} val Value to write - * @ignore - */ -function Op(fn, len, val) { - - /** - * Function to call. - * @type {function(Uint8Array, number, *)} - */ - this.fn = fn; - - /** - * Value byte length. - * @type {number} - */ - this.len = len; - - /** - * Next operation. - * @type {Writer.Op|undefined} - */ - this.next = undefined; - - /** - * Value to write. - * @type {*} - */ - this.val = val; // type varies -} - -/* istanbul ignore next */ -function noop() {} // eslint-disable-line no-empty-function - -/** - * Constructs a new writer state instance. - * @classdesc Copied writer state. - * @memberof Writer - * @constructor - * @param {Writer} writer Writer to copy state from - * @ignore - */ -function State(writer) { - - /** - * Current head. - * @type {Writer.Op} - */ - this.head = writer.head; - - /** - * Current tail. - * @type {Writer.Op} - */ - this.tail = writer.tail; - - /** - * Current buffer length. - * @type {number} - */ - this.len = writer.len; - - /** - * Next state. - * @type {State|null} - */ - this.next = writer.states; -} - -/** - * Constructs a new writer instance. - * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`. - * @constructor - */ -function Writer() { - - /** - * Current length. - * @type {number} - */ - this.len = 0; - - /** - * Operations head. - * @type {Object} - */ - this.head = new Op(noop, 0, 0); - - /** - * Operations tail - * @type {Object} - */ - this.tail = this.head; - - /** - * Linked forked states. - * @type {Object|null} - */ - this.states = null; - - // When a value is written, the writer calculates its byte length and puts it into a linked - // list of operations to perform when finish() is called. This both allows us to allocate - // buffers of the exact required size and reduces the amount of work we have to do compared - // to first calculating over objects and then encoding over objects. In our case, the encoding - // part is just a linked list walk calling operations with already prepared values. -} - -var create = function create() { - return util.Buffer - ? function create_buffer_setup() { - return (Writer.create = function create_buffer() { - return new BufferWriter(); - })(); - } - /* istanbul ignore next */ - : function create_array() { - return new Writer(); - }; -}; - -/** - * Creates a new writer. - * @function - * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} - */ -Writer.create = create(); - -/** - * Allocates a buffer of the specified size. - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ -Writer.alloc = function alloc(size) { - return new util.Array(size); -}; - -// Use Uint8Array buffer pool in the browser, just like node does with buffers -/* istanbul ignore else */ -if (util.Array !== Array) - Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray); - -/** - * Pushes a new operation to the queue. - * @param {function(Uint8Array, number, *)} fn Function to call - * @param {number} len Value byte length - * @param {number} val Value to write - * @returns {Writer} `this` - * @private - */ -Writer.prototype._push = function push(fn, len, val) { - this.tail = this.tail.next = new Op(fn, len, val); - this.len += len; - return this; -}; - -function writeByte(val, buf, pos) { - buf[pos] = val & 255; -} - -function writeVarint32(val, buf, pos) { - while (val > 127) { - buf[pos++] = val & 127 | 128; - val >>>= 7; - } - buf[pos] = val; -} - -/** - * Constructs a new varint writer operation instance. - * @classdesc Scheduled varint writer operation. - * @extends Op - * @constructor - * @param {number} len Value byte length - * @param {number} val Value to write - * @ignore - */ -function VarintOp(len, val) { - this.len = len; - this.next = undefined; - this.val = val; -} - -VarintOp.prototype = Object.create(Op.prototype); -VarintOp.prototype.fn = writeVarint32; - -/** - * Writes an unsigned 32 bit value as a varint. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.uint32 = function write_uint32(value) { - // here, the call to this.push has been inlined and a varint specific Op subclass is used. - // uint32 is by far the most frequently used operation and benefits significantly from this. - this.len += (this.tail = this.tail.next = new VarintOp( - (value = value >>> 0) - < 128 ? 1 - : value < 16384 ? 2 - : value < 2097152 ? 3 - : value < 268435456 ? 4 - : 5, - value)).len; - return this; -}; - -/** - * Writes a signed 32 bit value as a varint. - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.int32 = function write_int32(value) { - return (value |= 0) < 0 - ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec - : this.uint32(value); -}; - -/** - * Writes a 32 bit value as a varint, zig-zag encoded. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.sint32 = function write_sint32(value) { - return this.uint32((value << 1 ^ value >> 31) >>> 0); -}; - -function writeVarint64(val, buf, pos) { - var lo = val.lo, - hi = val.hi; - while (hi) { - buf[pos++] = lo & 127 | 128; - lo = (lo >>> 7 | hi << 25) >>> 0; - hi >>>= 7; - } - while (lo > 127) { - buf[pos++] = lo & 127 | 128; - lo = lo >>> 7; - } - buf[pos++] = lo; -} - -/** - * Writes an unsigned 64 bit value as a varint. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.uint64 = function write_uint64(value) { - var bits = LongBits.from(value); - return this._push(writeVarint64, bits.length(), bits); -}; - -/** - * Writes a signed 64 bit value as a varint. - * @function - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.int64 = Writer.prototype.uint64; - -/** - * Writes a signed 64 bit value as a varint, zig-zag encoded. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.sint64 = function write_sint64(value) { - var bits = LongBits.from(value).zzEncode(); - return this._push(writeVarint64, bits.length(), bits); -}; - -/** - * Writes a boolish value as a varint. - * @param {boolean} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.bool = function write_bool(value) { - return this._push(writeByte, 1, value ? 1 : 0); -}; - -function writeFixed32(val, buf, pos) { - buf[pos ] = val & 255; - buf[pos + 1] = val >>> 8 & 255; - buf[pos + 2] = val >>> 16 & 255; - buf[pos + 3] = val >>> 24; -} - -/** - * Writes an unsigned 32 bit value as fixed 32 bits. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.fixed32 = function write_fixed32(value) { - return this._push(writeFixed32, 4, value >>> 0); -}; - -/** - * Writes a signed 32 bit value as fixed 32 bits. - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.sfixed32 = Writer.prototype.fixed32; - -/** - * Writes an unsigned 64 bit value as fixed 64 bits. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.fixed64 = function write_fixed64(value) { - var bits = LongBits.from(value); - return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); -}; - -/** - * Writes a signed 64 bit value as fixed 64 bits. - * @function - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.sfixed64 = Writer.prototype.fixed64; - -/** - * Writes a float (32 bit). - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.float = function write_float(value) { - return this._push(util.float.writeFloatLE, 4, value); -}; - -/** - * Writes a double (64 bit float). - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.double = function write_double(value) { - return this._push(util.float.writeDoubleLE, 8, value); -}; - -var writeBytes = util.Array.prototype.set - ? function writeBytes_set(val, buf, pos) { - buf.set(val, pos); // also works for plain array values - } - /* istanbul ignore next */ - : function writeBytes_for(val, buf, pos) { - for (var i = 0; i < val.length; ++i) - buf[pos + i] = val[i]; - }; - -/** - * Writes a sequence of bytes. - * @param {Uint8Array|string} value Buffer or base64 encoded string to write - * @returns {Writer} `this` - */ -Writer.prototype.bytes = function write_bytes(value) { - var len = value.length >>> 0; - if (!len) - return this._push(writeByte, 1, 0); - if (util.isString(value)) { - var buf = Writer.alloc(len = base64.length(value)); - base64.decode(value, buf, 0); - value = buf; - } - return this.uint32(len)._push(writeBytes, len, value); -}; - -/** - * Writes a string. - * @param {string} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.string = function write_string(value) { - var len = utf8.length(value); - return len - ? this.uint32(len)._push(utf8.write, len, value) - : this._push(writeByte, 1, 0); -}; - -/** - * Forks this writer's state by pushing it to a stack. - * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. - * @returns {Writer} `this` - */ -Writer.prototype.fork = function fork() { - this.states = new State(this); - this.head = this.tail = new Op(noop, 0, 0); - this.len = 0; - return this; -}; - -/** - * Resets this instance to the last state. - * @returns {Writer} `this` - */ -Writer.prototype.reset = function reset() { - if (this.states) { - this.head = this.states.head; - this.tail = this.states.tail; - this.len = this.states.len; - this.states = this.states.next; - } else { - this.head = this.tail = new Op(noop, 0, 0); - this.len = 0; - } - return this; -}; - -/** - * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. - * @returns {Writer} `this` - */ -Writer.prototype.ldelim = function ldelim() { - var head = this.head, - tail = this.tail, - len = this.len; - this.reset().uint32(len); - if (len) { - this.tail.next = head.next; // skip noop - this.tail = tail; - this.len += len; - } - return this; -}; - -/** - * Finishes the write operation. - * @returns {Uint8Array} Finished buffer - */ -Writer.prototype.finish = function finish() { - var head = this.head.next, // skip noop - buf = this.constructor.alloc(this.len), - pos = 0; - while (head) { - head.fn(head.val, buf, pos); - pos += head.len; - head = head.next; - } - // this.head = this.tail = null; - return buf; -}; - -Writer._configure = function(BufferWriter_) { - BufferWriter = BufferWriter_; - Writer.create = create(); - BufferWriter._configure(); -}; - -},{"42":42}],47:[function(require,module,exports){ -"use strict"; -module.exports = BufferWriter; - -// extends Writer -var Writer = require(46); -(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; - -var util = require(42); - -/** - * Constructs a new buffer writer instance. - * @classdesc Wire format writer using node buffers. - * @extends Writer - * @constructor - */ -function BufferWriter() { - Writer.call(this); -} - -BufferWriter._configure = function () { - /** - * Allocates a buffer of the specified size. - * @function - * @param {number} size Buffer size - * @returns {Buffer} Buffer - */ - BufferWriter.alloc = util._Buffer_allocUnsafe; - - BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" - ? function writeBytesBuffer_set(val, buf, pos) { - buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) - // also works for plain array values - } - /* istanbul ignore next */ - : function writeBytesBuffer_copy(val, buf, pos) { - if (val.copy) // Buffer values - val.copy(buf, pos, 0, val.length); - else for (var i = 0; i < val.length;) // plain array values - buf[pos++] = val[i++]; - }; -}; - - -/** - * @override - */ -BufferWriter.prototype.bytes = function write_bytes_buffer(value) { - if (util.isString(value)) - value = util._Buffer_from(value, "base64"); - var len = value.length >>> 0; - this.uint32(len); - if (len) - this._push(BufferWriter.writeBytesBuffer, len, value); - return this; -}; - -function writeStringBuffer(val, buf, pos) { - if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) - util.utf8.write(val, buf, pos); - else if (buf.utf8Write) - buf.utf8Write(val, pos); - else - buf.write(val, pos); -} - -/** - * @override - */ -BufferWriter.prototype.string = function write_string_buffer(value) { - var len = util.Buffer.byteLength(value); - this.uint32(len); - if (len) - this._push(writeStringBuffer, len, value); - return this; -}; - - -/** - * Finishes the write operation. - * @name BufferWriter#finish - * @function - * @returns {Buffer} Finished buffer - */ - -BufferWriter._configure(); - -},{"42":42,"46":46}]},{},[21]) - -})(); -//# sourceMappingURL=protobuf.js.map diff --git a/node_modules/protobufjs/dist/protobuf.js.map b/node_modules/protobufjs/dist/protobuf.js.map deleted file mode 100644 index 4312eeb..0000000 --- a/node_modules/protobufjs/dist/protobuf.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["lib/prelude.js","../node_modules/@protobufjs/aspromise/index.js","../node_modules/@protobufjs/base64/index.js","../node_modules/@protobufjs/codegen/index.js","../node_modules/@protobufjs/eventemitter/index.js","../node_modules/@protobufjs/fetch/index.js","../node_modules/@protobufjs/fetch/util/fs.js","../node_modules/@protobufjs/float/index.js","../node_modules/@protobufjs/inquire/index.js","../node_modules/@protobufjs/path/index.js","../node_modules/@protobufjs/pool/index.js","../node_modules/@protobufjs/utf8/index.js","../node_modules/browser-resolve/empty.js","../src/common.js","../src/converter.js","../src/decoder.js","../src/encoder.js","../src/enum.js","../src/field.js","../src/index-light.js","../src/index-minimal.js","../src/index","../src/mapfield.js","../src/message.js","../src/method.js","../src/namespace.js","../src/object.js","../src/oneof.js","../src/parse.js","../src/reader.js","../src/reader_buffer.js","../src/root.js","../src/roots.js","../src/rpc.js","../src/rpc/service.js","../src/service.js","../src/tokenize.js","../src/type.js","../src/types.js","../src/util.js","../src/util/fs.js","../src/util/longbits.js","../src/util/minimal.js","../src/util/patterns.js","../src/verifier.js","../src/wrappers.js","../src/writer.js","../src/writer_buffer.js"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9iBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9XA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC79BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9eA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACndA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function prelude(modules, cache, entries) {\n\n // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS\n // sources through a conflict-free require shim and is again wrapped within an iife that\n // provides a minification-friendly `undefined` var plus a global \"use strict\" directive\n // so that minification can remove the directives of each module.\n\n function $require(name) {\n var $module = cache[name];\n if (!$module)\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n return $module.exports;\n }\n\n var protobuf = $require(entries[0]);\n\n // Expose globally\n protobuf.util.global.protobuf = protobuf;\n\n // Be nice to AMD\n if (typeof define === \"function\" && define.amd)\n define([\"long\"], function(Long) {\n if (Long && Long.isLong) {\n protobuf.util.Long = Long;\n protobuf.configure();\n }\n return protobuf;\n });\n\n // Be nice to CommonJS\n if (typeof module === \"object\" && module && module.exports)\n module.exports = protobuf;\n\n})/* end of prelude */","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @param {string[]} functionParams Function parameter names\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n */\r\nfunction codegen(functionParams, functionName) {\r\n\r\n /* istanbul ignore if */\r\n if (typeof functionParams === \"string\") {\r\n functionName = functionParams;\r\n functionParams = undefined;\r\n }\r\n\r\n var body = [];\r\n\r\n /**\r\n * Appends code to the function's body or finishes generation.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any\r\n * @param {...*} [formatParams] Format parameters\r\n * @returns {Codegen|Function} Itself or the generated function if finished\r\n * @throws {Error} If format parameter counts do not match\r\n */\r\n\r\n function Codegen(formatStringOrScope) {\r\n // note that explicit array handling below makes this ~50% faster\r\n\r\n // finish the function\r\n if (typeof formatStringOrScope !== \"string\") {\r\n var source = toString();\r\n if (codegen.verbose)\r\n console.log(\"codegen: \" + source); // eslint-disable-line no-console\r\n source = \"return \" + source;\r\n if (formatStringOrScope) {\r\n var scopeKeys = Object.keys(formatStringOrScope),\r\n scopeParams = new Array(scopeKeys.length + 1),\r\n scopeValues = new Array(scopeKeys.length),\r\n scopeOffset = 0;\r\n while (scopeOffset < scopeKeys.length) {\r\n scopeParams[scopeOffset] = scopeKeys[scopeOffset];\r\n scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]];\r\n }\r\n scopeParams[scopeOffset] = source;\r\n return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func\r\n }\r\n return Function(source)(); // eslint-disable-line no-new-func\r\n }\r\n\r\n // otherwise append to body\r\n var formatParams = new Array(arguments.length - 1),\r\n formatOffset = 0;\r\n while (formatOffset < formatParams.length)\r\n formatParams[formatOffset] = arguments[++formatOffset];\r\n formatOffset = 0;\r\n formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {\r\n var value = formatParams[formatOffset++];\r\n switch ($1) {\r\n case \"d\": case \"f\": return String(Number(value));\r\n case \"i\": return String(Math.floor(value));\r\n case \"j\": return JSON.stringify(value);\r\n case \"s\": return String(value);\r\n }\r\n return \"%\";\r\n });\r\n if (formatOffset !== formatParams.length)\r\n throw Error(\"parameter count mismatch\");\r\n body.push(formatStringOrScope);\r\n return Codegen;\r\n }\r\n\r\n function toString(functionNameOverride) {\r\n return \"function \" + safeFunctionName(functionNameOverride || functionName) + \"(\" + (functionParams && functionParams.join(\",\") || \"\") + \"){\\n \" + body.join(\"\\n \") + \"\\n}\";\r\n }\r\n\r\n Codegen.toString = toString;\r\n return Codegen;\r\n}\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @function codegen\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * When set to `true`, codegen will log generated code to console. Useful for debugging.\r\n * @name util.codegen.verbose\r\n * @type {boolean}\r\n */\r\ncodegen.verbose = false;\r\n\r\nfunction safeFunctionName(name) {\r\n if (!name)\r\n return \"\";\r\n name = String(name).replace(/[^\\w$]/g, \"\");\r\n if (!name)\r\n return \"\";\r\n if (/^\\d/.test(name))\r\n name = \"_\" + name;\r\n return reservedRe.test(name) ? name + \"_\" : name;\r\n}\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = Object.create(null);\r\n}\r\n\r\n/**\r\n * Event listener as used by {@link util.EventEmitter}.\r\n * @typedef EventEmitterListener\r\n * @type {function}\r\n * @param {...*} args Arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {EventEmitterListener} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {EventEmitterListener} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = Object.create(null);\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n if (!listeners)\r\n return this;\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n fs = require(6);\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Options as used by {@link util.fetch}.\r\n * @interface IFetchOptions\r\n * @property {boolean} [binary=false] Whether expecting a binary response\r\n * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} filename File path or url\r\n * @param {IFetchOptions} options Fetch options\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction fetch(filename, options, callback) {\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = {};\r\n } else if (!options)\r\n options = {};\r\n\r\n if (!callback)\r\n return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this\r\n\r\n // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found.\r\n if (!options.xhr && fs && fs.readFile)\r\n return fs.readFile(filename, function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch.xhr(filename, options, callback)\r\n : err\r\n ? callback(err)\r\n : callback(null, options.binary ? contents : contents.toString(\"utf8\"));\r\n });\r\n\r\n // use the XHR version otherwise.\r\n return fetch.xhr(filename, options, callback);\r\n}\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {IFetchOptions} [options] Fetch options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n\r\n/**/\r\nfetch.xhr = function fetch_xhr(filename, options, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n\r\n if (xhr.readyState !== 4)\r\n return undefined;\r\n\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n if (xhr.status !== 0 && xhr.status !== 200)\r\n return callback(Error(\"status \" + xhr.status));\r\n\r\n // if binary data is expected, make sure that some sort of array is returned, even if\r\n // ArrayBuffers are not supported. the binary string fallback, however, is unsafe.\r\n if (options.binary) {\r\n var buffer = xhr.response;\r\n if (!buffer) {\r\n buffer = [];\r\n for (var i = 0; i < xhr.responseText.length; ++i)\r\n buffer.push(xhr.responseText.charCodeAt(i) & 255);\r\n }\r\n return callback(null, typeof Uint8Array !== \"undefined\" ? new Uint8Array(buffer) : buffer);\r\n }\r\n return callback(null, xhr.responseText);\r\n };\r\n\r\n if (options.binary) {\r\n // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers\r\n if (\"overrideMimeType\" in xhr)\r\n xhr.overrideMimeType(\"text/plain; charset=x-user-defined\");\r\n xhr.responseType = \"arraybuffer\";\r\n }\r\n\r\n xhr.open(\"GET\", filename);\r\n xhr.send();\r\n};\r\n","\"use strict\";\r\n\r\nvar fs = null;\r\ntry {\r\n fs = require(12);\r\n if (!fs || !fs.readFile || !fs.readFileSync)\r\n fs = null;\r\n} catch (e) {\r\n // `fs` is unavailable in browsers and browser-like bundles.\r\n}\r\nmodule.exports = fs;\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n * @deprecated Legacy optional require helper. Will be removed in a future release.\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n if (typeof require !== \"function\") {\r\n return null;\r\n }\r\n var mod = require(moduleName);\r\n if (mod && (mod.length || Object.keys(mod).length)) return mod;\r\n return null;\r\n } catch (err) {\r\n // ignore\r\n return null;\r\n }\r\n}\r\n\r\n/*\r\n// maybe worth a shot to prevent renaming issues:\r\n// see: https://github.com/webpack/webpack/blob/master/lib/dependencies/CommonJsRequireDependencyParserPlugin.js\r\n// triggers on:\r\n// - expression require.cache\r\n// - expression require (???)\r\n// - call require\r\n// - call require:commonjs:item\r\n// - call require:commonjs:context\r\n\r\nObject.defineProperty(Function.prototype, \"__self\", { get: function() { return this; } });\r\nvar r = require.__self;\r\ndelete Function.prototype.__self;\r\n*/\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0 && parts[i - 1] !== \"..\")\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\r\n};\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports,\r\n replacementChar = \"\\ufffd\";\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n if (end - start < 1) {\r\n return \"\";\r\n }\r\n\r\n var str = \"\";\r\n for (var i = start; i < end;) {\r\n var t = buffer[i++];\r\n if (t <= 0x7F) {\r\n str += String.fromCharCode(t);\r\n } else if (t >= 0xC0 && t < 0xE0) {\r\n var c2 = (t & 0x1F) << 6 | buffer[i++] & 0x3F;\r\n str += c2 >= 0x80 ? String.fromCharCode(c2) : replacementChar;\r\n } else if (t >= 0xE0 && t < 0xF0) {\r\n var c3 = (t & 0xF) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F;\r\n str += c3 >= 0x800 ? String.fromCharCode(c3) : replacementChar;\r\n } else if (t >= 0xF0) {\r\n var t2 = (t & 7) << 18 | (buffer[i++] & 0x3F) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F;\r\n if (t2 < 0x10000 || t2 > 0x10FFFF)\r\n str += replacementChar;\r\n else {\r\n t2 -= 0x10000;\r\n str += String.fromCharCode(0xD800 + (t2 >> 10));\r\n str += String.fromCharCode(0xDC00 + (t2 & 0x3FF));\r\n }\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","","\"use strict\";\nmodule.exports = common;\n\nvar commonRe = /\\/|\\./;\n\n/**\n * Provides common type definitions.\n * Can also be used to provide additional google types or your own custom types.\n * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name\n * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition\n * @returns {undefined}\n * @property {INamespace} google/protobuf/any.proto Any\n * @property {INamespace} google/protobuf/duration.proto Duration\n * @property {INamespace} google/protobuf/empty.proto Empty\n * @property {INamespace} google/protobuf/field_mask.proto FieldMask\n * @property {INamespace} google/protobuf/struct.proto Struct, Value, NullValue and ListValue\n * @property {INamespace} google/protobuf/timestamp.proto Timestamp\n * @property {INamespace} google/protobuf/wrappers.proto Wrappers\n * @example\n * // manually provides descriptor.proto (assumes google/protobuf/ namespace and .proto extension)\n * protobuf.common(\"descriptor\", descriptorJson);\n *\n * // manually provides a custom definition (uses my.foo namespace)\n * protobuf.common(\"my/foo/bar.proto\", myFooBarJson);\n */\nfunction common(name, json) {\n if (!commonRe.test(name)) {\n name = \"google/protobuf/\" + name + \".proto\";\n json = { nested: { google: { nested: { protobuf: { nested: json } } } } };\n }\n common[name] = json;\n}\n\n// Not provided because of limited use (feel free to discuss or to provide yourself):\n//\n// google/protobuf/descriptor.proto\n// google/protobuf/source_context.proto\n// google/protobuf/type.proto\n//\n// Stripped and pre-parsed versions of these non-bundled files are instead available as part of\n// the repository or package within the google/protobuf directory.\n\ncommon(\"any\", {\n\n /**\n * Properties of a google.protobuf.Any message.\n * @interface IAny\n * @type {Object}\n * @property {string} [typeUrl]\n * @property {Uint8Array} [bytes]\n * @memberof common\n */\n Any: {\n fields: {\n type_url: {\n type: \"string\",\n id: 1\n },\n value: {\n type: \"bytes\",\n id: 2\n }\n }\n }\n});\n\nvar timeType;\n\ncommon(\"duration\", {\n\n /**\n * Properties of a google.protobuf.Duration message.\n * @interface IDuration\n * @type {Object}\n * @property {number|Long} [seconds]\n * @property {number} [nanos]\n * @memberof common\n */\n Duration: timeType = {\n fields: {\n seconds: {\n type: \"int64\",\n id: 1\n },\n nanos: {\n type: \"int32\",\n id: 2\n }\n }\n }\n});\n\ncommon(\"timestamp\", {\n\n /**\n * Properties of a google.protobuf.Timestamp message.\n * @interface ITimestamp\n * @type {Object}\n * @property {number|Long} [seconds]\n * @property {number} [nanos]\n * @memberof common\n */\n Timestamp: timeType\n});\n\ncommon(\"empty\", {\n\n /**\n * Properties of a google.protobuf.Empty message.\n * @interface IEmpty\n * @memberof common\n */\n Empty: {\n fields: {}\n }\n});\n\ncommon(\"struct\", {\n\n /**\n * Properties of a google.protobuf.Struct message.\n * @interface IStruct\n * @type {Object}\n * @property {Object.} [fields]\n * @memberof common\n */\n Struct: {\n fields: {\n fields: {\n keyType: \"string\",\n type: \"Value\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Value message.\n * @interface IValue\n * @type {Object}\n * @property {string} [kind]\n * @property {0} [nullValue]\n * @property {number} [numberValue]\n * @property {string} [stringValue]\n * @property {boolean} [boolValue]\n * @property {IStruct} [structValue]\n * @property {IListValue} [listValue]\n * @memberof common\n */\n Value: {\n oneofs: {\n kind: {\n oneof: [\n \"nullValue\",\n \"numberValue\",\n \"stringValue\",\n \"boolValue\",\n \"structValue\",\n \"listValue\"\n ]\n }\n },\n fields: {\n nullValue: {\n type: \"NullValue\",\n id: 1\n },\n numberValue: {\n type: \"double\",\n id: 2\n },\n stringValue: {\n type: \"string\",\n id: 3\n },\n boolValue: {\n type: \"bool\",\n id: 4\n },\n structValue: {\n type: \"Struct\",\n id: 5\n },\n listValue: {\n type: \"ListValue\",\n id: 6\n }\n }\n },\n\n NullValue: {\n values: {\n NULL_VALUE: 0\n }\n },\n\n /**\n * Properties of a google.protobuf.ListValue message.\n * @interface IListValue\n * @type {Object}\n * @property {Array.} [values]\n * @memberof common\n */\n ListValue: {\n fields: {\n values: {\n rule: \"repeated\",\n type: \"Value\",\n id: 1\n }\n }\n }\n});\n\ncommon(\"wrappers\", {\n\n /**\n * Properties of a google.protobuf.DoubleValue message.\n * @interface IDoubleValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n DoubleValue: {\n fields: {\n value: {\n type: \"double\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.FloatValue message.\n * @interface IFloatValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n FloatValue: {\n fields: {\n value: {\n type: \"float\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Int64Value message.\n * @interface IInt64Value\n * @type {Object}\n * @property {number|Long} [value]\n * @memberof common\n */\n Int64Value: {\n fields: {\n value: {\n type: \"int64\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.UInt64Value message.\n * @interface IUInt64Value\n * @type {Object}\n * @property {number|Long} [value]\n * @memberof common\n */\n UInt64Value: {\n fields: {\n value: {\n type: \"uint64\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Int32Value message.\n * @interface IInt32Value\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n Int32Value: {\n fields: {\n value: {\n type: \"int32\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.UInt32Value message.\n * @interface IUInt32Value\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n UInt32Value: {\n fields: {\n value: {\n type: \"uint32\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.BoolValue message.\n * @interface IBoolValue\n * @type {Object}\n * @property {boolean} [value]\n * @memberof common\n */\n BoolValue: {\n fields: {\n value: {\n type: \"bool\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.StringValue message.\n * @interface IStringValue\n * @type {Object}\n * @property {string} [value]\n * @memberof common\n */\n StringValue: {\n fields: {\n value: {\n type: \"string\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.BytesValue message.\n * @interface IBytesValue\n * @type {Object}\n * @property {Uint8Array} [value]\n * @memberof common\n */\n BytesValue: {\n fields: {\n value: {\n type: \"bytes\",\n id: 1\n }\n }\n }\n});\n\ncommon(\"field_mask\", {\n\n /**\n * Properties of a google.protobuf.FieldMask message.\n * @interface IDoubleValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n FieldMask: {\n fields: {\n paths: {\n rule: \"repeated\",\n type: \"string\",\n id: 1\n }\n }\n }\n});\n\n/**\n * Gets the root definition of the specified common proto file.\n *\n * Bundled definitions are:\n * - google/protobuf/any.proto\n * - google/protobuf/duration.proto\n * - google/protobuf/empty.proto\n * - google/protobuf/field_mask.proto\n * - google/protobuf/struct.proto\n * - google/protobuf/timestamp.proto\n * - google/protobuf/wrappers.proto\n *\n * @param {string} file Proto file name\n * @returns {INamespace|null} Root definition or `null` if not defined\n */\ncommon.get = function get(file) {\n return common[file] || null;\n};\n","\"use strict\";\n/**\n * Runtime message from/to plain object converters.\n * @namespace\n */\nvar converter = exports;\n\nvar Enum = require(17),\n util = require(39);\n\n/**\n * Generates a partial value fromObject conveter.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} prop Property reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genValuePartial_fromObject(gen, field, fieldIndex, prop) {\n var defaultAlreadyEmitted = false;\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(d%s){\", prop);\n for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) {\n // enum unknown values passthrough\n if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen\n (\"default:\")\n (\"if(typeof(d%s)===\\\"number\\\"){m%s=d%s;break}\", prop, prop, prop);\n if (!field.repeated) gen // fallback to default value only for\n // arrays, to avoid leaving holes.\n (\"break\"); // for non-repeated fields, just ignore\n defaultAlreadyEmitted = true;\n }\n gen\n (\"case%j:\", keys[i])\n (\"case %i:\", values[keys[i]])\n (\"m%s=%j\", prop, values[keys[i]])\n (\"break\");\n } gen\n (\"}\");\n } else gen\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s=types[%i].fromObject(d%s,n+1)\", prop, fieldIndex, prop);\n } else {\n var isUnsigned = false;\n switch (field.type) {\n case \"double\":\n case \"float\": gen\n (\"m%s=Number(d%s)\", prop, prop); // also catches \"NaN\", \"Infinity\"\n break;\n case \"uint32\":\n case \"fixed32\": gen\n (\"m%s=d%s>>>0\", prop, prop);\n break;\n case \"int32\":\n case \"sint32\":\n case \"sfixed32\": gen\n (\"m%s=d%s|0\", prop, prop);\n break;\n case \"uint64\":\n case \"fixed64\":\n isUnsigned = true;\n // eslint-disable-next-line no-fallthrough\n case \"int64\":\n case \"sint64\":\n case \"sfixed64\": gen\n (\"if(util.Long)\")\n (\"m%s=util.Long.fromValue(d%s,%j)\", prop, prop, isUnsigned)\n (\"else if(typeof d%s===\\\"string\\\")\", prop)\n (\"m%s=parseInt(d%s,10)\", prop, prop)\n (\"else if(typeof d%s===\\\"number\\\")\", prop)\n (\"m%s=d%s\", prop, prop)\n (\"else if(typeof d%s===\\\"object\\\")\", prop)\n (\"m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)\", prop, prop, prop, isUnsigned ? \"true\" : \"\");\n break;\n case \"bytes\": gen\n (\"if(typeof d%s===\\\"string\\\")\", prop)\n (\"util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)\", prop, prop, prop)\n (\"else if(d%s.length >= 0)\", prop)\n (\"m%s=d%s\", prop, prop);\n break;\n case \"string\": gen\n (\"m%s=String(d%s)\", prop, prop);\n break;\n case \"bool\": gen\n (\"m%s=Boolean(d%s)\", prop, prop);\n break;\n /* default: gen\n (\"m%s=d%s\", prop, prop);\n break; */\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a plain object to runtime message converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.fromObject = function fromObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray;\n var gen = util.codegen([\"d\", \"n\"], mtype.name + \"$fromObject\")\n (\"if(d instanceof this.ctor)\")\n (\"return d\")\n (\"if(n===undefined)n=0\")\n (\"if(n>util.recursionLimit)\")\n (\"throw Error(\\\"maximum nesting depth exceeded\\\")\");\n if (!fields.length) return gen\n (\"return new this.ctor\");\n gen\n (\"var m=new this.ctor\");\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n prop = util.safeProp(field.name);\n\n // Map fields\n if (field.map) { gen\n (\"if(d%s){\", prop)\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s={}\", prop)\n (\"for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0,%j).toBigInt()\", prop, prop, prop, prop, prop, isUnsigned)\n (\"else if(typeof m%s===\\\"number\\\")\", prop)\n (\"d%s=o.longs===String?String(m%s):m%s\", prop, prop, prop)\n (\"else\") // Long-like\n (\"d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s\", prop, prop, prop, prop, isUnsigned ? \"true\": \"\", prop);\n break;\n case \"bytes\": gen\n (\"d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s\", prop, prop, prop, prop, prop);\n break;\n default: gen\n (\"d%s=m%s\", prop, prop);\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a runtime message to plain object converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.toObject = function toObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById);\n if (!fields.length)\n return util.codegen()(\"return {}\");\n var gen = util.codegen([\"m\", \"o\", \"q\"], mtype.name + \"$toObject\")\n (\"if(!o)\")\n (\"o={}\")\n (\"if(q===undefined)q=0\")\n (\"if(q>util.recursionLimit)\")\n (\"throw Error(\\\"max depth exceeded\\\")\")\n (\"var d={}\");\n\n var repeatedFields = [],\n mapFields = [],\n normalFields = [],\n i = 0;\n for (; i < fields.length; ++i)\n if (!fields[i].partOf)\n ( fields[i].resolve().repeated ? repeatedFields\n : fields[i].map ? mapFields\n : normalFields).push(fields[i]);\n\n if (repeatedFields.length) { gen\n (\"if(o.arrays||o.defaults){\");\n for (i = 0; i < repeatedFields.length; ++i) gen\n (\"d%s=[]\", util.safeProp(repeatedFields[i].name));\n gen\n (\"}\");\n }\n\n if (mapFields.length) { gen\n (\"if(o.objects||o.defaults){\");\n for (i = 0; i < mapFields.length; ++i) gen\n (\"d%s={}\", util.safeProp(mapFields[i].name));\n gen\n (\"}\");\n }\n\n if (normalFields.length) { gen\n (\"if(o.defaults){\");\n for (i = 0; i < normalFields.length; ++i) {\n var field = normalFields[i],\n prop = util.safeProp(field.name);\n if (field.resolvedType instanceof Enum) gen\n (\"d%s=o.enums===String?%j:%j\", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);\n else if (field.long) gen\n (\"if(util.Long){\")\n (\"var n=new util.Long(%i,%i,%j)\", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)\n (\"d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!==\\\"undefined\\\"&&o.longs===BigInt?n.toBigInt():n\", prop)\n (\"}else\")\n (\"d%s=o.longs===String?%j:typeof BigInt!==\\\"undefined\\\"&&o.longs===BigInt?BigInt(%j):%i\", prop, field.typeDefault.toString(), field.typeDefault.toString(), field.typeDefault.toNumber());\n else if (field.bytes) {\n var arrayDefault = Array.prototype.slice.call(field.typeDefault);\n gen\n (\"if(o.bytes===String)d%s=%j\", prop, String.fromCharCode.apply(String, field.typeDefault))\n (\"else{\")\n (\"d%s=%j\", prop, arrayDefault)\n (\"if(o.bytes!==Array)d%s=util.newBuffer(d%s)\", prop, prop)\n (\"}\");\n } else gen\n (\"d%s=%j\", prop, field.typeDefault); // also messages (=null)\n } gen\n (\"}\");\n }\n var hasKs2 = false;\n for (i = 0; i < fields.length; ++i) {\n var field = fields[i],\n index = mtype._fieldsArray.indexOf(field),\n prop = util.safeProp(field.name);\n if (field.map) {\n if (!hasKs2) { hasKs2 = true; gen\n (\"var ks2\");\n } gen\n (\"if(m%s&&(ks2=Object.keys(m%s)).length){\", prop, prop)\n (\"d%s={}\", prop)\n (\"for(var j=0;jReader.recursionLimit)\")\n (\"throw Error(\\\"maximum nesting depth exceeded\\\")\")\n (\"var c=l===undefined?r.len:r.pos+l,m=new this.ctor\" + (mtype.fieldsArray.filter(function(field) { return field.map; }).length ? \",k,value\" : \"\"))\n (\"while(r.pos>>3){\");\n\n var i = 0;\n for (; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n ref = \"m\" + util.safeProp(field.name); gen\n (\"case %i: {\", field.id);\n\n // Map fields\n if (field.map) { gen\n (\"if(%s===util.emptyObject)\", ref)\n (\"%s={}\", ref)\n (\"var c2 = r.uint32()+r.pos\");\n\n if (types.defaults[field.keyType] !== undefined) gen\n (\"k=%j\", types.defaults[field.keyType]);\n else gen\n (\"k=null\");\n\n if (types.defaults[type] !== undefined) gen\n (\"value=%j\", types.defaults[type]);\n else gen\n (\"value=null\");\n\n gen\n (\"while(r.pos>>3){\")\n (\"case 1: k=r.%s(); break\", field.keyType)\n (\"case 2:\");\n\n if (types.basic[type] === undefined) gen\n (\"value=types[%i].decode(r,r.uint32(),undefined,n+1)\", i); // can't be groups\n else gen\n (\"value=r.%s()\", type);\n\n gen\n (\"break\")\n (\"default:\")\n (\"r.skipType(tag2&7,n)\")\n (\"break\")\n (\"}\")\n (\"}\");\n\n if (types.long[field.keyType] !== undefined) gen\n (\"%s[typeof k===\\\"object\\\"?util.longToHash(k):k]=value\", ref);\n else {\n if (field.keyType === \"string\") gen\n (\"if(k===\\\"__proto__\\\")\")\n (\"util.makeProp(%s,k)\", ref);\n gen\n (\"%s[k]=value\", ref);\n }\n\n // Repeated fields\n } else if (field.repeated) { gen\n\n (\"if(!(%s&&%s.length))\", ref, ref)\n (\"%s=[]\", ref);\n\n // Packable (always check for forward and backward compatiblity)\n if (types.packed[type] !== undefined) gen\n (\"if((t&7)===2){\")\n (\"var c2=r.uint32()+r.pos\")\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\n : gen(\"types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\n}\n\n/**\n * Generates an encoder specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction encoder(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var gen = util.codegen([\"m\", \"w\", \"q\"], mtype.name + \"$encode\")\n (\"if(!w)\")\n (\"w=Writer.create()\")\n (\"if(q===undefined)q=0\")\n (\"if(q>util.recursionLimit)\")\n (\"throw Error(\\\"max depth exceeded\\\")\");\n\n var i, ref;\n\n // \"when a message is serialized its known fields should be written sequentially by field number\"\n var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById);\n\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n index = mtype._fieldsArray.indexOf(field),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n wireType = types.basic[type];\n ref = \"m\" + util.safeProp(field.name);\n\n // Map fields\n if (field.map) {\n gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j)){\", ref, field.name) // !== undefined && !== null\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType);\n if (wireType === undefined) gen\n (\"types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()\", index, ref); // can't be groups\n else gen\n (\".uint32(%i).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\n gen\n (\"}\")\n (\"}\");\n\n // Repeated fields\n } else if (field.repeated) { gen\n (\"if(%s!=null&&%s.length){\", ref, ref); // !== undefined && !== null\n\n // Packed repeated\n if (field.packed && types.packed[type] !== undefined) { gen\n\n (\"w.uint32(%i).fork()\", (field.id << 3 | 2) >>> 0)\n (\"for(var i=0;i<%s.length;++i)\", ref)\n (\"w.%s(%s[i])\", type, ref)\n (\"w.ldelim()\");\n\n // Non-packed\n } else { gen\n\n (\"for(var i=0;i<%s.length;++i)\", ref);\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref + \"[i]\");\n else gen\n (\"w.uint32(%i).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n } gen\n (\"}\");\n\n // Non-repeated\n } else {\n if (field.optional) gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j))\", ref, field.name); // !== undefined && !== null\n\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref);\n else gen\n (\"w.uint32(%i).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n }\n }\n\n return gen\n (\"return w\");\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n","\"use strict\";\nmodule.exports = Enum;\n\n// extends ReflectionObject\nvar ReflectionObject = require(26);\n((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = \"Enum\";\n\nvar Namespace = require(25),\n util = require(39);\n\n/**\n * Constructs a new enum instance.\n * @classdesc Reflected enum.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {Object.} [values] Enum values as an object, by name\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this enum\n * @param {Object.} [comments] The value comments for this enum\n * @param {Object.>|undefined} [valuesOptions] The value options for this enum\n */\nfunction Enum(name, values, options, comment, comments, valuesOptions) {\n ReflectionObject.call(this, name, options);\n\n if (values && typeof values !== \"object\")\n throw TypeError(\"values must be an object\");\n\n /**\n * Enum values by id.\n * @type {Object.}\n */\n this.valuesById = {};\n\n /**\n * Enum values by name.\n * @type {Object.}\n */\n this.values = Object.create(this.valuesById); // toJSON, marker\n\n /**\n * Enum comment text.\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Value comment texts, if any.\n * @type {Object.}\n */\n this.comments = comments || {};\n\n /**\n * Values options, if any\n * @type {Object>|undefined}\n */\n this.valuesOptions = valuesOptions;\n\n /**\n * Resolved values features, if any\n * @type {Object>|undefined}\n */\n this._valuesFeatures = {};\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\n // compatible enum. This is used by pbts to write actual enum definitions that work for\n // static and reflection code alike instead of emitting generic object definitions.\n\n if (values)\n for (var keys = Object.keys(values), i = 0; i < keys.length; ++i)\n if (keys[i] !== \"__proto__\" && typeof values[keys[i]] === \"number\") // use forward entries only\n this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i];\n}\n\n/**\n * @override\n */\nEnum.prototype._resolveFeatures = function _resolveFeatures(edition) {\n edition = this._edition || edition;\n ReflectionObject.prototype._resolveFeatures.call(this, edition);\n\n Object.keys(this.values).forEach(key => {\n var parentFeaturesCopy = util.merge({}, this._features);\n this._valuesFeatures[key] = util.merge(parentFeaturesCopy, this.valuesOptions && this.valuesOptions[key] && this.valuesOptions[key].features || {});\n });\n\n return this;\n};\n\n/**\n * Enum descriptor.\n * @interface IEnum\n * @property {Object.} values Enum values\n * @property {Object.} [options] Enum options\n */\n\n/**\n * Constructs an enum from an enum descriptor.\n * @param {string} name Enum name\n * @param {IEnum} json Enum descriptor\n * @returns {Enum} Created enum\n * @throws {TypeError} If arguments are invalid\n */\nEnum.fromJSON = function fromJSON(name, json) {\n var enm = new Enum(name, json.values, json.options, json.comment, json.comments);\n enm.reserved = json.reserved;\n if (json.edition)\n enm._edition = json.edition;\n enm._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return enm;\n};\n\n/**\n * Converts this enum to an enum descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IEnum} Enum descriptor\n */\nEnum.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"options\" , this.options,\n \"valuesOptions\" , this.valuesOptions,\n \"values\" , this.values,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"comment\" , keepComments ? this.comment : undefined,\n \"comments\" , keepComments ? this.comments : undefined\n ]);\n};\n\n/**\n * Adds a value to this enum.\n * @param {string} name Value name\n * @param {number} id Value id\n * @param {string} [comment] Comment, if any\n * @param {Object.|undefined} [options] Options, if any\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a value with this name or id\n */\nEnum.prototype.add = function add(name, id, comment, options) {\n // utilized by the parser but not by .fromJSON\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (!util.isInteger(id))\n throw TypeError(\"id must be an integer\");\n\n if (name === \"__proto__\")\n return this;\n\n if (this.values[name] !== undefined)\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\n\n if (this.isReservedId(id))\n throw Error(\"id \" + id + \" is reserved in \" + this);\n\n if (this.isReservedName(name))\n throw Error(\"name '\" + name + \"' is reserved in \" + this);\n\n if (this.valuesById[id] !== undefined) {\n if (!(this.options && this.options.allow_alias))\n throw Error(\"duplicate id \" + id + \" in \" + this);\n this.values[name] = id;\n } else\n this.valuesById[this.values[name] = id] = name;\n\n if (options) {\n if (this.valuesOptions === undefined)\n this.valuesOptions = {};\n this.valuesOptions[name] = options || null;\n }\n\n this.comments[name] = comment || null;\n return this;\n};\n\n/**\n * Removes a value from this enum\n * @param {string} name Value name\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `name` is not a name of this enum\n */\nEnum.prototype.remove = function remove(name) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n var val = this.values[name];\n if (val == null)\n throw Error(\"name '\" + name + \"' does not exist in \" + this);\n\n delete this.valuesById[val];\n delete this.values[name];\n delete this.comments[name];\n if (this.valuesOptions)\n delete this.valuesOptions[name];\n\n return this;\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n","\"use strict\";\nmodule.exports = Field;\n\n// extends ReflectionObject\nvar ReflectionObject = require(26);\n((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = \"Field\";\n\nvar Enum = require(17),\n types = require(38),\n util = require(39);\n\nvar Type; // cyclic\n\nvar ruleRe = /^required|optional|repeated$/;\n\n/**\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\n * @name Field\n * @classdesc Reflected message field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a field from a field descriptor.\n * @param {string} name Field name\n * @param {IField} json Field descriptor\n * @returns {Field} Created field\n * @throws {TypeError} If arguments are invalid\n */\nField.fromJSON = function fromJSON(name, json) {\n var field = new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment);\n if (json.edition)\n field._edition = json.edition;\n field._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return field;\n};\n\n/**\n * Not an actual constructor. Use {@link Field} instead.\n * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports FieldBase\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction Field(name, id, type, rule, extend, options, comment) {\n\n if (util.isObject(rule)) {\n comment = extend;\n options = rule;\n rule = extend = undefined;\n } else if (util.isObject(extend)) {\n comment = options;\n options = extend;\n extend = undefined;\n }\n\n ReflectionObject.call(this, name, options);\n\n if (!util.isInteger(id) || id < 0)\n throw TypeError(\"id must be a non-negative integer\");\n\n if (!util.isString(type))\n throw TypeError(\"type must be a string\");\n\n if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase()))\n throw TypeError(\"rule must be a string rule\");\n\n if (extend !== undefined && !util.isString(extend))\n throw TypeError(\"extend must be a string\");\n\n /**\n * Field rule, if any.\n * @type {string|undefined}\n */\n if (rule === \"proto3_optional\") {\n rule = \"optional\";\n }\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\n\n /**\n * Field type.\n * @type {string}\n */\n this.type = type; // toJSON\n\n /**\n * Unique field id.\n * @type {number}\n */\n this.id = id; // toJSON, marker\n\n /**\n * Extended type if different from parent.\n * @type {string|undefined}\n */\n this.extend = extend || undefined; // toJSON\n\n /**\n * Whether this field is repeated.\n * @type {boolean}\n */\n this.repeated = rule === \"repeated\";\n\n /**\n * Whether this field is a map or not.\n * @type {boolean}\n */\n this.map = false;\n\n /**\n * Message this field belongs to.\n * @type {Type|null}\n */\n this.message = null;\n\n /**\n * OneOf this field belongs to, if any,\n * @type {OneOf|null}\n */\n this.partOf = null;\n\n /**\n * The field type's default value.\n * @type {*}\n */\n this.typeDefault = null;\n\n /**\n * The field's default value on prototypes.\n * @type {*}\n */\n this.defaultValue = null;\n\n /**\n * Whether this field's value should be treated as a long.\n * @type {boolean}\n */\n this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false;\n\n /**\n * Whether this field's value is a buffer.\n * @type {boolean}\n */\n this.bytes = type === \"bytes\";\n\n /**\n * Resolved type if not a basic type.\n * @type {Type|Enum|null}\n */\n this.resolvedType = null;\n\n /**\n * Sister-field within the extended type if a declaring extension field.\n * @type {Field|null}\n */\n this.extensionField = null;\n\n /**\n * Sister-field within the declaring namespace if an extended field.\n * @type {Field|null}\n */\n this.declaringField = null;\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Determines whether this field is required.\n * @name Field#required\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"required\", {\n get: function() {\n return this._features.field_presence === \"LEGACY_REQUIRED\";\n }\n});\n\n/**\n * Determines whether this field is not required.\n * @name Field#optional\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"optional\", {\n get: function() {\n return !this.required;\n }\n});\n\n/**\n * Determines whether this field uses tag-delimited encoding. In proto2 this\n * corresponded to group syntax.\n * @name Field#delimited\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"delimited\", {\n get: function() {\n return this.resolvedType instanceof Type &&\n this._features.message_encoding === \"DELIMITED\";\n }\n});\n\n/**\n * Determines whether this field is packed. Only relevant when repeated.\n * @name Field#packed\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"packed\", {\n get: function() {\n return this._features.repeated_field_encoding === \"PACKED\";\n }\n});\n\n/**\n * Determines whether this field tracks presence.\n * @name Field#hasPresence\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"hasPresence\", {\n get: function() {\n if (this.repeated || this.map) {\n return false;\n }\n return this.partOf || // oneofs\n this.declaringField || this.extensionField || // extensions\n this._features.field_presence !== \"IMPLICIT\";\n }\n});\n\n/**\n * @override\n */\nField.prototype.setOption = function setOption(name, value, ifNotSet) {\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\n};\n\n/**\n * Field descriptor.\n * @interface IField\n * @property {string} [rule=\"optional\"] Field rule\n * @property {string} type Field type\n * @property {number} id Field id\n * @property {Object.} [options] Field options\n */\n\n/**\n * Extension field descriptor.\n * @interface IExtensionField\n * @extends IField\n * @property {string} extend Extended type\n */\n\n/**\n * Converts this field to a field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IField} Field descriptor\n */\nField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"rule\" , this.rule !== \"optional\" && this.rule || undefined,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Resolves this field's type references.\n * @returns {Field} `this`\n * @throws {Error} If any reference cannot be resolved\n */\nField.prototype.resolve = function resolve() {\n\n if (this.resolved)\n return this;\n\n if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it\n this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type);\n if (this.resolvedType instanceof Type)\n this.typeDefault = null;\n else // instanceof Enum\n this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined\n } else if (this.options && this.options.proto3_optional) {\n // proto3 scalar value marked optional; should default to null\n this.typeDefault = null;\n }\n\n // use explicitly set default value if present\n if (this.options && this.options[\"default\"] != null) {\n this.typeDefault = this.options[\"default\"];\n if (this.resolvedType instanceof Enum && typeof this.typeDefault === \"string\")\n this.typeDefault = this.resolvedType.values[this.typeDefault];\n }\n\n // remove unnecessary options\n if (this.options) {\n if (this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum))\n delete this.options.packed;\n if (!Object.keys(this.options).length)\n this.options = undefined;\n }\n\n // convert to internal data type if necesssary\n if (this.long) {\n this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type === \"uint64\" || this.type === \"fixed64\");\n\n /* istanbul ignore else */\n if (Object.freeze)\n Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\n\n } else if (this.bytes && typeof this.typeDefault === \"string\") {\n var buf;\n if (util.base64.test(this.typeDefault))\n util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0);\n else\n util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0);\n this.typeDefault = buf;\n }\n\n // take special care of maps and repeated fields\n if (this.map)\n this.defaultValue = util.emptyObject;\n else if (this.repeated)\n this.defaultValue = util.emptyArray;\n else\n this.defaultValue = this.typeDefault;\n\n // ensure proper value on prototype\n if (this.parent instanceof Type)\n this.parent.ctor.prototype[this.name] = this.defaultValue;\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n\n/**\n * Infers field features from legacy syntax that may have been specified differently.\n * in older editions.\n * @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions\n * @returns {object} The feature values to override\n */\nField.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(edition) {\n if (edition !== \"proto2\" && edition !== \"proto3\") {\n return {};\n }\n\n var features = {};\n\n if (this.rule === \"required\") {\n features.field_presence = \"LEGACY_REQUIRED\";\n }\n if (this.parent && types.defaults[this.type] === undefined) {\n // We can't use resolvedType because types may not have been resolved yet. However,\n // legacy groups are always in the same scope as the field so we don't have to do a\n // full scan of the tree.\n var type = this.parent.get(this.type.split(\".\").pop());\n if (type && type instanceof Type && type.group) {\n features.message_encoding = \"DELIMITED\";\n }\n }\n if (this.getOption(\"packed\") === true) {\n features.repeated_field_encoding = \"PACKED\";\n } else if (this.getOption(\"packed\") === false) {\n features.repeated_field_encoding = \"EXPANDED\";\n }\n return features;\n};\n\n/**\n * @override\n */\nField.prototype._resolveFeatures = function _resolveFeatures(edition) {\n return ReflectionObject.prototype._resolveFeatures.call(this, this._edition || edition);\n};\n\n/**\n * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript).\n * @typedef FieldDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} fieldName Field name\n * @returns {undefined}\n */\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"string\"|\"bool\"|\"bytes\"|Object} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @param {T} [defaultValue] Default value\n * @returns {FieldDecorator} Decorator function\n * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[]\n */\nField.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) {\n\n // submessage: decorate the submessage and use its name as the type\n if (typeof fieldType === \"function\")\n fieldType = util.decorateType(fieldType).name;\n\n // enum reference: create a reflected copy of the enum and keep reuseing it\n else if (fieldType && typeof fieldType === \"object\")\n fieldType = util.decorateEnum(fieldType).name;\n\n return function fieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new Field(fieldName, fieldId, fieldType, fieldRule, { \"default\": defaultValue }));\n };\n};\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {Constructor|string} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @returns {FieldDecorator} Decorator function\n * @template T extends Message\n * @variation 2\n */\n// like Field.d but without a default value\n\n// Sets up cyclic dependencies (called in index-light)\nField._configure = function configure(Type_) {\n Type = Type_;\n};\n","\"use strict\";\nvar protobuf = module.exports = require(20);\n\nprotobuf.build = \"light\";\n\n/**\n * A node-style callback as used by {@link load} and {@link Root#load}.\n * @typedef LoadCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Root} [root] Root, if there hasn't been an error\n * @returns {undefined}\n */\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n */\nfunction load(filename, root, callback) {\n if (typeof root === \"function\") {\n callback = root;\n root = new protobuf.Root();\n } else if (!root)\n root = new protobuf.Root();\n return root.load(filename, callback);\n}\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Promise} Promise\n * @see {@link Root#load}\n * @variation 3\n */\n// function load(filename:string, [root:Root]):Promise\n\nprotobuf.load = load;\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n * @see {@link Root#loadSync}\n */\nfunction loadSync(filename, root) {\n if (!root)\n root = new protobuf.Root();\n return root.loadSync(filename);\n}\n\nprotobuf.loadSync = loadSync;\n\n// Serialization\nprotobuf.encoder = require(16);\nprotobuf.decoder = require(15);\nprotobuf.verifier = require(44);\nprotobuf.converter = require(14);\n\n// Reflection\nprotobuf.ReflectionObject = require(26);\nprotobuf.Namespace = require(25);\nprotobuf.Root = require(31);\nprotobuf.Enum = require(17);\nprotobuf.Type = require(37);\nprotobuf.Field = require(18);\nprotobuf.OneOf = require(27);\nprotobuf.MapField = require(22);\nprotobuf.Service = require(35);\nprotobuf.Method = require(24);\n\n// Runtime\nprotobuf.Message = require(23);\nprotobuf.wrappers = require(45);\n\n// Utility\nprotobuf.types = require(38);\nprotobuf.util = require(39);\n\n// Set up possibly cyclic reflection dependencies\nprotobuf.ReflectionObject._configure(protobuf.Root);\nprotobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);\nprotobuf.Root._configure(protobuf.Type);\nprotobuf.Field._configure(protobuf.Type);\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(46);\nprotobuf.BufferWriter = require(47);\nprotobuf.Reader = require(29);\nprotobuf.BufferReader = require(30);\n\n// Utility\nprotobuf.util = require(42);\nprotobuf.rpc = require(33);\nprotobuf.roots = require(32);\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","\"use strict\";\nvar protobuf = module.exports = require(19);\n\nprotobuf.build = \"full\";\n\n// Parser\nprotobuf.tokenize = require(36);\nprotobuf.parse = require(28);\nprotobuf.common = require(13);\n\n// Configure parser\nprotobuf.Root._configure(protobuf.Type, protobuf.parse, protobuf.common);\n","\"use strict\";\nmodule.exports = MapField;\n\n// extends Field\nvar Field = require(18);\n((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = \"MapField\";\n\nvar types = require(38),\n util = require(39);\n\n/**\n * Constructs a new map field instance.\n * @classdesc Reflected map field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} keyType Key type\n * @param {string} type Value type\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction MapField(name, id, keyType, type, options, comment) {\n Field.call(this, name, id, type, undefined, undefined, options, comment);\n\n /* istanbul ignore if */\n if (!util.isString(keyType))\n throw TypeError(\"keyType must be a string\");\n\n /**\n * Key type.\n * @type {string}\n */\n this.keyType = keyType; // toJSON, marker\n\n /**\n * Resolved key type if not a basic type.\n * @type {ReflectionObject|null}\n */\n this.resolvedKeyType = null;\n\n // Overrides Field#map\n this.map = true;\n}\n\n/**\n * Map field descriptor.\n * @interface IMapField\n * @extends {IField}\n * @property {string} keyType Key type\n */\n\n/**\n * Extension map field descriptor.\n * @interface IExtensionMapField\n * @extends IMapField\n * @property {string} extend Extended type\n */\n\n/**\n * Constructs a map field from a map field descriptor.\n * @param {string} name Field name\n * @param {IMapField} json Map field descriptor\n * @returns {MapField} Created map field\n * @throws {TypeError} If arguments are invalid\n */\nMapField.fromJSON = function fromJSON(name, json) {\n return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment);\n};\n\n/**\n * Converts this map field to a map field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMapField} Map field descriptor\n */\nMapField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"keyType\" , this.keyType,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nMapField.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\n if (types.mapKey[this.keyType] === undefined)\n throw Error(\"invalid key type: \" + this.keyType);\n\n return Field.prototype.resolve.call(this);\n};\n\n/**\n * Map field decorator (TypeScript).\n * @name MapField.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"} fieldKeyType Field key type\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"|\"bytes\"|Object|Constructor<{}>} fieldValueType Field value type\n * @returns {FieldDecorator} Decorator function\n * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> }\n */\nMapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) {\n\n // submessage value: decorate the submessage and use its name as the type\n if (typeof fieldValueType === \"function\")\n fieldValueType = util.decorateType(fieldValueType).name;\n\n // enum reference value: create a reflected copy of the enum and keep reuseing it\n else if (fieldValueType && typeof fieldValueType === \"object\")\n fieldValueType = util.decorateEnum(fieldValueType).name;\n\n return function mapFieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType));\n };\n};\n","\"use strict\";\nmodule.exports = Message;\n\nvar util = require(42);\n\n/**\n * Constructs a new message instance.\n * @classdesc Abstract runtime message.\n * @constructor\n * @param {Properties} [properties] Properties to set\n * @template T extends object = object\n */\nfunction Message(properties) {\n // not used internally\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (key === \"__proto__\")\n continue;\n this[key] = properties[key];\n }\n}\n\n/**\n * Reference to the reflected type.\n * @name Message.$type\n * @type {Type}\n * @readonly\n */\n\n/**\n * Reference to the reflected type.\n * @name Message#$type\n * @type {Type}\n * @readonly\n */\n\n/*eslint-disable valid-jsdoc*/\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.create = function create(properties) {\n return this.$type.create(properties);\n};\n\n/**\n * Encodes a message of this type.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encode = function encode(message, writer) {\n return this.$type.encode(message, writer);\n};\n\n/**\n * Encodes a message of this type preceeded by its length as a varint.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.$type.encodeDelimited(message, writer);\n};\n\n/**\n * Decodes a message of this type.\n * @name Message.decode\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decode = function decode(reader) {\n return this.$type.decode(reader);\n};\n\n/**\n * Decodes a message of this type preceeded by its length as a varint.\n * @name Message.decodeDelimited\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decodeDelimited = function decodeDelimited(reader) {\n return this.$type.decodeDelimited(reader);\n};\n\n/**\n * Verifies a message of this type.\n * @name Message.verify\n * @function\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\nMessage.verify = function verify(message) {\n return this.$type.verify(message);\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object\n * @returns {T} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.fromObject = function fromObject(object) {\n return this.$type.fromObject(object);\n};\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {T} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @template T extends Message\n * @this Constructor\n */\nMessage.toObject = function toObject(message, options) {\n return this.$type.toObject(message, options);\n};\n\n/**\n * Converts this message to JSON.\n * @returns {Object.} JSON object\n */\nMessage.prototype.toJSON = function toJSON() {\n return this.$type.toObject(this, util.toJSONOptions);\n};\n\n/*eslint-enable valid-jsdoc*/\n","\"use strict\";\nmodule.exports = Method;\n\n// extends ReflectionObject\nvar ReflectionObject = require(26);\n((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = \"Method\";\n\nvar util = require(39);\n\n/**\n * Constructs a new service method instance.\n * @classdesc Reflected service method.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Method name\n * @param {string|undefined} type Method type, usually `\"rpc\"`\n * @param {string} requestType Request message type\n * @param {string} responseType Response message type\n * @param {boolean|Object.} [requestStream] Whether the request is streamed\n * @param {boolean|Object.} [responseStream] Whether the response is streamed\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this method\n * @param {Object.} [parsedOptions] Declared options, properly parsed into an object\n */\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) {\n\n /* istanbul ignore next */\n if (util.isObject(requestStream)) {\n options = requestStream;\n requestStream = responseStream = undefined;\n } else if (util.isObject(responseStream)) {\n options = responseStream;\n responseStream = undefined;\n }\n\n /* istanbul ignore if */\n if (!(type === undefined || util.isString(type)))\n throw TypeError(\"type must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(requestType))\n throw TypeError(\"requestType must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(responseType))\n throw TypeError(\"responseType must be a string\");\n\n ReflectionObject.call(this, name, options);\n\n /**\n * Method type.\n * @type {string}\n */\n this.type = type || \"rpc\"; // toJSON\n\n /**\n * Request type.\n * @type {string}\n */\n this.requestType = requestType; // toJSON, marker\n\n /**\n * Whether requests are streamed or not.\n * @type {boolean|undefined}\n */\n this.requestStream = requestStream ? true : undefined; // toJSON\n\n /**\n * Response type.\n * @type {string}\n */\n this.responseType = responseType; // toJSON\n\n /**\n * Whether responses are streamed or not.\n * @type {boolean|undefined}\n */\n this.responseStream = responseStream ? true : undefined; // toJSON\n\n /**\n * Resolved request type.\n * @type {Type|null}\n */\n this.resolvedRequestType = null;\n\n /**\n * Resolved response type.\n * @type {Type|null}\n */\n this.resolvedResponseType = null;\n\n /**\n * Comment for this method\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Options properly parsed into an object\n */\n this.parsedOptions = parsedOptions;\n}\n\n/**\n * Method descriptor.\n * @interface IMethod\n * @property {string} [type=\"rpc\"] Method type\n * @property {string} requestType Request type\n * @property {string} responseType Response type\n * @property {boolean} [requestStream=false] Whether requests are streamed\n * @property {boolean} [responseStream=false] Whether responses are streamed\n * @property {Object.} [options] Method options\n * @property {string} comment Method comments\n * @property {Object.} [parsedOptions] Method options properly parsed into an object\n */\n\n/**\n * Constructs a method from a method descriptor.\n * @param {string} name Method name\n * @param {IMethod} json Method descriptor\n * @returns {Method} Created method\n * @throws {TypeError} If arguments are invalid\n */\nMethod.fromJSON = function fromJSON(name, json) {\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions);\n};\n\n/**\n * Converts this method to a method descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMethod} Method descriptor\n */\nMethod.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"type\" , this.type !== \"rpc\" && /* istanbul ignore next */ this.type || undefined,\n \"requestType\" , this.requestType,\n \"requestStream\" , this.requestStream,\n \"responseType\" , this.responseType,\n \"responseStream\" , this.responseStream,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined,\n \"parsedOptions\" , this.parsedOptions,\n ]);\n};\n\n/**\n * @override\n */\nMethod.prototype.resolve = function resolve() {\n\n /* istanbul ignore if */\n if (this.resolved)\n return this;\n\n this.resolvedRequestType = this.parent.lookupType(this.requestType);\n this.resolvedResponseType = this.parent.lookupType(this.responseType);\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n","\"use strict\";\nmodule.exports = Namespace;\n\n// extends ReflectionObject\nvar ReflectionObject = require(26);\n((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = \"Namespace\";\n\nvar Field = require(18),\n util = require(39),\n OneOf = require(27);\n\nvar Type, // cyclic\n Service,\n Enum;\n\n/**\n * Constructs a new namespace instance.\n * @name Namespace\n * @classdesc Reflected namespace.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a namespace from JSON.\n * @memberof Namespace\n * @function\n * @param {string} name Namespace name\n * @param {Object.} json JSON object\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Namespace} Created namespace\n * @throws {TypeError} If arguments are invalid\n */\nNamespace.fromJSON = function fromJSON(name, json, depth) {\n depth = util.checkDepth(depth);\n return new Namespace(name, json.options).addJSON(json.nested, depth);\n};\n\n/**\n * Converts an array of reflection objects to JSON.\n * @memberof Namespace\n * @param {ReflectionObject[]} array Object array\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\n */\nfunction arrayToJSON(array, toJSONOptions) {\n if (!(array && array.length))\n return undefined;\n var obj = {};\n for (var i = 0; i < array.length; ++i)\n obj[array[i].name] = array[i].toJSON(toJSONOptions);\n return obj;\n}\n\nNamespace.arrayToJSON = arrayToJSON;\n\n/**\n * Tests if the specified id is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedId = function isReservedId(reserved, id) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (typeof reserved[i] !== \"string\" && reserved[i][0] <= id && reserved[i][1] > id)\n return true;\n return false;\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedName = function isReservedName(reserved, name) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (reserved[i] === name)\n return true;\n return false;\n};\n\n/**\n * Not an actual constructor. Use {@link Namespace} instead.\n * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports NamespaceBase\n * @extends ReflectionObject\n * @abstract\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n * @see {@link Namespace}\n */\nfunction Namespace(name, options) {\n ReflectionObject.call(this, name, options);\n\n /**\n * Nested objects by name.\n * @type {Object.|undefined}\n */\n this.nested = undefined; // toJSON\n\n /**\n * Cached nested objects as an array.\n * @type {ReflectionObject[]|null}\n * @private\n */\n this._nestedArray = null;\n\n /**\n * Cache lookup calls for any objects contains anywhere under this namespace.\n * This drastically speeds up resolve for large cross-linked protos where the same\n * types are looked up repeatedly.\n * @type {Object.}\n * @private\n */\n this._lookupCache = Object.create(null);\n\n /**\n * Whether or not objects contained in this namespace need feature resolution.\n * @type {boolean}\n * @protected\n */\n this._needsRecursiveFeatureResolution = true;\n\n /**\n * Whether or not objects contained in this namespace need a resolve.\n * @type {boolean}\n * @protected\n */\n this._needsRecursiveResolve = true;\n}\n\nfunction clearCache(namespace) {\n namespace._nestedArray = null;\n namespace._lookupCache = Object.create(null);\n\n // Also clear parent caches, since they include nested lookups.\n var parent = namespace;\n while(parent = parent.parent) {\n parent._lookupCache = Object.create(null);\n }\n return namespace;\n}\n\n/**\n * Nested objects of this namespace as an array for iteration.\n * @name NamespaceBase#nestedArray\n * @type {ReflectionObject[]}\n * @readonly\n */\nObject.defineProperty(Namespace.prototype, \"nestedArray\", {\n get: function() {\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\n }\n});\n\n/**\n * Namespace descriptor.\n * @interface INamespace\n * @property {Object.} [options] Namespace options\n * @property {Object.} [nested] Nested object descriptors\n */\n\n/**\n * Any extension field descriptor.\n * @typedef AnyExtensionField\n * @type {IExtensionField|IExtensionMapField}\n */\n\n/**\n * Any nested object descriptor.\n * @typedef AnyNestedObject\n * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf}\n */\n\n/**\n * Converts this namespace to a namespace descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {INamespace} Namespace descriptor\n */\nNamespace.prototype.toJSON = function toJSON(toJSONOptions) {\n return util.toObject([\n \"options\" , this.options,\n \"nested\" , arrayToJSON(this.nestedArray, toJSONOptions)\n ]);\n};\n\n/**\n * Adds nested objects to this namespace from nested object descriptors.\n * @param {Object.} nestedJson Any nested object descriptors\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Namespace} `this`\n */\nNamespace.prototype.addJSON = function addJSON(nestedJson, depth) {\n depth = util.checkDepth(depth);\n var ns = this;\n /* istanbul ignore else */\n if (nestedJson) {\n for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) {\n nested = nestedJson[names[i]];\n ns.add( // most to least likely\n ( nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : nested.id !== undefined\n ? Field.fromJSON\n : Namespace.fromJSON )(names[i], nested, depth + 1)\n );\n }\n }\n return this;\n};\n\n/**\n * Gets the nested object of the specified name.\n * @param {string} name Nested object name\n * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist\n */\nNamespace.prototype.get = function get(name) {\n return this.nested && Object.prototype.hasOwnProperty.call(this.nested, name)\n ? this.nested[name]\n : null;\n};\n\n/**\n * Gets the values of the nested {@link Enum|enum} of the specified name.\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\n * @param {string} name Nested enum name\n * @returns {Object.} Enum values\n * @throws {Error} If there is no such enum\n */\nNamespace.prototype.getEnum = function getEnum(name) {\n if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name) && this.nested[name] instanceof Enum)\n return this.nested[name].values;\n throw Error(\"no such enum: \" + name);\n};\n\n/**\n * Adds a nested object to this namespace.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name\n */\nNamespace.prototype.add = function add(object) {\n\n if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace))\n throw TypeError(\"object must be a valid nested object\");\n\n if (object.name === \"__proto__\")\n return this;\n\n if (!this.nested)\n this.nested = {};\n else {\n var prev = this.get(object.name);\n if (prev) {\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\n // replace plain namespace but keep existing nested elements and options\n var nested = prev.nestedArray;\n for (var i = 0; i < nested.length; ++i)\n object.add(nested[i]);\n this.remove(prev);\n if (!this.nested)\n this.nested = {};\n object.setOptions(prev.options, true);\n\n } else\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n }\n }\n this.nested[object.name] = object;\n\n if (!(this instanceof Type || this instanceof Service || this instanceof Enum || this instanceof Field)) {\n // This is a package or a root namespace.\n if (!object._edition) {\n // Make sure that some edition is set if it hasn't already been specified.\n object._edition = object._defaultEdition;\n }\n }\n\n this._needsRecursiveFeatureResolution = true;\n this._needsRecursiveResolve = true;\n\n // Also clear parent caches, since they need to recurse down.\n var parent = this;\n while(parent = parent.parent) {\n parent._needsRecursiveFeatureResolution = true;\n parent._needsRecursiveResolve = true;\n }\n\n object.onAdd(this);\n return clearCache(this);\n};\n\n/**\n * Removes a nested object from this namespace.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this namespace\n */\nNamespace.prototype.remove = function remove(object) {\n\n if (!(object instanceof ReflectionObject))\n throw TypeError(\"object must be a ReflectionObject\");\n if (object.parent !== this)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.nested[object.name];\n if (!Object.keys(this.nested).length)\n this.nested = undefined;\n\n object.onRemove(this);\n return clearCache(this);\n};\n\n/**\n * Defines additial namespaces within this one if not yet existing.\n * @param {string|string[]} path Path to create\n * @param {*} [json] Nested types to create from JSON\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\n */\nNamespace.prototype.define = function define(path, json) {\n\n if (util.isString(path))\n path = path.split(\".\");\n else if (!Array.isArray(path))\n throw TypeError(\"illegal path\");\n if (path && path.length && path[0] === \"\")\n throw Error(\"path must be relative\");\n if (path.length > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n\n var ptr = this;\n while (path.length > 0) {\n var part = path.shift();\n if (ptr.nested && ptr.nested[part]) {\n ptr = ptr.nested[part];\n if (!(ptr instanceof Namespace))\n throw Error(\"path conflicts with non-namespace objects\");\n } else\n ptr.add(ptr = new Namespace(part));\n }\n if (json)\n ptr.addJSON(json);\n return ptr;\n};\n\n/**\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost.\n * @returns {Namespace} `this`\n */\nNamespace.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n this._resolveFeaturesRecursive(this._edition);\n\n var nested = this.nestedArray, i = 0;\n this.resolve();\n while (i < nested.length)\n if (nested[i] instanceof Namespace)\n nested[i++].resolveAll();\n else\n nested[i++].resolve();\n this._needsRecursiveResolve = false;\n return this;\n};\n\n/**\n * @override\n */\nNamespace.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n if (!this._needsRecursiveFeatureResolution) return this;\n this._needsRecursiveFeatureResolution = false;\n\n edition = this._edition || edition;\n\n ReflectionObject.prototype._resolveFeaturesRecursive.call(this, edition);\n this.nestedArray.forEach(nested => {\n nested._resolveFeaturesRecursive(edition);\n });\n return this;\n};\n\n/**\n * Recursively looks up the reflection object matching the specified path in the scope of this namespace.\n * @param {string|string[]} path Path to look up\n * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n */\nNamespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) {\n /* istanbul ignore next */\n if (typeof filterTypes === \"boolean\") {\n parentAlreadyChecked = filterTypes;\n filterTypes = undefined;\n } else if (filterTypes && !Array.isArray(filterTypes))\n filterTypes = [ filterTypes ];\n\n if (util.isString(path) && path.length) {\n if (path === \".\")\n return this.root;\n path = path.split(\".\");\n } else if (!path.length)\n return this;\n\n var flatPath = path.join(\".\");\n\n // Start at root if path is absolute\n if (path[0] === \"\")\n return this.root.lookup(path.slice(1), filterTypes);\n\n // Early bailout for objects with matching absolute paths\n var found = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects[\".\" + flatPath];\n if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {\n return found;\n }\n\n // Do a regular lookup at this namespace and below\n found = this._lookupImpl(path, flatPath);\n if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {\n return found;\n }\n\n if (parentAlreadyChecked)\n return null;\n\n // If there hasn't been a match, walk up the tree and look more broadly\n var current = this;\n while (current.parent) {\n found = current.parent._lookupImpl(path, flatPath);\n if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {\n return found;\n }\n current = current.parent;\n }\n return null;\n};\n\n/**\n * Internal helper for lookup that handles searching just at this namespace and below along with caching.\n * @param {string[]} path Path to look up\n * @param {string} flatPath Flattened version of the path to use as a cache key\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n * @private\n */\nNamespace.prototype._lookupImpl = function lookup(path, flatPath) {\n if(Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) {\n return this._lookupCache[flatPath];\n }\n\n // Test if the first part matches any nested object, and if so, traverse if path contains more\n var found = this.get(path[0]);\n var exact = null;\n if (found) {\n if (path.length === 1) {\n exact = found;\n } else if (found instanceof Namespace) {\n path = path.slice(1);\n exact = found._lookupImpl(path, path.join(\".\"));\n }\n\n // Otherwise try each nested namespace\n } else {\n for (var i = 0; i < this.nestedArray.length; ++i)\n if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path, flatPath))) {\n exact = found;\n break;\n }\n }\n\n // Set this even when null, so that when we walk up the tree we can quickly bail on repeated checks back down.\n this._lookupCache[flatPath] = exact;\n return exact;\n};\n\n/**\n * Looks up the reflection object at the specified path, relative to this namespace.\n * @name NamespaceBase#lookup\n * @function\n * @param {string|string[]} path Path to look up\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n * @variation 2\n */\n// lookup(path: string, [parentAlreadyChecked: boolean])\n\n/**\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type\n * @throws {Error} If `path` does not point to a type\n */\nNamespace.prototype.lookupType = function lookupType(path) {\n var found = this.lookup(path, [ Type ]);\n if (!found)\n throw Error(\"no such type: \" + path);\n return found;\n};\n\n/**\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Enum} Looked up enum\n * @throws {Error} If `path` does not point to an enum\n */\nNamespace.prototype.lookupEnum = function lookupEnum(path) {\n var found = this.lookup(path, [ Enum ]);\n if (!found)\n throw Error(\"no such Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type or enum\n * @throws {Error} If `path` does not point to a type or enum\n */\nNamespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) {\n var found = this.lookup(path, [ Type, Enum ]);\n if (!found)\n throw Error(\"no such Type or Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Service} Looked up service\n * @throws {Error} If `path` does not point to a service\n */\nNamespace.prototype.lookupService = function lookupService(path) {\n var found = this.lookup(path, [ Service ]);\n if (!found)\n throw Error(\"no such Service '\" + path + \"' in \" + this);\n return found;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nNamespace._configure = function(Type_, Service_, Enum_) {\n Type = Type_;\n Service = Service_;\n Enum = Enum_;\n};\n","\"use strict\";\nmodule.exports = ReflectionObject;\n\nReflectionObject.className = \"ReflectionObject\";\n\nconst OneOf = require(27);\nvar util = require(39);\n\nvar Root; // cyclic\n\n/* eslint-disable no-warning-comments */\n// TODO: Replace with embedded proto.\nvar editions2023Defaults = {enum_type: \"OPEN\", field_presence: \"EXPLICIT\", json_format: \"ALLOW\", message_encoding: \"LENGTH_PREFIXED\", repeated_field_encoding: \"PACKED\", utf8_validation: \"VERIFY\"};\nvar proto2Defaults = {enum_type: \"CLOSED\", field_presence: \"EXPLICIT\", json_format: \"LEGACY_BEST_EFFORT\", message_encoding: \"LENGTH_PREFIXED\", repeated_field_encoding: \"EXPANDED\", utf8_validation: \"NONE\"};\nvar proto3Defaults = {enum_type: \"OPEN\", field_presence: \"IMPLICIT\", json_format: \"ALLOW\", message_encoding: \"LENGTH_PREFIXED\", repeated_field_encoding: \"PACKED\", utf8_validation: \"VERIFY\"};\n\n/**\n * Constructs a new reflection object instance.\n * @classdesc Base class of all reflection objects.\n * @constructor\n * @param {string} name Object name\n * @param {Object.} [options] Declared options\n * @abstract\n */\nfunction ReflectionObject(name, options) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (options && !util.isObject(options))\n throw TypeError(\"options must be an object\");\n\n /**\n * Options.\n * @type {Object.|undefined}\n */\n this.options = options; // toJSON\n\n /**\n * Parsed Options.\n * @type {Array.>|undefined}\n */\n this.parsedOptions = null;\n\n /**\n * Unique name within its namespace.\n * @type {string}\n */\n this.name = name;\n\n /**\n * The edition specified for this object. Only relevant for top-level objects.\n * @type {string}\n * @private\n */\n this._edition = null;\n\n /**\n * The default edition to use for this object if none is specified. For legacy reasons,\n * this is proto2 except in the JSON parsing case where it was proto3.\n * @type {string}\n * @private\n */\n this._defaultEdition = \"proto2\";\n\n /**\n * Resolved Features.\n * @type {object}\n * @private\n */\n this._features = {};\n\n /**\n * Whether or not features have been resolved.\n * @type {boolean}\n * @private\n */\n this._featuresResolved = false;\n\n /**\n * Parent namespace.\n * @type {Namespace|null}\n */\n this.parent = null;\n\n /**\n * Whether already resolved or not.\n * @type {boolean}\n */\n this.resolved = false;\n\n /**\n * Comment text, if any.\n * @type {string|null}\n */\n this.comment = null;\n\n /**\n * Defining file name.\n * @type {string|null}\n */\n this.filename = null;\n}\n\nObject.defineProperties(ReflectionObject.prototype, {\n\n /**\n * Reference to the root namespace.\n * @name ReflectionObject#root\n * @type {Root}\n * @readonly\n */\n root: {\n get: function() {\n var ptr = this;\n while (ptr.parent !== null)\n ptr = ptr.parent;\n return ptr;\n }\n },\n\n /**\n * Full name including leading dot.\n * @name ReflectionObject#fullName\n * @type {string}\n * @readonly\n */\n fullName: {\n get: function() {\n var path = [ this.name ],\n ptr = this.parent;\n while (ptr) {\n path.unshift(ptr.name);\n ptr = ptr.parent;\n }\n return path.join(\".\");\n }\n }\n});\n\n/**\n * Converts this reflection object to its descriptor representation.\n * @returns {Object.} Descriptor\n * @abstract\n */\nReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() {\n throw Error(); // not implemented, shouldn't happen\n};\n\n/**\n * Called when this object is added to a parent.\n * @param {ReflectionObject} parent Parent added to\n * @returns {undefined}\n */\nReflectionObject.prototype.onAdd = function onAdd(parent) {\n if (this.parent && this.parent !== parent)\n this.parent.remove(this);\n this.parent = parent;\n this.resolved = false;\n var root = parent.root;\n if (root instanceof Root)\n root._handleAdd(this);\n};\n\n/**\n * Called when this object is removed from a parent.\n * @param {ReflectionObject} parent Parent removed from\n * @returns {undefined}\n */\nReflectionObject.prototype.onRemove = function onRemove(parent) {\n var root = parent.root;\n if (root instanceof Root)\n root._handleRemove(this);\n this.parent = null;\n this.resolved = false;\n};\n\n/**\n * Resolves this objects type references.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n if (this.root instanceof Root)\n this.resolved = true; // only if part of a root\n return this;\n};\n\n/**\n * Resolves this objects editions features.\n * @param {string} edition The edition we're currently resolving for.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n return this._resolveFeatures(this._edition || edition);\n};\n\n/**\n * Resolves child features from parent features\n * @param {string} edition The edition we're currently resolving for.\n * @returns {undefined}\n */\nReflectionObject.prototype._resolveFeatures = function _resolveFeatures(edition) {\n if (this._featuresResolved) {\n return;\n }\n\n var defaults = {};\n\n /* istanbul ignore if */\n if (!edition) {\n throw new Error(\"Unknown edition for \" + this.fullName);\n }\n\n var protoFeatures = util.merge({}, this.options && this.options.features,\n this._inferLegacyProtoFeatures(edition));\n\n if (this._edition) {\n // For a namespace marked with a specific edition, reset defaults.\n /* istanbul ignore else */\n if (edition === \"proto2\") {\n defaults = Object.assign({}, proto2Defaults);\n } else if (edition === \"proto3\") {\n defaults = Object.assign({}, proto3Defaults);\n } else if (edition === \"2023\") {\n defaults = Object.assign({}, editions2023Defaults);\n } else {\n throw new Error(\"Unknown edition: \" + edition);\n }\n this._features = util.merge(defaults, protoFeatures);\n this._featuresResolved = true;\n return;\n }\n\n // fields in Oneofs aren't actually children of them, so we have to\n // special-case it\n /* istanbul ignore else */\n if (this.partOf instanceof OneOf) {\n var lexicalParentFeaturesCopy = util.merge({}, this.partOf._features);\n this._features = util.merge(lexicalParentFeaturesCopy, protoFeatures);\n } else if (this.declaringField) {\n // Skip feature resolution of sister fields.\n } else if (this.parent) {\n var parentFeaturesCopy = util.merge({}, this.parent._features);\n this._features = util.merge(parentFeaturesCopy, protoFeatures);\n } else {\n throw new Error(\"Unable to find a parent for \" + this.fullName);\n }\n if (this.extensionField) {\n // Sister fields should have the same features as their extensions.\n this.extensionField._features = this._features;\n }\n this._featuresResolved = true;\n};\n\n/**\n * Infers features from legacy syntax that may have been specified differently.\n * in older editions.\n * @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions\n * @returns {object} The feature values to override\n */\nReflectionObject.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(/*edition*/) {\n return {};\n};\n\n/**\n * Gets an option value.\n * @param {string} name Option name\n * @returns {*} Option value or `undefined` if not set\n */\nReflectionObject.prototype.getOption = function getOption(name) {\n if (this.options)\n return this.options[name];\n return undefined;\n};\n\n/**\n * Sets an option.\n * @param {string} name Option name\n * @param {*} value Option value\n * @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (name === \"__proto__\")\n return this;\n if (!this.options)\n this.options = {};\n if (/^features\\./.test(name)) {\n util.setProperty(this.options, name, value, ifNotSet);\n } else if (!ifNotSet || this.options[name] === undefined) {\n if (this.getOption(name) !== value) this.resolved = false;\n this.options[name] = value;\n }\n\n return this;\n};\n\n/**\n * Sets a parsed option.\n * @param {string} name parsed Option name\n * @param {*} value Option value\n * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\\empty, will add a new option with that value\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) {\n if (name === \"__proto__\")\n return this;\n if (!this.parsedOptions) {\n this.parsedOptions = [];\n }\n var parsedOptions = this.parsedOptions;\n if (propName) {\n // If setting a sub property of an option then try to merge it\n // with an existing option\n var opt = parsedOptions.find(function (opt) {\n return Object.prototype.hasOwnProperty.call(opt, name);\n });\n if (opt) {\n // If we found an existing option - just merge the property value\n // (If it's a feature, will just write over)\n var newValue = opt[name];\n util.setProperty(newValue, propName, value);\n } else {\n // otherwise, create a new option, set its property and add it to the list\n opt = {};\n opt[name] = util.setProperty({}, propName, value);\n parsedOptions.push(opt);\n }\n } else {\n // Always create a new option when setting the value of the option itself\n var newOpt = {};\n newOpt[name] = value;\n parsedOptions.push(newOpt);\n }\n\n return this;\n};\n\n/**\n * Sets multiple options.\n * @param {Object.} options Options to set\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) {\n if (options)\n for (var keys = Object.keys(options), i = 0; i < keys.length; ++i)\n this.setOption(keys[i], options[keys[i]], ifNotSet);\n return this;\n};\n\n/**\n * Converts this instance to its string representation.\n * @returns {string} Class name[, space, full name]\n */\nReflectionObject.prototype.toString = function toString() {\n var className = this.constructor.className,\n fullName = this.fullName;\n if (fullName.length)\n return className + \" \" + fullName;\n return className;\n};\n\n/**\n * Converts the edition this object is pinned to for JSON format.\n * @returns {string|undefined} The edition string for JSON representation\n */\nReflectionObject.prototype._editionToJSON = function _editionToJSON() {\n if (!this._edition || this._edition === \"proto3\") {\n // Avoid emitting proto3 since we need to default to it for backwards\n // compatibility anyway.\n return undefined;\n }\n return this._edition;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nReflectionObject._configure = function(Root_) {\n Root = Root_;\n};\n","\"use strict\";\nmodule.exports = OneOf;\n\n// extends ReflectionObject\nvar ReflectionObject = require(26);\n((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = \"OneOf\";\n\nvar Field = require(18),\n util = require(39);\n\n/**\n * Constructs a new oneof instance.\n * @classdesc Reflected oneof.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Oneof name\n * @param {string[]|Object.} [fieldNames] Field names\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction OneOf(name, fieldNames, options, comment) {\n if (!Array.isArray(fieldNames)) {\n options = fieldNames;\n fieldNames = undefined;\n }\n ReflectionObject.call(this, name, options);\n\n /* istanbul ignore if */\n if (!(fieldNames === undefined || Array.isArray(fieldNames)))\n throw TypeError(\"fieldNames must be an Array\");\n\n /**\n * Field names that belong to this oneof.\n * @type {string[]}\n */\n this.oneof = fieldNames || []; // toJSON, marker\n\n /**\n * Fields that belong to this oneof as an array for iteration.\n * @type {Field[]}\n * @readonly\n */\n this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Oneof descriptor.\n * @interface IOneOf\n * @property {Array.} oneof Oneof field names\n * @property {Object.} [options] Oneof options\n */\n\n/**\n * Constructs a oneof from a oneof descriptor.\n * @param {string} name Oneof name\n * @param {IOneOf} json Oneof descriptor\n * @returns {OneOf} Created oneof\n * @throws {TypeError} If arguments are invalid\n */\nOneOf.fromJSON = function fromJSON(name, json) {\n return new OneOf(name, json.oneof, json.options, json.comment);\n};\n\n/**\n * Converts this oneof to a oneof descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IOneOf} Oneof descriptor\n */\nOneOf.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"oneof\" , this.oneof,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Adds the fields of the specified oneof to the parent if not already done so.\n * @param {OneOf} oneof The oneof\n * @returns {undefined}\n * @inner\n * @ignore\n */\nfunction addFieldsToParent(oneof) {\n if (oneof.parent)\n for (var i = 0; i < oneof.fieldsArray.length; ++i)\n if (!oneof.fieldsArray[i].parent)\n oneof.parent.add(oneof.fieldsArray[i]);\n}\n\n/**\n * Adds a field to this oneof and removes it from its current parent, if any.\n * @param {Field} field Field to add\n * @returns {OneOf} `this`\n */\nOneOf.prototype.add = function add(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n if (field.parent && field.parent !== this.parent)\n field.parent.remove(field);\n this.oneof.push(field.name);\n this.fieldsArray.push(field);\n field.partOf = this; // field.parent remains null\n addFieldsToParent(this);\n return this;\n};\n\n/**\n * Removes a field from this oneof and puts it back to the oneof's parent.\n * @param {Field} field Field to remove\n * @returns {OneOf} `this`\n */\nOneOf.prototype.remove = function remove(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n var index = this.fieldsArray.indexOf(field);\n\n /* istanbul ignore if */\n if (index < 0)\n throw Error(field + \" is not a member of \" + this);\n\n this.fieldsArray.splice(index, 1);\n index = this.oneof.indexOf(field.name);\n\n /* istanbul ignore else */\n if (index > -1) // theoretical\n this.oneof.splice(index, 1);\n\n field.partOf = null;\n return this;\n};\n\n/**\n * @override\n */\nOneOf.prototype.onAdd = function onAdd(parent) {\n ReflectionObject.prototype.onAdd.call(this, parent);\n var self = this;\n // Collect present fields\n for (var i = 0; i < this.oneof.length; ++i) {\n var field = parent.get(this.oneof[i]);\n if (field && !field.partOf) {\n field.partOf = self;\n self.fieldsArray.push(field);\n }\n }\n // Add not yet present fields\n addFieldsToParent(this);\n};\n\n/**\n * @override\n */\nOneOf.prototype.onRemove = function onRemove(parent) {\n for (var i = 0, field; i < this.fieldsArray.length; ++i)\n if ((field = this.fieldsArray[i]).parent)\n field.parent.remove(field);\n ReflectionObject.prototype.onRemove.call(this, parent);\n};\n\n/**\n * Determines whether this field corresponds to a synthetic oneof created for\n * a proto3 optional field. No behavioral logic should depend on this, but it\n * can be relevant for reflection.\n * @name OneOf#isProto3Optional\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(OneOf.prototype, \"isProto3Optional\", {\n get: function() {\n if (this.fieldsArray == null || this.fieldsArray.length !== 1) {\n return false;\n }\n\n var field = this.fieldsArray[0];\n return field.options != null && field.options[\"proto3_optional\"] === true;\n }\n});\n\n/**\n * Decorator function as returned by {@link OneOf.d} (TypeScript).\n * @typedef OneOfDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} oneofName OneOf name\n * @returns {undefined}\n */\n\n/**\n * OneOf decorator (TypeScript).\n * @function\n * @param {...string} fieldNames Field names\n * @returns {OneOfDecorator} Decorator function\n * @template T extends string\n */\nOneOf.d = function decorateOneOf() {\n var fieldNames = new Array(arguments.length),\n index = 0;\n while (index < arguments.length)\n fieldNames[index] = arguments[index++];\n return function oneOfDecorator(prototype, oneofName) {\n util.decorateType(prototype.constructor)\n .add(new OneOf(oneofName, fieldNames));\n Object.defineProperty(prototype, oneofName, {\n get: util.oneOfGetter(fieldNames),\n set: util.oneOfSetter(fieldNames)\n });\n };\n};\n","\"use strict\";\nmodule.exports = parse;\n\nparse.filename = null;\nparse.defaults = { keepCase: false };\n\nvar tokenize = require(36),\n Root = require(31),\n Type = require(37),\n Field = require(18),\n MapField = require(22),\n OneOf = require(27),\n Enum = require(17),\n Service = require(35),\n Method = require(24),\n ReflectionObject = require(26),\n types = require(38),\n util = require(39);\n\nvar base10Re = /^[1-9][0-9]*$/,\n base10NegRe = /^-?[1-9][0-9]*$/,\n base16Re = /^0[x][0-9a-fA-F]+$/,\n base16NegRe = /^-?0[x][0-9a-fA-F]+$/,\n base8Re = /^0[0-7]+$/,\n base8NegRe = /^-?0[0-7]+$/,\n numberRe = util.patterns.numberRe,\n nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/,\n typeRefRe = util.patterns.typeRefRe;\n\n/**\n * Result object returned from {@link parse}.\n * @interface IParserResult\n * @property {string|undefined} package Package name, if declared\n * @property {string[]|undefined} imports Imports, if any\n * @property {string[]|undefined} weakImports Weak imports, if any\n * @property {Root} root Populated root instance\n */\n\n/**\n * Options modifying the behavior of {@link parse}.\n * @interface IParseOptions\n * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case\n * @property {boolean} [alternateCommentMode=false] Recognize double-slash comments in addition to doc-block comments.\n * @property {boolean} [preferTrailingComment=false] Use trailing comment when both leading comment and trailing comment exist.\n */\n\n/**\n * Options modifying the behavior of JSON serialization.\n * @interface IToJSONOptions\n * @property {boolean} [keepComments=false] Serializes comments.\n */\n\n/**\n * Parses the given .proto source and returns an object with the parsed contents.\n * @param {string} source Source contents\n * @param {Root} root Root to populate\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {IParserResult} Parser result\n * @property {string} filename=null Currently processing file name for error reporting, if known\n * @property {IParseOptions} defaults Default {@link IParseOptions}\n */\nfunction parse(source, root, options) {\n /* eslint-disable callback-return */\n if (!(root instanceof Root)) {\n options = root;\n root = new Root();\n }\n if (!options)\n options = parse.defaults;\n\n var preferTrailingComment = options.preferTrailingComment || false;\n var tn = tokenize(source, options.alternateCommentMode || false),\n next = tn.next,\n push = tn.push,\n peek = tn.peek,\n skip = tn.skip,\n cmnt = tn.cmnt;\n\n var head = true,\n pkg,\n imports,\n weakImports,\n edition = \"proto2\";\n\n var ptr = root;\n\n var topLevelObjects = [];\n var topLevelOptions = {};\n\n var applyCase = options.keepCase ? function(name) { return name; } : util.camelCase;\n\n function resolveFileFeatures() {\n topLevelObjects.forEach(obj => {\n obj._edition = edition;\n Object.keys(topLevelOptions).forEach(opt => {\n if (obj.getOption(opt) !== undefined) return;\n obj.setOption(opt, topLevelOptions[opt], true);\n });\n });\n }\n\n /* istanbul ignore next */\n function illegal(token, name, insideTryCatch) {\n var filename = parse.filename;\n if (!insideTryCatch)\n parse.filename = null;\n return Error(\"illegal \" + (name || \"token\") + \" '\" + token + \"' (\" + (filename ? filename + \", \" : \"\") + \"line \" + tn.line + \")\");\n }\n\n function readString() {\n var values = [],\n token;\n do {\n /* istanbul ignore if */\n if ((token = next()) !== \"\\\"\" && token !== \"'\")\n throw illegal(token);\n\n values.push(next());\n skip(token);\n token = peek();\n } while (token === \"\\\"\" || token === \"'\");\n return values.join(\"\");\n }\n\n function readValue(acceptTypeRef) {\n var token = next();\n switch (token) {\n case \"'\":\n case \"\\\"\":\n push(token);\n return readString();\n case \"true\": case \"TRUE\":\n return true;\n case \"false\": case \"FALSE\":\n return false;\n }\n try {\n return parseNumber(token, /* insideTryCatch */ true);\n } catch (e) {\n /* istanbul ignore else */\n if (acceptTypeRef && typeRefRe.test(token))\n return token;\n\n /* istanbul ignore next */\n throw illegal(token, \"value\");\n }\n }\n\n function readRanges(target, acceptStrings) {\n var token, start;\n do {\n if (acceptStrings && ((token = peek()) === \"\\\"\" || token === \"'\")) {\n var str = readString();\n target.push(str);\n if (edition >= 2023) {\n throw illegal(str, \"id\");\n }\n } else {\n try {\n target.push([ start = parseId(next()), skip(\"to\", true) ? parseId(next()) : start ]);\n } catch (err) {\n if (acceptStrings && typeRefRe.test(token) && edition >= 2023) {\n target.push(token);\n } else {\n throw err;\n }\n }\n }\n } while (skip(\",\", true));\n var dummy = {options: undefined};\n dummy.setOption = function(name, value) {\n if (this.options === undefined) this.options = {};\n this.options[name] = value;\n };\n ifBlock(\n dummy,\n function parseRange_block(token) {\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(dummy, token); // skip\n skip(\";\");\n } else\n throw illegal(token);\n },\n function parseRange_line() {\n parseInlineOptions(dummy); // skip\n });\n }\n\n function parseNumber(token, insideTryCatch) {\n var sign = 1;\n if (token.charAt(0) === \"-\") {\n sign = -1;\n token = token.substring(1);\n }\n switch (token) {\n case \"inf\": case \"INF\": case \"Inf\":\n return sign * Infinity;\n case \"nan\": case \"NAN\": case \"Nan\": case \"NaN\":\n return NaN;\n case \"0\":\n return 0;\n }\n if (base10Re.test(token))\n return sign * parseInt(token, 10);\n if (base16Re.test(token))\n return sign * parseInt(token, 16);\n if (base8Re.test(token))\n return sign * parseInt(token, 8);\n\n /* istanbul ignore else */\n if (numberRe.test(token))\n return sign * parseFloat(token);\n\n /* istanbul ignore next */\n throw illegal(token, \"number\", insideTryCatch);\n }\n\n function parseId(token, acceptNegative) {\n switch (token) {\n case \"max\": case \"MAX\": case \"Max\":\n return 536870911;\n case \"0\":\n return 0;\n }\n\n /* istanbul ignore if */\n if (!acceptNegative && token.charAt(0) === \"-\")\n throw illegal(token, \"id\");\n\n if (base10NegRe.test(token))\n return parseInt(token, 10);\n if (base16NegRe.test(token))\n return parseInt(token, 16);\n\n /* istanbul ignore else */\n if (base8NegRe.test(token))\n return parseInt(token, 8);\n\n /* istanbul ignore next */\n throw illegal(token, \"id\");\n }\n\n function parsePackage() {\n /* istanbul ignore if */\n if (pkg !== undefined)\n throw illegal(\"package\");\n\n pkg = next();\n\n /* istanbul ignore if */\n if (!typeRefRe.test(pkg))\n throw illegal(pkg, \"name\");\n\n ptr = ptr.define(pkg);\n\n skip(\";\");\n }\n\n function parseImport() {\n var token = peek();\n var whichImports;\n switch (token) {\n case \"weak\":\n whichImports = weakImports || (weakImports = []);\n next();\n break;\n case \"public\":\n next();\n // eslint-disable-next-line no-fallthrough\n default:\n whichImports = imports || (imports = []);\n break;\n }\n token = readString();\n skip(\";\");\n whichImports.push(token);\n }\n\n function parseSyntax() {\n skip(\"=\");\n edition = readString();\n\n /* istanbul ignore if */\n if (edition < 2023)\n throw illegal(edition, \"syntax\");\n\n skip(\";\");\n }\n\n function parseEdition() {\n skip(\"=\");\n edition = readString();\n const supportedEditions = [\"2023\"];\n\n /* istanbul ignore if */\n if (!supportedEditions.includes(edition))\n throw illegal(edition, \"edition\");\n\n skip(\";\");\n }\n\n\n function parseCommon(parent, token, depth) {\n if (depth === undefined)\n depth = 0;\n // depth is checked by dispatched functions\n switch (token) {\n\n case \"option\":\n parseOption(parent, token);\n skip(\";\");\n return true;\n\n case \"message\":\n parseType(parent, token, depth + 1);\n return true;\n\n case \"enum\":\n parseEnum(parent, token);\n return true;\n\n case \"service\":\n parseService(parent, token, depth + 1);\n return true;\n\n case \"extend\":\n parseExtension(parent, token, depth);\n return true;\n }\n return false;\n }\n\n function ifBlock(obj, fnIf, fnElse) {\n var trailingLine = tn.line;\n if (obj) {\n if(typeof obj.comment !== \"string\") {\n obj.comment = cmnt(); // try block-type comment\n }\n obj.filename = parse.filename;\n }\n if (skip(\"{\", true)) {\n var token;\n while ((token = next()) !== \"}\")\n fnIf(token);\n skip(\";\", true);\n } else {\n if (fnElse)\n fnElse();\n skip(\";\");\n if (obj && (typeof obj.comment !== \"string\" || preferTrailingComment))\n obj.comment = cmnt(trailingLine) || obj.comment; // try line-type comment\n }\n }\n\n function parseType(parent, token, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.nestingLimit)\n throw Error(\"max depth exceeded\");\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"type name\");\n\n var type = new Type(token);\n ifBlock(type, function parseType_block(token) {\n if (parseCommon(type, token, depth))\n return;\n\n switch (token) {\n\n case \"map\":\n parseMapField(type, token);\n break;\n\n case \"required\":\n if (edition !== \"proto2\")\n throw illegal(token);\n /* eslint-disable no-fallthrough */\n case \"repeated\":\n parseField(type, token, undefined, depth + 1);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (edition === \"proto3\") {\n parseField(type, \"proto3_optional\", undefined, depth + 1);\n } else if (edition !== \"proto2\") {\n throw illegal(token);\n } else {\n parseField(type, \"optional\", undefined, depth + 1);\n }\n break;\n\n case \"oneof\":\n parseOneOf(type, token, depth + 1);\n break;\n\n case \"extensions\":\n readRanges(type.extensions || (type.extensions = []));\n break;\n\n case \"reserved\":\n readRanges(type.reserved || (type.reserved = []), true);\n break;\n\n default:\n /* istanbul ignore if */\n if (edition === \"proto2\" || !typeRefRe.test(token)) {\n throw illegal(token);\n }\n\n push(token);\n parseField(type, \"optional\", undefined, depth + 1);\n break;\n }\n });\n parent.add(type);\n if (parent === ptr) {\n topLevelObjects.push(type);\n }\n }\n\n function parseField(parent, rule, extend, depth) {\n var type = next();\n if (type === \"group\") {\n parseGroup(parent, rule, depth);\n return;\n }\n // Type names can consume multiple tokens, in multiple variants:\n // package.subpackage field tokens: \"package.subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package . subpackage field tokens: \"package\" \".\" \"subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package. subpackage field tokens: \"package.\" \"subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package .subpackage field tokens: \"package\" \".subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // Keep reading tokens until we get a type name with no period at the end,\n // and the next token does not start with a period.\n while (type.endsWith(\".\") || peek().startsWith(\".\")) {\n type += next();\n }\n\n /* istanbul ignore if */\n if (!typeRefRe.test(type))\n throw illegal(type, \"type\");\n\n var name = next();\n\n /* istanbul ignore if */\n\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n name = applyCase(name);\n skip(\"=\");\n\n var field = new Field(name, parseId(next()), type, rule, extend);\n\n ifBlock(field, function parseField_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(field, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseField_line() {\n parseInlineOptions(field);\n });\n\n if (rule === \"proto3_optional\") {\n // for proto3 optional fields, we create a single-member Oneof to mimic \"optional\" behavior\n var oneof = new OneOf(\"_\" + name);\n field.setOption(\"proto3_optional\", true);\n oneof.add(field);\n parent.add(oneof);\n } else {\n parent.add(field);\n }\n if (parent === ptr) {\n topLevelObjects.push(field);\n }\n }\n\n function parseGroup(parent, rule, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.nestingLimit)\n throw Error(\"max depth exceeded\");\n if (edition >= 2023) {\n throw illegal(\"group\");\n }\n var name = next();\n\n /* istanbul ignore if */\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n var fieldName = util.lcFirst(name);\n if (name === fieldName)\n name = util.ucFirst(name);\n skip(\"=\");\n var id = parseId(next());\n var type = new Type(name);\n type.group = true;\n var field = new Field(fieldName, id, name, rule);\n field.filename = parse.filename;\n ifBlock(type, function parseGroup_block(token) {\n switch (token) {\n\n case \"option\":\n parseOption(type, token);\n skip(\";\");\n break;\n case \"required\":\n case \"repeated\":\n parseField(type, token, undefined, depth + 1);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (edition === \"proto3\") {\n parseField(type, \"proto3_optional\", undefined, depth + 1);\n } else {\n parseField(type, \"optional\", undefined, depth + 1);\n }\n break;\n\n case \"message\":\n parseType(type, token, depth + 1);\n break;\n\n case \"enum\":\n parseEnum(type, token);\n break;\n\n case \"reserved\":\n readRanges(type.reserved || (type.reserved = []), true);\n break;\n\n /* istanbul ignore next */\n default:\n throw illegal(token); // there are no groups with proto3 semantics\n }\n });\n parent.add(type)\n .add(field);\n }\n\n function parseMapField(parent) {\n skip(\"<\");\n var keyType = next();\n\n /* istanbul ignore if */\n if (types.mapKey[keyType] === undefined)\n throw illegal(keyType, \"type\");\n\n skip(\",\");\n var valueType = next();\n\n /* istanbul ignore if */\n if (!typeRefRe.test(valueType))\n throw illegal(valueType, \"type\");\n\n skip(\">\");\n var name = next();\n\n /* istanbul ignore if */\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n skip(\"=\");\n var field = new MapField(applyCase(name), parseId(next()), keyType, valueType);\n ifBlock(field, function parseMapField_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(field, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseMapField_line() {\n parseInlineOptions(field);\n });\n parent.add(field);\n }\n\n function parseOneOf(parent, token, depth) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var oneof = new OneOf(applyCase(token));\n ifBlock(oneof, function parseOneOf_block(token) {\n if (token === \"option\") {\n parseOption(oneof, token);\n skip(\";\");\n } else {\n push(token);\n parseField(oneof, \"optional\", undefined, depth);\n }\n });\n parent.add(oneof);\n }\n\n function parseEnum(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var enm = new Enum(token);\n ifBlock(enm, function parseEnum_block(token) {\n switch(token) {\n case \"option\":\n parseOption(enm, token);\n skip(\";\");\n break;\n\n case \"reserved\":\n readRanges(enm.reserved || (enm.reserved = []), true);\n if(enm.reserved === undefined) enm.reserved = [];\n break;\n\n default:\n parseEnumValue(enm, token);\n }\n });\n parent.add(enm);\n if (parent === ptr) {\n topLevelObjects.push(enm);\n }\n }\n\n function parseEnumValue(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token))\n throw illegal(token, \"name\");\n\n skip(\"=\");\n var value = parseId(next(), true),\n dummy = {\n options: undefined\n };\n dummy.getOption = function(name) {\n return this.options[name];\n };\n dummy.setOption = function(name, value) {\n ReflectionObject.prototype.setOption.call(dummy, name, value);\n };\n dummy.setParsedOption = function() {\n return undefined;\n };\n ifBlock(dummy, function parseEnumValue_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(dummy, token); // skip\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseEnumValue_line() {\n parseInlineOptions(dummy); // skip\n });\n parent.add(token, value, dummy.comment, dummy.parsedOptions || dummy.options);\n }\n\n function parseOption(parent, token) {\n var option;\n var propName;\n var isOption = true;\n if (token === \"option\") {\n token = next();\n }\n\n while (token !== \"=\") {\n if (token === \"(\") {\n var parensValue = next();\n skip(\")\");\n token = \"(\" + parensValue + \")\";\n }\n if (isOption) {\n isOption = false;\n if (token.includes(\".\") && !token.includes(\"(\")) {\n var tokens = token.split(\".\");\n option = tokens[0] + \".\";\n token = tokens[1];\n continue;\n }\n option = token;\n } else {\n propName = propName ? propName += token : token;\n }\n token = next();\n }\n var name = propName ? option.concat(propName) : option;\n var optionValue = parseOptionValue(parent, name);\n propName = propName && propName[0] === \".\" ? propName.slice(1) : propName;\n option = option && option[option.length - 1] === \".\" ? option.slice(0, -1) : option;\n setParsedOption(parent, option, optionValue, propName);\n }\n\n function parseOptionValue(parent, name, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n // { a: \"foo\" b { c: \"bar\" } }\n if (skip(\"{\", true)) {\n var objectResult = {};\n\n while (!skip(\"}\", true)) {\n /* istanbul ignore if */\n if (!nameRe.test(token = next())) {\n throw illegal(token, \"name\");\n }\n if (token === null) {\n throw illegal(token, \"end of input\");\n }\n\n var value;\n var propName = token;\n\n skip(\":\", true);\n\n if (peek() === \"{\") {\n // option (my_option) = {\n // repeated_value: [ \"foo\", \"bar\" ]\n // };\n value = parseOptionValue(parent, name + \".\" + token, depth + 1);\n } else if (peek() === \"[\") {\n value = [];\n var lastValue;\n if (skip(\"[\", true)) {\n do {\n lastValue = readValue(true);\n value.push(lastValue);\n } while (skip(\",\", true));\n skip(\"]\");\n if (typeof lastValue !== \"undefined\") {\n setOption(parent, name + \".\" + token, lastValue);\n }\n }\n } else {\n value = readValue(true);\n setOption(parent, name + \".\" + token, value);\n }\n\n var prevValue = objectResult[propName];\n\n if (prevValue)\n value = [].concat(prevValue).concat(value);\n\n if (propName !== \"__proto__\")\n objectResult[propName] = value;\n\n // Semicolons and commas can be optional\n skip(\",\", true);\n skip(\";\", true);\n }\n\n return objectResult;\n }\n\n var simpleValue = readValue(true);\n setOption(parent, name, simpleValue);\n return simpleValue;\n // Does not enforce a delimiter to be universal\n }\n\n function setOption(parent, name, value) {\n if (ptr === parent && /^features\\./.test(name)) {\n topLevelOptions[name] = value;\n return;\n }\n if (parent.setOption)\n parent.setOption(name, value);\n }\n\n function setParsedOption(parent, name, value, propName) {\n if (parent.setParsedOption)\n parent.setParsedOption(name, value, propName);\n }\n\n function parseInlineOptions(parent) {\n if (skip(\"[\", true)) {\n do {\n parseOption(parent, \"option\");\n } while (skip(\",\", true));\n skip(\"]\");\n }\n return parent;\n }\n\n function parseService(parent, token, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"service name\");\n\n var service = new Service(token);\n ifBlock(service, function parseService_block(token) {\n if (parseCommon(service, token, depth)) {\n return;\n }\n\n /* istanbul ignore else */\n if (token === \"rpc\")\n parseMethod(service, token);\n else\n throw illegal(token);\n });\n parent.add(service);\n if (parent === ptr) {\n topLevelObjects.push(service);\n }\n }\n\n function parseMethod(parent, token) {\n // Get the comment of the preceding line now (if one exists) in case the\n // method is defined across multiple lines.\n var commentText = cmnt();\n\n var type = token;\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var name = token,\n requestType, requestStream,\n responseType, responseStream;\n\n skip(\"(\");\n if (skip(\"stream\", true))\n requestStream = true;\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token);\n\n requestType = token;\n skip(\")\"); skip(\"returns\"); skip(\"(\");\n if (skip(\"stream\", true))\n responseStream = true;\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token);\n\n responseType = token;\n skip(\")\");\n\n var method = new Method(name, type, requestType, responseType, requestStream, responseStream);\n method.comment = commentText;\n ifBlock(method, function parseMethod_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(method, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n });\n parent.add(method);\n }\n\n function parseExtension(parent, token, depth) {\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token, \"reference\");\n\n var reference = token;\n ifBlock(null, function parseExtension_block(token) {\n switch (token) {\n\n case \"required\":\n case \"repeated\":\n parseField(parent, token, reference, depth + 1);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (edition === \"proto3\") {\n parseField(parent, \"proto3_optional\", reference, depth + 1);\n } else {\n parseField(parent, \"optional\", reference, depth + 1);\n }\n break;\n\n default:\n /* istanbul ignore if */\n if (edition === \"proto2\" || !typeRefRe.test(token))\n throw illegal(token);\n push(token);\n parseField(parent, \"optional\", reference, depth + 1);\n break;\n }\n });\n }\n\n var token;\n while ((token = next()) !== null) {\n switch (token) {\n\n case \"package\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parsePackage();\n break;\n\n case \"import\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parseImport();\n break;\n\n case \"syntax\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parseSyntax();\n break;\n\n case \"edition\":\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n parseEdition();\n break;\n\n case \"option\":\n parseOption(ptr, token);\n skip(\";\", true);\n break;\n\n default:\n\n /* istanbul ignore else */\n if (parseCommon(ptr, token, 0)) {\n head = false;\n continue;\n }\n\n /* istanbul ignore next */\n throw illegal(token);\n }\n }\n\n resolveFileFeatures();\n\n parse.filename = null;\n return {\n \"package\" : pkg,\n \"imports\" : imports,\n weakImports : weakImports,\n root : root\n };\n}\n\n/**\n * Parses the given .proto source and returns an object with the parsed contents.\n * @name parse\n * @function\n * @param {string} source Source contents\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {IParserResult} Parser result\n * @property {string} filename=null Currently processing file name for error reporting, if known\n * @property {IParseOptions} defaults Default {@link IParseOptions}\n * @variation 2\n */\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(42);\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Recursion limit.\n * @type {number}\n */\nReader.recursionLimit = util.recursionLimit;\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @param {number} [depth] Depth of recursion to control nested calls; 0 if omitted\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType, depth) {\n if (depth === undefined) depth = 0;\n if (depth > Reader.recursionLimit)\n throw Error(\"maximum nesting depth exceeded\");\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType, depth + 1);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(29);\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(42);\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = Root;\n\n// extends Namespace\nvar Namespace = require(25);\n((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = \"Root\";\n\nvar Field = require(18),\n Enum = require(17),\n OneOf = require(27),\n util = require(39);\n\nvar Type, // cyclic\n parse, // might be excluded\n common; // \"\n\n/**\n * Constructs a new root namespace instance.\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\n * @extends NamespaceBase\n * @constructor\n * @param {Object.} [options] Top level options\n */\nfunction Root(options) {\n Namespace.call(this, \"\", options);\n\n /**\n * Deferred extension fields.\n * @type {Field[]}\n */\n this.deferred = [];\n\n /**\n * Resolved file names of loaded files.\n * @type {string[]}\n */\n this.files = [];\n\n /**\n * Edition, defaults to proto2 if unspecified.\n * @type {string}\n * @private\n */\n this._edition = \"proto2\";\n\n /**\n * Global lookup cache of fully qualified names.\n * @type {Object.}\n * @private\n */\n this._fullyQualifiedObjects = {};\n}\n\n/**\n * Loads a namespace descriptor into a root namespace.\n * @param {INamespace} json Namespace descriptor\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Root} Root namespace\n */\nRoot.fromJSON = function fromJSON(json, root, depth) {\n depth = util.checkDepth(depth);\n if (!root)\n root = new Root();\n if (json.options)\n root.setOptions(json.options);\n return root.addJSON(json.nested, depth).resolveAll();\n};\n\n/**\n * Resolves the path of an imported file, relative to the importing origin.\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\n * @function\n * @param {string} origin The file name of the importing file\n * @param {string} target The file name being imported\n * @returns {string|null} Resolved path to `target` or `null` to skip the file\n */\nRoot.prototype.resolvePath = util.path.resolve;\n\n/**\n * Fetch content from file path or url\n * This method exists so you can override it with your own logic.\n * @function\n * @param {string} path File path or url\n * @param {FetchCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.fetch = util.fetch;\n\n// A symbol-like function to safely signal synchronous loading\n/* istanbul ignore next */\nfunction SYNC() {} // eslint-disable-line no-empty-function\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} options Parse options\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.load = function load(filename, options, callback) {\n if (typeof options === \"function\") {\n callback = options;\n options = undefined;\n }\n var self = this;\n if (!callback) {\n return util.asPromise(load, self, filename, options);\n }\n\n var sync = callback === SYNC; // undocumented\n\n // Finishes loading by calling the callback (exactly once)\n function finish(err, root) {\n /* istanbul ignore if */\n if (!callback) {\n return;\n }\n if (sync) {\n throw err;\n }\n if (root) {\n root.resolveAll();\n }\n var cb = callback;\n callback = null;\n cb(err, root);\n }\n\n // Bundled definition existence checking\n function getBundledFileName(filename) {\n var idx = filename.lastIndexOf(\"google/protobuf/\");\n if (idx > -1) {\n var altname = filename.substring(idx);\n if (altname in common) return altname;\n }\n return null;\n }\n\n // Processes a single file\n function process(filename, source, depth) {\n if (depth === undefined)\n depth = 0;\n try {\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n if (util.isString(source) && source.charAt(0) === \"{\")\n source = JSON.parse(source);\n if (!util.isString(source))\n self.setOptions(source.options).addJSON(source.nested);\n else {\n parse.filename = filename;\n var parsed = parse(source, self, options),\n resolved,\n i = 0;\n if (parsed.imports)\n for (; i < parsed.imports.length; ++i)\n if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i]))\n fetch(resolved, false, depth + 1);\n if (parsed.weakImports)\n for (i = 0; i < parsed.weakImports.length; ++i)\n if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i]))\n fetch(resolved, true, depth + 1);\n }\n } catch (err) {\n finish(err);\n }\n if (!sync && !queued) {\n finish(null, self); // only once anyway\n }\n }\n\n // Fetches a single file\n function fetch(filename, weak, depth) {\n if (depth === undefined)\n depth = 0;\n filename = getBundledFileName(filename) || filename;\n\n // Skip if already loaded / attempted\n if (self.files.indexOf(filename) > -1) {\n return;\n }\n self.files.push(filename);\n\n // Shortcut bundled definitions\n if (filename in common) {\n if (sync) {\n process(filename, common[filename], depth);\n } else {\n ++queued;\n setTimeout(function() {\n --queued;\n process(filename, common[filename], depth);\n });\n }\n return;\n }\n\n // Otherwise fetch from disk or network\n if (sync) {\n var source;\n try {\n source = util.fs.readFileSync(filename).toString(\"utf8\");\n } catch (err) {\n if (!weak)\n finish(err);\n return;\n }\n process(filename, source, depth);\n } else {\n ++queued;\n self.fetch(filename, function(err, source) {\n --queued;\n /* istanbul ignore if */\n if (!callback) {\n return; // terminated meanwhile\n }\n if (err) {\n /* istanbul ignore else */\n if (!weak)\n finish(err);\n else if (!queued) // can't be covered reliably\n finish(null, self);\n return;\n }\n process(filename, source, depth);\n });\n }\n }\n var queued = 0;\n\n // Assembling the root namespace doesn't require working type\n // references anymore, so we can load everything in parallel\n if (util.isString(filename)) {\n filename = [ filename ];\n }\n for (var i = 0, resolved; i < filename.length; ++i)\n if (resolved = self.resolvePath(\"\", filename[i]))\n fetch(resolved);\n if (sync) {\n self.resolveAll();\n return self;\n }\n if (!queued) {\n finish(null, self);\n }\n\n return self;\n};\n// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Promise} Promise\n * @variation 3\n */\n// function load(filename:string, [options:IParseOptions]):Promise\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only).\n * @function Root#loadSync\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n */\nRoot.prototype.loadSync = function loadSync(filename, options) {\n if (!util.isNode)\n throw Error(\"not supported\");\n return this.load(filename, options, SYNC);\n};\n\n/**\n * @override\n */\nRoot.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n if (this.deferred.length)\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\n }).join(\", \"));\n return Namespace.prototype.resolveAll.call(this);\n};\n\n// only uppercased (and thus conflict-free) children are exposed, see below\nvar exposeRe = /^[A-Z]/;\n\n/**\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\n * @param {Root} root Root instance\n * @param {Field} field Declaring extension field witin the declaring type\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\n * @inner\n * @ignore\n */\nfunction tryHandleExtension(root, field) {\n var extendedType = field.parent.lookup(field.extend);\n if (extendedType) {\n var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options);\n //do not allow to extend same field twice to prevent the error\n if (extendedType.get(sisterField.name)) {\n return true;\n }\n sisterField.declaringField = field;\n field.extensionField = sisterField;\n extendedType.add(sisterField);\n return true;\n }\n return false;\n}\n\n/**\n * Called when any object is added to this root or its sub-namespaces.\n * @param {ReflectionObject} object Object added\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleAdd = function _handleAdd(object) {\n if (object instanceof Field) {\n\n if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField)\n if (!tryHandleExtension(this, object))\n this.deferred.push(object);\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n object.parent[object.name] = object.values; // expose enum values as property of its parent\n\n } else if (!(object instanceof OneOf)) /* everything else is a namespace */ {\n\n if (object instanceof Type) // Try to handle any deferred extensions\n for (var i = 0; i < this.deferred.length;)\n if (tryHandleExtension(this, this.deferred[i]))\n this.deferred.splice(i, 1);\n else\n ++i;\n for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace\n this._handleAdd(object._nestedArray[j]);\n if (exposeRe.test(object.name))\n object.parent[object.name] = object; // expose namespace as property of its parent\n }\n\n if (object instanceof Type || object instanceof Enum || object instanceof Field) {\n // Only store types and enums for quick lookup during resolve.\n this._fullyQualifiedObjects[object.fullName] = object;\n }\n\n // The above also adds uppercased (and thus conflict-free) nested types, services and enums as\n // properties of namespaces just like static code does. This allows using a .d.ts generated for\n // a static module with reflection-based solutions where the condition is met.\n};\n\n/**\n * Called when any object is removed from this root or its sub-namespaces.\n * @param {ReflectionObject} object Object removed\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleRemove = function _handleRemove(object) {\n if (object instanceof Field) {\n\n if (/* an extension field */ object.extend !== undefined) {\n if (/* already handled */ object.extensionField) { // remove its sister field\n object.extensionField.parent.remove(object.extensionField);\n object.extensionField = null;\n } else { // cancel the extension\n var index = this.deferred.indexOf(object);\n /* istanbul ignore else */\n if (index > -1)\n this.deferred.splice(index, 1);\n }\n }\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose enum values\n\n } else if (object instanceof Namespace) {\n\n for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace\n this._handleRemove(object._nestedArray[i]);\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose namespaces\n\n }\n\n delete this._fullyQualifiedObjects[object.fullName];\n};\n\n// Sets up cyclic dependencies (called in index-light)\nRoot._configure = function(Type_, parse_, common_) {\n Type = Type_;\n parse = parse_;\n common = common_;\n};\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(34);\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(42);\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = Service;\n\n// extends Namespace\nvar Namespace = require(25);\n((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = \"Service\";\n\nvar Method = require(24),\n util = require(39),\n rpc = require(33);\n\nvar reservedRe = util.patterns.reservedRe;\n\n/**\n * Constructs a new service instance.\n * @classdesc Reflected service.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Service name\n * @param {Object.} [options] Service options\n * @throws {TypeError} If arguments are invalid\n */\nfunction Service(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Service methods.\n * @type {Object.}\n */\n this.methods = {}; // toJSON, marker\n\n /**\n * Cached methods as an array.\n * @type {Method[]|null}\n * @private\n */\n this._methodsArray = null;\n}\n\n/**\n * Service descriptor.\n * @interface IService\n * @extends INamespace\n * @property {Object.} methods Method descriptors\n */\n\n/**\n * Constructs a service from a service descriptor.\n * @param {string} name Service name\n * @param {IService} json Service descriptor\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Service} Created service\n * @throws {TypeError} If arguments are invalid\n */\nService.fromJSON = function fromJSON(name, json, depth) {\n depth = util.checkDepth(depth);\n var service = new Service(name, json.options);\n /* istanbul ignore else */\n if (json.methods)\n for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i)\n service.add(Method.fromJSON(names[i], json.methods[names[i]]));\n if (json.nested)\n service.addJSON(json.nested, depth);\n if (json.edition)\n service._edition = json.edition;\n service.comment = json.comment;\n service._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return service;\n};\n\n/**\n * Converts this service to a service descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IService} Service descriptor\n */\nService.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"options\" , inherited && inherited.options || undefined,\n \"methods\" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {},\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Methods of this service as an array for iteration.\n * @name Service#methodsArray\n * @type {Method[]}\n * @readonly\n */\nObject.defineProperty(Service.prototype, \"methodsArray\", {\n get: function() {\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\n }\n});\n\nfunction clearCache(service) {\n service._methodsArray = null;\n return service;\n}\n\n/**\n * @override\n */\nService.prototype.get = function get(name) {\n return Object.prototype.hasOwnProperty.call(this.methods, name)\n ? this.methods[name]\n : Namespace.prototype.get.call(this, name);\n};\n\n/**\n * @override\n */\nService.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n Namespace.prototype.resolve.call(this);\n var methods = this.methodsArray;\n for (var i = 0; i < methods.length; ++i)\n methods[i].resolve();\n return this;\n};\n\n/**\n * @override\n */\nService.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n if (!this._needsRecursiveFeatureResolution) return this;\n\n edition = this._edition || edition;\n\n Namespace.prototype._resolveFeaturesRecursive.call(this, edition);\n this.methodsArray.forEach(method => {\n method._resolveFeaturesRecursive(edition);\n });\n return this;\n};\n\n/**\n * @override\n */\nService.prototype.add = function add(object) {\n /* istanbul ignore if */\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Method) {\n if (object.name === \"__proto__\")\n return this;\n this.methods[object.name] = object;\n object.parent = this;\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * @override\n */\nService.prototype.remove = function remove(object) {\n if (object instanceof Method) {\n\n /* istanbul ignore if */\n if (this.methods[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.methods[object.name];\n object.parent = null;\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Creates a runtime service using the specified rpc implementation.\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed.\n */\nService.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited);\n for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) {\n var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\\w_]/g, \"\");\n rpcService[methodName] = util.codegen([\"r\",\"c\"], reservedRe.test(methodName) ? methodName + \"_\" : methodName)(\"return this.rpcCall(m,q,s,r,c)\")({\n m: method,\n q: method.resolvedRequestType.ctor,\n s: method.resolvedResponseType.ctor\n });\n }\n return rpcService;\n};\n","\"use strict\";\nmodule.exports = tokenize;\n\nvar delimRe = /[\\s{}=;:[\\],'\"()<>]/g,\n stringDoubleRe = /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\n stringSingleRe = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g;\n\nvar setCommentRe = /^ *[*/]+ */,\n setCommentAltRe = /^\\s*\\*?\\/*/,\n setCommentSplitRe = /\\n/g,\n whitespaceRe = /\\s/,\n unescapeRe = /\\\\(.?)/g;\n\nvar unescapeMap = {\n \"0\": \"\\0\",\n \"r\": \"\\r\",\n \"n\": \"\\n\",\n \"t\": \"\\t\"\n};\n\n/**\n * Unescapes a string.\n * @param {string} str String to unescape\n * @returns {string} Unescaped string\n * @property {Object.} map Special characters map\n * @memberof tokenize\n */\nfunction unescape(str) {\n return str.replace(unescapeRe, function($0, $1) {\n switch ($1) {\n case \"\\\\\":\n case \"\":\n return $1;\n default:\n return unescapeMap[$1] || \"\";\n }\n });\n}\n\ntokenize.unescape = unescape;\n\n/**\n * Gets the next token and advances.\n * @typedef TokenizerHandleNext\n * @type {function}\n * @returns {string|null} Next token or `null` on eof\n */\n\n/**\n * Peeks for the next token.\n * @typedef TokenizerHandlePeek\n * @type {function}\n * @returns {string|null} Next token or `null` on eof\n */\n\n/**\n * Pushes a token back to the stack.\n * @typedef TokenizerHandlePush\n * @type {function}\n * @param {string} token Token\n * @returns {undefined}\n */\n\n/**\n * Skips the next token.\n * @typedef TokenizerHandleSkip\n * @type {function}\n * @param {string} expected Expected token\n * @param {boolean} [optional=false] If optional\n * @returns {boolean} Whether the token matched\n * @throws {Error} If the token didn't match and is not optional\n */\n\n/**\n * Gets the comment on the previous line or, alternatively, the line comment on the specified line.\n * @typedef TokenizerHandleCmnt\n * @type {function}\n * @param {number} [line] Line number\n * @returns {string|null} Comment text or `null` if none\n */\n\n/**\n * Handle object returned from {@link tokenize}.\n * @interface ITokenizerHandle\n * @property {TokenizerHandleNext} next Gets the next token and advances (`null` on eof)\n * @property {TokenizerHandlePeek} peek Peeks for the next token (`null` on eof)\n * @property {TokenizerHandlePush} push Pushes a token back to the stack\n * @property {TokenizerHandleSkip} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws\n * @property {TokenizerHandleCmnt} cmnt Gets the comment on the previous line or the line comment on the specified line, if any\n * @property {number} line Current line number\n */\n\n/**\n * Tokenizes the given .proto source and returns an object with useful utility functions.\n * @param {string} source Source contents\n * @param {boolean} alternateCommentMode Whether we should activate alternate comment parsing mode.\n * @returns {ITokenizerHandle} Tokenizer handle\n */\nfunction tokenize(source, alternateCommentMode) {\n /* eslint-disable callback-return */\n source = source.toString();\n\n var offset = 0,\n length = source.length,\n line = 1,\n lastCommentLine = 0,\n comments = {};\n\n var stack = [];\n\n var stringDelim = null;\n\n /* istanbul ignore next */\n /**\n * Creates an error for illegal syntax.\n * @param {string} subject Subject\n * @returns {Error} Error created\n * @inner\n */\n function illegal(subject) {\n return Error(\"illegal \" + subject + \" (line \" + line + \")\");\n }\n\n /**\n * Reads a string till its end.\n * @returns {string} String read\n * @inner\n */\n function readString() {\n var re = stringDelim === \"'\" ? stringSingleRe : stringDoubleRe;\n re.lastIndex = offset - 1;\n var match = re.exec(source);\n if (!match)\n throw illegal(\"string\");\n offset = re.lastIndex;\n push(stringDelim);\n stringDelim = null;\n return unescape(match[1]);\n }\n\n /**\n * Gets the character at `pos` within the source.\n * @param {number} pos Position\n * @returns {string} Character\n * @inner\n */\n function charAt(pos) {\n return source.charAt(pos);\n }\n\n /**\n * Sets the current comment text.\n * @param {number} start Start offset\n * @param {number} end End offset\n * @param {boolean} isLeading set if a leading comment\n * @returns {undefined}\n * @inner\n */\n function setComment(start, end, isLeading) {\n var comment = {\n type: source.charAt(start++),\n lineEmpty: false,\n leading: isLeading,\n };\n var lookback;\n if (alternateCommentMode) {\n lookback = 2; // alternate comment parsing: \"//\" or \"/*\"\n } else {\n lookback = 3; // \"///\" or \"/**\"\n }\n var commentOffset = start - lookback,\n c;\n do {\n if (--commentOffset < 0 ||\n (c = source.charAt(commentOffset)) === \"\\n\") {\n comment.lineEmpty = true;\n break;\n }\n } while (c === \" \" || c === \"\\t\");\n var lines = source\n .substring(start, end)\n .split(setCommentSplitRe);\n for (var i = 0; i < lines.length; ++i)\n lines[i] = lines[i]\n .replace(alternateCommentMode ? setCommentAltRe : setCommentRe, \"\")\n .trim();\n comment.text = lines\n .join(\"\\n\")\n .trim();\n\n comments[line] = comment;\n lastCommentLine = line;\n }\n\n function isDoubleSlashCommentLine(startOffset) {\n var endOffset = findEndOfLine(startOffset);\n\n // see if remaining line matches comment pattern\n var lineText = source.substring(startOffset, endOffset);\n var isComment = /^\\s*\\/\\//.test(lineText);\n return isComment;\n }\n\n function findEndOfLine(cursor) {\n // find end of cursor's line\n var endOffset = cursor;\n while (endOffset < length && charAt(endOffset) !== \"\\n\") {\n endOffset++;\n }\n return endOffset;\n }\n\n /**\n * Obtains the next token.\n * @returns {string|null} Next token or `null` on eof\n * @inner\n */\n function next() {\n if (stack.length > 0)\n return stack.shift();\n if (stringDelim)\n return readString();\n var repeat,\n prev,\n curr,\n start,\n isDoc,\n isLeadingComment = offset === 0;\n do {\n if (offset === length)\n return null;\n repeat = false;\n while (whitespaceRe.test(curr = charAt(offset))) {\n if (curr === \"\\n\") {\n isLeadingComment = true;\n ++line;\n }\n if (++offset === length)\n return null;\n }\n\n if (charAt(offset) === \"/\") {\n if (++offset === length) {\n throw illegal(\"comment\");\n }\n if (charAt(offset) === \"/\") { // Line\n if (!alternateCommentMode) {\n // check for triple-slash comment\n isDoc = charAt(start = offset + 1) === \"/\";\n\n while (charAt(++offset) !== \"\\n\") {\n if (offset === length) {\n return null;\n }\n }\n ++offset;\n if (isDoc) {\n setComment(start, offset - 1, isLeadingComment);\n // Trailing comment cannot not be multi-line,\n // so leading comment state should be reset to handle potential next comments\n isLeadingComment = true;\n }\n ++line;\n repeat = true;\n } else {\n // check for double-slash comments, consolidating consecutive lines\n start = offset;\n isDoc = false;\n if (isDoubleSlashCommentLine(offset - 1)) {\n isDoc = true;\n do {\n offset = findEndOfLine(offset);\n if (offset === length) {\n break;\n }\n offset++;\n if (!isLeadingComment) {\n // Trailing comment cannot not be multi-line\n break;\n }\n } while (isDoubleSlashCommentLine(offset));\n } else {\n offset = Math.min(length, findEndOfLine(offset) + 1);\n }\n if (isDoc) {\n setComment(start, offset, isLeadingComment);\n isLeadingComment = true;\n }\n line++;\n repeat = true;\n }\n } else if ((curr = charAt(offset)) === \"*\") { /* Block */\n // check for /** (regular comment mode) or /* (alternate comment mode)\n start = offset + 1;\n isDoc = alternateCommentMode || charAt(start) === \"*\";\n do {\n if (curr === \"\\n\") {\n ++line;\n }\n if (++offset === length) {\n throw illegal(\"comment\");\n }\n prev = curr;\n curr = charAt(offset);\n } while (prev !== \"*\" || curr !== \"/\");\n ++offset;\n if (isDoc) {\n setComment(start, offset - 2, isLeadingComment);\n isLeadingComment = true;\n }\n repeat = true;\n } else {\n return \"/\";\n }\n }\n } while (repeat);\n\n // offset !== length if we got here\n\n var end = offset;\n delimRe.lastIndex = 0;\n var delim = delimRe.test(charAt(end++));\n if (!delim)\n while (end < length && !delimRe.test(charAt(end)))\n ++end;\n var token = source.substring(offset, offset = end);\n if (token === \"\\\"\" || token === \"'\")\n stringDelim = token;\n return token;\n }\n\n /**\n * Pushes a token back to the stack.\n * @param {string} token Token\n * @returns {undefined}\n * @inner\n */\n function push(token) {\n stack.push(token);\n }\n\n /**\n * Peeks for the next token.\n * @returns {string|null} Token or `null` on eof\n * @inner\n */\n function peek() {\n if (!stack.length) {\n var token = next();\n if (token === null)\n return null;\n push(token);\n }\n return stack[0];\n }\n\n /**\n * Skips a token.\n * @param {string} expected Expected token\n * @param {boolean} [optional=false] Whether the token is optional\n * @returns {boolean} `true` when skipped, `false` if not\n * @throws {Error} When a required token is not present\n * @inner\n */\n function skip(expected, optional) {\n var actual = peek(),\n equals = actual === expected;\n if (equals) {\n next();\n return true;\n }\n if (!optional)\n throw illegal(\"token '\" + actual + \"', '\" + expected + \"' expected\");\n return false;\n }\n\n /**\n * Gets a comment.\n * @param {number} [trailingLine] Line number if looking for a trailing comment\n * @returns {string|null} Comment text\n * @inner\n */\n function cmnt(trailingLine) {\n var ret = null;\n var comment;\n if (trailingLine === undefined) {\n comment = comments[line - 1];\n delete comments[line - 1];\n if (comment && (alternateCommentMode || comment.type === \"*\" || comment.lineEmpty)) {\n ret = comment.leading ? comment.text : null;\n }\n } else {\n /* istanbul ignore else */\n if (lastCommentLine < trailingLine) {\n peek();\n }\n comment = comments[trailingLine];\n delete comments[trailingLine];\n if (comment && !comment.lineEmpty && (alternateCommentMode || comment.type === \"/\")) {\n ret = comment.leading ? null : comment.text;\n }\n }\n return ret;\n }\n\n return Object.defineProperty({\n next: next,\n peek: peek,\n push: push,\n skip: skip,\n cmnt: cmnt\n }, \"line\", {\n get: function() { return line; }\n });\n /* eslint-enable callback-return */\n}\n","\"use strict\";\nmodule.exports = Type;\n\n// extends Namespace\nvar Namespace = require(25);\n((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = \"Type\";\n\nvar Enum = require(17),\n OneOf = require(27),\n Field = require(18),\n MapField = require(22),\n Service = require(35),\n Message = require(23),\n Reader = require(29),\n Writer = require(46),\n util = require(39),\n encoder = require(16),\n decoder = require(15),\n verifier = require(44),\n converter = require(14),\n wrappers = require(45);\n\n/**\n * Constructs a new reflected message type instance.\n * @classdesc Reflected message type.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Message name\n * @param {Object.} [options] Declared options\n */\nfunction Type(name, options) {\n name = name.replace(/\\W/g, \"\");\n Namespace.call(this, name, options);\n\n /**\n * Message fields.\n * @type {Object.}\n */\n this.fields = {}; // toJSON, marker\n\n /**\n * Oneofs declared within this namespace, if any.\n * @type {Object.}\n */\n this.oneofs = undefined; // toJSON\n\n /**\n * Extension ranges, if any.\n * @type {number[][]}\n */\n this.extensions = undefined; // toJSON\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n /*?\n * Whether this type is a legacy group.\n * @type {boolean|undefined}\n */\n this.group = undefined; // toJSON\n\n /**\n * Cached fields by id.\n * @type {Object.|null}\n * @private\n */\n this._fieldsById = null;\n\n /**\n * Cached fields as an array.\n * @type {Field[]|null}\n * @private\n */\n this._fieldsArray = null;\n\n /**\n * Cached oneofs as an array.\n * @type {OneOf[]|null}\n * @private\n */\n this._oneofsArray = null;\n\n /**\n * Cached constructor.\n * @type {Constructor<{}>}\n * @private\n */\n this._ctor = null;\n}\n\nObject.defineProperties(Type.prototype, {\n\n /**\n * Message fields by id.\n * @name Type#fieldsById\n * @type {Object.}\n * @readonly\n */\n fieldsById: {\n get: function() {\n\n /* istanbul ignore if */\n if (this._fieldsById)\n return this._fieldsById;\n\n this._fieldsById = {};\n for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) {\n var field = this.fields[names[i]],\n id = field.id;\n\n /* istanbul ignore if */\n if (this._fieldsById[id])\n throw Error(\"duplicate id \" + id + \" in \" + this);\n\n this._fieldsById[id] = field;\n }\n return this._fieldsById;\n }\n },\n\n /**\n * Fields of this message as an array for iteration.\n * @name Type#fieldsArray\n * @type {Field[]}\n * @readonly\n */\n fieldsArray: {\n get: function() {\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\n }\n },\n\n /**\n * Oneofs of this message as an array for iteration.\n * @name Type#oneofsArray\n * @type {OneOf[]}\n * @readonly\n */\n oneofsArray: {\n get: function() {\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\n }\n },\n\n /**\n * The registered constructor, if any registered, otherwise a generic constructor.\n * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor.\n * @name Type#ctor\n * @type {Constructor<{}>}\n */\n ctor: {\n get: function() {\n return this._ctor || (this.ctor = Type.generateConstructor(this)());\n },\n set: function(ctor) {\n\n // Ensure proper prototype\n var prototype = ctor.prototype;\n if (!(prototype instanceof Message)) {\n (ctor.prototype = new Message()).constructor = ctor;\n util.merge(ctor.prototype, prototype);\n }\n\n // Classes and messages reference their reflected type\n ctor.$type = ctor.prototype.$type = this;\n\n // Mix in static methods\n util.merge(ctor, Message, true);\n\n this._ctor = ctor;\n\n // Messages have non-enumerable default values on their prototype\n var i = 0;\n for (; i < /* initializes */ this.fieldsArray.length; ++i)\n this._fieldsArray[i].resolve(); // ensures a proper value\n\n // Messages have non-enumerable getters and setters for each virtual oneof field\n var ctorProperties = {};\n for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i)\n ctorProperties[this._oneofsArray[i].resolve().name] = {\n get: util.oneOfGetter(this._oneofsArray[i].oneof),\n set: util.oneOfSetter(this._oneofsArray[i].oneof)\n };\n if (i)\n Object.defineProperties(ctor.prototype, ctorProperties);\n }\n }\n});\n\n/**\n * Generates a constructor function for the specified type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nType.generateConstructor = function generateConstructor(mtype) {\n /* eslint-disable no-unexpected-multiline */\n var gen = util.codegen([\"p\"], mtype.name);\n // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype\n for (var i = 0, field; i < mtype.fieldsArray.length; ++i)\n if ((field = mtype._fieldsArray[i]).map) gen\n (\"this%s={}\", util.safeProp(field.name));\n else if (field.repeated) gen\n (\"this%s=[]\", util.safeProp(field.name));\n return gen\n (\"if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors\n * @property {Object.} fields Field descriptors\n * @property {number[][]} [extensions] Extension ranges\n * @property {Array.} [reserved] Reserved ranges\n * @property {boolean} [group=false] Whether a legacy group or not\n */\n\n/**\n * Creates a message type from a message type descriptor.\n * @param {string} name Message name\n * @param {IType} json Message type descriptor\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Type} Created message type\n */\nType.fromJSON = function fromJSON(name, json, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.nestingLimit)\n throw Error(\"max depth exceeded\");\n var type = new Type(name, json.options);\n type.extensions = json.extensions;\n type.reserved = json.reserved;\n var names = Object.keys(json.fields),\n i = 0;\n for (; i < names.length; ++i)\n type.add(\n ( typeof json.fields[names[i]].keyType !== \"undefined\"\n ? MapField.fromJSON\n : Field.fromJSON )(names[i], json.fields[names[i]])\n );\n if (json.oneofs)\n for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i)\n type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]]));\n if (json.nested)\n for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) {\n var nested = json.nested[names[i]];\n type.add( // most to least likely\n ( nested.id !== undefined\n ? Field.fromJSON\n : nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : Namespace.fromJSON )(names[i], nested, depth + 1)\n );\n }\n if (json.extensions && json.extensions.length)\n type.extensions = json.extensions;\n if (json.reserved && json.reserved.length)\n type.reserved = json.reserved;\n if (json.group)\n type.group = true;\n if (json.comment)\n type.comment = json.comment;\n if (json.edition)\n type._edition = json.edition;\n type._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return type;\n};\n\n/**\n * Converts this message type to a message type descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IType} Message type descriptor\n */\nType.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"options\" , inherited && inherited.options || undefined,\n \"oneofs\" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions),\n \"fields\" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {},\n \"extensions\" , this.extensions && this.extensions.length ? this.extensions : undefined,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"group\" , this.group || undefined,\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nType.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n Namespace.prototype.resolveAll.call(this);\n var oneofs = this.oneofsArray; i = 0;\n while (i < oneofs.length)\n oneofs[i++].resolve();\n var fields = this.fieldsArray, i = 0;\n while (i < fields.length)\n fields[i++].resolve();\n return this;\n};\n\n/**\n * @override\n */\nType.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n if (!this._needsRecursiveFeatureResolution) return this;\n\n edition = this._edition || edition;\n\n Namespace.prototype._resolveFeaturesRecursive.call(this, edition);\n this.oneofsArray.forEach(oneof => {\n oneof._resolveFeatures(edition);\n });\n this.fieldsArray.forEach(field => {\n field._resolveFeatures(edition);\n });\n return this;\n};\n\n/**\n * @override\n */\nType.prototype.get = function get(name) {\n if (Object.prototype.hasOwnProperty.call(this.fields, name))\n return this.fields[name];\n if (this.oneofs && Object.prototype.hasOwnProperty.call(this.oneofs, name))\n return this.oneofs[name];\n if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name))\n return this.nested[name];\n return null;\n};\n\n/**\n * Adds a nested object to this type.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\n */\nType.prototype.add = function add(object) {\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Field && object.extend === undefined) {\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\n // The root object takes care of adding distinct sister-fields to the respective extended\n // type instead.\n\n // avoids calling the getter if not absolutely necessary because it's called quite frequently\n if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id])\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\n if (this.isReservedId(object.id))\n throw Error(\"id \" + object.id + \" is reserved in \" + this);\n if (this.isReservedName(object.name))\n throw Error(\"name '\" + object.name + \"' is reserved in \" + this);\n if (object.name === \"__proto__\")\n return this;\n\n if (object.parent)\n object.parent.remove(object);\n this.fields[object.name] = object;\n object.message = this;\n object.onAdd(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n if (object.name === \"__proto__\")\n return this;\n if (!this.oneofs)\n this.oneofs = {};\n this.oneofs[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * Removes a nested object from this type.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this type\n */\nType.prototype.remove = function remove(object) {\n if (object instanceof Field && object.extend === undefined) {\n // See Type#add for the reason why extension fields are excluded here.\n\n /* istanbul ignore if */\n if (!this.fields || this.fields[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.fields[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n\n /* istanbul ignore if */\n if (!this.oneofs || this.oneofs[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.oneofs[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message<{}>} Message instance\n */\nType.prototype.create = function create(properties) {\n return new this.ctor(properties);\n};\n\n/**\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\n * @returns {Type} `this`\n */\nType.prototype.setup = function setup() {\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\n // multiple times (V8, soft-deopt prototype-check).\n\n var fullName = this.fullName,\n types = [];\n for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i)\n types.push(this._fieldsArray[i].resolve().resolvedType);\n\n // Replace setup methods with type-specific generated functions\n this.encode = encoder(this)({\n Writer : Writer,\n types : types,\n util : util\n });\n this.decode = decoder(this)({\n Reader : Reader,\n types : types,\n util : util\n });\n this.verify = verifier(this)({\n types : types,\n util : util\n });\n this.fromObject = converter.fromObject(this)({\n types : types,\n util : util\n });\n this.toObject = converter.toObject(this)({\n types : types,\n util : util\n });\n\n // Inject custom wrappers for common types\n var wrapper = wrappers[fullName];\n if (wrapper) {\n var originalThis = Object.create(this);\n // if (wrapper.fromObject) {\n originalThis.fromObject = this.fromObject;\n this.fromObject = wrapper.fromObject.bind(originalThis);\n // }\n // if (wrapper.toObject) {\n originalThis.toObject = this.toObject;\n this.toObject = wrapper.toObject.bind(originalThis);\n // }\n }\n\n return this;\n};\n\n/**\n * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encode = function encode_setup(message, writer) { // eslint-disable-line no-unused-vars\n return this.setup().encode.apply(this, arguments); // overrides this method\n};\n\n/**\n * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\n};\n\n/**\n * Decodes a message of this type.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Length of the message, if known beforehand\n * @param {number} [end] Expected group end tag, if decoding a group\n * @param {number} [depth] Current nesting depth\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError<{}>} If required fields are missing\n */\nType.prototype.decode = function decode_setup(reader, length, end, depth) {\n return this.setup().decode(reader, length, end, depth); // overrides this method\n};\n\n/**\n * Decodes a message of this type preceeded by its byte length as a varint.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError} If required fields are missing\n */\nType.prototype.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof Reader))\n reader = Reader.create(reader);\n return this.decode(reader, reader.uint32());\n};\n\n/**\n * Verifies that field values are valid and that required fields are present.\n * @param {Object.} message Plain object to verify\n * @param {number} [depth] Current nesting depth\n * @returns {null|string} `null` if valid, otherwise the reason why it is not\n */\nType.prototype.verify = function verify_setup(message, depth) {\n return this.setup().verify(message, depth); // overrides this method\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object to convert\n * @param {number} [depth] Current nesting depth\n * @returns {Message<{}>} Message instance\n */\nType.prototype.fromObject = function fromObject(object, depth) {\n return this.setup().fromObject(object, depth);\n};\n\n/**\n * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}.\n * @interface IConversionOptions\n * @property {Function} [longs] Long conversion type.\n * Valid values are `BigInt`, `String` and `Number` (the global types).\n * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library.\n * @property {Function} [enums] Enum value conversion type.\n * Only valid value is `String` (the global type).\n * Defaults to copy the present value, which is the numeric id.\n * @property {Function} [bytes] Bytes value conversion type.\n * Valid values are `Array` and (a base64 encoded) `String` (the global types).\n * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser.\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\n * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\n * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false`\n * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any\n * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings\n */\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\nType.prototype.toObject = function toObject(message, options) { // eslint-disable-line no-unused-vars\n return this.setup().toObject.apply(this, arguments);\n};\n\n/**\n * Decorator function as returned by {@link Type.d} (TypeScript).\n * @typedef TypeDecorator\n * @type {function}\n * @param {Constructor} target Target constructor\n * @returns {undefined}\n * @template T extends Message\n */\n\n/**\n * Type decorator (TypeScript).\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {TypeDecorator} Decorator function\n * @template T extends Message\n */\nType.d = function decorateType(typeName) {\n return function typeDecorator(target) {\n util.decorateType(target, typeName);\n };\n};\n","\"use strict\";\n\n/**\n * Common type constants.\n * @namespace\n */\nvar types = exports;\n\nvar util = require(39);\n\nvar s = [\n \"double\", // 0\n \"float\", // 1\n \"int32\", // 2\n \"uint32\", // 3\n \"sint32\", // 4\n \"fixed32\", // 5\n \"sfixed32\", // 6\n \"int64\", // 7\n \"uint64\", // 8\n \"sint64\", // 9\n \"fixed64\", // 10\n \"sfixed64\", // 11\n \"bool\", // 12\n \"string\", // 13\n \"bytes\" // 14\n];\n\nfunction bake(values, offset) {\n var i = 0, o = Object.create(null);\n offset |= 0;\n while (i < values.length) o[s[i + offset]] = values[i++];\n return o;\n}\n\n/**\n * Basic type wire types.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n * @property {number} bytes=2 Ldelim wire type\n */\ntypes.basic = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2,\n /* bytes */ 2\n]);\n\n/**\n * Basic type defaults.\n * @type {Object.}\n * @const\n * @property {number} double=0 Double default\n * @property {number} float=0 Float default\n * @property {number} int32=0 Int32 default\n * @property {number} uint32=0 Uint32 default\n * @property {number} sint32=0 Sint32 default\n * @property {number} fixed32=0 Fixed32 default\n * @property {number} sfixed32=0 Sfixed32 default\n * @property {number} int64=0 Int64 default\n * @property {number} uint64=0 Uint64 default\n * @property {number} sint64=0 Sint32 default\n * @property {number} fixed64=0 Fixed64 default\n * @property {number} sfixed64=0 Sfixed64 default\n * @property {boolean} bool=false Bool default\n * @property {string} string=\"\" String default\n * @property {Array.} bytes=Array(0) Bytes default\n * @property {null} message=null Message default\n */\ntypes.defaults = bake([\n /* double */ 0,\n /* float */ 0,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 0,\n /* sfixed32 */ 0,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 0,\n /* sfixed64 */ 0,\n /* bool */ false,\n /* string */ \"\",\n /* bytes */ util.emptyArray,\n /* message */ null\n]);\n\n/**\n * Basic long type wire types.\n * @type {Object.}\n * @const\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n */\ntypes.long = bake([\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1\n], 7);\n\n/**\n * Allowed types for map keys with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n */\ntypes.mapKey = bake([\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2\n], 2);\n\n/**\n * Allowed types for packed repeated fields with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n */\ntypes.packed = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0\n]);\n","\"use strict\";\n\n/**\n * Various utility functions.\n * @namespace\n */\nvar util = module.exports = require(42);\n\nvar roots = require(32);\n\nvar Type, // cyclic\n Enum;\n\nutil.codegen = require(3);\nutil.fetch = require(5);\nutil.path = require(9);\nutil.patterns = require(43);\n\nvar reservedRe = util.patterns.reservedRe;\n\n/**\n * Node's fs module if available.\n * @type {Object.}\n */\nutil.fs = require(40);\n\n/**\n * Checks a recursion depth.\n * @param {number|undefined} depth Depth of recursion\n * @returns {number} Depth of recursion\n * @throws {Error} If depth exceeds util.recursionLimit\n */\nutil.checkDepth = function checkDepth(depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n return depth;\n};\n\n/**\n * Converts an object's values to an array.\n * @param {Object.} object Object to convert\n * @returns {Array.<*>} Converted array\n */\nutil.toArray = function toArray(object) {\n if (object) {\n var keys = Object.keys(object),\n array = new Array(keys.length),\n index = 0;\n while (index < keys.length)\n array[index] = object[keys[index++]];\n return array;\n }\n return [];\n};\n\n/**\n * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values.\n * @param {Array.<*>} array Array to convert\n * @returns {Object.} Converted object\n */\nutil.toObject = function toObject(array) {\n var object = {},\n index = 0;\n while (index < array.length) {\n var key = array[index++],\n val = array[index++];\n if (val !== undefined)\n object[key] = val;\n }\n return object;\n};\n\n/**\n * Tests whether the specified name is a reserved word in JS.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nutil.isReserved = function isReserved(name) {\n return reservedRe.test(name);\n};\n\n/**\n * Returns a safe property accessor for the specified property name.\n * @param {string} prop Property name\n * @returns {string} Safe accessor\n */\nutil.safeProp = function safeProp(prop) {\n if (!/^[$\\w_]+$/.test(prop) || reservedRe.test(prop))\n return \"[\" + JSON.stringify(prop) + \"]\";\n return \".\" + prop;\n};\n\n/**\n * Converts the first character of a string to upper case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.ucFirst = function ucFirst(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n\nvar camelCaseRe = /_([a-z])/g;\n\n/**\n * Converts a string to camel case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.camelCase = function camelCase(str) {\n return str.substring(0, 1)\n + str.substring(1)\n .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); });\n};\n\n/**\n * Compares reflected fields by id.\n * @param {Field} a First field\n * @param {Field} b Second field\n * @returns {number} Comparison value\n */\nutil.compareFieldsById = function compareFieldsById(a, b) {\n return a.id - b.id;\n};\n\n/**\n * Decorator helper for types (TypeScript).\n * @param {Constructor} ctor Constructor function\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {Type} Reflected type\n * @template T extends Message\n * @property {Root} root Decorators root\n */\nutil.decorateType = function decorateType(ctor, typeName) {\n\n /* istanbul ignore if */\n if (ctor.$type) {\n if (typeName && ctor.$type.name !== typeName) {\n util.decorateRoot.remove(ctor.$type);\n ctor.$type.name = typeName;\n util.decorateRoot.add(ctor.$type);\n }\n return ctor.$type;\n }\n\n /* istanbul ignore next */\n if (!Type)\n Type = require(37);\n\n var type = new Type(typeName || ctor.name);\n util.decorateRoot.add(type);\n type.ctor = ctor; // sets up .encode, .decode etc.\n Object.defineProperty(ctor, \"$type\", { value: type, enumerable: false });\n Object.defineProperty(ctor.prototype, \"$type\", { value: type, enumerable: false });\n return type;\n};\n\nvar decorateEnumIndex = 0;\n\n/**\n * Decorator helper for enums (TypeScript).\n * @param {Object} object Enum object\n * @returns {Enum} Reflected enum\n */\nutil.decorateEnum = function decorateEnum(object) {\n\n /* istanbul ignore if */\n if (object.$type)\n return object.$type;\n\n /* istanbul ignore next */\n if (!Enum)\n Enum = require(17);\n\n var enm = new Enum(\"Enum\" + decorateEnumIndex++, object);\n util.decorateRoot.add(enm);\n Object.defineProperty(object, \"$type\", { value: enm, enumerable: false });\n return enm;\n};\n\n\n/**\n * Sets the value of a property by property path. If a value already exists, it is turned to an array\n * @param {Object.} dst Destination object\n * @param {string} path dot '.' delimited path of the property to set\n * @param {Object} value the value to set\n * @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {Object.} Destination object\n */\nutil.setProperty = function setProperty(dst, path, value, ifNotSet) {\n function setProp(dst, path, value) {\n var part = path.shift();\n if (util.isUnsafeProperty(part))\n return dst;\n if (path.length > 0) {\n dst[part] = setProp(dst[part] || {}, path, value);\n } else {\n var prevValue = dst[part];\n if (prevValue && ifNotSet)\n return dst;\n if (prevValue)\n value = [].concat(prevValue).concat(value);\n dst[part] = value;\n }\n return dst;\n }\n\n if (typeof dst !== \"object\")\n throw TypeError(\"dst must be an object\");\n if (!path)\n throw TypeError(\"path must be specified\");\n\n path = path.split(\".\");\n if (path.length > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n return setProp(dst, path, value);\n};\n\n/**\n * Decorator root (TypeScript).\n * @name util.decorateRoot\n * @type {Root}\n * @readonly\n */\nObject.defineProperty(util, \"decorateRoot\", {\n get: function() {\n return roots[\"decorated\"] || (roots[\"decorated\"] = new (require(31))());\n }\n});\n","\"use strict\";\n\nvar fs = null;\ntry {\n fs = require(12);\n if (!fs || !fs.readFile || !fs.readFileSync)\n fs = null;\n} catch (e) {\n // `fs` is unavailable in browsers and browser-like bundles.\n}\nmodule.exports = fs;\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(42);\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(1);\n\n// converts to / from base64 encoded strings\nutil.base64 = require(2);\n\n// base class of rpc.Service\nutil.EventEmitter = require(4);\n\n// float handling accross browsers\nutil.float = require(7);\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(8);\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(11);\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(10);\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(41);\n\n/**\n * Tests if the specified key can affect object prototypes.\n * @memberof util\n * @param {string} key Key to test\n * @returns {boolean} `true` if the key is unsafe\n */\nfunction isUnsafeProperty(key) {\n return key === \"__proto__\" || key === \"prototype\" || key === \"constructor\";\n}\n\nutil.isUnsafeProperty = isUnsafeProperty;\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.global.Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || (function() {\n try {\n var Long = require(\"long\");\n return Long && Long.isLong ? Long : null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n })();\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {...(Object.|boolean)} src Source objects, optionally followed by an `ifNotSet` flag\n * @returns {Object.} Destination object\n */\nfunction merge(dst) { // used by converters\n var ifNotSet = typeof arguments[arguments.length - 1] === \"boolean\",\n limit = ifNotSet ? arguments.length - 1 : arguments.length;\n ifNotSet = ifNotSet && arguments[arguments.length - 1];\n for (var a = 1; a < limit; ++a) {\n var src = arguments[a];\n if (!src)\n continue;\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (!isUnsafeProperty(keys[i]) && (dst[keys[i]] === undefined || !ifNotSet))\n dst[keys[i]] = src[keys[i]];\n }\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Schema declaration nesting limit.\n * @memberof util\n * @type {number}\n */\nutil.nestingLimit = 32; // protoc: MaxMessageDeclarationNestingDepth\n\n/**\n * Recursion limit.\n * @memberof util\n * @type {number}\n */\nutil.recursionLimit = 100; // protoc: CodedInputStream::default_recursion_limit_\n\n/**\n * Makes a property safe for assignment as an own property.\n * @memberof util\n * @param {Object.} obj Object\n * @param {string} key Property key\n * @returns {undefined}\n */\nutil.makeProp = function makeProp(obj, key) {\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n writable: true\n });\n};\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\n\nvar patterns = exports;\n\npatterns.numberRe = /^(?![eE])[0-9]*(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/;\npatterns.typeRefRe = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;\npatterns.reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;\n","\"use strict\";\nmodule.exports = verifier;\n\nvar Enum = require(17),\n util = require(39);\n\nfunction invalid(field, expected) {\n return field.name + \": \" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected\";\n}\n\n/**\n * Generates a partial value verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\n /* eslint-disable no-unexpected-multiline */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(%s){\", ref)\n (\"default:\")\n (\"return%j\", invalid(field, \"enum value\"));\n for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen\n (\"case %i:\", field.resolvedType.values[keys[j]]);\n gen\n (\"break\")\n (\"}\");\n } else {\n gen\n (\"{\")\n (\"var e=types[%i].verify(%s,n+1);\", fieldIndex, ref)\n (\"if(e)\")\n (\"return%j+e\", field.name + \".\")\n (\"}\");\n }\n } else {\n switch (field.type) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.isInteger(%s))\", ref)\n (\"return%j\", invalid(field, \"integer\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\n (\"return%j\", invalid(field, \"integer|Long\"));\n break;\n case \"float\":\n case \"double\": gen\n (\"if(typeof %s!==\\\"number\\\")\", ref)\n (\"return%j\", invalid(field, \"number\"));\n break;\n case \"bool\": gen\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\n (\"return%j\", invalid(field, \"boolean\"));\n break;\n case \"string\": gen\n (\"if(!util.isString(%s))\", ref)\n (\"return%j\", invalid(field, \"string\"));\n break;\n case \"bytes\": gen\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\n (\"return%j\", invalid(field, \"buffer\"));\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a partial key verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyKey(gen, field, ref) {\n /* eslint-disable no-unexpected-multiline */\n switch (field.keyType) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.key32Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"integer key\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.key64Re.test(%s))\", ref) // see comment above: x is ok, d is not\n (\"return%j\", invalid(field, \"integer|Long key\"));\n break;\n case \"bool\": gen\n (\"if(!util.key2Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"boolean key\"));\n break;\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a verifier specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction verifier(mtype) {\n /* eslint-disable no-unexpected-multiline */\n\n var gen = util.codegen([\"m\", \"n\"], mtype.name + \"$verify\")\n (\"if(typeof m!==\\\"object\\\"||m===null)\")\n (\"return%j\", \"object expected\")\n (\"if(n===undefined)n=0\")\n (\"if(n>util.recursionLimit)\")\n (\"return%j\", \"maximum nesting depth exceeded\");\n var oneofs = mtype.oneofsArray,\n seenFirstField = {};\n if (oneofs.length) gen\n (\"var p={}\");\n\n for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n ref = \"m\" + util.safeProp(field.name);\n\n if (field.optional) gen\n (\"if(%s!=null&&m.hasOwnProperty(%j)){\", ref, field.name); // !== undefined && !== null\n\n // map fields\n if (field.map) { gen\n (\"if(!util.isObject(%s))\", ref)\n (\"return%j\", invalid(field, \"object\"))\n (\"var k=Object.keys(%s)\", ref)\n (\"for(var i=0;i}\n * @const\n */\nvar wrappers = exports;\n\nvar Message = require(23),\n util = require(42);\n\n/**\n * From object converter part of an {@link IWrapper}.\n * @typedef WrapperFromObjectConverter\n * @type {function}\n * @param {Object.} object Plain object\n * @returns {Message<{}>} Message instance\n * @this Type\n */\n\n/**\n * To object converter part of an {@link IWrapper}.\n * @typedef WrapperToObjectConverter\n * @type {function}\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @this Type\n */\n\n/**\n * Common type wrapper part of {@link wrappers}.\n * @interface IWrapper\n * @property {WrapperFromObjectConverter} [fromObject] From object converter\n * @property {WrapperToObjectConverter} [toObject] To object converter\n */\n\n// Custom wrapper for Any\nwrappers[\".google.protobuf.Any\"] = {\n\n fromObject: function(object, depth) {\n\n // unwrap value type if mapped\n if (object && object[\"@type\"]) {\n // Only use fully qualified type name after the last '/'\n var name = object[\"@type\"].substring(object[\"@type\"].lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type) {\n // type_url does not accept leading \".\"\n var type_url = object[\"@type\"].charAt(0) === \".\" ?\n object[\"@type\"].slice(1) : object[\"@type\"];\n // type_url prefix is optional, but path seperator is required\n if (type_url.indexOf(\"/\") === -1) {\n type_url = \"/\" + type_url;\n }\n return this.create({\n type_url: type_url,\n value: type.encode(type.fromObject(object, depth === undefined ? 1 : depth + 1)).finish()\n });\n }\n }\n\n return this.fromObject(object, depth);\n },\n\n toObject: function(message, options, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n\n // Default prefix\n var googleApi = \"type.googleapis.com/\";\n var prefix = \"\";\n var name = \"\";\n\n // decode value if requested and unmapped\n if (options && options.json && message.type_url && message.value) {\n // Only use fully qualified type name after the last '/'\n name = message.type_url.substring(message.type_url.lastIndexOf(\"/\") + 1);\n // Separate the prefix used\n prefix = message.type_url.substring(0, message.type_url.lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type)\n message = type.decode(message.value, undefined, undefined, depth + 1);\n }\n\n // wrap value if unmapped\n if (!(message instanceof this.ctor) && message instanceof Message) {\n var object = message.$type.toObject(message, options, depth + 1);\n var messageName = message.$type.fullName[0] === \".\" ?\n message.$type.fullName.slice(1) : message.$type.fullName;\n // Default to type.googleapis.com prefix if no prefix is used\n if (prefix === \"\") {\n prefix = googleApi;\n }\n name = prefix + messageName;\n object[\"@type\"] = name;\n return object;\n }\n\n return this.toObject(message, options, depth);\n }\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(42);\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return (value |= 0) < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n var lo = val.lo,\n hi = val.hi;\n while (hi) {\n buf[pos++] = lo & 127 | 128;\n lo = (lo >>> 7 | hi << 25) >>> 0;\n hi >>>= 7;\n }\n while (lo > 127) {\n buf[pos++] = lo & 127 | 128;\n lo = lo >>> 7;\n }\n buf[pos++] = lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(46);\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(42);\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/node_modules/protobufjs/dist/protobuf.min.js b/node_modules/protobufjs/dist/protobuf.min.js deleted file mode 100644 index 95668e1..0000000 --- a/node_modules/protobufjs/dist/protobuf.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * protobuf.js v7.6.1 (c) 2016, daniel wirtz - * compiled fri, 22 may 2026 02:52:09 utc - * licensed under the bsd-3-clause license - * see: https://github.com/dcodeio/protobuf.js for details - */ -!function(rt){"use strict";var r,e,i;r={1:[function(t,i,n){i.exports=function(t,i){var n=Array(arguments.length-1),s=0,r=2,o=!0;for(;r>2],r=(3&f)<<4,u=1;break;case 1:s[o++]=h[r|f>>4],r=(15&f)<<2,u=2;break;case 2:s[o++]=h[r|f>>6],s[o++]=h[63&f],u=0}8191>4,r=u,s=2;break;case 2:i[n++]=(15&r)<<4|(60&u)>>2,r=u,s=3;break;case 3:i[n++]=(3&r)<<6|u,s=0}}if(1===s)throw Error(a);return n-e},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},{}],3:[function(t,i,n){i.exports=c;var r=/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;function c(i,n){"string"==typeof i&&(n=i,i=rt);var f=[];function h(t){if("string"!=typeof t){var i=a();if(c.verbose&&console.log("codegen: "+i),i="return "+i,t){for(var n=Object.keys(t),r=Array(n.length+1),e=Array(n.length),s=0;s>>0:i<11754943508222875e-54?(e<<31|Math.round(i/1401298464324817e-60))>>>0:(e<<31|127+(t=Math.floor(Math.log(i)/Math.LN2))<<23|8388607&Math.round(i*Math.pow(2,-t)*8388608))>>>0,n,r)}function n(t,i,n){t=t(i,n),i=2*(t>>31)+1,n=t>>>23&255,t&=8388607;return 255==n?t?NaN:1/0*i:0==n?1401298464324817e-60*i*t:i*Math.pow(2,n-150)*(8388608+t)}function r(t,i,n){u[0]=t,i[n]=f[0],i[n+1]=f[1],i[n+2]=f[2],i[n+3]=f[3]}function e(t,i,n){u[0]=t,i[n]=f[3],i[n+1]=f[2],i[n+2]=f[1],i[n+3]=f[0]}function s(t,i){return f[0]=t[i],f[1]=t[i+1],f[2]=t[i+2],f[3]=t[i+3],u[0]}function o(t,i){return f[3]=t[i],f[2]=t[i+1],f[1]=t[i+2],f[0]=t[i+3],u[0]}var u,f,h,a,c;function l(t,i,n,r,e,s){var o,u=r<0?1:0;0===(r=u?-r:r)?(t(0,e,s+i),t(0<1/r?0:2147483648,e,s+n)):isNaN(r)?(t(0,e,s+i),t(2146959360,e,s+n)):17976931348623157e292>>0,e,s+n)):r<22250738585072014e-324?(t((o=r/5e-324)>>>0,e,s+i),t((u<<31|o/4294967296)>>>0,e,s+n)):(t(4503599627370496*(o=r*Math.pow(2,-(r=1024===(r=Math.floor(Math.log(r)/Math.LN2))?1023:r)))>>>0,e,s+i),t((u<<31|r+1023<<20|1048576*o&1048575)>>>0,e,s+n))}function d(t,i,n,r,e){i=t(r,e+i),t=t(r,e+n),r=2*(t>>31)+1,e=t>>>20&2047,n=4294967296*(1048575&t)+i;return 2047==e?n?NaN:1/0*r:0==e?5e-324*r*n:r*Math.pow(2,e-1075)*(n+4503599627370496)}function p(t,i,n){h[0]=t,i[n]=a[0],i[n+1]=a[1],i[n+2]=a[2],i[n+3]=a[3],i[n+4]=a[4],i[n+5]=a[5],i[n+6]=a[6],i[n+7]=a[7]}function v(t,i,n){h[0]=t,i[n]=a[7],i[n+1]=a[6],i[n+2]=a[5],i[n+3]=a[4],i[n+4]=a[3],i[n+5]=a[2],i[n+6]=a[1],i[n+7]=a[0]}function b(t,i){return a[0]=t[i],a[1]=t[i+1],a[2]=t[i+2],a[3]=t[i+3],a[4]=t[i+4],a[5]=t[i+5],a[6]=t[i+6],a[7]=t[i+7],h[0]}function w(t,i){return a[7]=t[i],a[6]=t[i+1],a[5]=t[i+2],a[4]=t[i+3],a[3]=t[i+4],a[2]=t[i+5],a[1]=t[i+6],a[0]=t[i+7],h[0]}return"undefined"!=typeof Float32Array?(u=new Float32Array([-0]),f=new Uint8Array(u.buffer),c=128===f[3],t.writeFloatLE=c?r:e,t.writeFloatBE=c?e:r,t.readFloatLE=c?s:o,t.readFloatBE=c?o:s):(t.writeFloatLE=i.bind(null,m),t.writeFloatBE=i.bind(null,y),t.readFloatLE=n.bind(null,g),t.readFloatBE=n.bind(null,j)),"undefined"!=typeof Float64Array?(h=new Float64Array([-0]),a=new Uint8Array(h.buffer),c=128===a[7],t.writeDoubleLE=c?p:v,t.writeDoubleBE=c?v:p,t.readDoubleLE=c?b:w,t.readDoubleBE=c?w:b):(t.writeDoubleLE=l.bind(null,m,0,4),t.writeDoubleBE=l.bind(null,y,4,0),t.readDoubleLE=d.bind(null,g,0,4),t.readDoubleBE=d.bind(null,j,4,0)),t}function m(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}function y(t,i,n){i[n]=t>>>24,i[n+1]=t>>>16&255,i[n+2]=t>>>8&255,i[n+3]=255&t}function g(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16|t[i+3]<<24)>>>0}function j(t,i){return(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])>>>0}i.exports=r(r)},{}],8:[function(n,t,i){t.exports=function(t){try{var i;return"function"!=typeof n?null:(i=n(t))&&(i.length||Object.keys(i).length)?i:null}catch(t){return null}}},{}],9:[function(t,i,n){var e=n.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},r=n.normalize=function(t){var i=(t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),n=e(t),t="";n&&(t=i.shift()+"/");for(var r=0;r>>1,s=null,o=r;return function(t){if(t<1||e>10))+String.fromCharCode(56320+(1023&o)))}return r},n.write=function(t,i,n){for(var r,e,s=n,o=0;o>6|192:(55296==(64512&r)&&56320==(64512&(e=t.charCodeAt(o+1)))?(++o,i[n++]=(r=65536+((1023&r)<<10)+(1023&e))>>18|240,i[n++]=r>>12&63|128):i[n++]=r>>12|224,i[n++]=r>>6&63|128),i[n++]=63&r|128);return n-s}},{}],12:[function(t,i,n){},{}],13:[function(t,i,n){i.exports=e;var r=/\/|\./;function e(t,i){r.test(t)||(t="google/protobuf/"+t+".proto",i={nested:{google:{nested:{protobuf:{nested:i}}}}}),e[t]=i}e("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),e("duration",{Duration:i={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),e("timestamp",{Timestamp:i}),e("empty",{Empty:{fields:{}}}),e("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),e("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),e("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),e.get=function(t){return e[t]||null}},{}],14:[function(t,i,n){var l=t(17),d=t(39);function o(t,i,n,r){var e=!1;if(i.resolvedType)if(i.resolvedType instanceof l){t("switch(d%s){",r);for(var s=i.resolvedType.values,o=Object.keys(s),u=0;u>>0",r,r);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",r,r);break;case"uint64":case"fixed64":f=!0;case"int64":case"sint64":case"sfixed64":t("if(util.Long)")("m%s=util.Long.fromValue(d%s,%j)",r,r,f)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,f?"true":"");break;case"bytes":t('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length >= 0)",r)("m%s=d%s",r,r);break;case"string":t("m%s=String(d%s)",r,r);break;case"bool":t("m%s=Boolean(d%s)",r,r)}}return t}function p(t,i,n,r){if(i.resolvedType)i.resolvedType instanceof l?t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",r,n,r,r,n,r,r):t("d%s=types[%i].toObject(m%s,o,q+1)",r,n,r);else{var e=!1;switch(i.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":case"fixed64":e=!0;case"int64":case"sint64":case"sfixed64":t('if(typeof BigInt!=="undefined"&&o.longs===BigInt)')('d%s=typeof m%s==="number"?BigInt(m%s):util.Long.fromBits(m%s.low>>>0,m%s.high>>>0,%j).toBigInt()',r,r,r,r,r,e)('else if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,e?"true":"",r);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:t("d%s=m%s",r,r)}}return t}n.fromObject=function(t){var i=t.fieldsArray,n=d.codegen(["d","n"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d")("if(n===undefined)n=0")("if(n>util.recursionLimit)")('throw Error("maximum nesting depth exceeded")');if(!i.length)return n("return new this.ctor");n("var m=new this.ctor");for(var r=0;rutil.recursionLimit)")('throw Error("max depth exceeded")')("var d={}"),r=[],e=[],s=[],o=0;oReader.recursionLimit)")('throw Error("maximum nesting depth exceeded")')("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter(function(t){return t.map}).length?",k,value":""))("while(r.pos>>3){"),n=0;n>>3){")("case 1: k=r.%s(); break",r.keyType)("case 2:"),f.basic[e]===rt?i("value=types[%i].decode(r,r.uint32(),undefined,n+1)",n):i("value=r.%s()",e),i("break")("default:")("r.skipType(tag2&7,n)")("break")("}")("}"),f.long[r.keyType]!==rt?i('%s[typeof k==="object"?util.longToHash(k):k]=value',s):("string"===r.keyType&&i('if(k==="__proto__")')("util.makeProp(%s,k)",s),i("%s[k]=value",s))):r.repeated?(i("if(!(%s&&%s.length))",s,s)("%s=[]",s),f.packed[e]!==rt&&i("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.posutil.recursionLimit)")('throw Error("max depth exceeded")'),r=t.fieldsArray.slice().sort(c.compareFieldsById),e=0;e>>0,8|a.mapKey[s.keyType],s.keyType),f===rt?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()",o,i):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|f,u,i),n("}")("}")):s.repeated?(n("if(%s!=null&&%s.length){",i,i),s.packed&&a.packed[u]!==rt?n("w.uint32(%i).fork()",(s.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",u,i)("w.ldelim()"):(n("for(var i=0;i<%s.length;++i)",i),f===rt?l(n,s,o,i+"[i]"):n("w.uint32(%i).%s(%s[i])",(s.id<<3|f)>>>0,u,i)),n("}")):(s.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,s.name),f===rt?l(n,s,o,i):n("w.uint32(%i).%s(%s)",(s.id<<3|f)>>>0,u,i))}return n("return w")};var h=t(17),a=t(38),c=t(39);function l(t,i,n,r){i.delimited?t("types[%i].encode(%s,w.uint32(%i),q+1).uint32(%i)",n,r,(i.id<<3|3)>>>0,(i.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()",n,r,(i.id<<3|2)>>>0)}},{17:17,38:38,39:39}],17:[function(t,i,n){i.exports=s;var f=t(26),r=(((s.prototype=Object.create(f.prototype)).constructor=s).className="Enum",t(25)),e=t(39);function s(t,i,n,r,e,s){if(f.call(this,t,n),i&&"object"!=typeof i)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=r,this.comments=e||{},this.valuesOptions=s,this.o={},this.reserved=rt,i)for(var o=Object.keys(i),u=0;u{var i=e.merge({},this.h);this.o[t]=e.merge(i,this.valuesOptions&&this.valuesOptions[t]&&this.valuesOptions[t].features||{})}),this},s.fromJSON=function(t,i){t=new s(t,i.values,i.options,i.comment,i.comments);return t.reserved=i.reserved,i.edition&&(t.f=i.edition),t.a="proto3",t},s.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return e.toObject(["edition",this.c(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:rt,"comment",t?this.comment:rt,"comments",t?this.comments:rt])},s.prototype.add=function(t,i,n,r){if(!e.isString(t))throw TypeError("name must be a string");if(!e.isInteger(i))throw TypeError("id must be an integer");if("__proto__"!==t){if(this.values[t]!==rt)throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(i))throw Error("id "+i+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(this.valuesById[i]!==rt){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+i+" in "+this);this.values[t]=i}else this.valuesById[this.values[t]=i]=t;r&&(this.valuesOptions===rt&&(this.valuesOptions={}),this.valuesOptions[t]=r||null),this.comments[t]=n||null}return this},s.prototype.remove=function(t){if(!e.isString(t))throw TypeError("name must be a string");var i=this.values[t];if(null==i)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[i],delete this.values[t],delete this.comments[t],this.valuesOptions&&delete this.valuesOptions[t],this},s.prototype.isReservedId=function(t){return r.isReservedId(this.reserved,t)},s.prototype.isReservedName=function(t){return r.isReservedName(this.reserved,t)}},{25:25,26:26,39:39}],18:[function(t,i,n){i.exports=o;var r,u=t(26),e=(((o.prototype=Object.create(u.prototype)).constructor=o).className="Field",t(17)),f=t(38),h=t(39),a=/^required|optional|repeated$/;function o(t,i,n,r,e,s,o){if(h.isObject(r)?(o=e,s=r,r=e=rt):h.isObject(e)&&(o=s,s=e,e=rt),u.call(this,t,s),!h.isInteger(i)||i<0)throw TypeError("id must be a non-negative integer");if(!h.isString(n))throw TypeError("type must be a string");if(r!==rt&&!a.test(r=r.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(e!==rt&&!h.isString(e))throw TypeError("extend must be a string");this.rule=(r="proto3_optional"===r?"optional":r)&&"optional"!==r?r:rt,this.type=n,this.id=i,this.extend=e||rt,this.repeated="repeated"===r,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!h.Long&&f.long[n]!==rt,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=o}o.fromJSON=function(t,i){t=new o(t,i.id,i.type,i.rule,i.extend,i.options,i.comment);return i.edition&&(t.f=i.edition),t.a="proto3",t},Object.defineProperty(o.prototype,"required",{get:function(){return"LEGACY_REQUIRED"===this.h.field_presence}}),Object.defineProperty(o.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(o.prototype,"delimited",{get:function(){return this.resolvedType instanceof r&&"DELIMITED"===this.h.message_encoding}}),Object.defineProperty(o.prototype,"packed",{get:function(){return"PACKED"===this.h.repeated_field_encoding}}),Object.defineProperty(o.prototype,"hasPresence",{get:function(){return!this.repeated&&!this.map&&(this.partOf||this.declaringField||this.extensionField||"IMPLICIT"!==this.h.field_presence)}}),o.prototype.setOption=function(t,i,n){return u.prototype.setOption.call(this,t,i,n)},o.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return h.toObject(["edition",this.c(),"rule","optional"!==this.rule&&this.rule||rt,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:rt])},o.prototype.resolve=function(){var t;return this.resolved?this:((this.typeDefault=f.defaults[this.type])===rt?(this.resolvedType=(this.declaringField||this).parent.lookupTypeOrEnum(this.type),this.resolvedType instanceof r?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof e&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed===rt||!this.resolvedType||this.resolvedType instanceof e||delete this.options.packed,Object.keys(this.options).length||(this.options=rt)),this.long?(this.typeDefault=h.Long.fromNumber(this.typeDefault,"uint64"===this.type||"fixed64"===this.type),Object.freeze&&Object.freeze(this.typeDefault)):this.bytes&&"string"==typeof this.typeDefault&&(h.base64.test(this.typeDefault)?h.base64.decode(this.typeDefault,t=h.newBuffer(h.base64.length(this.typeDefault)),0):h.utf8.write(this.typeDefault,t=h.newBuffer(h.utf8.length(this.typeDefault)),0),this.typeDefault=t),this.map?this.defaultValue=h.emptyObject:this.repeated?this.defaultValue=h.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof r&&(this.parent.ctor.prototype[this.name]=this.defaultValue),u.prototype.resolve.call(this))},o.prototype.l=function(t){var i;return"proto2"!==t&&"proto3"!==t?{}:(t={},"required"===this.rule&&(t.field_presence="LEGACY_REQUIRED"),this.parent&&f.defaults[this.type]===rt&&(i=this.parent.get(this.type.split(".").pop()))&&i instanceof r&&i.group&&(t.message_encoding="DELIMITED"),!0===this.getOption("packed")?t.repeated_field_encoding="PACKED":!1===this.getOption("packed")&&(t.repeated_field_encoding="EXPANDED"),t)},o.prototype.u=function(t){return u.prototype.u.call(this,this.f||t)},o.d=function(n,r,e,s){return"function"==typeof r?r=h.decorateType(r).name:r&&"object"==typeof r&&(r=h.decorateEnum(r).name),function(t,i){h.decorateType(t.constructor).add(new o(i,n,r,e,{default:s}))}},o.p=function(t){r=t}},{17:17,26:26,38:38,39:39}],19:[function(t,i,n){var r=i.exports=t(20);r.build="light",r.load=function(t,i,n){return(i="function"==typeof i?(n=i,new r.Root):i||new r.Root).load(t,n)},r.loadSync=function(t,i){return(i=i||new r.Root).loadSync(t)},r.encoder=t(16),r.decoder=t(15),r.verifier=t(44),r.converter=t(14),r.ReflectionObject=t(26),r.Namespace=t(25),r.Root=t(31),r.Enum=t(17),r.Type=t(37),r.Field=t(18),r.OneOf=t(27),r.MapField=t(22),r.Service=t(35),r.Method=t(24),r.Message=t(23),r.wrappers=t(45),r.types=t(38),r.util=t(39),r.ReflectionObject.p(r.Root),r.Namespace.p(r.Type,r.Service,r.Enum),r.Root.p(r.Type),r.Field.p(r.Type)},{14:14,15:15,16:16,17:17,18:18,20:20,22:22,23:23,24:24,25:25,26:26,27:27,31:31,35:35,37:37,38:38,39:39,44:44,45:45}],20:[function(t,i,n){var r=n;function e(){r.util.p(),r.Writer.p(r.BufferWriter),r.Reader.p(r.BufferReader)}r.build="minimal",r.Writer=t(46),r.BufferWriter=t(47),r.Reader=t(29),r.BufferReader=t(30),r.util=t(42),r.rpc=t(33),r.roots=t(32),r.configure=e,e()},{29:29,30:30,32:32,33:33,42:42,46:46,47:47}],21:[function(t,i,n){i=i.exports=t(19);i.build="full",i.tokenize=t(36),i.parse=t(28),i.common=t(13),i.Root.p(i.Type,i.parse,i.common)},{13:13,19:19,28:28,36:36}],22:[function(t,i,n){i.exports=s;var o=t(18),r=(((s.prototype=Object.create(o.prototype)).constructor=s).className="MapField",t(38)),u=t(39);function s(t,i,n,r,e,s){if(o.call(this,t,i,r,rt,rt,e,s),!u.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(t,i){return new s(t,i.id,i.keyType,i.type,i.options,i.comment)},s.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return u.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:rt])},s.prototype.resolve=function(){if(this.resolved)return this;if(r.mapKey[this.keyType]===rt)throw Error("invalid key type: "+this.keyType);return o.prototype.resolve.call(this)},s.d=function(n,r,e){return"function"==typeof e?e=u.decorateType(e).name:e&&"object"==typeof e&&(e=u.decorateEnum(e).name),function(t,i){u.decorateType(t.constructor).add(new s(i,n,r,e))}}},{18:18,38:38,39:39}],23:[function(t,i,n){i.exports=e;var r=t(42);function e(t){if(t)for(var i=Object.keys(t),n=0;ni)return!0;return!1},c.isReservedName=function(t,i){if(t)for(var n=0;nh.recursionLimit)throw Error("max depth exceeded");for(var n=this;0{t.g(i)})),this},c.prototype.lookup=function(t,i,n){if("boolean"==typeof i?(n=i,i=rt):i&&!Array.isArray(i)&&(i=[i]),h.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;var r=t.join(".");if(""===t[0])return this.root.lookup(t.slice(1),i);var e=this.root.j&&this.root.j["."+r];if(e&&(!i||~i.indexOf(e.constructor)))return e;if((e=this.k(t,r))&&(!i||~i.indexOf(e.constructor)))return e;if(!n)for(var s=this;s.parent;){if((e=s.parent.k(t,r))&&(!i||~i.indexOf(e.constructor)))return e;s=s.parent}return null},c.prototype.k=function(t,i){if(Object.prototype.hasOwnProperty.call(this.b,i))return this.b[i];var n=this.get(t[0]),r=null;if(n)1===t.length?r=n:n instanceof c&&(t=t.slice(1),r=n.k(t,t.join(".")));else for(var e=0;eZ.recursionLimit)throw Error("max depth exceeded");if(tt.test(e=l()))return T(h=new D(e),function(t){if(!A(h,t,a)){if("rpc"!==t)throw k(t);var i=h,n=v(),r=t;if(!tt.test(t=l()))throw k(t,"name");var e,s,o,u=t;if(p("("),p("stream",!0)&&(s=!0),!it.test(t=l()))throw k(t);if(e=t,p(")"),p("returns"),p("("),p("stream",!0)&&(o=!0),!it.test(t=l()))throw k(t);t=t,p(")");var f=new C(u,r,e,t,s,o);f.comment=n,T(f,function(t){if("option"!==t)throw k(t);L(f,t),p(";")}),i.add(f)}}),r.add(h),r===m&&y.push(h),1;throw k(e,"service name");case"extend":var s,o=t,r=i,u=n;if(it.test(r=l()))return s=r,T(null,function(t){switch(t){case"required":case"repeated":S(o,t,s,u+1);break;case"optional":S(o,"proto3"===w?"proto3_optional":"optional",s,u+1);break;default:if("proto2"===w||!it.test(t))throw k(t);c(t),S(o,"optional",s,u+1)}}),1;throw k(r,"reference")}}function T(t,i,n){var r,e=h.line;if(t&&("string"!=typeof t.comment&&(t.comment=v()),t.filename=nt.filename),p("{",!0)){for(;"}"!==(r=l());)i(r);p(";",!0)}else n&&n(),p(";"),t&&("string"!=typeof t.comment||f)&&(t.comment=v(e)||t.comment)}function I(t,i,f){if((f=f===rt?0:f)>Z.nestingLimit)throw Error("max depth exceeded");if(!tt.test(i=l()))throw k(i,"type name");var h=new q(i);T(h,function(t){if(!A(h,t,f))switch(t){case"map":var i=h,n=(p("<"),l());if(X.mapKey[n]===rt)throw k(n,"type");p(",");var r=l();if(!it.test(r))throw k(r,"type");p(">");var e=l();if(!tt.test(e))throw k(e,"name");p("=");var s=new R(j(e),x(l()),n,r);T(s,function(t){if("option"!==t)throw k(t);L(s,t),p(";")},function(){M(s)}),i.add(s);break;case"required":if("proto2"!==w)throw k(t);case"repeated":S(h,t,rt,f+1);break;case"optional":if("proto3"===w)S(h,"proto3_optional",rt,f+1);else{if("proto2"!==w)throw k(t);S(h,"optional",rt,f+1)}break;case"oneof":var e=h,n=t,o=f+1;if(!tt.test(n=l()))throw k(n,"name");var u=new U(j(n));T(u,function(t){"option"===t?(L(u,t),p(";")):(c(t),S(u,"optional",rt,o))}),e.add(u);break;case"extensions":_(h.extensions||(h.extensions=[]));break;case"reserved":_(h.reserved||(h.reserved=[]),!0);break;default:if("proto2"===w||!it.test(t))throw k(t);c(t),S(h,"optional",rt,f+1)}}),t.add(h),t===m&&y.push(h)}function S(t,i,n,r){var e=l();if("group"===e){var s=t,o=i,u=r;if((u=u===rt?0:u)>Z.nestingLimit)throw Error("max depth exceeded");if(2023<=w)throw k("group");var f,h,r=l();if(tt.test(r))return h=Z.lcFirst(r),r===h&&(r=Z.ucFirst(r)),p("="),a=x(l()),(f=new q(r)).group=!0,(h=new F(h,a,r,o)).filename=nt.filename,T(f,function(t){switch(t){case"option":L(f,t),p(";");break;case"required":case"repeated":S(f,t,rt,u+1);break;case"optional":S(f,"proto3"===w?"proto3_optional":"optional",rt,u+1);break;case"message":I(f,0,u+1);break;case"enum":N(f);break;case"reserved":_(f.reserved||(f.reserved=[]),!0);break;default:throw k(t)}}),void s.add(f).add(h);throw k(r,"name")}for(;e.endsWith(".")||d().startsWith(".");)e+=l();if(!it.test(e))throw k(e,"type");var a=l();if(!tt.test(a))throw k(a,"name");a=j(a),p("=");var c=new F(a,x(l()),e,i,n);T(c,function(t){if("option"!==t)throw k(t);L(c,t),p(";")},function(){M(c)}),"proto3_optional"===i?(o=new U("_"+a),c.setOption("proto3_optional",!0),o.add(c),t.add(o)):t.add(c),t===m&&y.push(c)}function N(t,i){if(!tt.test(i=l()))throw k(i,"name");var s=new B(i);T(s,function(t){switch(t){case"option":L(s,t),p(";");break;case"reserved":_(s.reserved||(s.reserved=[]),!0),s.reserved===rt&&(s.reserved=[]);break;default:var i=s,n=t;if(!tt.test(n))throw k(n,"name");p("=");var r=x(l(),!0),e={options:rt,getOption:function(t){return this.options[t]},setOption:function(t,i){z.prototype.setOption.call(e,t,i)},setParsedOption:function(){return rt}};return T(e,function(t){if("option"!==t)throw k(t);L(e,t),p(";")},function(){M(e)}),void i.add(n,r,e.comment,e.parsedOptions||e.options)}}),t.add(s),t===m&&y.push(s)}function L(t,i){var n=!0;for("option"===i&&(i=l());"="!==i;){if("("===i&&(r=l(),p(")"),i="("+r+")"),n){if(n=!1,i.includes(".")&&!i.includes("(")){var r=i.split("."),e=r[0]+".";i=r[1];continue}e=i}else f=f?f+i:i;i=l()}var s,o,u=f?e.concat(f):e,u=function t(i,n,r){r===rt&&(r=0);if(r>Z.recursionLimit)throw Error("max depth exceeded");if(p("{",!0)){for(var e={};!p("}",!0);){if(!tt.test(a=l()))throw k(a,"name");if(null===a)throw k(a,"end of input");var s,o,u=a;if(p(":",!0),"{"===d())s=t(i,n+"."+a,r+1);else if("["===d()){if(s=[],p("[",!0)){for(;o=O(!0),s.push(o),p(",",!0););p("]"),void 0!==o&&V(i,n+"."+a,o)}}else s=O(!0),V(i,n+"."+a,s);var f=e[u];f&&(s=[].concat(f).concat(s)),"__proto__"!==u&&(e[u]=s),p(",",!0),p(";",!0)}return e}var h=O(!0);V(i,n,h);return h}(t,u),f=f&&"."===f[0]?f.slice(1):f;e=e&&"."===e[e.length-1]?e.slice(0,-1):e,s=e,u=u,o=f,(t=t).setParsedOption&&t.setParsedOption(s,u,o)}function V(t,i,n){m===t&&/^features\./.test(i)?g[i]=n:t.setOption&&t.setOption(i,n)}function M(t){if(p("[",!0)){for(;L(t,"option"),p(",",!0););p("]")}}for(;null!==(a=l());)switch(a){case"package":if(!b)throw k(a);if(r!==rt)throw k("package");if(r=l(),!it.test(r))throw k(r,"name");m=m.define(r),p(";");break;case"import":if(!b)throw k(a);switch(u=o=void 0,d()){case"weak":u=s=s||[],l();break;case"public":l();default:u=e=e||[]}o=E(),p(";"),u.push(o);break;case"syntax":if(!b)throw k(a);if(p("="),(w=E())<2023)throw k(w,"syntax");p(";");break;case"edition":if(!b)throw k(a);if(p("="),w=E(),!["2023"].includes(w))throw k(w,"edition");p(";");break;case"option":L(m,a),p(";",!0);break;default:if(A(m,a,0)){b=!1;continue}throw k(a)}return y.forEach(i=>{i.f=w,Object.keys(g).forEach(t=>{i.getOption(t)===rt&&i.setOption(t,g[t],!0)})}),nt.filename=null,{package:r,imports:e,weakImports:s,root:i}}},{17:17,18:18,22:22,24:24,26:26,27:27,31:31,35:35,36:36,37:37,38:38,39:39}],29:[function(t,i,n){i.exports=f;var r,e=t(42),s=e.LongBits,o=e.utf8;function u(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function f(t){this.buf=t,this.pos=0,this.len=t.length}function h(){return e.Buffer?function(t){return(f.create=function(t){return e.Buffer.isBuffer(t)?new r(t):c(t)})(t)}:c}var a,c="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new f(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new f(t);throw Error("illegal buffer")};function l(){var t=new s(0,0),i=0;if(!(4=this.len)throw u(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*i)>>>0,t}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(i=0,4>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw u(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function d(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw u(this,8);return new s(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}f.create=h(),f.prototype.A=e.Array.prototype.subarray||e.Array.prototype.slice,f.prototype.uint32=(a=4294967295,function(){if(a=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(a=(a|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128||(a=(a|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128||(a=(a|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128||(a=(a|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128||!((this.pos+=5)>this.len))))))return a;throw this.pos=this.len,u(this,10)}),f.prototype.int32=function(){return 0|this.uint32()},f.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},f.prototype.bool=function(){return 0!==this.uint32()},f.prototype.fixed32=function(){if(this.pos+4>this.len)throw u(this,4);return d(this.buf,this.pos+=4)},f.prototype.sfixed32=function(){if(this.pos+4>this.len)throw u(this,4);return 0|d(this.buf,this.pos+=4)},f.prototype.float=function(){if(this.pos+4>this.len)throw u(this,4);var t=e.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},f.prototype.double=function(){if(this.pos+8>this.len)throw u(this,4);var t=e.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},f.prototype.bytes=function(){var t=this.uint32(),i=this.pos,n=this.pos+t;if(n>this.len)throw u(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,n):i===n?(t=e.Buffer)?t.alloc(0):new this.buf.constructor(0):this.A.call(this.buf,i,n)},f.prototype.string=function(){var t=this.bytes();return o.read(t,0,t.length)},f.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw u(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw u(this)}while(128&this.buf[this.pos++]);return this},f.recursionLimit=e.recursionLimit,f.prototype.skipType=function(t,i){if(f.recursionLimit<(i=i===rt?0:i))throw Error("maximum nesting depth exceeded");switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t,i+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},f.p=function(t){r=t,f.create=h(),r.p();var i=e.Long?"toLong":"toNumber";e.merge(f.prototype,{int64:function(){return l.call(this)[i](!1)},uint64:function(){return l.call(this)[i](!0)},sint64:function(){return l.call(this).zzDecode()[i](!1)},fixed64:function(){return p.call(this)[i](!0)},sfixed64:function(){return p.call(this)[i](!1)}})}},{42:42}],30:[function(t,i,n){i.exports=s;var r=t(29),e=((s.prototype=Object.create(r.prototype)).constructor=s,t(42));function s(t){r.call(this,t)}s.p=function(){e.Buffer&&(s.prototype.A=e.Buffer.prototype.slice)},s.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},s.p()},{29:29,42:42}],31:[function(t,i,n){i.exports=f;var r,p,v,e=t(25),s=(((f.prototype=Object.create(e.prototype)).constructor=f).className="Root",t(18)),o=t(17),u=t(27),b=t(39);function f(t){e.call(this,"",t),this.deferred=[],this.files=[],this.f="proto2",this.j={}}function w(){}f.fromJSON=function(t,i,n){return n=b.checkDepth(n),i=i||new f,t.options&&i.setOptions(t.options),i.addJSON(t.nested,n).resolveAll()},f.prototype.resolvePath=b.path.resolve,f.prototype.fetch=b.fetch,f.prototype.load=function t(i,o,s){"function"==typeof o&&(s=o,o=rt);var u=this;if(!s)return b.asPromise(t,u,i,o);var f=s===w;function h(t,i){if(s){if(f)throw t;i&&i.resolveAll();var n=s;s=null,n(t,i)}}function a(t){var i=t.lastIndexOf("google/protobuf/");if(-1b.recursionLimit)throw Error("max depth exceeded");if(b.isString(i)&&"{"==(i[0]||"")&&(i=JSON.parse(i)),b.isString(i)){p.filename=t;var r,e=p(i,u,o),s=0;if(e.imports)for(;s{t.g(i)})),this},a.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof o?"__proto__"===t.name?this:e((this.methods[t.name]=t).parent=this):r.prototype.add.call(this,t)},a.prototype.remove=function(t){if(t instanceof o){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,e(this)}return r.prototype.remove.call(this,t)},a.prototype.create=function(t,i,n){for(var r,e=new f.Service(t,i,n),s=0;s]/g,O=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,_=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,x=/^ *[*/]+ */,A=/^\s*\*?\/*/,T=/\n/g,I=/\s/,r=/\\(.?)/g,e={0:"\0",r:"\r",n:"\n",t:"\t"};function S(t){return t.replace(r,function(t,i){switch(i){case"\\":case"":return i;default:return e[i]||""}})}function s(h,a){h=h.toString();var c=0,l=h.length,d=1,f=0,p={},v=[],b=null;function w(t){return Error("illegal "+t+" (line "+d+")")}function m(t){return h[0|t]||""}function y(t,i,n){var r,e={type:h[0|t++]||"",lineEmpty:!1,leading:n},n=a?2:3,s=t-n;do{if(--s<0||"\n"==(r=h[0|s]||"")){e.lineEmpty=!0;break}}while(" "===r||"\t"===r);for(var o=h.substring(t,i).split(T),u=0;ud.nestingLimit)throw Error("max depth exceeded");for(var r=new y(t,i.options),e=(r.extensions=i.extensions,r.reserved=i.reserved,Object.keys(i.fields)),s=0;s{t.u(i)}),this.fieldsArray.forEach(t=>{t.u(i)})),this},y.prototype.get=function(t){return Object.prototype.hasOwnProperty.call(this.fields,t)?this.fields[t]:this.oneofs&&Object.prototype.hasOwnProperty.call(this.oneofs,t)?this.oneofs[t]:this.nested&&Object.prototype.hasOwnProperty.call(this.nested,t)?this.nested[t]:null},y.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof a&&t.extend===rt){if((this.I||this.fieldsById)[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return"__proto__"===t.name?this:(t.parent&&t.parent.remove(t),(this.fields[t.name]=t).message=this,t.onAdd(this),r(this))}return t instanceof h?"__proto__"===t.name?this:(this.oneofs||(this.oneofs={}),(this.oneofs[t.name]=t).onAdd(this),r(this)):u.prototype.add.call(this,t)},y.prototype.remove=function(t){if(t instanceof a&&t.extend===rt){if(this.fields&&this.fields[t.name]===t)return delete this.fields[t.name],t.parent=null,t.onRemove(this),r(this);throw Error(t+" is not a member of "+this)}if(t instanceof h){if(this.oneofs&&this.oneofs[t.name]===t)return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),r(this);throw Error(t+" is not a member of "+this)}return u.prototype.remove.call(this,t)},y.prototype.isReservedId=function(t){return u.isReservedId(this.reserved,t)},y.prototype.isReservedName=function(t){return u.isReservedName(this.reserved,t)},y.prototype.create=function(t){return new this.ctor(t)},y.prototype.setup=function(){for(var t=this.fullName,i=[],n=0;no.recursionLimit)throw Error("max depth exceeded");return t},o.toArray=function(t){if(t){for(var i=Object.keys(t),n=Array(i.length),r=0;ro.recursionLimit)throw Error("max depth exceeded");return function t(i,n,r){var e=n.shift();if(!o.isUnsafeProperty(e))if(0>>0,this.hi=i>>>0}var s=e.zero=new e(0,0),o=(s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1},e.zeroHash="\0\0\0\0\0\0\0\0",e.fromNumber=function(t){var i,n;return 0===t?s:(n=(t=(i=t<0)?-t:t)>>>0,t=(t-n)/4294967296>>>0,i&&(t=~t>>>0,n=~n>>>0,4294967295<++n&&(n=0,4294967295<++t&&(t=0))),new e(n,t))},e.from=function(t){if("number"==typeof t)return e.fromNumber(t);if(r.isString(t)){if(!r.Long)return e.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new e(t.low>>>0,t.high>>>0):s},e.prototype.toNumber=function(t){var i;return!t&&this.hi>>>31?(t=1+~this.lo>>>0,i=~this.hi>>>0,-(t+4294967296*(i=t?i:i+1>>>0))):this.lo+4294967296*this.hi},e.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}},String.prototype.charCodeAt);e.fromHash=function(t){return"\0\0\0\0\0\0\0\0"===t?s:new e((o.call(t,0)|o.call(t,1)<<8|o.call(t,2)<<16|o.call(t,3)<<24)>>>0,(o.call(t,4)|o.call(t,5)<<8|o.call(t,6)<<16|o.call(t,7)<<24)>>>0)},e.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},e.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},e.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},e.prototype.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0==n?0==i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:n<128?9:10}},{42:42}],42:[function(i,t,n){var r=n;function u(t){return"__proto__"===t||"prototype"===t||"constructor"===t}function e(t){for(var i=(n="boolean"==typeof arguments[arguments.length-1])?arguments.length-1:arguments.length,n=n&&arguments[arguments.length-1],r=1;rutil.recursionLimit)")("return%j","maximum nesting depth exceeded"),n=t.oneofsArray,r={};n.length&&i("var p={}");for(var e=0;ef.recursionLimit)throw Error("max depth exceeded");var r,e,s="",o="";return i&&i.json&&t.type_url&&t.value&&(o=t.type_url.substring(1+t.type_url.lastIndexOf("/")),s=t.type_url.substring(0,1+t.type_url.lastIndexOf("/")),(r=this.lookup(o))&&(t=r.decode(t.value,rt,rt,n+1))),!(t instanceof this.ctor)&&t instanceof u?(r=t.$type.toObject(t,i,n+1),e="."===t.$type.fullName[0]?t.$type.fullName.slice(1):t.$type.fullName,r["@type"]=o=(s=""===s?"type.googleapis.com/":s)+e,r):this.toObject(t,i,n)}}},{23:23,42:42}],46:[function(t,i,n){i.exports=c;var r,e=t(42),s=e.LongBits,o=e.base64,u=e.utf8;function f(t,i,n){this.fn=t,this.len=i,this.next=rt,this.val=n}function h(){}function a(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function c(){this.len=0,this.head=new f(h,0,0),this.tail=this.head,this.states=null}function l(){return e.Buffer?function(){return(c.create=function(){return new r})()}:function(){return new c}}function d(t,i,n){i[n]=255&t}function p(t,i){this.len=t,this.next=rt,this.val=i}function v(t,i,n){for(var r=t.lo,e=t.hi;e;)i[n++]=127&r|128,r=(r>>>7|e<<25)>>>0,e>>>=7;for(;127>>=7;i[n++]=r}function b(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}c.create=l(),c.alloc=function(t){return new e.Array(t)},e.Array!==Array&&(c.alloc=e.pool(c.alloc,e.Array.prototype.subarray)),c.prototype.M=function(t,i,n){return this.tail=this.tail.next=new f(t,i,n),this.len+=i,this},(p.prototype=Object.create(f.prototype)).fn=function(t,i,n){for(;127>>=7;i[n]=t},c.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new p((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},c.prototype.int32=function(t){return(t|=0)<0?this.M(v,10,s.fromNumber(t)):this.uint32(t)},c.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},c.prototype.int64=c.prototype.uint64=function(t){t=s.from(t);return this.M(v,t.length(),t)},c.prototype.sint64=function(t){t=s.from(t).zzEncode();return this.M(v,t.length(),t)},c.prototype.bool=function(t){return this.M(d,1,t?1:0)},c.prototype.sfixed32=c.prototype.fixed32=function(t){return this.M(b,4,t>>>0)},c.prototype.sfixed64=c.prototype.fixed64=function(t){t=s.from(t);return this.M(b,4,t.lo).M(b,4,t.hi)},c.prototype.float=function(t){return this.M(e.float.writeFloatLE,4,t)},c.prototype.double=function(t){return this.M(e.float.writeDoubleLE,8,t)};var w=e.Array.prototype.set?function(t,i,n){i.set(t,n)}:function(t,i,n){for(var r=0;r>>0;return n?(e.isString(t)&&(i=c.alloc(n=o.length(t)),o.decode(t,i,0),t=i),this.uint32(n).M(w,n,t)):this.M(d,1,0)},c.prototype.string=function(t){var i=u.length(t);return i?this.uint32(i).M(u.write,i,t):this.M(d,1,0)},c.prototype.fork=function(){return this.states=new a(this),this.head=this.tail=new f(h,0,0),this.len=0,this},c.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new f(h,0,0),this.len=0),this},c.prototype.ldelim=function(){var t=this.head,i=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=i,this.len+=n),this},c.prototype.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,i,n),n+=t.len,t=t.next;return i},c.p=function(t){r=t,c.create=l(),r.p()}},{42:42}],47:[function(t,i,n){i.exports=s;var r=t(46),e=((s.prototype=Object.create(r.prototype)).constructor=s,t(42));function s(){r.call(this)}function o(t,i,n){t.length<40?e.utf8.write(t,i,n):i.utf8Write?i.utf8Write(t,n):i.write(t,n)}s.p=function(){s.alloc=e.V,s.writeBytesBuffer=e.Buffer&&e.Buffer.prototype instanceof Uint8Array&&"set"===e.Buffer.prototype.set.name?function(t,i,n){i.set(t,n)}:function(t,i,n){if(t.copy)t.copy(i,n,0,t.length);else for(var r=0;r>>0;return this.uint32(i),i&&this.M(s.writeBytesBuffer,i,t),this},s.prototype.string=function(t){var i=e.Buffer.byteLength(t);return this.uint32(i),i&&this.M(o,i,t),this},s.p()},{42:42,46:46}]},e={},(i=function t(i){var n=e[i];return n||r[i][0].call(n=e[i]={exports:{}},t,n,n.exports),n.exports}([21][0])).util.global.protobuf=i,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&t.isLong&&(i.util.Long=t,i.configure()),i}),"object"==typeof module&&module&&module.exports&&(module.exports=i)}(); -//# sourceMappingURL=protobuf.min.js.map diff --git a/node_modules/protobufjs/dist/protobuf.min.js.map b/node_modules/protobufjs/dist/protobuf.min.js.map deleted file mode 100644 index ebedfdb..0000000 --- a/node_modules/protobufjs/dist/protobuf.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["lib/prelude.js","../node_modules/@protobufjs/aspromise/index.js","../node_modules/@protobufjs/base64/index.js","../node_modules/@protobufjs/codegen/index.js","../node_modules/@protobufjs/eventemitter/index.js","../node_modules/@protobufjs/fetch/index.js","../node_modules/@protobufjs/fetch/util/fs.js","../node_modules/@protobufjs/float/index.js","../node_modules/@protobufjs/inquire/index.js","../node_modules/@protobufjs/path/index.js","../node_modules/@protobufjs/pool/index.js","../node_modules/@protobufjs/utf8/index.js","../src/common.js","../src/converter.js","../src/decoder.js","../src/encoder.js","../src/enum.js","../src/field.js","../src/index-light.js","../src/index-minimal.js","../src/index","../src/mapfield.js","../src/message.js","../src/method.js","../src/namespace.js","../src/object.js","../src/oneof.js","../src/parse.js","../src/reader.js","../src/reader_buffer.js","../src/root.js","../src/roots.js","../src/rpc.js","../src/rpc/service.js","../src/service.js","../src/tokenize.js","../src/type.js","../src/types.js","../src/util.js","../src/util/fs.js","../src/util/longbits.js","../src/util/minimal.js","../src/util/patterns.js","../src/verifier.js","../src/wrappers.js","../src/writer.js","../src/writer_buffer.js"],"names":["undefined","modules","cache","protobuf","1","require","module","exports","fn","ctx","params","Array","arguments","length","offset","index","pending","Promise","resolve","reject","err","apply","base64","string","p","n","Math","ceil","b64","s64","i","encode","buffer","start","end","t","parts","chunk","j","b","push","String","fromCharCode","slice","join","invalidEncoding","decode","c","charCodeAt","Error","test","codegen","reservedRe","functionParams","functionName","body","Codegen","formatStringOrScope","source","toString","verbose","console","log","scopeKeys","Object","keys","scopeParams","scopeValues","scopeOffset","Function","formatParams","formatOffset","replace","$0","$1","value","Number","floor","JSON","stringify","functionNameOverride","name","EventEmitter","this","_listeners","create","prototype","on","evt","off","listeners","splice","emit","args","fetch","asPromise","fs","filename","options","callback","xhr","readFile","contents","XMLHttpRequest","binary","onreadystatechange","readyState","status","response","responseText","Uint8Array","overrideMimeType","responseType","open","send","readFileSync","e","factory","writeFloat_ieee754","writeUint","val","buf","pos","sign","isNaN","round","exponent","LN2","pow","readFloat_ieee754","readUint","uint","mantissa","NaN","Infinity","writeFloat_f32_cpy","f32","f8b","writeFloat_f32_rev","readFloat_f32_cpy","readFloat_f32_rev","f64","le","writeDouble_ieee754","off0","off1","readDouble_ieee754","lo","hi","writeDouble_f64_cpy","writeDouble_f64_rev","readDouble_f64_cpy","readDouble_f64_rev","Float32Array","writeFloatLE","writeFloatBE","readFloatLE","readFloatBE","bind","writeUintLE","writeUintBE","readUintLE","readUintBE","Float64Array","writeDoubleLE","writeDoubleBE","readDoubleLE","readDoubleBE","moduleName","mod","isAbsolute","path","normalize","split","absolute","prefix","shift","originPath","includePath","alreadyNormalized","alloc","size","SIZE","MAX","slab","call","utf8","len","read","str","c3","c2","t2","write","c1","common","commonRe","json","nested","google","Any","fields","type_url","type","id","Duration","timeType","seconds","nanos","Timestamp","Empty","Struct","keyType","Value","oneofs","kind","oneof","nullValue","numberValue","stringValue","boolValue","structValue","listValue","NullValue","values","NULL_VALUE","ListValue","rule","DoubleValue","FloatValue","Int64Value","UInt64Value","Int32Value","UInt32Value","BoolValue","StringValue","BytesValue","FieldMask","paths","get","file","Enum","util","genValuePartial_fromObject","gen","field","fieldIndex","prop","defaultAlreadyEmitted","resolvedType","typeDefault","repeated","fullName","isUnsigned","genValuePartial_toObject","converter","fromObject","mtype","fieldsArray","safeProp","map","toObject","sort","compareFieldsById","repeatedFields","mapFields","normalFields","partOf","arrayDefault","valuesById","long","low","high","unsigned","toNumber","bytes","hasKs2","_fieldsArray","indexOf","filter","ref","types","defaults","basic","packed","delimited","rfield","required","wireType","mapKey","genTypePartial","optional","ReflectionObject","Namespace","constructor","className","comment","comments","valuesOptions","TypeError","_valuesFeatures","reserved","_resolveFeatures","edition","_edition","forEach","key","parentFeaturesCopy","merge","_features","features","fromJSON","enm","_defaultEdition","toJSON","toJSONOptions","keepComments","Boolean","_editionToJSON","add","isString","isInteger","isReservedId","isReservedName","allow_alias","remove","Field","Type","ruleRe","extend","isObject","toLowerCase","message","defaultValue","Long","extensionField","declaringField","defineProperty","field_presence","message_encoding","repeated_field_encoding","setOption","ifNotSet","resolved","parent","lookupTypeOrEnum","proto3_optional","fromNumber","freeze","newBuffer","emptyObject","emptyArray","ctor","_inferLegacyProtoFeatures","pop","group","getOption","d","fieldId","fieldType","fieldRule","decorateType","decorateEnum","fieldName","default","_configure","Type_","build","load","root","Root","loadSync","encoder","decoder","verifier","OneOf","MapField","Service","Method","Message","wrappers","configure","Writer","BufferWriter","Reader","BufferReader","rpc","roots","tokenize","parse","resolvedKeyType","fieldKeyType","fieldValueType","properties","$type","writer","encodeDelimited","reader","decodeDelimited","verify","object","requestType","requestStream","responseStream","parsedOptions","resolvedRequestType","resolvedResponseType","lookupType","arrayToJSON","array","obj","_nestedArray","_lookupCache","_needsRecursiveFeatureResolution","_needsRecursiveResolve","clearCache","namespace","depth","checkDepth","addJSON","toArray","nestedArray","nestedJson","names","methods","hasOwnProperty","getEnum","prev","setOptions","onAdd","onRemove","define","isArray","recursionLimit","ptr","part","resolveAll","_resolveFeaturesRecursive","lookup","filterTypes","parentAlreadyChecked","flatPath","found","_fullyQualifiedObjects","_lookupImpl","current","exact","lookupEnum","lookupService","Service_","Enum_","editions2023Defaults","enum_type","json_format","utf8_validation","proto2Defaults","proto3Defaults","_featuresResolved","defineProperties","unshift","_handleAdd","_handleRemove","protoFeatures","assign","lexicalParentFeaturesCopy","setProperty","setParsedOption","propName","opt","newOpt","find","newValue","Root_","fieldNames","addFieldsToParent","oneofName","oneOfGetter","set","oneOfSetter","keepCase","base10Re","base10NegRe","base16Re","base16NegRe","base8Re","base8NegRe","numberRe","patterns","nameRe","typeRefRe","pkg","imports","weakImports","token","whichImports","preferTrailingComment","tn","alternateCommentMode","next","peek","skip","cmnt","head","topLevelObjects","topLevelOptions","applyCase","camelCase","illegal","insideTryCatch","line","readString","readValue","acceptTypeRef","parseNumber","substring","parseInt","parseFloat","readRanges","target","acceptStrings","parseId","dummy","ifBlock","parseOption","parseInlineOptions","acceptNegative","parseCommon","parseType","parseEnum","parseService","service","parseMethod","commentText","method","parseExtension","reference","parseField","fnIf","fnElse","trailingLine","nestingLimit","parseMapField","valueType","parseOneOf","extensions","parseGroup","lcFirst","ucFirst","endsWith","startsWith","parseEnumValue","isOption","parensValue","includes","tokens","option","concat","optionValue","parseOptionValue","objectResult","lastValue","prevValue","simpleValue","package","LongBits","indexOutOfRange","writeLength","RangeError","Buffer","isBuffer","create_array","readLongVarint","bits","readFixed32_end","readFixed64","_slice","subarray","uint32","int32","sint32","bool","fixed32","sfixed32","float","double","nativeBuffer","skipType","BufferReader_","int64","uint64","sint64","zzDecode","fixed64","sfixed64","utf8Slice","min","deferred","files","SYNC","resolvePath","self","sync","finish","cb","getBundledFileName","idx","lastIndexOf","altname","process","parsed","queued","weak","setTimeout","isNode","exposeRe","tryHandleExtension","sisterField","extendedType","parse_","common_","rpcImpl","requestDelimited","responseDelimited","rpcCall","requestCtor","responseCtor","request","endedByRPC","_methodsArray","inherited","methodsArray","rpcService","methodName","m","q","s","delimRe","stringDoubleRe","stringSingleRe","setCommentRe","setCommentAltRe","setCommentSplitRe","whitespaceRe","unescapeRe","unescapeMap","0","r","unescape","lastCommentLine","stack","stringDelim","subject","charAt","setComment","isLeading","lineEmpty","leading","lookback","commentOffset","lines","trim","text","isDoubleSlashCommentLine","startOffset","endOffset","findEndOfLine","lineText","cursor","re","match","lastIndex","exec","repeat","curr","isDoc","isLeadingComment","expected","actual","ret","_fieldsById","_oneofsArray","_ctor","fieldsById","oneofsArray","generateConstructor","ctorProperties","setup","originalThis","wrapper","fork","ldelim","typeName","bake","o","camelCaseRe","isReserved","toUpperCase","decorateEnumIndex","a","decorateRoot","enumerable","dst","setProp","isUnsafeProperty","zero","zzEncode","zeroHash","from","fromString","toLong","fromHash","hash","toHash","mask","part0","part1","part2","limit","src","newError","CustomError","captureStackTrace","writable","configurable","inquire","pool","global","versions","node","window","isFinite","isset","isSet","utf8Write","_Buffer_from","_Buffer_allocUnsafe","sizeOrArray","dcodeIO","isLong","key2Re","key32Re","key64Re","longToHash","longFromHash","fromBits","makeProp","ProtocolError","fieldMap","longs","enums","encoding","allocUnsafe","seenFirstField","oneofProp","invalid","genVerifyValue","messageName","Op","noop","State","tail","states","writeByte","VarintOp","writeVarint64","writeFixed32","_push","writeBytes","reset","BufferWriter_","writeStringBuffer","writeBytesBuffer","copy","byteLength","$require","$module","amd"],"mappings":";;;;;;AAAA,CAAA,SAAAA,IAAA,aAAA,IAAAC,EAAAC,EAcAC,EAdAF,EAiCA,CAAAG,EAAA,CAAA,SAAAC,EAAAC,EAAAC,GChCAD,EAAAC,QAmBA,SAAAC,EAAAC,GACA,IAAAC,EAAAC,MAAAC,UAAAC,OAAA,CAAA,EACAC,EAAA,EACAC,EAAA,EACAC,EAAA,CAAA,EACA,KAAAD,EAAAH,UAAAC,QACAH,EAAAI,CAAA,IAAAF,UAAAG,CAAA,IACA,OAAA,IAAAE,QAAA,SAAAC,EAAAC,GACAT,EAAAI,GAAA,SAAAM,GACA,GAAAJ,EAEA,GADAA,EAAA,CAAA,EACAI,EACAD,EAAAC,CAAA,MACA,CAGA,IAFA,IAAAV,EAAAC,MAAAC,UAAAC,OAAA,CAAA,EACAC,EAAA,EACAA,EAAAJ,EAAAG,QACAH,EAAAI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CAAA,EAIAT,EAAA,WAAA,CAUAU,SAAAC,EAAA,CACAL,OAAA,CACAM,QAAA,CACAJ,KAAA,QACAC,GAAA,CACA,EACAI,MAAA,CACAL,KAAA,QACAC,GAAA,CACA,CACA,CACA,CACA,CAAA,EAEAT,EAAA,YAAA,CAUAc,UAAAH,CACA,CAAA,EAEAX,EAAA,QAAA,CAOAe,MAAA,CACAT,OAAA,EACA,CACA,CAAA,EAEAN,EAAA,SAAA,CASAgB,OAAA,CACAV,OAAA,CACAA,OAAA,CACAW,QAAA,SACAT,KAAA,QACAC,GAAA,CACA,CACA,CACA,EAeAS,MAAA,CACAC,OAAA,CACAC,KAAA,CACAC,MAAA,CACA,YACA,cACA,cACA,YACA,cACA,YAEA,CACA,EACAf,OAAA,CACAgB,UAAA,CACAd,KAAA,YACAC,GAAA,CACA,EACAc,YAAA,CACAf,KAAA,SACAC,GAAA,CACA,EACAe,YAAA,CACAhB,KAAA,SACAC,GAAA,CACA,EACAgB,UAAA,CACAjB,KAAA,OACAC,GAAA,CACA,EACAiB,YAAA,CACAlB,KAAA,SACAC,GAAA,CACA,EACAkB,UAAA,CACAnB,KAAA,YACAC,GAAA,CACA,CACA,CACA,EAEAmB,UAAA,CACAC,OAAA,CACAC,WAAA,CACA,CACA,EASAC,UAAA,CACAzB,OAAA,CACAuB,OAAA,CACAG,KAAA,WACAxB,KAAA,QACAC,GAAA,CACA,CACA,CACA,CACA,CAAA,EAEAT,EAAA,WAAA,CASAiC,YAAA,CACA3B,OAAA,CACA9H,MAAA,CACAgI,KAAA,SACAC,GAAA,CACA,CACA,CACA,EASAyB,WAAA,CACA5B,OAAA,CACA9H,MAAA,CACAgI,KAAA,QACAC,GAAA,CACA,CACA,CACA,EASA0B,WAAA,CACA7B,OAAA,CACA9H,MAAA,CACAgI,KAAA,QACAC,GAAA,CACA,CACA,CACA,EASA2B,YAAA,CACA9B,OAAA,CACA9H,MAAA,CACAgI,KAAA,SACAC,GAAA,CACA,CACA,CACA,EASA4B,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2qB,EAAAI,EAAAvkB,EAAAhH,CAAA,EACAQ,IACA,EAUA4S,EAAAlB,EAAA,mB9CpFA3W,MAcAC,EAPA,SAAAmwB,EAAArrB,GACA,IAAAsrB,EAAArwB,EAAA+E,GAGA,OAFAsrB,GACAtwB,EAAAgF,GAAA,GAAAwG,KAAA8kB,EAAArwB,EAAA+E,GAAA,CAAA1E,QAAA,EAAA,EAAA+vB,EAAAC,EAAAA,EAAAhwB,OAAA,EACAgwB,EAAAhwB,OACA,OAEA,EAAA,GAGA2O,KAAAoe,OAAAntB,SAAAA,EAGA,YAAA,OAAA4a,QAAAA,OAAAyV,KACAzV,OAAA,CAAA,QAAA,SAAAjG,GAKA,OAJAA,GAAAA,EAAAoZ,SACA/tB,EAAA+O,KAAA4F,KAAAA,EACA3U,EAAA0X,UAAA,GAEA1X,CACA,CAAA,EAGA,UAAA,OAAAG,QAAAA,QAAAA,OAAAC,UACAD,OAAAC,QAAAJ","file":"protobuf.min.js","sourcesContent":["(function prelude(modules, cache, entries) {\n\n // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS\n // sources through a conflict-free require shim and is again wrapped within an iife that\n // provides a minification-friendly `undefined` var plus a global \"use strict\" directive\n // so that minification can remove the directives of each module.\n\n function $require(name) {\n var $module = cache[name];\n if (!$module)\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n return $module.exports;\n }\n\n var protobuf = $require(entries[0]);\n\n // Expose globally\n protobuf.util.global.protobuf = protobuf;\n\n // Be nice to AMD\n if (typeof define === \"function\" && define.amd)\n define([\"long\"], function(Long) {\n if (Long && Long.isLong) {\n protobuf.util.Long = Long;\n protobuf.configure();\n }\n return protobuf;\n });\n\n // Be nice to CommonJS\n if (typeof module === \"object\" && module && module.exports)\n module.exports = protobuf;\n\n})/* end of prelude */","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @param {string[]} functionParams Function parameter names\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n */\r\nfunction codegen(functionParams, functionName) {\r\n\r\n /* istanbul ignore if */\r\n if (typeof functionParams === \"string\") {\r\n functionName = functionParams;\r\n functionParams = undefined;\r\n }\r\n\r\n var body = [];\r\n\r\n /**\r\n * Appends code to the function's body or finishes generation.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any\r\n * @param {...*} [formatParams] Format parameters\r\n * @returns {Codegen|Function} Itself or the generated function if finished\r\n * @throws {Error} If format parameter counts do not match\r\n */\r\n\r\n function Codegen(formatStringOrScope) {\r\n // note that explicit array handling below makes this ~50% faster\r\n\r\n // finish the function\r\n if (typeof formatStringOrScope !== \"string\") {\r\n var source = toString();\r\n if (codegen.verbose)\r\n console.log(\"codegen: \" + source); // eslint-disable-line no-console\r\n source = \"return \" + source;\r\n if (formatStringOrScope) {\r\n var scopeKeys = Object.keys(formatStringOrScope),\r\n scopeParams = new Array(scopeKeys.length + 1),\r\n scopeValues = new Array(scopeKeys.length),\r\n scopeOffset = 0;\r\n while (scopeOffset < scopeKeys.length) {\r\n scopeParams[scopeOffset] = scopeKeys[scopeOffset];\r\n scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]];\r\n }\r\n scopeParams[scopeOffset] = source;\r\n return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func\r\n }\r\n return Function(source)(); // eslint-disable-line no-new-func\r\n }\r\n\r\n // otherwise append to body\r\n var formatParams = new Array(arguments.length - 1),\r\n formatOffset = 0;\r\n while (formatOffset < formatParams.length)\r\n formatParams[formatOffset] = arguments[++formatOffset];\r\n formatOffset = 0;\r\n formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {\r\n var value = formatParams[formatOffset++];\r\n switch ($1) {\r\n case \"d\": case \"f\": return String(Number(value));\r\n case \"i\": return String(Math.floor(value));\r\n case \"j\": return JSON.stringify(value);\r\n case \"s\": return String(value);\r\n }\r\n return \"%\";\r\n });\r\n if (formatOffset !== formatParams.length)\r\n throw Error(\"parameter count mismatch\");\r\n body.push(formatStringOrScope);\r\n return Codegen;\r\n }\r\n\r\n function toString(functionNameOverride) {\r\n return \"function \" + safeFunctionName(functionNameOverride || functionName) + \"(\" + (functionParams && functionParams.join(\",\") || \"\") + \"){\\n \" + body.join(\"\\n \") + \"\\n}\";\r\n }\r\n\r\n Codegen.toString = toString;\r\n return Codegen;\r\n}\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @function codegen\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * When set to `true`, codegen will log generated code to console. Useful for debugging.\r\n * @name util.codegen.verbose\r\n * @type {boolean}\r\n */\r\ncodegen.verbose = false;\r\n\r\nfunction safeFunctionName(name) {\r\n if (!name)\r\n return \"\";\r\n name = String(name).replace(/[^\\w$]/g, \"\");\r\n if (!name)\r\n return \"\";\r\n if (/^\\d/.test(name))\r\n name = \"_\" + name;\r\n return reservedRe.test(name) ? name + \"_\" : name;\r\n}\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = Object.create(null);\r\n}\r\n\r\n/**\r\n * Event listener as used by {@link util.EventEmitter}.\r\n * @typedef EventEmitterListener\r\n * @type {function}\r\n * @param {...*} args Arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {EventEmitterListener} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {EventEmitterListener} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = Object.create(null);\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n if (!listeners)\r\n return this;\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {this} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n fs = require(6);\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Options as used by {@link util.fetch}.\r\n * @interface IFetchOptions\r\n * @property {boolean} [binary=false] Whether expecting a binary response\r\n * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} filename File path or url\r\n * @param {IFetchOptions} options Fetch options\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction fetch(filename, options, callback) {\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = {};\r\n } else if (!options)\r\n options = {};\r\n\r\n if (!callback)\r\n return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this\r\n\r\n // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found.\r\n if (!options.xhr && fs && fs.readFile)\r\n return fs.readFile(filename, function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch.xhr(filename, options, callback)\r\n : err\r\n ? callback(err)\r\n : callback(null, options.binary ? contents : contents.toString(\"utf8\"));\r\n });\r\n\r\n // use the XHR version otherwise.\r\n return fetch.xhr(filename, options, callback);\r\n}\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {IFetchOptions} [options] Fetch options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n\r\n/**/\r\nfetch.xhr = function fetch_xhr(filename, options, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n\r\n if (xhr.readyState !== 4)\r\n return undefined;\r\n\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n if (xhr.status !== 0 && xhr.status !== 200)\r\n return callback(Error(\"status \" + xhr.status));\r\n\r\n // if binary data is expected, make sure that some sort of array is returned, even if\r\n // ArrayBuffers are not supported. the binary string fallback, however, is unsafe.\r\n if (options.binary) {\r\n var buffer = xhr.response;\r\n if (!buffer) {\r\n buffer = [];\r\n for (var i = 0; i < xhr.responseText.length; ++i)\r\n buffer.push(xhr.responseText.charCodeAt(i) & 255);\r\n }\r\n return callback(null, typeof Uint8Array !== \"undefined\" ? new Uint8Array(buffer) : buffer);\r\n }\r\n return callback(null, xhr.responseText);\r\n };\r\n\r\n if (options.binary) {\r\n // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers\r\n if (\"overrideMimeType\" in xhr)\r\n xhr.overrideMimeType(\"text/plain; charset=x-user-defined\");\r\n xhr.responseType = \"arraybuffer\";\r\n }\r\n\r\n xhr.open(\"GET\", filename);\r\n xhr.send();\r\n};\r\n","\"use strict\";\r\n\r\nvar fs = null;\r\ntry {\r\n fs = require(12);\r\n if (!fs || !fs.readFile || !fs.readFileSync)\r\n fs = null;\r\n} catch (e) {\r\n // `fs` is unavailable in browsers and browser-like bundles.\r\n}\r\nmodule.exports = fs;\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n * @deprecated Legacy optional require helper. Will be removed in a future release.\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n if (typeof require !== \"function\") {\r\n return null;\r\n }\r\n var mod = require(moduleName);\r\n if (mod && (mod.length || Object.keys(mod).length)) return mod;\r\n return null;\r\n } catch (err) {\r\n // ignore\r\n return null;\r\n }\r\n}\r\n\r\n/*\r\n// maybe worth a shot to prevent renaming issues:\r\n// see: https://github.com/webpack/webpack/blob/master/lib/dependencies/CommonJsRequireDependencyParserPlugin.js\r\n// triggers on:\r\n// - expression require.cache\r\n// - expression require (???)\r\n// - call require\r\n// - call require:commonjs:item\r\n// - call require:commonjs:context\r\n\r\nObject.defineProperty(Function.prototype, \"__self\", { get: function() { return this; } });\r\nvar r = require.__self;\r\ndelete Function.prototype.__self;\r\n*/\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0 && parts[i - 1] !== \"..\")\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\r\n};\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports,\r\n replacementChar = \"\\ufffd\";\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n if (end - start < 1) {\r\n return \"\";\r\n }\r\n\r\n var str = \"\";\r\n for (var i = start; i < end;) {\r\n var t = buffer[i++];\r\n if (t <= 0x7F) {\r\n str += String.fromCharCode(t);\r\n } else if (t >= 0xC0 && t < 0xE0) {\r\n var c2 = (t & 0x1F) << 6 | buffer[i++] & 0x3F;\r\n str += c2 >= 0x80 ? String.fromCharCode(c2) : replacementChar;\r\n } else if (t >= 0xE0 && t < 0xF0) {\r\n var c3 = (t & 0xF) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F;\r\n str += c3 >= 0x800 ? String.fromCharCode(c3) : replacementChar;\r\n } else if (t >= 0xF0) {\r\n var t2 = (t & 7) << 18 | (buffer[i++] & 0x3F) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F;\r\n if (t2 < 0x10000 || t2 > 0x10FFFF)\r\n str += replacementChar;\r\n else {\r\n t2 -= 0x10000;\r\n str += String.fromCharCode(0xD800 + (t2 >> 10));\r\n str += String.fromCharCode(0xDC00 + (t2 & 0x3FF));\r\n }\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\nmodule.exports = common;\n\nvar commonRe = /\\/|\\./;\n\n/**\n * Provides common type definitions.\n * Can also be used to provide additional google types or your own custom types.\n * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name\n * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition\n * @returns {undefined}\n * @property {INamespace} google/protobuf/any.proto Any\n * @property {INamespace} google/protobuf/duration.proto Duration\n * @property {INamespace} google/protobuf/empty.proto Empty\n * @property {INamespace} google/protobuf/field_mask.proto FieldMask\n * @property {INamespace} google/protobuf/struct.proto Struct, Value, NullValue and ListValue\n * @property {INamespace} google/protobuf/timestamp.proto Timestamp\n * @property {INamespace} google/protobuf/wrappers.proto Wrappers\n * @example\n * // manually provides descriptor.proto (assumes google/protobuf/ namespace and .proto extension)\n * protobuf.common(\"descriptor\", descriptorJson);\n *\n * // manually provides a custom definition (uses my.foo namespace)\n * protobuf.common(\"my/foo/bar.proto\", myFooBarJson);\n */\nfunction common(name, json) {\n if (!commonRe.test(name)) {\n name = \"google/protobuf/\" + name + \".proto\";\n json = { nested: { google: { nested: { protobuf: { nested: json } } } } };\n }\n common[name] = json;\n}\n\n// Not provided because of limited use (feel free to discuss or to provide yourself):\n//\n// google/protobuf/descriptor.proto\n// google/protobuf/source_context.proto\n// google/protobuf/type.proto\n//\n// Stripped and pre-parsed versions of these non-bundled files are instead available as part of\n// the repository or package within the google/protobuf directory.\n\ncommon(\"any\", {\n\n /**\n * Properties of a google.protobuf.Any message.\n * @interface IAny\n * @type {Object}\n * @property {string} [typeUrl]\n * @property {Uint8Array} [bytes]\n * @memberof common\n */\n Any: {\n fields: {\n type_url: {\n type: \"string\",\n id: 1\n },\n value: {\n type: \"bytes\",\n id: 2\n }\n }\n }\n});\n\nvar timeType;\n\ncommon(\"duration\", {\n\n /**\n * Properties of a google.protobuf.Duration message.\n * @interface IDuration\n * @type {Object}\n * @property {number|Long} [seconds]\n * @property {number} [nanos]\n * @memberof common\n */\n Duration: timeType = {\n fields: {\n seconds: {\n type: \"int64\",\n id: 1\n },\n nanos: {\n type: \"int32\",\n id: 2\n }\n }\n }\n});\n\ncommon(\"timestamp\", {\n\n /**\n * Properties of a google.protobuf.Timestamp message.\n * @interface ITimestamp\n * @type {Object}\n * @property {number|Long} [seconds]\n * @property {number} [nanos]\n * @memberof common\n */\n Timestamp: timeType\n});\n\ncommon(\"empty\", {\n\n /**\n * Properties of a google.protobuf.Empty message.\n * @interface IEmpty\n * @memberof common\n */\n Empty: {\n fields: {}\n }\n});\n\ncommon(\"struct\", {\n\n /**\n * Properties of a google.protobuf.Struct message.\n * @interface IStruct\n * @type {Object}\n * @property {Object.} [fields]\n * @memberof common\n */\n Struct: {\n fields: {\n fields: {\n keyType: \"string\",\n type: \"Value\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Value message.\n * @interface IValue\n * @type {Object}\n * @property {string} [kind]\n * @property {0} [nullValue]\n * @property {number} [numberValue]\n * @property {string} [stringValue]\n * @property {boolean} [boolValue]\n * @property {IStruct} [structValue]\n * @property {IListValue} [listValue]\n * @memberof common\n */\n Value: {\n oneofs: {\n kind: {\n oneof: [\n \"nullValue\",\n \"numberValue\",\n \"stringValue\",\n \"boolValue\",\n \"structValue\",\n \"listValue\"\n ]\n }\n },\n fields: {\n nullValue: {\n type: \"NullValue\",\n id: 1\n },\n numberValue: {\n type: \"double\",\n id: 2\n },\n stringValue: {\n type: \"string\",\n id: 3\n },\n boolValue: {\n type: \"bool\",\n id: 4\n },\n structValue: {\n type: \"Struct\",\n id: 5\n },\n listValue: {\n type: \"ListValue\",\n id: 6\n }\n }\n },\n\n NullValue: {\n values: {\n NULL_VALUE: 0\n }\n },\n\n /**\n * Properties of a google.protobuf.ListValue message.\n * @interface IListValue\n * @type {Object}\n * @property {Array.} [values]\n * @memberof common\n */\n ListValue: {\n fields: {\n values: {\n rule: \"repeated\",\n type: \"Value\",\n id: 1\n }\n }\n }\n});\n\ncommon(\"wrappers\", {\n\n /**\n * Properties of a google.protobuf.DoubleValue message.\n * @interface IDoubleValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n DoubleValue: {\n fields: {\n value: {\n type: \"double\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.FloatValue message.\n * @interface IFloatValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n FloatValue: {\n fields: {\n value: {\n type: \"float\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Int64Value message.\n * @interface IInt64Value\n * @type {Object}\n * @property {number|Long} [value]\n * @memberof common\n */\n Int64Value: {\n fields: {\n value: {\n type: \"int64\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.UInt64Value message.\n * @interface IUInt64Value\n * @type {Object}\n * @property {number|Long} [value]\n * @memberof common\n */\n UInt64Value: {\n fields: {\n value: {\n type: \"uint64\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Int32Value message.\n * @interface IInt32Value\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n Int32Value: {\n fields: {\n value: {\n type: \"int32\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.UInt32Value message.\n * @interface IUInt32Value\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n UInt32Value: {\n fields: {\n value: {\n type: \"uint32\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.BoolValue message.\n * @interface IBoolValue\n * @type {Object}\n * @property {boolean} [value]\n * @memberof common\n */\n BoolValue: {\n fields: {\n value: {\n type: \"bool\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.StringValue message.\n * @interface IStringValue\n * @type {Object}\n * @property {string} [value]\n * @memberof common\n */\n StringValue: {\n fields: {\n value: {\n type: \"string\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.BytesValue message.\n * @interface IBytesValue\n * @type {Object}\n * @property {Uint8Array} [value]\n * @memberof common\n */\n BytesValue: {\n fields: {\n value: {\n type: \"bytes\",\n id: 1\n }\n }\n }\n});\n\ncommon(\"field_mask\", {\n\n /**\n * Properties of a google.protobuf.FieldMask message.\n * @interface IDoubleValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n FieldMask: {\n fields: {\n paths: {\n rule: \"repeated\",\n type: \"string\",\n id: 1\n }\n }\n }\n});\n\n/**\n * Gets the root definition of the specified common proto file.\n *\n * Bundled definitions are:\n * - google/protobuf/any.proto\n * - google/protobuf/duration.proto\n * - google/protobuf/empty.proto\n * - google/protobuf/field_mask.proto\n * - google/protobuf/struct.proto\n * - google/protobuf/timestamp.proto\n * - google/protobuf/wrappers.proto\n *\n * @param {string} file Proto file name\n * @returns {INamespace|null} Root definition or `null` if not defined\n */\ncommon.get = function get(file) {\n return common[file] || null;\n};\n","\"use strict\";\n/**\n * Runtime message from/to plain object converters.\n * @namespace\n */\nvar converter = exports;\n\nvar Enum = require(17),\n util = require(39);\n\n/**\n * Generates a partial value fromObject conveter.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} prop Property reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genValuePartial_fromObject(gen, field, fieldIndex, prop) {\n var defaultAlreadyEmitted = false;\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(d%s){\", prop);\n for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) {\n // enum unknown values passthrough\n if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen\n (\"default:\")\n (\"if(typeof(d%s)===\\\"number\\\"){m%s=d%s;break}\", prop, prop, prop);\n if (!field.repeated) gen // fallback to default value only for\n // arrays, to avoid leaving holes.\n (\"break\"); // for non-repeated fields, just ignore\n defaultAlreadyEmitted = true;\n }\n gen\n (\"case%j:\", keys[i])\n (\"case %i:\", values[keys[i]])\n (\"m%s=%j\", prop, values[keys[i]])\n (\"break\");\n } gen\n (\"}\");\n } else gen\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s=types[%i].fromObject(d%s,n+1)\", prop, fieldIndex, prop);\n } else {\n var isUnsigned = false;\n switch (field.type) {\n case \"double\":\n case \"float\": gen\n (\"m%s=Number(d%s)\", prop, prop); // also catches \"NaN\", \"Infinity\"\n break;\n case \"uint32\":\n case \"fixed32\": gen\n (\"m%s=d%s>>>0\", prop, prop);\n break;\n case \"int32\":\n case \"sint32\":\n case \"sfixed32\": gen\n (\"m%s=d%s|0\", prop, prop);\n break;\n case \"uint64\":\n case \"fixed64\":\n isUnsigned = true;\n // eslint-disable-next-line no-fallthrough\n case \"int64\":\n case \"sint64\":\n case \"sfixed64\": gen\n (\"if(util.Long)\")\n (\"m%s=util.Long.fromValue(d%s,%j)\", prop, prop, isUnsigned)\n (\"else if(typeof d%s===\\\"string\\\")\", prop)\n (\"m%s=parseInt(d%s,10)\", prop, prop)\n (\"else if(typeof d%s===\\\"number\\\")\", prop)\n (\"m%s=d%s\", prop, prop)\n (\"else if(typeof d%s===\\\"object\\\")\", prop)\n (\"m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)\", prop, prop, prop, isUnsigned ? \"true\" : \"\");\n break;\n case \"bytes\": gen\n (\"if(typeof d%s===\\\"string\\\")\", prop)\n (\"util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)\", prop, prop, prop)\n (\"else if(d%s.length >= 0)\", prop)\n (\"m%s=d%s\", prop, prop);\n break;\n case \"string\": gen\n (\"m%s=String(d%s)\", prop, prop);\n break;\n case \"bool\": gen\n (\"m%s=Boolean(d%s)\", prop, prop);\n break;\n /* default: gen\n (\"m%s=d%s\", prop, prop);\n break; */\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a plain object to runtime message converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.fromObject = function fromObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray;\n var gen = util.codegen([\"d\", \"n\"], mtype.name + \"$fromObject\")\n (\"if(d instanceof this.ctor)\")\n (\"return d\")\n (\"if(n===undefined)n=0\")\n (\"if(n>util.recursionLimit)\")\n (\"throw Error(\\\"maximum nesting depth exceeded\\\")\");\n if (!fields.length) return gen\n (\"return new this.ctor\");\n gen\n (\"var m=new this.ctor\");\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n prop = util.safeProp(field.name);\n\n // Map fields\n if (field.map) { gen\n (\"if(d%s){\", prop)\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s={}\", prop)\n (\"for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0,%j).toBigInt()\", prop, prop, prop, prop, prop, isUnsigned)\n (\"else if(typeof m%s===\\\"number\\\")\", prop)\n (\"d%s=o.longs===String?String(m%s):m%s\", prop, prop, prop)\n (\"else\") // Long-like\n (\"d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s\", prop, prop, prop, prop, isUnsigned ? \"true\": \"\", prop);\n break;\n case \"bytes\": gen\n (\"d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s\", prop, prop, prop, prop, prop);\n break;\n default: gen\n (\"d%s=m%s\", prop, prop);\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a runtime message to plain object converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.toObject = function toObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById);\n if (!fields.length)\n return util.codegen()(\"return {}\");\n var gen = util.codegen([\"m\", \"o\", \"q\"], mtype.name + \"$toObject\")\n (\"if(!o)\")\n (\"o={}\")\n (\"if(q===undefined)q=0\")\n (\"if(q>util.recursionLimit)\")\n (\"throw Error(\\\"max depth exceeded\\\")\")\n (\"var d={}\");\n\n var repeatedFields = [],\n mapFields = [],\n normalFields = [],\n i = 0;\n for (; i < fields.length; ++i)\n if (!fields[i].partOf)\n ( fields[i].resolve().repeated ? repeatedFields\n : fields[i].map ? mapFields\n : normalFields).push(fields[i]);\n\n if (repeatedFields.length) { gen\n (\"if(o.arrays||o.defaults){\");\n for (i = 0; i < repeatedFields.length; ++i) gen\n (\"d%s=[]\", util.safeProp(repeatedFields[i].name));\n gen\n (\"}\");\n }\n\n if (mapFields.length) { gen\n (\"if(o.objects||o.defaults){\");\n for (i = 0; i < mapFields.length; ++i) gen\n (\"d%s={}\", util.safeProp(mapFields[i].name));\n gen\n (\"}\");\n }\n\n if (normalFields.length) { gen\n (\"if(o.defaults){\");\n for (i = 0; i < normalFields.length; ++i) {\n var field = normalFields[i],\n prop = util.safeProp(field.name);\n if (field.resolvedType instanceof Enum) gen\n (\"d%s=o.enums===String?%j:%j\", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);\n else if (field.long) gen\n (\"if(util.Long){\")\n (\"var n=new util.Long(%i,%i,%j)\", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)\n (\"d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!==\\\"undefined\\\"&&o.longs===BigInt?n.toBigInt():n\", prop)\n (\"}else\")\n (\"d%s=o.longs===String?%j:typeof BigInt!==\\\"undefined\\\"&&o.longs===BigInt?BigInt(%j):%i\", prop, field.typeDefault.toString(), field.typeDefault.toString(), field.typeDefault.toNumber());\n else if (field.bytes) {\n var arrayDefault = Array.prototype.slice.call(field.typeDefault);\n gen\n (\"if(o.bytes===String)d%s=%j\", prop, String.fromCharCode.apply(String, field.typeDefault))\n (\"else{\")\n (\"d%s=%j\", prop, arrayDefault)\n (\"if(o.bytes!==Array)d%s=util.newBuffer(d%s)\", prop, prop)\n (\"}\");\n } else gen\n (\"d%s=%j\", prop, field.typeDefault); // also messages (=null)\n } gen\n (\"}\");\n }\n var hasKs2 = false;\n for (i = 0; i < fields.length; ++i) {\n var field = fields[i],\n index = mtype._fieldsArray.indexOf(field),\n prop = util.safeProp(field.name);\n if (field.map) {\n if (!hasKs2) { hasKs2 = true; gen\n (\"var ks2\");\n } gen\n (\"if(m%s&&(ks2=Object.keys(m%s)).length){\", prop, prop)\n (\"d%s={}\", prop)\n (\"for(var j=0;jReader.recursionLimit)\")\n (\"throw Error(\\\"maximum nesting depth exceeded\\\")\")\n (\"var c=l===undefined?r.len:r.pos+l,m=new this.ctor\" + (mtype.fieldsArray.filter(function(field) { return field.map; }).length ? \",k,value\" : \"\"))\n (\"while(r.pos>>3){\");\n\n var i = 0;\n for (; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n ref = \"m\" + util.safeProp(field.name); gen\n (\"case %i: {\", field.id);\n\n // Map fields\n if (field.map) { gen\n (\"if(%s===util.emptyObject)\", ref)\n (\"%s={}\", ref)\n (\"var c2 = r.uint32()+r.pos\");\n\n if (types.defaults[field.keyType] !== undefined) gen\n (\"k=%j\", types.defaults[field.keyType]);\n else gen\n (\"k=null\");\n\n if (types.defaults[type] !== undefined) gen\n (\"value=%j\", types.defaults[type]);\n else gen\n (\"value=null\");\n\n gen\n (\"while(r.pos>>3){\")\n (\"case 1: k=r.%s(); break\", field.keyType)\n (\"case 2:\");\n\n if (types.basic[type] === undefined) gen\n (\"value=types[%i].decode(r,r.uint32(),undefined,n+1)\", i); // can't be groups\n else gen\n (\"value=r.%s()\", type);\n\n gen\n (\"break\")\n (\"default:\")\n (\"r.skipType(tag2&7,n)\")\n (\"break\")\n (\"}\")\n (\"}\");\n\n if (types.long[field.keyType] !== undefined) gen\n (\"%s[typeof k===\\\"object\\\"?util.longToHash(k):k]=value\", ref);\n else {\n if (field.keyType === \"string\") gen\n (\"if(k===\\\"__proto__\\\")\")\n (\"util.makeProp(%s,k)\", ref);\n gen\n (\"%s[k]=value\", ref);\n }\n\n // Repeated fields\n } else if (field.repeated) { gen\n\n (\"if(!(%s&&%s.length))\", ref, ref)\n (\"%s=[]\", ref);\n\n // Packable (always check for forward and backward compatiblity)\n if (types.packed[type] !== undefined) gen\n (\"if((t&7)===2){\")\n (\"var c2=r.uint32()+r.pos\")\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\n : gen(\"types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\n}\n\n/**\n * Generates an encoder specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction encoder(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var gen = util.codegen([\"m\", \"w\", \"q\"], mtype.name + \"$encode\")\n (\"if(!w)\")\n (\"w=Writer.create()\")\n (\"if(q===undefined)q=0\")\n (\"if(q>util.recursionLimit)\")\n (\"throw Error(\\\"max depth exceeded\\\")\");\n\n var i, ref;\n\n // \"when a message is serialized its known fields should be written sequentially by field number\"\n var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById);\n\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n index = mtype._fieldsArray.indexOf(field),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n wireType = types.basic[type];\n ref = \"m\" + util.safeProp(field.name);\n\n // Map fields\n if (field.map) {\n gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j)){\", ref, field.name) // !== undefined && !== null\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType);\n if (wireType === undefined) gen\n (\"types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()\", index, ref); // can't be groups\n else gen\n (\".uint32(%i).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\n gen\n (\"}\")\n (\"}\");\n\n // Repeated fields\n } else if (field.repeated) { gen\n (\"if(%s!=null&&%s.length){\", ref, ref); // !== undefined && !== null\n\n // Packed repeated\n if (field.packed && types.packed[type] !== undefined) { gen\n\n (\"w.uint32(%i).fork()\", (field.id << 3 | 2) >>> 0)\n (\"for(var i=0;i<%s.length;++i)\", ref)\n (\"w.%s(%s[i])\", type, ref)\n (\"w.ldelim()\");\n\n // Non-packed\n } else { gen\n\n (\"for(var i=0;i<%s.length;++i)\", ref);\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref + \"[i]\");\n else gen\n (\"w.uint32(%i).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n } gen\n (\"}\");\n\n // Non-repeated\n } else {\n if (field.optional) gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j))\", ref, field.name); // !== undefined && !== null\n\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref);\n else gen\n (\"w.uint32(%i).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n }\n }\n\n return gen\n (\"return w\");\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n","\"use strict\";\nmodule.exports = Enum;\n\n// extends ReflectionObject\nvar ReflectionObject = require(26);\n((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = \"Enum\";\n\nvar Namespace = require(25),\n util = require(39);\n\n/**\n * Constructs a new enum instance.\n * @classdesc Reflected enum.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {Object.} [values] Enum values as an object, by name\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this enum\n * @param {Object.} [comments] The value comments for this enum\n * @param {Object.>|undefined} [valuesOptions] The value options for this enum\n */\nfunction Enum(name, values, options, comment, comments, valuesOptions) {\n ReflectionObject.call(this, name, options);\n\n if (values && typeof values !== \"object\")\n throw TypeError(\"values must be an object\");\n\n /**\n * Enum values by id.\n * @type {Object.}\n */\n this.valuesById = {};\n\n /**\n * Enum values by name.\n * @type {Object.}\n */\n this.values = Object.create(this.valuesById); // toJSON, marker\n\n /**\n * Enum comment text.\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Value comment texts, if any.\n * @type {Object.}\n */\n this.comments = comments || {};\n\n /**\n * Values options, if any\n * @type {Object>|undefined}\n */\n this.valuesOptions = valuesOptions;\n\n /**\n * Resolved values features, if any\n * @type {Object>|undefined}\n */\n this._valuesFeatures = {};\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\n // compatible enum. This is used by pbts to write actual enum definitions that work for\n // static and reflection code alike instead of emitting generic object definitions.\n\n if (values)\n for (var keys = Object.keys(values), i = 0; i < keys.length; ++i)\n if (keys[i] !== \"__proto__\" && typeof values[keys[i]] === \"number\") // use forward entries only\n this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i];\n}\n\n/**\n * @override\n */\nEnum.prototype._resolveFeatures = function _resolveFeatures(edition) {\n edition = this._edition || edition;\n ReflectionObject.prototype._resolveFeatures.call(this, edition);\n\n Object.keys(this.values).forEach(key => {\n var parentFeaturesCopy = util.merge({}, this._features);\n this._valuesFeatures[key] = util.merge(parentFeaturesCopy, this.valuesOptions && this.valuesOptions[key] && this.valuesOptions[key].features || {});\n });\n\n return this;\n};\n\n/**\n * Enum descriptor.\n * @interface IEnum\n * @property {Object.} values Enum values\n * @property {Object.} [options] Enum options\n */\n\n/**\n * Constructs an enum from an enum descriptor.\n * @param {string} name Enum name\n * @param {IEnum} json Enum descriptor\n * @returns {Enum} Created enum\n * @throws {TypeError} If arguments are invalid\n */\nEnum.fromJSON = function fromJSON(name, json) {\n var enm = new Enum(name, json.values, json.options, json.comment, json.comments);\n enm.reserved = json.reserved;\n if (json.edition)\n enm._edition = json.edition;\n enm._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return enm;\n};\n\n/**\n * Converts this enum to an enum descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IEnum} Enum descriptor\n */\nEnum.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"options\" , this.options,\n \"valuesOptions\" , this.valuesOptions,\n \"values\" , this.values,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"comment\" , keepComments ? this.comment : undefined,\n \"comments\" , keepComments ? this.comments : undefined\n ]);\n};\n\n/**\n * Adds a value to this enum.\n * @param {string} name Value name\n * @param {number} id Value id\n * @param {string} [comment] Comment, if any\n * @param {Object.|undefined} [options] Options, if any\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a value with this name or id\n */\nEnum.prototype.add = function add(name, id, comment, options) {\n // utilized by the parser but not by .fromJSON\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (!util.isInteger(id))\n throw TypeError(\"id must be an integer\");\n\n if (name === \"__proto__\")\n return this;\n\n if (this.values[name] !== undefined)\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\n\n if (this.isReservedId(id))\n throw Error(\"id \" + id + \" is reserved in \" + this);\n\n if (this.isReservedName(name))\n throw Error(\"name '\" + name + \"' is reserved in \" + this);\n\n if (this.valuesById[id] !== undefined) {\n if (!(this.options && this.options.allow_alias))\n throw Error(\"duplicate id \" + id + \" in \" + this);\n this.values[name] = id;\n } else\n this.valuesById[this.values[name] = id] = name;\n\n if (options) {\n if (this.valuesOptions === undefined)\n this.valuesOptions = {};\n this.valuesOptions[name] = options || null;\n }\n\n this.comments[name] = comment || null;\n return this;\n};\n\n/**\n * Removes a value from this enum\n * @param {string} name Value name\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `name` is not a name of this enum\n */\nEnum.prototype.remove = function remove(name) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n var val = this.values[name];\n if (val == null)\n throw Error(\"name '\" + name + \"' does not exist in \" + this);\n\n delete this.valuesById[val];\n delete this.values[name];\n delete this.comments[name];\n if (this.valuesOptions)\n delete this.valuesOptions[name];\n\n return this;\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n","\"use strict\";\nmodule.exports = Field;\n\n// extends ReflectionObject\nvar ReflectionObject = require(26);\n((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = \"Field\";\n\nvar Enum = require(17),\n types = require(38),\n util = require(39);\n\nvar Type; // cyclic\n\nvar ruleRe = /^required|optional|repeated$/;\n\n/**\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\n * @name Field\n * @classdesc Reflected message field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a field from a field descriptor.\n * @param {string} name Field name\n * @param {IField} json Field descriptor\n * @returns {Field} Created field\n * @throws {TypeError} If arguments are invalid\n */\nField.fromJSON = function fromJSON(name, json) {\n var field = new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment);\n if (json.edition)\n field._edition = json.edition;\n field._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return field;\n};\n\n/**\n * Not an actual constructor. Use {@link Field} instead.\n * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports FieldBase\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction Field(name, id, type, rule, extend, options, comment) {\n\n if (util.isObject(rule)) {\n comment = extend;\n options = rule;\n rule = extend = undefined;\n } else if (util.isObject(extend)) {\n comment = options;\n options = extend;\n extend = undefined;\n }\n\n ReflectionObject.call(this, name, options);\n\n if (!util.isInteger(id) || id < 0)\n throw TypeError(\"id must be a non-negative integer\");\n\n if (!util.isString(type))\n throw TypeError(\"type must be a string\");\n\n if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase()))\n throw TypeError(\"rule must be a string rule\");\n\n if (extend !== undefined && !util.isString(extend))\n throw TypeError(\"extend must be a string\");\n\n /**\n * Field rule, if any.\n * @type {string|undefined}\n */\n if (rule === \"proto3_optional\") {\n rule = \"optional\";\n }\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\n\n /**\n * Field type.\n * @type {string}\n */\n this.type = type; // toJSON\n\n /**\n * Unique field id.\n * @type {number}\n */\n this.id = id; // toJSON, marker\n\n /**\n * Extended type if different from parent.\n * @type {string|undefined}\n */\n this.extend = extend || undefined; // toJSON\n\n /**\n * Whether this field is repeated.\n * @type {boolean}\n */\n this.repeated = rule === \"repeated\";\n\n /**\n * Whether this field is a map or not.\n * @type {boolean}\n */\n this.map = false;\n\n /**\n * Message this field belongs to.\n * @type {Type|null}\n */\n this.message = null;\n\n /**\n * OneOf this field belongs to, if any,\n * @type {OneOf|null}\n */\n this.partOf = null;\n\n /**\n * The field type's default value.\n * @type {*}\n */\n this.typeDefault = null;\n\n /**\n * The field's default value on prototypes.\n * @type {*}\n */\n this.defaultValue = null;\n\n /**\n * Whether this field's value should be treated as a long.\n * @type {boolean}\n */\n this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false;\n\n /**\n * Whether this field's value is a buffer.\n * @type {boolean}\n */\n this.bytes = type === \"bytes\";\n\n /**\n * Resolved type if not a basic type.\n * @type {Type|Enum|null}\n */\n this.resolvedType = null;\n\n /**\n * Sister-field within the extended type if a declaring extension field.\n * @type {Field|null}\n */\n this.extensionField = null;\n\n /**\n * Sister-field within the declaring namespace if an extended field.\n * @type {Field|null}\n */\n this.declaringField = null;\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Determines whether this field is required.\n * @name Field#required\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"required\", {\n get: function() {\n return this._features.field_presence === \"LEGACY_REQUIRED\";\n }\n});\n\n/**\n * Determines whether this field is not required.\n * @name Field#optional\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"optional\", {\n get: function() {\n return !this.required;\n }\n});\n\n/**\n * Determines whether this field uses tag-delimited encoding. In proto2 this\n * corresponded to group syntax.\n * @name Field#delimited\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"delimited\", {\n get: function() {\n return this.resolvedType instanceof Type &&\n this._features.message_encoding === \"DELIMITED\";\n }\n});\n\n/**\n * Determines whether this field is packed. Only relevant when repeated.\n * @name Field#packed\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"packed\", {\n get: function() {\n return this._features.repeated_field_encoding === \"PACKED\";\n }\n});\n\n/**\n * Determines whether this field tracks presence.\n * @name Field#hasPresence\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"hasPresence\", {\n get: function() {\n if (this.repeated || this.map) {\n return false;\n }\n return this.partOf || // oneofs\n this.declaringField || this.extensionField || // extensions\n this._features.field_presence !== \"IMPLICIT\";\n }\n});\n\n/**\n * @override\n */\nField.prototype.setOption = function setOption(name, value, ifNotSet) {\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\n};\n\n/**\n * Field descriptor.\n * @interface IField\n * @property {string} [rule=\"optional\"] Field rule\n * @property {string} type Field type\n * @property {number} id Field id\n * @property {Object.} [options] Field options\n */\n\n/**\n * Extension field descriptor.\n * @interface IExtensionField\n * @extends IField\n * @property {string} extend Extended type\n */\n\n/**\n * Converts this field to a field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IField} Field descriptor\n */\nField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"rule\" , this.rule !== \"optional\" && this.rule || undefined,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Resolves this field's type references.\n * @returns {Field} `this`\n * @throws {Error} If any reference cannot be resolved\n */\nField.prototype.resolve = function resolve() {\n\n if (this.resolved)\n return this;\n\n if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it\n this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type);\n if (this.resolvedType instanceof Type)\n this.typeDefault = null;\n else // instanceof Enum\n this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined\n } else if (this.options && this.options.proto3_optional) {\n // proto3 scalar value marked optional; should default to null\n this.typeDefault = null;\n }\n\n // use explicitly set default value if present\n if (this.options && this.options[\"default\"] != null) {\n this.typeDefault = this.options[\"default\"];\n if (this.resolvedType instanceof Enum && typeof this.typeDefault === \"string\")\n this.typeDefault = this.resolvedType.values[this.typeDefault];\n }\n\n // remove unnecessary options\n if (this.options) {\n if (this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum))\n delete this.options.packed;\n if (!Object.keys(this.options).length)\n this.options = undefined;\n }\n\n // convert to internal data type if necesssary\n if (this.long) {\n this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type === \"uint64\" || this.type === \"fixed64\");\n\n /* istanbul ignore else */\n if (Object.freeze)\n Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\n\n } else if (this.bytes && typeof this.typeDefault === \"string\") {\n var buf;\n if (util.base64.test(this.typeDefault))\n util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0);\n else\n util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0);\n this.typeDefault = buf;\n }\n\n // take special care of maps and repeated fields\n if (this.map)\n this.defaultValue = util.emptyObject;\n else if (this.repeated)\n this.defaultValue = util.emptyArray;\n else\n this.defaultValue = this.typeDefault;\n\n // ensure proper value on prototype\n if (this.parent instanceof Type)\n this.parent.ctor.prototype[this.name] = this.defaultValue;\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n\n/**\n * Infers field features from legacy syntax that may have been specified differently.\n * in older editions.\n * @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions\n * @returns {object} The feature values to override\n */\nField.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(edition) {\n if (edition !== \"proto2\" && edition !== \"proto3\") {\n return {};\n }\n\n var features = {};\n\n if (this.rule === \"required\") {\n features.field_presence = \"LEGACY_REQUIRED\";\n }\n if (this.parent && types.defaults[this.type] === undefined) {\n // We can't use resolvedType because types may not have been resolved yet. However,\n // legacy groups are always in the same scope as the field so we don't have to do a\n // full scan of the tree.\n var type = this.parent.get(this.type.split(\".\").pop());\n if (type && type instanceof Type && type.group) {\n features.message_encoding = \"DELIMITED\";\n }\n }\n if (this.getOption(\"packed\") === true) {\n features.repeated_field_encoding = \"PACKED\";\n } else if (this.getOption(\"packed\") === false) {\n features.repeated_field_encoding = \"EXPANDED\";\n }\n return features;\n};\n\n/**\n * @override\n */\nField.prototype._resolveFeatures = function _resolveFeatures(edition) {\n return ReflectionObject.prototype._resolveFeatures.call(this, this._edition || edition);\n};\n\n/**\n * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript).\n * @typedef FieldDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} fieldName Field name\n * @returns {undefined}\n */\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"string\"|\"bool\"|\"bytes\"|Object} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @param {T} [defaultValue] Default value\n * @returns {FieldDecorator} Decorator function\n * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[]\n */\nField.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) {\n\n // submessage: decorate the submessage and use its name as the type\n if (typeof fieldType === \"function\")\n fieldType = util.decorateType(fieldType).name;\n\n // enum reference: create a reflected copy of the enum and keep reuseing it\n else if (fieldType && typeof fieldType === \"object\")\n fieldType = util.decorateEnum(fieldType).name;\n\n return function fieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new Field(fieldName, fieldId, fieldType, fieldRule, { \"default\": defaultValue }));\n };\n};\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {Constructor|string} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @returns {FieldDecorator} Decorator function\n * @template T extends Message\n * @variation 2\n */\n// like Field.d but without a default value\n\n// Sets up cyclic dependencies (called in index-light)\nField._configure = function configure(Type_) {\n Type = Type_;\n};\n","\"use strict\";\nvar protobuf = module.exports = require(20);\n\nprotobuf.build = \"light\";\n\n/**\n * A node-style callback as used by {@link load} and {@link Root#load}.\n * @typedef LoadCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Root} [root] Root, if there hasn't been an error\n * @returns {undefined}\n */\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n */\nfunction load(filename, root, callback) {\n if (typeof root === \"function\") {\n callback = root;\n root = new protobuf.Root();\n } else if (!root)\n root = new protobuf.Root();\n return root.load(filename, callback);\n}\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Promise} Promise\n * @see {@link Root#load}\n * @variation 3\n */\n// function load(filename:string, [root:Root]):Promise\n\nprotobuf.load = load;\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n * @see {@link Root#loadSync}\n */\nfunction loadSync(filename, root) {\n if (!root)\n root = new protobuf.Root();\n return root.loadSync(filename);\n}\n\nprotobuf.loadSync = loadSync;\n\n// Serialization\nprotobuf.encoder = require(16);\nprotobuf.decoder = require(15);\nprotobuf.verifier = require(44);\nprotobuf.converter = require(14);\n\n// Reflection\nprotobuf.ReflectionObject = require(26);\nprotobuf.Namespace = require(25);\nprotobuf.Root = require(31);\nprotobuf.Enum = require(17);\nprotobuf.Type = require(37);\nprotobuf.Field = require(18);\nprotobuf.OneOf = require(27);\nprotobuf.MapField = require(22);\nprotobuf.Service = require(35);\nprotobuf.Method = require(24);\n\n// Runtime\nprotobuf.Message = require(23);\nprotobuf.wrappers = require(45);\n\n// Utility\nprotobuf.types = require(38);\nprotobuf.util = require(39);\n\n// Set up possibly cyclic reflection dependencies\nprotobuf.ReflectionObject._configure(protobuf.Root);\nprotobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);\nprotobuf.Root._configure(protobuf.Type);\nprotobuf.Field._configure(protobuf.Type);\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(46);\nprotobuf.BufferWriter = require(47);\nprotobuf.Reader = require(29);\nprotobuf.BufferReader = require(30);\n\n// Utility\nprotobuf.util = require(42);\nprotobuf.rpc = require(33);\nprotobuf.roots = require(32);\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","\"use strict\";\nvar protobuf = module.exports = require(19);\n\nprotobuf.build = \"full\";\n\n// Parser\nprotobuf.tokenize = require(36);\nprotobuf.parse = require(28);\nprotobuf.common = require(13);\n\n// Configure parser\nprotobuf.Root._configure(protobuf.Type, protobuf.parse, protobuf.common);\n","\"use strict\";\nmodule.exports = MapField;\n\n// extends Field\nvar Field = require(18);\n((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = \"MapField\";\n\nvar types = require(38),\n util = require(39);\n\n/**\n * Constructs a new map field instance.\n * @classdesc Reflected map field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} keyType Key type\n * @param {string} type Value type\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction MapField(name, id, keyType, type, options, comment) {\n Field.call(this, name, id, type, undefined, undefined, options, comment);\n\n /* istanbul ignore if */\n if (!util.isString(keyType))\n throw TypeError(\"keyType must be a string\");\n\n /**\n * Key type.\n * @type {string}\n */\n this.keyType = keyType; // toJSON, marker\n\n /**\n * Resolved key type if not a basic type.\n * @type {ReflectionObject|null}\n */\n this.resolvedKeyType = null;\n\n // Overrides Field#map\n this.map = true;\n}\n\n/**\n * Map field descriptor.\n * @interface IMapField\n * @extends {IField}\n * @property {string} keyType Key type\n */\n\n/**\n * Extension map field descriptor.\n * @interface IExtensionMapField\n * @extends IMapField\n * @property {string} extend Extended type\n */\n\n/**\n * Constructs a map field from a map field descriptor.\n * @param {string} name Field name\n * @param {IMapField} json Map field descriptor\n * @returns {MapField} Created map field\n * @throws {TypeError} If arguments are invalid\n */\nMapField.fromJSON = function fromJSON(name, json) {\n return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment);\n};\n\n/**\n * Converts this map field to a map field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMapField} Map field descriptor\n */\nMapField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"keyType\" , this.keyType,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nMapField.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\n if (types.mapKey[this.keyType] === undefined)\n throw Error(\"invalid key type: \" + this.keyType);\n\n return Field.prototype.resolve.call(this);\n};\n\n/**\n * Map field decorator (TypeScript).\n * @name MapField.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"} fieldKeyType Field key type\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"|\"bytes\"|Object|Constructor<{}>} fieldValueType Field value type\n * @returns {FieldDecorator} Decorator function\n * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> }\n */\nMapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) {\n\n // submessage value: decorate the submessage and use its name as the type\n if (typeof fieldValueType === \"function\")\n fieldValueType = util.decorateType(fieldValueType).name;\n\n // enum reference value: create a reflected copy of the enum and keep reuseing it\n else if (fieldValueType && typeof fieldValueType === \"object\")\n fieldValueType = util.decorateEnum(fieldValueType).name;\n\n return function mapFieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType));\n };\n};\n","\"use strict\";\nmodule.exports = Message;\n\nvar util = require(42);\n\n/**\n * Constructs a new message instance.\n * @classdesc Abstract runtime message.\n * @constructor\n * @param {Properties} [properties] Properties to set\n * @template T extends object = object\n */\nfunction Message(properties) {\n // not used internally\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (key === \"__proto__\")\n continue;\n this[key] = properties[key];\n }\n}\n\n/**\n * Reference to the reflected type.\n * @name Message.$type\n * @type {Type}\n * @readonly\n */\n\n/**\n * Reference to the reflected type.\n * @name Message#$type\n * @type {Type}\n * @readonly\n */\n\n/*eslint-disable valid-jsdoc*/\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.create = function create(properties) {\n return this.$type.create(properties);\n};\n\n/**\n * Encodes a message of this type.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encode = function encode(message, writer) {\n return this.$type.encode(message, writer);\n};\n\n/**\n * Encodes a message of this type preceeded by its length as a varint.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.$type.encodeDelimited(message, writer);\n};\n\n/**\n * Decodes a message of this type.\n * @name Message.decode\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decode = function decode(reader) {\n return this.$type.decode(reader);\n};\n\n/**\n * Decodes a message of this type preceeded by its length as a varint.\n * @name Message.decodeDelimited\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decodeDelimited = function decodeDelimited(reader) {\n return this.$type.decodeDelimited(reader);\n};\n\n/**\n * Verifies a message of this type.\n * @name Message.verify\n * @function\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\nMessage.verify = function verify(message) {\n return this.$type.verify(message);\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object\n * @returns {T} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.fromObject = function fromObject(object) {\n return this.$type.fromObject(object);\n};\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {T} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @template T extends Message\n * @this Constructor\n */\nMessage.toObject = function toObject(message, options) {\n return this.$type.toObject(message, options);\n};\n\n/**\n * Converts this message to JSON.\n * @returns {Object.} JSON object\n */\nMessage.prototype.toJSON = function toJSON() {\n return this.$type.toObject(this, util.toJSONOptions);\n};\n\n/*eslint-enable valid-jsdoc*/\n","\"use strict\";\nmodule.exports = Method;\n\n// extends ReflectionObject\nvar ReflectionObject = require(26);\n((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = \"Method\";\n\nvar util = require(39);\n\n/**\n * Constructs a new service method instance.\n * @classdesc Reflected service method.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Method name\n * @param {string|undefined} type Method type, usually `\"rpc\"`\n * @param {string} requestType Request message type\n * @param {string} responseType Response message type\n * @param {boolean|Object.} [requestStream] Whether the request is streamed\n * @param {boolean|Object.} [responseStream] Whether the response is streamed\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this method\n * @param {Object.} [parsedOptions] Declared options, properly parsed into an object\n */\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) {\n\n /* istanbul ignore next */\n if (util.isObject(requestStream)) {\n options = requestStream;\n requestStream = responseStream = undefined;\n } else if (util.isObject(responseStream)) {\n options = responseStream;\n responseStream = undefined;\n }\n\n /* istanbul ignore if */\n if (!(type === undefined || util.isString(type)))\n throw TypeError(\"type must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(requestType))\n throw TypeError(\"requestType must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(responseType))\n throw TypeError(\"responseType must be a string\");\n\n ReflectionObject.call(this, name, options);\n\n /**\n * Method type.\n * @type {string}\n */\n this.type = type || \"rpc\"; // toJSON\n\n /**\n * Request type.\n * @type {string}\n */\n this.requestType = requestType; // toJSON, marker\n\n /**\n * Whether requests are streamed or not.\n * @type {boolean|undefined}\n */\n this.requestStream = requestStream ? true : undefined; // toJSON\n\n /**\n * Response type.\n * @type {string}\n */\n this.responseType = responseType; // toJSON\n\n /**\n * Whether responses are streamed or not.\n * @type {boolean|undefined}\n */\n this.responseStream = responseStream ? true : undefined; // toJSON\n\n /**\n * Resolved request type.\n * @type {Type|null}\n */\n this.resolvedRequestType = null;\n\n /**\n * Resolved response type.\n * @type {Type|null}\n */\n this.resolvedResponseType = null;\n\n /**\n * Comment for this method\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Options properly parsed into an object\n */\n this.parsedOptions = parsedOptions;\n}\n\n/**\n * Method descriptor.\n * @interface IMethod\n * @property {string} [type=\"rpc\"] Method type\n * @property {string} requestType Request type\n * @property {string} responseType Response type\n * @property {boolean} [requestStream=false] Whether requests are streamed\n * @property {boolean} [responseStream=false] Whether responses are streamed\n * @property {Object.} [options] Method options\n * @property {string} comment Method comments\n * @property {Object.} [parsedOptions] Method options properly parsed into an object\n */\n\n/**\n * Constructs a method from a method descriptor.\n * @param {string} name Method name\n * @param {IMethod} json Method descriptor\n * @returns {Method} Created method\n * @throws {TypeError} If arguments are invalid\n */\nMethod.fromJSON = function fromJSON(name, json) {\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions);\n};\n\n/**\n * Converts this method to a method descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMethod} Method descriptor\n */\nMethod.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"type\" , this.type !== \"rpc\" && /* istanbul ignore next */ this.type || undefined,\n \"requestType\" , this.requestType,\n \"requestStream\" , this.requestStream,\n \"responseType\" , this.responseType,\n \"responseStream\" , this.responseStream,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined,\n \"parsedOptions\" , this.parsedOptions,\n ]);\n};\n\n/**\n * @override\n */\nMethod.prototype.resolve = function resolve() {\n\n /* istanbul ignore if */\n if (this.resolved)\n return this;\n\n this.resolvedRequestType = this.parent.lookupType(this.requestType);\n this.resolvedResponseType = this.parent.lookupType(this.responseType);\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n","\"use strict\";\nmodule.exports = Namespace;\n\n// extends ReflectionObject\nvar ReflectionObject = require(26);\n((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = \"Namespace\";\n\nvar Field = require(18),\n util = require(39),\n OneOf = require(27);\n\nvar Type, // cyclic\n Service,\n Enum;\n\n/**\n * Constructs a new namespace instance.\n * @name Namespace\n * @classdesc Reflected namespace.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a namespace from JSON.\n * @memberof Namespace\n * @function\n * @param {string} name Namespace name\n * @param {Object.} json JSON object\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Namespace} Created namespace\n * @throws {TypeError} If arguments are invalid\n */\nNamespace.fromJSON = function fromJSON(name, json, depth) {\n depth = util.checkDepth(depth);\n return new Namespace(name, json.options).addJSON(json.nested, depth);\n};\n\n/**\n * Converts an array of reflection objects to JSON.\n * @memberof Namespace\n * @param {ReflectionObject[]} array Object array\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\n */\nfunction arrayToJSON(array, toJSONOptions) {\n if (!(array && array.length))\n return undefined;\n var obj = {};\n for (var i = 0; i < array.length; ++i)\n obj[array[i].name] = array[i].toJSON(toJSONOptions);\n return obj;\n}\n\nNamespace.arrayToJSON = arrayToJSON;\n\n/**\n * Tests if the specified id is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedId = function isReservedId(reserved, id) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (typeof reserved[i] !== \"string\" && reserved[i][0] <= id && reserved[i][1] > id)\n return true;\n return false;\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedName = function isReservedName(reserved, name) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (reserved[i] === name)\n return true;\n return false;\n};\n\n/**\n * Not an actual constructor. Use {@link Namespace} instead.\n * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports NamespaceBase\n * @extends ReflectionObject\n * @abstract\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n * @see {@link Namespace}\n */\nfunction Namespace(name, options) {\n ReflectionObject.call(this, name, options);\n\n /**\n * Nested objects by name.\n * @type {Object.|undefined}\n */\n this.nested = undefined; // toJSON\n\n /**\n * Cached nested objects as an array.\n * @type {ReflectionObject[]|null}\n * @private\n */\n this._nestedArray = null;\n\n /**\n * Cache lookup calls for any objects contains anywhere under this namespace.\n * This drastically speeds up resolve for large cross-linked protos where the same\n * types are looked up repeatedly.\n * @type {Object.}\n * @private\n */\n this._lookupCache = Object.create(null);\n\n /**\n * Whether or not objects contained in this namespace need feature resolution.\n * @type {boolean}\n * @protected\n */\n this._needsRecursiveFeatureResolution = true;\n\n /**\n * Whether or not objects contained in this namespace need a resolve.\n * @type {boolean}\n * @protected\n */\n this._needsRecursiveResolve = true;\n}\n\nfunction clearCache(namespace) {\n namespace._nestedArray = null;\n namespace._lookupCache = Object.create(null);\n\n // Also clear parent caches, since they include nested lookups.\n var parent = namespace;\n while(parent = parent.parent) {\n parent._lookupCache = Object.create(null);\n }\n return namespace;\n}\n\n/**\n * Nested objects of this namespace as an array for iteration.\n * @name NamespaceBase#nestedArray\n * @type {ReflectionObject[]}\n * @readonly\n */\nObject.defineProperty(Namespace.prototype, \"nestedArray\", {\n get: function() {\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\n }\n});\n\n/**\n * Namespace descriptor.\n * @interface INamespace\n * @property {Object.} [options] Namespace options\n * @property {Object.} [nested] Nested object descriptors\n */\n\n/**\n * Any extension field descriptor.\n * @typedef AnyExtensionField\n * @type {IExtensionField|IExtensionMapField}\n */\n\n/**\n * Any nested object descriptor.\n * @typedef AnyNestedObject\n * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf}\n */\n\n/**\n * Converts this namespace to a namespace descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {INamespace} Namespace descriptor\n */\nNamespace.prototype.toJSON = function toJSON(toJSONOptions) {\n return util.toObject([\n \"options\" , this.options,\n \"nested\" , arrayToJSON(this.nestedArray, toJSONOptions)\n ]);\n};\n\n/**\n * Adds nested objects to this namespace from nested object descriptors.\n * @param {Object.} nestedJson Any nested object descriptors\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Namespace} `this`\n */\nNamespace.prototype.addJSON = function addJSON(nestedJson, depth) {\n depth = util.checkDepth(depth);\n var ns = this;\n /* istanbul ignore else */\n if (nestedJson) {\n for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) {\n nested = nestedJson[names[i]];\n ns.add( // most to least likely\n ( nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : nested.id !== undefined\n ? Field.fromJSON\n : Namespace.fromJSON )(names[i], nested, depth + 1)\n );\n }\n }\n return this;\n};\n\n/**\n * Gets the nested object of the specified name.\n * @param {string} name Nested object name\n * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist\n */\nNamespace.prototype.get = function get(name) {\n return this.nested && Object.prototype.hasOwnProperty.call(this.nested, name)\n ? this.nested[name]\n : null;\n};\n\n/**\n * Gets the values of the nested {@link Enum|enum} of the specified name.\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\n * @param {string} name Nested enum name\n * @returns {Object.} Enum values\n * @throws {Error} If there is no such enum\n */\nNamespace.prototype.getEnum = function getEnum(name) {\n if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name) && this.nested[name] instanceof Enum)\n return this.nested[name].values;\n throw Error(\"no such enum: \" + name);\n};\n\n/**\n * Adds a nested object to this namespace.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name\n */\nNamespace.prototype.add = function add(object) {\n\n if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace))\n throw TypeError(\"object must be a valid nested object\");\n\n if (object.name === \"__proto__\")\n return this;\n\n if (!this.nested)\n this.nested = {};\n else {\n var prev = this.get(object.name);\n if (prev) {\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\n // replace plain namespace but keep existing nested elements and options\n var nested = prev.nestedArray;\n for (var i = 0; i < nested.length; ++i)\n object.add(nested[i]);\n this.remove(prev);\n if (!this.nested)\n this.nested = {};\n object.setOptions(prev.options, true);\n\n } else\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n }\n }\n this.nested[object.name] = object;\n\n if (!(this instanceof Type || this instanceof Service || this instanceof Enum || this instanceof Field)) {\n // This is a package or a root namespace.\n if (!object._edition) {\n // Make sure that some edition is set if it hasn't already been specified.\n object._edition = object._defaultEdition;\n }\n }\n\n this._needsRecursiveFeatureResolution = true;\n this._needsRecursiveResolve = true;\n\n // Also clear parent caches, since they need to recurse down.\n var parent = this;\n while(parent = parent.parent) {\n parent._needsRecursiveFeatureResolution = true;\n parent._needsRecursiveResolve = true;\n }\n\n object.onAdd(this);\n return clearCache(this);\n};\n\n/**\n * Removes a nested object from this namespace.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this namespace\n */\nNamespace.prototype.remove = function remove(object) {\n\n if (!(object instanceof ReflectionObject))\n throw TypeError(\"object must be a ReflectionObject\");\n if (object.parent !== this)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.nested[object.name];\n if (!Object.keys(this.nested).length)\n this.nested = undefined;\n\n object.onRemove(this);\n return clearCache(this);\n};\n\n/**\n * Defines additial namespaces within this one if not yet existing.\n * @param {string|string[]} path Path to create\n * @param {*} [json] Nested types to create from JSON\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\n */\nNamespace.prototype.define = function define(path, json) {\n\n if (util.isString(path))\n path = path.split(\".\");\n else if (!Array.isArray(path))\n throw TypeError(\"illegal path\");\n if (path && path.length && path[0] === \"\")\n throw Error(\"path must be relative\");\n if (path.length > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n\n var ptr = this;\n while (path.length > 0) {\n var part = path.shift();\n if (ptr.nested && ptr.nested[part]) {\n ptr = ptr.nested[part];\n if (!(ptr instanceof Namespace))\n throw Error(\"path conflicts with non-namespace objects\");\n } else\n ptr.add(ptr = new Namespace(part));\n }\n if (json)\n ptr.addJSON(json);\n return ptr;\n};\n\n/**\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost.\n * @returns {Namespace} `this`\n */\nNamespace.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n this._resolveFeaturesRecursive(this._edition);\n\n var nested = this.nestedArray, i = 0;\n this.resolve();\n while (i < nested.length)\n if (nested[i] instanceof Namespace)\n nested[i++].resolveAll();\n else\n nested[i++].resolve();\n this._needsRecursiveResolve = false;\n return this;\n};\n\n/**\n * @override\n */\nNamespace.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n if (!this._needsRecursiveFeatureResolution) return this;\n this._needsRecursiveFeatureResolution = false;\n\n edition = this._edition || edition;\n\n ReflectionObject.prototype._resolveFeaturesRecursive.call(this, edition);\n this.nestedArray.forEach(nested => {\n nested._resolveFeaturesRecursive(edition);\n });\n return this;\n};\n\n/**\n * Recursively looks up the reflection object matching the specified path in the scope of this namespace.\n * @param {string|string[]} path Path to look up\n * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n */\nNamespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) {\n /* istanbul ignore next */\n if (typeof filterTypes === \"boolean\") {\n parentAlreadyChecked = filterTypes;\n filterTypes = undefined;\n } else if (filterTypes && !Array.isArray(filterTypes))\n filterTypes = [ filterTypes ];\n\n if (util.isString(path) && path.length) {\n if (path === \".\")\n return this.root;\n path = path.split(\".\");\n } else if (!path.length)\n return this;\n\n var flatPath = path.join(\".\");\n\n // Start at root if path is absolute\n if (path[0] === \"\")\n return this.root.lookup(path.slice(1), filterTypes);\n\n // Early bailout for objects with matching absolute paths\n var found = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects[\".\" + flatPath];\n if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {\n return found;\n }\n\n // Do a regular lookup at this namespace and below\n found = this._lookupImpl(path, flatPath);\n if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {\n return found;\n }\n\n if (parentAlreadyChecked)\n return null;\n\n // If there hasn't been a match, walk up the tree and look more broadly\n var current = this;\n while (current.parent) {\n found = current.parent._lookupImpl(path, flatPath);\n if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {\n return found;\n }\n current = current.parent;\n }\n return null;\n};\n\n/**\n * Internal helper for lookup that handles searching just at this namespace and below along with caching.\n * @param {string[]} path Path to look up\n * @param {string} flatPath Flattened version of the path to use as a cache key\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n * @private\n */\nNamespace.prototype._lookupImpl = function lookup(path, flatPath) {\n if(Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) {\n return this._lookupCache[flatPath];\n }\n\n // Test if the first part matches any nested object, and if so, traverse if path contains more\n var found = this.get(path[0]);\n var exact = null;\n if (found) {\n if (path.length === 1) {\n exact = found;\n } else if (found instanceof Namespace) {\n path = path.slice(1);\n exact = found._lookupImpl(path, path.join(\".\"));\n }\n\n // Otherwise try each nested namespace\n } else {\n for (var i = 0; i < this.nestedArray.length; ++i)\n if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path, flatPath))) {\n exact = found;\n break;\n }\n }\n\n // Set this even when null, so that when we walk up the tree we can quickly bail on repeated checks back down.\n this._lookupCache[flatPath] = exact;\n return exact;\n};\n\n/**\n * Looks up the reflection object at the specified path, relative to this namespace.\n * @name NamespaceBase#lookup\n * @function\n * @param {string|string[]} path Path to look up\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n * @variation 2\n */\n// lookup(path: string, [parentAlreadyChecked: boolean])\n\n/**\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type\n * @throws {Error} If `path` does not point to a type\n */\nNamespace.prototype.lookupType = function lookupType(path) {\n var found = this.lookup(path, [ Type ]);\n if (!found)\n throw Error(\"no such type: \" + path);\n return found;\n};\n\n/**\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Enum} Looked up enum\n * @throws {Error} If `path` does not point to an enum\n */\nNamespace.prototype.lookupEnum = function lookupEnum(path) {\n var found = this.lookup(path, [ Enum ]);\n if (!found)\n throw Error(\"no such Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type or enum\n * @throws {Error} If `path` does not point to a type or enum\n */\nNamespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) {\n var found = this.lookup(path, [ Type, Enum ]);\n if (!found)\n throw Error(\"no such Type or Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Service} Looked up service\n * @throws {Error} If `path` does not point to a service\n */\nNamespace.prototype.lookupService = function lookupService(path) {\n var found = this.lookup(path, [ Service ]);\n if (!found)\n throw Error(\"no such Service '\" + path + \"' in \" + this);\n return found;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nNamespace._configure = function(Type_, Service_, Enum_) {\n Type = Type_;\n Service = Service_;\n Enum = Enum_;\n};\n","\"use strict\";\nmodule.exports = ReflectionObject;\n\nReflectionObject.className = \"ReflectionObject\";\n\nconst OneOf = require(27);\nvar util = require(39);\n\nvar Root; // cyclic\n\n/* eslint-disable no-warning-comments */\n// TODO: Replace with embedded proto.\nvar editions2023Defaults = {enum_type: \"OPEN\", field_presence: \"EXPLICIT\", json_format: \"ALLOW\", message_encoding: \"LENGTH_PREFIXED\", repeated_field_encoding: \"PACKED\", utf8_validation: \"VERIFY\"};\nvar proto2Defaults = {enum_type: \"CLOSED\", field_presence: \"EXPLICIT\", json_format: \"LEGACY_BEST_EFFORT\", message_encoding: \"LENGTH_PREFIXED\", repeated_field_encoding: \"EXPANDED\", utf8_validation: \"NONE\"};\nvar proto3Defaults = {enum_type: \"OPEN\", field_presence: \"IMPLICIT\", json_format: \"ALLOW\", message_encoding: \"LENGTH_PREFIXED\", repeated_field_encoding: \"PACKED\", utf8_validation: \"VERIFY\"};\n\n/**\n * Constructs a new reflection object instance.\n * @classdesc Base class of all reflection objects.\n * @constructor\n * @param {string} name Object name\n * @param {Object.} [options] Declared options\n * @abstract\n */\nfunction ReflectionObject(name, options) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (options && !util.isObject(options))\n throw TypeError(\"options must be an object\");\n\n /**\n * Options.\n * @type {Object.|undefined}\n */\n this.options = options; // toJSON\n\n /**\n * Parsed Options.\n * @type {Array.>|undefined}\n */\n this.parsedOptions = null;\n\n /**\n * Unique name within its namespace.\n * @type {string}\n */\n this.name = name;\n\n /**\n * The edition specified for this object. Only relevant for top-level objects.\n * @type {string}\n * @private\n */\n this._edition = null;\n\n /**\n * The default edition to use for this object if none is specified. For legacy reasons,\n * this is proto2 except in the JSON parsing case where it was proto3.\n * @type {string}\n * @private\n */\n this._defaultEdition = \"proto2\";\n\n /**\n * Resolved Features.\n * @type {object}\n * @private\n */\n this._features = {};\n\n /**\n * Whether or not features have been resolved.\n * @type {boolean}\n * @private\n */\n this._featuresResolved = false;\n\n /**\n * Parent namespace.\n * @type {Namespace|null}\n */\n this.parent = null;\n\n /**\n * Whether already resolved or not.\n * @type {boolean}\n */\n this.resolved = false;\n\n /**\n * Comment text, if any.\n * @type {string|null}\n */\n this.comment = null;\n\n /**\n * Defining file name.\n * @type {string|null}\n */\n this.filename = null;\n}\n\nObject.defineProperties(ReflectionObject.prototype, {\n\n /**\n * Reference to the root namespace.\n * @name ReflectionObject#root\n * @type {Root}\n * @readonly\n */\n root: {\n get: function() {\n var ptr = this;\n while (ptr.parent !== null)\n ptr = ptr.parent;\n return ptr;\n }\n },\n\n /**\n * Full name including leading dot.\n * @name ReflectionObject#fullName\n * @type {string}\n * @readonly\n */\n fullName: {\n get: function() {\n var path = [ this.name ],\n ptr = this.parent;\n while (ptr) {\n path.unshift(ptr.name);\n ptr = ptr.parent;\n }\n return path.join(\".\");\n }\n }\n});\n\n/**\n * Converts this reflection object to its descriptor representation.\n * @returns {Object.} Descriptor\n * @abstract\n */\nReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() {\n throw Error(); // not implemented, shouldn't happen\n};\n\n/**\n * Called when this object is added to a parent.\n * @param {ReflectionObject} parent Parent added to\n * @returns {undefined}\n */\nReflectionObject.prototype.onAdd = function onAdd(parent) {\n if (this.parent && this.parent !== parent)\n this.parent.remove(this);\n this.parent = parent;\n this.resolved = false;\n var root = parent.root;\n if (root instanceof Root)\n root._handleAdd(this);\n};\n\n/**\n * Called when this object is removed from a parent.\n * @param {ReflectionObject} parent Parent removed from\n * @returns {undefined}\n */\nReflectionObject.prototype.onRemove = function onRemove(parent) {\n var root = parent.root;\n if (root instanceof Root)\n root._handleRemove(this);\n this.parent = null;\n this.resolved = false;\n};\n\n/**\n * Resolves this objects type references.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n if (this.root instanceof Root)\n this.resolved = true; // only if part of a root\n return this;\n};\n\n/**\n * Resolves this objects editions features.\n * @param {string} edition The edition we're currently resolving for.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n return this._resolveFeatures(this._edition || edition);\n};\n\n/**\n * Resolves child features from parent features\n * @param {string} edition The edition we're currently resolving for.\n * @returns {undefined}\n */\nReflectionObject.prototype._resolveFeatures = function _resolveFeatures(edition) {\n if (this._featuresResolved) {\n return;\n }\n\n var defaults = {};\n\n /* istanbul ignore if */\n if (!edition) {\n throw new Error(\"Unknown edition for \" + this.fullName);\n }\n\n var protoFeatures = util.merge({}, this.options && this.options.features,\n this._inferLegacyProtoFeatures(edition));\n\n if (this._edition) {\n // For a namespace marked with a specific edition, reset defaults.\n /* istanbul ignore else */\n if (edition === \"proto2\") {\n defaults = Object.assign({}, proto2Defaults);\n } else if (edition === \"proto3\") {\n defaults = Object.assign({}, proto3Defaults);\n } else if (edition === \"2023\") {\n defaults = Object.assign({}, editions2023Defaults);\n } else {\n throw new Error(\"Unknown edition: \" + edition);\n }\n this._features = util.merge(defaults, protoFeatures);\n this._featuresResolved = true;\n return;\n }\n\n // fields in Oneofs aren't actually children of them, so we have to\n // special-case it\n /* istanbul ignore else */\n if (this.partOf instanceof OneOf) {\n var lexicalParentFeaturesCopy = util.merge({}, this.partOf._features);\n this._features = util.merge(lexicalParentFeaturesCopy, protoFeatures);\n } else if (this.declaringField) {\n // Skip feature resolution of sister fields.\n } else if (this.parent) {\n var parentFeaturesCopy = util.merge({}, this.parent._features);\n this._features = util.merge(parentFeaturesCopy, protoFeatures);\n } else {\n throw new Error(\"Unable to find a parent for \" + this.fullName);\n }\n if (this.extensionField) {\n // Sister fields should have the same features as their extensions.\n this.extensionField._features = this._features;\n }\n this._featuresResolved = true;\n};\n\n/**\n * Infers features from legacy syntax that may have been specified differently.\n * in older editions.\n * @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions\n * @returns {object} The feature values to override\n */\nReflectionObject.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(/*edition*/) {\n return {};\n};\n\n/**\n * Gets an option value.\n * @param {string} name Option name\n * @returns {*} Option value or `undefined` if not set\n */\nReflectionObject.prototype.getOption = function getOption(name) {\n if (this.options)\n return this.options[name];\n return undefined;\n};\n\n/**\n * Sets an option.\n * @param {string} name Option name\n * @param {*} value Option value\n * @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (name === \"__proto__\")\n return this;\n if (!this.options)\n this.options = {};\n if (/^features\\./.test(name)) {\n util.setProperty(this.options, name, value, ifNotSet);\n } else if (!ifNotSet || this.options[name] === undefined) {\n if (this.getOption(name) !== value) this.resolved = false;\n this.options[name] = value;\n }\n\n return this;\n};\n\n/**\n * Sets a parsed option.\n * @param {string} name parsed Option name\n * @param {*} value Option value\n * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\\empty, will add a new option with that value\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) {\n if (name === \"__proto__\")\n return this;\n if (!this.parsedOptions) {\n this.parsedOptions = [];\n }\n var parsedOptions = this.parsedOptions;\n if (propName) {\n // If setting a sub property of an option then try to merge it\n // with an existing option\n var opt = parsedOptions.find(function (opt) {\n return Object.prototype.hasOwnProperty.call(opt, name);\n });\n if (opt) {\n // If we found an existing option - just merge the property value\n // (If it's a feature, will just write over)\n var newValue = opt[name];\n util.setProperty(newValue, propName, value);\n } else {\n // otherwise, create a new option, set its property and add it to the list\n opt = {};\n opt[name] = util.setProperty({}, propName, value);\n parsedOptions.push(opt);\n }\n } else {\n // Always create a new option when setting the value of the option itself\n var newOpt = {};\n newOpt[name] = value;\n parsedOptions.push(newOpt);\n }\n\n return this;\n};\n\n/**\n * Sets multiple options.\n * @param {Object.} options Options to set\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) {\n if (options)\n for (var keys = Object.keys(options), i = 0; i < keys.length; ++i)\n this.setOption(keys[i], options[keys[i]], ifNotSet);\n return this;\n};\n\n/**\n * Converts this instance to its string representation.\n * @returns {string} Class name[, space, full name]\n */\nReflectionObject.prototype.toString = function toString() {\n var className = this.constructor.className,\n fullName = this.fullName;\n if (fullName.length)\n return className + \" \" + fullName;\n return className;\n};\n\n/**\n * Converts the edition this object is pinned to for JSON format.\n * @returns {string|undefined} The edition string for JSON representation\n */\nReflectionObject.prototype._editionToJSON = function _editionToJSON() {\n if (!this._edition || this._edition === \"proto3\") {\n // Avoid emitting proto3 since we need to default to it for backwards\n // compatibility anyway.\n return undefined;\n }\n return this._edition;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nReflectionObject._configure = function(Root_) {\n Root = Root_;\n};\n","\"use strict\";\nmodule.exports = OneOf;\n\n// extends ReflectionObject\nvar ReflectionObject = require(26);\n((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = \"OneOf\";\n\nvar Field = require(18),\n util = require(39);\n\n/**\n * Constructs a new oneof instance.\n * @classdesc Reflected oneof.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Oneof name\n * @param {string[]|Object.} [fieldNames] Field names\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction OneOf(name, fieldNames, options, comment) {\n if (!Array.isArray(fieldNames)) {\n options = fieldNames;\n fieldNames = undefined;\n }\n ReflectionObject.call(this, name, options);\n\n /* istanbul ignore if */\n if (!(fieldNames === undefined || Array.isArray(fieldNames)))\n throw TypeError(\"fieldNames must be an Array\");\n\n /**\n * Field names that belong to this oneof.\n * @type {string[]}\n */\n this.oneof = fieldNames || []; // toJSON, marker\n\n /**\n * Fields that belong to this oneof as an array for iteration.\n * @type {Field[]}\n * @readonly\n */\n this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Oneof descriptor.\n * @interface IOneOf\n * @property {Array.} oneof Oneof field names\n * @property {Object.} [options] Oneof options\n */\n\n/**\n * Constructs a oneof from a oneof descriptor.\n * @param {string} name Oneof name\n * @param {IOneOf} json Oneof descriptor\n * @returns {OneOf} Created oneof\n * @throws {TypeError} If arguments are invalid\n */\nOneOf.fromJSON = function fromJSON(name, json) {\n return new OneOf(name, json.oneof, json.options, json.comment);\n};\n\n/**\n * Converts this oneof to a oneof descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IOneOf} Oneof descriptor\n */\nOneOf.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"oneof\" , this.oneof,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Adds the fields of the specified oneof to the parent if not already done so.\n * @param {OneOf} oneof The oneof\n * @returns {undefined}\n * @inner\n * @ignore\n */\nfunction addFieldsToParent(oneof) {\n if (oneof.parent)\n for (var i = 0; i < oneof.fieldsArray.length; ++i)\n if (!oneof.fieldsArray[i].parent)\n oneof.parent.add(oneof.fieldsArray[i]);\n}\n\n/**\n * Adds a field to this oneof and removes it from its current parent, if any.\n * @param {Field} field Field to add\n * @returns {OneOf} `this`\n */\nOneOf.prototype.add = function add(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n if (field.parent && field.parent !== this.parent)\n field.parent.remove(field);\n this.oneof.push(field.name);\n this.fieldsArray.push(field);\n field.partOf = this; // field.parent remains null\n addFieldsToParent(this);\n return this;\n};\n\n/**\n * Removes a field from this oneof and puts it back to the oneof's parent.\n * @param {Field} field Field to remove\n * @returns {OneOf} `this`\n */\nOneOf.prototype.remove = function remove(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n var index = this.fieldsArray.indexOf(field);\n\n /* istanbul ignore if */\n if (index < 0)\n throw Error(field + \" is not a member of \" + this);\n\n this.fieldsArray.splice(index, 1);\n index = this.oneof.indexOf(field.name);\n\n /* istanbul ignore else */\n if (index > -1) // theoretical\n this.oneof.splice(index, 1);\n\n field.partOf = null;\n return this;\n};\n\n/**\n * @override\n */\nOneOf.prototype.onAdd = function onAdd(parent) {\n ReflectionObject.prototype.onAdd.call(this, parent);\n var self = this;\n // Collect present fields\n for (var i = 0; i < this.oneof.length; ++i) {\n var field = parent.get(this.oneof[i]);\n if (field && !field.partOf) {\n field.partOf = self;\n self.fieldsArray.push(field);\n }\n }\n // Add not yet present fields\n addFieldsToParent(this);\n};\n\n/**\n * @override\n */\nOneOf.prototype.onRemove = function onRemove(parent) {\n for (var i = 0, field; i < this.fieldsArray.length; ++i)\n if ((field = this.fieldsArray[i]).parent)\n field.parent.remove(field);\n ReflectionObject.prototype.onRemove.call(this, parent);\n};\n\n/**\n * Determines whether this field corresponds to a synthetic oneof created for\n * a proto3 optional field. No behavioral logic should depend on this, but it\n * can be relevant for reflection.\n * @name OneOf#isProto3Optional\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(OneOf.prototype, \"isProto3Optional\", {\n get: function() {\n if (this.fieldsArray == null || this.fieldsArray.length !== 1) {\n return false;\n }\n\n var field = this.fieldsArray[0];\n return field.options != null && field.options[\"proto3_optional\"] === true;\n }\n});\n\n/**\n * Decorator function as returned by {@link OneOf.d} (TypeScript).\n * @typedef OneOfDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} oneofName OneOf name\n * @returns {undefined}\n */\n\n/**\n * OneOf decorator (TypeScript).\n * @function\n * @param {...string} fieldNames Field names\n * @returns {OneOfDecorator} Decorator function\n * @template T extends string\n */\nOneOf.d = function decorateOneOf() {\n var fieldNames = new Array(arguments.length),\n index = 0;\n while (index < arguments.length)\n fieldNames[index] = arguments[index++];\n return function oneOfDecorator(prototype, oneofName) {\n util.decorateType(prototype.constructor)\n .add(new OneOf(oneofName, fieldNames));\n Object.defineProperty(prototype, oneofName, {\n get: util.oneOfGetter(fieldNames),\n set: util.oneOfSetter(fieldNames)\n });\n };\n};\n","\"use strict\";\nmodule.exports = parse;\n\nparse.filename = null;\nparse.defaults = { keepCase: false };\n\nvar tokenize = require(36),\n Root = require(31),\n Type = require(37),\n Field = require(18),\n MapField = require(22),\n OneOf = require(27),\n Enum = require(17),\n Service = require(35),\n Method = require(24),\n ReflectionObject = require(26),\n types = require(38),\n util = require(39);\n\nvar base10Re = /^[1-9][0-9]*$/,\n base10NegRe = /^-?[1-9][0-9]*$/,\n base16Re = /^0[x][0-9a-fA-F]+$/,\n base16NegRe = /^-?0[x][0-9a-fA-F]+$/,\n base8Re = /^0[0-7]+$/,\n base8NegRe = /^-?0[0-7]+$/,\n numberRe = util.patterns.numberRe,\n nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/,\n typeRefRe = util.patterns.typeRefRe;\n\n/**\n * Result object returned from {@link parse}.\n * @interface IParserResult\n * @property {string|undefined} package Package name, if declared\n * @property {string[]|undefined} imports Imports, if any\n * @property {string[]|undefined} weakImports Weak imports, if any\n * @property {Root} root Populated root instance\n */\n\n/**\n * Options modifying the behavior of {@link parse}.\n * @interface IParseOptions\n * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case\n * @property {boolean} [alternateCommentMode=false] Recognize double-slash comments in addition to doc-block comments.\n * @property {boolean} [preferTrailingComment=false] Use trailing comment when both leading comment and trailing comment exist.\n */\n\n/**\n * Options modifying the behavior of JSON serialization.\n * @interface IToJSONOptions\n * @property {boolean} [keepComments=false] Serializes comments.\n */\n\n/**\n * Parses the given .proto source and returns an object with the parsed contents.\n * @param {string} source Source contents\n * @param {Root} root Root to populate\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {IParserResult} Parser result\n * @property {string} filename=null Currently processing file name for error reporting, if known\n * @property {IParseOptions} defaults Default {@link IParseOptions}\n */\nfunction parse(source, root, options) {\n /* eslint-disable callback-return */\n if (!(root instanceof Root)) {\n options = root;\n root = new Root();\n }\n if (!options)\n options = parse.defaults;\n\n var preferTrailingComment = options.preferTrailingComment || false;\n var tn = tokenize(source, options.alternateCommentMode || false),\n next = tn.next,\n push = tn.push,\n peek = tn.peek,\n skip = tn.skip,\n cmnt = tn.cmnt;\n\n var head = true,\n pkg,\n imports,\n weakImports,\n edition = \"proto2\";\n\n var ptr = root;\n\n var topLevelObjects = [];\n var topLevelOptions = {};\n\n var applyCase = options.keepCase ? function(name) { return name; } : util.camelCase;\n\n function resolveFileFeatures() {\n topLevelObjects.forEach(obj => {\n obj._edition = edition;\n Object.keys(topLevelOptions).forEach(opt => {\n if (obj.getOption(opt) !== undefined) return;\n obj.setOption(opt, topLevelOptions[opt], true);\n });\n });\n }\n\n /* istanbul ignore next */\n function illegal(token, name, insideTryCatch) {\n var filename = parse.filename;\n if (!insideTryCatch)\n parse.filename = null;\n return Error(\"illegal \" + (name || \"token\") + \" '\" + token + \"' (\" + (filename ? filename + \", \" : \"\") + \"line \" + tn.line + \")\");\n }\n\n function readString() {\n var values = [],\n token;\n do {\n /* istanbul ignore if */\n if ((token = next()) !== \"\\\"\" && token !== \"'\")\n throw illegal(token);\n\n values.push(next());\n skip(token);\n token = peek();\n } while (token === \"\\\"\" || token === \"'\");\n return values.join(\"\");\n }\n\n function readValue(acceptTypeRef) {\n var token = next();\n switch (token) {\n case \"'\":\n case \"\\\"\":\n push(token);\n return readString();\n case \"true\": case \"TRUE\":\n return true;\n case \"false\": case \"FALSE\":\n return false;\n }\n try {\n return parseNumber(token, /* insideTryCatch */ true);\n } catch (e) {\n /* istanbul ignore else */\n if (acceptTypeRef && typeRefRe.test(token))\n return token;\n\n /* istanbul ignore next */\n throw illegal(token, \"value\");\n }\n }\n\n function readRanges(target, acceptStrings) {\n var token, start;\n do {\n if (acceptStrings && ((token = peek()) === \"\\\"\" || token === \"'\")) {\n var str = readString();\n target.push(str);\n if (edition >= 2023) {\n throw illegal(str, \"id\");\n }\n } else {\n try {\n target.push([ start = parseId(next()), skip(\"to\", true) ? parseId(next()) : start ]);\n } catch (err) {\n if (acceptStrings && typeRefRe.test(token) && edition >= 2023) {\n target.push(token);\n } else {\n throw err;\n }\n }\n }\n } while (skip(\",\", true));\n var dummy = {options: undefined};\n dummy.setOption = function(name, value) {\n if (this.options === undefined) this.options = {};\n this.options[name] = value;\n };\n ifBlock(\n dummy,\n function parseRange_block(token) {\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(dummy, token); // skip\n skip(\";\");\n } else\n throw illegal(token);\n },\n function parseRange_line() {\n parseInlineOptions(dummy); // skip\n });\n }\n\n function parseNumber(token, insideTryCatch) {\n var sign = 1;\n if (token.charAt(0) === \"-\") {\n sign = -1;\n token = token.substring(1);\n }\n switch (token) {\n case \"inf\": case \"INF\": case \"Inf\":\n return sign * Infinity;\n case \"nan\": case \"NAN\": case \"Nan\": case \"NaN\":\n return NaN;\n case \"0\":\n return 0;\n }\n if (base10Re.test(token))\n return sign * parseInt(token, 10);\n if (base16Re.test(token))\n return sign * parseInt(token, 16);\n if (base8Re.test(token))\n return sign * parseInt(token, 8);\n\n /* istanbul ignore else */\n if (numberRe.test(token))\n return sign * parseFloat(token);\n\n /* istanbul ignore next */\n throw illegal(token, \"number\", insideTryCatch);\n }\n\n function parseId(token, acceptNegative) {\n switch (token) {\n case \"max\": case \"MAX\": case \"Max\":\n return 536870911;\n case \"0\":\n return 0;\n }\n\n /* istanbul ignore if */\n if (!acceptNegative && token.charAt(0) === \"-\")\n throw illegal(token, \"id\");\n\n if (base10NegRe.test(token))\n return parseInt(token, 10);\n if (base16NegRe.test(token))\n return parseInt(token, 16);\n\n /* istanbul ignore else */\n if (base8NegRe.test(token))\n return parseInt(token, 8);\n\n /* istanbul ignore next */\n throw illegal(token, \"id\");\n }\n\n function parsePackage() {\n /* istanbul ignore if */\n if (pkg !== undefined)\n throw illegal(\"package\");\n\n pkg = next();\n\n /* istanbul ignore if */\n if (!typeRefRe.test(pkg))\n throw illegal(pkg, \"name\");\n\n ptr = ptr.define(pkg);\n\n skip(\";\");\n }\n\n function parseImport() {\n var token = peek();\n var whichImports;\n switch (token) {\n case \"weak\":\n whichImports = weakImports || (weakImports = []);\n next();\n break;\n case \"public\":\n next();\n // eslint-disable-next-line no-fallthrough\n default:\n whichImports = imports || (imports = []);\n break;\n }\n token = readString();\n skip(\";\");\n whichImports.push(token);\n }\n\n function parseSyntax() {\n skip(\"=\");\n edition = readString();\n\n /* istanbul ignore if */\n if (edition < 2023)\n throw illegal(edition, \"syntax\");\n\n skip(\";\");\n }\n\n function parseEdition() {\n skip(\"=\");\n edition = readString();\n const supportedEditions = [\"2023\"];\n\n /* istanbul ignore if */\n if (!supportedEditions.includes(edition))\n throw illegal(edition, \"edition\");\n\n skip(\";\");\n }\n\n\n function parseCommon(parent, token, depth) {\n if (depth === undefined)\n depth = 0;\n // depth is checked by dispatched functions\n switch (token) {\n\n case \"option\":\n parseOption(parent, token);\n skip(\";\");\n return true;\n\n case \"message\":\n parseType(parent, token, depth + 1);\n return true;\n\n case \"enum\":\n parseEnum(parent, token);\n return true;\n\n case \"service\":\n parseService(parent, token, depth + 1);\n return true;\n\n case \"extend\":\n parseExtension(parent, token, depth);\n return true;\n }\n return false;\n }\n\n function ifBlock(obj, fnIf, fnElse) {\n var trailingLine = tn.line;\n if (obj) {\n if(typeof obj.comment !== \"string\") {\n obj.comment = cmnt(); // try block-type comment\n }\n obj.filename = parse.filename;\n }\n if (skip(\"{\", true)) {\n var token;\n while ((token = next()) !== \"}\")\n fnIf(token);\n skip(\";\", true);\n } else {\n if (fnElse)\n fnElse();\n skip(\";\");\n if (obj && (typeof obj.comment !== \"string\" || preferTrailingComment))\n obj.comment = cmnt(trailingLine) || obj.comment; // try line-type comment\n }\n }\n\n function parseType(parent, token, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.nestingLimit)\n throw Error(\"max depth exceeded\");\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"type name\");\n\n var type = new Type(token);\n ifBlock(type, function parseType_block(token) {\n if (parseCommon(type, token, depth))\n return;\n\n switch (token) {\n\n case \"map\":\n parseMapField(type, token);\n break;\n\n case \"required\":\n if (edition !== \"proto2\")\n throw illegal(token);\n /* eslint-disable no-fallthrough */\n case \"repeated\":\n parseField(type, token, undefined, depth + 1);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (edition === \"proto3\") {\n parseField(type, \"proto3_optional\", undefined, depth + 1);\n } else if (edition !== \"proto2\") {\n throw illegal(token);\n } else {\n parseField(type, \"optional\", undefined, depth + 1);\n }\n break;\n\n case \"oneof\":\n parseOneOf(type, token, depth + 1);\n break;\n\n case \"extensions\":\n readRanges(type.extensions || (type.extensions = []));\n break;\n\n case \"reserved\":\n readRanges(type.reserved || (type.reserved = []), true);\n break;\n\n default:\n /* istanbul ignore if */\n if (edition === \"proto2\" || !typeRefRe.test(token)) {\n throw illegal(token);\n }\n\n push(token);\n parseField(type, \"optional\", undefined, depth + 1);\n break;\n }\n });\n parent.add(type);\n if (parent === ptr) {\n topLevelObjects.push(type);\n }\n }\n\n function parseField(parent, rule, extend, depth) {\n var type = next();\n if (type === \"group\") {\n parseGroup(parent, rule, depth);\n return;\n }\n // Type names can consume multiple tokens, in multiple variants:\n // package.subpackage field tokens: \"package.subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package . subpackage field tokens: \"package\" \".\" \"subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package. subpackage field tokens: \"package.\" \"subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package .subpackage field tokens: \"package\" \".subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // Keep reading tokens until we get a type name with no period at the end,\n // and the next token does not start with a period.\n while (type.endsWith(\".\") || peek().startsWith(\".\")) {\n type += next();\n }\n\n /* istanbul ignore if */\n if (!typeRefRe.test(type))\n throw illegal(type, \"type\");\n\n var name = next();\n\n /* istanbul ignore if */\n\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n name = applyCase(name);\n skip(\"=\");\n\n var field = new Field(name, parseId(next()), type, rule, extend);\n\n ifBlock(field, function parseField_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(field, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseField_line() {\n parseInlineOptions(field);\n });\n\n if (rule === \"proto3_optional\") {\n // for proto3 optional fields, we create a single-member Oneof to mimic \"optional\" behavior\n var oneof = new OneOf(\"_\" + name);\n field.setOption(\"proto3_optional\", true);\n oneof.add(field);\n parent.add(oneof);\n } else {\n parent.add(field);\n }\n if (parent === ptr) {\n topLevelObjects.push(field);\n }\n }\n\n function parseGroup(parent, rule, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.nestingLimit)\n throw Error(\"max depth exceeded\");\n if (edition >= 2023) {\n throw illegal(\"group\");\n }\n var name = next();\n\n /* istanbul ignore if */\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n var fieldName = util.lcFirst(name);\n if (name === fieldName)\n name = util.ucFirst(name);\n skip(\"=\");\n var id = parseId(next());\n var type = new Type(name);\n type.group = true;\n var field = new Field(fieldName, id, name, rule);\n field.filename = parse.filename;\n ifBlock(type, function parseGroup_block(token) {\n switch (token) {\n\n case \"option\":\n parseOption(type, token);\n skip(\";\");\n break;\n case \"required\":\n case \"repeated\":\n parseField(type, token, undefined, depth + 1);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (edition === \"proto3\") {\n parseField(type, \"proto3_optional\", undefined, depth + 1);\n } else {\n parseField(type, \"optional\", undefined, depth + 1);\n }\n break;\n\n case \"message\":\n parseType(type, token, depth + 1);\n break;\n\n case \"enum\":\n parseEnum(type, token);\n break;\n\n case \"reserved\":\n readRanges(type.reserved || (type.reserved = []), true);\n break;\n\n /* istanbul ignore next */\n default:\n throw illegal(token); // there are no groups with proto3 semantics\n }\n });\n parent.add(type)\n .add(field);\n }\n\n function parseMapField(parent) {\n skip(\"<\");\n var keyType = next();\n\n /* istanbul ignore if */\n if (types.mapKey[keyType] === undefined)\n throw illegal(keyType, \"type\");\n\n skip(\",\");\n var valueType = next();\n\n /* istanbul ignore if */\n if (!typeRefRe.test(valueType))\n throw illegal(valueType, \"type\");\n\n skip(\">\");\n var name = next();\n\n /* istanbul ignore if */\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n skip(\"=\");\n var field = new MapField(applyCase(name), parseId(next()), keyType, valueType);\n ifBlock(field, function parseMapField_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(field, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseMapField_line() {\n parseInlineOptions(field);\n });\n parent.add(field);\n }\n\n function parseOneOf(parent, token, depth) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var oneof = new OneOf(applyCase(token));\n ifBlock(oneof, function parseOneOf_block(token) {\n if (token === \"option\") {\n parseOption(oneof, token);\n skip(\";\");\n } else {\n push(token);\n parseField(oneof, \"optional\", undefined, depth);\n }\n });\n parent.add(oneof);\n }\n\n function parseEnum(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var enm = new Enum(token);\n ifBlock(enm, function parseEnum_block(token) {\n switch(token) {\n case \"option\":\n parseOption(enm, token);\n skip(\";\");\n break;\n\n case \"reserved\":\n readRanges(enm.reserved || (enm.reserved = []), true);\n if(enm.reserved === undefined) enm.reserved = [];\n break;\n\n default:\n parseEnumValue(enm, token);\n }\n });\n parent.add(enm);\n if (parent === ptr) {\n topLevelObjects.push(enm);\n }\n }\n\n function parseEnumValue(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token))\n throw illegal(token, \"name\");\n\n skip(\"=\");\n var value = parseId(next(), true),\n dummy = {\n options: undefined\n };\n dummy.getOption = function(name) {\n return this.options[name];\n };\n dummy.setOption = function(name, value) {\n ReflectionObject.prototype.setOption.call(dummy, name, value);\n };\n dummy.setParsedOption = function() {\n return undefined;\n };\n ifBlock(dummy, function parseEnumValue_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(dummy, token); // skip\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseEnumValue_line() {\n parseInlineOptions(dummy); // skip\n });\n parent.add(token, value, dummy.comment, dummy.parsedOptions || dummy.options);\n }\n\n function parseOption(parent, token) {\n var option;\n var propName;\n var isOption = true;\n if (token === \"option\") {\n token = next();\n }\n\n while (token !== \"=\") {\n if (token === \"(\") {\n var parensValue = next();\n skip(\")\");\n token = \"(\" + parensValue + \")\";\n }\n if (isOption) {\n isOption = false;\n if (token.includes(\".\") && !token.includes(\"(\")) {\n var tokens = token.split(\".\");\n option = tokens[0] + \".\";\n token = tokens[1];\n continue;\n }\n option = token;\n } else {\n propName = propName ? propName += token : token;\n }\n token = next();\n }\n var name = propName ? option.concat(propName) : option;\n var optionValue = parseOptionValue(parent, name);\n propName = propName && propName[0] === \".\" ? propName.slice(1) : propName;\n option = option && option[option.length - 1] === \".\" ? option.slice(0, -1) : option;\n setParsedOption(parent, option, optionValue, propName);\n }\n\n function parseOptionValue(parent, name, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n // { a: \"foo\" b { c: \"bar\" } }\n if (skip(\"{\", true)) {\n var objectResult = {};\n\n while (!skip(\"}\", true)) {\n /* istanbul ignore if */\n if (!nameRe.test(token = next())) {\n throw illegal(token, \"name\");\n }\n if (token === null) {\n throw illegal(token, \"end of input\");\n }\n\n var value;\n var propName = token;\n\n skip(\":\", true);\n\n if (peek() === \"{\") {\n // option (my_option) = {\n // repeated_value: [ \"foo\", \"bar\" ]\n // };\n value = parseOptionValue(parent, name + \".\" + token, depth + 1);\n } else if (peek() === \"[\") {\n value = [];\n var lastValue;\n if (skip(\"[\", true)) {\n do {\n lastValue = readValue(true);\n value.push(lastValue);\n } while (skip(\",\", true));\n skip(\"]\");\n if (typeof lastValue !== \"undefined\") {\n setOption(parent, name + \".\" + token, lastValue);\n }\n }\n } else {\n value = readValue(true);\n setOption(parent, name + \".\" + token, value);\n }\n\n var prevValue = objectResult[propName];\n\n if (prevValue)\n value = [].concat(prevValue).concat(value);\n\n if (propName !== \"__proto__\")\n objectResult[propName] = value;\n\n // Semicolons and commas can be optional\n skip(\",\", true);\n skip(\";\", true);\n }\n\n return objectResult;\n }\n\n var simpleValue = readValue(true);\n setOption(parent, name, simpleValue);\n return simpleValue;\n // Does not enforce a delimiter to be universal\n }\n\n function setOption(parent, name, value) {\n if (ptr === parent && /^features\\./.test(name)) {\n topLevelOptions[name] = value;\n return;\n }\n if (parent.setOption)\n parent.setOption(name, value);\n }\n\n function setParsedOption(parent, name, value, propName) {\n if (parent.setParsedOption)\n parent.setParsedOption(name, value, propName);\n }\n\n function parseInlineOptions(parent) {\n if (skip(\"[\", true)) {\n do {\n parseOption(parent, \"option\");\n } while (skip(\",\", true));\n skip(\"]\");\n }\n return parent;\n }\n\n function parseService(parent, token, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"service name\");\n\n var service = new Service(token);\n ifBlock(service, function parseService_block(token) {\n if (parseCommon(service, token, depth)) {\n return;\n }\n\n /* istanbul ignore else */\n if (token === \"rpc\")\n parseMethod(service, token);\n else\n throw illegal(token);\n });\n parent.add(service);\n if (parent === ptr) {\n topLevelObjects.push(service);\n }\n }\n\n function parseMethod(parent, token) {\n // Get the comment of the preceding line now (if one exists) in case the\n // method is defined across multiple lines.\n var commentText = cmnt();\n\n var type = token;\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var name = token,\n requestType, requestStream,\n responseType, responseStream;\n\n skip(\"(\");\n if (skip(\"stream\", true))\n requestStream = true;\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token);\n\n requestType = token;\n skip(\")\"); skip(\"returns\"); skip(\"(\");\n if (skip(\"stream\", true))\n responseStream = true;\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token);\n\n responseType = token;\n skip(\")\");\n\n var method = new Method(name, type, requestType, responseType, requestStream, responseStream);\n method.comment = commentText;\n ifBlock(method, function parseMethod_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(method, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n });\n parent.add(method);\n }\n\n function parseExtension(parent, token, depth) {\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token, \"reference\");\n\n var reference = token;\n ifBlock(null, function parseExtension_block(token) {\n switch (token) {\n\n case \"required\":\n case \"repeated\":\n parseField(parent, token, reference, depth + 1);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (edition === \"proto3\") {\n parseField(parent, \"proto3_optional\", reference, depth + 1);\n } else {\n parseField(parent, \"optional\", reference, depth + 1);\n }\n break;\n\n default:\n /* istanbul ignore if */\n if (edition === \"proto2\" || !typeRefRe.test(token))\n throw illegal(token);\n push(token);\n parseField(parent, \"optional\", reference, depth + 1);\n break;\n }\n });\n }\n\n var token;\n while ((token = next()) !== null) {\n switch (token) {\n\n case \"package\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parsePackage();\n break;\n\n case \"import\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parseImport();\n break;\n\n case \"syntax\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parseSyntax();\n break;\n\n case \"edition\":\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n parseEdition();\n break;\n\n case \"option\":\n parseOption(ptr, token);\n skip(\";\", true);\n break;\n\n default:\n\n /* istanbul ignore else */\n if (parseCommon(ptr, token, 0)) {\n head = false;\n continue;\n }\n\n /* istanbul ignore next */\n throw illegal(token);\n }\n }\n\n resolveFileFeatures();\n\n parse.filename = null;\n return {\n \"package\" : pkg,\n \"imports\" : imports,\n weakImports : weakImports,\n root : root\n };\n}\n\n/**\n * Parses the given .proto source and returns an object with the parsed contents.\n * @name parse\n * @function\n * @param {string} source Source contents\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {IParserResult} Parser result\n * @property {string} filename=null Currently processing file name for error reporting, if known\n * @property {IParseOptions} defaults Default {@link IParseOptions}\n * @variation 2\n */\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(42);\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Recursion limit.\n * @type {number}\n */\nReader.recursionLimit = util.recursionLimit;\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @param {number} [depth] Depth of recursion to control nested calls; 0 if omitted\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType, depth) {\n if (depth === undefined) depth = 0;\n if (depth > Reader.recursionLimit)\n throw Error(\"maximum nesting depth exceeded\");\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType, depth + 1);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(29);\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(42);\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = Root;\n\n// extends Namespace\nvar Namespace = require(25);\n((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = \"Root\";\n\nvar Field = require(18),\n Enum = require(17),\n OneOf = require(27),\n util = require(39);\n\nvar Type, // cyclic\n parse, // might be excluded\n common; // \"\n\n/**\n * Constructs a new root namespace instance.\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\n * @extends NamespaceBase\n * @constructor\n * @param {Object.} [options] Top level options\n */\nfunction Root(options) {\n Namespace.call(this, \"\", options);\n\n /**\n * Deferred extension fields.\n * @type {Field[]}\n */\n this.deferred = [];\n\n /**\n * Resolved file names of loaded files.\n * @type {string[]}\n */\n this.files = [];\n\n /**\n * Edition, defaults to proto2 if unspecified.\n * @type {string}\n * @private\n */\n this._edition = \"proto2\";\n\n /**\n * Global lookup cache of fully qualified names.\n * @type {Object.}\n * @private\n */\n this._fullyQualifiedObjects = {};\n}\n\n/**\n * Loads a namespace descriptor into a root namespace.\n * @param {INamespace} json Namespace descriptor\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Root} Root namespace\n */\nRoot.fromJSON = function fromJSON(json, root, depth) {\n depth = util.checkDepth(depth);\n if (!root)\n root = new Root();\n if (json.options)\n root.setOptions(json.options);\n return root.addJSON(json.nested, depth).resolveAll();\n};\n\n/**\n * Resolves the path of an imported file, relative to the importing origin.\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\n * @function\n * @param {string} origin The file name of the importing file\n * @param {string} target The file name being imported\n * @returns {string|null} Resolved path to `target` or `null` to skip the file\n */\nRoot.prototype.resolvePath = util.path.resolve;\n\n/**\n * Fetch content from file path or url\n * This method exists so you can override it with your own logic.\n * @function\n * @param {string} path File path or url\n * @param {FetchCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.fetch = util.fetch;\n\n// A symbol-like function to safely signal synchronous loading\n/* istanbul ignore next */\nfunction SYNC() {} // eslint-disable-line no-empty-function\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} options Parse options\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.load = function load(filename, options, callback) {\n if (typeof options === \"function\") {\n callback = options;\n options = undefined;\n }\n var self = this;\n if (!callback) {\n return util.asPromise(load, self, filename, options);\n }\n\n var sync = callback === SYNC; // undocumented\n\n // Finishes loading by calling the callback (exactly once)\n function finish(err, root) {\n /* istanbul ignore if */\n if (!callback) {\n return;\n }\n if (sync) {\n throw err;\n }\n if (root) {\n root.resolveAll();\n }\n var cb = callback;\n callback = null;\n cb(err, root);\n }\n\n // Bundled definition existence checking\n function getBundledFileName(filename) {\n var idx = filename.lastIndexOf(\"google/protobuf/\");\n if (idx > -1) {\n var altname = filename.substring(idx);\n if (altname in common) return altname;\n }\n return null;\n }\n\n // Processes a single file\n function process(filename, source, depth) {\n if (depth === undefined)\n depth = 0;\n try {\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n if (util.isString(source) && source.charAt(0) === \"{\")\n source = JSON.parse(source);\n if (!util.isString(source))\n self.setOptions(source.options).addJSON(source.nested);\n else {\n parse.filename = filename;\n var parsed = parse(source, self, options),\n resolved,\n i = 0;\n if (parsed.imports)\n for (; i < parsed.imports.length; ++i)\n if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i]))\n fetch(resolved, false, depth + 1);\n if (parsed.weakImports)\n for (i = 0; i < parsed.weakImports.length; ++i)\n if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i]))\n fetch(resolved, true, depth + 1);\n }\n } catch (err) {\n finish(err);\n }\n if (!sync && !queued) {\n finish(null, self); // only once anyway\n }\n }\n\n // Fetches a single file\n function fetch(filename, weak, depth) {\n if (depth === undefined)\n depth = 0;\n filename = getBundledFileName(filename) || filename;\n\n // Skip if already loaded / attempted\n if (self.files.indexOf(filename) > -1) {\n return;\n }\n self.files.push(filename);\n\n // Shortcut bundled definitions\n if (filename in common) {\n if (sync) {\n process(filename, common[filename], depth);\n } else {\n ++queued;\n setTimeout(function() {\n --queued;\n process(filename, common[filename], depth);\n });\n }\n return;\n }\n\n // Otherwise fetch from disk or network\n if (sync) {\n var source;\n try {\n source = util.fs.readFileSync(filename).toString(\"utf8\");\n } catch (err) {\n if (!weak)\n finish(err);\n return;\n }\n process(filename, source, depth);\n } else {\n ++queued;\n self.fetch(filename, function(err, source) {\n --queued;\n /* istanbul ignore if */\n if (!callback) {\n return; // terminated meanwhile\n }\n if (err) {\n /* istanbul ignore else */\n if (!weak)\n finish(err);\n else if (!queued) // can't be covered reliably\n finish(null, self);\n return;\n }\n process(filename, source, depth);\n });\n }\n }\n var queued = 0;\n\n // Assembling the root namespace doesn't require working type\n // references anymore, so we can load everything in parallel\n if (util.isString(filename)) {\n filename = [ filename ];\n }\n for (var i = 0, resolved; i < filename.length; ++i)\n if (resolved = self.resolvePath(\"\", filename[i]))\n fetch(resolved);\n if (sync) {\n self.resolveAll();\n return self;\n }\n if (!queued) {\n finish(null, self);\n }\n\n return self;\n};\n// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Promise} Promise\n * @variation 3\n */\n// function load(filename:string, [options:IParseOptions]):Promise\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only).\n * @function Root#loadSync\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n */\nRoot.prototype.loadSync = function loadSync(filename, options) {\n if (!util.isNode)\n throw Error(\"not supported\");\n return this.load(filename, options, SYNC);\n};\n\n/**\n * @override\n */\nRoot.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n if (this.deferred.length)\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\n }).join(\", \"));\n return Namespace.prototype.resolveAll.call(this);\n};\n\n// only uppercased (and thus conflict-free) children are exposed, see below\nvar exposeRe = /^[A-Z]/;\n\n/**\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\n * @param {Root} root Root instance\n * @param {Field} field Declaring extension field witin the declaring type\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\n * @inner\n * @ignore\n */\nfunction tryHandleExtension(root, field) {\n var extendedType = field.parent.lookup(field.extend);\n if (extendedType) {\n var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options);\n //do not allow to extend same field twice to prevent the error\n if (extendedType.get(sisterField.name)) {\n return true;\n }\n sisterField.declaringField = field;\n field.extensionField = sisterField;\n extendedType.add(sisterField);\n return true;\n }\n return false;\n}\n\n/**\n * Called when any object is added to this root or its sub-namespaces.\n * @param {ReflectionObject} object Object added\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleAdd = function _handleAdd(object) {\n if (object instanceof Field) {\n\n if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField)\n if (!tryHandleExtension(this, object))\n this.deferred.push(object);\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n object.parent[object.name] = object.values; // expose enum values as property of its parent\n\n } else if (!(object instanceof OneOf)) /* everything else is a namespace */ {\n\n if (object instanceof Type) // Try to handle any deferred extensions\n for (var i = 0; i < this.deferred.length;)\n if (tryHandleExtension(this, this.deferred[i]))\n this.deferred.splice(i, 1);\n else\n ++i;\n for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace\n this._handleAdd(object._nestedArray[j]);\n if (exposeRe.test(object.name))\n object.parent[object.name] = object; // expose namespace as property of its parent\n }\n\n if (object instanceof Type || object instanceof Enum || object instanceof Field) {\n // Only store types and enums for quick lookup during resolve.\n this._fullyQualifiedObjects[object.fullName] = object;\n }\n\n // The above also adds uppercased (and thus conflict-free) nested types, services and enums as\n // properties of namespaces just like static code does. This allows using a .d.ts generated for\n // a static module with reflection-based solutions where the condition is met.\n};\n\n/**\n * Called when any object is removed from this root or its sub-namespaces.\n * @param {ReflectionObject} object Object removed\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleRemove = function _handleRemove(object) {\n if (object instanceof Field) {\n\n if (/* an extension field */ object.extend !== undefined) {\n if (/* already handled */ object.extensionField) { // remove its sister field\n object.extensionField.parent.remove(object.extensionField);\n object.extensionField = null;\n } else { // cancel the extension\n var index = this.deferred.indexOf(object);\n /* istanbul ignore else */\n if (index > -1)\n this.deferred.splice(index, 1);\n }\n }\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose enum values\n\n } else if (object instanceof Namespace) {\n\n for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace\n this._handleRemove(object._nestedArray[i]);\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose namespaces\n\n }\n\n delete this._fullyQualifiedObjects[object.fullName];\n};\n\n// Sets up cyclic dependencies (called in index-light)\nRoot._configure = function(Type_, parse_, common_) {\n Type = Type_;\n parse = parse_;\n common = common_;\n};\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(34);\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(42);\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = Service;\n\n// extends Namespace\nvar Namespace = require(25);\n((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = \"Service\";\n\nvar Method = require(24),\n util = require(39),\n rpc = require(33);\n\nvar reservedRe = util.patterns.reservedRe;\n\n/**\n * Constructs a new service instance.\n * @classdesc Reflected service.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Service name\n * @param {Object.} [options] Service options\n * @throws {TypeError} If arguments are invalid\n */\nfunction Service(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Service methods.\n * @type {Object.}\n */\n this.methods = {}; // toJSON, marker\n\n /**\n * Cached methods as an array.\n * @type {Method[]|null}\n * @private\n */\n this._methodsArray = null;\n}\n\n/**\n * Service descriptor.\n * @interface IService\n * @extends INamespace\n * @property {Object.} methods Method descriptors\n */\n\n/**\n * Constructs a service from a service descriptor.\n * @param {string} name Service name\n * @param {IService} json Service descriptor\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Service} Created service\n * @throws {TypeError} If arguments are invalid\n */\nService.fromJSON = function fromJSON(name, json, depth) {\n depth = util.checkDepth(depth);\n var service = new Service(name, json.options);\n /* istanbul ignore else */\n if (json.methods)\n for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i)\n service.add(Method.fromJSON(names[i], json.methods[names[i]]));\n if (json.nested)\n service.addJSON(json.nested, depth);\n if (json.edition)\n service._edition = json.edition;\n service.comment = json.comment;\n service._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return service;\n};\n\n/**\n * Converts this service to a service descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IService} Service descriptor\n */\nService.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"options\" , inherited && inherited.options || undefined,\n \"methods\" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {},\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Methods of this service as an array for iteration.\n * @name Service#methodsArray\n * @type {Method[]}\n * @readonly\n */\nObject.defineProperty(Service.prototype, \"methodsArray\", {\n get: function() {\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\n }\n});\n\nfunction clearCache(service) {\n service._methodsArray = null;\n return service;\n}\n\n/**\n * @override\n */\nService.prototype.get = function get(name) {\n return Object.prototype.hasOwnProperty.call(this.methods, name)\n ? this.methods[name]\n : Namespace.prototype.get.call(this, name);\n};\n\n/**\n * @override\n */\nService.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n Namespace.prototype.resolve.call(this);\n var methods = this.methodsArray;\n for (var i = 0; i < methods.length; ++i)\n methods[i].resolve();\n return this;\n};\n\n/**\n * @override\n */\nService.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n if (!this._needsRecursiveFeatureResolution) return this;\n\n edition = this._edition || edition;\n\n Namespace.prototype._resolveFeaturesRecursive.call(this, edition);\n this.methodsArray.forEach(method => {\n method._resolveFeaturesRecursive(edition);\n });\n return this;\n};\n\n/**\n * @override\n */\nService.prototype.add = function add(object) {\n /* istanbul ignore if */\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Method) {\n if (object.name === \"__proto__\")\n return this;\n this.methods[object.name] = object;\n object.parent = this;\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * @override\n */\nService.prototype.remove = function remove(object) {\n if (object instanceof Method) {\n\n /* istanbul ignore if */\n if (this.methods[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.methods[object.name];\n object.parent = null;\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Creates a runtime service using the specified rpc implementation.\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed.\n */\nService.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited);\n for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) {\n var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\\w_]/g, \"\");\n rpcService[methodName] = util.codegen([\"r\",\"c\"], reservedRe.test(methodName) ? methodName + \"_\" : methodName)(\"return this.rpcCall(m,q,s,r,c)\")({\n m: method,\n q: method.resolvedRequestType.ctor,\n s: method.resolvedResponseType.ctor\n });\n }\n return rpcService;\n};\n","\"use strict\";\nmodule.exports = tokenize;\n\nvar delimRe = /[\\s{}=;:[\\],'\"()<>]/g,\n stringDoubleRe = /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\n stringSingleRe = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g;\n\nvar setCommentRe = /^ *[*/]+ */,\n setCommentAltRe = /^\\s*\\*?\\/*/,\n setCommentSplitRe = /\\n/g,\n whitespaceRe = /\\s/,\n unescapeRe = /\\\\(.?)/g;\n\nvar unescapeMap = {\n \"0\": \"\\0\",\n \"r\": \"\\r\",\n \"n\": \"\\n\",\n \"t\": \"\\t\"\n};\n\n/**\n * Unescapes a string.\n * @param {string} str String to unescape\n * @returns {string} Unescaped string\n * @property {Object.} map Special characters map\n * @memberof tokenize\n */\nfunction unescape(str) {\n return str.replace(unescapeRe, function($0, $1) {\n switch ($1) {\n case \"\\\\\":\n case \"\":\n return $1;\n default:\n return unescapeMap[$1] || \"\";\n }\n });\n}\n\ntokenize.unescape = unescape;\n\n/**\n * Gets the next token and advances.\n * @typedef TokenizerHandleNext\n * @type {function}\n * @returns {string|null} Next token or `null` on eof\n */\n\n/**\n * Peeks for the next token.\n * @typedef TokenizerHandlePeek\n * @type {function}\n * @returns {string|null} Next token or `null` on eof\n */\n\n/**\n * Pushes a token back to the stack.\n * @typedef TokenizerHandlePush\n * @type {function}\n * @param {string} token Token\n * @returns {undefined}\n */\n\n/**\n * Skips the next token.\n * @typedef TokenizerHandleSkip\n * @type {function}\n * @param {string} expected Expected token\n * @param {boolean} [optional=false] If optional\n * @returns {boolean} Whether the token matched\n * @throws {Error} If the token didn't match and is not optional\n */\n\n/**\n * Gets the comment on the previous line or, alternatively, the line comment on the specified line.\n * @typedef TokenizerHandleCmnt\n * @type {function}\n * @param {number} [line] Line number\n * @returns {string|null} Comment text or `null` if none\n */\n\n/**\n * Handle object returned from {@link tokenize}.\n * @interface ITokenizerHandle\n * @property {TokenizerHandleNext} next Gets the next token and advances (`null` on eof)\n * @property {TokenizerHandlePeek} peek Peeks for the next token (`null` on eof)\n * @property {TokenizerHandlePush} push Pushes a token back to the stack\n * @property {TokenizerHandleSkip} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws\n * @property {TokenizerHandleCmnt} cmnt Gets the comment on the previous line or the line comment on the specified line, if any\n * @property {number} line Current line number\n */\n\n/**\n * Tokenizes the given .proto source and returns an object with useful utility functions.\n * @param {string} source Source contents\n * @param {boolean} alternateCommentMode Whether we should activate alternate comment parsing mode.\n * @returns {ITokenizerHandle} Tokenizer handle\n */\nfunction tokenize(source, alternateCommentMode) {\n /* eslint-disable callback-return */\n source = source.toString();\n\n var offset = 0,\n length = source.length,\n line = 1,\n lastCommentLine = 0,\n comments = {};\n\n var stack = [];\n\n var stringDelim = null;\n\n /* istanbul ignore next */\n /**\n * Creates an error for illegal syntax.\n * @param {string} subject Subject\n * @returns {Error} Error created\n * @inner\n */\n function illegal(subject) {\n return Error(\"illegal \" + subject + \" (line \" + line + \")\");\n }\n\n /**\n * Reads a string till its end.\n * @returns {string} String read\n * @inner\n */\n function readString() {\n var re = stringDelim === \"'\" ? stringSingleRe : stringDoubleRe;\n re.lastIndex = offset - 1;\n var match = re.exec(source);\n if (!match)\n throw illegal(\"string\");\n offset = re.lastIndex;\n push(stringDelim);\n stringDelim = null;\n return unescape(match[1]);\n }\n\n /**\n * Gets the character at `pos` within the source.\n * @param {number} pos Position\n * @returns {string} Character\n * @inner\n */\n function charAt(pos) {\n return source.charAt(pos);\n }\n\n /**\n * Sets the current comment text.\n * @param {number} start Start offset\n * @param {number} end End offset\n * @param {boolean} isLeading set if a leading comment\n * @returns {undefined}\n * @inner\n */\n function setComment(start, end, isLeading) {\n var comment = {\n type: source.charAt(start++),\n lineEmpty: false,\n leading: isLeading,\n };\n var lookback;\n if (alternateCommentMode) {\n lookback = 2; // alternate comment parsing: \"//\" or \"/*\"\n } else {\n lookback = 3; // \"///\" or \"/**\"\n }\n var commentOffset = start - lookback,\n c;\n do {\n if (--commentOffset < 0 ||\n (c = source.charAt(commentOffset)) === \"\\n\") {\n comment.lineEmpty = true;\n break;\n }\n } while (c === \" \" || c === \"\\t\");\n var lines = source\n .substring(start, end)\n .split(setCommentSplitRe);\n for (var i = 0; i < lines.length; ++i)\n lines[i] = lines[i]\n .replace(alternateCommentMode ? setCommentAltRe : setCommentRe, \"\")\n .trim();\n comment.text = lines\n .join(\"\\n\")\n .trim();\n\n comments[line] = comment;\n lastCommentLine = line;\n }\n\n function isDoubleSlashCommentLine(startOffset) {\n var endOffset = findEndOfLine(startOffset);\n\n // see if remaining line matches comment pattern\n var lineText = source.substring(startOffset, endOffset);\n var isComment = /^\\s*\\/\\//.test(lineText);\n return isComment;\n }\n\n function findEndOfLine(cursor) {\n // find end of cursor's line\n var endOffset = cursor;\n while (endOffset < length && charAt(endOffset) !== \"\\n\") {\n endOffset++;\n }\n return endOffset;\n }\n\n /**\n * Obtains the next token.\n * @returns {string|null} Next token or `null` on eof\n * @inner\n */\n function next() {\n if (stack.length > 0)\n return stack.shift();\n if (stringDelim)\n return readString();\n var repeat,\n prev,\n curr,\n start,\n isDoc,\n isLeadingComment = offset === 0;\n do {\n if (offset === length)\n return null;\n repeat = false;\n while (whitespaceRe.test(curr = charAt(offset))) {\n if (curr === \"\\n\") {\n isLeadingComment = true;\n ++line;\n }\n if (++offset === length)\n return null;\n }\n\n if (charAt(offset) === \"/\") {\n if (++offset === length) {\n throw illegal(\"comment\");\n }\n if (charAt(offset) === \"/\") { // Line\n if (!alternateCommentMode) {\n // check for triple-slash comment\n isDoc = charAt(start = offset + 1) === \"/\";\n\n while (charAt(++offset) !== \"\\n\") {\n if (offset === length) {\n return null;\n }\n }\n ++offset;\n if (isDoc) {\n setComment(start, offset - 1, isLeadingComment);\n // Trailing comment cannot not be multi-line,\n // so leading comment state should be reset to handle potential next comments\n isLeadingComment = true;\n }\n ++line;\n repeat = true;\n } else {\n // check for double-slash comments, consolidating consecutive lines\n start = offset;\n isDoc = false;\n if (isDoubleSlashCommentLine(offset - 1)) {\n isDoc = true;\n do {\n offset = findEndOfLine(offset);\n if (offset === length) {\n break;\n }\n offset++;\n if (!isLeadingComment) {\n // Trailing comment cannot not be multi-line\n break;\n }\n } while (isDoubleSlashCommentLine(offset));\n } else {\n offset = Math.min(length, findEndOfLine(offset) + 1);\n }\n if (isDoc) {\n setComment(start, offset, isLeadingComment);\n isLeadingComment = true;\n }\n line++;\n repeat = true;\n }\n } else if ((curr = charAt(offset)) === \"*\") { /* Block */\n // check for /** (regular comment mode) or /* (alternate comment mode)\n start = offset + 1;\n isDoc = alternateCommentMode || charAt(start) === \"*\";\n do {\n if (curr === \"\\n\") {\n ++line;\n }\n if (++offset === length) {\n throw illegal(\"comment\");\n }\n prev = curr;\n curr = charAt(offset);\n } while (prev !== \"*\" || curr !== \"/\");\n ++offset;\n if (isDoc) {\n setComment(start, offset - 2, isLeadingComment);\n isLeadingComment = true;\n }\n repeat = true;\n } else {\n return \"/\";\n }\n }\n } while (repeat);\n\n // offset !== length if we got here\n\n var end = offset;\n delimRe.lastIndex = 0;\n var delim = delimRe.test(charAt(end++));\n if (!delim)\n while (end < length && !delimRe.test(charAt(end)))\n ++end;\n var token = source.substring(offset, offset = end);\n if (token === \"\\\"\" || token === \"'\")\n stringDelim = token;\n return token;\n }\n\n /**\n * Pushes a token back to the stack.\n * @param {string} token Token\n * @returns {undefined}\n * @inner\n */\n function push(token) {\n stack.push(token);\n }\n\n /**\n * Peeks for the next token.\n * @returns {string|null} Token or `null` on eof\n * @inner\n */\n function peek() {\n if (!stack.length) {\n var token = next();\n if (token === null)\n return null;\n push(token);\n }\n return stack[0];\n }\n\n /**\n * Skips a token.\n * @param {string} expected Expected token\n * @param {boolean} [optional=false] Whether the token is optional\n * @returns {boolean} `true` when skipped, `false` if not\n * @throws {Error} When a required token is not present\n * @inner\n */\n function skip(expected, optional) {\n var actual = peek(),\n equals = actual === expected;\n if (equals) {\n next();\n return true;\n }\n if (!optional)\n throw illegal(\"token '\" + actual + \"', '\" + expected + \"' expected\");\n return false;\n }\n\n /**\n * Gets a comment.\n * @param {number} [trailingLine] Line number if looking for a trailing comment\n * @returns {string|null} Comment text\n * @inner\n */\n function cmnt(trailingLine) {\n var ret = null;\n var comment;\n if (trailingLine === undefined) {\n comment = comments[line - 1];\n delete comments[line - 1];\n if (comment && (alternateCommentMode || comment.type === \"*\" || comment.lineEmpty)) {\n ret = comment.leading ? comment.text : null;\n }\n } else {\n /* istanbul ignore else */\n if (lastCommentLine < trailingLine) {\n peek();\n }\n comment = comments[trailingLine];\n delete comments[trailingLine];\n if (comment && !comment.lineEmpty && (alternateCommentMode || comment.type === \"/\")) {\n ret = comment.leading ? null : comment.text;\n }\n }\n return ret;\n }\n\n return Object.defineProperty({\n next: next,\n peek: peek,\n push: push,\n skip: skip,\n cmnt: cmnt\n }, \"line\", {\n get: function() { return line; }\n });\n /* eslint-enable callback-return */\n}\n","\"use strict\";\nmodule.exports = Type;\n\n// extends Namespace\nvar Namespace = require(25);\n((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = \"Type\";\n\nvar Enum = require(17),\n OneOf = require(27),\n Field = require(18),\n MapField = require(22),\n Service = require(35),\n Message = require(23),\n Reader = require(29),\n Writer = require(46),\n util = require(39),\n encoder = require(16),\n decoder = require(15),\n verifier = require(44),\n converter = require(14),\n wrappers = require(45);\n\n/**\n * Constructs a new reflected message type instance.\n * @classdesc Reflected message type.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Message name\n * @param {Object.} [options] Declared options\n */\nfunction Type(name, options) {\n name = name.replace(/\\W/g, \"\");\n Namespace.call(this, name, options);\n\n /**\n * Message fields.\n * @type {Object.}\n */\n this.fields = {}; // toJSON, marker\n\n /**\n * Oneofs declared within this namespace, if any.\n * @type {Object.}\n */\n this.oneofs = undefined; // toJSON\n\n /**\n * Extension ranges, if any.\n * @type {number[][]}\n */\n this.extensions = undefined; // toJSON\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n /*?\n * Whether this type is a legacy group.\n * @type {boolean|undefined}\n */\n this.group = undefined; // toJSON\n\n /**\n * Cached fields by id.\n * @type {Object.|null}\n * @private\n */\n this._fieldsById = null;\n\n /**\n * Cached fields as an array.\n * @type {Field[]|null}\n * @private\n */\n this._fieldsArray = null;\n\n /**\n * Cached oneofs as an array.\n * @type {OneOf[]|null}\n * @private\n */\n this._oneofsArray = null;\n\n /**\n * Cached constructor.\n * @type {Constructor<{}>}\n * @private\n */\n this._ctor = null;\n}\n\nObject.defineProperties(Type.prototype, {\n\n /**\n * Message fields by id.\n * @name Type#fieldsById\n * @type {Object.}\n * @readonly\n */\n fieldsById: {\n get: function() {\n\n /* istanbul ignore if */\n if (this._fieldsById)\n return this._fieldsById;\n\n this._fieldsById = {};\n for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) {\n var field = this.fields[names[i]],\n id = field.id;\n\n /* istanbul ignore if */\n if (this._fieldsById[id])\n throw Error(\"duplicate id \" + id + \" in \" + this);\n\n this._fieldsById[id] = field;\n }\n return this._fieldsById;\n }\n },\n\n /**\n * Fields of this message as an array for iteration.\n * @name Type#fieldsArray\n * @type {Field[]}\n * @readonly\n */\n fieldsArray: {\n get: function() {\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\n }\n },\n\n /**\n * Oneofs of this message as an array for iteration.\n * @name Type#oneofsArray\n * @type {OneOf[]}\n * @readonly\n */\n oneofsArray: {\n get: function() {\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\n }\n },\n\n /**\n * The registered constructor, if any registered, otherwise a generic constructor.\n * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor.\n * @name Type#ctor\n * @type {Constructor<{}>}\n */\n ctor: {\n get: function() {\n return this._ctor || (this.ctor = Type.generateConstructor(this)());\n },\n set: function(ctor) {\n\n // Ensure proper prototype\n var prototype = ctor.prototype;\n if (!(prototype instanceof Message)) {\n (ctor.prototype = new Message()).constructor = ctor;\n util.merge(ctor.prototype, prototype);\n }\n\n // Classes and messages reference their reflected type\n ctor.$type = ctor.prototype.$type = this;\n\n // Mix in static methods\n util.merge(ctor, Message, true);\n\n this._ctor = ctor;\n\n // Messages have non-enumerable default values on their prototype\n var i = 0;\n for (; i < /* initializes */ this.fieldsArray.length; ++i)\n this._fieldsArray[i].resolve(); // ensures a proper value\n\n // Messages have non-enumerable getters and setters for each virtual oneof field\n var ctorProperties = {};\n for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i)\n ctorProperties[this._oneofsArray[i].resolve().name] = {\n get: util.oneOfGetter(this._oneofsArray[i].oneof),\n set: util.oneOfSetter(this._oneofsArray[i].oneof)\n };\n if (i)\n Object.defineProperties(ctor.prototype, ctorProperties);\n }\n }\n});\n\n/**\n * Generates a constructor function for the specified type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nType.generateConstructor = function generateConstructor(mtype) {\n /* eslint-disable no-unexpected-multiline */\n var gen = util.codegen([\"p\"], mtype.name);\n // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype\n for (var i = 0, field; i < mtype.fieldsArray.length; ++i)\n if ((field = mtype._fieldsArray[i]).map) gen\n (\"this%s={}\", util.safeProp(field.name));\n else if (field.repeated) gen\n (\"this%s=[]\", util.safeProp(field.name));\n return gen\n (\"if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors\n * @property {Object.} fields Field descriptors\n * @property {number[][]} [extensions] Extension ranges\n * @property {Array.} [reserved] Reserved ranges\n * @property {boolean} [group=false] Whether a legacy group or not\n */\n\n/**\n * Creates a message type from a message type descriptor.\n * @param {string} name Message name\n * @param {IType} json Message type descriptor\n * @param {number} [depth] Current nesting depth, defaults to `0`\n * @returns {Type} Created message type\n */\nType.fromJSON = function fromJSON(name, json, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.nestingLimit)\n throw Error(\"max depth exceeded\");\n var type = new Type(name, json.options);\n type.extensions = json.extensions;\n type.reserved = json.reserved;\n var names = Object.keys(json.fields),\n i = 0;\n for (; i < names.length; ++i)\n type.add(\n ( typeof json.fields[names[i]].keyType !== \"undefined\"\n ? MapField.fromJSON\n : Field.fromJSON )(names[i], json.fields[names[i]])\n );\n if (json.oneofs)\n for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i)\n type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]]));\n if (json.nested)\n for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) {\n var nested = json.nested[names[i]];\n type.add( // most to least likely\n ( nested.id !== undefined\n ? Field.fromJSON\n : nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : Namespace.fromJSON )(names[i], nested, depth + 1)\n );\n }\n if (json.extensions && json.extensions.length)\n type.extensions = json.extensions;\n if (json.reserved && json.reserved.length)\n type.reserved = json.reserved;\n if (json.group)\n type.group = true;\n if (json.comment)\n type.comment = json.comment;\n if (json.edition)\n type._edition = json.edition;\n type._defaultEdition = \"proto3\"; // For backwards-compatibility.\n return type;\n};\n\n/**\n * Converts this message type to a message type descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IType} Message type descriptor\n */\nType.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"edition\" , this._editionToJSON(),\n \"options\" , inherited && inherited.options || undefined,\n \"oneofs\" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions),\n \"fields\" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {},\n \"extensions\" , this.extensions && this.extensions.length ? this.extensions : undefined,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"group\" , this.group || undefined,\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nType.prototype.resolveAll = function resolveAll() {\n if (!this._needsRecursiveResolve) return this;\n\n Namespace.prototype.resolveAll.call(this);\n var oneofs = this.oneofsArray; i = 0;\n while (i < oneofs.length)\n oneofs[i++].resolve();\n var fields = this.fieldsArray, i = 0;\n while (i < fields.length)\n fields[i++].resolve();\n return this;\n};\n\n/**\n * @override\n */\nType.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {\n if (!this._needsRecursiveFeatureResolution) return this;\n\n edition = this._edition || edition;\n\n Namespace.prototype._resolveFeaturesRecursive.call(this, edition);\n this.oneofsArray.forEach(oneof => {\n oneof._resolveFeatures(edition);\n });\n this.fieldsArray.forEach(field => {\n field._resolveFeatures(edition);\n });\n return this;\n};\n\n/**\n * @override\n */\nType.prototype.get = function get(name) {\n if (Object.prototype.hasOwnProperty.call(this.fields, name))\n return this.fields[name];\n if (this.oneofs && Object.prototype.hasOwnProperty.call(this.oneofs, name))\n return this.oneofs[name];\n if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name))\n return this.nested[name];\n return null;\n};\n\n/**\n * Adds a nested object to this type.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\n */\nType.prototype.add = function add(object) {\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Field && object.extend === undefined) {\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\n // The root object takes care of adding distinct sister-fields to the respective extended\n // type instead.\n\n // avoids calling the getter if not absolutely necessary because it's called quite frequently\n if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id])\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\n if (this.isReservedId(object.id))\n throw Error(\"id \" + object.id + \" is reserved in \" + this);\n if (this.isReservedName(object.name))\n throw Error(\"name '\" + object.name + \"' is reserved in \" + this);\n if (object.name === \"__proto__\")\n return this;\n\n if (object.parent)\n object.parent.remove(object);\n this.fields[object.name] = object;\n object.message = this;\n object.onAdd(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n if (object.name === \"__proto__\")\n return this;\n if (!this.oneofs)\n this.oneofs = {};\n this.oneofs[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * Removes a nested object from this type.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this type\n */\nType.prototype.remove = function remove(object) {\n if (object instanceof Field && object.extend === undefined) {\n // See Type#add for the reason why extension fields are excluded here.\n\n /* istanbul ignore if */\n if (!this.fields || this.fields[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.fields[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n\n /* istanbul ignore if */\n if (!this.oneofs || this.oneofs[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.oneofs[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message<{}>} Message instance\n */\nType.prototype.create = function create(properties) {\n return new this.ctor(properties);\n};\n\n/**\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\n * @returns {Type} `this`\n */\nType.prototype.setup = function setup() {\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\n // multiple times (V8, soft-deopt prototype-check).\n\n var fullName = this.fullName,\n types = [];\n for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i)\n types.push(this._fieldsArray[i].resolve().resolvedType);\n\n // Replace setup methods with type-specific generated functions\n this.encode = encoder(this)({\n Writer : Writer,\n types : types,\n util : util\n });\n this.decode = decoder(this)({\n Reader : Reader,\n types : types,\n util : util\n });\n this.verify = verifier(this)({\n types : types,\n util : util\n });\n this.fromObject = converter.fromObject(this)({\n types : types,\n util : util\n });\n this.toObject = converter.toObject(this)({\n types : types,\n util : util\n });\n\n // Inject custom wrappers for common types\n var wrapper = wrappers[fullName];\n if (wrapper) {\n var originalThis = Object.create(this);\n // if (wrapper.fromObject) {\n originalThis.fromObject = this.fromObject;\n this.fromObject = wrapper.fromObject.bind(originalThis);\n // }\n // if (wrapper.toObject) {\n originalThis.toObject = this.toObject;\n this.toObject = wrapper.toObject.bind(originalThis);\n // }\n }\n\n return this;\n};\n\n/**\n * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encode = function encode_setup(message, writer) { // eslint-disable-line no-unused-vars\n return this.setup().encode.apply(this, arguments); // overrides this method\n};\n\n/**\n * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\n};\n\n/**\n * Decodes a message of this type.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Length of the message, if known beforehand\n * @param {number} [end] Expected group end tag, if decoding a group\n * @param {number} [depth] Current nesting depth\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError<{}>} If required fields are missing\n */\nType.prototype.decode = function decode_setup(reader, length, end, depth) {\n return this.setup().decode(reader, length, end, depth); // overrides this method\n};\n\n/**\n * Decodes a message of this type preceeded by its byte length as a varint.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError} If required fields are missing\n */\nType.prototype.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof Reader))\n reader = Reader.create(reader);\n return this.decode(reader, reader.uint32());\n};\n\n/**\n * Verifies that field values are valid and that required fields are present.\n * @param {Object.} message Plain object to verify\n * @param {number} [depth] Current nesting depth\n * @returns {null|string} `null` if valid, otherwise the reason why it is not\n */\nType.prototype.verify = function verify_setup(message, depth) {\n return this.setup().verify(message, depth); // overrides this method\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object to convert\n * @param {number} [depth] Current nesting depth\n * @returns {Message<{}>} Message instance\n */\nType.prototype.fromObject = function fromObject(object, depth) {\n return this.setup().fromObject(object, depth);\n};\n\n/**\n * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}.\n * @interface IConversionOptions\n * @property {Function} [longs] Long conversion type.\n * Valid values are `BigInt`, `String` and `Number` (the global types).\n * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library.\n * @property {Function} [enums] Enum value conversion type.\n * Only valid value is `String` (the global type).\n * Defaults to copy the present value, which is the numeric id.\n * @property {Function} [bytes] Bytes value conversion type.\n * Valid values are `Array` and (a base64 encoded) `String` (the global types).\n * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser.\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\n * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\n * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false`\n * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any\n * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings\n */\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\nType.prototype.toObject = function toObject(message, options) { // eslint-disable-line no-unused-vars\n return this.setup().toObject.apply(this, arguments);\n};\n\n/**\n * Decorator function as returned by {@link Type.d} (TypeScript).\n * @typedef TypeDecorator\n * @type {function}\n * @param {Constructor} target Target constructor\n * @returns {undefined}\n * @template T extends Message\n */\n\n/**\n * Type decorator (TypeScript).\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {TypeDecorator} Decorator function\n * @template T extends Message\n */\nType.d = function decorateType(typeName) {\n return function typeDecorator(target) {\n util.decorateType(target, typeName);\n };\n};\n","\"use strict\";\n\n/**\n * Common type constants.\n * @namespace\n */\nvar types = exports;\n\nvar util = require(39);\n\nvar s = [\n \"double\", // 0\n \"float\", // 1\n \"int32\", // 2\n \"uint32\", // 3\n \"sint32\", // 4\n \"fixed32\", // 5\n \"sfixed32\", // 6\n \"int64\", // 7\n \"uint64\", // 8\n \"sint64\", // 9\n \"fixed64\", // 10\n \"sfixed64\", // 11\n \"bool\", // 12\n \"string\", // 13\n \"bytes\" // 14\n];\n\nfunction bake(values, offset) {\n var i = 0, o = Object.create(null);\n offset |= 0;\n while (i < values.length) o[s[i + offset]] = values[i++];\n return o;\n}\n\n/**\n * Basic type wire types.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n * @property {number} bytes=2 Ldelim wire type\n */\ntypes.basic = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2,\n /* bytes */ 2\n]);\n\n/**\n * Basic type defaults.\n * @type {Object.}\n * @const\n * @property {number} double=0 Double default\n * @property {number} float=0 Float default\n * @property {number} int32=0 Int32 default\n * @property {number} uint32=0 Uint32 default\n * @property {number} sint32=0 Sint32 default\n * @property {number} fixed32=0 Fixed32 default\n * @property {number} sfixed32=0 Sfixed32 default\n * @property {number} int64=0 Int64 default\n * @property {number} uint64=0 Uint64 default\n * @property {number} sint64=0 Sint32 default\n * @property {number} fixed64=0 Fixed64 default\n * @property {number} sfixed64=0 Sfixed64 default\n * @property {boolean} bool=false Bool default\n * @property {string} string=\"\" String default\n * @property {Array.} bytes=Array(0) Bytes default\n * @property {null} message=null Message default\n */\ntypes.defaults = bake([\n /* double */ 0,\n /* float */ 0,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 0,\n /* sfixed32 */ 0,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 0,\n /* sfixed64 */ 0,\n /* bool */ false,\n /* string */ \"\",\n /* bytes */ util.emptyArray,\n /* message */ null\n]);\n\n/**\n * Basic long type wire types.\n * @type {Object.}\n * @const\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n */\ntypes.long = bake([\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1\n], 7);\n\n/**\n * Allowed types for map keys with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n */\ntypes.mapKey = bake([\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2\n], 2);\n\n/**\n * Allowed types for packed repeated fields with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n */\ntypes.packed = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0\n]);\n","\"use strict\";\n\n/**\n * Various utility functions.\n * @namespace\n */\nvar util = module.exports = require(42);\n\nvar roots = require(32);\n\nvar Type, // cyclic\n Enum;\n\nutil.codegen = require(3);\nutil.fetch = require(5);\nutil.path = require(9);\nutil.patterns = require(43);\n\nvar reservedRe = util.patterns.reservedRe;\n\n/**\n * Node's fs module if available.\n * @type {Object.}\n */\nutil.fs = require(40);\n\n/**\n * Checks a recursion depth.\n * @param {number|undefined} depth Depth of recursion\n * @returns {number} Depth of recursion\n * @throws {Error} If depth exceeds util.recursionLimit\n */\nutil.checkDepth = function checkDepth(depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n return depth;\n};\n\n/**\n * Converts an object's values to an array.\n * @param {Object.} object Object to convert\n * @returns {Array.<*>} Converted array\n */\nutil.toArray = function toArray(object) {\n if (object) {\n var keys = Object.keys(object),\n array = new Array(keys.length),\n index = 0;\n while (index < keys.length)\n array[index] = object[keys[index++]];\n return array;\n }\n return [];\n};\n\n/**\n * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values.\n * @param {Array.<*>} array Array to convert\n * @returns {Object.} Converted object\n */\nutil.toObject = function toObject(array) {\n var object = {},\n index = 0;\n while (index < array.length) {\n var key = array[index++],\n val = array[index++];\n if (val !== undefined)\n object[key] = val;\n }\n return object;\n};\n\n/**\n * Tests whether the specified name is a reserved word in JS.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nutil.isReserved = function isReserved(name) {\n return reservedRe.test(name);\n};\n\n/**\n * Returns a safe property accessor for the specified property name.\n * @param {string} prop Property name\n * @returns {string} Safe accessor\n */\nutil.safeProp = function safeProp(prop) {\n if (!/^[$\\w_]+$/.test(prop) || reservedRe.test(prop))\n return \"[\" + JSON.stringify(prop) + \"]\";\n return \".\" + prop;\n};\n\n/**\n * Converts the first character of a string to upper case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.ucFirst = function ucFirst(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n\nvar camelCaseRe = /_([a-z])/g;\n\n/**\n * Converts a string to camel case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.camelCase = function camelCase(str) {\n return str.substring(0, 1)\n + str.substring(1)\n .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); });\n};\n\n/**\n * Compares reflected fields by id.\n * @param {Field} a First field\n * @param {Field} b Second field\n * @returns {number} Comparison value\n */\nutil.compareFieldsById = function compareFieldsById(a, b) {\n return a.id - b.id;\n};\n\n/**\n * Decorator helper for types (TypeScript).\n * @param {Constructor} ctor Constructor function\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {Type} Reflected type\n * @template T extends Message\n * @property {Root} root Decorators root\n */\nutil.decorateType = function decorateType(ctor, typeName) {\n\n /* istanbul ignore if */\n if (ctor.$type) {\n if (typeName && ctor.$type.name !== typeName) {\n util.decorateRoot.remove(ctor.$type);\n ctor.$type.name = typeName;\n util.decorateRoot.add(ctor.$type);\n }\n return ctor.$type;\n }\n\n /* istanbul ignore next */\n if (!Type)\n Type = require(37);\n\n var type = new Type(typeName || ctor.name);\n util.decorateRoot.add(type);\n type.ctor = ctor; // sets up .encode, .decode etc.\n Object.defineProperty(ctor, \"$type\", { value: type, enumerable: false });\n Object.defineProperty(ctor.prototype, \"$type\", { value: type, enumerable: false });\n return type;\n};\n\nvar decorateEnumIndex = 0;\n\n/**\n * Decorator helper for enums (TypeScript).\n * @param {Object} object Enum object\n * @returns {Enum} Reflected enum\n */\nutil.decorateEnum = function decorateEnum(object) {\n\n /* istanbul ignore if */\n if (object.$type)\n return object.$type;\n\n /* istanbul ignore next */\n if (!Enum)\n Enum = require(17);\n\n var enm = new Enum(\"Enum\" + decorateEnumIndex++, object);\n util.decorateRoot.add(enm);\n Object.defineProperty(object, \"$type\", { value: enm, enumerable: false });\n return enm;\n};\n\n\n/**\n * Sets the value of a property by property path. If a value already exists, it is turned to an array\n * @param {Object.} dst Destination object\n * @param {string} path dot '.' delimited path of the property to set\n * @param {Object} value the value to set\n * @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {Object.} Destination object\n */\nutil.setProperty = function setProperty(dst, path, value, ifNotSet) {\n function setProp(dst, path, value) {\n var part = path.shift();\n if (util.isUnsafeProperty(part))\n return dst;\n if (path.length > 0) {\n dst[part] = setProp(dst[part] || {}, path, value);\n } else {\n var prevValue = dst[part];\n if (prevValue && ifNotSet)\n return dst;\n if (prevValue)\n value = [].concat(prevValue).concat(value);\n dst[part] = value;\n }\n return dst;\n }\n\n if (typeof dst !== \"object\")\n throw TypeError(\"dst must be an object\");\n if (!path)\n throw TypeError(\"path must be specified\");\n\n path = path.split(\".\");\n if (path.length > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n return setProp(dst, path, value);\n};\n\n/**\n * Decorator root (TypeScript).\n * @name util.decorateRoot\n * @type {Root}\n * @readonly\n */\nObject.defineProperty(util, \"decorateRoot\", {\n get: function() {\n return roots[\"decorated\"] || (roots[\"decorated\"] = new (require(31))());\n }\n});\n","\"use strict\";\n\nvar fs = null;\ntry {\n fs = require(12);\n if (!fs || !fs.readFile || !fs.readFileSync)\n fs = null;\n} catch (e) {\n // `fs` is unavailable in browsers and browser-like bundles.\n}\nmodule.exports = fs;\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(42);\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(1);\n\n// converts to / from base64 encoded strings\nutil.base64 = require(2);\n\n// base class of rpc.Service\nutil.EventEmitter = require(4);\n\n// float handling accross browsers\nutil.float = require(7);\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(8);\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(11);\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(10);\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(41);\n\n/**\n * Tests if the specified key can affect object prototypes.\n * @memberof util\n * @param {string} key Key to test\n * @returns {boolean} `true` if the key is unsafe\n */\nfunction isUnsafeProperty(key) {\n return key === \"__proto__\" || key === \"prototype\" || key === \"constructor\";\n}\n\nutil.isUnsafeProperty = isUnsafeProperty;\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.global.Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || (function() {\n try {\n var Long = require(\"long\");\n return Long && Long.isLong ? Long : null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n })();\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {...(Object.|boolean)} src Source objects, optionally followed by an `ifNotSet` flag\n * @returns {Object.} Destination object\n */\nfunction merge(dst) { // used by converters\n var ifNotSet = typeof arguments[arguments.length - 1] === \"boolean\",\n limit = ifNotSet ? arguments.length - 1 : arguments.length;\n ifNotSet = ifNotSet && arguments[arguments.length - 1];\n for (var a = 1; a < limit; ++a) {\n var src = arguments[a];\n if (!src)\n continue;\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (!isUnsafeProperty(keys[i]) && (dst[keys[i]] === undefined || !ifNotSet))\n dst[keys[i]] = src[keys[i]];\n }\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Schema declaration nesting limit.\n * @memberof util\n * @type {number}\n */\nutil.nestingLimit = 32; // protoc: MaxMessageDeclarationNestingDepth\n\n/**\n * Recursion limit.\n * @memberof util\n * @type {number}\n */\nutil.recursionLimit = 100; // protoc: CodedInputStream::default_recursion_limit_\n\n/**\n * Makes a property safe for assignment as an own property.\n * @memberof util\n * @param {Object.} obj Object\n * @param {string} key Property key\n * @returns {undefined}\n */\nutil.makeProp = function makeProp(obj, key) {\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n writable: true\n });\n};\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\n\nvar patterns = exports;\n\npatterns.numberRe = /^(?![eE])[0-9]*(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/;\npatterns.typeRefRe = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;\npatterns.reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;\n","\"use strict\";\nmodule.exports = verifier;\n\nvar Enum = require(17),\n util = require(39);\n\nfunction invalid(field, expected) {\n return field.name + \": \" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected\";\n}\n\n/**\n * Generates a partial value verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\n /* eslint-disable no-unexpected-multiline */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(%s){\", ref)\n (\"default:\")\n (\"return%j\", invalid(field, \"enum value\"));\n for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen\n (\"case %i:\", field.resolvedType.values[keys[j]]);\n gen\n (\"break\")\n (\"}\");\n } else {\n gen\n (\"{\")\n (\"var e=types[%i].verify(%s,n+1);\", fieldIndex, ref)\n (\"if(e)\")\n (\"return%j+e\", field.name + \".\")\n (\"}\");\n }\n } else {\n switch (field.type) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.isInteger(%s))\", ref)\n (\"return%j\", invalid(field, \"integer\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\n (\"return%j\", invalid(field, \"integer|Long\"));\n break;\n case \"float\":\n case \"double\": gen\n (\"if(typeof %s!==\\\"number\\\")\", ref)\n (\"return%j\", invalid(field, \"number\"));\n break;\n case \"bool\": gen\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\n (\"return%j\", invalid(field, \"boolean\"));\n break;\n case \"string\": gen\n (\"if(!util.isString(%s))\", ref)\n (\"return%j\", invalid(field, \"string\"));\n break;\n case \"bytes\": gen\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\n (\"return%j\", invalid(field, \"buffer\"));\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a partial key verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyKey(gen, field, ref) {\n /* eslint-disable no-unexpected-multiline */\n switch (field.keyType) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.key32Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"integer key\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.key64Re.test(%s))\", ref) // see comment above: x is ok, d is not\n (\"return%j\", invalid(field, \"integer|Long key\"));\n break;\n case \"bool\": gen\n (\"if(!util.key2Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"boolean key\"));\n break;\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a verifier specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction verifier(mtype) {\n /* eslint-disable no-unexpected-multiline */\n\n var gen = util.codegen([\"m\", \"n\"], mtype.name + \"$verify\")\n (\"if(typeof m!==\\\"object\\\"||m===null)\")\n (\"return%j\", \"object expected\")\n (\"if(n===undefined)n=0\")\n (\"if(n>util.recursionLimit)\")\n (\"return%j\", \"maximum nesting depth exceeded\");\n var oneofs = mtype.oneofsArray,\n seenFirstField = {};\n if (oneofs.length) gen\n (\"var p={}\");\n\n for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n ref = \"m\" + util.safeProp(field.name);\n\n if (field.optional) gen\n (\"if(%s!=null&&m.hasOwnProperty(%j)){\", ref, field.name); // !== undefined && !== null\n\n // map fields\n if (field.map) { gen\n (\"if(!util.isObject(%s))\", ref)\n (\"return%j\", invalid(field, \"object\"))\n (\"var k=Object.keys(%s)\", ref)\n (\"for(var i=0;i}\n * @const\n */\nvar wrappers = exports;\n\nvar Message = require(23),\n util = require(42);\n\n/**\n * From object converter part of an {@link IWrapper}.\n * @typedef WrapperFromObjectConverter\n * @type {function}\n * @param {Object.} object Plain object\n * @returns {Message<{}>} Message instance\n * @this Type\n */\n\n/**\n * To object converter part of an {@link IWrapper}.\n * @typedef WrapperToObjectConverter\n * @type {function}\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @this Type\n */\n\n/**\n * Common type wrapper part of {@link wrappers}.\n * @interface IWrapper\n * @property {WrapperFromObjectConverter} [fromObject] From object converter\n * @property {WrapperToObjectConverter} [toObject] To object converter\n */\n\n// Custom wrapper for Any\nwrappers[\".google.protobuf.Any\"] = {\n\n fromObject: function(object, depth) {\n\n // unwrap value type if mapped\n if (object && object[\"@type\"]) {\n // Only use fully qualified type name after the last '/'\n var name = object[\"@type\"].substring(object[\"@type\"].lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type) {\n // type_url does not accept leading \".\"\n var type_url = object[\"@type\"].charAt(0) === \".\" ?\n object[\"@type\"].slice(1) : object[\"@type\"];\n // type_url prefix is optional, but path seperator is required\n if (type_url.indexOf(\"/\") === -1) {\n type_url = \"/\" + type_url;\n }\n return this.create({\n type_url: type_url,\n value: type.encode(type.fromObject(object, depth === undefined ? 1 : depth + 1)).finish()\n });\n }\n }\n\n return this.fromObject(object, depth);\n },\n\n toObject: function(message, options, depth) {\n if (depth === undefined)\n depth = 0;\n if (depth > util.recursionLimit)\n throw Error(\"max depth exceeded\");\n\n // Default prefix\n var googleApi = \"type.googleapis.com/\";\n var prefix = \"\";\n var name = \"\";\n\n // decode value if requested and unmapped\n if (options && options.json && message.type_url && message.value) {\n // Only use fully qualified type name after the last '/'\n name = message.type_url.substring(message.type_url.lastIndexOf(\"/\") + 1);\n // Separate the prefix used\n prefix = message.type_url.substring(0, message.type_url.lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type)\n message = type.decode(message.value, undefined, undefined, depth + 1);\n }\n\n // wrap value if unmapped\n if (!(message instanceof this.ctor) && message instanceof Message) {\n var object = message.$type.toObject(message, options, depth + 1);\n var messageName = message.$type.fullName[0] === \".\" ?\n message.$type.fullName.slice(1) : message.$type.fullName;\n // Default to type.googleapis.com prefix if no prefix is used\n if (prefix === \"\") {\n prefix = googleApi;\n }\n name = prefix + messageName;\n object[\"@type\"] = name;\n return object;\n }\n\n return this.toObject(message, options, depth);\n }\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(42);\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return (value |= 0) < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n var lo = val.lo,\n hi = val.hi;\n while (hi) {\n buf[pos++] = lo & 127 | 128;\n lo = (lo >>> 7 | hi << 25) >>> 0;\n hi >>>= 7;\n }\n while (lo > 127) {\n buf[pos++] = lo & 127 | 128;\n lo = lo >>> 7;\n }\n buf[pos++] = lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(46);\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(42);\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/node_modules/protobufjs/ext/debug/README.md b/node_modules/protobufjs/ext/debug/README.md deleted file mode 100644 index a48517e..0000000 --- a/node_modules/protobufjs/ext/debug/README.md +++ /dev/null @@ -1,4 +0,0 @@ -protobufjs/ext/debug -========================= - -Experimental debugging extension. diff --git a/node_modules/protobufjs/ext/debug/index.js b/node_modules/protobufjs/ext/debug/index.js deleted file mode 100644 index 2b79766..0000000 --- a/node_modules/protobufjs/ext/debug/index.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -var protobuf = require("../.."); - -/** - * Debugging utility functions. Only present in debug builds. - * @namespace - */ -var debug = protobuf.debug = module.exports = {}; - -var codegen = protobuf.util.codegen; - -var debugFnRe = /function ([^(]+)\(([^)]*)\) {/g; - -// Counts number of calls to any generated function -function codegen_debug() { - codegen_debug.supported = codegen.supported; - codegen_debug.verbose = codegen.verbose; - var gen = codegen.apply(null, Array.prototype.slice.call(arguments)); - gen.str = (function(str) { return function str_debug() { - return str.apply(null, Array.prototype.slice.call(arguments)).replace(debugFnRe, "function $1($2) {\n\t$1.calls=($1.calls|0)+1"); - };})(gen.str); - return gen; -} - -/** - * Returns a list of unused types within the specified root. - * @param {NamespaceBase} ns Namespace to search - * @returns {Type[]} Unused types - */ -debug.unusedTypes = function unusedTypes(ns) { - - /* istanbul ignore if */ - if (!(ns instanceof protobuf.Namespace)) - throw TypeError("ns must be a Namespace"); - - /* istanbul ignore if */ - if (!ns.nested) - return []; - - var unused = []; - for (var names = Object.keys(ns.nested), i = 0; i < names.length; ++i) { - var nested = ns.nested[names[i]]; - if (nested instanceof protobuf.Type) { - var calls = (nested.encode.calls|0) - + (nested.decode.calls|0) - + (nested.verify.calls|0) - + (nested.toObject.calls|0) - + (nested.fromObject.calls|0); - if (!calls) - unused.push(nested); - } else if (nested instanceof protobuf.Namespace) - Array.prototype.push.apply(unused, unusedTypes(nested)); - } - return unused; -}; - -/** - * Enables debugging extensions. - * @returns {undefined} - */ -debug.enable = function enable() { - protobuf.util.codegen = codegen_debug; -}; - -/** - * Disables debugging extensions. - * @returns {undefined} - */ -debug.disable = function disable() { - protobuf.util.codegen = codegen; -}; diff --git a/node_modules/protobufjs/ext/descriptor/README.md b/node_modules/protobufjs/ext/descriptor/README.md deleted file mode 100644 index 3bc4c6c..0000000 --- a/node_modules/protobufjs/ext/descriptor/README.md +++ /dev/null @@ -1,72 +0,0 @@ -protobufjs/ext/descriptor -========================= - -Experimental extension for interoperability with [descriptor.proto](https://github.com/google/protobuf/blob/master/src/google/protobuf/descriptor.proto) types. - -Usage ------ - -```js -var protobuf = require("protobufjs"), // requires the full library - descriptor = require("protobufjs/ext/descriptor"); - -var root = ...; - -// convert any existing root instance to the corresponding descriptor type -var descriptorMsg = root.toDescriptor("proto2"); -// ^ returns a FileDescriptorSet message, see table below - -// encode to a descriptor buffer -var buffer = descriptor.FileDescriptorSet.encode(descriptorMsg).finish(); - -// decode from a descriptor buffer -var decodedDescriptor = descriptor.FileDescriptorSet.decode(buffer); - -// convert any existing descriptor to a root instance -root = protobuf.Root.fromDescriptor(decodedDescriptor); -// ^ expects a FileDescriptorSet message or buffer, see table below - -// and start all over again -``` - -API ---- - -The extension adds `.fromDescriptor(descriptor[, syntax])` and `#toDescriptor([syntax])` methods to reflection objects and exports the `.google.protobuf` namespace of the internally used `Root` instance containing the following types present in descriptor.proto: - -| Descriptor type | protobuf.js type | Remarks -|-------------------------------|------------------|--------- -| **FileDescriptorSet** | Root | -| FileDescriptorProto | | dependencies are not supported -| FileOptions | | -| FileOptionsOptimizeMode | | -| SourceCodeInfo | | not supported -| SourceCodeInfoLocation | | -| GeneratedCodeInfo | | not supported -| GeneratedCodeInfoAnnotation | | -| **DescriptorProto** | Type | -| MessageOptions | | -| DescriptorProtoExtensionRange | | -| DescriptorProtoReservedRange | | -| **FieldDescriptorProto** | Field | -| FieldDescriptorProtoLabel | | -| FieldDescriptorProtoType | | -| FieldOptions | | -| FieldOptionsCType | | -| FieldOptionsJSType | | -| **OneofDescriptorProto** | OneOf | -| OneofOptions | | -| **EnumDescriptorProto** | Enum | -| EnumOptions | | -| EnumValueDescriptorProto | | -| EnumValueOptions | | not supported -| **ServiceDescriptorProto** | Service | -| ServiceOptions | | -| **MethodDescriptorProto** | Method | -| MethodOptions | | -| UninterpretedOption | | not supported -| UninterpretedOptionNamePart | | - -Note that not all features of descriptor.proto translate perfectly to a protobuf.js root instance. A root instance has only limited knowlege of packages or individual files for example, which is then compensated by guessing and generating fictional file names. - -When using TypeScript, the respective interface types can be used to reference specific message instances (i.e. `protobuf.Message`). diff --git a/node_modules/protobufjs/ext/descriptor/index.d.ts b/node_modules/protobufjs/ext/descriptor/index.d.ts deleted file mode 100644 index 3f105bf..0000000 --- a/node_modules/protobufjs/ext/descriptor/index.d.ts +++ /dev/null @@ -1,195 +0,0 @@ -import * as $protobuf from "../.."; -import Long = require("long"); -export const FileDescriptorSet: $protobuf.Type; - -export const FileDescriptorProto: $protobuf.Type; - -export const DescriptorProto: $protobuf.Type & { - ExtensionRange: $protobuf.Type, - ReservedRange: $protobuf.Type -}; - -export const FieldDescriptorProto: $protobuf.Type & { - Label: $protobuf.Enum, - Type: $protobuf.Enum -}; - -export const OneofDescriptorProto: $protobuf.Type; - -export const EnumDescriptorProto: $protobuf.Type; - -export const ServiceDescriptorProto: $protobuf.Type; - -export const EnumValueDescriptorProto: $protobuf.Type; - -export const MethodDescriptorProto: $protobuf.Type; - -export const FileOptions: $protobuf.Type & { - OptimizeMode: $protobuf.Enum -}; - -export const MessageOptions: $protobuf.Type; - -export const FieldOptions: $protobuf.Type & { - CType: $protobuf.Enum, - JSType: $protobuf.Enum -}; - -export const OneofOptions: $protobuf.Type; - -export const EnumOptions: $protobuf.Type; - -export const EnumValueOptions: $protobuf.Type; - -export const ServiceOptions: $protobuf.Type; - -export const MethodOptions: $protobuf.Type; - -export const UninterpretedOption: $protobuf.Type & { - NamePart: $protobuf.Type -}; - -export const SourceCodeInfo: $protobuf.Type & { - Location: $protobuf.Type -}; - -export const GeneratedCodeInfo: $protobuf.Type & { - Annotation: $protobuf.Type -}; - -export interface IFileDescriptorSet { - file: IFileDescriptorProto[]; -} - -export interface IFileDescriptorProto { - name?: string; - package?: string; - dependency?: any; - publicDependency?: any; - weakDependency?: any; - messageType?: IDescriptorProto[]; - enumType?: IEnumDescriptorProto[]; - service?: IServiceDescriptorProto[]; - extension?: IFieldDescriptorProto[]; - options?: IFileOptions; - sourceCodeInfo?: any; - syntax?: string; - edition?: IEdition; -} - -type IEdition = number; - -export interface IFileOptions { - javaPackage?: string; - javaOuterClassname?: string; - javaMultipleFiles?: boolean; - javaGenerateEqualsAndHash?: boolean; - javaStringCheckUtf8?: boolean; - optimizeFor?: IFileOptionsOptimizeMode; - goPackage?: string; - ccGenericServices?: boolean; - javaGenericServices?: boolean; - pyGenericServices?: boolean; - deprecated?: boolean; - ccEnableArenas?: boolean; - objcClassPrefix?: string; - csharpNamespace?: string; -} - -type IFileOptionsOptimizeMode = number; - -export interface IDescriptorProto { - name?: string; - field?: IFieldDescriptorProto[]; - extension?: IFieldDescriptorProto[]; - nestedType?: IDescriptorProto[]; - enumType?: IEnumDescriptorProto[]; - extensionRange?: IDescriptorProtoExtensionRange[]; - oneofDecl?: IOneofDescriptorProto[]; - options?: IMessageOptions; - reservedRange?: IDescriptorProtoReservedRange[]; - reservedName?: string[]; -} - -export interface IMessageOptions { - mapEntry?: boolean; -} - -export interface IDescriptorProtoExtensionRange { - start?: number; - end?: number; -} - -export interface IDescriptorProtoReservedRange { - start?: number; - end?: number; -} - -export interface IFieldDescriptorProto { - name?: string; - number?: number; - label?: IFieldDescriptorProtoLabel; - type?: IFieldDescriptorProtoType; - typeName?: string; - extendee?: string; - defaultValue?: string; - oneofIndex?: number; - jsonName?: any; - options?: IFieldOptions; -} - -type IFieldDescriptorProtoLabel = number; - -type IFieldDescriptorProtoType = number; - -export interface IFieldOptions { - packed?: boolean; - jstype?: IFieldOptionsJSType; -} - -type IFieldOptionsJSType = number; - -export interface IEnumDescriptorProto { - name?: string; - value?: IEnumValueDescriptorProto[]; - options?: IEnumOptions; -} - -export interface IEnumValueDescriptorProto { - name?: string; - number?: number; - options?: any; -} - -export interface IEnumOptions { - allowAlias?: boolean; - deprecated?: boolean; -} - -export interface IOneofDescriptorProto { - name?: string; - options?: any; -} - -export interface IServiceDescriptorProto { - name?: string; - method?: IMethodDescriptorProto[]; - options?: IServiceOptions; -} - -export interface IServiceOptions { - deprecated?: boolean; -} - -export interface IMethodDescriptorProto { - name?: string; - inputType?: string; - outputType?: string; - options?: IMethodOptions; - clientStreaming?: boolean; - serverStreaming?: boolean; -} - -export interface IMethodOptions { - deprecated?: boolean; -} diff --git a/node_modules/protobufjs/ext/descriptor/index.js b/node_modules/protobufjs/ext/descriptor/index.js deleted file mode 100644 index 6ea795b..0000000 --- a/node_modules/protobufjs/ext/descriptor/index.js +++ /dev/null @@ -1,1186 +0,0 @@ -"use strict"; -var $protobuf = require("../.."); -module.exports = exports = $protobuf.descriptor = $protobuf.Root.fromJSON(require("../../google/protobuf/descriptor.json")).lookup(".google.protobuf"); - -var Namespace = $protobuf.Namespace, - Root = $protobuf.Root, - Enum = $protobuf.Enum, - Type = $protobuf.Type, - Field = $protobuf.Field, - MapField = $protobuf.MapField, - OneOf = $protobuf.OneOf, - Service = $protobuf.Service, - Method = $protobuf.Method, - patterns = $protobuf.util.patterns; - -var numberRe = patterns.numberRe, - typeRefRe = patterns.typeRefRe; - -// --- Root --- - -/** - * Properties of a FileDescriptorSet message. - * @interface IFileDescriptorSet - * @property {IFileDescriptorProto[]} file Files - */ - -/** - * Properties of a FileDescriptorProto message. - * @interface IFileDescriptorProto - * @property {string} [name] File name - * @property {string} [package] Package - * @property {*} [dependency] Not supported - * @property {*} [publicDependency] Not supported - * @property {*} [weakDependency] Not supported - * @property {IDescriptorProto[]} [messageType] Nested message types - * @property {IEnumDescriptorProto[]} [enumType] Nested enums - * @property {IServiceDescriptorProto[]} [service] Nested services - * @property {IFieldDescriptorProto[]} [extension] Nested extension fields - * @property {IFileOptions} [options] Options - * @property {*} [sourceCodeInfo] Not supported - * @property {string} [syntax="proto2"] Syntax - * @property {IEdition} [edition] Edition - */ - -/** - * Values of the Edition enum. - * @typedef IEdition - * @type {number} - * @property {number} EDITION_UNKNOWN=0 - * @property {number} EDITION_LEGACY=900 - * @property {number} EDITION_PROTO2=998 - * @property {number} EDITION_PROTO3=999 - * @property {number} EDITION_2023=1000 - * @property {number} EDITION_2024=1001 - * @property {number} EDITION_1_TEST_ONLY=1 - * @property {number} EDITION_2_TEST_ONLY=2 - * @property {number} EDITION_99997_TEST_ONLY=99997 - * @property {number} EDITION_99998_TEST_ONLY=99998 - * @property {number} EDITION_99998_TEST_ONLY=99999 - * @property {number} EDITION_MAX=2147483647 - */ - -/** - * Properties of a FileOptions message. - * @interface IFileOptions - * @property {string} [javaPackage] - * @property {string} [javaOuterClassname] - * @property {boolean} [javaMultipleFiles] - * @property {boolean} [javaGenerateEqualsAndHash] - * @property {boolean} [javaStringCheckUtf8] - * @property {IFileOptionsOptimizeMode} [optimizeFor=1] - * @property {string} [goPackage] - * @property {boolean} [ccGenericServices] - * @property {boolean} [javaGenericServices] - * @property {boolean} [pyGenericServices] - * @property {boolean} [deprecated] - * @property {boolean} [ccEnableArenas] - * @property {string} [objcClassPrefix] - * @property {string} [csharpNamespace] - */ - -/** - * Values of he FileOptions.OptimizeMode enum. - * @typedef IFileOptionsOptimizeMode - * @type {number} - * @property {number} SPEED=1 - * @property {number} CODE_SIZE=2 - * @property {number} LITE_RUNTIME=3 - */ - -/** - * Creates a root from a descriptor set. - * @param {IFileDescriptorSet|Reader|Uint8Array} descriptor Descriptor - * @returns {Root} Root instance - */ -Root.fromDescriptor = function fromDescriptor(descriptor) { - - // Decode the descriptor message if specified as a buffer: - if (typeof descriptor.length === "number") - descriptor = exports.FileDescriptorSet.decode(descriptor); - - var root = new Root(); - - if (descriptor.file) { - var fileDescriptor, - filePackage; - for (var j = 0, i; j < descriptor.file.length; ++j) { - filePackage = root; - if ((fileDescriptor = descriptor.file[j])["package"] && fileDescriptor["package"].length) - filePackage = root.define(fileDescriptor["package"]); - var edition = editionFromDescriptor(fileDescriptor); - if (fileDescriptor.name && fileDescriptor.name.length) - root.files.push(filePackage.filename = fileDescriptor.name); - if (fileDescriptor.messageType) - for (i = 0; i < fileDescriptor.messageType.length; ++i) - filePackage.add(Type.fromDescriptor(fileDescriptor.messageType[i], edition)); - if (fileDescriptor.enumType) - for (i = 0; i < fileDescriptor.enumType.length; ++i) - filePackage.add(Enum.fromDescriptor(fileDescriptor.enumType[i], edition)); - if (fileDescriptor.extension) - for (i = 0; i < fileDescriptor.extension.length; ++i) - filePackage.add(Field.fromDescriptor(fileDescriptor.extension[i], edition)); - if (fileDescriptor.service) - for (i = 0; i < fileDescriptor.service.length; ++i) - filePackage.add(Service.fromDescriptor(fileDescriptor.service[i], edition)); - var opts = fromDescriptorOptions(fileDescriptor.options, exports.FileOptions); - if (opts) { - var ks = Object.keys(opts); - for (i = 0; i < ks.length; ++i) - filePackage.setOption(ks[i], opts[ks[i]]); - } - } - } - - return root.resolveAll(); -}; - -/** - * Converts a root to a descriptor set. - * @returns {Message} Descriptor - * @param {string} [edition="proto2"] The syntax or edition to use - */ -Root.prototype.toDescriptor = function toDescriptor(edition) { - var set = exports.FileDescriptorSet.create(); - Root_toDescriptorRecursive(this, set.file, edition); - return set; -}; - -// Traverses a namespace and assembles the descriptor set -function Root_toDescriptorRecursive(ns, files, edition) { - - // Create a new file - var file = exports.FileDescriptorProto.create({ name: ns.filename || (ns.fullName.substring(1).replace(/\./g, "_") || "root") + ".proto" }); - editionToDescriptor(edition, file); - if (!(ns instanceof Root)) - file["package"] = ns.fullName.substring(1); - - // Add nested types - for (var i = 0, nested; i < ns.nestedArray.length; ++i) - if ((nested = ns._nestedArray[i]) instanceof Type) - file.messageType.push(nested.toDescriptor(edition)); - else if (nested instanceof Enum) - file.enumType.push(nested.toDescriptor()); - else if (nested instanceof Field) - file.extension.push(nested.toDescriptor(edition)); - else if (nested instanceof Service) - file.service.push(nested.toDescriptor()); - else if (nested instanceof /* plain */ Namespace) - Root_toDescriptorRecursive(nested, files, edition); // requires new file - - // Keep package-level options - file.options = toDescriptorOptions(ns.options, exports.FileOptions); - - // And keep the file only if there is at least one nested object - if (file.messageType.length + file.enumType.length + file.extension.length + file.service.length) - files.push(file); -} - -// --- Type --- - -/** - * Properties of a DescriptorProto message. - * @interface IDescriptorProto - * @property {string} [name] Message type name - * @property {IFieldDescriptorProto[]} [field] Fields - * @property {IFieldDescriptorProto[]} [extension] Extension fields - * @property {IDescriptorProto[]} [nestedType] Nested message types - * @property {IEnumDescriptorProto[]} [enumType] Nested enums - * @property {IDescriptorProtoExtensionRange[]} [extensionRange] Extension ranges - * @property {IOneofDescriptorProto[]} [oneofDecl] Oneofs - * @property {IMessageOptions} [options] Not supported - * @property {IDescriptorProtoReservedRange[]} [reservedRange] Reserved ranges - * @property {string[]} [reservedName] Reserved names - */ - -/** - * Properties of a MessageOptions message. - * @interface IMessageOptions - * @property {boolean} [mapEntry=false] Whether this message is a map entry - */ - -/** - * Properties of an ExtensionRange message. - * @interface IDescriptorProtoExtensionRange - * @property {number} [start] Start field id - * @property {number} [end] End field id - */ - -/** - * Properties of a ReservedRange message. - * @interface IDescriptorProtoReservedRange - * @property {number} [start] Start field id - * @property {number} [end] End field id - */ - -var unnamedMessageIndex = 0; - -/** - * Creates a type from a descriptor. - * - * Warning: this is not safe to use with editions protos, since it discards relevant file context. - * - * @param {IDescriptorProto|Reader|Uint8Array} descriptor Descriptor - * @param {string} [edition="proto2"] The syntax or edition to use - * @param {boolean} [nested=false] Whether or not this is a nested object - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Type} Type instance - */ -Type.fromDescriptor = function fromDescriptor(descriptor, edition, nested, depth) { - if (depth === undefined) - depth = 0; - if (depth > $protobuf.util.nestingLimit) - throw Error("max depth exceeded"); - // Decode the descriptor message if specified as a buffer: - if (typeof descriptor.length === "number") - descriptor = exports.DescriptorProto.decode(descriptor); - - // Create the message type - var type = new Type(descriptor.name.length ? descriptor.name : "Type" + unnamedMessageIndex++, fromDescriptorOptions(descriptor.options, exports.MessageOptions)), - i; - - if (!nested) - type._edition = edition; - - /* Oneofs */ if (descriptor.oneofDecl) - for (i = 0; i < descriptor.oneofDecl.length; ++i) - type.add(OneOf.fromDescriptor(descriptor.oneofDecl[i])); - /* Fields */ if (descriptor.field) - for (i = 0; i < descriptor.field.length; ++i) { - var field = Field.fromDescriptor(descriptor.field[i], edition, true); - type.add(field); - if (descriptor.field[i].hasOwnProperty("oneofIndex")) // eslint-disable-line no-prototype-builtins - type.oneofsArray[descriptor.field[i].oneofIndex].add(field); - } - /* Extension fields */ if (descriptor.extension) - for (i = 0; i < descriptor.extension.length; ++i) - type.add(Field.fromDescriptor(descriptor.extension[i], edition, true)); - /* Nested types */ if (descriptor.nestedType) - for (i = 0; i < descriptor.nestedType.length; ++i) { - type.add(Type.fromDescriptor(descriptor.nestedType[i], edition, true, depth + 1)); - if (descriptor.nestedType[i].options && descriptor.nestedType[i].options.mapEntry) - type.setOption("map_entry", true); - } - /* Nested enums */ if (descriptor.enumType) - for (i = 0; i < descriptor.enumType.length; ++i) - type.add(Enum.fromDescriptor(descriptor.enumType[i], edition, true)); - /* Extension ranges */ if (descriptor.extensionRange && descriptor.extensionRange.length) { - type.extensions = []; - for (i = 0; i < descriptor.extensionRange.length; ++i) - type.extensions.push([ descriptor.extensionRange[i].start, descriptor.extensionRange[i].end ]); - } - /* Reserved... */ if (descriptor.reservedRange && descriptor.reservedRange.length || descriptor.reservedName && descriptor.reservedName.length) { - type.reserved = []; - /* Ranges */ if (descriptor.reservedRange) - for (i = 0; i < descriptor.reservedRange.length; ++i) - type.reserved.push([ descriptor.reservedRange[i].start, descriptor.reservedRange[i].end ]); - /* Names */ if (descriptor.reservedName) - for (i = 0; i < descriptor.reservedName.length; ++i) - type.reserved.push(descriptor.reservedName[i]); - } - - return type; -}; - -/** - * Converts a type to a descriptor. - * @returns {Message} Descriptor - * @param {string} [edition="proto2"] The syntax or edition to use - */ -Type.prototype.toDescriptor = function toDescriptor(edition) { - var descriptor = exports.DescriptorProto.create({ name: this.name }), - i; - - /* Fields */ for (i = 0; i < this.fieldsArray.length; ++i) { - var fieldDescriptor; - descriptor.field.push(fieldDescriptor = this._fieldsArray[i].toDescriptor(edition)); - if (this._fieldsArray[i] instanceof MapField) { // map fields are repeated FieldNameEntry - var keyType = toDescriptorType(this._fieldsArray[i].keyType, this._fieldsArray[i].resolvedKeyType, false), - valueType = toDescriptorType(this._fieldsArray[i].type, this._fieldsArray[i].resolvedType, false), - valueTypeName = valueType === /* type */ 11 || valueType === /* enum */ 14 - ? this._fieldsArray[i].resolvedType && shortname(this.parent, this._fieldsArray[i].resolvedType) || this._fieldsArray[i].type - : undefined; - descriptor.nestedType.push(exports.DescriptorProto.create({ - name: fieldDescriptor.typeName, - field: [ - exports.FieldDescriptorProto.create({ name: "key", number: 1, label: 1, type: keyType }), // can't reference a type or enum - exports.FieldDescriptorProto.create({ name: "value", number: 2, label: 1, type: valueType, typeName: valueTypeName }) - ], - options: exports.MessageOptions.create({ mapEntry: true }) - })); - } - } - /* Oneofs */ for (i = 0; i < this.oneofsArray.length; ++i) - descriptor.oneofDecl.push(this._oneofsArray[i].toDescriptor()); - /* Nested... */ for (i = 0; i < this.nestedArray.length; ++i) { - /* Extension fields */ if (this._nestedArray[i] instanceof Field) - descriptor.field.push(this._nestedArray[i].toDescriptor(edition)); - /* Types */ else if (this._nestedArray[i] instanceof Type) - descriptor.nestedType.push(this._nestedArray[i].toDescriptor(edition)); - /* Enums */ else if (this._nestedArray[i] instanceof Enum) - descriptor.enumType.push(this._nestedArray[i].toDescriptor()); - // plain nested namespaces become packages instead in Root#toDescriptor - } - /* Extension ranges */ if (this.extensions) - for (i = 0; i < this.extensions.length; ++i) - descriptor.extensionRange.push(exports.DescriptorProto.ExtensionRange.create({ start: this.extensions[i][0], end: this.extensions[i][1] })); - /* Reserved... */ if (this.reserved) - for (i = 0; i < this.reserved.length; ++i) - /* Names */ if (typeof this.reserved[i] === "string") - descriptor.reservedName.push(this.reserved[i]); - /* Ranges */ else - descriptor.reservedRange.push(exports.DescriptorProto.ReservedRange.create({ start: this.reserved[i][0], end: this.reserved[i][1] })); - - descriptor.options = toDescriptorOptions(this.options, exports.MessageOptions); - - return descriptor; -}; - -// --- Field --- - -/** - * Properties of a FieldDescriptorProto message. - * @interface IFieldDescriptorProto - * @property {string} [name] Field name - * @property {number} [number] Field id - * @property {IFieldDescriptorProtoLabel} [label] Field rule - * @property {IFieldDescriptorProtoType} [type] Field basic type - * @property {string} [typeName] Field type name - * @property {string} [extendee] Extended type name - * @property {string} [defaultValue] Literal default value - * @property {number} [oneofIndex] Oneof index if part of a oneof - * @property {*} [jsonName] Not supported - * @property {IFieldOptions} [options] Field options - */ - -/** - * Values of the FieldDescriptorProto.Label enum. - * @typedef IFieldDescriptorProtoLabel - * @type {number} - * @property {number} LABEL_OPTIONAL=1 - * @property {number} LABEL_REQUIRED=2 - * @property {number} LABEL_REPEATED=3 - */ - -/** - * Values of the FieldDescriptorProto.Type enum. - * @typedef IFieldDescriptorProtoType - * @type {number} - * @property {number} TYPE_DOUBLE=1 - * @property {number} TYPE_FLOAT=2 - * @property {number} TYPE_INT64=3 - * @property {number} TYPE_UINT64=4 - * @property {number} TYPE_INT32=5 - * @property {number} TYPE_FIXED64=6 - * @property {number} TYPE_FIXED32=7 - * @property {number} TYPE_BOOL=8 - * @property {number} TYPE_STRING=9 - * @property {number} TYPE_GROUP=10 - * @property {number} TYPE_MESSAGE=11 - * @property {number} TYPE_BYTES=12 - * @property {number} TYPE_UINT32=13 - * @property {number} TYPE_ENUM=14 - * @property {number} TYPE_SFIXED32=15 - * @property {number} TYPE_SFIXED64=16 - * @property {number} TYPE_SINT32=17 - * @property {number} TYPE_SINT64=18 - */ - -/** - * Properties of a FieldOptions message. - * @interface IFieldOptions - * @property {boolean} [packed] Whether packed or not (defaults to `false` for proto2 and `true` for proto3) - * @property {IFieldOptionsJSType} [jstype] JavaScript value type (not used by protobuf.js) - */ - -/** - * Values of the FieldOptions.JSType enum. - * @typedef IFieldOptionsJSType - * @type {number} - * @property {number} JS_NORMAL=0 - * @property {number} JS_STRING=1 - * @property {number} JS_NUMBER=2 - */ - -/** - * Creates a field from a descriptor. - * - * Warning: this is not safe to use with editions protos, since it discards relevant file context. - * - * @param {IFieldDescriptorProto|Reader|Uint8Array} descriptor Descriptor - * @param {string} [edition="proto2"] The syntax or edition to use - * @param {boolean} [nested=false] Whether or not this is a top-level object - * @returns {Field} Field instance - */ -Field.fromDescriptor = function fromDescriptor(descriptor, edition, nested) { - - // Decode the descriptor message if specified as a buffer: - if (typeof descriptor.length === "number") - descriptor = exports.DescriptorProto.decode(descriptor); - - if (typeof descriptor.number !== "number") - throw Error("missing field id"); - - // Rewire field type - var typeName = descriptor.typeName, - fieldType; - if (typeName != null && typeName !== "") { - if (typeof typeName !== "string" || !typeRefRe.test(typeName)) - throw Error("illegal type name: " + typeName); - fieldType = typeName; - } else - fieldType = fromDescriptorType(descriptor.type); - - // Rewire field rule - var fieldRule; - switch (descriptor.label) { - // 0 is reserved for errors - case 1: fieldRule = undefined; break; - case 2: fieldRule = "required"; break; - case 3: fieldRule = "repeated"; break; - default: throw Error("illegal label: " + descriptor.label); - } - - var extendee = descriptor.extendee; - if (extendee != null && extendee !== "") { - if (typeof extendee !== "string" || !typeRefRe.test(extendee)) - throw Error("illegal type name: " + extendee); - } else - extendee = undefined; - var field = new Field( - descriptor.name.length ? descriptor.name : "field" + descriptor.number, - descriptor.number, - fieldType, - fieldRule, - extendee - ); - - if (!nested) - field._edition = edition; - - field.options = fromDescriptorOptions(descriptor.options, exports.FieldOptions); - if (descriptor.proto3_optional) - field.options.proto3_optional = true; - - if (descriptor.defaultValue && descriptor.defaultValue.length) { - var defaultValue = descriptor.defaultValue; - switch (defaultValue) { - case "true": case "TRUE": - defaultValue = true; - break; - case "false": case "FALSE": - defaultValue = false; - break; - default: - var match = numberRe.exec(defaultValue); - if (match) - defaultValue = parseInt(defaultValue); // eslint-disable-line radix - break; - } - field.setOption("default", defaultValue); - } - - if (packableDescriptorType(descriptor.type)) { - if (edition === "proto3") { // defaults to packed=true (internal preset is packed=true) - if (descriptor.options && !descriptor.options.packed) - field.setOption("packed", false); - } else if ((!edition || edition === "proto2") && descriptor.options && descriptor.options.packed) // defaults to packed=false - field.setOption("packed", true); - } - - return field; -}; - -/** - * Converts a field to a descriptor. - * @returns {Message} Descriptor - * @param {string} [edition="proto2"] The syntax or edition to use - */ -Field.prototype.toDescriptor = function toDescriptor(edition) { - var descriptor = exports.FieldDescriptorProto.create({ name: this.name, number: this.id }); - - if (this.map) { - - descriptor.type = 11; // message - descriptor.typeName = $protobuf.util.ucFirst(this.name); // fieldName -> FieldNameEntry (built in Type#toDescriptor) - descriptor.label = 3; // repeated - - } else { - - // Rewire field type - switch (descriptor.type = toDescriptorType(this.type, this.resolve().resolvedType, this.delimited)) { - case 10: // group - case 11: // type - case 14: // enum - descriptor.typeName = this.resolvedType ? shortname(this.parent, this.resolvedType) : this.type; - break; - } - - // Rewire field rule - if (this.rule === "repeated") { - descriptor.label = 3; - } else if (this.required && edition === "proto2") { - descriptor.label = 2; - } else { - descriptor.label = 1; - } - } - - // Handle extension field - descriptor.extendee = this.extensionField ? this.extensionField.parent.fullName : this.extend; - - // Handle part of oneof (only meaningful for message types) - if (this.partOf && this.parent instanceof Type) { - if ((descriptor.oneofIndex = this.parent.oneofsArray.indexOf(this.partOf)) < 0) - throw Error("missing oneof"); - } - - if (this.options) { - descriptor.options = toDescriptorOptions(this.options, exports.FieldOptions); - if (this.options["default"] != null) - descriptor.defaultValue = String(this.options["default"]); - if (this.options.proto3_optional) - descriptor.proto3_optional = true; - } - - if (edition === "proto3") { // defaults to packed=true - if (!this.packed) - (descriptor.options || (descriptor.options = exports.FieldOptions.create())).packed = false; - } else if ((!edition || edition === "proto2") && this.packed) // defaults to packed=false - (descriptor.options || (descriptor.options = exports.FieldOptions.create())).packed = true; - - return descriptor; -}; - -// --- Enum --- - -/** - * Properties of an EnumDescriptorProto message. - * @interface IEnumDescriptorProto - * @property {string} [name] Enum name - * @property {IEnumValueDescriptorProto[]} [value] Enum values - * @property {IEnumOptions} [options] Enum options - */ - -/** - * Properties of an EnumValueDescriptorProto message. - * @interface IEnumValueDescriptorProto - * @property {string} [name] Name - * @property {number} [number] Value - * @property {*} [options] Not supported - */ - -/** - * Properties of an EnumOptions message. - * @interface IEnumOptions - * @property {boolean} [allowAlias] Whether aliases are allowed - * @property {boolean} [deprecated] - */ - -var unnamedEnumIndex = 0; - -/** - * Creates an enum from a descriptor. - * - * Warning: this is not safe to use with editions protos, since it discards relevant file context. - * - * @param {IEnumDescriptorProto|Reader|Uint8Array} descriptor Descriptor - * @param {string} [edition="proto2"] The syntax or edition to use - * @param {boolean} [nested=false] Whether or not this is a top-level object - * @returns {Enum} Enum instance - */ -Enum.fromDescriptor = function fromDescriptor(descriptor, edition, nested) { - - // Decode the descriptor message if specified as a buffer: - if (typeof descriptor.length === "number") - descriptor = exports.EnumDescriptorProto.decode(descriptor); - - // Construct values object - var values = {}; - if (descriptor.value) - for (var i = 0; i < descriptor.value.length; ++i) { - var name = descriptor.value[i].name, - value = descriptor.value[i].number || 0; - values[name && name.length ? name : "NAME" + value] = value; - } - - var enm = new Enum( - descriptor.name && descriptor.name.length ? descriptor.name : "Enum" + unnamedEnumIndex++, - values, - fromDescriptorOptions(descriptor.options, exports.EnumOptions) - ); - - if (!nested) - enm._edition = edition; - - return enm; -}; - -/** - * Converts an enum to a descriptor. - * @returns {Message} Descriptor - */ -Enum.prototype.toDescriptor = function toDescriptor() { - - // Values - var values = []; - for (var i = 0, ks = Object.keys(this.values); i < ks.length; ++i) - values.push(exports.EnumValueDescriptorProto.create({ name: ks[i], number: this.values[ks[i]] })); - - return exports.EnumDescriptorProto.create({ - name: this.name, - value: values, - options: toDescriptorOptions(this.options, exports.EnumOptions) - }); -}; - -// --- OneOf --- - -/** - * Properties of a OneofDescriptorProto message. - * @interface IOneofDescriptorProto - * @property {string} [name] Oneof name - * @property {*} [options] Not supported - */ - -var unnamedOneofIndex = 0; - -/** - * Creates a oneof from a descriptor. - * - * Warning: this is not safe to use with editions protos, since it discards relevant file context. - * - * @param {IOneofDescriptorProto|Reader|Uint8Array} descriptor Descriptor - * @returns {OneOf} OneOf instance - */ -OneOf.fromDescriptor = function fromDescriptor(descriptor) { - - // Decode the descriptor message if specified as a buffer: - if (typeof descriptor.length === "number") - descriptor = exports.OneofDescriptorProto.decode(descriptor); - - return new OneOf( - // unnamedOneOfIndex is global, not per type, because we have no ref to a type here - descriptor.name && descriptor.name.length ? descriptor.name : "oneof" + unnamedOneofIndex++ - // fromDescriptorOptions(descriptor.options, exports.OneofOptions) - only uninterpreted_option - ); -}; - -/** - * Converts a oneof to a descriptor. - * @returns {Message} Descriptor - */ -OneOf.prototype.toDescriptor = function toDescriptor() { - return exports.OneofDescriptorProto.create({ - name: this.name - // options: toDescriptorOptions(this.options, exports.OneofOptions) - only uninterpreted_option - }); -}; - -// --- Service --- - -/** - * Properties of a ServiceDescriptorProto message. - * @interface IServiceDescriptorProto - * @property {string} [name] Service name - * @property {IMethodDescriptorProto[]} [method] Methods - * @property {IServiceOptions} [options] Options - */ - -/** - * Properties of a ServiceOptions message. - * @interface IServiceOptions - * @property {boolean} [deprecated] - */ - -var unnamedServiceIndex = 0; - -/** - * Creates a service from a descriptor. - * - * Warning: this is not safe to use with editions protos, since it discards relevant file context. - * - * @param {IServiceDescriptorProto|Reader|Uint8Array} descriptor Descriptor - * @param {string} [edition="proto2"] The syntax or edition to use - * @param {boolean} [nested=false] Whether or not this is a top-level object - * @returns {Service} Service instance - */ -Service.fromDescriptor = function fromDescriptor(descriptor, edition, nested) { - - // Decode the descriptor message if specified as a buffer: - if (typeof descriptor.length === "number") - descriptor = exports.ServiceDescriptorProto.decode(descriptor); - - var service = new Service(descriptor.name && descriptor.name.length ? descriptor.name : "Service" + unnamedServiceIndex++, fromDescriptorOptions(descriptor.options, exports.ServiceOptions)); - if (!nested) - service._edition = edition; - if (descriptor.method) - for (var i = 0; i < descriptor.method.length; ++i) - service.add(Method.fromDescriptor(descriptor.method[i])); - - return service; -}; - -/** - * Converts a service to a descriptor. - * @returns {Message} Descriptor - */ -Service.prototype.toDescriptor = function toDescriptor() { - - // Methods - var methods = []; - for (var i = 0; i < this.methodsArray.length; ++i) - methods.push(this._methodsArray[i].toDescriptor()); - - return exports.ServiceDescriptorProto.create({ - name: this.name, - method: methods, - options: toDescriptorOptions(this.options, exports.ServiceOptions) - }); -}; - -// --- Method --- - -/** - * Properties of a MethodDescriptorProto message. - * @interface IMethodDescriptorProto - * @property {string} [name] Method name - * @property {string} [inputType] Request type name - * @property {string} [outputType] Response type name - * @property {IMethodOptions} [options] Not supported - * @property {boolean} [clientStreaming=false] Whether requests are streamed - * @property {boolean} [serverStreaming=false] Whether responses are streamed - */ - -/** - * Properties of a MethodOptions message. - * - * Warning: this is not safe to use with editions protos, since it discards relevant file context. - * - * @interface IMethodOptions - * @property {boolean} [deprecated] - */ - -var unnamedMethodIndex = 0; - -/** - * Creates a method from a descriptor. - * @param {IMethodDescriptorProto|Reader|Uint8Array} descriptor Descriptor - * @returns {Method} Reflected method instance - */ -Method.fromDescriptor = function fromDescriptor(descriptor) { - - // Decode the descriptor message if specified as a buffer: - if (typeof descriptor.length === "number") - descriptor = exports.MethodDescriptorProto.decode(descriptor); - - var inputType = descriptor.inputType, - outputType = descriptor.outputType; - - if (inputType != null && inputType !== "") { - if (typeof inputType !== "string" || !typeRefRe.test(inputType)) - throw Error("illegal type name: " + inputType); - } - if (outputType != null && outputType !== "") { - if (typeof outputType !== "string" || !typeRefRe.test(outputType)) - throw Error("illegal type name: " + outputType); - } - - return new Method( - // unnamedMethodIndex is global, not per service, because we have no ref to a service here - descriptor.name && descriptor.name.length ? descriptor.name : "Method" + unnamedMethodIndex++, - "rpc", - inputType, - outputType, - Boolean(descriptor.clientStreaming), - Boolean(descriptor.serverStreaming), - fromDescriptorOptions(descriptor.options, exports.MethodOptions) - ); -}; - -/** - * Converts a method to a descriptor. - * @returns {Message} Descriptor - */ -Method.prototype.toDescriptor = function toDescriptor() { - return exports.MethodDescriptorProto.create({ - name: this.name, - inputType: this.resolvedRequestType ? this.resolvedRequestType.fullName : this.requestType, - outputType: this.resolvedResponseType ? this.resolvedResponseType.fullName : this.responseType, - clientStreaming: this.requestStream, - serverStreaming: this.responseStream, - options: toDescriptorOptions(this.options, exports.MethodOptions) - }); -}; - -// --- utility --- - -// Converts a descriptor type to a protobuf.js basic type -function fromDescriptorType(type) { - switch (type) { - // 0 is reserved for errors - case 1: return "double"; - case 2: return "float"; - case 3: return "int64"; - case 4: return "uint64"; - case 5: return "int32"; - case 6: return "fixed64"; - case 7: return "fixed32"; - case 8: return "bool"; - case 9: return "string"; - case 12: return "bytes"; - case 13: return "uint32"; - case 15: return "sfixed32"; - case 16: return "sfixed64"; - case 17: return "sint32"; - case 18: return "sint64"; - } - throw Error("illegal type: " + type); -} - -// Tests if a descriptor type is packable -function packableDescriptorType(type) { - switch (type) { - case 1: // double - case 2: // float - case 3: // int64 - case 4: // uint64 - case 5: // int32 - case 6: // fixed64 - case 7: // fixed32 - case 8: // bool - case 13: // uint32 - case 14: // enum (!) - case 15: // sfixed32 - case 16: // sfixed64 - case 17: // sint32 - case 18: // sint64 - return true; - } - return false; -} - -// Converts a protobuf.js basic type to a descriptor type -function toDescriptorType(type, resolvedType, delimited) { - switch (type) { - // 0 is reserved for errors - case "double": return 1; - case "float": return 2; - case "int64": return 3; - case "uint64": return 4; - case "int32": return 5; - case "fixed64": return 6; - case "fixed32": return 7; - case "bool": return 8; - case "string": return 9; - case "bytes": return 12; - case "uint32": return 13; - case "sfixed32": return 15; - case "sfixed64": return 16; - case "sint32": return 17; - case "sint64": return 18; - } - if (resolvedType instanceof Enum) - return 14; - if (resolvedType instanceof Type) - return delimited ? 10 : 11; - throw Error("illegal type: " + type); -} - -function fromDescriptorOptionsRecursive(obj, type) { - var val = {}; - for (var i = 0, field, key; i < type.fieldsArray.length; ++i) { - if ((key = (field = type._fieldsArray[i]).name) === "uninterpretedOption") continue; - if (!Object.prototype.hasOwnProperty.call(obj, key)) continue; - - var newKey = underScore(key); - if (field.resolvedType instanceof Type) { - val[newKey] = fromDescriptorOptionsRecursive(obj[key], field.resolvedType); - } else if(field.resolvedType instanceof Enum) { - val[newKey] = field.resolvedType.valuesById[obj[key]]; - } else { - val[newKey] = obj[key]; - } - } - return val; -} - -// Converts descriptor options to an options object -function fromDescriptorOptions(options, type) { - if (!options) - return undefined; - return fromDescriptorOptionsRecursive(type.toObject(options), type); -} - -function toDescriptorOptionsRecursive(obj, type) { - var val = {}; - var keys = Object.keys(obj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newKey = $protobuf.util.camelCase(key); - if (!Object.prototype.hasOwnProperty.call(type.fields, newKey)) continue; - var field = type.fields[newKey]; - if (field.resolvedType instanceof Type) { - val[newKey] = toDescriptorOptionsRecursive(obj[key], field.resolvedType); - } else { - val[newKey] = obj[key]; - } - if (field.repeated && !Array.isArray(val[newKey])) { - val[newKey] = [val[newKey]]; - } - } - return val; -} - -// Converts an options object to descriptor options -function toDescriptorOptions(options, type) { - if (!options) - return undefined; - return type.fromObject(toDescriptorOptionsRecursive(options, type)); -} - -// Calculates the shortest relative path from `from` to `to`. -function shortname(from, to) { - var fromPath = from.fullName.split("."), - toPath = to.fullName.split("."), - i = 0, - j = 0, - k = toPath.length - 1; - if (!(from instanceof Root) && to instanceof Namespace) - while (i < fromPath.length && j < k && fromPath[i] === toPath[j]) { - var other = to.lookup(fromPath[i++], true); - if (other !== null && other !== to) - break; - ++j; - } - else - for (; i < fromPath.length && j < k && fromPath[i] === toPath[j]; ++i, ++j); - return toPath.slice(j).join("."); -} - -// copied here from cli/targets/proto.js -function underScore(str) { - return str.substring(0,1) - + str.substring(1) - .replace(/([A-Z])(?=[a-z]|$)/g, function($0, $1) { return "_" + $1.toLowerCase(); }); -} - -function editionFromDescriptor(fileDescriptor) { - if (fileDescriptor.syntax === "editions") { - switch(fileDescriptor.edition) { - case exports.Edition.EDITION_2023: - return "2023"; - default: - throw new Error("Unsupported edition " + fileDescriptor.edition); - } - } - if (fileDescriptor.syntax === "proto3") { - return "proto3"; - } - return "proto2"; -} - -function editionToDescriptor(edition, fileDescriptor) { - if (!edition) return; - if (edition === "proto2" || edition === "proto3") { - fileDescriptor.syntax = edition; - } else { - fileDescriptor.syntax = "editions"; - switch(edition) { - case "2023": - fileDescriptor.edition = exports.Edition.EDITION_2023; - break; - default: - throw new Error("Unsupported edition " + edition); - } - } -} - -// --- exports --- - -/** - * Reflected file descriptor set. - * @name FileDescriptorSet - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected file descriptor proto. - * @name FileDescriptorProto - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected descriptor proto. - * @name DescriptorProto - * @type {Type} - * @property {Type} ExtensionRange - * @property {Type} ReservedRange - * @const - * @tstype $protobuf.Type & { - * ExtensionRange: $protobuf.Type, - * ReservedRange: $protobuf.Type - * } - */ - -/** - * Reflected field descriptor proto. - * @name FieldDescriptorProto - * @type {Type} - * @property {Enum} Label - * @property {Enum} Type - * @const - * @tstype $protobuf.Type & { - * Label: $protobuf.Enum, - * Type: $protobuf.Enum - * } - */ - -/** - * Reflected oneof descriptor proto. - * @name OneofDescriptorProto - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected enum descriptor proto. - * @name EnumDescriptorProto - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected service descriptor proto. - * @name ServiceDescriptorProto - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected enum value descriptor proto. - * @name EnumValueDescriptorProto - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected method descriptor proto. - * @name MethodDescriptorProto - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected file options. - * @name FileOptions - * @type {Type} - * @property {Enum} OptimizeMode - * @const - * @tstype $protobuf.Type & { - * OptimizeMode: $protobuf.Enum - * } - */ - -/** - * Reflected message options. - * @name MessageOptions - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected field options. - * @name FieldOptions - * @type {Type} - * @property {Enum} CType - * @property {Enum} JSType - * @const - * @tstype $protobuf.Type & { - * CType: $protobuf.Enum, - * JSType: $protobuf.Enum - * } - */ - -/** - * Reflected oneof options. - * @name OneofOptions - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected enum options. - * @name EnumOptions - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected enum value options. - * @name EnumValueOptions - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected service options. - * @name ServiceOptions - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected method options. - * @name MethodOptions - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected uninterpretet option. - * @name UninterpretedOption - * @type {Type} - * @property {Type} NamePart - * @const - * @tstype $protobuf.Type & { - * NamePart: $protobuf.Type - * } - */ - -/** - * Reflected source code info. - * @name SourceCodeInfo - * @type {Type} - * @property {Type} Location - * @const - * @tstype $protobuf.Type & { - * Location: $protobuf.Type - * } - */ - -/** - * Reflected generated code info. - * @name GeneratedCodeInfo - * @type {Type} - * @property {Type} Annotation - * @const - * @tstype $protobuf.Type & { - * Annotation: $protobuf.Type - * } - */ diff --git a/node_modules/protobufjs/ext/descriptor/test.js b/node_modules/protobufjs/ext/descriptor/test.js deleted file mode 100644 index ceb80f8..0000000 --- a/node_modules/protobufjs/ext/descriptor/test.js +++ /dev/null @@ -1,54 +0,0 @@ -/*eslint-disable no-console*/ -"use strict"; -var protobuf = require("../../"), - descriptor = require("."); - -/* var proto = { - nested: { - Message: { - fields: { - foo: { - type: "string", - id: 1 - } - }, - nested: { - SubMessage: { - fields: {} - } - } - }, - Enum: { - values: { - ONE: 1, - TWO: 2 - } - } - } -}; */ - -// var root = protobuf.Root.fromJSON(proto).resolveAll(); -var root = protobuf.loadSync("tests/data/google/protobuf/descriptor.proto").resolveAll(); - -// console.log("Original proto", JSON.stringify(root, null, 2)); - -var msg = root.toDescriptor(); - -// console.log("\nDescriptor", JSON.stringify(msg.toObject(), null, 2)); - -var buf = descriptor.FileDescriptorSet.encode(msg).finish(); -var root2 = protobuf.Root.fromDescriptor(buf, "proto2").resolveAll(); - -// console.log("\nDecoded proto", JSON.stringify(root2, null, 2)); - -var diff = require("deep-diff").diff(root.toJSON(), root2.toJSON()); -if (diff) { - diff.forEach(function(diff) { - console.log(diff.kind + " @ " + diff.path.join(".")); - console.log("lhs:", typeof diff.lhs, diff.lhs); - console.log("rhs:", typeof diff.rhs, diff.rhs); - console.log(); - }); - process.exitCode = 1; -} else - console.log("no differences"); diff --git a/node_modules/protobufjs/google/LICENSE b/node_modules/protobufjs/google/LICENSE deleted file mode 100644 index 868bd40..0000000 --- a/node_modules/protobufjs/google/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2014, Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/protobufjs/google/README.md b/node_modules/protobufjs/google/README.md deleted file mode 100644 index 09e3f23..0000000 --- a/node_modules/protobufjs/google/README.md +++ /dev/null @@ -1 +0,0 @@ -This folder contains stripped and pre-parsed definitions of common Google types. These files are not used by protobuf.js directly but are here so you can use or include them where required. diff --git a/node_modules/protobufjs/google/api/annotations.json b/node_modules/protobufjs/google/api/annotations.json deleted file mode 100644 index 3f13a73..0000000 --- a/node_modules/protobufjs/google/api/annotations.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "api": { - "nested": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "selector": { - "type": "string", - "id": 1 - }, - "body": { - "type": "string", - "id": 7 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - } - } - }, - "protobuf": { - "nested": { - "MethodOptions": { - "fields": {}, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/node_modules/protobufjs/google/api/annotations.proto b/node_modules/protobufjs/google/api/annotations.proto deleted file mode 100644 index 63a8eef..0000000 --- a/node_modules/protobufjs/google/api/annotations.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -extend google.protobuf.MethodOptions { - - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/node_modules/protobufjs/google/api/http.json b/node_modules/protobufjs/google/api/http.json deleted file mode 100644 index e3a0f4f..0000000 --- a/node_modules/protobufjs/google/api/http.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "api": { - "nested": { - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "selector": { - "type": "string", - "id": 1 - }, - "body": { - "type": "string", - "id": 7 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/node_modules/protobufjs/google/api/http.proto b/node_modules/protobufjs/google/api/http.proto deleted file mode 100644 index e9a7e9d..0000000 --- a/node_modules/protobufjs/google/api/http.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; - -package google.api; - -message Http { - - repeated HttpRule rules = 1; -} - -message HttpRule { - - oneof pattern { - - string get = 2; - string put = 3; - string post = 4; - string delete = 5; - string patch = 6; - CustomHttpPattern custom = 8; - } - - string selector = 1; - string body = 7; - repeated HttpRule additional_bindings = 11; -} - -message CustomHttpPattern { - - string kind = 1; - string path = 2; -} \ No newline at end of file diff --git a/node_modules/protobufjs/google/protobuf/api.json b/node_modules/protobufjs/google/protobuf/api.json deleted file mode 100644 index 5460612..0000000 --- a/node_modules/protobufjs/google/protobuf/api.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "protobuf": { - "nested": { - "Api": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "methods": { - "rule": "repeated", - "type": "Method", - "id": 2 - }, - "options": { - "rule": "repeated", - "type": "Option", - "id": 3 - }, - "version": { - "type": "string", - "id": 4 - }, - "sourceContext": { - "type": "SourceContext", - "id": 5 - }, - "mixins": { - "rule": "repeated", - "type": "Mixin", - "id": 6 - }, - "syntax": { - "type": "Syntax", - "id": 7 - } - } - }, - "Method": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "requestTypeUrl": { - "type": "string", - "id": 2 - }, - "requestStreaming": { - "type": "bool", - "id": 3 - }, - "responseTypeUrl": { - "type": "string", - "id": 4 - }, - "responseStreaming": { - "type": "bool", - "id": 5 - }, - "options": { - "rule": "repeated", - "type": "Option", - "id": 6 - }, - "syntax": { - "type": "Syntax", - "id": 7 - } - } - }, - "Mixin": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "root": { - "type": "string", - "id": 2 - } - } - }, - "SourceContext": { - "fields": { - "fileName": { - "type": "string", - "id": 1 - } - } - }, - "Option": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "type": "Any", - "id": 2 - } - } - }, - "Syntax": { - "values": { - "SYNTAX_PROTO2": 0, - "SYNTAX_PROTO3": 1 - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/node_modules/protobufjs/google/protobuf/api.proto b/node_modules/protobufjs/google/protobuf/api.proto deleted file mode 100644 index cf6ae3f..0000000 --- a/node_modules/protobufjs/google/protobuf/api.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package google.protobuf; - -import "google/protobuf/source_context.proto"; -import "google/protobuf/type.proto"; - -message Api { - - string name = 1; - repeated Method methods = 2; - repeated Option options = 3; - string version = 4; - SourceContext source_context = 5; - repeated Mixin mixins = 6; - Syntax syntax = 7; -} - -message Method { - - string name = 1; - string request_type_url = 2; - bool request_streaming = 3; - string response_type_url = 4; - bool response_streaming = 5; - repeated Option options = 6; - Syntax syntax = 7; -} - -message Mixin { - - string name = 1; - string root = 2; -} \ No newline at end of file diff --git a/node_modules/protobufjs/google/protobuf/descriptor.json b/node_modules/protobufjs/google/protobuf/descriptor.json deleted file mode 100644 index 300227b..0000000 --- a/node_modules/protobufjs/google/protobuf/descriptor.json +++ /dev/null @@ -1,1382 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "edition": "proto2", - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - }, - "extensions": [ - [ - 536000000, - 536000000 - ] - ] - }, - "Edition": { - "edition": "proto2", - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_LEGACY": 900, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10 - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11 - }, - "optionDependency": { - "rule": "repeated", - "type": "string", - "id": 15 - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - }, - "visibility": { - "type": "SymbolVisibility", - "id": 11 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "edition": "proto2", - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 - }, - "fullName": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "reserved": { - "type": "bool", - "id": 5 - }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "visibility": { - "type": "SymbolVisibility", - "id": 6 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5 - }, - "serverStreaming": { - "type": "bool", - "id": 6 - } - } - }, - "FileOptions": { - "edition": "proto2", - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10 - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27 - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16 - }, - "javaGenericServices": { - "type": "bool", - "id": 17 - }, - "pyGenericServices": { - "type": "bool", - "id": 18 - }, - "deprecated": { - "type": "bool", - "id": 23 - }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true - } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - [ - 38, - 38 - ], - "php_generic_services" - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "edition": "proto2", - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1 - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3 - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "edition": "proto2", - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5 - }, - "unverifiedLazy": { - "type": "bool", - "id": 15 - }, - "deprecated": { - "type": "bool", - "id": 3 - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "deprecated": true - } - }, - "debugRedact": { - "type": "bool", - "id": 16 - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19 - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "featureSupport": { - "type": "FeatureSupport", - "id": 22 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - }, - "FeatureSupport": { - "fields": { - "editionIntroduced": { - "type": "Edition", - "id": 1 - }, - "editionDeprecated": { - "type": "Edition", - "id": 2 - }, - "deprecationWarning": { - "type": "string", - "id": 3 - }, - "editionRemoved": { - "type": "Edition", - "id": 4 - } - } - } - } - }, - "OneofOptions": { - "edition": "proto2", - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "edition": "proto2", - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "edition": "proto2", - "fields": { - "deprecated": { - "type": "bool", - "id": 1 - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3 - }, - "featureSupport": { - "type": "FieldOptions.FeatureSupport", - "id": 4 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "edition": "proto2", - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "edition": "proto2", - "fields": { - "deprecated": { - "type": "bool", - "id": 33 - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "edition": "proto2", - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "FeatureSet": { - "edition": "proto2", - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "feature_support.edition_introduced": "EDITION_2023", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "feature_support.edition_introduced": "EDITION_2023", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "feature_support.edition_introduced": "EDITION_2023", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "feature_support.edition_introduced": "EDITION_2023", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "feature_support.edition_introduced": "EDITION_2023", - "edition_defaults.edition": "EDITION_LEGACY", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "feature_support.edition_introduced": "EDITION_2023", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - }, - "enforceNamingStyle": { - "type": "EnforceNamingStyle", - "id": 7, - "options": { - "retention": "RETENTION_SOURCE", - "targets": "TARGET_TYPE_METHOD", - "feature_support.edition_introduced": "EDITION_2024", - "edition_defaults.edition": "EDITION_2024", - "edition_defaults.value": "STYLE2024" - } - }, - "defaultSymbolVisibility": { - "type": "VisibilityFeature.DefaultSymbolVisibility", - "id": 8, - "options": { - "retention": "RETENTION_SOURCE", - "targets": "TARGET_TYPE_FILE", - "feature_support.edition_introduced": "EDITION_2024", - "edition_defaults.edition": "EDITION_2024", - "edition_defaults.value": "EXPORT_TOP_LEVEL" - } - } - }, - "extensions": [ - [ - 1000, - 9994 - ], - [ - 9995, - 9999 - ], - [ - 10000, - 10000 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - }, - "EnforceNamingStyle": { - "values": { - "ENFORCE_NAMING_STYLE_UNKNOWN": 0, - "STYLE2024": 1, - "STYLE_LEGACY": 2 - } - }, - "VisibilityFeature": { - "fields": {}, - "reserved": [ - [ - 1, - 536870911 - ] - ], - "nested": { - "DefaultSymbolVisibility": { - "values": { - "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, - "EXPORT_ALL": 1, - "EXPORT_TOP_LEVEL": 2, - "LOCAL_ALL": 3, - "STRICT": 4 - } - } - } - } - } - }, - "FeatureSetDefaults": { - "edition": "proto2", - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "overridableFeatures": { - "type": "FeatureSet", - "id": 4 - }, - "fixedFeatures": { - "type": "FeatureSet", - "id": 5 - } - }, - "reserved": [ - [ - 1, - 1 - ], - [ - 2, - 2 - ], - "features" - ] - } - } - }, - "SourceCodeInfo": { - "edition": "proto2", - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "extensions": [ - [ - 536000000, - 536000000 - ] - ], - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1, - "options": { - "packed": true - } - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2, - "options": { - "packed": true - } - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "edition": "proto2", - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1, - "options": { - "packed": true - } - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "SymbolVisibility": { - "edition": "proto2", - "values": { - "VISIBILITY_UNSET": 0, - "VISIBILITY_LOCAL": 1, - "VISIBILITY_EXPORT": 2 - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/node_modules/protobufjs/google/protobuf/descriptor.proto b/node_modules/protobufjs/google/protobuf/descriptor.proto deleted file mode 100644 index 1b130fd..0000000 --- a/node_modules/protobufjs/google/protobuf/descriptor.proto +++ /dev/null @@ -1,535 +0,0 @@ -syntax = "proto2"; - -package google.protobuf; - -option go_package = "google.golang.org/protobuf/types/descriptorpb"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "DescriptorProtos"; -option csharp_namespace = "Google.Protobuf.Reflection"; -option objc_class_prefix = "GPB"; -option cc_enable_arenas = true; -option optimize_for = "SPEED"; - -message FileDescriptorSet { - - repeated FileDescriptorProto file = 1; - - extensions 536000000; -} - -enum Edition { - - EDITION_UNKNOWN = 0; - EDITION_LEGACY = 900; - EDITION_PROTO2 = 998; - EDITION_PROTO3 = 999; - EDITION_2023 = 1000; - EDITION_2024 = 1001; - EDITION_1_TEST_ONLY = 1; - EDITION_2_TEST_ONLY = 2; - EDITION_99997_TEST_ONLY = 99997; - EDITION_99998_TEST_ONLY = 99998; - EDITION_99999_TEST_ONLY = 99999; - EDITION_MAX = 2147483647; -} - -message FileDescriptorProto { - - optional string name = 1; - optional string package = 2; - repeated string dependency = 3; - repeated int32 public_dependency = 10; - repeated int32 weak_dependency = 11; - repeated string option_dependency = 15; - repeated DescriptorProto message_type = 4; - repeated EnumDescriptorProto enum_type = 5; - repeated ServiceDescriptorProto service = 6; - repeated FieldDescriptorProto extension = 7; - optional FileOptions options = 8; - optional SourceCodeInfo source_code_info = 9; - optional string syntax = 12; - optional Edition edition = 14; -} - -message DescriptorProto { - - optional string name = 1; - repeated FieldDescriptorProto field = 2; - repeated FieldDescriptorProto extension = 6; - repeated DescriptorProto nested_type = 3; - repeated EnumDescriptorProto enum_type = 4; - repeated ExtensionRange extension_range = 5; - repeated OneofDescriptorProto oneof_decl = 8; - optional MessageOptions options = 7; - repeated ReservedRange reserved_range = 9; - repeated string reserved_name = 10; - optional SymbolVisibility visibility = 11; - - message ExtensionRange { - - optional int32 start = 1; - optional int32 end = 2; - optional ExtensionRangeOptions options = 3; - } - - message ReservedRange { - - optional int32 start = 1; - optional int32 end = 2; - } -} - -message ExtensionRangeOptions { - - repeated UninterpretedOption uninterpreted_option = 999; - repeated Declaration declaration = 2 [retention="RETENTION_SOURCE"]; - optional FeatureSet features = 50; - optional VerificationState verification = 3 [default=UNVERIFIED, retention="RETENTION_SOURCE"]; - - message Declaration { - - optional int32 number = 1; - optional string full_name = 2; - optional string type = 3; - optional bool reserved = 5; - optional bool repeated = 6; - - reserved 4; - } - - enum VerificationState { - - DECLARATION = 0; - UNVERIFIED = 1; - } - - extensions 1000 to max; -} - -message FieldDescriptorProto { - - optional string name = 1; - optional int32 number = 3; - optional Label label = 4; - optional Type type = 5; - optional string type_name = 6; - optional string extendee = 2; - optional string default_value = 7; - optional int32 oneof_index = 9; - optional string json_name = 10; - optional FieldOptions options = 8; - optional bool proto3_optional = 17; - - enum Type { - - TYPE_DOUBLE = 1; - TYPE_FLOAT = 2; - TYPE_INT64 = 3; - TYPE_UINT64 = 4; - TYPE_INT32 = 5; - TYPE_FIXED64 = 6; - TYPE_FIXED32 = 7; - TYPE_BOOL = 8; - TYPE_STRING = 9; - TYPE_GROUP = 10; - TYPE_MESSAGE = 11; - TYPE_BYTES = 12; - TYPE_UINT32 = 13; - TYPE_ENUM = 14; - TYPE_SFIXED32 = 15; - TYPE_SFIXED64 = 16; - TYPE_SINT32 = 17; - TYPE_SINT64 = 18; - } - - enum Label { - - LABEL_OPTIONAL = 1; - LABEL_REPEATED = 3; - LABEL_REQUIRED = 2; - } -} - -message OneofDescriptorProto { - - optional string name = 1; - optional OneofOptions options = 2; -} - -message EnumDescriptorProto { - - optional string name = 1; - repeated EnumValueDescriptorProto value = 2; - optional EnumOptions options = 3; - repeated EnumReservedRange reserved_range = 4; - repeated string reserved_name = 5; - optional SymbolVisibility visibility = 6; - - message EnumReservedRange { - - optional int32 start = 1; - optional int32 end = 2; - } -} - -message EnumValueDescriptorProto { - - optional string name = 1; - optional int32 number = 2; - optional EnumValueOptions options = 3; -} - -message ServiceDescriptorProto { - - optional string name = 1; - repeated MethodDescriptorProto method = 2; - optional ServiceOptions options = 3; -} - -message MethodDescriptorProto { - - optional string name = 1; - optional string input_type = 2; - optional string output_type = 3; - optional MethodOptions options = 4; - optional bool client_streaming = 5; - optional bool server_streaming = 6; -} - -message FileOptions { - - optional string java_package = 1; - optional string java_outer_classname = 8; - optional bool java_multiple_files = 10; - optional bool java_generate_equals_and_hash = 20 [deprecated=true]; - optional bool java_string_check_utf8 = 27; - optional OptimizeMode optimize_for = 9 [default=SPEED]; - optional string go_package = 11; - optional bool cc_generic_services = 16; - optional bool java_generic_services = 17; - optional bool py_generic_services = 18; - optional bool deprecated = 23; - optional bool cc_enable_arenas = 31 [default=true]; - optional string objc_class_prefix = 36; - optional string csharp_namespace = 37; - optional string swift_prefix = 39; - optional string php_class_prefix = 40; - optional string php_namespace = 41; - optional string php_metadata_namespace = 44; - optional string ruby_package = 45; - optional FeatureSet features = 50; - repeated UninterpretedOption uninterpreted_option = 999; - - enum OptimizeMode { - - SPEED = 1; - CODE_SIZE = 2; - LITE_RUNTIME = 3; - } - - extensions 1000 to max; - - reserved 42, 38; - reserved "php_generic_services"; -} - -message MessageOptions { - - optional bool message_set_wire_format = 1; - optional bool no_standard_descriptor_accessor = 2; - optional bool deprecated = 3; - optional bool map_entry = 7; - optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated=true]; - optional FeatureSet features = 12; - repeated UninterpretedOption uninterpreted_option = 999; - - extensions 1000 to max; - - reserved 4, 5, 6, 8, 9; -} - -message FieldOptions { - - optional CType ctype = 1 [default=STRING]; - optional bool packed = 2; - optional JSType jstype = 6 [default=JS_NORMAL]; - optional bool lazy = 5; - optional bool unverified_lazy = 15; - optional bool deprecated = 3; - optional bool weak = 10 [deprecated=true]; - optional bool debug_redact = 16; - optional OptionRetention retention = 17; - repeated OptionTargetType targets = 19; - repeated EditionDefault edition_defaults = 20; - optional FeatureSet features = 21; - optional FeatureSupport feature_support = 22; - repeated UninterpretedOption uninterpreted_option = 999; - - enum CType { - - STRING = 0; - CORD = 1; - STRING_PIECE = 2; - } - - enum JSType { - - JS_NORMAL = 0; - JS_STRING = 1; - JS_NUMBER = 2; - } - - enum OptionRetention { - - RETENTION_UNKNOWN = 0; - RETENTION_RUNTIME = 1; - RETENTION_SOURCE = 2; - } - - enum OptionTargetType { - - TARGET_TYPE_UNKNOWN = 0; - TARGET_TYPE_FILE = 1; - TARGET_TYPE_EXTENSION_RANGE = 2; - TARGET_TYPE_MESSAGE = 3; - TARGET_TYPE_FIELD = 4; - TARGET_TYPE_ONEOF = 5; - TARGET_TYPE_ENUM = 6; - TARGET_TYPE_ENUM_ENTRY = 7; - TARGET_TYPE_SERVICE = 8; - TARGET_TYPE_METHOD = 9; - } - - message EditionDefault { - - optional Edition edition = 3; - optional string value = 2; - } - - message FeatureSupport { - - optional Edition edition_introduced = 1; - optional Edition edition_deprecated = 2; - optional string deprecation_warning = 3; - optional Edition edition_removed = 4; - } - - extensions 1000 to max; - - reserved 4, 18; -} - -message OneofOptions { - - optional FeatureSet features = 1; - repeated UninterpretedOption uninterpreted_option = 999; - - extensions 1000 to max; -} - -message EnumOptions { - - optional bool allow_alias = 2; - optional bool deprecated = 3; - optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated=true]; - optional FeatureSet features = 7; - repeated UninterpretedOption uninterpreted_option = 999; - - extensions 1000 to max; - - reserved 5; -} - -message EnumValueOptions { - - optional bool deprecated = 1; - optional FeatureSet features = 2; - optional bool debug_redact = 3; - optional FieldOptions.FeatureSupport feature_support = 4; - repeated UninterpretedOption uninterpreted_option = 999; - - extensions 1000 to max; -} - -message ServiceOptions { - - optional FeatureSet features = 34; - optional bool deprecated = 33; - repeated UninterpretedOption uninterpreted_option = 999; - - extensions 1000 to max; -} - -message MethodOptions { - - optional bool deprecated = 33; - optional IdempotencyLevel idempotency_level = 34 [default=IDEMPOTENCY_UNKNOWN]; - optional FeatureSet features = 35; - repeated UninterpretedOption uninterpreted_option = 999; - - enum IdempotencyLevel { - - IDEMPOTENCY_UNKNOWN = 0; - NO_SIDE_EFFECTS = 1; - IDEMPOTENT = 2; - } - - extensions 1000 to max; -} - -message UninterpretedOption { - - repeated NamePart name = 2; - optional string identifier_value = 3; - optional uint64 positive_int_value = 4; - optional int64 negative_int_value = 5; - optional double double_value = 6; - optional bytes string_value = 7; - optional string aggregate_value = 8; - - message NamePart { - - required string name_part = 1; - required bool is_extension = 2; - } -} - -message FeatureSet { - - optional FieldPresence field_presence = 1 [retention="RETENTION_RUNTIME", targets="TARGET_TYPE_FILE", feature_support.edition_introduced="EDITION_2023", edition_defaults.edition="EDITION_2023", edition_defaults.value="EXPLICIT"]; - optional EnumType enum_type = 2 [retention="RETENTION_RUNTIME", targets="TARGET_TYPE_FILE", feature_support.edition_introduced="EDITION_2023", edition_defaults.edition="EDITION_PROTO3", edition_defaults.value="OPEN"]; - optional RepeatedFieldEncoding repeated_field_encoding = 3 [retention="RETENTION_RUNTIME", targets="TARGET_TYPE_FILE", feature_support.edition_introduced="EDITION_2023", edition_defaults.edition="EDITION_PROTO3", edition_defaults.value="PACKED"]; - optional Utf8Validation utf8_validation = 4 [retention="RETENTION_RUNTIME", targets="TARGET_TYPE_FILE", feature_support.edition_introduced="EDITION_2023", edition_defaults.edition="EDITION_PROTO3", edition_defaults.value="VERIFY"]; - optional MessageEncoding message_encoding = 5 [retention="RETENTION_RUNTIME", targets="TARGET_TYPE_FILE", feature_support.edition_introduced="EDITION_2023", edition_defaults.edition="EDITION_LEGACY", edition_defaults.value="LENGTH_PREFIXED"]; - optional JsonFormat json_format = 6 [retention="RETENTION_RUNTIME", targets="TARGET_TYPE_FILE", feature_support.edition_introduced="EDITION_2023", edition_defaults.edition="EDITION_PROTO3", edition_defaults.value="ALLOW"]; - optional EnforceNamingStyle enforce_naming_style = 7 [retention="RETENTION_SOURCE", targets="TARGET_TYPE_METHOD", feature_support.edition_introduced="EDITION_2024", edition_defaults.edition="EDITION_2024", edition_defaults.value="STYLE2024"]; - optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [retention="RETENTION_SOURCE", targets="TARGET_TYPE_FILE", feature_support.edition_introduced="EDITION_2024", edition_defaults.edition="EDITION_2024", edition_defaults.value="EXPORT_TOP_LEVEL"]; - - enum FieldPresence { - - FIELD_PRESENCE_UNKNOWN = 0; - EXPLICIT = 1; - IMPLICIT = 2; - LEGACY_REQUIRED = 3; - } - - enum EnumType { - - ENUM_TYPE_UNKNOWN = 0; - OPEN = 1; - CLOSED = 2; - } - - enum RepeatedFieldEncoding { - - REPEATED_FIELD_ENCODING_UNKNOWN = 0; - PACKED = 1; - EXPANDED = 2; - } - - enum Utf8Validation { - - UTF8_VALIDATION_UNKNOWN = 0; - VERIFY = 2; - NONE = 3; - } - - enum MessageEncoding { - - MESSAGE_ENCODING_UNKNOWN = 0; - LENGTH_PREFIXED = 1; - DELIMITED = 2; - } - - enum JsonFormat { - - JSON_FORMAT_UNKNOWN = 0; - ALLOW = 1; - LEGACY_BEST_EFFORT = 2; - } - - enum EnforceNamingStyle { - - ENFORCE_NAMING_STYLE_UNKNOWN = 0; - STYLE2024 = 1; - STYLE_LEGACY = 2; - } - - message VisibilityFeature { - - enum DefaultSymbolVisibility { - - DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0; - EXPORT_ALL = 1; - EXPORT_TOP_LEVEL = 2; - LOCAL_ALL = 3; - STRICT = 4; - } - - reserved 1 to max; - } - - extensions 1000 to 9994, 9995 to 9999, 10000; - - reserved 999; -} - -message FeatureSetDefaults { - - repeated FeatureSetEditionDefault defaults = 1; - optional Edition minimum_edition = 4; - optional Edition maximum_edition = 5; - - message FeatureSetEditionDefault { - - optional Edition edition = 3; - optional FeatureSet overridable_features = 4; - optional FeatureSet fixed_features = 5; - - reserved 1, 2, "features"; - } -} - -message SourceCodeInfo { - - repeated Location location = 1; - - message Location { - - repeated int32 path = 1 [packed=true]; - repeated int32 span = 2 [packed=true]; - optional string leading_comments = 3; - optional string trailing_comments = 4; - repeated string leading_detached_comments = 6; - } - - extensions 536000000; -} - -message GeneratedCodeInfo { - - repeated Annotation annotation = 1; - - message Annotation { - - repeated int32 path = 1 [packed=true]; - optional string source_file = 2; - optional int32 begin = 3; - optional int32 end = 4; - optional Semantic semantic = 5; - - enum Semantic { - - NONE = 0; - SET = 1; - ALIAS = 2; - } - } -} - -enum SymbolVisibility { - - VISIBILITY_UNSET = 0; - VISIBILITY_LOCAL = 1; - VISIBILITY_EXPORT = 2; -} \ No newline at end of file diff --git a/node_modules/protobufjs/google/protobuf/source_context.json b/node_modules/protobufjs/google/protobuf/source_context.json deleted file mode 100644 index 51adb63..0000000 --- a/node_modules/protobufjs/google/protobuf/source_context.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "protobuf": { - "nested": { - "SourceContext": { - "fields": { - "fileName": { - "type": "string", - "id": 1 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/node_modules/protobufjs/google/protobuf/source_context.proto b/node_modules/protobufjs/google/protobuf/source_context.proto deleted file mode 100644 index 584d36c..0000000 --- a/node_modules/protobufjs/google/protobuf/source_context.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -package google.protobuf; - -message SourceContext { - string file_name = 1; -} diff --git a/node_modules/protobufjs/google/protobuf/type.json b/node_modules/protobufjs/google/protobuf/type.json deleted file mode 100644 index fffa70d..0000000 --- a/node_modules/protobufjs/google/protobuf/type.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "protobuf": { - "nested": { - "Type": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "fields": { - "rule": "repeated", - "type": "Field", - "id": 2 - }, - "oneofs": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "options": { - "rule": "repeated", - "type": "Option", - "id": 4 - }, - "sourceContext": { - "type": "SourceContext", - "id": 5 - }, - "syntax": { - "type": "Syntax", - "id": 6 - } - } - }, - "Field": { - "fields": { - "kind": { - "type": "Kind", - "id": 1 - }, - "cardinality": { - "type": "Cardinality", - "id": 2 - }, - "number": { - "type": "int32", - "id": 3 - }, - "name": { - "type": "string", - "id": 4 - }, - "typeUrl": { - "type": "string", - "id": 6 - }, - "oneofIndex": { - "type": "int32", - "id": 7 - }, - "packed": { - "type": "bool", - "id": 8 - }, - "options": { - "rule": "repeated", - "type": "Option", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "defaultValue": { - "type": "string", - "id": 11 - } - }, - "nested": { - "Kind": { - "values": { - "TYPE_UNKNOWN": 0, - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Cardinality": { - "values": { - "CARDINALITY_UNKNOWN": 0, - "CARDINALITY_OPTIONAL": 1, - "CARDINALITY_REQUIRED": 2, - "CARDINALITY_REPEATED": 3 - } - } - } - }, - "Enum": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "enumvalue": { - "rule": "repeated", - "type": "EnumValue", - "id": 2 - }, - "options": { - "rule": "repeated", - "type": "Option", - "id": 3 - }, - "sourceContext": { - "type": "SourceContext", - "id": 4 - }, - "syntax": { - "type": "Syntax", - "id": 5 - } - } - }, - "EnumValue": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "rule": "repeated", - "type": "Option", - "id": 3 - } - } - }, - "Option": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "type": "Any", - "id": 2 - } - } - }, - "Syntax": { - "values": { - "SYNTAX_PROTO2": 0, - "SYNTAX_PROTO3": 1 - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "SourceContext": { - "fields": { - "fileName": { - "type": "string", - "id": 1 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/node_modules/protobufjs/google/protobuf/type.proto b/node_modules/protobufjs/google/protobuf/type.proto deleted file mode 100644 index 8ee445b..0000000 --- a/node_modules/protobufjs/google/protobuf/type.proto +++ /dev/null @@ -1,89 +0,0 @@ -syntax = "proto3"; - -package google.protobuf; - -import "google/protobuf/any.proto"; -import "google/protobuf/source_context.proto"; - -message Type { - - string name = 1; - repeated Field fields = 2; - repeated string oneofs = 3; - repeated Option options = 4; - SourceContext source_context = 5; - Syntax syntax = 6; -} - -message Field { - - Kind kind = 1; - Cardinality cardinality = 2; - int32 number = 3; - string name = 4; - string type_url = 6; - int32 oneof_index = 7; - bool packed = 8; - repeated Option options = 9; - string json_name = 10; - string default_value = 11; - - enum Kind { - - TYPE_UNKNOWN = 0; - TYPE_DOUBLE = 1; - TYPE_FLOAT = 2; - TYPE_INT64 = 3; - TYPE_UINT64 = 4; - TYPE_INT32 = 5; - TYPE_FIXED64 = 6; - TYPE_FIXED32 = 7; - TYPE_BOOL = 8; - TYPE_STRING = 9; - TYPE_GROUP = 10; - TYPE_MESSAGE = 11; - TYPE_BYTES = 12; - TYPE_UINT32 = 13; - TYPE_ENUM = 14; - TYPE_SFIXED32 = 15; - TYPE_SFIXED64 = 16; - TYPE_SINT32 = 17; - TYPE_SINT64 = 18; - } - - enum Cardinality { - - CARDINALITY_UNKNOWN = 0; - CARDINALITY_OPTIONAL = 1; - CARDINALITY_REQUIRED = 2; - CARDINALITY_REPEATED = 3; - } -} - -message Enum { - - string name = 1; - repeated EnumValue enumvalue = 2; - repeated Option options = 3; - SourceContext source_context = 4; - Syntax syntax = 5; -} - -message EnumValue { - - string name = 1; - int32 number = 2; - repeated Option options = 3; -} - -message Option { - - string name = 1; - Any value = 2; -} - -enum Syntax { - - SYNTAX_PROTO2 = 0; - SYNTAX_PROTO3 = 1; -} diff --git a/node_modules/protobufjs/index.d.ts b/node_modules/protobufjs/index.d.ts deleted file mode 100644 index 309681f..0000000 --- a/node_modules/protobufjs/index.d.ts +++ /dev/null @@ -1,2840 +0,0 @@ -// DO NOT EDIT! This is a generated file. Edit the JSDoc in src/*.js instead and run 'npm run build:types'. - -export as namespace protobuf; - -/** - * Provides common type definitions. - * Can also be used to provide additional google types or your own custom types. - * @param name Short name as in `google/protobuf/[name].proto` or full file name - * @param json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition - */ -export function common(name: string, json: { [k: string]: any }): void; - -export namespace common { - - /** Properties of a google.protobuf.Any message. */ - interface IAny { - typeUrl?: string; - bytes?: Uint8Array; - } - - /** Properties of a google.protobuf.Duration message. */ - interface IDuration { - seconds?: (number|Long); - nanos?: number; - } - - /** Properties of a google.protobuf.Timestamp message. */ - interface ITimestamp { - seconds?: (number|Long); - nanos?: number; - } - - /** Properties of a google.protobuf.Empty message. */ - interface IEmpty { - } - - /** Properties of a google.protobuf.Struct message. */ - interface IStruct { - fields?: { [k: string]: IValue }; - } - - /** Properties of a google.protobuf.Value message. */ - interface IValue { - kind?: string; - nullValue?: 0; - numberValue?: number; - stringValue?: string; - boolValue?: boolean; - structValue?: IStruct; - listValue?: IListValue; - } - - /** Properties of a google.protobuf.ListValue message. */ - interface IListValue { - values?: IValue[]; - } - - /** Properties of a google.protobuf.DoubleValue message. */ - interface IDoubleValue { - value?: number; - } - - /** Properties of a google.protobuf.FloatValue message. */ - interface IFloatValue { - value?: number; - } - - /** Properties of a google.protobuf.Int64Value message. */ - interface IInt64Value { - value?: (number|Long); - } - - /** Properties of a google.protobuf.UInt64Value message. */ - interface IUInt64Value { - value?: (number|Long); - } - - /** Properties of a google.protobuf.Int32Value message. */ - interface IInt32Value { - value?: number; - } - - /** Properties of a google.protobuf.UInt32Value message. */ - interface IUInt32Value { - value?: number; - } - - /** Properties of a google.protobuf.BoolValue message. */ - interface IBoolValue { - value?: boolean; - } - - /** Properties of a google.protobuf.StringValue message. */ - interface IStringValue { - value?: string; - } - - /** Properties of a google.protobuf.BytesValue message. */ - interface IBytesValue { - value?: Uint8Array; - } - - /** - * Gets the root definition of the specified common proto file. - * - * Bundled definitions are: - * - google/protobuf/any.proto - * - google/protobuf/duration.proto - * - google/protobuf/empty.proto - * - google/protobuf/field_mask.proto - * - google/protobuf/struct.proto - * - google/protobuf/timestamp.proto - * - google/protobuf/wrappers.proto - * - * @param file Proto file name - * @returns Root definition or `null` if not defined - */ - function get(file: string): (INamespace|null); -} - -/** Runtime message from/to plain object converters. */ -export namespace converter { - - /** - * Generates a plain object to runtime message converter specific to the specified message type. - * @param mtype Message type - * @returns Codegen instance - */ - function fromObject(mtype: Type): Codegen; - - /** - * Generates a runtime message to plain object converter specific to the specified message type. - * @param mtype Message type - * @returns Codegen instance - */ - function toObject(mtype: Type): Codegen; -} - -/** - * Generates a decoder specific to the specified message type. - * @param mtype Message type - * @returns Codegen instance - */ -export function decoder(mtype: Type): Codegen; - -/** - * Generates an encoder specific to the specified message type. - * @param mtype Message type - * @returns Codegen instance - */ -export function encoder(mtype: Type): Codegen; - -/** Reflected enum. */ -export class Enum extends ReflectionObject { - - /** - * Constructs a new enum instance. - * @param name Unique name within its namespace - * @param [values] Enum values as an object, by name - * @param [options] Declared options - * @param [comment] The comment for this enum - * @param [comments] The value comments for this enum - * @param [valuesOptions] The value options for this enum - */ - constructor(name: string, values?: { [k: string]: number }, options?: { [k: string]: any }, comment?: string, comments?: { [k: string]: string }, valuesOptions?: ({ [k: string]: { [k: string]: any } }|undefined)); - - /** Enum values by id. */ - public valuesById: { [k: number]: string }; - - /** Enum values by name. */ - public values: { [k: string]: number }; - - /** Enum comment text. */ - public comment: (string|null); - - /** Value comment texts, if any. */ - public comments: { [k: string]: string }; - - /** Values options, if any */ - public valuesOptions?: { [k: string]: { [k: string]: any } }; - - /** Resolved values features, if any */ - public _valuesFeatures?: { [k: string]: { [k: string]: any } }; - - /** Reserved ranges, if any. */ - public reserved: (number[]|string)[]; - - /** - * Constructs an enum from an enum descriptor. - * @param name Enum name - * @param json Enum descriptor - * @returns Created enum - * @throws {TypeError} If arguments are invalid - */ - public static fromJSON(name: string, json: IEnum): Enum; - - /** - * Converts this enum to an enum descriptor. - * @param [toJSONOptions] JSON conversion options - * @returns Enum descriptor - */ - public toJSON(toJSONOptions?: IToJSONOptions): IEnum; - - /** - * Adds a value to this enum. - * @param name Value name - * @param id Value id - * @param [comment] Comment, if any - * @param {Object.|undefined} [options] Options, if any - * @returns `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a value with this name or id - */ - public add(name: string, id: number, comment?: string, options?: ({ [k: string]: any }|undefined)): Enum; - - /** - * Removes a value from this enum - * @param name Value name - * @returns `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `name` is not a name of this enum - */ - public remove(name: string): Enum; - - /** - * Tests if the specified id is reserved. - * @param id Id to test - * @returns `true` if reserved, otherwise `false` - */ - public isReservedId(id: number): boolean; - - /** - * Tests if the specified name is reserved. - * @param name Name to test - * @returns `true` if reserved, otherwise `false` - */ - public isReservedName(name: string): boolean; -} - -/** Enum descriptor. */ -export interface IEnum { - - /** Enum values */ - values: { [k: string]: number }; - - /** Enum options */ - options?: { [k: string]: any }; -} - -/** Reflected message field. */ -export class Field extends FieldBase { - - /** - * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class. - * @param name Unique name within its namespace - * @param id Unique id within its namespace - * @param type Value type - * @param [rule="optional"] Field rule - * @param [extend] Extended type if different from parent - * @param [options] Declared options - */ - constructor(name: string, id: number, type: string, rule?: (string|{ [k: string]: any }), extend?: (string|{ [k: string]: any }), options?: { [k: string]: any }); - - /** - * Constructs a field from a field descriptor. - * @param name Field name - * @param json Field descriptor - * @returns Created field - * @throws {TypeError} If arguments are invalid - */ - public static fromJSON(name: string, json: IField): Field; - - /** Determines whether this field is required. */ - public readonly required: boolean; - - /** Determines whether this field is not required. */ - public readonly optional: boolean; - - /** - * Determines whether this field uses tag-delimited encoding. In proto2 this - * corresponded to group syntax. - */ - public readonly delimited: boolean; - - /** Determines whether this field is packed. Only relevant when repeated. */ - public readonly packed: boolean; - - /** Determines whether this field tracks presence. */ - public readonly hasPresence: boolean; - - /** - * Field decorator (TypeScript). - * @param fieldId Field id - * @param fieldType Field type - * @param [fieldRule="optional"] Field rule - * @param [defaultValue] Default value - * @returns Decorator function - */ - public static d(fieldId: number, fieldType: ("double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"string"|"bool"|"bytes"|object), fieldRule?: ("optional"|"required"|"repeated"), defaultValue?: T): FieldDecorator; - - /** - * Field decorator (TypeScript). - * @param fieldId Field id - * @param fieldType Field type - * @param [fieldRule="optional"] Field rule - * @returns Decorator function - */ - public static d>(fieldId: number, fieldType: (Constructor|string), fieldRule?: ("optional"|"required"|"repeated")): FieldDecorator; -} - -/** Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions. */ -export class FieldBase extends ReflectionObject { - - /** - * Not an actual constructor. Use {@link Field} instead. - * @param name Unique name within its namespace - * @param id Unique id within its namespace - * @param type Value type - * @param [rule="optional"] Field rule - * @param [extend] Extended type if different from parent - * @param [options] Declared options - * @param [comment] Comment associated with this field - */ - constructor(name: string, id: number, type: string, rule?: (string|{ [k: string]: any }), extend?: (string|{ [k: string]: any }), options?: { [k: string]: any }, comment?: string); - - /** Field type. */ - public type: string; - - /** Unique field id. */ - public id: number; - - /** Extended type if different from parent. */ - public extend?: string; - - /** Whether this field is repeated. */ - public repeated: boolean; - - /** Whether this field is a map or not. */ - public map: boolean; - - /** Message this field belongs to. */ - public message: (Type|null); - - /** OneOf this field belongs to, if any, */ - public partOf: (OneOf|null); - - /** The field type's default value. */ - public typeDefault: any; - - /** The field's default value on prototypes. */ - public defaultValue: any; - - /** Whether this field's value should be treated as a long. */ - public long: boolean; - - /** Whether this field's value is a buffer. */ - public bytes: boolean; - - /** Resolved type if not a basic type. */ - public resolvedType: (Type|Enum|null); - - /** Sister-field within the extended type if a declaring extension field. */ - public extensionField: (Field|null); - - /** Sister-field within the declaring namespace if an extended field. */ - public declaringField: (Field|null); - - /** Comment for this field. */ - public comment: (string|null); - - /** - * Converts this field to a field descriptor. - * @param [toJSONOptions] JSON conversion options - * @returns Field descriptor - */ - public toJSON(toJSONOptions?: IToJSONOptions): IField; - - /** - * Resolves this field's type references. - * @returns `this` - * @throws {Error} If any reference cannot be resolved - */ - public resolve(): Field; - - /** - * Infers field features from legacy syntax that may have been specified differently. - * in older editions. - * @param edition The edition this proto is on, or undefined if pre-editions - * @returns The feature values to override - */ - public _inferLegacyProtoFeatures(edition: (string|undefined)): object; -} - -/** Field descriptor. */ -export interface IField { - - /** Field rule */ - rule?: string; - - /** Field type */ - type: string; - - /** Field id */ - id: number; - - /** Field options */ - options?: { [k: string]: any }; -} - -/** Extension field descriptor. */ -export interface IExtensionField extends IField { - - /** Extended type */ - extend: string; -} - -/** - * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript). - * @param prototype Target prototype - * @param fieldName Field name - */ -type FieldDecorator = (prototype: object, fieldName: string) => void; - -/** - * A node-style callback as used by {@link load} and {@link Root#load}. - * @param error Error, if any, otherwise `null` - * @param [root] Root, if there hasn't been an error - */ -type LoadCallback = (error: (Error|null), root?: Root) => void; - -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. - * @param filename One or multiple files to load - * @param root Root namespace, defaults to create a new one if omitted. - * @param callback Callback function - * @see {@link Root#load} - */ -export function load(filename: (string|string[]), root: Root, callback: LoadCallback): void; - -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. - * @param filename One or multiple files to load - * @param callback Callback function - * @see {@link Root#load} - */ -export function load(filename: (string|string[]), callback: LoadCallback): void; - -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise. - * @param filename One or multiple files to load - * @param [root] Root namespace, defaults to create a new one if omitted. - * @returns Promise - * @see {@link Root#load} - */ -export function load(filename: (string|string[]), root?: Root): Promise; - -/** - * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only). - * @param filename One or multiple files to load - * @param [root] Root namespace, defaults to create a new one if omitted. - * @returns Root namespace - * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid - * @see {@link Root#loadSync} - */ -export function loadSync(filename: (string|string[]), root?: Root): Root; - -/** Build type, one of `"full"`, `"light"` or `"minimal"`. */ -export const build: string; - -/** Reconfigures the library according to the environment. */ -export function configure(): void; - -/** Reflected map field. */ -export class MapField extends FieldBase { - - /** - * Constructs a new map field instance. - * @param name Unique name within its namespace - * @param id Unique id within its namespace - * @param keyType Key type - * @param type Value type - * @param [options] Declared options - * @param [comment] Comment associated with this field - */ - constructor(name: string, id: number, keyType: string, type: string, options?: { [k: string]: any }, comment?: string); - - /** Key type. */ - public keyType: string; - - /** Resolved key type if not a basic type. */ - public resolvedKeyType: (ReflectionObject|null); - - /** - * Constructs a map field from a map field descriptor. - * @param name Field name - * @param json Map field descriptor - * @returns Created map field - * @throws {TypeError} If arguments are invalid - */ - public static fromJSON(name: string, json: IMapField): MapField; - - /** - * Converts this map field to a map field descriptor. - * @param [toJSONOptions] JSON conversion options - * @returns Map field descriptor - */ - public toJSON(toJSONOptions?: IToJSONOptions): IMapField; - - /** - * Map field decorator (TypeScript). - * @param fieldId Field id - * @param fieldKeyType Field key type - * @param fieldValueType Field value type - * @returns Decorator function - */ - public static d }>(fieldId: number, fieldKeyType: ("int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"), fieldValueType: ("double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"|"bytes"|object|Constructor<{}>)): FieldDecorator; -} - -/** Map field descriptor. */ -export interface IMapField extends IField { - - /** Key type */ - keyType: string; -} - -/** Extension map field descriptor. */ -export interface IExtensionMapField extends IMapField { - - /** Extended type */ - extend: string; -} - -/** Abstract runtime message. */ -export class Message { - - /** - * Constructs a new message instance. - * @param [properties] Properties to set - */ - constructor(properties?: Properties); - - /** Reference to the reflected type. */ - public static readonly $type: Type; - - /** Reference to the reflected type. */ - public readonly $type: Type; - - /** - * Creates a new message of this type using the specified properties. - * @param [properties] Properties to set - * @returns Message instance - */ - public static create>(this: Constructor, properties?: { [k: string]: any }): Message; - - /** - * Encodes a message of this type. - * @param message Message to encode - * @param [writer] Writer to use - * @returns Writer - */ - public static encode>(this: Constructor, message: (T|{ [k: string]: any }), writer?: Writer): Writer; - - /** - * Encodes a message of this type preceeded by its length as a varint. - * @param message Message to encode - * @param [writer] Writer to use - * @returns Writer - */ - public static encodeDelimited>(this: Constructor, message: (T|{ [k: string]: any }), writer?: Writer): Writer; - - /** - * Decodes a message of this type. - * @param reader Reader or buffer to decode - * @returns Decoded message - */ - public static decode>(this: Constructor, reader: (Reader|Uint8Array)): T; - - /** - * Decodes a message of this type preceeded by its length as a varint. - * @param reader Reader or buffer to decode - * @returns Decoded message - */ - public static decodeDelimited>(this: Constructor, reader: (Reader|Uint8Array)): T; - - /** - * Verifies a message of this type. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a new message of this type from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Message instance - */ - public static fromObject>(this: Constructor, object: { [k: string]: any }): T; - - /** - * Creates a plain object from a message of this type. Also converts values to other types if specified. - * @param message Message instance - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject>(this: Constructor, message: T, options?: IConversionOptions): { [k: string]: any }; - - /** - * Converts this message to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; -} - -/** Reflected service method. */ -export class Method extends ReflectionObject { - - /** - * Constructs a new service method instance. - * @param name Method name - * @param type Method type, usually `"rpc"` - * @param requestType Request message type - * @param responseType Response message type - * @param [requestStream] Whether the request is streamed - * @param [responseStream] Whether the response is streamed - * @param [options] Declared options - * @param [comment] The comment for this method - * @param [parsedOptions] Declared options, properly parsed into an object - */ - constructor(name: string, type: (string|undefined), requestType: string, responseType: string, requestStream?: (boolean|{ [k: string]: any }), responseStream?: (boolean|{ [k: string]: any }), options?: { [k: string]: any }, comment?: string, parsedOptions?: { [k: string]: any }); - - /** Method type. */ - public type: string; - - /** Request type. */ - public requestType: string; - - /** Whether requests are streamed or not. */ - public requestStream?: boolean; - - /** Response type. */ - public responseType: string; - - /** Whether responses are streamed or not. */ - public responseStream?: boolean; - - /** Resolved request type. */ - public resolvedRequestType: (Type|null); - - /** Resolved response type. */ - public resolvedResponseType: (Type|null); - - /** Comment for this method */ - public comment: (string|null); - - /** Options properly parsed into an object */ - public parsedOptions: any; - - /** - * Constructs a method from a method descriptor. - * @param name Method name - * @param json Method descriptor - * @returns Created method - * @throws {TypeError} If arguments are invalid - */ - public static fromJSON(name: string, json: IMethod): Method; - - /** - * Converts this method to a method descriptor. - * @param [toJSONOptions] JSON conversion options - * @returns Method descriptor - */ - public toJSON(toJSONOptions?: IToJSONOptions): IMethod; -} - -/** Method descriptor. */ -export interface IMethod { - - /** Method type */ - type?: string; - - /** Request type */ - requestType: string; - - /** Response type */ - responseType: string; - - /** Whether requests are streamed */ - requestStream?: boolean; - - /** Whether responses are streamed */ - responseStream?: boolean; - - /** Method options */ - options?: { [k: string]: any }; - - /** Method comments */ - comment: string; - - /** Method options properly parsed into an object */ - parsedOptions?: { [k: string]: any }; -} - -/** Reflected namespace. */ -export class Namespace extends NamespaceBase { - - /** - * Constructs a new namespace instance. - * @param name Namespace name - * @param [options] Declared options - */ - constructor(name: string, options?: { [k: string]: any }); - - /** - * Constructs a namespace from JSON. - * @param name Namespace name - * @param json JSON object - * @param [depth] Current nesting depth, defaults to `0` - * @returns Created namespace - * @throws {TypeError} If arguments are invalid - */ - public static fromJSON(name: string, json: { [k: string]: any }, depth?: number): Namespace; - - /** - * Converts an array of reflection objects to JSON. - * @param array Object array - * @param [toJSONOptions] JSON conversion options - * @returns JSON object or `undefined` when array is empty - */ - public static arrayToJSON(array: ReflectionObject[], toJSONOptions?: IToJSONOptions): ({ [k: string]: any }|undefined); - - /** - * Tests if the specified id is reserved. - * @param reserved Array of reserved ranges and names - * @param id Id to test - * @returns `true` if reserved, otherwise `false` - */ - public static isReservedId(reserved: ((number[]|string)[]|undefined), id: number): boolean; - - /** - * Tests if the specified name is reserved. - * @param reserved Array of reserved ranges and names - * @param name Name to test - * @returns `true` if reserved, otherwise `false` - */ - public static isReservedName(reserved: ((number[]|string)[]|undefined), name: string): boolean; -} - -/** Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions. */ -export abstract class NamespaceBase extends ReflectionObject { - - /** Nested objects by name. */ - public nested?: { [k: string]: ReflectionObject }; - - /** Whether or not objects contained in this namespace need feature resolution. */ - protected _needsRecursiveFeatureResolution: boolean; - - /** Whether or not objects contained in this namespace need a resolve. */ - protected _needsRecursiveResolve: boolean; - - /** Nested objects of this namespace as an array for iteration. */ - public readonly nestedArray: ReflectionObject[]; - - /** - * Converts this namespace to a namespace descriptor. - * @param [toJSONOptions] JSON conversion options - * @returns Namespace descriptor - */ - public toJSON(toJSONOptions?: IToJSONOptions): INamespace; - - /** - * Adds nested objects to this namespace from nested object descriptors. - * @param nestedJson Any nested object descriptors - * @param [depth] Current nesting depth, defaults to `0` - * @returns `this` - */ - public addJSON(nestedJson: { [k: string]: AnyNestedObject }, depth?: number): Namespace; - - /** - * Gets the nested object of the specified name. - * @param name Nested object name - * @returns The reflection object or `null` if it doesn't exist - */ - public get(name: string): (ReflectionObject|null); - - /** - * Gets the values of the nested {@link Enum|enum} of the specified name. - * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`. - * @param name Nested enum name - * @returns Enum values - * @throws {Error} If there is no such enum - */ - public getEnum(name: string): { [k: string]: number }; - - /** - * Adds a nested object to this namespace. - * @param object Nested object to add - * @returns `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a nested object with this name - */ - public add(object: ReflectionObject): Namespace; - - /** - * Removes a nested object from this namespace. - * @param object Nested object to remove - * @returns `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `object` is not a member of this namespace - */ - public remove(object: ReflectionObject): Namespace; - - /** - * Defines additial namespaces within this one if not yet existing. - * @param path Path to create - * @param [json] Nested types to create from JSON - * @returns Pointer to the last namespace created or `this` if path is empty - */ - public define(path: (string|string[]), json?: any): Namespace; - - /** - * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost. - * @returns `this` - */ - public resolveAll(): Namespace; - - /** - * Recursively looks up the reflection object matching the specified path in the scope of this namespace. - * @param path Path to look up - * @param filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc. - * @param [parentAlreadyChecked=false] If known, whether the parent has already been checked - * @returns Looked up object or `null` if none could be found - */ - public lookup(path: (string|string[]), filterTypes: (any|any[]), parentAlreadyChecked?: boolean): (ReflectionObject|null); - - /** - * Looks up the reflection object at the specified path, relative to this namespace. - * @param path Path to look up - * @param [parentAlreadyChecked=false] Whether the parent has already been checked - * @returns Looked up object or `null` if none could be found - */ - public lookup(path: (string|string[]), parentAlreadyChecked?: boolean): (ReflectionObject|null); - - /** - * Looks up the {@link Type|type} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param path Path to look up - * @returns Looked up type - * @throws {Error} If `path` does not point to a type - */ - public lookupType(path: (string|string[])): Type; - - /** - * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param path Path to look up - * @returns Looked up enum - * @throws {Error} If `path` does not point to an enum - */ - public lookupEnum(path: (string|string[])): Enum; - - /** - * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param path Path to look up - * @returns Looked up type or enum - * @throws {Error} If `path` does not point to a type or enum - */ - public lookupTypeOrEnum(path: (string|string[])): Type; - - /** - * Looks up the {@link Service|service} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param path Path to look up - * @returns Looked up service - * @throws {Error} If `path` does not point to a service - */ - public lookupService(path: (string|string[])): Service; -} - -/** Namespace descriptor. */ -export interface INamespace { - - /** Namespace options */ - options?: { [k: string]: any }; - - /** Nested object descriptors */ - nested?: { [k: string]: AnyNestedObject }; -} - -/** Any extension field descriptor. */ -type AnyExtensionField = (IExtensionField|IExtensionMapField); - -/** Any nested object descriptor. */ -type AnyNestedObject = (IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf); - -/** Base class of all reflection objects. */ -export abstract class ReflectionObject { - - /** Options. */ - public options?: { [k: string]: any }; - - /** Parsed Options. */ - public parsedOptions?: { [k: string]: any[] }; - - /** Unique name within its namespace. */ - public name: string; - - /** Parent namespace. */ - public parent: (Namespace|null); - - /** Whether already resolved or not. */ - public resolved: boolean; - - /** Comment text, if any. */ - public comment: (string|null); - - /** Defining file name. */ - public filename: (string|null); - - /** Reference to the root namespace. */ - public readonly root: Root; - - /** Full name including leading dot. */ - public readonly fullName: string; - - /** - * Converts this reflection object to its descriptor representation. - * @returns Descriptor - */ - public toJSON(): { [k: string]: any }; - - /** - * Called when this object is added to a parent. - * @param parent Parent added to - */ - public onAdd(parent: ReflectionObject): void; - - /** - * Called when this object is removed from a parent. - * @param parent Parent removed from - */ - public onRemove(parent: ReflectionObject): void; - - /** - * Resolves this objects type references. - * @returns `this` - */ - public resolve(): ReflectionObject; - - /** - * Resolves this objects editions features. - * @param edition The edition we're currently resolving for. - * @returns `this` - */ - public _resolveFeaturesRecursive(edition: string): ReflectionObject; - - /** - * Resolves child features from parent features - * @param edition The edition we're currently resolving for. - */ - public _resolveFeatures(edition: string): void; - - /** - * Infers features from legacy syntax that may have been specified differently. - * in older editions. - * @param edition The edition this proto is on, or undefined if pre-editions - * @returns The feature values to override - */ - public _inferLegacyProtoFeatures(edition: (string|undefined)): object; - - /** - * Gets an option value. - * @param name Option name - * @returns Option value or `undefined` if not set - */ - public getOption(name: string): any; - - /** - * Sets an option. - * @param name Option name - * @param value Option value - * @param [ifNotSet] Sets the option only if it isn't currently set - * @returns `this` - */ - public setOption(name: string, value: any, ifNotSet?: (boolean|undefined)): ReflectionObject; - - /** - * Sets a parsed option. - * @param name parsed Option name - * @param value Option value - * @param propName dot '.' delimited full path of property within the option to set. if undefined\empty, will add a new option with that value - * @returns `this` - */ - public setParsedOption(name: string, value: any, propName: string): ReflectionObject; - - /** - * Sets multiple options. - * @param options Options to set - * @param [ifNotSet] Sets an option only if it isn't currently set - * @returns `this` - */ - public setOptions(options: { [k: string]: any }, ifNotSet?: boolean): ReflectionObject; - - /** - * Converts this instance to its string representation. - * @returns Class name[, space, full name] - */ - public toString(): string; - - /** - * Converts the edition this object is pinned to for JSON format. - * @returns The edition string for JSON representation - */ - public _editionToJSON(): (string|undefined); -} - -/** Reflected oneof. */ -export class OneOf extends ReflectionObject { - - /** - * Constructs a new oneof instance. - * @param name Oneof name - * @param [fieldNames] Field names - * @param [options] Declared options - * @param [comment] Comment associated with this field - */ - constructor(name: string, fieldNames?: (string[]|{ [k: string]: any }), options?: { [k: string]: any }, comment?: string); - - /** Field names that belong to this oneof. */ - public oneof: string[]; - - /** Fields that belong to this oneof as an array for iteration. */ - public readonly fieldsArray: Field[]; - - /** Comment for this field. */ - public comment: (string|null); - - /** - * Constructs a oneof from a oneof descriptor. - * @param name Oneof name - * @param json Oneof descriptor - * @returns Created oneof - * @throws {TypeError} If arguments are invalid - */ - public static fromJSON(name: string, json: IOneOf): OneOf; - - /** - * Converts this oneof to a oneof descriptor. - * @param [toJSONOptions] JSON conversion options - * @returns Oneof descriptor - */ - public toJSON(toJSONOptions?: IToJSONOptions): IOneOf; - - /** - * Adds a field to this oneof and removes it from its current parent, if any. - * @param field Field to add - * @returns `this` - */ - public add(field: Field): OneOf; - - /** - * Removes a field from this oneof and puts it back to the oneof's parent. - * @param field Field to remove - * @returns `this` - */ - public remove(field: Field): OneOf; - - /** - * Determines whether this field corresponds to a synthetic oneof created for - * a proto3 optional field. No behavioral logic should depend on this, but it - * can be relevant for reflection. - */ - public readonly isProto3Optional: boolean; - - /** - * OneOf decorator (TypeScript). - * @param fieldNames Field names - * @returns Decorator function - */ - public static d(...fieldNames: string[]): OneOfDecorator; -} - -/** Oneof descriptor. */ -export interface IOneOf { - - /** Oneof field names */ - oneof: string[]; - - /** Oneof options */ - options?: { [k: string]: any }; -} - -/** - * Decorator function as returned by {@link OneOf.d} (TypeScript). - * @param prototype Target prototype - * @param oneofName OneOf name - */ -type OneOfDecorator = (prototype: object, oneofName: string) => void; - -/** - * Parses the given .proto source and returns an object with the parsed contents. - * @param source Source contents - * @param [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns Parser result - */ -export function parse(source: string, options?: IParseOptions): IParserResult; - -/** Result object returned from {@link parse}. */ -export interface IParserResult { - - /** Package name, if declared */ - package: (string|undefined); - - /** Imports, if any */ - imports: (string[]|undefined); - - /** Weak imports, if any */ - weakImports: (string[]|undefined); - - /** Populated root instance */ - root: Root; -} - -/** Options modifying the behavior of {@link parse}. */ -export interface IParseOptions { - - /** Keeps field casing instead of converting to camel case */ - keepCase?: boolean; - - /** Recognize double-slash comments in addition to doc-block comments. */ - alternateCommentMode?: boolean; - - /** Use trailing comment when both leading comment and trailing comment exist. */ - preferTrailingComment?: boolean; -} - -/** Options modifying the behavior of JSON serialization. */ -export interface IToJSONOptions { - - /** Serializes comments. */ - keepComments?: boolean; -} - -/** - * Parses the given .proto source and returns an object with the parsed contents. - * @param source Source contents - * @param root Root to populate - * @param [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns Parser result - */ -export function parse(source: string, root: Root, options?: IParseOptions): IParserResult; - -/** Wire format reader using `Uint8Array` if available, otherwise `Array`. */ -export class Reader { - - /** - * Constructs a new reader instance using the specified buffer. - * @param buffer Buffer to read from - */ - constructor(buffer: Uint8Array); - - /** Read buffer. */ - public buf: Uint8Array; - - /** Read buffer position. */ - public pos: number; - - /** Read buffer length. */ - public len: number; - - /** - * Creates a new reader using the specified buffer. - * @param buffer Buffer to read from - * @returns A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} - * @throws {Error} If `buffer` is not a valid buffer - */ - public static create(buffer: (Uint8Array|Buffer)): (Reader|BufferReader); - - /** - * Reads a varint as an unsigned 32 bit value. - * @returns Value read - */ - public uint32(): number; - - /** - * Reads a varint as a signed 32 bit value. - * @returns Value read - */ - public int32(): number; - - /** - * Reads a zig-zag encoded varint as a signed 32 bit value. - * @returns Value read - */ - public sint32(): number; - - /** - * Reads a varint as a signed 64 bit value. - * @returns Value read - */ - public int64(): Long; - - /** - * Reads a varint as an unsigned 64 bit value. - * @returns Value read - */ - public uint64(): Long; - - /** - * Reads a zig-zag encoded varint as a signed 64 bit value. - * @returns Value read - */ - public sint64(): Long; - - /** - * Reads a varint as a boolean. - * @returns Value read - */ - public bool(): boolean; - - /** - * Reads fixed 32 bits as an unsigned 32 bit integer. - * @returns Value read - */ - public fixed32(): number; - - /** - * Reads fixed 32 bits as a signed 32 bit integer. - * @returns Value read - */ - public sfixed32(): number; - - /** - * Reads fixed 64 bits. - * @returns Value read - */ - public fixed64(): Long; - - /** - * Reads zig-zag encoded fixed 64 bits. - * @returns Value read - */ - public sfixed64(): Long; - - /** - * Reads a float (32 bit) as a number. - * @returns Value read - */ - public float(): number; - - /** - * Reads a double (64 bit float) as a number. - * @returns Value read - */ - public double(): number; - - /** - * Reads a sequence of bytes preceeded by its length as a varint. - * @returns Value read - */ - public bytes(): Uint8Array; - - /** - * Reads a string preceeded by its byte length as a varint. - * @returns Value read - */ - public string(): string; - - /** - * Skips the specified number of bytes if specified, otherwise skips a varint. - * @param [length] Length if known, otherwise a varint is assumed - * @returns `this` - */ - public skip(length?: number): Reader; - - /** Recursion limit. */ - public static recursionLimit: number; - - /** - * Skips the next element of the specified wire type. - * @param wireType Wire type received - * @param [depth] Depth of recursion to control nested calls; 0 if omitted - * @returns `this` - */ - public skipType(wireType: number, depth?: number): Reader; -} - -/** Wire format reader using node buffers. */ -export class BufferReader extends Reader { - - /** - * Constructs a new buffer reader instance. - * @param buffer Buffer to read from - */ - constructor(buffer: Buffer); - - /** - * Reads a sequence of bytes preceeded by its length as a varint. - * @returns Value read - */ - public bytes(): Buffer; -} - -/** Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. */ -export class Root extends NamespaceBase { - - /** - * Constructs a new root namespace instance. - * @param [options] Top level options - */ - constructor(options?: { [k: string]: any }); - - /** Deferred extension fields. */ - public deferred: Field[]; - - /** Resolved file names of loaded files. */ - public files: string[]; - - /** - * Loads a namespace descriptor into a root namespace. - * @param json Namespace descriptor - * @param [root] Root namespace, defaults to create a new one if omitted - * @param [depth] Current nesting depth, defaults to `0` - * @returns Root namespace - */ - public static fromJSON(json: INamespace, root?: Root, depth?: number): Root; - - /** - * Resolves the path of an imported file, relative to the importing origin. - * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories. - * @param origin The file name of the importing file - * @param target The file name being imported - * @returns Resolved path to `target` or `null` to skip the file - */ - public resolvePath(origin: string, target: string): (string|null); - - /** - * Fetch content from file path or url - * This method exists so you can override it with your own logic. - * @param path File path or url - * @param callback Callback function - */ - public fetch(path: string, callback: FetchCallback): void; - - /** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. - * @param filename Names of one or multiple files to load - * @param options Parse options - * @param callback Callback function - */ - public load(filename: (string|string[]), options: IParseOptions, callback: LoadCallback): void; - - /** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. - * @param filename Names of one or multiple files to load - * @param callback Callback function - */ - public load(filename: (string|string[]), callback: LoadCallback): void; - - /** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise. - * @param filename Names of one or multiple files to load - * @param [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns Promise - */ - public load(filename: (string|string[]), options?: IParseOptions): Promise; - - /** - * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only). - * @param filename Names of one or multiple files to load - * @param [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns Root namespace - * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid - */ - public loadSync(filename: (string|string[]), options?: IParseOptions): Root; -} - -/** - * Named roots. - * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). - * Can also be used manually to make roots available across modules. - */ -export let roots: { [k: string]: Root }; - -/** Streaming RPC helpers. */ -export namespace rpc { - - /** - * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. - * - * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. - * @param error Error, if any - * @param [response] Response message - */ - type ServiceMethodCallback> = (error: (Error|null), response?: TRes) => void; - - /** - * A service method part of a {@link rpc.Service} as created by {@link Service.create}. - * @param request Request message or plain object - * @param [callback] Node-style callback called with the error, if any, and the response message - * @returns Promise if `callback` has been omitted, otherwise `undefined` - */ - type ServiceMethod, TRes extends Message> = (request: (TReq|Properties), callback?: rpc.ServiceMethodCallback) => Promise>; - - /** An RPC service as returned by {@link Service#create}. */ - class Service extends util.EventEmitter { - - /** - * Constructs a new RPC service instance. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** RPC implementation. Becomes `null` once the service is ended. */ - public rpcImpl: (RPCImpl|null); - - /** Whether requests are length-delimited. */ - public requestDelimited: boolean; - - /** Whether responses are length-delimited. */ - public responseDelimited: boolean; - - /** - * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. - * @param method Reflected or static method - * @param requestCtor Request constructor - * @param responseCtor Response constructor - * @param request Request message or plain object - * @param callback Service callback - */ - public rpcCall, TRes extends Message>(method: (Method|rpc.ServiceMethod), requestCtor: Constructor, responseCtor: Constructor, request: (TReq|Properties), callback: rpc.ServiceMethodCallback): void; - - /** - * Ends this service and emits the `end` event. - * @param [endedByRPC=false] Whether the service has been ended by the RPC implementation. - * @returns `this` - */ - public end(endedByRPC?: boolean): rpc.Service; - } -} - -/** - * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. - * @param method Reflected or static method being called - * @param requestData Request data - * @param callback Callback function - */ -type RPCImpl = (method: (Method|rpc.ServiceMethod, Message<{}>>), requestData: Uint8Array, callback: RPCImplCallback) => void; - -/** - * Node-style callback as used by {@link RPCImpl}. - * @param error Error, if any, otherwise `null` - * @param [response] Response data or `null` to signal end of stream, if there hasn't been an error - */ -type RPCImplCallback = (error: (Error|null), response?: (Uint8Array|null)) => void; - -/** Reflected service. */ -export class Service extends NamespaceBase { - - /** - * Constructs a new service instance. - * @param name Service name - * @param [options] Service options - * @throws {TypeError} If arguments are invalid - */ - constructor(name: string, options?: { [k: string]: any }); - - /** Service methods. */ - public methods: { [k: string]: Method }; - - /** - * Constructs a service from a service descriptor. - * @param name Service name - * @param json Service descriptor - * @param [depth] Current nesting depth, defaults to `0` - * @returns Created service - * @throws {TypeError} If arguments are invalid - */ - public static fromJSON(name: string, json: IService, depth?: number): Service; - - /** - * Converts this service to a service descriptor. - * @param [toJSONOptions] JSON conversion options - * @returns Service descriptor - */ - public toJSON(toJSONOptions?: IToJSONOptions): IService; - - /** Methods of this service as an array for iteration. */ - public readonly methodsArray: Method[]; - - /** - * Creates a runtime service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public create(rpcImpl: RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): rpc.Service; -} - -/** Service descriptor. */ -export interface IService extends INamespace { - - /** Method descriptors */ - methods: { [k: string]: IMethod }; -} - -/** - * Gets the next token and advances. - * @returns Next token or `null` on eof - */ -type TokenizerHandleNext = () => (string|null); - -/** - * Peeks for the next token. - * @returns Next token or `null` on eof - */ -type TokenizerHandlePeek = () => (string|null); - -/** - * Pushes a token back to the stack. - * @param token Token - */ -type TokenizerHandlePush = (token: string) => void; - -/** - * Skips the next token. - * @param expected Expected token - * @param [optional=false] If optional - * @returns Whether the token matched - * @throws {Error} If the token didn't match and is not optional - */ -type TokenizerHandleSkip = (expected: string, optional?: boolean) => boolean; - -/** - * Gets the comment on the previous line or, alternatively, the line comment on the specified line. - * @param [line] Line number - * @returns Comment text or `null` if none - */ -type TokenizerHandleCmnt = (line?: number) => (string|null); - -/** Handle object returned from {@link tokenize}. */ -export interface ITokenizerHandle { - - /** Gets the next token and advances (`null` on eof) */ - next: TokenizerHandleNext; - - /** Peeks for the next token (`null` on eof) */ - peek: TokenizerHandlePeek; - - /** Pushes a token back to the stack */ - push: TokenizerHandlePush; - - /** Skips a token, returns its presence and advances or, if non-optional and not present, throws */ - skip: TokenizerHandleSkip; - - /** Gets the comment on the previous line or the line comment on the specified line, if any */ - cmnt: TokenizerHandleCmnt; - - /** Current line number */ - line: number; -} - -/** - * Tokenizes the given .proto source and returns an object with useful utility functions. - * @param source Source contents - * @param alternateCommentMode Whether we should activate alternate comment parsing mode. - * @returns Tokenizer handle - */ -export function tokenize(source: string, alternateCommentMode: boolean): ITokenizerHandle; - -export namespace tokenize { - - /** - * Unescapes a string. - * @param str String to unescape - * @returns Unescaped string - */ - function unescape(str: string): string; -} - -/** Reflected message type. */ -export class Type extends NamespaceBase { - - /** - * Constructs a new reflected message type instance. - * @param name Message name - * @param [options] Declared options - */ - constructor(name: string, options?: { [k: string]: any }); - - /** Message fields. */ - public fields: { [k: string]: Field }; - - /** Oneofs declared within this namespace, if any. */ - public oneofs: { [k: string]: OneOf }; - - /** Extension ranges, if any. */ - public extensions: number[][]; - - /** Reserved ranges, if any. */ - public reserved: (number[]|string)[]; - - /** Message fields by id. */ - public readonly fieldsById: { [k: number]: Field }; - - /** Fields of this message as an array for iteration. */ - public readonly fieldsArray: Field[]; - - /** Oneofs of this message as an array for iteration. */ - public readonly oneofsArray: OneOf[]; - - /** - * The registered constructor, if any registered, otherwise a generic constructor. - * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor. - */ - public ctor: Constructor<{}>; - - /** - * Generates a constructor function for the specified type. - * @param mtype Message type - * @returns Codegen instance - */ - public static generateConstructor(mtype: Type): Codegen; - - /** - * Creates a message type from a message type descriptor. - * @param name Message name - * @param json Message type descriptor - * @param [depth] Current nesting depth, defaults to `0` - * @returns Created message type - */ - public static fromJSON(name: string, json: IType, depth?: number): Type; - - /** - * Converts this message type to a message type descriptor. - * @param [toJSONOptions] JSON conversion options - * @returns Message type descriptor - */ - public toJSON(toJSONOptions?: IToJSONOptions): IType; - - /** - * Adds a nested object to this type. - * @param object Nested object to add - * @returns `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id - */ - public add(object: ReflectionObject): Type; - - /** - * Removes a nested object from this type. - * @param object Nested object to remove - * @returns `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `object` is not a member of this type - */ - public remove(object: ReflectionObject): Type; - - /** - * Tests if the specified id is reserved. - * @param id Id to test - * @returns `true` if reserved, otherwise `false` - */ - public isReservedId(id: number): boolean; - - /** - * Tests if the specified name is reserved. - * @param name Name to test - * @returns `true` if reserved, otherwise `false` - */ - public isReservedName(name: string): boolean; - - /** - * Creates a new message of this type using the specified properties. - * @param [properties] Properties to set - * @returns Message instance - */ - public create(properties?: { [k: string]: any }): Message<{}>; - - /** - * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}. - * @returns `this` - */ - public setup(): Type; - - /** - * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages. - * @param message Message instance or plain object - * @param [writer] Writer to encode to - * @returns writer - */ - public encode(message: (Message<{}>|{ [k: string]: any }), writer?: Writer): Writer; - - /** - * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages. - * @param message Message instance or plain object - * @param [writer] Writer to encode to - * @returns writer - */ - public encodeDelimited(message: (Message<{}>|{ [k: string]: any }), writer?: Writer): Writer; - - /** - * Decodes a message of this type. - * @param reader Reader or buffer to decode from - * @param [length] Length of the message, if known beforehand - * @param [end] Expected group end tag, if decoding a group - * @param [depth] Current nesting depth - * @returns Decoded message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {util.ProtocolError<{}>} If required fields are missing - */ - public decode(reader: (Reader|Uint8Array), length?: number, end?: number, depth?: number): Message<{}>; - - /** - * Decodes a message of this type preceeded by its byte length as a varint. - * @param reader Reader or buffer to decode from - * @returns Decoded message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {util.ProtocolError} If required fields are missing - */ - public decodeDelimited(reader: (Reader|Uint8Array)): Message<{}>; - - /** - * Verifies that field values are valid and that required fields are present. - * @param message Plain object to verify - * @param [depth] Current nesting depth - * @returns `null` if valid, otherwise the reason why it is not - */ - public verify(message: { [k: string]: any }, depth?: number): (null|string); - - /** - * Creates a new message of this type from a plain object. Also converts values to their respective internal types. - * @param object Plain object to convert - * @param [depth] Current nesting depth - * @returns Message instance - */ - public fromObject(object: { [k: string]: any }, depth?: number): Message<{}>; - - /** - * Creates a plain object from a message of this type. Also converts values to other types if specified. - * @param message Message instance - * @param [options] Conversion options - * @returns Plain object - */ - public toObject(message: Message<{}>, options?: IConversionOptions): { [k: string]: any }; - - /** - * Type decorator (TypeScript). - * @param [typeName] Type name, defaults to the constructor's name - * @returns Decorator function - */ - public static d>(typeName?: string): TypeDecorator; -} - -/** Message type descriptor. */ -export interface IType extends INamespace { - - /** Oneof descriptors */ - oneofs?: { [k: string]: IOneOf }; - - /** Field descriptors */ - fields: { [k: string]: IField }; - - /** Extension ranges */ - extensions?: number[][]; - - /** Reserved ranges */ - reserved?: (number[]|string)[]; - - /** Whether a legacy group or not */ - group?: boolean; -} - -/** Conversion options as used by {@link Type#toObject} and {@link Message.toObject}. */ -export interface IConversionOptions { - - /** - * Long conversion type. - * Valid values are `BigInt`, `String` and `Number` (the global types). - * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library. - */ - longs?: Function; - - /** - * Enum value conversion type. - * Only valid value is `String` (the global type). - * Defaults to copy the present value, which is the numeric id. - */ - enums?: Function; - - /** - * Bytes value conversion type. - * Valid values are `Array` and (a base64 encoded) `String` (the global types). - * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser. - */ - bytes?: Function; - - /** Also sets default values on the resulting object */ - defaults?: boolean; - - /** Sets empty arrays for missing repeated fields even if `defaults=false` */ - arrays?: boolean; - - /** Sets empty objects for missing map fields even if `defaults=false` */ - objects?: boolean; - - /** Includes virtual oneof properties set to the present field's name, if any */ - oneofs?: boolean; - - /** Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings */ - json?: boolean; -} - -/** - * Decorator function as returned by {@link Type.d} (TypeScript). - * @param target Target constructor - */ -type TypeDecorator> = (target: Constructor) => void; - -/** Common type constants. */ -export namespace types { - - /** Basic type wire types. */ - const basic: { - "double": number, - "float": number, - "int32": number, - "uint32": number, - "sint32": number, - "fixed32": number, - "sfixed32": number, - "int64": number, - "uint64": number, - "sint64": number, - "fixed64": number, - "sfixed64": number, - "bool": number, - "string": number, - "bytes": number - }; - - /** Basic type defaults. */ - const defaults: { - "double": number, - "float": number, - "int32": number, - "uint32": number, - "sint32": number, - "fixed32": number, - "sfixed32": number, - "int64": number, - "uint64": number, - "sint64": number, - "fixed64": number, - "sfixed64": number, - "bool": boolean, - "string": string, - "bytes": number[], - "message": null - }; - - /** Basic long type wire types. */ - const long: { - "int64": number, - "uint64": number, - "sint64": number, - "fixed64": number, - "sfixed64": number - }; - - /** Allowed types for map keys with their associated wire type. */ - const mapKey: { - "int32": number, - "uint32": number, - "sint32": number, - "fixed32": number, - "sfixed32": number, - "int64": number, - "uint64": number, - "sint64": number, - "fixed64": number, - "sfixed64": number, - "bool": number, - "string": number - }; - - /** Allowed types for packed repeated fields with their associated wire type. */ - const packed: { - "double": number, - "float": number, - "int32": number, - "uint32": number, - "sint32": number, - "fixed32": number, - "sfixed32": number, - "int64": number, - "uint64": number, - "sint64": number, - "fixed64": number, - "sfixed64": number, - "bool": number - }; -} - -/** Constructor type. */ -export interface Constructor extends Function { - new(...params: any[]): T; prototype: T; -} - -/** Properties type. */ -type Properties = { [P in keyof T]?: T[P] }; - -/** - * Any compatible Buffer instance. - * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. - */ -export interface Buffer extends Uint8Array { -} - -/** - * Any compatible Long instance. - * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. - */ -export interface Long { - - /** Low bits */ - low: number; - - /** High bits */ - high: number; - - /** Whether unsigned or not */ - unsigned: boolean; -} - -/** - * A OneOf getter as returned by {@link util.oneOfGetter}. - * @returns Set field name, if any - */ -type OneOfGetter = () => (string|undefined); - -/** - * A OneOf setter as returned by {@link util.oneOfSetter}. - * @param value Field name - */ -type OneOfSetter = (value: (string|undefined)) => void; - -/** Various utility functions. */ -export namespace util { - - /** Helper class for working with the low and high bits of a 64 bit value. */ - class LongBits { - - /** - * Constructs new long bits. - * @param lo Low 32 bits, unsigned - * @param hi High 32 bits, unsigned - */ - constructor(lo: number, hi: number); - - /** Low bits. */ - public lo: number; - - /** High bits. */ - public hi: number; - - /** Zero bits. */ - public static zero: util.LongBits; - - /** Zero hash. */ - public static zeroHash: string; - - /** - * Constructs new long bits from the specified number. - * @param value Value - * @returns Instance - */ - public static fromNumber(value: number): util.LongBits; - - /** - * Constructs new long bits from a number, long or string. - * @param value Value - * @returns Instance - */ - public static from(value: (Long|number|string)): util.LongBits; - - /** - * Converts this long bits to a possibly unsafe JavaScript number. - * @param [unsigned=false] Whether unsigned or not - * @returns Possibly unsafe number - */ - public toNumber(unsigned?: boolean): number; - - /** - * Converts this long bits to a long. - * @param [unsigned=false] Whether unsigned or not - * @returns Long - */ - public toLong(unsigned?: boolean): Long; - - /** - * Constructs new long bits from the specified 8 characters long hash. - * @param hash Hash - * @returns Bits - */ - public static fromHash(hash: string): util.LongBits; - - /** - * Converts this long bits to a 8 characters long hash. - * @returns Hash - */ - public toHash(): string; - - /** - * Zig-zag encodes this long bits. - * @returns `this` - */ - public zzEncode(): util.LongBits; - - /** - * Zig-zag decodes this long bits. - * @returns `this` - */ - public zzDecode(): util.LongBits; - - /** - * Calculates the length of this longbits when encoded as a varint. - * @returns Length - */ - public length(): number; - } - - /** - * Tests if the specified key can affect object prototypes. - * @param key Key to test - * @returns `true` if the key is unsafe - */ - function isUnsafeProperty(key: string): boolean; - - /** Whether running within node or not. */ - let isNode: boolean; - - /** Global object reference. */ - let global: object; - - /** An immuable empty array. */ - const emptyArray: any[]; - - /** An immutable empty object. */ - const emptyObject: object; - - /** - * Tests if the specified value is an integer. - * @param value Value to test - * @returns `true` if the value is an integer - */ - function isInteger(value: any): boolean; - - /** - * Tests if the specified value is a string. - * @param value Value to test - * @returns `true` if the value is a string - */ - function isString(value: any): boolean; - - /** - * Tests if the specified value is a non-null object. - * @param value Value to test - * @returns `true` if the value is a non-null object - */ - function isObject(value: any): boolean; - - /** - * Checks if a property on a message is considered to be present. - * This is an alias of {@link util.isSet}. - * @param obj Plain object or message instance - * @param prop Property name - * @returns `true` if considered to be present, otherwise `false` - */ - function isset(obj: object, prop: string): boolean; - - /** - * Checks if a property on a message is considered to be present. - * @param obj Plain object or message instance - * @param prop Property name - * @returns `true` if considered to be present, otherwise `false` - */ - function isSet(obj: object, prop: string): boolean; - - /** Node's Buffer class if available. */ - let Buffer: Constructor; - - /** - * Creates a new buffer of whatever type supported by the environment. - * @param [sizeOrArray=0] Buffer size or number array - * @returns Buffer - */ - function newBuffer(sizeOrArray?: (number|number[])): (Uint8Array|Buffer); - - /** Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. */ - let Array: Constructor; - - /** Long.js's Long class if available. */ - let Long: Constructor; - - /** Regular expression used to verify 2 bit (`bool`) map keys. */ - const key2Re: RegExp; - - /** Regular expression used to verify 32 bit (`int32` etc.) map keys. */ - const key32Re: RegExp; - - /** Regular expression used to verify 64 bit (`int64` etc.) map keys. */ - const key64Re: RegExp; - - /** - * Converts a number or long to an 8 characters long hash string. - * @param value Value to convert - * @returns Hash - */ - function longToHash(value: (Long|number)): string; - - /** - * Converts an 8 characters long hash string to a long or number. - * @param hash Hash - * @param [unsigned=false] Whether unsigned or not - * @returns Original value - */ - function longFromHash(hash: string, unsigned?: boolean): (Long|number); - - /** - * Merges the properties of the source object into the destination object. - * @param dst Destination object - * @param src Source objects, optionally followed by an `ifNotSet` flag - * @returns Destination object - */ - function merge(dst: { [k: string]: any }, ...src: any[]): { [k: string]: any }; - - /** Schema declaration nesting limit. */ - let nestingLimit: number; - - /** Recursion limit. */ - let recursionLimit: number; - - /** - * Makes a property safe for assignment as an own property. - * @param obj Object - * @param key Property key - */ - function makeProp(obj: { [k: string]: any }, key: string): void; - - /** - * Converts the first character of a string to lower case. - * @param str String to convert - * @returns Converted string - */ - function lcFirst(str: string): string; - - /** - * Creates a custom error constructor. - * @param name Error name - * @returns Custom error constructor - */ - function newError(name: string): Constructor; - - /** Error subclass indicating a protocol specifc error. */ - class ProtocolError> extends Error { - - /** - * Constructs a new protocol error. - * @param message Error message - * @param [properties] Additional properties - */ - constructor(message: string, properties?: { [k: string]: any }); - - /** So far decoded message instance. */ - public instance: Message; - } - - /** - * Builds a getter for a oneof's present field name. - * @param fieldNames Field names - * @returns Unbound getter - */ - function oneOfGetter(fieldNames: string[]): OneOfGetter; - - /** - * Builds a setter for a oneof's present field name. - * @param fieldNames Field names - * @returns Unbound setter - */ - function oneOfSetter(fieldNames: string[]): OneOfSetter; - - /** - * Default conversion options used for {@link Message#toJSON} implementations. - * - * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: - * - * - Longs become strings - * - Enums become string keys - * - Bytes become base64 encoded strings - * - (Sub-)Messages become plain objects - * - Maps become plain objects with all string keys - * - Repeated fields become arrays - * - NaN and Infinity for float and double fields become strings - * - * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json - */ - let toJSONOptions: IConversionOptions; - - /** Node's fs module if available. */ - let fs: { [k: string]: any }; - - /** - * Checks a recursion depth. - * @param depth Depth of recursion - * @returns Depth of recursion - * @throws {Error} If depth exceeds util.recursionLimit - */ - function checkDepth(depth: (number|undefined)): number; - - /** - * Converts an object's values to an array. - * @param object Object to convert - * @returns Converted array - */ - function toArray(object: { [k: string]: any }): any[]; - - /** - * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values. - * @param array Array to convert - * @returns Converted object - */ - function toObject(array: any[]): { [k: string]: any }; - - /** - * Tests whether the specified name is a reserved word in JS. - * @param name Name to test - * @returns `true` if reserved, otherwise `false` - */ - function isReserved(name: string): boolean; - - /** - * Returns a safe property accessor for the specified property name. - * @param prop Property name - * @returns Safe accessor - */ - function safeProp(prop: string): string; - - /** - * Converts the first character of a string to upper case. - * @param str String to convert - * @returns Converted string - */ - function ucFirst(str: string): string; - - /** - * Converts a string to camel case. - * @param str String to convert - * @returns Converted string - */ - function camelCase(str: string): string; - - /** - * Compares reflected fields by id. - * @param a First field - * @param b Second field - * @returns Comparison value - */ - function compareFieldsById(a: Field, b: Field): number; - - /** - * Decorator helper for types (TypeScript). - * @param ctor Constructor function - * @param [typeName] Type name, defaults to the constructor's name - * @returns Reflected type - */ - function decorateType>(ctor: Constructor, typeName?: string): Type; - - /** - * Decorator helper for enums (TypeScript). - * @param object Enum object - * @returns Reflected enum - */ - function decorateEnum(object: object): Enum; - - /** - * Sets the value of a property by property path. If a value already exists, it is turned to an array - * @param dst Destination object - * @param path dot '.' delimited path of the property to set - * @param value the value to set - * @param [ifNotSet] Sets the option only if it isn't currently set - * @returns Destination object - */ - function setProperty(dst: { [k: string]: any }, path: string, value: object, ifNotSet?: (boolean|undefined)): { [k: string]: any }; - - /** Decorator root (TypeScript). */ - let decorateRoot: Root; - - /** - * Returns a promise from a node-style callback function. - * @param fn Function to call - * @param ctx Function context - * @param params Function arguments - * @returns Promisified function - */ - function asPromise(fn: asPromiseCallback, ctx: any, ...params: any[]): Promise; - - /** A minimal base64 implementation for number arrays. */ - namespace base64 { - - /** - * Calculates the byte length of a base64 encoded string. - * @param string Base64 encoded string - * @returns Byte length - */ - function length(string: string): number; - - /** - * Encodes a buffer to a base64 encoded string. - * @param buffer Source buffer - * @param start Source start - * @param end Source end - * @returns Base64 encoded string - */ - function encode(buffer: Uint8Array, start: number, end: number): string; - - /** - * Decodes a base64 encoded string to a buffer. - * @param string Source string - * @param buffer Destination buffer - * @param offset Destination offset - * @returns Number of bytes written - * @throws {Error} If encoding is invalid - */ - function decode(string: string, buffer: Uint8Array, offset: number): number; - - /** - * Tests if the specified string appears to be base64 encoded. - * @param string String to test - * @returns `true` if probably base64 encoded, otherwise false - */ - function test(string: string): boolean; - } - - /** - * Begins generating a function. - * @param functionParams Function parameter names - * @param [functionName] Function name if not anonymous - * @returns Appender that appends code to the function's body - */ - function codegen(functionParams: string[], functionName?: string): Codegen; - - namespace codegen { - - /** When set to `true`, codegen will log generated code to console. Useful for debugging. */ - let verbose: boolean; - } - - /** - * Begins generating a function. - * @param [functionName] Function name if not anonymous - * @returns Appender that appends code to the function's body - */ - function codegen(functionName?: string): Codegen; - - /** A minimal event emitter. */ - class EventEmitter { - - /** Constructs a new event emitter instance. */ - constructor(); - - /** - * Registers an event listener. - * @param evt Event name - * @param fn Listener - * @param [ctx] Listener context - * @returns `this` - */ - public on(evt: string, fn: EventEmitterListener, ctx?: any): this; - - /** - * Removes an event listener or any matching listeners if arguments are omitted. - * @param [evt] Event name. Removes all listeners if omitted. - * @param [fn] Listener to remove. Removes all listeners of `evt` if omitted. - * @returns `this` - */ - public off(evt?: string, fn?: EventEmitterListener): this; - - /** - * Emits an event by calling its listeners with the specified arguments. - * @param evt Event name - * @param args Arguments - * @returns `this` - */ - public emit(evt: string, ...args: any[]): this; - } - - /** Reads / writes floats / doubles from / to buffers. */ - namespace float { - - /** - * Writes a 32 bit float to a buffer using little endian byte order. - * @param val Value to write - * @param buf Target buffer - * @param pos Target buffer offset - */ - function writeFloatLE(val: number, buf: Uint8Array, pos: number): void; - - /** - * Writes a 32 bit float to a buffer using big endian byte order. - * @param val Value to write - * @param buf Target buffer - * @param pos Target buffer offset - */ - function writeFloatBE(val: number, buf: Uint8Array, pos: number): void; - - /** - * Reads a 32 bit float from a buffer using little endian byte order. - * @param buf Source buffer - * @param pos Source buffer offset - * @returns Value read - */ - function readFloatLE(buf: Uint8Array, pos: number): number; - - /** - * Reads a 32 bit float from a buffer using big endian byte order. - * @param buf Source buffer - * @param pos Source buffer offset - * @returns Value read - */ - function readFloatBE(buf: Uint8Array, pos: number): number; - - /** - * Writes a 64 bit double to a buffer using little endian byte order. - * @param val Value to write - * @param buf Target buffer - * @param pos Target buffer offset - */ - function writeDoubleLE(val: number, buf: Uint8Array, pos: number): void; - - /** - * Writes a 64 bit double to a buffer using big endian byte order. - * @param val Value to write - * @param buf Target buffer - * @param pos Target buffer offset - */ - function writeDoubleBE(val: number, buf: Uint8Array, pos: number): void; - - /** - * Reads a 64 bit double from a buffer using little endian byte order. - * @param buf Source buffer - * @param pos Source buffer offset - * @returns Value read - */ - function readDoubleLE(buf: Uint8Array, pos: number): number; - - /** - * Reads a 64 bit double from a buffer using big endian byte order. - * @param buf Source buffer - * @param pos Source buffer offset - * @returns Value read - */ - function readDoubleBE(buf: Uint8Array, pos: number): number; - } - - /** - * Fetches the contents of a file. - * @param filename File path or url - * @param options Fetch options - * @param callback Callback function - */ - function fetch(filename: string, options: IFetchOptions, callback: FetchCallback): void; - - /** - * Fetches the contents of a file. - * @param path File path or url - * @param callback Callback function - */ - function fetch(path: string, callback: FetchCallback): void; - - /** - * Fetches the contents of a file. - * @param path File path or url - * @param [options] Fetch options - * @returns Promise - */ - function fetch(path: string, options?: IFetchOptions): Promise<(string|Uint8Array)>; - - /** - * Requires a module only if available. - * @param moduleName Module to require - * @returns Required module if available and not empty, otherwise `null` - * @deprecated Legacy optional require helper. Will be removed in a future release. - */ - function inquire(moduleName: string): object; - - /** A minimal path module to resolve Unix, Windows and URL paths alike. */ - namespace path { - - /** - * Tests if the specified path is absolute. - * @param path Path to test - * @returns `true` if path is absolute - */ - function isAbsolute(path: string): boolean; - - /** - * Normalizes the specified path. - * @param path Path to normalize - * @returns Normalized path - */ - function normalize(path: string): string; - - /** - * Resolves the specified include path against the specified origin path. - * @param originPath Path to the origin file - * @param includePath Include path relative to origin path - * @param [alreadyNormalized=false] `true` if both paths are already known to be normalized - * @returns Path to the include file - */ - function resolve(originPath: string, includePath: string, alreadyNormalized?: boolean): string; - } - - /** - * A general purpose buffer pool. - * @param alloc Allocator - * @param slice Slicer - * @param [size=8192] Slab size - * @returns Pooled allocator - */ - function pool(alloc: PoolAllocator, slice: PoolSlicer, size?: number): PoolAllocator; - - /** A minimal UTF8 implementation for number arrays. */ - namespace utf8 { - - /** - * Calculates the UTF8 byte length of a string. - * @param string String - * @returns Byte length - */ - function length(string: string): number; - - /** - * Reads UTF8 bytes as a string. - * @param buffer Source buffer - * @param start Source start - * @param end Source end - * @returns String read - */ - function read(buffer: Uint8Array, start: number, end: number): string; - - /** - * Writes a string as UTF8 bytes. - * @param string Source string - * @param buffer Destination buffer - * @param offset Destination offset - * @returns Bytes written - */ - function write(string: string, buffer: Uint8Array, offset: number): number; - } -} - -/** - * Generates a verifier specific to the specified message type. - * @param mtype Message type - * @returns Codegen instance - */ -export function verifier(mtype: Type): Codegen; - -/** Wrappers for common types. */ -export const wrappers: { [k: string]: IWrapper }; - -/** - * From object converter part of an {@link IWrapper}. - * @param object Plain object - * @returns Message instance - */ -type WrapperFromObjectConverter = (this: Type, object: { [k: string]: any }) => Message<{}>; - -/** - * To object converter part of an {@link IWrapper}. - * @param message Message instance - * @param [options] Conversion options - * @returns Plain object - */ -type WrapperToObjectConverter = (this: Type, message: Message<{}>, options?: IConversionOptions) => { [k: string]: any }; - -/** Common type wrapper part of {@link wrappers}. */ -export interface IWrapper { - - /** From object converter */ - fromObject?: WrapperFromObjectConverter; - - /** To object converter */ - toObject?: WrapperToObjectConverter; -} - -/** Wire format writer using `Uint8Array` if available, otherwise `Array`. */ -export class Writer { - - /** Constructs a new writer instance. */ - constructor(); - - /** Current length. */ - public len: number; - - /** Operations head. */ - public head: object; - - /** Operations tail */ - public tail: object; - - /** Linked forked states. */ - public states: (object|null); - - /** - * Creates a new writer. - * @returns A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} - */ - public static create(): (BufferWriter|Writer); - - /** - * Allocates a buffer of the specified size. - * @param size Buffer size - * @returns Buffer - */ - public static alloc(size: number): Uint8Array; - - /** - * Writes an unsigned 32 bit value as a varint. - * @param value Value to write - * @returns `this` - */ - public uint32(value: number): Writer; - - /** - * Writes a signed 32 bit value as a varint. - * @param value Value to write - * @returns `this` - */ - public int32(value: number): Writer; - - /** - * Writes a 32 bit value as a varint, zig-zag encoded. - * @param value Value to write - * @returns `this` - */ - public sint32(value: number): Writer; - - /** - * Writes an unsigned 64 bit value as a varint. - * @param value Value to write - * @returns `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ - public uint64(value: (Long|number|string)): Writer; - - /** - * Writes a signed 64 bit value as a varint. - * @param value Value to write - * @returns `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ - public int64(value: (Long|number|string)): Writer; - - /** - * Writes a signed 64 bit value as a varint, zig-zag encoded. - * @param value Value to write - * @returns `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ - public sint64(value: (Long|number|string)): Writer; - - /** - * Writes a boolish value as a varint. - * @param value Value to write - * @returns `this` - */ - public bool(value: boolean): Writer; - - /** - * Writes an unsigned 32 bit value as fixed 32 bits. - * @param value Value to write - * @returns `this` - */ - public fixed32(value: number): Writer; - - /** - * Writes a signed 32 bit value as fixed 32 bits. - * @param value Value to write - * @returns `this` - */ - public sfixed32(value: number): Writer; - - /** - * Writes an unsigned 64 bit value as fixed 64 bits. - * @param value Value to write - * @returns `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ - public fixed64(value: (Long|number|string)): Writer; - - /** - * Writes a signed 64 bit value as fixed 64 bits. - * @param value Value to write - * @returns `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ - public sfixed64(value: (Long|number|string)): Writer; - - /** - * Writes a float (32 bit). - * @param value Value to write - * @returns `this` - */ - public float(value: number): Writer; - - /** - * Writes a double (64 bit float). - * @param value Value to write - * @returns `this` - */ - public double(value: number): Writer; - - /** - * Writes a sequence of bytes. - * @param value Buffer or base64 encoded string to write - * @returns `this` - */ - public bytes(value: (Uint8Array|string)): Writer; - - /** - * Writes a string. - * @param value Value to write - * @returns `this` - */ - public string(value: string): Writer; - - /** - * Forks this writer's state by pushing it to a stack. - * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. - * @returns `this` - */ - public fork(): Writer; - - /** - * Resets this instance to the last state. - * @returns `this` - */ - public reset(): Writer; - - /** - * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. - * @returns `this` - */ - public ldelim(): Writer; - - /** - * Finishes the write operation. - * @returns Finished buffer - */ - public finish(): Uint8Array; -} - -/** Wire format writer using node buffers. */ -export class BufferWriter extends Writer { - - /** Constructs a new buffer writer instance. */ - constructor(); - - /** - * Allocates a buffer of the specified size. - * @param size Buffer size - * @returns Buffer - */ - public static alloc(size: number): Buffer; - - /** - * Finishes the write operation. - * @returns Finished buffer - */ - public finish(): Buffer; -} - -/** - * Callback as used by {@link util.asPromise}. - * @param error Error, if any - * @param params Additional arguments - */ -type asPromiseCallback = (error: (Error|null), ...params: any[]) => void; - -/** - * Appends code to the function's body or finishes generation. - * @param [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any - * @param [formatParams] Format parameters - * @returns Itself or the generated function if finished - * @throws {Error} If format parameter counts do not match - */ -type Codegen = (formatStringOrScope?: (string|{ [k: string]: any }), ...formatParams: any[]) => (Codegen|Function); - -/** - * Event listener as used by {@link util.EventEmitter}. - * @param args Arguments - */ -type EventEmitterListener = (...args: any[]) => void; - -/** - * Node-style callback as used by {@link util.fetch}. - * @param error Error, if any, otherwise `null` - * @param [contents] File contents, if there hasn't been an error - */ -type FetchCallback = (error: Error, contents?: string) => void; - -/** Options as used by {@link util.fetch}. */ -export interface IFetchOptions { - - /** Whether expecting a binary response */ - binary?: boolean; - - /** If `true`, forces the use of XMLHttpRequest */ - xhr?: boolean; -} - -/** - * An allocator as used by {@link util.pool}. - * @param size Buffer size - * @returns Buffer - */ -type PoolAllocator = (size: number) => Uint8Array; - -/** - * A slicer as used by {@link util.pool}. - * @param start Start offset - * @param end End offset - * @returns Buffer slice - */ -type PoolSlicer = (this: Uint8Array, start: number, end: number) => Uint8Array; diff --git a/node_modules/protobufjs/index.js b/node_modules/protobufjs/index.js deleted file mode 100644 index 042042a..0000000 --- a/node_modules/protobufjs/index.js +++ /dev/null @@ -1,4 +0,0 @@ -// full library entry point. - -"use strict"; -module.exports = require("./src/index"); diff --git a/node_modules/protobufjs/light.d.ts b/node_modules/protobufjs/light.d.ts deleted file mode 100644 index d83e7f9..0000000 --- a/node_modules/protobufjs/light.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export as namespace protobuf; -export * from "./index"; diff --git a/node_modules/protobufjs/light.js b/node_modules/protobufjs/light.js deleted file mode 100644 index 1209e64..0000000 --- a/node_modules/protobufjs/light.js +++ /dev/null @@ -1,4 +0,0 @@ -// light library entry point. - -"use strict"; -module.exports = require("./src/index-light"); \ No newline at end of file diff --git a/node_modules/protobufjs/minimal.d.ts b/node_modules/protobufjs/minimal.d.ts deleted file mode 100644 index d83e7f9..0000000 --- a/node_modules/protobufjs/minimal.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export as namespace protobuf; -export * from "./index"; diff --git a/node_modules/protobufjs/minimal.js b/node_modules/protobufjs/minimal.js deleted file mode 100644 index 1f35ec9..0000000 --- a/node_modules/protobufjs/minimal.js +++ /dev/null @@ -1,4 +0,0 @@ -// minimal library entry point. - -"use strict"; -module.exports = require("./src/index-minimal"); diff --git a/node_modules/protobufjs/package.json b/node_modules/protobufjs/package.json deleted file mode 100644 index c4342c7..0000000 --- a/node_modules/protobufjs/package.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "name": "protobufjs", - "version": "7.6.1", - "versionScheme": "~", - "description": "Protocol Buffers for JavaScript (& TypeScript).", - "author": "Daniel Wirtz ", - "license": "BSD-3-Clause", - "repository": "protobufjs/protobuf.js", - "bugs": "https://github.com/protobufjs/protobuf.js/issues", - "homepage": "https://protobufjs.github.io/protobuf.js/", - "engines": { - "node": ">=12.0.0" - }, - "eslintConfig": { - "env": { - "es6": true - }, - "parserOptions": { - "ecmaVersion": 6 - } - }, - "keywords": [ - "protobuf", - "protocol-buffers", - "serialization", - "typescript" - ], - "main": "index.js", - "types": "index.d.ts", - "browser": { - "fs": false - }, - "publishConfig": { - "tag": "latest-7" - }, - "scripts": { - "bench": "node bench", - "build": "npm run build:bundle && npm run build:types", - "build:bundle": "gulp --gulpfile scripts/gulpfile.js", - "build:types": "node cli/bin/pbts --main --global protobuf --out index.d.ts src/ lib/aspromise/index.js lib/base64/index.js lib/codegen/index.js lib/eventemitter/index.js lib/float/index.js lib/fetch/index.js lib/inquire/index.js lib/path/index.js lib/pool/index.js lib/utf8/index.js", - "changelog": "node scripts/changelog -w", - "coverage": "npm run coverage:test && npm run coverage:report", - "coverage:test": "nyc --silent tape -r ./lib/tape-adapter tests/*.js tests/node/*.js", - "coverage:report": "nyc report --reporter=lcov --reporter=text", - "docs": "jsdoc -c config/jsdoc.json -R README.md --verbose --pedantic", - "lint": "npm run lint:sources && npm run lint:types", - "lint:sources": "eslint \"**/*.js\" -c config/eslint.json", - "lint:types": "tslint \"**/*.d.ts\" -e \"**/node_modules/**\" -t stylish -c config/tslint.json", - "pages": "node scripts/pages", - "prepublish": "cd cli && npm install && cd .. && npm run build", - "prepublishOnly": "cd cli && npm install && cd .. && npm run build", - "postinstall": "node scripts/postinstall", - "prof": "node bench/prof", - "test": "npm run test:sources && npm run test:types", - "test:sources": "tape -r ./lib/tape-adapter tests/*.js tests/node/*.js", - "test:types": "tsc tests/comp_typescript.ts --lib es2015 --esModuleInterop --strictNullChecks --experimentalDecorators --emitDecoratorMetadata && tsc tests/data/test.js.ts --lib es2015 --esModuleInterop --noEmit --strictNullChecks && tsc tests/data/*.ts --lib es2015 --esModuleInterop --noEmit --strictNullChecks", - "make": "npm run lint:sources && npm run build && npm run lint:types && node ./scripts/gentests.js && npm test" - }, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.5", - "@protobufjs/eventemitter": "^1.1.1", - "@protobufjs/fetch": "^1.1.1", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.2", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.1", - "@types/node": ">=13.7.0", - "long": "^5.3.2" - }, - "devDependencies": { - "benchmark": "^2.1.4", - "browserify": "^17.0.0", - "browserify-wrap": "^1.0.2", - "bundle-collapser": "^1.3.0", - "chalk": "^4.0.0", - "escodegen": "^1.13.0", - "eslint": "^8.15.0", - "espree": "^9.0.0", - "estraverse": "^5.1.0", - "gh-pages": "^4.0.0", - "git-raw-commits": "^2.0.3", - "git-semver-tags": "^4.0.0", - "google-protobuf": "^3.11.3", - "gulp": "^4.0.2", - "gulp-header": "^2.0.9", - "gulp-if": "^3.0.0", - "gulp-sourcemaps": "^3.0.0", - "gulp-uglify": "^3.0.2", - "jaguarjs-jsdoc": "github:dcodeIO/jaguarjs-jsdoc", - "jsdoc": "^4.0.0", - "minimist": "^1.2.0", - "nyc": "^15.0.0", - "reflect-metadata": "^0.1.13", - "tape": "^5.0.0", - "tslint": "^6.0.0", - "typescript": "^3.7.5", - "uglify-js": "^3.7.7", - "vinyl-buffer": "^1.0.1", - "vinyl-fs": "^3.0.3", - "vinyl-source-stream": "^2.0.0" - }, - "files": [ - "index.js", - "index.d.ts", - "light.d.ts", - "light.js", - "minimal.d.ts", - "minimal.js", - "package-lock.json", - "tsconfig.json", - "scripts/postinstall.js", - "dist/**", - "ext/**", - "google/**", - "src/**" - ] -} diff --git a/node_modules/protobufjs/scripts/postinstall.js b/node_modules/protobufjs/scripts/postinstall.js deleted file mode 100644 index bf4ff45..0000000 --- a/node_modules/protobufjs/scripts/postinstall.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -var path = require("path"), - fs = require("fs"), - pkg = require(path.join(__dirname, "..", "package.json")); - -// check version scheme used by dependents -if (!pkg.versionScheme) - return; - -var warn = process.stderr.isTTY - ? "\x1b[30m\x1b[43mWARN\x1b[0m \x1b[35m" + path.basename(process.argv[1], ".js") + "\x1b[0m" - : "WARN " + path.basename(process.argv[1], ".js"); - -var basePkg; -try { - basePkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "..", "package.json"))); -} catch (e) { - return; -} - -[ - "dependencies", - "devDependencies", - "optionalDependencies", - "peerDependencies" -] -.forEach(function(check) { - var version = basePkg && basePkg[check] && basePkg[check][pkg.name]; - if (typeof version === "string" && version.charAt(0) !== pkg.versionScheme) - process.stderr.write(pkg.name + " " + warn + " " + pkg.name + "@" + version + " is configured as a dependency of " + basePkg.name + ". use " + pkg.name + "@" + pkg.versionScheme + version.substring(1) + " instead for API compatibility.\n"); -}); diff --git a/node_modules/protobufjs/src/common.js b/node_modules/protobufjs/src/common.js deleted file mode 100644 index 489ee1c..0000000 --- a/node_modules/protobufjs/src/common.js +++ /dev/null @@ -1,399 +0,0 @@ -"use strict"; -module.exports = common; - -var commonRe = /\/|\./; - -/** - * Provides common type definitions. - * Can also be used to provide additional google types or your own custom types. - * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name - * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition - * @returns {undefined} - * @property {INamespace} google/protobuf/any.proto Any - * @property {INamespace} google/protobuf/duration.proto Duration - * @property {INamespace} google/protobuf/empty.proto Empty - * @property {INamespace} google/protobuf/field_mask.proto FieldMask - * @property {INamespace} google/protobuf/struct.proto Struct, Value, NullValue and ListValue - * @property {INamespace} google/protobuf/timestamp.proto Timestamp - * @property {INamespace} google/protobuf/wrappers.proto Wrappers - * @example - * // manually provides descriptor.proto (assumes google/protobuf/ namespace and .proto extension) - * protobuf.common("descriptor", descriptorJson); - * - * // manually provides a custom definition (uses my.foo namespace) - * protobuf.common("my/foo/bar.proto", myFooBarJson); - */ -function common(name, json) { - if (!commonRe.test(name)) { - name = "google/protobuf/" + name + ".proto"; - json = { nested: { google: { nested: { protobuf: { nested: json } } } } }; - } - common[name] = json; -} - -// Not provided because of limited use (feel free to discuss or to provide yourself): -// -// google/protobuf/descriptor.proto -// google/protobuf/source_context.proto -// google/protobuf/type.proto -// -// Stripped and pre-parsed versions of these non-bundled files are instead available as part of -// the repository or package within the google/protobuf directory. - -common("any", { - - /** - * Properties of a google.protobuf.Any message. - * @interface IAny - * @type {Object} - * @property {string} [typeUrl] - * @property {Uint8Array} [bytes] - * @memberof common - */ - Any: { - fields: { - type_url: { - type: "string", - id: 1 - }, - value: { - type: "bytes", - id: 2 - } - } - } -}); - -var timeType; - -common("duration", { - - /** - * Properties of a google.protobuf.Duration message. - * @interface IDuration - * @type {Object} - * @property {number|Long} [seconds] - * @property {number} [nanos] - * @memberof common - */ - Duration: timeType = { - fields: { - seconds: { - type: "int64", - id: 1 - }, - nanos: { - type: "int32", - id: 2 - } - } - } -}); - -common("timestamp", { - - /** - * Properties of a google.protobuf.Timestamp message. - * @interface ITimestamp - * @type {Object} - * @property {number|Long} [seconds] - * @property {number} [nanos] - * @memberof common - */ - Timestamp: timeType -}); - -common("empty", { - - /** - * Properties of a google.protobuf.Empty message. - * @interface IEmpty - * @memberof common - */ - Empty: { - fields: {} - } -}); - -common("struct", { - - /** - * Properties of a google.protobuf.Struct message. - * @interface IStruct - * @type {Object} - * @property {Object.} [fields] - * @memberof common - */ - Struct: { - fields: { - fields: { - keyType: "string", - type: "Value", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.Value message. - * @interface IValue - * @type {Object} - * @property {string} [kind] - * @property {0} [nullValue] - * @property {number} [numberValue] - * @property {string} [stringValue] - * @property {boolean} [boolValue] - * @property {IStruct} [structValue] - * @property {IListValue} [listValue] - * @memberof common - */ - Value: { - oneofs: { - kind: { - oneof: [ - "nullValue", - "numberValue", - "stringValue", - "boolValue", - "structValue", - "listValue" - ] - } - }, - fields: { - nullValue: { - type: "NullValue", - id: 1 - }, - numberValue: { - type: "double", - id: 2 - }, - stringValue: { - type: "string", - id: 3 - }, - boolValue: { - type: "bool", - id: 4 - }, - structValue: { - type: "Struct", - id: 5 - }, - listValue: { - type: "ListValue", - id: 6 - } - } - }, - - NullValue: { - values: { - NULL_VALUE: 0 - } - }, - - /** - * Properties of a google.protobuf.ListValue message. - * @interface IListValue - * @type {Object} - * @property {Array.} [values] - * @memberof common - */ - ListValue: { - fields: { - values: { - rule: "repeated", - type: "Value", - id: 1 - } - } - } -}); - -common("wrappers", { - - /** - * Properties of a google.protobuf.DoubleValue message. - * @interface IDoubleValue - * @type {Object} - * @property {number} [value] - * @memberof common - */ - DoubleValue: { - fields: { - value: { - type: "double", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.FloatValue message. - * @interface IFloatValue - * @type {Object} - * @property {number} [value] - * @memberof common - */ - FloatValue: { - fields: { - value: { - type: "float", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.Int64Value message. - * @interface IInt64Value - * @type {Object} - * @property {number|Long} [value] - * @memberof common - */ - Int64Value: { - fields: { - value: { - type: "int64", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.UInt64Value message. - * @interface IUInt64Value - * @type {Object} - * @property {number|Long} [value] - * @memberof common - */ - UInt64Value: { - fields: { - value: { - type: "uint64", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.Int32Value message. - * @interface IInt32Value - * @type {Object} - * @property {number} [value] - * @memberof common - */ - Int32Value: { - fields: { - value: { - type: "int32", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.UInt32Value message. - * @interface IUInt32Value - * @type {Object} - * @property {number} [value] - * @memberof common - */ - UInt32Value: { - fields: { - value: { - type: "uint32", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.BoolValue message. - * @interface IBoolValue - * @type {Object} - * @property {boolean} [value] - * @memberof common - */ - BoolValue: { - fields: { - value: { - type: "bool", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.StringValue message. - * @interface IStringValue - * @type {Object} - * @property {string} [value] - * @memberof common - */ - StringValue: { - fields: { - value: { - type: "string", - id: 1 - } - } - }, - - /** - * Properties of a google.protobuf.BytesValue message. - * @interface IBytesValue - * @type {Object} - * @property {Uint8Array} [value] - * @memberof common - */ - BytesValue: { - fields: { - value: { - type: "bytes", - id: 1 - } - } - } -}); - -common("field_mask", { - - /** - * Properties of a google.protobuf.FieldMask message. - * @interface IDoubleValue - * @type {Object} - * @property {number} [value] - * @memberof common - */ - FieldMask: { - fields: { - paths: { - rule: "repeated", - type: "string", - id: 1 - } - } - } -}); - -/** - * Gets the root definition of the specified common proto file. - * - * Bundled definitions are: - * - google/protobuf/any.proto - * - google/protobuf/duration.proto - * - google/protobuf/empty.proto - * - google/protobuf/field_mask.proto - * - google/protobuf/struct.proto - * - google/protobuf/timestamp.proto - * - google/protobuf/wrappers.proto - * - * @param {string} file Proto file name - * @returns {INamespace|null} Root definition or `null` if not defined - */ -common.get = function get(file) { - return common[file] || null; -}; diff --git a/node_modules/protobufjs/src/converter.js b/node_modules/protobufjs/src/converter.js deleted file mode 100644 index 0e98e8d..0000000 --- a/node_modules/protobufjs/src/converter.js +++ /dev/null @@ -1,315 +0,0 @@ -"use strict"; -/** - * Runtime message from/to plain object converters. - * @namespace - */ -var converter = exports; - -var Enum = require("./enum"), - util = require("./util"); - -/** - * Generates a partial value fromObject conveter. - * @param {Codegen} gen Codegen instance - * @param {Field} field Reflected field - * @param {number} fieldIndex Field index - * @param {string} prop Property reference - * @returns {Codegen} Codegen instance - * @ignore - */ -function genValuePartial_fromObject(gen, field, fieldIndex, prop) { - var defaultAlreadyEmitted = false; - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - if (field.resolvedType) { - if (field.resolvedType instanceof Enum) { gen - ("switch(d%s){", prop); - for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) { - // enum unknown values passthrough - if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen - ("default:") - ("if(typeof(d%s)===\"number\"){m%s=d%s;break}", prop, prop, prop); - if (!field.repeated) gen // fallback to default value only for - // arrays, to avoid leaving holes. - ("break"); // for non-repeated fields, just ignore - defaultAlreadyEmitted = true; - } - gen - ("case%j:", keys[i]) - ("case %i:", values[keys[i]]) - ("m%s=%j", prop, values[keys[i]]) - ("break"); - } gen - ("}"); - } else gen - ("if(typeof d%s!==\"object\")", prop) - ("throw TypeError(%j)", field.fullName + ": object expected") - ("m%s=types[%i].fromObject(d%s,n+1)", prop, fieldIndex, prop); - } else { - var isUnsigned = false; - switch (field.type) { - case "double": - case "float": gen - ("m%s=Number(d%s)", prop, prop); // also catches "NaN", "Infinity" - break; - case "uint32": - case "fixed32": gen - ("m%s=d%s>>>0", prop, prop); - break; - case "int32": - case "sint32": - case "sfixed32": gen - ("m%s=d%s|0", prop, prop); - break; - case "uint64": - case "fixed64": - isUnsigned = true; - // eslint-disable-next-line no-fallthrough - case "int64": - case "sint64": - case "sfixed64": gen - ("if(util.Long)") - ("m%s=util.Long.fromValue(d%s,%j)", prop, prop, isUnsigned) - ("else if(typeof d%s===\"string\")", prop) - ("m%s=parseInt(d%s,10)", prop, prop) - ("else if(typeof d%s===\"number\")", prop) - ("m%s=d%s", prop, prop) - ("else if(typeof d%s===\"object\")", prop) - ("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", prop, prop, prop, isUnsigned ? "true" : ""); - break; - case "bytes": gen - ("if(typeof d%s===\"string\")", prop) - ("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", prop, prop, prop) - ("else if(d%s.length >= 0)", prop) - ("m%s=d%s", prop, prop); - break; - case "string": gen - ("m%s=String(d%s)", prop, prop); - break; - case "bool": gen - ("m%s=Boolean(d%s)", prop, prop); - break; - /* default: gen - ("m%s=d%s", prop, prop); - break; */ - } - } - return gen; - /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ -} - -/** - * Generates a plain object to runtime message converter specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -converter.fromObject = function fromObject(mtype) { - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - var fields = mtype.fieldsArray; - var gen = util.codegen(["d", "n"], mtype.name + "$fromObject") - ("if(d instanceof this.ctor)") - ("return d") - ("if(n===undefined)n=0") - ("if(n>util.recursionLimit)") - ("throw Error(\"maximum nesting depth exceeded\")"); - if (!fields.length) return gen - ("return new this.ctor"); - gen - ("var m=new this.ctor"); - for (var i = 0; i < fields.length; ++i) { - var field = fields[i].resolve(), - prop = util.safeProp(field.name); - - // Map fields - if (field.map) { gen - ("if(d%s){", prop) - ("if(typeof d%s!==\"object\")", prop) - ("throw TypeError(%j)", field.fullName + ": object expected") - ("m%s={}", prop) - ("for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0,%j).toBigInt()", prop, prop, prop, prop, prop, isUnsigned) - ("else if(typeof m%s===\"number\")", prop) - ("d%s=o.longs===String?String(m%s):m%s", prop, prop, prop) - ("else") // Long-like - ("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", prop, prop, prop, prop, isUnsigned ? "true": "", prop); - break; - case "bytes": gen - ("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", prop, prop, prop, prop, prop); - break; - default: gen - ("d%s=m%s", prop, prop); - break; - } - } - return gen; - /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ -} - -/** - * Generates a runtime message to plain object converter specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -converter.toObject = function toObject(mtype) { - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById); - if (!fields.length) - return util.codegen()("return {}"); - var gen = util.codegen(["m", "o", "q"], mtype.name + "$toObject") - ("if(!o)") - ("o={}") - ("if(q===undefined)q=0") - ("if(q>util.recursionLimit)") - ("throw Error(\"max depth exceeded\")") - ("var d={}"); - - var repeatedFields = [], - mapFields = [], - normalFields = [], - i = 0; - for (; i < fields.length; ++i) - if (!fields[i].partOf) - ( fields[i].resolve().repeated ? repeatedFields - : fields[i].map ? mapFields - : normalFields).push(fields[i]); - - if (repeatedFields.length) { gen - ("if(o.arrays||o.defaults){"); - for (i = 0; i < repeatedFields.length; ++i) gen - ("d%s=[]", util.safeProp(repeatedFields[i].name)); - gen - ("}"); - } - - if (mapFields.length) { gen - ("if(o.objects||o.defaults){"); - for (i = 0; i < mapFields.length; ++i) gen - ("d%s={}", util.safeProp(mapFields[i].name)); - gen - ("}"); - } - - if (normalFields.length) { gen - ("if(o.defaults){"); - for (i = 0; i < normalFields.length; ++i) { - var field = normalFields[i], - prop = util.safeProp(field.name); - if (field.resolvedType instanceof Enum) gen - ("d%s=o.enums===String?%j:%j", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault); - else if (field.long) gen - ("if(util.Long){") - ("var n=new util.Long(%i,%i,%j)", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned) - ("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!==\"undefined\"&&o.longs===BigInt?n.toBigInt():n", prop) - ("}else") - ("d%s=o.longs===String?%j:typeof BigInt!==\"undefined\"&&o.longs===BigInt?BigInt(%j):%i", prop, field.typeDefault.toString(), field.typeDefault.toString(), field.typeDefault.toNumber()); - else if (field.bytes) { - var arrayDefault = Array.prototype.slice.call(field.typeDefault); - gen - ("if(o.bytes===String)d%s=%j", prop, String.fromCharCode.apply(String, field.typeDefault)) - ("else{") - ("d%s=%j", prop, arrayDefault) - ("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", prop, prop) - ("}"); - } else gen - ("d%s=%j", prop, field.typeDefault); // also messages (=null) - } gen - ("}"); - } - var hasKs2 = false; - for (i = 0; i < fields.length; ++i) { - var field = fields[i], - index = mtype._fieldsArray.indexOf(field), - prop = util.safeProp(field.name); - if (field.map) { - if (!hasKs2) { hasKs2 = true; gen - ("var ks2"); - } gen - ("if(m%s&&(ks2=Object.keys(m%s)).length){", prop, prop) - ("d%s={}", prop) - ("for(var j=0;jReader.recursionLimit)") - ("throw Error(\"maximum nesting depth exceeded\")") - ("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (mtype.fieldsArray.filter(function(field) { return field.map; }).length ? ",k,value" : "")) - ("while(r.pos>>3){"); - - var i = 0; - for (; i < /* initializes */ mtype.fieldsArray.length; ++i) { - var field = mtype._fieldsArray[i].resolve(), - type = field.resolvedType instanceof Enum ? "int32" : field.type, - ref = "m" + util.safeProp(field.name); gen - ("case %i: {", field.id); - - // Map fields - if (field.map) { gen - ("if(%s===util.emptyObject)", ref) - ("%s={}", ref) - ("var c2 = r.uint32()+r.pos"); - - if (types.defaults[field.keyType] !== undefined) gen - ("k=%j", types.defaults[field.keyType]); - else gen - ("k=null"); - - if (types.defaults[type] !== undefined) gen - ("value=%j", types.defaults[type]); - else gen - ("value=null"); - - gen - ("while(r.pos>>3){") - ("case 1: k=r.%s(); break", field.keyType) - ("case 2:"); - - if (types.basic[type] === undefined) gen - ("value=types[%i].decode(r,r.uint32(),undefined,n+1)", i); // can't be groups - else gen - ("value=r.%s()", type); - - gen - ("break") - ("default:") - ("r.skipType(tag2&7,n)") - ("break") - ("}") - ("}"); - - if (types.long[field.keyType] !== undefined) gen - ("%s[typeof k===\"object\"?util.longToHash(k):k]=value", ref); - else { - if (field.keyType === "string") gen - ("if(k===\"__proto__\")") - ("util.makeProp(%s,k)", ref); - gen - ("%s[k]=value", ref); - } - - // Repeated fields - } else if (field.repeated) { gen - - ("if(!(%s&&%s.length))", ref, ref) - ("%s=[]", ref); - - // Packable (always check for forward and backward compatiblity) - if (types.packed[type] !== undefined) gen - ("if((t&7)===2){") - ("var c2=r.uint32()+r.pos") - ("while(r.pos>> 0, (field.id << 3 | 4) >>> 0) - : gen("types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0); -} - -/** - * Generates an encoder specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -function encoder(mtype) { - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - var gen = util.codegen(["m", "w", "q"], mtype.name + "$encode") - ("if(!w)") - ("w=Writer.create()") - ("if(q===undefined)q=0") - ("if(q>util.recursionLimit)") - ("throw Error(\"max depth exceeded\")"); - - var i, ref; - - // "when a message is serialized its known fields should be written sequentially by field number" - var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById); - - for (var i = 0; i < fields.length; ++i) { - var field = fields[i].resolve(), - index = mtype._fieldsArray.indexOf(field), - type = field.resolvedType instanceof Enum ? "int32" : field.type, - wireType = types.basic[type]; - ref = "m" + util.safeProp(field.name); - - // Map fields - if (field.map) { - gen - ("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", ref, field.name) // !== undefined && !== null - ("for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType); - if (wireType === undefined) gen - ("types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()", index, ref); // can't be groups - else gen - (".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | wireType, type, ref); - gen - ("}") - ("}"); - - // Repeated fields - } else if (field.repeated) { gen - ("if(%s!=null&&%s.length){", ref, ref); // !== undefined && !== null - - // Packed repeated - if (field.packed && types.packed[type] !== undefined) { gen - - ("w.uint32(%i).fork()", (field.id << 3 | 2) >>> 0) - ("for(var i=0;i<%s.length;++i)", ref) - ("w.%s(%s[i])", type, ref) - ("w.ldelim()"); - - // Non-packed - } else { gen - - ("for(var i=0;i<%s.length;++i)", ref); - if (wireType === undefined) - genTypePartial(gen, field, index, ref + "[i]"); - else gen - ("w.uint32(%i).%s(%s[i])", (field.id << 3 | wireType) >>> 0, type, ref); - - } gen - ("}"); - - // Non-repeated - } else { - if (field.optional) gen - ("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", ref, field.name); // !== undefined && !== null - - if (wireType === undefined) - genTypePartial(gen, field, index, ref); - else gen - ("w.uint32(%i).%s(%s)", (field.id << 3 | wireType) >>> 0, type, ref); - - } - } - - return gen - ("return w"); - /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ -} diff --git a/node_modules/protobufjs/src/enum.js b/node_modules/protobufjs/src/enum.js deleted file mode 100644 index 076060d..0000000 --- a/node_modules/protobufjs/src/enum.js +++ /dev/null @@ -1,226 +0,0 @@ -"use strict"; -module.exports = Enum; - -// extends ReflectionObject -var ReflectionObject = require("./object"); -((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = "Enum"; - -var Namespace = require("./namespace"), - util = require("./util"); - -/** - * Constructs a new enum instance. - * @classdesc Reflected enum. - * @extends ReflectionObject - * @constructor - * @param {string} name Unique name within its namespace - * @param {Object.} [values] Enum values as an object, by name - * @param {Object.} [options] Declared options - * @param {string} [comment] The comment for this enum - * @param {Object.} [comments] The value comments for this enum - * @param {Object.>|undefined} [valuesOptions] The value options for this enum - */ -function Enum(name, values, options, comment, comments, valuesOptions) { - ReflectionObject.call(this, name, options); - - if (values && typeof values !== "object") - throw TypeError("values must be an object"); - - /** - * Enum values by id. - * @type {Object.} - */ - this.valuesById = {}; - - /** - * Enum values by name. - * @type {Object.} - */ - this.values = Object.create(this.valuesById); // toJSON, marker - - /** - * Enum comment text. - * @type {string|null} - */ - this.comment = comment; - - /** - * Value comment texts, if any. - * @type {Object.} - */ - this.comments = comments || {}; - - /** - * Values options, if any - * @type {Object>|undefined} - */ - this.valuesOptions = valuesOptions; - - /** - * Resolved values features, if any - * @type {Object>|undefined} - */ - this._valuesFeatures = {}; - - /** - * Reserved ranges, if any. - * @type {Array.} - */ - this.reserved = undefined; // toJSON - - // Note that values inherit valuesById on their prototype which makes them a TypeScript- - // compatible enum. This is used by pbts to write actual enum definitions that work for - // static and reflection code alike instead of emitting generic object definitions. - - if (values) - for (var keys = Object.keys(values), i = 0; i < keys.length; ++i) - if (keys[i] !== "__proto__" && typeof values[keys[i]] === "number") // use forward entries only - this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i]; -} - -/** - * @override - */ -Enum.prototype._resolveFeatures = function _resolveFeatures(edition) { - edition = this._edition || edition; - ReflectionObject.prototype._resolveFeatures.call(this, edition); - - Object.keys(this.values).forEach(key => { - var parentFeaturesCopy = util.merge({}, this._features); - this._valuesFeatures[key] = util.merge(parentFeaturesCopy, this.valuesOptions && this.valuesOptions[key] && this.valuesOptions[key].features || {}); - }); - - return this; -}; - -/** - * Enum descriptor. - * @interface IEnum - * @property {Object.} values Enum values - * @property {Object.} [options] Enum options - */ - -/** - * Constructs an enum from an enum descriptor. - * @param {string} name Enum name - * @param {IEnum} json Enum descriptor - * @returns {Enum} Created enum - * @throws {TypeError} If arguments are invalid - */ -Enum.fromJSON = function fromJSON(name, json) { - var enm = new Enum(name, json.values, json.options, json.comment, json.comments); - enm.reserved = json.reserved; - if (json.edition) - enm._edition = json.edition; - enm._defaultEdition = "proto3"; // For backwards-compatibility. - return enm; -}; - -/** - * Converts this enum to an enum descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IEnum} Enum descriptor - */ -Enum.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "edition" , this._editionToJSON(), - "options" , this.options, - "valuesOptions" , this.valuesOptions, - "values" , this.values, - "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, - "comment" , keepComments ? this.comment : undefined, - "comments" , keepComments ? this.comments : undefined - ]); -}; - -/** - * Adds a value to this enum. - * @param {string} name Value name - * @param {number} id Value id - * @param {string} [comment] Comment, if any - * @param {Object.|undefined} [options] Options, if any - * @returns {Enum} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a value with this name or id - */ -Enum.prototype.add = function add(name, id, comment, options) { - // utilized by the parser but not by .fromJSON - - if (!util.isString(name)) - throw TypeError("name must be a string"); - - if (!util.isInteger(id)) - throw TypeError("id must be an integer"); - - if (name === "__proto__") - return this; - - if (this.values[name] !== undefined) - throw Error("duplicate name '" + name + "' in " + this); - - if (this.isReservedId(id)) - throw Error("id " + id + " is reserved in " + this); - - if (this.isReservedName(name)) - throw Error("name '" + name + "' is reserved in " + this); - - if (this.valuesById[id] !== undefined) { - if (!(this.options && this.options.allow_alias)) - throw Error("duplicate id " + id + " in " + this); - this.values[name] = id; - } else - this.valuesById[this.values[name] = id] = name; - - if (options) { - if (this.valuesOptions === undefined) - this.valuesOptions = {}; - this.valuesOptions[name] = options || null; - } - - this.comments[name] = comment || null; - return this; -}; - -/** - * Removes a value from this enum - * @param {string} name Value name - * @returns {Enum} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `name` is not a name of this enum - */ -Enum.prototype.remove = function remove(name) { - - if (!util.isString(name)) - throw TypeError("name must be a string"); - - var val = this.values[name]; - if (val == null) - throw Error("name '" + name + "' does not exist in " + this); - - delete this.valuesById[val]; - delete this.values[name]; - delete this.comments[name]; - if (this.valuesOptions) - delete this.valuesOptions[name]; - - return this; -}; - -/** - * Tests if the specified id is reserved. - * @param {number} id Id to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Enum.prototype.isReservedId = function isReservedId(id) { - return Namespace.isReservedId(this.reserved, id); -}; - -/** - * Tests if the specified name is reserved. - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Enum.prototype.isReservedName = function isReservedName(name) { - return Namespace.isReservedName(this.reserved, name); -}; diff --git a/node_modules/protobufjs/src/field.js b/node_modules/protobufjs/src/field.js deleted file mode 100644 index eb56f49..0000000 --- a/node_modules/protobufjs/src/field.js +++ /dev/null @@ -1,453 +0,0 @@ -"use strict"; -module.exports = Field; - -// extends ReflectionObject -var ReflectionObject = require("./object"); -((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = "Field"; - -var Enum = require("./enum"), - types = require("./types"), - util = require("./util"); - -var Type; // cyclic - -var ruleRe = /^required|optional|repeated$/; - -/** - * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class. - * @name Field - * @classdesc Reflected message field. - * @extends FieldBase - * @constructor - * @param {string} name Unique name within its namespace - * @param {number} id Unique id within its namespace - * @param {string} type Value type - * @param {string|Object.} [rule="optional"] Field rule - * @param {string|Object.} [extend] Extended type if different from parent - * @param {Object.} [options] Declared options - */ - -/** - * Constructs a field from a field descriptor. - * @param {string} name Field name - * @param {IField} json Field descriptor - * @returns {Field} Created field - * @throws {TypeError} If arguments are invalid - */ -Field.fromJSON = function fromJSON(name, json) { - var field = new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment); - if (json.edition) - field._edition = json.edition; - field._defaultEdition = "proto3"; // For backwards-compatibility. - return field; -}; - -/** - * Not an actual constructor. Use {@link Field} instead. - * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions. - * @exports FieldBase - * @extends ReflectionObject - * @constructor - * @param {string} name Unique name within its namespace - * @param {number} id Unique id within its namespace - * @param {string} type Value type - * @param {string|Object.} [rule="optional"] Field rule - * @param {string|Object.} [extend] Extended type if different from parent - * @param {Object.} [options] Declared options - * @param {string} [comment] Comment associated with this field - */ -function Field(name, id, type, rule, extend, options, comment) { - - if (util.isObject(rule)) { - comment = extend; - options = rule; - rule = extend = undefined; - } else if (util.isObject(extend)) { - comment = options; - options = extend; - extend = undefined; - } - - ReflectionObject.call(this, name, options); - - if (!util.isInteger(id) || id < 0) - throw TypeError("id must be a non-negative integer"); - - if (!util.isString(type)) - throw TypeError("type must be a string"); - - if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase())) - throw TypeError("rule must be a string rule"); - - if (extend !== undefined && !util.isString(extend)) - throw TypeError("extend must be a string"); - - /** - * Field rule, if any. - * @type {string|undefined} - */ - if (rule === "proto3_optional") { - rule = "optional"; - } - this.rule = rule && rule !== "optional" ? rule : undefined; // toJSON - - /** - * Field type. - * @type {string} - */ - this.type = type; // toJSON - - /** - * Unique field id. - * @type {number} - */ - this.id = id; // toJSON, marker - - /** - * Extended type if different from parent. - * @type {string|undefined} - */ - this.extend = extend || undefined; // toJSON - - /** - * Whether this field is repeated. - * @type {boolean} - */ - this.repeated = rule === "repeated"; - - /** - * Whether this field is a map or not. - * @type {boolean} - */ - this.map = false; - - /** - * Message this field belongs to. - * @type {Type|null} - */ - this.message = null; - - /** - * OneOf this field belongs to, if any, - * @type {OneOf|null} - */ - this.partOf = null; - - /** - * The field type's default value. - * @type {*} - */ - this.typeDefault = null; - - /** - * The field's default value on prototypes. - * @type {*} - */ - this.defaultValue = null; - - /** - * Whether this field's value should be treated as a long. - * @type {boolean} - */ - this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false; - - /** - * Whether this field's value is a buffer. - * @type {boolean} - */ - this.bytes = type === "bytes"; - - /** - * Resolved type if not a basic type. - * @type {Type|Enum|null} - */ - this.resolvedType = null; - - /** - * Sister-field within the extended type if a declaring extension field. - * @type {Field|null} - */ - this.extensionField = null; - - /** - * Sister-field within the declaring namespace if an extended field. - * @type {Field|null} - */ - this.declaringField = null; - - /** - * Comment for this field. - * @type {string|null} - */ - this.comment = comment; -} - -/** - * Determines whether this field is required. - * @name Field#required - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "required", { - get: function() { - return this._features.field_presence === "LEGACY_REQUIRED"; - } -}); - -/** - * Determines whether this field is not required. - * @name Field#optional - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "optional", { - get: function() { - return !this.required; - } -}); - -/** - * Determines whether this field uses tag-delimited encoding. In proto2 this - * corresponded to group syntax. - * @name Field#delimited - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "delimited", { - get: function() { - return this.resolvedType instanceof Type && - this._features.message_encoding === "DELIMITED"; - } -}); - -/** - * Determines whether this field is packed. Only relevant when repeated. - * @name Field#packed - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "packed", { - get: function() { - return this._features.repeated_field_encoding === "PACKED"; - } -}); - -/** - * Determines whether this field tracks presence. - * @name Field#hasPresence - * @type {boolean} - * @readonly - */ -Object.defineProperty(Field.prototype, "hasPresence", { - get: function() { - if (this.repeated || this.map) { - return false; - } - return this.partOf || // oneofs - this.declaringField || this.extensionField || // extensions - this._features.field_presence !== "IMPLICIT"; - } -}); - -/** - * @override - */ -Field.prototype.setOption = function setOption(name, value, ifNotSet) { - return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet); -}; - -/** - * Field descriptor. - * @interface IField - * @property {string} [rule="optional"] Field rule - * @property {string} type Field type - * @property {number} id Field id - * @property {Object.} [options] Field options - */ - -/** - * Extension field descriptor. - * @interface IExtensionField - * @extends IField - * @property {string} extend Extended type - */ - -/** - * Converts this field to a field descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IField} Field descriptor - */ -Field.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "edition" , this._editionToJSON(), - "rule" , this.rule !== "optional" && this.rule || undefined, - "type" , this.type, - "id" , this.id, - "extend" , this.extend, - "options" , this.options, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * Resolves this field's type references. - * @returns {Field} `this` - * @throws {Error} If any reference cannot be resolved - */ -Field.prototype.resolve = function resolve() { - - if (this.resolved) - return this; - - if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it - this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type); - if (this.resolvedType instanceof Type) - this.typeDefault = null; - else // instanceof Enum - this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined - } else if (this.options && this.options.proto3_optional) { - // proto3 scalar value marked optional; should default to null - this.typeDefault = null; - } - - // use explicitly set default value if present - if (this.options && this.options["default"] != null) { - this.typeDefault = this.options["default"]; - if (this.resolvedType instanceof Enum && typeof this.typeDefault === "string") - this.typeDefault = this.resolvedType.values[this.typeDefault]; - } - - // remove unnecessary options - if (this.options) { - if (this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum)) - delete this.options.packed; - if (!Object.keys(this.options).length) - this.options = undefined; - } - - // convert to internal data type if necesssary - if (this.long) { - this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type === "uint64" || this.type === "fixed64"); - - /* istanbul ignore else */ - if (Object.freeze) - Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it) - - } else if (this.bytes && typeof this.typeDefault === "string") { - var buf; - if (util.base64.test(this.typeDefault)) - util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0); - else - util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0); - this.typeDefault = buf; - } - - // take special care of maps and repeated fields - if (this.map) - this.defaultValue = util.emptyObject; - else if (this.repeated) - this.defaultValue = util.emptyArray; - else - this.defaultValue = this.typeDefault; - - // ensure proper value on prototype - if (this.parent instanceof Type) - this.parent.ctor.prototype[this.name] = this.defaultValue; - - return ReflectionObject.prototype.resolve.call(this); -}; - -/** - * Infers field features from legacy syntax that may have been specified differently. - * in older editions. - * @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions - * @returns {object} The feature values to override - */ -Field.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(edition) { - if (edition !== "proto2" && edition !== "proto3") { - return {}; - } - - var features = {}; - - if (this.rule === "required") { - features.field_presence = "LEGACY_REQUIRED"; - } - if (this.parent && types.defaults[this.type] === undefined) { - // We can't use resolvedType because types may not have been resolved yet. However, - // legacy groups are always in the same scope as the field so we don't have to do a - // full scan of the tree. - var type = this.parent.get(this.type.split(".").pop()); - if (type && type instanceof Type && type.group) { - features.message_encoding = "DELIMITED"; - } - } - if (this.getOption("packed") === true) { - features.repeated_field_encoding = "PACKED"; - } else if (this.getOption("packed") === false) { - features.repeated_field_encoding = "EXPANDED"; - } - return features; -}; - -/** - * @override - */ -Field.prototype._resolveFeatures = function _resolveFeatures(edition) { - return ReflectionObject.prototype._resolveFeatures.call(this, this._edition || edition); -}; - -/** - * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript). - * @typedef FieldDecorator - * @type {function} - * @param {Object} prototype Target prototype - * @param {string} fieldName Field name - * @returns {undefined} - */ - -/** - * Field decorator (TypeScript). - * @name Field.d - * @function - * @param {number} fieldId Field id - * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"string"|"bool"|"bytes"|Object} fieldType Field type - * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule - * @param {T} [defaultValue] Default value - * @returns {FieldDecorator} Decorator function - * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[] - */ -Field.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) { - - // submessage: decorate the submessage and use its name as the type - if (typeof fieldType === "function") - fieldType = util.decorateType(fieldType).name; - - // enum reference: create a reflected copy of the enum and keep reuseing it - else if (fieldType && typeof fieldType === "object") - fieldType = util.decorateEnum(fieldType).name; - - return function fieldDecorator(prototype, fieldName) { - util.decorateType(prototype.constructor) - .add(new Field(fieldName, fieldId, fieldType, fieldRule, { "default": defaultValue })); - }; -}; - -/** - * Field decorator (TypeScript). - * @name Field.d - * @function - * @param {number} fieldId Field id - * @param {Constructor|string} fieldType Field type - * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule - * @returns {FieldDecorator} Decorator function - * @template T extends Message - * @variation 2 - */ -// like Field.d but without a default value - -// Sets up cyclic dependencies (called in index-light) -Field._configure = function configure(Type_) { - Type = Type_; -}; diff --git a/node_modules/protobufjs/src/index-light.js b/node_modules/protobufjs/src/index-light.js deleted file mode 100644 index 32c6a05..0000000 --- a/node_modules/protobufjs/src/index-light.js +++ /dev/null @@ -1,104 +0,0 @@ -"use strict"; -var protobuf = module.exports = require("./index-minimal"); - -protobuf.build = "light"; - -/** - * A node-style callback as used by {@link load} and {@link Root#load}. - * @typedef LoadCallback - * @type {function} - * @param {Error|null} error Error, if any, otherwise `null` - * @param {Root} [root] Root, if there hasn't been an error - * @returns {undefined} - */ - -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. - * @param {string|string[]} filename One or multiple files to load - * @param {Root} root Root namespace, defaults to create a new one if omitted. - * @param {LoadCallback} callback Callback function - * @returns {undefined} - * @see {@link Root#load} - */ -function load(filename, root, callback) { - if (typeof root === "function") { - callback = root; - root = new protobuf.Root(); - } else if (!root) - root = new protobuf.Root(); - return root.load(filename, callback); -} - -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. - * @name load - * @function - * @param {string|string[]} filename One or multiple files to load - * @param {LoadCallback} callback Callback function - * @returns {undefined} - * @see {@link Root#load} - * @variation 2 - */ -// function load(filename:string, callback:LoadCallback):undefined - -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise. - * @name load - * @function - * @param {string|string[]} filename One or multiple files to load - * @param {Root} [root] Root namespace, defaults to create a new one if omitted. - * @returns {Promise} Promise - * @see {@link Root#load} - * @variation 3 - */ -// function load(filename:string, [root:Root]):Promise - -protobuf.load = load; - -/** - * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only). - * @param {string|string[]} filename One or multiple files to load - * @param {Root} [root] Root namespace, defaults to create a new one if omitted. - * @returns {Root} Root namespace - * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid - * @see {@link Root#loadSync} - */ -function loadSync(filename, root) { - if (!root) - root = new protobuf.Root(); - return root.loadSync(filename); -} - -protobuf.loadSync = loadSync; - -// Serialization -protobuf.encoder = require("./encoder"); -protobuf.decoder = require("./decoder"); -protobuf.verifier = require("./verifier"); -protobuf.converter = require("./converter"); - -// Reflection -protobuf.ReflectionObject = require("./object"); -protobuf.Namespace = require("./namespace"); -protobuf.Root = require("./root"); -protobuf.Enum = require("./enum"); -protobuf.Type = require("./type"); -protobuf.Field = require("./field"); -protobuf.OneOf = require("./oneof"); -protobuf.MapField = require("./mapfield"); -protobuf.Service = require("./service"); -protobuf.Method = require("./method"); - -// Runtime -protobuf.Message = require("./message"); -protobuf.wrappers = require("./wrappers"); - -// Utility -protobuf.types = require("./types"); -protobuf.util = require("./util"); - -// Set up possibly cyclic reflection dependencies -protobuf.ReflectionObject._configure(protobuf.Root); -protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum); -protobuf.Root._configure(protobuf.Type); -protobuf.Field._configure(protobuf.Type); diff --git a/node_modules/protobufjs/src/index-minimal.js b/node_modules/protobufjs/src/index-minimal.js deleted file mode 100644 index 1f4aaea..0000000 --- a/node_modules/protobufjs/src/index-minimal.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -var protobuf = exports; - -/** - * Build type, one of `"full"`, `"light"` or `"minimal"`. - * @name build - * @type {string} - * @const - */ -protobuf.build = "minimal"; - -// Serialization -protobuf.Writer = require("./writer"); -protobuf.BufferWriter = require("./writer_buffer"); -protobuf.Reader = require("./reader"); -protobuf.BufferReader = require("./reader_buffer"); - -// Utility -protobuf.util = require("./util/minimal"); -protobuf.rpc = require("./rpc"); -protobuf.roots = require("./roots"); -protobuf.configure = configure; - -/* istanbul ignore next */ -/** - * Reconfigures the library according to the environment. - * @returns {undefined} - */ -function configure() { - protobuf.util._configure(); - protobuf.Writer._configure(protobuf.BufferWriter); - protobuf.Reader._configure(protobuf.BufferReader); -} - -// Set up buffer utility according to the environment -configure(); diff --git a/node_modules/protobufjs/src/index.js b/node_modules/protobufjs/src/index.js deleted file mode 100644 index 56bd3d5..0000000 --- a/node_modules/protobufjs/src/index.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -var protobuf = module.exports = require("./index-light"); - -protobuf.build = "full"; - -// Parser -protobuf.tokenize = require("./tokenize"); -protobuf.parse = require("./parse"); -protobuf.common = require("./common"); - -// Configure parser -protobuf.Root._configure(protobuf.Type, protobuf.parse, protobuf.common); diff --git a/node_modules/protobufjs/src/mapfield.js b/node_modules/protobufjs/src/mapfield.js deleted file mode 100644 index 67c7097..0000000 --- a/node_modules/protobufjs/src/mapfield.js +++ /dev/null @@ -1,126 +0,0 @@ -"use strict"; -module.exports = MapField; - -// extends Field -var Field = require("./field"); -((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = "MapField"; - -var types = require("./types"), - util = require("./util"); - -/** - * Constructs a new map field instance. - * @classdesc Reflected map field. - * @extends FieldBase - * @constructor - * @param {string} name Unique name within its namespace - * @param {number} id Unique id within its namespace - * @param {string} keyType Key type - * @param {string} type Value type - * @param {Object.} [options] Declared options - * @param {string} [comment] Comment associated with this field - */ -function MapField(name, id, keyType, type, options, comment) { - Field.call(this, name, id, type, undefined, undefined, options, comment); - - /* istanbul ignore if */ - if (!util.isString(keyType)) - throw TypeError("keyType must be a string"); - - /** - * Key type. - * @type {string} - */ - this.keyType = keyType; // toJSON, marker - - /** - * Resolved key type if not a basic type. - * @type {ReflectionObject|null} - */ - this.resolvedKeyType = null; - - // Overrides Field#map - this.map = true; -} - -/** - * Map field descriptor. - * @interface IMapField - * @extends {IField} - * @property {string} keyType Key type - */ - -/** - * Extension map field descriptor. - * @interface IExtensionMapField - * @extends IMapField - * @property {string} extend Extended type - */ - -/** - * Constructs a map field from a map field descriptor. - * @param {string} name Field name - * @param {IMapField} json Map field descriptor - * @returns {MapField} Created map field - * @throws {TypeError} If arguments are invalid - */ -MapField.fromJSON = function fromJSON(name, json) { - return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment); -}; - -/** - * Converts this map field to a map field descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IMapField} Map field descriptor - */ -MapField.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "keyType" , this.keyType, - "type" , this.type, - "id" , this.id, - "extend" , this.extend, - "options" , this.options, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * @override - */ -MapField.prototype.resolve = function resolve() { - if (this.resolved) - return this; - - // Besides a value type, map fields have a key type that may be "any scalar type except for floating point types and bytes" - if (types.mapKey[this.keyType] === undefined) - throw Error("invalid key type: " + this.keyType); - - return Field.prototype.resolve.call(this); -}; - -/** - * Map field decorator (TypeScript). - * @name MapField.d - * @function - * @param {number} fieldId Field id - * @param {"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"} fieldKeyType Field key type - * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"|"bytes"|Object|Constructor<{}>} fieldValueType Field value type - * @returns {FieldDecorator} Decorator function - * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> } - */ -MapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) { - - // submessage value: decorate the submessage and use its name as the type - if (typeof fieldValueType === "function") - fieldValueType = util.decorateType(fieldValueType).name; - - // enum reference value: create a reflected copy of the enum and keep reuseing it - else if (fieldValueType && typeof fieldValueType === "object") - fieldValueType = util.decorateEnum(fieldValueType).name; - - return function mapFieldDecorator(prototype, fieldName) { - util.decorateType(prototype.constructor) - .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType)); - }; -}; diff --git a/node_modules/protobufjs/src/message.js b/node_modules/protobufjs/src/message.js deleted file mode 100644 index 7de202f..0000000 --- a/node_modules/protobufjs/src/message.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict"; -module.exports = Message; - -var util = require("./util/minimal"); - -/** - * Constructs a new message instance. - * @classdesc Abstract runtime message. - * @constructor - * @param {Properties} [properties] Properties to set - * @template T extends object = object - */ -function Message(properties) { - // not used internally - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) { - var key = keys[i]; - if (key === "__proto__") - continue; - this[key] = properties[key]; - } -} - -/** - * Reference to the reflected type. - * @name Message.$type - * @type {Type} - * @readonly - */ - -/** - * Reference to the reflected type. - * @name Message#$type - * @type {Type} - * @readonly - */ - -/*eslint-disable valid-jsdoc*/ - -/** - * Creates a new message of this type using the specified properties. - * @param {Object.} [properties] Properties to set - * @returns {Message} Message instance - * @template T extends Message - * @this Constructor - */ -Message.create = function create(properties) { - return this.$type.create(properties); -}; - -/** - * Encodes a message of this type. - * @param {T|Object.} message Message to encode - * @param {Writer} [writer] Writer to use - * @returns {Writer} Writer - * @template T extends Message - * @this Constructor - */ -Message.encode = function encode(message, writer) { - return this.$type.encode(message, writer); -}; - -/** - * Encodes a message of this type preceeded by its length as a varint. - * @param {T|Object.} message Message to encode - * @param {Writer} [writer] Writer to use - * @returns {Writer} Writer - * @template T extends Message - * @this Constructor - */ -Message.encodeDelimited = function encodeDelimited(message, writer) { - return this.$type.encodeDelimited(message, writer); -}; - -/** - * Decodes a message of this type. - * @name Message.decode - * @function - * @param {Reader|Uint8Array} reader Reader or buffer to decode - * @returns {T} Decoded message - * @template T extends Message - * @this Constructor - */ -Message.decode = function decode(reader) { - return this.$type.decode(reader); -}; - -/** - * Decodes a message of this type preceeded by its length as a varint. - * @name Message.decodeDelimited - * @function - * @param {Reader|Uint8Array} reader Reader or buffer to decode - * @returns {T} Decoded message - * @template T extends Message - * @this Constructor - */ -Message.decodeDelimited = function decodeDelimited(reader) { - return this.$type.decodeDelimited(reader); -}; - -/** - * Verifies a message of this type. - * @name Message.verify - * @function - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ -Message.verify = function verify(message) { - return this.$type.verify(message); -}; - -/** - * Creates a new message of this type from a plain object. Also converts values to their respective internal types. - * @param {Object.} object Plain object - * @returns {T} Message instance - * @template T extends Message - * @this Constructor - */ -Message.fromObject = function fromObject(object) { - return this.$type.fromObject(object); -}; - -/** - * Creates a plain object from a message of this type. Also converts values to other types if specified. - * @param {T} message Message instance - * @param {IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - * @template T extends Message - * @this Constructor - */ -Message.toObject = function toObject(message, options) { - return this.$type.toObject(message, options); -}; - -/** - * Converts this message to JSON. - * @returns {Object.} JSON object - */ -Message.prototype.toJSON = function toJSON() { - return this.$type.toObject(this, util.toJSONOptions); -}; - -/*eslint-enable valid-jsdoc*/ diff --git a/node_modules/protobufjs/src/method.js b/node_modules/protobufjs/src/method.js deleted file mode 100644 index 18a6ab2..0000000 --- a/node_modules/protobufjs/src/method.js +++ /dev/null @@ -1,160 +0,0 @@ -"use strict"; -module.exports = Method; - -// extends ReflectionObject -var ReflectionObject = require("./object"); -((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = "Method"; - -var util = require("./util"); - -/** - * Constructs a new service method instance. - * @classdesc Reflected service method. - * @extends ReflectionObject - * @constructor - * @param {string} name Method name - * @param {string|undefined} type Method type, usually `"rpc"` - * @param {string} requestType Request message type - * @param {string} responseType Response message type - * @param {boolean|Object.} [requestStream] Whether the request is streamed - * @param {boolean|Object.} [responseStream] Whether the response is streamed - * @param {Object.} [options] Declared options - * @param {string} [comment] The comment for this method - * @param {Object.} [parsedOptions] Declared options, properly parsed into an object - */ -function Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) { - - /* istanbul ignore next */ - if (util.isObject(requestStream)) { - options = requestStream; - requestStream = responseStream = undefined; - } else if (util.isObject(responseStream)) { - options = responseStream; - responseStream = undefined; - } - - /* istanbul ignore if */ - if (!(type === undefined || util.isString(type))) - throw TypeError("type must be a string"); - - /* istanbul ignore if */ - if (!util.isString(requestType)) - throw TypeError("requestType must be a string"); - - /* istanbul ignore if */ - if (!util.isString(responseType)) - throw TypeError("responseType must be a string"); - - ReflectionObject.call(this, name, options); - - /** - * Method type. - * @type {string} - */ - this.type = type || "rpc"; // toJSON - - /** - * Request type. - * @type {string} - */ - this.requestType = requestType; // toJSON, marker - - /** - * Whether requests are streamed or not. - * @type {boolean|undefined} - */ - this.requestStream = requestStream ? true : undefined; // toJSON - - /** - * Response type. - * @type {string} - */ - this.responseType = responseType; // toJSON - - /** - * Whether responses are streamed or not. - * @type {boolean|undefined} - */ - this.responseStream = responseStream ? true : undefined; // toJSON - - /** - * Resolved request type. - * @type {Type|null} - */ - this.resolvedRequestType = null; - - /** - * Resolved response type. - * @type {Type|null} - */ - this.resolvedResponseType = null; - - /** - * Comment for this method - * @type {string|null} - */ - this.comment = comment; - - /** - * Options properly parsed into an object - */ - this.parsedOptions = parsedOptions; -} - -/** - * Method descriptor. - * @interface IMethod - * @property {string} [type="rpc"] Method type - * @property {string} requestType Request type - * @property {string} responseType Response type - * @property {boolean} [requestStream=false] Whether requests are streamed - * @property {boolean} [responseStream=false] Whether responses are streamed - * @property {Object.} [options] Method options - * @property {string} comment Method comments - * @property {Object.} [parsedOptions] Method options properly parsed into an object - */ - -/** - * Constructs a method from a method descriptor. - * @param {string} name Method name - * @param {IMethod} json Method descriptor - * @returns {Method} Created method - * @throws {TypeError} If arguments are invalid - */ -Method.fromJSON = function fromJSON(name, json) { - return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions); -}; - -/** - * Converts this method to a method descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IMethod} Method descriptor - */ -Method.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "type" , this.type !== "rpc" && /* istanbul ignore next */ this.type || undefined, - "requestType" , this.requestType, - "requestStream" , this.requestStream, - "responseType" , this.responseType, - "responseStream" , this.responseStream, - "options" , this.options, - "comment" , keepComments ? this.comment : undefined, - "parsedOptions" , this.parsedOptions, - ]); -}; - -/** - * @override - */ -Method.prototype.resolve = function resolve() { - - /* istanbul ignore if */ - if (this.resolved) - return this; - - this.resolvedRequestType = this.parent.lookupType(this.requestType); - this.resolvedResponseType = this.parent.lookupType(this.responseType); - - return ReflectionObject.prototype.resolve.call(this); -}; diff --git a/node_modules/protobufjs/src/namespace.js b/node_modules/protobufjs/src/namespace.js deleted file mode 100644 index b400d0f..0000000 --- a/node_modules/protobufjs/src/namespace.js +++ /dev/null @@ -1,558 +0,0 @@ -"use strict"; -module.exports = Namespace; - -// extends ReflectionObject -var ReflectionObject = require("./object"); -((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = "Namespace"; - -var Field = require("./field"), - util = require("./util"), - OneOf = require("./oneof"); - -var Type, // cyclic - Service, - Enum; - -/** - * Constructs a new namespace instance. - * @name Namespace - * @classdesc Reflected namespace. - * @extends NamespaceBase - * @constructor - * @param {string} name Namespace name - * @param {Object.} [options] Declared options - */ - -/** - * Constructs a namespace from JSON. - * @memberof Namespace - * @function - * @param {string} name Namespace name - * @param {Object.} json JSON object - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Namespace} Created namespace - * @throws {TypeError} If arguments are invalid - */ -Namespace.fromJSON = function fromJSON(name, json, depth) { - depth = util.checkDepth(depth); - return new Namespace(name, json.options).addJSON(json.nested, depth); -}; - -/** - * Converts an array of reflection objects to JSON. - * @memberof Namespace - * @param {ReflectionObject[]} array Object array - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {Object.|undefined} JSON object or `undefined` when array is empty - */ -function arrayToJSON(array, toJSONOptions) { - if (!(array && array.length)) - return undefined; - var obj = {}; - for (var i = 0; i < array.length; ++i) - obj[array[i].name] = array[i].toJSON(toJSONOptions); - return obj; -} - -Namespace.arrayToJSON = arrayToJSON; - -/** - * Tests if the specified id is reserved. - * @param {Array.|undefined} reserved Array of reserved ranges and names - * @param {number} id Id to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Namespace.isReservedId = function isReservedId(reserved, id) { - if (reserved) - for (var i = 0; i < reserved.length; ++i) - if (typeof reserved[i] !== "string" && reserved[i][0] <= id && reserved[i][1] > id) - return true; - return false; -}; - -/** - * Tests if the specified name is reserved. - * @param {Array.|undefined} reserved Array of reserved ranges and names - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Namespace.isReservedName = function isReservedName(reserved, name) { - if (reserved) - for (var i = 0; i < reserved.length; ++i) - if (reserved[i] === name) - return true; - return false; -}; - -/** - * Not an actual constructor. Use {@link Namespace} instead. - * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions. - * @exports NamespaceBase - * @extends ReflectionObject - * @abstract - * @constructor - * @param {string} name Namespace name - * @param {Object.} [options] Declared options - * @see {@link Namespace} - */ -function Namespace(name, options) { - ReflectionObject.call(this, name, options); - - /** - * Nested objects by name. - * @type {Object.|undefined} - */ - this.nested = undefined; // toJSON - - /** - * Cached nested objects as an array. - * @type {ReflectionObject[]|null} - * @private - */ - this._nestedArray = null; - - /** - * Cache lookup calls for any objects contains anywhere under this namespace. - * This drastically speeds up resolve for large cross-linked protos where the same - * types are looked up repeatedly. - * @type {Object.} - * @private - */ - this._lookupCache = Object.create(null); - - /** - * Whether or not objects contained in this namespace need feature resolution. - * @type {boolean} - * @protected - */ - this._needsRecursiveFeatureResolution = true; - - /** - * Whether or not objects contained in this namespace need a resolve. - * @type {boolean} - * @protected - */ - this._needsRecursiveResolve = true; -} - -function clearCache(namespace) { - namespace._nestedArray = null; - namespace._lookupCache = Object.create(null); - - // Also clear parent caches, since they include nested lookups. - var parent = namespace; - while(parent = parent.parent) { - parent._lookupCache = Object.create(null); - } - return namespace; -} - -/** - * Nested objects of this namespace as an array for iteration. - * @name NamespaceBase#nestedArray - * @type {ReflectionObject[]} - * @readonly - */ -Object.defineProperty(Namespace.prototype, "nestedArray", { - get: function() { - return this._nestedArray || (this._nestedArray = util.toArray(this.nested)); - } -}); - -/** - * Namespace descriptor. - * @interface INamespace - * @property {Object.} [options] Namespace options - * @property {Object.} [nested] Nested object descriptors - */ - -/** - * Any extension field descriptor. - * @typedef AnyExtensionField - * @type {IExtensionField|IExtensionMapField} - */ - -/** - * Any nested object descriptor. - * @typedef AnyNestedObject - * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf} - */ - -/** - * Converts this namespace to a namespace descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {INamespace} Namespace descriptor - */ -Namespace.prototype.toJSON = function toJSON(toJSONOptions) { - return util.toObject([ - "options" , this.options, - "nested" , arrayToJSON(this.nestedArray, toJSONOptions) - ]); -}; - -/** - * Adds nested objects to this namespace from nested object descriptors. - * @param {Object.} nestedJson Any nested object descriptors - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Namespace} `this` - */ -Namespace.prototype.addJSON = function addJSON(nestedJson, depth) { - depth = util.checkDepth(depth); - var ns = this; - /* istanbul ignore else */ - if (nestedJson) { - for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) { - nested = nestedJson[names[i]]; - ns.add( // most to least likely - ( nested.fields !== undefined - ? Type.fromJSON - : nested.values !== undefined - ? Enum.fromJSON - : nested.methods !== undefined - ? Service.fromJSON - : nested.id !== undefined - ? Field.fromJSON - : Namespace.fromJSON )(names[i], nested, depth + 1) - ); - } - } - return this; -}; - -/** - * Gets the nested object of the specified name. - * @param {string} name Nested object name - * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist - */ -Namespace.prototype.get = function get(name) { - return this.nested && Object.prototype.hasOwnProperty.call(this.nested, name) - ? this.nested[name] - : null; -}; - -/** - * Gets the values of the nested {@link Enum|enum} of the specified name. - * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`. - * @param {string} name Nested enum name - * @returns {Object.} Enum values - * @throws {Error} If there is no such enum - */ -Namespace.prototype.getEnum = function getEnum(name) { - if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name) && this.nested[name] instanceof Enum) - return this.nested[name].values; - throw Error("no such enum: " + name); -}; - -/** - * Adds a nested object to this namespace. - * @param {ReflectionObject} object Nested object to add - * @returns {Namespace} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a nested object with this name - */ -Namespace.prototype.add = function add(object) { - - if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace)) - throw TypeError("object must be a valid nested object"); - - if (object.name === "__proto__") - return this; - - if (!this.nested) - this.nested = {}; - else { - var prev = this.get(object.name); - if (prev) { - if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) { - // replace plain namespace but keep existing nested elements and options - var nested = prev.nestedArray; - for (var i = 0; i < nested.length; ++i) - object.add(nested[i]); - this.remove(prev); - if (!this.nested) - this.nested = {}; - object.setOptions(prev.options, true); - - } else - throw Error("duplicate name '" + object.name + "' in " + this); - } - } - this.nested[object.name] = object; - - if (!(this instanceof Type || this instanceof Service || this instanceof Enum || this instanceof Field)) { - // This is a package or a root namespace. - if (!object._edition) { - // Make sure that some edition is set if it hasn't already been specified. - object._edition = object._defaultEdition; - } - } - - this._needsRecursiveFeatureResolution = true; - this._needsRecursiveResolve = true; - - // Also clear parent caches, since they need to recurse down. - var parent = this; - while(parent = parent.parent) { - parent._needsRecursiveFeatureResolution = true; - parent._needsRecursiveResolve = true; - } - - object.onAdd(this); - return clearCache(this); -}; - -/** - * Removes a nested object from this namespace. - * @param {ReflectionObject} object Nested object to remove - * @returns {Namespace} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `object` is not a member of this namespace - */ -Namespace.prototype.remove = function remove(object) { - - if (!(object instanceof ReflectionObject)) - throw TypeError("object must be a ReflectionObject"); - if (object.parent !== this) - throw Error(object + " is not a member of " + this); - - delete this.nested[object.name]; - if (!Object.keys(this.nested).length) - this.nested = undefined; - - object.onRemove(this); - return clearCache(this); -}; - -/** - * Defines additial namespaces within this one if not yet existing. - * @param {string|string[]} path Path to create - * @param {*} [json] Nested types to create from JSON - * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty - */ -Namespace.prototype.define = function define(path, json) { - - if (util.isString(path)) - path = path.split("."); - else if (!Array.isArray(path)) - throw TypeError("illegal path"); - if (path && path.length && path[0] === "") - throw Error("path must be relative"); - if (path.length > util.recursionLimit) - throw Error("max depth exceeded"); - - var ptr = this; - while (path.length > 0) { - var part = path.shift(); - if (ptr.nested && ptr.nested[part]) { - ptr = ptr.nested[part]; - if (!(ptr instanceof Namespace)) - throw Error("path conflicts with non-namespace objects"); - } else - ptr.add(ptr = new Namespace(part)); - } - if (json) - ptr.addJSON(json); - return ptr; -}; - -/** - * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost. - * @returns {Namespace} `this` - */ -Namespace.prototype.resolveAll = function resolveAll() { - if (!this._needsRecursiveResolve) return this; - - this._resolveFeaturesRecursive(this._edition); - - var nested = this.nestedArray, i = 0; - this.resolve(); - while (i < nested.length) - if (nested[i] instanceof Namespace) - nested[i++].resolveAll(); - else - nested[i++].resolve(); - this._needsRecursiveResolve = false; - return this; -}; - -/** - * @override - */ -Namespace.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) { - if (!this._needsRecursiveFeatureResolution) return this; - this._needsRecursiveFeatureResolution = false; - - edition = this._edition || edition; - - ReflectionObject.prototype._resolveFeaturesRecursive.call(this, edition); - this.nestedArray.forEach(nested => { - nested._resolveFeaturesRecursive(edition); - }); - return this; -}; - -/** - * Recursively looks up the reflection object matching the specified path in the scope of this namespace. - * @param {string|string[]} path Path to look up - * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc. - * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked - * @returns {ReflectionObject|null} Looked up object or `null` if none could be found - */ -Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) { - /* istanbul ignore next */ - if (typeof filterTypes === "boolean") { - parentAlreadyChecked = filterTypes; - filterTypes = undefined; - } else if (filterTypes && !Array.isArray(filterTypes)) - filterTypes = [ filterTypes ]; - - if (util.isString(path) && path.length) { - if (path === ".") - return this.root; - path = path.split("."); - } else if (!path.length) - return this; - - var flatPath = path.join("."); - - // Start at root if path is absolute - if (path[0] === "") - return this.root.lookup(path.slice(1), filterTypes); - - // Early bailout for objects with matching absolute paths - var found = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects["." + flatPath]; - if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) { - return found; - } - - // Do a regular lookup at this namespace and below - found = this._lookupImpl(path, flatPath); - if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) { - return found; - } - - if (parentAlreadyChecked) - return null; - - // If there hasn't been a match, walk up the tree and look more broadly - var current = this; - while (current.parent) { - found = current.parent._lookupImpl(path, flatPath); - if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) { - return found; - } - current = current.parent; - } - return null; -}; - -/** - * Internal helper for lookup that handles searching just at this namespace and below along with caching. - * @param {string[]} path Path to look up - * @param {string} flatPath Flattened version of the path to use as a cache key - * @returns {ReflectionObject|null} Looked up object or `null` if none could be found - * @private - */ -Namespace.prototype._lookupImpl = function lookup(path, flatPath) { - if(Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) { - return this._lookupCache[flatPath]; - } - - // Test if the first part matches any nested object, and if so, traverse if path contains more - var found = this.get(path[0]); - var exact = null; - if (found) { - if (path.length === 1) { - exact = found; - } else if (found instanceof Namespace) { - path = path.slice(1); - exact = found._lookupImpl(path, path.join(".")); - } - - // Otherwise try each nested namespace - } else { - for (var i = 0; i < this.nestedArray.length; ++i) - if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path, flatPath))) { - exact = found; - break; - } - } - - // Set this even when null, so that when we walk up the tree we can quickly bail on repeated checks back down. - this._lookupCache[flatPath] = exact; - return exact; -}; - -/** - * Looks up the reflection object at the specified path, relative to this namespace. - * @name NamespaceBase#lookup - * @function - * @param {string|string[]} path Path to look up - * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked - * @returns {ReflectionObject|null} Looked up object or `null` if none could be found - * @variation 2 - */ -// lookup(path: string, [parentAlreadyChecked: boolean]) - -/** - * Looks up the {@link Type|type} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Type} Looked up type - * @throws {Error} If `path` does not point to a type - */ -Namespace.prototype.lookupType = function lookupType(path) { - var found = this.lookup(path, [ Type ]); - if (!found) - throw Error("no such type: " + path); - return found; -}; - -/** - * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Enum} Looked up enum - * @throws {Error} If `path` does not point to an enum - */ -Namespace.prototype.lookupEnum = function lookupEnum(path) { - var found = this.lookup(path, [ Enum ]); - if (!found) - throw Error("no such Enum '" + path + "' in " + this); - return found; -}; - -/** - * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Type} Looked up type or enum - * @throws {Error} If `path` does not point to a type or enum - */ -Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) { - var found = this.lookup(path, [ Type, Enum ]); - if (!found) - throw Error("no such Type or Enum '" + path + "' in " + this); - return found; -}; - -/** - * Looks up the {@link Service|service} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Service} Looked up service - * @throws {Error} If `path` does not point to a service - */ -Namespace.prototype.lookupService = function lookupService(path) { - var found = this.lookup(path, [ Service ]); - if (!found) - throw Error("no such Service '" + path + "' in " + this); - return found; -}; - -// Sets up cyclic dependencies (called in index-light) -Namespace._configure = function(Type_, Service_, Enum_) { - Type = Type_; - Service = Service_; - Enum = Enum_; -}; diff --git a/node_modules/protobufjs/src/object.js b/node_modules/protobufjs/src/object.js deleted file mode 100644 index 92543b6..0000000 --- a/node_modules/protobufjs/src/object.js +++ /dev/null @@ -1,382 +0,0 @@ -"use strict"; -module.exports = ReflectionObject; - -ReflectionObject.className = "ReflectionObject"; - -const OneOf = require("./oneof"); -var util = require("./util"); - -var Root; // cyclic - -/* eslint-disable no-warning-comments */ -// TODO: Replace with embedded proto. -var editions2023Defaults = {enum_type: "OPEN", field_presence: "EXPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY"}; -var proto2Defaults = {enum_type: "CLOSED", field_presence: "EXPLICIT", json_format: "LEGACY_BEST_EFFORT", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "EXPANDED", utf8_validation: "NONE"}; -var proto3Defaults = {enum_type: "OPEN", field_presence: "IMPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY"}; - -/** - * Constructs a new reflection object instance. - * @classdesc Base class of all reflection objects. - * @constructor - * @param {string} name Object name - * @param {Object.} [options] Declared options - * @abstract - */ -function ReflectionObject(name, options) { - - if (!util.isString(name)) - throw TypeError("name must be a string"); - - if (options && !util.isObject(options)) - throw TypeError("options must be an object"); - - /** - * Options. - * @type {Object.|undefined} - */ - this.options = options; // toJSON - - /** - * Parsed Options. - * @type {Array.>|undefined} - */ - this.parsedOptions = null; - - /** - * Unique name within its namespace. - * @type {string} - */ - this.name = name; - - /** - * The edition specified for this object. Only relevant for top-level objects. - * @type {string} - * @private - */ - this._edition = null; - - /** - * The default edition to use for this object if none is specified. For legacy reasons, - * this is proto2 except in the JSON parsing case where it was proto3. - * @type {string} - * @private - */ - this._defaultEdition = "proto2"; - - /** - * Resolved Features. - * @type {object} - * @private - */ - this._features = {}; - - /** - * Whether or not features have been resolved. - * @type {boolean} - * @private - */ - this._featuresResolved = false; - - /** - * Parent namespace. - * @type {Namespace|null} - */ - this.parent = null; - - /** - * Whether already resolved or not. - * @type {boolean} - */ - this.resolved = false; - - /** - * Comment text, if any. - * @type {string|null} - */ - this.comment = null; - - /** - * Defining file name. - * @type {string|null} - */ - this.filename = null; -} - -Object.defineProperties(ReflectionObject.prototype, { - - /** - * Reference to the root namespace. - * @name ReflectionObject#root - * @type {Root} - * @readonly - */ - root: { - get: function() { - var ptr = this; - while (ptr.parent !== null) - ptr = ptr.parent; - return ptr; - } - }, - - /** - * Full name including leading dot. - * @name ReflectionObject#fullName - * @type {string} - * @readonly - */ - fullName: { - get: function() { - var path = [ this.name ], - ptr = this.parent; - while (ptr) { - path.unshift(ptr.name); - ptr = ptr.parent; - } - return path.join("."); - } - } -}); - -/** - * Converts this reflection object to its descriptor representation. - * @returns {Object.} Descriptor - * @abstract - */ -ReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() { - throw Error(); // not implemented, shouldn't happen -}; - -/** - * Called when this object is added to a parent. - * @param {ReflectionObject} parent Parent added to - * @returns {undefined} - */ -ReflectionObject.prototype.onAdd = function onAdd(parent) { - if (this.parent && this.parent !== parent) - this.parent.remove(this); - this.parent = parent; - this.resolved = false; - var root = parent.root; - if (root instanceof Root) - root._handleAdd(this); -}; - -/** - * Called when this object is removed from a parent. - * @param {ReflectionObject} parent Parent removed from - * @returns {undefined} - */ -ReflectionObject.prototype.onRemove = function onRemove(parent) { - var root = parent.root; - if (root instanceof Root) - root._handleRemove(this); - this.parent = null; - this.resolved = false; -}; - -/** - * Resolves this objects type references. - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype.resolve = function resolve() { - if (this.resolved) - return this; - if (this.root instanceof Root) - this.resolved = true; // only if part of a root - return this; -}; - -/** - * Resolves this objects editions features. - * @param {string} edition The edition we're currently resolving for. - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) { - return this._resolveFeatures(this._edition || edition); -}; - -/** - * Resolves child features from parent features - * @param {string} edition The edition we're currently resolving for. - * @returns {undefined} - */ -ReflectionObject.prototype._resolveFeatures = function _resolveFeatures(edition) { - if (this._featuresResolved) { - return; - } - - var defaults = {}; - - /* istanbul ignore if */ - if (!edition) { - throw new Error("Unknown edition for " + this.fullName); - } - - var protoFeatures = util.merge({}, this.options && this.options.features, - this._inferLegacyProtoFeatures(edition)); - - if (this._edition) { - // For a namespace marked with a specific edition, reset defaults. - /* istanbul ignore else */ - if (edition === "proto2") { - defaults = Object.assign({}, proto2Defaults); - } else if (edition === "proto3") { - defaults = Object.assign({}, proto3Defaults); - } else if (edition === "2023") { - defaults = Object.assign({}, editions2023Defaults); - } else { - throw new Error("Unknown edition: " + edition); - } - this._features = util.merge(defaults, protoFeatures); - this._featuresResolved = true; - return; - } - - // fields in Oneofs aren't actually children of them, so we have to - // special-case it - /* istanbul ignore else */ - if (this.partOf instanceof OneOf) { - var lexicalParentFeaturesCopy = util.merge({}, this.partOf._features); - this._features = util.merge(lexicalParentFeaturesCopy, protoFeatures); - } else if (this.declaringField) { - // Skip feature resolution of sister fields. - } else if (this.parent) { - var parentFeaturesCopy = util.merge({}, this.parent._features); - this._features = util.merge(parentFeaturesCopy, protoFeatures); - } else { - throw new Error("Unable to find a parent for " + this.fullName); - } - if (this.extensionField) { - // Sister fields should have the same features as their extensions. - this.extensionField._features = this._features; - } - this._featuresResolved = true; -}; - -/** - * Infers features from legacy syntax that may have been specified differently. - * in older editions. - * @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions - * @returns {object} The feature values to override - */ -ReflectionObject.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(/*edition*/) { - return {}; -}; - -/** - * Gets an option value. - * @param {string} name Option name - * @returns {*} Option value or `undefined` if not set - */ -ReflectionObject.prototype.getOption = function getOption(name) { - if (this.options) - return this.options[name]; - return undefined; -}; - -/** - * Sets an option. - * @param {string} name Option name - * @param {*} value Option value - * @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) { - if (name === "__proto__") - return this; - if (!this.options) - this.options = {}; - if (/^features\./.test(name)) { - util.setProperty(this.options, name, value, ifNotSet); - } else if (!ifNotSet || this.options[name] === undefined) { - if (this.getOption(name) !== value) this.resolved = false; - this.options[name] = value; - } - - return this; -}; - -/** - * Sets a parsed option. - * @param {string} name parsed Option name - * @param {*} value Option value - * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\empty, will add a new option with that value - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) { - if (name === "__proto__") - return this; - if (!this.parsedOptions) { - this.parsedOptions = []; - } - var parsedOptions = this.parsedOptions; - if (propName) { - // If setting a sub property of an option then try to merge it - // with an existing option - var opt = parsedOptions.find(function (opt) { - return Object.prototype.hasOwnProperty.call(opt, name); - }); - if (opt) { - // If we found an existing option - just merge the property value - // (If it's a feature, will just write over) - var newValue = opt[name]; - util.setProperty(newValue, propName, value); - } else { - // otherwise, create a new option, set its property and add it to the list - opt = {}; - opt[name] = util.setProperty({}, propName, value); - parsedOptions.push(opt); - } - } else { - // Always create a new option when setting the value of the option itself - var newOpt = {}; - newOpt[name] = value; - parsedOptions.push(newOpt); - } - - return this; -}; - -/** - * Sets multiple options. - * @param {Object.} options Options to set - * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) { - if (options) - for (var keys = Object.keys(options), i = 0; i < keys.length; ++i) - this.setOption(keys[i], options[keys[i]], ifNotSet); - return this; -}; - -/** - * Converts this instance to its string representation. - * @returns {string} Class name[, space, full name] - */ -ReflectionObject.prototype.toString = function toString() { - var className = this.constructor.className, - fullName = this.fullName; - if (fullName.length) - return className + " " + fullName; - return className; -}; - -/** - * Converts the edition this object is pinned to for JSON format. - * @returns {string|undefined} The edition string for JSON representation - */ -ReflectionObject.prototype._editionToJSON = function _editionToJSON() { - if (!this._edition || this._edition === "proto3") { - // Avoid emitting proto3 since we need to default to it for backwards - // compatibility anyway. - return undefined; - } - return this._edition; -}; - -// Sets up cyclic dependencies (called in index-light) -ReflectionObject._configure = function(Root_) { - Root = Root_; -}; diff --git a/node_modules/protobufjs/src/oneof.js b/node_modules/protobufjs/src/oneof.js deleted file mode 100644 index 6da2fe1..0000000 --- a/node_modules/protobufjs/src/oneof.js +++ /dev/null @@ -1,222 +0,0 @@ -"use strict"; -module.exports = OneOf; - -// extends ReflectionObject -var ReflectionObject = require("./object"); -((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = "OneOf"; - -var Field = require("./field"), - util = require("./util"); - -/** - * Constructs a new oneof instance. - * @classdesc Reflected oneof. - * @extends ReflectionObject - * @constructor - * @param {string} name Oneof name - * @param {string[]|Object.} [fieldNames] Field names - * @param {Object.} [options] Declared options - * @param {string} [comment] Comment associated with this field - */ -function OneOf(name, fieldNames, options, comment) { - if (!Array.isArray(fieldNames)) { - options = fieldNames; - fieldNames = undefined; - } - ReflectionObject.call(this, name, options); - - /* istanbul ignore if */ - if (!(fieldNames === undefined || Array.isArray(fieldNames))) - throw TypeError("fieldNames must be an Array"); - - /** - * Field names that belong to this oneof. - * @type {string[]} - */ - this.oneof = fieldNames || []; // toJSON, marker - - /** - * Fields that belong to this oneof as an array for iteration. - * @type {Field[]} - * @readonly - */ - this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent - - /** - * Comment for this field. - * @type {string|null} - */ - this.comment = comment; -} - -/** - * Oneof descriptor. - * @interface IOneOf - * @property {Array.} oneof Oneof field names - * @property {Object.} [options] Oneof options - */ - -/** - * Constructs a oneof from a oneof descriptor. - * @param {string} name Oneof name - * @param {IOneOf} json Oneof descriptor - * @returns {OneOf} Created oneof - * @throws {TypeError} If arguments are invalid - */ -OneOf.fromJSON = function fromJSON(name, json) { - return new OneOf(name, json.oneof, json.options, json.comment); -}; - -/** - * Converts this oneof to a oneof descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IOneOf} Oneof descriptor - */ -OneOf.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "options" , this.options, - "oneof" , this.oneof, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * Adds the fields of the specified oneof to the parent if not already done so. - * @param {OneOf} oneof The oneof - * @returns {undefined} - * @inner - * @ignore - */ -function addFieldsToParent(oneof) { - if (oneof.parent) - for (var i = 0; i < oneof.fieldsArray.length; ++i) - if (!oneof.fieldsArray[i].parent) - oneof.parent.add(oneof.fieldsArray[i]); -} - -/** - * Adds a field to this oneof and removes it from its current parent, if any. - * @param {Field} field Field to add - * @returns {OneOf} `this` - */ -OneOf.prototype.add = function add(field) { - - /* istanbul ignore if */ - if (!(field instanceof Field)) - throw TypeError("field must be a Field"); - - if (field.parent && field.parent !== this.parent) - field.parent.remove(field); - this.oneof.push(field.name); - this.fieldsArray.push(field); - field.partOf = this; // field.parent remains null - addFieldsToParent(this); - return this; -}; - -/** - * Removes a field from this oneof and puts it back to the oneof's parent. - * @param {Field} field Field to remove - * @returns {OneOf} `this` - */ -OneOf.prototype.remove = function remove(field) { - - /* istanbul ignore if */ - if (!(field instanceof Field)) - throw TypeError("field must be a Field"); - - var index = this.fieldsArray.indexOf(field); - - /* istanbul ignore if */ - if (index < 0) - throw Error(field + " is not a member of " + this); - - this.fieldsArray.splice(index, 1); - index = this.oneof.indexOf(field.name); - - /* istanbul ignore else */ - if (index > -1) // theoretical - this.oneof.splice(index, 1); - - field.partOf = null; - return this; -}; - -/** - * @override - */ -OneOf.prototype.onAdd = function onAdd(parent) { - ReflectionObject.prototype.onAdd.call(this, parent); - var self = this; - // Collect present fields - for (var i = 0; i < this.oneof.length; ++i) { - var field = parent.get(this.oneof[i]); - if (field && !field.partOf) { - field.partOf = self; - self.fieldsArray.push(field); - } - } - // Add not yet present fields - addFieldsToParent(this); -}; - -/** - * @override - */ -OneOf.prototype.onRemove = function onRemove(parent) { - for (var i = 0, field; i < this.fieldsArray.length; ++i) - if ((field = this.fieldsArray[i]).parent) - field.parent.remove(field); - ReflectionObject.prototype.onRemove.call(this, parent); -}; - -/** - * Determines whether this field corresponds to a synthetic oneof created for - * a proto3 optional field. No behavioral logic should depend on this, but it - * can be relevant for reflection. - * @name OneOf#isProto3Optional - * @type {boolean} - * @readonly - */ -Object.defineProperty(OneOf.prototype, "isProto3Optional", { - get: function() { - if (this.fieldsArray == null || this.fieldsArray.length !== 1) { - return false; - } - - var field = this.fieldsArray[0]; - return field.options != null && field.options["proto3_optional"] === true; - } -}); - -/** - * Decorator function as returned by {@link OneOf.d} (TypeScript). - * @typedef OneOfDecorator - * @type {function} - * @param {Object} prototype Target prototype - * @param {string} oneofName OneOf name - * @returns {undefined} - */ - -/** - * OneOf decorator (TypeScript). - * @function - * @param {...string} fieldNames Field names - * @returns {OneOfDecorator} Decorator function - * @template T extends string - */ -OneOf.d = function decorateOneOf() { - var fieldNames = new Array(arguments.length), - index = 0; - while (index < arguments.length) - fieldNames[index] = arguments[index++]; - return function oneOfDecorator(prototype, oneofName) { - util.decorateType(prototype.constructor) - .add(new OneOf(oneofName, fieldNames)); - Object.defineProperty(prototype, oneofName, { - get: util.oneOfGetter(fieldNames), - set: util.oneOfSetter(fieldNames) - }); - }; -}; diff --git a/node_modules/protobufjs/src/parse.js b/node_modules/protobufjs/src/parse.js deleted file mode 100644 index d62f359..0000000 --- a/node_modules/protobufjs/src/parse.js +++ /dev/null @@ -1,989 +0,0 @@ -"use strict"; -module.exports = parse; - -parse.filename = null; -parse.defaults = { keepCase: false }; - -var tokenize = require("./tokenize"), - Root = require("./root"), - Type = require("./type"), - Field = require("./field"), - MapField = require("./mapfield"), - OneOf = require("./oneof"), - Enum = require("./enum"), - Service = require("./service"), - Method = require("./method"), - ReflectionObject = require("./object"), - types = require("./types"), - util = require("./util"); - -var base10Re = /^[1-9][0-9]*$/, - base10NegRe = /^-?[1-9][0-9]*$/, - base16Re = /^0[x][0-9a-fA-F]+$/, - base16NegRe = /^-?0[x][0-9a-fA-F]+$/, - base8Re = /^0[0-7]+$/, - base8NegRe = /^-?0[0-7]+$/, - numberRe = util.patterns.numberRe, - nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/, - typeRefRe = util.patterns.typeRefRe; - -/** - * Result object returned from {@link parse}. - * @interface IParserResult - * @property {string|undefined} package Package name, if declared - * @property {string[]|undefined} imports Imports, if any - * @property {string[]|undefined} weakImports Weak imports, if any - * @property {Root} root Populated root instance - */ - -/** - * Options modifying the behavior of {@link parse}. - * @interface IParseOptions - * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case - * @property {boolean} [alternateCommentMode=false] Recognize double-slash comments in addition to doc-block comments. - * @property {boolean} [preferTrailingComment=false] Use trailing comment when both leading comment and trailing comment exist. - */ - -/** - * Options modifying the behavior of JSON serialization. - * @interface IToJSONOptions - * @property {boolean} [keepComments=false] Serializes comments. - */ - -/** - * Parses the given .proto source and returns an object with the parsed contents. - * @param {string} source Source contents - * @param {Root} root Root to populate - * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns {IParserResult} Parser result - * @property {string} filename=null Currently processing file name for error reporting, if known - * @property {IParseOptions} defaults Default {@link IParseOptions} - */ -function parse(source, root, options) { - /* eslint-disable callback-return */ - if (!(root instanceof Root)) { - options = root; - root = new Root(); - } - if (!options) - options = parse.defaults; - - var preferTrailingComment = options.preferTrailingComment || false; - var tn = tokenize(source, options.alternateCommentMode || false), - next = tn.next, - push = tn.push, - peek = tn.peek, - skip = tn.skip, - cmnt = tn.cmnt; - - var head = true, - pkg, - imports, - weakImports, - edition = "proto2"; - - var ptr = root; - - var topLevelObjects = []; - var topLevelOptions = {}; - - var applyCase = options.keepCase ? function(name) { return name; } : util.camelCase; - - function resolveFileFeatures() { - topLevelObjects.forEach(obj => { - obj._edition = edition; - Object.keys(topLevelOptions).forEach(opt => { - if (obj.getOption(opt) !== undefined) return; - obj.setOption(opt, topLevelOptions[opt], true); - }); - }); - } - - /* istanbul ignore next */ - function illegal(token, name, insideTryCatch) { - var filename = parse.filename; - if (!insideTryCatch) - parse.filename = null; - return Error("illegal " + (name || "token") + " '" + token + "' (" + (filename ? filename + ", " : "") + "line " + tn.line + ")"); - } - - function readString() { - var values = [], - token; - do { - /* istanbul ignore if */ - if ((token = next()) !== "\"" && token !== "'") - throw illegal(token); - - values.push(next()); - skip(token); - token = peek(); - } while (token === "\"" || token === "'"); - return values.join(""); - } - - function readValue(acceptTypeRef) { - var token = next(); - switch (token) { - case "'": - case "\"": - push(token); - return readString(); - case "true": case "TRUE": - return true; - case "false": case "FALSE": - return false; - } - try { - return parseNumber(token, /* insideTryCatch */ true); - } catch (e) { - /* istanbul ignore else */ - if (acceptTypeRef && typeRefRe.test(token)) - return token; - - /* istanbul ignore next */ - throw illegal(token, "value"); - } - } - - function readRanges(target, acceptStrings) { - var token, start; - do { - if (acceptStrings && ((token = peek()) === "\"" || token === "'")) { - var str = readString(); - target.push(str); - if (edition >= 2023) { - throw illegal(str, "id"); - } - } else { - try { - target.push([ start = parseId(next()), skip("to", true) ? parseId(next()) : start ]); - } catch (err) { - if (acceptStrings && typeRefRe.test(token) && edition >= 2023) { - target.push(token); - } else { - throw err; - } - } - } - } while (skip(",", true)); - var dummy = {options: undefined}; - dummy.setOption = function(name, value) { - if (this.options === undefined) this.options = {}; - this.options[name] = value; - }; - ifBlock( - dummy, - function parseRange_block(token) { - /* istanbul ignore else */ - if (token === "option") { - parseOption(dummy, token); // skip - skip(";"); - } else - throw illegal(token); - }, - function parseRange_line() { - parseInlineOptions(dummy); // skip - }); - } - - function parseNumber(token, insideTryCatch) { - var sign = 1; - if (token.charAt(0) === "-") { - sign = -1; - token = token.substring(1); - } - switch (token) { - case "inf": case "INF": case "Inf": - return sign * Infinity; - case "nan": case "NAN": case "Nan": case "NaN": - return NaN; - case "0": - return 0; - } - if (base10Re.test(token)) - return sign * parseInt(token, 10); - if (base16Re.test(token)) - return sign * parseInt(token, 16); - if (base8Re.test(token)) - return sign * parseInt(token, 8); - - /* istanbul ignore else */ - if (numberRe.test(token)) - return sign * parseFloat(token); - - /* istanbul ignore next */ - throw illegal(token, "number", insideTryCatch); - } - - function parseId(token, acceptNegative) { - switch (token) { - case "max": case "MAX": case "Max": - return 536870911; - case "0": - return 0; - } - - /* istanbul ignore if */ - if (!acceptNegative && token.charAt(0) === "-") - throw illegal(token, "id"); - - if (base10NegRe.test(token)) - return parseInt(token, 10); - if (base16NegRe.test(token)) - return parseInt(token, 16); - - /* istanbul ignore else */ - if (base8NegRe.test(token)) - return parseInt(token, 8); - - /* istanbul ignore next */ - throw illegal(token, "id"); - } - - function parsePackage() { - /* istanbul ignore if */ - if (pkg !== undefined) - throw illegal("package"); - - pkg = next(); - - /* istanbul ignore if */ - if (!typeRefRe.test(pkg)) - throw illegal(pkg, "name"); - - ptr = ptr.define(pkg); - - skip(";"); - } - - function parseImport() { - var token = peek(); - var whichImports; - switch (token) { - case "weak": - whichImports = weakImports || (weakImports = []); - next(); - break; - case "public": - next(); - // eslint-disable-next-line no-fallthrough - default: - whichImports = imports || (imports = []); - break; - } - token = readString(); - skip(";"); - whichImports.push(token); - } - - function parseSyntax() { - skip("="); - edition = readString(); - - /* istanbul ignore if */ - if (edition < 2023) - throw illegal(edition, "syntax"); - - skip(";"); - } - - function parseEdition() { - skip("="); - edition = readString(); - const supportedEditions = ["2023"]; - - /* istanbul ignore if */ - if (!supportedEditions.includes(edition)) - throw illegal(edition, "edition"); - - skip(";"); - } - - - function parseCommon(parent, token, depth) { - if (depth === undefined) - depth = 0; - // depth is checked by dispatched functions - switch (token) { - - case "option": - parseOption(parent, token); - skip(";"); - return true; - - case "message": - parseType(parent, token, depth + 1); - return true; - - case "enum": - parseEnum(parent, token); - return true; - - case "service": - parseService(parent, token, depth + 1); - return true; - - case "extend": - parseExtension(parent, token, depth); - return true; - } - return false; - } - - function ifBlock(obj, fnIf, fnElse) { - var trailingLine = tn.line; - if (obj) { - if(typeof obj.comment !== "string") { - obj.comment = cmnt(); // try block-type comment - } - obj.filename = parse.filename; - } - if (skip("{", true)) { - var token; - while ((token = next()) !== "}") - fnIf(token); - skip(";", true); - } else { - if (fnElse) - fnElse(); - skip(";"); - if (obj && (typeof obj.comment !== "string" || preferTrailingComment)) - obj.comment = cmnt(trailingLine) || obj.comment; // try line-type comment - } - } - - function parseType(parent, token, depth) { - if (depth === undefined) - depth = 0; - if (depth > util.nestingLimit) - throw Error("max depth exceeded"); - - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "type name"); - - var type = new Type(token); - ifBlock(type, function parseType_block(token) { - if (parseCommon(type, token, depth)) - return; - - switch (token) { - - case "map": - parseMapField(type, token); - break; - - case "required": - if (edition !== "proto2") - throw illegal(token); - /* eslint-disable no-fallthrough */ - case "repeated": - parseField(type, token, undefined, depth + 1); - break; - - case "optional": - /* istanbul ignore if */ - if (edition === "proto3") { - parseField(type, "proto3_optional", undefined, depth + 1); - } else if (edition !== "proto2") { - throw illegal(token); - } else { - parseField(type, "optional", undefined, depth + 1); - } - break; - - case "oneof": - parseOneOf(type, token, depth + 1); - break; - - case "extensions": - readRanges(type.extensions || (type.extensions = [])); - break; - - case "reserved": - readRanges(type.reserved || (type.reserved = []), true); - break; - - default: - /* istanbul ignore if */ - if (edition === "proto2" || !typeRefRe.test(token)) { - throw illegal(token); - } - - push(token); - parseField(type, "optional", undefined, depth + 1); - break; - } - }); - parent.add(type); - if (parent === ptr) { - topLevelObjects.push(type); - } - } - - function parseField(parent, rule, extend, depth) { - var type = next(); - if (type === "group") { - parseGroup(parent, rule, depth); - return; - } - // Type names can consume multiple tokens, in multiple variants: - // package.subpackage field tokens: "package.subpackage" [TYPE NAME ENDS HERE] "field" - // package . subpackage field tokens: "package" "." "subpackage" [TYPE NAME ENDS HERE] "field" - // package. subpackage field tokens: "package." "subpackage" [TYPE NAME ENDS HERE] "field" - // package .subpackage field tokens: "package" ".subpackage" [TYPE NAME ENDS HERE] "field" - // Keep reading tokens until we get a type name with no period at the end, - // and the next token does not start with a period. - while (type.endsWith(".") || peek().startsWith(".")) { - type += next(); - } - - /* istanbul ignore if */ - if (!typeRefRe.test(type)) - throw illegal(type, "type"); - - var name = next(); - - /* istanbul ignore if */ - - if (!nameRe.test(name)) - throw illegal(name, "name"); - - name = applyCase(name); - skip("="); - - var field = new Field(name, parseId(next()), type, rule, extend); - - ifBlock(field, function parseField_block(token) { - - /* istanbul ignore else */ - if (token === "option") { - parseOption(field, token); - skip(";"); - } else - throw illegal(token); - - }, function parseField_line() { - parseInlineOptions(field); - }); - - if (rule === "proto3_optional") { - // for proto3 optional fields, we create a single-member Oneof to mimic "optional" behavior - var oneof = new OneOf("_" + name); - field.setOption("proto3_optional", true); - oneof.add(field); - parent.add(oneof); - } else { - parent.add(field); - } - if (parent === ptr) { - topLevelObjects.push(field); - } - } - - function parseGroup(parent, rule, depth) { - if (depth === undefined) - depth = 0; - if (depth > util.nestingLimit) - throw Error("max depth exceeded"); - if (edition >= 2023) { - throw illegal("group"); - } - var name = next(); - - /* istanbul ignore if */ - if (!nameRe.test(name)) - throw illegal(name, "name"); - - var fieldName = util.lcFirst(name); - if (name === fieldName) - name = util.ucFirst(name); - skip("="); - var id = parseId(next()); - var type = new Type(name); - type.group = true; - var field = new Field(fieldName, id, name, rule); - field.filename = parse.filename; - ifBlock(type, function parseGroup_block(token) { - switch (token) { - - case "option": - parseOption(type, token); - skip(";"); - break; - case "required": - case "repeated": - parseField(type, token, undefined, depth + 1); - break; - - case "optional": - /* istanbul ignore if */ - if (edition === "proto3") { - parseField(type, "proto3_optional", undefined, depth + 1); - } else { - parseField(type, "optional", undefined, depth + 1); - } - break; - - case "message": - parseType(type, token, depth + 1); - break; - - case "enum": - parseEnum(type, token); - break; - - case "reserved": - readRanges(type.reserved || (type.reserved = []), true); - break; - - /* istanbul ignore next */ - default: - throw illegal(token); // there are no groups with proto3 semantics - } - }); - parent.add(type) - .add(field); - } - - function parseMapField(parent) { - skip("<"); - var keyType = next(); - - /* istanbul ignore if */ - if (types.mapKey[keyType] === undefined) - throw illegal(keyType, "type"); - - skip(","); - var valueType = next(); - - /* istanbul ignore if */ - if (!typeRefRe.test(valueType)) - throw illegal(valueType, "type"); - - skip(">"); - var name = next(); - - /* istanbul ignore if */ - if (!nameRe.test(name)) - throw illegal(name, "name"); - - skip("="); - var field = new MapField(applyCase(name), parseId(next()), keyType, valueType); - ifBlock(field, function parseMapField_block(token) { - - /* istanbul ignore else */ - if (token === "option") { - parseOption(field, token); - skip(";"); - } else - throw illegal(token); - - }, function parseMapField_line() { - parseInlineOptions(field); - }); - parent.add(field); - } - - function parseOneOf(parent, token, depth) { - - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "name"); - - var oneof = new OneOf(applyCase(token)); - ifBlock(oneof, function parseOneOf_block(token) { - if (token === "option") { - parseOption(oneof, token); - skip(";"); - } else { - push(token); - parseField(oneof, "optional", undefined, depth); - } - }); - parent.add(oneof); - } - - function parseEnum(parent, token) { - - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "name"); - - var enm = new Enum(token); - ifBlock(enm, function parseEnum_block(token) { - switch(token) { - case "option": - parseOption(enm, token); - skip(";"); - break; - - case "reserved": - readRanges(enm.reserved || (enm.reserved = []), true); - if(enm.reserved === undefined) enm.reserved = []; - break; - - default: - parseEnumValue(enm, token); - } - }); - parent.add(enm); - if (parent === ptr) { - topLevelObjects.push(enm); - } - } - - function parseEnumValue(parent, token) { - - /* istanbul ignore if */ - if (!nameRe.test(token)) - throw illegal(token, "name"); - - skip("="); - var value = parseId(next(), true), - dummy = { - options: undefined - }; - dummy.getOption = function(name) { - return this.options[name]; - }; - dummy.setOption = function(name, value) { - ReflectionObject.prototype.setOption.call(dummy, name, value); - }; - dummy.setParsedOption = function() { - return undefined; - }; - ifBlock(dummy, function parseEnumValue_block(token) { - - /* istanbul ignore else */ - if (token === "option") { - parseOption(dummy, token); // skip - skip(";"); - } else - throw illegal(token); - - }, function parseEnumValue_line() { - parseInlineOptions(dummy); // skip - }); - parent.add(token, value, dummy.comment, dummy.parsedOptions || dummy.options); - } - - function parseOption(parent, token) { - var option; - var propName; - var isOption = true; - if (token === "option") { - token = next(); - } - - while (token !== "=") { - if (token === "(") { - var parensValue = next(); - skip(")"); - token = "(" + parensValue + ")"; - } - if (isOption) { - isOption = false; - if (token.includes(".") && !token.includes("(")) { - var tokens = token.split("."); - option = tokens[0] + "."; - token = tokens[1]; - continue; - } - option = token; - } else { - propName = propName ? propName += token : token; - } - token = next(); - } - var name = propName ? option.concat(propName) : option; - var optionValue = parseOptionValue(parent, name); - propName = propName && propName[0] === "." ? propName.slice(1) : propName; - option = option && option[option.length - 1] === "." ? option.slice(0, -1) : option; - setParsedOption(parent, option, optionValue, propName); - } - - function parseOptionValue(parent, name, depth) { - if (depth === undefined) - depth = 0; - if (depth > util.recursionLimit) - throw Error("max depth exceeded"); - // { a: "foo" b { c: "bar" } } - if (skip("{", true)) { - var objectResult = {}; - - while (!skip("}", true)) { - /* istanbul ignore if */ - if (!nameRe.test(token = next())) { - throw illegal(token, "name"); - } - if (token === null) { - throw illegal(token, "end of input"); - } - - var value; - var propName = token; - - skip(":", true); - - if (peek() === "{") { - // option (my_option) = { - // repeated_value: [ "foo", "bar" ] - // }; - value = parseOptionValue(parent, name + "." + token, depth + 1); - } else if (peek() === "[") { - value = []; - var lastValue; - if (skip("[", true)) { - do { - lastValue = readValue(true); - value.push(lastValue); - } while (skip(",", true)); - skip("]"); - if (typeof lastValue !== "undefined") { - setOption(parent, name + "." + token, lastValue); - } - } - } else { - value = readValue(true); - setOption(parent, name + "." + token, value); - } - - var prevValue = objectResult[propName]; - - if (prevValue) - value = [].concat(prevValue).concat(value); - - if (propName !== "__proto__") - objectResult[propName] = value; - - // Semicolons and commas can be optional - skip(",", true); - skip(";", true); - } - - return objectResult; - } - - var simpleValue = readValue(true); - setOption(parent, name, simpleValue); - return simpleValue; - // Does not enforce a delimiter to be universal - } - - function setOption(parent, name, value) { - if (ptr === parent && /^features\./.test(name)) { - topLevelOptions[name] = value; - return; - } - if (parent.setOption) - parent.setOption(name, value); - } - - function setParsedOption(parent, name, value, propName) { - if (parent.setParsedOption) - parent.setParsedOption(name, value, propName); - } - - function parseInlineOptions(parent) { - if (skip("[", true)) { - do { - parseOption(parent, "option"); - } while (skip(",", true)); - skip("]"); - } - return parent; - } - - function parseService(parent, token, depth) { - if (depth === undefined) - depth = 0; - if (depth > util.recursionLimit) - throw Error("max depth exceeded"); - - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "service name"); - - var service = new Service(token); - ifBlock(service, function parseService_block(token) { - if (parseCommon(service, token, depth)) { - return; - } - - /* istanbul ignore else */ - if (token === "rpc") - parseMethod(service, token); - else - throw illegal(token); - }); - parent.add(service); - if (parent === ptr) { - topLevelObjects.push(service); - } - } - - function parseMethod(parent, token) { - // Get the comment of the preceding line now (if one exists) in case the - // method is defined across multiple lines. - var commentText = cmnt(); - - var type = token; - - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "name"); - - var name = token, - requestType, requestStream, - responseType, responseStream; - - skip("("); - if (skip("stream", true)) - requestStream = true; - - /* istanbul ignore if */ - if (!typeRefRe.test(token = next())) - throw illegal(token); - - requestType = token; - skip(")"); skip("returns"); skip("("); - if (skip("stream", true)) - responseStream = true; - - /* istanbul ignore if */ - if (!typeRefRe.test(token = next())) - throw illegal(token); - - responseType = token; - skip(")"); - - var method = new Method(name, type, requestType, responseType, requestStream, responseStream); - method.comment = commentText; - ifBlock(method, function parseMethod_block(token) { - - /* istanbul ignore else */ - if (token === "option") { - parseOption(method, token); - skip(";"); - } else - throw illegal(token); - - }); - parent.add(method); - } - - function parseExtension(parent, token, depth) { - - /* istanbul ignore if */ - if (!typeRefRe.test(token = next())) - throw illegal(token, "reference"); - - var reference = token; - ifBlock(null, function parseExtension_block(token) { - switch (token) { - - case "required": - case "repeated": - parseField(parent, token, reference, depth + 1); - break; - - case "optional": - /* istanbul ignore if */ - if (edition === "proto3") { - parseField(parent, "proto3_optional", reference, depth + 1); - } else { - parseField(parent, "optional", reference, depth + 1); - } - break; - - default: - /* istanbul ignore if */ - if (edition === "proto2" || !typeRefRe.test(token)) - throw illegal(token); - push(token); - parseField(parent, "optional", reference, depth + 1); - break; - } - }); - } - - var token; - while ((token = next()) !== null) { - switch (token) { - - case "package": - - /* istanbul ignore if */ - if (!head) - throw illegal(token); - - parsePackage(); - break; - - case "import": - - /* istanbul ignore if */ - if (!head) - throw illegal(token); - - parseImport(); - break; - - case "syntax": - - /* istanbul ignore if */ - if (!head) - throw illegal(token); - - parseSyntax(); - break; - - case "edition": - /* istanbul ignore if */ - if (!head) - throw illegal(token); - parseEdition(); - break; - - case "option": - parseOption(ptr, token); - skip(";", true); - break; - - default: - - /* istanbul ignore else */ - if (parseCommon(ptr, token, 0)) { - head = false; - continue; - } - - /* istanbul ignore next */ - throw illegal(token); - } - } - - resolveFileFeatures(); - - parse.filename = null; - return { - "package" : pkg, - "imports" : imports, - weakImports : weakImports, - root : root - }; -} - -/** - * Parses the given .proto source and returns an object with the parsed contents. - * @name parse - * @function - * @param {string} source Source contents - * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns {IParserResult} Parser result - * @property {string} filename=null Currently processing file name for error reporting, if known - * @property {IParseOptions} defaults Default {@link IParseOptions} - * @variation 2 - */ diff --git a/node_modules/protobufjs/src/reader.js b/node_modules/protobufjs/src/reader.js deleted file mode 100644 index 7639207..0000000 --- a/node_modules/protobufjs/src/reader.js +++ /dev/null @@ -1,426 +0,0 @@ -"use strict"; -module.exports = Reader; - -var util = require("./util/minimal"); - -var BufferReader; // cyclic - -var LongBits = util.LongBits, - utf8 = util.utf8; - -/* istanbul ignore next */ -function indexOutOfRange(reader, writeLength) { - return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len); -} - -/** - * Constructs a new reader instance using the specified buffer. - * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`. - * @constructor - * @param {Uint8Array} buffer Buffer to read from - */ -function Reader(buffer) { - - /** - * Read buffer. - * @type {Uint8Array} - */ - this.buf = buffer; - - /** - * Read buffer position. - * @type {number} - */ - this.pos = 0; - - /** - * Read buffer length. - * @type {number} - */ - this.len = buffer.length; -} - -var create_array = typeof Uint8Array !== "undefined" - ? function create_typed_array(buffer) { - if (buffer instanceof Uint8Array || Array.isArray(buffer)) - return new Reader(buffer); - throw Error("illegal buffer"); - } - /* istanbul ignore next */ - : function create_array(buffer) { - if (Array.isArray(buffer)) - return new Reader(buffer); - throw Error("illegal buffer"); - }; - -var create = function create() { - return util.Buffer - ? function create_buffer_setup(buffer) { - return (Reader.create = function create_buffer(buffer) { - return util.Buffer.isBuffer(buffer) - ? new BufferReader(buffer) - /* istanbul ignore next */ - : create_array(buffer); - })(buffer); - } - /* istanbul ignore next */ - : create_array; -}; - -/** - * Creates a new reader using the specified buffer. - * @function - * @param {Uint8Array|Buffer} buffer Buffer to read from - * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} - * @throws {Error} If `buffer` is not a valid buffer - */ -Reader.create = create(); - -Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice; - -/** - * Reads a varint as an unsigned 32 bit value. - * @function - * @returns {number} Value read - */ -Reader.prototype.uint32 = (function read_uint32_setup() { - var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!) - return function read_uint32() { - value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value; - - /* istanbul ignore if */ - if ((this.pos += 5) > this.len) { - this.pos = this.len; - throw indexOutOfRange(this, 10); - } - return value; - }; -})(); - -/** - * Reads a varint as a signed 32 bit value. - * @returns {number} Value read - */ -Reader.prototype.int32 = function read_int32() { - return this.uint32() | 0; -}; - -/** - * Reads a zig-zag encoded varint as a signed 32 bit value. - * @returns {number} Value read - */ -Reader.prototype.sint32 = function read_sint32() { - var value = this.uint32(); - return value >>> 1 ^ -(value & 1) | 0; -}; - -/* eslint-disable no-invalid-this */ - -function readLongVarint() { - // tends to deopt with local vars for octet etc. - var bits = new LongBits(0, 0); - var i = 0; - if (this.len - this.pos > 4) { // fast route (lo) - for (; i < 4; ++i) { - // 1st..4th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - // 5th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; - bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - i = 0; - } else { - for (; i < 3; ++i) { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - // 1st..3th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - // 4th - bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; - return bits; - } - if (this.len - this.pos > 4) { // fast route (hi) - for (; i < 5; ++i) { - // 6th..10th - bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - } else { - for (; i < 5; ++i) { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - // 6th..10th - bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - } - /* istanbul ignore next */ - throw Error("invalid varint encoding"); -} - -/* eslint-enable no-invalid-this */ - -/** - * Reads a varint as a signed 64 bit value. - * @name Reader#int64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a varint as an unsigned 64 bit value. - * @name Reader#uint64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a zig-zag encoded varint as a signed 64 bit value. - * @name Reader#sint64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a varint as a boolean. - * @returns {boolean} Value read - */ -Reader.prototype.bool = function read_bool() { - return this.uint32() !== 0; -}; - -function readFixed32_end(buf, end) { // note that this uses `end`, not `pos` - return (buf[end - 4] - | buf[end - 3] << 8 - | buf[end - 2] << 16 - | buf[end - 1] << 24) >>> 0; -} - -/** - * Reads fixed 32 bits as an unsigned 32 bit integer. - * @returns {number} Value read - */ -Reader.prototype.fixed32 = function read_fixed32() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - return readFixed32_end(this.buf, this.pos += 4); -}; - -/** - * Reads fixed 32 bits as a signed 32 bit integer. - * @returns {number} Value read - */ -Reader.prototype.sfixed32 = function read_sfixed32() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - return readFixed32_end(this.buf, this.pos += 4) | 0; -}; - -/* eslint-disable no-invalid-this */ - -function readFixed64(/* this: Reader */) { - - /* istanbul ignore if */ - if (this.pos + 8 > this.len) - throw indexOutOfRange(this, 8); - - return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4)); -} - -/* eslint-enable no-invalid-this */ - -/** - * Reads fixed 64 bits. - * @name Reader#fixed64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads zig-zag encoded fixed 64 bits. - * @name Reader#sfixed64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a float (32 bit) as a number. - * @function - * @returns {number} Value read - */ -Reader.prototype.float = function read_float() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - var value = util.float.readFloatLE(this.buf, this.pos); - this.pos += 4; - return value; -}; - -/** - * Reads a double (64 bit float) as a number. - * @function - * @returns {number} Value read - */ -Reader.prototype.double = function read_double() { - - /* istanbul ignore if */ - if (this.pos + 8 > this.len) - throw indexOutOfRange(this, 4); - - var value = util.float.readDoubleLE(this.buf, this.pos); - this.pos += 8; - return value; -}; - -/** - * Reads a sequence of bytes preceeded by its length as a varint. - * @returns {Uint8Array} Value read - */ -Reader.prototype.bytes = function read_bytes() { - var length = this.uint32(), - start = this.pos, - end = this.pos + length; - - /* istanbul ignore if */ - if (end > this.len) - throw indexOutOfRange(this, length); - - this.pos += length; - if (Array.isArray(this.buf)) // plain array - return this.buf.slice(start, end); - - if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1 - var nativeBuffer = util.Buffer; - return nativeBuffer - ? nativeBuffer.alloc(0) - : new this.buf.constructor(0); - } - return this._slice.call(this.buf, start, end); -}; - -/** - * Reads a string preceeded by its byte length as a varint. - * @returns {string} Value read - */ -Reader.prototype.string = function read_string() { - var bytes = this.bytes(); - return utf8.read(bytes, 0, bytes.length); -}; - -/** - * Skips the specified number of bytes if specified, otherwise skips a varint. - * @param {number} [length] Length if known, otherwise a varint is assumed - * @returns {Reader} `this` - */ -Reader.prototype.skip = function skip(length) { - if (typeof length === "number") { - /* istanbul ignore if */ - if (this.pos + length > this.len) - throw indexOutOfRange(this, length); - this.pos += length; - } else { - do { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - } while (this.buf[this.pos++] & 128); - } - return this; -}; - -/** - * Recursion limit. - * @type {number} - */ -Reader.recursionLimit = util.recursionLimit; - -/** - * Skips the next element of the specified wire type. - * @param {number} wireType Wire type received - * @param {number} [depth] Depth of recursion to control nested calls; 0 if omitted - * @returns {Reader} `this` - */ -Reader.prototype.skipType = function(wireType, depth) { - if (depth === undefined) depth = 0; - if (depth > Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - switch (wireType) { - case 0: - this.skip(); - break; - case 1: - this.skip(8); - break; - case 2: - this.skip(this.uint32()); - break; - case 3: - while ((wireType = this.uint32() & 7) !== 4) { - this.skipType(wireType, depth + 1); - } - break; - case 5: - this.skip(4); - break; - - /* istanbul ignore next */ - default: - throw Error("invalid wire type " + wireType + " at offset " + this.pos); - } - return this; -}; - -Reader._configure = function(BufferReader_) { - BufferReader = BufferReader_; - Reader.create = create(); - BufferReader._configure(); - - var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; - util.merge(Reader.prototype, { - - int64: function read_int64() { - return readLongVarint.call(this)[fn](false); - }, - - uint64: function read_uint64() { - return readLongVarint.call(this)[fn](true); - }, - - sint64: function read_sint64() { - return readLongVarint.call(this).zzDecode()[fn](false); - }, - - fixed64: function read_fixed64() { - return readFixed64.call(this)[fn](true); - }, - - sfixed64: function read_sfixed64() { - return readFixed64.call(this)[fn](false); - } - - }); -}; diff --git a/node_modules/protobufjs/src/reader_buffer.js b/node_modules/protobufjs/src/reader_buffer.js deleted file mode 100644 index e547424..0000000 --- a/node_modules/protobufjs/src/reader_buffer.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -module.exports = BufferReader; - -// extends Reader -var Reader = require("./reader"); -(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; - -var util = require("./util/minimal"); - -/** - * Constructs a new buffer reader instance. - * @classdesc Wire format reader using node buffers. - * @extends Reader - * @constructor - * @param {Buffer} buffer Buffer to read from - */ -function BufferReader(buffer) { - Reader.call(this, buffer); - - /** - * Read buffer. - * @name BufferReader#buf - * @type {Buffer} - */ -} - -BufferReader._configure = function () { - /* istanbul ignore else */ - if (util.Buffer) - BufferReader.prototype._slice = util.Buffer.prototype.slice; -}; - - -/** - * @override - */ -BufferReader.prototype.string = function read_string_buffer() { - var len = this.uint32(); // modifies pos - return this.buf.utf8Slice - ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) - : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len)); -}; - -/** - * Reads a sequence of bytes preceeded by its length as a varint. - * @name BufferReader#bytes - * @function - * @returns {Buffer} Value read - */ - -BufferReader._configure(); diff --git a/node_modules/protobufjs/src/root.js b/node_modules/protobufjs/src/root.js deleted file mode 100644 index dfc49a3..0000000 --- a/node_modules/protobufjs/src/root.js +++ /dev/null @@ -1,412 +0,0 @@ -"use strict"; -module.exports = Root; - -// extends Namespace -var Namespace = require("./namespace"); -((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = "Root"; - -var Field = require("./field"), - Enum = require("./enum"), - OneOf = require("./oneof"), - util = require("./util"); - -var Type, // cyclic - parse, // might be excluded - common; // " - -/** - * Constructs a new root namespace instance. - * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. - * @extends NamespaceBase - * @constructor - * @param {Object.} [options] Top level options - */ -function Root(options) { - Namespace.call(this, "", options); - - /** - * Deferred extension fields. - * @type {Field[]} - */ - this.deferred = []; - - /** - * Resolved file names of loaded files. - * @type {string[]} - */ - this.files = []; - - /** - * Edition, defaults to proto2 if unspecified. - * @type {string} - * @private - */ - this._edition = "proto2"; - - /** - * Global lookup cache of fully qualified names. - * @type {Object.} - * @private - */ - this._fullyQualifiedObjects = {}; -} - -/** - * Loads a namespace descriptor into a root namespace. - * @param {INamespace} json Namespace descriptor - * @param {Root} [root] Root namespace, defaults to create a new one if omitted - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Root} Root namespace - */ -Root.fromJSON = function fromJSON(json, root, depth) { - depth = util.checkDepth(depth); - if (!root) - root = new Root(); - if (json.options) - root.setOptions(json.options); - return root.addJSON(json.nested, depth).resolveAll(); -}; - -/** - * Resolves the path of an imported file, relative to the importing origin. - * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories. - * @function - * @param {string} origin The file name of the importing file - * @param {string} target The file name being imported - * @returns {string|null} Resolved path to `target` or `null` to skip the file - */ -Root.prototype.resolvePath = util.path.resolve; - -/** - * Fetch content from file path or url - * This method exists so you can override it with your own logic. - * @function - * @param {string} path File path or url - * @param {FetchCallback} callback Callback function - * @returns {undefined} - */ -Root.prototype.fetch = util.fetch; - -// A symbol-like function to safely signal synchronous loading -/* istanbul ignore next */ -function SYNC() {} // eslint-disable-line no-empty-function - -/** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. - * @param {string|string[]} filename Names of one or multiple files to load - * @param {IParseOptions} options Parse options - * @param {LoadCallback} callback Callback function - * @returns {undefined} - */ -Root.prototype.load = function load(filename, options, callback) { - if (typeof options === "function") { - callback = options; - options = undefined; - } - var self = this; - if (!callback) { - return util.asPromise(load, self, filename, options); - } - - var sync = callback === SYNC; // undocumented - - // Finishes loading by calling the callback (exactly once) - function finish(err, root) { - /* istanbul ignore if */ - if (!callback) { - return; - } - if (sync) { - throw err; - } - if (root) { - root.resolveAll(); - } - var cb = callback; - callback = null; - cb(err, root); - } - - // Bundled definition existence checking - function getBundledFileName(filename) { - var idx = filename.lastIndexOf("google/protobuf/"); - if (idx > -1) { - var altname = filename.substring(idx); - if (altname in common) return altname; - } - return null; - } - - // Processes a single file - function process(filename, source, depth) { - if (depth === undefined) - depth = 0; - try { - if (depth > util.recursionLimit) - throw Error("max depth exceeded"); - if (util.isString(source) && source.charAt(0) === "{") - source = JSON.parse(source); - if (!util.isString(source)) - self.setOptions(source.options).addJSON(source.nested); - else { - parse.filename = filename; - var parsed = parse(source, self, options), - resolved, - i = 0; - if (parsed.imports) - for (; i < parsed.imports.length; ++i) - if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i])) - fetch(resolved, false, depth + 1); - if (parsed.weakImports) - for (i = 0; i < parsed.weakImports.length; ++i) - if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i])) - fetch(resolved, true, depth + 1); - } - } catch (err) { - finish(err); - } - if (!sync && !queued) { - finish(null, self); // only once anyway - } - } - - // Fetches a single file - function fetch(filename, weak, depth) { - if (depth === undefined) - depth = 0; - filename = getBundledFileName(filename) || filename; - - // Skip if already loaded / attempted - if (self.files.indexOf(filename) > -1) { - return; - } - self.files.push(filename); - - // Shortcut bundled definitions - if (filename in common) { - if (sync) { - process(filename, common[filename], depth); - } else { - ++queued; - setTimeout(function() { - --queued; - process(filename, common[filename], depth); - }); - } - return; - } - - // Otherwise fetch from disk or network - if (sync) { - var source; - try { - source = util.fs.readFileSync(filename).toString("utf8"); - } catch (err) { - if (!weak) - finish(err); - return; - } - process(filename, source, depth); - } else { - ++queued; - self.fetch(filename, function(err, source) { - --queued; - /* istanbul ignore if */ - if (!callback) { - return; // terminated meanwhile - } - if (err) { - /* istanbul ignore else */ - if (!weak) - finish(err); - else if (!queued) // can't be covered reliably - finish(null, self); - return; - } - process(filename, source, depth); - }); - } - } - var queued = 0; - - // Assembling the root namespace doesn't require working type - // references anymore, so we can load everything in parallel - if (util.isString(filename)) { - filename = [ filename ]; - } - for (var i = 0, resolved; i < filename.length; ++i) - if (resolved = self.resolvePath("", filename[i])) - fetch(resolved); - if (sync) { - self.resolveAll(); - return self; - } - if (!queued) { - finish(null, self); - } - - return self; -}; -// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined - -/** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. - * @function Root#load - * @param {string|string[]} filename Names of one or multiple files to load - * @param {LoadCallback} callback Callback function - * @returns {undefined} - * @variation 2 - */ -// function load(filename:string, callback:LoadCallback):undefined - -/** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise. - * @function Root#load - * @param {string|string[]} filename Names of one or multiple files to load - * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns {Promise} Promise - * @variation 3 - */ -// function load(filename:string, [options:IParseOptions]):Promise - -/** - * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only). - * @function Root#loadSync - * @param {string|string[]} filename Names of one or multiple files to load - * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns {Root} Root namespace - * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid - */ -Root.prototype.loadSync = function loadSync(filename, options) { - if (!util.isNode) - throw Error("not supported"); - return this.load(filename, options, SYNC); -}; - -/** - * @override - */ -Root.prototype.resolveAll = function resolveAll() { - if (!this._needsRecursiveResolve) return this; - - if (this.deferred.length) - throw Error("unresolvable extensions: " + this.deferred.map(function(field) { - return "'extend " + field.extend + "' in " + field.parent.fullName; - }).join(", ")); - return Namespace.prototype.resolveAll.call(this); -}; - -// only uppercased (and thus conflict-free) children are exposed, see below -var exposeRe = /^[A-Z]/; - -/** - * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type. - * @param {Root} root Root instance - * @param {Field} field Declaring extension field witin the declaring type - * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise - * @inner - * @ignore - */ -function tryHandleExtension(root, field) { - var extendedType = field.parent.lookup(field.extend); - if (extendedType) { - var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options); - //do not allow to extend same field twice to prevent the error - if (extendedType.get(sisterField.name)) { - return true; - } - sisterField.declaringField = field; - field.extensionField = sisterField; - extendedType.add(sisterField); - return true; - } - return false; -} - -/** - * Called when any object is added to this root or its sub-namespaces. - * @param {ReflectionObject} object Object added - * @returns {undefined} - * @private - */ -Root.prototype._handleAdd = function _handleAdd(object) { - if (object instanceof Field) { - - if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField) - if (!tryHandleExtension(this, object)) - this.deferred.push(object); - - } else if (object instanceof Enum) { - - if (exposeRe.test(object.name)) - object.parent[object.name] = object.values; // expose enum values as property of its parent - - } else if (!(object instanceof OneOf)) /* everything else is a namespace */ { - - if (object instanceof Type) // Try to handle any deferred extensions - for (var i = 0; i < this.deferred.length;) - if (tryHandleExtension(this, this.deferred[i])) - this.deferred.splice(i, 1); - else - ++i; - for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace - this._handleAdd(object._nestedArray[j]); - if (exposeRe.test(object.name)) - object.parent[object.name] = object; // expose namespace as property of its parent - } - - if (object instanceof Type || object instanceof Enum || object instanceof Field) { - // Only store types and enums for quick lookup during resolve. - this._fullyQualifiedObjects[object.fullName] = object; - } - - // The above also adds uppercased (and thus conflict-free) nested types, services and enums as - // properties of namespaces just like static code does. This allows using a .d.ts generated for - // a static module with reflection-based solutions where the condition is met. -}; - -/** - * Called when any object is removed from this root or its sub-namespaces. - * @param {ReflectionObject} object Object removed - * @returns {undefined} - * @private - */ -Root.prototype._handleRemove = function _handleRemove(object) { - if (object instanceof Field) { - - if (/* an extension field */ object.extend !== undefined) { - if (/* already handled */ object.extensionField) { // remove its sister field - object.extensionField.parent.remove(object.extensionField); - object.extensionField = null; - } else { // cancel the extension - var index = this.deferred.indexOf(object); - /* istanbul ignore else */ - if (index > -1) - this.deferred.splice(index, 1); - } - } - - } else if (object instanceof Enum) { - - if (exposeRe.test(object.name)) - delete object.parent[object.name]; // unexpose enum values - - } else if (object instanceof Namespace) { - - for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace - this._handleRemove(object._nestedArray[i]); - - if (exposeRe.test(object.name)) - delete object.parent[object.name]; // unexpose namespaces - - } - - delete this._fullyQualifiedObjects[object.fullName]; -}; - -// Sets up cyclic dependencies (called in index-light) -Root._configure = function(Type_, parse_, common_) { - Type = Type_; - parse = parse_; - common = common_; -}; diff --git a/node_modules/protobufjs/src/roots.js b/node_modules/protobufjs/src/roots.js deleted file mode 100644 index 1d93086..0000000 --- a/node_modules/protobufjs/src/roots.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -module.exports = {}; - -/** - * Named roots. - * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). - * Can also be used manually to make roots available across modules. - * @name roots - * @type {Object.} - * @example - * // pbjs -r myroot -o compiled.js ... - * - * // in another module: - * require("./compiled.js"); - * - * // in any subsequent module: - * var root = protobuf.roots["myroot"]; - */ diff --git a/node_modules/protobufjs/src/rpc.js b/node_modules/protobufjs/src/rpc.js deleted file mode 100644 index 894e5c7..0000000 --- a/node_modules/protobufjs/src/rpc.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -/** - * Streaming RPC helpers. - * @namespace - */ -var rpc = exports; - -/** - * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. - * @typedef RPCImpl - * @type {function} - * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called - * @param {Uint8Array} requestData Request data - * @param {RPCImplCallback} callback Callback function - * @returns {undefined} - * @example - * function rpcImpl(method, requestData, callback) { - * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code - * throw Error("no such method"); - * asynchronouslyObtainAResponse(requestData, function(err, responseData) { - * callback(err, responseData); - * }); - * } - */ - -/** - * Node-style callback as used by {@link RPCImpl}. - * @typedef RPCImplCallback - * @type {function} - * @param {Error|null} error Error, if any, otherwise `null` - * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error - * @returns {undefined} - */ - -rpc.Service = require("./rpc/service"); diff --git a/node_modules/protobufjs/src/rpc/service.js b/node_modules/protobufjs/src/rpc/service.js deleted file mode 100644 index 757f382..0000000 --- a/node_modules/protobufjs/src/rpc/service.js +++ /dev/null @@ -1,142 +0,0 @@ -"use strict"; -module.exports = Service; - -var util = require("../util/minimal"); - -// Extends EventEmitter -(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service; - -/** - * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. - * - * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. - * @typedef rpc.ServiceMethodCallback - * @template TRes extends Message - * @type {function} - * @param {Error|null} error Error, if any - * @param {TRes} [response] Response message - * @returns {undefined} - */ - -/** - * A service method part of a {@link rpc.Service} as created by {@link Service.create}. - * @typedef rpc.ServiceMethod - * @template TReq extends Message - * @template TRes extends Message - * @type {function} - * @param {TReq|Properties} request Request message or plain object - * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message - * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined` - */ - -/** - * Constructs a new RPC service instance. - * @classdesc An RPC service as returned by {@link Service#create}. - * @exports rpc.Service - * @extends util.EventEmitter - * @constructor - * @param {RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ -function Service(rpcImpl, requestDelimited, responseDelimited) { - - if (typeof rpcImpl !== "function") - throw TypeError("rpcImpl must be a function"); - - util.EventEmitter.call(this); - - /** - * RPC implementation. Becomes `null` once the service is ended. - * @type {RPCImpl|null} - */ - this.rpcImpl = rpcImpl; - - /** - * Whether requests are length-delimited. - * @type {boolean} - */ - this.requestDelimited = Boolean(requestDelimited); - - /** - * Whether responses are length-delimited. - * @type {boolean} - */ - this.responseDelimited = Boolean(responseDelimited); -} - -/** - * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. - * @param {Method|rpc.ServiceMethod} method Reflected or static method - * @param {Constructor} requestCtor Request constructor - * @param {Constructor} responseCtor Response constructor - * @param {TReq|Properties} request Request message or plain object - * @param {rpc.ServiceMethodCallback} callback Service callback - * @returns {undefined} - * @template TReq extends Message - * @template TRes extends Message - */ -Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) { - - if (!request) - throw TypeError("request must be specified"); - - var self = this; - if (!callback) - return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request); - - if (!self.rpcImpl) { - setTimeout(function() { callback(Error("already ended")); }, 0); - return undefined; - } - - try { - return self.rpcImpl( - method, - requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(), - function rpcCallback(err, response) { - - if (err) { - self.emit("error", err, method); - return callback(err); - } - - if (response === null) { - self.end(/* endedByRPC */ true); - return undefined; - } - - if (!(response instanceof responseCtor)) { - try { - response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response); - } catch (err) { - self.emit("error", err, method); - return callback(err); - } - } - - self.emit("data", response, method); - return callback(null, response); - } - ); - } catch (err) { - self.emit("error", err, method); - setTimeout(function() { callback(err); }, 0); - return undefined; - } -}; - -/** - * Ends this service and emits the `end` event. - * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. - * @returns {rpc.Service} `this` - */ -Service.prototype.end = function end(endedByRPC) { - if (this.rpcImpl) { - if (!endedByRPC) // signal end to rpcImpl - this.rpcImpl(null, null, null); - this.rpcImpl = null; - this.emit("end").off(); - } - return this; -}; diff --git a/node_modules/protobufjs/src/service.js b/node_modules/protobufjs/src/service.js deleted file mode 100644 index 8abba48..0000000 --- a/node_modules/protobufjs/src/service.js +++ /dev/null @@ -1,195 +0,0 @@ -"use strict"; -module.exports = Service; - -// extends Namespace -var Namespace = require("./namespace"); -((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = "Service"; - -var Method = require("./method"), - util = require("./util"), - rpc = require("./rpc"); - -var reservedRe = util.patterns.reservedRe; - -/** - * Constructs a new service instance. - * @classdesc Reflected service. - * @extends NamespaceBase - * @constructor - * @param {string} name Service name - * @param {Object.} [options] Service options - * @throws {TypeError} If arguments are invalid - */ -function Service(name, options) { - Namespace.call(this, name, options); - - /** - * Service methods. - * @type {Object.} - */ - this.methods = {}; // toJSON, marker - - /** - * Cached methods as an array. - * @type {Method[]|null} - * @private - */ - this._methodsArray = null; -} - -/** - * Service descriptor. - * @interface IService - * @extends INamespace - * @property {Object.} methods Method descriptors - */ - -/** - * Constructs a service from a service descriptor. - * @param {string} name Service name - * @param {IService} json Service descriptor - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Service} Created service - * @throws {TypeError} If arguments are invalid - */ -Service.fromJSON = function fromJSON(name, json, depth) { - depth = util.checkDepth(depth); - var service = new Service(name, json.options); - /* istanbul ignore else */ - if (json.methods) - for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i) - service.add(Method.fromJSON(names[i], json.methods[names[i]])); - if (json.nested) - service.addJSON(json.nested, depth); - if (json.edition) - service._edition = json.edition; - service.comment = json.comment; - service._defaultEdition = "proto3"; // For backwards-compatibility. - return service; -}; - -/** - * Converts this service to a service descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IService} Service descriptor - */ -Service.prototype.toJSON = function toJSON(toJSONOptions) { - var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "edition" , this._editionToJSON(), - "options" , inherited && inherited.options || undefined, - "methods" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {}, - "nested" , inherited && inherited.nested || undefined, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * Methods of this service as an array for iteration. - * @name Service#methodsArray - * @type {Method[]} - * @readonly - */ -Object.defineProperty(Service.prototype, "methodsArray", { - get: function() { - return this._methodsArray || (this._methodsArray = util.toArray(this.methods)); - } -}); - -function clearCache(service) { - service._methodsArray = null; - return service; -} - -/** - * @override - */ -Service.prototype.get = function get(name) { - return Object.prototype.hasOwnProperty.call(this.methods, name) - ? this.methods[name] - : Namespace.prototype.get.call(this, name); -}; - -/** - * @override - */ -Service.prototype.resolveAll = function resolveAll() { - if (!this._needsRecursiveResolve) return this; - - Namespace.prototype.resolve.call(this); - var methods = this.methodsArray; - for (var i = 0; i < methods.length; ++i) - methods[i].resolve(); - return this; -}; - -/** - * @override - */ -Service.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) { - if (!this._needsRecursiveFeatureResolution) return this; - - edition = this._edition || edition; - - Namespace.prototype._resolveFeaturesRecursive.call(this, edition); - this.methodsArray.forEach(method => { - method._resolveFeaturesRecursive(edition); - }); - return this; -}; - -/** - * @override - */ -Service.prototype.add = function add(object) { - /* istanbul ignore if */ - if (this.get(object.name)) - throw Error("duplicate name '" + object.name + "' in " + this); - - if (object instanceof Method) { - if (object.name === "__proto__") - return this; - this.methods[object.name] = object; - object.parent = this; - return clearCache(this); - } - return Namespace.prototype.add.call(this, object); -}; - -/** - * @override - */ -Service.prototype.remove = function remove(object) { - if (object instanceof Method) { - - /* istanbul ignore if */ - if (this.methods[object.name] !== object) - throw Error(object + " is not a member of " + this); - - delete this.methods[object.name]; - object.parent = null; - return clearCache(this); - } - return Namespace.prototype.remove.call(this, object); -}; - -/** - * Creates a runtime service using the specified rpc implementation. - * @param {RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed. - */ -Service.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) { - var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited); - for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) { - var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\w_]/g, ""); - rpcService[methodName] = util.codegen(["r","c"], reservedRe.test(methodName) ? methodName + "_" : methodName)("return this.rpcCall(m,q,s,r,c)")({ - m: method, - q: method.resolvedRequestType.ctor, - s: method.resolvedResponseType.ctor - }); - } - return rpcService; -}; diff --git a/node_modules/protobufjs/src/tokenize.js b/node_modules/protobufjs/src/tokenize.js deleted file mode 100644 index f107bea..0000000 --- a/node_modules/protobufjs/src/tokenize.js +++ /dev/null @@ -1,416 +0,0 @@ -"use strict"; -module.exports = tokenize; - -var delimRe = /[\s{}=;:[\],'"()<>]/g, - stringDoubleRe = /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, - stringSingleRe = /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g; - -var setCommentRe = /^ *[*/]+ */, - setCommentAltRe = /^\s*\*?\/*/, - setCommentSplitRe = /\n/g, - whitespaceRe = /\s/, - unescapeRe = /\\(.?)/g; - -var unescapeMap = { - "0": "\0", - "r": "\r", - "n": "\n", - "t": "\t" -}; - -/** - * Unescapes a string. - * @param {string} str String to unescape - * @returns {string} Unescaped string - * @property {Object.} map Special characters map - * @memberof tokenize - */ -function unescape(str) { - return str.replace(unescapeRe, function($0, $1) { - switch ($1) { - case "\\": - case "": - return $1; - default: - return unescapeMap[$1] || ""; - } - }); -} - -tokenize.unescape = unescape; - -/** - * Gets the next token and advances. - * @typedef TokenizerHandleNext - * @type {function} - * @returns {string|null} Next token or `null` on eof - */ - -/** - * Peeks for the next token. - * @typedef TokenizerHandlePeek - * @type {function} - * @returns {string|null} Next token or `null` on eof - */ - -/** - * Pushes a token back to the stack. - * @typedef TokenizerHandlePush - * @type {function} - * @param {string} token Token - * @returns {undefined} - */ - -/** - * Skips the next token. - * @typedef TokenizerHandleSkip - * @type {function} - * @param {string} expected Expected token - * @param {boolean} [optional=false] If optional - * @returns {boolean} Whether the token matched - * @throws {Error} If the token didn't match and is not optional - */ - -/** - * Gets the comment on the previous line or, alternatively, the line comment on the specified line. - * @typedef TokenizerHandleCmnt - * @type {function} - * @param {number} [line] Line number - * @returns {string|null} Comment text or `null` if none - */ - -/** - * Handle object returned from {@link tokenize}. - * @interface ITokenizerHandle - * @property {TokenizerHandleNext} next Gets the next token and advances (`null` on eof) - * @property {TokenizerHandlePeek} peek Peeks for the next token (`null` on eof) - * @property {TokenizerHandlePush} push Pushes a token back to the stack - * @property {TokenizerHandleSkip} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws - * @property {TokenizerHandleCmnt} cmnt Gets the comment on the previous line or the line comment on the specified line, if any - * @property {number} line Current line number - */ - -/** - * Tokenizes the given .proto source and returns an object with useful utility functions. - * @param {string} source Source contents - * @param {boolean} alternateCommentMode Whether we should activate alternate comment parsing mode. - * @returns {ITokenizerHandle} Tokenizer handle - */ -function tokenize(source, alternateCommentMode) { - /* eslint-disable callback-return */ - source = source.toString(); - - var offset = 0, - length = source.length, - line = 1, - lastCommentLine = 0, - comments = {}; - - var stack = []; - - var stringDelim = null; - - /* istanbul ignore next */ - /** - * Creates an error for illegal syntax. - * @param {string} subject Subject - * @returns {Error} Error created - * @inner - */ - function illegal(subject) { - return Error("illegal " + subject + " (line " + line + ")"); - } - - /** - * Reads a string till its end. - * @returns {string} String read - * @inner - */ - function readString() { - var re = stringDelim === "'" ? stringSingleRe : stringDoubleRe; - re.lastIndex = offset - 1; - var match = re.exec(source); - if (!match) - throw illegal("string"); - offset = re.lastIndex; - push(stringDelim); - stringDelim = null; - return unescape(match[1]); - } - - /** - * Gets the character at `pos` within the source. - * @param {number} pos Position - * @returns {string} Character - * @inner - */ - function charAt(pos) { - return source.charAt(pos); - } - - /** - * Sets the current comment text. - * @param {number} start Start offset - * @param {number} end End offset - * @param {boolean} isLeading set if a leading comment - * @returns {undefined} - * @inner - */ - function setComment(start, end, isLeading) { - var comment = { - type: source.charAt(start++), - lineEmpty: false, - leading: isLeading, - }; - var lookback; - if (alternateCommentMode) { - lookback = 2; // alternate comment parsing: "//" or "/*" - } else { - lookback = 3; // "///" or "/**" - } - var commentOffset = start - lookback, - c; - do { - if (--commentOffset < 0 || - (c = source.charAt(commentOffset)) === "\n") { - comment.lineEmpty = true; - break; - } - } while (c === " " || c === "\t"); - var lines = source - .substring(start, end) - .split(setCommentSplitRe); - for (var i = 0; i < lines.length; ++i) - lines[i] = lines[i] - .replace(alternateCommentMode ? setCommentAltRe : setCommentRe, "") - .trim(); - comment.text = lines - .join("\n") - .trim(); - - comments[line] = comment; - lastCommentLine = line; - } - - function isDoubleSlashCommentLine(startOffset) { - var endOffset = findEndOfLine(startOffset); - - // see if remaining line matches comment pattern - var lineText = source.substring(startOffset, endOffset); - var isComment = /^\s*\/\//.test(lineText); - return isComment; - } - - function findEndOfLine(cursor) { - // find end of cursor's line - var endOffset = cursor; - while (endOffset < length && charAt(endOffset) !== "\n") { - endOffset++; - } - return endOffset; - } - - /** - * Obtains the next token. - * @returns {string|null} Next token or `null` on eof - * @inner - */ - function next() { - if (stack.length > 0) - return stack.shift(); - if (stringDelim) - return readString(); - var repeat, - prev, - curr, - start, - isDoc, - isLeadingComment = offset === 0; - do { - if (offset === length) - return null; - repeat = false; - while (whitespaceRe.test(curr = charAt(offset))) { - if (curr === "\n") { - isLeadingComment = true; - ++line; - } - if (++offset === length) - return null; - } - - if (charAt(offset) === "/") { - if (++offset === length) { - throw illegal("comment"); - } - if (charAt(offset) === "/") { // Line - if (!alternateCommentMode) { - // check for triple-slash comment - isDoc = charAt(start = offset + 1) === "/"; - - while (charAt(++offset) !== "\n") { - if (offset === length) { - return null; - } - } - ++offset; - if (isDoc) { - setComment(start, offset - 1, isLeadingComment); - // Trailing comment cannot not be multi-line, - // so leading comment state should be reset to handle potential next comments - isLeadingComment = true; - } - ++line; - repeat = true; - } else { - // check for double-slash comments, consolidating consecutive lines - start = offset; - isDoc = false; - if (isDoubleSlashCommentLine(offset - 1)) { - isDoc = true; - do { - offset = findEndOfLine(offset); - if (offset === length) { - break; - } - offset++; - if (!isLeadingComment) { - // Trailing comment cannot not be multi-line - break; - } - } while (isDoubleSlashCommentLine(offset)); - } else { - offset = Math.min(length, findEndOfLine(offset) + 1); - } - if (isDoc) { - setComment(start, offset, isLeadingComment); - isLeadingComment = true; - } - line++; - repeat = true; - } - } else if ((curr = charAt(offset)) === "*") { /* Block */ - // check for /** (regular comment mode) or /* (alternate comment mode) - start = offset + 1; - isDoc = alternateCommentMode || charAt(start) === "*"; - do { - if (curr === "\n") { - ++line; - } - if (++offset === length) { - throw illegal("comment"); - } - prev = curr; - curr = charAt(offset); - } while (prev !== "*" || curr !== "/"); - ++offset; - if (isDoc) { - setComment(start, offset - 2, isLeadingComment); - isLeadingComment = true; - } - repeat = true; - } else { - return "/"; - } - } - } while (repeat); - - // offset !== length if we got here - - var end = offset; - delimRe.lastIndex = 0; - var delim = delimRe.test(charAt(end++)); - if (!delim) - while (end < length && !delimRe.test(charAt(end))) - ++end; - var token = source.substring(offset, offset = end); - if (token === "\"" || token === "'") - stringDelim = token; - return token; - } - - /** - * Pushes a token back to the stack. - * @param {string} token Token - * @returns {undefined} - * @inner - */ - function push(token) { - stack.push(token); - } - - /** - * Peeks for the next token. - * @returns {string|null} Token or `null` on eof - * @inner - */ - function peek() { - if (!stack.length) { - var token = next(); - if (token === null) - return null; - push(token); - } - return stack[0]; - } - - /** - * Skips a token. - * @param {string} expected Expected token - * @param {boolean} [optional=false] Whether the token is optional - * @returns {boolean} `true` when skipped, `false` if not - * @throws {Error} When a required token is not present - * @inner - */ - function skip(expected, optional) { - var actual = peek(), - equals = actual === expected; - if (equals) { - next(); - return true; - } - if (!optional) - throw illegal("token '" + actual + "', '" + expected + "' expected"); - return false; - } - - /** - * Gets a comment. - * @param {number} [trailingLine] Line number if looking for a trailing comment - * @returns {string|null} Comment text - * @inner - */ - function cmnt(trailingLine) { - var ret = null; - var comment; - if (trailingLine === undefined) { - comment = comments[line - 1]; - delete comments[line - 1]; - if (comment && (alternateCommentMode || comment.type === "*" || comment.lineEmpty)) { - ret = comment.leading ? comment.text : null; - } - } else { - /* istanbul ignore else */ - if (lastCommentLine < trailingLine) { - peek(); - } - comment = comments[trailingLine]; - delete comments[trailingLine]; - if (comment && !comment.lineEmpty && (alternateCommentMode || comment.type === "/")) { - ret = comment.leading ? null : comment.text; - } - } - return ret; - } - - return Object.defineProperty({ - next: next, - peek: peek, - push: push, - skip: skip, - cmnt: cmnt - }, "line", { - get: function() { return line; } - }); - /* eslint-enable callback-return */ -} diff --git a/node_modules/protobufjs/src/type.js b/node_modules/protobufjs/src/type.js deleted file mode 100644 index 126c2b7..0000000 --- a/node_modules/protobufjs/src/type.js +++ /dev/null @@ -1,630 +0,0 @@ -"use strict"; -module.exports = Type; - -// extends Namespace -var Namespace = require("./namespace"); -((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = "Type"; - -var Enum = require("./enum"), - OneOf = require("./oneof"), - Field = require("./field"), - MapField = require("./mapfield"), - Service = require("./service"), - Message = require("./message"), - Reader = require("./reader"), - Writer = require("./writer"), - util = require("./util"), - encoder = require("./encoder"), - decoder = require("./decoder"), - verifier = require("./verifier"), - converter = require("./converter"), - wrappers = require("./wrappers"); - -/** - * Constructs a new reflected message type instance. - * @classdesc Reflected message type. - * @extends NamespaceBase - * @constructor - * @param {string} name Message name - * @param {Object.} [options] Declared options - */ -function Type(name, options) { - name = name.replace(/\W/g, ""); - Namespace.call(this, name, options); - - /** - * Message fields. - * @type {Object.} - */ - this.fields = {}; // toJSON, marker - - /** - * Oneofs declared within this namespace, if any. - * @type {Object.} - */ - this.oneofs = undefined; // toJSON - - /** - * Extension ranges, if any. - * @type {number[][]} - */ - this.extensions = undefined; // toJSON - - /** - * Reserved ranges, if any. - * @type {Array.} - */ - this.reserved = undefined; // toJSON - - /*? - * Whether this type is a legacy group. - * @type {boolean|undefined} - */ - this.group = undefined; // toJSON - - /** - * Cached fields by id. - * @type {Object.|null} - * @private - */ - this._fieldsById = null; - - /** - * Cached fields as an array. - * @type {Field[]|null} - * @private - */ - this._fieldsArray = null; - - /** - * Cached oneofs as an array. - * @type {OneOf[]|null} - * @private - */ - this._oneofsArray = null; - - /** - * Cached constructor. - * @type {Constructor<{}>} - * @private - */ - this._ctor = null; -} - -Object.defineProperties(Type.prototype, { - - /** - * Message fields by id. - * @name Type#fieldsById - * @type {Object.} - * @readonly - */ - fieldsById: { - get: function() { - - /* istanbul ignore if */ - if (this._fieldsById) - return this._fieldsById; - - this._fieldsById = {}; - for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) { - var field = this.fields[names[i]], - id = field.id; - - /* istanbul ignore if */ - if (this._fieldsById[id]) - throw Error("duplicate id " + id + " in " + this); - - this._fieldsById[id] = field; - } - return this._fieldsById; - } - }, - - /** - * Fields of this message as an array for iteration. - * @name Type#fieldsArray - * @type {Field[]} - * @readonly - */ - fieldsArray: { - get: function() { - return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields)); - } - }, - - /** - * Oneofs of this message as an array for iteration. - * @name Type#oneofsArray - * @type {OneOf[]} - * @readonly - */ - oneofsArray: { - get: function() { - return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs)); - } - }, - - /** - * The registered constructor, if any registered, otherwise a generic constructor. - * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor. - * @name Type#ctor - * @type {Constructor<{}>} - */ - ctor: { - get: function() { - return this._ctor || (this.ctor = Type.generateConstructor(this)()); - }, - set: function(ctor) { - - // Ensure proper prototype - var prototype = ctor.prototype; - if (!(prototype instanceof Message)) { - (ctor.prototype = new Message()).constructor = ctor; - util.merge(ctor.prototype, prototype); - } - - // Classes and messages reference their reflected type - ctor.$type = ctor.prototype.$type = this; - - // Mix in static methods - util.merge(ctor, Message, true); - - this._ctor = ctor; - - // Messages have non-enumerable default values on their prototype - var i = 0; - for (; i < /* initializes */ this.fieldsArray.length; ++i) - this._fieldsArray[i].resolve(); // ensures a proper value - - // Messages have non-enumerable getters and setters for each virtual oneof field - var ctorProperties = {}; - for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i) - ctorProperties[this._oneofsArray[i].resolve().name] = { - get: util.oneOfGetter(this._oneofsArray[i].oneof), - set: util.oneOfSetter(this._oneofsArray[i].oneof) - }; - if (i) - Object.defineProperties(ctor.prototype, ctorProperties); - } - } -}); - -/** - * Generates a constructor function for the specified type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -Type.generateConstructor = function generateConstructor(mtype) { - /* eslint-disable no-unexpected-multiline */ - var gen = util.codegen(["p"], mtype.name); - // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype - for (var i = 0, field; i < mtype.fieldsArray.length; ++i) - if ((field = mtype._fieldsArray[i]).map) gen - ("this%s={}", util.safeProp(field.name)); - else if (field.repeated) gen - ("this%s=[]", util.safeProp(field.name)); - return gen - ("if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors - * @property {Object.} fields Field descriptors - * @property {number[][]} [extensions] Extension ranges - * @property {Array.} [reserved] Reserved ranges - * @property {boolean} [group=false] Whether a legacy group or not - */ - -/** - * Creates a message type from a message type descriptor. - * @param {string} name Message name - * @param {IType} json Message type descriptor - * @param {number} [depth] Current nesting depth, defaults to `0` - * @returns {Type} Created message type - */ -Type.fromJSON = function fromJSON(name, json, depth) { - if (depth === undefined) - depth = 0; - if (depth > util.nestingLimit) - throw Error("max depth exceeded"); - var type = new Type(name, json.options); - type.extensions = json.extensions; - type.reserved = json.reserved; - var names = Object.keys(json.fields), - i = 0; - for (; i < names.length; ++i) - type.add( - ( typeof json.fields[names[i]].keyType !== "undefined" - ? MapField.fromJSON - : Field.fromJSON )(names[i], json.fields[names[i]]) - ); - if (json.oneofs) - for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i) - type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]])); - if (json.nested) - for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) { - var nested = json.nested[names[i]]; - type.add( // most to least likely - ( nested.id !== undefined - ? Field.fromJSON - : nested.fields !== undefined - ? Type.fromJSON - : nested.values !== undefined - ? Enum.fromJSON - : nested.methods !== undefined - ? Service.fromJSON - : Namespace.fromJSON )(names[i], nested, depth + 1) - ); - } - if (json.extensions && json.extensions.length) - type.extensions = json.extensions; - if (json.reserved && json.reserved.length) - type.reserved = json.reserved; - if (json.group) - type.group = true; - if (json.comment) - type.comment = json.comment; - if (json.edition) - type._edition = json.edition; - type._defaultEdition = "proto3"; // For backwards-compatibility. - return type; -}; - -/** - * Converts this message type to a message type descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IType} Message type descriptor - */ -Type.prototype.toJSON = function toJSON(toJSONOptions) { - var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "edition" , this._editionToJSON(), - "options" , inherited && inherited.options || undefined, - "oneofs" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions), - "fields" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {}, - "extensions" , this.extensions && this.extensions.length ? this.extensions : undefined, - "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, - "group" , this.group || undefined, - "nested" , inherited && inherited.nested || undefined, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * @override - */ -Type.prototype.resolveAll = function resolveAll() { - if (!this._needsRecursiveResolve) return this; - - Namespace.prototype.resolveAll.call(this); - var oneofs = this.oneofsArray; i = 0; - while (i < oneofs.length) - oneofs[i++].resolve(); - var fields = this.fieldsArray, i = 0; - while (i < fields.length) - fields[i++].resolve(); - return this; -}; - -/** - * @override - */ -Type.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) { - if (!this._needsRecursiveFeatureResolution) return this; - - edition = this._edition || edition; - - Namespace.prototype._resolveFeaturesRecursive.call(this, edition); - this.oneofsArray.forEach(oneof => { - oneof._resolveFeatures(edition); - }); - this.fieldsArray.forEach(field => { - field._resolveFeatures(edition); - }); - return this; -}; - -/** - * @override - */ -Type.prototype.get = function get(name) { - if (Object.prototype.hasOwnProperty.call(this.fields, name)) - return this.fields[name]; - if (this.oneofs && Object.prototype.hasOwnProperty.call(this.oneofs, name)) - return this.oneofs[name]; - if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name)) - return this.nested[name]; - return null; -}; - -/** - * Adds a nested object to this type. - * @param {ReflectionObject} object Nested object to add - * @returns {Type} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id - */ -Type.prototype.add = function add(object) { - if (this.get(object.name)) - throw Error("duplicate name '" + object.name + "' in " + this); - - if (object instanceof Field && object.extend === undefined) { - // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects. - // The root object takes care of adding distinct sister-fields to the respective extended - // type instead. - - // avoids calling the getter if not absolutely necessary because it's called quite frequently - if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id]) - throw Error("duplicate id " + object.id + " in " + this); - if (this.isReservedId(object.id)) - throw Error("id " + object.id + " is reserved in " + this); - if (this.isReservedName(object.name)) - throw Error("name '" + object.name + "' is reserved in " + this); - if (object.name === "__proto__") - return this; - - if (object.parent) - object.parent.remove(object); - this.fields[object.name] = object; - object.message = this; - object.onAdd(this); - return clearCache(this); - } - if (object instanceof OneOf) { - if (object.name === "__proto__") - return this; - if (!this.oneofs) - this.oneofs = {}; - this.oneofs[object.name] = object; - object.onAdd(this); - return clearCache(this); - } - return Namespace.prototype.add.call(this, object); -}; - -/** - * Removes a nested object from this type. - * @param {ReflectionObject} object Nested object to remove - * @returns {Type} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `object` is not a member of this type - */ -Type.prototype.remove = function remove(object) { - if (object instanceof Field && object.extend === undefined) { - // See Type#add for the reason why extension fields are excluded here. - - /* istanbul ignore if */ - if (!this.fields || this.fields[object.name] !== object) - throw Error(object + " is not a member of " + this); - - delete this.fields[object.name]; - object.parent = null; - object.onRemove(this); - return clearCache(this); - } - if (object instanceof OneOf) { - - /* istanbul ignore if */ - if (!this.oneofs || this.oneofs[object.name] !== object) - throw Error(object + " is not a member of " + this); - - delete this.oneofs[object.name]; - object.parent = null; - object.onRemove(this); - return clearCache(this); - } - return Namespace.prototype.remove.call(this, object); -}; - -/** - * Tests if the specified id is reserved. - * @param {number} id Id to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Type.prototype.isReservedId = function isReservedId(id) { - return Namespace.isReservedId(this.reserved, id); -}; - -/** - * Tests if the specified name is reserved. - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Type.prototype.isReservedName = function isReservedName(name) { - return Namespace.isReservedName(this.reserved, name); -}; - -/** - * Creates a new message of this type using the specified properties. - * @param {Object.} [properties] Properties to set - * @returns {Message<{}>} Message instance - */ -Type.prototype.create = function create(properties) { - return new this.ctor(properties); -}; - -/** - * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}. - * @returns {Type} `this` - */ -Type.prototype.setup = function setup() { - // Sets up everything at once so that the prototype chain does not have to be re-evaluated - // multiple times (V8, soft-deopt prototype-check). - - var fullName = this.fullName, - types = []; - for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i) - types.push(this._fieldsArray[i].resolve().resolvedType); - - // Replace setup methods with type-specific generated functions - this.encode = encoder(this)({ - Writer : Writer, - types : types, - util : util - }); - this.decode = decoder(this)({ - Reader : Reader, - types : types, - util : util - }); - this.verify = verifier(this)({ - types : types, - util : util - }); - this.fromObject = converter.fromObject(this)({ - types : types, - util : util - }); - this.toObject = converter.toObject(this)({ - types : types, - util : util - }); - - // Inject custom wrappers for common types - var wrapper = wrappers[fullName]; - if (wrapper) { - var originalThis = Object.create(this); - // if (wrapper.fromObject) { - originalThis.fromObject = this.fromObject; - this.fromObject = wrapper.fromObject.bind(originalThis); - // } - // if (wrapper.toObject) { - originalThis.toObject = this.toObject; - this.toObject = wrapper.toObject.bind(originalThis); - // } - } - - return this; -}; - -/** - * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages. - * @param {Message<{}>|Object.} message Message instance or plain object - * @param {Writer} [writer] Writer to encode to - * @returns {Writer} writer - */ -Type.prototype.encode = function encode_setup(message, writer) { // eslint-disable-line no-unused-vars - return this.setup().encode.apply(this, arguments); // overrides this method -}; - -/** - * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages. - * @param {Message<{}>|Object.} message Message instance or plain object - * @param {Writer} [writer] Writer to encode to - * @returns {Writer} writer - */ -Type.prototype.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); -}; - -/** - * Decodes a message of this type. - * @param {Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Length of the message, if known beforehand - * @param {number} [end] Expected group end tag, if decoding a group - * @param {number} [depth] Current nesting depth - * @returns {Message<{}>} Decoded message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {util.ProtocolError<{}>} If required fields are missing - */ -Type.prototype.decode = function decode_setup(reader, length, end, depth) { - return this.setup().decode(reader, length, end, depth); // overrides this method -}; - -/** - * Decodes a message of this type preceeded by its byte length as a varint. - * @param {Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {Message<{}>} Decoded message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {util.ProtocolError} If required fields are missing - */ -Type.prototype.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof Reader)) - reader = Reader.create(reader); - return this.decode(reader, reader.uint32()); -}; - -/** - * Verifies that field values are valid and that required fields are present. - * @param {Object.} message Plain object to verify - * @param {number} [depth] Current nesting depth - * @returns {null|string} `null` if valid, otherwise the reason why it is not - */ -Type.prototype.verify = function verify_setup(message, depth) { - return this.setup().verify(message, depth); // overrides this method -}; - -/** - * Creates a new message of this type from a plain object. Also converts values to their respective internal types. - * @param {Object.} object Plain object to convert - * @param {number} [depth] Current nesting depth - * @returns {Message<{}>} Message instance - */ -Type.prototype.fromObject = function fromObject(object, depth) { - return this.setup().fromObject(object, depth); -}; - -/** - * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}. - * @interface IConversionOptions - * @property {Function} [longs] Long conversion type. - * Valid values are `BigInt`, `String` and `Number` (the global types). - * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library. - * @property {Function} [enums] Enum value conversion type. - * Only valid value is `String` (the global type). - * Defaults to copy the present value, which is the numeric id. - * @property {Function} [bytes] Bytes value conversion type. - * Valid values are `Array` and (a base64 encoded) `String` (the global types). - * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser. - * @property {boolean} [defaults=false] Also sets default values on the resulting object - * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false` - * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false` - * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any - * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings - */ - -/** - * Creates a plain object from a message of this type. Also converts values to other types if specified. - * @param {Message<{}>} message Message instance - * @param {IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ -Type.prototype.toObject = function toObject(message, options) { // eslint-disable-line no-unused-vars - return this.setup().toObject.apply(this, arguments); -}; - -/** - * Decorator function as returned by {@link Type.d} (TypeScript). - * @typedef TypeDecorator - * @type {function} - * @param {Constructor} target Target constructor - * @returns {undefined} - * @template T extends Message - */ - -/** - * Type decorator (TypeScript). - * @param {string} [typeName] Type name, defaults to the constructor's name - * @returns {TypeDecorator} Decorator function - * @template T extends Message - */ -Type.d = function decorateType(typeName) { - return function typeDecorator(target) { - util.decorateType(target, typeName); - }; -}; diff --git a/node_modules/protobufjs/src/types.js b/node_modules/protobufjs/src/types.js deleted file mode 100644 index cd5d54c..0000000 --- a/node_modules/protobufjs/src/types.js +++ /dev/null @@ -1,196 +0,0 @@ -"use strict"; - -/** - * Common type constants. - * @namespace - */ -var types = exports; - -var util = require("./util"); - -var s = [ - "double", // 0 - "float", // 1 - "int32", // 2 - "uint32", // 3 - "sint32", // 4 - "fixed32", // 5 - "sfixed32", // 6 - "int64", // 7 - "uint64", // 8 - "sint64", // 9 - "fixed64", // 10 - "sfixed64", // 11 - "bool", // 12 - "string", // 13 - "bytes" // 14 -]; - -function bake(values, offset) { - var i = 0, o = Object.create(null); - offset |= 0; - while (i < values.length) o[s[i + offset]] = values[i++]; - return o; -} - -/** - * Basic type wire types. - * @type {Object.} - * @const - * @property {number} double=1 Fixed64 wire type - * @property {number} float=5 Fixed32 wire type - * @property {number} int32=0 Varint wire type - * @property {number} uint32=0 Varint wire type - * @property {number} sint32=0 Varint wire type - * @property {number} fixed32=5 Fixed32 wire type - * @property {number} sfixed32=5 Fixed32 wire type - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - * @property {number} bool=0 Varint wire type - * @property {number} string=2 Ldelim wire type - * @property {number} bytes=2 Ldelim wire type - */ -types.basic = bake([ - /* double */ 1, - /* float */ 5, - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 5, - /* sfixed32 */ 5, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1, - /* bool */ 0, - /* string */ 2, - /* bytes */ 2 -]); - -/** - * Basic type defaults. - * @type {Object.} - * @const - * @property {number} double=0 Double default - * @property {number} float=0 Float default - * @property {number} int32=0 Int32 default - * @property {number} uint32=0 Uint32 default - * @property {number} sint32=0 Sint32 default - * @property {number} fixed32=0 Fixed32 default - * @property {number} sfixed32=0 Sfixed32 default - * @property {number} int64=0 Int64 default - * @property {number} uint64=0 Uint64 default - * @property {number} sint64=0 Sint32 default - * @property {number} fixed64=0 Fixed64 default - * @property {number} sfixed64=0 Sfixed64 default - * @property {boolean} bool=false Bool default - * @property {string} string="" String default - * @property {Array.} bytes=Array(0) Bytes default - * @property {null} message=null Message default - */ -types.defaults = bake([ - /* double */ 0, - /* float */ 0, - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 0, - /* sfixed32 */ 0, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 0, - /* sfixed64 */ 0, - /* bool */ false, - /* string */ "", - /* bytes */ util.emptyArray, - /* message */ null -]); - -/** - * Basic long type wire types. - * @type {Object.} - * @const - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - */ -types.long = bake([ - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1 -], 7); - -/** - * Allowed types for map keys with their associated wire type. - * @type {Object.} - * @const - * @property {number} int32=0 Varint wire type - * @property {number} uint32=0 Varint wire type - * @property {number} sint32=0 Varint wire type - * @property {number} fixed32=5 Fixed32 wire type - * @property {number} sfixed32=5 Fixed32 wire type - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - * @property {number} bool=0 Varint wire type - * @property {number} string=2 Ldelim wire type - */ -types.mapKey = bake([ - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 5, - /* sfixed32 */ 5, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1, - /* bool */ 0, - /* string */ 2 -], 2); - -/** - * Allowed types for packed repeated fields with their associated wire type. - * @type {Object.} - * @const - * @property {number} double=1 Fixed64 wire type - * @property {number} float=5 Fixed32 wire type - * @property {number} int32=0 Varint wire type - * @property {number} uint32=0 Varint wire type - * @property {number} sint32=0 Varint wire type - * @property {number} fixed32=5 Fixed32 wire type - * @property {number} sfixed32=5 Fixed32 wire type - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - * @property {number} bool=0 Varint wire type - */ -types.packed = bake([ - /* double */ 1, - /* float */ 5, - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 5, - /* sfixed32 */ 5, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1, - /* bool */ 0 -]); diff --git a/node_modules/protobufjs/src/typescript.jsdoc b/node_modules/protobufjs/src/typescript.jsdoc deleted file mode 100644 index 9a67101..0000000 --- a/node_modules/protobufjs/src/typescript.jsdoc +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Constructor type. - * @interface Constructor - * @extends Function - * @template T - * @tstype new(...params: any[]): T; prototype: T; - */ - -/** - * Properties type. - * @typedef Properties - * @template T - * @type {Object.} - * @tstype { [P in keyof T]?: T[P] } - */ diff --git a/node_modules/protobufjs/src/util.js b/node_modules/protobufjs/src/util.js deleted file mode 100644 index 73d9b79..0000000 --- a/node_modules/protobufjs/src/util.js +++ /dev/null @@ -1,230 +0,0 @@ -"use strict"; - -/** - * Various utility functions. - * @namespace - */ -var util = module.exports = require("./util/minimal"); - -var roots = require("./roots"); - -var Type, // cyclic - Enum; - -util.codegen = require("@protobufjs/codegen"); -util.fetch = require("@protobufjs/fetch"); -util.path = require("@protobufjs/path"); -util.patterns = require("./util/patterns"); - -var reservedRe = util.patterns.reservedRe; - -/** - * Node's fs module if available. - * @type {Object.} - */ -util.fs = require("./util/fs"); - -/** - * Checks a recursion depth. - * @param {number|undefined} depth Depth of recursion - * @returns {number} Depth of recursion - * @throws {Error} If depth exceeds util.recursionLimit - */ -util.checkDepth = function checkDepth(depth) { - if (depth === undefined) - depth = 0; - if (depth > util.recursionLimit) - throw Error("max depth exceeded"); - return depth; -}; - -/** - * Converts an object's values to an array. - * @param {Object.} object Object to convert - * @returns {Array.<*>} Converted array - */ -util.toArray = function toArray(object) { - if (object) { - var keys = Object.keys(object), - array = new Array(keys.length), - index = 0; - while (index < keys.length) - array[index] = object[keys[index++]]; - return array; - } - return []; -}; - -/** - * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values. - * @param {Array.<*>} array Array to convert - * @returns {Object.} Converted object - */ -util.toObject = function toObject(array) { - var object = {}, - index = 0; - while (index < array.length) { - var key = array[index++], - val = array[index++]; - if (val !== undefined) - object[key] = val; - } - return object; -}; - -/** - * Tests whether the specified name is a reserved word in JS. - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -util.isReserved = function isReserved(name) { - return reservedRe.test(name); -}; - -/** - * Returns a safe property accessor for the specified property name. - * @param {string} prop Property name - * @returns {string} Safe accessor - */ -util.safeProp = function safeProp(prop) { - if (!/^[$\w_]+$/.test(prop) || reservedRe.test(prop)) - return "[" + JSON.stringify(prop) + "]"; - return "." + prop; -}; - -/** - * Converts the first character of a string to upper case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.ucFirst = function ucFirst(str) { - return str.charAt(0).toUpperCase() + str.substring(1); -}; - -var camelCaseRe = /_([a-z])/g; - -/** - * Converts a string to camel case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.camelCase = function camelCase(str) { - return str.substring(0, 1) - + str.substring(1) - .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); }); -}; - -/** - * Compares reflected fields by id. - * @param {Field} a First field - * @param {Field} b Second field - * @returns {number} Comparison value - */ -util.compareFieldsById = function compareFieldsById(a, b) { - return a.id - b.id; -}; - -/** - * Decorator helper for types (TypeScript). - * @param {Constructor} ctor Constructor function - * @param {string} [typeName] Type name, defaults to the constructor's name - * @returns {Type} Reflected type - * @template T extends Message - * @property {Root} root Decorators root - */ -util.decorateType = function decorateType(ctor, typeName) { - - /* istanbul ignore if */ - if (ctor.$type) { - if (typeName && ctor.$type.name !== typeName) { - util.decorateRoot.remove(ctor.$type); - ctor.$type.name = typeName; - util.decorateRoot.add(ctor.$type); - } - return ctor.$type; - } - - /* istanbul ignore next */ - if (!Type) - Type = require("./type"); - - var type = new Type(typeName || ctor.name); - util.decorateRoot.add(type); - type.ctor = ctor; // sets up .encode, .decode etc. - Object.defineProperty(ctor, "$type", { value: type, enumerable: false }); - Object.defineProperty(ctor.prototype, "$type", { value: type, enumerable: false }); - return type; -}; - -var decorateEnumIndex = 0; - -/** - * Decorator helper for enums (TypeScript). - * @param {Object} object Enum object - * @returns {Enum} Reflected enum - */ -util.decorateEnum = function decorateEnum(object) { - - /* istanbul ignore if */ - if (object.$type) - return object.$type; - - /* istanbul ignore next */ - if (!Enum) - Enum = require("./enum"); - - var enm = new Enum("Enum" + decorateEnumIndex++, object); - util.decorateRoot.add(enm); - Object.defineProperty(object, "$type", { value: enm, enumerable: false }); - return enm; -}; - - -/** - * Sets the value of a property by property path. If a value already exists, it is turned to an array - * @param {Object.} dst Destination object - * @param {string} path dot '.' delimited path of the property to set - * @param {Object} value the value to set - * @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set - * @returns {Object.} Destination object - */ -util.setProperty = function setProperty(dst, path, value, ifNotSet) { - function setProp(dst, path, value) { - var part = path.shift(); - if (util.isUnsafeProperty(part)) - return dst; - if (path.length > 0) { - dst[part] = setProp(dst[part] || {}, path, value); - } else { - var prevValue = dst[part]; - if (prevValue && ifNotSet) - return dst; - if (prevValue) - value = [].concat(prevValue).concat(value); - dst[part] = value; - } - return dst; - } - - if (typeof dst !== "object") - throw TypeError("dst must be an object"); - if (!path) - throw TypeError("path must be specified"); - - path = path.split("."); - if (path.length > util.recursionLimit) - throw Error("max depth exceeded"); - return setProp(dst, path, value); -}; - -/** - * Decorator root (TypeScript). - * @name util.decorateRoot - * @type {Root} - * @readonly - */ -Object.defineProperty(util, "decorateRoot", { - get: function() { - return roots["decorated"] || (roots["decorated"] = new (require("./root"))()); - } -}); diff --git a/node_modules/protobufjs/src/util/fs.js b/node_modules/protobufjs/src/util/fs.js deleted file mode 100644 index 9f3abda..0000000 --- a/node_modules/protobufjs/src/util/fs.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var fs = null; -try { - fs = require(/* webpackIgnore: true */ "fs"); - if (!fs || !fs.readFile || !fs.readFileSync) - fs = null; -} catch (e) { - // `fs` is unavailable in browsers and browser-like bundles. -} -module.exports = fs; diff --git a/node_modules/protobufjs/src/util/longbits.js b/node_modules/protobufjs/src/util/longbits.js deleted file mode 100644 index 11bfb1c..0000000 --- a/node_modules/protobufjs/src/util/longbits.js +++ /dev/null @@ -1,200 +0,0 @@ -"use strict"; -module.exports = LongBits; - -var util = require("../util/minimal"); - -/** - * Constructs new long bits. - * @classdesc Helper class for working with the low and high bits of a 64 bit value. - * @memberof util - * @constructor - * @param {number} lo Low 32 bits, unsigned - * @param {number} hi High 32 bits, unsigned - */ -function LongBits(lo, hi) { - - // note that the casts below are theoretically unnecessary as of today, but older statically - // generated converter code might still call the ctor with signed 32bits. kept for compat. - - /** - * Low bits. - * @type {number} - */ - this.lo = lo >>> 0; - - /** - * High bits. - * @type {number} - */ - this.hi = hi >>> 0; -} - -/** - * Zero bits. - * @memberof util.LongBits - * @type {util.LongBits} - */ -var zero = LongBits.zero = new LongBits(0, 0); - -zero.toNumber = function() { return 0; }; -zero.zzEncode = zero.zzDecode = function() { return this; }; -zero.length = function() { return 1; }; - -/** - * Zero hash. - * @memberof util.LongBits - * @type {string} - */ -var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; - -/** - * Constructs new long bits from the specified number. - * @param {number} value Value - * @returns {util.LongBits} Instance - */ -LongBits.fromNumber = function fromNumber(value) { - if (value === 0) - return zero; - var sign = value < 0; - if (sign) - value = -value; - var lo = value >>> 0, - hi = (value - lo) / 4294967296 >>> 0; - if (sign) { - hi = ~hi >>> 0; - lo = ~lo >>> 0; - if (++lo > 4294967295) { - lo = 0; - if (++hi > 4294967295) - hi = 0; - } - } - return new LongBits(lo, hi); -}; - -/** - * Constructs new long bits from a number, long or string. - * @param {Long|number|string} value Value - * @returns {util.LongBits} Instance - */ -LongBits.from = function from(value) { - if (typeof value === "number") - return LongBits.fromNumber(value); - if (util.isString(value)) { - /* istanbul ignore else */ - if (util.Long) - value = util.Long.fromString(value); - else - return LongBits.fromNumber(parseInt(value, 10)); - } - return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; -}; - -/** - * Converts this long bits to a possibly unsafe JavaScript number. - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {number} Possibly unsafe number - */ -LongBits.prototype.toNumber = function toNumber(unsigned) { - if (!unsigned && this.hi >>> 31) { - var lo = ~this.lo + 1 >>> 0, - hi = ~this.hi >>> 0; - if (!lo) - hi = hi + 1 >>> 0; - return -(lo + hi * 4294967296); - } - return this.lo + this.hi * 4294967296; -}; - -/** - * Converts this long bits to a long. - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long} Long - */ -LongBits.prototype.toLong = function toLong(unsigned) { - return util.Long - ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) - /* istanbul ignore next */ - : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; -}; - -var charCodeAt = String.prototype.charCodeAt; - -/** - * Constructs new long bits from the specified 8 characters long hash. - * @param {string} hash Hash - * @returns {util.LongBits} Bits - */ -LongBits.fromHash = function fromHash(hash) { - if (hash === zeroHash) - return zero; - return new LongBits( - ( charCodeAt.call(hash, 0) - | charCodeAt.call(hash, 1) << 8 - | charCodeAt.call(hash, 2) << 16 - | charCodeAt.call(hash, 3) << 24) >>> 0 - , - ( charCodeAt.call(hash, 4) - | charCodeAt.call(hash, 5) << 8 - | charCodeAt.call(hash, 6) << 16 - | charCodeAt.call(hash, 7) << 24) >>> 0 - ); -}; - -/** - * Converts this long bits to a 8 characters long hash. - * @returns {string} Hash - */ -LongBits.prototype.toHash = function toHash() { - return String.fromCharCode( - this.lo & 255, - this.lo >>> 8 & 255, - this.lo >>> 16 & 255, - this.lo >>> 24 , - this.hi & 255, - this.hi >>> 8 & 255, - this.hi >>> 16 & 255, - this.hi >>> 24 - ); -}; - -/** - * Zig-zag encodes this long bits. - * @returns {util.LongBits} `this` - */ -LongBits.prototype.zzEncode = function zzEncode() { - var mask = this.hi >> 31; - this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; - this.lo = ( this.lo << 1 ^ mask) >>> 0; - return this; -}; - -/** - * Zig-zag decodes this long bits. - * @returns {util.LongBits} `this` - */ -LongBits.prototype.zzDecode = function zzDecode() { - var mask = -(this.lo & 1); - this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; - this.hi = ( this.hi >>> 1 ^ mask) >>> 0; - return this; -}; - -/** - * Calculates the length of this longbits when encoded as a varint. - * @returns {number} Length - */ -LongBits.prototype.length = function length() { - var part0 = this.lo, - part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, - part2 = this.hi >>> 24; - return part2 === 0 - ? part1 === 0 - ? part0 < 16384 - ? part0 < 128 ? 1 : 2 - : part0 < 2097152 ? 3 : 4 - : part1 < 16384 - ? part1 < 128 ? 5 : 6 - : part1 < 2097152 ? 7 : 8 - : part2 < 128 ? 9 : 10; -}; diff --git a/node_modules/protobufjs/src/util/minimal.js b/node_modules/protobufjs/src/util/minimal.js deleted file mode 100644 index 2ad8dd0..0000000 --- a/node_modules/protobufjs/src/util/minimal.js +++ /dev/null @@ -1,494 +0,0 @@ -"use strict"; -var util = exports; - -// used to return a Promise where callback is omitted -util.asPromise = require("@protobufjs/aspromise"); - -// converts to / from base64 encoded strings -util.base64 = require("@protobufjs/base64"); - -// base class of rpc.Service -util.EventEmitter = require("@protobufjs/eventemitter"); - -// float handling accross browsers -util.float = require("@protobufjs/float"); - -// requires modules optionally and hides the call from bundlers -util.inquire = require("@protobufjs/inquire"); - -// converts to / from utf8 encoded strings -util.utf8 = require("@protobufjs/utf8"); - -// provides a node-like buffer pool in the browser -util.pool = require("@protobufjs/pool"); - -// utility to work with the low and high bits of a 64 bit value -util.LongBits = require("./longbits"); - -/** - * Tests if the specified key can affect object prototypes. - * @memberof util - * @param {string} key Key to test - * @returns {boolean} `true` if the key is unsafe - */ -function isUnsafeProperty(key) { - return key === "__proto__" || key === "prototype" || key === "constructor"; -} - -util.isUnsafeProperty = isUnsafeProperty; - -/** - * Whether running within node or not. - * @memberof util - * @type {boolean} - */ -util.isNode = Boolean(typeof global !== "undefined" - && global - && global.process - && global.process.versions - && global.process.versions.node); - -/** - * Global object reference. - * @memberof util - * @type {Object} - */ -util.global = util.isNode && global - || typeof window !== "undefined" && window - || typeof self !== "undefined" && self - || this; // eslint-disable-line no-invalid-this - -/** - * An immuable empty array. - * @memberof util - * @type {Array.<*>} - * @const - */ -util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes - -/** - * An immutable empty object. - * @type {Object} - * @const - */ -util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes - -/** - * Tests if the specified value is an integer. - * @function - * @param {*} value Value to test - * @returns {boolean} `true` if the value is an integer - */ -util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) { - return typeof value === "number" && isFinite(value) && Math.floor(value) === value; -}; - -/** - * Tests if the specified value is a string. - * @param {*} value Value to test - * @returns {boolean} `true` if the value is a string - */ -util.isString = function isString(value) { - return typeof value === "string" || value instanceof String; -}; - -/** - * Tests if the specified value is a non-null object. - * @param {*} value Value to test - * @returns {boolean} `true` if the value is a non-null object - */ -util.isObject = function isObject(value) { - return value && typeof value === "object"; -}; - -/** - * Checks if a property on a message is considered to be present. - * This is an alias of {@link util.isSet}. - * @function - * @param {Object} obj Plain object or message instance - * @param {string} prop Property name - * @returns {boolean} `true` if considered to be present, otherwise `false` - */ -util.isset = - -/** - * Checks if a property on a message is considered to be present. - * @param {Object} obj Plain object or message instance - * @param {string} prop Property name - * @returns {boolean} `true` if considered to be present, otherwise `false` - */ -util.isSet = function isSet(obj, prop) { - var value = obj[prop]; - if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins - return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0; - return false; -}; - -/** - * Any compatible Buffer instance. - * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. - * @interface Buffer - * @extends Uint8Array - */ - -/** - * Node's Buffer class if available. - * @type {Constructor} - */ -util.Buffer = (function() { - try { - var Buffer = util.global.Buffer; - // refuse to use non-node buffers if not explicitly assigned (perf reasons): - return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; - } catch (e) { - /* istanbul ignore next */ - return null; - } -})(); - -// Internal alias of or polyfull for Buffer.from. -util._Buffer_from = null; - -// Internal alias of or polyfill for Buffer.allocUnsafe. -util._Buffer_allocUnsafe = null; - -/** - * Creates a new buffer of whatever type supported by the environment. - * @param {number|number[]} [sizeOrArray=0] Buffer size or number array - * @returns {Uint8Array|Buffer} Buffer - */ -util.newBuffer = function newBuffer(sizeOrArray) { - /* istanbul ignore next */ - return typeof sizeOrArray === "number" - ? util.Buffer - ? util._Buffer_allocUnsafe(sizeOrArray) - : new util.Array(sizeOrArray) - : util.Buffer - ? util._Buffer_from(sizeOrArray) - : typeof Uint8Array === "undefined" - ? sizeOrArray - : new Uint8Array(sizeOrArray); -}; - -/** - * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. - * @type {Constructor} - */ -util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array; - -/** - * Any compatible Long instance. - * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. - * @interface Long - * @property {number} low Low bits - * @property {number} high High bits - * @property {boolean} unsigned Whether unsigned or not - */ - -/** - * Long.js's Long class if available. - * @type {Constructor} - */ -util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long - || /* istanbul ignore next */ util.global.Long - || (function() { - try { - var Long = require("long"); - return Long && Long.isLong ? Long : null; - } catch (e) { - /* istanbul ignore next */ - return null; - } - })(); - -/** - * Regular expression used to verify 2 bit (`bool`) map keys. - * @type {RegExp} - * @const - */ -util.key2Re = /^true|false|0|1$/; - -/** - * Regular expression used to verify 32 bit (`int32` etc.) map keys. - * @type {RegExp} - * @const - */ -util.key32Re = /^-?(?:0|[1-9][0-9]*)$/; - -/** - * Regular expression used to verify 64 bit (`int64` etc.) map keys. - * @type {RegExp} - * @const - */ -util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/; - -/** - * Converts a number or long to an 8 characters long hash string. - * @param {Long|number} value Value to convert - * @returns {string} Hash - */ -util.longToHash = function longToHash(value) { - return value - ? util.LongBits.from(value).toHash() - : util.LongBits.zeroHash; -}; - -/** - * Converts an 8 characters long hash string to a long or number. - * @param {string} hash Hash - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long|number} Original value - */ -util.longFromHash = function longFromHash(hash, unsigned) { - var bits = util.LongBits.fromHash(hash); - if (util.Long) - return util.Long.fromBits(bits.lo, bits.hi, unsigned); - return bits.toNumber(Boolean(unsigned)); -}; - -/** - * Merges the properties of the source object into the destination object. - * @memberof util - * @param {Object.} dst Destination object - * @param {...(Object.|boolean)} src Source objects, optionally followed by an `ifNotSet` flag - * @returns {Object.} Destination object - */ -function merge(dst) { // used by converters - var ifNotSet = typeof arguments[arguments.length - 1] === "boolean", - limit = ifNotSet ? arguments.length - 1 : arguments.length; - ifNotSet = ifNotSet && arguments[arguments.length - 1]; - for (var a = 1; a < limit; ++a) { - var src = arguments[a]; - if (!src) - continue; - for (var keys = Object.keys(src), i = 0; i < keys.length; ++i) - if (!isUnsafeProperty(keys[i]) && (dst[keys[i]] === undefined || !ifNotSet)) - dst[keys[i]] = src[keys[i]]; - } - return dst; -} - -util.merge = merge; - -/** - * Schema declaration nesting limit. - * @memberof util - * @type {number} - */ -util.nestingLimit = 32; // protoc: MaxMessageDeclarationNestingDepth - -/** - * Recursion limit. - * @memberof util - * @type {number} - */ -util.recursionLimit = 100; // protoc: CodedInputStream::default_recursion_limit_ - -/** - * Makes a property safe for assignment as an own property. - * @memberof util - * @param {Object.} obj Object - * @param {string} key Property key - * @returns {undefined} - */ -util.makeProp = function makeProp(obj, key) { - Object.defineProperty(obj, key, { - enumerable: true, - configurable: true, - writable: true - }); -}; - -/** - * Converts the first character of a string to lower case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.lcFirst = function lcFirst(str) { - return str.charAt(0).toLowerCase() + str.substring(1); -}; - -/** - * Creates a custom error constructor. - * @memberof util - * @param {string} name Error name - * @returns {Constructor} Custom error constructor - */ -function newError(name) { - - function CustomError(message, properties) { - - if (!(this instanceof CustomError)) - return new CustomError(message, properties); - - // Error.call(this, message); - // ^ just returns a new error instance because the ctor can be called as a function - - Object.defineProperty(this, "message", { get: function() { return message; } }); - - /* istanbul ignore next */ - if (Error.captureStackTrace) // node - Error.captureStackTrace(this, CustomError); - else - Object.defineProperty(this, "stack", { value: new Error().stack || "" }); - - if (properties) - merge(this, properties); - } - - CustomError.prototype = Object.create(Error.prototype, { - constructor: { - value: CustomError, - writable: true, - enumerable: false, - configurable: true, - }, - name: { - get: function get() { return name; }, - set: undefined, - enumerable: false, - // configurable: false would accurately preserve the behavior of - // the original, but I'm guessing that was not intentional. - // For an actual error subclass, this property would - // be configurable. - configurable: true, - }, - toString: { - value: function value() { return this.name + ": " + this.message; }, - writable: true, - enumerable: false, - configurable: true, - }, - }); - - return CustomError; -} - -util.newError = newError; - -/** - * Constructs a new protocol error. - * @classdesc Error subclass indicating a protocol specifc error. - * @memberof util - * @extends Error - * @template T extends Message - * @constructor - * @param {string} message Error message - * @param {Object.} [properties] Additional properties - * @example - * try { - * MyMessage.decode(someBuffer); // throws if required fields are missing - * } catch (e) { - * if (e instanceof ProtocolError && e.instance) - * console.log("decoded so far: " + JSON.stringify(e.instance)); - * } - */ -util.ProtocolError = newError("ProtocolError"); - -/** - * So far decoded message instance. - * @name util.ProtocolError#instance - * @type {Message} - */ - -/** - * A OneOf getter as returned by {@link util.oneOfGetter}. - * @typedef OneOfGetter - * @type {function} - * @returns {string|undefined} Set field name, if any - */ - -/** - * Builds a getter for a oneof's present field name. - * @param {string[]} fieldNames Field names - * @returns {OneOfGetter} Unbound getter - */ -util.oneOfGetter = function getOneOf(fieldNames) { - var fieldMap = {}; - for (var i = 0; i < fieldNames.length; ++i) - fieldMap[fieldNames[i]] = 1; - - /** - * @returns {string|undefined} Set field name, if any - * @this Object - * @ignore - */ - return function() { // eslint-disable-line consistent-return - for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i) - if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null) - return keys[i]; - }; -}; - -/** - * A OneOf setter as returned by {@link util.oneOfSetter}. - * @typedef OneOfSetter - * @type {function} - * @param {string|undefined} value Field name - * @returns {undefined} - */ - -/** - * Builds a setter for a oneof's present field name. - * @param {string[]} fieldNames Field names - * @returns {OneOfSetter} Unbound setter - */ -util.oneOfSetter = function setOneOf(fieldNames) { - - /** - * @param {string} name Field name - * @returns {undefined} - * @this Object - * @ignore - */ - return function(name) { - for (var i = 0; i < fieldNames.length; ++i) - if (fieldNames[i] !== name) - delete this[fieldNames[i]]; - }; -}; - -/** - * Default conversion options used for {@link Message#toJSON} implementations. - * - * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: - * - * - Longs become strings - * - Enums become string keys - * - Bytes become base64 encoded strings - * - (Sub-)Messages become plain objects - * - Maps become plain objects with all string keys - * - Repeated fields become arrays - * - NaN and Infinity for float and double fields become strings - * - * @type {IConversionOptions} - * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json - */ -util.toJSONOptions = { - longs: String, - enums: String, - bytes: String, - json: true -}; - -// Sets up buffer utility according to the environment (called in index-minimal) -util._configure = function() { - var Buffer = util.Buffer; - /* istanbul ignore if */ - if (!Buffer) { - util._Buffer_from = util._Buffer_allocUnsafe = null; - return; - } - // because node 4.x buffers are incompatible & immutable - // see: https://github.com/dcodeIO/protobuf.js/pull/665 - util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || - /* istanbul ignore next */ - function Buffer_from(value, encoding) { - return new Buffer(value, encoding); - }; - util._Buffer_allocUnsafe = Buffer.allocUnsafe || - /* istanbul ignore next */ - function Buffer_allocUnsafe(size) { - return new Buffer(size); - }; -}; diff --git a/node_modules/protobufjs/src/util/patterns.js b/node_modules/protobufjs/src/util/patterns.js deleted file mode 100644 index daa3070..0000000 --- a/node_modules/protobufjs/src/util/patterns.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -var patterns = exports; - -patterns.numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/; -patterns.typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/; -patterns.reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/; diff --git a/node_modules/protobufjs/src/verifier.js b/node_modules/protobufjs/src/verifier.js deleted file mode 100644 index 2481bde..0000000 --- a/node_modules/protobufjs/src/verifier.js +++ /dev/null @@ -1,180 +0,0 @@ -"use strict"; -module.exports = verifier; - -var Enum = require("./enum"), - util = require("./util"); - -function invalid(field, expected) { - return field.name + ": " + expected + (field.repeated && expected !== "array" ? "[]" : field.map && expected !== "object" ? "{k:"+field.keyType+"}" : "") + " expected"; -} - -/** - * Generates a partial value verifier. - * @param {Codegen} gen Codegen instance - * @param {Field} field Reflected field - * @param {number} fieldIndex Field index - * @param {string} ref Variable reference - * @returns {Codegen} Codegen instance - * @ignore - */ -function genVerifyValue(gen, field, fieldIndex, ref) { - /* eslint-disable no-unexpected-multiline */ - if (field.resolvedType) { - if (field.resolvedType instanceof Enum) { gen - ("switch(%s){", ref) - ("default:") - ("return%j", invalid(field, "enum value")); - for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen - ("case %i:", field.resolvedType.values[keys[j]]); - gen - ("break") - ("}"); - } else { - gen - ("{") - ("var e=types[%i].verify(%s,n+1);", fieldIndex, ref) - ("if(e)") - ("return%j+e", field.name + ".") - ("}"); - } - } else { - switch (field.type) { - case "int32": - case "uint32": - case "sint32": - case "fixed32": - case "sfixed32": gen - ("if(!util.isInteger(%s))", ref) - ("return%j", invalid(field, "integer")); - break; - case "int64": - case "uint64": - case "sint64": - case "fixed64": - case "sfixed64": gen - ("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", ref, ref, ref, ref) - ("return%j", invalid(field, "integer|Long")); - break; - case "float": - case "double": gen - ("if(typeof %s!==\"number\")", ref) - ("return%j", invalid(field, "number")); - break; - case "bool": gen - ("if(typeof %s!==\"boolean\")", ref) - ("return%j", invalid(field, "boolean")); - break; - case "string": gen - ("if(!util.isString(%s))", ref) - ("return%j", invalid(field, "string")); - break; - case "bytes": gen - ("if(!(%s&&typeof %s.length===\"number\"||util.isString(%s)))", ref, ref, ref) - ("return%j", invalid(field, "buffer")); - break; - } - } - return gen; - /* eslint-enable no-unexpected-multiline */ -} - -/** - * Generates a partial key verifier. - * @param {Codegen} gen Codegen instance - * @param {Field} field Reflected field - * @param {string} ref Variable reference - * @returns {Codegen} Codegen instance - * @ignore - */ -function genVerifyKey(gen, field, ref) { - /* eslint-disable no-unexpected-multiline */ - switch (field.keyType) { - case "int32": - case "uint32": - case "sint32": - case "fixed32": - case "sfixed32": gen - ("if(!util.key32Re.test(%s))", ref) - ("return%j", invalid(field, "integer key")); - break; - case "int64": - case "uint64": - case "sint64": - case "fixed64": - case "sfixed64": gen - ("if(!util.key64Re.test(%s))", ref) // see comment above: x is ok, d is not - ("return%j", invalid(field, "integer|Long key")); - break; - case "bool": gen - ("if(!util.key2Re.test(%s))", ref) - ("return%j", invalid(field, "boolean key")); - break; - } - return gen; - /* eslint-enable no-unexpected-multiline */ -} - -/** - * Generates a verifier specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -function verifier(mtype) { - /* eslint-disable no-unexpected-multiline */ - - var gen = util.codegen(["m", "n"], mtype.name + "$verify") - ("if(typeof m!==\"object\"||m===null)") - ("return%j", "object expected") - ("if(n===undefined)n=0") - ("if(n>util.recursionLimit)") - ("return%j", "maximum nesting depth exceeded"); - var oneofs = mtype.oneofsArray, - seenFirstField = {}; - if (oneofs.length) gen - ("var p={}"); - - for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) { - var field = mtype._fieldsArray[i].resolve(), - ref = "m" + util.safeProp(field.name); - - if (field.optional) gen - ("if(%s!=null&&m.hasOwnProperty(%j)){", ref, field.name); // !== undefined && !== null - - // map fields - if (field.map) { gen - ("if(!util.isObject(%s))", ref) - ("return%j", invalid(field, "object")) - ("var k=Object.keys(%s)", ref) - ("for(var i=0;i} - * @const - */ -var wrappers = exports; - -var Message = require("./message"), - util = require("./util/minimal"); - -/** - * From object converter part of an {@link IWrapper}. - * @typedef WrapperFromObjectConverter - * @type {function} - * @param {Object.} object Plain object - * @returns {Message<{}>} Message instance - * @this Type - */ - -/** - * To object converter part of an {@link IWrapper}. - * @typedef WrapperToObjectConverter - * @type {function} - * @param {Message<{}>} message Message instance - * @param {IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - * @this Type - */ - -/** - * Common type wrapper part of {@link wrappers}. - * @interface IWrapper - * @property {WrapperFromObjectConverter} [fromObject] From object converter - * @property {WrapperToObjectConverter} [toObject] To object converter - */ - -// Custom wrapper for Any -wrappers[".google.protobuf.Any"] = { - - fromObject: function(object, depth) { - - // unwrap value type if mapped - if (object && object["@type"]) { - // Only use fully qualified type name after the last '/' - var name = object["@type"].substring(object["@type"].lastIndexOf("/") + 1); - var type = this.lookup(name); - /* istanbul ignore else */ - if (type) { - // type_url does not accept leading "." - var type_url = object["@type"].charAt(0) === "." ? - object["@type"].slice(1) : object["@type"]; - // type_url prefix is optional, but path seperator is required - if (type_url.indexOf("/") === -1) { - type_url = "/" + type_url; - } - return this.create({ - type_url: type_url, - value: type.encode(type.fromObject(object, depth === undefined ? 1 : depth + 1)).finish() - }); - } - } - - return this.fromObject(object, depth); - }, - - toObject: function(message, options, depth) { - if (depth === undefined) - depth = 0; - if (depth > util.recursionLimit) - throw Error("max depth exceeded"); - - // Default prefix - var googleApi = "type.googleapis.com/"; - var prefix = ""; - var name = ""; - - // decode value if requested and unmapped - if (options && options.json && message.type_url && message.value) { - // Only use fully qualified type name after the last '/' - name = message.type_url.substring(message.type_url.lastIndexOf("/") + 1); - // Separate the prefix used - prefix = message.type_url.substring(0, message.type_url.lastIndexOf("/") + 1); - var type = this.lookup(name); - /* istanbul ignore else */ - if (type) - message = type.decode(message.value, undefined, undefined, depth + 1); - } - - // wrap value if unmapped - if (!(message instanceof this.ctor) && message instanceof Message) { - var object = message.$type.toObject(message, options, depth + 1); - var messageName = message.$type.fullName[0] === "." ? - message.$type.fullName.slice(1) : message.$type.fullName; - // Default to type.googleapis.com prefix if no prefix is used - if (prefix === "") { - prefix = googleApi; - } - name = prefix + messageName; - object["@type"] = name; - return object; - } - - return this.toObject(message, options, depth); - } -}; diff --git a/node_modules/protobufjs/src/writer.js b/node_modules/protobufjs/src/writer.js deleted file mode 100644 index 1d26447..0000000 --- a/node_modules/protobufjs/src/writer.js +++ /dev/null @@ -1,467 +0,0 @@ -"use strict"; -module.exports = Writer; - -var util = require("./util/minimal"); - -var BufferWriter; // cyclic - -var LongBits = util.LongBits, - base64 = util.base64, - utf8 = util.utf8; - -/** - * Constructs a new writer operation instance. - * @classdesc Scheduled writer operation. - * @constructor - * @param {function(*, Uint8Array, number)} fn Function to call - * @param {number} len Value byte length - * @param {*} val Value to write - * @ignore - */ -function Op(fn, len, val) { - - /** - * Function to call. - * @type {function(Uint8Array, number, *)} - */ - this.fn = fn; - - /** - * Value byte length. - * @type {number} - */ - this.len = len; - - /** - * Next operation. - * @type {Writer.Op|undefined} - */ - this.next = undefined; - - /** - * Value to write. - * @type {*} - */ - this.val = val; // type varies -} - -/* istanbul ignore next */ -function noop() {} // eslint-disable-line no-empty-function - -/** - * Constructs a new writer state instance. - * @classdesc Copied writer state. - * @memberof Writer - * @constructor - * @param {Writer} writer Writer to copy state from - * @ignore - */ -function State(writer) { - - /** - * Current head. - * @type {Writer.Op} - */ - this.head = writer.head; - - /** - * Current tail. - * @type {Writer.Op} - */ - this.tail = writer.tail; - - /** - * Current buffer length. - * @type {number} - */ - this.len = writer.len; - - /** - * Next state. - * @type {State|null} - */ - this.next = writer.states; -} - -/** - * Constructs a new writer instance. - * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`. - * @constructor - */ -function Writer() { - - /** - * Current length. - * @type {number} - */ - this.len = 0; - - /** - * Operations head. - * @type {Object} - */ - this.head = new Op(noop, 0, 0); - - /** - * Operations tail - * @type {Object} - */ - this.tail = this.head; - - /** - * Linked forked states. - * @type {Object|null} - */ - this.states = null; - - // When a value is written, the writer calculates its byte length and puts it into a linked - // list of operations to perform when finish() is called. This both allows us to allocate - // buffers of the exact required size and reduces the amount of work we have to do compared - // to first calculating over objects and then encoding over objects. In our case, the encoding - // part is just a linked list walk calling operations with already prepared values. -} - -var create = function create() { - return util.Buffer - ? function create_buffer_setup() { - return (Writer.create = function create_buffer() { - return new BufferWriter(); - })(); - } - /* istanbul ignore next */ - : function create_array() { - return new Writer(); - }; -}; - -/** - * Creates a new writer. - * @function - * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} - */ -Writer.create = create(); - -/** - * Allocates a buffer of the specified size. - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ -Writer.alloc = function alloc(size) { - return new util.Array(size); -}; - -// Use Uint8Array buffer pool in the browser, just like node does with buffers -/* istanbul ignore else */ -if (util.Array !== Array) - Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray); - -/** - * Pushes a new operation to the queue. - * @param {function(Uint8Array, number, *)} fn Function to call - * @param {number} len Value byte length - * @param {number} val Value to write - * @returns {Writer} `this` - * @private - */ -Writer.prototype._push = function push(fn, len, val) { - this.tail = this.tail.next = new Op(fn, len, val); - this.len += len; - return this; -}; - -function writeByte(val, buf, pos) { - buf[pos] = val & 255; -} - -function writeVarint32(val, buf, pos) { - while (val > 127) { - buf[pos++] = val & 127 | 128; - val >>>= 7; - } - buf[pos] = val; -} - -/** - * Constructs a new varint writer operation instance. - * @classdesc Scheduled varint writer operation. - * @extends Op - * @constructor - * @param {number} len Value byte length - * @param {number} val Value to write - * @ignore - */ -function VarintOp(len, val) { - this.len = len; - this.next = undefined; - this.val = val; -} - -VarintOp.prototype = Object.create(Op.prototype); -VarintOp.prototype.fn = writeVarint32; - -/** - * Writes an unsigned 32 bit value as a varint. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.uint32 = function write_uint32(value) { - // here, the call to this.push has been inlined and a varint specific Op subclass is used. - // uint32 is by far the most frequently used operation and benefits significantly from this. - this.len += (this.tail = this.tail.next = new VarintOp( - (value = value >>> 0) - < 128 ? 1 - : value < 16384 ? 2 - : value < 2097152 ? 3 - : value < 268435456 ? 4 - : 5, - value)).len; - return this; -}; - -/** - * Writes a signed 32 bit value as a varint. - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.int32 = function write_int32(value) { - return (value |= 0) < 0 - ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec - : this.uint32(value); -}; - -/** - * Writes a 32 bit value as a varint, zig-zag encoded. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.sint32 = function write_sint32(value) { - return this.uint32((value << 1 ^ value >> 31) >>> 0); -}; - -function writeVarint64(val, buf, pos) { - var lo = val.lo, - hi = val.hi; - while (hi) { - buf[pos++] = lo & 127 | 128; - lo = (lo >>> 7 | hi << 25) >>> 0; - hi >>>= 7; - } - while (lo > 127) { - buf[pos++] = lo & 127 | 128; - lo = lo >>> 7; - } - buf[pos++] = lo; -} - -/** - * Writes an unsigned 64 bit value as a varint. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.uint64 = function write_uint64(value) { - var bits = LongBits.from(value); - return this._push(writeVarint64, bits.length(), bits); -}; - -/** - * Writes a signed 64 bit value as a varint. - * @function - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.int64 = Writer.prototype.uint64; - -/** - * Writes a signed 64 bit value as a varint, zig-zag encoded. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.sint64 = function write_sint64(value) { - var bits = LongBits.from(value).zzEncode(); - return this._push(writeVarint64, bits.length(), bits); -}; - -/** - * Writes a boolish value as a varint. - * @param {boolean} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.bool = function write_bool(value) { - return this._push(writeByte, 1, value ? 1 : 0); -}; - -function writeFixed32(val, buf, pos) { - buf[pos ] = val & 255; - buf[pos + 1] = val >>> 8 & 255; - buf[pos + 2] = val >>> 16 & 255; - buf[pos + 3] = val >>> 24; -} - -/** - * Writes an unsigned 32 bit value as fixed 32 bits. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.fixed32 = function write_fixed32(value) { - return this._push(writeFixed32, 4, value >>> 0); -}; - -/** - * Writes a signed 32 bit value as fixed 32 bits. - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.sfixed32 = Writer.prototype.fixed32; - -/** - * Writes an unsigned 64 bit value as fixed 64 bits. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.fixed64 = function write_fixed64(value) { - var bits = LongBits.from(value); - return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); -}; - -/** - * Writes a signed 64 bit value as fixed 64 bits. - * @function - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.sfixed64 = Writer.prototype.fixed64; - -/** - * Writes a float (32 bit). - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.float = function write_float(value) { - return this._push(util.float.writeFloatLE, 4, value); -}; - -/** - * Writes a double (64 bit float). - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.double = function write_double(value) { - return this._push(util.float.writeDoubleLE, 8, value); -}; - -var writeBytes = util.Array.prototype.set - ? function writeBytes_set(val, buf, pos) { - buf.set(val, pos); // also works for plain array values - } - /* istanbul ignore next */ - : function writeBytes_for(val, buf, pos) { - for (var i = 0; i < val.length; ++i) - buf[pos + i] = val[i]; - }; - -/** - * Writes a sequence of bytes. - * @param {Uint8Array|string} value Buffer or base64 encoded string to write - * @returns {Writer} `this` - */ -Writer.prototype.bytes = function write_bytes(value) { - var len = value.length >>> 0; - if (!len) - return this._push(writeByte, 1, 0); - if (util.isString(value)) { - var buf = Writer.alloc(len = base64.length(value)); - base64.decode(value, buf, 0); - value = buf; - } - return this.uint32(len)._push(writeBytes, len, value); -}; - -/** - * Writes a string. - * @param {string} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.string = function write_string(value) { - var len = utf8.length(value); - return len - ? this.uint32(len)._push(utf8.write, len, value) - : this._push(writeByte, 1, 0); -}; - -/** - * Forks this writer's state by pushing it to a stack. - * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. - * @returns {Writer} `this` - */ -Writer.prototype.fork = function fork() { - this.states = new State(this); - this.head = this.tail = new Op(noop, 0, 0); - this.len = 0; - return this; -}; - -/** - * Resets this instance to the last state. - * @returns {Writer} `this` - */ -Writer.prototype.reset = function reset() { - if (this.states) { - this.head = this.states.head; - this.tail = this.states.tail; - this.len = this.states.len; - this.states = this.states.next; - } else { - this.head = this.tail = new Op(noop, 0, 0); - this.len = 0; - } - return this; -}; - -/** - * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. - * @returns {Writer} `this` - */ -Writer.prototype.ldelim = function ldelim() { - var head = this.head, - tail = this.tail, - len = this.len; - this.reset().uint32(len); - if (len) { - this.tail.next = head.next; // skip noop - this.tail = tail; - this.len += len; - } - return this; -}; - -/** - * Finishes the write operation. - * @returns {Uint8Array} Finished buffer - */ -Writer.prototype.finish = function finish() { - var head = this.head.next, // skip noop - buf = this.constructor.alloc(this.len), - pos = 0; - while (head) { - head.fn(head.val, buf, pos); - pos += head.len; - head = head.next; - } - // this.head = this.tail = null; - return buf; -}; - -Writer._configure = function(BufferWriter_) { - BufferWriter = BufferWriter_; - Writer.create = create(); - BufferWriter._configure(); -}; diff --git a/node_modules/protobufjs/src/writer_buffer.js b/node_modules/protobufjs/src/writer_buffer.js deleted file mode 100644 index 09a4a91..0000000 --- a/node_modules/protobufjs/src/writer_buffer.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; -module.exports = BufferWriter; - -// extends Writer -var Writer = require("./writer"); -(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; - -var util = require("./util/minimal"); - -/** - * Constructs a new buffer writer instance. - * @classdesc Wire format writer using node buffers. - * @extends Writer - * @constructor - */ -function BufferWriter() { - Writer.call(this); -} - -BufferWriter._configure = function () { - /** - * Allocates a buffer of the specified size. - * @function - * @param {number} size Buffer size - * @returns {Buffer} Buffer - */ - BufferWriter.alloc = util._Buffer_allocUnsafe; - - BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" - ? function writeBytesBuffer_set(val, buf, pos) { - buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) - // also works for plain array values - } - /* istanbul ignore next */ - : function writeBytesBuffer_copy(val, buf, pos) { - if (val.copy) // Buffer values - val.copy(buf, pos, 0, val.length); - else for (var i = 0; i < val.length;) // plain array values - buf[pos++] = val[i++]; - }; -}; - - -/** - * @override - */ -BufferWriter.prototype.bytes = function write_bytes_buffer(value) { - if (util.isString(value)) - value = util._Buffer_from(value, "base64"); - var len = value.length >>> 0; - this.uint32(len); - if (len) - this._push(BufferWriter.writeBytesBuffer, len, value); - return this; -}; - -function writeStringBuffer(val, buf, pos) { - if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) - util.utf8.write(val, buf, pos); - else if (buf.utf8Write) - buf.utf8Write(val, pos); - else - buf.write(val, pos); -} - -/** - * @override - */ -BufferWriter.prototype.string = function write_string_buffer(value) { - var len = util.Buffer.byteLength(value); - this.uint32(len); - if (len) - this._push(writeStringBuffer, len, value); - return this; -}; - - -/** - * Finishes the write operation. - * @name BufferWriter#finish - * @function - * @returns {Buffer} Finished buffer - */ - -BufferWriter._configure(); diff --git a/node_modules/protobufjs/tsconfig.json b/node_modules/protobufjs/tsconfig.json deleted file mode 100644 index a0b3639..0000000 --- a/node_modules/protobufjs/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "compilerOptions": { - "target": "ES5", - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "esModuleInterop": true, - } -} \ No newline at end of file diff --git a/node_modules/proxy-addr/HISTORY.md b/node_modules/proxy-addr/HISTORY.md deleted file mode 100644 index 8480242..0000000 --- a/node_modules/proxy-addr/HISTORY.md +++ /dev/null @@ -1,161 +0,0 @@ -2.0.7 / 2021-05-31 -================== - - * deps: forwarded@0.2.0 - - Use `req.socket` over deprecated `req.connection` - -2.0.6 / 2020-02-24 -================== - - * deps: ipaddr.js@1.9.1 - -2.0.5 / 2019-04-16 -================== - - * deps: ipaddr.js@1.9.0 - -2.0.4 / 2018-07-26 -================== - - * deps: ipaddr.js@1.8.0 - -2.0.3 / 2018-02-19 -================== - - * deps: ipaddr.js@1.6.0 - -2.0.2 / 2017-09-24 -================== - - * deps: forwarded@~0.1.2 - - perf: improve header parsing - - perf: reduce overhead when no `X-Forwarded-For` header - -2.0.1 / 2017-09-10 -================== - - * deps: forwarded@~0.1.1 - - Fix trimming leading / trailing OWS - - perf: hoist regular expression - * deps: ipaddr.js@1.5.2 - -2.0.0 / 2017-08-08 -================== - - * Drop support for Node.js below 0.10 - -1.1.5 / 2017-07-25 -================== - - * Fix array argument being altered - * deps: ipaddr.js@1.4.0 - -1.1.4 / 2017-03-24 -================== - - * deps: ipaddr.js@1.3.0 - -1.1.3 / 2017-01-14 -================== - - * deps: ipaddr.js@1.2.0 - -1.1.2 / 2016-05-29 -================== - - * deps: ipaddr.js@1.1.1 - - Fix IPv6-mapped IPv4 validation edge cases - -1.1.1 / 2016-05-03 -================== - - * Fix regression matching mixed versions against multiple subnets - -1.1.0 / 2016-05-01 -================== - - * Fix accepting various invalid netmasks - - IPv4 netmasks must be contingous - - IPv6 addresses cannot be used as a netmask - * deps: ipaddr.js@1.1.0 - -1.0.10 / 2015-12-09 -=================== - - * deps: ipaddr.js@1.0.5 - - Fix regression in `isValid` with non-string arguments - -1.0.9 / 2015-12-01 -================== - - * deps: ipaddr.js@1.0.4 - - Fix accepting some invalid IPv6 addresses - - Reject CIDRs with negative or overlong masks - * perf: enable strict mode - -1.0.8 / 2015-05-10 -================== - - * deps: ipaddr.js@1.0.1 - -1.0.7 / 2015-03-16 -================== - - * deps: ipaddr.js@0.1.9 - - Fix OOM on certain inputs to `isValid` - -1.0.6 / 2015-02-01 -================== - - * deps: ipaddr.js@0.1.8 - -1.0.5 / 2015-01-08 -================== - - * deps: ipaddr.js@0.1.6 - -1.0.4 / 2014-11-23 -================== - - * deps: ipaddr.js@0.1.5 - - Fix edge cases with `isValid` - -1.0.3 / 2014-09-21 -================== - - * Use `forwarded` npm module - -1.0.2 / 2014-09-18 -================== - - * Fix a global leak when multiple subnets are trusted - * Support Node.js 0.6 - * deps: ipaddr.js@0.1.3 - -1.0.1 / 2014-06-03 -================== - - * Fix links in npm package - -1.0.0 / 2014-05-08 -================== - - * Add `trust` argument to determine proxy trust on - * Accepts custom function - * Accepts IPv4/IPv6 address(es) - * Accepts subnets - * Accepts pre-defined names - * Add optional `trust` argument to `proxyaddr.all` to - stop at first untrusted - * Add `proxyaddr.compile` to pre-compile `trust` function - to make subsequent calls faster - -0.0.1 / 2014-05-04 -================== - - * Fix bad npm publish - -0.0.0 / 2014-05-04 -================== - - * Initial release diff --git a/node_modules/proxy-addr/LICENSE b/node_modules/proxy-addr/LICENSE deleted file mode 100644 index cab251c..0000000 --- a/node_modules/proxy-addr/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/proxy-addr/README.md b/node_modules/proxy-addr/README.md deleted file mode 100644 index 69c0b63..0000000 --- a/node_modules/proxy-addr/README.md +++ /dev/null @@ -1,139 +0,0 @@ -# proxy-addr - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Determine address of proxied request - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install proxy-addr -``` - -## API - -```js -var proxyaddr = require('proxy-addr') -``` - -### proxyaddr(req, trust) - -Return the address of the request, using the given `trust` parameter. - -The `trust` argument is a function that returns `true` if you trust -the address, `false` if you don't. The closest untrusted address is -returned. - -```js -proxyaddr(req, function (addr) { return addr === '127.0.0.1' }) -proxyaddr(req, function (addr, i) { return i < 1 }) -``` - -The `trust` arugment may also be a single IP address string or an -array of trusted addresses, as plain IP addresses, CIDR-formatted -strings, or IP/netmask strings. - -```js -proxyaddr(req, '127.0.0.1') -proxyaddr(req, ['127.0.0.0/8', '10.0.0.0/8']) -proxyaddr(req, ['127.0.0.0/255.0.0.0', '192.168.0.0/255.255.0.0']) -``` - -This module also supports IPv6. Your IPv6 addresses will be normalized -automatically (i.e. `fe80::00ed:1` equals `fe80:0:0:0:0:0:ed:1`). - -```js -proxyaddr(req, '::1') -proxyaddr(req, ['::1/128', 'fe80::/10']) -``` - -This module will automatically work with IPv4-mapped IPv6 addresses -as well to support node.js in IPv6-only mode. This means that you do -not have to specify both `::ffff:a00:1` and `10.0.0.1`. - -As a convenience, this module also takes certain pre-defined names -in addition to IP addresses, which expand into IP addresses: - -```js -proxyaddr(req, 'loopback') -proxyaddr(req, ['loopback', 'fc00:ac:1ab5:fff::1/64']) -``` - - * `loopback`: IPv4 and IPv6 loopback addresses (like `::1` and - `127.0.0.1`). - * `linklocal`: IPv4 and IPv6 link-local addresses (like - `fe80::1:1:1:1` and `169.254.0.1`). - * `uniquelocal`: IPv4 private addresses and IPv6 unique-local - addresses (like `fc00:ac:1ab5:fff::1` and `192.168.0.1`). - -When `trust` is specified as a function, it will be called for each -address to determine if it is a trusted address. The function is -given two arguments: `addr` and `i`, where `addr` is a string of -the address to check and `i` is a number that represents the distance -from the socket address. - -### proxyaddr.all(req, [trust]) - -Return all the addresses of the request, optionally stopping at the -first untrusted. This array is ordered from closest to furthest -(i.e. `arr[0] === req.connection.remoteAddress`). - -```js -proxyaddr.all(req) -``` - -The optional `trust` argument takes the same arguments as `trust` -does in `proxyaddr(req, trust)`. - -```js -proxyaddr.all(req, 'loopback') -``` - -### proxyaddr.compile(val) - -Compiles argument `val` into a `trust` function. This function takes -the same arguments as `trust` does in `proxyaddr(req, trust)` and -returns a function suitable for `proxyaddr(req, trust)`. - -```js -var trust = proxyaddr.compile('loopback') -var addr = proxyaddr(req, trust) -``` - -This function is meant to be optimized for use against every request. -It is recommend to compile a trust function up-front for the trusted -configuration and pass that to `proxyaddr(req, trust)` for each request. - -## Testing - -```sh -$ npm test -``` - -## Benchmarks - -```sh -$ npm run-script bench -``` - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/proxy-addr/master?label=ci -[ci-url]: https://github.com/jshttp/proxy-addr/actions?query=workflow%3Aci -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/proxy-addr/master -[coveralls-url]: https://coveralls.io/r/jshttp/proxy-addr?branch=master -[node-image]: https://badgen.net/npm/node/proxy-addr -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/proxy-addr -[npm-url]: https://npmjs.org/package/proxy-addr -[npm-version-image]: https://badgen.net/npm/v/proxy-addr diff --git a/node_modules/proxy-addr/index.js b/node_modules/proxy-addr/index.js deleted file mode 100644 index a909b05..0000000 --- a/node_modules/proxy-addr/index.js +++ /dev/null @@ -1,327 +0,0 @@ -/*! - * proxy-addr - * Copyright(c) 2014-2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = proxyaddr -module.exports.all = alladdrs -module.exports.compile = compile - -/** - * Module dependencies. - * @private - */ - -var forwarded = require('forwarded') -var ipaddr = require('ipaddr.js') - -/** - * Variables. - * @private - */ - -var DIGIT_REGEXP = /^[0-9]+$/ -var isip = ipaddr.isValid -var parseip = ipaddr.parse - -/** - * Pre-defined IP ranges. - * @private - */ - -var IP_RANGES = { - linklocal: ['169.254.0.0/16', 'fe80::/10'], - loopback: ['127.0.0.1/8', '::1/128'], - uniquelocal: ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', 'fc00::/7'] -} - -/** - * Get all addresses in the request, optionally stopping - * at the first untrusted. - * - * @param {Object} request - * @param {Function|Array|String} [trust] - * @public - */ - -function alladdrs (req, trust) { - // get addresses - var addrs = forwarded(req) - - if (!trust) { - // Return all addresses - return addrs - } - - if (typeof trust !== 'function') { - trust = compile(trust) - } - - for (var i = 0; i < addrs.length - 1; i++) { - if (trust(addrs[i], i)) continue - - addrs.length = i + 1 - } - - return addrs -} - -/** - * Compile argument into trust function. - * - * @param {Array|String} val - * @private - */ - -function compile (val) { - if (!val) { - throw new TypeError('argument is required') - } - - var trust - - if (typeof val === 'string') { - trust = [val] - } else if (Array.isArray(val)) { - trust = val.slice() - } else { - throw new TypeError('unsupported trust argument') - } - - for (var i = 0; i < trust.length; i++) { - val = trust[i] - - if (!Object.prototype.hasOwnProperty.call(IP_RANGES, val)) { - continue - } - - // Splice in pre-defined range - val = IP_RANGES[val] - trust.splice.apply(trust, [i, 1].concat(val)) - i += val.length - 1 - } - - return compileTrust(compileRangeSubnets(trust)) -} - -/** - * Compile `arr` elements into range subnets. - * - * @param {Array} arr - * @private - */ - -function compileRangeSubnets (arr) { - var rangeSubnets = new Array(arr.length) - - for (var i = 0; i < arr.length; i++) { - rangeSubnets[i] = parseipNotation(arr[i]) - } - - return rangeSubnets -} - -/** - * Compile range subnet array into trust function. - * - * @param {Array} rangeSubnets - * @private - */ - -function compileTrust (rangeSubnets) { - // Return optimized function based on length - var len = rangeSubnets.length - return len === 0 - ? trustNone - : len === 1 - ? trustSingle(rangeSubnets[0]) - : trustMulti(rangeSubnets) -} - -/** - * Parse IP notation string into range subnet. - * - * @param {String} note - * @private - */ - -function parseipNotation (note) { - var pos = note.lastIndexOf('/') - var str = pos !== -1 - ? note.substring(0, pos) - : note - - if (!isip(str)) { - throw new TypeError('invalid IP address: ' + str) - } - - var ip = parseip(str) - - if (pos === -1 && ip.kind() === 'ipv6' && ip.isIPv4MappedAddress()) { - // Store as IPv4 - ip = ip.toIPv4Address() - } - - var max = ip.kind() === 'ipv6' - ? 128 - : 32 - - var range = pos !== -1 - ? note.substring(pos + 1, note.length) - : null - - if (range === null) { - range = max - } else if (DIGIT_REGEXP.test(range)) { - range = parseInt(range, 10) - } else if (ip.kind() === 'ipv4' && isip(range)) { - range = parseNetmask(range) - } else { - range = null - } - - if (range <= 0 || range > max) { - throw new TypeError('invalid range on address: ' + note) - } - - return [ip, range] -} - -/** - * Parse netmask string into CIDR range. - * - * @param {String} netmask - * @private - */ - -function parseNetmask (netmask) { - var ip = parseip(netmask) - var kind = ip.kind() - - return kind === 'ipv4' - ? ip.prefixLengthFromSubnetMask() - : null -} - -/** - * Determine address of proxied request. - * - * @param {Object} request - * @param {Function|Array|String} trust - * @public - */ - -function proxyaddr (req, trust) { - if (!req) { - throw new TypeError('req argument is required') - } - - if (!trust) { - throw new TypeError('trust argument is required') - } - - var addrs = alladdrs(req, trust) - var addr = addrs[addrs.length - 1] - - return addr -} - -/** - * Static trust function to trust nothing. - * - * @private - */ - -function trustNone () { - return false -} - -/** - * Compile trust function for multiple subnets. - * - * @param {Array} subnets - * @private - */ - -function trustMulti (subnets) { - return function trust (addr) { - if (!isip(addr)) return false - - var ip = parseip(addr) - var ipconv - var kind = ip.kind() - - for (var i = 0; i < subnets.length; i++) { - var subnet = subnets[i] - var subnetip = subnet[0] - var subnetkind = subnetip.kind() - var subnetrange = subnet[1] - var trusted = ip - - if (kind !== subnetkind) { - if (subnetkind === 'ipv4' && !ip.isIPv4MappedAddress()) { - // Incompatible IP addresses - continue - } - - if (!ipconv) { - // Convert IP to match subnet IP kind - ipconv = subnetkind === 'ipv4' - ? ip.toIPv4Address() - : ip.toIPv4MappedAddress() - } - - trusted = ipconv - } - - if (trusted.match(subnetip, subnetrange)) { - return true - } - } - - return false - } -} - -/** - * Compile trust function for single subnet. - * - * @param {Object} subnet - * @private - */ - -function trustSingle (subnet) { - var subnetip = subnet[0] - var subnetkind = subnetip.kind() - var subnetisipv4 = subnetkind === 'ipv4' - var subnetrange = subnet[1] - - return function trust (addr) { - if (!isip(addr)) return false - - var ip = parseip(addr) - var kind = ip.kind() - - if (kind !== subnetkind) { - if (subnetisipv4 && !ip.isIPv4MappedAddress()) { - // Incompatible IP addresses - return false - } - - // Convert IP to match subnet IP kind - ip = subnetisipv4 - ? ip.toIPv4Address() - : ip.toIPv4MappedAddress() - } - - return ip.match(subnetip, subnetrange) - } -} diff --git a/node_modules/proxy-addr/package.json b/node_modules/proxy-addr/package.json deleted file mode 100644 index 24ba8f7..0000000 --- a/node_modules/proxy-addr/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "proxy-addr", - "description": "Determine address of proxied request", - "version": "2.0.7", - "author": "Douglas Christopher Wilson ", - "license": "MIT", - "keywords": [ - "ip", - "proxy", - "x-forwarded-for" - ], - "repository": "jshttp/proxy-addr", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "devDependencies": { - "benchmark": "2.1.4", - "beautify-benchmark": "0.2.4", - "deep-equal": "1.0.1", - "eslint": "7.26.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.23.4", - "eslint-plugin-markdown": "2.2.0", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "4.3.1", - "eslint-plugin-standard": "4.1.0", - "mocha": "8.4.0", - "nyc": "15.1.0" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.10" - }, - "scripts": { - "bench": "node benchmark/index.js", - "lint": "eslint .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/qs/.editorconfig b/node_modules/qs/.editorconfig deleted file mode 100644 index dd5a8d8..0000000 --- a/node_modules/qs/.editorconfig +++ /dev/null @@ -1,46 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 180 -quote_type = single - -[test/*] -max_line_length = off - -[LICENSE.md] -indent_size = off - -[*.md] -max_line_length = off - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[LICENSE] -indent_size = 2 -max_line_length = off - -[coverage/**/*] -indent_size = off -indent_style = off -indent = off -max_line_length = off - -[.nycrc] -indent_style = tab - -[tea.yaml] -indent_size = 2 diff --git a/node_modules/qs/.github/FUNDING.yml b/node_modules/qs/.github/FUNDING.yml deleted file mode 100644 index 0355f4f..0000000 --- a/node_modules/qs/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/qs -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/qs/.github/SECURITY.md b/node_modules/qs/.github/SECURITY.md deleted file mode 100644 index b499cb6..0000000 --- a/node_modules/qs/.github/SECURITY.md +++ /dev/null @@ -1,11 +0,0 @@ -# Security - -Please file a private vulnerability report via GitHub, email [@ljharb](https://github.com/ljharb), or see https://tidelift.com/security if you have a potential security vulnerability to report. - -## Incident Response Plan - -Please see our [Incident Response Plan](https://github.com/ljharb/.github/blob/main/INCIDENT_RESPONSE_PLAN.md). - -## Threat Model - -Please see [THREAT_MODEL.md](./THREAT_MODEL.md). diff --git a/node_modules/qs/.github/THREAT_MODEL.md b/node_modules/qs/.github/THREAT_MODEL.md deleted file mode 100644 index 7e6fef1..0000000 --- a/node_modules/qs/.github/THREAT_MODEL.md +++ /dev/null @@ -1,78 +0,0 @@ -## Threat Model for qs (querystring parsing library) - -### 1. Library Overview - -- **Library Name:** qs -- **Brief Description:** A JavaScript library for parsing and stringifying URL query strings, supporting nested objects and arrays. It is widely used in Node.js and web applications for processing query parameters[2][6][8]. -- **Key Public APIs/Functions:** `qs.parse()`, `qs.stringify()` - -### 2. Define Scope - -This threat model focuses on the core parsing and stringifying functionality, specifically the handling of nested objects and arrays, option validation, and cycle management in stringification. - -### 3. Conceptual System Diagram - -``` -Caller Application → qs.parse(input, options) → Parsing Engine → Output Object - │ - └→ Options Handling - -Caller Application → qs.stringify(obj, options) → Stringifying Engine → Output String - │ - └→ Options Handling - └→ Cycle Tracking -``` - -**Trust Boundaries:** -- **Input string (parse):** May come from untrusted sources (e.g., user input, network requests) -- **Input object (stringify):** May contain cycles, which can lead to infinite loops during stringification -- **Options:** Provided by the caller -- **Cycle Tracking:** Used only during stringification to detect and handle circular references - -### 4. Identify Assets - -- **Integrity of parsed output:** Prevent malicious manipulation of the output object structure, especially ensuring builtins/globals are not modified as a result of parse[3][4][8]. -- **Confidentiality of processed data:** Avoid leaking sensitive information through errors or output. -- **Availability/performance for host application:** Prevent crashes or resource exhaustion in the consuming application. -- **Security of host application:** Prevent the library from being a vector for attacks (e.g., prototype pollution, DoS). -- **Reputation of library:** Maintain trust by avoiding supply chain attacks and vulnerabilities[1]. - -### 5. Identify Threats - -| Component / API / Interaction | S | T | R | I | D | E | -|---------------------------------------|----|----|----|----|----|----| -| Public API Call (`parse`) | – | ✓ | – | ✓ | ✓ | ✓ | -| Public API Call (`stringify`) | – | ✓ | – | ✓ | ✓ | – | -| Options Handling | ✓ | ✓ | – | ✓ | – | ✓ | -| Dependency Interaction | – | – | – | – | ✓ | – | - -**Key Threats:** -- **Tampering:** Malicious input can, if not prevented, alter parsed output (e.g., prototype pollution via `__proto__`, modification of builtins/globals)[3][4][8]. -- **Information Disclosure:** Error messages may expose internal details or sensitive data. -- **Denial of Service:** Large or malformed input can exhaust memory or CPU. -- **Elevation of Privilege:** Prototype pollution can lead to unintended privilege escalation in the host application[3][4][8]. - -### 6. Mitigation/Countermeasures - -| Threat Identified | Proposed Mitigation | -|---------------------------------------------------|---------------------| -| Tampering (malicious input, prototype pollution) | Strict input validation; keep `allowPrototypes: false` by default; use `plainObjects` for output; ensure builtins/globals are never modified by parse[4][8]. | -| Information Disclosure (error messages) | Generic error messages without stack traces or internal paths. | -| Denial of Service (memory/CPU exhaustion) | Enforce `arrayLimit` and `parameterLimit` with safe defaults; enable `throwOnLimitExceeded`; limit nesting depth[7]. | -| Elevation of Privilege (prototype pollution) | Keep `allowPrototypes: false`; validate options against allowlist; use `plainObjects` to avoid prototype pollution[4][8]. | - -### 7. Risk Ranking - -- **High:** Denial of Service via array parsing or malformed input (historical vulnerability) -- **Medium:** Prototype pollution via options or input (if `allowPrototypes` enabled) -- **Low:** Information disclosure in errors - -### 8. Next Steps & Review - -1. **Audit option validation logic.** -2. **Add depth limiting to nested parsing and stringification.** -3. **Implement fuzz testing for parser and stringifier edge cases.** -4. **Regularly review dependencies for vulnerabilities.** -5. **Keep documentation and threat model up to date.** -6. **Ensure builtins/globals are never modified as a result of parse.** -7. **Support round-trip consistency between parse and stringify as a non-security goal, with the right options[5][9].** diff --git a/node_modules/qs/.nycrc b/node_modules/qs/.nycrc deleted file mode 100644 index 1d57cab..0000000 --- a/node_modules/qs/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "dist" - ] -} diff --git a/node_modules/qs/CHANGELOG.md b/node_modules/qs/CHANGELOG.md deleted file mode 100644 index d92ec43..0000000 --- a/node_modules/qs/CHANGELOG.md +++ /dev/null @@ -1,822 +0,0 @@ -## **6.15.2** -- [Fix] `stringify`: skip null/undefined entries in `arrayFormat: 'comma'` + `encodeValuesOnly` instead of crashing in `encoder` -- [Fix] `stringify`: use configured `delimiter` after `charsetSentinel` (#555) -- [Fix] `stringify`: apply `formatter` to encoded key under `strictNullHandling` (#554) -- [Fix] `stringify`: skip null/undefined filter-array entries instead of crashing in `encoder` (#551) -- [Fix] `parse`: handle nested bracket groups and add regression tests (#530) -- [readme] fix grammar (#550) -- [Dev Deps] update `@ljharb/eslint-config` -- [Tests] add regression tests for keys containing percent-encoded bracket text - -## **6.15.1** -- [Fix] `parse`: `parameterLimit: Infinity` with `throwOnLimitExceeded: true` silently drops all parameters -- [Deps] update `@ljharb/eslint-config` -- [Dev Deps] update `@ljharb/eslint-config`, `iconv-lite` -- [Tests] increase coverage - -## **6.15.0** -- [New] `parse`: add `strictMerge` option to wrap object/primitive conflicts in an array (#425, #122) -- [Fix] `duplicates` option should not apply to bracket notation keys (#514) - -## **6.14.2** -- [Fix] `parse`: mark overflow objects for indexed notation exceeding `arrayLimit` (#546) -- [Fix] `arrayLimit` means max count, not max index, in `combine`/`merge`/`parseArrayValue` -- [Fix] `parse`: throw on `arrayLimit` exceeded with indexed notation when `throwOnLimitExceeded` is true (#529) -- [Fix] `parse`: enforce `arrayLimit` on `comma`-parsed values -- [Fix] `parse`: fix error message to reflect arrayLimit as max index; remove extraneous comments (#545) -- [Robustness] avoid `.push`, use `void` -- [readme] document that `addQueryPrefix` does not add `?` to empty output (#418) -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] replace runkit CI badge with shields.io check-runs badge -- [meta] fix changelog typo (`arrayLength` → `arrayLimit`) -- [actions] fix rebase workflow permissions - -## **6.14.1** -- [Fix] ensure `arrayLimit` applies to `[]` notation as well -- [Fix] `parse`: when a custom decoder returns `null` for a key, ignore that key -- [Refactor] `parse`: extract key segment splitting helper -- [meta] add threat model -- [actions] add workflow permissions -- [Tests] `stringify`: increase coverage -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `npmignore`, `es-value-fixtures`, `for-each`, `object-inspect` - -## **6.14.0** -- [New] `parse`: add `throwOnParameterLimitExceeded` option (#517) -- [Refactor] `parse`: use `utils.combine` more -- [patch] `parse`: add explicit `throwOnLimitExceeded` default -- [actions] use shared action; re-add finishers -- [meta] Fix changelog formatting bug -- [Deps] update `side-channel` -- [Dev Deps] update `es-value-fixtures`, `has-bigints`, `has-proto`, `has-symbols` -- [Tests] increase coverage - -## **6.13.3** -[Fix] fix regressions from robustness refactor -[actions] update reusable workflows - -## **6.13.2** -- [Robustness] avoid `.push`, use `void` -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] document that `addQueryPrefix` does not add `?` to empty output (#418) -- [readme] replace runkit CI badge with shields.io check-runs badge -- [actions] fix rebase workflow permissions - -## **6.13.1** -- [Fix] `stringify`: avoid a crash when a `filter` key is `null` -- [Fix] `utils.merge`: functions should not be stringified into keys -- [Fix] `parse`: avoid a crash with interpretNumericEntities: true, comma: true, and iso charset -- [Fix] `stringify`: ensure a non-string `filter` does not crash -- [Refactor] use `__proto__` syntax instead of `Object.create` for null objects -- [Refactor] misc cleanup -- [Tests] `utils.merge`: add some coverage -- [Tests] fix a test case -- [actions] split out node 10-20, and 20+ -- [Dev Deps] update `es-value-fixtures`, `mock-property`, `object-inspect`, `tape` - -## **6.13.0** -- [New] `parse`: add `strictDepth` option (#511) -- [Tests] use `npm audit` instead of `aud` - -## **6.12.5** -- [Fix] fix regressions from robustness refactor -- [actions] update reusable workflows - -## **6.12.4** -- [Robustness] avoid `.push`, use `void` -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] document that `addQueryPrefix` does not add `?` to empty output (#418) -- [readme] replace runkit CI badge with shields.io check-runs badge -- [actions] fix rebase workflow permissions - -## **6.12.3** -- [Fix] `parse`: properly account for `strictNullHandling` when `allowEmptyArrays` -- [meta] fix changelog indentation - -## **6.12.2** -- [Fix] `parse`: parse encoded square brackets (#506) -- [readme] add CII best practices badge - -## **6.12.1** -- [Fix] `parse`: Disable `decodeDotInKeys` by default to restore previous behavior (#501) -- [Performance] `utils`: Optimize performance under large data volumes, reduce memory usage, and speed up processing (#502) -- [Refactor] `utils`: use `+=` -- [Tests] increase coverage - -## **6.12.0** - -- [New] `parse`/`stringify`: add `decodeDotInKeys`/`encodeDotKeys` options (#488) -- [New] `parse`: add `duplicates` option -- [New] `parse`/`stringify`: add `allowEmptyArrays` option to allow [] in object values (#487) -- [Refactor] `parse`/`stringify`: move allowDots config logic to its own variable -- [Refactor] `stringify`: move option-handling code into `normalizeStringifyOptions` -- [readme] update readme, add logos (#484) -- [readme] `stringify`: clarify default `arrayFormat` behavior -- [readme] fix line wrapping -- [readme] remove dead badges -- [Deps] update `side-channel` -- [meta] make the dist build 50% smaller -- [meta] add `sideEffects` flag -- [meta] run build in prepack, not prepublish -- [Tests] `parse`: remove useless tests; add coverage -- [Tests] `stringify`: increase coverage -- [Tests] use `mock-property` -- [Tests] `stringify`: improve coverage -- [Dev Deps] update `@ljharb/eslint-config `, `aud`, `has-override-mistake`, `has-property-descriptors`, `mock-property`, `npmignore`, `object-inspect`, `tape` -- [Dev Deps] pin `glob`, since v10.3.8+ requires a broken `jackspeak` -- [Dev Deps] pin `jackspeak` since 2.1.2+ depends on npm aliases, which kill the install process in npm < 6 - -## **6.11.4** -- [Fix] fix regressions from robustness refactor -- [actions] update reusable workflows - -## **6.11.3** -- [Robustness] avoid `.push`, use `void` -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] document that `addQueryPrefix` does not add `?` to empty output (#418) -- [readme] replace runkit CI badge with shields.io check-runs badge -- [actions] fix rebase workflow permissions - -## **6.11.2** -- [Fix] `parse`: Fix parsing when the global Object prototype is frozen (#473) -- [Tests] add passing test cases with empty keys (#473) - -## **6.11.1** -- [Fix] `stringify`: encode comma values more consistently (#463) -- [readme] add usage of `filter` option for injecting custom serialization, i.e. of custom types (#447) -- [meta] remove extraneous code backticks (#457) -- [meta] fix changelog markdown -- [actions] update checkout action -- [actions] restrict action permissions -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` - -## **6.11.0** -- [New] [Fix] `stringify`: revert 0e903c0; add `commaRoundTrip` option (#442) -- [readme] fix version badge - -## **6.10.7** -- [Fix] fix regressions from robustness refactor -- [actions] update reusable workflows - -## **6.10.6** -- [Robustness] avoid `.push`, use `void` -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] document that `addQueryPrefix` does not add `?` to empty output (#418) -- [readme] replace runkit CI badge with shields.io check-runs badge -- [actions] fix rebase workflow permissions - -## **6.10.5** -- [Fix] `stringify`: with `arrayFormat: comma`, properly include an explicit `[]` on a single-item array (#434) - -## **6.10.4** -- [Fix] `stringify`: with `arrayFormat: comma`, include an explicit `[]` on a single-item array (#441) -- [meta] use `npmignore` to autogenerate an npmignore file -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-symbol`, `object-inspect`, `tape` - -## **6.10.3** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [actions] reuse common workflows -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `tape` - -## **6.10.2** -- [Fix] `stringify`: actually fix cyclic references (#426) -- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424) -- [readme] remove travis badge; add github actions/codecov badges; update URLs -- [Docs] add note and links for coercing primitive values (#408) -- [actions] update codecov uploader -- [actions] update workflows -- [Tests] clean up stringify tests slightly -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `safe-publish-latest`, `tape` - -## **6.10.1** -- [Fix] `stringify`: avoid exception on repeated object values (#402) - -## **6.10.0** -- [New] `stringify`: throw on cycles, instead of an infinite loop (#395, #394, #393) -- [New] `parse`: add `allowSparse` option for collapsing arrays with missing indices (#312) -- [meta] fix README.md (#399) -- [meta] only run `npm run dist` in publish, not install -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-symbols`, `tape` -- [Tests] fix tests on node v0.6 -- [Tests] use `ljharb/actions/node/install` instead of `ljharb/actions/node/run` -- [Tests] Revert "[meta] ignore eclint transitive audit warning" - -## **6.9.9** -- [Fix] fix regressions from robustness refactor -- [meta] add `npmignore` to autogenerate an npmignore file -- [actions] update reusable workflows - -## **6.9.8** -- [Robustness] avoid `.push`, use `void` -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] document that `addQueryPrefix` does not add `?` to empty output (#418) -- [readme] replace runkit CI badge with shields.io check-runs badge -- [actions] fix rebase workflow permissions - -## **6.9.7** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424) -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [readme] remove travis badge; add github actions/codecov badges; update URLs -- [Docs] add note and links for coercing primitive values (#408) -- [Tests] clean up stringify tests slightly -- [meta] fix README.md (#399) -- Revert "[meta] ignore eclint transitive audit warning" -- [actions] backport actions from main -- [Dev Deps] backport updates from main - -## **6.9.6** -- [Fix] restore `dist` dir; mistakenly removed in d4f6c32 - -## **6.9.5** -- [Fix] `stringify`: do not encode parens for RFC1738 -- [Fix] `stringify`: fix arrayFormat comma with empty array/objects (#350) -- [Refactor] `format`: remove `util.assign` call -- [meta] add "Allow Edits" workflow; update rebase workflow -- [actions] switch Automatic Rebase workflow to `pull_request_target` event -- [Tests] `stringify`: add tests for #378 -- [Tests] migrate tests to Github Actions -- [Tests] run `nyc` on all tests; use `tape` runner -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `mkdirp`, `object-inspect`, `tape`; add `aud` - -## **6.9.4** -- [Fix] `stringify`: when `arrayFormat` is `comma`, respect `serializeDate` (#364) -- [Refactor] `stringify`: reduce branching (part of #350) -- [Refactor] move `maybeMap` to `utils` -- [Dev Deps] update `browserify`, `tape` - -## **6.9.3** -- [Fix] proper comma parsing of URL-encoded commas (#361) -- [Fix] parses comma delimited array while having percent-encoded comma treated as normal text (#336) - -## **6.9.2** -- [Fix] `parse`: Fix parsing array from object with `comma` true (#359) -- [Fix] `parse`: throw a TypeError instead of an Error for bad charset (#349) -- [meta] ignore eclint transitive audit warning -- [meta] fix indentation in package.json -- [meta] add tidelift marketing copy -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `has-symbols`, `tape`, `mkdirp`, `iconv-lite` -- [actions] add automatic rebasing / merge commit blocking - -## **6.9.1** -- [Fix] `parse`: with comma true, handle field that holds an array of arrays (#335) -- [Fix] `parse`: with comma true, do not split non-string values (#334) -- [meta] add `funding` field -- [Dev Deps] update `eslint`, `@ljharb/eslint-config` -- [Tests] use shared travis-ci config - -## **6.9.0** -- [New] `parse`/`stringify`: Pass extra key/value argument to `decoder` (#333) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `evalmd` -- [Tests] `parse`: add passing `arrayFormat` tests -- [Tests] add `posttest` using `npx aud` to run `npm audit` without a lockfile -- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16` -- [Tests] `Buffer.from` in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray - -## **6.8.5** -- [Fix] fix regressions from robustness refactor -- [meta] add `npmignore` to autogenerate an npmignore file -- [actions] update reusable workflows - -## **6.8.4** -- [Robustness] avoid `.push`, use `void` -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] document that `addQueryPrefix` does not add `?` to empty output (#418) -- [readme] replace runkit CI badge with shields.io check-runs badge -- [actions] fix rebase workflow permissions - -## **6.8.3** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424) -- [readme] remove travis badge; add github actions/codecov badges; update URLs -- [Tests] clean up stringify tests slightly -- [Docs] add note and links for coercing primitive values (#408) -- [meta] fix README.md (#399) -- [actions] backport actions from main -- [Dev Deps] backport updates from main -- [Refactor] `stringify`: reduce branching -- [meta] do not publish workflow files - -## **6.8.2** -- [Fix] proper comma parsing of URL-encoded commas (#361) -- [Fix] parses comma delimited array while having percent-encoded comma treated as normal text (#336) - -## **6.8.1** -- [Fix] `parse`: Fix parsing array from object with `comma` true (#359) -- [Fix] `parse`: throw a TypeError instead of an Error for bad charset (#349) -- [Fix] `parse`: with comma true, handle field that holds an array of arrays (#335) -- [fix] `parse`: with comma true, do not split non-string values (#334) -- [meta] add tidelift marketing copy -- [meta] add `funding` field -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `safe-publish-latest`, `evalmd`, `has-symbols`, `iconv-lite`, `mkdirp`, `object-inspect` -- [Tests] `parse`: add passing `arrayFormat` tests -- [Tests] use shared travis-ci configs -- [Tests] `Buffer.from` in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray -- [actions] add automatic rebasing / merge commit blocking - -## **6.8.0** -- [New] add `depth=false` to preserve the original key; [Fix] `depth=0` should preserve the original key (#326) -- [New] [Fix] stringify symbols and bigints -- [Fix] ensure node 0.12 can stringify Symbols -- [Fix] fix for an impossible situation: when the formatter is called with a non-string value -- [Refactor] `formats`: tiny bit of cleanup. -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `safe-publish-latest`, `iconv-lite`, `tape` -- [Tests] add tests for `depth=0` and `depth=false` behavior, both current and intuitive/intended (#326) -- [Tests] use `eclint` instead of `editorconfig-tools` -- [docs] readme: add security note -- [meta] add github sponsorship -- [meta] add FUNDING.yml -- [meta] Clean up license text so it’s properly detected as BSD-3-Clause - -## **6.7.5** -- [Fix] fix regressions from robustness refactor -- [meta] add `npmignore` to autogenerate an npmignore file -- [actions] update reusable workflows - -## **6.7.4** -- [Robustness] avoid `.push`, use `void` -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] document that `addQueryPrefix` does not add `?` to empty output (#418) -- [readme] replace runkit CI badge with shields.io check-runs badge -- [actions] fix rebase workflow permissions - -## **6.7.3** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424) -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [readme] remove travis badge; add github actions/codecov badges; update URLs -- [Docs] add note and links for coercing primitive values (#408) -- [meta] fix README.md (#399) -- [meta] do not publish workflow files -- [actions] backport actions from main -- [Dev Deps] backport updates from main -- [Tests] use `nyc` for coverage -- [Tests] clean up stringify tests slightly - -## **6.7.2** -- [Fix] proper comma parsing of URL-encoded commas (#361) -- [Fix] parses comma delimited array while having percent-encoded comma treated as normal text (#336) - -## **6.7.1** -- [Fix] `parse`: Fix parsing array from object with `comma` true (#359) -- [Fix] `parse`: with comma true, handle field that holds an array of arrays (#335) -- [fix] `parse`: with comma true, do not split non-string values (#334) -- [Fix] `parse`: throw a TypeError instead of an Error for bad charset (#349) -- [Fix] fix for an impossible situation: when the formatter is called with a non-string value -- [Refactor] `formats`: tiny bit of cleanup. -- readme: add security note -- [meta] add tidelift marketing copy -- [meta] add `funding` field -- [meta] add FUNDING.yml -- [meta] Clean up license text so it’s properly detected as BSD-3-Clause -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `safe-publish-latest`, `evalmd`, `iconv-lite`, `mkdirp`, `object-inspect`, `browserify` -- [Tests] `parse`: add passing `arrayFormat` tests -- [Tests] use shared travis-ci configs -- [Tests] `Buffer.from` in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray -- [Tests] add tests for `depth=0` and `depth=false` behavior, both current and intuitive/intended -- [Tests] use `eclint` instead of `editorconfig-tools` -- [actions] add automatic rebasing / merge commit blocking - -## **6.7.0** -- [New] `stringify`/`parse`: add `comma` as an `arrayFormat` option (#276, #219) -- [Fix] correctly parse nested arrays (#212) -- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source, also with an array source -- [Robustness] `stringify`: cache `Object.prototype.hasOwnProperty` -- [Refactor] `utils`: `isBuffer`: small tweak; add tests -- [Refactor] use cached `Array.isArray` -- [Refactor] `parse`/`stringify`: make a function to normalize the options -- [Refactor] `utils`: reduce observable [[Get]]s -- [Refactor] `stringify`/`utils`: cache `Array.isArray` -- [Tests] always use `String(x)` over `x.toString()` -- [Tests] fix Buffer tests to work in node < 4.5 and node < 5.10 -- [Tests] temporarily allow coverage to fail - -## **6.6.3** -- [Fix] fix regressions from robustness refactor -- [meta] add `npmignore` to autogenerate an npmignore file -- [actions] update reusable workflows - -## **6.6.2** -- [Robustness] avoid `.push`, use `void` -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] document that `addQueryPrefix` does not add `?` to empty output (#418) -- [readme] replace runkit CI badge with shields.io check-runs badge -- [actions] fix rebase workflow permissions - -## **6.6.1** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Fix] fix for an impossible situation: when the formatter is called with a non-string value -- [Fix] `utils.merge`: avoid a crash with a null target and an array source -- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source -- [Fix] correctly parse nested arrays -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [Robustness] `stringify`: cache `Object.prototype.hasOwnProperty` -- [Refactor] `formats`: tiny bit of cleanup. -- [Refactor] `utils`: `isBuffer`: small tweak; add tests -- [Refactor]: `stringify`/`utils`: cache `Array.isArray` -- [Refactor] `utils`: reduce observable [[Get]]s -- [Refactor] use cached `Array.isArray` -- [Refactor] `parse`/`stringify`: make a function to normalize the options -- [readme] remove travis badge; add github actions/codecov badges; update URLs -- [Docs] Clarify the need for "arrayLimit" option -- [meta] fix README.md (#399) -- [meta] do not publish workflow files -- [meta] Clean up license text so it’s properly detected as BSD-3-Clause -- [meta] add FUNDING.yml -- [meta] Fixes typo in CHANGELOG.md -- [actions] backport actions from main -- [Tests] fix Buffer tests to work in node < 4.5 and node < 5.10 -- [Tests] always use `String(x)` over `x.toString()` -- [Dev Deps] backport from main - -## **6.6.0** -- [New] Add support for iso-8859-1, utf8 "sentinel" and numeric entities (#268) -- [New] move two-value combine to a `utils` function (#189) -- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279) -- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` (#260) -- [Fix] `stringify`: do not crash in an obscure combo of `interpretNumericEntities`, a bad custom `decoder`, & `iso-8859-1` -- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided -- [refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269) -- [Refactor] `parse`: only need to reassign the var once -- [Refactor] `parse`/`stringify`: clean up `charset` options checking; fix defaults -- [Refactor] add missing defaults -- [Refactor] `parse`: one less `concat` call -- [Refactor] `utils`: `compactQueue`: make it explicitly side-effecting -- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`, `iconv-lite`, `safe-publish-latest`, `tape` -- [Tests] up to `node` `v10.10`, `v9.11`, `v8.12`, `v6.14`, `v4.9`; pin included builds to LTS - -## **6.5.5** -- [Fix] fix regressions from robustness refactor -- [meta] add `npmignore` to autogenerate an npmignore file -- [actions] update reusable workflows - -## **6.5.4** -- [Robustness] avoid `.push`, use `void` -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] document that `addQueryPrefix` does not add `?` to empty output (#418) -- [readme] replace runkit CI badge with shields.io check-runs badge -- [actions] fix rebase workflow permissions - -## **6.5.3** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source -- [Fix] correctly parse nested arrays -- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279) -- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided -- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` -- [Fix] fix for an impossible situation: when the formatter is called with a non-string value -- [Fix] `utils.merge`: avoid a crash with a null target and an array source -- [Refactor] `utils`: reduce observable [[Get]]s -- [Refactor] use cached `Array.isArray` -- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269) -- [Refactor] `parse`: only need to reassign the var once -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [readme] remove travis badge; add github actions/codecov badges; update URLs -- [Docs] Clean up license text so it’s properly detected as BSD-3-Clause -- [Docs] Clarify the need for "arrayLimit" option -- [meta] fix README.md (#399) -- [meta] add FUNDING.yml -- [actions] backport actions from main -- [Tests] always use `String(x)` over `x.toString()` -- [Tests] remove nonexistent tape option -- [Dev Deps] backport from main - -## **6.5.2** -- [Fix] use `safer-buffer` instead of `Buffer` constructor -- [Refactor] utils: `module.exports` one thing, instead of mutating `exports` (#230) -- [Dev Deps] update `browserify`, `eslint`, `iconv-lite`, `safer-buffer`, `tape`, `browserify` - -## **6.5.1** -- [Fix] Fix parsing & compacting very deep objects (#224) -- [Refactor] name utils functions -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` -- [Tests] up to `node` `v8.4`; use `nvm install-latest-npm` so newer npm doesn’t break older node -- [Tests] Use precise dist for Node.js 0.6 runtime (#225) -- [Tests] make 0.6 required, now that it’s passing -- [Tests] on `node` `v8.2`; fix npm on node 0.6 - -## **6.5.0** -- [New] add `utils.assign` -- [New] pass default encoder/decoder to custom encoder/decoder functions (#206) -- [New] `parse`/`stringify`: add `ignoreQueryPrefix`/`addQueryPrefix` options, respectively (#213) -- [Fix] Handle stringifying empty objects with addQueryPrefix (#217) -- [Fix] do not mutate `options` argument (#207) -- [Refactor] `parse`: cache index to reuse in else statement (#182) -- [Docs] add various badges to readme (#208) -- [Dev Deps] update `eslint`, `browserify`, `iconv-lite`, `tape` -- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`; npm v4.6 breaks on node < v1; npm v5+ breaks on node < v4 -- [Tests] add `editorconfig-tools` - -## **6.4.3** -- [Fix] fix regressions from robustness refactor -- [meta] add `npmignore` to autogenerate an npmignore file -- [actions] update reusable workflows - -## **6.4.2** -- [Robustness] avoid `.push`, use `void` -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] replace runkit CI badge with shields.io check-runs badge -- [readme] replace travis CI badge with shields.io check-runs badge -- [actions] fix rebase workflow permissions - -## **6.4.1** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Fix] fix for an impossible situation: when the formatter is called with a non-string value -- [Fix] use `safer-buffer` instead of `Buffer` constructor -- [Fix] `utils.merge`: avoid a crash with a null target and an array source -- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source -- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279) -- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided -- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [Refactor] use cached `Array.isArray` -- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269) -- [readme] remove travis badge; add github actions/codecov badges; update URLs -- [Docs] Clarify the need for "arrayLimit" option -- [meta] fix README.md (#399) -- [meta] Clean up license text so it’s properly detected as BSD-3-Clause -- [meta] add FUNDING.yml -- [actions] backport actions from main -- [Tests] remove nonexistent tape option -- [Dev Deps] backport from main - -## **6.4.0** -- [New] `qs.stringify`: add `encodeValuesOnly` option -- [Fix] follow `allowPrototypes` option during merge (#201, #201) -- [Fix] support keys starting with brackets (#202, #200) -- [Fix] chmod a-x -- [Dev Deps] update `eslint` -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds -- [eslint] reduce warnings - -## **6.3.5** -- [Fix] fix regressions from robustness refactor -- [meta] add `npmignore` to autogenerate an npmignore file -- [actions] update reusable workflows - -## **6.3.4** -- [Robustness] avoid `.push`, use `void` -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] replace travis CI badge with shields.io check-runs badge -- [actions] fix rebase workflow permissions - -## **6.3.3** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Fix] fix for an impossible situation: when the formatter is called with a non-string value -- [Fix] `utils.merge`: avoid a crash with a null target and an array source -- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source -- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279) -- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided -- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [Refactor] use cached `Array.isArray` -- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269) -- [Docs] Clarify the need for "arrayLimit" option -- [meta] fix README.md (#399) -- [meta] Clean up license text so it’s properly detected as BSD-3-Clause -- [meta] add FUNDING.yml -- [actions] backport actions from main -- [Tests] use `safer-buffer` instead of `Buffer` constructor -- [Tests] remove nonexistent tape option -- [Dev Deps] backport from main - -## **6.3.2** -- [Fix] follow `allowPrototypes` option during merge (#201, #200) -- [Dev Deps] update `eslint` -- [Fix] chmod a-x -- [Fix] support keys starting with brackets (#202, #200) -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds - -## **6.3.1** -- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties (thanks, @snyk!) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `iconv-lite`, `qs-iconv`, `tape` -- [Tests] on all node minors; improve test matrix -- [Docs] document stringify option `allowDots` (#195) -- [Docs] add empty object and array values example (#195) -- [Docs] Fix minor inconsistency/typo (#192) -- [Docs] document stringify option `sort` (#191) -- [Refactor] `stringify`: throw faster with an invalid encoder -- [Refactor] remove unnecessary escapes (#184) -- Remove contributing.md, since `qs` is no longer part of `hapi` (#183) - -## **6.3.0** -- [New] Add support for RFC 1738 (#174, #173) -- [New] `stringify`: Add `serializeDate` option to customize Date serialization (#159) -- [Fix] ensure `utils.merge` handles merging two arrays -- [Refactor] only constructors should be capitalized -- [Refactor] capitalized var names are for constructors only -- [Refactor] avoid using a sparse array -- [Robustness] `formats`: cache `String#replace` -- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest` -- [Tests] up to `node` `v6.8`, `v4.6`; improve test matrix -- [Tests] flesh out arrayLimit/arrayFormat tests (#107) -- [Tests] skip Object.create tests when null objects are not available -- [Tests] Turn on eslint for test files (#175) - -## **6.2.6** -- [Fix] fix regression from robustness refactor -- [meta] add `npmignore` to autogenerate an npmignore file -- [actions] update reusable workflows - -## **6.2.5** -- [Robustness] avoid `.push`, use `void` -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] replace travis CI badge with shields.io check-runs badge -- [actions] fix rebase workflow permissions - -## **6.2.4** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Fix] `utils.merge`: avoid a crash with a null target and an array source -- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source -- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided -- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [Refactor] use cached `Array.isArray` -- [Docs] Clarify the need for "arrayLimit" option -- [meta] fix README.md (#399) -- [meta] Clean up license text so it’s properly detected as BSD-3-Clause -- [meta] add FUNDING.yml -- [actions] backport actions from main -- [Tests] use `safer-buffer` instead of `Buffer` constructor -- [Tests] remove nonexistent tape option -- [Dev Deps] backport from main - -## **6.2.3** -- [Fix] follow `allowPrototypes` option during merge (#201, #200) -- [Fix] chmod a-x -- [Fix] support keys starting with brackets (#202, #200) -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds - -## **6.2.2** -- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties - -## **6.2.1** -- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values -- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call` -- [Tests] remove `parallelshell` since it does not reliably report failures -- [Tests] up to `node` `v6.3`, `v5.12` -- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `qs-iconv` - -## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed) -- [New] pass Buffers to the encoder/decoder directly (#161) -- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160) -- [Fix] fix compacting of nested sparse arrays (#150) - -## **6.1.4** -- [Fix] fix regression from robustness refactor -- [meta] add `npmignore` to autogenerate an npmignore file -- [actions] update reusable workflows - -## **6.1.3** -- [Robustness] avoid `.push`, use `void` -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] replace travis CI badge with shields.io check-runs badge - -## **6.1.2** -- [Fix] follow `allowPrototypes` option during merge (#201, #200) -- [Fix] chmod a-x -- [Fix] support keys starting with brackets (#202, #200) -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds - -## **6.1.1** -- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties - -## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed) -- [New] allowDots option for `stringify` (#151) -- [Fix] "sort" option should work at a depth of 3 or more (#151) -- [Fix] Restore `dist` directory; will be removed in v7 (#148) - -## **6.0.6** -- [Fix] fix regression from robustness refactor -- [meta] add `npmignore` to autogenerate an npmignore file -- [actions] update reusable workflows - -## **6.0.5** -- [Robustness] avoid `.push`, use `void` -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] replace travis CI badge with shields.io check-runs badge - -## **6.0.4** -- [Fix] follow `allowPrototypes` option during merge (#201, #200) -- [Fix] chmod a-x -- [Fix] support keys starting with brackets (#202, #200) -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds - -## **6.0.3** -- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties -- [Fix] Restore `dist` directory; will be removed in v7 (#148) - -## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed) -- Revert ES6 requirement and restore support for node down to v0.8. - -## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed) -- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json - -## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed) -- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4 - -## **5.2.1** -- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values - -## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed) -- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string - -## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed) -- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional -- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify - -## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed) -- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false -- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm - -## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed) -- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional - -## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed) -- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation" - -## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed) -- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties -- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost -- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing -- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object -- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option -- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects. -- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47 -- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986 -- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign -- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute - -## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed) -- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object # is not a function - -## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed) -- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option - -## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed) -- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57 -- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader - -## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed) -- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object - -## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed) -- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError". - -## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed) -- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46 - -## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed) -- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer? -- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45 -- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39 - -## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed) -- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number - -## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed) -- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array -- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x - -## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed) -- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value -- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty -- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver? - -## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed) -- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31 -- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects - -## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed) -- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present -- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays -- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge -- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters? - -## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed) -- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter - -## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed) -- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit? -- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit -- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20 - -## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed) -- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values - -## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed) -- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters -- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block - -## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed) -- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument -- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed - -## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed) -- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted -- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null -- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README - -## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed) -- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index diff --git a/node_modules/qs/LICENSE.md b/node_modules/qs/LICENSE.md deleted file mode 100644 index fecf6b6..0000000 --- a/node_modules/qs/LICENSE.md +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/qs/README.md b/node_modules/qs/README.md deleted file mode 100644 index fd64e3c..0000000 --- a/node_modules/qs/README.md +++ /dev/null @@ -1,758 +0,0 @@ -

- qs -

- -# qs [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] -[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/9058/badge)](https://bestpractices.coreinfrastructure.org/projects/9058) - -[![npm badge][npm-badge-png]][package-url] - -A querystring parsing and stringifying library with some added security. - -Lead Maintainer: [Jordan Harband](https://github.com/ljharb) - -The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring). - -## Usage - -```javascript -var qs = require('qs'); -var assert = require('assert'); - -var obj = qs.parse('a=c'); -assert.deepEqual(obj, { a: 'c' }); - -var str = qs.stringify(obj); -assert.equal(str, 'a=c'); -``` - -### Parsing Objects - -[](#preventEval) -```javascript -qs.parse(string, [options]); -``` - -**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`. -For example, the string `'foo[bar]=baz'` converts to: - -```javascript -assert.deepEqual(qs.parse('foo[bar]=baz'), { - foo: { - bar: 'baz' - } -}); -``` - -When using the `plainObjects` option the parsed value is returned as a null object, created via `{ __proto__: null }` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like: - -```javascript -var nullObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true }); -assert.deepEqual(nullObject, { a: { hasOwnProperty: 'b' } }); -``` - -By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties. -*WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. -Always be careful with this option. - -```javascript -var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }); -assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } }); -``` - -URI encoded strings work too: - -```javascript -assert.deepEqual(qs.parse('a%5Bb%5D=c'), { - a: { b: 'c' } -}); -``` - -You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`: - -```javascript -assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), { - foo: { - bar: { - baz: 'foobarbaz' - } - } -}); -``` - -By default, when nesting objects **qs** will only parse up to 5 children deep. -This means if you attempt to parse a string like `'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be: - -```javascript -var expected = { - a: { - b: { - c: { - d: { - e: { - f: { - '[g][h][i]': 'j' - } - } - } - } - } - } -}; -var string = 'a[b][c][d][e][f][g][h][i]=j'; -assert.deepEqual(qs.parse(string), expected); -``` - -This depth can be overridden by passing a `depth` option to `qs.parse(string, [options])`: - -```javascript -var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); -assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }); -``` - -You can configure **qs** to throw an error when parsing nested input beyond this depth using the `strictDepth` option (defaulted to false): - -```javascript -try { - qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1, strictDepth: true }); -} catch (err) { - assert(err instanceof RangeError); - assert.strictEqual(err.message, 'Input depth exceeded depth option of 1 and strictDepth is true'); -} -``` - -The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number. The strictDepth option adds a layer of protection by throwing an error when the limit is exceeded, allowing you to catch and handle such cases. - -For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option: - -```javascript -var limited = qs.parse('a=b&c=d', { parameterLimit: 1 }); -assert.deepEqual(limited, { a: 'b' }); -``` - -If you want an error to be thrown whenever the a limit is exceeded (eg, `parameterLimit`, `arrayLimit`), set the `throwOnLimitExceeded` option to `true`. This option will generate a descriptive error if the query string exceeds a configured limit. -```javascript -try { - qs.parse('a=1&b=2&c=3&d=4', { parameterLimit: 3, throwOnLimitExceeded: true }); -} catch (err) { - assert(err instanceof Error); - assert.strictEqual(err.message, 'Parameter limit exceeded. Only 3 parameters allowed.'); -} -``` - -When `throwOnLimitExceeded` is set to `false` (default), **qs** will parse up to the specified `parameterLimit` and ignore the rest without throwing an error. - -To bypass the leading question mark, use `ignoreQueryPrefix`: - -```javascript -var prefixed = qs.parse('?a=b&c=d', { ignoreQueryPrefix: true }); -assert.deepEqual(prefixed, { a: 'b', c: 'd' }); -``` - -An optional delimiter can also be passed: - -```javascript -var delimited = qs.parse('a=b;c=d', { delimiter: ';' }); -assert.deepEqual(delimited, { a: 'b', c: 'd' }); -``` - -Delimiters can be a regular expression too: - -```javascript -var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ }); -assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' }); -``` - -Option `allowDots` can be used to enable dot notation: - -```javascript -var withDots = qs.parse('a.b=c', { allowDots: true }); -assert.deepEqual(withDots, { a: { b: 'c' } }); -``` - -Option `decodeDotInKeys` can be used to decode dots in keys -Note: it implies `allowDots`, so `parse` will error if you set `decodeDotInKeys` to `true`, and `allowDots` to `false`. - -```javascript -var withDots = qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe', { decodeDotInKeys: true }); -assert.deepEqual(withDots, { 'name.obj': { first: 'John', last: 'Doe' }}); -``` - -Option `allowEmptyArrays` can be used to allow empty array values in an object -```javascript -var withEmptyArrays = qs.parse('foo[]&bar=baz', { allowEmptyArrays: true }); -assert.deepEqual(withEmptyArrays, { foo: [], bar: 'baz' }); -``` - -Option `duplicates` can be used to change the behavior when duplicate keys are encountered -```javascript -assert.deepEqual(qs.parse('foo=bar&foo=baz'), { foo: ['bar', 'baz'] }); -assert.deepEqual(qs.parse('foo=bar&foo=baz', { duplicates: 'combine' }), { foo: ['bar', 'baz'] }); -assert.deepEqual(qs.parse('foo=bar&foo=baz', { duplicates: 'first' }), { foo: 'bar' }); -assert.deepEqual(qs.parse('foo=bar&foo=baz', { duplicates: 'last' }), { foo: 'baz' }); -``` - -Note that keys with bracket notation (`[]`) always combine into arrays, regardless of the `duplicates` setting: -```javascript -assert.deepEqual(qs.parse('a=1&a=2&b[]=1&b[]=2', { duplicates: 'last' }), { a: '2', b: ['1', '2'] }); -``` - -If you have to deal with legacy browsers or services, there's also support for decoding percent-encoded octets as iso-8859-1: - -```javascript -var oldCharset = qs.parse('a=%A7', { charset: 'iso-8859-1' }); -assert.deepEqual(oldCharset, { a: '§' }); -``` - -Some services add an initial `utf8=✓` value to forms so that old Internet Explorer versions are more likely to submit the form as utf-8. -Additionally, the server can check the value against wrong encodings of the checkmark character and detect that a query string or `application/x-www-form-urlencoded` body was *not* sent as utf-8, eg. if the form had an `accept-charset` parameter or the containing page had a different character set. - -**qs** supports this mechanism via the `charsetSentinel` option. -If specified, the `utf8` parameter will be omitted from the returned object. -It will be used to switch to `iso-8859-1`/`utf-8` mode depending on how the checkmark is encoded. - -**Important**: When you specify both the `charset` option and the `charsetSentinel` option, the `charset` will be overridden when the request contains a `utf8` parameter from which the actual charset can be deduced. -In that sense the `charset` will behave as the default charset rather than the authoritative charset. - -```javascript -var detectedAsUtf8 = qs.parse('utf8=%E2%9C%93&a=%C3%B8', { - charset: 'iso-8859-1', - charsetSentinel: true -}); -assert.deepEqual(detectedAsUtf8, { a: 'ø' }); - -// Browsers encode the checkmark as ✓ when submitting as iso-8859-1: -var detectedAsIso8859_1 = qs.parse('utf8=%26%2310003%3B&a=%F8', { - charset: 'utf-8', - charsetSentinel: true -}); -assert.deepEqual(detectedAsIso8859_1, { a: 'ø' }); -``` - -If you want to decode the `&#...;` syntax to the actual character, you can specify the `interpretNumericEntities` option as well: - -```javascript -var detectedAsIso8859_1 = qs.parse('a=%26%239786%3B', { - charset: 'iso-8859-1', - interpretNumericEntities: true -}); -assert.deepEqual(detectedAsIso8859_1, { a: '☺' }); -``` - -It also works when the charset has been detected in `charsetSentinel` mode. - -### Parsing Arrays - -**qs** can also parse arrays using a similar `[]` notation: - -```javascript -var withArray = qs.parse('a[]=b&a[]=c'); -assert.deepEqual(withArray, { a: ['b', 'c'] }); -``` - -You may specify an index as well: - -```javascript -var withIndexes = qs.parse('a[1]=c&a[0]=b'); -assert.deepEqual(withIndexes, { a: ['b', 'c'] }); -``` - -Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number to create an array. -When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving their order: - -```javascript -var noSparse = qs.parse('a[1]=b&a[15]=c'); -assert.deepEqual(noSparse, { a: ['b', 'c'] }); -``` - -You may also use `allowSparse` option to parse sparse arrays: - -```javascript -var sparseArray = qs.parse('a[1]=2&a[3]=5', { allowSparse: true }); -assert.deepEqual(sparseArray, { a: [, '2', , '5'] }); -``` - -Note that an empty string is also a value, and will be preserved: - -```javascript -var withEmptyString = qs.parse('a[]=&a[]=b'); -assert.deepEqual(withEmptyString, { a: ['', 'b'] }); - -var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c'); -assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] }); -``` - -**qs** will also limit arrays to a maximum of `20` elements. -Any array members with an index of `20` or greater will instead be converted to an object with the index as the key. -This is needed to handle cases when someone sent, for example, `a[999999999]` and it will take significant time to iterate over this huge array. - -```javascript -var withMaxIndex = qs.parse('a[100]=b'); -assert.deepEqual(withMaxIndex, { a: { '100': 'b' } }); -``` - -This limit can be overridden by passing an `arrayLimit` option: - -```javascript -var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 }); -assert.deepEqual(withArrayLimit, { a: { '1': 'b' } }); -``` - -If you want to throw an error whenever the array limit is exceeded, set the `throwOnLimitExceeded` option to `true`. This option will generate a descriptive error if the query string exceeds a configured limit. -```javascript -try { - qs.parse('a[1]=b', { arrayLimit: 0, throwOnLimitExceeded: true }); -} catch (err) { - assert(err instanceof Error); - assert.strictEqual(err.message, 'Array limit exceeded. Only 0 elements allowed in an array.'); -} -``` - -When `throwOnLimitExceeded` is set to `false` (default), **qs** will parse up to the specified `arrayLimit` and if the limit is exceeded, the array will instead be converted to an object with the index as the key - -To prevent array syntax (`a[]`, `a[0]`) from being parsed as arrays, set `parseArrays` to `false`. -Note that duplicate keys (e.g. `a=b&a=c`) may still produce arrays when `duplicates` is `'combine'` (the default). - -```javascript -var noParsingArrays = qs.parse('a[]=b', { parseArrays: false }); -assert.deepEqual(noParsingArrays, { a: { '0': 'b' } }); -``` - -If you mix notations, **qs** will merge the two items into an object: - -```javascript -var mixedNotation = qs.parse('a[0]=b&a[b]=c'); -assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } }); -``` - -When a key appears as both a plain value and an object, **qs** will by default wrap the conflicting values in an array (`strictMerge` defaults to `true`): - -```javascript -assert.deepEqual(qs.parse('a[b]=c&a=d'), { a: [{ b: 'c' }, 'd'] }); -assert.deepEqual(qs.parse('a=d&a[b]=c'), { a: ['d', { b: 'c' }] }); -``` - -To restore the legacy behavior (where the primitive is used as a key with value `true`), set `strictMerge` to `false`: - -```javascript -assert.deepEqual(qs.parse('a[b]=c&a=d', { strictMerge: false }), { a: { b: 'c', d: true } }); -``` - -You can also create arrays of objects: - -```javascript -var arraysOfObjects = qs.parse('a[][b]=c'); -assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] }); -``` - -Some people use comma to join array, **qs** can parse it: -```javascript -var arraysOfObjects = qs.parse('a=b,c', { comma: true }) -assert.deepEqual(arraysOfObjects, { a: ['b', 'c'] }) -``` -(_this cannot convert nested objects, such as `a={b:1},{c:d}`_) - -### Parsing primitive/scalar values (numbers, booleans, null, etc) - -By default, all values are parsed as strings. -This behavior will not change and is explained in [issue #91](https://github.com/ljharb/qs/issues/91). - -```javascript -var primitiveValues = qs.parse('a=15&b=true&c=null'); -assert.deepEqual(primitiveValues, { a: '15', b: 'true', c: 'null' }); -``` - -If you wish to auto-convert values which look like numbers, booleans, and other values into their primitive counterparts, you can use the [query-types Express JS middleware](https://github.com/xpepermint/query-types) which will auto-convert all request query parameters. - -### Stringifying - -[](#preventEval) -```javascript -qs.stringify(object, [options]); -``` - -When stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect: - -```javascript -assert.equal(qs.stringify({ a: 'b' }), 'a=b'); -assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); -``` - -This encoding can be disabled by setting the `encode` option to `false`: - -```javascript -var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false }); -assert.equal(unencoded, 'a[b]=c'); -``` - -Encoding can be disabled for keys by setting the `encodeValuesOnly` option to `true`: -```javascript -var encodedValues = qs.stringify( - { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, - { encodeValuesOnly: true } -); -assert.equal(encodedValues,'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h'); -``` - -This encoding can also be replaced by a custom encoding method set as `encoder` option: - -```javascript -var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) { - // Passed in values `a`, `b`, `c` - return // Return encoded string -}}) -``` - -_(Note: the `encoder` option does not apply if `encode` is `false`)_ - -Analogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values: - -```javascript -var decoded = qs.parse('x=z', { decoder: function (str) { - // Passed in values `x`, `z` - return // Return decoded string -}}) -``` - -You can encode keys and values using different logic by using the type argument provided to the encoder: - -```javascript -var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str, defaultEncoder, charset, type) { - if (type === 'key') { - return // Encoded key - } else if (type === 'value') { - return // Encoded value - } -}}) -``` - -The type argument is also provided to the decoder: - -```javascript -var decoded = qs.parse('x=z', { decoder: function (str, defaultDecoder, charset, type) { - if (type === 'key') { - return // Decoded key - } else if (type === 'value') { - return // Decoded value - } -}}) -``` - -Examples beyond this point will be shown as though the output is not URI encoded for clarity. -Please note that the return values in these cases *will* be URI encoded during real usage. - -When arrays are stringified, they follow the `arrayFormat` option, which defaults to `indices`: - -```javascript -qs.stringify({ a: ['b', 'c', 'd'] }); -// 'a[0]=b&a[1]=c&a[2]=d' -``` - -You may override this by setting the `indices` option to `false`, or to be more explicit, the `arrayFormat` option to `repeat`: - -```javascript -qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }); -// 'a=b&a=c&a=d' -``` - -You may use the `arrayFormat` option to specify the format of the output array: - -```javascript -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }) -// 'a[0]=b&a[1]=c' -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }) -// 'a[]=b&a[]=c' -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }) -// 'a=b&a=c' -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'comma' }) -// 'a=b,c' -``` - -Note: when using `arrayFormat` set to `'comma'`, you can also pass the `commaRoundTrip` option set to `true` or `false`, to append `[]` on single-item arrays, so that they can round trip through a parse. - -When objects are stringified, by default they use bracket notation: - -```javascript -qs.stringify({ a: { b: { c: 'd', e: 'f' } } }); -// 'a[b][c]=d&a[b][e]=f' -``` - -You may override this to use dot notation by setting the `allowDots` option to `true`: - -```javascript -qs.stringify({ a: { b: { c: 'd', e: 'f' } } }, { allowDots: true }); -// 'a.b.c=d&a.b.e=f' -``` - -You may encode the dot notation in the keys of object with option `encodeDotInKeys` by setting it to `true`: -Note: it implies `allowDots`, so `stringify` will error if you set `decodeDotInKeys` to `true`, and `allowDots` to `false`. -Caveat: when `encodeValuesOnly` is `true` as well as `encodeDotInKeys`, only dots in keys and nothing else will be encoded. -```javascript -qs.stringify({ "name.obj": { "first": "John", "last": "Doe" } }, { allowDots: true, encodeDotInKeys: true }) -// 'name%252Eobj.first=John&name%252Eobj.last=Doe' -``` - -You may allow empty array values by setting the `allowEmptyArrays` option to `true`: -```javascript -qs.stringify({ foo: [], bar: 'baz' }, { allowEmptyArrays: true }); -// 'foo[]&bar=baz' -``` - -Empty strings and null values will omit the value, but the equals sign (=) remains in place: - -```javascript -assert.equal(qs.stringify({ a: '' }), 'a='); -``` - -Key with no values (such as an empty object or array) will return nothing: - -```javascript -assert.equal(qs.stringify({ a: [] }), ''); -assert.equal(qs.stringify({ a: {} }), ''); -assert.equal(qs.stringify({ a: [{}] }), ''); -assert.equal(qs.stringify({ a: { b: []} }), ''); -assert.equal(qs.stringify({ a: { b: {}} }), ''); -``` - -Properties that are set to `undefined` will be omitted entirely: - -```javascript -assert.equal(qs.stringify({ a: null, b: undefined }), 'a='); -``` - -The query string may optionally be prepended with a question mark: - -```javascript -assert.equal(qs.stringify({ a: 'b', c: 'd' }, { addQueryPrefix: true }), '?a=b&c=d'); -``` - -Note that when the output is an empty string, the prefix will not be added: - -```javascript -assert.equal(qs.stringify({}, { addQueryPrefix: true }), ''); -``` - -The delimiter may be overridden with stringify as well: - -```javascript -assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); -``` - -If you only want to override the serialization of `Date` objects, you can provide a `serializeDate` option: - -```javascript -var date = new Date(7); -assert.equal(qs.stringify({ a: date }), 'a=1970-01-01T00:00:00.007Z'.replace(/:/g, '%3A')); -assert.equal( - qs.stringify({ a: date }, { serializeDate: function (d) { return d.getTime(); } }), - 'a=7' -); -``` - -You may use the `sort` option to affect the order of parameter keys: - -```javascript -function alphabeticalSort(a, b) { - return a.localeCompare(b); -} -assert.equal(qs.stringify({ a: 'c', z: 'y', b : 'f' }, { sort: alphabeticalSort }), 'a=c&b=f&z=y'); -``` - -Finally, you can use the `filter` option to restrict which keys will be included in the stringified output. -If you pass a function, it will be called for each key to obtain the replacement value. -Otherwise, if you pass an array, it will be used to select properties and array indices for stringification: - -```javascript -function filterFunc(prefix, value) { - if (prefix == 'b') { - // Return an `undefined` value to omit a property. - return; - } - if (prefix == 'e[f]') { - return value.getTime(); - } - if (prefix == 'e[g][0]') { - return value * 2; - } - return value; -} -qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc }); -// 'a=b&c=d&e[f]=123&e[g][0]=4' -qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] }); -// 'a=b&e=f' -qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] }); -// 'a[0]=b&a[2]=d' -``` - -You could also use `filter` to inject custom serialization for user defined types. -Consider you're working with some api that expects query strings of the format for ranges: - -``` -https://domain.com/endpoint?range=30...70 -``` - -For which you model as: - -```javascript -class Range { - constructor(from, to) { - this.from = from; - this.to = to; - } -} -``` - -You could _inject_ a custom serializer to handle values of this type: - -```javascript -qs.stringify( - { - range: new Range(30, 70), - }, - { - filter: (prefix, value) => { - if (value instanceof Range) { - return `${value.from}...${value.to}`; - } - // serialize the usual way - return value; - }, - } -); -// range=30...70 -``` - -### Handling of `null` values - -By default, `null` values are treated like empty strings: - -```javascript -var withNull = qs.stringify({ a: null, b: '' }); -assert.equal(withNull, 'a=&b='); -``` - -Parsing does not distinguish between parameters with and without equal signs. -Both are converted to empty strings. - -```javascript -var equalsInsensitive = qs.parse('a&b='); -assert.deepEqual(equalsInsensitive, { a: '', b: '' }); -``` - -To distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null` -values have no `=` sign: - -```javascript -var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true }); -assert.equal(strictNull, 'a&b='); -``` - -To parse values without `=` back to `null` use the `strictNullHandling` flag: - -```javascript -var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true }); -assert.deepEqual(parsedStrictNull, { a: null, b: '' }); -``` - -To completely skip rendering keys with `null` values, use the `skipNulls` flag: - -```javascript -var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true }); -assert.equal(nullsSkipped, 'a=b'); -``` - -If you're communicating with legacy systems, you can switch to `iso-8859-1` using the `charset` option: - -```javascript -var iso = qs.stringify({ æ: 'æ' }, { charset: 'iso-8859-1' }); -assert.equal(iso, '%E6=%E6'); -``` - -Characters that don't exist in `iso-8859-1` will be converted to numeric entities, similar to what browsers do: - -```javascript -var numeric = qs.stringify({ a: '☺' }, { charset: 'iso-8859-1' }); -assert.equal(numeric, 'a=%26%239786%3B'); -``` - -You can use the `charsetSentinel` option to announce the character by including an `utf8=✓` parameter with the proper encoding if the checkmark, similar to what Ruby on Rails and others do when submitting forms. - -```javascript -var sentinel = qs.stringify({ a: '☺' }, { charsetSentinel: true }); -assert.equal(sentinel, 'utf8=%E2%9C%93&a=%E2%98%BA'); - -var isoSentinel = qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'iso-8859-1' }); -assert.equal(isoSentinel, 'utf8=%26%2310003%3B&a=%E6'); -``` - -### Dealing with special character sets - -By default the encoding and decoding of characters is done in `utf-8`, and `iso-8859-1` support is also built in via the `charset` parameter. - -If you wish to encode querystrings to a different character set (i.e. -[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the -[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library: - -```javascript -var encoder = require('qs-iconv/encoder')('shift_jis'); -var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder }); -assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I'); -``` - -This also works for decoding of query strings: - -```javascript -var decoder = require('qs-iconv/decoder')('shift_jis'); -var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder }); -assert.deepEqual(obj, { a: 'こんにちは!' }); -``` - -### RFC 3986 and RFC 1738 space encoding - -RFC3986 used as default option and encodes ' ' to *%20* which is backward compatible. -In the same time, output can be stringified as per RFC1738 with ' ' equal to '+'. - -``` -assert.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); -assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c'); -assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c'); -``` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -## qs for enterprise - -Available as part of the Tidelift Subscription - -The maintainers of qs and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. -Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. -[Learn more.](https://tidelift.com/subscription/pkg/npm-qs?utm_source=npm-qs&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - -[package-url]: https://npmjs.org/package/qs -[npm-version-svg]: https://versionbadg.es/ljharb/qs.svg -[deps-svg]: https://david-dm.org/ljharb/qs.svg -[deps-url]: https://david-dm.org/ljharb/qs -[dev-deps-svg]: https://david-dm.org/ljharb/qs/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/qs#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/qs.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/qs.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/qs.svg -[downloads-url]: https://npm-stat.com/charts.html?package=qs -[codecov-image]: https://codecov.io/gh/ljharb/qs/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/qs/ -[actions-image]: https://img.shields.io/github/check-runs/ljharb/qs/main -[actions-url]: https://github.com/ljharb/qs/actions - -## Acknowledgements - -qs logo by [NUMI](https://github.com/numi-hq/open-design): - -[NUMI Logo](https://numi.tech/?ref=qs) diff --git a/node_modules/qs/dist/qs.js b/node_modules/qs/dist/qs.js deleted file mode 100644 index e79e286..0000000 --- a/node_modules/qs/dist/qs.js +++ /dev/null @@ -1,141 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function parseQueryStringValues(e,t){var r={__proto__:null},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,t.throwOnLimitExceeded&&void 0!==a?a+1:a);if(t.throwOnLimitExceeded&&void 0!==a&&o.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(1===a?"":"s")+" allowed.");var l,n=-1,s=t.charset;if(t.charsetSentinel)for(l=0;l-1&&(c=isArray(c)?[c]:c),t.comma&&isArray(c)&&c.length>t.arrayLimit){if(t.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");c=utils.combine([],c,t.arrayLimit,t.plainObjects)}if(null!==d){var f=has.call(r,d);f&&("combine"===t.duplicates||p.indexOf("[]=")>-1)?r[d]=utils.combine(r[d],c,t.arrayLimit,t.plainObjects):f&&"last"!==t.duplicates||(r[d]=c)}}return r},parseObject=function(e,t,r,i){var a=0;if(e.length>0&&"[]"===e[e.length-1]){var o=e.slice(0,-1).join("");a=Array.isArray(t)&&t[o]?t[o].length:0}for(var l=i?t:parseArrayValue(t,r,a),n=e.length-1;n>=0;--n){var s,d=e[n];if("[]"===d&&r.parseArrays)s=utils.isOverflow(l)?l:r.allowEmptyArrays&&(""===l||r.strictNullHandling&&null===l)?[]:utils.combine([],l,r.arrayLimit,r.plainObjects);else{s=r.plainObjects?{__proto__:null}:{};var c="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,p=r.decodeDotInKeys?c.replace(/%2E/g,"."):c,u=parseInt(p,10),y=!isNaN(u)&&d!==p&&String(u)===p&&u>=0&&r.parseArrays;if(r.parseArrays||""!==p)if(y&&u=0?r.slice(0,a):r;if(o){if(!t.plainObjects&&has.call(Object.prototype,o)&&!t.allowPrototypes)return;i[i.length]=o}for(var l=r.length,n=a,s=0;n>=0&&s=0){if(!0===t.strictDepth)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");i[i.length]="["+r.slice(n)+"]"}return i},parseKeys=function parseQueryStringKeys(e,t,r,i){if(e){var a=splitKeyIntoSegments(e,r);if(a)return parseObject(a,t,r,i)}},normalizeParseOptions=function normalizeParseOptions(e){if(!e)return defaults;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?defaults.charset:e.charset,r=void 0===e.duplicates?defaults.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||defaults.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:defaults.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:defaults.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:defaults.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:defaults.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:defaults.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:defaults.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:defaults.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:defaults.decoder,delimiter:"string"==typeof e.delimiter||utils.isRegExp(e.delimiter)?e.delimiter:defaults.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:defaults.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:defaults.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:defaults.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:defaults.strictDepth,strictMerge:"boolean"==typeof e.strictMerge?!!e.strictMerge:defaults.strictMerge,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:defaults.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}};module.exports=function(e,t){var r=normalizeParseOptions(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var i="string"==typeof e?parseValues(e,r):e,a=r.plainObjects?{__proto__:null}:{},o=Object.keys(i),l=0;l0?g.join(",")||null:void 0}];else if(isArray(f))S=f;else{var N=Object.keys(g);S=u?N.sort(u):N}var T=l?String(r).replace(/\./g,"%2E"):String(r),O=o&&isArray(g)&&1===g.length?T+"[]":T;if(a&&isArray(g)&&0===g.length)return O+"[]";for(var k=0;k0?c+y:""}; - -},{"1":1,"46":46,"5":5}],5:[function(require,module,exports){ -"use strict";var formats=require(1),getSideChannel=require(46),has=Object.prototype.hasOwnProperty,isArray=Array.isArray,overflowChannel=getSideChannel(),markOverflow=function markOverflow(e,r){return overflowChannel.set(e,r),e},isOverflow=function isOverflow(e){return overflowChannel.has(e)},getMaxIndex=function getMaxIndex(e){return overflowChannel.get(e)},setMaxIndex=function setMaxIndex(e,r){overflowChannel.set(e,r)},hexTable=function(){for(var e=[],r=0;r<256;++r)e[e.length]="%"+((r<16?"0":"")+r.toString(16)).toUpperCase();return e}(),compactQueue=function compactQueue(e){for(;e.length>1;){var r=e.pop(),t=r.obj[r.prop];if(isArray(t)){for(var n=[],o=0;ot.arrayLimit)return markOverflow(arrayToObject(e.concat(r),t),n);e[n]=r}else{if(!e||"object"!=typeof e)return[e,r];if(isOverflow(e)){var o=getMaxIndex(e)+1;e[o]=r,setMaxIndex(e,o)}else{if(t&&t.strictMerge)return[e,r];(t&&(t.plainObjects||t.allowPrototypes)||!has.call(Object.prototype,r))&&(e[r]=!0)}}return e}if(!e||"object"!=typeof e){if(isOverflow(r)){for(var a=Object.keys(r),i=t&&t.plainObjects?{__proto__:null,0:e}:{0:e},c=0;ct.arrayLimit?markOverflow(arrayToObject(l,t),l.length-1):l}var f=e;return isArray(e)&&!isArray(r)&&(f=arrayToObject(e,t)),isArray(e)&&isArray(r)?(r.forEach(function(r,n){if(has.call(e,n)){var o=e[n];o&&"object"==typeof o&&r&&"object"==typeof r?e[n]=merge(o,r,t):e[e.length]=r}else e[n]=r}),e):Object.keys(r).reduce(function(e,n){var o=r[n];if(has.call(e,n)?e[n]=merge(e[n],o,t):e[n]=o,isOverflow(r)&&!isOverflow(e)&&markOverflow(e,getMaxIndex(r)),isOverflow(e)){var a=parseInt(n,10);String(a)===n&&a>=0&&a>getMaxIndex(e)&&setMaxIndex(e,a)}return e},f)},assign=function assignSingleSource(e,r){return Object.keys(r).reduce(function(e,t){return e[t]=r[t],e},e)},decode=function(e,r,t){var n=e.replace(/\+/g," ");if("iso-8859-1"===t)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},limit=1024,encode=function encode(e,r,t,n,o){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===t)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var i="",c=0;c=limit?a.slice(c,c+limit):a,f=[],s=0;s=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===formats.RFC1738&&(40===u||41===u)?f[f.length]=l.charAt(s):u<128?f[f.length]=hexTable[u]:u<2048?f[f.length]=hexTable[192|u>>6]+hexTable[128|63&u]:u<55296||u>=57344?f[f.length]=hexTable[224|u>>12]+hexTable[128|u>>6&63]+hexTable[128|63&u]:(s+=1,u=65536+((1023&u)<<10|1023&l.charCodeAt(s)),f[f.length]=hexTable[240|u>>18]+hexTable[128|u>>12&63]+hexTable[128|u>>6&63]+hexTable[128|63&u])}i+=f.join("")}return i},compact=function compact(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],n=0;nt?markOverflow(arrayToObject(a,{plainObjects:n}),a.length-1):a},maybeMap=function maybeMap(e,r){if(isArray(e)){for(var t=[],n=0;n-1?callBindBasic([t]):t}; - -},{"10":10,"25":25}],25:[function(require,module,exports){ -"use strict";var undefined,$Object=require(22),$Error=require(16),$EvalError=require(15),$RangeError=require(17),$ReferenceError=require(18),$SyntaxError=require(19),$TypeError=require(20),$URIError=require(21),abs=require(34),floor=require(35),max=require(37),min=require(38),pow=require(39),round=require(40),sign=require(41),$Function=Function,getEvalledConstructor=function(r){try{return $Function('"use strict"; return ('+r+").constructor;")()}catch(r){}},$gOPD=require(30),$defineProperty=require(14),throwTypeError=function(){throw new $TypeError},ThrowTypeError=$gOPD?function(){try{return throwTypeError}catch(r){try{return $gOPD(arguments,"callee").get}catch(r){return throwTypeError}}}():throwTypeError,hasSymbols=require(31)(),getProto=require(28),$ObjectGPO=require(26),$ReflectGPO=require(27),$apply=require(8),$call=require(9),needsEval={},TypedArray="undefined"!=typeof Uint8Array&&getProto?getProto(Uint8Array):undefined,INTRINSICS={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":"undefined"==typeof Atomics?undefined:Atomics,"%BigInt%":"undefined"==typeof BigInt?undefined:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?undefined:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?undefined:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float16Array%":"undefined"==typeof Float16Array?undefined:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?undefined:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?undefined:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?undefined:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":"undefined"==typeof Int8Array?undefined:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?undefined:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined,"%JSON%":"object"==typeof JSON?JSON:undefined,"%Map%":"undefined"==typeof Map?undefined:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&hasSymbols&&getProto?getProto((new Map)[Symbol.iterator]()):undefined,"%Math%":Math,"%Number%":Number,"%Object%":$Object,"%Object.getOwnPropertyDescriptor%":$gOPD,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?undefined:Promise,"%Proxy%":"undefined"==typeof Proxy?undefined:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":"undefined"==typeof Reflect?undefined:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?undefined:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&hasSymbols&&getProto?getProto((new Set)[Symbol.iterator]()):undefined,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined,"%Symbol%":hasSymbols?Symbol:undefined,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":"undefined"==typeof Uint8Array?undefined:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?undefined:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?undefined:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?undefined:Uint32Array,"%URIError%":$URIError,"%WeakMap%":"undefined"==typeof WeakMap?undefined:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?undefined:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?undefined:WeakSet,"%Function.prototype.call%":$call,"%Function.prototype.apply%":$apply,"%Object.defineProperty%":$defineProperty,"%Object.getPrototypeOf%":$ObjectGPO,"%Math.abs%":abs,"%Math.floor%":floor,"%Math.max%":max,"%Math.min%":min,"%Math.pow%":pow,"%Math.round%":round,"%Math.sign%":sign,"%Reflect.getPrototypeOf%":$ReflectGPO};if(getProto)try{null.error}catch(r){var errorProto=getProto(getProto(r));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function doEval(r){var e;if("%AsyncFunction%"===r)e=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===r)e=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===r)e=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===r){var t=doEval("%AsyncGeneratorFunction%");t&&(e=t.prototype)}else if("%AsyncIteratorPrototype%"===r){var o=doEval("%AsyncGenerator%");o&&getProto&&(e=getProto(o.prototype))}return INTRINSICS[r]=e,e},LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=require(24),hasOwn=require(33),$concat=bind.call($call,Array.prototype.concat),$spliceApply=bind.call($apply,Array.prototype.splice),$replace=bind.call($call,String.prototype.replace),$strSlice=bind.call($call,String.prototype.slice),$exec=bind.call($call,RegExp.prototype.exec),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function stringToPath(r){var e=$strSlice(r,0,1),t=$strSlice(r,-1);if("%"===e&&"%"!==t)throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if("%"===t&&"%"!==e)throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var o=[];return $replace(r,rePropName,function(r,e,t,n){o[o.length]=t?$replace(n,reEscapeChar,"$1"):e||r}),o},getBaseIntrinsic=function getBaseIntrinsic(r,e){var t,o=r;if(hasOwn(LEGACY_ALIASES,o)&&(o="%"+(t=LEGACY_ALIASES[o])[0]+"%"),hasOwn(INTRINSICS,o)){var n=INTRINSICS[o];if(n===needsEval&&(n=doEval(o)),void 0===n&&!e)throw new $TypeError("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:t,name:o,value:n}}throw new $SyntaxError("intrinsic "+r+" does not exist!")};module.exports=function GetIntrinsic(r,e){if("string"!=typeof r||0===r.length)throw new $TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new $TypeError('"allowMissing" argument must be a boolean');if(null===$exec(/^%?[^%]*%?$/,r))throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=stringToPath(r),o=t.length>0?t[0]:"",n=getBaseIntrinsic("%"+o+"%",e),a=n.name,i=n.value,y=!1,p=n.alias;p&&(o=p[0],$spliceApply(t,$concat([0,1],p)));for(var d=1,s=!0;d=t.length){var c=$gOPD(i,f);i=(s=!!c)&&"get"in c&&!("originalValue"in c.get)?c.get:i[f]}else s=hasOwn(i,f),i=i[f];s&&!y&&(INTRINSICS[a]=i)}}return i}; - -},{"14":14,"15":15,"16":16,"17":17,"18":18,"19":19,"20":20,"21":21,"22":22,"24":24,"26":26,"27":27,"28":28,"30":30,"31":31,"33":33,"34":34,"35":35,"37":37,"38":38,"39":39,"40":40,"41":41,"8":8,"9":9}],13:[function(require,module,exports){ -"use strict";var hasProtoAccessor,callBind=require(10),gOPD=require(30);try{hasProtoAccessor=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var desc=!!hasProtoAccessor&&gOPD&&gOPD(Object.prototype,"__proto__"),$Object=Object,$getPrototypeOf=$Object.getPrototypeOf;module.exports=desc&&"function"==typeof desc.get?callBind([desc.get]):"function"==typeof $getPrototypeOf&&function getDunder(t){return $getPrototypeOf(null==t?t:$Object(t))}; - -},{"10":10,"30":30}],30:[function(require,module,exports){ -"use strict";var $gOPD=require(29);if($gOPD)try{$gOPD([],"length")}catch(g){$gOPD=null}module.exports=$gOPD; - -},{"29":29}],14:[function(require,module,exports){ -"use strict";var $defineProperty=Object.defineProperty||!1;if($defineProperty)try{$defineProperty({},"a",{value:1})}catch(e){$defineProperty=!1}module.exports=$defineProperty; - -},{}],15:[function(require,module,exports){ -"use strict";module.exports=EvalError; - -},{}],16:[function(require,module,exports){ -"use strict";module.exports=Error; - -},{}],17:[function(require,module,exports){ -"use strict";module.exports=RangeError; - -},{}],18:[function(require,module,exports){ -"use strict";module.exports=ReferenceError; - -},{}],19:[function(require,module,exports){ -"use strict";module.exports=SyntaxError; - -},{}],21:[function(require,module,exports){ -"use strict";module.exports=URIError; - -},{}],22:[function(require,module,exports){ -"use strict";module.exports=Object; - -},{}],23:[function(require,module,exports){ -"use strict";var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",toStr=Object.prototype.toString,max=Math.max,funcType="[object Function]",concatty=function concatty(t,n){for(var r=[],o=0;o-1e3&&t<1e3||$test.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-$floor(-t):$floor(t);if(n!==t){var o=String(n),i=$slice.call(e,o.length+1);return $replace.call(o,r,"$&_")+"."+$replace.call($replace.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(e,r,"$&_")}var utilInspect=require(6),inspectCustom=utilInspect.custom,inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null,quotes={__proto__:null,double:'"',single:"'"},quoteREs={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function wrapQuotes(t,e,r){var n=r.quoteStyle||e,o=quotes[n];return o+t+o}function quote(t){return $replace.call(String(t),/"/g,""")}function canTrustToString(t){return!toStringTag||!("object"==typeof t&&(toStringTag in t||void 0!==t[toStringTag]))}function isArray(t){return"[object Array]"===toStr(t)&&canTrustToString(t)}function isDate(t){return"[object Date]"===toStr(t)&&canTrustToString(t)}function isRegExp(t){return"[object RegExp]"===toStr(t)&&canTrustToString(t)}function isError(t){return"[object Error]"===toStr(t)&&canTrustToString(t)}function isString(t){return"[object String]"===toStr(t)&&canTrustToString(t)}function isNumber(t){return"[object Number]"===toStr(t)&&canTrustToString(t)}function isBoolean(t){return"[object Boolean]"===toStr(t)&&canTrustToString(t)}function isSymbol(t){if(hasShammedSymbols)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!symToString)return!1;try{return symToString.call(t),!0}catch(t){}return!1}function isBigInt(t){if(!t||"object"!=typeof t||!bigIntValueOf)return!1;try{return bigIntValueOf.call(t),!0}catch(t){}return!1}module.exports=function inspect_(t,e,r,n){var o=e||{};if(has(o,"quoteStyle")&&!has(quotes,o.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!has(o,"customInspect")||o.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has(o,"numericSeparator")&&"boolean"!=typeof o.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return inspectString(t,o);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var c=String(t);return a?addNumericSeparator(t,c):c}if("bigint"==typeof t){var l=String(t)+"n";return a?addNumericSeparator(t,l):l}var u=void 0===o.depth?5:o.depth;if(void 0===r&&(r=0),r>=u&&u>0&&"object"==typeof t)return isArray(t)?"[Array]":"[Object]";var p=getIndent(o,r);if(void 0===n)n=[];else if(indexOf(n,t)>=0)return"[Circular]";function inspect(t,e,i){if(e&&(n=$arrSlice.call(n)).push(e),i){var a={depth:o.depth};return has(o,"quoteStyle")&&(a.quoteStyle=o.quoteStyle),inspect_(t,a,r+1,n)}return inspect_(t,o,r+1,n)}if("function"==typeof t&&!isRegExp(t)){var s=nameOf(t),f=arrObjKeys(t,inspect);return"[Function"+(s?": "+s:" (anonymous)")+"]"+(f.length>0?" { "+$join.call(f,", ")+" }":"")}if(isSymbol(t)){var y=hasShammedSymbols?$replace.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(t);return"object"!=typeof t||hasShammedSymbols?y:markBoxed(y)}if(isElement(t)){for(var S="<"+$toLowerCase.call(String(t.nodeName)),g=t.attributes||[],m=0;m"}if(isArray(t)){if(0===t.length)return"[]";var b=arrObjKeys(t,inspect);return p&&!singleLineValues(b)?"["+indentedJoin(b,p)+"]":"[ "+$join.call(b,", ")+" ]"}if(isError(t)){var h=arrObjKeys(t,inspect);return"cause"in Error.prototype||!("cause"in t)||isEnumerable.call(t,"cause")?0===h.length?"["+String(t)+"]":"{ ["+String(t)+"] "+$join.call(h,", ")+" }":"{ ["+String(t)+"] "+$join.call($concat.call("[cause]: "+inspect(t.cause),h),", ")+" }"}if("object"==typeof t&&i){if(inspectSymbol&&"function"==typeof t[inspectSymbol]&&utilInspect)return utilInspect(t,{depth:u-r});if("symbol"!==i&&"function"==typeof t.inspect)return t.inspect()}if(isMap(t)){var d=[];return mapForEach&&mapForEach.call(t,function(e,r){d.push(inspect(r,t,!0)+" => "+inspect(e,t))}),collectionOf("Map",mapSize.call(t),d,p)}if(isSet(t)){var O=[];return setForEach&&setForEach.call(t,function(e){O.push(inspect(e,t))}),collectionOf("Set",setSize.call(t),O,p)}if(isWeakMap(t))return weakCollectionOf("WeakMap");if(isWeakSet(t))return weakCollectionOf("WeakSet");if(isWeakRef(t))return weakCollectionOf("WeakRef");if(isNumber(t))return markBoxed(inspect(Number(t)));if(isBigInt(t))return markBoxed(inspect(bigIntValueOf.call(t)));if(isBoolean(t))return markBoxed(booleanValueOf.call(t));if(isString(t))return markBoxed(inspect(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||"undefined"!=typeof global&&t===global)return"{ [object globalThis] }";if(!isDate(t)&&!isRegExp(t)){var j=arrObjKeys(t,inspect),w=gPO?gPO(t)===Object.prototype:t instanceof Object||t.constructor===Object,$=t instanceof Object?"":"null prototype",v=!w&&toStringTag&&Object(t)===t&&toStringTag in t?$slice.call(toStr(t),8,-1):$?"Object":"",k=(w||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(v||$?"["+$join.call($concat.call([],v||[],$||[]),": ")+"] ":"");return 0===j.length?k+"{}":p?k+"{"+indentedJoin(j,p)+"}":k+"{ "+$join.call(j,", ")+" }"}return String(t)};var hasOwn=Object.prototype.hasOwnProperty||function(t){return t in this};function has(t,e){return hasOwn.call(t,e)}function toStr(t){return objectToString.call(t)}function nameOf(t){if(t.name)return t.name;var e=$match.call(functionToString.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function indexOf(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return inspectString($slice.call(t,0,e.maxStringLength),e)+n}var o=quoteREs[e.quoteStyle||"single"];return o.lastIndex=0,wrapQuotes($replace.call($replace.call(t,o,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",e)}function lowbyte(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+$toUpperCase.call(e.toString(16))}function markBoxed(t){return"Object("+t+")"}function weakCollectionOf(t){return t+" { ? }"}function collectionOf(t,e,r,n){return t+" ("+e+") {"+(n?indentedJoin(r,n):$join.call(r,", "))+"}"}function singleLineValues(t){for(var e=0;e=0)return!1;return!0}function getIndent(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=$join.call(Array(t.indent+1)," ")}return{base:r,prev:$join.call(Array(e+1),r)}}function indentedJoin(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+$join.call(t,","+r)+"\n"+e.prev}function arrObjKeys(t,e){var r=isArray(t),n=[];if(r){n.length=t.length;for(var o=0;o -1) { - return val.split(','); - } - - if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) { - throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.'); - } - - return val; -}; - -// This is what browsers will submit when the ✓ character occurs in an -// application/x-www-form-urlencoded body and the encoding of the page containing -// the form is iso-8859-1, or when the submitted form has an accept-charset -// attribute of iso-8859-1. Presumably also with other charsets that do not contain -// the ✓ character, such as us-ascii. -var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') - -// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. -var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') - -var parseValues = function parseQueryStringValues(str, options) { - var obj = { __proto__: null }; - - var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; - cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']'); - - var limit = options.parameterLimit === Infinity ? void undefined : options.parameterLimit; - var parts = cleanStr.split( - options.delimiter, - options.throwOnLimitExceeded && typeof limit !== 'undefined' ? limit + 1 : limit - ); - - if (options.throwOnLimitExceeded && typeof limit !== 'undefined' && parts.length > limit) { - throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (limit === 1 ? '' : 's') + ' allowed.'); - } - - var skipIndex = -1; // Keep track of where the utf8 sentinel was found - var i; - - var charset = options.charset; - if (options.charsetSentinel) { - for (i = 0; i < parts.length; ++i) { - if (parts[i].indexOf('utf8=') === 0) { - if (parts[i] === charsetSentinel) { - charset = 'utf-8'; - } else if (parts[i] === isoSentinel) { - charset = 'iso-8859-1'; - } - skipIndex = i; - i = parts.length; // The eslint settings do not allow break; - } - } - } - - for (i = 0; i < parts.length; ++i) { - if (i === skipIndex) { - continue; - } - var part = parts[i]; - - var bracketEqualsPos = part.indexOf(']='); - var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; - - var key; - var val; - if (pos === -1) { - key = options.decoder(part, defaults.decoder, charset, 'key'); - val = options.strictNullHandling ? null : ''; - } else { - key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); - - if (key !== null) { - val = utils.maybeMap( - parseArrayValue( - part.slice(pos + 1), - options, - isArray(obj[key]) ? obj[key].length : 0 - ), - function (encodedVal) { - return options.decoder(encodedVal, defaults.decoder, charset, 'value'); - } - ); - } - } - - if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { - val = interpretNumericEntities(String(val)); - } - - if (part.indexOf('[]=') > -1) { - val = isArray(val) ? [val] : val; - } - - if (options.comma && isArray(val) && val.length > options.arrayLimit) { - if (options.throwOnLimitExceeded) { - throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.'); - } - val = utils.combine([], val, options.arrayLimit, options.plainObjects); - } - - if (key !== null) { - var existing = has.call(obj, key); - if (existing && (options.duplicates === 'combine' || part.indexOf('[]=') > -1)) { - obj[key] = utils.combine( - obj[key], - val, - options.arrayLimit, - options.plainObjects - ); - } else if (!existing || options.duplicates === 'last') { - obj[key] = val; - } - } - } - - return obj; -}; - -var parseObject = function (chain, val, options, valuesParsed) { - var currentArrayLength = 0; - if (chain.length > 0 && chain[chain.length - 1] === '[]') { - var parentKey = chain.slice(0, -1).join(''); - currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0; - } - - var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength); - - for (var i = chain.length - 1; i >= 0; --i) { - var obj; - var root = chain[i]; - - if (root === '[]' && options.parseArrays) { - if (utils.isOverflow(leaf)) { - // leaf is already an overflow object, preserve it - obj = leaf; - } else { - obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null)) - ? [] - : utils.combine( - [], - leaf, - options.arrayLimit, - options.plainObjects - ); - } - } else { - obj = options.plainObjects ? { __proto__: null } : {}; - var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; - var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot; - var index = parseInt(decodedRoot, 10); - var isValidArrayIndex = !isNaN(index) - && root !== decodedRoot - && String(index) === decodedRoot - && index >= 0 - && options.parseArrays; - if (!options.parseArrays && decodedRoot === '') { - obj = { 0: leaf }; - } else if (isValidArrayIndex && index < options.arrayLimit) { - obj = []; - obj[index] = leaf; - } else if (isValidArrayIndex && options.throwOnLimitExceeded) { - throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.'); - } else if (isValidArrayIndex) { - obj[index] = leaf; - utils.markOverflow(obj, index); - } else if (decodedRoot !== '__proto__') { - obj[decodedRoot] = leaf; - } - } - - leaf = obj; - } - - return leaf; -}; - -// Split a key like "a[b][c[]]" into ['a', '[b]', '[c[]]'] while preserving -// qs parse semantics for depth/prototype guards. -var splitKeyIntoSegments = function splitKeyIntoSegments(originalKey, options) { - var key = options.allowDots ? originalKey.replace(/\.([^.[]+)/g, '[$1]') : originalKey; - - // depth <= 0 keeps the whole key as one segment - if (options.depth <= 0) { - if (!options.plainObjects && has.call(Object.prototype, key)) { - if (!options.allowPrototypes) { - return; - } - } - - return [key]; - } - - var segments = []; - - // parent before the first '[' (may be empty if key starts with '[') - var first = key.indexOf('['); - var parent = first >= 0 ? key.slice(0, first) : key; - if (parent) { - if (!options.plainObjects && has.call(Object.prototype, parent)) { - if (!options.allowPrototypes) { - return; - } - } - - segments[segments.length] = parent; - } - - var n = key.length; - var open = first; - var collected = 0; - - while (open >= 0 && collected < options.depth) { - var level = 1; - var i = open + 1; - var close = -1; - - // balance nested '[' and ']' inside this bracket group using a nesting level counter - while (i < n && close < 0) { - var cu = key.charCodeAt(i); - if (cu === 0x5B) { // '[' - level += 1; - } else if (cu === 0x5D) { // ']' - level -= 1; - if (level === 0) { - close = i; // found matching close; loop will exit by condition - } - } - i += 1; - } - - if (close < 0) { - // Unterminated group: wrap the raw remainder in one bracket pair so it stays - // a single literal segment (e.g. "[[]b" -> "[[]b]"); we do not infer missing ']'. - segments[segments.length] = '[' + key.slice(open) + ']'; - return segments; - } - - var seg = key.slice(open, close + 1); - // prototype guard for the content of this group - var content = seg.slice(1, -1); - if (!options.plainObjects && has.call(Object.prototype, content) && !options.allowPrototypes) { - return; - } - - segments[segments.length] = seg; - collected += 1; - - // find the next '[' after this balanced group - open = key.indexOf('[', close + 1); - } - - if (open >= 0) { - if (options.strictDepth === true) { - throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true'); - } - - segments[segments.length] = '[' + key.slice(open) + ']'; - } - - return segments; -}; - -var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { - if (!givenKey) { - return; - } - - var keys = splitKeyIntoSegments(givenKey, options); - - if (!keys) { - return; - } - - return parseObject(keys, val, options, valuesParsed); -}; - -var normalizeParseOptions = function normalizeParseOptions(opts) { - if (!opts) { - return defaults; - } - - if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') { - throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided'); - } - - if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') { - throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided'); - } - - if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } - - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - - if (typeof opts.throwOnLimitExceeded !== 'undefined' && typeof opts.throwOnLimitExceeded !== 'boolean') { - throw new TypeError('`throwOnLimitExceeded` option must be a boolean'); - } - - var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; - - var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates; - - if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') { - throw new TypeError('The duplicates option must be either combine, first, or last'); - } - - var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; - - return { - allowDots: allowDots, - allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, - allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, - allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse, - arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, - decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys, - decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, - delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, - // eslint-disable-next-line no-implicit-coercion, no-extra-parens - depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, - duplicates: duplicates, - ignoreQueryPrefix: opts.ignoreQueryPrefix === true, - interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, - parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, - parseArrays: opts.parseArrays !== false, - plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, - strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth, - strictMerge: typeof opts.strictMerge === 'boolean' ? !!opts.strictMerge : defaults.strictMerge, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling, - throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === 'boolean' ? opts.throwOnLimitExceeded : false - }; -}; - -module.exports = function (str, opts) { - var options = normalizeParseOptions(opts); - - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? { __proto__: null } : {}; - } - - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? { __proto__: null } : {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); - obj = utils.merge(obj, newObj, options); - } - - if (options.allowSparse === true) { - return obj; - } - - return utils.compact(obj); -}; diff --git a/node_modules/qs/lib/stringify.js b/node_modules/qs/lib/stringify.js deleted file mode 100644 index b661691..0000000 --- a/node_modules/qs/lib/stringify.js +++ /dev/null @@ -1,363 +0,0 @@ -'use strict'; - -var getSideChannel = require('side-channel'); -var utils = require('./utils'); -var formats = require('./formats'); -var has = Object.prototype.hasOwnProperty; - -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { - return prefix + '[]'; - }, - comma: 'comma', - indices: function indices(prefix, key) { - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { - return prefix; - } -}; - -var isArray = Array.isArray; -var push = Array.prototype.push; -var pushToArray = function (arr, valueOrArray) { - push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); -}; - -var toISO = Date.prototype.toISOString; - -var defaultFormat = formats['default']; -var defaults = { - addQueryPrefix: false, - allowDots: false, - allowEmptyArrays: false, - arrayFormat: 'indices', - charset: 'utf-8', - charsetSentinel: false, - commaRoundTrip: false, - delimiter: '&', - encode: true, - encodeDotInKeys: false, - encoder: utils.encode, - encodeValuesOnly: false, - filter: void undefined, - format: defaultFormat, - formatter: formats.formatters[defaultFormat], - // deprecated - indices: false, - serializeDate: function serializeDate(date) { - return toISO.call(date); - }, - skipNulls: false, - strictNullHandling: false -}; - -var isNonNullishPrimitive = function isNonNullishPrimitive(v) { - return typeof v === 'string' - || typeof v === 'number' - || typeof v === 'boolean' - || typeof v === 'symbol' - || typeof v === 'bigint'; -}; - -var sentinel = {}; - -var stringify = function stringify( - object, - prefix, - generateArrayPrefix, - commaRoundTrip, - allowEmptyArrays, - strictNullHandling, - skipNulls, - encodeDotInKeys, - encoder, - filter, - sort, - allowDots, - serializeDate, - format, - formatter, - encodeValuesOnly, - charset, - sideChannel -) { - var obj = object; - - var tmpSc = sideChannel; - var step = 0; - var findFlag = false; - while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { - // Where object last appeared in the ref tree - var pos = tmpSc.get(object); - step += 1; - if (typeof pos !== 'undefined') { - if (pos === step) { - throw new RangeError('Cyclic object value'); - } else { - findFlag = true; // Break while - } - } - if (typeof tmpSc.get(sentinel) === 'undefined') { - step = 0; - } - } - - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = serializeDate(obj); - } else if (generateArrayPrefix === 'comma' && isArray(obj)) { - obj = utils.maybeMap(obj, function (value) { - if (value instanceof Date) { - return serializeDate(value); - } - return value; - }); - } - - if (obj === null) { - if (strictNullHandling) { - return formatter(encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix); - } - - obj = ''; - } - - if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { - if (encoder) { - var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); - return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; - } - return [formatter(prefix) + '=' + formatter(String(obj))]; - } - - var values = []; - - if (typeof obj === 'undefined') { - return values; - } - - var objKeys; - if (generateArrayPrefix === 'comma' && isArray(obj)) { - // we need to join elements in - if (encodeValuesOnly && encoder) { - obj = utils.maybeMap(obj, function (v) { - return v == null ? v : encoder(v); - }); - } - objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }]; - } else if (isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } - - var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, '%2E') : String(prefix); - - var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix; - - if (allowEmptyArrays && isArray(obj) && obj.length === 0) { - return adjustedPrefix + '[]'; - } - - for (var j = 0; j < objKeys.length; ++j) { - var key = objKeys[j]; - var value = typeof key === 'object' && key && typeof key.value !== 'undefined' - ? key.value - : obj[key]; - - if (skipNulls && value === null) { - continue; - } - - var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, '%2E') : String(key); - var keyPrefix = isArray(obj) - ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix - : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']'); - - sideChannel.set(object, step); - var valueSideChannel = getSideChannel(); - valueSideChannel.set(sentinel, sideChannel); - pushToArray(values, stringify( - value, - keyPrefix, - generateArrayPrefix, - commaRoundTrip, - allowEmptyArrays, - strictNullHandling, - skipNulls, - encodeDotInKeys, - generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder, - filter, - sort, - allowDots, - serializeDate, - format, - formatter, - encodeValuesOnly, - charset, - valueSideChannel - )); - } - - return values; -}; - -var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { - if (!opts) { - return defaults; - } - - if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') { - throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided'); - } - - if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') { - throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided'); - } - - if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } - - var charset = opts.charset || defaults.charset; - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - - var format = formats['default']; - if (typeof opts.format !== 'undefined') { - if (!has.call(formats.formatters, opts.format)) { - throw new TypeError('Unknown format option provided.'); - } - format = opts.format; - } - var formatter = formats.formatters[format]; - - var filter = defaults.filter; - if (typeof opts.filter === 'function' || isArray(opts.filter)) { - filter = opts.filter; - } - - var arrayFormat; - if (opts.arrayFormat in arrayPrefixGenerators) { - arrayFormat = opts.arrayFormat; - } else if ('indices' in opts) { - arrayFormat = opts.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = defaults.arrayFormat; - } - - if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') { - throw new TypeError('`commaRoundTrip` must be a boolean, or absent'); - } - - var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; - - return { - addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, - allowDots: allowDots, - allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, - arrayFormat: arrayFormat, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - commaRoundTrip: !!opts.commaRoundTrip, - delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, - encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, - encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys, - encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, - encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, - filter: filter, - format: format, - formatter: formatter, - serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, - skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, - sort: typeof opts.sort === 'function' ? opts.sort : null, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling - }; -}; - -module.exports = function (object, opts) { - var obj = object; - var options = normalizeStringifyOptions(opts); - - var objKeys; - var filter; - - if (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (isArray(options.filter)) { - filter = options.filter; - objKeys = filter; - } - - var keys = []; - - if (typeof obj !== 'object' || obj === null) { - return ''; - } - - var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat]; - var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip; - - if (!objKeys) { - objKeys = Object.keys(obj); - } - - if (options.sort) { - objKeys.sort(options.sort); - } - - var sideChannel = getSideChannel(); - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (typeof key === 'undefined' || key === null) { - continue; - } - - var value = obj[key]; - - if (options.skipNulls && value === null) { - continue; - } - pushToArray(keys, stringify( - value, - key, - generateArrayPrefix, - commaRoundTrip, - options.allowEmptyArrays, - options.strictNullHandling, - options.skipNulls, - options.encodeDotInKeys, - options.encode ? options.encoder : null, - options.filter, - options.sort, - options.allowDots, - options.serializeDate, - options.format, - options.formatter, - options.encodeValuesOnly, - options.charset, - sideChannel - )); - } - - var joined = keys.join(options.delimiter); - var prefix = options.addQueryPrefix === true ? '?' : ''; - - if (options.charsetSentinel) { - if (options.charset === 'iso-8859-1') { - // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark - prefix += 'utf8=%26%2310003%3B' + options.delimiter; - } else { - // encodeURIComponent('✓') - prefix += 'utf8=%E2%9C%93' + options.delimiter; - } - } - - return joined.length > 0 ? prefix + joined : ''; -}; diff --git a/node_modules/qs/lib/utils.js b/node_modules/qs/lib/utils.js deleted file mode 100644 index 9aa39e1..0000000 --- a/node_modules/qs/lib/utils.js +++ /dev/null @@ -1,342 +0,0 @@ -'use strict'; - -var formats = require('./formats'); -var getSideChannel = require('side-channel'); - -var has = Object.prototype.hasOwnProperty; -var isArray = Array.isArray; - -// Track objects created from arrayLimit overflow using side-channel -// Stores the current max numeric index for O(1) lookup -var overflowChannel = getSideChannel(); - -var markOverflow = function markOverflow(obj, maxIndex) { - overflowChannel.set(obj, maxIndex); - return obj; -}; - -var isOverflow = function isOverflow(obj) { - return overflowChannel.has(obj); -}; - -var getMaxIndex = function getMaxIndex(obj) { - return overflowChannel.get(obj); -}; - -var setMaxIndex = function setMaxIndex(obj, maxIndex) { - overflowChannel.set(obj, maxIndex); -}; - -var hexTable = (function () { - var array = []; - for (var i = 0; i < 256; ++i) { - array[array.length] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase(); - } - - return array; -}()); - -var compactQueue = function compactQueue(queue) { - while (queue.length > 1) { - var item = queue.pop(); - var obj = item.obj[item.prop]; - - if (isArray(obj)) { - var compacted = []; - - for (var j = 0; j < obj.length; ++j) { - if (typeof obj[j] !== 'undefined') { - compacted[compacted.length] = obj[j]; - } - } - - item.obj[item.prop] = compacted; - } - } -}; - -var arrayToObject = function arrayToObject(source, options) { - var obj = options && options.plainObjects ? { __proto__: null } : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } - } - - return obj; -}; - -var merge = function merge(target, source, options) { - /* eslint no-param-reassign: 0 */ - if (!source) { - return target; - } - - if (typeof source !== 'object' && typeof source !== 'function') { - if (isArray(target)) { - var nextIndex = target.length; - if (options && typeof options.arrayLimit === 'number' && nextIndex > options.arrayLimit) { - return markOverflow(arrayToObject(target.concat(source), options), nextIndex); - } - target[nextIndex] = source; - } else if (target && typeof target === 'object') { - if (isOverflow(target)) { - // Add at next numeric index for overflow objects - var newIndex = getMaxIndex(target) + 1; - target[newIndex] = source; - setMaxIndex(target, newIndex); - } else if (options && options.strictMerge) { - return [target, source]; - } else if ( - (options && (options.plainObjects || options.allowPrototypes)) - || !has.call(Object.prototype, source) - ) { - target[source] = true; - } - } else { - return [target, source]; - } - - return target; - } - - if (!target || typeof target !== 'object') { - if (isOverflow(source)) { - // Create new object with target at 0, source values shifted by 1 - var sourceKeys = Object.keys(source); - var result = options && options.plainObjects - ? { __proto__: null, 0: target } - : { 0: target }; - for (var m = 0; m < sourceKeys.length; m++) { - var oldKey = parseInt(sourceKeys[m], 10); - result[oldKey + 1] = source[sourceKeys[m]]; - } - return markOverflow(result, getMaxIndex(source) + 1); - } - var combined = [target].concat(source); - if (options && typeof options.arrayLimit === 'number' && combined.length > options.arrayLimit) { - return markOverflow(arrayToObject(combined, options), combined.length - 1); - } - return combined; - } - - var mergeTarget = target; - if (isArray(target) && !isArray(source)) { - mergeTarget = arrayToObject(target, options); - } - - if (isArray(target) && isArray(source)) { - source.forEach(function (item, i) { - if (has.call(target, i)) { - var targetItem = target[i]; - if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { - target[i] = merge(targetItem, item, options); - } else { - target[target.length] = item; - } - } else { - target[i] = item; - } - }); - return target; - } - - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; - - if (has.call(acc, key)) { - acc[key] = merge(acc[key], value, options); - } else { - acc[key] = value; - } - - if (isOverflow(source) && !isOverflow(acc)) { - markOverflow(acc, getMaxIndex(source)); - } - if (isOverflow(acc)) { - var keyNum = parseInt(key, 10); - if (String(keyNum) === key && keyNum >= 0 && keyNum > getMaxIndex(acc)) { - setMaxIndex(acc, keyNum); - } - } - - return acc; - }, mergeTarget); -}; - -var assign = function assignSingleSource(target, source) { - return Object.keys(source).reduce(function (acc, key) { - acc[key] = source[key]; - return acc; - }, target); -}; - -var decode = function (str, defaultDecoder, charset) { - var strWithoutPlus = str.replace(/\+/g, ' '); - if (charset === 'iso-8859-1') { - // unescape never throws, no try...catch needed: - return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); - } - // utf-8 - try { - return decodeURIComponent(strWithoutPlus); - } catch (e) { - return strWithoutPlus; - } -}; - -var limit = 1024; - -/* eslint operator-linebreak: [2, "before"] */ - -var encode = function encode(str, defaultEncoder, charset, kind, format) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - - var string = str; - if (typeof str === 'symbol') { - string = Symbol.prototype.toString.call(str); - } else if (typeof str !== 'string') { - string = String(str); - } - - if (charset === 'iso-8859-1') { - return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { - return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; - }); - } - - var out = ''; - for (var j = 0; j < string.length; j += limit) { - var segment = string.length >= limit ? string.slice(j, j + limit) : string; - var arr = []; - - for (var i = 0; i < segment.length; ++i) { - var c = segment.charCodeAt(i); - if ( - c === 0x2D // - - || c === 0x2E // . - || c === 0x5F // _ - || c === 0x7E // ~ - || (c >= 0x30 && c <= 0x39) // 0-9 - || (c >= 0x41 && c <= 0x5A) // a-z - || (c >= 0x61 && c <= 0x7A) // A-Z - || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) - ) { - arr[arr.length] = segment.charAt(i); - continue; - } - - if (c < 0x80) { - arr[arr.length] = hexTable[c]; - continue; - } - - if (c < 0x800) { - arr[arr.length] = hexTable[0xC0 | (c >> 6)] - + hexTable[0x80 | (c & 0x3F)]; - continue; - } - - if (c < 0xD800 || c >= 0xE000) { - arr[arr.length] = hexTable[0xE0 | (c >> 12)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; - continue; - } - - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF)); - - arr[arr.length] = hexTable[0xF0 | (c >> 18)] - + hexTable[0x80 | ((c >> 12) & 0x3F)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; - } - - out += arr.join(''); - } - - return out; -}; - -var compact = function compact(value) { - var queue = [{ obj: { o: value }, prop: 'o' }]; - var refs = []; - - for (var i = 0; i < queue.length; ++i) { - var item = queue[i]; - var obj = item.obj[item.prop]; - - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - var val = obj[key]; - if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { - queue[queue.length] = { obj: obj, prop: key }; - refs[refs.length] = val; - } - } - } - - compactQueue(queue); - - return value; -}; - -var isRegExp = function isRegExp(obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; - -var isBuffer = function isBuffer(obj) { - if (!obj || typeof obj !== 'object') { - return false; - } - - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; - -var combine = function combine(a, b, arrayLimit, plainObjects) { - // If 'a' is already an overflow object, add to it - if (isOverflow(a)) { - var newIndex = getMaxIndex(a) + 1; - a[newIndex] = b; - setMaxIndex(a, newIndex); - return a; - } - - var result = [].concat(a, b); - if (result.length > arrayLimit) { - return markOverflow(arrayToObject(result, { plainObjects: plainObjects }), result.length - 1); - } - return result; -}; - -var maybeMap = function maybeMap(val, fn) { - if (isArray(val)) { - var mapped = []; - for (var i = 0; i < val.length; i += 1) { - mapped[mapped.length] = fn(val[i]); - } - return mapped; - } - return fn(val); -}; - -module.exports = { - arrayToObject: arrayToObject, - assign: assign, - combine: combine, - compact: compact, - decode: decode, - encode: encode, - isBuffer: isBuffer, - isOverflow: isOverflow, - isRegExp: isRegExp, - markOverflow: markOverflow, - maybeMap: maybeMap, - merge: merge -}; diff --git a/node_modules/qs/package.json b/node_modules/qs/package.json deleted file mode 100644 index 981970e..0000000 --- a/node_modules/qs/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "qs", - "description": "A querystring parser that supports nesting and arrays, with a depth limit", - "homepage": "https://github.com/ljharb/qs", - "version": "6.15.2", - "repository": { - "type": "git", - "url": "https://github.com/ljharb/qs.git" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "main": "lib/index.js", - "sideEffects": false, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "keywords": [ - "querystring", - "qs", - "query", - "url", - "parse", - "stringify" - ], - "engines": { - "node": ">=0.6" - }, - "dependencies": { - "side-channel": "^1.1.0" - }, - "devDependencies": { - "@browserify/envify": "^6.0.0", - "@browserify/uglifyify": "^6.0.0", - "@ljharb/eslint-config": "^22.2.3", - "browserify": "^16.5.2", - "bundle-collapser": "^1.4.0", - "common-shakeify": "~1.0.0", - "eclint": "^2.8.1", - "es-value-fixtures": "^1.7.1", - "eslint": "^9.39.2", - "evalmd": "^0.0.19", - "for-each": "^0.3.5", - "glob": "=10.3.7", - "has-bigints": "^1.1.0", - "has-override-mistake": "^1.0.1", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "iconv-lite": "^0.5.2", - "in-publish": "^2.0.1", - "jackspeak": "=2.1.1", - "jiti": "^0.0.0", - "mkdirp": "^0.5.5", - "mock-property": "^1.1.0", - "module-deps": "^6.2.3", - "npmignore": "^0.3.5", - "nyc": "^10.3.2", - "object-inspect": "^1.13.4", - "qs-iconv": "^1.0.4", - "safe-publish-latest": "^2.0.0", - "safer-buffer": "^2.1.2", - "tape": "^5.9.0", - "unassertify": "^3.0.1" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated && npm run dist", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run --silent readme && npm run --silent lint", - "test": "npm run tests-only", - "tests-only": "nyc tape 'test/**/*.js'", - "posttest": "npx npm@'>=10.2' audit --production", - "readme": "evalmd README.md", - "postlint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", - "lint": "eslint .", - "dist": "mkdirp dist && browserify --standalone Qs -g unassertify -g @browserify/envify -g [@browserify/uglifyify --mangle.keep_fnames --compress.keep_fnames --format.indent_level=1 --compress.arrows=false --compress.passes=4 --compress.typeofs=false] -p common-shakeify -p bundle-collapser/plugin lib/index.js > dist/qs.js" - }, - "license": "BSD-3-Clause", - "publishConfig": { - "ignore": [ - "!dist/*", - "bower.json", - "component.json", - ".github/workflows", - "logos", - "tea.yaml" - ] - } -} diff --git a/node_modules/qs/test/empty-keys-cases.js b/node_modules/qs/test/empty-keys-cases.js deleted file mode 100644 index 2b1190e..0000000 --- a/node_modules/qs/test/empty-keys-cases.js +++ /dev/null @@ -1,267 +0,0 @@ -'use strict'; - -module.exports = { - emptyTestCases: [ - { - input: '&', - withEmptyKeys: {}, - stringifyOutput: { - brackets: '', - indices: '', - repeat: '' - }, - noEmptyKeys: {} - }, - { - input: '&&', - withEmptyKeys: {}, - stringifyOutput: { - brackets: '', - indices: '', - repeat: '' - }, - noEmptyKeys: {} - }, - { - input: '&=', - withEmptyKeys: { '': '' }, - stringifyOutput: { - brackets: '=', - indices: '=', - repeat: '=' - }, - noEmptyKeys: {} - }, - { - input: '&=&', - withEmptyKeys: { '': '' }, - stringifyOutput: { - brackets: '=', - indices: '=', - repeat: '=' - }, - noEmptyKeys: {} - }, - { - input: '&=&=', - withEmptyKeys: { '': ['', ''] }, - stringifyOutput: { - brackets: '[]=&[]=', - indices: '[0]=&[1]=', - repeat: '=&=' - }, - noEmptyKeys: {} - }, - { - input: '&=&=&', - withEmptyKeys: { '': ['', ''] }, - stringifyOutput: { - brackets: '[]=&[]=', - indices: '[0]=&[1]=', - repeat: '=&=' - }, - noEmptyKeys: {} - }, - { - input: '=', - withEmptyKeys: { '': '' }, - noEmptyKeys: {}, - stringifyOutput: { - brackets: '=', - indices: '=', - repeat: '=' - } - }, - { - input: '=&', - withEmptyKeys: { '': '' }, - stringifyOutput: { - brackets: '=', - indices: '=', - repeat: '=' - }, - noEmptyKeys: {} - }, - { - input: '=&&&', - withEmptyKeys: { '': '' }, - stringifyOutput: { - brackets: '=', - indices: '=', - repeat: '=' - }, - noEmptyKeys: {} - }, - { - input: '=&=&=&', - withEmptyKeys: { '': ['', '', ''] }, - stringifyOutput: { - brackets: '[]=&[]=&[]=', - indices: '[0]=&[1]=&[2]=', - repeat: '=&=&=' - }, - noEmptyKeys: {} - }, - { - input: '=&a[]=b&a[1]=c', - withEmptyKeys: { '': '', a: ['b', 'c'] }, - stringifyOutput: { - brackets: '=&a[]=b&a[]=c', - indices: '=&a[0]=b&a[1]=c', - repeat: '=&a=b&a=c' - }, - noEmptyKeys: { a: ['b', 'c'] } - }, - { - input: '=a', - withEmptyKeys: { '': 'a' }, - noEmptyKeys: {}, - stringifyOutput: { - brackets: '=a', - indices: '=a', - repeat: '=a' - } - }, - { - input: 'a==a', - withEmptyKeys: { a: '=a' }, - noEmptyKeys: { a: '=a' }, - stringifyOutput: { - brackets: 'a==a', - indices: 'a==a', - repeat: 'a==a' - } - }, - { - input: '=&a[]=b', - withEmptyKeys: { '': '', a: ['b'] }, - stringifyOutput: { - brackets: '=&a[]=b', - indices: '=&a[0]=b', - repeat: '=&a=b' - }, - noEmptyKeys: { a: ['b'] } - }, - { - input: '=&a[]=b&a[]=c&a[2]=d', - withEmptyKeys: { '': '', a: ['b', 'c', 'd'] }, - stringifyOutput: { - brackets: '=&a[]=b&a[]=c&a[]=d', - indices: '=&a[0]=b&a[1]=c&a[2]=d', - repeat: '=&a=b&a=c&a=d' - }, - noEmptyKeys: { a: ['b', 'c', 'd'] } - }, - { - input: '=a&=b', - withEmptyKeys: { '': ['a', 'b'] }, - stringifyOutput: { - brackets: '[]=a&[]=b', - indices: '[0]=a&[1]=b', - repeat: '=a&=b' - }, - noEmptyKeys: {} - }, - { - input: '=a&foo=b', - withEmptyKeys: { '': 'a', foo: 'b' }, - noEmptyKeys: { foo: 'b' }, - stringifyOutput: { - brackets: '=a&foo=b', - indices: '=a&foo=b', - repeat: '=a&foo=b' - } - }, - { - input: 'a[]=b&a=c&=', - withEmptyKeys: { '': '', a: ['b', 'c'] }, - stringifyOutput: { - brackets: '=&a[]=b&a[]=c', - indices: '=&a[0]=b&a[1]=c', - repeat: '=&a=b&a=c' - }, - noEmptyKeys: { a: ['b', 'c'] } - }, - { - input: 'a[]=b&a=c&=', - withEmptyKeys: { '': '', a: ['b', 'c'] }, - stringifyOutput: { - brackets: '=&a[]=b&a[]=c', - indices: '=&a[0]=b&a[1]=c', - repeat: '=&a=b&a=c' - }, - noEmptyKeys: { a: ['b', 'c'] } - }, - { - input: 'a[0]=b&a=c&=', - withEmptyKeys: { '': '', a: ['b', 'c'] }, - stringifyOutput: { - brackets: '=&a[]=b&a[]=c', - indices: '=&a[0]=b&a[1]=c', - repeat: '=&a=b&a=c' - }, - noEmptyKeys: { a: ['b', 'c'] } - }, - { - input: 'a=b&a[]=c&=', - withEmptyKeys: { '': '', a: ['b', 'c'] }, - stringifyOutput: { - brackets: '=&a[]=b&a[]=c', - indices: '=&a[0]=b&a[1]=c', - repeat: '=&a=b&a=c' - }, - noEmptyKeys: { a: ['b', 'c'] } - }, - { - input: 'a=b&a[0]=c&=', - withEmptyKeys: { '': '', a: ['b', 'c'] }, - stringifyOutput: { - brackets: '=&a[]=b&a[]=c', - indices: '=&a[0]=b&a[1]=c', - repeat: '=&a=b&a=c' - }, - noEmptyKeys: { a: ['b', 'c'] } - }, - { - input: '[]=a&[]=b& []=1', - withEmptyKeys: { '': ['a', 'b'], ' ': ['1'] }, - stringifyOutput: { - brackets: '[]=a&[]=b& []=1', - indices: '[0]=a&[1]=b& [0]=1', - repeat: '=a&=b& =1' - }, - noEmptyKeys: { 0: 'a', 1: 'b', ' ': ['1'] } - }, - { - input: '[0]=a&[1]=b&a[0]=1&a[1]=2', - withEmptyKeys: { '': ['a', 'b'], a: ['1', '2'] }, - noEmptyKeys: { 0: 'a', 1: 'b', a: ['1', '2'] }, - stringifyOutput: { - brackets: '[]=a&[]=b&a[]=1&a[]=2', - indices: '[0]=a&[1]=b&a[0]=1&a[1]=2', - repeat: '=a&=b&a=1&a=2' - } - }, - { - input: '[deep]=a&[deep]=2', - withEmptyKeys: { '': { deep: ['a', '2'] } - }, - stringifyOutput: { - brackets: '[deep][]=a&[deep][]=2', - indices: '[deep][0]=a&[deep][1]=2', - repeat: '[deep]=a&[deep]=2' - }, - noEmptyKeys: { deep: ['a', '2'] } - }, - { - input: '%5B0%5D=a&%5B1%5D=b', - withEmptyKeys: { '': ['a', 'b'] }, - stringifyOutput: { - brackets: '[]=a&[]=b', - indices: '[0]=a&[1]=b', - repeat: '=a&=b' - }, - noEmptyKeys: { 0: 'a', 1: 'b' } - } - ] -}; diff --git a/node_modules/qs/test/parse.js b/node_modules/qs/test/parse.js deleted file mode 100644 index 31f513d..0000000 --- a/node_modules/qs/test/parse.js +++ /dev/null @@ -1,1703 +0,0 @@ -'use strict'; - -var test = require('tape'); -var hasPropertyDescriptors = require('has-property-descriptors')(); -var iconv = require('iconv-lite'); -var mockProperty = require('mock-property'); -var hasOverrideMistake = require('has-override-mistake')(); -var SaferBuffer = require('safer-buffer').Buffer; -var v = require('es-value-fixtures'); -var inspect = require('object-inspect'); -var emptyTestCases = require('./empty-keys-cases').emptyTestCases; -var hasProto = require('has-proto')(); - -var qs = require('../'); -var utils = require('../lib/utils'); - -test('parse()', function (t) { - t.test('parses a simple string', function (st) { - st.deepEqual(qs.parse('0=foo'), { 0: 'foo' }); - st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' }); - st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } }); - st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } }); - st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } }); - st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null }); - st.deepEqual(qs.parse('foo'), { foo: '' }); - st.deepEqual(qs.parse('foo='), { foo: '' }); - st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' }); - st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' }); - st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' }); - st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' }); - st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' }); - st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null }); - st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' }); - st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), { - cht: 'p3', - chd: 't:60,40', - chs: '250x100', - chl: 'Hello|World' - }); - st.end(); - }); - - t.test('comma: false', function (st) { - st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[0]=b&a[1]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b,c'), { a: 'b,c' }); - st.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }); - st.end(); - }); - - t.test('comma: true', function (st) { - st.deepEqual(qs.parse('a[]=b&a[]=c', { comma: true }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { comma: true }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b,c', { comma: true }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b&a=c', { comma: true }), { a: ['b', 'c'] }); - st.end(); - }); - - t.test('allows enabling dot notation', function (st) { - st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' }); - st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } }); - - st.end(); - }); - - t.test('decode dot keys correctly', function (st) { - st.deepEqual( - qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe', { allowDots: false, decodeDotInKeys: false }), - { 'name%2Eobj.first': 'John', 'name%2Eobj.last': 'Doe' }, - 'with allowDots false and decodeDotInKeys false' - ); - st.deepEqual( - qs.parse('name.obj.first=John&name.obj.last=Doe', { allowDots: true, decodeDotInKeys: false }), - { name: { obj: { first: 'John', last: 'Doe' } } }, - 'with allowDots false and decodeDotInKeys false' - ); - st.deepEqual( - qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe', { allowDots: true, decodeDotInKeys: false }), - { 'name%2Eobj': { first: 'John', last: 'Doe' } }, - 'with allowDots true and decodeDotInKeys false' - ); - st.deepEqual( - qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe', { allowDots: true, decodeDotInKeys: true }), - { 'name.obj': { first: 'John', last: 'Doe' } }, - 'with allowDots true and decodeDotInKeys true' - ); - - st.deepEqual( - qs.parse( - 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', - { allowDots: false, decodeDotInKeys: false } - ), - { 'name%2Eobj%2Esubobject.first%2Egodly%2Ename': 'John', 'name%2Eobj%2Esubobject.last': 'Doe' }, - 'with allowDots false and decodeDotInKeys false' - ); - st.deepEqual( - qs.parse( - 'name.obj.subobject.first.godly.name=John&name.obj.subobject.last=Doe', - { allowDots: true, decodeDotInKeys: false } - ), - { name: { obj: { subobject: { first: { godly: { name: 'John' } }, last: 'Doe' } } } }, - 'with allowDots true and decodeDotInKeys false' - ); - st.deepEqual( - qs.parse( - 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', - { allowDots: true, decodeDotInKeys: true } - ), - { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, - 'with allowDots true and decodeDotInKeys true' - ); - st.deepEqual( - qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe'), - { 'name%2Eobj.first': 'John', 'name%2Eobj.last': 'Doe' }, - 'with allowDots and decodeDotInKeys undefined' - ); - - st.end(); - }); - - t.test('decodes dot in key of object, and allow enabling dot notation when decodeDotInKeys is set to true and allowDots is undefined', function (st) { - st.deepEqual( - qs.parse( - 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', - { decodeDotInKeys: true } - ), - { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, - 'with allowDots undefined and decodeDotInKeys true' - ); - - st.end(); - }); - - t.test('throws when decodeDotInKeys is not of type boolean', function (st) { - st['throws']( - function () { qs.parse('foo[]&bar=baz', { decodeDotInKeys: 'foobar' }); }, - TypeError - ); - - st['throws']( - function () { qs.parse('foo[]&bar=baz', { decodeDotInKeys: 0 }); }, - TypeError - ); - st['throws']( - function () { qs.parse('foo[]&bar=baz', { decodeDotInKeys: NaN }); }, - TypeError - ); - - st['throws']( - function () { qs.parse('foo[]&bar=baz', { decodeDotInKeys: null }); }, - TypeError - ); - - st.end(); - }); - - t.test('allows empty arrays in obj values', function (st) { - st.deepEqual(qs.parse('foo[]&bar=baz', { allowEmptyArrays: true }), { foo: [], bar: 'baz' }); - st.deepEqual(qs.parse('foo[]&bar=baz', { allowEmptyArrays: false }), { foo: [''], bar: 'baz' }); - - st.end(); - }); - - t.test('throws when allowEmptyArrays is not of type boolean', function (st) { - st['throws']( - function () { qs.parse('foo[]&bar=baz', { allowEmptyArrays: 'foobar' }); }, - TypeError - ); - - st['throws']( - function () { qs.parse('foo[]&bar=baz', { allowEmptyArrays: 0 }); }, - TypeError - ); - st['throws']( - function () { qs.parse('foo[]&bar=baz', { allowEmptyArrays: NaN }); }, - TypeError - ); - - st['throws']( - function () { qs.parse('foo[]&bar=baz', { allowEmptyArrays: null }); }, - TypeError - ); - - st.end(); - }); - - t.test('allowEmptyArrays + strictNullHandling', function (st) { - st.deepEqual( - qs.parse('testEmptyArray[]', { strictNullHandling: true, allowEmptyArrays: true }), - { testEmptyArray: [] } - ); - - st.end(); - }); - - t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string'); - t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string'); - t.deepEqual( - qs.parse('a[b][c][d][e][f][g][h]=i'), - { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } }, - 'defaults to a depth of 5' - ); - - t.test('only parses one level when depth = 1', function (st) { - st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } }); - st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } }); - st.end(); - }); - - t.test('uses original key when depth = 0', function (st) { - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: 0 }), { 'a[0]': 'b', 'a[1]': 'c' }); - st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: 0 }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' }); - st.deepEqual(qs.parse('a.b=c', { depth: 0, allowDots: true }), { 'a[b]': 'c' }, 'normalizes dots before applying depth-0 behavior'); - st.deepEqual(qs.parse('toString=foo', { depth: 0 }), {}, 'respects prototype guard at depth 0'); - st.deepEqual(qs.parse('toString=foo', { depth: 0, allowPrototypes: true }), { toString: 'foo' }, 'allows prototypes at depth 0 when enabled'); - st.end(); - }); - - t.test('ignores prototype keys when depth = 0 and allowPrototypes is false', function (st) { - st.deepEqual(qs.parse('toString=foo', { depth: 0 }), {}); - st.deepEqual(qs.parse('hasOwnProperty=bar', { depth: 0 }), {}); - st.deepEqual(qs.parse('toString=foo&a=b', { depth: 0 }), { a: 'b' }); - st.end(); - }); - - t.test('allows prototype keys when depth = 0 and allowPrototypes is true', function (st) { - st.deepEqual(qs.parse('toString=foo', { depth: 0, allowPrototypes: true }), { toString: 'foo' }); - st.end(); - }); - - t.test('uses original key when depth = false', function (st) { - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: false }), { 'a[0]': 'b', 'a[1]': 'c' }); - st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: false }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' }); - st.end(); - }); - - t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array'); - - t.test('parses an explicit array', function (st) { - st.deepEqual(qs.parse('a[]=b'), { a: ['b'] }); - st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] }); - st.end(); - }); - - t.test('parses a mix of simple and explicit arrays', function (st) { - st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] }); - - st.deepEqual(qs.parse('a[1]=b&a=c', { arrayLimit: 20 }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[]=b&a=c', { arrayLimit: 0 }), { a: { 0: 'b', 1: 'c' } }); - st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); - - st.deepEqual(qs.parse('a=b&a[1]=c', { arrayLimit: 20 }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b&a[]=c', { arrayLimit: 0 }), { a: { 0: 'b', 1: 'c' } }); - st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); - - st.end(); - }); - - t.test('parses a nested array', function (st) { - st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } }); - st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } }); - st.end(); - }); - - t.test('parses keys with literal [] inside a bracket group (#493)', function (st) { - // A bracket pair inside a bracket group should be treated literally as part of the key - st.deepEqual( - qs.parse('search[withbracket[]]=foobar'), - { search: { 'withbracket[]': 'foobar' } }, - 'treats inner [] literally when inside a bracket group' - ); - - // Single-level variant - st.deepEqual( - qs.parse('a[b[]]=c'), - { a: { 'b[]': 'c' } }, - 'keeps "b[]" as a literal key' - ); - - // Nested with an array push on the outer level - st.deepEqual( - qs.parse('list[][x[]]=y'), - { list: [{ 'x[]': 'y' }] }, - 'preserves inner [] while still treating outer [] as array push' - ); - - // Multiple nested bracket pairs: inner [] remains literal as part of the key - st.deepEqual( - qs.parse('a[b[c[]]]=d'), - { a: { 'b[c[]]': 'd' } }, - 'treats "b[c[]]" as a literal key inside the bracket group' - ); - - // Depth limits with literal brackets: preserve inner [] while limiting bracket-group parsing - st.deepEqual( - qs.parse('a[b[c[]]][d]=e', { depth: 1 }), - { a: { 'b[c[]]': { '[d]': 'e' } } }, - 'respects depth: 1 and preserves literal inner [] in the parsed key' - ); - - // Unterminated inner bracket group is wrapped as a literal remainder segment - st.deepEqual( - qs.parse('a[[]b=c'), - { a: { '[[]b': 'c' } }, - 'handles unterminated inner bracket groups without throwing' - ); - - st.end(); - }); - - t.test('allows to specify array indices', function (st) { - st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] }); - st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 20 }), { a: ['c'] }); - st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 0 }), { a: { 1: 'c' } }); - st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] }); - st.end(); - }); - - t.test('limits specific array indices to arrayLimit', function (st) { - st.deepEqual(qs.parse('a[19]=a', { arrayLimit: 20 }), { a: ['a'] }); - st.deepEqual(qs.parse('a[20]=a', { arrayLimit: 20 }), { a: { 20: 'a' } }); - - st.deepEqual(qs.parse('a[19]=a'), { a: ['a'] }); - st.deepEqual(qs.parse('a[20]=a'), { a: { 20: 'a' } }); - st.end(); - }); - - t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number'); - - t.test('supports encoded = signs', function (st) { - st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' }); - st.end(); - }); - - t.test('is ok with url encoded strings', function (st) { - st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } }); - st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } }); - st.end(); - }); - - t.test('allows brackets in the value', function (st) { - st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' }); - st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' }); - st.end(); - }); - - t.test('allows empty values', function (st) { - st.deepEqual(qs.parse(''), {}); - st.deepEqual(qs.parse(null), {}); - st.deepEqual(qs.parse(undefined), {}); - st.end(); - }); - - t.test('transforms arrays to objects', function (st) { - st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', 0: 'bar' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', 0: 'bar' } }); - st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } }); - st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); - - st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: false }), { a: { 0: 'b', t: 'u' } }); - st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: true }), { a: { 0: 'b', t: 'u', hasOwnProperty: 'c' } }); - st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: false }), { a: { 0: 'b', x: 'y' } }); - st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: true }), { a: { 0: 'b', hasOwnProperty: 'c', x: 'y' } }); - st.end(); - }); - - t.test('transforms arrays to objects (dot notation)', function (st) { - st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } }); - st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } }); - st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } }); - st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] }); - st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] }); - st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } }); - st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } }); - st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { 0: 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } }); - st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); - st.end(); - }); - - t.test('correctly prunes undefined values when converting an array to an object', function (st) { - st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { 2: 'b', 99999999: 'c' } }); - st.end(); - }); - - t.test('supports malformed uri characters', function (st) { - st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null }); - st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' }); - st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' }); - st.end(); - }); - - t.test('doesn\'t produce empty keys', function (st) { - st.deepEqual(qs.parse('_r=1&'), { _r: '1' }); - st.end(); - }); - - t.test('cannot access Object prototype', function (st) { - qs.parse('constructor[prototype][bad]=bad'); - qs.parse('bad[constructor][prototype][bad]=bad'); - st.equal(typeof Object.prototype.bad, 'undefined'); - st.end(); - }); - - t.test('parses arrays of objects', function (st) { - st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); - st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] }); - st.end(); - }); - - t.test('allows for empty strings in arrays', function (st) { - st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] }); - - st.deepEqual( - qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true, arrayLimit: 20 }), - { a: ['b', null, 'c', ''] }, - 'with arrayLimit 20 + array indices: null then empty string works' - ); - st.deepEqual( - qs.parse('a[]=b&a[]&a[]=c&a[]=', { strictNullHandling: true, arrayLimit: 0 }), - { a: { 0: 'b', 1: null, 2: 'c', 3: '' } }, - 'with arrayLimit 0 + array brackets: null then empty string works' - ); - - st.deepEqual( - qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true, arrayLimit: 20 }), - { a: ['b', '', 'c', null] }, - 'with arrayLimit 20 + array indices: empty string then null works' - ); - st.deepEqual( - qs.parse('a[]=b&a[]=&a[]=c&a[]', { strictNullHandling: true, arrayLimit: 0 }), - { a: { 0: 'b', 1: '', 2: 'c', 3: null } }, - 'with arrayLimit 0 + array brackets: empty string then null works' - ); - - st.deepEqual( - qs.parse('a[]=&a[]=b&a[]=c'), - { a: ['', 'b', 'c'] }, - 'array brackets: empty strings work' - ); - st.end(); - }); - - t.test('compacts sparse arrays', function (st) { - st.deepEqual(qs.parse('a[10]=1&a[2]=2', { arrayLimit: 20 }), { a: ['2', '1'] }); - st.deepEqual(qs.parse('a[1][b][2][c]=1', { arrayLimit: 20 }), { a: [{ b: [{ c: '1' }] }] }); - st.deepEqual(qs.parse('a[1][2][3][c]=1', { arrayLimit: 20 }), { a: [[[{ c: '1' }]]] }); - st.deepEqual(qs.parse('a[1][2][3][c][1]=1', { arrayLimit: 20 }), { a: [[[{ c: ['1'] }]]] }); - st.end(); - }); - - t.test('parses sparse arrays', function (st) { - /* eslint no-sparse-arrays: 0 */ - st.deepEqual(qs.parse('a[4]=1&a[1]=2', { allowSparse: true }), { a: [, '2', , , '1'] }); - st.deepEqual(qs.parse('a[1][b][2][c]=1', { allowSparse: true }), { a: [, { b: [, , { c: '1' }] }] }); - st.deepEqual(qs.parse('a[1][2][3][c]=1', { allowSparse: true }), { a: [, [, , [, , , { c: '1' }]]] }); - st.deepEqual(qs.parse('a[1][2][3][c][1]=1', { allowSparse: true }), { a: [, [, , [, , , { c: [, '1'] }]]] }); - st.end(); - }); - - t.test('parses semi-parsed strings', function (st) { - st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } }); - st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } }); - st.end(); - }); - - t.test('parses buffers correctly', function (st) { - var b = SaferBuffer.from('test'); - st.deepEqual(qs.parse({ a: b }), { a: b }); - st.end(); - }); - - t.test('parses jquery-param strings', function (st) { - // readable = 'filter[0][]=int1&filter[0][]==&filter[0][]=77&filter[]=and&filter[2][]=int2&filter[2][]==&filter[2][]=8' - var encoded = 'filter%5B0%5D%5B%5D=int1&filter%5B0%5D%5B%5D=%3D&filter%5B0%5D%5B%5D=77&filter%5B%5D=and&filter%5B2%5D%5B%5D=int2&filter%5B2%5D%5B%5D=%3D&filter%5B2%5D%5B%5D=8'; - var expected = { filter: [['int1', '=', '77'], 'and', ['int2', '=', '8']] }; - st.deepEqual(qs.parse(encoded), expected); - st.end(); - }); - - t.test('continues parsing when no parent is found', function (st) { - st.deepEqual(qs.parse('[]=&a=b'), { 0: '', a: 'b' }); - st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { 0: null, a: 'b' }); - st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' }); - st.end(); - }); - - t.test('does not error when parsing a very long array', function (st) { - var str = 'a[]=a'; - while (Buffer.byteLength(str) < 128 * 1024) { - str = str + '&' + str; - } - - st.doesNotThrow(function () { - qs.parse(str); - }); - - st.end(); - }); - - t.test('does not throw when a native prototype has an enumerable property', function (st) { - st.intercept(Object.prototype, 'crash', { value: '' }); - st.intercept(Array.prototype, 'crash', { value: '' }); - - st.doesNotThrow(qs.parse.bind(null, 'a=b')); - st.deepEqual(qs.parse('a=b'), { a: 'b' }); - st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c')); - st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); - - st.end(); - }); - - t.test('parses a string with an alternative string delimiter', function (st) { - st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('parses a string with an alternative RegExp delimiter', function (st) { - st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('does not use non-splittable objects as delimiters', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('allows overriding parameter limit', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' }); - st.end(); - }); - - t.test('allows setting the parameter limit to Infinity', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('allows overriding array limit', function (st) { - st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { 0: 'b' } }); - st.deepEqual(qs.parse('a[0]=b', { arrayLimit: 0 }), { a: { 0: 'b' } }); - - st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } }); - st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: 0 }), { a: { '-1': 'b' } }); - - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: -1 }), { a: { 0: 'b', 1: 'c' } }); - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { 0: 'b', 1: 'c' } }); - - st.end(); - }); - - t.test('allows disabling array parsing', function (st) { - var indices = qs.parse('a[0]=b&a[1]=c', { parseArrays: false }); - st.deepEqual(indices, { a: { 0: 'b', 1: 'c' } }); - st.equal(Array.isArray(indices.a), false, 'parseArrays:false, indices case is not an array'); - - var emptyBrackets = qs.parse('a[]=b', { parseArrays: false }); - st.deepEqual(emptyBrackets, { a: { 0: 'b' } }); - st.equal(Array.isArray(emptyBrackets.a), false, 'parseArrays:false, empty brackets case is not an array'); - - st.end(); - }); - - t.test('allows for query string prefix', function (st) { - st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' }); - st.deepEqual(qs.parse('foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' }); - st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: false }), { '?foo': 'bar' }); - - st.end(); - }); - - t.test('parses an object', function (st) { - var input = { - 'user[name]': { 'pop[bob]': 3 }, - 'user[email]': null - }; - - var expected = { - user: { - name: { 'pop[bob]': 3 }, - email: null - } - }; - - var result = qs.parse(input); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('parses string with comma as array divider', function (st) { - st.deepEqual(qs.parse('foo=bar,tee', { comma: true }), { foo: ['bar', 'tee'] }); - st.deepEqual(qs.parse('foo[bar]=coffee,tee', { comma: true }), { foo: { bar: ['coffee', 'tee'] } }); - st.deepEqual(qs.parse('foo=', { comma: true }), { foo: '' }); - st.deepEqual(qs.parse('foo', { comma: true }), { foo: '' }); - st.deepEqual(qs.parse('foo', { comma: true, strictNullHandling: true }), { foo: null }); - - // test cases inversed from from stringify tests - st.deepEqual(qs.parse('a[0]=c'), { a: ['c'] }); - st.deepEqual(qs.parse('a[]=c'), { a: ['c'] }); - st.deepEqual(qs.parse('a[]=c', { comma: true }), { a: ['c'] }); - - st.deepEqual(qs.parse('a[0]=c&a[1]=d'), { a: ['c', 'd'] }); - st.deepEqual(qs.parse('a[]=c&a[]=d'), { a: ['c', 'd'] }); - st.deepEqual(qs.parse('a=c,d', { comma: true }), { a: ['c', 'd'] }); - - st.end(); - }); - - t.test('parses values with comma as array divider', function (st) { - st.deepEqual(qs.parse({ foo: 'bar,tee' }, { comma: false }), { foo: 'bar,tee' }); - st.deepEqual(qs.parse({ foo: 'bar,tee' }, { comma: true }), { foo: ['bar', 'tee'] }); - st.end(); - }); - - t.test('use number decoder, parses string that has one number with comma option enabled', function (st) { - var decoder = function (str, defaultDecoder, charset, type) { - if (!isNaN(Number(str))) { - return parseFloat(str); - } - return defaultDecoder(str, defaultDecoder, charset, type); - }; - - st.deepEqual(qs.parse('foo=1', { comma: true, decoder: decoder }), { foo: 1 }); - st.deepEqual(qs.parse('foo=0', { comma: true, decoder: decoder }), { foo: 0 }); - - st.end(); - }); - - t.test('parses brackets holds array of arrays when having two parts of strings with comma as array divider', function (st) { - st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=4,5,6', { comma: true }), { foo: [['1', '2', '3'], ['4', '5', '6']] }); - st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=', { comma: true }), { foo: [['1', '2', '3'], ''] }); - st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=,', { comma: true }), { foo: [['1', '2', '3'], ['', '']] }); - st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=a', { comma: true }), { foo: [['1', '2', '3'], 'a'] }); - - st.end(); - }); - - t.test('parses url-encoded brackets holds array of arrays when having two parts of strings with comma as array divider', function (st) { - st.deepEqual(qs.parse('foo%5B%5D=1,2,3&foo%5B%5D=4,5,6', { comma: true }), { foo: [['1', '2', '3'], ['4', '5', '6']] }); - st.deepEqual(qs.parse('foo%5B%5D=1,2,3&foo%5B%5D=', { comma: true }), { foo: [['1', '2', '3'], ''] }); - st.deepEqual(qs.parse('foo%5B%5D=1,2,3&foo%5B%5D=,', { comma: true }), { foo: [['1', '2', '3'], ['', '']] }); - st.deepEqual(qs.parse('foo%5B%5D=1,2,3&foo%5B%5D=a', { comma: true }), { foo: [['1', '2', '3'], 'a'] }); - - st.end(); - }); - - t.test('parses comma delimited array while having percent-encoded comma treated as normal text', function (st) { - st.deepEqual(qs.parse('foo=a%2Cb', { comma: true }), { foo: 'a,b' }); - st.deepEqual(qs.parse('foo=a%2C%20b,d', { comma: true }), { foo: ['a, b', 'd'] }); - st.deepEqual(qs.parse('foo=a%2C%20b,c%2C%20d', { comma: true }), { foo: ['a, b', 'c, d'] }); - - st.end(); - }); - - t.test('parses an object in dot notation', function (st) { - var input = { - 'user.name': { 'pop[bob]': 3 }, - 'user.email.': null - }; - - var expected = { - user: { - name: { 'pop[bob]': 3 }, - email: null - } - }; - - var result = qs.parse(input, { allowDots: true }); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('parses an object and not child values', function (st) { - var input = { - 'user[name]': { 'pop[bob]': { test: 3 } }, - 'user[email]': null - }; - - var expected = { - user: { - name: { 'pop[bob]': { test: 3 } }, - email: null - } - }; - - var result = qs.parse(input); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('does not blow up when Buffer global is missing', function (st) { - var restore = mockProperty(global, 'Buffer', { 'delete': true }); - - var result = qs.parse('a=b&c=d'); - - restore(); - - st.deepEqual(result, { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('does not crash when parsing circular references', function (st) { - var a = {}; - a.b = a; - - var parsed; - - st.doesNotThrow(function () { - parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a }); - }); - - st.equal('foo' in parsed, true, 'parsed has "foo" property'); - st.equal('bar' in parsed.foo, true); - st.equal('baz' in parsed.foo, true); - st.equal(parsed.foo.bar, 'baz'); - st.deepEqual(parsed.foo.baz, a); - st.end(); - }); - - t.test('does not crash when parsing deep objects', function (st) { - var parsed; - var str = 'foo'; - - for (var i = 0; i < 5000; i++) { - str += '[p]'; - } - - str += '=bar'; - - st.doesNotThrow(function () { - parsed = qs.parse(str, { depth: 5000 }); - }); - - st.equal('foo' in parsed, true, 'parsed has "foo" property'); - - var depth = 0; - var ref = parsed.foo; - while ((ref = ref.p)) { - depth += 1; - } - - st.equal(depth, 5000, 'parsed is 5000 properties deep'); - - st.end(); - }); - - t.test('parses null objects correctly', { skip: !hasProto }, function (st) { - var a = { __proto__: null, b: 'c' }; - - st.deepEqual(qs.parse(a), { b: 'c' }); - var result = qs.parse({ a: a }); - st.equal('a' in result, true, 'result has "a" property'); - st.deepEqual(result.a, a); - st.end(); - }); - - t.test('parses dates correctly', function (st) { - var now = new Date(); - st.deepEqual(qs.parse({ a: now }), { a: now }); - st.end(); - }); - - t.test('parses regular expressions correctly', function (st) { - var re = /^test$/; - st.deepEqual(qs.parse({ a: re }), { a: re }); - st.end(); - }); - - t.test('does not allow overwriting prototype properties', function (st) { - st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: false }), {}); - st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: false }), {}); - - st.deepEqual( - qs.parse('toString', { allowPrototypes: false }), - {}, - 'bare "toString" results in {}' - ); - - st.end(); - }); - - t.test('can allow overwriting prototype properties', function (st) { - st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } }); - st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' }); - - st.deepEqual( - qs.parse('toString', { allowPrototypes: true }), - { toString: '' }, - 'bare "toString" results in { toString: "" }' - ); - - st.end(); - }); - - t.test('does not crash when the global Object prototype is frozen', { skip: !hasPropertyDescriptors || !hasOverrideMistake }, function (st) { - // We can't actually freeze the global Object prototype as that will interfere with other tests, and once an object is frozen, it - // can't be unfrozen. Instead, we add a new non-writable property to simulate this. - st.teardown(mockProperty(Object.prototype, 'frozenProp', { value: 'foo', nonWritable: true, nonEnumerable: true })); - - st['throws']( - function () { - var obj = {}; - obj.frozenProp = 'bar'; - }, - // node < 6 has a different error message - /^TypeError: Cannot assign to read only property 'frozenProp' of (?:object '#'|#)/, - 'regular assignment of an inherited non-writable property throws' - ); - - var parsed; - st.doesNotThrow( - function () { - parsed = qs.parse('frozenProp', { allowPrototypes: false }); - }, - 'parsing a nonwritable Object.prototype property does not throw' - ); - - st.deepEqual(parsed, {}, 'bare "frozenProp" results in {}'); - - st.end(); - }); - - t.test('params starting with a closing bracket', function (st) { - st.deepEqual(qs.parse(']=toString'), { ']': 'toString' }); - st.deepEqual(qs.parse(']]=toString'), { ']]': 'toString' }); - st.deepEqual(qs.parse(']hello]=toString'), { ']hello]': 'toString' }); - st.end(); - }); - - t.test('params starting with a starting bracket', function (st) { - st.deepEqual(qs.parse('[=toString'), { '[': 'toString' }); - st.deepEqual(qs.parse('[[=toString'), { '[[': 'toString' }); - st.deepEqual(qs.parse('[hello[=toString'), { '[hello[': 'toString' }); - st.end(); - }); - - t.test('add keys to objects', function (st) { - st.deepEqual( - qs.parse('a[b]=c&a=d', { strictMerge: false }), - { a: { b: 'c', d: true } }, - 'can add keys to objects' - ); - - st.deepEqual( - qs.parse('a[b]=c&a=toString', { strictMerge: false }), - { a: { b: 'c' } }, - 'can not overwrite prototype' - ); - - st.deepEqual( - qs.parse('a[b]=c&a=toString', { strictMerge: false, allowPrototypes: true }), - { a: { b: 'c', toString: true } }, - 'can overwrite prototype with allowPrototypes true' - ); - - st.deepEqual( - qs.parse('a[b]=c&a=toString', { strictMerge: false, plainObjects: true }), - { __proto__: null, a: { __proto__: null, b: 'c', toString: true } }, - 'can overwrite prototype with plainObjects true' - ); - - st.end(); - }); - - t.test('strictMerge wraps object and primitive into an array', function (st) { - st.deepEqual( - qs.parse('a[b]=c&a=d'), - { a: [{ b: 'c' }, 'd'] }, - 'object then primitive produces array' - ); - - st.deepEqual( - qs.parse('a=d&a[b]=c'), - { a: ['d', { b: 'c' }] }, - 'primitive then object produces array' - ); - - st.deepEqual( - qs.parse('a[b]=c&a=toString'), - { a: [{ b: 'c' }, 'toString'] }, - 'prototype-colliding value is preserved in array' - ); - - st.deepEqual( - qs.parse('a[b]=c&a=toString', { plainObjects: true }), - { __proto__: null, a: [{ __proto__: null, b: 'c' }, 'toString'] }, - 'plainObjects preserved in array wrapping' - ); - - st.end(); - }); - - t.test('dunder proto is ignored', function (st) { - var payload = 'categories[__proto__]=login&categories[__proto__]&categories[length]=42'; - var result = qs.parse(payload, { allowPrototypes: true }); - - st.deepEqual( - result, - { - categories: { - length: '42' - } - }, - 'silent [[Prototype]] payload' - ); - - var plainResult = qs.parse(payload, { allowPrototypes: true, plainObjects: true }); - - st.deepEqual( - plainResult, - { - __proto__: null, - categories: { - __proto__: null, - length: '42' - } - }, - 'silent [[Prototype]] payload: plain objects' - ); - - var query = qs.parse('categories[__proto__]=cats&categories[__proto__]=dogs&categories[some][json]=toInject', { allowPrototypes: true }); - - st.notOk(Array.isArray(query.categories), 'is not an array'); - st.notOk(query.categories instanceof Array, 'is not instanceof an array'); - st.deepEqual(query.categories, { some: { json: 'toInject' } }); - st.equal(JSON.stringify(query.categories), '{"some":{"json":"toInject"}}', 'stringifies as a non-array'); - - st.deepEqual( - qs.parse('foo[__proto__][hidden]=value&foo[bar]=stuffs', { allowPrototypes: true }), - { - foo: { - bar: 'stuffs' - } - }, - 'hidden values' - ); - - st.deepEqual( - qs.parse('foo[__proto__][hidden]=value&foo[bar]=stuffs', { allowPrototypes: true, plainObjects: true }), - { - __proto__: null, - foo: { - __proto__: null, - bar: 'stuffs' - } - }, - 'hidden values: plain objects' - ); - - st.end(); - }); - - t.test('can return null objects', { skip: !hasProto }, function (st) { - var expected = { - __proto__: null, - a: { - __proto__: null, - b: 'c', - hasOwnProperty: 'd' - } - }; - st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected); - st.deepEqual(qs.parse(null, { plainObjects: true }), { __proto__: null }); - var expectedArray = { - __proto__: null, - a: { - __proto__: null, - 0: 'b', - c: 'd' - } - }; - st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray); - st.end(); - }); - - t.test('can parse with custom encoding', function (st) { - st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', { - decoder: function (str) { - var reg = /%([0-9A-F]{2})/ig; - var result = []; - var parts = reg.exec(str); - while (parts) { - result.push(parseInt(parts[1], 16)); - parts = reg.exec(str); - } - return String(iconv.decode(SaferBuffer.from(result), 'shift_jis')); - } - }), { 県: '大阪府' }); - st.end(); - }); - - t.test('receives the default decoder as a second argument', function (st) { - st.plan(1); - qs.parse('a', { - decoder: function (str, defaultDecoder) { - st.equal(defaultDecoder, utils.decode); - } - }); - st.end(); - }); - - t.test('throws error with wrong decoder', function (st) { - st['throws'](function () { - qs.parse({}, { decoder: 'string' }); - }, new TypeError('Decoder has to be a function.')); - st.end(); - }); - - t.test('does not mutate the options argument', function (st) { - var options = {}; - qs.parse('a[b]=true', options); - st.deepEqual(options, {}); - st.end(); - }); - - t.test('throws if an invalid charset is specified', function (st) { - st['throws'](function () { - qs.parse('a=b', { charset: 'foobar' }); - }, new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined')); - st.end(); - }); - - t.test('parses an iso-8859-1 string if asked to', function (st) { - st.deepEqual(qs.parse('%A2=%BD', { charset: 'iso-8859-1' }), { '¢': '½' }); - st.end(); - }); - - var urlEncodedCheckmarkInUtf8 = '%E2%9C%93'; - var urlEncodedOSlashInUtf8 = '%C3%B8'; - var urlEncodedNumCheckmark = '%26%2310003%3B'; - var urlEncodedNumSmiley = '%26%239786%3B'; - - t.test('prefers an utf-8 charset specified by the utf8 sentinel to a default charset of iso-8859-1', function (st) { - st.deepEqual(qs.parse('utf8=' + urlEncodedCheckmarkInUtf8 + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'iso-8859-1' }), { ø: 'ø' }); - st.end(); - }); - - t.test('prefers an iso-8859-1 charset specified by the utf8 sentinel to a default charset of utf-8', function (st) { - st.deepEqual(qs.parse('utf8=' + urlEncodedNumCheckmark + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'utf-8' }), { 'ø': 'ø' }); - st.end(); - }); - - t.test('does not require the utf8 sentinel to be defined before the parameters whose decoding it affects', function (st) { - st.deepEqual(qs.parse('a=' + urlEncodedOSlashInUtf8 + '&utf8=' + urlEncodedNumCheckmark, { charsetSentinel: true, charset: 'utf-8' }), { a: 'ø' }); - st.end(); - }); - - t.test('ignores an utf8 sentinel with an unknown value', function (st) { - st.deepEqual(qs.parse('utf8=foo&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'utf-8' }), { ø: 'ø' }); - st.end(); - }); - - t.test('uses the utf8 sentinel to switch to utf-8 when no default charset is given', function (st) { - st.deepEqual(qs.parse('utf8=' + urlEncodedCheckmarkInUtf8 + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true }), { ø: 'ø' }); - st.end(); - }); - - t.test('uses the utf8 sentinel to switch to iso-8859-1 when no default charset is given', function (st) { - st.deepEqual(qs.parse('utf8=' + urlEncodedNumCheckmark + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true }), { 'ø': 'ø' }); - st.end(); - }); - - t.test('interprets numeric entities in iso-8859-1 when `interpretNumericEntities`', function (st) { - st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'iso-8859-1', interpretNumericEntities: true }), { foo: '☺' }); - st.end(); - }); - - t.test('handles a custom decoder returning `null`, in the `iso-8859-1` charset, when `interpretNumericEntities`', function (st) { - st.deepEqual(qs.parse('foo=&bar=' + urlEncodedNumSmiley, { - charset: 'iso-8859-1', - decoder: function (str, defaultDecoder, charset) { - return str ? defaultDecoder(str, defaultDecoder, charset) : null; - }, - interpretNumericEntities: true - }), { foo: null, bar: '☺' }); - st.end(); - }); - - t.test('handles a custom decoder returning `null`, with a string key of `null`', function (st) { - st.deepEqual( - qs.parse('null=1&ToNull=2', { - decoder: function (str, defaultDecoder, charset) { - return str === 'ToNull' ? null : defaultDecoder(str, defaultDecoder, charset); - } - }), - { 'null': '1' }, - '"null" key is not overridden by `null` decoder result' - ); - - st.end(); - }); - - t.test('does not interpret numeric entities in iso-8859-1 when `interpretNumericEntities` is absent', function (st) { - st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'iso-8859-1' }), { foo: '☺' }); - st.end(); - }); - - t.test('does not interpret numeric entities when the charset is utf-8, even when `interpretNumericEntities`', function (st) { - st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'utf-8', interpretNumericEntities: true }), { foo: '☺' }); - st.end(); - }); - - t.test('interpretNumericEntities with comma:true and iso charset does not crash', function (st) { - st.deepEqual( - qs.parse('b&a[]=1,' + urlEncodedNumSmiley, { comma: true, charset: 'iso-8859-1', interpretNumericEntities: true }), - { b: '', a: ['1,☺'] } - ); - - st.end(); - }); - - t.test('does not interpret %uXXXX syntax in iso-8859-1 mode', function (st) { - st.deepEqual(qs.parse('%u263A=%u263A', { charset: 'iso-8859-1' }), { '%u263A': '%u263A' }); - st.end(); - }); - - t.test('allows for decoding keys and values differently', function (st) { - var decoder = function (str, defaultDecoder, charset, type) { - if (type === 'key') { - return defaultDecoder(str, defaultDecoder, charset, type).toLowerCase(); - } - if (type === 'value') { - return defaultDecoder(str, defaultDecoder, charset, type).toUpperCase(); - } - throw 'this should never happen! type: ' + type; - }; - - st.deepEqual(qs.parse('KeY=vAlUe', { decoder: decoder }), { key: 'VALUE' }); - - var noopDecoder = function () { return 'x'; }; - noopDecoder(); - st['throws']( - function () { decoder('x', noopDecoder, 'utf-8', 'unknown'); }, - 'this should never happen! type: unknown', - 'decoder throws for unexpected type' - ); - - st.end(); - }); - - t.test('parameter limit tests', function (st) { - st.test('does not throw error when within parameter limit', function (sst) { - var result = qs.parse('a=1&b=2&c=3', { parameterLimit: 5, throwOnLimitExceeded: true }); - sst.deepEqual(result, { a: '1', b: '2', c: '3' }, 'parses without errors'); - sst.end(); - }); - - st.test('throws error when throwOnLimitExceeded is present but not boolean', function (sst) { - sst['throws']( - function () { - qs.parse('a=1&b=2&c=3&d=4&e=5&f=6', { parameterLimit: 3, throwOnLimitExceeded: 'true' }); - }, - new TypeError('`throwOnLimitExceeded` option must be a boolean'), - 'throws error when throwOnLimitExceeded is present and not boolean' - ); - sst.end(); - }); - - st.test('throws error when parameter limit exceeded', function (sst) { - sst['throws']( - function () { - qs.parse('a=1&b=2&c=3&d=4&e=5&f=6', { parameterLimit: 3, throwOnLimitExceeded: true }); - }, - new RangeError('Parameter limit exceeded. Only 3 parameters allowed.'), - 'throws error when parameter limit is exceeded' - ); - - sst['throws']( - function () { - qs.parse('a=1&b=2', { parameterLimit: 1, throwOnLimitExceeded: true }); - }, - new RangeError('Parameter limit exceeded. Only 1 parameter allowed.'), - 'throws error with singular "parameter" when parameterLimit is 1' - ); - sst.end(); - }); - - st.test('silently truncates when throwOnLimitExceeded is not given', function (sst) { - var result = qs.parse('a=1&b=2&c=3&d=4&e=5', { parameterLimit: 3 }); - sst.deepEqual(result, { a: '1', b: '2', c: '3' }, 'parses and truncates silently'); - sst.end(); - }); - - st.test('silently truncates when parameter limit exceeded without error', function (sst) { - var result = qs.parse('a=1&b=2&c=3&d=4&e=5', { parameterLimit: 3, throwOnLimitExceeded: false }); - sst.deepEqual(result, { a: '1', b: '2', c: '3' }, 'parses and truncates silently'); - sst.end(); - }); - - st.test('allows unlimited parameters when parameterLimit set to Infinity', function (sst) { - var result = qs.parse('a=1&b=2&c=3&d=4&e=5&f=6', { parameterLimit: Infinity }); - sst.deepEqual(result, { a: '1', b: '2', c: '3', d: '4', e: '5', f: '6' }, 'parses all parameters without truncation'); - sst.end(); - }); - - st.test('allows unlimited parameters when parameterLimit is Infinity and throwOnLimitExceeded is true', function (sst) { - var result = qs.parse('a=1&b=2&c=3&d=4&e=5&f=6', { parameterLimit: Infinity, throwOnLimitExceeded: true }); - sst.deepEqual(result, { a: '1', b: '2', c: '3', d: '4', e: '5', f: '6' }, 'parses all parameters without truncation or throwing'); - sst.end(); - }); - - st.end(); - }); - - t.test('array limit tests', function (st) { - st.test('does not throw error when array is within limit', function (sst) { - var result = qs.parse('a[]=1&a[]=2&a[]=3', { arrayLimit: 5, throwOnLimitExceeded: true }); - sst.deepEqual(result, { a: ['1', '2', '3'] }, 'parses array without errors'); - sst.end(); - }); - - st.test('throws error when throwOnLimitExceeded is present but not boolean for array limit', function (sst) { - sst['throws']( - function () { - qs.parse('a[]=1&a[]=2&a[]=3&a[]=4', { arrayLimit: 3, throwOnLimitExceeded: 'true' }); - }, - new TypeError('`throwOnLimitExceeded` option must be a boolean'), - 'throws error when throwOnLimitExceeded is present and not boolean for array limit' - ); - sst.end(); - }); - - st.test('throws error when array limit exceeded', function (sst) { - // 4 elements exceeds limit of 3 - sst['throws']( - function () { - qs.parse('a[]=1&a[]=2&a[]=3&a[]=4', { arrayLimit: 3, throwOnLimitExceeded: true }); - }, - new RangeError('Array limit exceeded. Only 3 elements allowed in an array.'), - 'throws error when array limit is exceeded' - ); - sst.end(); - }); - - st.test('does not throw when at limit', function (sst) { - // 3 elements = limit of 3, should not throw - var result = qs.parse('a[]=1&a[]=2&a[]=3', { arrayLimit: 3, throwOnLimitExceeded: true }); - sst.ok(Array.isArray(result.a), 'result is an array'); - sst.deepEqual(result.a, ['1', '2', '3'], 'all values present'); - sst.end(); - }); - - st.test('converts array to object if length is greater than limit', function (sst) { - var result = qs.parse('a[1]=1&a[2]=2&a[3]=3&a[4]=4&a[5]=5&a[6]=6', { arrayLimit: 5 }); - - sst.deepEqual(result, { a: { 1: '1', 2: '2', 3: '3', 4: '4', 5: '5', 6: '6' } }, 'parses into object if array length is greater than limit'); - sst.end(); - }); - - st.test('throws error when indexed notation exceeds arrayLimit with throwOnLimitExceeded', function (sst) { - sst['throws']( - function () { - qs.parse('a[1001]=b', { arrayLimit: 1000, throwOnLimitExceeded: true }); - }, - new RangeError('Array limit exceeded. Only 1000 elements allowed in an array.'), - 'throws error for a single index exceeding arrayLimit' - ); - - sst['throws']( - function () { - qs.parse('a[0]=1&a[1]=2&a[2]=3&a[10]=4', { arrayLimit: 6, throwOnLimitExceeded: true, allowSparse: true }); - }, - new RangeError('Array limit exceeded. Only 6 elements allowed in an array.'), - 'throws error when a sparse index exceeds arrayLimit' - ); - - sst['throws']( - function () { - qs.parse('a[2]=b', { arrayLimit: 1, throwOnLimitExceeded: true }); - }, - new RangeError('Array limit exceeded. Only 1 element allowed in an array.'), - 'throws error with singular "element" when arrayLimit is 1' - ); - - sst.end(); - }); - - st.test('does not throw for indexed notation within arrayLimit with throwOnLimitExceeded', function (sst) { - var result = qs.parse('a[4]=b', { arrayLimit: 5, throwOnLimitExceeded: true, allowSparse: true }); - sst.ok(Array.isArray(result.a), 'result is an array'); - sst.equal(result.a.length, 5, 'array has correct length'); - sst.equal(result.a[4], 'b', 'value at index 4 is correct'); - sst.end(); - }); - - st.test('silently converts to object for indexed notation exceeding arrayLimit without throwOnLimitExceeded', function (sst) { - var result = qs.parse('a[1001]=b', { arrayLimit: 1000 }); - sst.deepEqual(result, { a: { 1001: 'b' } }, 'converts to object without throwing'); - sst.end(); - }); - - st.test('throws when duplicate bracket keys exceed arrayLimit with throwOnLimitExceeded', function (sst) { - sst['throws']( - function () { - qs.parse('a[]=1&a[]=2&a[]=3&a[]=4&a[]=5&a[]=6', { arrayLimit: 5, throwOnLimitExceeded: true }); - }, - new RangeError('Array limit exceeded. Only 5 elements allowed in an array.'), - 'throws error when duplicate bracket notation exceeds array limit' - ); - sst.end(); - }); - - st.end(); - }); - - t.end(); -}); - -test('parses empty keys', function (t) { - emptyTestCases.forEach(function (testCase) { - t.test('skips empty string key with ' + testCase.input, function (st) { - st.deepEqual(qs.parse(testCase.input), testCase.noEmptyKeys); - - st.end(); - }); - }); -}); - -test('`duplicates` option', function (t) { - v.nonStrings.concat('not a valid option').forEach(function (invalidOption) { - if (typeof invalidOption !== 'undefined') { - t['throws']( - function () { qs.parse('', { duplicates: invalidOption }); }, - TypeError, - 'throws on invalid option: ' + inspect(invalidOption) - ); - } - }); - - t.deepEqual( - qs.parse('foo=bar&foo=baz'), - { foo: ['bar', 'baz'] }, - 'duplicates: default, combine' - ); - - t.deepEqual( - qs.parse('foo=bar&foo=baz', { duplicates: 'combine' }), - { foo: ['bar', 'baz'] }, - 'duplicates: combine' - ); - - t.deepEqual( - qs.parse('foo=bar&foo=baz', { duplicates: 'first' }), - { foo: 'bar' }, - 'duplicates: first' - ); - - t.deepEqual( - qs.parse('foo=bar&foo=baz', { duplicates: 'last' }), - { foo: 'baz' }, - 'duplicates: last' - ); - - t.test('bracket notation always combines regardless of duplicates', function (st) { - st.deepEqual( - qs.parse('a=1&a=2&b[]=1&b[]=2', { duplicates: 'last' }), - { a: '2', b: ['1', '2'] }, - 'duplicates last: unbracketed takes last, bracketed combines' - ); - - st.deepEqual( - qs.parse('b[]=1&b[]=2', { duplicates: 'last' }), - { b: ['1', '2'] }, - 'duplicates last: bracketed always combines' - ); - - st.deepEqual( - qs.parse('b[]=1&b[]=2', { duplicates: 'first' }), - { b: ['1', '2'] }, - 'duplicates first: bracketed always combines' - ); - - st.deepEqual( - qs.parse('a=1&a=2&b[]=1&b[]=2', { duplicates: 'first' }), - { a: '1', b: ['1', '2'] }, - 'duplicates first: unbracketed takes first, bracketed combines' - ); - - st.end(); - }); - - t.end(); -}); - -test('qs strictDepth option - throw cases', function (t) { - t.test('throws an exception when depth exceeds the limit with strictDepth: true', function (st) { - st['throws']( - function () { - qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1, strictDepth: true }); - }, - RangeError, - 'throws RangeError' - ); - st.end(); - }); - - t.test('throws an exception for multiple nested arrays with strictDepth: true', function (st) { - st['throws']( - function () { - qs.parse('a[0][1][2][3][4]=b', { depth: 3, strictDepth: true }); - }, - RangeError, - 'throws RangeError' - ); - st.end(); - }); - - t.test('throws an exception for nested objects and arrays with strictDepth: true', function (st) { - st['throws']( - function () { - qs.parse('a[b][c][0][d][e]=f', { depth: 3, strictDepth: true }); - }, - RangeError, - 'throws RangeError' - ); - st.end(); - }); - - t.test('throws an exception for different types of values with strictDepth: true', function (st) { - st['throws']( - function () { - qs.parse('a[b][c][d][e]=true&a[b][c][d][f]=42', { depth: 3, strictDepth: true }); - }, - RangeError, - 'throws RangeError' - ); - st.end(); - }); - -}); - -test('qs strictDepth option - non-throw cases', function (t) { - t.test('when depth is 0 and strictDepth true, do not throw', function (st) { - st.doesNotThrow( - function () { - qs.parse('a[b][c][d][e]=true&a[b][c][d][f]=42', { depth: 0, strictDepth: true }); - }, - RangeError, - 'does not throw RangeError' - ); - st.end(); - }); - - t.test('parses successfully when depth is within the limit with strictDepth: true', function (st) { - st.doesNotThrow( - function () { - var result = qs.parse('a[b]=c', { depth: 1, strictDepth: true }); - st.deepEqual(result, { a: { b: 'c' } }, 'parses correctly'); - } - ); - st.end(); - }); - - t.test('does not throw an exception when depth exceeds the limit with strictDepth: false', function (st) { - st.doesNotThrow( - function () { - var result = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); - st.deepEqual(result, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }, 'parses with depth limit'); - } - ); - st.end(); - }); - - t.test('parses successfully when depth is within the limit with strictDepth: false', function (st) { - st.doesNotThrow( - function () { - var result = qs.parse('a[b]=c', { depth: 1 }); - st.deepEqual(result, { a: { b: 'c' } }, 'parses correctly'); - } - ); - st.end(); - }); - - t.test('does not throw when depth is exactly at the limit with strictDepth: true', function (st) { - st.doesNotThrow( - function () { - var result = qs.parse('a[b][c]=d', { depth: 2, strictDepth: true }); - st.deepEqual(result, { a: { b: { c: 'd' } } }, 'parses correctly'); - } - ); - st.end(); - }); -}); - -test('DOS', function (t) { - var arr = []; - for (var i = 0; i < 105; i++) { - arr[arr.length] = 'x'; - } - var attack = 'a[]=' + arr.join('&a[]='); - var result = qs.parse(attack, { arrayLimit: 100 }); - - t.notOk(Array.isArray(result.a), 'arrayLimit is respected: result is an object, not an array'); - t.equal(Object.keys(result.a).length, 105, 'all values are preserved'); - - t.end(); -}); - -test('arrayLimit boundary conditions', function (t) { - // arrayLimit is the max number of elements allowed in an array - t.test('exactly at the limit stays as array', function (st) { - // 3 elements = limit of 3 - var result = qs.parse('a[]=1&a[]=2&a[]=3', { arrayLimit: 3 }); - st.ok(Array.isArray(result.a), 'result is an array when count equals limit'); - st.deepEqual(result.a, ['1', '2', '3'], 'all values present'); - st.end(); - }); - - t.test('one over the limit converts to object', function (st) { - // 4 elements exceeds limit of 3 - var result = qs.parse('a[]=1&a[]=2&a[]=3&a[]=4', { arrayLimit: 3 }); - st.notOk(Array.isArray(result.a), 'result is not an array when over limit'); - st.deepEqual(result.a, { 0: '1', 1: '2', 2: '3', 3: '4' }, 'all values preserved as object'); - st.end(); - }); - - t.test('arrayLimit 1 with one value', function (st) { - // 1 element = limit of 1 - var result = qs.parse('a[]=1', { arrayLimit: 1 }); - st.ok(Array.isArray(result.a), 'result is an array when count equals limit'); - st.deepEqual(result.a, ['1'], 'value preserved as array'); - st.end(); - }); - - t.test('arrayLimit 1 with two values converts to object', function (st) { - // 2 elements exceeds limit of 1 - var result = qs.parse('a[]=1&a[]=2', { arrayLimit: 1 }); - st.notOk(Array.isArray(result.a), 'result is not an array'); - st.deepEqual(result.a, { 0: '1', 1: '2' }, 'all values preserved as object'); - st.end(); - }); - - t.end(); -}); - -test('comma + arrayLimit', function (t) { - t.test('comma-separated values within arrayLimit stay as array', function (st) { - var result = qs.parse('a=1,2,3', { comma: true, arrayLimit: 5 }); - st.ok(Array.isArray(result.a), 'result is an array'); - st.deepEqual(result.a, ['1', '2', '3'], 'all values present'); - st.end(); - }); - - t.test('comma-separated values exceeding arrayLimit convert to object', function (st) { - var result = qs.parse('a=1,2,3,4', { comma: true, arrayLimit: 3 }); - st.notOk(Array.isArray(result.a), 'result is not an array when over limit'); - st.deepEqual(result.a, { 0: '1', 1: '2', 2: '3', 3: '4' }, 'all values preserved as object'); - st.end(); - }); - - t.test('comma-separated values exceeding arrayLimit with throwOnLimitExceeded throws', function (st) { - st['throws']( - function () { - qs.parse('a=1,2,3,4', { comma: true, arrayLimit: 3, throwOnLimitExceeded: true }); - }, - new RangeError('Array limit exceeded. Only 3 elements allowed in an array.'), - 'throws error when comma-split exceeds array limit' - ); - - st['throws']( - function () { - qs.parse('a=1,2,3', { comma: true, arrayLimit: 1, throwOnLimitExceeded: true }); - }, - new RangeError('Array limit exceeded. Only 1 element allowed in an array.'), - 'throws error with singular "element" when arrayLimit is 1' - ); - st.end(); - }); - - t.test('comma-separated values at exactly arrayLimit stay as array', function (st) { - var result = qs.parse('a=1,2,3', { comma: true, arrayLimit: 3 }); - st.ok(Array.isArray(result.a), 'result is an array when exactly at limit'); - st.deepEqual(result.a, ['1', '2', '3'], 'all values present'); - st.end(); - }); - - t.end(); -}); - -test('mixed array and object notation', function (t) { - t.test('array brackets with object key - under limit', function (st) { - st.deepEqual( - qs.parse('a[]=b&a[c]=d'), - { a: { 0: 'b', c: 'd' } }, - 'mixing [] and [key] converts to object' - ); - st.end(); - }); - - t.test('array index with object key - under limit', function (st) { - st.deepEqual( - qs.parse('a[0]=b&a[c]=d'), - { a: { 0: 'b', c: 'd' } }, - 'mixing [0] and [key] produces object' - ); - st.end(); - }); - - t.test('plain value with array brackets - under limit', function (st) { - st.deepEqual( - qs.parse('a=b&a[]=c', { arrayLimit: 20 }), - { a: ['b', 'c'] }, - 'plain value combined with [] stays as array under limit' - ); - st.end(); - }); - - t.test('array brackets with plain value - under limit', function (st) { - st.deepEqual( - qs.parse('a[]=b&a=c', { arrayLimit: 20 }), - { a: ['b', 'c'] }, - '[] combined with plain value stays as array under limit' - ); - st.end(); - }); - - t.test('plain value with array index - under limit', function (st) { - st.deepEqual( - qs.parse('a=b&a[0]=c', { arrayLimit: 20 }), - { a: ['b', 'c'] }, - 'plain value combined with [0] stays as array under limit' - ); - st.end(); - }); - - t.test('multiple plain values with duplicates combine', function (st) { - st.deepEqual( - qs.parse('a=b&a=c&a=d', { arrayLimit: 20 }), - { a: ['b', 'c', 'd'] }, - 'duplicate plain keys combine into array' - ); - st.end(); - }); - - t.test('multiple plain values exceeding limit', function (st) { - // 3 elements (indices 0-2), max index 2 > limit 1 - st.deepEqual( - qs.parse('a=b&a=c&a=d', { arrayLimit: 1 }), - { a: { 0: 'b', 1: 'c', 2: 'd' } }, - 'duplicate plain keys convert to object when exceeding limit' - ); - st.end(); - }); - - t.test('mixed notation produces consistent results when arrayLimit is exceeded', function (st) { - var expected = { a: { 0: 'b', 1: 'c', 2: 'd' } }; - - st.deepEqual( - qs.parse('a[]=b&a[1]=c&a=d', { arrayLimit: -1 }), - expected, - 'arrayLimit -1' - ); - - st.deepEqual( - qs.parse('a[]=b&a[1]=c&a=d', { arrayLimit: 0 }), - expected, - 'arrayLimit 0' - ); - - st.deepEqual( - qs.parse('a[]=b&a[1]=c&a=d', { arrayLimit: 1 }), - expected, - 'arrayLimit 1' - ); - - st.end(); - }); - - t.test('uses existing array length for currentArrayLength when parsing object input with bracket keys', function (st) { - var input = {}; - var arr = ['x', 'y']; - arr.a = ['z', 'w']; - input['a[]'] = arr; - st.deepEqual(qs.parse(input), { a: ['x', 'y'] }, 'parses object input with bracket keys using existing array values'); - st.end(); - }); - - t.test('throws with singular message when object input bracket key exceeds arrayLimit of 1', function (st) { - var input = {}; - var arr = ['x']; - arr.a = ['z', 'w']; - input['a[]'] = arr; - st['throws']( - function () { - qs.parse(input, { throwOnLimitExceeded: true, arrayLimit: 1 }); - }, - new RangeError('Array limit exceeded. Only 1 element allowed in an array.'), - 'throws singular error for object input exceeding arrayLimit 1' - ); - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/qs/test/stringify.js b/node_modules/qs/test/stringify.js deleted file mode 100644 index 07324cf..0000000 --- a/node_modules/qs/test/stringify.js +++ /dev/null @@ -1,1448 +0,0 @@ -'use strict'; - -var test = require('tape'); -var qs = require('../'); -var utils = require('../lib/utils'); -var iconv = require('iconv-lite'); -var SaferBuffer = require('safer-buffer').Buffer; -var hasSymbols = require('has-symbols'); -var mockProperty = require('mock-property'); -var emptyTestCases = require('./empty-keys-cases').emptyTestCases; -var hasProto = require('has-proto')(); -var hasBigInt = require('has-bigints')(); - -test('stringify()', function (t) { - t.test('stringifies a querystring object', function (st) { - st.equal(qs.stringify({ a: 'b' }), 'a=b'); - st.equal(qs.stringify({ a: 1 }), 'a=1'); - st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2'); - st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z'); - st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC'); - st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80'); - st.equal(qs.stringify({ a: 'א' }), 'a=%D7%90'); - st.equal(qs.stringify({ a: '𐐷' }), 'a=%F0%90%90%B7'); - st.end(); - }); - - t.test('stringifies falsy values', function (st) { - st.equal(qs.stringify(undefined), ''); - st.equal(qs.stringify(null), ''); - st.equal(qs.stringify(null, { strictNullHandling: true }), ''); - st.equal(qs.stringify(false), ''); - st.equal(qs.stringify(0), ''); - st.end(); - }); - - t.test('stringifies symbols', { skip: !hasSymbols() }, function (st) { - st.equal(qs.stringify(Symbol.iterator), ''); - st.equal(qs.stringify([Symbol.iterator]), '0=Symbol%28Symbol.iterator%29'); - st.equal(qs.stringify({ a: Symbol.iterator }), 'a=Symbol%28Symbol.iterator%29'); - st.equal( - qs.stringify({ a: [Symbol.iterator] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), - 'a[]=Symbol%28Symbol.iterator%29' - ); - st.end(); - }); - - t.test('stringifies bigints', { skip: !hasBigInt }, function (st) { - var three = BigInt(3); - var encodeWithN = function (value, defaultEncoder, charset) { - var result = defaultEncoder(value, defaultEncoder, charset); - return typeof value === 'bigint' ? result + 'n' : result; - }; - st.equal(qs.stringify(three), ''); - st.equal(qs.stringify([three]), '0=3'); - st.equal(qs.stringify([three], { encoder: encodeWithN }), '0=3n'); - st.equal(qs.stringify({ a: three }), 'a=3'); - st.equal(qs.stringify({ a: three }, { encoder: encodeWithN }), 'a=3n'); - st.equal( - qs.stringify({ a: [three] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), - 'a[]=3' - ); - st.equal( - qs.stringify({ a: [three] }, { encodeValuesOnly: true, encoder: encodeWithN, arrayFormat: 'brackets' }), - 'a[]=3n' - ); - st.end(); - }); - - t.test('encodes dot in key of object when encodeDotInKeys and allowDots is provided', function (st) { - st.equal( - qs.stringify( - { 'name.obj': { first: 'John', last: 'Doe' } }, - { allowDots: false, encodeDotInKeys: false } - ), - 'name.obj%5Bfirst%5D=John&name.obj%5Blast%5D=Doe', - 'with allowDots false and encodeDotInKeys false' - ); - st.equal( - qs.stringify( - { 'name.obj': { first: 'John', last: 'Doe' } }, - { allowDots: true, encodeDotInKeys: false } - ), - 'name.obj.first=John&name.obj.last=Doe', - 'with allowDots true and encodeDotInKeys false' - ); - st.equal( - qs.stringify( - { 'name.obj': { first: 'John', last: 'Doe' } }, - { allowDots: false, encodeDotInKeys: true } - ), - 'name%252Eobj%5Bfirst%5D=John&name%252Eobj%5Blast%5D=Doe', - 'with allowDots false and encodeDotInKeys true' - ); - st.equal( - qs.stringify( - { 'name.obj': { first: 'John', last: 'Doe' } }, - { allowDots: true, encodeDotInKeys: true } - ), - 'name%252Eobj.first=John&name%252Eobj.last=Doe', - 'with allowDots true and encodeDotInKeys true' - ); - - st.equal( - qs.stringify( - { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, - { allowDots: false, encodeDotInKeys: false } - ), - 'name.obj.subobject%5Bfirst.godly.name%5D=John&name.obj.subobject%5Blast%5D=Doe', - 'with allowDots false and encodeDotInKeys false' - ); - st.equal( - qs.stringify( - { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, - { allowDots: true, encodeDotInKeys: false } - ), - 'name.obj.subobject.first.godly.name=John&name.obj.subobject.last=Doe', - 'with allowDots false and encodeDotInKeys false' - ); - st.equal( - qs.stringify( - { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, - { allowDots: false, encodeDotInKeys: true } - ), - 'name%252Eobj%252Esubobject%5Bfirst.godly.name%5D=John&name%252Eobj%252Esubobject%5Blast%5D=Doe', - 'with allowDots false and encodeDotInKeys true' - ); - st.equal( - qs.stringify( - { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, - { allowDots: true, encodeDotInKeys: true } - ), - 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', - 'with allowDots true and encodeDotInKeys true' - ); - - st.end(); - }); - - t.test('should encode dot in key of object, and automatically set allowDots to `true` when encodeDotInKeys is true and allowDots in undefined', function (st) { - st.equal( - qs.stringify( - { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, - { encodeDotInKeys: true } - ), - 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', - 'with allowDots undefined and encodeDotInKeys true' - ); - st.end(); - }); - - t.test('should encode dot in key of object when encodeDotInKeys and allowDots is provided, and nothing else when encodeValuesOnly is provided', function (st) { - st.equal( - qs.stringify({ 'name.obj': { first: 'John', last: 'Doe' } }, { - encodeDotInKeys: true, allowDots: true, encodeValuesOnly: true - }), - 'name%2Eobj.first=John&name%2Eobj.last=Doe' - ); - - st.equal( - qs.stringify({ 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, { allowDots: true, encodeDotInKeys: true, encodeValuesOnly: true }), - 'name%2Eobj%2Esubobject.first%2Egodly%2Ename=John&name%2Eobj%2Esubobject.last=Doe' - ); - - st.end(); - }); - - t.test('throws when `commaRoundTrip` is not a boolean', function (st) { - st['throws']( - function () { qs.stringify({}, { commaRoundTrip: 'not a boolean' }); }, - TypeError, - 'throws when `commaRoundTrip` is not a boolean' - ); - - st.end(); - }); - - t.test('throws when `encodeDotInKeys` is not a boolean', function (st) { - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { encodeDotInKeys: 'foobar' }); }, - TypeError - ); - - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { encodeDotInKeys: 0 }); }, - TypeError - ); - - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { encodeDotInKeys: NaN }); }, - TypeError - ); - - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { encodeDotInKeys: null }); }, - TypeError - ); - - st.end(); - }); - - t.test('adds query prefix', function (st) { - st.equal(qs.stringify({ a: 'b' }, { addQueryPrefix: true }), '?a=b'); - st.end(); - }); - - t.test('with query prefix, outputs blank string given an empty object', function (st) { - st.equal(qs.stringify({}, { addQueryPrefix: true }), ''); - st.end(); - }); - - t.test('stringifies nested falsy values', function (st) { - st.equal(qs.stringify({ a: { b: { c: null } } }), 'a%5Bb%5D%5Bc%5D='); - st.equal(qs.stringify({ a: { b: { c: null } } }, { strictNullHandling: true }), 'a%5Bb%5D%5Bc%5D'); - st.equal(qs.stringify({ a: { b: { c: false } } }), 'a%5Bb%5D%5Bc%5D=false'); - st.end(); - }); - - t.test('stringifies a nested object', function (st) { - st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); - st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e'); - st.end(); - }); - - t.test('`allowDots` option: stringifies a nested object with dots notation', function (st) { - st.equal(qs.stringify({ a: { b: 'c' } }, { allowDots: true }), 'a.b=c'); - st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true }), 'a.b.c.d=e'); - st.end(); - }); - - t.test('stringifies an array value', function (st) { - st.equal( - qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'indices' }), - 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d', - 'indices => indices' - ); - st.equal( - qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'brackets' }), - 'a%5B%5D=b&a%5B%5D=c&a%5B%5D=d', - 'brackets => brackets' - ); - st.equal( - qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'comma' }), - 'a=b%2Cc%2Cd', - 'comma => comma' - ); - st.equal( - qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'comma', commaRoundTrip: true }), - 'a=b%2Cc%2Cd', - 'comma round trip => comma' - ); - st.equal( - qs.stringify({ a: ['b', 'c', 'd'] }), - 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d', - 'default => indices' - ); - st.end(); - }); - - t.test('`skipNulls` option', function (st) { - st.equal( - qs.stringify({ a: 'b', c: null }, { skipNulls: true }), - 'a=b', - 'omits nulls when asked' - ); - - st.equal( - qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), - 'a%5Bb%5D=c', - 'omits nested nulls when asked' - ); - - st.end(); - }); - - t.test('omits array indices when asked', function (st) { - st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d'); - - st.end(); - }); - - t.test('omits object key/value pair when value is empty array', function (st) { - st.equal(qs.stringify({ a: [], b: 'zz' }), 'b=zz'); - - st.end(); - }); - - t.test('should not omit object key/value pair when value is empty array and when asked', function (st) { - st.equal(qs.stringify({ a: [], b: 'zz' }), 'b=zz'); - st.equal(qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: false }), 'b=zz'); - st.equal(qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: true }), 'a[]&b=zz'); - - st.end(); - }); - - t.test('should throw when allowEmptyArrays is not of type boolean', function (st) { - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: 'foobar' }); }, - TypeError - ); - - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: 0 }); }, - TypeError - ); - - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: NaN }); }, - TypeError - ); - - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: null }); }, - TypeError - ); - - st.end(); - }); - - t.test('allowEmptyArrays + strictNullHandling', function (st) { - st.equal( - qs.stringify( - { testEmptyArray: [] }, - { strictNullHandling: true, allowEmptyArrays: true } - ), - 'testEmptyArray[]' - ); - - st.end(); - }); - - t.test('stringifies an array value with one item vs multiple items', function (st) { - st.test('non-array item', function (s2t) { - s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a=c'); - s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a=c'); - s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c'); - s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true }), 'a=c'); - - s2t.end(); - }); - - st.test('array with a single item', function (s2t) { - s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[0]=c'); - s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=c'); - s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c'); - s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'comma', commaRoundTrip: true }), 'a[]=c'); // so it parses back as an array - s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true }), 'a[0]=c'); - - s2t.end(); - }); - - st.test('array with multiple items', function (s2t) { - s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[0]=c&a[1]=d'); - s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=c&a[]=d'); - s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c,d'); - s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'comma', commaRoundTrip: true }), 'a=c,d'); - s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true }), 'a[0]=c&a[1]=d'); - - s2t.end(); - }); - - st.test('array with multiple items with a comma inside', function (s2t) { - s2t.equal(qs.stringify({ a: ['c,d', 'e'] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c%2Cd,e'); - s2t.equal(qs.stringify({ a: ['c,d', 'e'] }, { arrayFormat: 'comma' }), 'a=c%2Cd%2Ce'); - - s2t.equal(qs.stringify({ a: ['c,d', 'e'] }, { encodeValuesOnly: true, arrayFormat: 'comma', commaRoundTrip: true }), 'a=c%2Cd,e'); - s2t.equal(qs.stringify({ a: ['c,d', 'e'] }, { arrayFormat: 'comma', commaRoundTrip: true }), 'a=c%2Cd%2Ce'); - - s2t.end(); - }); - - st.end(); - }); - - t.test('stringifies a nested array value', function (st) { - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[b][0]=c&a[b][1]=d'); - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[b][]=c&a[b][]=d'); - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a[b]=c,d'); - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true }), 'a[b][0]=c&a[b][1]=d'); - st.end(); - }); - - t.test('stringifies comma and empty array values', function (st) { - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: false, arrayFormat: 'indices' }), 'a[0]=,&a[1]=&a[2]=c,d%'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: false, arrayFormat: 'brackets' }), 'a[]=,&a[]=&a[]=c,d%'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: false, arrayFormat: 'comma' }), 'a=,,,c,d%'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: false, arrayFormat: 'repeat' }), 'a=,&a=&a=c,d%'); - - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[0]=%2C&a[1]=&a[2]=c%2Cd%25'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=%2C&a[]=&a[]=c%2Cd%25'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=%2C,,c%2Cd%25'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a=%2C&a=&a=c%2Cd%25'); - - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: false, arrayFormat: 'indices' }), 'a%5B0%5D=%2C&a%5B1%5D=&a%5B2%5D=c%2Cd%25'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: false, arrayFormat: 'brackets' }), 'a%5B%5D=%2C&a%5B%5D=&a%5B%5D=c%2Cd%25'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: false, arrayFormat: 'comma' }), 'a=%2C%2C%2Cc%2Cd%25'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: false, arrayFormat: 'repeat' }), 'a=%2C&a=&a=c%2Cd%25'); - - st.end(); - }); - - t.test('stringifies comma and empty non-array values', function (st) { - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'indices' }), 'a=,&b=&c=c,d%'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'brackets' }), 'a=,&b=&c=c,d%'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'comma' }), 'a=,&b=&c=c,d%'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'repeat' }), 'a=,&b=&c=c,d%'); - - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: true, arrayFormat: 'indices' }), 'a=%2C&b=&c=c%2Cd%25'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a=%2C&b=&c=c%2Cd%25'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=%2C&b=&c=c%2Cd%25'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a=%2C&b=&c=c%2Cd%25'); - - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: false, arrayFormat: 'indices' }), 'a=%2C&b=&c=c%2Cd%25'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: false, arrayFormat: 'brackets' }), 'a=%2C&b=&c=c%2Cd%25'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: false, arrayFormat: 'comma' }), 'a=%2C&b=&c=c%2Cd%25'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: false, arrayFormat: 'repeat' }), 'a=%2C&b=&c=c%2Cd%25'); - - st.end(); - }); - - t.test('stringifies a nested array value with dots notation', function (st) { - st.equal( - qs.stringify( - { a: { b: ['c', 'd'] } }, - { allowDots: true, encodeValuesOnly: true, arrayFormat: 'indices' } - ), - 'a.b[0]=c&a.b[1]=d', - 'indices: stringifies with dots + indices' - ); - st.equal( - qs.stringify( - { a: { b: ['c', 'd'] } }, - { allowDots: true, encodeValuesOnly: true, arrayFormat: 'brackets' } - ), - 'a.b[]=c&a.b[]=d', - 'brackets: stringifies with dots + brackets' - ); - st.equal( - qs.stringify( - { a: { b: ['c', 'd'] } }, - { allowDots: true, encodeValuesOnly: true, arrayFormat: 'comma' } - ), - 'a.b=c,d', - 'comma: stringifies with dots + comma' - ); - st.equal( - qs.stringify( - { a: { b: ['c', 'd'] } }, - { allowDots: true, encodeValuesOnly: true } - ), - 'a.b[0]=c&a.b[1]=d', - 'default: stringifies with dots + indices' - ); - st.end(); - }); - - t.test('stringifies an object inside an array', function (st) { - st.equal( - qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'indices', encodeValuesOnly: true }), - 'a[0][b]=c', - 'indices => indices' - ); - st.equal( - qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'repeat', encodeValuesOnly: true }), - 'a[b]=c', - 'repeat => repeat' - ); - st.equal( - qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'brackets', encodeValuesOnly: true }), - 'a[][b]=c', - 'brackets => brackets' - ); - st.equal( - qs.stringify({ a: [{ b: 'c' }] }, { encodeValuesOnly: true }), - 'a[0][b]=c', - 'default => indices' - ); - - st.equal( - qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'indices', encodeValuesOnly: true }), - 'a[0][b][c][0]=1', - 'indices => indices' - ); - st.equal( - qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'repeat', encodeValuesOnly: true }), - 'a[b][c]=1', - 'repeat => repeat' - ); - st.equal( - qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'brackets', encodeValuesOnly: true }), - 'a[][b][c][]=1', - 'brackets => brackets' - ); - st.equal( - qs.stringify({ a: [{ b: { c: [1] } }] }, { encodeValuesOnly: true }), - 'a[0][b][c][0]=1', - 'default => indices' - ); - - st.end(); - }); - - t.test('stringifies an array with mixed objects and primitives', function (st) { - st.equal( - qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), - 'a[0][b]=1&a[1]=2&a[2]=3', - 'indices => indices' - ); - st.equal( - qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), - 'a[][b]=1&a[]=2&a[]=3', - 'brackets => brackets' - ); - st.equal( - qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), - '???', - 'brackets => brackets', - { skip: 'TODO: figure out what this should do' } - ); - st.equal( - qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true }), - 'a[0][b]=1&a[1]=2&a[2]=3', - 'default => indices' - ); - - st.end(); - }); - - t.test('stringifies an object inside an array with dots notation', function (st) { - st.equal( - qs.stringify( - { a: [{ b: 'c' }] }, - { allowDots: true, encode: false, arrayFormat: 'indices' } - ), - 'a[0].b=c', - 'indices => indices' - ); - st.equal( - qs.stringify( - { a: [{ b: 'c' }] }, - { allowDots: true, encode: false, arrayFormat: 'brackets' } - ), - 'a[].b=c', - 'brackets => brackets' - ); - st.equal( - qs.stringify( - { a: [{ b: 'c' }] }, - { allowDots: true, encode: false } - ), - 'a[0].b=c', - 'default => indices' - ); - - st.equal( - qs.stringify( - { a: [{ b: { c: [1] } }] }, - { allowDots: true, encode: false, arrayFormat: 'indices' } - ), - 'a[0].b.c[0]=1', - 'indices => indices' - ); - st.equal( - qs.stringify( - { a: [{ b: { c: [1] } }] }, - { allowDots: true, encode: false, arrayFormat: 'brackets' } - ), - 'a[].b.c[]=1', - 'brackets => brackets' - ); - st.equal( - qs.stringify( - { a: [{ b: { c: [1] } }] }, - { allowDots: true, encode: false } - ), - 'a[0].b.c[0]=1', - 'default => indices' - ); - - st.end(); - }); - - t.test('does not omit object keys when indices = false', function (st) { - st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when indices=true', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when arrayFormat=indices', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses repeat notation for arrays when arrayFormat=repeat', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c'); - st.end(); - }); - - t.test('uses brackets notation for arrays when arrayFormat=brackets', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c'); - st.end(); - }); - - t.test('stringifies a complicated object', function (st) { - st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e'); - st.end(); - }); - - t.test('stringifies an empty value', function (st) { - st.equal(qs.stringify({ a: '' }), 'a='); - st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a'); - - st.equal(qs.stringify({ a: '', b: '' }), 'a=&b='); - st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b='); - - st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D='); - st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D'); - st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D='); - - st.end(); - }); - - t.test('stringifies an empty array in different arrayFormat', function (st) { - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false }), 'b[0]=&c=c'); - // arrayFormat default - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices' }), 'b[0]=&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets' }), 'b[]=&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat' }), 'b=&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma' }), 'b=&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', commaRoundTrip: true }), 'b[]=&c=c'); - // with strictNullHandling - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices', strictNullHandling: true }), 'b[0]&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets', strictNullHandling: true }), 'b[]&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat', strictNullHandling: true }), 'b&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', strictNullHandling: true }), 'b&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', strictNullHandling: true, commaRoundTrip: true }), 'b[]&c=c'); - // with skipNulls - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices', skipNulls: true }), 'c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets', skipNulls: true }), 'c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat', skipNulls: true }), 'c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', skipNulls: true }), 'c=c'); - - st.end(); - }); - - t.test('does not crash on null/undefined entries in arrayFormat=comma with encodeValuesOnly', function (st) { - st.doesNotThrow( - function () { qs.stringify({ a: [null, 'b'] }, { arrayFormat: 'comma', encodeValuesOnly: true }); }, - 'does not pass a raw null array entry to the encoder' - ); - st.doesNotThrow( - function () { qs.stringify({ a: [undefined, 'b'] }, { arrayFormat: 'comma', encodeValuesOnly: true }); }, - 'does not pass a raw undefined array entry to the encoder' - ); - st.doesNotThrow( - function () { qs.stringify({ a: [null] }, { arrayFormat: 'comma', encodeValuesOnly: true }); }, - 'does not crash on a single-null array' - ); - - st.equal( - qs.stringify({ a: [null, 'b'] }, { arrayFormat: 'comma', encodeValuesOnly: true }), - 'a=,b', - 'null entry joins as empty, comma stays unencoded under encodeValuesOnly' - ); - st.equal( - qs.stringify({ a: [undefined, 'b'] }, { arrayFormat: 'comma', encodeValuesOnly: true }), - 'a=,b', - 'undefined entry joins as empty, comma stays unencoded under encodeValuesOnly' - ); - st.equal( - qs.stringify({ a: [null] }, { arrayFormat: 'comma', encodeValuesOnly: true }), - 'a=', - 'single-null array stringifies as empty value' - ); - st.equal( - qs.stringify({ a: [null] }, { arrayFormat: 'comma', encodeValuesOnly: true, strictNullHandling: true }), - 'a', - 'strictNullHandling drops the equals sign for a single-null array' - ); - st.equal( - qs.stringify({ a: [null] }, { arrayFormat: 'comma', encodeValuesOnly: true, skipNulls: true }), - '', - 'skipNulls drops a single-null array entirely' - ); - - st.end(); - }); - - t.test('stringifies a null object', { skip: !hasProto }, function (st) { - st.equal(qs.stringify({ __proto__: null, a: 'b' }), 'a=b'); - st.end(); - }); - - t.test('returns an empty string for invalid input', function (st) { - st.equal(qs.stringify(undefined), ''); - st.equal(qs.stringify(false), ''); - st.equal(qs.stringify(null), ''); - st.equal(qs.stringify(''), ''); - st.end(); - }); - - t.test('stringifies an object with a null object as a child', { skip: !hasProto }, function (st) { - st.equal(qs.stringify({ a: { __proto__: null, b: 'c' } }), 'a%5Bb%5D=c'); - st.end(); - }); - - t.test('drops keys with a value of undefined', function (st) { - st.equal(qs.stringify({ a: undefined }), ''); - - st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D'); - st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D='); - st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D='); - st.end(); - }); - - t.test('url encodes values', function (st) { - st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); - st.end(); - }); - - t.test('stringifies a date', function (st) { - var now = new Date(); - var str = 'a=' + encodeURIComponent(now.toISOString()); - st.equal(qs.stringify({ a: now }), str); - st.end(); - }); - - t.test('stringifies the weird object from qs', function (st) { - st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F'); - st.end(); - }); - - t.test('skips properties that are part of the object prototype', function (st) { - st.intercept(Object.prototype, 'crash', { value: 'test' }); - - st.equal(qs.stringify({ a: 'b' }), 'a=b'); - st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); - - st.end(); - }); - - t.test('stringifies boolean values', function (st) { - st.equal(qs.stringify({ a: true }), 'a=true'); - st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true'); - st.equal(qs.stringify({ b: false }), 'b=false'); - st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false'); - st.end(); - }); - - t.test('stringifies buffer values', function (st) { - st.equal(qs.stringify({ a: SaferBuffer.from('test') }), 'a=test'); - st.equal(qs.stringify({ a: { b: SaferBuffer.from('test') } }), 'a%5Bb%5D=test'); - st.end(); - }); - - t.test('stringifies an object using an alternative delimiter', function (st) { - st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); - st.end(); - }); - - t.test('does not blow up when Buffer global is missing', function (st) { - var restore = mockProperty(global, 'Buffer', { 'delete': true }); - - var result = qs.stringify({ a: 'b', c: 'd' }); - - restore(); - - st.equal(result, 'a=b&c=d'); - st.end(); - }); - - t.test('does not crash when parsing circular references', function (st) { - var a = {}; - a.b = a; - - st['throws']( - function () { qs.stringify({ 'foo[bar]': 'baz', 'foo[baz]': a }); }, - /RangeError: Cyclic object value/, - 'cyclic values throw' - ); - - var circular = { - a: 'value' - }; - circular.a = circular; - st['throws']( - function () { qs.stringify(circular); }, - /RangeError: Cyclic object value/, - 'cyclic values throw' - ); - - var arr = ['a']; - st.doesNotThrow( - function () { qs.stringify({ x: arr, y: arr }); }, - 'non-cyclic values do not throw' - ); - - st.end(); - }); - - t.test('non-circular duplicated references can still work', function (st) { - var hourOfDay = { - 'function': 'hour_of_day' - }; - - var p1 = { - 'function': 'gte', - arguments: [hourOfDay, 0] - }; - var p2 = { - 'function': 'lte', - arguments: [hourOfDay, 23] - }; - - st.equal( - qs.stringify({ filters: { $and: [p1, p2] } }, { encodeValuesOnly: true, arrayFormat: 'indices' }), - 'filters[$and][0][function]=gte&filters[$and][0][arguments][0][function]=hour_of_day&filters[$and][0][arguments][1]=0&filters[$and][1][function]=lte&filters[$and][1][arguments][0][function]=hour_of_day&filters[$and][1][arguments][1]=23' - ); - st.equal( - qs.stringify({ filters: { $and: [p1, p2] } }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), - 'filters[$and][][function]=gte&filters[$and][][arguments][][function]=hour_of_day&filters[$and][][arguments][]=0&filters[$and][][function]=lte&filters[$and][][arguments][][function]=hour_of_day&filters[$and][][arguments][]=23' - ); - st.equal( - qs.stringify({ filters: { $and: [p1, p2] } }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), - 'filters[$and][function]=gte&filters[$and][arguments][function]=hour_of_day&filters[$and][arguments]=0&filters[$and][function]=lte&filters[$and][arguments][function]=hour_of_day&filters[$and][arguments]=23' - ); - - st.end(); - }); - - t.test('selects properties when filter=array', function (st) { - st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b'); - st.equal(qs.stringify({ a: 1 }, { filter: [] }), ''); - - st.equal( - qs.stringify( - { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, - { filter: ['a', 'b', 0, 2], arrayFormat: 'indices' } - ), - 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3', - 'indices => indices' - ); - st.equal( - qs.stringify( - { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, - { filter: ['a', 'b', 0, 2], arrayFormat: 'brackets' } - ), - 'a%5Bb%5D%5B%5D=1&a%5Bb%5D%5B%5D=3', - 'brackets => brackets' - ); - st.equal( - qs.stringify( - { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, - { filter: ['a', 'b', 0, 2] } - ), - 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3', - 'default => indices' - ); - - st.end(); - }); - - t.test('skips null/undefined entries in filter=array', function (st) { - st.doesNotThrow( - function () { qs.stringify({ a: 'b', undefined: 'x' }, { filter: ['a', undefined] }); }, - 'does not pass a raw undefined filter entry to the encoder' - ); - st.doesNotThrow( - function () { qs.stringify({ a: 'b', 'null': 'x' }, { filter: ['a', null] }); }, - 'does not pass a raw null filter entry to the encoder' - ); - - st.equal( - qs.stringify({ a: 'b', undefined: 'x', c: 'd' }, { filter: ['a', undefined, 'c'] }), - 'a=b&c=d', - 'undefined filter entry is skipped, remaining keys are kept' - ); - st.equal( - qs.stringify({ a: 'b', 'null': 'x', c: 'd' }, { filter: ['a', null, 'c'] }), - 'a=b&c=d', - 'null filter entry is skipped, remaining keys are kept' - ); - st.equal( - qs.stringify({ a: 'b', 'null': 'x' }, { filter: [null] }), - '', - 'filter array containing only null yields empty string' - ); - - st.end(); - }); - - t.test('supports custom representations when filter=function', function (st) { - var calls = 0; - var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } }; - var filterFunc = function (prefix, value) { - calls += 1; - if (calls === 1) { - st.equal(prefix, '', 'prefix is empty'); - st.equal(value, obj); - } else if (prefix === 'c') { - return void 0; - } else if (value instanceof Date) { - st.equal(prefix, 'e[f]'); - return value.getTime(); - } - return value; - }; - - st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000'); - st.equal(calls, 5); - st.end(); - }); - - t.test('can disable uri encoding', function (st) { - st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b'); - st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c'); - st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c'); - st.end(); - }); - - t.test('can sort the keys', function (st) { - var sort = function (a, b) { - return a.localeCompare(b); - }; - st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y'); - st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a'); - st.end(); - }); - - t.test('can sort the keys at depth 3 or more too', function (st) { - var sort = function (a, b) { - return a.localeCompare(b); - }; - st.equal( - qs.stringify( - { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' }, - { sort: sort, encode: false } - ), - 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb' - ); - st.equal( - qs.stringify( - { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' }, - { sort: null, encode: false } - ), - 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b' - ); - st.end(); - }); - - t.test('can stringify with custom encoding', function (st) { - st.equal(qs.stringify({ 県: '大阪府', '': '' }, { - encoder: function (str) { - if (str.length === 0) { - return ''; - } - var buf = iconv.encode(str, 'shiftjis'); - var result = []; - for (var i = 0; i < buf.length; ++i) { - result.push(buf.readUInt8(i).toString(16)); - } - return '%' + result.join('%'); - } - }), '%8c%a7=%91%e5%8d%e3%95%7b&='); - st.end(); - }); - - t.test('receives the default encoder as a second argument', function (st) { - st.plan(8); - - qs.stringify({ a: 1, b: new Date(), c: true, d: [1] }, { - encoder: function (str) { - st.match(typeof str, /^(?:string|number|boolean)$/); - return ''; - } - }); - - st.end(); - }); - - t.test('receives the default encoder as a second argument', function (st) { - st.plan(2); - - qs.stringify({ a: 1 }, { - encoder: function (str, defaultEncoder) { - st.equal(defaultEncoder, utils.encode); - } - }); - - st.end(); - }); - - t.test('throws error with wrong encoder', function (st) { - st['throws'](function () { - qs.stringify({}, { encoder: 'string' }); - }, new TypeError('Encoder has to be a function.')); - st.end(); - }); - - t.test('can use custom encoder for a buffer object', { skip: typeof Buffer === 'undefined' }, function (st) { - st.equal(qs.stringify({ a: SaferBuffer.from([1]) }, { - encoder: function (buffer) { - if (typeof buffer === 'string') { - return buffer; - } - return String.fromCharCode(buffer.readUInt8(0) + 97); - } - }), 'a=b'); - - st.equal(qs.stringify({ a: SaferBuffer.from('a b') }, { - encoder: function (buffer) { - return buffer; - } - }), 'a=a b'); - st.end(); - }); - - t.test('serializeDate option', function (st) { - var date = new Date(); - st.equal( - qs.stringify({ a: date }), - 'a=' + date.toISOString().replace(/:/g, '%3A'), - 'default is toISOString' - ); - - var mutatedDate = new Date(); - mutatedDate.toISOString = function () { - throw new SyntaxError(); - }; - st['throws'](function () { - mutatedDate.toISOString(); - }, SyntaxError); - st.equal( - qs.stringify({ a: mutatedDate }), - 'a=' + Date.prototype.toISOString.call(mutatedDate).replace(/:/g, '%3A'), - 'toISOString works even when method is not locally present' - ); - - var specificDate = new Date(6); - st.equal( - qs.stringify( - { a: specificDate }, - { serializeDate: function (d) { return d.getTime() * 7; } } - ), - 'a=42', - 'custom serializeDate function called' - ); - - st.equal( - qs.stringify( - { a: [date] }, - { - serializeDate: function (d) { return d.getTime(); }, - arrayFormat: 'comma' - } - ), - 'a=' + date.getTime(), - 'works with arrayFormat comma' - ); - st.equal( - qs.stringify( - { a: [date] }, - { - serializeDate: function (d) { return d.getTime(); }, - arrayFormat: 'comma', - commaRoundTrip: true - } - ), - 'a%5B%5D=' + date.getTime(), - 'works with arrayFormat comma' - ); - - st.end(); - }); - - t.test('RFC 1738 serialization', function (st) { - st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC1738 }), 'a=b+c'); - st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC1738 }), 'a+b=c+d'); - st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC1738 }), 'a+b=a+b'); - - st.equal(qs.stringify({ 'foo(ref)': 'bar' }, { format: qs.formats.RFC1738 }), 'foo(ref)=bar'); - - st.end(); - }); - - t.test('RFC 3986 spaces serialization', function (st) { - st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC3986 }), 'a=b%20c'); - st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC3986 }), 'a%20b=c%20d'); - st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC3986 }), 'a%20b=a%20b'); - - st.end(); - }); - - t.test('Backward compatibility to RFC 3986', function (st) { - st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); - st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }), 'a%20b=a%20b'); - - st.end(); - }); - - t.test('Edge cases and unknown formats', function (st) { - ['UFO1234', false, 1234, null, {}, []].forEach(function (format) { - st['throws']( - function () { - qs.stringify({ a: 'b c' }, { format: format }); - }, - new TypeError('Unknown format option provided.') - ); - }); - st.end(); - }); - - t.test('encodeValuesOnly', function (st) { - st.equal( - qs.stringify( - { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, - { encodeValuesOnly: true, arrayFormat: 'indices' } - ), - 'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h', - 'encodeValuesOnly + indices' - ); - st.equal( - qs.stringify( - { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, - { encodeValuesOnly: true, arrayFormat: 'brackets' } - ), - 'a=b&c[]=d&c[]=e%3Df&f[][]=g&f[][]=h', - 'encodeValuesOnly + brackets' - ); - st.equal( - qs.stringify( - { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, - { encodeValuesOnly: true, arrayFormat: 'repeat' } - ), - 'a=b&c=d&c=e%3Df&f=g&f=h', - 'encodeValuesOnly + repeat' - ); - - st.equal( - qs.stringify( - { a: 'b', c: ['d', 'e'], f: [['g'], ['h']] }, - { arrayFormat: 'indices' } - ), - 'a=b&c%5B0%5D=d&c%5B1%5D=e&f%5B0%5D%5B0%5D=g&f%5B1%5D%5B0%5D=h', - 'no encodeValuesOnly + indices' - ); - st.equal( - qs.stringify( - { a: 'b', c: ['d', 'e'], f: [['g'], ['h']] }, - { arrayFormat: 'brackets' } - ), - 'a=b&c%5B%5D=d&c%5B%5D=e&f%5B%5D%5B%5D=g&f%5B%5D%5B%5D=h', - 'no encodeValuesOnly + brackets' - ); - st.equal( - qs.stringify( - { a: 'b', c: ['d', 'e'], f: [['g'], ['h']] }, - { arrayFormat: 'repeat' } - ), - 'a=b&c=d&c=e&f=g&f=h', - 'no encodeValuesOnly + repeat' - ); - - st.end(); - }); - - t.test('encodeValuesOnly - strictNullHandling', function (st) { - st.equal( - qs.stringify( - { a: { b: null } }, - { encodeValuesOnly: true, strictNullHandling: true } - ), - 'a[b]' - ); - st.end(); - }); - - t.test('strictNullHandling: applies the formatter to the encoded key (RFC1738)', function (st) { - st.equal( - qs.stringify( - { 'a b': null, 'c d': 'e f' }, - { strictNullHandling: false, format: 'RFC1738' } - ), - 'a+b=&c+d=e+f', - 'without: as expected' - ); - - st.equal( - qs.stringify( - { 'a b': null, 'c d': 'e f' }, - { strictNullHandling: true, format: 'RFC1738' } - ), - 'a+b&c+d=e+f', - 'with: as expected' - ); - - st.end(); - }); - - t.test('throws if an invalid charset is specified', function (st) { - st['throws'](function () { - qs.stringify({ a: 'b' }, { charset: 'foobar' }); - }, new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined')); - st.end(); - }); - - t.test('respects a charset of iso-8859-1', function (st) { - st.equal(qs.stringify({ æ: 'æ' }, { charset: 'iso-8859-1' }), '%E6=%E6'); - st.end(); - }); - - t.test('encodes unrepresentable chars as numeric entities in iso-8859-1 mode', function (st) { - st.equal(qs.stringify({ a: '☺' }, { charset: 'iso-8859-1' }), 'a=%26%239786%3B'); - st.end(); - }); - - t.test('respects an explicit charset of utf-8 (the default)', function (st) { - st.equal(qs.stringify({ a: 'æ' }, { charset: 'utf-8' }), 'a=%C3%A6'); - st.end(); - }); - - t.test('`charsetSentinel` option', function (st) { - st.equal( - qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'utf-8' }), - 'utf8=%E2%9C%93&a=%C3%A6', - 'adds the right sentinel when instructed to and the charset is utf-8' - ); - - st.equal( - qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'iso-8859-1' }), - 'utf8=%26%2310003%3B&a=%E6', - 'adds the right sentinel when instructed to and the charset is iso-8859-1' - ); - - st.equal( - qs.stringify({ a: 1, b: 2 }, { charsetSentinel: true, delimiter: ';' }), - 'utf8=%E2%9C%93;a=1;b=2', - 'uses the configured delimiter after the sentinel' - ); - - st.end(); - }); - - t.test('does not mutate the options argument', function (st) { - var options = {}; - qs.stringify({}, options); - st.deepEqual(options, {}); - st.end(); - }); - - t.test('strictNullHandling works with custom filter', function (st) { - var filter = function (prefix, value) { - return value; - }; - - var options = { strictNullHandling: true, filter: filter }; - st.equal(qs.stringify({ key: null }, options), 'key'); - st.end(); - }); - - t.test('strictNullHandling works with null serializeDate', function (st) { - var serializeDate = function () { - return null; - }; - var options = { strictNullHandling: true, serializeDate: serializeDate }; - var date = new Date(); - st.equal(qs.stringify({ key: date }, options), 'key'); - st.end(); - }); - - t.test('allows for encoding keys and values differently', function (st) { - var encoder = function (str, defaultEncoder, charset, type) { - if (type === 'key') { - return defaultEncoder(str, defaultEncoder, charset, type).toLowerCase(); - } - if (type === 'value') { - return defaultEncoder(str, defaultEncoder, charset, type).toUpperCase(); - } - throw 'this should never happen! type: ' + type; - }; - - st.deepEqual(qs.stringify({ KeY: 'vAlUe' }, { encoder: encoder }), 'key=VALUE'); - - var noopEncoder = function () { return 'x'; }; - noopEncoder(); - st['throws']( - function () { encoder('x', noopEncoder, 'utf-8', 'unknown'); }, - 'this should never happen! type: unknown', - 'encoder throws for unexpected type' - ); - - st.end(); - }); - - t.test('objects inside arrays', function (st) { - var obj = { a: { b: { c: 'd', e: 'f' } } }; - var withArray = { a: { b: [{ c: 'd', e: 'f' }] } }; - - st.equal(qs.stringify(obj, { encode: false }), 'a[b][c]=d&a[b][e]=f', 'no array, no arrayFormat'); - st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'brackets' }), 'a[b][c]=d&a[b][e]=f', 'no array, bracket'); - st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'indices' }), 'a[b][c]=d&a[b][e]=f', 'no array, indices'); - st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'repeat' }), 'a[b][c]=d&a[b][e]=f', 'no array, repeat'); - st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'comma' }), 'a[b][c]=d&a[b][e]=f', 'no array, comma'); - - st.equal(qs.stringify(withArray, { encode: false }), 'a[b][0][c]=d&a[b][0][e]=f', 'array, no arrayFormat'); - st.equal(qs.stringify(withArray, { encode: false, arrayFormat: 'brackets' }), 'a[b][][c]=d&a[b][][e]=f', 'array, bracket'); - st.equal(qs.stringify(withArray, { encode: false, arrayFormat: 'indices' }), 'a[b][0][c]=d&a[b][0][e]=f', 'array, indices'); - st.equal(qs.stringify(withArray, { encode: false, arrayFormat: 'repeat' }), 'a[b][c]=d&a[b][e]=f', 'array, repeat'); - st.equal( - qs.stringify(withArray, { encode: false, arrayFormat: 'comma' }), - '???', - 'array, comma', - { skip: 'TODO: figure out what this should do' } - ); - - st.end(); - }); - - t.test('stringifies sparse arrays', function (st) { - /* eslint no-sparse-arrays: 0 */ - st.equal(qs.stringify({ a: [, '2', , , '1'] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[1]=2&a[4]=1'); - st.equal(qs.stringify({ a: [, '2', , , '1'] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=2&a[]=1'); - st.equal(qs.stringify({ a: [, '2', , , '1'] }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a=2&a=1'); - - st.equal(qs.stringify({ a: [, { b: [, , { c: '1' }] }] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[1][b][2][c]=1'); - st.equal(qs.stringify({ a: [, { b: [, , { c: '1' }] }] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[][b][][c]=1'); - st.equal(qs.stringify({ a: [, { b: [, , { c: '1' }] }] }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a[b][c]=1'); - - st.equal(qs.stringify({ a: [, [, , [, , , { c: '1' }]]] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[1][2][3][c]=1'); - st.equal(qs.stringify({ a: [, [, , [, , , { c: '1' }]]] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[][][][c]=1'); - st.equal(qs.stringify({ a: [, [, , [, , , { c: '1' }]]] }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a[c]=1'); - - st.equal(qs.stringify({ a: [, [, , [, , , { c: [, '1'] }]]] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[1][2][3][c][1]=1'); - st.equal(qs.stringify({ a: [, [, , [, , , { c: [, '1'] }]]] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[][][][c][]=1'); - st.equal(qs.stringify({ a: [, [, , [, , , { c: [, '1'] }]]] }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a[c]=1'); - - st.end(); - }); - - t.test('encodes a very long string', function (st) { - var chars = []; - var expected = []; - for (var i = 0; i < 5e3; i++) { - chars.push(' ' + i); - - expected.push('%20' + i); - } - - var obj = { - foo: chars.join('') - }; - - st.equal( - qs.stringify(obj, { arrayFormat: 'brackets', charset: 'utf-8' }), - 'foo=' + expected.join('') - ); - - st.end(); - }); - - t.end(); -}); - -test('stringifies empty keys', function (t) { - emptyTestCases.forEach(function (testCase) { - t.test('stringifies an object with empty string key with ' + testCase.input, function (st) { - st.deepEqual( - qs.stringify(testCase.withEmptyKeys, { encode: false, arrayFormat: 'indices' }), - testCase.stringifyOutput.indices, - 'test case: ' + testCase.input + ', indices' - ); - st.deepEqual( - qs.stringify(testCase.withEmptyKeys, { encode: false, arrayFormat: 'brackets' }), - testCase.stringifyOutput.brackets, - 'test case: ' + testCase.input + ', brackets' - ); - st.deepEqual( - qs.stringify(testCase.withEmptyKeys, { encode: false, arrayFormat: 'repeat' }), - testCase.stringifyOutput.repeat, - 'test case: ' + testCase.input + ', repeat' - ); - - st.end(); - }); - }); - - t.test('edge case with object/arrays', function (st) { - st.deepEqual(qs.stringify({ '': { '': [2, 3] } }, { encode: false }), '[][0]=2&[][1]=3'); - st.deepEqual(qs.stringify({ '': { '': [2, 3], a: 2 } }, { encode: false }), '[][0]=2&[][1]=3&[a]=2'); - st.deepEqual(qs.stringify({ '': { '': [2, 3] } }, { encode: false, arrayFormat: 'indices' }), '[][0]=2&[][1]=3'); - st.deepEqual(qs.stringify({ '': { '': [2, 3], a: 2 } }, { encode: false, arrayFormat: 'indices' }), '[][0]=2&[][1]=3&[a]=2'); - - st.end(); - }); - - t.test('stringifies non-string keys', function (st) { - var S = Object('abc'); - S.toString = function () { - return 'd'; - }; - var actual = qs.stringify({ a: 'b', 'false': {}, 1e+22: 'c', d: 'e' }, { - filter: ['a', false, null, 10000000000000000000000, S], - allowDots: true, - encodeDotInKeys: true - }); - - st.equal(actual, 'a=b&1e%2B22=c&d=e', 'stringifies correctly'); - - st.end(); - }); - - t.test('round-trips keys containing percent-encoded bracket text', function (st) { - var cases = [ - { 'a%5Bb': 'c' }, - { 'a%5Db': 'c' }, - { 'a%255Bb': 'c' }, - { 'a%255Db': 'c' }, - { a: { 'b%5Bc': 'd' } }, - { a: { 'b%255Bc': 'd' } }, - { 'a%5B%255Bb': 'c' } - ]; - for (var i = 0; i < cases.length; i++) { - st.deepEqual( - qs.parse(qs.stringify(cases[i])), - cases[i], - 'round-trips ' + JSON.stringify(cases[i]) - ); - } - - st.end(); - }); - - t.test('parses input containing percent-encoded bracket text without mangling', function (st) { - st.deepEqual(qs.parse('a%25255Bb=c'), { 'a%255Bb': 'c' }, 'a%25255Bb decodes to a%255Bb, not a%5Bb'); - st.deepEqual(qs.parse('a%25255Db=c'), { 'a%255Db': 'c' }, 'a%25255Db decodes to a%255Db, not a%5Db'); - st.deepEqual(qs.parse('a%5Bb%25255Bc%5D=d'), { a: { 'b%255Bc': 'd' } }, 'nested %25255B decodes to %255B inside segment, not %5B'); - - st.end(); - }); -}); diff --git a/node_modules/qs/test/utils.js b/node_modules/qs/test/utils.js deleted file mode 100644 index 049c010..0000000 --- a/node_modules/qs/test/utils.js +++ /dev/null @@ -1,432 +0,0 @@ -'use strict'; - -var test = require('tape'); -var inspect = require('object-inspect'); -var SaferBuffer = require('safer-buffer').Buffer; -var forEach = require('for-each'); -var v = require('es-value-fixtures'); - -var utils = require('../lib/utils'); - -test('merge()', function (t) { - t.deepEqual(utils.merge(null, true), [null, true], 'merges true into null'); - - t.deepEqual(utils.merge(null, [42]), [null, 42], 'merges null into an array'); - - t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key'); - - var oneMerged = utils.merge({ foo: 'bar' }, { foo: { first: '123' } }); - t.deepEqual(oneMerged, { foo: ['bar', { first: '123' }] }, 'merges a standalone and an object into an array'); - - var twoMerged = utils.merge({ foo: ['bar', { first: '123' }] }, { foo: { second: '456' } }); - t.deepEqual(twoMerged, { foo: { 0: 'bar', 1: { first: '123' }, second: '456' } }, 'merges a standalone and two objects into an array'); - - var sandwiched = utils.merge({ foo: ['bar', { first: '123', second: '456' }] }, { foo: 'baz' }); - t.deepEqual(sandwiched, { foo: ['bar', { first: '123', second: '456' }, 'baz'] }, 'merges an object sandwiched by two standalones into an array'); - - var nestedArrays = utils.merge({ foo: ['baz'] }, { foo: ['bar', 'xyzzy'] }); - t.deepEqual(nestedArrays, { foo: ['baz', 'bar', 'xyzzy'] }); - - var noOptionsNonObjectSource = utils.merge({ foo: 'baz' }, 'bar'); - t.deepEqual(noOptionsNonObjectSource, { foo: 'baz', bar: true }); - - var func = function f() {}; - func(); - t.deepEqual( - utils.merge(func, { foo: 'bar' }), - [func, { foo: 'bar' }], - 'functions can not be merged into' - ); - - func.bar = 'baz'; - t.deepEqual( - utils.merge({ foo: 'bar' }, func), - { foo: 'bar', bar: 'baz' }, - 'functions can be merge sources' - ); - - t.test( - 'avoids invoking array setters unnecessarily', - { skip: typeof Object.defineProperty !== 'function' }, - function (st) { - var setCount = 0; - var getCount = 0; - var observed = []; - Object.defineProperty(observed, 0, { - get: function () { - getCount += 1; - return { bar: 'baz' }; - }, - set: function () { setCount += 1; } - }); - utils.merge(observed, [null]); - st.equal(setCount, 0); - st.equal(getCount, 1); - observed[0] = observed[0]; // eslint-disable-line no-self-assign - st.equal(setCount, 1); - st.equal(getCount, 2); - st.end(); - } - ); - - t.test('with overflow objects (from arrayLimit)', function (st) { - // arrayLimit is max index, so with limit 0, max index 0 is allowed (1 element) - // To create overflow, need 2+ elements with limit 0, or 3+ with limit 1, etc. - st.test('merges primitive into overflow object at next index', function (s2t) { - // Create an overflow object via combine: 3 elements (indices 0-2) with limit 0 - var overflow = utils.combine(['a', 'b'], 'c', 0, false); - s2t.ok(utils.isOverflow(overflow), 'overflow object is marked'); - var merged = utils.merge(overflow, 'd'); - s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'adds primitive at next numeric index'); - s2t.end(); - }); - - st.test('merges primitive into regular object with numeric keys normally', function (s2t) { - var obj = { 0: 'a', 1: 'b' }; - s2t.notOk(utils.isOverflow(obj), 'plain object is not marked as overflow'); - var merged = utils.merge(obj, 'c'); - s2t.deepEqual(merged, { 0: 'a', 1: 'b', c: true }, 'adds primitive as key (not at next index)'); - s2t.end(); - }); - - st.test('merges primitive into object with non-numeric keys normally', function (s2t) { - var obj = { foo: 'bar' }; - var merged = utils.merge(obj, 'baz'); - s2t.deepEqual(merged, { foo: 'bar', baz: true }, 'adds primitive as key with value true'); - s2t.end(); - }); - - st.test('with strictMerge, wraps object and primitive in array', function (s2t) { - var obj = { foo: 'bar' }; - var merged = utils.merge(obj, 'baz', { strictMerge: true }); - s2t.deepEqual(merged, [{ foo: 'bar' }, 'baz'], 'wraps in array with strictMerge'); - s2t.end(); - }); - - st.test('merges overflow object into primitive', function (s2t) { - // Create an overflow object via combine: 2 elements (indices 0-1) with limit 0 - var overflow = utils.combine(['a'], 'b', 0, false); - s2t.ok(utils.isOverflow(overflow), 'overflow object is marked'); - var merged = utils.merge('c', overflow); - s2t.ok(utils.isOverflow(merged), 'result is also marked as overflow'); - s2t.deepEqual(merged, { 0: 'c', 1: 'a', 2: 'b' }, 'creates object with primitive at 0, source values shifted'); - s2t.end(); - }); - - st.test('merges overflow object into primitive with plainObjects', function (s2t) { - var overflow = utils.combine(['a'], 'b', 0, false); - s2t.ok(utils.isOverflow(overflow), 'overflow object is marked'); - var merged = utils.merge('c', overflow, { plainObjects: true }); - s2t.ok(utils.isOverflow(merged), 'result is also marked as overflow'); - s2t.deepEqual(merged, { __proto__: null, 0: 'c', 1: 'a', 2: 'b' }, 'creates null-proto object with primitive at 0'); - s2t.end(); - }); - - st.test('merges overflow object with multiple values into primitive', function (s2t) { - // Create an overflow object via combine: 3 elements (indices 0-2) with limit 0 - var overflow = utils.combine(['b', 'c'], 'd', 0, false); - s2t.ok(utils.isOverflow(overflow), 'overflow object is marked'); - var merged = utils.merge('a', overflow); - s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'shifts all source indices by 1'); - s2t.end(); - }); - - st.test('merges regular object into primitive as array', function (s2t) { - var obj = { foo: 'bar' }; - var merged = utils.merge('a', obj); - s2t.deepEqual(merged, ['a', { foo: 'bar' }], 'creates array with primitive and object'); - s2t.end(); - }); - - st.test('merges primitive into array that exceeds arrayLimit', function (s2t) { - var arr = ['a', 'b', 'c']; - var merged = utils.merge(arr, 'd', { arrayLimit: 1 }); - s2t.ok(utils.isOverflow(merged), 'result is marked as overflow'); - s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'converts to overflow object with primitive appended'); - s2t.end(); - }); - - st.test('merges array into primitive that exceeds arrayLimit', function (s2t) { - var merged = utils.merge('a', ['b', 'c'], { arrayLimit: 1 }); - s2t.ok(utils.isOverflow(merged), 'result is marked as overflow'); - s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c' }, 'converts to overflow object'); - s2t.end(); - }); - - st.end(); - }); - - t.end(); -}); - -test('assign()', function (t) { - var target = { a: 1, b: 2 }; - var source = { b: 3, c: 4 }; - var result = utils.assign(target, source); - - t.equal(result, target, 'returns the target'); - t.deepEqual(target, { a: 1, b: 3, c: 4 }, 'target and source are merged'); - t.deepEqual(source, { b: 3, c: 4 }, 'source is untouched'); - - t.end(); -}); - -test('combine()', function (t) { - t.test('both arrays', function (st) { - var a = [1]; - var b = [2]; - var combined = utils.combine(a, b); - - st.deepEqual(a, [1], 'a is not mutated'); - st.deepEqual(b, [2], 'b is not mutated'); - st.notEqual(a, combined, 'a !== combined'); - st.notEqual(b, combined, 'b !== combined'); - st.deepEqual(combined, [1, 2], 'combined is a + b'); - - st.end(); - }); - - t.test('one array, one non-array', function (st) { - var aN = 1; - var a = [aN]; - var bN = 2; - var b = [bN]; - - var combinedAnB = utils.combine(aN, b); - st.deepEqual(b, [bN], 'b is not mutated'); - st.notEqual(aN, combinedAnB, 'aN + b !== aN'); - st.notEqual(a, combinedAnB, 'aN + b !== a'); - st.notEqual(bN, combinedAnB, 'aN + b !== bN'); - st.notEqual(b, combinedAnB, 'aN + b !== b'); - st.deepEqual([1, 2], combinedAnB, 'first argument is array-wrapped when not an array'); - - var combinedABn = utils.combine(a, bN); - st.deepEqual(a, [aN], 'a is not mutated'); - st.notEqual(aN, combinedABn, 'a + bN !== aN'); - st.notEqual(a, combinedABn, 'a + bN !== a'); - st.notEqual(bN, combinedABn, 'a + bN !== bN'); - st.notEqual(b, combinedABn, 'a + bN !== b'); - st.deepEqual([1, 2], combinedABn, 'second argument is array-wrapped when not an array'); - - st.end(); - }); - - t.test('neither is an array', function (st) { - var combined = utils.combine(1, 2); - st.notEqual(1, combined, '1 + 2 !== 1'); - st.notEqual(2, combined, '1 + 2 !== 2'); - st.deepEqual([1, 2], combined, 'both arguments are array-wrapped when not an array'); - - st.end(); - }); - - t.test('with arrayLimit', function (st) { - st.test('under the limit', function (s2t) { - var combined = utils.combine(['a', 'b'], 'c', 10, false); - s2t.deepEqual(combined, ['a', 'b', 'c'], 'returns array when under limit'); - s2t.ok(Array.isArray(combined), 'result is an array'); - s2t.end(); - }); - - st.test('exactly at the limit stays as array', function (s2t) { - var combined = utils.combine(['a', 'b'], 'c', 3, false); - s2t.deepEqual(combined, ['a', 'b', 'c'], 'stays as array when count equals limit'); - s2t.ok(Array.isArray(combined), 'result is an array'); - s2t.end(); - }); - - st.test('over the limit', function (s2t) { - var combined = utils.combine(['a', 'b', 'c'], 'd', 3, false); - s2t.deepEqual(combined, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'converts to object when over limit'); - s2t.notOk(Array.isArray(combined), 'result is not an array'); - s2t.end(); - }); - - st.test('with arrayLimit 1', function (s2t) { - var combined = utils.combine([], 'a', 1, false); - s2t.deepEqual(combined, ['a'], 'stays as array when count equals limit'); - s2t.ok(Array.isArray(combined), 'result is an array'); - s2t.end(); - }); - - st.test('with arrayLimit 0 converts single element to object', function (s2t) { - var combined = utils.combine([], 'a', 0, false); - s2t.deepEqual(combined, { 0: 'a' }, 'converts to object when count exceeds limit'); - s2t.notOk(Array.isArray(combined), 'result is not an array'); - s2t.end(); - }); - - st.test('with arrayLimit 0 and two elements converts to object', function (s2t) { - var combined = utils.combine(['a'], 'b', 0, false); - s2t.deepEqual(combined, { 0: 'a', 1: 'b' }, 'converts to object when count exceeds limit'); - s2t.notOk(Array.isArray(combined), 'result is not an array'); - s2t.end(); - }); - - st.test('with plainObjects option', function (s2t) { - var combined = utils.combine(['a', 'b'], 'c', 1, true); - var expected = { __proto__: null, 0: 'a', 1: 'b', 2: 'c' }; - s2t.deepEqual(combined, expected, 'converts to object with null prototype'); - s2t.equal(Object.getPrototypeOf(combined), null, 'result has null prototype when plainObjects is true'); - s2t.end(); - }); - - st.end(); - }); - - t.test('with existing overflow object', function (st) { - st.test('adds to existing overflow object at next index', function (s2t) { - // Create overflow object first via combine: 3 elements (indices 0-2) with limit 0 - var overflow = utils.combine(['a', 'b'], 'c', 0, false); - s2t.ok(utils.isOverflow(overflow), 'initial object is marked as overflow'); - - var combined = utils.combine(overflow, 'd', 10, false); - s2t.equal(combined, overflow, 'returns the same object (mutated)'); - s2t.deepEqual(combined, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'adds value at next numeric index'); - s2t.end(); - }); - - st.test('does not treat plain object with numeric keys as overflow', function (s2t) { - var plainObj = { 0: 'a', 1: 'b' }; - s2t.notOk(utils.isOverflow(plainObj), 'plain object is not marked as overflow'); - - // combine treats this as a regular value, not an overflow object to append to - var combined = utils.combine(plainObj, 'c', 10, false); - s2t.deepEqual(combined, [{ 0: 'a', 1: 'b' }, 'c'], 'concatenates as regular values'); - s2t.end(); - }); - - st.end(); - }); - - t.end(); -}); - -test('decode', function (t) { - t.equal( - utils.decode('a+b'), - 'a b', - 'decodes + to space' - ); - - t.equal( - utils.decode('name%2Eobj'), - 'name.obj', - 'decodes a string' - ); - t.equal( - utils.decode('name%2Eobj%2Efoo', null, 'iso-8859-1'), - 'name.obj.foo', - 'decodes a string in iso-8859-1' - ); - - t.end(); -}); - -test('encode', function (t) { - forEach(v.nullPrimitives, function (nullish) { - t['throws']( - function () { utils.encode(nullish); }, - TypeError, - inspect(nullish) + ' is not a string' - ); - }); - - t.equal(utils.encode(''), '', 'empty string returns itself'); - t.deepEqual(utils.encode([]), [], 'empty array returns itself'); - t.deepEqual(utils.encode({ length: 0 }), { length: 0 }, 'empty arraylike returns itself'); - - t.test('symbols', { skip: !v.hasSymbols }, function (st) { - st.equal(utils.encode(Symbol('x')), 'Symbol%28x%29', 'symbol is encoded'); - - st.end(); - }); - - t.equal( - utils.encode('(abc)'), - '%28abc%29', - 'encodes parentheses' - ); - t.equal( - utils.encode({ toString: function () { return '(abc)'; } }), - '%28abc%29', - 'toStrings and encodes parentheses' - ); - - t.equal( - utils.encode('abc 123 💩', null, 'iso-8859-1'), - 'abc%20123%20%26%2355357%3B%26%2356489%3B', - 'encodes in iso-8859-1' - ); - - var longString = ''; - var expectedString = ''; - for (var i = 0; i < 1500; i++) { - longString += ' '; - expectedString += '%20'; - } - - t.equal( - utils.encode(longString), - expectedString, - 'encodes a long string' - ); - - t.equal( - utils.encode('\x28\x29'), - '%28%29', - 'encodes parens normally' - ); - t.equal( - utils.encode('\x28\x29', null, null, null, 'RFC1738'), - '()', - 'does not encode parens in RFC1738' - ); - - // todo RFC1738 format - - t.equal( - utils.encode('Āက豈'), - '%C4%80%E1%80%80%EF%A4%80', - 'encodes multibyte chars' - ); - - t.equal( - utils.encode('\uD83D \uDCA9'), - '%F0%9F%90%A0%F0%BA%90%80', - 'encodes lone surrogates' - ); - - t.end(); -}); - -test('isBuffer()', function (t) { - var fn = function () {}; - fn(); - forEach([null, undefined, true, false, '', 'abc', 42, 0, NaN, {}, [], fn, /a/g], function (x) { - t.equal(utils.isBuffer(x), false, inspect(x) + ' is not a buffer'); - }); - - var fakeBuffer = { constructor: Buffer }; - t.equal(utils.isBuffer(fakeBuffer), false, 'fake buffer is not a buffer'); - - var saferBuffer = SaferBuffer.from('abc'); - t.equal(utils.isBuffer(saferBuffer), true, 'SaferBuffer instance is a buffer'); - - var buffer = SaferBuffer.from('abc'); - t.notEqual(saferBuffer, buffer, 'different buffer instances'); - t.equal(utils.isBuffer(buffer), true, 'another Buffer instance is a buffer'); - t.end(); -}); - -test('isRegExp()', function (t) { - t.equal(utils.isRegExp(/a/g), true, 'RegExp is a RegExp'); - t.equal(utils.isRegExp(new RegExp('a', 'g')), true, 'new RegExp is a RegExp'); - t.equal(utils.isRegExp(new Date()), false, 'Date is not a RegExp'); - - forEach(v.primitives, function (primitive) { - t.equal(utils.isRegExp(primitive), false, inspect(primitive) + ' is not a RegExp'); - }); - - t.end(); -}); diff --git a/node_modules/range-parser/HISTORY.md b/node_modules/range-parser/HISTORY.md deleted file mode 100644 index 70a973d..0000000 --- a/node_modules/range-parser/HISTORY.md +++ /dev/null @@ -1,56 +0,0 @@ -1.2.1 / 2019-05-10 -================== - - * Improve error when `str` is not a string - -1.2.0 / 2016-06-01 -================== - - * Add `combine` option to combine overlapping ranges - -1.1.0 / 2016-05-13 -================== - - * Fix incorrectly returning -1 when there is at least one valid range - * perf: remove internal function - -1.0.3 / 2015-10-29 -================== - - * perf: enable strict mode - -1.0.2 / 2014-09-08 -================== - - * Support Node.js 0.6 - -1.0.1 / 2014-09-07 -================== - - * Move repository to jshttp - -1.0.0 / 2013-12-11 -================== - - * Add repository to package.json - * Add MIT license - -0.0.4 / 2012-06-17 -================== - - * Change ret -1 for unsatisfiable and -2 when invalid - -0.0.3 / 2012-06-17 -================== - - * Fix last-byte-pos default to len - 1 - -0.0.2 / 2012-06-14 -================== - - * Add `.type` - -0.0.1 / 2012-06-11 -================== - - * Initial release diff --git a/node_modules/range-parser/LICENSE b/node_modules/range-parser/LICENSE deleted file mode 100644 index 3599954..0000000 --- a/node_modules/range-parser/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2012-2014 TJ Holowaychuk -Copyright (c) 2015-2016 Douglas Christopher Wilson - -```js -var parseRange = require('range-parser') -``` - -### parseRange(size, header, options) - -Parse the given `header` string where `size` is the maximum size of the resource. -An array of ranges will be returned or negative numbers indicating an error parsing. - - * `-2` signals a malformed header string - * `-1` signals an unsatisfiable range - - - -```js -// parse header from request -var range = parseRange(size, req.headers.range) - -// the type of the range -if (range.type === 'bytes') { - // the ranges - range.forEach(function (r) { - // do something with r.start and r.end - }) -} -``` - -#### Options - -These properties are accepted in the options object. - -##### combine - -Specifies if overlapping & adjacent ranges should be combined, defaults to `false`. -When `true`, ranges will be combined and returned as if they were specified that -way in the header. - - - -```js -parseRange(100, 'bytes=50-55,0-10,5-10,56-60', { combine: true }) -// => [ -// { start: 0, end: 10 }, -// { start: 50, end: 60 } -// ] -``` - -## License - -[MIT](LICENSE) - -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/range-parser/master -[coveralls-url]: https://coveralls.io/r/jshttp/range-parser?branch=master -[node-image]: https://badgen.net/npm/node/range-parser -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/range-parser -[npm-url]: https://npmjs.org/package/range-parser -[npm-version-image]: https://badgen.net/npm/v/range-parser -[travis-image]: https://badgen.net/travis/jshttp/range-parser/master -[travis-url]: https://travis-ci.org/jshttp/range-parser diff --git a/node_modules/range-parser/index.js b/node_modules/range-parser/index.js deleted file mode 100644 index b7dc5c0..0000000 --- a/node_modules/range-parser/index.js +++ /dev/null @@ -1,162 +0,0 @@ -/*! - * range-parser - * Copyright(c) 2012-2014 TJ Holowaychuk - * Copyright(c) 2015-2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = rangeParser - -/** - * Parse "Range" header `str` relative to the given file `size`. - * - * @param {Number} size - * @param {String} str - * @param {Object} [options] - * @return {Array} - * @public - */ - -function rangeParser (size, str, options) { - if (typeof str !== 'string') { - throw new TypeError('argument str must be a string') - } - - var index = str.indexOf('=') - - if (index === -1) { - return -2 - } - - // split the range string - var arr = str.slice(index + 1).split(',') - var ranges = [] - - // add ranges type - ranges.type = str.slice(0, index) - - // parse all ranges - for (var i = 0; i < arr.length; i++) { - var range = arr[i].split('-') - var start = parseInt(range[0], 10) - var end = parseInt(range[1], 10) - - // -nnn - if (isNaN(start)) { - start = size - end - end = size - 1 - // nnn- - } else if (isNaN(end)) { - end = size - 1 - } - - // limit last-byte-pos to current length - if (end > size - 1) { - end = size - 1 - } - - // invalid or unsatisifiable - if (isNaN(start) || isNaN(end) || start > end || start < 0) { - continue - } - - // add range - ranges.push({ - start: start, - end: end - }) - } - - if (ranges.length < 1) { - // unsatisifiable - return -1 - } - - return options && options.combine - ? combineRanges(ranges) - : ranges -} - -/** - * Combine overlapping & adjacent ranges. - * @private - */ - -function combineRanges (ranges) { - var ordered = ranges.map(mapWithIndex).sort(sortByRangeStart) - - for (var j = 0, i = 1; i < ordered.length; i++) { - var range = ordered[i] - var current = ordered[j] - - if (range.start > current.end + 1) { - // next range - ordered[++j] = range - } else if (range.end > current.end) { - // extend range - current.end = range.end - current.index = Math.min(current.index, range.index) - } - } - - // trim ordered array - ordered.length = j + 1 - - // generate combined range - var combined = ordered.sort(sortByRangeIndex).map(mapWithoutIndex) - - // copy ranges type - combined.type = ranges.type - - return combined -} - -/** - * Map function to add index value to ranges. - * @private - */ - -function mapWithIndex (range, index) { - return { - start: range.start, - end: range.end, - index: index - } -} - -/** - * Map function to remove index value from ranges. - * @private - */ - -function mapWithoutIndex (range) { - return { - start: range.start, - end: range.end - } -} - -/** - * Sort function to sort ranges by index. - * @private - */ - -function sortByRangeIndex (a, b) { - return a.index - b.index -} - -/** - * Sort function to sort ranges by start position. - * @private - */ - -function sortByRangeStart (a, b) { - return a.start - b.start -} diff --git a/node_modules/range-parser/package.json b/node_modules/range-parser/package.json deleted file mode 100644 index abea6d8..0000000 --- a/node_modules/range-parser/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "range-parser", - "author": "TJ Holowaychuk (http://tjholowaychuk.com)", - "description": "Range header field string parser", - "version": "1.2.1", - "contributors": [ - "Douglas Christopher Wilson ", - "James Wyatt Cready ", - "Jonathan Ong (http://jongleberry.com)" - ], - "license": "MIT", - "keywords": [ - "range", - "parser", - "http" - ], - "repository": "jshttp/range-parser", - "devDependencies": { - "deep-equal": "1.0.1", - "eslint": "5.16.0", - "eslint-config-standard": "12.0.0", - "eslint-plugin-markdown": "1.0.0", - "eslint-plugin-import": "2.17.2", - "eslint-plugin-node": "8.0.1", - "eslint-plugin-promise": "4.1.1", - "eslint-plugin-standard": "4.0.0", - "mocha": "6.1.4", - "nyc": "14.1.1" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "test-travis": "nyc --reporter=text npm test" - } -} diff --git a/node_modules/raw-body/LICENSE b/node_modules/raw-body/LICENSE deleted file mode 100644 index 1029a7a..0000000 --- a/node_modules/raw-body/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-2014 Jonathan Ong -Copyright (c) 2014-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/raw-body/README.md b/node_modules/raw-body/README.md deleted file mode 100644 index d9b36d6..0000000 --- a/node_modules/raw-body/README.md +++ /dev/null @@ -1,223 +0,0 @@ -# raw-body - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build status][github-actions-ci-image]][github-actions-ci-url] -[![Test coverage][coveralls-image]][coveralls-url] - -Gets the entire buffer of a stream either as a `Buffer` or a string. -Validates the stream's length against an expected length and maximum limit. -Ideal for parsing request bodies. - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install raw-body -``` - -### TypeScript - -This module includes a [TypeScript](https://www.typescriptlang.org/) -declaration file to enable auto complete in compatible editors and type -information for TypeScript projects. This module depends on the Node.js -types, so install `@types/node`: - -```sh -$ npm install @types/node -``` - -## API - -```js -var getRawBody = require('raw-body') -``` - -### getRawBody(stream, [options], [callback]) - -**Returns a promise if no callback specified and global `Promise` exists.** - -Options: - -- `length` - The length of the stream. - If the contents of the stream do not add up to this length, - an `400` error code is returned. -- `limit` - The byte limit of the body. - This is the number of bytes or any string format supported by - [bytes](https://www.npmjs.com/package/bytes), - for example `1000`, `'500kb'` or `'3mb'`. - If the body ends up being larger than this limit, - a `413` error code is returned. -- `encoding` - The encoding to use to decode the body into a string. - By default, a `Buffer` instance will be returned when no encoding is specified. - Most likely, you want `utf-8`, so setting `encoding` to `true` will decode as `utf-8`. - You can use any type of encoding supported by [iconv-lite](https://www.npmjs.org/package/iconv-lite#readme). - -You can also pass a string in place of options to just specify the encoding. - -If an error occurs, the stream will be paused, everything unpiped, -and you are responsible for correctly disposing the stream. -For HTTP requests, you may need to finish consuming the stream if -you want to keep the socket open for future requests. For streams -that use file descriptors, you should `stream.destroy()` or -`stream.close()` to prevent leaks. - -## Errors - -This module creates errors depending on the error condition during reading. -The error may be an error from the underlying Node.js implementation, but is -otherwise an error created by this module, which has the following attributes: - - * `limit` - the limit in bytes - * `length` and `expected` - the expected length of the stream - * `received` - the received bytes - * `encoding` - the invalid encoding - * `status` and `statusCode` - the corresponding status code for the error - * `type` - the error type - -### Types - -The errors from this module have a `type` property which allows for the programmatic -determination of the type of error returned. - -#### encoding.unsupported - -This error will occur when the `encoding` option is specified, but the value does -not map to an encoding supported by the [iconv-lite](https://www.npmjs.org/package/iconv-lite#readme) -module. - -#### entity.too.large - -This error will occur when the `limit` option is specified, but the stream has -an entity that is larger. - -#### request.aborted - -This error will occur when the request stream is aborted by the client before -reading the body has finished. - -#### request.size.invalid - -This error will occur when the `length` option is specified, but the stream has -emitted more bytes. - -#### stream.encoding.set - -This error will occur when the given stream has an encoding set on it, making it -a decoded stream. The stream should not have an encoding set and is expected to -emit `Buffer` objects. - -#### stream.not.readable - -This error will occur when the given stream is not readable. - -## Examples - -### Simple Express example - -```js -var contentType = require('content-type') -var express = require('express') -var getRawBody = require('raw-body') - -var app = express() - -app.use(function (req, res, next) { - getRawBody(req, { - length: req.headers['content-length'], - limit: '1mb', - encoding: contentType.parse(req).parameters.charset - }, function (err, string) { - if (err) return next(err) - req.text = string - next() - }) -}) - -// now access req.text -``` - -### Simple Koa example - -```js -var contentType = require('content-type') -var getRawBody = require('raw-body') -var koa = require('koa') - -var app = koa() - -app.use(function * (next) { - this.text = yield getRawBody(this.req, { - length: this.req.headers['content-length'], - limit: '1mb', - encoding: contentType.parse(this.req).parameters.charset - }) - yield next -}) - -// now access this.text -``` - -### Using as a promise - -To use this library as a promise, simply omit the `callback` and a promise is -returned, provided that a global `Promise` is defined. - -```js -var getRawBody = require('raw-body') -var http = require('http') - -var server = http.createServer(function (req, res) { - getRawBody(req) - .then(function (buf) { - res.statusCode = 200 - res.end(buf.length + ' bytes submitted') - }) - .catch(function (err) { - res.statusCode = 500 - res.end(err.message) - }) -}) - -server.listen(3000) -``` - -### Using with TypeScript - -```ts -import * as getRawBody from 'raw-body'; -import * as http from 'http'; - -const server = http.createServer((req, res) => { - getRawBody(req) - .then((buf) => { - res.statusCode = 200; - res.end(buf.length + ' bytes submitted'); - }) - .catch((err) => { - res.statusCode = err.statusCode; - res.end(err.message); - }); -}); - -server.listen(3000); -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/raw-body.svg -[npm-url]: https://npmjs.org/package/raw-body -[node-version-image]: https://img.shields.io/node/v/raw-body.svg -[node-version-url]: https://nodejs.org/en/download/ -[coveralls-image]: https://img.shields.io/coveralls/stream-utils/raw-body/master.svg -[coveralls-url]: https://coveralls.io/r/stream-utils/raw-body?branch=master -[downloads-image]: https://img.shields.io/npm/dm/raw-body.svg -[downloads-url]: https://npmjs.org/package/raw-body -[github-actions-ci-image]: https://img.shields.io/github/actions/workflow/status/stream-utils/raw-body/ci.yml?branch=master&label=ci -[github-actions-ci-url]: https://github.com/jshttp/stream-utils/raw-body?query=workflow%3Aci diff --git a/node_modules/raw-body/index.d.ts b/node_modules/raw-body/index.d.ts deleted file mode 100644 index dcbbebd..0000000 --- a/node_modules/raw-body/index.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { Readable } from 'stream'; - -declare namespace getRawBody { - export type Encoding = string | true; - - export interface Options { - /** - * The expected length of the stream. - */ - length?: number | string | null; - /** - * The byte limit of the body. This is the number of bytes or any string - * format supported by `bytes`, for example `1000`, `'500kb'` or `'3mb'`. - */ - limit?: number | string | null; - /** - * The encoding to use to decode the body into a string. By default, a - * `Buffer` instance will be returned when no encoding is specified. Most - * likely, you want `utf-8`, so setting encoding to `true` will decode as - * `utf-8`. You can use any type of encoding supported by `iconv-lite`. - */ - encoding?: Encoding | null; - } - - export interface RawBodyError extends Error { - /** - * The limit in bytes. - */ - limit?: number; - /** - * The expected length of the stream. - */ - length?: number; - expected?: number; - /** - * The received bytes. - */ - received?: number; - /** - * The encoding. - */ - encoding?: string; - /** - * The corresponding status code for the error. - */ - status: number; - statusCode: number; - /** - * The error type. - */ - type: string; - } -} - -/** - * Gets the entire buffer of a stream either as a `Buffer` or a string. - * Validates the stream's length against an expected length and maximum - * limit. Ideal for parsing request bodies. - */ -declare function getRawBody( - stream: Readable, - callback: (err: getRawBody.RawBodyError, body: Buffer) => void -): void; - -declare function getRawBody( - stream: Readable, - options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding, - callback: (err: getRawBody.RawBodyError, body: string) => void -): void; - -declare function getRawBody( - stream: Readable, - options: getRawBody.Options, - callback: (err: getRawBody.RawBodyError, body: Buffer) => void -): void; - -declare function getRawBody( - stream: Readable, - options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding -): Promise; - -declare function getRawBody( - stream: Readable, - options?: getRawBody.Options -): Promise; - -export = getRawBody; diff --git a/node_modules/raw-body/index.js b/node_modules/raw-body/index.js deleted file mode 100644 index 9cdcd12..0000000 --- a/node_modules/raw-body/index.js +++ /dev/null @@ -1,336 +0,0 @@ -/*! - * raw-body - * Copyright(c) 2013-2014 Jonathan Ong - * Copyright(c) 2014-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var asyncHooks = tryRequireAsyncHooks() -var bytes = require('bytes') -var createError = require('http-errors') -var iconv = require('iconv-lite') -var unpipe = require('unpipe') - -/** - * Module exports. - * @public - */ - -module.exports = getRawBody - -/** - * Module variables. - * @private - */ - -var ICONV_ENCODING_MESSAGE_REGEXP = /^Encoding not recognized: / - -/** - * Get the decoder for a given encoding. - * - * @param {string} encoding - * @private - */ - -function getDecoder (encoding) { - if (!encoding) return null - - try { - return iconv.getDecoder(encoding) - } catch (e) { - // error getting decoder - if (!ICONV_ENCODING_MESSAGE_REGEXP.test(e.message)) throw e - - // the encoding was not found - throw createError(415, 'specified encoding unsupported', { - encoding: encoding, - type: 'encoding.unsupported' - }) - } -} - -/** - * Get the raw body of a stream (typically HTTP). - * - * @param {object} stream - * @param {object|string|function} [options] - * @param {function} [callback] - * @public - */ - -function getRawBody (stream, options, callback) { - var done = callback - var opts = options || {} - - // light validation - if (stream === undefined) { - throw new TypeError('argument stream is required') - } else if (typeof stream !== 'object' || stream === null || typeof stream.on !== 'function') { - throw new TypeError('argument stream must be a stream') - } - - if (options === true || typeof options === 'string') { - // short cut for encoding - opts = { - encoding: options - } - } - - if (typeof options === 'function') { - done = options - opts = {} - } - - // validate callback is a function, if provided - if (done !== undefined && typeof done !== 'function') { - throw new TypeError('argument callback must be a function') - } - - // require the callback without promises - if (!done && !global.Promise) { - throw new TypeError('argument callback is required') - } - - // get encoding - var encoding = opts.encoding !== true - ? opts.encoding - : 'utf-8' - - // convert the limit to an integer - var limit = bytes.parse(opts.limit) - - // convert the expected length to an integer - var length = opts.length != null && !isNaN(opts.length) - ? parseInt(opts.length, 10) - : null - - if (done) { - // classic callback style - return readStream(stream, encoding, length, limit, wrap(done)) - } - - return new Promise(function executor (resolve, reject) { - readStream(stream, encoding, length, limit, function onRead (err, buf) { - if (err) return reject(err) - resolve(buf) - }) - }) -} - -/** - * Halt a stream. - * - * @param {Object} stream - * @private - */ - -function halt (stream) { - // unpipe everything from the stream - unpipe(stream) - - // pause stream - if (typeof stream.pause === 'function') { - stream.pause() - } -} - -/** - * Read the data from the stream. - * - * @param {object} stream - * @param {string} encoding - * @param {number} length - * @param {number} limit - * @param {function} callback - * @public - */ - -function readStream (stream, encoding, length, limit, callback) { - var complete = false - var sync = true - - // check the length and limit options. - // note: we intentionally leave the stream paused, - // so users should handle the stream themselves. - if (limit !== null && length !== null && length > limit) { - return done(createError(413, 'request entity too large', { - expected: length, - length: length, - limit: limit, - type: 'entity.too.large' - })) - } - - // streams1: assert request encoding is buffer. - // streams2+: assert the stream encoding is buffer. - // stream._decoder: streams1 - // state.encoding: streams2 - // state.decoder: streams2, specifically < 0.10.6 - var state = stream._readableState - if (stream._decoder || (state && (state.encoding || state.decoder))) { - // developer error - return done(createError(500, 'stream encoding should not be set', { - type: 'stream.encoding.set' - })) - } - - if (typeof stream.readable !== 'undefined' && !stream.readable) { - return done(createError(500, 'stream is not readable', { - type: 'stream.not.readable' - })) - } - - var received = 0 - var decoder - - try { - decoder = getDecoder(encoding) - } catch (err) { - return done(err) - } - - var buffer = decoder - ? '' - : [] - - // attach listeners - stream.on('aborted', onAborted) - stream.on('close', cleanup) - stream.on('data', onData) - stream.on('end', onEnd) - stream.on('error', onEnd) - - // mark sync section complete - sync = false - - function done () { - var args = new Array(arguments.length) - - // copy arguments - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - - // mark complete - complete = true - - if (sync) { - process.nextTick(invokeCallback) - } else { - invokeCallback() - } - - function invokeCallback () { - cleanup() - - if (args[0]) { - // halt the stream on error - halt(stream) - } - - callback.apply(null, args) - } - } - - function onAborted () { - if (complete) return - - done(createError(400, 'request aborted', { - code: 'ECONNABORTED', - expected: length, - length: length, - received: received, - type: 'request.aborted' - })) - } - - function onData (chunk) { - if (complete) return - - received += chunk.length - - if (limit !== null && received > limit) { - done(createError(413, 'request entity too large', { - limit: limit, - received: received, - type: 'entity.too.large' - })) - } else if (decoder) { - buffer += decoder.write(chunk) - } else { - buffer.push(chunk) - } - } - - function onEnd (err) { - if (complete) return - if (err) return done(err) - - if (length !== null && received !== length) { - done(createError(400, 'request size did not match content length', { - expected: length, - length: length, - received: received, - type: 'request.size.invalid' - })) - } else { - var string = decoder - ? buffer + (decoder.end() || '') - : Buffer.concat(buffer) - done(null, string) - } - } - - function cleanup () { - buffer = null - - stream.removeListener('aborted', onAborted) - stream.removeListener('data', onData) - stream.removeListener('end', onEnd) - stream.removeListener('error', onEnd) - stream.removeListener('close', cleanup) - } -} - -/** - * Try to require async_hooks - * @private - */ - -function tryRequireAsyncHooks () { - try { - return require('async_hooks') - } catch (e) { - return {} - } -} - -/** - * Wrap function with async resource, if possible. - * AsyncResource.bind static method backported. - * @private - */ - -function wrap (fn) { - var res - - // create anonymous resource - if (asyncHooks.AsyncResource) { - res = new asyncHooks.AsyncResource(fn.name || 'bound-anonymous-fn') - } - - // incompatible node.js - if (!res || !res.runInAsyncScope) { - return fn - } - - // return bound function - return res.runInAsyncScope.bind(res, fn, null) -} diff --git a/node_modules/raw-body/package.json b/node_modules/raw-body/package.json deleted file mode 100644 index d8120af..0000000 --- a/node_modules/raw-body/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "raw-body", - "description": "Get and validate the raw body of a readable stream.", - "version": "2.5.3", - "author": "Jonathan Ong (http://jongleberry.com)", - "contributors": [ - "Douglas Christopher Wilson ", - "Raynos " - ], - "license": "MIT", - "repository": "stream-utils/raw-body", - "dependencies": { - "bytes": "~3.1.2", - "http-errors": "~2.0.1", - "iconv-lite": "~0.4.24", - "unpipe": "~1.0.0" - }, - "devDependencies": { - "bluebird": "3.7.2", - "eslint": "8.34.0", - "eslint-config-standard": "15.0.1", - "eslint-plugin-import": "2.27.5", - "eslint-plugin-markdown": "3.0.0", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "6.1.1", - "eslint-plugin-standard": "4.1.0", - "mocha": "10.2.0", - "nyc": "15.1.0", - "readable-stream": "2.3.7", - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.8" - }, - "files": [ - "LICENSE", - "README.md", - "index.d.ts", - "index.js" - ], - "scripts": { - "lint": "eslint .", - "test": "mocha --trace-deprecation --reporter spec --bail --check-leaks test/", - "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/require-directory/.jshintrc b/node_modules/require-directory/.jshintrc deleted file mode 100644 index e14e4dc..0000000 --- a/node_modules/require-directory/.jshintrc +++ /dev/null @@ -1,67 +0,0 @@ -{ - "maxerr" : 50, - "bitwise" : true, - "camelcase" : true, - "curly" : true, - "eqeqeq" : true, - "forin" : true, - "immed" : true, - "indent" : 2, - "latedef" : true, - "newcap" : true, - "noarg" : true, - "noempty" : true, - "nonew" : true, - "plusplus" : true, - "quotmark" : true, - "undef" : true, - "unused" : true, - "strict" : true, - "trailing" : true, - "maxparams" : false, - "maxdepth" : false, - "maxstatements" : false, - "maxcomplexity" : false, - "maxlen" : false, - "asi" : false, - "boss" : false, - "debug" : false, - "eqnull" : true, - "es5" : false, - "esnext" : false, - "moz" : false, - "evil" : false, - "expr" : true, - "funcscope" : true, - "globalstrict" : true, - "iterator" : true, - "lastsemic" : false, - "laxbreak" : false, - "laxcomma" : false, - "loopfunc" : false, - "multistr" : false, - "proto" : false, - "scripturl" : false, - "smarttabs" : false, - "shadow" : false, - "sub" : false, - "supernew" : false, - "validthis" : false, - "browser" : true, - "couch" : false, - "devel" : true, - "dojo" : false, - "jquery" : false, - "mootools" : false, - "node" : true, - "nonstandard" : false, - "prototypejs" : false, - "rhino" : false, - "worker" : false, - "wsh" : false, - "yui" : false, - "nomen" : true, - "onevar" : true, - "passfail" : false, - "white" : true -} diff --git a/node_modules/require-directory/.npmignore b/node_modules/require-directory/.npmignore deleted file mode 100644 index 47cf365..0000000 --- a/node_modules/require-directory/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test/** diff --git a/node_modules/require-directory/.travis.yml b/node_modules/require-directory/.travis.yml deleted file mode 100644 index 20fd86b..0000000 --- a/node_modules/require-directory/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.10 diff --git a/node_modules/require-directory/LICENSE b/node_modules/require-directory/LICENSE deleted file mode 100644 index a70f253..0000000 --- a/node_modules/require-directory/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2011 Troy Goode - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/require-directory/README.markdown b/node_modules/require-directory/README.markdown deleted file mode 100644 index 926a063..0000000 --- a/node_modules/require-directory/README.markdown +++ /dev/null @@ -1,184 +0,0 @@ -# require-directory - -Recursively iterates over specified directory, `require()`'ing each file, and returning a nested hash structure containing those modules. - -**[Follow me (@troygoode) on Twitter!](https://twitter.com/intent/user?screen_name=troygoode)** - -[![NPM](https://nodei.co/npm/require-directory.png?downloads=true&stars=true)](https://nodei.co/npm/require-directory/) - -[![build status](https://secure.travis-ci.org/troygoode/node-require-directory.png)](http://travis-ci.org/troygoode/node-require-directory) - -## How To Use - -### Installation (via [npm](https://npmjs.org/package/require-directory)) - -```bash -$ npm install require-directory -``` - -### Usage - -A common pattern in node.js is to include an index file which creates a hash of the files in its current directory. Given a directory structure like so: - -* app.js -* routes/ - * index.js - * home.js - * auth/ - * login.js - * logout.js - * register.js - -`routes/index.js` uses `require-directory` to build the hash (rather than doing so manually) like so: - -```javascript -var requireDirectory = require('require-directory'); -module.exports = requireDirectory(module); -``` - -`app.js` references `routes/index.js` like any other module, but it now has a hash/tree of the exports from the `./routes/` directory: - -```javascript -var routes = require('./routes'); - -// snip - -app.get('/', routes.home); -app.get('/register', routes.auth.register); -app.get('/login', routes.auth.login); -app.get('/logout', routes.auth.logout); -``` - -The `routes` variable above is the equivalent of this: - -```javascript -var routes = { - home: require('routes/home.js'), - auth: { - login: require('routes/auth/login.js'), - logout: require('routes/auth/logout.js'), - register: require('routes/auth/register.js') - } -}; -``` - -*Note that `routes.index` will be `undefined` as you would hope.* - -### Specifying Another Directory - -You can specify which directory you want to build a tree of (if it isn't the current directory for whatever reason) by passing it as the second parameter. Not specifying the path (`requireDirectory(module)`) is the equivelant of `requireDirectory(module, __dirname)`: - -```javascript -var requireDirectory = require('require-directory'); -module.exports = requireDirectory(module, './some/subdirectory'); -``` - -For example, in the [example in the Usage section](#usage) we could have avoided creating `routes/index.js` and instead changed the first lines of `app.js` to: - -```javascript -var requireDirectory = require('require-directory'); -var routes = requireDirectory(module, './routes'); -``` - -## Options - -You can pass an options hash to `require-directory` as the 2nd parameter (or 3rd if you're passing the path to another directory as the 2nd parameter already). Here are the available options: - -### Whitelisting - -Whitelisting (either via RegExp or function) allows you to specify that only certain files be loaded. - -```javascript -var requireDirectory = require('require-directory'), - whitelist = /onlyinclude.js$/, - hash = requireDirectory(module, {include: whitelist}); -``` - -```javascript -var requireDirectory = require('require-directory'), - check = function(path){ - if(/onlyinclude.js$/.test(path)){ - return true; // don't include - }else{ - return false; // go ahead and include - } - }, - hash = requireDirectory(module, {include: check}); -``` - -### Blacklisting - -Blacklisting (either via RegExp or function) allows you to specify that all but certain files should be loaded. - -```javascript -var requireDirectory = require('require-directory'), - blacklist = /dontinclude\.js$/, - hash = requireDirectory(module, {exclude: blacklist}); -``` - -```javascript -var requireDirectory = require('require-directory'), - check = function(path){ - if(/dontinclude\.js$/.test(path)){ - return false; // don't include - }else{ - return true; // go ahead and include - } - }, - hash = requireDirectory(module, {exclude: check}); -``` - -### Visiting Objects As They're Loaded - -`require-directory` takes a function as the `visit` option that will be called for each module that is added to module.exports. - -```javascript -var requireDirectory = require('require-directory'), - visitor = function(obj) { - console.log(obj); // will be called for every module that is loaded - }, - hash = requireDirectory(module, {visit: visitor}); -``` - -The visitor can also transform the objects by returning a value: - -```javascript -var requireDirectory = require('require-directory'), - visitor = function(obj) { - return obj(new Date()); - }, - hash = requireDirectory(module, {visit: visitor}); -``` - -### Renaming Keys - -```javascript -var requireDirectory = require('require-directory'), - renamer = function(name) { - return name.toUpperCase(); - }, - hash = requireDirectory(module, {rename: renamer}); -``` - -### No Recursion - -```javascript -var requireDirectory = require('require-directory'), - hash = requireDirectory(module, {recurse: false}); -``` - -## Run Unit Tests - -```bash -$ npm run lint -$ npm test -``` - -## License - -[MIT License](http://www.opensource.org/licenses/mit-license.php) - -## Author - -[Troy Goode](https://github.com/TroyGoode) ([troygoode@gmail.com](mailto:troygoode@gmail.com)) - diff --git a/node_modules/require-directory/index.js b/node_modules/require-directory/index.js deleted file mode 100644 index cd37da7..0000000 --- a/node_modules/require-directory/index.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict'; - -var fs = require('fs'), - join = require('path').join, - resolve = require('path').resolve, - dirname = require('path').dirname, - defaultOptions = { - extensions: ['js', 'json', 'coffee'], - recurse: true, - rename: function (name) { - return name; - }, - visit: function (obj) { - return obj; - } - }; - -function checkFileInclusion(path, filename, options) { - return ( - // verify file has valid extension - (new RegExp('\\.(' + options.extensions.join('|') + ')$', 'i').test(filename)) && - - // if options.include is a RegExp, evaluate it and make sure the path passes - !(options.include && options.include instanceof RegExp && !options.include.test(path)) && - - // if options.include is a function, evaluate it and make sure the path passes - !(options.include && typeof options.include === 'function' && !options.include(path, filename)) && - - // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass - !(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path)) && - - // if options.exclude is a function, evaluate it and make sure the path doesn't pass - !(options.exclude && typeof options.exclude === 'function' && options.exclude(path, filename)) - ); -} - -function requireDirectory(m, path, options) { - var retval = {}; - - // path is optional - if (path && !options && typeof path !== 'string') { - options = path; - path = null; - } - - // default options - options = options || {}; - for (var prop in defaultOptions) { - if (typeof options[prop] === 'undefined') { - options[prop] = defaultOptions[prop]; - } - } - - // if no path was passed in, assume the equivelant of __dirname from caller - // otherwise, resolve path relative to the equivalent of __dirname - path = !path ? dirname(m.filename) : resolve(dirname(m.filename), path); - - // get the path of each file in specified directory, append to current tree node, recurse - fs.readdirSync(path).forEach(function (filename) { - var joined = join(path, filename), - files, - key, - obj; - - if (fs.statSync(joined).isDirectory() && options.recurse) { - // this node is a directory; recurse - files = requireDirectory(m, joined, options); - // exclude empty directories - if (Object.keys(files).length) { - retval[options.rename(filename, joined, filename)] = files; - } - } else { - if (joined !== m.filename && checkFileInclusion(joined, filename, options)) { - // hash node key shouldn't include file extension - key = filename.substring(0, filename.lastIndexOf('.')); - obj = m.require(joined); - retval[options.rename(key, joined, filename)] = options.visit(obj, joined, filename) || obj; - } - } - }); - - return retval; -} - -module.exports = requireDirectory; -module.exports.defaults = defaultOptions; diff --git a/node_modules/require-directory/package.json b/node_modules/require-directory/package.json deleted file mode 100644 index 25ece4b..0000000 --- a/node_modules/require-directory/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": "Troy Goode (http://github.com/troygoode/)", - "name": "require-directory", - "version": "2.1.1", - "description": "Recursively iterates over specified directory, require()'ing each file, and returning a nested hash structure containing those modules.", - "keywords": [ - "require", - "directory", - "library", - "recursive" - ], - "homepage": "https://github.com/troygoode/node-require-directory/", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/troygoode/node-require-directory.git" - }, - "contributors": [ - { - "name": "Troy Goode", - "email": "troygoode@gmail.com", - "web": "http://github.com/troygoode/" - } - ], - "license": "MIT", - "bugs": { - "url": "http://github.com/troygoode/node-require-directory/issues/" - }, - "engines": { - "node": ">=0.10.0" - }, - "devDependencies": { - "jshint": "^2.6.0", - "mocha": "^2.1.0" - }, - "scripts": { - "test": "mocha", - "lint": "jshint index.js test/test.js" - } -} diff --git a/node_modules/safe-buffer/LICENSE b/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068ce..0000000 --- a/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/safe-buffer/README.md b/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81af..0000000 --- a/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) - - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) - - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) - - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) - - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) - - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/safe-buffer/index.d.ts b/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed80..0000000 --- a/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/node_modules/safe-buffer/index.js b/node_modules/safe-buffer/index.js deleted file mode 100644 index f8d3ec9..0000000 --- a/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,65 +0,0 @@ -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.prototype = Object.create(Buffer.prototype) - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/node_modules/safe-buffer/package.json b/node_modules/safe-buffer/package.json deleted file mode 100644 index f2869e2..0000000 --- a/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "safe-buffer", - "description": "Safer Node.js Buffer API", - "version": "5.2.1", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "devDependencies": { - "standard": "*", - "tape": "^5.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/node_modules/safer-buffer/LICENSE b/node_modules/safer-buffer/LICENSE deleted file mode 100644 index 4fe9e6f..0000000 --- a/node_modules/safer-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Nikita Skovoroda - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/safer-buffer/Porting-Buffer.md b/node_modules/safer-buffer/Porting-Buffer.md deleted file mode 100644 index 68d86ba..0000000 --- a/node_modules/safer-buffer/Porting-Buffer.md +++ /dev/null @@ -1,268 +0,0 @@ -# Porting to the Buffer.from/Buffer.alloc API - - -## Overview - -- [Variant 1: Drop support for Node.js ≤ 4.4.x and 5.0.0 — 5.9.x.](#variant-1) (*recommended*) -- [Variant 2: Use a polyfill](#variant-2) -- [Variant 3: manual detection, with safeguards](#variant-3) - -### Finding problematic bits of code using grep - -Just run `grep -nrE '[^a-zA-Z](Slow)?Buffer\s*\(' --exclude-dir node_modules`. - -It will find all the potentially unsafe places in your own code (with some considerably unlikely -exceptions). - -### Finding problematic bits of code using Node.js 8 - -If you’re using Node.js ≥ 8.0.0 (which is recommended), Node.js exposes multiple options that help with finding the relevant pieces of code: - -- `--trace-warnings` will make Node.js show a stack trace for this warning and other warnings that are printed by Node.js. -- `--trace-deprecation` does the same thing, but only for deprecation warnings. -- `--pending-deprecation` will show more types of deprecation warnings. In particular, it will show the `Buffer()` deprecation warning, even on Node.js 8. - -You can set these flags using an environment variable: - -```console -$ export NODE_OPTIONS='--trace-warnings --pending-deprecation' -$ cat example.js -'use strict'; -const foo = new Buffer('foo'); -$ node example.js -(node:7147) [DEP0005] DeprecationWarning: The Buffer() and new Buffer() constructors are not recommended for use due to security and usability concerns. Please use the new Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() construction methods instead. - at showFlaggedDeprecation (buffer.js:127:13) - at new Buffer (buffer.js:148:3) - at Object. (/path/to/example.js:2:13) - [... more stack trace lines ...] -``` - -### Finding problematic bits of code using linters - -Eslint rules [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor) -or -[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md) -also find calls to deprecated `Buffer()` API. Those rules are included in some pre-sets. - -There is a drawback, though, that it doesn't always -[work correctly](https://github.com/chalker/safer-buffer#why-not-safe-buffer) when `Buffer` is -overriden e.g. with a polyfill, so recommended is a combination of this and some other method -described above. - - -## Variant 1: Drop support for Node.js ≤ 4.4.x and 5.0.0 — 5.9.x. - -This is the recommended solution nowadays that would imply only minimal overhead. - -The Node.js 5.x release line has been unsupported since July 2016, and the Node.js 4.x release line reaches its End of Life in April 2018 (→ [Schedule](https://github.com/nodejs/Release#release-schedule)). This means that these versions of Node.js will *not* receive any updates, even in case of security issues, so using these release lines should be avoided, if at all possible. - -What you would do in this case is to convert all `new Buffer()` or `Buffer()` calls to use `Buffer.alloc()` or `Buffer.from()`, in the following way: - -- For `new Buffer(number)`, replace it with `Buffer.alloc(number)`. -- For `new Buffer(string)` (or `new Buffer(string, encoding)`), replace it with `Buffer.from(string)` (or `Buffer.from(string, encoding)`). -- For all other combinations of arguments (these are much rarer), also replace `new Buffer(...arguments)` with `Buffer.from(...arguments)`. - -Note that `Buffer.alloc()` is also _faster_ on the current Node.js versions than -`new Buffer(size).fill(0)`, which is what you would otherwise need to ensure zero-filling. - -Enabling eslint rule [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor) -or -[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md) -is recommended to avoid accidential unsafe Buffer API usage. - -There is also a [JSCodeshift codemod](https://github.com/joyeecheung/node-dep-codemod#dep005) -for automatically migrating Buffer constructors to `Buffer.alloc()` or `Buffer.from()`. -Note that it currently only works with cases where the arguments are literals or where the -constructor is invoked with two arguments. - -_If you currently support those older Node.js versions and dropping them would be a semver-major change -for you, or if you support older branches of your packages, consider using [Variant 2](#variant-2) -or [Variant 3](#variant-3) on older branches, so people using those older branches will also receive -the fix. That way, you will eradicate potential issues caused by unguarded Buffer API usage and -your users will not observe a runtime deprecation warning when running your code on Node.js 10._ - - -## Variant 2: Use a polyfill - -Utilize [safer-buffer](https://www.npmjs.com/package/safer-buffer) as a polyfill to support older -Node.js versions. - -You would take exacly the same steps as in [Variant 1](#variant-1), but with a polyfill -`const Buffer = require('safer-buffer').Buffer` in all files where you use the new `Buffer` api. - -Make sure that you do not use old `new Buffer` API — in any files where the line above is added, -using old `new Buffer()` API will _throw_. It will be easy to notice that in CI, though. - -Alternatively, you could use [buffer-from](https://www.npmjs.com/package/buffer-from) and/or -[buffer-alloc](https://www.npmjs.com/package/buffer-alloc) [ponyfills](https://ponyfill.com/) — -those are great, the only downsides being 4 deps in the tree and slightly more code changes to -migrate off them (as you would be using e.g. `Buffer.from` under a different name). If you need only -`Buffer.from` polyfilled — `buffer-from` alone which comes with no extra dependencies. - -_Alternatively, you could use [safe-buffer](https://www.npmjs.com/package/safe-buffer) — it also -provides a polyfill, but takes a different approach which has -[it's drawbacks](https://github.com/chalker/safer-buffer#why-not-safe-buffer). It will allow you -to also use the older `new Buffer()` API in your code, though — but that's arguably a benefit, as -it is problematic, can cause issues in your code, and will start emitting runtime deprecation -warnings starting with Node.js 10._ - -Note that in either case, it is important that you also remove all calls to the old Buffer -API manually — just throwing in `safe-buffer` doesn't fix the problem by itself, it just provides -a polyfill for the new API. I have seen people doing that mistake. - -Enabling eslint rule [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor) -or -[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md) -is recommended. - -_Don't forget to drop the polyfill usage once you drop support for Node.js < 4.5.0._ - - -## Variant 3 — manual detection, with safeguards - -This is useful if you create Buffer instances in only a few places (e.g. one), or you have your own -wrapper around them. - -### Buffer(0) - -This special case for creating empty buffers can be safely replaced with `Buffer.concat([])`, which -returns the same result all the way down to Node.js 0.8.x. - -### Buffer(notNumber) - -Before: - -```js -var buf = new Buffer(notNumber, encoding); -``` - -After: - -```js -var buf; -if (Buffer.from && Buffer.from !== Uint8Array.from) { - buf = Buffer.from(notNumber, encoding); -} else { - if (typeof notNumber === 'number') - throw new Error('The "size" argument must be of type number.'); - buf = new Buffer(notNumber, encoding); -} -``` - -`encoding` is optional. - -Note that the `typeof notNumber` before `new Buffer` is required (for cases when `notNumber` argument is not -hard-coded) and _is not caused by the deprecation of Buffer constructor_ — it's exactly _why_ the -Buffer constructor is deprecated. Ecosystem packages lacking this type-check caused numereous -security issues — situations when unsanitized user input could end up in the `Buffer(arg)` create -problems ranging from DoS to leaking sensitive information to the attacker from the process memory. - -When `notNumber` argument is hardcoded (e.g. literal `"abc"` or `[0,1,2]`), the `typeof` check can -be omitted. - -Also note that using TypeScript does not fix this problem for you — when libs written in -`TypeScript` are used from JS, or when user input ends up there — it behaves exactly as pure JS, as -all type checks are translation-time only and are not present in the actual JS code which TS -compiles to. - -### Buffer(number) - -For Node.js 0.10.x (and below) support: - -```js -var buf; -if (Buffer.alloc) { - buf = Buffer.alloc(number); -} else { - buf = new Buffer(number); - buf.fill(0); -} -``` - -Otherwise (Node.js ≥ 0.12.x): - -```js -const buf = Buffer.alloc ? Buffer.alloc(number) : new Buffer(number).fill(0); -``` - -## Regarding Buffer.allocUnsafe - -Be extra cautious when using `Buffer.allocUnsafe`: - * Don't use it if you don't have a good reason to - * e.g. you probably won't ever see a performance difference for small buffers, in fact, those - might be even faster with `Buffer.alloc()`, - * if your code is not in the hot code path — you also probably won't notice a difference, - * keep in mind that zero-filling minimizes the potential risks. - * If you use it, make sure that you never return the buffer in a partially-filled state, - * if you are writing to it sequentially — always truncate it to the actuall written length - -Errors in handling buffers allocated with `Buffer.allocUnsafe` could result in various issues, -ranged from undefined behaviour of your code to sensitive data (user input, passwords, certs) -leaking to the remote attacker. - -_Note that the same applies to `new Buffer` usage without zero-filling, depending on the Node.js -version (and lacking type checks also adds DoS to the list of potential problems)._ - - -## FAQ - - -### What is wrong with the `Buffer` constructor? - -The `Buffer` constructor could be used to create a buffer in many different ways: - -- `new Buffer(42)` creates a `Buffer` of 42 bytes. Before Node.js 8, this buffer contained - *arbitrary memory* for performance reasons, which could include anything ranging from - program source code to passwords and encryption keys. -- `new Buffer('abc')` creates a `Buffer` that contains the UTF-8-encoded version of - the string `'abc'`. A second argument could specify another encoding: For example, - `new Buffer(string, 'base64')` could be used to convert a Base64 string into the original - sequence of bytes that it represents. -- There are several other combinations of arguments. - -This meant that, in code like `var buffer = new Buffer(foo);`, *it is not possible to tell -what exactly the contents of the generated buffer are* without knowing the type of `foo`. - -Sometimes, the value of `foo` comes from an external source. For example, this function -could be exposed as a service on a web server, converting a UTF-8 string into its Base64 form: - -``` -function stringToBase64(req, res) { - // The request body should have the format of `{ string: 'foobar' }` - const rawBytes = new Buffer(req.body.string) - const encoded = rawBytes.toString('base64') - res.end({ encoded: encoded }) -} -``` - -Note that this code does *not* validate the type of `req.body.string`: - -- `req.body.string` is expected to be a string. If this is the case, all goes well. -- `req.body.string` is controlled by the client that sends the request. -- If `req.body.string` is the *number* `50`, the `rawBytes` would be 50 bytes: - - Before Node.js 8, the content would be uninitialized - - After Node.js 8, the content would be `50` bytes with the value `0` - -Because of the missing type check, an attacker could intentionally send a number -as part of the request. Using this, they can either: - -- Read uninitialized memory. This **will** leak passwords, encryption keys and other - kinds of sensitive information. (Information leak) -- Force the program to allocate a large amount of memory. For example, when specifying - `500000000` as the input value, each request will allocate 500MB of memory. - This can be used to either exhaust the memory available of a program completely - and make it crash, or slow it down significantly. (Denial of Service) - -Both of these scenarios are considered serious security issues in a real-world -web server context. - -when using `Buffer.from(req.body.string)` instead, passing a number will always -throw an exception instead, giving a controlled behaviour that can always be -handled by the program. - - -### The `Buffer()` constructor has been deprecated for a while. Is this really an issue? - -Surveys of code in the `npm` ecosystem have shown that the `Buffer()` constructor is still -widely used. This includes new code, and overall usage of such code has actually been -*increasing*. diff --git a/node_modules/safer-buffer/Readme.md b/node_modules/safer-buffer/Readme.md deleted file mode 100644 index 14b0822..0000000 --- a/node_modules/safer-buffer/Readme.md +++ /dev/null @@ -1,156 +0,0 @@ -# safer-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![javascript style guide][standard-image]][standard-url] [![Security Responsible Disclosure][secuirty-image]][secuirty-url] - -[travis-image]: https://travis-ci.org/ChALkeR/safer-buffer.svg?branch=master -[travis-url]: https://travis-ci.org/ChALkeR/safer-buffer -[npm-image]: https://img.shields.io/npm/v/safer-buffer.svg -[npm-url]: https://npmjs.org/package/safer-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com -[secuirty-image]: https://img.shields.io/badge/Security-Responsible%20Disclosure-green.svg -[secuirty-url]: https://github.com/nodejs/security-wg/blob/master/processes/responsible_disclosure_template.md - -Modern Buffer API polyfill without footguns, working on Node.js from 0.8 to current. - -## How to use? - -First, port all `Buffer()` and `new Buffer()` calls to `Buffer.alloc()` and `Buffer.from()` API. - -Then, to achieve compatibility with outdated Node.js versions (`<4.5.0` and 5.x `<5.9.0`), use -`const Buffer = require('safer-buffer').Buffer` in all files where you make calls to the new -Buffer API. _Use `var` instead of `const` if you need that for your Node.js version range support._ - -Also, see the -[porting Buffer](https://github.com/ChALkeR/safer-buffer/blob/master/Porting-Buffer.md) guide. - -## Do I need it? - -Hopefully, not — dropping support for outdated Node.js versions should be fine nowdays, and that -is the recommended path forward. You _do_ need to port to the `Buffer.alloc()` and `Buffer.from()` -though. - -See the [porting guide](https://github.com/ChALkeR/safer-buffer/blob/master/Porting-Buffer.md) -for a better description. - -## Why not [safe-buffer](https://npmjs.com/safe-buffer)? - -_In short: while `safe-buffer` serves as a polyfill for the new API, it allows old API usage and -itself contains footguns._ - -`safe-buffer` could be used safely to get the new API while still keeping support for older -Node.js versions (like this module), but while analyzing ecosystem usage of the old Buffer API -I found out that `safe-buffer` is itself causing problems in some cases. - -For example, consider the following snippet: - -```console -$ cat example.unsafe.js -console.log(Buffer(20)) -$ ./node-v6.13.0-linux-x64/bin/node example.unsafe.js - -$ standard example.unsafe.js -standard: Use JavaScript Standard Style (https://standardjs.com) - /home/chalker/repo/safer-buffer/example.unsafe.js:2:13: 'Buffer()' was deprecated since v6. Use 'Buffer.alloc()' or 'Buffer.from()' (use 'https://www.npmjs.com/package/safe-buffer' for '<4.5.0') instead. -``` - -This is allocates and writes to console an uninitialized chunk of memory. -[standard](https://www.npmjs.com/package/standard) linter (among others) catch that and warn people -to avoid using unsafe API. - -Let's now throw in `safe-buffer`! - -```console -$ cat example.safe-buffer.js -const Buffer = require('safe-buffer').Buffer -console.log(Buffer(20)) -$ standard example.safe-buffer.js -$ ./node-v6.13.0-linux-x64/bin/node example.safe-buffer.js - -``` - -See the problem? Adding in `safe-buffer` _magically removes the lint warning_, but the behavior -remains identiсal to what we had before, and when launched on Node.js 6.x LTS — this dumps out -chunks of uninitialized memory. -_And this code will still emit runtime warnings on Node.js 10.x and above._ - -That was done by design. I first considered changing `safe-buffer`, prohibiting old API usage or -emitting warnings on it, but that significantly diverges from `safe-buffer` design. After some -discussion, it was decided to move my approach into a separate package, and _this is that separate -package_. - -This footgun is not imaginary — I observed top-downloaded packages doing that kind of thing, -«fixing» the lint warning by blindly including `safe-buffer` without any actual changes. - -Also in some cases, even if the API _was_ migrated to use of safe Buffer API — a random pull request -can bring unsafe Buffer API usage back to the codebase by adding new calls — and that could go -unnoticed even if you have a linter prohibiting that (becase of the reason stated above), and even -pass CI. _I also observed that being done in popular packages._ - -Some examples: - * [webdriverio](https://github.com/webdriverio/webdriverio/commit/05cbd3167c12e4930f09ef7cf93b127ba4effae4#diff-124380949022817b90b622871837d56cR31) - (a module with 548 759 downloads/month), - * [websocket-stream](https://github.com/maxogden/websocket-stream/commit/c9312bd24d08271687d76da0fe3c83493871cf61) - (218 288 d/m, fix in [maxogden/websocket-stream#142](https://github.com/maxogden/websocket-stream/pull/142)), - * [node-serialport](https://github.com/node-serialport/node-serialport/commit/e8d9d2b16c664224920ce1c895199b1ce2def48c) - (113 138 d/m, fix in [node-serialport/node-serialport#1510](https://github.com/node-serialport/node-serialport/pull/1510)), - * [karma](https://github.com/karma-runner/karma/commit/3d94b8cf18c695104ca195334dc75ff054c74eec) - (3 973 193 d/m, fix in [karma-runner/karma#2947](https://github.com/karma-runner/karma/pull/2947)), - * [spdy-transport](https://github.com/spdy-http2/spdy-transport/commit/5375ac33f4a62a4f65bcfc2827447d42a5dbe8b1) - (5 970 727 d/m, fix in [spdy-http2/spdy-transport#53](https://github.com/spdy-http2/spdy-transport/pull/53)). - * And there are a lot more over the ecosystem. - -I filed a PR at -[mysticatea/eslint-plugin-node#110](https://github.com/mysticatea/eslint-plugin-node/pull/110) to -partially fix that (for cases when that lint rule is used), but it is a semver-major change for -linter rules and presets, so it would take significant time for that to reach actual setups. -_It also hasn't been released yet (2018-03-20)._ - -Also, `safer-buffer` discourages the usage of `.allocUnsafe()`, which is often done by a mistake. -It still supports it with an explicit concern barier, by placing it under -`require('safer-buffer/dangereous')`. - -## But isn't throwing bad? - -Not really. It's an error that could be noticed and fixed early, instead of causing havoc later like -unguarded `new Buffer()` calls that end up receiving user input can do. - -This package affects only the files where `var Buffer = require('safer-buffer').Buffer` was done, so -it is really simple to keep track of things and make sure that you don't mix old API usage with that. -Also, CI should hint anything that you might have missed. - -New commits, if tested, won't land new usage of unsafe Buffer API this way. -_Node.js 10.x also deals with that by printing a runtime depecation warning._ - -### Would it affect third-party modules? - -No, unless you explicitly do an awful thing like monkey-patching or overriding the built-in `Buffer`. -Don't do that. - -### But I don't want throwing… - -That is also fine! - -Also, it could be better in some cases when you don't comprehensive enough test coverage. - -In that case — just don't override `Buffer` and use -`var SaferBuffer = require('safer-buffer').Buffer` instead. - -That way, everything using `Buffer` natively would still work, but there would be two drawbacks: - -* `Buffer.from`/`Buffer.alloc` won't be polyfilled — use `SaferBuffer.from` and - `SaferBuffer.alloc` instead. -* You are still open to accidentally using the insecure deprecated API — use a linter to catch that. - -Note that using a linter to catch accidential `Buffer` constructor usage in this case is strongly -recommended. `Buffer` is not overriden in this usecase, so linters won't get confused. - -## «Without footguns»? - -Well, it is still possible to do _some_ things with `Buffer` API, e.g. accessing `.buffer` property -on older versions and duping things from there. You shouldn't do that in your code, probabably. - -The intention is to remove the most significant footguns that affect lots of packages in the -ecosystem, and to do it in the proper way. - -Also, this package doesn't protect against security issues affecting some Node.js versions, so for -usage in your own production code, it is still recommended to update to a Node.js version -[supported by upstream](https://github.com/nodejs/release#release-schedule). diff --git a/node_modules/safer-buffer/dangerous.js b/node_modules/safer-buffer/dangerous.js deleted file mode 100644 index ca41fdc..0000000 --- a/node_modules/safer-buffer/dangerous.js +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ - -'use strict' - -var buffer = require('buffer') -var Buffer = buffer.Buffer -var safer = require('./safer.js') -var Safer = safer.Buffer - -var dangerous = {} - -var key - -for (key in safer) { - if (!safer.hasOwnProperty(key)) continue - dangerous[key] = safer[key] -} - -var Dangereous = dangerous.Buffer = {} - -// Copy Safer API -for (key in Safer) { - if (!Safer.hasOwnProperty(key)) continue - Dangereous[key] = Safer[key] -} - -// Copy those missing unsafe methods, if they are present -for (key in Buffer) { - if (!Buffer.hasOwnProperty(key)) continue - if (Dangereous.hasOwnProperty(key)) continue - Dangereous[key] = Buffer[key] -} - -if (!Dangereous.allocUnsafe) { - Dangereous.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) - } - if (size < 0 || size >= 2 * (1 << 30)) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } - return Buffer(size) - } -} - -if (!Dangereous.allocUnsafeSlow) { - Dangereous.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) - } - if (size < 0 || size >= 2 * (1 << 30)) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } - return buffer.SlowBuffer(size) - } -} - -module.exports = dangerous diff --git a/node_modules/safer-buffer/package.json b/node_modules/safer-buffer/package.json deleted file mode 100644 index d452b04..0000000 --- a/node_modules/safer-buffer/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "safer-buffer", - "version": "2.1.2", - "description": "Modern Buffer API polyfill without footguns", - "main": "safer.js", - "scripts": { - "browserify-test": "browserify --external tape tests.js > browserify-tests.js && tape browserify-tests.js", - "test": "standard && tape tests.js" - }, - "author": { - "name": "Nikita Skovoroda", - "email": "chalkerx@gmail.com", - "url": "https://github.com/ChALkeR" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/ChALkeR/safer-buffer.git" - }, - "bugs": { - "url": "https://github.com/ChALkeR/safer-buffer/issues" - }, - "devDependencies": { - "standard": "^11.0.1", - "tape": "^4.9.0" - }, - "files": [ - "Porting-Buffer.md", - "Readme.md", - "tests.js", - "dangerous.js", - "safer.js" - ] -} diff --git a/node_modules/safer-buffer/safer.js b/node_modules/safer-buffer/safer.js deleted file mode 100644 index 37c7e1a..0000000 --- a/node_modules/safer-buffer/safer.js +++ /dev/null @@ -1,77 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ - -'use strict' - -var buffer = require('buffer') -var Buffer = buffer.Buffer - -var safer = {} - -var key - -for (key in buffer) { - if (!buffer.hasOwnProperty(key)) continue - if (key === 'SlowBuffer' || key === 'Buffer') continue - safer[key] = buffer[key] -} - -var Safer = safer.Buffer = {} -for (key in Buffer) { - if (!Buffer.hasOwnProperty(key)) continue - if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue - Safer[key] = Buffer[key] -} - -safer.Buffer.prototype = Buffer.prototype - -if (!Safer.from || Safer.from === Uint8Array.from) { - Safer.from = function (value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) - } - if (value && typeof value.length === 'undefined') { - throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) - } - return Buffer(value, encodingOrOffset, length) - } -} - -if (!Safer.alloc) { - Safer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) - } - if (size < 0 || size >= 2 * (1 << 30)) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } - var buf = Buffer(size) - if (!fill || fill.length === 0) { - buf.fill(0) - } else if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - return buf - } -} - -if (!safer.kStringMaxLength) { - try { - safer.kStringMaxLength = process.binding('buffer').kStringMaxLength - } catch (e) { - // we can't determine kStringMaxLength in environments where process.binding - // is unsupported, so let's not set it - } -} - -if (!safer.constants) { - safer.constants = { - MAX_LENGTH: safer.kMaxLength - } - if (safer.kStringMaxLength) { - safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength - } -} - -module.exports = safer diff --git a/node_modules/safer-buffer/tests.js b/node_modules/safer-buffer/tests.js deleted file mode 100644 index 7ed2777..0000000 --- a/node_modules/safer-buffer/tests.js +++ /dev/null @@ -1,406 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ - -'use strict' - -var test = require('tape') - -var buffer = require('buffer') - -var index = require('./') -var safer = require('./safer') -var dangerous = require('./dangerous') - -/* Inheritance tests */ - -test('Default is Safer', function (t) { - t.equal(index, safer) - t.notEqual(safer, dangerous) - t.notEqual(index, dangerous) - t.end() -}) - -test('Is not a function', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.equal(typeof impl, 'object') - t.equal(typeof impl.Buffer, 'object') - }); - [buffer].forEach(function (impl) { - t.equal(typeof impl, 'object') - t.equal(typeof impl.Buffer, 'function') - }) - t.end() -}) - -test('Constructor throws', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.throws(function () { impl.Buffer() }) - t.throws(function () { impl.Buffer(0) }) - t.throws(function () { impl.Buffer('a') }) - t.throws(function () { impl.Buffer('a', 'utf-8') }) - t.throws(function () { return new impl.Buffer() }) - t.throws(function () { return new impl.Buffer(0) }) - t.throws(function () { return new impl.Buffer('a') }) - t.throws(function () { return new impl.Buffer('a', 'utf-8') }) - }) - t.end() -}) - -test('Safe methods exist', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.equal(typeof impl.Buffer.alloc, 'function', 'alloc') - t.equal(typeof impl.Buffer.from, 'function', 'from') - }) - t.end() -}) - -test('Unsafe methods exist only in Dangerous', function (t) { - [index, safer].forEach(function (impl) { - t.equal(typeof impl.Buffer.allocUnsafe, 'undefined') - t.equal(typeof impl.Buffer.allocUnsafeSlow, 'undefined') - }); - [dangerous].forEach(function (impl) { - t.equal(typeof impl.Buffer.allocUnsafe, 'function') - t.equal(typeof impl.Buffer.allocUnsafeSlow, 'function') - }) - t.end() -}) - -test('Generic methods/properties are defined and equal', function (t) { - ['poolSize', 'isBuffer', 'concat', 'byteLength'].forEach(function (method) { - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl.Buffer[method], buffer.Buffer[method], method) - t.notEqual(typeof impl.Buffer[method], 'undefined', method) - }) - }) - t.end() -}) - -test('Built-in buffer static methods/properties are inherited', function (t) { - Object.keys(buffer).forEach(function (method) { - if (method === 'SlowBuffer' || method === 'Buffer') return; - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl[method], buffer[method], method) - t.notEqual(typeof impl[method], 'undefined', method) - }) - }) - t.end() -}) - -test('Built-in Buffer static methods/properties are inherited', function (t) { - Object.keys(buffer.Buffer).forEach(function (method) { - if (method === 'allocUnsafe' || method === 'allocUnsafeSlow') return; - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl.Buffer[method], buffer.Buffer[method], method) - t.notEqual(typeof impl.Buffer[method], 'undefined', method) - }) - }) - t.end() -}) - -test('.prototype property of Buffer is inherited', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl.Buffer.prototype, buffer.Buffer.prototype, 'prototype') - t.notEqual(typeof impl.Buffer.prototype, 'undefined', 'prototype') - }) - t.end() -}) - -test('All Safer methods are present in Dangerous', function (t) { - Object.keys(safer).forEach(function (method) { - if (method === 'Buffer') return; - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl[method], safer[method], method) - if (method !== 'kStringMaxLength') { - t.notEqual(typeof impl[method], 'undefined', method) - } - }) - }) - Object.keys(safer.Buffer).forEach(function (method) { - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl.Buffer[method], safer.Buffer[method], method) - t.notEqual(typeof impl.Buffer[method], 'undefined', method) - }) - }) - t.end() -}) - -test('Safe methods from Dangerous methods are present in Safer', function (t) { - Object.keys(dangerous).forEach(function (method) { - if (method === 'Buffer') return; - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl[method], dangerous[method], method) - if (method !== 'kStringMaxLength') { - t.notEqual(typeof impl[method], 'undefined', method) - } - }) - }) - Object.keys(dangerous.Buffer).forEach(function (method) { - if (method === 'allocUnsafe' || method === 'allocUnsafeSlow') return; - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl.Buffer[method], dangerous.Buffer[method], method) - t.notEqual(typeof impl.Buffer[method], 'undefined', method) - }) - }) - t.end() -}) - -/* Behaviour tests */ - -test('Methods return Buffers', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0, 10))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0, 'a'))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(10))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(10, 'x'))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(9, 'ab'))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.from(''))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('string'))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('string', 'utf-8'))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64'))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.from([0, 42, 3]))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.from(new Uint8Array([0, 42, 3])))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.from([]))) - }); - ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { - t.ok(buffer.Buffer.isBuffer(dangerous.Buffer[method](0))) - t.ok(buffer.Buffer.isBuffer(dangerous.Buffer[method](10))) - }) - t.end() -}) - -test('Constructor is buffer.Buffer', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl.Buffer.alloc(0).constructor, buffer.Buffer) - t.equal(impl.Buffer.alloc(0, 10).constructor, buffer.Buffer) - t.equal(impl.Buffer.alloc(0, 'a').constructor, buffer.Buffer) - t.equal(impl.Buffer.alloc(10).constructor, buffer.Buffer) - t.equal(impl.Buffer.alloc(10, 'x').constructor, buffer.Buffer) - t.equal(impl.Buffer.alloc(9, 'ab').constructor, buffer.Buffer) - t.equal(impl.Buffer.from('').constructor, buffer.Buffer) - t.equal(impl.Buffer.from('string').constructor, buffer.Buffer) - t.equal(impl.Buffer.from('string', 'utf-8').constructor, buffer.Buffer) - t.equal(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64').constructor, buffer.Buffer) - t.equal(impl.Buffer.from([0, 42, 3]).constructor, buffer.Buffer) - t.equal(impl.Buffer.from(new Uint8Array([0, 42, 3])).constructor, buffer.Buffer) - t.equal(impl.Buffer.from([]).constructor, buffer.Buffer) - }); - [0, 10, 100].forEach(function (arg) { - t.equal(dangerous.Buffer.allocUnsafe(arg).constructor, buffer.Buffer) - t.equal(dangerous.Buffer.allocUnsafeSlow(arg).constructor, buffer.SlowBuffer(0).constructor) - }) - t.end() -}) - -test('Invalid calls throw', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.throws(function () { impl.Buffer.from(0) }) - t.throws(function () { impl.Buffer.from(10) }) - t.throws(function () { impl.Buffer.from(10, 'utf-8') }) - t.throws(function () { impl.Buffer.from('string', 'invalid encoding') }) - t.throws(function () { impl.Buffer.from(-10) }) - t.throws(function () { impl.Buffer.from(1e90) }) - t.throws(function () { impl.Buffer.from(Infinity) }) - t.throws(function () { impl.Buffer.from(-Infinity) }) - t.throws(function () { impl.Buffer.from(NaN) }) - t.throws(function () { impl.Buffer.from(null) }) - t.throws(function () { impl.Buffer.from(undefined) }) - t.throws(function () { impl.Buffer.from() }) - t.throws(function () { impl.Buffer.from({}) }) - t.throws(function () { impl.Buffer.alloc('') }) - t.throws(function () { impl.Buffer.alloc('string') }) - t.throws(function () { impl.Buffer.alloc('string', 'utf-8') }) - t.throws(function () { impl.Buffer.alloc('b25ldHdvdGhyZWU=', 'base64') }) - t.throws(function () { impl.Buffer.alloc(-10) }) - t.throws(function () { impl.Buffer.alloc(1e90) }) - t.throws(function () { impl.Buffer.alloc(2 * (1 << 30)) }) - t.throws(function () { impl.Buffer.alloc(Infinity) }) - t.throws(function () { impl.Buffer.alloc(-Infinity) }) - t.throws(function () { impl.Buffer.alloc(null) }) - t.throws(function () { impl.Buffer.alloc(undefined) }) - t.throws(function () { impl.Buffer.alloc() }) - t.throws(function () { impl.Buffer.alloc([]) }) - t.throws(function () { impl.Buffer.alloc([0, 42, 3]) }) - t.throws(function () { impl.Buffer.alloc({}) }) - }); - ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { - t.throws(function () { dangerous.Buffer[method]('') }) - t.throws(function () { dangerous.Buffer[method]('string') }) - t.throws(function () { dangerous.Buffer[method]('string', 'utf-8') }) - t.throws(function () { dangerous.Buffer[method](2 * (1 << 30)) }) - t.throws(function () { dangerous.Buffer[method](Infinity) }) - if (dangerous.Buffer[method] === buffer.Buffer.allocUnsafe) { - t.skip('Skipping, older impl of allocUnsafe coerced negative sizes to 0') - } else { - t.throws(function () { dangerous.Buffer[method](-10) }) - t.throws(function () { dangerous.Buffer[method](-1e90) }) - t.throws(function () { dangerous.Buffer[method](-Infinity) }) - } - t.throws(function () { dangerous.Buffer[method](null) }) - t.throws(function () { dangerous.Buffer[method](undefined) }) - t.throws(function () { dangerous.Buffer[method]() }) - t.throws(function () { dangerous.Buffer[method]([]) }) - t.throws(function () { dangerous.Buffer[method]([0, 42, 3]) }) - t.throws(function () { dangerous.Buffer[method]({}) }) - }) - t.end() -}) - -test('Buffers have appropriate lengths', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl.Buffer.alloc(0).length, 0) - t.equal(impl.Buffer.alloc(10).length, 10) - t.equal(impl.Buffer.from('').length, 0) - t.equal(impl.Buffer.from('string').length, 6) - t.equal(impl.Buffer.from('string', 'utf-8').length, 6) - t.equal(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64').length, 11) - t.equal(impl.Buffer.from([0, 42, 3]).length, 3) - t.equal(impl.Buffer.from(new Uint8Array([0, 42, 3])).length, 3) - t.equal(impl.Buffer.from([]).length, 0) - }); - ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { - t.equal(dangerous.Buffer[method](0).length, 0) - t.equal(dangerous.Buffer[method](10).length, 10) - }) - t.end() -}) - -test('Buffers have appropriate lengths (2)', function (t) { - t.equal(index.Buffer.alloc, safer.Buffer.alloc) - t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) - var ok = true; - [ safer.Buffer.alloc, - dangerous.Buffer.allocUnsafe, - dangerous.Buffer.allocUnsafeSlow - ].forEach(function (method) { - for (var i = 0; i < 1e2; i++) { - var length = Math.round(Math.random() * 1e5) - var buf = method(length) - if (!buffer.Buffer.isBuffer(buf)) ok = false - if (buf.length !== length) ok = false - } - }) - t.ok(ok) - t.end() -}) - -test('.alloc(size) is zero-filled and has correct length', function (t) { - t.equal(index.Buffer.alloc, safer.Buffer.alloc) - t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) - var ok = true - for (var i = 0; i < 1e2; i++) { - var length = Math.round(Math.random() * 2e6) - var buf = index.Buffer.alloc(length) - if (!buffer.Buffer.isBuffer(buf)) ok = false - if (buf.length !== length) ok = false - var j - for (j = 0; j < length; j++) { - if (buf[j] !== 0) ok = false - } - buf.fill(1) - for (j = 0; j < length; j++) { - if (buf[j] !== 1) ok = false - } - } - t.ok(ok) - t.end() -}) - -test('.allocUnsafe / .allocUnsafeSlow are fillable and have correct lengths', function (t) { - ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { - var ok = true - for (var i = 0; i < 1e2; i++) { - var length = Math.round(Math.random() * 2e6) - var buf = dangerous.Buffer[method](length) - if (!buffer.Buffer.isBuffer(buf)) ok = false - if (buf.length !== length) ok = false - buf.fill(0, 0, length) - var j - for (j = 0; j < length; j++) { - if (buf[j] !== 0) ok = false - } - buf.fill(1, 0, length) - for (j = 0; j < length; j++) { - if (buf[j] !== 1) ok = false - } - } - t.ok(ok, method) - }) - t.end() -}) - -test('.alloc(size, fill) is `fill`-filled', function (t) { - t.equal(index.Buffer.alloc, safer.Buffer.alloc) - t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) - var ok = true - for (var i = 0; i < 1e2; i++) { - var length = Math.round(Math.random() * 2e6) - var fill = Math.round(Math.random() * 255) - var buf = index.Buffer.alloc(length, fill) - if (!buffer.Buffer.isBuffer(buf)) ok = false - if (buf.length !== length) ok = false - for (var j = 0; j < length; j++) { - if (buf[j] !== fill) ok = false - } - } - t.ok(ok) - t.end() -}) - -test('.alloc(size, fill) is `fill`-filled', function (t) { - t.equal(index.Buffer.alloc, safer.Buffer.alloc) - t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) - var ok = true - for (var i = 0; i < 1e2; i++) { - var length = Math.round(Math.random() * 2e6) - var fill = Math.round(Math.random() * 255) - var buf = index.Buffer.alloc(length, fill) - if (!buffer.Buffer.isBuffer(buf)) ok = false - if (buf.length !== length) ok = false - for (var j = 0; j < length; j++) { - if (buf[j] !== fill) ok = false - } - } - t.ok(ok) - t.deepEqual(index.Buffer.alloc(9, 'a'), index.Buffer.alloc(9, 97)) - t.notDeepEqual(index.Buffer.alloc(9, 'a'), index.Buffer.alloc(9, 98)) - - var tmp = new buffer.Buffer(2) - tmp.fill('ok') - if (tmp[1] === tmp[0]) { - // Outdated Node.js - t.deepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('ooooo')) - } else { - t.deepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('okoko')) - } - t.notDeepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('kokok')) - - t.end() -}) - -test('safer.Buffer.from returns results same as Buffer constructor', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.deepEqual(impl.Buffer.from(''), new buffer.Buffer('')) - t.deepEqual(impl.Buffer.from('string'), new buffer.Buffer('string')) - t.deepEqual(impl.Buffer.from('string', 'utf-8'), new buffer.Buffer('string', 'utf-8')) - t.deepEqual(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64'), new buffer.Buffer('b25ldHdvdGhyZWU=', 'base64')) - t.deepEqual(impl.Buffer.from([0, 42, 3]), new buffer.Buffer([0, 42, 3])) - t.deepEqual(impl.Buffer.from(new Uint8Array([0, 42, 3])), new buffer.Buffer(new Uint8Array([0, 42, 3]))) - t.deepEqual(impl.Buffer.from([]), new buffer.Buffer([])) - }) - t.end() -}) - -test('safer.Buffer.from returns consistent results', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.deepEqual(impl.Buffer.from(''), impl.Buffer.alloc(0)) - t.deepEqual(impl.Buffer.from([]), impl.Buffer.alloc(0)) - t.deepEqual(impl.Buffer.from(new Uint8Array([])), impl.Buffer.alloc(0)) - t.deepEqual(impl.Buffer.from('string', 'utf-8'), impl.Buffer.from('string')) - t.deepEqual(impl.Buffer.from('string'), impl.Buffer.from([115, 116, 114, 105, 110, 103])) - t.deepEqual(impl.Buffer.from('string'), impl.Buffer.from(impl.Buffer.from('string'))) - t.deepEqual(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64'), impl.Buffer.from('onetwothree')) - t.notDeepEqual(impl.Buffer.from('b25ldHdvdGhyZWU='), impl.Buffer.from('onetwothree')) - }) - t.end() -}) diff --git a/node_modules/send/HISTORY.md b/node_modules/send/HISTORY.md deleted file mode 100644 index 13789ba..0000000 --- a/node_modules/send/HISTORY.md +++ /dev/null @@ -1,538 +0,0 @@ -0.19.2 / 2025-12-15 -=================== - -* deps: use tilde notation for dependencies -* deps: http-errors@~2.0.1 -* deps: statuses@~2.0.2 - -0.19.1 / 2024-10-09 -=================== - -* deps: encodeurl@~2.0.0 - -0.19.0 / 2024-09-10 -=================== - -* Remove link renderization in html while redirecting - -0.18.0 / 2022-03-23 -=================== - - * Fix emitted 416 error missing headers property - * Limit the headers removed for 304 response - * deps: depd@2.0.0 - - Replace internal `eval` usage with `Function` constructor - - Use instance methods on `process` to check for listeners - * deps: destroy@1.2.0 - * deps: http-errors@2.0.0 - - deps: depd@2.0.0 - - deps: statuses@2.0.1 - * deps: on-finished@2.4.1 - * deps: statuses@2.0.1 - -0.17.2 / 2021-12-11 -=================== - - * pref: ignore empty http tokens - * deps: http-errors@1.8.1 - - deps: inherits@2.0.4 - - deps: toidentifier@1.0.1 - - deps: setprototypeof@1.2.0 - * deps: ms@2.1.3 - -0.17.1 / 2019-05-10 -=================== - - * Set stricter CSP header in redirect & error responses - * deps: range-parser@~1.2.1 - -0.17.0 / 2019-05-03 -=================== - - * deps: http-errors@~1.7.2 - - Set constructor name when possible - - Use `toidentifier` module to make class names - - deps: depd@~1.1.2 - - deps: setprototypeof@1.1.1 - - deps: statuses@'>= 1.5.0 < 2' - * deps: mime@1.6.0 - - Add extensions for JPEG-2000 images - - Add new `font/*` types from IANA - - Add WASM mapping - - Update `.bdoc` to `application/bdoc` - - Update `.bmp` to `image/bmp` - - Update `.m4a` to `audio/mp4` - - Update `.rtf` to `application/rtf` - - Update `.wav` to `audio/wav` - - Update `.xml` to `application/xml` - - Update generic extensions to `application/octet-stream`: - `.deb`, `.dll`, `.dmg`, `.exe`, `.iso`, `.msi` - - Use mime-score module to resolve extension conflicts - * deps: ms@2.1.1 - - Add `week`/`w` support - - Fix negative number handling - * deps: statuses@~1.5.0 - * perf: remove redundant `path.normalize` call - -0.16.2 / 2018-02-07 -=================== - - * Fix incorrect end tag in default error & redirects - * deps: depd@~1.1.2 - - perf: remove argument reassignment - * deps: encodeurl@~1.0.2 - - Fix encoding `%` as last character - * deps: statuses@~1.4.0 - -0.16.1 / 2017-09-29 -=================== - - * Fix regression in edge-case behavior for empty `path` - -0.16.0 / 2017-09-27 -=================== - - * Add `immutable` option - * Fix missing `` in default error & redirects - * Use instance methods on steam to check for listeners - * deps: mime@1.4.1 - - Add 70 new types for file extensions - - Set charset as "UTF-8" for .js and .json - * perf: improve path validation speed - -0.15.6 / 2017-09-22 -=================== - - * deps: debug@2.6.9 - * perf: improve `If-Match` token parsing - -0.15.5 / 2017-09-20 -=================== - - * deps: etag@~1.8.1 - - perf: replace regular expression with substring - * deps: fresh@0.5.2 - - Fix handling of modified headers with invalid dates - - perf: improve ETag match loop - - perf: improve `If-None-Match` token parsing - -0.15.4 / 2017-08-05 -=================== - - * deps: debug@2.6.8 - * deps: depd@~1.1.1 - - Remove unnecessary `Buffer` loading - * deps: http-errors@~1.6.2 - - deps: depd@1.1.1 - -0.15.3 / 2017-05-16 -=================== - - * deps: debug@2.6.7 - - deps: ms@2.0.0 - * deps: ms@2.0.0 - -0.15.2 / 2017-04-26 -=================== - - * deps: debug@2.6.4 - - Fix `DEBUG_MAX_ARRAY_LENGTH` - - deps: ms@0.7.3 - * deps: ms@1.0.0 - -0.15.1 / 2017-03-04 -=================== - - * Fix issue when `Date.parse` does not return `NaN` on invalid date - * Fix strict violation in broken environments - -0.15.0 / 2017-02-25 -=================== - - * Support `If-Match` and `If-Unmodified-Since` headers - * Add `res` and `path` arguments to `directory` event - * Remove usage of `res._headers` private field - - Improves compatibility with Node.js 8 nightly - * Send complete HTML document in redirect & error responses - * Set default CSP header in redirect & error responses - * Use `res.getHeaderNames()` when available - * Use `res.headersSent` when available - * deps: debug@2.6.1 - - Allow colors in workers - - Deprecated `DEBUG_FD` environment variable set to `3` or higher - - Fix error when running under React Native - - Use same color for same namespace - - deps: ms@0.7.2 - * deps: etag@~1.8.0 - * deps: fresh@0.5.0 - - Fix false detection of `no-cache` request directive - - Fix incorrect result when `If-None-Match` has both `*` and ETags - - Fix weak `ETag` matching to match spec - - perf: delay reading header values until needed - - perf: enable strict mode - - perf: hoist regular expressions - - perf: remove duplicate conditional - - perf: remove unnecessary boolean coercions - - perf: skip checking modified time if ETag check failed - - perf: skip parsing `If-None-Match` when no `ETag` header - - perf: use `Date.parse` instead of `new Date` - * deps: http-errors@~1.6.1 - - Make `message` property enumerable for `HttpError`s - - deps: setprototypeof@1.0.3 - -0.14.2 / 2017-01-23 -=================== - - * deps: http-errors@~1.5.1 - - deps: inherits@2.0.3 - - deps: setprototypeof@1.0.2 - - deps: statuses@'>= 1.3.1 < 2' - * deps: ms@0.7.2 - * deps: statuses@~1.3.1 - -0.14.1 / 2016-06-09 -=================== - - * Fix redirect error when `path` contains raw non-URL characters - * Fix redirect when `path` starts with multiple forward slashes - -0.14.0 / 2016-06-06 -=================== - - * Add `acceptRanges` option - * Add `cacheControl` option - * Attempt to combine multiple ranges into single range - * Correctly inherit from `Stream` class - * Fix `Content-Range` header in 416 responses when using `start`/`end` options - * Fix `Content-Range` header missing from default 416 responses - * Ignore non-byte `Range` headers - * deps: http-errors@~1.5.0 - - Add `HttpError` export, for `err instanceof createError.HttpError` - - Support new code `421 Misdirected Request` - - Use `setprototypeof` module to replace `__proto__` setting - - deps: inherits@2.0.1 - - deps: statuses@'>= 1.3.0 < 2' - - perf: enable strict mode - * deps: range-parser@~1.2.0 - - Fix incorrectly returning -1 when there is at least one valid range - - perf: remove internal function - * deps: statuses@~1.3.0 - - Add `421 Misdirected Request` - - perf: enable strict mode - * perf: remove argument reassignment - -0.13.2 / 2016-03-05 -=================== - - * Fix invalid `Content-Type` header when `send.mime.default_type` unset - -0.13.1 / 2016-01-16 -=================== - - * deps: depd@~1.1.0 - - Support web browser loading - - perf: enable strict mode - * deps: destroy@~1.0.4 - - perf: enable strict mode - * deps: escape-html@~1.0.3 - - perf: enable strict mode - - perf: optimize string replacement - - perf: use faster string coercion - * deps: range-parser@~1.0.3 - - perf: enable strict mode - -0.13.0 / 2015-06-16 -=================== - - * Allow Node.js HTTP server to set `Date` response header - * Fix incorrectly removing `Content-Location` on 304 response - * Improve the default redirect response headers - * Send appropriate headers on default error response - * Use `http-errors` for standard emitted errors - * Use `statuses` instead of `http` module for status messages - * deps: escape-html@1.0.2 - * deps: etag@~1.7.0 - - Improve stat performance by removing hashing - * deps: fresh@0.3.0 - - Add weak `ETag` matching support - * deps: on-finished@~2.3.0 - - Add defined behavior for HTTP `CONNECT` requests - - Add defined behavior for HTTP `Upgrade` requests - - deps: ee-first@1.1.1 - * perf: enable strict mode - * perf: remove unnecessary array allocations - -0.12.3 / 2015-05-13 -=================== - - * deps: debug@~2.2.0 - - deps: ms@0.7.1 - * deps: depd@~1.0.1 - * deps: etag@~1.6.0 - - Improve support for JXcore - - Support "fake" stats objects in environments without `fs` - * deps: ms@0.7.1 - - Prevent extraordinarily long inputs - * deps: on-finished@~2.2.1 - -0.12.2 / 2015-03-13 -=================== - - * Throw errors early for invalid `extensions` or `index` options - * deps: debug@~2.1.3 - - Fix high intensity foreground color for bold - - deps: ms@0.7.0 - -0.12.1 / 2015-02-17 -=================== - - * Fix regression sending zero-length files - -0.12.0 / 2015-02-16 -=================== - - * Always read the stat size from the file - * Fix mutating passed-in `options` - * deps: mime@1.3.4 - -0.11.1 / 2015-01-20 -=================== - - * Fix `root` path disclosure - -0.11.0 / 2015-01-05 -=================== - - * deps: debug@~2.1.1 - * deps: etag@~1.5.1 - - deps: crc@3.2.1 - * deps: ms@0.7.0 - - Add `milliseconds` - - Add `msecs` - - Add `secs` - - Add `mins` - - Add `hrs` - - Add `yrs` - * deps: on-finished@~2.2.0 - -0.10.1 / 2014-10-22 -=================== - - * deps: on-finished@~2.1.1 - - Fix handling of pipelined requests - -0.10.0 / 2014-10-15 -=================== - - * deps: debug@~2.1.0 - - Implement `DEBUG_FD` env variable support - * deps: depd@~1.0.0 - * deps: etag@~1.5.0 - - Improve string performance - - Slightly improve speed for weak ETags over 1KB - -0.9.3 / 2014-09-24 -================== - - * deps: etag@~1.4.0 - - Support "fake" stats objects - -0.9.2 / 2014-09-15 -================== - - * deps: depd@0.4.5 - * deps: etag@~1.3.1 - * deps: range-parser@~1.0.2 - -0.9.1 / 2014-09-07 -================== - - * deps: fresh@0.2.4 - -0.9.0 / 2014-09-07 -================== - - * Add `lastModified` option - * Use `etag` to generate `ETag` header - * deps: debug@~2.0.0 - -0.8.5 / 2014-09-04 -================== - - * Fix malicious path detection for empty string path - -0.8.4 / 2014-09-04 -================== - - * Fix a path traversal issue when using `root` - -0.8.3 / 2014-08-16 -================== - - * deps: destroy@1.0.3 - - renamed from dethroy - * deps: on-finished@2.1.0 - -0.8.2 / 2014-08-14 -================== - - * Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` - * deps: dethroy@1.0.2 - -0.8.1 / 2014-08-05 -================== - - * Fix `extensions` behavior when file already has extension - -0.8.0 / 2014-08-05 -================== - - * Add `extensions` option - -0.7.4 / 2014-08-04 -================== - - * Fix serving index files without root dir - -0.7.3 / 2014-07-29 -================== - - * Fix incorrect 403 on Windows and Node.js 0.11 - -0.7.2 / 2014-07-27 -================== - - * deps: depd@0.4.4 - - Work-around v8 generating empty stack traces - -0.7.1 / 2014-07-26 -================== - - * deps: depd@0.4.3 - - Fix exception when global `Error.stackTraceLimit` is too low - -0.7.0 / 2014-07-20 -================== - - * Deprecate `hidden` option; use `dotfiles` option - * Add `dotfiles` option - * deps: debug@1.0.4 - * deps: depd@0.4.2 - - Add `TRACE_DEPRECATION` environment variable - - Remove non-standard grey color from color output - - Support `--no-deprecation` argument - - Support `--trace-deprecation` argument - -0.6.0 / 2014-07-11 -================== - - * Deprecate `from` option; use `root` option - * Deprecate `send.etag()` -- use `etag` in `options` - * Deprecate `send.hidden()` -- use `hidden` in `options` - * Deprecate `send.index()` -- use `index` in `options` - * Deprecate `send.maxage()` -- use `maxAge` in `options` - * Deprecate `send.root()` -- use `root` in `options` - * Cap `maxAge` value to 1 year - * deps: debug@1.0.3 - - Add support for multiple wildcards in namespaces - -0.5.0 / 2014-06-28 -================== - - * Accept string for `maxAge` (converted by `ms`) - * Add `headers` event - * Include link in default redirect response - * Use `EventEmitter.listenerCount` to count listeners - -0.4.3 / 2014-06-11 -================== - - * Do not throw un-catchable error on file open race condition - * Use `escape-html` for HTML escaping - * deps: debug@1.0.2 - - fix some debugging output colors on node.js 0.8 - * deps: finished@1.2.2 - * deps: fresh@0.2.2 - -0.4.2 / 2014-06-09 -================== - - * fix "event emitter leak" warnings - * deps: debug@1.0.1 - * deps: finished@1.2.1 - -0.4.1 / 2014-06-02 -================== - - * Send `max-age` in `Cache-Control` in correct format - -0.4.0 / 2014-05-27 -================== - - * Calculate ETag with md5 for reduced collisions - * Fix wrong behavior when index file matches directory - * Ignore stream errors after request ends - - Goodbye `EBADF, read` - * Skip directories in index file search - * deps: debug@0.8.1 - -0.3.0 / 2014-04-24 -================== - - * Fix sending files with dots without root set - * Coerce option types - * Accept API options in options object - * Set etags to "weak" - * Include file path in etag - * Make "Can't set headers after they are sent." catchable - * Send full entity-body for multi range requests - * Default directory access to 403 when index disabled - * Support multiple index paths - * Support "If-Range" header - * Control whether to generate etags - * deps: mime@1.2.11 - -0.2.0 / 2014-01-29 -================== - - * update range-parser and fresh - -0.1.4 / 2013-08-11 -================== - - * update fresh - -0.1.3 / 2013-07-08 -================== - - * Revert "Fix fd leak" - -0.1.2 / 2013-07-03 -================== - - * Fix fd leak - -0.1.0 / 2012-08-25 -================== - - * add options parameter to send() that is passed to fs.createReadStream() [kanongil] - -0.0.4 / 2012-08-16 -================== - - * allow custom "Accept-Ranges" definition - -0.0.3 / 2012-07-16 -================== - - * fix normalization of the root directory. Closes #3 - -0.0.2 / 2012-07-09 -================== - - * add passing of req explicitly for now (YUCK) - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/send/LICENSE b/node_modules/send/LICENSE deleted file mode 100644 index b6ea1c1..0000000 --- a/node_modules/send/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk -Copyright (c) 2014-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/send/README.md b/node_modules/send/README.md deleted file mode 100644 index fadf838..0000000 --- a/node_modules/send/README.md +++ /dev/null @@ -1,327 +0,0 @@ -# send - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Linux Build][github-actions-ci-image]][github-actions-ci-url] -[![Windows Build][appveyor-image]][appveyor-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Send is a library for streaming files from the file system as a http response -supporting partial responses (Ranges), conditional-GET negotiation (If-Match, -If-Unmodified-Since, If-None-Match, If-Modified-Since), high test coverage, -and granular events which may be leveraged to take appropriate actions in your -application or framework. - -Looking to serve up entire folders mapped to URLs? Try [serve-static](https://www.npmjs.org/package/serve-static). - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```bash -$ npm install send -``` - -## API - -```js -var send = require('send') -``` - -### send(req, path, [options]) - -Create a new `SendStream` for the given path to send to a `res`. The `req` is -the Node.js HTTP request and the `path` is a urlencoded path to send (urlencoded, -not the actual file-system path). - -#### Options - -##### acceptRanges - -Enable or disable accepting ranged requests, defaults to true. -Disabling this will not send `Accept-Ranges` and ignore the contents -of the `Range` request header. - -##### cacheControl - -Enable or disable setting `Cache-Control` response header, defaults to -true. Disabling this will ignore the `immutable` and `maxAge` options. - -##### dotfiles - -Set how "dotfiles" are treated when encountered. A dotfile is a file -or directory that begins with a dot ("."). Note this check is done on -the path itself without checking if the path actually exists on the -disk. If `root` is specified, only the dotfiles above the root are -checked (i.e. the root itself can be within a dotfile when when set -to "deny"). - - - `'allow'` No special treatment for dotfiles. - - `'deny'` Send a 403 for any request for a dotfile. - - `'ignore'` Pretend like the dotfile does not exist and 404. - -The default value is _similar_ to `'ignore'`, with the exception that -this default will not ignore the files within a directory that begins -with a dot, for backward-compatibility. - -##### end - -Byte offset at which the stream ends, defaults to the length of the file -minus 1. The end is inclusive in the stream, meaning `end: 3` will include -the 4th byte in the stream. - -##### etag - -Enable or disable etag generation, defaults to true. - -##### extensions - -If a given file doesn't exist, try appending one of the given extensions, -in the given order. By default, this is disabled (set to `false`). An -example value that will serve extension-less HTML files: `['html', 'htm']`. -This is skipped if the requested file already has an extension. - -##### immutable - -Enable or disable the `immutable` directive in the `Cache-Control` response -header, defaults to `false`. If set to `true`, the `maxAge` option should -also be specified to enable caching. The `immutable` directive will prevent -supported clients from making conditional requests during the life of the -`maxAge` option to check if the file has changed. - -##### index - -By default send supports "index.html" files, to disable this -set `false` or to supply a new index pass a string or an array -in preferred order. - -##### lastModified - -Enable or disable `Last-Modified` header, defaults to true. Uses the file -system's last modified value. - -##### maxAge - -Provide a max-age in milliseconds for http caching, defaults to 0. -This can also be a string accepted by the -[ms](https://www.npmjs.org/package/ms#readme) module. - -##### root - -Serve files relative to `path`. - -##### start - -Byte offset at which the stream starts, defaults to 0. The start is inclusive, -meaning `start: 2` will include the 3rd byte in the stream. - -#### Events - -The `SendStream` is an event emitter and will emit the following events: - - - `error` an error occurred `(err)` - - `directory` a directory was requested `(res, path)` - - `file` a file was requested `(path, stat)` - - `headers` the headers are about to be set on a file `(res, path, stat)` - - `stream` file streaming has started `(stream)` - - `end` streaming has completed - -#### .pipe - -The `pipe` method is used to pipe the response into the Node.js HTTP response -object, typically `send(req, path, options).pipe(res)`. - -### .mime - -The `mime` export is the global instance of of the -[`mime` npm module](https://www.npmjs.com/package/mime). - -This is used to configure the MIME types that are associated with file extensions -as well as other options for how to resolve the MIME type of a file (like the -default type to use for an unknown file extension). - -## Error-handling - -By default when no `error` listeners are present an automatic response will be -made, otherwise you have full control over the response, aka you may show a 5xx -page etc. - -## Caching - -It does _not_ perform internal caching, you should use a reverse proxy cache -such as Varnish for this, or those fancy things called CDNs. If your -application is small enough that it would benefit from single-node memory -caching, it's small enough that it does not need caching at all ;). - -## Debugging - -To enable `debug()` instrumentation output export __DEBUG__: - -``` -$ DEBUG=send node app -``` - -## Running tests - -``` -$ npm install -$ npm test -``` - -## Examples - -### Serve a specific file - -This simple example will send a specific file to all requests. - -```js -var http = require('http') -var send = require('send') - -var server = http.createServer(function onRequest (req, res) { - send(req, '/path/to/index.html') - .pipe(res) -}) - -server.listen(3000) -``` - -### Serve all files from a directory - -This simple example will just serve up all the files in a -given directory as the top-level. For example, a request -`GET /foo.txt` will send back `/www/public/foo.txt`. - -```js -var http = require('http') -var parseUrl = require('parseurl') -var send = require('send') - -var server = http.createServer(function onRequest (req, res) { - send(req, parseUrl(req).pathname, { root: '/www/public' }) - .pipe(res) -}) - -server.listen(3000) -``` - -### Custom file types - -```js -var http = require('http') -var parseUrl = require('parseurl') -var send = require('send') - -// Default unknown types to text/plain -send.mime.default_type = 'text/plain' - -// Add a custom type -send.mime.define({ - 'application/x-my-type': ['x-mt', 'x-mtt'] -}) - -var server = http.createServer(function onRequest (req, res) { - send(req, parseUrl(req).pathname, { root: '/www/public' }) - .pipe(res) -}) - -server.listen(3000) -``` - -### Custom directory index view - -This is a example of serving up a structure of directories with a -custom function to render a listing of a directory. - -```js -var http = require('http') -var fs = require('fs') -var parseUrl = require('parseurl') -var send = require('send') - -// Transfer arbitrary files from within /www/example.com/public/* -// with a custom handler for directory listing -var server = http.createServer(function onRequest (req, res) { - send(req, parseUrl(req).pathname, { index: false, root: '/www/public' }) - .once('directory', directory) - .pipe(res) -}) - -server.listen(3000) - -// Custom directory handler -function directory (res, path) { - var stream = this - - // redirect to trailing slash for consistent url - if (!stream.hasTrailingSlash()) { - return stream.redirect(path) - } - - // get directory list - fs.readdir(path, function onReaddir (err, list) { - if (err) return stream.error(err) - - // render an index for the directory - res.setHeader('Content-Type', 'text/plain; charset=UTF-8') - res.end(list.join('\n') + '\n') - }) -} -``` - -### Serving from a root directory with custom error-handling - -```js -var http = require('http') -var parseUrl = require('parseurl') -var send = require('send') - -var server = http.createServer(function onRequest (req, res) { - // your custom error-handling logic: - function error (err) { - res.statusCode = err.status || 500 - res.end(err.message) - } - - // your custom headers - function headers (res, path, stat) { - // serve all files for download - res.setHeader('Content-Disposition', 'attachment') - } - - // your custom directory handling logic: - function redirect () { - res.statusCode = 301 - res.setHeader('Location', req.url + '/') - res.end('Redirecting to ' + req.url + '/') - } - - // transfer arbitrary files from within - // /www/example.com/public/* - send(req, parseUrl(req).pathname, { root: '/www/public' }) - .on('error', error) - .on('directory', redirect) - .on('headers', headers) - .pipe(res) -}) - -server.listen(3000) -``` - -## License - -[MIT](LICENSE) - -[appveyor-image]: https://badgen.net/appveyor/ci/dougwilson/send/master?label=windows -[appveyor-url]: https://ci.appveyor.com/project/dougwilson/send -[coveralls-image]: https://badgen.net/coveralls/c/github/pillarjs/send/master -[coveralls-url]: https://coveralls.io/r/pillarjs/send?branch=master -[github-actions-ci-image]: https://badgen.net/github/checks/pillarjs/send/master?label=linux -[github-actions-ci-url]: https://github.com/pillarjs/send/actions/workflows/ci.yml -[node-image]: https://badgen.net/npm/node/send -[node-url]: https://nodejs.org/en/download/ -[npm-downloads-image]: https://badgen.net/npm/dm/send -[npm-url]: https://npmjs.org/package/send -[npm-version-image]: https://badgen.net/npm/v/send diff --git a/node_modules/send/SECURITY.md b/node_modules/send/SECURITY.md deleted file mode 100644 index 46b48f7..0000000 --- a/node_modules/send/SECURITY.md +++ /dev/null @@ -1,24 +0,0 @@ -# Security Policies and Procedures - -## Reporting a Bug - -The `send` team and community take all security bugs seriously. Thank you -for improving the security of Express. We appreciate your efforts and -responsible disclosure and will make every effort to acknowledge your -contributions. - -Report security bugs by emailing the current owner(s) of `send`. This information -can be found in the npm registry using the command `npm owner ls send`. -If unsure or unable to get the information from the above, open an issue -in the [project issue tracker](https://github.com/pillarjs/send/issues) -asking for the current contact information. - -To ensure the timely response to your report, please ensure that the entirety -of the report is contained within the email body and not solely behind a web -link or an attachment. - -At least one owner will acknowledge your email within 48 hours, and will send a -more detailed response within 48 hours indicating the next steps in handling -your report. After the initial reply to your report, the owners will -endeavor to keep you informed of the progress towards a fix and full -announcement, and may ask for additional information or guidance. diff --git a/node_modules/send/index.js b/node_modules/send/index.js deleted file mode 100644 index 768f8ca..0000000 --- a/node_modules/send/index.js +++ /dev/null @@ -1,1142 +0,0 @@ -/*! - * send - * Copyright(c) 2012 TJ Holowaychuk - * Copyright(c) 2014-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var createError = require('http-errors') -var debug = require('debug')('send') -var deprecate = require('depd')('send') -var destroy = require('destroy') -var encodeUrl = require('encodeurl') -var escapeHtml = require('escape-html') -var etag = require('etag') -var fresh = require('fresh') -var fs = require('fs') -var mime = require('mime') -var ms = require('ms') -var onFinished = require('on-finished') -var parseRange = require('range-parser') -var path = require('path') -var statuses = require('statuses') -var Stream = require('stream') -var util = require('util') - -/** - * Path function references. - * @private - */ - -var extname = path.extname -var join = path.join -var normalize = path.normalize -var resolve = path.resolve -var sep = path.sep - -/** - * Regular expression for identifying a bytes Range header. - * @private - */ - -var BYTES_RANGE_REGEXP = /^ *bytes=/ - -/** - * Maximum value allowed for the max age. - * @private - */ - -var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1000 // 1 year - -/** - * Regular expression to match a path with a directory up component. - * @private - */ - -var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/ - -/** - * Module exports. - * @public - */ - -module.exports = send -module.exports.mime = mime - -/** - * Return a `SendStream` for `req` and `path`. - * - * @param {object} req - * @param {string} path - * @param {object} [options] - * @return {SendStream} - * @public - */ - -function send (req, path, options) { - return new SendStream(req, path, options) -} - -/** - * Initialize a `SendStream` with the given `path`. - * - * @param {Request} req - * @param {String} path - * @param {object} [options] - * @private - */ - -function SendStream (req, path, options) { - Stream.call(this) - - var opts = options || {} - - this.options = opts - this.path = path - this.req = req - - this._acceptRanges = opts.acceptRanges !== undefined - ? Boolean(opts.acceptRanges) - : true - - this._cacheControl = opts.cacheControl !== undefined - ? Boolean(opts.cacheControl) - : true - - this._etag = opts.etag !== undefined - ? Boolean(opts.etag) - : true - - this._dotfiles = opts.dotfiles !== undefined - ? opts.dotfiles - : 'ignore' - - if (this._dotfiles !== 'ignore' && this._dotfiles !== 'allow' && this._dotfiles !== 'deny') { - throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"') - } - - this._hidden = Boolean(opts.hidden) - - if (opts.hidden !== undefined) { - deprecate('hidden: use dotfiles: \'' + (this._hidden ? 'allow' : 'ignore') + '\' instead') - } - - // legacy support - if (opts.dotfiles === undefined) { - this._dotfiles = undefined - } - - this._extensions = opts.extensions !== undefined - ? normalizeList(opts.extensions, 'extensions option') - : [] - - this._immutable = opts.immutable !== undefined - ? Boolean(opts.immutable) - : false - - this._index = opts.index !== undefined - ? normalizeList(opts.index, 'index option') - : ['index.html'] - - this._lastModified = opts.lastModified !== undefined - ? Boolean(opts.lastModified) - : true - - this._maxage = opts.maxAge || opts.maxage - this._maxage = typeof this._maxage === 'string' - ? ms(this._maxage) - : Number(this._maxage) - this._maxage = !isNaN(this._maxage) - ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) - : 0 - - this._root = opts.root - ? resolve(opts.root) - : null - - if (!this._root && opts.from) { - this.from(opts.from) - } -} - -/** - * Inherits from `Stream`. - */ - -util.inherits(SendStream, Stream) - -/** - * Enable or disable etag generation. - * - * @param {Boolean} val - * @return {SendStream} - * @api public - */ - -SendStream.prototype.etag = deprecate.function(function etag (val) { - this._etag = Boolean(val) - debug('etag %s', this._etag) - return this -}, 'send.etag: pass etag as option') - -/** - * Enable or disable "hidden" (dot) files. - * - * @param {Boolean} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.hidden = deprecate.function(function hidden (val) { - this._hidden = Boolean(val) - this._dotfiles = undefined - debug('hidden %s', this._hidden) - return this -}, 'send.hidden: use dotfiles option') - -/** - * Set index `paths`, set to a falsy - * value to disable index support. - * - * @param {String|Boolean|Array} paths - * @return {SendStream} - * @api public - */ - -SendStream.prototype.index = deprecate.function(function index (paths) { - var index = !paths ? [] : normalizeList(paths, 'paths argument') - debug('index %o', paths) - this._index = index - return this -}, 'send.index: pass index as option') - -/** - * Set root `path`. - * - * @param {String} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.root = function root (path) { - this._root = resolve(String(path)) - debug('root %s', this._root) - return this -} - -SendStream.prototype.from = deprecate.function(SendStream.prototype.root, - 'send.from: pass root as option') - -SendStream.prototype.root = deprecate.function(SendStream.prototype.root, - 'send.root: pass root as option') - -/** - * Set max-age to `maxAge`. - * - * @param {Number} maxAge - * @return {SendStream} - * @api public - */ - -SendStream.prototype.maxage = deprecate.function(function maxage (maxAge) { - this._maxage = typeof maxAge === 'string' - ? ms(maxAge) - : Number(maxAge) - this._maxage = !isNaN(this._maxage) - ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) - : 0 - debug('max-age %d', this._maxage) - return this -}, 'send.maxage: pass maxAge as option') - -/** - * Emit error with `status`. - * - * @param {number} status - * @param {Error} [err] - * @private - */ - -SendStream.prototype.error = function error (status, err) { - // emit if listeners instead of responding - if (hasListeners(this, 'error')) { - return this.emit('error', createHttpError(status, err)) - } - - var res = this.res - var msg = statuses.message[status] || String(status) - var doc = createHtmlDocument('Error', escapeHtml(msg)) - - // clear existing headers - clearHeaders(res) - - // add error headers - if (err && err.headers) { - setHeaders(res, err.headers) - } - - // send basic response - res.statusCode = status - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', Buffer.byteLength(doc)) - res.setHeader('Content-Security-Policy', "default-src 'none'") - res.setHeader('X-Content-Type-Options', 'nosniff') - res.end(doc) -} - -/** - * Check if the pathname ends with "/". - * - * @return {boolean} - * @private - */ - -SendStream.prototype.hasTrailingSlash = function hasTrailingSlash () { - return this.path[this.path.length - 1] === '/' -} - -/** - * Check if this is a conditional GET request. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isConditionalGET = function isConditionalGET () { - return this.req.headers['if-match'] || - this.req.headers['if-unmodified-since'] || - this.req.headers['if-none-match'] || - this.req.headers['if-modified-since'] -} - -/** - * Check if the request preconditions failed. - * - * @return {boolean} - * @private - */ - -SendStream.prototype.isPreconditionFailure = function isPreconditionFailure () { - var req = this.req - var res = this.res - - // if-match - var match = req.headers['if-match'] - if (match) { - var etag = res.getHeader('ETag') - return !etag || (match !== '*' && parseTokenList(match).every(function (match) { - return match !== etag && match !== 'W/' + etag && 'W/' + match !== etag - })) - } - - // if-unmodified-since - var unmodifiedSince = parseHttpDate(req.headers['if-unmodified-since']) - if (!isNaN(unmodifiedSince)) { - var lastModified = parseHttpDate(res.getHeader('Last-Modified')) - return isNaN(lastModified) || lastModified > unmodifiedSince - } - - return false -} - -/** - * Strip various content header fields for a change in entity. - * - * @private - */ - -SendStream.prototype.removeContentHeaderFields = function removeContentHeaderFields () { - var res = this.res - - res.removeHeader('Content-Encoding') - res.removeHeader('Content-Language') - res.removeHeader('Content-Length') - res.removeHeader('Content-Range') - res.removeHeader('Content-Type') -} - -/** - * Respond with 304 not modified. - * - * @api private - */ - -SendStream.prototype.notModified = function notModified () { - var res = this.res - debug('not modified') - this.removeContentHeaderFields() - res.statusCode = 304 - res.end() -} - -/** - * Raise error that headers already sent. - * - * @api private - */ - -SendStream.prototype.headersAlreadySent = function headersAlreadySent () { - var err = new Error('Can\'t set headers after they are sent.') - debug('headers already sent') - this.error(500, err) -} - -/** - * Check if the request is cacheable, aka - * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}). - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isCachable = function isCachable () { - var statusCode = this.res.statusCode - return (statusCode >= 200 && statusCode < 300) || - statusCode === 304 -} - -/** - * Handle stat() error. - * - * @param {Error} error - * @private - */ - -SendStream.prototype.onStatError = function onStatError (error) { - switch (error.code) { - case 'ENAMETOOLONG': - case 'ENOENT': - case 'ENOTDIR': - this.error(404, error) - break - default: - this.error(500, error) - break - } -} - -/** - * Check if the cache is fresh. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isFresh = function isFresh () { - return fresh(this.req.headers, { - etag: this.res.getHeader('ETag'), - 'last-modified': this.res.getHeader('Last-Modified') - }) -} - -/** - * Check if the range is fresh. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isRangeFresh = function isRangeFresh () { - var ifRange = this.req.headers['if-range'] - - if (!ifRange) { - return true - } - - // if-range as etag - if (ifRange.indexOf('"') !== -1) { - var etag = this.res.getHeader('ETag') - return Boolean(etag && ifRange.indexOf(etag) !== -1) - } - - // if-range as modified date - var lastModified = this.res.getHeader('Last-Modified') - return parseHttpDate(lastModified) <= parseHttpDate(ifRange) -} - -/** - * Redirect to path. - * - * @param {string} path - * @private - */ - -SendStream.prototype.redirect = function redirect (path) { - var res = this.res - - if (hasListeners(this, 'directory')) { - this.emit('directory', res, path) - return - } - - if (this.hasTrailingSlash()) { - this.error(403) - return - } - - var loc = encodeUrl(collapseLeadingSlashes(this.path + '/')) - var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc)) - - // redirect - res.statusCode = 301 - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', Buffer.byteLength(doc)) - res.setHeader('Content-Security-Policy', "default-src 'none'") - res.setHeader('X-Content-Type-Options', 'nosniff') - res.setHeader('Location', loc) - res.end(doc) -} - -/** - * Pipe to `res. - * - * @param {Stream} res - * @return {Stream} res - * @api public - */ - -SendStream.prototype.pipe = function pipe (res) { - // root path - var root = this._root - - // references - this.res = res - - // decode the path - var path = decode(this.path) - if (path === -1) { - this.error(400) - return res - } - - // null byte(s) - if (~path.indexOf('\0')) { - this.error(400) - return res - } - - var parts - if (root !== null) { - // normalize - if (path) { - path = normalize('.' + sep + path) - } - - // malicious path - if (UP_PATH_REGEXP.test(path)) { - debug('malicious path "%s"', path) - this.error(403) - return res - } - - // explode path parts - parts = path.split(sep) - - // join / normalize from optional root dir - path = normalize(join(root, path)) - } else { - // ".." is malicious without "root" - if (UP_PATH_REGEXP.test(path)) { - debug('malicious path "%s"', path) - this.error(403) - return res - } - - // explode path parts - parts = normalize(path).split(sep) - - // resolve the path - path = resolve(path) - } - - // dotfile handling - if (containsDotFile(parts)) { - var access = this._dotfiles - - // legacy support - if (access === undefined) { - access = parts[parts.length - 1][0] === '.' - ? (this._hidden ? 'allow' : 'ignore') - : 'allow' - } - - debug('%s dotfile "%s"', access, path) - switch (access) { - case 'allow': - break - case 'deny': - this.error(403) - return res - case 'ignore': - default: - this.error(404) - return res - } - } - - // index file support - if (this._index.length && this.hasTrailingSlash()) { - this.sendIndex(path) - return res - } - - this.sendFile(path) - return res -} - -/** - * Transfer `path`. - * - * @param {String} path - * @api public - */ - -SendStream.prototype.send = function send (path, stat) { - var len = stat.size - var options = this.options - var opts = {} - var res = this.res - var req = this.req - var ranges = req.headers.range - var offset = options.start || 0 - - if (headersSent(res)) { - // impossible to send now - this.headersAlreadySent() - return - } - - debug('pipe "%s"', path) - - // set header fields - this.setHeader(path, stat) - - // set content-type - this.type(path) - - // conditional GET support - if (this.isConditionalGET()) { - if (this.isPreconditionFailure()) { - this.error(412) - return - } - - if (this.isCachable() && this.isFresh()) { - this.notModified() - return - } - } - - // adjust len to start/end options - len = Math.max(0, len - offset) - if (options.end !== undefined) { - var bytes = options.end - offset + 1 - if (len > bytes) len = bytes - } - - // Range support - if (this._acceptRanges && BYTES_RANGE_REGEXP.test(ranges)) { - // parse - ranges = parseRange(len, ranges, { - combine: true - }) - - // If-Range support - if (!this.isRangeFresh()) { - debug('range stale') - ranges = -2 - } - - // unsatisfiable - if (ranges === -1) { - debug('range unsatisfiable') - - // Content-Range - res.setHeader('Content-Range', contentRange('bytes', len)) - - // 416 Requested Range Not Satisfiable - return this.error(416, { - headers: { 'Content-Range': res.getHeader('Content-Range') } - }) - } - - // valid (syntactically invalid/multiple ranges are treated as a regular response) - if (ranges !== -2 && ranges.length === 1) { - debug('range %j', ranges) - - // Content-Range - res.statusCode = 206 - res.setHeader('Content-Range', contentRange('bytes', len, ranges[0])) - - // adjust for requested range - offset += ranges[0].start - len = ranges[0].end - ranges[0].start + 1 - } - } - - // clone options - for (var prop in options) { - opts[prop] = options[prop] - } - - // set read options - opts.start = offset - opts.end = Math.max(offset, offset + len - 1) - - // content-length - res.setHeader('Content-Length', len) - - // HEAD support - if (req.method === 'HEAD') { - res.end() - return - } - - this.stream(path, opts) -} - -/** - * Transfer file for `path`. - * - * @param {String} path - * @api private - */ -SendStream.prototype.sendFile = function sendFile (path) { - var i = 0 - var self = this - - debug('stat "%s"', path) - fs.stat(path, function onstat (err, stat) { - if (err && err.code === 'ENOENT' && !extname(path) && path[path.length - 1] !== sep) { - // not found, check extensions - return next(err) - } - if (err) return self.onStatError(err) - if (stat.isDirectory()) return self.redirect(path) - self.emit('file', path, stat) - self.send(path, stat) - }) - - function next (err) { - if (self._extensions.length <= i) { - return err - ? self.onStatError(err) - : self.error(404) - } - - var p = path + '.' + self._extensions[i++] - - debug('stat "%s"', p) - fs.stat(p, function (err, stat) { - if (err) return next(err) - if (stat.isDirectory()) return next() - self.emit('file', p, stat) - self.send(p, stat) - }) - } -} - -/** - * Transfer index for `path`. - * - * @param {String} path - * @api private - */ -SendStream.prototype.sendIndex = function sendIndex (path) { - var i = -1 - var self = this - - function next (err) { - if (++i >= self._index.length) { - if (err) return self.onStatError(err) - return self.error(404) - } - - var p = join(path, self._index[i]) - - debug('stat "%s"', p) - fs.stat(p, function (err, stat) { - if (err) return next(err) - if (stat.isDirectory()) return next() - self.emit('file', p, stat) - self.send(p, stat) - }) - } - - next() -} - -/** - * Stream `path` to the response. - * - * @param {String} path - * @param {Object} options - * @api private - */ - -SendStream.prototype.stream = function stream (path, options) { - var self = this - var res = this.res - - // pipe - var stream = fs.createReadStream(path, options) - this.emit('stream', stream) - stream.pipe(res) - - // cleanup - function cleanup () { - destroy(stream, true) - } - - // response finished, cleanup - onFinished(res, cleanup) - - // error handling - stream.on('error', function onerror (err) { - // clean up stream early - cleanup() - - // error - self.onStatError(err) - }) - - // end - stream.on('end', function onend () { - self.emit('end') - }) -} - -/** - * Set content-type based on `path` - * if it hasn't been explicitly set. - * - * @param {String} path - * @api private - */ - -SendStream.prototype.type = function type (path) { - var res = this.res - - if (res.getHeader('Content-Type')) return - - var type = mime.lookup(path) - - if (!type) { - debug('no content-type') - return - } - - var charset = mime.charsets.lookup(type) - - debug('content-type %s', type) - res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : '')) -} - -/** - * Set response header fields, most - * fields may be pre-defined. - * - * @param {String} path - * @param {Object} stat - * @api private - */ - -SendStream.prototype.setHeader = function setHeader (path, stat) { - var res = this.res - - this.emit('headers', res, path, stat) - - if (this._acceptRanges && !res.getHeader('Accept-Ranges')) { - debug('accept ranges') - res.setHeader('Accept-Ranges', 'bytes') - } - - if (this._cacheControl && !res.getHeader('Cache-Control')) { - var cacheControl = 'public, max-age=' + Math.floor(this._maxage / 1000) - - if (this._immutable) { - cacheControl += ', immutable' - } - - debug('cache-control %s', cacheControl) - res.setHeader('Cache-Control', cacheControl) - } - - if (this._lastModified && !res.getHeader('Last-Modified')) { - var modified = stat.mtime.toUTCString() - debug('modified %s', modified) - res.setHeader('Last-Modified', modified) - } - - if (this._etag && !res.getHeader('ETag')) { - var val = etag(stat) - debug('etag %s', val) - res.setHeader('ETag', val) - } -} - -/** - * Clear all headers from a response. - * - * @param {object} res - * @private - */ - -function clearHeaders (res) { - var headers = getHeaderNames(res) - - for (var i = 0; i < headers.length; i++) { - res.removeHeader(headers[i]) - } -} - -/** - * Collapse all leading slashes into a single slash - * - * @param {string} str - * @private - */ -function collapseLeadingSlashes (str) { - for (var i = 0; i < str.length; i++) { - if (str[i] !== '/') { - break - } - } - - return i > 1 - ? '/' + str.substr(i) - : str -} - -/** - * Determine if path parts contain a dotfile. - * - * @api private - */ - -function containsDotFile (parts) { - for (var i = 0; i < parts.length; i++) { - var part = parts[i] - if (part.length > 1 && part[0] === '.') { - return true - } - } - - return false -} - -/** - * Create a Content-Range header. - * - * @param {string} type - * @param {number} size - * @param {array} [range] - */ - -function contentRange (type, size, range) { - return type + ' ' + (range ? range.start + '-' + range.end : '*') + '/' + size -} - -/** - * Create a minimal HTML document. - * - * @param {string} title - * @param {string} body - * @private - */ - -function createHtmlDocument (title, body) { - return '\n' + - '\n' + - '\n' + - '\n' + - '' + title + '\n' + - '\n' + - '\n' + - '
' + body + '
\n' + - '\n' + - '\n' -} - -/** - * Create a HttpError object from simple arguments. - * - * @param {number} status - * @param {Error|object} err - * @private - */ - -function createHttpError (status, err) { - if (!err) { - return createError(status) - } - - return err instanceof Error - ? createError(status, err, { expose: false }) - : createError(status, err) -} - -/** - * decodeURIComponent. - * - * Allows V8 to only deoptimize this fn instead of all - * of send(). - * - * @param {String} path - * @api private - */ - -function decode (path) { - try { - return decodeURIComponent(path) - } catch (err) { - return -1 - } -} - -/** - * Get the header names on a respnse. - * - * @param {object} res - * @returns {array[string]} - * @private - */ - -function getHeaderNames (res) { - return typeof res.getHeaderNames !== 'function' - ? Object.keys(res._headers || {}) - : res.getHeaderNames() -} - -/** - * Determine if emitter has listeners of a given type. - * - * The way to do this check is done three different ways in Node.js >= 0.8 - * so this consolidates them into a minimal set using instance methods. - * - * @param {EventEmitter} emitter - * @param {string} type - * @returns {boolean} - * @private - */ - -function hasListeners (emitter, type) { - var count = typeof emitter.listenerCount !== 'function' - ? emitter.listeners(type).length - : emitter.listenerCount(type) - - return count > 0 -} - -/** - * Determine if the response headers have been sent. - * - * @param {object} res - * @returns {boolean} - * @private - */ - -function headersSent (res) { - return typeof res.headersSent !== 'boolean' - ? Boolean(res._header) - : res.headersSent -} - -/** - * Normalize the index option into an array. - * - * @param {boolean|string|array} val - * @param {string} name - * @private - */ - -function normalizeList (val, name) { - var list = [].concat(val || []) - - for (var i = 0; i < list.length; i++) { - if (typeof list[i] !== 'string') { - throw new TypeError(name + ' must be array of strings or false') - } - } - - return list -} - -/** - * Parse an HTTP Date into a number. - * - * @param {string} date - * @private - */ - -function parseHttpDate (date) { - var timestamp = date && Date.parse(date) - - return typeof timestamp === 'number' - ? timestamp - : NaN -} - -/** - * Parse a HTTP token list. - * - * @param {string} str - * @private - */ - -function parseTokenList (str) { - var end = 0 - var list = [] - var start = 0 - - // gather tokens - for (var i = 0, len = str.length; i < len; i++) { - switch (str.charCodeAt(i)) { - case 0x20: /* */ - if (start === end) { - start = end = i + 1 - } - break - case 0x2c: /* , */ - if (start !== end) { - list.push(str.substring(start, end)) - } - start = end = i + 1 - break - default: - end = i + 1 - break - } - } - - // final token - if (start !== end) { - list.push(str.substring(start, end)) - } - - return list -} - -/** - * Set an object of headers on a response. - * - * @param {object} res - * @param {object} headers - * @private - */ - -function setHeaders (res, headers) { - var keys = Object.keys(headers) - - for (var i = 0; i < keys.length; i++) { - var key = keys[i] - res.setHeader(key, headers[key]) - } -} diff --git a/node_modules/send/node_modules/ms/index.js b/node_modules/send/node_modules/ms/index.js deleted file mode 100644 index ea734fb..0000000 --- a/node_modules/send/node_modules/ms/index.js +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function (val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} diff --git a/node_modules/send/node_modules/ms/license.md b/node_modules/send/node_modules/ms/license.md deleted file mode 100644 index fa5d39b..0000000 --- a/node_modules/send/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Vercel, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/send/node_modules/ms/package.json b/node_modules/send/node_modules/ms/package.json deleted file mode 100644 index 4997189..0000000 --- a/node_modules/send/node_modules/ms/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "ms", - "version": "2.1.3", - "description": "Tiny millisecond conversion utility", - "repository": "vercel/ms", - "main": "./index", - "files": [ - "index.js" - ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "license": "MIT", - "devDependencies": { - "eslint": "4.18.2", - "expect.js": "0.3.1", - "husky": "0.14.3", - "lint-staged": "5.0.0", - "mocha": "4.0.1", - "prettier": "2.0.5" - } -} diff --git a/node_modules/send/node_modules/ms/readme.md b/node_modules/send/node_modules/ms/readme.md deleted file mode 100644 index 0fc1abb..0000000 --- a/node_modules/send/node_modules/ms/readme.md +++ /dev/null @@ -1,59 +0,0 @@ -# ms - -![CI](https://github.com/vercel/ms/workflows/CI/badge.svg) - -Use this package to easily convert various time formats to milliseconds. - -## Examples - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('1y') // 31557600000 -ms('100') // 100 -ms('-3 days') // -259200000 -ms('-1h') // -3600000 -ms('-200') // -200 -``` - -### Convert from Milliseconds - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(-3 * 60000) // "-3m" -ms(ms('10 hours')) // "10h" -``` - -### Time Format Written-Out - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(-3 * 60000, { long: true }) // "-3 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -## Features - -- Works both in [Node.js](https://nodejs.org) and in the browser -- If a number is supplied to `ms`, a string with a unit is returned -- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) -- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned - -## Related Packages - -- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. - -## Caught a Bug? - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! - -As always, you can run the tests using: `npm test` diff --git a/node_modules/send/package.json b/node_modules/send/package.json deleted file mode 100644 index 2d2b805..0000000 --- a/node_modules/send/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "send", - "description": "Better streaming static file server with Range and conditional-GET support", - "version": "0.19.2", - "author": "TJ Holowaychuk ", - "contributors": [ - "Douglas Christopher Wilson ", - "James Wyatt Cready ", - "Jesús Leganés Combarro " - ], - "license": "MIT", - "repository": "pillarjs/send", - "keywords": [ - "static", - "file", - "server" - ], - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "~0.5.2", - "http-errors": "~2.0.1", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "~2.4.1", - "range-parser": "~1.2.1", - "statuses": "~2.0.2" - }, - "devDependencies": { - "after": "0.8.2", - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.25.4", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "9.2.2", - "nyc": "15.1.0", - "supertest": "6.2.2" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "SECURITY.md", - "index.js" - ], - "engines": { - "node": ">= 0.8.0" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --check-leaks --reporter spec --bail", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/serve-static/HISTORY.md b/node_modules/serve-static/HISTORY.md deleted file mode 100644 index 9919669..0000000 --- a/node_modules/serve-static/HISTORY.md +++ /dev/null @@ -1,493 +0,0 @@ -1.16.3 / 2024-12-15 -=================== - -* deps: send@~0.19.1 - - deps: encodeurl@~2.0.0 - -1.16.2 / 2024-09-11 -=================== - -* deps: encodeurl@~2.0.0 - -1.16.1 / 2024-09-11 -=================== - -* deps: send@0.19.0 - -1.16.0 / 2024-09-10 -=================== - -* Remove link renderization in html while redirecting - - -1.15.0 / 2022-03-24 -=================== - - * deps: send@0.18.0 - - Fix emitted 416 error missing headers property - - Limit the headers removed for 304 response - - deps: depd@2.0.0 - - deps: destroy@1.2.0 - - deps: http-errors@2.0.0 - - deps: on-finished@2.4.1 - - deps: statuses@2.0.1 - -1.14.2 / 2021-12-15 -=================== - - * deps: send@0.17.2 - - deps: http-errors@1.8.1 - - deps: ms@2.1.3 - - pref: ignore empty http tokens - -1.14.1 / 2019-05-10 -=================== - - * Set stricter CSP header in redirect response - * deps: send@0.17.1 - - deps: range-parser@~1.2.1 - -1.14.0 / 2019-05-07 -=================== - - * deps: parseurl@~1.3.3 - * deps: send@0.17.0 - - deps: http-errors@~1.7.2 - - deps: mime@1.6.0 - - deps: ms@2.1.1 - - deps: statuses@~1.5.0 - - perf: remove redundant `path.normalize` call - -1.13.2 / 2018-02-07 -=================== - - * Fix incorrect end tag in redirects - * deps: encodeurl@~1.0.2 - - Fix encoding `%` as last character - * deps: send@0.16.2 - - deps: depd@~1.1.2 - - deps: encodeurl@~1.0.2 - - deps: statuses@~1.4.0 - -1.13.1 / 2017-09-29 -=================== - - * Fix regression when `root` is incorrectly set to a file - * deps: send@0.16.1 - -1.13.0 / 2017-09-27 -=================== - - * deps: send@0.16.0 - - Add 70 new types for file extensions - - Add `immutable` option - - Fix missing `` in default error & redirects - - Set charset as "UTF-8" for .js and .json - - Use instance methods on steam to check for listeners - - deps: mime@1.4.1 - - perf: improve path validation speed - -1.12.6 / 2017-09-22 -=================== - - * deps: send@0.15.6 - - deps: debug@2.6.9 - - perf: improve `If-Match` token parsing - * perf: improve slash collapsing - -1.12.5 / 2017-09-21 -=================== - - * deps: parseurl@~1.3.2 - - perf: reduce overhead for full URLs - - perf: unroll the "fast-path" `RegExp` - * deps: send@0.15.5 - - Fix handling of modified headers with invalid dates - - deps: etag@~1.8.1 - - deps: fresh@0.5.2 - -1.12.4 / 2017-08-05 -=================== - - * deps: send@0.15.4 - - deps: debug@2.6.8 - - deps: depd@~1.1.1 - - deps: http-errors@~1.6.2 - -1.12.3 / 2017-05-16 -=================== - - * deps: send@0.15.3 - - deps: debug@2.6.7 - -1.12.2 / 2017-04-26 -=================== - - * deps: send@0.15.2 - - deps: debug@2.6.4 - -1.12.1 / 2017-03-04 -=================== - - * deps: send@0.15.1 - - Fix issue when `Date.parse` does not return `NaN` on invalid date - - Fix strict violation in broken environments - -1.12.0 / 2017-02-25 -=================== - - * Send complete HTML document in redirect response - * Set default CSP header in redirect response - * deps: send@0.15.0 - - Fix false detection of `no-cache` request directive - - Fix incorrect result when `If-None-Match` has both `*` and ETags - - Fix weak `ETag` matching to match spec - - Remove usage of `res._headers` private field - - Support `If-Match` and `If-Unmodified-Since` headers - - Use `res.getHeaderNames()` when available - - Use `res.headersSent` when available - - deps: debug@2.6.1 - - deps: etag@~1.8.0 - - deps: fresh@0.5.0 - - deps: http-errors@~1.6.1 - -1.11.2 / 2017-01-23 -=================== - - * deps: send@0.14.2 - - deps: http-errors@~1.5.1 - - deps: ms@0.7.2 - - deps: statuses@~1.3.1 - -1.11.1 / 2016-06-10 -=================== - - * Fix redirect error when `req.url` contains raw non-URL characters - * deps: send@0.14.1 - -1.11.0 / 2016-06-07 -=================== - - * Use status code 301 for redirects - * deps: send@0.14.0 - - Add `acceptRanges` option - - Add `cacheControl` option - - Attempt to combine multiple ranges into single range - - Correctly inherit from `Stream` class - - Fix `Content-Range` header in 416 responses when using `start`/`end` options - - Fix `Content-Range` header missing from default 416 responses - - Ignore non-byte `Range` headers - - deps: http-errors@~1.5.0 - - deps: range-parser@~1.2.0 - - deps: statuses@~1.3.0 - - perf: remove argument reassignment - -1.10.3 / 2016-05-30 -=================== - - * deps: send@0.13.2 - - Fix invalid `Content-Type` header when `send.mime.default_type` unset - -1.10.2 / 2016-01-19 -=================== - - * deps: parseurl@~1.3.1 - - perf: enable strict mode - -1.10.1 / 2016-01-16 -=================== - - * deps: escape-html@~1.0.3 - - perf: enable strict mode - - perf: optimize string replacement - - perf: use faster string coercion - * deps: send@0.13.1 - - deps: depd@~1.1.0 - - deps: destroy@~1.0.4 - - deps: escape-html@~1.0.3 - - deps: range-parser@~1.0.3 - -1.10.0 / 2015-06-17 -=================== - - * Add `fallthrough` option - - Allows declaring this middleware is the final destination - - Provides better integration with Express patterns - * Fix reading options from options prototype - * Improve the default redirect response headers - * deps: escape-html@1.0.2 - * deps: send@0.13.0 - - Allow Node.js HTTP server to set `Date` response header - - Fix incorrectly removing `Content-Location` on 304 response - - Improve the default redirect response headers - - Send appropriate headers on default error response - - Use `http-errors` for standard emitted errors - - Use `statuses` instead of `http` module for status messages - - deps: escape-html@1.0.2 - - deps: etag@~1.7.0 - - deps: fresh@0.3.0 - - deps: on-finished@~2.3.0 - - perf: enable strict mode - - perf: remove unnecessary array allocations - * perf: enable strict mode - * perf: remove argument reassignment - -1.9.3 / 2015-05-14 -================== - - * deps: send@0.12.3 - - deps: debug@~2.2.0 - - deps: depd@~1.0.1 - - deps: etag@~1.6.0 - - deps: ms@0.7.1 - - deps: on-finished@~2.2.1 - -1.9.2 / 2015-03-14 -================== - - * deps: send@0.12.2 - - Throw errors early for invalid `extensions` or `index` options - - deps: debug@~2.1.3 - -1.9.1 / 2015-02-17 -================== - - * deps: send@0.12.1 - - Fix regression sending zero-length files - -1.9.0 / 2015-02-16 -================== - - * deps: send@0.12.0 - - Always read the stat size from the file - - Fix mutating passed-in `options` - - deps: mime@1.3.4 - -1.8.1 / 2015-01-20 -================== - - * Fix redirect loop in Node.js 0.11.14 - * deps: send@0.11.1 - - Fix root path disclosure - -1.8.0 / 2015-01-05 -================== - - * deps: send@0.11.0 - - deps: debug@~2.1.1 - - deps: etag@~1.5.1 - - deps: ms@0.7.0 - - deps: on-finished@~2.2.0 - -1.7.2 / 2015-01-02 -================== - - * Fix potential open redirect when mounted at root - -1.7.1 / 2014-10-22 -================== - - * deps: send@0.10.1 - - deps: on-finished@~2.1.1 - -1.7.0 / 2014-10-15 -================== - - * deps: send@0.10.0 - - deps: debug@~2.1.0 - - deps: depd@~1.0.0 - - deps: etag@~1.5.0 - -1.6.5 / 2015-02-04 -================== - - * Fix potential open redirect when mounted at root - - Back-ported from v1.7.2 - -1.6.4 / 2014-10-08 -================== - - * Fix redirect loop when index file serving disabled - -1.6.3 / 2014-09-24 -================== - - * deps: send@0.9.3 - - deps: etag@~1.4.0 - -1.6.2 / 2014-09-15 -================== - - * deps: send@0.9.2 - - deps: depd@0.4.5 - - deps: etag@~1.3.1 - - deps: range-parser@~1.0.2 - -1.6.1 / 2014-09-07 -================== - - * deps: send@0.9.1 - - deps: fresh@0.2.4 - -1.6.0 / 2014-09-07 -================== - - * deps: send@0.9.0 - - Add `lastModified` option - - Use `etag` to generate `ETag` header - - deps: debug@~2.0.0 - -1.5.4 / 2014-09-04 -================== - - * deps: send@0.8.5 - - Fix a path traversal issue when using `root` - - Fix malicious path detection for empty string path - -1.5.3 / 2014-08-17 -================== - - * deps: send@0.8.3 - -1.5.2 / 2014-08-14 -================== - - * deps: send@0.8.2 - - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` - -1.5.1 / 2014-08-09 -================== - - * Fix parsing of weird `req.originalUrl` values - * deps: parseurl@~1.3.0 - * deps: utils-merge@1.0.0 - -1.5.0 / 2014-08-05 -================== - - * deps: send@0.8.1 - - Add `extensions` option - -1.4.4 / 2014-08-04 -================== - - * deps: send@0.7.4 - - Fix serving index files without root dir - -1.4.3 / 2014-07-29 -================== - - * deps: send@0.7.3 - - Fix incorrect 403 on Windows and Node.js 0.11 - -1.4.2 / 2014-07-27 -================== - - * deps: send@0.7.2 - - deps: depd@0.4.4 - -1.4.1 / 2014-07-26 -================== - - * deps: send@0.7.1 - - deps: depd@0.4.3 - -1.4.0 / 2014-07-21 -================== - - * deps: parseurl@~1.2.0 - - Cache URLs based on original value - - Remove no-longer-needed URL mis-parse work-around - - Simplify the "fast-path" `RegExp` - * deps: send@0.7.0 - - Add `dotfiles` option - - deps: debug@1.0.4 - - deps: depd@0.4.2 - -1.3.2 / 2014-07-11 -================== - - * deps: send@0.6.0 - - Cap `maxAge` value to 1 year - - deps: debug@1.0.3 - -1.3.1 / 2014-07-09 -================== - - * deps: parseurl@~1.1.3 - - faster parsing of href-only URLs - -1.3.0 / 2014-06-28 -================== - - * Add `setHeaders` option - * Include HTML link in redirect response - * deps: send@0.5.0 - - Accept string for `maxAge` (converted by `ms`) - -1.2.3 / 2014-06-11 -================== - - * deps: send@0.4.3 - - Do not throw un-catchable error on file open race condition - - Use `escape-html` for HTML escaping - - deps: debug@1.0.2 - - deps: finished@1.2.2 - - deps: fresh@0.2.2 - -1.2.2 / 2014-06-09 -================== - - * deps: send@0.4.2 - - fix "event emitter leak" warnings - - deps: debug@1.0.1 - - deps: finished@1.2.1 - -1.2.1 / 2014-06-02 -================== - - * use `escape-html` for escaping - * deps: send@0.4.1 - - Send `max-age` in `Cache-Control` in correct format - -1.2.0 / 2014-05-29 -================== - - * deps: send@0.4.0 - - Calculate ETag with md5 for reduced collisions - - Fix wrong behavior when index file matches directory - - Ignore stream errors after request ends - - Skip directories in index file search - - deps: debug@0.8.1 - -1.1.0 / 2014-04-24 -================== - - * Accept options directly to `send` module - * deps: send@0.3.0 - -1.0.4 / 2014-04-07 -================== - - * Resolve relative paths at middleware setup - * Use parseurl to parse the URL from request - -1.0.3 / 2014-03-20 -================== - - * Do not rely on connect-like environments - -1.0.2 / 2014-03-06 -================== - - * deps: send@0.2.0 - -1.0.1 / 2014-03-05 -================== - - * Add mime export for back-compat - -1.0.0 / 2014-03-05 -================== - - * Genesis from `connect` diff --git a/node_modules/serve-static/LICENSE b/node_modules/serve-static/LICENSE deleted file mode 100644 index cbe62e8..0000000 --- a/node_modules/serve-static/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -(The MIT License) - -Copyright (c) 2010 Sencha Inc. -Copyright (c) 2011 LearnBoost -Copyright (c) 2011 TJ Holowaychuk -Copyright (c) 2014-2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/serve-static/README.md b/node_modules/serve-static/README.md deleted file mode 100644 index 262d944..0000000 --- a/node_modules/serve-static/README.md +++ /dev/null @@ -1,257 +0,0 @@ -# serve-static - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Linux Build][github-actions-ci-image]][github-actions-ci-url] -[![Windows Build][appveyor-image]][appveyor-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install serve-static -``` - -## API - -```js -var serveStatic = require('serve-static') -``` - -### serveStatic(root, options) - -Create a new middleware function to serve files from within a given root -directory. The file to serve will be determined by combining `req.url` -with the provided root directory. When a file is not found, instead of -sending a 404 response, this module will instead call `next()` to move on -to the next middleware, allowing for stacking and fall-backs. - -#### Options - -##### acceptRanges - -Enable or disable accepting ranged requests, defaults to true. -Disabling this will not send `Accept-Ranges` and ignore the contents -of the `Range` request header. - -##### cacheControl - -Enable or disable setting `Cache-Control` response header, defaults to -true. Disabling this will ignore the `immutable` and `maxAge` options. - -##### dotfiles - - Set how "dotfiles" are treated when encountered. A dotfile is a file -or directory that begins with a dot ("."). Note this check is done on -the path itself without checking if the path actually exists on the -disk. If `root` is specified, only the dotfiles above the root are -checked (i.e. the root itself can be within a dotfile when set -to "deny"). - - - `'allow'` No special treatment for dotfiles. - - `'deny'` Deny a request for a dotfile and 403/`next()`. - - `'ignore'` Pretend like the dotfile does not exist and 404/`next()`. - -The default value is similar to `'ignore'`, with the exception that this -default will not ignore the files within a directory that begins with a dot. - -##### etag - -Enable or disable etag generation, defaults to true. - -##### extensions - -Set file extension fallbacks. When set, if a file is not found, the given -extensions will be added to the file name and search for. The first that -exists will be served. Example: `['html', 'htm']`. - -The default value is `false`. - -##### fallthrough - -Set the middleware to have client errors fall-through as just unhandled -requests, otherwise forward a client error. The difference is that client -errors like a bad request or a request to a non-existent file will cause -this middleware to simply `next()` to your next middleware when this value -is `true`. When this value is `false`, these errors (even 404s), will invoke -`next(err)`. - -Typically `true` is desired such that multiple physical directories can be -mapped to the same web address or for routes to fill in non-existent files. - -The value `false` can be used if this middleware is mounted at a path that -is designed to be strictly a single file system directory, which allows for -short-circuiting 404s for less overhead. This middleware will also reply to -all methods. - -The default value is `true`. - -##### immutable - -Enable or disable the `immutable` directive in the `Cache-Control` response -header, defaults to `false`. If set to `true`, the `maxAge` option should -also be specified to enable caching. The `immutable` directive will prevent -supported clients from making conditional requests during the life of the -`maxAge` option to check if the file has changed. - -##### index - -By default this module will send "index.html" files in response to a request -on a directory. To disable this set `false` or to supply a new index pass a -string or an array in preferred order. - -##### lastModified - -Enable or disable `Last-Modified` header, defaults to true. Uses the file -system's last modified value. - -##### maxAge - -Provide a max-age in milliseconds for http caching, defaults to 0. This -can also be a string accepted by the [ms](https://www.npmjs.org/package/ms#readme) -module. - -##### redirect - -Redirect to trailing "/" when the pathname is a dir. Defaults to `true`. - -##### setHeaders - -Function to set custom headers on response. Alterations to the headers need to -occur synchronously. The function is called as `fn(res, path, stat)`, where -the arguments are: - - - `res` the response object - - `path` the file path that is being sent - - `stat` the stat object of the file that is being sent - -## Examples - -### Serve files with vanilla node.js http server - -```js -var finalhandler = require('finalhandler') -var http = require('http') -var serveStatic = require('serve-static') - -// Serve up public/ftp folder -var serve = serveStatic('public/ftp', { index: ['index.html', 'index.htm'] }) - -// Create server -var server = http.createServer(function onRequest (req, res) { - serve(req, res, finalhandler(req, res)) -}) - -// Listen -server.listen(3000) -``` - -### Serve all files as downloads - -```js -var contentDisposition = require('content-disposition') -var finalhandler = require('finalhandler') -var http = require('http') -var serveStatic = require('serve-static') - -// Serve up public/ftp folder -var serve = serveStatic('public/ftp', { - index: false, - setHeaders: setHeaders -}) - -// Set header to force download -function setHeaders (res, path) { - res.setHeader('Content-Disposition', contentDisposition(path)) -} - -// Create server -var server = http.createServer(function onRequest (req, res) { - serve(req, res, finalhandler(req, res)) -}) - -// Listen -server.listen(3000) -``` - -### Serving using express - -#### Simple - -This is a simple example of using Express. - -```js -var express = require('express') -var serveStatic = require('serve-static') - -var app = express() - -app.use(serveStatic('public/ftp', { index: ['default.html', 'default.htm'] })) -app.listen(3000) -``` - -#### Multiple roots - -This example shows a simple way to search through multiple directories. -Files are searched for in `public-optimized/` first, then `public/` second -as a fallback. - -```js -var express = require('express') -var path = require('path') -var serveStatic = require('serve-static') - -var app = express() - -app.use(serveStatic(path.join(__dirname, 'public-optimized'))) -app.use(serveStatic(path.join(__dirname, 'public'))) -app.listen(3000) -``` - -#### Different settings for paths - -This example shows how to set a different max age depending on the served -file type. In this example, HTML files are not cached, while everything else -is for 1 day. - -```js -var express = require('express') -var path = require('path') -var serveStatic = require('serve-static') - -var app = express() - -app.use(serveStatic(path.join(__dirname, 'public'), { - maxAge: '1d', - setHeaders: setCustomCacheControl -})) - -app.listen(3000) - -function setCustomCacheControl (res, path) { - if (serveStatic.mime.lookup(path) === 'text/html') { - // Custom Cache-Control for HTML files - res.setHeader('Cache-Control', 'public, max-age=0') - } -} -``` - -## License - -[MIT](LICENSE) - -[appveyor-image]: https://badgen.net/appveyor/ci/dougwilson/serve-static/master?label=windows -[appveyor-url]: https://ci.appveyor.com/project/dougwilson/serve-static -[coveralls-image]: https://badgen.net/coveralls/c/github/expressjs/serve-static/master -[coveralls-url]: https://coveralls.io/r/expressjs/serve-static?branch=master -[github-actions-ci-image]: https://badgen.net/github/checks/expressjs/serve-static/master?label=linux -[github-actions-ci-url]: https://github.com/expressjs/serve-static/actions/workflows/ci.yml -[node-image]: https://badgen.net/npm/node/serve-static -[node-url]: https://nodejs.org/en/download/ -[npm-downloads-image]: https://badgen.net/npm/dm/serve-static -[npm-url]: https://npmjs.org/package/serve-static -[npm-version-image]: https://badgen.net/npm/v/serve-static diff --git a/node_modules/serve-static/index.js b/node_modules/serve-static/index.js deleted file mode 100644 index 3f3e64e..0000000 --- a/node_modules/serve-static/index.js +++ /dev/null @@ -1,209 +0,0 @@ -/*! - * serve-static - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * Copyright(c) 2014-2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var encodeUrl = require('encodeurl') -var escapeHtml = require('escape-html') -var parseUrl = require('parseurl') -var resolve = require('path').resolve -var send = require('send') -var url = require('url') - -/** - * Module exports. - * @public - */ - -module.exports = serveStatic -module.exports.mime = send.mime - -/** - * @param {string} root - * @param {object} [options] - * @return {function} - * @public - */ - -function serveStatic (root, options) { - if (!root) { - throw new TypeError('root path required') - } - - if (typeof root !== 'string') { - throw new TypeError('root path must be a string') - } - - // copy options object - var opts = Object.create(options || null) - - // fall-though - var fallthrough = opts.fallthrough !== false - - // default redirect - var redirect = opts.redirect !== false - - // headers listener - var setHeaders = opts.setHeaders - - if (setHeaders && typeof setHeaders !== 'function') { - throw new TypeError('option setHeaders must be function') - } - - // setup options for send - opts.maxage = opts.maxage || opts.maxAge || 0 - opts.root = resolve(root) - - // construct directory listener - var onDirectory = redirect - ? createRedirectDirectoryListener() - : createNotFoundDirectoryListener() - - return function serveStatic (req, res, next) { - if (req.method !== 'GET' && req.method !== 'HEAD') { - if (fallthrough) { - return next() - } - - // method not allowed - res.statusCode = 405 - res.setHeader('Allow', 'GET, HEAD') - res.setHeader('Content-Length', '0') - res.end() - return - } - - var forwardError = !fallthrough - var originalUrl = parseUrl.original(req) - var path = parseUrl(req).pathname - - // make sure redirect occurs at mount - if (path === '/' && originalUrl.pathname.substr(-1) !== '/') { - path = '' - } - - // create send stream - var stream = send(req, path, opts) - - // add directory handler - stream.on('directory', onDirectory) - - // add headers listener - if (setHeaders) { - stream.on('headers', setHeaders) - } - - // add file listener for fallthrough - if (fallthrough) { - stream.on('file', function onFile () { - // once file is determined, always forward error - forwardError = true - }) - } - - // forward errors - stream.on('error', function error (err) { - if (forwardError || !(err.statusCode < 500)) { - next(err) - return - } - - next() - }) - - // pipe - stream.pipe(res) - } -} - -/** - * Collapse all leading slashes into a single slash - * @private - */ -function collapseLeadingSlashes (str) { - for (var i = 0; i < str.length; i++) { - if (str.charCodeAt(i) !== 0x2f /* / */) { - break - } - } - - return i > 1 - ? '/' + str.substr(i) - : str -} - -/** - * Create a minimal HTML document. - * - * @param {string} title - * @param {string} body - * @private - */ - -function createHtmlDocument (title, body) { - return '\n' + - '\n' + - '\n' + - '\n' + - '' + title + '\n' + - '\n' + - '\n' + - '
' + body + '
\n' + - '\n' + - '\n' -} - -/** - * Create a directory listener that just 404s. - * @private - */ - -function createNotFoundDirectoryListener () { - return function notFound () { - this.error(404) - } -} - -/** - * Create a directory listener that performs a redirect. - * @private - */ - -function createRedirectDirectoryListener () { - return function redirect (res) { - if (this.hasTrailingSlash()) { - this.error(404) - return - } - - // get original URL - var originalUrl = parseUrl.original(this.req) - - // append trailing slash - originalUrl.path = null - originalUrl.pathname = collapseLeadingSlashes(originalUrl.pathname + '/') - - // reformat the URL - var loc = encodeUrl(url.format(originalUrl)) - var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc)) - - // send redirect response - res.statusCode = 301 - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', Buffer.byteLength(doc)) - res.setHeader('Content-Security-Policy', "default-src 'none'") - res.setHeader('X-Content-Type-Options', 'nosniff') - res.setHeader('Location', loc) - res.end(doc) - } -} diff --git a/node_modules/serve-static/package.json b/node_modules/serve-static/package.json deleted file mode 100644 index b268e48..0000000 --- a/node_modules/serve-static/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "serve-static", - "description": "Serve static files", - "version": "1.16.3", - "author": "Douglas Christopher Wilson ", - "license": "MIT", - "repository": "expressjs/serve-static", - "dependencies": { - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "~0.19.1" - }, - "devDependencies": { - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.25.4", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "9.2.2", - "nyc": "15.1.0", - "safe-buffer": "5.2.1", - "supertest": "6.2.2" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "engines": { - "node": ">= 0.8.0" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/node_modules/setprototypeof/LICENSE b/node_modules/setprototypeof/LICENSE deleted file mode 100644 index 61afa2f..0000000 --- a/node_modules/setprototypeof/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2015, Wes Todd - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/setprototypeof/README.md b/node_modules/setprototypeof/README.md deleted file mode 100644 index 791eeff..0000000 --- a/node_modules/setprototypeof/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Polyfill for `Object.setPrototypeOf` - -[![NPM Version](https://img.shields.io/npm/v/setprototypeof.svg)](https://npmjs.org/package/setprototypeof) -[![NPM Downloads](https://img.shields.io/npm/dm/setprototypeof.svg)](https://npmjs.org/package/setprototypeof) -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/standard/standard) - -A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8. - -## Usage: - -``` -$ npm install --save setprototypeof -``` - -```javascript -var setPrototypeOf = require('setprototypeof') - -var obj = {} -setPrototypeOf(obj, { - foo: function () { - return 'bar' - } -}) -obj.foo() // bar -``` - -TypeScript is also supported: - -```typescript -import setPrototypeOf from 'setprototypeof' -``` diff --git a/node_modules/setprototypeof/index.d.ts b/node_modules/setprototypeof/index.d.ts deleted file mode 100644 index f108ecd..0000000 --- a/node_modules/setprototypeof/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function setPrototypeOf(o: any, proto: object | null): any; -export = setPrototypeOf; diff --git a/node_modules/setprototypeof/index.js b/node_modules/setprototypeof/index.js deleted file mode 100644 index c527055..0000000 --- a/node_modules/setprototypeof/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict' -/* eslint no-proto: 0 */ -module.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties) - -function setProtoOf (obj, proto) { - obj.__proto__ = proto - return obj -} - -function mixinProperties (obj, proto) { - for (var prop in proto) { - if (!Object.prototype.hasOwnProperty.call(obj, prop)) { - obj[prop] = proto[prop] - } - } - return obj -} diff --git a/node_modules/setprototypeof/package.json b/node_modules/setprototypeof/package.json deleted file mode 100644 index f20915b..0000000 --- a/node_modules/setprototypeof/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "setprototypeof", - "version": "1.2.0", - "description": "A small polyfill for Object.setprototypeof", - "main": "index.js", - "typings": "index.d.ts", - "scripts": { - "test": "standard && mocha", - "testallversions": "npm run node010 && npm run node4 && npm run node6 && npm run node9 && npm run node11", - "testversion": "docker run -it --rm -v $(PWD):/usr/src/app -w /usr/src/app node:${NODE_VER} npm install mocha@${MOCHA_VER:-latest} && npm t", - "node010": "NODE_VER=0.10 MOCHA_VER=3 npm run testversion", - "node4": "NODE_VER=4 npm run testversion", - "node6": "NODE_VER=6 npm run testversion", - "node9": "NODE_VER=9 npm run testversion", - "node11": "NODE_VER=11 npm run testversion", - "prepublishOnly": "npm t", - "postpublish": "git push origin && git push origin --tags" - }, - "repository": { - "type": "git", - "url": "https://github.com/wesleytodd/setprototypeof.git" - }, - "keywords": [ - "polyfill", - "object", - "setprototypeof" - ], - "author": "Wes Todd", - "license": "ISC", - "bugs": { - "url": "https://github.com/wesleytodd/setprototypeof/issues" - }, - "homepage": "https://github.com/wesleytodd/setprototypeof", - "devDependencies": { - "mocha": "^6.1.4", - "standard": "^13.0.2" - } -} diff --git a/node_modules/setprototypeof/test/index.js b/node_modules/setprototypeof/test/index.js deleted file mode 100644 index afeb4dd..0000000 --- a/node_modules/setprototypeof/test/index.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict' -/* eslint-env mocha */ -/* eslint no-proto: 0 */ -var assert = require('assert') -var setPrototypeOf = require('..') - -describe('setProtoOf(obj, proto)', function () { - it('should merge objects', function () { - var obj = { a: 1, b: 2 } - var proto = { b: 3, c: 4 } - var mergeObj = setPrototypeOf(obj, proto) - - if (Object.getPrototypeOf) { - assert.strictEqual(Object.getPrototypeOf(obj), proto) - } else if ({ __proto__: [] } instanceof Array) { - assert.strictEqual(obj.__proto__, proto) - } else { - assert.strictEqual(obj.a, 1) - assert.strictEqual(obj.b, 2) - assert.strictEqual(obj.c, 4) - } - assert.strictEqual(mergeObj, obj) - }) -}) diff --git a/node_modules/side-channel-list/.editorconfig b/node_modules/side-channel-list/.editorconfig deleted file mode 100644 index 72e0eba..0000000 --- a/node_modules/side-channel-list/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = tab -indent_size = 2 -trim_trailing_whitespace = true diff --git a/node_modules/side-channel-list/.eslintrc b/node_modules/side-channel-list/.eslintrc deleted file mode 100644 index 93978e7..0000000 --- a/node_modules/side-channel-list/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "max-lines-per-function": 0, - "multiline-comment-style": 1, - "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }], - }, -} diff --git a/node_modules/side-channel-list/.github/FUNDING.yml b/node_modules/side-channel-list/.github/FUNDING.yml deleted file mode 100644 index eaff735..0000000 --- a/node_modules/side-channel-list/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/side-channel-list -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/side-channel-list/.nycrc b/node_modules/side-channel-list/.nycrc deleted file mode 100644 index 1826526..0000000 --- a/node_modules/side-channel-list/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/side-channel-list/CHANGELOG.md b/node_modules/side-channel-list/CHANGELOG.md deleted file mode 100644 index e68bcb9..0000000 --- a/node_modules/side-channel-list/CHANGELOG.md +++ /dev/null @@ -1,36 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.1](https://github.com/ljharb/side-channel-list.git -/compare/v1.0.0...v1.0.1) - 2026-04-08 - -### Fixed - -- [Fix] `delete`: do not reset the list when deleting the head node of a multi-node list [`#3`](https://github.com/ljharb/side-channel-list.git -/issues/3) - -### Commits - -- [actions] update workflows [`9e79e6b`](https://github.com/ljharb/side-channel-list.git -/commit/9e79e6bf845532fafbf03b547429fe4f737214a3) -- [Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `eslint`, `npmignore` [`babf3ca`](https://github.com/ljharb/side-channel-list.git -/commit/babf3ca4849d2fd893a470a6b82c62a80ccc9307) -- [Deps] update `object-inspect` [`9f0f4b8`](https://github.com/ljharb/side-channel-list.git -/commit/9f0f4b88ff2aa8b7b7c9e589ac1513f133d64b9f) - -## v1.0.0 - 2024-12-10 - -### Commits - -- Initial implementation, tests, readme, types [`5d6baee`](https://github.com/ljharb/side-channel-list.git -/commit/5d6baee5c9054a1238007f5a1dfc109a7a816251) -- Initial commit [`3ae784c`](https://github.com/ljharb/side-channel-list.git -/commit/3ae784c63a47895fbaeed2a91ab54a8029a7a100) -- npm init [`07055a4`](https://github.com/ljharb/side-channel-list.git -/commit/07055a4d139895565b199dba5fe2479c1a1b9e28) -- Only apps should have lockfiles [`9573058`](https://github.com/ljharb/side-channel-list.git -/commit/9573058a47494e2d68f8c6c77b5d7fbe441949c1) diff --git a/node_modules/side-channel-list/LICENSE b/node_modules/side-channel-list/LICENSE deleted file mode 100644 index f82f389..0000000 --- a/node_modules/side-channel-list/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/side-channel-list/README.md b/node_modules/side-channel-list/README.md deleted file mode 100644 index d9c7a13..0000000 --- a/node_modules/side-channel-list/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# side-channel-list [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -Store information about any JS value in a side channel, using a linked list. - -Warning: this implementation will leak memory until you `delete` the `key`. -Use [`side-channel`](https://npmjs.com/side-channel) for the best available strategy. - -## Getting started - -```sh -npm install --save side-channel-list -``` - -## Usage/Examples - -```js -const assert = require('assert'); -const getSideChannelList = require('side-channel-list'); - -const channel = getSideChannelList(); - -const key = {}; -assert.equal(channel.has(key), false); -assert.throws(() => channel.assert(key), TypeError); - -channel.set(key, 42); - -channel.assert(key); // does not throw -assert.equal(channel.has(key), true); -assert.equal(channel.get(key), 42); - -channel.delete(key); -assert.equal(channel.has(key), false); -assert.throws(() => channel.assert(key), TypeError); -``` - -## Tests - -Clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/side-channel-list -[npm-version-svg]: https://versionbadg.es/ljharb/side-channel-list.svg -[deps-svg]: https://david-dm.org/ljharb/side-channel-list.svg -[deps-url]: https://david-dm.org/ljharb/side-channel-list -[dev-deps-svg]: https://david-dm.org/ljharb/side-channel-list/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/side-channel-list#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/side-channel-list.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/side-channel-list.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/side-channel-list.svg -[downloads-url]: https://npm-stat.com/charts.html?package=side-channel-list -[codecov-image]: https://codecov.io/gh/ljharb/side-channel-list/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/side-channel-list/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/side-channel-list -[actions-url]: https://github.com/ljharb/side-channel-list/actions diff --git a/node_modules/side-channel-list/index.d.ts b/node_modules/side-channel-list/index.d.ts deleted file mode 100644 index c9cabc8..0000000 --- a/node_modules/side-channel-list/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare namespace getSideChannelList { - type Channel = { - assert: (key: K) => void; - has: (key: K) => boolean; - get: (key: K) => V | undefined; - set: (key: K, value: V) => void; - delete: (key: K) => boolean; - }; -} - -declare function getSideChannelList(): getSideChannelList.Channel; - -export = getSideChannelList; diff --git a/node_modules/side-channel-list/index.js b/node_modules/side-channel-list/index.js deleted file mode 100644 index 4460229..0000000 --- a/node_modules/side-channel-list/index.js +++ /dev/null @@ -1,111 +0,0 @@ -'use strict'; - -var inspect = require('object-inspect'); - -var $TypeError = require('es-errors/type'); - -/* -* This function traverses the list returning the node corresponding to the given key. -* -* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. -* By doing so, all the recently used nodes can be accessed relatively quickly. -*/ -/** @type {import('./list.d.ts').listGetNode} */ -// eslint-disable-next-line consistent-return -var listGetNode = function (list, key, isDelete) { - /** @type {typeof list | NonNullable<(typeof list)['next']>} */ - var prev = list; - /** @type {(typeof list)['next']} */ - var curr; - // eslint-disable-next-line eqeqeq - for (; (curr = prev.next) != null; prev = curr) { - if (curr.key === key) { - prev.next = curr.next; - if (!isDelete) { - // eslint-disable-next-line no-extra-parens - curr.next = /** @type {NonNullable} */ (list.next); - list.next = curr; // eslint-disable-line no-param-reassign - } - return curr; - } - } -}; - -/** @type {import('./list.d.ts').listGet} */ -var listGet = function (objects, key) { - if (!objects) { - return void undefined; - } - var node = listGetNode(objects, key); - return node && node.value; -}; -/** @type {import('./list.d.ts').listSet} */ -var listSet = function (objects, key, value) { - var node = listGetNode(objects, key); - if (node) { - node.value = value; - } else { - // Prepend the new node to the beginning of the list - objects.next = /** @type {import('./list.d.ts').ListNode} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens - key: key, - next: objects.next, - value: value - }); - } -}; -/** @type {import('./list.d.ts').listHas} */ -var listHas = function (objects, key) { - if (!objects) { - return false; - } - return !!listGetNode(objects, key); -}; -/** @type {import('./list.d.ts').listDelete} */ -// eslint-disable-next-line consistent-return -var listDelete = function (objects, key) { - if (objects) { - return listGetNode(objects, key, true); - } -}; - -/** @type {import('.')} */ -module.exports = function getSideChannelList() { - /** @typedef {ReturnType} Channel */ - /** @typedef {Parameters[0]} K */ - /** @typedef {Parameters[1]} V */ - - /** @type {import('./list.d.ts').RootNode | undefined} */ var $o; - - /** @type {Channel} */ - var channel = { - assert: function (key) { - if (!channel.has(key)) { - throw new $TypeError('Side channel does not contain ' + inspect(key)); - } - }, - 'delete': function (key) { - var deletedNode = listDelete($o, key); - if (deletedNode && $o && !$o.next) { - $o = void undefined; - } - return !!deletedNode; - }, - get: function (key) { - return listGet($o, key); - }, - has: function (key) { - return listHas($o, key); - }, - set: function (key, value) { - if (!$o) { - // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head - $o = { - next: void undefined - }; - } - // eslint-disable-next-line no-extra-parens - listSet(/** @type {NonNullable} */ ($o), key, value); - } - }; - return channel; -}; diff --git a/node_modules/side-channel-list/list.d.ts b/node_modules/side-channel-list/list.d.ts deleted file mode 100644 index 2c759e2..0000000 --- a/node_modules/side-channel-list/list.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -type ListNode = { - key: K; - next: undefined | ListNode; - value: T; -}; -type RootNode = { - next: undefined | ListNode; -}; - -export function listGetNode(list: RootNode, key: ListNode['key'], isDelete?: boolean): ListNode | undefined; -export function listGet(objects: undefined | RootNode, key: ListNode['key']): T | undefined; -export function listSet(objects: RootNode, key: ListNode['key'], value: T): void; -export function listHas(objects: undefined | RootNode, key: ListNode['key']): boolean; -export function listDelete(objects: undefined | RootNode, key: ListNode['key']): ListNode | undefined; diff --git a/node_modules/side-channel-list/package.json b/node_modules/side-channel-list/package.json deleted file mode 100644 index bc4c08c..0000000 --- a/node_modules/side-channel-list/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "side-channel-list", - "version": "1.0.1", - "description": "Store information about any JS value in a side channel, using a linked list", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "types": "./index.d.ts", - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prelint": "evalmd README.md && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p . && attw -P", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx npm@'>= 10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/side-channel-list.git" - }, - "keywords": [], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/side-channel-list/issues" - }, - "homepage": "https://github.com/ljharb/side-channel-list#readme", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.4" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.18.2", - "@ljharb/eslint-config": "^22.2.2", - "@ljharb/tsconfig": "^0.3.2", - "@types/object-inspect": "^1.13.0", - "@types/tape": "^5.8.1", - "auto-changelog": "^2.5.0", - "eclint": "^2.8.1", - "encoding": "^0.1.13", - "eslint": "^8.57.1", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.5", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/side-channel-list/test/index.js b/node_modules/side-channel-list/test/index.js deleted file mode 100644 index d1b915d..0000000 --- a/node_modules/side-channel-list/test/index.js +++ /dev/null @@ -1,154 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var getSideChannelList = require('../'); - -test('getSideChannelList', function (t) { - t.test('export', function (st) { - st.equal(typeof getSideChannelList, 'function', 'is a function'); - - st.equal(getSideChannelList.length, 0, 'takes no arguments'); - - var channel = getSideChannelList(); - st.ok(channel, 'is truthy'); - st.equal(typeof channel, 'object', 'is an object'); - st.end(); - }); - - t.test('assert', function (st) { - var channel = getSideChannelList(); - st['throws']( - function () { channel.assert({}); }, - TypeError, - 'nonexistent value throws' - ); - - var o = {}; - channel.set(o, 'data'); - st.doesNotThrow(function () { channel.assert(o); }, 'existent value noops'); - - st.end(); - }); - - t.test('has', function (st) { - var channel = getSideChannelList(); - /** @type {unknown[]} */ var o = []; - - st.equal(channel.has(o), false, 'nonexistent value yields false'); - - channel.set(o, 'foo'); - st.equal(channel.has(o), true, 'existent value yields true'); - - st.equal(channel.has('abc'), false, 'non object value non existent yields false'); - - channel.set('abc', 'foo'); - st.equal(channel.has('abc'), true, 'non object value that exists yields true'); - - st.end(); - }); - - t.test('get', function (st) { - var channel = getSideChannelList(); - var o = {}; - st.equal(channel.get(o), undefined, 'nonexistent value yields undefined'); - - var data = {}; - channel.set(o, data); - st.equal(channel.get(o), data, '"get" yields data set by "set"'); - - st.end(); - }); - - t.test('set', function (st) { - var channel = getSideChannelList(); - var o = function () {}; - st.equal(channel.get(o), undefined, 'value not set'); - - channel.set(o, 42); - st.equal(channel.get(o), 42, 'value was set'); - - channel.set(o, Infinity); - st.equal(channel.get(o), Infinity, 'value was set again'); - - var o2 = {}; - channel.set(o2, 17); - st.equal(channel.get(o), Infinity, 'o is not modified'); - st.equal(channel.get(o2), 17, 'o2 is set'); - - channel.set(o, 14); - st.equal(channel.get(o), 14, 'o is modified'); - st.equal(channel.get(o2), 17, 'o2 is not modified'); - - st.end(); - }); - - t.test('delete', function (st) { - var channel = getSideChannelList(); - var o = {}; - st.equal(channel['delete']({}), false, 'nonexistent value yields false'); - - channel.set(o, 42); - st.equal(channel.has(o), true, 'value is set'); - - st.equal(channel['delete']({}), false, 'nonexistent value still yields false'); - - st.equal(channel['delete'](o), true, 'deleted value yields true'); - - st.equal(channel.has(o), false, 'value is no longer set'); - - st.end(); - }); - - t.test('delete: first node in a multi-node list', function (st) { - var channel = getSideChannelList(); - - channel.set('a', 1); - channel.set('b', 2); - - st.equal(channel['delete']('b'), true, 'deleting first data node yields true'); - - st.equal(channel.has('a'), true, 'second node is still present after deleting first'); - st.equal(channel.get('a'), 1, 'second node value is intact after deleting first'); - st.equal(channel.has('b'), false, 'deleted node is gone'); - - st.end(); - }); - - t.test('delete: last remaining node empties the list', function (st) { - var channel = getSideChannelList(); - - channel.set('a', 1); - channel.set('b', 2); - - st.equal(channel['delete']('b'), true, 'delete first node'); - st.equal(channel['delete']('a'), true, 'delete second (last) node'); - - st.equal(channel.has('a'), false, 'a is gone'); - st.equal(channel.has('b'), false, 'b is gone'); - st.equal(channel.get('a'), undefined, 'get a yields undefined'); - - channel.set('c', 3); - st.equal(channel.get('c'), 3, 'can set new values after emptying'); - - st.end(); - }); - - t.test('delete: middle node in a multi-node list', function (st) { - var channel = getSideChannelList(); - - channel.set('a', 1); - channel.set('b', 2); - channel.set('c', 3); - - st.equal(channel['delete']('b'), true, 'deleting middle node yields true'); - - st.equal(channel.get('a'), 1, 'first node still intact'); - st.equal(channel.has('b'), false, 'middle node is gone'); - st.equal(channel.get('c'), 3, 'last node still intact'); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/side-channel-list/tsconfig.json b/node_modules/side-channel-list/tsconfig.json deleted file mode 100644 index d9a6668..0000000 --- a/node_modules/side-channel-list/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "es2021", - }, - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/side-channel-map/.editorconfig b/node_modules/side-channel-map/.editorconfig deleted file mode 100644 index 72e0eba..0000000 --- a/node_modules/side-channel-map/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = tab -indent_size = 2 -trim_trailing_whitespace = true diff --git a/node_modules/side-channel-map/.eslintrc b/node_modules/side-channel-map/.eslintrc deleted file mode 100644 index 93978e7..0000000 --- a/node_modules/side-channel-map/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "max-lines-per-function": 0, - "multiline-comment-style": 1, - "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }], - }, -} diff --git a/node_modules/side-channel-map/.github/FUNDING.yml b/node_modules/side-channel-map/.github/FUNDING.yml deleted file mode 100644 index f2891bd..0000000 --- a/node_modules/side-channel-map/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/side-channel-map -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/side-channel-map/.nycrc b/node_modules/side-channel-map/.nycrc deleted file mode 100644 index 1826526..0000000 --- a/node_modules/side-channel-map/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/side-channel-map/CHANGELOG.md b/node_modules/side-channel-map/CHANGELOG.md deleted file mode 100644 index b6ccea9..0000000 --- a/node_modules/side-channel-map/CHANGELOG.md +++ /dev/null @@ -1,22 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.1](https://github.com/ljharb/side-channel-map/compare/v1.0.0...v1.0.1) - 2024-12-10 - -### Commits - -- [Deps] update `call-bound` [`6d05aaa`](https://github.com/ljharb/side-channel-map/commit/6d05aaa4ce5f2be4e7825df433d650696f0ba40f) -- [types] fix generics ordering [`11c0184`](https://github.com/ljharb/side-channel-map/commit/11c0184132ac11fdc16857e12682e148e5e9ee74) - -## v1.0.0 - 2024-12-10 - -### Commits - -- Initial implementation, tests, readme, types [`ad877b4`](https://github.com/ljharb/side-channel-map/commit/ad877b42926d46d63fff76a2bd01d2b4a01959a9) -- Initial commit [`28f8879`](https://github.com/ljharb/side-channel-map/commit/28f8879c512abe8fcf9b6a4dc7754a0287e5eba4) -- npm init [`2c9604e`](https://github.com/ljharb/side-channel-map/commit/2c9604e5aa40223e425ea7cea78f8a07697504bd) -- Only apps should have lockfiles [`5e7ba9c`](https://github.com/ljharb/side-channel-map/commit/5e7ba9cffe3ef42095815adc8ac1255b49bbadf5) diff --git a/node_modules/side-channel-map/LICENSE b/node_modules/side-channel-map/LICENSE deleted file mode 100644 index f82f389..0000000 --- a/node_modules/side-channel-map/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/side-channel-map/README.md b/node_modules/side-channel-map/README.md deleted file mode 100644 index 8fa6f77..0000000 --- a/node_modules/side-channel-map/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# side-channel-map [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -Store information about any JS value in a side channel, using a Map. - -Warning: if the `key` is an object, this implementation will leak memory until you `delete` it. -Use [`side-channel`](https://npmjs.com/side-channel) for the best available strategy. - -## Getting started - -```sh -npm install --save side-channel-map -``` - -## Usage/Examples - -```js -const assert = require('assert'); -const getSideChannelMap = require('side-channel-map'); - -const channel = getSideChannelMap(); - -const key = {}; -assert.equal(channel.has(key), false); -assert.throws(() => channel.assert(key), TypeError); - -channel.set(key, 42); - -channel.assert(key); // does not throw -assert.equal(channel.has(key), true); -assert.equal(channel.get(key), 42); - -channel.delete(key); -assert.equal(channel.has(key), false); -assert.throws(() => channel.assert(key), TypeError); -``` - -## Tests - -Clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/side-channel-map -[npm-version-svg]: https://versionbadg.es/ljharb/side-channel-map.svg -[deps-svg]: https://david-dm.org/ljharb/side-channel-map.svg -[deps-url]: https://david-dm.org/ljharb/side-channel-map -[dev-deps-svg]: https://david-dm.org/ljharb/side-channel-map/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/side-channel-map#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/side-channel-map.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/side-channel-map.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/side-channel-map.svg -[downloads-url]: https://npm-stat.com/charts.html?package=side-channel-map -[codecov-image]: https://codecov.io/gh/ljharb/side-channel-map/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/side-channel-map/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/side-channel-map -[actions-url]: https://github.com/ljharb/side-channel-map/actions diff --git a/node_modules/side-channel-map/index.d.ts b/node_modules/side-channel-map/index.d.ts deleted file mode 100644 index de33e89..0000000 --- a/node_modules/side-channel-map/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -declare namespace getSideChannelMap { - type Channel = { - assert: (key: K) => void; - has: (key: K) => boolean; - get: (key: K) => V | undefined; - set: (key: K, value: V) => void; - delete: (key: K) => boolean; - }; -} - -declare function getSideChannelMap(): getSideChannelMap.Channel; - -declare const x: false | typeof getSideChannelMap; - -export = x; diff --git a/node_modules/side-channel-map/index.js b/node_modules/side-channel-map/index.js deleted file mode 100644 index e111100..0000000 --- a/node_modules/side-channel-map/index.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('get-intrinsic'); -var callBound = require('call-bound'); -var inspect = require('object-inspect'); - -var $TypeError = require('es-errors/type'); -var $Map = GetIntrinsic('%Map%', true); - -/** @type {(thisArg: Map, key: K) => V} */ -var $mapGet = callBound('Map.prototype.get', true); -/** @type {(thisArg: Map, key: K, value: V) => void} */ -var $mapSet = callBound('Map.prototype.set', true); -/** @type {(thisArg: Map, key: K) => boolean} */ -var $mapHas = callBound('Map.prototype.has', true); -/** @type {(thisArg: Map, key: K) => boolean} */ -var $mapDelete = callBound('Map.prototype.delete', true); -/** @type {(thisArg: Map) => number} */ -var $mapSize = callBound('Map.prototype.size', true); - -/** @type {import('.')} */ -module.exports = !!$Map && /** @type {Exclude} */ function getSideChannelMap() { - /** @typedef {ReturnType} Channel */ - /** @typedef {Parameters[0]} K */ - /** @typedef {Parameters[1]} V */ - - /** @type {Map | undefined} */ var $m; - - /** @type {Channel} */ - var channel = { - assert: function (key) { - if (!channel.has(key)) { - throw new $TypeError('Side channel does not contain ' + inspect(key)); - } - }, - 'delete': function (key) { - if ($m) { - var result = $mapDelete($m, key); - if ($mapSize($m) === 0) { - $m = void undefined; - } - return result; - } - return false; - }, - get: function (key) { // eslint-disable-line consistent-return - if ($m) { - return $mapGet($m, key); - } - }, - has: function (key) { - if ($m) { - return $mapHas($m, key); - } - return false; - }, - set: function (key, value) { - if (!$m) { - // @ts-expect-error TS can't handle narrowing a variable inside a closure - $m = new $Map(); - } - $mapSet($m, key, value); - } - }; - - // @ts-expect-error TODO: figure out why TS is erroring here - return channel; -}; diff --git a/node_modules/side-channel-map/package.json b/node_modules/side-channel-map/package.json deleted file mode 100644 index 18e8080..0000000 --- a/node_modules/side-channel-map/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "side-channel-map", - "version": "1.0.1", - "description": "Store information about any JS value in a side channel, using a Map", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "types": "./index.d.ts", - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prelint": "evalmd README.md && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p . && attw -P", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx npm@'>= 10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/side-channel-map.git" - }, - "keywords": [], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/side-channel-map/issues" - }, - "homepage": "https://github.com/ljharb/side-channel-map#readme", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.1", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.2", - "@types/get-intrinsic": "^1.2.3", - "@types/object-inspect": "^1.13.0", - "@types/tape": "^5.6.5", - "auto-changelog": "^2.5.0", - "eclint": "^2.8.1", - "encoding": "^0.1.13", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/side-channel-map/test/index.js b/node_modules/side-channel-map/test/index.js deleted file mode 100644 index 1743323..0000000 --- a/node_modules/side-channel-map/test/index.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var getSideChannelMap = require('../'); - -test('getSideChannelMap', { skip: typeof Map !== 'function' }, function (t) { - var getSideChannel = getSideChannelMap || function () { - throw new EvalError('should never happen'); - }; - - t.test('export', function (st) { - st.equal(typeof getSideChannel, 'function', 'is a function'); - - st.equal(getSideChannel.length, 0, 'takes no arguments'); - - var channel = getSideChannel(); - st.ok(channel, 'is truthy'); - st.equal(typeof channel, 'object', 'is an object'); - st.end(); - }); - - t.test('assert', function (st) { - var channel = getSideChannel(); - st['throws']( - function () { channel.assert({}); }, - TypeError, - 'nonexistent value throws' - ); - - var o = {}; - channel.set(o, 'data'); - st.doesNotThrow(function () { channel.assert(o); }, 'existent value noops'); - - st.end(); - }); - - t.test('has', function (st) { - var channel = getSideChannel(); - /** @type {unknown[]} */ var o = []; - - st.equal(channel.has(o), false, 'nonexistent value yields false'); - - channel.set(o, 'foo'); - st.equal(channel.has(o), true, 'existent value yields true'); - - st.equal(channel.has('abc'), false, 'non object value non existent yields false'); - - channel.set('abc', 'foo'); - st.equal(channel.has('abc'), true, 'non object value that exists yields true'); - - st.end(); - }); - - t.test('get', function (st) { - var channel = getSideChannel(); - var o = {}; - st.equal(channel.get(o), undefined, 'nonexistent value yields undefined'); - - var data = {}; - channel.set(o, data); - st.equal(channel.get(o), data, '"get" yields data set by "set"'); - - st.end(); - }); - - t.test('set', function (st) { - var channel = getSideChannel(); - var o = function () {}; - st.equal(channel.get(o), undefined, 'value not set'); - - channel.set(o, 42); - st.equal(channel.get(o), 42, 'value was set'); - - channel.set(o, Infinity); - st.equal(channel.get(o), Infinity, 'value was set again'); - - var o2 = {}; - channel.set(o2, 17); - st.equal(channel.get(o), Infinity, 'o is not modified'); - st.equal(channel.get(o2), 17, 'o2 is set'); - - channel.set(o, 14); - st.equal(channel.get(o), 14, 'o is modified'); - st.equal(channel.get(o2), 17, 'o2 is not modified'); - - st.end(); - }); - - t.test('delete', function (st) { - var channel = getSideChannel(); - var o = {}; - st.equal(channel['delete']({}), false, 'nonexistent value yields false'); - - channel.set(o, 42); - st.equal(channel.has(o), true, 'value is set'); - - st.equal(channel['delete']({}), false, 'nonexistent value still yields false'); - - st.equal(channel['delete'](o), true, 'deleted value yields true'); - - st.equal(channel.has(o), false, 'value is no longer set'); - - st.end(); - }); - - t.end(); -}); - -test('getSideChannelMap, no Maps', { skip: typeof Map === 'function' }, function (t) { - t.equal(getSideChannelMap, false, 'is false'); - - t.end(); -}); diff --git a/node_modules/side-channel-map/tsconfig.json b/node_modules/side-channel-map/tsconfig.json deleted file mode 100644 index d9a6668..0000000 --- a/node_modules/side-channel-map/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "es2021", - }, - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/side-channel-weakmap/.editorconfig b/node_modules/side-channel-weakmap/.editorconfig deleted file mode 100644 index 72e0eba..0000000 --- a/node_modules/side-channel-weakmap/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = tab -indent_size = 2 -trim_trailing_whitespace = true diff --git a/node_modules/side-channel-weakmap/.eslintrc b/node_modules/side-channel-weakmap/.eslintrc deleted file mode 100644 index 9b13ad8..0000000 --- a/node_modules/side-channel-weakmap/.eslintrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "id-length": 0, - "max-lines-per-function": 0, - "multiline-comment-style": 1, - "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }], - }, -} diff --git a/node_modules/side-channel-weakmap/.github/FUNDING.yml b/node_modules/side-channel-weakmap/.github/FUNDING.yml deleted file mode 100644 index 2ae71cd..0000000 --- a/node_modules/side-channel-weakmap/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/side-channel-weakmap -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/side-channel-weakmap/.nycrc b/node_modules/side-channel-weakmap/.nycrc deleted file mode 100644 index 1826526..0000000 --- a/node_modules/side-channel-weakmap/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/side-channel-weakmap/CHANGELOG.md b/node_modules/side-channel-weakmap/CHANGELOG.md deleted file mode 100644 index aba7ab0..0000000 --- a/node_modules/side-channel-weakmap/CHANGELOG.md +++ /dev/null @@ -1,28 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.2](https://github.com/ljharb/side-channel-weakmap/compare/v1.0.1...v1.0.2) - 2024-12-10 - -### Commits - -- [types] fix generics ordering [`1b62e94`](https://github.com/ljharb/side-channel-weakmap/commit/1b62e94a2ad6ed30b640ba73c4a2535836c67289) - -## [v1.0.1](https://github.com/ljharb/side-channel-weakmap/compare/v1.0.0...v1.0.1) - 2024-12-10 - -### Commits - -- [types] fix generics ordering [`08a4a5d`](https://github.com/ljharb/side-channel-weakmap/commit/08a4a5dbffedc3ebc79f1aaaf5a3dd6d2196dc1b) -- [Deps] update `side-channel-map` [`b53fe44`](https://github.com/ljharb/side-channel-weakmap/commit/b53fe447dfdd3a9aebedfd015b384eac17fce916) - -## v1.0.0 - 2024-12-10 - -### Commits - -- Initial implementation, tests, readme, types [`53c0fa4`](https://github.com/ljharb/side-channel-weakmap/commit/53c0fa4788435a006f58b9d7b43cb65989ecee49) -- Initial commit [`a157947`](https://github.com/ljharb/side-channel-weakmap/commit/a157947f26fcaf2c4a941d3a044e76bf67343532) -- npm init [`54dfc55`](https://github.com/ljharb/side-channel-weakmap/commit/54dfc55bafb16265910d5aad4e743c43aee5bbbb) -- Only apps should have lockfiles [`0ddd6c7`](https://github.com/ljharb/side-channel-weakmap/commit/0ddd6c7b07fe8ee04d67b2e9f7255af7ce62c07d) diff --git a/node_modules/side-channel-weakmap/LICENSE b/node_modules/side-channel-weakmap/LICENSE deleted file mode 100644 index 3900dd7..0000000 --- a/node_modules/side-channel-weakmap/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2019 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/side-channel-weakmap/README.md b/node_modules/side-channel-weakmap/README.md deleted file mode 100644 index 856ee36..0000000 --- a/node_modules/side-channel-weakmap/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# side-channel-weakmap [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -Store information about any JS value in a side channel. Uses WeakMap if available. - -Warning: this implementation will leak memory until you `delete` the `key`. -Use [`side-channel`](https://npmjs.com/side-channel) for the best available strategy. - -## Getting started - -```sh -npm install --save side-channel-weakmap -``` - -## Usage/Examples - -```js -const assert = require('assert'); -const getSideChannelList = require('side-channel-weakmap'); - -const channel = getSideChannelList(); - -const key = {}; -assert.equal(channel.has(key), false); -assert.throws(() => channel.assert(key), TypeError); - -channel.set(key, 42); - -channel.assert(key); // does not throw -assert.equal(channel.has(key), true); -assert.equal(channel.get(key), 42); - -channel.delete(key); -assert.equal(channel.has(key), false); -assert.throws(() => channel.assert(key), TypeError); -``` - -## Tests - -Clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/side-channel-weakmap -[npm-version-svg]: https://versionbadg.es/ljharb/side-channel-weakmap.svg -[deps-svg]: https://david-dm.org/ljharb/side-channel-weakmap.svg -[deps-url]: https://david-dm.org/ljharb/side-channel-weakmap -[dev-deps-svg]: https://david-dm.org/ljharb/side-channel-weakmap/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/side-channel-weakmap#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/side-channel-weakmap.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/side-channel-weakmap.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/side-channel-weakmap.svg -[downloads-url]: https://npm-stat.com/charts.html?package=side-channel-weakmap -[codecov-image]: https://codecov.io/gh/ljharb/side-channel-weakmap/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/side-channel-weakmap/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/side-channel-weakmap -[actions-url]: https://github.com/ljharb/side-channel-weakmap/actions diff --git a/node_modules/side-channel-weakmap/index.d.ts b/node_modules/side-channel-weakmap/index.d.ts deleted file mode 100644 index ce1bc2a..0000000 --- a/node_modules/side-channel-weakmap/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -declare namespace getSideChannelWeakMap { - type Channel = { - assert: (key: K) => void; - has: (key: K) => boolean; - get: (key: K) => V | undefined; - set: (key: K, value: V) => void; - delete: (key: K) => boolean; - } -} - -declare function getSideChannelWeakMap(): getSideChannelWeakMap.Channel; - -declare const x: false | typeof getSideChannelWeakMap; - -export = x; diff --git a/node_modules/side-channel-weakmap/index.js b/node_modules/side-channel-weakmap/index.js deleted file mode 100644 index e5b8183..0000000 --- a/node_modules/side-channel-weakmap/index.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('get-intrinsic'); -var callBound = require('call-bound'); -var inspect = require('object-inspect'); -var getSideChannelMap = require('side-channel-map'); - -var $TypeError = require('es-errors/type'); -var $WeakMap = GetIntrinsic('%WeakMap%', true); - -/** @type {(thisArg: WeakMap, key: K) => V} */ -var $weakMapGet = callBound('WeakMap.prototype.get', true); -/** @type {(thisArg: WeakMap, key: K, value: V) => void} */ -var $weakMapSet = callBound('WeakMap.prototype.set', true); -/** @type {(thisArg: WeakMap, key: K) => boolean} */ -var $weakMapHas = callBound('WeakMap.prototype.has', true); -/** @type {(thisArg: WeakMap, key: K) => boolean} */ -var $weakMapDelete = callBound('WeakMap.prototype.delete', true); - -/** @type {import('.')} */ -module.exports = $WeakMap - ? /** @type {Exclude} */ function getSideChannelWeakMap() { - /** @typedef {ReturnType} Channel */ - /** @typedef {Parameters[0]} K */ - /** @typedef {Parameters[1]} V */ - - /** @type {WeakMap | undefined} */ var $wm; - /** @type {Channel | undefined} */ var $m; - - /** @type {Channel} */ - var channel = { - assert: function (key) { - if (!channel.has(key)) { - throw new $TypeError('Side channel does not contain ' + inspect(key)); - } - }, - 'delete': function (key) { - if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { - if ($wm) { - return $weakMapDelete($wm, key); - } - } else if (getSideChannelMap) { - if ($m) { - return $m['delete'](key); - } - } - return false; - }, - get: function (key) { - if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { - if ($wm) { - return $weakMapGet($wm, key); - } - } - return $m && $m.get(key); - }, - has: function (key) { - if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { - if ($wm) { - return $weakMapHas($wm, key); - } - } - return !!$m && $m.has(key); - }, - set: function (key, value) { - if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { - if (!$wm) { - $wm = new $WeakMap(); - } - $weakMapSet($wm, key, value); - } else if (getSideChannelMap) { - if (!$m) { - $m = getSideChannelMap(); - } - // eslint-disable-next-line no-extra-parens - /** @type {NonNullable} */ ($m).set(key, value); - } - } - }; - - // @ts-expect-error TODO: figure out why this is erroring - return channel; - } - : getSideChannelMap; diff --git a/node_modules/side-channel-weakmap/package.json b/node_modules/side-channel-weakmap/package.json deleted file mode 100644 index 9ef6583..0000000 --- a/node_modules/side-channel-weakmap/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "side-channel-weakmap", - "version": "1.0.2", - "description": "Store information about any JS value in a side channel. Uses WeakMap if available.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "types": "./index.d.ts", - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p . && attw -P", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx npm@'>=10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/side-channel-weakmap.git" - }, - "keywords": [ - "weakmap", - "map", - "side", - "channel", - "metadata" - ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/side-channel-weakmap/issues" - }, - "homepage": "https://github.com/ljharb/side-channel-weakmap#readme", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.1", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.2", - "@types/call-bind": "^1.0.5", - "@types/get-intrinsic": "^1.2.3", - "@types/object-inspect": "^1.13.0", - "@types/tape": "^5.6.5", - "auto-changelog": "^2.5.0", - "eclint": "^2.8.1", - "encoding": "^0.1.13", - "eslint": "=8.8.0", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/side-channel-weakmap/test/index.js b/node_modules/side-channel-weakmap/test/index.js deleted file mode 100644 index a01248b..0000000 --- a/node_modules/side-channel-weakmap/test/index.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var getSideChannelWeakMap = require('../'); - -test('getSideChannelMap', { skip: typeof WeakMap !== 'function' && typeof Map !== 'function' }, function (t) { - var getSideChannel = getSideChannelWeakMap || function () { - throw new EvalError('should never happen'); - }; - - t.test('export', function (st) { - st.equal(typeof getSideChannel, 'function', 'is a function'); - - st.equal(getSideChannel.length, 0, 'takes no arguments'); - - var channel = getSideChannel(); - st.ok(channel, 'is truthy'); - st.equal(typeof channel, 'object', 'is an object'); - st.end(); - }); - - t.test('assert', function (st) { - var channel = getSideChannel(); - st['throws']( - function () { channel.assert({}); }, - TypeError, - 'nonexistent value throws' - ); - - var o = {}; - channel.set(o, 'data'); - st.doesNotThrow(function () { channel.assert(o); }, 'existent value noops'); - - st.end(); - }); - - t.test('has', function (st) { - var channel = getSideChannel(); - /** @type {unknown[]} */ var o = []; - - st.equal(channel.has(o), false, 'nonexistent value yields false'); - - channel.set(o, 'foo'); - st.equal(channel.has(o), true, 'existent value yields true'); - - st.equal(channel.has('abc'), false, 'non object value non existent yields false'); - - channel.set('abc', 'foo'); - st.equal(channel.has('abc'), true, 'non object value that exists yields true'); - - st.end(); - }); - - t.test('get', function (st) { - var channel = getSideChannel(); - var o = {}; - st.equal(channel.get(o), undefined, 'nonexistent value yields undefined'); - - var data = {}; - channel.set(o, data); - st.equal(channel.get(o), data, '"get" yields data set by "set"'); - - st.end(); - }); - - t.test('set', function (st) { - var channel = getSideChannel(); - var o = function () {}; - st.equal(channel.get(o), undefined, 'value not set'); - - channel.set(o, 42); - st.equal(channel.get(o), 42, 'value was set'); - - channel.set(o, Infinity); - st.equal(channel.get(o), Infinity, 'value was set again'); - - var o2 = {}; - channel.set(o2, 17); - st.equal(channel.get(o), Infinity, 'o is not modified'); - st.equal(channel.get(o2), 17, 'o2 is set'); - - channel.set(o, 14); - st.equal(channel.get(o), 14, 'o is modified'); - st.equal(channel.get(o2), 17, 'o2 is not modified'); - - st.end(); - }); - - t.test('delete', function (st) { - var channel = getSideChannel(); - var o = {}; - st.equal(channel['delete']({}), false, 'nonexistent value yields false'); - - channel.set(o, 42); - st.equal(channel.has(o), true, 'value is set'); - - st.equal(channel['delete']({}), false, 'nonexistent value still yields false'); - - st.equal(channel['delete'](o), true, 'deleted value yields true'); - - st.equal(channel.has(o), false, 'value is no longer set'); - - st.end(); - }); - - t.end(); -}); - -test('getSideChannelMap, no WeakMaps and/or Maps', { skip: typeof WeakMap === 'function' || typeof Map === 'function' }, function (t) { - t.equal(getSideChannelWeakMap, false, 'is false'); - - t.end(); -}); diff --git a/node_modules/side-channel-weakmap/tsconfig.json b/node_modules/side-channel-weakmap/tsconfig.json deleted file mode 100644 index d9a6668..0000000 --- a/node_modules/side-channel-weakmap/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "es2021", - }, - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/side-channel/.editorconfig b/node_modules/side-channel/.editorconfig deleted file mode 100644 index 72e0eba..0000000 --- a/node_modules/side-channel/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = tab -indent_size = 2 -trim_trailing_whitespace = true diff --git a/node_modules/side-channel/.eslintrc b/node_modules/side-channel/.eslintrc deleted file mode 100644 index 9b13ad8..0000000 --- a/node_modules/side-channel/.eslintrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "id-length": 0, - "max-lines-per-function": 0, - "multiline-comment-style": 1, - "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }], - }, -} diff --git a/node_modules/side-channel/.github/FUNDING.yml b/node_modules/side-channel/.github/FUNDING.yml deleted file mode 100644 index 2a94840..0000000 --- a/node_modules/side-channel/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/side-channel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/side-channel/.nycrc b/node_modules/side-channel/.nycrc deleted file mode 100644 index 1826526..0000000 --- a/node_modules/side-channel/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/side-channel/CHANGELOG.md b/node_modules/side-channel/CHANGELOG.md deleted file mode 100644 index 58e378c..0000000 --- a/node_modules/side-channel/CHANGELOG.md +++ /dev/null @@ -1,110 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.1.0](https://github.com/ljharb/side-channel/compare/v1.0.6...v1.1.0) - 2024-12-11 - -### Commits - -- [Refactor] extract implementations to `side-channel-weakmap`, `side-channel-map`, `side-channel-list` [`ada5955`](https://github.com/ljharb/side-channel/commit/ada595549a5c4c6c853756d598846b180941c6da) -- [New] add `channel.delete` [`c01d2d3`](https://github.com/ljharb/side-channel/commit/c01d2d3fd51dbb1ce6da72ad7916e61bd6172aad) -- [types] improve types [`0c54356`](https://github.com/ljharb/side-channel/commit/0c5435651417df41b8cc1a5f7cdce8bffae68cde) -- [readme] add content [`be24868`](https://github.com/ljharb/side-channel/commit/be248682ac294b0e22c883092c45985aa91c490a) -- [actions] split out node 10-20, and 20+ [`c4488e2`](https://github.com/ljharb/side-channel/commit/c4488e241ef3d49a19fe266ac830a2e644305911) -- [types] use shared tsconfig [`0e0d57c`](https://github.com/ljharb/side-channel/commit/0e0d57c2ff17c7b45c6cbd43ebcf553edc9e3adc) -- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/get-intrinsic`, `@types/object-inspect`, `@types/tape`, `auto-changelog`, `tape` [`fb4f622`](https://github.com/ljharb/side-channel/commit/fb4f622e64a99a1e40b6e5cd7691674a9dc429e4) -- [Deps] update `call-bind`, `get-intrinsic`, `object-inspect` [`b78336b`](https://github.com/ljharb/side-channel/commit/b78336b886172d1b457d414ac9e28de8c5fecc78) -- [Tests] replace `aud` with `npm audit` [`ee3ab46`](https://github.com/ljharb/side-channel/commit/ee3ab4690d954311c35115651bcfd45edd205aa1) -- [Dev Deps] add missing peer dep [`c03e21a`](https://github.com/ljharb/side-channel/commit/c03e21a7def3b67cdc15ae22316884fefcb2f6a8) - -## [v1.0.6](https://github.com/ljharb/side-channel/compare/v1.0.5...v1.0.6) - 2024-02-29 - -### Commits - -- add types [`9beef66`](https://github.com/ljharb/side-channel/commit/9beef6643e6d717ea57bedabf86448123a7dd9e9) -- [meta] simplify `exports` [`4334cf9`](https://github.com/ljharb/side-channel/commit/4334cf9df654151504c383b62a2f9ebdc8d9d5ac) -- [Deps] update `call-bind` [`d6043c4`](https://github.com/ljharb/side-channel/commit/d6043c4d8f4d7be9037dd0f0419c7a2e0e39ec6a) -- [Dev Deps] update `tape` [`6aca376`](https://github.com/ljharb/side-channel/commit/6aca3761868dc8cd5ff7fd9799bf6b95e09a6eb0) - -## [v1.0.5](https://github.com/ljharb/side-channel/compare/v1.0.4...v1.0.5) - 2024-02-06 - -### Commits - -- [actions] reuse common workflows [`3d2e1ff`](https://github.com/ljharb/side-channel/commit/3d2e1ffd16dd6eaaf3e40ff57951f840d2d63c04) -- [meta] use `npmignore` to autogenerate an npmignore file [`04296ea`](https://github.com/ljharb/side-channel/commit/04296ea17d1544b0a5d20fd5bfb31aa4f6513eb9) -- [meta] add `.editorconfig`; add `eclint` [`130f0a6`](https://github.com/ljharb/side-channel/commit/130f0a6adbc04d385c7456a601d38344dce3d6a9) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `safe-publish-latest`, `tape` [`d480c2f`](https://github.com/ljharb/side-channel/commit/d480c2fbe757489ae9b4275491ffbcc3ac4725e9) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`ecbe70e`](https://github.com/ljharb/side-channel/commit/ecbe70e53a418234081a77971fec1fdfae20c841) -- [actions] update rebase action [`75240b9`](https://github.com/ljharb/side-channel/commit/75240b9963b816e8846400d2287cb68f88c7fba7) -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `npmignore`, `tape` [`ae8d281`](https://github.com/ljharb/side-channel/commit/ae8d281572430099109870fd9430d2ca3f320b8d) -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`7125b88`](https://github.com/ljharb/side-channel/commit/7125b885fd0eacad4fee9b073b72d14065ece278) -- [Deps] update `call-bind`, `get-intrinsic`, `object-inspect` [`82577c9`](https://github.com/ljharb/side-channel/commit/82577c9796304519139a570f82a317211b5f3b86) -- [Deps] update `call-bind`, `get-intrinsic`, `object-inspect` [`550aadf`](https://github.com/ljharb/side-channel/commit/550aadf20475a6081fd70304cc54f77259a5c8a8) -- [Tests] increase coverage [`5130877`](https://github.com/ljharb/side-channel/commit/5130877a7b27c862e64e6d1c12a178b28808859d) -- [Deps] update `get-intrinsic`, `object-inspect` [`ba0194c`](https://github.com/ljharb/side-channel/commit/ba0194c505b1a8a0427be14cadd5b8a46d4d01b8) -- [meta] add missing `engines.node` [`985fd24`](https://github.com/ljharb/side-channel/commit/985fd249663cb06617a693a94fe08cad12f5cb70) -- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`40227a8`](https://github.com/ljharb/side-channel/commit/40227a87b01709ad2c0eebf87eb4223a800099b9) -- [Deps] update `get-intrinsic` [`a989b40`](https://github.com/ljharb/side-channel/commit/a989b4024958737ae7be9fbffdeff2078f33a0fd) -- [Deps] update `object-inspect` [`aec42d2`](https://github.com/ljharb/side-channel/commit/aec42d2ec541a31aaa02475692c87d489237d9a3) - -## [v1.0.4](https://github.com/ljharb/side-channel/compare/v1.0.3...v1.0.4) - 2020-12-29 - -### Commits - -- [Tests] migrate tests to Github Actions [`10909cb`](https://github.com/ljharb/side-channel/commit/10909cbf8ce9c0bf96f604cf13d7ffd5a22c2d40) -- [Refactor] Use a linked list rather than an array, and move accessed nodes to the beginning [`195613f`](https://github.com/ljharb/side-channel/commit/195613f28b5c1e6072ef0b61b5beebaf2b6a304e) -- [meta] do not publish github action workflow files [`290ec29`](https://github.com/ljharb/side-channel/commit/290ec29cd21a60585145b4a7237ec55228c52c27) -- [Tests] run `nyc` on all tests; use `tape` runner [`ea6d030`](https://github.com/ljharb/side-channel/commit/ea6d030ff3fe6be2eca39e859d644c51ecd88869) -- [actions] add "Allow Edits" workflow [`d464d8f`](https://github.com/ljharb/side-channel/commit/d464d8fe52b5eddf1504a0ed97f0941a90f32c15) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`02daca8`](https://github.com/ljharb/side-channel/commit/02daca87c6809821c97be468d1afa2f5ef447383) -- [Refactor] use `call-bind` and `get-intrinsic` instead of `es-abstract` [`e09d481`](https://github.com/ljharb/side-channel/commit/e09d481528452ebafa5cdeae1af665c35aa2deee) -- [Deps] update `object.assign` [`ee83aa8`](https://github.com/ljharb/side-channel/commit/ee83aa81df313b5e46319a63adb05cf0c179079a) -- [actions] update rebase action to use checkout v2 [`7726b0b`](https://github.com/ljharb/side-channel/commit/7726b0b058b632fccea709f58960871defaaa9d7) - -## [v1.0.3](https://github.com/ljharb/side-channel/compare/v1.0.2...v1.0.3) - 2020-08-23 - -### Commits - -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`1f10561`](https://github.com/ljharb/side-channel/commit/1f105611ef3acf32dec8032ae5c0baa5e56bb868) -- [Deps] update `es-abstract`, `object-inspect` [`bc20159`](https://github.com/ljharb/side-channel/commit/bc201597949a505e37cef9eaf24c7010831e6f03) -- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`b9b2b22`](https://github.com/ljharb/side-channel/commit/b9b2b225f9e0ea72a6ec2b89348f0bd690bc9ed1) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7055ab4`](https://github.com/ljharb/side-channel/commit/7055ab4de0860606efd2003674a74f1fe6ebc07e) -- [Dev Deps] update `auto-changelog`; add `aud` [`d278c37`](https://github.com/ljharb/side-channel/commit/d278c37d08227be4f84aa769fcd919e73feeba40) -- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`3bcf982`](https://github.com/ljharb/side-channel/commit/3bcf982faa122745b39c33ce83d32fdf003741c6) -- [Tests] only audit prod deps [`18d01c4`](https://github.com/ljharb/side-channel/commit/18d01c4015b82a3d75044c4d5ba7917b2eac01ec) -- [Deps] update `es-abstract` [`6ab096d`](https://github.com/ljharb/side-channel/commit/6ab096d9de2b482cf5e0717e34e212f5b2b9bc9a) -- [Dev Deps] update `tape` [`9dc174c`](https://github.com/ljharb/side-channel/commit/9dc174cc651dfd300b4b72da936a0a7eda5f9452) -- [Deps] update `es-abstract` [`431d0f0`](https://github.com/ljharb/side-channel/commit/431d0f0ff11fbd2ae6f3115582a356d3a1cfce82) -- [Deps] update `es-abstract` [`49869fd`](https://github.com/ljharb/side-channel/commit/49869fd323bf4453f0ba515c0fb265cf5ab7b932) -- [meta] Add package.json to package's exports [`77d9cdc`](https://github.com/ljharb/side-channel/commit/77d9cdceb2a9e47700074f2ae0c0a202e7dac0d4) - -## [v1.0.2](https://github.com/ljharb/side-channel/compare/v1.0.1...v1.0.2) - 2019-12-20 - -### Commits - -- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`4a526df`](https://github.com/ljharb/side-channel/commit/4a526df44e4701566ed001ec78546193f818b082) -- [Deps] update `es-abstract` [`d4f6e62`](https://github.com/ljharb/side-channel/commit/d4f6e629b6fb93a07415db7f30d3c90fd7f264fe) - -## [v1.0.1](https://github.com/ljharb/side-channel/compare/v1.0.0...v1.0.1) - 2019-12-01 - -### Commits - -- [Fix] add missing "exports" [`d212907`](https://github.com/ljharb/side-channel/commit/d2129073abf0701a5343bf28aa2145617604dc2e) - -## v1.0.0 - 2019-12-01 - -### Commits - -- Initial implementation [`dbebd3a`](https://github.com/ljharb/side-channel/commit/dbebd3a4b5ed64242f9a6810efe7c4214cd8cde4) -- Initial tests [`73bdefe`](https://github.com/ljharb/side-channel/commit/73bdefe568c9076cf8c0b8719bc2141aec0e19b8) -- Initial commit [`43c03e1`](https://github.com/ljharb/side-channel/commit/43c03e1c2849ec50a87b7a5cd76238a62b0b8770) -- npm init [`5c090a7`](https://github.com/ljharb/side-channel/commit/5c090a765d66a5527d9889b89aeff78dee91348c) -- [meta] add `auto-changelog` [`a5c4e56`](https://github.com/ljharb/side-channel/commit/a5c4e5675ec02d5eb4d84b4243aeea2a1d38fbec) -- [actions] add automatic rebasing / merge commit blocking [`bab1683`](https://github.com/ljharb/side-channel/commit/bab1683d8f9754b086e94397699fdc645e0d7077) -- [meta] add `funding` field; create FUNDING.yml [`63d7aea`](https://github.com/ljharb/side-channel/commit/63d7aeaf34f5650650ae97ca4b9fae685bd0937c) -- [Tests] add `npm run lint` [`46a5a81`](https://github.com/ljharb/side-channel/commit/46a5a81705cd2664f83df232c01dbbf2ee952885) -- Only apps should have lockfiles [`8b16b03`](https://github.com/ljharb/side-channel/commit/8b16b0305f00895d90c4e2e5773c854cfea0e448) -- [meta] add `safe-publish-latest` [`2f098ef`](https://github.com/ljharb/side-channel/commit/2f098ef092a39399cfe548b19a1fc03c2fd2f490) diff --git a/node_modules/side-channel/LICENSE b/node_modules/side-channel/LICENSE deleted file mode 100644 index 3900dd7..0000000 --- a/node_modules/side-channel/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2019 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/side-channel/README.md b/node_modules/side-channel/README.md deleted file mode 100644 index cc7e103..0000000 --- a/node_modules/side-channel/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# side-channel [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -Store information about any JS value in a side channel. Uses WeakMap if available. - -Warning: in an environment that lacks `WeakMap`, this implementation will leak memory until you `delete` the `key`. - -## Getting started - -```sh -npm install --save side-channel -``` - -## Usage/Examples - -```js -const assert = require('assert'); -const getSideChannel = require('side-channel'); - -const channel = getSideChannel(); - -const key = {}; -assert.equal(channel.has(key), false); -assert.throws(() => channel.assert(key), TypeError); - -channel.set(key, 42); - -channel.assert(key); // does not throw -assert.equal(channel.has(key), true); -assert.equal(channel.get(key), 42); - -channel.delete(key); -assert.equal(channel.has(key), false); -assert.throws(() => channel.assert(key), TypeError); -``` - -## Tests - -Clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/side-channel -[npm-version-svg]: https://versionbadg.es/ljharb/side-channel.svg -[deps-svg]: https://david-dm.org/ljharb/side-channel.svg -[deps-url]: https://david-dm.org/ljharb/side-channel -[dev-deps-svg]: https://david-dm.org/ljharb/side-channel/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/side-channel#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/side-channel.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/side-channel.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/side-channel.svg -[downloads-url]: https://npm-stat.com/charts.html?package=side-channel -[codecov-image]: https://codecov.io/gh/ljharb/side-channel/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/side-channel/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/side-channel -[actions-url]: https://github.com/ljharb/side-channel/actions diff --git a/node_modules/side-channel/index.d.ts b/node_modules/side-channel/index.d.ts deleted file mode 100644 index 18c6317..0000000 --- a/node_modules/side-channel/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import getSideChannelList from 'side-channel-list'; -import getSideChannelMap from 'side-channel-map'; -import getSideChannelWeakMap from 'side-channel-weakmap'; - -declare namespace getSideChannel { - type Channel = - | getSideChannelList.Channel - | ReturnType, false>> - | ReturnType, false>>; -} - -declare function getSideChannel(): getSideChannel.Channel; - -export = getSideChannel; diff --git a/node_modules/side-channel/index.js b/node_modules/side-channel/index.js deleted file mode 100644 index a8a9b05..0000000 --- a/node_modules/side-channel/index.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -var $TypeError = require('es-errors/type'); -var inspect = require('object-inspect'); -var getSideChannelList = require('side-channel-list'); -var getSideChannelMap = require('side-channel-map'); -var getSideChannelWeakMap = require('side-channel-weakmap'); - -var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList; - -/** @type {import('.')} */ -module.exports = function getSideChannel() { - /** @typedef {ReturnType} Channel */ - - /** @type {Channel | undefined} */ var $channelData; - - /** @type {Channel} */ - var channel = { - assert: function (key) { - if (!channel.has(key)) { - throw new $TypeError('Side channel does not contain ' + inspect(key)); - } - }, - 'delete': function (key) { - return !!$channelData && $channelData['delete'](key); - }, - get: function (key) { - return $channelData && $channelData.get(key); - }, - has: function (key) { - return !!$channelData && $channelData.has(key); - }, - set: function (key, value) { - if (!$channelData) { - $channelData = makeChannel(); - } - - $channelData.set(key, value); - } - }; - // @ts-expect-error TODO: figure out why this is erroring - return channel; -}; diff --git a/node_modules/side-channel/package.json b/node_modules/side-channel/package.json deleted file mode 100644 index 30fa42c..0000000 --- a/node_modules/side-channel/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "name": "side-channel", - "version": "1.1.0", - "description": "Store information about any JS value in a side channel. Uses WeakMap if available.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "types": "./index.d.ts", - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p . && attw -P", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx npm@'>=10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/side-channel.git" - }, - "keywords": [ - "weakmap", - "map", - "side", - "channel", - "metadata" - ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/side-channel/issues" - }, - "homepage": "https://github.com/ljharb/side-channel#readme", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.1", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.2", - "@types/object-inspect": "^1.13.0", - "@types/tape": "^5.6.5", - "auto-changelog": "^2.5.0", - "eclint": "^2.8.1", - "encoding": "^0.1.13", - "eslint": "=8.8.0", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/side-channel/test/index.js b/node_modules/side-channel/test/index.js deleted file mode 100644 index bd1e7c2..0000000 --- a/node_modules/side-channel/test/index.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var getSideChannel = require('../'); - -test('getSideChannel', function (t) { - t.test('export', function (st) { - st.equal(typeof getSideChannel, 'function', 'is a function'); - - st.equal(getSideChannel.length, 0, 'takes no arguments'); - - var channel = getSideChannel(); - st.ok(channel, 'is truthy'); - st.equal(typeof channel, 'object', 'is an object'); - st.end(); - }); - - t.test('assert', function (st) { - var channel = getSideChannel(); - st['throws']( - function () { channel.assert({}); }, - TypeError, - 'nonexistent value throws' - ); - - var o = {}; - channel.set(o, 'data'); - st.doesNotThrow(function () { channel.assert(o); }, 'existent value noops'); - - st.end(); - }); - - t.test('has', function (st) { - var channel = getSideChannel(); - /** @type {unknown[]} */ var o = []; - - st.equal(channel.has(o), false, 'nonexistent value yields false'); - - channel.set(o, 'foo'); - st.equal(channel.has(o), true, 'existent value yields true'); - - st.equal(channel.has('abc'), false, 'non object value non existent yields false'); - - channel.set('abc', 'foo'); - st.equal(channel.has('abc'), true, 'non object value that exists yields true'); - - st.end(); - }); - - t.test('get', function (st) { - var channel = getSideChannel(); - var o = {}; - st.equal(channel.get(o), undefined, 'nonexistent value yields undefined'); - - var data = {}; - channel.set(o, data); - st.equal(channel.get(o), data, '"get" yields data set by "set"'); - - st.end(); - }); - - t.test('set', function (st) { - var channel = getSideChannel(); - var o = function () {}; - st.equal(channel.get(o), undefined, 'value not set'); - - channel.set(o, 42); - st.equal(channel.get(o), 42, 'value was set'); - - channel.set(o, Infinity); - st.equal(channel.get(o), Infinity, 'value was set again'); - - var o2 = {}; - channel.set(o2, 17); - st.equal(channel.get(o), Infinity, 'o is not modified'); - st.equal(channel.get(o2), 17, 'o2 is set'); - - channel.set(o, 14); - st.equal(channel.get(o), 14, 'o is modified'); - st.equal(channel.get(o2), 17, 'o2 is not modified'); - - st.end(); - }); - - t.test('delete', function (st) { - var channel = getSideChannel(); - var o = {}; - st.equal(channel['delete']({}), false, 'nonexistent value yields false'); - - channel.set(o, 42); - st.equal(channel.has(o), true, 'value is set'); - - st.equal(channel['delete']({}), false, 'nonexistent value still yields false'); - - st.equal(channel['delete'](o), true, 'deleted value yields true'); - - st.equal(channel.has(o), false, 'value is no longer set'); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/side-channel/tsconfig.json b/node_modules/side-channel/tsconfig.json deleted file mode 100644 index d9a6668..0000000 --- a/node_modules/side-channel/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "es2021", - }, - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/statuses/HISTORY.md b/node_modules/statuses/HISTORY.md deleted file mode 100644 index dc549b8..0000000 --- a/node_modules/statuses/HISTORY.md +++ /dev/null @@ -1,87 +0,0 @@ -2.0.2 / 2025-06-06 -================== - - * Migrate to `String.prototype.slice()` - -2.0.1 / 2021-01-03 -================== - - * Fix returning values from `Object.prototype` - -2.0.0 / 2020-04-19 -================== - - * Drop support for Node.js 0.6 - * Fix messaging casing of `418 I'm a Teapot` - * Remove code 306 - * Remove `status[code]` exports; use `status.message[code]` - * Remove `status[msg]` exports; use `status.code[msg]` - * Rename `425 Unordered Collection` to standard `425 Too Early` - * Rename `STATUS_CODES` export to `message` - * Return status message for `statuses(code)` when given code - -1.5.0 / 2018-03-27 -================== - - * Add `103 Early Hints` - -1.4.0 / 2017-10-20 -================== - - * Add `STATUS_CODES` export - -1.3.1 / 2016-11-11 -================== - - * Fix return type in JSDoc - -1.3.0 / 2016-05-17 -================== - - * Add `421 Misdirected Request` - * perf: enable strict mode - -1.2.1 / 2015-02-01 -================== - - * Fix message for status 451 - - `451 Unavailable For Legal Reasons` - -1.2.0 / 2014-09-28 -================== - - * Add `208 Already Repored` - * Add `226 IM Used` - * Add `306 (Unused)` - * Add `415 Unable For Legal Reasons` - * Add `508 Loop Detected` - -1.1.1 / 2014-09-24 -================== - - * Add missing 308 to `codes.json` - -1.1.0 / 2014-09-21 -================== - - * Add `codes.json` for universal support - -1.0.4 / 2014-08-20 -================== - - * Package cleanup - -1.0.3 / 2014-06-08 -================== - - * Add 308 to `.redirect` category - -1.0.2 / 2014-03-13 -================== - - * Add `.retry` category - -1.0.1 / 2014-03-12 -================== - - * Initial release diff --git a/node_modules/statuses/LICENSE b/node_modules/statuses/LICENSE deleted file mode 100644 index 28a3161..0000000 --- a/node_modules/statuses/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/statuses/README.md b/node_modules/statuses/README.md deleted file mode 100644 index 89d542f..0000000 --- a/node_modules/statuses/README.md +++ /dev/null @@ -1,139 +0,0 @@ -# statuses - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] -[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer] - -HTTP status utility for node. - -This module provides a list of status codes and messages sourced from -a few different projects: - - * The [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) - * The [Node.js project](https://nodejs.org/) - * The [NGINX project](https://www.nginx.com/) - * The [Apache HTTP Server project](https://httpd.apache.org/) - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install statuses -``` - -## API - - - -```js -var status = require('statuses') -``` - -### status(code) - -Returns the status message string for a known HTTP status code. The code -may be a number or a string. An error is thrown for an unknown status code. - - - -```js -status(403) // => 'Forbidden' -status('403') // => 'Forbidden' -status(306) // throws -``` - -### status(msg) - -Returns the numeric status code for a known HTTP status message. The message -is case-insensitive. An error is thrown for an unknown status message. - - - -```js -status('forbidden') // => 403 -status('Forbidden') // => 403 -status('foo') // throws -``` - -### status.codes - -Returns an array of all the status codes as `Integer`s. - -### status.code[msg] - -Returns the numeric status code for a known status message (in lower-case), -otherwise `undefined`. - - - -```js -status['not found'] // => 404 -``` - -### status.empty[code] - -Returns `true` if a status code expects an empty body. - - - -```js -status.empty[200] // => undefined -status.empty[204] // => true -status.empty[304] // => true -``` - -### status.message[code] - -Returns the string message for a known numeric status code, otherwise -`undefined`. This object is the same format as the -[Node.js http module `http.STATUS_CODES`](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes). - - - -```js -status.message[404] // => 'Not Found' -``` - -### status.redirect[code] - -Returns `true` if a status code is a valid redirect status. - - - -```js -status.redirect[200] // => undefined -status.redirect[301] // => true -``` - -### status.retry[code] - -Returns `true` if you should retry the rest. - - - -```js -status.retry[501] // => undefined -status.retry[503] // => true -``` - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/statuses/master?label=ci -[ci-url]: https://github.com/jshttp/statuses/actions?query=workflow%3Aci -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/statuses/master -[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master -[node-version-image]: https://badgen.net/npm/node/statuses -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/statuses -[npm-url]: https://npmjs.org/package/statuses -[npm-version-image]: https://badgen.net/npm/v/statuses -[ossf-scorecard-badge]: https://api.securityscorecards.dev/projects/github.com/jshttp/statuses/badge -[ossf-scorecard-visualizer]: https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/jshttp/statuses diff --git a/node_modules/statuses/codes.json b/node_modules/statuses/codes.json deleted file mode 100644 index 1333ed1..0000000 --- a/node_modules/statuses/codes.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "100": "Continue", - "101": "Switching Protocols", - "102": "Processing", - "103": "Early Hints", - "200": "OK", - "201": "Created", - "202": "Accepted", - "203": "Non-Authoritative Information", - "204": "No Content", - "205": "Reset Content", - "206": "Partial Content", - "207": "Multi-Status", - "208": "Already Reported", - "226": "IM Used", - "300": "Multiple Choices", - "301": "Moved Permanently", - "302": "Found", - "303": "See Other", - "304": "Not Modified", - "305": "Use Proxy", - "307": "Temporary Redirect", - "308": "Permanent Redirect", - "400": "Bad Request", - "401": "Unauthorized", - "402": "Payment Required", - "403": "Forbidden", - "404": "Not Found", - "405": "Method Not Allowed", - "406": "Not Acceptable", - "407": "Proxy Authentication Required", - "408": "Request Timeout", - "409": "Conflict", - "410": "Gone", - "411": "Length Required", - "412": "Precondition Failed", - "413": "Payload Too Large", - "414": "URI Too Long", - "415": "Unsupported Media Type", - "416": "Range Not Satisfiable", - "417": "Expectation Failed", - "418": "I'm a Teapot", - "421": "Misdirected Request", - "422": "Unprocessable Entity", - "423": "Locked", - "424": "Failed Dependency", - "425": "Too Early", - "426": "Upgrade Required", - "428": "Precondition Required", - "429": "Too Many Requests", - "431": "Request Header Fields Too Large", - "451": "Unavailable For Legal Reasons", - "500": "Internal Server Error", - "501": "Not Implemented", - "502": "Bad Gateway", - "503": "Service Unavailable", - "504": "Gateway Timeout", - "505": "HTTP Version Not Supported", - "506": "Variant Also Negotiates", - "507": "Insufficient Storage", - "508": "Loop Detected", - "509": "Bandwidth Limit Exceeded", - "510": "Not Extended", - "511": "Network Authentication Required" -} diff --git a/node_modules/statuses/index.js b/node_modules/statuses/index.js deleted file mode 100644 index ea351c5..0000000 --- a/node_modules/statuses/index.js +++ /dev/null @@ -1,146 +0,0 @@ -/*! - * statuses - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var codes = require('./codes.json') - -/** - * Module exports. - * @public - */ - -module.exports = status - -// status code to message map -status.message = codes - -// status message (lower-case) to code map -status.code = createMessageToStatusCodeMap(codes) - -// array of status codes -status.codes = createStatusCodeList(codes) - -// status codes for redirects -status.redirect = { - 300: true, - 301: true, - 302: true, - 303: true, - 305: true, - 307: true, - 308: true -} - -// status codes for empty bodies -status.empty = { - 204: true, - 205: true, - 304: true -} - -// status codes for when you should retry the request -status.retry = { - 502: true, - 503: true, - 504: true -} - -/** - * Create a map of message to status code. - * @private - */ - -function createMessageToStatusCodeMap (codes) { - var map = {} - - Object.keys(codes).forEach(function forEachCode (code) { - var message = codes[code] - var status = Number(code) - - // populate map - map[message.toLowerCase()] = status - }) - - return map -} - -/** - * Create a list of all status codes. - * @private - */ - -function createStatusCodeList (codes) { - return Object.keys(codes).map(function mapCode (code) { - return Number(code) - }) -} - -/** - * Get the status code for given message. - * @private - */ - -function getStatusCode (message) { - var msg = message.toLowerCase() - - if (!Object.prototype.hasOwnProperty.call(status.code, msg)) { - throw new Error('invalid status message: "' + message + '"') - } - - return status.code[msg] -} - -/** - * Get the status message for given code. - * @private - */ - -function getStatusMessage (code) { - if (!Object.prototype.hasOwnProperty.call(status.message, code)) { - throw new Error('invalid status code: ' + code) - } - - return status.message[code] -} - -/** - * Get the status code. - * - * Given a number, this will throw if it is not a known status - * code, otherwise the code will be returned. Given a string, - * the string will be parsed for a number and return the code - * if valid, otherwise will lookup the code assuming this is - * the status message. - * - * @param {string|number} code - * @returns {number} - * @public - */ - -function status (code) { - if (typeof code === 'number') { - return getStatusMessage(code) - } - - if (typeof code !== 'string') { - throw new TypeError('code must be a number or string') - } - - // '403' - var n = parseInt(code, 10) - if (!isNaN(n)) { - return getStatusMessage(n) - } - - return getStatusCode(code) -} diff --git a/node_modules/statuses/package.json b/node_modules/statuses/package.json deleted file mode 100644 index b5d016e..0000000 --- a/node_modules/statuses/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "statuses", - "description": "HTTP status utility", - "version": "2.0.2", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)" - ], - "repository": "jshttp/statuses", - "license": "MIT", - "keywords": [ - "http", - "status", - "code" - ], - "files": [ - "HISTORY.md", - "index.js", - "codes.json", - "LICENSE" - ], - "devDependencies": { - "csv-parse": "4.16.3", - "eslint": "7.19.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.31.0", - "eslint-plugin-markdown": "1.0.2", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "4.3.1", - "eslint-plugin-standard": "4.1.0", - "mocha": "8.4.0", - "nyc": "15.1.0", - "raw-body": "2.5.2", - "stream-to-array": "2.3.0" - }, - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "build": "node scripts/build.js", - "fetch": "node scripts/fetch-apache.js && node scripts/fetch-iana.js && node scripts/fetch-nginx.js && node scripts/fetch-node.js", - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "update": "npm run fetch && npm run build", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/node_modules/string-width/index.d.ts b/node_modules/string-width/index.d.ts deleted file mode 100644 index 12b5309..0000000 --- a/node_modules/string-width/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -declare const stringWidth: { - /** - Get the visual width of a string - the number of columns required to display it. - - Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. - - @example - ``` - import stringWidth = require('string-width'); - - stringWidth('a'); - //=> 1 - - stringWidth('古'); - //=> 2 - - stringWidth('\u001B[1m古\u001B[22m'); - //=> 2 - ``` - */ - (string: string): number; - - // TODO: remove this in the next major version, refactor the whole definition to: - // declare function stringWidth(string: string): number; - // export = stringWidth; - default: typeof stringWidth; -} - -export = stringWidth; diff --git a/node_modules/string-width/index.js b/node_modules/string-width/index.js deleted file mode 100644 index f4d261a..0000000 --- a/node_modules/string-width/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; -const stripAnsi = require('strip-ansi'); -const isFullwidthCodePoint = require('is-fullwidth-code-point'); -const emojiRegex = require('emoji-regex'); - -const stringWidth = string => { - if (typeof string !== 'string' || string.length === 0) { - return 0; - } - - string = stripAnsi(string); - - if (string.length === 0) { - return 0; - } - - string = string.replace(emojiRegex(), ' '); - - let width = 0; - - for (let i = 0; i < string.length; i++) { - const code = string.codePointAt(i); - - // Ignore control characters - if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { - continue; - } - - // Ignore combining characters - if (code >= 0x300 && code <= 0x36F) { - continue; - } - - // Surrogates - if (code > 0xFFFF) { - i++; - } - - width += isFullwidthCodePoint(code) ? 2 : 1; - } - - return width; -}; - -module.exports = stringWidth; -// TODO: remove this in the next major version -module.exports.default = stringWidth; diff --git a/node_modules/string-width/license b/node_modules/string-width/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/string-width/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/string-width/package.json b/node_modules/string-width/package.json deleted file mode 100644 index 28ba7b4..0000000 --- a/node_modules/string-width/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "string-width", - "version": "4.2.3", - "description": "Get the visual width of a string - the number of columns required to display it", - "license": "MIT", - "repository": "sindresorhus/string-width", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "string", - "character", - "unicode", - "width", - "visual", - "column", - "columns", - "fullwidth", - "full-width", - "full", - "ansi", - "escape", - "codes", - "cli", - "command-line", - "terminal", - "console", - "cjk", - "chinese", - "japanese", - "korean", - "fixed-width" - ], - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} diff --git a/node_modules/string-width/readme.md b/node_modules/string-width/readme.md deleted file mode 100644 index bdd3141..0000000 --- a/node_modules/string-width/readme.md +++ /dev/null @@ -1,50 +0,0 @@ -# string-width - -> Get the visual width of a string - the number of columns required to display it - -Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. - -Useful to be able to measure the actual width of command-line output. - - -## Install - -``` -$ npm install string-width -``` - - -## Usage - -```js -const stringWidth = require('string-width'); - -stringWidth('a'); -//=> 1 - -stringWidth('古'); -//=> 2 - -stringWidth('\u001B[1m古\u001B[22m'); -//=> 2 -``` - - -## Related - -- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module -- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string -- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string - - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/node_modules/strip-ansi/index.d.ts b/node_modules/strip-ansi/index.d.ts deleted file mode 100644 index 907fccc..0000000 --- a/node_modules/strip-ansi/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** -Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. - -@example -``` -import stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` -*/ -declare function stripAnsi(string: string): string; - -export = stripAnsi; diff --git a/node_modules/strip-ansi/index.js b/node_modules/strip-ansi/index.js deleted file mode 100644 index 9a593df..0000000 --- a/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/node_modules/strip-ansi/license b/node_modules/strip-ansi/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/strip-ansi/package.json b/node_modules/strip-ansi/package.json deleted file mode 100644 index 1a41108..0000000 --- a/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "strip-ansi", - "version": "6.0.1", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/strip-ansi/readme.md b/node_modules/strip-ansi/readme.md deleted file mode 100644 index 7c4b56d..0000000 --- a/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) - -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string - - -## Install - -``` -$ npm install strip-ansi -``` - - -## Usage - -```js -const stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` - - -## strip-ansi for enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - diff --git a/node_modules/toidentifier/HISTORY.md b/node_modules/toidentifier/HISTORY.md deleted file mode 100644 index cb7cc89..0000000 --- a/node_modules/toidentifier/HISTORY.md +++ /dev/null @@ -1,9 +0,0 @@ -1.0.1 / 2021-11-14 -================== - - * pref: enable strict mode - -1.0.0 / 2018-07-09 -================== - - * Initial release diff --git a/node_modules/toidentifier/LICENSE b/node_modules/toidentifier/LICENSE deleted file mode 100644 index de22d15..0000000 --- a/node_modules/toidentifier/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/toidentifier/README.md b/node_modules/toidentifier/README.md deleted file mode 100644 index 57e8a78..0000000 --- a/node_modules/toidentifier/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# toidentifier - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Build Status][github-actions-ci-image]][github-actions-ci-url] -[![Test Coverage][codecov-image]][codecov-url] - -> Convert a string of words to a JavaScript identifier - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```bash -$ npm install toidentifier -``` - -## Example - -```js -var toIdentifier = require('toidentifier') - -console.log(toIdentifier('Bad Request')) -// => "BadRequest" -``` - -## API - -This CommonJS module exports a single default function: `toIdentifier`. - -### toIdentifier(string) - -Given a string as the argument, it will be transformed according to -the following rules and the new string will be returned: - -1. Split into words separated by space characters (`0x20`). -2. Upper case the first character of each word. -3. Join the words together with no separator. -4. Remove all non-word (`[0-9a-z_]`) characters. - -## License - -[MIT](LICENSE) - -[codecov-image]: https://img.shields.io/codecov/c/github/component/toidentifier.svg -[codecov-url]: https://codecov.io/gh/component/toidentifier -[downloads-image]: https://img.shields.io/npm/dm/toidentifier.svg -[downloads-url]: https://npmjs.org/package/toidentifier -[github-actions-ci-image]: https://img.shields.io/github/workflow/status/component/toidentifier/ci/master?label=ci -[github-actions-ci-url]: https://github.com/component/toidentifier?query=workflow%3Aci -[npm-image]: https://img.shields.io/npm/v/toidentifier.svg -[npm-url]: https://npmjs.org/package/toidentifier - - -## - -[npm]: https://www.npmjs.com/ - -[yarn]: https://yarnpkg.com/ diff --git a/node_modules/toidentifier/index.js b/node_modules/toidentifier/index.js deleted file mode 100644 index 9295d02..0000000 --- a/node_modules/toidentifier/index.js +++ /dev/null @@ -1,32 +0,0 @@ -/*! - * toidentifier - * Copyright(c) 2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = toIdentifier - -/** - * Trasform the given string into a JavaScript identifier - * - * @param {string} str - * @returns {string} - * @public - */ - -function toIdentifier (str) { - return str - .split(' ') - .map(function (token) { - return token.slice(0, 1).toUpperCase() + token.slice(1) - }) - .join('') - .replace(/[^ _0-9a-z]/gi, '') -} diff --git a/node_modules/toidentifier/package.json b/node_modules/toidentifier/package.json deleted file mode 100644 index 42db1a6..0000000 --- a/node_modules/toidentifier/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "toidentifier", - "description": "Convert a string of words to a JavaScript identifier", - "version": "1.0.1", - "author": "Douglas Christopher Wilson ", - "contributors": [ - "Douglas Christopher Wilson ", - "Nick Baugh (http://niftylettuce.com/)" - ], - "repository": "component/toidentifier", - "devDependencies": { - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.25.3", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "4.3.1", - "eslint-plugin-standard": "4.1.0", - "mocha": "9.1.3", - "nyc": "15.1.0" - }, - "engines": { - "node": ">=0.6" - }, - "license": "MIT", - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/node_modules/type-is/HISTORY.md b/node_modules/type-is/HISTORY.md deleted file mode 100644 index 8de21f7..0000000 --- a/node_modules/type-is/HISTORY.md +++ /dev/null @@ -1,259 +0,0 @@ -1.6.18 / 2019-04-26 -=================== - - * Fix regression passing request object to `typeis.is` - -1.6.17 / 2019-04-25 -=================== - - * deps: mime-types@~2.1.24 - - Add Apple file extensions from IANA - - Add extension `.csl` to `application/vnd.citationstyles.style+xml` - - Add extension `.es` to `application/ecmascript` - - Add extension `.nq` to `application/n-quads` - - Add extension `.nt` to `application/n-triples` - - Add extension `.owl` to `application/rdf+xml` - - Add extensions `.siv` and `.sieve` to `application/sieve` - - Add extensions from IANA for `image/*` types - - Add extensions from IANA for `model/*` types - - Add extensions to HEIC image types - - Add new mime types - - Add `text/mdx` with extension `.mdx` - * perf: prevent internal `throw` on invalid type - -1.6.16 / 2018-02-16 -=================== - - * deps: mime-types@~2.1.18 - - Add `application/raml+yaml` with extension `.raml` - - Add `application/wasm` with extension `.wasm` - - Add `text/shex` with extension `.shex` - - Add extensions for JPEG-2000 images - - Add extensions from IANA for `message/*` types - - Add extension `.mjs` to `application/javascript` - - Add extension `.wadl` to `application/vnd.sun.wadl+xml` - - Add extension `.gz` to `application/gzip` - - Add glTF types and extensions - - Add new mime types - - Update extensions `.md` and `.markdown` to be `text/markdown` - - Update font MIME types - - Update `text/hjson` to registered `application/hjson` - -1.6.15 / 2017-03-31 -=================== - - * deps: mime-types@~2.1.15 - - Add new mime types - -1.6.14 / 2016-11-18 -=================== - - * deps: mime-types@~2.1.13 - - Add new mime types - -1.6.13 / 2016-05-18 -=================== - - * deps: mime-types@~2.1.11 - - Add new mime types - -1.6.12 / 2016-02-28 -=================== - - * deps: mime-types@~2.1.10 - - Add new mime types - - Fix extension of `application/dash+xml` - - Update primary extension for `audio/mp4` - -1.6.11 / 2016-01-29 -=================== - - * deps: mime-types@~2.1.9 - - Add new mime types - -1.6.10 / 2015-12-01 -=================== - - * deps: mime-types@~2.1.8 - - Add new mime types - -1.6.9 / 2015-09-27 -================== - - * deps: mime-types@~2.1.7 - - Add new mime types - -1.6.8 / 2015-09-04 -================== - - * deps: mime-types@~2.1.6 - - Add new mime types - -1.6.7 / 2015-08-20 -================== - - * Fix type error when given invalid type to match against - * deps: mime-types@~2.1.5 - - Add new mime types - -1.6.6 / 2015-07-31 -================== - - * deps: mime-types@~2.1.4 - - Add new mime types - -1.6.5 / 2015-07-16 -================== - - * deps: mime-types@~2.1.3 - - Add new mime types - -1.6.4 / 2015-07-01 -================== - - * deps: mime-types@~2.1.2 - - Add new mime types - * perf: enable strict mode - * perf: remove argument reassignment - -1.6.3 / 2015-06-08 -================== - - * deps: mime-types@~2.1.1 - - Add new mime types - * perf: reduce try block size - * perf: remove bitwise operations - -1.6.2 / 2015-05-10 -================== - - * deps: mime-types@~2.0.11 - - Add new mime types - -1.6.1 / 2015-03-13 -================== - - * deps: mime-types@~2.0.10 - - Add new mime types - -1.6.0 / 2015-02-12 -================== - - * fix false-positives in `hasBody` `Transfer-Encoding` check - * support wildcard for both type and subtype (`*/*`) - -1.5.7 / 2015-02-09 -================== - - * fix argument reassignment - * deps: mime-types@~2.0.9 - - Add new mime types - -1.5.6 / 2015-01-29 -================== - - * deps: mime-types@~2.0.8 - - Add new mime types - -1.5.5 / 2014-12-30 -================== - - * deps: mime-types@~2.0.7 - - Add new mime types - - Fix missing extensions - - Fix various invalid MIME type entries - - Remove example template MIME types - - deps: mime-db@~1.5.0 - -1.5.4 / 2014-12-10 -================== - - * deps: mime-types@~2.0.4 - - Add new mime types - - deps: mime-db@~1.3.0 - -1.5.3 / 2014-11-09 -================== - - * deps: mime-types@~2.0.3 - - Add new mime types - - deps: mime-db@~1.2.0 - -1.5.2 / 2014-09-28 -================== - - * deps: mime-types@~2.0.2 - - Add new mime types - - deps: mime-db@~1.1.0 - -1.5.1 / 2014-09-07 -================== - - * Support Node.js 0.6 - * deps: media-typer@0.3.0 - * deps: mime-types@~2.0.1 - - Support Node.js 0.6 - -1.5.0 / 2014-09-05 -================== - - * fix `hasbody` to be true for `content-length: 0` - -1.4.0 / 2014-09-02 -================== - - * update mime-types - -1.3.2 / 2014-06-24 -================== - - * use `~` range on mime-types - -1.3.1 / 2014-06-19 -================== - - * fix global variable leak - -1.3.0 / 2014-06-19 -================== - - * improve type parsing - - - invalid media type never matches - - media type not case-sensitive - - extra LWS does not affect results - -1.2.2 / 2014-06-19 -================== - - * fix behavior on unknown type argument - -1.2.1 / 2014-06-03 -================== - - * switch dependency from `mime` to `mime-types@1.0.0` - -1.2.0 / 2014-05-11 -================== - - * support suffix matching: - - - `+json` matches `application/vnd+json` - - `*/vnd+json` matches `application/vnd+json` - - `application/*+json` matches `application/vnd+json` - -1.1.0 / 2014-04-12 -================== - - * add non-array values support - * expose internal utilities: - - - `.is()` - - `.hasBody()` - - `.normalize()` - - `.match()` - -1.0.1 / 2014-03-30 -================== - - * add `multipart` as a shorthand diff --git a/node_modules/type-is/LICENSE b/node_modules/type-is/LICENSE deleted file mode 100644 index 386b7b6..0000000 --- a/node_modules/type-is/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/type-is/README.md b/node_modules/type-is/README.md deleted file mode 100644 index b85ef8f..0000000 --- a/node_modules/type-is/README.md +++ /dev/null @@ -1,170 +0,0 @@ -# type-is - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Infer the content-type of a request. - -### Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install type-is -``` - -## API - -```js -var http = require('http') -var typeis = require('type-is') - -http.createServer(function (req, res) { - var istext = typeis(req, ['text/*']) - res.end('you ' + (istext ? 'sent' : 'did not send') + ' me text') -}) -``` - -### typeis(request, types) - -Checks if the `request` is one of the `types`. If the request has no body, -even if there is a `Content-Type` header, then `null` is returned. If the -`Content-Type` header is invalid or does not matches any of the `types`, then -`false` is returned. Otherwise, a string of the type that matched is returned. - -The `request` argument is expected to be a Node.js HTTP request. The `types` -argument is an array of type strings. - -Each type in the `types` array can be one of the following: - -- A file extension name such as `json`. This name will be returned if matched. -- A mime type such as `application/json`. -- A mime type with a wildcard such as `*/*` or `*/json` or `application/*`. - The full mime type will be returned if matched. -- A suffix such as `+json`. This can be combined with a wildcard such as - `*/vnd+json` or `application/*+json`. The full mime type will be returned - if matched. - -Some examples to illustrate the inputs and returned value: - - - -```js -// req.headers.content-type = 'application/json' - -typeis(req, ['json']) // => 'json' -typeis(req, ['html', 'json']) // => 'json' -typeis(req, ['application/*']) // => 'application/json' -typeis(req, ['application/json']) // => 'application/json' - -typeis(req, ['html']) // => false -``` - -### typeis.hasBody(request) - -Returns a Boolean if the given `request` has a body, regardless of the -`Content-Type` header. - -Having a body has no relation to how large the body is (it may be 0 bytes). -This is similar to how file existence works. If a body does exist, then this -indicates that there is data to read from the Node.js request stream. - - - -```js -if (typeis.hasBody(req)) { - // read the body, since there is one - - req.on('data', function (chunk) { - // ... - }) -} -``` - -### typeis.is(mediaType, types) - -Checks if the `mediaType` is one of the `types`. If the `mediaType` is invalid -or does not matches any of the `types`, then `false` is returned. Otherwise, a -string of the type that matched is returned. - -The `mediaType` argument is expected to be a -[media type](https://tools.ietf.org/html/rfc6838) string. The `types` argument -is an array of type strings. - -Each type in the `types` array can be one of the following: - -- A file extension name such as `json`. This name will be returned if matched. -- A mime type such as `application/json`. -- A mime type with a wildcard such as `*/*` or `*/json` or `application/*`. - The full mime type will be returned if matched. -- A suffix such as `+json`. This can be combined with a wildcard such as - `*/vnd+json` or `application/*+json`. The full mime type will be returned - if matched. - -Some examples to illustrate the inputs and returned value: - - - -```js -var mediaType = 'application/json' - -typeis.is(mediaType, ['json']) // => 'json' -typeis.is(mediaType, ['html', 'json']) // => 'json' -typeis.is(mediaType, ['application/*']) // => 'application/json' -typeis.is(mediaType, ['application/json']) // => 'application/json' - -typeis.is(mediaType, ['html']) // => false -``` - -## Examples - -### Example body parser - -```js -var express = require('express') -var typeis = require('type-is') - -var app = express() - -app.use(function bodyParser (req, res, next) { - if (!typeis.hasBody(req)) { - return next() - } - - switch (typeis(req, ['urlencoded', 'json', 'multipart'])) { - case 'urlencoded': - // parse urlencoded body - throw new Error('implement urlencoded body parsing') - case 'json': - // parse json body - throw new Error('implement json body parsing') - case 'multipart': - // parse multipart body - throw new Error('implement multipart body parsing') - default: - // 415 error code - res.statusCode = 415 - res.end() - break - } -}) -``` - -## License - -[MIT](LICENSE) - -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/type-is/master -[coveralls-url]: https://coveralls.io/r/jshttp/type-is?branch=master -[node-version-image]: https://badgen.net/npm/node/type-is -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/type-is -[npm-url]: https://npmjs.org/package/type-is -[npm-version-image]: https://badgen.net/npm/v/type-is -[travis-image]: https://badgen.net/travis/jshttp/type-is/master -[travis-url]: https://travis-ci.org/jshttp/type-is diff --git a/node_modules/type-is/index.js b/node_modules/type-is/index.js deleted file mode 100644 index 890ad76..0000000 --- a/node_modules/type-is/index.js +++ /dev/null @@ -1,266 +0,0 @@ -/*! - * type-is - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var typer = require('media-typer') -var mime = require('mime-types') - -/** - * Module exports. - * @public - */ - -module.exports = typeofrequest -module.exports.is = typeis -module.exports.hasBody = hasbody -module.exports.normalize = normalize -module.exports.match = mimeMatch - -/** - * Compare a `value` content-type with `types`. - * Each `type` can be an extension like `html`, - * a special shortcut like `multipart` or `urlencoded`, - * or a mime type. - * - * If no types match, `false` is returned. - * Otherwise, the first `type` that matches is returned. - * - * @param {String} value - * @param {Array} types - * @public - */ - -function typeis (value, types_) { - var i - var types = types_ - - // remove parameters and normalize - var val = tryNormalizeType(value) - - // no type or invalid - if (!val) { - return false - } - - // support flattened arguments - if (types && !Array.isArray(types)) { - types = new Array(arguments.length - 1) - for (i = 0; i < types.length; i++) { - types[i] = arguments[i + 1] - } - } - - // no types, return the content type - if (!types || !types.length) { - return val - } - - var type - for (i = 0; i < types.length; i++) { - if (mimeMatch(normalize(type = types[i]), val)) { - return type[0] === '+' || type.indexOf('*') !== -1 - ? val - : type - } - } - - // no matches - return false -} - -/** - * Check if a request has a request body. - * A request with a body __must__ either have `transfer-encoding` - * or `content-length` headers set. - * http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3 - * - * @param {Object} request - * @return {Boolean} - * @public - */ - -function hasbody (req) { - return req.headers['transfer-encoding'] !== undefined || - !isNaN(req.headers['content-length']) -} - -/** - * Check if the incoming request contains the "Content-Type" - * header field, and it contains any of the give mime `type`s. - * If there is no request body, `null` is returned. - * If there is no content type, `false` is returned. - * Otherwise, it returns the first `type` that matches. - * - * Examples: - * - * // With Content-Type: text/html; charset=utf-8 - * this.is('html'); // => 'html' - * this.is('text/html'); // => 'text/html' - * this.is('text/*', 'application/json'); // => 'text/html' - * - * // When Content-Type is application/json - * this.is('json', 'urlencoded'); // => 'json' - * this.is('application/json'); // => 'application/json' - * this.is('html', 'application/*'); // => 'application/json' - * - * this.is('html'); // => false - * - * @param {String|Array} types... - * @return {String|false|null} - * @public - */ - -function typeofrequest (req, types_) { - var types = types_ - - // no body - if (!hasbody(req)) { - return null - } - - // support flattened arguments - if (arguments.length > 2) { - types = new Array(arguments.length - 1) - for (var i = 0; i < types.length; i++) { - types[i] = arguments[i + 1] - } - } - - // request content type - var value = req.headers['content-type'] - - return typeis(value, types) -} - -/** - * Normalize a mime type. - * If it's a shorthand, expand it to a valid mime type. - * - * In general, you probably want: - * - * var type = is(req, ['urlencoded', 'json', 'multipart']); - * - * Then use the appropriate body parsers. - * These three are the most common request body types - * and are thus ensured to work. - * - * @param {String} type - * @private - */ - -function normalize (type) { - if (typeof type !== 'string') { - // invalid type - return false - } - - switch (type) { - case 'urlencoded': - return 'application/x-www-form-urlencoded' - case 'multipart': - return 'multipart/*' - } - - if (type[0] === '+') { - // "+json" -> "*/*+json" expando - return '*/*' + type - } - - return type.indexOf('/') === -1 - ? mime.lookup(type) - : type -} - -/** - * Check if `expected` mime type - * matches `actual` mime type with - * wildcard and +suffix support. - * - * @param {String} expected - * @param {String} actual - * @return {Boolean} - * @private - */ - -function mimeMatch (expected, actual) { - // invalid type - if (expected === false) { - return false - } - - // split types - var actualParts = actual.split('/') - var expectedParts = expected.split('/') - - // invalid format - if (actualParts.length !== 2 || expectedParts.length !== 2) { - return false - } - - // validate type - if (expectedParts[0] !== '*' && expectedParts[0] !== actualParts[0]) { - return false - } - - // validate suffix wildcard - if (expectedParts[1].substr(0, 2) === '*+') { - return expectedParts[1].length <= actualParts[1].length + 1 && - expectedParts[1].substr(1) === actualParts[1].substr(1 - expectedParts[1].length) - } - - // validate subtype - if (expectedParts[1] !== '*' && expectedParts[1] !== actualParts[1]) { - return false - } - - return true -} - -/** - * Normalize a type and remove parameters. - * - * @param {string} value - * @return {string} - * @private - */ - -function normalizeType (value) { - // parse the type - var type = typer.parse(value) - - // remove the parameters - type.parameters = undefined - - // reformat it - return typer.format(type) -} - -/** - * Try to normalize a type and remove parameters. - * - * @param {string} value - * @return {string} - * @private - */ - -function tryNormalizeType (value) { - if (!value) { - return null - } - - try { - return normalizeType(value) - } catch (err) { - return null - } -} diff --git a/node_modules/type-is/package.json b/node_modules/type-is/package.json deleted file mode 100644 index 97ba5f1..0000000 --- a/node_modules/type-is/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "type-is", - "description": "Infer the content-type of a request.", - "version": "1.6.18", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)" - ], - "license": "MIT", - "repository": "jshttp/type-is", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "devDependencies": { - "eslint": "5.16.0", - "eslint-config-standard": "12.0.0", - "eslint-plugin-import": "2.17.2", - "eslint-plugin-markdown": "1.0.0", - "eslint-plugin-node": "8.0.1", - "eslint-plugin-promise": "4.1.1", - "eslint-plugin-standard": "4.0.0", - "mocha": "6.1.4", - "nyc": "14.0.0" - }, - "engines": { - "node": ">= 0.6" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "scripts": { - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "test-travis": "nyc --reporter=text npm test" - }, - "keywords": [ - "content", - "type", - "checking" - ] -} diff --git a/node_modules/undici-types/LICENSE b/node_modules/undici-types/LICENSE deleted file mode 100644 index e7323bb..0000000 --- a/node_modules/undici-types/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Matteo Collina and Undici contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/undici-types/README.md b/node_modules/undici-types/README.md deleted file mode 100644 index 20a721c..0000000 --- a/node_modules/undici-types/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# undici-types - -This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version. - -- [GitHub nodejs/undici](https://github.com/nodejs/undici) -- [Undici Documentation](https://undici.nodejs.org/#/) diff --git a/node_modules/undici-types/agent.d.ts b/node_modules/undici-types/agent.d.ts deleted file mode 100644 index b3b376d..0000000 --- a/node_modules/undici-types/agent.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { URL } from 'node:url' -import Pool from './pool' -import Dispatcher from './dispatcher' -import TClientStats from './client-stats' -import TPoolStats from './pool-stats' - -export default Agent - -declare class Agent extends Dispatcher { - constructor (opts?: Agent.Options) - /** `true` after `dispatcher.close()` has been called. */ - closed: boolean - /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */ - destroyed: boolean - /** Dispatches a request. */ - dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean - /** Aggregate stats for a Agent by origin. */ - readonly stats: Record -} - -declare namespace Agent { - export interface Options extends Pool.Options { - /** Default: `(origin, opts) => new Pool(origin, opts)`. */ - factory?(origin: string | URL, opts: Object): Dispatcher; - - interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options['interceptors'] - maxOrigins?: number - } - - export interface DispatchOptions extends Dispatcher.DispatchOptions { - } -} diff --git a/node_modules/undici-types/api.d.ts b/node_modules/undici-types/api.d.ts deleted file mode 100644 index b362b14..0000000 --- a/node_modules/undici-types/api.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { URL, UrlObject } from 'node:url' -import { Duplex } from 'node:stream' -import Dispatcher from './dispatcher' - -/** Performs an HTTP request. */ -declare function request ( - url: string | URL | UrlObject, - options?: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path' | 'method'> & Partial>, -): Promise> - -/** A faster version of `request`. */ -declare function stream ( - url: string | URL | UrlObject, - options: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'>, - factory: Dispatcher.StreamFactory -): Promise> - -/** For easy use with `stream.pipeline`. */ -declare function pipeline ( - url: string | URL | UrlObject, - options: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'>, - handler: Dispatcher.PipelineHandler -): Duplex - -/** Starts two-way communications with the requested resource. */ -declare function connect ( - url: string | URL | UrlObject, - options?: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'> -): Promise> - -/** Upgrade to a different protocol. */ -declare function upgrade ( - url: string | URL | UrlObject, - options?: { dispatcher?: Dispatcher } & Omit -): Promise - -export { - request, - stream, - pipeline, - connect, - upgrade -} diff --git a/node_modules/undici-types/balanced-pool.d.ts b/node_modules/undici-types/balanced-pool.d.ts deleted file mode 100644 index 1813e0c..0000000 --- a/node_modules/undici-types/balanced-pool.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import Pool from './pool' -import Dispatcher from './dispatcher' -import { URL } from 'node:url' - -export default BalancedPool - -type BalancedPoolConnectOptions = Omit - -declare class BalancedPool extends Dispatcher { - constructor (url: string | string[] | URL | URL[], options?: Pool.Options) - - addUpstream (upstream: string | URL): BalancedPool - removeUpstream (upstream: string | URL): BalancedPool - getUpstream (upstream: string | URL): Pool | undefined - upstreams: Array - - /** `true` after `pool.close()` has been called. */ - closed: boolean - /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ - destroyed: boolean - - // Override dispatcher APIs. - override connect ( - options: BalancedPoolConnectOptions - ): Promise - override connect ( - options: BalancedPoolConnectOptions, - callback: (err: Error | null, data: Dispatcher.ConnectData) => void - ): void -} diff --git a/node_modules/undici-types/cache-interceptor.d.ts b/node_modules/undici-types/cache-interceptor.d.ts deleted file mode 100644 index 8588ccd..0000000 --- a/node_modules/undici-types/cache-interceptor.d.ts +++ /dev/null @@ -1,179 +0,0 @@ -import { Readable, Writable } from 'node:stream' - -export default CacheHandler - -declare namespace CacheHandler { - export type CacheMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE' - - export interface CacheHandlerOptions { - store: CacheStore - - cacheByDefault?: number - - type?: CacheOptions['type'] - } - - export interface CacheOptions { - store?: CacheStore - - /** - * The methods to cache - * Note we can only cache safe methods. Unsafe methods (i.e. PUT, POST) - * invalidate the cache for a origin. - * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-respons - * @see https://www.rfc-editor.org/rfc/rfc9110#section-9.2.1 - */ - methods?: CacheMethods[] - - /** - * RFC9111 allows for caching responses that we aren't explicitly told to - * cache or to not cache. - * @see https://www.rfc-editor.org/rfc/rfc9111.html#section-3-5 - * @default undefined - */ - cacheByDefault?: number - - /** - * TODO docs - * @default 'shared' - */ - type?: 'shared' | 'private' - - /** - * Array of origins to cache. Only requests to these origins will be cached. - * Supports strings (case insensitive) and RegExp patterns. - * @default undefined (cache all origins) - */ - origins?: (string | RegExp)[] - } - - export interface CacheControlDirectives { - 'max-stale'?: number; - 'min-fresh'?: number; - 'max-age'?: number; - 's-maxage'?: number; - 'stale-while-revalidate'?: number; - 'stale-if-error'?: number; - public?: true; - private?: true | string[]; - 'no-store'?: true; - 'no-cache'?: true | string[]; - 'must-revalidate'?: true; - 'proxy-revalidate'?: true; - immutable?: true; - 'no-transform'?: true; - 'must-understand'?: true; - 'only-if-cached'?: true; - } - - export interface CacheKey { - origin: string - method: string - path: string - headers?: Record - } - - export interface CacheValue { - statusCode: number - statusMessage: string - headers: Record - vary?: Record - etag?: string - cacheControlDirectives?: CacheControlDirectives - cachedAt: number - staleAt: number - deleteAt: number - } - - export interface DeleteByUri { - origin: string - method: string - path: string - } - - type GetResult = { - statusCode: number - statusMessage: string - headers: Record - vary?: Record - etag?: string - body?: Readable | Iterable | AsyncIterable | Buffer | Iterable | AsyncIterable | string - cacheControlDirectives: CacheControlDirectives, - cachedAt: number - staleAt: number - deleteAt: number - } - - /** - * Underlying storage provider for cached responses - */ - export interface CacheStore { - get(key: CacheKey): GetResult | Promise | undefined - - createWriteStream(key: CacheKey, val: CacheValue): Writable | undefined - - delete(key: CacheKey): void | Promise - } - - export interface MemoryCacheStoreOpts { - /** - * @default Infinity - */ - maxCount?: number - - /** - * @default Infinity - */ - maxSize?: number - - /** - * @default Infinity - */ - maxEntrySize?: number - - errorCallback?: (err: Error) => void - } - - export class MemoryCacheStore implements CacheStore { - constructor (opts?: MemoryCacheStoreOpts) - - get (key: CacheKey): GetResult | Promise | undefined - - createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined - - delete (key: CacheKey): void | Promise - } - - export interface SqliteCacheStoreOpts { - /** - * Location of the database - * @default ':memory:' - */ - location?: string - - /** - * @default Infinity - */ - maxCount?: number - - /** - * @default Infinity - */ - maxEntrySize?: number - } - - export class SqliteCacheStore implements CacheStore { - constructor (opts?: SqliteCacheStoreOpts) - - /** - * Closes the connection to the database - */ - close (): void - - get (key: CacheKey): GetResult | Promise | undefined - - createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined - - delete (key: CacheKey): void | Promise - } -} diff --git a/node_modules/undici-types/cache.d.ts b/node_modules/undici-types/cache.d.ts deleted file mode 100644 index 4c33335..0000000 --- a/node_modules/undici-types/cache.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { RequestInfo, Response, Request } from './fetch' - -export interface CacheStorage { - match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise, - has (cacheName: string): Promise, - open (cacheName: string): Promise, - delete (cacheName: string): Promise, - keys (): Promise -} - -declare const CacheStorage: { - prototype: CacheStorage - new(): CacheStorage -} - -export interface Cache { - match (request: RequestInfo, options?: CacheQueryOptions): Promise, - matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise, - add (request: RequestInfo): Promise, - addAll (requests: RequestInfo[]): Promise, - put (request: RequestInfo, response: Response): Promise, - delete (request: RequestInfo, options?: CacheQueryOptions): Promise, - keys (request?: RequestInfo, options?: CacheQueryOptions): Promise -} - -export interface CacheQueryOptions { - ignoreSearch?: boolean, - ignoreMethod?: boolean, - ignoreVary?: boolean -} - -export interface MultiCacheQueryOptions extends CacheQueryOptions { - cacheName?: string -} - -export declare const caches: CacheStorage diff --git a/node_modules/undici-types/client-stats.d.ts b/node_modules/undici-types/client-stats.d.ts deleted file mode 100644 index ad9bd84..0000000 --- a/node_modules/undici-types/client-stats.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import Client from './client' - -export default ClientStats - -declare class ClientStats { - constructor (pool: Client) - /** If socket has open connection. */ - connected: boolean - /** Number of open socket connections in this client that do not have an active request. */ - pending: number - /** Number of currently active requests of this client. */ - running: number - /** Number of active, pending, or queued requests of this client. */ - size: number -} diff --git a/node_modules/undici-types/client.d.ts b/node_modules/undici-types/client.d.ts deleted file mode 100644 index a6e2022..0000000 --- a/node_modules/undici-types/client.d.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { URL } from 'node:url' -import Dispatcher from './dispatcher' -import buildConnector from './connector' -import TClientStats from './client-stats' - -type ClientConnectOptions = Omit - -/** - * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default. - */ -export class Client extends Dispatcher { - constructor (url: string | URL, options?: Client.Options) - /** Property to get and set the pipelining factor. */ - pipelining: number - /** `true` after `client.close()` has been called. */ - closed: boolean - /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */ - destroyed: boolean - /** Aggregate stats for a Client. */ - readonly stats: TClientStats - - // Override dispatcher APIs. - override connect ( - options: ClientConnectOptions - ): Promise - override connect ( - options: ClientConnectOptions, - callback: (err: Error | null, data: Dispatcher.ConnectData) => void - ): void -} - -export declare namespace Client { - export interface OptionsInterceptors { - Client: readonly Dispatcher.DispatchInterceptor[]; - } - export interface Options { - /** TODO */ - interceptors?: OptionsInterceptors; - /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */ - maxHeaderSize?: number; - /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */ - headersTimeout?: number; - /** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */ - socketTimeout?: never; - /** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */ - requestTimeout?: never; - /** TODO */ - connectTimeout?: number; - /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */ - bodyTimeout?: number; - /** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */ - idleTimeout?: never; - /** @deprecated unsupported keepAlive, use pipelining=0 instead */ - keepAlive?: never; - /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */ - keepAliveTimeout?: number; - /** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */ - maxKeepAliveTimeout?: never; - /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ - keepAliveMaxTimeout?: number; - /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */ - keepAliveTimeoutThreshold?: number; - /** TODO */ - socketPath?: string; - /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */ - pipelining?: number; - /** @deprecated use the connect option instead */ - tls?: never; - /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */ - strictContentLength?: boolean; - /** TODO */ - maxCachedSessions?: number; - /** TODO */ - connect?: Partial | buildConnector.connector; - /** TODO */ - maxRequestsPerClient?: number; - /** TODO */ - localAddress?: string; - /** Max response body size in bytes, -1 is disabled */ - maxResponseSize?: number; - /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */ - autoSelectFamily?: boolean; - /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */ - autoSelectFamilyAttemptTimeout?: number; - /** - * @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation. - * @default false - */ - allowH2?: boolean; - /** - * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. - * @default 100 - */ - maxConcurrentStreams?: number; - /** - * @description Sets the HTTP/2 stream-level flow-control window size (SETTINGS_INITIAL_WINDOW_SIZE). - * @default 262144 - */ - initialWindowSize?: number; - /** - * @description Sets the HTTP/2 connection-level flow-control window size (ClientHttp2Session.setLocalWindowSize). - * @default 524288 - */ - connectionWindowSize?: number; - /** - * @description Time interval between PING frames dispatch - * @default 60000 - */ - pingInterval?: number; - } - export interface SocketInfo { - localAddress?: string - localPort?: number - remoteAddress?: string - remotePort?: number - remoteFamily?: string - timeout?: number - bytesWritten?: number - bytesRead?: number - } -} - -export default Client diff --git a/node_modules/undici-types/connector.d.ts b/node_modules/undici-types/connector.d.ts deleted file mode 100644 index 34606a3..0000000 --- a/node_modules/undici-types/connector.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { TLSSocket, ConnectionOptions } from 'node:tls' -import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'node:net' - -export default buildConnector -declare function buildConnector (options?: buildConnector.BuildOptions): buildConnector.connector - -declare namespace buildConnector { - export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & { - allowH2?: boolean; - maxCachedSessions?: number | null; - socketPath?: string | null; - timeout?: number | null; - port?: number; - keepAlive?: boolean | null; - keepAliveInitialDelay?: number | null; - typeOfService?: number | null; - } - - export interface Options { - hostname: string - host?: string - protocol: string - port: string - servername?: string - localAddress?: string | null - socketPath?: string | null - httpSocket?: Socket - } - - export type Callback = (...args: CallbackArgs) => void - type CallbackArgs = [null, Socket | TLSSocket] | [Error, null] - - export interface connector { - (options: buildConnector.Options, callback: buildConnector.Callback): void - } -} diff --git a/node_modules/undici-types/content-type.d.ts b/node_modules/undici-types/content-type.d.ts deleted file mode 100644 index f2a87f1..0000000 --- a/node_modules/undici-types/content-type.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/// - -interface MIMEType { - type: string - subtype: string - parameters: Map - essence: string -} - -/** - * Parse a string to a {@link MIMEType} object. Returns `failure` if the string - * couldn't be parsed. - * @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type - */ -export function parseMIMEType (input: string): 'failure' | MIMEType - -/** - * Convert a MIMEType object to a string. - * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type - */ -export function serializeAMimeType (mimeType: MIMEType): string diff --git a/node_modules/undici-types/cookies.d.ts b/node_modules/undici-types/cookies.d.ts deleted file mode 100644 index f746d35..0000000 --- a/node_modules/undici-types/cookies.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/// - -import type { Headers } from './fetch' - -export interface Cookie { - name: string - value: string - expires?: Date | number - maxAge?: number - domain?: string - path?: string - secure?: boolean - httpOnly?: boolean - sameSite?: 'Strict' | 'Lax' | 'None' - unparsed?: string[] -} - -export function deleteCookie ( - headers: Headers, - name: string, - attributes?: { name?: string, domain?: string } -): void - -export function getCookies (headers: Headers): Record - -export function getSetCookies (headers: Headers): Cookie[] - -export function setCookie (headers: Headers, cookie: Cookie): void - -export function parseCookie (cookie: string): Cookie | null diff --git a/node_modules/undici-types/diagnostics-channel.d.ts b/node_modules/undici-types/diagnostics-channel.d.ts deleted file mode 100644 index 3c6a529..0000000 --- a/node_modules/undici-types/diagnostics-channel.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { Socket } from 'node:net' -import { URL } from 'node:url' -import buildConnector from './connector' -import Dispatcher from './dispatcher' - -declare namespace DiagnosticsChannel { - interface Request { - origin?: string | URL; - completed: boolean; - method?: Dispatcher.HttpMethod; - path: string; - headers: any; - } - interface Response { - statusCode: number; - statusText: string; - headers: Array; - } - interface ConnectParams { - host: URL['host']; - hostname: URL['hostname']; - protocol: URL['protocol']; - port: URL['port']; - servername: string | null; - } - type Connector = buildConnector.connector - export interface RequestCreateMessage { - request: Request; - } - export interface RequestBodySentMessage { - request: Request; - } - - export interface RequestBodyChunkSentMessage { - request: Request; - chunk: Uint8Array | string; - } - export interface RequestBodyChunkReceivedMessage { - request: Request; - chunk: Buffer; - } - export interface RequestHeadersMessage { - request: Request; - response: Response; - } - export interface RequestTrailersMessage { - request: Request; - trailers: Array; - } - export interface RequestErrorMessage { - request: Request; - error: Error; - } - export interface ClientSendHeadersMessage { - request: Request; - headers: string; - socket: Socket; - } - export interface ClientBeforeConnectMessage { - connectParams: ConnectParams; - connector: Connector; - } - export interface ClientConnectedMessage { - socket: Socket; - connectParams: ConnectParams; - connector: Connector; - } - export interface ClientConnectErrorMessage { - error: Error; - socket: Socket; - connectParams: ConnectParams; - connector: Connector; - } -} diff --git a/node_modules/undici-types/dispatcher.d.ts b/node_modules/undici-types/dispatcher.d.ts deleted file mode 100644 index 9f0d5d5..0000000 --- a/node_modules/undici-types/dispatcher.d.ts +++ /dev/null @@ -1,279 +0,0 @@ -import { URL } from 'node:url' -import { Duplex, Readable, Writable } from 'node:stream' -import { EventEmitter } from 'node:events' -import { Blob } from 'node:buffer' -import { IncomingHttpHeaders } from './header' -import BodyReadable from './readable' -import { FormData } from './formdata' -import Errors from './errors' -import { Autocomplete } from './utility' - -type AbortSignal = unknown - -export default Dispatcher - -export type UndiciHeaders = Record | IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null - -/** Dispatcher is the core API used to dispatch requests. */ -declare class Dispatcher extends EventEmitter { - /** Dispatches a request. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. */ - dispatch (options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean - /** Starts two-way communications with the requested resource. */ - connect(options: Dispatcher.ConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void - connect(options: Dispatcher.ConnectOptions): Promise> - /** Compose a chain of dispatchers */ - compose (dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher - compose (...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher - /** Performs an HTTP request. */ - request(options: Dispatcher.RequestOptions, callback: (err: Error | null, data: Dispatcher.ResponseData) => void): void - request(options: Dispatcher.RequestOptions): Promise> - /** For easy use with `stream.pipeline`. */ - pipeline(options: Dispatcher.PipelineOptions, handler: Dispatcher.PipelineHandler): Duplex - /** A faster version of `Dispatcher.request`. */ - stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory, callback: (err: Error | null, data: Dispatcher.StreamData) => void): void - stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory): Promise> - /** Upgrade to a different protocol. */ - upgrade (options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void - upgrade (options: Dispatcher.UpgradeOptions): Promise - /** Closes the client and gracefully waits for enqueued requests to complete before invoking the callback (or returning a promise if no callback is provided). */ - close (callback: () => void): void - close (): Promise - /** Destroy the client abruptly with the given err. All the pending and running requests will be asynchronously aborted and error. Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. */ - destroy (err: Error | null, callback: () => void): void - destroy (callback: () => void): void - destroy (err: Error | null): Promise - destroy (): Promise - - on (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this - on (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - on (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - on (eventName: 'drain', callback: (origin: URL) => void): this - - once (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this - once (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - once (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - once (eventName: 'drain', callback: (origin: URL) => void): this - - off (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this - off (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - off (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - off (eventName: 'drain', callback: (origin: URL) => void): this - - addListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this - addListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - addListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - addListener (eventName: 'drain', callback: (origin: URL) => void): this - - removeListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this - removeListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - removeListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - removeListener (eventName: 'drain', callback: (origin: URL) => void): this - - prependListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this - prependListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - prependListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - prependListener (eventName: 'drain', callback: (origin: URL) => void): this - - prependOnceListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this - prependOnceListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - prependOnceListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - prependOnceListener (eventName: 'drain', callback: (origin: URL) => void): this - - listeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[] - listeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] - listeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] - listeners (eventName: 'drain'): ((origin: URL) => void)[] - - rawListeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[] - rawListeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] - rawListeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] - rawListeners (eventName: 'drain'): ((origin: URL) => void)[] - - emit (eventName: 'connect', origin: URL, targets: readonly Dispatcher[]): boolean - emit (eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean - emit (eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean - emit (eventName: 'drain', origin: URL): boolean -} - -declare namespace Dispatcher { - export interface ComposedDispatcher extends Dispatcher { } - export type Dispatch = Dispatcher['dispatch'] - export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch - export interface DispatchOptions { - origin?: string | URL; - path: string; - method: HttpMethod; - /** Default: `null` */ - body?: string | Buffer | Uint8Array | Readable | null | FormData; - /** Default: `null` */ - headers?: UndiciHeaders; - /** Query string params to be embedded in the request URL. Default: `null` */ - query?: Record; - /** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */ - idempotent?: boolean; - /** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. Defaults to `method !== 'HEAD'`. */ - blocking?: boolean; - /** The IP Type of Service (ToS) value for the request socket. Must be an integer between 0 and 255. Default: `0` */ - typeOfService?: number | null; - /** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */ - upgrade?: boolean | string | null; - /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. */ - headersTimeout?: number | null; - /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. */ - bodyTimeout?: number | null; - /** Whether the request should stablish a keep-alive or not. Default `false` */ - reset?: boolean; - /** Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. Defaults to false */ - throwOnError?: boolean; - /** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server */ - expectContinue?: boolean; - } - export interface ConnectOptions { - origin: string | URL; - path: string; - /** Default: `null` */ - headers?: UndiciHeaders; - /** Default: `null` */ - signal?: AbortSignal | EventEmitter | null; - /** This argument parameter is passed through to `ConnectData` */ - opaque?: TOpaque; - /** Default: false */ - redirectionLimitReached?: boolean; - /** Default: `null` */ - responseHeaders?: 'raw' | null; - } - export interface RequestOptions extends DispatchOptions { - /** Default: `null` */ - opaque?: TOpaque; - /** Default: `null` */ - signal?: AbortSignal | EventEmitter | null; - /** Default: false */ - redirectionLimitReached?: boolean; - /** Default: `null` */ - onInfo?: (info: { statusCode: number, headers: Record }) => void; - /** Default: `null` */ - responseHeaders?: 'raw' | null; - /** Default: `64 KiB` */ - highWaterMark?: number; - } - export interface PipelineOptions extends RequestOptions { - /** `true` if the `handler` will return an object stream. Default: `false` */ - objectMode?: boolean; - } - export interface UpgradeOptions { - path: string; - /** Default: `'GET'` */ - method?: string; - /** Default: `null` */ - headers?: UndiciHeaders; - /** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */ - protocol?: string; - /** Default: `null` */ - signal?: AbortSignal | EventEmitter | null; - /** Default: false */ - redirectionLimitReached?: boolean; - /** Default: `null` */ - responseHeaders?: 'raw' | null; - } - export interface ConnectData { - statusCode: number; - headers: IncomingHttpHeaders; - socket: Duplex; - opaque: TOpaque; - } - export interface ResponseData { - statusCode: number; - statusText: string; - headers: IncomingHttpHeaders; - body: BodyReadable & BodyMixin; - trailers: Record; - opaque: TOpaque; - context: object; - } - export interface PipelineHandlerData { - statusCode: number; - headers: IncomingHttpHeaders; - opaque: TOpaque; - body: BodyReadable; - context: object; - } - export interface StreamData { - opaque: TOpaque; - trailers: Record; - } - export interface UpgradeData { - headers: IncomingHttpHeaders; - socket: Duplex; - opaque: TOpaque; - } - export interface StreamFactoryData { - statusCode: number; - headers: IncomingHttpHeaders; - opaque: TOpaque; - context: object; - } - export type StreamFactory = (data: StreamFactoryData) => Writable - - export interface DispatchController { - get aborted(): boolean - get paused(): boolean - get reason(): Error | null - abort(reason: Error): void - pause(): void - resume(): void - } - - export interface DispatchHandler { - onRequestStart?(controller: DispatchController, context: any): void; - onRequestUpgrade?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, socket: Duplex): void; - onResponseStart?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, statusMessage?: string): void; - onResponseData?(controller: DispatchController, chunk: Buffer): void; - onResponseEnd?(controller: DispatchController, trailers: IncomingHttpHeaders): void; - onResponseError?(controller: DispatchController, error: Error): void; - - /** Invoked before request is dispatched on socket. May be invoked multiple times when a request is retried when the request at the head of the pipeline fails. */ - /** @deprecated */ - onConnect?(abort: (err?: Error) => void): void; - /** Invoked when an error has occurred. */ - /** @deprecated */ - onError?(err: Error): void; - /** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */ - /** @deprecated */ - onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void; - /** Invoked when response is received, before headers have been read. **/ - /** @deprecated */ - onResponseStarted?(): void; - /** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */ - /** @deprecated */ - onHeaders?(statusCode: number, headers: Buffer[], resume: () => void, statusText: string): boolean; - /** Invoked when response payload data is received. */ - /** @deprecated */ - onData?(chunk: Buffer): boolean; - /** Invoked when response payload and trailers have been received and the request has completed. */ - /** @deprecated */ - onComplete?(trailers: string[] | null): void; - /** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */ - /** @deprecated */ - onBodySent?(chunkSize: number, totalBytesSent: number): void; - } - export type PipelineHandler = (data: PipelineHandlerData) => Readable - export type HttpMethod = Autocomplete<'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'> - - /** - * @link https://fetch.spec.whatwg.org/#body-mixin - */ - interface BodyMixin { - readonly body?: never; - readonly bodyUsed: boolean; - arrayBuffer(): Promise; - blob(): Promise; - bytes(): Promise; - formData(): Promise; - json(): Promise; - text(): Promise; - } - - export interface DispatchInterceptor { - (dispatch: Dispatch): Dispatch - } -} diff --git a/node_modules/undici-types/env-http-proxy-agent.d.ts b/node_modules/undici-types/env-http-proxy-agent.d.ts deleted file mode 100644 index 1733d7f..0000000 --- a/node_modules/undici-types/env-http-proxy-agent.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import Agent from './agent' -import ProxyAgent from './proxy-agent' -import Dispatcher from './dispatcher' - -export default EnvHttpProxyAgent - -declare class EnvHttpProxyAgent extends Dispatcher { - constructor (opts?: EnvHttpProxyAgent.Options) - - dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean -} - -declare namespace EnvHttpProxyAgent { - export interface Options extends Omit { - /** Overrides the value of the HTTP_PROXY environment variable */ - httpProxy?: string; - /** Overrides the value of the HTTPS_PROXY environment variable */ - httpsProxy?: string; - /** Overrides the value of the NO_PROXY environment variable */ - noProxy?: string; - } -} diff --git a/node_modules/undici-types/errors.d.ts b/node_modules/undici-types/errors.d.ts deleted file mode 100644 index 94b9024..0000000 --- a/node_modules/undici-types/errors.d.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { IncomingHttpHeaders } from './header' -import Client from './client' - -export default Errors - -declare namespace Errors { - export class UndiciError extends Error { - name: string - code: string - } - - /** Connect timeout error. */ - export class ConnectTimeoutError extends UndiciError { - name: 'ConnectTimeoutError' - code: 'UND_ERR_CONNECT_TIMEOUT' - } - - /** A header exceeds the `headersTimeout` option. */ - export class HeadersTimeoutError extends UndiciError { - name: 'HeadersTimeoutError' - code: 'UND_ERR_HEADERS_TIMEOUT' - } - - /** Headers overflow error. */ - export class HeadersOverflowError extends UndiciError { - name: 'HeadersOverflowError' - code: 'UND_ERR_HEADERS_OVERFLOW' - } - - /** A body exceeds the `bodyTimeout` option. */ - export class BodyTimeoutError extends UndiciError { - name: 'BodyTimeoutError' - code: 'UND_ERR_BODY_TIMEOUT' - } - - export class ResponseError extends UndiciError { - constructor ( - message: string, - code: number, - options: { - headers?: IncomingHttpHeaders | string[] | null, - body?: null | Record | string - } - ) - name: 'ResponseError' - code: 'UND_ERR_RESPONSE' - statusCode: number - body: null | Record | string - headers: IncomingHttpHeaders | string[] | null - } - - /** Passed an invalid argument. */ - export class InvalidArgumentError extends UndiciError { - name: 'InvalidArgumentError' - code: 'UND_ERR_INVALID_ARG' - } - - /** Returned an invalid value. */ - export class InvalidReturnValueError extends UndiciError { - name: 'InvalidReturnValueError' - code: 'UND_ERR_INVALID_RETURN_VALUE' - } - - /** The request has been aborted by the user. */ - export class RequestAbortedError extends UndiciError { - name: 'AbortError' - code: 'UND_ERR_ABORTED' - } - - /** Expected error with reason. */ - export class InformationalError extends UndiciError { - name: 'InformationalError' - code: 'UND_ERR_INFO' - } - - /** Request body length does not match content-length header. */ - export class RequestContentLengthMismatchError extends UndiciError { - name: 'RequestContentLengthMismatchError' - code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' - } - - /** Response body length does not match content-length header. */ - export class ResponseContentLengthMismatchError extends UndiciError { - name: 'ResponseContentLengthMismatchError' - code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' - } - - /** Trying to use a destroyed client. */ - export class ClientDestroyedError extends UndiciError { - name: 'ClientDestroyedError' - code: 'UND_ERR_DESTROYED' - } - - /** Trying to use a closed client. */ - export class ClientClosedError extends UndiciError { - name: 'ClientClosedError' - code: 'UND_ERR_CLOSED' - } - - /** There is an error with the socket. */ - export class SocketError extends UndiciError { - name: 'SocketError' - code: 'UND_ERR_SOCKET' - socket: Client.SocketInfo | null - } - - /** Encountered unsupported functionality. */ - export class NotSupportedError extends UndiciError { - name: 'NotSupportedError' - code: 'UND_ERR_NOT_SUPPORTED' - } - - /** No upstream has been added to the BalancedPool. */ - export class BalancedPoolMissingUpstreamError extends UndiciError { - name: 'MissingUpstreamError' - code: 'UND_ERR_BPL_MISSING_UPSTREAM' - } - - export class HTTPParserError extends UndiciError { - name: 'HTTPParserError' - code: string - } - - /** The response exceed the length allowed. */ - export class ResponseExceededMaxSizeError extends UndiciError { - name: 'ResponseExceededMaxSizeError' - code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE' - } - - export class RequestRetryError extends UndiciError { - constructor ( - message: string, - statusCode: number, - headers?: IncomingHttpHeaders | string[] | null, - body?: null | Record | string - ) - name: 'RequestRetryError' - code: 'UND_ERR_REQ_RETRY' - statusCode: number - data: { - count: number; - } - - headers: Record - } - - export class SecureProxyConnectionError extends UndiciError { - constructor ( - cause?: Error, - message?: string, - options?: Record - ) - name: 'SecureProxyConnectionError' - code: 'UND_ERR_PRX_TLS' - } - - export class MaxOriginsReachedError extends UndiciError { - name: 'MaxOriginsReachedError' - code: 'UND_ERR_MAX_ORIGINS_REACHED' - } - - /** SOCKS5 proxy related error. */ - export class Socks5ProxyError extends UndiciError { - constructor ( - message?: string, - code?: string - ) - name: 'Socks5ProxyError' - code: string - } - - /** WebSocket decompressed message exceeded maximum size. */ - export class MessageSizeExceededError extends UndiciError { - name: 'MessageSizeExceededError' - code: 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED' - } -} diff --git a/node_modules/undici-types/eventsource.d.ts b/node_modules/undici-types/eventsource.d.ts deleted file mode 100644 index 081ca09..0000000 --- a/node_modules/undici-types/eventsource.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { MessageEvent, ErrorEvent } from './websocket' -import Dispatcher from './dispatcher' - -import { - EventListenerOptions, - AddEventListenerOptions, - EventListenerOrEventListenerObject -} from './patch' - -interface EventSourceEventMap { - error: ErrorEvent - message: MessageEvent - open: Event -} - -interface EventSource extends EventTarget { - close(): void - readonly CLOSED: 2 - readonly CONNECTING: 0 - readonly OPEN: 1 - onerror: ((this: EventSource, ev: ErrorEvent) => any) | null - onmessage: ((this: EventSource, ev: MessageEvent) => any) | null - onopen: ((this: EventSource, ev: Event) => any) | null - readonly readyState: 0 | 1 | 2 - readonly url: string - readonly withCredentials: boolean - - addEventListener( - type: K, - listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, - options?: boolean | AddEventListenerOptions - ): void - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions - ): void - removeEventListener( - type: K, - listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, - options?: boolean | EventListenerOptions - ): void - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions - ): void -} - -export declare const EventSource: { - prototype: EventSource - new (url: string | URL, init?: EventSourceInit): EventSource - readonly CLOSED: 2 - readonly CONNECTING: 0 - readonly OPEN: 1 -} - -interface EventSourceInit { - withCredentials?: boolean - // @deprecated use `node.dispatcher` instead - dispatcher?: Dispatcher - node?: { - dispatcher?: Dispatcher - reconnectionTime?: number - } -} diff --git a/node_modules/undici-types/fetch.d.ts b/node_modules/undici-types/fetch.d.ts deleted file mode 100644 index ec33e5b..0000000 --- a/node_modules/undici-types/fetch.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -// based on https://github.com/Ethan-Arrowood/undici-fetch/blob/249269714db874351589d2d364a0645d5160ae71/index.d.ts (MIT license) -// and https://github.com/node-fetch/node-fetch/blob/914ce6be5ec67a8bab63d68510aabf07cb818b6d/index.d.ts (MIT license) -/// - -import { Blob } from 'node:buffer' -import { URL, URLSearchParams } from 'node:url' -import { ReadableStream } from 'node:stream/web' -import { FormData } from './formdata' -import { HeaderRecord } from './header' -import Dispatcher from './dispatcher' - -export type RequestInfo = string | URL | Request - -export declare function fetch ( - input: RequestInfo, - init?: RequestInit -): Promise - -export type BodyInit = - | ArrayBuffer - | AsyncIterable - | Blob - | FormData - | Iterable - | NodeJS.ArrayBufferView - | URLSearchParams - | null - | string - -export class BodyMixin { - readonly body: ReadableStream | null - readonly bodyUsed: boolean - - readonly arrayBuffer: () => Promise - readonly blob: () => Promise - readonly bytes: () => Promise - /** - * @deprecated This method is not recommended for parsing multipart/form-data bodies in server environments. - * It is recommended to use a library such as [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy) as follows: - * - * @example - * ```js - * import { Busboy } from '@fastify/busboy' - * import { Readable } from 'node:stream' - * - * const response = await fetch('...') - * const busboy = new Busboy({ headers: { 'content-type': response.headers.get('content-type') } }) - * - * // handle events emitted from `busboy` - * - * Readable.fromWeb(response.body).pipe(busboy) - * ``` - */ - readonly formData: () => Promise - readonly json: () => Promise - readonly text: () => Promise -} - -export interface SpecIterator { - next(...args: [] | [TNext]): IteratorResult; -} - -export interface SpecIterableIterator extends SpecIterator { - [Symbol.iterator](): SpecIterableIterator; -} - -export interface SpecIterable { - [Symbol.iterator](): SpecIterator; -} - -export type HeadersInit = [string, string][] | HeaderRecord | Headers - -export declare class Headers implements SpecIterable<[string, string]> { - constructor (init?: HeadersInit) - readonly append: (name: string, value: string) => void - readonly delete: (name: string) => void - readonly get: (name: string) => string | null - readonly has: (name: string) => boolean - readonly set: (name: string, value: string) => void - readonly getSetCookie: () => string[] - readonly forEach: ( - callbackfn: (value: string, key: string, iterable: Headers) => void, - thisArg?: unknown - ) => void - - readonly keys: () => SpecIterableIterator - readonly values: () => SpecIterableIterator - readonly entries: () => SpecIterableIterator<[string, string]> - readonly [Symbol.iterator]: () => SpecIterableIterator<[string, string]> -} - -export type RequestCache = - | 'default' - | 'force-cache' - | 'no-cache' - | 'no-store' - | 'only-if-cached' - | 'reload' - -export type RequestCredentials = 'omit' | 'include' | 'same-origin' - -type RequestDestination = - | '' - | 'audio' - | 'audioworklet' - | 'document' - | 'embed' - | 'font' - | 'image' - | 'manifest' - | 'object' - | 'paintworklet' - | 'report' - | 'script' - | 'sharedworker' - | 'style' - | 'track' - | 'video' - | 'worker' - | 'xslt' - -export interface RequestInit { - body?: BodyInit | null - cache?: RequestCache - credentials?: RequestCredentials - dispatcher?: Dispatcher - duplex?: RequestDuplex - headers?: HeadersInit - integrity?: string - keepalive?: boolean - method?: string - mode?: RequestMode - redirect?: RequestRedirect - referrer?: string - referrerPolicy?: ReferrerPolicy - signal?: AbortSignal | null - window?: null -} - -export type ReferrerPolicy = - | '' - | 'no-referrer' - | 'no-referrer-when-downgrade' - | 'origin' - | 'origin-when-cross-origin' - | 'same-origin' - | 'strict-origin' - | 'strict-origin-when-cross-origin' - | 'unsafe-url' - -export type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin' - -export type RequestRedirect = 'error' | 'follow' | 'manual' - -export type RequestDuplex = 'half' - -export declare class Request extends BodyMixin { - constructor (input: RequestInfo, init?: RequestInit) - - readonly cache: RequestCache - readonly credentials: RequestCredentials - readonly destination: RequestDestination - readonly headers: Headers - readonly integrity: string - readonly method: string - readonly mode: RequestMode - readonly redirect: RequestRedirect - readonly referrer: string - readonly referrerPolicy: ReferrerPolicy - readonly url: string - - readonly keepalive: boolean - readonly signal: AbortSignal - readonly duplex: RequestDuplex - - readonly clone: () => Request -} - -export interface ResponseInit { - readonly status?: number - readonly statusText?: string - readonly headers?: HeadersInit -} - -export type ResponseType = - | 'basic' - | 'cors' - | 'default' - | 'error' - | 'opaque' - | 'opaqueredirect' - -export type ResponseRedirectStatus = 301 | 302 | 303 | 307 | 308 - -export declare class Response extends BodyMixin { - constructor (body?: BodyInit, init?: ResponseInit) - - readonly headers: Headers - readonly ok: boolean - readonly status: number - readonly statusText: string - readonly type: ResponseType - readonly url: string - readonly redirected: boolean - - readonly clone: () => Response - - static error (): Response - static json (data: any, init?: ResponseInit): Response - static redirect (url: string | URL, status?: ResponseRedirectStatus): Response -} diff --git a/node_modules/undici-types/formdata.d.ts b/node_modules/undici-types/formdata.d.ts deleted file mode 100644 index b9819a7..0000000 --- a/node_modules/undici-types/formdata.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -// Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/FormData.ts (MIT) -/// - -import { File } from 'node:buffer' -import { SpecIterableIterator } from './fetch' - -/** - * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs. - */ -declare type FormDataEntryValue = string | File - -/** - * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch(). - */ -export declare class FormData { - /** - * Appends a new value onto an existing key inside a FormData object, - * or adds the key if it does not already exist. - * - * The difference between `set()` and `append()` is that if the specified key already exists, `set()` will overwrite all existing values with the new one, whereas `append()` will append the new value onto the end of the existing set of values. - * - * @param name The name of the field whose data is contained in `value`. - * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) - or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string. - * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename. - */ - append (name: string, value: unknown, fileName?: string): void - - /** - * Set a new value for an existing key inside FormData, - * or add the new field if it does not already exist. - * - * @param name The name of the field whose data is contained in `value`. - * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) - or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string. - * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename. - * - */ - set (name: string, value: unknown, fileName?: string): void - - /** - * Returns the first value associated with a given key from within a `FormData` object. - * If you expect multiple values and want all of them, use the `getAll()` method instead. - * - * @param {string} name A name of the value you want to retrieve. - * - * @returns A `FormDataEntryValue` containing the value. If the key doesn't exist, the method returns null. - */ - get (name: string): FormDataEntryValue | null - - /** - * Returns all the values associated with a given key from within a `FormData` object. - * - * @param {string} name A name of the value you want to retrieve. - * - * @returns An array of `FormDataEntryValue` whose key matches the value passed in the `name` parameter. If the key doesn't exist, the method returns an empty list. - */ - getAll (name: string): FormDataEntryValue[] - - /** - * Returns a boolean stating whether a `FormData` object contains a certain key. - * - * @param name A string representing the name of the key you want to test for. - * - * @return A boolean value. - */ - has (name: string): boolean - - /** - * Deletes a key and its value(s) from a `FormData` object. - * - * @param name The name of the key you want to delete. - */ - delete (name: string): void - - /** - * Executes given callback function for each field of the FormData instance - */ - forEach: ( - callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData) => void, - thisArg?: unknown - ) => void - - /** - * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all keys contained in this `FormData` object. - * Each key is a `string`. - */ - keys: () => SpecIterableIterator - - /** - * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all values contained in this object `FormData` object. - * Each value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue). - */ - values: () => SpecIterableIterator - - /** - * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through the `FormData` key/value pairs. - * The key of each pair is a string; the value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue). - */ - entries: () => SpecIterableIterator<[string, FormDataEntryValue]> - - /** - * An alias for FormData#entries() - */ - [Symbol.iterator]: () => SpecIterableIterator<[string, FormDataEntryValue]> - - readonly [Symbol.toStringTag]: string -} diff --git a/node_modules/undici-types/global-dispatcher.d.ts b/node_modules/undici-types/global-dispatcher.d.ts deleted file mode 100644 index 2760e13..0000000 --- a/node_modules/undici-types/global-dispatcher.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import Dispatcher from './dispatcher' - -declare function setGlobalDispatcher (dispatcher: DispatcherImplementation): void -declare function getGlobalDispatcher (): Dispatcher - -export { - getGlobalDispatcher, - setGlobalDispatcher -} diff --git a/node_modules/undici-types/global-origin.d.ts b/node_modules/undici-types/global-origin.d.ts deleted file mode 100644 index 265769b..0000000 --- a/node_modules/undici-types/global-origin.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare function setGlobalOrigin (origin: string | URL | undefined): void -declare function getGlobalOrigin (): URL | undefined - -export { - setGlobalOrigin, - getGlobalOrigin -} diff --git a/node_modules/undici-types/h2c-client.d.ts b/node_modules/undici-types/h2c-client.d.ts deleted file mode 100644 index 7b97449..0000000 --- a/node_modules/undici-types/h2c-client.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { URL } from 'node:url' -import Dispatcher from './dispatcher' -import buildConnector from './connector' - -type H2ClientOptions = Omit - -/** - * A basic H2C client, mapped on top a single TCP connection. Pipelining is disabled by default. - */ -export class H2CClient extends Dispatcher { - constructor (url: string | URL, options?: H2CClient.Options) - /** Property to get and set the pipelining factor. */ - pipelining: number - /** `true` after `client.close()` has been called. */ - closed: boolean - /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */ - destroyed: boolean - - // Override dispatcher APIs. - override connect ( - options: H2ClientOptions - ): Promise - override connect ( - options: H2ClientOptions, - callback: (err: Error | null, data: Dispatcher.ConnectData) => void - ): void -} - -export declare namespace H2CClient { - export interface Options { - /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */ - maxHeaderSize?: number; - /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */ - headersTimeout?: number; - /** TODO */ - connectTimeout?: number; - /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */ - bodyTimeout?: number; - /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */ - keepAliveTimeout?: number; - /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ - keepAliveMaxTimeout?: number; - /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */ - keepAliveTimeoutThreshold?: number; - /** TODO */ - socketPath?: string; - /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */ - pipelining?: number; - /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */ - strictContentLength?: boolean; - /** TODO */ - maxCachedSessions?: number; - /** TODO */ - connect?: Omit, 'allowH2'> | buildConnector.connector; - /** TODO */ - maxRequestsPerClient?: number; - /** TODO */ - localAddress?: string; - /** Max response body size in bytes, -1 is disabled */ - maxResponseSize?: number; - /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */ - autoSelectFamily?: boolean; - /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */ - autoSelectFamilyAttemptTimeout?: number; - /** - * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. - * @default 100 - */ - maxConcurrentStreams?: number - } -} - -export default H2CClient diff --git a/node_modules/undici-types/handlers.d.ts b/node_modules/undici-types/handlers.d.ts deleted file mode 100644 index 8007dbf..0000000 --- a/node_modules/undici-types/handlers.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import Dispatcher from './dispatcher' - -export declare class RedirectHandler implements Dispatcher.DispatchHandler { - constructor ( - dispatch: Dispatcher.Dispatch, - maxRedirections: number, - opts: Dispatcher.DispatchOptions, - handler: Dispatcher.DispatchHandler, - redirectionLimitReached: boolean - ) -} - -export declare class DecoratorHandler implements Dispatcher.DispatchHandler { - constructor (handler: Dispatcher.DispatchHandler) -} diff --git a/node_modules/undici-types/header.d.ts b/node_modules/undici-types/header.d.ts deleted file mode 100644 index efd7b1d..0000000 --- a/node_modules/undici-types/header.d.ts +++ /dev/null @@ -1,160 +0,0 @@ -import { Autocomplete } from './utility' - -/** - * The header type declaration of `undici`. - */ -export type IncomingHttpHeaders = Record - -type HeaderNames = Autocomplete< - | 'Accept' - | 'Accept-CH' - | 'Accept-Charset' - | 'Accept-Encoding' - | 'Accept-Language' - | 'Accept-Patch' - | 'Accept-Post' - | 'Accept-Ranges' - | 'Access-Control-Allow-Credentials' - | 'Access-Control-Allow-Headers' - | 'Access-Control-Allow-Methods' - | 'Access-Control-Allow-Origin' - | 'Access-Control-Expose-Headers' - | 'Access-Control-Max-Age' - | 'Access-Control-Request-Headers' - | 'Access-Control-Request-Method' - | 'Age' - | 'Allow' - | 'Alt-Svc' - | 'Alt-Used' - | 'Authorization' - | 'Cache-Control' - | 'Clear-Site-Data' - | 'Connection' - | 'Content-Disposition' - | 'Content-Encoding' - | 'Content-Language' - | 'Content-Length' - | 'Content-Location' - | 'Content-Range' - | 'Content-Security-Policy' - | 'Content-Security-Policy-Report-Only' - | 'Content-Type' - | 'Cookie' - | 'Cross-Origin-Embedder-Policy' - | 'Cross-Origin-Opener-Policy' - | 'Cross-Origin-Resource-Policy' - | 'Date' - | 'Device-Memory' - | 'ETag' - | 'Expect' - | 'Expect-CT' - | 'Expires' - | 'Forwarded' - | 'From' - | 'Host' - | 'If-Match' - | 'If-Modified-Since' - | 'If-None-Match' - | 'If-Range' - | 'If-Unmodified-Since' - | 'Keep-Alive' - | 'Last-Modified' - | 'Link' - | 'Location' - | 'Max-Forwards' - | 'Origin' - | 'Permissions-Policy' - | 'Priority' - | 'Proxy-Authenticate' - | 'Proxy-Authorization' - | 'Range' - | 'Referer' - | 'Referrer-Policy' - | 'Retry-After' - | 'Sec-Fetch-Dest' - | 'Sec-Fetch-Mode' - | 'Sec-Fetch-Site' - | 'Sec-Fetch-User' - | 'Sec-Purpose' - | 'Sec-WebSocket-Accept' - | 'Server' - | 'Server-Timing' - | 'Service-Worker-Navigation-Preload' - | 'Set-Cookie' - | 'SourceMap' - | 'Strict-Transport-Security' - | 'TE' - | 'Timing-Allow-Origin' - | 'Trailer' - | 'Transfer-Encoding' - | 'Upgrade' - | 'Upgrade-Insecure-Requests' - | 'User-Agent' - | 'Vary' - | 'Via' - | 'WWW-Authenticate' - | 'X-Content-Type-Options' - | 'X-Frame-Options' -> - -type IANARegisteredMimeType = Autocomplete< - | 'audio/aac' - | 'video/x-msvideo' - | 'image/avif' - | 'video/av1' - | 'application/octet-stream' - | 'image/bmp' - | 'text/css' - | 'text/csv' - | 'application/vnd.ms-fontobject' - | 'application/epub+zip' - | 'image/gif' - | 'application/gzip' - | 'text/html' - | 'image/x-icon' - | 'text/calendar' - | 'image/jpeg' - | 'text/javascript' - | 'application/json' - | 'application/ld+json' - | 'audio/x-midi' - | 'audio/mpeg' - | 'video/mp4' - | 'video/mpeg' - | 'audio/ogg' - | 'video/ogg' - | 'application/ogg' - | 'audio/opus' - | 'font/otf' - | 'application/pdf' - | 'image/png' - | 'application/rtf' - | 'image/svg+xml' - | 'image/tiff' - | 'video/mp2t' - | 'font/ttf' - | 'text/plain' - | 'application/wasm' - | 'video/webm' - | 'audio/webm' - | 'image/webp' - | 'font/woff' - | 'font/woff2' - | 'application/xhtml+xml' - | 'application/xml' - | 'application/zip' - | 'video/3gpp' - | 'video/3gpp2' - | 'model/gltf+json' - | 'model/gltf-binary' -> - -type KnownHeaderValues = { - 'content-type': IANARegisteredMimeType -} - -export type HeaderRecord = { - [K in HeaderNames | Lowercase]?: Lowercase extends keyof KnownHeaderValues - ? KnownHeaderValues[Lowercase] - : string -} diff --git a/node_modules/undici-types/index.d.ts b/node_modules/undici-types/index.d.ts deleted file mode 100644 index f1b66e8..0000000 --- a/node_modules/undici-types/index.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import Dispatcher from './dispatcher' -import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher' -import { setGlobalOrigin, getGlobalOrigin } from './global-origin' -import Pool from './pool' -import { RedirectHandler, DecoratorHandler } from './handlers' - -import BalancedPool from './balanced-pool' -import RoundRobinPool from './round-robin-pool' -import Client from './client' -import H2CClient from './h2c-client' -import buildConnector from './connector' -import errors from './errors' -import Agent from './agent' -import MockClient from './mock-client' -import MockPool from './mock-pool' -import MockAgent from './mock-agent' -import { SnapshotAgent } from './snapshot-agent' -import { MockCallHistory, MockCallHistoryLog } from './mock-call-history' -import mockErrors from './mock-errors' -import ProxyAgent from './proxy-agent' -import Socks5ProxyAgent from './socks5-proxy-agent' -import EnvHttpProxyAgent from './env-http-proxy-agent' -import RetryHandler from './retry-handler' -import RetryAgent from './retry-agent' -import { request, pipeline, stream, connect, upgrade } from './api' -import interceptors from './interceptors' - -import CacheInterceptor from './cache-interceptor' -declare const cacheStores: { - MemoryCacheStore: typeof CacheInterceptor.MemoryCacheStore; - SqliteCacheStore: typeof CacheInterceptor.SqliteCacheStore; -} - -export * from './util' -export * from './cookies' -export * from './eventsource' -export * from './fetch' -export * from './formdata' -export * from './diagnostics-channel' -export * from './websocket' -export * from './content-type' -export * from './cache' -export { Interceptable } from './mock-interceptor' - -declare function globalThisInstall (): void - -export { Dispatcher, BalancedPool, RoundRobinPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, cacheStores, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, Socks5ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install } -export default Undici - -declare namespace Undici { - const Dispatcher: typeof import('./dispatcher').default - const Pool: typeof import('./pool').default - const RedirectHandler: typeof import ('./handlers').RedirectHandler - const DecoratorHandler: typeof import ('./handlers').DecoratorHandler - const RetryHandler: typeof import ('./retry-handler').default - const BalancedPool: typeof import('./balanced-pool').default - const RoundRobinPool: typeof import('./round-robin-pool').default - const Client: typeof import('./client').default - const H2CClient: typeof import('./h2c-client').default - const buildConnector: typeof import('./connector').default - const errors: typeof import('./errors').default - const Agent: typeof import('./agent').default - const setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher - const getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher - const request: typeof import('./api').request - const stream: typeof import('./api').stream - const pipeline: typeof import('./api').pipeline - const connect: typeof import('./api').connect - const upgrade: typeof import('./api').upgrade - const MockClient: typeof import('./mock-client').default - const MockPool: typeof import('./mock-pool').default - const MockAgent: typeof import('./mock-agent').default - const SnapshotAgent: typeof import('./snapshot-agent').SnapshotAgent - const MockCallHistory: typeof import('./mock-call-history').MockCallHistory - const MockCallHistoryLog: typeof import('./mock-call-history').MockCallHistoryLog - const mockErrors: typeof import('./mock-errors').default - const ProxyAgent: typeof import('./proxy-agent').default - const Socks5ProxyAgent: typeof import('./socks5-proxy-agent').default - const fetch: typeof import('./fetch').fetch - const Headers: typeof import('./fetch').Headers - const Response: typeof import('./fetch').Response - const Request: typeof import('./fetch').Request - const FormData: typeof import('./formdata').FormData - const caches: typeof import('./cache').caches - const interceptors: typeof import('./interceptors').default - const cacheStores: { - MemoryCacheStore: typeof import('./cache-interceptor').default.MemoryCacheStore, - SqliteCacheStore: typeof import('./cache-interceptor').default.SqliteCacheStore - } - const install: typeof globalThisInstall -} diff --git a/node_modules/undici-types/interceptors.d.ts b/node_modules/undici-types/interceptors.d.ts deleted file mode 100644 index 71983a7..0000000 --- a/node_modules/undici-types/interceptors.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import CacheHandler from './cache-interceptor' -import Dispatcher from './dispatcher' -import RetryHandler from './retry-handler' -import { LookupOptions } from 'node:dns' - -export default Interceptors - -declare namespace Interceptors { - export type DumpInterceptorOpts = { maxSize?: number } - export type RetryInterceptorOpts = RetryHandler.RetryOptions - export type RedirectInterceptorOpts = { maxRedirections?: number } - export type DecompressInterceptorOpts = { - skipErrorResponses?: boolean - skipStatusCodes?: number[] - } - - export type ResponseErrorInterceptorOpts = { throwOnError: boolean } - export type CacheInterceptorOpts = CacheHandler.CacheOptions - - // DNS interceptor - export type DNSInterceptorRecord = { address: string, ttl: number, family: 4 | 6 } - export type DNSInterceptorOriginRecords = { records: { 4: { ips: DNSInterceptorRecord[] } | null, 6: { ips: DNSInterceptorRecord[] } | null } } - export type DNSStorage = { - size: number - get(origin: string): DNSInterceptorOriginRecords | null - set(origin: string, records: DNSInterceptorOriginRecords | null, options: { ttl: number }): void - delete(origin: string): void - full(): boolean - } - export type DNSInterceptorOpts = { - maxTTL?: number - maxItems?: number - lookup?: (origin: URL, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, addresses: DNSInterceptorRecord[]) => void) => void - pick?: (origin: URL, records: DNSInterceptorOriginRecords, affinity: 4 | 6) => DNSInterceptorRecord - dualStack?: boolean - affinity?: 4 | 6 - storage?: DNSStorage - } - - // Deduplicate interceptor - export type DeduplicateMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE' - export type DeduplicateInterceptorOpts = { - /** - * The HTTP methods to deduplicate. - * Note: Only safe HTTP methods can be deduplicated. - * @default ['GET'] - */ - methods?: DeduplicateMethods[] - /** - * Header names that, if present in a request, will cause the request to skip deduplication. - * Header name matching is case-insensitive. - * @default [] - */ - skipHeaderNames?: string[] - /** - * Header names to exclude from the deduplication key. - * Requests with different values for these headers will still be deduplicated together. - * Useful for headers like `x-request-id` that vary per request but shouldn't affect deduplication. - * Header name matching is case-insensitive. - * @default [] - */ - excludeHeaderNames?: string[] - /** - * Maximum bytes buffered per paused waiting deduplicated handler. - * If a waiting handler remains paused and exceeds this threshold, - * it is failed with an abort error to prevent unbounded memory growth. - * @default 5 * 1024 * 1024 - */ - maxBufferSize?: number - } - - export function dump (opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function retry (opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function redirect (opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function decompress (opts?: DecompressInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function responseError (opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function cache (opts?: CacheInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function deduplicate (opts?: DeduplicateInterceptorOpts): Dispatcher.DispatcherComposeInterceptor -} diff --git a/node_modules/undici-types/mock-agent.d.ts b/node_modules/undici-types/mock-agent.d.ts deleted file mode 100644 index 330926b..0000000 --- a/node_modules/undici-types/mock-agent.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import Agent from './agent' -import Dispatcher from './dispatcher' -import { Interceptable, MockInterceptor } from './mock-interceptor' -import MockDispatch = MockInterceptor.MockDispatch -import { MockCallHistory } from './mock-call-history' - -export default MockAgent - -interface PendingInterceptor extends MockDispatch { - origin: string; -} - -/** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */ -declare class MockAgent extends Dispatcher { - constructor (options?: TMockAgentOptions) - /** Creates and retrieves mock Dispatcher instances which can then be used to intercept HTTP requests. If the number of connections on the mock agent is set to 1, a MockClient instance is returned. Otherwise a MockPool instance is returned. */ - get(origin: string): TInterceptable - get(origin: RegExp): TInterceptable - get(origin: ((origin: string) => boolean)): TInterceptable - /** Dispatches a mocked request. */ - dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean - /** Closes the mock agent and waits for registered mock pools and clients to also close before resolving. */ - close (): Promise - /** Disables mocking in MockAgent. */ - deactivate (): void - /** Enables mocking in a MockAgent instance. When instantiated, a MockAgent is automatically activated. Therefore, this method is only effective after `MockAgent.deactivate` has been called. */ - activate (): void - /** Define host matchers so only matching requests that aren't intercepted by the mock dispatchers will be attempted. */ - enableNetConnect (): void - enableNetConnect (host: string): void - enableNetConnect (host: RegExp): void - enableNetConnect (host: ((host: string) => boolean)): void - /** Causes all requests to throw when requests are not matched in a MockAgent intercept. */ - disableNetConnect (): void - /** get call history. returns the MockAgent call history or undefined if the option is not enabled. */ - getCallHistory (): MockCallHistory | undefined - /** clear every call history. Any MockCallHistoryLog will be deleted on the MockCallHistory instance */ - clearCallHistory (): void - /** Enable call history. Any subsequence calls will then be registered. */ - enableCallHistory (): this - /** Disable call history. Any subsequence calls will then not be registered. */ - disableCallHistory (): this - pendingInterceptors (): PendingInterceptor[] - assertNoPendingInterceptors (options?: { - pendingInterceptorsFormatter?: PendingInterceptorsFormatter; - }): void -} - -interface PendingInterceptorsFormatter { - format(pendingInterceptors: readonly PendingInterceptor[]): string; -} - -declare namespace MockAgent { - /** MockAgent options. */ - export interface Options extends Agent.Options { - /** A custom agent to be encapsulated by the MockAgent. */ - agent?: Dispatcher; - - /** Ignore trailing slashes in the path */ - ignoreTrailingSlash?: boolean; - - /** Accept URLs with search parameters using non standard syntaxes. default false */ - acceptNonStandardSearchParameters?: boolean; - - /** Enable call history. you can either call MockAgent.enableCallHistory(). default false */ - enableCallHistory?: boolean - } -} diff --git a/node_modules/undici-types/mock-call-history.d.ts b/node_modules/undici-types/mock-call-history.d.ts deleted file mode 100644 index df07fa0..0000000 --- a/node_modules/undici-types/mock-call-history.d.ts +++ /dev/null @@ -1,111 +0,0 @@ -import Dispatcher from './dispatcher' - -declare namespace MockCallHistoryLog { - /** request's configuration properties */ - export type MockCallHistoryLogProperties = 'protocol' | 'host' | 'port' | 'origin' | 'path' | 'hash' | 'fullUrl' | 'method' | 'searchParams' | 'body' | 'headers' -} - -/** a log reflecting request configuration */ -declare class MockCallHistoryLog { - constructor (requestInit: Dispatcher.DispatchOptions) - /** protocol used. ie. 'https:' or 'http:' etc... */ - protocol: string - /** request's host. */ - host: string - /** request's port. */ - port: string - /** request's origin. ie. https://localhost:3000. */ - origin: string - /** path. never contains searchParams. */ - path: string - /** request's hash. */ - hash: string - /** the full url requested. */ - fullUrl: string - /** request's method. */ - method: string - /** search params. */ - searchParams: Record - /** request's body */ - body: string | null | undefined - /** request's headers */ - headers: Record | null | undefined - - /** returns an Map of property / value pair */ - toMap (): Map | null | undefined> - - /** returns a string computed with all key value pair */ - toString (): string -} - -declare namespace MockCallHistory { - export type FilterCallsOperator = 'AND' | 'OR' - - /** modify the filtering behavior */ - export interface FilterCallsOptions { - /** the operator to apply when filtering. 'OR' will adds any MockCallHistoryLog matching any criteria given. 'AND' will adds only MockCallHistoryLog matching every criteria given. (default 'OR') */ - operator?: FilterCallsOperator | Lowercase - } - /** a function to be executed for filtering MockCallHistoryLog */ - export type FilterCallsFunctionCriteria = (log: MockCallHistoryLog) => boolean - - /** parameter to filter MockCallHistoryLog */ - export type FilterCallsParameter = string | RegExp | undefined | null - - /** an object to execute multiple filtering at once */ - export interface FilterCallsObjectCriteria extends Record { - /** filter by request protocol. ie https: */ - protocol?: FilterCallsParameter; - /** filter by request host. */ - host?: FilterCallsParameter; - /** filter by request port. */ - port?: FilterCallsParameter; - /** filter by request origin. */ - origin?: FilterCallsParameter; - /** filter by request path. */ - path?: FilterCallsParameter; - /** filter by request hash. */ - hash?: FilterCallsParameter; - /** filter by request fullUrl. */ - fullUrl?: FilterCallsParameter; - /** filter by request method. */ - method?: FilterCallsParameter; - } -} - -/** a call history to track requests configuration */ -declare class MockCallHistory { - constructor (name: string) - /** returns an array of MockCallHistoryLog. */ - calls (): Array - /** returns the first MockCallHistoryLog */ - firstCall (): MockCallHistoryLog | undefined - /** returns the last MockCallHistoryLog. */ - lastCall (): MockCallHistoryLog | undefined - /** returns the nth MockCallHistoryLog. */ - nthCall (position: number): MockCallHistoryLog | undefined - /** return all MockCallHistoryLog matching any of criteria given. if an object is used with multiple properties, you can change the operator to apply during filtering on options */ - filterCalls (criteria: MockCallHistory.FilterCallsFunctionCriteria | MockCallHistory.FilterCallsObjectCriteria | RegExp, options?: MockCallHistory.FilterCallsOptions): Array - /** return all MockCallHistoryLog matching the given protocol. if a string is given, it is matched with includes */ - filterCallsByProtocol (protocol: MockCallHistory.FilterCallsParameter): Array - /** return all MockCallHistoryLog matching the given host. if a string is given, it is matched with includes */ - filterCallsByHost (host: MockCallHistory.FilterCallsParameter): Array - /** return all MockCallHistoryLog matching the given port. if a string is given, it is matched with includes */ - filterCallsByPort (port: MockCallHistory.FilterCallsParameter): Array - /** return all MockCallHistoryLog matching the given origin. if a string is given, it is matched with includes */ - filterCallsByOrigin (origin: MockCallHistory.FilterCallsParameter): Array - /** return all MockCallHistoryLog matching the given path. if a string is given, it is matched with includes */ - filterCallsByPath (path: MockCallHistory.FilterCallsParameter): Array - /** return all MockCallHistoryLog matching the given hash. if a string is given, it is matched with includes */ - filterCallsByHash (hash: MockCallHistory.FilterCallsParameter): Array - /** return all MockCallHistoryLog matching the given fullUrl. if a string is given, it is matched with includes */ - filterCallsByFullUrl (fullUrl: MockCallHistory.FilterCallsParameter): Array - /** return all MockCallHistoryLog matching the given method. if a string is given, it is matched with includes */ - filterCallsByMethod (method: MockCallHistory.FilterCallsParameter): Array - /** clear all MockCallHistoryLog on this MockCallHistory. */ - clear (): void - /** use it with for..of loop or spread operator */ - [Symbol.iterator]: () => Generator -} - -export { MockCallHistoryLog, MockCallHistory } diff --git a/node_modules/undici-types/mock-client.d.ts b/node_modules/undici-types/mock-client.d.ts deleted file mode 100644 index 702e824..0000000 --- a/node_modules/undici-types/mock-client.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Client from './client' -import Dispatcher from './dispatcher' -import MockAgent from './mock-agent' -import { MockInterceptor, Interceptable } from './mock-interceptor' - -export default MockClient - -/** MockClient extends the Client API and allows one to mock requests. */ -declare class MockClient extends Client implements Interceptable { - constructor (origin: string, options: MockClient.Options) - /** Intercepts any matching requests that use the same origin as this mock client. */ - intercept (options: MockInterceptor.Options): MockInterceptor - /** Dispatches a mocked request. */ - dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean - /** Closes the mock client and gracefully waits for enqueued requests to complete. */ - close (): Promise - /** Clean up all the prepared mocks. */ - cleanMocks (): void -} - -declare namespace MockClient { - /** MockClient options. */ - export interface Options extends Client.Options { - /** The agent to associate this MockClient with. */ - agent: MockAgent; - } -} diff --git a/node_modules/undici-types/mock-errors.d.ts b/node_modules/undici-types/mock-errors.d.ts deleted file mode 100644 index eefeecd..0000000 --- a/node_modules/undici-types/mock-errors.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import Errors from './errors' - -export default MockErrors - -declare namespace MockErrors { - /** The request does not match any registered mock dispatches. */ - export class MockNotMatchedError extends Errors.UndiciError { - constructor (message?: string) - name: 'MockNotMatchedError' - code: 'UND_MOCK_ERR_MOCK_NOT_MATCHED' - } -} diff --git a/node_modules/undici-types/mock-interceptor.d.ts b/node_modules/undici-types/mock-interceptor.d.ts deleted file mode 100644 index a48d715..0000000 --- a/node_modules/undici-types/mock-interceptor.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { IncomingHttpHeaders } from './header' -import Dispatcher from './dispatcher' -import { BodyInit, Headers } from './fetch' - -/** The scope associated with a mock dispatch. */ -declare class MockScope { - constructor (mockDispatch: MockInterceptor.MockDispatch) - /** Delay a reply by a set amount of time in ms. */ - delay (waitInMs: number): MockScope - /** Persist the defined mock data for the associated reply. It will return the defined mock data indefinitely. */ - persist (): MockScope - /** Define a reply for a set amount of matching requests. */ - times (repeatTimes: number): MockScope -} - -/** The interceptor for a Mock. */ -declare class MockInterceptor { - constructor (options: MockInterceptor.Options, mockDispatches: MockInterceptor.MockDispatch[]) - /** Mock an undici request with the defined reply. */ - reply(replyOptionsCallback: MockInterceptor.MockReplyOptionsCallback): MockScope - reply( - statusCode: number, - data?: TData | Buffer | string | MockInterceptor.MockResponseDataHandler, - responseOptions?: MockInterceptor.MockResponseOptions - ): MockScope - /** Mock an undici request by throwing the defined reply error. */ - replyWithError(error: TError): MockScope - /** Set default reply headers on the interceptor for subsequent mocked replies. */ - defaultReplyHeaders (headers: IncomingHttpHeaders): MockInterceptor - /** Set default reply trailers on the interceptor for subsequent mocked replies. */ - defaultReplyTrailers (trailers: Record): MockInterceptor - /** Set automatically calculated content-length header on subsequent mocked replies. */ - replyContentLength (): MockInterceptor -} - -declare namespace MockInterceptor { - /** MockInterceptor options. */ - export interface Options { - /** Path to intercept on. */ - path: string | RegExp | ((path: string) => boolean); - /** Method to intercept on. Defaults to GET. */ - method?: string | RegExp | ((method: string) => boolean); - /** Body to intercept on. */ - body?: string | RegExp | ((body: string) => boolean); - /** Headers to intercept on. */ - headers?: Record boolean)> | ((headers: Record) => boolean); - /** Query params to intercept on */ - query?: Record; - } - export interface MockDispatch extends Options { - times: number | null; - persist: boolean; - consumed: boolean; - data: MockDispatchData; - } - export interface MockDispatchData extends MockResponseOptions { - error: TError | null; - statusCode?: number; - data?: TData | string; - } - export interface MockResponseOptions { - headers?: IncomingHttpHeaders; - trailers?: Record; - } - - export interface MockResponseCallbackOptions { - path: string; - method: string; - headers?: Headers | Record; - origin?: string; - body?: BodyInit | Dispatcher.DispatchOptions['body'] | null; - } - - export type MockResponseDataHandler = ( - opts: MockResponseCallbackOptions - ) => TData | Buffer | string - - export type MockReplyOptionsCallback = ( - opts: MockResponseCallbackOptions - ) => { statusCode: number, data?: TData | Buffer | string, responseOptions?: MockResponseOptions } -} - -interface Interceptable extends Dispatcher { - /** Intercepts any matching requests that use the same origin as this mock client. */ - intercept(options: MockInterceptor.Options): MockInterceptor; - /** Clean up all the prepared mocks. */ - cleanMocks (): void -} - -export { - Interceptable, - MockInterceptor, - MockScope -} diff --git a/node_modules/undici-types/mock-pool.d.ts b/node_modules/undici-types/mock-pool.d.ts deleted file mode 100644 index f35f357..0000000 --- a/node_modules/undici-types/mock-pool.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Pool from './pool' -import MockAgent from './mock-agent' -import { Interceptable, MockInterceptor } from './mock-interceptor' -import Dispatcher from './dispatcher' - -export default MockPool - -/** MockPool extends the Pool API and allows one to mock requests. */ -declare class MockPool extends Pool implements Interceptable { - constructor (origin: string, options: MockPool.Options) - /** Intercepts any matching requests that use the same origin as this mock pool. */ - intercept (options: MockInterceptor.Options): MockInterceptor - /** Dispatches a mocked request. */ - dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean - /** Closes the mock pool and gracefully waits for enqueued requests to complete. */ - close (): Promise - /** Clean up all the prepared mocks. */ - cleanMocks (): void -} - -declare namespace MockPool { - /** MockPool options. */ - export interface Options extends Pool.Options { - /** The agent to associate this MockPool with. */ - agent: MockAgent; - } -} diff --git a/node_modules/undici-types/package.json b/node_modules/undici-types/package.json deleted file mode 100644 index 233c790..0000000 --- a/node_modules/undici-types/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "undici-types", - "version": "7.24.6", - "description": "A stand-alone types package for Undici", - "homepage": "https://undici.nodejs.org", - "bugs": { - "url": "https://github.com/nodejs/undici/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/nodejs/undici.git" - }, - "license": "MIT", - "types": "index.d.ts", - "files": [ - "*.d.ts" - ], - "contributors": [ - { - "name": "Daniele Belardi", - "url": "https://github.com/dnlup", - "author": true - }, - { - "name": "Ethan Arrowood", - "url": "https://github.com/ethan-arrowood", - "author": true - }, - { - "name": "Matteo Collina", - "url": "https://github.com/mcollina", - "author": true - }, - { - "name": "Matthew Aitken", - "url": "https://github.com/KhafraDev", - "author": true - }, - { - "name": "Robert Nagy", - "url": "https://github.com/ronag", - "author": true - }, - { - "name": "Szymon Marczak", - "url": "https://github.com/szmarczak", - "author": true - }, - { - "name": "Tomas Della Vedova", - "url": "https://github.com/delvedor", - "author": true - } - ] -} \ No newline at end of file diff --git a/node_modules/undici-types/patch.d.ts b/node_modules/undici-types/patch.d.ts deleted file mode 100644 index 8f7acbb..0000000 --- a/node_modules/undici-types/patch.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/// - -// See https://github.com/nodejs/undici/issues/1740 - -export interface EventInit { - bubbles?: boolean - cancelable?: boolean - composed?: boolean -} - -export interface EventListenerOptions { - capture?: boolean -} - -export interface AddEventListenerOptions extends EventListenerOptions { - once?: boolean - passive?: boolean - signal?: AbortSignal -} - -export type EventListenerOrEventListenerObject = EventListener | EventListenerObject - -export interface EventListenerObject { - handleEvent (object: Event): void -} - -export interface EventListener { - (evt: Event): void -} diff --git a/node_modules/undici-types/pool-stats.d.ts b/node_modules/undici-types/pool-stats.d.ts deleted file mode 100644 index f76a5f6..0000000 --- a/node_modules/undici-types/pool-stats.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import Pool from './pool' - -export default PoolStats - -declare class PoolStats { - constructor (pool: Pool) - /** Number of open socket connections in this pool. */ - connected: number - /** Number of open socket connections in this pool that do not have an active request. */ - free: number - /** Number of pending requests across all clients in this pool. */ - pending: number - /** Number of queued requests across all clients in this pool. */ - queued: number - /** Number of currently active requests across all clients in this pool. */ - running: number - /** Number of active, pending, or queued requests across all clients in this pool. */ - size: number -} diff --git a/node_modules/undici-types/pool.d.ts b/node_modules/undici-types/pool.d.ts deleted file mode 100644 index 120bb8b..0000000 --- a/node_modules/undici-types/pool.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import Client from './client' -import TPoolStats from './pool-stats' -import { URL } from 'node:url' -import Dispatcher from './dispatcher' - -export default Pool - -type PoolConnectOptions = Omit - -declare class Pool extends Dispatcher { - constructor (url: string | URL, options?: Pool.Options) - /** `true` after `pool.close()` has been called. */ - closed: boolean - /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ - destroyed: boolean - /** Aggregate stats for a Pool. */ - readonly stats: TPoolStats - - // Override dispatcher APIs. - override connect ( - options: PoolConnectOptions - ): Promise - override connect ( - options: PoolConnectOptions, - callback: (err: Error | null, data: Dispatcher.ConnectData) => void - ): void -} - -declare namespace Pool { - export type PoolStats = TPoolStats - export interface Options extends Client.Options { - /** Default: `(origin, opts) => new Client(origin, opts)`. */ - factory?(origin: URL, opts: object): Dispatcher; - /** The max number of clients to create. `null` if no limit. Default `null`. */ - connections?: number | null; - /** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */ - clientTtl?: number | null; - - interceptors?: { Pool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options['interceptors'] - } -} diff --git a/node_modules/undici-types/proxy-agent.d.ts b/node_modules/undici-types/proxy-agent.d.ts deleted file mode 100644 index 4155542..0000000 --- a/node_modules/undici-types/proxy-agent.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import Agent from './agent' -import buildConnector from './connector' -import Dispatcher from './dispatcher' -import { IncomingHttpHeaders } from './header' - -export default ProxyAgent - -declare class ProxyAgent extends Dispatcher { - constructor (options: ProxyAgent.Options | string) - - dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean - close (): Promise -} - -declare namespace ProxyAgent { - export interface Options extends Agent.Options { - uri: string; - /** - * @deprecated use opts.token - */ - auth?: string; - token?: string; - headers?: IncomingHttpHeaders; - requestTls?: buildConnector.BuildOptions; - proxyTls?: buildConnector.BuildOptions; - clientFactory?(origin: URL, opts: object): Dispatcher; - proxyTunnel?: boolean; - } -} diff --git a/node_modules/undici-types/readable.d.ts b/node_modules/undici-types/readable.d.ts deleted file mode 100644 index 723ed1f..0000000 --- a/node_modules/undici-types/readable.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Readable } from 'node:stream' -import { Blob } from 'node:buffer' - -export default BodyReadable - -declare class BodyReadable extends Readable { - constructor (opts: { - resume: (this: Readable, size: number) => void | null; - abort: () => void | null; - contentType?: string; - contentLength?: number; - highWaterMark?: number; - }) - - /** Consumes and returns the body as a string - * https://fetch.spec.whatwg.org/#dom-body-text - */ - text (): Promise - - /** Consumes and returns the body as a JavaScript Object - * https://fetch.spec.whatwg.org/#dom-body-json - */ - json (): Promise - - /** Consumes and returns the body as a Blob - * https://fetch.spec.whatwg.org/#dom-body-blob - */ - blob (): Promise - - /** Consumes and returns the body as an Uint8Array - * https://fetch.spec.whatwg.org/#dom-body-bytes - */ - bytes (): Promise - - /** Consumes and returns the body as an ArrayBuffer - * https://fetch.spec.whatwg.org/#dom-body-arraybuffer - */ - arrayBuffer (): Promise - - /** Not implemented - * - * https://fetch.spec.whatwg.org/#dom-body-formdata - */ - formData (): Promise - - /** Returns true if the body is not null and the body has been consumed - * - * Otherwise, returns false - * - * https://fetch.spec.whatwg.org/#dom-body-bodyused - */ - readonly bodyUsed: boolean - - /** - * If body is null, it should return null as the body - * - * If body is not null, should return the body as a ReadableStream - * - * https://fetch.spec.whatwg.org/#dom-body-body - */ - readonly body: never | undefined - - /** Dumps the response body by reading `limit` number of bytes. - * @param opts.limit Number of bytes to read (optional) - Default: 131072 - * @param opts.signal AbortSignal to cancel the operation (optional) - */ - dump (opts?: { limit: number; signal?: AbortSignal }): Promise -} diff --git a/node_modules/undici-types/retry-agent.d.ts b/node_modules/undici-types/retry-agent.d.ts deleted file mode 100644 index 82268c3..0000000 --- a/node_modules/undici-types/retry-agent.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import Dispatcher from './dispatcher' -import RetryHandler from './retry-handler' - -export default RetryAgent - -declare class RetryAgent extends Dispatcher { - constructor (dispatcher: Dispatcher, options?: RetryHandler.RetryOptions) -} diff --git a/node_modules/undici-types/retry-handler.d.ts b/node_modules/undici-types/retry-handler.d.ts deleted file mode 100644 index 3bc484b..0000000 --- a/node_modules/undici-types/retry-handler.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -import Dispatcher from './dispatcher' - -export default RetryHandler - -declare class RetryHandler implements Dispatcher.DispatchHandler { - constructor ( - options: Dispatcher.DispatchOptions & { - retryOptions?: RetryHandler.RetryOptions; - }, - retryHandlers: RetryHandler.RetryHandlers - ) -} - -declare namespace RetryHandler { - export type RetryState = { counter: number; } - - export type RetryContext = { - state: RetryState; - opts: Dispatcher.DispatchOptions & { - retryOptions?: RetryHandler.RetryOptions; - }; - } - - export type OnRetryCallback = (result?: Error | null) => void - - export type RetryCallback = ( - err: Error, - context: { - state: RetryState; - opts: Dispatcher.DispatchOptions & { - retryOptions?: RetryHandler.RetryOptions; - }; - }, - callback: OnRetryCallback - ) => void - - export interface RetryOptions { - /** - * If true, the retry handler will throw an error if the request fails, - * this will prevent the folling handlers from being called, and will destroy the socket. - * - * @type {boolean} - * @memberof RetryOptions - * @default true - */ - throwOnError?: boolean; - /** - * Callback to be invoked on every retry iteration. - * It receives the error, current state of the retry object and the options object - * passed when instantiating the retry handler. - * - * @type {RetryCallback} - * @memberof RetryOptions - */ - retry?: RetryCallback; - /** - * Maximum number of retries to allow. - * - * @type {number} - * @memberof RetryOptions - * @default 5 - */ - maxRetries?: number; - /** - * Max number of milliseconds allow between retries - * - * @type {number} - * @memberof RetryOptions - * @default 30000 - */ - maxTimeout?: number; - /** - * Initial number of milliseconds to wait before retrying for the first time. - * - * @type {number} - * @memberof RetryOptions - * @default 500 - */ - minTimeout?: number; - /** - * Factior to multiply the timeout factor between retries. - * - * @type {number} - * @memberof RetryOptions - * @default 2 - */ - timeoutFactor?: number; - /** - * It enables to automatically infer timeout between retries based on the `Retry-After` header. - * - * @type {boolean} - * @memberof RetryOptions - * @default true - */ - retryAfter?: boolean; - /** - * HTTP methods to retry. - * - * @type {Dispatcher.HttpMethod[]} - * @memberof RetryOptions - * @default ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], - */ - methods?: Dispatcher.HttpMethod[]; - /** - * Error codes to be retried. e.g. `ECONNRESET`, `ENOTFOUND`, `ETIMEDOUT`, `ECONNREFUSED`, etc. - * - * @type {string[]} - * @default ['ECONNRESET','ECONNREFUSED','ENOTFOUND','ENETDOWN','ENETUNREACH','EHOSTDOWN','EHOSTUNREACH','EPIPE'] - */ - errorCodes?: string[]; - /** - * HTTP status codes to be retried. - * - * @type {number[]} - * @memberof RetryOptions - * @default [500, 502, 503, 504, 429], - */ - statusCodes?: number[]; - } - - export interface RetryHandlers { - dispatch: Dispatcher['dispatch']; - handler: Dispatcher.DispatchHandler; - } -} diff --git a/node_modules/undici-types/round-robin-pool.d.ts b/node_modules/undici-types/round-robin-pool.d.ts deleted file mode 100644 index 05ce210..0000000 --- a/node_modules/undici-types/round-robin-pool.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import Client from './client' -import TPoolStats from './pool-stats' -import { URL } from 'node:url' -import Dispatcher from './dispatcher' - -export default RoundRobinPool - -type RoundRobinPoolConnectOptions = Omit - -declare class RoundRobinPool extends Dispatcher { - constructor (url: string | URL, options?: RoundRobinPool.Options) - /** `true` after `pool.close()` has been called. */ - closed: boolean - /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ - destroyed: boolean - /** Aggregate stats for a RoundRobinPool. */ - readonly stats: TPoolStats - - // Override dispatcher APIs. - override connect ( - options: RoundRobinPoolConnectOptions - ): Promise - override connect ( - options: RoundRobinPoolConnectOptions, - callback: (err: Error | null, data: Dispatcher.ConnectData) => void - ): void -} - -declare namespace RoundRobinPool { - export type RoundRobinPoolStats = TPoolStats - export interface Options extends Client.Options { - /** Default: `(origin, opts) => new Client(origin, opts)`. */ - factory?(origin: URL, opts: object): Dispatcher; - /** The max number of clients to create. `null` if no limit. Default `null`. */ - connections?: number | null; - /** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */ - clientTtl?: number | null; - - interceptors?: { RoundRobinPool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options['interceptors'] - } -} diff --git a/node_modules/undici-types/snapshot-agent.d.ts b/node_modules/undici-types/snapshot-agent.d.ts deleted file mode 100644 index f1d1ccd..0000000 --- a/node_modules/undici-types/snapshot-agent.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -import MockAgent from './mock-agent' - -declare class SnapshotRecorder { - constructor (options?: SnapshotRecorder.Options) - - record (requestOpts: any, response: any): Promise - findSnapshot (requestOpts: any): SnapshotRecorder.Snapshot | undefined - loadSnapshots (filePath?: string): Promise - saveSnapshots (filePath?: string): Promise - clear (): void - getSnapshots (): SnapshotRecorder.Snapshot[] - size (): number - resetCallCounts (): void - deleteSnapshot (requestOpts: any): boolean - getSnapshotInfo (requestOpts: any): SnapshotRecorder.SnapshotInfo | null - replaceSnapshots (snapshotData: SnapshotRecorder.SnapshotData[]): void - destroy (): void -} - -declare namespace SnapshotRecorder { - type SnapshotRecorderMode = 'record' | 'playback' | 'update' - - export interface Options { - snapshotPath?: string - mode?: SnapshotRecorderMode - maxSnapshots?: number - autoFlush?: boolean - flushInterval?: number - matchHeaders?: string[] - ignoreHeaders?: string[] - excludeHeaders?: string[] - matchBody?: boolean - matchQuery?: boolean - caseSensitive?: boolean - shouldRecord?: (requestOpts: any) => boolean - shouldPlayback?: (requestOpts: any) => boolean - excludeUrls?: (string | RegExp)[] - } - - export interface Snapshot { - request: { - method: string - url: string - headers: Record - body?: string - } - responses: { - statusCode: number - headers: Record - body: string - trailers: Record - }[] - callCount: number - timestamp: string - } - - export interface SnapshotInfo { - hash: string - request: { - method: string - url: string - headers: Record - body?: string - } - responseCount: number - callCount: number - timestamp: string - } - - export interface SnapshotData { - hash: string - snapshot: Snapshot - } -} - -declare class SnapshotAgent extends MockAgent { - constructor (options?: SnapshotAgent.Options) - - saveSnapshots (filePath?: string): Promise - loadSnapshots (filePath?: string): Promise - getRecorder (): SnapshotRecorder - getMode (): SnapshotRecorder.SnapshotRecorderMode - clearSnapshots (): void - resetCallCounts (): void - deleteSnapshot (requestOpts: any): boolean - getSnapshotInfo (requestOpts: any): SnapshotRecorder.SnapshotInfo | null - replaceSnapshots (snapshotData: SnapshotRecorder.SnapshotData[]): void -} - -declare namespace SnapshotAgent { - export interface Options extends MockAgent.Options { - mode?: SnapshotRecorder.SnapshotRecorderMode - snapshotPath?: string - maxSnapshots?: number - autoFlush?: boolean - flushInterval?: number - matchHeaders?: string[] - ignoreHeaders?: string[] - excludeHeaders?: string[] - matchBody?: boolean - matchQuery?: boolean - caseSensitive?: boolean - shouldRecord?: (requestOpts: any) => boolean - shouldPlayback?: (requestOpts: any) => boolean - excludeUrls?: (string | RegExp)[] - } -} - -export { SnapshotAgent, SnapshotRecorder } diff --git a/node_modules/undici-types/socks5-proxy-agent.d.ts b/node_modules/undici-types/socks5-proxy-agent.d.ts deleted file mode 100644 index 4b9c6a8..0000000 --- a/node_modules/undici-types/socks5-proxy-agent.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import Dispatcher from './dispatcher' -import buildConnector from './connector' -import { IncomingHttpHeaders } from './header' -import Pool from './pool' - -export default Socks5ProxyAgent - -declare class Socks5ProxyAgent extends Dispatcher { - constructor (proxyUrl: string | URL, options?: Socks5ProxyAgent.Options) -} - -declare namespace Socks5ProxyAgent { - export interface Options extends Pool.Options { - /** Additional headers to send with the proxy connection */ - headers?: IncomingHttpHeaders; - /** SOCKS5 proxy username for authentication */ - username?: string; - /** SOCKS5 proxy password for authentication */ - password?: string; - /** Custom connector function for proxy connection */ - connect?: buildConnector.connector; - /** TLS options for the proxy connection (for SOCKS5 over TLS) */ - proxyTls?: buildConnector.BuildOptions; - } -} diff --git a/node_modules/undici-types/util.d.ts b/node_modules/undici-types/util.d.ts deleted file mode 100644 index 8fc50cc..0000000 --- a/node_modules/undici-types/util.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export namespace util { - /** - * Retrieves a header name and returns its lowercase value. - * @param value Header name - */ - export function headerNameToString (value: string | Buffer): string - - /** - * Receives a header object and returns the parsed value. - * @param headers Header object - * @param obj Object to specify a proxy object. Used to assign parsed values. - * @returns If `obj` is specified, it is equivalent to `obj`. - */ - export function parseHeaders ( - headers: (Buffer | string | (Buffer | string)[])[], - obj?: Record - ): Record -} diff --git a/node_modules/undici-types/utility.d.ts b/node_modules/undici-types/utility.d.ts deleted file mode 100644 index bfb3ca7..0000000 --- a/node_modules/undici-types/utility.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -type AutocompletePrimitiveBaseType = - T extends string ? string : - T extends number ? number : - T extends boolean ? boolean : - never - -export type Autocomplete = T | (AutocompletePrimitiveBaseType & Record) diff --git a/node_modules/undici-types/webidl.d.ts b/node_modules/undici-types/webidl.d.ts deleted file mode 100644 index f95d9b5..0000000 --- a/node_modules/undici-types/webidl.d.ts +++ /dev/null @@ -1,347 +0,0 @@ -// These types are not exported, and are only used internally -import { BufferSource } from 'node:stream/web' -import * as undici from './index' - -/** - * Take in an unknown value and return one that is of type T - */ -type Converter = (object: unknown) => T - -type SequenceConverter = (object: unknown, iterable?: IterableIterator) => T[] - -type RecordConverter = (object: unknown) => Record - -interface WebidlErrors { - /** - * @description Instantiate an error - */ - exception (opts: { header: string, message: string }): TypeError - /** - * @description Instantiate an error when conversion from one type to another has failed - */ - conversionFailed (opts: { - prefix: string - argument: string - types: string[] - }): TypeError - /** - * @description Throw an error when an invalid argument is provided - */ - invalidArgument (opts: { - prefix: string - value: string - type: string - }): TypeError -} - -interface WebIDLTypes { - UNDEFINED: 1, - BOOLEAN: 2, - STRING: 3, - SYMBOL: 4, - NUMBER: 5, - BIGINT: 6, - NULL: 7 - OBJECT: 8 -} - -interface WebidlUtil { - /** - * @see https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values - */ - Type (object: unknown): WebIDLTypes[keyof WebIDLTypes] - - TypeValueToString (o: unknown): - | 'Undefined' - | 'Boolean' - | 'String' - | 'Symbol' - | 'Number' - | 'BigInt' - | 'Null' - | 'Object' - - Types: WebIDLTypes - - /** - * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint - */ - ConvertToInt ( - V: unknown, - bitLength: number, - signedness: 'signed' | 'unsigned', - flags?: number - ): number - - /** - * @see https://webidl.spec.whatwg.org/#abstract-opdef-integerpart - */ - IntegerPart (N: number): number - - /** - * Stringifies {@param V} - */ - Stringify (V: any): string - - MakeTypeAssertion (I: I): (arg: any) => arg is I - - /** - * Mark a value as uncloneable for Node.js. - * This is only effective in some newer Node.js versions. - */ - markAsUncloneable (V: any): void - - IsResizableArrayBuffer (V: ArrayBufferLike): boolean - - HasFlag (flag: number, attributes: number): boolean - - /** - * @see https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy - */ - getCopyOfBytesHeldByBufferSource (bufferSource: BufferSource): Uint8Array -} - -interface WebidlConverters { - /** - * @see https://webidl.spec.whatwg.org/#es-DOMString - */ - DOMString (V: unknown, prefix: string, argument: string, flags?: number): string - - /** - * @see https://webidl.spec.whatwg.org/#es-ByteString - */ - ByteString (V: unknown, prefix: string, argument: string): string - - /** - * @see https://webidl.spec.whatwg.org/#es-USVString - */ - USVString (V: unknown): string - - /** - * @see https://webidl.spec.whatwg.org/#es-boolean - */ - boolean (V: unknown): boolean - - /** - * @see https://webidl.spec.whatwg.org/#es-any - */ - any (V: Value): Value - - /** - * @see https://webidl.spec.whatwg.org/#es-long-long - */ - ['long long'] (V: unknown): number - - /** - * @see https://webidl.spec.whatwg.org/#es-unsigned-long-long - */ - ['unsigned long long'] (V: unknown): number - - /** - * @see https://webidl.spec.whatwg.org/#es-unsigned-long - */ - ['unsigned long'] (V: unknown): number - - /** - * @see https://webidl.spec.whatwg.org/#es-unsigned-short - */ - ['unsigned short'] (V: unknown, flags?: number): number - - /** - * @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer - */ - ArrayBuffer ( - V: unknown, - prefix: string, - argument: string, - options?: { allowResizable: boolean } - ): ArrayBuffer - - /** - * @see https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer - */ - SharedArrayBuffer ( - V: unknown, - prefix: string, - argument: string, - options?: { allowResizable: boolean } - ): SharedArrayBuffer - - /** - * @see https://webidl.spec.whatwg.org/#es-buffer-source-types - */ - TypedArray ( - V: unknown, - T: new () => NodeJS.TypedArray, - prefix: string, - argument: string, - flags?: number - ): NodeJS.TypedArray - - /** - * @see https://webidl.spec.whatwg.org/#es-buffer-source-types - */ - DataView ( - V: unknown, - prefix: string, - argument: string, - flags?: number - ): DataView - - /** - * @see https://webidl.spec.whatwg.org/#es-buffer-source-types - */ - ArrayBufferView ( - V: unknown, - prefix: string, - argument: string, - flags?: number - ): NodeJS.ArrayBufferView - - /** - * @see https://webidl.spec.whatwg.org/#BufferSource - */ - BufferSource ( - V: unknown, - prefix: string, - argument: string, - flags?: number - ): ArrayBuffer | NodeJS.ArrayBufferView - - /** - * @see https://webidl.spec.whatwg.org/#AllowSharedBufferSource - */ - AllowSharedBufferSource ( - V: unknown, - prefix: string, - argument: string, - flags?: number - ): ArrayBuffer | SharedArrayBuffer | NodeJS.ArrayBufferView - - ['sequence']: SequenceConverter - - ['sequence>']: SequenceConverter - - ['record']: RecordConverter - - /** - * @see https://fetch.spec.whatwg.org/#requestinfo - */ - RequestInfo (V: unknown): undici.Request | string - - /** - * @see https://fetch.spec.whatwg.org/#requestinit - */ - RequestInit (V: unknown): undici.RequestInit - - /** - * @see https://html.spec.whatwg.org/multipage/webappapis.html#eventhandlernonnull - */ - EventHandlerNonNull (V: unknown): Function | null - - WebSocketStreamWrite (V: unknown): ArrayBuffer | NodeJS.TypedArray | string - - [Key: string]: (...args: any[]) => unknown -} - -type WebidlIsFunction = (arg: any) => arg is T - -interface WebidlIs { - Request: WebidlIsFunction - Response: WebidlIsFunction - ReadableStream: WebidlIsFunction - Blob: WebidlIsFunction - URLSearchParams: WebidlIsFunction - File: WebidlIsFunction - FormData: WebidlIsFunction - URL: WebidlIsFunction - WebSocketError: WebidlIsFunction - AbortSignal: WebidlIsFunction - MessagePort: WebidlIsFunction - USVString: WebidlIsFunction - /** - * @see https://webidl.spec.whatwg.org/#BufferSource - */ - BufferSource: WebidlIsFunction -} - -export interface Webidl { - errors: WebidlErrors - util: WebidlUtil - converters: WebidlConverters - is: WebidlIs - attributes: WebIDLExtendedAttributes - - /** - * @description Performs a brand-check on {@param V} to ensure it is a - * {@param cls} object. - */ - brandCheck unknown>(V: unknown, cls: Interface): asserts V is Interface - - brandCheckMultiple unknown)[]> (list: Interfaces): (V: any) => asserts V is Interfaces[number] - - /** - * @see https://webidl.spec.whatwg.org/#es-sequence - * @description Convert a value, V, to a WebIDL sequence type. - */ - sequenceConverter (C: Converter): SequenceConverter - - illegalConstructor (): never - - /** - * @see https://webidl.spec.whatwg.org/#es-to-record - * @description Convert a value, V, to a WebIDL record type. - */ - recordConverter ( - keyConverter: Converter, - valueConverter: Converter - ): RecordConverter - - /** - * Similar to {@link Webidl.brandCheck} but allows skipping the check if third party - * interfaces are allowed. - */ - interfaceConverter (typeCheck: WebidlIsFunction, name: string): ( - V: unknown, - prefix: string, - argument: string - ) => asserts V is Interface - - // TODO(@KhafraDev): a type could likely be implemented that can infer the return type - // from the converters given? - /** - * Converts a value, V, to a WebIDL dictionary types. Allows limiting which keys are - * allowed, values allowed, optional and required keys. Auto converts the value to - * a type given a converter. - */ - dictionaryConverter (converters: { - key: string, - defaultValue?: () => unknown, - required?: boolean, - converter: (...args: unknown[]) => unknown, - allowedValues?: unknown[] - }[]): (V: unknown) => Record - - /** - * @see https://webidl.spec.whatwg.org/#idl-nullable-type - * @description allows a type, V, to be null - */ - nullableConverter ( - converter: Converter - ): (V: unknown) => ReturnType | null - - argumentLengthCheck (args: { length: number }, min: number, context: string): void -} - -interface WebIDLExtendedAttributes { - /** https://webidl.spec.whatwg.org/#Clamp */ - Clamp: number - /** https://webidl.spec.whatwg.org/#EnforceRange */ - EnforceRange: number - /** https://webidl.spec.whatwg.org/#AllowShared */ - AllowShared: number - /** https://webidl.spec.whatwg.org/#AllowResizable */ - AllowResizable: number - /** https://webidl.spec.whatwg.org/#LegacyNullToEmptyString */ - LegacyNullToEmptyString: number -} diff --git a/node_modules/undici-types/websocket.d.ts b/node_modules/undici-types/websocket.d.ts deleted file mode 100644 index d48b9da..0000000 --- a/node_modules/undici-types/websocket.d.ts +++ /dev/null @@ -1,188 +0,0 @@ -/// - -import type { Blob } from 'node:buffer' -import type { ReadableStream, WritableStream } from 'node:stream/web' -import type { MessagePort } from 'node:worker_threads' -import { - EventInit, - EventListenerOptions, - AddEventListenerOptions, - EventListenerOrEventListenerObject -} from './patch' -import Dispatcher from './dispatcher' -import { HeadersInit } from './fetch' - -export type BinaryType = 'blob' | 'arraybuffer' - -interface WebSocketEventMap { - close: CloseEvent - error: ErrorEvent - message: MessageEvent - open: Event -} - -interface WebSocket extends EventTarget { - binaryType: BinaryType - - readonly bufferedAmount: number - readonly extensions: string - - onclose: ((this: WebSocket, ev: WebSocketEventMap['close']) => any) | null - onerror: ((this: WebSocket, ev: WebSocketEventMap['error']) => any) | null - onmessage: ((this: WebSocket, ev: WebSocketEventMap['message']) => any) | null - onopen: ((this: WebSocket, ev: WebSocketEventMap['open']) => any) | null - - readonly protocol: string - readonly readyState: number - readonly url: string - - close(code?: number, reason?: string): void - send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void - - readonly CLOSED: number - readonly CLOSING: number - readonly CONNECTING: number - readonly OPEN: number - - addEventListener( - type: K, - listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, - options?: boolean | AddEventListenerOptions - ): void - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions - ): void - removeEventListener( - type: K, - listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, - options?: boolean | EventListenerOptions - ): void - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions - ): void -} - -export declare const WebSocket: { - prototype: WebSocket - new (url: string | URL, protocols?: string | string[] | WebSocketInit): WebSocket - readonly CLOSED: number - readonly CLOSING: number - readonly CONNECTING: number - readonly OPEN: number -} - -interface CloseEventInit extends EventInit { - code?: number - reason?: string - wasClean?: boolean -} - -interface CloseEvent extends Event { - readonly code: number - readonly reason: string - readonly wasClean: boolean -} - -export declare const CloseEvent: { - prototype: CloseEvent - new (type: string, eventInitDict?: CloseEventInit): CloseEvent -} - -interface MessageEventInit extends EventInit { - data?: T - lastEventId?: string - origin?: string - ports?: MessagePort[] - source?: MessagePort | null -} - -interface MessageEvent extends Event { - readonly data: T - readonly lastEventId: string - readonly origin: string - readonly ports: readonly MessagePort[] - readonly source: MessagePort | null - initMessageEvent( - type: string, - bubbles?: boolean, - cancelable?: boolean, - data?: any, - origin?: string, - lastEventId?: string, - source?: MessagePort | null, - ports?: MessagePort[] - ): void; -} - -export declare const MessageEvent: { - prototype: MessageEvent - new(type: string, eventInitDict?: MessageEventInit): MessageEvent -} - -interface ErrorEventInit extends EventInit { - message?: string - filename?: string - lineno?: number - colno?: number - error?: any -} - -interface ErrorEvent extends Event { - readonly message: string - readonly filename: string - readonly lineno: number - readonly colno: number - readonly error: Error -} - -export declare const ErrorEvent: { - prototype: ErrorEvent - new (type: string, eventInitDict?: ErrorEventInit): ErrorEvent -} - -interface WebSocketInit { - protocols?: string | string[], - dispatcher?: Dispatcher, - headers?: HeadersInit -} - -interface WebSocketStreamOptions { - protocols?: string | string[] - signal?: AbortSignal -} - -interface WebSocketCloseInfo { - closeCode: number - reason: string -} - -interface WebSocketStream { - closed: Promise - opened: Promise<{ - extensions: string - protocol: string - readable: ReadableStream - writable: WritableStream - }> - url: string - - close(options?: Partial): void -} - -export declare const WebSocketStream: { - prototype: WebSocketStream - new (url: string | URL, options?: WebSocketStreamOptions): WebSocketStream -} - -interface WebSocketError extends Event, WebSocketCloseInfo {} - -export declare const WebSocketError: { - prototype: WebSocketError - new (type: string, init?: WebSocketCloseInfo): WebSocketError -} - -export declare const ping: (ws: WebSocket, body?: Buffer) => void diff --git a/node_modules/unpipe/HISTORY.md b/node_modules/unpipe/HISTORY.md deleted file mode 100644 index 85e0f8d..0000000 --- a/node_modules/unpipe/HISTORY.md +++ /dev/null @@ -1,4 +0,0 @@ -1.0.0 / 2015-06-14 -================== - - * Initial release diff --git a/node_modules/unpipe/LICENSE b/node_modules/unpipe/LICENSE deleted file mode 100644 index aed0138..0000000 --- a/node_modules/unpipe/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/unpipe/README.md b/node_modules/unpipe/README.md deleted file mode 100644 index e536ad2..0000000 --- a/node_modules/unpipe/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# unpipe - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Unpipe a stream from all destinations. - -## Installation - -```sh -$ npm install unpipe -``` - -## API - -```js -var unpipe = require('unpipe') -``` - -### unpipe(stream) - -Unpipes all destinations from a given stream. With stream 2+, this is -equivalent to `stream.unpipe()`. When used with streams 1 style streams -(typically Node.js 0.8 and below), this module attempts to undo the -actions done in `stream.pipe(dest)`. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/unpipe.svg -[npm-url]: https://npmjs.org/package/unpipe -[node-image]: https://img.shields.io/node/v/unpipe.svg -[node-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/stream-utils/unpipe.svg -[travis-url]: https://travis-ci.org/stream-utils/unpipe -[coveralls-image]: https://img.shields.io/coveralls/stream-utils/unpipe.svg -[coveralls-url]: https://coveralls.io/r/stream-utils/unpipe?branch=master -[downloads-image]: https://img.shields.io/npm/dm/unpipe.svg -[downloads-url]: https://npmjs.org/package/unpipe diff --git a/node_modules/unpipe/index.js b/node_modules/unpipe/index.js deleted file mode 100644 index 15c3d97..0000000 --- a/node_modules/unpipe/index.js +++ /dev/null @@ -1,69 +0,0 @@ -/*! - * unpipe - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = unpipe - -/** - * Determine if there are Node.js pipe-like data listeners. - * @private - */ - -function hasPipeDataListeners(stream) { - var listeners = stream.listeners('data') - - for (var i = 0; i < listeners.length; i++) { - if (listeners[i].name === 'ondata') { - return true - } - } - - return false -} - -/** - * Unpipe a stream from all destinations. - * - * @param {object} stream - * @public - */ - -function unpipe(stream) { - if (!stream) { - throw new TypeError('argument stream is required') - } - - if (typeof stream.unpipe === 'function') { - // new-style - stream.unpipe() - return - } - - // Node.js 0.8 hack - if (!hasPipeDataListeners(stream)) { - return - } - - var listener - var listeners = stream.listeners('close') - - for (var i = 0; i < listeners.length; i++) { - listener = listeners[i] - - if (listener.name !== 'cleanup' && listener.name !== 'onclose') { - continue - } - - // invoke the listener - listener.call(stream) - } -} diff --git a/node_modules/unpipe/package.json b/node_modules/unpipe/package.json deleted file mode 100644 index a2b7358..0000000 --- a/node_modules/unpipe/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "unpipe", - "description": "Unpipe a stream from all destinations", - "version": "1.0.0", - "author": "Douglas Christopher Wilson ", - "license": "MIT", - "repository": "stream-utils/unpipe", - "devDependencies": { - "istanbul": "0.3.15", - "mocha": "2.2.5", - "readable-stream": "1.1.13" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - } -} diff --git a/node_modules/utils-merge/.npmignore b/node_modules/utils-merge/.npmignore deleted file mode 100644 index 3e53844..0000000 --- a/node_modules/utils-merge/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -CONTRIBUTING.md -Makefile -docs/ -examples/ -reports/ -test/ - -.jshintrc -.travis.yml diff --git a/node_modules/utils-merge/LICENSE b/node_modules/utils-merge/LICENSE deleted file mode 100644 index 76f6d08..0000000 --- a/node_modules/utils-merge/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-2017 Jared Hanson - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/utils-merge/README.md b/node_modules/utils-merge/README.md deleted file mode 100644 index 0cb7117..0000000 --- a/node_modules/utils-merge/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# utils-merge - -[![Version](https://img.shields.io/npm/v/utils-merge.svg?label=version)](https://www.npmjs.com/package/utils-merge) -[![Build](https://img.shields.io/travis/jaredhanson/utils-merge.svg)](https://travis-ci.org/jaredhanson/utils-merge) -[![Quality](https://img.shields.io/codeclimate/github/jaredhanson/utils-merge.svg?label=quality)](https://codeclimate.com/github/jaredhanson/utils-merge) -[![Coverage](https://img.shields.io/coveralls/jaredhanson/utils-merge.svg)](https://coveralls.io/r/jaredhanson/utils-merge) -[![Dependencies](https://img.shields.io/david/jaredhanson/utils-merge.svg)](https://david-dm.org/jaredhanson/utils-merge) - - -Merges the properties from a source object into a destination object. - -## Install - -```bash -$ npm install utils-merge -``` - -## Usage - -```javascript -var a = { foo: 'bar' } - , b = { bar: 'baz' }; - -merge(a, b); -// => { foo: 'bar', bar: 'baz' } -``` - -## License - -[The MIT License](http://opensource.org/licenses/MIT) - -Copyright (c) 2013-2017 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)> - - Sponsor diff --git a/node_modules/utils-merge/index.js b/node_modules/utils-merge/index.js deleted file mode 100644 index 4265c69..0000000 --- a/node_modules/utils-merge/index.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Merge object b with object a. - * - * var a = { foo: 'bar' } - * , b = { bar: 'baz' }; - * - * merge(a, b); - * // => { foo: 'bar', bar: 'baz' } - * - * @param {Object} a - * @param {Object} b - * @return {Object} - * @api public - */ - -exports = module.exports = function(a, b){ - if (a && b) { - for (var key in b) { - a[key] = b[key]; - } - } - return a; -}; diff --git a/node_modules/utils-merge/package.json b/node_modules/utils-merge/package.json deleted file mode 100644 index e36b078..0000000 --- a/node_modules/utils-merge/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "utils-merge", - "version": "1.0.1", - "description": "merge() utility function", - "keywords": [ - "util" - ], - "author": { - "name": "Jared Hanson", - "email": "jaredhanson@gmail.com", - "url": "http://www.jaredhanson.net/" - }, - "repository": { - "type": "git", - "url": "git://github.com/jaredhanson/utils-merge.git" - }, - "bugs": { - "url": "http://github.com/jaredhanson/utils-merge/issues" - }, - "license": "MIT", - "licenses": [ - { - "type": "MIT", - "url": "http://opensource.org/licenses/MIT" - } - ], - "main": "./index", - "dependencies": {}, - "devDependencies": { - "make-node": "0.3.x", - "mocha": "1.x.x", - "chai": "1.x.x" - }, - "engines": { - "node": ">= 0.4.0" - }, - "scripts": { - "test": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js" - } -} diff --git a/node_modules/uuid/LICENSE.md b/node_modules/uuid/LICENSE.md deleted file mode 100644 index 3934168..0000000 --- a/node_modules/uuid/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010-2020 Robert Kieffer and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/uuid/README.md b/node_modules/uuid/README.md deleted file mode 100644 index c4e2cbd..0000000 --- a/node_modules/uuid/README.md +++ /dev/null @@ -1,491 +0,0 @@ - - -# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions/workflows/browser.yml) - -For the creation of [RFC9562](https://www.rfc-editor.org/rfc/rfc9562.html) (formerly [RFC4122](https://www.rfc-editor.org/rfc/rfc4122.html)) UUIDs - -- **Complete** - Support for all RFC9562 UUID versions -- **Cross-platform** - Support for... - - [Typescript](#support) - - [Chrome, Safari, Firefox, and Edge](#support) - - [NodeJS](#support) - - [React Native / Expo](#react-native--expo) -- **Secure** - Uses modern `crypto` API for random values -- **Compact** - Zero-dependency, [tree-shakable](https://developer.mozilla.org/en-US/docs/Glossary/Tree_shaking) -- **CLI** - [`uuid` command line](#command-line) utility - - -> [!NOTE] -> -> Starting with `uuid@12` CommonJS is no longer supported. See [implications](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) and [motivation](https://github.com/uuidjs/uuid/issues/881) for details. - -## Quickstart - -**1. Install** - -```shell -npm install uuid -``` - -**2. Create a UUID** - -```javascript -import { v4 as uuidv4 } from "uuid"; - -uuidv4(); // ⇨ 'ab16e731-6cee-424d-81a0-5929e9bdb0cc' -``` - -For timestamp UUIDs, namespace UUIDs, and other options read on ... - -## API Summary - -| | | | -| -------------------------------------------------- | ----------------------------------------------- | ----------------- | -| [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` | -| [`uuid.MAX`](#uuidmax) | The max UUID string (all ones) | New in `uuid@9.1` | -| [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` | -| [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` | -| [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID | | -| [`uuid.v1ToV6()`](#uuidv1tov6uuid) | Create a version 6 UUID from a version 1 UUID | New in `uuid@10` | -| [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | | -| [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | | -| [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | | -| [`uuid.v6()`](#uuidv6options-buffer-offset) | Create a version 6 (timestamp, reordered) UUID | New in `uuid@10` | -| [`uuid.v6ToV1()`](#uuidv6tov1uuid) | Create a version 1 UUID from a version 6 UUID | New in `uuid@10` | -| [`uuid.v7()`](#uuidv7options-buffer-offset) | Create a version 7 (Unix Epoch time-based) UUID | New in `uuid@10` | -| ~~[`uuid.v8()`](#uuidv8)~~ | "Intentionally left blank" | | -| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` | -| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` | - -## API - -### uuid.NIL - -The nil UUID string (all zeros). - -Example: - -```javascript -import { NIL as NIL_UUID } from "uuid"; - -NIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000' -``` - -### uuid.MAX - -The max UUID string (all ones). - -Example: - -```javascript -import { MAX as MAX_UUID } from "uuid"; - -MAX_UUID; // ⇨ 'ffffffff-ffff-ffff-ffff-ffffffffffff' -``` - -### uuid.parse(str) - -Convert UUID string to array of bytes - -| | | -| --------- | ---------------------------------------- | -| `str` | A valid UUID `String` | -| _returns_ | `Uint8Array[16]` | -| _throws_ | `TypeError` if `str` is not a valid UUID | - - -> [!NOTE] -> Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. - -Example: - -```javascript -import { parse as uuidParse } from "uuid"; - -// Parse a UUID -uuidParse("6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b"); // ⇨ -// Uint8Array(16) [ -// 110, 192, 189, 127, 17, -// 192, 67, 218, 151, 94, -// 42, 138, 217, 235, 174, -// 11 -// ] -``` - -### uuid.stringify(arr[, offset]) - -Convert array of bytes to UUID string - -| | | -| -------------- | ---------------------------------------------------------------------------- | -| `arr` | `Array`-like collection of 16 values (starting from `offset`) between 0-255. | -| [`offset` = 0] | `Number` Starting index in the Array | -| _returns_ | `String` | -| _throws_ | `TypeError` if a valid UUID string cannot be generated | - - -> [!NOTE] -> Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. - -Example: - -```javascript -import { stringify as uuidStringify } from "uuid"; - -const uuidBytes = Uint8Array.of( - 0x6e, - 0xc0, - 0xbd, - 0x7f, - 0x11, - 0xc0, - 0x43, - 0xda, - 0x97, - 0x5e, - 0x2a, - 0x8a, - 0xd9, - 0xeb, - 0xae, - 0x0b, -); - -uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b' -``` - -### uuid.v1([options[, buffer[, offset]]]) - -Create an RFC version 1 (timestamp) UUID - -| | | -| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| [`options`] | `Object` with one or more of the following properties: | -| [`options.node = (random)` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) | -| [`options.clockseq = (random)`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff | -| [`options.msecs = (current time)`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) | -| [`options.nsecs = 0`] | RFC "timestamp" field (`Number` of nanoseconds to add to `msecs`, should be 0-10,000) | -| [`options.random = (random)`] | `Array` of 16 random bytes (0-255) used to generate other fields, above | -| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | -| [`buffer`] | `Uint8Array` or `Uint8Array` subtype (e.g. Node.js `Buffer`). If provided, binary UUID is written into the array, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | -| _throws_ | `Error` if more than 10M UUIDs/sec are requested | - -Example: - -```javascript -import { v1 as uuidv1 } from "uuid"; - -uuidv1(); // ⇨ '4d9d2960-31d0-11f1-aba8-29728d41eeed' -``` - -Example using `options`: - -```javascript -import { v1 as uuidv1 } from "uuid"; - -const options = { - node: Uint8Array.of(0x01, 0x23, 0x45, 0x67, 0x89, 0xab), - clockseq: 0x1234, - msecs: new Date("2011-11-01").getTime(), - nsecs: 5678, -}; -uuidv1(options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' -``` - -### uuid.v1ToV6(uuid) - -Convert a UUID from version 1 to version 6 - -```javascript -import { v1ToV6 } from "uuid"; - -v1ToV6("92f62d9e-22c4-11ef-97e9-325096b39f47"); // ⇨ '1ef22c49-2f62-6d9e-97e9-325096b39f47' -``` - -### uuid.v3(name, namespace[, buffer[, offset]]) - -Create an RFC version 3 (namespace w/ MD5) UUID - -API is identical to `v5()`, but uses "v3" instead. - - -> [!IMPORTANT] -> Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_." - -### uuid.v4([options[, buffer[, offset]]]) - -Create an RFC version 4 (random) UUID - -| | | -| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------- | -| [`options`] | `Object` with one or more of the following properties: | -| [`options.random`] | `Array` of 16 random bytes (0-255) | -| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | -| [`buffer`] | `Uint8Array` or `Uint8Array` subtype (e.g. Node.js `Buffer`). If provided, binary UUID is written into the array, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | - -Example: - -```javascript -import { v4 as uuidv4 } from "uuid"; - -uuidv4(); // ⇨ '7934256a-bc92-4b69-b240-f9e463881aea' -``` - -Example using predefined `random` values: - -```javascript -import { v4 as uuidv4 } from "uuid"; - -const v4options = { - random: Uint8Array.of( - 0x10, - 0x91, - 0x56, - 0xbe, - 0xc4, - 0xfb, - 0xc1, - 0xea, - 0x71, - 0xb4, - 0xef, - 0xe1, - 0x67, - 0x1c, - 0x58, - 0x36, - ), -}; -uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' -``` - -### uuid.v5(name, namespace[, buffer[, offset]]) - -Create an RFC version 5 (namespace w/ SHA-1) UUID - -| | | -| -------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | `String \| Array` | -| `namespace` | `String \| Array[16]` Namespace UUID | -| [`buffer`] | `Uint8Array` or `Uint8Array` subtype (e.g. Node.js `Buffer`). If provided, binary UUID is written into the array, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | - - -> [!NOTE] -> The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`. - -Example with custom namespace: - -```javascript -import { v5 as uuidv5 } from "uuid"; - -// Define a custom namespace. Readers, create your own using something like -// https://www.uuidgenerator.net/ -const MY_NAMESPACE = "1b671a64-40d5-491e-99b0-da01ff1f3341"; - -uuidv5("Hello, World!", MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' -``` - -Example with RFC `URL` namespace: - -```javascript -import { v5 as uuidv5 } from "uuid"; - -uuidv5("https://www.w3.org/", uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1' -``` - -### uuid.v6([options[, buffer[, offset]]]) - -Create an RFC version 6 (timestamp, reordered) UUID - -This method takes the same arguments as uuid.v1(). - -```javascript -import { v6 as uuidv6 } from "uuid"; - -uuidv6(); // ⇨ '1f131d04-d9dc-65a0-9516-5be66631ce97' -``` - -Example using `options`: - -```javascript -import { v6 as uuidv6 } from "uuid"; - -const options = { - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date("2011-11-01").getTime(), - nsecs: 5678, -}; -uuidv6(options); // ⇨ '1e1041c7-10b9-662e-9234-0123456789ab' -``` - -### uuid.v6ToV1(uuid) - -Convert a UUID from version 6 to version 1 - -```javascript -import { v6ToV1 } from "uuid"; - -v6ToV1("1ef22c49-2f62-6d9e-97e9-325096b39f47"); // ⇨ '92f62d9e-22c4-11ef-97e9-325096b39f47' -``` - -### uuid.v7([options[, buffer[, offset]]]) - -Create an RFC version 7 (random) UUID - -| | | -| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [`options`] | `Object` with one or more of the following properties: | -| [`options.msecs = (current time)`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) | -| [`options.random = (random)`] | `Array` of 16 random bytes (0-255) used to generate other fields, above | -| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | -| [`options.seq = (random)`] | 32-bit sequence `Number` between 0 - 0xffffffff. This may be provided to help ensure uniqueness for UUIDs generated within the same millisecond time interval. Default = random value. | -| [`buffer`] | `Uint8Array` or `Uint8Array` subtype (e.g. Node.js `Buffer`). If provided, binary UUID is written into the array, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | - -Example: - -```javascript -import { v7 as uuidv7 } from "uuid"; - -uuidv7(); // ⇨ '019d637c-c6fb-74e9-8b9d-2f1d459a4201' -``` - -### ~~uuid.v8()~~ - -**_"Intentionally left blank"_** - - -> [!NOTE] -> Version 8 (experimental) UUIDs are "[for experimental or vendor-specific use cases](https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-8)". The RFC does not define a creation algorithm for them, which is why this package does not offer a `v8()` method. The `validate()` and `version()` methods do work with such UUIDs, however. - -### uuid.validate(str) - -Test a string to see if it is a valid UUID - -| | | -| --------- | --------------------------------------------------- | -| `str` | `String` to validate | -| _returns_ | `true` if string is a valid UUID, `false` otherwise | - -Example: - -```javascript -import { validate as uuidValidate } from "uuid"; - -uuidValidate("not a UUID"); // ⇨ false -uuidValidate("6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b"); // ⇨ true -``` - -Using `validate` and `version` together it is possible to do per-version validation, e.g. validate for only v4 UUIds. - -```javascript -import { version as uuidVersion } from "uuid"; -import { validate as uuidValidate } from "uuid"; - -function uuidValidateV4(uuid) { - return uuidValidate(uuid) && uuidVersion(uuid) === 4; -} - -const v1Uuid = "d9428888-122b-11e1-b85c-61cd3cbb3210"; -const v4Uuid = "109156be-c4fb-41ea-b1b4-efe1671c5836"; - -uuidValidateV4(v4Uuid); // ⇨ true -uuidValidateV4(v1Uuid); // ⇨ false -``` - -### uuid.version(str) - -Detect RFC version of a UUID - -| | | -| --------- | ---------------------------------------- | -| `str` | A valid UUID `String` | -| _returns_ | `Number` The RFC version of the UUID | -| _throws_ | `TypeError` if `str` is not a valid UUID | - -Example: - -```javascript -import { version as uuidVersion } from "uuid"; - -uuidVersion("45637ec4-c85f-11ea-87d0-0242ac130003"); // ⇨ 1 -uuidVersion("6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b"); // ⇨ 4 -``` - - -> [!NOTE] -> This method returns `0` for the `NIL` UUID, and `15` for the `MAX` UUID. - -## Command Line - -UUIDs can be generated from the command line using `uuid`. - -```shell -$ npx uuid -ddeb27fb-d9a0-4624-be4d-4615062daed4 -``` - -The default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details: - -```shell -$ npx uuid --help - -Usage: - uuid - uuid v1 - uuid v3 - uuid v4 - uuid v5 - uuid v7 - uuid --help - -Note: may be "URL" or "DNS" to use the corresponding UUIDs -defined by RFC9562 -``` - -## `options` Handling for Timestamp UUIDs - -Prior to `uuid@11`, it was possible for `options` state to interfere with the internal state used to ensure uniqueness of timestamp-based UUIDs (the `v1()`, `v6()`, and `v7()` methods). Starting with `uuid@11`, this issue has been addressed by using the presence of the `options` argument as a flag to select between two possible behaviors: - -- Without `options`: Internal state is utilized to improve UUID uniqueness. -- With `options`: Internal state is **NOT** used and, instead, appropriate defaults are applied as needed. - -## Support - -**Browsers**: `uuid` [builds are tested](/uuidjs/uuid/blob/main/wdio.conf.js) against the latest version of desktop Chrome, Safari, Firefox, and Edge. Mobile versions of these same browsers are expected to work but aren't currently tested. - -**Node**: `uuid` [builds are tested](https://github.com/uuidjs/uuid/blob/main/.github/workflows/ci.yml#L26-L27) against node ([LTS releases](https://github.com/nodejs/Release)), plus one prior. E.g. At the time of this writing `node@20` is the "maintenance" release and `node@24` is the "current" release, so `uuid` supports `node@20`-`node@24`. - -**Typescript**: TS versions released within the past two years are supported. [source](https://github.com/microsoft/TypeScript/issues/49088#issuecomment-2468723715) - -## Known issues - - - -### "getRandomValues() not supported" - -This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill: - -#### React Native / Expo - -1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) -1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point: - -```javascript -import "react-native-get-random-values"; -import { v4 as uuidv4 } from "uuid"; -``` - ---- - -Markdown generated from [README_js.md](README_js.md) by diff --git a/node_modules/uuid/dist-node/bin/uuid b/node_modules/uuid/dist-node/bin/uuid deleted file mode 100644 index b4f612d..0000000 --- a/node_modules/uuid/dist-node/bin/uuid +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -import '../uuid-bin.js'; diff --git a/node_modules/uuid/dist-node/index.js b/node_modules/uuid/dist-node/index.js deleted file mode 100644 index 3193e9a..0000000 --- a/node_modules/uuid/dist-node/index.js +++ /dev/null @@ -1,14 +0,0 @@ -export { default as MAX } from './max.js'; -export { default as NIL } from './nil.js'; -export { default as parse } from './parse.js'; -export { default as stringify } from './stringify.js'; -export { default as v1 } from './v1.js'; -export { default as v1ToV6 } from './v1ToV6.js'; -export { default as v3 } from './v3.js'; -export { default as v4 } from './v4.js'; -export { default as v5 } from './v5.js'; -export { default as v6 } from './v6.js'; -export { default as v6ToV1 } from './v6ToV1.js'; -export { default as v7 } from './v7.js'; -export { default as validate } from './validate.js'; -export { default as version } from './version.js'; diff --git a/node_modules/uuid/dist-node/max.js b/node_modules/uuid/dist-node/max.js deleted file mode 100644 index 58951f6..0000000 --- a/node_modules/uuid/dist-node/max.js +++ /dev/null @@ -1 +0,0 @@ -export default 'ffffffff-ffff-ffff-ffff-ffffffffffff'; diff --git a/node_modules/uuid/dist-node/md5.js b/node_modules/uuid/dist-node/md5.js deleted file mode 100644 index 4fae485..0000000 --- a/node_modules/uuid/dist-node/md5.js +++ /dev/null @@ -1,11 +0,0 @@ -import { createHash } from 'node:crypto'; -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } - else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - return createHash('md5').update(bytes).digest(); -} -export default md5; diff --git a/node_modules/uuid/dist-node/nil.js b/node_modules/uuid/dist-node/nil.js deleted file mode 100644 index de6f830..0000000 --- a/node_modules/uuid/dist-node/nil.js +++ /dev/null @@ -1 +0,0 @@ -export default '00000000-0000-0000-0000-000000000000'; diff --git a/node_modules/uuid/dist-node/parse.js b/node_modules/uuid/dist-node/parse.js deleted file mode 100644 index 64ac401..0000000 --- a/node_modules/uuid/dist-node/parse.js +++ /dev/null @@ -1,9 +0,0 @@ -import validate from './validate.js'; -function parse(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - let v; - return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 0xff, ((v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000) & 0xff, (v / 0x100000000) & 0xff, (v >>> 24) & 0xff, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff); -} -export default parse; diff --git a/node_modules/uuid/dist-node/regex.js b/node_modules/uuid/dist-node/regex.js deleted file mode 100644 index 3e38591..0000000 --- a/node_modules/uuid/dist-node/regex.js +++ /dev/null @@ -1 +0,0 @@ -export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i; diff --git a/node_modules/uuid/dist-node/rng.js b/node_modules/uuid/dist-node/rng.js deleted file mode 100644 index 0511e89..0000000 --- a/node_modules/uuid/dist-node/rng.js +++ /dev/null @@ -1,4 +0,0 @@ -const rnds8 = new Uint8Array(16); -export default function rng() { - return crypto.getRandomValues(rnds8); -} diff --git a/node_modules/uuid/dist-node/sha1.js b/node_modules/uuid/dist-node/sha1.js deleted file mode 100644 index 7dfd27c..0000000 --- a/node_modules/uuid/dist-node/sha1.js +++ /dev/null @@ -1,11 +0,0 @@ -import { createHash } from 'node:crypto'; -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } - else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - return createHash('sha1').update(bytes).digest(); -} -export default sha1; diff --git a/node_modules/uuid/dist-node/stringify.js b/node_modules/uuid/dist-node/stringify.js deleted file mode 100644 index 962738c..0000000 --- a/node_modules/uuid/dist-node/stringify.js +++ /dev/null @@ -1,35 +0,0 @@ -import validate from './validate.js'; -const byteToHex = []; -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} -export function unsafeStringify(arr, offset = 0) { - return (byteToHex[arr[offset + 0]] + - byteToHex[arr[offset + 1]] + - byteToHex[arr[offset + 2]] + - byteToHex[arr[offset + 3]] + - '-' + - byteToHex[arr[offset + 4]] + - byteToHex[arr[offset + 5]] + - '-' + - byteToHex[arr[offset + 6]] + - byteToHex[arr[offset + 7]] + - '-' + - byteToHex[arr[offset + 8]] + - byteToHex[arr[offset + 9]] + - '-' + - byteToHex[arr[offset + 10]] + - byteToHex[arr[offset + 11]] + - byteToHex[arr[offset + 12]] + - byteToHex[arr[offset + 13]] + - byteToHex[arr[offset + 14]] + - byteToHex[arr[offset + 15]]).toLowerCase(); -} -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); - if (!validate(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - return uuid; -} -export default stringify; diff --git a/node_modules/uuid/dist-node/types.js b/node_modules/uuid/dist-node/types.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/uuid/dist-node/types.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/uuid/dist-node/uuid-bin.js b/node_modules/uuid/dist-node/uuid-bin.js deleted file mode 100644 index aa4d4ac..0000000 --- a/node_modules/uuid/dist-node/uuid-bin.js +++ /dev/null @@ -1,70 +0,0 @@ -import * as assert from 'node:assert/strict'; -import v1 from './v1.js'; -import v3 from './v3.js'; -import v4 from './v4.js'; -import v5 from './v5.js'; -import v6 from './v6.js'; -import v7 from './v7.js'; -function usage() { - console.log('Usage:'); - console.log(' uuid'); - console.log(' uuid v1'); - console.log(' uuid v3 '); - console.log(' uuid v4'); - console.log(' uuid v5 '); - console.log(' uuid v6'); - console.log(' uuid v7'); - console.log(' uuid --help'); - console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC9562'); -} -const args = process.argv.slice(2); -if (args.indexOf('--help') >= 0) { - usage(); - process.exit(0); -} -const version = args.shift() || 'v4'; -switch (version) { - case 'v1': - console.log(v1()); - break; - case 'v3': { - const name = args.shift(); - let namespace = args.shift(); - assert.ok(name != null, 'v3 name not specified'); - assert.ok(namespace != null, 'v3 namespace not specified'); - if (namespace === 'URL') { - namespace = v3.URL; - } - if (namespace === 'DNS') { - namespace = v3.DNS; - } - console.log(v3(name, namespace)); - break; - } - case 'v4': - console.log(v4()); - break; - case 'v5': { - const name = args.shift(); - let namespace = args.shift(); - assert.ok(name != null, 'v5 name not specified'); - assert.ok(namespace != null, 'v5 namespace not specified'); - if (namespace === 'URL') { - namespace = v5.URL; - } - if (namespace === 'DNS') { - namespace = v5.DNS; - } - console.log(v5(name, namespace)); - break; - } - case 'v6': - console.log(v6()); - break; - case 'v7': - console.log(v7()); - break; - default: - usage(); - process.exit(1); -} diff --git a/node_modules/uuid/dist-node/v1.js b/node_modules/uuid/dist-node/v1.js deleted file mode 100644 index 65e3f68..0000000 --- a/node_modules/uuid/dist-node/v1.js +++ /dev/null @@ -1,83 +0,0 @@ -import rng from './rng.js'; -import { unsafeStringify } from './stringify.js'; -const _state = {}; -function v1(options, buf, offset) { - let bytes; - const isV6 = options?._v6 ?? false; - if (options) { - const optionsKeys = Object.keys(options); - if (optionsKeys.length === 1 && optionsKeys[0] === '_v6') { - options = undefined; - } - } - if (options) { - bytes = v1Bytes(options.random ?? options.rng?.() ?? rng(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset); - } - else { - const now = Date.now(); - const rnds = rng(); - updateV1State(_state, now, rnds); - bytes = v1Bytes(rnds, _state.msecs, _state.nsecs, isV6 ? undefined : _state.clockseq, isV6 ? undefined : _state.node, buf, offset); - } - return buf ?? unsafeStringify(bytes); -} -export function updateV1State(state, now, rnds) { - state.msecs ??= -Infinity; - state.nsecs ??= 0; - if (now === state.msecs) { - state.nsecs++; - if (state.nsecs >= 10000) { - state.node = undefined; - state.nsecs = 0; - } - } - else if (now > state.msecs) { - state.nsecs = 0; - } - else if (now < state.msecs) { - state.node = undefined; - } - if (!state.node) { - state.node = rnds.slice(10, 16); - state.node[0] |= 0x01; - state.clockseq = ((rnds[8] << 8) | rnds[9]) & 0x3fff; - } - state.msecs = now; - return state; -} -function v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) { - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - if (!buf) { - buf = new Uint8Array(16); - offset = 0; - } - else { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - } - msecs ??= Date.now(); - nsecs ??= 0; - clockseq ??= ((rnds[8] << 8) | rnds[9]) & 0x3fff; - node ??= rnds.slice(10, 16); - msecs += 12219292800000; - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - buf[offset++] = (tl >>> 24) & 0xff; - buf[offset++] = (tl >>> 16) & 0xff; - buf[offset++] = (tl >>> 8) & 0xff; - buf[offset++] = tl & 0xff; - const tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff; - buf[offset++] = (tmh >>> 8) & 0xff; - buf[offset++] = tmh & 0xff; - buf[offset++] = ((tmh >>> 24) & 0xf) | 0x10; - buf[offset++] = (tmh >>> 16) & 0xff; - buf[offset++] = (clockseq >>> 8) | 0x80; - buf[offset++] = clockseq & 0xff; - for (let n = 0; n < 6; ++n) { - buf[offset++] = node[n]; - } - return buf; -} -export default v1; diff --git a/node_modules/uuid/dist-node/v1ToV6.js b/node_modules/uuid/dist-node/v1ToV6.js deleted file mode 100644 index da0f763..0000000 --- a/node_modules/uuid/dist-node/v1ToV6.js +++ /dev/null @@ -1,10 +0,0 @@ -import parse from './parse.js'; -import { unsafeStringify } from './stringify.js'; -export default function v1ToV6(uuid) { - const v1Bytes = typeof uuid === 'string' ? parse(uuid) : uuid; - const v6Bytes = _v1ToV6(v1Bytes); - return typeof uuid === 'string' ? unsafeStringify(v6Bytes) : v6Bytes; -} -function _v1ToV6(v1Bytes) { - return Uint8Array.of(((v1Bytes[6] & 0x0f) << 4) | ((v1Bytes[7] >> 4) & 0x0f), ((v1Bytes[7] & 0x0f) << 4) | ((v1Bytes[4] & 0xf0) >> 4), ((v1Bytes[4] & 0x0f) << 4) | ((v1Bytes[5] & 0xf0) >> 4), ((v1Bytes[5] & 0x0f) << 4) | ((v1Bytes[0] & 0xf0) >> 4), ((v1Bytes[0] & 0x0f) << 4) | ((v1Bytes[1] & 0xf0) >> 4), ((v1Bytes[1] & 0x0f) << 4) | ((v1Bytes[2] & 0xf0) >> 4), 0x60 | (v1Bytes[2] & 0x0f), v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]); -} diff --git a/node_modules/uuid/dist-node/v3.js b/node_modules/uuid/dist-node/v3.js deleted file mode 100644 index b5c3781..0000000 --- a/node_modules/uuid/dist-node/v3.js +++ /dev/null @@ -1,9 +0,0 @@ -import md5 from './md5.js'; -import v35, { DNS, URL } from './v35.js'; -export { DNS, URL } from './v35.js'; -function v3(value, namespace, buf, offset) { - return v35(0x30, md5, value, namespace, buf, offset); -} -v3.DNS = DNS; -v3.URL = URL; -export default v3; diff --git a/node_modules/uuid/dist-node/v35.js b/node_modules/uuid/dist-node/v35.js deleted file mode 100644 index 8c5fc66..0000000 --- a/node_modules/uuid/dist-node/v35.js +++ /dev/null @@ -1,39 +0,0 @@ -import parse from './parse.js'; -import { unsafeStringify } from './stringify.js'; -export function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); - const bytes = new Uint8Array(str.length); - for (let i = 0; i < str.length; ++i) { - bytes[i] = str.charCodeAt(i); - } - return bytes; -} -export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -export default function v35(version, hash, value, namespace, buf, offset) { - const valueBytes = typeof value === 'string' ? stringToBytes(value) : value; - const namespaceBytes = typeof namespace === 'string' ? parse(namespace) : namespace; - if (typeof namespace === 'string') { - namespace = parse(namespace); - } - if (namespace?.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } - let bytes = new Uint8Array(16 + valueBytes.length); - bytes.set(namespaceBytes); - bytes.set(valueBytes, namespaceBytes.length); - bytes = hash(bytes); - bytes[6] = (bytes[6] & 0x0f) | version; - bytes[8] = (bytes[8] & 0x3f) | 0x80; - if (buf) { - offset ??= 0; - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return unsafeStringify(bytes); -} diff --git a/node_modules/uuid/dist-node/v4.js b/node_modules/uuid/dist-node/v4.js deleted file mode 100644 index b3017c9..0000000 --- a/node_modules/uuid/dist-node/v4.js +++ /dev/null @@ -1,29 +0,0 @@ -import rng from './rng.js'; -import { unsafeStringify } from './stringify.js'; -function v4(options, buf, offset) { - if (!buf && !options && crypto.randomUUID) { - return crypto.randomUUID(); - } - return _v4(options, buf, offset); -} -function _v4(options, buf, offset) { - options = options || {}; - const rnds = options.random ?? options.rng?.() ?? rng(); - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - if (buf) { - offset = offset || 0; - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - return buf; - } - return unsafeStringify(rnds); -} -export default v4; diff --git a/node_modules/uuid/dist-node/v5.js b/node_modules/uuid/dist-node/v5.js deleted file mode 100644 index bd470a4..0000000 --- a/node_modules/uuid/dist-node/v5.js +++ /dev/null @@ -1,9 +0,0 @@ -import sha1 from './sha1.js'; -import v35, { DNS, URL } from './v35.js'; -export { DNS, URL } from './v35.js'; -function v5(value, namespace, buf, offset) { - return v35(0x50, sha1, value, namespace, buf, offset); -} -v5.DNS = DNS; -v5.URL = URL; -export default v5; diff --git a/node_modules/uuid/dist-node/v6.js b/node_modules/uuid/dist-node/v6.js deleted file mode 100644 index bd1fc35..0000000 --- a/node_modules/uuid/dist-node/v6.js +++ /dev/null @@ -1,20 +0,0 @@ -import { unsafeStringify } from './stringify.js'; -import v1 from './v1.js'; -import v1ToV6 from './v1ToV6.js'; -function v6(options, buf, offset) { - options ??= {}; - offset ??= 0; - let bytes = v1({ ...options, _v6: true }, new Uint8Array(16)); - bytes = v1ToV6(bytes); - if (buf) { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; i++) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return unsafeStringify(bytes); -} -export default v6; diff --git a/node_modules/uuid/dist-node/v6ToV1.js b/node_modules/uuid/dist-node/v6ToV1.js deleted file mode 100644 index bfd942f..0000000 --- a/node_modules/uuid/dist-node/v6ToV1.js +++ /dev/null @@ -1,10 +0,0 @@ -import parse from './parse.js'; -import { unsafeStringify } from './stringify.js'; -export default function v6ToV1(uuid) { - const v6Bytes = typeof uuid === 'string' ? parse(uuid) : uuid; - const v1Bytes = _v6ToV1(v6Bytes); - return typeof uuid === 'string' ? unsafeStringify(v1Bytes) : v1Bytes; -} -function _v6ToV1(v6Bytes) { - return Uint8Array.of(((v6Bytes[3] & 0x0f) << 4) | ((v6Bytes[4] >> 4) & 0x0f), ((v6Bytes[4] & 0x0f) << 4) | ((v6Bytes[5] & 0xf0) >> 4), ((v6Bytes[5] & 0x0f) << 4) | (v6Bytes[6] & 0x0f), v6Bytes[7], ((v6Bytes[1] & 0x0f) << 4) | ((v6Bytes[2] & 0xf0) >> 4), ((v6Bytes[2] & 0x0f) << 4) | ((v6Bytes[3] & 0xf0) >> 4), 0x10 | ((v6Bytes[0] & 0xf0) >> 4), ((v6Bytes[0] & 0x0f) << 4) | ((v6Bytes[1] & 0xf0) >> 4), v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]); -} diff --git a/node_modules/uuid/dist-node/v7.js b/node_modules/uuid/dist-node/v7.js deleted file mode 100644 index 276c9bf..0000000 --- a/node_modules/uuid/dist-node/v7.js +++ /dev/null @@ -1,65 +0,0 @@ -import rng from './rng.js'; -import { unsafeStringify } from './stringify.js'; -const _state = {}; -function v7(options, buf, offset) { - let bytes; - if (options) { - bytes = v7Bytes(options.random ?? options.rng?.() ?? rng(), options.msecs, options.seq, buf, offset); - } - else { - const now = Date.now(); - const rnds = rng(); - updateV7State(_state, now, rnds); - bytes = v7Bytes(rnds, _state.msecs, _state.seq, buf, offset); - } - return buf ?? unsafeStringify(bytes); -} -export function updateV7State(state, now, rnds) { - state.msecs ??= -Infinity; - state.seq ??= 0; - if (now > state.msecs) { - state.seq = (rnds[6] << 23) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9]; - state.msecs = now; - } - else { - state.seq = (state.seq + 1) | 0; - if (state.seq === 0) { - state.msecs++; - } - } - return state; -} -function v7Bytes(rnds, msecs, seq, buf, offset = 0) { - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - if (!buf) { - buf = new Uint8Array(16); - offset = 0; - } - else { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - } - msecs ??= Date.now(); - seq ??= ((rnds[6] * 0x7f) << 24) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9]; - buf[offset++] = (msecs / 0x10000000000) & 0xff; - buf[offset++] = (msecs / 0x100000000) & 0xff; - buf[offset++] = (msecs / 0x1000000) & 0xff; - buf[offset++] = (msecs / 0x10000) & 0xff; - buf[offset++] = (msecs / 0x100) & 0xff; - buf[offset++] = msecs & 0xff; - buf[offset++] = 0x70 | ((seq >>> 28) & 0x0f); - buf[offset++] = (seq >>> 20) & 0xff; - buf[offset++] = 0x80 | ((seq >>> 14) & 0x3f); - buf[offset++] = (seq >>> 6) & 0xff; - buf[offset++] = ((seq << 2) & 0xff) | (rnds[10] & 0x03); - buf[offset++] = rnds[11]; - buf[offset++] = rnds[12]; - buf[offset++] = rnds[13]; - buf[offset++] = rnds[14]; - buf[offset++] = rnds[15]; - return buf; -} -export default v7; diff --git a/node_modules/uuid/dist-node/validate.js b/node_modules/uuid/dist-node/validate.js deleted file mode 100644 index 444a1a2..0000000 --- a/node_modules/uuid/dist-node/validate.js +++ /dev/null @@ -1,5 +0,0 @@ -import REGEX from './regex.js'; -function validate(uuid) { - return typeof uuid === 'string' && REGEX.test(uuid); -} -export default validate; diff --git a/node_modules/uuid/dist-node/version.js b/node_modules/uuid/dist-node/version.js deleted file mode 100644 index bae91d3..0000000 --- a/node_modules/uuid/dist-node/version.js +++ /dev/null @@ -1,8 +0,0 @@ -import validate from './validate.js'; -function version(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - return parseInt(uuid.slice(14, 15), 16); -} -export default version; diff --git a/node_modules/uuid/dist/index.d.ts b/node_modules/uuid/dist/index.d.ts deleted file mode 100644 index b01542d..0000000 --- a/node_modules/uuid/dist/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export { default as MAX } from './max.js'; -export { default as NIL } from './nil.js'; -export { default as parse } from './parse.js'; -export { default as stringify } from './stringify.js'; -export type * from './types.js'; -export { default as v1 } from './v1.js'; -export { default as v1ToV6 } from './v1ToV6.js'; -export { default as v3 } from './v3.js'; -export { default as v4 } from './v4.js'; -export { default as v5 } from './v5.js'; -export { default as v6 } from './v6.js'; -export { default as v6ToV1 } from './v6ToV1.js'; -export { default as v7 } from './v7.js'; -export { default as validate } from './validate.js'; -export { default as version } from './version.js'; diff --git a/node_modules/uuid/dist/index.js b/node_modules/uuid/dist/index.js deleted file mode 100644 index 3193e9a..0000000 --- a/node_modules/uuid/dist/index.js +++ /dev/null @@ -1,14 +0,0 @@ -export { default as MAX } from './max.js'; -export { default as NIL } from './nil.js'; -export { default as parse } from './parse.js'; -export { default as stringify } from './stringify.js'; -export { default as v1 } from './v1.js'; -export { default as v1ToV6 } from './v1ToV6.js'; -export { default as v3 } from './v3.js'; -export { default as v4 } from './v4.js'; -export { default as v5 } from './v5.js'; -export { default as v6 } from './v6.js'; -export { default as v6ToV1 } from './v6ToV1.js'; -export { default as v7 } from './v7.js'; -export { default as validate } from './validate.js'; -export { default as version } from './version.js'; diff --git a/node_modules/uuid/dist/max.d.ts b/node_modules/uuid/dist/max.d.ts deleted file mode 100644 index 7a1e972..0000000 --- a/node_modules/uuid/dist/max.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "ffffffff-ffff-ffff-ffff-ffffffffffff"; -export default _default; diff --git a/node_modules/uuid/dist/max.js b/node_modules/uuid/dist/max.js deleted file mode 100644 index 58951f6..0000000 --- a/node_modules/uuid/dist/max.js +++ /dev/null @@ -1 +0,0 @@ -export default 'ffffffff-ffff-ffff-ffff-ffffffffffff'; diff --git a/node_modules/uuid/dist/md5.d.ts b/node_modules/uuid/dist/md5.d.ts deleted file mode 100644 index 5a55f51..0000000 --- a/node_modules/uuid/dist/md5.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function md5(bytes: Uint8Array): Uint8Array; -export default md5; diff --git a/node_modules/uuid/dist/md5.js b/node_modules/uuid/dist/md5.js deleted file mode 100644 index 053301d..0000000 --- a/node_modules/uuid/dist/md5.js +++ /dev/null @@ -1,135 +0,0 @@ -function md5(bytes) { - const words = uint8ToUint32(bytes); - const md5Bytes = wordsToMd5(words, bytes.length * 8); - return uint32ToUint8(md5Bytes); -} -function uint32ToUint8(input) { - const bytes = new Uint8Array(input.length * 4); - for (let i = 0; i < input.length * 4; i++) { - bytes[i] = (input[i >> 2] >>> ((i % 4) * 8)) & 0xff; - } - return bytes; -} -function getOutputLength(inputLength8) { - return (((inputLength8 + 64) >>> 9) << 4) + 14 + 1; -} -function wordsToMd5(x, len) { - const xpad = new Uint32Array(getOutputLength(len)).fill(0); - xpad.set(x); - xpad[len >> 5] |= 0x80 << (len % 32); - xpad[xpad.length - 1] = len; - x = xpad; - let a = 1732584193; - let b = -271733879; - let c = -1732584194; - let d = 271733878; - for (let i = 0; i < x.length; i += 16) { - const olda = a; - const oldb = b; - const oldc = c; - const oldd = d; - a = md5ff(a, b, c, d, x[i], 7, -680876936); - d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); - c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); - b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); - a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); - d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); - c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); - b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); - a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); - d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); - c = md5ff(c, d, a, b, x[i + 10], 17, -42063); - b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); - a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); - d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); - c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); - b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); - a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); - d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); - c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); - b = md5gg(b, c, d, a, x[i], 20, -373897302); - a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); - d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); - c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); - b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); - a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); - d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); - c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); - b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); - a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); - d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); - c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); - b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); - a = md5hh(a, b, c, d, x[i + 5], 4, -378558); - d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); - c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); - b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); - a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); - d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); - c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); - b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); - a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); - d = md5hh(d, a, b, c, x[i], 11, -358537222); - c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); - b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); - a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); - d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); - c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); - b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); - a = md5ii(a, b, c, d, x[i], 6, -198630844); - d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); - c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); - b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); - a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); - d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); - c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); - b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); - a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); - d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); - c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); - b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); - a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); - d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); - c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); - b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); - a = safeAdd(a, olda); - b = safeAdd(b, oldb); - c = safeAdd(c, oldc); - d = safeAdd(d, oldd); - } - return Uint32Array.of(a, b, c, d); -} -function uint8ToUint32(input) { - if (input.length === 0) { - return new Uint32Array(); - } - const output = new Uint32Array(getOutputLength(input.length * 8)).fill(0); - for (let i = 0; i < input.length; i++) { - output[i >> 2] |= (input[i] & 0xff) << ((i % 4) * 8); - } - return output; -} -function safeAdd(x, y) { - const lsw = (x & 0xffff) + (y & 0xffff); - const msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xffff); -} -function bitRotateLeft(num, cnt) { - return (num << cnt) | (num >>> (32 - cnt)); -} -function md5cmn(q, a, b, x, s, t) { - return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); -} -function md5ff(a, b, c, d, x, s, t) { - return md5cmn((b & c) | (~b & d), a, b, x, s, t); -} -function md5gg(a, b, c, d, x, s, t) { - return md5cmn((b & d) | (c & ~d), a, b, x, s, t); -} -function md5hh(a, b, c, d, x, s, t) { - return md5cmn(b ^ c ^ d, a, b, x, s, t); -} -function md5ii(a, b, c, d, x, s, t) { - return md5cmn(c ^ (b | ~d), a, b, x, s, t); -} -export default md5; diff --git a/node_modules/uuid/dist/nil.d.ts b/node_modules/uuid/dist/nil.d.ts deleted file mode 100644 index b03bb98..0000000 --- a/node_modules/uuid/dist/nil.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "00000000-0000-0000-0000-000000000000"; -export default _default; diff --git a/node_modules/uuid/dist/nil.js b/node_modules/uuid/dist/nil.js deleted file mode 100644 index de6f830..0000000 --- a/node_modules/uuid/dist/nil.js +++ /dev/null @@ -1 +0,0 @@ -export default '00000000-0000-0000-0000-000000000000'; diff --git a/node_modules/uuid/dist/parse.d.ts b/node_modules/uuid/dist/parse.d.ts deleted file mode 100644 index e2e31ac..0000000 --- a/node_modules/uuid/dist/parse.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { NonSharedArrayBuffer } from './types.js'; -declare function parse(uuid: string): NonSharedArrayBuffer; -export default parse; diff --git a/node_modules/uuid/dist/parse.js b/node_modules/uuid/dist/parse.js deleted file mode 100644 index 64ac401..0000000 --- a/node_modules/uuid/dist/parse.js +++ /dev/null @@ -1,9 +0,0 @@ -import validate from './validate.js'; -function parse(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - let v; - return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 0xff, ((v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000) & 0xff, (v / 0x100000000) & 0xff, (v >>> 24) & 0xff, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff); -} -export default parse; diff --git a/node_modules/uuid/dist/regex.d.ts b/node_modules/uuid/dist/regex.d.ts deleted file mode 100644 index d39fa3f..0000000 --- a/node_modules/uuid/dist/regex.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: RegExp; -export default _default; diff --git a/node_modules/uuid/dist/regex.js b/node_modules/uuid/dist/regex.js deleted file mode 100644 index 3e38591..0000000 --- a/node_modules/uuid/dist/regex.js +++ /dev/null @@ -1 +0,0 @@ -export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i; diff --git a/node_modules/uuid/dist/rng.d.ts b/node_modules/uuid/dist/rng.d.ts deleted file mode 100644 index 73e60cf..0000000 --- a/node_modules/uuid/dist/rng.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function rng(): Uint8Array; diff --git a/node_modules/uuid/dist/rng.js b/node_modules/uuid/dist/rng.js deleted file mode 100644 index 0511e89..0000000 --- a/node_modules/uuid/dist/rng.js +++ /dev/null @@ -1,4 +0,0 @@ -const rnds8 = new Uint8Array(16); -export default function rng() { - return crypto.getRandomValues(rnds8); -} diff --git a/node_modules/uuid/dist/sha1.d.ts b/node_modules/uuid/dist/sha1.d.ts deleted file mode 100644 index a6552e5..0000000 --- a/node_modules/uuid/dist/sha1.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function sha1(bytes: Uint8Array): Uint8Array; -export default sha1; diff --git a/node_modules/uuid/dist/sha1.js b/node_modules/uuid/dist/sha1.js deleted file mode 100644 index e0acfe3..0000000 --- a/node_modules/uuid/dist/sha1.js +++ /dev/null @@ -1,70 +0,0 @@ -function f(s, x, y, z) { - switch (s) { - case 0: - return (x & y) ^ (~x & z); - case 1: - return x ^ y ^ z; - case 2: - return (x & y) ^ (x & z) ^ (y & z); - case 3: - return x ^ y ^ z; - } -} -function ROTL(x, n) { - return (x << n) | (x >>> (32 - n)); -} -function sha1(bytes) { - const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; - const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; - const newBytes = new Uint8Array(bytes.length + 1); - newBytes.set(bytes); - newBytes[bytes.length] = 0x80; - bytes = newBytes; - const l = bytes.length / 4 + 2; - const N = Math.ceil(l / 16); - const M = new Array(N); - for (let i = 0; i < N; ++i) { - const arr = new Uint32Array(16); - for (let j = 0; j < 16; ++j) { - arr[j] = - (bytes[i * 64 + j * 4] << 24) | - (bytes[i * 64 + j * 4 + 1] << 16) | - (bytes[i * 64 + j * 4 + 2] << 8) | - bytes[i * 64 + j * 4 + 3]; - } - M[i] = arr; - } - M[N - 1][14] = ((bytes.length - 1) * 8) / 2 ** 32; - M[N - 1][14] = Math.floor(M[N - 1][14]); - M[N - 1][15] = ((bytes.length - 1) * 8) & 0xffffffff; - for (let i = 0; i < N; ++i) { - const W = new Uint32Array(80); - for (let t = 0; t < 16; ++t) { - W[t] = M[i][t]; - } - for (let t = 16; t < 80; ++t) { - W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1); - } - let a = H[0]; - let b = H[1]; - let c = H[2]; - let d = H[3]; - let e = H[4]; - for (let t = 0; t < 80; ++t) { - const s = Math.floor(t / 20); - const T = (ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t]) >>> 0; - e = d; - d = c; - c = ROTL(b, 30) >>> 0; - b = a; - a = T; - } - H[0] = (H[0] + a) >>> 0; - H[1] = (H[1] + b) >>> 0; - H[2] = (H[2] + c) >>> 0; - H[3] = (H[3] + d) >>> 0; - H[4] = (H[4] + e) >>> 0; - } - return Uint8Array.of(H[0] >> 24, H[0] >> 16, H[0] >> 8, H[0], H[1] >> 24, H[1] >> 16, H[1] >> 8, H[1], H[2] >> 24, H[2] >> 16, H[2] >> 8, H[2], H[3] >> 24, H[3] >> 16, H[3] >> 8, H[3], H[4] >> 24, H[4] >> 16, H[4] >> 8, H[4]); -} -export default sha1; diff --git a/node_modules/uuid/dist/stringify.d.ts b/node_modules/uuid/dist/stringify.d.ts deleted file mode 100644 index 16cb008..0000000 --- a/node_modules/uuid/dist/stringify.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare function unsafeStringify(arr: Uint8Array, offset?: number): string; -declare function stringify(arr: Uint8Array, offset?: number): string; -export default stringify; diff --git a/node_modules/uuid/dist/stringify.js b/node_modules/uuid/dist/stringify.js deleted file mode 100644 index 962738c..0000000 --- a/node_modules/uuid/dist/stringify.js +++ /dev/null @@ -1,35 +0,0 @@ -import validate from './validate.js'; -const byteToHex = []; -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} -export function unsafeStringify(arr, offset = 0) { - return (byteToHex[arr[offset + 0]] + - byteToHex[arr[offset + 1]] + - byteToHex[arr[offset + 2]] + - byteToHex[arr[offset + 3]] + - '-' + - byteToHex[arr[offset + 4]] + - byteToHex[arr[offset + 5]] + - '-' + - byteToHex[arr[offset + 6]] + - byteToHex[arr[offset + 7]] + - '-' + - byteToHex[arr[offset + 8]] + - byteToHex[arr[offset + 9]] + - '-' + - byteToHex[arr[offset + 10]] + - byteToHex[arr[offset + 11]] + - byteToHex[arr[offset + 12]] + - byteToHex[arr[offset + 13]] + - byteToHex[arr[offset + 14]] + - byteToHex[arr[offset + 15]]).toLowerCase(); -} -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); - if (!validate(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - return uuid; -} -export default stringify; diff --git a/node_modules/uuid/dist/types.d.ts b/node_modules/uuid/dist/types.d.ts deleted file mode 100644 index 3d276b5..0000000 --- a/node_modules/uuid/dist/types.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export type UUIDTypes = string | TBuf; -export type Version1Options = { - node?: Uint8Array; - clockseq?: number; - random?: Uint8Array; - rng?: () => Uint8Array; - msecs?: number; - nsecs?: number; - _v6?: boolean; -}; -export type Version4Options = { - random?: Uint8Array; - rng?: () => Uint8Array; -}; -export type Version6Options = Version1Options; -export type Version7Options = { - random?: Uint8Array; - msecs?: number; - seq?: number; - rng?: () => Uint8Array; -}; -export type NonSharedArrayBuffer = ReturnType; diff --git a/node_modules/uuid/dist/types.js b/node_modules/uuid/dist/types.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/uuid/dist/types.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/uuid/dist/uuid-bin.d.ts b/node_modules/uuid/dist/uuid-bin.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/uuid/dist/uuid-bin.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/uuid/dist/uuid-bin.js b/node_modules/uuid/dist/uuid-bin.js deleted file mode 100644 index aa4d4ac..0000000 --- a/node_modules/uuid/dist/uuid-bin.js +++ /dev/null @@ -1,70 +0,0 @@ -import * as assert from 'node:assert/strict'; -import v1 from './v1.js'; -import v3 from './v3.js'; -import v4 from './v4.js'; -import v5 from './v5.js'; -import v6 from './v6.js'; -import v7 from './v7.js'; -function usage() { - console.log('Usage:'); - console.log(' uuid'); - console.log(' uuid v1'); - console.log(' uuid v3 '); - console.log(' uuid v4'); - console.log(' uuid v5 '); - console.log(' uuid v6'); - console.log(' uuid v7'); - console.log(' uuid --help'); - console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC9562'); -} -const args = process.argv.slice(2); -if (args.indexOf('--help') >= 0) { - usage(); - process.exit(0); -} -const version = args.shift() || 'v4'; -switch (version) { - case 'v1': - console.log(v1()); - break; - case 'v3': { - const name = args.shift(); - let namespace = args.shift(); - assert.ok(name != null, 'v3 name not specified'); - assert.ok(namespace != null, 'v3 namespace not specified'); - if (namespace === 'URL') { - namespace = v3.URL; - } - if (namespace === 'DNS') { - namespace = v3.DNS; - } - console.log(v3(name, namespace)); - break; - } - case 'v4': - console.log(v4()); - break; - case 'v5': { - const name = args.shift(); - let namespace = args.shift(); - assert.ok(name != null, 'v5 name not specified'); - assert.ok(namespace != null, 'v5 namespace not specified'); - if (namespace === 'URL') { - namespace = v5.URL; - } - if (namespace === 'DNS') { - namespace = v5.DNS; - } - console.log(v5(name, namespace)); - break; - } - case 'v6': - console.log(v6()); - break; - case 'v7': - console.log(v7()); - break; - default: - usage(); - process.exit(1); -} diff --git a/node_modules/uuid/dist/v1.d.ts b/node_modules/uuid/dist/v1.d.ts deleted file mode 100644 index 6744f00..0000000 --- a/node_modules/uuid/dist/v1.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { Version1Options } from './types.js'; -type V1State = { - node?: Uint8Array; - clockseq?: number; - msecs?: number; - nsecs?: number; -}; -declare function v1(options?: Version1Options, buf?: undefined, offset?: number): string; -declare function v1(options: Version1Options | undefined, buf: Buf, offset?: number): Buf; -export declare function updateV1State(state: V1State, now: number, rnds: Uint8Array): V1State; -export default v1; diff --git a/node_modules/uuid/dist/v1.js b/node_modules/uuid/dist/v1.js deleted file mode 100644 index 65e3f68..0000000 --- a/node_modules/uuid/dist/v1.js +++ /dev/null @@ -1,83 +0,0 @@ -import rng from './rng.js'; -import { unsafeStringify } from './stringify.js'; -const _state = {}; -function v1(options, buf, offset) { - let bytes; - const isV6 = options?._v6 ?? false; - if (options) { - const optionsKeys = Object.keys(options); - if (optionsKeys.length === 1 && optionsKeys[0] === '_v6') { - options = undefined; - } - } - if (options) { - bytes = v1Bytes(options.random ?? options.rng?.() ?? rng(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset); - } - else { - const now = Date.now(); - const rnds = rng(); - updateV1State(_state, now, rnds); - bytes = v1Bytes(rnds, _state.msecs, _state.nsecs, isV6 ? undefined : _state.clockseq, isV6 ? undefined : _state.node, buf, offset); - } - return buf ?? unsafeStringify(bytes); -} -export function updateV1State(state, now, rnds) { - state.msecs ??= -Infinity; - state.nsecs ??= 0; - if (now === state.msecs) { - state.nsecs++; - if (state.nsecs >= 10000) { - state.node = undefined; - state.nsecs = 0; - } - } - else if (now > state.msecs) { - state.nsecs = 0; - } - else if (now < state.msecs) { - state.node = undefined; - } - if (!state.node) { - state.node = rnds.slice(10, 16); - state.node[0] |= 0x01; - state.clockseq = ((rnds[8] << 8) | rnds[9]) & 0x3fff; - } - state.msecs = now; - return state; -} -function v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) { - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - if (!buf) { - buf = new Uint8Array(16); - offset = 0; - } - else { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - } - msecs ??= Date.now(); - nsecs ??= 0; - clockseq ??= ((rnds[8] << 8) | rnds[9]) & 0x3fff; - node ??= rnds.slice(10, 16); - msecs += 12219292800000; - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - buf[offset++] = (tl >>> 24) & 0xff; - buf[offset++] = (tl >>> 16) & 0xff; - buf[offset++] = (tl >>> 8) & 0xff; - buf[offset++] = tl & 0xff; - const tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff; - buf[offset++] = (tmh >>> 8) & 0xff; - buf[offset++] = tmh & 0xff; - buf[offset++] = ((tmh >>> 24) & 0xf) | 0x10; - buf[offset++] = (tmh >>> 16) & 0xff; - buf[offset++] = (clockseq >>> 8) | 0x80; - buf[offset++] = clockseq & 0xff; - for (let n = 0; n < 6; ++n) { - buf[offset++] = node[n]; - } - return buf; -} -export default v1; diff --git a/node_modules/uuid/dist/v1ToV6.d.ts b/node_modules/uuid/dist/v1ToV6.d.ts deleted file mode 100644 index 67924d8..0000000 --- a/node_modules/uuid/dist/v1ToV6.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { NonSharedArrayBuffer } from './types.js'; -export default function v1ToV6(uuid: string): string; -export default function v1ToV6(uuid: Uint8Array): NonSharedArrayBuffer; diff --git a/node_modules/uuid/dist/v1ToV6.js b/node_modules/uuid/dist/v1ToV6.js deleted file mode 100644 index da0f763..0000000 --- a/node_modules/uuid/dist/v1ToV6.js +++ /dev/null @@ -1,10 +0,0 @@ -import parse from './parse.js'; -import { unsafeStringify } from './stringify.js'; -export default function v1ToV6(uuid) { - const v1Bytes = typeof uuid === 'string' ? parse(uuid) : uuid; - const v6Bytes = _v1ToV6(v1Bytes); - return typeof uuid === 'string' ? unsafeStringify(v6Bytes) : v6Bytes; -} -function _v1ToV6(v1Bytes) { - return Uint8Array.of(((v1Bytes[6] & 0x0f) << 4) | ((v1Bytes[7] >> 4) & 0x0f), ((v1Bytes[7] & 0x0f) << 4) | ((v1Bytes[4] & 0xf0) >> 4), ((v1Bytes[4] & 0x0f) << 4) | ((v1Bytes[5] & 0xf0) >> 4), ((v1Bytes[5] & 0x0f) << 4) | ((v1Bytes[0] & 0xf0) >> 4), ((v1Bytes[0] & 0x0f) << 4) | ((v1Bytes[1] & 0xf0) >> 4), ((v1Bytes[1] & 0x0f) << 4) | ((v1Bytes[2] & 0xf0) >> 4), 0x60 | (v1Bytes[2] & 0x0f), v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]); -} diff --git a/node_modules/uuid/dist/v3.d.ts b/node_modules/uuid/dist/v3.d.ts deleted file mode 100644 index c4142c7..0000000 --- a/node_modules/uuid/dist/v3.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { UUIDTypes } from './types.js'; -export { DNS, URL } from './v35.js'; -declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string; -declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf: TBuf, offset?: number): TBuf; -declare namespace v3 { - var DNS: string; - var URL: string; -} -export default v3; diff --git a/node_modules/uuid/dist/v3.js b/node_modules/uuid/dist/v3.js deleted file mode 100644 index b5c3781..0000000 --- a/node_modules/uuid/dist/v3.js +++ /dev/null @@ -1,9 +0,0 @@ -import md5 from './md5.js'; -import v35, { DNS, URL } from './v35.js'; -export { DNS, URL } from './v35.js'; -function v3(value, namespace, buf, offset) { - return v35(0x30, md5, value, namespace, buf, offset); -} -v3.DNS = DNS; -v3.URL = URL; -export default v3; diff --git a/node_modules/uuid/dist/v35.d.ts b/node_modules/uuid/dist/v35.d.ts deleted file mode 100644 index 05d0fb5..0000000 --- a/node_modules/uuid/dist/v35.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { UUIDTypes } from './types.js'; -export declare function stringToBytes(str: string): Uint8Array; -export declare const DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; -export declare const URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; -type HashFunction = (bytes: Uint8Array) => Uint8Array; -export default function v35(version: 0x30 | 0x50, hash: HashFunction, value: string | Uint8Array, namespace: UUIDTypes, buf?: TBuf, offset?: number): UUIDTypes; -export {}; diff --git a/node_modules/uuid/dist/v35.js b/node_modules/uuid/dist/v35.js deleted file mode 100644 index 8c5fc66..0000000 --- a/node_modules/uuid/dist/v35.js +++ /dev/null @@ -1,39 +0,0 @@ -import parse from './parse.js'; -import { unsafeStringify } from './stringify.js'; -export function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); - const bytes = new Uint8Array(str.length); - for (let i = 0; i < str.length; ++i) { - bytes[i] = str.charCodeAt(i); - } - return bytes; -} -export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -export default function v35(version, hash, value, namespace, buf, offset) { - const valueBytes = typeof value === 'string' ? stringToBytes(value) : value; - const namespaceBytes = typeof namespace === 'string' ? parse(namespace) : namespace; - if (typeof namespace === 'string') { - namespace = parse(namespace); - } - if (namespace?.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } - let bytes = new Uint8Array(16 + valueBytes.length); - bytes.set(namespaceBytes); - bytes.set(valueBytes, namespaceBytes.length); - bytes = hash(bytes); - bytes[6] = (bytes[6] & 0x0f) | version; - bytes[8] = (bytes[8] & 0x3f) | 0x80; - if (buf) { - offset ??= 0; - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return unsafeStringify(bytes); -} diff --git a/node_modules/uuid/dist/v4.d.ts b/node_modules/uuid/dist/v4.d.ts deleted file mode 100644 index f131da7..0000000 --- a/node_modules/uuid/dist/v4.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { Version4Options } from './types.js'; -declare function v4(options?: Version4Options, buf?: undefined, offset?: number): string; -declare function v4(options: Version4Options | undefined, buf: TBuf, offset?: number): TBuf; -export default v4; diff --git a/node_modules/uuid/dist/v4.js b/node_modules/uuid/dist/v4.js deleted file mode 100644 index b3017c9..0000000 --- a/node_modules/uuid/dist/v4.js +++ /dev/null @@ -1,29 +0,0 @@ -import rng from './rng.js'; -import { unsafeStringify } from './stringify.js'; -function v4(options, buf, offset) { - if (!buf && !options && crypto.randomUUID) { - return crypto.randomUUID(); - } - return _v4(options, buf, offset); -} -function _v4(options, buf, offset) { - options = options || {}; - const rnds = options.random ?? options.rng?.() ?? rng(); - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - if (buf) { - offset = offset || 0; - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - return buf; - } - return unsafeStringify(rnds); -} -export default v4; diff --git a/node_modules/uuid/dist/v5.d.ts b/node_modules/uuid/dist/v5.d.ts deleted file mode 100644 index 3e7011e..0000000 --- a/node_modules/uuid/dist/v5.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { UUIDTypes } from './types.js'; -export { DNS, URL } from './v35.js'; -declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string; -declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf: TBuf, offset?: number): TBuf; -declare namespace v5 { - var DNS: string; - var URL: string; -} -export default v5; diff --git a/node_modules/uuid/dist/v5.js b/node_modules/uuid/dist/v5.js deleted file mode 100644 index bd470a4..0000000 --- a/node_modules/uuid/dist/v5.js +++ /dev/null @@ -1,9 +0,0 @@ -import sha1 from './sha1.js'; -import v35, { DNS, URL } from './v35.js'; -export { DNS, URL } from './v35.js'; -function v5(value, namespace, buf, offset) { - return v35(0x50, sha1, value, namespace, buf, offset); -} -v5.DNS = DNS; -v5.URL = URL; -export default v5; diff --git a/node_modules/uuid/dist/v6.d.ts b/node_modules/uuid/dist/v6.d.ts deleted file mode 100644 index 68f8e7c..0000000 --- a/node_modules/uuid/dist/v6.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { Version6Options } from './types.js'; -declare function v6(options?: Version6Options, buf?: undefined, offset?: number): string; -declare function v6(options: Version6Options | undefined, buf: TBuf, offset?: number): TBuf; -export default v6; diff --git a/node_modules/uuid/dist/v6.js b/node_modules/uuid/dist/v6.js deleted file mode 100644 index bd1fc35..0000000 --- a/node_modules/uuid/dist/v6.js +++ /dev/null @@ -1,20 +0,0 @@ -import { unsafeStringify } from './stringify.js'; -import v1 from './v1.js'; -import v1ToV6 from './v1ToV6.js'; -function v6(options, buf, offset) { - options ??= {}; - offset ??= 0; - let bytes = v1({ ...options, _v6: true }, new Uint8Array(16)); - bytes = v1ToV6(bytes); - if (buf) { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - for (let i = 0; i < 16; i++) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return unsafeStringify(bytes); -} -export default v6; diff --git a/node_modules/uuid/dist/v6ToV1.d.ts b/node_modules/uuid/dist/v6ToV1.d.ts deleted file mode 100644 index 3b3ffc2..0000000 --- a/node_modules/uuid/dist/v6ToV1.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default function v6ToV1(uuid: string): string; -export default function v6ToV1(uuid: Uint8Array): Uint8Array; diff --git a/node_modules/uuid/dist/v6ToV1.js b/node_modules/uuid/dist/v6ToV1.js deleted file mode 100644 index bfd942f..0000000 --- a/node_modules/uuid/dist/v6ToV1.js +++ /dev/null @@ -1,10 +0,0 @@ -import parse from './parse.js'; -import { unsafeStringify } from './stringify.js'; -export default function v6ToV1(uuid) { - const v6Bytes = typeof uuid === 'string' ? parse(uuid) : uuid; - const v1Bytes = _v6ToV1(v6Bytes); - return typeof uuid === 'string' ? unsafeStringify(v1Bytes) : v1Bytes; -} -function _v6ToV1(v6Bytes) { - return Uint8Array.of(((v6Bytes[3] & 0x0f) << 4) | ((v6Bytes[4] >> 4) & 0x0f), ((v6Bytes[4] & 0x0f) << 4) | ((v6Bytes[5] & 0xf0) >> 4), ((v6Bytes[5] & 0x0f) << 4) | (v6Bytes[6] & 0x0f), v6Bytes[7], ((v6Bytes[1] & 0x0f) << 4) | ((v6Bytes[2] & 0xf0) >> 4), ((v6Bytes[2] & 0x0f) << 4) | ((v6Bytes[3] & 0xf0) >> 4), 0x10 | ((v6Bytes[0] & 0xf0) >> 4), ((v6Bytes[0] & 0x0f) << 4) | ((v6Bytes[1] & 0xf0) >> 4), v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]); -} diff --git a/node_modules/uuid/dist/v7.d.ts b/node_modules/uuid/dist/v7.d.ts deleted file mode 100644 index f77dfca..0000000 --- a/node_modules/uuid/dist/v7.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Version7Options } from './types.js'; -type V7State = { - msecs?: number; - seq?: number; -}; -declare function v7(options?: Version7Options, buf?: undefined, offset?: number): string; -declare function v7(options: Version7Options | undefined, buf: TBuf, offset?: number): TBuf; -export declare function updateV7State(state: V7State, now: number, rnds: Uint8Array): V7State; -export default v7; diff --git a/node_modules/uuid/dist/v7.js b/node_modules/uuid/dist/v7.js deleted file mode 100644 index 276c9bf..0000000 --- a/node_modules/uuid/dist/v7.js +++ /dev/null @@ -1,65 +0,0 @@ -import rng from './rng.js'; -import { unsafeStringify } from './stringify.js'; -const _state = {}; -function v7(options, buf, offset) { - let bytes; - if (options) { - bytes = v7Bytes(options.random ?? options.rng?.() ?? rng(), options.msecs, options.seq, buf, offset); - } - else { - const now = Date.now(); - const rnds = rng(); - updateV7State(_state, now, rnds); - bytes = v7Bytes(rnds, _state.msecs, _state.seq, buf, offset); - } - return buf ?? unsafeStringify(bytes); -} -export function updateV7State(state, now, rnds) { - state.msecs ??= -Infinity; - state.seq ??= 0; - if (now > state.msecs) { - state.seq = (rnds[6] << 23) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9]; - state.msecs = now; - } - else { - state.seq = (state.seq + 1) | 0; - if (state.seq === 0) { - state.msecs++; - } - } - return state; -} -function v7Bytes(rnds, msecs, seq, buf, offset = 0) { - if (rnds.length < 16) { - throw new Error('Random bytes length must be >= 16'); - } - if (!buf) { - buf = new Uint8Array(16); - offset = 0; - } - else { - if (offset < 0 || offset + 16 > buf.length) { - throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`); - } - } - msecs ??= Date.now(); - seq ??= ((rnds[6] * 0x7f) << 24) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9]; - buf[offset++] = (msecs / 0x10000000000) & 0xff; - buf[offset++] = (msecs / 0x100000000) & 0xff; - buf[offset++] = (msecs / 0x1000000) & 0xff; - buf[offset++] = (msecs / 0x10000) & 0xff; - buf[offset++] = (msecs / 0x100) & 0xff; - buf[offset++] = msecs & 0xff; - buf[offset++] = 0x70 | ((seq >>> 28) & 0x0f); - buf[offset++] = (seq >>> 20) & 0xff; - buf[offset++] = 0x80 | ((seq >>> 14) & 0x3f); - buf[offset++] = (seq >>> 6) & 0xff; - buf[offset++] = ((seq << 2) & 0xff) | (rnds[10] & 0x03); - buf[offset++] = rnds[11]; - buf[offset++] = rnds[12]; - buf[offset++] = rnds[13]; - buf[offset++] = rnds[14]; - buf[offset++] = rnds[15]; - return buf; -} -export default v7; diff --git a/node_modules/uuid/dist/validate.d.ts b/node_modules/uuid/dist/validate.d.ts deleted file mode 100644 index 57da03d..0000000 --- a/node_modules/uuid/dist/validate.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function validate(uuid: unknown): boolean; -export default validate; diff --git a/node_modules/uuid/dist/validate.js b/node_modules/uuid/dist/validate.js deleted file mode 100644 index 444a1a2..0000000 --- a/node_modules/uuid/dist/validate.js +++ /dev/null @@ -1,5 +0,0 @@ -import REGEX from './regex.js'; -function validate(uuid) { - return typeof uuid === 'string' && REGEX.test(uuid); -} -export default validate; diff --git a/node_modules/uuid/dist/version.d.ts b/node_modules/uuid/dist/version.d.ts deleted file mode 100644 index f1948dc..0000000 --- a/node_modules/uuid/dist/version.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function version(uuid: string): number; -export default version; diff --git a/node_modules/uuid/dist/version.js b/node_modules/uuid/dist/version.js deleted file mode 100644 index bae91d3..0000000 --- a/node_modules/uuid/dist/version.js +++ /dev/null @@ -1,8 +0,0 @@ -import validate from './validate.js'; -function version(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - return parseInt(uuid.slice(14, 15), 16); -} -export default version; diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json deleted file mode 100644 index 7bcefdc..0000000 --- a/node_modules/uuid/package.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "name": "uuid", - "version": "14.0.0", - "description": "RFC9562 UUIDs", - "type": "module", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "keywords": [ - "uuid", - "guid", - "rfc4122", - "rfc9562" - ], - "license": "MIT", - "bin": { - "uuid": "./dist-node/bin/uuid" - }, - "sideEffects": false, - "types": "./dist/index.d.ts", - "exports": { - ".": { - "node": "./dist-node/index.js", - "default": "./dist/index.js" - }, - "./package.json": "./package.json" - }, - "files": [ - "dist", - "dist-node", - "!**/test" - ], - "devDependencies": { - "@biomejs/biome": "2.4.10", - "@commitlint/cli": "20.5.0", - "@commitlint/config-conventional": "20.5.0", - "bundlewatch": "0.4.1", - "commander": "14.0.3", - "globals": "17.4.0", - "husky": "9.1.7", - "jest": "30.3.0", - "lint-staged": "16.4.0", - "neostandard": "0.13.0", - "npm-run-all2": "8.0.4", - "release-please": "17.3.0", - "runmd": "1.4.1", - "standard-version": "9.5.0", - "typescript": "5.4.3" - }, - "optionalDevDependencies": { - "@wdio/browserstack-service": "9.27.0", - "@wdio/cli": "9.27.0", - "@wdio/jasmine-framework": "9.27.0", - "@wdio/local-runner": "9.27.0", - "@wdio/spec-reporter": "9.27.0", - "@wdio/static-server-service": "9.27.0" - }, - "scripts": { - "build": "./scripts/build.sh", - "build:watch": "tsc --watch -p tsconfig.json", - "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json", - "docs:diff": "npm run docs && git diff --quiet -I \"[0-9a-f-]{36}\" README.md", - "docs": "npm run build && npx runmd --output=README.md README_js.md", - "biome:check": "biome check .", - "biome:fix": "biome check --write .", - "examples:browser:rollup:build": "cd examples/browser-rollup && npm run build", - "examples:browser:webpack:build": "cd examples/browser-webpack && npm run build", - "examples:node:esmodules:test": "cd examples/node-esmodules && npm test", - "examples:node:jest:test": "cd examples/node-jest && npm test", - "examples:node:typescript:test": "cd examples/typescript && npm test", - "lint": "npm run biome:check", - "md": "runmd --watch --output=README.md README_js.md", - "prepack": "npm run build -- --no-pack", - "prepare": "husky", - "prepublishOnly": "npm run build", - "pretest:benchmark": "npm run build", - "pretest:browser": "./scripts/iodd && npm run build && npm-run-all --parallel examples:browser:**", - "pretest:node": "npm run build", - "pretest": "npm run build", - "format": "biome format --write .", - "format:check": "biome format --check .", - "release": "standard-version --no-verify", - "test:benchmark": "cd examples/benchmark && npm test", - "test:browser": "wdio run ./wdio.conf.js", - "test:node": "npm-run-all --parallel examples:node:**", - "test:watch": "node --test --enable-source-maps --watch dist-node/test/*.js", - "test": "node --test --enable-source-maps dist-node/test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/uuidjs/uuid.git" - }, - "lint-staged": { - "*": [ - "biome check --write --no-errors-on-unmatched" - ] - }, - "standard-version": { - "scripts": { - "postchangelog": "biome format --write CHANGELOG.md" - } - }, - "packageManager": "npm@11.12.1" -} diff --git a/node_modules/vary/HISTORY.md b/node_modules/vary/HISTORY.md deleted file mode 100644 index f6cbcf7..0000000 --- a/node_modules/vary/HISTORY.md +++ /dev/null @@ -1,39 +0,0 @@ -1.1.2 / 2017-09-23 -================== - - * perf: improve header token parsing speed - -1.1.1 / 2017-03-20 -================== - - * perf: hoist regular expression - -1.1.0 / 2015-09-29 -================== - - * Only accept valid field names in the `field` argument - - Ensures the resulting string is a valid HTTP header value - -1.0.1 / 2015-07-08 -================== - - * Fix setting empty header from empty `field` - * perf: enable strict mode - * perf: remove argument reassignments - -1.0.0 / 2014-08-10 -================== - - * Accept valid `Vary` header string as `field` - * Add `vary.append` for low-level string manipulation - * Move to `jshttp` orgainzation - -0.1.0 / 2014-06-05 -================== - - * Support array of fields to set - -0.0.0 / 2014-06-04 -================== - - * Initial release diff --git a/node_modules/vary/LICENSE b/node_modules/vary/LICENSE deleted file mode 100644 index 84441fb..0000000 --- a/node_modules/vary/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/vary/README.md b/node_modules/vary/README.md deleted file mode 100644 index cc000b3..0000000 --- a/node_modules/vary/README.md +++ /dev/null @@ -1,101 +0,0 @@ -# vary - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Manipulate the HTTP Vary header - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install vary -``` - -## API - - - -```js -var vary = require('vary') -``` - -### vary(res, field) - -Adds the given header `field` to the `Vary` response header of `res`. -This can be a string of a single field, a string of a valid `Vary` -header, or an array of multiple fields. - -This will append the header if not already listed, otherwise leaves -it listed in the current location. - - - -```js -// Append "Origin" to the Vary header of the response -vary(res, 'Origin') -``` - -### vary.append(header, field) - -Adds the given header `field` to the `Vary` response header string `header`. -This can be a string of a single field, a string of a valid `Vary` header, -or an array of multiple fields. - -This will append the header if not already listed, otherwise leaves -it listed in the current location. The new header string is returned. - - - -```js -// Get header string appending "Origin" to "Accept, User-Agent" -vary.append('Accept, User-Agent', 'Origin') -``` - -## Examples - -### Updating the Vary header when content is based on it - -```js -var http = require('http') -var vary = require('vary') - -http.createServer(function onRequest (req, res) { - // about to user-agent sniff - vary(res, 'User-Agent') - - var ua = req.headers['user-agent'] || '' - var isMobile = /mobi|android|touch|mini/i.test(ua) - - // serve site, depending on isMobile - res.setHeader('Content-Type', 'text/html') - res.end('You are (probably) ' + (isMobile ? '' : 'not ') + 'a mobile user') -}) -``` - -## Testing - -```sh -$ npm test -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/vary.svg -[npm-url]: https://npmjs.org/package/vary -[node-version-image]: https://img.shields.io/node/v/vary.svg -[node-version-url]: https://nodejs.org/en/download -[travis-image]: https://img.shields.io/travis/jshttp/vary/master.svg -[travis-url]: https://travis-ci.org/jshttp/vary -[coveralls-image]: https://img.shields.io/coveralls/jshttp/vary/master.svg -[coveralls-url]: https://coveralls.io/r/jshttp/vary -[downloads-image]: https://img.shields.io/npm/dm/vary.svg -[downloads-url]: https://npmjs.org/package/vary diff --git a/node_modules/vary/index.js b/node_modules/vary/index.js deleted file mode 100644 index 5b5e741..0000000 --- a/node_modules/vary/index.js +++ /dev/null @@ -1,149 +0,0 @@ -/*! - * vary - * Copyright(c) 2014-2017 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - */ - -module.exports = vary -module.exports.append = append - -/** - * RegExp to match field-name in RFC 7230 sec 3.2 - * - * field-name = token - * token = 1*tchar - * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" - * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" - * / DIGIT / ALPHA - * ; any VCHAR, except delimiters - */ - -var FIELD_NAME_REGEXP = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/ - -/** - * Append a field to a vary header. - * - * @param {String} header - * @param {String|Array} field - * @return {String} - * @public - */ - -function append (header, field) { - if (typeof header !== 'string') { - throw new TypeError('header argument is required') - } - - if (!field) { - throw new TypeError('field argument is required') - } - - // get fields array - var fields = !Array.isArray(field) - ? parse(String(field)) - : field - - // assert on invalid field names - for (var j = 0; j < fields.length; j++) { - if (!FIELD_NAME_REGEXP.test(fields[j])) { - throw new TypeError('field argument contains an invalid header name') - } - } - - // existing, unspecified vary - if (header === '*') { - return header - } - - // enumerate current values - var val = header - var vals = parse(header.toLowerCase()) - - // unspecified vary - if (fields.indexOf('*') !== -1 || vals.indexOf('*') !== -1) { - return '*' - } - - for (var i = 0; i < fields.length; i++) { - var fld = fields[i].toLowerCase() - - // append value (case-preserving) - if (vals.indexOf(fld) === -1) { - vals.push(fld) - val = val - ? val + ', ' + fields[i] - : fields[i] - } - } - - return val -} - -/** - * Parse a vary header into an array. - * - * @param {String} header - * @return {Array} - * @private - */ - -function parse (header) { - var end = 0 - var list = [] - var start = 0 - - // gather tokens - for (var i = 0, len = header.length; i < len; i++) { - switch (header.charCodeAt(i)) { - case 0x20: /* */ - if (start === end) { - start = end = i + 1 - } - break - case 0x2c: /* , */ - list.push(header.substring(start, end)) - start = end = i + 1 - break - default: - end = i + 1 - break - } - } - - // final token - list.push(header.substring(start, end)) - - return list -} - -/** - * Mark that a request is varied on a header field. - * - * @param {Object} res - * @param {String|Array} field - * @public - */ - -function vary (res, field) { - if (!res || !res.getHeader || !res.setHeader) { - // quack quack - throw new TypeError('res argument is required') - } - - // get existing header - var val = res.getHeader('Vary') || '' - var header = Array.isArray(val) - ? val.join(', ') - : String(val) - - // set new header - if ((val = append(header, field))) { - res.setHeader('Vary', val) - } -} diff --git a/node_modules/vary/package.json b/node_modules/vary/package.json deleted file mode 100644 index 028f72a..0000000 --- a/node_modules/vary/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "vary", - "description": "Manipulate the HTTP Vary header", - "version": "1.1.2", - "author": "Douglas Christopher Wilson ", - "license": "MIT", - "keywords": [ - "http", - "res", - "vary" - ], - "repository": "jshttp/vary", - "devDependencies": { - "beautify-benchmark": "0.2.4", - "benchmark": "2.1.4", - "eslint": "3.19.0", - "eslint-config-standard": "10.2.1", - "eslint-plugin-import": "2.7.0", - "eslint-plugin-markdown": "1.0.0-beta.6", - "eslint-plugin-node": "5.1.1", - "eslint-plugin-promise": "3.5.0", - "eslint-plugin-standard": "3.0.1", - "istanbul": "0.4.5", - "mocha": "2.5.3", - "supertest": "1.1.0" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "bench": "node benchmark/index.js", - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - } -} diff --git a/node_modules/wrap-ansi/index.js b/node_modules/wrap-ansi/index.js deleted file mode 100644 index d502255..0000000 --- a/node_modules/wrap-ansi/index.js +++ /dev/null @@ -1,216 +0,0 @@ -'use strict'; -const stringWidth = require('string-width'); -const stripAnsi = require('strip-ansi'); -const ansiStyles = require('ansi-styles'); - -const ESCAPES = new Set([ - '\u001B', - '\u009B' -]); - -const END_CODE = 39; - -const ANSI_ESCAPE_BELL = '\u0007'; -const ANSI_CSI = '['; -const ANSI_OSC = ']'; -const ANSI_SGR_TERMINATOR = 'm'; -const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`; - -const wrapAnsi = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`; -const wrapAnsiHyperlink = uri => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`; - -// Calculate the length of words split on ' ', ignoring -// the extra characters added by ansi escape codes -const wordLengths = string => string.split(' ').map(character => stringWidth(character)); - -// Wrap a long word across multiple rows -// Ansi escape codes do not count towards length -const wrapWord = (rows, word, columns) => { - const characters = [...word]; - - let isInsideEscape = false; - let isInsideLinkEscape = false; - let visible = stringWidth(stripAnsi(rows[rows.length - 1])); - - for (const [index, character] of characters.entries()) { - const characterLength = stringWidth(character); - - if (visible + characterLength <= columns) { - rows[rows.length - 1] += character; - } else { - rows.push(character); - visible = 0; - } - - if (ESCAPES.has(character)) { - isInsideEscape = true; - isInsideLinkEscape = characters.slice(index + 1).join('').startsWith(ANSI_ESCAPE_LINK); - } - - if (isInsideEscape) { - if (isInsideLinkEscape) { - if (character === ANSI_ESCAPE_BELL) { - isInsideEscape = false; - isInsideLinkEscape = false; - } - } else if (character === ANSI_SGR_TERMINATOR) { - isInsideEscape = false; - } - - continue; - } - - visible += characterLength; - - if (visible === columns && index < characters.length - 1) { - rows.push(''); - visible = 0; - } - } - - // It's possible that the last row we copy over is only - // ansi escape characters, handle this edge-case - if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { - rows[rows.length - 2] += rows.pop(); - } -}; - -// Trims spaces from a string ignoring invisible sequences -const stringVisibleTrimSpacesRight = string => { - const words = string.split(' '); - let last = words.length; - - while (last > 0) { - if (stringWidth(words[last - 1]) > 0) { - break; - } - - last--; - } - - if (last === words.length) { - return string; - } - - return words.slice(0, last).join(' ') + words.slice(last).join(''); -}; - -// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode -// -// 'hard' will never allow a string to take up more than columns characters -// -// 'soft' allows long words to expand past the column length -const exec = (string, columns, options = {}) => { - if (options.trim !== false && string.trim() === '') { - return ''; - } - - let returnValue = ''; - let escapeCode; - let escapeUrl; - - const lengths = wordLengths(string); - let rows = ['']; - - for (const [index, word] of string.split(' ').entries()) { - if (options.trim !== false) { - rows[rows.length - 1] = rows[rows.length - 1].trimStart(); - } - - let rowLength = stringWidth(rows[rows.length - 1]); - - if (index !== 0) { - if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { - // If we start with a new word but the current row length equals the length of the columns, add a new row - rows.push(''); - rowLength = 0; - } - - if (rowLength > 0 || options.trim === false) { - rows[rows.length - 1] += ' '; - rowLength++; - } - } - - // In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns' - if (options.hard && lengths[index] > columns) { - const remainingColumns = (columns - rowLength); - const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); - const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); - if (breaksStartingNextLine < breaksStartingThisLine) { - rows.push(''); - } - - wrapWord(rows, word, columns); - continue; - } - - if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { - if (options.wordWrap === false && rowLength < columns) { - wrapWord(rows, word, columns); - continue; - } - - rows.push(''); - } - - if (rowLength + lengths[index] > columns && options.wordWrap === false) { - wrapWord(rows, word, columns); - continue; - } - - rows[rows.length - 1] += word; - } - - if (options.trim !== false) { - rows = rows.map(stringVisibleTrimSpacesRight); - } - - const pre = [...rows.join('\n')]; - - for (const [index, character] of pre.entries()) { - returnValue += character; - - if (ESCAPES.has(character)) { - const {groups} = new RegExp(`(?:\\${ANSI_CSI}(?\\d+)m|\\${ANSI_ESCAPE_LINK}(?.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join('')) || {groups: {}}; - if (groups.code !== undefined) { - const code = Number.parseFloat(groups.code); - escapeCode = code === END_CODE ? undefined : code; - } else if (groups.uri !== undefined) { - escapeUrl = groups.uri.length === 0 ? undefined : groups.uri; - } - } - - const code = ansiStyles.codes.get(Number(escapeCode)); - - if (pre[index + 1] === '\n') { - if (escapeUrl) { - returnValue += wrapAnsiHyperlink(''); - } - - if (escapeCode && code) { - returnValue += wrapAnsi(code); - } - } else if (character === '\n') { - if (escapeCode && code) { - returnValue += wrapAnsi(escapeCode); - } - - if (escapeUrl) { - returnValue += wrapAnsiHyperlink(escapeUrl); - } - } - } - - return returnValue; -}; - -// For each newline, invoke the method separately -module.exports = (string, columns, options) => { - return String(string) - .normalize() - .replace(/\r\n/g, '\n') - .split('\n') - .map(line => exec(line, columns, options)) - .join('\n'); -}; diff --git a/node_modules/wrap-ansi/license b/node_modules/wrap-ansi/license deleted file mode 100644 index fa7ceba..0000000 --- a/node_modules/wrap-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/wrap-ansi/package.json b/node_modules/wrap-ansi/package.json deleted file mode 100644 index dfb2f4f..0000000 --- a/node_modules/wrap-ansi/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "wrap-ansi", - "version": "7.0.0", - "description": "Wordwrap a string with ANSI escape codes", - "license": "MIT", - "repository": "chalk/wrap-ansi", - "funding": "https://github.com/chalk/wrap-ansi?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "engines": { - "node": ">=10" - }, - "scripts": { - "test": "xo && nyc ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "wrap", - "break", - "wordwrap", - "wordbreak", - "linewrap", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "devDependencies": { - "ava": "^2.1.0", - "chalk": "^4.0.0", - "coveralls": "^3.0.3", - "has-ansi": "^4.0.0", - "nyc": "^15.0.1", - "xo": "^0.29.1" - } -} diff --git a/node_modules/wrap-ansi/readme.md b/node_modules/wrap-ansi/readme.md deleted file mode 100644 index 68779ba..0000000 --- a/node_modules/wrap-ansi/readme.md +++ /dev/null @@ -1,91 +0,0 @@ -# wrap-ansi [![Build Status](https://travis-ci.com/chalk/wrap-ansi.svg?branch=master)](https://travis-ci.com/chalk/wrap-ansi) [![Coverage Status](https://coveralls.io/repos/github/chalk/wrap-ansi/badge.svg?branch=master)](https://coveralls.io/github/chalk/wrap-ansi?branch=master) - -> Wordwrap a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) - -## Install - -``` -$ npm install wrap-ansi -``` - -## Usage - -```js -const chalk = require('chalk'); -const wrapAnsi = require('wrap-ansi'); - -const input = 'The quick brown ' + chalk.red('fox jumped over ') + - 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); - -console.log(wrapAnsi(input, 20)); -``` - - - -## API - -### wrapAnsi(string, columns, options?) - -Wrap words to the specified column width. - -#### string - -Type: `string` - -String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk). Newline characters will be normalized to `\n`. - -#### columns - -Type: `number` - -Number of columns to wrap the text to. - -#### options - -Type: `object` - -##### hard - -Type: `boolean`\ -Default: `false` - -By default the wrap is soft, meaning long words may extend past the column width. Setting this to `true` will make it hard wrap at the column width. - -##### wordWrap - -Type: `boolean`\ -Default: `true` - -By default, an attempt is made to split words at spaces, ensuring that they don't extend past the configured columns. If wordWrap is `false`, each column will instead be completely filled splitting words as necessary. - -##### trim - -Type: `boolean`\ -Default: `true` - -Whitespace on all lines is removed by default. Set this option to `false` if you don't want to trim. - -## Related - -- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes -- [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right -- [jsesc](https://github.com/mathiasbynens/jsesc) - Generate ASCII-only output from Unicode strings. Useful for creating test fixtures. - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) -- [Benjamin Coe](https://github.com/bcoe) - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/node_modules/y18n/CHANGELOG.md b/node_modules/y18n/CHANGELOG.md deleted file mode 100644 index 244d838..0000000 --- a/node_modules/y18n/CHANGELOG.md +++ /dev/null @@ -1,100 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [5.0.8](https://www.github.com/yargs/y18n/compare/v5.0.7...v5.0.8) (2021-04-07) - - -### Bug Fixes - -* **deno:** force modern release for Deno ([b1c215a](https://www.github.com/yargs/y18n/commit/b1c215aed714bee5830e76de3e335504dc2c4dab)) - -### [5.0.7](https://www.github.com/yargs/y18n/compare/v5.0.6...v5.0.7) (2021-04-07) - - -### Bug Fixes - -* **deno:** force release for deno ([#121](https://www.github.com/yargs/y18n/issues/121)) ([d3f2560](https://www.github.com/yargs/y18n/commit/d3f2560e6cedf2bfa2352e9eec044da53f9a06b2)) - -### [5.0.6](https://www.github.com/yargs/y18n/compare/v5.0.5...v5.0.6) (2021-04-05) - - -### Bug Fixes - -* **webpack:** skip readFileSync if not defined ([#117](https://www.github.com/yargs/y18n/issues/117)) ([6966fa9](https://www.github.com/yargs/y18n/commit/6966fa91d2881cc6a6c531e836099e01f4da1616)) - -### [5.0.5](https://www.github.com/yargs/y18n/compare/v5.0.4...v5.0.5) (2020-10-25) - - -### Bug Fixes - -* address prototype pollution issue ([#108](https://www.github.com/yargs/y18n/issues/108)) ([a9ac604](https://www.github.com/yargs/y18n/commit/a9ac604abf756dec9687be3843e2c93bfe581f25)) - -### [5.0.4](https://www.github.com/yargs/y18n/compare/v5.0.3...v5.0.4) (2020-10-16) - - -### Bug Fixes - -* **exports:** node 13.0 and 13.1 require the dotted object form _with_ a string fallback ([#105](https://www.github.com/yargs/y18n/issues/105)) ([4f85d80](https://www.github.com/yargs/y18n/commit/4f85d80dbaae6d2c7899ae394f7ad97805df4886)) - -### [5.0.3](https://www.github.com/yargs/y18n/compare/v5.0.2...v5.0.3) (2020-10-16) - - -### Bug Fixes - -* **exports:** node 13.0-13.6 require a string fallback ([#103](https://www.github.com/yargs/y18n/issues/103)) ([e39921e](https://www.github.com/yargs/y18n/commit/e39921e1017f88f5d8ea97ddea854ffe92d68e74)) - -### [5.0.2](https://www.github.com/yargs/y18n/compare/v5.0.1...v5.0.2) (2020-10-01) - - -### Bug Fixes - -* **deno:** update types for deno ^1.4.0 ([#100](https://www.github.com/yargs/y18n/issues/100)) ([3834d9a](https://www.github.com/yargs/y18n/commit/3834d9ab1332f2937c935ada5e76623290efae81)) - -### [5.0.1](https://www.github.com/yargs/y18n/compare/v5.0.0...v5.0.1) (2020-09-05) - - -### Bug Fixes - -* main had old index path ([#98](https://www.github.com/yargs/y18n/issues/98)) ([124f7b0](https://www.github.com/yargs/y18n/commit/124f7b047ba9596bdbdf64459988304e77f3de1b)) - -## [5.0.0](https://www.github.com/yargs/y18n/compare/v4.0.0...v5.0.0) (2020-09-05) - - -### ⚠ BREAKING CHANGES - -* exports maps are now used, which modifies import behavior. -* drops Node 6 and 4. begin following Node.js LTS schedule (#89) - -### Features - -* add support for ESM and Deno [#95](https://www.github.com/yargs/y18n/issues/95)) ([4d7ae94](https://www.github.com/yargs/y18n/commit/4d7ae94bcb42e84164e2180366474b1cd321ed94)) - - -### Build System - -* drops Node 6 and 4. begin following Node.js LTS schedule ([#89](https://www.github.com/yargs/y18n/issues/89)) ([3cc0c28](https://www.github.com/yargs/y18n/commit/3cc0c287240727b84eaf1927f903612ec80f5e43)) - -### 4.0.1 (2020-10-25) - - -### Bug Fixes - -* address prototype pollution issue ([#108](https://www.github.com/yargs/y18n/issues/108)) ([a9ac604](https://www.github.com/yargs/y18n/commit/7de58ca0d315990cdb38234e97fc66254cdbcd71)) - -## [4.0.0](https://github.com/yargs/y18n/compare/v3.2.1...v4.0.0) (2017-10-10) - - -### Bug Fixes - -* allow support for falsy values like 0 in tagged literal ([#45](https://github.com/yargs/y18n/issues/45)) ([c926123](https://github.com/yargs/y18n/commit/c926123)) - - -### Features - -* **__:** added tagged template literal support ([#44](https://github.com/yargs/y18n/issues/44)) ([0598daf](https://github.com/yargs/y18n/commit/0598daf)) - - -### BREAKING CHANGES - -* **__:** dropping Node 0.10/Node 0.12 support diff --git a/node_modules/y18n/LICENSE b/node_modules/y18n/LICENSE deleted file mode 100644 index 3c157f0..0000000 --- a/node_modules/y18n/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. diff --git a/node_modules/y18n/README.md b/node_modules/y18n/README.md deleted file mode 100644 index 5102bb1..0000000 --- a/node_modules/y18n/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# y18n - -[![NPM version][npm-image]][npm-url] -[![js-standard-style][standard-image]][standard-url] -[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) - -The bare-bones internationalization library used by yargs. - -Inspired by [i18n](https://www.npmjs.com/package/i18n). - -## Examples - -_simple string translation:_ - -```js -const __ = require('y18n')().__; - -console.log(__('my awesome string %s', 'foo')); -``` - -output: - -`my awesome string foo` - -_using tagged template literals_ - -```js -const __ = require('y18n')().__; - -const str = 'foo'; - -console.log(__`my awesome string ${str}`); -``` - -output: - -`my awesome string foo` - -_pluralization support:_ - -```js -const __n = require('y18n')().__n; - -console.log(__n('one fish %s', '%d fishes %s', 2, 'foo')); -``` - -output: - -`2 fishes foo` - -## Deno Example - -As of `v5` `y18n` supports [Deno](https://github.com/denoland/deno): - -```typescript -import y18n from "https://deno.land/x/y18n/deno.ts"; - -const __ = y18n({ - locale: 'pirate', - directory: './test/locales' -}).__ - -console.info(__`Hi, ${'Ben'} ${'Coe'}!`) -``` - -You will need to run with `--allow-read` to load alternative locales. - -## JSON Language Files - -The JSON language files should be stored in a `./locales` folder. -File names correspond to locales, e.g., `en.json`, `pirate.json`. - -When strings are observed for the first time they will be -added to the JSON file corresponding to the current locale. - -## Methods - -### require('y18n')(config) - -Create an instance of y18n with the config provided, options include: - -* `directory`: the locale directory, default `./locales`. -* `updateFiles`: should newly observed strings be updated in file, default `true`. -* `locale`: what locale should be used. -* `fallbackToLanguage`: should fallback to a language-only file (e.g. `en.json`) - be allowed if a file matching the locale does not exist (e.g. `en_US.json`), - default `true`. - -### y18n.\_\_(str, arg, arg, arg) - -Print a localized string, `%s` will be replaced with `arg`s. - -This function can also be used as a tag for a template literal. You can use it -like this: __`hello ${'world'}`. This will be equivalent to -`__('hello %s', 'world')`. - -### y18n.\_\_n(singularString, pluralString, count, arg, arg, arg) - -Print a localized string with appropriate pluralization. If `%d` is provided -in the string, the `count` will replace this placeholder. - -### y18n.setLocale(str) - -Set the current locale being used. - -### y18n.getLocale() - -What locale is currently being used? - -### y18n.updateLocale(obj) - -Update the current locale with the key value pairs in `obj`. - -## Supported Node.js Versions - -Libraries in this ecosystem make a best effort to track -[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a -post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a). - -## License - -ISC - -[npm-url]: https://npmjs.org/package/y18n -[npm-image]: https://img.shields.io/npm/v/y18n.svg -[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg -[standard-url]: https://github.com/feross/standard diff --git a/node_modules/y18n/build/index.cjs b/node_modules/y18n/build/index.cjs deleted file mode 100644 index b2731e1..0000000 --- a/node_modules/y18n/build/index.cjs +++ /dev/null @@ -1,203 +0,0 @@ -'use strict'; - -var fs = require('fs'); -var util = require('util'); -var path = require('path'); - -let shim; -class Y18N { - constructor(opts) { - // configurable options. - opts = opts || {}; - this.directory = opts.directory || './locales'; - this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true; - this.locale = opts.locale || 'en'; - this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true; - // internal stuff. - this.cache = Object.create(null); - this.writeQueue = []; - } - __(...args) { - if (typeof arguments[0] !== 'string') { - return this._taggedLiteral(arguments[0], ...arguments); - } - const str = args.shift(); - let cb = function () { }; // start with noop. - if (typeof args[args.length - 1] === 'function') - cb = args.pop(); - cb = cb || function () { }; // noop. - if (!this.cache[this.locale]) - this._readLocaleFile(); - // we've observed a new string, update the language file. - if (!this.cache[this.locale][str] && this.updateFiles) { - this.cache[this.locale][str] = str; - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite({ - directory: this.directory, - locale: this.locale, - cb - }); - } - else { - cb(); - } - return shim.format.apply(shim.format, [this.cache[this.locale][str] || str].concat(args)); - } - __n() { - const args = Array.prototype.slice.call(arguments); - const singular = args.shift(); - const plural = args.shift(); - const quantity = args.shift(); - let cb = function () { }; // start with noop. - if (typeof args[args.length - 1] === 'function') - cb = args.pop(); - if (!this.cache[this.locale]) - this._readLocaleFile(); - let str = quantity === 1 ? singular : plural; - if (this.cache[this.locale][singular]) { - const entry = this.cache[this.locale][singular]; - str = entry[quantity === 1 ? 'one' : 'other']; - } - // we've observed a new string, update the language file. - if (!this.cache[this.locale][singular] && this.updateFiles) { - this.cache[this.locale][singular] = { - one: singular, - other: plural - }; - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite({ - directory: this.directory, - locale: this.locale, - cb - }); - } - else { - cb(); - } - // if a %d placeholder is provided, add quantity - // to the arguments expanded by util.format. - const values = [str]; - if (~str.indexOf('%d')) - values.push(quantity); - return shim.format.apply(shim.format, values.concat(args)); - } - setLocale(locale) { - this.locale = locale; - } - getLocale() { - return this.locale; - } - updateLocale(obj) { - if (!this.cache[this.locale]) - this._readLocaleFile(); - for (const key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - this.cache[this.locale][key] = obj[key]; - } - } - } - _taggedLiteral(parts, ...args) { - let str = ''; - parts.forEach(function (part, i) { - const arg = args[i + 1]; - str += part; - if (typeof arg !== 'undefined') { - str += '%s'; - } - }); - return this.__.apply(this, [str].concat([].slice.call(args, 1))); - } - _enqueueWrite(work) { - this.writeQueue.push(work); - if (this.writeQueue.length === 1) - this._processWriteQueue(); - } - _processWriteQueue() { - const _this = this; - const work = this.writeQueue[0]; - // destructure the enqueued work. - const directory = work.directory; - const locale = work.locale; - const cb = work.cb; - const languageFile = this._resolveLocaleFile(directory, locale); - const serializedLocale = JSON.stringify(this.cache[locale], null, 2); - shim.fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { - _this.writeQueue.shift(); - if (_this.writeQueue.length > 0) - _this._processWriteQueue(); - cb(err); - }); - } - _readLocaleFile() { - let localeLookup = {}; - const languageFile = this._resolveLocaleFile(this.directory, this.locale); - try { - // When using a bundler such as webpack, readFileSync may not be defined: - if (shim.fs.readFileSync) { - localeLookup = JSON.parse(shim.fs.readFileSync(languageFile, 'utf-8')); - } - } - catch (err) { - if (err instanceof SyntaxError) { - err.message = 'syntax error in ' + languageFile; - } - if (err.code === 'ENOENT') - localeLookup = {}; - else - throw err; - } - this.cache[this.locale] = localeLookup; - } - _resolveLocaleFile(directory, locale) { - let file = shim.resolve(directory, './', locale + '.json'); - if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { - // attempt fallback to language only - const languageFile = shim.resolve(directory, './', locale.split('_')[0] + '.json'); - if (this._fileExistsSync(languageFile)) - file = languageFile; - } - return file; - } - _fileExistsSync(file) { - return shim.exists(file); - } -} -function y18n$1(opts, _shim) { - shim = _shim; - const y18n = new Y18N(opts); - return { - __: y18n.__.bind(y18n), - __n: y18n.__n.bind(y18n), - setLocale: y18n.setLocale.bind(y18n), - getLocale: y18n.getLocale.bind(y18n), - updateLocale: y18n.updateLocale.bind(y18n), - locale: y18n.locale - }; -} - -var nodePlatformShim = { - fs: { - readFileSync: fs.readFileSync, - writeFile: fs.writeFile - }, - format: util.format, - resolve: path.resolve, - exists: (file) => { - try { - return fs.statSync(file).isFile(); - } - catch (err) { - return false; - } - } -}; - -const y18n = (opts) => { - return y18n$1(opts, nodePlatformShim); -}; - -module.exports = y18n; diff --git a/node_modules/y18n/build/lib/cjs.js b/node_modules/y18n/build/lib/cjs.js deleted file mode 100644 index ff58470..0000000 --- a/node_modules/y18n/build/lib/cjs.js +++ /dev/null @@ -1,6 +0,0 @@ -import { y18n as _y18n } from './index.js'; -import nodePlatformShim from './platform-shims/node.js'; -const y18n = (opts) => { - return _y18n(opts, nodePlatformShim); -}; -export default y18n; diff --git a/node_modules/y18n/build/lib/index.js b/node_modules/y18n/build/lib/index.js deleted file mode 100644 index e38f335..0000000 --- a/node_modules/y18n/build/lib/index.js +++ /dev/null @@ -1,174 +0,0 @@ -let shim; -class Y18N { - constructor(opts) { - // configurable options. - opts = opts || {}; - this.directory = opts.directory || './locales'; - this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true; - this.locale = opts.locale || 'en'; - this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true; - // internal stuff. - this.cache = Object.create(null); - this.writeQueue = []; - } - __(...args) { - if (typeof arguments[0] !== 'string') { - return this._taggedLiteral(arguments[0], ...arguments); - } - const str = args.shift(); - let cb = function () { }; // start with noop. - if (typeof args[args.length - 1] === 'function') - cb = args.pop(); - cb = cb || function () { }; // noop. - if (!this.cache[this.locale]) - this._readLocaleFile(); - // we've observed a new string, update the language file. - if (!this.cache[this.locale][str] && this.updateFiles) { - this.cache[this.locale][str] = str; - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite({ - directory: this.directory, - locale: this.locale, - cb - }); - } - else { - cb(); - } - return shim.format.apply(shim.format, [this.cache[this.locale][str] || str].concat(args)); - } - __n() { - const args = Array.prototype.slice.call(arguments); - const singular = args.shift(); - const plural = args.shift(); - const quantity = args.shift(); - let cb = function () { }; // start with noop. - if (typeof args[args.length - 1] === 'function') - cb = args.pop(); - if (!this.cache[this.locale]) - this._readLocaleFile(); - let str = quantity === 1 ? singular : plural; - if (this.cache[this.locale][singular]) { - const entry = this.cache[this.locale][singular]; - str = entry[quantity === 1 ? 'one' : 'other']; - } - // we've observed a new string, update the language file. - if (!this.cache[this.locale][singular] && this.updateFiles) { - this.cache[this.locale][singular] = { - one: singular, - other: plural - }; - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite({ - directory: this.directory, - locale: this.locale, - cb - }); - } - else { - cb(); - } - // if a %d placeholder is provided, add quantity - // to the arguments expanded by util.format. - const values = [str]; - if (~str.indexOf('%d')) - values.push(quantity); - return shim.format.apply(shim.format, values.concat(args)); - } - setLocale(locale) { - this.locale = locale; - } - getLocale() { - return this.locale; - } - updateLocale(obj) { - if (!this.cache[this.locale]) - this._readLocaleFile(); - for (const key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - this.cache[this.locale][key] = obj[key]; - } - } - } - _taggedLiteral(parts, ...args) { - let str = ''; - parts.forEach(function (part, i) { - const arg = args[i + 1]; - str += part; - if (typeof arg !== 'undefined') { - str += '%s'; - } - }); - return this.__.apply(this, [str].concat([].slice.call(args, 1))); - } - _enqueueWrite(work) { - this.writeQueue.push(work); - if (this.writeQueue.length === 1) - this._processWriteQueue(); - } - _processWriteQueue() { - const _this = this; - const work = this.writeQueue[0]; - // destructure the enqueued work. - const directory = work.directory; - const locale = work.locale; - const cb = work.cb; - const languageFile = this._resolveLocaleFile(directory, locale); - const serializedLocale = JSON.stringify(this.cache[locale], null, 2); - shim.fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { - _this.writeQueue.shift(); - if (_this.writeQueue.length > 0) - _this._processWriteQueue(); - cb(err); - }); - } - _readLocaleFile() { - let localeLookup = {}; - const languageFile = this._resolveLocaleFile(this.directory, this.locale); - try { - // When using a bundler such as webpack, readFileSync may not be defined: - if (shim.fs.readFileSync) { - localeLookup = JSON.parse(shim.fs.readFileSync(languageFile, 'utf-8')); - } - } - catch (err) { - if (err instanceof SyntaxError) { - err.message = 'syntax error in ' + languageFile; - } - if (err.code === 'ENOENT') - localeLookup = {}; - else - throw err; - } - this.cache[this.locale] = localeLookup; - } - _resolveLocaleFile(directory, locale) { - let file = shim.resolve(directory, './', locale + '.json'); - if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { - // attempt fallback to language only - const languageFile = shim.resolve(directory, './', locale.split('_')[0] + '.json'); - if (this._fileExistsSync(languageFile)) - file = languageFile; - } - return file; - } - _fileExistsSync(file) { - return shim.exists(file); - } -} -export function y18n(opts, _shim) { - shim = _shim; - const y18n = new Y18N(opts); - return { - __: y18n.__.bind(y18n), - __n: y18n.__n.bind(y18n), - setLocale: y18n.setLocale.bind(y18n), - getLocale: y18n.getLocale.bind(y18n), - updateLocale: y18n.updateLocale.bind(y18n), - locale: y18n.locale - }; -} diff --git a/node_modules/y18n/build/lib/platform-shims/node.js b/node_modules/y18n/build/lib/platform-shims/node.js deleted file mode 100644 index 181208b..0000000 --- a/node_modules/y18n/build/lib/platform-shims/node.js +++ /dev/null @@ -1,19 +0,0 @@ -import { readFileSync, statSync, writeFile } from 'fs'; -import { format } from 'util'; -import { resolve } from 'path'; -export default { - fs: { - readFileSync, - writeFile - }, - format, - resolve, - exists: (file) => { - try { - return statSync(file).isFile(); - } - catch (err) { - return false; - } - } -}; diff --git a/node_modules/y18n/index.mjs b/node_modules/y18n/index.mjs deleted file mode 100644 index 46c8213..0000000 --- a/node_modules/y18n/index.mjs +++ /dev/null @@ -1,8 +0,0 @@ -import shim from './build/lib/platform-shims/node.js' -import { y18n as _y18n } from './build/lib/index.js' - -const y18n = (opts) => { - return _y18n(opts, shim) -} - -export default y18n diff --git a/node_modules/y18n/package.json b/node_modules/y18n/package.json deleted file mode 100644 index 4e5c1ca..0000000 --- a/node_modules/y18n/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "y18n", - "version": "5.0.8", - "description": "the bare-bones internationalization library used by yargs", - "exports": { - ".": [ - { - "import": "./index.mjs", - "require": "./build/index.cjs" - }, - "./build/index.cjs" - ] - }, - "type": "module", - "module": "./build/lib/index.js", - "keywords": [ - "i18n", - "internationalization", - "yargs" - ], - "homepage": "https://github.com/yargs/y18n", - "bugs": { - "url": "https://github.com/yargs/y18n/issues" - }, - "repository": "yargs/y18n", - "license": "ISC", - "author": "Ben Coe ", - "main": "./build/index.cjs", - "scripts": { - "check": "standardx **/*.ts **/*.cjs **/*.mjs", - "fix": "standardx --fix **/*.ts **/*.cjs **/*.mjs", - "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", - "test": "c8 --reporter=text --reporter=html mocha test/*.cjs", - "test:esm": "c8 --reporter=text --reporter=html mocha test/esm/*.mjs", - "posttest": "npm run check", - "coverage": "c8 report --check-coverage", - "precompile": "rimraf build", - "compile": "tsc", - "postcompile": "npm run build:cjs", - "build:cjs": "rollup -c", - "prepare": "npm run compile" - }, - "devDependencies": { - "@types/node": "^14.6.4", - "@wessberg/rollup-plugin-ts": "^1.3.1", - "c8": "^7.3.0", - "chai": "^4.0.1", - "cross-env": "^7.0.2", - "gts": "^3.0.0", - "mocha": "^8.0.0", - "rimraf": "^3.0.2", - "rollup": "^2.26.10", - "standardx": "^7.0.0", - "ts-transform-default-export": "^1.0.2", - "typescript": "^4.0.0" - }, - "files": [ - "build", - "index.mjs", - "!*.d.ts" - ], - "engines": { - "node": ">=10" - }, - "standardx": { - "ignore": [ - "build" - ] - } -} diff --git a/node_modules/yargs-parser/CHANGELOG.md b/node_modules/yargs-parser/CHANGELOG.md deleted file mode 100644 index 584eb86..0000000 --- a/node_modules/yargs-parser/CHANGELOG.md +++ /dev/null @@ -1,308 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -## [21.1.1](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.1.0...yargs-parser-v21.1.1) (2022-08-04) - - -### Bug Fixes - -* **typescript:** ignore .cts files during publish ([#454](https://github.com/yargs/yargs-parser/issues/454)) ([d69f9c3](https://github.com/yargs/yargs-parser/commit/d69f9c3a91c3ad2f9494d0a94e29a8b76c41b81b)), closes [#452](https://github.com/yargs/yargs-parser/issues/452) - -## [21.1.0](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.0.1...yargs-parser-v21.1.0) (2022-08-03) - - -### Features - -* allow the browser build to be imported ([#443](https://github.com/yargs/yargs-parser/issues/443)) ([a89259f](https://github.com/yargs/yargs-parser/commit/a89259ff41d6f5312b3ce8a30bef343a993f395a)) - - -### Bug Fixes - -* **halt-at-non-option:** prevent known args from being parsed when "unknown-options-as-args" is enabled ([#438](https://github.com/yargs/yargs-parser/issues/438)) ([c474bc1](https://github.com/yargs/yargs-parser/commit/c474bc10c3aa0ae864b95e5722730114ef15f573)) -* node version check now uses process.versions.node ([#450](https://github.com/yargs/yargs-parser/issues/450)) ([d07bcdb](https://github.com/yargs/yargs-parser/commit/d07bcdbe43075f7201fbe8a08e491217247fe1f1)) -* parse options ending with 3+ hyphens ([#434](https://github.com/yargs/yargs-parser/issues/434)) ([4f1060b](https://github.com/yargs/yargs-parser/commit/4f1060b50759fadbac3315c5117b0c3d65b0a7d8)) - -### [21.0.1](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.0.0...yargs-parser-v21.0.1) (2022-02-27) - - -### Bug Fixes - -* return deno env object ([#432](https://github.com/yargs/yargs-parser/issues/432)) ([b00eb87](https://github.com/yargs/yargs-parser/commit/b00eb87b4860a890dd2dab0d6058241bbfd2b3ec)) - -## [21.0.0](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.9...yargs-parser-v21.0.0) (2021-11-15) - - -### ⚠ BREAKING CHANGES - -* drops support for 10 (#421) - -### Bug Fixes - -* esm json import ([#416](https://www.github.com/yargs/yargs-parser/issues/416)) ([90f970a](https://www.github.com/yargs/yargs-parser/commit/90f970a6482dd4f5b5eb18d38596dd6f02d73edf)) -* parser should preserve inner quotes ([#407](https://www.github.com/yargs/yargs-parser/issues/407)) ([ae11f49](https://www.github.com/yargs/yargs-parser/commit/ae11f496a8318ea8885aa25015d429b33713c314)) - - -### Code Refactoring - -* drops support for 10 ([#421](https://www.github.com/yargs/yargs-parser/issues/421)) ([3aaf878](https://www.github.com/yargs/yargs-parser/commit/3aaf8784f5c7f2aec6108c1c6a55537fa7e3b5c1)) - -### [20.2.9](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.8...yargs-parser-v20.2.9) (2021-06-20) - - -### Bug Fixes - -* **build:** fixed automated release pipeline ([1fe9135](https://www.github.com/yargs/yargs-parser/commit/1fe9135884790a083615419b2861683e2597dac3)) - -### [20.2.8](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.7...yargs-parser-v20.2.8) (2021-06-20) - - -### Bug Fixes - -* **locale:** Turkish camelize and decamelize issues with toLocaleLowerCase/toLocaleUpperCase ([2617303](https://www.github.com/yargs/yargs-parser/commit/261730383e02448562f737b94bbd1f164aed5143)) -* **perf:** address slow parse when using unknown-options-as-args ([#394](https://www.github.com/yargs/yargs-parser/issues/394)) ([441f059](https://www.github.com/yargs/yargs-parser/commit/441f059d585d446551068ad213db79ac91daf83a)) -* **string-utils:** detect [0,1] ranged values as numbers ([#388](https://www.github.com/yargs/yargs-parser/issues/388)) ([efcc32c](https://www.github.com/yargs/yargs-parser/commit/efcc32c2d6b09aba31abfa2db9bd947befe5586b)) - -### [20.2.7](https://www.github.com/yargs/yargs-parser/compare/v20.2.6...v20.2.7) (2021-03-10) - - -### Bug Fixes - -* **deno:** force release for Deno ([6687c97](https://www.github.com/yargs/yargs-parser/commit/6687c972d0f3ca7865a97908dde3080b05f8b026)) - -### [20.2.6](https://www.github.com/yargs/yargs-parser/compare/v20.2.5...v20.2.6) (2021-02-22) - - -### Bug Fixes - -* **populate--:** -- should always be array ([#354](https://www.github.com/yargs/yargs-parser/issues/354)) ([585ae8f](https://www.github.com/yargs/yargs-parser/commit/585ae8ffad74cc02974f92d788e750137fd65146)) - -### [20.2.5](https://www.github.com/yargs/yargs-parser/compare/v20.2.4...v20.2.5) (2021-02-13) - - -### Bug Fixes - -* do not lowercase camel cased string ([#348](https://www.github.com/yargs/yargs-parser/issues/348)) ([5f4da1f](https://www.github.com/yargs/yargs-parser/commit/5f4da1f17d9d50542d2aaa206c9806ce3e320335)) - -### [20.2.4](https://www.github.com/yargs/yargs-parser/compare/v20.2.3...v20.2.4) (2020-11-09) - - -### Bug Fixes - -* **deno:** address import issues in Deno ([#339](https://www.github.com/yargs/yargs-parser/issues/339)) ([3b54e5e](https://www.github.com/yargs/yargs-parser/commit/3b54e5eef6e9a7b7c6eec7c12bab3ba3b8ba8306)) - -### [20.2.3](https://www.github.com/yargs/yargs-parser/compare/v20.2.2...v20.2.3) (2020-10-16) - - -### Bug Fixes - -* **exports:** node 13.0 and 13.1 require the dotted object form _with_ a string fallback ([#336](https://www.github.com/yargs/yargs-parser/issues/336)) ([3ae7242](https://www.github.com/yargs/yargs-parser/commit/3ae7242040ff876d28dabded60ac226e00150c88)) - -### [20.2.2](https://www.github.com/yargs/yargs-parser/compare/v20.2.1...v20.2.2) (2020-10-14) - - -### Bug Fixes - -* **exports:** node 13.0-13.6 require a string fallback ([#333](https://www.github.com/yargs/yargs-parser/issues/333)) ([291aeda](https://www.github.com/yargs/yargs-parser/commit/291aeda06b685b7a015d83bdf2558e180b37388d)) - -### [20.2.1](https://www.github.com/yargs/yargs-parser/compare/v20.2.0...v20.2.1) (2020-10-01) - - -### Bug Fixes - -* **deno:** update types for deno ^1.4.0 ([#330](https://www.github.com/yargs/yargs-parser/issues/330)) ([0ab92e5](https://www.github.com/yargs/yargs-parser/commit/0ab92e50b090f11196334c048c9c92cecaddaf56)) - -## [20.2.0](https://www.github.com/yargs/yargs-parser/compare/v20.1.0...v20.2.0) (2020-09-21) - - -### Features - -* **string-utils:** export looksLikeNumber helper ([#324](https://www.github.com/yargs/yargs-parser/issues/324)) ([c8580a2](https://www.github.com/yargs/yargs-parser/commit/c8580a2327b55f6342acecb6e72b62963d506750)) - - -### Bug Fixes - -* **unknown-options-as-args:** convert positionals that look like numbers ([#326](https://www.github.com/yargs/yargs-parser/issues/326)) ([f85ebb4](https://www.github.com/yargs/yargs-parser/commit/f85ebb4face9d4b0f56147659404cbe0002f3dad)) - -## [20.1.0](https://www.github.com/yargs/yargs-parser/compare/v20.0.0...v20.1.0) (2020-09-20) - - -### Features - -* adds parse-positional-numbers configuration ([#321](https://www.github.com/yargs/yargs-parser/issues/321)) ([9cec00a](https://www.github.com/yargs/yargs-parser/commit/9cec00a622251292ffb7dce6f78f5353afaa0d4c)) - - -### Bug Fixes - -* **build:** update release-please; make labels kick off builds ([#323](https://www.github.com/yargs/yargs-parser/issues/323)) ([09f448b](https://www.github.com/yargs/yargs-parser/commit/09f448b4cd66e25d2872544718df46dab8af062a)) - -## [20.0.0](https://www.github.com/yargs/yargs-parser/compare/v19.0.4...v20.0.0) (2020-09-09) - - -### ⚠ BREAKING CHANGES - -* do not ship type definitions (#318) - -### Bug Fixes - -* only strip camel case if hyphenated ([#316](https://www.github.com/yargs/yargs-parser/issues/316)) ([95a9e78](https://www.github.com/yargs/yargs-parser/commit/95a9e785127b9bbf2d1db1f1f808ca1fb100e82a)), closes [#315](https://www.github.com/yargs/yargs-parser/issues/315) - - -### Code Refactoring - -* do not ship type definitions ([#318](https://www.github.com/yargs/yargs-parser/issues/318)) ([8fbd56f](https://www.github.com/yargs/yargs-parser/commit/8fbd56f1d0b6c44c30fca62708812151ca0ce330)) - -### [19.0.4](https://www.github.com/yargs/yargs-parser/compare/v19.0.3...v19.0.4) (2020-08-27) - - -### Bug Fixes - -* **build:** fixing publication ([#310](https://www.github.com/yargs/yargs-parser/issues/310)) ([5d3c6c2](https://www.github.com/yargs/yargs-parser/commit/5d3c6c29a9126248ba601920d9cf87c78e161ff5)) - -### [19.0.3](https://www.github.com/yargs/yargs-parser/compare/v19.0.2...v19.0.3) (2020-08-27) - - -### Bug Fixes - -* **build:** switch to action for publish ([#308](https://www.github.com/yargs/yargs-parser/issues/308)) ([5c2f305](https://www.github.com/yargs/yargs-parser/commit/5c2f30585342bcd8aaf926407c863099d256d174)) - -### [19.0.2](https://www.github.com/yargs/yargs-parser/compare/v19.0.1...v19.0.2) (2020-08-27) - - -### Bug Fixes - -* **types:** envPrefix should be optional ([#305](https://www.github.com/yargs/yargs-parser/issues/305)) ([ae3f180](https://www.github.com/yargs/yargs-parser/commit/ae3f180e14df2de2fd962145f4518f9aa0e76523)) - -### [19.0.1](https://www.github.com/yargs/yargs-parser/compare/v19.0.0...v19.0.1) (2020-08-09) - - -### Bug Fixes - -* **build:** push tag created for deno ([2186a14](https://www.github.com/yargs/yargs-parser/commit/2186a14989749887d56189867602e39e6679f8b0)) - -## [19.0.0](https://www.github.com/yargs/yargs-parser/compare/v18.1.3...v19.0.0) (2020-08-09) - - -### ⚠ BREAKING CHANGES - -* adds support for ESM and Deno (#295) -* **ts:** projects using `@types/yargs-parser` may see variations in type definitions. -* drops Node 6. begin following Node.js LTS schedule (#278) - -### Features - -* adds support for ESM and Deno ([#295](https://www.github.com/yargs/yargs-parser/issues/295)) ([195bc4a](https://www.github.com/yargs/yargs-parser/commit/195bc4a7f20c2a8f8e33fbb6ba96ef6e9a0120a1)) -* expose camelCase and decamelize helpers ([#296](https://www.github.com/yargs/yargs-parser/issues/296)) ([39154ce](https://www.github.com/yargs/yargs-parser/commit/39154ceb5bdcf76b5f59a9219b34cedb79b67f26)) -* **deps:** update to latest camelcase/decamelize ([#281](https://www.github.com/yargs/yargs-parser/issues/281)) ([8931ab0](https://www.github.com/yargs/yargs-parser/commit/8931ab08f686cc55286f33a95a83537da2be5516)) - - -### Bug Fixes - -* boolean numeric short option ([#294](https://www.github.com/yargs/yargs-parser/issues/294)) ([f600082](https://www.github.com/yargs/yargs-parser/commit/f600082c959e092076caf420bbbc9d7a231e2418)) -* raise permission error for Deno if config load fails ([#298](https://www.github.com/yargs/yargs-parser/issues/298)) ([1174e2b](https://www.github.com/yargs/yargs-parser/commit/1174e2b3f0c845a1cd64e14ffc3703e730567a84)) -* **deps:** update dependency decamelize to v3 ([#274](https://www.github.com/yargs/yargs-parser/issues/274)) ([4d98698](https://www.github.com/yargs/yargs-parser/commit/4d98698bc6767e84ec54a0842908191739be73b7)) -* **types:** switch back to using Partial types ([#293](https://www.github.com/yargs/yargs-parser/issues/293)) ([bdc80ba](https://www.github.com/yargs/yargs-parser/commit/bdc80ba59fa13bc3025ce0a85e8bad9f9da24ea7)) - - -### Build System - -* drops Node 6. begin following Node.js LTS schedule ([#278](https://www.github.com/yargs/yargs-parser/issues/278)) ([9014ed7](https://www.github.com/yargs/yargs-parser/commit/9014ed722a32768b96b829e65a31705db5c1458a)) - - -### Code Refactoring - -* **ts:** move index.js to TypeScript ([#292](https://www.github.com/yargs/yargs-parser/issues/292)) ([f78d2b9](https://www.github.com/yargs/yargs-parser/commit/f78d2b97567ac4828624406e420b4047c710b789)) - -### [18.1.3](https://www.github.com/yargs/yargs-parser/compare/v18.1.2...v18.1.3) (2020-04-16) - - -### Bug Fixes - -* **setArg:** options using camel-case and dot-notation populated twice ([#268](https://www.github.com/yargs/yargs-parser/issues/268)) ([f7e15b9](https://www.github.com/yargs/yargs-parser/commit/f7e15b9800900b9856acac1a830a5f35847be73e)) - -### [18.1.2](https://www.github.com/yargs/yargs-parser/compare/v18.1.1...v18.1.2) (2020-03-26) - - -### Bug Fixes - -* **array, nargs:** support -o=--value and --option=--value format ([#262](https://www.github.com/yargs/yargs-parser/issues/262)) ([41d3f81](https://www.github.com/yargs/yargs-parser/commit/41d3f8139e116706b28de9b0de3433feb08d2f13)) - -### [18.1.1](https://www.github.com/yargs/yargs-parser/compare/v18.1.0...v18.1.1) (2020-03-16) - - -### Bug Fixes - -* \_\_proto\_\_ will now be replaced with \_\_\_proto\_\_\_ in parse ([#258](https://www.github.com/yargs/yargs-parser/issues/258)), patching a potential -prototype pollution vulnerability. This was reported by the Snyk Security Research Team.([63810ca](https://www.github.com/yargs/yargs-parser/commit/63810ca1ae1a24b08293a4d971e70e058c7a41e2)) - -## [18.1.0](https://www.github.com/yargs/yargs-parser/compare/v18.0.0...v18.1.0) (2020-03-07) - - -### Features - -* introduce single-digit boolean aliases ([#255](https://www.github.com/yargs/yargs-parser/issues/255)) ([9c60265](https://www.github.com/yargs/yargs-parser/commit/9c60265fd7a03cb98e6df3e32c8c5e7508d9f56f)) - -## [18.0.0](https://www.github.com/yargs/yargs-parser/compare/v17.1.0...v18.0.0) (2020-03-02) - - -### ⚠ BREAKING CHANGES - -* the narg count is now enforced when parsing arrays. - -### Features - -* NaN can now be provided as a value for nargs, indicating "at least" one value is expected for array ([#251](https://www.github.com/yargs/yargs-parser/issues/251)) ([9db4be8](https://www.github.com/yargs/yargs-parser/commit/9db4be81417a2c7097128db34d86fe70ef4af70c)) - -## [17.1.0](https://www.github.com/yargs/yargs-parser/compare/v17.0.1...v17.1.0) (2020-03-01) - - -### Features - -* introduce greedy-arrays config, for specifying whether arrays consume multiple positionals ([#249](https://www.github.com/yargs/yargs-parser/issues/249)) ([60e880a](https://www.github.com/yargs/yargs-parser/commit/60e880a837046314d89fa4725f923837fd33a9eb)) - -### [17.0.1](https://www.github.com/yargs/yargs-parser/compare/v17.0.0...v17.0.1) (2020-02-29) - - -### Bug Fixes - -* normalized keys were not enumerable ([#247](https://www.github.com/yargs/yargs-parser/issues/247)) ([57119f9](https://www.github.com/yargs/yargs-parser/commit/57119f9f17cf27499bd95e61c2f72d18314f11ba)) - -## [17.0.0](https://www.github.com/yargs/yargs-parser/compare/v16.1.0...v17.0.0) (2020-02-10) - - -### ⚠ BREAKING CHANGES - -* this reverts parsing behavior of booleans to that of yargs@14 -* objects used during parsing are now created with a null -prototype. There may be some scenarios where this change in behavior -leaks externally. - -### Features - -* boolean arguments will not be collected into an implicit array ([#236](https://www.github.com/yargs/yargs-parser/issues/236)) ([34c4e19](https://www.github.com/yargs/yargs-parser/commit/34c4e19bae4e7af63e3cb6fa654a97ed476e5eb5)) -* introduce nargs-eats-options config option ([#246](https://www.github.com/yargs/yargs-parser/issues/246)) ([d50822a](https://www.github.com/yargs/yargs-parser/commit/d50822ac10e1b05f2e9643671ca131ac251b6732)) - - -### Bug Fixes - -* address bugs with "uknown-options-as-args" ([bc023e3](https://www.github.com/yargs/yargs-parser/commit/bc023e3b13e20a118353f9507d1c999bf388a346)) -* array should take precedence over nargs, but enforce nargs ([#243](https://www.github.com/yargs/yargs-parser/issues/243)) ([4cbc188](https://www.github.com/yargs/yargs-parser/commit/4cbc188b7abb2249529a19c090338debdad2fe6c)) -* support keys that collide with object prototypes ([#234](https://www.github.com/yargs/yargs-parser/issues/234)) ([1587b6d](https://www.github.com/yargs/yargs-parser/commit/1587b6d91db853a9109f1be6b209077993fee4de)) -* unknown options terminated with digits now handled by unknown-options-as-args ([#238](https://www.github.com/yargs/yargs-parser/issues/238)) ([d36cdfa](https://www.github.com/yargs/yargs-parser/commit/d36cdfa854254d7c7e0fe1d583818332ac46c2a5)) - -## [16.1.0](https://www.github.com/yargs/yargs-parser/compare/v16.0.0...v16.1.0) (2019-11-01) - - -### ⚠ BREAKING CHANGES - -* populate error if incompatible narg/count or array/count options are used (#191) - -### Features - -* options that have had their default value used are now tracked ([#211](https://www.github.com/yargs/yargs-parser/issues/211)) ([a525234](https://www.github.com/yargs/yargs-parser/commit/a525234558c847deedd73f8792e0a3b77b26e2c0)) -* populate error if incompatible narg/count or array/count options are used ([#191](https://www.github.com/yargs/yargs-parser/issues/191)) ([84a401f](https://www.github.com/yargs/yargs-parser/commit/84a401f0fa3095e0a19661670d1570d0c3b9d3c9)) - - -### Reverts - -* revert 16.0.0 CHANGELOG entry ([920320a](https://www.github.com/yargs/yargs-parser/commit/920320ad9861bbfd58eda39221ae211540fc1daf)) diff --git a/node_modules/yargs-parser/LICENSE.txt b/node_modules/yargs-parser/LICENSE.txt deleted file mode 100644 index 836440b..0000000 --- a/node_modules/yargs-parser/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2016, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/yargs-parser/README.md b/node_modules/yargs-parser/README.md deleted file mode 100644 index 2614840..0000000 --- a/node_modules/yargs-parser/README.md +++ /dev/null @@ -1,518 +0,0 @@ -# yargs-parser - -![ci](https://github.com/yargs/yargs-parser/workflows/ci/badge.svg) -[![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser) -[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) -![nycrc config on GitHub](https://img.shields.io/nycrc/yargs/yargs-parser) - -The mighty option parser used by [yargs](https://github.com/yargs/yargs). - -visit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions. - - - -## Example - -```sh -npm i yargs-parser --save -``` - -```js -const argv = require('yargs-parser')(process.argv.slice(2)) -console.log(argv) -``` - -```console -$ node example.js --foo=33 --bar hello -{ _: [], foo: 33, bar: 'hello' } -``` - -_or parse a string!_ - -```js -const argv = require('yargs-parser')('--foo=99 --bar=33') -console.log(argv) -``` - -```console -{ _: [], foo: 99, bar: 33 } -``` - -Convert an array of mixed types before passing to `yargs-parser`: - -```js -const parse = require('yargs-parser') -parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string -parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings -``` - -## Deno Example - -As of `v19` `yargs-parser` supports [Deno](https://github.com/denoland/deno): - -```typescript -import parser from "https://deno.land/x/yargs_parser/deno.ts"; - -const argv = parser('--foo=99 --bar=9987930', { - string: ['bar'] -}) -console.log(argv) -``` - -## ESM Example - -As of `v19` `yargs-parser` supports ESM (_both in Node.js and in the browser_): - -**Node.js:** - -```js -import parser from 'yargs-parser' - -const argv = parser('--foo=99 --bar=9987930', { - string: ['bar'] -}) -console.log(argv) -``` - -**Browsers:** - -```html - - - - -``` - -## API - -### parser(args, opts={}) - -Parses command line arguments returning a simple mapping of keys and values. - -**expects:** - -* `args`: a string or array of strings representing the options to parse. -* `opts`: provide a set of hints indicating how `args` should be parsed: - * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`. - * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.
- Indicate that keys should be parsed as an array and coerced to booleans / numbers:
- `{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`. - * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`. - * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided - (or throws an error). For arrays the function is called only once for the entire array:
- `{coerce: {foo: function (arg) {return modifiedArg}}}`. - * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). - * `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:
- `{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`. - * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). - * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`. - * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`. - * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed. - * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`. - * `opts.normalize`: `path.normalize()` will be applied to values set to this key. - * `opts.number`: keys should be treated as numbers. - * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). - -**returns:** - -* `obj`: an object representing the parsed value of `args` - * `key/value`: key value pairs for each argument and their aliases. - * `_`: an array representing the positional arguments. - * [optional] `--`: an array with arguments after the end-of-options flag `--`. - -### require('yargs-parser').detailed(args, opts={}) - -Parses a command line string, returning detailed information required by the -yargs engine. - -**expects:** - -* `args`: a string or array of strings representing options to parse. -* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`. - -**returns:** - -* `argv`: an object representing the parsed value of `args` - * `key/value`: key value pairs for each argument and their aliases. - * `_`: an array representing the positional arguments. - * [optional] `--`: an array with arguments after the end-of-options flag `--`. -* `error`: populated with an error object if an exception occurred during parsing. -* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`. -* `newAliases`: any new aliases added via camel-case expansion: - * `boolean`: `{ fooBar: true }` -* `defaulted`: any new argument created by `opts.default`, no aliases included. - * `boolean`: `{ foo: true }` -* `configuration`: given by default settings and `opts.configuration`. - - - -### Configuration - -The yargs-parser applies several automated transformations on the keys provided -in `args`. These features can be turned on and off using the `configuration` field -of `opts`. - -```js -var parsed = parser(['--no-dice'], { - configuration: { - 'boolean-negation': false - } -}) -``` - -### short option groups - -* default: `true`. -* key: `short-option-groups`. - -Should a group of short-options be treated as boolean flags? - -```console -$ node example.js -abc -{ _: [], a: true, b: true, c: true } -``` - -_if disabled:_ - -```console -$ node example.js -abc -{ _: [], abc: true } -``` - -### camel-case expansion - -* default: `true`. -* key: `camel-case-expansion`. - -Should hyphenated arguments be expanded into camel-case aliases? - -```console -$ node example.js --foo-bar -{ _: [], 'foo-bar': true, fooBar: true } -``` - -_if disabled:_ - -```console -$ node example.js --foo-bar -{ _: [], 'foo-bar': true } -``` - -### dot-notation - -* default: `true` -* key: `dot-notation` - -Should keys that contain `.` be treated as objects? - -```console -$ node example.js --foo.bar -{ _: [], foo: { bar: true } } -``` - -_if disabled:_ - -```console -$ node example.js --foo.bar -{ _: [], "foo.bar": true } -``` - -### parse numbers - -* default: `true` -* key: `parse-numbers` - -Should keys that look like numbers be treated as such? - -```console -$ node example.js --foo=99.3 -{ _: [], foo: 99.3 } -``` - -_if disabled:_ - -```console -$ node example.js --foo=99.3 -{ _: [], foo: "99.3" } -``` - -### parse positional numbers - -* default: `true` -* key: `parse-positional-numbers` - -Should positional keys that look like numbers be treated as such. - -```console -$ node example.js 99.3 -{ _: [99.3] } -``` - -_if disabled:_ - -```console -$ node example.js 99.3 -{ _: ['99.3'] } -``` - -### boolean negation - -* default: `true` -* key: `boolean-negation` - -Should variables prefixed with `--no` be treated as negations? - -```console -$ node example.js --no-foo -{ _: [], foo: false } -``` - -_if disabled:_ - -```console -$ node example.js --no-foo -{ _: [], "no-foo": true } -``` - -### combine arrays - -* default: `false` -* key: `combine-arrays` - -Should arrays be combined when provided by both command line arguments and -a configuration file. - -### duplicate arguments array - -* default: `true` -* key: `duplicate-arguments-array` - -Should arguments be coerced into an array when duplicated: - -```console -$ node example.js -x 1 -x 2 -{ _: [], x: [1, 2] } -``` - -_if disabled:_ - -```console -$ node example.js -x 1 -x 2 -{ _: [], x: 2 } -``` - -### flatten duplicate arrays - -* default: `true` -* key: `flatten-duplicate-arrays` - -Should array arguments be coerced into a single array when duplicated: - -```console -$ node example.js -x 1 2 -x 3 4 -{ _: [], x: [1, 2, 3, 4] } -``` - -_if disabled:_ - -```console -$ node example.js -x 1 2 -x 3 4 -{ _: [], x: [[1, 2], [3, 4]] } -``` - -### greedy arrays - -* default: `true` -* key: `greedy-arrays` - -Should arrays consume more than one positional argument following their flag. - -```console -$ node example --arr 1 2 -{ _: [], arr: [1, 2] } -``` - -_if disabled:_ - -```console -$ node example --arr 1 2 -{ _: [2], arr: [1] } -``` - -**Note: in `v18.0.0` we are considering defaulting greedy arrays to `false`.** - -### nargs eats options - -* default: `false` -* key: `nargs-eats-options` - -Should nargs consume dash options as well as positional arguments. - -### negation prefix - -* default: `no-` -* key: `negation-prefix` - -The prefix to use for negated boolean variables. - -```console -$ node example.js --no-foo -{ _: [], foo: false } -``` - -_if set to `quux`:_ - -```console -$ node example.js --quuxfoo -{ _: [], foo: false } -``` - -### populate -- - -* default: `false`. -* key: `populate--` - -Should unparsed flags be stored in `--` or `_`. - -_If disabled:_ - -```console -$ node example.js a -b -- x y -{ _: [ 'a', 'x', 'y' ], b: true } -``` - -_If enabled:_ - -```console -$ node example.js a -b -- x y -{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true } -``` - -### set placeholder key - -* default: `false`. -* key: `set-placeholder-key`. - -Should a placeholder be added for keys not set via the corresponding CLI argument? - -_If disabled:_ - -```console -$ node example.js -a 1 -c 2 -{ _: [], a: 1, c: 2 } -``` - -_If enabled:_ - -```console -$ node example.js -a 1 -c 2 -{ _: [], a: 1, b: undefined, c: 2 } -``` - -### halt at non-option - -* default: `false`. -* key: `halt-at-non-option`. - -Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line. - -_If disabled:_ - -```console -$ node example.js -a run b -x y -{ _: [ 'b' ], a: 'run', x: 'y' } -``` - -_If enabled:_ - -```console -$ node example.js -a run b -x y -{ _: [ 'b', '-x', 'y' ], a: 'run' } -``` - -### strip aliased - -* default: `false` -* key: `strip-aliased` - -Should aliases be removed before returning results? - -_If disabled:_ - -```console -$ node example.js --test-field 1 -{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 } -``` - -_If enabled:_ - -```console -$ node example.js --test-field 1 -{ _: [], 'test-field': 1, testField: 1 } -``` - -### strip dashed - -* default: `false` -* key: `strip-dashed` - -Should dashed keys be removed before returning results? This option has no effect if -`camel-case-expansion` is disabled. - -_If disabled:_ - -```console -$ node example.js --test-field 1 -{ _: [], 'test-field': 1, testField: 1 } -``` - -_If enabled:_ - -```console -$ node example.js --test-field 1 -{ _: [], testField: 1 } -``` - -### unknown options as args - -* default: `false` -* key: `unknown-options-as-args` - -Should unknown options be treated like regular arguments? An unknown option is one that is not -configured in `opts`. - -_If disabled_ - -```console -$ node example.js --unknown-option --known-option 2 --string-option --unknown-option2 -{ _: [], unknownOption: true, knownOption: 2, stringOption: '', unknownOption2: true } -``` - -_If enabled_ - -```console -$ node example.js --unknown-option --known-option 2 --string-option --unknown-option2 -{ _: ['--unknown-option'], knownOption: 2, stringOption: '--unknown-option2' } -``` - -## Supported Node.js Versions - -Libraries in this ecosystem make a best effort to track -[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a -post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a). - -## Special Thanks - -The yargs project evolves from optimist and minimist. It owes its -existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/ - -## License - -ISC diff --git a/node_modules/yargs-parser/browser.js b/node_modules/yargs-parser/browser.js deleted file mode 100644 index 241202c..0000000 --- a/node_modules/yargs-parser/browser.js +++ /dev/null @@ -1,29 +0,0 @@ -// Main entrypoint for ESM web browser environments. Avoids using Node.js -// specific libraries, such as "path". -// -// TODO: figure out reasonable web equivalents for "resolve", "normalize", etc. -import { camelCase, decamelize, looksLikeNumber } from './build/lib/string-utils.js' -import { YargsParser } from './build/lib/yargs-parser.js' -const parser = new YargsParser({ - cwd: () => { return '' }, - format: (str, arg) => { return str.replace('%s', arg) }, - normalize: (str) => { return str }, - resolve: (str) => { return str }, - require: () => { - throw Error('loading config from files not currently supported in browser') - }, - env: () => {} -}) - -const yargsParser = function Parser (args, opts) { - const result = parser.parse(args.slice(), opts) - return result.argv -} -yargsParser.detailed = function (args, opts) { - return parser.parse(args.slice(), opts) -} -yargsParser.camelCase = camelCase -yargsParser.decamelize = decamelize -yargsParser.looksLikeNumber = looksLikeNumber - -export default yargsParser diff --git a/node_modules/yargs-parser/build/index.cjs b/node_modules/yargs-parser/build/index.cjs deleted file mode 100644 index cf6f50f..0000000 --- a/node_modules/yargs-parser/build/index.cjs +++ /dev/null @@ -1,1050 +0,0 @@ -'use strict'; - -var util = require('util'); -var path = require('path'); -var fs = require('fs'); - -function camelCase(str) { - const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase(); - if (!isCamelCase) { - str = str.toLowerCase(); - } - if (str.indexOf('-') === -1 && str.indexOf('_') === -1) { - return str; - } - else { - let camelcase = ''; - let nextChrUpper = false; - const leadingHyphens = str.match(/^-+/); - for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) { - let chr = str.charAt(i); - if (nextChrUpper) { - nextChrUpper = false; - chr = chr.toUpperCase(); - } - if (i !== 0 && (chr === '-' || chr === '_')) { - nextChrUpper = true; - } - else if (chr !== '-' && chr !== '_') { - camelcase += chr; - } - } - return camelcase; - } -} -function decamelize(str, joinString) { - const lowercase = str.toLowerCase(); - joinString = joinString || '-'; - let notCamelcase = ''; - for (let i = 0; i < str.length; i++) { - const chrLower = lowercase.charAt(i); - const chrString = str.charAt(i); - if (chrLower !== chrString && i > 0) { - notCamelcase += `${joinString}${lowercase.charAt(i)}`; - } - else { - notCamelcase += chrString; - } - } - return notCamelcase; -} -function looksLikeNumber(x) { - if (x === null || x === undefined) - return false; - if (typeof x === 'number') - return true; - if (/^0x[0-9a-f]+$/i.test(x)) - return true; - if (/^0[^.]/.test(x)) - return false; - return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - -function tokenizeArgString(argString) { - if (Array.isArray(argString)) { - return argString.map(e => typeof e !== 'string' ? e + '' : e); - } - argString = argString.trim(); - let i = 0; - let prevC = null; - let c = null; - let opening = null; - const args = []; - for (let ii = 0; ii < argString.length; ii++) { - prevC = c; - c = argString.charAt(ii); - if (c === ' ' && !opening) { - if (!(prevC === ' ')) { - i++; - } - continue; - } - if (c === opening) { - opening = null; - } - else if ((c === "'" || c === '"') && !opening) { - opening = c; - } - if (!args[i]) - args[i] = ''; - args[i] += c; - } - return args; -} - -var DefaultValuesForTypeKey; -(function (DefaultValuesForTypeKey) { - DefaultValuesForTypeKey["BOOLEAN"] = "boolean"; - DefaultValuesForTypeKey["STRING"] = "string"; - DefaultValuesForTypeKey["NUMBER"] = "number"; - DefaultValuesForTypeKey["ARRAY"] = "array"; -})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {})); - -let mixin; -class YargsParser { - constructor(_mixin) { - mixin = _mixin; - } - parse(argsInput, options) { - const opts = Object.assign({ - alias: undefined, - array: undefined, - boolean: undefined, - config: undefined, - configObjects: undefined, - configuration: undefined, - coerce: undefined, - count: undefined, - default: undefined, - envPrefix: undefined, - narg: undefined, - normalize: undefined, - string: undefined, - number: undefined, - __: undefined, - key: undefined - }, options); - const args = tokenizeArgString(argsInput); - const inputIsString = typeof argsInput === 'string'; - const aliases = combineAliases(Object.assign(Object.create(null), opts.alias)); - const configuration = Object.assign({ - 'boolean-negation': true, - 'camel-case-expansion': true, - 'combine-arrays': false, - 'dot-notation': true, - 'duplicate-arguments-array': true, - 'flatten-duplicate-arrays': true, - 'greedy-arrays': true, - 'halt-at-non-option': false, - 'nargs-eats-options': false, - 'negation-prefix': 'no-', - 'parse-numbers': true, - 'parse-positional-numbers': true, - 'populate--': false, - 'set-placeholder-key': false, - 'short-option-groups': true, - 'strip-aliased': false, - 'strip-dashed': false, - 'unknown-options-as-args': false - }, opts.configuration); - const defaults = Object.assign(Object.create(null), opts.default); - const configObjects = opts.configObjects || []; - const envPrefix = opts.envPrefix; - const notFlagsOption = configuration['populate--']; - const notFlagsArgv = notFlagsOption ? '--' : '_'; - const newAliases = Object.create(null); - const defaulted = Object.create(null); - const __ = opts.__ || mixin.format; - const flags = { - aliases: Object.create(null), - arrays: Object.create(null), - bools: Object.create(null), - strings: Object.create(null), - numbers: Object.create(null), - counts: Object.create(null), - normalize: Object.create(null), - configs: Object.create(null), - nargs: Object.create(null), - coercions: Object.create(null), - keys: [] - }; - const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/; - const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)'); - [].concat(opts.array || []).filter(Boolean).forEach(function (opt) { - const key = typeof opt === 'object' ? opt.key : opt; - const assignment = Object.keys(opt).map(function (key) { - const arrayFlagKeys = { - boolean: 'bools', - string: 'strings', - number: 'numbers' - }; - return arrayFlagKeys[key]; - }).filter(Boolean).pop(); - if (assignment) { - flags[assignment][key] = true; - } - flags.arrays[key] = true; - flags.keys.push(key); - }); - [].concat(opts.boolean || []).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - flags.keys.push(key); - }); - [].concat(opts.string || []).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - flags.keys.push(key); - }); - [].concat(opts.number || []).filter(Boolean).forEach(function (key) { - flags.numbers[key] = true; - flags.keys.push(key); - }); - [].concat(opts.count || []).filter(Boolean).forEach(function (key) { - flags.counts[key] = true; - flags.keys.push(key); - }); - [].concat(opts.normalize || []).filter(Boolean).forEach(function (key) { - flags.normalize[key] = true; - flags.keys.push(key); - }); - if (typeof opts.narg === 'object') { - Object.entries(opts.narg).forEach(([key, value]) => { - if (typeof value === 'number') { - flags.nargs[key] = value; - flags.keys.push(key); - } - }); - } - if (typeof opts.coerce === 'object') { - Object.entries(opts.coerce).forEach(([key, value]) => { - if (typeof value === 'function') { - flags.coercions[key] = value; - flags.keys.push(key); - } - }); - } - if (typeof opts.config !== 'undefined') { - if (Array.isArray(opts.config) || typeof opts.config === 'string') { - [].concat(opts.config).filter(Boolean).forEach(function (key) { - flags.configs[key] = true; - }); - } - else if (typeof opts.config === 'object') { - Object.entries(opts.config).forEach(([key, value]) => { - if (typeof value === 'boolean' || typeof value === 'function') { - flags.configs[key] = value; - } - }); - } - } - extendAliases(opts.key, aliases, opts.default, flags.arrays); - Object.keys(defaults).forEach(function (key) { - (flags.aliases[key] || []).forEach(function (alias) { - defaults[alias] = defaults[key]; - }); - }); - let error = null; - checkConfiguration(); - let notFlags = []; - const argv = Object.assign(Object.create(null), { _: [] }); - const argvReturn = {}; - for (let i = 0; i < args.length; i++) { - const arg = args[i]; - const truncatedArg = arg.replace(/^-{3,}/, '---'); - let broken; - let key; - let letters; - let m; - let next; - let value; - if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) { - pushPositional(arg); - } - else if (truncatedArg.match(/^---+(=|$)/)) { - pushPositional(arg); - continue; - } - else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) { - m = arg.match(/^--?([^=]+)=([\s\S]*)$/); - if (m !== null && Array.isArray(m) && m.length >= 3) { - if (checkAllAliases(m[1], flags.arrays)) { - i = eatArray(i, m[1], args, m[2]); - } - else if (checkAllAliases(m[1], flags.nargs) !== false) { - i = eatNargs(i, m[1], args, m[2]); - } - else { - setArg(m[1], m[2], true); - } - } - } - else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { - m = arg.match(negatedBoolean); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false); - } - } - else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) { - m = arg.match(/^--?(.+)/); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - if (checkAllAliases(key, flags.arrays)) { - i = eatArray(i, key, args); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - i = eatNargs(i, key, args); - } - else { - next = args[i + 1]; - if (next !== undefined && (!next.match(/^-/) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - } - else if (arg.match(/^-.\..+=/)) { - m = arg.match(/^-([^=]+)=([\s\S]*)$/); - if (m !== null && Array.isArray(m) && m.length >= 3) { - setArg(m[1], m[2]); - } - } - else if (arg.match(/^-.\..+/) && !arg.match(negative)) { - next = args[i + 1]; - m = arg.match(/^-(.\..+)/); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - if (next !== undefined && !next.match(/^-/) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { - letters = arg.slice(1, -1).split(''); - broken = false; - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - if (letters[j + 1] && letters[j + 1] === '=') { - value = arg.slice(j + 3); - key = letters[j]; - if (checkAllAliases(key, flags.arrays)) { - i = eatArray(i, key, args, value); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - i = eatNargs(i, key, args, value); - } - else { - setArg(key, value); - } - broken = true; - break; - } - if (next === '-') { - setArg(letters[j], next); - continue; - } - if (/[A-Za-z]/.test(letters[j]) && - /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) && - checkAllAliases(next, flags.bools) === false) { - setArg(letters[j], next); - broken = true; - break; - } - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], next); - broken = true; - break; - } - else { - setArg(letters[j], defaultValue(letters[j])); - } - } - key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (checkAllAliases(key, flags.arrays)) { - i = eatArray(i, key, args); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - i = eatNargs(i, key, args); - } - else { - next = args[i + 1]; - if (next !== undefined && (!/^(-|--)[^-]/.test(next) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - } - else if (arg.match(/^-[0-9]$/) && - arg.match(negative) && - checkAllAliases(arg.slice(1), flags.bools)) { - key = arg.slice(1); - setArg(key, defaultValue(key)); - } - else if (arg === '--') { - notFlags = args.slice(i + 1); - break; - } - else if (configuration['halt-at-non-option']) { - notFlags = args.slice(i); - break; - } - else { - pushPositional(arg); - } - } - applyEnvVars(argv, true); - applyEnvVars(argv, false); - setConfig(argv); - setConfigObjects(); - applyDefaultsAndAliases(argv, flags.aliases, defaults, true); - applyCoercions(argv); - if (configuration['set-placeholder-key']) - setPlaceholderKeys(argv); - Object.keys(flags.counts).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) - setArg(key, 0); - }); - if (notFlagsOption && notFlags.length) - argv[notFlagsArgv] = []; - notFlags.forEach(function (key) { - argv[notFlagsArgv].push(key); - }); - if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { - Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { - delete argv[key]; - }); - } - if (configuration['strip-aliased']) { - [].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { - if (configuration['camel-case-expansion'] && alias.includes('-')) { - delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')]; - } - delete argv[alias]; - }); - } - function pushPositional(arg) { - const maybeCoercedNumber = maybeCoerceNumber('_', arg); - if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') { - argv._.push(maybeCoercedNumber); - } - } - function eatNargs(i, key, args, argAfterEqualSign) { - let ii; - let toEat = checkAllAliases(key, flags.nargs); - toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat; - if (toEat === 0) { - if (!isUndefined(argAfterEqualSign)) { - error = Error(__('Argument unexpected for: %s', key)); - } - setArg(key, defaultValue(key)); - return i; - } - let available = isUndefined(argAfterEqualSign) ? 0 : 1; - if (configuration['nargs-eats-options']) { - if (args.length - (i + 1) + available < toEat) { - error = Error(__('Not enough arguments following: %s', key)); - } - available = toEat; - } - else { - for (ii = i + 1; ii < args.length; ii++) { - if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii])) - available++; - else - break; - } - if (available < toEat) - error = Error(__('Not enough arguments following: %s', key)); - } - let consumed = Math.min(available, toEat); - if (!isUndefined(argAfterEqualSign) && consumed > 0) { - setArg(key, argAfterEqualSign); - consumed--; - } - for (ii = i + 1; ii < (consumed + i + 1); ii++) { - setArg(key, args[ii]); - } - return (i + consumed); - } - function eatArray(i, key, args, argAfterEqualSign) { - let argsToSet = []; - let next = argAfterEqualSign || args[i + 1]; - const nargsCount = checkAllAliases(key, flags.nargs); - if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) { - argsToSet.push(true); - } - else if (isUndefined(next) || - (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) { - if (defaults[key] !== undefined) { - const defVal = defaults[key]; - argsToSet = Array.isArray(defVal) ? defVal : [defVal]; - } - } - else { - if (!isUndefined(argAfterEqualSign)) { - argsToSet.push(processValue(key, argAfterEqualSign, true)); - } - for (let ii = i + 1; ii < args.length; ii++) { - if ((!configuration['greedy-arrays'] && argsToSet.length > 0) || - (nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount)) - break; - next = args[ii]; - if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) - break; - i = ii; - argsToSet.push(processValue(key, next, inputIsString)); - } - } - if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) || - (isNaN(nargsCount) && argsToSet.length === 0))) { - error = Error(__('Not enough arguments following: %s', key)); - } - setArg(key, argsToSet); - return i; - } - function setArg(key, val, shouldStripQuotes = inputIsString) { - if (/-/.test(key) && configuration['camel-case-expansion']) { - const alias = key.split('.').map(function (prop) { - return camelCase(prop); - }).join('.'); - addNewAlias(key, alias); - } - const value = processValue(key, val, shouldStripQuotes); - const splitKey = key.split('.'); - setKey(argv, splitKey, value); - if (flags.aliases[key]) { - flags.aliases[key].forEach(function (x) { - const keyProperties = x.split('.'); - setKey(argv, keyProperties, value); - }); - } - if (splitKey.length > 1 && configuration['dot-notation']) { - (flags.aliases[splitKey[0]] || []).forEach(function (x) { - let keyProperties = x.split('.'); - const a = [].concat(splitKey); - a.shift(); - keyProperties = keyProperties.concat(a); - if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) { - setKey(argv, keyProperties, value); - } - }); - } - if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { - const keys = [key].concat(flags.aliases[key] || []); - keys.forEach(function (key) { - Object.defineProperty(argvReturn, key, { - enumerable: true, - get() { - return val; - }, - set(value) { - val = typeof value === 'string' ? mixin.normalize(value) : value; - } - }); - }); - } - } - function addNewAlias(key, alias) { - if (!(flags.aliases[key] && flags.aliases[key].length)) { - flags.aliases[key] = [alias]; - newAliases[alias] = true; - } - if (!(flags.aliases[alias] && flags.aliases[alias].length)) { - addNewAlias(alias, key); - } - } - function processValue(key, val, shouldStripQuotes) { - if (shouldStripQuotes) { - val = stripQuotes(val); - } - if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { - if (typeof val === 'string') - val = val === 'true'; - } - let value = Array.isArray(val) - ? val.map(function (v) { return maybeCoerceNumber(key, v); }) - : maybeCoerceNumber(key, val); - if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { - value = increment(); - } - if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { - if (Array.isArray(val)) - value = val.map((val) => { return mixin.normalize(val); }); - else - value = mixin.normalize(val); - } - return value; - } - function maybeCoerceNumber(key, value) { - if (!configuration['parse-positional-numbers'] && key === '_') - return value; - if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { - const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`)))); - if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) { - value = Number(value); - } - } - return value; - } - function setConfig(argv) { - const configLookup = Object.create(null); - applyDefaultsAndAliases(configLookup, flags.aliases, defaults); - Object.keys(flags.configs).forEach(function (configKey) { - const configPath = argv[configKey] || configLookup[configKey]; - if (configPath) { - try { - let config = null; - const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath); - const resolveConfig = flags.configs[configKey]; - if (typeof resolveConfig === 'function') { - try { - config = resolveConfig(resolvedConfigPath); - } - catch (e) { - config = e; - } - if (config instanceof Error) { - error = config; - return; - } - } - else { - config = mixin.require(resolvedConfigPath); - } - setConfigObject(config); - } - catch (ex) { - if (ex.name === 'PermissionDenied') - error = ex; - else if (argv[configKey]) - error = Error(__('Invalid JSON config file: %s', configPath)); - } - } - }); - } - function setConfigObject(config, prev) { - Object.keys(config).forEach(function (key) { - const value = config[key]; - const fullKey = prev ? prev + '.' + key : key; - if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { - setConfigObject(value, fullKey); - } - else { - if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) { - setArg(fullKey, value); - } - } - }); - } - function setConfigObjects() { - if (typeof configObjects !== 'undefined') { - configObjects.forEach(function (configObject) { - setConfigObject(configObject); - }); - } - } - function applyEnvVars(argv, configOnly) { - if (typeof envPrefix === 'undefined') - return; - const prefix = typeof envPrefix === 'string' ? envPrefix : ''; - const env = mixin.env(); - Object.keys(env).forEach(function (envVar) { - if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { - const keys = envVar.split('__').map(function (key, i) { - if (i === 0) { - key = key.substring(prefix.length); - } - return camelCase(key); - }); - if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) { - setArg(keys.join('.'), env[envVar]); - } - } - }); - } - function applyCoercions(argv) { - let coerce; - const applied = new Set(); - Object.keys(argv).forEach(function (key) { - if (!applied.has(key)) { - coerce = checkAllAliases(key, flags.coercions); - if (typeof coerce === 'function') { - try { - const value = maybeCoerceNumber(key, coerce(argv[key])); - ([].concat(flags.aliases[key] || [], key)).forEach(ali => { - applied.add(ali); - argv[ali] = value; - }); - } - catch (err) { - error = err; - } - } - } - }); - } - function setPlaceholderKeys(argv) { - flags.keys.forEach((key) => { - if (~key.indexOf('.')) - return; - if (typeof argv[key] === 'undefined') - argv[key] = undefined; - }); - return argv; - } - function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) { - Object.keys(defaults).forEach(function (key) { - if (!hasKey(obj, key.split('.'))) { - setKey(obj, key.split('.'), defaults[key]); - if (canLog) - defaulted[key] = true; - (aliases[key] || []).forEach(function (x) { - if (hasKey(obj, x.split('.'))) - return; - setKey(obj, x.split('.'), defaults[key]); - }); - } - }); - } - function hasKey(obj, keys) { - let o = obj; - if (!configuration['dot-notation']) - keys = [keys.join('.')]; - keys.slice(0, -1).forEach(function (key) { - o = (o[key] || {}); - }); - const key = keys[keys.length - 1]; - if (typeof o !== 'object') - return false; - else - return key in o; - } - function setKey(obj, keys, value) { - let o = obj; - if (!configuration['dot-notation']) - keys = [keys.join('.')]; - keys.slice(0, -1).forEach(function (key) { - key = sanitizeKey(key); - if (typeof o === 'object' && o[key] === undefined) { - o[key] = {}; - } - if (typeof o[key] !== 'object' || Array.isArray(o[key])) { - if (Array.isArray(o[key])) { - o[key].push({}); - } - else { - o[key] = [o[key], {}]; - } - o = o[key][o[key].length - 1]; - } - else { - o = o[key]; - } - }); - const key = sanitizeKey(keys[keys.length - 1]); - const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays); - const isValueArray = Array.isArray(value); - let duplicate = configuration['duplicate-arguments-array']; - if (!duplicate && checkAllAliases(key, flags.nargs)) { - duplicate = true; - if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { - o[key] = undefined; - } - } - if (value === increment()) { - o[key] = increment(o[key]); - } - else if (Array.isArray(o[key])) { - if (duplicate && isTypeArray && isValueArray) { - o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]); - } - else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { - o[key] = value; - } - else { - o[key] = o[key].concat([value]); - } - } - else if (o[key] === undefined && isTypeArray) { - o[key] = isValueArray ? value : [value]; - } - else if (duplicate && !(o[key] === undefined || - checkAllAliases(key, flags.counts) || - checkAllAliases(key, flags.bools))) { - o[key] = [o[key], value]; - } - else { - o[key] = value; - } - } - function extendAliases(...args) { - args.forEach(function (obj) { - Object.keys(obj || {}).forEach(function (key) { - if (flags.aliases[key]) - return; - flags.aliases[key] = [].concat(aliases[key] || []); - flags.aliases[key].concat(key).forEach(function (x) { - if (/-/.test(x) && configuration['camel-case-expansion']) { - const c = camelCase(x); - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c); - newAliases[c] = true; - } - } - }); - flags.aliases[key].concat(key).forEach(function (x) { - if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { - const c = decamelize(x, '-'); - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c); - newAliases[c] = true; - } - } - }); - flags.aliases[key].forEach(function (x) { - flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - }); - } - function checkAllAliases(key, flag) { - const toCheck = [].concat(flags.aliases[key] || [], key); - const keys = Object.keys(flag); - const setAlias = toCheck.find(key => keys.includes(key)); - return setAlias ? flag[setAlias] : false; - } - function hasAnyFlag(key) { - const flagsKeys = Object.keys(flags); - const toCheck = [].concat(flagsKeys.map(k => flags[k])); - return toCheck.some(function (flag) { - return Array.isArray(flag) ? flag.includes(key) : flag[key]; - }); - } - function hasFlagsMatching(arg, ...patterns) { - const toCheck = [].concat(...patterns); - return toCheck.some(function (pattern) { - const match = arg.match(pattern); - return match && hasAnyFlag(match[1]); - }); - } - function hasAllShortFlags(arg) { - if (arg.match(negative) || !arg.match(/^-[^-]+/)) { - return false; - } - let hasAllFlags = true; - let next; - const letters = arg.slice(1).split(''); - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - if (!hasAnyFlag(letters[j])) { - hasAllFlags = false; - break; - } - if ((letters[j + 1] && letters[j + 1] === '=') || - next === '-' || - (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) || - (letters[j + 1] && letters[j + 1].match(/\W/))) { - break; - } - } - return hasAllFlags; - } - function isUnknownOptionAsArg(arg) { - return configuration['unknown-options-as-args'] && isUnknownOption(arg); - } - function isUnknownOption(arg) { - arg = arg.replace(/^-{3,}/, '--'); - if (arg.match(negative)) { - return false; - } - if (hasAllShortFlags(arg)) { - return false; - } - const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/; - const normalFlag = /^-+([^=]+?)$/; - const flagEndingInHyphen = /^-+([^=]+?)-$/; - const flagEndingInDigits = /^-+([^=]+?\d+)$/; - const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/; - return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters); - } - function defaultValue(key) { - if (!checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts) && - `${key}` in defaults) { - return defaults[key]; - } - else { - return defaultForType(guessType(key)); - } - } - function defaultForType(type) { - const def = { - [DefaultValuesForTypeKey.BOOLEAN]: true, - [DefaultValuesForTypeKey.STRING]: '', - [DefaultValuesForTypeKey.NUMBER]: undefined, - [DefaultValuesForTypeKey.ARRAY]: [] - }; - return def[type]; - } - function guessType(key) { - let type = DefaultValuesForTypeKey.BOOLEAN; - if (checkAllAliases(key, flags.strings)) - type = DefaultValuesForTypeKey.STRING; - else if (checkAllAliases(key, flags.numbers)) - type = DefaultValuesForTypeKey.NUMBER; - else if (checkAllAliases(key, flags.bools)) - type = DefaultValuesForTypeKey.BOOLEAN; - else if (checkAllAliases(key, flags.arrays)) - type = DefaultValuesForTypeKey.ARRAY; - return type; - } - function isUndefined(num) { - return num === undefined; - } - function checkConfiguration() { - Object.keys(flags.counts).find(key => { - if (checkAllAliases(key, flags.arrays)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key)); - return true; - } - else if (checkAllAliases(key, flags.nargs)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key)); - return true; - } - return false; - }); - } - return { - aliases: Object.assign({}, flags.aliases), - argv: Object.assign(argvReturn, argv), - configuration: configuration, - defaulted: Object.assign({}, defaulted), - error: error, - newAliases: Object.assign({}, newAliases) - }; - } -} -function combineAliases(aliases) { - const aliasArrays = []; - const combined = Object.create(null); - let change = true; - Object.keys(aliases).forEach(function (key) { - aliasArrays.push([].concat(aliases[key], key)); - }); - while (change) { - change = false; - for (let i = 0; i < aliasArrays.length; i++) { - for (let ii = i + 1; ii < aliasArrays.length; ii++) { - const intersect = aliasArrays[i].filter(function (v) { - return aliasArrays[ii].indexOf(v) !== -1; - }); - if (intersect.length) { - aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]); - aliasArrays.splice(ii, 1); - change = true; - break; - } - } - } - } - aliasArrays.forEach(function (aliasArray) { - aliasArray = aliasArray.filter(function (v, i, self) { - return self.indexOf(v) === i; - }); - const lastAlias = aliasArray.pop(); - if (lastAlias !== undefined && typeof lastAlias === 'string') { - combined[lastAlias] = aliasArray; - } - }); - return combined; -} -function increment(orig) { - return orig !== undefined ? orig + 1 : 1; -} -function sanitizeKey(key) { - if (key === '__proto__') - return '___proto___'; - return key; -} -function stripQuotes(val) { - return (typeof val === 'string' && - (val[0] === "'" || val[0] === '"') && - val[val.length - 1] === val[0]) - ? val.substring(1, val.length - 1) - : val; -} - -var _a, _b, _c; -const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION) - ? Number(process.env.YARGS_MIN_NODE_VERSION) - : 12; -const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1); -if (nodeVersion) { - const major = Number(nodeVersion.match(/^([^.]+)/)[1]); - if (major < minNodeVersion) { - throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`); - } -} -const env = process ? process.env : {}; -const parser = new YargsParser({ - cwd: process.cwd, - env: () => { - return env; - }, - format: util.format, - normalize: path.normalize, - resolve: path.resolve, - require: (path) => { - if (typeof require !== 'undefined') { - return require(path); - } - else if (path.match(/\.json$/)) { - return JSON.parse(fs.readFileSync(path, 'utf8')); - } - else { - throw Error('only .json config files are supported in ESM'); - } - } -}); -const yargsParser = function Parser(args, opts) { - const result = parser.parse(args.slice(), opts); - return result.argv; -}; -yargsParser.detailed = function (args, opts) { - return parser.parse(args.slice(), opts); -}; -yargsParser.camelCase = camelCase; -yargsParser.decamelize = decamelize; -yargsParser.looksLikeNumber = looksLikeNumber; - -module.exports = yargsParser; diff --git a/node_modules/yargs-parser/build/lib/index.js b/node_modules/yargs-parser/build/lib/index.js deleted file mode 100644 index 43ef485..0000000 --- a/node_modules/yargs-parser/build/lib/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * @fileoverview Main entrypoint for libraries using yargs-parser in Node.js - * CJS and ESM environments. - * - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -var _a, _b, _c; -import { format } from 'util'; -import { normalize, resolve } from 'path'; -import { camelCase, decamelize, looksLikeNumber } from './string-utils.js'; -import { YargsParser } from './yargs-parser.js'; -import { readFileSync } from 'fs'; -// See https://github.com/yargs/yargs-parser#supported-nodejs-versions for our -// version support policy. The YARGS_MIN_NODE_VERSION is used for testing only. -const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION) - ? Number(process.env.YARGS_MIN_NODE_VERSION) - : 12; -const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1); -if (nodeVersion) { - const major = Number(nodeVersion.match(/^([^.]+)/)[1]); - if (major < minNodeVersion) { - throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`); - } -} -// Creates a yargs-parser instance using Node.js standard libraries: -const env = process ? process.env : {}; -const parser = new YargsParser({ - cwd: process.cwd, - env: () => { - return env; - }, - format, - normalize, - resolve, - // TODO: figure out a way to combine ESM and CJS coverage, such that - // we can exercise all the lines below: - require: (path) => { - if (typeof require !== 'undefined') { - return require(path); - } - else if (path.match(/\.json$/)) { - // Addresses: https://github.com/yargs/yargs/issues/2040 - return JSON.parse(readFileSync(path, 'utf8')); - } - else { - throw Error('only .json config files are supported in ESM'); - } - } -}); -const yargsParser = function Parser(args, opts) { - const result = parser.parse(args.slice(), opts); - return result.argv; -}; -yargsParser.detailed = function (args, opts) { - return parser.parse(args.slice(), opts); -}; -yargsParser.camelCase = camelCase; -yargsParser.decamelize = decamelize; -yargsParser.looksLikeNumber = looksLikeNumber; -export default yargsParser; diff --git a/node_modules/yargs-parser/build/lib/string-utils.js b/node_modules/yargs-parser/build/lib/string-utils.js deleted file mode 100644 index 4e8bd99..0000000 --- a/node_modules/yargs-parser/build/lib/string-utils.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -export function camelCase(str) { - // Handle the case where an argument is provided as camel case, e.g., fooBar. - // by ensuring that the string isn't already mixed case: - const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase(); - if (!isCamelCase) { - str = str.toLowerCase(); - } - if (str.indexOf('-') === -1 && str.indexOf('_') === -1) { - return str; - } - else { - let camelcase = ''; - let nextChrUpper = false; - const leadingHyphens = str.match(/^-+/); - for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) { - let chr = str.charAt(i); - if (nextChrUpper) { - nextChrUpper = false; - chr = chr.toUpperCase(); - } - if (i !== 0 && (chr === '-' || chr === '_')) { - nextChrUpper = true; - } - else if (chr !== '-' && chr !== '_') { - camelcase += chr; - } - } - return camelcase; - } -} -export function decamelize(str, joinString) { - const lowercase = str.toLowerCase(); - joinString = joinString || '-'; - let notCamelcase = ''; - for (let i = 0; i < str.length; i++) { - const chrLower = lowercase.charAt(i); - const chrString = str.charAt(i); - if (chrLower !== chrString && i > 0) { - notCamelcase += `${joinString}${lowercase.charAt(i)}`; - } - else { - notCamelcase += chrString; - } - } - return notCamelcase; -} -export function looksLikeNumber(x) { - if (x === null || x === undefined) - return false; - // if loaded from config, may already be a number. - if (typeof x === 'number') - return true; - // hexadecimal. - if (/^0x[0-9a-f]+$/i.test(x)) - return true; - // don't treat 0123 as a number; as it drops the leading '0'. - if (/^0[^.]/.test(x)) - return false; - return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} diff --git a/node_modules/yargs-parser/build/lib/tokenize-arg-string.js b/node_modules/yargs-parser/build/lib/tokenize-arg-string.js deleted file mode 100644 index 5e732ef..0000000 --- a/node_modules/yargs-parser/build/lib/tokenize-arg-string.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -// take an un-split argv string and tokenize it. -export function tokenizeArgString(argString) { - if (Array.isArray(argString)) { - return argString.map(e => typeof e !== 'string' ? e + '' : e); - } - argString = argString.trim(); - let i = 0; - let prevC = null; - let c = null; - let opening = null; - const args = []; - for (let ii = 0; ii < argString.length; ii++) { - prevC = c; - c = argString.charAt(ii); - // split on spaces unless we're in quotes. - if (c === ' ' && !opening) { - if (!(prevC === ' ')) { - i++; - } - continue; - } - // don't split the string if we're in matching - // opening or closing single and double quotes. - if (c === opening) { - opening = null; - } - else if ((c === "'" || c === '"') && !opening) { - opening = c; - } - if (!args[i]) - args[i] = ''; - args[i] += c; - } - return args; -} diff --git a/node_modules/yargs-parser/build/lib/yargs-parser-types.js b/node_modules/yargs-parser/build/lib/yargs-parser-types.js deleted file mode 100644 index 63b7c31..0000000 --- a/node_modules/yargs-parser/build/lib/yargs-parser-types.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -export var DefaultValuesForTypeKey; -(function (DefaultValuesForTypeKey) { - DefaultValuesForTypeKey["BOOLEAN"] = "boolean"; - DefaultValuesForTypeKey["STRING"] = "string"; - DefaultValuesForTypeKey["NUMBER"] = "number"; - DefaultValuesForTypeKey["ARRAY"] = "array"; -})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {})); diff --git a/node_modules/yargs-parser/build/lib/yargs-parser.js b/node_modules/yargs-parser/build/lib/yargs-parser.js deleted file mode 100644 index 415d4bc..0000000 --- a/node_modules/yargs-parser/build/lib/yargs-parser.js +++ /dev/null @@ -1,1045 +0,0 @@ -/** - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -import { tokenizeArgString } from './tokenize-arg-string.js'; -import { DefaultValuesForTypeKey } from './yargs-parser-types.js'; -import { camelCase, decamelize, looksLikeNumber } from './string-utils.js'; -let mixin; -export class YargsParser { - constructor(_mixin) { - mixin = _mixin; - } - parse(argsInput, options) { - const opts = Object.assign({ - alias: undefined, - array: undefined, - boolean: undefined, - config: undefined, - configObjects: undefined, - configuration: undefined, - coerce: undefined, - count: undefined, - default: undefined, - envPrefix: undefined, - narg: undefined, - normalize: undefined, - string: undefined, - number: undefined, - __: undefined, - key: undefined - }, options); - // allow a string argument to be passed in rather - // than an argv array. - const args = tokenizeArgString(argsInput); - // tokenizeArgString adds extra quotes to args if argsInput is a string - // only strip those extra quotes in processValue if argsInput is a string - const inputIsString = typeof argsInput === 'string'; - // aliases might have transitive relationships, normalize this. - const aliases = combineAliases(Object.assign(Object.create(null), opts.alias)); - const configuration = Object.assign({ - 'boolean-negation': true, - 'camel-case-expansion': true, - 'combine-arrays': false, - 'dot-notation': true, - 'duplicate-arguments-array': true, - 'flatten-duplicate-arrays': true, - 'greedy-arrays': true, - 'halt-at-non-option': false, - 'nargs-eats-options': false, - 'negation-prefix': 'no-', - 'parse-numbers': true, - 'parse-positional-numbers': true, - 'populate--': false, - 'set-placeholder-key': false, - 'short-option-groups': true, - 'strip-aliased': false, - 'strip-dashed': false, - 'unknown-options-as-args': false - }, opts.configuration); - const defaults = Object.assign(Object.create(null), opts.default); - const configObjects = opts.configObjects || []; - const envPrefix = opts.envPrefix; - const notFlagsOption = configuration['populate--']; - const notFlagsArgv = notFlagsOption ? '--' : '_'; - const newAliases = Object.create(null); - const defaulted = Object.create(null); - // allow a i18n handler to be passed in, default to a fake one (util.format). - const __ = opts.__ || mixin.format; - const flags = { - aliases: Object.create(null), - arrays: Object.create(null), - bools: Object.create(null), - strings: Object.create(null), - numbers: Object.create(null), - counts: Object.create(null), - normalize: Object.create(null), - configs: Object.create(null), - nargs: Object.create(null), - coercions: Object.create(null), - keys: [] - }; - const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/; - const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)'); - [].concat(opts.array || []).filter(Boolean).forEach(function (opt) { - const key = typeof opt === 'object' ? opt.key : opt; - // assign to flags[bools|strings|numbers] - const assignment = Object.keys(opt).map(function (key) { - const arrayFlagKeys = { - boolean: 'bools', - string: 'strings', - number: 'numbers' - }; - return arrayFlagKeys[key]; - }).filter(Boolean).pop(); - // assign key to be coerced - if (assignment) { - flags[assignment][key] = true; - } - flags.arrays[key] = true; - flags.keys.push(key); - }); - [].concat(opts.boolean || []).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - flags.keys.push(key); - }); - [].concat(opts.string || []).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - flags.keys.push(key); - }); - [].concat(opts.number || []).filter(Boolean).forEach(function (key) { - flags.numbers[key] = true; - flags.keys.push(key); - }); - [].concat(opts.count || []).filter(Boolean).forEach(function (key) { - flags.counts[key] = true; - flags.keys.push(key); - }); - [].concat(opts.normalize || []).filter(Boolean).forEach(function (key) { - flags.normalize[key] = true; - flags.keys.push(key); - }); - if (typeof opts.narg === 'object') { - Object.entries(opts.narg).forEach(([key, value]) => { - if (typeof value === 'number') { - flags.nargs[key] = value; - flags.keys.push(key); - } - }); - } - if (typeof opts.coerce === 'object') { - Object.entries(opts.coerce).forEach(([key, value]) => { - if (typeof value === 'function') { - flags.coercions[key] = value; - flags.keys.push(key); - } - }); - } - if (typeof opts.config !== 'undefined') { - if (Array.isArray(opts.config) || typeof opts.config === 'string') { - ; - [].concat(opts.config).filter(Boolean).forEach(function (key) { - flags.configs[key] = true; - }); - } - else if (typeof opts.config === 'object') { - Object.entries(opts.config).forEach(([key, value]) => { - if (typeof value === 'boolean' || typeof value === 'function') { - flags.configs[key] = value; - } - }); - } - } - // create a lookup table that takes into account all - // combinations of aliases: {f: ['foo'], foo: ['f']} - extendAliases(opts.key, aliases, opts.default, flags.arrays); - // apply default values to all aliases. - Object.keys(defaults).forEach(function (key) { - (flags.aliases[key] || []).forEach(function (alias) { - defaults[alias] = defaults[key]; - }); - }); - let error = null; - checkConfiguration(); - let notFlags = []; - const argv = Object.assign(Object.create(null), { _: [] }); - // TODO(bcoe): for the first pass at removing object prototype we didn't - // remove all prototypes from objects returned by this API, we might want - // to gradually move towards doing so. - const argvReturn = {}; - for (let i = 0; i < args.length; i++) { - const arg = args[i]; - const truncatedArg = arg.replace(/^-{3,}/, '---'); - let broken; - let key; - let letters; - let m; - let next; - let value; - // any unknown option (except for end-of-options, "--") - if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) { - pushPositional(arg); - // ---, ---=, ----, etc, - } - else if (truncatedArg.match(/^---+(=|$)/)) { - // options without key name are invalid. - pushPositional(arg); - continue; - // -- separated by = - } - else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - m = arg.match(/^--?([^=]+)=([\s\S]*)$/); - // arrays format = '--f=a b c' - if (m !== null && Array.isArray(m) && m.length >= 3) { - if (checkAllAliases(m[1], flags.arrays)) { - i = eatArray(i, m[1], args, m[2]); - } - else if (checkAllAliases(m[1], flags.nargs) !== false) { - // nargs format = '--f=monkey washing cat' - i = eatNargs(i, m[1], args, m[2]); - } - else { - setArg(m[1], m[2], true); - } - } - } - else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { - m = arg.match(negatedBoolean); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false); - } - // -- separated by space. - } - else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) { - m = arg.match(/^--?(.+)/); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - if (checkAllAliases(key, flags.arrays)) { - // array format = '--foo a b c' - i = eatArray(i, key, args); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - // nargs format = '--foo a b c' - // should be truthy even if: flags.nargs[key] === 0 - i = eatNargs(i, key, args); - } - else { - next = args[i + 1]; - if (next !== undefined && (!next.match(/^-/) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - // dot-notation flag separated by '='. - } - else if (arg.match(/^-.\..+=/)) { - m = arg.match(/^-([^=]+)=([\s\S]*)$/); - if (m !== null && Array.isArray(m) && m.length >= 3) { - setArg(m[1], m[2]); - } - // dot-notation flag separated by space. - } - else if (arg.match(/^-.\..+/) && !arg.match(negative)) { - next = args[i + 1]; - m = arg.match(/^-(.\..+)/); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - if (next !== undefined && !next.match(/^-/) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { - letters = arg.slice(1, -1).split(''); - broken = false; - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - if (letters[j + 1] && letters[j + 1] === '=') { - value = arg.slice(j + 3); - key = letters[j]; - if (checkAllAliases(key, flags.arrays)) { - // array format = '-f=a b c' - i = eatArray(i, key, args, value); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - // nargs format = '-f=monkey washing cat' - i = eatNargs(i, key, args, value); - } - else { - setArg(key, value); - } - broken = true; - break; - } - if (next === '-') { - setArg(letters[j], next); - continue; - } - // current letter is an alphabetic character and next value is a number - if (/[A-Za-z]/.test(letters[j]) && - /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) && - checkAllAliases(next, flags.bools) === false) { - setArg(letters[j], next); - broken = true; - break; - } - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], next); - broken = true; - break; - } - else { - setArg(letters[j], defaultValue(letters[j])); - } - } - key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (checkAllAliases(key, flags.arrays)) { - // array format = '-f a b c' - i = eatArray(i, key, args); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - // nargs format = '-f a b c' - // should be truthy even if: flags.nargs[key] === 0 - i = eatNargs(i, key, args); - } - else { - next = args[i + 1]; - if (next !== undefined && (!/^(-|--)[^-]/.test(next) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - } - else if (arg.match(/^-[0-9]$/) && - arg.match(negative) && - checkAllAliases(arg.slice(1), flags.bools)) { - // single-digit boolean alias, e.g: xargs -0 - key = arg.slice(1); - setArg(key, defaultValue(key)); - } - else if (arg === '--') { - notFlags = args.slice(i + 1); - break; - } - else if (configuration['halt-at-non-option']) { - notFlags = args.slice(i); - break; - } - else { - pushPositional(arg); - } - } - // order of precedence: - // 1. command line arg - // 2. value from env var - // 3. value from config file - // 4. value from config objects - // 5. configured default value - applyEnvVars(argv, true); // special case: check env vars that point to config file - applyEnvVars(argv, false); - setConfig(argv); - setConfigObjects(); - applyDefaultsAndAliases(argv, flags.aliases, defaults, true); - applyCoercions(argv); - if (configuration['set-placeholder-key']) - setPlaceholderKeys(argv); - // for any counts either not in args or without an explicit default, set to 0 - Object.keys(flags.counts).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) - setArg(key, 0); - }); - // '--' defaults to undefined. - if (notFlagsOption && notFlags.length) - argv[notFlagsArgv] = []; - notFlags.forEach(function (key) { - argv[notFlagsArgv].push(key); - }); - if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { - Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { - delete argv[key]; - }); - } - if (configuration['strip-aliased']) { - ; - [].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { - if (configuration['camel-case-expansion'] && alias.includes('-')) { - delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')]; - } - delete argv[alias]; - }); - } - // Push argument into positional array, applying numeric coercion: - function pushPositional(arg) { - const maybeCoercedNumber = maybeCoerceNumber('_', arg); - if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') { - argv._.push(maybeCoercedNumber); - } - } - // how many arguments should we consume, based - // on the nargs option? - function eatNargs(i, key, args, argAfterEqualSign) { - let ii; - let toEat = checkAllAliases(key, flags.nargs); - // NaN has a special meaning for the array type, indicating that one or - // more values are expected. - toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat; - if (toEat === 0) { - if (!isUndefined(argAfterEqualSign)) { - error = Error(__('Argument unexpected for: %s', key)); - } - setArg(key, defaultValue(key)); - return i; - } - let available = isUndefined(argAfterEqualSign) ? 0 : 1; - if (configuration['nargs-eats-options']) { - // classic behavior, yargs eats positional and dash arguments. - if (args.length - (i + 1) + available < toEat) { - error = Error(__('Not enough arguments following: %s', key)); - } - available = toEat; - } - else { - // nargs will not consume flag arguments, e.g., -abc, --foo, - // and terminates when one is observed. - for (ii = i + 1; ii < args.length; ii++) { - if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii])) - available++; - else - break; - } - if (available < toEat) - error = Error(__('Not enough arguments following: %s', key)); - } - let consumed = Math.min(available, toEat); - if (!isUndefined(argAfterEqualSign) && consumed > 0) { - setArg(key, argAfterEqualSign); - consumed--; - } - for (ii = i + 1; ii < (consumed + i + 1); ii++) { - setArg(key, args[ii]); - } - return (i + consumed); - } - // if an option is an array, eat all non-hyphenated arguments - // following it... YUM! - // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] - function eatArray(i, key, args, argAfterEqualSign) { - let argsToSet = []; - let next = argAfterEqualSign || args[i + 1]; - // If both array and nargs are configured, enforce the nargs count: - const nargsCount = checkAllAliases(key, flags.nargs); - if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) { - argsToSet.push(true); - } - else if (isUndefined(next) || - (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) { - // for keys without value ==> argsToSet remains an empty [] - // set user default value, if available - if (defaults[key] !== undefined) { - const defVal = defaults[key]; - argsToSet = Array.isArray(defVal) ? defVal : [defVal]; - } - } - else { - // value in --option=value is eaten as is - if (!isUndefined(argAfterEqualSign)) { - argsToSet.push(processValue(key, argAfterEqualSign, true)); - } - for (let ii = i + 1; ii < args.length; ii++) { - if ((!configuration['greedy-arrays'] && argsToSet.length > 0) || - (nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount)) - break; - next = args[ii]; - if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) - break; - i = ii; - argsToSet.push(processValue(key, next, inputIsString)); - } - } - // If both array and nargs are configured, create an error if less than - // nargs positionals were found. NaN has special meaning, indicating - // that at least one value is required (more are okay). - if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) || - (isNaN(nargsCount) && argsToSet.length === 0))) { - error = Error(__('Not enough arguments following: %s', key)); - } - setArg(key, argsToSet); - return i; - } - function setArg(key, val, shouldStripQuotes = inputIsString) { - if (/-/.test(key) && configuration['camel-case-expansion']) { - const alias = key.split('.').map(function (prop) { - return camelCase(prop); - }).join('.'); - addNewAlias(key, alias); - } - const value = processValue(key, val, shouldStripQuotes); - const splitKey = key.split('.'); - setKey(argv, splitKey, value); - // handle populating aliases of the full key - if (flags.aliases[key]) { - flags.aliases[key].forEach(function (x) { - const keyProperties = x.split('.'); - setKey(argv, keyProperties, value); - }); - } - // handle populating aliases of the first element of the dot-notation key - if (splitKey.length > 1 && configuration['dot-notation']) { - ; - (flags.aliases[splitKey[0]] || []).forEach(function (x) { - let keyProperties = x.split('.'); - // expand alias with nested objects in key - const a = [].concat(splitKey); - a.shift(); // nuke the old key. - keyProperties = keyProperties.concat(a); - // populate alias only if is not already an alias of the full key - // (already populated above) - if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) { - setKey(argv, keyProperties, value); - } - }); - } - // Set normalize getter and setter when key is in 'normalize' but isn't an array - if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { - const keys = [key].concat(flags.aliases[key] || []); - keys.forEach(function (key) { - Object.defineProperty(argvReturn, key, { - enumerable: true, - get() { - return val; - }, - set(value) { - val = typeof value === 'string' ? mixin.normalize(value) : value; - } - }); - }); - } - } - function addNewAlias(key, alias) { - if (!(flags.aliases[key] && flags.aliases[key].length)) { - flags.aliases[key] = [alias]; - newAliases[alias] = true; - } - if (!(flags.aliases[alias] && flags.aliases[alias].length)) { - addNewAlias(alias, key); - } - } - function processValue(key, val, shouldStripQuotes) { - // strings may be quoted, clean this up as we assign values. - if (shouldStripQuotes) { - val = stripQuotes(val); - } - // handle parsing boolean arguments --foo=true --bar false. - if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { - if (typeof val === 'string') - val = val === 'true'; - } - let value = Array.isArray(val) - ? val.map(function (v) { return maybeCoerceNumber(key, v); }) - : maybeCoerceNumber(key, val); - // increment a count given as arg (either no value or value parsed as boolean) - if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { - value = increment(); - } - // Set normalized value when key is in 'normalize' and in 'arrays' - if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { - if (Array.isArray(val)) - value = val.map((val) => { return mixin.normalize(val); }); - else - value = mixin.normalize(val); - } - return value; - } - function maybeCoerceNumber(key, value) { - if (!configuration['parse-positional-numbers'] && key === '_') - return value; - if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { - const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`)))); - if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) { - value = Number(value); - } - } - return value; - } - // set args from config.json file, this should be - // applied last so that defaults can be applied. - function setConfig(argv) { - const configLookup = Object.create(null); - // expand defaults/aliases, in-case any happen to reference - // the config.json file. - applyDefaultsAndAliases(configLookup, flags.aliases, defaults); - Object.keys(flags.configs).forEach(function (configKey) { - const configPath = argv[configKey] || configLookup[configKey]; - if (configPath) { - try { - let config = null; - const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath); - const resolveConfig = flags.configs[configKey]; - if (typeof resolveConfig === 'function') { - try { - config = resolveConfig(resolvedConfigPath); - } - catch (e) { - config = e; - } - if (config instanceof Error) { - error = config; - return; - } - } - else { - config = mixin.require(resolvedConfigPath); - } - setConfigObject(config); - } - catch (ex) { - // Deno will receive a PermissionDenied error if an attempt is - // made to load config without the --allow-read flag: - if (ex.name === 'PermissionDenied') - error = ex; - else if (argv[configKey]) - error = Error(__('Invalid JSON config file: %s', configPath)); - } - } - }); - } - // set args from config object. - // it recursively checks nested objects. - function setConfigObject(config, prev) { - Object.keys(config).forEach(function (key) { - const value = config[key]; - const fullKey = prev ? prev + '.' + key : key; - // if the value is an inner object and we have dot-notation - // enabled, treat inner objects in config the same as - // heavily nested dot notations (foo.bar.apple). - if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { - // if the value is an object but not an array, check nested object - setConfigObject(value, fullKey); - } - else { - // setting arguments via CLI takes precedence over - // values within the config file. - if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) { - setArg(fullKey, value); - } - } - }); - } - // set all config objects passed in opts - function setConfigObjects() { - if (typeof configObjects !== 'undefined') { - configObjects.forEach(function (configObject) { - setConfigObject(configObject); - }); - } - } - function applyEnvVars(argv, configOnly) { - if (typeof envPrefix === 'undefined') - return; - const prefix = typeof envPrefix === 'string' ? envPrefix : ''; - const env = mixin.env(); - Object.keys(env).forEach(function (envVar) { - if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { - // get array of nested keys and convert them to camel case - const keys = envVar.split('__').map(function (key, i) { - if (i === 0) { - key = key.substring(prefix.length); - } - return camelCase(key); - }); - if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) { - setArg(keys.join('.'), env[envVar]); - } - } - }); - } - function applyCoercions(argv) { - let coerce; - const applied = new Set(); - Object.keys(argv).forEach(function (key) { - if (!applied.has(key)) { // If we haven't already coerced this option via one of its aliases - coerce = checkAllAliases(key, flags.coercions); - if (typeof coerce === 'function') { - try { - const value = maybeCoerceNumber(key, coerce(argv[key])); - ([].concat(flags.aliases[key] || [], key)).forEach(ali => { - applied.add(ali); - argv[ali] = value; - }); - } - catch (err) { - error = err; - } - } - } - }); - } - function setPlaceholderKeys(argv) { - flags.keys.forEach((key) => { - // don't set placeholder keys for dot notation options 'foo.bar'. - if (~key.indexOf('.')) - return; - if (typeof argv[key] === 'undefined') - argv[key] = undefined; - }); - return argv; - } - function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) { - Object.keys(defaults).forEach(function (key) { - if (!hasKey(obj, key.split('.'))) { - setKey(obj, key.split('.'), defaults[key]); - if (canLog) - defaulted[key] = true; - (aliases[key] || []).forEach(function (x) { - if (hasKey(obj, x.split('.'))) - return; - setKey(obj, x.split('.'), defaults[key]); - }); - } - }); - } - function hasKey(obj, keys) { - let o = obj; - if (!configuration['dot-notation']) - keys = [keys.join('.')]; - keys.slice(0, -1).forEach(function (key) { - o = (o[key] || {}); - }); - const key = keys[keys.length - 1]; - if (typeof o !== 'object') - return false; - else - return key in o; - } - function setKey(obj, keys, value) { - let o = obj; - if (!configuration['dot-notation']) - keys = [keys.join('.')]; - keys.slice(0, -1).forEach(function (key) { - // TODO(bcoe): in the next major version of yargs, switch to - // Object.create(null) for dot notation: - key = sanitizeKey(key); - if (typeof o === 'object' && o[key] === undefined) { - o[key] = {}; - } - if (typeof o[key] !== 'object' || Array.isArray(o[key])) { - // ensure that o[key] is an array, and that the last item is an empty object. - if (Array.isArray(o[key])) { - o[key].push({}); - } - else { - o[key] = [o[key], {}]; - } - // we want to update the empty object at the end of the o[key] array, so set o to that object - o = o[key][o[key].length - 1]; - } - else { - o = o[key]; - } - }); - // TODO(bcoe): in the next major version of yargs, switch to - // Object.create(null) for dot notation: - const key = sanitizeKey(keys[keys.length - 1]); - const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays); - const isValueArray = Array.isArray(value); - let duplicate = configuration['duplicate-arguments-array']; - // nargs has higher priority than duplicate - if (!duplicate && checkAllAliases(key, flags.nargs)) { - duplicate = true; - if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { - o[key] = undefined; - } - } - if (value === increment()) { - o[key] = increment(o[key]); - } - else if (Array.isArray(o[key])) { - if (duplicate && isTypeArray && isValueArray) { - o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]); - } - else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { - o[key] = value; - } - else { - o[key] = o[key].concat([value]); - } - } - else if (o[key] === undefined && isTypeArray) { - o[key] = isValueArray ? value : [value]; - } - else if (duplicate && !(o[key] === undefined || - checkAllAliases(key, flags.counts) || - checkAllAliases(key, flags.bools))) { - o[key] = [o[key], value]; - } - else { - o[key] = value; - } - } - // extend the aliases list with inferred aliases. - function extendAliases(...args) { - args.forEach(function (obj) { - Object.keys(obj || {}).forEach(function (key) { - // short-circuit if we've already added a key - // to the aliases array, for example it might - // exist in both 'opts.default' and 'opts.key'. - if (flags.aliases[key]) - return; - flags.aliases[key] = [].concat(aliases[key] || []); - // For "--option-name", also set argv.optionName - flags.aliases[key].concat(key).forEach(function (x) { - if (/-/.test(x) && configuration['camel-case-expansion']) { - const c = camelCase(x); - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c); - newAliases[c] = true; - } - } - }); - // For "--optionName", also set argv['option-name'] - flags.aliases[key].concat(key).forEach(function (x) { - if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { - const c = decamelize(x, '-'); - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c); - newAliases[c] = true; - } - } - }); - flags.aliases[key].forEach(function (x) { - flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - }); - } - function checkAllAliases(key, flag) { - const toCheck = [].concat(flags.aliases[key] || [], key); - const keys = Object.keys(flag); - const setAlias = toCheck.find(key => keys.includes(key)); - return setAlias ? flag[setAlias] : false; - } - function hasAnyFlag(key) { - const flagsKeys = Object.keys(flags); - const toCheck = [].concat(flagsKeys.map(k => flags[k])); - return toCheck.some(function (flag) { - return Array.isArray(flag) ? flag.includes(key) : flag[key]; - }); - } - function hasFlagsMatching(arg, ...patterns) { - const toCheck = [].concat(...patterns); - return toCheck.some(function (pattern) { - const match = arg.match(pattern); - return match && hasAnyFlag(match[1]); - }); - } - // based on a simplified version of the short flag group parsing logic - function hasAllShortFlags(arg) { - // if this is a negative number, or doesn't start with a single hyphen, it's not a short flag group - if (arg.match(negative) || !arg.match(/^-[^-]+/)) { - return false; - } - let hasAllFlags = true; - let next; - const letters = arg.slice(1).split(''); - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - if (!hasAnyFlag(letters[j])) { - hasAllFlags = false; - break; - } - if ((letters[j + 1] && letters[j + 1] === '=') || - next === '-' || - (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) || - (letters[j + 1] && letters[j + 1].match(/\W/))) { - break; - } - } - return hasAllFlags; - } - function isUnknownOptionAsArg(arg) { - return configuration['unknown-options-as-args'] && isUnknownOption(arg); - } - function isUnknownOption(arg) { - arg = arg.replace(/^-{3,}/, '--'); - // ignore negative numbers - if (arg.match(negative)) { - return false; - } - // if this is a short option group and all of them are configured, it isn't unknown - if (hasAllShortFlags(arg)) { - return false; - } - // e.g. '--count=2' - const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/; - // e.g. '-a' or '--arg' - const normalFlag = /^-+([^=]+?)$/; - // e.g. '-a-' - const flagEndingInHyphen = /^-+([^=]+?)-$/; - // e.g. '-abc123' - const flagEndingInDigits = /^-+([^=]+?\d+)$/; - // e.g. '-a/usr/local' - const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/; - // check the different types of flag styles, including negatedBoolean, a pattern defined near the start of the parse method - return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters); - } - // make a best effort to pick a default value - // for an option based on name and type. - function defaultValue(key) { - if (!checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts) && - `${key}` in defaults) { - return defaults[key]; - } - else { - return defaultForType(guessType(key)); - } - } - // return a default value, given the type of a flag., - function defaultForType(type) { - const def = { - [DefaultValuesForTypeKey.BOOLEAN]: true, - [DefaultValuesForTypeKey.STRING]: '', - [DefaultValuesForTypeKey.NUMBER]: undefined, - [DefaultValuesForTypeKey.ARRAY]: [] - }; - return def[type]; - } - // given a flag, enforce a default type. - function guessType(key) { - let type = DefaultValuesForTypeKey.BOOLEAN; - if (checkAllAliases(key, flags.strings)) - type = DefaultValuesForTypeKey.STRING; - else if (checkAllAliases(key, flags.numbers)) - type = DefaultValuesForTypeKey.NUMBER; - else if (checkAllAliases(key, flags.bools)) - type = DefaultValuesForTypeKey.BOOLEAN; - else if (checkAllAliases(key, flags.arrays)) - type = DefaultValuesForTypeKey.ARRAY; - return type; - } - function isUndefined(num) { - return num === undefined; - } - // check user configuration settings for inconsistencies - function checkConfiguration() { - // count keys should not be set as array/narg - Object.keys(flags.counts).find(key => { - if (checkAllAliases(key, flags.arrays)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key)); - return true; - } - else if (checkAllAliases(key, flags.nargs)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key)); - return true; - } - return false; - }); - } - return { - aliases: Object.assign({}, flags.aliases), - argv: Object.assign(argvReturn, argv), - configuration: configuration, - defaulted: Object.assign({}, defaulted), - error: error, - newAliases: Object.assign({}, newAliases) - }; - } -} -// if any aliases reference each other, we should -// merge them together. -function combineAliases(aliases) { - const aliasArrays = []; - const combined = Object.create(null); - let change = true; - // turn alias lookup hash {key: ['alias1', 'alias2']} into - // a simple array ['key', 'alias1', 'alias2'] - Object.keys(aliases).forEach(function (key) { - aliasArrays.push([].concat(aliases[key], key)); - }); - // combine arrays until zero changes are - // made in an iteration. - while (change) { - change = false; - for (let i = 0; i < aliasArrays.length; i++) { - for (let ii = i + 1; ii < aliasArrays.length; ii++) { - const intersect = aliasArrays[i].filter(function (v) { - return aliasArrays[ii].indexOf(v) !== -1; - }); - if (intersect.length) { - aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]); - aliasArrays.splice(ii, 1); - change = true; - break; - } - } - } - } - // map arrays back to the hash-lookup (de-dupe while - // we're at it). - aliasArrays.forEach(function (aliasArray) { - aliasArray = aliasArray.filter(function (v, i, self) { - return self.indexOf(v) === i; - }); - const lastAlias = aliasArray.pop(); - if (lastAlias !== undefined && typeof lastAlias === 'string') { - combined[lastAlias] = aliasArray; - } - }); - return combined; -} -// this function should only be called when a count is given as an arg -// it is NOT called to set a default value -// thus we can start the count at 1 instead of 0 -function increment(orig) { - return orig !== undefined ? orig + 1 : 1; -} -// TODO(bcoe): in the next major version of yargs, switch to -// Object.create(null) for dot notation: -function sanitizeKey(key) { - if (key === '__proto__') - return '___proto___'; - return key; -} -function stripQuotes(val) { - return (typeof val === 'string' && - (val[0] === "'" || val[0] === '"') && - val[val.length - 1] === val[0]) - ? val.substring(1, val.length - 1) - : val; -} diff --git a/node_modules/yargs-parser/package.json b/node_modules/yargs-parser/package.json deleted file mode 100644 index decd0c3..0000000 --- a/node_modules/yargs-parser/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "name": "yargs-parser", - "version": "21.1.1", - "description": "the mighty option parser used by yargs", - "main": "build/index.cjs", - "exports": { - ".": [ - { - "import": "./build/lib/index.js", - "require": "./build/index.cjs" - }, - "./build/index.cjs" - ], - "./browser": [ - "./browser.js" - ] - }, - "type": "module", - "module": "./build/lib/index.js", - "scripts": { - "check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'", - "fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'", - "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", - "test": "c8 --reporter=text --reporter=html mocha test/*.cjs", - "test:esm": "c8 --reporter=text --reporter=html mocha test/*.mjs", - "test:browser": "start-server-and-test 'serve ./ -p 8080' http://127.0.0.1:8080/package.json 'node ./test/browser/yargs-test.cjs'", - "pretest:typescript": "npm run pretest", - "test:typescript": "c8 mocha ./build/test/typescript/*.js", - "coverage": "c8 report --check-coverage", - "precompile": "rimraf build", - "compile": "tsc", - "postcompile": "npm run build:cjs", - "build:cjs": "rollup -c", - "prepare": "npm run compile" - }, - "repository": { - "type": "git", - "url": "https://github.com/yargs/yargs-parser.git" - }, - "keywords": [ - "argument", - "parser", - "yargs", - "command", - "cli", - "parsing", - "option", - "args", - "argument" - ], - "author": "Ben Coe ", - "license": "ISC", - "devDependencies": { - "@types/chai": "^4.2.11", - "@types/mocha": "^9.0.0", - "@types/node": "^16.11.4", - "@typescript-eslint/eslint-plugin": "^3.10.1", - "@typescript-eslint/parser": "^3.10.1", - "c8": "^7.3.0", - "chai": "^4.2.0", - "cross-env": "^7.0.2", - "eslint": "^7.0.0", - "eslint-plugin-import": "^2.20.1", - "eslint-plugin-node": "^11.0.0", - "gts": "^3.0.0", - "mocha": "^10.0.0", - "puppeteer": "^16.0.0", - "rimraf": "^3.0.2", - "rollup": "^2.22.1", - "rollup-plugin-cleanup": "^3.1.1", - "rollup-plugin-ts": "^3.0.2", - "serve": "^14.0.0", - "standardx": "^7.0.0", - "start-server-and-test": "^1.11.2", - "ts-transform-default-export": "^1.0.2", - "typescript": "^4.0.0" - }, - "files": [ - "browser.js", - "build", - "!*.d.ts", - "!*.d.cts" - ], - "engines": { - "node": ">=12" - }, - "standardx": { - "ignore": [ - "build" - ] - } -} diff --git a/node_modules/yargs/LICENSE b/node_modules/yargs/LICENSE deleted file mode 100644 index b0145ca..0000000 --- a/node_modules/yargs/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright 2010 James Halliday (mail@substack.net); Modified work Copyright 2014 Contributors (ben@npmjs.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/yargs/README.md b/node_modules/yargs/README.md deleted file mode 100644 index 51f5b22..0000000 --- a/node_modules/yargs/README.md +++ /dev/null @@ -1,204 +0,0 @@ -

- -

-

Yargs

-

- Yargs be a node.js library fer hearties tryin' ter parse optstrings -

- -
- -![ci](https://github.com/yargs/yargs/workflows/ci/badge.svg) -[![NPM version][npm-image]][npm-url] -[![js-standard-style][standard-image]][standard-url] -[![Coverage][coverage-image]][coverage-url] -[![Conventional Commits][conventional-commits-image]][conventional-commits-url] -[![Slack][slack-image]][slack-url] - -## Description -Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. - -It gives you: - -* commands and (grouped) options (`my-program.js serve --port=5000`). -* a dynamically generated help menu based on your arguments: - -``` -mocha [spec..] - -Run tests with Mocha - -Commands - mocha inspect [spec..] Run tests with Mocha [default] - mocha init create a client-side Mocha setup at - -Rules & Behavior - --allow-uncaught Allow uncaught errors to propagate [boolean] - --async-only, -A Require all tests to use a callback (async) or - return a Promise [boolean] -``` - -* bash-completion shortcuts for commands and options. -* and [tons more](/docs/api.md). - -## Installation - -Stable version: -```bash -npm i yargs -``` - -Bleeding edge version with the most recent features: -```bash -npm i yargs@next -``` - -## Usage - -### Simple Example - -```javascript -#!/usr/bin/env node -const yargs = require('yargs/yargs') -const { hideBin } = require('yargs/helpers') -const argv = yargs(hideBin(process.argv)).argv - -if (argv.ships > 3 && argv.distance < 53.5) { - console.log('Plunder more riffiwobbles!') -} else { - console.log('Retreat from the xupptumblers!') -} -``` - -```bash -$ ./plunder.js --ships=4 --distance=22 -Plunder more riffiwobbles! - -$ ./plunder.js --ships 12 --distance 98.7 -Retreat from the xupptumblers! -``` - -> Note: `hideBin` is a shorthand for [`process.argv.slice(2)`](https://nodejs.org/en/knowledge/command-line/how-to-parse-command-line-arguments/). It has the benefit that it takes into account variations in some environments, e.g., [Electron](https://github.com/electron/electron/issues/4690). - -### Complex Example - -```javascript -#!/usr/bin/env node -const yargs = require('yargs/yargs') -const { hideBin } = require('yargs/helpers') - -yargs(hideBin(process.argv)) - .command('serve [port]', 'start the server', (yargs) => { - return yargs - .positional('port', { - describe: 'port to bind on', - default: 5000 - }) - }, (argv) => { - if (argv.verbose) console.info(`start server on :${argv.port}`) - serve(argv.port) - }) - .option('verbose', { - alias: 'v', - type: 'boolean', - description: 'Run with verbose logging' - }) - .parse() -``` - -Run the example above with `--help` to see the help for the application. - -## Supported Platforms - -### TypeScript - -yargs has type definitions at [@types/yargs][type-definitions]. - -``` -npm i @types/yargs --save-dev -``` - -See usage examples in [docs](/docs/typescript.md). - -### Deno - -As of `v16`, `yargs` supports [Deno](https://github.com/denoland/deno): - -```typescript -import yargs from 'https://deno.land/x/yargs/deno.ts' -import { Arguments } from 'https://deno.land/x/yargs/deno-types.ts' - -yargs(Deno.args) - .command('download ', 'download a list of files', (yargs: any) => { - return yargs.positional('files', { - describe: 'a list of files to do something with' - }) - }, (argv: Arguments) => { - console.info(argv) - }) - .strictCommands() - .demandCommand(1) - .parse() -``` - -### ESM - -As of `v16`,`yargs` supports ESM imports: - -```js -import yargs from 'yargs' -import { hideBin } from 'yargs/helpers' - -yargs(hideBin(process.argv)) - .command('curl ', 'fetch the contents of the URL', () => {}, (argv) => { - console.info(argv) - }) - .demandCommand(1) - .parse() -``` - -### Usage in Browser - -See examples of using yargs in the browser in [docs](/docs/browser.md). - -## Community - -Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com). - -## Documentation - -### Table of Contents - -* [Yargs' API](/docs/api.md) -* [Examples](/docs/examples.md) -* [Parsing Tricks](/docs/tricks.md) - * [Stop the Parser](/docs/tricks.md#stop) - * [Negating Boolean Arguments](/docs/tricks.md#negate) - * [Numbers](/docs/tricks.md#numbers) - * [Arrays](/docs/tricks.md#arrays) - * [Objects](/docs/tricks.md#objects) - * [Quotes](/docs/tricks.md#quotes) -* [Advanced Topics](/docs/advanced.md) - * [Composing Your App Using Commands](/docs/advanced.md#commands) - * [Building Configurable CLI Apps](/docs/advanced.md#configuration) - * [Customizing Yargs' Parser](/docs/advanced.md#customizing) - * [Bundling yargs](/docs/bundling.md) -* [Contributing](/contributing.md) - -## Supported Node.js Versions - -Libraries in this ecosystem make a best effort to track -[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a -post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a). - -[npm-url]: https://www.npmjs.com/package/yargs -[npm-image]: https://img.shields.io/npm/v/yargs.svg -[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg -[standard-url]: http://standardjs.com/ -[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg -[conventional-commits-url]: https://conventionalcommits.org/ -[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg -[slack-url]: http://devtoolscommunity.herokuapp.com -[type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs -[coverage-image]: https://img.shields.io/nycrc/yargs/yargs -[coverage-url]: https://github.com/yargs/yargs/blob/main/.nycrc diff --git a/node_modules/yargs/browser.d.ts b/node_modules/yargs/browser.d.ts deleted file mode 100644 index 21f3fc6..0000000 --- a/node_modules/yargs/browser.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import {YargsFactory} from './build/lib/yargs-factory'; - -declare const Yargs: ReturnType; - -export default Yargs; diff --git a/node_modules/yargs/browser.mjs b/node_modules/yargs/browser.mjs deleted file mode 100644 index 2d0d6e9..0000000 --- a/node_modules/yargs/browser.mjs +++ /dev/null @@ -1,7 +0,0 @@ -// Bootstrap yargs for browser: -import browserPlatformShim from './lib/platform-shims/browser.mjs'; -import {YargsFactory} from './build/lib/yargs-factory.js'; - -const Yargs = YargsFactory(browserPlatformShim); - -export default Yargs; diff --git a/node_modules/yargs/build/index.cjs b/node_modules/yargs/build/index.cjs deleted file mode 100644 index e9cf013..0000000 --- a/node_modules/yargs/build/index.cjs +++ /dev/null @@ -1 +0,0 @@ -"use strict";var t=require("assert");class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}let s,i=[];function n(t,o,a,h){s=h;let l={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if("string"!=typeof t.extends)return l;const r=/\.json|\..*rc$/.test(t.extends);let h=null;if(r)h=function(t,e){return s.path.resolve(t,e)}(o,t.extends);else try{h=require.resolve(t.extends)}catch(e){return t}!function(t){if(i.indexOf(t)>-1)throw new e(`Circular extended configurations: '${t}'.`)}(h),i.push(h),l=r?JSON.parse(s.readFileSync(h,"utf8")):require(t.extends),delete t.extends,l=n(l,s.path.dirname(h),a,s)}return i=[],a?r(l,t):Object.assign({},l,t)}function r(t,e){const s={};function i(t){return t&&"object"==typeof t&&!Array.isArray(t)}Object.assign(s,t);for(const n of Object.keys(e))i(e[n])&&i(s[n])?s[n]=r(t[n],e[n]):s[n]=e[n];return s}function o(t){const e=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),s=/\.*[\][<>]/g,i=e.shift();if(!i)throw new Error(`No command found in: ${t}`);const n={cmd:i.replace(s,""),demanded:[],optional:[]};return e.forEach(((t,i)=>{let r=!1;t=t.replace(/\s/g,""),/\.+[\]>]/.test(t)&&i===e.length-1&&(r=!0),/^\[/.test(t)?n.optional.push({cmd:t.replace(s,"").split("|"),variadic:r}):n.demanded.push({cmd:t.replace(s,"").split("|"),variadic:r})})),n}const a=["first","second","third","fourth","fifth","sixth"];function h(t,s,i){try{let n=0;const[r,a,h]="object"==typeof t?[{demanded:[],optional:[]},t,s]:[o(`cmd ${t}`),s,i],f=[].slice.call(a);for(;f.length&&void 0===f[f.length-1];)f.pop();const d=h||f.length;if(du)throw new e(`Too many arguments provided. Expected max ${u} but received ${d}.`);r.demanded.forEach((t=>{const e=l(f.shift());0===t.cmd.filter((t=>t===e||"*"===t)).length&&c(e,t.cmd,n),n+=1})),r.optional.forEach((t=>{if(0===f.length)return;const e=l(f.shift());0===t.cmd.filter((t=>t===e||"*"===t)).length&&c(e,t.cmd,n),n+=1}))}catch(t){console.warn(t.stack)}}function l(t){return Array.isArray(t)?"array":null===t?"null":typeof t}function c(t,s,i){throw new e(`Invalid ${a[i]||"manyith"} argument. Expected ${s.join(" or ")} but received ${t}.`)}function f(t){return!!t&&!!t.then&&"function"==typeof t.then}function d(t,e,s,i){s.assert.notStrictEqual(t,e,i)}function u(t,e){e.assert.strictEqual(typeof t,"string")}function p(t){return Object.keys(t)}function g(t={},e=(()=>!0)){const s={};return p(t).forEach((i=>{e(i,t[i])&&(s[i]=t[i])})),s}function m(){return process.versions.electron&&!process.defaultApp?0:1}function y(){return process.argv[m()]}var b=Object.freeze({__proto__:null,hideBin:function(t){return t.slice(m()+1)},getProcessArgvBin:y});function v(t,e,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(t):i?i.value:e.get(t)}function O(t,e,s,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(t,s):n?n.value=s:e.set(t,s),s}class w{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,e,s=!0,i=!1){if(h(" [boolean] [boolean] [boolean]",[t,e,s],arguments.length),Array.isArray(t)){for(let i=0;i{const i=[...s[e]||[],e];return!t.option||!i.includes(t.option)})),t.option=e,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){const t=this.frozens.pop();void 0!==t&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter((t=>t.global))}}function C(t,e,s,i){return s.reduce(((t,s)=>{if(s.applyBeforeValidation!==i)return t;if(s.mutates){if(s.applied)return t;s.applied=!0}if(f(t))return t.then((t=>Promise.all([t,s(t,e)]))).then((([t,e])=>Object.assign(t,e)));{const i=s(t,e);return f(i)?i.then((e=>Object.assign(t,e))):Object.assign(t,i)}}),t)}function j(t,e,s=(t=>{throw t})){try{const s="function"==typeof t?t():t;return f(s)?s.then((t=>e(t))):e(s)}catch(t){return s(t)}}const M=/(^\*)|(^\$0)/;class _{constructor(t,e,s,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=t,this.globalMiddleware=s,this.validation=e}addDirectory(t,e,s,i){"boolean"!=typeof(i=i||{}).recurse&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);const n="function"==typeof i.visit?i.visit:t=>t;i.visit=(t,e,s)=>{const i=n(t,e,s);if(i){if(this.requireCache.has(e))return i;this.requireCache.add(e),this.addHandler(i)}return i},this.shim.requireDirectory({require:e,filename:s},t,i)}addHandler(t,e,s,i,n,r){let a=[];const h=function(t){return t?t.map((t=>(t.applyBeforeValidation=!1,t))):[]}(n);if(i=i||(()=>{}),Array.isArray(t))if(function(t){return t.every((t=>"string"==typeof t))}(t))[t,...a]=t;else for(const e of t)this.addHandler(e);else{if(function(t){return"object"==typeof t&&!Array.isArray(t)}(t)){let e=Array.isArray(t.command)||"string"==typeof t.command?t.command:this.moduleName(t);return t.aliases&&(e=[].concat(e).concat(t.aliases)),void this.addHandler(e,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated)}if(k(s))return void this.addHandler([t].concat(a),e,s.builder,s.handler,s.middlewares,s.deprecated)}if("string"==typeof t){const n=o(t);a=a.map((t=>o(t).cmd));let l=!1;const c=[n.cmd].concat(a).filter((t=>!M.test(t)||(l=!0,!1)));0===c.length&&l&&c.push("$0"),l&&(n.cmd=c[0],a=c.slice(1),t=t.replace(M,n.cmd)),a.forEach((t=>{this.aliasMap[t]=n.cmd})),!1!==e&&this.usage.command(t,e,l,a,r),this.handlers[n.cmd]={original:t,description:e,handler:i,builder:s||{},middlewares:h,deprecated:r,demanded:n.demanded,optional:n.optional},l&&(this.defaultCommand=this.handlers[n.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,e,s,i,n,r){const o=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,a=e.getInternalMethods().getContext(),h=a.commands.slice(),l=!t;t&&(a.commands.push(t),a.fullCommands.push(o.original));const c=this.applyBuilderUpdateUsageAndParse(l,o,e,s.aliases,h,i,n,r);return f(c)?c.then((t=>this.applyMiddlewareAndGetResult(l,o,t.innerArgv,a,n,t.aliases,e))):this.applyMiddlewareAndGetResult(l,o,c.innerArgv,a,n,c.aliases,e)}applyBuilderUpdateUsageAndParse(t,e,s,i,n,r,o,a){const h=e.builder;let l=s;if(x(h)){s.getInternalMethods().getUsageInstance().freeze();const c=h(s.getInternalMethods().reset(i),a);if(f(c))return c.then((i=>{var a;return l=(a=i)&&"function"==typeof a.getInternalMethods?i:s,this.parseAndUpdateUsage(t,e,l,n,r,o)}))}else(function(t){return"object"==typeof t})(h)&&(s.getInternalMethods().getUsageInstance().freeze(),l=s.getInternalMethods().reset(i),Object.keys(e.builder).forEach((t=>{l.option(t,h[t])})));return this.parseAndUpdateUsage(t,e,l,n,r,o)}parseAndUpdateUsage(t,e,s,i,n,r){t&&s.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(s)&&s.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,e),e.description);const o=s.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,n,r);return f(o)?o.then((t=>({aliases:s.parsed.aliases,innerArgv:t}))):{aliases:s.parsed.aliases,innerArgv:o}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&0===t.getInternalMethods().getUsageInstance().getUsage().length}usageFromParentCommandsCommandHandler(t,e){const s=M.test(e.original)?e.original.replace(M,"").trim():e.original,i=t.filter((t=>!M.test(t)));return i.push(s),`$0 ${i.join(" ")}`}handleValidationAndGetResult(t,e,s,i,n,r,o,a){if(!r.getInternalMethods().getHasOutput()){const e=r.getInternalMethods().runValidation(n,a,r.parsed.error,t);s=j(s,(t=>(e(t),t)))}if(e.handler&&!r.getInternalMethods().getHasOutput()){r.getInternalMethods().setHasOutput();const i=!!r.getOptions().configuration["populate--"];r.getInternalMethods().postProcess(s,i,!1,!1),s=j(s=C(s,r,o,!1),(t=>{const s=e.handler(t);return f(s)?s.then((()=>t)):t})),t||r.getInternalMethods().getUsageInstance().cacheHelpMessage(),f(s)&&!r.getInternalMethods().hasParseCallback()&&s.catch((t=>{try{r.getInternalMethods().getUsageInstance().fail(null,t)}catch(t){}}))}return t||(i.commands.pop(),i.fullCommands.pop()),s}applyMiddlewareAndGetResult(t,e,s,i,n,r,o){let a={};if(n)return s;o.getInternalMethods().getHasOutput()||(a=this.populatePositionals(e,s,i,o));const h=this.globalMiddleware.getMiddleware().slice(0).concat(e.middlewares),l=C(s,o,h,!0);return f(l)?l.then((s=>this.handleValidationAndGetResult(t,e,s,i,r,o,h,a))):this.handleValidationAndGetResult(t,e,l,i,r,o,h,a)}populatePositionals(t,e,s,i){e._=e._.slice(s.commands.length);const n=t.demanded.slice(0),r=t.optional.slice(0),o={};for(this.validation.positionalCount(n.length,e._.length);n.length;){const t=n.shift();this.populatePositional(t,e,o)}for(;r.length;){const t=r.shift();this.populatePositional(t,e,o)}return e._=s.commands.concat(e._.map((t=>""+t))),this.postProcessPositionals(e,o,this.cmdToParseOptions(t.original),i),o}populatePositional(t,e,s){const i=t.cmd[0];t.variadic?s[i]=e._.splice(0).map(String):e._.length&&(s[i]=[String(e._.shift())])}cmdToParseOptions(t){const e={array:[],default:{},alias:{},demand:{}},s=o(t);return s.demanded.forEach((t=>{const[s,...i]=t.cmd;t.variadic&&(e.array.push(s),e.default[s]=[]),e.alias[s]=i,e.demand[s]=!0})),s.optional.forEach((t=>{const[s,...i]=t.cmd;t.variadic&&(e.array.push(s),e.default[s]=[]),e.alias[s]=i})),e}postProcessPositionals(t,e,s,i){const n=Object.assign({},i.getOptions());n.default=Object.assign(s.default,n.default);for(const t of Object.keys(s.alias))n.alias[t]=(n.alias[t]||[]).concat(s.alias[t]);n.array=n.array.concat(s.array),n.config={};const r=[];if(Object.keys(e).forEach((t=>{e[t].map((e=>{n.configuration["unknown-options-as-args"]&&(n.key[t]=!0),r.push(`--${t}`),r.push(e)}))})),!r.length)return;const o=Object.assign({},n.configuration,{"populate--":!1}),a=this.shim.Parser.detailed(r,Object.assign({},n,{configuration:o}));if(a.error)i.getInternalMethods().getUsageInstance().fail(a.error.message,a.error);else{const s=Object.keys(e);Object.keys(e).forEach((t=>{s.push(...a.aliases[t])})),Object.keys(a.argv).forEach((n=>{s.includes(n)&&(e[n]||(e[n]=a.argv[n]),!this.isInConfigs(i,n)&&!this.isDefaulted(i,n)&&Object.prototype.hasOwnProperty.call(t,n)&&Object.prototype.hasOwnProperty.call(a.argv,n)&&(Array.isArray(t[n])||Array.isArray(a.argv[n]))?t[n]=[].concat(t[n],a.argv[n]):t[n]=a.argv[n])}))}}isDefaulted(t,e){const{default:s}=t.getOptions();return Object.prototype.hasOwnProperty.call(s,e)||Object.prototype.hasOwnProperty.call(s,this.shim.Parser.camelCase(e))}isInConfigs(t,e){const{configObjects:s}=t.getOptions();return s.some((t=>Object.prototype.hasOwnProperty.call(t,e)))||s.some((t=>Object.prototype.hasOwnProperty.call(t,this.shim.Parser.camelCase(e))))}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){const e=M.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(e,this.defaultCommand.description)}const e=this.defaultCommand.builder;if(x(e))return e(t,!0);k(e)||Object.keys(e).forEach((s=>{t.option(s,e[s])}))}moduleName(t){const e=function(t){if("undefined"==typeof require)return null;for(let e,s=0,i=Object.keys(require.cache);s{const s=e;s._handle&&s.isTTY&&"function"==typeof s._handle.setBlocking&&s._handle.setBlocking(t)}))}function A(t){return"boolean"==typeof t}function P(t,s){const i=s.y18n.__,n={},r=[];n.failFn=function(t){r.push(t)};let o=null,a=null,h=!0;n.showHelpOnFail=function(e=!0,s){const[i,r]="string"==typeof e?[!0,e]:[e,s];return t.getInternalMethods().isGlobalContext()&&(a=r),o=r,h=i,n};let l=!1;n.fail=function(s,i){const c=t.getInternalMethods().getLoggerInstance();if(!r.length){if(t.getExitProcess()&&E(!0),!l){l=!0,h&&(t.showHelp("error"),c.error()),(s||i)&&c.error(s||i);const e=o||a;e&&((s||i)&&c.error(""),c.error(e))}if(i=i||new e(s),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,i);throw i}for(let t=r.length-1;t>=0;--t){const e=r[t];if(A(e)){if(i)throw i;if(s)throw Error(s)}else e(s,i,n)}};let c=[],f=!1;n.usage=(t,e)=>null===t?(f=!0,c=[],n):(f=!1,c.push([t,e||""]),n),n.getUsage=()=>c,n.getUsageDisabled=()=>f,n.getPositionalGroupName=()=>i("Positionals:");let d=[];n.example=(t,e)=>{d.push([t,e||""])};let u=[];n.command=function(t,e,s,i,n=!1){s&&(u=u.map((t=>(t[2]=!1,t)))),u.push([t,e||"",s,i,n])},n.getCommands=()=>u;let p={};n.describe=function(t,e){Array.isArray(t)?t.forEach((t=>{n.describe(t,e)})):"object"==typeof t?Object.keys(t).forEach((e=>{n.describe(e,t[e])})):p[t]=e},n.getDescriptions=()=>p;let m=[];n.epilog=t=>{m.push(t)};let y,b=!1;n.wrap=t=>{b=!0,y=t},n.getWrap=()=>s.getEnv("YARGS_DISABLE_WRAP")?null:(b||(y=function(){const t=80;return s.process.stdColumns?Math.min(t,s.process.stdColumns):t}(),b=!0),y);const v="__yargsString__:";function O(t,e,i){let n=0;return Array.isArray(t)||(t=Object.values(t).map((t=>[t]))),t.forEach((t=>{n=Math.max(s.stringWidth(i?`${i} ${I(t[0])}`:I(t[0]))+$(t[0]),n)})),e&&(n=Math.min(n,parseInt((.5*e).toString(),10))),n}let w;function C(e){return t.getOptions().hiddenOptions.indexOf(e)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}function j(t,e){let s=`[${i("default:")} `;if(void 0===t&&!e)return null;if(e)s+=e;else switch(typeof t){case"string":s+=`"${t}"`;break;case"object":s+=JSON.stringify(t);break;default:s+=t}return`${s}]`}n.deferY18nLookup=t=>v+t,n.help=function(){if(w)return w;!function(){const e=t.getDemandedOptions(),s=t.getOptions();(Object.keys(s.alias)||[]).forEach((i=>{s.alias[i].forEach((r=>{p[r]&&n.describe(i,p[r]),r in e&&t.demandOption(i,e[r]),s.boolean.includes(r)&&t.boolean(i),s.count.includes(r)&&t.count(i),s.string.includes(r)&&t.string(i),s.normalize.includes(r)&&t.normalize(i),s.array.includes(r)&&t.array(i),s.number.includes(r)&&t.number(i)}))}))}();const e=t.customScriptName?t.$0:s.path.basename(t.$0),r=t.getDemandedOptions(),o=t.getDemandedCommands(),a=t.getDeprecatedOptions(),h=t.getGroups(),l=t.getOptions();let g=[];g=g.concat(Object.keys(p)),g=g.concat(Object.keys(r)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(l.default)),g=g.filter(C),g=Object.keys(g.reduce(((t,e)=>("_"!==e&&(t[e]=!0),t)),{}));const y=n.getWrap(),b=s.cliui({width:y,wrap:!!y});if(!f)if(c.length)c.forEach((t=>{b.div({text:`${t[0].replace(/\$0/g,e)}`}),t[1]&&b.div({text:`${t[1]}`,padding:[1,0,0,0]})})),b.div();else if(u.length){let t=null;t=o._?`${e} <${i("command")}>\n`:`${e} [${i("command")}]\n`,b.div(`${t}`)}if(u.length>1||1===u.length&&!u[0][2]){b.div(i("Commands:"));const s=t.getInternalMethods().getContext(),n=s.commands.length?`${s.commands.join(" ")} `:"";!0===t.getInternalMethods().getParserConfiguration()["sort-commands"]&&(u=u.sort(((t,e)=>t[0].localeCompare(e[0]))));const r=e?`${e} `:"";u.forEach((t=>{const s=`${r}${n}${t[0].replace(/^\$0 ?/,"")}`;b.span({text:s,padding:[0,2,0,2],width:O(u,y,`${e}${n}`)+4},{text:t[1]});const o=[];t[2]&&o.push(`[${i("default")}]`),t[3]&&t[3].length&&o.push(`[${i("aliases:")} ${t[3].join(", ")}]`),t[4]&&("string"==typeof t[4]?o.push(`[${i("deprecated: %s",t[4])}]`):o.push(`[${i("deprecated")}]`)),o.length?b.div({text:o.join(" "),padding:[0,0,0,2],align:"right"}):b.div()})),b.div()}const M=(Object.keys(l.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);g=g.filter((e=>!t.parsed.newAliases[e]&&M.every((t=>-1===(l.alias[t]||[]).indexOf(e)))));const _=i("Options:");h[_]||(h[_]=[]),function(t,e,s,i){let n=[],r=null;Object.keys(s).forEach((t=>{n=n.concat(s[t])})),t.forEach((t=>{r=[t].concat(e[t]),r.some((t=>-1!==n.indexOf(t)))||s[i].push(t)}))}(g,l.alias,h,_);const k=t=>/^--/.test(I(t)),x=Object.keys(h).filter((t=>h[t].length>0)).map((t=>({groupName:t,normalizedKeys:h[t].filter(C).map((t=>{if(M.includes(t))return t;for(let e,s=0;void 0!==(e=M[s]);s++)if((l.alias[e]||[]).includes(t))return e;return t}))}))).filter((({normalizedKeys:t})=>t.length>0)).map((({groupName:t,normalizedKeys:e})=>{const s=e.reduce(((e,s)=>(e[s]=[s].concat(l.alias[s]||[]).map((e=>t===n.getPositionalGroupName()?e:(/^[0-9]$/.test(e)?l.boolean.includes(s)?"-":"--":e.length>1?"--":"-")+e)).sort(((t,e)=>k(t)===k(e)?0:k(t)?1:-1)).join(", "),e)),{});return{groupName:t,normalizedKeys:e,switches:s}}));if(x.filter((({groupName:t})=>t!==n.getPositionalGroupName())).some((({normalizedKeys:t,switches:e})=>!t.every((t=>k(e[t])))))&&x.filter((({groupName:t})=>t!==n.getPositionalGroupName())).forEach((({normalizedKeys:t,switches:e})=>{t.forEach((t=>{var s,i;k(e[t])&&(e[t]=(s=e[t],i=4,S(s)?{text:s.text,indentation:s.indentation+i}:{text:s,indentation:i}))}))})),x.forEach((({groupName:e,normalizedKeys:s,switches:o})=>{b.div(e),s.forEach((e=>{const s=o[e];let h=p[e]||"",c=null;h.includes(v)&&(h=i(h.substring(16))),l.boolean.includes(e)&&(c=`[${i("boolean")}]`),l.count.includes(e)&&(c=`[${i("count")}]`),l.string.includes(e)&&(c=`[${i("string")}]`),l.normalize.includes(e)&&(c=`[${i("string")}]`),l.array.includes(e)&&(c=`[${i("array")}]`),l.number.includes(e)&&(c=`[${i("number")}]`);const f=[e in a?(d=a[e],"string"==typeof d?`[${i("deprecated: %s",d)}]`:`[${i("deprecated")}]`):null,c,e in r?`[${i("required")}]`:null,l.choices&&l.choices[e]?`[${i("choices:")} ${n.stringifiedValues(l.choices[e])}]`:null,j(l.default[e],l.defaultDescription[e])].filter(Boolean).join(" ");var d;b.span({text:I(s),padding:[0,2,0,2+$(s)],width:O(o,y)+4},h);const u=!0===t.getInternalMethods().getUsageConfiguration()["hide-types"];f&&!u?b.div({text:f,padding:[0,0,0,2],align:"right"}):b.div()})),b.div()})),d.length&&(b.div(i("Examples:")),d.forEach((t=>{t[0]=t[0].replace(/\$0/g,e)})),d.forEach((t=>{""===t[1]?b.div({text:t[0],padding:[0,2,0,2]}):b.div({text:t[0],padding:[0,2,0,2],width:O(d,y)+4},{text:t[1]})})),b.div()),m.length>0){const t=m.map((t=>t.replace(/\$0/g,e))).join("\n");b.div(`${t}\n`)}return b.toString().replace(/\s*$/,"")},n.cacheHelpMessage=function(){w=this.help()},n.clearCachedHelpMessage=function(){w=void 0},n.hasCachedHelpMessage=function(){return!!w},n.showHelp=e=>{const s=t.getInternalMethods().getLoggerInstance();e||(e="error");("function"==typeof e?e:s[e])(n.help())},n.functionDescription=t=>["(",t.name?s.Parser.decamelize(t.name,"-"):i("generated-value"),")"].join(""),n.stringifiedValues=function(t,e){let s="";const i=e||", ",n=[].concat(t);return t&&n.length?(n.forEach((t=>{s.length&&(s+=i),s+=JSON.stringify(t)})),s):s};let M=null;n.version=t=>{M=t},n.showVersion=e=>{const s=t.getInternalMethods().getLoggerInstance();e||(e="error");("function"==typeof e?e:s[e])(M)},n.reset=function(t){return o=null,l=!1,c=[],f=!1,m=[],d=[],u=[],p=g(p,(e=>!t[e])),n};const _=[];return n.freeze=function(){_.push({failMessage:o,failureOutput:l,usages:c,usageDisabled:f,epilogs:m,examples:d,commands:u,descriptions:p})},n.unfreeze=function(t=!1){const e=_.pop();e&&(t?(p={...e.descriptions,...p},u=[...e.commands,...u],c=[...e.usages,...c],d=[...e.examples,...d],m=[...e.epilogs,...m]):({failMessage:o,failureOutput:l,usages:c,usageDisabled:f,epilogs:m,examples:d,commands:u,descriptions:p}=e))},n}function S(t){return"object"==typeof t}function $(t){return S(t)?t.indentation:0}function I(t){return S(t)?t.text:t}class D{constructor(t,e,s,i){var n,r,o;this.yargs=t,this.usage=e,this.command=s,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=null!==(o=(null===(n=this.shim.getEnv("SHELL"))||void 0===n?void 0:n.includes("zsh"))||(null===(r=this.shim.getEnv("ZSH_NAME"))||void 0===r?void 0:r.includes("zsh")))&&void 0!==o&&o}defaultCompletion(t,e,s,i){const n=this.command.getCommandHandlers();for(let e=0,s=t.length;e{const i=o(s[0]).cmd;if(-1===e.indexOf(i))if(this.zshShell){const e=s[1]||"";t.push(i.replace(/:/g,"\\:")+":"+e)}else t.push(i)}))}optionCompletions(t,e,s,i){if((i.match(/^-/)||""===i&&0===t.length)&&!this.previousArgHasChoices(e)){const s=this.yargs.getOptions(),n=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(s.key).forEach((r=>{const o=!!s.configuration["boolean-negation"]&&s.boolean.includes(r);n.includes(r)||s.hiddenOptions.includes(r)||this.argsContainKey(e,r,o)||this.completeOptionKey(r,t,i,o&&!!s.default[r])}))}}choicesFromOptionsCompletions(t,e,s,i){if(this.previousArgHasChoices(e)){const s=this.getPreviousArgChoices(e);s&&s.length>0&&t.push(...s.map((t=>t.replace(/:/g,"\\:"))))}}choicesFromPositionalsCompletions(t,e,s,i){if(""===i&&t.length>0&&this.previousArgHasChoices(e))return;const n=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],r=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=n[s._.length-r-1];if(!o)return;const a=this.yargs.getOptions().choices[o]||[];for(const e of a)e.startsWith(i)&&t.push(e.replace(/:/g,"\\:"))}getPreviousArgChoices(t){if(t.length<1)return;let e=t[t.length-1],s="";if(!e.startsWith("-")&&t.length>1&&(s=e,e=t[t.length-2]),!e.startsWith("-"))return;const i=e.replace(/^-+/,""),n=this.yargs.getOptions(),r=[i,...this.yargs.getAliases()[i]||[]];let o;for(const t of r)if(Object.prototype.hasOwnProperty.call(n.key,t)&&Array.isArray(n.choices[t])){o=n.choices[t];break}return o?o.filter((t=>!s||t.startsWith(s))):void 0}previousArgHasChoices(t){const e=this.getPreviousArgChoices(t);return void 0!==e&&e.length>0}argsContainKey(t,e,s){const i=e=>-1!==t.indexOf((/^[^0-9]$/.test(e)?"-":"--")+e);if(i(e))return!0;if(s&&i(`no-${e}`))return!0;if(this.aliases)for(const t of this.aliases[e])if(i(t))return!0;return!1}completeOptionKey(t,e,s,i){var n,r,o,a;let h=t;if(this.zshShell){const e=this.usage.getDescriptions(),s=null===(r=null===(n=null==this?void 0:this.aliases)||void 0===n?void 0:n[t])||void 0===r?void 0:r.find((t=>{const s=e[t];return"string"==typeof s&&s.length>0})),i=s?e[s]:void 0,l=null!==(a=null!==(o=e[t])&&void 0!==o?o:i)&&void 0!==a?a:"";h=`${t.replace(/:/g,"\\:")}:${l.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}const l=!/^--/.test(s)&&(t=>/^[^0-9]$/.test(t))(t)?"-":"--";e.push(l+h),i&&e.push(l+"no-"+h)}customCompletion(t,e,s,i){if(d(this.customCompletionFunction,null,this.shim),this.customCompletionFunction.length<3){const t=this.customCompletionFunction(s,e);return f(t)?t.then((t=>{this.shim.process.nextTick((()=>{i(null,t)}))})).catch((t=>{this.shim.process.nextTick((()=>{i(t,void 0)}))})):i(null,t)}return function(t){return t.length>3}(this.customCompletionFunction)?this.customCompletionFunction(s,e,((n=i)=>this.defaultCompletion(t,e,s,n)),(t=>{i(null,t)})):this.customCompletionFunction(s,e,(t=>{i(null,t)}))}getCompletion(t,e){const s=t.length?t[t.length-1]:"",i=this.yargs.parse(t,!0),n=this.customCompletionFunction?i=>this.customCompletion(t,i,s,e):i=>this.defaultCompletion(t,i,s,e);return f(i)?i.then(n):n(i)}generateCompletionScript(t,e){let s=this.zshShell?'#compdef {{app_name}}\n###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc\n# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local reply\n local si=$IFS\n IFS=$\'\n\' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "${words[@]}"))\n IFS=$si\n _describe \'values\' reply\n}\ncompdef _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n':'###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local cur_word args type_list\n\n cur_word="${COMP_WORDS[COMP_CWORD]}"\n args=("${COMP_WORDS[@]}")\n\n # ask yargs to generate completions.\n type_list=$({{app_path}} --get-yargs-completions "${args[@]}")\n\n COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )\n\n # if no match was found, fall back to filename completion\n if [ ${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n';const i=this.shim.path.basename(t);return t.match(/\.js$/)&&(t=`./${t}`),s=s.replace(/{{app_name}}/g,i),s=s.replace(/{{completion_command}}/g,e),s.replace(/{{app_path}}/g,t)}registerFunction(t){this.customCompletionFunction=t}setParsed(t){this.aliases=t.aliases}}function N(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;const s=[];let i,n;for(i=0;i<=e.length;i++)s[i]=[i];for(n=0;n<=t.length;n++)s[0][n]=n;for(i=1;i<=e.length;i++)for(n=1;n<=t.length;n++)e.charAt(i-1)===t.charAt(n-1)?s[i][n]=s[i-1][n-1]:i>1&&n>1&&e.charAt(i-2)===t.charAt(n-1)&&e.charAt(i-1)===t.charAt(n-2)?s[i][n]=s[i-2][n-2]+1:s[i][n]=Math.min(s[i-1][n-1]+1,Math.min(s[i][n-1]+1,s[i-1][n]+1));return s[e.length][t.length]}const H=["$0","--","_"];var z,W,q,U,F,L,V,G,R,T,B,Y,K,J,Z,X,Q,tt,et,st,it,nt,rt,ot,at,ht,lt,ct,ft,dt,ut,pt,gt,mt,yt;const bt=Symbol("copyDoubleDash"),vt=Symbol("copyDoubleDash"),Ot=Symbol("deleteFromParserHintObject"),wt=Symbol("emitWarning"),Ct=Symbol("freeze"),jt=Symbol("getDollarZero"),Mt=Symbol("getParserConfiguration"),_t=Symbol("getUsageConfiguration"),kt=Symbol("guessLocale"),xt=Symbol("guessVersion"),Et=Symbol("parsePositionalNumbers"),At=Symbol("pkgUp"),Pt=Symbol("populateParserHintArray"),St=Symbol("populateParserHintSingleValueDictionary"),$t=Symbol("populateParserHintArrayDictionary"),It=Symbol("populateParserHintDictionary"),Dt=Symbol("sanitizeKey"),Nt=Symbol("setKey"),Ht=Symbol("unfreeze"),zt=Symbol("validateAsync"),Wt=Symbol("getCommandInstance"),qt=Symbol("getContext"),Ut=Symbol("getHasOutput"),Ft=Symbol("getLoggerInstance"),Lt=Symbol("getParseContext"),Vt=Symbol("getUsageInstance"),Gt=Symbol("getValidationInstance"),Rt=Symbol("hasParseCallback"),Tt=Symbol("isGlobalContext"),Bt=Symbol("postProcess"),Yt=Symbol("rebase"),Kt=Symbol("reset"),Jt=Symbol("runYargsParserAndExecuteCommands"),Zt=Symbol("runValidation"),Xt=Symbol("setHasOutput"),Qt=Symbol("kTrackManuallySetKeys");class te{constructor(t=[],e,s,i){this.customScriptName=!1,this.parsed=!1,z.set(this,void 0),W.set(this,void 0),q.set(this,{commands:[],fullCommands:[]}),U.set(this,null),F.set(this,null),L.set(this,"show-hidden"),V.set(this,null),G.set(this,!0),R.set(this,{}),T.set(this,!0),B.set(this,[]),Y.set(this,void 0),K.set(this,{}),J.set(this,!1),Z.set(this,null),X.set(this,!0),Q.set(this,void 0),tt.set(this,""),et.set(this,void 0),st.set(this,void 0),it.set(this,{}),nt.set(this,null),rt.set(this,null),ot.set(this,{}),at.set(this,{}),ht.set(this,void 0),lt.set(this,!1),ct.set(this,void 0),ft.set(this,!1),dt.set(this,!1),ut.set(this,!1),pt.set(this,void 0),gt.set(this,{}),mt.set(this,null),yt.set(this,void 0),O(this,ct,i,"f"),O(this,ht,t,"f"),O(this,W,e,"f"),O(this,st,s,"f"),O(this,Y,new w(this),"f"),this.$0=this[jt](),this[Kt](),O(this,z,v(this,z,"f"),"f"),O(this,pt,v(this,pt,"f"),"f"),O(this,yt,v(this,yt,"f"),"f"),O(this,et,v(this,et,"f"),"f"),v(this,et,"f").showHiddenOpt=v(this,L,"f"),O(this,Q,this[vt](),"f")}addHelpOpt(t,e){return h("[string|boolean] [string]",[t,e],arguments.length),v(this,Z,"f")&&(this[Ot](v(this,Z,"f")),O(this,Z,null,"f")),!1===t&&void 0===e||(O(this,Z,"string"==typeof t?t:"help","f"),this.boolean(v(this,Z,"f")),this.describe(v(this,Z,"f"),e||v(this,pt,"f").deferY18nLookup("Show help"))),this}help(t,e){return this.addHelpOpt(t,e)}addShowHiddenOpt(t,e){if(h("[string|boolean] [string]",[t,e],arguments.length),!1===t&&void 0===e)return this;const s="string"==typeof t?t:v(this,L,"f");return this.boolean(s),this.describe(s,e||v(this,pt,"f").deferY18nLookup("Show hidden options")),v(this,et,"f").showHiddenOpt=s,this}showHidden(t,e){return this.addShowHiddenOpt(t,e)}alias(t,e){return h(" [string|array]",[t,e],arguments.length),this[$t](this.alias.bind(this),"alias",t,e),this}array(t){return h("",[t],arguments.length),this[Pt]("array",t),this[Qt](t),this}boolean(t){return h("",[t],arguments.length),this[Pt]("boolean",t),this[Qt](t),this}check(t,e){return h(" [boolean]",[t,e],arguments.length),this.middleware(((e,s)=>j((()=>t(e,s.getOptions())),(s=>(s?("string"==typeof s||s instanceof Error)&&v(this,pt,"f").fail(s.toString(),s):v(this,pt,"f").fail(v(this,ct,"f").y18n.__("Argument check failed: %s",t.toString())),e)),(t=>(v(this,pt,"f").fail(t.message?t.message:t.toString(),t),e)))),!1,e),this}choices(t,e){return h(" [string|array]",[t,e],arguments.length),this[$t](this.choices.bind(this),"choices",t,e),this}coerce(t,s){if(h(" [function]",[t,s],arguments.length),Array.isArray(t)){if(!s)throw new e("coerce callback must be provided");for(const e of t)this.coerce(e,s);return this}if("object"==typeof t){for(const e of Object.keys(t))this.coerce(e,t[e]);return this}if(!s)throw new e("coerce callback must be provided");return v(this,et,"f").key[t]=!0,v(this,Y,"f").addCoerceMiddleware(((i,n)=>{let r;return Object.prototype.hasOwnProperty.call(i,t)?j((()=>(r=n.getAliases(),s(i[t]))),(e=>{i[t]=e;const s=n.getInternalMethods().getParserConfiguration()["strip-aliased"];if(r[t]&&!0!==s)for(const s of r[t])i[s]=e;return i}),(t=>{throw new e(t.message)})):i}),t),this}conflicts(t,e){return h(" [string|array]",[t,e],arguments.length),v(this,yt,"f").conflicts(t,e),this}config(t="config",e,s){return h("[object|string] [string|function] [function]",[t,e,s],arguments.length),"object"!=typeof t||Array.isArray(t)?("function"==typeof e&&(s=e,e=void 0),this.describe(t,e||v(this,pt,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach((t=>{v(this,et,"f").config[t]=s||!0})),this):(t=n(t,v(this,W,"f"),this[Mt]()["deep-merge-config"]||!1,v(this,ct,"f")),v(this,et,"f").configObjects=(v(this,et,"f").configObjects||[]).concat(t),this)}completion(t,e,s){return h("[string] [string|boolean|function] [function]",[t,e,s],arguments.length),"function"==typeof e&&(s=e,e=void 0),O(this,F,t||v(this,F,"f")||"completion","f"),e||!1===e||(e="generate completion script"),this.command(v(this,F,"f"),e),s&&v(this,U,"f").registerFunction(s),this}command(t,e,s,i,n,r){return h(" [string|boolean] [function|object] [function] [array] [boolean|string]",[t,e,s,i,n,r],arguments.length),v(this,z,"f").addHandler(t,e,s,i,n,r),this}commands(t,e,s,i,n,r){return this.command(t,e,s,i,n,r)}commandDir(t,e){h(" [object]",[t,e],arguments.length);const s=v(this,st,"f")||v(this,ct,"f").require;return v(this,z,"f").addDirectory(t,s,v(this,ct,"f").getCallerFile(),e),this}count(t){return h("",[t],arguments.length),this[Pt]("count",t),this[Qt](t),this}default(t,e,s){return h(" [*] [string]",[t,e,s],arguments.length),s&&(u(t,v(this,ct,"f")),v(this,et,"f").defaultDescription[t]=s),"function"==typeof e&&(u(t,v(this,ct,"f")),v(this,et,"f").defaultDescription[t]||(v(this,et,"f").defaultDescription[t]=v(this,pt,"f").functionDescription(e)),e=e.call()),this[St](this.default.bind(this),"default",t,e),this}defaults(t,e,s){return this.default(t,e,s)}demandCommand(t=1,e,s,i){return h("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,e,s,i],arguments.length),"number"!=typeof e&&(s=e,e=1/0),this.global("_",!1),v(this,et,"f").demandedCommands._={min:t,max:e,minMsg:s,maxMsg:i},this}demand(t,e,s){return Array.isArray(e)?(e.forEach((t=>{d(s,!0,v(this,ct,"f")),this.demandOption(t,s)})),e=1/0):"number"!=typeof e&&(s=e,e=1/0),"number"==typeof t?(d(s,!0,v(this,ct,"f")),this.demandCommand(t,e,s,s)):Array.isArray(t)?t.forEach((t=>{d(s,!0,v(this,ct,"f")),this.demandOption(t,s)})):"string"==typeof s?this.demandOption(t,s):!0!==s&&void 0!==s||this.demandOption(t),this}demandOption(t,e){return h(" [string]",[t,e],arguments.length),this[St](this.demandOption.bind(this),"demandedOptions",t,e),this}deprecateOption(t,e){return h(" [string|boolean]",[t,e],arguments.length),v(this,et,"f").deprecatedOptions[t]=e,this}describe(t,e){return h(" [string]",[t,e],arguments.length),this[Nt](t,!0),v(this,pt,"f").describe(t,e),this}detectLocale(t){return h("",[t],arguments.length),O(this,G,t,"f"),this}env(t){return h("[string|boolean]",[t],arguments.length),!1===t?delete v(this,et,"f").envPrefix:v(this,et,"f").envPrefix=t||"",this}epilogue(t){return h("",[t],arguments.length),v(this,pt,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,e){return h(" [string]",[t,e],arguments.length),Array.isArray(t)?t.forEach((t=>this.example(...t))):v(this,pt,"f").example(t,e),this}exit(t,e){O(this,J,!0,"f"),O(this,V,e,"f"),v(this,T,"f")&&v(this,ct,"f").process.exit(t)}exitProcess(t=!0){return h("[boolean]",[t],arguments.length),O(this,T,t,"f"),this}fail(t){if(h("",[t],arguments.length),"boolean"==typeof t&&!1!==t)throw new e("Invalid first argument. Expected function or boolean 'false'");return v(this,pt,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,e){return h(" [function]",[t,e],arguments.length),e?v(this,U,"f").getCompletion(t,e):new Promise(((e,s)=>{v(this,U,"f").getCompletion(t,((t,i)=>{t?s(t):e(i)}))}))}getDemandedOptions(){return h([],0),v(this,et,"f").demandedOptions}getDemandedCommands(){return h([],0),v(this,et,"f").demandedCommands}getDeprecatedOptions(){return h([],0),v(this,et,"f").deprecatedOptions}getDetectLocale(){return v(this,G,"f")}getExitProcess(){return v(this,T,"f")}getGroups(){return Object.assign({},v(this,K,"f"),v(this,at,"f"))}getHelp(){if(O(this,J,!0,"f"),!v(this,pt,"f").hasCachedHelpMessage()){if(!this.parsed){const t=this[Jt](v(this,ht,"f"),void 0,void 0,0,!0);if(f(t))return t.then((()=>v(this,pt,"f").help()))}const t=v(this,z,"f").runDefaultBuilderOn(this);if(f(t))return t.then((()=>v(this,pt,"f").help()))}return Promise.resolve(v(this,pt,"f").help())}getOptions(){return v(this,et,"f")}getStrict(){return v(this,ft,"f")}getStrictCommands(){return v(this,dt,"f")}getStrictOptions(){return v(this,ut,"f")}global(t,e){return h(" [boolean]",[t,e],arguments.length),t=[].concat(t),!1!==e?v(this,et,"f").local=v(this,et,"f").local.filter((e=>-1===t.indexOf(e))):t.forEach((t=>{v(this,et,"f").local.includes(t)||v(this,et,"f").local.push(t)})),this}group(t,e){h(" ",[t,e],arguments.length);const s=v(this,at,"f")[e]||v(this,K,"f")[e];v(this,at,"f")[e]&&delete v(this,at,"f")[e];const i={};return v(this,K,"f")[e]=(s||[]).concat(t).filter((t=>!i[t]&&(i[t]=!0))),this}hide(t){return h("",[t],arguments.length),v(this,et,"f").hiddenOptions.push(t),this}implies(t,e){return h(" [number|string|array]",[t,e],arguments.length),v(this,yt,"f").implies(t,e),this}locale(t){return h("[string]",[t],arguments.length),void 0===t?(this[kt](),v(this,ct,"f").y18n.getLocale()):(O(this,G,!1,"f"),v(this,ct,"f").y18n.setLocale(t),this)}middleware(t,e,s){return v(this,Y,"f").addMiddleware(t,!!e,s)}nargs(t,e){return h(" [number]",[t,e],arguments.length),this[St](this.nargs.bind(this),"narg",t,e),this}normalize(t){return h("",[t],arguments.length),this[Pt]("normalize",t),this}number(t){return h("",[t],arguments.length),this[Pt]("number",t),this[Qt](t),this}option(t,e){if(h(" [object]",[t,e],arguments.length),"object"==typeof t)Object.keys(t).forEach((e=>{this.options(e,t[e])}));else{"object"!=typeof e&&(e={}),this[Qt](t),!v(this,mt,"f")||"version"!==t&&"version"!==(null==e?void 0:e.alias)||this[wt](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join("\n"),void 0,"versionWarning"),v(this,et,"f").key[t]=!0,e.alias&&this.alias(t,e.alias);const s=e.deprecate||e.deprecated;s&&this.deprecateOption(t,s);const i=e.demand||e.required||e.require;i&&this.demand(t,i),e.demandOption&&this.demandOption(t,"string"==typeof e.demandOption?e.demandOption:void 0),e.conflicts&&this.conflicts(t,e.conflicts),"default"in e&&this.default(t,e.default),void 0!==e.implies&&this.implies(t,e.implies),void 0!==e.nargs&&this.nargs(t,e.nargs),e.config&&this.config(t,e.configParser),e.normalize&&this.normalize(t),e.choices&&this.choices(t,e.choices),e.coerce&&this.coerce(t,e.coerce),e.group&&this.group(t,e.group),(e.boolean||"boolean"===e.type)&&(this.boolean(t),e.alias&&this.boolean(e.alias)),(e.array||"array"===e.type)&&(this.array(t),e.alias&&this.array(e.alias)),(e.number||"number"===e.type)&&(this.number(t),e.alias&&this.number(e.alias)),(e.string||"string"===e.type)&&(this.string(t),e.alias&&this.string(e.alias)),(e.count||"count"===e.type)&&this.count(t),"boolean"==typeof e.global&&this.global(t,e.global),e.defaultDescription&&(v(this,et,"f").defaultDescription[t]=e.defaultDescription),e.skipValidation&&this.skipValidation(t);const n=e.describe||e.description||e.desc,r=v(this,pt,"f").getDescriptions();Object.prototype.hasOwnProperty.call(r,t)&&"string"!=typeof n||this.describe(t,n),e.hidden&&this.hide(t),e.requiresArg&&this.requiresArg(t)}return this}options(t,e){return this.option(t,e)}parse(t,e,s){h("[string|array] [function|boolean|object] [function]",[t,e,s],arguments.length),this[Ct](),void 0===t&&(t=v(this,ht,"f")),"object"==typeof e&&(O(this,rt,e,"f"),e=s),"function"==typeof e&&(O(this,nt,e,"f"),e=!1),e||O(this,ht,t,"f"),v(this,nt,"f")&&O(this,T,!1,"f");const i=this[Jt](t,!!e),n=this.parsed;return v(this,U,"f").setParsed(this.parsed),f(i)?i.then((t=>(v(this,nt,"f")&&v(this,nt,"f").call(this,v(this,V,"f"),t,v(this,tt,"f")),t))).catch((t=>{throw v(this,nt,"f")&&v(this,nt,"f")(t,this.parsed.argv,v(this,tt,"f")),t})).finally((()=>{this[Ht](),this.parsed=n})):(v(this,nt,"f")&&v(this,nt,"f").call(this,v(this,V,"f"),i,v(this,tt,"f")),this[Ht](),this.parsed=n,i)}parseAsync(t,e,s){const i=this.parse(t,e,s);return f(i)?i:Promise.resolve(i)}parseSync(t,s,i){const n=this.parse(t,s,i);if(f(n))throw new e(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return n}parserConfiguration(t){return h("",[t],arguments.length),O(this,it,t,"f"),this}pkgConf(t,e){h(" [string]",[t,e],arguments.length);let s=null;const i=this[At](e||v(this,W,"f"));return i[t]&&"object"==typeof i[t]&&(s=n(i[t],e||v(this,W,"f"),this[Mt]()["deep-merge-config"]||!1,v(this,ct,"f")),v(this,et,"f").configObjects=(v(this,et,"f").configObjects||[]).concat(s)),this}positional(t,e){h(" ",[t,e],arguments.length);const s=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];e=g(e,((t,e)=>!("type"===t&&!["string","number","boolean"].includes(e))&&s.includes(t)));const i=v(this,q,"f").fullCommands[v(this,q,"f").fullCommands.length-1],n=i?v(this,z,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return p(n).forEach((s=>{const i=n[s];Array.isArray(i)?-1!==i.indexOf(t)&&(e[s]=!0):i[t]&&!(s in e)&&(e[s]=i[t])})),this.group(t,v(this,pt,"f").getPositionalGroupName()),this.option(t,e)}recommendCommands(t=!0){return h("[boolean]",[t],arguments.length),O(this,lt,t,"f"),this}required(t,e,s){return this.demand(t,e,s)}require(t,e,s){return this.demand(t,e,s)}requiresArg(t){return h(" [number]",[t],arguments.length),"string"==typeof t&&v(this,et,"f").narg[t]||this[St](this.requiresArg.bind(this),"narg",t,NaN),this}showCompletionScript(t,e){return h("[string] [string]",[t,e],arguments.length),t=t||this.$0,v(this,Q,"f").log(v(this,U,"f").generateCompletionScript(t,e||v(this,F,"f")||"completion")),this}showHelp(t){if(h("[string|function]",[t],arguments.length),O(this,J,!0,"f"),!v(this,pt,"f").hasCachedHelpMessage()){if(!this.parsed){const e=this[Jt](v(this,ht,"f"),void 0,void 0,0,!0);if(f(e))return e.then((()=>{v(this,pt,"f").showHelp(t)})),this}const e=v(this,z,"f").runDefaultBuilderOn(this);if(f(e))return e.then((()=>{v(this,pt,"f").showHelp(t)})),this}return v(this,pt,"f").showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,e){return h("[boolean|string] [string]",[t,e],arguments.length),v(this,pt,"f").showHelpOnFail(t,e),this}showVersion(t){return h("[string|function]",[t],arguments.length),v(this,pt,"f").showVersion(t),this}skipValidation(t){return h("",[t],arguments.length),this[Pt]("skipValidation",t),this}strict(t){return h("[boolean]",[t],arguments.length),O(this,ft,!1!==t,"f"),this}strictCommands(t){return h("[boolean]",[t],arguments.length),O(this,dt,!1!==t,"f"),this}strictOptions(t){return h("[boolean]",[t],arguments.length),O(this,ut,!1!==t,"f"),this}string(t){return h("",[t],arguments.length),this[Pt]("string",t),this[Qt](t),this}terminalWidth(){return h([],0),v(this,ct,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return h("",[t],arguments.length),O(this,G,!1,"f"),v(this,ct,"f").y18n.updateLocale(t),this}usage(t,s,i,n){if(h(" [string|boolean] [function|object] [function]",[t,s,i,n],arguments.length),void 0!==s){if(d(t,null,v(this,ct,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,s,i,n);throw new e(".usage() description must start with $0 if being used as alias for .command()")}return v(this,pt,"f").usage(t),this}usageConfiguration(t){return h("",[t],arguments.length),O(this,gt,t,"f"),this}version(t,e,s){const i="version";if(h("[boolean|string] [string] [string]",[t,e,s],arguments.length),v(this,mt,"f")&&(this[Ot](v(this,mt,"f")),v(this,pt,"f").version(void 0),O(this,mt,null,"f")),0===arguments.length)s=this[xt](),t=i;else if(1===arguments.length){if(!1===t)return this;s=t,t=i}else 2===arguments.length&&(s=e,e=void 0);return O(this,mt,"string"==typeof t?t:i,"f"),e=e||v(this,pt,"f").deferY18nLookup("Show version number"),v(this,pt,"f").version(s||void 0),this.boolean(v(this,mt,"f")),this.describe(v(this,mt,"f"),e),this}wrap(t){return h("",[t],arguments.length),v(this,pt,"f").wrap(t),this}[(z=new WeakMap,W=new WeakMap,q=new WeakMap,U=new WeakMap,F=new WeakMap,L=new WeakMap,V=new WeakMap,G=new WeakMap,R=new WeakMap,T=new WeakMap,B=new WeakMap,Y=new WeakMap,K=new WeakMap,J=new WeakMap,Z=new WeakMap,X=new WeakMap,Q=new WeakMap,tt=new WeakMap,et=new WeakMap,st=new WeakMap,it=new WeakMap,nt=new WeakMap,rt=new WeakMap,ot=new WeakMap,at=new WeakMap,ht=new WeakMap,lt=new WeakMap,ct=new WeakMap,ft=new WeakMap,dt=new WeakMap,ut=new WeakMap,pt=new WeakMap,gt=new WeakMap,mt=new WeakMap,yt=new WeakMap,bt)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"]}catch(t){}return t}[vt](){return{log:(...t)=>{this[Rt]()||console.log(...t),O(this,J,!0,"f"),v(this,tt,"f").length&&O(this,tt,v(this,tt,"f")+"\n","f"),O(this,tt,v(this,tt,"f")+t.join(" "),"f")},error:(...t)=>{this[Rt]()||console.error(...t),O(this,J,!0,"f"),v(this,tt,"f").length&&O(this,tt,v(this,tt,"f")+"\n","f"),O(this,tt,v(this,tt,"f")+t.join(" "),"f")}}}[Ot](t){p(v(this,et,"f")).forEach((e=>{if("configObjects"===e)return;const s=v(this,et,"f")[e];Array.isArray(s)?s.includes(t)&&s.splice(s.indexOf(t),1):"object"==typeof s&&delete s[t]})),delete v(this,pt,"f").getDescriptions()[t]}[wt](t,e,s){v(this,R,"f")[s]||(v(this,ct,"f").process.emitWarning(t,e),v(this,R,"f")[s]=!0)}[Ct](){v(this,B,"f").push({options:v(this,et,"f"),configObjects:v(this,et,"f").configObjects.slice(0),exitProcess:v(this,T,"f"),groups:v(this,K,"f"),strict:v(this,ft,"f"),strictCommands:v(this,dt,"f"),strictOptions:v(this,ut,"f"),completionCommand:v(this,F,"f"),output:v(this,tt,"f"),exitError:v(this,V,"f"),hasOutput:v(this,J,"f"),parsed:this.parsed,parseFn:v(this,nt,"f"),parseContext:v(this,rt,"f")}),v(this,pt,"f").freeze(),v(this,yt,"f").freeze(),v(this,z,"f").freeze(),v(this,Y,"f").freeze()}[jt](){let t,e="";return t=/\b(node|iojs|electron)(\.exe)?$/.test(v(this,ct,"f").process.argv()[0])?v(this,ct,"f").process.argv().slice(1,2):v(this,ct,"f").process.argv().slice(0,1),e=t.map((t=>{const e=this[Yt](v(this,W,"f"),t);return t.match(/^(\/|([a-zA-Z]:)?\\)/)&&e.lengthe.includes("package.json")?"package.json":void 0));d(i,void 0,v(this,ct,"f")),s=JSON.parse(v(this,ct,"f").readFileSync(i,"utf8"))}catch(t){}return v(this,ot,"f")[e]=s||{},v(this,ot,"f")[e]}[Pt](t,e){(e=[].concat(e)).forEach((e=>{e=this[Dt](e),v(this,et,"f")[t].push(e)}))}[St](t,e,s,i){this[It](t,e,s,i,((t,e,s)=>{v(this,et,"f")[t][e]=s}))}[$t](t,e,s,i){this[It](t,e,s,i,((t,e,s)=>{v(this,et,"f")[t][e]=(v(this,et,"f")[t][e]||[]).concat(s)}))}[It](t,e,s,i,n){if(Array.isArray(s))s.forEach((e=>{t(e,i)}));else if((t=>"object"==typeof t)(s))for(const e of p(s))t(e,s[e]);else n(e,this[Dt](s),i)}[Dt](t){return"__proto__"===t?"___proto___":t}[Nt](t,e){return this[St](this[Nt].bind(this),"key",t,e),this}[Ht](){var t,e,s,i,n,r,o,a,h,l,c,f;const u=v(this,B,"f").pop();let p;d(u,void 0,v(this,ct,"f")),t=this,e=this,s=this,i=this,n=this,r=this,o=this,a=this,h=this,l=this,c=this,f=this,({options:{set value(e){O(t,et,e,"f")}}.value,configObjects:p,exitProcess:{set value(t){O(e,T,t,"f")}}.value,groups:{set value(t){O(s,K,t,"f")}}.value,output:{set value(t){O(i,tt,t,"f")}}.value,exitError:{set value(t){O(n,V,t,"f")}}.value,hasOutput:{set value(t){O(r,J,t,"f")}}.value,parsed:this.parsed,strict:{set value(t){O(o,ft,t,"f")}}.value,strictCommands:{set value(t){O(a,dt,t,"f")}}.value,strictOptions:{set value(t){O(h,ut,t,"f")}}.value,completionCommand:{set value(t){O(l,F,t,"f")}}.value,parseFn:{set value(t){O(c,nt,t,"f")}}.value,parseContext:{set value(t){O(f,rt,t,"f")}}.value}=u),v(this,et,"f").configObjects=p,v(this,pt,"f").unfreeze(),v(this,yt,"f").unfreeze(),v(this,z,"f").unfreeze(),v(this,Y,"f").unfreeze()}[zt](t,e){return j(e,(e=>(t(e),e)))}getInternalMethods(){return{getCommandInstance:this[Wt].bind(this),getContext:this[qt].bind(this),getHasOutput:this[Ut].bind(this),getLoggerInstance:this[Ft].bind(this),getParseContext:this[Lt].bind(this),getParserConfiguration:this[Mt].bind(this),getUsageConfiguration:this[_t].bind(this),getUsageInstance:this[Vt].bind(this),getValidationInstance:this[Gt].bind(this),hasParseCallback:this[Rt].bind(this),isGlobalContext:this[Tt].bind(this),postProcess:this[Bt].bind(this),reset:this[Kt].bind(this),runValidation:this[Zt].bind(this),runYargsParserAndExecuteCommands:this[Jt].bind(this),setHasOutput:this[Xt].bind(this)}}[Wt](){return v(this,z,"f")}[qt](){return v(this,q,"f")}[Ut](){return v(this,J,"f")}[Ft](){return v(this,Q,"f")}[Lt](){return v(this,rt,"f")||{}}[Vt](){return v(this,pt,"f")}[Gt](){return v(this,yt,"f")}[Rt](){return!!v(this,nt,"f")}[Tt](){return v(this,X,"f")}[Bt](t,e,s,i){if(s)return t;if(f(t))return t;e||(t=this[bt](t));return(this[Mt]()["parse-positional-numbers"]||void 0===this[Mt]()["parse-positional-numbers"])&&(t=this[Et](t)),i&&(t=C(t,this,v(this,Y,"f").getMiddleware(),!1)),t}[Kt](t={}){O(this,et,v(this,et,"f")||{},"f");const e={};e.local=v(this,et,"f").local||[],e.configObjects=v(this,et,"f").configObjects||[];const s={};e.local.forEach((e=>{s[e]=!0,(t[e]||[]).forEach((t=>{s[t]=!0}))})),Object.assign(v(this,at,"f"),Object.keys(v(this,K,"f")).reduce(((t,e)=>{const i=v(this,K,"f")[e].filter((t=>!(t in s)));return i.length>0&&(t[e]=i),t}),{})),O(this,K,{},"f");return["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"].forEach((t=>{e[t]=(v(this,et,"f")[t]||[]).filter((t=>!s[t]))})),["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"].forEach((t=>{e[t]=g(v(this,et,"f")[t],(t=>!s[t]))})),e.envPrefix=v(this,et,"f").envPrefix,O(this,et,e,"f"),O(this,pt,v(this,pt,"f")?v(this,pt,"f").reset(s):P(this,v(this,ct,"f")),"f"),O(this,yt,v(this,yt,"f")?v(this,yt,"f").reset(s):function(t,e,s){const i=s.y18n.__,n=s.y18n.__n,r={nonOptionCount:function(s){const i=t.getDemandedCommands(),r=s._.length+(s["--"]?s["--"].length:0)-t.getInternalMethods().getContext().commands.length;i._&&(ri._.max)&&(ri._.max&&(void 0!==i._.maxMsg?e.fail(i._.maxMsg?i._.maxMsg.replace(/\$0/g,r.toString()).replace(/\$1/,i._.max.toString()):null):e.fail(n("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",r,r.toString(),i._.max.toString()))))},positionalCount:function(t,s){s{H.includes(e)||Object.prototype.hasOwnProperty.call(o,e)||Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),e)||r.isValidAndSomeAliasIsNotNew(e,i)||f.push(e)})),h&&(d.commands.length>0||c.length>0||a)&&s._.slice(d.commands.length).forEach((t=>{c.includes(""+t)||f.push(""+t)})),h){const e=(null===(l=t.getDemandedCommands()._)||void 0===l?void 0:l.max)||0,i=d.commands.length+e;i{t=String(t),d.commands.includes(t)||f.includes(t)||f.push(t)}))}f.length&&e.fail(n("Unknown argument: %s","Unknown arguments: %s",f.length,f.map((t=>t.trim()?t:`"${t}"`)).join(", ")))},unknownCommands:function(s){const i=t.getInternalMethods().getCommandInstance().getCommands(),r=[],o=t.getInternalMethods().getContext();return(o.commands.length>0||i.length>0)&&s._.slice(o.commands.length).forEach((t=>{i.includes(""+t)||r.push(""+t)})),r.length>0&&(e.fail(n("Unknown command: %s","Unknown commands: %s",r.length,r.join(", "))),!0)},isValidAndSomeAliasIsNotNew:function(e,s){if(!Object.prototype.hasOwnProperty.call(s,e))return!1;const i=t.parsed.newAliases;return[e,...s[e]].some((t=>!Object.prototype.hasOwnProperty.call(i,t)||!i[e]))},limitedChoices:function(s){const n=t.getOptions(),r={};if(!Object.keys(n.choices).length)return;Object.keys(s).forEach((t=>{-1===H.indexOf(t)&&Object.prototype.hasOwnProperty.call(n.choices,t)&&[].concat(s[t]).forEach((e=>{-1===n.choices[t].indexOf(e)&&void 0!==e&&(r[t]=(r[t]||[]).concat(e))}))}));const o=Object.keys(r);if(!o.length)return;let a=i("Invalid values:");o.forEach((t=>{a+=`\n ${i("Argument: %s, Given: %s, Choices: %s",t,e.stringifiedValues(r[t]),e.stringifiedValues(n.choices[t]))}`})),e.fail(a)}};let o={};function a(t,e){const s=Number(e);return"number"==typeof(e=isNaN(s)?e:s)?e=t._.length>=e:e.match(/^--no-.+/)?(e=e.match(/^--no-(.+)/)[1],e=!Object.prototype.hasOwnProperty.call(t,e)):e=Object.prototype.hasOwnProperty.call(t,e),e}r.implies=function(e,i){h(" [array|number|string]",[e,i],arguments.length),"object"==typeof e?Object.keys(e).forEach((t=>{r.implies(t,e[t])})):(t.global(e),o[e]||(o[e]=[]),Array.isArray(i)?i.forEach((t=>r.implies(e,t))):(d(i,void 0,s),o[e].push(i)))},r.getImplied=function(){return o},r.implications=function(t){const s=[];if(Object.keys(o).forEach((e=>{const i=e;(o[e]||[]).forEach((e=>{let n=i;const r=e;n=a(t,n),e=a(t,e),n&&!e&&s.push(` ${i} -> ${r}`)}))})),s.length){let t=`${i("Implications failed:")}\n`;s.forEach((e=>{t+=e})),e.fail(t)}};let l={};r.conflicts=function(e,s){h(" [array|string]",[e,s],arguments.length),"object"==typeof e?Object.keys(e).forEach((t=>{r.conflicts(t,e[t])})):(t.global(e),l[e]||(l[e]=[]),Array.isArray(s)?s.forEach((t=>r.conflicts(e,t))):l[e].push(s))},r.getConflicting=()=>l,r.conflicting=function(n){Object.keys(n).forEach((t=>{l[t]&&l[t].forEach((s=>{s&&void 0!==n[t]&&void 0!==n[s]&&e.fail(i("Arguments %s and %s are mutually exclusive",t,s))}))})),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(l).forEach((t=>{l[t].forEach((r=>{r&&void 0!==n[s.Parser.camelCase(t)]&&void 0!==n[s.Parser.camelCase(r)]&&e.fail(i("Arguments %s and %s are mutually exclusive",t,r))}))}))},r.recommendCommands=function(t,s){s=s.sort(((t,e)=>e.length-t.length));let n=null,r=1/0;for(let e,i=0;void 0!==(e=s[i]);i++){const s=N(t,e);s<=3&&s!t[e])),l=g(l,(e=>!t[e])),r};const c=[];return r.freeze=function(){c.push({implied:o,conflicting:l})},r.unfreeze=function(){const t=c.pop();d(t,void 0,s),({implied:o,conflicting:l}=t)},r}(this,v(this,pt,"f"),v(this,ct,"f")),"f"),O(this,z,v(this,z,"f")?v(this,z,"f").reset():function(t,e,s,i){return new _(t,e,s,i)}(v(this,pt,"f"),v(this,yt,"f"),v(this,Y,"f"),v(this,ct,"f")),"f"),v(this,U,"f")||O(this,U,function(t,e,s,i){return new D(t,e,s,i)}(this,v(this,pt,"f"),v(this,z,"f"),v(this,ct,"f")),"f"),v(this,Y,"f").reset(),O(this,F,null,"f"),O(this,tt,"","f"),O(this,V,null,"f"),O(this,J,!1,"f"),this.parsed=!1,this}[Yt](t,e){return v(this,ct,"f").path.relative(t,e)}[Jt](t,s,i,n=0,r=!1){let o=!!i||r;t=t||v(this,ht,"f"),v(this,et,"f").__=v(this,ct,"f").y18n.__,v(this,et,"f").configuration=this[Mt]();const a=!!v(this,et,"f").configuration["populate--"],h=Object.assign({},v(this,et,"f").configuration,{"populate--":!0}),l=v(this,ct,"f").Parser.detailed(t,Object.assign({},v(this,et,"f"),{configuration:{"parse-positional-numbers":!1,...h}})),c=Object.assign(l.argv,v(this,rt,"f"));let d;const u=l.aliases;let p=!1,g=!1;Object.keys(c).forEach((t=>{t===v(this,Z,"f")&&c[t]?p=!0:t===v(this,mt,"f")&&c[t]&&(g=!0)})),c.$0=this.$0,this.parsed=l,0===n&&v(this,pt,"f").clearCachedHelpMessage();try{if(this[kt](),s)return this[Bt](c,a,!!i,!1);if(v(this,Z,"f")){[v(this,Z,"f")].concat(u[v(this,Z,"f")]||[]).filter((t=>t.length>1)).includes(""+c._[c._.length-1])&&(c._.pop(),p=!0)}O(this,X,!1,"f");const h=v(this,z,"f").getCommands(),m=v(this,U,"f").completionKey in c,y=p||m||r;if(c._.length){if(h.length){let t;for(let e,s=n||0;void 0!==c._[s];s++){if(e=String(c._[s]),h.includes(e)&&e!==v(this,F,"f")){const t=v(this,z,"f").runCommand(e,this,l,s+1,r,p||g||r);return this[Bt](t,a,!!i,!1)}if(!t&&e!==v(this,F,"f")){t=e;break}}!v(this,z,"f").hasDefaultCommand()&&v(this,lt,"f")&&t&&!y&&v(this,yt,"f").recommendCommands(t,h)}v(this,F,"f")&&c._.includes(v(this,F,"f"))&&!m&&(v(this,T,"f")&&E(!0),this.showCompletionScript(),this.exit(0))}if(v(this,z,"f").hasDefaultCommand()&&!y){const t=v(this,z,"f").runCommand(null,this,l,0,r,p||g||r);return this[Bt](t,a,!!i,!1)}if(m){v(this,T,"f")&&E(!0);const s=(t=[].concat(t)).slice(t.indexOf(`--${v(this,U,"f").completionKey}`)+1);return v(this,U,"f").getCompletion(s,((t,s)=>{if(t)throw new e(t.message);(s||[]).forEach((t=>{v(this,Q,"f").log(t)})),this.exit(0)})),this[Bt](c,!a,!!i,!1)}if(v(this,J,"f")||(p?(v(this,T,"f")&&E(!0),o=!0,this.showHelp("log"),this.exit(0)):g&&(v(this,T,"f")&&E(!0),o=!0,v(this,pt,"f").showVersion("log"),this.exit(0))),!o&&v(this,et,"f").skipValidation.length>0&&(o=Object.keys(c).some((t=>v(this,et,"f").skipValidation.indexOf(t)>=0&&!0===c[t]))),!o){if(l.error)throw new e(l.error.message);if(!m){const t=this[Zt](u,{},l.error);i||(d=C(c,this,v(this,Y,"f").getMiddleware(),!0)),d=this[zt](t,null!=d?d:c),f(d)&&!i&&(d=d.then((()=>C(c,this,v(this,Y,"f").getMiddleware(),!1))))}}}catch(t){if(!(t instanceof e))throw t;v(this,pt,"f").fail(t.message,t)}return this[Bt](null!=d?d:c,a,!!i,!0)}[Zt](t,s,i,n){const r={...this.getDemandedOptions()};return o=>{if(i)throw new e(i.message);v(this,yt,"f").nonOptionCount(o),v(this,yt,"f").requiredArguments(o,r);let a=!1;v(this,dt,"f")&&(a=v(this,yt,"f").unknownCommands(o)),v(this,ft,"f")&&!a?v(this,yt,"f").unknownArguments(o,t,s,!!n):v(this,ut,"f")&&v(this,yt,"f").unknownArguments(o,t,{},!1,!1),v(this,yt,"f").limitedChoices(o),v(this,yt,"f").implications(o),v(this,yt,"f").conflicting(o)}}[Xt](){O(this,J,!0,"f")}[Qt](t){if("string"==typeof t)v(this,et,"f").key[t]=!0;else for(const e of t)v(this,et,"f").key[e]=!0}}var ee,se;const{readFileSync:ie}=require("fs"),{inspect:ne}=require("util"),{resolve:re}=require("path"),oe=require("y18n"),ae=require("yargs-parser");var he,le={assert:{notStrictEqual:t.notStrictEqual,strictEqual:t.strictEqual},cliui:require("cliui"),findUp:require("escalade/sync"),getEnv:t=>process.env[t],getCallerFile:require("get-caller-file"),getProcessArgvBin:y,inspect:ne,mainFilename:null!==(se=null===(ee=null===require||void 0===require?void 0:require.main)||void 0===ee?void 0:ee.filename)&&void 0!==se?se:process.cwd(),Parser:ae,path:require("path"),process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:t=>{process.exit(t)},nextTick:process.nextTick,stdColumns:void 0!==process.stdout.columns?process.stdout.columns:null},readFileSync:ie,require:require,requireDirectory:require("require-directory"),stringWidth:require("string-width"),y18n:oe({directory:re(__dirname,"../locales"),updateFiles:!1})};const ce=(null===(he=null===process||void 0===process?void 0:process.env)||void 0===he?void 0:he.YARGS_MIN_NODE_VERSION)?Number(process.env.YARGS_MIN_NODE_VERSION):12;if(process&&process.version){if(Number(process.version.match(/v([^.]+)/)[1]){const i=new te(t,e,s,de);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}),argsert:h,isPromise:f,objFilter:g,parseCommand:o,Parser:fe,processArgv:b,YError:e};module.exports=ue; diff --git a/node_modules/yargs/build/lib/argsert.js b/node_modules/yargs/build/lib/argsert.js deleted file mode 100644 index be5b3aa..0000000 --- a/node_modules/yargs/build/lib/argsert.js +++ /dev/null @@ -1,62 +0,0 @@ -import { YError } from './yerror.js'; -import { parseCommand } from './parse-command.js'; -const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']; -export function argsert(arg1, arg2, arg3) { - function parseArgs() { - return typeof arg1 === 'object' - ? [{ demanded: [], optional: [] }, arg1, arg2] - : [ - parseCommand(`cmd ${arg1}`), - arg2, - arg3, - ]; - } - try { - let position = 0; - const [parsed, callerArguments, _length] = parseArgs(); - const args = [].slice.call(callerArguments); - while (args.length && args[args.length - 1] === undefined) - args.pop(); - const length = _length || args.length; - if (length < parsed.demanded.length) { - throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`); - } - const totalCommands = parsed.demanded.length + parsed.optional.length; - if (length > totalCommands) { - throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`); - } - parsed.demanded.forEach(demanded => { - const arg = args.shift(); - const observedType = guessType(arg); - const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*'); - if (matchingTypes.length === 0) - argumentTypeError(observedType, demanded.cmd, position); - position += 1; - }); - parsed.optional.forEach(optional => { - if (args.length === 0) - return; - const arg = args.shift(); - const observedType = guessType(arg); - const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*'); - if (matchingTypes.length === 0) - argumentTypeError(observedType, optional.cmd, position); - position += 1; - }); - } - catch (err) { - console.warn(err.stack); - } -} -function guessType(arg) { - if (Array.isArray(arg)) { - return 'array'; - } - else if (arg === null) { - return 'null'; - } - return typeof arg; -} -function argumentTypeError(observedType, allowedTypes, position) { - throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`); -} diff --git a/node_modules/yargs/build/lib/command.js b/node_modules/yargs/build/lib/command.js deleted file mode 100644 index 47c1ed6..0000000 --- a/node_modules/yargs/build/lib/command.js +++ /dev/null @@ -1,449 +0,0 @@ -import { assertNotStrictEqual, } from './typings/common-types.js'; -import { isPromise } from './utils/is-promise.js'; -import { applyMiddleware, commandMiddlewareFactory, } from './middleware.js'; -import { parseCommand } from './parse-command.js'; -import { isYargsInstance, } from './yargs-factory.js'; -import { maybeAsyncResult } from './utils/maybe-async-result.js'; -import whichModule from './utils/which-module.js'; -const DEFAULT_MARKER = /(^\*)|(^\$0)/; -export class CommandInstance { - constructor(usage, validation, globalMiddleware, shim) { - this.requireCache = new Set(); - this.handlers = {}; - this.aliasMap = {}; - this.frozens = []; - this.shim = shim; - this.usage = usage; - this.globalMiddleware = globalMiddleware; - this.validation = validation; - } - addDirectory(dir, req, callerFile, opts) { - opts = opts || {}; - if (typeof opts.recurse !== 'boolean') - opts.recurse = false; - if (!Array.isArray(opts.extensions)) - opts.extensions = ['js']; - const parentVisit = typeof opts.visit === 'function' ? opts.visit : (o) => o; - opts.visit = (obj, joined, filename) => { - const visited = parentVisit(obj, joined, filename); - if (visited) { - if (this.requireCache.has(joined)) - return visited; - else - this.requireCache.add(joined); - this.addHandler(visited); - } - return visited; - }; - this.shim.requireDirectory({ require: req, filename: callerFile }, dir, opts); - } - addHandler(cmd, description, builder, handler, commandMiddleware, deprecated) { - let aliases = []; - const middlewares = commandMiddlewareFactory(commandMiddleware); - handler = handler || (() => { }); - if (Array.isArray(cmd)) { - if (isCommandAndAliases(cmd)) { - [cmd, ...aliases] = cmd; - } - else { - for (const command of cmd) { - this.addHandler(command); - } - } - } - else if (isCommandHandlerDefinition(cmd)) { - let command = Array.isArray(cmd.command) || typeof cmd.command === 'string' - ? cmd.command - : this.moduleName(cmd); - if (cmd.aliases) - command = [].concat(command).concat(cmd.aliases); - this.addHandler(command, this.extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares, cmd.deprecated); - return; - } - else if (isCommandBuilderDefinition(builder)) { - this.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares, builder.deprecated); - return; - } - if (typeof cmd === 'string') { - const parsedCommand = parseCommand(cmd); - aliases = aliases.map(alias => parseCommand(alias).cmd); - let isDefault = false; - const parsedAliases = [parsedCommand.cmd].concat(aliases).filter(c => { - if (DEFAULT_MARKER.test(c)) { - isDefault = true; - return false; - } - return true; - }); - if (parsedAliases.length === 0 && isDefault) - parsedAliases.push('$0'); - if (isDefault) { - parsedCommand.cmd = parsedAliases[0]; - aliases = parsedAliases.slice(1); - cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd); - } - aliases.forEach(alias => { - this.aliasMap[alias] = parsedCommand.cmd; - }); - if (description !== false) { - this.usage.command(cmd, description, isDefault, aliases, deprecated); - } - this.handlers[parsedCommand.cmd] = { - original: cmd, - description, - handler, - builder: builder || {}, - middlewares, - deprecated, - demanded: parsedCommand.demanded, - optional: parsedCommand.optional, - }; - if (isDefault) - this.defaultCommand = this.handlers[parsedCommand.cmd]; - } - } - getCommandHandlers() { - return this.handlers; - } - getCommands() { - return Object.keys(this.handlers).concat(Object.keys(this.aliasMap)); - } - hasDefaultCommand() { - return !!this.defaultCommand; - } - runCommand(command, yargs, parsed, commandIndex, helpOnly, helpOrVersionSet) { - const commandHandler = this.handlers[command] || - this.handlers[this.aliasMap[command]] || - this.defaultCommand; - const currentContext = yargs.getInternalMethods().getContext(); - const parentCommands = currentContext.commands.slice(); - const isDefaultCommand = !command; - if (command) { - currentContext.commands.push(command); - currentContext.fullCommands.push(commandHandler.original); - } - const builderResult = this.applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, parsed.aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet); - return isPromise(builderResult) - ? builderResult.then(result => this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, result.innerArgv, currentContext, helpOnly, result.aliases, yargs)) - : this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, builderResult.innerArgv, currentContext, helpOnly, builderResult.aliases, yargs); - } - applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet) { - const builder = commandHandler.builder; - let innerYargs = yargs; - if (isCommandBuilderCallback(builder)) { - yargs.getInternalMethods().getUsageInstance().freeze(); - const builderOutput = builder(yargs.getInternalMethods().reset(aliases), helpOrVersionSet); - if (isPromise(builderOutput)) { - return builderOutput.then(output => { - innerYargs = isYargsInstance(output) ? output : yargs; - return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly); - }); - } - } - else if (isCommandBuilderOptionDefinitions(builder)) { - yargs.getInternalMethods().getUsageInstance().freeze(); - innerYargs = yargs.getInternalMethods().reset(aliases); - Object.keys(commandHandler.builder).forEach(key => { - innerYargs.option(key, builder[key]); - }); - } - return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly); - } - parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly) { - if (isDefaultCommand) - innerYargs.getInternalMethods().getUsageInstance().unfreeze(true); - if (this.shouldUpdateUsage(innerYargs)) { - innerYargs - .getInternalMethods() - .getUsageInstance() - .usage(this.usageFromParentCommandsCommandHandler(parentCommands, commandHandler), commandHandler.description); - } - const innerArgv = innerYargs - .getInternalMethods() - .runYargsParserAndExecuteCommands(null, undefined, true, commandIndex, helpOnly); - return isPromise(innerArgv) - ? innerArgv.then(argv => ({ - aliases: innerYargs.parsed.aliases, - innerArgv: argv, - })) - : { - aliases: innerYargs.parsed.aliases, - innerArgv: innerArgv, - }; - } - shouldUpdateUsage(yargs) { - return (!yargs.getInternalMethods().getUsageInstance().getUsageDisabled() && - yargs.getInternalMethods().getUsageInstance().getUsage().length === 0); - } - usageFromParentCommandsCommandHandler(parentCommands, commandHandler) { - const c = DEFAULT_MARKER.test(commandHandler.original) - ? commandHandler.original.replace(DEFAULT_MARKER, '').trim() - : commandHandler.original; - const pc = parentCommands.filter(c => { - return !DEFAULT_MARKER.test(c); - }); - pc.push(c); - return `$0 ${pc.join(' ')}`; - } - handleValidationAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, aliases, yargs, middlewares, positionalMap) { - if (!yargs.getInternalMethods().getHasOutput()) { - const validation = yargs - .getInternalMethods() - .runValidation(aliases, positionalMap, yargs.parsed.error, isDefaultCommand); - innerArgv = maybeAsyncResult(innerArgv, result => { - validation(result); - return result; - }); - } - if (commandHandler.handler && !yargs.getInternalMethods().getHasOutput()) { - yargs.getInternalMethods().setHasOutput(); - const populateDoubleDash = !!yargs.getOptions().configuration['populate--']; - yargs - .getInternalMethods() - .postProcess(innerArgv, populateDoubleDash, false, false); - innerArgv = applyMiddleware(innerArgv, yargs, middlewares, false); - innerArgv = maybeAsyncResult(innerArgv, result => { - const handlerResult = commandHandler.handler(result); - return isPromise(handlerResult) - ? handlerResult.then(() => result) - : result; - }); - if (!isDefaultCommand) { - yargs.getInternalMethods().getUsageInstance().cacheHelpMessage(); - } - if (isPromise(innerArgv) && - !yargs.getInternalMethods().hasParseCallback()) { - innerArgv.catch(error => { - try { - yargs.getInternalMethods().getUsageInstance().fail(null, error); - } - catch (_err) { - } - }); - } - } - if (!isDefaultCommand) { - currentContext.commands.pop(); - currentContext.fullCommands.pop(); - } - return innerArgv; - } - applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, helpOnly, aliases, yargs) { - let positionalMap = {}; - if (helpOnly) - return innerArgv; - if (!yargs.getInternalMethods().getHasOutput()) { - positionalMap = this.populatePositionals(commandHandler, innerArgv, currentContext, yargs); - } - const middlewares = this.globalMiddleware - .getMiddleware() - .slice(0) - .concat(commandHandler.middlewares); - const maybePromiseArgv = applyMiddleware(innerArgv, yargs, middlewares, true); - return isPromise(maybePromiseArgv) - ? maybePromiseArgv.then(resolvedInnerArgv => this.handleValidationAndGetResult(isDefaultCommand, commandHandler, resolvedInnerArgv, currentContext, aliases, yargs, middlewares, positionalMap)) - : this.handleValidationAndGetResult(isDefaultCommand, commandHandler, maybePromiseArgv, currentContext, aliases, yargs, middlewares, positionalMap); - } - populatePositionals(commandHandler, argv, context, yargs) { - argv._ = argv._.slice(context.commands.length); - const demanded = commandHandler.demanded.slice(0); - const optional = commandHandler.optional.slice(0); - const positionalMap = {}; - this.validation.positionalCount(demanded.length, argv._.length); - while (demanded.length) { - const demand = demanded.shift(); - this.populatePositional(demand, argv, positionalMap); - } - while (optional.length) { - const maybe = optional.shift(); - this.populatePositional(maybe, argv, positionalMap); - } - argv._ = context.commands.concat(argv._.map(a => '' + a)); - this.postProcessPositionals(argv, positionalMap, this.cmdToParseOptions(commandHandler.original), yargs); - return positionalMap; - } - populatePositional(positional, argv, positionalMap) { - const cmd = positional.cmd[0]; - if (positional.variadic) { - positionalMap[cmd] = argv._.splice(0).map(String); - } - else { - if (argv._.length) - positionalMap[cmd] = [String(argv._.shift())]; - } - } - cmdToParseOptions(cmdString) { - const parseOptions = { - array: [], - default: {}, - alias: {}, - demand: {}, - }; - const parsed = parseCommand(cmdString); - parsed.demanded.forEach(d => { - const [cmd, ...aliases] = d.cmd; - if (d.variadic) { - parseOptions.array.push(cmd); - parseOptions.default[cmd] = []; - } - parseOptions.alias[cmd] = aliases; - parseOptions.demand[cmd] = true; - }); - parsed.optional.forEach(o => { - const [cmd, ...aliases] = o.cmd; - if (o.variadic) { - parseOptions.array.push(cmd); - parseOptions.default[cmd] = []; - } - parseOptions.alias[cmd] = aliases; - }); - return parseOptions; - } - postProcessPositionals(argv, positionalMap, parseOptions, yargs) { - const options = Object.assign({}, yargs.getOptions()); - options.default = Object.assign(parseOptions.default, options.default); - for (const key of Object.keys(parseOptions.alias)) { - options.alias[key] = (options.alias[key] || []).concat(parseOptions.alias[key]); - } - options.array = options.array.concat(parseOptions.array); - options.config = {}; - const unparsed = []; - Object.keys(positionalMap).forEach(key => { - positionalMap[key].map(value => { - if (options.configuration['unknown-options-as-args']) - options.key[key] = true; - unparsed.push(`--${key}`); - unparsed.push(value); - }); - }); - if (!unparsed.length) - return; - const config = Object.assign({}, options.configuration, { - 'populate--': false, - }); - const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, { - configuration: config, - })); - if (parsed.error) { - yargs - .getInternalMethods() - .getUsageInstance() - .fail(parsed.error.message, parsed.error); - } - else { - const positionalKeys = Object.keys(positionalMap); - Object.keys(positionalMap).forEach(key => { - positionalKeys.push(...parsed.aliases[key]); - }); - Object.keys(parsed.argv).forEach(key => { - if (positionalKeys.includes(key)) { - if (!positionalMap[key]) - positionalMap[key] = parsed.argv[key]; - if (!this.isInConfigs(yargs, key) && - !this.isDefaulted(yargs, key) && - Object.prototype.hasOwnProperty.call(argv, key) && - Object.prototype.hasOwnProperty.call(parsed.argv, key) && - (Array.isArray(argv[key]) || Array.isArray(parsed.argv[key]))) { - argv[key] = [].concat(argv[key], parsed.argv[key]); - } - else { - argv[key] = parsed.argv[key]; - } - } - }); - } - } - isDefaulted(yargs, key) { - const { default: defaults } = yargs.getOptions(); - return (Object.prototype.hasOwnProperty.call(defaults, key) || - Object.prototype.hasOwnProperty.call(defaults, this.shim.Parser.camelCase(key))); - } - isInConfigs(yargs, key) { - const { configObjects } = yargs.getOptions(); - return (configObjects.some(c => Object.prototype.hasOwnProperty.call(c, key)) || - configObjects.some(c => Object.prototype.hasOwnProperty.call(c, this.shim.Parser.camelCase(key)))); - } - runDefaultBuilderOn(yargs) { - if (!this.defaultCommand) - return; - if (this.shouldUpdateUsage(yargs)) { - const commandString = DEFAULT_MARKER.test(this.defaultCommand.original) - ? this.defaultCommand.original - : this.defaultCommand.original.replace(/^[^[\]<>]*/, '$0 '); - yargs - .getInternalMethods() - .getUsageInstance() - .usage(commandString, this.defaultCommand.description); - } - const builder = this.defaultCommand.builder; - if (isCommandBuilderCallback(builder)) { - return builder(yargs, true); - } - else if (!isCommandBuilderDefinition(builder)) { - Object.keys(builder).forEach(key => { - yargs.option(key, builder[key]); - }); - } - return undefined; - } - moduleName(obj) { - const mod = whichModule(obj); - if (!mod) - throw new Error(`No command name given for module: ${this.shim.inspect(obj)}`); - return this.commandFromFilename(mod.filename); - } - commandFromFilename(filename) { - return this.shim.path.basename(filename, this.shim.path.extname(filename)); - } - extractDesc({ describe, description, desc }) { - for (const test of [describe, description, desc]) { - if (typeof test === 'string' || test === false) - return test; - assertNotStrictEqual(test, true, this.shim); - } - return false; - } - freeze() { - this.frozens.push({ - handlers: this.handlers, - aliasMap: this.aliasMap, - defaultCommand: this.defaultCommand, - }); - } - unfreeze() { - const frozen = this.frozens.pop(); - assertNotStrictEqual(frozen, undefined, this.shim); - ({ - handlers: this.handlers, - aliasMap: this.aliasMap, - defaultCommand: this.defaultCommand, - } = frozen); - } - reset() { - this.handlers = {}; - this.aliasMap = {}; - this.defaultCommand = undefined; - this.requireCache = new Set(); - return this; - } -} -export function command(usage, validation, globalMiddleware, shim) { - return new CommandInstance(usage, validation, globalMiddleware, shim); -} -export function isCommandBuilderDefinition(builder) { - return (typeof builder === 'object' && - !!builder.builder && - typeof builder.handler === 'function'); -} -function isCommandAndAliases(cmd) { - return cmd.every(c => typeof c === 'string'); -} -export function isCommandBuilderCallback(builder) { - return typeof builder === 'function'; -} -function isCommandBuilderOptionDefinitions(builder) { - return typeof builder === 'object'; -} -export function isCommandHandlerDefinition(cmd) { - return typeof cmd === 'object' && !Array.isArray(cmd); -} diff --git a/node_modules/yargs/build/lib/completion-templates.js b/node_modules/yargs/build/lib/completion-templates.js deleted file mode 100644 index 2c4dcb5..0000000 --- a/node_modules/yargs/build/lib/completion-templates.js +++ /dev/null @@ -1,48 +0,0 @@ -export const completionShTemplate = `###-begin-{{app_name}}-completions-### -# -# yargs command completion script -# -# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc -# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX. -# -_{{app_name}}_yargs_completions() -{ - local cur_word args type_list - - cur_word="\${COMP_WORDS[COMP_CWORD]}" - args=("\${COMP_WORDS[@]}") - - # ask yargs to generate completions. - type_list=$({{app_path}} --get-yargs-completions "\${args[@]}") - - COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) ) - - # if no match was found, fall back to filename completion - if [ \${#COMPREPLY[@]} -eq 0 ]; then - COMPREPLY=() - fi - - return 0 -} -complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}} -###-end-{{app_name}}-completions-### -`; -export const completionZshTemplate = `#compdef {{app_name}} -###-begin-{{app_name}}-completions-### -# -# yargs command completion script -# -# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc -# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX. -# -_{{app_name}}_yargs_completions() -{ - local reply - local si=$IFS - IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) - IFS=$si - _describe 'values' reply -} -compdef _{{app_name}}_yargs_completions {{app_name}} -###-end-{{app_name}}-completions-### -`; diff --git a/node_modules/yargs/build/lib/completion.js b/node_modules/yargs/build/lib/completion.js deleted file mode 100644 index cef2bbe..0000000 --- a/node_modules/yargs/build/lib/completion.js +++ /dev/null @@ -1,243 +0,0 @@ -import { isCommandBuilderCallback } from './command.js'; -import { assertNotStrictEqual } from './typings/common-types.js'; -import * as templates from './completion-templates.js'; -import { isPromise } from './utils/is-promise.js'; -import { parseCommand } from './parse-command.js'; -export class Completion { - constructor(yargs, usage, command, shim) { - var _a, _b, _c; - this.yargs = yargs; - this.usage = usage; - this.command = command; - this.shim = shim; - this.completionKey = 'get-yargs-completions'; - this.aliases = null; - this.customCompletionFunction = null; - this.indexAfterLastReset = 0; - this.zshShell = - (_c = (((_a = this.shim.getEnv('SHELL')) === null || _a === void 0 ? void 0 : _a.includes('zsh')) || - ((_b = this.shim.getEnv('ZSH_NAME')) === null || _b === void 0 ? void 0 : _b.includes('zsh')))) !== null && _c !== void 0 ? _c : false; - } - defaultCompletion(args, argv, current, done) { - const handlers = this.command.getCommandHandlers(); - for (let i = 0, ii = args.length; i < ii; ++i) { - if (handlers[args[i]] && handlers[args[i]].builder) { - const builder = handlers[args[i]].builder; - if (isCommandBuilderCallback(builder)) { - this.indexAfterLastReset = i + 1; - const y = this.yargs.getInternalMethods().reset(); - builder(y, true); - return y.argv; - } - } - } - const completions = []; - this.commandCompletions(completions, args, current); - this.optionCompletions(completions, args, argv, current); - this.choicesFromOptionsCompletions(completions, args, argv, current); - this.choicesFromPositionalsCompletions(completions, args, argv, current); - done(null, completions); - } - commandCompletions(completions, args, current) { - const parentCommands = this.yargs - .getInternalMethods() - .getContext().commands; - if (!current.match(/^-/) && - parentCommands[parentCommands.length - 1] !== current && - !this.previousArgHasChoices(args)) { - this.usage.getCommands().forEach(usageCommand => { - const commandName = parseCommand(usageCommand[0]).cmd; - if (args.indexOf(commandName) === -1) { - if (!this.zshShell) { - completions.push(commandName); - } - else { - const desc = usageCommand[1] || ''; - completions.push(commandName.replace(/:/g, '\\:') + ':' + desc); - } - } - }); - } - } - optionCompletions(completions, args, argv, current) { - if ((current.match(/^-/) || (current === '' && completions.length === 0)) && - !this.previousArgHasChoices(args)) { - const options = this.yargs.getOptions(); - const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || []; - Object.keys(options.key).forEach(key => { - const negable = !!options.configuration['boolean-negation'] && - options.boolean.includes(key); - const isPositionalKey = positionalKeys.includes(key); - if (!isPositionalKey && - !options.hiddenOptions.includes(key) && - !this.argsContainKey(args, key, negable)) { - this.completeOptionKey(key, completions, current, negable && !!options.default[key]); - } - }); - } - } - choicesFromOptionsCompletions(completions, args, argv, current) { - if (this.previousArgHasChoices(args)) { - const choices = this.getPreviousArgChoices(args); - if (choices && choices.length > 0) { - completions.push(...choices.map(c => c.replace(/:/g, '\\:'))); - } - } - } - choicesFromPositionalsCompletions(completions, args, argv, current) { - if (current === '' && - completions.length > 0 && - this.previousArgHasChoices(args)) { - return; - } - const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || []; - const offset = Math.max(this.indexAfterLastReset, this.yargs.getInternalMethods().getContext().commands.length + - 1); - const positionalKey = positionalKeys[argv._.length - offset - 1]; - if (!positionalKey) { - return; - } - const choices = this.yargs.getOptions().choices[positionalKey] || []; - for (const choice of choices) { - if (choice.startsWith(current)) { - completions.push(choice.replace(/:/g, '\\:')); - } - } - } - getPreviousArgChoices(args) { - if (args.length < 1) - return; - let previousArg = args[args.length - 1]; - let filter = ''; - if (!previousArg.startsWith('-') && args.length > 1) { - filter = previousArg; - previousArg = args[args.length - 2]; - } - if (!previousArg.startsWith('-')) - return; - const previousArgKey = previousArg.replace(/^-+/, ''); - const options = this.yargs.getOptions(); - const possibleAliases = [ - previousArgKey, - ...(this.yargs.getAliases()[previousArgKey] || []), - ]; - let choices; - for (const possibleAlias of possibleAliases) { - if (Object.prototype.hasOwnProperty.call(options.key, possibleAlias) && - Array.isArray(options.choices[possibleAlias])) { - choices = options.choices[possibleAlias]; - break; - } - } - if (choices) { - return choices.filter(choice => !filter || choice.startsWith(filter)); - } - } - previousArgHasChoices(args) { - const choices = this.getPreviousArgChoices(args); - return choices !== undefined && choices.length > 0; - } - argsContainKey(args, key, negable) { - const argsContains = (s) => args.indexOf((/^[^0-9]$/.test(s) ? '-' : '--') + s) !== -1; - if (argsContains(key)) - return true; - if (negable && argsContains(`no-${key}`)) - return true; - if (this.aliases) { - for (const alias of this.aliases[key]) { - if (argsContains(alias)) - return true; - } - } - return false; - } - completeOptionKey(key, completions, current, negable) { - var _a, _b, _c, _d; - let keyWithDesc = key; - if (this.zshShell) { - const descs = this.usage.getDescriptions(); - const aliasKey = (_b = (_a = this === null || this === void 0 ? void 0 : this.aliases) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.find(alias => { - const desc = descs[alias]; - return typeof desc === 'string' && desc.length > 0; - }); - const descFromAlias = aliasKey ? descs[aliasKey] : undefined; - const desc = (_d = (_c = descs[key]) !== null && _c !== void 0 ? _c : descFromAlias) !== null && _d !== void 0 ? _d : ''; - keyWithDesc = `${key.replace(/:/g, '\\:')}:${desc - .replace('__yargsString__:', '') - .replace(/(\r\n|\n|\r)/gm, ' ')}`; - } - const startsByTwoDashes = (s) => /^--/.test(s); - const isShortOption = (s) => /^[^0-9]$/.test(s); - const dashes = !startsByTwoDashes(current) && isShortOption(key) ? '-' : '--'; - completions.push(dashes + keyWithDesc); - if (negable) { - completions.push(dashes + 'no-' + keyWithDesc); - } - } - customCompletion(args, argv, current, done) { - assertNotStrictEqual(this.customCompletionFunction, null, this.shim); - if (isSyncCompletionFunction(this.customCompletionFunction)) { - const result = this.customCompletionFunction(current, argv); - if (isPromise(result)) { - return result - .then(list => { - this.shim.process.nextTick(() => { - done(null, list); - }); - }) - .catch(err => { - this.shim.process.nextTick(() => { - done(err, undefined); - }); - }); - } - return done(null, result); - } - else if (isFallbackCompletionFunction(this.customCompletionFunction)) { - return this.customCompletionFunction(current, argv, (onCompleted = done) => this.defaultCompletion(args, argv, current, onCompleted), completions => { - done(null, completions); - }); - } - else { - return this.customCompletionFunction(current, argv, completions => { - done(null, completions); - }); - } - } - getCompletion(args, done) { - const current = args.length ? args[args.length - 1] : ''; - const argv = this.yargs.parse(args, true); - const completionFunction = this.customCompletionFunction - ? (argv) => this.customCompletion(args, argv, current, done) - : (argv) => this.defaultCompletion(args, argv, current, done); - return isPromise(argv) - ? argv.then(completionFunction) - : completionFunction(argv); - } - generateCompletionScript($0, cmd) { - let script = this.zshShell - ? templates.completionZshTemplate - : templates.completionShTemplate; - const name = this.shim.path.basename($0); - if ($0.match(/\.js$/)) - $0 = `./${$0}`; - script = script.replace(/{{app_name}}/g, name); - script = script.replace(/{{completion_command}}/g, cmd); - return script.replace(/{{app_path}}/g, $0); - } - registerFunction(fn) { - this.customCompletionFunction = fn; - } - setParsed(parsed) { - this.aliases = parsed.aliases; - } -} -export function completion(yargs, usage, command, shim) { - return new Completion(yargs, usage, command, shim); -} -function isSyncCompletionFunction(completionFunction) { - return completionFunction.length < 3; -} -function isFallbackCompletionFunction(completionFunction) { - return completionFunction.length > 3; -} diff --git a/node_modules/yargs/build/lib/middleware.js b/node_modules/yargs/build/lib/middleware.js deleted file mode 100644 index 4e561a7..0000000 --- a/node_modules/yargs/build/lib/middleware.js +++ /dev/null @@ -1,88 +0,0 @@ -import { argsert } from './argsert.js'; -import { isPromise } from './utils/is-promise.js'; -export class GlobalMiddleware { - constructor(yargs) { - this.globalMiddleware = []; - this.frozens = []; - this.yargs = yargs; - } - addMiddleware(callback, applyBeforeValidation, global = true, mutates = false) { - argsert(' [boolean] [boolean] [boolean]', [callback, applyBeforeValidation, global], arguments.length); - if (Array.isArray(callback)) { - for (let i = 0; i < callback.length; i++) { - if (typeof callback[i] !== 'function') { - throw Error('middleware must be a function'); - } - const m = callback[i]; - m.applyBeforeValidation = applyBeforeValidation; - m.global = global; - } - Array.prototype.push.apply(this.globalMiddleware, callback); - } - else if (typeof callback === 'function') { - const m = callback; - m.applyBeforeValidation = applyBeforeValidation; - m.global = global; - m.mutates = mutates; - this.globalMiddleware.push(callback); - } - return this.yargs; - } - addCoerceMiddleware(callback, option) { - const aliases = this.yargs.getAliases(); - this.globalMiddleware = this.globalMiddleware.filter(m => { - const toCheck = [...(aliases[option] || []), option]; - if (!m.option) - return true; - else - return !toCheck.includes(m.option); - }); - callback.option = option; - return this.addMiddleware(callback, true, true, true); - } - getMiddleware() { - return this.globalMiddleware; - } - freeze() { - this.frozens.push([...this.globalMiddleware]); - } - unfreeze() { - const frozen = this.frozens.pop(); - if (frozen !== undefined) - this.globalMiddleware = frozen; - } - reset() { - this.globalMiddleware = this.globalMiddleware.filter(m => m.global); - } -} -export function commandMiddlewareFactory(commandMiddleware) { - if (!commandMiddleware) - return []; - return commandMiddleware.map(middleware => { - middleware.applyBeforeValidation = false; - return middleware; - }); -} -export function applyMiddleware(argv, yargs, middlewares, beforeValidation) { - return middlewares.reduce((acc, middleware) => { - if (middleware.applyBeforeValidation !== beforeValidation) { - return acc; - } - if (middleware.mutates) { - if (middleware.applied) - return acc; - middleware.applied = true; - } - if (isPromise(acc)) { - return acc - .then(initialObj => Promise.all([initialObj, middleware(initialObj, yargs)])) - .then(([initialObj, middlewareObj]) => Object.assign(initialObj, middlewareObj)); - } - else { - const result = middleware(acc, yargs); - return isPromise(result) - ? result.then(middlewareObj => Object.assign(acc, middlewareObj)) - : Object.assign(acc, result); - } - }, argv); -} diff --git a/node_modules/yargs/build/lib/parse-command.js b/node_modules/yargs/build/lib/parse-command.js deleted file mode 100644 index 4989f53..0000000 --- a/node_modules/yargs/build/lib/parse-command.js +++ /dev/null @@ -1,32 +0,0 @@ -export function parseCommand(cmd) { - const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' '); - const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/); - const bregex = /\.*[\][<>]/g; - const firstCommand = splitCommand.shift(); - if (!firstCommand) - throw new Error(`No command found in: ${cmd}`); - const parsedCommand = { - cmd: firstCommand.replace(bregex, ''), - demanded: [], - optional: [], - }; - splitCommand.forEach((cmd, i) => { - let variadic = false; - cmd = cmd.replace(/\s/g, ''); - if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1) - variadic = true; - if (/^\[/.test(cmd)) { - parsedCommand.optional.push({ - cmd: cmd.replace(bregex, '').split('|'), - variadic, - }); - } - else { - parsedCommand.demanded.push({ - cmd: cmd.replace(bregex, '').split('|'), - variadic, - }); - } - }); - return parsedCommand; -} diff --git a/node_modules/yargs/build/lib/typings/common-types.js b/node_modules/yargs/build/lib/typings/common-types.js deleted file mode 100644 index 73e1773..0000000 --- a/node_modules/yargs/build/lib/typings/common-types.js +++ /dev/null @@ -1,9 +0,0 @@ -export function assertNotStrictEqual(actual, expected, shim, message) { - shim.assert.notStrictEqual(actual, expected, message); -} -export function assertSingleKey(actual, shim) { - shim.assert.strictEqual(typeof actual, 'string'); -} -export function objectKeys(object) { - return Object.keys(object); -} diff --git a/node_modules/yargs/build/lib/typings/yargs-parser-types.js b/node_modules/yargs/build/lib/typings/yargs-parser-types.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/yargs/build/lib/typings/yargs-parser-types.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/yargs/build/lib/usage.js b/node_modules/yargs/build/lib/usage.js deleted file mode 100644 index 0127c13..0000000 --- a/node_modules/yargs/build/lib/usage.js +++ /dev/null @@ -1,584 +0,0 @@ -import { objFilter } from './utils/obj-filter.js'; -import { YError } from './yerror.js'; -import setBlocking from './utils/set-blocking.js'; -function isBoolean(fail) { - return typeof fail === 'boolean'; -} -export function usage(yargs, shim) { - const __ = shim.y18n.__; - const self = {}; - const fails = []; - self.failFn = function failFn(f) { - fails.push(f); - }; - let failMessage = null; - let globalFailMessage = null; - let showHelpOnFail = true; - self.showHelpOnFail = function showHelpOnFailFn(arg1 = true, arg2) { - const [enabled, message] = typeof arg1 === 'string' ? [true, arg1] : [arg1, arg2]; - if (yargs.getInternalMethods().isGlobalContext()) { - globalFailMessage = message; - } - failMessage = message; - showHelpOnFail = enabled; - return self; - }; - let failureOutput = false; - self.fail = function fail(msg, err) { - const logger = yargs.getInternalMethods().getLoggerInstance(); - if (fails.length) { - for (let i = fails.length - 1; i >= 0; --i) { - const fail = fails[i]; - if (isBoolean(fail)) { - if (err) - throw err; - else if (msg) - throw Error(msg); - } - else { - fail(msg, err, self); - } - } - } - else { - if (yargs.getExitProcess()) - setBlocking(true); - if (!failureOutput) { - failureOutput = true; - if (showHelpOnFail) { - yargs.showHelp('error'); - logger.error(); - } - if (msg || err) - logger.error(msg || err); - const globalOrCommandFailMessage = failMessage || globalFailMessage; - if (globalOrCommandFailMessage) { - if (msg || err) - logger.error(''); - logger.error(globalOrCommandFailMessage); - } - } - err = err || new YError(msg); - if (yargs.getExitProcess()) { - return yargs.exit(1); - } - else if (yargs.getInternalMethods().hasParseCallback()) { - return yargs.exit(1, err); - } - else { - throw err; - } - } - }; - let usages = []; - let usageDisabled = false; - self.usage = (msg, description) => { - if (msg === null) { - usageDisabled = true; - usages = []; - return self; - } - usageDisabled = false; - usages.push([msg, description || '']); - return self; - }; - self.getUsage = () => { - return usages; - }; - self.getUsageDisabled = () => { - return usageDisabled; - }; - self.getPositionalGroupName = () => { - return __('Positionals:'); - }; - let examples = []; - self.example = (cmd, description) => { - examples.push([cmd, description || '']); - }; - let commands = []; - self.command = function command(cmd, description, isDefault, aliases, deprecated = false) { - if (isDefault) { - commands = commands.map(cmdArray => { - cmdArray[2] = false; - return cmdArray; - }); - } - commands.push([cmd, description || '', isDefault, aliases, deprecated]); - }; - self.getCommands = () => commands; - let descriptions = {}; - self.describe = function describe(keyOrKeys, desc) { - if (Array.isArray(keyOrKeys)) { - keyOrKeys.forEach(k => { - self.describe(k, desc); - }); - } - else if (typeof keyOrKeys === 'object') { - Object.keys(keyOrKeys).forEach(k => { - self.describe(k, keyOrKeys[k]); - }); - } - else { - descriptions[keyOrKeys] = desc; - } - }; - self.getDescriptions = () => descriptions; - let epilogs = []; - self.epilog = msg => { - epilogs.push(msg); - }; - let wrapSet = false; - let wrap; - self.wrap = cols => { - wrapSet = true; - wrap = cols; - }; - self.getWrap = () => { - if (shim.getEnv('YARGS_DISABLE_WRAP')) { - return null; - } - if (!wrapSet) { - wrap = windowWidth(); - wrapSet = true; - } - return wrap; - }; - const deferY18nLookupPrefix = '__yargsString__:'; - self.deferY18nLookup = str => deferY18nLookupPrefix + str; - self.help = function help() { - if (cachedHelpMessage) - return cachedHelpMessage; - normalizeAliases(); - const base$0 = yargs.customScriptName - ? yargs.$0 - : shim.path.basename(yargs.$0); - const demandedOptions = yargs.getDemandedOptions(); - const demandedCommands = yargs.getDemandedCommands(); - const deprecatedOptions = yargs.getDeprecatedOptions(); - const groups = yargs.getGroups(); - const options = yargs.getOptions(); - let keys = []; - keys = keys.concat(Object.keys(descriptions)); - keys = keys.concat(Object.keys(demandedOptions)); - keys = keys.concat(Object.keys(demandedCommands)); - keys = keys.concat(Object.keys(options.default)); - keys = keys.filter(filterHiddenOptions); - keys = Object.keys(keys.reduce((acc, key) => { - if (key !== '_') - acc[key] = true; - return acc; - }, {})); - const theWrap = self.getWrap(); - const ui = shim.cliui({ - width: theWrap, - wrap: !!theWrap, - }); - if (!usageDisabled) { - if (usages.length) { - usages.forEach(usage => { - ui.div({ text: `${usage[0].replace(/\$0/g, base$0)}` }); - if (usage[1]) { - ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] }); - } - }); - ui.div(); - } - else if (commands.length) { - let u = null; - if (demandedCommands._) { - u = `${base$0} <${__('command')}>\n`; - } - else { - u = `${base$0} [${__('command')}]\n`; - } - ui.div(`${u}`); - } - } - if (commands.length > 1 || (commands.length === 1 && !commands[0][2])) { - ui.div(__('Commands:')); - const context = yargs.getInternalMethods().getContext(); - const parentCommands = context.commands.length - ? `${context.commands.join(' ')} ` - : ''; - if (yargs.getInternalMethods().getParserConfiguration()['sort-commands'] === - true) { - commands = commands.sort((a, b) => a[0].localeCompare(b[0])); - } - const prefix = base$0 ? `${base$0} ` : ''; - commands.forEach(command => { - const commandString = `${prefix}${parentCommands}${command[0].replace(/^\$0 ?/, '')}`; - ui.span({ - text: commandString, - padding: [0, 2, 0, 2], - width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4, - }, { text: command[1] }); - const hints = []; - if (command[2]) - hints.push(`[${__('default')}]`); - if (command[3] && command[3].length) { - hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`); - } - if (command[4]) { - if (typeof command[4] === 'string') { - hints.push(`[${__('deprecated: %s', command[4])}]`); - } - else { - hints.push(`[${__('deprecated')}]`); - } - } - if (hints.length) { - ui.div({ - text: hints.join(' '), - padding: [0, 0, 0, 2], - align: 'right', - }); - } - else { - ui.div(); - } - }); - ui.div(); - } - const aliasKeys = (Object.keys(options.alias) || []).concat(Object.keys(yargs.parsed.newAliases) || []); - keys = keys.filter(key => !yargs.parsed.newAliases[key] && - aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1)); - const defaultGroup = __('Options:'); - if (!groups[defaultGroup]) - groups[defaultGroup] = []; - addUngroupedKeys(keys, options.alias, groups, defaultGroup); - const isLongSwitch = (sw) => /^--/.test(getText(sw)); - const displayedGroups = Object.keys(groups) - .filter(groupName => groups[groupName].length > 0) - .map(groupName => { - const normalizedKeys = groups[groupName] - .filter(filterHiddenOptions) - .map(key => { - if (aliasKeys.includes(key)) - return key; - for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) { - if ((options.alias[aliasKey] || []).includes(key)) - return aliasKey; - } - return key; - }); - return { groupName, normalizedKeys }; - }) - .filter(({ normalizedKeys }) => normalizedKeys.length > 0) - .map(({ groupName, normalizedKeys }) => { - const switches = normalizedKeys.reduce((acc, key) => { - acc[key] = [key] - .concat(options.alias[key] || []) - .map(sw => { - if (groupName === self.getPositionalGroupName()) - return sw; - else { - return ((/^[0-9]$/.test(sw) - ? options.boolean.includes(key) - ? '-' - : '--' - : sw.length > 1 - ? '--' - : '-') + sw); - } - }) - .sort((sw1, sw2) => isLongSwitch(sw1) === isLongSwitch(sw2) - ? 0 - : isLongSwitch(sw1) - ? 1 - : -1) - .join(', '); - return acc; - }, {}); - return { groupName, normalizedKeys, switches }; - }); - const shortSwitchesUsed = displayedGroups - .filter(({ groupName }) => groupName !== self.getPositionalGroupName()) - .some(({ normalizedKeys, switches }) => !normalizedKeys.every(key => isLongSwitch(switches[key]))); - if (shortSwitchesUsed) { - displayedGroups - .filter(({ groupName }) => groupName !== self.getPositionalGroupName()) - .forEach(({ normalizedKeys, switches }) => { - normalizedKeys.forEach(key => { - if (isLongSwitch(switches[key])) { - switches[key] = addIndentation(switches[key], '-x, '.length); - } - }); - }); - } - displayedGroups.forEach(({ groupName, normalizedKeys, switches }) => { - ui.div(groupName); - normalizedKeys.forEach(key => { - const kswitch = switches[key]; - let desc = descriptions[key] || ''; - let type = null; - if (desc.includes(deferY18nLookupPrefix)) - desc = __(desc.substring(deferY18nLookupPrefix.length)); - if (options.boolean.includes(key)) - type = `[${__('boolean')}]`; - if (options.count.includes(key)) - type = `[${__('count')}]`; - if (options.string.includes(key)) - type = `[${__('string')}]`; - if (options.normalize.includes(key)) - type = `[${__('string')}]`; - if (options.array.includes(key)) - type = `[${__('array')}]`; - if (options.number.includes(key)) - type = `[${__('number')}]`; - const deprecatedExtra = (deprecated) => typeof deprecated === 'string' - ? `[${__('deprecated: %s', deprecated)}]` - : `[${__('deprecated')}]`; - const extra = [ - key in deprecatedOptions - ? deprecatedExtra(deprecatedOptions[key]) - : null, - type, - key in demandedOptions ? `[${__('required')}]` : null, - options.choices && options.choices[key] - ? `[${__('choices:')} ${self.stringifiedValues(options.choices[key])}]` - : null, - defaultString(options.default[key], options.defaultDescription[key]), - ] - .filter(Boolean) - .join(' '); - ui.span({ - text: getText(kswitch), - padding: [0, 2, 0, 2 + getIndentation(kswitch)], - width: maxWidth(switches, theWrap) + 4, - }, desc); - const shouldHideOptionExtras = yargs.getInternalMethods().getUsageConfiguration()['hide-types'] === - true; - if (extra && !shouldHideOptionExtras) - ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' }); - else - ui.div(); - }); - ui.div(); - }); - if (examples.length) { - ui.div(__('Examples:')); - examples.forEach(example => { - example[0] = example[0].replace(/\$0/g, base$0); - }); - examples.forEach(example => { - if (example[1] === '') { - ui.div({ - text: example[0], - padding: [0, 2, 0, 2], - }); - } - else { - ui.div({ - text: example[0], - padding: [0, 2, 0, 2], - width: maxWidth(examples, theWrap) + 4, - }, { - text: example[1], - }); - } - }); - ui.div(); - } - if (epilogs.length > 0) { - const e = epilogs - .map(epilog => epilog.replace(/\$0/g, base$0)) - .join('\n'); - ui.div(`${e}\n`); - } - return ui.toString().replace(/\s*$/, ''); - }; - function maxWidth(table, theWrap, modifier) { - let width = 0; - if (!Array.isArray(table)) { - table = Object.values(table).map(v => [v]); - } - table.forEach(v => { - width = Math.max(shim.stringWidth(modifier ? `${modifier} ${getText(v[0])}` : getText(v[0])) + getIndentation(v[0]), width); - }); - if (theWrap) - width = Math.min(width, parseInt((theWrap * 0.5).toString(), 10)); - return width; - } - function normalizeAliases() { - const demandedOptions = yargs.getDemandedOptions(); - const options = yargs.getOptions(); - (Object.keys(options.alias) || []).forEach(key => { - options.alias[key].forEach(alias => { - if (descriptions[alias]) - self.describe(key, descriptions[alias]); - if (alias in demandedOptions) - yargs.demandOption(key, demandedOptions[alias]); - if (options.boolean.includes(alias)) - yargs.boolean(key); - if (options.count.includes(alias)) - yargs.count(key); - if (options.string.includes(alias)) - yargs.string(key); - if (options.normalize.includes(alias)) - yargs.normalize(key); - if (options.array.includes(alias)) - yargs.array(key); - if (options.number.includes(alias)) - yargs.number(key); - }); - }); - } - let cachedHelpMessage; - self.cacheHelpMessage = function () { - cachedHelpMessage = this.help(); - }; - self.clearCachedHelpMessage = function () { - cachedHelpMessage = undefined; - }; - self.hasCachedHelpMessage = function () { - return !!cachedHelpMessage; - }; - function addUngroupedKeys(keys, aliases, groups, defaultGroup) { - let groupedKeys = []; - let toCheck = null; - Object.keys(groups).forEach(group => { - groupedKeys = groupedKeys.concat(groups[group]); - }); - keys.forEach(key => { - toCheck = [key].concat(aliases[key]); - if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) { - groups[defaultGroup].push(key); - } - }); - return groupedKeys; - } - function filterHiddenOptions(key) { - return (yargs.getOptions().hiddenOptions.indexOf(key) < 0 || - yargs.parsed.argv[yargs.getOptions().showHiddenOpt]); - } - self.showHelp = (level) => { - const logger = yargs.getInternalMethods().getLoggerInstance(); - if (!level) - level = 'error'; - const emit = typeof level === 'function' ? level : logger[level]; - emit(self.help()); - }; - self.functionDescription = fn => { - const description = fn.name - ? shim.Parser.decamelize(fn.name, '-') - : __('generated-value'); - return ['(', description, ')'].join(''); - }; - self.stringifiedValues = function stringifiedValues(values, separator) { - let string = ''; - const sep = separator || ', '; - const array = [].concat(values); - if (!values || !array.length) - return string; - array.forEach(value => { - if (string.length) - string += sep; - string += JSON.stringify(value); - }); - return string; - }; - function defaultString(value, defaultDescription) { - let string = `[${__('default:')} `; - if (value === undefined && !defaultDescription) - return null; - if (defaultDescription) { - string += defaultDescription; - } - else { - switch (typeof value) { - case 'string': - string += `"${value}"`; - break; - case 'object': - string += JSON.stringify(value); - break; - default: - string += value; - } - } - return `${string}]`; - } - function windowWidth() { - const maxWidth = 80; - if (shim.process.stdColumns) { - return Math.min(maxWidth, shim.process.stdColumns); - } - else { - return maxWidth; - } - } - let version = null; - self.version = ver => { - version = ver; - }; - self.showVersion = level => { - const logger = yargs.getInternalMethods().getLoggerInstance(); - if (!level) - level = 'error'; - const emit = typeof level === 'function' ? level : logger[level]; - emit(version); - }; - self.reset = function reset(localLookup) { - failMessage = null; - failureOutput = false; - usages = []; - usageDisabled = false; - epilogs = []; - examples = []; - commands = []; - descriptions = objFilter(descriptions, k => !localLookup[k]); - return self; - }; - const frozens = []; - self.freeze = function freeze() { - frozens.push({ - failMessage, - failureOutput, - usages, - usageDisabled, - epilogs, - examples, - commands, - descriptions, - }); - }; - self.unfreeze = function unfreeze(defaultCommand = false) { - const frozen = frozens.pop(); - if (!frozen) - return; - if (defaultCommand) { - descriptions = { ...frozen.descriptions, ...descriptions }; - commands = [...frozen.commands, ...commands]; - usages = [...frozen.usages, ...usages]; - examples = [...frozen.examples, ...examples]; - epilogs = [...frozen.epilogs, ...epilogs]; - } - else { - ({ - failMessage, - failureOutput, - usages, - usageDisabled, - epilogs, - examples, - commands, - descriptions, - } = frozen); - } - }; - return self; -} -function isIndentedText(text) { - return typeof text === 'object'; -} -function addIndentation(text, indent) { - return isIndentedText(text) - ? { text: text.text, indentation: text.indentation + indent } - : { text, indentation: indent }; -} -function getIndentation(text) { - return isIndentedText(text) ? text.indentation : 0; -} -function getText(text) { - return isIndentedText(text) ? text.text : text; -} diff --git a/node_modules/yargs/build/lib/utils/apply-extends.js b/node_modules/yargs/build/lib/utils/apply-extends.js deleted file mode 100644 index 0e593b4..0000000 --- a/node_modules/yargs/build/lib/utils/apply-extends.js +++ /dev/null @@ -1,59 +0,0 @@ -import { YError } from '../yerror.js'; -let previouslyVisitedConfigs = []; -let shim; -export function applyExtends(config, cwd, mergeExtends, _shim) { - shim = _shim; - let defaultConfig = {}; - if (Object.prototype.hasOwnProperty.call(config, 'extends')) { - if (typeof config.extends !== 'string') - return defaultConfig; - const isPath = /\.json|\..*rc$/.test(config.extends); - let pathToDefault = null; - if (!isPath) { - try { - pathToDefault = require.resolve(config.extends); - } - catch (_err) { - return config; - } - } - else { - pathToDefault = getPathToDefaultConfig(cwd, config.extends); - } - checkForCircularExtends(pathToDefault); - previouslyVisitedConfigs.push(pathToDefault); - defaultConfig = isPath - ? JSON.parse(shim.readFileSync(pathToDefault, 'utf8')) - : require(config.extends); - delete config.extends; - defaultConfig = applyExtends(defaultConfig, shim.path.dirname(pathToDefault), mergeExtends, shim); - } - previouslyVisitedConfigs = []; - return mergeExtends - ? mergeDeep(defaultConfig, config) - : Object.assign({}, defaultConfig, config); -} -function checkForCircularExtends(cfgPath) { - if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) { - throw new YError(`Circular extended configurations: '${cfgPath}'.`); - } -} -function getPathToDefaultConfig(cwd, pathToExtend) { - return shim.path.resolve(cwd, pathToExtend); -} -function mergeDeep(config1, config2) { - const target = {}; - function isObject(obj) { - return obj && typeof obj === 'object' && !Array.isArray(obj); - } - Object.assign(target, config1); - for (const key of Object.keys(config2)) { - if (isObject(config2[key]) && isObject(target[key])) { - target[key] = mergeDeep(config1[key], config2[key]); - } - else { - target[key] = config2[key]; - } - } - return target; -} diff --git a/node_modules/yargs/build/lib/utils/is-promise.js b/node_modules/yargs/build/lib/utils/is-promise.js deleted file mode 100644 index d250c08..0000000 --- a/node_modules/yargs/build/lib/utils/is-promise.js +++ /dev/null @@ -1,5 +0,0 @@ -export function isPromise(maybePromise) { - return (!!maybePromise && - !!maybePromise.then && - typeof maybePromise.then === 'function'); -} diff --git a/node_modules/yargs/build/lib/utils/levenshtein.js b/node_modules/yargs/build/lib/utils/levenshtein.js deleted file mode 100644 index 60575ef..0000000 --- a/node_modules/yargs/build/lib/utils/levenshtein.js +++ /dev/null @@ -1,34 +0,0 @@ -export function levenshtein(a, b) { - if (a.length === 0) - return b.length; - if (b.length === 0) - return a.length; - const matrix = []; - let i; - for (i = 0; i <= b.length; i++) { - matrix[i] = [i]; - } - let j; - for (j = 0; j <= a.length; j++) { - matrix[0][j] = j; - } - for (i = 1; i <= b.length; i++) { - for (j = 1; j <= a.length; j++) { - if (b.charAt(i - 1) === a.charAt(j - 1)) { - matrix[i][j] = matrix[i - 1][j - 1]; - } - else { - if (i > 1 && - j > 1 && - b.charAt(i - 2) === a.charAt(j - 1) && - b.charAt(i - 1) === a.charAt(j - 2)) { - matrix[i][j] = matrix[i - 2][j - 2] + 1; - } - else { - matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, Math.min(matrix[i][j - 1] + 1, matrix[i - 1][j] + 1)); - } - } - } - } - return matrix[b.length][a.length]; -} diff --git a/node_modules/yargs/build/lib/utils/maybe-async-result.js b/node_modules/yargs/build/lib/utils/maybe-async-result.js deleted file mode 100644 index 8c6a40c..0000000 --- a/node_modules/yargs/build/lib/utils/maybe-async-result.js +++ /dev/null @@ -1,17 +0,0 @@ -import { isPromise } from './is-promise.js'; -export function maybeAsyncResult(getResult, resultHandler, errorHandler = (err) => { - throw err; -}) { - try { - const result = isFunction(getResult) ? getResult() : getResult; - return isPromise(result) - ? result.then((result) => resultHandler(result)) - : resultHandler(result); - } - catch (err) { - return errorHandler(err); - } -} -function isFunction(arg) { - return typeof arg === 'function'; -} diff --git a/node_modules/yargs/build/lib/utils/obj-filter.js b/node_modules/yargs/build/lib/utils/obj-filter.js deleted file mode 100644 index cd68ad2..0000000 --- a/node_modules/yargs/build/lib/utils/obj-filter.js +++ /dev/null @@ -1,10 +0,0 @@ -import { objectKeys } from '../typings/common-types.js'; -export function objFilter(original = {}, filter = () => true) { - const obj = {}; - objectKeys(original).forEach(key => { - if (filter(key, original[key])) { - obj[key] = original[key]; - } - }); - return obj; -} diff --git a/node_modules/yargs/build/lib/utils/process-argv.js b/node_modules/yargs/build/lib/utils/process-argv.js deleted file mode 100644 index 74dc9e4..0000000 --- a/node_modules/yargs/build/lib/utils/process-argv.js +++ /dev/null @@ -1,17 +0,0 @@ -function getProcessArgvBinIndex() { - if (isBundledElectronApp()) - return 0; - return 1; -} -function isBundledElectronApp() { - return isElectronApp() && !process.defaultApp; -} -function isElectronApp() { - return !!process.versions.electron; -} -export function hideBin(argv) { - return argv.slice(getProcessArgvBinIndex() + 1); -} -export function getProcessArgvBin() { - return process.argv[getProcessArgvBinIndex()]; -} diff --git a/node_modules/yargs/build/lib/utils/set-blocking.js b/node_modules/yargs/build/lib/utils/set-blocking.js deleted file mode 100644 index 88fb806..0000000 --- a/node_modules/yargs/build/lib/utils/set-blocking.js +++ /dev/null @@ -1,12 +0,0 @@ -export default function setBlocking(blocking) { - if (typeof process === 'undefined') - return; - [process.stdout, process.stderr].forEach(_stream => { - const stream = _stream; - if (stream._handle && - stream.isTTY && - typeof stream._handle.setBlocking === 'function') { - stream._handle.setBlocking(blocking); - } - }); -} diff --git a/node_modules/yargs/build/lib/utils/which-module.js b/node_modules/yargs/build/lib/utils/which-module.js deleted file mode 100644 index 5974e22..0000000 --- a/node_modules/yargs/build/lib/utils/which-module.js +++ /dev/null @@ -1,10 +0,0 @@ -export default function whichModule(exported) { - if (typeof require === 'undefined') - return null; - for (let i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) { - mod = require.cache[files[i]]; - if (mod.exports === exported) - return mod; - } - return null; -} diff --git a/node_modules/yargs/build/lib/validation.js b/node_modules/yargs/build/lib/validation.js deleted file mode 100644 index bd2e1b8..0000000 --- a/node_modules/yargs/build/lib/validation.js +++ /dev/null @@ -1,305 +0,0 @@ -import { argsert } from './argsert.js'; -import { assertNotStrictEqual, } from './typings/common-types.js'; -import { levenshtein as distance } from './utils/levenshtein.js'; -import { objFilter } from './utils/obj-filter.js'; -const specialKeys = ['$0', '--', '_']; -export function validation(yargs, usage, shim) { - const __ = shim.y18n.__; - const __n = shim.y18n.__n; - const self = {}; - self.nonOptionCount = function nonOptionCount(argv) { - const demandedCommands = yargs.getDemandedCommands(); - const positionalCount = argv._.length + (argv['--'] ? argv['--'].length : 0); - const _s = positionalCount - yargs.getInternalMethods().getContext().commands.length; - if (demandedCommands._ && - (_s < demandedCommands._.min || _s > demandedCommands._.max)) { - if (_s < demandedCommands._.min) { - if (demandedCommands._.minMsg !== undefined) { - usage.fail(demandedCommands._.minMsg - ? demandedCommands._.minMsg - .replace(/\$0/g, _s.toString()) - .replace(/\$1/, demandedCommands._.min.toString()) - : null); - } - else { - usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', _s, _s.toString(), demandedCommands._.min.toString())); - } - } - else if (_s > demandedCommands._.max) { - if (demandedCommands._.maxMsg !== undefined) { - usage.fail(demandedCommands._.maxMsg - ? demandedCommands._.maxMsg - .replace(/\$0/g, _s.toString()) - .replace(/\$1/, demandedCommands._.max.toString()) - : null); - } - else { - usage.fail(__n('Too many non-option arguments: got %s, maximum of %s', 'Too many non-option arguments: got %s, maximum of %s', _s, _s.toString(), demandedCommands._.max.toString())); - } - } - } - }; - self.positionalCount = function positionalCount(required, observed) { - if (observed < required) { - usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', observed, observed + '', required + '')); - } - }; - self.requiredArguments = function requiredArguments(argv, demandedOptions) { - let missing = null; - for (const key of Object.keys(demandedOptions)) { - if (!Object.prototype.hasOwnProperty.call(argv, key) || - typeof argv[key] === 'undefined') { - missing = missing || {}; - missing[key] = demandedOptions[key]; - } - } - if (missing) { - const customMsgs = []; - for (const key of Object.keys(missing)) { - const msg = missing[key]; - if (msg && customMsgs.indexOf(msg) < 0) { - customMsgs.push(msg); - } - } - const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : ''; - usage.fail(__n('Missing required argument: %s', 'Missing required arguments: %s', Object.keys(missing).length, Object.keys(missing).join(', ') + customMsg)); - } - }; - self.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand, checkPositionals = true) { - var _a; - const commandKeys = yargs - .getInternalMethods() - .getCommandInstance() - .getCommands(); - const unknown = []; - const currentContext = yargs.getInternalMethods().getContext(); - Object.keys(argv).forEach(key => { - if (!specialKeys.includes(key) && - !Object.prototype.hasOwnProperty.call(positionalMap, key) && - !Object.prototype.hasOwnProperty.call(yargs.getInternalMethods().getParseContext(), key) && - !self.isValidAndSomeAliasIsNotNew(key, aliases)) { - unknown.push(key); - } - }); - if (checkPositionals && - (currentContext.commands.length > 0 || - commandKeys.length > 0 || - isDefaultCommand)) { - argv._.slice(currentContext.commands.length).forEach(key => { - if (!commandKeys.includes('' + key)) { - unknown.push('' + key); - } - }); - } - if (checkPositionals) { - const demandedCommands = yargs.getDemandedCommands(); - const maxNonOptDemanded = ((_a = demandedCommands._) === null || _a === void 0 ? void 0 : _a.max) || 0; - const expected = currentContext.commands.length + maxNonOptDemanded; - if (expected < argv._.length) { - argv._.slice(expected).forEach(key => { - key = String(key); - if (!currentContext.commands.includes(key) && - !unknown.includes(key)) { - unknown.push(key); - } - }); - } - } - if (unknown.length) { - usage.fail(__n('Unknown argument: %s', 'Unknown arguments: %s', unknown.length, unknown.map(s => (s.trim() ? s : `"${s}"`)).join(', '))); - } - }; - self.unknownCommands = function unknownCommands(argv) { - const commandKeys = yargs - .getInternalMethods() - .getCommandInstance() - .getCommands(); - const unknown = []; - const currentContext = yargs.getInternalMethods().getContext(); - if (currentContext.commands.length > 0 || commandKeys.length > 0) { - argv._.slice(currentContext.commands.length).forEach(key => { - if (!commandKeys.includes('' + key)) { - unknown.push('' + key); - } - }); - } - if (unknown.length > 0) { - usage.fail(__n('Unknown command: %s', 'Unknown commands: %s', unknown.length, unknown.join(', '))); - return true; - } - else { - return false; - } - }; - self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew(key, aliases) { - if (!Object.prototype.hasOwnProperty.call(aliases, key)) { - return false; - } - const newAliases = yargs.parsed.newAliases; - return [key, ...aliases[key]].some(a => !Object.prototype.hasOwnProperty.call(newAliases, a) || !newAliases[key]); - }; - self.limitedChoices = function limitedChoices(argv) { - const options = yargs.getOptions(); - const invalid = {}; - if (!Object.keys(options.choices).length) - return; - Object.keys(argv).forEach(key => { - if (specialKeys.indexOf(key) === -1 && - Object.prototype.hasOwnProperty.call(options.choices, key)) { - [].concat(argv[key]).forEach(value => { - if (options.choices[key].indexOf(value) === -1 && - value !== undefined) { - invalid[key] = (invalid[key] || []).concat(value); - } - }); - } - }); - const invalidKeys = Object.keys(invalid); - if (!invalidKeys.length) - return; - let msg = __('Invalid values:'); - invalidKeys.forEach(key => { - msg += `\n ${__('Argument: %s, Given: %s, Choices: %s', key, usage.stringifiedValues(invalid[key]), usage.stringifiedValues(options.choices[key]))}`; - }); - usage.fail(msg); - }; - let implied = {}; - self.implies = function implies(key, value) { - argsert(' [array|number|string]', [key, value], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach(k => { - self.implies(k, key[k]); - }); - } - else { - yargs.global(key); - if (!implied[key]) { - implied[key] = []; - } - if (Array.isArray(value)) { - value.forEach(i => self.implies(key, i)); - } - else { - assertNotStrictEqual(value, undefined, shim); - implied[key].push(value); - } - } - }; - self.getImplied = function getImplied() { - return implied; - }; - function keyExists(argv, val) { - const num = Number(val); - val = isNaN(num) ? val : num; - if (typeof val === 'number') { - val = argv._.length >= val; - } - else if (val.match(/^--no-.+/)) { - val = val.match(/^--no-(.+)/)[1]; - val = !Object.prototype.hasOwnProperty.call(argv, val); - } - else { - val = Object.prototype.hasOwnProperty.call(argv, val); - } - return val; - } - self.implications = function implications(argv) { - const implyFail = []; - Object.keys(implied).forEach(key => { - const origKey = key; - (implied[key] || []).forEach(value => { - let key = origKey; - const origValue = value; - key = keyExists(argv, key); - value = keyExists(argv, value); - if (key && !value) { - implyFail.push(` ${origKey} -> ${origValue}`); - } - }); - }); - if (implyFail.length) { - let msg = `${__('Implications failed:')}\n`; - implyFail.forEach(value => { - msg += value; - }); - usage.fail(msg); - } - }; - let conflicting = {}; - self.conflicts = function conflicts(key, value) { - argsert(' [array|string]', [key, value], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach(k => { - self.conflicts(k, key[k]); - }); - } - else { - yargs.global(key); - if (!conflicting[key]) { - conflicting[key] = []; - } - if (Array.isArray(value)) { - value.forEach(i => self.conflicts(key, i)); - } - else { - conflicting[key].push(value); - } - } - }; - self.getConflicting = () => conflicting; - self.conflicting = function conflictingFn(argv) { - Object.keys(argv).forEach(key => { - if (conflicting[key]) { - conflicting[key].forEach(value => { - if (value && argv[key] !== undefined && argv[value] !== undefined) { - usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)); - } - }); - } - }); - if (yargs.getInternalMethods().getParserConfiguration()['strip-dashed']) { - Object.keys(conflicting).forEach(key => { - conflicting[key].forEach(value => { - if (value && - argv[shim.Parser.camelCase(key)] !== undefined && - argv[shim.Parser.camelCase(value)] !== undefined) { - usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)); - } - }); - }); - } - }; - self.recommendCommands = function recommendCommands(cmd, potentialCommands) { - const threshold = 3; - potentialCommands = potentialCommands.sort((a, b) => b.length - a.length); - let recommended = null; - let bestDistance = Infinity; - for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) { - const d = distance(cmd, candidate); - if (d <= threshold && d < bestDistance) { - bestDistance = d; - recommended = candidate; - } - } - if (recommended) - usage.fail(__('Did you mean %s?', recommended)); - }; - self.reset = function reset(localLookup) { - implied = objFilter(implied, k => !localLookup[k]); - conflicting = objFilter(conflicting, k => !localLookup[k]); - return self; - }; - const frozens = []; - self.freeze = function freeze() { - frozens.push({ - implied, - conflicting, - }); - }; - self.unfreeze = function unfreeze() { - const frozen = frozens.pop(); - assertNotStrictEqual(frozen, undefined, shim); - ({ implied, conflicting } = frozen); - }; - return self; -} diff --git a/node_modules/yargs/build/lib/yargs-factory.js b/node_modules/yargs/build/lib/yargs-factory.js deleted file mode 100644 index c4b1d50..0000000 --- a/node_modules/yargs/build/lib/yargs-factory.js +++ /dev/null @@ -1,1512 +0,0 @@ -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var _YargsInstance_command, _YargsInstance_cwd, _YargsInstance_context, _YargsInstance_completion, _YargsInstance_completionCommand, _YargsInstance_defaultShowHiddenOpt, _YargsInstance_exitError, _YargsInstance_detectLocale, _YargsInstance_emittedWarnings, _YargsInstance_exitProcess, _YargsInstance_frozens, _YargsInstance_globalMiddleware, _YargsInstance_groups, _YargsInstance_hasOutput, _YargsInstance_helpOpt, _YargsInstance_isGlobalContext, _YargsInstance_logger, _YargsInstance_output, _YargsInstance_options, _YargsInstance_parentRequire, _YargsInstance_parserConfig, _YargsInstance_parseFn, _YargsInstance_parseContext, _YargsInstance_pkgs, _YargsInstance_preservedGroups, _YargsInstance_processArgs, _YargsInstance_recommendCommands, _YargsInstance_shim, _YargsInstance_strict, _YargsInstance_strictCommands, _YargsInstance_strictOptions, _YargsInstance_usage, _YargsInstance_usageConfig, _YargsInstance_versionOpt, _YargsInstance_validation; -import { command as Command, } from './command.js'; -import { assertNotStrictEqual, assertSingleKey, objectKeys, } from './typings/common-types.js'; -import { YError } from './yerror.js'; -import { usage as Usage } from './usage.js'; -import { argsert } from './argsert.js'; -import { completion as Completion, } from './completion.js'; -import { validation as Validation, } from './validation.js'; -import { objFilter } from './utils/obj-filter.js'; -import { applyExtends } from './utils/apply-extends.js'; -import { applyMiddleware, GlobalMiddleware, } from './middleware.js'; -import { isPromise } from './utils/is-promise.js'; -import { maybeAsyncResult } from './utils/maybe-async-result.js'; -import setBlocking from './utils/set-blocking.js'; -export function YargsFactory(_shim) { - return (processArgs = [], cwd = _shim.process.cwd(), parentRequire) => { - const yargs = new YargsInstance(processArgs, cwd, parentRequire, _shim); - Object.defineProperty(yargs, 'argv', { - get: () => { - return yargs.parse(); - }, - enumerable: true, - }); - yargs.help(); - yargs.version(); - return yargs; - }; -} -const kCopyDoubleDash = Symbol('copyDoubleDash'); -const kCreateLogger = Symbol('copyDoubleDash'); -const kDeleteFromParserHintObject = Symbol('deleteFromParserHintObject'); -const kEmitWarning = Symbol('emitWarning'); -const kFreeze = Symbol('freeze'); -const kGetDollarZero = Symbol('getDollarZero'); -const kGetParserConfiguration = Symbol('getParserConfiguration'); -const kGetUsageConfiguration = Symbol('getUsageConfiguration'); -const kGuessLocale = Symbol('guessLocale'); -const kGuessVersion = Symbol('guessVersion'); -const kParsePositionalNumbers = Symbol('parsePositionalNumbers'); -const kPkgUp = Symbol('pkgUp'); -const kPopulateParserHintArray = Symbol('populateParserHintArray'); -const kPopulateParserHintSingleValueDictionary = Symbol('populateParserHintSingleValueDictionary'); -const kPopulateParserHintArrayDictionary = Symbol('populateParserHintArrayDictionary'); -const kPopulateParserHintDictionary = Symbol('populateParserHintDictionary'); -const kSanitizeKey = Symbol('sanitizeKey'); -const kSetKey = Symbol('setKey'); -const kUnfreeze = Symbol('unfreeze'); -const kValidateAsync = Symbol('validateAsync'); -const kGetCommandInstance = Symbol('getCommandInstance'); -const kGetContext = Symbol('getContext'); -const kGetHasOutput = Symbol('getHasOutput'); -const kGetLoggerInstance = Symbol('getLoggerInstance'); -const kGetParseContext = Symbol('getParseContext'); -const kGetUsageInstance = Symbol('getUsageInstance'); -const kGetValidationInstance = Symbol('getValidationInstance'); -const kHasParseCallback = Symbol('hasParseCallback'); -const kIsGlobalContext = Symbol('isGlobalContext'); -const kPostProcess = Symbol('postProcess'); -const kRebase = Symbol('rebase'); -const kReset = Symbol('reset'); -const kRunYargsParserAndExecuteCommands = Symbol('runYargsParserAndExecuteCommands'); -const kRunValidation = Symbol('runValidation'); -const kSetHasOutput = Symbol('setHasOutput'); -const kTrackManuallySetKeys = Symbol('kTrackManuallySetKeys'); -export class YargsInstance { - constructor(processArgs = [], cwd, parentRequire, shim) { - this.customScriptName = false; - this.parsed = false; - _YargsInstance_command.set(this, void 0); - _YargsInstance_cwd.set(this, void 0); - _YargsInstance_context.set(this, { commands: [], fullCommands: [] }); - _YargsInstance_completion.set(this, null); - _YargsInstance_completionCommand.set(this, null); - _YargsInstance_defaultShowHiddenOpt.set(this, 'show-hidden'); - _YargsInstance_exitError.set(this, null); - _YargsInstance_detectLocale.set(this, true); - _YargsInstance_emittedWarnings.set(this, {}); - _YargsInstance_exitProcess.set(this, true); - _YargsInstance_frozens.set(this, []); - _YargsInstance_globalMiddleware.set(this, void 0); - _YargsInstance_groups.set(this, {}); - _YargsInstance_hasOutput.set(this, false); - _YargsInstance_helpOpt.set(this, null); - _YargsInstance_isGlobalContext.set(this, true); - _YargsInstance_logger.set(this, void 0); - _YargsInstance_output.set(this, ''); - _YargsInstance_options.set(this, void 0); - _YargsInstance_parentRequire.set(this, void 0); - _YargsInstance_parserConfig.set(this, {}); - _YargsInstance_parseFn.set(this, null); - _YargsInstance_parseContext.set(this, null); - _YargsInstance_pkgs.set(this, {}); - _YargsInstance_preservedGroups.set(this, {}); - _YargsInstance_processArgs.set(this, void 0); - _YargsInstance_recommendCommands.set(this, false); - _YargsInstance_shim.set(this, void 0); - _YargsInstance_strict.set(this, false); - _YargsInstance_strictCommands.set(this, false); - _YargsInstance_strictOptions.set(this, false); - _YargsInstance_usage.set(this, void 0); - _YargsInstance_usageConfig.set(this, {}); - _YargsInstance_versionOpt.set(this, null); - _YargsInstance_validation.set(this, void 0); - __classPrivateFieldSet(this, _YargsInstance_shim, shim, "f"); - __classPrivateFieldSet(this, _YargsInstance_processArgs, processArgs, "f"); - __classPrivateFieldSet(this, _YargsInstance_cwd, cwd, "f"); - __classPrivateFieldSet(this, _YargsInstance_parentRequire, parentRequire, "f"); - __classPrivateFieldSet(this, _YargsInstance_globalMiddleware, new GlobalMiddleware(this), "f"); - this.$0 = this[kGetDollarZero](); - this[kReset](); - __classPrivateFieldSet(this, _YargsInstance_command, __classPrivateFieldGet(this, _YargsInstance_command, "f"), "f"); - __classPrivateFieldSet(this, _YargsInstance_usage, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), "f"); - __classPrivateFieldSet(this, _YargsInstance_validation, __classPrivateFieldGet(this, _YargsInstance_validation, "f"), "f"); - __classPrivateFieldSet(this, _YargsInstance_options, __classPrivateFieldGet(this, _YargsInstance_options, "f"), "f"); - __classPrivateFieldGet(this, _YargsInstance_options, "f").showHiddenOpt = __classPrivateFieldGet(this, _YargsInstance_defaultShowHiddenOpt, "f"); - __classPrivateFieldSet(this, _YargsInstance_logger, this[kCreateLogger](), "f"); - } - addHelpOpt(opt, msg) { - const defaultHelpOpt = 'help'; - argsert('[string|boolean] [string]', [opt, msg], arguments.length); - if (__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")) { - this[kDeleteFromParserHintObject](__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")); - __classPrivateFieldSet(this, _YargsInstance_helpOpt, null, "f"); - } - if (opt === false && msg === undefined) - return this; - __classPrivateFieldSet(this, _YargsInstance_helpOpt, typeof opt === 'string' ? opt : defaultHelpOpt, "f"); - this.boolean(__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")); - this.describe(__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f"), msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show help')); - return this; - } - help(opt, msg) { - return this.addHelpOpt(opt, msg); - } - addShowHiddenOpt(opt, msg) { - argsert('[string|boolean] [string]', [opt, msg], arguments.length); - if (opt === false && msg === undefined) - return this; - const showHiddenOpt = typeof opt === 'string' ? opt : __classPrivateFieldGet(this, _YargsInstance_defaultShowHiddenOpt, "f"); - this.boolean(showHiddenOpt); - this.describe(showHiddenOpt, msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show hidden options')); - __classPrivateFieldGet(this, _YargsInstance_options, "f").showHiddenOpt = showHiddenOpt; - return this; - } - showHidden(opt, msg) { - return this.addShowHiddenOpt(opt, msg); - } - alias(key, value) { - argsert(' [string|array]', [key, value], arguments.length); - this[kPopulateParserHintArrayDictionary](this.alias.bind(this), 'alias', key, value); - return this; - } - array(keys) { - argsert('', [keys], arguments.length); - this[kPopulateParserHintArray]('array', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - boolean(keys) { - argsert('', [keys], arguments.length); - this[kPopulateParserHintArray]('boolean', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - check(f, global) { - argsert(' [boolean]', [f, global], arguments.length); - this.middleware((argv, _yargs) => { - return maybeAsyncResult(() => { - return f(argv, _yargs.getOptions()); - }, (result) => { - if (!result) { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(__classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__('Argument check failed: %s', f.toString())); - } - else if (typeof result === 'string' || result instanceof Error) { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(result.toString(), result); - } - return argv; - }, (err) => { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(err.message ? err.message : err.toString(), err); - return argv; - }); - }, false, global); - return this; - } - choices(key, value) { - argsert(' [string|array]', [key, value], arguments.length); - this[kPopulateParserHintArrayDictionary](this.choices.bind(this), 'choices', key, value); - return this; - } - coerce(keys, value) { - argsert(' [function]', [keys, value], arguments.length); - if (Array.isArray(keys)) { - if (!value) { - throw new YError('coerce callback must be provided'); - } - for (const key of keys) { - this.coerce(key, value); - } - return this; - } - else if (typeof keys === 'object') { - for (const key of Object.keys(keys)) { - this.coerce(key, keys[key]); - } - return this; - } - if (!value) { - throw new YError('coerce callback must be provided'); - } - __classPrivateFieldGet(this, _YargsInstance_options, "f").key[keys] = true; - __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").addCoerceMiddleware((argv, yargs) => { - let aliases; - const shouldCoerce = Object.prototype.hasOwnProperty.call(argv, keys); - if (!shouldCoerce) { - return argv; - } - return maybeAsyncResult(() => { - aliases = yargs.getAliases(); - return value(argv[keys]); - }, (result) => { - argv[keys] = result; - const stripAliased = yargs - .getInternalMethods() - .getParserConfiguration()['strip-aliased']; - if (aliases[keys] && stripAliased !== true) { - for (const alias of aliases[keys]) { - argv[alias] = result; - } - } - return argv; - }, (err) => { - throw new YError(err.message); - }); - }, keys); - return this; - } - conflicts(key1, key2) { - argsert(' [string|array]', [key1, key2], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").conflicts(key1, key2); - return this; - } - config(key = 'config', msg, parseFn) { - argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length); - if (typeof key === 'object' && !Array.isArray(key)) { - key = applyExtends(key, __classPrivateFieldGet(this, _YargsInstance_cwd, "f"), this[kGetParserConfiguration]()['deep-merge-config'] || false, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = (__classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || []).concat(key); - return this; - } - if (typeof msg === 'function') { - parseFn = msg; - msg = undefined; - } - this.describe(key, msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Path to JSON config file')); - (Array.isArray(key) ? key : [key]).forEach(k => { - __classPrivateFieldGet(this, _YargsInstance_options, "f").config[k] = parseFn || true; - }); - return this; - } - completion(cmd, desc, fn) { - argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length); - if (typeof desc === 'function') { - fn = desc; - desc = undefined; - } - __classPrivateFieldSet(this, _YargsInstance_completionCommand, cmd || __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") || 'completion', "f"); - if (!desc && desc !== false) { - desc = 'generate completion script'; - } - this.command(__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f"), desc); - if (fn) - __classPrivateFieldGet(this, _YargsInstance_completion, "f").registerFunction(fn); - return this; - } - command(cmd, description, builder, handler, middlewares, deprecated) { - argsert(' [string|boolean] [function|object] [function] [array] [boolean|string]', [cmd, description, builder, handler, middlewares, deprecated], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_command, "f").addHandler(cmd, description, builder, handler, middlewares, deprecated); - return this; - } - commands(cmd, description, builder, handler, middlewares, deprecated) { - return this.command(cmd, description, builder, handler, middlewares, deprecated); - } - commandDir(dir, opts) { - argsert(' [object]', [dir, opts], arguments.length); - const req = __classPrivateFieldGet(this, _YargsInstance_parentRequire, "f") || __classPrivateFieldGet(this, _YargsInstance_shim, "f").require; - __classPrivateFieldGet(this, _YargsInstance_command, "f").addDirectory(dir, req, __classPrivateFieldGet(this, _YargsInstance_shim, "f").getCallerFile(), opts); - return this; - } - count(keys) { - argsert('', [keys], arguments.length); - this[kPopulateParserHintArray]('count', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - default(key, value, defaultDescription) { - argsert(' [*] [string]', [key, value, defaultDescription], arguments.length); - if (defaultDescription) { - assertSingleKey(key, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] = defaultDescription; - } - if (typeof value === 'function') { - assertSingleKey(key, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - if (!__classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key]) - __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] = - __classPrivateFieldGet(this, _YargsInstance_usage, "f").functionDescription(value); - value = value.call(); - } - this[kPopulateParserHintSingleValueDictionary](this.default.bind(this), 'default', key, value); - return this; - } - defaults(key, value, defaultDescription) { - return this.default(key, value, defaultDescription); - } - demandCommand(min = 1, max, minMsg, maxMsg) { - argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length); - if (typeof max !== 'number') { - minMsg = max; - max = Infinity; - } - this.global('_', false); - __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedCommands._ = { - min, - max, - minMsg, - maxMsg, - }; - return this; - } - demand(keys, max, msg) { - if (Array.isArray(max)) { - max.forEach(key => { - assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - this.demandOption(key, msg); - }); - max = Infinity; - } - else if (typeof max !== 'number') { - msg = max; - max = Infinity; - } - if (typeof keys === 'number') { - assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - this.demandCommand(keys, max, msg, msg); - } - else if (Array.isArray(keys)) { - keys.forEach(key => { - assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - this.demandOption(key, msg); - }); - } - else { - if (typeof msg === 'string') { - this.demandOption(keys, msg); - } - else if (msg === true || typeof msg === 'undefined') { - this.demandOption(keys); - } - } - return this; - } - demandOption(keys, msg) { - argsert(' [string]', [keys, msg], arguments.length); - this[kPopulateParserHintSingleValueDictionary](this.demandOption.bind(this), 'demandedOptions', keys, msg); - return this; - } - deprecateOption(option, message) { - argsert(' [string|boolean]', [option, message], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_options, "f").deprecatedOptions[option] = message; - return this; - } - describe(keys, description) { - argsert(' [string]', [keys, description], arguments.length); - this[kSetKey](keys, true); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").describe(keys, description); - return this; - } - detectLocale(detect) { - argsert('', [detect], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_detectLocale, detect, "f"); - return this; - } - env(prefix) { - argsert('[string|boolean]', [prefix], arguments.length); - if (prefix === false) - delete __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix; - else - __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix = prefix || ''; - return this; - } - epilogue(msg) { - argsert('', [msg], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").epilog(msg); - return this; - } - epilog(msg) { - return this.epilogue(msg); - } - example(cmd, description) { - argsert(' [string]', [cmd, description], arguments.length); - if (Array.isArray(cmd)) { - cmd.forEach(exampleParams => this.example(...exampleParams)); - } - else { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").example(cmd, description); - } - return this; - } - exit(code, err) { - __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); - __classPrivateFieldSet(this, _YargsInstance_exitError, err, "f"); - if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) - __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.exit(code); - } - exitProcess(enabled = true) { - argsert('[boolean]', [enabled], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_exitProcess, enabled, "f"); - return this; - } - fail(f) { - argsert('', [f], arguments.length); - if (typeof f === 'boolean' && f !== false) { - throw new YError("Invalid first argument. Expected function or boolean 'false'"); - } - __classPrivateFieldGet(this, _YargsInstance_usage, "f").failFn(f); - return this; - } - getAliases() { - return this.parsed ? this.parsed.aliases : {}; - } - async getCompletion(args, done) { - argsert(' [function]', [args, done], arguments.length); - if (!done) { - return new Promise((resolve, reject) => { - __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, (err, completions) => { - if (err) - reject(err); - else - resolve(completions); - }); - }); - } - else { - return __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, done); - } - } - getDemandedOptions() { - argsert([], 0); - return __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedOptions; - } - getDemandedCommands() { - argsert([], 0); - return __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedCommands; - } - getDeprecatedOptions() { - argsert([], 0); - return __classPrivateFieldGet(this, _YargsInstance_options, "f").deprecatedOptions; - } - getDetectLocale() { - return __classPrivateFieldGet(this, _YargsInstance_detectLocale, "f"); - } - getExitProcess() { - return __classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"); - } - getGroups() { - return Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_groups, "f"), __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")); - } - getHelp() { - __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); - if (!__classPrivateFieldGet(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) { - if (!this.parsed) { - const parse = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet(this, _YargsInstance_processArgs, "f"), undefined, undefined, 0, true); - if (isPromise(parse)) { - return parse.then(() => { - return __classPrivateFieldGet(this, _YargsInstance_usage, "f").help(); - }); - } - } - const builderResponse = __classPrivateFieldGet(this, _YargsInstance_command, "f").runDefaultBuilderOn(this); - if (isPromise(builderResponse)) { - return builderResponse.then(() => { - return __classPrivateFieldGet(this, _YargsInstance_usage, "f").help(); - }); - } - } - return Promise.resolve(__classPrivateFieldGet(this, _YargsInstance_usage, "f").help()); - } - getOptions() { - return __classPrivateFieldGet(this, _YargsInstance_options, "f"); - } - getStrict() { - return __classPrivateFieldGet(this, _YargsInstance_strict, "f"); - } - getStrictCommands() { - return __classPrivateFieldGet(this, _YargsInstance_strictCommands, "f"); - } - getStrictOptions() { - return __classPrivateFieldGet(this, _YargsInstance_strictOptions, "f"); - } - global(globals, global) { - argsert(' [boolean]', [globals, global], arguments.length); - globals = [].concat(globals); - if (global !== false) { - __classPrivateFieldGet(this, _YargsInstance_options, "f").local = __classPrivateFieldGet(this, _YargsInstance_options, "f").local.filter(l => globals.indexOf(l) === -1); - } - else { - globals.forEach(g => { - if (!__classPrivateFieldGet(this, _YargsInstance_options, "f").local.includes(g)) - __classPrivateFieldGet(this, _YargsInstance_options, "f").local.push(g); - }); - } - return this; - } - group(opts, groupName) { - argsert(' ', [opts, groupName], arguments.length); - const existing = __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName] || __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName]; - if (__classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName]) { - delete __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName]; - } - const seen = {}; - __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName] = (existing || []).concat(opts).filter(key => { - if (seen[key]) - return false; - return (seen[key] = true); - }); - return this; - } - hide(key) { - argsert('', [key], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_options, "f").hiddenOptions.push(key); - return this; - } - implies(key, value) { - argsert(' [number|string|array]', [key, value], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").implies(key, value); - return this; - } - locale(locale) { - argsert('[string]', [locale], arguments.length); - if (locale === undefined) { - this[kGuessLocale](); - return __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.getLocale(); - } - __classPrivateFieldSet(this, _YargsInstance_detectLocale, false, "f"); - __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.setLocale(locale); - return this; - } - middleware(callback, applyBeforeValidation, global) { - return __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").addMiddleware(callback, !!applyBeforeValidation, global); - } - nargs(key, value) { - argsert(' [number]', [key, value], arguments.length); - this[kPopulateParserHintSingleValueDictionary](this.nargs.bind(this), 'narg', key, value); - return this; - } - normalize(keys) { - argsert('', [keys], arguments.length); - this[kPopulateParserHintArray]('normalize', keys); - return this; - } - number(keys) { - argsert('', [keys], arguments.length); - this[kPopulateParserHintArray]('number', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - option(key, opt) { - argsert(' [object]', [key, opt], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach(k => { - this.options(k, key[k]); - }); - } - else { - if (typeof opt !== 'object') { - opt = {}; - } - this[kTrackManuallySetKeys](key); - if (__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f") && (key === 'version' || (opt === null || opt === void 0 ? void 0 : opt.alias) === 'version')) { - this[kEmitWarning]([ - '"version" is a reserved word.', - 'Please do one of the following:', - '- Disable version with `yargs.version(false)` if using "version" as an option', - '- Use the built-in `yargs.version` method instead (if applicable)', - '- Use a different option key', - 'https://yargs.js.org/docs/#api-reference-version', - ].join('\n'), undefined, 'versionWarning'); - } - __classPrivateFieldGet(this, _YargsInstance_options, "f").key[key] = true; - if (opt.alias) - this.alias(key, opt.alias); - const deprecate = opt.deprecate || opt.deprecated; - if (deprecate) { - this.deprecateOption(key, deprecate); - } - const demand = opt.demand || opt.required || opt.require; - if (demand) { - this.demand(key, demand); - } - if (opt.demandOption) { - this.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined); - } - if (opt.conflicts) { - this.conflicts(key, opt.conflicts); - } - if ('default' in opt) { - this.default(key, opt.default); - } - if (opt.implies !== undefined) { - this.implies(key, opt.implies); - } - if (opt.nargs !== undefined) { - this.nargs(key, opt.nargs); - } - if (opt.config) { - this.config(key, opt.configParser); - } - if (opt.normalize) { - this.normalize(key); - } - if (opt.choices) { - this.choices(key, opt.choices); - } - if (opt.coerce) { - this.coerce(key, opt.coerce); - } - if (opt.group) { - this.group(key, opt.group); - } - if (opt.boolean || opt.type === 'boolean') { - this.boolean(key); - if (opt.alias) - this.boolean(opt.alias); - } - if (opt.array || opt.type === 'array') { - this.array(key); - if (opt.alias) - this.array(opt.alias); - } - if (opt.number || opt.type === 'number') { - this.number(key); - if (opt.alias) - this.number(opt.alias); - } - if (opt.string || opt.type === 'string') { - this.string(key); - if (opt.alias) - this.string(opt.alias); - } - if (opt.count || opt.type === 'count') { - this.count(key); - } - if (typeof opt.global === 'boolean') { - this.global(key, opt.global); - } - if (opt.defaultDescription) { - __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] = opt.defaultDescription; - } - if (opt.skipValidation) { - this.skipValidation(key); - } - const desc = opt.describe || opt.description || opt.desc; - const descriptions = __classPrivateFieldGet(this, _YargsInstance_usage, "f").getDescriptions(); - if (!Object.prototype.hasOwnProperty.call(descriptions, key) || - typeof desc === 'string') { - this.describe(key, desc); - } - if (opt.hidden) { - this.hide(key); - } - if (opt.requiresArg) { - this.requiresArg(key); - } - } - return this; - } - options(key, opt) { - return this.option(key, opt); - } - parse(args, shortCircuit, _parseFn) { - argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length); - this[kFreeze](); - if (typeof args === 'undefined') { - args = __classPrivateFieldGet(this, _YargsInstance_processArgs, "f"); - } - if (typeof shortCircuit === 'object') { - __classPrivateFieldSet(this, _YargsInstance_parseContext, shortCircuit, "f"); - shortCircuit = _parseFn; - } - if (typeof shortCircuit === 'function') { - __classPrivateFieldSet(this, _YargsInstance_parseFn, shortCircuit, "f"); - shortCircuit = false; - } - if (!shortCircuit) - __classPrivateFieldSet(this, _YargsInstance_processArgs, args, "f"); - if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) - __classPrivateFieldSet(this, _YargsInstance_exitProcess, false, "f"); - const parsed = this[kRunYargsParserAndExecuteCommands](args, !!shortCircuit); - const tmpParsed = this.parsed; - __classPrivateFieldGet(this, _YargsInstance_completion, "f").setParsed(this.parsed); - if (isPromise(parsed)) { - return parsed - .then(argv => { - if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) - __classPrivateFieldGet(this, _YargsInstance_parseFn, "f").call(this, __classPrivateFieldGet(this, _YargsInstance_exitError, "f"), argv, __classPrivateFieldGet(this, _YargsInstance_output, "f")); - return argv; - }) - .catch(err => { - if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) { - __classPrivateFieldGet(this, _YargsInstance_parseFn, "f")(err, this.parsed.argv, __classPrivateFieldGet(this, _YargsInstance_output, "f")); - } - throw err; - }) - .finally(() => { - this[kUnfreeze](); - this.parsed = tmpParsed; - }); - } - else { - if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) - __classPrivateFieldGet(this, _YargsInstance_parseFn, "f").call(this, __classPrivateFieldGet(this, _YargsInstance_exitError, "f"), parsed, __classPrivateFieldGet(this, _YargsInstance_output, "f")); - this[kUnfreeze](); - this.parsed = tmpParsed; - } - return parsed; - } - parseAsync(args, shortCircuit, _parseFn) { - const maybePromise = this.parse(args, shortCircuit, _parseFn); - return !isPromise(maybePromise) - ? Promise.resolve(maybePromise) - : maybePromise; - } - parseSync(args, shortCircuit, _parseFn) { - const maybePromise = this.parse(args, shortCircuit, _parseFn); - if (isPromise(maybePromise)) { - throw new YError('.parseSync() must not be used with asynchronous builders, handlers, or middleware'); - } - return maybePromise; - } - parserConfiguration(config) { - argsert('', [config], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_parserConfig, config, "f"); - return this; - } - pkgConf(key, rootPath) { - argsert(' [string]', [key, rootPath], arguments.length); - let conf = null; - const obj = this[kPkgUp](rootPath || __classPrivateFieldGet(this, _YargsInstance_cwd, "f")); - if (obj[key] && typeof obj[key] === 'object') { - conf = applyExtends(obj[key], rootPath || __classPrivateFieldGet(this, _YargsInstance_cwd, "f"), this[kGetParserConfiguration]()['deep-merge-config'] || false, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = (__classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || []).concat(conf); - } - return this; - } - positional(key, opts) { - argsert(' ', [key, opts], arguments.length); - const supportedOpts = [ - 'default', - 'defaultDescription', - 'implies', - 'normalize', - 'choices', - 'conflicts', - 'coerce', - 'type', - 'describe', - 'desc', - 'description', - 'alias', - ]; - opts = objFilter(opts, (k, v) => { - if (k === 'type' && !['string', 'number', 'boolean'].includes(v)) - return false; - return supportedOpts.includes(k); - }); - const fullCommand = __classPrivateFieldGet(this, _YargsInstance_context, "f").fullCommands[__classPrivateFieldGet(this, _YargsInstance_context, "f").fullCommands.length - 1]; - const parseOptions = fullCommand - ? __classPrivateFieldGet(this, _YargsInstance_command, "f").cmdToParseOptions(fullCommand) - : { - array: [], - alias: {}, - default: {}, - demand: {}, - }; - objectKeys(parseOptions).forEach(pk => { - const parseOption = parseOptions[pk]; - if (Array.isArray(parseOption)) { - if (parseOption.indexOf(key) !== -1) - opts[pk] = true; - } - else { - if (parseOption[key] && !(pk in opts)) - opts[pk] = parseOption[key]; - } - }); - this.group(key, __classPrivateFieldGet(this, _YargsInstance_usage, "f").getPositionalGroupName()); - return this.option(key, opts); - } - recommendCommands(recommend = true) { - argsert('[boolean]', [recommend], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_recommendCommands, recommend, "f"); - return this; - } - required(keys, max, msg) { - return this.demand(keys, max, msg); - } - require(keys, max, msg) { - return this.demand(keys, max, msg); - } - requiresArg(keys) { - argsert(' [number]', [keys], arguments.length); - if (typeof keys === 'string' && __classPrivateFieldGet(this, _YargsInstance_options, "f").narg[keys]) { - return this; - } - else { - this[kPopulateParserHintSingleValueDictionary](this.requiresArg.bind(this), 'narg', keys, NaN); - } - return this; - } - showCompletionScript($0, cmd) { - argsert('[string] [string]', [$0, cmd], arguments.length); - $0 = $0 || this.$0; - __classPrivateFieldGet(this, _YargsInstance_logger, "f").log(__classPrivateFieldGet(this, _YargsInstance_completion, "f").generateCompletionScript($0, cmd || __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") || 'completion')); - return this; - } - showHelp(level) { - argsert('[string|function]', [level], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); - if (!__classPrivateFieldGet(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) { - if (!this.parsed) { - const parse = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet(this, _YargsInstance_processArgs, "f"), undefined, undefined, 0, true); - if (isPromise(parse)) { - parse.then(() => { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level); - }); - return this; - } - } - const builderResponse = __classPrivateFieldGet(this, _YargsInstance_command, "f").runDefaultBuilderOn(this); - if (isPromise(builderResponse)) { - builderResponse.then(() => { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level); - }); - return this; - } - } - __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level); - return this; - } - scriptName(scriptName) { - this.customScriptName = true; - this.$0 = scriptName; - return this; - } - showHelpOnFail(enabled, message) { - argsert('[boolean|string] [string]', [enabled, message], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelpOnFail(enabled, message); - return this; - } - showVersion(level) { - argsert('[string|function]', [level], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").showVersion(level); - return this; - } - skipValidation(keys) { - argsert('', [keys], arguments.length); - this[kPopulateParserHintArray]('skipValidation', keys); - return this; - } - strict(enabled) { - argsert('[boolean]', [enabled], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_strict, enabled !== false, "f"); - return this; - } - strictCommands(enabled) { - argsert('[boolean]', [enabled], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_strictCommands, enabled !== false, "f"); - return this; - } - strictOptions(enabled) { - argsert('[boolean]', [enabled], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_strictOptions, enabled !== false, "f"); - return this; - } - string(keys) { - argsert('', [keys], arguments.length); - this[kPopulateParserHintArray]('string', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - terminalWidth() { - argsert([], 0); - return __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.stdColumns; - } - updateLocale(obj) { - return this.updateStrings(obj); - } - updateStrings(obj) { - argsert('', [obj], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_detectLocale, false, "f"); - __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.updateLocale(obj); - return this; - } - usage(msg, description, builder, handler) { - argsert(' [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length); - if (description !== undefined) { - assertNotStrictEqual(msg, null, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - if ((msg || '').match(/^\$0( |$)/)) { - return this.command(msg, description, builder, handler); - } - else { - throw new YError('.usage() description must start with $0 if being used as alias for .command()'); - } - } - else { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").usage(msg); - return this; - } - } - usageConfiguration(config) { - argsert('', [config], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_usageConfig, config, "f"); - return this; - } - version(opt, msg, ver) { - const defaultVersionOpt = 'version'; - argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length); - if (__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f")) { - this[kDeleteFromParserHintObject](__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f")); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").version(undefined); - __classPrivateFieldSet(this, _YargsInstance_versionOpt, null, "f"); - } - if (arguments.length === 0) { - ver = this[kGuessVersion](); - opt = defaultVersionOpt; - } - else if (arguments.length === 1) { - if (opt === false) { - return this; - } - ver = opt; - opt = defaultVersionOpt; - } - else if (arguments.length === 2) { - ver = msg; - msg = undefined; - } - __classPrivateFieldSet(this, _YargsInstance_versionOpt, typeof opt === 'string' ? opt : defaultVersionOpt, "f"); - msg = msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show version number'); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").version(ver || undefined); - this.boolean(__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f")); - this.describe(__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f"), msg); - return this; - } - wrap(cols) { - argsert('', [cols], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").wrap(cols); - return this; - } - [(_YargsInstance_command = new WeakMap(), _YargsInstance_cwd = new WeakMap(), _YargsInstance_context = new WeakMap(), _YargsInstance_completion = new WeakMap(), _YargsInstance_completionCommand = new WeakMap(), _YargsInstance_defaultShowHiddenOpt = new WeakMap(), _YargsInstance_exitError = new WeakMap(), _YargsInstance_detectLocale = new WeakMap(), _YargsInstance_emittedWarnings = new WeakMap(), _YargsInstance_exitProcess = new WeakMap(), _YargsInstance_frozens = new WeakMap(), _YargsInstance_globalMiddleware = new WeakMap(), _YargsInstance_groups = new WeakMap(), _YargsInstance_hasOutput = new WeakMap(), _YargsInstance_helpOpt = new WeakMap(), _YargsInstance_isGlobalContext = new WeakMap(), _YargsInstance_logger = new WeakMap(), _YargsInstance_output = new WeakMap(), _YargsInstance_options = new WeakMap(), _YargsInstance_parentRequire = new WeakMap(), _YargsInstance_parserConfig = new WeakMap(), _YargsInstance_parseFn = new WeakMap(), _YargsInstance_parseContext = new WeakMap(), _YargsInstance_pkgs = new WeakMap(), _YargsInstance_preservedGroups = new WeakMap(), _YargsInstance_processArgs = new WeakMap(), _YargsInstance_recommendCommands = new WeakMap(), _YargsInstance_shim = new WeakMap(), _YargsInstance_strict = new WeakMap(), _YargsInstance_strictCommands = new WeakMap(), _YargsInstance_strictOptions = new WeakMap(), _YargsInstance_usage = new WeakMap(), _YargsInstance_usageConfig = new WeakMap(), _YargsInstance_versionOpt = new WeakMap(), _YargsInstance_validation = new WeakMap(), kCopyDoubleDash)](argv) { - if (!argv._ || !argv['--']) - return argv; - argv._.push.apply(argv._, argv['--']); - try { - delete argv['--']; - } - catch (_err) { } - return argv; - } - [kCreateLogger]() { - return { - log: (...args) => { - if (!this[kHasParseCallback]()) - console.log(...args); - __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); - if (__classPrivateFieldGet(this, _YargsInstance_output, "f").length) - __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + '\n', "f"); - __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + args.join(' '), "f"); - }, - error: (...args) => { - if (!this[kHasParseCallback]()) - console.error(...args); - __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); - if (__classPrivateFieldGet(this, _YargsInstance_output, "f").length) - __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + '\n', "f"); - __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + args.join(' '), "f"); - }, - }; - } - [kDeleteFromParserHintObject](optionKey) { - objectKeys(__classPrivateFieldGet(this, _YargsInstance_options, "f")).forEach((hintKey) => { - if (((key) => key === 'configObjects')(hintKey)) - return; - const hint = __classPrivateFieldGet(this, _YargsInstance_options, "f")[hintKey]; - if (Array.isArray(hint)) { - if (hint.includes(optionKey)) - hint.splice(hint.indexOf(optionKey), 1); - } - else if (typeof hint === 'object') { - delete hint[optionKey]; - } - }); - delete __classPrivateFieldGet(this, _YargsInstance_usage, "f").getDescriptions()[optionKey]; - } - [kEmitWarning](warning, type, deduplicationId) { - if (!__classPrivateFieldGet(this, _YargsInstance_emittedWarnings, "f")[deduplicationId]) { - __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.emitWarning(warning, type); - __classPrivateFieldGet(this, _YargsInstance_emittedWarnings, "f")[deduplicationId] = true; - } - } - [kFreeze]() { - __classPrivateFieldGet(this, _YargsInstance_frozens, "f").push({ - options: __classPrivateFieldGet(this, _YargsInstance_options, "f"), - configObjects: __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects.slice(0), - exitProcess: __classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"), - groups: __classPrivateFieldGet(this, _YargsInstance_groups, "f"), - strict: __classPrivateFieldGet(this, _YargsInstance_strict, "f"), - strictCommands: __classPrivateFieldGet(this, _YargsInstance_strictCommands, "f"), - strictOptions: __classPrivateFieldGet(this, _YargsInstance_strictOptions, "f"), - completionCommand: __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f"), - output: __classPrivateFieldGet(this, _YargsInstance_output, "f"), - exitError: __classPrivateFieldGet(this, _YargsInstance_exitError, "f"), - hasOutput: __classPrivateFieldGet(this, _YargsInstance_hasOutput, "f"), - parsed: this.parsed, - parseFn: __classPrivateFieldGet(this, _YargsInstance_parseFn, "f"), - parseContext: __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"), - }); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").freeze(); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").freeze(); - __classPrivateFieldGet(this, _YargsInstance_command, "f").freeze(); - __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").freeze(); - } - [kGetDollarZero]() { - let $0 = ''; - let default$0; - if (/\b(node|iojs|electron)(\.exe)?$/.test(__classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv()[0])) { - default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv().slice(1, 2); - } - else { - default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv().slice(0, 1); - } - $0 = default$0 - .map(x => { - const b = this[kRebase](__classPrivateFieldGet(this, _YargsInstance_cwd, "f"), x); - return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x; - }) - .join(' ') - .trim(); - if (__classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('_') && - __classPrivateFieldGet(this, _YargsInstance_shim, "f").getProcessArgvBin() === __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('_')) { - $0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f") - .getEnv('_') - .replace(`${__classPrivateFieldGet(this, _YargsInstance_shim, "f").path.dirname(__classPrivateFieldGet(this, _YargsInstance_shim, "f").process.execPath())}/`, ''); - } - return $0; - } - [kGetParserConfiguration]() { - return __classPrivateFieldGet(this, _YargsInstance_parserConfig, "f"); - } - [kGetUsageConfiguration]() { - return __classPrivateFieldGet(this, _YargsInstance_usageConfig, "f"); - } - [kGuessLocale]() { - if (!__classPrivateFieldGet(this, _YargsInstance_detectLocale, "f")) - return; - const locale = __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LC_ALL') || - __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LC_MESSAGES') || - __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LANG') || - __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LANGUAGE') || - 'en_US'; - this.locale(locale.replace(/[.:].*/, '')); - } - [kGuessVersion]() { - const obj = this[kPkgUp](); - return obj.version || 'unknown'; - } - [kParsePositionalNumbers](argv) { - const args = argv['--'] ? argv['--'] : argv._; - for (let i = 0, arg; (arg = args[i]) !== undefined; i++) { - if (__classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.looksLikeNumber(arg) && - Number.isSafeInteger(Math.floor(parseFloat(`${arg}`)))) { - args[i] = Number(arg); - } - } - return argv; - } - [kPkgUp](rootPath) { - const npath = rootPath || '*'; - if (__classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath]) - return __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath]; - let obj = {}; - try { - let startDir = rootPath || __classPrivateFieldGet(this, _YargsInstance_shim, "f").mainFilename; - if (!rootPath && __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.extname(startDir)) { - startDir = __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.dirname(startDir); - } - const pkgJsonPath = __classPrivateFieldGet(this, _YargsInstance_shim, "f").findUp(startDir, (dir, names) => { - if (names.includes('package.json')) { - return 'package.json'; - } - else { - return undefined; - } - }); - assertNotStrictEqual(pkgJsonPath, undefined, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - obj = JSON.parse(__classPrivateFieldGet(this, _YargsInstance_shim, "f").readFileSync(pkgJsonPath, 'utf8')); - } - catch (_noop) { } - __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath] = obj || {}; - return __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath]; - } - [kPopulateParserHintArray](type, keys) { - keys = [].concat(keys); - keys.forEach(key => { - key = this[kSanitizeKey](key); - __classPrivateFieldGet(this, _YargsInstance_options, "f")[type].push(key); - }); - } - [kPopulateParserHintSingleValueDictionary](builder, type, key, value) { - this[kPopulateParserHintDictionary](builder, type, key, value, (type, key, value) => { - __classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] = value; - }); - } - [kPopulateParserHintArrayDictionary](builder, type, key, value) { - this[kPopulateParserHintDictionary](builder, type, key, value, (type, key, value) => { - __classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] = (__classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] || []).concat(value); - }); - } - [kPopulateParserHintDictionary](builder, type, key, value, singleKeyHandler) { - if (Array.isArray(key)) { - key.forEach(k => { - builder(k, value); - }); - } - else if (((key) => typeof key === 'object')(key)) { - for (const k of objectKeys(key)) { - builder(k, key[k]); - } - } - else { - singleKeyHandler(type, this[kSanitizeKey](key), value); - } - } - [kSanitizeKey](key) { - if (key === '__proto__') - return '___proto___'; - return key; - } - [kSetKey](key, set) { - this[kPopulateParserHintSingleValueDictionary](this[kSetKey].bind(this), 'key', key, set); - return this; - } - [kUnfreeze]() { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; - const frozen = __classPrivateFieldGet(this, _YargsInstance_frozens, "f").pop(); - assertNotStrictEqual(frozen, undefined, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - let configObjects; - (_a = this, _b = this, _c = this, _d = this, _e = this, _f = this, _g = this, _h = this, _j = this, _k = this, _l = this, _m = this, { - options: ({ set value(_o) { __classPrivateFieldSet(_a, _YargsInstance_options, _o, "f"); } }).value, - configObjects, - exitProcess: ({ set value(_o) { __classPrivateFieldSet(_b, _YargsInstance_exitProcess, _o, "f"); } }).value, - groups: ({ set value(_o) { __classPrivateFieldSet(_c, _YargsInstance_groups, _o, "f"); } }).value, - output: ({ set value(_o) { __classPrivateFieldSet(_d, _YargsInstance_output, _o, "f"); } }).value, - exitError: ({ set value(_o) { __classPrivateFieldSet(_e, _YargsInstance_exitError, _o, "f"); } }).value, - hasOutput: ({ set value(_o) { __classPrivateFieldSet(_f, _YargsInstance_hasOutput, _o, "f"); } }).value, - parsed: this.parsed, - strict: ({ set value(_o) { __classPrivateFieldSet(_g, _YargsInstance_strict, _o, "f"); } }).value, - strictCommands: ({ set value(_o) { __classPrivateFieldSet(_h, _YargsInstance_strictCommands, _o, "f"); } }).value, - strictOptions: ({ set value(_o) { __classPrivateFieldSet(_j, _YargsInstance_strictOptions, _o, "f"); } }).value, - completionCommand: ({ set value(_o) { __classPrivateFieldSet(_k, _YargsInstance_completionCommand, _o, "f"); } }).value, - parseFn: ({ set value(_o) { __classPrivateFieldSet(_l, _YargsInstance_parseFn, _o, "f"); } }).value, - parseContext: ({ set value(_o) { __classPrivateFieldSet(_m, _YargsInstance_parseContext, _o, "f"); } }).value, - } = frozen); - __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = configObjects; - __classPrivateFieldGet(this, _YargsInstance_usage, "f").unfreeze(); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").unfreeze(); - __classPrivateFieldGet(this, _YargsInstance_command, "f").unfreeze(); - __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").unfreeze(); - } - [kValidateAsync](validation, argv) { - return maybeAsyncResult(argv, result => { - validation(result); - return result; - }); - } - getInternalMethods() { - return { - getCommandInstance: this[kGetCommandInstance].bind(this), - getContext: this[kGetContext].bind(this), - getHasOutput: this[kGetHasOutput].bind(this), - getLoggerInstance: this[kGetLoggerInstance].bind(this), - getParseContext: this[kGetParseContext].bind(this), - getParserConfiguration: this[kGetParserConfiguration].bind(this), - getUsageConfiguration: this[kGetUsageConfiguration].bind(this), - getUsageInstance: this[kGetUsageInstance].bind(this), - getValidationInstance: this[kGetValidationInstance].bind(this), - hasParseCallback: this[kHasParseCallback].bind(this), - isGlobalContext: this[kIsGlobalContext].bind(this), - postProcess: this[kPostProcess].bind(this), - reset: this[kReset].bind(this), - runValidation: this[kRunValidation].bind(this), - runYargsParserAndExecuteCommands: this[kRunYargsParserAndExecuteCommands].bind(this), - setHasOutput: this[kSetHasOutput].bind(this), - }; - } - [kGetCommandInstance]() { - return __classPrivateFieldGet(this, _YargsInstance_command, "f"); - } - [kGetContext]() { - return __classPrivateFieldGet(this, _YargsInstance_context, "f"); - } - [kGetHasOutput]() { - return __classPrivateFieldGet(this, _YargsInstance_hasOutput, "f"); - } - [kGetLoggerInstance]() { - return __classPrivateFieldGet(this, _YargsInstance_logger, "f"); - } - [kGetParseContext]() { - return __classPrivateFieldGet(this, _YargsInstance_parseContext, "f") || {}; - } - [kGetUsageInstance]() { - return __classPrivateFieldGet(this, _YargsInstance_usage, "f"); - } - [kGetValidationInstance]() { - return __classPrivateFieldGet(this, _YargsInstance_validation, "f"); - } - [kHasParseCallback]() { - return !!__classPrivateFieldGet(this, _YargsInstance_parseFn, "f"); - } - [kIsGlobalContext]() { - return __classPrivateFieldGet(this, _YargsInstance_isGlobalContext, "f"); - } - [kPostProcess](argv, populateDoubleDash, calledFromCommand, runGlobalMiddleware) { - if (calledFromCommand) - return argv; - if (isPromise(argv)) - return argv; - if (!populateDoubleDash) { - argv = this[kCopyDoubleDash](argv); - } - const parsePositionalNumbers = this[kGetParserConfiguration]()['parse-positional-numbers'] || - this[kGetParserConfiguration]()['parse-positional-numbers'] === undefined; - if (parsePositionalNumbers) { - argv = this[kParsePositionalNumbers](argv); - } - if (runGlobalMiddleware) { - argv = applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), false); - } - return argv; - } - [kReset](aliases = {}) { - __classPrivateFieldSet(this, _YargsInstance_options, __classPrivateFieldGet(this, _YargsInstance_options, "f") || {}, "f"); - const tmpOptions = {}; - tmpOptions.local = __classPrivateFieldGet(this, _YargsInstance_options, "f").local || []; - tmpOptions.configObjects = __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || []; - const localLookup = {}; - tmpOptions.local.forEach(l => { - localLookup[l] = true; - (aliases[l] || []).forEach(a => { - localLookup[a] = true; - }); - }); - Object.assign(__classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f"), Object.keys(__classPrivateFieldGet(this, _YargsInstance_groups, "f")).reduce((acc, groupName) => { - const keys = __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName].filter(key => !(key in localLookup)); - if (keys.length > 0) { - acc[groupName] = keys; - } - return acc; - }, {})); - __classPrivateFieldSet(this, _YargsInstance_groups, {}, "f"); - const arrayOptions = [ - 'array', - 'boolean', - 'string', - 'skipValidation', - 'count', - 'normalize', - 'number', - 'hiddenOptions', - ]; - const objectOptions = [ - 'narg', - 'key', - 'alias', - 'default', - 'defaultDescription', - 'config', - 'choices', - 'demandedOptions', - 'demandedCommands', - 'deprecatedOptions', - ]; - arrayOptions.forEach(k => { - tmpOptions[k] = (__classPrivateFieldGet(this, _YargsInstance_options, "f")[k] || []).filter((k) => !localLookup[k]); - }); - objectOptions.forEach((k) => { - tmpOptions[k] = objFilter(__classPrivateFieldGet(this, _YargsInstance_options, "f")[k], k => !localLookup[k]); - }); - tmpOptions.envPrefix = __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix; - __classPrivateFieldSet(this, _YargsInstance_options, tmpOptions, "f"); - __classPrivateFieldSet(this, _YargsInstance_usage, __classPrivateFieldGet(this, _YargsInstance_usage, "f") - ? __classPrivateFieldGet(this, _YargsInstance_usage, "f").reset(localLookup) - : Usage(this, __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); - __classPrivateFieldSet(this, _YargsInstance_validation, __classPrivateFieldGet(this, _YargsInstance_validation, "f") - ? __classPrivateFieldGet(this, _YargsInstance_validation, "f").reset(localLookup) - : Validation(this, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); - __classPrivateFieldSet(this, _YargsInstance_command, __classPrivateFieldGet(this, _YargsInstance_command, "f") - ? __classPrivateFieldGet(this, _YargsInstance_command, "f").reset() - : Command(__classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_validation, "f"), __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); - if (!__classPrivateFieldGet(this, _YargsInstance_completion, "f")) - __classPrivateFieldSet(this, _YargsInstance_completion, Completion(this, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_command, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); - __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").reset(); - __classPrivateFieldSet(this, _YargsInstance_completionCommand, null, "f"); - __classPrivateFieldSet(this, _YargsInstance_output, '', "f"); - __classPrivateFieldSet(this, _YargsInstance_exitError, null, "f"); - __classPrivateFieldSet(this, _YargsInstance_hasOutput, false, "f"); - this.parsed = false; - return this; - } - [kRebase](base, dir) { - return __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.relative(base, dir); - } - [kRunYargsParserAndExecuteCommands](args, shortCircuit, calledFromCommand, commandIndex = 0, helpOnly = false) { - let skipValidation = !!calledFromCommand || helpOnly; - args = args || __classPrivateFieldGet(this, _YargsInstance_processArgs, "f"); - __classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__; - __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration](); - const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration['populate--']; - const config = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, { - 'populate--': true, - }); - const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), { - configuration: { 'parse-positional-numbers': false, ...config }, - })); - const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f")); - let argvPromise = undefined; - const aliases = parsed.aliases; - let helpOptSet = false; - let versionOptSet = false; - Object.keys(argv).forEach(key => { - if (key === __classPrivateFieldGet(this, _YargsInstance_helpOpt, "f") && argv[key]) { - helpOptSet = true; - } - else if (key === __classPrivateFieldGet(this, _YargsInstance_versionOpt, "f") && argv[key]) { - versionOptSet = true; - } - }); - argv.$0 = this.$0; - this.parsed = parsed; - if (commandIndex === 0) { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").clearCachedHelpMessage(); - } - try { - this[kGuessLocale](); - if (shortCircuit) { - return this[kPostProcess](argv, populateDoubleDash, !!calledFromCommand, false); - } - if (__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")) { - const helpCmds = [__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")] - .concat(aliases[__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")] || []) - .filter(k => k.length > 1); - if (helpCmds.includes('' + argv._[argv._.length - 1])) { - argv._.pop(); - helpOptSet = true; - } - } - __classPrivateFieldSet(this, _YargsInstance_isGlobalContext, false, "f"); - const handlerKeys = __classPrivateFieldGet(this, _YargsInstance_command, "f").getCommands(); - const requestCompletions = __classPrivateFieldGet(this, _YargsInstance_completion, "f").completionKey in argv; - const skipRecommendation = helpOptSet || requestCompletions || helpOnly; - if (argv._.length) { - if (handlerKeys.length) { - let firstUnknownCommand; - for (let i = commandIndex || 0, cmd; argv._[i] !== undefined; i++) { - cmd = String(argv._[i]); - if (handlerKeys.includes(cmd) && cmd !== __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) { - const innerArgv = __classPrivateFieldGet(this, _YargsInstance_command, "f").runCommand(cmd, this, parsed, i + 1, helpOnly, helpOptSet || versionOptSet || helpOnly); - return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false); - } - else if (!firstUnknownCommand && - cmd !== __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) { - firstUnknownCommand = cmd; - break; - } - } - if (!__classPrivateFieldGet(this, _YargsInstance_command, "f").hasDefaultCommand() && - __classPrivateFieldGet(this, _YargsInstance_recommendCommands, "f") && - firstUnknownCommand && - !skipRecommendation) { - __classPrivateFieldGet(this, _YargsInstance_validation, "f").recommendCommands(firstUnknownCommand, handlerKeys); - } - } - if (__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") && - argv._.includes(__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) && - !requestCompletions) { - if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) - setBlocking(true); - this.showCompletionScript(); - this.exit(0); - } - } - if (__classPrivateFieldGet(this, _YargsInstance_command, "f").hasDefaultCommand() && !skipRecommendation) { - const innerArgv = __classPrivateFieldGet(this, _YargsInstance_command, "f").runCommand(null, this, parsed, 0, helpOnly, helpOptSet || versionOptSet || helpOnly); - return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false); - } - if (requestCompletions) { - if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) - setBlocking(true); - args = [].concat(args); - const completionArgs = args.slice(args.indexOf(`--${__classPrivateFieldGet(this, _YargsInstance_completion, "f").completionKey}`) + 1); - __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(completionArgs, (err, completions) => { - if (err) - throw new YError(err.message); - (completions || []).forEach(completion => { - __classPrivateFieldGet(this, _YargsInstance_logger, "f").log(completion); - }); - this.exit(0); - }); - return this[kPostProcess](argv, !populateDoubleDash, !!calledFromCommand, false); - } - if (!__classPrivateFieldGet(this, _YargsInstance_hasOutput, "f")) { - if (helpOptSet) { - if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) - setBlocking(true); - skipValidation = true; - this.showHelp('log'); - this.exit(0); - } - else if (versionOptSet) { - if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) - setBlocking(true); - skipValidation = true; - __classPrivateFieldGet(this, _YargsInstance_usage, "f").showVersion('log'); - this.exit(0); - } - } - if (!skipValidation && __classPrivateFieldGet(this, _YargsInstance_options, "f").skipValidation.length > 0) { - skipValidation = Object.keys(argv).some(key => __classPrivateFieldGet(this, _YargsInstance_options, "f").skipValidation.indexOf(key) >= 0 && argv[key] === true); - } - if (!skipValidation) { - if (parsed.error) - throw new YError(parsed.error.message); - if (!requestCompletions) { - const validation = this[kRunValidation](aliases, {}, parsed.error); - if (!calledFromCommand) { - argvPromise = applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), true); - } - argvPromise = this[kValidateAsync](validation, argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv); - if (isPromise(argvPromise) && !calledFromCommand) { - argvPromise = argvPromise.then(() => { - return applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), false); - }); - } - } - } - } - catch (err) { - if (err instanceof YError) - __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(err.message, err); - else - throw err; - } - return this[kPostProcess](argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv, populateDoubleDash, !!calledFromCommand, true); - } - [kRunValidation](aliases, positionalMap, parseErrors, isDefaultCommand) { - const demandedOptions = { ...this.getDemandedOptions() }; - return (argv) => { - if (parseErrors) - throw new YError(parseErrors.message); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").nonOptionCount(argv); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").requiredArguments(argv, demandedOptions); - let failedStrictCommands = false; - if (__classPrivateFieldGet(this, _YargsInstance_strictCommands, "f")) { - failedStrictCommands = __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownCommands(argv); - } - if (__classPrivateFieldGet(this, _YargsInstance_strict, "f") && !failedStrictCommands) { - __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownArguments(argv, aliases, positionalMap, !!isDefaultCommand); - } - else if (__classPrivateFieldGet(this, _YargsInstance_strictOptions, "f")) { - __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownArguments(argv, aliases, {}, false, false); - } - __classPrivateFieldGet(this, _YargsInstance_validation, "f").limitedChoices(argv); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").implications(argv); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").conflicting(argv); - }; - } - [kSetHasOutput]() { - __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); - } - [kTrackManuallySetKeys](keys) { - if (typeof keys === 'string') { - __classPrivateFieldGet(this, _YargsInstance_options, "f").key[keys] = true; - } - else { - for (const k of keys) { - __classPrivateFieldGet(this, _YargsInstance_options, "f").key[k] = true; - } - } - } -} -export function isYargsInstance(y) { - return !!y && typeof y.getInternalMethods === 'function'; -} diff --git a/node_modules/yargs/build/lib/yerror.js b/node_modules/yargs/build/lib/yerror.js deleted file mode 100644 index 7a36684..0000000 --- a/node_modules/yargs/build/lib/yerror.js +++ /dev/null @@ -1,9 +0,0 @@ -export class YError extends Error { - constructor(msg) { - super(msg || 'yargs error'); - this.name = 'YError'; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, YError); - } - } -} diff --git a/node_modules/yargs/helpers/helpers.mjs b/node_modules/yargs/helpers/helpers.mjs deleted file mode 100644 index 3f96b3d..0000000 --- a/node_modules/yargs/helpers/helpers.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import {applyExtends as _applyExtends} from '../build/lib/utils/apply-extends.js'; -import {hideBin} from '../build/lib/utils/process-argv.js'; -import Parser from 'yargs-parser'; -import shim from '../lib/platform-shims/esm.mjs'; - -const applyExtends = (config, cwd, mergeExtends) => { - return _applyExtends(config, cwd, mergeExtends, shim); -}; - -export {applyExtends, hideBin, Parser}; diff --git a/node_modules/yargs/helpers/index.js b/node_modules/yargs/helpers/index.js deleted file mode 100644 index 8ab79a3..0000000 --- a/node_modules/yargs/helpers/index.js +++ /dev/null @@ -1,14 +0,0 @@ -const { - applyExtends, - cjsPlatformShim, - Parser, - processArgv, -} = require('../build/index.cjs'); - -module.exports = { - applyExtends: (config, cwd, mergeExtends) => { - return applyExtends(config, cwd, mergeExtends, cjsPlatformShim); - }, - hideBin: processArgv.hideBin, - Parser, -}; diff --git a/node_modules/yargs/helpers/package.json b/node_modules/yargs/helpers/package.json deleted file mode 100644 index 5bbefff..0000000 --- a/node_modules/yargs/helpers/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/node_modules/yargs/index.cjs b/node_modules/yargs/index.cjs deleted file mode 100644 index d1eee82..0000000 --- a/node_modules/yargs/index.cjs +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; -// classic singleton yargs API, to use yargs -// without running as a singleton do: -// require('yargs/yargs')(process.argv.slice(2)) -const {Yargs, processArgv} = require('./build/index.cjs'); - -Argv(processArgv.hideBin(process.argv)); - -module.exports = Argv; - -function Argv(processArgs, cwd) { - const argv = Yargs(processArgs, cwd, require); - singletonify(argv); - // TODO(bcoe): warn if argv.parse() or argv.argv is used directly. - return argv; -} - -function defineGetter(obj, key, getter) { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: true, - get: getter, - }); -} -function lookupGetter(obj, key) { - const desc = Object.getOwnPropertyDescriptor(obj, key); - if (typeof desc !== 'undefined') { - return desc.get; - } -} - -/* Hack an instance of Argv with process.argv into Argv - so people can do - require('yargs')(['--beeble=1','-z','zizzle']).argv - to parse a list of args and - require('yargs').argv - to get a parsed version of process.argv. -*/ -function singletonify(inst) { - [ - ...Object.keys(inst), - ...Object.getOwnPropertyNames(inst.constructor.prototype), - ].forEach(key => { - if (key === 'argv') { - defineGetter(Argv, key, lookupGetter(inst, key)); - } else if (typeof inst[key] === 'function') { - Argv[key] = inst[key].bind(inst); - } else { - defineGetter(Argv, '$0', () => inst.$0); - defineGetter(Argv, 'parsed', () => inst.parsed); - } - }); -} diff --git a/node_modules/yargs/index.mjs b/node_modules/yargs/index.mjs deleted file mode 100644 index c6440b9..0000000 --- a/node_modules/yargs/index.mjs +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -// Bootstraps yargs for ESM: -import esmPlatformShim from './lib/platform-shims/esm.mjs'; -import {YargsFactory} from './build/lib/yargs-factory.js'; - -const Yargs = YargsFactory(esmPlatformShim); -export default Yargs; diff --git a/node_modules/yargs/lib/platform-shims/browser.mjs b/node_modules/yargs/lib/platform-shims/browser.mjs deleted file mode 100644 index 5f8ec61..0000000 --- a/node_modules/yargs/lib/platform-shims/browser.mjs +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable no-unused-vars */ -'use strict'; - -import cliui from 'https://unpkg.com/cliui@7.0.1/index.mjs'; // eslint-disable-line -import Parser from 'https://unpkg.com/yargs-parser@19.0.0/browser.js'; // eslint-disable-line -import {getProcessArgvBin} from '../../build/lib/utils/process-argv.js'; -import {YError} from '../../build/lib/yerror.js'; - -const REQUIRE_ERROR = 'require is not supported in browser'; -const REQUIRE_DIRECTORY_ERROR = - 'loading a directory of commands is not supported in browser'; - -export default { - assert: { - notStrictEqual: (a, b) => { - // noop. - }, - strictEqual: (a, b) => { - // noop. - }, - }, - cliui, - findUp: () => undefined, - getEnv: key => { - // There is no environment in browser: - return undefined; - }, - inspect: console.log, - getCallerFile: () => { - throw new YError(REQUIRE_DIRECTORY_ERROR); - }, - getProcessArgvBin, - mainFilename: 'yargs', - Parser, - path: { - basename: str => str, - dirname: str => str, - extname: str => str, - relative: str => str, - }, - process: { - argv: () => [], - cwd: () => '', - emitWarning: (warning, name) => {}, - execPath: () => '', - // exit is noop browser: - exit: () => {}, - nextTick: cb => { - // eslint-disable-next-line no-undef - window.setTimeout(cb, 1); - }, - stdColumns: 80, - }, - readFileSync: () => { - return ''; - }, - require: () => { - throw new YError(REQUIRE_ERROR); - }, - requireDirectory: () => { - throw new YError(REQUIRE_DIRECTORY_ERROR); - }, - stringWidth: str => { - return [...str].length; - }, - // TODO: replace this with y18n once it's ported to ESM: - y18n: { - __: (...str) => { - if (str.length === 0) return ''; - const args = str.slice(1); - return sprintf(str[0], ...args); - }, - __n: (str1, str2, count, ...args) => { - if (count === 1) { - return sprintf(str1, ...args); - } else { - return sprintf(str2, ...args); - } - }, - getLocale: () => { - return 'en_US'; - }, - setLocale: () => {}, - updateLocale: () => {}, - }, -}; - -function sprintf(_str, ...args) { - let str = ''; - const split = _str.split('%s'); - split.forEach((token, i) => { - str += `${token}${split[i + 1] !== undefined && args[i] ? args[i] : ''}`; - }); - return str; -} diff --git a/node_modules/yargs/lib/platform-shims/esm.mjs b/node_modules/yargs/lib/platform-shims/esm.mjs deleted file mode 100644 index c25baa5..0000000 --- a/node_modules/yargs/lib/platform-shims/esm.mjs +++ /dev/null @@ -1,73 +0,0 @@ -'use strict' - -import { notStrictEqual, strictEqual } from 'assert' -import cliui from 'cliui' -import escalade from 'escalade/sync' -import { inspect } from 'util' -import { readFileSync } from 'fs' -import { fileURLToPath } from 'url'; -import Parser from 'yargs-parser' -import { basename, dirname, extname, relative, resolve } from 'path' -import { getProcessArgvBin } from '../../build/lib/utils/process-argv.js' -import { YError } from '../../build/lib/yerror.js' -import y18n from 'y18n' - -const REQUIRE_ERROR = 'require is not supported by ESM' -const REQUIRE_DIRECTORY_ERROR = 'loading a directory of commands is not supported yet for ESM' - -let __dirname; -try { - __dirname = fileURLToPath(import.meta.url); -} catch (e) { - __dirname = process.cwd(); -} -const mainFilename = __dirname.substring(0, __dirname.lastIndexOf('node_modules')); - -export default { - assert: { - notStrictEqual, - strictEqual - }, - cliui, - findUp: escalade, - getEnv: (key) => { - return process.env[key] - }, - inspect, - getCallerFile: () => { - throw new YError(REQUIRE_DIRECTORY_ERROR) - }, - getProcessArgvBin, - mainFilename: mainFilename || process.cwd(), - Parser, - path: { - basename, - dirname, - extname, - relative, - resolve - }, - process: { - argv: () => process.argv, - cwd: process.cwd, - emitWarning: (warning, type) => process.emitWarning(warning, type), - execPath: () => process.execPath, - exit: process.exit, - nextTick: process.nextTick, - stdColumns: typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null - }, - readFileSync, - require: () => { - throw new YError(REQUIRE_ERROR) - }, - requireDirectory: () => { - throw new YError(REQUIRE_DIRECTORY_ERROR) - }, - stringWidth: (str) => { - return [...str].length - }, - y18n: y18n({ - directory: resolve(__dirname, '../../../locales'), - updateFiles: false - }) -} diff --git a/node_modules/yargs/locales/be.json b/node_modules/yargs/locales/be.json deleted file mode 100644 index e28fa30..0000000 --- a/node_modules/yargs/locales/be.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Каманды:", - "Options:": "Опцыі:", - "Examples:": "Прыклады:", - "boolean": "булевы тып", - "count": "падлік", - "string": "радковы тып", - "number": "лік", - "array": "масіў", - "required": "неабходна", - "default": "па змаўчанні", - "default:": "па змаўчанні:", - "choices:": "магчымасці:", - "aliases:": "аліасы:", - "generated-value": "згенераванае значэнне", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s", - "other": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s", - "other": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s" - }, - "Missing argument value: %s": { - "one": "Не хапае значэння аргументу: %s", - "other": "Не хапае значэнняў аргументаў: %s" - }, - "Missing required argument: %s": { - "one": "Не хапае неабходнага аргументу: %s", - "other": "Не хапае неабходных аргументаў: %s" - }, - "Unknown argument: %s": { - "one": "Невядомы аргумент: %s", - "other": "Невядомыя аргументы: %s" - }, - "Invalid values:": "Несапраўдныя значэння:", - "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Дадзенае значэнне: %s, Магчымасці: %s", - "Argument check failed: %s": "Праверка аргументаў не ўдалася: %s", - "Implications failed:": "Дадзены аргумент патрабуе наступны дадатковы аргумент:", - "Not enough arguments following: %s": "Недастаткова наступных аргументаў: %s", - "Invalid JSON config file: %s": "Несапраўдны файл канфігурацыі JSON: %s", - "Path to JSON config file": "Шлях да файла канфігурацыі JSON", - "Show help": "Паказаць дапамогу", - "Show version number": "Паказаць нумар версіі", - "Did you mean %s?": "Вы мелі на ўвазе %s?" -} diff --git a/node_modules/yargs/locales/cs.json b/node_modules/yargs/locales/cs.json deleted file mode 100644 index 6394875..0000000 --- a/node_modules/yargs/locales/cs.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "Commands:": "Příkazy:", - "Options:": "Možnosti:", - "Examples:": "Příklady:", - "boolean": "logická hodnota", - "count": "počet", - "string": "řetězec", - "number": "číslo", - "array": "pole", - "required": "povinné", - "default": "výchozí", - "default:": "výchozí:", - "choices:": "volby:", - "aliases:": "aliasy:", - "generated-value": "generovaná-hodnota", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Nedostatek argumentů: zadáno %s, je potřeba alespoň %s", - "other": "Nedostatek argumentů: zadáno %s, je potřeba alespoň %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Příliš mnoho argumentů: zadáno %s, maximálně %s", - "other": "Příliš mnoho argumentů: zadáno %s, maximálně %s" - }, - "Missing argument value: %s": { - "one": "Chybí hodnota argumentu: %s", - "other": "Chybí hodnoty argumentů: %s" - }, - "Missing required argument: %s": { - "one": "Chybí požadovaný argument: %s", - "other": "Chybí požadované argumenty: %s" - }, - "Unknown argument: %s": { - "one": "Neznámý argument: %s", - "other": "Neznámé argumenty: %s" - }, - "Invalid values:": "Neplatné hodnoty:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Zadáno: %s, Možnosti: %s", - "Argument check failed: %s": "Kontrola argumentů se nezdařila: %s", - "Implications failed:": "Chybí závislé argumenty:", - "Not enough arguments following: %s": "Následuje nedostatek argumentů: %s", - "Invalid JSON config file: %s": "Neplatný konfigurační soubor JSON: %s", - "Path to JSON config file": "Cesta ke konfiguračnímu souboru JSON", - "Show help": "Zobrazit nápovědu", - "Show version number": "Zobrazit číslo verze", - "Did you mean %s?": "Měl jste na mysli %s?", - "Arguments %s and %s are mutually exclusive" : "Argumenty %s a %s se vzájemně vylučují", - "Positionals:": "Poziční:", - "command": "příkaz", - "deprecated": "zastaralé", - "deprecated: %s": "zastaralé: %s" -} diff --git a/node_modules/yargs/locales/de.json b/node_modules/yargs/locales/de.json deleted file mode 100644 index dc73ec3..0000000 --- a/node_modules/yargs/locales/de.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Kommandos:", - "Options:": "Optionen:", - "Examples:": "Beispiele:", - "boolean": "boolean", - "count": "Zähler", - "string": "string", - "number": "Zahl", - "array": "array", - "required": "erforderlich", - "default": "Standard", - "default:": "Standard:", - "choices:": "Möglichkeiten:", - "aliases:": "Aliase:", - "generated-value": "Generierter-Wert", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt", - "other": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt", - "other": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt" - }, - "Missing argument value: %s": { - "one": "Fehlender Argumentwert: %s", - "other": "Fehlende Argumentwerte: %s" - }, - "Missing required argument: %s": { - "one": "Fehlendes Argument: %s", - "other": "Fehlende Argumente: %s" - }, - "Unknown argument: %s": { - "one": "Unbekanntes Argument: %s", - "other": "Unbekannte Argumente: %s" - }, - "Invalid values:": "Unzulässige Werte:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, Möglichkeiten: %s", - "Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s", - "Implications failed:": "Fehlende abhängige Argumente:", - "Not enough arguments following: %s": "Nicht genügend Argumente nach: %s", - "Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s", - "Path to JSON config file": "Pfad zur JSON-Config Datei", - "Show help": "Hilfe anzeigen", - "Show version number": "Version anzeigen", - "Did you mean %s?": "Meintest du %s?" -} diff --git a/node_modules/yargs/locales/en.json b/node_modules/yargs/locales/en.json deleted file mode 100644 index af096a1..0000000 --- a/node_modules/yargs/locales/en.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "Commands:": "Commands:", - "Options:": "Options:", - "Examples:": "Examples:", - "boolean": "boolean", - "count": "count", - "string": "string", - "number": "number", - "array": "array", - "required": "required", - "default": "default", - "default:": "default:", - "choices:": "choices:", - "aliases:": "aliases:", - "generated-value": "generated-value", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Not enough non-option arguments: got %s, need at least %s", - "other": "Not enough non-option arguments: got %s, need at least %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Too many non-option arguments: got %s, maximum of %s", - "other": "Too many non-option arguments: got %s, maximum of %s" - }, - "Missing argument value: %s": { - "one": "Missing argument value: %s", - "other": "Missing argument values: %s" - }, - "Missing required argument: %s": { - "one": "Missing required argument: %s", - "other": "Missing required arguments: %s" - }, - "Unknown argument: %s": { - "one": "Unknown argument: %s", - "other": "Unknown arguments: %s" - }, - "Unknown command: %s": { - "one": "Unknown command: %s", - "other": "Unknown commands: %s" - }, - "Invalid values:": "Invalid values:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s", - "Argument check failed: %s": "Argument check failed: %s", - "Implications failed:": "Missing dependent arguments:", - "Not enough arguments following: %s": "Not enough arguments following: %s", - "Invalid JSON config file: %s": "Invalid JSON config file: %s", - "Path to JSON config file": "Path to JSON config file", - "Show help": "Show help", - "Show version number": "Show version number", - "Did you mean %s?": "Did you mean %s?", - "Arguments %s and %s are mutually exclusive" : "Arguments %s and %s are mutually exclusive", - "Positionals:": "Positionals:", - "command": "command", - "deprecated": "deprecated", - "deprecated: %s": "deprecated: %s" -} diff --git a/node_modules/yargs/locales/es.json b/node_modules/yargs/locales/es.json deleted file mode 100644 index d77b461..0000000 --- a/node_modules/yargs/locales/es.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opciones:", - "Examples:": "Ejemplos:", - "boolean": "booleano", - "count": "cuenta", - "string": "cadena de caracteres", - "number": "número", - "array": "tabla", - "required": "requerido", - "default": "defecto", - "default:": "defecto:", - "choices:": "selección:", - "aliases:": "alias:", - "generated-value": "valor-generado", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s", - "other": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s", - "other": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s" - }, - "Missing argument value: %s": { - "one": "Falta argumento: %s", - "other": "Faltan argumentos: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento requerido: %s", - "other": "Faltan argumentos requeridos: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconocido: %s", - "other": "Argumentos desconocidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Recibido: %s, Seleccionados: %s", - "Argument check failed: %s": "Verificación de argumento ha fallado: %s", - "Implications failed:": "Implicaciones fallidas:", - "Not enough arguments following: %s": "No hay suficientes argumentos después de: %s", - "Invalid JSON config file: %s": "Archivo de configuración JSON inválido: %s", - "Path to JSON config file": "Ruta al archivo de configuración JSON", - "Show help": "Muestra ayuda", - "Show version number": "Muestra número de versión", - "Did you mean %s?": "Quisiste decir %s?" -} diff --git a/node_modules/yargs/locales/fi.json b/node_modules/yargs/locales/fi.json deleted file mode 100644 index 481feb7..0000000 --- a/node_modules/yargs/locales/fi.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "Komennot:", - "Options:": "Valinnat:", - "Examples:": "Esimerkkejä:", - "boolean": "totuusarvo", - "count": "lukumäärä", - "string": "merkkijono", - "number": "numero", - "array": "taulukko", - "required": "pakollinen", - "default": "oletusarvo", - "default:": "oletusarvo:", - "choices:": "vaihtoehdot:", - "aliases:": "aliakset:", - "generated-value": "generoitu-arvo", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s", - "other": "Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s", - "other": "Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s" - }, - "Missing argument value: %s": { - "one": "Argumentin arvo puuttuu: %s", - "other": "Argumentin arvot puuttuvat: %s" - }, - "Missing required argument: %s": { - "one": "Pakollinen argumentti puuttuu: %s", - "other": "Pakollisia argumentteja puuttuu: %s" - }, - "Unknown argument: %s": { - "one": "Tuntematon argumentti: %s", - "other": "Tuntemattomia argumentteja: %s" - }, - "Invalid values:": "Virheelliset arvot:", - "Argument: %s, Given: %s, Choices: %s": "Argumentti: %s, Annettu: %s, Vaihtoehdot: %s", - "Argument check failed: %s": "Argumentin tarkistus epäonnistui: %s", - "Implications failed:": "Riippuvia argumentteja puuttuu:", - "Not enough arguments following: %s": "Argumentin perässä ei ole tarpeeksi argumentteja: %s", - "Invalid JSON config file: %s": "Epävalidi JSON-asetustiedosto: %s", - "Path to JSON config file": "JSON-asetustiedoston polku", - "Show help": "Näytä ohje", - "Show version number": "Näytä versionumero", - "Did you mean %s?": "Tarkoititko %s?", - "Arguments %s and %s are mutually exclusive" : "Argumentit %s ja %s eivät ole yhteensopivat", - "Positionals:": "Sijaintiparametrit:", - "command": "komento" -} diff --git a/node_modules/yargs/locales/fr.json b/node_modules/yargs/locales/fr.json deleted file mode 100644 index edd743f..0000000 --- a/node_modules/yargs/locales/fr.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "Commands:": "Commandes :", - "Options:": "Options :", - "Examples:": "Exemples :", - "boolean": "booléen", - "count": "compteur", - "string": "chaîne de caractères", - "number": "nombre", - "array": "tableau", - "required": "requis", - "default": "défaut", - "default:": "défaut :", - "choices:": "choix :", - "aliases:": "alias :", - "generated-value": "valeur générée", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Pas assez d'arguments (hors options) : reçu %s, besoin d'au moins %s", - "other": "Pas assez d'arguments (hors options) : reçus %s, besoin d'au moins %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Trop d'arguments (hors options) : reçu %s, maximum de %s", - "other": "Trop d'arguments (hors options) : reçus %s, maximum de %s" - }, - "Missing argument value: %s": { - "one": "Argument manquant : %s", - "other": "Arguments manquants : %s" - }, - "Missing required argument: %s": { - "one": "Argument requis manquant : %s", - "other": "Arguments requis manquants : %s" - }, - "Unknown argument: %s": { - "one": "Argument inconnu : %s", - "other": "Arguments inconnus : %s" - }, - "Unknown command: %s": { - "one": "Commande inconnue : %s", - "other": "Commandes inconnues : %s" - }, - "Invalid values:": "Valeurs invalides :", - "Argument: %s, Given: %s, Choices: %s": "Argument : %s, donné : %s, choix : %s", - "Argument check failed: %s": "Echec de la vérification de l'argument : %s", - "Implications failed:": "Arguments dépendants manquants :", - "Not enough arguments following: %s": "Pas assez d'arguments après : %s", - "Invalid JSON config file: %s": "Fichier de configuration JSON invalide : %s", - "Path to JSON config file": "Chemin du fichier de configuration JSON", - "Show help": "Affiche l'aide", - "Show version number": "Affiche le numéro de version", - "Did you mean %s?": "Vouliez-vous dire %s ?", - "Arguments %s and %s are mutually exclusive" : "Les arguments %s et %s sont mutuellement exclusifs", - "Positionals:": "Arguments positionnels :", - "command": "commande" -} diff --git a/node_modules/yargs/locales/hi.json b/node_modules/yargs/locales/hi.json deleted file mode 100644 index a9de77c..0000000 --- a/node_modules/yargs/locales/hi.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "आदेश:", - "Options:": "विकल्प:", - "Examples:": "उदाहरण:", - "boolean": "सत्यता", - "count": "संख्या", - "string": "वर्णों का तार ", - "number": "अंक", - "array": "सरणी", - "required": "आवश्यक", - "default": "डिफॉल्ट", - "default:": "डिफॉल्ट:", - "choices:": "विकल्प:", - "aliases:": "उपनाम:", - "generated-value": "उत्पन्न-मूल्य", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है", - "other": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य", - "other": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य" - }, - "Missing argument value: %s": { - "one": "कुछ तर्को के मूल्य गुम हैं: %s", - "other": "कुछ तर्को के मूल्य गुम हैं: %s" - }, - "Missing required argument: %s": { - "one": "आवश्यक तर्क गुम हैं: %s", - "other": "आवश्यक तर्क गुम हैं: %s" - }, - "Unknown argument: %s": { - "one": "अज्ञात तर्क प्राप्त: %s", - "other": "अज्ञात तर्क प्राप्त: %s" - }, - "Invalid values:": "अमान्य मूल्य:", - "Argument: %s, Given: %s, Choices: %s": "तर्क: %s, प्राप्त: %s, विकल्प: %s", - "Argument check failed: %s": "तर्क जांच विफल: %s", - "Implications failed:": "दिए गए तर्क के लिए अतिरिक्त तर्क की अपेक्षा है:", - "Not enough arguments following: %s": "निम्नलिखित के बाद पर्याप्त तर्क नहीं प्राप्त: %s", - "Invalid JSON config file: %s": "अमान्य JSON config फाइल: %s", - "Path to JSON config file": "JSON config फाइल का पथ", - "Show help": "सहायता दिखाएँ", - "Show version number": "Version संख्या दिखाएँ", - "Did you mean %s?": "क्या आपका मतलब है %s?", - "Arguments %s and %s are mutually exclusive" : "तर्क %s और %s परस्पर अनन्य हैं", - "Positionals:": "स्थानीय:", - "command": "आदेश" -} diff --git a/node_modules/yargs/locales/hu.json b/node_modules/yargs/locales/hu.json deleted file mode 100644 index 21492d0..0000000 --- a/node_modules/yargs/locales/hu.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Parancsok:", - "Options:": "Opciók:", - "Examples:": "Példák:", - "boolean": "boolean", - "count": "számláló", - "string": "szöveg", - "number": "szám", - "array": "tömb", - "required": "kötelező", - "default": "alapértelmezett", - "default:": "alapértelmezett:", - "choices:": "lehetőségek:", - "aliases:": "aliaszok:", - "generated-value": "generált-érték", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell", - "other": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet", - "other": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet" - }, - "Missing argument value: %s": { - "one": "Hiányzó argumentum érték: %s", - "other": "Hiányzó argumentum értékek: %s" - }, - "Missing required argument: %s": { - "one": "Hiányzó kötelező argumentum: %s", - "other": "Hiányzó kötelező argumentumok: %s" - }, - "Unknown argument: %s": { - "one": "Ismeretlen argumentum: %s", - "other": "Ismeretlen argumentumok: %s" - }, - "Invalid values:": "Érvénytelen érték:", - "Argument: %s, Given: %s, Choices: %s": "Argumentum: %s, Megadott: %s, Lehetőségek: %s", - "Argument check failed: %s": "Argumentum ellenőrzés sikertelen: %s", - "Implications failed:": "Implikációk sikertelenek:", - "Not enough arguments following: %s": "Nem elég argumentum követi: %s", - "Invalid JSON config file: %s": "Érvénytelen JSON konfigurációs file: %s", - "Path to JSON config file": "JSON konfigurációs file helye", - "Show help": "Súgo megjelenítése", - "Show version number": "Verziószám megjelenítése", - "Did you mean %s?": "Erre gondoltál %s?" -} diff --git a/node_modules/yargs/locales/id.json b/node_modules/yargs/locales/id.json deleted file mode 100644 index 125867c..0000000 --- a/node_modules/yargs/locales/id.json +++ /dev/null @@ -1,50 +0,0 @@ - -{ - "Commands:": "Perintah:", - "Options:": "Pilihan:", - "Examples:": "Contoh:", - "boolean": "boolean", - "count": "jumlah", - "number": "nomor", - "string": "string", - "array": "larik", - "required": "diperlukan", - "default": "bawaan", - "default:": "bawaan:", - "aliases:": "istilah lain:", - "choices:": "pilihan:", - "generated-value": "nilai-yang-dihasilkan", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Argumen wajib kurang: hanya %s, minimal %s", - "other": "Argumen wajib kurang: hanya %s, minimal %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Terlalu banyak argumen wajib: ada %s, maksimal %s", - "other": "Terlalu banyak argumen wajib: ada %s, maksimal %s" - }, - "Missing argument value: %s": { - "one": "Kurang argumen: %s", - "other": "Kurang argumen: %s" - }, - "Missing required argument: %s": { - "one": "Kurang argumen wajib: %s", - "other": "Kurang argumen wajib: %s" - }, - "Unknown argument: %s": { - "one": "Argumen tak diketahui: %s", - "other": "Argumen tak diketahui: %s" - }, - "Invalid values:": "Nilai-nilai tidak valid:", - "Argument: %s, Given: %s, Choices: %s": "Argumen: %s, Diberikan: %s, Pilihan: %s", - "Argument check failed: %s": "Pemeriksaan argument gagal: %s", - "Implications failed:": "Implikasi gagal:", - "Not enough arguments following: %s": "Kurang argumen untuk: %s", - "Invalid JSON config file: %s": "Berkas konfigurasi JSON tidak valid: %s", - "Path to JSON config file": "Alamat berkas konfigurasi JSON", - "Show help": "Lihat bantuan", - "Show version number": "Lihat nomor versi", - "Did you mean %s?": "Maksud Anda: %s?", - "Arguments %s and %s are mutually exclusive" : "Argumen %s dan %s saling eksklusif", - "Positionals:": "Posisional-posisional:", - "command": "perintah" -} diff --git a/node_modules/yargs/locales/it.json b/node_modules/yargs/locales/it.json deleted file mode 100644 index fde5756..0000000 --- a/node_modules/yargs/locales/it.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Comandi:", - "Options:": "Opzioni:", - "Examples:": "Esempi:", - "boolean": "booleano", - "count": "contatore", - "string": "stringa", - "number": "numero", - "array": "vettore", - "required": "richiesto", - "default": "predefinito", - "default:": "predefinito:", - "choices:": "scelte:", - "aliases:": "alias:", - "generated-value": "valore generato", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s", - "other": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s", - "other": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s" - }, - "Missing argument value: %s": { - "one": "Argomento mancante: %s", - "other": "Argomenti mancanti: %s" - }, - "Missing required argument: %s": { - "one": "Argomento richiesto mancante: %s", - "other": "Argomenti richiesti mancanti: %s" - }, - "Unknown argument: %s": { - "one": "Argomento sconosciuto: %s", - "other": "Argomenti sconosciuti: %s" - }, - "Invalid values:": "Valori non validi:", - "Argument: %s, Given: %s, Choices: %s": "Argomento: %s, Richiesto: %s, Scelte: %s", - "Argument check failed: %s": "Controllo dell'argomento fallito: %s", - "Implications failed:": "Argomenti dipendenti mancanti:", - "Not enough arguments following: %s": "Argomenti insufficienti dopo: %s", - "Invalid JSON config file: %s": "File di configurazione JSON non valido: %s", - "Path to JSON config file": "Percorso del file di configurazione JSON", - "Show help": "Mostra la schermata di aiuto", - "Show version number": "Mostra il numero di versione", - "Did you mean %s?": "Intendi forse %s?" -} diff --git a/node_modules/yargs/locales/ja.json b/node_modules/yargs/locales/ja.json deleted file mode 100644 index 3954ae6..0000000 --- a/node_modules/yargs/locales/ja.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "Commands:": "コマンド:", - "Options:": "オプション:", - "Examples:": "例:", - "boolean": "真偽", - "count": "カウント", - "string": "文字列", - "number": "数値", - "array": "配列", - "required": "必須", - "default": "デフォルト", - "default:": "デフォルト:", - "choices:": "選択してください:", - "aliases:": "エイリアス:", - "generated-value": "生成された値", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:", - "other": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:", - "other": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:" - }, - "Missing argument value: %s": { - "one": "引数の値が見つかりません: %s", - "other": "引数の値が見つかりません: %s" - }, - "Missing required argument: %s": { - "one": "必須の引数が見つかりません: %s", - "other": "必須の引数が見つかりません: %s" - }, - "Unknown argument: %s": { - "one": "未知の引数です: %s", - "other": "未知の引数です: %s" - }, - "Invalid values:": "不正な値です:", - "Argument: %s, Given: %s, Choices: %s": "引数は %s です。与えられた値: %s, 選択してください: %s", - "Argument check failed: %s": "引数のチェックに失敗しました: %s", - "Implications failed:": "オプションの組み合わせで不正が生じました:", - "Not enough arguments following: %s": "次の引数が不足しています。: %s", - "Invalid JSON config file: %s": "JSONの設定ファイルが不正です: %s", - "Path to JSON config file": "JSONの設定ファイルまでのpath", - "Show help": "ヘルプを表示", - "Show version number": "バージョンを表示", - "Did you mean %s?": "もしかして %s?", - "Arguments %s and %s are mutually exclusive" : "引数 %s と %s は同時に指定できません", - "Positionals:": "位置:", - "command": "コマンド", - "deprecated": "非推奨", - "deprecated: %s": "非推奨: %s" -} diff --git a/node_modules/yargs/locales/ko.json b/node_modules/yargs/locales/ko.json deleted file mode 100644 index 746bc89..0000000 --- a/node_modules/yargs/locales/ko.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "명령:", - "Options:": "옵션:", - "Examples:": "예시:", - "boolean": "불리언", - "count": "개수", - "string": "문자열", - "number": "숫자", - "array": "배열", - "required": "필수", - "default": "기본값", - "default:": "기본값:", - "choices:": "선택지:", - "aliases:": "별칭:", - "generated-value": "생성된 값", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "옵션이 아닌 인수가 충분하지 않습니다: %s개 입력받음, 최소 %s개 입력 필요", - "other": "옵션이 아닌 인수가 충분하지 않습니다: %s개 입력받음, 최소 %s개 입력 필요" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "옵션이 아닌 인수가 너무 많습니다: %s개 입력받음, 최대 %s개 입력 가능", - "other": "옵션이 아닌 인수가 너무 많습니다: %s개 입력받음, 최대 %s개 입력 가능" - }, - "Missing argument value: %s": { - "one": "인수가 주어지지 않았습니다: %s", - "other": "인수가 주어지지 않았습니다: %s" - }, - "Missing required argument: %s": { - "one": "필수 인수가 주어지지 않았습니다: %s", - "other": "필수 인수가 주어지지 않았습니다: %s" - }, - "Unknown argument: %s": { - "one": "알 수 없는 인수입니다: %s", - "other": "알 수 없는 인수입니다: %s" - }, - "Invalid values:": "유효하지 않은 값:", - "Argument: %s, Given: %s, Choices: %s": "인수: %s, 주어진 값: %s, 선택지: %s", - "Argument check failed: %s": "인수 체크에 실패했습니다: %s", - "Implications failed:": "주어진 인수에 필요한 추가 인수가 주어지지 않았습니다:", - "Not enough arguments following: %s": "다음 인수가 주어지지 않았습니다: %s", - "Invalid JSON config file: %s": "유효하지 않은 JSON 설정 파일: %s", - "Path to JSON config file": "JSON 설정 파일 경로", - "Show help": "도움말 표시", - "Show version number": "버전 표시", - "Did you mean %s?": "%s을(를) 찾으시나요?", - "Arguments %s and %s are mutually exclusive" : "인수 %s과(와) %s은(는) 동시에 지정할 수 없습니다", - "Positionals:": "위치:", - "command": "명령" -} diff --git a/node_modules/yargs/locales/nb.json b/node_modules/yargs/locales/nb.json deleted file mode 100644 index 6f410ed..0000000 --- a/node_modules/yargs/locales/nb.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "Commands:": "Kommandoer:", - "Options:": "Alternativer:", - "Examples:": "Eksempler:", - "boolean": "boolsk", - "count": "antall", - "string": "streng", - "number": "nummer", - "array": "matrise", - "required": "obligatorisk", - "default": "standard", - "default:": "standard:", - "choices:": "valg:", - "generated-value": "generert-verdi", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s", - "other": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s", - "other": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s" - }, - "Missing argument value: %s": { - "one": "Mangler argument verdi: %s", - "other": "Mangler argument verdier: %s" - }, - "Missing required argument: %s": { - "one": "Mangler obligatorisk argument: %s", - "other": "Mangler obligatoriske argumenter: %s" - }, - "Unknown argument: %s": { - "one": "Ukjent argument: %s", - "other": "Ukjente argumenter: %s" - }, - "Invalid values:": "Ugyldige verdier:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gitt: %s, Valg: %s", - "Argument check failed: %s": "Argumentsjekk mislyktes: %s", - "Implications failed:": "Konsekvensene mislyktes:", - "Not enough arguments following: %s": "Ikke nok følgende argumenter: %s", - "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", - "Path to JSON config file": "Bane til JSON konfigurasjonsfil", - "Show help": "Vis hjelp", - "Show version number": "Vis versjonsnummer" -} diff --git a/node_modules/yargs/locales/nl.json b/node_modules/yargs/locales/nl.json deleted file mode 100644 index 9ff95c5..0000000 --- a/node_modules/yargs/locales/nl.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "Commando's:", - "Options:": "Opties:", - "Examples:": "Voorbeelden:", - "boolean": "booleaans", - "count": "aantal", - "string": "string", - "number": "getal", - "array": "lijst", - "required": "verplicht", - "default": "standaard", - "default:": "standaard:", - "choices:": "keuzes:", - "aliases:": "aliassen:", - "generated-value": "gegenereerde waarde", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig", - "other": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s", - "other": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s" - }, - "Missing argument value: %s": { - "one": "Missende argumentwaarde: %s", - "other": "Missende argumentwaarden: %s" - }, - "Missing required argument: %s": { - "one": "Missend verplicht argument: %s", - "other": "Missende verplichte argumenten: %s" - }, - "Unknown argument: %s": { - "one": "Onbekend argument: %s", - "other": "Onbekende argumenten: %s" - }, - "Invalid values:": "Ongeldige waarden:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s", - "Argument check failed: %s": "Argumentcontrole mislukt: %s", - "Implications failed:": "Ontbrekende afhankelijke argumenten:", - "Not enough arguments following: %s": "Niet genoeg argumenten na: %s", - "Invalid JSON config file: %s": "Ongeldig JSON-config-bestand: %s", - "Path to JSON config file": "Pad naar JSON-config-bestand", - "Show help": "Toon help", - "Show version number": "Toon versienummer", - "Did you mean %s?": "Bedoelde u misschien %s?", - "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s kunnen niet tegelijk gebruikt worden", - "Positionals:": "Positie-afhankelijke argumenten", - "command": "commando" -} diff --git a/node_modules/yargs/locales/nn.json b/node_modules/yargs/locales/nn.json deleted file mode 100644 index 24479ac..0000000 --- a/node_modules/yargs/locales/nn.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "Commands:": "Kommandoar:", - "Options:": "Alternativ:", - "Examples:": "Døme:", - "boolean": "boolsk", - "count": "mengd", - "string": "streng", - "number": "nummer", - "array": "matrise", - "required": "obligatorisk", - "default": "standard", - "default:": "standard:", - "choices:": "val:", - "generated-value": "generert-verdi", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s", - "other": "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "For mange ikkje-alternativ argument: fekk %s, maksimum %s", - "other": "For mange ikkje-alternativ argument: fekk %s, maksimum %s" - }, - "Missing argument value: %s": { - "one": "Manglar argumentverdi: %s", - "other": "Manglar argumentverdiar: %s" - }, - "Missing required argument: %s": { - "one": "Manglar obligatorisk argument: %s", - "other": "Manglar obligatoriske argument: %s" - }, - "Unknown argument: %s": { - "one": "Ukjent argument: %s", - "other": "Ukjende argument: %s" - }, - "Invalid values:": "Ugyldige verdiar:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gjeve: %s, Val: %s", - "Argument check failed: %s": "Argumentsjekk mislukkast: %s", - "Implications failed:": "Konsekvensane mislukkast:", - "Not enough arguments following: %s": "Ikkje nok fylgjande argument: %s", - "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", - "Path to JSON config file": "Bane til JSON konfigurasjonsfil", - "Show help": "Vis hjelp", - "Show version number": "Vis versjonsnummer" -} diff --git a/node_modules/yargs/locales/pirate.json b/node_modules/yargs/locales/pirate.json deleted file mode 100644 index dcb5cb7..0000000 --- a/node_modules/yargs/locales/pirate.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "Commands:": "Choose yer command:", - "Options:": "Options for me hearties!", - "Examples:": "Ex. marks the spot:", - "required": "requi-yar-ed", - "Missing required argument: %s": { - "one": "Ye be havin' to set the followin' argument land lubber: %s", - "other": "Ye be havin' to set the followin' arguments land lubber: %s" - }, - "Show help": "Parlay this here code of conduct", - "Show version number": "'Tis the version ye be askin' fer", - "Arguments %s and %s are mutually exclusive" : "Yon scurvy dogs %s and %s be as bad as rum and a prudish wench" -} diff --git a/node_modules/yargs/locales/pl.json b/node_modules/yargs/locales/pl.json deleted file mode 100644 index a41d4bd..0000000 --- a/node_modules/yargs/locales/pl.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "Polecenia:", - "Options:": "Opcje:", - "Examples:": "Przykłady:", - "boolean": "boolean", - "count": "ilość", - "string": "ciąg znaków", - "number": "liczba", - "array": "tablica", - "required": "wymagany", - "default": "domyślny", - "default:": "domyślny:", - "choices:": "dostępne:", - "aliases:": "aliasy:", - "generated-value": "wygenerowana-wartość", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s", - "other": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s", - "other": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s" - }, - "Missing argument value: %s": { - "one": "Brak wartości dla argumentu: %s", - "other": "Brak wartości dla argumentów: %s" - }, - "Missing required argument: %s": { - "one": "Brak wymaganego argumentu: %s", - "other": "Brak wymaganych argumentów: %s" - }, - "Unknown argument: %s": { - "one": "Nieznany argument: %s", - "other": "Nieznane argumenty: %s" - }, - "Invalid values:": "Nieprawidłowe wartości:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Otrzymano: %s, Dostępne: %s", - "Argument check failed: %s": "Weryfikacja argumentów nie powiodła się: %s", - "Implications failed:": "Założenia nie zostały spełnione:", - "Not enough arguments following: %s": "Niewystarczająca ilość argumentów następujących po: %s", - "Invalid JSON config file: %s": "Nieprawidłowy plik konfiguracyjny JSON: %s", - "Path to JSON config file": "Ścieżka do pliku konfiguracyjnego JSON", - "Show help": "Pokaż pomoc", - "Show version number": "Pokaż numer wersji", - "Did you mean %s?": "Czy chodziło Ci o %s?", - "Arguments %s and %s are mutually exclusive": "Argumenty %s i %s wzajemnie się wykluczają", - "Positionals:": "Pozycyjne:", - "command": "polecenie" -} diff --git a/node_modules/yargs/locales/pt.json b/node_modules/yargs/locales/pt.json deleted file mode 100644 index 0c8ac99..0000000 --- a/node_modules/yargs/locales/pt.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opções:", - "Examples:": "Exemplos:", - "boolean": "boolean", - "count": "contagem", - "string": "cadeia de caracteres", - "number": "número", - "array": "arranjo", - "required": "requerido", - "default": "padrão", - "default:": "padrão:", - "choices:": "escolhas:", - "generated-value": "valor-gerado", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s", - "other": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Excesso de argumentos não opcionais: recebido %s, máximo de %s", - "other": "Excesso de argumentos não opcionais: recebido %s, máximo de %s" - }, - "Missing argument value: %s": { - "one": "Falta valor de argumento: %s", - "other": "Falta valores de argumento: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento obrigatório: %s", - "other": "Faltando argumentos obrigatórios: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconhecido: %s", - "other": "Argumentos desconhecidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Escolhas: %s", - "Argument check failed: %s": "Verificação de argumento falhou: %s", - "Implications failed:": "Implicações falharam:", - "Not enough arguments following: %s": "Insuficientes argumentos a seguir: %s", - "Invalid JSON config file: %s": "Arquivo de configuração em JSON esta inválido: %s", - "Path to JSON config file": "Caminho para o arquivo de configuração em JSON", - "Show help": "Mostra ajuda", - "Show version number": "Mostra número de versão", - "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos" -} diff --git a/node_modules/yargs/locales/pt_BR.json b/node_modules/yargs/locales/pt_BR.json deleted file mode 100644 index eae1ec6..0000000 --- a/node_modules/yargs/locales/pt_BR.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opções:", - "Examples:": "Exemplos:", - "boolean": "booleano", - "count": "contagem", - "string": "string", - "number": "número", - "array": "array", - "required": "obrigatório", - "default:": "padrão:", - "choices:": "opções:", - "aliases:": "sinônimos:", - "generated-value": "valor-gerado", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s", - "other": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Excesso de argumentos: recebido %s, máximo de %s", - "other": "Excesso de argumentos: recebido %s, máximo de %s" - }, - "Missing argument value: %s": { - "one": "Falta valor de argumento: %s", - "other": "Falta valores de argumento: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento obrigatório: %s", - "other": "Faltando argumentos obrigatórios: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconhecido: %s", - "other": "Argumentos desconhecidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Opções: %s", - "Argument check failed: %s": "Verificação de argumento falhou: %s", - "Implications failed:": "Implicações falharam:", - "Not enough arguments following: %s": "Argumentos insuficientes a seguir: %s", - "Invalid JSON config file: %s": "Arquivo JSON de configuração inválido: %s", - "Path to JSON config file": "Caminho para o arquivo JSON de configuração", - "Show help": "Exibe ajuda", - "Show version number": "Exibe a versão", - "Did you mean %s?": "Você quis dizer %s?", - "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos", - "Positionals:": "Posicionais:", - "command": "comando" -} diff --git a/node_modules/yargs/locales/ru.json b/node_modules/yargs/locales/ru.json deleted file mode 100644 index d5c9e32..0000000 --- a/node_modules/yargs/locales/ru.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "Commands:": "Команды:", - "Options:": "Опции:", - "Examples:": "Примеры:", - "boolean": "булевый тип", - "count": "подсчет", - "string": "строковой тип", - "number": "число", - "array": "массив", - "required": "необходимо", - "default": "по умолчанию", - "default:": "по умолчанию:", - "choices:": "возможности:", - "aliases:": "алиасы:", - "generated-value": "генерированное значение", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s", - "other": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s", - "other": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s" - }, - "Missing argument value: %s": { - "one": "Не хватает значения аргумента: %s", - "other": "Не хватает значений аргументов: %s" - }, - "Missing required argument: %s": { - "one": "Не хватает необходимого аргумента: %s", - "other": "Не хватает необходимых аргументов: %s" - }, - "Unknown argument: %s": { - "one": "Неизвестный аргумент: %s", - "other": "Неизвестные аргументы: %s" - }, - "Invalid values:": "Недействительные значения:", - "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Данное значение: %s, Возможности: %s", - "Argument check failed: %s": "Проверка аргументов не удалась: %s", - "Implications failed:": "Данный аргумент требует следующий дополнительный аргумент:", - "Not enough arguments following: %s": "Недостаточно следующих аргументов: %s", - "Invalid JSON config file: %s": "Недействительный файл конфигурации JSON: %s", - "Path to JSON config file": "Путь к файлу конфигурации JSON", - "Show help": "Показать помощь", - "Show version number": "Показать номер версии", - "Did you mean %s?": "Вы имели в виду %s?", - "Arguments %s and %s are mutually exclusive": "Аргументы %s и %s являются взаимоисключающими", - "Positionals:": "Позиционные аргументы:", - "command": "команда", - "deprecated": "устар.", - "deprecated: %s": "устар.: %s" -} diff --git a/node_modules/yargs/locales/th.json b/node_modules/yargs/locales/th.json deleted file mode 100644 index 33b048e..0000000 --- a/node_modules/yargs/locales/th.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "คอมมาน", - "Options:": "ออฟชั่น", - "Examples:": "ตัวอย่าง", - "boolean": "บูลีน", - "count": "นับ", - "string": "สตริง", - "number": "ตัวเลข", - "array": "อาเรย์", - "required": "จำเป็น", - "default": "ค่าเริ่มต้", - "default:": "ค่าเริ่มต้น", - "choices:": "ตัวเลือก", - "aliases:": "เอเลียส", - "generated-value": "ค่าที่ถูกสร้างขึ้น", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า", - "other": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า", - "other": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า" - }, - "Missing argument value: %s": { - "one": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s", - "other": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s" - }, - "Missing required argument: %s": { - "one": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s", - "other": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s" - }, - "Unknown argument: %s": { - "one": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s", - "other": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s" - }, - "Invalid values:": "ค่าไม่ถูกต้อง:", - "Argument: %s, Given: %s, Choices: %s": "อาร์กิวเมนต์: %s, ได้รับ: %s, ตัวเลือก: %s", - "Argument check failed: %s": "ตรวจสอบพบอาร์กิวเมนต์ที่ไม่ถูกต้อง: %s", - "Implications failed:": "Implications ไม่สำเร็จ:", - "Not enough arguments following: %s": "ใส่อาร์กิวเมนต์ไม่ครบ: %s", - "Invalid JSON config file: %s": "ไฟล์คอนฟิค JSON ไม่ถูกต้อง: %s", - "Path to JSON config file": "พาทไฟล์คอนฟิค JSON", - "Show help": "ขอความช่วยเหลือ", - "Show version number": "แสดงตัวเลขเวอร์ชั่น", - "Did you mean %s?": "คุณหมายถึง %s?" -} diff --git a/node_modules/yargs/locales/tr.json b/node_modules/yargs/locales/tr.json deleted file mode 100644 index 0d0d2cc..0000000 --- a/node_modules/yargs/locales/tr.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "Commands:": "Komutlar:", - "Options:": "Seçenekler:", - "Examples:": "Örnekler:", - "boolean": "boolean", - "count": "sayı", - "string": "string", - "number": "numara", - "array": "array", - "required": "zorunlu", - "default": "varsayılan", - "default:": "varsayılan:", - "choices:": "seçimler:", - "aliases:": "takma adlar:", - "generated-value": "oluşturulan-değer", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli", - "other": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s", - "other": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s" - }, - "Missing argument value: %s": { - "one": "Eksik argüman değeri: %s", - "other": "Eksik argüman değerleri: %s" - }, - "Missing required argument: %s": { - "one": "Eksik zorunlu argüman: %s", - "other": "Eksik zorunlu argümanlar: %s" - }, - "Unknown argument: %s": { - "one": "Bilinmeyen argüman: %s", - "other": "Bilinmeyen argümanlar: %s" - }, - "Invalid values:": "Geçersiz değerler:", - "Argument: %s, Given: %s, Choices: %s": "Argüman: %s, Verilen: %s, Seçimler: %s", - "Argument check failed: %s": "Argüman kontrolü başarısız oldu: %s", - "Implications failed:": "Sonuçlar başarısız oldu:", - "Not enough arguments following: %s": "%s için yeterli argüman bulunamadı", - "Invalid JSON config file: %s": "Geçersiz JSON yapılandırma dosyası: %s", - "Path to JSON config file": "JSON yapılandırma dosya konumu", - "Show help": "Yardım detaylarını göster", - "Show version number": "Versiyon detaylarını göster", - "Did you mean %s?": "Bunu mu demek istediniz: %s?", - "Positionals:": "Sıralılar:", - "command": "komut" -} diff --git a/node_modules/yargs/locales/uk_UA.json b/node_modules/yargs/locales/uk_UA.json deleted file mode 100644 index 0af0e99..0000000 --- a/node_modules/yargs/locales/uk_UA.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "Commands:": "Команди:", - "Options:": "Опції:", - "Examples:": "Приклади:", - "boolean": "boolean", - "count": "кількість", - "string": "строка", - "number": "число", - "array": "масива", - "required": "обов'язково", - "default": "за замовчуванням", - "default:": "за замовчуванням:", - "choices:": "доступні варіанти:", - "aliases:": "псевдоніми:", - "generated-value": "згенероване значення", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Недостатньо аргументів: наразі %s, потрібно %s або більше", - "other": "Недостатньо аргументів: наразі %s, потрібно %s або більше" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Забагато аргументів: наразі %s, максимум %s", - "other": "Too many non-option arguments: наразі %s, максимум of %s" - }, - "Missing argument value: %s": { - "one": "Відсутнє значення для аргументу: %s", - "other": "Відсутні значення для аргументу: %s" - }, - "Missing required argument: %s": { - "one": "Відсутній обов'язковий аргумент: %s", - "other": "Відсутні обов'язкові аргументи: %s" - }, - "Unknown argument: %s": { - "one": "Аргумент %s не підтримується", - "other": "Аргументи %s не підтримуються" - }, - "Invalid values:": "Некоректні значення:", - "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Введено: %s, Доступні варіанти: %s", - "Argument check failed: %s": "Аргумент не пройшов перевірку: %s", - "Implications failed:": "Відсутні залежні аргументи:", - "Not enough arguments following: %s": "Не достатньо аргументів після: %s", - "Invalid JSON config file: %s": "Некоректний JSON-файл конфігурації: %s", - "Path to JSON config file": "Шлях до JSON-файлу конфігурації", - "Show help": "Показати довідку", - "Show version number": "Показати версію", - "Did you mean %s?": "Можливо, ви мали на увазі %s?", - "Arguments %s and %s are mutually exclusive" : "Аргументи %s та %s взаємовиключні", - "Positionals:": "Позиційні:", - "command": "команда", - "deprecated": "застарілий", - "deprecated: %s": "застарілий: %s" -} diff --git a/node_modules/yargs/locales/uz.json b/node_modules/yargs/locales/uz.json deleted file mode 100644 index 0d07168..0000000 --- a/node_modules/yargs/locales/uz.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "Commands:": "Buyruqlar:", - "Options:": "Imkoniyatlar:", - "Examples:": "Misollar:", - "boolean": "boolean", - "count": "sanoq", - "string": "satr", - "number": "raqam", - "array": "massiv", - "required": "majburiy", - "default": "boshlang'ich", - "default:": "boshlang'ich:", - "choices:": "tanlovlar:", - "aliases:": "taxalluslar:", - "generated-value": "yaratilgan-qiymat", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "No-imkoniyat argumentlar yetarli emas: berilgan %s, minimum %s", - "other": "No-imkoniyat argumentlar yetarli emas: berilgan %s, minimum %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "No-imkoniyat argumentlar juda ko'p: berilgan %s, maksimum %s", - "other": "No-imkoniyat argumentlar juda ko'p: got %s, maksimum %s" - }, - "Missing argument value: %s": { - "one": "Argument qiymati berilmagan: %s", - "other": "Argument qiymatlari berilmagan: %s" - }, - "Missing required argument: %s": { - "one": "Majburiy argument berilmagan: %s", - "other": "Majburiy argumentlar berilmagan: %s" - }, - "Unknown argument: %s": { - "one": "Noma'lum argument berilmagan: %s", - "other": "Noma'lum argumentlar berilmagan: %s" - }, - "Invalid values:": "Nosoz qiymatlar:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Berilgan: %s, Tanlovlar: %s", - "Argument check failed: %s": "Muvaffaqiyatsiz argument tekshiruvi: %s", - "Implications failed:": "Bog'liq argumentlar berilmagan:", - "Not enough arguments following: %s": "Quyidagi argumentlar yetarli emas: %s", - "Invalid JSON config file: %s": "Nosoz JSON konfiguratsiya fayli: %s", - "Path to JSON config file": "JSON konfiguratsiya fayli joylashuvi", - "Show help": "Yordam ko'rsatish", - "Show version number": "Versiyani ko'rsatish", - "Did you mean %s?": "%s ni nazarda tutyapsizmi?", - "Arguments %s and %s are mutually exclusive" : "%s va %s argumentlari alohida", - "Positionals:": "Positsionallar:", - "command": "buyruq", - "deprecated": "eskirgan", - "deprecated: %s": "eskirgan: %s" - } - \ No newline at end of file diff --git a/node_modules/yargs/locales/zh_CN.json b/node_modules/yargs/locales/zh_CN.json deleted file mode 100644 index 257d26b..0000000 --- a/node_modules/yargs/locales/zh_CN.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "Commands:": "命令:", - "Options:": "选项:", - "Examples:": "示例:", - "boolean": "布尔", - "count": "计数", - "string": "字符串", - "number": "数字", - "array": "数组", - "required": "必需", - "default": "默认值", - "default:": "默认值:", - "choices:": "可选值:", - "generated-value": "生成的值", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个", - "other": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个", - "other": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个" - }, - "Missing argument value: %s": { - "one": "没有给此选项指定值:%s", - "other": "没有给这些选项指定值:%s" - }, - "Missing required argument: %s": { - "one": "缺少必须的选项:%s", - "other": "缺少这些必须的选项:%s" - }, - "Unknown argument: %s": { - "one": "无法识别的选项:%s", - "other": "无法识别这些选项:%s" - }, - "Invalid values:": "无效的选项值:", - "Argument: %s, Given: %s, Choices: %s": "选项名称: %s, 传入的值: %s, 可选的值:%s", - "Argument check failed: %s": "选项值验证失败:%s", - "Implications failed:": "缺少依赖的选项:", - "Not enough arguments following: %s": "没有提供足够的值给此选项:%s", - "Invalid JSON config file: %s": "无效的 JSON 配置文件:%s", - "Path to JSON config file": "JSON 配置文件的路径", - "Show help": "显示帮助信息", - "Show version number": "显示版本号", - "Did you mean %s?": "是指 %s?", - "Arguments %s and %s are mutually exclusive" : "选项 %s 和 %s 是互斥的", - "Positionals:": "位置:", - "command": "命令" -} diff --git a/node_modules/yargs/locales/zh_TW.json b/node_modules/yargs/locales/zh_TW.json deleted file mode 100644 index e38495d..0000000 --- a/node_modules/yargs/locales/zh_TW.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "Commands:": "命令:", - "Options:": "選項:", - "Examples:": "範例:", - "boolean": "布林", - "count": "次數", - "string": "字串", - "number": "數字", - "array": "陣列", - "required": "必填", - "default": "預設值", - "default:": "預設值:", - "choices:": "可選值:", - "aliases:": "別名:", - "generated-value": "生成的值", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個", - "other": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個", - "other": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個" - }, - "Missing argument value: %s": { - "one": "此引數無指定值:%s", - "other": "這些引數無指定值:%s" - }, - "Missing required argument: %s": { - "one": "缺少必須的引數:%s", - "other": "缺少這些必須的引數:%s" - }, - "Unknown argument: %s": { - "one": "未知的引數:%s", - "other": "未知的引數:%s" - }, - "Invalid values:": "無效的選項值:", - "Argument: %s, Given: %s, Choices: %s": "引數名稱: %s, 傳入的值: %s, 可選的值:%s", - "Argument check failed: %s": "引數驗證失敗:%s", - "Implications failed:": "缺少依賴引數:", - "Not enough arguments following: %s": "沒有提供足夠的值給此引數:%s", - "Invalid JSON config file: %s": "無效的 JSON 設置文件:%s", - "Path to JSON config file": "JSON 設置文件的路徑", - "Show help": "顯示說明", - "Show version number": "顯示版本", - "Did you mean %s?": "您是指 %s 嗎?", - "Arguments %s and %s are mutually exclusive" : "引數 %s 和 %s 互斥", - "Positionals:": "位置:", - "command": "命令", - "deprecated": "已淘汰", - "deprecated: %s": "已淘汰:%s" - } diff --git a/node_modules/yargs/package.json b/node_modules/yargs/package.json deleted file mode 100644 index 389cc6b..0000000 --- a/node_modules/yargs/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "name": "yargs", - "version": "17.7.2", - "description": "yargs the modern, pirate-themed, successor to optimist.", - "main": "./index.cjs", - "exports": { - "./package.json": "./package.json", - ".": [ - { - "import": "./index.mjs", - "require": "./index.cjs" - }, - "./index.cjs" - ], - "./helpers": { - "import": "./helpers/helpers.mjs", - "require": "./helpers/index.js" - }, - "./browser": { - "import": "./browser.mjs", - "types": "./browser.d.ts" - }, - "./yargs": [ - { - "import": "./yargs.mjs", - "require": "./yargs" - }, - "./yargs" - ] - }, - "type": "module", - "module": "./index.mjs", - "contributors": [ - { - "name": "Yargs Contributors", - "url": "https://github.com/yargs/yargs/graphs/contributors" - } - ], - "files": [ - "browser.mjs", - "browser.d.ts", - "index.cjs", - "helpers/*.js", - "helpers/*", - "index.mjs", - "yargs", - "yargs.mjs", - "build", - "locales", - "LICENSE", - "lib/platform-shims/*.mjs", - "!*.d.ts", - "!**/*.d.ts" - ], - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "devDependencies": { - "@types/chai": "^4.2.11", - "@types/mocha": "^9.0.0", - "@types/node": "^18.0.0", - "c8": "^7.7.0", - "chai": "^4.2.0", - "chalk": "^4.0.0", - "coveralls": "^3.0.9", - "cpr": "^3.0.1", - "cross-env": "^7.0.2", - "cross-spawn": "^7.0.0", - "eslint": "^7.23.0", - "gts": "^3.0.0", - "hashish": "0.0.4", - "mocha": "^9.0.0", - "rimraf": "^3.0.2", - "rollup": "^2.23.0", - "rollup-plugin-cleanup": "^3.1.1", - "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-ts": "^2.0.4", - "typescript": "^4.0.2", - "which": "^2.0.0", - "yargs-test-extends": "^1.0.1" - }, - "scripts": { - "fix": "gts fix && npm run fix:js", - "fix:js": "eslint . --ext cjs --ext mjs --ext js --fix", - "posttest": "npm run check", - "test": "c8 mocha --enable-source-maps ./test/*.cjs --require ./test/before.cjs --timeout=12000 --check-leaks", - "test:esm": "c8 mocha --enable-source-maps ./test/esm/*.mjs --check-leaks", - "coverage": "c8 report --check-coverage", - "prepare": "npm run compile", - "pretest": "npm run compile -- -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", - "compile": "rimraf build && tsc", - "postcompile": "npm run build:cjs", - "build:cjs": "rollup -c rollup.config.cjs", - "postbuild:cjs": "rimraf ./build/index.cjs.d.ts", - "check": "gts lint && npm run check:js", - "check:js": "eslint . --ext cjs --ext mjs --ext js", - "clean": "gts clean" - }, - "repository": { - "type": "git", - "url": "https://github.com/yargs/yargs.git" - }, - "homepage": "https://yargs.js.org/", - "keywords": [ - "argument", - "args", - "option", - "parser", - "parsing", - "cli", - "command" - ], - "license": "MIT", - "engines": { - "node": ">=12" - } -} diff --git a/node_modules/yargs/yargs b/node_modules/yargs/yargs deleted file mode 100644 index 8460d10..0000000 --- a/node_modules/yargs/yargs +++ /dev/null @@ -1,9 +0,0 @@ -// TODO: consolidate on using a helpers file at some point in the future, which -// is the approach currently used to export Parser and applyExtends for ESM: -const {applyExtends, cjsPlatformShim, Parser, Yargs, processArgv} = require('./build/index.cjs') -Yargs.applyExtends = (config, cwd, mergeExtends) => { - return applyExtends(config, cwd, mergeExtends, cjsPlatformShim) -} -Yargs.hideBin = processArgv.hideBin -Yargs.Parser = Parser -module.exports = Yargs diff --git a/node_modules/yargs/yargs.mjs b/node_modules/yargs/yargs.mjs deleted file mode 100644 index 6d9f390..0000000 --- a/node_modules/yargs/yargs.mjs +++ /dev/null @@ -1,10 +0,0 @@ -// TODO: consolidate on using a helpers file at some point in the future, which -// is the approach currently used to export Parser and applyExtends for ESM: -import pkg from './build/index.cjs'; -const {applyExtends, cjsPlatformShim, Parser, processArgv, Yargs} = pkg; -Yargs.applyExtends = (config, cwd, mergeExtends) => { - return applyExtends(config, cwd, mergeExtends, cjsPlatformShim); -}; -Yargs.hideBin = processArgv.hideBin; -Yargs.Parser = Parser; -export default Yargs; diff --git a/test_lab_api.js b/test_lab_api.js new file mode 100644 index 0000000..6cd4b92 --- /dev/null +++ b/test_lab_api.js @@ -0,0 +1,42 @@ +const patientId = "PAT-TEST-001"; + +async function test() { + console.log("1. Starting Lab Watcher..."); + let res = await fetch("http://localhost:3000/api/ai/lab/watch/start", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ + patientId, + baselineData: { + baseline: "Patient is on Warfarin (blood thinner) and has hypertension.", + medications: ["Warfarin", "Lisinopril"] + } + }) + }); + console.log("Start Response:", await res.json()); + + console.log("\n2. Submitting dangerous lab result..."); + res = await fetch(`http://localhost:3000/api/ai/lab/result/${patientId}`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ + result: "Latest INR level is 6.5 (Dangerously High)" + }) + }); + console.log("Signal Response:", await res.json()); + + console.log("\n3. Polling for AI Alerts (waiting 15 seconds)..."); + for (let i = 0; i < 4; i++) { + await new Promise(r => setTimeout(r, 5000)); + res = await fetch(`http://localhost:3000/api/ai/lab/alerts/${patientId}`); + const data = await res.json(); + console.log(`Poll ${i+1}:`, data); + if (data.alerts && data.alerts.length > 0) { + console.log("🎉 SUCCESS! Alert received:"); + console.log(data.alerts[0]); + break; + } + } +} + +test();